You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,16 @@ Without Traefik, use `http://localhost:<port>` directly. The `*.klicker.com` dom
217
217
-**Local embed harness target**: `util/embed-harness/` is for local verification only and should target the branch-local PWA (`http://127.0.0.1:3101/...`), not `https://pwa.klicker.com/...`, because production CSP / `frame-ancestors` blocks localhost embedding. (`util/embed-harness/`)
218
218
-**Chat PWA login redirects**: `apps/chat/src/app/noLogin/page.tsx` must pass an absolute chat URL to the PWA login `redirect_to`; a relative chatbot path makes the PWA redirect to its own domain and 404. Local chat dev also needs ignored local env values for the backend `APP_SECRET` and `DATABASE_URL` so participant cookies verify and Prisma can load chatbot data.
219
219
-**Chat Vitest alias resolution**: `apps/chat/vitest.config.ts` mirrors the app `@/*` alias from `apps/chat/tsconfig.json`; keep this in sync when adding client tests for modules that import from `@/src/...`.
220
+
-**mcp-student build**: The TypeScript student MCP app uses plain `tsc -p tsconfig.build.json`; Rollup emitted `dist` but kept the process alive during initial setup, so keep this service unbundled unless there is a concrete reason to revisit. (`apps/mcp-student/`)
221
+
-**mcp-student backend boundary**: `apps/mcp-student` must not use Prisma directly. Fetch practice pools through the participant-scoped GraphQL operation `studentMcpCoursePracticeQuiz`, which validates chatbot/course/enrollment and reuses `CourseService.getCoursePracticeQuiz` ordering. (`apps/mcp-student/src/graphqlClient.ts`, `packages/graphql/src/services/courses.ts`)
222
+
-**mcp-student GraphQL transport**: Use `@apollo/client/core` with generated documents from `@klicker-uzh/graphql/dist/ops.js` and persisted hashes from `dist/client.json`; do not hard-code operation hashes or rely on non-persisted document POSTs for this service. (`apps/mcp-student/src/graphqlClient.ts`)
223
+
-**Local dev Node TLS**: Node services must call local apps through the verified `https://*.klicker.com` Traefik domains. `_create_ssl_certificates.sh` copies the mkcert root to ignored `util/traefik/ssl/rootCA.pem`, and `_run_with_infisical.sh --env dev*` exports it as `NODE_EXTRA_CA_CERTS`. (`util/_create_ssl_certificates.sh`, `util/_run_with_infisical.sh`)
224
+
-**Student practice MCP chat boundary**: `apps/chat` calls `apps/mcp-student` server-side via `MCP_STUDENT_URL`; only the answer-safe `start_student_practice_quiz` tool is exposed to the model, while answer submission stays behind the authenticated chat API route. (`apps/chat/src/services/studentPracticeMcp.ts`, `apps/chat/src/app/api/chatbots/[chatbotId]/practice/submit/route.ts`)
225
+
-**Student practice history cards**: Signed MCP `questionRef` values expire, so chat history cards must be read-only after expiry. New quiz payloads include `expiresAt`; older payloads without it should be treated as archived. (`apps/chat/src/components/student-practice-quiz-card.tsx`, `apps/mcp-student/src/questionRef.ts`)
226
+
-**mcp-student deployment boundary**: The Helm chart deploys `mcp-student` as an internal ClusterIP service and injects `MCP_STUDENT_URL` into chat. By default it reads `APP_SECRET` from the existing chat secret so participant MCP JWT validation and question refs use the same signing material. (`deploy/charts/klicker-uzh-v3/templates/deployment-mcp-student.yaml`, `deploy/charts/klicker-uzh-v3/templates/cm-chat.yaml`)
227
+
-**Shared practice renderer in chat**: Do not wrap `StudentElement` in a chat-owned `<form>`; shared answer option buttons are regular buttons and can behave like implicit submit controls inside forms. Use an explicit chat submit button instead. (`apps/chat/src/components/student-practice-quiz-card.tsx`, `packages/shared-components/src/questions/`)
228
+
-**Chat shared-component i18n**: Shared practice components use `next-intl` hooks, so `apps/chat` must wrap its App Router tree in `NextIntlClientProvider` before rendering them. (`apps/chat/src/app/layout.tsx`, `packages/shared-components/src/StudentElement.tsx`)
229
+
-**Chat model reasoning effort changes**: Adding a reasoning effort requires updating chat validation, the GraphQL enum/schema, generated GraphQL artifacts, and the manage chatbot settings effort order; model-specific availability belongs in the chat and GraphQL model registries. (`apps/chat/src/lib/config/reasoning.ts`, `packages/graphql/src/schema/resource.ts`, `apps/frontend-manage/src/components/resources/chatbots/ChatbotDetails.tsx`)
'Show a selected answer-safe practice quiz question to the student. Use only candidateId values from the current relevant practice candidate context.',
911
+
inputSchema: z.object({
912
+
candidateId: z
913
+
.string()
914
+
.min(1)
915
+
.describe('Candidate id from the current practice candidate context'),
0 commit comments