@superblocksteam/vite-plugin-file-sync 2.0.116-next.0 → 2.0.116-next.2

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 (95) hide show
  1. package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts.map +1 -1
  2. package/dist/ai-service/agent/prompts/build-base-system-prompt.js +15 -4
  3. package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
  4. package/dist/ai-service/agent/tools2/tools/download-attachments.js +1 -1
  5. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts.map +1 -1
  6. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js +7 -3
  7. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js.map +1 -1
  8. package/dist/ai-service/chat/chat-session-store.d.ts +4 -0
  9. package/dist/ai-service/chat/chat-session-store.d.ts.map +1 -1
  10. package/dist/ai-service/chat/chat-session-store.js +30 -11
  11. package/dist/ai-service/chat/chat-session-store.js.map +1 -1
  12. package/dist/ai-service/features.d.ts +4 -0
  13. package/dist/ai-service/features.d.ts.map +1 -1
  14. package/dist/ai-service/features.js +4 -0
  15. package/dist/ai-service/features.js.map +1 -1
  16. package/dist/ai-service/integrations/store.d.ts +5 -0
  17. package/dist/ai-service/integrations/store.d.ts.map +1 -1
  18. package/dist/ai-service/integrations/store.js +7 -0
  19. package/dist/ai-service/integrations/store.js.map +1 -1
  20. package/dist/ai-service/skills/system/_registry.generated.d.ts.map +1 -1
  21. package/dist/ai-service/skills/system/_registry.generated.js +8 -0
  22. package/dist/ai-service/skills/system/_registry.generated.js.map +1 -1
  23. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.d.ts +1 -1
  24. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.d.ts.map +1 -1
  25. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.js +1 -0
  26. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.js.map +1 -1
  27. package/dist/ai-service/skills/system/third-party-migration/lovable.generated.d.ts +2 -0
  28. package/dist/ai-service/skills/system/third-party-migration/lovable.generated.d.ts.map +1 -0
  29. package/dist/ai-service/skills/system/third-party-migration/lovable.generated.js +79 -0
  30. package/dist/ai-service/skills/system/third-party-migration/lovable.generated.js.map +1 -0
  31. package/dist/ai-service/skills/system/third-party-migration/replit.generated.d.ts +2 -0
  32. package/dist/ai-service/skills/system/third-party-migration/replit.generated.d.ts.map +1 -0
  33. package/dist/ai-service/skills/system/third-party-migration/replit.generated.js +65 -0
  34. package/dist/ai-service/skills/system/third-party-migration/replit.generated.js.map +1 -0
  35. package/dist/ai-service/skills/system/third-party-migration/skill.generated.d.ts +2 -0
  36. package/dist/ai-service/skills/system/third-party-migration/skill.generated.d.ts.map +1 -0
  37. package/dist/ai-service/skills/system/third-party-migration/skill.generated.js +137 -0
  38. package/dist/ai-service/skills/system/third-party-migration/skill.generated.js.map +1 -0
  39. package/dist/ai-service/skills/system/third-party-migration/v0.generated.d.ts +2 -0
  40. package/dist/ai-service/skills/system/third-party-migration/v0.generated.d.ts.map +1 -0
  41. package/dist/ai-service/skills/system/third-party-migration/v0.generated.js +118 -0
  42. package/dist/ai-service/skills/system/third-party-migration/v0.generated.js.map +1 -0
  43. package/dist/ai-service/state-machine/clark-fsm.js +1 -1
  44. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  45. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  46. package/dist/ai-service/state-machine/handlers/llm-generating.js +28 -3
  47. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  48. package/dist/ai-service/util/archive-extractors.d.ts +13 -0
  49. package/dist/ai-service/util/archive-extractors.d.ts.map +1 -1
  50. package/dist/ai-service/util/archive-extractors.js +27 -0
  51. package/dist/ai-service/util/archive-extractors.js.map +1 -1
  52. package/dist/file-sync-vite-plugin.d.ts.map +1 -1
  53. package/dist/file-sync-vite-plugin.js +42 -13
  54. package/dist/file-sync-vite-plugin.js.map +1 -1
  55. package/dist/git-service/live-branch.d.ts +1 -0
  56. package/dist/git-service/live-branch.d.ts.map +1 -1
  57. package/dist/git-service/live-branch.js +2 -16
  58. package/dist/git-service/live-branch.js.map +1 -1
  59. package/dist/lock-service/index.d.ts.map +1 -1
  60. package/dist/lock-service/index.js +5 -8
  61. package/dist/lock-service/index.js.map +1 -1
  62. package/dist/migration/migration-classifier.d.ts +4 -0
  63. package/dist/migration/migration-classifier.d.ts.map +1 -0
  64. package/dist/migration/migration-classifier.js +77 -0
  65. package/dist/migration/migration-classifier.js.map +1 -0
  66. package/dist/migration/migration-routes.d.ts.map +1 -1
  67. package/dist/migration/migration-routes.js +159 -2
  68. package/dist/migration/migration-routes.js.map +1 -1
  69. package/dist/migration/unsupported-integrations.d.ts +10 -0
  70. package/dist/migration/unsupported-integrations.d.ts.map +1 -0
  71. package/dist/migration/unsupported-integrations.js +197 -0
  72. package/dist/migration/unsupported-integrations.js.map +1 -0
  73. package/dist/plugin-options.d.ts +1 -0
  74. package/dist/plugin-options.d.ts.map +1 -1
  75. package/dist/plugin-options.js.map +1 -1
  76. package/dist/router-parser.d.ts.map +1 -1
  77. package/dist/router-parser.js +137 -70
  78. package/dist/router-parser.js.map +1 -1
  79. package/dist/server-rpc/index.d.ts +2 -0
  80. package/dist/server-rpc/index.d.ts.map +1 -1
  81. package/dist/server-rpc/index.js +6 -0
  82. package/dist/server-rpc/index.js.map +1 -1
  83. package/dist/socket-manager.d.ts +2 -1
  84. package/dist/socket-manager.d.ts.map +1 -1
  85. package/dist/socket-manager.js +31 -26
  86. package/dist/socket-manager.js.map +1 -1
  87. package/dist/sync-service/download.d.ts +1 -0
  88. package/dist/sync-service/download.d.ts.map +1 -1
  89. package/dist/sync-service/download.js +1 -1
  90. package/dist/sync-service/download.js.map +1 -1
  91. package/dist/sync-service/index.d.ts +22 -6
  92. package/dist/sync-service/index.d.ts.map +1 -1
  93. package/dist/sync-service/index.js +96 -47
  94. package/dist/sync-service/index.js.map +1 -1
  95. package/package.json +7 -7
@@ -0,0 +1,137 @@
1
+ // Auto-generated from src/ai-service/skills/system/third-party-migration/SKILL.md
2
+ // Do not edit directly - edit the .md file instead
3
+ export const content = `---
4
+ name: third-party-migration
5
+ description: |
6
+ Migrate a third-party app (Replit, Lovable, v0, or similar) into a Superblocks 3.0 full-stack app.
7
+ Load when the user asks to migrate, import, or port an external app — or when the source tree contains hallmarks of a supported platform (\`replit.md\` / \`.replit\`, \`src/integrations/supabase/\`, \`supabase/functions/\`, \`lovable-tagger\`, an \`app/\` directory with \`next.config.*\` and \`"use client"\` / \`"use server"\` directives, etc.) and the user wants it turned into a Superblocks app.
8
+ readOnly: true
9
+ metadata:
10
+ author: superblocks
11
+ version: "1.0"
12
+ ---
13
+
14
+ # Third-Party App → Superblocks 3.0 Migration
15
+
16
+ Port a user-provided external app into the Superblocks fullstack app you are running inside (template: \`app-fullstack\`). The source tree is **read-only material**. All edits land in the target app under \`server/\` and \`client/\`.
17
+
18
+ This file is the migration framework. **Per-platform mapping rules live in sibling files** — load the right one before you start mapping.
19
+
20
+ ## Identify the source platform
21
+
22
+ Match the source tree against these signals, then read the matching reference file in this folder. Read it once, up-front — it tells you what shapes to look for and how each maps to Superblocks.
23
+
24
+ - **Replit** — \`replit.md\`, \`.replit\`, \`artifacts/\`, an Express server with an Orval-generated client. → load \`replit.md\`.
25
+ - **Lovable** — \`src/integrations/supabase/client.ts\`, \`supabase/config.toml\`, \`supabase/functions/\`, \`supabase/migrations/\`, \`lovable-tagger\` in \`vite.config.ts\`. → load \`lovable.md\`.
26
+ - **v0** — \`app/<segment>/page.tsx\` (Next.js App Router) plus \`next.config.{js,mjs,ts}\` and \`next\` in \`package.json\`, files with \`"use client"\` / \`"use server"\` directives, \`next/link\` / \`next/navigation\` imports, \`components/ui/\` with shadcn primitives. → load \`v0.md\`.
27
+ - **Ambiguous or neither** — stop and ask the user which platform the source came from. Do not guess. It is possible that it is No Platform. In this case, follow the general guidelines in this document and ask user questions for any ambiguity.
28
+
29
+ The framework below applies to every platform; the platform file fills in the source-specific mapping.
30
+
31
+ ## Target layout
32
+
33
+ The app you are running inside looks like this. Do not invent new top-level directories.
34
+
35
+ \`\`\`
36
+ client/
37
+ App.tsx — root with <AppProvider> + <Outlet />
38
+ router.tsx — react-router v7 data mode (\`createBrowserRouter\`); see Router shape below
39
+ index.css — Tailwind v4 + theme tokens
40
+ hooks/
41
+ useApi.ts — typed wrapper around useTypedApi<ApiRegistry>
42
+ useApiData.ts — typed wrapper around useTypedApiData<ApiRegistry>
43
+ lib/executeApi.ts — non-React typed executeApi
44
+ pages/<Name>/index.tsx
45
+ components/ui/ — shadcn primitives (do not modify)
46
+ server/
47
+ apis/
48
+ index.ts — registry: \`const apis = { ApiName: ... } as const;\`
49
+ <ApiName>/api.ts
50
+ \`\`\`
51
+
52
+ ## Universal mapping (applies to every source)
53
+
54
+ These hold regardless of source platform. Per-platform specifics layer on top.
55
+
56
+ - APIs are addressed by \`name\` via the registry — there is no URL path. Within \`api()\`:
57
+ - All inputs (whatever shape the source had — body, query, params, function args) → one unified \`input\` Zod schema; destructure inside \`run(ctx, { ... })\`.
58
+ - The handler's response → \`return { ... }\` from \`run\`. The \`output\` schema validates it automatically; do not \`safeParse\` by hand.
59
+ - Auth → \`ctx.user\` (\`userId\`, \`email\`, \`name\`, \`groups\`, \`customClaims\`). Auth is platform-managed; drop the source's auth flows entirely.
60
+ - Errors → throw the \`SdkError\` subtypes the sdk-api README documents (\`InputValidationError\`, \`OutputValidationError\`, \`IntegrationError\`, \`ExecutionError\`). Never invent error classes or return HTTP status codes.
61
+ - DB clients (\`pg\`, \`knex\`, \`prisma\`, Drizzle, \`supabase.from(...)\`) → declare in \`integrations: { db: postgres(DB_INTEGRATION_ID) }\` and call \`ctx.integrations.db.query(sql, ZodSchema, params, { label: "..." })\` / \`.execute(...)\`. Parameterized SQL only. Hold integration UUIDs in module-level \`const\`s, not literals scattered through \`run\`.
62
+ - External HTTP (\`axios\`, \`fetch\`, third-party SDKs) → declared integration + \`ctx.integrations.<name>.apiRequest({ method, path, body }, { response: ZodSchema })\`.
63
+ - \`process.env.*\` / \`import.meta.env.*\` / \`Deno.env.get(...)\` → \`ctx.env\`. Logging → \`ctx.log.info/warn/error/debug(msg, data?)\`.
64
+ - Server bootstrapping (\`app.listen\`, CORS, route grouping, middleware setup, \`Deno.serve\`) → drop entirely. The platform handles it.
65
+ - **Each frontend page → one Superblocks page** at \`client/pages/<Name>/index.tsx\`, wired into \`client/router.tsx\`.
66
+ - **Each backend data source (DB, REST client, S3, ...) → one Superblocks integration** referenced by UUID. Credentials live on the integration, never in code.
67
+
68
+ ### Router shape (\`client/router.tsx\`)
69
+
70
+ The editor parses this file statically to build the page list and route table. **Use one of the supported page-component bindings — anything else silently drops every route and the editor shows a "404 / route has been deleted" overlay.**
71
+
72
+ Supported page bindings (mix freely):
73
+
74
+ \`\`\`tsx
75
+ // 1. Inline lazy on the route object (preferred — matches the template):
76
+ { path: "about", lazy: () => import("./pages/About/index.tsx").then(m => ({ Component: m.default })) }
77
+
78
+ // 2. Static default import + Component / element:
79
+ import About from "./pages/About/index.tsx";
80
+ { path: "about", Component: About }
81
+ { path: "about", element: <About /> }
82
+
83
+ // 3. Top-level \`const\` bound to React.lazy + Component / element:
84
+ const About = lazy(() => import("./pages/About/index.tsx"));
85
+ { path: "about", Component: About }
86
+ \`\`\`
87
+
88
+ Do **not**: assign \`Component\` / \`element\` to identifiers bound by anything other than a static import or \`lazy(() => import("..."))\` (no IIFEs, no helper wrappers, no conditional \`lazy(...)\`, no objects whose keys are computed from a loop). The parser only resolves the shapes above.
89
+
90
+ ## Authoritative references (read just-in-time, not up front)
91
+
92
+ - \`node_modules/@superblocksteam/sdk-api/README.md\` and \`src/index.ts\` — the server \`api()\` contract and the full list of factory names. **Never invent factory names.** If a required file is missing, mark the affected checklist item \`failed\` with the missing path as the reason.
93
+ - Per-integration READMEs under \`node_modules/@superblocksteam/sdk-api/src/integrations/<kind>/\` — read once, when you first emit an API that uses that integration.
94
+ - \`skills/system/superblocks-frontend/SKILL.md\` — the client contract (\`useApi\` / \`useApiData\` / \`executeApi\` from \`@superblocksteam/library\`).
95
+
96
+ > ⚠️ **Never** load \`skills/system/superblocks-api/SKILL.md\`. It describes a different, block-based API pattern that is incompatible with the fullstack template's \`sdk-api\`. Mixing them produces code that does not compile.
97
+
98
+ ## Non-negotiables
99
+
100
+ 1. **Track everything in the checklist.** The **first tool call after exiting plan mode** or **during build mode, before building** is \`build_manageChecklist\` to seed. Before every per-item edit, \`update <itemId> in_progress\`; after, \`update <itemId> completed\` (or \`failed\` with a concrete \`failureReason\`). If you are about to write code and the checklist is empty, stale, or missing the item you are working on, **stop and fix the checklist first** — the orchestration depends on it. Free-text status reports are not a substitute.
101
+ 2. **Discover before you edit.** Inventory routes, pages, data sources, env vars, _and visual surface_ (theme tokens, \`index.css\`, custom CSS, font setup, layout shells) across the entire source tree before writing any code. The platform file tells you what shapes to look for.
102
+ 3. **Ask before guessing.** Multiple integrations of the same kind, missing integrations, unsupported data sources, or any platform-specific ambiguity → stop and \`askMultiChoice\`. Never pick for the user. The platform file lists ambiguities specific to that source.
103
+ 4. **Preserve visual identity.** The migrated app must look and feel like the source. Carry over Tailwind config, shadcn theme tokens, \`index.css\` / \`globals.css\`, custom CSS modules, fonts, spacing, color palette, and layout shells (header/sidebar/grid). shadcn/ui components stay as-is. Do **not** redesign, restyle, or "clean up" while porting — visual regressions are bugs, not improvements. If the user wants a redesign, that is a separate task after migration.
104
+ 5. **Never copy secrets.** DSN strings, API keys, anon/service-role keys, JWT secrets, env-var lookups for credentials — none move into the target tree. Integration UUIDs replace them. Surface every leaked secret you find (especially client-side \`VITE_*\` / \`NEXT_PUBLIC_*\` keys) in the discovery summary so the user can rotate them.
105
+ 6. **No \`// TODO\`s.** Anything you can't finish deterministically becomes a \`failed\` checklist item with a concrete \`failureReason\`.
106
+ 7. **Don't scaffold.** If \`server/apis/index.ts\` or \`client/router.tsx\` doesn't already exist, you're in the wrong app — stop and surface this.
107
+ 8. **Don't fabricate a backend.** If the source is genuinely frontend-only, the migrated app should also be frontend-only. Don't invent APIs to "complete" the architecture.
108
+
109
+ ## Workflow
110
+
111
+ 1. **Locate the source.** If the user gave a path, use it. Otherwise look in the working tree for the platform signals listed above. If ambiguous, ask.
112
+ 2. **Load the platform guide.** Read \`replit.md\`, \`lovable.md\`, or \`v0.md\` based on what you found. Do not start mapping before you've read it — it documents the source's shape and how each piece translates.
113
+ 3. **Inventory.** Following the platform guide's discovery checklist, enumerate every route/handler, page, data source, env var, secret, and visual asset in the source tree. Surface a one-paragraph summary plus an itemized list of integrations and unsupported features before writing anything. If the source has bespoke styling, seed a \`setup_theme\` checklist item to port it.
114
+ 4. **Resolve integrations.** For each data source kind: call \`searchIntegrations\` (filter by \`type\`). One match → bind it. Multiple → ask the user which. Zero → ask whether to create one; if yes, use \`listAvailableIntegrationTypes\` (if needed) and \`openIntegrationSetup\`, then ask the user explicitly whether they saved or cancelled before re-searching. Resolution is **blocking** — the checklist cannot be seeded until every kind maps to a UUID, is explicitly deferred, or has been confirmed unsupported.
115
+ 5. **Seed the checklist** via \`build_manageChecklist\`. One \`api_<ApiName>\` per backend interaction, one \`frontend_<PageName>\` per page, plus \`setup_router\`, \`setup_registry\`, \`setup_cleanup\`, and any \`setup_theme\` / \`setup_storage\` / \`unsupported_<feature>\` items the platform guide tells you to add. Print the count as a sanity check; if it looks wrong, re-check discovery.
116
+ 6. **Execute.** Every item follows the same ritual — no exceptions:
117
+ - **Before touching files:** \`build_manageChecklist update <itemId> in_progress\`.
118
+ - **Emit / edit the files** for that item.
119
+ - **After the edit lands:** \`build_manageChecklist update <itemId> completed\` (or \`failed\` with a concrete \`failureReason\`).
120
+ - You are not done with an item until its checklist entry has moved to a terminal state. Do not batch updates at the end; update as you go.
121
+ - **For parallelizable work:** call \`spawnCodingSubagents\` with batches of tasks. Each batch's \`instructions\` names exact \`itemId\`s, includes the integration-UUID map and source path, any platform-specific context the sub-agent needs (e.g. RLS-replacement clauses for Lovable), and tells the sub-agent to follow the same \`in_progress\` → \`completed\`/\`failed\` ritual for every item it owns.
122
+ - \`spawnCodingSubagents\` **must be the only tool call in that turn.** It blocks until every sub-agent finishes; there is no "while waiting" from your perspective. Other tool calls in the same turn race on the shared checklist and corrupt state. After it returns, read the checklist and handle \`failed\` items sequentially. If the tool itself errors, surface it and fall back to sequential — or fail the affected items with \`sub-agent orchestration failed: <error>\`.
123
+
124
+ ## When emitting code
125
+
126
+ - **Server.** Default-export one \`api({ name, integrations, input, output, run })\` from \`@superblocksteam/sdk-api\`. The \`name\` and the registry key in \`server/apis/index.ts\` must equal \`<ApiName>\` verbatim — the client calls \`useApi("<ApiName>")\` by that exact string. Preserve the external response shape exactly so the migrated frontend keeps working. Use parameterized SQL only (\`$N\`); zero string interpolations. Throw the error classes the sdk-api README documents instead of returning HTTP status codes.
127
+ - **Client.** Replace the source's data hooks with \`useApiData\` (reads) or \`useApi\` (mutations) keyed by \`<ApiName>\`. **Import the typed wrappers from the template, not the library directly:** \`import { useApi } from "@/hooks/useApi.js"\`, \`import { useApiData } from "@/hooks/useApiData.js"\`, \`import { executeApi } from "@/lib/executeApi.js"\`. They give compile-time inference from \`ApiRegistry\`. Drop the source's generated client packages, \`QueryClientProvider\`, base-URL or auth-token getters, and any auth-context plumbing — Superblocks handles all of that. shadcn/form + react-hook-form + zod stays. Follow the loading-state guidance in \`superblocks-frontend/SKILL.md\`.
128
+ - **ESM imports.** Every relative import in emitted code uses an explicit \`.js\` extension (\`./api.js\`, \`../hooks/useApi.js\`) — even though the source is \`.ts\`. The template is ESM; bare specifiers fail at runtime.
129
+ - **Theme port.** When carrying over the source's theme, copy the existing color values **as-is** into \`client/index.css\`'s \`:root\` block. HSL values written \`hsl(222 47% 11%)\` (CSS Color Level 4 space-separated form) work directly with the \`@theme inline\` mapping in Tailwind v4. **Do not convert to OKLCH** unless the source already uses OKLCH — converting introduces drift and is a common visual-regression source.
130
+ - **Visual fidelity.** JSX structure, Tailwind classes, shadcn variants, custom CSS, theme tokens, fonts, and layout containers must transfer over **unchanged** from the source page. The only things that change in a page port are the data hooks, the auth touchpoints, and the router primitives. Do not "improve" markup, swap class names, or substitute components. If the diff between source and target page goes beyond data + auth + routing, you are over-editing — back out the cosmetic changes.
131
+ - **Sub-agents must not** call \`searchIntegrations\`, \`openIntegrationSetup\`, or any integration-resolution tool. If they hit a kind missing from the map, fail the item with \`unresolved integration kind: <kind>\` and let the main agent handle it on return.
132
+
133
+ ## Done
134
+
135
+ Stop only when every checklist item is \`completed\` or \`failed\`. Report the counts plus any platform-specific findings the per-platform guide asks you to surface (e.g. leaked secrets, replaced RLS policies, unsupported realtime features). Do not claim success — defer verification to the user running the app.
136
+ `;
137
+ //# sourceMappingURL=skill.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.generated.js","sourceRoot":"","sources":["../../../../../src/ai-service/skills/system/third-party-migration/skill.generated.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,mDAAmD;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqItB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const content = "# v0-specific mapping\n\nThis is a per-platform reference loaded from `SKILL.md`. The framework (target layout, universal mapping, non-negotiables, workflow, code-emission rules) lives there. This file documents only what is specific to a v0 source.\n\n> v0 (Vercel) emits a Next.js App Router project the vast majority of the time. The Superblocks 3.0 fullstack template is **Vite + react-router**, not Next.js, so every page port involves translating Next.js primitives (server components, file-system routing, `next/*` imports) into the Vite/react-router shape. Treat that translation as the core of the migration; the data-mapping side is usually thin because v0 sources rarely have real backends.\n\n## Where the source lives\n\nDefinitive marker: `app/layout.tsx` exports a `metadata` object with `generator: 'v0.app'`. If you find that, it is a v0 export.\n\nStrong supporting signals:\n\n- `app/` directory at the repo root containing `page.tsx` / `layout.tsx`, plus `next.config.{js,mjs,ts}` and `next` listed as a dependency in `package.json`.\n- `components.json` at the repo root (shadcn CLI config) with `\"style\": \"new-york\"` and `\"iconLibrary\": \"lucide\"`.\n- `components/ui/` with shadcn primitives and a heavy roster of `@radix-ui/react-*` packages.\n- `next.config.mjs` with `images: { unoptimized: true }` and often `typescript: { ignoreBuildErrors: true }` (v0 escape hatches; surface both as warnings since they hide real issues).\n- Frequent imports from `next/link`, `next/navigation`, `next/image`, `next/font`, and a `<Analytics />` from `@vercel/analytics/next` in the layout.\n- Standard placeholder assets in `public/`: `placeholder.svg`, `placeholder.jpg`, `placeholder-logo.{svg,png}`, `placeholder-user.jpg`. Source code often references these.\n- A `styles/globals.css` AND an `app/globals.css` may both exist. The active one is whichever the layout imports (typically `app/globals.css`); the other is dead code from the shadcn scaffold. Surface this in discovery so the user knows.\n\nIf the user gave a path, use it. Otherwise look for the markers above in the working tree. If ambiguous (for example the source is plain Next.js with no `generator: 'v0.app'` and no `components.json`), ask before assuming v0 conventions, since unrelated Next.js apps can have their own non-trivial server logic that the v0 mapping below underestimates.\n\n## Typical shape (hints, not rules)\n\nUse these as starting points; re-verify against the actual source tree on every migration.\n\n- **Frontend**: Next.js 14/15 App Router + React 18/19 + Tailwind (often v4 with `@import 'tailwindcss'` and OKLCH theme tokens in `app/globals.css`) + shadcn/ui (under `components/ui/`) + `lucide-react`. Pages live at `app/<segment>/page.tsx`; layouts at `app/<segment>/layout.tsx`. Route groups use `(group-name)/` directories. Dynamic segments use `[param]` directories. Forms via `react-hook-form` + `zod` are common but not universal.\n- **Theming**: `next-themes` with a `<ThemeProvider>` in `app/layout.tsx` is the default v0 dark-mode wiring. Translate to a custom provider or drop and pin a theme; `next-themes` itself does not work outside Next.\n- **Fonts**: `next/font/google` loading Geist + Geist_Mono is the default v0 font stack (with CSS variables `--font-geist-sans` / `--font-geist-mono`). Re-load via `@import` from Google Fonts in `client/index.css` and re-bind the variables in Tailwind v4 tokens.\n- **Analytics**: `<Analytics />` from `@vercel/analytics/next` in the root layout is boilerplate. Drop entirely \u2014 there is no Superblocks equivalent and the component is Vercel-platform-bound.\n- **Backend (when present)** \u2014 pick whichever the source actually uses:\n - **Server Actions**: functions or files with `\"use server\"`, often in `app/actions.ts` or co-located with the page. Called from client components via form actions or direct invocation.\n - **API Routes**: `app/api/<name>/route.ts` exporting `GET`, `POST`, etc. handlers.\n - **Server Component data fetching**: `async function Page()` with inline `fetch(...)` or DB calls. The result is rendered server-side and shipped as HTML on first load.\n - **Third-party APIs called from the client** (Stripe, OpenAI, AI SDK) with secrets that should never have been in `NEXT_PUBLIC_*`.\n - **No backend at all**: pure UI app with mocked data or `localStorage`. The framework's \"Don't fabricate a backend\" rule applies; the migrated app stays frontend-only.\n- **Auth**: occasionally a `middleware.ts` with NextAuth / Clerk / hand-rolled session checks. Frequently absent in v0-only outputs.\n- **Storage**: occasionally `@vercel/blob` or third-party uploads. Often absent.\n- **Streaming / AI**: AI SDK (`ai`, `@ai-sdk/openai`) with streamed responses sometimes shows up in v0 outputs. **Superblocks has no streaming-response equivalent in this template** \u2014 flag and degrade to one-shot calls; do not silently drop.\n\n## Discovery checklist\n\nIn addition to the framework's discovery requirements, for a v0 source enumerate:\n\n- Every page (`app/**/page.tsx`) and its dynamic-segment params.\n- Every layout (`app/**/layout.tsx`) and what it provides (theme provider, header, sidebar, fonts).\n- Every Server Action (`\"use server\"` functions or files), grouped by what they touch.\n- Every API Route (`app/api/**/route.ts`), grouped by HTTP method.\n- Every Server Component that fetches data inline (look for `async function` page/layout exports calling `fetch`, ORMs, or DB clients).\n- Every `next/*` import in use (`next/link`, `next/navigation`, `next/image`, `next/font`, `next/headers`, `next/cookies`, `next/cache`).\n- Every external HTTP call and the API it targets (in client components, Server Actions, and Server Components).\n- Every env var read (`process.env.*`, `import.meta.env.*`), separated into \"credentials/secrets\" (move to integrations) and \"config\" (`ctx.env`).\n- Every middleware (`middleware.ts`) \u2014 usually drops, but capture what it was doing so the equivalent can be implemented at the API layer if needed.\n- Theme port surface: `tailwind.config.{js,ts}`, `app/globals.css`, font setup via `next/font`, custom CSS modules.\n\nIf the discovery summary doesn't tell you what every API will look like and how every page changes shape, you haven't discovered enough.\n\n## Core mapping\n\n- **Each page (`app/.../page.tsx`) \u2192 one Superblocks page** at `client/pages/<Name>/index.tsx`, wired into `client/router.tsx`. Route groups (`(name)/`) collapse into nested routes; dynamic segments (`[id]/`) become `:id` params under react-router v7.\n- **Each Server Component that fetches data inline \u2192 one Superblocks API + a client component**. The page becomes a normal client component that calls `useApiData(\"<ApiName>\")`. The inline `fetch` / DB call moves into `server/apis/<ApiName>/api.ts`. There is no server-rendered first paint in this template; the page renders with a loading state and hydrates from the API.\n- **Each Server Action (`\"use server\"` function) \u2192 one Superblocks API** at `server/apis/<ActionName>/api.ts`, called from the client via `useApi(\"<ActionName>\")` (mutations) or `executeApi`. Form-action wiring (`<form action={...}>`) becomes a normal `onSubmit` handler that calls the API. `revalidatePath` / `revalidateTag` calls drop; refetch via the returned hook's invalidation pattern instead.\n- **Each API Route (`app/api/<name>/route.ts`) \u2192 one Superblocks API** at `server/apis/<NameInPascalCase>/api.ts`. Route handlers exporting `GET`, `POST`, etc. that share a path collapse into one `api()` keyed by method on the input schema, or split into separate APIs per method. Pick one shape and stay consistent. `Request` / `Response` / `NextResponse` primitives drop entirely; the platform handles HTTP.\n- **Each external HTTP call \u2192 integration**. `fetch(\"https://api.openai.com/...\")` becomes a declared integration plus `apiRequest(...)`. Secrets from `process.env`, `NEXT_PUBLIC_*`, hardcoded keys, or AI SDK provider configs move into the integration definition. A `NEXT_PUBLIC_OPENAI_API_KEY` on the client side is also a security finding worth surfacing in the migration summary.\n- **DB clients** (Drizzle, Prisma, `@vercel/postgres`, `@neondatabase/serverless`, `pg`) \u2192 declare in `integrations: { db: postgres(DB_INTEGRATION_ID) }` and call `ctx.integrations.db.query/execute(...)` with parameterized SQL. Read schema from any included migration files; do not run them against the target integration without asking.\n- **`next/link`** \u2192 `import { Link } from \"react-router\"` (v7). The `href` prop becomes `to`.\n- **`next/navigation`** \u2192 react-router v7 hooks: `useRouter()` becomes `useNavigate()`, `usePathname()` becomes `useLocation().pathname`, `useSearchParams()` stays `useSearchParams()` from `react-router` (similar API but not identical, verify call sites).\n- **`next/image`** \u2192 standard `<img>` with the same `src`/`alt`. Drop the `width`/`height`/`priority` props or convert to inline styles. If the source relied on Next's image optimization (remote loaders, blur placeholders), flag as a `failed` item with `failureReason: \"next/image optimization on <usage> has no Superblocks equivalent in this template\"`.\n- **`next/font/google`** \u2192 **never just delete the import**. The font has to be re-loaded somewhere or it disappears from the migrated app and everything renders in the browser fallback. Three required steps; all three are mandatory:\n - **(a) Load the font.** Pick one shape and stay consistent within the migration:\n 1. **CDN `@import` (default; zero new deps).** At the top of `client/index.css`: `@import url('https://fonts.googleapis.com/css2?family=<Family>:wght@<weights>&display=swap');`. Bring over both the sans and mono family the source used.\n 2. **Self-hosted via npm.** For Geist specifically: `pnpm add geist`, then `import 'geist/font/sans'; import 'geist/font/mono';` from `client/main.tsx` (it injects `@font-face` and exposes `--font-geist-sans` / `--font-geist-mono`). For other Google fonts: `pnpm add @fontsource-variable/<family>` and `import '@fontsource-variable/<family>';`.\n - **(b) Bind it in `@theme`.** The starter `client/index.css` ships with no `--font-sans` token, so even after loading the font you must add `@theme { --font-sans: '<Family>', ui-sans-serif, system-ui, sans-serif; --font-mono: '<MonoFamily>', ui-monospace, monospace; }` (or a `var(--font-geist-sans)` reference for the self-hosted Geist case). Without this, Tailwind's `font-sans` keeps using the browser default.\n - **(c) Drop the source's `next/font` import and the `className={font.variable}` wiring** on `<html>` / `<body>` \u2014 the Tailwind token from (b) carries the variable forward instead.\n\n The most common port failure is silently dropping (a): the agent removes the `next/font` import as part of \"drop Next-isms\" and never adds a replacement, so the migrated app renders in system fonts. (b) without (a) is just as bad. **Verify by inspecting a heading in DevTools and confirming `font-family` resolves to the source's family, not `ui-sans-serif`/system fallback.** If a font is intentionally not carried over, surface it as a `failed` item with a reason; do not drop silently.\n\n- **`next/font/local`** \u2192 copy the font files to `client/public/fonts/`, write matching `@font-face` blocks in `client/index.css`, and bind the family name in `@theme`. Preserve the original `font-display`, weight, and style.\n- **`app/layout.tsx`** \u2192 fold into `client/App.tsx` (the root shell with `<AppProvider>` + `<Outlet />`) or into specific page wrappers, depending on what each layout provided. Theme providers, font loaders, and metadata setters from layouts collapse into the App shell or `client/index.css`. The `<html>`/`<body>` shell drops; the platform owns it.\n- **`app/loading.tsx`** \u2192 component-level loading state in the page, driven by `useApiData`'s loading boolean. There is no implicit Suspense boundary in this template.\n- **`app/error.tsx`** \u2192 react-router v7 `errorElement` on the route, or a try/catch around the API hook with a fallback render.\n- **`metadata` exports / `generateMetadata`** \u2192 drop, or set `document.title` via `useEffect` if the page title matters. Open Graph / Twitter card metadata has no equivalent here.\n- **`middleware.ts`** \u2192 drop. If it was enforcing auth, the equivalent enforcement happens server-side in each `api()` via `ctx.user`. If it was rewriting URLs, surface to the user \u2014 Superblocks has no URL-rewriting layer.\n- **`\"use client\"` / `\"use server\"` directives** \u2192 drop. Every component in the Superblocks template is a client component; every server-side function lives in `server/apis/`. There is no RSC boundary to mark.\n- **`next-themes`** \u2192 translate to a small custom provider that toggles a `class=\"dark\"` on `document.documentElement` and persists to `localStorage`, or drop entirely and pin the theme. The `next-themes` package depends on Next-specific hydration behavior and should not be carried over as-is. Preserve the source's CSS variable scheme (`:root` / `.dark` blocks in `globals.css`) \u2014 only the JS toggle changes.\n- **`@vercel/analytics`** \u2192 drop. The `<Analytics />` component and `track()` helper are bound to the Vercel platform and have no equivalent here. Note in the migration summary if the source relied on it.\n\n## Ask-before-guessing \u2014 v0 specifics\n\n- \"The source uses Server Actions / API Routes calling `<DB client>` against `<DSN env var>`. I'll bind to a Postgres integration; which one, or do you want to create a new one?\"\n- \"I see external HTTP calls to `<host>` with credentials in `<env var>`. Bind to an integration of type `<kind>`?\"\n- \"I see `<feature>` (streaming AI responses, edge runtime, ISR, etc.) which has no equivalent in this template. Drop, degrade, or stop and let you decide?\"\n- \"I see Server Components fetching data inline. The migrated app cannot server-render; the page will hydrate from the API with a loading state. Is that acceptable, or do you want a particular skeleton/loading shape?\"\n- \"The source has a `middleware.ts` doing `<auth/redirect/rewrite>`. I'll drop it and enforce equivalent rules in each API via `ctx.user`. Is that the right user-claim mapping?\"\n\n## Page port \u2014 what changes vs. what doesn't\n\nFor each v0 page, only these change:\n\n- **Data hooks**: Server Component inline fetch / Server Action calls / API Route fetches \u2192 `useApi` / `useApiData`.\n- **Auth touchpoints**: NextAuth / Clerk / `middleware.ts` checks \u2192 platform-managed (drop the provider; consume `ctx.user` server-side).\n- **Router primitives**: `next/link`, `next/navigation`, file-system routing \u2192 react-router v7 (`Link`, `useNavigate`, `useLocation`, explicit route definitions in `client/router.tsx`).\n- **Asset primitives**: `next/image` \u2192 `<img>`, `next/font` \u2192 CSS-loaded fonts.\n- **Directives**: `\"use client\"` / `\"use server\"` removed.\n\nEverything else (JSX structure, Tailwind classes, shadcn variants, custom CSS, theme tokens, layout containers) transfers unchanged. If the diff goes beyond data + auth + routing + asset/font primitives + directive removal, you are over-editing.\n\n## Done \u2014 v0 specifics\n\nIn the final report, additionally surface:\n\n- Any unsupported features that became `failed` items (streaming AI responses, server-side rendering, ISR, `next/image` optimization, edge runtime, route rewrites, etc.).\n- Any `NEXT_PUBLIC_*` secrets found on the client side (these should be rotated even after migration).\n- The list of `next/*` imports that were translated, so the user can spot-check them in the migrated tree.\n";
2
+ //# sourceMappingURL=v0.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v0.generated.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/skills/system/third-party-migration/v0.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,47eAkHnB,CAAC"}
@@ -0,0 +1,118 @@
1
+ // Auto-generated from src/ai-service/skills/system/third-party-migration/v0.md
2
+ // Do not edit directly - edit the .md file instead
3
+ export const content = `# v0-specific mapping
4
+
5
+ This is a per-platform reference loaded from \`SKILL.md\`. The framework (target layout, universal mapping, non-negotiables, workflow, code-emission rules) lives there. This file documents only what is specific to a v0 source.
6
+
7
+ > v0 (Vercel) emits a Next.js App Router project the vast majority of the time. The Superblocks 3.0 fullstack template is **Vite + react-router**, not Next.js, so every page port involves translating Next.js primitives (server components, file-system routing, \`next/*\` imports) into the Vite/react-router shape. Treat that translation as the core of the migration; the data-mapping side is usually thin because v0 sources rarely have real backends.
8
+
9
+ ## Where the source lives
10
+
11
+ Definitive marker: \`app/layout.tsx\` exports a \`metadata\` object with \`generator: 'v0.app'\`. If you find that, it is a v0 export.
12
+
13
+ Strong supporting signals:
14
+
15
+ - \`app/\` directory at the repo root containing \`page.tsx\` / \`layout.tsx\`, plus \`next.config.{js,mjs,ts}\` and \`next\` listed as a dependency in \`package.json\`.
16
+ - \`components.json\` at the repo root (shadcn CLI config) with \`"style": "new-york"\` and \`"iconLibrary": "lucide"\`.
17
+ - \`components/ui/\` with shadcn primitives and a heavy roster of \`@radix-ui/react-*\` packages.
18
+ - \`next.config.mjs\` with \`images: { unoptimized: true }\` and often \`typescript: { ignoreBuildErrors: true }\` (v0 escape hatches; surface both as warnings since they hide real issues).
19
+ - Frequent imports from \`next/link\`, \`next/navigation\`, \`next/image\`, \`next/font\`, and a \`<Analytics />\` from \`@vercel/analytics/next\` in the layout.
20
+ - Standard placeholder assets in \`public/\`: \`placeholder.svg\`, \`placeholder.jpg\`, \`placeholder-logo.{svg,png}\`, \`placeholder-user.jpg\`. Source code often references these.
21
+ - A \`styles/globals.css\` AND an \`app/globals.css\` may both exist. The active one is whichever the layout imports (typically \`app/globals.css\`); the other is dead code from the shadcn scaffold. Surface this in discovery so the user knows.
22
+
23
+ If the user gave a path, use it. Otherwise look for the markers above in the working tree. If ambiguous (for example the source is plain Next.js with no \`generator: 'v0.app'\` and no \`components.json\`), ask before assuming v0 conventions, since unrelated Next.js apps can have their own non-trivial server logic that the v0 mapping below underestimates.
24
+
25
+ ## Typical shape (hints, not rules)
26
+
27
+ Use these as starting points; re-verify against the actual source tree on every migration.
28
+
29
+ - **Frontend**: Next.js 14/15 App Router + React 18/19 + Tailwind (often v4 with \`@import 'tailwindcss'\` and OKLCH theme tokens in \`app/globals.css\`) + shadcn/ui (under \`components/ui/\`) + \`lucide-react\`. Pages live at \`app/<segment>/page.tsx\`; layouts at \`app/<segment>/layout.tsx\`. Route groups use \`(group-name)/\` directories. Dynamic segments use \`[param]\` directories. Forms via \`react-hook-form\` + \`zod\` are common but not universal.
30
+ - **Theming**: \`next-themes\` with a \`<ThemeProvider>\` in \`app/layout.tsx\` is the default v0 dark-mode wiring. Translate to a custom provider or drop and pin a theme; \`next-themes\` itself does not work outside Next.
31
+ - **Fonts**: \`next/font/google\` loading Geist + Geist_Mono is the default v0 font stack (with CSS variables \`--font-geist-sans\` / \`--font-geist-mono\`). Re-load via \`@import\` from Google Fonts in \`client/index.css\` and re-bind the variables in Tailwind v4 tokens.
32
+ - **Analytics**: \`<Analytics />\` from \`@vercel/analytics/next\` in the root layout is boilerplate. Drop entirely — there is no Superblocks equivalent and the component is Vercel-platform-bound.
33
+ - **Backend (when present)** — pick whichever the source actually uses:
34
+ - **Server Actions**: functions or files with \`"use server"\`, often in \`app/actions.ts\` or co-located with the page. Called from client components via form actions or direct invocation.
35
+ - **API Routes**: \`app/api/<name>/route.ts\` exporting \`GET\`, \`POST\`, etc. handlers.
36
+ - **Server Component data fetching**: \`async function Page()\` with inline \`fetch(...)\` or DB calls. The result is rendered server-side and shipped as HTML on first load.
37
+ - **Third-party APIs called from the client** (Stripe, OpenAI, AI SDK) with secrets that should never have been in \`NEXT_PUBLIC_*\`.
38
+ - **No backend at all**: pure UI app with mocked data or \`localStorage\`. The framework's "Don't fabricate a backend" rule applies; the migrated app stays frontend-only.
39
+ - **Auth**: occasionally a \`middleware.ts\` with NextAuth / Clerk / hand-rolled session checks. Frequently absent in v0-only outputs.
40
+ - **Storage**: occasionally \`@vercel/blob\` or third-party uploads. Often absent.
41
+ - **Streaming / AI**: AI SDK (\`ai\`, \`@ai-sdk/openai\`) with streamed responses sometimes shows up in v0 outputs. **Superblocks has no streaming-response equivalent in this template** — flag and degrade to one-shot calls; do not silently drop.
42
+
43
+ ## Discovery checklist
44
+
45
+ In addition to the framework's discovery requirements, for a v0 source enumerate:
46
+
47
+ - Every page (\`app/**/page.tsx\`) and its dynamic-segment params.
48
+ - Every layout (\`app/**/layout.tsx\`) and what it provides (theme provider, header, sidebar, fonts).
49
+ - Every Server Action (\`"use server"\` functions or files), grouped by what they touch.
50
+ - Every API Route (\`app/api/**/route.ts\`), grouped by HTTP method.
51
+ - Every Server Component that fetches data inline (look for \`async function\` page/layout exports calling \`fetch\`, ORMs, or DB clients).
52
+ - Every \`next/*\` import in use (\`next/link\`, \`next/navigation\`, \`next/image\`, \`next/font\`, \`next/headers\`, \`next/cookies\`, \`next/cache\`).
53
+ - Every external HTTP call and the API it targets (in client components, Server Actions, and Server Components).
54
+ - Every env var read (\`process.env.*\`, \`import.meta.env.*\`), separated into "credentials/secrets" (move to integrations) and "config" (\`ctx.env\`).
55
+ - Every middleware (\`middleware.ts\`) — usually drops, but capture what it was doing so the equivalent can be implemented at the API layer if needed.
56
+ - Theme port surface: \`tailwind.config.{js,ts}\`, \`app/globals.css\`, font setup via \`next/font\`, custom CSS modules.
57
+
58
+ If the discovery summary doesn't tell you what every API will look like and how every page changes shape, you haven't discovered enough.
59
+
60
+ ## Core mapping
61
+
62
+ - **Each page (\`app/.../page.tsx\`) → one Superblocks page** at \`client/pages/<Name>/index.tsx\`, wired into \`client/router.tsx\`. Route groups (\`(name)/\`) collapse into nested routes; dynamic segments (\`[id]/\`) become \`:id\` params under react-router v7.
63
+ - **Each Server Component that fetches data inline → one Superblocks API + a client component**. The page becomes a normal client component that calls \`useApiData("<ApiName>")\`. The inline \`fetch\` / DB call moves into \`server/apis/<ApiName>/api.ts\`. There is no server-rendered first paint in this template; the page renders with a loading state and hydrates from the API.
64
+ - **Each Server Action (\`"use server"\` function) → one Superblocks API** at \`server/apis/<ActionName>/api.ts\`, called from the client via \`useApi("<ActionName>")\` (mutations) or \`executeApi\`. Form-action wiring (\`<form action={...}>\`) becomes a normal \`onSubmit\` handler that calls the API. \`revalidatePath\` / \`revalidateTag\` calls drop; refetch via the returned hook's invalidation pattern instead.
65
+ - **Each API Route (\`app/api/<name>/route.ts\`) → one Superblocks API** at \`server/apis/<NameInPascalCase>/api.ts\`. Route handlers exporting \`GET\`, \`POST\`, etc. that share a path collapse into one \`api()\` keyed by method on the input schema, or split into separate APIs per method. Pick one shape and stay consistent. \`Request\` / \`Response\` / \`NextResponse\` primitives drop entirely; the platform handles HTTP.
66
+ - **Each external HTTP call → integration**. \`fetch("https://api.openai.com/...")\` becomes a declared integration plus \`apiRequest(...)\`. Secrets from \`process.env\`, \`NEXT_PUBLIC_*\`, hardcoded keys, or AI SDK provider configs move into the integration definition. A \`NEXT_PUBLIC_OPENAI_API_KEY\` on the client side is also a security finding worth surfacing in the migration summary.
67
+ - **DB clients** (Drizzle, Prisma, \`@vercel/postgres\`, \`@neondatabase/serverless\`, \`pg\`) → declare in \`integrations: { db: postgres(DB_INTEGRATION_ID) }\` and call \`ctx.integrations.db.query/execute(...)\` with parameterized SQL. Read schema from any included migration files; do not run them against the target integration without asking.
68
+ - **\`next/link\`** → \`import { Link } from "react-router"\` (v7). The \`href\` prop becomes \`to\`.
69
+ - **\`next/navigation\`** → react-router v7 hooks: \`useRouter()\` becomes \`useNavigate()\`, \`usePathname()\` becomes \`useLocation().pathname\`, \`useSearchParams()\` stays \`useSearchParams()\` from \`react-router\` (similar API but not identical, verify call sites).
70
+ - **\`next/image\`** → standard \`<img>\` with the same \`src\`/\`alt\`. Drop the \`width\`/\`height\`/\`priority\` props or convert to inline styles. If the source relied on Next's image optimization (remote loaders, blur placeholders), flag as a \`failed\` item with \`failureReason: "next/image optimization on <usage> has no Superblocks equivalent in this template"\`.
71
+ - **\`next/font/google\`** → **never just delete the import**. The font has to be re-loaded somewhere or it disappears from the migrated app and everything renders in the browser fallback. Three required steps; all three are mandatory:
72
+ - **(a) Load the font.** Pick one shape and stay consistent within the migration:
73
+ 1. **CDN \`@import\` (default; zero new deps).** At the top of \`client/index.css\`: \`@import url('https://fonts.googleapis.com/css2?family=<Family>:wght@<weights>&display=swap');\`. Bring over both the sans and mono family the source used.
74
+ 2. **Self-hosted via npm.** For Geist specifically: \`pnpm add geist\`, then \`import 'geist/font/sans'; import 'geist/font/mono';\` from \`client/main.tsx\` (it injects \`@font-face\` and exposes \`--font-geist-sans\` / \`--font-geist-mono\`). For other Google fonts: \`pnpm add @fontsource-variable/<family>\` and \`import '@fontsource-variable/<family>';\`.
75
+ - **(b) Bind it in \`@theme\`.** The starter \`client/index.css\` ships with no \`--font-sans\` token, so even after loading the font you must add \`@theme { --font-sans: '<Family>', ui-sans-serif, system-ui, sans-serif; --font-mono: '<MonoFamily>', ui-monospace, monospace; }\` (or a \`var(--font-geist-sans)\` reference for the self-hosted Geist case). Without this, Tailwind's \`font-sans\` keeps using the browser default.
76
+ - **(c) Drop the source's \`next/font\` import and the \`className={font.variable}\` wiring** on \`<html>\` / \`<body>\` — the Tailwind token from (b) carries the variable forward instead.
77
+
78
+ The most common port failure is silently dropping (a): the agent removes the \`next/font\` import as part of "drop Next-isms" and never adds a replacement, so the migrated app renders in system fonts. (b) without (a) is just as bad. **Verify by inspecting a heading in DevTools and confirming \`font-family\` resolves to the source's family, not \`ui-sans-serif\`/system fallback.** If a font is intentionally not carried over, surface it as a \`failed\` item with a reason; do not drop silently.
79
+
80
+ - **\`next/font/local\`** → copy the font files to \`client/public/fonts/\`, write matching \`@font-face\` blocks in \`client/index.css\`, and bind the family name in \`@theme\`. Preserve the original \`font-display\`, weight, and style.
81
+ - **\`app/layout.tsx\`** → fold into \`client/App.tsx\` (the root shell with \`<AppProvider>\` + \`<Outlet />\`) or into specific page wrappers, depending on what each layout provided. Theme providers, font loaders, and metadata setters from layouts collapse into the App shell or \`client/index.css\`. The \`<html>\`/\`<body>\` shell drops; the platform owns it.
82
+ - **\`app/loading.tsx\`** → component-level loading state in the page, driven by \`useApiData\`'s loading boolean. There is no implicit Suspense boundary in this template.
83
+ - **\`app/error.tsx\`** → react-router v7 \`errorElement\` on the route, or a try/catch around the API hook with a fallback render.
84
+ - **\`metadata\` exports / \`generateMetadata\`** → drop, or set \`document.title\` via \`useEffect\` if the page title matters. Open Graph / Twitter card metadata has no equivalent here.
85
+ - **\`middleware.ts\`** → drop. If it was enforcing auth, the equivalent enforcement happens server-side in each \`api()\` via \`ctx.user\`. If it was rewriting URLs, surface to the user — Superblocks has no URL-rewriting layer.
86
+ - **\`"use client"\` / \`"use server"\` directives** → drop. Every component in the Superblocks template is a client component; every server-side function lives in \`server/apis/\`. There is no RSC boundary to mark.
87
+ - **\`next-themes\`** → translate to a small custom provider that toggles a \`class="dark"\` on \`document.documentElement\` and persists to \`localStorage\`, or drop entirely and pin the theme. The \`next-themes\` package depends on Next-specific hydration behavior and should not be carried over as-is. Preserve the source's CSS variable scheme (\`:root\` / \`.dark\` blocks in \`globals.css\`) — only the JS toggle changes.
88
+ - **\`@vercel/analytics\`** → drop. The \`<Analytics />\` component and \`track()\` helper are bound to the Vercel platform and have no equivalent here. Note in the migration summary if the source relied on it.
89
+
90
+ ## Ask-before-guessing — v0 specifics
91
+
92
+ - "The source uses Server Actions / API Routes calling \`<DB client>\` against \`<DSN env var>\`. I'll bind to a Postgres integration; which one, or do you want to create a new one?"
93
+ - "I see external HTTP calls to \`<host>\` with credentials in \`<env var>\`. Bind to an integration of type \`<kind>\`?"
94
+ - "I see \`<feature>\` (streaming AI responses, edge runtime, ISR, etc.) which has no equivalent in this template. Drop, degrade, or stop and let you decide?"
95
+ - "I see Server Components fetching data inline. The migrated app cannot server-render; the page will hydrate from the API with a loading state. Is that acceptable, or do you want a particular skeleton/loading shape?"
96
+ - "The source has a \`middleware.ts\` doing \`<auth/redirect/rewrite>\`. I'll drop it and enforce equivalent rules in each API via \`ctx.user\`. Is that the right user-claim mapping?"
97
+
98
+ ## Page port — what changes vs. what doesn't
99
+
100
+ For each v0 page, only these change:
101
+
102
+ - **Data hooks**: Server Component inline fetch / Server Action calls / API Route fetches → \`useApi\` / \`useApiData\`.
103
+ - **Auth touchpoints**: NextAuth / Clerk / \`middleware.ts\` checks → platform-managed (drop the provider; consume \`ctx.user\` server-side).
104
+ - **Router primitives**: \`next/link\`, \`next/navigation\`, file-system routing → react-router v7 (\`Link\`, \`useNavigate\`, \`useLocation\`, explicit route definitions in \`client/router.tsx\`).
105
+ - **Asset primitives**: \`next/image\` → \`<img>\`, \`next/font\` → CSS-loaded fonts.
106
+ - **Directives**: \`"use client"\` / \`"use server"\` removed.
107
+
108
+ Everything else (JSX structure, Tailwind classes, shadcn variants, custom CSS, theme tokens, layout containers) transfers unchanged. If the diff goes beyond data + auth + routing + asset/font primitives + directive removal, you are over-editing.
109
+
110
+ ## Done — v0 specifics
111
+
112
+ In the final report, additionally surface:
113
+
114
+ - Any unsupported features that became \`failed\` items (streaming AI responses, server-side rendering, ISR, \`next/image\` optimization, edge runtime, route rewrites, etc.).
115
+ - Any \`NEXT_PUBLIC_*\` secrets found on the client side (these should be rotated even after migration).
116
+ - The list of \`next/*\` imports that were translated, so the user can spot-check them in the migrated tree.
117
+ `;
118
+ //# sourceMappingURL=v0.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v0.generated.js","sourceRoot":"","sources":["../../../../../src/ai-service/skills/system/third-party-migration/v0.generated.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,mDAAmD;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHtB,CAAC"}
@@ -113,7 +113,7 @@ export class Clark extends TracedFSM {
113
113
  };
114
114
  }
115
115
  resetContext() {
116
- this.logger.info(`[ai-service] resetContext`);
116
+ this.logger.info(`[ai-service] resetContext state=${this.state}`);
117
117
  this.updateContext((ctx) => {
118
118
  return {
119
119
  // The peer reference is a permanent StablePeer proxy and must be
@@ -1 +1 @@
1
- {"version":3,"file":"clark-fsm.js","sourceRoot":"","sources":["../../../src/ai-service/state-machine/clark-fsm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AA+BlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAe/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAqBjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EACL,SAAS,GAGV,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,GAAG;IACR,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAGjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AACjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM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C,CAAC;IACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AA2DA,OAAO,EAWL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAiiBzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,UAAU,uBAAuB,MAInB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CA2cxD,CAAC"}
1
+ {"version":3,"file":"llm-generating.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AA4DA,OAAO,EAWL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AA6jBzB,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,UAAU,uBAAuB,MAInB,WAAW,eAAe,KAAG,OAAO,CAAC,IAAI,CAqdxD,CAAC"}
@@ -143,7 +143,7 @@ note: This archive was not uploaded to persistent storage, so downloadAttachment
143
143
  throw new Error("Unsupported attachment type");
144
144
  });
145
145
  };
146
- const buildUserMessage = ({ userPrompt, promptContext, planContext, mode, services, userChanges, userFactsSection, pendingKnowledgeFreeTextTurn, pendingKnowledgeEntries, skillsNeedReload, useSystemSkills, }) => {
146
+ const buildUserMessage = ({ preferredAppInferenceIntegration, userPrompt, promptContext, planContext, mode, services, userChanges, userFactsSection, pendingKnowledgeFreeTextTurn, pendingKnowledgeEntries, skillsNeedReload, useSystemSkills, }) => {
147
147
  const content = [];
148
148
  // If context was recently summarized, remind Clark to re-read skills
149
149
  if (skillsNeedReload && useSystemSkills) {
@@ -331,7 +331,14 @@ Do not rely on prior knowledge from skills that may have been summarized away.
331
331
  text: `<focused_entities>\nThe user has focused the editor on the following entities corresponding to the current app state. Attempt to constrain your actions to affect only these entities.\n${safeJsonStringify(focusedEntitiesWithSemanticInfo)}\n\n`,
332
332
  });
333
333
  }
334
- // Add selected integrations if present
334
+ // Add selected integrations if present.
335
+ //
336
+ // Integration `displayName` / `name` are user-controlled (org admins set them), so
337
+ // anything we interpolate into a tag-delimited prompt block must be escaped or a
338
+ // crafted name (e.g. `</selected_integrations>...`) could close the block and inject
339
+ // attacker-controlled instructions into the system prompt. We do that by escaping
340
+ // `<` and `>` in the JSON payload before interpolation.
341
+ const escapeTagDelimiters = (json) => json.replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
335
342
  if (selectedIntegrations?.length) {
336
343
  // Omit metadata to reduce token usage - only include essential identifying information
337
344
  // Send displayName as "name" so message shows original name
@@ -343,7 +350,7 @@ Do not rely on prior knowledge from skills that may have been summarized away.
343
350
  }));
344
351
  content.push({
345
352
  type: "text",
346
- text: `<selected_integrations>\nThe user has explicitly selected the following integration configurations to use. You MUST use these specific integrations when creating or modifying APIs.\n${safeJsonStringify(integrationsWithoutMetadata)}\n</selected_integrations>\n\n`,
353
+ text: `<selected_integrations>\nThe user has explicitly selected the following integration configurations to use. You MUST use these specific integrations when creating or modifying APIs.\n${escapeTagDelimiters(safeJsonStringify(integrationsWithoutMetadata))}\n</selected_integrations>\n\n`,
347
354
  });
348
355
  // Add required skill reads based on integration types (YAML APIs only)
349
356
  const requiredSkillRefs = getRequiredSkillReferences(selectedIntegrations);
@@ -357,6 +364,19 @@ Do not rely on prior knowledge from skills that may have been summarized away.
357
364
  });
358
365
  }
359
366
  }
367
+ if (preferredAppInferenceIntegration) {
368
+ const defaultPayload = {
369
+ id: preferredAppInferenceIntegration.id,
370
+ name: preferredAppInferenceIntegration.displayName ||
371
+ preferredAppInferenceIntegration.name,
372
+ tagName: preferredAppInferenceIntegration.name,
373
+ type: preferredAppInferenceIntegration.type,
374
+ };
375
+ content.push({
376
+ type: "text",
377
+ text: `<default_ai_integration>\nThe organization has configured the following integration as the default for AI inference in customer-built apps:\n${escapeTagDelimiters(safeJsonStringify(defaultPayload))}\nWhen the user asks for AI-powered functionality (chatbots, summarization, classification, content generation, semantic search, etc.), DIRECTLY use this integration for AI inference. Do NOT use askMultiChoice or searchIntegrations to ask which AI provider to use — this integration is already the organization's chosen default. Include its ID in integrationIds when calling exitPlanMode for plans that involve AI-powered features. Only pick a different AI integration if the user explicitly names another provider.\n</default_ai_integration>\n\n`,
378
+ });
379
+ }
360
380
  // Add integration-specific knowledge facts
361
381
  if (userFactsSection) {
362
382
  content.push({
@@ -511,7 +531,12 @@ export const doLLMGenerating = (clark, services) => {
511
531
  void services.logger.info("[llm-generating] System prompt:", {
512
532
  system,
513
533
  });
534
+ const preferredAppInferenceIntegrationId = promptContext?.aiConfiguration?.preferredAppInferenceIntegrationId;
535
+ const preferredAppInferenceIntegration = preferredAppInferenceIntegrationId
536
+ ? await services.integrationStore.availableIntegration(preferredAppInferenceIntegrationId)
537
+ : undefined;
514
538
  const user = buildUserMessage({
539
+ preferredAppInferenceIntegration,
515
540
  userPrompt,
516
541
  promptContext,
517
542
  planContext,
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,OAAO,EACL,YAAY,EACZ,MAAM,EACN,yBAAyB,GAQ1B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B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IAAI,EAAE,iBAAiB;qBACxB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,KAAK,CAAC,MAAM,CAAC,IAAI,CACf,yGAAyG,CAC1G,CAAC;oBACF,KAAK,YAAY,CAAQ;wBACvB,IAAI,EAAE,iCAAiC;qBACxC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"llm-generating.js","sourceRoot":"","sources":["../../../../src/ai-service/state-machine/handlers/llm-generating.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,OAAO,EACL,YAAY,EACZ,MAAM,EACN,yBAAyB,GAQ1B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,qCAAqC,GACtC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAMtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EACL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