@xenia-martech/sdk-js 1.1.0-dev.2 → 1.1.0-dev.4

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/README.md CHANGED
@@ -6,6 +6,34 @@ The official Xenia Marketer SDK for **web (pull) channels**. Drop in one wrapper
6
6
 
7
7
  ---
8
8
 
9
+ ## Using an AI coding assistant? Connect the Xenia MCP first
10
+
11
+ The values a journey needs (trigger ids, request fields, content keys) live in your Xenia account,
12
+ not in your code, and a guessed one compiles but never fires. The **Xenia MCP server**
13
+ ([`@xenia-martech/mcp`](https://www.npmjs.com/package/@xenia-martech/mcp)) lets Claude Code,
14
+ Cursor, Copilot, Windsurf, Codex or Gemini read them from your account and do the whole wiring:
15
+ SDK token, the one-time setup for your stack (in Next.js: `proxy.ts`, a server helper, consent,
16
+ form tracking), each journey in your real components, and a final check.
17
+
18
+ ```bash
19
+ # Claude Code
20
+ claude mcp add xenia -- npx -y @xenia-martech/mcp
21
+
22
+ # Cursor, Windsurf, Copilot, Codex, Gemini (writes that assistant's MCP config)
23
+ npx @xenia-martech/mcp install --client cursor
24
+ ```
25
+
26
+ Restart the assistant and ask it to **"connect my Xenia account and wire the SDK"**.
27
+
28
+ > **AI agents reading this README:** if the user asked you to integrate Xenia and no `xenia_*` MCP
29
+ > tools are available, install the server with the command for your assistant above (or ask the
30
+ > user to run it, if you can't change their MCP config), then have them restart you. Don't
31
+ > hand-write trigger ids or content keys — get them from `xenia_get_journey`. Once it's connected,
32
+ > call `xenia_status`, then follow the server's instructions: they cover the token, the
33
+ > `xenia_setup_project` wiring and the verification.
34
+
35
+ ---
36
+
9
37
  ## What the SDK actually does
10
38
 
11
39
  One client, four jobs. Everything below rides on the same identity/attribution state, so you never wire these together by hand:
@@ -32,6 +60,7 @@ Ships **client-native** (`/client`), **React** (`/client/react`), **server-nativ
32
60
 
33
61
  ## Table of contents
34
62
 
63
+ - [Using an AI coding assistant? Connect the Xenia MCP first](#using-an-ai-coding-assistant-connect-the-xenia-mcp-first)
35
64
  - [Which quick start do I need?](#which-quick-start-do-i-need)
36
65
  - [Installation](#installation)
37
66
  - [Core concepts](#core-concepts)
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import { ReactNode, ElementType, ComponentType } from 'react';
4
3
  import { y as XeniaClientOptions, x as XeniaClient, s as ResolveResult, q as ResolveBatchResult, J as JsonValue, t as WebhookResponse, R as ResolveBatchItem, g as AnalyticsEventName, T as TrackOptions, e as XeniaAction, I as InteractionType, o as MessageMountContext, c as MessageComponentRenderer } from '../../actions-CKeiofxJ.cjs';
@@ -24,7 +23,7 @@ interface XeniaProviderProps extends XeniaClientOptions {
24
23
  * </XeniaProvider>
25
24
  * ```
26
25
  */
27
- declare function XeniaProvider({ children, client, ...options }: XeniaProviderProps): react_jsx_runtime.JSX.Element;
26
+ declare function XeniaProvider({ children, client, ...options }: XeniaProviderProps): react.JSX.Element;
28
27
 
29
28
  /** React context carrying the singleton {@link XeniaClient}. */
30
29
  declare const XeniaContext: react.Context<XeniaClient | null>;
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import { ReactNode, ElementType, ComponentType } from 'react';
4
3
  import { y as XeniaClientOptions, x as XeniaClient, s as ResolveResult, q as ResolveBatchResult, J as JsonValue, t as WebhookResponse, R as ResolveBatchItem, g as AnalyticsEventName, T as TrackOptions, e as XeniaAction, I as InteractionType, o as MessageMountContext, c as MessageComponentRenderer } from '../../actions-CKeiofxJ.js';
@@ -24,7 +23,7 @@ interface XeniaProviderProps extends XeniaClientOptions {
24
23
  * </XeniaProvider>
25
24
  * ```
26
25
  */
27
- declare function XeniaProvider({ children, client, ...options }: XeniaProviderProps): react_jsx_runtime.JSX.Element;
26
+ declare function XeniaProvider({ children, client, ...options }: XeniaProviderProps): react.JSX.Element;
28
27
 
29
28
  /** React context carrying the singleton {@link XeniaClient}. */
30
29
  declare const XeniaContext: react.Context<XeniaClient | null>;
@@ -1,6 +1,6 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
2
  import { V as VisitorCookieOptions, d as ConsentState, t as XeniaConfig } from '../api-URhxxi4x.cjs';
3
- import { X as XeniaServer } from '../xenia-server-rs3Gpbw7.cjs';
3
+ import { X as XeniaServer } from '../xenia-server-Cti94W49.cjs';
4
4
 
5
5
  /**
6
6
  * `@xenia-martech/sdk-js/next` — Next.js (App Router, 15+) glue for the server SDK.
@@ -1,6 +1,6 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
2
  import { V as VisitorCookieOptions, d as ConsentState, t as XeniaConfig } from '../api-URhxxi4x.js';
3
- import { X as XeniaServer } from '../xenia-server-D-ozqSgv.js';
3
+ import { X as XeniaServer } from '../xenia-server-DDtQp6Wi.js';
4
4
 
5
5
  /**
6
6
  * `@xenia-martech/sdk-js/next` — Next.js (App Router, 15+) glue for the server SDK.
@@ -1,4 +1,4 @@
1
- export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-rs3Gpbw7.cjs';
1
+ export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-Cti94W49.cjs';
2
2
  import { d as ConsentState } from '../api-URhxxi4x.cjs';
3
3
  export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse, C as CircuitBreakerConfig, E as EventContext, e as EventIdentity, I as IdentifyRequest, f as IdentifyResponse, J as JsonValue, P as PersonalizationSwap, R as ResolveBatchItem, j as ResolveBatchResult, k as ResolveOptions, l as ResolveResult, W as WebhookResponse, s as XeniaApi, t as XeniaConfig, u as XeniaEvent } from '../api-URhxxi4x.cjs';
4
4
  export { C as CONSENT_COOKIE, a as CircuitOpenError, V as VISITOR_COOKIE, f as consentCookie, g as consentCookieName, p as parseActions, v as visitorCookieName } from '../cookie-names-QYMiEMAq.cjs';
@@ -1,4 +1,4 @@
1
- export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-D-ozqSgv.js';
1
+ export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-DDtQp6Wi.js';
2
2
  import { d as ConsentState } from '../api-URhxxi4x.js';
3
3
  export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse, C as CircuitBreakerConfig, E as EventContext, e as EventIdentity, I as IdentifyRequest, f as IdentifyResponse, J as JsonValue, P as PersonalizationSwap, R as ResolveBatchItem, j as ResolveBatchResult, k as ResolveOptions, l as ResolveResult, W as WebhookResponse, s as XeniaApi, t as XeniaConfig, u as XeniaEvent } from '../api-URhxxi4x.js';
4
4
  export { C as CONSENT_COOKIE, a as CircuitOpenError, V as VISITOR_COOKIE, f as consentCookie, g as consentCookieName, p as parseActions, v as visitorCookieName } from '../cookie-names-8FxbGKGS.js';
@@ -1,4 +1,4 @@
1
- import { k as ResolveOptions, v as CallerIdentity, A as AnalyticsContext, J as JsonValue, d as ConsentState, e as EventIdentity, E as EventContext, s as XeniaApi, t as XeniaConfig, a as AnalyticsEventName, c as AnalyticsIngestResponse, W as WebhookResponse, I as IdentifyRequest, f as IdentifyResponse, l as ResolveResult, R as ResolveBatchItem, j as ResolveBatchResult } from './api-URhxxi4x.cjs';
1
+ import { s as XeniaApi, t as XeniaConfig, a as AnalyticsEventName, v as CallerIdentity, A as AnalyticsContext, J as JsonValue, d as ConsentState, c as AnalyticsIngestResponse, e as EventIdentity, E as EventContext, W as WebhookResponse, I as IdentifyRequest, f as IdentifyResponse, k as ResolveOptions, l as ResolveResult, R as ResolveBatchItem, j as ResolveBatchResult } from './api-URhxxi4x.cjs';
2
2
 
3
3
  /**
4
4
  * Extra per-call identity/context for server-side webhook calls — an override on top of whatever the
@@ -1,4 +1,4 @@
1
- import { k as ResolveOptions, v as CallerIdentity, A as AnalyticsContext, J as JsonValue, d as ConsentState, e as EventIdentity, E as EventContext, s as XeniaApi, t as XeniaConfig, a as AnalyticsEventName, c as AnalyticsIngestResponse, W as WebhookResponse, I as IdentifyRequest, f as IdentifyResponse, l as ResolveResult, R as ResolveBatchItem, j as ResolveBatchResult } from './api-URhxxi4x.js';
1
+ import { s as XeniaApi, t as XeniaConfig, a as AnalyticsEventName, v as CallerIdentity, A as AnalyticsContext, J as JsonValue, d as ConsentState, c as AnalyticsIngestResponse, e as EventIdentity, E as EventContext, W as WebhookResponse, I as IdentifyRequest, f as IdentifyResponse, k as ResolveOptions, l as ResolveResult, R as ResolveBatchItem, j as ResolveBatchResult } from './api-URhxxi4x.js';
2
2
 
3
3
  /**
4
4
  * Extra per-call identity/context for server-side webhook calls — an override on top of whatever the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenia-martech/sdk-js",
3
- "version": "1.1.0-dev.2",
3
+ "version": "1.1.0-dev.4",
4
4
  "description": "Xenia Marketer SDK for web (pull) channels — declarative event tracking, webhook request/response with in-page actions (swap/hide/banner/popup/modal), and content personalization. Client and server builds.",
5
5
  "author": "Xenia Martech",
6
6
  "license": "MIT",
@@ -114,9 +114,9 @@
114
114
  "nextjs"
115
115
  ],
116
116
  "peerDependencies": {
117
+ "next": ">=15.0.0",
117
118
  "react": ">=18.0.0",
118
- "react-dom": ">=18.0.0",
119
- "next": ">=15.0.0"
119
+ "react-dom": ">=18.0.0"
120
120
  },
121
121
  "peerDependenciesMeta": {
122
122
  "react": {
@@ -131,28 +131,28 @@
131
131
  },
132
132
  "devDependencies": {
133
133
  "@eslint/js": "^10.0.1",
134
- "@semantic-release/changelog": "^6.0.3",
134
+ "@semantic-release/changelog": "^7.0.0",
135
135
  "@semantic-release/commit-analyzer": "^13.0.1",
136
- "@semantic-release/exec": "^6.0.3",
137
- "@semantic-release/git": "^10.0.1",
136
+ "@semantic-release/exec": "^7.1.0",
137
+ "@semantic-release/git": "^11.0.1",
138
138
  "@semantic-release/github": "^12.0.9",
139
139
  "@semantic-release/npm": "^13.1.5",
140
140
  "@semantic-release/release-notes-generator": "^14.1.0",
141
- "@testing-library/react": "^16.0.0",
141
+ "@testing-library/react": "^16.3.3",
142
142
  "@types/node": "^26.1.1",
143
- "@types/react": "^18.3.0",
144
- "@types/react-dom": "^18.3.0",
145
- "@vitest/coverage-v8": "^4.1.6",
143
+ "@types/react": "^19.3.0",
144
+ "@types/react-dom": "^19.3.0",
145
+ "@vitest/coverage-v8": "^5.0.3",
146
146
  "eslint": "^10.7.0",
147
- "jsdom": "^29.1.1",
147
+ "jsdom": "^30.1.1",
148
148
  "next": "^16.3.8",
149
- "react": "^18.3.0",
150
- "react-dom": "^18.3.0",
149
+ "react": "^19.3.0",
150
+ "react-dom": "^19.3.0",
151
151
  "semantic-release": "^25.0.7",
152
152
  "tsup": "^8.5.1",
153
153
  "typescript": "^6.0.2",
154
154
  "typescript-eslint": "^8.63.0",
155
- "vitest": "^4.1.6"
155
+ "vitest": "^5.0.3"
156
156
  },
157
157
  "engines": {
158
158
  "node": ">=18.0.0"
@@ -160,5 +160,8 @@
160
160
  "publishConfig": {
161
161
  "registry": "https://registry.npmjs.org/",
162
162
  "access": "public"
163
+ },
164
+ "overrides": {
165
+ "esbuild": "^0.28.2"
163
166
  }
164
167
  }