CREDO23
7fb0707933
refactor(backend): rename search_space -> workspace across app bulk (Phase 2 Wave D)
...
Scoped codemod over surfsense_backend/app (excluding routes/, Wave E): renames
search_space_id -> workspace_id, search_space -> workspace, SearchSpace -> Workspace
across services, utils, tasks, agents, gateway, event_bus, notifications, podcasts,
automations, observability params, and prompt .md files. Also flips the camelCase
payload key searchSpaceId -> workspaceId (no backend reader; hard cutover).
Preserved carve-outs (verbatim): Celery task names "delete_search_space_background"
and "ai_sort_search_space" (wire names), and the OTel/metric key "search_space.id"
(dashboards depend on it). Enum values 'SEARCH_SPACE' and SearchSourceConnector
untouched.
2026-06-26 18:30:47 +02:00
Anish Sarkar
6fd3f8570e
refactor: streamline auth context usage across chat and automation routes
2026-06-19 21:04:21 +05:30
Anish Sarkar
7e8d26fa81
refactor: route authorization through auth context
2026-06-19 20:27:28 +05:30
Anish Sarkar
9b7e278114
refactor(config): update GATEWAY_ENABLED variable to FALSE and adjust related configurations for improved messaging gateway handling
2026-06-16 23:49:26 +05:30
DESKTOP-RTLN3BA\$punk
ce952d2ad1
chore: linting
2026-06-09 00:42:26 -07:00
DESKTOP-RTLN3BA\$punk
ef7a20a5d0
feat(gateway): implement global messaging gateway toggle
...
- Added a global switch `GATEWAY_ENABLED` to control the activation of all messaging gateway channels (Telegram, WhatsApp, Slack, Discord).
- Updated relevant routes and workers to check the `GATEWAY_ENABLED` flag, returning 404 for HTTP routes when disabled.
- Enhanced documentation in the `.env.example` file to reflect the new configuration option.
2026-06-08 13:24:29 -07:00
CREDO23
b9937cf4b1
refactor(chat): cut live chat streaming over to flows orchestrators (cutover)
...
Flip the live callers (new_chat_routes + gateway/agent_invoke) from the
legacy monolithic app.tasks.chat.stream_new_chat to the side-by-side
app.tasks.chat.streaming.flows orchestrators.
Adds a byte-for-byte differential parity test driving BOTH implementations
on identical, fully-deterministic glue inputs (frozen time/uuid, stubbed
LLM/persistence/agent seams). All glue paths are byte-identical:
* new: auto-pin failure, LLM-load failure, persist-user fail,
persist-assistant fail (full initial-frame ordering + handshake),
pre-stream exception (top-level except path)
* resume: persist-assistant fail
The differential test also surfaced one INTENTIONAL divergence: on a resume
turn whose auto-pin / LLM-load fails, the monolith crashes with
UnboundLocalError (_resume_premium_request_id read in finally before its
post-early-return definition); the flows version emits a clean terminal
error. The flows path is therefore byte-identical or strictly more correct.
The agent-content stream itself is shared, unforkable code
(stream_output -> EventRelay) so it cannot diverge.
Monolith + old parity test deletion follows in a separate commit.
2026-06-04 14:24:18 +02:00
Anish Sarkar
fc2467be3d
feat(gateway): improve WhatsApp account mode handling and connection filtering
2026-06-01 23:08:56 +05:30
Anish Sarkar
05eaa46c3a
feat(gateway): add Discord mention intake supervisor
2026-06-01 20:59:21 +05:30
Anish Sarkar
f8ff58bdce
feat(gateway): route Discord events through external chat
2026-06-01 20:59:13 +05:30
Anish Sarkar
5024b69e69
feat(gateway): handle Discord channel replies
2026-06-01 20:59:04 +05:30
Anish Sarkar
bc8a285187
feat(gateway): add Discord platform adapter
2026-06-01 20:58:50 +05:30
Anish Sarkar
68da295b5d
feat(gateway): add Discord gateway configuration
2026-06-01 20:58:31 +05:30
Anish Sarkar
f305a2e67d
feat(gateway): route Slack events through external chat
2026-06-01 12:36:53 +05:30
Anish Sarkar
61a3586caf
feat(gateway): handle Slack thread replies
2026-06-01 12:36:39 +05:30
Anish Sarkar
78315eb55b
feat(gateway): add Slack platform adapter
2026-06-01 12:36:27 +05:30
Anish Sarkar
5b71685dad
feat(gateway): add Slack gateway configuration
2026-06-01 12:36:07 +05:30
Anish Sarkar
51bf2a8361
feat(gateway): wire WhatsApp bridge runtime
2026-05-29 10:20:25 +05:30
Anish Sarkar
3b529a3ab2
feat(gateway): add Baileys WhatsApp adapter
2026-05-29 10:19:13 +05:30
Anish Sarkar
3d9620275b
feat(gateway): handle WhatsApp Cloud conversations
2026-05-29 10:18:45 +05:30
Anish Sarkar
daa123832e
feat(gateway): add WhatsApp Cloud adapter
2026-05-29 10:18:28 +05:30
Anish Sarkar
a6b2882275
feat(gateway): add WhatsApp gateway configuration
2026-05-29 10:18:11 +05:30
Anish Sarkar
5048b0fd7c
refactor(gateway): route inbound events through platform bundles
2026-05-29 10:17:57 +05:30
Anish Sarkar
e953be5e99
refactor(gateway): abstract platform command handling
2026-05-29 10:17:41 +05:30
Anish Sarkar
f6eb955676
refactor(gateway): share outbound text splitting
2026-05-29 10:17:28 +05:30
Anish Sarkar
3faaa25af6
refactor(database): update default source values to 'surfsense' for chat threads and messages
2026-05-28 13:11:05 +05:30
Anish Sarkar
c958fe5bc6
feat(gateway): introduce GATEWAY_TELEGRAM_INTAKE_MODE for Telegram integration
2026-05-28 05:02:07 +05:30
Anish Sarkar
afcadfb4bf
fix(gateway): preserve request context during inbox processing
2026-05-28 04:38:20 +05:30
Anish Sarkar
08bf3cc023
refactor(gateway): run inbox and BYO polling from FastAPI lifespan
2026-05-28 04:38:00 +05:30
Anish Sarkar
a57b741d5e
refactor(gateway): rename persistence models to external chat
2026-05-28 04:37:27 +05:30
Anish Sarkar
f2d82234d4
fix(gateway): ensure proper closure of event streams in agent invocation
2026-05-28 00:25:12 +05:30
Anish Sarkar
708e3a9120
feat(gateway): enhance logging and event handling in agent and Telegram translator
2026-05-28 00:07:37 +05:30
Anish Sarkar
bd86a72587
feat(gateway): add long-lived gateway runner
2026-05-27 23:39:05 +05:30
Anish Sarkar
b8538655bb
feat(gateway): process inbound events through the agent
2026-05-27 23:38:52 +05:30
Anish Sarkar
967ec099c8
feat(gateway): add Telegram command and stream handling
2026-05-27 23:38:25 +05:30
Anish Sarkar
59e6475348
feat(gateway): add Telegram adapter and formatting
2026-05-27 23:38:09 +05:30
Anish Sarkar
c9b7d7b572
feat(gateway): add gateway domain primitives
2026-05-27 23:37:54 +05:30