@askexenow/exe-os 0.9.125 → 0.9.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19161,6 +19161,20 @@ async function startMcpHttpServer() {
19161
19161
  transport = transports.get(sessionId);
19162
19162
  sessionLastSeen.set(sessionId, Date.now());
19163
19163
  } else if (!sessionId && req.method === "POST" && isInitializeRequest(parsedBody)) {
19164
+ try {
19165
+ const { initDatabase: initDatabase2, isInitialized: isInitialized2 } = await Promise.resolve().then(() => (init_database(), database_exports));
19166
+ if (!isInitialized2()) {
19167
+ const { loadConfig: loadConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
19168
+ const { getMasterKey: getMasterKey2 } = await Promise.resolve().then(() => (init_keychain(), keychain_exports));
19169
+ const config = await loadConfig2();
19170
+ const masterKey = await getMasterKey2();
19171
+ if (masterKey) {
19172
+ await initDatabase2({ dbPath: config.dbPath, encryptionKey: masterKey.toString("hex") });
19173
+ process.stderr.write("[exed] DB initialized on first MCP session\n");
19174
+ }
19175
+ }
19176
+ } catch {
19177
+ }
19164
19178
  transport = new StreamableHTTPServerTransport({
19165
19179
  sessionIdGenerator: () => randomUUID5(),
19166
19180
  onsessioninitialized: (sid) => {
@@ -19193,6 +19207,22 @@ async function startMcpHttpServer() {
19193
19207
  `[exed] MCP session ${sessionId.slice(0, 8)}\u2026 stale \u2014 auto-recovering with new session
19194
19208
  `
19195
19209
  );
19210
+ try {
19211
+ const { initDatabase: initDatabase2, isInitialized: isInitialized2 } = await Promise.resolve().then(() => (init_database(), database_exports));
19212
+ if (!isInitialized2()) {
19213
+ const { loadConfig: loadConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
19214
+ const { getMasterKey: getMasterKey2 } = await Promise.resolve().then(() => (init_keychain(), keychain_exports));
19215
+ const config = await loadConfig2();
19216
+ const masterKey = await getMasterKey2();
19217
+ if (masterKey) {
19218
+ await initDatabase2({ dbPath: config.dbPath, encryptionKey: masterKey.toString("hex") });
19219
+ process.stderr.write("[exed] DB initialized during session recovery\n");
19220
+ }
19221
+ }
19222
+ } catch (dbErr) {
19223
+ process.stderr.write(`[exed] DB init during recovery failed: ${dbErr instanceof Error ? dbErr.message : String(dbErr)}
19224
+ `);
19225
+ }
19196
19226
  transport = new StreamableHTTPServerTransport({
19197
19227
  sessionIdGenerator: () => randomUUID5(),
19198
19228
  onsessioninitialized: (sid) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.125",
3
+ "version": "0.9.127",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",