@ai-matrx/records 0.99.18 → 0.99.20

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.
@@ -404,6 +404,10 @@ function takePrimedTablePageBundle(organizationId, tableId, viewId) {
404
404
  primed.delete(key);
405
405
  return Date.now() - held.at < PRIMED_TTL_MS ? held.answer : null;
406
406
  }
407
+ function forgetPrimedTablePageBundlesOf(tableId) {
408
+ const primed = registry();
409
+ for (const key of [...primed.keys()]) if (tableId === null || key.split("|")[1] === tableId) primed.delete(key);
410
+ }
407
411
  var DOOR_REGISTRY = /* @__PURE__ */ Symbol.for("@ai-matrx/records/primed-door-answers");
408
412
  function doorRegistry() {
409
413
  const g = globalThis;
@@ -3812,6 +3816,12 @@ function createRecordsClient(given) {
3812
3816
  else scream({ code: refusal2.code, message: refusal2.message, ...refusal2.hint ? { hint: refusal2.hint } : {}, where });
3813
3817
  return err(refusal2);
3814
3818
  }
3819
+ if (isWritingDoor(door) || LOOK_WRITES[door]) {
3820
+ const tableId = args["p_table_id"];
3821
+ bundleDrop(typeof tableId === "string" ? tableId : null);
3822
+ forgetPrimedTablePageBundlesOf(typeof tableId === "string" ? tableId : null);
3823
+ dropPrimedDoorAnswers(LOOK_WRITES[door]);
3824
+ }
3815
3825
  return ok(response.data);
3816
3826
  }
3817
3827
  function structureMoved(tableId, result) {