ofiere-openclaw-plugin 4.56.8 → 4.56.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/tools.js CHANGED
@@ -1038,12 +1038,15 @@ async function handleUpdateTask(supabase, userId, params) {
1038
1038
  updates.subagent_id = subCheck.subagentId;
1039
1039
  }
1040
1040
  }
1041
- // If task is being marked DONE or FAILED, auto-complete any linked scheduler events
1041
+ // If task is being marked DONE or FAILED, auto-complete any linked scheduler events.
1042
+ // A-4 plugin parity (2026-05-18) — scope by user_id so cross-tenant task_id
1043
+ // can't trigger foreign scheduler flip via plugin tool path.
1042
1044
  if (params.status === "DONE" || params.status === "FAILED") {
1043
1045
  try {
1044
1046
  await supabase
1045
1047
  .from("scheduler_events")
1046
1048
  .update({ status: "completed", next_run_at: null, updated_at: new Date().toISOString() })
1049
+ .eq("user_id", userId)
1047
1050
  .eq("task_id", params.task_id);
1048
1051
  }
1049
1052
  catch (_schedErr) {
@@ -2313,7 +2316,9 @@ function registerWorkflowOps(api, supabase, userId) {
2313
2316
  const wfId = (params.id || params.workflow_id);
2314
2317
  if (!wfId)
2315
2318
  return err("Missing required: id");
2316
- await supabase.from("workflow_runs").delete().eq("workflow_id", wfId);
2319
+ // A-4 plugin parity (2026-05-18) — scope cascade so cross-tenant
2320
+ // workflow_id can't trigger foreign workflow_runs wipe via plugin.
2321
+ await supabase.from("workflow_runs").delete().eq("user_id", userId).eq("workflow_id", wfId);
2317
2322
  const { error } = await supabase.from("workflows").delete().eq("id", wfId).eq("user_id", userId);
2318
2323
  if (error)
2319
2324
  return err(error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofiere-openclaw-plugin",
3
- "version": "4.56.8",
3
+ "version": "4.56.9",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Ofiere PM - 18 meta-tools covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, prompts, constellation, space file management, execution plan builder, SOP management, agent brain, talent management, corporate frameworks, agent office canvas, and PM gate approvals",
6
6
  "keywords": [
package/src/tools.ts CHANGED
@@ -1147,12 +1147,15 @@ async function handleUpdateTask(
1147
1147
  }
1148
1148
  }
1149
1149
 
1150
- // If task is being marked DONE or FAILED, auto-complete any linked scheduler events
1150
+ // If task is being marked DONE or FAILED, auto-complete any linked scheduler events.
1151
+ // A-4 plugin parity (2026-05-18) — scope by user_id so cross-tenant task_id
1152
+ // can't trigger foreign scheduler flip via plugin tool path.
1151
1153
  if (params.status === "DONE" || params.status === "FAILED") {
1152
1154
  try {
1153
1155
  await supabase
1154
1156
  .from("scheduler_events")
1155
1157
  .update({ status: "completed", next_run_at: null, updated_at: new Date().toISOString() })
1158
+ .eq("user_id", userId)
1156
1159
  .eq("task_id", params.task_id as string);
1157
1160
  } catch (_schedErr) {
1158
1161
  // Non-fatal: task update should still proceed
@@ -2464,7 +2467,9 @@ function registerWorkflowOps(
2464
2467
  case "delete": {
2465
2468
  const wfId = (params.id || params.workflow_id) as string;
2466
2469
  if (!wfId) return err("Missing required: id");
2467
- await supabase.from("workflow_runs").delete().eq("workflow_id", wfId);
2470
+ // A-4 plugin parity (2026-05-18) — scope cascade so cross-tenant
2471
+ // workflow_id can't trigger foreign workflow_runs wipe via plugin.
2472
+ await supabase.from("workflow_runs").delete().eq("user_id", userId).eq("workflow_id", wfId);
2468
2473
  const { error } = await supabase.from("workflows").delete().eq("id", wfId).eq("user_id", userId);
2469
2474
  if (error) return err(error.message);
2470
2475
  return ok({ message: "Workflow and associated runs deleted", ok: true });