@inkeep/agents-ui 0.0.0-dev-20260501182500 → 0.0.0-dev-20260501195414

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.
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),w=require("../../node_modules/.pnpm/botid@1.5.11_next@16.2.4_@babel_core@7.29.0_@opentelemetry_api@1.9.1_react-dom@19.3.0-c_6ac35f5bf61166da3243b6cf36e09c95/node_modules/botid/dist/client/core/index.cjs"),I=require("./config-provider.cjs");function _(){const{baseSettings:f,aiChatSettings:b}=I.useInkeepConfig(),{shouldBypassCaptcha:l}=f,{baseUrl:a,apiKey:d,botProtectionLevel:u}=b,h=g.useRef(!1);return g.useEffect(()=>{if(h.current||l||d||!a)return;if(typeof window<"u"&&!window.__INKEEP_FETCH_DEBUG__){window.__INKEEP_FETCH_DEBUG__=!0;const n=window.fetch;window.fetch=async function(e,i){let s;typeof e=="string"?s=e:e instanceof URL?s=e.toString():s=e.url;try{const t=new URL(s,location.href);if(t.pathname.startsWith("/run/")){const r=new Headers(i?.headers??(e instanceof Request?e.headers:void 0)),m=i?.method??(e instanceof Request?e.method:"GET");console.log("[botid-debug] fetch →",{url:t.toString(),method:m,locationOrigin:location.origin,targetOrigin:t.origin,sameOrigin:t.origin===location.origin,hasXIsHuman:r.has("x-is-human"),xIsHumanLength:r.get("x-is-human")?.length??null,xPath:r.get("x-path"),xMethod:r.get("x-method")});const c=await n.call(this,e,i);return console.log("[botid-debug] fetch ←",{url:t.toString(),status:c.status,statusText:c.statusText}),c}}catch{}return n.call(this,e,i)}}const o={checkLevel:u};try{console.log("[botid-debug] calling initBotId",{baseUrl:a,advancedOptions:o}),w.initBotId({protect:[{path:"/run/auth/apps/*/anonymous-session",method:"POST",advancedOptions:o},{path:"/run/api/chat",method:"POST",advancedOptions:o},{path:"/run/v1/feedback",method:"POST",advancedOptions:o}]}),h.current=!0,console.log("[botid-debug] initBotId returned successfully")}catch(n){console.warn("[botid-debug] initBotId threw",n)}},[a,d,l,u]),null}exports.BotIdInitializer=_;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),w=require("../../node_modules/.pnpm/botid@1.5.11_next@16.2.4_@babel_core@7.29.0_@opentelemetry_api@1.9.1_react-dom@19.3.0-c_6ac35f5bf61166da3243b6cf36e09c95/node_modules/botid/dist/client/core/index.cjs"),I=require("./config-provider.cjs");function _(){const{baseSettings:f,aiChatSettings:b}=I.useInkeepConfig(),{shouldBypassCaptcha:l}=f,{baseUrl:t,apiKey:d,botProtectionLevel:u}=b,h=g.useRef(!1);return g.useEffect(()=>{if(h.current||l||d||!t)return;if(typeof window<"u"&&!window.__INKEEP_FETCH_DEBUG__){window.__INKEEP_FETCH_DEBUG__=!0;const i=window.fetch;window.fetch=async function(e,s){let r;typeof e=="string"?r=e:e instanceof URL?r=e.toString():r=e.url;try{const o=new URL(r,location.href);if(o.pathname.startsWith("/run/")){const a=new Headers(s?.headers??(e instanceof Request?e.headers:void 0)),m=s?.method??(e instanceof Request?e.method:"GET");console.log("[botid-debug] fetch →",{url:o.toString(),method:m,locationOrigin:location.origin,targetOrigin:o.origin,sameOrigin:o.origin===location.origin,hasXIsHuman:a.has("x-is-human"),xIsHumanLength:a.get("x-is-human")?.length??null,xPath:a.get("x-path"),xMethod:a.get("x-method")});const c=await i.call(this,e,s);return console.log("[botid-debug] fetch ←",{url:o.toString(),status:c.status,statusText:c.statusText}),c}}catch{}return i.call(this,e,s)}}const n={checkLevel:u};try{console.log("[botid-debug] calling initBotId",{baseUrl:t,advancedOptions:n}),w.initBotId({protect:[{path:`${t}/run/auth/apps/*/anonymous-session`,method:"POST",advancedOptions:n},{path:`${t}/run/api/chat`,method:"POST",advancedOptions:n},{path:`${t}/run/v1/feedback`,method:"POST",advancedOptions:n}]}),h.current=!0,console.log("[botid-debug] initBotId returned successfully")}catch(i){console.warn("[botid-debug] initBotId threw",i)}},[t,d,l,u]),null}exports.BotIdInitializer=_;
@@ -3,61 +3,61 @@ import { useRef as w, useEffect as b } from "react";
3
3
  import { initBotId as I } from "../../node_modules/.pnpm/botid@1.5.11_next@16.2.4_@babel_core@7.29.0_@opentelemetry_api@1.9.1_react-dom@19.3.0-c_6ac35f5bf61166da3243b6cf36e09c95/node_modules/botid/dist/client/core/index.js";
4
4
  import { useInkeepConfig as _ } from "./config-provider.js";
5
5
  function B() {
6
- const { baseSettings: f, aiChatSettings: g } = _(), { shouldBypassCaptcha: l } = f, { baseUrl: a, apiKey: h, botProtectionLevel: d } = g, u = w(!1);
6
+ const { baseSettings: f, aiChatSettings: g } = _(), { shouldBypassCaptcha: l } = f, { baseUrl: e, apiKey: h, botProtectionLevel: d } = g, u = w(!1);
7
7
  return b(() => {
8
- if (u.current || l || h || !a) return;
8
+ if (u.current || l || h || !e) return;
9
9
  if (typeof window < "u" && !window.__INKEEP_FETCH_DEBUG__) {
10
10
  window.__INKEEP_FETCH_DEBUG__ = !0;
11
- const n = window.fetch;
12
- window.fetch = async function(t, s) {
13
- let i;
14
- typeof t == "string" ? i = t : t instanceof URL ? i = t.toString() : i = t.url;
11
+ const s = window.fetch;
12
+ window.fetch = async function(t, i) {
13
+ let r;
14
+ typeof t == "string" ? r = t : t instanceof URL ? r = t.toString() : r = t.url;
15
15
  try {
16
- const e = new URL(i, location.href);
17
- if (e.pathname.startsWith("/run/")) {
18
- const r = new Headers(
19
- s?.headers ?? (t instanceof Request ? t.headers : void 0)
20
- ), m = s?.method ?? (t instanceof Request ? t.method : "GET");
16
+ const o = new URL(r, location.href);
17
+ if (o.pathname.startsWith("/run/")) {
18
+ const a = new Headers(
19
+ i?.headers ?? (t instanceof Request ? t.headers : void 0)
20
+ ), m = i?.method ?? (t instanceof Request ? t.method : "GET");
21
21
  console.log("[botid-debug] fetch →", {
22
- url: e.toString(),
22
+ url: o.toString(),
23
23
  method: m,
24
24
  locationOrigin: location.origin,
25
- targetOrigin: e.origin,
26
- sameOrigin: e.origin === location.origin,
27
- hasXIsHuman: r.has("x-is-human"),
28
- xIsHumanLength: r.get("x-is-human")?.length ?? null,
29
- xPath: r.get("x-path"),
30
- xMethod: r.get("x-method")
25
+ targetOrigin: o.origin,
26
+ sameOrigin: o.origin === location.origin,
27
+ hasXIsHuman: a.has("x-is-human"),
28
+ xIsHumanLength: a.get("x-is-human")?.length ?? null,
29
+ xPath: a.get("x-path"),
30
+ xMethod: a.get("x-method")
31
31
  });
32
- const c = await n.call(this, t, s);
32
+ const c = await s.call(this, t, i);
33
33
  return console.log("[botid-debug] fetch ←", {
34
- url: e.toString(),
34
+ url: o.toString(),
35
35
  status: c.status,
36
36
  statusText: c.statusText
37
37
  }), c;
38
38
  }
39
39
  } catch {
40
40
  }
41
- return n.call(this, t, s);
41
+ return s.call(this, t, i);
42
42
  };
43
43
  }
44
- const o = { checkLevel: d };
44
+ const n = { checkLevel: d };
45
45
  try {
46
- console.log("[botid-debug] calling initBotId", { baseUrl: a, advancedOptions: o }), I({
46
+ console.log("[botid-debug] calling initBotId", { baseUrl: e, advancedOptions: n }), I({
47
47
  protect: [
48
48
  {
49
- path: "/run/auth/apps/*/anonymous-session",
49
+ path: `${e}/run/auth/apps/*/anonymous-session`,
50
50
  method: "POST",
51
- advancedOptions: o
51
+ advancedOptions: n
52
52
  },
53
- { path: "/run/api/chat", method: "POST", advancedOptions: o },
54
- { path: "/run/v1/feedback", method: "POST", advancedOptions: o }
53
+ { path: `${e}/run/api/chat`, method: "POST", advancedOptions: n },
54
+ { path: `${e}/run/v1/feedback`, method: "POST", advancedOptions: n }
55
55
  ]
56
56
  }), u.current = !0, console.log("[botid-debug] initBotId returned successfully");
57
- } catch (n) {
58
- console.warn("[botid-debug] initBotId threw", n);
57
+ } catch (s) {
58
+ console.warn("[botid-debug] initBotId threw", s);
59
59
  }
60
- }, [a, h, l, d]), null;
60
+ }, [e, h, l, d]), null;
61
61
  }
62
62
  export {
63
63
  B as BotIdInitializer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-ui",
3
- "version": "0.0.0-dev-20260501182500",
3
+ "version": "0.0.0-dev-20260501195414",
4
4
  "description": "",
5
5
  "homepage": "",
6
6
  "repository": {