pair-mode 0.3.0 → 0.4.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.
Files changed (53) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +2 -8
  3. package/README.md +71 -12
  4. package/assets/duck-appalled-banner-sprite.png +0 -0
  5. package/assets/duck-appalled-banner-v2-sprite.png +0 -0
  6. package/assets/duck-appalled-banner-v2.gif +0 -0
  7. package/assets/duck-appalled-sprite.png +0 -0
  8. package/assets/duck-appalled.gif +0 -0
  9. package/assets/duck-before-main.png +0 -0
  10. package/assets/duck.png +0 -0
  11. package/assets/favicon.png +0 -0
  12. package/assets/syntax/clojure.yaml +36 -0
  13. package/assets/syntax/cmake.yaml +41 -0
  14. package/assets/syntax/crystal.yaml +71 -0
  15. package/assets/syntax/csharp.yaml +51 -0
  16. package/assets/syntax/dart.yaml +45 -0
  17. package/assets/syntax/elm.yaml +38 -0
  18. package/assets/syntax/erb.yaml +42 -0
  19. package/assets/syntax/erlang.yaml +45 -0
  20. package/assets/syntax/fsharp.yaml +48 -0
  21. package/assets/syntax/graphql.yaml +47 -0
  22. package/assets/syntax/groovy.yaml +111 -0
  23. package/assets/syntax/haml.yaml +16 -0
  24. package/assets/syntax/haskell.yaml +52 -0
  25. package/assets/syntax/ini.yaml +23 -0
  26. package/assets/syntax/java.yaml +36 -0
  27. package/assets/syntax/julia.yaml +56 -0
  28. package/assets/syntax/kotlin.yaml +65 -0
  29. package/assets/syntax/makefile.yaml +37 -0
  30. package/assets/syntax/nginx.yaml +22 -0
  31. package/assets/syntax/nim.yaml +27 -0
  32. package/assets/syntax/nix.yaml +32 -0
  33. package/assets/syntax/objc.yaml +60 -0
  34. package/assets/syntax/ocaml.yaml +43 -0
  35. package/assets/syntax/perl.yaml +58 -0
  36. package/assets/syntax/php.yaml +60 -0
  37. package/assets/syntax/r.yaml +30 -0
  38. package/assets/syntax/scala.yaml +32 -0
  39. package/assets/syntax/svelte.yaml +27 -0
  40. package/assets/syntax/swift.yaml +102 -0
  41. package/assets/syntax/vue.yaml +63 -0
  42. package/assets/syntax/xml.yaml +37 -0
  43. package/assets/syntax/zig.yaml +52 -0
  44. package/dist/claude-code.js +463 -150
  45. package/dist/cli.js +1534 -459
  46. package/dist/codex.js +811 -394
  47. package/dist/opencode.js +455 -143
  48. package/dist/pair-tui.js +177 -27
  49. package/dist/pi.js +510 -156
  50. package/package.json +16 -17
  51. package/skills/toggle/SKILL.md +24 -0
  52. package/commands/pair.md +0 -18
  53. package/skills/pair/SKILL.md +0 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pair-mode",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Annotate a coding agent's proposed edits line by line, in your terminal.",
5
5
  "keywords": [
6
6
  "ai",
@@ -34,24 +34,10 @@
34
34
  ".claude-plugin/plugin.json",
35
35
  ".codex-plugin/plugin.json",
36
36
  "hooks",
37
- "commands",
38
37
  "skills",
39
38
  "README.md"
40
39
  ],
41
40
  "type": "module",
42
- "scripts": {
43
- "build": "node scripts/build.mjs",
44
- "capture": "node scripts/capture-fixtures.mjs",
45
- "release": "node scripts/release.mjs",
46
- "test": "vitest run",
47
- "test:watch": "vitest",
48
- "typecheck": "tsc --noEmit",
49
- "prepublishOnly": "pnpm run build",
50
- "fmt": "oxfmt",
51
- "fmt:check": "oxfmt --check",
52
- "lint": "oxlint",
53
- "lint:fix": "oxlint --fix"
54
- },
55
41
  "dependencies": {
56
42
  "diff": "^9.0.0",
57
43
  "shiki": "^4.4.3",
@@ -66,6 +52,19 @@
66
52
  "vitest": "^4.0.0"
67
53
  },
68
54
  "engines": {
69
- "node": ">=20"
55
+ "node": ">=22"
56
+ },
57
+ "scripts": {
58
+ "build": "node scripts/build.mjs",
59
+ "capture": "node scripts/capture-fixtures.mjs",
60
+ "release": "node scripts/release.mjs",
61
+ "test": "vitest run",
62
+ "test:watch": "vitest",
63
+ "typecheck": "tsc --noEmit",
64
+ "fmt": "oxfmt",
65
+ "fmt:check": "oxfmt --check",
66
+ "lint": "oxlint",
67
+ "lint:fix": "oxlint --fix",
68
+ "syntax": "node scripts/fetch-syntax.mjs"
70
69
  }
71
- }
70
+ }
@@ -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>`.
package/commands/pair.md DELETED
@@ -1,18 +0,0 @@
1
- ---
2
- description: Toggle pair mode. Every proposed edit opens in the pair review pane for line annotation.
3
- allowed-tools: Bash(node:*)
4
- ---
5
-
6
- Run `node "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" $ARGUMENTS` and report the resulting state in one line.
7
-
8
- With no action, run it with `status`.
9
-
10
- Pair mode intercepts your Write, Edit, and MultiEdit calls. The user reads the proposed diff in the
11
- pair review pane, selects lines, and attaches notes. Pair mode then holds the edit and
12
- returns those notes as questions anchored to line numbers. Answer every question. Do not
13
- re-attempt the edit until the user asks for it. An edit the user closes with no notes
14
- applies as proposed.
15
-
16
- Pair mode keys the flag by the real directory path, and the hook walks up from the edited
17
- file. A flag on a parent directory therefore covers every repo beneath it. If pair mode
18
- stays on after an `off`, check each parent with `status <dir>`.
@@ -1,20 +0,0 @@
1
- ---
2
- name: pair
3
- description: Toggle pair mode. Every proposed edit opens in the pair review pane for line annotation.
4
- ---
5
-
6
- Read the action from the user's message, then run `pair-mode <action>` and report the resulting state in one line.
7
-
8
- With no action, run `pair-mode status`.
9
-
10
- Pair mode intercepts your apply_patch, Write, and Edit calls. The user reads the proposed diff in the
11
- pair review pane, selects lines, and attaches notes. Pair mode then holds the edit and
12
- returns those notes as questions anchored to line numbers. Answer every question. Do not
13
- re-attempt the edit until the user asks for it. An edit the user closes with no notes
14
- applies as proposed.
15
-
16
- Pair mode keys the flag by the real directory path, and the hook walks up from the edited
17
- file. A flag on a parent directory therefore covers every repo beneath it. If pair mode
18
- stays on after an `off`, check each parent with `pair-mode status <dir>`.
19
-
20
- The `pair-mode` command must resolve on PATH. Install it with `npm install -g pair-mode`.