feat: add tool gateway protocol

This commit is contained in:
John
2026-07-02 09:23:55 +08:00
parent e24e6ca4a7
commit 21e03d86b5
8 changed files with 388 additions and 1 deletions
+4
View File
@@ -14,6 +14,7 @@ import {
} from './auth.mjs';
import { createDbPool, initSchema, isDatabaseConfigured } from './db.mjs';
import { createAgentRunGateway } from './agent-run-gateway.mjs';
import { createToolGateway } from './tool-gateway.mjs';
import {
createAgentRunEventsHandler,
createGetAgentRunHandler,
@@ -234,6 +235,7 @@ if (ACCESS_PASSWORD && !isDatabaseConfigured()) {
let userAuth = null;
let tkmindProxy = null;
let agentRunGateway = null;
let toolGateway = null;
let sessionSnapshotService = null;
let conversationMemoryService = null;
let mindSpace = null;
@@ -568,10 +570,12 @@ async function bootstrapUserAuth() {
}
: null,
});
toolGateway = createToolGateway({ llmProviderService });
agentRunGateway = createAgentRunGateway({
pool,
userAuth,
tkmindProxy,
toolGateway,
autoDispatch: ['1', 'true', 'yes', 'on'].includes(
String(process.env.MEMIND_AGENT_RUN_AUTODISPATCH ?? '1').trim().toLowerCase(),
),