All env vars now use GITEA_ prefix with fallback to old names:
- GITEA_TOKEN (was PI_GIT_TOKEN)
- GITEA_USER (was PI_GIT_USER)
- GITEA_WEBHOOK_HOST/PORT/TOKEN/URL (was PI_WEBHOOK_*)
- GITEA_POLL_INTERVAL (was PI_BOT_POLL_INTERVAL)
- GITEA_NOTIF_INTERVAL (was PI_NOTIF_POLL_INTERVAL)
- GITEA_HOOKS_URL/PATH/TOKEN (was OPENCLAW_HOOKS_*)
Old names still work as fallbacks for backward compat.
- Replace per-repo event polling with notification-based polling
- Collab repos default to mention-only mode (respond only when @mentioned)
- Own repos default to all-events mode (respond to everything)
- Parse @mentions and extract directive text for focused LLM context
- Notification poll interval: 30s (configurable via PI_NOTIF_POLL_INTERVAL)
- Mark notifications as read after processing (no ID tracking needed)
- Add gitea_repo_config tool to switch repos between 'all' and 'mention' modes
- Add gitea_tracked_repos tool to show all repos and their response modes
- Persist per-repo configs to disk across reloads
- Multi-bot coordination: issues can @mention different bots with directives
- files.ts: Use POST for new files, PUT for updates (Gitea 1.25 requires this)
- issues.ts: Add editIssue() for state/title/body changes
- write-tools.ts: Add gitea_edit_issue tool (open/close/edit issues)
- webhook/server.ts: Persist lastPollAt to disk to prevent duplicate
events on reload; use followUp delivery to queue events during LLM turns
- index.ts: Use deliverAs:'followUp' for sendUserMessage
- Pure fetch-based API client (src/) with zero external dependencies
- Pi extension adapter (pi-extension/) registering 17 tools
- Standalone CLI (cli.ts) replacing gitea-scripts/gitea.js
- Token auth everywhere (no HMAC secrets)
- SKILL.md for agent auto-discovery
- TOOL.md with full parameter reference
Consolidates pi-bot/extensions/pi-gitea and clawbot/gitea-scripts
into a single shared package.