@aayambansal/squint 0.6.1 → 0.7.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 CHANGED
@@ -102,6 +102,7 @@ From source: `git clone https://github.com/aayambansal/squint.git && cd squint &
102
102
  | --- | --- | --- |
103
103
  | Claude Code | `claude` | `npm i -g @anthropic-ai/claude-code` |
104
104
  | Codex CLI | `codex` | `npm i -g @openai/codex` |
105
+ | Codex (app-server) | `codex-app` | same binary — drives the published JSON-RPC protocol |
105
106
  | Gemini CLI | `gemini` | `npm i -g @google/gemini-cli` |
106
107
  | OpenCode | `opencode` | `npm i -g opencode-ai` |
107
108
  | Amp | `amp` | `npm i -g @sourcegraph/amp` |
@@ -149,8 +150,10 @@ squint doctor --probe # run every engine end to end, verify auth act
149
150
  - **Editing**: a real line editor — arrows move, `alt+←/→` jump words, `ctrl+a/e/k/u/w`,
150
151
  `↑/↓` history. `ctrl+c` twice exits with a session summary.
151
152
  - **Flows**: declare user journeys as six readable lines in `.squint/flows/`; `/flows`
152
- replays them headlessly and failing steps join the fix loop. `/score` snapshots quality
153
- deterministically.
153
+ replays them headlessly and failing steps join the fix loop; `/flows suggest` drafts
154
+ a smoke flow per route from the live page's own headings. `/score` snapshots quality
155
+ deterministically. `/goal <objective>` arms a standing goal — auto-fix presses to 6
156
+ attempts until squint's checks come back clean.
154
157
  - **Problems**: findings from gates, the dev server, the runtime probe, a11y sweeps, and flows
155
158
  collect into a list — `/problems` shows it, `/fix` sends everything as one turn,
156
159
  `/fix <n>` targets one. The footer counts what's open.
@@ -176,7 +179,11 @@ squint doctor --probe # run every engine end to end, verify auth act
176
179
  the injected-context bill per source, with staleness warnings.
177
180
  - **Two more doors in**: `squint mcp` serves the gates as MCP tools (any
178
181
  MCP-speaking agent calls squint's verification directly); `squint ci` runs the
179
- whole loop headlessly in a pipeline — JSON report, non-zero exit on hard findings.
182
+ whole loop headlessly in a pipeline — JSON report, non-zero exit on hard findings,
183
+ and a digest-sealed receipt per run at `.squint/receipts/` tying the green claim
184
+ to the exact pixels it was green about.
185
+ - **The review lane**: `/lane on` — every ask gets a second read-only reviewer in
186
+ fresh context over the diff alone; blind spots don't inherit.
180
187
  - **The sentinel**: gate evasion (deleted tests, added skips, suppressed
181
188
  diagnostics, weakened checks, locked-path touches) detected deterministically per
182
189
  turn and reported to you — never sent back to the engine that did it.
@@ -189,8 +196,10 @@ squint doctor --probe # run every engine end to end, verify auth act
189
196
  - **Visual approval**: engines ask before contested changes — the request renders
190
197
  with its screenshot, `/yes` / `/no` answer it, the ledger remembers.
191
198
  - **The design ledger**: `/decide` (plus chosen variants, rollbacks, accepted
192
- sandboxes) appends to a committed `.squint/design-log.jsonl`; recent decisions ride
193
- into every ask so they stop getting silently undone between sessions.
199
+ sandboxes, approvals) appends to a committed `.squint/design-log.jsonl`; recent
200
+ decisions ride into every ask so they stop getting silently undone between
201
+ sessions. `/distill` compresses the ledger into always-on rules and proposed
202
+ persistent checks — accumulated taste becomes deterministic gates.
194
203
  - **`/btw <question>`** asks about the codebase read-only without touching the main
195
204
  thread's context. `.squint/locks` lists paths the engine must never touch; `/save`
196
205
  exports the transcript as markdown.
@@ -235,11 +244,12 @@ and an avoid-list tuned to that family's failure modes. Plain markdown, made to
235
244
  | stream | | headless screenshots |
236
245
  +------+-------+ +-------------------------+
237
246
  |
238
- claude . codex . gemini . opencode . amp . cursor . copilot . aider
247
+ claude . codex . codex-app . gemini . opencode . amp . cursor . copilot . aider
239
248
  ```
240
249
 
241
250
  Engines are dumb translators: build a headless invocation, parse the stream into one
242
- normalized event model. Claude Code, Amp, and Cursor share a single wire-protocol parser.
251
+ normalized event model. Claude Code, Amp, and Cursor share a single wire-protocol
252
+ parser; `codex-app` speaks the app-server JSON-RPC protocol through an embedded driver.
243
253
  All product behavior lives in the harness, so a new engine is ~80 lines.
244
254
 
245
255
  ## Repo layout
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  App
4
- } from "./chunk-ZG3XQDUW.js";
5
- import "./chunk-3GHZOVAA.js";
6
- import "./chunk-5MQOJYUC.js";
4
+ } from "./chunk-6OFUO3UT.js";
5
+ import "./chunk-LNJ7O5O4.js";
6
+ import "./chunk-7PKIVVRB.js";
7
7
  import "./chunk-UBADCBPT.js";
8
8
  import "./chunk-IEQGTVWN.js";
9
9
  import "./chunk-AUJJGMZG.js";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  completeCommand
4
- } from "./chunk-3GHZOVAA.js";
4
+ } from "./chunk-LNJ7O5O4.js";
5
5
  import {
6
6
  Session
7
- } from "./chunk-5MQOJYUC.js";
7
+ } from "./chunk-7PKIVVRB.js";
8
8
 
9
9
  // src/tui/App.tsx
10
10
  import { Box as Box3, Static, Text as Text3, useApp, useInput } from "ink";
@@ -157,6 +157,8 @@ var Session = class {
157
157
  reviewTipShown = false;
158
158
  pendingApproval = null;
159
159
  goal = null;
160
+ laneEnabled = false;
161
+ inLane = false;
160
162
  lastPulse = null;
161
163
  lastPerf = null;
162
164
  autoReviewedThisAsk = false;
@@ -678,8 +680,49 @@ ${probe.checkFailures.slice(0, 5).join("\n")}`);
678
680
  }
679
681
  }
680
682
  this.notify({ running: false });
683
+ await this.maybeLaneReview(display);
681
684
  this.drainQueue();
682
685
  }
686
+ /**
687
+ * The review lane: a second read-only pass in fresh context after
688
+ * each real ask — the diff, not the conversation, so it can't inherit
689
+ * the implementer's blind spots. Findings render as critique; nothing
690
+ * here edits. Costs a cheap turn (fixModel when set); off by default.
691
+ */
692
+ async maybeLaneReview(display) {
693
+ if (!this.laneEnabled || this.inLane) return;
694
+ if (display.startsWith("\u26D1") || display.startsWith("\u{1F441}") || display.startsWith("\u{1F50E}") || display.startsWith("/distill")) return;
695
+ const checkpoint = this.checkpoints.at(-1);
696
+ if (!checkpoint) return;
697
+ let diff;
698
+ try {
699
+ const { execFileSync } = await import("child_process");
700
+ diff = execFileSync("git", ["diff", checkpoint.snapshot.stashHash ?? "HEAD"], {
701
+ cwd: this.execCwd(),
702
+ encoding: "utf8",
703
+ stdio: ["ignore", "pipe", "pipe"]
704
+ });
705
+ } catch {
706
+ return;
707
+ }
708
+ if (diff.trim().length === 0) return;
709
+ const capped = diff.length > 2e4 ? `${diff.slice(0, 2e4)}
710
+ [diff truncated]` : diff;
711
+ this.inLane = true;
712
+ try {
713
+ await this.runTurn(
714
+ `You are a second reviewer in fresh context. The diff below just landed for the ask "${display}". Review ONLY the diff \u2014 do not edit anything, do not run commands that modify state. Report at most 3 concrete findings ranked by severity (bugs, regressions, accessibility, design-system violations), each with file and line. If it is clean, say so in one line.
715
+
716
+ \`\`\`diff
717
+ ${capped}
718
+ \`\`\``,
719
+ "\u{1F50E} lane review",
720
+ this.opts.fixModel
721
+ );
722
+ } finally {
723
+ this.inLane = false;
724
+ }
725
+ }
683
726
  async submit(ask) {
684
727
  this.fixAttempts = 0;
685
728
  this.autoReviewedThisAsk = false;
@@ -967,6 +1010,18 @@ They are objective defects, not style preferences.`
967
1010
  }
968
1011
  break;
969
1012
  }
1013
+ case "lane": {
1014
+ if (arg === "on") {
1015
+ this.laneEnabled = true;
1016
+ this.push("status", "review lane on \u2014 every ask gets a second read-only pass over its diff (fixModel when set)");
1017
+ } else if (arg === "off") {
1018
+ this.laneEnabled = false;
1019
+ this.push("status", "review lane off");
1020
+ } else {
1021
+ this.push("status", `review lane is ${this.laneEnabled ? "on" : "off"} \u2014 /lane on|off`);
1022
+ }
1023
+ break;
1024
+ }
970
1025
  case "distill": {
971
1026
  void (async () => {
972
1027
  const { loadDecisions } = await import("./designLog-S67J7SO2.js");
@@ -1481,7 +1536,7 @@ ${sandboxFiles(this.opts.cwd).join("\n")}`);
1481
1536
  this.notify({ items: [], totals: { costUsd: 0, turns: 0 } });
1482
1537
  break;
1483
1538
  case "help": {
1484
- void import("./commands-RVCKIMNV.js").then(({ commandHelp }) => this.push("status", commandHelp()));
1539
+ void import("./commands-OBCLYABX.js").then(({ commandHelp }) => this.push("status", commandHelp()));
1485
1540
  break;
1486
1541
  }
1487
1542
  case "quit":
@@ -29,6 +29,7 @@ var COMMANDS = [
29
29
  { name: "decide", args: "<text>", group: "session", description: "record a design decision; injected into every future ask" },
30
30
  { name: "goal", args: "[text|off]", group: "build", description: "arm a standing objective; auto-fix presses until checks are clean" },
31
31
  { name: "distill", group: "session", description: "compress the design ledger into rules.md lines and proposed checks" },
32
+ { name: "lane", args: "on|off", group: "verify", description: "second read-only reviewer over each turn's diff, fresh context" },
32
33
  { name: "context", group: "session", description: "what squint injects per ask, token-costed, with staleness warnings" },
33
34
  { name: "yes", args: "[note]", group: "build", description: "approve the engine's pending visual-approval request" },
34
35
  { name: "no", args: "[note]", group: "build", description: "reject the engine's pending visual-approval request" },
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Session
4
- } from "./chunk-5MQOJYUC.js";
4
+ } from "./chunk-7PKIVVRB.js";
5
5
 
6
6
  // src/daemon/client.ts
7
7
  import net from "net";
package/dist/cli.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  App
4
- } from "./chunk-ZG3XQDUW.js";
5
- import "./chunk-3GHZOVAA.js";
4
+ } from "./chunk-6OFUO3UT.js";
5
+ import "./chunk-LNJ7O5O4.js";
6
6
  import {
7
7
  connectDaemon,
8
8
  socketPath,
9
9
  startDaemon
10
- } from "./chunk-SKNZ2PJF.js";
11
- import "./chunk-5MQOJYUC.js";
10
+ } from "./chunk-ORJPNSTE.js";
11
+ import "./chunk-7PKIVVRB.js";
12
12
  import "./chunk-UBADCBPT.js";
13
13
  import "./chunk-IEQGTVWN.js";
14
14
  import "./chunk-AUJJGMZG.js";
@@ -194,11 +194,11 @@ function registerDaemon(program2) {
194
194
  const cwd = process.cwd();
195
195
  if (!opts.plain) {
196
196
  try {
197
- const { RemoteSession } = await import("./remote-LOQ5WKAS.js");
197
+ const { RemoteSession } = await import("./remote-TOZNJWGE.js");
198
198
  const remote = await RemoteSession.connect(cwd);
199
199
  const config = loadConfig(defaultPaths(cwd));
200
200
  const { render: render2 } = await import("ink");
201
- const { App: App2 } = await import("./App-54M5DS3T.js");
201
+ const { App: App2 } = await import("./App-OHKGQTDL.js");
202
202
  const React = await import("react");
203
203
  render2(
204
204
  React.createElement(App2, {
@@ -604,7 +604,7 @@ function registerQuality(program2) {
604
604
  report.ok = !failed;
605
605
  report.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
606
606
  try {
607
- const { writeReceipt } = await import("./receipts-JEOMBMFI.js");
607
+ const { writeReceipt } = await import("./receipts-EFFO3NYZ.js");
608
608
  console.log(pc5.dim(`receipt \u2192 ${writeReceipt(cwd, report)}`));
609
609
  } catch {
610
610
  }
@@ -803,7 +803,7 @@ function registerTui(program2) {
803
803
  }
804
804
 
805
805
  // src/cli.tsx
806
- var VERSION = true ? "0.6.1" : "0.0.0-dev";
806
+ var VERSION = true ? "0.7.0" : "0.0.0-dev";
807
807
  var program = new Command();
808
808
  program.name("squint").description("Lovable for your terminal \u2014 a frontend harness on top of Claude Code, Codex, and friends.").version(VERSION);
809
809
  registerRun(program);
@@ -3,7 +3,7 @@ import {
3
3
  COMMANDS,
4
4
  commandHelp,
5
5
  completeCommand
6
- } from "./chunk-3GHZOVAA.js";
6
+ } from "./chunk-LNJ7O5O4.js";
7
7
  export {
8
8
  COMMANDS,
9
9
  commandHelp,
@@ -31,7 +31,7 @@ function buildReceipt(cwd, report) {
31
31
  }
32
32
  }
33
33
  const unsigned = {
34
- version: true ? "0.6.1" : "0.0.0-dev",
34
+ version: true ? "0.7.0" : "0.0.0-dev",
35
35
  node: process.version,
36
36
  gitHead,
37
37
  report,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  connectDaemon,
4
4
  socketPath
5
- } from "./chunk-SKNZ2PJF.js";
6
- import "./chunk-5MQOJYUC.js";
5
+ } from "./chunk-ORJPNSTE.js";
6
+ import "./chunk-7PKIVVRB.js";
7
7
  import "./chunk-UBADCBPT.js";
8
8
  import "./chunk-IEQGTVWN.js";
9
9
  import "./chunk-AUJJGMZG.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aayambansal/squint",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Lovable for your terminal \u2014 a frontend harness on top of Claude Code, Codex, and other coding agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",