@uipath/maestro-sdk 0.9.0 → 1.0.0
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/dist/index.js +92364 -126702
- package/dist/manifest/bpmn-spec.js +2989 -0
- package/dist/src/client.d.ts +2 -0
- package/dist/src/debug-http-client.d.ts +110 -12
- package/dist/src/debug-service.d.ts +51 -3
- package/dist/src/debug-types.d.ts +95 -0
- package/dist/src/flags/manifest-flags.d.ts +2 -0
- package/dist/src/index.d.ts +15 -8
- package/dist/src/json-input.d.ts +15 -0
- package/dist/src/manifest/bpmn-spec.d.ts +9 -0
- package/dist/src/registry/command.d.ts +1 -1
- package/dist/src/registry/index.d.ts +2 -2
- package/dist/src/registry/integration-service-fetcher.d.ts +21 -0
- package/dist/src/registry/integration-service-metadata.types.d.ts +6 -0
- package/dist/src/shared-commands/debug-instances.d.ts +6 -0
- package/dist/src/shared-commands/process.d.ts +6 -0
- package/dist/src/types.d.ts +44 -0
- package/dist/src/with-debug-pims-call.d.ts +3 -0
- package/package.json +18 -10
package/dist/src/client.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { PimsApiConfig, PimsRequestOptions } from "./types";
|
|
2
2
|
export declare function pimsGet<T>(config: PimsApiConfig, path: string, options?: PimsRequestOptions): Promise<T>;
|
|
3
3
|
export declare function pimsPost<T>(config: PimsApiConfig, path: string, body?: unknown, options?: PimsRequestOptions): Promise<T>;
|
|
4
|
+
export declare function pimsPut<T>(config: PimsApiConfig, path: string, body?: unknown, options?: PimsRequestOptions): Promise<T>;
|
|
5
|
+
export declare function pimsPatch<T>(config: PimsApiConfig, path: string, body?: unknown, options?: PimsRequestOptions): Promise<T>;
|
|
@@ -4,27 +4,125 @@
|
|
|
4
4
|
* Used by flow-tool, case-tool, and maestro-tool.
|
|
5
5
|
*/
|
|
6
6
|
import type { OrchestratorApiConfig } from "./debug-types";
|
|
7
|
+
/** Logical service the helper is talking to. Used by callers / formatters
|
|
8
|
+
* to render the failing endpoint with the right URL prefix. */
|
|
9
|
+
export type DebugApiService = "orchestrator" | "pims" | "studio-web";
|
|
10
|
+
/** Structured payload carried by a {@link MaestroHttpError}. Every field
|
|
11
|
+
* except {@link stage} is always populated; {@link stage} is filled in by the
|
|
12
|
+
* caller via the optional `stage` parameter on each helper. */
|
|
13
|
+
export interface MaestroHttpErrorDetails {
|
|
14
|
+
service: DebugApiService;
|
|
15
|
+
method: string;
|
|
16
|
+
/** Endpoint path relative to the service root (e.g. `/api/v1/debug-instances`). */
|
|
17
|
+
endpoint: string;
|
|
18
|
+
/** Fully resolved URL the helper hit. */
|
|
19
|
+
url: string;
|
|
20
|
+
httpStatus: number;
|
|
21
|
+
statusText: string;
|
|
22
|
+
/** Raw response body — kept verbatim for diagnostics. May be empty/null
|
|
23
|
+
* on Studio Web errors. */
|
|
24
|
+
body: string;
|
|
25
|
+
/** Pipeline stage label provided by the caller (e.g. "create-debug-instance").
|
|
26
|
+
* Optional because not every helper has a clearly labelled stage. */
|
|
27
|
+
stage?: string;
|
|
28
|
+
/** Parsed `errorCode` from a JSON body matching `{errorCode}`. The PIMS /
|
|
29
|
+
* Maestro convention is to serialise codes as numbers; we keep it as a
|
|
30
|
+
* string here so the field shape lines up with {@link import("@uipath/common").ErrorContext.errorCode}. */
|
|
31
|
+
parsedErrorCode?: string;
|
|
32
|
+
/** Parsed top-level `message` from a JSON body matching `{message}`. */
|
|
33
|
+
parsedErrorMessage?: string;
|
|
34
|
+
/** Parsed `traceId` (Application Insights / W3C trace-context). */
|
|
35
|
+
parsedTraceId?: string;
|
|
36
|
+
/** Parsed `requestId` when the backend sends one separately from `traceId`. */
|
|
37
|
+
parsedRequestId?: string;
|
|
38
|
+
}
|
|
7
39
|
/**
|
|
8
|
-
*
|
|
40
|
+
* Try to parse the standard UiPath backend error body
|
|
41
|
+
* `{ "message": "...", "errorCode": <number|string>, "traceId": "...", "requestId": "..." }`.
|
|
42
|
+
*
|
|
43
|
+
* Returns the recognised fields (all optional). Never throws — invalid JSON
|
|
44
|
+
* or unexpected shapes produce an empty object.
|
|
9
45
|
*/
|
|
10
|
-
export declare function
|
|
46
|
+
export declare function parseBackendErrorBody(body: string): {
|
|
47
|
+
message?: string;
|
|
48
|
+
errorCode?: string;
|
|
49
|
+
traceId?: string;
|
|
50
|
+
requestId?: string;
|
|
51
|
+
};
|
|
11
52
|
/**
|
|
12
|
-
*
|
|
53
|
+
* Structured error thrown by every HTTP helper in this module. Carries the
|
|
54
|
+
* full request/response context (stage, method, endpoint, URL, status, body,
|
|
55
|
+
* parsed backend error fields) so callers can populate
|
|
56
|
+
* {@link import("@uipath/common").ErrorContext} without parsing free text.
|
|
57
|
+
*
|
|
58
|
+
* The `message` is human-readable and includes the stage when available,
|
|
59
|
+
* matching the existing CLI failure-message conventions.
|
|
13
60
|
*/
|
|
14
|
-
export declare
|
|
61
|
+
export declare class MaestroHttpError extends Error {
|
|
62
|
+
readonly service: DebugApiService;
|
|
63
|
+
readonly method: string;
|
|
64
|
+
readonly endpoint: string;
|
|
65
|
+
readonly url: string;
|
|
66
|
+
readonly httpStatus: number;
|
|
67
|
+
readonly statusText: string;
|
|
68
|
+
readonly body: string;
|
|
69
|
+
readonly stage?: string;
|
|
70
|
+
readonly parsedErrorCode?: string;
|
|
71
|
+
readonly parsedErrorMessage?: string;
|
|
72
|
+
readonly parsedTraceId?: string;
|
|
73
|
+
readonly parsedRequestId?: string;
|
|
74
|
+
constructor(details: MaestroHttpErrorDetails);
|
|
75
|
+
/** Build the human-readable message. Includes the stage when set, so a
|
|
76
|
+
* consumer that only sees `error.message` still gets a useful breadcrumb.
|
|
77
|
+
*
|
|
78
|
+
* IMPORTANT: the message intentionally never embeds the raw response
|
|
79
|
+
* body — only the parsed `message` field. Future callers that follow the
|
|
80
|
+
* standard pattern `OutputFormatter.error({ Message: err.message })`
|
|
81
|
+
* must not leak unstructured backend payloads to users. The full raw
|
|
82
|
+
* body is on `.body` for diagnostics; structured fields go to
|
|
83
|
+
* `FailureOutput.Context`. */
|
|
84
|
+
private static formatMessage;
|
|
85
|
+
}
|
|
15
86
|
/**
|
|
16
|
-
* Make a GET request to
|
|
87
|
+
* Make a GET request to Orchestrator API.
|
|
88
|
+
* @param stage Optional pipeline stage label (e.g. "get-personal-folder").
|
|
89
|
+
* Surfaced on {@link MaestroHttpError.stage} for structured
|
|
90
|
+
* error reporting downstream.
|
|
17
91
|
*/
|
|
18
|
-
export declare function
|
|
92
|
+
export declare function orchestratorGet<T>(config: OrchestratorApiConfig, path: string, stage?: string): Promise<T>;
|
|
19
93
|
/**
|
|
20
|
-
* Make a POST request to
|
|
94
|
+
* Make a POST request to Orchestrator API.
|
|
95
|
+
* @param stage Optional pipeline stage label (e.g. "begin-debug-session").
|
|
21
96
|
*/
|
|
22
|
-
export declare function
|
|
97
|
+
export declare function orchestratorPost<T>(config: OrchestratorApiConfig, path: string, body: unknown, stage?: string): Promise<T>;
|
|
23
98
|
/**
|
|
24
|
-
* Make a
|
|
99
|
+
* Make a GET request to PIMS API (debug path, not /api/v1).
|
|
100
|
+
* @param stage Optional pipeline stage label (e.g. "poll-instance-status",
|
|
101
|
+
* "fetch-output-variables").
|
|
25
102
|
*/
|
|
26
|
-
export declare function
|
|
103
|
+
export declare function debugPimsGet<T>(config: OrchestratorApiConfig, path: string, stage?: string): Promise<T>;
|
|
27
104
|
/**
|
|
28
|
-
* Make a
|
|
105
|
+
* Make a POST request to PIMS API (debug path, not /api/v1).
|
|
106
|
+
* @param stage Optional pipeline stage label (e.g. "create-debug-instance").
|
|
29
107
|
*/
|
|
30
|
-
export declare function
|
|
108
|
+
export declare function debugPimsPost<T>(config: OrchestratorApiConfig, path: string, body: unknown, stage?: string): Promise<T>;
|
|
109
|
+
/**
|
|
110
|
+
* Make a PUT request to PIMS API (debug path, not /api/v1).
|
|
111
|
+
* @param stage Optional pipeline stage label.
|
|
112
|
+
*/
|
|
113
|
+
export declare function debugPimsPut<T>(config: OrchestratorApiConfig, path: string, body: unknown, stage?: string): Promise<T>;
|
|
114
|
+
/**
|
|
115
|
+
* Make a PATCH request to PIMS API (debug path, not /api/v1).
|
|
116
|
+
* @param stage Optional pipeline stage label.
|
|
117
|
+
*/
|
|
118
|
+
export declare function debugPimsPatch<T>(config: OrchestratorApiConfig, path: string, body: unknown, stage?: string): Promise<T>;
|
|
119
|
+
/**
|
|
120
|
+
* Make a POST request to Studio Web backend API.
|
|
121
|
+
* @param stage Optional pipeline stage label (e.g. "register-connection-resource").
|
|
122
|
+
*/
|
|
123
|
+
export declare function studioWebPost<T>(config: OrchestratorApiConfig, organizationName: string, path: string, body: FormData | unknown, extraHeaders?: Record<string, string>, stage?: string): Promise<T>;
|
|
124
|
+
/**
|
|
125
|
+
* Make a DELETE request to Studio Web backend API.
|
|
126
|
+
* @param stage Optional pipeline stage label.
|
|
127
|
+
*/
|
|
128
|
+
export declare function studioWebDelete(config: OrchestratorApiConfig, organizationName: string, path: string, stage?: string): Promise<void>;
|
|
@@ -3,7 +3,30 @@
|
|
|
3
3
|
* Provides common methods used by flow-tool, case-tool, and maestro-tool.
|
|
4
4
|
*/
|
|
5
5
|
import type { IFileSystem } from "@uipath/filesystem";
|
|
6
|
-
import type { BeginSessionResponse, DebugCallbacks, DebugInstanceResponse, DebugInstanceStatusResponse, DebugResult, OrchestratorApiConfig } from "./debug-types";
|
|
6
|
+
import type { BeginSessionResponse, DebugCallbacks, DebugInstanceResponse, DebugInstanceStatusResponse, DebugResult, InlineAgentDescriptor, OrchestratorApiConfig } from "./debug-types";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown by {@link injectInlineAgentProcessEntries} when `FpsProperties`
|
|
9
|
+
* is not valid JSON and inline agents need to be injected.
|
|
10
|
+
*/
|
|
11
|
+
export declare class FpsPropertiesInjectionError extends Error {
|
|
12
|
+
readonly fpsProperties: string;
|
|
13
|
+
readonly agentCount: number;
|
|
14
|
+
readonly cause: unknown;
|
|
15
|
+
constructor(fpsProperties: string, agentCount: number, cause?: unknown);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Append inline-agent process entries to the (doubly-encoded)
|
|
19
|
+
* `FpsProperties.debug.master.processes` array and return the re-encoded
|
|
20
|
+
* value. When no agents are supplied, the input is returned unchanged.
|
|
21
|
+
*
|
|
22
|
+
* Mirror of `flow-workbench`'s `injectInlineAgentProcessEntries` so
|
|
23
|
+
* `uip maestro flow debug` provisions inline agents the same way the
|
|
24
|
+
* Studio Web / VS Code debug paths do.
|
|
25
|
+
*
|
|
26
|
+
* @throws {FpsPropertiesInjectionError} when agents are supplied and
|
|
27
|
+
* `fpsProperties` cannot be parsed.
|
|
28
|
+
*/
|
|
29
|
+
export declare function injectInlineAgentProcessEntries(fpsProperties: string | undefined, inlineAgents?: InlineAgentDescriptor[]): string | undefined;
|
|
7
30
|
/**
|
|
8
31
|
* Extract the first bpmn:startEvent id from BPMN XML.
|
|
9
32
|
* Falls back to "start" if no start event is found.
|
|
@@ -28,15 +51,34 @@ export interface PersonalFolderInfo {
|
|
|
28
51
|
* Returns key, id, display name, fully qualified name, and parent key.
|
|
29
52
|
*/
|
|
30
53
|
export declare function getPersonalFolderInfo(config: OrchestratorApiConfig): Promise<PersonalFolderInfo>;
|
|
54
|
+
export interface BeginDebugSessionOptions {
|
|
55
|
+
/** Inline agents to register with the debug session via FpsProperties. */
|
|
56
|
+
inlineAgents?: InlineAgentDescriptor[];
|
|
57
|
+
/**
|
|
58
|
+
* Pre-existing `FpsProperties` JSON string. Inline agents (when
|
|
59
|
+
* supplied) are appended into `debug.master.processes` on top of this.
|
|
60
|
+
*/
|
|
61
|
+
fpsProperties?: string;
|
|
62
|
+
}
|
|
31
63
|
/**
|
|
32
64
|
* Begin a debug session in Orchestrator.
|
|
65
|
+
*
|
|
66
|
+
* When `options.inlineAgents` is non-empty, each agent is encoded into
|
|
67
|
+
* `FpsProperties.debug.master.processes` so the runtime can resolve the
|
|
68
|
+
* `Orchestrator.StartInlineAgentJob` activity that fires for each agent
|
|
69
|
+
* node — without it Orchestrator returns 404 "the job's associated
|
|
70
|
+
* process could not be found".
|
|
33
71
|
*/
|
|
34
|
-
export declare function beginDebugSession(config: OrchestratorApiConfig, inputArguments?: string): Promise<BeginSessionResponse>;
|
|
72
|
+
export declare function beginDebugSession(config: OrchestratorApiConfig, inputArguments?: string, options?: BeginDebugSessionOptions): Promise<BeginSessionResponse>;
|
|
73
|
+
export declare const DEBUG_MODE_MAP: Record<string, number>;
|
|
74
|
+
export declare const SIMULATION_MODE_MAP: Record<string, number>;
|
|
35
75
|
/**
|
|
36
76
|
* Create a debug instance in PIMS.
|
|
37
77
|
* @param processType - "Flow" for flow-tool, "case" for case-tool, "processOrchestration" for maestro-tool
|
|
78
|
+
* @param debugMode - "Default" (pause at breakpoints), "StepByStep", "SingleStep", or "None"
|
|
79
|
+
* @param simulationMode - "None", "All", or "Selective"
|
|
38
80
|
*/
|
|
39
|
-
export declare function createDebugInstance(config: OrchestratorApiConfig, jobKey: string, solutionId: string, studioWebProjectId: string, entryPoint: string, processType?: string): Promise<DebugInstanceResponse>;
|
|
81
|
+
export declare function createDebugInstance(config: OrchestratorApiConfig, jobKey: string, solutionId: string, studioWebProjectId: string, entryPoint: string, processType?: string, debugMode?: string, simulationMode?: string): Promise<DebugInstanceResponse>;
|
|
40
82
|
/**
|
|
41
83
|
* Poll PIMS debug instance element-executions until terminal status.
|
|
42
84
|
*/
|
|
@@ -74,6 +116,12 @@ export interface UploadAndDebugParams {
|
|
|
74
116
|
key: string;
|
|
75
117
|
id: number;
|
|
76
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* Inline agents to register with the debug session. Forwarded to
|
|
121
|
+
* BeginSession via FpsProperties so the runtime can resolve each
|
|
122
|
+
* agent's `Orchestrator.StartInlineAgentJob` lookup.
|
|
123
|
+
*/
|
|
124
|
+
inlineAgents?: InlineAgentDescriptor[];
|
|
77
125
|
}
|
|
78
126
|
/**
|
|
79
127
|
* Shared upload-and-debug lifecycle used by flow-tool, maestro-tool, and case-tool.
|
|
@@ -24,6 +24,32 @@ export interface BeginSessionResponse {
|
|
|
24
24
|
vncTunnelUri: string | null;
|
|
25
25
|
jobKey: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Describes an inline (in-flow) agent that the debug session must
|
|
29
|
+
* provision as a child Orchestrator process. Studio Web's debug path
|
|
30
|
+
* encodes one entry per agent into `FpsProperties.debug.master.processes`
|
|
31
|
+
* so the runtime's `Orchestrator.StartInlineAgentJob` activity can
|
|
32
|
+
* resolve the process by `executorInfo.projectId`.
|
|
33
|
+
*
|
|
34
|
+
* Without these entries, the runtime returns 404 "the job's associated
|
|
35
|
+
* process could not be found" the first time the BPMN tries to start the
|
|
36
|
+
* agent — which is what `uip maestro flow debug` hit before this fix.
|
|
37
|
+
*/
|
|
38
|
+
export interface InlineAgentDescriptor {
|
|
39
|
+
/** Display name of the agent — surfaces in Orchestrator logs/UX. */
|
|
40
|
+
name: string;
|
|
41
|
+
/** The agent's `projectId` UUID (folder name on disk). */
|
|
42
|
+
agentProjectId: string;
|
|
43
|
+
/** True for `uipath.agent.conversational`, false for autonomous. */
|
|
44
|
+
isConversational: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Path to the agent's `agent.json` inside the package, relative to the
|
|
47
|
+
* package content root (i.e. `<projectId>/agent.json`). Matches the
|
|
48
|
+
* shape Studio Web sends — no `content/` prefix here; the runtime
|
|
49
|
+
* resolves the path against the deployed package.
|
|
50
|
+
*/
|
|
51
|
+
entryPointPath: string;
|
|
52
|
+
}
|
|
27
53
|
export interface ElementExecution {
|
|
28
54
|
elementId: string;
|
|
29
55
|
elementType?: string;
|
|
@@ -36,6 +62,7 @@ export interface DebugResult {
|
|
|
36
62
|
jobKey: string;
|
|
37
63
|
instanceId: string;
|
|
38
64
|
runId: string;
|
|
65
|
+
folderKey?: string;
|
|
39
66
|
finalStatus: string;
|
|
40
67
|
elementExecutions: ElementExecution[];
|
|
41
68
|
solutionId?: string;
|
|
@@ -90,3 +117,71 @@ export interface DebugInstanceStatusResponse {
|
|
|
90
117
|
}>;
|
|
91
118
|
}>;
|
|
92
119
|
}
|
|
120
|
+
export interface Breakpoint {
|
|
121
|
+
activityId: string;
|
|
122
|
+
}
|
|
123
|
+
export interface BreakpointUpdateRequest {
|
|
124
|
+
breakpoints: Breakpoint[];
|
|
125
|
+
}
|
|
126
|
+
export interface ContinueOnBreakpointRequest {
|
|
127
|
+
nextStep: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface PatchElementInputs {
|
|
130
|
+
elementId: string;
|
|
131
|
+
inputs: unknown;
|
|
132
|
+
elementRunId?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface PatchVariablesRequest {
|
|
135
|
+
globals?: unknown;
|
|
136
|
+
elements: PatchElementInputs[];
|
|
137
|
+
}
|
|
138
|
+
export interface DebugIncidentResponse {
|
|
139
|
+
id: string;
|
|
140
|
+
tenantId: string;
|
|
141
|
+
organizationId: string;
|
|
142
|
+
instanceId: string;
|
|
143
|
+
runId: string;
|
|
144
|
+
elementId: string | null;
|
|
145
|
+
elementRunId: string | null;
|
|
146
|
+
folderKey: string;
|
|
147
|
+
processKey: string | null;
|
|
148
|
+
packageVersion: string | null;
|
|
149
|
+
incidentId: string;
|
|
150
|
+
incidentStatus: string;
|
|
151
|
+
incidentType: string | null;
|
|
152
|
+
errorCode: string | null;
|
|
153
|
+
errorMessage: string;
|
|
154
|
+
errorTimeUtc: string;
|
|
155
|
+
errorDetails: string | null;
|
|
156
|
+
comment: string | null;
|
|
157
|
+
userUpdated: string | null;
|
|
158
|
+
debugMode: string | null;
|
|
159
|
+
incidentUpdateTimeUtc: string | null;
|
|
160
|
+
traceId: string | null;
|
|
161
|
+
dependentFaultCode: string | null;
|
|
162
|
+
incidentSeverity: string | null;
|
|
163
|
+
aiSummary: string | null;
|
|
164
|
+
aiRecommendations: string[] | null;
|
|
165
|
+
processType: string | null;
|
|
166
|
+
}
|
|
167
|
+
export interface DebugGetVariablesResponse {
|
|
168
|
+
elements: Array<{
|
|
169
|
+
elementId: string;
|
|
170
|
+
elementRunId: string;
|
|
171
|
+
isMarker: boolean;
|
|
172
|
+
inputs: Record<string, unknown>;
|
|
173
|
+
inputDefinitions: Record<string, unknown>;
|
|
174
|
+
outputs: Record<string, unknown>;
|
|
175
|
+
}>;
|
|
176
|
+
globals: Record<string, unknown>;
|
|
177
|
+
instanceId: string;
|
|
178
|
+
workflowId: string;
|
|
179
|
+
parentElementId: string | null;
|
|
180
|
+
}
|
|
181
|
+
export interface DebugGetAllVariablesResponse {
|
|
182
|
+
variables: DebugGetVariablesResponse[];
|
|
183
|
+
}
|
|
184
|
+
export interface DebugInstanceStatusResult {
|
|
185
|
+
instanceId: string;
|
|
186
|
+
status: string;
|
|
187
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/** flow-core feature-flag constants — each gates a node category in ManifestClient. */
|
|
2
2
|
export declare const FLAG_CONNECTOR_NODES = "canvas.mfe.dap-component";
|
|
3
|
+
export declare const FLAG_EXTRACT_DOCUMENT = "canvas.nodes.extract-document";
|
|
4
|
+
export declare const FLAG_HITL = "canvas.nodes.hitl";
|
|
3
5
|
/** Returns a `getFeatureFlag` callback that enables the given flags. */
|
|
4
6
|
export declare function buildFeatureFlagResolver(flags: readonly string[]): (flag: string) => boolean;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
export { pimsGet, pimsPost } from "./client";
|
|
1
|
+
export { pimsGet, pimsPatch, pimsPost, pimsPut } from "./client";
|
|
2
2
|
export { createPimsConfig } from "./client-factory";
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export {
|
|
3
|
+
export type { DebugApiService, MaestroHttpErrorDetails, } from "./debug-http-client";
|
|
4
|
+
export { debugPimsGet, debugPimsPatch, debugPimsPost, debugPimsPut, MaestroHttpError, orchestratorGet, orchestratorPost, parseBackendErrorBody, studioWebDelete, studioWebPost, } from "./debug-http-client";
|
|
5
|
+
export type { BeginDebugSessionOptions, PersonalFolderInfo, UploadAndDebugParams, } from "./debug-service";
|
|
6
|
+
export { beginDebugSession, createDebugInstance, extractStartEventId, FpsPropertiesInjectionError, getPersonalFolderInfo, getPersonalFolderKey, injectInlineAgentProcessEntries, patchConnectionOverwrites, pollDebugInstanceStatus, uploadAndDebugSolution, } from "./debug-service";
|
|
7
|
+
export type { BeginSessionResponse, BreakpointUpdateRequest, ContinueOnBreakpointRequest, DebugCallbacks, DebugGetAllVariablesResponse, DebugGetVariablesResponse, DebugIncidentResponse, DebugInstanceResponse, DebugInstanceStatusResponse, DebugInstanceStatusResult, DebugResult, DebugVariablesResponse, ElementExecution, InlineAgentDescriptor, OrchestratorApiConfig, PatchVariablesRequest, StudioWebDebugConfig, } from "./debug-types";
|
|
8
|
+
export { parseJsonInputOrFile, readJsonFile, resolveJsonInput, } from "./json-input";
|
|
9
|
+
export { BPMN_SPEC, SUPPORTED_UIPATH_EXTENSION_TAG_NAMES, SUPPORTED_UIPATH_EXTENSION_TAGS, } from "./manifest/bpmn-spec";
|
|
8
10
|
export type { BpmnExtensionType, DiscoveredConnector, DiscoveredProcess, MaestroRegistry, RegistryMetadata, } from "./manifest/types";
|
|
9
11
|
export { buildQueryString } from "./query-string";
|
|
10
12
|
export type { CompactField, ConnectorInfo, ConnectorMethodInfo, ContextEntry, FieldReference, FilterCondition, FilterField, FilterOperator, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, ParsedFilters, SyncMetadata, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./registry/index.js";
|
|
11
|
-
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, enrichConnectorNode, extractMultipartParameters, extractTriggerFilterFields, FilterParseError, fetchConnectionInfo, fetchConnectorMetadata, fetchConnectorTriggerMetadata, filterNodes, getConnectorConfiguration, getConnectorInfo, getNode, getNodeEnriched, hashContent, isConnectorNode, isConnectorTriggerNode, listNodes, loadIndexMetadata, loadNodeIndex, MANAGED_HTTP_CONNECTOR_KEY, parseFilterString, pullNodes, pullRemoteNodes, registerRegistryCommand, resolveNodeStorageDir, saveIndexMetadata, saveNodeIndex, searchNodes, searchNodesWithFilters, searchWithFilters, } from "./registry/index.js";
|
|
13
|
+
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, enrichConnectorNode, extractActivityFilterFields, extractMultipartParameters, extractTriggerEventParameters, extractTriggerFilterFields, FilterParseError, fetchConnectionInfo, fetchConnectorMetadata, fetchConnectorTriggerMetadata, filterNodes, getConnectorConfiguration, getConnectorInfo, getNode, getNodeEnriched, hashContent, isConnectorNode, isConnectorTriggerNode, listNodes, loadIndexMetadata, loadNodeIndex, MANAGED_HTTP_CONNECTOR_KEY, parseFilterString, pullNodes, pullRemoteNodes, registerRegistryCommand, resolveNodeStorageDir, saveIndexMetadata, saveNodeIndex, searchNodes, searchNodesWithFilters, searchWithFilters, } from "./registry/index.js";
|
|
12
14
|
export { getEnrichedActivityMetadata, getExtensionType, getRegistry, pullRegistry, searchRegistry, } from "./registry/registry-service";
|
|
13
15
|
export { CACHE_EXPIRATION_MS, loadRegistry, loadRegistryMetadata, saveRegistry, } from "./registry/storage";
|
|
16
|
+
export type { DebugInstanceCommandsConfig } from "./shared-commands/debug-instances";
|
|
17
|
+
export { registerSharedDebugInstanceCommands } from "./shared-commands/debug-instances";
|
|
14
18
|
export type { IncidentCommandsConfig } from "./shared-commands/incidents";
|
|
15
19
|
export { registerSharedIncidentCommands } from "./shared-commands/incidents";
|
|
16
20
|
export type { InstanceCommandsConfig } from "./shared-commands/instances";
|
|
17
21
|
export { registerSharedInstanceCommands } from "./shared-commands/instances";
|
|
22
|
+
export type { ProcessCommandsConfig } from "./shared-commands/process";
|
|
23
|
+
export { registerSharedProcessCommands } from "./shared-commands/process";
|
|
18
24
|
export type { ProcessesCommandsConfig } from "./shared-commands/processes";
|
|
19
25
|
export { registerSharedProcessesCommands } from "./shared-commands/processes";
|
|
20
26
|
export type { TraceEvent } from "./shared-utils";
|
|
21
27
|
export { formatTraceLine, formatTraceStatus, readStdin, VALID_PACKAGE_NAME_REGEX, VALID_PROJECT_NAME_REGEX, } from "./shared-utils";
|
|
22
|
-
export type { ElementExecutionApi, ElementMetaData, GetInstanceElementExecutionsResponse, GlobalVariableMetaData, GoToCursorsResponse, GoToTransition, MaestroProcessSummary, PimsApiConfig, PimsRequestOptions, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessInstance, ProcessInstanceGetVariablesResponse, ProcessInstanceOperationResponse, ProcessInstanceRun, } from "./types";
|
|
28
|
+
export type { BpmnElementTags, BpmnOutputTags, BpmnProcessVariableTags, ElementExecutionApi, ElementMetaData, ErrorCodeItem, ErrorCodesResponse, GetAllVariablesResponse, GetGlobalVariablesResponse, GetInstanceElementExecutionsResponse, GlobalVariableMetaData, GoToCursorsResponse, GoToTransition, MaestroMessageSendRequest, MaestroMessageSendResponse, MaestroProcessSummary, PimsApiConfig, PimsRequestOptions, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessInstance, ProcessInstanceGetVariablesResponse, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessSettings, } from "./types";
|
|
29
|
+
export { withDebugPimsCall } from "./with-debug-pims-call";
|
|
23
30
|
export { withPimsCall } from "./with-pims-call";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function readJsonFile(filePath: string): Promise<unknown>;
|
|
2
|
+
export declare function parseJsonInputOrFile(inputSource: string): Promise<unknown>;
|
|
3
|
+
/**
|
|
4
|
+
* Resolves a JSON payload from the first available source:
|
|
5
|
+
* 1. `inline` — raw JSON string or `@file` reference (e.g. the value of a
|
|
6
|
+
* `--inputs` flag).
|
|
7
|
+
* 2. stdin — only consulted when `allowStdin` is true and `inline` is absent.
|
|
8
|
+
*
|
|
9
|
+
* Returns `undefined` when no source provides any data, so the caller can
|
|
10
|
+
* decide whether the missing payload is an error or a default-empty case.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveJsonInput(opts: {
|
|
13
|
+
inline?: string;
|
|
14
|
+
allowStdin?: boolean;
|
|
15
|
+
}): Promise<unknown | undefined>;
|
|
@@ -20,3 +20,12 @@ export interface BpmnSpec {
|
|
|
20
20
|
* serialization rules extracted from the frontend codebase.
|
|
21
21
|
*/
|
|
22
22
|
export declare const BPMN_SPEC: BpmnSpec;
|
|
23
|
+
/**
|
|
24
|
+
* UiPath BPMN extension element names supported by Maestro exports.
|
|
25
|
+
*
|
|
26
|
+
* `BPMN_SPEC.extensionTypes` covers executable payload containers
|
|
27
|
+
* (`activity`, `event`, `mapping`). Maestro BPMN files also carry structural
|
|
28
|
+
* metadata such as variables, bindings, and entry point ids.
|
|
29
|
+
*/
|
|
30
|
+
export declare const SUPPORTED_UIPATH_EXTENSION_TAG_NAMES: readonly string[];
|
|
31
|
+
export declare const SUPPORTED_UIPATH_EXTENSION_TAGS: readonly string[];
|
|
@@ -4,7 +4,7 @@ import type { Command } from "commander";
|
|
|
4
4
|
*
|
|
5
5
|
* The registry is shared across UiPath workflow surfaces (flow, maestro, …).
|
|
6
6
|
* Each tool exposes the same actions under its own command prefix, e.g.
|
|
7
|
-
* `uip flow registry pull` or `uip maestro registry pull`.
|
|
7
|
+
* `uip maestro flow registry pull` or `uip maestro registry pull`.
|
|
8
8
|
*
|
|
9
9
|
* @param program Parent commander program/command to attach to
|
|
10
10
|
* @param commandPrefix Tool prefix (e.g. "maestro flow" or "maestro bpmn") used in help text
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { buildFeatureFlagResolver, FLAG_CONNECTOR_NODES, } from "../flags/manifest-flags.js";
|
|
1
|
+
export { buildFeatureFlagResolver, FLAG_CONNECTOR_NODES, FLAG_EXTRACT_DOCUMENT, } from "../flags/manifest-flags.js";
|
|
2
2
|
export { registerRegistryCommand } from "./command.js";
|
|
3
3
|
export { filterNodes, searchWithFilters, } from "./filter-engine.js";
|
|
4
4
|
export { FilterParseError, parseFilterString } from "./filter-parser.js";
|
|
5
|
-
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, enrichConnectorNode, extractMultipartParameters, extractTriggerFilterFields, fetchConnectionInfo, fetchConnectorMetadata, fetchConnectorTriggerMetadata, getConnectorConfiguration, getConnectorInfo, isConnectorNode, isConnectorTriggerNode, MANAGED_HTTP_CONNECTOR_KEY, } from "./integration-service-fetcher.js";
|
|
5
|
+
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, enrichConnectorNode, extractActivityFilterFields, extractMultipartParameters, extractTriggerEventParameters, extractTriggerFilterFields, fetchConnectionInfo, fetchConnectorMetadata, fetchConnectorTriggerMetadata, getConnectorConfiguration, getConnectorInfo, isConnectorNode, isConnectorTriggerNode, MANAGED_HTTP_CONNECTOR_KEY, } from "./integration-service-fetcher.js";
|
|
6
6
|
export type { CompactField, ConnectorInfo, ConnectorMethodInfo, ContextEntry, FieldReference, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./integration-service-metadata.types";
|
|
7
7
|
export { hashContent, loadIndexMetadata, loadNodeIndex, resolveNodeStorageDir, type SyncMetadata, saveIndexMetadata, saveNodeIndex, } from "./node-storage.js";
|
|
8
8
|
export { getNode, getNodeEnriched, listNodes, pullNodes, pullRemoteNodes, searchNodes, searchNodesWithFilters, } from "./node-sync-service.js";
|
|
@@ -3,7 +3,24 @@ import type { CompactField, ConnectorConfiguration, ConnectorInfo, ISMetadata, T
|
|
|
3
3
|
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, extractMultipartParameters, MANAGED_HTTP_CONNECTOR_KEY, } from "@uipath/integrationservice-sdk";
|
|
4
4
|
export declare function isConnectorNode(node: NodeManifest): boolean;
|
|
5
5
|
export declare function isConnectorTriggerNode(node: NodeManifest): boolean;
|
|
6
|
+
export declare function extractTriggerEventParameters(metadata: TriggerObjectMetadata, operationName: string): CompactField[];
|
|
6
7
|
export declare function extractTriggerFilterFields(metadata: TriggerObjectMetadata): CompactField[];
|
|
8
|
+
/**
|
|
9
|
+
* Extract filterable activity fields for a List/query operation.
|
|
10
|
+
*
|
|
11
|
+
* Contract (per the IS metadata schema):
|
|
12
|
+
*
|
|
13
|
+
* - A field is filterable when `searchable === true`. Type is irrelevant for
|
|
14
|
+
* the filter check — connectors flag the fields they accept in CEQL
|
|
15
|
+
* queries explicitly, and that flag is the source of truth.
|
|
16
|
+
* - `searchableOperators` (when present) lists the CEQL operators the
|
|
17
|
+
* connector permits for the field. We surface it on the compact output so
|
|
18
|
+
* callers can validate operator choices upstream.
|
|
19
|
+
* - `searchableNames` (when present) lists alternative identifiers the
|
|
20
|
+
* connector accepts for the field in CEQL. The filter compiler emits
|
|
21
|
+
* `searchableNames[0]` instead of `name` when set.
|
|
22
|
+
*/
|
|
23
|
+
export declare function extractActivityFilterFields(metadata: ISMetadata, _method: string): CompactField[];
|
|
7
24
|
export declare function fetchConnectorTriggerMetadata(connectorKey: string, operationName: string, objectName: string, connectionId: string): Promise<TriggerObjectMetadata>;
|
|
8
25
|
export declare function getConnectorConfiguration(node: NodeManifest): ConnectorConfiguration | null;
|
|
9
26
|
export declare function getConnectorInfo(node: NodeManifest): ConnectorInfo | null;
|
|
@@ -20,6 +37,10 @@ export interface ConnectionInfo {
|
|
|
20
37
|
connectorName: string;
|
|
21
38
|
connectorVersion: string | null;
|
|
22
39
|
pollingInterval: number | null;
|
|
40
|
+
byoaConnection: boolean;
|
|
41
|
+
elementInstanceId: number | null;
|
|
42
|
+
/** Folder the connection belongs to. Null for tenant-scoped connections. */
|
|
43
|
+
folderKey: string | null;
|
|
23
44
|
}
|
|
24
45
|
/**
|
|
25
46
|
* Fetch connection details by ID from Integration Service.
|
|
@@ -8,11 +8,17 @@ export type CompactField = {
|
|
|
8
8
|
name: string;
|
|
9
9
|
displayName: string;
|
|
10
10
|
type: string;
|
|
11
|
+
/** Alias of `type`; emitted for parity with case-tool FieldSpec and downstream skills that document field schemas as `{ name, dataType, ... }`. */
|
|
12
|
+
dataType: string;
|
|
11
13
|
required: boolean;
|
|
12
14
|
description?: string;
|
|
13
15
|
responseOnly?: true;
|
|
14
16
|
enum?: unknown[];
|
|
15
17
|
reference?: FieldReference;
|
|
18
|
+
/** CEQL operators the connector permits for this field (when searchable). */
|
|
19
|
+
searchableOperators?: string[];
|
|
20
|
+
/** Connector-side aliases for this field in CEQL queries. */
|
|
21
|
+
searchableNames?: string[];
|
|
16
22
|
};
|
|
17
23
|
export type ConnectorConfiguration = {
|
|
18
24
|
connectorKey: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export interface DebugInstanceCommandsConfig {
|
|
3
|
+
/** Label used in command descriptions, e.g. "Maestro", "Flow", "Case" */
|
|
4
|
+
toolLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const registerSharedDebugInstanceCommands: (program: Command, config: DebugInstanceCommandsConfig) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export interface ProcessCommandsConfig {
|
|
3
|
+
/** Label used in command descriptions, e.g. "Flow", "Maestro", "Case" */
|
|
4
|
+
toolLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const registerSharedProcessCommands: (processCmd: Command, config: ProcessCommandsConfig) => void;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -57,6 +57,15 @@ export interface ProcessInstanceGetVariablesResponse {
|
|
|
57
57
|
globalVariables: GlobalVariableMetaData[];
|
|
58
58
|
elements: ElementMetaData[];
|
|
59
59
|
}
|
|
60
|
+
export interface GetAllVariablesResponse {
|
|
61
|
+
variables: ProcessInstanceGetVariablesResponse[];
|
|
62
|
+
}
|
|
63
|
+
export interface GetGlobalVariablesResponse {
|
|
64
|
+
instanceId: string;
|
|
65
|
+
globals: Record<string, unknown>;
|
|
66
|
+
count: number;
|
|
67
|
+
retrievedAt: string;
|
|
68
|
+
}
|
|
60
69
|
export interface ProcessIncidentGetResponse {
|
|
61
70
|
incidentId: string;
|
|
62
71
|
instanceId: string;
|
|
@@ -93,6 +102,41 @@ export interface GoToTransition {
|
|
|
93
102
|
export interface GoToCursorsResponse {
|
|
94
103
|
elementIds: string[];
|
|
95
104
|
}
|
|
105
|
+
export interface ProcessSettings {
|
|
106
|
+
variableTags: BpmnProcessVariableTags;
|
|
107
|
+
}
|
|
108
|
+
export interface BpmnProcessVariableTags {
|
|
109
|
+
elements: Record<string, BpmnElementTags>;
|
|
110
|
+
sourcePackageVersion: string;
|
|
111
|
+
lastUpdateTimeUtc: string;
|
|
112
|
+
}
|
|
113
|
+
export interface BpmnElementTags {
|
|
114
|
+
outputs: BpmnOutputTags[];
|
|
115
|
+
}
|
|
116
|
+
export interface BpmnOutputTags {
|
|
117
|
+
tags: string[];
|
|
118
|
+
name: string;
|
|
119
|
+
extractPath: string;
|
|
120
|
+
label: string;
|
|
121
|
+
extractedValueType: string;
|
|
122
|
+
}
|
|
123
|
+
export interface MaestroMessageSendRequest {
|
|
124
|
+
name: string;
|
|
125
|
+
reference: string;
|
|
126
|
+
itemData: Record<string, unknown>;
|
|
127
|
+
ttl?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface MaestroMessageSendResponse {
|
|
130
|
+
id: string;
|
|
131
|
+
jobId: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ErrorCodeItem {
|
|
134
|
+
errorCode: string;
|
|
135
|
+
errorMessage: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ErrorCodesResponse {
|
|
138
|
+
errorCodes: ErrorCodeItem[];
|
|
139
|
+
}
|
|
96
140
|
export interface ElementExecutionApi {
|
|
97
141
|
completedTimeUtc: string | null;
|
|
98
142
|
elementId: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { OrchestratorApiConfig } from "./debug-types";
|
|
2
|
+
export declare function createDebugPimsConfig(): Promise<OrchestratorApiConfig>;
|
|
3
|
+
export declare function withDebugPimsCall<T>(fn: (config: OrchestratorApiConfig) => Promise<T>, errorMessage: string): Promise<T | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,27 +23,35 @@
|
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/src/index.d.ts",
|
|
25
25
|
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./manifest/bpmn-spec": {
|
|
28
|
+
"types": "./dist/src/manifest/bpmn-spec.d.ts",
|
|
29
|
+
"import": "./dist/manifest/bpmn-spec.js",
|
|
30
|
+
"default": "./dist/manifest/bpmn-spec.js"
|
|
31
|
+
},
|
|
32
|
+
"./manifest/types": {
|
|
33
|
+
"types": "./dist/src/manifest/types.d.ts"
|
|
26
34
|
}
|
|
27
35
|
},
|
|
28
36
|
"files": [
|
|
29
37
|
"dist"
|
|
30
38
|
],
|
|
31
39
|
"scripts": {
|
|
32
|
-
"build": "bun build ./src/index.ts --outdir dist --format esm --target node && tsc -p tsconfig.build.json --noCheck",
|
|
40
|
+
"build": "bun build ./src/index.ts ./src/manifest/bpmn-spec.ts --outdir dist --format esm --target node && tsc -p tsconfig.build.json --noCheck",
|
|
33
41
|
"test": "vitest run",
|
|
34
42
|
"test:coverage": "vitest run --coverage",
|
|
35
43
|
"lint": "biome check ."
|
|
36
44
|
},
|
|
37
45
|
"devDependencies": {
|
|
38
|
-
"@uipath/auth": "0.
|
|
39
|
-
"@uipath/common": "0.
|
|
40
|
-
"@uipath/filesystem": "0.
|
|
41
|
-
"@uipath/flow-core": "^0.2.
|
|
46
|
+
"@uipath/auth": "1.0.0",
|
|
47
|
+
"@uipath/common": "1.0.0",
|
|
48
|
+
"@uipath/filesystem": "1.0.0",
|
|
49
|
+
"@uipath/flow-core": "^0.2.205",
|
|
42
50
|
"@uipath/integrationservice-sdk": "1.0.1",
|
|
43
|
-
"@uipath/orchestrator-sdk": "0.
|
|
44
|
-
"@types/node": "^25.5.
|
|
51
|
+
"@uipath/orchestrator-sdk": "1.0.0",
|
|
52
|
+
"@types/node": "^25.5.2",
|
|
45
53
|
"commander": "^14.0.3",
|
|
46
|
-
"typescript": "^
|
|
54
|
+
"typescript": "^6.0.2"
|
|
47
55
|
},
|
|
48
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d982977e86057fd9d0846c955595c64865aeecab"
|
|
49
57
|
}
|