diff --git a/agent-orchestrator.yaml b/agent-orchestrator.yaml index 5dbaebc83..cc50a55cd 100644 --- a/agent-orchestrator.yaml +++ b/agent-orchestrator.yaml @@ -1,16 +1,24 @@ -# Agent Orchestrator — self-hosting config (dog-fooding) - dataDir: ~/.ao-sessions -worktreeDir: ~/.worktrees/ao +worktreeDir: ~/.worktrees port: 3000 - defaults: runtime: tmux agent: claude-code workspace: worktree - notifiers: [desktop] - + notifiers: + - desktop + - openclaw projects: + integrator: + name: Integrator + repo: ComposioHQ/integrator + path: ~/integrator + defaultBranch: next + sessionPrefix: int + scm: + plugin: github + agentConfig: + permissions: skip ao: name: Agent Orchestrator repo: ComposioHQ/agent-orchestrator @@ -19,11 +27,11 @@ projects: sessionPrefix: ao scm: plugin: github - tracker: - plugin: linear - teamId: "2a6e9b1b-19cd-4e30-b5bd-7b34dc491c7e" - symlinks: [.claude] - postCreate: - - "pnpm install" agentConfig: permissions: skip +notifiers: + openclaw: + host: 100.94.117.76 + port: 18789 + token: 1af5c4fb9e07dc5e69a20de02bbea653f17c110089b68872 + plugin: openclaw diff --git a/packages/web/package.json b/packages/web/package.json index fffe337ca..edb25bd81 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -27,7 +27,9 @@ "@composio/ao-plugin-workspace-worktree": "workspace:*", "next": "^15.1.0", "react": "^19.0.0", - "react-dom": "^19.0.0" + "react-dom": "^19.0.0", + "@composio/ao-plugin-notifier-desktop": "workspace:*", + "@composio/ao-plugin-notifier-openclaw": "workspace:*" }, "devDependencies": { "@tailwindcss/postcss": "^4.0.0", @@ -44,4 +46,4 @@ "typescript": "^5.7.0", "vitest": "^2.1.0" } -} +} \ No newline at end of file diff --git a/packages/web/src/lib/services.ts b/packages/web/src/lib/services.ts index 772798551..1486a3e36 100644 --- a/packages/web/src/lib/services.ts +++ b/packages/web/src/lib/services.ts @@ -14,14 +14,20 @@ import { loadConfig, createPluginRegistry, createSessionManager, + createLifecycleManager, type OrchestratorConfig, type PluginRegistry, type SessionManager, + type LifecycleManager, type SCM, type Tracker, type ProjectConfig, } from "@composio/ao-core"; +// Notifier plugins +import pluginNotifierDesktop from "@composio/ao-plugin-notifier-desktop"; +import pluginNotifierOpenclaw from "@composio/ao-plugin-notifier-openclaw"; + // Static plugin imports — webpack needs these to be string literals import pluginRuntimeTmux from "@composio/ao-plugin-runtime-tmux"; import pluginAgentClaudeCode from "@composio/ao-plugin-agent-claude-code"; @@ -34,6 +40,7 @@ export interface Services { config: OrchestratorConfig; registry: PluginRegistry; sessionManager: SessionManager; + lifecycleManager: LifecycleManager; } // Cache in globalThis for Next.js HMR stability @@ -70,9 +77,25 @@ async function initServices(): Promise { registry.register(pluginTrackerGithub); registry.register(pluginTrackerLinear); + // Register notifier plugins (pass config from notifiers record) + registry.register(pluginNotifierDesktop, config.notifiers?.["desktop"] as Record | undefined); + registry.register(pluginNotifierOpenclaw, config.notifiers?.["openclaw"] as Record | undefined); + const sessionManager = createSessionManager({ config, registry }); - const services = { config, registry, sessionManager }; + // Create and start lifecycle manager (polling loop + notifiers) + const lifecycleManager = createLifecycleManager({ config, registry, sessionManager }); + lifecycleManager.start(15_000); // Poll every 15 seconds + + // Graceful shutdown + const shutdown = () => { + lifecycleManager.stop(); + process.exit(0); + }; + process.on("SIGINT", shutdown); + process.on("SIGTERM", shutdown); + + const services = { config, registry, sessionManager, lifecycleManager }; globalForServices._aoServices = services; return services; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9840ff00..3c128cc12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -458,6 +458,12 @@ importers: '@composio/ao-plugin-agent-claude-code': specifier: workspace:* version: link:../plugins/agent-claude-code + '@composio/ao-plugin-notifier-desktop': + specifier: workspace:* + version: link:../plugins/notifier-desktop + '@composio/ao-plugin-notifier-openclaw': + specifier: workspace:* + version: link:../plugins/notifier-openclaw '@composio/ao-plugin-runtime-tmux': specifier: workspace:* version: link:../plugins/runtime-tmux