fix(agent-run): resolve MCP paths correctly from bundled worker
Memind CI / Test, build, and release guards (push) Successful in 4m10s
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:
+10
-1
@@ -183,6 +183,15 @@ export function resolveExcelMcpServerPath(overridePath, runtimeRoot) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Prefer explicit env overrides; TKMIND_* matches search MCP naming on 103/.env. */
|
||||
export function resolveExcelMcpOverridePath(env = process.env) {
|
||||
return String(
|
||||
env.GOOSED_EXCEL_MCP_SERVER_PATH
|
||||
?? env.TKMIND_EXCEL_MCP_SERVER_PATH
|
||||
?? '',
|
||||
).trim();
|
||||
}
|
||||
|
||||
function isGoosedMcpContainerized(sandboxMcp = null) {
|
||||
const containerFlag = String(process.env.GOOSED_MCP_CONTAINERIZED ?? '').trim();
|
||||
if (containerFlag) return containerFlag === '1';
|
||||
@@ -852,7 +861,7 @@ export function buildAgentExtensionPolicy(
|
||||
cmd: resolveSandboxMcpNodeExecPath(sandboxMcp?.nodeExecPath),
|
||||
args: [
|
||||
resolveExcelMcpServerPath(
|
||||
process.env.GOOSED_EXCEL_MCP_SERVER_PATH,
|
||||
resolveExcelMcpOverridePath(),
|
||||
bundledMcpRuntimeRoot,
|
||||
),
|
||||
excelWorkspaceRoot,
|
||||
|
||||
Reference in New Issue
Block a user