pentesting 0.101.5 โ†’ 0.101.6

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.
Files changed (3) hide show
  1. package/ARCHITECTURE.md +88 -64
  2. package/README.md +55 -54
  3. package/package.json +2 -2
package/ARCHITECTURE.md CHANGED
@@ -235,7 +235,7 @@ tool reachability. Delegated subagent contracts stay intact. Defined in
235
235
  | --- | --- |
236
236
  | `general-agent` | Broad autonomous local orchestration for mixed tasks |
237
237
  | `local-builder` | Hands-on implementation with fresh evidence retrieval |
238
- | `ctf-competition` | Competition/lab workflow; the profile references `ctf-competition` and `pentesting-methodology`, while built-in `write-report` remains explicitly selectable |
238
+ | `ctf-competition` | Competition/lab workflow; the profile references `ctf-competition` and `pentesting-methodology`, while built-in `write-report` remains explicitly selectable |
239
239
  | `enterprise-review` | Strict, review-heavy profile with read-only dynamic scope |
240
240
 
241
241
  ## Engagement Metadata
@@ -383,8 +383,8 @@ trusted verifier with explicit provenance is the only mission-promotion path;
383
383
 
384
384
  ## Diagnostic UI boundary
385
385
 
386
- The default TUI renders the response stream and deterministic input queue. It
387
- does not maintain a second workflow engine. `/status` consumes one immutable
386
+ The default TUI renders the response stream and deterministic input queue. It
387
+ does not maintain a second workflow engine. `/status` consumes one immutable
388
388
  `RunStatusProjection`; `/workflow report` is the explicit offline export. The
389
389
  former bare `/workflow` alias has been removed. For an active run the projection
390
390
  adds exactly one optional canonical Lead-ledger read and immediately reduces it
@@ -396,39 +396,63 @@ usage without an evidence read. Recorded `TurnExit` and typed `MissionState` are
396
396
  shown separately so model Stop or run completion cannot appear as verified
397
397
  mission completion. The live status row deliberately remains limited to
398
398
  actionable progress/wait state: there is no frontier parsing, background refresh,
399
- write, dispatch shortcut, or hidden chrome state.
400
-
401
- Completed type-ahead inputs carry an explicit active-turn behavior. Safe
402
- inspection commands (`/info`, `/usage`, `/context`, `/memory`, `/status`,
403
- `/help`, `/skill`, and `/tools`) are atomically extracted and
404
- rendered without cancelling the response stream. State-changing and modal
405
- commands, including `/log` and `/model`, remain in FIFO order until the next safe turn
406
- boundary. `/new`, `/retry`, `/exit`, and explicit `/replace` retain interrupt
407
- semantics and take priority over active-turn query extraction. The input buffer
408
- rebuilds replay events after extraction so queued messages and the current draft
409
- preserve their original order and cursor. Esc cancellation preserves submitted
410
- queued input and starts its FIFO replay after stream cleanup; Ctrl+C remains the
411
- explicit clear-buffer interrupt. A conversation reset consumes `/new` but retains
412
- its FIFO tail for the new conversation. Modal prompts isolate that pre-existing
413
- tail from widget input and expose it again only after modal ownership ends.
414
- Commands that eventually open a modal keep the outer interrupt listener during
415
- their asynchronous prefetch and persistence phases. Before the widget starts,
416
- the terminal session requests a reader pause and waits for its acknowledgement;
417
- the reader resumes after modal ownership ends. Type-ahead is therefore buffered
418
- FIFO instead of racing or leaking into a later model, agent, or configuration
419
- field. Service-layer approval, secret, selection, and follow-up prompts acquire
420
- the same lifetime-bound modal handoff through the prompt-entry hook, and
399
+ write, dispatch shortcut, or hidden chrome state.
400
+
401
+ Completed type-ahead inputs carry an explicit active-turn behavior. Safe
402
+ inspection commands (`/info`, `/usage`, `/context`, `/memory`, `/status`,
403
+ `/help`, `/skill`, and `/tools`) are atomically extracted and
404
+ rendered without cancelling the response stream. State-changing and modal
405
+ commands, including `/log` and `/model`, remain in FIFO order until the next safe turn
406
+ boundary. `/new`, `/retry`, `/exit`, and explicit `/replace` retain interrupt
407
+ semantics and take priority over active-turn query extraction. The input buffer
408
+ rebuilds replay events after extraction so queued messages and the current draft
409
+ preserve their original order and cursor. Esc cancellation preserves submitted
410
+ queued input and starts its FIFO replay after stream cleanup; Ctrl+C remains the
411
+ explicit clear-buffer interrupt. A conversation reset consumes `/new` but retains
412
+ its FIFO tail for the new conversation. Modal prompts isolate that pre-existing
413
+ tail from widget input and expose it again only after modal ownership ends.
414
+ Commands that eventually open a modal keep the outer interrupt listener during
415
+ their asynchronous prefetch and persistence phases. Before the widget starts,
416
+ the terminal session requests a reader pause and waits for its acknowledgement;
417
+ the reader resumes after modal ownership ends. Type-ahead is therefore buffered
418
+ FIFO instead of racing or leaking into a later model, agent, or configuration
419
+ field. Service-layer approval, secret, selection, and follow-up prompts acquire
420
+ the same lifetime-bound modal handoff through the prompt-entry hook, and
421
421
  concurrent service prompts are serialized so two widgets never read stdin at
422
422
  once.
423
423
 
424
- Typing `/` opens the complete registered command catalog. Search includes
425
- canonical names and aliases; Up/Down changes the selection, and Enter inserts
426
- the selected template into the editor for partial matches and commands that
427
- require arguments. A later Enter submits that populated input; a fully typed
428
- exact command that needs no expansion submits normally. Palette descriptions
429
- expose `[now]`, `[queued]`, and `[interrupt]` so the queue behavior is visible
430
- before submission. The selected entry is rendered as the first hint row so it
431
- remains visible when the terminal can show only a constrained input viewport.
424
+ `/resume` is the canonical saved-session selector; `/conversation` and
425
+ `/conversations` remain compatibility aliases. The selector includes every
426
+ conversation with persisted context, even when it has no title. Resuming a
427
+ different conversation clears the process-local goal and forces auto mode off,
428
+ so state from the previous session cannot drive the resumed one accidentally.
429
+ `/new` applies the same process-local goal/auto reset at the fresh-session
430
+ boundary while preserving the queued FIFO tail. Persisted titles are reduced to
431
+ one bounded control-free selector row before that row is bound to its typed
432
+ conversation ID. Local upserts stamp the activity time used by `/resume`,
433
+ `--continue`, and `conversation resume <id>` ordering. The command remains
434
+ FIFO-queued while a turn is active because its selector is a modal terminal
435
+ owner.
436
+
437
+ Normal `/exit` and empty-prompt Ctrl+D termination are serialized through the
438
+ output actor. It rejects new writes, completes its current render batch, resets
439
+ styles and terminal modes, restores the full scroll region, clears the tracked
440
+ multiline footer, shows the cursor, disables raw mode, and drops the terminal
441
+ surface before printing one plain saved-session message. The shutdown
442
+ acknowledgement and actor join occur after that message, so no detached redraw
443
+ can overwrite terminal cleanup. The generic `restore_terminal` function is a
444
+ best-effort fallback for failures outside this coordinated path. An empty
445
+ session reports that no resumable messages were created instead of promising a
446
+ session that the repository intentionally excludes from the resume list.
447
+
448
+ Typing `/` opens the complete registered command catalog. Search includes
449
+ canonical names and aliases; Up/Down changes the selection, and Enter inserts
450
+ the selected template into the editor for partial matches and commands that
451
+ require arguments. A later Enter submits that populated input; a fully typed
452
+ exact command that needs no expansion submits normally. Palette descriptions
453
+ expose `[now]`, `[queued]`, and `[interrupt]` so the queue behavior is visible
454
+ before submission. The selected entry is rendered as the first hint row so it
455
+ remains visible when the terminal can show only a constrained input viewport.
432
456
 
433
457
  ## Distribution โ€” single source, two surfaces
434
458
 
@@ -536,23 +560,23 @@ Inside an interactive session, these commands inspect and drive runtime state
536
560
  /memory Show stored conversation memories for the current conversation
537
561
  /tools List the currently available tools and schemas
538
562
  /agent Switch the active agent
539
- /conversation Browse conversations for the active workspace
563
+ /resume Resume a saved session for the active workspace
540
564
  /goal <task> Set the active goal without enabling autonomous mode
541
565
  /auto Toggle autonomous mode for the current goal (default: off; Esc stops it)
542
566
  /update Download and apply the latest public release asset for supported native targets
543
567
  /help Show all commands
544
- /exit Quit
568
+ /exit Save the session, restore the terminal, and quit
545
569
  ```
546
570
 
547
- ## Security Domain Skills
548
-
549
- Six built-in skills ship with the runtime: `create-skill`, `execute-plan`,
550
- `github-pr-description`, `ctf-competition`, `pentesting-methodology`, and
551
- `write-report`. For authorized security work, `ctf-competition` covers callback
552
- delivery agility, reliable payload/tool delivery, and interpreter-aware
553
- execution; `pentesting-methodology` maps assessments to standard frameworks;
554
- and `write-report` turns preserved evidence into reproducible CTF and
555
- penetration-test writeups.
571
+ ## Security Domain Skills
572
+
573
+ Six built-in skills ship with the runtime: `create-skill`, `execute-plan`,
574
+ `github-pr-description`, `ctf-competition`, `pentesting-methodology`, and
575
+ `write-report`. For authorized security work, `ctf-competition` covers callback
576
+ delivery agility, reliable payload/tool delivery, and interpreter-aware
577
+ execution; `pentesting-methodology` maps assessments to standard frameworks;
578
+ and `write-report` turns preserved evidence into reproducible CTF and
579
+ penetration-test writeups.
556
580
 
557
581
  - **PTES** (Penetration Testing Execution Standard)
558
582
  - **MITRE ATT&CK** tactics and techniques
@@ -562,26 +586,26 @@ penetration-test writeups.
562
586
 
563
587
  ### Shell listener for authorized labs
564
588
 
565
- ```bash
566
- pentesting shell-listener --bind 127.0.0.1 --port 4444 --extra-ports 8443,9001
567
- ```
568
-
569
- Up to 32 unique primary/additional ports bind concurrently and share one monotonic
570
- session-id sequence; an unavailable port is skipped as long as at least one
571
- requested port binds. `shell-session --json health` reports the active bound
572
- endpoints so callback selection can be evidence-based. The remote-bind safety
573
- gate remains unchanged.
574
-
575
- Manages multiple accepted TCP sessions with per-session routing, buffered
576
- output, raw byte logging, full-duplex transcripts, command history, attach /
577
- detach events, replay, and evidence manifests. `probe` records the remote's
578
- current shell interpreter in `shell`, detected only from `/proc/$$/exe` and
579
- `$0`, so a BusyBox `sh` target is not confused with an installed Bash. This
580
- interpreter axis is separate from TTY/`pty_state`; it is stored in session state,
581
- the `shell-session --json` projection, session snapshots, and evidence manifests,
582
- and is restored after a listener restart. `pty-upgrade` sends one concrete
583
- helper only; `upgrade` runs a helper plus a probe and records `pty_state` as
584
- verified or failed. Explicit `technique=auto` adds a bounded listener-side state
589
+ ```bash
590
+ pentesting shell-listener --bind 127.0.0.1 --port 4444 --extra-ports 8443,9001
591
+ ```
592
+
593
+ Up to 32 unique primary/additional ports bind concurrently and share one monotonic
594
+ session-id sequence; an unavailable port is skipped as long as at least one
595
+ requested port binds. `shell-session --json health` reports the active bound
596
+ endpoints so callback selection can be evidence-based. The remote-bind safety
597
+ gate remains unchanged.
598
+
599
+ Manages multiple accepted TCP sessions with per-session routing, buffered
600
+ output, raw byte logging, full-duplex transcripts, command history, attach /
601
+ detach events, replay, and evidence manifests. `probe` records the remote's
602
+ current shell interpreter in `shell`, detected only from `/proc/$$/exe` and
603
+ `$0`, so a BusyBox `sh` target is not confused with an installed Bash. This
604
+ interpreter axis is separate from TTY/`pty_state`; it is stored in session state,
605
+ the `shell-session --json` projection, session snapshots, and evidence manifests,
606
+ and is restored after a listener restart. `pty-upgrade` sends one concrete
607
+ helper only; `upgrade` runs a helper plus a probe and records `pty_state` as
608
+ verified or failed. Explicit `technique=auto` adds a bounded listener-side state
585
609
  machine: framed capability recon, allowlisted `bash`/`sh` selection, ordered
586
610
  helper attempts (`python3`, `python`, `python2`, `script`, `expect`), generic
587
611
  prompt observation, and phase-local probe verification. Only unavailable,
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Pentesting ๐Ÿ”“
2
2
 
3
- <div align="center">
4
- <img src="https://api.iconify.design/hugeicons:bash.svg" alt="pentesting bash icon" width="120" />
5
- <h1>A High-Efficiency Penetration-Testing Agent</h1>
6
- <p>Designed to achieve strong results with low-cost models. Powered by Rust.</p>
3
+ <div align="center">
4
+ <img src="https://api.iconify.design/hugeicons:bash.svg" alt="pentesting bash icon" width="120" />
5
+ <h1>A High-Efficiency Penetration-Testing Agent</h1>
6
+ <p>Designed to achieve strong results with low-cost models. Powered by Rust.</p>
7
7
 
8
8
  [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
9
9
  [![npm](https://img.shields.io/npm/v/pentesting.svg)](https://www.npmjs.com/package/pentesting)
@@ -49,61 +49,62 @@ Provider variables are optional โ€” the TUI launches without them and lets you l
49
49
 
50
50
  ## โœ… Capabilities
51
51
 
52
- | Area | What it does |
53
- | --- | --- |
54
- | Verified agent loop | Streams actions and observations; a model Stop ends only the turn, evidence-backed verification closes the mission, and the full trajectory is persisted |
55
- | Unified tool boundary | Built-in, delegated, and MCP calls share schema validation, provenance, permissions, policy, and resource limits |
56
- | Context economy | Automatic micro-pruning and model-triggered summaries preserve useful context for low-cost models |
57
- | Deterministic steering | Esc stops the current turn and auto loop, while submitted input resumes in FIFO order at safe turn boundaries |
58
- | Reverse-shell & PTY lifecycle | One control plane manages authorized callbacks and local PTY/pipe sessions, from tagging, probing, and verified upgrades to transcripts, evidence, FD accounting, and deterministic reclamation |
59
- | Bounded battlefield | A persistent Lead ledger produces a compact on-demand attention brief and read-only `/status` view; dispatch stays explicit and is capped at four branches |
60
- | Adversarial pathfinding | A localized AlphaGo-inspired minimax technique models an opponent's best defensive move and improves the ability to find viable bypass paths |
61
- | Dynamic fan-out / fan-in | The model sizes each specialist batch to the task, runs up to four delegated branches concurrently, then returns their results to the parent with bounded depth and recorded lineage |
62
- | Extensible skills & tools | Discovers MCP tools dynamically and layers Markdown skills onto the same guarded runtime surface |
63
- | Forgetting-aware memory | Ebbinghaus-style decaying notes combine with lexical, semantic, and graph retrieval |
64
-
65
- ---
66
-
67
- ## ๐Ÿงญ Philosophy
68
-
69
- | Principle | What it means here |
70
- | --- | --- |
71
- | Simplicity is best | Prefer the smallest design that preserves the capability, makes ownership clear, and remains easy to verify |
72
- | If it cannot be measured, it cannot be improved | Instrument outcomes, compare them under repeatable conditions, and let evidence drive the next change |
73
- | The best design blueprint is the human being | Better systems begin with better self-observation: understand how we perceive, decide, learn, and recover, then make those loops observable |
74
- | The agent is the bottleneck | As AI models advance, the agent framework and the surrounding system must evolve with them |
75
-
76
- ### Capability record
77
-
78
- | Date | Result | Test setup | Note |
79
- | --- | --- | --- | --- |
80
- | 2026-04 | Project work began | Initial implementation and baseline work | โ€” |
81
- | 2026-07-15 | ~40% higher pentesting score | Pentesting (MiniMax M3) vs. Claude Code v2.1.210 (Sonnet 5); same prompts, easy-to-hard CTFs, 60 minutes each | Time-bound internal test; both agents continue to evolve |
82
-
83
- ---
84
-
85
- ## โŒจ๏ธ Slash commands
86
-
87
- | Command | Purpose |
88
- | --- | --- |
89
- | `/help` | Show commands |
90
- | `/model [query]` | Switch provider, model, or custom endpoint |
91
- | `/goal <objective>` | Set or clear the active goal |
92
- | `/auto` | Run the active goal automatically; Esc stops it |
52
+ | Area | What it does |
53
+ | --- | --- |
54
+ | Verified agent loop | Streams actions and observations; a model Stop ends only the turn, evidence-backed verification closes the mission, and the full trajectory is persisted |
55
+ | Unified tool boundary | Built-in, delegated, and MCP calls share schema validation, provenance, permissions, policy, and resource limits |
56
+ | Context economy | Automatic micro-pruning and model-triggered summaries preserve useful context for low-cost models |
57
+ | Deterministic steering | Esc stops the current turn and auto loop, while submitted input resumes in FIFO order at safe turn boundaries |
58
+ | Reverse-shell & PTY lifecycle | One control plane manages authorized callbacks and local PTY/pipe sessions, from tagging, probing, and verified upgrades to transcripts, evidence, FD accounting, and deterministic reclamation |
59
+ | Bounded battlefield | A persistent Lead ledger produces a compact on-demand attention brief and read-only `/status` view; dispatch stays explicit and is capped at four branches |
60
+ | Adversarial pathfinding | A localized AlphaGo-inspired minimax technique models an opponent's best defensive move and improves the ability to find viable bypass paths |
61
+ | Dynamic fan-out / fan-in | The model sizes each specialist batch to the task, runs up to four delegated branches concurrently, then returns their results to the parent with bounded depth and recorded lineage |
62
+ | Extensible skills & tools | Discovers MCP tools dynamically and layers Markdown skills onto the same guarded runtime surface |
63
+ | Forgetting-aware memory | Ebbinghaus-style decaying notes combine with lexical, semantic, and graph retrieval |
64
+
65
+ ---
66
+
67
+ ## ๐Ÿงญ Philosophy
68
+
69
+ | Principle | What it means here |
70
+ | --- | --- |
71
+ | Simplicity is best | Prefer the smallest design that preserves the capability, makes ownership clear, and remains easy to verify |
72
+ | If it cannot be measured, it cannot be improved | Instrument outcomes, compare them under repeatable conditions, and let evidence drive the next change |
73
+ | The best design blueprint is the human being | Better systems begin with better self-observation: understand how we perceive, decide, learn, and recover, then make those loops observable |
74
+ | The agent is the bottleneck | As AI models advance, the agent framework and the surrounding system must evolve with them |
75
+
76
+ ### Capability record
77
+
78
+ | Date | Result | Test setup | Note |
79
+ | --- | --- | --- | --- |
80
+ | 2026-04 | Project work began | Initial implementation and baseline work | โ€” |
81
+ | 2026-07-15 | ~40% higher pentesting score | Pentesting (MiniMax M3) vs. Claude Code v2.1.210 (Sonnet 5); same prompts, easy-to-hard CTFs, 60 minutes each | Time-bound internal test; both agents continue to evolve |
82
+
83
+ ---
84
+
85
+ ## โŒจ๏ธ Slash commands
86
+
87
+ | Command | Purpose |
88
+ | --- | --- |
89
+ | `/help` | Show commands |
90
+ | `/model [query]` | Switch provider, model, or custom endpoint |
91
+ | `/goal <objective>` | Set or clear the active goal |
92
+ | `/auto` | Run the active goal automatically; Esc stops it |
93
93
  | `/status` | Show the current run and verified mission status |
94
94
  | `/new` ยท `/retry` | Start a new conversation or retry the last turn |
95
+ | `/resume` | Resume a saved session from the current workspace |
95
96
  | `/config` | Edit runtime configuration |
96
- | `/exit` | Quit |
97
+ | `/exit` | Save the session, restore the terminal, and quit |
97
98
 
98
99
  > The command you run is always **`pentesting`**. The internal engine is **`builder`** โ€” `pentesting` runs it under the hood; the engine name never surfaces in normal use.
99
100
 
100
101
  ---
101
102
 
102
- ## ๐ŸŽน From the Developer
103
-
104
- <div align="center">
105
- <img src="https://github.com/user-attachments/assets/abe73474-f27b-4536-b358-fedef1e461f0" alt="Chopin Ballade No.4" width="600" />
106
- </div>
103
+ ## ๐ŸŽน From the Developer
104
+
105
+ <div align="center">
106
+ <img src="https://github.com/user-attachments/assets/abe73474-f27b-4536-b358-fedef1e461f0" alt="Chopin Ballade No.4" width="600" />
107
+ </div>
107
108
 
108
109
  <br/>
109
110
 
@@ -111,6 +112,6 @@ Provider variables are optional โ€” the TUI launches without them and lets you l
111
112
  >
112
113
  > The harmony of polyphony โ€” multiple voices โ€” and homophony โ€” a single melodic line.
113
114
  >
114
- > 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.
115
- >
116
- > โ€” *agnusdei1207*
115
+ > 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.
116
+ >
117
+ > โ€” *agnusdei1207*
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.101.5",
4
- "builderReleaseTag": "v0.101.5",
3
+ "version": "0.101.6",
4
+ "builderReleaseTag": "v0.101.6",
5
5
  "description": "Penetration testing AI agent powered by Rust, with audited reverse-shell capture, verified PTY upgrades, and evidence-first orchestration.",
6
6
  "license": "MIT",
7
7
  "author": "agnusdei1207",