ubiquitous-invention/apps/web/package.json

95 lines
3 KiB
JSON
Raw Normal View History

{
"name": "@tasks/web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
chore(lint+types): green pnpm lint && pnpm type-check from a clean clone Path-A first task: get the repo's two repo-wide quality gates passing. Both were failing from a clean clone in ways that were silently hiding each other. Headline fixes: * apps/web: add an eslint 9 flat config (eslint.config.mjs) using FlatCompat against next/core-web-vitals + next/typescript, and switch the `lint` script from `next lint` to `eslint .`. Previously `next lint` fell into its interactive setup prompt because there was no config at all in apps/web, which made `pnpm lint` permanently fail before any rule ever ran. * packages/shared/src/utils/id.ts: replace `randomUUID` from `node:crypto` with `globalThis.crypto.randomUUID`. `@tasks/shared` is forbidden from using Node-only APIs (per AGENTS.md / repo-overview.mdc) because it has to be importable from the browser bundle. Adjacent fixes pulled in to make the gates actually green: * apps/mcp-server/tsconfig.json: drop vestigial rootDir / declaration* / outDir / sourceMap (build is via tsup, not tsc emit) and add allowImportingTsExtensions. The MCP server uses `.ts`-extension re-export shims (db.ts / schema.ts / shared-types.ts) so tsup can inline workspace .ts sources into the bundle. * apps/collab-server/tsconfig.json: same simplification. * apps/mcp-server/package.json: add @types/node so `process.env` in packages/database/src/client.ts (transitively pulled into the MCP server's type-check) resolves. * apps/web/components/ui/input.tsx: empty `interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}` -> `type` alias. * apps/web/server/lib/workspace-guard.ts: `from(args.table as any)` -> `as unknown as PgTable` with a comment. Standard drizzle escape hatch for structural generic tables. * apps/web/components/whiteboard/shapes/{document,project,task}-card.tsx: `BaseBoxShapeUtil<any>` -> `BaseBoxShapeUtil<{Shape}>` plus inline `declare module "@tldraw/tlschema"` augmentation of TLGlobalShapePropsMap. Required adding @tldraw/tlschema as a direct devDep of apps/web so the augmentation target resolves; previously it was only present transitively under tldraw's own deps. Result: `pnpm lint && pnpm type-check` exits 0 across all 6 packages. 16 unused-import / exhaustive-deps warnings remain; they're pre-existing housekeeping and out of scope for this task. Closes plans/Plan-daily-driver-finish/Epic-shipping-the-shell/ Task-fix-lint-and-shared-types.md (status: done). Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 01:11:52 -04:00
"lint": "eslint .",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@ai-sdk/openai": "^1",
feat(web): wire AI chat page to streaming /api/chat handler Path-A task 3/5. Replaces the setTimeout mock that returned the literal "Full AI integration is coming soon!" string with a real streaming provider call. * apps/web/app/api/chat/route.ts (new): POST handler that runs the same auth + resolveWorkspace pipeline workspaceProcedure uses, then streams a response from streamText().toDataStreamResponse(). Maps resolveWorkspace's TRPCError codes to HTTP status (401/403/404/400). Returns a structured 503 with a human-readable hint when OPENAI_API_KEY is unset, so the misconfiguration is surfaced rather than masked by a fake stream. * apps/web/app/(app)/[workspaceSlug]/ai/page.tsx: replace the local message-state + setTimeout placeholder with useChat from @ai-sdk/react. workspace slug is sent on every request body so the server can enforce tenant scoping. Adds a ChatErrorBanner that parses the JSON error body the route emits and renders amber for the "unavailable" case, destructive for other failures. * apps/web/package.json: pull in @ai-sdk/react as a direct dep (previously only transitive via `ai`). The existing aiRouter.chat tRPC mutation is left intact — it powers the right-panel command palette via the non-streaming generateText path, and rebuilding that as streaming was outside the scope of making the dedicated chat page usable. Provider selection still flows from env per packages/ai conventions: OPENAI_API_KEY gates availability, OPENAI_BASE_URL lets operators route through Ollama on CT 108 transparently, OPENAI_MODEL overrides the default gpt-4o-mini. `pnpm lint && pnpm type-check` clean. Closes plans/Plan-daily-driver-finish/Epic-shipping-the-shell/ Task-wire-ai-chat-to-trpc.md. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 01:23:21 -04:00
"@ai-sdk/react": "^1",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@hocuspocus/provider": "^3.4.4",
"@radix-ui/react-avatar": "^1.1.3",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-collapsible": "^1.1.3",
"@radix-ui/react-dialog": "^1.1.6",
"@radix-ui/react-dropdown-menu": "^2.1.6",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-scroll-area": "^1.2.3",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"@tanstack/react-query": "^5.62.0",
"@tasks/ai": "workspace:*",
"@tasks/database": "workspace:*",
"@tasks/shared": "workspace:*",
"@tiptap/extension-code-block": "^3.20.5",
"@tiptap/extension-collaboration": "^3.20.5",
"@tiptap/extension-collaboration-cursor": "^2.26.2",
"@tiptap/extension-heading": "^3.20.5",
"@tiptap/extension-highlight": "^3.20.5",
"@tiptap/extension-horizontal-rule": "^3.20.5",
"@tiptap/extension-image": "^3.20.5",
"@tiptap/extension-link": "^3.20.5",
"@tiptap/extension-placeholder": "^3.20.5",
"@tiptap/extension-table": "^3.20.5",
"@tiptap/extension-table-cell": "^3.20.5",
"@tiptap/extension-table-header": "^3.20.5",
"@tiptap/extension-table-row": "^3.20.5",
"@tiptap/extension-task-item": "^3.20.5",
"@tiptap/extension-task-list": "^3.20.5",
"@tiptap/extension-text-align": "^3.20.5",
"@tiptap/extension-typography": "^3.20.5",
"@tiptap/extension-underline": "^3.20.5",
"@tiptap/pm": "^3.20.5",
"@tiptap/react": "^3.20.5",
"@tiptap/starter-kit": "^3.20.5",
"@tiptap/suggestion": "^3.20.5",
"@trpc/client": "^11.0.0",
"@trpc/react-query": "^11.0.0",
"@trpc/server": "^11.0.0",
"ai": "^4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"drizzle-orm": "^0.38.0",
"lucide-react": "^0.468.0",
"next": "^15.1.0",
"next-auth": "^5.0.0-beta.25",
"next-themes": "^0.4.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"superjson": "^2.2.2",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"tldraw": "^4.5.4",
"y-prosemirror": "^1.3.7",
"yjs": "^13.6.22",
"zod": "^3.24.0",
"zustand": "^5.0.0"
},
"devDependencies": {
chore(lint+types): green pnpm lint && pnpm type-check from a clean clone Path-A first task: get the repo's two repo-wide quality gates passing. Both were failing from a clean clone in ways that were silently hiding each other. Headline fixes: * apps/web: add an eslint 9 flat config (eslint.config.mjs) using FlatCompat against next/core-web-vitals + next/typescript, and switch the `lint` script from `next lint` to `eslint .`. Previously `next lint` fell into its interactive setup prompt because there was no config at all in apps/web, which made `pnpm lint` permanently fail before any rule ever ran. * packages/shared/src/utils/id.ts: replace `randomUUID` from `node:crypto` with `globalThis.crypto.randomUUID`. `@tasks/shared` is forbidden from using Node-only APIs (per AGENTS.md / repo-overview.mdc) because it has to be importable from the browser bundle. Adjacent fixes pulled in to make the gates actually green: * apps/mcp-server/tsconfig.json: drop vestigial rootDir / declaration* / outDir / sourceMap (build is via tsup, not tsc emit) and add allowImportingTsExtensions. The MCP server uses `.ts`-extension re-export shims (db.ts / schema.ts / shared-types.ts) so tsup can inline workspace .ts sources into the bundle. * apps/collab-server/tsconfig.json: same simplification. * apps/mcp-server/package.json: add @types/node so `process.env` in packages/database/src/client.ts (transitively pulled into the MCP server's type-check) resolves. * apps/web/components/ui/input.tsx: empty `interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}` -> `type` alias. * apps/web/server/lib/workspace-guard.ts: `from(args.table as any)` -> `as unknown as PgTable` with a comment. Standard drizzle escape hatch for structural generic tables. * apps/web/components/whiteboard/shapes/{document,project,task}-card.tsx: `BaseBoxShapeUtil<any>` -> `BaseBoxShapeUtil<{Shape}>` plus inline `declare module "@tldraw/tlschema"` augmentation of TLGlobalShapePropsMap. Required adding @tldraw/tlschema as a direct devDep of apps/web so the augmentation target resolves; previously it was only present transitively under tldraw's own deps. Result: `pnpm lint && pnpm type-check` exits 0 across all 6 packages. 16 unused-import / exhaustive-deps warnings remain; they're pre-existing housekeeping and out of scope for this task. Closes plans/Plan-daily-driver-finish/Epic-shipping-the-shell/ Task-fix-lint-and-shared-types.md (status: done). Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 01:11:52 -04:00
"@eslint/eslintrc": "^3.3.5",
"@tailwindcss/typography": "^0.5.16",
chore(lint+types): green pnpm lint && pnpm type-check from a clean clone Path-A first task: get the repo's two repo-wide quality gates passing. Both were failing from a clean clone in ways that were silently hiding each other. Headline fixes: * apps/web: add an eslint 9 flat config (eslint.config.mjs) using FlatCompat against next/core-web-vitals + next/typescript, and switch the `lint` script from `next lint` to `eslint .`. Previously `next lint` fell into its interactive setup prompt because there was no config at all in apps/web, which made `pnpm lint` permanently fail before any rule ever ran. * packages/shared/src/utils/id.ts: replace `randomUUID` from `node:crypto` with `globalThis.crypto.randomUUID`. `@tasks/shared` is forbidden from using Node-only APIs (per AGENTS.md / repo-overview.mdc) because it has to be importable from the browser bundle. Adjacent fixes pulled in to make the gates actually green: * apps/mcp-server/tsconfig.json: drop vestigial rootDir / declaration* / outDir / sourceMap (build is via tsup, not tsc emit) and add allowImportingTsExtensions. The MCP server uses `.ts`-extension re-export shims (db.ts / schema.ts / shared-types.ts) so tsup can inline workspace .ts sources into the bundle. * apps/collab-server/tsconfig.json: same simplification. * apps/mcp-server/package.json: add @types/node so `process.env` in packages/database/src/client.ts (transitively pulled into the MCP server's type-check) resolves. * apps/web/components/ui/input.tsx: empty `interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}` -> `type` alias. * apps/web/server/lib/workspace-guard.ts: `from(args.table as any)` -> `as unknown as PgTable` with a comment. Standard drizzle escape hatch for structural generic tables. * apps/web/components/whiteboard/shapes/{document,project,task}-card.tsx: `BaseBoxShapeUtil<any>` -> `BaseBoxShapeUtil<{Shape}>` plus inline `declare module "@tldraw/tlschema"` augmentation of TLGlobalShapePropsMap. Required adding @tldraw/tlschema as a direct devDep of apps/web so the augmentation target resolves; previously it was only present transitively under tldraw's own deps. Result: `pnpm lint && pnpm type-check` exits 0 across all 6 packages. 16 unused-import / exhaustive-deps warnings remain; they're pre-existing housekeeping and out of scope for this task. Closes plans/Plan-daily-driver-finish/Epic-shipping-the-shell/ Task-fix-lint-and-shared-types.md (status: done). Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 01:11:52 -04:00
"@tldraw/tlschema": "4.5.4",
"@types/node": "^22.10.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.16.0",
"eslint-config-next": "^15.1.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.0"
}
}