recess-cli 3.52.0 → 3.53.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.
@@ -54,6 +54,7 @@ export const FAMILY_REMOTE_READS = [
54
54
  "kid logins",
55
55
  "kid map-scores",
56
56
  "kid evidence",
57
+ "kid rooms",
57
58
  "kid screenshots",
58
59
  "kid send-screenshot",
59
60
  "kid moments",
@@ -313,6 +314,7 @@ const FAMILY_COMMANDS = new Set([
313
314
  "kid logins",
314
315
  "kid map-scores",
315
316
  "kid evidence",
317
+ "kid rooms",
316
318
  "kid screenshots",
317
319
  "kid send-screenshot",
318
320
  "kid moments",
@@ -865,13 +865,19 @@ export async function runFamilyCommand({ parsed, api, writeCommand, }) {
865
865
  const kid = hasFlag(parsed, "student")
866
866
  ? await resolveFamilyKid(api, parsed)
867
867
  : kids[0];
868
- const body = { text, ...(ask ? { ask } : {}), studentId: kid.id };
868
+ const eventId = flagUuid(parsed, "event");
869
+ const body = {
870
+ text,
871
+ ...(ask ? { ask } : {}),
872
+ studentId: kid.id,
873
+ ...(eventId ? { eventId } : {}),
874
+ };
869
875
  return writeCommand(parsed, {
870
- action: `message ${kidName(kid)}'s guide: "${text.slice(0, 120)}"`,
876
+ action: `message ${eventId ? `the teacher of ${kidName(kid)}'s class` : `${kidName(kid)}'s guide`}: "${text.slice(0, 120)}"`,
871
877
  target: { family: "@me", ...kidTarget(kid) },
872
878
  request: body,
873
879
  details: {
874
- consequence: "The guide gets a support ticket, plus a message on Slack and in your chat with them in the Recess app, and answers there. It can't be unsent.",
880
+ consequence: `${eventId ? "The class's teacher" : "The guide"} gets a support ticket, plus a message on Slack and in your chat with them in the Recess app, and answers there. It can't be unsent.`,
875
881
  },
876
882
  }, async () => unwrap(await api.client.POST("/parent-v2/message-guide/", { body })));
877
883
  }
@@ -1878,6 +1884,35 @@ export async function runKidCommand({ parsed, api, writeCommand, }) {
1878
1884
  },
1879
1885
  }));
1880
1886
  }
1887
+ if (verb === "rooms") {
1888
+ const sessionId = flagUuid(parsed, "session");
1889
+ const search = flagString(parsed, "search")?.trim();
1890
+ if (!sessionId) {
1891
+ if (hasFlag(parsed, "ask") || hasFlag(parsed, "page"))
1892
+ throw new CliError("invalid_arguments", "--ask and --page read one room: pass --session (ids from kid rooms).");
1893
+ const days = flagInteger(parsed, "days", { min: 1, max: 60 });
1894
+ return unwrap(await api.client.GET("/parent-v2/kid/{kidId}/rooms/", {
1895
+ params: {
1896
+ path: { kidId },
1897
+ query: { ...(days ? { days } : {}), ...(search ? { search } : {}) },
1898
+ },
1899
+ }));
1900
+ }
1901
+ const ask = flagString(parsed, "ask")?.trim();
1902
+ if (ask && search)
1903
+ throw new CliError("invalid_arguments", "Pass --ask or --search, not both.");
1904
+ const page = flagInteger(parsed, "page", { min: 1, max: 500 });
1905
+ return unwrap(await api.client.GET("/parent-v2/kid/{kidId}/rooms/{sessionId}/", {
1906
+ params: {
1907
+ path: { kidId, sessionId },
1908
+ query: {
1909
+ ...(page ? { page } : {}),
1910
+ ...(search ? { search } : {}),
1911
+ ...(ask ? { ask } : {}),
1912
+ },
1913
+ },
1914
+ }));
1915
+ }
1881
1916
  if (verb === "screenshots") {
1882
1917
  const todoId = flagUuid(parsed, "todo", { required: true });
1883
1918
  const frames = flagString(parsed, "frames")?.trim();
package/dist/help.js CHANGED
@@ -246,7 +246,8 @@ Usage:
246
246
  recess [--json] family memory rewrite --in family|me --text TEXT [--confirm]
247
247
  recess [--json] family memory forget --in journal|family|me --line TEXT
248
248
  [--date YYYY-MM-DD] [--confirm]
249
- recess [--json] family message-guide --text TEXT [--ask TEXT] [--student <kid>] [--confirm]
249
+ recess [--json] family message-guide --text TEXT [--ask TEXT] [--student <kid>] [--event <event-id>]
250
+ [--confirm]
250
251
  recess [--json] family report-bug --text TEXT [--summary TEXT] [--kind bug|request] [--student <kid>]
251
252
  [--todo <todo-id>] [--confirm]
252
253
  recess [--json] kid today --student <kid> [--date YYYY-MM-DD]
@@ -303,6 +304,8 @@ Usage:
303
304
  [--confirm]
304
305
  recess [--json] kid set-goal-coins --student <kid> --goal <goal-id> --value 0-20|default [--confirm]
305
306
  recess [--json] kid evidence --student <kid> --todo <todo-id> [--search TEXT]
307
+ recess [--json] kid rooms --student <kid> [--days 1-60] [--session <session-id>] [--page N]
308
+ [--search TEXT] [--ask TEXT]
306
309
  recess [--json] kid screenshots --student <kid> --todo <todo-id> [--frames 269,280]
307
310
  recess [--json] kid send-screenshot --student <kid> --todo <todo-id> --frames 269,280
308
311
  [--caption TEXT] [--confirm]
@@ -1435,7 +1438,7 @@ export const COMMAND_SUMMARIES = {
1435
1438
  "family memory save": "Save one line to Rocky's family notes, with your name (at once).",
1436
1439
  "family memory rewrite": "Replace family.md or your own notes whole, tidied (at once).",
1437
1440
  "family memory forget": "Forget one exact line of the family notes (at once).",
1438
- "family message-guide": "Message your kid's guide (a support ticket; Rocky tells them in the app and on Slack); the person for anything. --text is the full note, kept on the ticket; --ask is what the guide is sent: who asked, what they want and the one fact the guide needs, in a line or two (200 characters). Always pass --ask.",
1441
+ "family message-guide": "Message your kid's guide (a support ticket; Rocky tells them in the app and on Slack); the person for anything. --text is the full note, kept on the ticket; --ask is what the guide is sent: who asked, what they want and the one fact the guide needs, in a line or two (200 characters). Always pass --ask. --event (a class session, from kid schedule, attendance or rooms) sends it to that class's teachers instead of the kid's guide: for a question about one class.",
1439
1442
  "family report-bug": "Report a bug, or a request (--kind request: something missing, or what you think of Rocky), to the Recess team (at once; not a change).",
1440
1443
  "family remind": "Have Rocky text you a reminder (applies at once).",
1441
1444
  "family reminders": "Your upcoming text-me reminders.",
@@ -1492,6 +1495,7 @@ export const COMMAND_SUMMARIES = {
1492
1495
  "kid set-challenge-order": "Set the order a kid's challenges run in; their to-dos follow it (at once).",
1493
1496
  "kid set-goal-coins": "Coins each of one challenge's to-dos pays, 0-20 or default, fixed (at once; tutors too).",
1494
1497
  "kid evidence": "What one to-do's session record shows: analysis, stretches, frame numbers.",
1498
+ "kid rooms": "The live rooms and classes a kid was in, and what was said: --session reads one's transcript a page at a time, --search the lines around a word, --ask an answer from the whole class.",
1495
1499
  "kid screenshots": "Links to up to five session screenshots of one to-do.",
1496
1500
  "kid send-screenshot": "Show a parent session screenshots: pictures on a Rocky text, links elsewhere.",
1497
1501
  "kid create-challenge": "A private fixed challenge: the same to-do on set days, optionally limited (at once; accounts that can create challenges).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recess-cli",
3
- "version": "3.52.0",
3
+ "version": "3.53.0",
4
4
  "description": "Safe Recess administration and family AI tools from the command line.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {