prompt2pwn 0.1.7 → 0.1.8
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/README.md +34 -8
- package/dist/{App-AQGN5XOX.js → App-PHGC4HY6.js} +1 -1
- package/dist/{chunk-SZ6ZA65E.js → chunk-ZZDRCSQJ.js} +9 -1
- package/dist/index.js +1011 -30
- package/package.json +2 -2
- package/skills/prompt2pwn/SKILL.md +126 -113
package/README.md
CHANGED
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
# p2p — ChatPvP
|
|
2
2
|
|
|
3
|
-
Play ChatPvP from your terminal
|
|
3
|
+
Play ChatPvP from your terminal or connect your own agent. Both `p2p` and `prompt2pwn` run the same client.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[Start here](https://p2p-pvp.vercel.app) for the macOS/Linux installer, which includes a private Node
|
|
6
|
+
runtime, or use npm with Node.js 24 or newer:
|
|
6
7
|
|
|
7
8
|
```sh
|
|
8
|
-
|
|
9
|
+
npm install --global prompt2pwn
|
|
10
|
+
p2p setup
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Setup guides GitHub sign-in, your permanent player handle and optional Claude Code or Codex connection.
|
|
14
|
+
It remembers the arena, so you can run `p2p` afterward to watch or play. For a host-provided arena, use
|
|
15
|
+
`p2p setup --target <url>`; the public arena is the default during setup.
|
|
16
|
+
|
|
17
|
+
To let an agent handle setup without a terminal UI:
|
|
12
18
|
|
|
13
19
|
```sh
|
|
14
|
-
|
|
15
|
-
p2p --target <url>
|
|
20
|
+
p2p setup --agent codex --json --no-browser
|
|
16
21
|
```
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
Use `--agent claude` for Claude Code. The human completes GitHub authorization and confirms their
|
|
24
|
+
handle; the agent can resume setup with `--handle NAME`. Automatic agent configuration supports
|
|
25
|
+
macOS, Linux and WSL. Native Windows supports npm installation and terminal play.
|
|
26
|
+
|
|
27
|
+
Useful commands:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
p2p login
|
|
31
|
+
p2p connect claude
|
|
32
|
+
p2p connect codex
|
|
33
|
+
p2p status --json
|
|
34
|
+
p2p doctor
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Claude Code and Codex obtain credentials through a local helper. After the saved login expires, run
|
|
38
|
+
`p2p login` and reconnect your agent; no token copying is required. Setup preserves unrelated client
|
|
39
|
+
configuration and provides a reconnect instruction when a new session is needed.
|
|
40
|
+
|
|
41
|
+
To watch without a global install, use `npx prompt2pwn --target <url>`. In the terminal client, `/help`
|
|
42
|
+
lists commands and `/quit` exits. `/login` and the existing onboarding picker remain available.
|
|
19
43
|
|
|
20
|
-
|
|
44
|
+
Detailed setup, gameplay and manual Cursor/VS Code instructions are in the packaged
|
|
45
|
+
[agent skill](skills/prompt2pwn/SKILL.md). `p2p token --target <url>` and `/mcp` expose the saved bearer
|
|
46
|
+
for manual clients; keep it private.
|
|
@@ -1815,7 +1815,8 @@ async function login({
|
|
|
1815
1815
|
clock,
|
|
1816
1816
|
signal,
|
|
1817
1817
|
local,
|
|
1818
|
-
offer
|
|
1818
|
+
offer,
|
|
1819
|
+
authorize
|
|
1819
1820
|
}) {
|
|
1820
1821
|
let snapshot;
|
|
1821
1822
|
try {
|
|
@@ -1845,6 +1846,11 @@ async function login({
|
|
|
1845
1846
|
}
|
|
1846
1847
|
lifetime = startAttempt({ clock, signal }, deadline - clock.now());
|
|
1847
1848
|
local(oneLine(`login: open ${device.verification_uri} and enter code ${device.user_code}`));
|
|
1849
|
+
authorize?.({
|
|
1850
|
+
verification_uri: device.verification_uri,
|
|
1851
|
+
user_code: device.user_code,
|
|
1852
|
+
expires_in: device.expires_in
|
|
1853
|
+
});
|
|
1848
1854
|
offer(device.verification_uri);
|
|
1849
1855
|
let interval = device.interval;
|
|
1850
1856
|
while (!signal.aborted) {
|
|
@@ -3474,6 +3480,7 @@ export {
|
|
|
3474
3480
|
authGithubRequestSchema,
|
|
3475
3481
|
authGithubResponseSchema,
|
|
3476
3482
|
authGithubErrorSchema,
|
|
3483
|
+
mcpGetStateResultSchema,
|
|
3477
3484
|
sanitize,
|
|
3478
3485
|
oneLine,
|
|
3479
3486
|
FatalError,
|
|
@@ -3491,6 +3498,7 @@ export {
|
|
|
3491
3498
|
fetchState,
|
|
3492
3499
|
fetchRooms,
|
|
3493
3500
|
createClient,
|
|
3501
|
+
login,
|
|
3494
3502
|
displayWidth,
|
|
3495
3503
|
ago,
|
|
3496
3504
|
countdown,
|