Repository navigation
feat: Slack alerts, Moodle check and Gemini summary for the daemon - #9
Merged
Merged
Conversation
pala --daemon collects the alerts of one run and posts them as a single Slack message through an Incoming Webhook (PALA_SLACK_WEBHOOK or ~/.config/pala/slack_webhook). Grade alerts list the new grades, exams are announced once when they appear and once the day before, and a failed Kréta login posts an error and exits non-zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When PALA_MOODLE_URL is set, pala --daemon logs in once through the Moodle mobile web service (password only in the POST body of login/token.php), keeps just the token in the auth data, and alerts on new unread notifications and on deadlines in the next 14 days. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With PALA_GEMINI_API_KEY (or ~/.config/pala/gemini_key) set, a run that has new alerts appends a short Hungarian summary from Gemini. The key goes in the x-goog-api-key header, the model name is validated, and a run without alerts makes no API call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The substitute-teacher name and Moodle notification subjects now go only to Slack; Gemini gets a version of those alerts without them. On gemini-2.5-flash models the request sets thinkingBudget 0, because thinking tokens count against maxOutputTokens and could leave the summary empty. Other models get no budget and no output cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CsPS0
force-pushed
the
feat/slack-moodle-gemini
branch
from
November 9, 2026 16:39
a09cfdd to
04c6b88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pala --daemonalready runs one check and exits. This PR makes that run useful from a scheduled job (GitHub Actions every 2 hours):PALA_SLACK_WEBHOOKor~/.config/pala/slack_webhook). Onlyhttps://hooks.slack.com/services/...is accepted, and Kréta text is escaped so it cannot ping@channelor fake links. A failed Kréta login posts an error and exits with code 1.PALA_MOODLE_URL): logs in once through the mobile web service, with the password only in the POST body oflogin/token.php, and keeps only the token. Alerts on new unread notifications and on deadlines in the next 14 days.PALA_GEMINI_API_KEYor~/.config/pala/gemini_key): a short Hungarian summary is added to the Slack message, only when there is at least one alert. The key goes in thex-goog-api-keyheader and the model name is validated.thinkingBudget: 0, so thinking tokens cannot use up the output cap.docs/USER.mddescribes the new settings.Testing
dart analyze --fatal-infos: no issuesdart test: 123 passed (new:test/slack_notifier_test.dart,test/gemini_moodle_test.dart)Not yet verified against the real services:
🤖 Generated with Claude Code