@lingochunk/mcp 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,8 +45,9 @@ compose good lessons, cards and annotations.
45
45
  | `validate_lesson` | `lessons:write` | Dry-run validates a `lesson.v1` document WITHOUT saving it, reporting EVERY problem at once (schema faults with a `loc`, reference faults with the same codes `save_lesson` raises) so you fix a document in one pass. Stores nothing; spends no lesson-cap budget. Call it before `save_lesson`. |
46
46
  | `save_lesson` | `lessons:write` | Saves a lesson to your private library (100 max). Preferred: a structured `lesson.v1` document the app renders natively (Lessons tab on the episode, real audio, live word state, Ask AI); returns metadata + an `app_url`. Legacy: a self-contained HTML file (10 MB cap) opened via a short-lived view URL. Optional `course_id` (+ `sequence`) files it under a course. Creators: `visibility:'public'` publishes the lesson to everyone who can view the source episode (documents only, own episodes only). |
47
47
  | `list_lessons` | `lessons:write` | Your saved lessons, newest first (id, title, language, format, source episode, and `course_id`/`sequence`/`course_title` when filed under a course), cursor-paginated - for finding ids and seeing what already exists. |
48
- | `get_lesson` | `lessons:write` | Reads back a saved `lesson.v1` document by id. Closes the revision loop: lessons are immutable, so revise = read -> save new -> delete old. |
49
- | `delete_lesson` | `lessons:write` | Permanently deletes one saved lesson by id (destructive; owner-scoped server-side). Mainly for iterating: re-saving creates a new lesson, so superseded drafts count against the 100-lesson cap. |
48
+ | `get_lesson` | `lessons:write` | Reads back a saved `lesson.v1` document by id, plus its `version` token. Opens the revision loop: `get_lesson` -> edit -> `update_lesson` revises in place. |
49
+ | `update_lesson` | `lessons:write` | Revises a saved `lesson.v1` document IN PLACE (same id, same `app_url`, same visibility/course): surgical block `ops` keyed to the app's 1-based § handles, or a full replacement `document`. `base_version` guards against overwriting a concurrent edit (409 `stale_document`). |
50
+ | `delete_lesson` | `lessons:write` | Permanently deletes one saved lesson by id (destructive; owner-scoped server-side). For lessons the user is done with - revision is `update_lesson`, not delete + re-save. |
50
51
  | `create_course` | `lessons:write` | Creates a course: a named, ordered series to file lessons under. Returns its id, for `save_lesson`'s `course_id`. Authored via the API only (no in-app course editor). |
51
52
  | `list_courses` | `lessons:write` | Your courses, newest first, each with its lesson count - for finding a `course_id` or seeing what series exist. |
52
53
  | `delete_course` | `lessons:write` | Deletes one course by id (destructive to the grouping, idempotent). Its lessons SURVIVE - their `course_id` is set null, un-grouping them; authored content is never deleted. |
package/dist/client.d.ts CHANGED
@@ -182,6 +182,11 @@ export declare class LingoChunkClient {
182
182
  private raiseForStatus;
183
183
  /** GET a JSON endpoint. */
184
184
  private getJson;
185
+ /** GET a JSON endpoint, also capturing one response header (e.g. the
186
+ * lesson optimistic-concurrency token in X-Lesson-Version). */
187
+ private getJsonWithHeader;
188
+ /** PUT a JSON body, also capturing one response header. */
189
+ private putJsonWithHeader;
185
190
  /** DELETE an endpoint; success is 204 with no body to parse. */
186
191
  private deleteNoContent;
187
192
  /** POST a JSON body to an endpoint and parse the JSON response. */
@@ -213,9 +218,23 @@ export declare class LingoChunkClient {
213
218
  /** Delete a course (owner-scoped). Its lessons survive - the DB sets their
214
219
  * course_id NULL, un-grouping them. 404 for a foreign or unknown id. */
215
220
  deleteCourse(courseId: string): Promise<void>;
216
- /** The stored lesson.v1 document. Owner-scoped server-side; 404 for HTML
221
+ /** The stored lesson.v1 document plus its optimistic-concurrency token
222
+ * (the X-Lesson-Version response header; a caller echoes it verbatim as
223
+ * an update's base_version). Owner-scoped server-side; 404 for HTML
217
224
  * lessons (they have no document) and for foreign/unknown ids. */
218
- getLessonDocument(lessonId: string): Promise<unknown>;
225
+ getLessonDocument(lessonId: string): Promise<{
226
+ version: string | null;
227
+ document: unknown;
228
+ }>;
229
+ /** Replace a lesson.v1 document in place (owner-scoped; same id, same
230
+ * app_url). base_version is the X-Lesson-Version token the edit is based
231
+ * on - if the lesson changed since, the server answers 409 stale_document
232
+ * instead of overwriting the other writer. Returns the refreshed lesson
233
+ * metadata plus the NEW token for chained edits. */
234
+ updateLesson(lessonId: string, document: unknown, baseVersion: string): Promise<{
235
+ version: string | null;
236
+ lesson: unknown;
237
+ }>;
219
238
  /** Owner-scoped server-side: a foreign or unknown id is a 404, never a leak. */
220
239
  deleteLesson(lessonId: string): Promise<void>;
221
240
  /** Start an Anki export (no body). 400 for a deck with no linked submission. */
package/dist/client.js CHANGED
@@ -134,6 +134,34 @@ export class LingoChunkClient {
134
134
  }
135
135
  return (await res.json());
136
136
  }
137
+ /** GET a JSON endpoint, also capturing one response header (e.g. the
138
+ * lesson optimistic-concurrency token in X-Lesson-Version). */
139
+ async getJsonWithHeader(path, header) {
140
+ const res = await fetch(this.buildUrl(path), {
141
+ method: "GET",
142
+ headers: this.authHeaders("application/json"),
143
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
144
+ });
145
+ if (!res.ok) {
146
+ await this.raiseForStatus(res);
147
+ }
148
+ return { data: (await res.json()), header: res.headers.get(header) };
149
+ }
150
+ /** PUT a JSON body, also capturing one response header. */
151
+ async putJsonWithHeader(path, body, header) {
152
+ const headers = this.authHeaders("application/json");
153
+ headers["Content-Type"] = "application/json";
154
+ const res = await fetch(this.buildUrl(path), {
155
+ method: "PUT",
156
+ headers,
157
+ body: JSON.stringify(body),
158
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
159
+ });
160
+ if (!res.ok) {
161
+ await this.raiseForStatus(res);
162
+ }
163
+ return { data: (await res.json()), header: res.headers.get(header) };
164
+ }
137
165
  /** DELETE an endpoint; success is 204 with no body to parse. */
138
166
  async deleteNoContent(path) {
139
167
  const res = await fetch(this.buildUrl(path), {
@@ -254,10 +282,22 @@ export class LingoChunkClient {
254
282
  deleteCourse(courseId) {
255
283
  return this.deleteNoContent(`/courses/${encodeURIComponent(courseId)}`);
256
284
  }
257
- /** The stored lesson.v1 document. Owner-scoped server-side; 404 for HTML
285
+ /** The stored lesson.v1 document plus its optimistic-concurrency token
286
+ * (the X-Lesson-Version response header; a caller echoes it verbatim as
287
+ * an update's base_version). Owner-scoped server-side; 404 for HTML
258
288
  * lessons (they have no document) and for foreign/unknown ids. */
259
- getLessonDocument(lessonId) {
260
- return this.getJson(`/lessons/${encodeURIComponent(lessonId)}/document`);
289
+ async getLessonDocument(lessonId) {
290
+ const { data, header } = await this.getJsonWithHeader(`/lessons/${encodeURIComponent(lessonId)}/document`, "x-lesson-version");
291
+ return { version: header, document: data };
292
+ }
293
+ /** Replace a lesson.v1 document in place (owner-scoped; same id, same
294
+ * app_url). base_version is the X-Lesson-Version token the edit is based
295
+ * on - if the lesson changed since, the server answers 409 stale_document
296
+ * instead of overwriting the other writer. Returns the refreshed lesson
297
+ * metadata plus the NEW token for chained edits. */
298
+ async updateLesson(lessonId, document, baseVersion) {
299
+ const { data, header } = await this.putJsonWithHeader(`/lessons/${encodeURIComponent(lessonId)}/document`, { document, base_version: baseVersion }, "x-lesson-version");
300
+ return { version: header, lesson: data };
261
301
  }
262
302
  /** Owner-scoped server-side: a foreign or unknown id is a 404, never a leak. */
263
303
  deleteLesson(lessonId) {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA;;6EAE6E;AAC7E,MAAM,OAAO,QAAS,SAAQ,KAAK;IAEtB;IACA;IACA;IACA;IAJX,YACW,MAAc,EACd,MAAc,EACd,UAAmB,EACnB,IAAa;QAEtB,KAAK,CAAC,kBAAkB,MAAM,KAAK,MAAM,EAAE,CAAC,CAAC;QALpC,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAS;QACnB,SAAI,GAAJ,IAAI,CAAS;QAGtB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAgKD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,IAAI,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pB,gBAAgB,kBAAkB,CAAC,YAAY,CAAC,gBAAgB,YAAY,EAAE,CAC/E,CAAC;IACJ,CAAC;CACF"}
@@ -8,13 +8,13 @@ export const GUIDES = {
8
8
  topic: "overview",
9
9
  promptName: "lingochunk-overview",
10
10
  description: "Give a short guided tour of what the user can do with their LingoChunk connection, then go deeper on the area they pick. Use when the user asks what they can do with LingoChunk, what is possible, how to get started, says \"help\" about the connection, or is exploring it for the first time.",
11
- body: "# What you can do with LingoChunk\n\nYou are connected to the user's LingoChunk account: their episodes with\ntimestamped transcripts and native audio, their FSRS-graded vocabulary, their\ndecks and lessons, and (for creators) the collections they publish. This\nguide is the menu of what to offer.\n\n## How to answer \"what can I do?\"\n\n- **Answer short first**: one line per area below, each with its example\n prompt. Do NOT dump this whole guide on the user.\n- **Then ask which area to go deeper on** - or just do the thing they pick.\n- Before actually composing anything, call `get_authoring_guide` with the\n area's topic (in parentheses below) and follow it; that is where the craft\n rules live. Areas marked \"no guide\" need no preparation.\n- If a tool answers 403 naming a scope, the connection was granted narrow\n permissions: tell the user to reconnect (or mint a token with that scope)\n via LingoChunk -> Settings -> API tokens.\n\n## The menu\n\nFor every learner:\n\n1. **Talk through an episode** (topic `discuss`) - work through a real\n episode conversationally, explaining grammar and vocabulary as they come\n up, grounded in the user's own data.\n Example: *\"Talk me through yesterday's episode and explain the tricky\n bits.\"*\n2. **Check words and quiz** (no guide) - the user's vocabulary with live\n maturity states: known, learning, new, due.\n Example: *\"Which of my German words are due today? Quiz me on them.\"*\n3. **Build a lesson** (topic `lesson`) - a coursebook-style lesson the app\n renders natively: real-audio exercises, gap-fills, dictation, shadowing,\n one grammar point, an AI tutor, an offline worksheet download.\n Example: *\"Build a B1 lesson from the first five minutes of episode 12.\"*\n4. **Build a course** (topic `course`) - a named, ordered series of lessons\n with a different grammar point per lesson and ramping difficulty.\n Example: *\"Turn this 20-minute episode into a four-lesson course, A2 to\n B1.\"*\n5. **Make flashcards and export to Anki** (topic `cards`) - native-grade\n cards anchored to verbatim sentences (highlight/blur painting, native\n audio clip), plus `.apkg` deck export.\n Example: *\"Make cards for the idioms in episode 12, then export the deck\n to Anki.\"*\n6. **Add languages** (topic `add-language`) - fan an episode out into up to\n ten more languages server-side, or hand-craft the translation sentence by\n sentence - including simplified same-language versions (e.g. German audio\n glossed in easier A2 German).\n Example: *\"Add Polish and Turkish to episode 12.\"* or *\"Make a simplified\n German (A2) version of it.\"*\n\nFor creators (per-account features):\n\n7. **Creator notes** (topic `annotations`) - short notes pinned to the exact\n idioms, fixed phrases and cultural references in the transcript; followers\n see them as highlights with a note sheet, and as note cards.\n Example: *\"Annotate the useful expressions in episode 12 for my\n students.\"*\n8. **Publish to an audience** (topic `lesson`) - lessons save private by\n default; saving with visibility `public` surfaces one to everyone who can\n view the episode, e.g. followers of the creator's channel.\n Example: *\"Build a lesson from episode 12 and publish it to my channel.\"*\n\n## Worth knowing (relay when relevant)\n\n- Everything is grounded in the user's own content: quotes, sentence\n positions and audio windows are validated server-side, so an invented or\n misquoted line is rejected rather than stored.\n- The app renders lessons natively with the real episode audio and live word\n knowledge; nothing here generates synthetic speech.\n- Composition runs on this agent; it never spends LingoChunk's AI budget.\n- The connection is revocable at any time in Settings -> API tokens.\n- Creators get the full picture (setup, workflows, best practices, example\n prompts) in the creator guide:\n https://github.com/lingochunk/mcp/blob/main/docs/creator-guide.md",
11
+ body: "# What you can do with LingoChunk\n\nYou are connected to the user's LingoChunk account: their episodes with\ntimestamped transcripts and native audio, their FSRS-graded vocabulary, their\ndecks and lessons, and (for creators) the collections they publish. This\nguide is the menu of what to offer.\n\n## How to answer \"what can I do?\"\n\n- **Answer short first**: one line per area below, each with its example\n prompt. Do NOT dump this whole guide on the user.\n- **Then ask which area to go deeper on** - or just do the thing they pick.\n- Before actually composing anything, call `get_authoring_guide` with the\n area's topic (in parentheses below) and follow it; that is where the craft\n rules live. Areas marked \"no guide\" need no preparation.\n- If a tool answers 403 naming a scope, the connection was granted narrow\n permissions: tell the user to reconnect (or mint a token with that scope)\n via LingoChunk -> Settings -> API tokens.\n\n## The menu\n\nFor every learner:\n\n1. **Talk through an episode** (topic `discuss`) - work through a real\n episode conversationally, explaining grammar and vocabulary as they come\n up, grounded in the user's own data.\n Example: *\"Talk me through yesterday's episode and explain the tricky\n bits.\"*\n2. **Check words and quiz** (no guide) - the user's vocabulary with live\n maturity states: known, learning, new, due.\n Example: *\"Which of my German words are due today? Quiz me on them.\"*\n3. **Build a lesson** (topic `lesson`) - a coursebook-style lesson the app\n renders natively: real-audio exercises, gap-fills, dictation, shadowing,\n one grammar point, an AI tutor, an offline worksheet download.\n Example: *\"Build a B1 lesson from the first five minutes of episode 12.\"*\n4. **Revise a lesson** (topic `lesson`) - edit a saved lesson IN PLACE\n (same id and links): the app's Co-edit mode labels each block §1, §2, ...\n and refreshes live, so the user points at a block and watches your edit\n land within seconds.\n Example: *\"In my lesson, change §5 to a two-person dialogue.\"*\n5. **Build a course** (topic `course`) - a named, ordered series of lessons\n with a different grammar point per lesson and ramping difficulty.\n Example: *\"Turn this 20-minute episode into a four-lesson course, A2 to\n B1.\"*\n6. **Make flashcards and export to Anki** (topic `cards`) - native-grade\n cards anchored to verbatim sentences (highlight/blur painting, native\n audio clip), plus `.apkg` deck export.\n Example: *\"Make cards for the idioms in episode 12, then export the deck\n to Anki.\"*\n7. **Add languages** (topic `add-language`) - fan an episode out into up to\n ten more languages server-side, or hand-craft the translation sentence by\n sentence - including simplified same-language versions (e.g. German audio\n glossed in easier A2 German).\n Example: *\"Add Polish and Turkish to episode 12.\"* or *\"Make a simplified\n German (A2) version of it.\"*\n\nFor creators (per-account features):\n\n8. **Creator notes** (topic `annotations`) - short notes pinned to the exact\n idioms, fixed phrases and cultural references in the transcript; followers\n see them as highlights with a note sheet, and as note cards.\n Example: *\"Annotate the useful expressions in episode 12 for my\n students.\"*\n9. **Publish to an audience** (topic `lesson`) - lessons save private by\n default; saving with visibility `public` surfaces one to everyone who can\n view the episode, e.g. followers of the creator's channel.\n Example: *\"Build a lesson from episode 12 and publish it to my channel.\"*\n\n## Worth knowing (relay when relevant)\n\n- Everything is grounded in the user's own content: quotes, sentence\n positions and audio windows are validated server-side, so an invented or\n misquoted line is rejected rather than stored.\n- The app renders lessons natively with the real episode audio and live word\n knowledge; nothing here generates synthetic speech.\n- Composition runs on this agent; it never spends LingoChunk's AI budget.\n- The connection is revocable at any time in Settings -> API tokens.\n- Creators get the full picture (setup, workflows, best practices, example\n prompts) in the creator guide:\n https://github.com/lingochunk/mcp/blob/main/docs/creator-guide.md",
12
12
  },
13
13
  "lesson": {
14
14
  topic: "lesson",
15
15
  promptName: "lingochunk-lesson",
16
16
  description: "Build a coursebook-style lesson from the user's own LingoChunk listening history and save it as a structured lesson.v1 document. Pick an episode (optionally a time range like \"the first 5 minutes\") and a CEFR level, pull the transcript slice plus vocabulary with FSRS maturity, then compose a lesson on a Listen -> Text -> Vocabulary -> Grammar -> Exercises -> Review scaffold, choosing 2-3 exercise archetypes suited to the grammar point and level so consecutive lessons don't feel identical. The app renders it natively with real audio, live word state, crosslinks and a built-in AI tutor. Use when the user asks to make or build a lesson, worksheet, study sheet, or exercises from their LingoChunk content, or to \"quiz me\" on an episode or a word.",
17
- body: "# LingoChunk lesson builder\n\nBuild a `lesson.v1` document grounded in the learner's real LingoChunk\ncontent. The division of labour is the point: **LingoChunk supplies the\nmaterials (sentences with positions and translations, vocabulary with FSRS\nmaturity) and renders the lesson natively in the app; you do the pedagogy on\nthe user's own tokens.** No server-side LLM spend. The app plays the audio\nstraight from the original episode (never send or embed audio), resolves\nword knowledge live, links every word and sentence back to its Words/Listen\ntabs, and mounts an Ask AI tutor on the grammar box and glossary.\n\nThis skill uses the `lingochunk` MCP tools. If they are not available, tell\nthe user to add the LingoChunk MCP server (see the plugin README) and stop.\n\n## When to use\n\n- \"Make me a lesson / worksheet / quiz from yesterday's episode.\"\n- \"Build a lesson on the subjunctive using examples from my episodes.\"\n- \"Create a lesson from the first five minutes of episode X.\"\n- \"Quiz me on the words I'm learning in German.\"\n\n## Options to settle first (ask only what the user left open)\n\n1. **Source**: a named episode (`list_library`), or a topic/grammar point\n gathered across episodes (`search_examples`, `get_vocabulary`) - in v1 a\n lesson has ONE source episode, so for cross-episode topics pick the\n richest single episode.\n2. **Time range**: \"the first five minutes\" maps to `get_transcript`\n `from_time`/`to_time`; a chapter or scene works too. Default: a coherent\n 3 to 8 minute slice, not a whole 45-minute episode.\n3. **Level**: the CEFR level to pitch at. If the user does not say, infer it\n from the CEFR mix of their `get_vocabulary(status=known)` words and say\n which level you picked. Level drives:\n - instruction language: A1/A2 instructions in the learner's language;\n B1+ in the target language (keep them one short sentence);\n - exercise mix: more recognition (MCQ, matching) at low levels, more\n cued recall and production at high levels;\n - which grammar point qualifies (see below), glossary depth, and which\n archetypes you pick from the menu.\n\n## Workflow\n\n1. **Pull the slice.** `get_transcript` with the chosen range. Only\n `transcript_state: \"ready\"` is usable. Keep each sentence's `position`,\n `text`, `translation`, `speaker`, and its `start`/`end` seconds - the\n document references sentences BY POSITION and must quote `text` VERBATIM\n (the server rejects misquotes); the `start`/`end` times are what you build\n `audio_slice` windows from.\n\n2. **Gather and filter vocabulary.** Two sets: EXCLUDE and DRILL.\n - Exclusion set: `get_vocabulary(status=known)` (follow `next_cursor`\n with `limit=200` until null, or a known word slips into an exercise).\n - Due words: `get_vocabulary(status=due)` - do NOT exclude; they are\n exactly what is worth practising now (the app flags them live).\n - Drill words: `get_vocabulary(status=learning)` and `status=new`,\n prioritised.\n - Ground meanings/gender/CEFR with `lookup_word`; never invent them.\n\n3. **Pick ONE grammar point** evidenced in the slice, at the lesson's\n level. One per lesson, always. Prefer a pattern that occurs 2+ times in\n the slice so the evidence table has real rows.\n\n4. **Compose the document** (schema below) on the scaffold, choosing\n archetypes from the menu. The scaffold is the default skeleton; the\n archetype menu is what stops every lesson looking the same. See\n \"The scaffold and the archetype menu\" below.\n\n5. **Validate, then save.** Call `validate_lesson` with `{document}` FIRST:\n it returns EVERY problem at once (schema + reference), so you fix the whole\n document in one pass instead of burning save -> 400 -> fix cycles. Read the\n `errors` codes: `schema_invalid` carries a `loc` (dotted path to the bad\n field); `unknown_positions` / `position_outside_slice` mean a sentence\n reference is wrong; `dialogue_mismatch` means quote the transcript verbatim\n (including punctuation); `order_mismatch` means an `exercise_order` item's\n segments do not reassemble its anchored sentence. Only once it returns\n `valid: true` do you `save_lesson` with `{document}`. Set\n `generator: {skill: \"lingochunk-lesson\"}` so the app's lessons list shows\n which skill built it (episodes collect lessons from several skills). Both\n calls report `unknown_lemmas` (advisory only - glossary lemmas the episode\n does not know); prefer the lemma form the episode's vocabulary uses and fix\n any that look wrong before saving.\n\n6. **Deliver.** Give the user the `app_url` (the lesson opens in a Lessons\n tab on the episode). If the user asked for a course or a series of lessons,\n file this one under a course: `create_course` once, then pass its id as\n `save_lesson`'s `course_id` with a `sequence` (see the `lingochunk-course`\n guide). If the user is a CREATOR publishing to their audience, pass\n `visibility: \"public\"` too - the lesson then shows to everyone who can view\n the episode (e.g. followers of their collection). Publishing requires\n owning the episode; the default is private, so never publish unasked. Offer `add_card` for drill words the lesson introduced (a 409 means\n it is already there - skip and carry on; never add `status=known` words).\n Mention the in-app Download button if they want the offline HTML worksheet\n (it has no audio by design). Summarise what the lesson covers and which\n words it drills.\n\n## Anchoring (mandatory)\n\nThe renderer's best features - inline play chips, deep links into Listen and\nWords, listening exercises - are all opt-in through optional fields. A lesson\nthat omits them renders flat. These are hard rules, not suggestions:\n\n- **Every `vocab` entry MUST carry `position`.** The anchor is what puts an\n audio play chip on the row and a crosslink to the Words tab. A vocab entry\n with no position is a dead row.\n- **Every MCQ that tests LISTENING MUST carry `audio`** (and a `position`\n when it points at one sentence). Without `audio` it is a reading question,\n not a listening one. A pure recognition/gist MCQ before reading is the one\n case that legitimately has no audio.\n- **Every gap-fill item SHOULD carry `position` and `translation`.** The\n position anchors it to the real sentence (and lights a play chip where the\n renderer supports it); the translation gives the learner the meaning to\n work from.\n- **Dialogue highlights on the grammar pattern are required.** Every\n `dialogue` line that carries an instance of the lesson's grammar point MUST\n mark it with `highlights` (code-point ranges) so the pattern shows as gold\n marks. A dialogue with no highlights wastes the one grammar point.\n\n## The scaffold and the archetype menu\n\n**Scaffold (default skeleton, in order):** Listen -> Text -> Vocabulary ->\nGrammar -> Exercises -> Review. Use `section` blocks to head each stage; the\nrenderer numbers them. This ordering (recognition before reading, one grammar\npoint, graded practice, can-do close) is the pedagogy and holds for every\nlesson.\n\n**Archetype menu (the variety).** The Exercises stage - and the Listen and\nText stages' interactive bits - are NOT a fixed list. Pick **2-3 archetypes**\nper lesson, keyed to the grammar point, the level, and what the episode's\naudio actually affords, so consecutive lessons on the same episode don't feel\nidentical. The archetypes (recipes for the starred ones are below):\n\n| Archetype | Block(s) | Best for |\n|---|---|---|\n| Gist MCQ (no audio) | `exercise_mcq` | opening recognition, every lesson |\n| T/F comprehension * | `exercise_mcq`, 2 options | after the listen, low/mid levels |\n| Listening-detail MCQ | `exercise_mcq` + `audio` + `position` | any level, checks a specific line |\n| Minimal-pair MCQ * | `exercise_mcq` + `audio` | morphology, separable prefixes, case, tense |\n| Back-chain ladder * | 3-4 `audio_slice` | one hard/long sentence; prosody; word order |\n| Assimil passive wave * | `prose` + `dialogue` | the Text stage, every level |\n| Anticipation round * | `prose` + `audio_slice` pairs | cued recall, mid/high levels |\n| Grammar gap-fill | `exercise_gap_fill` | the grammar point itself, every lesson |\n| Vocabulary gap-fill | `exercise_gap_fill` + `wordbank` | vocabulary consolidation, low/mid |\n| Match words -> meanings | `exercise_match` | vocabulary, low/mid levels |\n| Sentence reorder * | `exercise_order` | word order / clause structure, every level |\n| Dictation * | `exercise_dictation` | native-audio dictation, listening precision |\n| Shadowing * | `exercise_shadow` | pronunciation & prosody, the differentiator |\n| Production | `exercise_production` | active use, mid/high levels |\n\n**Which archetypes for which lesson** (grammar-point type x level -> pick from):\n\n| Grammar point | A1-A2 | B1-B2 | C1+ |\n|---|---|---|---|\n| Verb morphology (Perfekt, tense) | minimal-pair MCQ, grammar gap-fill | back-chain ladder, grammar gap-fill | anticipation round, production |\n| Word order / clause structure | sentence reorder, T/F comprehension | sentence reorder, back-chain ladder | anticipation round, production |\n| Cases & endings | minimal-pair MCQ, match | grammar gap-fill, minimal-pair MCQ | production, anticipation round |\n| Separable / prefix verbs | minimal-pair MCQ, listening-detail MCQ | minimal-pair MCQ, grammar gap-fill | anticipation round, production |\n| Connectors / subordination | T/F comprehension, vocabulary gap-fill | grammar gap-fill, production | production, anticipation round |\n| Vocabulary field / functional | match, vocabulary gap-fill | listening-detail MCQ, production | anticipation round, production |\n\nAlways keep one grammar gap-fill (or minimal-pair MCQ) that drills the actual\ngrammar point, plus one vocabulary archetype; the third slot is where you\nvary. Distractors in any MCQ or word bank come from the user's own\nvocabulary, same part of speech, so wrong answers are plausible.\n\n## Recipes\n\n### Back-chain ladder (FSI backward build-up)\n\nFor the slice's hardest sentence - the longest, or the one carrying the\ngrammar pattern - build 3-4 `audio_slice` blocks that all END at the same\npoint and grow leftward, shortest first, so the learner chorus-repeats the\ntail then extends it: \"…gemacht.\" -> \"…heute gemacht.\" -> the whole sentence.\n\nComputing the windows from the sentence's transcript `start` S and `end` E\n(there are no per-word times, so estimate):\n\n- per-word duration `d = (E - S) / word_count`;\n- slice covering the last `w` words: `start = E - w*d`, `end = E`;\n- use growing `w` (e.g. last 2 words -> last 5 -> full sentence at `start=S`);\n- the END anchor `E` is exact; the estimated starts can land mid-word, so\n subtract ~0.3 s from each computed `start` (floor at S) to avoid clipping\n the first syllable.\n\nLabel each block with the words it contains, e.g. `\"Just the ending:\ngemacht.\"` then `\"…heute gemacht.\"` then the full sentence. The schema needs\n`end > start` and `start >= 0`, and every window must sit inside the source\nslice.\n\n### Assimil passive wave\n\nBefore the `dialogue` block in the Text stage, put an instruction `prose`\nthat runs the passive wave: listen once without reading, then read while\nlistening, then reveal translations line by line. The dialogue block already\nblur-reveals each line's translation, so the instruction is what makes it a\ntechnique rather than a wall of text. Example prose:\n\n> \"Listen to the scene once with the audio above, without reading. Play it\n> again and read along. Then tap each line to reveal its translation and\n> check you understood.\"\n\n### Anticipation round (Pimsleur-style)\n\nCued recall in pairs. For 3-5 target phrases from the slice, emit a `prose`\n(the L1 prompt + a one-line hint on how to say it) immediately followed by an\n`audio_slice` that plays the phrase from the real audio as the answer.\nInstruct the learner to cover the answer, say the German aloud, THEN play to\ncheck. Keep the answer slice's `label` NEUTRAL (\"Play the answer\") - printing\nthe German would spoil the anticipation. Build the answer window from the\ntarget sentence's `start`/`end` (a back-chain-style tail slice works if you\nwant just the phrase). Order the pairs from easiest to hardest.\n\n### Minimal-pair / discrimination MCQ\n\nAn `exercise_mcq` with a tight `audio` window over the contrasting word or\nphrase, and options that differ in exactly ONE morpheme - perfect for German\nseparable prefixes (`steht auf` vs `versteht`), case endings (`dem` vs\n`den`), or tense/participle (`gefahren` vs `fahren`). `correct` indexes the\nform actually spoken; the distractors are real minimal variants, not\nnonsense. Add `position` so the row deep-links to the sentence.\n\n### T/F comprehension\n\nAn `exercise_mcq` with exactly TWO options - `[\"Richtig\", \"Falsch\"]` (or the\nlearner's language at A1/A2) - and a `prompt` that states something about the\npassage. Place 2-3 of them after the Listen section. Add `audio` + `position`\nto make it a listening check rather than a reading one.\n\n### Sentence reorder (Satzbau)\n\nAn `exercise_order` with 1-5 `items`, each a sentence broken into `segments`\n(3-12 chunks) IN CORRECT ORDER - the renderer scrambles them; the learner\nreassembles. This is the right tool whenever the grammar point is word order\nor clause structure (verb-second, verb-final in subordinate clauses,\nseparable-prefix placement): it supersedes an ad-hoc gap-fill where a real\nscramble fits. Anchor each item to its sentence with `position` and the server\nchecks the segments reassemble the stored sentence (whitespace-insensitive),\nrejecting a drifted scramble with `order_mismatch`; so quote the real chunks,\ndo not paraphrase. Split at meaningful units (a chunk can be a word or a short\nphrase like \"am Wochenende\"), and add `translation` so the learner has the\nmeaning to aim for.\n\n### Dictation (Diktat)\n\nAn `exercise_dictation` with 1-5 `items`, each anchoring a stored sentence by\n`position` (REQUIRED). The app plays that sentence's native audio and diffs the\nlearner's typing against the LIVE transcript word by word - nothing is copied\ninto the document, so the answer stays truthful as the transcript is edited.\nPick 2-4 SHORT, clearly-articulated sentences (dictation of a long or mumbled\nline just frustrates); optionally set a wider `audio` window to include a beat\nof lead-in, keeping it COVERING the sentence. Add `translation` for the meaning.\n\n### Shadowing (the differentiator)\n\nAn `exercise_shadow` with 1-8 `items`, each a stored sentence by `position`\n(REQUIRED) - the app plays the native line, records the learner, and replays\ntheir take (in-memory only, no upload, no score - self-assessed). This is the\nproduct's core practice move inline in a lesson; use it to make a lesson end in\nreal speaking. Pick 3-8 of the dialogue's best lines - the ones worth being\nable to say fluently - in the order they occur. Add `translation` per line.\n\n## The lesson.v1 document (quick reference)\n\nTop level: `{format:\"lesson.v1\", title, subtitle?, language,\ntranslation_language, level?, source:{submission_id, from_time?, to_time?,\nepisode_title?}, generator?:{skill, version?}, objectives?[<=5],\nestimated_minutes?, blocks[<=40]}`.\n\nBlocks (`type` field): `section {title, subtitle?}` · `prose {text,\nstyle:\"instruction\"|\"body\"}` · `audio_slice {audio:{start,end}, label?}` ·\n`dialogue {lines:[{position, speaker?, text, translation?,\nhighlights?:[[start,end],...]}]}` · `vocab {entries:[{lemma, pos?, display?,\nforms?, meaning, cefr?, position?}]}` · `grammar_box {title, explanation,\nevidence:[{position?, text, note}], merke?, achtung?}` · `exercise_mcq\n{title?, instruction?, prompt?, audio?, position?, options[2..5],\ncorrect:0-based index}` · `exercise_gap_fill {title?, instruction?, wordbank?,\nitems:[{position?, text, answers:[[alternatives],...], translation?}]}`\n(gaps are `{{1}}`, `{{2}}`, ... in `text`; `answers[n-1]` lists accepted\nalternatives for gap n) · `exercise_match {title?, instruction?,\npairs:[{left,right}][2..8]}` · `exercise_order {title?, instruction?,\nitems:[{position?, segments[3..12] in correct order, translation?}][1..5]}`\n(segments must reassemble the anchored sentence) · `exercise_dictation\n{title?, instruction?, items:[{position (REQUIRED), audio?:{start,end},\ntranslation?}][1..5]}` · `exercise_shadow {title?, instruction?,\nitems:[{position (REQUIRED), translation?}][1..8]}` · `exercise_production\n{title?, instruction?, prompt, model_answer}` · `review {can_do?[<=5],\nnew_lemmas?[<=12]}`.\n\n`position?` in the reference is the SCHEMA shape (optional); the Anchoring\nsection is where authoring policy makes some of these anchors mandatory.\n\nCaps: 40 blocks, 30 dialogue lines, 20 vocab entries, 5 MCQ options, 10\ngap-fill items, 8 match pairs, 5 order items (3-12 segments each), 5 dictation\nitems, 8 shadow items, 8 highlight spans per line, 1 MB serialized.\n\nThe server is the validator of record (strict: unknown fields and block\ntypes are rejected). Audio is `[start,end)` seconds into the ORIGINAL\nepisode audio - never generate, clip or embed audio files.\n\n## Hard rules\n\n- **Ground, do not invent.** Every dialogue line quotes the transcript\n verbatim by `position`; meanings, genders and CEFR come from\n `lookup_word`/`get_vocabulary`. The server enforces the quoting.\n- **Anchor everything (see Anchoring above).** Vocab entries carry\n `position`; listening MCQs carry `audio`; gap-fill items carry `position`\n and `translation`; grammar-pattern dialogue lines carry `highlights`. An\n unanchored lesson renders flat and is a bug.\n- **LingoChunk is the system of record for word knowledge.** Do not drill a\n `known` word unless it is also `due`. Never write review grades back.\n- **One grammar point per lesson.** Depth beats coverage; a second point is\n a second lesson.\n- **Vary the archetypes.** Pick 2-3 from the menu keyed to the grammar point\n and level; do not emit the same fixed exercise list every time.\n- **Respect the source.** Only use content the tools return; put the\n episode title in `source.episode_title`.\n- **No audio handling.** The app plays ranges of the original audio;\n `get_audio_clip` is NOT part of this workflow. `audio_slice` windows are\n built from transcript sentence `start`/`end` times.",
17
+ body: "# LingoChunk lesson builder\n\nBuild a `lesson.v1` document grounded in the learner's real LingoChunk\ncontent. The division of labour is the point: **LingoChunk supplies the\nmaterials (sentences with positions and translations, vocabulary with FSRS\nmaturity) and renders the lesson natively in the app; you do the pedagogy on\nthe user's own tokens.** No server-side LLM spend. The app plays the audio\nstraight from the original episode (never send or embed audio), resolves\nword knowledge live, links every word and sentence back to its Words/Listen\ntabs, and mounts an Ask AI tutor on the grammar box and glossary.\n\nThis skill uses the `lingochunk` MCP tools. If they are not available, tell\nthe user to add the LingoChunk MCP server (see the plugin README) and stop.\n\n## When to use\n\n- \"Make me a lesson / worksheet / quiz from yesterday's episode.\"\n- \"Build a lesson on the subjunctive using examples from my episodes.\"\n- \"Create a lesson from the first five minutes of episode X.\"\n- \"Quiz me on the words I'm learning in German.\"\n\n## Options to settle first (ask only what the user left open)\n\n1. **Source**: a named episode (`list_library`), or a topic/grammar point\n gathered across episodes (`search_examples`, `get_vocabulary`) - in v1 a\n lesson has ONE source episode, so for cross-episode topics pick the\n richest single episode.\n2. **Time range**: \"the first five minutes\" maps to `get_transcript`\n `from_time`/`to_time`; a chapter or scene works too. Default: a coherent\n 3 to 8 minute slice, not a whole 45-minute episode.\n3. **Level**: the CEFR level to pitch at. If the user does not say, infer it\n from the CEFR mix of their `get_vocabulary(status=known)` words and say\n which level you picked. Level drives:\n - instruction language: A1/A2 instructions in the learner's language;\n B1+ in the target language (keep them one short sentence);\n - exercise mix: more recognition (MCQ, matching) at low levels, more\n cued recall and production at high levels;\n - which grammar point qualifies (see below), glossary depth, and which\n archetypes you pick from the menu.\n\n## Workflow\n\n1. **Pull the slice.** `get_transcript` with the chosen range. Only\n `transcript_state: \"ready\"` is usable. Keep each sentence's `position`,\n `text`, `translation`, `speaker`, and its `start`/`end` seconds - the\n document references sentences BY POSITION and must quote `text` VERBATIM\n (the server rejects misquotes); the `start`/`end` times are what you build\n `audio_slice` windows from.\n\n2. **Gather and filter vocabulary.** Two sets: EXCLUDE and DRILL.\n - Exclusion set: `get_vocabulary(status=known)` (follow `next_cursor`\n with `limit=200` until null, or a known word slips into an exercise).\n - Due words: `get_vocabulary(status=due)` - do NOT exclude; they are\n exactly what is worth practising now (the app flags them live).\n - Drill words: `get_vocabulary(status=learning)` and `status=new`,\n prioritised.\n - Ground meanings/gender/CEFR with `lookup_word`; never invent them.\n\n3. **Pick ONE grammar point** evidenced in the slice, at the lesson's\n level. One per lesson, always. Prefer a pattern that occurs 2+ times in\n the slice so the evidence table has real rows.\n\n4. **Compose the document** (schema below) on the scaffold, choosing\n archetypes from the menu. The scaffold is the default skeleton; the\n archetype menu is what stops every lesson looking the same. See\n \"The scaffold and the archetype menu\" below.\n\n5. **Validate, then save.** Call `validate_lesson` with `{document}` FIRST:\n it returns EVERY problem at once (schema + reference), so you fix the whole\n document in one pass instead of burning save -> 400 -> fix cycles. Read the\n `errors` codes: `schema_invalid` carries a `loc` (dotted path to the bad\n field); `unknown_positions` / `position_outside_slice` mean a sentence\n reference is wrong; `dialogue_mismatch` means quote the transcript verbatim\n (including punctuation); `order_mismatch` means an `exercise_order` item's\n segments do not reassemble its anchored sentence. Only once it returns\n `valid: true` do you `save_lesson` with `{document}`. Set\n `generator: {skill: \"lingochunk-lesson\"}` so the app's lessons list shows\n which skill built it (episodes collect lessons from several skills). Both\n calls report `unknown_lemmas` (advisory only - glossary lemmas the episode\n does not know); prefer the lemma form the episode's vocabulary uses and fix\n any that look wrong before saving.\n\n6. **Deliver.** Give the user the `app_url` (the lesson opens in a Lessons\n tab on the episode). If the user asked for a course or a series of lessons,\n file this one under a course: `create_course` once, then pass its id as\n `save_lesson`'s `course_id` with a `sequence` (see the `lingochunk-course`\n guide). If the user is a CREATOR publishing to their audience, pass\n `visibility: \"public\"` too - the lesson then shows to everyone who can view\n the episode (e.g. followers of their collection). Publishing requires\n owning the episode; the default is private, so never publish unasked. Offer `add_card` for drill words the lesson introduced (a 409 means\n it is already there - skip and carry on; never add `status=known` words).\n Mention the in-app Download button if they want the offline HTML worksheet\n (it has no audio by design). Summarise what the lesson covers and which\n words it drills.\n\n## Revising a saved lesson\n\nLessons are editable IN PLACE: `get_lesson` -> compose the change ->\n`update_lesson`. The lesson keeps its id, app_url, visibility and course, so\nnever revise by save-new + delete-old.\n\n**The co-edit loop.** The app has a Co-edit mode for lesson owners: it labels\nevery block with a § handle (§1, §2, ... - the 1-based block position) and\nlive-refreshes while an agent edits. When the user pastes a lesson outline or\nsays \"change §5\", they are in that loop: the § numbers are `update_lesson`'s\n`ops` block numbers, and the user SEES your edit land within seconds - so\nact, then confirm briefly; no need to re-describe the lesson.\n\nWorkflow:\n\n1. `get_lesson` returns `{version, document}`. Treat `version` as OPAQUE -\n echo it verbatim as `update_lesson`'s `base_version`, never parse or\n reformat it (a Date round-trip truncates it and it will never match).\n2. Compose the revision against THAT read. Every rule in this guide applies\n to edited blocks - verbatim transcript quotes, anchoring, one grammar\n point. For a broad rewrite, `validate_lesson` the whole revised document\n first; for surgical `ops`, the update re-validates server-side anyway.\n3. Prefer `ops` (replace/insert/delete by block number, plus `meta` for\n title/subtitle/level/objectives) over a full `document` resend. Batch ALL\n changes from one read into ONE call, ordered by DESCENDING block number -\n ops apply sequentially, so editing top-down shifts the numbers under you.\n4. § numbers are only valid against the read they came from. After your own\n successful update everything renumbers - use the returned `{version}` for\n a chained edit, but re-read (`get_lesson`) before composing NEW block\n references. The user's pasted outline is also a snapshot: before a\n delete/replace, check the target block's type and content match what they\n described, not just its number.\n5. On a `stale_document` error, the lesson changed under you (usually the\n owner's own in-app edit). Re-read, re-apply your intent to the fresh\n document, and never blind-retry the same call.\n6. Consolidate. Writes share a 60/hour budget with saves, and each update\n re-renders the lesson for a watching owner - one thoughtful update beats\n five drips.\n\n## Anchoring (mandatory)\n\nThe renderer's best features - inline play chips, deep links into Listen and\nWords, listening exercises - are all opt-in through optional fields. A lesson\nthat omits them renders flat. These are hard rules, not suggestions:\n\n- **Every `vocab` entry MUST carry `position`.** The anchor is what puts an\n audio play chip on the row and a crosslink to the Words tab. A vocab entry\n with no position is a dead row.\n- **Every MCQ that tests LISTENING MUST carry `audio`** (and a `position`\n when it points at one sentence). Without `audio` it is a reading question,\n not a listening one. A pure recognition/gist MCQ before reading is the one\n case that legitimately has no audio.\n- **Every gap-fill item SHOULD carry `position` and `translation`.** The\n position anchors it to the real sentence (and lights a play chip where the\n renderer supports it); the translation gives the learner the meaning to\n work from.\n- **Dialogue highlights on the grammar pattern are required.** Every\n `dialogue` line that carries an instance of the lesson's grammar point MUST\n mark it with `highlights` (code-point ranges) so the pattern shows as gold\n marks. A dialogue with no highlights wastes the one grammar point.\n\n## The scaffold and the archetype menu\n\n**Scaffold (default skeleton, in order):** Listen -> Text -> Vocabulary ->\nGrammar -> Exercises -> Review. Use `section` blocks to head each stage; the\nrenderer numbers them. This ordering (recognition before reading, one grammar\npoint, graded practice, can-do close) is the pedagogy and holds for every\nlesson.\n\n**Archetype menu (the variety).** The Exercises stage - and the Listen and\nText stages' interactive bits - are NOT a fixed list. Pick **2-3 archetypes**\nper lesson, keyed to the grammar point, the level, and what the episode's\naudio actually affords, so consecutive lessons on the same episode don't feel\nidentical. The archetypes (recipes for the starred ones are below):\n\n| Archetype | Block(s) | Best for |\n|---|---|---|\n| Gist MCQ (no audio) | `exercise_mcq` | opening recognition, every lesson |\n| T/F comprehension * | `exercise_mcq`, 2 options | after the listen, low/mid levels |\n| Listening-detail MCQ | `exercise_mcq` + `audio` + `position` | any level, checks a specific line |\n| Minimal-pair MCQ * | `exercise_mcq` + `audio` | morphology, separable prefixes, case, tense |\n| Back-chain ladder * | 3-4 `audio_slice` | one hard/long sentence; prosody; word order |\n| Assimil passive wave * | `prose` + `dialogue` | the Text stage, every level |\n| Anticipation round * | `prose` + `audio_slice` pairs | cued recall, mid/high levels |\n| Grammar gap-fill | `exercise_gap_fill` | the grammar point itself, every lesson |\n| Vocabulary gap-fill | `exercise_gap_fill` + `wordbank` | vocabulary consolidation, low/mid |\n| Match words -> meanings | `exercise_match` | vocabulary, low/mid levels |\n| Sentence reorder * | `exercise_order` | word order / clause structure, every level |\n| Dictation * | `exercise_dictation` | native-audio dictation, listening precision |\n| Shadowing * | `exercise_shadow` | pronunciation & prosody, the differentiator |\n| Production | `exercise_production` | active use, mid/high levels |\n\n**Which archetypes for which lesson** (grammar-point type x level -> pick from):\n\n| Grammar point | A1-A2 | B1-B2 | C1+ |\n|---|---|---|---|\n| Verb morphology (Perfekt, tense) | minimal-pair MCQ, grammar gap-fill | back-chain ladder, grammar gap-fill | anticipation round, production |\n| Word order / clause structure | sentence reorder, T/F comprehension | sentence reorder, back-chain ladder | anticipation round, production |\n| Cases & endings | minimal-pair MCQ, match | grammar gap-fill, minimal-pair MCQ | production, anticipation round |\n| Separable / prefix verbs | minimal-pair MCQ, listening-detail MCQ | minimal-pair MCQ, grammar gap-fill | anticipation round, production |\n| Connectors / subordination | T/F comprehension, vocabulary gap-fill | grammar gap-fill, production | production, anticipation round |\n| Vocabulary field / functional | match, vocabulary gap-fill | listening-detail MCQ, production | anticipation round, production |\n\nAlways keep one grammar gap-fill (or minimal-pair MCQ) that drills the actual\ngrammar point, plus one vocabulary archetype; the third slot is where you\nvary. Distractors in any MCQ or word bank come from the user's own\nvocabulary, same part of speech, so wrong answers are plausible.\n\n## Recipes\n\n### Back-chain ladder (FSI backward build-up)\n\nFor the slice's hardest sentence - the longest, or the one carrying the\ngrammar pattern - build 3-4 `audio_slice` blocks that all END at the same\npoint and grow leftward, shortest first, so the learner chorus-repeats the\ntail then extends it: \"…gemacht.\" -> \"…heute gemacht.\" -> the whole sentence.\n\nComputing the windows from the sentence's transcript `start` S and `end` E\n(there are no per-word times, so estimate):\n\n- per-word duration `d = (E - S) / word_count`;\n- slice covering the last `w` words: `start = E - w*d`, `end = E`;\n- use growing `w` (e.g. last 2 words -> last 5 -> full sentence at `start=S`);\n- the END anchor `E` is exact; the estimated starts can land mid-word, so\n subtract ~0.3 s from each computed `start` (floor at S) to avoid clipping\n the first syllable.\n\nLabel each block with the words it contains, e.g. `\"Just the ending:\ngemacht.\"` then `\"…heute gemacht.\"` then the full sentence. The schema needs\n`end > start` and `start >= 0`, and every window must sit inside the source\nslice.\n\n### Assimil passive wave\n\nBefore the `dialogue` block in the Text stage, put an instruction `prose`\nthat runs the passive wave: listen once without reading, then read while\nlistening, then reveal translations line by line. The dialogue block already\nblur-reveals each line's translation, so the instruction is what makes it a\ntechnique rather than a wall of text. Example prose:\n\n> \"Listen to the scene once with the audio above, without reading. Play it\n> again and read along. Then tap each line to reveal its translation and\n> check you understood.\"\n\n### Anticipation round (Pimsleur-style)\n\nCued recall in pairs. For 3-5 target phrases from the slice, emit a `prose`\n(the L1 prompt + a one-line hint on how to say it) immediately followed by an\n`audio_slice` that plays the phrase from the real audio as the answer.\nInstruct the learner to cover the answer, say the German aloud, THEN play to\ncheck. Keep the answer slice's `label` NEUTRAL (\"Play the answer\") - printing\nthe German would spoil the anticipation. Build the answer window from the\ntarget sentence's `start`/`end` (a back-chain-style tail slice works if you\nwant just the phrase). Order the pairs from easiest to hardest.\n\n### Minimal-pair / discrimination MCQ\n\nAn `exercise_mcq` with a tight `audio` window over the contrasting word or\nphrase, and options that differ in exactly ONE morpheme - perfect for German\nseparable prefixes (`steht auf` vs `versteht`), case endings (`dem` vs\n`den`), or tense/participle (`gefahren` vs `fahren`). `correct` indexes the\nform actually spoken; the distractors are real minimal variants, not\nnonsense. Add `position` so the row deep-links to the sentence.\n\n### T/F comprehension\n\nAn `exercise_mcq` with exactly TWO options - `[\"Richtig\", \"Falsch\"]` (or the\nlearner's language at A1/A2) - and a `prompt` that states something about the\npassage. Place 2-3 of them after the Listen section. Add `audio` + `position`\nto make it a listening check rather than a reading one.\n\n### Sentence reorder (Satzbau)\n\nAn `exercise_order` with 1-5 `items`, each a sentence broken into `segments`\n(3-12 chunks) IN CORRECT ORDER - the renderer scrambles them; the learner\nreassembles. This is the right tool whenever the grammar point is word order\nor clause structure (verb-second, verb-final in subordinate clauses,\nseparable-prefix placement): it supersedes an ad-hoc gap-fill where a real\nscramble fits. Anchor each item to its sentence with `position` and the server\nchecks the segments reassemble the stored sentence (whitespace-insensitive),\nrejecting a drifted scramble with `order_mismatch`; so quote the real chunks,\ndo not paraphrase. Split at meaningful units (a chunk can be a word or a short\nphrase like \"am Wochenende\"), and add `translation` so the learner has the\nmeaning to aim for.\n\n### Dictation (Diktat)\n\nAn `exercise_dictation` with 1-5 `items`, each anchoring a stored sentence by\n`position` (REQUIRED). The app plays that sentence's native audio and diffs the\nlearner's typing against the LIVE transcript word by word - nothing is copied\ninto the document, so the answer stays truthful as the transcript is edited.\nPick 2-4 SHORT, clearly-articulated sentences (dictation of a long or mumbled\nline just frustrates); optionally set a wider `audio` window to include a beat\nof lead-in, keeping it COVERING the sentence. Add `translation` for the meaning.\n\n### Shadowing (the differentiator)\n\nAn `exercise_shadow` with 1-8 `items`, each a stored sentence by `position`\n(REQUIRED) - the app plays the native line, records the learner, and replays\ntheir take (in-memory only, no upload, no score - self-assessed). This is the\nproduct's core practice move inline in a lesson; use it to make a lesson end in\nreal speaking. Pick 3-8 of the dialogue's best lines - the ones worth being\nable to say fluently - in the order they occur. Add `translation` per line.\n\n## The lesson.v1 document (quick reference)\n\nTop level: `{format:\"lesson.v1\", title, subtitle?, language,\ntranslation_language, level?, source:{submission_id, from_time?, to_time?,\nepisode_title?}, generator?:{skill, version?}, objectives?[<=5],\nestimated_minutes?, blocks[<=40]}`.\n\nBlocks (`type` field): `section {title, subtitle?}` · `prose {text,\nstyle:\"instruction\"|\"body\"}` · `audio_slice {audio:{start,end}, label?}` ·\n`dialogue {lines:[{position, speaker?, text, translation?,\nhighlights?:[[start,end],...]}]}` · `vocab {entries:[{lemma, pos?, display?,\nforms?, meaning, cefr?, position?}]}` · `grammar_box {title, explanation,\nevidence:[{position?, text, note}], merke?, achtung?}` · `exercise_mcq\n{title?, instruction?, prompt?, audio?, position?, options[2..5],\ncorrect:0-based index}` · `exercise_gap_fill {title?, instruction?, wordbank?,\nitems:[{position?, text, answers:[[alternatives],...], translation?}]}`\n(gaps are `{{1}}`, `{{2}}`, ... in `text`; `answers[n-1]` lists accepted\nalternatives for gap n) · `exercise_match {title?, instruction?,\npairs:[{left,right}][2..8]}` · `exercise_order {title?, instruction?,\nitems:[{position?, segments[3..12] in correct order, translation?}][1..5]}`\n(segments must reassemble the anchored sentence) · `exercise_dictation\n{title?, instruction?, items:[{position (REQUIRED), audio?:{start,end},\ntranslation?}][1..5]}` · `exercise_shadow {title?, instruction?,\nitems:[{position (REQUIRED), translation?}][1..8]}` · `exercise_production\n{title?, instruction?, prompt, model_answer}` · `review {can_do?[<=5],\nnew_lemmas?[<=12]}`.\n\n`position?` in the reference is the SCHEMA shape (optional); the Anchoring\nsection is where authoring policy makes some of these anchors mandatory.\n\n**Text formatting.** `prose.text` and `grammar_box.explanation` render a\nmini-Markdown subset in the app: `**bold**`, `*italic*`, backtick code,\n`- `/`* ` bullet lines, and blank-line paragraph breaks. Exercise\n`instruction` fields and `grammar_box.merke`/`achtung` render the inline\nmarks only (no bullets or paragraphs). Every other text field (titles,\nprompts, options, vocab meanings, dialogue lines) is plain text. Headings,\nlinks, tables, images and raw HTML are never rendered anywhere - they show\nas literal characters, so don't emit them.\n\nCaps: 40 blocks, 30 dialogue lines, 20 vocab entries, 5 MCQ options, 10\ngap-fill items, 8 match pairs, 5 order items (3-12 segments each), 5 dictation\nitems, 8 shadow items, 8 highlight spans per line, 1 MB serialized.\n\nThe server is the validator of record (strict: unknown fields and block\ntypes are rejected). Audio is `[start,end)` seconds into the ORIGINAL\nepisode audio - never generate, clip or embed audio files.\n\n## Hard rules\n\n- **Ground, do not invent.** Every dialogue line quotes the transcript\n verbatim by `position`; meanings, genders and CEFR come from\n `lookup_word`/`get_vocabulary`. The server enforces the quoting.\n- **Anchor everything (see Anchoring above).** Vocab entries carry\n `position`; listening MCQs carry `audio`; gap-fill items carry `position`\n and `translation`; grammar-pattern dialogue lines carry `highlights`. An\n unanchored lesson renders flat and is a bug.\n- **LingoChunk is the system of record for word knowledge.** Do not drill a\n `known` word unless it is also `due`. Never write review grades back.\n- **One grammar point per lesson.** Depth beats coverage; a second point is\n a second lesson.\n- **Vary the archetypes.** Pick 2-3 from the menu keyed to the grammar point\n and level; do not emit the same fixed exercise list every time.\n- **Respect the source.** Only use content the tools return; put the\n episode title in `source.episode_title`.\n- **No audio handling.** The app plays ranges of the original audio;\n `get_audio_clip` is NOT part of this workflow. `audio_slice` windows are\n built from transcript sentence `start`/`end` times.",
18
18
  },
19
19
  "course": {
20
20
  topic: "course",
@@ -1 +1 @@
1
- {"version":3,"file":"guides.js","sourceRoot":"","sources":["../../src/generated/guides.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,qEAAqE;AACrE,wEAAwE;AACxE,mDAAmD;AAenD,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,CAAU,CAAC;AAEhJ,MAAM,CAAC,MAAM,MAAM,GAA8B;IAC/C,UAAU,EAAE;QACV,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,qBAAqB;QACjC,WAAW,EAAE,oSAAoS;QACjT,IAAI,EAAE,g7HAAg7H;KACv7H;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,mBAAmB;QAC/B,WAAW,EAAE,ovBAAovB;QACjwB,IAAI,EAAE,wlkBAAwlkB;KAC/lkB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,mBAAmB;QAC/B,WAAW,EAAE,8YAA8Y;QAC3Z,IAAI,EAAE,41KAA41K;KACn2K;IACD,OAAO,EAAE;QACP,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,kBAAkB;QAC9B,WAAW,EAAE,kfAAkf;QAC/f,IAAI,EAAE,srJAAsrJ;KAC7rJ;IACD,aAAa,EAAE;QACb,KAAK,EAAE,aAAa;QACpB,UAAU,EAAE,qBAAqB;QACjC,WAAW,EAAE,8dAA8d;QAC3e,IAAI,EAAE,isQAAisQ;KACxsQ;IACD,cAAc,EAAE;QACd,KAAK,EAAE,cAAc;QACrB,UAAU,EAAE,yBAAyB;QACrC,WAAW,EAAE,0jBAA0jB;QACvkB,IAAI,EAAE,inWAAinW;KACxnW;IACD,SAAS,EAAE;QACT,K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T,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,oBAAoB;QAChC,WAAW,EAAE,uaAAua;QACpb,IAAI,EAAE,moFAAmoF;KAC1oF;CACF,CAAC"}
package/dist/tools.js CHANGED
@@ -57,6 +57,13 @@ function errorResult(err) {
57
57
  "\nYou are at the lesson limit; delete an old lesson in your LingoChunk " +
58
58
  "library (Settings) to make room.";
59
59
  }
60
+ else if (err.code === "stale_document") {
61
+ text +=
62
+ "\nThe lesson changed under you - most likely the owner edited it in " +
63
+ "the app. Call get_lesson again, re-apply your intent to the fresh " +
64
+ "document (block numbers may have shifted), and update with the new " +
65
+ "version token. Do not retry the same call.";
66
+ }
60
67
  else if (err.status === 401) {
61
68
  text += "\nCheck LINGOCHUNK_TOKEN is a valid, un-revoked token (prefix lcp_).";
62
69
  }
@@ -413,9 +420,10 @@ export function registerTools(server, client, config, mode = "local") {
413
420
  server.registerTool("whats_possible", {
414
421
  title: "What you can do with LingoChunk",
415
422
  description: "The quick tour of this connection: the menu of what the user can " +
416
- "ask for (talk through an episode, vocabulary checks, lessons, " +
417
- "courses, flashcards + Anki export, creator notes, extra languages, " +
418
- "publishing to an audience), one example prompt per area. CALL THIS " +
423
+ "ask for (talk through an episode, vocabulary checks, building and " +
424
+ "live-revising lessons, courses, flashcards + Anki export, creator " +
425
+ "notes, extra languages, publishing to an audience), one example " +
426
+ "prompt per area. CALL THIS " +
419
427
  "when the user asks what they can do with LingoChunk, what is " +
420
428
  "possible, how to get started, or for help in general - then answer " +
421
429
  "SHORT (a line per area) and offer to go deeper on the area they " +
@@ -744,8 +752,9 @@ export function registerTools(server, client, config, mode = "local") {
744
752
  "course_id + optional sequence. Creators: visibility:'public' " +
745
753
  "publishes the lesson to everyone who can view the source episode " +
746
754
  "(e.g. followers of a collection it belongs to); it requires owning " +
747
- "the episode and works for documents only. Requires the " +
748
- "lessons:write scope.",
755
+ "the episode and works for documents only. To REVISE a lesson that " +
756
+ "already exists, use update_lesson (in-place, same id) - not " +
757
+ "save-new + delete-old. Requires the lessons:write scope.",
749
758
  inputSchema: {
750
759
  title: z
751
760
  .string()
@@ -842,11 +851,16 @@ export function registerTools(server, client, config, mode = "local") {
842
851
  server.registerTool("get_lesson", {
843
852
  title: "Get a lesson document",
844
853
  description: "Read back a saved lesson.v1 document by id (ids from list_lessons " +
845
- "or save_lesson's response). This closes the revision loop: lessons " +
846
- "are immutable, so to revise one, get_lesson -> edit the document -> " +
847
- "save_lesson (a NEW id) -> delete_lesson the superseded one. 404 for " +
848
- "legacy HTML lessons - they have no document. Requires the " +
849
- "lessons:write scope.",
854
+ "or save_lesson's response). Returns {version, document}: `version` " +
855
+ "is the lesson's concurrency token - echo it VERBATIM as " +
856
+ "update_lesson's base_version (never parse or reformat it; a " +
857
+ "JavaScript Date round-trip truncates it and it will never match " +
858
+ "again) - and `document` is the lesson.v1 body (pass the `document` " +
859
+ "field onward to validate_lesson/update_lesson, never the whole " +
860
+ "envelope). This opens the revision loop: get_lesson -> edit -> " +
861
+ "update_lesson revises IN PLACE, keeping the lesson's id, app_url, " +
862
+ "visibility and course. 404 for legacy HTML lessons - they have no " +
863
+ "document. Requires the lessons:write scope.",
850
864
  inputSchema: {
851
865
  lesson_id: z
852
866
  .string()
@@ -855,16 +869,174 @@ export function registerTools(server, client, config, mode = "local") {
855
869
  .describe("The lesson to read (id from list_lessons/save_lesson)."),
856
870
  },
857
871
  }, async ({ lesson_id }) => runJson(() => client.getLessonDocument(lesson_id)));
872
+ server.registerTool("update_lesson", {
873
+ title: "Update a lesson in place",
874
+ description: "Revise a saved lesson.v1 document IN PLACE - same id, same app_url, " +
875
+ "same visibility and course. This is how you act on an owner's " +
876
+ "revision requests (in the app's Co-edit mode they reference blocks " +
877
+ "as §N - those are the SAME 1-based block numbers `ops` uses). " +
878
+ "PREFERRED: pass `ops`, surgical block edits applied to the CURRENT " +
879
+ "stored document - replace/insert/delete by 1-based block number, " +
880
+ "plus optional `meta` for lesson-level fields. Ops apply " +
881
+ "SEQUENTIALLY: each op sees the block array as the previous op left " +
882
+ "it, so for multiple ops from one read, order them by DESCENDING " +
883
+ "block number to keep the numbers stable. Alternatively pass " +
884
+ "`document`, a full replacement (for rewrites); exactly one of " +
885
+ "ops/document, or meta alone. ALWAYS pass base_version, the token " +
886
+ "from the get_lesson (or update_lesson) response this edit is based " +
887
+ "on - if the lesson changed meanwhile the call fails cleanly " +
888
+ "(stale_document) instead of overwriting the other edit; then " +
889
+ "re-read and re-apply. The server re-validates the whole document " +
890
+ "exactly like a save (verbatim quotes, positions, audio windows). " +
891
+ "Returns {version, lesson}: the NEW token (for chained edits without " +
892
+ "re-reading) and the refreshed metadata. Prefer ONE consolidated " +
893
+ "update over many small ones: writes share a 60/hour budget and " +
894
+ "each save re-renders the lesson for a watching owner. Requires the " +
895
+ "lessons:write scope.",
896
+ inputSchema: {
897
+ lesson_id: z
898
+ .string()
899
+ .min(1)
900
+ .max(36)
901
+ .describe("The lesson to revise (id from list_lessons/get_lesson)."),
902
+ base_version: z
903
+ .string()
904
+ .min(1)
905
+ .describe("The version token this edit is based on, echoed VERBATIM from " +
906
+ "get_lesson/update_lesson's response. Guards against " +
907
+ "overwriting a concurrent edit."),
908
+ ops: z
909
+ .array(z.object({
910
+ action: z
911
+ .enum(["replace", "insert", "delete"])
912
+ .describe("replace: swap the block at `block` for `value`. insert: " +
913
+ "make `value` the new block number `block`, shifting the " +
914
+ "rest down. delete: remove the block at `block`."),
915
+ block: z
916
+ .number()
917
+ .int()
918
+ .min(1)
919
+ .describe("1-based block number (the app's §N), positioned in " +
920
+ "the array as the PREVIOUS ops left it."),
921
+ value: z
922
+ .record(z.unknown())
923
+ .optional()
924
+ .describe("The lesson.v1 block object (required for replace/insert; " +
925
+ "forbidden for delete). The server validates it fully."),
926
+ }))
927
+ .min(1)
928
+ .max(40)
929
+ .optional()
930
+ .describe("Surgical edits to the CURRENT stored document, applied in " +
931
+ "order. Batch all changes from one read into one call, " +
932
+ "ordered by descending block number."),
933
+ document: z
934
+ .record(z.unknown())
935
+ .optional()
936
+ .describe("A full replacement lesson.v1 document (for rewrites). Exactly " +
937
+ "one of ops/document."),
938
+ meta: z
939
+ .object({
940
+ title: z.string().min(1).max(255).optional(),
941
+ subtitle: z.string().max(255).nullable().optional(),
942
+ level: z
943
+ .enum(["A1", "A2", "B1", "B2", "C1", "C2"])
944
+ .nullable()
945
+ .optional(),
946
+ objectives: z.array(z.string().min(1).max(200)).max(5).optional(),
947
+ estimated_minutes: z
948
+ .number()
949
+ .int()
950
+ .min(1)
951
+ .max(240)
952
+ .nullable()
953
+ .optional(),
954
+ })
955
+ .optional()
956
+ .describe("Lesson-level field edits (combinable with ops, or alone). " +
957
+ "Explicit null clears an optional field; omitted fields are " +
958
+ "left as they are. Not combinable with document (edit the " +
959
+ "fields in the document instead)."),
960
+ },
961
+ }, async ({ lesson_id, base_version, ops, document, meta }) => runResult(async () => {
962
+ if (document !== undefined && ops !== undefined) {
963
+ return errorResult(new Error("Pass exactly one of 'ops' or 'document', not both."));
964
+ }
965
+ if (document !== undefined && meta !== undefined) {
966
+ return errorResult(new Error("'meta' cannot combine with 'document' - a full replacement " +
967
+ "already carries its own title/level/objectives."));
968
+ }
969
+ if (document === undefined && ops === undefined && meta === undefined) {
970
+ return errorResult(new Error("Nothing to change: pass 'ops', 'document' or 'meta'."));
971
+ }
972
+ // Full replacement: straight PUT; the base_version guard is server-side.
973
+ if (document !== undefined) {
974
+ return jsonResult(await client.updateLesson(lesson_id, document, base_version));
975
+ }
976
+ // Surgical mode: patch the CURRENT stored document. The fresh read
977
+ // must still match base_version - ops were composed against that
978
+ // state, and applying them to anything newer would edit the wrong
979
+ // blocks silently.
980
+ const { version, document: current } = await client.getLessonDocument(lesson_id);
981
+ if (version !== base_version) {
982
+ return errorResult(new ApiError(409, "The lesson changed since the version this edit is based on.", undefined, "stale_document"));
983
+ }
984
+ const doc = { ...current };
985
+ if (meta !== undefined) {
986
+ for (const [key, val] of Object.entries(meta)) {
987
+ if (val === undefined)
988
+ continue;
989
+ if (val === null)
990
+ delete doc[key];
991
+ else
992
+ doc[key] = val;
993
+ }
994
+ }
995
+ if (ops !== undefined) {
996
+ const blocks = [...(doc.blocks ?? [])];
997
+ for (const [i, op] of ops.entries()) {
998
+ const ordinal = i + 1;
999
+ const max = op.action === "insert" ? blocks.length + 1 : blocks.length;
1000
+ if (op.block > max) {
1001
+ return errorResult(new Error(`ops[${ordinal}] (${op.action} at block ${op.block}) is out ` +
1002
+ `of range: the document has ${blocks.length} blocks at ` +
1003
+ "this point in the sequence."));
1004
+ }
1005
+ if (op.action === "delete") {
1006
+ if (op.value !== undefined) {
1007
+ return errorResult(new Error(`ops[${ordinal}]: 'value' is forbidden for delete.`));
1008
+ }
1009
+ blocks.splice(op.block - 1, 1);
1010
+ }
1011
+ else {
1012
+ if (op.value === undefined) {
1013
+ return errorResult(new Error(`ops[${ordinal}]: 'value' is required for ${op.action}.`));
1014
+ }
1015
+ if (op.action === "replace")
1016
+ blocks[op.block - 1] = op.value;
1017
+ else
1018
+ blocks.splice(op.block - 1, 0, op.value);
1019
+ }
1020
+ }
1021
+ if (blocks.length === 0 || blocks.length > 40) {
1022
+ return errorResult(new Error(`The edited document would have ${blocks.length} blocks; a ` +
1023
+ "lesson holds 1-40."));
1024
+ }
1025
+ doc.blocks = blocks;
1026
+ }
1027
+ return jsonResult(await client.updateLesson(lesson_id, doc, base_version));
1028
+ }));
858
1029
  server.registerTool("delete_lesson", {
859
1030
  title: "Delete a lesson",
860
1031
  description: "Permanently delete ONE of the user's saved lessons (the stored " +
861
1032
  "document and its metadata row). Destructive and not undoable: only " +
862
1033
  "delete a lesson the user has explicitly named or has just asked to " +
863
- "replace; never sweep lessons unprompted. Typical use: iterating on " +
864
- "a lesson - re-saving always creates a NEW lesson, so delete the " +
865
- "superseded draft (its id is in save_lesson's response) to stay " +
866
- "under the 100-lesson cap. 404 means the id does not exist or is " +
867
- "not the user's. Requires the lessons:write scope.",
1034
+ "replace; never sweep lessons unprompted. NOTE: to revise a lesson " +
1035
+ "you no longer delete it - update_lesson edits it in place, keeping " +
1036
+ "its id and links. Delete is for lessons the user is done with " +
1037
+ "(e.g. abandoned drafts crowding the 100-lesson cap). 404 means the " +
1038
+ "id does not exist or is not the user's. Requires the lessons:write " +
1039
+ "scope.",
868
1040
  annotations: { destructiveHint: true, idempotentHint: true },
869
1041
  inputSchema: {
870
1042
  lesson_id: z
package/dist/tools.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAA0C,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAmB,MAAM,uBAAuB,CAAC;AAE9E;6EAC6E;AAC7E,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,MAAM;IACN,QAAQ;IACR,aAAa;IACb,OAAO;IACP,OAAO;IACP,SAAS;IACT,OAAO;IACP,UAAU;IACV,IAAI;IACJ,YAAY;CACb,CAAC,CAAC;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AAEnF,8DAA8D;AAC9D,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED;4EAC4E;AAC5E,SAAS,cAAc,CAAC,GAAY;IAClC,OAAO,CACL,GAAG,YAAY,KAAK;QACpB,CAAC,GAAG,CAAC,IAA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C,CAAC,QAAQ,CAAC,oBAAoB,CAAC;YAC/D,aAAa,EAAE,CAAC;iBACb,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,QAAQ,CAAC,sDAAsD,CAAC;SACpE;KACF,EACD,KAAK,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,EAAE,CACzC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CACvE,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingochunk/mcp",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Model Context Protocol server for the LingoChunk public API: your FSRS-graded vocabulary, native-audio transcripts and clips, and library, as tools for a coding agent.",
5
5
  "license": "MIT",
6
6
  "private": false,