fix(scheduled-task): forward worker env to sandbox MCP
Memind CI / Test, build, and release guards (push) Successful in 6m3s

goosed stdio MCPs do not inherit Portal env, so scheduled_task_create
always reported worker disabled even when H5_REMINDER_WORKER_ENABLED=1.
Forward worker flags in sandboxMcpEnvs and add a regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-10 20:49:36 +08:00
parent 62fbea0936
commit 753c1eec23
2 changed files with 33 additions and 0 deletions
+8
View File
@@ -606,6 +606,14 @@ function sandboxMcpEnvs(sandboxMcp, mcpTools) {
envs[key] = String(value).trim();
}
}
// goosed stdio MCPs do not inherit Portal env; forward worker flags so
// scheduled_task_create can report the same enablement as server.mjs.
for (const key of ['H5_REMINDER_WORKER_ENABLED', 'H5_SCHEDULED_TASK_WORKER_ENABLED']) {
const value = process.env[key];
if (value != null && String(value).trim() !== '') {
envs[key] = String(value).trim();
}
}
if (mcpTools.includes('generate_image')) {
if (sandboxMcp.agentApiBaseUrl) {
envs.MINDSPACE_AGENT_API_BASE_URL = sandboxMcp.agentApiBaseUrl;