pentesting 0.100.5 β†’ 0.100.10

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/LICENSE CHANGED
@@ -1,28 +1,28 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 agnusdei1207
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
23
- ---
24
-
25
- Note: This MIT license covers the published `pentesting` npm wrapper (the
26
- launcher in `bin/` and `lib/` plus its install scripts). The Builder runtime
27
- engine that the wrapper downloads and executes is a separate, proprietary
28
- component and is not licensed under these terms.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 agnusdei1207
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ Note: This MIT license covers the published `pentesting` npm wrapper (the
26
+ launcher in `bin/` and `lib/` plus its install scripts). The Builder runtime
27
+ engine that the wrapper downloads and executes is a separate, proprietary
28
+ component and is not licensed under these terms.
package/README.md CHANGED
@@ -1,227 +1,261 @@
1
- # Pentesting πŸ”“
2
-
3
- > **Pentesting** is a local-first Rust coding agent CLI for authorized security work, with audited reverse-shell and PTY session control: catch callbacks, verify upgrades, pivot across sessions, and reclaim them cleanly.
4
-
5
- The runtimeβ€”not the modelβ€”owns routing, tool sandboxing, verification, completion adjudication, and PTY/session lifecycle management. PTYs are first-class runtime objects: upgrade state, resize authority, transcript capture, file-descriptor ownership, and close/revoke/gc reclamation are all tracked explicitly.
6
-
7
- <div align="center">
8
- <img src="https://api.iconify.design/hugeicons:bash.svg" alt="pentesting bash icon" width="120" />
9
- <h1>pentesting</h1>
10
- <p>Security-Focused Agent Runtime</p>
11
-
12
- [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
13
- [![npm](https://img.shields.io/npm/v/pentesting.svg)](https://www.npmjs.com/package/pentesting)
14
- </div>
15
-
16
- ---
17
-
18
- ## βœ… Capabilities
19
-
20
- Agent-loop essentials plus a security-focused runtime layer.
21
-
22
- | Area | What it does |
1
+ # Pentesting πŸ”“
2
+
3
+ <div align="center">
4
+ <img src="https://api.iconify.design/hugeicons:bash.svg" alt="pentesting bash icon" width="120" />
5
+ <h1>pentesting</h1>
6
+ <p>Security-Focused Agent Runtime</p>
7
+
8
+ [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
9
+ [![npm](https://img.shields.io/npm/v/pentesting.svg)](https://www.npmjs.com/package/pentesting)
10
+ </div>
11
+
12
+ ---
13
+
14
+ ## βœ… Capabilities
15
+
16
+ Agent-loop essentials plus a security-focused runtime layer.
17
+
18
+ | Area | What it does |
19
+ | --- | --- |
20
+ | Model-driven loop | Streaming action/observation loop; model Stop ends a turn, while verified artifacts close a mission and the full turn trajectory is persisted with the outcome |
21
+ | Tool guardrails | Read-before-edit enforcement, repeat-call guard, policy-gated file/shell/network |
22
+ | Permissions | Allow / Deny / Confirm, with once/always decisions persisted |
23
+ | Context compaction | Automatic micro-pruning + model-triggered summarization, pre/post hooks |
24
+ | Interrupt & steering | ESC stops the current turn and auto loop; queued input uses revisioned FIFO amend/replace semantics and deterministic PTY Enter ownership |
25
+ | Reverse-shell control plane | Accept and track multiple authorized callbacks, tag/probe sessions, send/observe/run commands, verify PTY upgrades, and keep transcript/ledger/evidence records |
26
+ | PTY session control | One actor owns each socket/PTY/pipe, command queue, transcript, and child lifecycle, with resize gating, FD accounting, and deterministic close/revoke/gc reclamation |
27
+ | Frontier-guided exploration | Persistent lead ledger with explicit dispatch; breadth defaults to one and is hard-capped at four |
28
+ | Subagents | Explicit delegation to built-in specialists, including `crypto`, `rev`, and `pwn`; one selected agent can run up to four tasks concurrently |
29
+ | MCP & skills | Dynamic MCP tool discovery, layered markdown skills |
30
+ | Memory | Ebbinghaus-style decaying notes + hybrid lexical/semantic/graph retrieval |
31
+
32
+ ---
33
+
34
+ Delegation is explicit. One `task` call selects one agent and may run its tasks
35
+ concurrently; separate top-level calls are sequenced. `explore dispatch` instead
36
+ uses `builder` clones with category overlays and waits for the batch. Both paths
37
+ share permissions, budgets, lineage, and evidence checks.
38
+
39
+ ### Core algorithms
40
+
41
+ | Area | Implementation | Time / space |
42
+ | --- | --- | --- |
43
+ | Exploration | Score-ranked BFS/DFS guidance, parent backtracking, global reseeding; append-only leads folded into a `HashMap` | Snapshot/advice `O(R + L log L)` time, `O(L)` working and `O(R)` stored space |
44
+ | Knowledge | BM25 + 768-D cosine search + BFS over adjacency maps/visited sets, fused by RRF; fixed 20-round PageRank at index build | Query `O(M + N(Q + D + log N) + V log V + E)` time and `O(N + V + D)` working space; index storage `O(M + ND + V + E)` |
45
+ | Runtime control | FIFO queues plus semaphore-bounded `join_all` fan-out | `O(T)` scheduling/result state, at most four active children per batch |
46
+
47
+ `R` is lead records, `L` live leads, `M` searchable text, `N` notes, `Q` query
48
+ terms, `D = 768`, and `V/E` graph nodes/links. Memory decay is constant-time per
49
+ note. Kruskal, Prim, and a generic divide-and-conquer engine are not runtime
50
+ components; agents may apply them to a target when useful.
51
+
52
+ ---
53
+
54
+ ## πŸš€ Quick Start
55
+
56
+ Install globally, or run once with a Node package runner:
57
+
58
+ ```bash
59
+ npm install -g pentesting && pentesting # install
60
+ npx pentesting # or run once, no install
61
+ pnpm dlx pentesting
62
+ yarn dlx pentesting
63
+ ```
64
+
65
+ Requires Node.js 18.18+. Use npm/npx/pnpm/yarn; Bun and Deno runners are not supported.
66
+
67
+ ### Docker-only development builds
68
+
69
+ Repository builds and Rust tests must always use the resource-capped Docker
70
+ wrappers. Host Cargo compilation is fail-closed; free disk or RAM does not make
71
+ it an approved path.
72
+
73
+ ```bash
74
+ scripts/dbuild.sh check --workspace --all-targets
75
+ scripts/dbuild.sh test -p builder_domain
76
+ scripts/dverify.sh focused
77
+ scripts/dverify.sh full
78
+ scripts/dbuild-image.sh validation # once per fresh Docker cache
79
+ powershell -NoProfile -ExecutionPolicy Bypass -File scripts/dbuild.ps1 test -p builder_domain # Windows
80
+ powershell -NoProfile -ExecutionPolicy Bypass -File scripts/nverify.ps1 # Windows npm verify
81
+ ```
82
+
83
+ The wrappers cap memory, CPU, PIDs, jobs, test threads, and time; verify storage
84
+ before launch; serialize resource-intensive work; and leave a redacted resource
85
+ report. Automated CI/CD is disabled. Full policy: [Docker-only build safety](https://github.com/agnusdei1207/pentesting/blob/main/docs/BUILD_SAFETY.md).
86
+
87
+ ### 🐳 Run with Docker
88
+
89
+ No local Rust toolchain needed:
90
+
91
+ Published images support `linux/amd64` only. Docker is the recommended runtime
92
+ on Windows and macOS; Apple Silicon Macs run the amd64 image through Docker
93
+ Desktop emulation. Native ARM64 images and binaries are not supported.
94
+
95
+ ```bash
96
+ export OPENAI_API_KEY="sk-..." # provider API key or gateway token
97
+ export OPENAI_BASE_URL="https://api.openai.com/v1"
98
+ export OPENAI_MODEL="gpt-4o"
99
+ export OPENAI_MAX_TOKENS="4096"
100
+
101
+ docker run -it --rm \
102
+ -v "$(pwd):/workspace" \
103
+ -v pentesting-config:/root/.pentesting \
104
+ -w /workspace \
105
+ -e OPENAI_API_KEY \
106
+ -e OPENAI_BASE_URL \
107
+ -e OPENAI_MODEL \
108
+ -e OPENAI_MAX_TOKENS \
109
+ agnusdei1207/pentesting:latest
110
+ ```
111
+
112
+ Provider environment variables are optional for startup. If they are omitted,
113
+ the interactive TUI still launches and lets you configure/login inside the
114
+ persistent `pentesting-config` volume.
115
+
116
+ Or via Docker Compose:
117
+
118
+ ```bash
119
+ PENTESTING_PROJECT_DIR=/path/to/project \
120
+ OPENAI_API_KEY=sk-... \
121
+ OPENAI_BASE_URL=https://api.openai.com/v1 \
122
+ OPENAI_MODEL=gpt-4o \
123
+ OPENAI_MAX_TOKENS=4096 \
124
+ docker compose run --rm pentesting
125
+ ```
126
+
127
+ ### Common commands
128
+
129
+ ```bash
130
+ pentesting # Interactive TUI
131
+ pentesting --prompt "Enumerate the target and summarize next actions."
132
+ pentesting shell-listener --bind 127.0.0.1 --port 4444 # Authorized reverse-shell listener
133
+ pentesting --version
134
+ ```
135
+
136
+ Use `shell-listener` in authorized CTF/lab work to accept callbacks, tag sessions, run sentinel-tracked commands, verify PTY upgrades, and retain transcripts/evidence.
137
+
138
+ Short version: the agent can catch a dumb reverse shell, upgrade it to a verified PTY, pivot to a second callback, and reclaim both sessions cleanly with `close` / `revoke` / `gc`.
139
+
140
+ ### Interactive commands
141
+
142
+ Sessions start with auto mode off. Esc stops both the current turn and autonomous continuation. Queued input is replayed in FIFO order.
143
+
144
+ | Command | Purpose |
23
145
  | --- | --- |
24
- | Model-driven loop | Streaming tool-use loop; the model decides when it's done |
25
- | Tool guardrails | Read-before-edit enforcement, repeat-call guard, policy-gated file/shell/network |
26
- | Permissions | Allow / Deny / Confirm, with once/always decisions persisted |
27
- | Context compaction | Automatic micro-pruning + model-triggered summarization, pre/post hooks |
28
- | Interrupt & steering | ESC to interrupt mid-turn, queue follow-ups while it works, and keep Enter submissions deterministic across PTY redraw/control-response noise |
29
- | Reverse-shell control plane | Accept and track multiple authorized callbacks, tag/probe sessions, send/observe/run commands, verify PTY upgrades, and keep transcript/ledger/evidence records |
30
- | PTY session control | Treat upgraded shells as managed PTY sessions with resize gating, transcript capture, FD accounting, and deterministic close/revoke/gc reclamation |
31
- | Frontier-guided exploration | Persistent, deduplicated lead frontier: the runtime enforces pivots and caps, and recommends breadth-first enumeration vs depth-first exploitation while the model drives |
32
- | Subagents | Broad-clone delegates with category focus overlays; independent deep-specialist leads (crypto/rev/pwn) run in the same parallel batch so the main line keeps moving |
33
- | MCP & skills | Dynamic MCP tool discovery, layered markdown skills |
34
- | Memory | Ebbinghaus-style decaying notes + hybrid lexical/semantic/graph retrieval |
35
-
36
- ---
37
-
38
- ## πŸš€ Quick Start
39
-
40
- Install globally, or run once with a Node package runner:
41
-
42
- ```bash
43
- npm install -g pentesting && pentesting # install
44
- npx pentesting # or run once, no install
45
- pnpm dlx pentesting
46
- yarn dlx pentesting
47
- ```
48
-
49
- Requires Node.js 18.18+. Use npm/npx/pnpm/yarn; Bun and Deno runners are not supported.
50
-
51
- ### 🐳 Run with Docker
52
-
53
- No local Rust toolchain needed:
54
-
55
- ```bash
56
- export OPENAI_API_KEY="sk-..." # provider API key or gateway token
57
- export OPENAI_BASE_URL="https://api.openai.com/v1"
58
- export OPENAI_MODEL="gpt-4o"
59
- export OPENAI_MAX_TOKENS="4096"
60
-
61
- docker run -it --rm \
62
- -v "$(pwd):/workspace" \
63
- -v pentesting-config:/root/.pentesting \
64
- -w /workspace \
65
- -e OPENAI_API_KEY \
66
- -e OPENAI_BASE_URL \
67
- -e OPENAI_MODEL \
68
- -e OPENAI_MAX_TOKENS \
69
- agnusdei1207/pentesting:latest
70
- ```
71
-
72
- Provider environment variables are optional for startup. If they are omitted,
73
- the interactive TUI still launches and lets you configure/login inside the
74
- persistent `pentesting-config` volume.
75
-
76
- Or via Docker Compose:
77
-
78
- ```bash
79
- PENTESTING_PROJECT_DIR=/path/to/project \
80
- OPENAI_API_KEY=sk-... \
81
- OPENAI_BASE_URL=https://api.openai.com/v1 \
82
- OPENAI_MODEL=gpt-4o \
83
- OPENAI_MAX_TOKENS=4096 \
84
- docker compose run --rm pentesting
85
- ```
86
-
87
- ### Common commands
88
-
89
- ```bash
90
- pentesting # Interactive TUI
91
- pentesting --prompt "Enumerate the target and summarize next actions."
92
- pentesting shell-listener --bind 127.0.0.1 --port 4444 # Authorized reverse-shell listener
93
- pentesting --version
94
- ```
95
-
96
- Use `shell-listener` in authorized CTF/lab work to accept callbacks, tag sessions, run sentinel-tracked commands, verify PTY upgrades, and retain transcripts/evidence.
97
-
98
- Short version: the agent can catch a dumb reverse shell, upgrade it to a verified PTY, pivot to a second callback, and reclaim both sessions cleanly with `close` / `revoke` / `gc`.
99
-
100
- Inside a session, `/help` lists every command and `/update` pulls the latest release for supported native targets.
101
-
146
+ | `/help` | List every command |
147
+ | `/model [query]` | Choose a provider/model or custom endpoint |
148
+ | `/goal <objective>` Β· `/auto` | Record a goal, then toggle autonomous continuation; Esc stops it |
149
+ | `/status` Β· `/usage` | Inspect run state, gates, budgets, tokens, and requests |
150
+ | `/context` Β· `/memory` | Inspect context-budget snapshots and stored memories |
151
+ | `/agent` Β· `/builder` Β· `/planner` Β· `/researcher` | Select the active agent |
152
+ | `/new` Β· `/retry` Β· `/compact` | Start fresh, retry the last turn, or compact context |
153
+ | `/config` Β· `/tools` Β· `/skill` | Configure the runtime and inspect capabilities |
154
+ | `/workflow report` | Export the active run as Markdown |
155
+ | `/update` Β· `/exit` | Update the native release or quit |
156
+
157
+ On native Windows Git Bash, the repository smoke path builds the capped Docker
158
+ image and then opens this interactive TUI without WSL:
159
+
160
+ ```bash
161
+ npm run check
162
+ ```
163
+
102
164
  ### πŸ”Œ Reverse-shell & PTY sessions
103
-
104
- Catch and manage authorized shell callbacks: one listener, many targets, audited cleanup.
105
-
106
- ```bash
107
- pentesting shell-listener --port 4444 # 1. Catch callbacks (tracks many at once)
108
- pentesting shell-session list # 2. See every live session + FD ownership
109
- pentesting shell-session run -- id # 3. Run sentinel-bounded commands, capture output
110
- pentesting shell-session pty-upgrade # 4. Inject the PTY helper; `upgrade` then verifies it
111
- pentesting shell-session revoke --session 1 # 5. Hard-close: reclaim FDs + archive evidence
112
- ```
113
-
114
- - **Track** β€” each callback is accepted, numbered, and tagged; `list` / `info` / `fdstat` / `lifecycle` show live state, byte counts, and FD ownership.
115
- - **Drive** β€” `run` wraps commands in a sentinel to capture exactly their output; `send` / `raw` / `signal` / `resize` give interactive control.
116
- - **Upgrade** β€” `pty-upgrade` sends the built-in helper and `upgrade` verifies a real PTY before remote resize is allowed; the agent must pick the method with `--technique` (`python3`, `python`, `python2`, `script`, `expect` β€” no default) after reconning what the target actually has, or send a fully custom command instead.
117
- - **Record** β€” per-session raw log, full-duplex transcript, command ledger, replay, and evidence manifest β€” with secret redaction for registered values.
118
- - **Reclaim** β€” `close` (graceful) and `revoke` (hard) release file descriptors immediately and archive the session; `gc` prunes closed sessions. Reclamation is tracked end-to-end, so FDs never leak.
119
-
120
- ---
121
-
122
- ## βš™οΈ Configuration
123
-
124
- Pentesting uses local storage by default. For normal use, configure only the model endpoint:
125
-
126
- ### Example `.env` / shell setup
127
-
128
- ```bash
129
- # OpenAI-compatible provider or gateway
130
- export OPENAI_API_KEY="sk-..."
131
- export OPENAI_BASE_URL="https://api.openai.com/v1"
132
- export OPENAI_MODEL="gpt-4o"
133
- export OPENAI_MAX_TOKENS="4096"
134
-
135
- # Runtime overrides (optional)
136
- export PENTESTING_CONFIG="$HOME/.config/pentesting" # move the global config dir
137
- export PENTESTING_SKIP_DOWNLOAD=1 # skip postinstall binary download (CI)
138
- ```
139
-
140
- The TUI pre-fills output max tokens from known model names/provider metadata. `OPENAI_MAX_TOKENS` and the TUI field are explicit overrides for custom/self-hosted models.
141
-
165
+
166
+ Catch and manage authorized shell callbacks: one listener, many targets, audited cleanup.
167
+
168
+ ```bash
169
+ pentesting shell-listener --port 4444 # 1. Catch callbacks (tracks many at once)
170
+ pentesting shell-session list # 2. See every live session + FD ownership
171
+ pentesting shell-session run -- id # 3. Run sentinel-bounded commands, capture output
172
+ pentesting shell-session upgrade --technique auto # 4. Recon, select, retry, and verify a real PTY
173
+ pentesting shell-session revoke --session 1 # 5. Hard-close: reclaim FDs + archive evidence
174
+ ```
175
+
176
+ - **Track** β€” each callback is accepted, numbered, and tagged; one session actor exclusively owns its live descriptors, transcript, and child lifecycle. `list` / `info` / `fdstat` / `lifecycle` show state and byte counts without cloned reader/writer descriptors.
177
+ - **Drive** β€” `run` wraps commands in a sentinel to capture exactly their output; `send` / `raw` / `signal` / `resize` give interactive control.
178
+ - **Upgrade** β€” `upgrade --technique auto` explicitly runs a bounded `recon β†’ select β†’ helper β†’ probe` controller, choosing an allowlisted shell and retrying only evidence-backed failures across `python3`, `python`, `python2`, `script`, and `expect`. Omission is still rejected: use a concrete technique for one exact CLI attempt; unusual custom `text` commands are available through the `session_control`/JSONL API. CLI `pty-upgrade` sends one concrete catalog helper and never starts adaptive fallback.
179
+ - **Record** β€” per-session raw log, full-duplex transcript, command ledger, replay, and evidence manifest β€” with secret redaction for registered values.
180
+ - **Reclaim** β€” `close` (graceful) and `revoke` (hard) release file descriptors immediately and archive the session; `gc` prunes closed sessions. Reclamation is tracked end-to-end, so FDs never leak.
181
+ - **Guard** β€” the JSONL control plane is a workspace-internal Unix socket only (absolute paths, symlink escapes, and non-socket files are rejected). Every request carries a protocol version and a correlating `request_id`, is bounded to 1 MiB in / 4 MiB out, and `timeout_ms` is capped at 5 minutes and rejected before any bytes reach the session. A small fixed worker pool multiplexes the socket so a long adaptive `upgrade` never blocks `health` / `observe` / `close`, and injected secrets are redacted from responses and sensitive audit records. `probe` / recon fields are the target's own self-report, not a security attestation.
182
+
183
+ ---
184
+
185
+ ## βš™οΈ Configuration
186
+
187
+ Pentesting uses local storage by default. For normal use, configure only the model endpoint:
188
+
189
+ ### Example `.env` / shell setup
190
+
191
+ ```bash
192
+ # OpenAI-compatible provider or gateway
193
+ export OPENAI_API_KEY="sk-..."
194
+ export OPENAI_BASE_URL="https://api.openai.com/v1"
195
+ export OPENAI_MODEL="gpt-4o"
196
+ export OPENAI_MAX_TOKENS="4096"
197
+
198
+ # Runtime overrides (optional)
199
+ export PENTESTING_CONFIG="$HOME/.config/pentesting" # move the global config dir
200
+ export PENTESTING_SKIP_DOWNLOAD=1 # skip postinstall binary download (CI)
201
+ ```
202
+
203
+ The TUI pre-fills output max tokens from known model names/provider metadata. `OPENAI_MAX_TOKENS` and the TUI field are explicit overrides for custom/self-hosted models.
204
+
142
205
  ### Frontier-guided CTF exploration
143
206
 
144
- The global frontier engine default stays off, but CTF-shaped engagement config
145
- auto-applies the CTF runtime profile: `ctf-competition` autonomy, runtime
146
- exploration, autonomous continuation, and a completion gate that requires
147
- verified `flag_check` evidence. A ready-to-copy profile lives at
148
- `docs/config/ctf.toml`:
149
-
150
- ```toml
151
- [engagement]
152
- kind = "ctf"
153
- flag_format = "flag\\{[^}]+\\}"
154
- require_flag_evidence = true
155
-
156
- [exploration]
157
- enabled = true
158
- max_frontier_nodes = 256
159
- max_breadth = 4
160
- ```
161
-
162
- With the profile active, the runtime stores `explore` leads as
163
- `EvidenceKind::Lead` events, carries prior-run frontier/findings/verified flags
164
- forward, deduplicates leads, auto-pivots dead probes, enforces graph/cap limits,
165
- and injects a breadth/depth recommendation into mission control. The model still
166
- drives the work through `explore` and `task`; heavy independent leads such as
167
- crypto/rev/pwn ride the same parallel delegation batch rather than a detached
168
- background scheduler. Operators can inspect the current graph with `/frontier`,
169
- and the status row shows compact frontier progress during dispatch.
170
-
171
- Malformed tool-call output is fail-loud: unparsed tool-shaped markup is retried
172
- instead of accepted as a final answer, the TUI suppresses raw control markup, and
173
- large no-newline streams are bounded so rendering cannot hang behind usage-only
174
- progress ticks.
175
-
176
- The shipped contract is covered by
177
- `cargo test -p builder_app orch_spec::exploration_e2e`: it verifies the
178
- flag-off regression path plus breadth enumeration, depth descent, sibling
179
- breadth, dead-probe pivot, global reseed, seed digest, broad-clone overlay, and
180
- child result promotion.
181
-
182
- With Docker, mount both your project and the persistent runtime config volume, then pass the same variables through with `-e`:
183
-
184
- ```bash
185
- docker run -it --rm \
186
- -v "$(pwd):/workspace" \
187
- -v pentesting-config:/root/.pentesting \
188
- -w /workspace \
189
- -e OPENAI_API_KEY \
190
- -e OPENAI_BASE_URL \
191
- -e OPENAI_MODEL \
192
- -e OPENAI_MAX_TOKENS \
193
- agnusdei1207/pentesting:latest
194
- ```
195
-
196
- Those variables only pre-fill provider settings. Leaving them unset must not
197
- block the container from launching the TUI; configure the provider interactively
198
- inside the container instead.
199
-
200
- > **Note:** The command you run is always **`pentesting`**. The internal engine is **`builder`** β€” `pentesting` downloads and runs it under the hood; the engine name never surfaces in normal use.
201
-
202
- ---
203
-
204
- ## πŸ“– Documentation
205
-
206
- * [`ARCHITECTURE.md`](ARCHITECTURE.md) β€” Runtime flow, agent team, memory model, crate map, tool surface, and supported targets.
207
- * Internal layout: service traits are split under `builder_app/src/services/*`; OpenAI request conversion is isolated under `dto/openai/request/*`.
208
- * [Public site](https://agnusdei1207.github.io/pentesting-public/) β€” Landing page and public runtime entry surface.
209
- * [`compose.yaml`](https://github.com/agnusdei1207/pentesting-public) β€” Docker Compose facade for pentesting sessions.
210
-
211
- ---
212
-
213
- ## 🎹 From the Developer
214
-
215
- <div align="center">
216
- <img src="https://github.com/user-attachments/assets/abe73474-f27b-4536-b358-fedef1e461f0" alt="Chopin Ballade No.4" width="600" />
217
- </div>
218
-
219
- <br/>
220
-
221
- > "I believe playing the piano is also a form of orchestration."
222
- >
223
- > The harmony of polyphony β€” multiple voices β€” and homophony β€” a single melodic line.
224
- >
225
- > Each voice sings its most beautiful song from its own place, yet when combined, they create one grand, beautiful melody. I believe this structure is no different from AI agents.
226
- >
227
- > β€” *agnusdei1207*
207
+ `explore` is always available. Use `/config` to set the engagement kind, flag
208
+ verification, and frontier limits; settings persist in the installed runtime's
209
+ user config. Breadth defaults to one and is capped at four. Leads are persistent,
210
+ deduplicated, and dispatched explicitly.
211
+
212
+ With Docker, mount both your project and the persistent runtime config volume, then pass the same variables through with `-e`:
213
+
214
+ ```bash
215
+ docker run -it --rm \
216
+ -v "$(pwd):/workspace" \
217
+ -v pentesting-config:/root/.pentesting \
218
+ -w /workspace \
219
+ -e OPENAI_API_KEY \
220
+ -e OPENAI_BASE_URL \
221
+ -e OPENAI_MODEL \
222
+ -e OPENAI_MAX_TOKENS \
223
+ agnusdei1207/pentesting:latest
224
+ ```
225
+
226
+ Those variables only pre-fill provider settings. Leaving them unset must not
227
+ block the container from launching the TUI; configure the provider interactively
228
+ inside the container instead.
229
+
230
+ > **Note:** The command you run is always **`pentesting`**. The internal engine is **`builder`** β€” `pentesting` downloads and runs it under the hood; the engine name never surfaces in normal use.
231
+
232
+ ---
233
+
234
+ ## πŸ“– Documentation
235
+
236
+ - [`ARCHITECTURE.md`](ARCHITECTURE.md) β€” Runtime flow, agent team, memory model, crate map, tool surface, and supported targets.
237
+ - [Documentation map](https://github.com/agnusdei1207/pentesting/blob/main/docs/README.md) β€” Current authoritative documents versus historical plans and research notes.
238
+ - [Integrated runtime design](https://github.com/agnusdei1207/pentesting/blob/main/docs/BUILDER-CONSOLIDATED-DEEP-DIVE.md) β€” Top-down explanation from the one-loop model to prompt, subagents, persistence, and PTY ownership.
239
+ - [Minimal Core implementation](https://github.com/agnusdei1207/pentesting/blob/main/docs/plans/2026/07/10/minimal-core/README.md) β€” Implemented simplification record for the single turn/tool/security surface.
240
+ - [Next-generation clean-break convergence](https://github.com/agnusdei1207/pentesting/blob/main/docs/plans/2026/07/10/next-generation-convergence/README.md) β€” Canonical contracts, deleted compatibility paths, and the phase-by-phase migration boundary.
241
+ - Internal layout: service traits are split under `builder_app/src/services/*`; OpenAI request conversion is isolated under `dto/openai/request/*`.
242
+ - [Public site](https://agnusdei1207.github.io/pentesting-public/) β€” Landing page and public runtime entry surface.
243
+ - [`compose.yaml`](https://github.com/agnusdei1207/pentesting-public) β€” Docker Compose facade for pentesting sessions.
244
+
245
+ ---
246
+
247
+ ## 🎹 From the Developer
248
+
249
+ <div align="center">
250
+ <img src="https://github.com/user-attachments/assets/abe73474-f27b-4536-b358-fedef1e461f0" alt="Chopin Ballade No.4" width="600" />
251
+ </div>
252
+
253
+ <br/>
254
+
255
+ > "I believe playing the piano is also a form of orchestration."
256
+ >
257
+ > The harmony of polyphony β€” multiple voices β€” and homophony β€” a single melodic line.
258
+ >
259
+ > Each voice sings its most beautiful song from its own place, yet when combined, they create one grand, beautiful melody. I believe this structure is no different from AI agents.
260
+ >
261
+ > β€” *agnusdei1207*
@@ -1,36 +1,36 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawnSync } from "node:child_process";
4
-
5
- import {
6
- pentestingEnvironment,
7
- resolveBuilderBinary,
8
- translateBuilderInvocation,
9
- } from "../lib/runtime.mjs";
10
-
11
- async function main() {
12
- const invocation = translateBuilderInvocation(process.argv.slice(2));
13
- for (const warning of invocation.warnings) {
14
- console.warn(`[pentesting] ${warning}`);
15
- }
16
-
17
- const builderBinary = await resolveBuilderBinary({ downloadIfMissing: true });
18
- const result = spawnSync(builderBinary, invocation.builderArgs, {
19
- stdio: "inherit",
20
- env: pentestingEnvironment(process.env),
21
- });
22
-
23
- if (result.error) {
24
- console.error(
25
- `pentesting could not start Builder (${result.error.message}). Set PENTESTING_BIN or reinstall the pentesting package.`,
26
- );
27
- process.exit(127);
28
- }
29
-
30
- process.exit(result.status ?? 1);
31
- }
32
-
33
- main().catch((error) => {
34
- console.error(`[pentesting] ${error instanceof Error ? error.message : String(error)}`);
35
- process.exit(1);
36
- });
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from "node:child_process";
4
+
5
+ import {
6
+ pentestingEnvironment,
7
+ resolveBuilderBinary,
8
+ translateBuilderInvocation,
9
+ } from "../lib/runtime.mjs";
10
+
11
+ async function main() {
12
+ const invocation = translateBuilderInvocation(process.argv.slice(2));
13
+ for (const warning of invocation.warnings) {
14
+ console.warn(`[pentesting] ${warning}`);
15
+ }
16
+
17
+ const builderBinary = await resolveBuilderBinary({ downloadIfMissing: true });
18
+ const result = spawnSync(builderBinary, invocation.builderArgs, {
19
+ stdio: "inherit",
20
+ env: pentestingEnvironment(process.env),
21
+ });
22
+
23
+ if (result.error) {
24
+ console.error(
25
+ `pentesting could not start Builder (${result.error.message}). Set PENTESTING_BIN or reinstall the pentesting package.`,
26
+ );
27
+ process.exit(127);
28
+ }
29
+
30
+ process.exit(result.status ?? 1);
31
+ }
32
+
33
+ main().catch((error) => {
34
+ console.error(`[pentesting] ${error instanceof Error ? error.message : String(error)}`);
35
+ process.exit(1);
36
+ });