monash-study-kit 1.5.0__tar.gz → 1.7.0__tar.gz

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.
Files changed (129) hide show
  1. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/CHANGELOG.md +20 -0
  2. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/PKG-INFO +22 -6
  3. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/README.md +21 -5
  4. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/README.zh-CN.md +24 -6
  5. monash_study_kit-1.7.0/docs/SECURITY-REVIEW-1.5-SCOPE.md +38 -0
  6. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/security.md +2 -0
  7. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/skills/monash-study-kit/SKILL.md +1 -0
  8. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/__init__.py +1 -1
  9. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/cli.py +53 -10
  10. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/cli_ed.py +24 -0
  11. monash_study_kit-1.7.0/src/monash_study_kit/edexport.py +140 -0
  12. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/help_menu.py +1 -0
  13. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/lesson_reader.py +3 -0
  14. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/lessons.py +160 -22
  15. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/library.py +56 -8
  16. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/mcp_server.py +56 -4
  17. monash_study_kit-1.7.0/src/monash_study_kit/semester.py +129 -0
  18. monash_study_kit-1.7.0/tests/test_ed_export.py +214 -0
  19. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_mcp.py +5 -3
  20. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_panels.py +1 -1
  21. monash_study_kit-1.7.0/tests/test_semester.py +65 -0
  22. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  23. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  24. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  25. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.github/pull_request_template.md +0 -0
  26. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.github/workflows/release.yml +0 -0
  27. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.github/workflows/test.yml +0 -0
  28. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/.gitignore +0 -0
  29. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/CODE_OF_CONDUCT.md +0 -0
  30. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/CONTRIBUTING.md +0 -0
  31. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/LICENSE +0 -0
  32. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/PRIVACY.md +0 -0
  33. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/SECURITY.md +0 -0
  34. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/adr/0001-one-shared-core.md +0 -0
  35. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/adr/0002-read-only-public-package.md +0 -0
  36. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/adr/0003-release-from-a-tag.md +0 -0
  37. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/adr/0004-confirmed-mail-and-attendance-actions.md +0 -0
  38. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/adr/README.md +0 -0
  39. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/gmail-foundation.md +0 -0
  40. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/google-and-attendance-setup.md +0 -0
  41. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/panels-library-remote.md +0 -0
  42. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/releasing.md +0 -0
  43. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/docs/screenshots/todo.png +0 -0
  44. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/glama.json +0 -0
  45. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/pyproject.toml +0 -0
  46. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/scripts/check_dist.py +0 -0
  47. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/scripts/measure_tokens.py +0 -0
  48. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/scripts/smoke_test.py +0 -0
  49. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/__main__.py +0 -0
  50. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance.py +0 -0
  51. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance_assets/PROVENANCE.md +0 -0
  52. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance_assets/extract-rows.js +0 -0
  53. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance_assets/shared.js +0 -0
  54. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance_auto.py +0 -0
  55. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance_evidence.py +0 -0
  56. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/attendance_http.py +0 -0
  57. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/browser_login.py +0 -0
  58. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/cdp.py +0 -0
  59. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/claude_setup.py +0 -0
  60. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/cli_attendance.py +0 -0
  61. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/cli_gmail.py +0 -0
  62. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/clients.py +0 -0
  63. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/content_index.py +0 -0
  64. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/doctor.py +0 -0
  65. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/doctor_deep.py +0 -0
  66. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/edlib.py +0 -0
  67. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/edquery.py +0 -0
  68. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/edsync.py +0 -0
  69. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/features.py +0 -0
  70. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/gmail.py +0 -0
  71. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/gmail_tools.py +0 -0
  72. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/google_client.json +0 -0
  73. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/htmldom.py +0 -0
  74. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/jobs.py +0 -0
  75. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/moodlelib.py +0 -0
  76. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/output.py +0 -0
  77. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/paths.py +0 -0
  78. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/recordings.py +0 -0
  79. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/remote.py +0 -0
  80. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/service_actions.py +0 -0
  81. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/service_jobs.py +0 -0
  82. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/service_setup.py +0 -0
  83. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/student_services.py +0 -0
  84. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/student_tools.py +0 -0
  85. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/syncer.py +0 -0
  86. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/textextract.py +0 -0
  87. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/todo.py +0 -0
  88. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/transcribe.py +0 -0
  89. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/ui/panel.html +0 -0
  90. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/update_check.py +0 -0
  91. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/webnotes.py +0 -0
  92. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/src/monash_study_kit/widgets.py +0 -0
  93. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/conftest.py +0 -0
  94. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_attendance_browser.py +0 -0
  95. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_attendance_fast.py +0 -0
  96. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_attendance_parity.py +0 -0
  97. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_cdp.py +0 -0
  98. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_cli.py +0 -0
  99. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_clients.py +0 -0
  100. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_content_index.py +0 -0
  101. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_doctor.py +0 -0
  102. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_doctor_deep.py +0 -0
  103. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_ed_auth.py +0 -0
  104. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_ed_markdown.py +0 -0
  105. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_ed_query.py +0 -0
  106. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_ed_quiz.py +0 -0
  107. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_feature_cli.py +0 -0
  108. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_features.py +0 -0
  109. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_gmail.py +0 -0
  110. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_help_menu.py +0 -0
  111. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_layout.py +0 -0
  112. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_lesson_reader.py +0 -0
  113. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_library.py +0 -0
  114. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_recordings.py +0 -0
  115. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_remote.py +0 -0
  116. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_removed_files.py +0 -0
  117. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_security.py +0 -0
  118. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_service_setup.py +0 -0
  119. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_setup.py +0 -0
  120. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_shared_core.py +0 -0
  121. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_skill.py +0 -0
  122. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_student_gmail.py +0 -0
  123. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_student_tools.py +0 -0
  124. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_sync_robustness.py +0 -0
  125. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_todo.py +0 -0
  126. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_update_check.py +0 -0
  127. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_webnotes.py +0 -0
  128. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/tests/test_without_ed.py +0 -0
  129. {monash_study_kit-1.5.0 → monash_study_kit-1.7.0}/uv.lock +0 -0
@@ -2,6 +2,26 @@
2
2
 
3
3
  Version numbers follow `__version__` in `src/monash_study_kit/__init__.py`: patch for bug fixes, minor for new features.
4
4
 
5
+ ## 1.7.0
6
+
7
+ This is also the first release on PyPI with the 1.6.0 changes below (the local semester week view and private calendar export); 1.6.0 was never published on its own.
8
+
9
+ Ed Lessons materials are organised like Ed and can be taken away as one zip, matching Ed Web's "download all".
10
+
11
+ - `monash ed export FIT2109` (and `--module`, `--to`, `--open`) packs the synced Ed Lessons of a unit into a zip in Downloads: one folder per module, files in Ed's order, a `Links.md` per lesson for reading pages and the Ed page, and a `README.md` with progress and any files that failed to download. It reads only local files.
12
+ - The same export is a button per unit on the `monash library` page and the `export_ed_lessons` tool for AI apps (not read-only, so remote mode does not expose it; it adds about 360 characters to the tool list and is hidden with `use_ed false`).
13
+ - Ed files are stored as `<unit code>/<NN module>/<NN lesson>/<NN title>`, instead of numeric course and lesson ids. The first sync moves files from the old layout instead of downloading them again. `monash open ed` opens the folder.
14
+ - Files that Ed hosts inside document and code pages (`<file>` on `edusercontent.com`) are downloaded and indexed, up to 200 MB each. Links to other sites are not followed.
15
+ - A PDF replaced on Ed (new file URL) is downloaded again; files of slides removed on Ed are deleted, and empty folders are cleaned up.
16
+ - `list_files` includes Ed Lessons files (with `ed:` paths for `read_file`), filtered by unit, week or name.
17
+ - Fix: the `monash library` page now lists Ed files synced by this package (it expected absolute paths and skipped the relative ones in `ed.db`).
18
+
19
+ ## 1.6.0
20
+
21
+ - `monash semester --days 7` combines Moodle deadlines, local Ed lesson/reply/announcement summaries and the optional attendance cache into one local-first view. No account data is sent to Monash Hub.
22
+ - `monash semester --ics [PATH]` exports verified timestamped Moodle deadlines as a private `.ics` file; it is a snapshot, not a background subscription or an attendance record.
23
+ - This is a CLI view; it does not create an externally hosted dashboard. Missing Moodle/Ed data remains explicitly marked as missing.
24
+
5
25
  ## 1.5.0
6
26
 
7
27
  Optional school mail and attendance. Both are off until you connect them, the core still depends only on pypdf, and Moodle and Ed stay read-only.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: monash-study-kit
3
- Version: 1.5.0
3
+ Version: 1.7.0
4
4
  Summary: Connect Monash Moodle and Ed to Claude, Codex, Cursor or any local MCP client via a local MCP server and CLI: deadlines, announcements, grades, full-text search over course materials and Ed posts, all on your own machine.
5
5
  Project-URL: Homepage, https://github.com/Waldo0926/monash-study-kit
6
6
  Project-URL: Issues, https://github.com/Waldo0926/monash-study-kit/issues
@@ -41,7 +41,7 @@ Description-Content-Type: text/markdown
41
41
  [![Release](https://img.shields.io/github/v/release/Waldo0926/monash-study-kit?style=for-the-badge&label=Release&color=16a34a)](https://github.com/Waldo0926/monash-study-kit/releases)
42
42
  [![PyPI](https://img.shields.io/pypi/v/monash-study-kit?style=for-the-badge&label=PyPI&color=0ea5e9)](https://pypi.org/project/monash-study-kit/)
43
43
  [![License](https://img.shields.io/badge/License-MIT-16a34a?style=for-the-badge)](LICENSE)
44
- [![Access](https://img.shields.io/badge/Access-Read--only-475569?style=for-the-badge)](#privacy-and-security)
44
+ [![Moodle/Ed read-only](https://img.shields.io/badge/Moodle%20%2F%20Ed-read--only-475569?style=for-the-badge)](#privacy-and-security)
45
45
  [![Docs](https://img.shields.io/badge/Docs-docs.secureview.tech-1e5eff?style=for-the-badge)](https://docs.secureview.tech/study-kit/)
46
46
 
47
47
  [![CI](https://github.com/Waldo0926/monash-study-kit/actions/workflows/test.yml/badge.svg)](https://github.com/Waldo0926/monash-study-kit/actions/workflows/test.yml) [![Monash Study Kit MCP server – quality and maintenance score on Glama](https://glama.ai/mcp/servers/Waldo0926/monash-study-kit/badges/score.svg)](https://glama.ai/mcp/servers/Waldo0926/monash-study-kit)
@@ -56,7 +56,9 @@ Connect Monash **Moodle** and **Ed** to the AI app on your computer (Claude, Cod
56
56
  - "What does the A2 spec ask for?", "What's my current grade in FIT2109?"
57
57
  - "Quiz me on FIT2109 week 3." In apps that support MCP Apps, to-dos, lesson progress and quiz questions also show up as small panels you can click
58
58
 
59
- By default, everything stays **on your own computer**: course files, login state and the database live locally and never pass through a third-party server.
59
+ You can also run **`monash semester --days 7`** for a combined private week view of Moodle deadlines, Ed lessons/replies and any locally cached attendance records. Add **`--ics`** to export a private `semester.ics` into the Study Kit data directory, or **`--ics /path/to/file.ics`** to choose a path. This is a one-time calendar snapshot, not a live subscription; deadline times must be verified with Moodle. No personal semester data is uploaded to Monash Hub.
60
+
61
+ By default, synced course files, login state and the local database stay **on your own computer**. Results returned by MCP tools go to the AI app you connect; its privacy policy applies. Optional remote access sends those results through the AI provider's connection, not through a server run by this project's maintainer.
60
62
  All Moodle and Ed tools are **read-only**: they never submit assignments, attempt quizzes or post on Ed. The optional school mail and attendance parts can draft mail, change labels or check you in, and only after you confirm each action.
61
63
 
62
64
  Built for Monash Malaysia (times are handled as UTC+8); Australian campuses work too, see the [FAQ](#faq).
@@ -67,6 +69,8 @@ The picture is real output of `monash todo` against a database filled with made-
67
69
 
68
70
  ---
69
71
 
72
+ For the original v1.1 security review and the [1.5 feature review checklist](docs/SECURITY-REVIEW-1.5-SCOPE.md), see [security documentation](docs/security.md). The earlier review does not automatically certify features added later.
73
+
70
74
  ## Two parts, one codebase
71
75
 
72
76
  The same core (login, sync, queries) serves two kinds of "users":
@@ -166,6 +170,17 @@ At the end you can choose to sync right away. The first sync downloads all cours
166
170
 
167
171
  Then open your AI app. In Claude Desktop, **"+" → Connectors** in the chat box lists **monash**; leave it switched on. For other apps, `monash connect` shows which ones are connected.
168
172
 
173
+ ## What's new in 1.7
174
+
175
+ - **Download a whole unit's Ed materials as one zip.** `monash ed export FIT2109` packs the Ed Lessons you have synced into a zip in your Downloads folder: one folder per week with the PDFs, text pages and attachments, a `Links.md` per lesson (reading pages and the original Ed page) and a top-level `README.md` with your progress. `--module "Week 3"` packs one week, `--open` shows the zip in Finder. You can also ask your AI app "zip up my FIT2109 Ed materials", or use the button next to each unit on the `monash library --open` page. It works offline from files already on your computer.
176
+ - **Ed files are stored by unit code.** Folders change from numeric ids to `FIT2109/03 Week 3 - Editor-Modern IDE/12 W3 Workshop/01 Workshop 3 Slides.pdf`, in the same order as on Ed. `monash open ed` opens them. The first sync after upgrading moves existing files instead of downloading them again.
177
+ - **Files attached inside Ed pages are downloaded too.** Starter-code zips, handouts and other files that Ed hosts inside a lesson page are now downloaded and searchable; single files over 200 MB are skipped. A replaced PDF is downloaded again, and pages removed on Ed are removed locally.
178
+ - **The AI sees Ed files when listing materials.** "What materials are there for FIT2109 week 3?" now lists Ed Lessons files through `list_files`, ready to read.
179
+
180
+ ## What's new in 1.6
181
+
182
+ - **Semester week view.** `monash semester --days 7` puts Moodle deadlines, Ed lessons and replies and cached attendance in one view; `--ics` exports the deadlines as a private calendar file.
183
+
169
184
  ## What's new in 1.5
170
185
 
171
186
  - **School mail (optional).** Ask "anything in my email I need to deal with?" and get recent unread school mail, offline search, whole threads and attachment text. The AI can draft a reply, send a draft or archive mail, and only after you confirm each action.
@@ -317,7 +332,7 @@ The file is [`skills/monash-study-kit/SKILL.md`](skills/monash-study-kit/SKILL.m
317
332
  `monash grep` and the AI's course-material search cover:
318
333
 
319
334
  - Moodle course files (PDF, Word, PowerPoint, text and code)
320
- - PDFs in Ed Lessons, plus content pages written directly in Ed
335
+ - PDFs in Ed Lessons, files attached inside Ed pages, plus content pages written directly in Ed
321
336
  - **Course-notes websites**: many units publish notes on a lecturer's public site, e.g. tgdwyer.github.io for FIT2102 or
322
337
  yqtian-se.github.io for FIT2109. Pages of this kind linked from Moodle or Ed are fetched, converted to text and stored in the
323
338
  `Course notes (web)` folder of your course files. Only pages the unit links to directly are fetched (no site-wide crawling), and each page is re-fetched at most once a week.
@@ -331,7 +346,7 @@ The file is [`skills/monash-study-kit/SKILL.md`](skills/monash-study-kit/SKILL.m
331
346
  - Windows: `%LOCALAPPDATA%\monash-study-kit`
332
347
 
333
348
  It contains course files (`files`), the database (`data`), login credentials (`secrets`, readable only by your own user account) and the dedicated login window's profile (`browser-profile`).
334
- Run `monash open` to open the course-files folder.
349
+ Run `monash open` to open the course-files folder, or `monash open ed` for Ed Lessons files (in `data/ed-files`, by unit code).
335
350
  - **Stored credentials**: the Moodle session cookie, the Ed API token and the Moodle calendar subscription link. They stay on your computer and are only used to talk to Moodle / Ed.
336
351
  **Never send the `secrets` folder to anyone.**
337
352
  - **What the AI can see**: only what a tool returns when you ask something (e.g. a list of deadlines, the full text of a post, the text of a course file).
@@ -394,7 +409,7 @@ You can also query directly in the terminal without any AI:
394
409
  | `monash sync` | Sync now |
395
410
  | `monash login` / `monash login ed` | Log in to Moodle / replace the Ed token |
396
411
  | `monash courses` | Re-pick tracked units |
397
- | `monash open` | Open the course-files folder |
412
+ | `monash open [ed]` | Open the course-files folder (`ed`: Ed Lessons files) |
398
413
  | `monash library [--open]` | Browse and download synced files in your browser (only on this computer) |
399
414
  | `monash moodle grades [FIT2102]` | Grades and feedback |
400
415
  | `monash moodle assignments --missing` | Possibly missed assignments |
@@ -402,6 +417,7 @@ You can also query directly in the terminal without any AI:
402
417
  | `monash ed new` / `following` / `search` / `show FIT2102#42` | Ed updates / new replies to my posts / search / read a post |
403
418
  | `monash ed lessons FIT2109` / `quiz FIT2109` | Ed lesson progress / quiz questions (for revision) |
404
419
  | `monash ed read FIT2109 "W3 Pre-Class"` | A whole lesson as Markdown: text slides, reading pages and PDFs in order, plus its quiz questions |
420
+ | `monash ed export FIT2109 [--module "Week 3"] [--open]` | Zip a unit's Ed materials by week into Downloads |
405
421
  | `monash config` | View / change settings (restart your AI app afterwards) |
406
422
  | `monash connect [client]` | Connect to Codex, Cursor, VS Code, Windsurf or Gemini CLI (see [Other AI clients](#other-ai-clients)) |
407
423
  | `monash remote serve` / `pair` / `clients` / `revoke` | Optional remote MCP for ChatGPT and Claude on the web ([Host it yourself](https://docs.secureview.tech/study-kit/remote/)) |
@@ -5,7 +5,7 @@
5
5
  [![Release](https://img.shields.io/github/v/release/Waldo0926/monash-study-kit?style=for-the-badge&label=Release&color=16a34a)](https://github.com/Waldo0926/monash-study-kit/releases)
6
6
  [![PyPI](https://img.shields.io/pypi/v/monash-study-kit?style=for-the-badge&label=PyPI&color=0ea5e9)](https://pypi.org/project/monash-study-kit/)
7
7
  [![License](https://img.shields.io/badge/License-MIT-16a34a?style=for-the-badge)](LICENSE)
8
- [![Access](https://img.shields.io/badge/Access-Read--only-475569?style=for-the-badge)](#privacy-and-security)
8
+ [![Moodle/Ed read-only](https://img.shields.io/badge/Moodle%20%2F%20Ed-read--only-475569?style=for-the-badge)](#privacy-and-security)
9
9
  [![Docs](https://img.shields.io/badge/Docs-docs.secureview.tech-1e5eff?style=for-the-badge)](https://docs.secureview.tech/study-kit/)
10
10
 
11
11
  [![CI](https://github.com/Waldo0926/monash-study-kit/actions/workflows/test.yml/badge.svg)](https://github.com/Waldo0926/monash-study-kit/actions/workflows/test.yml) [![Monash Study Kit MCP server – quality and maintenance score on Glama](https://glama.ai/mcp/servers/Waldo0926/monash-study-kit/badges/score.svg)](https://glama.ai/mcp/servers/Waldo0926/monash-study-kit)
@@ -20,7 +20,9 @@ Connect Monash **Moodle** and **Ed** to the AI app on your computer (Claude, Cod
20
20
  - "What does the A2 spec ask for?", "What's my current grade in FIT2109?"
21
21
  - "Quiz me on FIT2109 week 3." In apps that support MCP Apps, to-dos, lesson progress and quiz questions also show up as small panels you can click
22
22
 
23
- By default, everything stays **on your own computer**: course files, login state and the database live locally and never pass through a third-party server.
23
+ You can also run **`monash semester --days 7`** for a combined private week view of Moodle deadlines, Ed lessons/replies and any locally cached attendance records. Add **`--ics`** to export a private `semester.ics` into the Study Kit data directory, or **`--ics /path/to/file.ics`** to choose a path. This is a one-time calendar snapshot, not a live subscription; deadline times must be verified with Moodle. No personal semester data is uploaded to Monash Hub.
24
+
25
+ By default, synced course files, login state and the local database stay **on your own computer**. Results returned by MCP tools go to the AI app you connect; its privacy policy applies. Optional remote access sends those results through the AI provider's connection, not through a server run by this project's maintainer.
24
26
  All Moodle and Ed tools are **read-only**: they never submit assignments, attempt quizzes or post on Ed. The optional school mail and attendance parts can draft mail, change labels or check you in, and only after you confirm each action.
25
27
 
26
28
  Built for Monash Malaysia (times are handled as UTC+8); Australian campuses work too, see the [FAQ](#faq).
@@ -31,6 +33,8 @@ The picture is real output of `monash todo` against a database filled with made-
31
33
 
32
34
  ---
33
35
 
36
+ For the original v1.1 security review and the [1.5 feature review checklist](docs/SECURITY-REVIEW-1.5-SCOPE.md), see [security documentation](docs/security.md). The earlier review does not automatically certify features added later.
37
+
34
38
  ## Two parts, one codebase
35
39
 
36
40
  The same core (login, sync, queries) serves two kinds of "users":
@@ -130,6 +134,17 @@ At the end you can choose to sync right away. The first sync downloads all cours
130
134
 
131
135
  Then open your AI app. In Claude Desktop, **"+" → Connectors** in the chat box lists **monash**; leave it switched on. For other apps, `monash connect` shows which ones are connected.
132
136
 
137
+ ## What's new in 1.7
138
+
139
+ - **Download a whole unit's Ed materials as one zip.** `monash ed export FIT2109` packs the Ed Lessons you have synced into a zip in your Downloads folder: one folder per week with the PDFs, text pages and attachments, a `Links.md` per lesson (reading pages and the original Ed page) and a top-level `README.md` with your progress. `--module "Week 3"` packs one week, `--open` shows the zip in Finder. You can also ask your AI app "zip up my FIT2109 Ed materials", or use the button next to each unit on the `monash library --open` page. It works offline from files already on your computer.
140
+ - **Ed files are stored by unit code.** Folders change from numeric ids to `FIT2109/03 Week 3 - Editor-Modern IDE/12 W3 Workshop/01 Workshop 3 Slides.pdf`, in the same order as on Ed. `monash open ed` opens them. The first sync after upgrading moves existing files instead of downloading them again.
141
+ - **Files attached inside Ed pages are downloaded too.** Starter-code zips, handouts and other files that Ed hosts inside a lesson page are now downloaded and searchable; single files over 200 MB are skipped. A replaced PDF is downloaded again, and pages removed on Ed are removed locally.
142
+ - **The AI sees Ed files when listing materials.** "What materials are there for FIT2109 week 3?" now lists Ed Lessons files through `list_files`, ready to read.
143
+
144
+ ## What's new in 1.6
145
+
146
+ - **Semester week view.** `monash semester --days 7` puts Moodle deadlines, Ed lessons and replies and cached attendance in one view; `--ics` exports the deadlines as a private calendar file.
147
+
133
148
  ## What's new in 1.5
134
149
 
135
150
  - **School mail (optional).** Ask "anything in my email I need to deal with?" and get recent unread school mail, offline search, whole threads and attachment text. The AI can draft a reply, send a draft or archive mail, and only after you confirm each action.
@@ -281,7 +296,7 @@ The file is [`skills/monash-study-kit/SKILL.md`](skills/monash-study-kit/SKILL.m
281
296
  `monash grep` and the AI's course-material search cover:
282
297
 
283
298
  - Moodle course files (PDF, Word, PowerPoint, text and code)
284
- - PDFs in Ed Lessons, plus content pages written directly in Ed
299
+ - PDFs in Ed Lessons, files attached inside Ed pages, plus content pages written directly in Ed
285
300
  - **Course-notes websites**: many units publish notes on a lecturer's public site, e.g. tgdwyer.github.io for FIT2102 or
286
301
  yqtian-se.github.io for FIT2109. Pages of this kind linked from Moodle or Ed are fetched, converted to text and stored in the
287
302
  `Course notes (web)` folder of your course files. Only pages the unit links to directly are fetched (no site-wide crawling), and each page is re-fetched at most once a week.
@@ -295,7 +310,7 @@ The file is [`skills/monash-study-kit/SKILL.md`](skills/monash-study-kit/SKILL.m
295
310
  - Windows: `%LOCALAPPDATA%\monash-study-kit`
296
311
 
297
312
  It contains course files (`files`), the database (`data`), login credentials (`secrets`, readable only by your own user account) and the dedicated login window's profile (`browser-profile`).
298
- Run `monash open` to open the course-files folder.
313
+ Run `monash open` to open the course-files folder, or `monash open ed` for Ed Lessons files (in `data/ed-files`, by unit code).
299
314
  - **Stored credentials**: the Moodle session cookie, the Ed API token and the Moodle calendar subscription link. They stay on your computer and are only used to talk to Moodle / Ed.
300
315
  **Never send the `secrets` folder to anyone.**
301
316
  - **What the AI can see**: only what a tool returns when you ask something (e.g. a list of deadlines, the full text of a post, the text of a course file).
@@ -358,7 +373,7 @@ You can also query directly in the terminal without any AI:
358
373
  | `monash sync` | Sync now |
359
374
  | `monash login` / `monash login ed` | Log in to Moodle / replace the Ed token |
360
375
  | `monash courses` | Re-pick tracked units |
361
- | `monash open` | Open the course-files folder |
376
+ | `monash open [ed]` | Open the course-files folder (`ed`: Ed Lessons files) |
362
377
  | `monash library [--open]` | Browse and download synced files in your browser (only on this computer) |
363
378
  | `monash moodle grades [FIT2102]` | Grades and feedback |
364
379
  | `monash moodle assignments --missing` | Possibly missed assignments |
@@ -366,6 +381,7 @@ You can also query directly in the terminal without any AI:
366
381
  | `monash ed new` / `following` / `search` / `show FIT2102#42` | Ed updates / new replies to my posts / search / read a post |
367
382
  | `monash ed lessons FIT2109` / `quiz FIT2109` | Ed lesson progress / quiz questions (for revision) |
368
383
  | `monash ed read FIT2109 "W3 Pre-Class"` | A whole lesson as Markdown: text slides, reading pages and PDFs in order, plus its quiz questions |
384
+ | `monash ed export FIT2109 [--module "Week 3"] [--open]` | Zip a unit's Ed materials by week into Downloads |
369
385
  | `monash config` | View / change settings (restart your AI app afterwards) |
370
386
  | `monash connect [client]` | Connect to Codex, Cursor, VS Code, Windsurf or Gemini CLI (see [Other AI clients](#other-ai-clients)) |
371
387
  | `monash remote serve` / `pair` / `clients` / `revoke` | Optional remote MCP for ChatGPT and Claude on the web ([Host it yourself](https://docs.secureview.tech/study-kit/remote/)) |
@@ -1,11 +1,11 @@
1
- # Monash Study Kit · Monash 学习助手
1
+ # Monash Study Kit
2
2
 
3
3
  [![类型](https://img.shields.io/badge/%E7%B1%BB%E5%9E%8B-MCP_%E6%9C%8D%E5%8A%A1_%2B_CLI-2563eb?style=for-the-badge)](#它由两部分组成)
4
4
  [![技术](https://img.shields.io/badge/%E6%8A%80%E6%9C%AF-Python_%C2%B7_MCP_%C2%B7_%E6%9C%AC%E5%9C%B0%E4%BC%98%E5%85%88-7c3aed?style=for-the-badge)](#开发)
5
5
  [![版本](https://img.shields.io/github/v/release/Waldo0926/monash-study-kit?style=for-the-badge&label=%E7%89%88%E6%9C%AC&color=16a34a)](https://github.com/Waldo0926/monash-study-kit/releases)
6
6
  [![PyPI](https://img.shields.io/pypi/v/monash-study-kit?style=for-the-badge&label=PyPI&color=0ea5e9)](https://pypi.org/project/monash-study-kit/)
7
7
  [![许可证](https://img.shields.io/badge/%E8%AE%B8%E5%8F%AF%E8%AF%81-MIT-16a34a?style=for-the-badge)](LICENSE)
8
- [![访问](https://img.shields.io/badge/%E8%AE%BF%E9%97%AE-%E5%8F%AA%E8%AF%BB-475569?style=for-the-badge)](#隐私和安全)
8
+ [![Moodle和Ed只读](https://img.shields.io/badge/Moodle%2FEd-%E5%8F%AA%E8%AF%BB-475569?style=for-the-badge)](#隐私和安全)
9
9
  [![文档](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-docs.secureview.tech-1e5eff?style=for-the-badge)](https://docs.secureview.tech/zh-cn/study-kit/)
10
10
 
11
11
  [![CI](https://github.com/Waldo0926/monash-study-kit/actions/workflows/test.yml/badge.svg)](https://github.com/Waldo0926/monash-study-kit/actions/workflows/test.yml) [![Monash Study Kit MCP server – quality and maintenance score on Glama](https://glama.ai/mcp/servers/Waldo0926/monash-study-kit/badges/score.svg)](https://glama.ai/mcp/servers/Waldo0926/monash-study-kit)
@@ -20,7 +20,11 @@
20
20
  - “帮我看看 A2 的 spec 要求什么”、“我 FIT2109 现在成绩多少?”
21
21
  - “用 FIT2109 第 3 周的测验题考考我。”在支持 MCP Apps 的软件里,待办、lesson 进度和测验题还会显示成能点的小面板
22
22
 
23
- 默认所有东西都在**你自己的电脑上**:课件、登录状态、数据库都存在本机,不经过任何第三方服务器。Moodle 和 Ed 的工具全部是**只读**的:不会帮你交作业、做测验或在 Ed 上发帖。可选的学校邮箱和考勤可以帮你起草邮件、改标签、签到,每一项都要你确认才执行。
23
+ 还可以运行 `monash semester --days 7`,把 Moodle 截止、Ed 没做完的 lesson 和未读回复、本地考勤缓存放进一份周视图;加 `--ics` 把 Moodle 截止日期导出成本机的私有日历文件。它是一次性的快照,不会自动更新,也不会把你的课表上传到 Monash Hub。具体截止时间以 Moodle 为准。
24
+
25
+ 默认把课件、登录状态和数据库保存在**你自己的电脑上**。但你用AI软件查询时,工具返回的课程、邮件或考勤信息会交给你连接的AI服务,具体如何处理由该服务的隐私政策决定。可选远程模式由你自行托管,不经过本项目维护者的服务器。
26
+
27
+ Moodle和Ed始终**只读**:不会交作业、做测验或在Ed发帖。可选的学校邮箱和考勤可以帮你起草邮件、改标签、签到,每一项都要先由你确认。
24
28
 
25
29
  适合 Monash 马来西亚校区(时间按 UTC+8 处理);澳洲校区也能用,见[常见问题](#常见问题)。
26
30
 
@@ -30,6 +34,8 @@
30
34
 
31
35
  ---
32
36
 
37
+ 之前的[1.1安全审计](docs/security.md)只覆盖当时的功能;新增的远程连接、邮箱与考勤另列有[1.5审查清单](docs/SECURITY-REVIEW-1.5-SCOPE.md),不能直接沿用旧版结论。
38
+
33
39
  ## 它由两部分组成
34
40
 
35
41
  同一套底层代码(登录、同步、查询),给两种“用户”用:
@@ -125,6 +131,17 @@ monash setup
125
131
 
126
132
  完成后打开你的 AI 软件。Claude Desktop 在聊天输入框的 **“+” → Connectors** 里能看到 **monash**,开着就行;其他软件可以运行 `monash connect` 看哪些已经接上。
127
133
 
134
+ ## 1.7 新增了什么
135
+
136
+ - **一键打包整门课的 Ed 课件。** `monash ed export FIT2109` 把已经同步下来的 Ed Lessons 打成一个 zip,存到“下载”文件夹:按周分文件夹,里面是 PDF、正文页和附件,每节附一个 `Links.md`(阅读网页和 Ed 原页面链接),最上层的 `README.md` 列出每节的进度。`--module "Week 3"` 只打包一周,`--open` 打包完在访达里显示。在 AI 里说“把 FIT2109 的 Ed 课件打包给我”也行;`monash library --open` 的课件页上每门课旁边也有打包按钮。不联网,只打包本地已有的文件。
137
+ - **Ed 课件按课号存。** 文件夹从数字 id 改成 `FIT2109/03 Week 3 - Editor-Modern IDE/12 W3 Workshop/01 Workshop 3 Slides.pdf` 这样,跟 Ed 页面上的顺序一致。`monash open ed` 直接打开。升级后第一次同步会把旧文件挪过去,不会重新下载。
138
+ - **正文页里附的文件也下载。** starter code 的 zip、讲义之类附在 Ed 正文里的文件(Ed 自己存的那种)现在也会下载、能搜到。单个文件超过 200 MB 跳过。老师换了 PDF 会重新下载,Ed 上删掉的页本地也删掉。
139
+ - **AI 列课件时带上 Ed。** 问“FIT2109 第 3 周有哪些课件”时,`list_files` 会一起列出 Ed Lessons 的文件,可以直接读。
140
+
141
+ ## 1.6 新增了什么
142
+
143
+ - **学期周视图。** `monash semester --days 7` 把 Moodle 截止、Ed lesson 和回复、本地考勤缓存放在一份视图里;`--ics` 把截止日期导出成本机私有日历文件。
144
+
128
145
  ## 1.5 新增了什么
129
146
 
130
147
  - **学校邮箱(可选)。** 问“我邮箱里有什么要处理的?”,列出最近没读的学校邮件,也能离线搜索、读整个对话和附件里的文字。AI 可以帮你起草回复、发送草稿、归档邮件,每一项都要你确认才执行。
@@ -269,7 +286,7 @@ npx skills add Waldo0926/monash-study-kit
269
286
  `monash grep` 和 AI 的课件搜索覆盖:
270
287
 
271
288
  - Moodle 上的课件(PDF、Word、PowerPoint、文本和代码)
272
- - Ed Lessons 里的 PDF,以及直接写在 Ed 里的正文页
289
+ - Ed Lessons 里的 PDF、正文页里附的文件,以及直接写在 Ed 里的正文页
273
290
  - **课程笔记网页**:很多课的讲义在老师的公开网站上,比如 FIT2102 的 tgdwyer.github.io、FIT2109 的 yqtian-se.github.io。Moodle 和 Ed 里链接到的这类页面会被抓下来转成文字,存在课件文件夹的 `Course notes (web)` 里。只抓课程直接链接的页面,不会顺着链接整站爬;每页最多一周重抓一次。学校官网、视频、Google 文档之类不抓。不想要的话:`monash config web_notes false`
274
291
  - 录播字幕稿(装了 `[media]` 才有)
275
292
 
@@ -279,7 +296,7 @@ npx skills add Waldo0926/monash-study-kit
279
296
  - macOS:`~/Library/Application Support/monash-study-kit`
280
297
  - Windows:`%LOCALAPPDATA%\monash-study-kit`
281
298
 
282
- 里面有课件(`files`)、数据库(`data`)、登录凭据(`secrets`,只有你自己的账户能读)、专用登录窗口的配置(`browser-profile`)。运行 `monash open` 可以打开课件文件夹。
299
+ 里面有课件(`files`)、数据库(`data`)、登录凭据(`secrets`,只有你自己的账户能读)、专用登录窗口的配置(`browser-profile`)。运行 `monash open` 可以打开课件文件夹,`monash open ed` 打开 Ed Lessons 的课件(在 `data/ed-files` 里,按课号分)。
283
300
  - **存了哪些凭据**:Moodle 的会话 cookie、Ed 的 API 令牌、Moodle 日历订阅链接。都只在你电脑上,只用来访问 Moodle / Ed 本身。**别把 `secrets` 文件夹发给别人。**
284
301
  - **AI 能看到什么**:只有你提问时 AI 调用工具返回的内容(比如截止日期列表、某个帖子的全文、某份课件的文字)。令牌和 cookie 永远不会发给 AI。**也不要把 Ed 令牌贴进聊天里**,令牌只在终端里输入。
285
302
  - **课件浏览页**:`monash library` 只监听 `127.0.0.1`,只提供同步时登记过的文件。页面没有密码,不要把它转发到公网。
@@ -340,7 +357,7 @@ npx skills add Waldo0926/monash-study-kit
340
357
  | `monash sync` | 立刻同步 |
341
358
  | `monash login` / `monash login ed` | 登录 Moodle / 换 Ed 令牌 |
342
359
  | `monash courses` | 重新选要跟踪的课 |
343
- | `monash open` | 打开课件文件夹 |
360
+ | `monash open [ed]` | 打开课件文件夹(`ed`:Ed Lessons 的课件) |
344
361
  | `monash library [--open]` | 在浏览器里翻和下载已同步的课件(只在本机) |
345
362
  | `monash moodle grades [FIT2102]` | 成绩和反馈 |
346
363
  | `monash moodle assignments --missing` | 可能漏交的作业 |
@@ -348,6 +365,7 @@ npx skills add Waldo0926/monash-study-kit
348
365
  | `monash ed new` / `following` / `search` / `show FIT2102#42` | Ed 新动态 / 我的帖子有没有新回复 / 搜索 / 读帖子 |
349
366
  | `monash ed lessons FIT2109` / `quiz FIT2109` | Ed Lessons 进度 / 测验题(复习用) |
350
367
  | `monash ed read FIT2109 "W3 Pre-Class"` | 整节 lesson 的正文:文字页、阅读网页、PDF 按页序拼成 Markdown,附测验题 |
368
+ | `monash ed export FIT2109 [--module "Week 3"] [--open]` | 整门课的 Ed 课件按周打包成 zip,存到“下载” |
351
369
  | `monash config` | 看/改设置(改完重启 AI 软件) |
352
370
  | `monash connect [客户端]` | 接进 Codex、Cursor、VS Code、Windsurf 或 Gemini CLI(见[接入其他 AI 客户端](#接入其他-ai-客户端)) |
353
371
  | `monash remote serve` / `pair` / `clients` / `revoke` | 可选:给 ChatGPT 和网页版 Claude 用的远程 MCP([自己托管(进阶)](https://docs.secureview.tech/zh-cn/study-kit/remote/)) |
@@ -0,0 +1,38 @@
1
+ # Security verification scope for v1.5 features
2
+
3
+ **Status: checklist, not an audit sign-off.** Created on 2026-11-01 for the public v1.5 feature set. The original [v1.1 review](security.md) documents previous findings and tests only; its GO result is not a blanket verdict for v1.5. No new penetration test or production verification is claimed here.
4
+
5
+ ## Boundary and threat model
6
+
7
+ - **Local by default:** Moodle, Ed, optional Gmail and attendance credentials live on the instance owner's machine. The chosen AI provider receives tool result content that a client requests, so privacy is not equivalent to offline processing.
8
+ - **Remote MCP:** An instance owner can expose their own endpoint over HTTPS and pair clients with OAuth. The maintainer does not operate a shared relay. Network exposure, trusted proxies, callbacks and per-client grants matter.
9
+ - **Read-only:** Moodle and Ed query tools must not submit assignments, attempt quizzes or post messages. The optional Gmail and attendance modules can perform state-changing operations only after a full preview and an explicit user confirmation.
10
+ - **Permission scope:** Older client pairings must not silently gain Gmail or attendance access when the server is upgraded.
11
+ - **Attendance ethics:** Code discovery and the check-in mechanism must not imply that mere possession of a code proves attendance; students should check in only for classes actually attended.
12
+
13
+ ## Verification checklist
14
+
15
+ - [ ] Re-run v1.1 tests with current code and update stale file/line references; mark any changed behaviour explicitly
16
+ - [ ] Inspect OAuth client registration, PKCE, redirect URI allowlist, state, replay resistance and code expiry with negative tests
17
+ - [ ] Test remote reverse-proxy exposure: no credential, library, diagnostics, setup or raw files accessible from the public endpoint
18
+ - [ ] Check each remote client's scopes independently; legacy grants remain restricted and revocation applies immediately
19
+ - [ ] Test expiry, replay, concurrent execution, tampering and cross-client execution of prepare/execute tickets
20
+ - [ ] Verify the action preview includes the exact email recipients (including Bcc), attachments and body, or the attendance class and code
21
+ - [ ] Verify actions are never executed by tool orchestration solely from AI-generated `user_confirmed=true` without a distinct, informed user confirmation in the client workflow
22
+ - [ ] Verify unknown send outcomes are not retried blindly; inspect provider-side state before a new attempt
23
+ - [ ] Check Gmail OAuth minimum privilege, read-only option, stored tokens, revocation and consent-screen wording
24
+ - [ ] Check Attendance browser/HTTP reader parity against current portal markup without leaking student records into logs
25
+ - [ ] Test sensitive data scrubbing in doctor output and exceptions, especially with newly added Google/OAuth/attendance tokens
26
+ - [ ] Review Python dependencies, bundled assets, release workflow and Google OAuth client configuration for exposure
27
+ - [ ] Verify current docs explain that connecting to a cloud AI client sends queried tool results to that client
28
+ - [ ] Record tests, commit/version, environment and residual findings before publishing a new overall security verdict
29
+
30
+ ## Existing design evidence, not a substitute for verification
31
+
32
+ - [ADR 0002](adr/0002-read-only-public-package.md): Moodle/Ed read-only boundary
33
+ - [ADR 0004](adr/0004-confirmed-mail-and-attendance-actions.md): two-step confirmed actions
34
+ - [Privacy policy](../PRIVACY.md): data sources, storage, AI-client transfer and deletion
35
+ - [Remote MCP notes](panels-library-remote.md): optional remote architecture
36
+ - [Google and attendance setup](google-and-attendance-setup.md): optional service configuration
37
+
38
+ Do not check off a test without recording actual test evidence. Keep passwords, session cookies, API tokens, real emails and personal attendance records out of public issues and screenshots.
@@ -1,5 +1,7 @@
1
1
  # Security review
2
2
 
3
+ > **Version scope:** This is the recorded **v1.1.0** review, not a current certification of the complete package. Optional remote MCP/OAuth, Gmail and Attendance were added later and introduce additional credentials, network exposure and confirmed write actions. See [the v1.5 review scope and verification checklist](SECURITY-REVIEW-1.5-SCOPE.md), [ADR 0004](adr/0004-confirmed-mail-and-attendance-actions.md) and the [privacy policy](../PRIVACY.md). Do not interpret the \"GO\" conclusions below as covering these newer features.
4
+
3
5
  Scope: the `monash-study-kit` package in `src/monash_study_kit`, its tests, and the release workflow. The package runs on the student's own computer. It holds three secrets: the Moodle session cookie, the Moodle iCal calendar URL (it has an `authtoken` in it), and the Ed API token. It also stores course files and a local copy of Ed posts.
4
6
 
5
7
  Every claim below points to the code line that does it and to a test that checks it. The tests in `tests/test_security.py` were written for this review. Line numbers are for version 1.1.0.
@@ -32,6 +32,7 @@ Talk to the student in the language they use with you. Command output is in Chin
32
32
  | Read one Ed post with all replies | `monash ed show FIT2102#42` |
33
33
  | Read an Ed lesson | `monash ed read FIT2109 "W3 Pre-Class"` |
34
34
  | Revise with Ed lesson quiz questions | `monash ed quiz FIT2109 --module "Week 3"` |
35
+ | Download a unit's Ed materials as one zip | `monash ed export FIT2109` |
35
36
  | Something doesn't work | `monash doctor` |
36
37
  | Anything in my school email to deal with (optional, only if set up) | `monash gmail todo` |
37
38
  | Find a school email (optional) | `monash gmail search exchange` |
@@ -1,4 +1,4 @@
1
1
  """Monash 学习助手:把 Moodle 和 Ed 接进 Claude。"""
2
2
  # 发新版就改这里(pyproject 从这里读):朋友那边的更新提示比的就是 main 上的这个号。
3
3
  # 修 bug 加最后一位,加功能加中间一位。CI 会检查改了 src/ 的 PR 有没有改它。
4
- __version__ = "1.5.0"
4
+ __version__ = "1.7.0"
@@ -10,16 +10,17 @@
10
10
  monash courses # 选要跟踪的课
11
11
 
12
12
  monash todo # 本周待办:Moodle 截止/漏交 + Ed 没做完的 lesson、公告、未读回复
13
+ monash semester --days 7 # 本地周视图,另加 --ics 可保存私有日历
13
14
  monash due [FIT2102] # 截止日期
14
15
  monash grep "monad" [FIT2102] # 全文搜课件、字幕稿,带页码/时间戳
15
16
  monash moodle … # 更多 Moodle 查询:grades、news、assignments、find、get、messages…
16
- monash ed … # Ed 查询:new、threads、search、show、following、lessons、quiz
17
+ monash ed … # Ed 查询:new、threads、search、show、following、lessons、quiz、export
17
18
 
18
19
  monash gmail … # 可选:学校邮箱同步、邮件待办、离线搜索(要装 [gmail])
19
20
  monash attendance … # 可选:考勤 login、status、sync、overview、codes、probe(要装 [attendance])
20
21
 
21
22
  monash media # 录播:取 YouTube 字幕、下载 Zoom 录像并转写(要装 [media])
22
- monash open # 打开课件文件夹
23
+ monash open [ed] # 打开课件文件夹(ed:Ed Lessons 的,按 课号/周/lesson 分好)
23
24
  monash library --open # 在浏览器里翻已同步的课件(只在本机)
24
25
  monash config # 看/改设置
25
26
  monash update # 更新到最新版
@@ -293,16 +294,26 @@ def cmd_sync(args):
293
294
  print(f" ! {k}:{v}")
294
295
 
295
296
 
296
- def cmd_open(args):
297
- FILES_DIR.mkdir(parents=True, exist_ok=True)
298
- path = str(FILES_DIR)
297
+ def reveal(path: str, select: bool = True) -> None:
298
+ """在访达/资源管理器里打开文件夹;给的是文件就打开它所在的文件夹并选中。"""
299
+ is_file = os.path.isfile(path)
299
300
  if sys.platform == "darwin":
300
- subprocess.run(["open", path])
301
+ subprocess.run(["open", "-R", path] if is_file and select else ["open", path])
301
302
  elif os.name == "nt":
302
- os.startfile(path) # noqa: S606
303
+ if is_file and select:
304
+ subprocess.run(["explorer", "/select,", path])
305
+ else:
306
+ os.startfile(path) # noqa: S606
303
307
  else:
304
- subprocess.run(["xdg-open", path])
305
- print(path)
308
+ subprocess.run(["xdg-open", os.path.dirname(path) if is_file else path])
309
+
310
+
311
+ def cmd_open(args):
312
+ from .paths import ED_FILES_DIR
313
+ folder = ED_FILES_DIR if getattr(args, "what", None) == "ed" else FILES_DIR
314
+ folder.mkdir(parents=True, exist_ok=True)
315
+ reveal(str(folder))
316
+ print(folder)
306
317
 
307
318
 
308
319
  def parse_setting(key: str, raw: str, current):
@@ -476,6 +487,34 @@ def _courses_for(client, con, refs: list[str] | None) -> list[dict]:
476
487
  return jobs.tracked_courses(con, courses)
477
488
 
478
489
 
490
+ def cmd_semester(args):
491
+ """A single private week view; optional .ics file never leaves this device."""
492
+ from . import semester, todo
493
+ try:
494
+ client = MoodleClient()
495
+ courses = _courses_for(client, db_connect(), None)
496
+ except MoodleAuthError:
497
+ client, courses = None, []
498
+ data = todo.build(client, courses, args.days)
499
+ attendance_data = None
500
+ if load_settings().get("attendance_enabled"):
501
+ try:
502
+ from . import attendance
503
+ attendance_data = attendance.overview(days=args.days)
504
+ except (OSError, ValueError, RuntimeError):
505
+ data["notes"].append("考勤本地缓存暂时无法读取")
506
+ view = semester.semester_data(data, attendance_data)
507
+ if args.ics is not None:
508
+ target = semester.write_calendar(view, args.ics or None)
509
+ view["calendar_export"] = str(target)
510
+ if want_json(args):
511
+ return emit_json(view)
512
+ print(semester.render(view))
513
+ if args.ics is not None:
514
+ print(f"\n日历已写入本机:{view['calendar_export']}")
515
+ print("重要:日历是本地快照,不会自动更新;请核对原始Moodle截止日期。")
516
+
517
+
479
518
  def cmd_todo(args):
480
519
  from . import todo
481
520
  try:
@@ -797,6 +836,9 @@ def build_parser() -> argparse.ArgumentParser:
797
836
  cmd(sub, "courses", cmd_courses, help="选要跟踪的课")
798
837
  p = cmd(sub, "todo", cmd_todo, json_flag=True, help="本周待办")
799
838
  p.add_argument("--days", type=int, default=7)
839
+ p = cmd(sub, "semester", cmd_semester, json_flag=True, help="本周视图:Moodle、Ed及本地考勤;可导出私有日历")
840
+ p.add_argument("--days", type=int, default=7, choices=range(1, 32))
841
+ p.add_argument("--ics", nargs="?", const="", metavar="PATH", help="导出本机ICS文件(默认保存到Study Kit数据目录)")
800
842
  p = cmd(sub, "due", cmd_due, json_flag=True, help="截止日期")
801
843
  p.add_argument("course", nargs="?"); p.add_argument("--days", type=int, default=14)
802
844
  p = cmd(sub, "grep", cmd_grep, json_flag=True, help="全文搜课件和字幕稿")
@@ -806,7 +848,8 @@ def build_parser() -> argparse.ArgumentParser:
806
848
  p.add_argument("--match", help="只转写路径里含这段文字的视频")
807
849
  p.add_argument("--model", help="whisper 模型(默认 small.en;慢的电脑可以用 base.en)")
808
850
  p.add_argument("--dry-run", action="store_true")
809
- cmd(sub, "open", cmd_open, help="打开课件文件夹")
851
+ p = cmd(sub, "open", cmd_open, help="打开课件文件夹(monash open ed:Ed Lessons 的课件)")
852
+ p.add_argument("what", nargs="?", choices=["ed"], help="ed=Ed Lessons 的课件文件夹")
810
853
  p = cmd(sub, "config", cmd_config, help="看/改设置")
811
854
  p.add_argument("key", nargs="?"); p.add_argument("value", nargs="?")
812
855
  p = cmd(sub, "connect", cmd_connect, help="接进别的 AI 软件:Codex、Cursor、VS Code、Windsurf、Gemini CLI")
@@ -8,6 +8,7 @@
8
8
  monash ed lessons FIT2109 --module "Week 3"
9
9
  monash ed quiz FIT2109 # Lessons 里的测验题(复习用;Ed 不公开答案)
10
10
  monash ed read FIT2109 "W3 Pre-Class" # 整节 lesson 的正文(Markdown,按页序,附测验题)
11
+ monash ed export FIT2109 [--open] # 整门课的 Ed 课件打包成 zip(按周分文件夹),默认存到“下载”
11
12
  """
12
13
  from __future__ import annotations
13
14
 
@@ -186,6 +187,24 @@ def cmd_quiz(args):
186
187
  edquery.quiz_markdown)
187
188
 
188
189
 
190
+ def _render_export(d: dict) -> str:
191
+ lines = [f"已打包 {d['course']}:{d['lessons']} 节 lesson、{d['files']} 个文件({d['bytes'] / 1e6:.1f} MB)",
192
+ f" {d['path']}"]
193
+ if d["missing"]:
194
+ lines.append(f" 有 {d['missing']} 个文件上次同步没下载到,zip 里的 README.md 列出了它们和 Ed 原页面链接")
195
+ return "\n".join(lines)
196
+
197
+
198
+ def cmd_export(args):
199
+ from . import edexport
200
+ d = edexport.export(edlib.db_connect(), args.course, args.to, args.module)
201
+ code = _emit(args, d, _render_export)
202
+ if args.open:
203
+ from .cli import reveal
204
+ reveal(d["path"])
205
+ return code
206
+
207
+
189
208
  def add_commands(sub) -> None:
190
209
  def out(name, fn, **kw):
191
210
  p = sub.add_parser(name, **kw)
@@ -230,6 +249,11 @@ def add_commands(sub) -> None:
230
249
  p = out("read", cmd_read, help="整节 lesson 的正文:文字页、阅读网页、PDF 按页序拼成 Markdown,附测验题")
231
250
  p.add_argument("course")
232
251
  p.add_argument("lesson", help="lesson id 或标题的一部分,如 'W3 Pre-Class'")
252
+ p = out("export", cmd_export, help="整门课的 Ed 课件打包成一个 zip(按周分文件夹,附链接和进度)")
253
+ p.add_argument("course")
254
+ p.add_argument("--module", help="只打包模块名包含这段文字的,如 'Week 3'")
255
+ p.add_argument("--to", help="存到哪个文件夹(默认“下载”)")
256
+ p.add_argument("--open", action="store_true", help="打包完在访达/资源管理器里显示")
233
257
  for name, fn, h in (("lessons", cmd_lessons, "课程内容(Lessons)和课件"),
234
258
  ("quiz", cmd_quiz, "Lessons 里的测验题(题面+选项)")):
235
259
  p = out(name, fn, help=h)