recess-cli 1.3.2 → 1.3.3
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 +16 -1
- package/dist/cli.js +124 -0
- package/package.json +1 -1
- package/skill/recess-cli/SKILL.md +17 -3
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ recess setup
|
|
|
13
13
|
|
|
14
14
|
`setup` installs the bundled skill for both Codex and Claude and then opens Recess SSO in your browser (skip the browser step with `--skill-only`; it is also skipped when a live session already exists). Restart your agent afterwards so it discovers the skill. `npx -y recess-cli setup` works too, but leaves no `recess` on your PATH — which is the command the installed skill tells the agent to run — so `setup` warns when it detects it is running from an npx cache.
|
|
15
15
|
|
|
16
|
-
Publishing rides the production deploy (`.github/workflows/admin-cli-publish.yml`): bump `version` in `apps/admin-cli/package.json` in a normal PR to `staging`, and it publishes when `staging` promotes to `production`. A production deploy that did not bump the version is a no-op — a `gate` job checks the version against npm first. The same workflow is still dispatchable by hand for out-of-band releases. pnpm packs the CLI so the workspace `catalog:` dependency becomes a real range; npm publishes that tarball through the
|
|
16
|
+
Publishing rides the production deploy (`.github/workflows/admin-cli-publish.yml`): bump `version` in `apps/admin-cli/package.json` in a normal PR to `staging`, and it publishes when `staging` promotes to `production`. A production deploy that did not bump the version is a no-op — a `gate` job checks the version against npm first. The same workflow is still dispatchable by hand for out-of-band releases. pnpm packs the CLI so the workspace `catalog:` dependency becomes a real range; npm then publishes that tarball through the workflow's OIDC trusted-publishing path. The registry-side publisher must be configured as described in `docs/codebase/admin-cli.md`.
|
|
17
17
|
|
|
18
18
|
## Install (from a checkout — CLI development)
|
|
19
19
|
|
|
@@ -92,6 +92,21 @@ human explicitly approves the exceptional `--allow-strand` override.
|
|
|
92
92
|
|
|
93
93
|
MAP uploads accept one PDF up to 15 MB. The preview includes the resolved path, byte count, and SHA-256 without contacting the API; the confirmed command sends the report to the existing tutor-dashboard extraction route.
|
|
94
94
|
|
|
95
|
+
## Store catalog and Village
|
|
96
|
+
|
|
97
|
+
Village store goods are main-Recess `StoreItem` rows, not Village-island database rows. List them
|
|
98
|
+
and preview an availability change with:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
recess --json store-items list --item-type VILLAGE_ITEM
|
|
102
|
+
recess --json store-items set-status <store-item-id> --status INACTIVE
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The status command resolves the exact `VILLAGE_ITEM` first and includes its name, catalog metadata,
|
|
106
|
+
current status, purchase count, and lack of feed-publication side effects in the approval preview;
|
|
107
|
+
it refuses non-Village item IDs. After approval, rerun the unchanged command with `--confirm`. The
|
|
108
|
+
separate `village models` commands edit the Village island's reusable models and placements.
|
|
109
|
+
|
|
95
110
|
## Authoring learning content
|
|
96
111
|
|
|
97
112
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -113,6 +113,12 @@ Usage:
|
|
|
113
113
|
recess [--json] village models remove <placement-id> [--world village-1] [--confirm]
|
|
114
114
|
recess [--json] village render --min-x N --min-z N --max-x N --max-z N
|
|
115
115
|
[--world village-1]
|
|
116
|
+
recess [--json] store-items list [--search TEXT]
|
|
117
|
+
[--status ACTIVE|INACTIVE|COMING_SOON] [--item-type TYPE]
|
|
118
|
+
[--page 0] [--limit 20] [--sort-by name|price|createdAt|updatedAt|order]
|
|
119
|
+
[--sort-order asc|desc]
|
|
120
|
+
recess [--json] store-items set-status <village-store-item-id>
|
|
121
|
+
--status ACTIVE|INACTIVE|COMING_SOON [--confirm]
|
|
116
122
|
recess [--json] content-library search <query> [--limit 8]
|
|
117
123
|
recess [--json] skills list [--query TEXT] [--category TEXT]
|
|
118
124
|
recess [--json] skills get <skill-name> [--reference NAME | --all-references]
|
|
@@ -456,6 +462,27 @@ const SCHOOL_TIER_IDS = SCHOOL_TIER_OPTIONS.map((tier) => tier.id);
|
|
|
456
462
|
const MAX_MAP_PDF_BYTES = 15 * 1024 * 1024;
|
|
457
463
|
const GOAL_TEMPLATE_KINDS = ["SIMPLE", "BLUEPRINT"];
|
|
458
464
|
const GOAL_TEMPLATE_SETUP_AUDIENCES = ["KID_FRIENDLY", "PARENT_SETUP"];
|
|
465
|
+
const STORE_ITEM_STATUSES = ["ACTIVE", "INACTIVE", "COMING_SOON"];
|
|
466
|
+
const STORE_ITEM_TYPES = [
|
|
467
|
+
"PROFILE_RING",
|
|
468
|
+
"ANIMATED_COVER",
|
|
469
|
+
"PROFILE_STICKER",
|
|
470
|
+
"CLASS_PASS",
|
|
471
|
+
"GUIDE_MENTORSHIP",
|
|
472
|
+
"TOOL_CREDIT",
|
|
473
|
+
"MERCH_ITEM",
|
|
474
|
+
"STEAM_GAME",
|
|
475
|
+
"KID_PROFILE_PICTURE",
|
|
476
|
+
"WORLD_AVATAR_ITEM",
|
|
477
|
+
"VILLAGE_ITEM",
|
|
478
|
+
];
|
|
479
|
+
const STORE_ITEM_SORT_FIELDS = [
|
|
480
|
+
"name",
|
|
481
|
+
"price",
|
|
482
|
+
"createdAt",
|
|
483
|
+
"updatedAt",
|
|
484
|
+
"order",
|
|
485
|
+
];
|
|
459
486
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
460
487
|
/**
|
|
461
488
|
* Read and parse a JSON file supplied by an authoring agent. Large payloads —
|
|
@@ -1057,6 +1084,103 @@ export async function runCommand(argv) {
|
|
|
1057
1084
|
}
|
|
1058
1085
|
throw new CliError("invalid_arguments", "Use village models list|upload|publish|archive|place|move|remove.");
|
|
1059
1086
|
}
|
|
1087
|
+
if (noun === "store-items") {
|
|
1088
|
+
if (verb === "list") {
|
|
1089
|
+
const search = flagString(parsed, "search");
|
|
1090
|
+
const rawStatus = flagString(parsed, "status");
|
|
1091
|
+
const rawItemType = flagString(parsed, "item-type");
|
|
1092
|
+
const page = flagNumber(parsed, "page") ?? 0;
|
|
1093
|
+
const limit = flagNumber(parsed, "limit") ?? 20;
|
|
1094
|
+
const rawSortBy = flagString(parsed, "sort-by");
|
|
1095
|
+
const rawSortOrder = flagString(parsed, "sort-order");
|
|
1096
|
+
if (!Number.isInteger(page) || page < 0) {
|
|
1097
|
+
throw new CliError("invalid_arguments", "--page must be a non-negative integer.");
|
|
1098
|
+
}
|
|
1099
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
|
|
1100
|
+
throw new CliError("invalid_arguments", "--limit must be an integer from 1 through 100.");
|
|
1101
|
+
}
|
|
1102
|
+
const status = rawStatus
|
|
1103
|
+
? assertChoice(rawStatus, STORE_ITEM_STATUSES, "--status")
|
|
1104
|
+
: undefined;
|
|
1105
|
+
const itemType = rawItemType
|
|
1106
|
+
? assertChoice(rawItemType, STORE_ITEM_TYPES, "--item-type")
|
|
1107
|
+
: undefined;
|
|
1108
|
+
const sortBy = rawSortBy
|
|
1109
|
+
? assertChoice(rawSortBy, STORE_ITEM_SORT_FIELDS, "--sort-by")
|
|
1110
|
+
: "order";
|
|
1111
|
+
const sortOrder = rawSortOrder
|
|
1112
|
+
? assertChoice(rawSortOrder, ["asc", "desc"], "--sort-order")
|
|
1113
|
+
: "asc";
|
|
1114
|
+
return unwrap(await api.client.GET("/admin/store-items/", {
|
|
1115
|
+
params: {
|
|
1116
|
+
query: {
|
|
1117
|
+
...(search ? { search } : {}),
|
|
1118
|
+
...(status ? { status } : {}),
|
|
1119
|
+
...(itemType ? { itemType } : {}),
|
|
1120
|
+
page,
|
|
1121
|
+
limit,
|
|
1122
|
+
sortBy,
|
|
1123
|
+
sortOrder,
|
|
1124
|
+
},
|
|
1125
|
+
},
|
|
1126
|
+
}));
|
|
1127
|
+
}
|
|
1128
|
+
if (verb === "set-status") {
|
|
1129
|
+
const storeItemId = positional(parsed, 2, "store item ID");
|
|
1130
|
+
const status = assertChoice(flagString(parsed, "status", { required: true }), STORE_ITEM_STATUSES, "--status");
|
|
1131
|
+
let page = 0;
|
|
1132
|
+
let storeItem;
|
|
1133
|
+
// Resolve the exact live row before the confirmation gate. Filtering at
|
|
1134
|
+
// the API makes this command incapable of mutating non-Village catalog
|
|
1135
|
+
// items, while the preview can name the row and its current state.
|
|
1136
|
+
do {
|
|
1137
|
+
const result = unwrap(await api.client.GET("/admin/store-items/", {
|
|
1138
|
+
params: {
|
|
1139
|
+
query: {
|
|
1140
|
+
itemType: "VILLAGE_ITEM",
|
|
1141
|
+
page,
|
|
1142
|
+
limit: 100,
|
|
1143
|
+
sortBy: "order",
|
|
1144
|
+
sortOrder: "asc",
|
|
1145
|
+
},
|
|
1146
|
+
},
|
|
1147
|
+
}));
|
|
1148
|
+
storeItem = result.items.find((item) => item.id === storeItemId);
|
|
1149
|
+
if (storeItem || page + 1 >= result.totalPages)
|
|
1150
|
+
break;
|
|
1151
|
+
page += 1;
|
|
1152
|
+
} while (true);
|
|
1153
|
+
if (!storeItem) {
|
|
1154
|
+
throw new CliError("not_found", `No Village store item found for ${storeItemId}.`);
|
|
1155
|
+
}
|
|
1156
|
+
const metadata = storeItem.metadata &&
|
|
1157
|
+
typeof storeItem.metadata === "object" &&
|
|
1158
|
+
!Array.isArray(storeItem.metadata)
|
|
1159
|
+
? storeItem.metadata
|
|
1160
|
+
: {};
|
|
1161
|
+
const body = { status };
|
|
1162
|
+
return writeCommand(parsed, {
|
|
1163
|
+
action: `set Village store item status to ${status}`,
|
|
1164
|
+
target: {
|
|
1165
|
+
storeItemId,
|
|
1166
|
+
name: storeItem.name,
|
|
1167
|
+
itemType: storeItem.itemType,
|
|
1168
|
+
villageKind: metadata.villageKind,
|
|
1169
|
+
catalogId: metadata.catalogId,
|
|
1170
|
+
},
|
|
1171
|
+
request: body,
|
|
1172
|
+
details: {
|
|
1173
|
+
currentStatus: storeItem.status,
|
|
1174
|
+
purchaseCount: storeItem._count.purchases,
|
|
1175
|
+
publishesFeedActivity: false,
|
|
1176
|
+
},
|
|
1177
|
+
}, async () => unwrap(await api.client.PATCH("/admin/store-items/{id}", {
|
|
1178
|
+
params: { path: { id: storeItemId } },
|
|
1179
|
+
body,
|
|
1180
|
+
})));
|
|
1181
|
+
}
|
|
1182
|
+
throw new CliError("invalid_arguments", "Use store-items list or store-items set-status.");
|
|
1183
|
+
}
|
|
1060
1184
|
if (noun === "users" && verb === "search") {
|
|
1061
1185
|
const query = parsed.positionals.slice(2).join(" ").trim();
|
|
1062
1186
|
if (!query)
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: recess-cli
|
|
3
|
-
description: Safely perform Recess staff administration through the recess CLI. Use when a Recess admin asks Codex to find a kid, parent, family, enrollment, subscription, invoice, or cohort; search the curated Content Library; inspect or change a school kid's tier and capability gates; upload a kid's MAP Growth report; pause or resume billing; refund or credit an invoice item; extend a trial; cancel or restore a subscription; register or unregister a cohort against an enrollment; switch or move kids from one cohort to another; manage guide payout invoices (biweekly pay-cycle line-item changes, invoice status moves, payout recipient lookups); run class operations (take attendance, cancel or reschedule a class session, add a one-off session, end a cohort, pause cohort billing, email a cohort's families, approve or deny pending registrations); process class-cancellation credits (the "Please credit these students accordingly" Slack message — credit every registered kid for a guide-canceled session); or author learning content — build, validate, publish, and loss-safely patch a deterministic GoalTemplate, apply a template to a kid or a roster, create a goal directly on a kid, write a Mesa draft or goal workspace, capture a template snapshot, and read Mesa workspace or snapshot files.
|
|
3
|
+
description: Safely perform Recess staff administration through the recess CLI. Use when a Recess admin asks Codex to find a kid, parent, family, enrollment, subscription, invoice, or cohort; edit the Recess Village map or manage store-catalog availability; search the curated Content Library; inspect or change a school kid's tier and capability gates; upload a kid's MAP Growth report; pause or resume billing; refund or credit an invoice item; extend a trial; cancel or restore a subscription; register or unregister a cohort against an enrollment; switch or move kids from one cohort to another; manage guide payout invoices (biweekly pay-cycle line-item changes, invoice status moves, payout recipient lookups); run class operations (take attendance, cancel or reschedule a class session, add a one-off session, end a cohort, pause cohort billing, email a cohort's families, approve or deny pending registrations); process class-cancellation credits (the "Please credit these students accordingly" Slack message — credit every registered kid for a guide-canceled session); or author learning content — build, validate, publish, and loss-safely patch a deterministic GoalTemplate, apply a template to a kid or a roster, create a goal directly on a kid, write a Mesa draft or goal workspace, capture a template snapshot, and read Mesa workspace or snapshot files.
|
|
4
4
|
# Bundle version. Bump on every substantive edit; the CLI reports it and `doctor`
|
|
5
5
|
# compares it against the served copy to tell an operator a refresh is available.
|
|
6
|
-
version: 1.4.
|
|
6
|
+
version: 1.4.4
|
|
7
7
|
# The lowest `recess` version this bundle is safe to install onto. Raise it ONLY
|
|
8
8
|
# when the bundle documents a command, flag, or changed semantic that an older
|
|
9
9
|
# binary does not have — an older CLI keeps its bundled copy instead of taking
|
|
10
10
|
# this one. Prose, formatting, and Gotcha edits must NOT raise it; that is the
|
|
11
11
|
# whole point of serving the bundle.
|
|
12
|
-
minCliVersion: 1.3.
|
|
12
|
+
minCliVersion: 1.3.3
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# Recess CLI (`recess`)
|
|
@@ -209,6 +209,19 @@ recess --json onboarding attest <family-id> --condition app_downloaded|tutor_met
|
|
|
209
209
|
recess --json onboarding set-intake <family-id> --session <id> --data <json> [--expected-updated-at <iso>] [--confirm]
|
|
210
210
|
recess --json onboarding extract <family-id> --session <id> (--transcript-file <path> | --granola <ref>) [--confirm]
|
|
211
211
|
|
|
212
|
+
# Recess Village map administration
|
|
213
|
+
recess --json village render --min-x N --min-z N --max-x N --max-z N [--world village-1]
|
|
214
|
+
recess --json village models list [--world village-1] [--query TEXT] [--archived]
|
|
215
|
+
recess --json village models upload --file <model.glb> [--world village-1] [--name TEXT] [--confirm]
|
|
216
|
+
recess --json village models publish|archive <model-id> [--world village-1] [--confirm]
|
|
217
|
+
recess --json village models place <model-id> --x N --z N [--y N] [--rotation 0..3] [--world village-1] [--confirm]
|
|
218
|
+
recess --json village models move <placement-id> --x N --z N [--y N] [--rotation 0..3] [--world village-1] [--confirm]
|
|
219
|
+
recess --json village models remove <placement-id> [--world village-1] [--confirm]
|
|
220
|
+
|
|
221
|
+
# Main Recess store catalog (status writes are restricted to Village goods)
|
|
222
|
+
recess --json store-items list [--search TEXT] [--status ACTIVE|INACTIVE|COMING_SOON] [--item-type TYPE]
|
|
223
|
+
recess --json store-items set-status <village-store-item-id> --status ACTIVE|INACTIVE|COMING_SOON [--confirm]
|
|
224
|
+
|
|
212
225
|
# Tutor skills — the authoring know-how (served, never bundled)
|
|
213
226
|
recess --json skills list [--query TEXT] [--category TEXT]
|
|
214
227
|
recess --json skills get <skill-name> [--reference NAME | --all-references] [--refresh]
|
|
@@ -486,3 +499,4 @@ Dated, newest last. Add an entry every time reality surprises you.
|
|
|
486
499
|
- 2026-08-05 — **The goal-audit GET cannot investigate an already-soft-deleted goal.** `request get /admin/browser/students/goals/<goal-id>/audit/` returns 404 because the handler's `ensureGoalAccess` calls `canManageGoal`, which requires `Goal.deletedAt: null` before it loads `GoalAuditLog`. The 404 is not evidence that the audit row is absent. Use the `query-db` skill's guarded read-only production query for deletion forensics.
|
|
487
500
|
- 2026-08-05 — **`set-metadata --output-template-file` edits an AI_CHAT template's `outputTemplate`** (the goal-description payload DailyTodoGeneration consumes for description-only goals). Like `--agent-instructions-file`, it reads a local file and the server bumps the version + freezes a `GoalTemplateVersion` row. Editing a template never rewrites goals already created from it — the description was copied at goal-creation time; re-apply or edit live goals separately.
|
|
488
501
|
- 2026-08-05 — **Content Library search now has a content/Pipeline-read-only CLI command.** `content-library search <query> [--limit 8]` calls the same hybrid/vector + rerank `/agent/search` funnel as Rocky's `search_gem_library`, returns the full fit/gist/coverage payload, and attributes the funnel's standard `offered` telemetry to `admin-cli`. It cannot inspect, ingest, file requests, curate, or edit the Pipeline; the permanent library token stays on the web server.
|
|
502
|
+
- 2026-08-07 — **Village store goods do not live in the Village database.** They are ordinary main-Recess `StoreItem` rows with `itemType=VILLAGE_ITEM`; use `store-items list --item-type VILLAGE_ITEM` and the confirmation-gated `store-items set-status`, while `village models …` remains the separate Village-island map/model boundary. `set-status` refuses non-Village IDs and its live preflight names the item, current status, purchase count, and feed consequence before approval. A checked-in seed still owns fresh-database defaults, so an operational status edit does not replace updating that seed when the product default itself changes.
|