@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.
@@ -467,6 +467,10 @@ function takePrimedTablePageBundle(organizationId, tableId, viewId) {
467
467
  primed.delete(key);
468
468
  return Date.now() - held.at < PRIMED_TTL_MS ? held.answer : null;
469
469
  }
470
+ function forgetPrimedTablePageBundlesOf(tableId) {
471
+ const primed = registry();
472
+ for (const key of [...primed.keys()]) if (tableId === null || key.split("|")[1] === tableId) primed.delete(key);
473
+ }
470
474
  var DOOR_REGISTRY = /* @__PURE__ */ Symbol.for("@ai-matrx/records/primed-door-answers");
471
475
  function doorRegistry() {
472
476
  const g = globalThis;
@@ -3875,6 +3879,12 @@ function createRecordsClient(given) {
3875
3879
  else scream({ code: refusal2.code, message: refusal2.message, ...refusal2.hint ? { hint: refusal2.hint } : {}, where });
3876
3880
  return err(refusal2);
3877
3881
  }
3882
+ if (isWritingDoor(door) || LOOK_WRITES[door]) {
3883
+ const tableId = args["p_table_id"];
3884
+ bundleDrop(typeof tableId === "string" ? tableId : null);
3885
+ forgetPrimedTablePageBundlesOf(typeof tableId === "string" ? tableId : null);
3886
+ dropPrimedDoorAnswers(LOOK_WRITES[door]);
3887
+ }
3878
3888
  return ok(response.data);
3879
3889
  }
3880
3890
  function structureMoved(tableId, result) {