pair-mode 0.2.1 → 0.3.3
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/.claude-plugin/plugin.json +12 -0
- package/.codex-plugin/plugin.json +29 -0
- package/README.md +79 -0
- package/assets/syntax/clojure.yaml +36 -0
- package/assets/syntax/cmake.yaml +41 -0
- package/assets/syntax/crystal.yaml +71 -0
- package/assets/syntax/csharp.yaml +51 -0
- package/assets/syntax/dart.yaml +45 -0
- package/assets/syntax/elm.yaml +38 -0
- package/assets/syntax/erb.yaml +42 -0
- package/assets/syntax/erlang.yaml +45 -0
- package/assets/syntax/fsharp.yaml +48 -0
- package/assets/syntax/graphql.yaml +47 -0
- package/assets/syntax/groovy.yaml +111 -0
- package/assets/syntax/haml.yaml +16 -0
- package/assets/syntax/haskell.yaml +52 -0
- package/assets/syntax/ini.yaml +23 -0
- package/assets/syntax/java.yaml +36 -0
- package/assets/syntax/julia.yaml +56 -0
- package/assets/syntax/kotlin.yaml +65 -0
- package/assets/syntax/makefile.yaml +37 -0
- package/assets/syntax/nginx.yaml +22 -0
- package/assets/syntax/nim.yaml +27 -0
- package/assets/syntax/nix.yaml +32 -0
- package/assets/syntax/objc.yaml +60 -0
- package/assets/syntax/ocaml.yaml +43 -0
- package/assets/syntax/perl.yaml +58 -0
- package/assets/syntax/php.yaml +60 -0
- package/assets/syntax/r.yaml +30 -0
- package/assets/syntax/scala.yaml +32 -0
- package/assets/syntax/svelte.yaml +27 -0
- package/assets/syntax/swift.yaml +102 -0
- package/assets/syntax/vue.yaml +63 -0
- package/assets/syntax/xml.yaml +37 -0
- package/assets/syntax/zig.yaml +52 -0
- package/dist/claude-code.js +461 -149
- package/dist/cli.js +1490 -476
- package/dist/codex.js +461 -149
- package/dist/opencode.js +453 -142
- package/dist/pair-tui.js +172 -26
- package/dist/pi.js +508 -155
- package/hooks/codex.json +17 -0
- package/hooks/hooks.json +16 -0
- package/package.json +8 -3
- package/skills/toggle/SKILL.md +24 -0
package/hooks/codex.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Pair mode holds a proposed edit so the user can annotate the diff line by line.",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "apply_patch|Edit|Write",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "node \"${PLUGIN_ROOT}/dist/codex.js\"",
|
|
11
|
+
"timeout": 600
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
package/hooks/hooks.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pair-mode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Annotate a coding agent's proposed edits line by line, in your terminal.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
33
33
|
"assets",
|
|
34
|
+
".claude-plugin/plugin.json",
|
|
35
|
+
".codex-plugin/plugin.json",
|
|
36
|
+
"hooks",
|
|
37
|
+
"skills",
|
|
34
38
|
"README.md"
|
|
35
39
|
],
|
|
36
40
|
"type": "module",
|
|
@@ -45,7 +49,8 @@
|
|
|
45
49
|
"fmt": "oxfmt",
|
|
46
50
|
"fmt:check": "oxfmt --check",
|
|
47
51
|
"lint": "oxlint",
|
|
48
|
-
"lint:fix": "oxlint --fix"
|
|
52
|
+
"lint:fix": "oxlint --fix",
|
|
53
|
+
"syntax": "node scripts/fetch-syntax.mjs"
|
|
49
54
|
},
|
|
50
55
|
"dependencies": {
|
|
51
56
|
"diff": "^9.0.0",
|
|
@@ -61,6 +66,6 @@
|
|
|
61
66
|
"vitest": "^4.0.0"
|
|
62
67
|
},
|
|
63
68
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
69
|
+
"node": ">=22"
|
|
65
70
|
}
|
|
66
71
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: toggle
|
|
3
|
+
description: Flip pair mode on or off for this directory. Pair mode opens every proposed edit in the pair review pane for line annotation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run `pair-mode toggle` and report the resulting state in one line.
|
|
7
|
+
|
|
8
|
+
If the shell reports that `pair-mode` is not found, run `node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" toggle` instead.
|
|
9
|
+
|
|
10
|
+
The command reads the current state and moves to the other one. Do not read the status first.
|
|
11
|
+
|
|
12
|
+
If the user names a state rather than a flip, pass that state instead of `toggle`. The command accepts `on`, `off`, and `status`.
|
|
13
|
+
|
|
14
|
+
If the user asks for the browser review, add `--web`.
|
|
15
|
+
|
|
16
|
+
Pair mode intercepts your Write, Edit, and MultiEdit calls. The user reads the proposed diff in the
|
|
17
|
+
pair review pane, selects lines, and attaches notes. Pair mode then holds the edit and
|
|
18
|
+
returns those notes as questions anchored to line numbers. Answer every question. Do not
|
|
19
|
+
re-attempt the edit until the user asks for it. An edit the user closes with no notes
|
|
20
|
+
applies as proposed.
|
|
21
|
+
|
|
22
|
+
Pair mode keys the flag by the real directory path, and the hook walks up from the edited
|
|
23
|
+
file. A flag on a parent directory therefore covers every repo beneath it. If pair mode
|
|
24
|
+
stays on after an `off`, check each parent with `pair-mode status <dir>`.
|