securityclaw 0.0.1 → 0.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.
- package/CHANGELOG.md +8 -0
- package/README.md +22 -84
- package/README.zh-CN.md +24 -86
- package/index.ts +57 -59
- package/package.json +6 -8
- package/src/admin/console_notice.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2] - 2026-03-17
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Simplified the README install section to focus on product overview plus remote install and uninstall flows.
|
|
7
|
+
- Clarified that published npm releases ship with a prebuilt admin frontend bundle.
|
|
8
|
+
- Prevented admin build tooling from being shipped as runtime npm dependencies.
|
|
9
|
+
- Avoided auto-opening the dashboard from short-lived gateway service commands before the persistent admin backend is ready.
|
|
10
|
+
|
|
3
11
|
## [0.1.0] - 2026-03-15
|
|
4
12
|
|
|
5
13
|
### 架构重构
|
package/README.md
CHANGED
|
@@ -6,112 +6,59 @@ SecurityClaw is a runtime security plugin for [OpenClaw](https://github.com/open
|
|
|
6
6
|
|
|
7
7
|
## Why SecurityClaw
|
|
8
8
|
|
|
9
|
-
LLM agents can execute powerful tools. SecurityClaw
|
|
9
|
+
LLM agents can execute powerful tools. SecurityClaw adds a rule-first guardrail layer so risky operations are blocked, challenged for approval, or allowed with warning and traceability.
|
|
10
10
|
|
|
11
11
|
## Core Capabilities
|
|
12
12
|
|
|
13
13
|
- Runtime policy enforcement for OpenClaw hooks (`before_tool_call`, `after_tool_call`, etc.)
|
|
14
14
|
- Rule-first security model (`allow`, `warn`, `challenge`, `block`)
|
|
15
15
|
- Challenge approval workflow with command-based admin handling
|
|
16
|
-
- Dynamic sensitive-path registry
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- Decision events for audit and observability
|
|
20
|
-
- Built-in internationalization (`en` and `zh-CN`) for runtime/admin text
|
|
16
|
+
- Dynamic sensitive-path registry and DLP sanitization
|
|
17
|
+
- Admin dashboard for strategy, account policy, and runtime status
|
|
18
|
+
- Built-in internationalization (`en` and `zh-CN`) for runtime and admin text
|
|
21
19
|
|
|
22
|
-
##
|
|
20
|
+
## Install
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `domain`: policy, approval, context inference, formatting
|
|
27
|
-
- `domain/services/sensitive_path_registry.ts`: built-in + runtime-overridden sensitive path mappings
|
|
28
|
-
- `engine`: rule matching, decisioning, DLP scanning
|
|
29
|
-
- `config`: base YAML + SQLite runtime override
|
|
30
|
-
- `admin`: dashboard backend + frontend
|
|
31
|
-
- `monitoring`: runtime status and decision snapshots
|
|
32
|
-
|
|
33
|
-
See [Architecture](./docs/ARCHITECTURE.md) and [Technical Solution](./docs/TECHNICAL_SOLUTION.md).
|
|
34
|
-
|
|
35
|
-
## Quick Start
|
|
36
|
-
|
|
37
|
-
### 1. Install dependencies
|
|
22
|
+
Install the latest published release:
|
|
38
23
|
|
|
39
24
|
```bash
|
|
40
|
-
|
|
25
|
+
npx securityclaw install
|
|
41
26
|
```
|
|
42
27
|
|
|
43
|
-
|
|
28
|
+
Or install through the remote script:
|
|
44
29
|
|
|
45
30
|
```bash
|
|
46
|
-
|
|
31
|
+
curl -fsSL https://raw.githubusercontent.com/znary/securityclaw/main/install.sh | bash
|
|
47
32
|
```
|
|
48
33
|
|
|
49
|
-
|
|
34
|
+
Install a specific published version:
|
|
50
35
|
|
|
51
36
|
```bash
|
|
52
|
-
|
|
53
|
-
curl -fsSL https://raw.githubusercontent.com/znary/securityclaw/main/install.sh | bash
|
|
37
|
+
SECURITYCLAW_VERSION=0.0.2 curl -fsSL https://raw.githubusercontent.com/znary/securityclaw/main/install.sh | bash
|
|
54
38
|
```
|
|
55
39
|
|
|
56
|
-
|
|
40
|
+
Published npm releases already include the prebuilt admin frontend bundle, so end-user installs do not rebuild the dashboard during plugin installation.
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
npm test
|
|
60
|
-
```
|
|
42
|
+
## Uninstall
|
|
61
43
|
|
|
62
|
-
|
|
44
|
+
Remove the installed plugin from OpenClaw:
|
|
63
45
|
|
|
64
46
|
```bash
|
|
65
|
-
|
|
47
|
+
openclaw plugins uninstall securityclaw
|
|
66
48
|
```
|
|
67
49
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## OpenClaw Integration
|
|
71
|
-
|
|
72
|
-
Preferred local install:
|
|
50
|
+
If you want to preview the removal first:
|
|
73
51
|
|
|
74
52
|
```bash
|
|
75
|
-
|
|
53
|
+
openclaw plugins uninstall securityclaw --dry-run
|
|
76
54
|
```
|
|
77
55
|
|
|
78
|
-
|
|
79
|
-
See [OpenClaw Install Guide](./docs/OPENCLAW_INSTALL.md) for details.
|
|
80
|
-
|
|
81
|
-
## Approval Commands
|
|
82
|
-
|
|
83
|
-
After setting one account policy with `is_admin=true`, the admin can run:
|
|
56
|
+
After install or uninstall, restart or verify the gateway if needed:
|
|
84
57
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## Admin Dashboard
|
|
91
|
-
|
|
92
|
-
Dashboard supports English and Chinese UI switching and stores language preference in local storage.
|
|
93
|
-
By default, it follows the host system language.
|
|
94
|
-
|
|
95
|
-
Main panels:
|
|
96
|
-
|
|
97
|
-
- Overview: posture and trend signals, plus a skill-risk snapshot for high-priority installed skills
|
|
98
|
-
- Decisions: recent decision events and reasons
|
|
99
|
-
- Policies: grouped rule strategy controls plus sensitive-path registry management
|
|
100
|
-
- Skill Interception: installed skill inventory, risk scoring, undeclared-change detection, rescan/quarantine/trust override actions, and interception policy matrix
|
|
101
|
-
- Accounts: admin approver account selection and mode settings
|
|
102
|
-
|
|
103
|
-
Sensitive path registry behavior:
|
|
104
|
-
|
|
105
|
-
- Built-in path patterns cover credentials, personal content, download staging, browser profiles, browser secret stores, and communication stores.
|
|
106
|
-
- Registry entries are persisted in SQLite runtime strategy overrides together with rule decisions.
|
|
107
|
-
- Built-in entries can be disabled from the dashboard, and custom path rules can be added without editing the base YAML.
|
|
108
|
-
|
|
109
|
-
Skill interception behavior:
|
|
110
|
-
|
|
111
|
-
- Dashboard discovers installed skills from local OpenClaw / Codex skill roots and stores scan results in SQLite.
|
|
112
|
-
- A skill can be flagged when its content changes without a matching version update.
|
|
113
|
-
- Overview surfaces the most important skill signals directly so admins can see high-risk items without switching tabs.
|
|
114
|
-
- The dedicated Skill Interception panel supports rescan, quarantine, temporary trust override, and risk-matrix editing.
|
|
58
|
+
```bash
|
|
59
|
+
openclaw gateway restart
|
|
60
|
+
openclaw gateway status
|
|
61
|
+
```
|
|
115
62
|
|
|
116
63
|
## Documentation
|
|
117
64
|
|
|
@@ -121,15 +68,6 @@ Skill interception behavior:
|
|
|
121
68
|
- [Runbook](./docs/RUNBOOK.md)
|
|
122
69
|
- [Integration Guide](./docs/INTEGRATION_GUIDE.md)
|
|
123
70
|
|
|
124
|
-
## Development
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
npm run typecheck
|
|
128
|
-
npm run test:unit
|
|
129
|
-
npm test
|
|
130
|
-
npm run admin:build
|
|
131
|
-
```
|
|
132
|
-
|
|
133
71
|
## License
|
|
134
72
|
|
|
135
73
|
MIT. See [LICENSE](./LICENSE).
|
package/README.zh-CN.md
CHANGED
|
@@ -6,112 +6,59 @@ SecurityClaw 是面向 [OpenClaw](https://github.com/openclaw/openclaw) 的运
|
|
|
6
6
|
|
|
7
7
|
## SecurityClaw 解决什么问题
|
|
8
8
|
|
|
9
|
-
LLM Agent 具备高权限工具调用能力。SecurityClaw
|
|
9
|
+
LLM Agent 具备高权限工具调用能力。SecurityClaw 提供一层规则优先的安全护栏,让高风险操作被阻止、进入审批,或在留痕前提下放行。
|
|
10
10
|
|
|
11
11
|
## 核心能力
|
|
12
12
|
|
|
13
|
-
- 基于 OpenClaw Hook 的运行时策略执行(`before_tool_call` 等)
|
|
13
|
+
- 基于 OpenClaw Hook 的运行时策略执行(`before_tool_call`、`after_tool_call` 等)
|
|
14
14
|
- 规则优先决策模型(`allow` / `warn` / `challenge` / `block`)
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- 决策事件与状态观测
|
|
20
|
-
- 中英文国际化(`en` / `zh-CN`)
|
|
15
|
+
- 基于管理员命令的审批流程
|
|
16
|
+
- 动态敏感路径注册表与 DLP 敏感信息净化
|
|
17
|
+
- 用于策略、账号策略和运行状态的管理后台
|
|
18
|
+
- 运行时与后台均支持中英文(`en` / `zh-CN`)
|
|
21
19
|
|
|
22
|
-
##
|
|
20
|
+
## 安装
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `domain`:策略、审批、上下文推断、格式化
|
|
27
|
-
- `domain/services/sensitive_path_registry.ts`:内置 + 运行时覆写的敏感路径映射
|
|
28
|
-
- `engine`:规则匹配、决策引擎、DLP
|
|
29
|
-
- `config`:YAML 基线配置 + SQLite 运行时覆盖
|
|
30
|
-
- `admin`:管理后台前后端
|
|
31
|
-
- `monitoring`:运行状态与决策快照
|
|
32
|
-
|
|
33
|
-
详见 [架构文档](./docs/ARCHITECTURE.md) 与 [技术方案](./docs/TECHNICAL_SOLUTION.md)。
|
|
34
|
-
|
|
35
|
-
## 快速开始
|
|
36
|
-
|
|
37
|
-
### 1. 安装依赖
|
|
22
|
+
安装最新发布版本:
|
|
38
23
|
|
|
39
24
|
```bash
|
|
40
|
-
|
|
25
|
+
npx securityclaw install
|
|
41
26
|
```
|
|
42
27
|
|
|
43
|
-
|
|
28
|
+
或者通过远程脚本安装:
|
|
44
29
|
|
|
45
30
|
```bash
|
|
46
|
-
|
|
31
|
+
curl -fsSL https://raw.githubusercontent.com/znary/securityclaw/main/install.sh | bash
|
|
47
32
|
```
|
|
48
33
|
|
|
49
|
-
|
|
34
|
+
安装指定发布版本:
|
|
50
35
|
|
|
51
36
|
```bash
|
|
52
|
-
|
|
53
|
-
curl -fsSL https://raw.githubusercontent.com/znary/securityclaw/main/install.sh | bash
|
|
37
|
+
SECURITYCLAW_VERSION=0.0.2 curl -fsSL https://raw.githubusercontent.com/znary/securityclaw/main/install.sh | bash
|
|
54
38
|
```
|
|
55
39
|
|
|
56
|
-
|
|
40
|
+
发布到 npm 的版本会直接带上预构建好的管理后台前端,因此终端用户安装插件时不需要现场再构建后台资源。
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
npm test
|
|
60
|
-
```
|
|
42
|
+
## 卸载
|
|
61
43
|
|
|
62
|
-
|
|
44
|
+
从 OpenClaw 中卸载已安装插件:
|
|
63
45
|
|
|
64
46
|
```bash
|
|
65
|
-
|
|
47
|
+
openclaw plugins uninstall securityclaw
|
|
66
48
|
```
|
|
67
49
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## OpenClaw 集成
|
|
71
|
-
|
|
72
|
-
推荐本地安装方式:
|
|
50
|
+
如果想先预览会删除什么:
|
|
73
51
|
|
|
74
52
|
```bash
|
|
75
|
-
|
|
53
|
+
openclaw plugins uninstall securityclaw --dry-run
|
|
76
54
|
```
|
|
77
55
|
|
|
78
|
-
|
|
79
|
-
详情见 [OpenClaw 安装指南](./docs/OPENCLAW_INSTALL.md)。
|
|
80
|
-
|
|
81
|
-
## 审批命令
|
|
82
|
-
|
|
83
|
-
当账号策略中配置 `is_admin=true` 后,管理员可在聊天渠道执行:
|
|
56
|
+
安装或卸载后,如有需要可重启并校验 gateway:
|
|
84
57
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## 管理后台
|
|
91
|
-
|
|
92
|
-
管理后台支持中英文切换,并将语言偏好保存在本地存储。
|
|
93
|
-
默认跟随系统语言。
|
|
94
|
-
|
|
95
|
-
核心模块:
|
|
96
|
-
|
|
97
|
-
- 概览:总体态势、趋势,以及高优先级已安装 skill 的风险快照
|
|
98
|
-
- 决策记录:最近决策事件与原因
|
|
99
|
-
- 规则策略:按分组编辑规则动作,并维护敏感路径注册表
|
|
100
|
-
- Skill 拦截:已安装 skill 清单、风险打分、未声明变更检测、重扫 / 隔离 / 受信覆盖操作,以及拦截策略矩阵
|
|
101
|
-
- 账号策略:管理员审批账号与模式配置
|
|
102
|
-
|
|
103
|
-
敏感路径注册表说明:
|
|
104
|
-
|
|
105
|
-
- 内置覆盖凭据目录、个人内容目录、下载暂存区、浏览器资料目录、浏览器密钥库和通信存储。
|
|
106
|
-
- 路径注册表与规则动作一起持久化到 SQLite 运行时策略覆盖中。
|
|
107
|
-
- 可在后台删除内置项,也可直接添加自定义路径,无需手改基线 YAML。
|
|
108
|
-
|
|
109
|
-
Skill 拦截说明:
|
|
110
|
-
|
|
111
|
-
- 后台会从本地 OpenClaw / Codex skill 目录自动发现已安装 skills,并把扫描结果持久化到 SQLite。
|
|
112
|
-
- 当 skill 内容发生变化、但版本号没有同步更新时,会被标记为“内容变了但版本没变”。
|
|
113
|
-
- 概览页会直接展示最值得优先处理的 skill 风险信号,不需要先切到 Skill 页签。
|
|
114
|
-
- `Skill 拦截` 面板支持重扫、隔离、临时受信覆盖,以及风险矩阵配置。
|
|
58
|
+
```bash
|
|
59
|
+
openclaw gateway restart
|
|
60
|
+
openclaw gateway status
|
|
61
|
+
```
|
|
115
62
|
|
|
116
63
|
## 文档导航
|
|
117
64
|
|
|
@@ -121,15 +68,6 @@ Skill 拦截说明:
|
|
|
121
68
|
- [运行手册](./docs/RUNBOOK.md)
|
|
122
69
|
- [集成指南](./docs/INTEGRATION_GUIDE.md)
|
|
123
70
|
|
|
124
|
-
## 开发命令
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
npm run typecheck
|
|
128
|
-
npm run test:unit
|
|
129
|
-
npm test
|
|
130
|
-
npm run admin:build
|
|
131
|
-
```
|
|
132
|
-
|
|
133
71
|
## 许可证
|
|
134
72
|
|
|
135
73
|
MIT,详见 [LICENSE](./LICENSE)。
|
package/index.ts
CHANGED
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
} from "./src/infrastructure/config/plugin_config_parser.ts";
|
|
31
31
|
import { RuntimeStatusStore } from "./src/monitoring/status_store.ts";
|
|
32
32
|
import { startAdminServer } from "./admin/server.ts";
|
|
33
|
-
import { ensureAdminAssetsBuilt } from "./src/admin/build.ts";
|
|
34
33
|
import { announceAdminConsole, shouldAnnounceAdminConsoleForArgv } from "./src/admin/console_notice.ts";
|
|
35
34
|
import { shouldAutoStartAdminServer } from "./src/admin/runtime_guard.ts";
|
|
36
35
|
import { AccountPolicyEngine } from "./src/domain/services/account_policy_engine.ts";
|
|
@@ -1991,69 +1990,67 @@ const plugin = {
|
|
|
1991
1990
|
return runtime;
|
|
1992
1991
|
}
|
|
1993
1992
|
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1993
|
+
function startManagedAdminConsole(): void {
|
|
1994
|
+
if (!adminAutoStart) {
|
|
1995
|
+
api.logger.info?.("securityclaw: admin auto-start disabled by config");
|
|
1996
|
+
return;
|
|
1998
1997
|
}
|
|
1999
|
-
|
|
2000
|
-
api.logger.warn?.(`securityclaw: failed to refresh admin bundle (${String(error)})`);
|
|
2001
|
-
});
|
|
2002
|
-
if (adminAutoStart) {
|
|
1998
|
+
|
|
2003
1999
|
const autoStartDecision = shouldAutoStartAdminServer(process.env);
|
|
2004
|
-
if (autoStartDecision.enabled) {
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
.
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2000
|
+
if (!autoStartDecision.enabled) {
|
|
2001
|
+
if (shouldAnnounceAdminConsoleForArgv(process.argv)) {
|
|
2002
|
+
announceAdminConsole({
|
|
2003
|
+
locale: runtimeLocale,
|
|
2004
|
+
logger: {
|
|
2005
|
+
info: (message: string) => api.logger.info?.(`securityclaw: ${message}`),
|
|
2006
|
+
warn: (message: string) => api.logger.warn?.(`securityclaw: ${message}`),
|
|
2007
|
+
},
|
|
2008
|
+
stateDir,
|
|
2009
|
+
state: "service-command",
|
|
2010
|
+
url: adminConsoleUrl,
|
|
2011
|
+
});
|
|
2012
|
+
api.logger.info?.("securityclaw: admin dashboard is hosted by the background OpenClaw gateway service");
|
|
2013
|
+
} else {
|
|
2014
|
+
api.logger.info?.(
|
|
2015
|
+
`securityclaw: admin auto-start skipped in ${autoStartDecision.reason}; use npm run admin for standalone dashboard`,
|
|
2016
|
+
);
|
|
2017
|
+
}
|
|
2018
|
+
return;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
const adminServerOptions = {
|
|
2022
|
+
configPath: resolved.configPath,
|
|
2023
|
+
legacyOverridePath: resolved.legacyOverridePath,
|
|
2024
|
+
statusPath,
|
|
2025
|
+
dbPath,
|
|
2026
|
+
unrefOnStart: true,
|
|
2027
|
+
logger: {
|
|
2028
|
+
info: (message: string) => api.logger.info?.(`securityclaw: ${message}`),
|
|
2029
|
+
warn: (message: string) => api.logger.warn?.(`securityclaw: ${message}`),
|
|
2030
|
+
},
|
|
2031
|
+
...(pluginConfig.adminPort !== undefined ? { port: pluginConfig.adminPort } : {}),
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
void startAdminServer(adminServerOptions)
|
|
2035
|
+
.then((result) => {
|
|
2036
|
+
announceAdminConsole({
|
|
2037
|
+
locale: runtimeLocale,
|
|
2038
|
+
logger: {
|
|
2039
|
+
info: (message: string) => api.logger.info?.(`securityclaw: ${message}`),
|
|
2040
|
+
warn: (message: string) => api.logger.warn?.(`securityclaw: ${message}`),
|
|
2041
|
+
},
|
|
2042
|
+
stateDir,
|
|
2043
|
+
state: result.state,
|
|
2044
|
+
url: `http://127.0.0.1:${result.runtime.port}`,
|
|
2033
2045
|
});
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
logger: {
|
|
2039
|
-
info: (message: string) => api.logger.info?.(`securityclaw: ${message}`),
|
|
2040
|
-
warn: (message: string) => api.logger.warn?.(`securityclaw: ${message}`),
|
|
2041
|
-
},
|
|
2042
|
-
stateDir,
|
|
2043
|
-
state: "service-command",
|
|
2044
|
-
url: adminConsoleUrl,
|
|
2045
|
-
});
|
|
2046
|
-
api.logger.info?.("securityclaw: admin dashboard is hosted by the background OpenClaw gateway service");
|
|
2047
|
-
} else {
|
|
2048
|
-
api.logger.info?.(
|
|
2049
|
-
`securityclaw: admin auto-start skipped in ${autoStartDecision.reason}; use npm run admin for standalone dashboard`,
|
|
2050
|
-
);
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
} else {
|
|
2054
|
-
api.logger.info?.("securityclaw: admin auto-start disabled by config");
|
|
2046
|
+
})
|
|
2047
|
+
.catch((error) => {
|
|
2048
|
+
api.logger.warn?.(`securityclaw: failed to auto-start admin dashboard (${String(error)})`);
|
|
2049
|
+
});
|
|
2055
2050
|
}
|
|
2056
2051
|
|
|
2052
|
+
statusStore.markBoot(toStatusConfig(runtime.config, runtime.overrideLoaded, resolved));
|
|
2053
|
+
|
|
2057
2054
|
api.logger.info?.(
|
|
2058
2055
|
`securityclaw: boot env=${runtime.config.environment} policy_version=${runtime.config.policy_version} dlp_mode=${runtime.config.dlp.on_dlp_hit} rules=${runtime.config.policies.length}`,
|
|
2059
2056
|
);
|
|
@@ -2655,6 +2652,7 @@ const plugin = {
|
|
|
2655
2652
|
{ priority: 100 },
|
|
2656
2653
|
);
|
|
2657
2654
|
|
|
2655
|
+
startManagedAdminConsole();
|
|
2658
2656
|
api.logger.info?.(`securityclaw: loaded policy_version=${runtime.config.policy_version}`);
|
|
2659
2657
|
}
|
|
2660
2658
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "securityclaw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "SecurityClaw security plugin for OpenClaw-compatible hooks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test:unit": "node --test --experimental-strip-types",
|
|
43
43
|
"test": "npm run typecheck && npm run test:unit",
|
|
44
44
|
"check": "npm test",
|
|
45
|
-
"admin": "node --experimental-strip-types ./admin/server.ts",
|
|
45
|
+
"admin": "npm run admin:build && node --experimental-strip-types ./admin/server.ts",
|
|
46
46
|
"admin:build": "node ./scripts/build-admin.mjs",
|
|
47
47
|
"prepack": "npm test && npm run admin:build",
|
|
48
48
|
"pack:plugin": "node ./scripts/pack-plugin.mjs",
|
|
@@ -50,17 +50,15 @@
|
|
|
50
50
|
"release:check": "node ./scripts/release-preflight.mjs",
|
|
51
51
|
"release:dry-run": "npm run release:check && npm publish --dry-run --access public"
|
|
52
52
|
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"esbuild": "^0.27.4",
|
|
55
|
-
"react": "^19.2.4",
|
|
56
|
-
"react-dom": "^19.2.4",
|
|
57
|
-
"recharts": "^3.8.0"
|
|
58
|
-
},
|
|
59
53
|
"devDependencies": {
|
|
60
54
|
"@types/node": "^25.5.0",
|
|
61
55
|
"@types/react": "^19.2.14",
|
|
62
56
|
"@types/react-dom": "^19.2.3",
|
|
57
|
+
"esbuild": "^0.27.4",
|
|
63
58
|
"openclaw": "^2026.3.13",
|
|
59
|
+
"react": "^19.2.4",
|
|
60
|
+
"react-dom": "^19.2.4",
|
|
61
|
+
"recharts": "^3.8.0",
|
|
64
62
|
"typescript": "^5.9.3"
|
|
65
63
|
},
|
|
66
64
|
"peerDependencies": {
|
|
@@ -168,9 +168,10 @@ export function announceAdminConsole(options: AnnounceAdminConsoleOptions): Anno
|
|
|
168
168
|
const { locale, logger, url, state, stateDir, opener = openAdminConsoleInBrowser } = options;
|
|
169
169
|
const markerPath = stateDir ? resolveAdminConsoleMarkerPath(stateDir) : undefined;
|
|
170
170
|
const firstRun = markerPath !== undefined && !existsSync(markerPath);
|
|
171
|
+
const shouldAutoOpen = firstRun && state !== "service-command";
|
|
171
172
|
|
|
172
173
|
let openedAutomatically = false;
|
|
173
|
-
if (
|
|
174
|
+
if (shouldAutoOpen) {
|
|
174
175
|
const result = opener(url);
|
|
175
176
|
if (result.ok) {
|
|
176
177
|
openedAutomatically = true;
|