@gengage/assistant-fe 0.6.34 → 0.6.36

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 (100) hide show
  1. package/dist/chat/components/ChatDrawer.d.ts +2 -2
  2. package/dist/chat/components/KvkkBanner.d.ts +0 -2
  3. package/dist/chat/kvkk.d.ts +11 -5
  4. package/dist/chat-runtime.js +1 -1
  5. package/dist/chat.iife.js +11 -11
  6. package/dist/chat.js +1 -1
  7. package/dist/common/index.d.ts +2 -1
  8. package/dist/{common-CB1Vjd-T.js → common-ByXFSuDh.js} +1 -1
  9. package/dist/common.js +68 -67
  10. package/dist/{connection-warning-DBE8pkFv.js → connection-warning-ChSjBT_4.js} +1 -1
  11. package/dist/{fastIntent-D9jYpC8V.js → fastIntent-B9AE8K30.js} +1 -1
  12. package/dist/index.js +21 -21
  13. package/dist/native.iife.js +9 -9
  14. package/dist/qna-runtime.js +1 -1
  15. package/dist/qna.iife.js +1 -1
  16. package/dist/qna.js +1 -1
  17. package/dist/request-response-cache-D6O2m-O-.js +1426 -0
  18. package/dist/{runtime-By-msZ8j.js → runtime-CCQGaWOq.js} +198 -199
  19. package/dist/{runtime-DyG44pqo.js → runtime-YKSfwMAr.js} +415 -422
  20. package/dist/{runtime-CABcQc-L.js → runtime-aR-A6Jh2.js} +8 -9
  21. package/dist/{simbut-CsQSH5vN.js → simbut-BCKrXmkh.js} +1 -1
  22. package/dist/simbut.iife.js +1 -1
  23. package/dist/simbut.js +1 -1
  24. package/dist/{simrel-bxdmsMmZ.js → simrel-CSlprSEe.js} +1 -1
  25. package/dist/simrel-runtime.js +1 -1
  26. package/dist/simrel.iife.js +1 -1
  27. package/dist/simrel.js +2 -2
  28. package/dist/{widget-base-C_RZ-VIr.js → widget-base-CmxCHKJi.js} +1 -1
  29. package/package.json +3 -19
  30. package/dist/agent-ui-steps-DIWmTMuV.js +0 -3199
  31. package/dist/agentic/adaptor/create-adaptor.d.ts +0 -22
  32. package/dist/agentic/adaptor/fetch-bridge.d.ts +0 -31
  33. package/dist/agentic/adaptor/mount.d.ts +0 -45
  34. package/dist/agentic/algos/similarity.d.ts +0 -86
  35. package/dist/agentic/algos/similarity.js +0 -261
  36. package/dist/agentic/context/chat-context.d.ts +0 -17
  37. package/dist/agentic/context/context-store.d.ts +0 -57
  38. package/dist/agentic/context/persistence.d.ts +0 -14
  39. package/dist/agentic/contracts/agentic-contracts.d.ts +0 -133
  40. package/dist/agentic/debug/activity-collector.d.ts +0 -15
  41. package/dist/agentic/debug/activity-instrumentation.d.ts +0 -22
  42. package/dist/agentic/debug/activity-overlay.d.ts +0 -3
  43. package/dist/agentic/debug/activity-state.d.ts +0 -37
  44. package/dist/agentic/debug/local-dev.d.ts +0 -18
  45. package/dist/agentic/events/builders.d.ts +0 -10
  46. package/dist/agentic/events/comparison.d.ts +0 -6
  47. package/dist/agentic/events/context-products.d.ts +0 -6
  48. package/dist/agentic/events/error-taxonomy.d.ts +0 -27
  49. package/dist/agentic/events/product-normalize.d.ts +0 -50
  50. package/dist/agentic/events/ui-specs.d.ts +0 -41
  51. package/dist/agentic/flow/create-flow.d.ts +0 -2
  52. package/dist/agentic/flow/dispatch.d.ts +0 -3
  53. package/dist/agentic/index.d.ts +0 -65
  54. package/dist/agentic/index.js +0 -3493
  55. package/dist/agentic/types.d.ts +0 -360
  56. package/dist/agentic/util/account-config.d.ts +0 -8
  57. package/dist/agentic/util/assistant-host.d.ts +0 -11
  58. package/dist/agentic/util/be-url.d.ts +0 -4
  59. package/dist/agentic/util/browser-memory.d.ts +0 -13
  60. package/dist/agentic/util/browser-tools.d.ts +0 -31
  61. package/dist/agentic/util/cache-key.d.ts +0 -15
  62. package/dist/agentic/util/common/declarative-cache.d.ts +0 -21
  63. package/dist/agentic/util/common/fallback-status.d.ts +0 -10
  64. package/dist/agentic/util/common/flow-steps.d.ts +0 -8
  65. package/dist/agentic/util/common/gss-tool-aliases.d.ts +0 -66
  66. package/dist/agentic/util/common/iframe-scraper.d.ts +0 -22
  67. package/dist/agentic/util/common/llm-routing.d.ts +0 -50
  68. package/dist/agentic/util/common/object.d.ts +0 -1
  69. package/dist/agentic/util/common/open-product-page.d.ts +0 -30
  70. package/dist/agentic/util/common/panel-context.d.ts +0 -3
  71. package/dist/agentic/util/common/privacy.d.ts +0 -14
  72. package/dist/agentic/util/common/product-resolver.d.ts +0 -20
  73. package/dist/agentic/util/common/product-surface.d.ts +0 -24
  74. package/dist/agentic/util/common/ref-store.d.ts +0 -15
  75. package/dist/agentic/util/common/retail-privacy.d.ts +0 -4
  76. package/dist/agentic/util/common/route-params.d.ts +0 -3
  77. package/dist/agentic/util/common/similarity-ranking.d.ts +0 -2
  78. package/dist/agentic/util/common/site-awareness.d.ts +0 -130
  79. package/dist/agentic/util/lazy-runtime-loader.d.ts +0 -10
  80. package/dist/agentic/util/privacy.d.ts +0 -12
  81. package/dist/agentic/util/request-text.d.ts +0 -3
  82. package/dist/agentic/util/time.d.ts +0 -2
  83. package/dist/agentic/widgets/endpoints.d.ts +0 -12
  84. package/dist/agentic/worker/agent-ui-steps.d.ts +0 -43
  85. package/dist/agentic/worker/agent-ui.d.ts +0 -44
  86. package/dist/agentic/worker/be-client.d.ts +0 -32
  87. package/dist/agentic/worker/coalesce.d.ts +0 -25
  88. package/dist/agentic/worker/compaction.d.ts +0 -12
  89. package/dist/agentic/worker/entry.d.ts +0 -2
  90. package/dist/agentic/worker/flow-runner.d.ts +0 -24
  91. package/dist/agentic/worker/jwt-mint.d.ts +0 -21
  92. package/dist/agentic/worker/pdp-hydrate.d.ts +0 -30
  93. package/dist/agentic/worker/rpc.d.ts +0 -47
  94. package/dist/agentic/worker/tool-bridge.d.ts +0 -2
  95. package/dist/agentic/worker/tool-schema.d.ts +0 -19
  96. package/dist/agentic/worker.d.ts +0 -52
  97. package/dist/agentic/worker.js +0 -432
  98. package/dist/agentic.iife.js +0 -445
  99. package/dist/api-paths-DZQ4Xx7u.js +0 -1274
  100. package/dist/request-response-cache-BxRsKGJ0.js +0 -154
@@ -1,154 +0,0 @@
1
- var w = 72e5, b = 200, S = 5 * 1024 * 1024, g = "gengage_request_response_cache", T = 1, c = "responses", _ = /* @__PURE__ */ new Set(["addToCart", "like"]), a = /* @__PURE__ */ new Map(), A = null;
2
- async function H(e, t = {}, r = {}) {
3
- const n = B(e, t);
4
- if (!n) return fetch(e, t);
5
- const s = Date.now(), o = await C(n, s);
6
- if (o) return j(o);
7
- const u = await fetch(e, t);
8
- return u.ok && I(n, u.clone(), s, {
9
- ttlMs: r.ttlMs ?? w,
10
- maxEntries: r.maxEntries ?? b,
11
- maxBodyBytes: r.maxBodyBytes ?? S
12
- }), u;
13
- }
14
- function B(e, t = {}) {
15
- if (typeof Request < "u" && e instanceof Request) return null;
16
- const r = String(t.method || "GET").toUpperCase();
17
- return r !== "POST" || typeof t.body != "string" || D(t.body) ? null : `rr:${F(q({
18
- url: String(e),
19
- method: r,
20
- headers: M(t.headers),
21
- body: t.body
22
- }))}`;
23
- }
24
- function D(e) {
25
- try {
26
- const t = JSON.parse(e);
27
- if (!t || typeof t != "object" || Array.isArray(t)) return !1;
28
- const r = t.type;
29
- return typeof r == "string" && _.has(r);
30
- } catch {
31
- return !1;
32
- }
33
- }
34
- async function C(e, t) {
35
- const r = a.get(e);
36
- if (r) if (r.expiresAt <= t) a.delete(e);
37
- else
38
- return r.lastAccessedAt = t, a.delete(e), a.set(e, r), y(r), r;
39
- const n = await R(e);
40
- return n ? n.expiresAt <= t ? (a.delete(e), L(e), null) : (n.lastAccessedAt = t, a.set(e, n), y(n), m(b), n) : null;
41
- }
42
- async function I(e, t, r, n) {
43
- try {
44
- const s = await t.text();
45
- if (U(s) > n.maxBodyBytes || O(s)) return;
46
- const o = {
47
- key: e,
48
- status: t.status,
49
- statusText: t.statusText,
50
- headers: P(t.headers),
51
- body: s,
52
- createdAt: r,
53
- expiresAt: r + n.ttlMs,
54
- lastAccessedAt: r
55
- };
56
- a.set(e, o), m(n.maxEntries), await y(o), await N(n.maxEntries, r);
57
- } catch {
58
- }
59
- }
60
- function O(e) {
61
- return /"_error"\s*:/u.test(e) || /"type"\s*:\s*"error"/u.test(e);
62
- }
63
- function j(e) {
64
- return new Response(e.body, {
65
- status: e.status,
66
- statusText: e.statusText,
67
- headers: new Headers(e.headers)
68
- });
69
- }
70
- function M(e) {
71
- const t = new Headers(e), r = [];
72
- return t.forEach((n, s) => {
73
- const o = s.toLowerCase();
74
- o !== "authorization" && o !== "cookie" && r.push([o, n]);
75
- }), r.sort(([n], [s]) => n.localeCompare(s));
76
- }
77
- function P(e) {
78
- const t = [];
79
- return e.forEach((r, n) => {
80
- const s = n.toLowerCase();
81
- s !== "set-cookie" && t.push([s, r]);
82
- }), t.sort(([r], [n]) => r.localeCompare(n));
83
- }
84
- function m(e) {
85
- for (; a.size > e; ) {
86
- const t = [...a.values()].sort((r, n) => r.lastAccessedAt - n.lastAccessedAt)[0];
87
- if (!t) break;
88
- a.delete(t.key);
89
- }
90
- }
91
- async function d() {
92
- return typeof indexedDB > "u" ? null : (A ??= new Promise((e) => {
93
- const t = indexedDB.open(g, T);
94
- t.onupgradeneeded = () => {
95
- const r = t.result;
96
- r.objectStoreNames.contains(c) || r.createObjectStore(c, { keyPath: "key" }).createIndex("lastAccessedAt", "lastAccessedAt", { unique: !1 });
97
- }, t.onsuccess = () => e(t.result), t.onerror = () => e(null), t.onblocked = () => e(null);
98
- }), A);
99
- }
100
- async function R(e) {
101
- const t = await d();
102
- return t ? new Promise((r) => {
103
- const n = t.transaction(c, "readonly"), s = n.objectStore(c).get(e);
104
- s.onsuccess = () => r(s.result ?? null), s.onerror = () => r(null), n.onerror = () => r(null);
105
- }) : null;
106
- }
107
- async function y(e) {
108
- const t = await d();
109
- t && await new Promise((r) => {
110
- const n = t.transaction(c, "readwrite");
111
- n.objectStore(c).put(e), n.oncomplete = () => r(), n.onerror = () => r(), n.onabort = () => r();
112
- });
113
- }
114
- async function L(e) {
115
- const t = await d();
116
- t && await new Promise((r) => {
117
- const n = t.transaction(c, "readwrite");
118
- n.objectStore(c).delete(e), n.oncomplete = () => r(), n.onerror = () => r(), n.onabort = () => r();
119
- });
120
- }
121
- async function N(e, t) {
122
- const r = await d();
123
- r && await new Promise((n) => {
124
- const s = r.transaction(c, "readwrite"), o = s.objectStore(c), u = [], f = o.openCursor();
125
- f.onsuccess = () => {
126
- const l = f.result;
127
- if (!l) {
128
- const p = u.filter((i) => i.expiresAt <= t), x = u.filter((i) => i.expiresAt > t).sort((i, E) => i.lastAccessedAt - E.lastAccessedAt).slice(0, Math.max(0, u.length - p.length - e));
129
- for (const i of [...p, ...x]) o.delete(i.key);
130
- return;
131
- }
132
- u.push(l.value), l.continue();
133
- }, f.onerror = () => n(), s.oncomplete = () => n(), s.onerror = () => n(), s.onabort = () => n();
134
- });
135
- }
136
- function q(e) {
137
- return JSON.stringify(h(e));
138
- }
139
- function h(e) {
140
- return Array.isArray(e) ? e.map(h) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => [t, h(r)]));
141
- }
142
- function F(e) {
143
- let t = 14695981039346656037n;
144
- const r = 1099511628211n;
145
- for (let n = 0; n < e.length; n += 1)
146
- t ^= BigInt(e.charCodeAt(n)), t = BigInt.asUintN(64, t * r);
147
- return t.toString(16).padStart(16, "0");
148
- }
149
- function U(e) {
150
- return typeof TextEncoder < "u" ? new TextEncoder().encode(e).byteLength : e.length;
151
- }
152
- export {
153
- H as t
154
- };