@opentrust/guards 7.3.11 → 7.3.12

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.
@@ -32,7 +32,7 @@ function executeSkillInstall(payload: Record<string, unknown> | null, log: Logge
32
32
 
33
33
  try {
34
34
  log.info(`Command: installing skill "${skillName}"...`);
35
- const output = execSync(`openclaw skills install ${skillName}`, {
35
+ const output = execSync(`clawhub install ${skillName}`, {
36
36
  encoding: "utf-8",
37
37
  timeout: 120_000,
38
38
  stdio: ["pipe", "pipe", "pipe"],
@@ -62,15 +62,13 @@ function executeCustomSkillInstall(payload: Record<string, unknown> | null, log:
62
62
 
63
63
  fs.mkdirSync(skillDir, { recursive: true });
64
64
 
65
- const ext = detectContentFormat(content);
66
- const fileName = `skill.${ext}`;
65
+ const fileName = "SKILL.md";
67
66
  fs.writeFileSync(path.join(skillDir, fileName), content, "utf-8");
68
67
 
69
68
  log.info(`Command: custom skill "${skillName}" written to ${skillDir}/${fileName}`);
70
69
 
71
- // Try `openclaw skills install` from local path; fall back to file-only approach
72
70
  try {
73
- const output = execSync(`openclaw skills install ${skillDir}`, {
71
+ const output = execSync(`clawhub install ${skillDir}`, {
74
72
  encoding: "utf-8",
75
73
  timeout: 120_000,
76
74
  stdio: ["pipe", "pipe", "pipe"],
@@ -86,20 +84,13 @@ function executeCustomSkillInstall(payload: Record<string, unknown> | null, log:
86
84
  }
87
85
  }
88
86
 
89
- function detectContentFormat(content: string): string {
90
- const trimmed = content.trim();
91
- if (trimmed.startsWith("{") || trimmed.startsWith("[")) return "json";
92
- if (trimmed.startsWith("---") || /^\w+:/m.test(trimmed)) return "yaml";
93
- return "md";
94
- }
95
-
96
87
  function executeSkillUninstall(payload: Record<string, unknown> | null, log: Logger): CommandResult {
97
88
  const skillName = payload?.skillName as string;
98
89
  if (!skillName) return { success: false, error: "Missing skillName in payload" };
99
90
 
100
91
  try {
101
92
  log.info(`Command: uninstalling skill "${skillName}"...`);
102
- const output = execSync(`openclaw skills uninstall ${skillName}`, {
93
+ const output = execSync(`clawhub uninstall ${skillName}`, {
103
94
  encoding: "utf-8",
104
95
  timeout: 60_000,
105
96
  stdio: ["pipe", "pipe", "pipe"],
@@ -2,7 +2,7 @@
2
2
  "id": "opentrust-guard",
3
3
  "name": "OpenTrust Guard",
4
4
  "description": "AI security guard for OpenClaw agents: prompt injection detection, credential scanning, and behavioral monitoring.",
5
- "version": "7.3.11",
5
+ "version": "7.3.12",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentrust/guards",
3
- "version": "7.3.11",
3
+ "version": "7.3.12",
4
4
  "description": "AI agent security plugin for OpenClaw: prompt injection detection, PII sanitization, and monitoring",
5
5
  "type": "module",
6
6
  "main": "index.ts",