fix(scheduled-task): forward worker env to sandbox MCP
Memind CI / Test, build, and release guards (push) Successful in 6m3s
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user