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

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 +149 -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 +2294 -14661
  39. package/dist/installer.js +13 -8
  40. package/dist/kilo.js +2294 -14661
  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 +125 -20
  45. package/dist/opencode2.js +2296 -14663
  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 +745 -353
  62. package/package.json +14 -10
  63. package/plugin.json +1 -1
  64. package/skill/SKILL.md +113 -106
package/dist/dsh.js CHANGED
@@ -1325,7 +1325,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
1325
1325
  ];
1326
1326
 
1327
1327
  // package.json
1328
- var version = "0.8.2";
1328
+ var version = "0.8.9";
1329
1329
 
1330
1330
  // src/core/util.ts
1331
1331
  import { accessSync, constants } from "fs";
@@ -3513,6 +3513,7 @@ __export(util_exports, {
3513
3513
  required: () => required,
3514
3514
  safeExtend: () => safeExtend,
3515
3515
  shallowClone: () => shallowClone,
3516
+ sizeCaps: () => sizeCaps,
3516
3517
  slugify: () => slugify,
3517
3518
  stringifyPrimitive: () => stringifyPrimitive,
3518
3519
  toZod: () => toZod,
@@ -4032,6 +4033,18 @@ function prefixIssues(path, issues) {
4032
4033
  function unwrapMessage(message) {
4033
4034
  return typeof message === "string" ? message : message?.message;
4034
4035
  }
4036
+ function sizeCaps(defChecks) {
4037
+ const caps = [];
4038
+ for (const ch of defChecks ?? []) {
4039
+ const d = ch._zod.def;
4040
+ if (!/_(length|size)$|_equals$/.test(d.check))
4041
+ break;
4042
+ const max = d.maximum ?? d.length ?? d.size;
4043
+ if (max >= 0)
4044
+ caps.push([max, ch]);
4045
+ }
4046
+ return caps;
4047
+ }
4035
4048
  function attachSchema(issues, start, inst) {
4036
4049
  var _a3;
4037
4050
  for (let i = start; i < issues.length; i++) {
@@ -5452,7 +5465,7 @@ ${content.join("\n")}
5452
5465
  var version2 = {
5453
5466
  major: 4,
5454
5467
  minor: 6,
5455
- patch: 5
5468
+ patch: 7
5456
5469
  };
5457
5470
 
5458
5471
  // node_modules/zod/v4/core/schemas.js
@@ -6208,6 +6221,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
6208
6221
  return payload;
6209
6222
  };
6210
6223
  });
6224
+ function capSize(inst, size) {
6225
+ const caps = sizeCaps(inst._zod.def.checks);
6226
+ if (!caps.length)
6227
+ return;
6228
+ const cap = Math.min(...caps.map((c) => c[0]));
6229
+ const parse3 = inst._zod.parse;
6230
+ inst._zod.parse = (payload, ctx) => {
6231
+ const n = size(payload.value);
6232
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
6233
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
6234
+ if (n > max && ch._zod.def.when(payload)) {
6235
+ const start = payload.issues.length;
6236
+ ch._zod.check(payload);
6237
+ payload.issues[start].continue = false;
6238
+ attachSchema(payload.issues, start, inst);
6239
+ return payload;
6240
+ }
6241
+ }
6242
+ }
6243
+ return parse3(payload, ctx);
6244
+ };
6245
+ }
6246
+ var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
6247
+ var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
6248
+ var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
6211
6249
  function handleArrayResult(result, final, index) {
6212
6250
  if (result.issues.length) {
6213
6251
  final.issues.push(...prefixIssues(index, result.issues));
@@ -6251,6 +6289,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
6251
6289
  }
6252
6290
  return payload;
6253
6291
  };
6292
+ capSize(inst, arraySize);
6254
6293
  });
6255
6294
  function handlePropertyResult(result, final, key, input2, optin, optout) {
6256
6295
  const isPresent = key in input2;
@@ -7207,6 +7246,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
7207
7246
  return Promise.all(proms).then(() => payload);
7208
7247
  return payload;
7209
7248
  };
7249
+ capSize(inst, mapSize);
7210
7250
  });
7211
7251
  function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
7212
7252
  if (keyResult.issues.length) {
@@ -7273,6 +7313,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
7273
7313
  return Promise.all(proms).then(() => payload);
7274
7314
  return payload;
7275
7315
  };
7316
+ capSize(inst, setSize);
7276
7317
  });
7277
7318
  function handleSetResult(result, final) {
7278
7319
  if (result.issues.length) {
@@ -16803,9 +16844,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
16803
16844
  doc.write(`}`);
16804
16845
  return outputVar;
16805
16846
  }
16847
+ function generateSizeGate(doc, schema, size) {
16848
+ for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
16849
+ doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
16850
+ }
16851
+ }
16806
16852
  function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
16807
16853
  const def = schema._zod.def;
16808
16854
  doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
16855
+ generateSizeGate(doc, schema, `${accessor}.length`);
16809
16856
  const outputVar = buildsValue ? newVar(ctx) : null;
16810
16857
  const iVar = newVar(ctx);
16811
16858
  const elemVar = newVar(ctx);
@@ -17205,6 +17252,7 @@ function literalPropertyKey(ctx, key) {
17205
17252
  function generateMapCheck(doc, ctx, schema, accessor) {
17206
17253
  const def = schema._zod.def;
17207
17254
  doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
17255
+ generateSizeGate(doc, schema, `${accessor}.size`);
17208
17256
  const outputVar = newVar(ctx);
17209
17257
  const kVar = newVar(ctx);
17210
17258
  const valVar = newVar(ctx);
@@ -17221,6 +17269,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
17221
17269
  function generateSetCheck(doc, ctx, schema, accessor) {
17222
17270
  const def = schema._zod.def;
17223
17271
  doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
17272
+ generateSizeGate(doc, schema, `${accessor}.size`);
17224
17273
  const outputVar = newVar(ctx);
17225
17274
  const valVar = newVar(ctx);
17226
17275
  doc.write(`const ${outputVar} = new Set();`);
package/dist/grok-hook.js CHANGED
@@ -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.9";
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.9";
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.9";
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
@@ -761,7 +761,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
761
761
  ];
762
762
 
763
763
  // package.json
764
- var version = "0.8.2";
764
+ var version = "0.8.9";
765
765
 
766
766
  // src/core/util.ts
767
767
  import { accessSync, constants } from "fs";