glassbox 0.15.0-beta.6 → 0.15.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.
- package/README.md +31 -7
- package/dist/cli.js +15 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,6 +92,7 @@ Then you run `glassbox` again. Your previous annotations carry forward — match
|
|
|
92
92
|
- **Drag and drop** annotations to different lines
|
|
93
93
|
- **Double-click** to edit, click the category badge to reclassify
|
|
94
94
|
- **Collapsible folder tree** in the sidebar with file filter
|
|
95
|
+
- **Right-click any file** in the sidebar — reveal in your file manager, copy its path, open it in your editor, or mark it reviewed
|
|
95
96
|
- **Resizable sidebar** and word wrap toggle
|
|
96
97
|
- **Keyboard navigation** — `j`/`k` to move between files, `Cmd+Enter` to save
|
|
97
98
|
- **Go-to-definition and a nav stack** — click any symbol to jump to its definition, with back/forward through your trail
|
|
@@ -104,7 +105,8 @@ Then you run `glassbox` again. Your previous annotations carry forward — match
|
|
|
104
105
|
- **Automatic .gitignore prompt** — reminds you to exclude `.glassbox/` from version control
|
|
105
106
|
- **Auto port selection** — if the default port is busy, it finds an open one
|
|
106
107
|
- **Fully local** — no network calls (unless you opt into AI features), no accounts, no telemetry. Your code stays on your machine.
|
|
107
|
-
- **AI
|
|
108
|
+
- **AI review notes** _(optional)_ — render the generating AI's line-anchored rationale and proof, committed alongside the code in `.pr-notes/`, right in the diff — and reply to any note inline
|
|
109
|
+
- **AI-powered analysis** _(optional)_ — risk scoring, narrative reading order, and guided review, powered by cloud, local (Ollama / LM Studio), or on-device (Apple) models
|
|
108
110
|
|
|
109
111
|
---
|
|
110
112
|
|
|
@@ -144,13 +146,17 @@ Click the shield or book icon in the sidebar to switch from the default folder v
|
|
|
144
146
|
|
|
145
147
|
### Supported providers
|
|
146
148
|
|
|
147
|
-
| Provider | Models
|
|
148
|
-
| ------------- |
|
|
149
|
-
| **Anthropic** | Claude Sonnet 4,
|
|
150
|
-
| **OpenAI** | GPT-4o, GPT-4o Mini
|
|
151
|
-
| **Google** | Gemini 2.5 Flash, Gemini 2.5 Pro
|
|
149
|
+
| Provider | Models | Runs |
|
|
150
|
+
| ------------- | -------------------------------------------- | ----------------------------- |
|
|
151
|
+
| **Anthropic** | Claude Sonnet 4.6, Opus 4.8, Haiku 4.5 | Cloud — `ANTHROPIC_API_KEY` |
|
|
152
|
+
| **OpenAI** | GPT-4o, GPT-4o Mini | Cloud — `OPENAI_API_KEY` |
|
|
153
|
+
| **Google** | Gemini 2.5 Flash, Gemini 2.5 Pro | Cloud — `GEMINI_API_KEY` |
|
|
154
|
+
| **Local** | Any Ollama / LM Studio model | On your machine — no key |
|
|
155
|
+
| **Apple** | On-device Apple Intelligence | On-device (macOS) — no key |
|
|
152
156
|
|
|
153
|
-
|
|
157
|
+
Available models are discovered live from each provider, so the list stays current without an app update. Switch providers and models in the settings dialog (gear icon in the sidebar).
|
|
158
|
+
|
|
159
|
+
**Local and on-device models are free, private, and offline.** Point Glassbox at any OpenAI-compatible server like [Ollama](https://ollama.com/) or [LM Studio](https://lmstudio.ai/), or — on a Mac with Apple Intelligence — run analysis on-device with Apple Foundation Models. Either way, no API key is required and your code never leaves your machine.
|
|
154
160
|
|
|
155
161
|
### API key storage
|
|
156
162
|
|
|
@@ -164,6 +170,24 @@ Keys entered through the settings dialog are stored in the OS keychain by defaul
|
|
|
164
170
|
|
|
165
171
|
---
|
|
166
172
|
|
|
173
|
+
## AI Review Notes
|
|
174
|
+
|
|
175
|
+
When an AI writes or modifies code, it knows _why_ each non-obvious change is the way it is and _what proves it correct_ — and then throws that context away. The reasoning lives in the model's head at edit time, and the reviewer is left to reconstruct it from prose in a ticket or commit message.
|
|
176
|
+
|
|
177
|
+
**AI Review Notes** give the generating AI a structured, line-anchored channel to record that reasoning. The AI emits notes with the `glassbox note` command; they're stored as committed SARIF under `.pr-notes/` — tool-neutral and travelling with the repo — and Glassbox renders them review-comment-style at the exact line they apply to:
|
|
178
|
+
|
|
179
|
+
- **Rationale** — why this change, and what alternatives were rejected
|
|
180
|
+
- **Proof** — the test that passed, a measurement, or a before/after screenshot (notes can carry text and image artifacts)
|
|
181
|
+
- **Risk / assumption** — what a reviewer should double-check
|
|
182
|
+
|
|
183
|
+
<img src="assets/demo-review-notes.png" alt="AI-authored review notes rendered inline with the diff, with a threaded reply" width="720">
|
|
184
|
+
|
|
185
|
+
You can **reply** to any note with your own annotation — threaded beneath it like a pull-request comment. When a note's code later changes, Glassbox re-anchors it to its new line and flags it **outdated**, so stale reasoning never misleads you. And because the notes are plain SARIF in `.pr-notes/`, any tool or teammate can read them — Glassbox is just the most pleasant way to consume them.
|
|
186
|
+
|
|
187
|
+
See [docs/20-ai-review-notes.md](docs/20-ai-review-notes.md) for the format and the producer-side `glassbox note` CLI.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
167
191
|
## Install
|
|
168
192
|
|
|
169
193
|
### Desktop app (recommended)
|
package/dist/cli.js
CHANGED
|
@@ -17401,7 +17401,8 @@ var DEMO_SCENARIOS = [
|
|
|
17401
17401
|
{ id: 3, label: "Narrative mode with walkthrough notes" },
|
|
17402
17402
|
{ id: 4, label: "Annotations with different categories" },
|
|
17403
17403
|
{ id: 5, label: "Settings dialog with guided review" },
|
|
17404
|
-
{ id: 6, label: "Direct comparison (--diff) of two folders" }
|
|
17404
|
+
{ id: 6, label: "Direct comparison (--diff) of two folders" },
|
|
17405
|
+
{ id: 7, label: "AI review notes inline with the diff" }
|
|
17405
17406
|
];
|
|
17406
17407
|
function buildLargeMinifiedSvg(nudge) {
|
|
17407
17408
|
let body = "";
|
|
@@ -17854,6 +17855,10 @@ async function setupDemoReview(scenario) {
|
|
|
17854
17855
|
case 6:
|
|
17855
17856
|
await saveUserPreferences({ sort_mode: "folder" });
|
|
17856
17857
|
break;
|
|
17858
|
+
case 7:
|
|
17859
|
+
await setupReviewNoteReply(fileIdMap);
|
|
17860
|
+
await saveUserPreferences({ sort_mode: "folder" });
|
|
17861
|
+
break;
|
|
17857
17862
|
default:
|
|
17858
17863
|
break;
|
|
17859
17864
|
}
|
|
@@ -17910,6 +17915,14 @@ async function setupAnnotations(fileIdMap) {
|
|
|
17910
17915
|
}
|
|
17911
17916
|
}
|
|
17912
17917
|
}
|
|
17918
|
+
async function setupReviewNoteReply(fileIdMap) {
|
|
17919
|
+
const reply = ANNOTATIONS.find((a) => a.replyToNoteId !== void 0);
|
|
17920
|
+
if (reply === void 0) return;
|
|
17921
|
+
const fileId = fileIdMap.get(reply.filePath);
|
|
17922
|
+
if (fileId !== void 0) {
|
|
17923
|
+
await addAnnotation(fileId, reply.line, reply.side, reply.category, reply.content, reply.replyToNoteId);
|
|
17924
|
+
}
|
|
17925
|
+
}
|
|
17913
17926
|
|
|
17914
17927
|
// src/git/diff.ts
|
|
17915
17928
|
import { existsSync as existsSync2, mkdirSync as mkdirSync3, mkdtempSync, readFileSync as readFileSync2, rmSync as rmSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -25285,7 +25298,7 @@ async function main() {
|
|
|
25285
25298
|
console.log("AI service test mode enabled \u2014 using mock AI responses");
|
|
25286
25299
|
}
|
|
25287
25300
|
if (debug) {
|
|
25288
|
-
console.log(`[debug] Build timestamp: ${"2026-06-
|
|
25301
|
+
console.log(`[debug] Build timestamp: ${"2026-06-20T00:24:24.185Z"}`);
|
|
25289
25302
|
}
|
|
25290
25303
|
if (projectDir !== null) {
|
|
25291
25304
|
process.chdir(projectDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glassbox",
|
|
3
|
-
"version": "0.15.0
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "A local code review tool for AI-generated code. Review diffs, annotate lines, and export structured feedback that AI tools can act on.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|