Skip to content

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 23 Sep 18:44
· 3 commits to main since this release
v0.7.1
98c3a84

edstem-cli 0.7.1

Interactive views in the chat, units found by the code you actually type, and tables that fit the terminal. The MCP server can now answer with a small widget instead of a wall of text in hosts that support MCP Apps (Claude, ChatGPT), and hosts that do not still get the same answer as text.

Highlights

  • Four interactive views (experimental) — forum catch-up, forum activity, lesson progress and a "Teach me" lesson guide, rendered inside the conversation.
  • Units resolve by the code people typeCODE finds the unit Ed stores as CODE 2026 S2, and names match too.
  • Tables fit the terminal — list commands show the columns that identify a row and truncate to the terminal width.
  • --verbose traces requests — method, URL, status and timing on stderr. Never the token.
  • Threads carry read state — an unseen flag and newReplyCount in list output and MCP results.

Interactive views (experimental)

This is an experiment. It ships in edstem-cli first because Ed is a single, well-understood source to try it on. Depending on feedback, the same approach will be extended to the sibling CLIs.

The rule behind every view: a widget stands in for a long list or table the model would otherwise write out, gives it structure, and lets you drill into it in place. Each view is one headline and one main element.

Tool What you see What you can do in place
show_forum_catchup Unread announcements, then threads that are new or have new replies Open a thread to read its endorsed or first answer; ask for a summary
show_thread_activity New threads per week, stacked by category Hover a week for its mix; open it for the most-replied threads; switch to a table
show_lesson_progress One meter per module, in the order modules opened Open a module for its unfinished lessons; ask to be taught it or which ones matter
show_lesson_guide A lesson broken into sections of key points, then practice questions Step through, answer, see what you got wrong, ask to go over mistakes

A few things are deliberate:

  • Stepping, drilling and grading happen in the widget with no model turn. Only "summarise" and "explain" go back to the model, as a normal chat message.
  • Practice questions are written by the assistant, and the widget says so. Every question in an Ed lesson quiz is assessed, so the guide never answers, grades or hints at them. It only notes that the lesson's own quiz is still yours to do in Ed.
  • The model reads a short text summary, not the widget's data. The widget payload travels in the result's _meta, which ChatGPT and Claude hand to the widget only, so a 12-week activity chart does not cost the model 30KB of context.
  • The widget follows the host. Colours, fonts and light or dark mode come from the host, and weeks are bucketed in your own time zone.

Choosing widget or text

Widgets are the default. There are three ways to get text instead:

  1. Ask for it. The server's instructions point the model to list_* and read_* for plain text.
  2. Use a host without MCP Apps. It receives the text content automatically.
  3. Set EDSTEM_WIDGETS=0 on the stdio server to remove the show_* tools entirely.

The teach_lesson MCP prompt starts a lesson guide directly from a course and lesson.

CLI

  • Units resolve against the site's own list. A reference is tried in tiers: exact code, the code's leading token, exact name, then a substring of either, so an exact match always wins over a looser one. An unmatched unit is now not_found (exit 4) rather than a usage error, and the message lists your units.
  • Tables fit the terminal. List commands declare the few columns that identify a row, and the rest is truncated to the terminal width rather than wrapping to 190 characters. --fields still overrides, and --json still carries every field.
  • JSON is compact in a pipe. It is indented only on a terminal.
  • --verbose works. It traces each Ed request and its timing to stderr. The token is a header and never appears.
  • edstem activity uses the same field names as everything else. It was forwarding Ed's raw response (course_id, created_at); it now projects courseId, createdAt and flattens comments and threads into one row shape.

MCP and skills

  • Every tool description is written around intent: what it returns, when to use it, when a sibling fits better, what to call next and what it costs.
  • The skill is an intent table: what the user says, and the one command that answers it.
  • Shipped text is institution-neutral. No course codes or category names from any one university; a course reference is described as the code exactly as Ed shows it.

Compatibility notes

  • --max is now --limit, matching the MCP input name and the sibling CLIs. -n is unchanged. Scripts that pass --max need updating.
  • edstem activity output keys changed as described above.
  • An unknown unit exits 4 instead of 2.
  • MCP clients see four new show_* tools and server instructions. Set EDSTEM_WIDGETS=0 for the previous tool list.

Upgrade

npm install -g edstem-cli@0.7.1

Or, from an earlier release:

edstem update

No configuration or token format changes.