Commit graph

6 commits

Author SHA1 Message Date
Snider
9a6aebd128 fix(api): correct route prefix comments — no prefix applied
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 18:40:34 +00:00
Snider
c47c23406f fix(api): use event-scoped route registration
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
Routes must go through $event->routes() so they only load for API
requests, not globally. LifecycleEventProvider adds /api prefix,
so Go client sets BaseURL to .../api.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 18:39:56 +00:00
Snider
29625c462b fix: restore Routes/api.php after case-sensitive rebase conflict
Some checks failed
CI / PHP 8.3 (push) Failing after 1s
CI / PHP 8.4 (push) Failing after 1s
macOS case-insensitive filesystem caused routes/api.php removal
to also delete Routes/api.php during rebase.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 18:35:44 +00:00
Snider
f15093843b feat(api): add REST endpoints for go-agentic Client
16 endpoints matching the go-agentic Client contract:
- Plans: list, get, create, update status, archive
- Phases: get, update status, checkpoint, task update, task toggle
- Sessions: list, get, start, end, continue
- Health: /v1/health ping

Routes at /v1/* with AgentApiAuth Bearer token middleware.
Permission-scoped: plans.read, plans.write, phases.write, sessions.write.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 18:34:59 +00:00
Snider
6f0618692a feat: add plan/session/phase/task Actions + slim MCP tools
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
Extract business logic from MCP tool handlers into 15 Action classes
(Plan 5, Session 5, Phase 3, Task 2) following the Brain pattern.
MCP tools become thin wrappers calling Action::run(). Add framework-level
REST controllers and routes as sensible defaults for consumers.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-04 13:58:45 +00:00
Snider
8b8a9c26e5 feat: extract Brain operations into CorePHP Actions + API routes
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
- 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