2
0
Commit Graph

12 Commits

Author SHA1 Message Date
de7d6a719e feat(plugins): implement protocol version negotiation in server
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 6m51s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 7m6s
Build and Release / Lint (push) Successful in 7m42s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 3m9s
Build and Release / Build Binaries (amd64, darwin, macos) (push) Successful in 6m31s
Build and Release / Build Binaries (arm64, darwin, macos) (push) Successful in 5m54s
Build and Release / Build Binary (linux/arm64) (push) Successful in 9m40s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h5m9s
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.
2026-02-13 02:18:20 -05:00
174d18db22 refactor(plugins): migrate external plugin manager to grpc/connect
Replace manual HTTP/JSON RPC implementation with generated gRPC/Connect client, providing type-safe plugin communication.

Code Generation:
- Generate plugin.pb.go and pluginv1connect/plugin.connect.go from plugin.proto
- Add generate-plugin-proto Makefile target
- Delete hand-written types.go (replaced by generated code)

ExternalPluginManager Refactoring:
- Replace httpClient with pluginv1connect.PluginServiceClient
- Use h2c (cleartext HTTP/2) transport for gRPC without TLS
- Replace all manual callRPC/callRPCWithContext calls with typed Connect methods
- Remove JSON serialization/deserialization code
- Simplify error handling with native gRPC status codes

Benefits:
- Type safety: compile-time verification of request/response types
- Protocol compatibility: standard gRPC wire format
- Reduced code: ~100 lines of manual RPC code removed
- Better errors: structured gRPC status codes instead of string parsing
- Matches existing Actions runner pattern (Connect RPC over HTTP/2)

This completes the plugin framework migration to production-grade RPC transport.
2026-02-13 01:45:29 -05:00
f42c6c39f9 feat(ai-service): complete ai production readiness tasks
All checks were successful
Build and Release / Create Release (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 6m49s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 7m6s
Build and Release / Lint (push) Successful in 7m15s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been skipped
Build and Release / Build Binary (linux/arm64) (push) Has been skipped
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.
2026-02-13 01:16:58 -05:00
015318aa0a feat(plugins): add PluginRouter interface for route registration
Some checks failed
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been cancelled
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been cancelled
Build and Release / Build Binary (linux/arm64) (push) Has been cancelled
Build and Release / Lint (push) Has been cancelled
Build and Release / Unit Tests (push) Has been cancelled
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been cancelled
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Build and Release / Integration Tests (PostgreSQL) (push) Has been cancelled
Introduce PluginRouter interface to standardize plugin route registration and replace the previous 'any' type approach. Add WebRouterAdapter to wrap web.Router and handle path prefixes correctly. This provides a cleaner, type-safe API for plugins to register routes without needing to know about the underlying router implementation.
2026-01-21 10:35:56 -05:00
12f4ea03a8 refactor: add /v3 suffix to module path for proper Go semver
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Trigger Vault Plugin Rebuild / Trigger Vault Rebuild (push) Successful in 0s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 2m48s
Build and Release / Lint (push) Failing after 5m2s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 5m37s
Go's semantic import versioning requires v2+ modules to include the
major version in the module path. This enables using proper version
tags (v3.x.x) instead of pseudo-versions.

Updated module path: code.gitcaddy.com/server/v3
2026-01-17 17:53:59 -05:00
71bf7c06e7 feat(vault): Solo tier now includes limited versioning and CI/CD tokens
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m5s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m44s
Build and Release / Lint (push) Successful in 5m5s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Successful in 2m51s
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Successful in 3m42s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 4m1s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 4m6s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h4m37s
- Solo tier changes:
  - 2 versions history (limited rollback capability)
  - 1 CI/CD token (24h max TTL, read-only access)
  - SSO remains Pro+ only

- Added granular license limits:
  - MaxVersions, MaxTokens, MaxTokenTTLHours, TokensReadOnly

- Added token limit enforcement with CheckTokenLimit()

- Updated all 28 locale files with new translations

- Added templates:
  - feature_upgrade.tmpl (for SSO upgrade prompts)
  - not_installed.tmpl (when vault plugin missing)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 11:49:12 -05:00
e82aaf9a72 vault changes 2026-01-17 11:31:19 -05:00
1c15c3c45a fix: lint errors in plugin loader
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 2m31s
Build and Release / Unit Tests (push) Successful in 5m10s
Build and Release / Lint (push) Successful in 5m21s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Successful in 3m20s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 3m28s
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Successful in 3m55s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 4m2s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h6m19s
- Use errors.New instead of fmt.Errorf for simple strings
- Run gofmt on new files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:24:55 -05:00
b91b9c5711 feat: implement plugin loading system
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Lint (push) Failing after 4m23s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Has been cancelled
Build and Release / Unit Tests (push) Has been cancelled
- Add modules/plugins/loader.go to load .so plugins from plugins directory
- Add modules/setting/plugins.go for [plugins] configuration section
- Wire up plugin loading before DB init so plugins can register models
- Wire up plugin migrations and initialization after DB init
- Register plugin routes in web.go

Plugins can now be loaded at runtime by placing .so files in the plugins
directory and enabling [plugins] ENABLED = true in app.ini.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:16:42 -05:00
af6d4addd4 code.caddy rename
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 3m7s
Build and Release / Lint (push) Successful in 5m21s
Build and Release / Unit Tests (push) Successful in 5m46s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 3m44s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Successful in 4m4s
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Successful in 3m23s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 3m47s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h6m28s
2026-01-17 09:02:21 -05:00
a579977667 vault templates and translations
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m3s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m16s
Build and Release / Lint (push) Successful in 5m27s
Build and Release / Build Binaries (arm64, darwin, macos-latest) (push) Failing after 42s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 2m34s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 2m48s
Build and Release / Build Binaries (amd64, darwin, macos-latest) (push) Successful in 3m20s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h7m8s
2026-01-17 02:54:23 -05:00
0d36b892eb Plugin entry 2026-01-16 22:38:01 -05:00