@exposify/next 0.0.8 → 0.0.9

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
@@ -182,8 +182,8 @@ reads, and Exposify refreshes the session before supabase-js would. The
182
182
  route reads `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`
183
183
  (or `_ANON_KEY`); pass `aiReady(exposify, { supabase: { url, key } })` to
184
184
  name them, or `supabase: false` to turn it off. The dashboard shows what was
185
- found and has the switch for passwords. `inspect` says which way it went and
186
- why; `npx @exposify/next test-sign-in` signs in on your running app and checks
185
+ found and has the switch for passwords. `inspect` says which way it went
186
+ (`--why` for the reasoning); `npx @exposify/next test-sign-in` signs in on your running app and checks
187
187
  a protected page accepts the cookie. If your `proxy.ts` sends signed-out
188
188
  visitors to the login page (Supabase's starter does), it would send AI
189
189
  assistants there too, before they can sign in: `inspect` warns, and
@@ -204,6 +204,24 @@ minute.
204
204
  Not supported yet: logins in more than one step (SMS codes, email links),
205
205
  and logins that need a CSRF token from your own form page.
206
206
 
207
+ ## Connect your AI assistant
208
+
209
+ With `EXPOSIFY_KEY` set and the broker running, anyone opening your MCP URL in a
210
+ browser gets a page on your domain, in your project's name and sign-in colors,
211
+ with steps for Claude, ChatGPT, Cursor and VS Code, and Claude Code under "For
212
+ developers". There's nothing to add to your code. `GET` requests that accept
213
+ `text/html` get the page; MCP clients never send that, so they're unaffected.
214
+
215
+ Turn it off or change its intro on the project's dashboard page, under "Connect
216
+ page"; the same card shows page opens over 7 days and live connections. Changes
217
+ show within about a minute. Free-tier projects also show "Powered by Exposify".
218
+ The page has no analytics or external scripts; your server tells the broker about
219
+ each open.
220
+
221
+ Your MCP URL answers as it did before when the page is off, when the broker has
222
+ never answered, and when the project has no running broker. That last case
223
+ includes an app with no sign-in method.
224
+
207
225
  ## Pages
208
226
 
209
227
  Every App Router page is a read tool too, so an app whose server components
@@ -350,9 +368,10 @@ instead of booting the app.
350
368
 
351
369
  Server Actions get their own rows:
352
370
 
353
- - `inspect` lists each action with whether it's a tool and why, its status
354
- (input known, input partly unknown, or flagged as sign-in/out or taking a
355
- file), the forms that submit to it, and what the scan couldn't tell. Where
371
+ - `inspect` lists each action with whether it's a tool; add `--why` for the
372
+ reason on each, its status (input known, input partly unknown, or flagged as
373
+ sign-in/out or taking a file), the forms that submit to it, and what the scan
374
+ couldn't tell. Where
356
375
  an input you wrote no longer matches the code (a field the action now
357
376
  reads, an option the form dropped), it says so, and `inspect --check` fails
358
377
  on it in CI. The `inspect --snapshot` file includes action tools, by their
package/dist/index.cjs CHANGED
@@ -1320,6 +1320,13 @@ function aiReady(manifest, options = {}) {
1320
1320
  }
1321
1321
  const actionKey = actionUrl?.exec(pathname)?.[1];
1322
1322
  if (actionKey !== void 0) return serveAction(req, decodeURIComponent(actionKey));
1323
+ const hosted = (0, import_core.hostedResolverInfo)(cfg.auth);
1324
+ if (hosted && (0, import_core.wantsConnectPage)(req) && !pathname.endsWith(PRM_SUFFIX)) {
1325
+ const pub = new URL((0, import_core.publicRequestUrl)(req.url, req.headers));
1326
+ const derived = `${pub.origin}${pub.pathname}`;
1327
+ const page = await (0, import_core.serveConnectPage)(req, hosted, hosted.resource ?? brokerGate?.resourceFor(derived) ?? derived);
1328
+ if (page) return page;
1329
+ }
1323
1330
  if (req.headers.has(DISPATCH_HEADER)) {
1324
1331
  return Response.json({ error: "a tool call can't call the MCP endpoint itself" }, { status: 508 });
1325
1332
  }
package/dist/index.js CHANGED
@@ -19,6 +19,8 @@ import {
19
19
  fieldKind,
20
20
  handleLoginPage,
21
21
  hostedResolverInfo,
22
+ serveConnectPage,
23
+ wantsConnectPage,
22
24
  loginResultFromResponse,
23
25
  keepFailedCookies,
24
26
  readStep,
@@ -1334,6 +1336,13 @@ function aiReady(manifest, options = {}) {
1334
1336
  }
1335
1337
  const actionKey = actionUrl?.exec(pathname)?.[1];
1336
1338
  if (actionKey !== void 0) return serveAction(req, decodeURIComponent(actionKey));
1339
+ const hosted = hostedResolverInfo(cfg.auth);
1340
+ if (hosted && wantsConnectPage(req) && !pathname.endsWith(PRM_SUFFIX)) {
1341
+ const pub = new URL(publicRequestUrl(req.url, req.headers));
1342
+ const derived = `${pub.origin}${pub.pathname}`;
1343
+ const page = await serveConnectPage(req, hosted, hosted.resource ?? brokerGate?.resourceFor(derived) ?? derived);
1344
+ if (page) return page;
1345
+ }
1337
1346
  if (req.headers.has(DISPATCH_HEADER)) {
1338
1347
  return Response.json({ error: "a tool call can't call the MCP endpoint itself" }, { status: 508 });
1339
1348
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exposify/next",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/parser": "^8.0.0",
35
- "@exposify/cli": "0.0.7",
36
- "@exposify/core": "0.3.17",
35
+ "@exposify/cli": "0.0.8",
36
+ "@exposify/core": "0.3.18",
37
37
  "tinyglobby": "^0.2.10",
38
38
  "zod": "^3.24.0"
39
39
  },