@coderook/cli 0.46.0 → 0.46.1

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.
@@ -2,7 +2,7 @@
2
2
  "name": "coderook",
3
3
  "displayName": "CodeRook",
4
4
  "description": "Save, browse and restore whole-snapshot versions of a project on CodeRook, with cbx or plain git, from Claude Code.",
5
- "version": "0.46.0",
5
+ "version": "0.46.1",
6
6
  "author": {
7
7
  "name": "ACCA Gaming Productions",
8
8
  "url": "https://coderook.com"
@@ -96,13 +96,35 @@ function engineProblem() {
96
96
  return broken;
97
97
  return enginePath() ? null : "no engine for this platform";
98
98
  }
99
- /** Whether a batch of this size is worth handing to the engine. */
99
+ /*
100
+ Whether the engine should open and read files itself (store, measure), as
101
+ opposed to only walking folders (scan).
102
+
103
+ Not on Windows, for now. With real-time protection on, which is nearly
104
+ everyone, Windows Security scans each new file when the unsigned engine
105
+ opens it and barely slows Node, a signed and widely known program. On a
106
+ fresh copy of 8,525 files the engine took 13–16 s to store what Node read
107
+ and stored in 3 s; with protection off the engine took 0.5 s. Until the
108
+ engine is signed, Windows reads files here and the engine keeps the folder
109
+ walk, which only lists and stats and is not scanned. CBX_ENGINE_READS=on
110
+ turns engine reads back on.
111
+ */
112
+ function engineMayRead() {
113
+ if (process.env.CBX_ENGINE_READS === "on")
114
+ return true;
115
+ if (process.env.CBX_ENGINE_READS === "off")
116
+ return false;
117
+ return process.platform !== "win32";
118
+ }
119
+ /** Whether a batch of this size is worth handing to the engine to read. */
100
120
  function worthTheEngine(files, bytes) {
101
121
  if (enginePath() === null || broken || files === 0)
102
122
  return false;
103
123
  /* CBX_ENGINE_ALWAYS=1 sends every batch, however small, so tests can run everything through it. */
104
124
  if (process.env.CBX_ENGINE_ALWAYS === "1")
105
125
  return true;
126
+ if (!engineMayRead())
127
+ return false;
106
128
  return files >= exports.ENGINE_MIN_FILES || bytes >= exports.ENGINE_MIN_BYTES;
107
129
  }
108
130
  function run(args, input, onLine, signal) {
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderook/cli",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
4
4
  "description": "The command line for CodeRook (coderook.com): version control and project hosting for projects of any size. Every save is a compressed snapshot, private or public, never used to train AI.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://coderook.com",