@glodon-aiot/bot-client-sdk 3.26.0-alpha.12 → 3.26.0-alpha.14

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.
@@ -5,24 +5,24 @@ var m = (r, t) => {
5
5
  throw Error("Symbol." + r + " is not defined");
6
6
  };
7
7
  var g = (r, t, e) => t in r ? p(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
8
- var l = (r, t, e) => (g(r, typeof t != "symbol" ? t + "" : t, e), e);
8
+ var b = (r, t, e) => (g(r, typeof t != "symbol" ? t + "" : t, e), e);
9
9
  var o = (r, t, e) => new Promise((s, a) => {
10
10
  var n = (i) => {
11
11
  try {
12
- y(e.next(i));
12
+ l(e.next(i));
13
13
  } catch (c) {
14
14
  a(c);
15
15
  }
16
16
  }, d = (i) => {
17
17
  try {
18
- y(e.throw(i));
18
+ l(e.throw(i));
19
19
  } catch (c) {
20
20
  a(c);
21
21
  }
22
- }, y = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, d);
23
- y((e = e.apply(r, t)).next());
22
+ }, l = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, d);
23
+ l((e = e.apply(r, t)).next());
24
24
  });
25
- var f = (r, t, e) => (t = r[m("asyncIterator")]) ? t.call(r) : (r = r[m("iterator")](), t = {}, e = (s, a) => (a = r[s]) && (t[s] = (n) => new Promise((d, y, i) => (n = a.call(r, n), i = n.done, Promise.resolve(n.value).then((c) => d({ value: c, done: i }), y)))), e("next"), e("return"), t);
25
+ var f = (r, t, e) => (t = r[m("asyncIterator")]) ? t.call(r) : (r = r[m("iterator")](), t = {}, e = (s, a) => (a = r[s]) && (t[s] = (n) => new Promise((d, l, i) => (n = a.call(r, n), i = n.done, Promise.resolve(n.value).then((c) => d({ value: c, done: i }), l)))), e("next"), e("return"), t);
26
26
  import { throwIfAborted as u } from "../errors.mjs";
27
27
  import { SandboxClient as v } from "../host/sandboxClient.mjs";
28
28
  import { SANDBOX_PROTOCOL as A } from "../host/protocol.mjs";
@@ -36,11 +36,11 @@ function x(r, t) {
36
36
  }
37
37
  class S {
38
38
  constructor(t, e = "", s = new v()) {
39
- l(this, "displayName");
40
- l(this, "capabilities", /* @__PURE__ */ new Set());
41
- l(this, "sandboxVersion");
42
- l(this, "sandboxProtocol");
43
- l(this, "sandbox");
39
+ b(this, "displayName");
40
+ b(this, "capabilities", /* @__PURE__ */ new Set());
41
+ b(this, "sandboxVersion");
42
+ b(this, "sandboxProtocol");
43
+ b(this, "sandbox");
44
44
  this.displayName = e, this.sandbox = s;
45
45
  }
46
46
  setCapabilities(t, e = {}) {
@@ -50,7 +50,7 @@ class S {
50
50
  applySandbox(t) {
51
51
  this.sandboxProtocol = t == null ? void 0 : t.protocol, this.sandbox.apply(t);
52
52
  }
53
- /** 沙箱已就绪且协议为 2 时,命令走直连。 */
53
+ /** 沙箱已就绪且协议为 1 时,命令走直连。 */
54
54
  get canExec() {
55
55
  return this.sandbox.ready;
56
56
  }
@@ -101,7 +101,8 @@ class S {
101
101
  cwd: t.cwd,
102
102
  command: t.command,
103
103
  argv: t.argv,
104
- timeoutMs: t.timeoutMs
104
+ timeoutMs: t.timeoutMs,
105
+ skill: t.skill
105
106
  }, t.signal, t.onOutput);
106
107
  if (e.timedOut)
107
108
  throw w("AbortError", "命令运行超时。");
@@ -121,8 +122,8 @@ class S {
121
122
  const d = [];
122
123
  try {
123
124
  for (var N = f(M(e)), z, L, F; z = !(L = yield N.next()).done; z = !1) {
124
- const b = L.value;
125
- u(s.signal), d.push(b);
125
+ const y = L.value;
126
+ u(s.signal), d.push(y);
126
127
  }
127
128
  } catch (L) {
128
129
  F = [L];
@@ -134,10 +135,10 @@ class S {
134
135
  throw F[0];
135
136
  }
136
137
  }
137
- const y = d.reduce((b, h) => b + h.byteLength, 0), i = new Uint8Array(y);
138
+ const l = d.reduce((y, h) => y + h.byteLength, 0), i = new Uint8Array(l);
138
139
  let c = 0;
139
- d.forEach((b) => {
140
- i.set(b, c), c += b.byteLength;
140
+ d.forEach((y) => {
141
+ i.set(y, c), c += y.byteLength;
141
142
  }), yield this.sandbox.write(t, i, s.createDirectories === !0, s.signal);
142
143
  });
143
144
  }
@@ -1,4 +1,4 @@
1
- const i = "glodon-workspace", o = "__glodonHostBridge", c = 2;
1
+ const i = "glodon-workspace", o = "__glodonHostBridge", c = 1;
2
2
  function f(t) {
3
3
  let e = t;
4
4
  if (typeof e == "string")
@@ -1,51 +1,52 @@
1
- var N = Object.defineProperty;
2
- var b = Object.getOwnPropertySymbols;
3
- var C = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
4
- var A = (i, t, e) => t in i ? N(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, S = (i, t) => {
1
+ var M = Object.defineProperty, O = Object.defineProperties;
2
+ var j = Object.getOwnPropertyDescriptors;
3
+ var v = Object.getOwnPropertySymbols;
4
+ var B = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
5
+ var A = (a, t, e) => t in a ? M(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, y = (a, t) => {
5
6
  for (var e in t || (t = {}))
6
- C.call(t, e) && A(i, e, t[e]);
7
- if (b)
8
- for (var e of b(t))
9
- M.call(t, e) && A(i, e, t[e]);
10
- return i;
11
- };
12
- var m = (i, t, e) => (A(i, typeof t != "symbol" ? t + "" : t, e), e);
13
- var g = (i, t, e) => new Promise((r, s) => {
14
- var o = (a) => {
7
+ B.call(t, e) && A(a, e, t[e]);
8
+ if (v)
9
+ for (var e of v(t))
10
+ T.call(t, e) && A(a, e, t[e]);
11
+ return a;
12
+ }, x = (a, t) => O(a, j(t));
13
+ var m = (a, t, e) => (A(a, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var p = (a, t, e) => new Promise((r, s) => {
15
+ var o = (i) => {
15
16
  try {
16
- c(e.next(a));
17
+ l(e.next(i));
17
18
  } catch (h) {
18
19
  s(h);
19
20
  }
20
- }, n = (a) => {
21
+ }, n = (i) => {
21
22
  try {
22
- c(e.throw(a));
23
+ l(e.throw(i));
23
24
  } catch (h) {
24
25
  s(h);
25
26
  }
26
- }, c = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(o, n);
27
- c((e = e.apply(i, t)).next());
27
+ }, l = (i) => i.done ? r(i.value) : Promise.resolve(i.value).then(o, n);
28
+ l((e = e.apply(a, t)).next());
28
29
  });
29
30
  import { MAX_COMMAND_OUTPUT_CHARS as w } from "../../builtinTools/command.mjs";
30
- import { domError as d } from "../adapters/WorkspaceFileAdapter.mjs";
31
- import { SANDBOX_PROTOCOL as k } from "./protocol.mjs";
32
- import { decodeBinaryFrame as v, MAX_BINARY_PAYLOAD as O, encodeBinaryFrame as P } from "./sandboxFrames.mjs";
33
- const y = "沙箱已退出。";
34
- function E(i) {
35
- if (i instanceof Uint8Array)
36
- return i;
37
- if (i instanceof ArrayBuffer)
38
- return new Uint8Array(i);
31
+ import { domError as f } from "../adapters/WorkspaceFileAdapter.mjs";
32
+ import { SANDBOX_PROTOCOL as S } from "./protocol.mjs";
33
+ import { decodeBinaryFrame as b, MAX_BINARY_PAYLOAD as N, encodeBinaryFrame as P } from "./sandboxFrames.mjs";
34
+ const k = "沙箱已退出。";
35
+ function E(a) {
36
+ if (a instanceof Uint8Array)
37
+ return a;
38
+ if (a instanceof ArrayBuffer)
39
+ return new Uint8Array(a);
39
40
  }
40
- function x(i, t, e, r) {
41
- const s = i.length > w ? i.slice(i.length - w) : i;
42
- if (!t && !e && !r && i.length <= w)
41
+ function C(a, t, e, r) {
42
+ const s = a.length > w ? a.slice(a.length - w) : a;
43
+ if (!t && !e && !r && a.length <= w)
43
44
  return s;
44
45
  let o = `
45
46
  …输出已截断`;
46
47
  return e && (o += `,完整输出见 ${e}`), r && (o += ",日志已截断"), s + o;
47
48
  }
48
- class D {
49
+ class L {
49
50
  constructor(t = (e) => new WebSocket(e)) {
50
51
  m(this, "notice");
51
52
  m(this, "socket");
@@ -58,22 +59,22 @@ class D {
58
59
  }
59
60
  get ready() {
60
61
  const t = this.notice;
61
- return (t == null ? void 0 : t.state) === "ready" && t.protocol === k && !!(t.url && t.token);
62
+ return (t == null ? void 0 : t.state) === "ready" && t.protocol === S && !!(t.url && t.token);
62
63
  }
63
64
  unavailableMessage() {
64
65
  var t, e, r, s;
65
- return ((t = this.notice) == null ? void 0 : t.state) === "starting" ? "沙箱正在启动。" : (e = this.notice) != null && e.message ? this.notice.message : ((r = this.notice) == null ? void 0 : r.state) === "exited" || ((s = this.notice) == null ? void 0 : s.state) === "failed" ? y : "沙箱没有就绪。";
66
+ return ((t = this.notice) == null ? void 0 : t.state) === "starting" ? "沙箱正在启动。" : (e = this.notice) != null && e.message ? this.notice.message : ((r = this.notice) == null ? void 0 : r.state) === "exited" || ((s = this.notice) == null ? void 0 : s.state) === "failed" ? k : "沙箱没有就绪。";
66
67
  }
67
68
  apply(t) {
68
69
  const e = this.notice;
69
70
  if (this.notice = t, !this.ready || !(t != null && t.url) || !t.token) {
70
- this.failAll(d("NotAllowedError", this.unavailableMessage())), this.stop();
71
+ this.failAll(f("NotAllowedError", this.unavailableMessage())), this.stop();
71
72
  return;
72
73
  }
73
- (e == null ? void 0 : e.url) === t.url && e.token === t.token && this.socket && this.socket.readyState <= 1 || (this.failAll(d("AbortError", y)), this.stop(), this.connect(t.url, t.token));
74
+ (e == null ? void 0 : e.url) === t.url && e.token === t.token && this.socket && this.socket.readyState <= 1 || (this.failAll(f("AbortError", k)), this.stop(), this.connect(t.url, t.token));
74
75
  }
75
76
  stat(t) {
76
- return g(this, null, function* () {
77
+ return p(this, null, function* () {
77
78
  return this.invoke({
78
79
  op: "stat",
79
80
  path: t
@@ -81,7 +82,7 @@ class D {
81
82
  });
82
83
  }
83
84
  list(t, e) {
84
- return g(this, null, function* () {
85
+ return p(this, null, function* () {
85
86
  return this.invoke({
86
87
  op: "list",
87
88
  path: t
@@ -89,33 +90,33 @@ class D {
89
90
  });
90
91
  }
91
92
  read(o) {
92
- return g(this, arguments, function* (t, e = 0, r = 50 * 1024 * 1024, s) {
93
+ return p(this, arguments, function* (t, e = 0, r = 50 * 1024 * 1024, s) {
93
94
  const n = this.begin({
94
95
  op: "read",
95
96
  path: t,
96
97
  offset: e,
97
98
  maxBytes: r
98
- }, s), c = [];
99
- let a;
100
- for (; !a; ) {
101
- const u = yield this.next(n), p = E(u);
102
- if (p) {
103
- c.push(v(p).payload);
99
+ }, s), l = [];
100
+ let i;
101
+ for (; !i; ) {
102
+ const d = yield this.next(n), g = E(d);
103
+ if (g) {
104
+ l.push(b(g).payload);
104
105
  continue;
105
106
  }
106
- a = u;
107
+ i = d;
107
108
  }
108
- if (this.calls.delete(n), a.ok === !1)
109
- throw d(String(a.name || "NotAllowedError"), String(a.message || "读取失败。"));
110
- const h = c.reduce((u, p) => u + p.length, 0), l = new Uint8Array(h);
111
- let f = 0;
112
- return c.forEach((u) => {
113
- l.set(u, f), f += u.length;
114
- }), l;
109
+ if (this.calls.delete(n), i.ok === !1)
110
+ throw f(String(i.name || "NotAllowedError"), String(i.message || "读取失败。"));
111
+ const h = l.reduce((d, g) => d + g.length, 0), c = new Uint8Array(h);
112
+ let u = 0;
113
+ return l.forEach((d) => {
114
+ c.set(d, u), u += d.length;
115
+ }), c;
115
116
  });
116
117
  }
117
118
  write(t, e, r, s) {
118
- return g(this, null, function* () {
119
+ return p(this, null, function* () {
119
120
  const o = this.begin({
120
121
  op: "write",
121
122
  path: t,
@@ -124,23 +125,93 @@ class D {
124
125
  }, s);
125
126
  let n = 0;
126
127
  for (; n < e.length; ) {
127
- const a = e.subarray(n, n + O), h = n + a.length;
128
- this.send(P(o, n, h === e.length, a)), n = h;
129
- const f = yield this.next(o);
130
- if (f.ok === !1)
131
- throw this.calls.delete(o), d(String(f.name || "NotAllowedError"), String(f.message || "写入失败。"));
132
- if (f.op !== "ack" && f.ok === !0) {
128
+ const i = e.subarray(n, n + N), h = n + i.length;
129
+ this.send(P(o, n, h === e.length, i)), n = h;
130
+ const u = yield this.next(o);
131
+ if (u.ok === !1)
132
+ throw this.calls.delete(o), f(String(u.name || "NotAllowedError"), String(u.message || "写入失败。"));
133
+ if (u.op !== "ack" && u.ok === !0) {
133
134
  this.calls.delete(o);
134
135
  return;
135
136
  }
136
137
  }
137
- const c = yield this.next(o);
138
- if (this.calls.delete(o), c.ok === !1)
139
- throw d(String(c.name || "NotAllowedError"), String(c.message || "写入失败。"));
138
+ const l = yield this.next(o);
139
+ if (this.calls.delete(o), l.ok === !1)
140
+ throw f(String(l.name || "NotAllowedError"), String(l.message || "写入失败。"));
141
+ });
142
+ }
143
+ skillStatus(t, e) {
144
+ return p(this, null, function* () {
145
+ const r = yield this.invoke({
146
+ op: "skillStatus",
147
+ applicationId: t
148
+ }, e);
149
+ return Array.isArray(r.skills) ? r.skills : [];
150
+ });
151
+ }
152
+ skillRead(t, e, r, s, o) {
153
+ return p(this, null, function* () {
154
+ const n = this.begin({
155
+ op: "skillRead",
156
+ applicationId: t,
157
+ skillId: e,
158
+ version: r,
159
+ path: s
160
+ }, o), l = [];
161
+ let i;
162
+ for (; !i; ) {
163
+ const d = yield this.next(n), g = E(d);
164
+ if (g) {
165
+ l.push(b(g).payload);
166
+ continue;
167
+ }
168
+ i = d;
169
+ }
170
+ if (this.calls.delete(n), i.ok === !1)
171
+ throw f(String(i.name || "NotAllowedError"), String(i.message || "读取失败。"));
172
+ const h = l.reduce((d, g) => d + g.length, 0), c = new Uint8Array(h);
173
+ let u = 0;
174
+ return l.forEach((d) => {
175
+ c.set(d, u), u += d.length;
176
+ }), c;
177
+ });
178
+ }
179
+ installSkill(t, e, r) {
180
+ return p(this, null, function* () {
181
+ const s = this.begin(x(y({
182
+ op: "installSkill"
183
+ }, t), {
184
+ size: e.length
185
+ }), r);
186
+ let o = 0;
187
+ for (; o < e.length; ) {
188
+ const l = e.subarray(o, o + N), i = o + l.length;
189
+ this.send(P(s, o, i === e.length, l)), o = i;
190
+ const h = yield this.next(s);
191
+ if (h.ok === !1)
192
+ throw this.calls.delete(s), f(String(h.name || "NotAllowedError"), String(h.message || "安装失败。"));
193
+ if (h.op !== "ack" && h.ok === !0) {
194
+ this.calls.delete(s);
195
+ return;
196
+ }
197
+ }
198
+ const n = yield this.next(s);
199
+ if (this.calls.delete(s), n.ok === !1)
200
+ throw f(String(n.name || "NotAllowedError"), String(n.message || "安装失败。"));
201
+ });
202
+ }
203
+ skillPrune(t, e, r, s) {
204
+ return p(this, null, function* () {
205
+ yield this.invoke({
206
+ op: "skillPrune",
207
+ applicationId: t,
208
+ keep: e,
209
+ busy: r
210
+ }, s);
140
211
  });
141
212
  }
142
213
  mkdir(t) {
143
- return g(this, null, function* () {
214
+ return p(this, null, function* () {
144
215
  yield this.invoke({
145
216
  op: "mkdir",
146
217
  path: t
@@ -148,7 +219,7 @@ class D {
148
219
  });
149
220
  }
150
221
  remove(t, e) {
151
- return g(this, null, function* () {
222
+ return p(this, null, function* () {
152
223
  yield this.invoke({
153
224
  op: "remove",
154
225
  path: t,
@@ -157,7 +228,7 @@ class D {
157
228
  });
158
229
  }
159
230
  move(t, e) {
160
- return g(this, null, function* () {
231
+ return p(this, null, function* () {
161
232
  yield this.invoke({
162
233
  op: "move",
163
234
  from: t,
@@ -166,35 +237,35 @@ class D {
166
237
  });
167
238
  }
168
239
  exec(t, e, r) {
169
- return g(this, null, function* () {
240
+ return p(this, null, function* () {
170
241
  var h;
171
- const s = this.begin(S({}, t), e, () => {
242
+ const s = this.begin(y({}, t), e, () => {
172
243
  this.send({
173
- protocol: k,
244
+ protocol: S,
174
245
  id: s,
175
246
  op: "cancel"
176
247
  });
177
248
  });
178
- let o = "", n = "", c = !1, a = !1;
249
+ let o = "", n = "", l = !1, i = !1;
179
250
  for (; this.calls.has(s); ) {
180
- const l = yield this.next(s);
181
- if (l.op === "stdout" || l.op === "stderr") {
182
- const p = String((h = l.text) != null ? h : "");
183
- r == null || r(l.op, p), l.op === "stdout" ? (o += p, o.length > w && (c = !0), o = o.slice(-w)) : (n += p, n.length > w && (a = !0), n = n.slice(-w));
251
+ const c = yield this.next(s);
252
+ if (c.op === "stdout" || c.op === "stderr") {
253
+ const g = String((h = c.text) != null ? h : "");
254
+ r == null || r(c.op, g), c.op === "stdout" ? (o += g, o.length > w && (l = !0), o = o.slice(-w)) : (n += g, n.length > w && (i = !0), n = n.slice(-w));
184
255
  continue;
185
256
  }
186
- if (this.calls.delete(s), l.ok === !1)
187
- throw d(String(l.name || "NotAllowedError"), String(l.message || "命令失败。"));
188
- const f = typeof l.logPath == "string" ? l.logPath : void 0, u = l.logTruncated === !0;
257
+ if (this.calls.delete(s), c.ok === !1)
258
+ throw f(String(c.name || "NotAllowedError"), String(c.message || "命令失败。"));
259
+ const u = typeof c.logPath == "string" ? c.logPath : void 0, d = c.logTruncated === !0;
189
260
  return {
190
- exitCode: typeof l.exitCode == "number" ? l.exitCode : 1,
191
- timedOut: l.timedOut === !0,
192
- stdout: x(o, c, f, u),
193
- stderr: x(n, a, f, u),
194
- cwd: typeof l.cwd == "string" ? l.cwd : void 0
261
+ exitCode: typeof c.exitCode == "number" ? c.exitCode : 1,
262
+ timedOut: c.timedOut === !0,
263
+ stdout: C(o, l, u, d),
264
+ stderr: C(n, i, u, d),
265
+ cwd: typeof c.cwd == "string" ? c.cwd : void 0
195
266
  };
196
267
  }
197
- throw d("AbortError", y);
268
+ throw f("AbortError", k);
198
269
  });
199
270
  }
200
271
  invoke(t, e) {
@@ -203,42 +274,42 @@ class D {
203
274
  this.calls.delete(r);
204
275
  const o = s;
205
276
  if (o.ok === !1)
206
- throw d(String(o.name || "NotAllowedError"), String(o.message || "请求失败。"));
277
+ throw f(String(o.name || "NotAllowedError"), String(o.message || "请求失败。"));
207
278
  return o;
208
279
  });
209
280
  }
210
281
  begin(t, e, r) {
211
282
  if (!this.ready)
212
- throw d("NotAllowedError", this.unavailableMessage());
283
+ throw f("NotAllowedError", this.unavailableMessage());
213
284
  if (e != null && e.aborted)
214
- throw d("AbortError");
285
+ throw f("AbortError");
215
286
  const s = `sbx-${++this.seq}`;
216
287
  let o = () => {
217
288
  };
218
289
  const n = {
219
290
  messages: [],
220
291
  waiters: [],
221
- reject: (a) => o(a)
292
+ reject: (i) => o(i)
222
293
  };
223
294
  this.calls.set(s, n);
224
- const c = () => {
225
- r == null || r(), n.reject(d("AbortError"));
295
+ const l = () => {
296
+ r == null || r(), n.reject(f("AbortError"));
226
297
  };
227
- return e == null || e.addEventListener("abort", c, {
298
+ return e == null || e.addEventListener("abort", l, {
228
299
  once: !0
229
- }), o = (a) => {
230
- e == null || e.removeEventListener("abort", c), this.calls.delete(s);
300
+ }), o = (i) => {
301
+ e == null || e.removeEventListener("abort", l), this.calls.delete(s);
231
302
  const h = n.waiters.shift();
232
- h && h(Promise.reject(a));
233
- }, this.send(S({
234
- protocol: k,
303
+ h && h(Promise.reject(i));
304
+ }, this.send(y({
305
+ protocol: S,
235
306
  id: s
236
307
  }, t)), s;
237
308
  }
238
309
  next(t) {
239
310
  const e = this.calls.get(t);
240
311
  if (!e)
241
- return Promise.reject(d("AbortError", y));
312
+ return Promise.reject(f("AbortError", k));
242
313
  const r = e.messages.shift();
243
314
  return r !== void 0 ? Promise.resolve(r) : new Promise((s, o) => {
244
315
  e.waiters.push(s), e.reject = (n) => {
@@ -259,21 +330,21 @@ class D {
259
330
  const r = ++this.generation, s = this.openSocket(t);
260
331
  this.socket = s, this.authed = !1, s.binaryType = "arraybuffer", s.onopen = () => {
261
332
  r === this.generation && s.send(JSON.stringify({
262
- protocol: k,
333
+ protocol: S,
263
334
  op: "auth",
264
335
  token: e
265
336
  }));
266
337
  }, s.onmessage = (o) => {
267
338
  r === this.generation && this.onFrame(o.data);
268
339
  }, s.onclose = () => {
269
- r === this.generation && (this.authed = !1, this.failAll(d("AbortError", y)));
340
+ r === this.generation && (this.authed = !1, this.failAll(f("AbortError", k)));
270
341
  }, s.onerror = () => {
271
342
  };
272
343
  }
273
344
  onFrame(t) {
274
345
  const e = E(t);
275
346
  if (e) {
276
- const s = v(e);
347
+ const s = b(e);
277
348
  this.push(s.id, e);
278
349
  return;
279
350
  }
@@ -292,7 +363,7 @@ class D {
292
363
  return;
293
364
  }
294
365
  if (r.op === "bye") {
295
- this.failAll(d("AbortError", y)), this.stop();
366
+ this.failAll(f("AbortError", k)), this.stop();
296
367
  return;
297
368
  }
298
369
  typeof r.id == "string" && this.push(r.id, r);
@@ -320,5 +391,5 @@ class D {
320
391
  }
321
392
  }
322
393
  export {
323
- D as SandboxClient
394
+ L as SandboxClient
324
395
  };