open-plan-annotator 1.0.3 → 1.0.5
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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +31 -35
- package/bin/open-plan-annotator.cjs +16 -2
- package/install.cjs +18 -5
- package/package.json +4 -2
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"name": "open-plan-annotator",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Interactive plan annotation UI: review, strikethrough, and comment on Claude's plans before approving. Fully local, no external services.",
|
|
15
|
-
"version": "1.0.
|
|
15
|
+
"version": "1.0.5",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "ndom91"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-plan-annotator",
|
|
3
3
|
"description": "Interactive plan annotation UI: review, strikethrough, and comment on Claude's plans before approving. Fully local, no external services.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ndom91"
|
|
7
7
|
},
|
package/README.md
CHANGED
|
@@ -4,43 +4,27 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[]()
|
|
6
6
|
|
|
7
|
-
A fully local agentic coding plugin that intercepts plan mode and opens an annotation UI in your browser. Mark up the plan, send structured feedback to the agent, and receive a revised version — iterate as many times as you need until you're ready to
|
|
8
|
-
|
|
9
|
-
Select text to <code>strikethrough</code>, <code>replace</code>, <code>insert</code>, or <code>comment</code> — then approve the plan or request changes.
|
|
7
|
+
A fully local agentic coding plugin that intercepts plan mode and opens an annotation UI in your browser. Mark up the plan, send structured feedback to the agent, and receive a revised version — iterate as many times as you need until you're ready to approve.
|
|
10
8
|
|
|
9
|
+
Select text to <code>strikethrough</code>, <code>replace</code>, <code>insert</code>, or <code>comment</code> — then approve the plan or request changes
|
|
11
10
|
|
|
12
11
|

|
|
13
12
|
|
|
13
|
+
## How It Works
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
4. **Approve** or **Request Changes**
|
|
21
|
-
5. The tool returns structured JSON output back to the host
|
|
15
|
+
1. Your coding agent (Claude Code or OpenCode) finishes writing a plan
|
|
16
|
+
2. The plugin launches an ephemeral HTTP server and opens a React UI in your browser
|
|
17
|
+
3. You review the plan and annotate it — strikethrough, replace, insert, or comment on any section
|
|
18
|
+
4. **Approve** to let the agent proceed, or **Request Changes** to send your annotations back as structured feedback
|
|
19
|
+
5. The agent revises the plan and the cycle repeats until you're satisfied
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
Everything runs locally. Nothing leaves your machine.
|
|
24
22
|
|
|
25
23
|
## Install
|
|
26
24
|
|
|
27
|
-
> [!NOTE]
|
|
28
|
-
> The first run might take a few seconds if you use pnpm as it blocks postinstall scripts.
|
|
29
|
-
> Claude / OpenCode will trigger the download upon first use then.
|
|
30
|
-
|
|
31
|
-
**1. Install the binary**
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
npm install -g open-plan-annotator
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
This JS shim downloads the correct binary for your platform (macOS, Linux).
|
|
38
|
-
|
|
39
25
|
### Claude Code
|
|
40
26
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
From within Claude Code:
|
|
27
|
+
From within Claude Code, add the marketplace and install the plugin:
|
|
44
28
|
|
|
45
29
|
```
|
|
46
30
|
/plugin marketplace add ndom91/open-plan-annotator
|
|
@@ -66,7 +50,7 @@ OpenCode will install the package and load it automatically. The plugin:
|
|
|
66
50
|
- Returns structured feedback to the agent on approval or rejection
|
|
67
51
|
- Optionally hands off to an implementation agent after approval
|
|
68
52
|
|
|
69
|
-
#### Implementation
|
|
53
|
+
#### Implementation Handoff
|
|
70
54
|
|
|
71
55
|
By default, after a plan is approved the plugin sends "Proceed with implementation." to a `build` agent. To customize or disable this, create `open-plan-annotator.json` in your project's `.opencode/` directory or globally in `~/.config/opencode/`:
|
|
72
56
|
|
|
@@ -81,7 +65,19 @@ By default, after a plan is approved the plugin sends "Proceed with implementati
|
|
|
81
65
|
|
|
82
66
|
Set `enabled` to `false` to disable auto-handoff. Project config overrides global config.
|
|
83
67
|
|
|
84
|
-
###
|
|
68
|
+
### Manual Install
|
|
69
|
+
|
|
70
|
+
If you want to run the binary standalone or build from source:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npm install -g open-plan-annotator
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> [!NOTE]
|
|
77
|
+
> The first run might take a few seconds if you use pnpm, as it blocks postinstall scripts.
|
|
78
|
+
> Claude / OpenCode will trigger the download upon first use then.
|
|
79
|
+
|
|
80
|
+
#### From Source
|
|
85
81
|
|
|
86
82
|
```sh
|
|
87
83
|
git clone https://github.com/ndom91/open-plan-annotator.git
|
|
@@ -96,16 +92,16 @@ Then load it directly in Claude Code:
|
|
|
96
92
|
claude --plugin-dir ./open-plan-annotator
|
|
97
93
|
```
|
|
98
94
|
|
|
99
|
-
##
|
|
95
|
+
## Keyboard Shortcuts
|
|
100
96
|
|
|
101
|
-
|
|
|
102
|
-
|
|
97
|
+
| Action | Shortcut | Description |
|
|
98
|
+
|--------|----------|-------------|
|
|
103
99
|
| Delete | `d` | Strikethrough selected text |
|
|
104
|
-
| Replace | `r` | Replace selected text with new
|
|
105
|
-
| Insert | `i` | Insert text after selection |
|
|
100
|
+
| Replace | `r` | Replace selected text with new content |
|
|
101
|
+
| Insert | `i` | Insert text after the selection |
|
|
106
102
|
| Comment | `c` | Attach a comment to selected text |
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
| Approve | `Cmd+Enter` | Approve the plan and proceed |
|
|
104
|
+
| Request Changes | `Cmd+Shift+Enter` | Send annotations back to the agent |
|
|
109
105
|
|
|
110
106
|
## Development
|
|
111
107
|
|
|
@@ -7,10 +7,11 @@ const fs = require("fs");
|
|
|
7
7
|
const binaryPath = path.join(__dirname, "open-plan-annotator-binary");
|
|
8
8
|
const installScript = path.join(__dirname, "..", "install.cjs");
|
|
9
9
|
|
|
10
|
-
// Buffer stdin immediately so it's not lost if we need to download first
|
|
10
|
+
// Buffer stdin immediately so it's not lost if we need to download first.
|
|
11
|
+
// Skip when stdin is a TTY (manual invocation) to avoid blocking forever.
|
|
11
12
|
let stdinBuffer;
|
|
12
13
|
try {
|
|
13
|
-
stdinBuffer = fs.readFileSync(0);
|
|
14
|
+
stdinBuffer = process.stdin.isTTY ? Buffer.alloc(0) : fs.readFileSync(0);
|
|
14
15
|
} catch {
|
|
15
16
|
stdinBuffer = Buffer.alloc(0);
|
|
16
17
|
}
|
|
@@ -39,6 +40,19 @@ if (!fs.existsSync(binaryPath)) {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
// Handle `open-plan-annotator update` subcommand
|
|
44
|
+
if (process.argv[2] === "update") {
|
|
45
|
+
try {
|
|
46
|
+
execFileSync(binaryPath, ["update"], {
|
|
47
|
+
stdio: "inherit",
|
|
48
|
+
env: { ...process.env, OPEN_PLAN_PKG_MANAGER: detectPackageManager() },
|
|
49
|
+
});
|
|
50
|
+
} catch (e) {
|
|
51
|
+
process.exit(e.status || 1);
|
|
52
|
+
}
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
|
|
42
56
|
// Detect package manager so the binary can suggest the right update command
|
|
43
57
|
function detectPackageManager() {
|
|
44
58
|
const ua = process.env.npm_config_user_agent || "";
|
package/install.cjs
CHANGED
|
@@ -176,9 +176,12 @@ async function main() {
|
|
|
176
176
|
const fallbackUrl = getDownloadUrl();
|
|
177
177
|
console.error(`Downloading open-plan-annotator for ${getPlatformKey()}...`);
|
|
178
178
|
|
|
179
|
+
let archiveBuffer;
|
|
180
|
+
|
|
181
|
+
// Try checksum-verified download via GitHub API first, fall back to direct URL
|
|
179
182
|
try {
|
|
180
183
|
const { assetName, assetUrl, expectedSha256 } = await resolveReleaseAssetAndChecksum();
|
|
181
|
-
|
|
184
|
+
archiveBuffer = await fetch(assetUrl);
|
|
182
185
|
const actualSha256 = sha256Hex(archiveBuffer);
|
|
183
186
|
|
|
184
187
|
if (actualSha256 !== expectedSha256) {
|
|
@@ -186,7 +189,21 @@ async function main() {
|
|
|
186
189
|
`Checksum verification failed for ${assetName} (expected ${expectedSha256}, got ${actualSha256})`,
|
|
187
190
|
);
|
|
188
191
|
}
|
|
192
|
+
} catch (verifiedErr) {
|
|
193
|
+
const message = verifiedErr && verifiedErr.message ? verifiedErr.message : String(verifiedErr);
|
|
194
|
+
console.error(`open-plan-annotator: checksum-verified install failed: ${message}`);
|
|
195
|
+
console.error(`Falling back to direct download (without checksum verification)...`);
|
|
189
196
|
|
|
197
|
+
try {
|
|
198
|
+
archiveBuffer = await fetch(fallbackUrl);
|
|
199
|
+
} catch (fallbackErr) {
|
|
200
|
+
const fbMsg = fallbackErr && fallbackErr.message ? fallbackErr.message : String(fallbackErr);
|
|
201
|
+
console.error(`open-plan-annotator: fallback download also failed: ${fbMsg}`);
|
|
202
|
+
throw verifiedErr;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
try {
|
|
190
207
|
const binaryBuffer = extractBinaryFromTarGz(archiveBuffer);
|
|
191
208
|
|
|
192
209
|
if (!fs.existsSync(destDir)) {
|
|
@@ -203,10 +220,6 @@ async function main() {
|
|
|
203
220
|
} catch {
|
|
204
221
|
// Temp file may not exist
|
|
205
222
|
}
|
|
206
|
-
|
|
207
|
-
const message = err && err.message ? err.message : String(err);
|
|
208
|
-
console.error(`open-plan-annotator: install failed: ${message}`);
|
|
209
|
-
console.error(`Fallback URL for diagnostics: ${fallbackUrl}`);
|
|
210
223
|
throw err;
|
|
211
224
|
}
|
|
212
225
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-plan-annotator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fully local plugin for interactive plan annotation from your Agentic assistants",
|
|
6
6
|
"author": "ndom91",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"postinstall": "node install.cjs",
|
|
35
35
|
"test": "bun test",
|
|
36
|
+
"typecheck": "tsgo --noEmit --project ui/tsconfig.json && tsgo --noEmit --project server/tsconfig.json",
|
|
36
37
|
"build:ui": "cd ui && bun run vite build",
|
|
37
38
|
"build:platforms": "node scripts/build-platforms.cjs",
|
|
38
39
|
"build": "bun run build:ui && node scripts/build-platforms.cjs",
|
|
@@ -50,7 +51,8 @@
|
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@biomejs/biome": "^2.4.4",
|
|
53
|
-
"@types/bun": "^1.3.9"
|
|
54
|
+
"@types/bun": "^1.3.9",
|
|
55
|
+
"@typescript/native-preview": "^7.0.0-dev.20260224.1"
|
|
54
56
|
},
|
|
55
57
|
"dependencies": {
|
|
56
58
|
"@opencode-ai/plugin": "^1.2.14",
|