integrate-sdk 0.7.2 → 0.7.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.
@@ -138,7 +138,7 @@ class OAuthHandler {
138
138
  return data;
139
139
  }
140
140
  async handleToolCall(request, authHeader) {
141
- const url = new URL("/tools/call", this.serverUrl);
141
+ const url = this.serverUrl;
142
142
  const headers = this.getHeaders({
143
143
  "Content-Type": "application/json"
144
144
  });
@@ -154,7 +154,7 @@ class OAuthHandler {
154
154
  arguments: request.arguments || {}
155
155
  }
156
156
  };
157
- const response = await fetch(url.toString(), {
157
+ const response = await fetch(url, {
158
158
  method: "POST",
159
159
  headers,
160
160
  body: JSON.stringify(jsonRpcRequest)
@@ -138,7 +138,7 @@ class OAuthHandler {
138
138
  return data;
139
139
  }
140
140
  async handleToolCall(request, authHeader) {
141
- const url = new URL("/tools/call", this.serverUrl);
141
+ const url = this.serverUrl;
142
142
  const headers = this.getHeaders({
143
143
  "Content-Type": "application/json"
144
144
  });
@@ -154,7 +154,7 @@ class OAuthHandler {
154
154
  arguments: request.arguments || {}
155
155
  }
156
156
  };
157
- const response = await fetch(url.toString(), {
157
+ const response = await fetch(url, {
158
158
  method: "POST",
159
159
  headers,
160
160
  body: JSON.stringify(jsonRpcRequest)
@@ -138,7 +138,7 @@ class OAuthHandler {
138
138
  return data;
139
139
  }
140
140
  async handleToolCall(request, authHeader) {
141
- const url = new URL("/tools/call", this.serverUrl);
141
+ const url = this.serverUrl;
142
142
  const headers = this.getHeaders({
143
143
  "Content-Type": "application/json"
144
144
  });
@@ -154,7 +154,7 @@ class OAuthHandler {
154
154
  arguments: request.arguments || {}
155
155
  }
156
156
  };
157
- const response = await fetch(url.toString(), {
157
+ const response = await fetch(url, {
158
158
  method: "POST",
159
159
  headers,
160
160
  body: JSON.stringify(jsonRpcRequest)
@@ -138,7 +138,7 @@ class OAuthHandler {
138
138
  return data;
139
139
  }
140
140
  async handleToolCall(request, authHeader) {
141
- const url = new URL("/tools/call", this.serverUrl);
141
+ const url = this.serverUrl;
142
142
  const headers = this.getHeaders({
143
143
  "Content-Type": "application/json"
144
144
  });
@@ -154,7 +154,7 @@ class OAuthHandler {
154
154
  arguments: request.arguments || {}
155
155
  }
156
156
  };
157
- const response = await fetch(url.toString(), {
157
+ const response = await fetch(url, {
158
158
  method: "POST",
159
159
  headers,
160
160
  body: JSON.stringify(jsonRpcRequest)
@@ -138,7 +138,7 @@ class OAuthHandler {
138
138
  return data;
139
139
  }
140
140
  async handleToolCall(request, authHeader) {
141
- const url = new URL("/tools/call", this.serverUrl);
141
+ const url = this.serverUrl;
142
142
  const headers = this.getHeaders({
143
143
  "Content-Type": "application/json"
144
144
  });
@@ -154,7 +154,7 @@ class OAuthHandler {
154
154
  arguments: request.arguments || {}
155
155
  }
156
156
  };
157
- const response = await fetch(url.toString(), {
157
+ const response = await fetch(url, {
158
158
  method: "POST",
159
159
  headers,
160
160
  body: JSON.stringify(jsonRpcRequest)
@@ -1787,10 +1787,50 @@ function toAstroHandler(baseHandler, options) {
1787
1787
  return wrappedHandler(ctx.request, { params: { all: ctx.params.all } });
1788
1788
  };
1789
1789
  }
1790
- function toSolidStartHandler(baseHandler, options) {
1791
- const wrappedHandler = toAstroHandler(baseHandler, options);
1790
+ function toSolidStartHandler(handlerOrOptions, redirectOptions) {
1791
+ if (typeof handlerOrOptions === "function") {
1792
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
1793
+ const handler2 = async (event) => {
1794
+ return wrappedHandler({ request: event.request, params: {} });
1795
+ };
1796
+ return {
1797
+ GET: handler2,
1798
+ POST: handler2,
1799
+ PATCH: handler2,
1800
+ PUT: handler2,
1801
+ DELETE: handler2
1802
+ };
1803
+ }
1804
+ const options = handlerOrOptions;
1805
+ if (!options.providers || Object.keys(options.providers).length === 0) {
1806
+ throw new Error("toSolidStartHandler requires either a handler function or a providers config object");
1807
+ }
1808
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
1809
+ const nextHandler = createNextOAuthHandler({
1810
+ providers,
1811
+ serverUrl,
1812
+ apiKey
1813
+ });
1814
+ const routes = nextHandler.toNextJsHandler({
1815
+ redirectUrl: redirectUrl || "/",
1816
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
1817
+ });
1792
1818
  const handler = async (event) => {
1793
- return wrappedHandler({ request: event.request, params: {} });
1819
+ const method = event.request.method.toUpperCase();
1820
+ const url = new URL(event.request.url);
1821
+ const pathParts = url.pathname.split("/").filter(Boolean);
1822
+ const integrateIndex = pathParts.indexOf("integrate");
1823
+ const segments = integrateIndex >= 0 ? pathParts.slice(integrateIndex + 1) : [];
1824
+ const context = {
1825
+ params: segments
1826
+ };
1827
+ if (method === "POST") {
1828
+ return routes.POST(event.request, { params: { all: context.params } });
1829
+ } else if (method === "GET") {
1830
+ return routes.GET(event.request, { params: { all: context.params } });
1831
+ } else {
1832
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
1833
+ }
1794
1834
  };
1795
1835
  return {
1796
1836
  GET: handler,
@@ -1800,11 +1840,41 @@ function toSolidStartHandler(baseHandler, options) {
1800
1840
  DELETE: handler
1801
1841
  };
1802
1842
  }
1803
- function toSvelteKitHandler(baseHandler, options) {
1804
- const wrappedHandler = toAstroHandler(baseHandler, options);
1843
+ function toSvelteKitHandler(handlerOrOptions, redirectOptions) {
1844
+ if (typeof handlerOrOptions === "function") {
1845
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
1846
+ return async (event) => {
1847
+ const all = event.params?.all;
1848
+ return wrappedHandler({ request: event.request, params: { all } });
1849
+ };
1850
+ }
1851
+ const options = handlerOrOptions;
1852
+ if (!options.providers || Object.keys(options.providers).length === 0) {
1853
+ throw new Error("toSvelteKitHandler requires either a handler function or a providers config object");
1854
+ }
1855
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
1856
+ const nextHandler = createNextOAuthHandler({
1857
+ providers,
1858
+ serverUrl,
1859
+ apiKey
1860
+ });
1861
+ const routes = nextHandler.toNextJsHandler({
1862
+ redirectUrl: redirectUrl || "/",
1863
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
1864
+ });
1805
1865
  return async (event) => {
1866
+ const method = event.request.method.toUpperCase();
1806
1867
  const all = event.params?.all;
1807
- return wrappedHandler({ request: event.request, params: { all } });
1868
+ const context = {
1869
+ params: Array.isArray(all) ? all : all ? all.split("/").filter(Boolean) : []
1870
+ };
1871
+ if (method === "POST") {
1872
+ return routes.POST(event.request, { params: { all: context.params } });
1873
+ } else if (method === "GET") {
1874
+ return routes.GET(event.request, { params: { all: context.params } });
1875
+ } else {
1876
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
1877
+ }
1808
1878
  };
1809
1879
  }
1810
1880
  export {
@@ -138,7 +138,7 @@ class OAuthHandler {
138
138
  return data;
139
139
  }
140
140
  async handleToolCall(request, authHeader) {
141
- const url = new URL("/tools/call", this.serverUrl);
141
+ const url = this.serverUrl;
142
142
  const headers = this.getHeaders({
143
143
  "Content-Type": "application/json"
144
144
  });
@@ -154,7 +154,7 @@ class OAuthHandler {
154
154
  arguments: request.arguments || {}
155
155
  }
156
156
  };
157
- const response = await fetch(url.toString(), {
157
+ const response = await fetch(url, {
158
158
  method: "POST",
159
159
  headers,
160
160
  body: JSON.stringify(jsonRpcRequest)
@@ -1787,10 +1787,50 @@ function toAstroHandler(baseHandler, options) {
1787
1787
  return wrappedHandler(ctx.request, { params: { all: ctx.params.all } });
1788
1788
  };
1789
1789
  }
1790
- function toSolidStartHandler(baseHandler, options) {
1791
- const wrappedHandler = toAstroHandler(baseHandler, options);
1790
+ function toSolidStartHandler(handlerOrOptions, redirectOptions) {
1791
+ if (typeof handlerOrOptions === "function") {
1792
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
1793
+ const handler2 = async (event) => {
1794
+ return wrappedHandler({ request: event.request, params: {} });
1795
+ };
1796
+ return {
1797
+ GET: handler2,
1798
+ POST: handler2,
1799
+ PATCH: handler2,
1800
+ PUT: handler2,
1801
+ DELETE: handler2
1802
+ };
1803
+ }
1804
+ const options = handlerOrOptions;
1805
+ if (!options.providers || Object.keys(options.providers).length === 0) {
1806
+ throw new Error("toSolidStartHandler requires either a handler function or a providers config object");
1807
+ }
1808
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
1809
+ const nextHandler = createNextOAuthHandler({
1810
+ providers,
1811
+ serverUrl,
1812
+ apiKey
1813
+ });
1814
+ const routes = nextHandler.toNextJsHandler({
1815
+ redirectUrl: redirectUrl || "/",
1816
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
1817
+ });
1792
1818
  const handler = async (event) => {
1793
- return wrappedHandler({ request: event.request, params: {} });
1819
+ const method = event.request.method.toUpperCase();
1820
+ const url = new URL(event.request.url);
1821
+ const pathParts = url.pathname.split("/").filter(Boolean);
1822
+ const integrateIndex = pathParts.indexOf("integrate");
1823
+ const segments = integrateIndex >= 0 ? pathParts.slice(integrateIndex + 1) : [];
1824
+ const context = {
1825
+ params: segments
1826
+ };
1827
+ if (method === "POST") {
1828
+ return routes.POST(event.request, { params: { all: context.params } });
1829
+ } else if (method === "GET") {
1830
+ return routes.GET(event.request, { params: { all: context.params } });
1831
+ } else {
1832
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
1833
+ }
1794
1834
  };
1795
1835
  return {
1796
1836
  GET: handler,
@@ -1800,11 +1840,41 @@ function toSolidStartHandler(baseHandler, options) {
1800
1840
  DELETE: handler
1801
1841
  };
1802
1842
  }
1803
- function toSvelteKitHandler(baseHandler, options) {
1804
- const wrappedHandler = toAstroHandler(baseHandler, options);
1843
+ function toSvelteKitHandler(handlerOrOptions, redirectOptions) {
1844
+ if (typeof handlerOrOptions === "function") {
1845
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
1846
+ return async (event) => {
1847
+ const all = event.params?.all;
1848
+ return wrappedHandler({ request: event.request, params: { all } });
1849
+ };
1850
+ }
1851
+ const options = handlerOrOptions;
1852
+ if (!options.providers || Object.keys(options.providers).length === 0) {
1853
+ throw new Error("toSvelteKitHandler requires either a handler function or a providers config object");
1854
+ }
1855
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
1856
+ const nextHandler = createNextOAuthHandler({
1857
+ providers,
1858
+ serverUrl,
1859
+ apiKey
1860
+ });
1861
+ const routes = nextHandler.toNextJsHandler({
1862
+ redirectUrl: redirectUrl || "/",
1863
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
1864
+ });
1805
1865
  return async (event) => {
1866
+ const method = event.request.method.toUpperCase();
1806
1867
  const all = event.params?.all;
1807
- return wrappedHandler({ request: event.request, params: { all } });
1868
+ const context = {
1869
+ params: Array.isArray(all) ? all : all ? all.split("/").filter(Boolean) : []
1870
+ };
1871
+ if (method === "POST") {
1872
+ return routes.POST(event.request, { params: { all: context.params } });
1873
+ } else if (method === "GET") {
1874
+ return routes.GET(event.request, { params: { all: context.params } });
1875
+ } else {
1876
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
1877
+ }
1808
1878
  };
1809
1879
  }
1810
1880
 
package/dist/index.js CHANGED
@@ -377,7 +377,7 @@ class OAuthHandler {
377
377
  return data;
378
378
  }
379
379
  async handleToolCall(request, authHeader) {
380
- const url = new URL("/tools/call", this.serverUrl);
380
+ const url = this.serverUrl;
381
381
  const headers = this.getHeaders({
382
382
  "Content-Type": "application/json"
383
383
  });
@@ -393,7 +393,7 @@ class OAuthHandler {
393
393
  arguments: request.arguments || {}
394
394
  }
395
395
  };
396
- const response = await fetch(url.toString(), {
396
+ const response = await fetch(url, {
397
397
  method: "POST",
398
398
  headers,
399
399
  body: JSON.stringify(jsonRpcRequest)
@@ -2282,7 +2282,11 @@ function createMCPServer(config) {
2282
2282
  if (segments.length === 2 && segments[0] === "oauth") {
2283
2283
  action = segments[1];
2284
2284
  } else if (segments.length === 1) {
2285
- action = segments[0];
2285
+ if (segments[0] === "mcp") {
2286
+ action = "mcp";
2287
+ } else {
2288
+ action = segments[0];
2289
+ }
2286
2290
  } else if (segments.length > 0) {
2287
2291
  action = segments[segments.length - 1];
2288
2292
  }
@@ -2299,26 +2303,29 @@ function createMCPServer(config) {
2299
2303
  action = "callback";
2300
2304
  }
2301
2305
  }
2306
+ if (action === "mcp" && method === "POST") {
2307
+ try {
2308
+ const body = await request.json();
2309
+ const authHeader = request.headers.get("authorization");
2310
+ const { OAuthHandler: OAuthHandler2 } = await Promise.resolve().then(() => exports_base_handler);
2311
+ const oauthHandler = new OAuthHandler2({
2312
+ providers,
2313
+ serverUrl: config.serverUrl,
2314
+ apiKey: config.apiKey
2315
+ });
2316
+ const result = await oauthHandler.handleToolCall(body, authHeader);
2317
+ return Response.json(result);
2318
+ } catch (error) {
2319
+ console.error("[MCP Tool Call] Error:", error);
2320
+ return Response.json({ error: error.message || "Failed to execute tool call" }, { status: error.statusCode || 500 });
2321
+ }
2322
+ }
2302
2323
  if (segments.length > 0) {
2303
2324
  if (segments.length === 2 && segments[0] !== "oauth") {
2304
2325
  return Response.json({ error: `Invalid route: /${segments.join("/")}` }, { status: 404 });
2305
2326
  }
2306
- if (segments.length === 1 && segments[0] === "mcp" && method === "POST") {
2307
- try {
2308
- const body = await request.json();
2309
- const authHeader = request.headers.get("authorization");
2310
- const { OAuthHandler: OAuthHandler2 } = await Promise.resolve().then(() => exports_base_handler);
2311
- const oauthHandler = new OAuthHandler2({
2312
- providers,
2313
- serverUrl: config.serverUrl,
2314
- apiKey: config.apiKey
2315
- });
2316
- const result = await oauthHandler.handleToolCall(body, authHeader);
2317
- return Response.json(result);
2318
- } catch (error) {
2319
- console.error("[MCP Tool Call] Error:", error);
2320
- return Response.json({ error: error.message || "Failed to execute tool call" }, { status: error.statusCode || 500 });
2321
- }
2327
+ if (segments.length === 1 && segments[0] === "mcp") {
2328
+ return Response.json({ error: `Method ${method} not allowed for /mcp route. Use POST.` }, { status: 405 });
2322
2329
  }
2323
2330
  }
2324
2331
  if (method === "GET" && action === "callback") {
@@ -2477,10 +2484,50 @@ function toAstroHandler(baseHandler, options) {
2477
2484
  return wrappedHandler(ctx.request, { params: { all: ctx.params.all } });
2478
2485
  };
2479
2486
  }
2480
- function toSolidStartHandler(baseHandler, options) {
2481
- const wrappedHandler = toAstroHandler(baseHandler, options);
2487
+ function toSolidStartHandler(handlerOrOptions, redirectOptions) {
2488
+ if (typeof handlerOrOptions === "function") {
2489
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
2490
+ const handler2 = async (event) => {
2491
+ return wrappedHandler({ request: event.request, params: {} });
2492
+ };
2493
+ return {
2494
+ GET: handler2,
2495
+ POST: handler2,
2496
+ PATCH: handler2,
2497
+ PUT: handler2,
2498
+ DELETE: handler2
2499
+ };
2500
+ }
2501
+ const options = handlerOrOptions;
2502
+ if (!options.providers || Object.keys(options.providers).length === 0) {
2503
+ throw new Error("toSolidStartHandler requires either a handler function or a providers config object");
2504
+ }
2505
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
2506
+ const nextHandler = createNextOAuthHandler({
2507
+ providers,
2508
+ serverUrl,
2509
+ apiKey
2510
+ });
2511
+ const routes = nextHandler.toNextJsHandler({
2512
+ redirectUrl: redirectUrl || "/",
2513
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
2514
+ });
2482
2515
  const handler = async (event) => {
2483
- return wrappedHandler({ request: event.request, params: {} });
2516
+ const method = event.request.method.toUpperCase();
2517
+ const url = new URL(event.request.url);
2518
+ const pathParts = url.pathname.split("/").filter(Boolean);
2519
+ const integrateIndex = pathParts.indexOf("integrate");
2520
+ const segments = integrateIndex >= 0 ? pathParts.slice(integrateIndex + 1) : [];
2521
+ const context = {
2522
+ params: segments
2523
+ };
2524
+ if (method === "POST") {
2525
+ return routes.POST(event.request, { params: { all: context.params } });
2526
+ } else if (method === "GET") {
2527
+ return routes.GET(event.request, { params: { all: context.params } });
2528
+ } else {
2529
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
2530
+ }
2484
2531
  };
2485
2532
  return {
2486
2533
  GET: handler,
@@ -2490,11 +2537,41 @@ function toSolidStartHandler(baseHandler, options) {
2490
2537
  DELETE: handler
2491
2538
  };
2492
2539
  }
2493
- function toSvelteKitHandler(baseHandler, options) {
2494
- const wrappedHandler = toAstroHandler(baseHandler, options);
2540
+ function toSvelteKitHandler(handlerOrOptions, redirectOptions) {
2541
+ if (typeof handlerOrOptions === "function") {
2542
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
2543
+ return async (event) => {
2544
+ const all = event.params?.all;
2545
+ return wrappedHandler({ request: event.request, params: { all } });
2546
+ };
2547
+ }
2548
+ const options = handlerOrOptions;
2549
+ if (!options.providers || Object.keys(options.providers).length === 0) {
2550
+ throw new Error("toSvelteKitHandler requires either a handler function or a providers config object");
2551
+ }
2552
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
2553
+ const nextHandler = createNextOAuthHandler({
2554
+ providers,
2555
+ serverUrl,
2556
+ apiKey
2557
+ });
2558
+ const routes = nextHandler.toNextJsHandler({
2559
+ redirectUrl: redirectUrl || "/",
2560
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
2561
+ });
2495
2562
  return async (event) => {
2563
+ const method = event.request.method.toUpperCase();
2496
2564
  const all = event.params?.all;
2497
- return wrappedHandler({ request: event.request, params: { all } });
2565
+ const context = {
2566
+ params: Array.isArray(all) ? all : all ? all.split("/").filter(Boolean) : []
2567
+ };
2568
+ if (method === "POST") {
2569
+ return routes.POST(event.request, { params: { all: context.params } });
2570
+ } else if (method === "GET") {
2571
+ return routes.GET(event.request, { params: { all: context.params } });
2572
+ } else {
2573
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
2574
+ }
2498
2575
  };
2499
2576
  }
2500
2577
  // src/adapters/svelte-kit.ts
package/dist/oauth.js CHANGED
@@ -143,7 +143,7 @@ class OAuthHandler {
143
143
  return data;
144
144
  }
145
145
  async handleToolCall(request, authHeader) {
146
- const url = new URL("/tools/call", this.serverUrl);
146
+ const url = this.serverUrl;
147
147
  const headers = this.getHeaders({
148
148
  "Content-Type": "application/json"
149
149
  });
@@ -159,7 +159,7 @@ class OAuthHandler {
159
159
  arguments: request.arguments || {}
160
160
  }
161
161
  };
162
- const response = await fetch(url.toString(), {
162
+ const response = await fetch(url, {
163
163
  method: "POST",
164
164
  headers,
165
165
  body: JSON.stringify(jsonRpcRequest)
package/dist/server.js CHANGED
@@ -377,7 +377,7 @@ class OAuthHandler {
377
377
  return data;
378
378
  }
379
379
  async handleToolCall(request, authHeader) {
380
- const url = new URL("/tools/call", this.serverUrl);
380
+ const url = this.serverUrl;
381
381
  const headers = this.getHeaders({
382
382
  "Content-Type": "application/json"
383
383
  });
@@ -393,7 +393,7 @@ class OAuthHandler {
393
393
  arguments: request.arguments || {}
394
394
  }
395
395
  };
396
- const response = await fetch(url.toString(), {
396
+ const response = await fetch(url, {
397
397
  method: "POST",
398
398
  headers,
399
399
  body: JSON.stringify(jsonRpcRequest)
@@ -2108,7 +2108,11 @@ function createMCPServer(config) {
2108
2108
  if (segments.length === 2 && segments[0] === "oauth") {
2109
2109
  action = segments[1];
2110
2110
  } else if (segments.length === 1) {
2111
- action = segments[0];
2111
+ if (segments[0] === "mcp") {
2112
+ action = "mcp";
2113
+ } else {
2114
+ action = segments[0];
2115
+ }
2112
2116
  } else if (segments.length > 0) {
2113
2117
  action = segments[segments.length - 1];
2114
2118
  }
@@ -2125,26 +2129,29 @@ function createMCPServer(config) {
2125
2129
  action = "callback";
2126
2130
  }
2127
2131
  }
2132
+ if (action === "mcp" && method === "POST") {
2133
+ try {
2134
+ const body = await request.json();
2135
+ const authHeader = request.headers.get("authorization");
2136
+ const { OAuthHandler: OAuthHandler2 } = await Promise.resolve().then(() => exports_base_handler);
2137
+ const oauthHandler = new OAuthHandler2({
2138
+ providers,
2139
+ serverUrl: config.serverUrl,
2140
+ apiKey: config.apiKey
2141
+ });
2142
+ const result = await oauthHandler.handleToolCall(body, authHeader);
2143
+ return Response.json(result);
2144
+ } catch (error) {
2145
+ console.error("[MCP Tool Call] Error:", error);
2146
+ return Response.json({ error: error.message || "Failed to execute tool call" }, { status: error.statusCode || 500 });
2147
+ }
2148
+ }
2128
2149
  if (segments.length > 0) {
2129
2150
  if (segments.length === 2 && segments[0] !== "oauth") {
2130
2151
  return Response.json({ error: `Invalid route: /${segments.join("/")}` }, { status: 404 });
2131
2152
  }
2132
- if (segments.length === 1 && segments[0] === "mcp" && method === "POST") {
2133
- try {
2134
- const body = await request.json();
2135
- const authHeader = request.headers.get("authorization");
2136
- const { OAuthHandler: OAuthHandler2 } = await Promise.resolve().then(() => exports_base_handler);
2137
- const oauthHandler = new OAuthHandler2({
2138
- providers,
2139
- serverUrl: config.serverUrl,
2140
- apiKey: config.apiKey
2141
- });
2142
- const result = await oauthHandler.handleToolCall(body, authHeader);
2143
- return Response.json(result);
2144
- } catch (error) {
2145
- console.error("[MCP Tool Call] Error:", error);
2146
- return Response.json({ error: error.message || "Failed to execute tool call" }, { status: error.statusCode || 500 });
2147
- }
2153
+ if (segments.length === 1 && segments[0] === "mcp") {
2154
+ return Response.json({ error: `Method ${method} not allowed for /mcp route. Use POST.` }, { status: 405 });
2148
2155
  }
2149
2156
  }
2150
2157
  if (method === "GET" && action === "callback") {
@@ -2303,10 +2310,50 @@ function toAstroHandler(baseHandler, options) {
2303
2310
  return wrappedHandler(ctx.request, { params: { all: ctx.params.all } });
2304
2311
  };
2305
2312
  }
2306
- function toSolidStartHandler(baseHandler, options) {
2307
- const wrappedHandler = toAstroHandler(baseHandler, options);
2313
+ function toSolidStartHandler(handlerOrOptions, redirectOptions) {
2314
+ if (typeof handlerOrOptions === "function") {
2315
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
2316
+ const handler2 = async (event) => {
2317
+ return wrappedHandler({ request: event.request, params: {} });
2318
+ };
2319
+ return {
2320
+ GET: handler2,
2321
+ POST: handler2,
2322
+ PATCH: handler2,
2323
+ PUT: handler2,
2324
+ DELETE: handler2
2325
+ };
2326
+ }
2327
+ const options = handlerOrOptions;
2328
+ if (!options.providers || Object.keys(options.providers).length === 0) {
2329
+ throw new Error("toSolidStartHandler requires either a handler function or a providers config object");
2330
+ }
2331
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
2332
+ const nextHandler = createNextOAuthHandler({
2333
+ providers,
2334
+ serverUrl,
2335
+ apiKey
2336
+ });
2337
+ const routes = nextHandler.toNextJsHandler({
2338
+ redirectUrl: redirectUrl || "/",
2339
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
2340
+ });
2308
2341
  const handler = async (event) => {
2309
- return wrappedHandler({ request: event.request, params: {} });
2342
+ const method = event.request.method.toUpperCase();
2343
+ const url = new URL(event.request.url);
2344
+ const pathParts = url.pathname.split("/").filter(Boolean);
2345
+ const integrateIndex = pathParts.indexOf("integrate");
2346
+ const segments = integrateIndex >= 0 ? pathParts.slice(integrateIndex + 1) : [];
2347
+ const context = {
2348
+ params: segments
2349
+ };
2350
+ if (method === "POST") {
2351
+ return routes.POST(event.request, { params: { all: context.params } });
2352
+ } else if (method === "GET") {
2353
+ return routes.GET(event.request, { params: { all: context.params } });
2354
+ } else {
2355
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
2356
+ }
2310
2357
  };
2311
2358
  return {
2312
2359
  GET: handler,
@@ -2316,11 +2363,41 @@ function toSolidStartHandler(baseHandler, options) {
2316
2363
  DELETE: handler
2317
2364
  };
2318
2365
  }
2319
- function toSvelteKitHandler(baseHandler, options) {
2320
- const wrappedHandler = toAstroHandler(baseHandler, options);
2366
+ function toSvelteKitHandler(handlerOrOptions, redirectOptions) {
2367
+ if (typeof handlerOrOptions === "function") {
2368
+ const wrappedHandler = toAstroHandler(handlerOrOptions, redirectOptions);
2369
+ return async (event) => {
2370
+ const all = event.params?.all;
2371
+ return wrappedHandler({ request: event.request, params: { all } });
2372
+ };
2373
+ }
2374
+ const options = handlerOrOptions;
2375
+ if (!options.providers || Object.keys(options.providers).length === 0) {
2376
+ throw new Error("toSvelteKitHandler requires either a handler function or a providers config object");
2377
+ }
2378
+ const { providers, serverUrl, apiKey, redirectUrl, errorRedirectUrl } = options;
2379
+ const nextHandler = createNextOAuthHandler({
2380
+ providers,
2381
+ serverUrl,
2382
+ apiKey
2383
+ });
2384
+ const routes = nextHandler.toNextJsHandler({
2385
+ redirectUrl: redirectUrl || "/",
2386
+ errorRedirectUrl: errorRedirectUrl || "/auth-error"
2387
+ });
2321
2388
  return async (event) => {
2389
+ const method = event.request.method.toUpperCase();
2322
2390
  const all = event.params?.all;
2323
- return wrappedHandler({ request: event.request, params: { all } });
2391
+ const context = {
2392
+ params: Array.isArray(all) ? all : all ? all.split("/").filter(Boolean) : []
2393
+ };
2394
+ if (method === "POST") {
2395
+ return routes.POST(event.request, { params: { all: context.params } });
2396
+ } else if (method === "GET") {
2397
+ return routes.GET(event.request, { params: { all: context.params } });
2398
+ } else {
2399
+ return Response.json({ error: `Method ${method} not allowed` }, { status: 405 });
2400
+ }
2324
2401
  };
2325
2402
  }
2326
2403
  export {
@@ -254,13 +254,16 @@ export declare function toAstroHandler(baseHandler: (request: Request, context?:
254
254
  /**
255
255
  * Create SolidStart handler with configurable redirect URLs
256
256
  *
257
- * Wraps the unified handler with redirect URL configuration
257
+ * Supports two usage patterns:
258
+ * 1. Pass a handler function from createMCPServer
259
+ * 2. Pass config object directly (for inline configuration)
258
260
  *
259
- * @param baseHandler - Handler function from createMCPServer
260
- * @param options - Redirect URL configuration
261
+ * @param handlerOrOptions - Handler function from createMCPServer, or config options
262
+ * @param redirectOptions - Redirect URL configuration (when first param is a handler)
261
263
  * @returns Object with GET, POST, PATCH, PUT, DELETE handlers
262
264
  *
263
265
  * @example
266
+ * **Pattern 1: Using handler from createMCPServer (Recommended)**
264
267
  * ```typescript
265
268
  * // lib/integrate-server.ts
266
269
  * import { createMCPServer, githubPlugin } from 'integrate-sdk/server';
@@ -285,13 +288,48 @@ export declare function toAstroHandler(baseHandler: (request: Request, context?:
285
288
  *
286
289
  * export const { GET, POST, PATCH, PUT, DELETE } = handlers;
287
290
  * ```
291
+ *
292
+ * @example
293
+ * **Pattern 2: Inline configuration**
294
+ * ```typescript
295
+ * // src/routes/api/integrate/[...all].ts
296
+ * import { toSolidStartHandler } from 'integrate-sdk/server';
297
+ *
298
+ * const handlers = toSolidStartHandler({
299
+ * providers: {
300
+ * github: {
301
+ * clientId: process.env.GITHUB_CLIENT_ID!,
302
+ * clientSecret: process.env.GITHUB_CLIENT_SECRET!,
303
+ * },
304
+ * },
305
+ * redirectUrl: '/dashboard',
306
+ * errorRedirectUrl: '/auth-error',
307
+ * });
308
+ *
309
+ * export const { GET, POST, PATCH, PUT, DELETE } = handlers;
310
+ * ```
288
311
  */
289
- export declare function toSolidStartHandler(baseHandler: (request: Request, context?: {
312
+ export declare function toSolidStartHandler(handlerOrOptions: ((request: Request, context?: {
290
313
  params?: {
291
314
  action?: string;
292
315
  all?: string | string[];
293
316
  };
294
- }) => Promise<Response>, options?: {
317
+ }) => Promise<Response>) | {
318
+ /** OAuth provider configurations */
319
+ providers?: Record<string, {
320
+ clientId: string;
321
+ clientSecret: string;
322
+ redirectUri?: string;
323
+ }>;
324
+ /** Server URL for MCP server */
325
+ serverUrl?: string;
326
+ /** API key for authentication */
327
+ apiKey?: string;
328
+ /** URL to redirect to after successful OAuth callback (default: '/') */
329
+ redirectUrl?: string;
330
+ /** URL to redirect to on OAuth error (default: '/auth-error') */
331
+ errorRedirectUrl?: string;
332
+ }, redirectOptions?: {
295
333
  /** URL to redirect to after successful OAuth callback (default: '/') */
296
334
  redirectUrl?: string;
297
335
  /** URL to redirect to on OAuth error (default: '/auth-error') */
@@ -316,13 +354,16 @@ export declare function toSolidStartHandler(baseHandler: (request: Request, cont
316
354
  /**
317
355
  * Create SvelteKit handler with configurable redirect URLs
318
356
  *
319
- * Wraps the unified handler with redirect URL configuration
357
+ * Supports two usage patterns:
358
+ * 1. Pass a handler function from createMCPServer
359
+ * 2. Pass config object directly (for inline configuration)
320
360
  *
321
- * @param baseHandler - Handler function from createMCPServer
322
- * @param options - Redirect URL configuration
361
+ * @param handlerOrOptions - Handler function from createMCPServer, or config options
362
+ * @param redirectOptions - Redirect URL configuration (when first param is a handler)
323
363
  * @returns Handler function for SvelteKit routes
324
364
  *
325
365
  * @example
366
+ * **Pattern 1: Using handler from createMCPServer (Recommended)**
326
367
  * ```typescript
327
368
  * // lib/integrate-server.ts
328
369
  * import { createMCPServer, githubPlugin } from 'integrate-sdk/server';
@@ -348,13 +389,49 @@ export declare function toSolidStartHandler(baseHandler: (request: Request, cont
348
389
  * export const POST = svelteKitRoute;
349
390
  * export const GET = svelteKitRoute;
350
391
  * ```
392
+ *
393
+ * @example
394
+ * **Pattern 2: Inline configuration**
395
+ * ```typescript
396
+ * // routes/api/integrate/oauth/[...all]/+server.ts
397
+ * import { toSvelteKitHandler } from 'integrate-sdk/server';
398
+ *
399
+ * const handler = toSvelteKitHandler({
400
+ * providers: {
401
+ * github: {
402
+ * clientId: process.env.GITHUB_CLIENT_ID!,
403
+ * clientSecret: process.env.GITHUB_CLIENT_SECRET!,
404
+ * },
405
+ * },
406
+ * redirectUrl: '/dashboard',
407
+ * errorRedirectUrl: '/auth-error',
408
+ * });
409
+ *
410
+ * export const POST = handler;
411
+ * export const GET = handler;
412
+ * ```
351
413
  */
352
- export declare function toSvelteKitHandler(baseHandler: (request: Request, context?: {
414
+ export declare function toSvelteKitHandler(handlerOrOptions: ((request: Request, context?: {
353
415
  params?: {
354
416
  action?: string;
355
417
  all?: string | string[];
356
418
  };
357
- }) => Promise<Response>, options?: {
419
+ }) => Promise<Response>) | {
420
+ /** OAuth provider configurations */
421
+ providers?: Record<string, {
422
+ clientId: string;
423
+ clientSecret: string;
424
+ redirectUri?: string;
425
+ }>;
426
+ /** Server URL for MCP server */
427
+ serverUrl?: string;
428
+ /** API key for authentication */
429
+ apiKey?: string;
430
+ /** URL to redirect to after successful OAuth callback (default: '/') */
431
+ redirectUrl?: string;
432
+ /** URL to redirect to on OAuth error (default: '/auth-error') */
433
+ errorRedirectUrl?: string;
434
+ }, redirectOptions?: {
358
435
  /** URL to redirect to after successful OAuth callback (default: '/') */
359
436
  redirectUrl?: string;
360
437
  /** URL to redirect to on OAuth error (default: '/auth-error') */
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA8CpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,eAAe,CAAC,QAAQ,SAAS,SAAS,SAAS,EAAE,EACnE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC;IA0Q/B,2DAA2D;;IAG3D,4DAA4D;;;;;;;;IAG5D,2DAA2D;;;;;;;;IAG3D,oEAAoE;uBApL3D,OAAO,YACN;QAAE,MAAM,CAAC,EAAE;YAAE,MAAM,CAAC,EAAE,MAAM,CAAC;YAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,KAClE,OAAO,CAAC,QAAQ,CAAC;EAqLrB;AAYD,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI,GACf,KAA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AC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,GAC9G;IACA,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;IACH,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,EACH,eAAe,CAAC,EAAE;IAChB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,WAMsB,GAAG,KAAG,OAAO,CAAC,QAAQ,CAAC,CAmD/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "integrate-sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Type-safe 3rd party integration SDK for the Integrate MCP server",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",