pwn 0.5.750 → 0.5.751

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60cc9203ea107c4633ec8e0a2ec550fbd4c667c3e8557e8dff360306f786843c
4
- data.tar.gz: 637c33f3923027a6d7fbb4fa392e7bee5f56cf2c827fb49bdf5869c64e368c3b
3
+ metadata.gz: 370b89e2788788896b95041a37ef33082bf4e32f753deae04778b27262660d37
4
+ data.tar.gz: 397bc93f10ee8a9b9f891c447b47b268b6d6526005762b97fd8cc94102c62053
5
5
  SHA512:
6
- metadata.gz: 608fc78a170ce6fd0c3eb52d41f40c3452fa01b839f9b34f38d42fa65810fdf74954c76c732ae207aa3085522eb42be0af95cd574c9bd96f73e4d53451846bda
7
- data.tar.gz: 95549917463adc3b7ac81571915976ed00adc28a6cfafd01e9eefa1ee466be906f07c8a9176d5e058d63597fd40c9a51beded438621fe7e8d1e4575a386d2ba0
6
+ metadata.gz: 9c92bca139bd4a6b8c6e8ce32a0ce79505ecc495586f9aa36e89a829c1007508f380e1c84603dfd19ddbba7b7c2dffececdedc3232efd93dc87affc3270119db
7
+ data.tar.gz: 1ab472b60a58d992e9513d9e8a5d668ce6b543bc83109c8c04a6ac563d71baae399ea47184e5cc145bd5aa01a750d00f2ec273456cc40077f205c996726e513f
@@ -21,23 +21,54 @@ 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
- ASCII animation on the left (Tetris, Snake, Pong and other 8-bit-style scenes).
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
- When that interior exceeds the artwork API's 16-cell limit, the complete game
29
- art is centered and padded inside the larger square rather than clipped or stretched.
34
+ Falling blocks fill the entire interior below the PWN wordmark, including the
35
+ bottom two quadrants. Each logical block occupies one horizontal half-cell from
36
+ spawn through landing and locking. This deliberately replaces independent
37
+ quarter-cell blocks: a terminal cell has only a foreground and background, so
38
+ two piece colors plus empty black cannot be represented faithfully in four
39
+ quadrants. Two horizontal halves always fit that limit, retaining each piece's
40
+ color, holes and silhouette instead of recoloring neighbors when they touch.
41
+ The board remains full-width; only its horizontal logical resolution changes.
42
+ Completed rows intentionally flash white before collapsing; game-over and replay
43
+ resets also use white holds/wipes. Ordinary locking never changes color or shape.
44
+ Colored falling blocks support interiors up to 64 cells; the other artwork retains
45
+ its 16-cell limit. Above the applicable limit, art is centered and padded rather
46
+ than clipped or stretched.
30
47
  One `PWN::Banner.mini_names` animation is randomly
31
48
  selected for the session and retained across redraws, model changes and resize;
32
49
  changing the active session selects again. Frames advance at the banner API's
33
- `MINI_FRAME_SECONDS` cadence using monotonic time in the existing render loop—no extra animation
50
+ `mini_frame_seconds(name:)` cadence (0.05 seconds for Pong/Asteroids, 0.1 for
51
+ blocks/snake) using monotonic time in the existing render loop—no extra animation
34
52
  thread, input reader or provider call. This is decoration, not progress or
35
- telemetry. The pane uses the existing border/title/header theme roles. Settings
53
+ telemetry. The frame keeps the existing border/title theme roles. Artwork comes
54
+ from `PWN::Banner.mini_cells` with dedicated foreground/background curses pairs,
55
+ not ANSI output or theme overrides. `NO_COLOR` and terminals with too few color
56
+ pairs retain occupied geometry in monochrome (two differently colored occupied
57
+ halves become a full block, not a half-block with its background lost). The `mini_frame` ASCII API
58
+ retains its 60-frame, 0.1-second loops for other callers. Colored replays contain
59
+ 1800 frames (90 seconds for Pong/Asteroids, 180 for blocks/snake), use a local
60
+ per-session seed, and share a bounded six-replay cache. Settings
36
61
  wrap in the right-hand region without losing their label colors. A bounded,
37
62
  nonrecursive layout pass grows the header and square together. If the terminal
38
63
  is narrow/short, or that reduced width would clip any setting, the decoration
39
64
  disappears and settings reclaim the full width.
40
65
 
66
+ Accepted `/model` selections (including reasoning effort), session switches and
67
+ command-driven setting/theme changes repaint on the event loop without another
68
+ keypress. Header wrapping and square geometry follow the current values, even
69
+ when a model string is edited in place. Cancelling model selection leaves the
70
+ configuration unchanged.
71
+
41
72
  Timestamped entries (`%Y-%m-%d %H:%M:%S%z`), measured request elapsed
42
73
  time, completed-tool/event counts, and the last observed tool provide operational
43
74
  context. There are no estimated progress bars. Running
@@ -92,6 +123,7 @@ changes only default values, not the configuration schema; no migration is neede
92
123
  | `/` + Enter or `/menu` | Open the slash menu |
93
124
  | PgUp/PgDn | Scroll the timeline; new output does not pull a scrolled viewport to the bottom |
94
125
  | `/model`, `/sessions resume ID` | Show model settings / change the next request's model or session while idle |
126
+ | `/system-role` | Open the active engine's multiline SYSTEM ROLE CONTENT editor while idle; Ctrl+S saves, Esc cancels |
95
127
  | `/steer INSTRUCTION` | Redirect the active request at a safe boundary |
96
128
  | `/input TEXT` | Send one line to an ordinary tool stdin prompt; not retained in input recall |
97
129
  | Ctrl+C | Cancel the active request cooperatively, or clear an idle draft |
@@ -104,6 +136,27 @@ save/ignore settings. Multiline input uses Pry's existing line-oriented format.
104
136
  Search and Up/Down never write history; `/input` tool responses are excluded from
105
137
  both persistence and recall. Ctrl+L never deletes history or resets token totals.
106
138
 
139
+ ### System role editor
140
+
141
+ Choose `/system-role` from the root slash menu (or type it and press Enter).
142
+ The **SYSTEM ROLE CONTENT** pane is prefilled with the active engine's exact
143
+ text. Enter/Shift+Enter inserts a newline; arrows move the cursor, Home/End
144
+ move to the beginning/end of the text, Backspace/Delete edit, and Ctrl+U clears.
145
+ **Ctrl+S Save** explicitly accepts the whole text, including an empty value;
146
+ **Esc Cancel** or Ctrl+C discards edits. Ctrl+D exits without saving. The editor
147
+ owns its keys: Ctrl+R, Ctrl+G, Ctrl+O and Ctrl+L do not activate underlying
148
+ history search, swarm, status or clear. The mission buffer and cursor are retained.
149
+
150
+ Save merges only `ai.<active engine>.system_role_content` into the encrypted
151
+ `~/.pwn/pwn.yaml` (or configured vault path), preserving other engines and settings.
152
+ It uses the existing decryptor and settings persistence path, encrypting a private
153
+ temporary merge before replacing the vault. A failure leaves the previous vault
154
+ and live role unchanged and keeps the editor open with **Not saved**; there is
155
+ no silent session-only fallback. On success, the header and next request use
156
+ the new role immediately, and a new session loads it from the vault. Request or
157
+ swarm activity blocks role changes. No schema migration is required. The legacy
158
+ non-curses interface reports that this editor requires an interactive terminal.
159
+
107
160
  ### Model and reasoning selection
108
161
 
109
162
  `/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 pong. 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, with smaller panes degrading to a wordmark. The caller samples mini_names once per session and advances the explicit frame index every MINI_FRAME_SECONDS (0.1), wrapping at MINI_FRAME_COUNT (60). These are decorative animations, not interactive games or telemetry. Static Banner modules autoload only when needed. For more information, see: http://www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
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), with tiny panes showing a wordmark. 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`
@@ -52,6 +52,7 @@ PWN::Plugins::REPL.ready_tty(opts)
52
52
  - `persist_mesh_env`
53
53
  - `pwn_ai_activation_session`
54
54
  - `pwn_ai_apply_model`
55
+ - `pwn_ai_apply_system_role`
55
56
  - `pwn_ai_complete`
56
57
  - `pwn_ai_complete_command`
57
58
  - `pwn_ai_complete_kind`