feat(gateway): integrate OpenClaw as git submodule
- Add OpenClaw as git submodule at ./openclaw/ - Update GatewayManager to start gateway from submodule path - Support both production (dist) and development (pnpm dev) modes - Add IPC handler for OpenClaw status check - Update Setup wizard to check real OpenClaw submodule status - Configure electron-builder to include submodule in packaged app - Add npm scripts for submodule management: - postinstall: auto-init submodule - openclaw:init: initialize and install dependencies - openclaw:install: install dependencies only - openclaw:build: build OpenClaw - openclaw:update: update to latest version
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
isEncryptionAvailable,
|
||||
type ProviderConfig,
|
||||
} from '../utils/secure-storage';
|
||||
import { getOpenClawStatus } from '../utils/paths';
|
||||
|
||||
/**
|
||||
* Register all IPC handlers
|
||||
@@ -30,6 +31,9 @@ export function registerIpcHandlers(
|
||||
// Gateway handlers
|
||||
registerGatewayHandlers(gatewayManager, mainWindow);
|
||||
|
||||
// OpenClaw handlers
|
||||
registerOpenClawHandlers();
|
||||
|
||||
// Provider handlers
|
||||
registerProviderHandlers();
|
||||
|
||||
@@ -154,6 +158,23 @@ function registerGatewayHandlers(
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* OpenClaw-related IPC handlers
|
||||
* For checking submodule status
|
||||
*/
|
||||
function registerOpenClawHandlers(): void {
|
||||
// Get OpenClaw submodule status
|
||||
ipcMain.handle('openclaw:status', () => {
|
||||
return getOpenClawStatus();
|
||||
});
|
||||
|
||||
// Check if OpenClaw is ready (submodule present and dependencies installed)
|
||||
ipcMain.handle('openclaw:isReady', () => {
|
||||
const status = getOpenClawStatus();
|
||||
return status.submoduleExists && status.isInstalled;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider-related IPC handlers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user