@stage5/lumine 0.3.43 → 0.3.44
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/admin.js +20 -1
- package/package.json +1 -1
package/lib/admin.js
CHANGED
|
@@ -382,7 +382,7 @@ function buildApprovalOperation({ action, target, options }) {
|
|
|
382
382
|
// Code agent passes wrote (no model is called), then review what they could
|
|
383
383
|
// not settle (Mikey 2026-10-06: bulk AI work runs on Claude Code agents).
|
|
384
384
|
const ENGLISH_USAGE =
|
|
385
|
-
"Use: lumine admin english import <verdicts.json> --pass a|b | adjudicate <verdicts.json> | add-questions <questions.json> | relevel <moves.json> | mastery <userId> --reason <why> | backfill-distractors | summary | review [--limit <n>] | accept|retire <questionId> [--reason <text>] [--fault] | retag <questionId> --skill <code> [--reason <text>] | build-candidates [--after <questionId>] [--limit <n>] | build-import <verdicts.json> | check-candidates [--after <questionId>] [--limit <n>] | check-import <verdicts.json> | check-broken [--after <questionId>] [--limit <n>] | check-apply <fixes.json> | check-verify <checked.json> | check-follow-faulty [--after <next>] [--limit <n>] | lesson-candidates [--after <skillCode>] [--limit <n>] | lesson-import <lessons.json> | lesson-approve <approvals.json> | lessons [--status draft|approved]";
|
|
385
|
+
"Use: lumine admin english import <verdicts.json> --pass a|b | adjudicate <verdicts.json> | add-questions <questions.json> | relevel <moves.json> | mastery <userId> --reason <why> | backfill-distractors | summary | review [--limit <n>] | accept|retire <questionId> [--reason <text>] [--fault] | retag <questionId> --skill <code> [--reason <text>] | build-candidates [--after <questionId>] [--limit <n>] | build-import <verdicts.json> | check-candidates [--after <questionId>] [--limit <n>] | check-import <verdicts.json> | check-broken [--after <questionId>] [--limit <n>] | check-apply <fixes.json> | check-verify <checked.json> | check-follow-faulty [--after <next>] [--limit <n>] | audit-backlog [--after <questionId>] [--limit <n>] | audit-mark <marks.json> | lesson-candidates [--after <skillCode>] [--limit <n>] | lesson-import <lessons.json> | lesson-approve <approvals.json> | lessons [--status draft|approved]";
|
|
386
386
|
const ENGLISH_IMPORT_MAX = 500;
|
|
387
387
|
|
|
388
388
|
function buildEnglishOperation({ action, target, options }) {
|
|
@@ -464,6 +464,25 @@ function buildEnglishOperation({ action, target, options }) {
|
|
|
464
464
|
if (after && !/^(?:[ufc]:)?\d+:\d+$/.test(after)) throw cliValidationError("--after takes the last reply's next (<phase:id:version>).");
|
|
465
465
|
return writeOperation("english.check_follow_faulty", "POST", "/cli/admin/english/item-checks/follow-faulty", { after, limit: limitOf(200, 100) }, { requiresRun: false, timeoutMs: 300000 });
|
|
466
466
|
}
|
|
467
|
+
// Grammar Quest audit passes (Mikey 2026-10-17): the checked items no pass
|
|
468
|
+
// has looked at yet, first; and marking what a pass read,
|
|
469
|
+
// { audit: "<name>", items: [{ questionId, version, contentHash, outcome }] }
|
|
470
|
+
if (action === "audit-backlog") {
|
|
471
|
+
// the parser leaves an omitted --after as ""
|
|
472
|
+
const after = options.adminAfter ? parseRequiredInteger(options.adminAfter, "--after", 0, 2147483647) : 0;
|
|
473
|
+
return readOperation("english.audit_backlog", withQuery("/cli/admin/english/item-audits/backlog", { after, limit: limitOf(1000, 200) }), { requiresRun: false });
|
|
474
|
+
}
|
|
475
|
+
if (action === "audit-mark") {
|
|
476
|
+
if (!target) throw cliValidationError(ENGLISH_USAGE);
|
|
477
|
+
const raw = readAdminJsonFile(target, "<marks.json>", { maxBytes: 4 * 1024 * 1024 });
|
|
478
|
+
const audit = String(raw?.audit || "");
|
|
479
|
+
if (!/^[a-z0-9][a-z0-9-]{2,63}$/.test(audit)) throw cliValidationError('The file needs "audit": the pass\'s name (a-z, 0-9, -), e.g. crack-ambiguity-20261017.');
|
|
480
|
+
const items = Array.isArray(raw?.items) ? raw.items : null;
|
|
481
|
+
if (!items || !items.length || items.length > ENGLISH_IMPORT_MAX) {
|
|
482
|
+
throw cliValidationError(`The file must hold { audit, items: [...] } with 1 to ${ENGLISH_IMPORT_MAX} marks.`);
|
|
483
|
+
}
|
|
484
|
+
return writeOperation("english.audit_mark", "POST", "/cli/admin/english/item-audits/mark", { audit, items }, { requiresRun: false, timeoutMs: 180000 });
|
|
485
|
+
}
|
|
467
486
|
// Grammar Quest lessons (Mikey 2026-10-11): what the writing pass draws on
|
|
468
487
|
// (each rule-first point with live sound questions on it), importing
|
|
469
488
|
// drafts, approving reviewed versions [{ skillCode, version }], the list
|