Skip to content

Commit 3686fb2

Browse files
committed
Dep agent_core
1 parent d2f83d6 commit 3686fb2

9 files changed

Lines changed: 4 additions & 37 deletions

File tree

C2Client/C2Client/assistant_agent/bootstrap.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

C2Client/C2Client/assistant_agent/domain/hooks.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
from typing import Any
44

5-
from ..bootstrap import ensure_agent_core_path
6-
7-
ensure_agent_core_path()
8-
95
from agent_core import DomainHooks
106

117

C2Client/C2Client/assistant_agent/domain/service.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
from pathlib import Path
44
from typing import Any
55

6-
from ..bootstrap import ensure_agent_core_path
76
from ..tools.registry import build_c2_tool_registry
87
from .hooks import C2DomainHooks
98
from .settings import build_c2_agent_settings
109

11-
ensure_agent_core_path()
12-
1310
from agent_core import AgentOrchestrator, AgentTurnResult, PolicyEngine, SessionManager, SessionRepository
1411
from agent_core.llm.openai_provider import OpenAIProvider
1512

C2Client/C2Client/assistant_agent/domain/settings.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
import os
44
from pathlib import Path
55

6-
from ..bootstrap import ensure_agent_core_path
76
from ..storage.paths import default_storage_dir, prompts_dir
87

9-
ensure_agent_core_path()
10-
118
from agent_core import CoreSettings
129
from agent_core.prompt_repository import load_prompt
1310

C2Client/C2Client/assistant_agent/tools/command_tool.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
from dataclasses import dataclass
55
from typing import Any
66

7-
from ..bootstrap import ensure_agent_core_path
87
from .command_builder import build_command_line
98
from .loader import C2ToolSpec
109

11-
ensure_agent_core_path()
12-
1310
from agent_core.execution_context import ExecutionContext
1411
from agent_core.llm.base import LLMToolDefinition
1512
from agent_core.tools import build_tool_definition

C2Client/C2Client/assistant_agent/tools/registry.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
from pathlib import Path
44
from typing import Any
55

6-
from ..bootstrap import ensure_agent_core_path
76
from .command_tool import C2CommandTool
87
from .loader import load_tool_specs
98

10-
ensure_agent_core_path()
11-
129
from agent_core import ToolRegistry
1310

1411

C2Client/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dependencies = [
1818
"pwn==1.0",
1919
"pefile==2024.8.26",
2020
"openai==1.102.0",
21+
"agent-core @ git+https://github.com/maxDcb/agent-core.git@main",
2122
"donut-shellcode @ git+https://github.com/maxDcb/donut.git@master",
2223
"markdown"
2324
]
@@ -29,8 +30,8 @@ test = [
2930
]
3031

3132
[tool.setuptools.packages.find]
32-
where = [".", "vendor/PentestAssistant"]
33-
include = ["C2Client*", "C2Client.TerminalModules.*", "agent_core*"]
33+
where = ["."]
34+
include = ["C2Client*"]
3435

3536
[tool.setuptools.package-data]
3637
C2Client = [
@@ -44,7 +45,6 @@ C2Client = [
4445
"assistant_agent/prompts/memory/*.md",
4546
"assistant_agent/tools/schemas/*.json"
4647
]
47-
agent_core = ["py.typed"]
4848

4949
[project.scripts]
5050
c2client = "C2Client.GUI:main" # Entry point for CLI tool

C2Client/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ requests==2.33.0
88
pwn==1.0
99
pefile==2024.8.26
1010
openai==1.102.0
11+
agent-core @ git+https://github.com/maxDcb/agent-core.git@main
1112
pytest==9.0.3
1213
pytest-qt==4.5.0
1314
git+https://github.com/maxDcb/donut.git@master#egg=donut-shellcode

C2Client/tests/assistant_agent/test_pending_resume_flow.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
from __future__ import annotations
22

33
import json
4-
import sys
5-
from pathlib import Path
6-
7-
VENDOR_ROOT = Path(__file__).resolve().parents[2] / "vendor" / "PentestAssistant"
8-
if str(VENDOR_ROOT) not in sys.path:
9-
sys.path.insert(0, str(VENDOR_ROOT))
104

115
from agent_core.llm.base import LLMCompletionResult, LLMToolCall
126
from agent_core.orchestrator import AgentOrchestrator

0 commit comments

Comments
 (0)