@jamestesting888/tum-mcp 0.0.0-stage → 0.4.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.
@@ -0,0 +1,245 @@
1
+ # TUM MCP 0.4.0 guide
2
+
3
+ Package: `@jamestesting888/tum-mcp`, CLI: `tum-mcp`, backend: Python 3.13.
4
+ Version 0.4.0 is distributed as a public read/local-assistance pilot. The complete
5
+ revision 3 remote workflow is not included; its approval and host boundaries
6
+ remain unverified and its remote-action tools remain disabled.
7
+
8
+ ## Current capabilities
9
+
10
+ The campus server preserves all sixteen `moodle_*` tools and the existing Moodle
11
+ session/keychain identity. It adds scoped Zulip channel search/topic reads,
12
+ released Artemis programming statements, exact-revision visible feedback,
13
+ participation-bound workspace preparation, approved container test recipes,
14
+ submission previews, and seven portable workflow skills.
15
+
16
+ Remote start, push, submit, rebuild, Zulip posting, and DMs are unavailable.
17
+ An internal, release-gated executor covers exact-action fingerprints, encrypted
18
+ expiring one-use grants, account/scope/credential revalidation, and durable
19
+ unknown-outcome receipts. Synthetic tests cover one POST or exact-commit push,
20
+ copied/fabricated approvals, changed targets, and lost responses. No MCP write
21
+ tool, approval issuer, or preference can open this development release's gate.
22
+ The internal executor is groundwork for Phase 5; no live-action certification is claimed.
23
+ Revision 3 Phase 5 needs a demonstrated trusted approval/credential boundary and
24
+ safe practice-exercise verification before those tools can be exposed. A
25
+ submission preview never performs a commit or remote action. Native Git/browser
26
+ tools available to an unrestricted host remain outside the MCP enforcement
27
+ boundary; the server does not claim to prevent every host-level push.
28
+
29
+ The verified public origins are `https://artemis.tum.de` and
30
+ `https://zulip.cit.tum.de`. Public discovery on 24 October 2026 reported Artemis
31
+ 10.4, source revision `d8594cc5fb2f2ec276bd123861be7ff20c1b3cc0`, and Zulip 12.0,
32
+ feature level 498, with TUM Shibboleth. No account permission follows from that
33
+ public discovery. Provider routes were checked against that Artemis revision.
34
+
35
+ ## Build and test the local package
36
+
37
+ For normal installation, use `npm install --global @jamestesting888/tum-mcp@0.4.0`
38
+ and `tum-mcp setup --client codex`. The following commands are for maintainers.
39
+
40
+ ```sh
41
+ uv sync --locked
42
+ uv run ruff check src tests plugin/scripts scripts
43
+ uv run ruff format --check src tests plugin/scripts scripts
44
+ uv run pytest -q -m 'not live'
45
+ node npm/build.mjs
46
+ npm test
47
+ npm pack --ignore-scripts --pack-destination dist
48
+ npm run test:consumer -- dist/jamestesting888-tum-mcp-0.4.0.tgz
49
+ ```
50
+
51
+ The npm artifact has an explicit file allowlist, a bundled backend wheel,
52
+ hash-pinned dependency requirements, backend integrity metadata, and pinned uv
53
+ artifacts with SHA-256 checksums. `npm install` has no lifecycle setup/login
54
+ hooks. uv's generated output-directory ignore file is overridden specifically so
55
+ the required backend enters the tarball. Inspect the tarball before distribution.
56
+
57
+ Install the tarball into a temporary directory for testing, then run its binary:
58
+
59
+ ```sh
60
+ npm install --prefix /path/to/test-profile --ignore-scripts /path/to/package.tgz
61
+ /path/to/test-profile/node_modules/.bin/tum-mcp setup --client generic
62
+ ```
63
+
64
+ Use `TUM_MCP_DATA_DIR` and `TUM_MCP_CONFIG_DIR` to isolate testing from real campus
65
+ state. Never change the maintainer's actual client configuration just to test
66
+ packaging. Setup provisions a private, versioned Python runtime using uv 0.12.5
67
+ and Python 3.13.15; an existing matching uv, including the verified cached download,
68
+ is reused. Source checkouts and system
69
+ Python are unnecessary for consumers. Supported bootstrap targets are macOS
70
+ arm64/x64, Windows arm64/x64, and glibc Linux arm64/x64; hands-on verification is
71
+ recorded separately. Linux still needs a native Secret Service for credentials.
72
+ Clean consumer bootstrap, idempotent setup, diagnostics, and skill validation
73
+ passed on macOS ARM64 and in Linux ARM64 and x86_64 containers. The x86_64 check
74
+ ran through Docker amd64 emulation on an ARM64 Mac; packaged MCP protocol checks
75
+ and an encrypted credential round trip through a real GNOME Secret Service in an
76
+ isolated D-Bus session also passed. Real Linux desktop browser sign-in, macOS x64,
77
+ and Windows hands-on checks remain open. The installer targets glibc Linux
78
+ x86_64/amd64 and aarch64/ARM64.
79
+
80
+ `update` provisions the backend bundled in the invoked package and preserves
81
+ older runtime directories. To obtain a newer public package after publication,
82
+ invoke its reviewed version explicitly. It does not publish a release or replace
83
+ customized client skills silently. If interrupted setup leaves `setup.lock`,
84
+ confirm that no setup process is running before removing that directory locally.
85
+ An invalid or incomplete runtime is never selected for serving. Failed validation
86
+ clears its ready marker so explicit setup can rebuild it; older runtimes remain
87
+ available to existing client registrations. Use an older reviewed package and
88
+ rerun its setup to restore that runtime, reviewing any client configuration diff.
89
+
90
+ For platforms outside the bootstrap targets, the source installation needs
91
+ Python 3.13+, uv, Git, and a native credential store: run `uv sync --locked`, then
92
+ `uv run tum-mcp setup --client generic` from the checkout. Chrome is needed for
93
+ browser onboarding. Docker is needed only for isolated assignment tests.
94
+
95
+ ## Connections and scopes
96
+
97
+ ```sh
98
+ tum-mcp connect campus
99
+ tum-mcp status
100
+ tum-mcp discover artemis ACCOUNT_ID
101
+ tum-mcp discover zulip ACCOUNT_ID
102
+ tum-mcp scope artemis ACCOUNT_ID --course COURSE_ID --sensitive --workspace
103
+ tum-mcp scope zulip ACCOUNT_ID --channel CHANNEL_ID
104
+ ```
105
+
106
+ `connect campus` opens Artemis and Zulip in one temporary Chrome context for
107
+ user-driven sign-in/MFA; the identity provider can reuse its session between tabs.
108
+ Only each service's own host cookies are encrypted and saved. Identity-provider
109
+ cookies are discarded when the browser closes. Single-service commands remain
110
+ available as `connect artemis` and `connect zulip`.
111
+
112
+ Zulip browser sessions use its read-only `/json/` routes; API-key authentication
113
+ uses `/api/v1/`. A successful authenticated `/json/users/me` read was verified on
114
+ TUM's deployment. This separation is also documented in
115
+ [Zulip's dispatcher](https://github.com/zulip/zulip/blob/12.0/zerver/lib/rest.py).
116
+ Session expiry requires browser reconnection. API keys are optional:
117
+ `connect zulip --auth api-key` imports an existing key through hidden local input.
118
+ Never paste credentials in chat. Browser login and Artemis Git access remain
119
+ separate capabilities. Existing scopes survive reconnection; new identities start
120
+ with empty scopes. Private channels additionally require `--private-channel ID` while
121
+ remaining in `--channel ID`. `--sensitive` enables own Artemis participation and
122
+ feedback reads; `--workspace` separately enables preparation under the configured
123
+ workspace root. Neither authorizes submission.
124
+
125
+ On 24 October 2026, both saved browser-session credentials passed identity
126
+ verification through the actual MCP process. Scoped Artemis exercise listing and
127
+ statement retrieval, plus a bounded Zulip channel search, passed. No participation
128
+ was started, code pushed, message sent, or read flag changed by these checks.
129
+
130
+ Settings live outside the installed package in `TUMMCP/config/preferences.json`.
131
+ The default data directory is beside the legacy `TUMMoodle` directory on each OS.
132
+ Existing Moodle data is retained in place, preserving the keychain lookup. New
133
+ service credentials are encrypted separately with an account/provider/origin-bound
134
+ identity and a native credential-store key. There is no plaintext fallback.
135
+ For the platform trade-offs, upstream examples, and the distinction between
136
+ Keychain and desktop-app permissions, see
137
+ [credential storage options](credential-storage-options.md). Use the installed
138
+ `tum-mcp` runtime from the first login to avoid development-to-packaged Python
139
+ permission changes.
140
+ Zulip message text is retrieved live and is not persisted. Retrieved excerpts may
141
+ be transmitted to the coding agent's configured AI provider. Moodle's existing
142
+ document cache retains its documented plaintext/expiry behavior.
143
+
144
+ Course nicknames can be mapped in `mappings` using explicit per-service IDs.
145
+ The tools resolve one exact mapping; ambiguity never grants broader access.
146
+
147
+ ## Assignment workspaces and tests
148
+
149
+ The user requests `artemis_prepare_workspace` with explicit account/course/
150
+ exercise IDs and graded/practice mode. Missing participation returns
151
+ `ACTION_REQUIRED`; preparation never starts it. Offline IDE access must be
152
+ affirmatively enabled. Import an existing participation-scoped Git token locally:
153
+
154
+ ```sh
155
+ tum-mcp workspace connect-git ACCOUNT_ID COURSE_ID EXERCISE_ID
156
+ ```
157
+
158
+ The hidden clone URL must match the server-reported participation repository.
159
+ It is sanitized before storage/output. A narrow Git credential helper supplies
160
+ the token only to that HTTPS repository. Clone uses no inherited credential
161
+ helpers, external Git protocols, hooks, submodules, or dependency installers.
162
+ Existing unrelated/dirty work is preserved. Local receipt files contain IDs,
163
+ workspace, mode, branch, and revision, never tokens.
164
+
165
+ Configure `test_recipes` locally with a unique `name`, exact `account_id`,
166
+ `course_id`, an image pinned as `registry/image@sha256:DIGEST`, an `argv` array,
167
+ `timeout_seconds`, and `verification_level` (`targeted` by default, or `full`
168
+ after reviewing the complete test command). Submission preflight requires a
169
+ passing `full` recipe for the exact content. Review the recipe and obtain its
170
+ image/dependencies as a separate step. The runner uses an already-present image (`--pull=never`), no
171
+ network, no home/keychain/SSH mounts, a read-only container filesystem, dropped
172
+ capabilities, and CPU/memory/process/time/output limits. Only the assignment
173
+ workspace is mounted read/write, with its Git metadata mounted read-only.
174
+ Receipts record exit status, source fingerprints, recipe, image, timestamps,
175
+ and bounded output. A missing engine or recipe fails
176
+ closed. Evidence is encrypted/authenticated outside the assignment directory;
177
+ editing a workspace JSON file cannot fabricate a passing receipt. Ordinary
178
+ host-native testing does not acquire these isolation guarantees.
179
+
180
+ ## Client and skill setup
181
+
182
+ `setup --client codex` prepares a local plugin/marketplace entry using the
183
+ portable Agent Plugins schemas. Enable it in
184
+ Codex Plugins, restart, and verify real tool and skill loading. Disable the legacy
185
+ TUM Moodle plugin when switching so duplicate tools/skills are not active.
186
+ The old installation remains available for rollback. Setup reports required UI
187
+ steps and never equates writing files with activation.
188
+
189
+ The Codex adapter uses a contained Node launcher to pin the managed Python in
190
+ isolated mode; portable stdio manifests require a bare or contained executable.
191
+ Disposable-profile checks with Codex CLI 0.164.0 discovered all seven campus
192
+ skills and 36 tools with no discovery error. Claude Code 2.1.304 connected to the
193
+ stdio process. `scripts/verify_campus_clients.py` reproduces those checks without
194
+ running another coding agent or changing real user profiles. After a user restart,
195
+ an active Codex desktop chat also loaded all 36 tools, verified both provider
196
+ identities, and passed scoped Artemis exercise and Zulip message reads.
197
+ Host/model activation trials remain a separate gate.
198
+
199
+ `setup --client claude` preserves unrelated user configuration, registers the
200
+ local MCP server, and installs the skill pack. Codex's submission invocation
201
+ policy and Claude's `disable-model-invocation` metadata are handled independently.
202
+ Generic clients receive configuration plus optional manual skill export.
203
+
204
+ ```sh
205
+ tum-mcp skills list
206
+ tum-mcp skills inspect tum-zulip-research
207
+ tum-mcp skills customize tum-zulip-research
208
+ tum-mcp skills diff tum-zulip-research
209
+ tum-mcp skills validate
210
+ tum-mcp skills export /path/to/new/export-folder
211
+ ```
212
+
213
+ Personal overrides stay in the user configuration directory. Installation
214
+ refuses conflicting/customized copies rather than overwriting them. Review an
215
+ exported diff and retain a backup when applying an update. Structural validation
216
+ checks metadata, real tool references, and invocation policy. It does not measure
217
+ model activation precision or recall. The original 95% targets, repeated held-out
218
+ trials, and two review passes have not been demonstrated for this pilot.
219
+ Export refuses symbolic links and
220
+ does not overwrite an existing destination.
221
+
222
+ The bundled activation corpus has 140 cases (16 development and four held-out
223
+ cases per skill), including explicit/implicit requests, adjacent negatives, and
224
+ missing credentials. `skills evaluate TRIALS.jsonl` scores supplied fresh-session
225
+ records separately by host/version/model. Each record follows `Trial` in
226
+ `skill_validation.py` and references its retained raw trace by SHA-256. The scorer
227
+ does not launch other agents or certify the supplied traces, summary quality,
228
+ or platform acceptance. Inspect traces and backend effects before approving a
229
+ release; no measured activation accuracy is claimed by the structural checks.
230
+
231
+ ## Release scope
232
+
233
+ The maintainer authorized public npm distribution of the current 0.4.0 pilot.
234
+ This does not certify the complete revision 3 workflow or all desktop targets.
235
+ Host/model skill-selection trials, native Windows/macOS x64 onboarding, and real
236
+ Linux desktop browser sign-in remain incomplete. Remote workflows also need a
237
+ trusted approval/host credential boundary and safe practice verification before
238
+ they can be exposed. Browser sign-in alone does not establish a saved backend connection.
239
+
240
+ Maintainer checks include the relevant tests, a reviewed tarball inventory,
241
+ integrity checks, and an isolated consumer install. Never publish or stage npm
242
+ packages as a test. Review and authorization of a registry upload are separate
243
+ from a GitHub source push; this pilot is being published to npm first.
244
+ `tum-mcp status` reports registry state as `not_checked`, since it inspects local
245
+ configuration without making registry requests.
@@ -0,0 +1,5 @@
1
+ {
2
+ "wheel": "tum_moodle_integration-0.4.0-py3-none-any.whl",
3
+ "wheelSha256": "0cc237d6c11d0837942f3a5dcf9f28903177596b586bff1d34fe53b4e436970b",
4
+ "requirementsSha256": "2ce7807c938fb7aa2e74fbc9537555830240ea43a2858c2f436ba5efd031dda6"
5
+ }