@agentforge-io/chat-sdk 2.0.22 → 2.0.23

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.
@@ -131,12 +131,10 @@ export interface ChatSessionOptions {
131
131
  token: string;
132
132
  /**
133
133
  * Base URL of the AgentForge API, including scheme. Trailing slash is
134
- * stripped. Resolution order:
135
- * 1. This option (when present).
136
- * 2. `window.AGENTFORGE_API_BASE_URL` (runtime override, useful when
137
- * embedding via a `<script>` tag without React props).
138
- * 3. The baked default that ships with the current SDK version.
139
- * Hosts embedding into their own site can leave this unset.
134
+ * stripped. Optional — when omitted the SDK uses the baked default
135
+ * that ships with the current version. Pass this only when self-
136
+ * hosting the backend or pointing the SDK at a non-production
137
+ * deployment (e.g. localhost during development).
140
138
  */
141
139
  apiBaseUrl?: string;
142
140
  /** Stable id for this end-user's browser. Persist it (localStorage etc.)
package/dist/react.d.ts CHANGED
@@ -64,8 +64,8 @@ export interface ChatWidgetProps {
64
64
  /**
65
65
  * AgentForge API origin. Optional — the SDK ships with a built-in
66
66
  * default that points at the hosted AgentForge deployment. Override
67
- * this when you self-host the backend. A `window.AGENTFORGE_API_BASE_URL`
68
- * global also overrides, useful for `<script>`-tag embeds.
67
+ * this only when self-hosting the backend or pointing at a non-
68
+ * production deployment.
69
69
  */
70
70
  apiBaseUrl?: string;
71
71
  /** Render inline (fills the parent) instead of as a floating bubble. */
package/dist/session.js CHANGED
@@ -391,19 +391,10 @@ function generateBrowserSessionId() {
391
391
  }
392
392
  /**
393
393
  * Build-time default API origin. Bumped together with the SDK when the
394
- * hosted AgentForge deployment moves to a new domain. Hosts that
395
- * self-host the backend override this via the `apiBaseUrl` constructor
396
- * option, or at runtime via `window.AGENTFORGE_API_BASE_URL`.
394
+ * hosted AgentForge deployment moves to a new domain. Self-hosted
395
+ * deployments override this via the `apiBaseUrl` constructor option.
397
396
  */
398
397
  const BAKED_API_BASE = 'https://api-agentforge.stupidmvp.com';
399
398
  function defaultApiBase() {
400
- // Runtime override for hosts that embed via a script tag and don't
401
- // want to touch React props. Set once on `window` before the widget
402
- // mounts and the SDK uses it for every transport call.
403
- if (typeof window !== 'undefined') {
404
- const override = window.AGENTFORGE_API_BASE_URL;
405
- if (override)
406
- return override;
407
- }
408
399
  return BAKED_API_BASE;
409
400
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/chat-sdk",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "Framework-free chat session SDK for AgentForge public chat tokens. Headless — no DOM. Drop into any frontend (React, Vue, Svelte, vanilla) and listen for events.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",