@guava-parity/guard-scanner 16.0.1 → 16.0.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.
@@ -1,12 +1,12 @@
1
1
  {
2
- "package_version": "16.0.1",
3
- "plugin_version": "16.0.1",
4
- "static_pattern_count": 358,
2
+ "package_version": "16.0.2",
3
+ "plugin_version": "16.0.2",
4
+ "static_pattern_count": 364,
5
5
  "threat_category_count": 35,
6
6
  "runtime_check_count": 27,
7
- "test_file_count": 28,
7
+ "test_file_count": 38,
8
8
  "dependencies_runtime": 1,
9
- "dependencies_dev": 5,
9
+ "dependencies_dev": 7,
10
10
  "mcp_tools": [
11
11
  "scan_skill",
12
12
  "scan_text",
@@ -40,7 +40,7 @@
40
40
  "github",
41
41
  "npm"
42
42
  ],
43
- "benchmark_corpus_version": "2026-03-13.quality-v1",
43
+ "benchmark_corpus_version": "2026-03-15.quality-v17",
44
44
  "benchmark_layers": [
45
45
  {
46
46
  "id": "layer_a",
@@ -68,6 +68,24 @@
68
68
  "recall": 1,
69
69
  "false_positive_rate": 0,
70
70
  "false_negative_rate": 0
71
+ },
72
+ {
73
+ "id": "layer_protocol",
74
+ "benign": 4,
75
+ "malicious": 4,
76
+ "precision": 1,
77
+ "recall": 1,
78
+ "false_positive_rate": 0,
79
+ "false_negative_rate": 0
80
+ },
81
+ {
82
+ "id": "layer_capability",
83
+ "benign": 4,
84
+ "malicious": 4,
85
+ "precision": 1,
86
+ "recall": 1,
87
+ "false_positive_rate": 0,
88
+ "false_negative_rate": 0
71
89
  }
72
90
  ],
73
91
  "analysis_layers": [
package/guard-scanner CHANGED
@@ -1,4 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
-
4
- require("./dist/cli.cjs");
2
+ import "./dist/cli.mjs";
@@ -2,6 +2,7 @@ import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
2
2
  import * as runtimeGuard from "./src/index.js";
3
3
 
4
4
  const runtimeGuardApi = runtimeGuard as {
5
+ VERSION: string;
5
6
  scanToolCall: (
6
7
  toolName: string,
7
8
  params: Record<string, unknown>,
@@ -90,7 +91,7 @@ function beforeToolCall(
90
91
  const plugin = {
91
92
  id: "guard-scanner",
92
93
  name: "guard-scanner",
93
- version: "15.0.0",
94
+ version: runtimeGuardApi.VERSION,
94
95
  description: "Runtime guard for OpenClaw before_tool_call hook execution.",
95
96
  register(api: OpenClawPluginApi) {
96
97
  api.on(
@@ -99,7 +100,7 @@ const plugin = {
99
100
  { priority: 90 },
100
101
  );
101
102
  api.logger.info(
102
- "guard-scanner registered OpenClaw before_tool_call hook (stable: v2026.3.12, regression lane: v2026.3.8).",
103
+ "guard-scanner registered OpenClaw before_tool_call hook (stable: v2026.3.13, regression lane: v2026.3.8).",
103
104
  );
104
105
  },
105
106
  };
@@ -2,7 +2,7 @@
2
2
  "id": "guard-scanner",
3
3
  "name": "guard-scanner",
4
4
  "description": "Runtime guard plugin for OpenClaw before_tool_call enforcement with capability-scoped policy rationale.",
5
- "version": "16.0.1",
5
+ "version": "16.0.2",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@guava-parity/guard-scanner",
3
- "version": "16.0.1",
3
+ "version": "16.0.2",
4
+ "type": "module",
4
5
  "publishConfig": {
5
6
  "access": "public",
6
7
  "registry": "https://registry.npmjs.org/"
@@ -22,7 +23,7 @@
22
23
  "default": "./dist/index.mjs"
23
24
  },
24
25
  "./plugin": {
25
- "types": "./dist/openclaw-plugin.d.mts",
26
+ "types": "./dist/openclaw-plugin.d.ts",
26
27
  "import": "./dist/openclaw-plugin.mjs",
27
28
  "require": "./dist/openclaw-plugin.cjs",
28
29
  "default": "./dist/openclaw-plugin.mjs"
@@ -57,9 +58,9 @@
57
58
  "lint": "tsx scripts/lint.ts",
58
59
  "typecheck": "tsc --noEmit -p tsconfig.json",
59
60
  "release:gate": "npm run build && npm run benchmark && tsx scripts/generate-capabilities.ts && tsx scripts/release-gate.ts && tsx scripts/validate-tarball.ts",
60
- "test": "npm run build && npm run benchmark && tsx scripts/generate-capabilities.ts && tsx scripts/verify-capabilities.ts && tsx scripts/test-quality-gate.ts && tsx --test test/*.test.ts",
61
- "test:core": "tsx --test test/scanner.test.ts test/patterns.test.ts",
62
- "test:contracts": "npm run build:plugin && tsx scripts/release-gate.ts && tsx --test test/finding-schema.test.ts test/mcp.test.ts test/e2e-mcp.test.ts test/openclaw-plugin-compat.test.ts test/stale-claims.test.ts test/openclaw-upstream-check.test.ts",
61
+ "test": "npm run build && npm run benchmark && tsx scripts/generate-capabilities.ts && tsx scripts/verify-capabilities.ts && tsx scripts/test-quality-gate.ts && vitest run",
62
+ "test:core": "vitest run tests/scanner.test.ts tests/patterns.test.ts",
63
+ "test:contracts": "npm run build:plugin && tsx scripts/release-gate.ts && vitest run tests/finding-schema.test.ts tests/mcp.test.ts tests/e2e-mcp.test.ts tests/openclaw-plugin-compat.test.ts tests/stale-claims.test.ts tests/openclaw-upstream-check.test.ts",
63
64
  "test:corpus": "tsx scripts/corpus-metrics.ts --check",
64
65
  "test:perf": "tsx scripts/perf-regression.ts",
65
66
  "test:quality": "tsx scripts/test-quality-gate.ts",
@@ -109,10 +110,12 @@
109
110
  ],
110
111
  "devDependencies": {
111
112
  "@types/node": "^22.0.0",
112
- "openclaw": "2026.3.12",
113
- "tsx": "^4.20.5",
113
+ "@vitest/coverage-v8": "^4.1.0",
114
+ "openclaw": "2026.3.13",
114
115
  "tsup": "^8.5.0",
115
- "typescript": "^5.7.0"
116
+ "tsx": "^4.20.5",
117
+ "typescript": "^5.7.0",
118
+ "vitest": "^4.1.0"
116
119
  },
117
120
  "dependencies": {
118
121
  "ws": "^8.19.0"
package/dist/cli.d.mts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
package/dist/index.d.mts DELETED
@@ -1,17 +0,0 @@
1
- import { GuardScannerConstructor, ScannerOptions, GuardScannerInstance, RuntimeCheckStats, RuntimeDecision } from './types.mjs';
2
- export { CapabilityMetrics, CustomRule, Finding, GuardMode, McpRequest, PluginConfig, SarifReport, ScanReport, ScanResult, Severity } from './types.mjs';
3
-
4
- declare const GuardScanner: GuardScannerConstructor;
5
- declare const VERSION: string;
6
- declare const THRESHOLDS: Record<string, unknown>;
7
- declare const SEVERITY_WEIGHTS: Record<string, number>;
8
- declare const scanToolCall: (toolName: string, params: Record<string, unknown> | string, options?: Record<string, unknown>) => RuntimeDecision;
9
- declare const RUNTIME_CHECKS: Record<string, unknown>[];
10
- declare const getCheckStats: () => RuntimeCheckStats;
11
- declare const LAYER_NAMES: Record<number, string>;
12
- declare const MCPServer: new () => unknown;
13
- declare const startServer: () => void;
14
- declare const TOOLS: Record<string, unknown>[];
15
- declare function createScanner(options?: ScannerOptions): GuardScannerInstance;
16
-
17
- export { GuardScanner, GuardScannerConstructor, GuardScannerInstance, LAYER_NAMES, MCPServer, RUNTIME_CHECKS, RuntimeCheckStats, RuntimeDecision, SEVERITY_WEIGHTS, ScannerOptions, THRESHOLDS, TOOLS, VERSION, createScanner, getCheckStats, scanToolCall, startServer };
@@ -1 +0,0 @@
1
- #!/usr/bin/env node