- 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
- Repos with admin access get webhooks auto-installed
- Collab repos (403 on webhook install) fall back to event polling
- Poll every 60s for new issues, PRs, and comments
- Use Date objects for timestamp comparison (fixes TZ offset issues)
- Skip events from the bot's own user
- Clean startup/shutdown with state reset on reload
- Health endpoint reports webhook_repos + poll_only_repos counts
- 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.