[PR #19] [MERGED] feat(workspaces): add unified /workspace lifecycle, target persistence, and workspace-scoped RAG #19

Closed
opened 2026-02-27 13:59:22 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/GH05TCREW/pentestagent/pull/19
Author: @giveen
Created: 1/19/2026
Status: Merged
Merged: 1/19/2026
Merged by: @GH05TCREW

Base: mainHead: workspace


📝 Commits (10+)

  • e8ab673 feat(workspaces): add unified /workspace lifecycle, target persistence, and workspace-scoped RAG
  • acb5ca0 chore(workspaces): remove tracked workspaces and ignore user workspace data
  • 08e9d53 chore: apply ruff fixes to project files; exclude third_party from ruff
  • 870cc4a test: suppress tarfile DeprecationWarning in import workspace tests
  • 2c82a30 test(rag): assert persisted index is loaded (mtime unchanged)
  • a186b62 chore: log and notify on critical exceptions (mcp manager, tui target persistence/display)
  • 14ec8af chore: log notifier failures in RAG; notify on MCP atexit failure; add TUI notification tests
  • 63233dc refactor: use workspaces.validation utilities for target extraction and scope checks
  • bdb0b1d docs: clarify gather_candidate_targets is shallow, not recursive
  • cd1eaed chore: remove unused TargetManager import from base_agent.py

📊 Changes

33 files changed (+2650 additions, -1345 deletions)

View changed files

📝 .gitignore (+12 -0)
dupe-workspace.tar.gz (+0 -0)
expimp-workspace.tar.gz (+0 -0)
📝 pentestagent/agents/base_agent.py (+101 -51)
📝 pentestagent/agents/crew/orchestrator.py (+37 -2)
📝 pentestagent/agents/crew/worker_pool.py (+40 -6)
📝 pentestagent/agents/pa_agent/pa_agent.py (+10 -2)
📝 pentestagent/interface/main.py (+256 -0)
pentestagent/interface/notifier.py (+40 -0)
📝 pentestagent/interface/tui.py (+738 -72)
📝 pentestagent/knowledge/indexer.py (+6 -0)
📝 pentestagent/knowledge/rag.py (+110 -3)
📝 pentestagent/mcp/hexstrike_adapter.py (+123 -29)
📝 pentestagent/mcp/manager.py (+24 -15)
📝 pentestagent/mcp/metasploit_adapter.py (+99 -26)
📝 pentestagent/mcp/transport.py (+97 -20)
📝 pentestagent/runtime/docker_runtime.py (+28 -4)
📝 pentestagent/runtime/runtime.py (+61 -22)
📝 pentestagent/tools/notes/__init__.py (+21 -11)
📝 pentestagent/tools/token_tracker.py (+20 -8)

...and 13 more files

📄 Description

  • Introduce command for CLI and TUI with create/activate, list, info, note, clear, export, import, and help actions
  • Persist workspace state via marker and enriched (targets, operator notes, last_active_at, last_target)
  • Restore on workspace activation and sync it to UI banner, agent state, and CLI output
  • Enforce target normalization and ensure always exists in workspace targets
  • Route loot output to when a workspace is active
  • Prefer workspace-local knowledge paths for indexing and RAG resolution
  • Persist RAG indexes per workspace and load existing indexes before re-indexing
  • Add deterministic workspace export/import utilities (excluding caches)
  • Integrate workspace handling into TUI slash commands with modal help screen

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/GH05TCREW/pentestagent/pull/19 **Author:** [@giveen](https://github.com/giveen) **Created:** 1/19/2026 **Status:** ✅ Merged **Merged:** 1/19/2026 **Merged by:** [@GH05TCREW](https://github.com/GH05TCREW) **Base:** `main` ← **Head:** `workspace` --- ### 📝 Commits (10+) - [`e8ab673`](https://github.com/GH05TCREW/pentestagent/commit/e8ab673a13b8117d389043ee020a0b6d17c8da7c) feat(workspaces): add unified /workspace lifecycle, target persistence, and workspace-scoped RAG - [`acb5ca0`](https://github.com/GH05TCREW/pentestagent/commit/acb5ca021e5e17e674d94621879ed7d2ea7b7a46) chore(workspaces): remove tracked workspaces and ignore user workspace data - [`08e9d53`](https://github.com/GH05TCREW/pentestagent/commit/08e9d53dd8f84b509e607a731c74bd9fd16fa6a4) chore: apply ruff fixes to project files; exclude third_party from ruff - [`870cc4a`](https://github.com/GH05TCREW/pentestagent/commit/870cc4a84a42c8156944523f2deb106467af368d) test: suppress tarfile DeprecationWarning in import workspace tests - [`2c82a30`](https://github.com/GH05TCREW/pentestagent/commit/2c82a30b16fae9b5568e3da2e578f2832a7175d1) test(rag): assert persisted index is loaded (mtime unchanged) - [`a186b62`](https://github.com/GH05TCREW/pentestagent/commit/a186b62e8af6f10bbcc5083163487aee3cd6dfa4) chore: log and notify on critical exceptions (mcp manager, tui target persistence/display) - [`14ec8af`](https://github.com/GH05TCREW/pentestagent/commit/14ec8af4a486e35ea48c805d9276b1869d174e21) chore: log notifier failures in RAG; notify on MCP atexit failure; add TUI notification tests - [`63233dc`](https://github.com/GH05TCREW/pentestagent/commit/63233dc392ad5f103631f12a4a51df16dfac21c1) refactor: use workspaces.validation utilities for target extraction and scope checks - [`bdb0b1d`](https://github.com/GH05TCREW/pentestagent/commit/bdb0b1d90829d5ed23740327620947cc1e91a720) docs: clarify gather_candidate_targets is shallow, not recursive - [`cd1eaed`](https://github.com/GH05TCREW/pentestagent/commit/cd1eaedf75f128de5903cd722489bf4487c5edcc) chore: remove unused TargetManager import from base_agent.py ### 📊 Changes **33 files changed** (+2650 additions, -1345 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+12 -0) ➕ `dupe-workspace.tar.gz` (+0 -0) ➕ `expimp-workspace.tar.gz` (+0 -0) 📝 `pentestagent/agents/base_agent.py` (+101 -51) 📝 `pentestagent/agents/crew/orchestrator.py` (+37 -2) 📝 `pentestagent/agents/crew/worker_pool.py` (+40 -6) 📝 `pentestagent/agents/pa_agent/pa_agent.py` (+10 -2) 📝 `pentestagent/interface/main.py` (+256 -0) ➕ `pentestagent/interface/notifier.py` (+40 -0) 📝 `pentestagent/interface/tui.py` (+738 -72) 📝 `pentestagent/knowledge/indexer.py` (+6 -0) 📝 `pentestagent/knowledge/rag.py` (+110 -3) 📝 `pentestagent/mcp/hexstrike_adapter.py` (+123 -29) 📝 `pentestagent/mcp/manager.py` (+24 -15) 📝 `pentestagent/mcp/metasploit_adapter.py` (+99 -26) 📝 `pentestagent/mcp/transport.py` (+97 -20) 📝 `pentestagent/runtime/docker_runtime.py` (+28 -4) 📝 `pentestagent/runtime/runtime.py` (+61 -22) 📝 `pentestagent/tools/notes/__init__.py` (+21 -11) 📝 `pentestagent/tools/token_tracker.py` (+20 -8) _...and 13 more files_ </details> ### 📄 Description - Introduce command for CLI and TUI with create/activate, list, info, note, clear, export, import, and help actions - Persist workspace state via marker and enriched (targets, operator notes, last_active_at, last_target) - Restore on workspace activation and sync it to UI banner, agent state, and CLI output - Enforce target normalization and ensure always exists in workspace targets - Route loot output to when a workspace is active - Prefer workspace-local knowledge paths for indexing and RAG resolution - Persist RAG indexes per workspace and load existing indexes before re-indexing - Add deterministic workspace export/import utilities (excluding caches) - Integrate workspace handling into TUI slash commands with modal help screen --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-27 13:59:22 -05:00
yindo closed this issue 2026-02-27 13:59:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yindo/pentestagent#19