agent/php/Migrations
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
..
0001_01_01_000001_create_agentic_tables.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000002_add_ip_whitelist_to_agent_api_keys.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000003_create_agent_plans_tables.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000004_create_prompt_tables.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000005_add_performance_indexes.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000006_add_soft_deletes_to_agent_plans.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000007_add_template_versions.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000008_create_brain_memories_table.php fix(brain): Postgres portability for brain connection + migrations 2026-04-23 12:32:58 +01:00
0001_01_01_000009_drop_brain_memories_workspace_fk.php fix(brain): Postgres portability for brain connection + migrations 2026-04-23 12:32:58 +01:00
0001_01_01_000010_add_source_to_brain_memories.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000010_rename_session_columns.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000011_create_issue_tracker_tables.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
0001_01_01_000012_create_agent_messages_table.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
2026_03_17_000001_create_github_tracking_tables.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
2026_03_31_000001_create_agent_fleet_tables.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
2026_03_31_000002_add_category_to_agent_workspace_states.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
2026_04_23_000001_add_indexed_at_to_brain_memories.php feat(brain): add EmbedMemory job + indexed_at tracking 2026-04-23 12:47:10 +01:00
2026_04_24_000001_add_org_to_brain_memories.php fix(brain): close openbrain audit gaps — org scoping + index cleanup + reindex flags + MCP schemas + circuit layer 2026-04-24 08:14:06 +01:00
2026_04_25_000001_create_agent_profiles_table.php feat(agent/php): AgentProfile migration + Eloquent model + scopes (#825) 2026-04-26 00:34:24 +01:00
2026_04_25_000002_add_plugin_cc_name_to_agent_profiles.php feat(agent/php): plugin-cc integration — column + sync command (#837) 2026-04-26 00:48:37 +01:00
2026_04_25_000002_reconcile_fleet_nodes_table.php feat(agent/agentic): RFC foundation — atomic CompleteTask + credit ledger reconcile 2026-04-25 20:59:38 +01:00
2026_04_25_000003_create_agent_dispatches_table.php feat(agent/php): DispatchMantisTicketJob + HermesClient + agent_dispatches table (#827) 2026-04-26 00:52:37 +01:00
2026_04_25_000003_reconcile_fleet_tasks_and_credit_entries.php feat(agent/agentic): RFC foundation — atomic CompleteTask + credit ledger reconcile 2026-04-25 20:59:38 +01:00
2026_04_25_000004_add_fleet_current_task_and_credit_constraints.php feat(agent/agentic): RFC foundation — atomic CompleteTask + credit ledger reconcile 2026-04-25 20:59:38 +01:00
2026_04_25_000100_create_api_keys_table.php feat(agent/api): RFC foundation — API keys, webhooks, rate limiting, docs split 2026-04-25 21:01:54 +01:00
2026_04_25_000101_create_webhook_endpoints_table.php feat(agent/api): RFC foundation — API keys, webhooks, rate limiting, docs split 2026-04-25 21:01:54 +01:00
2026_04_25_000102_create_webhook_deliveries_table.php feat(agent/api): RFC foundation — API keys, webhooks, rate limiting, docs split 2026-04-25 21:01:54 +01:00