feat: integrate Memento MCP for shared memory across agents

- Add MEMENTO_MCP_SSE_URL/ACCESS_KEY/REMOTE_PATH to readEnvFile
- Merge .env vars into cleanEnv for runner process inheritance
- Claude Code runner: add memento-mcp via mcp-remote in mcpServers
- Codex runner: inject memento-mcp section into config.toml
- Various improvements: CI watch, task scheduler, DB, IPC auth
This commit is contained in:
Eyejoker
2026-03-20 00:12:43 +09:00
parent e7200a1ed8
commit 41afcb91cf
17 changed files with 572 additions and 59 deletions

View File

@@ -218,6 +218,7 @@ async function main(): Promise<void> {
// Start subsystems (independently of connection handler)
startSchedulerLoop({
serviceAgentType: SERVICE_AGENT_TYPE,
registeredGroups: () => registeredGroups,
getSessions: () => sessions,
queue,
@@ -232,6 +233,28 @@ async function main(): Promise<void> {
const text = formatOutbound(rawText);
if (text) await channel.sendMessage(jid, text);
},
sendTrackedMessage: async (jid, rawText) => {
const channel = findChannel(channels, jid);
if (!channel?.sendAndTrack) {
return null;
}
const text = formatOutbound(rawText);
if (!text) {
return null;
}
return channel.sendAndTrack(jid, text);
},
editTrackedMessage: async (jid, messageId, rawText) => {
const channel = findChannel(channels, jid);
if (!channel?.editMessage) {
throw new Error(`Channel does not support message edits: ${jid}`);
}
const text = formatOutbound(rawText);
if (!text) {
throw new Error(`Cannot edit tracked message to empty text: ${jid}`);
}
await channel.editMessage(jid, messageId, text);
},
});
startIpcWatcher({
sendMessage: (jid, text) => {