@stage5/lumine 0.1.5 → 0.1.6

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/bin/lumine.js CHANGED
@@ -50,6 +50,8 @@ Use these current source-of-truth rules:
50
50
  - Use Twinkle.privateDb for simple private per-user preferences, drafts, settings, and small JSON state.
51
51
  - Use Twinkle.userDb only for advanced private SQLite tables, indexes, many rows, filtered queries, or aggregates.
52
52
  - Use Twinkle.sharedDb for shared multi-user JSON data.
53
+ - Use Twinkle.aiCards.list/search/get for existing public AI Card words, exampleText sentence material, and word levels.
54
+ - Use Twinkle.aiStories.list/search/get for existing AI Story passage text, story media, and questions.
53
55
  - Use Twinkle.ai.chat with history entries shaped as { role, content }, not { text }.
54
56
  - Use Twinkle.preview for canvas, WebGL, Three.js, fullscreen, and game layout.
55
57
  - Prefer existing documented Twinkle.* methods over guessing names from old code.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stage5/lumine",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Command line tools for launching Lumine builds on Twinkle.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,8 +1,8 @@
1
1
  # Build SDK Index
2
2
 
3
- Version: 1.24.0
4
- Updated: 2026-05-26
5
- Generated: 2026-05-26T10:20:06.718Z
3
+ Version: 1.25.0
4
+ Updated: 2026-05-28
5
+ Generated: 2026-05-28T09:34:12.631Z
6
6
 
7
7
  ## Notes
8
8
  - This SDK is injected into Build iframes via the Build preview/runtime.
@@ -13,6 +13,7 @@ Generated: 2026-05-26T10:20:06.718Z
13
13
  - Use Twinkle.leaderboards for public Build scoreboards. Signed-in viewers are ranked by Twinkle username; guests can submit with a display name.
14
14
  - Use Twinkle.sharedDb for custom shared multi-user structured data, guestbooks, votes, and append-only run history.
15
15
  - Use Twinkle.subjects.search for in-app subject pickers. Twinkle.mount remains an optional host-provided preselection/context shortcut, not a data API.
16
+ - Use Twinkle.aiCards for read-only existing public AI Card words and example texts, including word levels for typing games.
16
17
  - Use Twinkle.aiStories for read-only existing AI Story galleries, readers, quizzes, and remix tools.
17
18
  - Use Twinkle.grammarbles for public Grammarbles question-bank trainer apps and optional signed-in viewer attempt-history filtering.
18
19
  - Use Twinkle.chess for chess engine play and analysis; app code still owns chess rules, legal moves, board state, and UI.
@@ -200,18 +201,32 @@ const result = await Twinkle.characters.chat({ character: 'zero', thinkingMode:
200
201
  - async getSubjectComments(subjectId, { limit, cursor } = {}) | scopes: content:read
201
202
  - Returns: { comments: [{ id, content, filePath, fileName, fileSize, thumbUrl, timeStamp }], cursor? }
202
203
 
204
+ ### Twinkle.aiCards
205
+ - async list({ limit, cursor, level, minLevel, maxLevel, quality, userId, hasImage, hasExample } = {}) | scopes: content:read
206
+ - Returns: { cards: [{ id, contentType, contentId, word, text, exampleText, prompt, level, wordLevel, quality, style, imagePath, imageUrl, creatorId, ownerId, username, profilePicUrl, timeStamp, lastInteraction }], cursor?, pagination: { limit, hasMore, nextCursor }, filters }
207
+ - List existing public AI Cards newest first, including each card word, example sentence text, word level, and quality.
208
+ - Example: const { cards } = await Twinkle.aiCards.list({ level: 2, hasExample: true, limit: 20 });
209
+ - async search({ query, limit, cursor, level, minLevel, maxLevel, quality, userId, hasImage, hasExample } = {}) | scopes: content:read
210
+ - Returns: { cards: [{ id, contentType, contentId, word, text, exampleText, prompt, level, wordLevel, quality, style, imagePath, imageUrl, creatorId, ownerId, username, profilePicUrl, timeStamp, lastInteraction }], cursor?, pagination: { limit, hasMore, nextCursor }, filters }
211
+ - Search existing public AI Cards by word, with optional level and quality filters.
212
+ - Example: const { cards } = await Twinkle.aiCards.search({ query: searchText, minLevel: 1, maxLevel: 3, hasExample: true, limit: 12 });
213
+ - async get(cardId) | scopes: content:read
214
+ - Returns: { card: { id, contentType, contentId, word, text, exampleText, prompt, level, wordLevel, quality, style, imagePath, imageUrl, creatorId, ownerId, username, profilePicUrl, timeStamp, lastInteraction } }
215
+ - Fetch one existing public AI Card by id, including word, example text, and level metadata.
216
+ - Example: const { card } = await Twinkle.aiCards.get(cardId);
217
+
203
218
  ### Twinkle.aiStories
204
219
  - async list({ limit, cursor, difficulty, type, isListening, userId, hasImage, hasQuestions } = {}) | scopes: content:read
205
220
  - Returns: { stories: [{ id, contentType, contentId, topic, topicKey, type, story, explanation, difficulty, isListening, imagePath, imageUrl, audioPath, audioUrl, questions, questionsBy, hasImage, hasQuestions, userId, username, profilePicUrl, timeStamp }], cursor?, pagination: { limit, hasMore, nextCursor }, filters }
206
- - List completed existing user-generated AI Stories newest first for galleries, quiz apps, readers, and image/story collections.
221
+ - List completed existing user-generated AI Stories newest first for galleries, quiz apps, readers, passage typing, and image/story collections.
207
222
  - Example: const { stories } = await Twinkle.aiStories.list({ hasImage: true, hasQuestions: true, limit: 12 });
208
223
  - async search({ query, limit, cursor, difficulty, type, isListening, userId, hasImage, hasQuestions } = {}) | scopes: content:read
209
224
  - Returns: { stories: [{ id, contentType, contentId, topic, topicKey, type, story, explanation, difficulty, isListening, imagePath, imageUrl, audioPath, audioUrl, questions, questionsBy, hasImage, hasQuestions, userId, username, profilePicUrl, timeStamp }], cursor?, pagination: { limit, hasMore, nextCursor }, filters }
210
- - Search completed existing user-generated AI Stories by topic or story text for galleries, quizzes, and readers.
225
+ - Search completed existing user-generated AI Stories by topic or story text for galleries, quizzes, readers, and passage typing games.
211
226
  - Example: const { stories } = await Twinkle.aiStories.search({ query: searchText, hasQuestions: true, limit: 12 });
212
227
  - async get(storyId) | scopes: content:read
213
228
  - Returns: { story: { id, contentType, contentId, topic, topicKey, type, story, explanation, difficulty, isListening, imagePath, imageUrl, audioPath, audioUrl, questions, questionsBy, hasImage, hasQuestions, userId, username, profilePicUrl, timeStamp } }
214
- - Fetch one completed existing AI Story by id, including story text, media URLs, and normalized questions when available.
229
+ - Fetch one completed existing AI Story by id, including story text for passage typing, media URLs, and normalized questions when available.
215
230
  - Example: const { story } = await Twinkle.aiStories.get(storyId);
216
231
 
217
232
  ### Twinkle.grammarbles
@@ -302,8 +317,10 @@ world.updatePresence({ x, y, z, facing });
302
317
  ### Twinkle.reflections
303
318
  - async getDailyReflections({ userIds, cursor, lastId, limit } = {}) | scopes: dailyReflections:read
304
319
  - Returns: { reflections: [{ id, userId, response, questionId, submittedAt, sharedAt, username, profilePicUrl, question }], cursor? }
320
+ - Read only currently public Daily Reflection shares. response is the exact text the author chose to share publicly, never an unshared raw/private answer.
305
321
  - async getDailyReflectionsByUser(userId, { cursor, lastId, limit } = {}) | scopes: dailyReflections:read
306
322
  - Returns: { reflections: [{ id, userId, response, questionId, submittedAt, sharedAt, username, profilePicUrl, question }], cursor? }
323
+ - Read one user's currently public Daily Reflection shares. response is the exact text the author chose to share publicly, never an unshared raw/private answer.
307
324
 
308
325
  ### Twinkle.privateDb
309
326
  - async get(key) | scopes: privateDb:read
@@ -385,6 +402,37 @@ const { comments, pagination } = await Twinkle.subjectComments.list(subjectId, {
385
402
  console.log('Title:', subject.title, 'Pages:', comments.length, 'hasMore:', pagination?.hasMore);
386
403
  ```
387
404
 
405
+ ### Typing game content from AI Cards and AI Stories
406
+ Use AI Card words for word mode, AI Card exampleText for sentence mode, and AI Story story text for passage mode. Keep leaderboards separate per mode.
407
+ Keywords: typing, ai cards, ai stories, words, sentences, passages, leaderboard
408
+
409
+ ```js
410
+ const wordPage = await Twinkle.aiCards.list({ level: 1, hasExample: true, limit: 20 });
411
+ const wordTargets = wordPage.cards.map((card) => ({
412
+ text: card.word,
413
+ level: card.level,
414
+ sourceId: card.id
415
+ }));
416
+ const sentenceTargets = wordPage.cards.map((card) => ({
417
+ text: card.exampleText,
418
+ level: card.level,
419
+ sourceId: card.id
420
+ }));
421
+
422
+ const passagePage = await Twinkle.aiStories.list({ difficulty: 2, limit: 10 });
423
+ const passageTargets = passagePage.stories.map((story) => ({
424
+ text: story.story,
425
+ level: story.difficulty,
426
+ sourceId: story.id
427
+ }));
428
+
429
+ await Twinkle.leaderboards.submit({
430
+ boardKey: 'arcade-typing-words',
431
+ score: finalScore,
432
+ meta: { mode: 'words', level }
433
+ });
434
+ ```
435
+
388
436
  ### Search AI Stories for a quiz app
389
437
  Use existing user-generated AI Stories as source material for visual galleries, readers, and question-based games.
390
438
  Keywords: ai stories, story, quiz, questions, image, gallery