ofiere-openclaw-plugin 4.19.0 → 4.19.2

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 +6 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofiere-openclaw-plugin",
3
- "version": "4.19.0",
3
+ "version": "4.19.2",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Ofiere PM - 13 meta-tools covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, prompts, constellation, space file management, execution plan builder, and SOP management",
6
6
  "keywords": ["openclaw", "ofiere", "project-management", "agents", "plugin"],
package/src/tools.ts CHANGED
@@ -4555,7 +4555,7 @@ function registerSOPOps(
4555
4555
  type: "object",
4556
4556
  required: ["action"],
4557
4557
  properties: {
4558
- action: { type: "string", enum: ["list_templates", "create", "list", "get", "update", "delete", "list_subagents", "apply_template"] },
4558
+ action: { type: "string", enum: ["list_templates", "create", "list", "get", "update", "delete", "list_subagents", "apply_template"], description: "Valid actions: list_templates, create, list, get, update, delete, list_subagents, apply_template" },
4559
4559
  sop_id: { type: "string", description: "SOP ID (required for get, update, delete)" },
4560
4560
  agent_id: { type: "string", description: "Agent ID (required for create, list filter, apply_template)" },
4561
4561
  chief_agent_id: { type: "string", description: "Chief agent ID (required for list_subagents)" },
@@ -4715,16 +4715,16 @@ async function handleSOPGet(supabase: SupabaseClient, userId: string, params: Re
4715
4715
  .from("agent_sops")
4716
4716
  .select("*")
4717
4717
  .eq("id", params.sop_id as string)
4718
- .eq("user_id", userId)
4719
- .single();
4718
+ .eq("user_id", userId);
4720
4719
  if (error) return err(error.message);
4721
- if (!data) return err("SOP not found");
4720
+ if (!data || data.length === 0) return err("SOP not found");
4722
4721
 
4722
+ const sop = data[0];
4723
4723
  // Parse the content to return structured data
4724
4724
  let parsedContent: any = {};
4725
- try { parsedContent = JSON.parse(data.content || "{}"); } catch { /* leave empty */ }
4725
+ try { parsedContent = JSON.parse(sop.content || "{}"); } catch { /* leave empty */ }
4726
4726
 
4727
- return ok({ sop: { ...data, content: parsedContent } });
4727
+ return ok({ sop: { ...sop, content: parsedContent } });
4728
4728
  } catch (e) { return err(e instanceof Error ? e.message : String(e)); }
4729
4729
  }
4730
4730