mirror of
https://github.com/hoshikawa2/compass_backoffice.git
synced 2026-07-09 13:54:20 +00:00
1.9 KiB
1.9 KiB
Patch Summary — Backoffice REST as Channel
Goal
Adapt the Backoffice project so legacy REST endpoints behave as framework channel entrypoints instead of directly invoking BackofficeWorkflowExecutor from FastAPI routes.
Added
app/channels/__init__.pyapp/channels/backoffice_rest_adapter.pyapp/workflows/backoffice_workflow_dispatcher.pydocs/BACKOFFICE_REST_AS_CHANNEL_ARCHITECTURE.md
Modified
-
app/main.py- Instantiates
BackofficeRestChannelAdapterandBackofficeWorkflowDispatcher. - Updates
/agent/*routes to create aBackofficeChannelEnvelopeand dispatch through the channel path. - Updates response metadata with
framework_entrypoint=channel_gatewayandsource_channel=backoffice_rest. - Updates readiness/debug metadata to show the channel gateway entrypoint.
- Instantiates
-
app/agents/backoffice_agent.py- Removes guidance that operational checklist should be called through direct
BackofficeWorkflowExecutorusage. - Documents that operational ticket/emulator flows enter through the channel adapter and dispatcher.
- Removes guidance that operational checklist should be called through direct
-
app/workflows/backoffice_workflow_executor.py- Repositioned as the workflow execution engine behind the dispatcher, not the REST entrypoint.
-
src/api/LEGACY_ROUTES_DISABLED.md- Updated to describe the new REST → ChannelGateway → dispatcher → workflow path.
New execution chain
Legacy REST route
→ BackofficeRestChannelAdapter
→ ChannelGateway.normalize(...)
→ BackofficeWorkflowDispatcher
→ BackofficeWorkflowExecutor / LangGraph workflow
→ Response builder preserving legacy contract
Validation done
Python syntax compilation succeeded for the changed Python files:
app/main.py
app/agents/backoffice_agent.py
app/channels/backoffice_rest_adapter.py
app/workflows/backoffice_workflow_dispatcher.py
app/workflows/backoffice_workflow_executor.py