@uipath/conversational-tool 1.205.0-preview.276 → 1.206.0-preview.279
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/README.md +42 -0
- package/dist/{cas-client-09ntqztk.js → cas-client-jqyxk1dc.js} +23 -17
- package/dist/{getMachineId-bsd-t2xa1xja.js → getMachineId-bsd-gq25bn5m.js} +3 -3
- package/dist/{getMachineId-darwin-rnf93px2.js → getMachineId-darwin-g1g93zw1.js} +3 -3
- package/dist/{getMachineId-linux-ef2vse73.js → getMachineId-linux-gapvcvwf.js} +2 -2
- package/dist/{getMachineId-unsupported-sgg8gaae.js → getMachineId-unsupported-4zwvzkvs.js} +2 -2
- package/dist/{getMachineId-win-0q96gyd6.js → getMachineId-win-spwpdy3q.js} +3 -3
- package/dist/{index-nr509xjn.js → index-764qyyq8.js} +276 -358
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index.js +9 -11
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{tool-yerrea90.js → tool-1f0pnfrv.js} +1 -1
- package/dist/{tool-mpvp5rqs.js → tool-3spqea6t.js} +30 -30
- package/dist/{tool-1yh8g550.js → tool-6an893wm.js} +12 -3
- package/dist/{tool-nkyhbf79.js → tool-9v6hwcm1.js} +43 -43
- package/dist/{tool-3a0mhv82.js → tool-gmy31v7s.js} +1906 -1369
- package/dist/{tool-3dfktcw7.js → tool-pkvhm356.js} +1588 -1161
- package/dist/tool.js +8 -10
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @uipath/conversational-tool
|
|
2
|
+
|
|
3
|
+
Adds `uip conversational` to the `uip` CLI: talk to deployed conversational processes (Orchestrator releases marked conversational — today, conversational agents). List agents, create and manage conversations, chat in real time, read exchanges and messages, give feedback, and route SIP trunks for voice.
|
|
4
|
+
|
|
5
|
+
The tool wraps the conversational service of `@uipath/uipath-typescript`. See also [docs/tools/conversational.md](../../docs/tools/conversational.md).
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
| Command | Purpose |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `agents list` / `agents get` | List conversational agents, or get one by `--release-id` and `--folder-id`. |
|
|
12
|
+
| `conversations create` | Start a conversation against a release (`--release-id`, `--folder-id`). |
|
|
13
|
+
| `conversations list` / `get` / `update` / `delete` | Manage conversations. `list` pages with `--cursor`. |
|
|
14
|
+
| `conversations attachments upload` / `get-uri` | Upload a file, or get a pre-signed upload URI. |
|
|
15
|
+
| `chat <conversation-id>` | Chat in real time; `-m, --message` sends one message and exits. |
|
|
16
|
+
| `exchanges list` / `get` / `feedback` | Read a conversation's exchanges and rate one (`--rating positive` or `negative`). |
|
|
17
|
+
| `messages get` / `get-content-part` | Read one message, or one content part of it. |
|
|
18
|
+
| `trunks list` / `trunks assign <trunk>` | List SIP trunks; route a trunk's inbound calls to a deployed Flow process, or `--clear` it. |
|
|
19
|
+
| `user-settings get` / `update` | Read or change your profile and context settings. |
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uip conversational agents list --output json
|
|
25
|
+
uip conversational conversations create --release-id <release-id> --folder-id <folder-id> --label "Support test"
|
|
26
|
+
uip conversational chat <conversation-id> --message "Hello"
|
|
27
|
+
uip conversational exchanges list <conversation-id> --limit 10
|
|
28
|
+
uip conversational exchanges feedback <conversation-id> <exchange-id> --rating positive --comment "Helpful"
|
|
29
|
+
uip conversational conversations delete <conversation-id> --yes
|
|
30
|
+
uip conversational trunks list --direction inbound
|
|
31
|
+
uip conversational trunks assign <trunk> --process-key <release-key> --folder-key <folder-key> --yes
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
Keys inside `Data` keep the service's camelCase (`agentInput.inline`, tool call inputs and results round-trip verbatim); the envelope stays PascalCase. List commands return a `nextCursor` string to pass to `--cursor`.
|
|
37
|
+
|
|
38
|
+
## Authentication
|
|
39
|
+
|
|
40
|
+
Run `uip login` first. Interactive (user) logins and external-application (client-credentials) logins both work; under app auth the CLI sends a fixed external user id, so every caller sharing that client id shares one conversation history and profile.
|
|
41
|
+
|
|
42
|
+
`chat` uses an interactive terminal and is not available in the browser build.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
package_default,
|
|
3
|
+
catchError,
|
|
4
|
+
carriedErrorCode,
|
|
5
|
+
hasIdentityInstructionContext,
|
|
5
6
|
getSdkUserAgentToken,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
addSdkUserAgentHeader,
|
|
8
|
+
getAuthContext,
|
|
9
|
+
CLI_EXTERNAL_USER_ID
|
|
10
|
+
} from "./tool-gmy31v7s.js";
|
|
9
11
|
|
|
10
12
|
// src/api/cas-client.ts
|
|
11
13
|
var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
|
|
@@ -14,26 +16,31 @@ var MAX_SIP_TRUNK_PAGES = 100;
|
|
|
14
16
|
|
|
15
17
|
class CasApiError extends Error {
|
|
16
18
|
status;
|
|
17
|
-
|
|
19
|
+
instructionContext;
|
|
20
|
+
constructor(message, status, instructionContext) {
|
|
18
21
|
super(message);
|
|
19
22
|
this.status = status;
|
|
23
|
+
this.instructionContext = instructionContext;
|
|
20
24
|
this.name = "CasApiError";
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
var getCasSession = async () => {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
|
|
28
|
+
const [authError, auth] = await catchError(getAuthContext({ requireOrganizationId: true, requireTenantId: true }));
|
|
29
|
+
if (authError) {
|
|
30
|
+
if (carriedErrorCode(authError) === "authentication_required") {
|
|
31
|
+
throw new CasApiError(authError.message, 401, hasIdentityInstructionContext(authError) ? "identity" : "auth");
|
|
32
|
+
}
|
|
33
|
+
throw authError;
|
|
27
34
|
}
|
|
28
35
|
return {
|
|
29
|
-
baseUrl:
|
|
30
|
-
organizationId:
|
|
31
|
-
tenantId:
|
|
32
|
-
accessToken:
|
|
36
|
+
baseUrl: auth.baseUrl,
|
|
37
|
+
organizationId: auth.organizationId,
|
|
38
|
+
tenantId: auth.tenantId,
|
|
39
|
+
accessToken: auth.accessToken
|
|
33
40
|
};
|
|
34
41
|
};
|
|
35
42
|
var casFetch = async (session, path, init) => {
|
|
36
|
-
const response = await fetch(`${session.baseUrl}/${session.organizationId}/${session.tenantId}/autopilotforeveryone_${path}`, {
|
|
43
|
+
const response = await fetch(`${session.baseUrl}/${encodeURIComponent(session.organizationId)}/${encodeURIComponent(session.tenantId)}/autopilotforeveryone_${path}`, {
|
|
37
44
|
method: init?.method ?? "GET",
|
|
38
45
|
headers: addSdkUserAgentHeader({
|
|
39
46
|
Authorization: `Bearer ${session.accessToken}`,
|
|
@@ -98,11 +105,10 @@ var updateSipTrunkBinding = async (trunkId, binding) => {
|
|
|
98
105
|
return data.trunk;
|
|
99
106
|
};
|
|
100
107
|
export {
|
|
101
|
-
CasApiError,
|
|
102
108
|
listSipTrunks,
|
|
103
109
|
listVoiceEntryPoints,
|
|
104
110
|
resolveSipTrunk,
|
|
105
111
|
updateSipTrunkBinding
|
|
106
112
|
};
|
|
107
113
|
|
|
108
|
-
//# debugId=
|
|
114
|
+
//# debugId=31EDB9E7B97CA7BB64756E2164756E21
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_execAsync
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-1f0pnfrv.js";
|
|
4
4
|
import {
|
|
5
5
|
require_src
|
|
6
|
-
} from "./tool-
|
|
6
|
+
} from "./tool-3spqea6t.js";
|
|
7
7
|
import {
|
|
8
8
|
__commonJS,
|
|
9
9
|
__require
|
|
10
|
-
} from "./tool-
|
|
10
|
+
} from "./tool-6an893wm.js";
|
|
11
11
|
|
|
12
12
|
// ../../node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
|
|
13
13
|
var require_getMachineId_bsd = __commonJS(function(exports) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_execAsync
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-1f0pnfrv.js";
|
|
4
4
|
import {
|
|
5
5
|
require_src
|
|
6
|
-
} from "./tool-
|
|
6
|
+
} from "./tool-3spqea6t.js";
|
|
7
7
|
import {
|
|
8
8
|
__commonJS
|
|
9
|
-
} from "./tool-
|
|
9
|
+
} from "./tool-6an893wm.js";
|
|
10
10
|
|
|
11
11
|
// ../../node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
12
12
|
var require_getMachineId_darwin = __commonJS(function(exports) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_src
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-3spqea6t.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
6
|
__require
|
|
7
|
-
} from "./tool-
|
|
7
|
+
} from "./tool-6an893wm.js";
|
|
8
8
|
|
|
9
9
|
// ../../node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
|
|
10
10
|
var require_getMachineId_linux = __commonJS(function(exports) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_src
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-3spqea6t.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS
|
|
6
|
-
} from "./tool-
|
|
6
|
+
} from "./tool-6an893wm.js";
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
|
|
9
9
|
var require_getMachineId_unsupported = __commonJS(function(exports) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_execAsync
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-1f0pnfrv.js";
|
|
4
4
|
import {
|
|
5
5
|
require_src
|
|
6
|
-
} from "./tool-
|
|
6
|
+
} from "./tool-3spqea6t.js";
|
|
7
7
|
import {
|
|
8
8
|
__commonJS,
|
|
9
9
|
__require
|
|
10
|
-
} from "./tool-
|
|
10
|
+
} from "./tool-6an893wm.js";
|
|
11
11
|
|
|
12
12
|
// ../../node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
|
|
13
13
|
var require_getMachineId_win = __commonJS(function(exports) {
|