@okhay-p/mivra 0.1.2 → 0.1.4
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.
- package/README.md +1 -0
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/chunk-KE5ZEREE.js +212 -0
- package/dist/chunk-KE5ZEREE.js.map +7 -0
- package/dist/chunk-KUKQU7EQ.js +755 -0
- package/dist/chunk-KUKQU7EQ.js.map +7 -0
- package/dist/chunk-ODFBAPPH.js +489 -0
- package/dist/chunk-ODFBAPPH.js.map +7 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +7 -0
- package/dist/chunk-TBAR47I6.js +32 -0
- package/dist/chunk-TBAR47I6.js.map +7 -0
- package/dist/chunk-YACRW47X.js +1203 -0
- package/dist/chunk-YACRW47X.js.map +7 -0
- package/dist/cli.js +256 -11188
- package/dist/cli.js.map +4 -4
- package/dist/client-5YDLS4KV.js +12 -0
- package/dist/client-5YDLS4KV.js.map +7 -0
- package/dist/extract-child.js +107 -173
- package/dist/extract-child.js.map +3 -3
- package/dist/key-check-WJ4CVZV5.js +8 -0
- package/dist/key-check-WJ4CVZV5.js.map +7 -0
- package/dist/start-76LKE3DL.js +13906 -0
- package/dist/start-76LKE3DL.js.map +7 -0
- package/drizzle/0012_overconfident_the_santerians.sql +66 -0
- package/drizzle/0013_next_dormammu.sql +1 -0
- package/drizzle/0014_furry_inertia.sql +1 -0
- package/drizzle/0015_spotty_warstar.sql +1 -0
- package/drizzle/0016_fresh_wiccan.sql +1 -0
- package/drizzle/0017_amusing_james_howlett.sql +28 -0
- package/drizzle/0018_happy_hairball.sql +43 -0
- package/drizzle/meta/0012_snapshot.json +1741 -0
- package/drizzle/meta/0013_snapshot.json +1749 -0
- package/drizzle/meta/0014_snapshot.json +1756 -0
- package/drizzle/meta/0015_snapshot.json +1763 -0
- package/drizzle/meta/0016_snapshot.json +1770 -0
- package/drizzle/meta/0017_snapshot.json +1956 -0
- package/drizzle/meta/0018_snapshot.json +2280 -0
- package/drizzle/meta/_journal.json +49 -0
- package/package.json +2 -1
- package/web/assets/index-C_DsRKCc.css +1 -0
- package/web/assets/index-DbKDW1xS.js +413 -0
- package/web/assets/notes-graph.worker-DaVQvftJ.js +1 -0
- package/web/assets/render.worker-BAfybD27.js +416 -0
- package/web/index.html +2 -2
- package/web/assets/index-BfT-sp3_.js +0 -406
- package/web/assets/index-FIC4B_yh.css +0 -1
- package/web/assets/render.worker-Bw6rO7Qu.js +0 -413
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../protocol/src/course.ts", "../../protocol/src/lesson.ts", "../../protocol/src/memory.ts", "../../protocol/src/document.ts", "../../protocol/src/knowledge.ts", "../../protocol/src/vault.ts", "../../protocol/src/index.ts", "../../protocol/src/artifact-math-input.ts", "../../protocol/src/math-text.ts", "../../protocol/src/algorithm-trace.ts", "../../protocol/src/code-walkthrough.ts", "../../protocol/src/graph.ts", "../../protocol/src/multiple-choice.ts", "../../protocol/src/set-diagram.ts", "../../protocol/src/table.ts", "../../protocol/src/worked-steps.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from \"zod\";\n\n/**\n * Courses (ADR-011): one learning goal, a placement interview, then a syllabus of ordered topics\n * written by the AI. The learner never approves the syllabus; they change it later through the tutor.\n */\n\nexport const MAX_GOAL_CHARS = 300;\nexport const CourseGoal = z.string().trim().min(1).max(MAX_GOAL_CHARS);\n\n/** Body of POST /courses. */\nexport const StartCourse = z.object({ goal: CourseGoal }).strict();\nexport type StartCourse = z.infer<typeof StartCourse>;\n\nconst ConceptName = z.string().trim().min(1).max(80);\n\n// ---------------------------------------------------------------------------------------------\n// placement_question v1: one interview question. Multiple choice, true/false or yes/no, and the\n// learner can always answer \"Not sure\" or skip it. No confidence rating (owner decision on #1).\n// ---------------------------------------------------------------------------------------------\n\nexport const PlacementQuestionSpec = z\n .object({\n concept: ConceptName.describe('The single concept this question probes, e.g. \"chain rule\". Reuse the exact name from the learner\\'s record when it is there.'),\n question: z.string().trim().min(1).max(1000),\n options: z\n .array(z.object({ text: z.string().trim().min(1).max(300) }).strict())\n .min(2)\n .max(5)\n .describe('2-5 options with distinct text. For true/false or yes/no use two options, e.g. \"True\" and \"False\". Never add a \"Not sure\" option: the UI always offers one.'),\n correctOptionIndex: z.number().int().nonnegative().describe(\"0-based index of the single correct option.\"),\n explanation: z.string().trim().min(1).max(600).describe(\"One or two sentences shown after answering: why the correct option is correct.\"),\n })\n .strict()\n .superRefine((spec, ctx) => {\n if (spec.correctOptionIndex >= spec.options.length) {\n ctx.addIssue({ code: \"custom\", path: [\"correctOptionIndex\"], message: \"correctOptionIndex must point at one of the options\" });\n }\n const seen = new Map<string, number>();\n spec.options.forEach((option, i) => {\n const key = option.text.normalize(\"NFC\");\n const first = seen.get(key);\n if (first !== undefined) ctx.addIssue({ code: \"custom\", path: [\"options\", i, \"text\"], message: `duplicates option ${first}` });\n else seen.set(key, i);\n if (/^\\s*(not sure|i don'?t know|unsure|skip)\\W*$/i.test(option.text)) {\n ctx.addIssue({ code: \"custom\", path: [\"options\", i, \"text\"], message: \"Leave out Not sure / Skip: the UI always offers them\" });\n }\n });\n });\nexport type PlacementQuestionSpec = z.infer<typeof PlacementQuestionSpec>;\n\n/** What the client sees before answering. */\nexport const PlacementQuestionPublic = z\n .object({ concept: z.string(), question: z.string(), options: z.array(z.object({ text: z.string() }).strict()) })\n .strict();\nexport type PlacementQuestionPublic = z.infer<typeof PlacementQuestionPublic>;\n\nexport const toPlacementQuestionPublic = (spec: PlacementQuestionSpec): PlacementQuestionPublic => ({\n concept: spec.concept,\n question: spec.question,\n options: spec.options.map((o) => ({ text: o.text })),\n});\n\nexport const PlacementAnswer = z.union([\n z.object({ optionIndex: z.number().int().nonnegative() }).strict(),\n z.object({ unsure: z.literal(true) }).strict(),\n z.object({ skipped: z.literal(true) }).strict(),\n]);\nexport type PlacementAnswer = z.infer<typeof PlacementAnswer>;\n\nexport const PlacementResult = z.enum([\"correct\", \"incorrect\", \"unsure\", \"skipped\"]);\nexport type PlacementResult = z.infer<typeof PlacementResult>;\n\nexport const PlacementGrade = z\n .object({ result: PlacementResult, correctOptionIndex: z.number().int().nonnegative(), explanation: z.string() })\n .strict();\nexport type PlacementGrade = z.infer<typeof PlacementGrade>;\n\n/** Deterministic grader. \"Not sure\" counts as not knowing it; a skip is no evidence either way. */\nexport function gradePlacementQuestion(spec: PlacementQuestionSpec, answer: PlacementAnswer): PlacementGrade {\n let result: PlacementResult;\n if (\"optionIndex\" in answer) {\n if (!spec.options[answer.optionIndex]) throw new RangeError(`optionIndex ${answer.optionIndex} is not one of the ${spec.options.length} options`);\n result = answer.optionIndex === spec.correctOptionIndex ? \"correct\" : \"incorrect\";\n } else result = \"unsure\" in answer ? \"unsure\" : \"skipped\";\n return { result, correctOptionIndex: spec.correctOptionIndex, explanation: spec.explanation };\n}\n\n// ---------------------------------------------------------------------------------------------\n// interview_context v1: the interview's one optional free-text question (#75), asked last, so the\n// learner can say in their own words what they already know or want to explore. Not graded and\n// never evidence: the answer only tailors the syllabus.\n// ---------------------------------------------------------------------------------------------\n\n/** Most characters the learner can write in the interview's free-text answer. */\nexport const MAX_INTERVIEW_CONTEXT_CHARS = 2000;\n\nexport const InterviewContextSpec = z\n .object({\n question: z\n .string()\n .trim()\n .min(1)\n .max(300)\n .describe('The question, e.g. \"Anything else you\\'d like us to know about what you already understand or what you want to explore?\"'),\n })\n .strict();\nexport type InterviewContextSpec = z.infer<typeof InterviewContextSpec>;\n\n/** The learner's words, or a skip. Blank text counts as a skip. */\nexport const InterviewContextAnswer = z.union([\n z.object({ text: z.string().trim().max(MAX_INTERVIEW_CONTEXT_CHARS) }).strict(),\n z.object({ skipped: z.literal(true) }).strict(),\n]);\nexport type InterviewContextAnswer = z.infer<typeof InterviewContextAnswer>;\n\nexport const InterviewContextGrade = z.object({ result: z.enum([\"answered\", \"skipped\"]) }).strict();\nexport type InterviewContextGrade = z.infer<typeof InterviewContextGrade>;\n\n/** Not a grade so much as a label: whether the learner wrote anything. */\nexport const gradeInterviewContext = (answer: InterviewContextAnswer): InterviewContextGrade => ({\n result: \"text\" in answer && answer.text.length > 0 ? \"answered\" : \"skipped\",\n});\n\n// ---------------------------------------------------------------------------------------------\n// Syllabus\n// ---------------------------------------------------------------------------------------------\n\nexport const KnownSource = z.enum([\"memory\", \"test\", \"guess\"]);\nexport type KnownSource = z.infer<typeof KnownSource>;\n\nexport const SyllabusTopicInput = z\n .object({\n title: z.string().trim().min(1).max(120),\n summary: z.string().trim().min(1).max(400).describe(\"What the lesson on this topic will cover, in one or two sentences.\"),\n reason: z.string().trim().min(1).max(300).describe('Why this topic is here for this learner, e.g. \"You missed the question on local minima\".'),\n requestedByLearner: z.boolean().describe(\"True if the learner explicitly asked for this topic. Such topics are never removed automatically.\"),\n concepts: z.array(ConceptName).min(1).max(8).describe(\"Concept names this topic teaches; reuse names from the learner's record and the placement questions.\"),\n })\n .strict();\n\n/**\n * Subject icons a course can have, by Lucide name (#58). The tutor picks one when it writes the first\n * syllabus; clients map the name to an icon and fall back to a graduation cap for none or an unknown name.\n */\nexport const courseIcons = [\n \"sigma\",\n \"calculator\",\n \"code\",\n \"terminal\",\n \"cpu\",\n \"database\",\n \"network\",\n \"shield\",\n \"flask-conical\",\n \"atom\",\n \"dna\",\n \"leaf\",\n \"telescope\",\n \"globe\",\n \"landmark\",\n \"book-open\",\n \"pen-tool\",\n \"languages\",\n \"music\",\n \"palette\",\n \"camera\",\n \"brain\",\n \"users\",\n \"chart-line\",\n \"briefcase\",\n \"scale\",\n \"stethoscope\",\n \"heart-pulse\",\n \"wrench\",\n \"dumbbell\",\n] as const;\nexport const CourseIcon = z.enum(courseIcons);\nexport type CourseIcon = z.infer<typeof CourseIcon>;\n\n/** Most characters in the title the tutor gives a course. */\nexport const COURSE_TITLE_MAX = 60;\n\n/** Input of the write_syllabus tool. The server adds ids, version and timestamps. */\nexport const SyllabusInput = z\n .object({\n // Bad values parse as missing rather than failing the call: a syllabus is worth more than its label (#58).\n title: z\n .string()\n .trim()\n .min(1)\n .max(COURSE_TITLE_MAX)\n .optional()\n .catch(undefined)\n .describe('A short name for the course, 2-5 words, shown in the sidebar, e.g. \"Discrete Math: Induction\". Name what the syllabus covers, not the request.'),\n icon: CourseIcon.optional()\n .catch(undefined)\n .describe(\"The subject icon that best fits the course: sigma = maths, calculator = arithmetic or accounting, code/terminal = programming, cpu = hardware, flask-conical = chemistry, atom = physics, dna = biology, leaf = ecology, telescope = astronomy, globe = geography, landmark = history, book-open = literature, pen-tool = writing, languages = languages, palette = art, brain = psychology, users = sociology, chart-line = economics or statistics, briefcase = business, scale = law, stethoscope/heart-pulse = medicine, wrench = engineering, dumbbell = sport.\"),\n topics: z.array(SyllabusTopicInput).min(1).max(20).describe(\"The ordered topics, first to learn first. Each topic gets one lesson.\"),\n known: z\n .array(\n z\n .object({\n concept: ConceptName,\n source: KnownSource.describe(\"memory = from their record or memories; test = from this placement interview; guess = your inference\"),\n note: z.string().trim().min(1).max(200),\n })\n .strict(),\n )\n .max(20)\n .describe(\"What the learner already knows or doesn't, each labelled with where that comes from. Shown to the learner.\"),\n })\n .strict()\n .superRefine((input, ctx) => {\n const seen = new Set<string>();\n input.topics.forEach((topic, i) => {\n const key = topic.title.trim().toLowerCase();\n if (seen.has(key)) ctx.addIssue({ code: \"custom\", path: [\"topics\", i, \"title\"], message: \"Topic titles must be distinct\" });\n seen.add(key);\n });\n });\nexport type SyllabusInput = z.infer<typeof SyllabusInput>;\n\nexport const SyllabusTopic = SyllabusTopicInput.extend({ id: z.string() }).strict();\nexport type SyllabusTopic = z.infer<typeof SyllabusTopic>;\n\nexport const SyllabusView = z\n .object({\n version: z.number().int().positive(),\n source: z.enum([\"interview\", \"tutor\", \"adaptive\", \"undo\"]),\n reason: z.string().nullable(),\n changedTopicIds: z.array(z.string()),\n /** Whether the learner can undo this version: an automatic change none of whose new topics has started. */\n canUndo: z.boolean(),\n topics: z.array(SyllabusTopic),\n known: SyllabusInput.shape.known,\n createdAt: z.string().datetime(),\n })\n .strict();\nexport type SyllabusView = z.infer<typeof SyllabusView>;\n\nexport const CourseStatus = z.enum([\"interviewing\", \"active\", \"complete\"]);\nexport type CourseStatus = z.infer<typeof CourseStatus>;\n\nexport const CourseView = z\n .object({\n id: z.string(),\n sessionId: z.string(),\n goal: z.string(),\n status: CourseStatus,\n syllabus: SyllabusView.nullable(),\n /** The tutor's reply that wrote the first syllabus, which ends the placement interview; null if unknown. */\n interviewMessageId: z.string().nullable(),\n createdAt: z.string().datetime(),\n })\n .strict();\nexport type CourseView = z.infer<typeof CourseView>;\n", "import { z } from \"zod\";\n\n/**\n * Lessons (ADR-011): one per syllabus topic, generated when the learner reaches it. The outline comes\n * first, then one tool call per section, so each section validates on its own and appears as soon as it\n * is written. A finished lesson is frozen.\n */\n\n/** Section kinds the outline can plan: prose, or an existing artifact kind by its tool's purpose. */\nexport const LessonSectionKind = z.enum([\"prose\", \"algorithm_trace\", \"code_walkthrough\", \"graph\", \"multiple_choice\", \"set_diagram\", \"table\", \"worked_steps\"]);\nexport type LessonSectionKind = z.infer<typeof LessonSectionKind>;\n\nexport const MAX_LESSON_SECTIONS = 10;\n\nexport const LessonOutlineInput = z\n .object({\n title: z.string().trim().min(1).max(120),\n sections: z\n .array(\n z\n .object({\n title: z.string().trim().min(1).max(120),\n kind: LessonSectionKind.describe(\"prose = write_lesson_text; multiple_choice = ask_multiple_choice (a check); the others = the matching show_* tool.\"),\n purpose: z.string().trim().min(1).max(300).describe(\"What this section does for the learner, in one sentence.\"),\n })\n .strict(),\n )\n .min(2)\n .max(MAX_LESSON_SECTIONS)\n .describe(`2-${MAX_LESSON_SECTIONS} sections in reading order. Include at least one multiple_choice check, usually after the idea it checks.`),\n })\n .strict()\n .superRefine((outline, ctx) => {\n if (!outline.sections.some((s) => s.kind === \"multiple_choice\")) {\n ctx.addIssue({ code: \"custom\", path: [\"sections\"], message: \"Include at least one multiple_choice check\" });\n }\n });\nexport type LessonOutlineInput = z.infer<typeof LessonOutlineInput>;\n\nexport const LessonTextInput = z\n .object({\n markdown: z.string().trim().min(1).max(6000).describe(\"The section's prose, as markdown with $...$ and $$...$$ maths. Don't repeat the section title as a heading.\"),\n revisits: z\n .array(z.string().min(1))\n .max(5)\n .optional()\n .describe(\"sectionIds from <previous_lesson> this section revisits. The page links back to them, so don't write links yourself.\"),\n })\n .strict();\nexport type LessonTextInput = z.infer<typeof LessonTextInput>;\n\nexport const LessonStatus = z.enum([\"generating\", \"ready\", \"failed\", \"finished\"]);\nexport type LessonStatus = z.infer<typeof LessonStatus>;\n\nexport const LessonOutlineView = z\n .object({\n title: z.string(),\n sections: z.array(z.object({ title: z.string(), kind: LessonSectionKind }).strict()),\n })\n .strict();\n\n/** A lesson as the client sees it. `artifact` holds an ArtifactView, validated by the client's renderer. */\nexport const LessonView = z\n .object({\n id: z.string(),\n courseId: z.string(),\n topicId: z.string(),\n topicTitle: z.string(),\n position: z.number().int().nonnegative(),\n status: LessonStatus,\n version: z.number().int().positive().nullable(),\n outline: LessonOutlineView.nullable(),\n sections: z.array(\n z.discriminatedUnion(\"kind\", [\n z\n .object({\n id: z.string(),\n title: z.string(),\n kind: z.literal(\"prose\"),\n markdown: z.string(),\n /** Earlier sections this one revisits, for links back to exactly what the learner saw. */\n revisits: z.array(z.object({ lessonId: z.string(), sectionId: z.string(), title: z.string(), lessonTitle: z.string() }).strict()),\n })\n .strict(),\n z.object({ id: z.string(), title: z.string(), kind: z.literal(\"artifact\"), artifact: z.unknown() }).strict(),\n ]),\n ),\n checks: z.object({ total: z.number().int().nonnegative(), answered: z.number().int().nonnegative() }).strict(),\n /** The course's current syllabus version, so a page can notice a change made while it was open. */\n syllabusVersion: z.number().int().positive().nullable(),\n /** Sections the latest version added or changed, highlighted for the learner, and why. */\n changedSectionIds: z.array(z.string()),\n changeReason: z.string().nullable(),\n /** Whether the learner can finish it now: fully written and every check answered. */\n canFinish: z.boolean(),\n error: z.string().nullable(),\n /** A failure the learner fixes elsewhere: \"lesson-model\" means the lesson model chosen in Settings can't be used. */\n errorAction: z.enum([\"lesson-model\"]).nullable(),\n createdAt: z.string().datetime(),\n finishedAt: z.string().datetime().nullable(),\n })\n .strict();\nexport type LessonView = z.infer<typeof LessonView>;\n\n/** One row per syllabus topic, in syllabus order, with its lesson if one exists. */\nexport const CourseLessonsView = z\n .object({\n topics: z.array(\n z\n .object({\n topicId: z.string(),\n title: z.string(),\n lesson: z.object({ id: z.string(), status: LessonStatus }).strict().nullable(),\n })\n .strict(),\n ),\n /** The lesson to show: the first unfinished one, or the last one once all are finished. */\n currentLessonId: z.string().nullable(),\n /** The next topic without a lesson, if the learner may start it now. */\n nextTopicId: z.string().nullable(),\n })\n .strict();\nexport type CourseLessonsView = z.infer<typeof CourseLessonsView>;\n\nconst SectionTitle = z.string().trim().min(1).max(120);\nconst SectionMarkdown = z.string().trim().min(1).max(6000);\nconst Reason = z.string().trim().min(1).max(300);\n\n/**\n * Input of change_lesson: the tutor's edit of the current lesson, on the learner's request (ADR-011).\n * One call makes one new version; the sections it adds or rewrites are highlighted.\n */\nexport const ChangeLessonInput = z\n .object({\n reason: Reason.describe('What the learner asked for, in a few words, e.g. \"Simpler intro with an example\".'),\n operations: z\n .array(\n z.discriminatedUnion(\"op\", [\n z.object({ op: z.literal(\"rewrite\"), sectionId: z.string().min(1), markdown: SectionMarkdown, title: SectionTitle.optional() }).strict()\n .describe(\"Replace a prose section's text (and optionally its title).\"),\n z.object({ op: z.literal(\"insert\"), afterSectionId: z.string().min(1).nullable(), title: SectionTitle, markdown: SectionMarkdown }).strict()\n .describe(\"Add a prose section after the given section, or first if null.\"),\n z.object({ op: z.literal(\"insert_artifact\"), afterSectionId: z.string().min(1).nullable(), title: SectionTitle, artifactId: z.string().min(1) }).strict()\n .describe(\"Add a card you created earlier in this reply (its artifactId) as a section.\"),\n z.object({ op: z.literal(\"remove\"), sectionId: z.string().min(1) }).strict(),\n z.object({ op: z.literal(\"move\"), sectionId: z.string().min(1), afterSectionId: z.string().min(1).nullable() }).strict(),\n ]),\n )\n .min(1)\n .max(10),\n })\n .strict();\nexport type ChangeLessonInput = z.infer<typeof ChangeLessonInput>;\n\n/** Input of change_syllabus: the tutor's edit of the course's future topics, on the learner's request. */\nexport const ChangeSyllabusInput = z\n .object({\n reason: Reason.describe('What the learner asked for, e.g. \"Add a topic on vectors before gradients\".'),\n operations: z\n .array(\n z.discriminatedUnion(\"op\", [\n z\n .object({\n op: z.literal(\"insert\"),\n afterTopicId: z.string().min(1).nullable().describe(\"Insert after this topic; null to insert before the first future topic.\"),\n title: SectionTitle,\n summary: z.string().trim().min(1).max(400),\n reason: Reason,\n concepts: z.array(z.string().trim().min(1).max(80)).min(1).max(8),\n })\n .strict(),\n z.object({ op: z.literal(\"edit\"), topicId: z.string().min(1), title: SectionTitle.optional(), summary: z.string().trim().min(1).max(400).optional() }).strict(),\n z.object({ op: z.literal(\"remove\"), topicId: z.string().min(1) }).strict(),\n z.object({ op: z.literal(\"move\"), topicId: z.string().min(1), afterTopicId: z.string().min(1).nullable() }).strict(),\n ]),\n )\n .min(1)\n .max(10),\n })\n .strict();\nexport type ChangeSyllabusInput = z.infer<typeof ChangeSyllabusInput>;\n\n/** Body of POST /lessons/{id}/sections: keep a tutor's Explain answer as a new section. */\nexport const AddToLesson = z\n .object({\n messageId: z.string().min(1).max(128),\n afterSectionId: z.string().min(1).max(128).nullable(),\n title: SectionTitle,\n })\n .strict();\nexport type AddToLesson = z.infer<typeof AddToLesson>;\n\nconst NewTopic = z\n .object({\n title: SectionTitle,\n summary: z.string().trim().min(1).max(400),\n concepts: z.array(z.string().trim().min(1).max(80)).min(1).max(8),\n })\n .strict();\n\n/**\n * Input of adapt_syllabus: lesson generation's own change to future topics when the learner struggled\n * (ADR-011). Insert, split or reorder only; never removes a topic. At most one per finished lesson.\n */\nexport const AdaptSyllabusInput = z\n .object({\n reason: Reason.describe('Shown to the learner, with the evidence, e.g. \"Added a chain rule refresher: you missed 3 of 4 checks on derivatives\".'),\n operation: z.discriminatedUnion(\"op\", [\n NewTopic.extend({ op: z.literal(\"insert\"), afterTopicId: z.string().min(1).nullable().describe(\"null = straight after this lesson's topic\") }).strict(),\n z.object({ op: z.literal(\"split\"), topicId: z.string().min(1), into: z.array(NewTopic).min(2).max(3) }).strict(),\n z.object({ op: z.literal(\"move\"), topicId: z.string().min(1), afterTopicId: z.string().min(1).nullable() }).strict(),\n ]),\n })\n .strict();\nexport type AdaptSyllabusInput = z.infer<typeof AdaptSyllabusInput>;\n", "import { z } from \"zod\";\n\n/** Memory entries are the model's inferences about the learner, kept apart from graded evidence (ADR-009). */\n\n/** `known` records that the learner's imported notes cover a concept (ADR-014): a claim, ranked below graded evidence. */\nexport const MemoryKind = z.enum([\"goal\", \"preference\", \"misconception\", \"known\"]);\nexport type MemoryKind = z.infer<typeof MemoryKind>;\n\n/** What the remember tool can write in chat. Only distilling imported notes writes `known`. */\nexport const RememberKind = z.enum([\"goal\", \"preference\", \"misconception\"]);\n\nexport const MemoryText = z.string().trim().min(1).max(300);\n\n/** The input of the remember tool. Source, timestamps and basis are set by the server, not the model. */\nexport const RememberInput = z\n .object({\n kind: RememberKind.describe(\"goal = what they want to learn or do; preference = how they like to learn; misconception = something they believe that is wrong.\"),\n text: MemoryText.describe(\"One short sentence about the learner. Never include the answer to a check they haven't answered.\"),\n concept: z.string().trim().min(1).max(80).optional().describe(\"Required for a misconception: the concept it is about. Use the exact name from the check or from their record, so it can be linked to their answers.\"),\n replaces: z.string().min(1).optional().describe(\"The id of a known memory this one corrects or updates.\"),\n })\n .strict()\n .superRefine((input, ctx) => {\n // Without a concept a misconception can't be linked to a wrong answer (ADR-009).\n if (input.kind === \"misconception\" && !input.concept) {\n ctx.addIssue({ code: \"custom\", path: [\"concept\"], message: \"A misconception needs a concept\" });\n }\n });\nexport type RememberInput = z.infer<typeof RememberInput>;\n\n/** How a memory is supported: a graded wrong answer, only something said in chat, or the learner's imported notes. */\nexport const MemoryBasis = z.enum([\"wrong_answer\", \"chat\", \"import\"]);\nexport type MemoryBasis = z.infer<typeof MemoryBasis>;\n\n/**\n * A memory as the learner sees it in the memory panel. A memory written while a check was unanswered\n * could give that check's answer away, so until the check is answered it is `held`, without its content.\n */\nexport const MemoryView = z\n .object({\n id: z.string(),\n kind: MemoryKind,\n held: z.boolean(),\n text: z.string().nullable(),\n concept: z.string().nullable(),\n basis: MemoryBasis.nullable(),\n /** For basis `import`, the note it was drawn from. Null otherwise, and while held. */\n source: z.object({ noteId: z.string(), importId: z.string(), importName: z.string(), path: z.string(), title: z.string() }).strict().nullable(),\n createdAt: z.string().datetime(),\n editedAt: z.string().datetime().nullable(),\n })\n .strict();\nexport type MemoryView = z.infer<typeof MemoryView>;\n\nexport const MemoryEdit = z.object({ text: MemoryText }).strict();\n\n/** Which memories a bulk delete removes: for now, everything drawn from imported notes. */\nexport const MemoryBulkDelete = z.object({ basis: z.literal(\"import\") }).strict();\n", "import { z } from \"zod\";\n\n/** The largest file the learner can upload (ADR-010). The server enforces it while reading. */\nexport const MAX_DOCUMENT_BYTES = 25 * 1024 * 1024;\n\n/** What a client sees of an uploaded document. Its text stays on the server. */\nexport const DocumentView = z.object({\n id: z.string(),\n sessionId: z.string(),\n messageId: z.string().nullable(),\n filename: z.string(),\n kind: z.enum([\"pdf\", \"pptx\"]),\n byteSize: z.number().int(),\n pageCount: z.number().int(),\n pagesWithText: z.number().int(),\n status: z.literal(\"ready\"),\n createdAt: z.string().datetime(),\n});\nexport type DocumentView = z.infer<typeof DocumentView>;\n", "import { z } from \"zod\";\nimport { MemoryText } from \"./memory.js\";\n\n/**\n * Distilling imported notes into the knowledge graph (ADR-014): concepts, edges between them, and memories drawn from\n * notes. The model reads a group of notes and proposes all three through one tool; the server validates every item,\n * since the notes are hostile input (ADR-010).\n */\n\n/** A note in the group being read, by the short reference the prompt gives it (`n1`, `n2`, ...). */\nconst NoteRef = z.string().regex(/^n\\d{1,3}$/);\nconst ConceptName = z.string().trim().min(1).max(80);\n\nexport const MAX_PROPOSED_CONCEPTS = 30;\nexport const MAX_PROPOSED_EDGES = 40;\nexport const MAX_PROPOSED_MEMORIES = 30;\n\nexport const ConceptEdgeKind = z.enum([\"prerequisite\", \"related\"]);\nexport type ConceptEdgeKind = z.infer<typeof ConceptEdgeKind>;\n\n/** The input of the record_from_notes tool. Every list is required, so an empty call is rejected. */\nexport const RecordFromNotesInput = z\n .object({\n concepts: z\n .array(\n z\n .object({\n name: ConceptName.describe(\"A name from <existing_concepts> or <vault_tags> when one fits. Otherwise a new name, written as it appears in the notes.\"),\n notes: z.array(NoteRef).min(1).max(20).describe(\"The refs of the notes that cover it.\"),\n })\n .strict(),\n )\n .max(MAX_PROPOSED_CONCEPTS),\n edges: z\n .array(\n z\n .object({\n from: ConceptName,\n to: ConceptName,\n kind: ConceptEdgeKind.describe(\"prerequisite = from must be understood before to; related = they're closely linked.\"),\n note: NoteRef.describe(\"The ref of the note that shows this link.\"),\n })\n .strict(),\n )\n .max(MAX_PROPOSED_EDGES)\n .describe(\"Edges between concepts named in this call or in <existing_concepts>.\"),\n memories: z\n .array(\n z\n .object({\n kind: z.enum([\"known\", \"goal\", \"misconception\"]).describe(\"known = the notes cover this concept; goal = a goal the notes state; misconception = a wrong belief the notes state.\"),\n text: MemoryText.describe(\"One short sentence about the learner.\"),\n concept: ConceptName.optional().describe(\"Required for known and misconception: a concept named in this call or in <existing_concepts>.\"),\n note: NoteRef.describe(\"The ref of the note it comes from.\"),\n })\n .strict(),\n )\n .max(MAX_PROPOSED_MEMORIES),\n })\n .strict();\nexport type RecordFromNotesInput = z.infer<typeof RecordFromNotesInput>;\n\nexport const DistillationStatus = z.enum([\"idle\", \"queued\", \"running\", \"cancelled\", \"failed\"]);\nexport type DistillationStatus = z.infer<typeof DistillationStatus>;\n\n/**\n * Where distilling an import's notes stands. `pendingNotes` are notes not yet distilled at their current text; the\n * group counts describe the current or last run in this server process.\n */\nexport const DistillationView = z\n .object({\n status: DistillationStatus,\n pendingNotes: z.number().int(),\n groups: z.number().int(),\n groupsDone: z.number().int(),\n error: z.string().nullable(),\n /** Concepts and memories drawn from this import's notes so far. */\n concepts: z.number().int(),\n memories: z.number().int(),\n })\n .strict();\nexport type DistillationView = z.infer<typeof DistillationView>;\n\n/** Every concept drawn from notes and the edges between them, each with the notes it came from. */\nexport const ConceptGraph = z\n .object({\n concepts: z.array(z.object({ id: z.string(), name: z.string(), notes: z.array(z.string()) }).strict()),\n edges: z.array(z.object({ from: z.string(), to: z.string(), kind: ConceptEdgeKind, notes: z.array(z.string()) }).strict()),\n })\n .strict();\nexport type ConceptGraph = z.infer<typeof ConceptGraph>;\n", "import { z } from \"zod\";\nimport { DistillationView } from \"./knowledge.js\";\n\n/**\n * Importing a learner's Obsidian vault (ADR-014). A vault is hostile input (ADR-010), so every size is capped.\n * Clients send only Markdown files; the server checks each path again and skips anything else.\n */\n\n/** Most files one import can send. */\nexport const MAX_VAULT_FILES = 10_000;\n/** Longest note, in characters. */\nexport const MAX_NOTE_CHARS = 1_000_000;\n/** Largest import request body. */\nexport const MAX_VAULT_BYTES = 64 * 1024 * 1024;\nconst MAX_PATH_CHARS = 512;\n\nexport const VaultFile = z\n .object({\n /** The file's path inside the vault, with `/` between folders, e.g. `Maths/Recursion.md`. */\n path: z.string().min(1).max(MAX_PATH_CHARS),\n text: z.string().max(MAX_NOTE_CHARS),\n })\n .strict();\nexport type VaultFile = z.infer<typeof VaultFile>;\n\nconst VaultFiles = z.array(VaultFile).max(MAX_VAULT_FILES);\nconst VaultName = z.string().trim().min(1).max(120);\n\n/** Starts a new import. The name tells imports apart, so it's unique; the CLI defaults it to the vault folder's name. */\nexport const VaultImportInput = z.object({ name: VaultName, files: VaultFiles }).strict();\nexport type VaultImportInput = z.infer<typeof VaultImportInput>;\n\n/** Replaces an import's files with a new snapshot of the vault. */\nexport const VaultSnapshotInput = z.object({ files: VaultFiles }).strict();\nexport type VaultSnapshotInput = z.infer<typeof VaultSnapshotInput>;\n\nexport const VaultImportView = z\n .object({\n id: z.string(),\n name: z.string(),\n source: z.literal(\"obsidian\"),\n noteCount: z.number().int(),\n createdAt: z.string().datetime(),\n updatedAt: z.string().datetime(),\n /** Distilling its notes into concepts and memories, which starts after every import (ADR-014). */\n distillation: DistillationView,\n })\n .strict();\nexport type VaultImportView = z.infer<typeof VaultImportView>;\n\n/**\n * Why a file wasn't imported. `too_long` is a note over MAX_NOTE_CHARS and `symlink` a link inside a zipped\n * vault; both are reported by the zip upload and by clients that check sizes before sending. `generated` is a file Mivra\n * exported itself (frontmatter `mivra: generated`), so re-importing a vault with the export in it adds no duplicates.\n */\nexport const SkipReason = z.enum([\"not_markdown\", \"hidden\", \"bad_path\", \"duplicate\", \"too_long\", \"symlink\", \"generated\"]);\nexport type SkipReason = z.infer<typeof SkipReason>;\n\n/** What one import or re-import changed. `skipped` lists at most a few paths; `skippedCount` counts them all. */\nexport const VaultImportResult = z\n .object({\n import: VaultImportView,\n added: z.number().int(),\n updated: z.number().int(),\n removed: z.number().int(),\n unchanged: z.number().int(),\n skippedCount: z.number().int(),\n skipped: z.array(z.object({ path: z.string(), reason: SkipReason }).strict()),\n /** Links or tags left out because a note or the vault had more than the limit. */\n truncated: z.boolean(),\n })\n .strict();\nexport type VaultImportResult = z.infer<typeof VaultImportResult>;\n\nexport const NoteView = z\n .object({\n id: z.string(),\n importId: z.string(),\n path: z.string(),\n title: z.string(),\n aliases: z.array(z.string()),\n tags: z.array(z.string()),\n body: z.string(),\n updatedAt: z.string().datetime(),\n })\n .strict();\nexport type NoteView = z.infer<typeof NoteView>;\n\n/**\n * An import's notes and the links between them. A link whose target is no note in the vault has `to: null`\n * and keeps its `target`, so a client can draw it as an unresolved node, as Obsidian does.\n */\nexport const NoteGraph = z\n .object({\n notes: z.array(z.object({ id: z.string(), path: z.string(), title: z.string(), tags: z.array(z.string()) }).strict()),\n links: z.array(z.object({ from: z.string(), to: z.string().nullable(), target: z.string(), kind: z.enum([\"link\", \"embed\"]) }).strict()),\n })\n .strict();\nexport type NoteGraph = z.infer<typeof NoteGraph>;\n\n/** Most notes a graph view draws whole; an import (or filter) with more opens on the local graph instead. */\nexport const WHOLE_GRAPH_NOTES = 500;\n/** Most notes, nodes and edges one graph view sends, whatever its mode, so a 10,000-note vault stays drawable. */\nexport const MAX_GRAPH_VIEW_NOTES = 500;\nexport const MAX_GRAPH_VIEW_NODES = 1_000;\nexport const MAX_GRAPH_VIEW_EDGES = 5_000;\n/** Most tags and folders a graph view lists for its filters. */\nexport const MAX_GRAPH_FACETS = 200;\n\nexport const NoteGraphViewQuery = z\n .object({\n /** `auto` draws the whole graph when at most WHOLE_GRAPH_NOTES notes match, and the local graph otherwise. */\n mode: z.enum([\"auto\", \"local\"]).default(\"auto\"),\n /** The note the local graph is drawn around. Defaults to the matching note with the most connections. */\n focus: z.string().max(64).optional(),\n /** How many hops from the focus the local graph reaches. Sharing a tag or concept is one hop, as a link is. */\n depth: z.coerce.number().int().min(1).max(3).default(2),\n /** Only notes carrying this tag, or one nested under it (`maths` matches `maths/algebra`). */\n tag: z.string().max(200).optional(),\n /** Only notes in this folder or below it, without a trailing `/`. */\n folder: z.string().max(512).optional(),\n })\n .strict();\nexport type NoteGraphViewQuery = z.infer<typeof NoteGraphViewQuery>;\n\nexport const NoteGraphNodeKind = z.enum([\"note\", \"ghost\", \"tag\", \"concept\"]);\nexport type NoteGraphNodeKind = z.infer<typeof NoteGraphNodeKind>;\nexport const NoteGraphEdgeKind = z.enum([\"link\", \"tag\", \"concept\", \"prerequisite\", \"related\"]);\nexport type NoteGraphEdgeKind = z.infer<typeof NoteGraphEdgeKind>;\n\n/**\n * What a graph view of an import draws (ADR-014): notes, unresolved links as ghosts, and the tags and concepts that\n * connect notes. A note's `id` is the note's id; the other kinds' ids are prefixed (`tag:`, `concept:`, `ghost:`).\n * `notes` counts the matching notes a tag or concept connects, drawn or not,, and `hops` how far a node is from the focus.\n */\nexport const NoteGraphView = z\n .object({\n mode: z.enum([\"whole\", \"local\"]),\n focus: z.string().nullable(),\n depth: z.number().int(),\n totalNotes: z.number().int(),\n /** Notes matching the filters, drawn or not. */\n matchingNotes: z.number().int(),\n /** Whether the limits left matching nodes or edges out of the drawing. */\n truncated: z.boolean(),\n nodes: z.array(\n z\n .object({\n id: z.string(),\n kind: NoteGraphNodeKind,\n label: z.string(),\n path: z.string().optional(),\n notes: z.number().int().optional(),\n hops: z.number().int().optional(),\n })\n .strict(),\n ),\n edges: z.array(z.object({ from: z.string(), to: z.string(), kind: NoteGraphEdgeKind }).strict()),\n tags: z.array(z.object({ name: z.string(), notes: z.number().int() }).strict()),\n folders: z.array(z.object({ path: z.string(), notes: z.number().int() }).strict()),\n })\n .strict();\nexport type NoteGraphView = z.infer<typeof NoteGraphView>;\n\n/** A note found by title or path, for picking one to centre the graph on. */\nexport const NoteSummary = z.object({ id: z.string(), title: z.string(), path: z.string() }).strict();\nexport type NoteSummary = z.infer<typeof NoteSummary>;\n", "import { z } from \"zod\";\nimport { artifactMathInput, checkMathText } from \"./artifact-math-input.js\";\nimport { AlgorithmTraceSpec } from \"./algorithm-trace.js\";\nimport { CodeWalkthroughSpec } from \"./code-walkthrough.js\";\nimport {\n InterviewContextAnswer,\n InterviewContextGrade,\n InterviewContextSpec,\n PlacementAnswer,\n PlacementGrade,\n PlacementQuestionPublic,\n PlacementQuestionSpec,\n} from \"./course.js\";\nimport { GraphSpec } from \"./graph.js\";\nimport { MultipleChoiceAnswer, MultipleChoiceGrade, MultipleChoicePublic, MultipleChoiceSpec } from \"./multiple-choice.js\";\nimport { SetDiagramSpec } from \"./set-diagram.js\";\nimport { TableSpec } from \"./table.js\";\nimport { WorkedStepsSpec } from \"./worked-steps.js\";\n\nexport * from \"./artifact-math-input.js\";\nexport * from \"./math-text.js\";\nexport * from \"./algorithm-trace.js\";\nexport * from \"./code-walkthrough.js\";\nexport * from \"./course.js\";\nexport * from \"./lesson.js\";\nexport * from \"./graph.js\";\nexport * from \"./multiple-choice.js\";\nexport * from \"./set-diagram.js\";\nexport * from \"./table.js\";\nexport * from \"./worked-steps.js\";\n\n/**\n * Every artifact kind the agent can produce, one tool per kind (ADR-006).\n * `input` adds current authoring checks to the stored `spec` schema, so old artifacts stay readable.\n * Bump `version` and keep the old schema when a spec changes incompatibly; stored artifacts record\n * the version they were created with.\n */\nexport const artifactKinds = {\n algorithm_trace: {\n version: 1,\n toolName: \"show_algorithm_trace\",\n description:\n \"Show the learner an interactive step-by-step trace of an algorithm running over a sequence (e.g. sliding window, two pointers, binary search, a simple sort). The learner steps through it with play/pause/step controls. Use it when watching state change step by step will make the idea click. Keep traces short (roughly 5-20 steps) and make each step's explanation say what changed and why. A code pane is optional: add `code` and each step's `lines` only when the code itself is the point, such as how an implementation's lines move the state, and leave it out when the idea matters more than any code. Write that code in the programming language the learner has shown proficiency in according to <learner_memories>; if they show none, use Python or pseudocode. Keep the code short, and highlight the lines each step is running. For code that doesn't move over a sequence, such as a plain function or a React render, use show_code_walkthrough instead of inventing an array.\",\n spec: AlgorithmTraceSpec,\n input: artifactMathInput(AlgorithmTraceSpec, [\"title\", \"steps.*.explanation\"]),\n },\n code_walkthrough: {\n version: 1,\n toolName: \"show_code_walkthrough\",\n description:\n \"Show the learner a step-by-step walkthrough of a short piece of code that isn't about a sequence: a plain function's parameters, locals and return value, or a React component's renders, handlers and state updates. Each step highlights the source lines it is at and gives a complete snapshot of the visible state (`variables`) and the visible output (`output`, plain text such as printed lines or what the page shows, e.g. \\\"Count: 0\\\"); nothing carries over between steps, so repeat whatever still applies and use [] or \\\"\\\" for none. The source stays the same on every step. Use show_algorithm_trace instead for an algorithm moving over an array or other sequence, and show_graph for a component hierarchy. Keep the code short (a few to about 20 lines) and the walkthrough short (roughly 3-12 steps). Write the code in the language the concept belongs to (JSX for React); for a language-neutral idea, use the language the learner knows from <learner_memories>, else Python or pseudocode. The snapshots are your illustration, not a real run, so get them right. For React, keep the state a render or handler sees apart from updates it queues: inside a handler, state still has the value from the render it belongs to (name it, e.g. \\\"handler.count\\\" = 0, with \\\"queued update\\\" = \\\"count + 1\\\"), and the new value and its output appear only at the next render's step.\",\n spec: CodeWalkthroughSpec,\n input: artifactMathInput(CodeWalkthroughSpec, [\"title\", \"steps.*.explanation\"]),\n },\n graph: {\n version: 1,\n toolName: \"show_graph\",\n description:\n \"Show the learner a graph or tree, drawn for you, optionally with steps they can walk through. Use it for graphs, trees, BFS, DFS, shortest paths, spanning trees and tree traversals, whenever seeing the structure or watching an algorithm move over it will help. Never give coordinates: the layout is automatic. For a binary search tree or binary tree traversal, set kind to tree and give every edge a side, so a lone left child and a lone right child are drawn differently. The automatic layout may draw crossing edges that mean nothing, even when the graph is planar, so don't use this to show whether a graph is planar. Keep it small enough to read (roughly 4-15 nodes, 5-20 steps) and make each step's explanation say what changed and why. For a component hierarchy (such as React components), set kind to tree and directed to true, with one node per component instance (distinct ids for two instances of the same component, labelled with the short component name) and one edge from each parent to each child it renders, labelled with the props it passes (e.g. \\\"count\\\" or \\\"onClick\\\"). Use steps to highlight where state is owned and the nodes and edges its value flows through, with variables for simple state such as count = 1. The nodes and edges stay the same on every step: don't add callback edges back up the tree, and don't suggest that a component's output changes just because it re-renders.\",\n spec: GraphSpec,\n input: artifactMathInput(GraphSpec, [\"title\", \"nodes.*.label\", \"edges.*.label\", \"steps.*.explanation\"], (spec, ctx) => {\n spec.nodes.forEach((node, i) => {\n if (node.label === undefined) checkMathText(node.id, [\"nodes\", i, \"id\"], ctx);\n });\n }),\n },\n interview_context: {\n version: 1,\n toolName: \"ask_interview_context\",\n description:\n \"Course placement interview only: ask the learner once, as the last question of the interview and in the same reply as the placement questions, whether there is anything else they want you to know about what they already understand or want to explore. They answer in their own words in the UI, or leave it blank; the answer is reported back to you with the placement results. Not graded.\",\n spec: InterviewContextSpec,\n input: artifactMathInput(InterviewContextSpec, [\"question\"]),\n },\n multiple_choice: {\n version: 1,\n toolName: \"ask_multiple_choice\",\n description:\n \"Ask the learner one multiple-choice question to check understanding of a concept you just taught. Exactly one option is correct. Write plausible wrong options that reflect real misconceptions, and give per-option feedback where useful. The learner answers in the UI; the result is reported back to you on the next turn, so do not reveal the answer in your reply. For a code prediction, put the short snippet in a fenced code block in your reply text before this call and ask what it returns, prints or displays; the question and options render maths and plain text only, so never put code fences in them.\",\n spec: MultipleChoiceSpec,\n input: artifactMathInput(MultipleChoiceSpec, [\"question\", \"options.*.text\", \"options.*.feedback\", \"explanation\"]),\n },\n placement_question: {\n version: 1,\n toolName: \"ask_placement_question\",\n description:\n \"Course placement interview only: ask the learner one quick question to find out what they already know about one concept, before the syllabus is written. Use multiple choice, true/false or yes/no. The UI always adds \\\"Not sure\\\" and \\\"Skip\\\", so never include those as options. The learner answers in the UI and the result is reported back to you, so don't reveal the answer.\",\n spec: PlacementQuestionSpec,\n input: artifactMathInput(PlacementQuestionSpec, [\"question\", \"options.*.text\", \"explanation\"]),\n },\n set_diagram: {\n version: 1,\n toolName: \"show_set_diagram\",\n description:\n \"Show the learner a Venn diagram of 1 to 3 sets, with what each region contains. Use it for set operations (union, intersection, complement, difference) and inclusion-exclusion, not for more than 3 sets. Keep elements short, because they are drawn in their region. Add steps to walk through it: each step highlights exact regions (any of them, including outside every set, which needs `universe`) and says what changed and why.\",\n spec: SetDiagramSpec,\n input: artifactMathInput(SetDiagramSpec, [\"title\", \"universe\", \"sets.*.label\", \"regions.*.elements.*\", \"steps.*.explanation\", \"steps.*.variables.*.name\", \"steps.*.variables.*.value\"]),\n },\n table: {\n version: 1,\n toolName: \"show_table\",\n description:\n \"Show the learner a table: a truth table, a relation matrix or other tabular working. Use it whenever the content is really rows and columns. Add steps when filling it in or highlighting it one part at a time will help, such as working out a truth table column by column; leave them out for a table to read at a glance. Keep steps short and make each explanation say what changed and why.\",\n spec: TableSpec,\n input: artifactMathInput(TableSpec, [\"title\", \"columns.*\", \"rowHeaders.*\", \"rows.*.*\", \"steps.*.explanation\", \"steps.*.cells.*.value\"]),\n },\n worked_steps: {\n version: 1,\n toolName: \"show_worked_steps\",\n description:\n \"Show the learner a proof, an induction or combinatorics working as a sequence of steps they reveal one at a time, each a statement with its justification. Use it when the reasoning is the point and each line follows from the ones before. Use show_algorithm_trace instead for an algorithm's state changing over a sequence.\",\n spec: WorkedStepsSpec,\n input: artifactMathInput(WorkedStepsSpec, [\"title\", \"goal\", \"steps.*.label\", \"steps.*.statement\", \"steps.*.justification\"]),\n },\n} as const;\n\nexport type ArtifactKind = keyof typeof artifactKinds;\nexport const ArtifactKind = z.enum(Object.keys(artifactKinds) as [ArtifactKind, ...ArtifactKind[]]);\n\n/** Finds the kind registered for a tool name, if any. */\nexport function kindForTool(toolName: string): ArtifactKind | undefined {\n return (Object.keys(artifactKinds) as ArtifactKind[]).find((kind) => artifactKinds[kind].toolName === toolName);\n}\n\nconst ArtifactBase = { id: z.string(), createdAt: z.string().datetime() };\n\nexport const MultipleChoiceAttempt = z\n .object({ answer: MultipleChoiceAnswer, grade: MultipleChoiceGrade, createdAt: z.string().datetime() })\n .strict();\nexport type MultipleChoiceAttempt = z.infer<typeof MultipleChoiceAttempt>;\n\nexport const InterviewContextAttempt = z\n .object({ answer: InterviewContextAnswer, grade: InterviewContextGrade, createdAt: z.string().datetime() })\n .strict();\nexport type InterviewContextAttempt = z.infer<typeof InterviewContextAttempt>;\n\nexport const PlacementAttempt = z.object({ answer: PlacementAnswer, grade: PlacementGrade, createdAt: z.string().datetime() }).strict();\nexport type PlacementAttempt = z.infer<typeof PlacementAttempt>;\n\n/**\n * An artifact as the client receives it. Checks expose only their public view until answered;\n * after an attempt, the grade (with the correct answer and explanation) is included.\n */\nexport const ArtifactView = z.discriminatedUnion(\"kind\", [\n z\n .object({ ...ArtifactBase, kind: z.literal(\"algorithm_trace\"), version: z.literal(1), spec: AlgorithmTraceSpec })\n .strict(),\n z\n .object({ ...ArtifactBase, kind: z.literal(\"code_walkthrough\"), version: z.literal(1), spec: CodeWalkthroughSpec })\n .strict(),\n z.object({ ...ArtifactBase, kind: z.literal(\"graph\"), version: z.literal(1), spec: GraphSpec }).strict(),\n z\n .object({\n ...ArtifactBase,\n kind: z.literal(\"interview_context\"),\n version: z.literal(1),\n spec: InterviewContextSpec,\n latestAttempt: InterviewContextAttempt.optional(),\n })\n .strict(),\n z\n .object({\n ...ArtifactBase,\n kind: z.literal(\"multiple_choice\"),\n version: z.literal(1),\n spec: MultipleChoicePublic,\n latestAttempt: MultipleChoiceAttempt.optional(),\n })\n .strict(),\n z\n .object({\n ...ArtifactBase,\n kind: z.literal(\"placement_question\"),\n version: z.literal(1),\n spec: PlacementQuestionPublic,\n latestAttempt: PlacementAttempt.optional(),\n })\n .strict(),\n z.object({ ...ArtifactBase, kind: z.literal(\"set_diagram\"), version: z.literal(1), spec: SetDiagramSpec }).strict(),\n z.object({ ...ArtifactBase, kind: z.literal(\"table\"), version: z.literal(1), spec: TableSpec }).strict(),\n z.object({ ...ArtifactBase, kind: z.literal(\"worked_steps\"), version: z.literal(1), spec: WorkedStepsSpec }).strict(),\n]);\nexport type ArtifactView = z.infer<typeof ArtifactView>;\n\nexport * from \"./memory.js\";\nexport * from \"./document.js\";\nexport * from \"./vault.js\";\nexport * from \"./knowledge.js\";\n\n/** ChatGPT's page for the learner's plan usage and per-app limits (ADR-015). */\nexport const CHATGPT_USAGE_URL = \"https://chatgpt.com/settings/usage\";\n/**\n * The reply error when the learner's ChatGPT plan has hit a usage limit. The UI recognises it and offers\n * \"Manage usage\", as OpenAI's guidelines ask (ADR-015).\n */\nexport const CHATGPT_USAGE_LIMIT_ERROR = \"ChatGPT usage limit reached. Review your plan or this app's limit in ChatGPT settings.\";\n", "import { z } from \"zod\";\nimport { splitMath } from \"./math-text.js\";\n\nconst REPAIR = String.raw`Wrap LaTeX commands in single-dollar math delimiters, with no spaces inside: $\\displaystyle\\sum_{i=1}^{n} i$. Put \\displaystyle inside the dollars. For literal backslashes followed by two or more letters (such as C:\\Users), use forward slashes, Unicode symbols such as \u2216, or describe them in words; backticks do not escape artifact math. Correct the affected field and retry this tool call.`;\n\n// Single-letter code escapes stay literal; longer literals such as C:\\Users are still rejected.\nexport function checkMathText(value: unknown, path: (string | number)[], ctx: z.RefinementCtx) {\n if (typeof value === \"string\" && splitMath(value).some((piece) => \"text\" in piece && /\\\\[a-zA-Z]{2,}/.test(piece.text))) {\n ctx.addIssue({ code: \"custom\", path, message: REPAIR });\n }\n}\n\n/** Input-only refinements: stored v1 specs and public views must continue to accept old text. */\nexport function artifactMathInput<T extends z.ZodType>(schema: T, fields: string[], extra?: (spec: z.output<T>, ctx: z.RefinementCtx) => void) {\n return schema.superRefine((spec, ctx) => {\n const visit = (value: unknown, parts: string[], path: (string | number)[]) => {\n if (parts.length === 0) return checkMathText(value, path, ctx);\n const [key, ...rest] = parts;\n if (key === \"*\" && Array.isArray(value)) value.forEach((item, i) => visit(item, rest, [...path, i]));\n else if (value && typeof value === \"object\" && key !== undefined) visit((value as Record<string, unknown>)[key], rest, [...path, key]);\n };\n for (const field of fields) visit(spec, field.split(\".\"), []);\n extra?.(spec, ctx);\n });\n}\n", "const isSpace = (char: string | undefined) => char !== undefined && /\\s/.test(char);\nconst isDigit = (char: string | undefined) => char !== undefined && char >= \"0\" && char <= \"9\";\n\nexport type MathPiece = { text: string } | { formula: string };\n\n/** For math mode: everything is literal except `$...$` formulas, and `\\$`, which is a literal dollar. */\nexport function splitMath(source: string): MathPiece[] {\n const pieces: MathPiece[] = [];\n let literal = \"\";\n let i = 0;\n while (i < source.length) {\n const char = source[i]!;\n if (char === \"\\\\\" && source[i + 1] === \"$\") {\n literal += \"$\";\n i += 2;\n } else if (char !== \"$\") {\n literal += char;\n i += 1;\n } else if (source[i + 1] === \"$\") {\n // A dollar next to another is never a delimiter here, so \"$$x$$\" stays as written.\n while (source[i] === \"$\") {\n literal += \"$\";\n i += 1;\n }\n } else {\n const close = closingDollar(source, i);\n if (close === undefined) {\n literal += \"$\";\n i += 1;\n } else {\n if (literal) pieces.push({ text: literal });\n literal = \"\";\n pieces.push({ formula: source.slice(i + 1, close) });\n i = close + 1;\n }\n }\n }\n if (literal) pieces.push({ text: literal });\n return pieces;\n}\n\nfunction closingDollar(source: string, open: number): number | undefined {\n let close = open + 1;\n while (close < source.length && source[close] !== \"$\") {\n close += source[close] === \"\\\\\" && (source[close + 1] === \"$\" || source[close + 1] === \"\\\\\") ? 2 : 1;\n }\n if (close >= source.length || close === open + 1 || source[close + 1] === \"$\") return undefined;\n if (isSpace(source[open + 1]) || isSpace(source[close - 1]) || isDigit(source[close + 1])) return undefined;\n return /`|\\n\\s*\\n/.test(source.slice(open, close)) ? undefined : close;\n}\n", "import { z } from \"zod\";\n\n/**\n * algorithm_trace v1: a step-through view of an algorithm running over a sequence.\n * Each step can move labelled pointers, highlight index ranges, update variables and\n * replace the sequence (for swaps/sorts). Covers sliding window, two pointers, binary\n * search and simple sorts.\n *\n * A trace can also show the code it runs (`code`), with each step naming the 1-based source lines it\n * highlights (`lines`). Both are optional, so traces without code, including stored ones, stay valid.\n * The code is text only: it is never run, and renderers show it as inert monospaced text.\n *\n * State rules (renderers must follow them):\n * - `values` persists: a step without `values` shows the previous step's sequence.\n * - `pointers`, `ranges` and `variables` do not persist: each step lists all of its own,\n * and omitting one means that step has none. So every step is fully described by itself\n * plus the current sequence, and bounds can be checked step by step.\n */\n\nconst MAX_VALUES = 64;\nconst MAX_STEPS = 200;\nexport const MAX_CODE_LINES = 40;\nexport const MAX_CODE_LINE_LENGTH = 120;\nexport const MAX_CODE_CHARS = 4000;\n\n/** A trace's source split into lines, as numbered from 1: line endings are normalised and one trailing newline is ignored. */\nexport function codeLines(source: string): string[] {\n return source.replace(/\\r\\n?/g, \"\\n\").replace(/\\n$/, \"\").split(\"\\n\");\n}\n\nconst Label = z.string().trim().min(1).max(40);\nconst Cell = z.union([z.number(), z.string().max(24)]);\nconst Index = z.number().int().nonnegative();\n\nexport const TracePointer = z\n .object({\n name: Label.describe('Pointer label shown under the cell, e.g. \"left\", \"right\", \"mid\", \"i\".'),\n index: Index.describe(\"0-based index into the sequence as it is at this step.\"),\n })\n .strict();\n\nexport const TraceRange = z\n .object({\n start: Index.describe(\"0-based start index, inclusive, within the sequence as it is at this step.\"),\n end: Index.describe(\"0-based end index, inclusive. Must be >= start and within the sequence.\"),\n label: Label.optional().describe('Optional label, e.g. \"window\".'),\n tone: z\n .enum([\"active\", \"done\", \"muted\"])\n .optional()\n .describe(\"active = current focus, done = finished/sorted, muted = ruled out. Defaults to active.\"),\n })\n .strict();\n\nexport const TraceVariable = z\n .object({\n name: Label,\n value: z.union([z.number(), z.string().max(80), z.boolean()]),\n })\n .strict();\n\nexport const TraceCode = z\n .object({\n language: z\n .string()\n .trim()\n .min(1)\n .max(30)\n .describe('The language the code is written in, e.g. \"Python\", \"TypeScript\", \"Java\" or \"pseudocode\". Shown as a label.'),\n source: z\n .string()\n .min(1)\n .max(MAX_CODE_CHARS)\n .describe(\n `The code, as plain text with newlines and its real indentation: at most ${MAX_CODE_LINES} lines of at most ${MAX_CODE_LINE_LENGTH} characters. Line 1 is the first line. No Markdown fences.`,\n ),\n })\n .strict()\n .superRefine((code, ctx) => {\n const lines = codeLines(code.source);\n if (lines.every((line) => line.trim() === \"\")) {\n ctx.addIssue({ code: \"custom\", path: [\"source\"], message: \"source has no code\" });\n }\n if (lines.length > MAX_CODE_LINES) {\n ctx.addIssue({ code: \"custom\", path: [\"source\"], message: `source has ${lines.length} lines; at most ${MAX_CODE_LINES} are allowed` });\n }\n const long = lines.findIndex((line) => line.length > MAX_CODE_LINE_LENGTH);\n if (long >= 0) {\n ctx.addIssue({ code: \"custom\", path: [\"source\"], message: `line ${long + 1} is longer than ${MAX_CODE_LINE_LENGTH} characters` });\n }\n });\n\nexport const TraceStep = z\n .object({\n explanation: z.string().trim().min(1).max(500).describe(\"What happens in this step, in one or two sentences.\"),\n values: z\n .array(Cell)\n .min(1)\n .max(MAX_VALUES)\n .optional()\n .describe(\"The whole sequence after this step. Omit unless the values changed (e.g. a swap); omitted means unchanged.\"),\n pointers: z\n .array(TracePointer)\n .max(8)\n .optional()\n .describe(\"All pointers to show at this step. Not carried over from earlier steps: repeat any that still apply.\"),\n ranges: z\n .array(TraceRange)\n .max(8)\n .optional()\n .describe(\"All highlighted ranges at this step. Not carried over from earlier steps.\"),\n variables: z\n .array(TraceVariable)\n .max(12)\n .optional()\n .describe(\"All running state at this step, e.g. current sum, best so far. Not carried over from earlier steps.\"),\n lines: z\n .array(z.number().int().positive())\n .max(MAX_CODE_LINES)\n .optional()\n .describe(\n \"Only with code: the 1-based line numbers in code.source this step is running, highlighted beside the values. Not carried over from earlier steps; omit or leave empty to highlight none.\",\n ),\n })\n .strict();\n\nexport const AlgorithmTraceSpec = z\n .object({\n title: z.string().trim().min(1).max(120),\n values: z.array(Cell).min(1).max(MAX_VALUES).describe(\"The input sequence before the first step.\"),\n code: TraceCode.optional().describe(\n \"Optional source code shown beside the values, with each step's `lines` highlighted. Include it only when the code itself is the point.\",\n ),\n steps: z.array(TraceStep).min(1).max(MAX_STEPS),\n })\n .strict()\n .superRefine((spec, ctx) => {\n // Every pointer and range must point inside the sequence as it is at that step.\n let length = spec.values.length;\n const codeLength = spec.code ? codeLines(spec.code.source).length : 0;\n spec.steps.forEach((step, i) => {\n if (step.lines && !spec.code) {\n ctx.addIssue({ code: \"custom\", path: [\"steps\", i, \"lines\"], message: \"lines need code: add code, or remove lines\" });\n } else {\n step.lines?.forEach((line, j) => {\n if (line > codeLength) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"steps\", i, \"lines\", j],\n message: `line ${line} is outside the code (${codeLength} lines)`,\n });\n }\n });\n }\n if (step.values) length = step.values.length;\n step.pointers?.forEach((p, j) => {\n if (p.index >= length) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"steps\", i, \"pointers\", j, \"index\"],\n message: `index ${p.index} is outside the sequence (length ${length})`,\n });\n }\n });\n step.ranges?.forEach((r, j) => {\n if (r.end >= length || r.start > r.end) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"steps\", i, \"ranges\", j],\n message: `range ${r.start}..${r.end} is invalid for a sequence of length ${length}`,\n });\n }\n });\n });\n });\n\nexport type AlgorithmTraceSpec = z.infer<typeof AlgorithmTraceSpec>;\nexport type TraceStep = z.infer<typeof TraceStep>;\nexport type TraceCode = z.infer<typeof TraceCode>;\n", "import { z } from \"zod\";\nimport { MAX_CODE_LINES, TraceCode, TraceVariable, codeLines } from \"./algorithm-trace.js\";\n\n/**\n * code_walkthrough v1: a step-through illustration of code that isn't about a sequence, such as a plain\n * function or a React render (#98). The source stays fixed; each step highlights its lines and shows the\n * state and the output at that point, with an explanation.\n *\n * Every step is a complete snapshot: nothing carries over from the step before, so omitted or empty\n * `lines` highlight nothing, `variables: []` shows none and `output: \"\"` shows no output. Stepping back\n * shows exactly the earlier snapshot. The snapshots are the tutor's illustration, never a real run: the\n * code is inert text, and nothing is graded or recorded as evidence.\n */\n\nexport const MAX_WALKTHROUGH_STEPS = 200;\nexport const MAX_WALKTHROUGH_VARIABLES = 12;\nexport const MAX_WALKTHROUGH_OUTPUT = 4000;\n\nexport const CodeWalkthroughStep = z\n .object({\n explanation: z.string().trim().min(1).max(500).describe(\"What happens at this step and why, in one or two sentences.\"),\n label: z\n .string()\n .trim()\n .min(1)\n .max(80)\n .optional()\n .describe('Optional short name for the step, e.g. \"Initial render\", \"Click handler\", \"Render 2\".'),\n lines: z\n .array(z.number().int().positive())\n .max(MAX_CODE_LINES)\n .optional()\n .describe(\"The 1-based line numbers in code.source this step is at. Not carried over: omit or leave empty to highlight none.\"),\n variables: z\n .array(TraceVariable)\n .max(MAX_WALKTHROUGH_VARIABLES)\n .describe(\n 'All the state visible at this step, each name once, e.g. \"n\", \"render.count\", \"handler.count\", \"queued update\". Not carried over: list everything that still applies, or [] for none. Values are plain text, numbers or booleans; write undefined, null or a short object as a string.',\n ),\n output: z\n .string()\n .max(MAX_WALKTHROUGH_OUTPUT)\n .describe(\n 'Everything visible as output at this step, as plain text, e.g. printed lines or what the page shows (\"Count: 0\"). Not carried over: repeat earlier output that is still visible, or \"\" for none.',\n ),\n })\n .strict();\n\nexport const CodeWalkthroughSpec = z\n .object({\n title: z.string().trim().min(1).max(120),\n code: TraceCode.describe(\"The source shown on every step. It stays the same across steps.\"),\n steps: z.array(CodeWalkthroughStep).min(1).max(MAX_WALKTHROUGH_STEPS),\n })\n .strict()\n .superRefine((spec, ctx) => {\n const codeLength = codeLines(spec.code.source).length;\n spec.steps.forEach((step, i) => {\n step.lines?.forEach((line, j) => {\n if (line > codeLength) {\n ctx.addIssue({ code: \"custom\", path: [\"steps\", i, \"lines\", j], message: `line ${line} is outside the code (${codeLength} lines)` });\n }\n });\n const seen = new Set<string>();\n step.variables.forEach((variable, j) => {\n if (seen.has(variable.name)) {\n ctx.addIssue({ code: \"custom\", path: [\"steps\", i, \"variables\", j, \"name\"], message: `variable \"${variable.name}\" appears twice in this step` });\n }\n seen.add(variable.name);\n });\n });\n });\n\nexport type CodeWalkthroughSpec = z.infer<typeof CodeWalkthroughSpec>;\nexport type CodeWalkthroughStep = z.infer<typeof CodeWalkthroughStep>;\n", "import { z } from \"zod\";\nimport { TraceVariable } from \"./algorithm-trace.js\";\n\n/**\n * graph v1: nodes and edges, optionally with steps that walk an algorithm over them. Covers BFS, DFS,\n * shortest paths, spanning trees and tree traversals. Self-loops and parallel edges are allowed and\n * drawn, because a multigraph is ordinary discrete maths. The model never picks coordinates: the\n * renderer computes one layout per graph, so nothing moves between steps.\n *\n * State rules (renderers must follow them):\n * - The graph itself never changes between steps.\n * - `nodeStates`, `edgeStates` and `variables` do not persist: each step lists all of its own, and\n * omitting one means that step has none. So every step is fully described by itself.\n */\n\nconst MAX_NODES = 60;\nconst MAX_EDGES = 200;\nconst MAX_STEPS = 200;\n\nconst Id = z.string().trim().min(1).max(24);\nconst Text = z.string().trim().min(1).max(24);\n\nexport const GraphTone = z.enum([\"active\", \"done\", \"muted\"]);\nexport type GraphTone = z.infer<typeof GraphTone>;\n\nconst ToneField = GraphTone.optional().describe(\n \"active = current focus, done = finished/visited, muted = ruled out. Defaults to active.\",\n);\n\nexport const GraphNode = z\n .object({\n id: Id.describe(\"Unique id, used by edges and steps. Shown on the node if it has no label.\"),\n label: Text.optional().describe(\"Short text on the node. Only $...$ is a formula, e.g. $v_1$.\"),\n })\n .strict();\n\nexport const GraphEdge = z\n .object({\n from: Id.describe(\"Id of a node. In a tree, the parent.\"),\n to: Id.describe(\"Id of a node, the same as `from` for a self-loop. In a tree, the child; children appear left to right in edge order unless they have a `side`.\"),\n side: z\n .enum([\"left\", \"right\"])\n .optional()\n .describe(\n \"Only when kind is tree: which child this is of `from`, its parent. Set it on every edge of a binary search tree or binary tree traversal, because a lone left child and a lone right child are different trees. A node has at most one child per side, and either all of its children have a side or none do.\",\n ),\n weight: z.number().optional().describe(\"Numeric weight shown on the edge. Give a weight or a label, not both.\"),\n label: Text.optional().describe(\"Text shown on the edge. Only $...$ is a formula.\"),\n })\n .strict();\n\nexport const GraphNodeState = z\n .object({ id: Id.describe(\"Id of a node.\"), tone: ToneField })\n .strict();\n\nexport const GraphEdgeState = z\n .object({\n from: Id,\n to: Id,\n nth: z\n .number()\n .int()\n .nonnegative()\n .optional()\n .describe(\"Only for parallel edges, and then required: which of the edges joining these nodes, 0-based in the order of `edges`.\"),\n tone: ToneField,\n })\n .strict()\n .describe(\"An edge of the graph. In an undirected graph, from and to may be in either order.\");\n\nexport const GraphStep = z\n .object({\n explanation: z.string().trim().min(1).max(500).describe(\"What happens in this step, in one or two sentences.\"),\n nodeStates: z\n .array(GraphNodeState)\n .max(MAX_NODES)\n .optional()\n .describe(\"The state of every node that has one at this step, at most one each. Not carried over from earlier steps: repeat any that still apply.\"),\n edgeStates: z\n .array(GraphEdgeState)\n .max(MAX_EDGES)\n .optional()\n .describe(\"The state of every edge that has one at this step, at most one each. Not carried over from earlier steps: repeat any that still apply.\"),\n variables: z\n .array(TraceVariable)\n .max(12)\n .optional()\n .describe(\"All running state at this step, e.g. the queue or current distances. Not carried over from earlier steps.\"),\n })\n .strict();\n\nconst pairKey = (from: string, to: string, directed: boolean) =>\n JSON.stringify(directed || from <= to ? [from, to] : [to, from]);\n\n/**\n * Finds which edge a step's edge state refers to, shared by the schema and renderers so they can't\n * disagree. Returns the index into `edges`, or why there isn't one.\n */\nexport function graphEdgeLookup(spec: { directed: boolean; edges: readonly { from: string; to: string }[] }) {\n const byPair = new Map<string, number[]>();\n spec.edges.forEach((edge, i) => {\n const key = pairKey(edge.from, edge.to, spec.directed);\n const indices = byPair.get(key);\n if (indices) indices.push(i);\n else byPair.set(key, [i]);\n });\n return (ref: { from: string; to: string; nth?: number | undefined }): { index: number } | { error: string } => {\n const name = `${ref.from} ${spec.directed ? \"->\" : \"--\"} ${ref.to}`;\n const indices = byPair.get(pairKey(ref.from, ref.to, spec.directed));\n if (!indices) return { error: `there is no edge ${name}` };\n if (ref.nth === undefined && indices.length > 1) return { error: `${indices.length} edges match ${name}: set nth to pick one` };\n const index = indices[ref.nth ?? 0];\n return index === undefined ? { error: `nth ${ref.nth} is out of range: ${indices.length} edges match ${name}` } : { index };\n };\n}\n\n/**\n * Each node's children in edge order, if the graph is a real tree: one root, connected, no cycles. Shared by\n * the schema and renderers so they can't disagree. Every edge must join nodes that exist.\n */\nexport function graphTreeShape(spec: {\n directed: boolean;\n nodes: readonly { id: string }[];\n edges: readonly { from: string; to: string }[];\n}): { root: string; children: Map<string, string[]> } | undefined {\n if (spec.edges.length !== spec.nodes.length - 1) return undefined;\n const ids = spec.nodes.map((node) => node.id);\n const adjacent = new Map<string, string[]>(ids.map((id) => [id, []]));\n for (const { from, to } of spec.edges) {\n adjacent.get(from)!.push(to);\n if (!spec.directed && from !== to) adjacent.get(to)!.push(from);\n }\n const roots = spec.directed ? ids.filter((id) => !spec.edges.some((edge) => edge.to === id)) : ids.slice(0, 1);\n const root = roots[0];\n if (roots.length !== 1 || root === undefined) return undefined;\n\n const children = new Map<string, string[]>();\n const pending = [root];\n while (pending.length) {\n const id = pending.pop()!;\n const next = adjacent.get(id)!.filter((other) => !children.has(other));\n children.set(id, next);\n pending.push(...next);\n }\n // With n - 1 edges, reaching all n nodes means there can't be a cycle.\n return children.size === ids.length ? { root, children } : undefined;\n}\n\n/** The rules for `side`, which only says anything about a tree that really gets drawn as one. */\nfunction checkSides(spec: Pick<GraphSpec, \"kind\" | \"directed\" | \"nodes\" | \"edges\">, ctx: z.RefinementCtx) {\n const sided = spec.edges.flatMap((edge, i) => (edge.side ? [{ edge, side: edge.side, path: [\"edges\", i, \"side\"] }] : []));\n const first = sided[0];\n if (!first) return;\n if (spec.kind !== \"tree\") {\n for (const { path } of sided) ctx.addIssue({ code: \"custom\", path, message: 'side only applies when kind is \"tree\": remove it, or set kind' });\n return;\n }\n const shape = graphTreeShape(spec);\n if (!shape) {\n ctx.addIssue({ code: \"custom\", path: first.path, message: \"side needs a real tree: connected with no cycles, and when directed, edges going parent to child from one root\" });\n return;\n }\n const sideOf = new Map<string, \"left\" | \"right\">();\n for (const { edge, side, path } of sided) {\n if (shape.children.get(edge.from)!.includes(edge.to)) sideOf.set(edge.to, side);\n else ctx.addIssue({ code: \"custom\", path, message: `side needs from to be the parent, but ${edge.to} is the parent of ${edge.from} here: swap them` });\n }\n for (const [parent, children] of shape.children) {\n const sides = children.flatMap((child) => sideOf.get(child) ?? []);\n if (sides.length > 0 && sides.length < children.length) {\n ctx.addIssue({ code: \"custom\", path: [\"edges\"], message: `node ${parent} mixes children with and without a side: give all of them one, or none` });\n }\n for (const side of [\"left\", \"right\"] as const) {\n if (sides.filter((s) => s === side).length > 1) ctx.addIssue({ code: \"custom\", path: [\"edges\"], message: `node ${parent} has two ${side} children` });\n }\n }\n}\n\nexport const GraphSpec = z\n .object({\n title: z.string().trim().min(1).max(120),\n directed: z.boolean().describe(\"True draws arrowheads from `from` to `to`.\"),\n kind: z\n .enum([\"tree\", \"graph\"])\n .optional()\n .describe(\n \"Layout hint. tree draws a rooted tree top-down, and needs a real tree: connected with no cycles, and when directed, edges going parent to child from one root. When undirected, the first node is the root. Anything else falls back to the general layout, unless an edge has a `side`, which is then an error. Defaults to graph.\",\n ),\n nodes: z.array(GraphNode).min(1).max(MAX_NODES),\n edges: z.array(GraphEdge).max(MAX_EDGES).describe(\"Self-loops and parallel edges are allowed.\"),\n steps: z.array(GraphStep).min(1).max(MAX_STEPS).optional().describe(\"Omit to show the graph without stepping through it.\"),\n })\n .strict()\n .superRefine((spec, ctx) => {\n const ids = new Set<string>();\n spec.nodes.forEach((node, i) => {\n if (ids.has(node.id)) ctx.addIssue({ code: \"custom\", path: [\"nodes\", i, \"id\"], message: `duplicate node id ${node.id}` });\n ids.add(node.id);\n });\n spec.edges.forEach((edge, i) => {\n for (const end of [\"from\", \"to\"] as const) {\n if (!ids.has(edge[end])) ctx.addIssue({ code: \"custom\", path: [\"edges\", i, end], message: `no node has id ${edge[end]}` });\n }\n if (edge.weight !== undefined && edge.label !== undefined) {\n ctx.addIssue({ code: \"custom\", path: [\"edges\", i], message: \"give a weight or a label, not both\" });\n }\n });\n if (spec.edges.every((edge) => ids.has(edge.from) && ids.has(edge.to))) checkSides(spec, ctx);\n const lookup = graphEdgeLookup(spec);\n spec.steps?.forEach((step, i) => {\n const seenNodes = new Set<string>();\n step.nodeStates?.forEach((state, j) => {\n const path = [\"steps\", i, \"nodeStates\", j];\n if (!ids.has(state.id)) ctx.addIssue({ code: \"custom\", path, message: `no node has id ${state.id}` });\n if (seenNodes.has(state.id)) ctx.addIssue({ code: \"custom\", path, message: `node ${state.id} has two states in one step` });\n seenNodes.add(state.id);\n });\n const seenEdges = new Set<number>();\n step.edgeStates?.forEach((state, j) => {\n const path = [\"steps\", i, \"edgeStates\", j];\n const found = lookup(state);\n if (\"error\" in found) return ctx.addIssue({ code: \"custom\", path, message: found.error });\n if (seenEdges.has(found.index)) ctx.addIssue({ code: \"custom\", path, message: `edge ${found.index} has two states in one step` });\n seenEdges.add(found.index);\n });\n });\n });\n\nexport type GraphSpec = z.infer<typeof GraphSpec>;\nexport type GraphStep = z.infer<typeof GraphStep>;\n", "import { z } from \"zod\";\n\n/**\n * multiple_choice v1: a comprehension check with exactly one correct option, graded by the\n * server without a model call (ADR-006). The full spec (with the answer) stays on the server;\n * the client gets the public view until the learner has answered.\n */\n\nexport const MultipleChoiceOption = z\n .object({\n text: z.string().trim().min(1).max(300),\n feedback: z\n .string()\n .trim()\n .min(1)\n .max(500)\n .optional()\n .describe(\"Shown if the learner picks this option: why it is right or what misconception it reflects.\"),\n })\n .strict();\n\nexport const MultipleChoiceSpec = z\n .object({\n concept: z\n .string()\n .trim()\n .min(1)\n .max(80)\n .describe('Short label for the concept being checked, e.g. \"sliding window invariant\". Used to track progress.'),\n question: z.string().trim().min(1).max(1000),\n options: z.array(MultipleChoiceOption).min(2).max(6).describe(\"2-6 options with distinct text.\"),\n correctOptionIndex: z\n .number()\n .int()\n .nonnegative()\n .describe(\"0-based index of the single correct option; must be less than the number of options.\"),\n explanation: z.string().trim().min(1).max(1000).describe(\"Shown after answering: why the correct option is correct.\"),\n })\n .strict()\n .superRefine((spec, ctx) => {\n if (spec.correctOptionIndex >= spec.options.length) {\n ctx.addIssue({\n code: \"custom\",\n path: [\"correctOptionIndex\"],\n message: \"correctOptionIndex must point at one of the options\",\n });\n }\n // Two identical options can't be told apart, but only one would be graded correct. Compare the\n // trimmed text exactly: case and inner spacing can be the point of a question (\"A\" vs \"a\",\n // \"a b\" vs \"a b\"). NFC only merges Unicode spellings that render identically.\n const seen = new Map<string, number>();\n spec.options.forEach((option, i) => {\n const key = option.text.normalize(\"NFC\");\n const first = seen.get(key);\n if (first !== undefined) {\n ctx.addIssue({ code: \"custom\", path: [\"options\", i, \"text\"], message: `duplicates option ${first}` });\n } else {\n seen.set(key, i);\n }\n });\n });\n\nexport type MultipleChoiceSpec = z.infer<typeof MultipleChoiceSpec>;\n\n/** What the client sees before answering: no answer key, no feedback. */\nexport const MultipleChoicePublic = z\n .object({\n concept: z.string(),\n question: z.string(),\n options: z.array(z.object({ text: z.string() }).strict()),\n })\n .strict();\n\nexport type MultipleChoicePublic = z.infer<typeof MultipleChoicePublic>;\n\nexport function toMultipleChoicePublic(spec: MultipleChoiceSpec): MultipleChoicePublic {\n return {\n concept: spec.concept,\n question: spec.question,\n options: spec.options.map((o) => ({ text: o.text })),\n };\n}\n\nexport const MultipleChoiceAnswer = z.object({ optionIndex: z.number().int().nonnegative() }).strict();\nexport type MultipleChoiceAnswer = z.infer<typeof MultipleChoiceAnswer>;\n\nexport const MultipleChoiceGrade = z\n .object({\n correct: z.boolean(),\n correctOptionIndex: z.number().int().nonnegative(),\n explanation: z.string(),\n feedback: z.string().optional(),\n })\n .strict();\nexport type MultipleChoiceGrade = z.infer<typeof MultipleChoiceGrade>;\n\n/** Deterministic grader. Throws if the answer points outside the options. */\nexport function gradeMultipleChoice(spec: MultipleChoiceSpec, answer: MultipleChoiceAnswer): MultipleChoiceGrade {\n const chosen = spec.options[answer.optionIndex];\n if (!chosen) throw new RangeError(`optionIndex ${answer.optionIndex} is not one of the ${spec.options.length} options`);\n return {\n correct: answer.optionIndex === spec.correctOptionIndex,\n correctOptionIndex: spec.correctOptionIndex,\n explanation: spec.explanation,\n ...(chosen.feedback ? { feedback: chosen.feedback } : {}),\n };\n}\n", "import { z } from \"zod\";\nimport { TraceVariable } from \"./algorithm-trace.js\";\n\n/**\n * set_diagram v1: a Venn diagram of up to 3 sets, with what each region contains and optional steps\n * that highlight regions. Covers union, intersection, complement, difference and inclusion-exclusion.\n *\n * A region is named by the set ids it is inside and is outside every other set, so with sets a, b and c,\n * `[\"a\", \"b\"]` is \"in a and b, not c\", and `[\"b\", \"a\"]` is the same region. `[]` is outside every set.\n * A region that isn't listed has no contents shown; a listed region with no elements and no count is empty.\n *\n * Highlights and variables do not persist: each step lists all of its own.\n */\n\nconst MAX_SETS = 3;\n/** 2^3: every region of a 3-set diagram, including outside. */\nconst MAX_REGIONS = 8;\nconst MAX_ELEMENTS = 30;\nconst MAX_STEPS = 40;\n\nconst SetId = z.string().trim().min(1).max(24);\n/** Text drawn in a tight spot in the diagram, so it stays on one line. */\nconst ONE_LINE = /^[^\\n\\r\\v\\f\\u0085\\u2028\\u2029]*$/;\nconst oneLine = (max: number) => z.string().trim().min(1).max(max).regex(ONE_LINE, \"must not contain line breaks\");\nconst Element = z.union([z.number(), oneLine(24)]);\n\n/** The same string for any ordering of the same set ids, so a region can be compared and looked up. */\nexport function setRegionKey(ids: readonly string[]): string {\n return JSON.stringify([...ids].sort());\n}\n\nconst RegionIn = z.array(SetId).max(MAX_SETS);\n\nexport const SetDiagramSet = z\n .object({\n id: SetId.describe('Short id used to refer to this set, e.g. \"a\". Unique within the diagram.'),\n label: oneLine(32).describe('Shown next to the circle, e.g. \"$A$\" or \"Multiples of 3\", on one line. Only $...$ is a formula.'),\n })\n .strict();\n\nexport const SetDiagramRegion = z\n .object({\n in: RegionIn.describe('Ids of the sets this region is inside. It is outside all the others: with sets a, b, c, [\"a\",\"b\"] means in a and b, not c. [] means outside every set and needs `universe`. No id twice.'),\n elements: z.array(Element).max(MAX_ELEMENTS).describe(\"What the region contains, each short and on one line. No element may appear twice, in this list or across regions, and 1 and \\\"1\\\" count as the same element. Empty if you only know the count, or the region is empty.\"),\n count: z\n .number()\n .int()\n .nonnegative()\n .max(1_000_000)\n .optional()\n .describe(\"How many elements the region has, when that's more than you list, e.g. for inclusion-exclusion. At least the number of elements listed.\"),\n })\n .strict();\n\nexport const SetDiagramHighlight = z\n .object({\n in: RegionIn.describe(\"The region to highlight, named like a region's `in`, with no id twice. Any region of the diagram can be highlighted, listed or not.\"),\n tone: z.enum([\"active\", \"done\", \"muted\"]).optional().describe(\"active = current focus, done = finished, muted = ruled out. Defaults to active.\"),\n })\n .strict();\n\nexport const SetDiagramStep = z\n .object({\n explanation: z.string().trim().min(1).max(500).describe(\"What this step shows, in one or two sentences.\"),\n highlights: z\n .array(SetDiagramHighlight)\n .max(MAX_REGIONS)\n .optional()\n .describe(\"All regions highlighted at this step, each at most once. They apply to this step only, not carried over: repeat any that still apply.\"),\n variables: z.array(TraceVariable).max(12).optional().describe(\"All running state at this step, e.g. |A \u222A B| so far. Not carried over from earlier steps.\"),\n })\n .strict();\n\nexport const SetDiagramSpec = z\n .object({\n title: z.string().trim().min(1).max(120),\n sets: z.array(SetDiagramSet).min(1).max(MAX_SETS).describe(\"The circles, 1 to 3.\"),\n universe: oneLine(24).optional().describe('Label of the rectangle around the sets, e.g. \"$U$\", on one line. Needed to show or highlight the region outside every set, such as a complement.'),\n regions: z.array(SetDiagramRegion).max(MAX_REGIONS).describe(\"What each region contains, each region at most once.\"),\n steps: z.array(SetDiagramStep).min(1).max(MAX_STEPS).optional().describe(\"Optional walk through the diagram. Omit for a static diagram.\"),\n })\n .strict()\n .superRefine((spec, ctx) => {\n const ids = spec.sets.map((s) => s.id);\n spec.sets.forEach((set, i) => {\n if (ids.indexOf(set.id) !== i) ctx.addIssue({ code: \"custom\", path: [\"sets\", i, \"id\"], message: `duplicate set id \"${set.id}\"` });\n });\n\n /** Checks a list of region references, and reports any region named twice, whatever the order of its ids. */\n const checkRegions = (entries: readonly { in: string[] }[], path: (string | number)[]) => {\n const seen = new Set<string>();\n entries.forEach((entry, i) => {\n const at = [...path, i, \"in\"];\n entry.in.forEach((id, j) => {\n if (!ids.includes(id)) ctx.addIssue({ code: \"custom\", path: [...at, j], message: `unknown set \"${id}\"` });\n if (entry.in.indexOf(id) !== j) ctx.addIssue({ code: \"custom\", path: [...at, j], message: `set \"${id}\" is named twice` });\n });\n if (entry.in.length === 0 && spec.universe === undefined) {\n ctx.addIssue({ code: \"custom\", path: at, message: \"the region outside every set needs `universe`\" });\n }\n const key = setRegionKey(entry.in);\n if (seen.has(key)) ctx.addIssue({ code: \"custom\", path: at, message: `region ${key} appears more than once` });\n seen.add(key);\n });\n };\n checkRegions(spec.regions, [\"regions\"]);\n spec.steps?.forEach((step, i) => checkRegions(step.highlights ?? [], [\"steps\", i, \"highlights\"]));\n\n // Regions don't overlap, so an element in two of them would teach something false.\n const placed = new Set<string>();\n spec.regions.forEach((region, i) => {\n region.elements.forEach((element, j) => {\n if (placed.has(String(element))) {\n ctx.addIssue({ code: \"custom\", path: [\"regions\", i, \"elements\", j], message: `element \"${element}\" appears more than once; regions don't overlap` });\n }\n placed.add(String(element));\n });\n if (region.count !== undefined && region.count < region.elements.length) {\n ctx.addIssue({ code: \"custom\", path: [\"regions\", i, \"count\"], message: `count ${region.count} is less than the ${region.elements.length} elements listed` });\n }\n });\n });\n\nexport type SetDiagramSpec = z.infer<typeof SetDiagramSpec>;\nexport type SetDiagramStep = z.infer<typeof SetDiagramStep>;\nexport type SetDiagramHighlight = z.infer<typeof SetDiagramHighlight>;\n", "import { z } from \"zod\";\n\n/**\n * table v1: a truth table, relation matrix or other tabular working, optionally stepped through.\n *\n * State rules (renderers must follow them):\n * - `cells` persists: a changed cell keeps its new value on every later step.\n * - `highlight` does not persist: each step lists all of its own, and omitting it means that step has none.\n * The table's shape never changes, so every index can be checked against `rows` and `columns`.\n */\n\nconst MAX_COLUMNS = 16;\nconst MAX_ROWS = 64;\nconst MAX_STEPS = 100;\n\nconst Header = z.string().trim().min(1).max(80);\nconst CellValue = z.union([z.number(), z.boolean(), z.string().max(120)]);\nconst Index = z.number().int().nonnegative();\n\nexport const TableHighlight = z\n .object({\n row: Index.optional().describe(\"0-based data row, below the number of rows. With no column, highlights the whole row. A highlight must give a row, a column or both.\"),\n column: Index.optional().describe(\"0-based data column, below the number of columns. With no row, highlights the whole column. With both, highlights one cell.\"),\n tone: z\n .enum([\"active\", \"done\", \"muted\"])\n .optional()\n .describe(\"active = current focus, done = finished, muted = ruled out. Defaults to active. Where highlights overlap, the later one wins.\"),\n })\n .strict();\n\nexport const TableCellChange = z\n .object({\n row: Index.describe(\"0-based data row, below the number of rows.\"),\n column: Index.describe(\"0-based data column, below the number of columns.\"),\n value: CellValue.describe(\"The cell's value from this step on.\"),\n })\n .strict();\n\nexport const TableStep = z\n .object({\n explanation: z.string().trim().min(1).max(500).describe(\"What happens in this step, in one or two sentences.\"),\n highlight: z\n .array(TableHighlight)\n .max(32)\n .optional()\n .describe(\"All cells, rows and columns to highlight at this step. Not carried over from earlier steps.\"),\n cells: z\n .array(TableCellChange)\n .max(64)\n .optional()\n .describe('Cells this step fills in or changes. They keep the new value on later steps. To reveal working, start a cell as \"\" and set it here.'),\n })\n .strict();\n\nexport const TableSpec = z\n .object({\n title: z.string().trim().min(1).max(120),\n columns: z.array(Header).min(1).max(MAX_COLUMNS).describe(\"Column headers, one per data column. Don't include a header for rowHeaders.\"),\n rows: z\n .array(z.array(CellValue).min(1).max(MAX_COLUMNS))\n .min(1)\n .max(MAX_ROWS)\n .describe('Data rows, each with exactly one cell per column. A boolean shows as T or F; \"\" is a blank cell.'),\n rowHeaders: z.array(Header).max(MAX_ROWS).optional().describe(\"Optional label for each row, e.g. a relation matrix's elements. Exactly one per row.\"),\n steps: z.array(TableStep).min(1).max(MAX_STEPS).optional().describe(\"Omit for a static table. With steps, the learner steps through them.\"),\n })\n .strict()\n .superRefine((spec, ctx) => {\n const rowCount = spec.rows.length;\n const columnCount = spec.columns.length;\n spec.rows.forEach((row, i) => {\n if (row.length !== columnCount) {\n ctx.addIssue({ code: \"custom\", path: [\"rows\", i], message: `row has ${row.length} cells but there are ${columnCount} columns` });\n }\n });\n if (spec.rowHeaders && spec.rowHeaders.length !== rowCount) {\n ctx.addIssue({ code: \"custom\", path: [\"rowHeaders\"], message: `${spec.rowHeaders.length} row headers for ${rowCount} rows` });\n }\n const checkRow = (row: number, path: (string | number)[]) => {\n if (row >= rowCount) ctx.addIssue({ code: \"custom\", path, message: `row ${row} is outside the table (${rowCount} rows)` });\n };\n const checkColumn = (column: number, path: (string | number)[]) => {\n if (column >= columnCount) ctx.addIssue({ code: \"custom\", path, message: `column ${column} is outside the table (${columnCount} columns)` });\n };\n spec.steps?.forEach((step, i) => {\n step.highlight?.forEach((h, j) => {\n const path = [\"steps\", i, \"highlight\", j];\n if (h.row === undefined && h.column === undefined) ctx.addIssue({ code: \"custom\", path, message: \"a highlight needs a row, a column or both\" });\n if (h.row !== undefined) checkRow(h.row, [...path, \"row\"]);\n if (h.column !== undefined) checkColumn(h.column, [...path, \"column\"]);\n });\n step.cells?.forEach((c, j) => {\n checkRow(c.row, [\"steps\", i, \"cells\", j, \"row\"]);\n checkColumn(c.column, [\"steps\", i, \"cells\", j, \"column\"]);\n });\n });\n });\n\nexport type TableSpec = z.infer<typeof TableSpec>;\nexport type TableStep = z.infer<typeof TableStep>;\n", "import { z } from \"zod\";\n\n/**\n * worked_steps v1: a proof, induction or combinatorics working, revealed one step at a time.\n * Every step stays on screen once revealed, so later steps can be read against earlier ones.\n */\n\nconst MAX_STEPS = 50;\n\nexport const WorkedStep = z\n .object({\n label: z.string().trim().min(1).max(40).optional().describe('Optional heading for this part of the working, e.g. \"Base case\", \"Inductive step\".'),\n statement: z\n .string()\n .trim()\n .min(1)\n .max(1000)\n .describe(\"What this step establishes, mostly as a formula in $...$. For large sums and fractions, put \\\\displaystyle INSIDE the dollars, e.g. $\\\\displaystyle\\\\sum_{i=1}^{n} i$; $$ is not available.\"),\n justification: z.string().trim().min(1).max(500).describe('Why it follows, e.g. \"by the inductive hypothesis\".'),\n })\n .strict();\n\nexport const WorkedStepsSpec = z\n .object({\n title: z.string().trim().min(1).max(120),\n goal: z.string().trim().min(1).max(500).optional().describe(\"Optional statement of what is being shown, e.g. the claim to prove.\"),\n steps: z.array(WorkedStep).min(1).max(MAX_STEPS),\n })\n .strict();\n\nexport type WorkedStepsSpec = z.infer<typeof WorkedStepsSpec>;\nexport type WorkedStep = z.infer<typeof WorkedStep>;\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,SAAS;AAOX,IAAM,iBAAiB;AACvB,IAAM,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,cAAc;AAG9D,IAAM,cAAc,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC,EAAE,OAAO;AAGjE,IAAM,cAAc,EAAE,OAAO,EAAE,KAAK,EAA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