@standardagents/builder 0.18.3 → 0.19.1

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.
package/dist/runtime.d.ts CHANGED
@@ -1334,6 +1334,7 @@ interface PlatformReplicaUser {
1334
1334
  display_name?: string | null;
1335
1335
  avatar_url?: string | null;
1336
1336
  role: InstanceRole;
1337
+ session_revoked_at?: number | null;
1337
1338
  }
1338
1339
  interface PlatformReplicaApiKey {
1339
1340
  id: string;
package/dist/runtime.js CHANGED
@@ -20919,6 +20919,13 @@ ${result ?? error ?? "No result content."}${attachmentSummary}`;
20919
20919
  for (const replicaUser of snapshot.users) {
20920
20920
  const user = await this.upsertPlatformReplicaUser(replicaUser);
20921
20921
  activeUserIds.add(user.id);
20922
+ if (typeof replicaUser.session_revoked_at === "number" && Number.isFinite(replicaUser.session_revoked_at)) {
20923
+ await this.ctx.storage.sql.exec(
20924
+ `DELETE FROM sessions WHERE user_id = ? AND created_at <= ?`,
20925
+ user.id,
20926
+ Math.floor(replicaUser.session_revoked_at)
20927
+ );
20928
+ }
20922
20929
  }
20923
20930
  const activeList = Array.from(activeUserIds);
20924
20931
  if (activeList.length > 0) {