Skip to Content

Organising config

organising.config.ts at the repo root is the single registry for how Telegram topics connect timelining to sibling organising apps. It is imported as @organising-config across webhook, pipeline, and resolve code.

Why it exists

Every _bot* message is ingested into Neo4j regardless of config. The config only declares which topics also participate in the wider organising system — forwarding live webhooks for interactive bots, or triggering resolve workers after ingest/transcribe.

Adding a channel here is the integration point; domain logic stays in the sibling repo.

Shape

ORGANISING_CONFIG = { enact: { domain: '…', channels: { … } }, enrol: { domain: '…', channels: { … } }, evaluate: { domain: '…', channels: { … } }, envision: { domain: '…', channels: { … } }, }

Each channel specifies:

FieldMeaning
channelTelegram topic name (e.g. _botAgendar)
aliasesAlternate topic names
forwardLive webhook relay to sibling (mode: all, replies_only, none)
resolvePOST target after entry is ready (path on sibling domain)

Helper exports: channelSpecForTopic, forwardRouteForTopic, resolveRouteForTopic, resolveTopics, queue name constants.

Current channels (illustrative)

AppTopicForwardResolve
enrol_botEnrolmentall → /api/webhook/api/webhook/resolve
enact_botDecidir—/api/webhook/resolve/decide
enact_botAgendarreplies → /api/webhook/resolve/schedule/update/api/webhook/resolve/schedule
enact_botRecursos—/api/webhook/resolve/resource
evaluate_botEvaluation——
envision_botEnvisioning——

Domains and paths are hub-specific after propagating; the structure is stable.

Pipeline consumption

services/pipeline/routing.ts reads config to build action lists:

  • On receipt — optional forward-webhook, always dispatch-ingest (non-replies)
  • After ingest — trigger-resolve for text on resolve channels; dispatch-transcribe for voice

Reply messages skip ingest but may still forward (e.g. schedule updates on _botAgendar).

Scope of this doc

Config covers routing only. Schemas, eligibility, backlog handling, and UI for each domain live in sibling repos — see Resolvers.

Last updated on