@stage5/lumine 0.2.27 → 0.2.28
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/README.md +1 -0
- package/lib/admin.js +25 -1
- package/lib/commands.js +1 -0
- package/package.json +1 -1
- package/sdk/LUMINE_ADMIN.md +57 -22
package/README.md
CHANGED
|
@@ -181,6 +181,7 @@ lumine admin subject feature 123 --json
|
|
|
181
181
|
lumine admin subject unfeature 123 --json
|
|
182
182
|
lumine admin featured reorder --subject-ids 30,20,10 --json
|
|
183
183
|
lumine admin brief --days 3 --json
|
|
184
|
+
lumine admin notable add Minecrarft_guy --json
|
|
184
185
|
lumine admin post recommend comment:456 --anyone-can-reward --reward-twinkles 3 --json
|
|
185
186
|
lumine admin post reward comment:456 --twinkles 3 --json
|
|
186
187
|
lumine admin daily-run complete --json
|
package/lib/admin.js
CHANGED
|
@@ -585,6 +585,24 @@ export function parseAdminOperation(options) {
|
|
|
585
585
|
);
|
|
586
586
|
}
|
|
587
587
|
|
|
588
|
+
if (namespace === "notable" && action === "add") {
|
|
589
|
+
const rawTarget = String(target || "").trim();
|
|
590
|
+
if (!rawTarget) {
|
|
591
|
+
throw cliValidationError(
|
|
592
|
+
"Usage: lumine admin notable add <userId|username>.",
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
const body = /^\d+$/.test(rawTarget)
|
|
596
|
+
? { userId: parseRequiredInteger(rawTarget, "user ID", 1) }
|
|
597
|
+
: { username: rawTarget };
|
|
598
|
+
return writeOperation(
|
|
599
|
+
"notable.add",
|
|
600
|
+
"POST",
|
|
601
|
+
"/cli/admin/notable-users",
|
|
602
|
+
body,
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
|
|
588
606
|
if (namespace === "brief" && !action) {
|
|
589
607
|
if (options.adminDays) {
|
|
590
608
|
const days = Number(options.adminDays);
|
|
@@ -683,7 +701,7 @@ export function parseAdminOperation(options) {
|
|
|
683
701
|
}
|
|
684
702
|
|
|
685
703
|
throw cliValidationError(
|
|
686
|
-
"Usage: lumine admin identity|daily-run|recommendations|post|subjects|subject|featured|comment|news|audit|brief ...",
|
|
704
|
+
"Usage: lumine admin identity|daily-run|recommendations|post|subjects|subject|featured|comment|news|audit|brief|notable ...",
|
|
687
705
|
);
|
|
688
706
|
}
|
|
689
707
|
|
|
@@ -1088,6 +1106,12 @@ function printAdminResult({ operation, result }) {
|
|
|
1088
1106
|
}
|
|
1089
1107
|
return;
|
|
1090
1108
|
}
|
|
1109
|
+
if (data.notableUser) {
|
|
1110
|
+
console.log(
|
|
1111
|
+
`${result.status || "success"}: ${data.notableUser.username || "unknown"} (#${data.notableUser.userId}).`,
|
|
1112
|
+
);
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1091
1115
|
if (data.skip) {
|
|
1092
1116
|
console.log(
|
|
1093
1117
|
`${result.status}: ${data.skip.contentType}:${data.skip.contentId} skipped.`,
|
package/lib/commands.js
CHANGED
|
@@ -2528,6 +2528,7 @@ export function printHelp() {
|
|
|
2528
2528
|
lumine admin comment post --draft-id <id> [--json]
|
|
2529
2529
|
lumine admin comment edit <comment-id> --file <comment.md> [--json]
|
|
2530
2530
|
lumine admin brief [--days <1..30>] [--json]
|
|
2531
|
+
lumine admin notable add <user-id|username> [--json]
|
|
2531
2532
|
lumine admin audit [list] [--run current|last|<run-id>] [--target <target>] [--actions <a,b>] [--full] [--cursor <cursor>] [--json]
|
|
2532
2533
|
|
|
2533
2534
|
Examples:
|
package/package.json
CHANGED
package/sdk/LUMINE_ADMIN.md
CHANGED
|
@@ -1041,6 +1041,8 @@ type NewsSubmit = NewsStatus; // "success"; newspaper includes revisionNumber
|
|
|
1041
1041
|
```bash
|
|
1042
1042
|
lumine admin brief --json
|
|
1043
1043
|
lumine admin brief --days 3 --json
|
|
1044
|
+
lumine admin notable add 12647 --json
|
|
1045
|
+
lumine admin notable add Minecrarft_guy --json
|
|
1044
1046
|
```
|
|
1045
1047
|
|
|
1046
1048
|
Read-only management insights for the delegated workflow, windowed since the
|
|
@@ -1071,16 +1073,30 @@ Four sections (Mikey's chosen cut, 2026-08-10):
|
|
|
1071
1073
|
on the Notable Users list) ranked by authored activity in the window, with
|
|
1072
1074
|
`isNewUser` marking window-new signups. Use it to find the overlooked and
|
|
1073
1075
|
rising users the editorial priorities exist for, and propose additions to
|
|
1074
|
-
Mikey's Notable Users list in the report
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1076
|
+
Mikey's Notable Users list in the report. When Mikey approves additions,
|
|
1077
|
+
execute them with `lumine admin notable add <userId|username>` (idempotent —
|
|
1078
|
+
an existing member returns `already_done`; requires the `notable:write`
|
|
1079
|
+
scope, audited as `notable.add`, and writes through the management page's
|
|
1080
|
+
own canonical service). Without his approval the run only proposes.
|
|
1081
|
+
- `teachers` — the mentor/sage achievement holders (the accounts the website
|
|
1082
|
+
titles teacher/headteacher): real classroom teachers, NOT the
|
|
1083
|
+
`userType='supermod'` Korean operations staff, whose work-only usage is
|
|
1084
|
+
expected and deliberately excluded. Mikey's standing question here: which
|
|
1085
|
+
teachers genuinely use the website for themselves and which only work
|
|
1086
|
+
through it. Recommendations and rewards are classroom "work" verbs and
|
|
1087
|
+
count for nothing toward interest; genuine personal interest is measured by
|
|
1088
|
+
what a teacher does for themselves — authored subjects/comments,
|
|
1089
|
+
`reflections` (Daily Reflections answered), `dailyTasksCompleted`,
|
|
1090
|
+
`wordlePlays`, `buildsTouched` (Lumine builds they own that changed in the
|
|
1091
|
+
window), `aiStories`, and bounded `xpEvents` (XP-ledger activity). Shape:
|
|
1092
|
+
`genuinelyInterested` (interestScore > 0, ordered by it, each row carrying
|
|
1093
|
+
all the per-window counters plus `rank: mentor|sage` and `workScore`),
|
|
1094
|
+
`workOnly` (classroom verbs only, zero personal signals), `activeButSilent`
|
|
1095
|
+
(window-active log-ins with nothing at all, capped at 40), and `totals`.
|
|
1096
|
+
Daily-task counts use canonical whole-day indices and can begin up to one
|
|
1097
|
+
calendar day before the exact `window.sinceTs`.
|
|
1098
|
+
Report the contrast between the buckets, and treat `genuinelyInterested` as
|
|
1099
|
+
notable-users-but-for-teachers.
|
|
1084
1100
|
|
|
1085
1101
|
The command needs only an active run's `content:read` scope and mutates
|
|
1086
1102
|
nothing; reading the brief is not audited content action. Window boundaries
|
|
@@ -1089,6 +1105,27 @@ on the big append-only ledgers are found by binary-searching the PRIMARY key
|
|
|
1089
1105
|
is still bounded to the selected 1–30 day window.
|
|
1090
1106
|
|
|
1091
1107
|
```ts
|
|
1108
|
+
type TeacherInsight = {
|
|
1109
|
+
userId: number;
|
|
1110
|
+
username: string | null;
|
|
1111
|
+
rank: 'mentor' | 'sage';
|
|
1112
|
+
lastActive: number | null;
|
|
1113
|
+
daysSinceActive: number | null;
|
|
1114
|
+
subjectsPosted: number;
|
|
1115
|
+
commentsPosted: number;
|
|
1116
|
+
reflections: number;
|
|
1117
|
+
dailyTasksCompleted: number;
|
|
1118
|
+
wordlePlays: number;
|
|
1119
|
+
buildsTouched: number;
|
|
1120
|
+
aiStories: number;
|
|
1121
|
+
xpEvents: number;
|
|
1122
|
+
recommendationsGiven: number;
|
|
1123
|
+
rewardsGiven: number;
|
|
1124
|
+
rewardTwinklesGiven: number;
|
|
1125
|
+
interestScore: number;
|
|
1126
|
+
workScore: number;
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1092
1129
|
type InsightsBrief = Success<{
|
|
1093
1130
|
window: {
|
|
1094
1131
|
sinceTs: number;
|
|
@@ -1124,18 +1161,16 @@ type InsightsBrief = Success<{
|
|
|
1124
1161
|
isNewUser: boolean;
|
|
1125
1162
|
lastActive: number | null;
|
|
1126
1163
|
}>;
|
|
1127
|
-
teachers:
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
engagementScore: number;
|
|
1138
|
-
}>;
|
|
1164
|
+
teachers: {
|
|
1165
|
+
genuinelyInterested: TeacherInsight[];
|
|
1166
|
+
workOnly: TeacherInsight[];
|
|
1167
|
+
activeButSilent: TeacherInsight[];
|
|
1168
|
+
totals: {
|
|
1169
|
+
total: number;
|
|
1170
|
+
activeInWindow: number;
|
|
1171
|
+
interestedInWindow: number;
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1139
1174
|
aiSpending:
|
|
1140
1175
|
| {
|
|
1141
1176
|
days: number;
|