create-ailk 0.32.0 → 0.34.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 (53) hide show
  1. package/README.md +21 -3
  2. package/component-catalog.json +12 -1
  3. package/component-catalog.md +6 -5
  4. package/dist/export-content.d.ts +6 -3
  5. package/dist/export-content.js +82 -11
  6. package/dist/lib/env-catalog.js +4 -0
  7. package/dist/lib/import-mdx.d.ts +111 -0
  8. package/dist/lib/import-mdx.js +648 -46
  9. package/dist/migrate-content.d.ts +3 -1
  10. package/dist/migrate-content.js +52 -1
  11. package/dist/seed-flows.d.ts +1 -1
  12. package/dist/seed-flows.js +9 -4
  13. package/dist/surfaces.js +1 -0
  14. package/package.json +3 -3
  15. package/templates/apps/api/.env.example +11 -0
  16. package/templates/apps/api/CLAUDE.md +7 -5
  17. package/templates/apps/api/src/lib/__mocks__/prisma.ts +13 -0
  18. package/templates/apps/mcp/CLAUDE.md +4 -2
  19. package/templates/apps/web/CLAUDE.md +4 -1
  20. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +28 -0
  21. package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +94 -0
  22. package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +77 -0
  23. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +79 -14
  24. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/hub-mode.test.tsx +7 -0
  25. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-menu.test.tsx +7 -0
  26. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +7 -0
  27. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +21 -0
  28. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +15 -9
  29. package/templates/apps/web/app/[locale]/flows/[slug]/FlowStepperClient.tsx +38 -105
  30. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.invite.test.tsx +72 -58
  31. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/verify.test.tsx +249 -0
  32. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsClient.tsx +164 -20
  33. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/by-result.test.tsx +269 -0
  34. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/score.test.tsx +179 -0
  35. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/page.tsx +108 -40
  36. package/templates/apps/web/app/[locale]/flows/[slug]/verify/page.tsx +153 -0
  37. package/templates/apps/web/app/[locale]/flows/[slug]/verify.actions.ts +151 -0
  38. package/templates/apps/web/app/[locale]/meet/confirmed/BookingHandOff.tsx +1 -1
  39. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +3 -20
  40. package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +2 -9
  41. package/templates/apps/web/auth.ts +22 -6
  42. package/templates/apps/web/lib/__tests__/account-config.test.ts +69 -0
  43. package/templates/apps/web/lib/__tests__/auth-email.test.ts +99 -1
  44. package/templates/apps/web/lib/__tests__/telemetry-scrub.test.ts +20 -0
  45. package/templates/apps/web/lib/account-config.ts +52 -14
  46. package/templates/apps/web/lib/auth-email.ts +87 -5
  47. package/templates/apps/web/lib/mcp-oauth.ts +49 -6
  48. package/templates/apps/web/lib/telemetry-scrub.ts +6 -0
  49. package/templates/apps/web/messages/en.json +26 -1
  50. package/templates/database/seed.ts +7 -7
  51. package/versions.json +48 -48
  52. package/templates/apps/web/app/[locale]/thanks/[slug]/AccountInviteLink.tsx +0 -89
  53. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/AccountInviteLink.test.tsx +0 -104
@@ -82,3 +82,23 @@ describe("scrubTelemetryUrl — the /v1/deliverables/<grantId> path (#9162)", ()
82
82
  }
83
83
  });
84
84
  });
85
+
86
+ describe("scrubTelemetryUrl — the email-verification nonce (#10820 D2)", () => {
87
+ it("strips verify=<nonce> from a reported confirm-page URL", () => {
88
+ const nonce = "N".repeat(43);
89
+ const scrubbed = scrubTelemetryUrl(`https://site.example/verify-email?verify=${nonce}`);
90
+ expect(scrubbed).not.toContain(nonce);
91
+ expect(scrubbed.startsWith("https://site.example/verify-email")).toBe(true);
92
+ });
93
+
94
+ it("strips lead= and verify= from a magnet Lead's confirm link (#10826 D5, SEC-10826-7)", () => {
95
+ const nonce = "N".repeat(43);
96
+ const leadId = "lead_01920000-1082-7000-8000-000000000001";
97
+ const scrubbed = scrubTelemetryUrl(
98
+ `https://site.example/flows/growth-check/verify?lead=${leadId}&verify=${nonce}`,
99
+ );
100
+ expect(scrubbed).not.toContain(nonce);
101
+ expect(scrubbed).not.toContain(leadId);
102
+ expect(scrubbed).toBe("https://site.example/flows/growth-check/verify");
103
+ });
104
+ });
@@ -21,7 +21,10 @@
21
21
  // The base contributions (D9, amended 2026-10-01 by D6a/D8a — #7448) use
22
22
  // existing reads only, each with the caller's cookie forwarded (`ctx.init`):
23
23
  //
24
- // - Inbox kind `result` — a row of the All tab.
24
+ // - Inbox kind `result` — a row of the All tab: the waitlist signups above
25
+ // and, where the workspace module is present, the caller's verified
26
+ // submissions to `user` magnets (`member.results`, #10826 D7), each with
27
+ // an Open action back to its results.
25
28
  // - For-you sources `email-unverified` and `payment-due` — needs-you items
26
29
  // with an Open action to User settings' two pages, `/account/general`
27
30
  // and `/account/billing` (#8232 D10), never Inbox rows. Neither read carries the time the condition began, so their time
@@ -109,6 +112,7 @@ import type {
109
112
  MemberMessage,
110
113
  MemberPiece,
111
114
  MemberPurchase,
115
+ MemberResult,
112
116
  } from "@working-theory/validation";
113
117
  import { formatMoney, formatNumber } from "@working-theory/web-i18n";
114
118
  import { cache } from "react";
@@ -149,27 +153,61 @@ function formatWhen(iso: string, locale: string): string {
149
153
 
150
154
  // ── Base Inbox kinds (D9) ─────────────────────────────────────────────────────
151
155
 
152
- const result: AccountInboxKind<WaitlistSignupMeResponse> = {
156
+ /** A `result` row: a waitlist signup, or a submission to a `user` magnet (#10826 D7). */
157
+ type ResultRecord = WaitlistSignupMeResponse | MemberResult;
158
+
159
+ const result: AccountInboxKind<ResultRecord> = {
153
160
  kind: "result",
154
161
  label: "results.heading",
155
162
  section: "updates",
156
163
  async load({ init, user }) {
157
164
  // One failed key fails the kind (D12) — never a partial list passed off as whole.
158
- const signups = await Promise.all(
159
- accountExperimentKeys.map((key) =>
160
- read(waitlistSignups.me(key, init), user),
165
+ // A 404 from the results read (no workspace module) loads none.
166
+ const [signups, results] = await Promise.all([
167
+ Promise.all(
168
+ accountExperimentKeys.map((key) =>
169
+ read(waitlistSignups.me(key, init), user),
170
+ ),
161
171
  ),
162
- );
163
- return signups
164
- .filter((s): s is WaitlistSignupMeResponse => s !== null)
165
- .map((s) => ({
166
- id: s.experimentKey,
167
- title: s.experimentKey,
168
- at: s.completedAt,
169
- data: s,
170
- }));
172
+ read(member.results(init), user),
173
+ ]);
174
+ return [
175
+ ...signups
176
+ .filter((s): s is WaitlistSignupMeResponse => s !== null)
177
+ .map((s) => ({
178
+ id: s.experimentKey,
179
+ title: s.experimentKey,
180
+ at: s.completedAt,
181
+ data: s,
182
+ })),
183
+ ...(results?.items ?? []).map((r) => ({
184
+ id: r.id,
185
+ title: r.title,
186
+ at: r.submittedAt,
187
+ data: r,
188
+ })),
189
+ ];
171
190
  },
172
191
  renderDetail({ data }, { locale, t }) {
192
+ if ("magnetSlug" in data) {
193
+ return {
194
+ actions: [
195
+ {
196
+ key: "open-result",
197
+ label: t("results.open"),
198
+ variant: "default" as const,
199
+ href: localeHref(locale, data.href),
200
+ },
201
+ ],
202
+ fields: {
203
+ heading: t("results.heading"),
204
+ items: [
205
+ { label: t("results.magnet"), value: data.title },
206
+ { label: t("results.submittedAt"), value: formatWhen(data.submittedAt, locale) },
207
+ ],
208
+ },
209
+ };
210
+ }
173
211
  return {
174
212
  fields: {
175
213
  heading: t("results.heading"),
@@ -319,13 +319,30 @@ export function makeSendResetPassword(deps: ResetPasswordDeps) {
319
319
  };
320
320
  }
321
321
 
322
- /** Better Auth's `sendVerificationEmail` (§ D9). */
323
- export function makeSendVerificationEmail(deps: DispatchDeps) {
324
- const { send } = deps;
322
+ interface VerificationDeps extends DispatchDeps {
323
+ /**
324
+ * The site's own confirm page — `new URL("/verify-email", BETTER_AUTH_URL)`
325
+ * — which the API's email-verification service appends its single-use nonce
326
+ * to (#10820 D4).
327
+ */
328
+ confirmBase: string;
329
+ }
330
+
331
+ /**
332
+ * Better Auth's `sendVerificationEmail` (§ D9, #10820 D4).
333
+ *
334
+ * Keeps the library's signature and IGNORES its `url`: that link is Better
335
+ * Auth's stateless JWT, which is neither single-use nor revocable, and its
336
+ * `/verify-email` endpoint is disabled in `auth.ts`. The relay's
337
+ * `email-verification` kind mints the service's own nonce for this user and
338
+ * mails `confirmBase?verify=<nonce>`; a click on that page confirms through
339
+ * `confirmSignUpEmail` below.
340
+ */
341
+ export function makeSendVerificationEmail(deps: VerificationDeps) {
342
+ const { send, confirmBase } = deps;
325
343
  const log = deps.log ?? defaultLog;
326
344
  return async function sendVerificationEmail({
327
345
  user,
328
- url,
329
346
  }: {
330
347
  user: { id: string; email: string };
331
348
  url: string;
@@ -335,7 +352,7 @@ export function makeSendVerificationEmail(deps: DispatchDeps) {
335
352
  kind: "email-verification",
336
353
  userId: user.id,
337
354
  to: user.email,
338
- url,
355
+ url: confirmBase,
339
356
  expiresInMinutes: 24 * 60,
340
357
  },
341
358
  { send, log },
@@ -343,6 +360,71 @@ export function makeSendVerificationEmail(deps: DispatchDeps) {
343
360
  };
344
361
  }
345
362
 
363
+ /** The confirm hop's answer, as the `/verify-email` action reads it. */
364
+ export type SignUpConfirmOutcome =
365
+ | "verified"
366
+ | "already_verified"
367
+ | "expired"
368
+ | "invalid"
369
+ | "failed";
370
+
371
+ /** The confirm hop's transport seam — `authEmail.confirm`'s shape. */
372
+ export type ConfirmTransport = (
373
+ rawBody: string,
374
+ headers: Record<string, string>,
375
+ ) => Promise<{ ok: boolean; body?: unknown }>;
376
+
377
+ const CONFIRM_OUTCOMES = new Set(["verified", "already_verified", "expired", "invalid"]);
378
+
379
+ /**
380
+ * Confirm a sign-up link's nonce through the API's signed hop,
381
+ * `POST /v1/auth/email-verification/confirm` (#10820 D2, D7).
382
+ *
383
+ * ONE serialization of `{ nonce }`, signed over the DOMAIN-SEPARATED base
384
+ * string `email-verification-confirm.<timestamp>.<rawBody>` — so a body signed
385
+ * for the mail relay can never be replayed to the confirm route, or the
386
+ * reverse — and the same bytes handed to the transport.
387
+ *
388
+ * NEVER THROWS, and logs only `{ kind, outcome | errorKind }`: never the
389
+ * nonce, which is the credential. Anything but a 2xx carrying a known outcome
390
+ * is `failed`.
391
+ */
392
+ export async function confirmSignUpEmail(
393
+ nonce: string,
394
+ deps: { confirm?: ConfirmTransport; log?: AuthEmailLog } = {},
395
+ ): Promise<SignUpConfirmOutcome> {
396
+ const confirm: ConfirmTransport =
397
+ deps.confirm ?? ((rawBody, headers) => authEmail.confirm(rawBody, headers));
398
+ const log = deps.log ?? defaultLog;
399
+ const base = { kind: "email-verification-confirm" };
400
+ const secret = process.env.AUTH_EMAIL_WEBHOOK_SECRET;
401
+ if (!secret) {
402
+ log.warn({ ...base, errorKind: "not_configured" });
403
+ return "failed";
404
+ }
405
+ try {
406
+ const rawBody = JSON.stringify({ nonce });
407
+ const timestamp = String(Math.floor(Date.now() / 1000));
408
+ const signature = `sha256=${createHmac("sha256", secret)
409
+ .update(`email-verification-confirm.${timestamp}.${rawBody}`, "utf8")
410
+ .digest("hex")}`;
411
+ const result = await confirm(rawBody, {
412
+ "x-ailk-auth-email-signature": signature,
413
+ "x-ailk-auth-email-timestamp": timestamp,
414
+ });
415
+ const outcome = (result.body as { outcome?: unknown } | null | undefined)?.outcome;
416
+ if (!result.ok || typeof outcome !== "string" || !CONFIRM_OUTCOMES.has(outcome)) {
417
+ log.warn({ ...base, errorKind: "relay_rejected" });
418
+ return "failed";
419
+ }
420
+ log.info({ ...base, outcome });
421
+ return outcome as SignUpConfirmOutcome;
422
+ } catch {
423
+ log.warn({ ...base, errorKind: "transport_error" });
424
+ return "failed";
425
+ }
426
+ }
427
+
346
428
  /**
347
429
  * The completed-reset notice (§ D17).
348
430
  *
@@ -16,7 +16,11 @@
16
16
  * stored-token self-check (`/mcp/token-info`, decision (a): lookup, never
17
17
  * JWKS — D1);
18
18
  * - registration refuses unsafe redirect URIs and metadata and normalises the
19
- * self-claimed client name.
19
+ * self-claimed client name;
20
+ * - one issuer per token (#10912 D4): a server given an `issuerTag` binds
21
+ * `ailk:issuer:<tag>` beside the workspace, and every server's code
22
+ * exchange, refresh and token-info accept only their own tokens — none
23
+ * for a server with no tag, as a site's apps/web has.
20
24
  *
21
25
  * Every refusal is code-shaped: no English string reaches a client. No answer
22
26
  * or log line carries a token, code, verifier or client secret.
@@ -24,6 +28,7 @@
24
28
  import { createHash, timingSafeEqual } from "node:crypto";
25
29
 
26
30
  import {
31
+ ISSUER_SCOPE_PREFIX,
27
32
  lowerRole,
28
33
  MCP_SCOPES,
29
34
  type McpScope,
@@ -31,6 +36,7 @@ import {
31
36
  grantsForWorkspace,
32
37
  parseGrantedScopes,
33
38
  scopesForRole,
39
+ tokenIssuedBy,
34
40
  WORKSPACE_SCOPE_PREFIX,
35
41
  } from "@working-theory/validation";
36
42
  import type { BetterAuthPlugin } from "better-auth";
@@ -58,6 +64,18 @@ export interface McpOAuthDeps {
58
64
  * organization they hold a membership in, with that membership's role.
59
65
  */
60
66
  readMemberships(userId: string): Promise<McpMembership[]>;
67
+ /**
68
+ * Where `/mcp/sign-in` sends the person: the sign-in page URL, given the
69
+ * authorize query (no leading `?`) and the auth secret. Default: the site's
70
+ * `/sign-in?next=` + the encoded `/api/auth/mcp/authorize?<query>` — today's
71
+ * redirect, byte for byte.
72
+ */
73
+ signInLocation?(authorizeQuery: string, secret: string): string;
74
+ /**
75
+ * This server's issuer tag (#10912 D4). Absent: the token carries no issuer
76
+ * entry, and only such tokens are this server's.
77
+ */
78
+ issuerTag?: string;
61
79
  }
62
80
 
63
81
  /** The scopes `/mcp/authorize` accepts a request for. */
@@ -315,6 +333,11 @@ export function mcpOAuthPlugin(deps: McpOAuthDeps) {
315
333
  }
316
334
  }
317
335
 
336
+ /** Whether a token or code's scopes are this server's own (#10912 D4). */
337
+ function ownsScopes(scopes: string | readonly string[]): boolean {
338
+ return tokenIssuedBy(typeof scopes === "string" ? scopes : scopes.join(" "), deps.issuerTag);
339
+ }
340
+
318
341
  async function deleteTokensOf(ctx: Ctx, where: Array<{ field: string; value: string }>): Promise<number> {
319
342
  return ctx.context.adapter.deleteMany({ model: "oauthAccessToken", where });
320
343
  }
@@ -398,16 +421,24 @@ export function mcpOAuthPlugin(deps: McpOAuthDeps) {
398
421
  where: [{ field: "id", value: value.sessionId }],
399
422
  })
400
423
  : null;
401
- if (!approver || new Date(approver.expiresAt) <= new Date()) {
424
+ // And only a code this server's consent minted: another
425
+ // issuer's code is burnt too (#10912 D4).
426
+ if (
427
+ !approver ||
428
+ new Date(approver.expiresAt) <= new Date() ||
429
+ !ownsScopes(value?.scope ?? [])
430
+ ) {
402
431
  if (row) await ctx.context.internalAdapter.deleteVerificationByIdentifier(body.code);
403
432
  throw refuse("BAD_REQUEST", "invalid_grant");
404
433
  }
405
434
  }
406
435
  if (body.grant_type === "refresh_token" && typeof body.refresh_token === "string") {
407
- const live = await ctx.context.adapter.findOne({
436
+ const live = await ctx.context.adapter.findOne<OAuthAccessTokenRow>({
408
437
  model: "oauthAccessToken",
409
438
  where: [{ field: "refreshToken", value: body.refresh_token }],
410
439
  });
440
+ // Another issuer's live line: refused and left alone (#10912 D4).
441
+ if (live && !ownsScopes(live.scopes)) throw refuse("BAD_REQUEST", "invalid_grant");
411
442
  if (!live) {
412
443
  // A rotated refresh token presented again: end the whole line
413
444
  // (RFC 9700 §4.14.2, SEC-10357-04).
@@ -499,8 +530,12 @@ export function mcpOAuthPlugin(deps: McpOAuthDeps) {
499
530
  for (const [key, value] of Object.entries(ctx.query ?? {})) {
500
531
  if (typeof value === "string") params.set(key, value);
501
532
  }
502
- const next = `/api/auth/mcp/authorize?${params.toString()}`;
503
- throw ctx.redirect(`/sign-in?next=${encodeURIComponent(next)}`);
533
+ const query = params.toString();
534
+ throw ctx.redirect(
535
+ deps.signInLocation
536
+ ? deps.signInLocation(query, ctx.context.secret)
537
+ : `/sign-in?next=${encodeURIComponent(`/api/auth/mcp/authorize?${query}`)}`,
538
+ );
504
539
  },
505
540
  ),
506
541
 
@@ -575,7 +610,13 @@ export function mcpOAuthPlugin(deps: McpOAuthDeps) {
575
610
  }
576
611
 
577
612
  // `openid`, `profile` and `email` are never bound: no id_token.
578
- const scope = ["offline_access", ...new Set(chosen), WORKSPACE_SCOPE_PREFIX + workspace.id];
613
+ const scope = [
614
+ "offline_access",
615
+ ...new Set(chosen),
616
+ WORKSPACE_SCOPE_PREFIX + workspace.id,
617
+ // The issuer entry, only on a server that has a tag (#10912 D4).
618
+ ...(deps.issuerTag ? [ISSUER_SCOPE_PREFIX + deps.issuerTag] : []),
619
+ ];
579
620
  const code = generateRandomString(32, "a-z", "A-Z", "0-9");
580
621
  await ctx.context.internalAdapter.updateVerificationByIdentifier(consentCode, {
581
622
  value: JSON.stringify({
@@ -681,6 +722,8 @@ export function mcpOAuthPlugin(deps: McpOAuthDeps) {
681
722
  where: [{ field: "accessToken", value: accessToken }],
682
723
  });
683
724
  if (!row || new Date(row.accessTokenExpiresAt) < new Date() || !row.userId) throw invalid();
725
+ // Another issuer's token answers as an unknown one (#10912 D4).
726
+ if (!ownsScopes(row.scopes)) throw invalid();
684
727
  const { workspaceId } = parseGrantedScopes(row.scopes);
685
728
  if (!workspaceId) throw invalid();
686
729
  const membership = (await deps.readMemberships(row.userId)).find((m) => m.workspaceId === workspaceId);
@@ -19,12 +19,18 @@
19
19
  // Mirrored (duplicated, not shared) in packages/analytics/src/scrub.ts,
20
20
  // since apps/* must not import @working-theory/* packages — keep both lists
21
21
  // in sync (#5613).
22
+ // `verify` joined by #10820 (D2): the email-verification nonce on a
23
+ // `/verify-email` or listing resume link.
24
+ // `lead` joined by #10826 (D5, SEC-10826-7): a magnet Lead's id on its
25
+ // `/flows/<slug>/verify?lead=…&verify=…` confirm link.
22
26
  export const TOKEN_QUERY_PARAMS = [
23
27
  "g",
24
28
  "session_id",
25
29
  "email",
26
30
  "login_hint",
27
31
  "ref",
32
+ "verify",
33
+ "lead",
28
34
  ];
29
35
 
30
36
  // The same grant id rides a PATH too: `deliverables.openGrant` fetches
@@ -80,6 +80,7 @@
80
80
  "heading": "Blog",
81
81
  "emptyState": "No posts yet. Drop MDX files into",
82
82
  "emptyStateTrailing": "to populate this list.",
83
+ "emptyStateLive": "No posts yet.",
83
84
  "allTopics": "All",
84
85
  "topicsNav": "Blog topics",
85
86
  "latestPosts": "Latest posts",
@@ -254,6 +255,20 @@
254
255
  },
255
256
  "questions": {}
256
257
  },
258
+ "flowVerify": {
259
+ "title": "Confirm your email",
260
+ "confirmHeading": "Confirm your email",
261
+ "confirmSubhead": "One click and your address is confirmed.",
262
+ "confirmBody": "Select the button below to confirm this email address.",
263
+ "confirmButton": "Confirm my email",
264
+ "confirmedHeading": "Your email is confirmed",
265
+ "confirmedSubhead": "Thanks — your address is verified.",
266
+ "confirmedBody": "You can close this tab once you're done.",
267
+ "errorHeading": "This confirmation link has expired",
268
+ "errorSubhead": "Confirmation links last 24 hours.",
269
+ "errorBody": "Answer the form again and we'll send you a fresh confirmation email.",
270
+ "back": "Back to the form"
271
+ },
257
272
  "how-to": {
258
273
  "heading": "How-To Guides",
259
274
  "description": "Step-by-step guides for building with this site.",
@@ -665,6 +680,13 @@
665
680
  "verifyExpiredHeading": "This confirmation link has expired",
666
681
  "verifyExpiredSubhead": "Confirmation links last 24 hours.",
667
682
  "verifyExpiredBody": "Sign in again and we'll send you a fresh confirmation email.",
683
+ "confirmHeading": "Confirm your email",
684
+ "confirmSubhead": "One click and your address is confirmed.",
685
+ "confirmBody": "Select the button below to confirm this email address for your account.",
686
+ "confirmButton": "Confirm my email",
687
+ "verifiedHeading": "Your email is confirmed",
688
+ "verifiedSubhead": "Thanks — your address is verified.",
689
+ "verifiedBody": "You can sign in now. You can close this tab once you're done.",
668
690
  "sentHeading": "Check your email",
669
691
  "sentSubhead": "Follow the link we just sent to continue.",
670
692
  "sentBody": "Check your inbox and follow the link to continue. You can close this tab once you're done.",
@@ -969,7 +991,10 @@
969
991
  "tier": "Tier",
970
992
  "score": "Score",
971
993
  "completedAt": "Completed",
972
- "unavailable": "—"
994
+ "unavailable": "—",
995
+ "magnet": "Form",
996
+ "submittedAt": "Submitted",
997
+ "open": "Open"
973
998
  },
974
999
  "purchases": {
975
1000
  "heading": "My purchases",
@@ -149,8 +149,8 @@ export async function provisionDefaultWorkspace(
149
149
  kind: "contact",
150
150
  title: REQUEST_QUOTE_FLOW_TITLE,
151
151
  status: "draft",
152
- customersEnabled: true,
153
- completion: "invite",
152
+ who: "user",
153
+ completion: "user",
154
154
  tags: [STANDARD_MAGNET_TAGS[REQUEST_QUOTE_FLOW_SLUG]!],
155
155
  },
156
156
  update: {},
@@ -171,7 +171,7 @@ export async function provisionDefaultWorkspace(
171
171
  kind: "contact",
172
172
  title: CONTACT_FORM_FLOW_TITLE,
173
173
  status: "live",
174
- customersEnabled: false,
174
+ who: "visitor",
175
175
  completion: "lead",
176
176
  tags: [STANDARD_MAGNET_TAGS[CONTACT_FORM_FLOW_SLUG]!],
177
177
  landingPage: CONTACT_FORM_LANDING_PAGE,
@@ -194,8 +194,8 @@ export async function provisionDefaultWorkspace(
194
194
  kind: "diagnostic",
195
195
  title: JOB_APPLICATION_FLOW_TITLE,
196
196
  status: "live",
197
- customersEnabled: false,
198
- completion: "invite",
197
+ who: "visitor",
198
+ completion: "user",
199
199
  tags: [STANDARD_MAGNET_TAGS[JOB_APPLICATION_FLOW_SLUG]!],
200
200
  landingPage: JOB_APPLICATION_LANDING_PAGE,
201
201
  },
@@ -218,7 +218,7 @@ export async function provisionDefaultWorkspace(
218
218
  kind: "newsletter",
219
219
  title: NEWSLETTER_FLOW_TITLE,
220
220
  status: "live",
221
- customersEnabled: false,
221
+ who: "visitor",
222
222
  completion: "lead",
223
223
  tags: [STANDARD_MAGNET_TAGS[NEWSLETTER_FLOW_SLUG]!],
224
224
  landingPage: NEWSLETTER_LANDING_PAGE,
@@ -242,7 +242,7 @@ export async function provisionDefaultWorkspace(
242
242
  kind: "diagnostic",
243
243
  title: TRIAL_FLOW_TITLE,
244
244
  status: "live",
245
- customersEnabled: false,
245
+ who: "visitor",
246
246
  completion: "lead",
247
247
  tags: [STANDARD_MAGNET_TAGS[TRIAL_FLOW_SLUG]!],
248
248
  landingPage: TRIAL_FLOW_LANDING_PAGE,
package/versions.json CHANGED
@@ -1,66 +1,66 @@
1
1
  {
2
- "@working-theory/admin-ui": "0.55.0",
3
- "@working-theory/aeo": "0.55.0",
4
- "@working-theory/agent-context": "0.55.0",
2
+ "@working-theory/admin-ui": "0.57.0",
3
+ "@working-theory/aeo": "0.57.0",
4
+ "@working-theory/agent-context": "0.57.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.55.0",
9
- "@working-theory/api": "0.55.0",
10
- "@working-theory/api-client": "0.55.0",
8
+ "@working-theory/analytics": "0.57.0",
9
+ "@working-theory/api": "0.57.0",
10
+ "@working-theory/api-client": "0.57.0",
11
11
  "@working-theory/cda-filesystem": "0.0.0",
12
- "@working-theory/cli": "0.55.0",
13
- "@working-theory/common": "0.55.0",
12
+ "@working-theory/cli": "0.57.0",
13
+ "@working-theory/common": "0.57.0",
14
14
  "@working-theory/consent": "0.1.0",
15
- "@working-theory/content-adapters": "0.55.0",
16
- "@working-theory/content-projection": "0.55.0",
17
- "@working-theory/email": "0.55.0",
15
+ "@working-theory/content-adapters": "0.57.0",
16
+ "@working-theory/content-projection": "0.57.0",
17
+ "@working-theory/email": "0.57.0",
18
18
  "@working-theory/env": "0.0.0",
19
- "@working-theory/eslint-config": "0.55.0",
20
- "@working-theory/fumadocs-schema": "0.55.0",
21
- "@working-theory/ids": "0.19.0",
22
- "@working-theory/jsonld": "0.55.0",
23
- "@working-theory/license": "0.55.0",
24
- "@working-theory/mcp-server": "0.55.0",
25
- "@working-theory/metadata": "0.55.0",
26
- "@working-theory/observability": "0.55.0",
27
- "@working-theory/page-renderer": "0.55.0",
19
+ "@working-theory/eslint-config": "0.57.0",
20
+ "@working-theory/fumadocs-schema": "0.57.0",
21
+ "@working-theory/ids": "0.20.0",
22
+ "@working-theory/jsonld": "0.57.0",
23
+ "@working-theory/license": "0.57.0",
24
+ "@working-theory/mcp-server": "0.57.0",
25
+ "@working-theory/metadata": "0.57.0",
26
+ "@working-theory/observability": "0.57.0",
27
+ "@working-theory/page-renderer": "0.57.0",
28
28
  "@working-theory/plugin-mcp": "0.1.3",
29
- "@working-theory/schema": "0.55.0",
30
- "@working-theory/schema-pack-registry": "0.55.0",
31
- "@working-theory/schema-validator": "0.55.0",
32
- "@working-theory/sections-registry": "0.55.0",
33
- "@working-theory/site-config": "0.55.0",
34
- "@working-theory/spoke-checkout": "0.7.11",
35
- "@working-theory/stripe-client": "0.55.0",
36
- "@working-theory/templates": "0.55.0",
37
- "@working-theory/theme": "0.55.0",
38
- "@working-theory/ui": "0.55.0",
39
- "@working-theory/validation": "0.55.0",
40
- "@working-theory/web-i18n": "0.55.0",
41
- "@working-theory/admin": "0.10.1",
42
- "@working-theory/api-commerce": "0.1.9",
43
- "@working-theory/api-content-write": "0.5.1",
44
- "@working-theory/api-hub": "0.4.1",
45
- "@working-theory/api-multi-tenant": "0.2.4",
46
- "@working-theory/api-scheduling": "0.4.6",
47
- "@working-theory/api-signal-collectors": "0.3.2",
48
- "@working-theory/api-workspace": "0.5.1",
29
+ "@working-theory/schema": "0.57.0",
30
+ "@working-theory/schema-pack-registry": "0.57.0",
31
+ "@working-theory/schema-validator": "0.57.0",
32
+ "@working-theory/sections-registry": "0.57.0",
33
+ "@working-theory/site-config": "0.57.0",
34
+ "@working-theory/spoke-checkout": "0.7.13",
35
+ "@working-theory/stripe-client": "0.57.0",
36
+ "@working-theory/templates": "0.57.0",
37
+ "@working-theory/theme": "0.57.0",
38
+ "@working-theory/ui": "0.57.0",
39
+ "@working-theory/validation": "0.57.0",
40
+ "@working-theory/web-i18n": "0.57.0",
41
+ "@working-theory/admin": "0.12.0",
42
+ "@working-theory/api-commerce": "0.1.11",
43
+ "@working-theory/api-content-write": "0.7.0",
44
+ "@working-theory/api-hub": "0.4.3",
45
+ "@working-theory/api-multi-tenant": "0.2.6",
46
+ "@working-theory/api-scheduling": "0.4.8",
47
+ "@working-theory/api-signal-collectors": "0.4.1",
48
+ "@working-theory/api-workspace": "0.7.0",
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.8",
54
- "@working-theory/mcp-signal-collectors": "0.2.9",
55
- "@working-theory/mcp-workspace": "0.6.1",
53
+ "@working-theory/mcp-scheduling": "0.3.10",
54
+ "@working-theory/mcp-signal-collectors": "0.2.11",
55
+ "@working-theory/mcp-workspace": "0.7.0",
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.33",
59
- "@working-theory/ui-docs-blog": "0.23.33",
60
- "@working-theory/ui-scheduling": "0.25.7",
61
- "@working-theory/ui-signal-collectors": "0.27.11",
58
+ "@working-theory/ui-commerce": "0.23.35",
59
+ "@working-theory/ui-docs-blog": "0.23.35",
60
+ "@working-theory/ui-scheduling": "0.25.9",
61
+ "@working-theory/ui-signal-collectors": "0.28.1",
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.55.0"
65
+ "@working-theory/database": "0.57.0"
66
66
  }