pwn 0.5.750 → 0.5.752
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.
- checksums.yaml +4 -4
- data/documentation/pwn-ai-Agent.md +62 -5
- data/etc/default_skills/pwn/banner/SKILL.md +3 -1
- data/etc/default_skills/pwn/plugins/repl/SKILL.md +1 -0
- data/lib/pwn/banner.rb +646 -15
- data/lib/pwn/plugins/repl/ai.rb +43 -13
- data/lib/pwn/plugins/repl/ai_console.rb +140 -9
- data/lib/pwn/plugins/repl/ai_console_commands.rb +1 -1
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/banner_spec.rb +548 -2
- data/spec/lib/pwn/plugins/repl/ai_console_commands_spec.rb +2 -0
- data/spec/lib/pwn/plugins/repl/ai_console_spec.rb +404 -16
- data/spec/lib/pwn/plugins/repl_spec.rb +58 -1
- data/third_party/pwn_rdoc.jsonl +28 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f090409a234eeffe46292971f044bd3f6109da51d03e8fae5909d63aa625808
|
|
4
|
+
data.tar.gz: '082fcd50fde34da2c0bea93a7292a4925fd017e2526e07d6fcf8c9b29bb5db8c'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 612c4b3a4d8f8311e231c2bbcceee5cd61280134157adc9f2132beb438ef65bbb698ed949aca56d19412414ed10c8540a1feab8327aaf14abcc71c33c2b23ccf
|
|
7
|
+
data.tar.gz: '09b64fed3ccd1e064a28b4874005e73549c8fbd7d60017dd6c552cce7bd6b45577dfb9202d7aecc54aa13456a2cdc847ef021850d387139bfa064fdc88fbc7d5'
|
|
@@ -21,23 +21,58 @@ and session header, scrollable typed timeline (OPERATOR, TASK, TOOL, RESULT,
|
|
|
21
21
|
ASSISTANT and WARNING), a persistent multiline composer, and an operational
|
|
22
22
|
sidebar at 100 columns or wider. Narrower screens give the timeline the full width.
|
|
23
23
|
At 100 columns × 26 rows or larger, the header may carve out a bordered retro-game
|
|
24
|
-
|
|
24
|
+
colored Unicode-block animation on the left: falling tetrominoes with line clears,
|
|
25
|
+
a connected snake eating food and growing, Pong with small tracking paddles and a
|
|
26
|
+
bouncing ball, or Asteroids with a rotating cyan ship, red thrust, drifting green
|
|
27
|
+
rocks, yellow shots and magenta fragments. Pong's one-cell-high paddles and
|
|
28
|
+
quadrant-block ball move in half-cell steps; doubling the presentation rate does
|
|
29
|
+
not double gameplay speed. Asteroids wraps at the edges and shots break up rocks;
|
|
30
|
+
its seeded autonomous flight is decorative, not player-controlled.
|
|
25
31
|
Its framed width in terminal cells equals the complete header's height in rows;
|
|
26
32
|
the interior canvas is `(header height - 2)` cells on each side. This is a
|
|
27
33
|
cell-square, not a pixel-square—terminal glyph cells are usually taller than wide.
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
The animation pane has no wordmark; its former label row belongs to gameplay.
|
|
35
|
+
The main `pwn-ai` header title and full-screen static banners are unchanged.
|
|
36
|
+
Falling blocks fill the entire interior, including the
|
|
37
|
+
bottom two quadrants. Each logical block occupies one horizontal half-cell from
|
|
38
|
+
spawn through landing and locking. This deliberately replaces independent
|
|
39
|
+
quarter-cell blocks: a terminal cell has only a foreground and background, so
|
|
40
|
+
two piece colors plus empty black cannot be represented faithfully in four
|
|
41
|
+
quadrants. Two horizontal halves always fit that limit, retaining each piece's
|
|
42
|
+
color, holes and silhouette instead of recoloring neighbors when they touch.
|
|
43
|
+
The board remains full-width; only its horizontal logical resolution changes.
|
|
44
|
+
Completed rows intentionally flash white before collapsing; game-over and replay
|
|
45
|
+
resets also use white holds/wipes. Ordinary locking never changes color or shape.
|
|
46
|
+
Colored falling blocks support interiors up to 64 cells; the other artwork retains
|
|
47
|
+
its 16-cell limit. Above the applicable limit, art is centered and padded rather
|
|
48
|
+
than clipped or stretched.
|
|
30
49
|
One `PWN::Banner.mini_names` animation is randomly
|
|
31
50
|
selected for the session and retained across redraws, model changes and resize;
|
|
32
51
|
changing the active session selects again. Frames advance at the banner API's
|
|
33
|
-
`
|
|
52
|
+
`mini_frame_seconds(name:)` cadence (0.05 seconds for Pong/Asteroids, 0.1 for
|
|
53
|
+
blocks/snake) using monotonic time in the existing render loop—no extra animation
|
|
34
54
|
thread, input reader or provider call. This is decoration, not progress or
|
|
35
|
-
telemetry. The
|
|
55
|
+
telemetry. The frame keeps the existing border/title theme roles. Artwork comes
|
|
56
|
+
from `PWN::Banner.mini_cells(branding: false)` with dedicated foreground/background curses pairs,
|
|
57
|
+
not ANSI output or theme overrides. `NO_COLOR` and terminals with too few color
|
|
58
|
+
pairs retain occupied geometry in monochrome (two differently colored occupied
|
|
59
|
+
halves become a full block, not a half-block with its background lost). The `mini_frame` ASCII API
|
|
60
|
+
retains its 60-frame, 0.1-second loops for other callers. Both miniature APIs
|
|
61
|
+
default to their legacy branding; `branding: false` reclaims the label row and
|
|
62
|
+
leaves undersized fallback panes blank. Colored replays contain
|
|
63
|
+
1800 frames (90 seconds for Pong/Asteroids, 180 for blocks/snake), use a local
|
|
64
|
+
per-session seed, and share a bounded six-replay cache. Settings
|
|
36
65
|
wrap in the right-hand region without losing their label colors. A bounded,
|
|
37
66
|
nonrecursive layout pass grows the header and square together. If the terminal
|
|
38
67
|
is narrow/short, or that reduced width would clip any setting, the decoration
|
|
39
68
|
disappears and settings reclaim the full width.
|
|
40
69
|
|
|
70
|
+
Accepted `/model` selections (including reasoning effort), session switches and
|
|
71
|
+
command-driven setting/theme changes repaint on the event loop without another
|
|
72
|
+
keypress. Header wrapping and square geometry follow the current values, even
|
|
73
|
+
when a model string is edited in place. Cancelling model selection leaves the
|
|
74
|
+
configuration unchanged.
|
|
75
|
+
|
|
41
76
|
Timestamped entries (`%Y-%m-%d %H:%M:%S%z`), measured request elapsed
|
|
42
77
|
time, completed-tool/event counts, and the last observed tool provide operational
|
|
43
78
|
context. There are no estimated progress bars. Running
|
|
@@ -92,6 +127,7 @@ changes only default values, not the configuration schema; no migration is neede
|
|
|
92
127
|
| `/` + Enter or `/menu` | Open the slash menu |
|
|
93
128
|
| PgUp/PgDn | Scroll the timeline; new output does not pull a scrolled viewport to the bottom |
|
|
94
129
|
| `/model`, `/sessions resume ID` | Show model settings / change the next request's model or session while idle |
|
|
130
|
+
| `/system-role` | Open the active engine's multiline SYSTEM ROLE CONTENT editor while idle; Ctrl+S saves, Esc cancels |
|
|
95
131
|
| `/steer INSTRUCTION` | Redirect the active request at a safe boundary |
|
|
96
132
|
| `/input TEXT` | Send one line to an ordinary tool stdin prompt; not retained in input recall |
|
|
97
133
|
| Ctrl+C | Cancel the active request cooperatively, or clear an idle draft |
|
|
@@ -104,6 +140,27 @@ save/ignore settings. Multiline input uses Pry's existing line-oriented format.
|
|
|
104
140
|
Search and Up/Down never write history; `/input` tool responses are excluded from
|
|
105
141
|
both persistence and recall. Ctrl+L never deletes history or resets token totals.
|
|
106
142
|
|
|
143
|
+
### System role editor
|
|
144
|
+
|
|
145
|
+
Choose `/system-role` from the root slash menu (or type it and press Enter).
|
|
146
|
+
The **SYSTEM ROLE CONTENT** pane is prefilled with the active engine's exact
|
|
147
|
+
text. Enter/Shift+Enter inserts a newline; arrows move the cursor, Home/End
|
|
148
|
+
move to the beginning/end of the text, Backspace/Delete edit, and Ctrl+U clears.
|
|
149
|
+
**Ctrl+S Save** explicitly accepts the whole text, including an empty value;
|
|
150
|
+
**Esc Cancel** or Ctrl+C discards edits. Ctrl+D exits without saving. The editor
|
|
151
|
+
owns its keys: Ctrl+R, Ctrl+G, Ctrl+O and Ctrl+L do not activate underlying
|
|
152
|
+
history search, swarm, status or clear. The mission buffer and cursor are retained.
|
|
153
|
+
|
|
154
|
+
Save merges only `ai.<active engine>.system_role_content` into the encrypted
|
|
155
|
+
`~/.pwn/pwn.yaml` (or configured vault path), preserving other engines and settings.
|
|
156
|
+
It uses the existing decryptor and settings persistence path, encrypting a private
|
|
157
|
+
temporary merge before replacing the vault. A failure leaves the previous vault
|
|
158
|
+
and live role unchanged and keeps the editor open with **Not saved**; there is
|
|
159
|
+
no silent session-only fallback. On success, the header and next request use
|
|
160
|
+
the new role immediately, and a new session loads it from the vault. Request or
|
|
161
|
+
swarm activity blocks role changes. No schema migration is required. The legacy
|
|
162
|
+
non-curses interface reports that this editor requires an interactive terminal.
|
|
163
|
+
|
|
107
164
|
### Model and reasoning selection
|
|
108
165
|
|
|
109
166
|
`/model` (also `show` or `status`) displays the current selection. Existing
|
|
@@ -12,7 +12,7 @@ metadata:
|
|
|
12
12
|
|
|
13
13
|
# PWN::Banner
|
|
14
14
|
|
|
15
|
-
Static banners and pure, PWN-branded retro ASCII loops: falling_blocks, snake, and
|
|
15
|
+
Static banners and pure, PWN-branded retro ASCII/color loops: falling_blocks, snake, pong, and asteroids. mini_frame returns fresh rows on a borderless canvas; use equal width and height (5..16) for complete square artwork. Dimensions clamp to 0..16 (colored blocks: 0..64). Set branding: false for an unbranded pane with the wordmark row reclaimed for play; tiny panes then stay blank. The caller samples mini_names once per session and advances the explicit frame index every mini_frame_seconds(name:) (0.05 for Pong/Asteroids, 0.1 otherwise). mini_cells replays 1800 seeded gameplay frames (MINI_FRAME_COUNT); mini_frame retains its legacy 60-frame ASCII loop. These are decorative game simulations, not interactive games or telemetry. mini_cells uses local Random.new with seed 73 by default; callers may keep a different integer seed per session. Six immutable replays are cached. Tetrominoes stack and clear; snake pursues food and grows; Pong rallies include imperfect paddle tracking, misses and score pips between serves. Blocks use horizontal half-cells with independent foreground/background colors, filling the pane below PWN (up to 64 cells). Other games retain quadrant pixels; snake stays centered with food/head color priority. White line-clear flashes and game-over/reset wipes are intentional. Pong uses half-cell motion and one-cell-high paddles without speeding up play. Asteroids uses five-pixel cyan arrowheads on a half-cell grid, sparse small white rocks, yellow shots and red thrust; wrapped collisions split real rocks. Static Banner modules autoload only when needed. For more information, see: http://www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
|
|
16
16
|
|
|
17
17
|
## When to use
|
|
18
18
|
|
|
@@ -35,6 +35,8 @@ PWN::Banner.mini_frame(opts)
|
|
|
35
35
|
|
|
36
36
|
- `mini_frame`
|
|
37
37
|
- `mini_names`
|
|
38
|
+
- `mini_frame_seconds`
|
|
39
|
+
- `mini_cells`
|
|
38
40
|
- `get`
|
|
39
41
|
- `welcome`
|
|
40
42
|
- `authors`
|