Repository navigation
0.34.0
Suspended organisations run no agents, invitation and ownership rules hold on every path, API keys stay in their organisation, AI config saves lock their row, decide is metered, sign-in mail counts per mailbox, uploads stay capped, and Microsoft proves addresses.
- Suspension:
enqueueRun/enqueueRunBatchrefuse a non-active tenant with 403tenant_suspended(route, plugin and event trigger alike);executeRunsettles a run whose tenant is suspendedcancelledbefore any model call;isCancelRequestedreads the tenant's status, so an executing run stops at its next poll;setTenantSuspendedcancels the tenant'squeuedandawaiting_inputruns. Seedocs/CONCEPTS.md§1. - Plugin hook:
ServerPlugin.hooks.onTenantStatusChanged(db, tenantId, status, env)runs for every installed plugin after a suspend or reactivate, best-effort (runTenantStatusChangedHooksinutils/db/tenant-helpers.ts). Seedocs/CONCEPTS.md§16. - Invitations:
acceptInvitationre-checks the issuer inside its transaction (exists, not blocked, a global admin or a member whose role could issue the invitation's role) and otherwise marks the row revoked and answers 410invitation_revoked;changeMemberRolerevokes the target's pending invitations the new role could not issue. Seedocs/CONCEPTS.md§1. - Ownership ceiling:
MAX_OWNED_TENANTS_PER_USERis checked (assertMayOwnAnother, under the user-row lock) on a promotion to owner and on accepting an owner invitation, and also bounds creations per person per UTC day through the newtenant_creation_counterstable, which has no foreign key totenants. Seedocs/CONCEPTS.md§1. - API keys: a key acts only within its organisation plus its creator's own profile —
GET /api/tenantslists the key's organisation alone, andPOST /api/tenants,GET /api/invitations/pendingandPOST /api/access-requestsanswer 403insufficient_scopeto a key (withAccountAuth). Seedocs/CONCEPTS.md§2. - AI config saves:
POST /api/ai/configreads the row it overwritesFOR UPDATEinside its transaction and decides whether the stored key stays on that row, so a concurrent save never leaves a key beside an endpoint it was not saved with. Seedocs/CONCEPTS.md§9. - Decide metering:
ctx.decide's chat fallback runs through the run meter likectx.chat.client—assertPricedandcheck()before each model call, oneai_usagerow as each returns (a decide whose answer fails validation twice leaves both), priced on who pays for theagent-decidemodel;createDeciderecords once per ask only for TypeSafe. Seedocs/CONCEPTS.md§9. - Sign-in mail per recipient: the 5-per-15-minutes window is keyed on the canonical mailbox (
canonicalMailbox: lower-cased,+tagdropped, dots dropped forgmail.com/googlemail.com), so tagged and dotted spellings of one mailbox share it; mail still goes to the address as typed. Seedocs/CONCEPTS.md§2. - Upload-path body cap: beneath
UPLOAD_PATHSand a plugin'suploadPaths, a JSON body keeps the 1 MB cap and any other body is capped atMAX_UPLOAD_PATH_BODY_BYTES(10 MB + 64 KB) instead of skipping the cap; each upload route's own tighter cap still applies. Seedocs/CONCEPTS.md§3. - Microsoft address proof: the Microsoft provider sets
emailVerifiedfrom Graph/organization(the UPN's domain among the directory's verified domains; a personal account, an unlisted domain or a failed lookup isfalse), and the OAuth callback refuses an unverified address only where it would match or admit an account — so for every provider, Google and OIDC included, an identity already linked now signs in even when the provider calls its address unverified. Personal Microsoft accounts sign in by linking from account settings first. Seedocs/CONCEPTS.md§2.