ofiere-openclaw-plugin 4.4.0 → 4.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 +13 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofiere-openclaw-plugin",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Ofiere PM - 10 meta-tools with 13-action workflow mastery covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, prompts, and constellation agent architecture",
6
6
  "keywords": ["openclaw", "ofiere", "project-management", "agents", "plugin"],
package/src/tools.ts CHANGED
@@ -2483,8 +2483,10 @@ function registerConstellationOps(
2483
2483
  const name = (params.agent_name as string).toLowerCase();
2484
2484
  const wsPath = getWorkspacePath(name);
2485
2485
  if (!fs.existsSync(wsPath)) return err(`Agent workspace not found: workspace-${name}`);
2486
- const files = fs.readdirSync(wsPath).filter((f: string) => f.endsWith(".md"));
2487
- const fileDetails = files.map((f: string) => {
2486
+ const allMd = fs.readdirSync(wsPath).filter((f: string) => f.endsWith(".md"));
2487
+ const userMd = allMd.filter((f: string) => !SYSTEM_MD_FILES.has(f));
2488
+ const systemMd = allMd.filter((f: string) => SYSTEM_MD_FILES.has(f));
2489
+ const fileDetails = userMd.map((f: string) => {
2488
2490
  const stat = fs.statSync(path.join(wsPath, f));
2489
2491
  return { name: f, size_bytes: stat.size, modified: stat.mtime.toISOString() };
2490
2492
  });
@@ -2502,7 +2504,7 @@ function registerConstellationOps(
2502
2504
  if (emojiMatch) identity.emoji = emojiMatch[1].trim();
2503
2505
  } catch {}
2504
2506
  const hasSkills = fs.existsSync(path.join(wsPath, "skills"));
2505
- return ok({ agent_name: name, identity, files: fileDetails, has_skills: hasSkills, workspace_path: wsPath });
2507
+ return ok({ agent_name: name, identity, files: fileDetails, system_files: systemMd, has_skills: hasSkills, workspace_path: wsPath });
2506
2508
  }
2507
2509
 
2508
2510
  // ── Read a file ──
@@ -2711,12 +2713,12 @@ function registerConstellationOps(
2711
2713
 
2712
2714
  // Safety gate: confirm must be explicitly true
2713
2715
  if (params.confirm !== true) {
2714
- // List only user-visible files that would be deleted (exclude internal dirs)
2716
+ // List only user-visible files (exclude system md + internal dirs)
2715
2717
  let userFiles: string[] = [];
2716
2718
  try {
2717
2719
  if (fs.existsSync(wsPath)) {
2718
2720
  userFiles = fs.readdirSync(wsPath)
2719
- .filter((f: string) => f.endsWith(".md") || f === "skills");
2721
+ .filter((f: string) => (f.endsWith(".md") && !SYSTEM_MD_FILES.has(f)) || f === "skills");
2720
2722
  }
2721
2723
  } catch {}
2722
2724
  return err(
@@ -2732,10 +2734,11 @@ function registerConstellationOps(
2732
2734
  return err(`Agent workspace-${agentName} does not exist at ${wsPath}`);
2733
2735
  }
2734
2736
 
2735
- // Count files before deletion for the report
2736
- let deletedFiles: string[] = [];
2737
+ // Count user-visible files before deletion for the report
2738
+ let deletedUserFiles: string[] = [];
2737
2739
  try {
2738
- deletedFiles = fs.readdirSync(wsPath, { recursive: true }) as string[];
2740
+ deletedUserFiles = fs.readdirSync(wsPath)
2741
+ .filter((f: string) => (f.endsWith(".md") && !SYSTEM_MD_FILES.has(f)) || f === "skills");
2739
2742
  } catch {}
2740
2743
 
2741
2744
  // Remove the entire workspace directory
@@ -2762,13 +2765,13 @@ function registerConstellationOps(
2762
2765
  unregResult = { success: false, message: `Unregistration may have failed: ${unregCombined.slice(0, 200)}` };
2763
2766
  }
2764
2767
 
2765
- api.logger?.info?.(`[ofiere] Deleted agent "${agentName}" — ${deletedFiles.length} files removed`);
2768
+ api.logger?.info?.(`[ofiere] Deleted agent "${agentName}" — ${deletedUserFiles.length} files removed`);
2766
2769
 
2767
2770
  return ok({
2768
2771
  message: `Agent "${agentName}" has been permanently deleted`,
2769
2772
  agent_name: agentName,
2770
2773
  workspace_deleted: wsPath,
2771
- files_removed: deletedFiles.length,
2774
+ files_removed: deletedUserFiles.length,
2772
2775
  unregistration: unregResult,
2773
2776
  });
2774
2777
  }