feat(server): meter AI point usage across tenant AI features
Adds an ai_point_usage_logs ledger and a reserve/refund/complete pipeline that charges AI points for article selection optimize, template analyze /title/outline, and KOL prompt generate/optimize. Pending reservations are reconciled when the kol-assist worker and template-assist tasks finish or fail, so points refund automatically on errors. Workspace now exposes the AI quota status and a paginated usage ledger. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,6 +80,7 @@ func RegisterRoutes(app *bootstrap.App) {
|
||||
workspace.GET("/overview", wsHandler.Overview)
|
||||
workspace.GET("/recent-articles", wsHandler.RecentArticles)
|
||||
workspace.GET("/quota-summary", wsHandler.QuotaSummary)
|
||||
workspace.GET("/ai-point-usage", wsHandler.AIPointUsageLogs)
|
||||
workspace.GET("/template-cards", wsHandler.TemplateCards)
|
||||
workspace.GET("/kol-cards", wsHandler.KolCards)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user