This repository has been archived on 2026-03-09. You can view files and clone it, but cannot push or open issues or pull requests.
php-agentic/Routes/api.php
Snider 8b8a9c26e5
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
feat: extract Brain operations into CorePHP Actions + API routes
- Create 4 Actions in Actions/Brain/ (RememberKnowledge, RecallKnowledge,
  ForgetKnowledge, ListKnowledge) using the Action trait pattern
- Slim MCP tool handlers to thin wrappers calling Actions
- Add BrainController with REST endpoints (remember, recall, forget, list)
- Add API route file with api.auth + api.scope.enforce middleware
- Wire ApiRoutesRegistering in Boot.php
- Rename routes/ → Routes/ to match CorePHP convention
- Remove empty database/migrations/ (legacy Laravel boilerplate)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 12:15:13 +00:00

27 lines
943 B
PHP

<?php
declare(strict_types=1);
use Core\Mod\Agentic\Controllers\Api\BrainController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Agentic API Routes
|--------------------------------------------------------------------------
|
| Brain (OpenBrain knowledge store) endpoints.
| Auto-wrapped with 'api' middleware and /api prefix by ApiRoutesRegistering.
|
*/
Route::middleware(['api.auth', 'api.scope.enforce'])
->prefix('brain')
->name('brain.')
->group(function () {
Route::post('remember', [BrainController::class, 'remember'])->name('remember');
Route::post('recall', [BrainController::class, 'recall'])->name('recall');
Route::delete('forget/{id}', [BrainController::class, 'forget'])->name('forget')
->where('id', '[0-9a-f-]+');
Route::get('list', [BrainController::class, 'list'])->name('list');
});