recess-cli 3.14.0 → 3.15.0
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/dist/args.js +2 -0
- package/dist/cli.js +83 -2
- package/dist/command-schema.js +2 -0
- package/dist/commands/admissions.js +11 -1
- package/dist/commands/reports.js +127 -23
- package/dist/help.js +30 -5
- package/package.json +1 -1
package/dist/args.js
CHANGED
|
@@ -7,6 +7,7 @@ import { CliError } from "./errors.js";
|
|
|
7
7
|
export const REPEATABLE_FLAGS = new Set([
|
|
8
8
|
"amount",
|
|
9
9
|
"bill-date",
|
|
10
|
+
"existing-kid",
|
|
10
11
|
"kid",
|
|
11
12
|
"staff-note",
|
|
12
13
|
"note",
|
|
@@ -24,6 +25,7 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
24
25
|
"paywall-offline",
|
|
25
26
|
"no-email",
|
|
26
27
|
"no-paywall",
|
|
28
|
+
"no-text",
|
|
27
29
|
"all",
|
|
28
30
|
"all-references",
|
|
29
31
|
"allow-assigned-edits",
|
package/dist/cli.js
CHANGED
|
@@ -3248,6 +3248,23 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
3248
3248
|
if (acting.length === 0) {
|
|
3249
3249
|
throw new CliError("no_op", `Nothing to ${verb}: every candidate was skipped. See preview.skipped for why.`, 1, { preview });
|
|
3250
3250
|
}
|
|
3251
|
+
// An enrolled school student leaves through `users school withdraw`, which
|
|
3252
|
+
// also disables the account; the server refuses the disable either way.
|
|
3253
|
+
if (disabling) {
|
|
3254
|
+
const kids = acting.filter((member) => member.role === "KID");
|
|
3255
|
+
const statuses = await Promise.all(kids.map(async (member) => ({
|
|
3256
|
+
member,
|
|
3257
|
+
status: unwrap(await api.client.GET("/admin/users/{userId}/school-status", {
|
|
3258
|
+
params: { path: { userId: member.id } },
|
|
3259
|
+
})),
|
|
3260
|
+
})));
|
|
3261
|
+
const enrolled = statuses.filter(({ status }) => status.isSchool && !status.withdrawnAt);
|
|
3262
|
+
if (enrolled.length > 0) {
|
|
3263
|
+
throw new CliError("active_school_student", `${enrolled
|
|
3264
|
+
.map(({ member }) => `${member.name} (${member.id})`)
|
|
3265
|
+
.join(", ")} ${enrolled.length === 1 ? "is an" : "are"} active school ${enrolled.length === 1 ? "student" : "students"}. Withdraw first with \`recess users school withdraw <user-id> --note TEXT --expected-updated-at ISO\`; withdrawal also disables the account.`, 1, { preview });
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3251
3268
|
const billing = acting.filter((member) => member.billableEnrollments > 0);
|
|
3252
3269
|
if (disabling && billing.length > 0 && !hasFlag(parsed, "allow-billing")) {
|
|
3253
3270
|
throw new CliError("billable_enrollments", `${billing
|
|
@@ -5363,6 +5380,43 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
5363
5380
|
body: { ordinal },
|
|
5364
5381
|
})));
|
|
5365
5382
|
}
|
|
5383
|
+
if (verb === "complete-module") {
|
|
5384
|
+
const moduleRef = positional(parsed, 2, "module ref (e.g. B3)");
|
|
5385
|
+
const student = await studentFlag(api, parsed, { required: true });
|
|
5386
|
+
const studentId = student.id;
|
|
5387
|
+
const goalId = flagString(parsed, "goal", { required: true });
|
|
5388
|
+
const evidence = flagString(parsed, "evidence", { required: true });
|
|
5389
|
+
const goal = unwrap(await api.client.GET("/tutor/browser/students/{userId}/goals/", {
|
|
5390
|
+
params: { path: { userId: studentId } },
|
|
5391
|
+
})).goals.find((candidate) => candidate.id === goalId);
|
|
5392
|
+
const modules = goal?.osV2?.modules ?? [];
|
|
5393
|
+
const target = modules.find((module) => module.moduleRef.toLocaleLowerCase() === moduleRef.toLocaleLowerCase());
|
|
5394
|
+
if (!target) {
|
|
5395
|
+
throw new CliError("not_found", `Module ${moduleRef} was not found on goal ${goalId}. Known refs: ${modules.map((m) => m.moduleRef).join(", ") || "none"}.`);
|
|
5396
|
+
}
|
|
5397
|
+
if (target.completedAt !== null) {
|
|
5398
|
+
throw new CliError("already_completed", `Module ${target.moduleRef} ("${target.title}") is already complete.`);
|
|
5399
|
+
}
|
|
5400
|
+
const preview = {
|
|
5401
|
+
action: "mark a lesson done in this kid's curriculum",
|
|
5402
|
+
target: {
|
|
5403
|
+
studentUserId: studentId,
|
|
5404
|
+
goalId,
|
|
5405
|
+
goalTitle: goal?.title ?? null,
|
|
5406
|
+
moduleRef: target.moduleRef,
|
|
5407
|
+
title: target.title,
|
|
5408
|
+
},
|
|
5409
|
+
request: { moduleId: target.id, evidence },
|
|
5410
|
+
details: {
|
|
5411
|
+
...resolvedStudentDetails(student),
|
|
5412
|
+
note: "The kid's next todo for this goal moves on to the following lesson. Use it when the kid already did this lesson but it was never marked done.",
|
|
5413
|
+
},
|
|
5414
|
+
};
|
|
5415
|
+
return previewBoundWrite(parsed, preview, async () => unwrap(await api.client.POST("/tutor/students/{studentId}/goals/{goalId}/modules/{moduleId}/complete", {
|
|
5416
|
+
params: { path: { studentId, goalId, moduleId: target.id } },
|
|
5417
|
+
body: { evidence },
|
|
5418
|
+
})));
|
|
5419
|
+
}
|
|
5366
5420
|
// A module added to a live goal otherwise waits for the next daily run:
|
|
5367
5421
|
// that run reuses any launch todo already dated today for the goal.
|
|
5368
5422
|
if (verb === "launch-todo") {
|
|
@@ -5757,7 +5811,7 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
5757
5811
|
}
|
|
5758
5812
|
throw new CliError("invalid_arguments", "Use goals queue get|set.");
|
|
5759
5813
|
}
|
|
5760
|
-
throw new CliError("invalid_arguments", "Use goals list|create|edit|delete|restore|archive|unarchive|complete|undo-completion|move-module|launch-todo|queue|files|pdf|video.");
|
|
5814
|
+
throw new CliError("invalid_arguments", "Use goals list|create|edit|delete|restore|archive|unarchive|complete|undo-completion|move-module|complete-module|launch-todo|queue|files|pdf|video.");
|
|
5761
5815
|
}
|
|
5762
5816
|
if (noun === "channels") {
|
|
5763
5817
|
return runChannelsCommand({ parsed, api, writeCommand });
|
|
@@ -5909,7 +5963,34 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
5909
5963
|
request: {},
|
|
5910
5964
|
}, async () => unwrap(await api.client.POST("/admin/browser/students/{userId}/issued-email/", { params: { path: { userId: studentId } } })));
|
|
5911
5965
|
}
|
|
5912
|
-
|
|
5966
|
+
if (verb === "web-todos") {
|
|
5967
|
+
const studentId = flagString(parsed, "student", { required: true });
|
|
5968
|
+
const on = hasFlag(parsed, "on");
|
|
5969
|
+
const off = hasFlag(parsed, "off");
|
|
5970
|
+
if (on && off) {
|
|
5971
|
+
throw new CliError("invalid_arguments", "Pass --on or --off, not both.");
|
|
5972
|
+
}
|
|
5973
|
+
if (!on && !off) {
|
|
5974
|
+
const profile = unwrap(await api.client.GET("/tutor/students/{studentId}/profile", {
|
|
5975
|
+
params: { path: { studentId } },
|
|
5976
|
+
}));
|
|
5977
|
+
return { studentId, webTodosEnabled: profile.webTodosEnabled };
|
|
5978
|
+
}
|
|
5979
|
+
return writeCommand(parsed, {
|
|
5980
|
+
action: on
|
|
5981
|
+
? "let a kid's todos run on web"
|
|
5982
|
+
: "send a kid's web todos to the desktop app instead",
|
|
5983
|
+
target: { studentUserId: studentId },
|
|
5984
|
+
request: { webTodosEnabled: on },
|
|
5985
|
+
}, async () => {
|
|
5986
|
+
unwrap(await api.client.PATCH("/tutor/students/{studentId}/profile", {
|
|
5987
|
+
params: { path: { studentId } },
|
|
5988
|
+
body: { webTodosEnabled: on },
|
|
5989
|
+
}));
|
|
5990
|
+
return { studentId, webTodosEnabled: on };
|
|
5991
|
+
});
|
|
5992
|
+
}
|
|
5993
|
+
throw new CliError("invalid_arguments", "Use students list|today|schedule|todos|analysis|xp-history|upload-map-scores|issue-email|web-todos.");
|
|
5913
5994
|
}
|
|
5914
5995
|
if (noun === "todos") {
|
|
5915
5996
|
if (verb === "create") {
|
package/dist/command-schema.js
CHANGED
|
@@ -130,6 +130,7 @@ const FAMILY_AI_COMMANDS = new Set([
|
|
|
130
130
|
"goals adaptations diff",
|
|
131
131
|
"goals adaptations list",
|
|
132
132
|
"goals archive",
|
|
133
|
+
"goals complete-module",
|
|
133
134
|
"goals create",
|
|
134
135
|
"goals edit",
|
|
135
136
|
"goals files checkout",
|
|
@@ -264,6 +265,7 @@ const STAFF_COMMANDS = new Set([
|
|
|
264
265
|
"store-items list",
|
|
265
266
|
"students upload-map-scores",
|
|
266
267
|
"students issue-email",
|
|
268
|
+
"students web-todos",
|
|
267
269
|
"students notes add",
|
|
268
270
|
"students todos",
|
|
269
271
|
"students analysis",
|
|
@@ -242,8 +242,18 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
|
|
|
242
242
|
...(grade ? { grade } : {}),
|
|
243
243
|
};
|
|
244
244
|
});
|
|
245
|
+
// An existing kid account (a family from an older invite flow): the
|
|
246
|
+
// packet enrolls it instead of creating a duplicate. "USER_ID[:grade]".
|
|
247
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
248
|
+
for (const raw of flagList(parsed, "existing-kid")) {
|
|
249
|
+
const [userId, grade] = raw.split(":").map((v) => v.trim());
|
|
250
|
+
if (!userId || !UUID.test(userId)) {
|
|
251
|
+
throw new CliError("invalid_arguments", `--existing-kid takes "USER_ID[:grade]", got "${raw}".`);
|
|
252
|
+
}
|
|
253
|
+
kids.push({ userId, ...(grade ? { grade } : {}) });
|
|
254
|
+
}
|
|
245
255
|
if (!kids.length) {
|
|
246
|
-
throw new CliError("invalid_arguments", 'At least one --kid "First Last:YYYY-MM-DD[:grade]" is required.');
|
|
256
|
+
throw new CliError("invalid_arguments", 'At least one --kid "First Last:YYYY-MM-DD[:grade]" or --existing-kid USER_ID is required.');
|
|
247
257
|
}
|
|
248
258
|
const enrollmentChoice = assertChoice(flagString(parsed, "enrollment", { required: true }), ["direct", "partner-school", "program"], "--enrollment");
|
|
249
259
|
const enrollment = enrollmentChoice === "partner-school"
|
package/dist/commands/reports.js
CHANGED
|
@@ -4,15 +4,50 @@ import { unwrap } from "../api.js";
|
|
|
4
4
|
import { flagString, hasFlag } from "../args.js";
|
|
5
5
|
import { CliError } from "../errors.js";
|
|
6
6
|
const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
7
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8
|
+
/**
|
|
9
|
+
* Student data: write to a fresh 0600 temp file, then rename it over the
|
|
10
|
+
* destination. A plain writeFile keeps an existing file's looser mode and would
|
|
11
|
+
* follow a symlink planted at the destination.
|
|
12
|
+
*/
|
|
13
|
+
async function writePrivateFile(dir, name, data) {
|
|
14
|
+
const file = path.join(dir, name);
|
|
15
|
+
const tmp = path.join(dir, `.${name}.${process.pid}.${Date.now()}.tmp`);
|
|
16
|
+
try {
|
|
17
|
+
await fs.writeFile(tmp, data, { mode: 0o600, flag: "wx" });
|
|
18
|
+
await fs.rename(tmp, file);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
// Remove our (possibly partial) temp file; EEXIST means it isn't ours.
|
|
22
|
+
if (error.code !== "EEXIST") {
|
|
23
|
+
await fs.rm(tmp, { force: true });
|
|
24
|
+
}
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
return file;
|
|
28
|
+
}
|
|
29
|
+
function weekFlag(parsed) {
|
|
30
|
+
const weekStart = flagString(parsed, "week")?.trim();
|
|
31
|
+
if (weekStart && !ISO_DATE.test(weekStart)) {
|
|
32
|
+
throw new CliError("invalid_arguments", "--week must be the Monday of the week, as YYYY-MM-DD.");
|
|
33
|
+
}
|
|
34
|
+
return weekStart;
|
|
35
|
+
}
|
|
7
36
|
/**
|
|
8
37
|
* `recess reports activity` — the weekly student activity report, generated on
|
|
9
38
|
* the server (GET /admin/activity-reports/) and written to a local folder: the
|
|
10
39
|
* summary PDF, the CSV bundle, and the per-student summaries JSON.
|
|
40
|
+
*
|
|
41
|
+
* `recess reports parent-recap` — one kid's weekly parent recap email: preview
|
|
42
|
+
* (HTML, text, and the editable summary JSON) and `send` of the reviewed copy.
|
|
11
43
|
*/
|
|
12
|
-
export async function runReportsCommand(
|
|
44
|
+
export async function runReportsCommand(context) {
|
|
45
|
+
const { parsed, api } = context;
|
|
13
46
|
const verb = parsed.positionals[1];
|
|
47
|
+
if (verb === "parent-recap")
|
|
48
|
+
return runParentRecap(context);
|
|
14
49
|
if (verb !== "activity") {
|
|
15
|
-
throw new CliError("invalid_arguments", "Usage: recess reports activity --partner-school <slug|id> | --guide <name|email|id> | --cohort <cohort-id>. See `recess help`.");
|
|
50
|
+
throw new CliError("invalid_arguments", "Usage: recess reports activity --partner-school <slug|id> | --guide <name|email|id> | --cohort <cohort-id>, or recess reports parent-recap --student <id>. See `recess help`.");
|
|
16
51
|
}
|
|
17
52
|
const partnerSchool = flagString(parsed, "partner-school")?.trim();
|
|
18
53
|
const guide = flagString(parsed, "guide")?.trim();
|
|
@@ -20,10 +55,7 @@ export async function runReportsCommand({ parsed, api, }) {
|
|
|
20
55
|
if ([partnerSchool, guide, cohortId].filter(Boolean).length !== 1) {
|
|
21
56
|
throw new CliError("invalid_arguments", "Pass exactly one of --partner-school, --guide, or --cohort.");
|
|
22
57
|
}
|
|
23
|
-
const weekStart =
|
|
24
|
-
if (weekStart && !ISO_DATE.test(weekStart)) {
|
|
25
|
-
throw new CliError("invalid_arguments", "--week must be the Monday of the week, as YYYY-MM-DD.");
|
|
26
|
-
}
|
|
58
|
+
const weekStart = weekFlag(parsed);
|
|
27
59
|
const query = {
|
|
28
60
|
...(partnerSchool ? { partnerSchool } : {}),
|
|
29
61
|
...(guide ? { guide } : {}),
|
|
@@ -36,24 +68,8 @@ export async function runReportsCommand({ parsed, api, }) {
|
|
|
36
68
|
const dir = path.resolve(flagString(parsed, "out") ?? stem);
|
|
37
69
|
await fs.mkdir(dir, { recursive: true });
|
|
38
70
|
const files = [];
|
|
39
|
-
// Student data: write each file to a fresh 0600 temp file, then rename it
|
|
40
|
-
// over the destination. A plain writeFile keeps an existing file's looser
|
|
41
|
-
// mode and would follow a symlink planted at the destination.
|
|
42
71
|
const write = async (name, data) => {
|
|
43
|
-
|
|
44
|
-
const tmp = path.join(dir, `.${name}.${process.pid}.${Date.now()}.tmp`);
|
|
45
|
-
try {
|
|
46
|
-
await fs.writeFile(tmp, data, { mode: 0o600, flag: "wx" });
|
|
47
|
-
await fs.rename(tmp, file);
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
// Remove our (possibly partial) temp file; EEXIST means it isn't ours.
|
|
51
|
-
if (error.code !== "EEXIST") {
|
|
52
|
-
await fs.rm(tmp, { force: true });
|
|
53
|
-
}
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
files.push(file);
|
|
72
|
+
files.push(await writePrivateFile(dir, name, data));
|
|
57
73
|
};
|
|
58
74
|
await write(`${stem}_summary.pdf`, Buffer.from(report.pdfBase64, "base64"));
|
|
59
75
|
for (const [name, text] of Object.entries(report.csv))
|
|
@@ -81,4 +97,92 @@ export async function runReportsCommand({ parsed, api, }) {
|
|
|
81
97
|
].join("\n"),
|
|
82
98
|
};
|
|
83
99
|
}
|
|
100
|
+
async function runParentRecap({ parsed, api, writeCommand, }) {
|
|
101
|
+
const studentId = flagString(parsed, "student")?.trim();
|
|
102
|
+
if (!studentId || !UUID.test(studentId)) {
|
|
103
|
+
throw new CliError("invalid_arguments", "--student <student-id> is required.");
|
|
104
|
+
}
|
|
105
|
+
const weekStart = weekFlag(parsed);
|
|
106
|
+
const json = hasFlag(parsed, "json");
|
|
107
|
+
if (parsed.positionals[2] === "publish") {
|
|
108
|
+
if (!weekStart) {
|
|
109
|
+
throw new CliError("invalid_arguments", "Usage: recess reports parent-recap publish --student <id> --week YYYY-MM-DD [--no-text] [--to <phone>] [--confirm].");
|
|
110
|
+
}
|
|
111
|
+
const testTo = flagString(parsed, "to")?.trim();
|
|
112
|
+
const text = !hasFlag(parsed, "no-text");
|
|
113
|
+
const body = { studentId, weekStart, text, ...(testTo ? { testTo } : {}) };
|
|
114
|
+
return writeCommand(parsed, {
|
|
115
|
+
action: testTo
|
|
116
|
+
? `text a [Test] link to the ${weekStart} recap to ${testTo} (publishes nothing)`
|
|
117
|
+
: `publish the ${weekStart} recap to the family's dashboard${text ? " and text guardians the link" : ""}`,
|
|
118
|
+
target: { studentId, weekStart, ...(testTo ? { testTo } : {}) },
|
|
119
|
+
request: body,
|
|
120
|
+
}, async () => {
|
|
121
|
+
const result = unwrap(await api.client.POST("/admin/parent-recaps/publish", { body }));
|
|
122
|
+
if (json)
|
|
123
|
+
return result;
|
|
124
|
+
return {
|
|
125
|
+
help: [
|
|
126
|
+
testTo
|
|
127
|
+
? `Test link: ${result.recap.url}`
|
|
128
|
+
: `Published: ${result.recap.url}`,
|
|
129
|
+
result.textedCount
|
|
130
|
+
? `Texted ${result.textedCount} ${result.textedCount === 1 ? "person" : "people"}.`
|
|
131
|
+
: `No texts sent: ${result.skippedReason ?? "unknown reason"}`,
|
|
132
|
+
].join("\n"),
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
let summary;
|
|
137
|
+
const summaryPath = flagString(parsed, "summary")?.trim();
|
|
138
|
+
if (summaryPath) {
|
|
139
|
+
try {
|
|
140
|
+
summary = JSON.parse(await fs.readFile(path.resolve(summaryPath), "utf8"));
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
throw new CliError("invalid_arguments", `Could not read --summary ${summaryPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const body = {
|
|
147
|
+
studentId,
|
|
148
|
+
...(weekStart ? { weekStart } : {}),
|
|
149
|
+
ai: !hasFlag(parsed, "no-ai"),
|
|
150
|
+
...(summary ? { summary } : {}),
|
|
151
|
+
};
|
|
152
|
+
// A draft is staff-only on the dashboard: nothing reaches the family until
|
|
153
|
+
// `publish`, so drafting skips the confirm round trip.
|
|
154
|
+
const recap = await writeCommand(parsed, {
|
|
155
|
+
action: `draft the ${weekStart ?? "last full week's"} parent recap (staff-only until published)`,
|
|
156
|
+
target: { studentId, ...(weekStart ? { weekStart } : {}) },
|
|
157
|
+
request: { ...body, summary: summaryPath ?? null },
|
|
158
|
+
}, async () => unwrap(await api.client.POST("/admin/parent-recaps/", { body })), { ungated: true });
|
|
159
|
+
const files = [];
|
|
160
|
+
if (recap.summary) {
|
|
161
|
+
const dir = path.resolve(flagString(parsed, "out") ?? ".");
|
|
162
|
+
await fs.mkdir(dir, { recursive: true });
|
|
163
|
+
const name = `parent-recap_${recap.data.firstName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}-${studentId.slice(0, 8)}_${recap.weekStart}_summary.json`;
|
|
164
|
+
files.push(await writePrivateFile(dir, name, `${JSON.stringify(recap.summary, null, 2)}\n`));
|
|
165
|
+
}
|
|
166
|
+
if (json)
|
|
167
|
+
return { ...recap, files };
|
|
168
|
+
return {
|
|
169
|
+
help: [
|
|
170
|
+
`${recap.data.firstName}'s recap for ${recap.weekStart} to ${recap.data.weekEnd} (draft, staff-only)`,
|
|
171
|
+
`Review: ${recap.url}`,
|
|
172
|
+
...(recap.data.emptyWeek
|
|
173
|
+
? ["Nothing was recorded this week; don't publish this one."]
|
|
174
|
+
: []),
|
|
175
|
+
...(files[0]
|
|
176
|
+
? [
|
|
177
|
+
`Copy: ${files[0]}`,
|
|
178
|
+
"",
|
|
179
|
+
"To change the copy, edit that file and redraft with it:",
|
|
180
|
+
` recess reports parent-recap --student ${studentId} --week ${recap.weekStart} --summary ${files[0]}`,
|
|
181
|
+
"Then publish (shows it on the family dashboard and texts the link):",
|
|
182
|
+
` recess reports parent-recap publish --student ${studentId} --week ${recap.weekStart} [--to +1555...] --confirm`,
|
|
183
|
+
]
|
|
184
|
+
: []),
|
|
185
|
+
].join("\n"),
|
|
186
|
+
};
|
|
187
|
+
}
|
|
84
188
|
//# sourceMappingURL=reports.js.map
|
package/dist/help.js
CHANGED
|
@@ -79,6 +79,7 @@ Usage:
|
|
|
79
79
|
recess [--json] students upload-map-scores --student <kid-id>
|
|
80
80
|
--file </path/to/map-report.pdf> [--confirm]
|
|
81
81
|
recess [--json] students issue-email --student <kid-id> [--confirm]
|
|
82
|
+
recess [--json] students web-todos --student <kid-id> [--on|--off] [--confirm]
|
|
82
83
|
recess [--json] students notes add --student <kid-id> --text TEXT [--confirm]
|
|
83
84
|
recess [--json] chat-logs list --student <user-id> [--limit 100] [--cursor <cursor>]
|
|
84
85
|
recess [--json] chat-logs get <conversation-id>
|
|
@@ -204,7 +205,8 @@ Usage:
|
|
|
204
205
|
recess [--json] tuition-plans states
|
|
205
206
|
recess [--json] admissions create --school <institution-slug> --enrollment direct|partner-school|program
|
|
206
207
|
[--partner-school <slug|id>] --parent "First Last" --email EMAIL [--phone TEXT] --state XX
|
|
207
|
-
--kid "First Last:YYYY-MM-DD[:grade]" (repeat per child) [--
|
|
208
|
+
--kid "First Last:YYYY-MM-DD[:grade]" (repeat per child) [--existing-kid USER_ID[:grade]]...
|
|
209
|
+
[--application <application-id>]
|
|
208
210
|
[--financial-aid <financial-aid-application-id>|none]
|
|
209
211
|
[--tier complete] [--paywall DOLLARS|--paywall-offline] [--staff-note TEXT]... [--no-email]
|
|
210
212
|
(--no-agreement | --start YYYY-MM-DD --annual DOLLARS) [--state-funding] [--end YYYY-MM-DD]
|
|
@@ -226,6 +228,8 @@ Usage:
|
|
|
226
228
|
recess [--json] admissions upload-signed <packet-id> --file <pdf> [--option <term:payment>] [--note TEXT] [--confirm]
|
|
227
229
|
recess [--json] reports activity [--partner-school <slug|id>] [--guide <name|email|id>]
|
|
228
230
|
[--cohort <cohort-id>] [--week YYYY-MM-DD] [--no-ai] [--out <dir>]
|
|
231
|
+
recess [--json] reports parent-recap --student <student-id> [--week YYYY-MM-DD] [--no-ai] [--summary <file.json>] [--out <dir>]
|
|
232
|
+
recess [--json] reports parent-recap publish --student <student-id> --week YYYY-MM-DD [--no-text] [--to <phone>] [--confirm]
|
|
229
233
|
recess [--json] cohorts get <cohort-id> [--events-tab ACTIVE|ENDED|CANCELED|ARCHIVED]
|
|
230
234
|
recess [--json] cohorts schedule get <cohort-id>
|
|
231
235
|
recess [--json] cohorts schedule set <cohort-id> --days <MO,WE> --time <09:30> [--timezone <zone>] --effective-date <YYYY-MM-DD> --notify none|parents [--confirm] [--approval-token <token>]
|
|
@@ -499,6 +503,8 @@ Usage:
|
|
|
499
503
|
[--confirm --approval-token TOKEN]
|
|
500
504
|
recess [--json] goals move-module <module-ref> --student <kid-id> --goal <goal-id>
|
|
501
505
|
(--to-end | --position <n>) [--confirm --approval-token TOKEN]
|
|
506
|
+
recess [--json] goals complete-module <module-ref> --student <kid-id> --goal <goal-id>
|
|
507
|
+
--evidence <text> [--confirm --approval-token TOKEN]
|
|
502
508
|
recess [--json] goals launch-todo <goal-id> --student <kid-id> [--module <module-ref>]
|
|
503
509
|
[--due-date YYYY-MM-DD] [--confirm --approval-token TOKEN]
|
|
504
510
|
recess [--json] goals queue get <goal-id> --student <kid-id>
|
|
@@ -658,7 +664,9 @@ every member of the target's family; ADMIN/MODERATOR members, your own account,
|
|
|
658
664
|
and anyone already in the destination role are listed under preview.skipped
|
|
659
665
|
rather than silently dropped. A target holding an ACTIVE or PAST_DUE enrollment
|
|
660
666
|
is refused until billing is cancelled or "--allow-billing" deliberately orphans
|
|
661
|
-
the seat.
|
|
667
|
+
the seat. An active school student (a kid in a SCHOOL family, not withdrawn)
|
|
668
|
+
is refused outright: withdraw them with "users school withdraw", which also
|
|
669
|
+
disables the account. Restore names the role explicitly because DISABLED does not record
|
|
662
670
|
what the account was; ADMIN and MODERATOR are not restorable from the CLI.
|
|
663
671
|
Note that after a disable "users get" and "users search" no longer resolve the
|
|
664
672
|
account — the confirmed write's own response is the record of what changed.
|
|
@@ -727,6 +735,15 @@ the CSVs, and the per-student AI summaries JSON to --out (default
|
|
|
727
735
|
10-30 seconds; AI summaries name the student and quote their work, so review
|
|
728
736
|
them before sending a report outside Recess.
|
|
729
737
|
|
|
738
|
+
Parent-recap notes: "reports parent-recap" drafts one student's weekly recap on
|
|
739
|
+
their dashboard (/ai/students/<id>/recaps/<week>): XP trend, plan completion,
|
|
740
|
+
subject mix, elective attendance, and parent-voice wins, challenges, and guide-
|
|
741
|
+
note summary. Drafts are staff-only; it prints the review link and writes the
|
|
742
|
+
editable _summary.json (--out, default the current folder). Redraft with
|
|
743
|
+
--summary to replace the copy; a published recap can't be redrafted. "publish"
|
|
744
|
+
shows it to the family and texts guardians the link (--no-text skips the text;
|
|
745
|
+
--to texts one [Test] link to that number and publishes nothing).
|
|
746
|
+
|
|
730
747
|
Custom plans (--custom-plan, generate/create/requote): for an arrangement the
|
|
731
748
|
computed options cannot express, e.g. a bridge payment until ESA funding
|
|
732
749
|
starts. JSON inline or @file: {"label", "summary"?, "clause"?, "continueFrom"?,
|
|
@@ -795,9 +812,15 @@ family (--parent, --email, --state, one --kid per child), how they enroll
|
|
|
795
812
|
same flags "tuition-plans generate" takes (--annual, --start, --state-funding,
|
|
796
813
|
--esa-award-unknown, ...; --note prints on the plan, --staff-note stays on the
|
|
797
814
|
packet). The plan is built once on create, so a bad spec fails there. --paywall
|
|
798
|
-
DOLLARS adds a card step at the end for that family share
|
|
799
|
-
|
|
800
|
-
|
|
815
|
+
DOLLARS adds a card step at the end for that family share, and the plan shows it
|
|
816
|
+
as a deposit: its first row, credited against the first invoices (split across
|
|
817
|
+
children like the charge); leave it off for partner-school and ESA-funded
|
|
818
|
+
families (the CLI warns). --no-email returns the
|
|
819
|
+
link without sending it. --existing-kid
|
|
820
|
+
enrolls a kid who already has an account (a family from an older invite flow)
|
|
821
|
+
instead of creating one: the kid must be in the family of the guardian who owns
|
|
822
|
+
--email, the parent signs in with that account to start, and the kid's account,
|
|
823
|
+
tier and history are left as they are. The envelope opens with the family's financial aid answers
|
|
801
824
|
for them to initial as true; they come from --financial-aid, else the application's
|
|
802
825
|
aid form, else the newest aid form under the parent's email ("none" leaves it out). "resend" mints a new link (the old one dies) and emails
|
|
803
826
|
it. "get" prints the agreed plan as signed (each child's option, term and every
|
|
@@ -933,6 +956,7 @@ export const COMMAND_SUMMARIES = {
|
|
|
933
956
|
"students texts set-guardian": "Change one adult's SMS frequency, focus, or on/off.",
|
|
934
957
|
"students upload-map-scores": "Upload a NWEA MAP score report PDF for a kid.",
|
|
935
958
|
"students issue-email": "Issue a Recess email address for a kid.",
|
|
959
|
+
"students web-todos": "Show or set whether a kid's todos run on web (off: they open in the desktop app).",
|
|
936
960
|
"students notes add": "Add a staff-visible guide note to a kid's profile (Rocky reads it).",
|
|
937
961
|
"chat-logs list": "List a student's AI chat conversations.",
|
|
938
962
|
"chat-logs get": "Read one AI chat conversation.",
|
|
@@ -1187,6 +1211,7 @@ export const COMMAND_SUMMARIES = {
|
|
|
1187
1211
|
"goals archive": "Archive a goal.",
|
|
1188
1212
|
"goals unarchive": "Unarchive a goal.",
|
|
1189
1213
|
"goals move-module": "Reorder a module in a goal's queue.",
|
|
1214
|
+
"goals complete-module": "Mark a module done so the goal moves on.",
|
|
1190
1215
|
"goals launch-todo": "Create a goal module's todo now.",
|
|
1191
1216
|
"goals queue get": "Read a goal's module queue.",
|
|
1192
1217
|
"goals queue set": "Replace a goal's module queue from JSON.",
|