- 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>
27 lines
943 B
PHP
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');
|
|
});
|