recess-cli 3.4.0 → 3.4.1

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
@@ -4259,6 +4259,7 @@ export async function executeRecessCommand(argv, options = {}) {
4259
4259
  (!Number.isInteger(coinAmount) || coinAmount < 1)) {
4260
4260
  throw new CliError("invalid_arguments", "--coin-amount must be a positive integer.");
4261
4261
  }
4262
+ const visibility = flagString(parsed, "visibility");
4262
4263
  const isStarterRaw = flagString(parsed, "is-starter");
4263
4264
  const setupAudienceRaw = flagString(parsed, "setup-audience");
4264
4265
  const isStarter = isStarterRaw === undefined
@@ -4300,6 +4301,11 @@ export async function executeRecessCommand(argv, options = {}) {
4300
4301
  ...(kind
4301
4302
  ? { kind: assertChoice(kind, GOAL_TEMPLATE_KINDS, "--kind") }
4302
4303
  : {}),
4304
+ ...(visibility
4305
+ ? {
4306
+ visibility: assertChoice(visibility, ["PUBLIC", "PRIVATE", "STAFF_ONLY"], "--visibility"),
4307
+ }
4308
+ : {}),
4303
4309
  ...(agentInstructionsFile
4304
4310
  ? {
4305
4311
  agentInstructions: await fs.readFile(path.resolve(agentInstructionsFile), "utf8"),
@@ -4316,7 +4322,7 @@ export async function executeRecessCommand(argv, options = {}) {
4316
4322
  // shape that caused the template incident; editing an existing spec goes
4317
4323
  // through the guarded /ai patch path with its destructive-change token.
4318
4324
  if (Object.keys(body).length === 1) {
4319
- 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, --agent-instructions-file, --output-template-file).");
4325
+ 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, --agent-instructions-file, --output-template-file).");
4320
4326
  }
4321
4327
  return writeCommand(parsed, {
4322
4328
  action: "update goal template metadata (never its setupWorkflowSpec)",
@@ -4557,6 +4563,25 @@ export async function executeRecessCommand(argv, options = {}) {
4557
4563
  }
4558
4564
  throw new CliError("invalid_arguments", "Use goal-templates list|get|versions|validate-spec|create|patch-spec|set-metadata|generate-image|delete|snapshot-files|capture-snapshot|apply|apply-starter.");
4559
4565
  }
4566
+ if (noun === "goals" && verb === "adaptations") {
4567
+ const action = positional(parsed, 2, "goals adaptations action");
4568
+ const studentId = flagString(parsed, "student", { required: true });
4569
+ const goalId = flagString(parsed, "goal", { required: true });
4570
+ if (action === "list") {
4571
+ return unwrap(await api.client.GET("/tutor/students/{studentId}/goals/{goalId}/adaptations", { params: { path: { studentId, goalId } } }));
4572
+ }
4573
+ if (action === "diff") {
4574
+ const runId = positional(parsed, 3, "adaptation run ID");
4575
+ const path = flagString(parsed, "path");
4576
+ return unwrap(await api.client.GET("/tutor/students/{studentId}/goals/{goalId}/adaptations/{runId}/diff", {
4577
+ params: {
4578
+ path: { studentId, goalId, runId },
4579
+ query: path ? { path } : {},
4580
+ },
4581
+ }));
4582
+ }
4583
+ throw new CliError("invalid_arguments", "Use goals adaptations list|diff.");
4584
+ }
4560
4585
  if (noun === "goals" && verb !== "files" && verb !== "pdf") {
4561
4586
  if (verb === "complete" || verb === "undo-completion") {
4562
4587
  const goalId = positional(parsed, 2, "goal ID");
@@ -165,6 +165,8 @@ const FAMILY_AI_COMMANDS = new Set([
165
165
  "goal-templates list",
166
166
  "goal-templates snapshot-files",
167
167
  "goal-templates validate-spec",
168
+ "goals adaptations diff",
169
+ "goals adaptations list",
168
170
  "goals archive",
169
171
  "goals create",
170
172
  "goals edit",
@@ -212,7 +212,7 @@ function agentsGuide(docs) {
212
212
  "widgets.js, engine.js, key.js — a modified locked file fails validation.",
213
213
  "",
214
214
  "Before publishing, write two files at the root:",
215
- "- contract.json — the BuildContract described below (copy the shape in the template contract).",
215
+ "- contract.json — the BuildContract: copy the example in the contract.json section below.",
216
216
  '- manifest.json — { "title": "...", "description": "...", "template": { "ccss": "5.NF.A.1", "modes": ["prepare","remediate"], "misconceptions": ["..."] } }',
217
217
  "",
218
218
  'Then: `recess apps validate --reason "..."` (reports without publishing) and',
@@ -228,6 +228,10 @@ function agentsGuide(docs) {
228
228
  "",
229
229
  "---",
230
230
  "",
231
+ docs.contract ?? "",
232
+ "",
233
+ "---",
234
+ "",
231
235
  docs.pedagogy ? `# Pedagogy\n\n${docs.pedagogy}` : "",
232
236
  "",
233
237
  "---",
package/dist/help.js CHANGED
@@ -391,7 +391,7 @@ Usage:
391
391
  [--title TEXT] [--description TEXT] [--emoji X] [--category TEXT] [--tags A,B]
392
392
  [--image-url URL] [--coin-amount N] [--sort-order N] [--is-starter true|false]
393
393
  [--setup-audience KID_FRIENDLY|PARENT_SETUP] [--kind SIMPLE|BLUEPRINT]
394
- [--agent-instructions-file <path>]
394
+ [--visibility PUBLIC|PRIVATE|STAFF_ONLY] [--agent-instructions-file <path>]
395
395
  [--output-template-file <path>] [--confirm]
396
396
  recess [--json] goal-templates delete <template-id> --expected-version N [--confirm]
397
397
  recess [--json] goal-templates generate-image <template-id|slug>
@@ -468,6 +468,9 @@ Usage:
468
468
  [--lessons-dir <dir>] [--emoji TEXT] [--grade-min N] [--grade-max N]
469
469
  [--visibility PUBLIC|STAFF] [--confirm]
470
470
  recess [--json] tutor-templates delete <slug> [--confirm]
471
+ recess [--json] goals adaptations list --student <goal-owner-id> --goal <goal-id>
472
+ recess [--json] goals adaptations diff <run-id> --student <goal-owner-id>
473
+ --goal <goal-id> [--path P]
471
474
  recess [--json] goals files list --student <goal-owner-id> --goal <goal-id>
472
475
  recess [--json] goals files read --student <goal-owner-id> --goal <goal-id> --path P
473
476
  recess [--json] goals files init --student <goal-owner-id> --draft <draft-slug>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recess-cli",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Safe Recess administration and family AI tools from the command line.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {