@useago/sdk 0.3.3 → 0.4.1

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.
Files changed (40) hide show
  1. package/dist/AgoClient-B6PsfMeg.cjs +6 -0
  2. package/dist/{AgoClient-DF7M2WAz.js → AgoClient-BerJvssl.js} +235 -219
  3. package/dist/angular.cjs +1 -1
  4. package/dist/angular.d.cts +12 -0
  5. package/dist/angular.d.ts +12 -0
  6. package/dist/angular.js +1 -1
  7. package/dist/createConversationSession-CLZvxyuu.js +58 -0
  8. package/dist/createConversationSession-D3K5Gf1k.cjs +1 -0
  9. package/dist/createFormCollector-CD1rqRG4.js +208 -0
  10. package/dist/createFormCollector-D1FfiSgA.cjs +1 -0
  11. package/dist/createMockClient-DMFGIOtc.cjs +1 -0
  12. package/dist/createMockClient-tVsApEAh.js +72 -0
  13. package/dist/devtools.cjs +26 -26
  14. package/dist/devtools.d.cts +16 -26
  15. package/dist/devtools.d.ts +16 -26
  16. package/dist/devtools.js +55 -55
  17. package/dist/helpers.cjs +1 -1
  18. package/dist/helpers.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.d.cts +102 -1
  21. package/dist/index.d.ts +102 -1
  22. package/dist/index.js +46 -43
  23. package/dist/react.cjs +19 -19
  24. package/dist/react.d.cts +67 -8
  25. package/dist/react.d.ts +67 -8
  26. package/dist/react.js +1066 -1051
  27. package/dist/vue.cjs +1 -1
  28. package/dist/vue.d.cts +12 -0
  29. package/dist/vue.d.ts +12 -0
  30. package/dist/vue.js +1 -1
  31. package/dist/widget.cjs +1 -0
  32. package/dist/widget.d.cts +635 -0
  33. package/dist/widget.d.ts +635 -0
  34. package/dist/widget.js +418 -0
  35. package/package.json +58 -15
  36. package/dist/AgoClient-bjN-z2ZQ.cjs +0 -6
  37. package/dist/createMockClient-D6uVh-B9.js +0 -254
  38. package/dist/createMockClient-DecMEUcK.cjs +0 -1
  39. /package/dist/{functions-DdROP6Ui.js → functions-C1-5vadY.js} +0 -0
  40. /package/dist/{functions-Bz-1Bs3I.cjs → functions-DsmzgHjC.cjs} +0 -0
package/dist/index.js CHANGED
@@ -1,28 +1,30 @@
1
- import { a as w, c as h, d as A, f as y, i as C, l as E, n as b, o as S, r as v, s as k, t as d, u as M } from "./AgoClient-DF7M2WAz.js";
2
- import { n as T, r as I, t as U } from "./createMockClient-D6uVh-B9.js";
3
- import { a as O, c as q, d as x, f as L, i as N, l as D, m as H, o as J, p as R, r as j, s as B, t as P, u as $ } from "./functions-DdROP6Ui.js";
4
- function z(e) {
1
+ import { a as w, c as h, d as A, f as y, i as C, l as E, n as b, o as S, r as v, s as k, t as d, u as M } from "./AgoClient-BerJvssl.js";
2
+ import { n as T, t as I } from "./createFormCollector-CD1rqRG4.js";
3
+ import { t as G } from "./createConversationSession-CLZvxyuu.js";
4
+ import { t as q } from "./createMockClient-tVsApEAh.js";
5
+ import { a as L, c as N, d as D, f as H, i as J, l as R, m as j, o as B, p as P, r as $, s as z, t as K, u as Q } from "./functions-C1-5vadY.js";
6
+ function V(e) {
5
7
  return e;
6
8
  }
7
- function K(e, t) {
9
+ function W(e, t) {
8
10
  return e.on("message:complete", t), () => e.off("message:complete", t);
9
11
  }
10
- function Q(e, t) {
12
+ function X(e, t) {
11
13
  return e.on("message:chunk", t), () => e.off("message:chunk", t);
12
14
  }
13
- function V(e, t) {
15
+ function Y(e, t) {
14
16
  return e.on("message:start", t), () => e.off("message:start", t);
15
17
  }
16
- function W(e, t) {
18
+ function Z(e, t) {
17
19
  return e.on("message:error", t), () => e.off("message:error", t);
18
20
  }
19
- function X(e, t) {
21
+ function _(e, t) {
20
22
  return e.on("toolCall:received", t), () => e.off("toolCall:received", t);
21
23
  }
22
- function Y(e, t) {
24
+ function ee(e, t) {
23
25
  return e.on("function:invoke", t), () => e.off("function:invoke", t);
24
26
  }
25
- async function* Z(e, t, g) {
27
+ async function* te(e, t, g) {
26
28
  const n = [];
27
29
  let r = null, a = !1;
28
30
  const u = (s) => {
@@ -38,16 +40,16 @@ async function* Z(e, t, g) {
38
40
  type: "complete",
39
41
  data: s
40
42
  }), a = !0, r?.();
41
- }, l = (s) => {
43
+ }, m = (s) => {
42
44
  u({
43
45
  type: "error",
44
46
  data: s
45
47
  }), a = !0, r?.();
46
- }, m = (s) => u({
48
+ }, l = (s) => u({
47
49
  type: "toolCall",
48
50
  data: s
49
51
  });
50
- e.on("message:start", f), e.on("message:chunk", o), e.on("message:complete", i), e.on("message:error", l), e.on("toolCall:received", m), e.sendMessage(t, g).catch(() => {
52
+ e.on("message:start", f), e.on("message:chunk", o), e.on("message:complete", i), e.on("message:error", m), e.on("toolCall:received", l), e.sendMessage(t, g).catch(() => {
51
53
  a = !0, r?.();
52
54
  });
53
55
  try {
@@ -55,7 +57,7 @@ async function* Z(e, t, g) {
55
57
  r = s;
56
58
  }), r = null);
57
59
  } finally {
58
- e.off("message:start", f), e.off("message:chunk", o), e.off("message:complete", i), e.off("message:error", l), e.off("toolCall:received", m);
60
+ e.off("message:start", f), e.off("message:chunk", o), e.off("message:complete", i), e.off("message:error", m), e.off("toolCall:received", l);
59
61
  }
60
62
  }
61
63
  function c(e) {
@@ -85,12 +87,12 @@ function c(e) {
85
87
  debug: f
86
88
  } : null;
87
89
  }
88
- function _(e) {
90
+ function oe(e) {
89
91
  const t = c(e);
90
92
  if (!t) throw new Error('createAgo(): could not detect AGO configuration. Set window.AGO, add <meta name="ago-base-url">, or pass { baseUrl } explicitly.');
91
93
  return new d(t);
92
94
  }
93
- function ee(e, t) {
95
+ function re(e, t) {
94
96
  return {
95
97
  ...e,
96
98
  handler: t
@@ -108,32 +110,33 @@ export {
108
110
  S as FunctionRegistry,
109
111
  v as SSEHandler,
110
112
  c as autoDetectConfig,
111
- P as copyToClipboard,
112
- _ as createAgo,
113
- T as createFormCollector,
114
- Z as createMessageStream,
115
- U as createMockClient,
116
- I as createStore,
117
- z as defineFunction,
118
- j as getLocalStorage,
119
- N as getUserLocation,
120
- O as highlightElement,
113
+ K as copyToClipboard,
114
+ oe as createAgo,
115
+ G as createConversationSession,
116
+ I as createFormCollector,
117
+ te as createMessageStream,
118
+ q as createMockClient,
119
+ T as createStore,
120
+ V as defineFunction,
121
+ $ as getLocalStorage,
122
+ J as getUserLocation,
123
+ L as highlightElement,
121
124
  C as isStreamNetworkError,
122
125
  k as logger,
123
- Y as onFunctionInvoke,
124
- K as onMessage,
125
- Q as onMessageChunk,
126
- W as onMessageError,
127
- V as onMessageStart,
128
- X as onToolCall,
129
- J as openUrl,
130
- B as scrollToElement,
131
- q as setLocalStorage,
132
- D as setTheme,
133
- $ as showConfirmDialog,
134
- x as showNotification,
135
- L as showToast,
136
- R as submitForm,
137
- H as trackEvent,
138
- ee as withHandler
126
+ ee as onFunctionInvoke,
127
+ W as onMessage,
128
+ X as onMessageChunk,
129
+ Z as onMessageError,
130
+ Y as onMessageStart,
131
+ _ as onToolCall,
132
+ B as openUrl,
133
+ z as scrollToElement,
134
+ N as setLocalStorage,
135
+ R as setTheme,
136
+ Q as showConfirmDialog,
137
+ D as showNotification,
138
+ H as showToast,
139
+ P as submitForm,
140
+ j as trackEvent,
141
+ re as withHandler
139
142
  };