diff --git a/automat-graph.dot b/automat-graph.dot
index ac005ca..3db6604 100644
--- a/automat-graph.dot
+++ b/automat-graph.dot
@@ -9,7 +9,7 @@ digraph automats {
label="Session & Real-Time Hub"; labeljust="l"; fontsize=15;
style="rounded,filled"; fillcolor="#202a3a"; color="#3f4c5f";
fontcolor="#e2e8f0"; margin=14;
- authAutomat [label=<
authAutomat Always-On Session & Multi-Tenant Gateway |
| STATE | hasAuth: boolean | Authenticated session bit |
|
| STATE | hasCompany: boolean | hasAuth && selectedCompanyId |
|
| STATE | user: AuthUser | Current user & company |
|
| STATE | status | 'anon' | 'authed' | 'loading' |
|
| ACTION | bootstrapSession() | Restore or fetch session |
|
| ACTION | switchCompany(id) | Multi-tenant switch |
|
| ACTION | logout() | Clear session cookie |
|
| SELECT | selectHasAuth() / selectHasCompany() | Auth & tenant gates |
|
| API | GET /api/auth/session | Cookie session check |
|
>];
+ authAutomat [label=<authAutomat Always-On Session & Multi-Tenant Gateway |
| STATE | hasAuth: boolean | Authenticated session bit |
|
| STATE | hasCompany: boolean | hasAuth && selectedCompanyId |
|
| STATE | user: AuthUser | Current user & company |
|
| STATE | schemaVersion: number|null | Backend DB schema version |
|
| STATE | status | 'anon' | 'authed' | 'loading' |
|
| ACTION | bootstrapSession() | Restore or fetch session |
|
| ACTION | switchCompany(id) | Multi-tenant switch |
|
| ACTION | logout() | Clear session cookie |
|
| SELECT | selectHasAuth() / selectHasCompany() | Auth & tenant gates |
|
| SELECT | selectSchemaVersion() | Active DB schema version |
|
| API | GET /api/auth/session | Cookie session check |
|
>];
sseAutomat [label=< | | sseAutomat Single Persistent SSE Connection |
|
| STATE | status | 'connected' | 'error' |
|
| STATE | clientId (cid) | Tab-scoped UUID in session |
|
| ACTION | reconnect() | Cycle on company switch |
|
| ACTION | on(event, handler) | Register signal listener |
|
| ACTION | watchArticle(sku) | Attach article-<sku> |
|
| SELECT | invalidateArticle(sku) | Silent cache refresh |
|
| SSE | category / articles | Catalog mutation events |
|
| SSE | order / shipment | Fulfillment events |
|
| API | GET /api/events | Persistent stream |
|
>];
}
subgraph cluster_company_basedata {
diff --git a/automat-graph.svg b/automat-graph.svg
index 1defb7e..859546b 100644
--- a/automat-graph.svg
+++ b/automat-graph.svg
@@ -11,8 +11,8 @@