looply-cli 0.5.52 → 0.5.53

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.
Files changed (48) hide show
  1. package/dist/autonomy-controller.d.ts.map +1 -1
  2. package/dist/autonomy-controller.js +19 -0
  3. package/dist/autonomy-controller.js.map +1 -1
  4. package/dist/branch-delivery.d.ts +48 -1
  5. package/dist/branch-delivery.d.ts.map +1 -1
  6. package/dist/branch-delivery.js +203 -4
  7. package/dist/branch-delivery.js.map +1 -1
  8. package/dist/bug-repro.d.ts +76 -9
  9. package/dist/bug-repro.d.ts.map +1 -1
  10. package/dist/bug-repro.js +199 -13
  11. package/dist/bug-repro.js.map +1 -1
  12. package/dist/daemon-cmd.js +2 -2
  13. package/dist/goal-adaptive.d.ts +36 -3
  14. package/dist/goal-adaptive.d.ts.map +1 -1
  15. package/dist/goal-adaptive.js +74 -7
  16. package/dist/goal-adaptive.js.map +1 -1
  17. package/dist/goal-already-met.d.ts +62 -0
  18. package/dist/goal-already-met.d.ts.map +1 -0
  19. package/dist/goal-already-met.js +95 -0
  20. package/dist/goal-already-met.js.map +1 -0
  21. package/dist/goal-execution-evidence.d.ts +7 -1
  22. package/dist/goal-execution-evidence.d.ts.map +1 -1
  23. package/dist/goal-execution-evidence.js +12 -1
  24. package/dist/goal-execution-evidence.js.map +1 -1
  25. package/dist/goal-gap.d.ts +48 -5
  26. package/dist/goal-gap.d.ts.map +1 -1
  27. package/dist/goal-gap.js +103 -13
  28. package/dist/goal-gap.js.map +1 -1
  29. package/dist/pursuit-ending.d.ts.map +1 -1
  30. package/dist/pursuit-ending.js +11 -0
  31. package/dist/pursuit-ending.js.map +1 -1
  32. package/dist/run-cmd.d.ts.map +1 -1
  33. package/dist/run-cmd.js +40 -1
  34. package/dist/run-cmd.js.map +1 -1
  35. package/dist/server-client.d.ts.map +1 -1
  36. package/dist/server-client.js +12 -0
  37. package/dist/server-client.js.map +1 -1
  38. package/dist/setup-check-wiring.d.ts +8 -0
  39. package/dist/setup-check-wiring.d.ts.map +1 -1
  40. package/dist/setup-check-wiring.js +61 -9
  41. package/dist/setup-check-wiring.js.map +1 -1
  42. package/dist/setup-check.d.ts +4 -0
  43. package/dist/setup-check.d.ts.map +1 -1
  44. package/dist/setup-check.js +52 -2
  45. package/dist/setup-check.js.map +1 -1
  46. package/package.json +2 -2
  47. package/win/contained-node.cjs +110 -1
  48. package/dist/.src-hash +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "looply-cli",
3
- "version": "0.5.52",
3
+ "version": "0.5.53",
4
4
  "description": "Leave your coding agent running. looply picks the work, holds the rails, and proves every change before it is kept.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -32,7 +32,7 @@
32
32
  "prepublishOnly": "npm run build"
33
33
  },
34
34
  "dependencies": {
35
- "@looply/core": "0.5.52",
35
+ "@looply/core": "0.5.53",
36
36
  "pdfjs-dist": "5.6.205",
37
37
  "qrcode-terminal": "0.12.0",
38
38
  "yaml": "2.9.0"
@@ -39,6 +39,19 @@
39
39
  component, following the links the container CAN see and taking the
40
40
  ancestors it cannot see as they are. Any other error is unchanged.
41
41
 
42
+ 3. A PROJECT THAT IS A DRIVE ROOT. Gate steps run from a drive letter mapped
43
+ to the checkout, so the project directory is `Z:\` — and realpath (2)
44
+ keeps it so. Jest 29 joins paths as `rootDir + sep + relative`, which
45
+ for a root that already ends in a separator gives `Z:\\src\x.spec.ts`;
46
+ its `roots` filter (built from `Z:\src` + sep) and a test-file pattern
47
+ then match NOTHING, and jest says "No tests found … roots: Z:\src -
48
+ 0 matches" for files it has just counted (Tabsy, 2026-11-11: six bug
49
+ fixes delivered unproven, six tickets ended on the plan limit). A
50
+ config WITHOUT `roots` only worked because the same doubled separator
51
+ is in its root pattern too. Jest's own two path helpers are corrected
52
+ for a root that ends in a separator, and only for that: for every
53
+ other directory they are called exactly as shipped.
54
+
42
55
  Installed only when `LOOPLY_CONTAINED_NODE=1`, so requiring the file to test
43
56
  it changes nothing.
44
57
  */
@@ -188,6 +201,93 @@ function installRealpath(fs, path) {
188
201
  };
189
202
  }
190
203
 
204
+ /* ──────────────────────────────────────────── a project at a drive root ── */
205
+
206
+ /** `Z:\` or `Z:/` — a directory whose name already ends in a separator. */
207
+ function endsInSeparator(path, dir) {
208
+ return typeof dir === 'string' && dir.length > 0 && (dir.endsWith(path.sep) || dir.endsWith('/'));
209
+ }
210
+
211
+ /**
212
+ * Jest's `fast_path` helpers, corrected for a root directory that ends in a
213
+ * separator. Shipped, they are `rootDir + sep + relative` and its inverse — so
214
+ * `Z:\` + `\` + `src\x.spec.ts` is `Z:\\src\x.spec.ts`, a path no `roots`
215
+ * entry and no test-file pattern ever matches. For any other root directory
216
+ * the shipped function is called unchanged.
217
+ */
218
+ function rootSafeFastPath(path, shipped) {
219
+ return {
220
+ relative(rootDir, filename) {
221
+ if (!endsInSeparator(path, rootDir)) return shipped.relative(rootDir, filename);
222
+ return typeof filename === 'string' && filename.startsWith(rootDir)
223
+ ? filename.slice(rootDir.length)
224
+ : path.relative(rootDir, filename);
225
+ },
226
+ resolve(rootDir, relativeFilename) {
227
+ if (!endsInSeparator(path, rootDir)) return shipped.resolve(rootDir, relativeFilename);
228
+ return relativeFilename.startsWith('..' + path.sep)
229
+ ? path.resolve(rootDir, relativeFilename)
230
+ : rootDir + relativeFilename;
231
+ },
232
+ };
233
+ }
234
+
235
+ /**
236
+ * Jest's `escapePathForRegex`, for the one input a drive-root project gives it
237
+ * that names no directory: `Z:\` + `\`. Jest builds its `roots` pattern as
238
+ * `escape(root + sep)`, so a config whose roots are the project itself (the
239
+ * default) asked for a doubled separator — which is why it USED to work: the
240
+ * paths were doubled the same way. With the paths corrected, the pattern must
241
+ * be too. Every other input is passed through.
242
+ */
243
+ function rootSafeEscapePath(shipped) {
244
+ return function escapePathForRegex(dir) {
245
+ const doubled = typeof dir === 'string' ? /^([A-Za-z]:[\\/])[\\/]+$/.exec(dir) : null;
246
+ return shipped(doubled === null ? dir : doubled[1]);
247
+ };
248
+ }
249
+
250
+ const JEST_FAST_PATH = /[\\/]jest-haste-map[\\/]build[\\/]lib[\\/]fast_path\.js$/;
251
+ const JEST_REGEX_UTIL = /[\\/]jest-regex-util[\\/]build[\\/]index\.js$/;
252
+
253
+ /**
254
+ * Correct one freshly loaded module if it is one of jest's two path helpers.
255
+ * Both are plain CommonJS whose callers look the function up on the module at
256
+ * every call, so replacing the export is enough. Returns what it did.
257
+ */
258
+ function patchJestModule(path, filename, exports) {
259
+ if (typeof filename !== 'string' || exports === null || typeof exports !== 'object') return null;
260
+ if (exports.__looplyRootSafe === true) return null;
261
+ if (JEST_FAST_PATH.test(filename) && typeof exports.relative === 'function' && typeof exports.resolve === 'function') {
262
+ const safe = rootSafeFastPath(path, { relative: exports.relative, resolve: exports.resolve });
263
+ exports.relative = safe.relative;
264
+ exports.resolve = safe.resolve;
265
+ exports.__looplyRootSafe = true;
266
+ return 'fast_path';
267
+ }
268
+ if (JEST_REGEX_UTIL.test(filename) && typeof exports.escapePathForRegex === 'function') {
269
+ exports.escapePathForRegex = rootSafeEscapePath(exports.escapePathForRegex);
270
+ exports.__looplyRootSafe = true;
271
+ return 'regex_util';
272
+ }
273
+ return null;
274
+ }
275
+
276
+ /** Every CommonJS module Node compiles is offered to {@link patchJestModule}. */
277
+ function installJestRoot(path) {
278
+ const Module = require('module');
279
+ const compile = Module.prototype._compile;
280
+ Module.prototype._compile = function _compile(content, filename) {
281
+ const ret = compile.apply(this, arguments);
282
+ try {
283
+ patchJestModule(path, filename, this.exports);
284
+ } catch {
285
+ /* a module we could not correct runs as shipped */
286
+ }
287
+ return ret;
288
+ };
289
+ }
290
+
191
291
  /* ───────────────────────────────────────────────────── piped children ── */
192
292
 
193
293
  /** Every piped slot normalised the way Node normalises it. */
@@ -540,6 +640,7 @@ function install() {
540
640
  /* a temp directory we cannot make is a failure for whoever needs it */
541
641
  }
542
642
  installRealpath(deps.fs, deps.path);
643
+ installJestRoot(deps.path);
543
644
  installSpawn(deps);
544
645
  installSync(deps);
545
646
  // ESM `import { spawn } from 'node:child_process'` reads a snapshot of the
@@ -548,6 +649,14 @@ function install() {
548
649
  return true;
549
650
  }
550
651
 
551
- module.exports = { install, lenientRealpath, leftItsDrive, normaliseStdio, IPC_REFUSAL, LOCAL_PIPE_PREFIX };
652
+ module.exports = {
653
+ install,
654
+ lenientRealpath,
655
+ leftItsDrive,
656
+ normaliseStdio,
657
+ patchJestModule,
658
+ IPC_REFUSAL,
659
+ LOCAL_PIPE_PREFIX,
660
+ };
552
661
 
553
662
  if (process.env.LOOPLY_CONTAINED_NODE === '1') install();
package/dist/.src-hash DELETED
@@ -1 +0,0 @@
1
- 951ebccfa8ae9a9738f247298cae10c1ecf1a3476d7f3f3d0ef1e22887ee87a1