2026-02-06 22:50:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Application;
|
|
|
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
|
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
|
|
|
|
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
|
|
|
->withRouting(
|
|
|
|
|
web: __DIR__.'/../routes/web.php',
|
feat(agentic): add agent allowance system for model quotas and budgets
Implements quota enforcement for agents including daily token limits,
daily job limits, concurrent job caps, model allowlists, and global
per-model budgets. Quota recovery returns 50% for failed jobs and
100% for cancelled jobs.
Go: AllowanceService with MemoryStore, AllowanceStore interface, and
25 tests covering all enforcement paths.
Laravel: migration for 5 tables (agent_allowances, quota_usage,
model_quotas, usage_reports, repo_limits), Eloquent models,
AllowanceService, QuotaMiddleware, and REST API routes.
Closes #99
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:32:41 +00:00
|
|
|
api: __DIR__.'/../routes/api.php',
|
2026-02-06 22:56:44 +00:00
|
|
|
commands: __DIR__.'/../routes/console.php',
|
2026-02-06 22:50:18 +00:00
|
|
|
)
|
|
|
|
|
->withMiddleware(function (Middleware $middleware) {
|
|
|
|
|
//
|
|
|
|
|
})
|
|
|
|
|
->withExceptions(function (Exceptions $exceptions) {
|
|
|
|
|
//
|
|
|
|
|
})
|
|
|
|
|
->create();
|