SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
sre path fix
Ahmed Essamabdc4f1e1fb2
diff --git a/packages/runtime/src/core/config.ts b/packages/runtime/src/core/config.tsindex bc8ad0a4..2c1ee249 100644--- a/packages/runtime/src/core/config.ts+++ b/packages/runtime/src/core/config.ts@@ -19,6 +19,8 @@ const getLocalStoragePath = () => {return path.join(homeDir, 'smythos-data');};+const LOCAL_STORAGE_PATH = getLocalStoragePath();+const config = {env: {PORT: parseInt(process.env.RUNTIME_PORT || '5053', 10),@@ -46,7 +48,8 @@ const config = {UI_SERVER: process.env.APP_URL || `http://localhost:${process.env.APP_PORT}` || 'http://localhost:5053',SESSION_SECRET: process.env.SESSION_SECRET,- LOCAL_STORAGE_PATH: getLocalStoragePath(),+ LOCAL_STORAGE_PATH,+ SRE_STORAGE_PATH: path.join(LOCAL_STORAGE_PATH, '.smyth'),SMYTHOS_SERVER_TYPE: process.env.SMYTHOS_SERVER_TYPE || 'combined',},diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.tsindex 015b9dd2..44d30baa 100644--- a/packages/runtime/src/index.ts+++ b/packages/runtime/src/index.ts@@ -33,7 +33,15 @@ import { routes as embodimentRoutes } from '@embodiment/routes';const app = express();const port = config.env.PORT;-const ensureVaultFileExists = () => {+const prepareSREConfigFiles = () => {+ // setup base dir for SRE+ const srePath = config.env.SRE_STORAGE_PATH;+ if (!fs.existsSync(srePath)) {+ fs.mkdirSync(srePath, { recursive: true });+ }++ // setup base vault content+const baseVaultContent = {development: {echo: '',@@ -49,7 +57,7 @@ const ensureVaultFileExists = () => {},};- const vaultFilePath = path.join(config.env.LOCAL_STORAGE_PATH, '.sre', 'vault.json');+ const vaultFilePath = path.join(config.env.SRE_STORAGE_PATH, '.sre', 'vault.json');const dir = path.dirname(vaultFilePath);fs.mkdirSync(dir, { recursive: true });@@ -58,11 +66,11 @@ const ensureVaultFileExists = () => {}};-ensureVaultFileExists();+prepareSREConfigFiles();// Register all connectorsregisterConnectors();-process.env.SMYTH_PATH = config.env.LOCAL_STORAGE_PATH; // needed for SRE initialization+process.env.SMYTH_PATH = config.env.SRE_STORAGE_PATH; // needed for SRE initializationconst sre = SmythRuntime.Instance.init({Cache: {Connector: 'RAM',