import { Entity } from "../../../common"; import type { User } from "../../user/entities/user"; import type { HandbookThreadMessage } from "./handbook-thread-message"; /** * One persisted handbook conversation: a title and an ordered list of messages. * * This is deliberately NOT the package `Assistant`. `Assistant` is * `isCompanyScoped: true`, and the handbook chat exists for platform * administrators — who have a Membership with `HAS_ROLE` and no `IN_COMPANY`, * i.e. no Company at all. A company-scoped thread would 404 for exactly the * user the feature is for, and relaxing `Assistant`'s scoping to accommodate * that would weaken tenancy for every application built on the package. * * `isCompanyScoped: false` therefore removes the company filter, and the * `CREATED_BY` owner edge becomes the WHOLE security boundary: * `HandbookThreadRepository.buildUserHasAccess()` requires it on every read and * every write. `contextKey: "userId"` attaches that edge from CLS on create, so * a client can never nominate a different owner, and `immutable: true` keeps a * later PUT from re-pointing it. */ export type HandbookThread = Entity & { title: string; owner?: User; messages?: HandbookThreadMessage[]; }; export declare const HandbookThreadDescriptor: import("../../../common").EntityDescriptor; export type HandbookThreadDescriptorType = typeof HandbookThreadDescriptor; //# sourceMappingURL=handbook-thread.d.ts.map