Independent web app at chat.twendeesoft.com with shared‑cookie SSO from work.twendeesoft.com. SSE streaming, scope confirmation, ERP audit binding, and a Telegram bridge — all reusing the agent runtime that powers your ERP today.
From parent-cookie SSO at .twendeesoft.com through scope confirmation to ERP audit binding — every step preserves the same erp_user_id and tenant scope.
A parent-domain cookie scoped to .twendeesoft.com covers both work.twendeesoft.com and chat.twendeesoft.com. Chat never renders a login form — only a transient splash while the cookie is verified.
BroadcastChannel('twd-auth') drops every open tab.Reading parent-domain cookie from .twendeesoft.com
Every session is keyed by erp_user_id × tenant_id, persisted server-side, and replayable from audit. Switch in the sidebar — context (pinned entities, transcript, tool history) hydrates from the same store.
Every tool call writes to pipeline_events with the operator's ERP user, tenant, correlation id, and tool name. Replay any session deterministically.
| Time | Tool | Operator | Entity | Status | Latency |
|---|---|---|---|---|---|
| 12:34:18 | deals.list | Linh Mai · 2041 | — | ok | 312ms |
| 12:35:02 | deals.transition | Linh Mai · 2041 | D-1192 | approved | 847ms |
| 12:35:09 | invoices.draft | Linh Mai · 2041 | acc_88421 | ok | 528ms |
| 12:36:41 | stock.check | Tu Anh · 2089 | wh-hn-01 | retry | 1.2s |
| 12:38:14 | delivery.eta | Linh Mai · 2041 | SO-4521 | ok | 204ms |
| 12:40:55 | auth.refresh | Linh Mai · 2041 | — | silent | 142ms |
Identity, role, and tenant come from the ERP. Chat owns only display preferences and Telegram pairing. One link out to the full settings surface.
Operators on the road approve, query, and acknowledge in Telegram. Same agent runtime, same audit, same erp_user_id — pairing one-off via deep link from chat.twendeesoft.com.
Composer disabled with shimmer. Background /auth/refresh retries; chat resumes on success.
Inline error card with retry. Audit row marked failed; correlation id surfaced.
Pinned entity from different tenant rejected before tool call. User offered to switch context explicitly.
Same agent, half the chrome. Sessions sheet, sticky composer with quick-actions, single tap to Open in ERP.