agent/php/Services
Snider 82ffd420e0 feat(agent/php): DispatchMantisTicketJob + HermesClient + agent_dispatches table (#827)
Phase 3 lane: queueable Job that resolves a profile via ProfileSelector,
posts POST {gateway}/v1/responses to the chosen Hermes gateway, persists
ticket_id/profile_id/response_id/run_id/status in agent_dispatches, and
chains CaptureDispatchResultJob.

Migration 2026_04_25_000003 creates agent_dispatches table (FK-free,
Postgres-compatible).

HermesClient: thin Laravel HTTP wrapper around the Hermes /v1/responses
endpoint with Authorization header + JSON body.

DispatchMantisTicketJob behaviour:
- Resolves profile via ProfileSelector::pickFor()
- Null-profile → log warn + ->release(60) requeue
- Otherwise POSTs to gateway, persists AgentDispatch row, queues
  CaptureDispatchResultJob

AgentDispatch Eloquent model with minimal $fillable.

Pest Feature test (Http::fake): verifies request shape, persisted row,
downstream capture-job queueing, and the no-profile requeue path.
Test file conditionally aliases minimal stubs for sibling-lane services
so this file remains runnable before #826/#828 fully land in dev.

Codex note: php -l clean; pest skipped (no vendor/).

Closes tasks.lthn.sh/view.php?id=827

Co-authored-by: Codex <noreply@openai.com>
2026-04-26 00:52:37 +01:00
..
Concerns revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgentApiKeyService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgentDetection.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgenticManager.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgenticProviderInterface.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgenticResponse.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgentSessionService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AgentToolRegistry.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
BrainService.php feat(agent/brain): lift OpenBrain discovery features (search/discoverTags/listScopes) (#180) 2026-04-25 20:39:14 +01:00
ClaudeService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ContentService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ForgejoService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
GeminiService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
HermesClient.php feat(agent/php): DispatchMantisTicketJob + HermesClient + agent_dispatches table (#827) 2026-04-26 00:52:37 +01:00
IpRestrictionService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
MantisClient.php feat(agent/php): CaptureDispatchResultJob + MantisClient + ShaExtractor (#828) 2026-04-26 00:44:23 +01:00
OpenAIService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
PlanTemplateService.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ProfileSelector.php feat(agent/php): ProfileSelector + ShapeClassifier services per Phase 3 (#826) 2026-04-26 00:48:37 +01:00
ShaExtractor.php feat(agent/php): CaptureDispatchResultJob + MantisClient + ShaExtractor (#828) 2026-04-26 00:44:23 +01:00
ShapeClassifier.php feat(agent/php): ProfileSelector + ShapeClassifier services per Phase 3 (#826) 2026-04-26 00:48:37 +01:00