feat: complete Ancestor quote bot with production-ready Docker support

This commit is contained in:
unfunny
2026-09-13 14:14:38 -04:00
parent f2016da05a
commit fe7351a7dc
1145 changed files with 30890 additions and 97684 deletions

View File

@@ -1,20 +1,19 @@
import { type EventType } from "../@types/event.ts";
import { type Room } from "../models/room.ts";
import { type SyncUserProfile, type User } from "../models/user.ts";
import { type IEvent, type MatrixEvent } from "../models/event.ts";
import { type Filter } from "../filter.ts";
import { type RoomSummary } from "../models/room-summary.ts";
import { type IMinimalEvent, type IRooms, type ISyncResponse } from "../sync-accumulator.ts";
import { type IStartClientOpts } from "../client.ts";
import { type IStateEventWithRoomId } from "../@types/search.ts";
import { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from "../models/ToDeviceMessage.ts";
import { type EventEmitterEvents } from "../models/typed-event-emitter.ts";
import { EventType } from "../@types/event";
import { Room } from "../models/room";
import { User } from "../models/user";
import { IEvent, MatrixEvent } from "../models/event";
import { Filter } from "../filter";
import { RoomSummary } from "../models/room-summary";
import { IMinimalEvent, IRooms, ISyncResponse } from "../sync-accumulator";
import { IStartClientOpts } from "../client";
import { IStateEventWithRoomId } from "../@types/search";
import { IndexedToDeviceBatch, ToDeviceBatchWithTxnId } from "../models/ToDeviceMessage";
import { EventEmitterEvents } from "../models/typed-event-emitter";
export interface ISavedSync {
nextBatch: string;
roomsData: IRooms;
accountData: IMinimalEvent[];
}
export type UserCreator = (userId: string) => User;
/**
* A store for most of the data js-sdk needs to store, apart from crypto data
*/
@@ -36,11 +35,6 @@ export interface IStore {
* @param room - The room to be stored. All properties must be stored.
*/
storeRoom(room: Room): void;
/**
* Set the user creator which is used for creating User objects
* @param creator - A callback that accepts an user-id and returns an User object
*/
setUserCreator(creator: UserCreator): void;
/**
* Retrieve a room by its' room ID.
* @param roomId - The room ID.
@@ -193,29 +187,6 @@ export interface IStore {
* Removes a specific batch of to-device messages from the queue
*/
removeToDeviceBatch(id: number): Promise<void>;
/**
* Store user profile details from a sync. Existing profiles will be overwritten.
* @param userProfiles - A map of userIds to profiles.
*/
storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void>;
/**
* Delete stored profiles for the given users.
* @param userIds - The user IDs whose profiles should be deleted.
*/
removeUserProfiles(userIds: string[]): Promise<void>;
/**
* Retrieve a stored user profile for the given user ID, if it exists.
* @param userId - The user ID to retrieve the profile for.
* @returns The stored profile, or undefined if no profile is stored for this user ID.
*/
getUserProfile(userId: string): Promise<SyncUserProfile | undefined>;
/**
* Remove all stored events matching the given IDs from the stored accumulated
* sync.
* @param roomId The target room.
* @param eventIds IDs of events to remove.
*/
removeEventsFromRoom(roomId: string, eventIds: string[]): Promise<void>;
/**
* Stop the store and perform any appropriate cleanup
*/