Remove inline instruction prompts from experiment generation and analysis. These instructions are now defined in ABTestGeneratePlugin and ABTestAnalyzePlugin, eliminating duplication and improving maintainability.
Simplify AI content generation by delegating to plugin system:
- Remove inline prompt instructions (now in LandingPageContentPlugin)
- Add extractJSON helper to handle markdown-wrapped responses
- Hardcode CTA URLs to repo URL instead of relying on AI
- Apply JSON extraction to both content generation and translation
- Reduces code duplication and improves maintainability
Add "admin.dashboard.analyze_page_experiments" translation key across all 29 locales for the landing page A/B testing experiment analysis cron job in the admin dashboard.
Implement internationalization system for landing pages:
- Database model for storing language-specific translations
- Language configuration with default and enabled languages
- Language switcher in navigation across all templates
- Translation management UI in settings
- Support for 15 languages including English, Spanish, German, French, Japanese, Chinese
- Auto-detection and manual language selection
- AI-powered translation generation capability
Enable blog functionality on custom domains with dedicated views:
- Blog post detail page with markdown rendering
- Paginated blog list view
- Shared context setup for consistent navigation/footer
- Route handling for /blog and /blog/:id paths
- Template updates across all landing page themes
Add blog section configuration and rendering to landing pages. Includes:
- New BlogSectionConfig with headline, max posts, and excerpt options
- Logo source selection (URL, repo avatar, or org avatar)
- Recent blog posts display with featured images
- Navigation links to blog section
- Absolute repo URLs for custom domain support
Implement MCP tools for querying repository issues. list_issues supports pagination and state filtering (open/closed/all), while get_issue retrieves detailed information including body content and comments for a specific issue.
Allow private repositories to enable public release downloads on their landing pages. When enabled, unauthenticated users can download release attachments without accessing the repository. Adds download sections to all landing page templates with styling.
Add theme configuration options to control visibility of Licenses and API links in the footer. Also add authentication token to vault version API requests in build workflow to prevent rate limiting issues.
Move ShowFooterPoweredBy from static setting to dynamic theme configuration, allowing admins to toggle the "Powered by GitCaddy Server" footer message through the admin panel without restarting the server.
Add RELEASE_TOKEN to all checkout actions to enable access to private dependencies during CI builds. Fixes authentication issues when cloning vault and other private repositories.
Separate packages into PublicPackages and PrivatePackages arrays for template rendering. Add CanWritePackages flag to determine if viewer has permission to publish packages (admin, owner, or org team member with write access). Revert anonymous user 404 redirect to show proper error page.
Improve UX for unauthenticated visitors by redirecting them to the homepage instead of showing a 404 page. Authenticated users still see the standard 404 error page.
Set Private flag based on whether actor is present. When actor is nil (anonymous), Private must be false so SearchRepositoryCondition correctly filters to public repos only. Fixes repo count visibility for unauthenticated users.
Pass actor/doer to GetOrgOverviewStats to filter repository count based on user access rights. Replace CountRepositories with SearchRepository to respect permission checks. Prevents users from seeing total count of repos they cannot access.
Parse .gitsecrets-ignore file from commits to filter out known false positives during secret scanning. Matches entries by SHA-256 content hash (truncated to 16 chars) and pattern ID. Update push rejection message to guide users toward GitSecrets addon for managing ignored detections.
Update runner label matching to strip ":scheme" suffixes (e.g., ":host", ":docker") before comparison. This allows runners with "germany-linux:host" to match jobs with "runs-on: germany-linux" and vice versa.
Previously, exact label match was required, causing runners with scheme-qualified labels to fail matching jobs without schemes.
Adds v2 API endpoints for optimized workflow status queries. Implements /workflows/status to fetch latest run per workflow in single query using MAX(id) grouping. Adds /runs/{id}/failure-log endpoint returning structured failure data with job details, failed steps, log tails (last 200 lines), and workflow YAML content. Reduces client-side API calls and processing overhead.
Complete protocol versioning implementation on the server side, enabling forward-compatible plugin protocol evolution.
Server Changes:
- Send ProtocolVersion = 1 in InitializeRequest
- Store plugin's reported protocol version in ManagedPlugin
- Treat version 0 (pre-versioning plugins) as version 1
- Add SupportsProtocol() method to check before calling version-gated RPCs
- Log plugin's protocol version during initialization
Generated Code:
- Regenerate plugin.pb.go with protocol_version fields
- Add getter methods for new fields
Documentation:
- Add Protocol Versioning section to PLUGINS.md
- Explain version negotiation flow
- Document when plugins need to update vs. when they don't
- Add version history table (currently only v1)
- Update all example code to return protocol_version = 1
Benefits:
- Server can safely add new RPCs in future versions without breaking old plugins
- Plugins can detect newer servers and opt into advanced features
- Zero-value (0) provides backwards compatibility with pre-versioning plugins
- Clear upgrade path documented for plugin developers
This completes the protocol versioning feature started in the previous commit.
Add PLUGINS.md with complete documentation for building external GitCaddy plugins using the gRPC-based plugin protocol.
Documentation includes:
- Protocol overview and service definition
- Lifecycle diagram (Initialize → HealthCheck → OnEvent/HandleHTTP → Shutdown)
- Complete message reference for all 6 RPC methods
- Plugin manifest specification (routes, events, permissions, license tiers)
- Health monitoring and auto-restart behavior
- Configuration guide for external vs managed mode
- Transport details (h2c/HTTP2, gRPC wire format)
- Full working examples in Go, C#, and Python
- Debugging tips and common issues
Also updates README.md to reference the plugin guide and removes outdated Chinese translations (zh-cn, zh-tw) that were not being maintained.
This provides plugin developers with everything needed to build and deploy external services that integrate with GitCaddy's plugin framework.
Implement critical production readiness features for AI integration: per-request provider config, admin dashboard, workflow inspection, and plugin framework foundation.
Per-Request Provider Config:
- Add ProviderConfig struct to all AI request types
- Update queue to resolve provider/model/API key from cascade (repo > org > system)
- Pass resolved config to AI sidecar on every request
- Fixes multi-tenant issue where all orgs shared sidecar's hardcoded config
Admin AI Dashboard:
- Add /admin/ai page with sidecar health status
- Display global operation stats (total, 24h, success/fail/escalated counts)
- Show operations by tier, top 5 repos, token usage
- Recent operations table with repo, operation, status, duration
- Add GetGlobalOperationStats model method
Workflow Inspection:
- Add InspectWorkflow client method and types
- Implement workflow-inspect queue handler
- Add notifier trigger on workflow file push
- Analyzes YAML for syntax errors, security issues, best practices
- Returns structured issues with line numbers and suggested fixes
Plugin Framework (Phase 5 Foundation):
- Add external plugin config loading from app.ini
- Define ExternalPlugin interface and manager
- Add plugin.proto contract (Initialize, Shutdown, HealthCheck, OnEvent, HandleHTTP)
- Implement health monitoring with auto-restart for managed plugins
- Add event routing to subscribed plugins
- HTTP proxy support for plugin-served routes
This completes Tasks 1-4 from the production readiness plan and establishes the foundation for managed plugin lifecycle.
Significantly expand the AI features section of the README with comprehensive configuration and usage documentation.
New content includes:
- Detailed explanation of Tier 1 (light operations) vs Tier 2 (agent mode)
- Complete app.ini configuration reference with all AI settings
- Step-by-step setup guide (system → org → repo → runner)
- Configuration cascade explanation (repo > org > system)
- Built-in safety features (bot user, loop prevention, rate limits, escalation)
- Automatic operation triggers table
- Manual API trigger examples
- Operation history and audit log access
- Escalation workflow documentation
- V2 API configuration section
This provides users with everything needed to deploy and configure the AI features, from initial setup through advanced agent mode configuration.
Refactor AI service layer to reduce code duplication and improve consistency.
Changes:
- Rename AIOperationRequest to OperationRequest for consistency
- Extract shared logic for issue-targeted operations (respond, triage) into triggerIssueAIOp helper
- Standardize field alignment in struct definitions
- Remove redundant error handling patterns
This reduces the API operations file by ~40 lines while maintaining identical functionality.
Add comprehensive web UI for configuring AI features at repository and organization levels, completing the activation workflow for AI operations.
Repository AI Settings (repo/settings/ai):
- Enable/disable AI unit for the repository
- Toggle Tier 1 operations (auto-respond, auto-review, auto-triage, workflow inspection)
- Configure Tier 2 agent mode with trigger labels and runtime limits
- Set escalation rules (label, team assignment)
- Override provider/model preferences
- Add custom instructions for different operation types
Organization AI Settings (org/settings/ai):
- Configure org-level AI provider and model
- Set encrypted API key (with masked display)
- Define rate limits (max operations per hour)
- Whitelist allowed operations
- Enable/disable agent mode for org repositories
Both interfaces include proper permission checks, form validation, and cascade resolution display (showing inherited vs. overridden values). Adds navigation entries to settings sidebars and full i18n support.
Add comprehensive API v2 endpoints for managing AI operations and repository-level AI settings.
AI Operations endpoints:
- GET /repos/{owner}/{repo}/ai/operations - List AI operation logs
- GET /repos/{owner}/{repo}/ai/operations/{id} - Get specific operation details
- POST /repos/{owner}/{repo}/ai/operations/trigger - Manually trigger AI operations
- GET /repos/{owner}/{repo}/ai/stats - Get AI usage statistics
AI Settings endpoints:
- GET /repos/{owner}/{repo}/ai/settings - Get repository AI configuration
- PATCH /repos/{owner}/{repo}/ai/settings - Update AI settings (admin only)
Settings include Tier 1 operations (auto-respond, auto-review), Tier 2 agent mode, escalation rules, provider/model preferences, and custom instructions. All endpoints validate AI unit enablement and permissions.
Implement core AI service infrastructure including agent operations, escalation handling, and asynchronous queue processing.
New services:
- Agent service: Handles Tier 2 AI operations with action runner integration
- Queue service: Asynchronous processing of AI operations with retry logic
- Escalation service: Routes complex issues to staff with configurable rules
- Notifier service: Sends notifications for AI operation results
Additional changes:
- Add GitCaddy AI system user (ID: -3) for bot operations
- Add AIConfig to repository units
- Add AI-specific error codes (rate limiting, service errors, etc.)
- Extend AI client with GenerateIssueResponse method
- Add AISettingsV2 struct for repository-level AI configuration
The queue system enables non-blocking AI operations with proper error handling and rate limiting.
Add database models and infrastructure for AI operation tracking and organization-level AI configuration.
OperationLog model tracks all AI operations for auditing, including:
- Operation type, tier, and trigger event
- Token usage (input/output)
- Status tracking (pending, success, failed, escalated)
- Performance metrics (duration)
- Rate limiting support via CountRecentOperations
OrgAISettings model stores per-organization AI configuration:
- Provider and model selection
- Encrypted API key storage
- Rate limits (max operations per hour)
- Allowed operations whitelist
- Agent mode permissions
Also adds AI unit type to repository units for enabling/disabling AI features per repo.
Add repository setting to control anonymous access to app integration endpoints (issue submission, update checks). When enabled (default), the desktop app can access these endpoints without authentication. When disabled, vault token authentication is required.
This provides granular control over app integration access, allowing repository owners to enforce full authentication on sensitive repositories while maintaining ease of use for public/limited repos.
Changes include:
- New PublicAppIntegration boolean field on Repository model
- Database migration v365 to add the field (defaults to true)
- Repository settings UI to toggle the feature
- Updated checkVaultTokenForRepo to respect the setting
- Security enhancement: IssueStatusJSONEndpoint now only returns app-submitted issues to anonymous users
Adds bulk delete functionality to admin packages page, allowing deletion of multiple packages and all their versions at once. Includes confirmation dialog, success/warning flash messages showing count of deleted packages and versions, and proper error handling. Adds new locale strings for delete action, confirmation prompt, and result messages.
Add ability to bulk set packages as private or public in both admin and repository package views. Includes new bulk action buttons, visibility grouping in repository view, and corresponding backend handlers for processing visibility changes. Admin can manage all packages while repository owners can manage their own packages.
Replace link-action class with proper async methods (rerunJob and rerunAll) for handling job and workflow reruns in RepoActionView. This provides better control over the rerun flow and ensures proper page reload after the POST request completes.