recess-cli 1.0.0 → 1.2.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 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 is a manual GitHub Action (`.github/workflows/admin-cli-publish.yml`): bump `version` in `apps/admin-cli/package.json` in a normal PR, then run the workflow. It publishes with `pnpm`, not `npm`, because the manifest uses the workspace `catalog:` protocol for `openapi-fetch` and only pnpm rewrites it to a real range in the tarball.
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 `admin-cli-publish.yml` OIDC trusted publisher configured on npmjs.com.
17
17
 
18
18
  ## Install (from a checkout — CLI development)
19
19
 
@@ -92,4 +92,49 @@ 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
- See `recess --help` for the complete P0 command surface. The raw escape hatch is intentionally read-only: `recess --json request get /path`.
95
+ ## Authoring learning content
96
+
97
+ ```bash
98
+ recess --json skills get os-v2-goal-template-builder --all-references
99
+ recess --json goal-templates validate-spec --file ./template.json # iterate; writes nothing
100
+ recess --json goal-templates create --file ./template.json # preview, exit 2
101
+ recess --json goal-templates create --file ./template.json --confirm
102
+ recess --json goal-templates patch-spec <id-or-slug> --expected-version 7 --patches-file ./patches.json
103
+ recess --json goal-templates apply <id-or-slug> --answers-file ./answers.json --dry-run
104
+ recess --json goals create --student <kid-id> --title "..." --description-file ./goal.md
105
+ recess --json mesa files list --student <kid-id> --goal <goal-id>
106
+ ```
107
+
108
+ ## Keeping the agent skill current
109
+
110
+ ```bash
111
+ recess --json --version # {cliVersion, skillVersion}
112
+ recess --json doctor # .skill reports whether a newer bundle exists
113
+ recess --json setup --skill-only # bundled copy, then the served upgrade
114
+ ```
115
+
116
+ The CLI's own agent skill is **both** bundled in this package and served from
117
+ `GET /admin/cli-skill/`. The bundled copy is the floor — it works offline, before a session exists,
118
+ and always matches the installed binary; `postinstall` refreshes it on every `npm install -g`. The
119
+ served copy is the upgrade: wording and Gotcha edits reach installed CLIs on the next deploy instead
120
+ of the next npm release, fenced by the bundle's `minCliVersion` so an older binary keeps its bundled
121
+ copy rather than reading a skill written for a newer one. An unreachable server is never an error.
122
+
123
+ `skills` (plural, a different thing) serves the in-product tutor skills — the same documents the `recess.gg/ai` agent loads —
124
+ read-only over your admin session from the **private** `packages/skills` submodule. They are
125
+ deliberately **not** bundled into this package, which is published publicly on npm: one source of
126
+ truth, and a skills-repo update reaches CLI agents with no CLI release. Load
127
+ `os-v2-goal-template-builder` before authoring; a spec that passes `validate-spec` is structurally
128
+ valid, not good. Responses cache under `~/.recess-cli/skills-cache/` (`--refresh` re-fetches).
129
+
130
+ Every template created here is `setupMode: DETERMINISTIC_WORKFLOW` and **cannot be converted back**,
131
+ so the confirmation gate is load-bearing. `create` runs a real server-side validation before the
132
+ gate, so `preview.details` carries the handler, goal shape, wizard step keys, and spec inventory the
133
+ *server* resolved rather than a client-side guess; `apply` runs the backend's own `dryRun` and
134
+ previews the per-student outcome. `set-metadata` and `delete` require `--expected-version` from
135
+ `get`; a stale value 409s `STALE_WRITE` without writing. `set-metadata` cannot send a
136
+ `setupWorkflowSpec` at all. Use `patch-spec` with a JSON array of bounded JSON-Pointer operations;
137
+ it always runs the backend's guarded preview first and requires the preview's exact loss token in
138
+ addition to `--confirm` when protected template data would be removed.
139
+
140
+ See `recess --help` for the complete command surface. The raw escape hatch is intentionally read-only: `recess --json request get /path`.
package/dist/args.js CHANGED
@@ -1,18 +1,24 @@
1
1
  import { CliError } from "./errors.js";
2
2
  const BOOLEAN_FLAGS = new Set([
3
+ "all-references",
3
4
  "allow-strand",
4
5
  "cancel-subscriptions",
5
6
  "archived",
6
7
  "confirm",
8
+ "dry-run",
7
9
  "full",
8
10
  "help",
9
11
  "immediate",
12
+ "include-deleted",
10
13
  "mirrored",
11
14
  "no-collision",
12
15
  "json",
16
+ "refresh",
13
17
  "restore",
14
18
  "revoke",
15
19
  "send-email",
20
+ "spec-only",
21
+ "starter-only",
16
22
  "visual-only",
17
23
  ]);
18
24
  export function parseArgs(args) {