mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:41:25 +00:00
feat(hooks): run boot.md on gateway startup
This commit is contained in:
@@ -8,7 +8,11 @@ import {
|
||||
import type { CliDeps } from "../cli/deps.js";
|
||||
import type { loadConfig } from "../config/config.js";
|
||||
import { startGmailWatcher } from "../hooks/gmail-watcher.js";
|
||||
import { clearInternalHooks } from "../hooks/internal-hooks.js";
|
||||
import {
|
||||
clearInternalHooks,
|
||||
createInternalHookEvent,
|
||||
triggerInternalHook,
|
||||
} from "../hooks/internal-hooks.js";
|
||||
import { loadInternalHooks } from "../hooks/loader.js";
|
||||
import type { loadClawdbotPlugins } from "../plugins/loader.js";
|
||||
import { type PluginServicesHandle, startPluginServices } from "../plugins/services.js";
|
||||
@@ -122,6 +126,17 @@ export async function startGatewaySidecars(params: {
|
||||
);
|
||||
}
|
||||
|
||||
if (params.cfg.hooks?.internal?.enabled) {
|
||||
setTimeout(() => {
|
||||
const hookEvent = createInternalHookEvent("gateway", "startup", "gateway:startup", {
|
||||
cfg: params.cfg,
|
||||
deps: params.deps,
|
||||
workspaceDir: params.defaultWorkspaceDir,
|
||||
});
|
||||
void triggerInternalHook(hookEvent);
|
||||
}, 250);
|
||||
}
|
||||
|
||||
let pluginServices: PluginServicesHandle | null = null;
|
||||
try {
|
||||
pluginServices = await startPluginServices({
|
||||
|
||||
Reference in New Issue
Block a user