pepe-http 0.47.0 → 0.49.0

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/CHANGELOG.md CHANGED
@@ -6,6 +6,173 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
+ ## [0.49.0](https://github.com/omarmhaimdat/pepe/compare/v0.48.0...v0.49.0) - 2026-10-18
10
+
11
+ ### Added
12
+
13
+ - *(slack)* pause, resize and stop a run from its message, and /pepe as a dropdown of the saved tests ([#207](https://github.com/omarmhaimdat/pepe/pull/207))
14
+
15
+ Builds on #205: richer commands, and control over a run while it goes.
16
+
17
+ ## While a run goes
18
+
19
+ A run started from Slack gets these controls on its message:
20
+ - **⏸ Pause / ▶ Resume.** While paused, the message turns grey and says
21
+ who paused it.
22
+ - **− 1 / + 1** concurrency. Each button shows the value it sets, e.g.
23
+ "+ 1 (51)". At 1 there is no − button. A ramp sets its own concurrency,
24
+ so it gets Pause only.
25
+ - **■ Stop**, with a confirmation.
26
+
27
+ Every change shows in the message at once ("<@maya> raised it to 51 at
28
+ once"), instead of at the next 10 s update.
29
+
30
+ ## Shorter thread replies
31
+
32
+ Each change during a run is one short line in the thread, saying what
33
+ moved and which way:
34
+ - `📉 Throughput dropped 52% · 5.9k req/s · at 1m26s`
35
+ - `📈 p99 up 4.5× · 45ms · at 26s`
36
+ - `🔥 Errors up to 12% · at 2m` (posted with Pepe's on-fire face)
37
+
38
+ How it works:
39
+ - `serve` sends commands over the stdin of the run it started
40
+ (`src/control.rs`: `pause U1`, `concurrency 63 U1`, `stop U1`).
41
+ - Every `--json` run loop listens for them when `serve` started it: run,
42
+ flow, API, replay and ramp. They're applied the same way as the
43
+ dashboard's keys.
44
+ - A stop the run can't hear falls back to a ctrl-c signal.
45
+
46
+ ## /pepe
47
+
48
+ - **`/pepe`, `/pepe list`, or `/pepe run` with no name** opens a card:
49
+ the saved tests in a dropdown, plus what's running with its controls.
50
+ - **Picking a test, or `/pepe NAME`,** shows that test's card in place:
51
+ - what it sends;
52
+ - its last run;
53
+ - its trend over the last eight runs, as sparklines;
54
+ - Run, Edit and run, History.
55
+ - **History** is one aligned row per run: outcome, when, req/s, p99,
56
+ errors.
57
+ - **`/pepe status`** shows what's running.
58
+ - **Runs started from Slack are now recorded,** so the history and trend
59
+ stay current.
60
+
61
+ ## Checked
62
+
63
+ - 397 tests pass; clippy 1.98 is clean.
64
+ - Against the fake Slack and fake Socket Mode, with a 20 s saved test:
65
+ 1. `/pepe` answered with the dropdown card.
66
+ 2. Picking a test replaced the card in place.
67
+ 3. Run started the test.
68
+ 4. Pause: the message turned grey with Resume and "<@U1> paused it".
69
+ 5. +1 raised concurrency and recomputed both buttons. (Exercised with
70
+ the earlier 25% steps; the ±1 buttons and the thread lines are covered
71
+ by unit tests.)
72
+ 6. Resume restarted it.
73
+ 7. `/pepe status` showed the running card.
74
+ 8. Stop ended it: the verdict appeared with its buttons, followed by the
75
+ result line.
76
+ 9. History listed the run, recorded.
77
+
78
+ Not checked against a real Slack workspace.
79
+
80
+
81
+ ## [0.48.0](https://github.com/omarmhaimdat/pepe/compare/v0.47.0...v0.48.0) - 2026-10-18
82
+
83
+ ### Added
84
+
85
+ - *(slack)* Stop, Run again and Edit and run on the messages, and /pepe, answered by pepe slack serve ([#205](https://github.com/omarmhaimdat/pepe/pull/205))
86
+
87
+ Part 3 of the Slack work: run saved tests from the channel.
88
+
89
+ ```bash
90
+ pepe slack connect # steps 5 and 6: the app token, and who may press the buttons
91
+ pepe slack serve # in the project, left running
92
+ ```
93
+
94
+ ## What it adds
95
+
96
+ - **On the messages:**
97
+ - a saved test's verdict gets **↻ Run again**, **✎ Edit and run** and
98
+ **History**;
99
+ - a run started from Slack gets **■ Stop** while it goes, with a
100
+ confirmation;
101
+ - the line under the title says who started it.
102
+ - **`/pepe`:** `run NAME`, `stop`, `history NAME` and `list`, in any
103
+ channel the app is in.
104
+ - **`pepe slack serve`:** the one listener. Slack sends every click of
105
+ an app to one of its Socket Mode connections, not to the run that posted
106
+ the message, so a single process answers them all. It:
107
+ - runs this directory's saved tests as `pepe --load NAME
108
+ --slack=<channel>` child processes, under this directory's `pepe.toml`
109
+ guardrails;
110
+ - stops the runs it started the way ctrl-c does, so the verdict still
111
+ says what was measured;
112
+ - opens the edit form, filled from the saved test, and shows a bad value
113
+ beside its field;
114
+ - logs each click, run and result in its terminal;
115
+ - reconnects with backoff.
116
+ - **Who may use it:**
117
+ - `pepe slack allow @a @b` (or `*`) sets the list; names are looked up
118
+ in the workspace;
119
+ - anyone else gets a refusal only they can see;
120
+ - nothing can be run from Slack that isn't a saved test in that
121
+ directory.
122
+ - **`pepe slack connect`** gains two steps:
123
+ - 5, the app-level token, checked by opening a Socket Mode connection,
124
+ or skipped with Enter;
125
+ - 6, who may press the buttons.
126
+
127
+ The manifest turns on Socket Mode, interactivity and `/pepe`, and adds
128
+ the `commands` and `users:read` permissions. An app made by an earlier
129
+ pepe needs `pepe slack connect` run again.
130
+ - **`--slack` replaces a saved test's own Slack hook,** keeping its
131
+ `every` and `mention`, so a run started from Slack still gets one
132
+ message, not two.
133
+ - **`src/ws.rs`:** pepe's own websocket client. It handles the handshake
134
+ over the same rustls, masked text frames, fragments, pings and close. No
135
+ new dependency.
136
+
137
+ ## Checked
138
+
139
+ - **Rust tests (395 pass):**
140
+ - the websocket client against a test server: messages both ways, a
141
+ message split in three, a ping answered, close;
142
+ - how clicks and commands are read;
143
+ - the allow list;
144
+ - turning the form's values into flags, and the errors for bad values;
145
+ - the form filled from a saved test;
146
+ - buttons only where something answers them.
147
+ - **Lint:** clippy 1.98 is clean, and the docs and avatar checks pass.
148
+ - **`pepe slack serve` against a fake Socket Mode server** (Python,
149
+ standard library), which scripted:
150
+ 1. Run again from an allowed user. The child posted its message with
151
+ Stop.
152
+ 2. `/pepe stop`. The run ended "Stopped", its verdict showed the three
153
+ buttons, and the result line followed.
154
+ 3. A click from someone not allowed. The refusal went to `response_url`
155
+ only.
156
+ 4. The edit form with concurrency 0. The acknowledgement carried a field
157
+ error.
158
+ 5. Edit and run. The form opened (`views.open`).
159
+ 6. `/pepe list`.
160
+
161
+ When the fake closed, serve reconnected with backoff.
162
+ - **The six-step connect checklist** was driven in a pseudo-terminal.
163
+ `slack.toml` kept the app token and the allowed id.
164
+
165
+ **Not checked against a real workspace:**
166
+ - Socket Mode against Slack's own servers;
167
+ - the slash command registered from the manifest;
168
+ - how the form and the buttons look in Slack.
169
+
170
+ ## 1.0
171
+
172
+ Adds `pepe slack serve`, `pepe slack allow` and `PEPE_SLACK_APP_TOKEN`.
173
+ That restarts the freeze clock. The report schema is unchanged.
174
+
175
+
9
176
  ## [0.47.0](https://github.com/omarmhaimdat/pepe/compare/v0.46.0...v0.47.0) - 2026-10-18
10
177
 
11
178
  ### Added
package/completions/_pepe CHANGED
@@ -1059,6 +1059,113 @@ _arguments "${_arguments_options[@]}" : \
1059
1059
  '::channel -- Where, if not the connected channel:_default' \
1060
1060
  && ret=0
1061
1061
  ;;
1062
+ (serve)
1063
+ _arguments "${_arguments_options[@]}" : \
1064
+ '-n+[Number of requests to perform]:NUMBER:_default' \
1065
+ '--number=[Number of requests to perform]:NUMBER:_default' \
1066
+ '-z+[Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)]:DURATION:_default' \
1067
+ '--duration=[Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)]:DURATION:_default' \
1068
+ '-m+[HTTP method, e.g. GET, POST, PUT, DELETE]:METHOD:_default' \
1069
+ '--method=[HTTP method, e.g. GET, POST, PUT, DELETE]:METHOD:_default' \
1070
+ '*-H+[HTTP headers, e.g. -H '\''Accept\: application/json'\'']:HEADERS:_default' \
1071
+ '*--headers=[HTTP headers, e.g. -H '\''Accept\: application/json'\'']:HEADERS:_default' \
1072
+ '-t+[Time in seconds to wait for a response]:TIMEOUT:_default' \
1073
+ '--timeout=[Time in seconds to wait for a response]:TIMEOUT:_default' \
1074
+ '--warmup=[Send for this long before measuring, e.g. 5s\: connections open, caches fill and JITs settle without counting against the run]:TIME:_default' \
1075
+ '--threads=[Threads sending requests (default 1), or "auto" to add one whenever those sending are all busy. One sends 100k requests a second or more; the dashboard says when it is the limit]:N|auto:_default' \
1076
+ '--rate=[Start this many requests a second, spread evenly, instead of as many as the concurrency allows; -c is then the most in flight at once, and pepe says when it holds the rate back]:PER_SECOND:_default' \
1077
+ '-d+[HTTP request body]:BODY:_default' \
1078
+ '--body=[HTTP request body]:BODY:_default' \
1079
+ '-p+[Proxy server URL\: http\://user\:pass@host\:port or socks5\://host\:port]:PROXY:_default' \
1080
+ '--proxy=[Proxy server URL\: http\://user\:pass@host\:port or socks5\://host\:port]:PROXY:_default' \
1081
+ '--trace-header=[Response header holding the request id to show for the slowest requests and in the inspector, so they can be found in the server'\''s logs; without it, X-Request-Id, traceparent, CF-Ray, X-Amzn-Trace-Id and other common ones are looked for]:NAME:_default' \
1082
+ '--vars=[Fill the {{holes}} in the URL, headers and body from this CSV file, whose first line names them\: each request takes the next row, and the rows go round again. In a flow, each chain starts with the next row'\''s values]:FILE:_files' \
1083
+ '*--webhook=[Send the run'\''s verdict to this URL when it ends\: a Slack, Discord, Teams or Google Chat webhook gets a message laid out for it, anything else the JSON report; repeat for more. \${NAME} is taken from the environment. A \[\[webhook\]\] table in pepe.toml says more]:URL:_default' \
1084
+ '--webhook-on=[When the --webhook URLs are sent\: start, progress, anomaly, end, fail (the end when a --fail-if was crossed), comma-separated; end by default]:EVENTS:_default' \
1085
+ '--slack=[Keep a Slack message up to date as the run goes\: posted at the start, edited with the numbers, anomalies in its thread, the verdict at the end. --slack alone posts in the channel \`pepe slack connect\` kept; --slack=#channel elsewhere]::CHANNEL:_default' \
1086
+ '--snapshot=[Write the JSON report so far to this file every minute while the run goes, and once more when it ends, so a long run'\''s numbers survive a crash or a lost terminal; it has a minute-by-minute timeline of the whole run]:FILE:_files' \
1087
+ '*--allow-host=[Refuse to send anywhere but these hosts\: api.example.com exactly, or .example.com for it and its subdomains; repeat for more. Every target is checked before anything is sent]:HOST:_default' \
1088
+ '--max-requests=[Refuse a run that would send more requests than this\: -n above it, or -z without a --rate that bounds it]:N:_default' \
1089
+ '--max-rate=[Refuse a --rate above this, and a run with no --rate at all, which sends as fast as the target answers]:PER_SECOND:_default' \
1090
+ '--max-concurrency=[Refuse a concurrency above this]:N:_default' \
1091
+ '*--fail-if=[End with exit code 4 when the run crosses this, for CI and scripts\: '\''p99 > 300ms'\'', '\''errors > 1%'\''; repeat for more. The report is still printed. (pepe ping has --slo for the same.)]:CONDITION:_default' \
1092
+ '--metrics=[Serve the live numbers for Prometheus at http\://ADDR/metrics while the run goes, e.g. \:9100 or 127.0.0.1\:9100, so a soak run or a long ping shows up in Grafana next to the server'\''s own]:ADDR:_default' \
1093
+ '--config=[Read settings from this file instead of ./pepe.toml; flags on the command line win over it]:FILE:_files' \
1094
+ '--write-config=[Write the settings as they stand to this file, as a pepe.toml, and exit]:FILE:_files' \
1095
+ '(--config)--load=[Run a test saved on the setup screen (ctrl-s)\: ./.pepe/tests/NAME.toml; flags on the command line win over it]:NAME:_default' \
1096
+ '--keep=[Keep the settings as they stand as a saved test, ./.pepe/tests/NAME.toml, then run. With --load and no NAME, the loaded test is updated in place; with another NAME, it'\''s copied]::NAME:_default' \
1097
+ '-c+[Number of concurrent requests at a time]:CONCURRENCY:_default' \
1098
+ '--concurrency=[Number of concurrent requests at a time]:CONCURRENCY:_default' \
1099
+ '-u+[User-Agent string, default is pepe/{version}]:USER_AGENT:_default' \
1100
+ '--user-agent=[User-Agent string, default is pepe/{version}]:USER_AGENT:_default' \
1101
+ '-h[Print help]' \
1102
+ '--help[Print help]' \
1103
+ '-k[Accept invalid TLS certificates (self-signed, expired, wrong host)]' \
1104
+ '--insecure[Accept invalid TLS certificates (self-signed, expired, wrong host)]' \
1105
+ '--disable-compression[Disable HTTP compression, e.g. gzip]' \
1106
+ '--disable-keepalive[Disable HTTP keepalive, e.g. Connection\: close]' \
1107
+ '--disable-redirects[Prevent http redirects]' \
1108
+ '--json[Output results in JSON format]' \
1109
+ '--dry-run[Say what would be sent, to where and how much, and send nothing; as JSON with --json]' \
1110
+ '-i[Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)]' \
1111
+ '--setup[Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)]' \
1112
+ '--record[Keep the run'\''s report under its saved test when it ends, as ./.pepe/runs/NAME/<moment>.json; the run has to be a saved test (--load NAME, or --keep NAME)]' \
1113
+ && ret=0
1114
+ ;;
1115
+ (allow)
1116
+ _arguments "${_arguments_options[@]}" : \
1117
+ '-n+[Number of requests to perform]:NUMBER:_default' \
1118
+ '--number=[Number of requests to perform]:NUMBER:_default' \
1119
+ '-z+[Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)]:DURATION:_default' \
1120
+ '--duration=[Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)]:DURATION:_default' \
1121
+ '-m+[HTTP method, e.g. GET, POST, PUT, DELETE]:METHOD:_default' \
1122
+ '--method=[HTTP method, e.g. GET, POST, PUT, DELETE]:METHOD:_default' \
1123
+ '*-H+[HTTP headers, e.g. -H '\''Accept\: application/json'\'']:HEADERS:_default' \
1124
+ '*--headers=[HTTP headers, e.g. -H '\''Accept\: application/json'\'']:HEADERS:_default' \
1125
+ '-t+[Time in seconds to wait for a response]:TIMEOUT:_default' \
1126
+ '--timeout=[Time in seconds to wait for a response]:TIMEOUT:_default' \
1127
+ '--warmup=[Send for this long before measuring, e.g. 5s\: connections open, caches fill and JITs settle without counting against the run]:TIME:_default' \
1128
+ '--threads=[Threads sending requests (default 1), or "auto" to add one whenever those sending are all busy. One sends 100k requests a second or more; the dashboard says when it is the limit]:N|auto:_default' \
1129
+ '--rate=[Start this many requests a second, spread evenly, instead of as many as the concurrency allows; -c is then the most in flight at once, and pepe says when it holds the rate back]:PER_SECOND:_default' \
1130
+ '-d+[HTTP request body]:BODY:_default' \
1131
+ '--body=[HTTP request body]:BODY:_default' \
1132
+ '-p+[Proxy server URL\: http\://user\:pass@host\:port or socks5\://host\:port]:PROXY:_default' \
1133
+ '--proxy=[Proxy server URL\: http\://user\:pass@host\:port or socks5\://host\:port]:PROXY:_default' \
1134
+ '--trace-header=[Response header holding the request id to show for the slowest requests and in the inspector, so they can be found in the server'\''s logs; without it, X-Request-Id, traceparent, CF-Ray, X-Amzn-Trace-Id and other common ones are looked for]:NAME:_default' \
1135
+ '--vars=[Fill the {{holes}} in the URL, headers and body from this CSV file, whose first line names them\: each request takes the next row, and the rows go round again. In a flow, each chain starts with the next row'\''s values]:FILE:_files' \
1136
+ '*--webhook=[Send the run'\''s verdict to this URL when it ends\: a Slack, Discord, Teams or Google Chat webhook gets a message laid out for it, anything else the JSON report; repeat for more. \${NAME} is taken from the environment. A \[\[webhook\]\] table in pepe.toml says more]:URL:_default' \
1137
+ '--webhook-on=[When the --webhook URLs are sent\: start, progress, anomaly, end, fail (the end when a --fail-if was crossed), comma-separated; end by default]:EVENTS:_default' \
1138
+ '--slack=[Keep a Slack message up to date as the run goes\: posted at the start, edited with the numbers, anomalies in its thread, the verdict at the end. --slack alone posts in the channel \`pepe slack connect\` kept; --slack=#channel elsewhere]::CHANNEL:_default' \
1139
+ '--snapshot=[Write the JSON report so far to this file every minute while the run goes, and once more when it ends, so a long run'\''s numbers survive a crash or a lost terminal; it has a minute-by-minute timeline of the whole run]:FILE:_files' \
1140
+ '*--allow-host=[Refuse to send anywhere but these hosts\: api.example.com exactly, or .example.com for it and its subdomains; repeat for more. Every target is checked before anything is sent]:HOST:_default' \
1141
+ '--max-requests=[Refuse a run that would send more requests than this\: -n above it, or -z without a --rate that bounds it]:N:_default' \
1142
+ '--max-rate=[Refuse a --rate above this, and a run with no --rate at all, which sends as fast as the target answers]:PER_SECOND:_default' \
1143
+ '--max-concurrency=[Refuse a concurrency above this]:N:_default' \
1144
+ '*--fail-if=[End with exit code 4 when the run crosses this, for CI and scripts\: '\''p99 > 300ms'\'', '\''errors > 1%'\''; repeat for more. The report is still printed. (pepe ping has --slo for the same.)]:CONDITION:_default' \
1145
+ '--metrics=[Serve the live numbers for Prometheus at http\://ADDR/metrics while the run goes, e.g. \:9100 or 127.0.0.1\:9100, so a soak run or a long ping shows up in Grafana next to the server'\''s own]:ADDR:_default' \
1146
+ '--config=[Read settings from this file instead of ./pepe.toml; flags on the command line win over it]:FILE:_files' \
1147
+ '--write-config=[Write the settings as they stand to this file, as a pepe.toml, and exit]:FILE:_files' \
1148
+ '(--config)--load=[Run a test saved on the setup screen (ctrl-s)\: ./.pepe/tests/NAME.toml; flags on the command line win over it]:NAME:_default' \
1149
+ '--keep=[Keep the settings as they stand as a saved test, ./.pepe/tests/NAME.toml, then run. With --load and no NAME, the loaded test is updated in place; with another NAME, it'\''s copied]::NAME:_default' \
1150
+ '-c+[Number of concurrent requests at a time]:CONCURRENCY:_default' \
1151
+ '--concurrency=[Number of concurrent requests at a time]:CONCURRENCY:_default' \
1152
+ '-u+[User-Agent string, default is pepe/{version}]:USER_AGENT:_default' \
1153
+ '--user-agent=[User-Agent string, default is pepe/{version}]:USER_AGENT:_default' \
1154
+ '-h[Print help]' \
1155
+ '--help[Print help]' \
1156
+ '-k[Accept invalid TLS certificates (self-signed, expired, wrong host)]' \
1157
+ '--insecure[Accept invalid TLS certificates (self-signed, expired, wrong host)]' \
1158
+ '--disable-compression[Disable HTTP compression, e.g. gzip]' \
1159
+ '--disable-keepalive[Disable HTTP keepalive, e.g. Connection\: close]' \
1160
+ '--disable-redirects[Prevent http redirects]' \
1161
+ '--json[Output results in JSON format]' \
1162
+ '--dry-run[Say what would be sent, to where and how much, and send nothing; as JSON with --json]' \
1163
+ '-i[Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)]' \
1164
+ '--setup[Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)]' \
1165
+ '--record[Keep the run'\''s report under its saved test when it ends, as ./.pepe/runs/NAME/<moment>.json; the run has to be a saved test (--load NAME, or --keep NAME)]' \
1166
+ '*::names:_default' \
1167
+ && ret=0
1168
+ ;;
1062
1169
  (forget)
1063
1170
  _arguments "${_arguments_options[@]}" : \
1064
1171
  '-n+[Number of requests to perform]:NUMBER:_default' \
@@ -1189,6 +1296,14 @@ _arguments "${_arguments_options[@]}" : \
1189
1296
  _arguments "${_arguments_options[@]}" : \
1190
1297
  && ret=0
1191
1298
  ;;
1299
+ (serve)
1300
+ _arguments "${_arguments_options[@]}" : \
1301
+ && ret=0
1302
+ ;;
1303
+ (allow)
1304
+ _arguments "${_arguments_options[@]}" : \
1305
+ && ret=0
1306
+ ;;
1192
1307
  (forget)
1193
1308
  _arguments "${_arguments_options[@]}" : \
1194
1309
  && ret=0
@@ -1297,6 +1412,14 @@ _arguments "${_arguments_options[@]}" : \
1297
1412
  _arguments "${_arguments_options[@]}" : \
1298
1413
  && ret=0
1299
1414
  ;;
1415
+ (serve)
1416
+ _arguments "${_arguments_options[@]}" : \
1417
+ && ret=0
1418
+ ;;
1419
+ (allow)
1420
+ _arguments "${_arguments_options[@]}" : \
1421
+ && ret=0
1422
+ ;;
1300
1423
  (forget)
1301
1424
  _arguments "${_arguments_options[@]}" : \
1302
1425
  && ret=0
@@ -1460,11 +1583,18 @@ _pepe__subcmd__help__subcmd__slack_commands() {
1460
1583
  'connect:Make pepe'\''s Slack app, take its token, pick a channel, post a test (the default)' \
1461
1584
  'status:What is connected, checked with Slack' \
1462
1585
  'test:Post a test message' \
1586
+ 'serve:Answer the buttons and /pepe\: run this directory'\''s saved tests for the people allowed, and stop them' \
1587
+ 'allow:Who may press the buttons and use /pepe\: @names, Slack ids, or * for anyone in the channel' \
1463
1588
  'forget:Remove the kept token' \
1464
1589
  'manifest:Print the app'\''s manifest, for Slack'\''s "From a manifest"' \
1465
1590
  )
1466
1591
  _describe -t commands 'pepe help slack commands' commands "$@"
1467
1592
  }
1593
+ (( $+functions[_pepe__subcmd__help__subcmd__slack__subcmd__allow_commands] )) ||
1594
+ _pepe__subcmd__help__subcmd__slack__subcmd__allow_commands() {
1595
+ local commands; commands=()
1596
+ _describe -t commands 'pepe help slack allow commands' commands "$@"
1597
+ }
1468
1598
  (( $+functions[_pepe__subcmd__help__subcmd__slack__subcmd__connect_commands] )) ||
1469
1599
  _pepe__subcmd__help__subcmd__slack__subcmd__connect_commands() {
1470
1600
  local commands; commands=()
@@ -1480,6 +1610,11 @@ _pepe__subcmd__help__subcmd__slack__subcmd__manifest_commands() {
1480
1610
  local commands; commands=()
1481
1611
  _describe -t commands 'pepe help slack manifest commands' commands "$@"
1482
1612
  }
1613
+ (( $+functions[_pepe__subcmd__help__subcmd__slack__subcmd__serve_commands] )) ||
1614
+ _pepe__subcmd__help__subcmd__slack__subcmd__serve_commands() {
1615
+ local commands; commands=()
1616
+ _describe -t commands 'pepe help slack serve commands' commands "$@"
1617
+ }
1483
1618
  (( $+functions[_pepe__subcmd__help__subcmd__slack__subcmd__status_commands] )) ||
1484
1619
  _pepe__subcmd__help__subcmd__slack__subcmd__status_commands() {
1485
1620
  local commands; commands=()
@@ -1541,12 +1676,19 @@ _pepe__subcmd__slack_commands() {
1541
1676
  'connect:Make pepe'\''s Slack app, take its token, pick a channel, post a test (the default)' \
1542
1677
  'status:What is connected, checked with Slack' \
1543
1678
  'test:Post a test message' \
1679
+ 'serve:Answer the buttons and /pepe\: run this directory'\''s saved tests for the people allowed, and stop them' \
1680
+ 'allow:Who may press the buttons and use /pepe\: @names, Slack ids, or * for anyone in the channel' \
1544
1681
  'forget:Remove the kept token' \
1545
1682
  'manifest:Print the app'\''s manifest, for Slack'\''s "From a manifest"' \
1546
1683
  'help:Print this message or the help of the given subcommand(s)' \
1547
1684
  )
1548
1685
  _describe -t commands 'pepe slack commands' commands "$@"
1549
1686
  }
1687
+ (( $+functions[_pepe__subcmd__slack__subcmd__allow_commands] )) ||
1688
+ _pepe__subcmd__slack__subcmd__allow_commands() {
1689
+ local commands; commands=()
1690
+ _describe -t commands 'pepe slack allow commands' commands "$@"
1691
+ }
1550
1692
  (( $+functions[_pepe__subcmd__slack__subcmd__connect_commands] )) ||
1551
1693
  _pepe__subcmd__slack__subcmd__connect_commands() {
1552
1694
  local commands; commands=()
@@ -1563,12 +1705,19 @@ _pepe__subcmd__slack__subcmd__help_commands() {
1563
1705
  'connect:Make pepe'\''s Slack app, take its token, pick a channel, post a test (the default)' \
1564
1706
  'status:What is connected, checked with Slack' \
1565
1707
  'test:Post a test message' \
1708
+ 'serve:Answer the buttons and /pepe\: run this directory'\''s saved tests for the people allowed, and stop them' \
1709
+ 'allow:Who may press the buttons and use /pepe\: @names, Slack ids, or * for anyone in the channel' \
1566
1710
  'forget:Remove the kept token' \
1567
1711
  'manifest:Print the app'\''s manifest, for Slack'\''s "From a manifest"' \
1568
1712
  'help:Print this message or the help of the given subcommand(s)' \
1569
1713
  )
1570
1714
  _describe -t commands 'pepe slack help commands' commands "$@"
1571
1715
  }
1716
+ (( $+functions[_pepe__subcmd__slack__subcmd__help__subcmd__allow_commands] )) ||
1717
+ _pepe__subcmd__slack__subcmd__help__subcmd__allow_commands() {
1718
+ local commands; commands=()
1719
+ _describe -t commands 'pepe slack help allow commands' commands "$@"
1720
+ }
1572
1721
  (( $+functions[_pepe__subcmd__slack__subcmd__help__subcmd__connect_commands] )) ||
1573
1722
  _pepe__subcmd__slack__subcmd__help__subcmd__connect_commands() {
1574
1723
  local commands; commands=()
@@ -1589,6 +1738,11 @@ _pepe__subcmd__slack__subcmd__help__subcmd__manifest_commands() {
1589
1738
  local commands; commands=()
1590
1739
  _describe -t commands 'pepe slack help manifest commands' commands "$@"
1591
1740
  }
1741
+ (( $+functions[_pepe__subcmd__slack__subcmd__help__subcmd__serve_commands] )) ||
1742
+ _pepe__subcmd__slack__subcmd__help__subcmd__serve_commands() {
1743
+ local commands; commands=()
1744
+ _describe -t commands 'pepe slack help serve commands' commands "$@"
1745
+ }
1592
1746
  (( $+functions[_pepe__subcmd__slack__subcmd__help__subcmd__status_commands] )) ||
1593
1747
  _pepe__subcmd__slack__subcmd__help__subcmd__status_commands() {
1594
1748
  local commands; commands=()
@@ -1604,6 +1758,11 @@ _pepe__subcmd__slack__subcmd__manifest_commands() {
1604
1758
  local commands; commands=()
1605
1759
  _describe -t commands 'pepe slack manifest commands' commands "$@"
1606
1760
  }
1761
+ (( $+functions[_pepe__subcmd__slack__subcmd__serve_commands] )) ||
1762
+ _pepe__subcmd__slack__subcmd__serve_commands() {
1763
+ local commands; commands=()
1764
+ _describe -t commands 'pepe slack serve commands' commands "$@"
1765
+ }
1607
1766
  (( $+functions[_pepe__subcmd__slack__subcmd__status_commands] )) ||
1608
1767
  _pepe__subcmd__slack__subcmd__status_commands() {
1609
1768
  local commands; commands=()
@@ -875,6 +875,8 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
875
875
  [CompletionResult]::new('connect', 'connect', [CompletionResultType]::ParameterValue, 'Make pepe''s Slack app, take its token, pick a channel, post a test (the default)')
876
876
  [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'What is connected, checked with Slack')
877
877
  [CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, 'Post a test message')
878
+ [CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Answer the buttons and /pepe: run this directory''s saved tests for the people allowed, and stop them')
879
+ [CompletionResult]::new('allow', 'allow', [CompletionResultType]::ParameterValue, 'Who may press the buttons and use /pepe: @names, Slack ids, or * for anyone in the channel')
878
880
  [CompletionResult]::new('forget', 'forget', [CompletionResultType]::ParameterValue, 'Remove the kept token')
879
881
  [CompletionResult]::new('manifest', 'manifest', [CompletionResultType]::ParameterValue, 'Print the app''s manifest, for Slack''s "From a manifest"')
880
882
  [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
@@ -1038,6 +1040,110 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
1038
1040
  [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Keep the run''s report under its saved test when it ends, as ./.pepe/runs/NAME/<moment>.json; the run has to be a saved test (--load NAME, or --keep NAME)')
1039
1041
  break
1040
1042
  }
1043
+ 'pepe;slack;serve' {
1044
+ [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Number of requests to perform')
1045
+ [CompletionResult]::new('--number', '--number', [CompletionResultType]::ParameterName, 'Number of requests to perform')
1046
+ [CompletionResult]::new('-z', '-z', [CompletionResultType]::ParameterName, 'Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)')
1047
+ [CompletionResult]::new('--duration', '--duration', [CompletionResultType]::ParameterName, 'Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)')
1048
+ [CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'HTTP method, e.g. GET, POST, PUT, DELETE')
1049
+ [CompletionResult]::new('--method', '--method', [CompletionResultType]::ParameterName, 'HTTP method, e.g. GET, POST, PUT, DELETE')
1050
+ [CompletionResult]::new('-H', '-H ', [CompletionResultType]::ParameterName, 'HTTP headers, e.g. -H ''Accept: application/json''')
1051
+ [CompletionResult]::new('--headers', '--headers', [CompletionResultType]::ParameterName, 'HTTP headers, e.g. -H ''Accept: application/json''')
1052
+ [CompletionResult]::new('-t', '-t', [CompletionResultType]::ParameterName, 'Time in seconds to wait for a response')
1053
+ [CompletionResult]::new('--timeout', '--timeout', [CompletionResultType]::ParameterName, 'Time in seconds to wait for a response')
1054
+ [CompletionResult]::new('--warmup', '--warmup', [CompletionResultType]::ParameterName, 'Send for this long before measuring, e.g. 5s: connections open, caches fill and JITs settle without counting against the run')
1055
+ [CompletionResult]::new('--threads', '--threads', [CompletionResultType]::ParameterName, 'Threads sending requests (default 1), or "auto" to add one whenever those sending are all busy. One sends 100k requests a second or more; the dashboard says when it is the limit')
1056
+ [CompletionResult]::new('--rate', '--rate', [CompletionResultType]::ParameterName, 'Start this many requests a second, spread evenly, instead of as many as the concurrency allows; -c is then the most in flight at once, and pepe says when it holds the rate back')
1057
+ [CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'HTTP request body')
1058
+ [CompletionResult]::new('--body', '--body', [CompletionResultType]::ParameterName, 'HTTP request body')
1059
+ [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Proxy server URL: http://user:pass@host:port or socks5://host:port')
1060
+ [CompletionResult]::new('--proxy', '--proxy', [CompletionResultType]::ParameterName, 'Proxy server URL: http://user:pass@host:port or socks5://host:port')
1061
+ [CompletionResult]::new('--trace-header', '--trace-header', [CompletionResultType]::ParameterName, 'Response header holding the request id to show for the slowest requests and in the inspector, so they can be found in the server''s logs; without it, X-Request-Id, traceparent, CF-Ray, X-Amzn-Trace-Id and other common ones are looked for')
1062
+ [CompletionResult]::new('--vars', '--vars', [CompletionResultType]::ParameterName, 'Fill the {{holes}} in the URL, headers and body from this CSV file, whose first line names them: each request takes the next row, and the rows go round again. In a flow, each chain starts with the next row''s values')
1063
+ [CompletionResult]::new('--webhook', '--webhook', [CompletionResultType]::ParameterName, 'Send the run''s verdict to this URL when it ends: a Slack, Discord, Teams or Google Chat webhook gets a message laid out for it, anything else the JSON report; repeat for more. ${NAME} is taken from the environment. A [[webhook]] table in pepe.toml says more')
1064
+ [CompletionResult]::new('--webhook-on', '--webhook-on', [CompletionResultType]::ParameterName, 'When the --webhook URLs are sent: start, progress, anomaly, end, fail (the end when a --fail-if was crossed), comma-separated; end by default')
1065
+ [CompletionResult]::new('--slack', '--slack', [CompletionResultType]::ParameterName, 'Keep a Slack message up to date as the run goes: posted at the start, edited with the numbers, anomalies in its thread, the verdict at the end. --slack alone posts in the channel `pepe slack connect` kept; --slack=#channel elsewhere')
1066
+ [CompletionResult]::new('--snapshot', '--snapshot', [CompletionResultType]::ParameterName, 'Write the JSON report so far to this file every minute while the run goes, and once more when it ends, so a long run''s numbers survive a crash or a lost terminal; it has a minute-by-minute timeline of the whole run')
1067
+ [CompletionResult]::new('--allow-host', '--allow-host', [CompletionResultType]::ParameterName, 'Refuse to send anywhere but these hosts: api.example.com exactly, or .example.com for it and its subdomains; repeat for more. Every target is checked before anything is sent')
1068
+ [CompletionResult]::new('--max-requests', '--max-requests', [CompletionResultType]::ParameterName, 'Refuse a run that would send more requests than this: -n above it, or -z without a --rate that bounds it')
1069
+ [CompletionResult]::new('--max-rate', '--max-rate', [CompletionResultType]::ParameterName, 'Refuse a --rate above this, and a run with no --rate at all, which sends as fast as the target answers')
1070
+ [CompletionResult]::new('--max-concurrency', '--max-concurrency', [CompletionResultType]::ParameterName, 'Refuse a concurrency above this')
1071
+ [CompletionResult]::new('--fail-if', '--fail-if', [CompletionResultType]::ParameterName, 'End with exit code 4 when the run crosses this, for CI and scripts: ''p99 > 300ms'', ''errors > 1%''; repeat for more. The report is still printed. (pepe ping has --slo for the same.)')
1072
+ [CompletionResult]::new('--metrics', '--metrics', [CompletionResultType]::ParameterName, 'Serve the live numbers for Prometheus at http://ADDR/metrics while the run goes, e.g. :9100 or 127.0.0.1:9100, so a soak run or a long ping shows up in Grafana next to the server''s own')
1073
+ [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Read settings from this file instead of ./pepe.toml; flags on the command line win over it')
1074
+ [CompletionResult]::new('--write-config', '--write-config', [CompletionResultType]::ParameterName, 'Write the settings as they stand to this file, as a pepe.toml, and exit')
1075
+ [CompletionResult]::new('--load', '--load', [CompletionResultType]::ParameterName, 'Run a test saved on the setup screen (ctrl-s): ./.pepe/tests/NAME.toml; flags on the command line win over it')
1076
+ [CompletionResult]::new('--keep', '--keep', [CompletionResultType]::ParameterName, 'Keep the settings as they stand as a saved test, ./.pepe/tests/NAME.toml, then run. With --load and no NAME, the loaded test is updated in place; with another NAME, it''s copied')
1077
+ [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Number of concurrent requests at a time')
1078
+ [CompletionResult]::new('--concurrency', '--concurrency', [CompletionResultType]::ParameterName, 'Number of concurrent requests at a time')
1079
+ [CompletionResult]::new('-u', '-u', [CompletionResultType]::ParameterName, 'User-Agent string, default is pepe/{version}')
1080
+ [CompletionResult]::new('--user-agent', '--user-agent', [CompletionResultType]::ParameterName, 'User-Agent string, default is pepe/{version}')
1081
+ [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
1082
+ [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
1083
+ [CompletionResult]::new('-k', '-k', [CompletionResultType]::ParameterName, 'Accept invalid TLS certificates (self-signed, expired, wrong host)')
1084
+ [CompletionResult]::new('--insecure', '--insecure', [CompletionResultType]::ParameterName, 'Accept invalid TLS certificates (self-signed, expired, wrong host)')
1085
+ [CompletionResult]::new('--disable-compression', '--disable-compression', [CompletionResultType]::ParameterName, 'Disable HTTP compression, e.g. gzip')
1086
+ [CompletionResult]::new('--disable-keepalive', '--disable-keepalive', [CompletionResultType]::ParameterName, 'Disable HTTP keepalive, e.g. Connection: close')
1087
+ [CompletionResult]::new('--disable-redirects', '--disable-redirects', [CompletionResultType]::ParameterName, 'Prevent http redirects')
1088
+ [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output results in JSON format')
1089
+ [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Say what would be sent, to where and how much, and send nothing; as JSON with --json')
1090
+ [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)')
1091
+ [CompletionResult]::new('--setup', '--setup', [CompletionResultType]::ParameterName, 'Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)')
1092
+ [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Keep the run''s report under its saved test when it ends, as ./.pepe/runs/NAME/<moment>.json; the run has to be a saved test (--load NAME, or --keep NAME)')
1093
+ break
1094
+ }
1095
+ 'pepe;slack;allow' {
1096
+ [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Number of requests to perform')
1097
+ [CompletionResult]::new('--number', '--number', [CompletionResultType]::ParameterName, 'Number of requests to perform')
1098
+ [CompletionResult]::new('-z', '-z', [CompletionResultType]::ParameterName, 'Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)')
1099
+ [CompletionResult]::new('--duration', '--duration', [CompletionResultType]::ParameterName, 'Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)')
1100
+ [CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'HTTP method, e.g. GET, POST, PUT, DELETE')
1101
+ [CompletionResult]::new('--method', '--method', [CompletionResultType]::ParameterName, 'HTTP method, e.g. GET, POST, PUT, DELETE')
1102
+ [CompletionResult]::new('-H', '-H ', [CompletionResultType]::ParameterName, 'HTTP headers, e.g. -H ''Accept: application/json''')
1103
+ [CompletionResult]::new('--headers', '--headers', [CompletionResultType]::ParameterName, 'HTTP headers, e.g. -H ''Accept: application/json''')
1104
+ [CompletionResult]::new('-t', '-t', [CompletionResultType]::ParameterName, 'Time in seconds to wait for a response')
1105
+ [CompletionResult]::new('--timeout', '--timeout', [CompletionResultType]::ParameterName, 'Time in seconds to wait for a response')
1106
+ [CompletionResult]::new('--warmup', '--warmup', [CompletionResultType]::ParameterName, 'Send for this long before measuring, e.g. 5s: connections open, caches fill and JITs settle without counting against the run')
1107
+ [CompletionResult]::new('--threads', '--threads', [CompletionResultType]::ParameterName, 'Threads sending requests (default 1), or "auto" to add one whenever those sending are all busy. One sends 100k requests a second or more; the dashboard says when it is the limit')
1108
+ [CompletionResult]::new('--rate', '--rate', [CompletionResultType]::ParameterName, 'Start this many requests a second, spread evenly, instead of as many as the concurrency allows; -c is then the most in flight at once, and pepe says when it holds the rate back')
1109
+ [CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'HTTP request body')
1110
+ [CompletionResult]::new('--body', '--body', [CompletionResultType]::ParameterName, 'HTTP request body')
1111
+ [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Proxy server URL: http://user:pass@host:port or socks5://host:port')
1112
+ [CompletionResult]::new('--proxy', '--proxy', [CompletionResultType]::ParameterName, 'Proxy server URL: http://user:pass@host:port or socks5://host:port')
1113
+ [CompletionResult]::new('--trace-header', '--trace-header', [CompletionResultType]::ParameterName, 'Response header holding the request id to show for the slowest requests and in the inspector, so they can be found in the server''s logs; without it, X-Request-Id, traceparent, CF-Ray, X-Amzn-Trace-Id and other common ones are looked for')
1114
+ [CompletionResult]::new('--vars', '--vars', [CompletionResultType]::ParameterName, 'Fill the {{holes}} in the URL, headers and body from this CSV file, whose first line names them: each request takes the next row, and the rows go round again. In a flow, each chain starts with the next row''s values')
1115
+ [CompletionResult]::new('--webhook', '--webhook', [CompletionResultType]::ParameterName, 'Send the run''s verdict to this URL when it ends: a Slack, Discord, Teams or Google Chat webhook gets a message laid out for it, anything else the JSON report; repeat for more. ${NAME} is taken from the environment. A [[webhook]] table in pepe.toml says more')
1116
+ [CompletionResult]::new('--webhook-on', '--webhook-on', [CompletionResultType]::ParameterName, 'When the --webhook URLs are sent: start, progress, anomaly, end, fail (the end when a --fail-if was crossed), comma-separated; end by default')
1117
+ [CompletionResult]::new('--slack', '--slack', [CompletionResultType]::ParameterName, 'Keep a Slack message up to date as the run goes: posted at the start, edited with the numbers, anomalies in its thread, the verdict at the end. --slack alone posts in the channel `pepe slack connect` kept; --slack=#channel elsewhere')
1118
+ [CompletionResult]::new('--snapshot', '--snapshot', [CompletionResultType]::ParameterName, 'Write the JSON report so far to this file every minute while the run goes, and once more when it ends, so a long run''s numbers survive a crash or a lost terminal; it has a minute-by-minute timeline of the whole run')
1119
+ [CompletionResult]::new('--allow-host', '--allow-host', [CompletionResultType]::ParameterName, 'Refuse to send anywhere but these hosts: api.example.com exactly, or .example.com for it and its subdomains; repeat for more. Every target is checked before anything is sent')
1120
+ [CompletionResult]::new('--max-requests', '--max-requests', [CompletionResultType]::ParameterName, 'Refuse a run that would send more requests than this: -n above it, or -z without a --rate that bounds it')
1121
+ [CompletionResult]::new('--max-rate', '--max-rate', [CompletionResultType]::ParameterName, 'Refuse a --rate above this, and a run with no --rate at all, which sends as fast as the target answers')
1122
+ [CompletionResult]::new('--max-concurrency', '--max-concurrency', [CompletionResultType]::ParameterName, 'Refuse a concurrency above this')
1123
+ [CompletionResult]::new('--fail-if', '--fail-if', [CompletionResultType]::ParameterName, 'End with exit code 4 when the run crosses this, for CI and scripts: ''p99 > 300ms'', ''errors > 1%''; repeat for more. The report is still printed. (pepe ping has --slo for the same.)')
1124
+ [CompletionResult]::new('--metrics', '--metrics', [CompletionResultType]::ParameterName, 'Serve the live numbers for Prometheus at http://ADDR/metrics while the run goes, e.g. :9100 or 127.0.0.1:9100, so a soak run or a long ping shows up in Grafana next to the server''s own')
1125
+ [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Read settings from this file instead of ./pepe.toml; flags on the command line win over it')
1126
+ [CompletionResult]::new('--write-config', '--write-config', [CompletionResultType]::ParameterName, 'Write the settings as they stand to this file, as a pepe.toml, and exit')
1127
+ [CompletionResult]::new('--load', '--load', [CompletionResultType]::ParameterName, 'Run a test saved on the setup screen (ctrl-s): ./.pepe/tests/NAME.toml; flags on the command line win over it')
1128
+ [CompletionResult]::new('--keep', '--keep', [CompletionResultType]::ParameterName, 'Keep the settings as they stand as a saved test, ./.pepe/tests/NAME.toml, then run. With --load and no NAME, the loaded test is updated in place; with another NAME, it''s copied')
1129
+ [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Number of concurrent requests at a time')
1130
+ [CompletionResult]::new('--concurrency', '--concurrency', [CompletionResultType]::ParameterName, 'Number of concurrent requests at a time')
1131
+ [CompletionResult]::new('-u', '-u', [CompletionResultType]::ParameterName, 'User-Agent string, default is pepe/{version}')
1132
+ [CompletionResult]::new('--user-agent', '--user-agent', [CompletionResultType]::ParameterName, 'User-Agent string, default is pepe/{version}')
1133
+ [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
1134
+ [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
1135
+ [CompletionResult]::new('-k', '-k', [CompletionResultType]::ParameterName, 'Accept invalid TLS certificates (self-signed, expired, wrong host)')
1136
+ [CompletionResult]::new('--insecure', '--insecure', [CompletionResultType]::ParameterName, 'Accept invalid TLS certificates (self-signed, expired, wrong host)')
1137
+ [CompletionResult]::new('--disable-compression', '--disable-compression', [CompletionResultType]::ParameterName, 'Disable HTTP compression, e.g. gzip')
1138
+ [CompletionResult]::new('--disable-keepalive', '--disable-keepalive', [CompletionResultType]::ParameterName, 'Disable HTTP keepalive, e.g. Connection: close')
1139
+ [CompletionResult]::new('--disable-redirects', '--disable-redirects', [CompletionResultType]::ParameterName, 'Prevent http redirects')
1140
+ [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output results in JSON format')
1141
+ [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Say what would be sent, to where and how much, and send nothing; as JSON with --json')
1142
+ [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)')
1143
+ [CompletionResult]::new('--setup', '--setup', [CompletionResultType]::ParameterName, 'Open the setup screen to review or change the settings before starting (it opens by itself when no URL is given)')
1144
+ [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Keep the run''s report under its saved test when it ends, as ./.pepe/runs/NAME/<moment>.json; the run has to be a saved test (--load NAME, or --keep NAME)')
1145
+ break
1146
+ }
1041
1147
  'pepe;slack;forget' {
1042
1148
  [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Number of requests to perform')
1043
1149
  [CompletionResult]::new('--number', '--number', [CompletionResultType]::ParameterName, 'Number of requests to perform')
@@ -1146,6 +1252,8 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
1146
1252
  [CompletionResult]::new('connect', 'connect', [CompletionResultType]::ParameterValue, 'Make pepe''s Slack app, take its token, pick a channel, post a test (the default)')
1147
1253
  [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'What is connected, checked with Slack')
1148
1254
  [CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, 'Post a test message')
1255
+ [CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Answer the buttons and /pepe: run this directory''s saved tests for the people allowed, and stop them')
1256
+ [CompletionResult]::new('allow', 'allow', [CompletionResultType]::ParameterValue, 'Who may press the buttons and use /pepe: @names, Slack ids, or * for anyone in the channel')
1149
1257
  [CompletionResult]::new('forget', 'forget', [CompletionResultType]::ParameterValue, 'Remove the kept token')
1150
1258
  [CompletionResult]::new('manifest', 'manifest', [CompletionResultType]::ParameterValue, 'Print the app''s manifest, for Slack''s "From a manifest"')
1151
1259
  [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
@@ -1160,6 +1268,12 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
1160
1268
  'pepe;slack;help;test' {
1161
1269
  break
1162
1270
  }
1271
+ 'pepe;slack;help;serve' {
1272
+ break
1273
+ }
1274
+ 'pepe;slack;help;allow' {
1275
+ break
1276
+ }
1163
1277
  'pepe;slack;help;forget' {
1164
1278
  break
1165
1279
  }
@@ -1230,6 +1344,8 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
1230
1344
  [CompletionResult]::new('connect', 'connect', [CompletionResultType]::ParameterValue, 'Make pepe''s Slack app, take its token, pick a channel, post a test (the default)')
1231
1345
  [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'What is connected, checked with Slack')
1232
1346
  [CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, 'Post a test message')
1347
+ [CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Answer the buttons and /pepe: run this directory''s saved tests for the people allowed, and stop them')
1348
+ [CompletionResult]::new('allow', 'allow', [CompletionResultType]::ParameterValue, 'Who may press the buttons and use /pepe: @names, Slack ids, or * for anyone in the channel')
1233
1349
  [CompletionResult]::new('forget', 'forget', [CompletionResultType]::ParameterValue, 'Remove the kept token')
1234
1350
  [CompletionResult]::new('manifest', 'manifest', [CompletionResultType]::ParameterValue, 'Print the app''s manifest, for Slack''s "From a manifest"')
1235
1351
  break
@@ -1243,6 +1359,12 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
1243
1359
  'pepe;help;slack;test' {
1244
1360
  break
1245
1361
  }
1362
+ 'pepe;help;slack;serve' {
1363
+ break
1364
+ }
1365
+ 'pepe;help;slack;allow' {
1366
+ break
1367
+ }
1246
1368
  'pepe;help;slack;forget' {
1247
1369
  break
1248
1370
  }