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.
Files changed (45) hide show
  1. package/.claude-plugin/plugin.json +12 -0
  2. package/.codex-plugin/plugin.json +29 -0
  3. package/README.md +79 -0
  4. package/assets/syntax/clojure.yaml +36 -0
  5. package/assets/syntax/cmake.yaml +41 -0
  6. package/assets/syntax/crystal.yaml +71 -0
  7. package/assets/syntax/csharp.yaml +51 -0
  8. package/assets/syntax/dart.yaml +45 -0
  9. package/assets/syntax/elm.yaml +38 -0
  10. package/assets/syntax/erb.yaml +42 -0
  11. package/assets/syntax/erlang.yaml +45 -0
  12. package/assets/syntax/fsharp.yaml +48 -0
  13. package/assets/syntax/graphql.yaml +47 -0
  14. package/assets/syntax/groovy.yaml +111 -0
  15. package/assets/syntax/haml.yaml +16 -0
  16. package/assets/syntax/haskell.yaml +52 -0
  17. package/assets/syntax/ini.yaml +23 -0
  18. package/assets/syntax/java.yaml +36 -0
  19. package/assets/syntax/julia.yaml +56 -0
  20. package/assets/syntax/kotlin.yaml +65 -0
  21. package/assets/syntax/makefile.yaml +37 -0
  22. package/assets/syntax/nginx.yaml +22 -0
  23. package/assets/syntax/nim.yaml +27 -0
  24. package/assets/syntax/nix.yaml +32 -0
  25. package/assets/syntax/objc.yaml +60 -0
  26. package/assets/syntax/ocaml.yaml +43 -0
  27. package/assets/syntax/perl.yaml +58 -0
  28. package/assets/syntax/php.yaml +60 -0
  29. package/assets/syntax/r.yaml +30 -0
  30. package/assets/syntax/scala.yaml +32 -0
  31. package/assets/syntax/svelte.yaml +27 -0
  32. package/assets/syntax/swift.yaml +102 -0
  33. package/assets/syntax/vue.yaml +63 -0
  34. package/assets/syntax/xml.yaml +37 -0
  35. package/assets/syntax/zig.yaml +52 -0
  36. package/dist/claude-code.js +461 -149
  37. package/dist/cli.js +1490 -476
  38. package/dist/codex.js +461 -149
  39. package/dist/opencode.js +453 -142
  40. package/dist/pair-tui.js +172 -26
  41. package/dist/pi.js +508 -155
  42. package/hooks/codex.json +17 -0
  43. package/hooks/hooks.json +16 -0
  44. package/package.json +8 -3
  45. package/skills/toggle/SKILL.md +24 -0
@@ -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
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "hooks": {
3
+ "PreToolUse": [
4
+ {
5
+ "matcher": "Write|Edit|MultiEdit",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/claude-code.js\"",
10
+ "timeout": 600
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pair-mode",
3
- "version": "0.2.1",
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": ">=20"
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>`.