Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 04:43
· 337 commits to main since this release
v0.8.0
f83bf6d

Moodle CLI 0.8.0

Address Moodle by the unit and task names shown on your site. Bare moodle opens a
dashboard; moodle UNIT 7, moodle UNIT "TASK", due, grades, news, find,
get and open provide direct paths without collecting numeric ids first.

CLI JSON and MCP now share compact envelopes and omit empty fields. Unit detail is a
section index by default. Supply a section for activities; thread results are paged.
The eleven default MCP tools map to user intents. Legacy tool names remain callable
through 0.8 but return v2 envelopes and are omitted from default discovery.
Update integrations that read old field names or use row-level --fields selections.

Performance

Measured on one account enrolled in five units, on a site that disables four common
Moodle services, with a warm session cache. Requests are HTTP calls to Moodle; wall
time is the end-to-end command time on the same connection. Character counts are the
MCP result bodies documented in docs/plans/optimization-implementation.md.

Command 0.7.1 0.8.0 Change
moodle dashboard 18 requests, 2.05 s 7 requests, 1.00 s -61% requests, -51% time
moodle due 6 requests, 1.50 s 2 requests, 0.64 s -67% requests, -57% time
moodle units 3 requests 1 request, ~0.7 s -67% requests
moodle news (5 units) 46 requests, 5.36 s 23 requests, 4.50 s -50% requests, -16% time
moodle open on a missing item 11 requests, 2.87 s 2 requests, 0.81 s -82% requests, -72% time
MCP tools/list catalog 19,277 chars 7,203 chars -63%
MCP unit index (63 sections) 41,843 chars 3,921 chars -91%

Output sizes for the commands above are unchanged apart from the dashboard, which now
fills the current section for each unit.

Where the savings come from: the CLI remembers which services the site disables and
the dashboard profile in its encrypted session cache, so a disabled service is answered
locally instead of aborting a batch, and the memory survives an expired cookie. Batches
stay whole; each unit's sections are read once per command. Announcements come from one
forum listing call and a merge that reads about one thread per row shown, without the
per-thread group lookup. Item and grade due dates use the per-unit calendar where
available. A missing item no longer crawls every forum thread. Forum search loads
listings and discussions a few at a time; includePostText=false now only hides
snippets, so use titlesOnly for the cheap subject-only scan. Unit end dates are
reported even after they pass. MCP results that fail the shared contract report
MOODLE_RESULT_INVALID with the offending paths instead of a generic upstream error.

Other changes

Resource redirects return usable file metadata. Calendar reads respect Moodle's
50-event page cap. Forum snippet suppression no longer changes matching discussions.
Tables keep IDs and grades intact, errors include hints, and doctor explains runtime,
browser, session and background-job issues. The unused projects and quiet aliases
are removed; verbose request timing, pretty JSON, shell completion and uninstall are available.

Wrangler installs only when Cloudflare management needs it, runs on Node when Node is
present, and a PATH Wrangler from another major line is ignored in favour of the pinned one. Normal installs no longer
include its toolchain or tty-table. Standalone binaries contain their Worker assets;
background integrations prefer a stable Bun or standalone runtime.

MCP output schemas are retained. The richer catalog remains above the original byte
budget; see docs/plans/optimization-implementation.md for separate catalog and data-call
measurements. Updating an installed CLI does not update a deployed Worker: use
moodle mcp deploy when ready to migrate that server.