- gateway/normalize.py: normalize_slack_event -> KonstructMessage (strips bot mention) - gateway/channels/slack.py: register_slack_handlers for app_mention + DM events - rate limit check -> ephemeral rejection on exceeded - idempotency dedup (Slack retry protection) - placeholder 'Thinking...' message posted in-thread before Celery dispatch - auto-follow engaged threads with 30-minute TTL - HTTP 200 returned immediately; all LLM work dispatched to Celery - gateway/main.py: FastAPI on port 8001, /slack/events + /health - router/tenant.py: resolve_tenant workspace_id -> tenant_id (RLS-bypass query) - router/ratelimit.py: check_rate_limit Redis token bucket, RateLimitExceeded exception - router/idempotency.py: is_duplicate + mark_processed (SET NX, 24h TTL) - router/context.py: load_agent_for_tenant with RLS ContextVar setup - orchestrator/tasks.py: handle_message now extracts placeholder_ts/channel_id, calls _update_slack_placeholder via chat.update after LLM response - docker-compose.yml: gateway service on port 8001 - pyproject.toml: added redis, konstruct-router, konstruct-orchestrator deps
28 lines
670 B
TOML
28 lines
670 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "konstruct-gateway"
|
|
version = "0.1.0"
|
|
description = "Channel Gateway — unified ingress for all messaging platforms"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"konstruct-shared",
|
|
"konstruct-router",
|
|
"konstruct-orchestrator",
|
|
"fastapi[standard]>=0.115.0",
|
|
"slack-bolt>=1.22.0",
|
|
"python-telegram-bot>=21.0",
|
|
"httpx>=0.28.0",
|
|
"redis>=5.0.0",
|
|
]
|
|
|
|
[tool.uv.sources]
|
|
konstruct-shared = { workspace = true }
|
|
konstruct-router = { workspace = true }
|
|
konstruct-orchestrator = { workspace = true }
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["gateway"]
|