@glodon-aiot/agent-cli-sdk 2.4.7 → 3.0.4
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 +128 -41
- package/dist/agent-cli-sdk.js +28505 -30335
- package/dist/agent-cli-sdk.umd.cjs +113 -123
- package/dist/src/AgentSession.d.ts +4 -3
- package/dist/src/BotClient.d.ts +7 -5
- package/dist/src/DialogSession.d.ts +4 -3
- package/dist/src/Session.d.ts +70 -16
- package/dist/src/api/fetchEventSource/fetch.d.ts +1 -1
- package/dist/src/api/fetchEventSource/index.d.ts +1 -1
- package/package.json +13 -22
- package/dist/cdn/agent-cli-sdk.js +0 -32945
- package/dist/cdn/agent-cli-sdk.umd.cjs +0 -140
- package/dist/cdn/src/AgentPlugin.d.ts +0 -17
- package/dist/cdn/src/AgentSession.d.ts +0 -8
- package/dist/cdn/src/BotClient.d.ts +0 -46
- package/dist/cdn/src/Config.d.ts +0 -32
- package/dist/cdn/src/DialogSession.d.ts +0 -21
- package/dist/cdn/src/EventBus.d.ts +0 -23
- package/dist/cdn/src/Logger.d.ts +0 -12
- package/dist/cdn/src/PayloadTypes.d.ts +0 -84
- package/dist/cdn/src/Session.d.ts +0 -156
- package/dist/cdn/src/__ tests __/AgentClient.spec.d.ts +0 -1
- package/dist/cdn/src/__ tests __/AgentSession.spec.d.ts +0 -1
- package/dist/cdn/src/__ tests __/DialogClient.spec.d.ts +0 -1
- package/dist/cdn/src/api/fetchEventSource/fetch.d.ts +0 -44
- package/dist/cdn/src/api/fetchEventSource/index.d.ts +0 -1
- package/dist/cdn/src/api/fetchEventSource/parse.d.ts +0 -36
- package/dist/cdn/src/api/index.d.ts +0 -2
- package/dist/cdn/src/index.d.ts +0 -5
- package/dist/cdn/src/utils.d.ts +0 -4
- package/dist/es/AgentPlugin.mjs +0 -20
- package/dist/es/AgentSession.mjs +0 -243
- package/dist/es/BotClient.mjs +0 -242
- package/dist/es/Config.mjs +0 -34
- package/dist/es/DialogSession.mjs +0 -281
- package/dist/es/EventBus.mjs +0 -64
- package/dist/es/Logger.mjs +0 -31
- package/dist/es/PayloadTypes.mjs +0 -4
- package/dist/es/Session.mjs +0 -527
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -4
- package/dist/es/_virtual/index.mjs +0 -4
- package/dist/es/_virtual/index2.mjs +0 -4
- package/dist/es/_virtual/index3.mjs +0 -4
- package/dist/es/_virtual/minio-zj.mjs +0 -4
- package/dist/es/api/fetchEventSource/fetch.mjs +0 -112
- package/dist/es/api/fetchEventSource/parse.mjs +0 -97
- package/dist/es/api/index.mjs +0 -48
- package/dist/es/index.mjs +0 -11
- package/dist/es/node_modules/@glodon-aiot/minio/dist/minio-zj.mjs +0 -26485
- package/dist/es/node_modules/@socket.io/component-emitter/lib/esm/index.mjs +0 -54
- package/dist/es/node_modules/base64-js/index.mjs +0 -47
- package/dist/es/node_modules/buffer/index.mjs +0 -927
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/has-cors.mjs +0 -9
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseqs.mjs +0 -18
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseuri.mjs +0 -24
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/yeast.mjs +0 -19
- package/dist/es/node_modules/engine.io-client/build/esm/globalThis.browser.mjs +0 -4
- package/dist/es/node_modules/engine.io-client/build/esm/socket.mjs +0 -317
- package/dist/es/node_modules/engine.io-client/build/esm/transport.mjs +0 -113
- package/dist/es/node_modules/engine.io-client/build/esm/transports/index.mjs +0 -11
- package/dist/es/node_modules/engine.io-client/build/esm/transports/polling.mjs +0 -273
- package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.mjs +0 -8
- package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket.mjs +0 -87
- package/dist/es/node_modules/engine.io-client/build/esm/transports/webtransport.mjs +0 -52
- package/dist/es/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.mjs +0 -21
- package/dist/es/node_modules/engine.io-client/build/esm/util.mjs +0 -23
- package/dist/es/node_modules/engine.io-parser/build/esm/commons.mjs +0 -21
- package/dist/es/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.mjs +0 -14
- package/dist/es/node_modules/engine.io-parser/build/esm/decodePacket.browser.mjs +0 -39
- package/dist/es/node_modules/engine.io-parser/build/esm/encodePacket.browser.mjs +0 -28
- package/dist/es/node_modules/engine.io-parser/build/esm/index.mjs +0 -105
- package/dist/es/node_modules/ieee754/index.mjs +0 -28
- package/dist/es/node_modules/js-base64/base64.mjs +0 -31
- package/dist/es/node_modules/socket.io-client/build/esm/contrib/backo2.mjs +0 -26
- package/dist/es/node_modules/socket.io-client/build/esm/index.mjs +0 -25
- package/dist/es/node_modules/socket.io-client/build/esm/manager.mjs +0 -242
- package/dist/es/node_modules/socket.io-client/build/esm/on.mjs +0 -8
- package/dist/es/node_modules/socket.io-client/build/esm/socket.mjs +0 -608
- package/dist/es/node_modules/socket.io-client/build/esm/url.mjs +0 -19
- package/dist/es/node_modules/socket.io-parser/build/esm/binary.mjs +0 -52
- package/dist/es/node_modules/socket.io-parser/build/esm/index.mjs +0 -203
- package/dist/es/node_modules/socket.io-parser/build/esm/is-binary.mjs +0 -26
- package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +0 -6
- package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +0 -10
- package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +0 -9
- package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +0 -19
- package/dist/es/packages/apis/dist/es/aecpilot/model.mjs +0 -4
- package/dist/es/packages/apis/dist/es/aecpilotui/index.mjs +0 -8
- package/dist/es/packages/apis/dist/es/agentcliui/index.mjs +0 -8
- package/dist/es/packages/apis/dist/es/base/index.mjs +0 -154
- package/dist/es/packages/apis/dist/es/cvforce/index.mjs +0 -431
- package/dist/es/packages/apis/dist/es/cvforce/model.mjs +0 -5
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +0 -1
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +0 -3
- package/dist/es/utils.mjs +0 -11
- package/dist/lib/index.js +0 -126
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
var b = (s, t, e) => new Promise((a, c) => {
|
|
2
|
-
var f = (r) => {
|
|
3
|
-
try {
|
|
4
|
-
i(e.next(r));
|
|
5
|
-
} catch (n) {
|
|
6
|
-
c(n);
|
|
7
|
-
}
|
|
8
|
-
}, l = (r) => {
|
|
9
|
-
try {
|
|
10
|
-
i(e.throw(r));
|
|
11
|
-
} catch (n) {
|
|
12
|
-
c(n);
|
|
13
|
-
}
|
|
14
|
-
}, i = (r) => r.done ? a(r.value) : Promise.resolve(r.value).then(f, l);
|
|
15
|
-
i((e = e.apply(s, t)).next());
|
|
16
|
-
});
|
|
17
|
-
function w(s, t) {
|
|
18
|
-
return b(this, null, function* () {
|
|
19
|
-
const e = s.getReader();
|
|
20
|
-
let a;
|
|
21
|
-
for (; !(a = yield e.read()).done; )
|
|
22
|
-
t(a.value);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function g(s) {
|
|
26
|
-
let t, e, a, c = !1, f;
|
|
27
|
-
return function(i) {
|
|
28
|
-
t === void 0 ? (t = i, e = 0, a = -1, f = !1) : t = h(t, i);
|
|
29
|
-
const r = t.length;
|
|
30
|
-
let n = 0;
|
|
31
|
-
for (; e < r; ) {
|
|
32
|
-
c && (t[e] === 10 && (n = ++e), c = !1);
|
|
33
|
-
let o = -1;
|
|
34
|
-
for (; e < r && o === -1; ++e)
|
|
35
|
-
switch (t[e]) {
|
|
36
|
-
case 58:
|
|
37
|
-
a === -1 && (a = e - n);
|
|
38
|
-
break;
|
|
39
|
-
case 13:
|
|
40
|
-
c = !1, e + 4 < r && t[e + 1] === 10 && t[e + 2] !== 13 && t[e - 1] !== 10 && t[e - 2] !== 13 && (f = !0);
|
|
41
|
-
case 10:
|
|
42
|
-
o = e;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
if (o === -1)
|
|
46
|
-
break;
|
|
47
|
-
s(t.subarray(n, o), a, f), n = e, a = -1, f = !1;
|
|
48
|
-
}
|
|
49
|
-
n === r ? t = void 0 : n !== 0 && (t = t.subarray(n), e -= n);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function k(s, t, e) {
|
|
53
|
-
let a = y();
|
|
54
|
-
const c = new TextDecoder();
|
|
55
|
-
return function(l, i, r) {
|
|
56
|
-
if (l.length === 0)
|
|
57
|
-
e == null || e(a), a = y();
|
|
58
|
-
else if (i > 0) {
|
|
59
|
-
const n = c.decode(l.subarray(0, i)), o = i + (l[i + 1] === 32 ? 2 : 1);
|
|
60
|
-
let d = c.decode(l.subarray(o));
|
|
61
|
-
switch (r && (d += `
|
|
62
|
-
`), n) {
|
|
63
|
-
case "data":
|
|
64
|
-
a.data = a.data ? a.data + `
|
|
65
|
-
` + d : d;
|
|
66
|
-
break;
|
|
67
|
-
case "event":
|
|
68
|
-
a.event = d;
|
|
69
|
-
break;
|
|
70
|
-
case "id":
|
|
71
|
-
s(a.id = d);
|
|
72
|
-
break;
|
|
73
|
-
case "retry":
|
|
74
|
-
const u = parseInt(d, 10);
|
|
75
|
-
isNaN(u) || t(a.retry = u);
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function h(s, t) {
|
|
82
|
-
const e = new Uint8Array(s.length + t.length);
|
|
83
|
-
return e.set(s), e.set(t, s.length), e;
|
|
84
|
-
}
|
|
85
|
-
function y() {
|
|
86
|
-
return {
|
|
87
|
-
data: "",
|
|
88
|
-
event: "",
|
|
89
|
-
id: "",
|
|
90
|
-
retry: void 0
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
w as getBytes,
|
|
95
|
-
g as getLines,
|
|
96
|
-
k as getMessages
|
|
97
|
-
};
|
package/dist/es/api/index.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var d = Object.defineProperty, h = Object.defineProperties;
|
|
2
|
-
var S = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var s = Object.getOwnPropertySymbols;
|
|
4
|
-
var x = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var a = (t, e, r) => e in t ? d(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, p = (t, e) => {
|
|
6
|
-
for (var r in e || (e = {}))
|
|
7
|
-
x.call(e, r) && a(t, r, e[r]);
|
|
8
|
-
if (s)
|
|
9
|
-
for (var r of s(e))
|
|
10
|
-
C.call(e, r) && a(t, r, e[r]);
|
|
11
|
-
return t;
|
|
12
|
-
}, m = (t, e) => h(t, S(e));
|
|
13
|
-
import E from "axios";
|
|
14
|
-
import { isExpired as F } from "../utils.mjs";
|
|
15
|
-
import "../node_modules/@glodon-aiot/minio/dist/minio-zj.mjs";
|
|
16
|
-
import "dayjs";
|
|
17
|
-
import "../packages/apis/dist/es/node_modules/uuid/dist/esm-browser/native.mjs";
|
|
18
|
-
import "../packages/apis/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs";
|
|
19
|
-
import "../packages/apis/dist/es/agentcliui/index.mjs";
|
|
20
|
-
import "../packages/apis/dist/es/aecpilotui/index.mjs";
|
|
21
|
-
import { CVForceApi as I } from "../packages/apis/dist/es/cvforce/index.mjs";
|
|
22
|
-
function j(t, e, r) {
|
|
23
|
-
console.log("getCVForceService apiBase", t);
|
|
24
|
-
const f = (o) => {
|
|
25
|
-
var i;
|
|
26
|
-
return e && (F(e) && r(403, "aiotToken is timeout"), o.headers = (i = o.headers) != null ? i : {}, o.headers = m(p({}, o.headers), {
|
|
27
|
-
Authorization: e ? `Bearer ${e}` : ""
|
|
28
|
-
})), o;
|
|
29
|
-
};
|
|
30
|
-
function g(o, i = !0) {
|
|
31
|
-
const n = `${t}${o}`, c = E.create({
|
|
32
|
-
baseURL: n
|
|
33
|
-
});
|
|
34
|
-
return i && c.interceptors.request.use(f), c;
|
|
35
|
-
}
|
|
36
|
-
const u = (o, i) => {
|
|
37
|
-
o === 401 && r(o, "aiotToken is invalid");
|
|
38
|
-
}, v = (o, i) => {
|
|
39
|
-
o !== 10001 && o !== 10215 && r(o, i);
|
|
40
|
-
}, A = g("/data/v1");
|
|
41
|
-
return new I(A, {
|
|
42
|
-
onHttpStatusError: u,
|
|
43
|
-
onAppStatusError: v
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
j as getCVForceService
|
|
48
|
-
};
|
package/dist/es/index.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { configuration as t, configure as r } from "./Config.mjs";
|
|
2
|
-
import { default as a } from "./BotClient.mjs";
|
|
3
|
-
import { default as i } from "./Session.mjs";
|
|
4
|
-
import { default as l } from "./AgentPlugin.mjs";
|
|
5
|
-
export {
|
|
6
|
-
l as AgentPlugin,
|
|
7
|
-
a as BotClient,
|
|
8
|
-
i as Session,
|
|
9
|
-
t as configuration,
|
|
10
|
-
r as configure
|
|
11
|
-
};
|