Skip to content

Commit b1e93f7

Browse files
committed
merge: 合并 npm-release-integration 到 npm-release
# Conflicts: # README.md # package-lock.json # package.json # server/src/app.module.ts # web/dist/index.html
2 parents e5ec823 + e8b8516 commit b1e93f7

30 files changed

Lines changed: 1255 additions & 46 deletions

README.md

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ Secbot is an AI-powered TypeScript security automation workspace with a NestJS b
1616
- End-to-end TypeScript architecture (`NestJS + Ink + SQLite`).
1717
- `secbot` binary that starts terminal UI with local spawned backend by default.
1818
- `secbot-server` binary for backend-only API scenarios.
19-
- Multi-agent orchestration with planning, tool execution, and summarization.
19+
- `secbot-mcp` binary that exposes Secbot tools as a stdio MCP server.
20+
- Shared skills management across REST, TUI slash commands, CLI subcommands, and internal tools.
21+
- Multi-agent orchestration with planning, tool execution, MCP bridging, and summarization.
2022
- Built-in security tool modules for web, network, OSINT, defense, and reporting workflows.
2123

2224
### Source-tree orchestration (contributors)
@@ -79,7 +81,15 @@ secbot
7981
secbot-server
8082
```
8183

82-
### 4. Attach to an existing backend (optional)
84+
### 4. Start MCP server mode (optional)
85+
86+
```bash
87+
secbot-mcp
88+
```
89+
90+
Set `SECBOT_MCP_ALLOW_SENSITIVE=true` only when you intentionally want MCP clients to see sensitive tools.
91+
92+
### 5. Attach to an existing backend (optional)
8393

8494
```bash
8595
# Recommended explicit service mode
@@ -95,6 +105,53 @@ SECBOT_TUI_BACKEND=remote SECBOT_API_URL=http://127.0.0.1:8000 secbot
95105
| --- | --- |
96106
| `secbot` | Start terminal UI (default: spawn local backend; optional service mode) |
97107
| `secbot-server` | Start NestJS backend only |
108+
| `secbot-mcp` | Expose Secbot tools through stdio MCP |
109+
110+
## Skills Management
111+
112+
Secbot now exposes one shared skills layer for product and automation surfaces.
113+
114+
### TUI slash commands
115+
116+
```text
117+
/skills
118+
/skill <name>
119+
/create-skill <name> [--description ...] [--trigger ...] [--tag ...] [--prerequisite ...] [--author ...]
120+
```
121+
122+
### CLI subcommands
123+
124+
```bash
125+
secbot skills list
126+
secbot skills view <name>
127+
secbot skills create <name> --description "..." --trigger recon --tag web
128+
```
129+
130+
### REST endpoints
131+
132+
```text
133+
GET /api/skills
134+
GET /api/skills/:name
135+
POST /api/skills
136+
```
137+
138+
Created skills are scaffolded under `skills/custom/<slug>/SKILL.md` and can also be reached through the internal `list_skills`, `get_skill`, and `create_skill` tools.
139+
140+
## MCP Integration
141+
142+
Secbot supports MCP in both directions.
143+
144+
### Use Secbot as an MCP server
145+
146+
```bash
147+
secbot-mcp
148+
```
149+
150+
This exposes the current `ToolsService` catalog over stdio MCP. Sensitive tools stay hidden by default unless `SECBOT_MCP_ALLOW_SENSITIVE=true` is set.
151+
152+
### Call external MCP servers from Secbot
153+
154+
Use the built-in `mcp_call` tool to connect to another stdio MCP server, list its tools, or invoke one of them from Secbot workflows.
98155

99156
## Source Development
100157

@@ -122,6 +179,7 @@ SECBOT_TUI_BACKEND=service SECBOT_API_URL=http://127.0.0.1:8000 npm run start:tu
122179
| --- | --- |
123180
| `npm run build` | Build the NestJS backend |
124181
| `npm run build:terminal-ui` | Build the Ink terminal UI |
182+
| `npm run build:web` | Build the web frontend bundle |
125183
| `npm run typecheck` | Type-check server code |
126184
| `npm run lint` | Run ESLint |
127185
| `npm run format:check` | Check Prettier formatting |

npm-bin/secbot-mcp.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
require('../server/dist/mcp-server.js');

package-lock.json

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
"main": "server/dist/main.js",
88
"bin": {
99
"secbot": "npm-bin/secbot.js",
10-
"secbot-server": "npm-bin/secbot-server.js"
10+
"secbot-server": "npm-bin/secbot-server.js",
11+
"secbot-mcp": "npm-bin/secbot-mcp.js"
1112
},
1213
"files": [
1314
"server/dist",
1415
"terminal-ui/dist",
1516
"terminal-ui/package.json",
1617
"scripts/run-product.js",
18+
"skills",
19+
"web/dist",
1720
"README.md",
1821
"README_CN.md",
1922
"README_EN.md",
@@ -38,8 +41,9 @@
3841
"test": "vitest run",
3942
"test:watch": "vitest",
4043
"test:coverage": "vitest run --coverage",
41-
"prepack": "npm run build && npm run build:terminal-ui",
44+
"prepack": "npm run build && npm run build:terminal-ui && npm run build:web",
4245
"build:terminal-ui": "tsc -p terminal-ui/tsconfig.json",
46+
"build:web": "npm --prefix web run build",
4347
"pack:npm": "npm pack",
4448
"release:build": "npm run clean && npm run build",
4549
"release:pack": "npm run release:build && npm pack",
@@ -80,7 +84,8 @@
8084
"ink-text-input": "^5.0.1",
8185
"react": "^18.2.0",
8286
"reflect-metadata": "^0.2.2",
83-
"rxjs": "^7.8.1"
87+
"rxjs": "^7.8.1",
88+
"zod": "^3.25.76"
8489
},
8590
"devDependencies": {
8691
"@emnapi/core": "1.9.2",

0 commit comments

Comments
 (0)