@soulguard/openclaw 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -42,19 +42,11 @@ Templates define which paths go to vault, ledger, or are left unprotected. Every
42
42
 
43
43
  ## Plugin
44
44
 
45
- The OpenClaw plugin integrates soulguard status into the agent's context and provides helpful guidance when vault writes fail.
46
-
47
- ### Current
45
+ The OpenClaw plugin integrates soulguard into the agent runtime:
48
46
 
47
+ - `before_tool_call` hook intercepts Write/Edit tool calls targeting vault files and redirects to staging
49
48
  - Reports soulguard status (vault/ledger health) in agent context
50
- - Detects vault write failures and suggests staging workflow
51
-
52
- ### Planned
53
-
54
- - `before_tool_call` hook to intercept vault writes and redirect to staging
55
- - Native agent tools (`soulguard.propose`, `soulguard.status`, `soulguard.diff`)
56
- - Cron job gating for vaulted cron configs
57
- - Tool access control per configuration
49
+ - Provides helpful error messages guiding the agent to the staging workflow
58
50
 
59
51
  ## Why a Plugin?
60
52
 
package/dist/index.js CHANGED
@@ -4148,7 +4148,10 @@ async function resolvePatterns(ops, patterns) {
4148
4148
  return err(result.error);
4149
4149
  }
4150
4150
  for (const match of result.value) {
4151
- files.add(match);
4151
+ const statResult = await ops.stat(match);
4152
+ if (statResult.ok && !statResult.value.isDirectory) {
4153
+ files.add(match);
4154
+ }
4152
4155
  }
4153
4156
  } else {
4154
4157
  files.add(pattern);
@@ -4201,7 +4204,8 @@ class MockSystemOps {
4201
4204
  return err({ kind: "not_found", path });
4202
4205
  return ok({
4203
4206
  path,
4204
- ownership: { user: file.owner, group: file.group, mode: file.mode }
4207
+ ownership: { user: file.owner, group: file.group, mode: file.mode },
4208
+ isDirectory: false
4205
4209
  });
4206
4210
  }
4207
4211
  async chown(path, owner) {
@@ -4461,7 +4465,8 @@ class NodeSystemOps {
4461
4465
  const [user, group] = await Promise.all([uidToName(s.uid), gidToName(s.gid)]);
4462
4466
  return ok({
4463
4467
  path,
4464
- ownership: { user, group, mode: modeToString(s.mode) }
4468
+ ownership: { user, group, mode: modeToString(s.mode) },
4469
+ isDirectory: s.isDirectory()
4465
4470
  });
4466
4471
  } catch (e) {
4467
4472
  return err(mapError(e, path, "stat"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulguard/openclaw",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "typecheck": "tsc --noEmit"
11
11
  },
12
12
  "dependencies": {
13
- "@soulguard/core": "^0.1.2"
13
+ "@soulguard/core": "^0.1.3"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/bun": "latest",