Engineering/AI documentation

Messaging Integrations

Messaging connects external conversation channels such as team or participant messaging tools into Istara.

documented
UI Path
Integrations > Messaging
Component
MessagingTab
Source Refs
3
Tests
0

Concepts: mcp

Implementation Summary

Messaging connects external conversation channels such as team or participant messaging tools into Istara.

Frontend Surface

  • frontend/src/components/integrations/MessagingTab.tsx
  • frontend/src/components/integrations/ChannelInstanceCard.tsx
  • frontend/src/components/integrations/ChannelMessagesPanel.tsx
  • frontend/src/components/integrations/ChannelConversationsPanel.tsx
  • frontend/src/components/integrations/ChannelSetupWizard.tsx
  • backend/app/api/routes/channels.py
  • backend/app/api/routes/webhooks.py
  • backend/app/services/channel_service.py
  • backend/app/services/inbound_processor.py

State, API, And Backend Contracts

Stores

  • frontend/src/stores/integrationsStore.ts

API And Backend

  • backend/app/api/routes/channels.py
  • backend/app/api/routes/webhooks.py
  • backend/app/services/channel_service.py
  • backend/app/services/inbound_processor.py

Architecture Notes

  • The feature is mounted through frontend/src/components/integrations/MessagingTab.tsx and the UI navigation path recorded in the inventory.
  • MessagingTab passes the active project into channel listing, clears stale channel state during project changes, and renders only channel records whose project_id matches the active project.
  • Channel cards, setup testing, message history, and conversation detail panels pass the active project into every channel detail, lifecycle, health, message, conversation, and cleanup call so stale channel ids from another project cannot be dereferenced.
  • backend/app/api/routes/channels.py requires an explicit project_id for project-facing channel lists and detail routes, verifies the channel instance belongs to that same project even for global admins, and enforces project viewer access for reads; channel creation and lifecycle mutations remain project-admin operations.
  • Channel creation uses the active-project authorization helper before persisting a channel instance, so global admins cannot create project-facing channel records for missing or paused projects that would later appear in Integrations as orphan activity.
  • backend/app/services/channel_service.py list, update, delete, start, stop, health, message-history, conversation, and manual-send helpers require a project id and load by both record id and project id, preventing internal callers from bypassing route-level active-project checks.
  • Channel startup and health-check failures are fail-closed at the service boundary: adapter/provider exception details remain in server logs while API consumers receive the stable actionable Connection check failed. Verify the credentials and network access, then retry. message, so tokens, private URLs, and transport internals never reach the setup wizard.
  • Channel start and startup auto-loading treat Project.is_paused as a dispatch boundary. A paused or missing project cannot start or auto-start channel adapters, even when a channel instance row is still marked active.
  • Project pause stops active channel adapters owned by that project and marks their instances stopped, so paused projects do not continue receiving external messages that would later be dropped by inbound guards.
  • Project pause also stops active channel adapters for that project and marks those instances stopped, preventing messaging integrations from continuing to receive or process project content after the pause.
  • backend/app/services/channel_service.py filters message and conversation rows by the same project, stamps new recorded messages with the owning channel instance project when a caller does not already provide one, and rejects explicit project-id claims that do not match the channel instance.
  • Inbound message routing resolves active deployments only within the receiving channel instance's project and only when the deployment explicitly lists that channel instance, so an active deployment from another project or an unbound deployment cannot receive participant content.
  • Inbound processors drop traffic for unscoped, missing, or paused projects before persistence, adaptive deployment routing, LLM calls, or improvement-governance evidence are created.
  • The Pi replacement benchmark path adds pi_local, a credential-free adapter that starts through the normal channel instance lifecycle and injects messages through ChannelRouter and process_inbound_channel_message. It is local-only: no provider is started and no external credentials or webhooks are used. Injection is dropped after the adapter stops, and project cleanup unregisters the adapter and clears its router callback. Pi responses are emitted only when candidate metadata or the opt-in flag is present, so live Telegram/WhatsApp/Google Chat behavior remains unchanged.
  • A pi_local instance derives the destination project exclusively from its owning channel instance; caller metadata cannot redirect an inbound message or candidate telemetry into another project.
  • Simulation and benchmark channel lifecycle calls must include the active project id on by-id detail, health, message, conversation, lifecycle, and cleanup URLs, matching the UI and API authorization path.
  • The frontmatter and manifest entries are the durable contract for agents updating this page after code changes.
  • When the referenced component, store, route, agent, skill, or test behavior changes, regenerate and validate the feature documentation.

Agents, Skills, LLM, MCP, And Permissions

  • MCP-related behavior must keep access policy, audit evidence, and tool/resource exposure synchronized with the cited route or integration component.

Tests And Verification

  • tests/test_channels.py
  • tests/test_pi_replacement_candidate.py
  • tests/test_channel_inbound.py
  • tests/test_project_scope_contracts.py
  • tests/test_integration_simulation_scope.py

Compass Evidence

  • Spec/task: CF-SPEC-53 / CF-657; CF-SPEC-60 / CF-762; CF-SPEC-60 / CF-773; CF-SPEC-60 / CF-776; CF-SPEC-65 / CF-842; CF-SPEC-75 / CF-964; CF-SPEC-82 / CF-1061; CF-SPEC-93 / CF-1184; CF-SPEC-3 / CF-38
  • Inventory source: docs/features/inventory.json

When To Update

  • Update this page whenever the listed UI components, stores, routes, model behavior, permissions, or tests change.
  • Regenerate the site and machine manifests with python scripts/feature_docs.py --seed-missing --generate-site --check.