ofiere-openclaw-plugin 3.4.0 → 3.4.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofiere-openclaw-plugin",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Ofiere PM — 9 meta-tools covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, and prompts",
6
6
  "keywords": ["openclaw", "ofiere", "project-management", "agents", "plugin"],
package/src/tools.ts CHANGED
@@ -547,6 +547,18 @@ async function handleUpdateTask(
547
547
  }
548
548
  if (params.status === "DONE") updates.completed_at = new Date().toISOString();
549
549
 
550
+ // If task is being marked DONE or FAILED, auto-complete any linked scheduler events
551
+ if (params.status === "DONE" || params.status === "FAILED") {
552
+ try {
553
+ await supabase
554
+ .from("scheduler_events")
555
+ .update({ status: "completed", next_run_at: null, updated_at: new Date().toISOString() })
556
+ .eq("task_id", params.task_id as string);
557
+ } catch (_schedErr) {
558
+ // Non-fatal: task update should still proceed
559
+ }
560
+ }
561
+
550
562
  // Handle custom_fields updates (execution_plan, goals, constraints, system_prompt, instructions)
551
563
  const hasCustomFields = params.execution_plan !== undefined ||
552
564
  params.goals !== undefined ||