@jamestesting888/tum-mcp 0.9.0 → 0.9.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changes
2
2
 
3
+ ## 0.9.2 — 2026-10-27
4
+
5
+ - Combine connection status, extension status and health checks in `doctor`.
6
+ Show only installed or configured clients, including in the setup picker.
7
+ - Rename campus sign-in to `login`, paired with `logout`. Keep `connect` and
8
+ `status` as hidden compatibility aliases, including the previous status JSON.
9
+ - Make the course app consistent across Study and Exercises: one choice style,
10
+ feedback panel, counter format, arrow controls and disclosure chevron. Revision
11
+ covers all topics until you choose, and review links open the view with items.
12
+ - Show exercise goals in Guidance, sheet summaries and due dates in the list, Mark
13
+ reviewed at the end with a visible finish, and a link to the next exercise.
14
+ - Improve detail: readable graph edges, fitted phone diagram labels, word-wrapped
15
+ boxes, no dark-mode flash, steady flashcard layout, labelled reset and in-app
16
+ confirmation for deleting comments, and neutral page copy on published sites.
17
+ - Lecture Notes: recording times open from the sources of each passage and figure
18
+ instead of appearing in the text, and the sidebar lists lectures only.
19
+ - Add a Contents button to Study, Exercises and Lecture Notes. It lists the page's
20
+ headings and follows your reading; wide screens can keep it docked beside the
21
+ text. The home resume button shows a play icon with the topic name.
22
+ - Keep queued Contents updates from a previous view from hiding the current
23
+ page's outline after navigation.
24
+ - Remove unused serif font files. Builds delete unedited copies and publication
25
+ removes them from managed sites; edited copies are kept.
26
+ - Base the study skills on the app: they describe content and checks and point to
27
+ the bundled app instead of restating its styling.
28
+
29
+ ## 0.9.1 — 2026-10-27
30
+
31
+ - Make Audio Notes an optional `audio-notes` extension. Keep five base skills,
32
+ preserve existing audio files, and describe all extensions in a compact README table.
33
+
34
+ - Use one compact terminal layout for help, connection status, extensions,
35
+ skills and permissions. Keep automation output available through `--json`.
36
+ - Give setup, install and uninstall matching status-aware pickers. Uninstall
37
+ offers full package removal through All. Keep named commands for scripts and
38
+ show optional workflow state through status, connect and doctor; remove the
39
+ separate extensions command group. Studocu browser sign-in stays unverified.
40
+ - Include TUMonline connection and permission status in doctor. Default checks
41
+ do not read credentials or create policy files; live checks verify identity
42
+ without fetching studies or grades.
43
+ - Make unverified status dots blue, ready/enabled green, action needed amber,
44
+ failures red and inactive states muted. Preserve labels with color disabled.
45
+
3
46
  ## 0.9.0 — 2026-10-26
4
47
 
5
48
  - Add read-only TUMonline study, public catalog and partial curriculum-position
package/README.md CHANGED
@@ -13,13 +13,13 @@ Requires **Node.js 22.14+**, a Chromium browser and your TUM account.
13
13
 
14
14
  ```sh
15
15
  npm install --global @jamestesting888/tum-mcp@latest
16
- tum-mcp setup --client codex
17
- tum-mcp connect
16
+ tum-mcp setup
17
+ tum-mcp login
18
18
  tum-mcp doctor
19
19
  ```
20
20
 
21
- Choose `codex`, `claude`, `cursor`, `antigravity` or `generic` as the client.
22
- Follow the activation/restart instructions. In `connect`, select services with
21
+ Choose a detected client or Generic, or use `--client NAME` for an explicit setup.
22
+ Follow the activation/restart instructions. In `login`, select services with
23
23
  **Space**, then **Enter**, and complete sign-in/MFA in the browser. Never paste
24
24
  credentials into chat. Setup supplies its own Python runtime; Git, Docker and a
25
25
  native keyring are unnecessary.
@@ -40,7 +40,6 @@ submissions, posting and exercise execution are unavailable.
40
40
  | `sync-course` | “Set up a project for this course and collect its materials.” |
41
41
  | `prepare-study` | “Build lessons, flashcards and practice in a study website.” |
42
42
  | `prepare-exercises` | “Add guided exercises from this week's released sheet.” |
43
- | `audio-notes` | “Turn the prepared lessons into audio notes.” |
44
43
  | `publish-course` | “Publish my reviewed study site for phone access.” |
45
44
 
46
45
  Each project holds one course. Run `tum-mcp study` in its folder to open the app.
@@ -55,28 +54,21 @@ account policy with `tum-mcp manage tumonline`.
55
54
 
56
55
  ## Optional extensions
57
56
 
58
- Install only the workflows you need, then reload your client:
57
+ Run `tum-mcp install` to choose extensions, then reload your client.
59
58
 
60
- ```sh
61
- tum-mcp install lecture # Prepare Lecture + TUM-Live tools and local ASR
62
- tum-mcp install lecture --no-asr # Use captions/imported WebVTT instead
63
- tum-mcp install studocu # Supplementary Studocu collection workflow
64
- tum-mcp extensions status
65
- ```
66
-
67
- **Lecture Notes** captures the professor's extra explanations, examples and
68
- caveats, with timestamp links. It starts with transcripts and lecture materials;
69
- only critical visuals need recording frames. Local recognition uses Apple Silicon
70
- acceleration or a separate CPU runtime on supported hosts.
71
- [Lecture Notes and recognizer requirements](docs/lecture-notes.md).
59
+ | Extension | Skill added | What it offers |
60
+ | --- | --- | --- |
61
+ | `lecture` | `prepare-lecture` | Lecture Notes with the professor's extra explanations, timestamps and selected critical visuals. Prefers transcripts and slides; local recognition is optional. |
62
+ | `studocu` | `sync-studocu` | Search and collect selected supplementary PDFs saved in your browser. Personal use only; excluded from published sites. |
63
+ | `audio-notes` | `audio-notes` | Turn prepared Study lessons into concise audio tracks, with resumable generation and coverage tracking. Voice setup happens when used. |
72
64
 
73
- **Studocu** adds public search and reviewed import of permitted original PDFs you
74
- save in your browser. Search coverage is incomplete; browser credentials stay out
75
- of the integration. These supplementary materials remain for personal use and
76
- cannot be included in published sites. [Studocu workflow](docs/study.md#studocu-materials).
65
+ Use `tum-mcp doctor` to see installed workflows and `tum-mcp uninstall` to remove
66
+ them. Named commands also work, such as `tum-mcp install audio-notes` and
67
+ `tum-mcp uninstall lecture`. Existing notes, audio and customizations are retained.
68
+ Audio Notes needs no additional campus sign-in. Studocu uses your own browser.
77
69
 
78
- Remove either extension with `tum-mcp uninstall lecture` or
79
- `tum-mcp uninstall studocu`. Notes, evidence and customizations are preserved.
70
+ [Lecture and recognition](docs/lecture-notes.md) ·
71
+ [Studocu collection](docs/study.md#studocu-materials) · [Setup details](docs/setup.md)
80
72
 
81
73
  ## Privacy, updates and removal
82
74
 
@@ -40,7 +40,7 @@ Each layer owns a different failure boundary:
40
40
  | Unit | Parsing, policy, malformed input and failure branches with synthetic collaborators |
41
41
  | Integration | Real files, CLI/MCP, transactions, HTTP confinement and isolated project updates |
42
42
  | Installed consumer | Actual npm/wheel contents, managed runtime and complete browser workflows |
43
- | Public upgrade | Earlier published versions, repair, ownership conflicts and removal |
43
+ | Public upgrade | Published 0.9.0, repair, ownership conflicts and removal |
44
44
  | Native platform | OS credential/ACL behavior; WSL Windows browser transport on both engines |
45
45
 
46
46
  Study integration fixtures build the private rich regression fixture once, then copy it into a fresh
@@ -59,8 +59,9 @@ CI runs macOS, Windows and Linux, plus both distribution engines on WSL 3.x.
59
59
  Consumer checks install the actual npm artifact, discover tools, build a study
60
60
  site and test available Chromium browsers with temporary profiles and synthetic
61
61
  pages. WSL verifies Windows browser transport. No live account is used.
62
- Upgrade checks cover public 0.8.0 and 0.8.1, client refresh, customized-file conflicts,
63
- failed preparation, runtime repair and removal that preserves work/credentials.
62
+ Upgrade checks start from public 0.9.0 and cover all five clients, optional-extension
63
+ retention, customized-file conflicts, failed preparation, runtime repair and
64
+ removal that preserves work/credentials. Earlier releases are outside this matrix.
64
65
  The package-lifecycle check uses a local synthetic registry and real isolated
65
66
  global npm prefixes to verify downloads, backend validation, replacement,
66
67
  failure ordering and one-command removal. It does not publish a test release.
@@ -126,10 +127,15 @@ native MathML; legacy MathML remains accepted. Unit `path` labels group the outl
126
127
  without changing learning-progress revisions. Shared modules render all units;
127
128
  content changes do not require a framework or per-unit HTML.
128
129
 
129
- Shared renderer assets live in `src/tum_mcp/bundled/course_app/site/`. The shipped
130
- component preview is deliberately minimal; richer learning pilots live in
131
- `tests/fixtures/course_app/`. The distributed design/teaching/verification contracts live under
132
- `src/tum_mcp/bundled/skills/prepare-study/references/`. Local agent notes and
130
+ Shared renderer assets live in `src/tum_mcp/bundled/course_app/site/`; they are the
131
+ source of truth for layout, styling and interaction. Design tokens sit at the top of
132
+ `styles.css`, and the owned-browser fixtures in `tests/integration/` hold the UI
133
+ regressions. The preparation skills describe content and point to the app instead
134
+ of restating its styling, so app changes need no skill edits unless an authored field
135
+ or its meaning changes. Remove a template file by moving it to
136
+ `RETIRED_TEMPLATE_FILES`: builds then delete unedited copies and publication removes
137
+ them from managed sites. The shipped component preview is deliberately minimal;
138
+ richer learning pilots live in `tests/fixtures/course_app/`. Local agent notes and
133
139
  screenshots belong in ignored `docs/local/` or `.omo/`. Keep real course projects,
134
140
  session files, databases, downloads and environment files out of artifacts.
135
141
 
@@ -143,7 +149,7 @@ check keyboard navigation, reduced motion, source links and retained progress.
143
149
 
144
150
  ## Optional Lecture extension
145
151
 
146
- Base setup exposes six workflows and no `tum_live_*` tools. `install lecture`
152
+ Base setup exposes five workflows and no `tum_live_*` tools. `install lecture`
147
153
  records explicit selection, refreshes managed clients and provisions the optional
148
154
  recognizer only when requested/supported. `--no-asr` keeps captions/imported WebVTT.
149
155
  Heavy recognition dependencies and model weights stay outside the base environment
@@ -152,7 +158,7 @@ and package artifacts. `lecture_processing/` owns bounded media/ASR evidence;
152
158
  and figures used by the static app. See [the workflow guide](lecture-notes.md).
153
159
 
154
160
  Use `skills validate --all` to check the packaged optional workflow without installing
155
- it; default validation checks the selected six/seven. Activation statistics remain
161
+ it; default validation checks the selected workflows. Activation statistics remain
156
162
  unmeasured until genuine fresh-session trial records exist. Default tests use
157
163
  synthetic media and course data. `test:consumer` and `test:upgrade` exercise optional
158
164
  install/update/export/removal from an actual local npm artifact. Never publish or
@@ -9,15 +9,17 @@ tum-mcp install lecture --no-asr
9
9
  ```
10
10
 
11
11
  Restart the coding client to load Prepare Lecture and the three TUM-Live metadata
12
- tools. Base setup keeps its six skills and existing services. Removing the option
12
+ tools. Base setup keeps its five skills and existing services. Removing the option
13
13
  with `tum-mcp uninstall lecture` preserves course notes, evidence, sessions,
14
14
  model caches and customizations. Reinstalling can reuse them.
15
15
 
16
16
  Ask: “Prepare Lecture Notes from this recording and these slides, focusing on
17
17
  what the professor explains beyond the material.” It adds Lecture Notes to the
18
18
  same course app, alongside Study and Exercises. Notes have coherent explanations,
19
- examples, important qualifications, formulas, selective source images and direct
20
- timestamp access. Attribution review stays private, so the reading flow is clean.
19
+ examples, important qualifications, formulas and selective source images. The
20
+ sources of each passage and figure open the recording at the measured time, so the
21
+ text carries no timestamps, and the Contents button lists the lecture's sections. Attribution
22
+ review stays private, so the reading flow is clean.
21
23
  Lecture Notes has no quizzes or flashcards; broader teaching/practice stays in Study.
22
24
 
23
25
  ## Processing order and cost
package/docs/setup.md CHANGED
@@ -14,35 +14,73 @@ Linux needs a graphical desktop for native browser sign-in; WSL can use Windows.
14
14
  ```sh
15
15
  npm install --global @jamestesting888/tum-mcp@latest
16
16
  tum-mcp setup --client codex
17
- tum-mcp connect
17
+ tum-mcp login
18
18
  tum-mcp doctor
19
19
  tum-mcp --help
20
20
  ```
21
21
 
22
- Use `--client claude`, `cursor`, `antigravity`, or `generic` for another client.
22
+ Run `tum-mcp setup` to choose clients interactively, or pass `--client claude`,
23
+ `cursor`, `antigravity`, or `generic` directly. Existing registrations have status dots.
23
24
  Codex needs the plugin enabled and a restart when prompted. Cursor and
24
- Antigravity setup installs all six base skills and MCP configuration; restart each
25
+ Antigravity setup installs all five base skills and MCP configuration; restart each
25
26
  client afterward. Existing MCP-only setups gain the skills through `tum-mcp update`
26
27
  or another setup run. Generic setup writes configuration for manual installation.
27
28
 
28
29
  Studocu is optional: run `tum-mcp install studocu`, then reload the client. The
29
- extension adds the `sync-studocu` skill and its tools. `tum-mcp extensions status`
30
- reports the local selection; `tum-mcp extensions remove studocu` disables it and
30
+ extension adds the `sync-studocu` skill and its tools. `tum-mcp doctor`
31
+ reports the local selection; `tum-mcp uninstall studocu` disables it and
31
32
  preserves course materials and customized files. Generic clients use
32
33
  `tum-mcp skills export DESTINATION` to install the active pack manually.
33
34
  Setup preserves unrelated settings and refuses to
34
35
  replace customized entries. It does not authenticate or fetch courses.
35
36
 
36
- ## Connect
37
+ Audio Notes is optional: use `tum-mcp install audio-notes`. It adds the
38
+ `audio-notes` skill for prepared Study content; synthesis is set up when used.
39
+ Existing course audio is retained when the extension is disabled.
37
40
 
38
- Run **`tum-mcp connect`**, with no arguments, in an interactive terminal:
41
+ ## Terminal output
39
42
 
40
- 1. Use up/down to move and Space to select Moodle, Artemis, Zulip and/or TUMonline.
43
+ `tum-mcp doctor` is the overview for saved connections, optional extensions,
44
+ client setup and runtime health, including TUMonline. Client rows appear only
45
+ for installed clients or existing TUM MCP registrations; unrelated config
46
+ folders do not count as installations. Setup detects the same clients and
47
+ also offers Generic. Use `--client NAME` for an undetected or nonstandard install.
48
+ Green dots mean ready or enabled, blue means not verified, amber means action
49
+ needed, red means failed, and muted dots mean inactive. Every dot has a text
50
+ label. `NO_COLOR` disables color; narrow terminals use stacked rows.
51
+
52
+ Bare `tum-mcp setup`, `tum-mcp install` and `tum-mcp uninstall` share the same
53
+ keyboard controls as login. Nothing is preselected; Ctrl+C cancels. Uninstall
54
+ also offers **All — TUM MCP**, which removes the package and managed client setup.
55
+ Personal notes, sessions and customized files are retained. Scripts can name one or both:
56
+ `tum-mcp uninstall lecture studocu --json`.
57
+
58
+ Use `--json` for machine-readable status, named extension removal/installation,
59
+ skill listing/validation, lecture runtime status or TUMonline permissions.
60
+ The default human output changed in 0.9.1; scripts that parsed those commands
61
+ must add `--json`. The former `extensions` group is removed; use `doctor` and
62
+ `uninstall NAME`. Named client/extension arguments remain suitable for scripts.
63
+ Data-oriented course authoring commands retain JSON output.
64
+
65
+ `login` replaces `connect`, and `doctor` replaces the separate status screen.
66
+ The old command names remain hidden compatibility aliases. `status --json`
67
+ retains its previous configuration format; new integrations should use `doctor --json`.
68
+
69
+ <a id="connect"></a>
70
+
71
+ ## Login
72
+
73
+ Run **`tum-mcp login`**, with no arguments, in an interactive terminal:
74
+
75
+ 1. Use up/down to move and Space to select services. Installed Lecture adds TUM-Live;
76
+ installed Studocu adds Studocu.
41
77
  2. Press Enter. If several browsers are installed, choose one and press Enter.
42
78
  3. Complete TUM sign-in/MFA in the opened window. Only selected service tabs open.
43
79
  4. Return to the terminal for the saved-connection result.
44
80
 
45
- The services use the same temporary-browser sign-in and encrypted session storage flow.
81
+ Campus services use temporary-browser sign-in and encrypted session storage.
82
+ Studocu opens your own default browser (the Windows browser from WSL); sign in
83
+ there. Its browser session is neither copied nor claimed as verified.
46
84
  No API key or native credential-store prompt is needed. A temporary browser
47
85
  profile keeps the connection separate from your everyday browser. Ctrl+C closes it and preserves
48
86
  connections that already completed. A dumb terminal uses numbered prompts.
@@ -50,11 +88,11 @@ connections that already completed. A dumb terminal uses numbered prompts.
50
88
  Chrome, Edge, Brave, Chromium, Vivaldi and Opera are detected in their standard
51
89
  locations. Selected preview channels and Opera GX are detected where installed.
52
90
  For another Chromium build, set `TUM_MCP_BROWSER` to its executable path before
53
- running connect. Compatible builds must allow Playwright automation. Safari and
91
+ running login. Compatible builds must allow Playwright automation. Safari and
54
92
  Firefox are not supported.
55
93
 
56
94
  After sign-in, Artemis and Zulip can read content available to your campus account.
57
- No local course/channel grants are required. Your agent uses status/discover and
95
+ No local course/channel grants are required. Your agent uses MCP status/discovery and
58
96
  course metadata to find relevant current-semester material, then makes bounded reads.
59
97
  An account ID identifies a saved service connection; it is not your TUM login.
60
98
  TUMonline additionally has a local policy: `tum-mcp manage tumonline --show`
@@ -76,7 +114,7 @@ Both engines have dedicated CI checks on the current WSL 3.x runner image.
76
114
  ```sh
77
115
  npm install --global @jamestesting888/tum-mcp@latest
78
116
  tum-mcp setup --client cursor --host windows
79
- tum-mcp connect
117
+ tum-mcp login
80
118
  tum-mcp doctor
81
119
  ```
82
120
 
@@ -115,7 +153,7 @@ browser discovery still requires functioning interop.
115
153
  `gh auth login --hostname github.com` interactively on the agent's execution host.
116
154
  The [publishing workflow](study.md#publish-a-study-website) uses private repositories
117
155
  with public Pages websites and requires an eligible paid GitHub plan.
118
- - An expired session uses the same `tum-mcp connect` selector. Reconnecting the
156
+ - An expired session uses the same `tum-mcp login` selector. Reconnecting the
119
157
  same identity preserves saved preferences.
120
158
  - If no browser appears, check its installation or `TUM_MCP_BROWSER`. A managed
121
159
  or incompatible Chromium build may prevent automation; try another browser.
@@ -167,6 +205,7 @@ the npm package and all managed registrations:
167
205
 
168
206
  ```sh
169
207
  tum-mcp uninstall
208
+ # Choose All to remove TUM MCP and its managed client setup.
170
209
  ```
171
210
 
172
211
  Custom edits and user-added files are preserved. Codex's local source/catalog
package/docs/study.md CHANGED
@@ -1,104 +1,14 @@
1
1
  # Course study projects
2
2
 
3
- Six base skills cover source reading, course sync, Study preparation, Exercises preparation, audio and publishing.
3
+ Five base skills cover source reading, course sync, Study preparation, Exercises
4
+ preparation and publishing. They run in your local agent, using the connected
5
+ MCP tools to read course sources. The CLI validates and stores the resulting local
6
+ files; it does not run an AI model.
4
7
  The optional `prepare-lecture` skill adds a Lecture Notes workspace; install it with
5
8
  `tum-mcp install lecture`. See [Lecture Notes](lecture-notes.md).
6
9
  The optional `sync-studocu` skill collects selected student-uploaded material separately.
7
-
8
- ## Studocu materials
9
-
10
- Install the optional extension with `tum-mcp install studocu` and reload your
11
- client. Ask `sync-studocu` to collect materials for a course project. It can
12
- initialize a Studocu-only project with a verified course and semester.
13
- Search is anonymous and bounded; a limited result set is not a complete inventory.
14
- `tum-mcp studocu connect` explains how to sign in to Studocu in your own browser.
15
- The extension cannot infer account entitlement or download original files through
16
- the public MCP. Save an original that your account permits in the browser.
17
-
18
- The skill records a reviewed selection with `tum-mcp studocu plan PROJECT
19
- --selection FILE` and tracks it with `tum-mcp studocu status PROJECT --json`.
20
- Import a selected original with `tum-mcp studocu import PROJECT --document-id ID
21
- --file FILE`. The document-to-file association is user-selected. Originals go to
22
- `materials/studocu/summaries`, `materials/studocu/exams` (including mocks and
23
- solutions), or `materials/studocu/other`. Files remain local and retain their
24
- original bytes. Consult the skill's collection reference for the selection schema.
25
- Exact matches in the same group, type and known year share one original through
26
- a private alias. Each selected document retains its own source identity and URL.
27
- Changing a document's classification or refreshing its original separates aliases
28
- when they no longer match; previous versions remain in private history.
29
- When an existing selection is planned again, unchanged duplicate originals are
30
- consolidated. Edited or missing files are preserved for review.
31
-
32
- Local study material can cite student uploads. Publishing rejects included
33
- Studocu-backed sources; this source check cannot identify uncited copied text or
34
- replace a review of the published content.
35
- They run in your local agent, using the connected
36
- MCP tools to read course sources. The CLI validates and stores the resulting local
37
- files; it does not run an AI model.
38
-
39
- ## Publish a study website
40
-
41
- The optional `publish-course` skill makes a prepared site accessible from a phone
42
- or another computer. Its GitHub repository is private; the Pages website is
43
- public. An eligible paid GitHub plan is required for Pages from private repositories.
44
- This workflow does not provide private website access. Review lesson text,
45
- quotations and source links for the intended public audience before publishing.
46
-
47
- Install GitHub CLI on the execution host and run `gh auth login --hostname github.com`.
48
- `tum-mcp doctor` checks CLI availability without network access; `doctor --live`
49
- also verifies GitHub authentication. It does not publish anything, open sign-in
50
- automatically, extract tokens, or change Git credential settings.
51
-
52
- ```sh
53
- # Preview the chosen name and hosting requirements without GitHub mutations.
54
- tum-mcp study publish --project PROJECT
55
- # After choosing public website content; the repository stays private.
56
- tum-mcp study publish --project PROJECT --public-site
57
- # Optional account/name override on first setup:
58
- tum-mcp study publish --project PROJECT --public-site --repository OWNER/NAME
59
- ```
60
-
61
- Names use `study-<course>-<semester>` in lowercase with hyphens. A collision gets
62
- a stable course suffix; existing repositories are never made public. Settings in
63
- `.tum-mcp/github.json` bind updates to that course, semester and repository. A
64
- failed setup retries the same saved repository rather than creating duplicates.
65
-
66
- Study is the default hosted workspace, including for old settings. Exercise
67
- statements, hints and full solutions need explicit `--include-exercises` on the
68
- publish command after reviewing their public exposure. `--exclude-exercises`
69
- removes Exercises from subsequent eligible exports, using the same repository and URL. An
70
- Exercises-only site also requires explicit inclusion. Lecture Notes separately requires
71
- `--include-lectures`; old settings default to exclusion. `--exclude-lectures` also removes
72
- previously managed lecture images. A notes-only export with notes excluded is refused.
73
-
74
- Only the selected generated website renderer and data are uploaded. Downloaded
75
- originals, credentials, AGENTS.md, study inventory, passage comments, progress,
76
- audio and arbitrary files stay local. Git itself is not required: the publisher
77
- uses authenticated GitHub API calls through `gh`. Local publication settings do
78
- not contain credentials.
79
-
80
- After setup, successful `tum-mcp study build PROJECT` commands update that same
81
- repository automatically. Unchanged verified exports require no network calls
82
- or commits. The study skills finish related edits in one build. Remote edits
83
- are preserved for review; the publisher never force-pushes.
84
-
85
- ```sh
86
- tum-mcp study publish status PROJECT
87
- tum-mcp study publish sync PROJECT # retry pending/failed deployment
88
- tum-mcp study publish pause PROJECT # pause future automatic uploads
89
- tum-mcp study publish resume PROJECT
90
- tum-mcp study build PROJECT --local-only # skip uploading this build
91
- ```
92
-
93
- Uploads are verified against the Pages build and GitHub checks for the exact
94
- commit. Pending deployment exits with code 2 and is resumable; a successful
95
- repository update alone is not a deployed site. Authentication, plan or network
96
- failures preserve the local build. Polling has a budget of at most 60 seconds,
97
- in addition to bounded API requests.
98
- The `tum-mcp study` launcher prints local, hosted and repository URLs, plus pending
99
- or paused status. Study progress remains per browser; passage comments require
100
- the local preview and are disabled in the hosted export. Device synchronization
101
- and offline support are not included.
10
+ The optional `audio-notes` skill turns prepared lessons into spoken tracks; install
11
+ it with `tum-mcp install audio-notes`.
102
12
 
103
13
  ## Start with one course
104
14
 
@@ -190,63 +100,31 @@ restores files when possible and reports any remaining conflict.
190
100
 
191
101
  ## Prepare the website
192
102
 
193
- Ask `prepare-study` to create or extend the Study workspace in `app/`. Units follow the course's
194
- lecture/week sequence when useful, or use consistent topics. For a single course, use a flat list or one category level followed by topics,
195
- including several topics in one week. Every unit has:
103
+ Ask `prepare-study` to create or extend the Study workspace in `app/`. The agent
104
+ writes `app/content.json` from your stored course material, and `tum-mcp study build`
105
+ installs the shared course app and checks every cited source. Units follow the
106
+ course's lecture or week sequence when useful, or consistent topics, with at most
107
+ one category level. Every unit has:
196
108
 
197
- - A concise explanation with source links, assumptions and worked examples.
198
- - Editable LaTeX formulas and inline variables, diagrams, code or comparison tables where they explain the concept.
199
- - Flip cards with arrow navigation, Space to flip and 1/2 for Again/Got it.
200
- - Practice questions with exactly four options, one justified answer and feedback for every option.
109
+ - Content: a short lesson with objectives, source links, assumptions and worked
110
+ examples, using formulas, tables, code, diagrams or line graphs where they help.
111
+ - Flashcards for recall. On a keyboard, arrows move, Space flips and 1/2 rate a card.
112
+ - Practice questions with plausible options and feedback for every option.
201
113
 
202
114
  The agent uses stored material first, so local content edits work offline. Ask for
203
115
  an upstream refresh when you want new course content; an existing check is reused
204
- within the same request. Unchanged units and reviewed material are retained.
205
-
206
- The skill audits objective coverage, technical accuracy and distractors. Its
207
- STE-inspired English uses short, direct sentences while retaining necessary terms
208
- and conditions. The design contract uses TUM blue/navy with quiet reading surfaces,
209
- local fonts, light/dark themes, keyboard navigation and a phone layout. The outline
210
- collapses using a midpoint boundary arrow revealed on hover or keyboard focus;
211
- touch screens keep a visible control. On phones it opens a viewport overlay from
212
- any reading position, with its own scroll and Escape to close. Theme stays in the
213
- outline; the reset icon is on the course home. A Next link follows the active
214
- activity at the end of each view.
215
-
216
- Revision combines flashcards and practice from topics you select. Open Revision in
217
- the outline, choose topics and collapse the checklist when ready. It reuses the
218
- course's categories; selecting a category includes all its topics, and a mixed
219
- checkbox shows a partly selected category. Revision reuses the
220
- original items, sources and progress; selecting or removing topics never clears
221
- your results. The topic selection is remembered locally for this course.
222
-
223
- The topic picker and its nested categories collapse independently. You can select a
224
- whole category while it is closed; its count and mixed state reflect the selection.
225
- At End of set, outlined question rows include a Review action and chevron. Click
226
- one to review it in a popup. Closing the popup returns
227
- you to the same results row without changing progress.
228
-
229
- The website uses Atkinson Hyperlegible Next for headings, explanations and controls.
230
- Code and mathematical notation retain their specialist fonts. Equations adapt to
231
- their container and keep local horizontal scrolling for indivisible wide expressions.
232
- Use `\(v_i\)` in teaching text for inline variables and short expressions (JSON:
233
- `"Use \\(v_i\\)."`). They compile locally to native MathML, including in tables,
234
- glossaries, cards, questions and feedback. Code and dollar signs stay literal.
235
-
236
- Select text in Content, Flashcards or Practice, then click **Comment** to record what is unclear.
237
- You can also use Ctrl/Command+Alt+M after selecting text. The local preview saves
238
- notes in `.tum-mcp/comments.json`, separately from learning progress. Click a
239
- numbered passage marker or highlighted text to open its notes beside the quote.
240
- Markers sit beside section headings or the current card/question position.
241
- Notes can be edited, resolved or reopened; changed passages retain their original quotes.
242
- Revision notes retain their original topic and card/question identity.
243
-
244
- Tell your agent: **“Address the open comments in this study project.”** The skill
245
- reads the notes, checks the cited material, improves the affected explanation and
246
- verifies the result before recording a resolution. Notes and status changes sync
247
- automatically while the preview is open. Your draft is kept if a note changes
248
- elsewhere; choose Use latest or Keep mine before saving. Reload after the agent
249
- rebuilds the teaching content.
116
+ within the same request. Unchanged units and reviewed material are retained. The
117
+ skill audits objective coverage, technical accuracy and distractors, and writes in
118
+ short, direct sentences that keep necessary terms and conditions.
119
+
120
+ The course home introduces the course, resumes where you left off and lists topics
121
+ with progress. Each view ends with a Next link through cards and practice to the
122
+ next unit. Revision pools cards and questions from the topics you choose (all topics
123
+ until you choose) and can focus on cards marked Again and questions you missed. It
124
+ reuses the original items and progress, so changing the topic selection never clears
125
+ results, and it remembers your selection for this course. Formulas and inline
126
+ notation such as `\(v_i\)` compile locally to native MathML; code and dollar signs
127
+ stay literal. The app has light and dark themes and a phone layout.
250
128
 
251
129
  Content lives in `app/content.json`; shared renderer modules and CSS keep the
252
130
  site extensible. Source hashes identify affected units. A stale source stops a
@@ -259,6 +137,8 @@ tum-mcp study inspect ./pse-ws26
259
137
  tum-mcp study build ./pse-ws26
260
138
  ```
261
139
 
140
+ ## Preview the app
141
+
262
142
  From the course project folder, launch the prepared app with:
263
143
 
264
144
  ```sh
@@ -277,25 +157,39 @@ same-origin endpoint. It makes no campus requests.
277
157
  No course credentials are copied into the website. Browser storage holds progress
278
158
  locally. Nothing is published by these commands.
279
159
 
160
+ ## Passage comments
161
+
162
+ Select text in Content, Flashcards, Practice, Exercises or Lecture Notes, then click
163
+ **Comment** to record what is unclear. You can also use Ctrl/Command+Alt+M after
164
+ selecting text. The local preview saves notes in `.tum-mcp/comments.json`, separately
165
+ from learning progress. Click a numbered marker or highlighted text to open its notes
166
+ beside the quote. Notes can be edited, resolved or reopened; changed passages retain
167
+ their original quotes, and Revision notes keep their original topic and item.
168
+
169
+ Tell your agent: **“Address the open comments in this study project.”** The skill
170
+ reads the notes, checks the cited material, improves the affected explanation and
171
+ verifies the result before recording a resolution. Notes and status changes sync
172
+ automatically while the preview is open. Your draft is kept if a note changes
173
+ elsewhere; choose Use latest or Keep mine before saving. Reload after the agent
174
+ rebuilds the teaching content.
175
+
280
176
  ## Prepare weekly exercises
281
177
 
282
178
  Ask `prepare-exercises` to prepare released weekly sheets in the same app. Study
283
- and Exercises can be prepared in either order. When both exist, a selector at the bottom of the sidebar
284
- switches workspaces and remembers the current place. On phones it lives inside the
285
- open course outline; there is no second switch in the reading area. Exercises are
286
- listed directly under sheets, optionally grouped by category.
287
-
288
- The original statement and subparts come first. Students can solve on paper, mark
289
- an exercise Reviewed, reveal a worked solution directly, or open **Guidance**.
290
- Prepared guidance offers one conceptual step, requested hints and specific repair
291
- feedback. Numeric checks state units/tolerance; choice checks have four options.
292
- Fillable tables check numeric cells and explicit text variants individually. Graph
293
- questions support node/edge selections and ordered paths with a visible diagram.
294
- Line graphs allow sample-point placement, coordinate edits and keyboard adjustment.
295
- Long math and programming work use saved writing areas and prepared rubrics; code
296
- is never executed, and symbolic work, proofs and programs are not automatically
297
- graded. Arbitrary graph drawing can use paper and rubric comparison. Typing, hints and step-by-step guidance are optional. Reviewed records an
298
- action, not mastery or an assessment result.
179
+ and Exercises can be prepared in either order. When both exist, the workspace selector
180
+ at the bottom of the outline switches between them and remembers your place; on phones
181
+ it sits inside the open outline. The exercise list groups exercises by sheet and shows
182
+ each sheet's summary and due date when the sources provide them.
183
+
184
+ Each exercise shows the original statement and subparts first. Work on paper or in
185
+ the app, open the worked solution directly, or open **Guidance** for the exercise's
186
+ goals and one step at a time with optional hints and specific feedback. Checks cover
187
+ numbers with units and tolerance, multiple choice, fillable tables, graph selections
188
+ and paths, and plotted sample points. Long math and programming work use saved drafts
189
+ and prepared rubrics; code is never executed, and symbolic work, proofs and programs
190
+ are not graded automatically. Mark an exercise reviewed when you are done; Reviewed
191
+ records an action, not mastery or an assessment result. A Next link leads to the
192
+ following exercise.
299
193
 
300
194
  Drafts and assistance stay in this browser. Editing a checked answer clears its
301
195
  verdict. Semantic changes start fresh progress for only that exercise, while retaining older
@@ -310,8 +204,73 @@ learning revisions, comments, settings and personal files, and stops on customiz
310
204
  generated files, an occupied backup or two layouts. Repeating a completed upgrade
311
205
  is a no-op. Do not create `app/` alongside an existing `study/` by hand.
312
206
 
207
+ ## Publish a study website
208
+
209
+ The `publish-course` skill makes a prepared site accessible from a phone
210
+ or another computer. Its GitHub repository is private; the Pages website is
211
+ public. An eligible paid GitHub plan is required for Pages from private repositories.
212
+ This workflow does not provide private website access. Review lesson text,
213
+ quotations and source links for the intended public audience before publishing.
214
+
215
+ Install GitHub CLI on the execution host and run `gh auth login --hostname github.com`.
216
+ `tum-mcp doctor` checks CLI availability without network access; `doctor --live`
217
+ also verifies GitHub authentication. It does not publish anything, open sign-in
218
+ automatically, extract tokens, or change Git credential settings.
219
+
220
+ ```sh
221
+ # Preview the chosen name and hosting requirements without GitHub mutations.
222
+ tum-mcp study publish --project PROJECT
223
+ # After choosing public website content; the repository stays private.
224
+ tum-mcp study publish --project PROJECT --public-site
225
+ # Optional account/name override on first setup:
226
+ tum-mcp study publish --project PROJECT --public-site --repository OWNER/NAME
227
+ ```
228
+
229
+ Names use `study-<course>-<semester>` in lowercase with hyphens. A collision gets
230
+ a stable course suffix; existing repositories are never made public. Settings in
231
+ `.tum-mcp/github.json` bind updates to that course, semester and repository. A
232
+ failed setup retries the same saved repository rather than creating duplicates.
233
+
234
+ Study is the default hosted workspace, including for old settings. Exercise
235
+ statements, hints and full solutions need explicit `--include-exercises` on the
236
+ publish command after reviewing their public exposure. `--exclude-exercises`
237
+ removes Exercises from subsequent eligible exports, using the same repository and URL. An
238
+ Exercises-only site also requires explicit inclusion. Lecture Notes separately requires
239
+ `--include-lectures`; old settings default to exclusion. `--exclude-lectures` also removes
240
+ previously managed lecture images. A notes-only export with notes excluded is refused.
241
+
242
+ Only the selected generated website renderer and data are uploaded. Downloaded
243
+ originals, credentials, AGENTS.md, study inventory, passage comments, progress,
244
+ audio and arbitrary files stay local. Git itself is not required: the publisher
245
+ uses authenticated GitHub API calls through `gh`. Local publication settings do
246
+ not contain credentials.
247
+
248
+ After setup, successful `tum-mcp study build PROJECT` commands update that same
249
+ repository automatically. Unchanged verified exports require no network calls
250
+ or commits. The study skills finish related edits in one build. Remote edits
251
+ are preserved for review; the publisher never force-pushes.
252
+
253
+ ```sh
254
+ tum-mcp study publish status PROJECT
255
+ tum-mcp study publish sync PROJECT # retry pending/failed deployment
256
+ tum-mcp study publish pause PROJECT # pause future automatic uploads
257
+ tum-mcp study publish resume PROJECT
258
+ tum-mcp study build PROJECT --local-only # skip uploading this build
259
+ ```
260
+
261
+ Uploads are verified against the Pages build and GitHub checks for the exact
262
+ commit. Pending deployment exits with code 2 and is resumable; a successful
263
+ repository update alone is not a deployed site. Authentication, plan or network
264
+ failures preserve the local build. Polling has a budget of at most 60 seconds,
265
+ in addition to bounded API requests.
266
+ The `tum-mcp study` launcher prints local, hosted and repository URLs, plus pending
267
+ or paused status. Study progress remains per browser; passage comments require
268
+ the local preview and are disabled in the hosted export. Device synchronization
269
+ and offline support are not included.
270
+
313
271
  ## Create and maintain audio notes
314
272
 
273
+ Install the optional workflow with `tum-mcp install audio-notes`.
315
274
  Use `prepare-study` to author the interactive course, then ask `audio-notes` to
316
275
  convert that prepared content into spoken lessons. For example:
317
276
 
@@ -380,30 +339,56 @@ for the updated study website”** to reconcile added, changed, removed or moved
380
339
  material with the previous verified coverage. This is an agent skill, not a new
381
340
  `tum-mcp study` CLI subcommand or a built-in speech service.
382
341
 
383
- ## Packaged app template
342
+ ## Studocu materials
343
+
344
+ Install the optional extension with `tum-mcp install studocu` and reload your
345
+ client. Ask `sync-studocu` to collect materials for a course project. It can
346
+ initialize a Studocu-only project with a verified course and semester.
347
+ Search is anonymous and bounded; a limited result set is not a complete inventory.
348
+ `tum-mcp studocu login` explains how to sign in to Studocu in your own browser.
349
+ The extension cannot infer account entitlement or download original files through
350
+ the public MCP. Save an original that your account permits in the browser.
351
+
352
+ The skill records a reviewed selection with `tum-mcp studocu plan PROJECT
353
+ --selection FILE` and tracks it with `tum-mcp studocu status PROJECT --json`.
354
+ Import a selected original with `tum-mcp studocu import PROJECT --document-id ID
355
+ --file FILE`. The document-to-file association is user-selected. Originals go to
356
+ `materials/studocu/summaries`, `materials/studocu/exams` (including mocks and
357
+ solutions), or `materials/studocu/other`. Files remain local and retain their
358
+ original bytes. Consult the skill's collection reference for the selection schema.
359
+ Exact matches in the same group, type and known year share one original through
360
+ a private alias. Each selected document retains its own source identity and URL.
361
+ Changing a document's classification or refreshing its original separates aliases
362
+ when they no longer match; previous versions remain in private history.
363
+ When an existing selection is planned again, unchanged duplicate originals are
364
+ consolidated. Edited or missing files are preserved for review.
365
+
366
+ Local study material can cite student uploads. Publishing rejects included
367
+ Studocu-backed sources; this source check cannot identify uncited copied text or
368
+ replace a review of the published content.
384
369
 
385
- The shared web-app template is packaged in `bundled/course_app/site/`, separately from skill instructions.
386
- It includes the shell, navigation, flip cards, practice, diagrams and styling.
387
- Agents author course content in `app/content.json`; `study build` installs the
388
- shared template, preserves customized files and checks sources. This keeps new
389
- course sites consistent without rebuilding the interface. `tum-mcp study template`
390
- shows the bundled files and their combined revision for reproducible development.
370
+ ## The course app
391
371
 
392
- ## Try the component template
372
+ The shared course app is packaged in `bundled/course_app/site/`, separately from the
373
+ skill instructions. It owns layout, styling and interaction for Study, Exercises and
374
+ Lecture Notes. Agents author only course content; `study build` installs the app,
375
+ preserves customized files and checks sources, so courses gain app improvements
376
+ without rewriting content. `tum-mcp study template` shows the bundled files and
377
+ their combined revision for reproducible development.
393
378
 
394
- After installing a locally built development artifact:
379
+ To see every component with synthetic data:
395
380
 
396
381
  ```sh
397
382
  tum-mcp study demo ./component-preview
398
383
  tum-mcp study serve ./component-preview
399
384
  ```
400
385
 
401
- This creates one small Study unit and one exercise covering prose, code, tables,
402
- formulas, graph/process diagrams, cards and response controls. It is a reusable
403
- component template, not necessarily a good teaching or question-authoring example.
404
- Actual course authoring follows reviewed sources and the preparation skills. Rich
405
- learning pilots stay in private test fixtures.
406
- It uses no campus account. An existing edited demo is preserved.
386
+ The demo creates one small Study unit and one exercise covering prose, code, tables,
387
+ formulas, graph/process diagrams, cards and response controls. It is a format
388
+ reference, not necessarily a good teaching or question-authoring example; actual
389
+ course authoring follows reviewed sources and the preparation skills. Rich learning
390
+ pilots stay in private test fixtures. It uses no campus account, and an existing
391
+ edited demo is preserved.
407
392
 
408
393
  ## Local helper inputs
409
394
 
package/docs/tum-mcp.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Package: `@jamestesting888/tum-mcp`, CLI: `tum-mcp`, backend: Python 3.13.
4
4
  The package combines read-only course retrieval, managed client installation and
5
- six local course workflows.
5
+ five base course workflows and three optional extensions.
6
6
 
7
7
  ## Current capabilities
8
8
 
@@ -96,15 +96,15 @@ browser onboarding. See [setup](setup.md) for browser choices and WSL.
96
96
  ## Connections and read access
97
97
 
98
98
  ```sh
99
- tum-mcp connect
100
- tum-mcp status
99
+ tum-mcp login
100
+ tum-mcp doctor
101
101
  tum-mcp discover artemis ACCOUNT_ID
102
102
  tum-mcp discover zulip ACCOUNT_ID
103
103
  tum-mcp --help
104
104
  tum-mcp study build --help
105
105
  ```
106
106
 
107
- `connect` takes no arguments or connection options. Move with up/down, toggle
107
+ `login` takes no arguments or connection options. Move with up/down, toggle
108
108
  services with Space, and press Enter. Choose a browser when more than one is
109
109
  installed. Only selected tabs open in one temporary browser context. Moodle,
110
110
  Artemis, Zulip and TUMonline all follow this flow.
@@ -152,7 +152,7 @@ the command offers a numbered text prompt instead.
152
152
  When multiple accounts exist, add `--account ACCOUNT_ID`. Reconnecting preserves
153
153
  the policy. `tum-mcp manage tumonline --disconnect` removes the local TUMonline
154
154
  credential and retains the policy; it does not revoke remote sessions. An expired
155
- session requires `tum-mcp connect` again. If the policy is missing or corrupt, use
155
+ session requires `tum-mcp login` again. If the policy is missing or corrupt, use
156
156
  `tum-mcp manage tumonline --account ACCOUNT_ID --disconnect` to remove that saved
157
157
  session without resetting permissions or affecting other providers.
158
158
 
@@ -225,10 +225,12 @@ writing files with activation.
225
225
 
226
226
  The Codex adapter uses a contained Node launcher to pin the managed Python in
227
227
  isolated mode; portable stdio manifests require a bare or contained executable.
228
- The shipped pack contains six skills: `read-content`, `sync-course`,
229
- `prepare-study`, `prepare-exercises`, `audio-notes` and `publish-course`. Website-specific retrieval
230
- guidance is loaded from references within read-content. Teaching, schema and design contracts live
231
- with prepare-study; the renderer and synthetic example ship as reusable assets.
228
+ The base pack contains five skills: `read-content`, `sync-course`,
229
+ `prepare-study`, `prepare-exercises` and `publish-course`. Optional extensions add
230
+ `prepare-lecture`, `sync-studocu` and `audio-notes`; choose them with `tum-mcp install`.
231
+ Website-specific retrieval guidance is loaded from references within read-content.
232
+ Teaching and content guidance lives with prepare-study; the course app and its
233
+ synthetic example ship as reusable assets and define the site's design.
232
234
  Audio Notes converts prepared content into category tracks and maintains coverage,
233
235
  scripts, voice settings, candidates and archives under the course's `audio/` root.
234
236
  Publish Course uses host GitHub CLI authentication to create a private repository
@@ -246,7 +248,7 @@ routing quality is a separate evaluation from structural and discovery checks.
246
248
  Claude's invocation metadata follows each workflow's selected policy; automatic
247
249
  selection is enabled by default and never grants permission for a mutation.
248
250
 
249
- `setup --client cursor` writes `~/.cursor/mcp.json` and installs all six skills
251
+ `setup --client cursor` writes `~/.cursor/mcp.json` and installs the active skills
250
252
  under `~/.cursor/skills/`.
251
253
  `setup --client antigravity` installs the same skills under `~/.gemini/config/skills/`
252
254
  and writes `~/.gemini/config/mcp_config.json`; an existing
@@ -318,4 +320,4 @@ course material, local agent notes and screenshots stay under ignored local path
318
320
  Maintainer checks include a reviewed tarball inventory, integrity checks and an
319
321
  isolated consumer install. Never publish or stage npm packages as a test. Registry
320
322
  publication is an explicit maintainer action.
321
- `tum-mcp status` reports registry state as `not_checked`; it reads local configuration.
323
+ `tum-mcp doctor` reads local configuration and does not check the npm registry.
@@ -1,5 +1,5 @@
1
1
  {
2
- "wheel": "tum_mcp-0.9.0-py3-none-any.whl",
3
- "wheelSha256": "0af36e0b89e055a49ae7a8cfa144ff98fdd4feb9e82b724e6ee629f8f4e51b7b",
2
+ "wheel": "tum_mcp-0.9.2-py3-none-any.whl",
3
+ "wheelSha256": "ae00fa0b013a30dc0559d9282b0778a213045c53e367aa2e423c25e286a9e308",
4
4
  "requirementsSha256": "39a401b6e606d3292eb91b8fe9ef60367d4852f203eb409dc52f38b76e513ccf"
5
5
  }
@@ -72,7 +72,7 @@ async function operate(job) {
72
72
  const staging = join(job.temporary, 'prepared');
73
73
  runNpm(job.npm, ['install', '--prefix', staging, '--global=false', archive], true);
74
74
  const prepared = join(staging, 'node_modules', packageName);
75
- runLauncher(prepared, ['setup'], true);
75
+ runLauncher(prepared, ['setup', '--runtime-only'], true);
76
76
  // Only a healthy prepared release may replace the user's npm installation.
77
77
  runNpm(job.npm, ['install', ...scope, job.target.global ? archive : `${packageName}@${latest}`]);
78
78
  if (JSON.parse(readFileSync(join(job.root, 'package.json'), 'utf8')).version !== latest) throw new Error('npm did not install the selected version; client activation was stopped.');
package/npm/tum-mcp.mjs CHANGED
@@ -4,61 +4,87 @@ import { readFileSync } from 'node:fs';
4
4
  import { parseArgs } from 'node:util';
5
5
  import { acquireSetupLock, currentPython, dataRoot, ensureRuntime, removeRuntimeFiles } from './runtime.mjs';
6
6
  import { managePackage } from './package-manager.mjs';
7
+ import { printHelp } from './ui.mjs';
7
8
 
8
9
  let args = process.argv.slice(2);
9
10
  const version = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
10
11
  try {
11
- if (args.length === 0 || (args.length === 1 && ['--help', '-h'].includes(args[0]))) {
12
- console.log(`TUM MCP ${version}
13
- Usage: tum-mcp COMMAND [OPTIONS]
14
-
15
- setup Configure your coding client and managed runtime
16
- install Install an optional extension: lecture or studocu
17
- connect Sign in to selected campus services
18
- status Show saved connections
19
- discover List accessible courses or channels
20
- doctor Check installation and authentication
21
- update Update the package and configured clients
22
- uninstall Remove managed setup and the npm package
23
- logout Remove one saved connection
24
- serve Run the MCP server over stdio
25
- version Show the installed version
26
- skills Manage local workflow skills
27
- extensions Manage optional extensions
28
- studocu Manage selected Studocu materials
29
- study Prepare, preview and publish a course app
30
-
31
- Use --help for options, for example: tum-mcp study build --help
32
- Run setup to provision the managed backend, then connect to sign in.
33
- Reads use your campus account permissions; no local scope selection is needed.`);
12
+ const wantsHelp = args.length === 0 || args.some(arg => ['--help', '-h'].includes(arg));
13
+ const helpPython = wantsHelp ? currentPython() : null;
14
+ if (helpPython) {
15
+ const forwarded = args.length ? args.filter(arg => !['--local', '--keep-package'].includes(arg)) : ['--help'];
16
+ const env = { ...process.env }; delete env.PYTHONPATH; delete env.PYTHONHOME;
17
+ const child = spawnSync(helpPython, ['-I', '-m', 'tum_mcp', ...forwarded], { env, stdio: 'inherit', shell: false });
18
+ if (child.error) throw new Error('Managed backend could not start; run setup again.');
19
+ process.exitCode = child.status ?? 1;
20
+ } else if (args.length === 0 || (args.length === 1 && ['--help', '-h'].includes(args[0]))) {
21
+ printHelp(version, 'Campus tools and local study workflows.', 'tum-mcp [OPTIONS] COMMAND [ARGS]...', [
22
+ ['Options', [['--version', 'Show the installed version.'], ['-h, --help', 'Show this help.']]],
23
+ ['Commands', [
24
+ ['setup', 'Configure your coding client and managed runtime.'],
25
+ ['login', 'Sign in to selected campus services.'],
26
+ ['doctor', 'Show connections, extensions and relevant client/runtime health.'],
27
+ ['install', 'Choose optional Lecture, Studocu or Audio Notes workflows.'],
28
+ ['uninstall', 'Choose extensions or All to remove TUM MCP.'],
29
+ ['manage', 'Manage TUMonline permissions.'],
30
+ ['skills', 'Inspect and validate workflow skills.'],
31
+ ['study', 'Prepare, preview and publish a course app.'],
32
+ ['lecture', 'Prepare lecture recording evidence (optional extension).'],
33
+ ['studocu', 'Collect selected supplementary materials (optional extension).'],
34
+ ['discover', 'List accessible courses or channels.'],
35
+ ['update', 'Update the package and configured clients.'],
36
+ ['logout', 'Remove one saved connection.'],
37
+ ['serve', 'Run the MCP server over stdio.'],
38
+ ['version', 'Show the installed version.'],
39
+ ]],
40
+ ['Get started', [['tum-mcp setup --client codex', 'Prepare the backend and a client.'], ['tum-mcp login', 'Choose services and sign in.']]],
41
+ ]);
34
42
  } else if (['--version', 'version'].includes(args[0])) {
35
43
  console.log(version);
36
44
  } else if (args[0] === 'install' && args.some(arg => ['--help', '-h'].includes(arg))) {
37
- console.log('Usage: tum-mcp install lecture [--asr|--no-asr] | tum-mcp install studocu\nInstall an optional Lecture or Studocu workflow and its tools. Lecture recognition dependencies are isolated; models load on demand.');
38
- } else if (['setup', 'update', 'uninstall'].includes(args[0]) && !['lecture', 'studocu'].includes(args[1]) && args.some(arg => ['--help', '-h'].includes(arg))) {
45
+ printHelp(version, 'Choose optional workflows to install, or provide their names.', 'tum-mcp install [lecture|studocu|audio-notes]... [OPTIONS]', [
46
+ ['Options', [['--asr / --no-asr', 'Provision isolated lecture recognition; models load on demand.'], ['--json', 'Print machine-readable results.'], ['-h, --help', 'Show this help.']]],
47
+ ]);
48
+ } else if (['setup', 'update', 'uninstall'].includes(args[0]) && args.some(arg => ['--help', '-h'].includes(arg))) {
39
49
  const help = {
40
- update: 'Usage: tum-mcp update [--local]\nInstall the latest npm release and refresh configured clients.\n--local refreshes this installed version without contacting npm.',
41
- setup: 'Usage: tum-mcp setup [--client codex|claude|cursor|antigravity|generic] [--host local|windows]\nProvision the managed runtime and register explicitly selected clients.',
42
- uninstall: 'Usage: tum-mcp uninstall [--all] [--purge-runtime] [--forget-credentials]\nRemove managed client setup and this npm installation. Saved data is retained by default.\n--client NAME removes one client only. --keep-package keeps npm installed.',
50
+ update: {
51
+ description: 'Install the latest npm release and refresh configured clients.',
52
+ usage: 'tum-mcp update [OPTIONS]',
53
+ options: [['--local', 'Refresh the installed version without contacting npm.']],
54
+ },
55
+ setup: {
56
+ description: 'Prepare the runtime and choose coding clients to configure.',
57
+ usage: 'tum-mcp setup [OPTIONS]',
58
+ options: [['--client NAME', 'Choose codex, claude, cursor, antigravity or generic; repeat as needed.'], ['--host local|windows', 'Choose the client host; windows is for WSL registrations.']],
59
+ },
60
+ uninstall: {
61
+ description: 'Remove managed setup while retaining saved user data by default.',
62
+ usage: 'tum-mcp uninstall [lecture|studocu|audio-notes]... [OPTIONS]',
63
+ options: [['(no arguments)', 'Choose extensions or All in the interactive picker.'], ['--client NAME', 'Remove one client registration.'], ['--host local|windows', 'Choose the client host.'], ['--purge-runtime', 'Remove verified runtimes when All is selected.'], ['--forget-credentials', 'Forget saved credentials when All is selected.']],
64
+ },
43
65
  };
44
- console.log(help[args[0]]);
66
+ const selected = help[args[0]];
67
+ printHelp(version, selected.description, selected.usage, [
68
+ ['Options', [...selected.options, ['-h, --help', 'Show this help.']]],
69
+ ]);
45
70
  } else {
46
- if (args[0] === 'install' && !['lecture', 'studocu'].includes(args[1])) throw new Error('Usage: tum-mcp install lecture [--asr|--no-asr] | tum-mcp install studocu.');
71
+ const hasExtension = args.slice(1).some(arg => ['lecture', 'studocu', 'audio-notes'].includes(arg));
47
72
  let packageAction = args[0] === 'update';
48
73
  if (args[0] === 'update') {
49
74
  if (args.length > 2 || (args.length === 2 && args[1] !== '--local')) throw new Error('Usage: tum-mcp update [--local]. Use --help for details.');
50
75
  if (args[1] === '--local') { packageAction = false; args = ['update']; }
51
76
  }
52
- if (args[0] === 'uninstall' && !['lecture', 'studocu'].includes(args[1])) {
77
+ if (args[0] === 'uninstall' && !hasExtension) {
53
78
  const { values } = parseArgs({ args: args.slice(1), options: {
54
79
  all: { type: 'boolean' }, client: { type: 'string' }, host: { type: 'string' },
55
- 'keep-package': { type: 'boolean' }, 'purge-runtime': { type: 'boolean' }, 'forget-credentials': { type: 'boolean' },
80
+ 'keep-package': { type: 'boolean' }, 'purge-runtime': { type: 'boolean' }, 'forget-credentials': { type: 'boolean' }, json: { type: 'boolean' },
56
81
  } });
57
82
  if (values.host && !['local', 'windows'].includes(values.host)) throw new Error('Choose --host local or windows.');
58
83
  if (values.client !== undefined && !['codex', 'claude', 'cursor', 'antigravity', 'generic'].includes(values.client)) throw new Error('Choose a supported --client name.');
59
84
  if (values.client && (values.all || values['purge-runtime'] || values['forget-credentials'])) throw new Error('Client-only removal cannot use --all or data/runtime cleanup options.');
60
- if (!values.client && !values.all) args.push('--all');
61
- packageAction = !values.client && !values['keep-package'];
85
+ if (values.all && values.json) throw new Error('--json requires named extensions.');
86
+ if (values['keep-package'] && !values.all && !values.client) throw new Error('Use --client for registration-only removal.');
87
+ packageAction = Boolean(values.all) && !values['keep-package'];
62
88
  args = args.filter(arg => arg !== '--keep-package');
63
89
  }
64
90
  if (packageAction) {
@@ -69,12 +95,15 @@ Reads use your campus account permissions; no local scope selection is needed.`)
69
95
  if (!python) throw new Error('SETUP_REQUIRED: Run tum-mcp setup first.');
70
96
  const forwarded = args;
71
97
  const env = { ...process.env, TUM_MCP_NPM_LAUNCHER: '1' }; delete env.PYTHONPATH; delete env.PYTHONHOME;
72
- const purge = args[0] === 'uninstall' && args.includes('--purge-runtime');
98
+ const purge = args[0] === 'uninstall' && args.includes('--purge-runtime') && args.includes('--all');
73
99
  const release = purge ? await acquireSetupLock() : null;
74
100
  try {
75
101
  const child = spawnSync(python, ['-I', '-m', 'tum_mcp', ...forwarded], { env, stdio: 'inherit', shell: false });
76
102
  if (child.error) throw new Error('Managed backend could not start; run setup again.');
77
103
  process.exitCode = child.status ?? (child.signal === 'SIGINT' ? 130 : 1);
104
+ if (args[0] === 'uninstall' && child.status === 20) {
105
+ process.exitCode = await managePackage('uninstall', [...args.slice(1), '--all'], dataRoot());
106
+ }
78
107
  if (purge && child.status === 0) await removeRuntimeFiles();
79
108
  } finally { if (release) await release(); }
80
109
  }
package/npm/ui.mjs ADDED
@@ -0,0 +1,51 @@
1
+ // Bootstrap help stays available before Python setup; installed help uses the backend.
2
+ const color = process.stdout.isTTY && !('NO_COLOR' in process.env) && process.env.TERM !== 'dumb';
3
+ const width = Math.min(Number(process.env.COLUMNS) || process.stdout.columns || 80, 100);
4
+ const styled = (text, code) => color ? `\x1b[${code}m${text}\x1b[0m` : text;
5
+
6
+ function line(text, indent = '') {
7
+ const available = Math.max(16, width - indent.length);
8
+ let remaining = text;
9
+ while (remaining.length > available) {
10
+ const space = remaining.lastIndexOf(' ', available);
11
+ const end = space > 0 ? space : available;
12
+ console.log(indent + remaining.slice(0, end));
13
+ remaining = remaining.slice(end).trimStart();
14
+ }
15
+ console.log(indent + remaining);
16
+ }
17
+
18
+ export function printHelp(version, description, usage, sections = []) {
19
+ console.log(`${styled('TUM MCP', '1')} Help ${styled(version, '2')}`);
20
+ line(description);
21
+ console.log();
22
+ line('Usage');
23
+ line(usage, ' ');
24
+ console.log();
25
+ for (const [title, rows] of sections) {
26
+ console.log(styled(title, '1'));
27
+ const labelWidth = Math.max(...rows.map(([label]) => label.length)) + 2;
28
+ for (const [label, detail] of rows) {
29
+ if (width < 70 || labelWidth > width / 2) {
30
+ line(label);
31
+ line(detail, ' ');
32
+ } else {
33
+ const prefix = label.padEnd(labelWidth);
34
+ const available = Math.max(16, width - prefix.length);
35
+ const words = detail.split(' ');
36
+ let row = '';
37
+ let first = true;
38
+ for (const word of words) {
39
+ if (row && row.length + word.length + 1 > available) {
40
+ console.log((first ? prefix : ' '.repeat(labelWidth)) + row);
41
+ first = false;
42
+ row = '';
43
+ }
44
+ row += (row ? ' ' : '') + word;
45
+ }
46
+ console.log((first ? prefix : ' '.repeat(labelWidth)) + row);
47
+ }
48
+ }
49
+ console.log();
50
+ }
51
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamestesting888/tum-mcp",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Read-only TUM campus tools and source-backed study, exercise and lecture workflows",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "files": [
14
14
  "npm/tum-mcp.mjs",
15
+ "npm/ui.mjs",
15
16
  "npm/runtime.mjs",
16
17
  "npm/download.mjs",
17
18
  "npm/lock.mjs",