create-ailk 0.26.0 → 0.27.0

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.
Files changed (34) hide show
  1. package/README.md +2 -2
  2. package/dist/module-architecture.js +2 -0
  3. package/dist/surfaces.js +7 -2
  4. package/dist/update.js +52 -2
  5. package/package.json +3 -3
  6. package/templates/.env.example +7 -0
  7. package/templates/CLAUDE.md +20 -20
  8. package/templates/README.md +19 -19
  9. package/templates/apps/api/.env.example +7 -0
  10. package/templates/apps/api/CLAUDE.md +21 -5
  11. package/templates/apps/api/vercel.json +7 -1
  12. package/templates/apps/web/.env.example +13 -0
  13. package/templates/apps/web/CLAUDE.md +13 -6
  14. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +24 -1
  15. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +51 -0
  16. package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +13 -0
  17. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +10 -4
  18. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +197 -4
  19. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +23 -7
  20. package/templates/apps/web/app/[locale]/layout.tsx +15 -0
  21. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +118 -0
  22. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +14 -0
  23. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +51 -0
  24. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +13 -0
  25. package/templates/apps/web/lib/__tests__/relay.test.ts +289 -1
  26. package/templates/apps/web/lib/hub-session/__tests__/sign-in-gate.test.tsx +22 -2
  27. package/templates/apps/web/lib/hub-session/sign-in-gate.tsx +11 -8
  28. package/templates/apps/web/lib/relay.ts +116 -1
  29. package/templates/apps/web/lib/sign-up-agreements.ts +17 -6
  30. package/templates/apps/web/messages/en.json +86 -1
  31. package/templates/apps/web/middleware.ts +8 -1
  32. package/templates/apps/web/next.config.mjs +9 -1
  33. package/templates/apps/web/package.json +2 -1
  34. package/versions.json +47 -47
@@ -1058,7 +1058,8 @@
1058
1058
  "site": "Site",
1059
1059
  "team": "Team",
1060
1060
  "magnets": "Magnets",
1061
- "meetings": "Meetings"
1061
+ "meetings": "Meetings",
1062
+ "integrations": "Integrations"
1062
1063
  },
1063
1064
  "general": {
1064
1065
  "heading": "General",
@@ -1250,6 +1251,90 @@
1250
1251
  "privateOffToast": "Private: off for {title}",
1251
1252
  "errorToast": "Couldn't update"
1252
1253
  }
1254
+ },
1255
+ "integrations": {
1256
+ "heading": "Integrations",
1257
+ "lead": "Connect the services your site works with.",
1258
+ "slack": {
1259
+ "title": "Slack",
1260
+ "credentialsHeading": "App credentials",
1261
+ "connectedBadge": "Connected",
1262
+ "notConnectedBadge": "Not connected",
1263
+ "lead": "Connect your Slack app so each booked prospect gets a shared channel.",
1264
+ "botTokenLabel": "Bot token",
1265
+ "signingSecretLabel": "Signing secret",
1266
+ "botTokenInvalid": "A bot token starts with xoxb- and holds only letters, digits and hyphens.",
1267
+ "signingSecretInvalid": "A signing secret is 32 to 128 letters and digits.",
1268
+ "scopesLead": "The Slack app needs these bot scopes:",
1269
+ "connect": "Connect Slack",
1270
+ "connecting": "Connecting…",
1271
+ "cancel": "Cancel",
1272
+ "replace": "Replace",
1273
+ "disconnect": "Disconnect",
1274
+ "workspaceName": "Slack workspace",
1275
+ "connectedOn": "Connected",
1276
+ "ownerOnly": "Only the site's owner can change the Slack connection.",
1277
+ "askOwner": "Slack isn't connected. Ask the site's owner to connect it.",
1278
+ "unavailable": "The Slack connection couldn't be read. Try again later.",
1279
+ "tokenRefused": {
1280
+ "tokenRefused": "Slack refused this token. Check it and try again.",
1281
+ "notBotToken": "This isn't a bot token. Copy the Bot User OAuth Token (xoxb-).",
1282
+ "enterpriseInstall": "Enterprise Grid installs aren't supported yet."
1283
+ },
1284
+ "scopesMissing": "The Slack app is missing these scopes:",
1285
+ "paidPlanRequired": "Slack Connect needs a paid Slack plan.",
1286
+ "teamConnectedElsewhere": "This Slack workspace is already connected to another site.",
1287
+ "slackUnreachable": "Slack couldn't be reached. Try again in a moment.",
1288
+ "connectFailed": "Couldn't connect Slack. Try again.",
1289
+ "disconnectFailed": "Couldn't disconnect Slack. Try again.",
1290
+ "confirmReplace": {
1291
+ "title": "Replace the Slack connection?",
1292
+ "description": "Prospect channels will open in the new Slack workspace.",
1293
+ "action": "Replace"
1294
+ },
1295
+ "confirmDisconnect": {
1296
+ "title": "Disconnect Slack?",
1297
+ "description": "New bookings will stop opening prospect channels until Slack is connected again.",
1298
+ "action": "Disconnect"
1299
+ }
1300
+ },
1301
+ "prospectChannel": {
1302
+ "heading": "Prospect channels",
1303
+ "lead": "Open a shared Slack channel with each prospect who books a meeting.",
1304
+ "enabled": "Open a channel for each booking",
1305
+ "members": "Members",
1306
+ "ownerAlwaysInvited": "The site's owner is always invited. Add anyone else by Slack member id.",
1307
+ "addMemberLabel": "Slack member id",
1308
+ "addMember": "Add",
1309
+ "removeMember": "Remove {memberId}",
1310
+ "welcomeTemplate": "Welcome message",
1311
+ "welcomeDefaultNote": "Leave blank to send the default welcome.",
1312
+ "mergeFieldsHeading": "Merge fields",
1313
+ "mergeFields": {
1314
+ "firstName": "The prospect's first name",
1315
+ "hostName": "The host's name",
1316
+ "callTime": "The meeting's time",
1317
+ "interest": "What the prospect is interested in",
1318
+ "timeline": "The prospect's timeline",
1319
+ "meetingLink": "The meeting link"
1320
+ },
1321
+ "channelPrefix": "Channel name prefix",
1322
+ "archiveDays": "Archive after (days)",
1323
+ "save": "Save",
1324
+ "saving": "Saving…",
1325
+ "saved": "Saved",
1326
+ "saveError": "Couldn't save. Try again.",
1327
+ "slackNotConnected": "Slack isn't connected, so these settings can't be changed.",
1328
+ "connectSlackLink": "Connect Slack",
1329
+ "errors": {
1330
+ "memberIds": "Enter a new Slack member id, like U012AB3CD (up to 50).",
1331
+ "welcomeTemplate": "Use only the merge fields listed, in up to 4,000 characters.",
1332
+ "channelPrefix": "Use lowercase letters, digits, - and _, starting with a letter or digit (up to 21).",
1333
+ "archiveDays": "Enter a whole number of days from 1 to 365."
1334
+ },
1335
+ "unavailableHeadline": "Prospect channel settings couldn't be read",
1336
+ "unavailableDescription": "Reload the page to try again, or come back later."
1337
+ }
1253
1338
  }
1254
1339
  },
1255
1340
  "edit": {
@@ -118,6 +118,13 @@ export function middleware(request: NextRequest): NextResponse {
118
118
  // og-default.png — and each 404'd (#4090 item 4). robots.txt and sitemap.xml are
119
119
  // route handlers rather than public/ files, but they carry extensions too and
120
120
  // are equally not locale-scoped, so the same rule covers them.
121
+ //
122
+ // BotID's proxy prefix (`withBotId`, `botid/next/config`, #9889 D7) is
123
+ // excluded too, exactly that two-segment prefix and nothing wider, so
124
+ // next-intl never rewrites it and the security headers never stamp
125
+ // `frame-ancestors 'none'` on it; `withBotId` sets that prefix's own
126
+ // `X-Frame-Options: SAMEORIGIN` and `frame-ancestors 'self'`.
121
127
  export const config = {
122
- matcher: "/((?!_next/static|_next/image|_next/server|.*\\..*).*)",
128
+ matcher:
129
+ "/((?!_next/static|_next/image|_next/server|149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/|.*\\..*).*)",
123
130
  };
@@ -6,6 +6,7 @@ import { withSentryConfig } from "@sentry/nextjs";
6
6
  import createNextIntlPlugin from "next-intl/plugin";
7
7
  import { legacyRedirects } from "@working-theory/templates/routes";
8
8
  import { parseStealth } from "@working-theory/web-i18n/stealth";
9
+ import { withBotId } from "botid/next/config";
9
10
 
10
11
  // @next/bundle-analyzer — enabled when ANALYZE=true (set by ci-bundle.yml).
11
12
  // analyzerMode 'json' writes .next/analyze/client.json (and nodejs.json,
@@ -197,7 +198,14 @@ const sentryBuildOptions = {
197
198
  : {}),
198
199
  };
199
200
 
201
+ // #9889 D6 — `withBotId` adds BotID's two rewrites (the challenge script and
202
+ // its proxy) and one header rule on its own proxy prefix, which middleware.ts
203
+ // keeps out of its matcher. It is not gated on `AILK_BOOKING_BOT_CHECK`: this
204
+ // config is read at build time, the switch at run time, and an unused rewrite
205
+ // answers nothing. It sits directly inside Sentry so the substrings
206
+ // (the MDX wrap and the next-intl wrap, quoted nowhere else) that create-ailk
207
+ // edits stay intact.
200
208
  export default withSentryConfig(
201
- withBundleAnalyzer(withNextIntl(nextConfig)),
209
+ withBotId(withBundleAnalyzer(withNextIntl(nextConfig))),
202
210
  sentryBuildOptions,
203
211
  );
@@ -37,8 +37,9 @@
37
37
  "@working-theory/validation": "workspace:*",
38
38
  "@working-theory/web-i18n": "workspace:*",
39
39
  "better-auth": "1.6.22",
40
+ "botid": "1.5.11",
40
41
  "lucide-react": "^0.577.0",
41
- "next": "^16.3.8",
42
+ "next": "^16.4.3",
42
43
  "next-intl": "^3.26.3",
43
44
  "next-mdx-remote": "^6.0.0",
44
45
  "pg": "^8.22.0",
package/versions.json CHANGED
@@ -1,66 +1,66 @@
1
1
  {
2
- "@working-theory/admin-ui": "0.48.0",
3
- "@working-theory/aeo": "0.48.0",
4
- "@working-theory/agent-context": "0.48.0",
2
+ "@working-theory/admin-ui": "0.49.0",
3
+ "@working-theory/aeo": "0.49.0",
4
+ "@working-theory/agent-context": "0.49.0",
5
5
  "@working-theory/agent-contract": "0.1.0",
6
6
  "@working-theory/agent-memory": "0.0.0",
7
7
  "@working-theory/ai": "0.1.0",
8
- "@working-theory/analytics": "0.48.0",
9
- "@working-theory/api": "0.48.0",
10
- "@working-theory/api-client": "0.48.0",
8
+ "@working-theory/analytics": "0.49.0",
9
+ "@working-theory/api": "0.49.0",
10
+ "@working-theory/api-client": "0.49.0",
11
11
  "@working-theory/cda-filesystem": "0.0.0",
12
- "@working-theory/cli": "0.48.0",
13
- "@working-theory/common": "0.48.0",
12
+ "@working-theory/cli": "0.49.0",
13
+ "@working-theory/common": "0.49.0",
14
14
  "@working-theory/consent": "0.1.0",
15
- "@working-theory/content-adapters": "0.48.0",
16
- "@working-theory/content-projection": "0.48.0",
17
- "@working-theory/email": "0.48.0",
15
+ "@working-theory/content-adapters": "0.49.0",
16
+ "@working-theory/content-projection": "0.49.0",
17
+ "@working-theory/email": "0.49.0",
18
18
  "@working-theory/env": "0.0.0",
19
- "@working-theory/eslint-config": "0.48.0",
20
- "@working-theory/fumadocs-schema": "0.48.0",
19
+ "@working-theory/eslint-config": "0.49.0",
20
+ "@working-theory/fumadocs-schema": "0.49.0",
21
21
  "@working-theory/ids": "0.16.0",
22
- "@working-theory/jsonld": "0.48.0",
23
- "@working-theory/license": "0.48.0",
24
- "@working-theory/mcp-server": "0.48.0",
25
- "@working-theory/metadata": "0.48.0",
26
- "@working-theory/observability": "0.48.0",
27
- "@working-theory/page-renderer": "0.48.0",
22
+ "@working-theory/jsonld": "0.49.0",
23
+ "@working-theory/license": "0.49.0",
24
+ "@working-theory/mcp-server": "0.49.0",
25
+ "@working-theory/metadata": "0.49.0",
26
+ "@working-theory/observability": "0.49.0",
27
+ "@working-theory/page-renderer": "0.49.0",
28
28
  "@working-theory/plugin-mcp": "0.1.3",
29
- "@working-theory/schema": "0.48.0",
30
- "@working-theory/schema-pack-registry": "0.48.0",
31
- "@working-theory/schema-validator": "0.48.0",
32
- "@working-theory/sections-registry": "0.48.0",
33
- "@working-theory/site-config": "0.48.0",
34
- "@working-theory/spoke-checkout": "0.7.4",
35
- "@working-theory/stripe-client": "0.48.0",
36
- "@working-theory/templates": "0.48.0",
37
- "@working-theory/theme": "0.48.0",
38
- "@working-theory/ui": "0.48.0",
39
- "@working-theory/validation": "0.48.0",
40
- "@working-theory/web-i18n": "0.48.0",
41
- "@working-theory/admin": "0.5.0",
42
- "@working-theory/api-commerce": "0.1.2",
43
- "@working-theory/api-content-write": "0.1.2",
44
- "@working-theory/api-hub": "0.2.1",
45
- "@working-theory/api-multi-tenant": "0.1.2",
46
- "@working-theory/api-scheduling": "0.3.0",
47
- "@working-theory/api-signal-collectors": "0.2.1",
48
- "@working-theory/api-workspace": "0.2.1",
29
+ "@working-theory/schema": "0.49.0",
30
+ "@working-theory/schema-pack-registry": "0.49.0",
31
+ "@working-theory/schema-validator": "0.49.0",
32
+ "@working-theory/sections-registry": "0.49.0",
33
+ "@working-theory/site-config": "0.49.0",
34
+ "@working-theory/spoke-checkout": "0.7.5",
35
+ "@working-theory/stripe-client": "0.49.0",
36
+ "@working-theory/templates": "0.49.0",
37
+ "@working-theory/theme": "0.49.0",
38
+ "@working-theory/ui": "0.49.0",
39
+ "@working-theory/validation": "0.49.0",
40
+ "@working-theory/web-i18n": "0.49.0",
41
+ "@working-theory/admin": "0.6.0",
42
+ "@working-theory/api-commerce": "0.1.3",
43
+ "@working-theory/api-content-write": "0.1.3",
44
+ "@working-theory/api-hub": "0.3.0",
45
+ "@working-theory/api-multi-tenant": "0.1.3",
46
+ "@working-theory/api-scheduling": "0.4.0",
47
+ "@working-theory/api-signal-collectors": "0.2.2",
48
+ "@working-theory/api-workspace": "0.2.2",
49
49
  "@working-theory/billing-client": "0.0.0",
50
50
  "@working-theory/branding": "0.0.0",
51
51
  "@working-theory/license-client": "0.0.0",
52
52
  "@working-theory/license-manifest": "0.0.0",
53
- "@working-theory/mcp-scheduling": "0.3.1",
54
- "@working-theory/mcp-signal-collectors": "0.2.2",
55
- "@working-theory/mcp-workspace": "0.3.1",
53
+ "@working-theory/mcp-scheduling": "0.3.2",
54
+ "@working-theory/mcp-signal-collectors": "0.2.3",
55
+ "@working-theory/mcp-workspace": "0.3.2",
56
56
  "@working-theory/partner-session": "0.0.0",
57
57
  "@working-theory/preview-protocol": "0.0.0",
58
- "@working-theory/ui-commerce": "0.23.26",
59
- "@working-theory/ui-docs-blog": "0.23.26",
60
- "@working-theory/ui-scheduling": "0.25.0",
61
- "@working-theory/ui-signal-collectors": "0.27.4",
58
+ "@working-theory/ui-commerce": "0.23.27",
59
+ "@working-theory/ui-docs-blog": "0.23.27",
60
+ "@working-theory/ui-scheduling": "0.25.1",
61
+ "@working-theory/ui-signal-collectors": "0.27.5",
62
62
  "@working-theory/web": "0.0.0",
63
63
  "@working-theory/app-api": "1.0.0",
64
64
  "@working-theory/mcp": "0.0.0",
65
- "@working-theory/database": "0.48.0"
65
+ "@working-theory/database": "0.49.0"
66
66
  }