@mickey-kras/hindsight-memory-router-coding-agents 0.8.2 → 0.8.7

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 (64) hide show
  1. package/DEVIATIONS.md +148 -31
  2. package/README.md +40 -14
  3. package/UPSTREAM.json +10 -10
  4. package/dist/antigravity-hook.js +13 -8
  5. package/dist/antigravity-statusline.js +1 -1
  6. package/dist/antigravity-stop-hook.js +13 -8
  7. package/dist/claude-hook.js +13 -8
  8. package/dist/claude-sessionstart-hook.js +13 -8
  9. package/dist/claude-stop-hook.js +13 -8
  10. package/dist/cline.js +51 -2
  11. package/dist/codebuddy-hook.js +13 -8
  12. package/dist/codebuddy-sessionstart-hook.js +13 -8
  13. package/dist/codebuddy-stop-hook.js +13 -8
  14. package/dist/codex-hook.js +13 -8
  15. package/dist/codex-sessionstart-hook.js +13 -8
  16. package/dist/codex-stop-hook.js +13 -8
  17. package/dist/copilot-hook.js +13 -8
  18. package/dist/copilot-sessionstart-hook.js +13 -8
  19. package/dist/copilot-stop-hook.js +13 -8
  20. package/dist/cursor-hook.js +13 -8
  21. package/dist/cursor-sessionstart-hook.js +13 -8
  22. package/dist/cursor-stop-hook.js +13 -8
  23. package/dist/dcode-hook.js +13 -8
  24. package/dist/dcode-sessionstart-hook.js +13 -8
  25. package/dist/dcode-stop-hook.js +13 -8
  26. package/dist/deepen.js +7 -3
  27. package/dist/devin-hook.js +13 -8
  28. package/dist/devin-sessionstart-hook.js +13 -8
  29. package/dist/devin-stop-hook.js +13 -8
  30. package/dist/droid-hook.js +13 -8
  31. package/dist/droid-sessionstart-hook.js +13 -8
  32. package/dist/droid-stop-hook.js +13 -8
  33. package/dist/dsh.js +51 -2
  34. package/dist/grok-hook.js +13 -8
  35. package/dist/grok-sessionstart-hook.js +13 -8
  36. package/dist/grok-stop-hook.js +13 -8
  37. package/dist/hindsight-seed.js +1 -1
  38. package/dist/index.js +51 -2
  39. package/dist/installer.js +13 -8
  40. package/dist/kilo.js +51 -2
  41. package/dist/kimi-hook.js +13 -8
  42. package/dist/kimi-sessionstart-hook.js +13 -8
  43. package/dist/kimi-stop-hook.js +13 -8
  44. package/dist/mcp-server.js +51 -2
  45. package/dist/opencode2.js +51 -2
  46. package/dist/pi.js +51 -2
  47. package/dist/prime-agent.js +51 -2
  48. package/dist/qwen-hook.js +13 -8
  49. package/dist/qwen-sessionstart-hook.js +13 -8
  50. package/dist/qwen-stop-hook.js +13 -8
  51. package/dist/status.js +1 -1
  52. package/dist/traecode-hook.js +13 -8
  53. package/dist/traecode-sessionstart-hook.js +13 -8
  54. package/dist/traecode-stop-hook.js +13 -8
  55. package/dist/workbuddy-hook.js +13 -8
  56. package/dist/workbuddy-sessionstart-hook.js +13 -8
  57. package/dist/workbuddy-stop-hook.js +13 -8
  58. package/dist/zcode-hook.js +13 -8
  59. package/dist/zcode-sessionstart-hook.js +13 -8
  60. package/dist/zcode-stop-hook.js +13 -8
  61. package/npm-shrinkwrap.json +730 -328
  62. package/package.json +10 -9
  63. package/plugin.json +1 -1
  64. package/skill/SKILL.md +113 -106
@@ -1348,7 +1348,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1348
1348
  ];
1349
1349
 
1350
1350
  // package.json
1351
- var version = "0.8.2";
1351
+ var version = "0.8.7";
1352
1352
 
1353
1353
  // src/core/util.ts
1354
1354
  import { accessSync, constants } from "fs";
@@ -2924,20 +2924,25 @@ function* readJsonl(path) {
2924
2924
  try {
2925
2925
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
2926
2926
  const decoder = new StringDecoder("utf8");
2927
- let pending = "";
2927
+ let fragments = [];
2928
2928
  let position = 0;
2929
2929
  for (; ; ) {
2930
2930
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
2931
2931
  if (bytesRead <= 0) break;
2932
2932
  position += bytesRead;
2933
- pending += decoder.write(buffer.subarray(0, bytesRead));
2933
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
2934
+ let start = 0;
2934
2935
  let newline;
2935
- while ((newline = pending.indexOf("\n")) !== -1) {
2936
- yield pending.slice(0, newline);
2937
- pending = pending.slice(newline + 1);
2936
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
2937
+ fragments.push(chunk.slice(start, newline));
2938
+ yield fragments.join("");
2939
+ fragments = [];
2940
+ start = newline + 1;
2938
2941
  }
2942
+ if (start < chunk.length) fragments.push(chunk.slice(start));
2939
2943
  }
2940
- pending += decoder.end();
2944
+ fragments.push(decoder.end());
2945
+ const pending = fragments.join("");
2941
2946
  if (pending) yield pending;
2942
2947
  } finally {
2943
2948
  closeSync2(fd);
@@ -5260,7 +5265,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
5260
5265
  var version2 = {
5261
5266
  major: 4,
5262
5267
  minor: 6,
5263
- patch: 5
5268
+ patch: 7
5264
5269
  };
5265
5270
 
5266
5271
  // node_modules/zod/v4/core/schemas.js
@@ -1214,7 +1214,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1214
1214
  ];
1215
1215
 
1216
1216
  // package.json
1217
- var version = "0.8.2";
1217
+ var version = "0.8.7";
1218
1218
 
1219
1219
  // src/core/util.ts
1220
1220
  import { accessSync, constants } from "fs";
@@ -3142,20 +3142,25 @@ function* readJsonl(path) {
3142
3142
  try {
3143
3143
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3144
3144
  const decoder = new StringDecoder("utf8");
3145
- let pending = "";
3145
+ let fragments = [];
3146
3146
  let position = 0;
3147
3147
  for (; ; ) {
3148
3148
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3149
3149
  if (bytesRead <= 0) break;
3150
3150
  position += bytesRead;
3151
- pending += decoder.write(buffer.subarray(0, bytesRead));
3151
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3152
+ let start = 0;
3152
3153
  let newline;
3153
- while ((newline = pending.indexOf("\n")) !== -1) {
3154
- yield pending.slice(0, newline);
3155
- pending = pending.slice(newline + 1);
3154
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3155
+ fragments.push(chunk.slice(start, newline));
3156
+ yield fragments.join("");
3157
+ fragments = [];
3158
+ start = newline + 1;
3156
3159
  }
3160
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3157
3161
  }
3158
- pending += decoder.end();
3162
+ fragments.push(decoder.end());
3163
+ const pending = fragments.join("");
3159
3164
  if (pending) yield pending;
3160
3165
  } finally {
3161
3166
  closeSync2(fd);
@@ -4770,7 +4775,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4770
4775
  var version2 = {
4771
4776
  major: 4,
4772
4777
  minor: 6,
4773
- patch: 5
4778
+ patch: 7
4774
4779
  };
4775
4780
 
4776
4781
  // node_modules/zod/v4/core/schemas.js
@@ -1277,7 +1277,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1277
1277
  ];
1278
1278
 
1279
1279
  // package.json
1280
- var version = "0.8.2";
1280
+ var version = "0.8.7";
1281
1281
 
1282
1282
  // src/core/util.ts
1283
1283
  import { accessSync, constants } from "fs";
@@ -3175,20 +3175,25 @@ function* readJsonl(path) {
3175
3175
  try {
3176
3176
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3177
3177
  const decoder = new StringDecoder("utf8");
3178
- let pending = "";
3178
+ let fragments = [];
3179
3179
  let position = 0;
3180
3180
  for (; ; ) {
3181
3181
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3182
3182
  if (bytesRead <= 0) break;
3183
3183
  position += bytesRead;
3184
- pending += decoder.write(buffer.subarray(0, bytesRead));
3184
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3185
+ let start = 0;
3185
3186
  let newline;
3186
- while ((newline = pending.indexOf("\n")) !== -1) {
3187
- yield pending.slice(0, newline);
3188
- pending = pending.slice(newline + 1);
3187
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3188
+ fragments.push(chunk.slice(start, newline));
3189
+ yield fragments.join("");
3190
+ fragments = [];
3191
+ start = newline + 1;
3189
3192
  }
3193
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3190
3194
  }
3191
- pending += decoder.end();
3195
+ fragments.push(decoder.end());
3196
+ const pending = fragments.join("");
3192
3197
  if (pending) yield pending;
3193
3198
  } finally {
3194
3199
  closeSync2(fd);
@@ -4577,7 +4582,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4577
4582
  var version2 = {
4578
4583
  major: 4,
4579
4584
  minor: 6,
4580
- patch: 5
4585
+ patch: 7
4581
4586
  };
4582
4587
 
4583
4588
  // node_modules/zod/v4/core/schemas.js
@@ -1348,7 +1348,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1348
1348
  ];
1349
1349
 
1350
1350
  // package.json
1351
- var version = "0.8.2";
1351
+ var version = "0.8.7";
1352
1352
 
1353
1353
  // src/core/util.ts
1354
1354
  import { accessSync, constants } from "fs";
@@ -2924,20 +2924,25 @@ function* readJsonl(path) {
2924
2924
  try {
2925
2925
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
2926
2926
  const decoder = new StringDecoder("utf8");
2927
- let pending = "";
2927
+ let fragments = [];
2928
2928
  let position = 0;
2929
2929
  for (; ; ) {
2930
2930
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
2931
2931
  if (bytesRead <= 0) break;
2932
2932
  position += bytesRead;
2933
- pending += decoder.write(buffer.subarray(0, bytesRead));
2933
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
2934
+ let start = 0;
2934
2935
  let newline;
2935
- while ((newline = pending.indexOf("\n")) !== -1) {
2936
- yield pending.slice(0, newline);
2937
- pending = pending.slice(newline + 1);
2936
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
2937
+ fragments.push(chunk.slice(start, newline));
2938
+ yield fragments.join("");
2939
+ fragments = [];
2940
+ start = newline + 1;
2938
2941
  }
2942
+ if (start < chunk.length) fragments.push(chunk.slice(start));
2939
2943
  }
2940
- pending += decoder.end();
2944
+ fragments.push(decoder.end());
2945
+ const pending = fragments.join("");
2941
2946
  if (pending) yield pending;
2942
2947
  } finally {
2943
2948
  closeSync2(fd);
@@ -5260,7 +5265,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
5260
5265
  var version2 = {
5261
5266
  major: 4,
5262
5267
  minor: 6,
5263
- patch: 5
5268
+ patch: 7
5264
5269
  };
5265
5270
 
5266
5271
  // node_modules/zod/v4/core/schemas.js
@@ -1214,7 +1214,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1214
1214
  ];
1215
1215
 
1216
1216
  // package.json
1217
- var version = "0.8.2";
1217
+ var version = "0.8.7";
1218
1218
 
1219
1219
  // src/core/util.ts
1220
1220
  import { accessSync, constants } from "fs";
@@ -3142,20 +3142,25 @@ function* readJsonl(path) {
3142
3142
  try {
3143
3143
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3144
3144
  const decoder = new StringDecoder("utf8");
3145
- let pending = "";
3145
+ let fragments = [];
3146
3146
  let position = 0;
3147
3147
  for (; ; ) {
3148
3148
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3149
3149
  if (bytesRead <= 0) break;
3150
3150
  position += bytesRead;
3151
- pending += decoder.write(buffer.subarray(0, bytesRead));
3151
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3152
+ let start = 0;
3152
3153
  let newline;
3153
- while ((newline = pending.indexOf("\n")) !== -1) {
3154
- yield pending.slice(0, newline);
3155
- pending = pending.slice(newline + 1);
3154
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3155
+ fragments.push(chunk.slice(start, newline));
3156
+ yield fragments.join("");
3157
+ fragments = [];
3158
+ start = newline + 1;
3156
3159
  }
3160
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3157
3161
  }
3158
- pending += decoder.end();
3162
+ fragments.push(decoder.end());
3163
+ const pending = fragments.join("");
3159
3164
  if (pending) yield pending;
3160
3165
  } finally {
3161
3166
  closeSync2(fd);
@@ -4770,7 +4775,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4770
4775
  var version2 = {
4771
4776
  major: 4,
4772
4777
  minor: 6,
4773
- patch: 5
4778
+ patch: 7
4774
4779
  };
4775
4780
 
4776
4781
  // node_modules/zod/v4/core/schemas.js
package/dist/deepen.js CHANGED
@@ -1171,7 +1171,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1171
1171
  ];
1172
1172
 
1173
1173
  // package.json
1174
- var version = "0.8.2";
1174
+ var version = "0.8.7";
1175
1175
 
1176
1176
  // src/core/util.ts
1177
1177
  import { accessSync, constants } from "fs";
@@ -2590,7 +2590,8 @@ async function ingestGitLog(client, repo, opts) {
2590
2590
  log3(`[gitlog] done: ${n} commit messages ingested as 1 document under strategy 'gitlog'`);
2591
2591
  return 0;
2592
2592
  } catch (e) {
2593
- log3(` ! gitlog ingest failed: ${e.message?.slice(0, 120)}`);
2593
+ if (e instanceof AccessDeniedError) throw e;
2594
+ log3(" ! gitlog ingest failed");
2594
2595
  return 1;
2595
2596
  }
2596
2597
  }
@@ -2607,7 +2608,10 @@ async function syncGitLog(client, repo, opts) {
2607
2608
  const log3 = opts.log ?? (() => {
2608
2609
  });
2609
2610
  const head = gitHeadSha(repo);
2610
- const current2 = head !== null && await gitLogIsCurrent(client, repo, head).catch(() => false);
2611
+ const current2 = head !== null && await gitLogIsCurrent(client, repo, head).catch((error) => {
2612
+ if (error instanceof AccessDeniedError) throw error;
2613
+ return false;
2614
+ });
2611
2615
  if (current2) {
2612
2616
  log3("[gitlog] current with HEAD \u2014 skipping");
2613
2617
  return 0;
@@ -1277,7 +1277,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1277
1277
  ];
1278
1278
 
1279
1279
  // package.json
1280
- var version = "0.8.2";
1280
+ var version = "0.8.7";
1281
1281
 
1282
1282
  // src/core/util.ts
1283
1283
  import { accessSync, constants } from "fs";
@@ -3175,20 +3175,25 @@ function* readJsonl(path) {
3175
3175
  try {
3176
3176
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3177
3177
  const decoder = new StringDecoder("utf8");
3178
- let pending = "";
3178
+ let fragments = [];
3179
3179
  let position = 0;
3180
3180
  for (; ; ) {
3181
3181
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3182
3182
  if (bytesRead <= 0) break;
3183
3183
  position += bytesRead;
3184
- pending += decoder.write(buffer.subarray(0, bytesRead));
3184
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3185
+ let start = 0;
3185
3186
  let newline;
3186
- while ((newline = pending.indexOf("\n")) !== -1) {
3187
- yield pending.slice(0, newline);
3188
- pending = pending.slice(newline + 1);
3187
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3188
+ fragments.push(chunk.slice(start, newline));
3189
+ yield fragments.join("");
3190
+ fragments = [];
3191
+ start = newline + 1;
3189
3192
  }
3193
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3190
3194
  }
3191
- pending += decoder.end();
3195
+ fragments.push(decoder.end());
3196
+ const pending = fragments.join("");
3192
3197
  if (pending) yield pending;
3193
3198
  } finally {
3194
3199
  closeSync2(fd);
@@ -4577,7 +4582,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4577
4582
  var version2 = {
4578
4583
  major: 4,
4579
4584
  minor: 6,
4580
- patch: 5
4585
+ patch: 7
4581
4586
  };
4582
4587
 
4583
4588
  // node_modules/zod/v4/core/schemas.js
@@ -1348,7 +1348,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1348
1348
  ];
1349
1349
 
1350
1350
  // package.json
1351
- var version = "0.8.2";
1351
+ var version = "0.8.7";
1352
1352
 
1353
1353
  // src/core/util.ts
1354
1354
  import { accessSync, constants } from "fs";
@@ -2924,20 +2924,25 @@ function* readJsonl(path) {
2924
2924
  try {
2925
2925
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
2926
2926
  const decoder = new StringDecoder("utf8");
2927
- let pending = "";
2927
+ let fragments = [];
2928
2928
  let position = 0;
2929
2929
  for (; ; ) {
2930
2930
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
2931
2931
  if (bytesRead <= 0) break;
2932
2932
  position += bytesRead;
2933
- pending += decoder.write(buffer.subarray(0, bytesRead));
2933
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
2934
+ let start = 0;
2934
2935
  let newline;
2935
- while ((newline = pending.indexOf("\n")) !== -1) {
2936
- yield pending.slice(0, newline);
2937
- pending = pending.slice(newline + 1);
2936
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
2937
+ fragments.push(chunk.slice(start, newline));
2938
+ yield fragments.join("");
2939
+ fragments = [];
2940
+ start = newline + 1;
2938
2941
  }
2942
+ if (start < chunk.length) fragments.push(chunk.slice(start));
2939
2943
  }
2940
- pending += decoder.end();
2944
+ fragments.push(decoder.end());
2945
+ const pending = fragments.join("");
2941
2946
  if (pending) yield pending;
2942
2947
  } finally {
2943
2948
  closeSync2(fd);
@@ -5260,7 +5265,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
5260
5265
  var version2 = {
5261
5266
  major: 4,
5262
5267
  minor: 6,
5263
- patch: 5
5268
+ patch: 7
5264
5269
  };
5265
5270
 
5266
5271
  // node_modules/zod/v4/core/schemas.js
@@ -1214,7 +1214,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1214
1214
  ];
1215
1215
 
1216
1216
  // package.json
1217
- var version = "0.8.2";
1217
+ var version = "0.8.7";
1218
1218
 
1219
1219
  // src/core/util.ts
1220
1220
  import { accessSync, constants } from "fs";
@@ -3142,20 +3142,25 @@ function* readJsonl(path) {
3142
3142
  try {
3143
3143
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3144
3144
  const decoder = new StringDecoder("utf8");
3145
- let pending = "";
3145
+ let fragments = [];
3146
3146
  let position = 0;
3147
3147
  for (; ; ) {
3148
3148
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3149
3149
  if (bytesRead <= 0) break;
3150
3150
  position += bytesRead;
3151
- pending += decoder.write(buffer.subarray(0, bytesRead));
3151
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3152
+ let start = 0;
3152
3153
  let newline;
3153
- while ((newline = pending.indexOf("\n")) !== -1) {
3154
- yield pending.slice(0, newline);
3155
- pending = pending.slice(newline + 1);
3154
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3155
+ fragments.push(chunk.slice(start, newline));
3156
+ yield fragments.join("");
3157
+ fragments = [];
3158
+ start = newline + 1;
3156
3159
  }
3160
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3157
3161
  }
3158
- pending += decoder.end();
3162
+ fragments.push(decoder.end());
3163
+ const pending = fragments.join("");
3159
3164
  if (pending) yield pending;
3160
3165
  } finally {
3161
3166
  closeSync2(fd);
@@ -4770,7 +4775,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4770
4775
  var version2 = {
4771
4776
  major: 4,
4772
4777
  minor: 6,
4773
- patch: 5
4778
+ patch: 7
4774
4779
  };
4775
4780
 
4776
4781
  // node_modules/zod/v4/core/schemas.js
@@ -1277,7 +1277,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1277
1277
  ];
1278
1278
 
1279
1279
  // package.json
1280
- var version = "0.8.2";
1280
+ var version = "0.8.7";
1281
1281
 
1282
1282
  // src/core/util.ts
1283
1283
  import { accessSync, constants } from "fs";
@@ -3175,20 +3175,25 @@ function* readJsonl(path) {
3175
3175
  try {
3176
3176
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3177
3177
  const decoder = new StringDecoder("utf8");
3178
- let pending = "";
3178
+ let fragments = [];
3179
3179
  let position = 0;
3180
3180
  for (; ; ) {
3181
3181
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3182
3182
  if (bytesRead <= 0) break;
3183
3183
  position += bytesRead;
3184
- pending += decoder.write(buffer.subarray(0, bytesRead));
3184
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3185
+ let start = 0;
3185
3186
  let newline;
3186
- while ((newline = pending.indexOf("\n")) !== -1) {
3187
- yield pending.slice(0, newline);
3188
- pending = pending.slice(newline + 1);
3187
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3188
+ fragments.push(chunk.slice(start, newline));
3189
+ yield fragments.join("");
3190
+ fragments = [];
3191
+ start = newline + 1;
3189
3192
  }
3193
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3190
3194
  }
3191
- pending += decoder.end();
3195
+ fragments.push(decoder.end());
3196
+ const pending = fragments.join("");
3192
3197
  if (pending) yield pending;
3193
3198
  } finally {
3194
3199
  closeSync2(fd);
@@ -4577,7 +4582,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4577
4582
  var version2 = {
4578
4583
  major: 4,
4579
4584
  minor: 6,
4580
- patch: 5
4585
+ patch: 7
4581
4586
  };
4582
4587
 
4583
4588
  // node_modules/zod/v4/core/schemas.js
@@ -1348,7 +1348,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1348
1348
  ];
1349
1349
 
1350
1350
  // package.json
1351
- var version = "0.8.2";
1351
+ var version = "0.8.7";
1352
1352
 
1353
1353
  // src/core/util.ts
1354
1354
  import { accessSync, constants } from "fs";
@@ -2924,20 +2924,25 @@ function* readJsonl(path) {
2924
2924
  try {
2925
2925
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
2926
2926
  const decoder = new StringDecoder("utf8");
2927
- let pending = "";
2927
+ let fragments = [];
2928
2928
  let position = 0;
2929
2929
  for (; ; ) {
2930
2930
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
2931
2931
  if (bytesRead <= 0) break;
2932
2932
  position += bytesRead;
2933
- pending += decoder.write(buffer.subarray(0, bytesRead));
2933
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
2934
+ let start = 0;
2934
2935
  let newline;
2935
- while ((newline = pending.indexOf("\n")) !== -1) {
2936
- yield pending.slice(0, newline);
2937
- pending = pending.slice(newline + 1);
2936
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
2937
+ fragments.push(chunk.slice(start, newline));
2938
+ yield fragments.join("");
2939
+ fragments = [];
2940
+ start = newline + 1;
2938
2941
  }
2942
+ if (start < chunk.length) fragments.push(chunk.slice(start));
2939
2943
  }
2940
- pending += decoder.end();
2944
+ fragments.push(decoder.end());
2945
+ const pending = fragments.join("");
2941
2946
  if (pending) yield pending;
2942
2947
  } finally {
2943
2948
  closeSync2(fd);
@@ -5260,7 +5265,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
5260
5265
  var version2 = {
5261
5266
  major: 4,
5262
5267
  minor: 6,
5263
- patch: 5
5268
+ patch: 7
5264
5269
  };
5265
5270
 
5266
5271
  // node_modules/zod/v4/core/schemas.js
@@ -1214,7 +1214,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1214
1214
  ];
1215
1215
 
1216
1216
  // package.json
1217
- var version = "0.8.2";
1217
+ var version = "0.8.7";
1218
1218
 
1219
1219
  // src/core/util.ts
1220
1220
  import { accessSync, constants } from "fs";
@@ -3142,20 +3142,25 @@ function* readJsonl(path) {
3142
3142
  try {
3143
3143
  const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
3144
3144
  const decoder = new StringDecoder("utf8");
3145
- let pending = "";
3145
+ let fragments = [];
3146
3146
  let position = 0;
3147
3147
  for (; ; ) {
3148
3148
  const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
3149
3149
  if (bytesRead <= 0) break;
3150
3150
  position += bytesRead;
3151
- pending += decoder.write(buffer.subarray(0, bytesRead));
3151
+ const chunk = decoder.write(buffer.subarray(0, bytesRead));
3152
+ let start = 0;
3152
3153
  let newline;
3153
- while ((newline = pending.indexOf("\n")) !== -1) {
3154
- yield pending.slice(0, newline);
3155
- pending = pending.slice(newline + 1);
3154
+ while ((newline = chunk.indexOf("\n", start)) !== -1) {
3155
+ fragments.push(chunk.slice(start, newline));
3156
+ yield fragments.join("");
3157
+ fragments = [];
3158
+ start = newline + 1;
3156
3159
  }
3160
+ if (start < chunk.length) fragments.push(chunk.slice(start));
3157
3161
  }
3158
- pending += decoder.end();
3162
+ fragments.push(decoder.end());
3163
+ const pending = fragments.join("");
3159
3164
  if (pending) yield pending;
3160
3165
  } finally {
3161
3166
  closeSync2(fd);
@@ -4770,7 +4775,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
4770
4775
  var version2 = {
4771
4776
  major: 4,
4772
4777
  minor: 6,
4773
- patch: 5
4778
+ patch: 7
4774
4779
  };
4775
4780
 
4776
4781
  // node_modules/zod/v4/core/schemas.js