mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 04:40:57 +00:00
feat(tenancy): implement workspace isolation
This commit is contained in:
@@ -2,6 +2,12 @@ api:
|
||||
port: 5300
|
||||
webhook_prefix: 'http://127.0.0.1:5300'
|
||||
extra_webhook_prefix: ''
|
||||
# Canonical browser origin when WebUI and API use different origins in
|
||||
# development (for example http://localhost:3000). Production bundled UI
|
||||
# may leave this empty when webhook_prefix already has the browser origin.
|
||||
# OAuth redirects trust only these server-side values, never request Host
|
||||
# or Origin headers.
|
||||
webui_url: ''
|
||||
# Global API key for the HTTP service API and the MCP server. When set to a
|
||||
# non-empty string, this key is accepted anywhere a web-UI-created API key is
|
||||
# accepted (X-API-Key header or "Authorization: Bearer <key>"), WITHOUT any
|
||||
@@ -142,6 +148,8 @@ box:
|
||||
enabled: true
|
||||
backend: 'local' # 'local' (Docker/nsjail), 'docker', 'nsjail', or 'e2b'. Can be written via BOX__BACKEND.
|
||||
runtime:
|
||||
# External WebSocket runtimes also require LANGBOT_BOX_CONTROL_TOKEN in
|
||||
# both LangBot and Box. Keep the shared secret out of this config file.
|
||||
endpoint: '' # External Box Runtime base URL, e.g. 'ws://127.0.0.1:5410'. Leave empty for local auto-managed runtime.
|
||||
limits:
|
||||
max_sessions: 64 # Includes persistent sessions. New sessions fail explicitly when this cap is reached.
|
||||
|
||||
@@ -356,6 +356,7 @@
|
||||
isConnected: false,
|
||||
ws: null,
|
||||
connectionId: null,
|
||||
sessionToken: null,
|
||||
sessionId: getOrCreateSessionId(),
|
||||
reconnectAttempts: 0,
|
||||
heartbeatTimer: null,
|
||||
@@ -538,7 +539,12 @@
|
||||
|
||||
state.ws.onopen = function () {
|
||||
state.reconnectAttempts = 0;
|
||||
startHeartbeat();
|
||||
state.ws.send(
|
||||
JSON.stringify({
|
||||
type: "authenticate",
|
||||
token: state.sessionToken || "",
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
state.ws.onmessage = function (event) {
|
||||
@@ -576,6 +582,7 @@
|
||||
state.connectionId = data.connection_id;
|
||||
if (state.hasConnected) loadHistory(true);
|
||||
state.hasConnected = true;
|
||||
startHeartbeat();
|
||||
updateStatusDot();
|
||||
updateSendBtn();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user