@stage5/lumine 0.3.65 → 0.3.67

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.
@@ -14,7 +14,7 @@ import path from "node:path";
14
14
  // re-importing a folder retires that paper's earlier items
15
15
  // status --item <id> --to live|retired|checked
16
16
  export const ARENA_USAGE =
17
- "Usage: lumine admin arena queue | import --dir <paper folder> [--audio audio/<exam>/<paper>] [--live] [--confirm] | status --item <id> --to live|retired|checked [--confirm] [--json]";
17
+ "Usage: lumine admin arena queue | marking [--cursor <id>] [--limit <1-200>] | import --dir <paper folder> [--audio audio/<exam>/<paper>] [--live] [--confirm] | status --item <id> --to live|retired|checked [--confirm] [--json]";
18
18
  const MAX_ITEMS = 300;
19
19
 
20
20
  function validationError(message) {
@@ -50,6 +50,18 @@ function readPaper(dir) {
50
50
  }
51
51
 
52
52
  export function buildArenaOperation({ action, options }) {
53
+ if (action === "marking") {
54
+ const cursor = Number(options.adminCursor || 0);
55
+ const limit = Number(options.adminLimit ?? 100);
56
+ if (!Number.isSafeInteger(cursor) || cursor < 0 || !Number.isInteger(limit) || limit < 1 || limit > 200) {
57
+ throw validationError("Use a non-negative --cursor and --limit from 1 to 200.");
58
+ }
59
+ return {
60
+ name: "arena.marking", method: "GET",
61
+ path: `/cli/admin/arena/marking?cursor=${cursor}&limit=${limit}`,
62
+ body: undefined, mutates: false, requiresRun: false,
63
+ };
64
+ }
53
65
  if (!action || action === "queue") {
54
66
  return {
55
67
  name: "arena.queue",
@@ -102,6 +114,14 @@ export function buildArenaOperation({ action, options }) {
102
114
  }
103
115
 
104
116
  export function formatArenaResult({ operation, data }) {
117
+ if (operation.name === "arena.marking") {
118
+ const entries = data?.entries || [];
119
+ return [
120
+ `Checked ${data?.scannedBattles ?? 0} completed battles; ${entries.length} need follow-up on this page.`,
121
+ ...entries.map((row) => `Battle ${row.battleId}, member ${row.userId}, ${row.examKey}: ${row.reasons.join(", ")} (${row.pendingAnswers} answers pending; ${row.xpEarned}/${row.xpExpected} XP and ${row.coinsEarned}/${row.coinsExpected} Coins paid)`),
122
+ ...(data?.nextCursor ? [`Continue: lumine admin arena marking --cursor ${data.nextCursor} --json`] : ["End of marking/reward census."]),
123
+ ];
124
+ }
105
125
  if (operation.name === "arena.queue") {
106
126
  const types = data?.types || [];
107
127
  if (!types.length) return ["No live Arena items yet."];
package/lib/admin.js CHANGED
@@ -3016,7 +3016,7 @@ export function parseAdminOperation(options) {
3016
3016
  if (namespace === "word-games") {
3017
3017
  if (action === "status") return readOperation("word-games.status", "/cli/admin/word-games/status", { requiresRun: false });
3018
3018
  if (action === "candidates") return readOperation("word-games.candidates", withQuery("/cli/admin/word-games/candidates", {
3019
- level: parseRequiredInteger(target, "word level", 1, 5), after: options.adminAfter || 0, limit: options.adminLimit || 50,
3019
+ level: parseRequiredInteger(target, "word level (0 means unassigned)", 0, 5), after: options.adminAfter || 0, limit: options.adminLimit || 50,
3020
3020
  }), { requiresRun: false });
3021
3021
  if (action === "import" && target) {
3022
3022
  const raw = readAdminJsonFile(target, "<reviewed-words.json>", { maxBytes: 256 * 1024 });
@@ -3039,7 +3039,7 @@ export function parseAdminOperation(options) {
3039
3039
  reason,
3040
3040
  }, { requiresRun: false, mutates: true });
3041
3041
  }
3042
- throw cliValidationError("Use: lumine admin word-games status | candidates <1-5> [--after <id>] [--limit <n>] | import <reviewed-words.json> [--dry-run] | champions --build <id> | confirm|disqualify <YYYY-MM> <userId> --build <id> --reason \"<evidence>\"");
3042
+ throw cliValidationError("Use: lumine admin word-games status | candidates <0-5> (0 = unassigned) [--after <id>] [--limit <n>] | import <reviewed-words.json> [--dry-run] | champions --build <id> | confirm|disqualify <YYYY-MM> <userId> --build <id> --reason \"<evidence>\"");
3043
3043
  }
3044
3044
  if (namespace === "english") {
3045
3045
  return buildEnglishOperation({ action, target, options });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stage5/lumine",
3
- "version": "0.3.65",
3
+ "version": "0.3.67",
4
4
  "description": "Command line tools for launching Lumine builds on Twinkle.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5539,7 +5539,7 @@ need no app update. Keep prepared inventory distinct from verified live stock.
5539
5539
 
5540
5540
  ## Word Search vocabulary upkeep
5541
5541
 
5542
- Every full daily website-management run adds reviewed Word Master words across all five difficulty bands, with accurate definitions and natural example sentences. Use `lumine admin word-games status`, `candidates <1-5> --after <id> --limit 100`, and `import <reviewed-words.json> --dry-run` followed by the reviewed import. File shape: `{items:[{wordId,word,wordLevel,definition,example}]}` (up to 100). Candidate exports are unreviewed; use agent judgment and check the current censor table before importing. No paid batch APIs. The import is audited and preserves active generation and today's existing puzzles; future banks include the additions. The app receives all five ready banks in its normal HTML and has a bundled checked fallback, so word selection never creates a loading screen or separate word request. Report additions per difficulty and text corrections. Repository agents follow `agent-guides/word-search-vocabulary.md` for the full procedure. A scoped management request does not start this full-run duty.
5542
+ Every full daily website-management run adds reviewed Word Master words across all five difficulty bands, with accurate definitions and natural example sentences. Use `lumine admin word-games status`, `candidates <0-5> --after <id> --limit 100`, and `import <reviewed-words.json> --dry-run` followed by the reviewed import. File shape: `{items:[{wordId,word,wordLevel,definition,example}]}` (up to 100). Candidate level 0 includes unassigned words (zero or NULL), not a sixth difficulty; assign a reviewed level 1–5 on import. Candidate exports are unreviewed; use agent judgment and check the current censor table before importing. No paid batch APIs. The import is audited and preserves active generation and today's existing puzzles; future banks include the additions. The app receives all five ready banks in its normal HTML and has a bundled checked fallback, so word selection never creates a loading screen or separate word request. Report additions per difficulty and text corrections. Repository agents follow `agent-guides/word-search-vocabulary.md` for the full procedure. A scoped management request does not start this full-run duty.
5543
5543
 
5544
5544
  ## Word Search monthly champions
5545
5545