@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.
@@ -243,6 +243,10 @@ function takePrimedTablePageBundle(organizationId, tableId, viewId) {
243
243
  primed.delete(key);
244
244
  return Date.now() - held.at < PRIMED_TTL_MS ? held.answer : null;
245
245
  }
246
+ function forgetPrimedTablePageBundlesOf(tableId) {
247
+ const primed = registry();
248
+ for (const key of [...primed.keys()]) if (tableId === null || key.split("|")[1] === tableId) primed.delete(key);
249
+ }
246
250
  var DOOR_REGISTRY = /* @__PURE__ */ Symbol.for("@ai-matrx/records/primed-door-answers");
247
251
  function doorRegistry() {
248
252
  const g = globalThis;
@@ -3675,6 +3679,12 @@ function createRecordsClient(given) {
3675
3679
  else scream({ code: refusal2.code, message: refusal2.message, ...refusal2.hint ? { hint: refusal2.hint } : {}, where });
3676
3680
  return err(refusal2);
3677
3681
  }
3682
+ if (isWritingDoor(door) || LOOK_WRITES[door]) {
3683
+ const tableId = args["p_table_id"];
3684
+ bundleDrop(typeof tableId === "string" ? tableId : null);
3685
+ forgetPrimedTablePageBundlesOf(typeof tableId === "string" ? tableId : null);
3686
+ dropPrimedDoorAnswers(LOOK_WRITES[door]);
3687
+ }
3678
3688
  return ok(response.data);
3679
3689
  }
3680
3690
  function structureMoved(tableId, result) {