ofiere-openclaw-plugin 4.19.1 → 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.
- package/package.json +1 -1
- package/src/tools.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ofiere-openclaw-plugin",
|
|
3
|
-
"version": "4.19.
|
|
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
|
@@ -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
|
-
.maybeSingle();
|
|
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(
|
|
4725
|
+
try { parsedContent = JSON.parse(sop.content || "{}"); } catch { /* leave empty */ }
|
|
4726
4726
|
|
|
4727
|
-
return ok({ sop: { ...
|
|
4727
|
+
return ok({ sop: { ...sop, content: parsedContent } });
|
|
4728
4728
|
} catch (e) { return err(e instanceof Error ? e.message : String(e)); }
|
|
4729
4729
|
}
|
|
4730
4730
|
|