fix(agent-run): resolve MCP paths correctly from bundled worker
Memind CI / Test, build, and release guards (push) Successful in 4m10s

Agent-run-worker bundles under scripts/, so fallback MCP resolution pointed
at scripts/tkmind-excel-mcp.mjs and broke Goose session startup on H5 image
tasks. Pin MEMIND_PORTAL_H5_ROOT to the repo root and honor TKMIND_EXCEL_MCP_SERVER_PATH.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-31 19:32:39 +08:00
parent 334b78a7df
commit 61eebb44ec
3 changed files with 56 additions and 1 deletions
+5
View File
@@ -95,6 +95,11 @@ function printHelp() {
loadEnvFile(process.env.MEMIND_ENV_FILE || path.join(root, '.env'));
loadEnvFile(path.join(root, '.env.local'));
// Bundled worker lives under scripts/; MCP path resolution must not use that
// directory as the portal runtime root (see resolveBundledMcpServerPath).
if (!String(process.env.MEMIND_PORTAL_H5_ROOT ?? '').trim()) {
process.env.MEMIND_PORTAL_H5_ROOT = root;
}
const args = parseArgs(process.argv.slice(2));
if (args.help) {