@stage5/lumine 0.3.51 → 0.3.53
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/build-review.js +16 -2
- package/package.json +1 -1
- package/sdk/BUILD_SDK_INDEX.md +8 -8
- package/sdk/LUMINE_ADMIN.md +1 -1
package/lib/build-review.js
CHANGED
|
@@ -761,8 +761,21 @@ async function runChromeReview({
|
|
|
761
761
|
});
|
|
762
762
|
const closed = new Promise((resolve, reject) => {
|
|
763
763
|
child.once("error", reject);
|
|
764
|
-
child.once("
|
|
765
|
-
|
|
764
|
+
child.once("exit", (code, signal) => {
|
|
765
|
+
// Chrome's crash reporter can inherit stderr and outlive Chrome. Node's
|
|
766
|
+
// `close` then never fires even though the browser already exited.
|
|
767
|
+
// Drain the last output briefly, then close only our pipe endpoints;
|
|
768
|
+
// do not kill another process or turn an early browser exit into success.
|
|
769
|
+
let done = false;
|
|
770
|
+
const finish = (stdioDrainTimedOut) => {
|
|
771
|
+
if (done) return;
|
|
772
|
+
done = true;
|
|
773
|
+
clearTimeout(drainTimer);
|
|
774
|
+
for (const stream of child.stdio) stream?.destroy?.();
|
|
775
|
+
resolve({ code: Number(code ?? -1), signal: signal || null, stdioDrainTimedOut });
|
|
776
|
+
};
|
|
777
|
+
const drainTimer = setTimeout(() => finish(true), 250);
|
|
778
|
+
child.once("close", () => finish(false));
|
|
766
779
|
});
|
|
767
780
|
});
|
|
768
781
|
// The hard kill covers the observation window plus, when a script runs,
|
|
@@ -1140,6 +1153,7 @@ export async function runManagedBuildReview({ options, authToken, buildId }) {
|
|
|
1140
1153
|
closeRequested: browser.closeRequested === true,
|
|
1141
1154
|
forcedTermination: browser.forcedTermination === true,
|
|
1142
1155
|
exitedCleanly: browser.code === 0 && !browser.signal,
|
|
1156
|
+
stdioDrainTimedOut: browser.stdioDrainTimedOut === true,
|
|
1143
1157
|
evidenceCompleteBeforeClose: browser.evidenceCompleteBeforeClose === true,
|
|
1144
1158
|
exitedBeforeClose: browser.exitedBeforeClose === true,
|
|
1145
1159
|
closeDurationMs: Number.isFinite(browser.closeDurationMs)
|
package/package.json
CHANGED
package/sdk/BUILD_SDK_INDEX.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Version: 1.68.0
|
|
4
4
|
Updated: 2026-10-16
|
|
5
|
-
Generated: 2026-10-
|
|
5
|
+
Generated: 2026-10-21T05:16:33.397Z
|
|
6
6
|
|
|
7
7
|
## Notes
|
|
8
8
|
- This SDK is injected into Build iframes via the Build preview/runtime.
|
|
@@ -508,9 +508,9 @@ const result = await Twinkle.ai.chat({ message, history: chatHistory, systemProm
|
|
|
508
508
|
- Template values describe types, not answers to copy. All object keys are required and extra keys are rejected, including inside nested objects; {} means an exactly empty object, not a free-form dictionary. A non-empty array uses only its first item as the template for every returned item, with no fixed length; mixed examples do not declare a union. [] allows arbitrary JSON items. A null template accepts any JSON primitive (string, number, boolean or null), but the key is still required. Use 'number' for fractional numbers; 0 and other integer examples require integers. State content requirements in prompt or instructions. GPT routes retain descriptive string examples as field guidance, not enforced enum values.
|
|
509
509
|
- GPT models prefer native JSON Schema output for compatible shapes. Shapes outside the strict provider subset, such as [] with arbitrary items or deeply nested structures, use prompt-based JSON generation with the same final validation. A provider rejection specifically of the native schema triggers one prompt-based fallback; auth, quota, safety and unrelated request failures do not trigger that fallback. Validation retries preserve the original task and instructions. The returned object/result shape and streaming callbacks are unchanged.
|
|
510
510
|
- mode is accepted as an alias for thinkingMode, and mid is accepted as an alias for medium.
|
|
511
|
-
- Omit model to use the normal Lite/Medium/High routing.
|
|
512
|
-
- thinkingMode low uses
|
|
513
|
-
- thinkingMode medium
|
|
511
|
+
- Omit model to use the normal Lite/Medium/High routing. Low and Medium use gpt-6-luna; explicit gpt-6-luna accepts Low, Medium or High thinking. Existing apps naming claude-haiku-5-5 now run on gpt-6-luna at the requested thinking level. Explicit claude-sonnet-5-5, gpt-6.1-sol or claude-opus-5-5 still require thinkingMode: 'high'; unknown model IDs reject instead of silently falling back. Retired IDs still work and run on their replacement: claude-sonnet-5 runs claude-sonnet-5-5; gpt-6-sol and gpt-5.6-sol run gpt-6.1-sol; gpt-6-astra, claude-opus-5 and claude-fable-5-1 run claude-opus-5-5.
|
|
512
|
+
- thinkingMode low uses GPT-6 Luna with low reasoning and consumes the viewer's AI Energy from confirmed provider usage.
|
|
513
|
+
- thinkingMode medium uses GPT-6 Luna with medium reasoning and consumes normal AI Energy.
|
|
514
514
|
- thinkingMode high without model uses Claude Sonnet 5.5 with high adaptive thinking and consumes high AI Energy. Explicit model: 'gpt-6.1-sol' selects GPT-6.1 Sol with xhigh reasoning at the same High AI Energy tier; model: 'claude-sonnet-5-5' names Sonnet 5.5 directly.
|
|
515
515
|
- claude-sonnet-5-5 and claude-opus-5-5 use Anthropic adaptive High thinking and debit confirmed provider usage at the High tier.
|
|
516
516
|
- Pass onStatus, onReasoning, and/or onText to stream progress from the same structured generation. onStatus receives high-level phases such as thinking, searching_web, responding, validating, and completed.
|
|
@@ -519,7 +519,7 @@ const result = await Twinkle.ai.chat({ message, history: chatHistory, systemProm
|
|
|
519
519
|
- Put a user-facing field such as producerNotes in expectedStructure when commentary must be part of the validated final object rather than transient reasoning progress.
|
|
520
520
|
- When AI Energy is empty, every automatic or named model choice rejects before new provider work; there is no free fallback mode.
|
|
521
521
|
- Live web search is enabled by default in Medium and High modes. Pass webSearch: false to disable it for the app. Low/Lite Mode remains tool-free; explicitly forcing webSearch: true in Low Mode returns an error.
|
|
522
|
-
- The server validates the final shape; OpenAI/xAI routes can retry malformed output, while Anthropic routes (claude-
|
|
522
|
+
- The server validates the final shape; OpenAI/xAI routes can retry malformed output, while Anthropic routes (claude-sonnet-5-5 and claude-opus-5-5) use native JSON Schema output and retry one malformed or shape-invalid result. App code should still validate business-specific enum values.
|
|
523
523
|
- If the model declines a request, the call rejects with code ai_declined (HTTP 422). The tokens it used are charged to AI Energy like a finished call. Show the viewer a short message so they can rephrase; do not automatically retry the same prompt.
|
|
524
524
|
- Example: const { object } = await Twinkle.ai.generateObject({ thinkingMode: 'high', model: 'claude-opus-5-5', prompt: 'Plan the next section from: ' + currentState, expectedStructure: { producerNotes: 'string', action: 'string', confidence: 'number' }, onStatus: (phase) => showPhase(phase), onReasoning: (summary, meta) => showReasoningProgress(summary, meta), onText: (partialJson, meta) => showStructuredProgress(partialJson, meta) });
|
|
525
525
|
- onChatStatus(listener) | scopes: none
|
|
@@ -601,9 +601,9 @@ const result = await Twinkle.ai.chat({ message, history: chatHistory, systemProm
|
|
|
601
601
|
- The character route also accepts text or message fields for compatibility, but generated apps should use content.
|
|
602
602
|
- The server keeps the latest 16 valid character history entries.
|
|
603
603
|
- Pass onText/onStatus for streaming dialogue. Omit callbacks for non-streaming dialogue where the promise resolves with the final response.
|
|
604
|
-
- Inside Build character chat, thinkingMode low uses Lite Mode: Zero uses GPT-6 Luna with reasoning disabled and Ciel uses
|
|
605
|
-
- Inside Build character chat, thinkingMode medium uses the same normal chat model routing: Zero uses GPT-6 Luna with reasoning disabled and Ciel uses
|
|
606
|
-
- Inside Build character chat, thinkingMode high uses Think Hard chat routing and high AI Energy: Zero uses Grok 4.7 with high reasoning and Ciel uses Claude Opus 5.5 with high thinking.
|
|
604
|
+
- Inside Build character chat, thinkingMode low uses Lite Mode: Zero uses GPT-6 Luna with reasoning disabled and Ciel uses GPT-6 Luna with reasoning disabled; confirmed provider usage consumes the viewer's AI Energy and is usually cheaper than High.
|
|
605
|
+
- Inside Build character chat, thinkingMode medium uses the same normal chat model routing: Zero uses GPT-6 Luna with reasoning disabled and Ciel uses GPT-6 Luna with reasoning disabled, with normal AI Energy.
|
|
606
|
+
- Inside Build character chat, thinkingMode high uses Think Hard chat routing and high AI Energy: Zero uses Grok 4.7 with high reasoning and Ciel uses Claude Opus 5.5 with high thinking, with GPT-6 Luna at high reasoning for recovery.
|
|
607
607
|
- When AI Energy is empty, Low, Medium, and High all reject before new provider work; there is no free fallback mode.
|
|
608
608
|
- Pass roomContext as a short shared scene transcript so Zero and Ciel can know what happened in the same room.
|
|
609
609
|
- includeWebsiteContext defaults to true. Set includeWebsiteContext: false for in-world NPC dialogue that should only use Zero/Ciel's basic character identity plus your scene/instructions.
|
package/sdk/LUMINE_ADMIN.md
CHANGED
|
@@ -1184,7 +1184,7 @@ lumine admin report serve --file <dir>/daily-management-report.md [--port <n>] [
|
|
|
1184
1184
|
```
|
|
1185
1185
|
|
|
1186
1186
|
These compose the documented commands in this contract, running them as child processes, so every scope check, audit and pagination rule applies unchanged.
|
|
1187
|
-
- **`gather`** saves
|
|
1187
|
+
- **`gather`** saves its fixed set of read-only reports into `<dir>`, including the canonical published Math Lab queue in `math-lab-queue.json`. It is not the complete daily checklist: app refills/usage, all-type Build reviews, sponsor integrity and other duties need their own steps. Repository agents follow the current full-run coverage index in `agent-guides/lumine-admin.md`. It follows `bot-output` to exhaustion and renders `bot-chats.txt`, then lists any failed step in `gather.json`. Total/per-step `durationMs`, attempts and recovered reads make recurring slow or failing collection steps visible during the daily review. It also creates `review-state.json`: every source is fetched, not read. Children bypass update checks, require matching fresh stdout/file receipts, and retry an unconfirmed opted-in read at most once. Mutations never auto-retry. It needs the active run for run-scoped reads.
|
|
1188
1188
|
- **`progress`** reads local review state and explicit operator acknowledgments, writes private `progress.json`, and keeps reading, canonical effort mutations, the run lease, and browser checks separate. Add all required duties for the actual run scope and its carryovers; collection alone is not a full review. A completed run lease cannot complete a pending duty. Reading acknowledgments bind to the current file bytes and are operator attestations, not proof of comprehension.
|
|
1189
1189
|
- **`featured candidates`** returns Subjects posted after the Bangkok-midnight cutoff that are off the board and provably never Featured. Each one comes with its human/bot comment counts, explicit comment truncation/completeness, and whether Mikey has viewed it. Counts from truncated context are partial. An unavailable Subject context fails the collection. Eligibility only: ranking stays editorial.
|
|
1190
1190
|
- **`report serve`** detaches a loopback server that answers only `/`, `marked.min.js` and the report Markdown. `--open` opens Chrome and reports whether the OS accepted the request. Render, navigation and original-source verification remain pending until actually checked. Startup failures stop only the child this command started.
|