recess-cli 3.24.0 → 3.25.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/cli.js CHANGED
@@ -1677,6 +1677,9 @@ function parseGoalTemplateDocument(doc) {
1677
1677
  ...(rawCoinAmount === undefined || rawCoinAmount === null
1678
1678
  ? {}
1679
1679
  : { coinAmount: rawCoinAmount }),
1680
+ ...(optionalDocString(doc, "chatTitle") === undefined
1681
+ ? {}
1682
+ : { chatTitle: optionalDocString(doc, "chatTitle") }),
1680
1683
  ...(optionalDocString(doc, "category") === undefined
1681
1684
  ? {}
1682
1685
  : { category: optionalDocString(doc, "category") }),
@@ -4581,6 +4584,7 @@ export async function executeRecessCommand(argv, options = {}) {
4581
4584
  tags: document.tags,
4582
4585
  isStarter: document.isStarter ?? false,
4583
4586
  coinAmount: document.coinAmount ?? null,
4587
+ chatTitle: document.chatTitle ?? null,
4584
4588
  visibility: "PRIVATE",
4585
4589
  },
4586
4590
  details: {
@@ -4875,6 +4879,8 @@ export async function executeRecessCommand(argv, options = {}) {
4875
4879
  (!Number.isInteger(coinAmount) || coinAmount < 1)) {
4876
4880
  throw new CliError("invalid_arguments", "--coin-amount must be a positive integer.");
4877
4881
  }
4882
+ // "none" clears the title; kids who earned it keep it.
4883
+ const chatTitleRaw = flagString(parsed, "chat-title");
4878
4884
  const visibility = flagString(parsed, "visibility");
4879
4885
  const targetPlatform = flagString(parsed, "target-platform");
4880
4886
  const isStarterRaw = flagString(parsed, "is-starter");
@@ -4897,6 +4903,13 @@ export async function executeRecessCommand(argv, options = {}) {
4897
4903
  ? { imageUrl: flagString(parsed, "image-url") }
4898
4904
  : {}),
4899
4905
  ...(coinAmount === undefined ? {} : { coinAmount }),
4906
+ ...(chatTitleRaw === undefined
4907
+ ? {}
4908
+ : {
4909
+ chatTitle: chatTitleRaw.trim().toLowerCase() === "none"
4910
+ ? null
4911
+ : chatTitleRaw,
4912
+ }),
4900
4913
  ...(flagString(parsed, "category")
4901
4914
  ? { category: flagString(parsed, "category") }
4902
4915
  : {}),
@@ -4944,7 +4957,7 @@ export async function executeRecessCommand(argv, options = {}) {
4944
4957
  // shape that caused the template incident; editing an existing spec goes
4945
4958
  // through the guarded /ai patch path with its destructive-change token.
4946
4959
  if (Object.keys(body).length === 1) {
4947
- throw new CliError("invalid_arguments", "Pass at least one field to change (--title, --description, --emoji, --image-url, --coin-amount, --category, --tags, --sort-order, --is-starter, --setup-audience, --kind, --visibility, --target-platform, --agent-instructions-file, --output-template-file).");
4960
+ throw new CliError("invalid_arguments", "Pass at least one field to change (--title, --description, --emoji, --image-url, --coin-amount, --chat-title, --category, --tags, --sort-order, --is-starter, --setup-audience, --kind, --visibility, --target-platform, --agent-instructions-file, --output-template-file).");
4948
4961
  }
4949
4962
  return writeCommand(parsed, {
4950
4963
  action: "update goal template metadata (never its setupWorkflowSpec)",
@@ -130,6 +130,12 @@ function renderPacket(packet, admissionUrl, questions = []) {
130
130
  if (packet.status === "VOIDED") {
131
131
  out.push(`Voided ${when(packet.voidedAt)}: ${packet.voidReason ?? ""}`);
132
132
  }
133
+ if (packet.status === "COMPLETE") {
134
+ out.push("", "Orientation:");
135
+ for (const kid of packet.kids) {
136
+ out.push(` ${kid.firstName} (kid ${kid.id}): ${kid.orientationRegistered ? "registered in a Beginning cohort" : kid.orientationWeekOf ? `week of ${kid.orientationWeekOf}, not registered yet (waiting for that week's cohort)` : "no week yet: set one with `recess admissions orientation-week`"}`);
137
+ }
138
+ }
133
139
  if (packet.agreedPlan?.length) {
134
140
  out.push("", "Agreed plan (as signed):");
135
141
  for (const kid of packet.agreedPlan) {
@@ -571,6 +577,25 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
571
577
  return json ? result : { help: await render(result.packet) };
572
578
  });
573
579
  }
580
+ if (verb === "orientation-week") {
581
+ const packetId = positional(parsed, 2, "packet ID");
582
+ const kidId = flagString(parsed, "kid")?.trim();
583
+ const weekOf = flagString(parsed, "week")?.trim();
584
+ if (!kidId || !weekOf || !ISO_DATE.test(weekOf)) {
585
+ throw new CliError("invalid_arguments", "Use --kid <packet-kid-id> --week YYYY-MM-DD (the week's Monday). `recess admissions get` lists the kid ids.");
586
+ }
587
+ return writeCommand(parsed, {
588
+ action: `set the orientation week of ${weekOf} for kid ${kidId} on admission packet ${packetId}: they are registered in that week's Beginning cohort when it exists, and Eliana's email goes out the Thursday before`,
589
+ target: { packetId },
590
+ request: { kidId, weekOf },
591
+ }, async () => {
592
+ const result = unwrap(await api.client.POST("/admin/admissions/{packetId}/orientation-week", {
593
+ params: { path: { packetId } },
594
+ body: { kidId, weekOf },
595
+ }));
596
+ return json ? result : { help: await render(result.packet) };
597
+ });
598
+ }
574
599
  if (verb === "set-paywall") {
575
600
  const packetId = positional(parsed, 2, "packet ID");
576
601
  const paywallRaw = flagString(parsed, "paywall")?.replace(/[$,]/g, "");
@@ -657,6 +682,6 @@ export async function runAdmissionsCommand({ parsed, api, writeCommand, }) {
657
682
  };
658
683
  });
659
684
  }
660
- throw new CliError("invalid_arguments", "Usage: recess admissions create|get|list|resend|void|mark-signed|upload-signed|contract|mark-paid|set-paywall|requote|archive-agreement. See `recess help`.");
685
+ throw new CliError("invalid_arguments", "Usage: recess admissions create|get|list|resend|void|mark-signed|upload-signed|contract|mark-paid|set-paywall|orientation-week|requote|archive-agreement. See `recess help`.");
661
686
  }
662
687
  //# sourceMappingURL=admissions.js.map
package/dist/help.js CHANGED
@@ -293,6 +293,7 @@ Usage:
293
293
  recess [--json] admissions attach-aid <packet-id> --financial-aid <financial-aid-application-id>|none [--confirm]
294
294
  recess [--json] admissions mark-paid <packet-id> [--note TEXT] [--confirm]
295
295
  recess [--json] admissions set-paywall <packet-id> (--paywall DOLLARS | --paywall-offline | --no-paywall) [--note TEXT] [--confirm]
296
+ recess [--json] admissions orientation-week <packet-id> --kid <packet-kid-id> --week YYYY-MM-DD [--confirm]
296
297
  recess [--json] admissions contract <packet-id> [--option <term:payment>] [--out <file>]
297
298
  recess [--json] admissions upload-signed <packet-id> --file <pdf> [--option <term:payment>] [--note TEXT] [--confirm]
298
299
  recess [--json] reports activity [--partner-school <slug|id>] [--guide <name|email|id>]
@@ -524,8 +525,9 @@ Usage:
524
525
  [--confirm-destructive-changes --destructive-change-token TOKEN]
525
526
  recess [--json] goal-templates set-metadata <template-id> [--expected-version N]
526
527
  [--title TEXT] [--description TEXT] [--emoji X] [--category TEXT] [--tags A,B]
527
- [--image-url URL] [--coin-amount N] [--sort-order N] [--is-starter true|false]
528
- [--setup-audience KID_FRIENDLY|PARENT_SETUP] [--kind SIMPLE|BLUEPRINT]
528
+ [--image-url URL] [--coin-amount N] [--chat-title TEXT|none] [--sort-order N]
529
+ [--is-starter true|false] [--setup-audience KID_FRIENDLY|PARENT_SETUP]
530
+ [--kind SIMPLE|BLUEPRINT]
529
531
  [--visibility PUBLIC|PRIVATE|STAFF_ONLY] [--target-platform ANY|MOBILE|DESKTOP]
530
532
  [--agent-instructions-file <path>] [--output-template-file <path>] [--confirm]
531
533
  recess [--json] goal-templates delete <template-id> [--expected-version N] [--confirm]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recess-cli",
3
- "version": "3.24.0",
3
+ "version": "3.25.0",
4
4
  "description": "Safe Recess administration and family AI tools from the command line.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {