pair-mode 0.2.1 → 0.3.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.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "pair-mode",
3
+ "version": "0.3.0",
4
+ "description": "Hold every proposed edit, annotate the diff line by line, and hand the notes back to the agent.",
5
+ "author": {
6
+ "name": "ofrusch",
7
+ "email": "owenc343@gmail.com"
8
+ },
9
+ "homepage": "https://github.com/oFrusch/pair-mode#readme",
10
+ "repository": "https://github.com/oFrusch/pair-mode.git",
11
+ "license": "MIT"
12
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "pair-mode",
3
+ "version": "0.3.0",
4
+ "description": "Hold every proposed edit, annotate the diff line by line, and hand the notes back to the agent.",
5
+ "author": {
6
+ "name": "ofrusch",
7
+ "url": "https://github.com/oFrusch"
8
+ },
9
+ "homepage": "https://github.com/oFrusch/pair-mode#readme",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "code-review",
13
+ "diff",
14
+ "hooks",
15
+ "pair-programming",
16
+ "terminal"
17
+ ],
18
+ "hooks": "./hooks/codex.json",
19
+ "skills": "./skills/",
20
+ "interface": {
21
+ "displayName": "Pair Mode",
22
+ "shortDescription": "Review each proposed edit before it lands",
23
+ "longDescription": "Pair mode intercepts every proposed edit. It renders the diff in a terminal pane or a browser page, collects notes anchored to line numbers, then holds the edit and returns those notes to the agent. A review you close with no notes applies the edit as proposed.",
24
+ "developerName": "ofrusch",
25
+ "category": "Engineering",
26
+ "websiteURL": "https://github.com/oFrusch/pair-mode",
27
+ "logo": "./assets/duck.png"
28
+ }
29
+ }
package/README.md CHANGED
@@ -21,6 +21,28 @@ npm install -g pair-mode
21
21
  pair-mode setup
22
22
  ```
23
23
 
24
+ ### Or install it as a plugin
25
+
26
+ A plugin resolves its own path at runtime, so it needs no global install and no setup step.
27
+
28
+ Claude Code:
29
+
30
+ ```
31
+ /plugin marketplace add oFrusch/pair-mode
32
+ /plugin install pair-mode
33
+ ```
34
+
35
+ Codex:
36
+
37
+ ```
38
+ codex plugin marketplace add oFrusch/pair-mode
39
+ codex plugin add pair-mode@pair-mode
40
+ ```
41
+
42
+ The plugin registers the hook and the `/pair` command for that one CLI. Run
43
+ `npm install -g pair-mode` as well if you want the `pair-mode` command on your PATH, which
44
+ `pair-mode watch` and `pair-mode config` need.
45
+
24
46
  Install pair-mode globally before you run setup. Setup writes the install path into each CLI's config as an absolute path. `npx pair-mode setup` runs from a package cache that npm later prunes, which would leave every hook pointing at a deleted file. Setup detects that case and stops.
25
47
 
26
48
  The setup command detects the CLIs and multiplexers on your machine, registers the
@@ -0,0 +1,18 @@
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>`.
@@ -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.0",
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,11 @@
31
31
  "files": [
32
32
  "dist",
33
33
  "assets",
34
+ ".claude-plugin/plugin.json",
35
+ ".codex-plugin/plugin.json",
36
+ "hooks",
37
+ "commands",
38
+ "skills",
34
39
  "README.md"
35
40
  ],
36
41
  "type": "module",
@@ -0,0 +1,20 @@
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`.