recess-cli 3.15.0 → 3.16.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/args.js +2 -0
- package/dist/cli.js +31 -1
- package/dist/command-schema.js +1 -0
- package/dist/help.js +3 -0
- package/package.json +3 -3
package/dist/args.js
CHANGED
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import { execFile } from "node:child_process";
|
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { RecessAdminApi, unwrap, withIdempotencyContext } from "./api.js";
|
|
6
|
-
import { flagNumber, flagString, hasFlag, parseArgs, } from "./args.js";
|
|
6
|
+
import { flagList, flagNumber, flagString, hasFlag, parseArgs, } from "./args.js";
|
|
7
7
|
import { login, pollDeviceAuth, requestDeviceAuth } from "./auth.js";
|
|
8
8
|
import { clearStoredSession, withConfigLock, deleteProfile, listProfiles, resolveConfig, saveProfile, useProfile, } from "./config.js";
|
|
9
9
|
import { agentContext, buildCommandSchema, findCommandSchema, remoteCommands, scopedHelp, validateInvocation, } from "./command-schema.js";
|
|
@@ -3371,6 +3371,36 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
3371
3371
|
params: { path: { userId } },
|
|
3372
3372
|
})));
|
|
3373
3373
|
}
|
|
3374
|
+
if (noun === "students" && verb === "interests") {
|
|
3375
|
+
const studentId = flagString(parsed, "student", { required: true });
|
|
3376
|
+
const add = flagList(parsed, "add")
|
|
3377
|
+
.map((label) => label.trim())
|
|
3378
|
+
.filter(Boolean);
|
|
3379
|
+
const remove = flagList(parsed, "remove");
|
|
3380
|
+
if (!add.length && !remove.length) {
|
|
3381
|
+
const profile = unwrap(await api.client.GET("/tutor/students/{studentId}/interest-profile", {
|
|
3382
|
+
params: { path: { studentId } },
|
|
3383
|
+
}));
|
|
3384
|
+
return { studentId, interests: profile.explicitInterests };
|
|
3385
|
+
}
|
|
3386
|
+
return writeCommand(parsed, {
|
|
3387
|
+
action: "change a kid's interests (Rocky's config, the feed, and OpenRead passages)",
|
|
3388
|
+
target: { studentUserId: studentId },
|
|
3389
|
+
request: { add, remove },
|
|
3390
|
+
}, async () => {
|
|
3391
|
+
const added = [];
|
|
3392
|
+
for (const label of add) {
|
|
3393
|
+
added.push(unwrap(await api.client.POST("/tutor/students/{studentId}/interests", {
|
|
3394
|
+
params: { path: { studentId } },
|
|
3395
|
+
body: { label },
|
|
3396
|
+
})).interest);
|
|
3397
|
+
}
|
|
3398
|
+
for (const interestId of remove) {
|
|
3399
|
+
unwrap(await api.client.DELETE("/tutor/students/{studentId}/interests/{interestId}", { params: { path: { studentId, interestId } } }));
|
|
3400
|
+
}
|
|
3401
|
+
return { studentId, added, removed: remove };
|
|
3402
|
+
});
|
|
3403
|
+
}
|
|
3374
3404
|
if (noun === "students" && verb === "notes") {
|
|
3375
3405
|
if (parsed.positionals[2] !== "add") {
|
|
3376
3406
|
throw new CliError("invalid_arguments", "Use students notes add.");
|
package/dist/command-schema.js
CHANGED
package/dist/help.js
CHANGED
|
@@ -81,6 +81,8 @@ Usage:
|
|
|
81
81
|
recess [--json] students issue-email --student <kid-id> [--confirm]
|
|
82
82
|
recess [--json] students web-todos --student <kid-id> [--on|--off] [--confirm]
|
|
83
83
|
recess [--json] students notes add --student <kid-id> --text TEXT [--confirm]
|
|
84
|
+
recess [--json] students interests --student <kid-id> [--add LABEL]...
|
|
85
|
+
[--remove <interest-id>]... [--confirm]
|
|
84
86
|
recess [--json] chat-logs list --student <user-id> [--limit 100] [--cursor <cursor>]
|
|
85
87
|
recess [--json] chat-logs get <conversation-id>
|
|
86
88
|
recess [--json] chat-logs by-todo <todo-id>
|
|
@@ -957,6 +959,7 @@ export const COMMAND_SUMMARIES = {
|
|
|
957
959
|
"students upload-map-scores": "Upload a NWEA MAP score report PDF for a kid.",
|
|
958
960
|
"students issue-email": "Issue a Recess email address for a kid.",
|
|
959
961
|
"students web-todos": "Show or set whether a kid's todos run on web (off: they open in the desktop app).",
|
|
962
|
+
"students interests": "List, add, or remove a kid's interests (Rocky, the feed, and reading/writing passages use them).",
|
|
960
963
|
"students notes add": "Add a staff-visible guide note to a kid's profile (Rocky reads it).",
|
|
961
964
|
"chat-logs list": "List a student's AI chat conversations.",
|
|
962
965
|
"chat-logs get": "Read one AI chat conversation.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recess-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.1",
|
|
4
4
|
"description": "Safe Recess administration and family AI tools from the command line.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@tryrecess/typescript-config": "0.0.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
-
"build": "
|
|
53
|
+
"build": "node node_modules/@tryrecess/typescript-config/bin/tsc-fast.mjs",
|
|
54
54
|
"client:generate": "node scripts/generate-api-types.mjs",
|
|
55
|
-
"typecheck": "
|
|
55
|
+
"typecheck": "node node_modules/@tryrecess/typescript-config/bin/tsc-fast.mjs --noEmit",
|
|
56
56
|
"format": "oxfmt --ignore-path .oxfmtignore --check",
|
|
57
57
|
"format:fix": "oxfmt --ignore-path .oxfmtignore",
|
|
58
58
|
"lint": "oxlint --type-aware src/*.ts src/commands/*.ts",
|