super-agent-sdk 1.0.6 → 1.0.8

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.mjs CHANGED
@@ -1,20 +1,20 @@
1
- function f(a) {
2
- if (Array.isArray(a)) return a.map((e) => f(e));
3
- if (a && typeof a == "object" && a.constructor === Object) {
1
+ function u(r) {
2
+ if (Array.isArray(r)) return r.map((e) => u(e));
3
+ if (r && typeof r == "object" && r.constructor === Object) {
4
4
  const e = {};
5
- for (const [t, n] of Object.entries(a)) {
6
- const o = t.replace(/_([a-z])/g, (r, s) => s.toUpperCase());
7
- e[o] = f(n);
5
+ for (const [t, s] of Object.entries(r)) {
6
+ const o = t.replace(/_([a-z])/g, (a, n) => n.toUpperCase());
7
+ e[o] = u(s);
8
8
  }
9
9
  return e;
10
10
  }
11
- return a;
11
+ return r;
12
12
  }
13
- const w = "/api/agent/runtime/v1";
14
- class I {
13
+ const I = "/api/agent/runtime/v1";
14
+ class w {
15
15
  constructor(e) {
16
16
  this.refreshing = null;
17
- const t = e.baseUrl ?? w;
17
+ const t = e.baseUrl ?? I;
18
18
  this.baseUrl = t.replace(/\/$/, ""), this.tokenGateway = e.tokenGateway.replace(/\/$/, ""), this.appId = e.appId ?? "", this.token = e.token ?? "", this.botId = e.botId, this.isAbsoluteUrl = /^https?:\/\//.test(this.baseUrl), this.isAbsoluteGateway = /^https?:\/\//.test(this.tokenGateway);
19
19
  }
20
20
  getBotId() {
@@ -32,18 +32,18 @@ class I {
32
32
  }
33
33
  /** POST {origin}{tokenGateway}/v1/token — 获取 token + appId */
34
34
  async fetchToken() {
35
- const t = `${this.isAbsoluteGateway ? this.tokenGateway : `${this.getOrigin()}${this.tokenGateway}`}/v1/token`, n = await fetch(t, {
35
+ const t = `${this.isAbsoluteGateway ? this.tokenGateway : `${this.getOrigin()}${this.tokenGateway}`}/v1/token`, s = await fetch(t, {
36
36
  method: "POST",
37
37
  headers: { "Content-Type": "application/json" },
38
38
  body: JSON.stringify({ botId: this.botId })
39
39
  });
40
- if (!n.ok)
41
- throw new Error(`HTTP ${n.status}: ${n.statusText}`);
42
- const o = await n.json();
40
+ if (!s.ok)
41
+ throw new Error(`HTTP ${s.status}: ${s.statusText}`);
42
+ const o = await s.json();
43
43
  if (o.code !== "200")
44
44
  throw new Error(o.message || `API error: ${o.code}`);
45
- const r = f(o.data);
46
- return this.token = r.token, r.appId && !this.appId && (this.appId = r.appId), r.token;
45
+ const a = u(o.data);
46
+ return this.token = a.token, a.appId && !this.appId && (this.appId = a.appId), a.token;
47
47
  }
48
48
  headers(e) {
49
49
  return {
@@ -66,30 +66,30 @@ class I {
66
66
  this.refreshing = null;
67
67
  }
68
68
  }
69
- async request(e, t, n) {
69
+ async request(e, t, s) {
70
70
  if (!this.token && !await this.handleTokenRefresh())
71
71
  throw new Error("SDK token not available: POST /token failed");
72
72
  let o = this.isAbsoluteUrl ? `${this.baseUrl}${t}` : `${this.getOrigin()}${this.baseUrl}${t}`;
73
- if (n != null && n.params) {
73
+ if (s != null && s.params) {
74
74
  const i = new URLSearchParams();
75
- for (const [l, d] of Object.entries(n.params))
76
- d != null && i.set(l, String(d));
75
+ for (const [d, l] of Object.entries(s.params))
76
+ l != null && i.set(d, String(l));
77
77
  const c = i.toString();
78
78
  c && (o += `?${c}`);
79
79
  }
80
- const r = await fetch(o, {
80
+ const a = await fetch(o, {
81
81
  method: e,
82
82
  headers: this.headers(),
83
- body: n != null && n.body ? JSON.stringify(n.body) : void 0
83
+ body: s != null && s.body ? JSON.stringify(s.body) : void 0
84
84
  });
85
- if (r.status === 401 && !(n != null && n.retry) && await this.handleTokenRefresh())
86
- return this.request(e, t, { ...n, retry: !0 });
87
- if (!r.ok)
88
- throw new Error(`HTTP ${r.status}: ${r.statusText}`);
89
- const s = await r.json();
90
- if (s.code !== "200")
91
- throw new Error(s.message || `API error: ${s.code}`);
92
- return f(s.data);
85
+ if (a.status === 401 && !(s != null && s.retry) && await this.handleTokenRefresh())
86
+ return this.request(e, t, { ...s, retry: !0 });
87
+ if (!a.ok)
88
+ throw new Error(`HTTP ${a.status}: ${a.statusText}`);
89
+ const n = await a.json();
90
+ if (n.code !== "200")
91
+ throw new Error(n.message || `API error: ${n.code}`);
92
+ return u(n.data);
93
93
  }
94
94
  get(e, t) {
95
95
  return this.request("GET", e, { params: t });
@@ -104,26 +104,26 @@ class I {
104
104
  return this.request("DELETE", e);
105
105
  }
106
106
  /** For SSE streaming — returns raw Response (no envelope unwrap) */
107
- async streamPost(e, t, n) {
107
+ async streamPost(e, t, s) {
108
108
  if (!this.token && !await this.handleTokenRefresh())
109
109
  throw new Error("SDK token not available: POST /token failed");
110
- const o = this.isAbsoluteUrl ? `${this.baseUrl}${e}` : `${this.getOrigin()}${this.baseUrl}${e}`, r = await fetch(o, {
110
+ const o = this.isAbsoluteUrl ? `${this.baseUrl}${e}` : `${this.getOrigin()}${this.baseUrl}${e}`, a = await fetch(o, {
111
111
  method: "POST",
112
112
  headers: this.headers(),
113
113
  body: JSON.stringify(t),
114
- signal: n
114
+ signal: s
115
115
  });
116
- return r.status === 401 && await this.handleTokenRefresh() ? fetch(o, {
116
+ return a.status === 401 && await this.handleTokenRefresh() ? fetch(o, {
117
117
  method: "POST",
118
118
  headers: this.headers(),
119
119
  body: JSON.stringify(t),
120
- signal: n
121
- }) : r;
120
+ signal: s
121
+ }) : a;
122
122
  }
123
123
  }
124
- function y(a) {
125
- const e = a.split(`
126
- `).map((n) => n.trim()).filter((n) => n.startsWith("data:")).map((n) => n.slice(5).trim());
124
+ function y(r) {
125
+ const e = r.split(`
126
+ `).map((s) => s.trim()).filter((s) => s.startsWith("data:")).map((s) => s.slice(5).trim());
127
127
  if (!e.length) return null;
128
128
  let t;
129
129
  try {
@@ -166,6 +166,13 @@ function y(a) {
166
166
  sessionId: t.sessionId ?? t.session_id ?? "",
167
167
  messageId: t.messageId ?? t.message_id
168
168
  };
169
+ case "stop":
170
+ return {
171
+ type: "stop",
172
+ content: t.content ?? "",
173
+ sessionId: t.sessionId ?? t.session_id ?? "",
174
+ messageId: t.messageId ?? t.message_id
175
+ };
169
176
  case "error":
170
177
  return { type: "error", content: t.message ?? "Unknown error" };
171
178
  case "interrupt":
@@ -189,216 +196,258 @@ function y(a) {
189
196
  return null;
190
197
  }
191
198
  }
192
- async function m(a, e, t) {
193
- if (!a.body) {
199
+ async function m(r, e, t) {
200
+ if (!r.body) {
194
201
  t(new Error("Response body is null"));
195
202
  return;
196
203
  }
197
- const n = a.body.getReader(), o = new TextDecoder();
198
- let r = "";
204
+ const s = r.body.getReader(), o = new TextDecoder();
205
+ let a = "";
199
206
  try {
200
207
  for (; ; ) {
201
- const { value: s, done: i } = await n.read();
208
+ const { value: n, done: i } = await s.read();
202
209
  if (i) break;
203
- r += o.decode(s, { stream: !0 });
210
+ a += o.decode(n, { stream: !0 });
204
211
  let c;
205
- for (; (c = r.indexOf(`
212
+ for (; (c = a.indexOf(`
206
213
 
207
214
  `)) !== -1; ) {
208
- const l = r.slice(0, c);
209
- r = r.slice(c + 2);
210
- const d = y(l);
211
- d && e(d);
215
+ const d = a.slice(0, c);
216
+ a = a.slice(c + 2);
217
+ const l = y(d);
218
+ l && e(l);
212
219
  }
213
220
  }
214
- if (r.trim()) {
215
- const s = y(r);
216
- s && e(s);
221
+ if (a.trim()) {
222
+ const n = y(a);
223
+ n && e(n);
217
224
  }
218
- } catch (s) {
219
- (s == null ? void 0 : s.name) !== "AbortError" && t(s instanceof Error ? s : new Error(String(s)));
225
+ } catch (n) {
226
+ (n == null ? void 0 : n.name) !== "AbortError" && t(n instanceof Error ? n : new Error(String(n)));
220
227
  } finally {
221
228
  try {
222
- n.releaseLock();
229
+ s.releaseLock();
223
230
  } catch {
224
231
  }
225
232
  }
226
233
  }
227
- function k(a, e) {
228
- const t = new AbortController(), n = e.signal ? b(e.signal, t.signal) : t.signal, o = {
229
- botId: a.getBotId(),
234
+ function p(r, e) {
235
+ const t = new AbortController(), s = e.signal ? T(e.signal, t.signal) : t.signal, o = {
236
+ botId: r.getBotId(),
230
237
  message: e.message,
231
238
  sessionId: e.sessionId,
232
239
  stream: e.stream !== !1
233
240
  };
234
- return o.stream ? a.streamPost("/chat", o, n).then((r) => {
235
- var s;
236
- if (!r.ok) {
237
- (s = e.onError) == null || s.call(e, new Error(`HTTP ${r.status}`));
241
+ return o.stream ? r.streamPost("/chat", o, s).then((a) => {
242
+ var n;
243
+ if (!a.ok) {
244
+ (n = e.onError) == null || n.call(e, new Error(`HTTP ${a.status}`));
238
245
  return;
239
246
  }
240
247
  return m(
241
- r,
248
+ a,
242
249
  (i) => {
243
- var c, l, d, h;
244
- i.type === "done" && i.sessionId ? (c = e.onDone) == null || c.call(e, { sessionId: i.sessionId, content: i.content, messageId: i.messageId }) : i.type === "done" ? (l = e.onDone) == null || l.call(e, { sessionId: "", content: i.content, messageId: i.messageId }) : i.type === "error" ? (d = e.onError) == null || d.call(e, new Error(i.content)) : (h = e.onMessage) == null || h.call(e, i);
250
+ var c, d, l, h, f, g;
251
+ i.type === "done" && i.sessionId ? (c = e.onDone) == null || c.call(e, { sessionId: i.sessionId, content: i.content, messageId: i.messageId }) : i.type === "done" ? (d = e.onDone) == null || d.call(e, { sessionId: "", content: i.content, messageId: i.messageId }) : i.type === "stop" ? ((l = e.onMessage) == null || l.call(e, i), (h = e.onDone) == null || h.call(e, { sessionId: i.sessionId ?? "", content: i.content, messageId: i.messageId })) : i.type === "error" ? (f = e.onError) == null || f.call(e, new Error(i.content)) : (g = e.onMessage) == null || g.call(e, i);
245
252
  },
246
253
  (i) => {
247
254
  var c;
248
255
  return (c = e.onError) == null ? void 0 : c.call(e, i);
249
256
  }
250
257
  );
251
- }).catch((r) => {
252
- var s;
253
- (r == null ? void 0 : r.name) !== "AbortError" && ((s = e.onError) == null || s.call(e, r instanceof Error ? r : new Error(String(r))));
254
- }) : a.post("/chat", o).then((r) => {
255
- var s;
256
- (s = e.onDone) == null || s.call(e, {
257
- sessionId: r.sessionId,
258
- content: r.content ?? "",
259
- messageId: r.messageId
258
+ }).catch((a) => {
259
+ var n;
260
+ (a == null ? void 0 : a.name) !== "AbortError" && ((n = e.onError) == null || n.call(e, a instanceof Error ? a : new Error(String(a))));
261
+ }) : r.post("/chat", o).then((a) => {
262
+ var n;
263
+ (n = e.onDone) == null || n.call(e, {
264
+ sessionId: a.sessionId,
265
+ content: a.content ?? "",
266
+ messageId: a.messageId
260
267
  });
261
- }).catch((r) => {
262
- var s;
263
- (s = e.onError) == null || s.call(e, r instanceof Error ? r : new Error(String(r)));
268
+ }).catch((a) => {
269
+ var n;
270
+ (n = e.onError) == null || n.call(e, a instanceof Error ? a : new Error(String(a)));
264
271
  }), t;
265
272
  }
266
- function b(a, e) {
267
- const t = new AbortController(), n = () => t.abort();
268
- return a.addEventListener("abort", n, { once: !0 }), e.addEventListener("abort", n, { once: !0 }), (a.aborted || e.aborted) && t.abort(), t.signal;
273
+ function T(r, e) {
274
+ const t = new AbortController(), s = () => t.abort();
275
+ return r.addEventListener("abort", s, { once: !0 }), e.addEventListener("abort", s, { once: !0 }), (r.aborted || e.aborted) && t.abort(), t.signal;
269
276
  }
270
- async function T(a) {
271
- return (await a.post("/chat/sessions", {
272
- botId: a.getBotId()
277
+ async function b(r) {
278
+ return (await r.post("/chat/sessions", {
279
+ botId: r.getBotId()
273
280
  })).sessionId;
274
281
  }
275
- function S(a) {
282
+ function k(r) {
276
283
  return {
277
284
  // 后端返回 thread_id,toCamelCase 转为 threadId,映射为 sessionId
278
- sessionId: a.threadId ?? a.sessionId,
279
- botId: a.botId,
280
- title: a.title,
281
- createTime: a.createTime,
282
- updateTime: a.updateTime
285
+ sessionId: r.threadId ?? r.sessionId,
286
+ botId: r.botId,
287
+ title: r.title,
288
+ createTime: r.createTime,
289
+ updateTime: r.updateTime
283
290
  };
284
291
  }
285
- async function $(a, e) {
286
- const t = await a.get("/chat/conversations", {
287
- botId: a.getBotId(),
292
+ async function S(r, e) {
293
+ const t = await r.get("/chat/conversations", {
294
+ botId: r.getBotId(),
288
295
  page: (e == null ? void 0 : e.page) ?? 1,
289
296
  size: (e == null ? void 0 : e.size) ?? 20
290
297
  });
291
298
  return {
292
299
  ...t,
293
- items: t.items.map(S)
300
+ items: t.items.map(k)
294
301
  };
295
302
  }
296
- async function p(a, e, t) {
297
- await a.patch(`/chat/conversations/${e}`, { title: t });
303
+ async function $(r, e, t) {
304
+ await r.patch(`/chat/conversations/${e}`, { title: t });
298
305
  }
299
- async function A(a, e) {
300
- await a.del(`/chat/conversations/${e}`);
306
+ async function C(r, e) {
307
+ await r.del(`/chat/conversations/${e}`);
301
308
  }
302
- async function C(a, e) {
303
- const t = await a.get(`/chat/conversations/${e}/messages`);
309
+ async function A(r, e) {
310
+ const t = await r.get(`/chat/conversations/${e}/messages`);
304
311
  return O(t);
305
312
  }
306
- function O(a) {
307
- var n, o, r;
308
- const e = [], t = [...a].sort((s, i) => (s.seq ?? 0) - (i.seq ?? 0));
309
- for (const s of t) {
310
- const i = s.role;
311
- if (i === "system") continue;
312
- const c = s.messageId ?? `msg_${s.id}`, l = new Date(s.createTime ?? "").getTime() || Date.now();
313
- if (i === "human")
314
- e.push({
315
- id: c,
316
- role: "user",
317
- parts: [{ type: "text", content: s.content ?? "" }],
318
- timestamp: l
319
- });
320
- else if (i === "ai") {
321
- const d = [];
322
- s.reasoning && d.push({ type: "thinking", content: s.reasoning }), s.content && d.push({ type: "text", content: s.content });
323
- const h = s.toolCalls;
324
- if (h && Array.isArray(h))
325
- for (const u of h) {
326
- let g;
327
- try {
328
- g = typeof u.args == "string" ? u.args : JSON.stringify(u.args ?? {});
329
- } catch {
330
- g = String(u.args ?? "{}");
331
- }
332
- d.push({
333
- type: "tool_call",
334
- toolName: u.name ?? "",
335
- toolCallId: u.id ?? "",
336
- args: g
337
- });
338
- }
339
- e.push({ id: c, role: "assistant", parts: d, timestamp: l });
340
- } else if (i === "tool") {
341
- const d = Array.isArray(s.artifacts) ? s.artifacts : void 0;
342
- e.push({
343
- id: c,
344
- role: "assistant",
345
- parts: [{
346
- type: "tool_result",
347
- toolName: s.toolName ?? "",
348
- toolCallId: s.toolCallId ?? "",
349
- content: s.content ?? "",
350
- artifacts: d,
351
- renderMode: ((n = s.metadata) == null ? void 0 : n.renderMode) ?? ((o = s.metadata) == null ? void 0 : o.render_mode),
352
- html: (r = s.metadata) == null ? void 0 : r.html
353
- }],
354
- timestamp: l
355
- });
313
+ function O(r) {
314
+ const e = [...r].sort((n, i) => {
315
+ const c = new Date(n.createTime ?? 0).getTime() || 0, d = new Date(i.createTime ?? 0).getTime() || 0;
316
+ return c !== d ? c - d : (n.seq ?? 0) - (i.seq ?? 0);
317
+ }), t = /* @__PURE__ */ new Map();
318
+ for (const n of e)
319
+ n.role === "tool" && n.toolCallId && t.set(n.toolCallId, n.content || "");
320
+ const s = /* @__PURE__ */ new Set(), o = [], a = (n, i, c) => {
321
+ const d = o[o.length - 1];
322
+ (d == null ? void 0 : d.role) === "assistant" ? (d.parts.push(...n), d.id = i) : o.push({ id: i, role: "assistant", parts: [...n], timestamp: c });
323
+ };
324
+ for (const n of e) {
325
+ if (n.role === "system") continue;
326
+ const i = String(n.id ?? n.messageId ?? `msg_${Date.now()}`), c = new Date(n.createTime ?? "").getTime() || Date.now();
327
+ if (n.role === "human") {
328
+ o.push({ id: i, role: "user", parts: [{ type: "text", content: n.content ?? "" }], timestamp: c });
329
+ continue;
330
+ }
331
+ if (n.role === "ai") {
332
+ const d = _(n, t, s);
333
+ d.length > 0 && a(d, i, c);
334
+ continue;
335
+ }
336
+ if (n.role === "tool") {
337
+ if (n.toolCallId && s.has(n.toolCallId)) continue;
338
+ a([v(n)], i, c);
356
339
  }
357
340
  }
358
- return e;
341
+ return o;
342
+ }
343
+ function _(r, e, t) {
344
+ const s = [];
345
+ r.reasoning && s.push({ type: "thinking", content: r.reasoning }), r.content && s.push({ type: "text", content: r.content });
346
+ for (const o of r.toolCalls ?? [])
347
+ o.is_interrupt ? (t.add(o.id), s.push(P(o, e))) : s.push(E(o));
348
+ return s;
359
349
  }
360
- async function _(a, e, t, n, o, r) {
361
- const s = await a.streamPost(
350
+ function P(r, e) {
351
+ const t = e.has(r.id), s = typeof r.args == "object" ? r.args : {};
352
+ return {
353
+ type: "interrupt",
354
+ interrupt: {
355
+ interruptId: r.id ?? "",
356
+ interruptType: s.interruptType ?? "input",
357
+ content: s.content ?? "",
358
+ options: s.options,
359
+ placeholder: s.placeholder,
360
+ inputType: s.inputType,
361
+ maxLength: s.maxLength,
362
+ required: s.required,
363
+ fields: s.fields,
364
+ metadata: s.metadata
365
+ },
366
+ resolved: t,
367
+ response: t ? { action: "submit", value: x(e.get(r.id)) } : void 0
368
+ };
369
+ }
370
+ function E(r) {
371
+ let e;
372
+ try {
373
+ e = typeof r.args == "string" ? r.args : JSON.stringify(r.args ?? {});
374
+ } catch {
375
+ e = String(r.args ?? "{}");
376
+ }
377
+ return { type: "tool_call", toolName: r.name ?? "", toolCallId: r.id ?? "", args: e };
378
+ }
379
+ function v(r) {
380
+ var t, s, o;
381
+ const e = Array.isArray(r.artifacts) ? r.artifacts : void 0;
382
+ return {
383
+ type: "tool_result",
384
+ toolName: r.toolName ?? "",
385
+ toolCallId: r.toolCallId ?? "",
386
+ content: r.content ?? "",
387
+ artifacts: e,
388
+ renderMode: ((t = r.metadata) == null ? void 0 : t.renderMode) ?? ((s = r.metadata) == null ? void 0 : s.render_mode),
389
+ html: (o = r.metadata) == null ? void 0 : o.html
390
+ };
391
+ }
392
+ function x(r) {
393
+ if (r != null)
394
+ try {
395
+ return JSON.parse(r);
396
+ } catch {
397
+ return r;
398
+ }
399
+ }
400
+ async function U(r, e, t, s, o, a) {
401
+ const n = await r.streamPost(
362
402
  `/chat/interrupt/${e}/respond`,
363
403
  {
364
404
  sessionId: t,
365
- action: n.action,
366
- value: n.value
405
+ action: s.action,
406
+ value: s.value
367
407
  }
368
408
  );
369
- if (!s.ok) {
370
- const i = new Error(`HTTP ${s.status}`);
371
- throw r == null || r(i), i;
409
+ if (!n.ok) {
410
+ const i = new Error(`HTTP ${n.status}`);
411
+ throw a == null || a(i), i;
372
412
  }
373
413
  o && await m(
374
- s,
414
+ n,
375
415
  (i) => {
376
- i.type === "error" ? r == null || r(new Error(i.content)) : o(i);
416
+ i.type === "error" ? a == null || a(new Error(i.content)) : o(i);
377
417
  },
378
- (i) => r == null ? void 0 : r(i)
418
+ (i) => a == null ? void 0 : a(i)
379
419
  );
380
420
  }
381
- function E(a) {
382
- const e = new I(a);
421
+ async function D(r) {
422
+ return r.get(`/chat/bots/${r.getBotId()}/skills`);
423
+ }
424
+ async function q(r, e) {
425
+ await r.post("/chat/stop", { sessionId: e });
426
+ }
427
+ function N(r) {
428
+ const e = new w(r);
383
429
  return {
430
+ botId: e.getBotId(),
384
431
  getToken: () => e.fetchToken(),
385
- createSession: () => T(e),
386
- chat: (n) => k(e, n),
387
- listConversations: (n) => $(e, n),
388
- renameConversation: (n, o) => p(e, n, o),
389
- deleteConversation: (n) => A(e, n),
390
- getMessages: (n) => C(e, n),
391
- respondInterrupt: (n, o, r, s, i) => _(e, n, o, r, s, i),
392
- setToken: (n) => e.setToken(n),
393
- feedback: async (n, o, r) => {
394
- const s = { type: o };
395
- o === "dislike" && ((r == null ? void 0 : r.reason) != null && (s.reason = r.reason), r != null && r.remark && (s.remark = r.remark)), await e.post(`/chat/messages/${n}/feedback`, s);
432
+ createSession: () => b(e),
433
+ chat: (s) => p(e, s),
434
+ listConversations: (s) => S(e, s),
435
+ renameConversation: (s, o) => $(e, s, o),
436
+ deleteConversation: (s) => C(e, s),
437
+ getMessages: (s) => A(e, s),
438
+ respondInterrupt: (s, o, a, n, i) => U(e, s, o, a, n, i),
439
+ setToken: (s) => e.setToken(s),
440
+ feedback: async (s, o, a) => {
441
+ const n = { type: o };
442
+ o === "dislike" && ((a == null ? void 0 : a.reason) != null && (n.reason = a.reason), a != null && a.remark && (n.remark = a.remark)), await e.post(`/chat/messages/${s}/feedback`, n);
396
443
  },
397
- cancelFeedback: async (n) => {
398
- await e.del(`/chat/messages/${n}/feedback`);
399
- }
444
+ cancelFeedback: async (s) => {
445
+ await e.del(`/chat/messages/${s}/feedback`);
446
+ },
447
+ listSkills: () => D(e),
448
+ stopGeneration: (s) => q(e, s)
400
449
  };
401
450
  }
402
451
  export {
403
- E as createSuperAgent
452
+ N as createSuperAgent
404
453
  };