项目文件夹

文件
Gelei Deng e238d701f2 feat: 🎸 version 1.0 agentic workflow (#325)
* feat: 🎸 version 1.0 agentic workflow

Major rewrite of PentestGPT to use an agentic pipeline architecture:
Core Changes: - New event-driven architecture with EventBus for
TUI-agent decoupling - Implemented AgentController with 5-state
lifecycle (IDLE->RUNNING->PAUSED->COMPLETED->ERROR) - Added AgentBackend
interface with ClaudeCodeBackend implementation - Session management
with file-based persistence for resumable pentests - Langfuse
integration for observability and tracing Interface: - New Textual-based
TUI with real-time activity feed - Keyboard shortcuts: F1 help, Ctrl+P
pause, Ctrl+Q quit - Enhanced CLI with --target, --instruction,
--non-interactive, --debug flags Project Structure: - Moved legacy
multi-LLM version (v0.15) to legacy/ directory - New pentestgpt/core/
for agent, controller, events, session modules - New
pentestgpt/interface/ for TUI and CLI components - New
pentestgpt/benchmark/ for xbow benchmark integration - Comprehensive
test suite in tests/ with unit and integration tests DevOps: - Docker
support with Ubuntu 24.04 container - GitHub Actions CI/CD pipeline -
Makefile with dev commands (test, lint, format, typecheck) - Added
xbow-validation-benchmarks as submodule

* style: format code with Black

This commit fixes the style issues introduced in abe3be0 according to the output
from Black.

Details: https://github.com/GreyDGL/PentestGPT/pull/325

* fix: 🐛 fix test pipeline

* feat: 🎸 update format

* feat: 🎸 update

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2025-12-13 01:57:24 +08:00

422 行
7.6 KiB
Plaintext

/* PentestGPT TUI Styles - Modern Dark Theme */
/* ============================================================================
Global Styles
============================================================================ */
Screen {
background: #0a0a0a;
color: #f5f5f5;
}
/* ============================================================================
Splash Screen
============================================================================ */
#splash_screen {
height: 100%;
width: 100%;
background: #0a0a0a;
content-align: center middle;
text-align: center;
}
#splash_content {
width: auto;
height: auto;
background: transparent;
text-align: center;
padding: 2;
}
/* ============================================================================
Main Layout
============================================================================ */
#main_container {
height: 100%;
padding: 0;
margin: 0;
background: #0a0a0a;
}
#header {
height: 3;
background: #1a1a1a;
border-bottom: solid #262626;
padding: 0 2;
content-align: left middle;
}
#content_area {
height: 1fr;
background: transparent;
padding: 1 2;
}
#status_bar {
height: 1;
background: #1a1a1a;
border-top: solid #262626;
padding: 0 2;
content-align: left middle;
}
/* ============================================================================
Activity Feed
============================================================================ */
#activity_feed {
height: 100%;
width: 100%;
background: transparent;
border: none;
padding: 0;
scrollbar-background: #0a0a0a;
scrollbar-color: #262626;
scrollbar-corner-color: #0a0a0a;
scrollbar-size: 1 1;
}
#activity_content {
width: 100%;
background: transparent;
padding: 0;
}
.activity-item {
margin-bottom: 1;
padding: 0;
background: transparent;
width: 100%;
}
.activity-timestamp {
color: #525252;
text-style: dim;
}
.activity-message {
color: #a3a3a3;
}
.activity-status-active {
color: #6366f1;
text-style: bold;
}
.activity-status-success {
color: #10b981;
text-style: bold;
}
.activity-status-error {
color: #ef4444;
text-style: bold;
}
/* ============================================================================
Tool Execution Blocks
============================================================================ */
.tool-block {
background: #121212;
border: round #1f1f1f;
border-left: thick #525252;
padding: 1 2;
margin: 0 0 1 0;
width: 100%;
}
.tool-terminal {
border-left: thick #10b981;
}
.tool-thinking {
border-left: thick #8b5cf6;
}
.tool-result {
border-left: thick #6366f1;
}
.tool-error {
border-left: thick #ef4444;
background: #1a0a0a;
}
.tool-warning {
border-left: thick #f59e0b;
background: #1a1200;
}
/* Tool status indicators */
.tool-block.status-running {
border-left: thick #6366f1;
}
.tool-block.status-completed {
border-left: thick #10b981;
background: #0d0d0d;
}
.tool-block.status-failed {
border-left: thick #ef4444;
background: #1a0606;
}
/* Tool content */
.tool-header {
color: #f5f5f5;
text-style: bold;
}
.tool-command {
color: #10b981;
text-style: none;
}
.tool-output {
color: #a3a3a3;
text-style: none;
}
/* ============================================================================
Status Messages
============================================================================ */
.status-agent-active {
color: #6366f1;
text-style: bold;
}
.status-agent-thinking {
color: #8b5cf6;
text-style: italic;
}
.status-agent-idle {
color: #525252;
text-style: dim;
}
.status-icon-active {
color: #6366f1;
}
.status-icon-success {
color: #10b981;
}
.status-icon-warning {
color: #f59e0b;
}
.status-icon-error {
color: #ef4444;
}
/* ============================================================================
Help Modal
============================================================================ */
HelpScreen {
align: center middle;
background: $background 80%;
}
#help_dialog {
grid-size: 1;
grid-gutter: 1;
grid-rows: auto;
padding: 2;
width: 50;
height: auto;
border: round #6366f1;
background: #1a1a1a;
}
#help_title {
color: #8b92ff;
text-style: bold;
text-align: center;
width: 100%;
margin-bottom: 1;
}
#help_content {
color: #f5f5f5;
text-align: left;
width: 100%;
padding: 0;
background: transparent;
}
.help-key {
color: #8b5cf6;
text-style: bold;
}
.help-description {
color: #a3a3a3;
}
/* ============================================================================
Quit Confirmation Modal
============================================================================ */
QuitScreen {
align: center middle;
background: $background 80%;
}
#quit_dialog {
grid-size: 1;
grid-gutter: 1;
grid-rows: auto auto;
padding: 2;
width: 30;
height: auto;
border: round #8b5cf6;
background: #1a1a1a;
}
#quit_title {
color: #ffffff;
text-style: bold;
text-align: center;
width: 100%;
margin-bottom: 1;
}
#quit_buttons {
grid-size: 2;
grid-gutter: 2;
grid-columns: 1fr 1fr;
width: 100%;
height: auto;
}
#quit_buttons Button {
height: 1;
min-height: 1;
border: none;
text-style: bold;
}
#btn_quit_confirm {
background: #2a1515;
color: #ff6b6b;
border: solid #ef4444;
}
#btn_quit_confirm:hover, #btn_quit_confirm:focus {
background: #ef4444;
color: #ffffff;
border: solid #ff6b6b;
}
#btn_quit_cancel {
background: #1a1a1a;
color: #d4d4d4;
border: solid #737373;
}
#btn_quit_cancel:hover, #btn_quit_cancel:focus {
background: #6366f1;
color: #ffffff;
border: solid #8b92ff;
}
/* ============================================================================
Scrollbars
============================================================================ */
Vertical:focus-within > VerticalScroll {
scrollbar-color: #6366f1;
}
VerticalScroll:focus {
scrollbar-color: #6366f1;
}
/* ============================================================================
Placeholders & Loading States
============================================================================ */
.placeholder {
width: 100%;
height: 100%;
content-align: center middle;
text-align: center;
color: #525252;
text-style: italic;
}
.loading {
color: #6366f1;
text-style: italic;
}
.loading-dots {
color: #8b5cf6;
}
/* ============================================================================
Accent & Semantic Colors
============================================================================ */
.accent-primary {
color: #6366f1;
}
.accent-secondary {
color: #8b5cf6;
}
.text-success {
color: #10b981;
}
.text-warning {
color: #f59e0b;
}
.text-error {
color: #ef4444;
}
.text-dim {
color: #525252;
}
.text-muted {
color: #a3a3a3;
}
.text-primary {
color: #f5f5f5;
}
/* ============================================================================
User Input Field (shown when agent is paused)
============================================================================ */
#user_input {
height: 3;
background: #1a1a1a;
border: round #f59e0b;
border-title-color: #f59e0b;
padding: 0 1;
margin: 0 2 1 2;
}
#user_input:focus {
border: round #6366f1;
background: #121212;
}
#user_input.-paused {
border: round #f59e0b;
}