recess-cli 2.1.0 → 2.3.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/README.md +18 -0
- package/dist/api.js +17 -0
- package/dist/auth.js +7 -2
- package/dist/cli.js +206 -8
- package/dist/command-schema.js +1 -0
- package/dist/commands/onboarding.js +360 -0
- package/dist/commands/school.js +727 -0
- package/dist/help.js +93 -5
- package/dist/http.js +45 -2
- package/package.json +1 -1
- package/skill/recess-cli/SKILL.md +3 -1
- package/skill/recess-cli/agents/version.json +1 -1
package/dist/help.js
CHANGED
|
@@ -133,6 +133,11 @@ Usage:
|
|
|
133
133
|
[--limit N] [--stage-filter all|scheduled|oriented|course|converted|lost]
|
|
134
134
|
recess [--json] onboarding timeline <family-id>
|
|
135
135
|
recess [--json] onboarding readiness <family-id>
|
|
136
|
+
recess [--json] onboarding family <family-id>
|
|
137
|
+
recess [--json] onboarding next <family-id>
|
|
138
|
+
recess [--json] onboarding doctor [--family <family-id>]
|
|
139
|
+
recess [--json] onboarding starter-coverage
|
|
140
|
+
recess [--json] onboarding backfill-trackers [--apply] [--confirm]
|
|
136
141
|
recess [--json] onboarding active-tutors <family-id>
|
|
137
142
|
recess [--json] onboarding meetings <family-id>
|
|
138
143
|
recess [--json] onboarding cohort-options <family-id> [--kid <kid-id>]
|
|
@@ -142,6 +147,8 @@ Usage:
|
|
|
142
147
|
recess [--json] onboarding orientation-sessions
|
|
143
148
|
recess [--json] onboarding ixl-preview <family-id> --kid <kid-id>
|
|
144
149
|
recess [--json] onboarding intake-session <family-id>
|
|
150
|
+
recess [--json] onboarding reviews <family-id>
|
|
151
|
+
recess [--json] onboarding review <session-id>
|
|
145
152
|
recess [--json] onboarding intake-session-create <family-id> [--confirm]
|
|
146
153
|
recess [--json] onboarding set-stage <family-id>
|
|
147
154
|
--stage LEGACY|PROVISIONED|PARENT_CONFIRMED|CLEARED_FOR_COHORT|COMPLETE [--confirm]
|
|
@@ -165,6 +172,9 @@ Usage:
|
|
|
165
172
|
--kid <kid-id> [--credentials-file <credentials.json>] [--confirm]
|
|
166
173
|
recess [--json] onboarding remove-ixl <family-id> --kid <kid-id> [--confirm]
|
|
167
174
|
recess [--json] onboarding ixl-sync [--apply] [--confirm]
|
|
175
|
+
recess [--json] onboarding contracts [--kid <kid-id>]
|
|
176
|
+
recess [--json] onboarding send-contract <kid-id> [--tuition-cents N]
|
|
177
|
+
[--parent-email <email>] [--partner-name TEXT] [--partner-email <email>] [--confirm]
|
|
168
178
|
recess [--json] onboarding send-comms --subject <family:id|invite:id>
|
|
169
179
|
--kind <kind> [--confirm]
|
|
170
180
|
recess [--json] onboarding send-welcome <family-id> [--resend] [--confirm]
|
|
@@ -189,6 +199,53 @@ Usage:
|
|
|
189
199
|
--data <json> [--expected-updated-at <iso>] [--confirm]
|
|
190
200
|
recess [--json] onboarding extract <family-id> --session <id>
|
|
191
201
|
(--transcript-file <path> | --granola <ref>) [--confirm]
|
|
202
|
+
recess [--json] onboarding mark-reviewed <session-id> [--confirm]
|
|
203
|
+
recess [--json] onboarding pairing-code <kid-id> [--confirm]
|
|
204
|
+
recess [--json] school list
|
|
205
|
+
recess [--json] school families --school <institution-slug>
|
|
206
|
+
recess [--json] school family-search --school <institution-slug> --query TEXT
|
|
207
|
+
[--limit N]
|
|
208
|
+
recess [--json] school convert <family-id> --school <institution-slug>
|
|
209
|
+
--kid "<kid-id>:<tier>[:<slots>[:<enrollment-cents>]]" [--kid "..."]
|
|
210
|
+
[--credit-cents N] [--enrollment-payment-cents N] [--note TEXT] [--confirm]
|
|
211
|
+
recess [--json] school revert <family-id> --school <institution-slug>
|
|
212
|
+
[--keep-tokens] [--note TEXT] [--confirm]
|
|
213
|
+
recess [--json] school start-memberships <family-id> --kid <kid-id> [--kid <kid-id>]
|
|
214
|
+
[--confirm]
|
|
215
|
+
recess [--json] school resolve-payment <payment-id> --school <institution-slug>
|
|
216
|
+
--action waive|cancel [--note TEXT] [--confirm]
|
|
217
|
+
recess [--json] school close-reconciliation <payment-id> --school <institution-slug>
|
|
218
|
+
--outcome refunded|kept|written_off [--note TEXT] [--confirm]
|
|
219
|
+
recess [--json] school codes list --school <institution-slug>
|
|
220
|
+
recess [--json] school codes get <code-id> --school <institution-slug>
|
|
221
|
+
recess [--json] school codes create --school <institution-slug> [--count N]
|
|
222
|
+
[--expires-at <iso>] [--note TEXT] [--credit-cents N]
|
|
223
|
+
[--tier social|academics|lite|complete|platform] [--slots N]
|
|
224
|
+
[--enrollment-payment-cents N] [--data-file <preconfigured-family.json>] [--confirm]
|
|
225
|
+
recess [--json] school codes set-kids <code-id> --school <institution-slug>
|
|
226
|
+
--data-file <roster.json> [--confirm]
|
|
227
|
+
recess [--json] school codes replace <code-id> --school <institution-slug>
|
|
228
|
+
--data-file <invite.json> [--confirm]
|
|
229
|
+
recess [--json] school codes resend <code-id> --school <institution-slug> [--confirm]
|
|
230
|
+
recess [--json] school codes revoke <code-id> --school <institution-slug> [--confirm]
|
|
231
|
+
recess [--json] school create --slug <slug> --name TEXT --credit-grant N
|
|
232
|
+
[--logo-url URL] [--program-type PARTNER|SCHOOL] [--token-topup-cents N] [--confirm]
|
|
233
|
+
recess [--json] school update <institution-id> [--slug <slug>] [--name TEXT]
|
|
234
|
+
[--logo-url URL] [--credit-grant N] [--program-type PARTNER|SCHOOL]
|
|
235
|
+
[--token-topup-cents N] [--confirm]
|
|
236
|
+
recess [--json] school representatives list --school <institution-slug>
|
|
237
|
+
recess [--json] school representatives search --query TEXT
|
|
238
|
+
recess [--json] school representatives add --school <institution-slug>
|
|
239
|
+
--user <user-id> [--confirm]
|
|
240
|
+
recess [--json] school representatives remove --school <institution-slug>
|
|
241
|
+
--user <user-id> [--confirm]
|
|
242
|
+
recess [--json] school credit-transactions --school <institution-slug>
|
|
243
|
+
[--page 0] [--limit 50]
|
|
244
|
+
recess [--json] school kid-slots <kid-id> --school <institution-slug>
|
|
245
|
+
--slots N [--premium-slots N] [--confirm]
|
|
246
|
+
recess [--json] school partner-family <family-id> --school <institution-slug>
|
|
247
|
+
--enabled true|false [--confirm]
|
|
248
|
+
recess [--json] school logo-upload --file </path/logo.png> [--confirm]
|
|
192
249
|
recess [--json] village models list [--world village-1] [--query TEXT] [--archived]
|
|
193
250
|
recess [--json] village models upload --file </path/model.glb>
|
|
194
251
|
[--world village-1] [--name TEXT] [--id ID] [--description TEXT] [--tags A,B]
|
|
@@ -240,17 +297,20 @@ Usage:
|
|
|
240
297
|
recess [--json] goal-templates get <template-id|slug> [--spec-only]
|
|
241
298
|
recess [--json] goal-templates versions <template-id> [--version N]
|
|
242
299
|
recess [--json] goal-templates validate-spec --file <path/template.json>
|
|
243
|
-
recess [--json] goal-templates create --file <path/template.json>
|
|
300
|
+
recess [--json] goal-templates create --file <path/template.json>
|
|
301
|
+
[--coin-amount N] [--confirm]
|
|
244
302
|
recess [--json] goal-templates patch-spec <template-id|slug> --expected-version N
|
|
245
303
|
--patches-file <path/patches.json> [--confirm --approval-token TOKEN]
|
|
246
304
|
[--confirm-destructive-changes --destructive-change-token TOKEN]
|
|
247
305
|
recess [--json] goal-templates set-metadata <template-id> --expected-version N
|
|
248
306
|
[--title TEXT] [--description TEXT] [--emoji X] [--category TEXT] [--tags A,B]
|
|
249
|
-
[--sort-order N] [--is-starter true|false]
|
|
307
|
+
[--image-url URL] [--coin-amount N] [--sort-order N] [--is-starter true|false]
|
|
250
308
|
[--setup-audience KID_FRIENDLY|PARENT_SETUP] [--kind SIMPLE|BLUEPRINT]
|
|
251
309
|
[--agent-instructions-file <path>]
|
|
252
310
|
[--output-template-file <path>] [--confirm]
|
|
253
311
|
recess [--json] goal-templates delete <template-id> --expected-version N [--confirm]
|
|
312
|
+
recess [--json] goal-templates generate-image <template-id|slug>
|
|
313
|
+
[--prompt TEXT] [--confirm]
|
|
254
314
|
recess [--json] goal-templates snapshot-files <template-id> [--path P]
|
|
255
315
|
recess [--json] goal-templates capture-snapshot <template-id|slug>
|
|
256
316
|
(--source-goal <goal-id> | --source-draft <draft-slug> --student <goal-owner-id>
|
|
@@ -270,6 +330,12 @@ Usage:
|
|
|
270
330
|
--delta TEXT [--confirm --approval-token TOKEN]
|
|
271
331
|
recess [--json] goals delete <goal-id> --student <kid-id>
|
|
272
332
|
[--confirm --approval-token TOKEN]
|
|
333
|
+
recess [--json] goals complete <goal-id> [--confirm]
|
|
334
|
+
recess [--json] goals undo-completion <goal-id> [--confirm]
|
|
335
|
+
recess [--json] goals archive <goal-id> --student <kid-id>
|
|
336
|
+
[--confirm --approval-token TOKEN]
|
|
337
|
+
recess [--json] goals unarchive <goal-id> --student <kid-id>
|
|
338
|
+
[--confirm --approval-token TOKEN]
|
|
273
339
|
recess [--json] goals queue get <goal-id> --student <kid-id>
|
|
274
340
|
recess [--json] goals queue set <goal-id> --student <kid-id>
|
|
275
341
|
--entries-file <path.json> --delta TEXT [--replace-description-pointer]
|
|
@@ -327,6 +393,26 @@ the backend's own dryRun before the gate and previews the per-student outcome.
|
|
|
327
393
|
409s STALE_WRITE and writes nothing. The spec is unreachable from "set-metadata"
|
|
328
394
|
by design — an existing spec is edited only through the guarded /ai patch path.
|
|
329
395
|
|
|
396
|
+
School-onboarding workflow notes: "onboarding family" is the one-screen view
|
|
397
|
+
(status + readiness + next action + intake session + active tutors, in
|
|
398
|
+
parallel; flag-gated pieces degrade to a labeled "unavailable"). "onboarding
|
|
399
|
+
next" returns the mission-control queue's current action for the family PLUS
|
|
400
|
+
suggestedCommands — the exact commands that perform it, ids substituted.
|
|
401
|
+
"onboarding doctor" answers "who actually sees the school-onboarding surface
|
|
402
|
+
and why": the env kill-switches (SCHOOL_ONBOARDING_V1_FORCE,
|
|
403
|
+
SCHOOL_ONBOARDING_CUTOVER), comms master switch + mode, the acting staffer's
|
|
404
|
+
flag evaluation, and per-guardian/per-kid flag, capability-lock, and
|
|
405
|
+
cohort-gate state; env values are the answering service's only — the Worker
|
|
406
|
+
can differ. "onboarding starter-coverage" is the read-only pre-flip gate
|
|
407
|
+
(ok:false = do not flip the flag). "onboarding backfill-trackers" is the WS-H
|
|
408
|
+
census (read-only); --apply re-takes the census as the preview and stamps only
|
|
409
|
+
the arm-1 guardians, exact-ADMIN, re-derived under a per-guardian lock
|
|
410
|
+
server-side. "school create/update" carry money levers
|
|
411
|
+
(--credit-grant/--token-topup-cents/--program-type spend real money via the
|
|
412
|
+
monthly top-up cron and are exact-ADMIN on update); descriptive edits
|
|
413
|
+
(name/slug/logo) are ordinary staff writes. "school kid-slots" is the raw
|
|
414
|
+
slot override; "users tier set" is the tier-driven path.
|
|
415
|
+
|
|
330
416
|
Onboarding notes: "status" and "intake-session" are reads — "intake-session"
|
|
331
417
|
looks up the current IN_PROGRESS session without creating one (prints a "none
|
|
332
418
|
yet" result when absent). "intake-session-create" is the explicit write that
|
|
@@ -353,9 +439,11 @@ endDate minus one day) and shows the computed date in the preview.
|
|
|
353
439
|
Auth notes: "auth login" runs the browser loopback flow for ADMIN, GUIDE, a GUARDIAN with
|
|
354
440
|
access:ai, or a KID using only Village home building. Guardian sessions are family-scoped and
|
|
355
441
|
cannot call /admin; KID sessions cannot call any non-Village API command. For a headless
|
|
356
|
-
cloud agent
|
|
357
|
-
|
|
358
|
-
|
|
442
|
+
cloud agent that has no local browser to open, "auth request" prints an approval URL; whoever
|
|
443
|
+
opens it and approves in a signed-in web session grants THEIR OWN scope, so a guardian approving
|
|
444
|
+
mints a family-scoped session and only an admin can mint a full-admin one. "auth poll" then
|
|
445
|
+
collects the 12h session. Kids cannot approve. When it lapses, run "auth request" again for a
|
|
446
|
+
fresh link. Both paths yield the same session.
|
|
359
447
|
|
|
360
448
|
Skill notes: this CLI's own agent skill ships inside the npm package AND is served
|
|
361
449
|
by the server, so wording/Gotcha updates arrive without an npm release. "setup"
|
package/dist/http.js
CHANGED
|
@@ -3,6 +3,44 @@ export const RECESS_CLIENT_HEADER = "x-recess-client";
|
|
|
3
3
|
export const RECESS_CLIENT_CLI = "cli";
|
|
4
4
|
export const RECESS_CLIENT_CLI_UI = "cli-ui";
|
|
5
5
|
export const RECESS_REASON_HEADER = "x-recess-reason";
|
|
6
|
+
/**
|
|
7
|
+
* Set alongside the reason when it had to be percent-encoded to survive the
|
|
8
|
+
* header. The server decodes only when this is present, so a literal `%` in an
|
|
9
|
+
* all-ASCII reason is never mangled.
|
|
10
|
+
*/
|
|
11
|
+
export const RECESS_REASON_ENCODING_HEADER = "x-recess-reason-encoding";
|
|
12
|
+
export const RECESS_REASON_ENCODING_UTF8 = "utf-8-percent";
|
|
13
|
+
const ASCII_PRINTABLE = /^[\x20-\x7E]*$/;
|
|
14
|
+
/**
|
|
15
|
+
* Make a human-written reason safe to put in an HTTP header.
|
|
16
|
+
*
|
|
17
|
+
* Headers are ByteStrings: any code point above U+00FF throws
|
|
18
|
+
* "Cannot convert argument to a ByteString because the character at index N
|
|
19
|
+
* has a value of 8212" — 8212 being an em dash. The error names no field, so
|
|
20
|
+
* the failure looks like a bug in whatever command you happened to run, and
|
|
21
|
+
* typing an em dash or a curly quote in `--reason` is completely ordinary.
|
|
22
|
+
*
|
|
23
|
+
* Common typography is folded to its ASCII equivalent so the audit log stays
|
|
24
|
+
* readable; anything still non-ASCII (accented names, CJK, emoji) is
|
|
25
|
+
* UTF-8 percent-encoded and flagged for the server to decode, which is lossless.
|
|
26
|
+
*/
|
|
27
|
+
export function encodeReasonHeader(reason) {
|
|
28
|
+
const folded = reason
|
|
29
|
+
// Typography first, so the audit log keeps a readable reason instead of a
|
|
30
|
+
// percent-escaped one. These are what people actually type.
|
|
31
|
+
.replace(/[\u2010-\u2015\u2212]/g, "-") // hyphens, en/em dashes, minus
|
|
32
|
+
.replace(/[\u2018\u2019\u201A\u201B]/g, "'")
|
|
33
|
+
.replace(/[\u201C\u201D\u201E\u201F]/g, '"')
|
|
34
|
+
.replace(/\u2026/g, "...")
|
|
35
|
+
.replace(/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g, " ")
|
|
36
|
+
.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
37
|
+
if (ASCII_PRINTABLE.test(folded))
|
|
38
|
+
return { value: folded };
|
|
39
|
+
return {
|
|
40
|
+
value: encodeURIComponent(folded),
|
|
41
|
+
encoding: RECESS_REASON_ENCODING_UTF8,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
6
44
|
export function requireCliRequestReason(value) {
|
|
7
45
|
const reason = value?.trim();
|
|
8
46
|
if (!reason) {
|
|
@@ -15,8 +53,13 @@ export function requireCliRequestReason(value) {
|
|
|
15
53
|
}
|
|
16
54
|
export function markCliRequest(headers, reason, client = RECESS_CLIENT_CLI) {
|
|
17
55
|
headers.set(RECESS_CLIENT_HEADER, client);
|
|
18
|
-
if (reason)
|
|
19
|
-
|
|
56
|
+
if (reason) {
|
|
57
|
+
const encoded = encodeReasonHeader(reason);
|
|
58
|
+
headers.set(RECESS_REASON_HEADER, encoded.value);
|
|
59
|
+
if (encoded.encoding) {
|
|
60
|
+
headers.set(RECESS_REASON_ENCODING_HEADER, encoded.encoding);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
20
63
|
return headers;
|
|
21
64
|
}
|
|
22
65
|
export function cliRequestHeaders(init, reason, client = RECESS_CLIENT_CLI) {
|
package/package.json
CHANGED
|
@@ -38,7 +38,9 @@ For machine-readable discovery, use `recess --json agent-context`; for a smaller
|
|
|
38
38
|
## Authentication
|
|
39
39
|
|
|
40
40
|
- Workstation: `recess --json auth login` opens Recess SSO.
|
|
41
|
-
- Headless
|
|
41
|
+
- Headless (no browser): `auth request`, then a human approves the printed URL while signed in to
|
|
42
|
+
Recess, then `auth poll`. The session takes on the **approver's** scope — a guardian approving
|
|
43
|
+
grants family-only access, not staff access. Kids cannot approve.
|
|
42
44
|
- Sessions last 12 hours and are rechecked against the live user role and permissions.
|
|
43
45
|
- `auth status` inspects the current session; `auth logout` clears the stored session.
|
|
44
46
|
- The default API is production. If `RECESS_CLI_API_ORIGIN` is set, state the non-default origin before acting.
|