@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.
@@ -53,6 +53,10 @@ function takePrimedTablePageBundle(organizationId, tableId, viewId) {
53
53
  primed.delete(key);
54
54
  return Date.now() - held.at < PRIMED_TTL_MS ? held.answer : null;
55
55
  }
56
+ function forgetPrimedTablePageBundlesOf(tableId) {
57
+ const primed = registry();
58
+ for (const key of [...primed.keys()]) if (tableId === null || key.split("|")[1] === tableId) primed.delete(key);
59
+ }
56
60
  var DOOR_REGISTRY = /* @__PURE__ */ Symbol.for("@ai-matrx/records/primed-door-answers");
57
61
  function doorRegistry() {
58
62
  const g = globalThis;
@@ -3464,6 +3468,12 @@ function createRecordsClient(given) {
3464
3468
  else scream({ code: refusal2.code, message: refusal2.message, ...refusal2.hint ? { hint: refusal2.hint } : {}, where });
3465
3469
  return err(refusal2);
3466
3470
  }
3471
+ if (isWritingDoor(door) || LOOK_WRITES[door]) {
3472
+ const tableId = args["p_table_id"];
3473
+ bundleDrop(typeof tableId === "string" ? tableId : null);
3474
+ forgetPrimedTablePageBundlesOf(typeof tableId === "string" ? tableId : null);
3475
+ dropPrimedDoorAnswers(LOOK_WRITES[door]);
3476
+ }
3467
3477
  return ok(response.data);
3468
3478
  }
3469
3479
  function structureMoved(tableId, result) {