@stage5/lumine 0.2.46 → 0.2.47

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/lib/sdk.js CHANGED
@@ -38,9 +38,12 @@ export const SDK_CLI_METHODS = {
38
38
  "sharedDb.getTopics": { path: "api/shared-db/topics", scopes: ["sharedDb:read"] },
39
39
  "sharedDb.createTopic": { path: "api/shared-db/topic", scopes: ["sharedDb:write"], write: true },
40
40
  "sharedDb.getEntries": { path: "api/shared-db/entries", scopes: ["sharedDb:read"] },
41
+ "sharedDb.getEntriesByIds": { path: "api/shared-db/entries/by-ids", scopes: ["sharedDb:read"] },
41
42
  "sharedDb.addEntry": { path: "api/shared-db/entry", scopes: ["sharedDb:write"], write: true },
43
+ "sharedDb.addEntries": { path: "api/shared-db/entries/batch", scopes: ["sharedDb:write"], write: true },
42
44
  "sharedDb.updateEntry": { path: "api/shared-db/entry/update", scopes: ["sharedDb:write"], write: true },
43
45
  "sharedDb.deleteEntry": { path: "api/shared-db/entry/delete", scopes: ["sharedDb:write"], write: true },
46
+ "sharedDb.deleteEntries": { path: "api/shared-db/entries/delete", scopes: ["sharedDb:write"], write: true },
44
47
  "sharedDb.kv.get": { path: "api/shared-db/kv/get", scopes: ["sharedDb:read"] },
45
48
  "sharedDb.kv.list": { path: "api/shared-db/kv/list", scopes: ["sharedDb:read"] },
46
49
  // The kv/set endpoint is batch-shaped ({ namespace, items }); kv.set keeps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stage5/lumine",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
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.35.0
4
- Updated: 2026-08-18
5
- Generated: 2026-08-18T06:06:02.345Z
3
+ Version: 1.36.0
4
+ Updated: 2026-08-19
5
+ Generated: 2026-08-19T05:45:14.858Z
6
6
 
7
7
  ## Notes
8
8
  - This SDK is injected into Build iframes via the Build preview/runtime.
@@ -645,6 +645,12 @@ const result = await Twinkle.characters.chat({ character: 'zero', thinkingMode:
645
645
  - Fetch the next sharedDb page.
646
646
  - Convenience alias for getEntries used by Load more buttons.
647
647
  - Pass the previous response cursor to fetch the next page using the same order and page size.
648
+ - async getEntriesByIds(entryIds) | scopes: sharedDb:read
649
+ - Returns: { entries: [{ id, topicId, userId, username, profilePicUrl, data, createdAt, updatedAt }] }
650
+ - Read up to 100 shared rows by their app-scoped entry ids.
651
+ - Accepts 1-100 unique positive entry ids and returns the rows that still exist in the same order as requested.
652
+ - Ids from another Build app are never returned.
653
+ - Use this for bounded manifest references; use getEntries for browseable topic feeds.
648
654
  - async addEntry(topicName, data, { notify } = {}) | scopes: sharedDb:write
649
655
  - Returns: { entry: { id, topicId, userId, username, profilePicUrl, data, createdAt, updatedAt } }
650
656
  - Append a shared JSON row, optionally creating a Twinkle notification from the canonical write.
@@ -653,6 +659,14 @@ const result = await Twinkle.characters.chat({ character: 'zero', thinkingMode:
653
659
  - notify may include eventKey, label, summary, recipients, and target. Supported recipients start with { kind: 'buildOwner' }.
654
660
  - Use target.focus, such as { kind: 'sharedDbEntry', entryId: '$createdEntryId' }, so Twinkle.notifications can focus the item when opened.
655
661
  - Use Twinkle.leaderboards for standard top-score rankings and personal-best scoreboards.
662
+ - async addEntries(topicName, items) | scopes: sharedDb:write
663
+ - Returns: { entries: [{ id, topicId, userId, username, profilePicUrl, data, createdAt, updatedAt }] }
664
+ - Atomically append up to 100 owner-controlled JSON rows for one low-frequency user action.
665
+ - items must contain 1-100 JSON objects; each object remains capped at 10 KB.
666
+ - All rows are created atomically in one topic and returned as canonical server entries.
667
+ - Batch rows remain controlled by their creator or the Build owner, just like addEntry rows.
668
+ - This method intentionally does not support subjectRef or notifications; use addEntry when either is needed.
669
+ - Use for one bounded durable action, not per-frame or per-tick logging.
656
670
  - async updateEntry(entryId, data, { notify } = {}) | scopes: sharedDb:write
657
671
  - Returns: { entry: { id, topicId, userId, username, profilePicUrl, data, createdAt, updatedAt } }
658
672
  - Update a viewer-owned shared row, optionally notifying safe recipients from the canonical write.
@@ -662,6 +676,12 @@ const result = await Twinkle.characters.chat({ character: 'zero', thinkingMode:
662
676
  - async deleteEntry(entryId) | scopes: sharedDb:write
663
677
  - Returns: { success: true }
664
678
  - Deletes an entry. Only the entry creator or the build owner can delete.
679
+ - async deleteEntries(entryIds) | scopes: sharedDb:write
680
+ - Returns: { success: true, deletedEntryIds: number[], missingEntryIds: number[] }
681
+ - Atomically delete up to 100 owned shared rows.
682
+ - Accepts 1-100 unique positive entry ids.
683
+ - Every existing target must be writable by the viewer or Build owner; otherwise the whole request rejects without deleting anything.
684
+ - Missing rows are reported and ignored, making cleanup idempotent.
665
685
  - async kv.get(namespace, key) | scopes: sharedDb:read
666
686
  - Returns: { item: { id, key, value, version, changeSeq, deleted, updatedBy, createdAt, updatedAt } | null }
667
687
  - Read one key from the keyed shared store (shared mutable state). Deleted keys read as null.
@@ -1469,20 +1469,58 @@ the run while either flag remains true. Run it right after the
1469
1469
  brief, and **read every row** — the tool deliberately does no filtering,
1470
1470
  scoring, or keyword matching, because the judgment is the reviewing agent's.
1471
1471
 
1472
- **Privacy boundary:** this is an audit of how Twinkle's bots treated members,
1473
- not a moderation queue for members' private use of the tool. Treat private
1474
- human messages and creative work as confidential context. Read every
1475
- bot-authored row, but inspect adjacent human messages only when the minimum
1476
- necessary context is needed to judge the bot's response; never browse the rest
1477
- of a private conversation out of curiosity. Do not characterize or escalate a
1478
- member's lawful private creative writing — including a teenager's romance
1479
- fiction — merely because its subject is intimate or romantic. An escalation
1480
- must identify what **Zero or Ciel** did (for example, an invented premise,
1481
- pressure, sexualization, abuse, or a failed boundary), include only the narrow
1482
- context needed for Mikey to decide a remedy, and never reuse private material
1483
- for public editorial judgment, Notable User selection, or unrelated identity
1484
- investigation. A separate concrete risk to a member may still be escalated,
1485
- but it does not authorize a broader review of their private activity.
1472
+ **Purpose and privacy boundary:** this audits how Twinkle's bots treated
1473
+ members; it is not thought-policing or a moderation queue for members' private
1474
+ use of the tool. The question is whether Zero or Ciel inflicted, encouraged,
1475
+ or operationally facilitated potential harm — not whether a member's private
1476
+ idea is taboo, upsetting, sexual, violent, or angry. Treat private human
1477
+ messages and creative work as confidential context. Read every bot-authored
1478
+ row, but inspect adjacent human messages only when the minimum necessary
1479
+ context is needed to judge what the bot did; never browse the rest of a private
1480
+ conversation out of curiosity. Never reuse private material for public
1481
+ editorial judgment, Notable User selection, or unrelated identity
1482
+ investigation.
1483
+
1484
+ **Private creative-expression rule (Mikey's direction, 2026-08-19):** Zero and
1485
+ Ciel are tools members may use to express lawful private fiction already in
1486
+ their imagination. A high-school member writing romantic or sexual fiction
1487
+ about fictional peers around their own age is not an escalation merely because
1488
+ the prose is explicit or set at a school. Sexual fantasy is not inherently a
1489
+ dangerous thought, just as violent or angry fantasy alone is not evidence of
1490
+ real-world intent. If the member requested the fictional content and the bot
1491
+ helped put it into words, that assistance is not by itself the bot encouraging
1492
+ the member to think or act that way. Do not characterize, flag, notify anyone
1493
+ about, or intervene in that private creative endeavor absent a separate
1494
+ concrete harm signal.
1495
+
1496
+ **Real-world-harm boundary:** actionable assistance for poisoning someone,
1497
+ covertly hurting or tormenting a real target, evading detection, grooming,
1498
+ abuse, or another actual crime is categorically different from fantasy. A bot
1499
+ that supplies such operational instructions commits an urgent conduct
1500
+ violation. A bot that refuses and redirects safely has behaved correctly; the
1501
+ member's request becomes a separate private safety escalation only when the
1502
+ available context shows a concrete, credible bridge to real-world harm — such
1503
+ as an identifiable target, expressed intent, means, planning, or concealment —
1504
+ not merely because a disturbing thought or fictional premise exists.
1505
+
1506
+ **Position-of-trust safeguarding rule (Mikey's direction, 2026-08-19):** an
1507
+ adult teacher, or another adult in a comparable position of authority and
1508
+ direct access to children, creating or requesting sexual content about an
1509
+ underage child is always a private safeguarding escalation, even when framed
1510
+ as fiction. The mandatory flag follows from the adult's power, duty of care,
1511
+ and access to students — not from treating sex as uniquely taboo. Preserve only
1512
+ the minimum necessary evidence and report it privately to Mikey so he can tell
1513
+ Andrew and decide the response. A flag is not a public accusation or automatic
1514
+ finding of guilt; do not contact the teacher, students, or families without
1515
+ Mikey's direction. An identifiable real student, grooming, planning,
1516
+ concealment, or actionable abuse makes the escalation urgent.
1517
+
1518
+ Every escalation must state which rule was triggered and identify either what
1519
+ **Zero or Ciel** did (for example, an invented premise, pressure,
1520
+ sexualization of the member, actionable facilitation, abuse, or a failed
1521
+ boundary) or the concrete safeguarding signal. Include only the narrow context
1522
+ needed for Mikey to decide a remedy. A separate concrete risk may justify this
1523
+ minimal review, but it never authorizes browsing unrelated private activity.
1486
1524
 
1487
1525
  Judge against the same values the editorial priorities encode:
1488
1526
 
@@ -1510,11 +1548,12 @@ Judge against the same values the editorial priorities encode:
1510
1548
  enforce. Even a genuinely excessive routine warrants a question ("is this
1511
1549
  still helping you, or would a break feel better?"), never a decree.
1512
1550
 
1513
- Anything over the line goes on the escalation list with the message text and
1514
- the child's username — top of the list, alongside child-safety. Do not
1515
- apologize as the bot, edit, or otherwise clean up without Mikey's direction;
1516
- he decides the remedy. When he explicitly directs a private correction, use
1517
- the composed-only existing-DM path (no model and no AI Energy):
1551
+ A bot-conduct violation or mandatory safeguarding signal goes on the
1552
+ escalation list with the smallest excerpt and identity needed to evaluate it —
1553
+ top of the list when urgent. Do not apologize as the bot, edit, contact the
1554
+ member, or otherwise clean up without Mikey's direction; he decides the
1555
+ remedy. When he explicitly directs a private correction, use the composed-only
1556
+ existing-DM path (no model and no AI Energy):
1518
1557
 
1519
1558
  ```bash
1520
1559
  lumine admin chat send <userId|username> --file message.md --json