Documentation
¶
Overview ¶
Package schema defines the Ent schemas for the team (multi-user) system of record. PostgreSQL-only: citext columns and row-level security policies (applied by team/store migrations) assume Postgres.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent is a first-class, named configuration: a persona/model bound to a subset of the deployment's available skills and its own agent-scoped secrets (INIT-OMNIAGENT-004). Owners and maintainers (AgentRole) configure it; conversing with it (via Chat) never grants configuration rights.
type AgentRole ¶
AgentRole is a user's per-agent role: owner (creator or assignee, full control incl. maintainers) or maintainer (added by an owner; everything except managing other maintainers). Per-agent roles are independent of chat membership — being in a group chat with an agent never implies a row here (PRD: "conversing with an agent never confers the right to configure it").
type AgentSkill ¶
AgentSkill is one skill enabled on an agent. The enabled set must be a subset of the deployment's available-skills catalog (TRD section 5); this table only records the membership.
type AllowlistEntry ¶
AllowlistEntry is an email the superadmin has approved for login. Signup is closed: no allowlist entry (and not the configured superadmin email) means no magic link is ever issued.
func (AllowlistEntry) Annotations ¶
func (AllowlistEntry) Annotations() []schema.Annotation
Annotations of the AllowlistEntry.
func (AllowlistEntry) Fields ¶
func (AllowlistEntry) Fields() []ent.Field
Fields of the AllowlistEntry.
type AuthSession ¶
AuthSession is a server-side login session backing the browser cookie. Only the SHA-256 hash of the cookie token is stored.
type Chat ¶
Chat is a conversation: each member's private chat with the agent, or a group chat with multiple members where the agent replies on @-mention.
type ChatMember ¶
ChatMember is a user's membership in a chat. Uniqueness of (chat_id, user_id) enforces one membership row per user per chat.
type Identity ¶
Identity links a login provider identity to a user. A user may hold several (magic link plus SSO providers).
type MagicLinkToken ¶
MagicLinkToken is a single-use, expiring login token. Only the SHA-256 hash is stored; the raw token exists solely in the emailed link. Row-level security restricts this table to the system (auth-layer) context.
func (MagicLinkToken) Fields ¶
func (MagicLinkToken) Fields() []ent.Field
Fields of the MagicLinkToken.