{"tools":[{"name":"whoami","title":"Whoami","description":"The acting workspace member: id, name, email, role(s) and time zone.","inputSchema":{"properties":{},"title":"whoamiArguments","type":"object"},"outputSchema":{"$defs":{"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"}},"additionalProperties":false,"description":"The acting member in this workspace: who they are, their roles and time zone.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"email":{"anyOf":[{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Email"},"role":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Role"},"roles":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"}},"required":["id","kind"],"title":"MemberIdentity","type":"object"},"annotations":{"title":"Whoami","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"workspace","title":"Workspace","description":"Who the caller is, the workspace's members, invitations and settings, and the caller's notifications and inbox. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"InboxSource":{"description":"One stream of the caller's inbox. Pings and mentions are notification kinds, listed on\ntheir own so a badge can count them apart from the rest.","enum":["notification","ping","mention","thread","task","suggestion","document","skipped","record_suggestion","extraction","alert","identity","duplicate","routing","reminder","automation"],"title":"InboxSource","type":"string"},"NotificationKind":{"enum":["mention","assignment","reminder","review","comment","ping","document","record","alert","operation","meeting","membership","artifact","automation"],"title":"NotificationKind","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"WorkspaceInbox":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"sources":{"description":"Empty reads every source.","items":{"$ref":"#/$defs/InboxSource"},"title":"Sources","type":"array","uniqueItems":true}},"title":"WorkspaceInbox","type":"object"},"WorkspaceInvitation":{"additionalProperties":false,"properties":{"invitation_id":{"description":"The invitation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Invitation Id","type":"string"}},"required":["invitation_id"],"title":"WorkspaceInvitation","type":"object"},"WorkspaceInvitations":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"WorkspaceInvitations","type":"object"},"WorkspaceLocale":{"additionalProperties":false,"properties":{"mine":{"default":false,"description":"The caller's own setting instead of the workspace's.","title":"Mine","type":"boolean"}},"title":"WorkspaceLocale","type":"object"},"WorkspaceMeetingSettings":{"additionalProperties":false,"properties":{},"title":"WorkspaceMeetingSettings","type":"object"},"WorkspaceMembers":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"WorkspaceMembers","type":"object"},"WorkspaceNoteTaker":{"additionalProperties":false,"properties":{},"title":"WorkspaceNoteTaker","type":"object"},"WorkspaceNotifications":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"unread_only":{"default":false,"title":"Unread Only","type":"boolean"},"kinds":{"items":{"$ref":"#/$defs/NotificationKind"},"title":"Kinds","type":"array","uniqueItems":true},"include_dismissed":{"default":false,"title":"Include Dismissed","type":"boolean"}},"title":"WorkspaceNotifications","type":"object"},"WorkspaceOrgProfile":{"additionalProperties":false,"properties":{},"title":"WorkspaceOrgProfile","type":"object"},"WorkspacePermissions":{"additionalProperties":false,"properties":{},"title":"WorkspacePermissions","type":"object"},"WorkspacePersona":{"additionalProperties":false,"properties":{"mine":{"default":false,"description":"The caller's own setting instead of the workspace's.","title":"Mine","type":"boolean"}},"title":"WorkspacePersona","type":"object"},"WorkspacePreferences":{"additionalProperties":false,"properties":{},"title":"WorkspacePreferences","type":"object"},"WorkspacePublicSite":{"additionalProperties":false,"properties":{},"title":"WorkspacePublicSite","type":"object"},"WorkspaceSearchMembers":{"additionalProperties":false,"properties":{"text":{"description":"Part of a name or email.","maxLength":100,"minLength":1,"title":"Text","type":"string"},"limit":{"default":20,"description":"At most this many.","maximum":50,"minimum":1,"title":"Limit","type":"integer"}},"required":["text"],"title":"WorkspaceSearchMembers","type":"object"},"WorkspaceSetup":{"additionalProperties":false,"properties":{},"title":"WorkspaceSetup","type":"object"},"WorkspaceWhoami":{"additionalProperties":false,"properties":{},"title":"WorkspaceWhoami","type":"object"}},"properties":{"whoami":{"anyOf":[{"$ref":"#/$defs/WorkspaceWhoami"},{"type":"null"}],"default":null,"description":"The signed-in person: profile, every workspace they belong to with their roles, and invitations waiting for them. Use it to find a workspace id for ?tenant=."},"members":{"anyOf":[{"$ref":"#/$defs/WorkspaceMembers"},{"type":"null"}],"default":null,"description":"The members with their roles and profiles, newest first."},"search_members":{"anyOf":[{"$ref":"#/$defs/WorkspaceSearchMembers"},{"type":"null"}],"default":null,"description":"Members whose name or email matches the text."},"permissions":{"anyOf":[{"$ref":"#/$defs/WorkspacePermissions"},{"type":"null"}],"default":null,"description":"The actions the caller may perform (e.g. records.write)."},"invitations":{"anyOf":[{"$ref":"#/$defs/WorkspaceInvitations"},{"type":"null"}],"default":null,"description":"Invitations the workspace has sent, newest first."},"invitation":{"anyOf":[{"$ref":"#/$defs/WorkspaceInvitation"},{"type":"null"}],"default":null,"description":"One invitation."},"org_profile":{"anyOf":[{"$ref":"#/$defs/WorkspaceOrgProfile"},{"type":"null"}],"default":null,"description":"The organisation the workspace belongs to: name, website, what it offers."},"persona":{"anyOf":[{"$ref":"#/$defs/WorkspacePersona"},{"type":"null"}],"default":null,"description":"How the workspace's agents write (or, with mine, the caller's own): instructions, tone and signature."},"locale":{"anyOf":[{"$ref":"#/$defs/WorkspaceLocale"},{"type":"null"}],"default":null,"description":"Language, date order, time zone and week start of the workspace (or, with mine, the caller's own)."},"setup":{"anyOf":[{"$ref":"#/$defs/WorkspaceSetup"},{"type":"null"}],"default":null,"description":"The workspace's setup checklist: steps done or skipped, the current one, and whether it was dismissed."},"meeting_settings":{"anyOf":[{"$ref":"#/$defs/WorkspaceMeetingSettings"},{"type":"null"}],"default":null,"description":"How the workspace records and shares meetings."},"note_taker":{"anyOf":[{"$ref":"#/$defs/WorkspaceNoteTaker"},{"type":"null"}],"default":null,"description":"Whether members may use the meeting note-taker, or the workspace has switched it off."},"public_site":{"anyOf":[{"$ref":"#/$defs/WorkspacePublicSite"},{"type":"null"}],"default":null,"description":"The workspace's public site: subdomain and what it publishes."},"preferences":{"anyOf":[{"$ref":"#/$defs/WorkspacePreferences"},{"type":"null"}],"default":null,"description":"The caller's saved interface preferences."},"notifications":{"anyOf":[{"$ref":"#/$defs/WorkspaceNotifications"},{"type":"null"}],"default":null,"description":"The caller's notifications (mentions, assignments, reminders), newest first, with the unread count."},"inbox":{"anyOf":[{"$ref":"#/$defs/WorkspaceInbox"},{"type":"null"}],"default":null,"description":"What is waiting on the caller (notifications, threads, tasks, reviews), newest first, with a count per source."}},"title":"workspaceArguments","type":"object"},"outputSchema":{"$defs":{"Caller":{"additionalProperties":false,"description":"The signed-in person: their profile, the tenants they belong to and the invitations\nwaiting for their verified email.","properties":{"profile":{"$ref":"#/$defs/UserProfile"},"memberships":{"default":[],"items":{"$ref":"#/$defs/TenantMembership"},"title":"Memberships","type":"array"},"invitations":{"default":[],"items":{"$ref":"#/$defs/Invitation"},"title":"Invitations","type":"array"},"platform_admin":{"default":false,"description":"The person administers the platform (`MORPHIC_CORE_PLATFORM_ADMINS`): a hint for\nshowing the admin console; every `/admin` route checks again.","title":"Platform Admin","type":"boolean"},"platform_operator":{"default":false,"description":"The person may open the admin app: a platform operator (`MORPHIC_CORE_PLATFORM_OPERATORS`,\nmetadata reads only) **or** an administrator. A hint like `platform_admin`; every `/admin`\nroute checks again.","title":"Platform Operator","type":"boolean"}},"required":["profile"],"title":"Caller","type":"object"},"DateOrder":{"description":"How dates are written: day-month-year, month-day-year or year-month-day.","enum":["dmy","mdy","ymd"],"title":"DateOrder","type":"string"},"HourCycle":{"description":"How times of day are written: 14:30 or 2:30 PM.","enum":["24h","12h"],"title":"HourCycle","type":"string"},"InboxAction":{"description":"What an inbox item can be answered with, through the service that owns it.","enum":["same","different","accept","resend","done","resume","retry","dismiss","hide"],"title":"InboxAction","type":"string"},"InboxItem":{"additionalProperties":false,"description":"One thing waiting on the caller, projected from the store it already lives in.","properties":{"source":{"$ref":"#/$defs/InboxSource"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"title":{"maxLength":1000000,"title":"Title","type":"string"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"link":{"anyOf":[{"$ref":"#/$defs/NotificationLink"},{"type":"null"}],"default":null,"description":"What to open. None when the item is only the notification itself."},"unread":{"default":true,"title":"Unread","type":"boolean"},"kind":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Which item of its source it is, in the owner's own terms: a notification's kind, an\nalert's kind (`commitment_overdue`, `gone_quiet`…), a thread's or task's activity kind.","title":"Kind"},"body":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"More about it, when the owner keeps more than a title (a notification's body, an\nalert's detail).","title":"Body"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record it is about, when there is one.","title":"Record Id"},"subject_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"What the item acts on beside its record: the commitment an alert is about.","title":"Subject Id"},"severity":{"$ref":"#/$defs/NotificationSeverity","default":"info"},"reason":{"anyOf":[{"$ref":"#/$defs/InboxReason"},{"type":"null"}],"default":null,"description":"Why it reached the caller; None when the source does not say."},"actions":{"default":[],"description":"The answers this caller may give this item now: `dismiss` and `hide` through their\nroutes, the others through `POST /core/v1/inbox/act`.","items":{"$ref":"#/$defs/InboxAction"},"title":"Actions","type":"array"}},"required":["source","id","title","occurred_at"],"title":"InboxItem","type":"object"},"InboxPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"default":0,"description":"How many items the inbox holds, across the sources asked for.","minimum":0,"title":"Total","type":"integer"},"items":{"default":[],"items":{"$ref":"#/$defs/InboxItem"},"title":"Items","type":"array"},"counts":{"additionalProperties":{"type":"integer"},"description":"How many each source holds. A source with nothing is left out.","propertyNames":{"$ref":"#/$defs/InboxSource"},"title":"Counts","type":"object"},"unavailable":{"description":"Sources asked for that the caller may not read: left out of `items` and `counts`.","items":{"$ref":"#/$defs/InboxSource"},"title":"Unavailable","type":"array","uniqueItems":true}},"title":"InboxPage","type":"object"},"InboxReason":{"description":"Why an item reached the caller's inbox.","enum":["owner","assignee","mentioned","follower","team"],"title":"InboxReason","type":"string"},"InboxSource":{"description":"One stream of the caller's inbox. Pings and mentions are notification kinds, listed on\ntheir own so a badge can count them apart from the rest.","enum":["notification","ping","mention","thread","task","suggestion","document","skipped","record_suggestion","extraction","alert","identity","duplicate","routing","reminder","automation"],"title":"InboxSource","type":"string"},"Invitation":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"email":{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","title":"Email","type":"string"},"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"status":{"$ref":"#/$defs/InvitationStatus","default":"pending"},"invited_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"expires_at":{"format":"date-time","title":"Expires At","type":"string"},"accepted_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Accepted By"},"decided_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Decided At"},"locale":{"anyOf":[{"maxLength":35,"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","type":"string"},{"type":"null"}],"default":null,"description":"The language it was sent in; None follows the workspace's.","title":"Locale"},"link_token":{"anyOf":[{"maxLength":128,"minLength":32,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},{"type":"null"}],"default":null,"description":"The unguessable secret of the invitation's link (`/join?invite_token=…`), which shows a\npreview before anyone signs in (`InvitationPreview`). New with each invitation and renewal;\nNone on invitations written before links existed. It only previews: accepting still needs\nthe invited verified email.","title":"Link Token"},"version":{"default":1,"description":"Counts the invitation's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","email","roles","invited_by","created_at","expires_at"],"title":"Invitation","type":"object"},"InvitationPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"invitations":{"default":[],"items":{"$ref":"#/$defs/Invitation"},"title":"Invitations","type":"array"}},"title":"InvitationPage","type":"object"},"InvitationStatus":{"enum":["pending","accepted","revoked"],"title":"InvitationStatus","type":"string"},"LocaleField":{"description":"A part of `LocaleSettings` that may follow the level above (automatic).","enum":["locale","timezone","date_order","hour_cycle","week_start","currency"],"title":"LocaleField","type":"string"},"LocaleSettings":{"additionalProperties":false,"description":"Language, time zone and date format: the workspace's, or one person's own.","properties":{"locale":{"default":"en","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","title":"Locale","type":"string"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"},"date_order":{"$ref":"#/$defs/DateOrder","default":"ymd"},"hour_cycle":{"$ref":"#/$defs/HourCycle","default":"24h"},"week_start":{"default":1,"description":"ISO weekday the week starts on: 1 is Monday, 7 Sunday.","maximum":7,"minimum":1,"title":"Week Start","type":"integer"},"currency":{"default":"USD","description":"How amounts are shown when a value names no currency.","pattern":"^[A-Z]{3}$","title":"Currency","type":"string"},"automatic":{"default":[],"description":"The parts set to follow the level above instead of this one's value (added in 1.x,\nadditive): a person's follow the workspace's, the workspace's Core's defaults. Written,\nthe values of these parts are ignored; read, they hold what applies.","items":{"$ref":"#/$defs/LocaleField"},"title":"Automatic","type":"array","uniqueItems":true},"inherited":{"default":[],"description":"Read only (added in 1.x, additive): the parts this level does not set, whose values come\nfrom the level above: the `automatic` ones, or every part of a level nobody set. Ignored\non write, so a value read and written back keeps its meaning.","items":{"$ref":"#/$defs/LocaleField"},"title":"Inherited","type":"array","uniqueItems":true},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"LocaleSettings","type":"object"},"MeetingSettings":{"additionalProperties":false,"description":"The workspace's meeting settings. The meeting rule: whether a new meeting that says\nnothing is shared with the workspace (`tenant`) or kept to its owner (`principal`). It\napplies to meetings recorded after it is set; a meeting's own sharing always wins.","properties":{"default_visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"recording_default":{"default":false,"description":"Whether the app offers members the meeting bot switched on until they choose. It never\njoins a meeting by itself: Core joins only for a person who turned on their own join\npreference.","title":"Recording Default","type":"boolean"},"transcription_language":{"anyOf":[{"maxLength":35,"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","type":"string"},{"type":"null"}],"default":null,"description":"The language meetings are transcribed in; none lets the transcriber detect it. Handed\nto the host's worker with each join grant.","title":"Transcription Language"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"MeetingSettings","type":"object"},"Member":{"additionalProperties":false,"properties":{"membership":{"$ref":"#/$defs/Membership"},"profile":{"anyOf":[{"$ref":"#/$defs/UserProfile"},{"type":"null"}],"default":null,"description":"None for principals without a profile (API tokens, agents) or not signed in yet."}},"required":["membership"],"title":"Member","type":"object"},"MemberPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"members":{"default":[],"items":{"$ref":"#/$defs/Member"},"title":"Members","type":"array"}},"title":"MemberPage","type":"object"},"Membership":{"additionalProperties":false,"description":"A principal's membership of a tenant, and the roles it holds there.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"status":{"$ref":"#/$defs/MembershipStatus","default":"active"},"version":{"default":1,"description":"Counts the membership's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["tenant_id","principal_id"],"title":"Membership","type":"object"},"MembershipStatus":{"enum":["active","invited","suspended"],"title":"MembershipStatus","type":"string"},"NoteTakerMode":{"description":"Whether the workspace lets its members use the meeting note-taker.","enum":["members_choose","off"],"title":"NoteTakerMode","type":"string"},"NoteTakerPolicy":{"additionalProperties":false,"description":"Whether the workspace lets its members use the meeting note-taker. A setting of its own\n(`PUT /core/v1/workspace/settings/note-taker`), so a whole-object `MeetingSettings` write\nnever resets it. `off` stops every member's joins, whatever their own join preference says:\npending joins are cancelled and none is planned. Turning it back on to `members_choose`\ngives the choice back; nobody's preference changed in between.","properties":{"mode":{"$ref":"#/$defs/NoteTakerMode","default":"members_choose"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"NoteTakerPolicy","type":"object"},"Notification":{"additionalProperties":false,"properties":{"in_app_only":{"default":false,"title":"In App Only","type":"boolean"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"recipient_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Recipient Id","type":"string"},"kind":{"$ref":"#/$defs/NotificationKind"},"title":{"maxLength":1000000,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"link":{"anyOf":[{"$ref":"#/$defs/NotificationLink"},{"type":"null"}],"default":null},"actor":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"severity":{"$ref":"#/$defs/NotificationSeverity","default":"info","description":"How urgent it is; Core's own default follows its kind (an `alert` is a warning)."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"read_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Read At"},"dismissed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Cleared from the inbox; kept for the record.","title":"Dismissed At"}},"required":["id","tenant_id","recipient_id","kind","title","created_at"],"title":"Notification","type":"object"},"NotificationKind":{"enum":["mention","assignment","reminder","review","comment","ping","document","record","alert","operation","meeting","membership","artifact","automation"],"title":"NotificationKind","type":"string"},"NotificationLink":{"additionalProperties":false,"properties":{"type":{"description":"What it is about: Core's own notices use `LinkTarget` (`activity`, `record`,\n`document`, `reminder`…); a host may name kinds of its own.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Type","type":"string"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For a `record` link, the record's object type when Core knows it, so a client routes to\nthe record without reading it first.","title":"Object Type"}},"required":["type","id"],"title":"NotificationLink","type":"object"},"NotificationPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"notifications":{"default":[],"items":{"$ref":"#/$defs/Notification"},"title":"Notifications","type":"array"},"unread":{"default":0,"minimum":0,"title":"Unread","type":"integer"},"unread_by_kind":{"additionalProperties":{"type":"integer"},"description":"The inbox's per-source badges.","propertyNames":{"$ref":"#/$defs/NotificationKind"},"title":"Unread By Kind","type":"object"}},"title":"NotificationPage","type":"object"},"NotificationSeverity":{"description":"How urgent a notification is, for its colour or icon.","enum":["info","warning","critical"],"title":"NotificationSeverity","type":"string"},"OrgProfile":{"additionalProperties":false,"description":"The organisation the workspace belongs to, as its agents and documents describe it.","properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"website":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Website"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"industry":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Industry"},"size":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Size"},"location":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"offering":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"What the organisation sells or does.","title":"Offering"},"logo_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A library file (an image) shown as the workspace's logo.","title":"Logo File Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"OrgProfile","type":"object"},"PermissionSet":{"additionalProperties":false,"description":"Every action the principal may perform in its tenant, before per-resource checks.\n\nFor interfaces deciding what to show; the server still authorizes each request.","properties":{"actions":{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"title":"Actions","type":"array","uniqueItems":true}},"required":["actions"],"title":"PermissionSet","type":"object"},"Persona":{"additionalProperties":false,"description":"How the workspace's agents write.","properties":{"instructions":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"tone":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Tone"},"signature":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Signature"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"Persona","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"PublicSite":{"additionalProperties":false,"description":"Where the workspace's public pages live: its knowledge base under a subdomain.","properties":{"subdomain":{"anyOf":[{"maxLength":63,"minLength":3,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$","type":"string"},{"type":"null"}],"default":null,"description":"Unique across the installation; `/core/v1/public/sites/{subdomain}` names its tenant.","title":"Subdomain"},"title":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"PublicSite","type":"object"},"SetupStepState":{"description":"Where one step of a workspace's setup checklist stands.","enum":["done","skipped"],"title":"SetupStepState","type":"string"},"TenantContext":{"additionalProperties":false,"description":"An existing tenant. Every Core data operation takes one explicitly.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"status":{"$ref":"#/$defs/TenantStatus","default":"active"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"slug":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Slug"},"icon_url":{"anyOf":[{"maxLength":2048,"minLength":9,"pattern":"^https://","type":"string"},{"type":"null"}],"default":null,"description":"The tenant's icon, for switchers and headers (added in 1.x, additive).","title":"Icon Url"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["tenant_id"],"title":"TenantContext","type":"object"},"TenantMembership":{"additionalProperties":false,"properties":{"tenant":{"$ref":"#/$defs/TenantContext"},"membership":{"$ref":"#/$defs/Membership"}},"required":["tenant","membership"],"title":"TenantMembership","type":"object"},"TenantStatus":{"enum":["active","suspended"],"title":"TenantStatus","type":"string"},"UserPreference":{"additionalProperties":false,"description":"One per-person setting of a client (a table's column widths, a collapsed sidebar).","properties":{"key":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","title":"Key","type":"string"},"value":{"title":"Value"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"}},"required":["key","value"],"title":"UserPreference","type":"object"},"UserPreferences":{"additionalProperties":false,"properties":{"preferences":{"default":[],"items":{"$ref":"#/$defs/UserPreference"},"title":"Preferences","type":"array"}},"title":"UserPreferences","type":"object"},"UserProfile":{"additionalProperties":false,"properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"email":{"anyOf":[{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Email"},"email_verified":{"default":false,"title":"Email Verified","type":"boolean"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"avatar_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"title":"Avatar Url"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["id","updated_at"],"title":"UserProfile","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"},"WorkspaceSetup":{"additionalProperties":false,"description":"The workspace's setup checklist: which steps are done or skipped, where it stands and\nwhether it was dismissed. Step names are the host's (`company`, `invite`, `connect`), not\nCore's.","properties":{"steps":{"maxProperties":100,"patternProperties":{"^[a-z][a-z0-9_]*$":{"$ref":"#/$defs/SetupStepState"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Steps","type":"object"},"current":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The step the checklist shows next.","title":"Current"},"dismissed":{"default":false,"description":"Someone closed the checklist; it stays closed.","title":"Dismissed","type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Completed At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"WorkspaceSetup","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/Caller"},{"$ref":"#/$defs/MemberPage"},{"$ref":"#/$defs/PermissionSet"},{"$ref":"#/$defs/InvitationPage"},{"$ref":"#/$defs/Invitation"},{"$ref":"#/$defs/OrgProfile"},{"$ref":"#/$defs/Persona"},{"$ref":"#/$defs/LocaleSettings"},{"$ref":"#/$defs/WorkspaceSetup"},{"$ref":"#/$defs/MeetingSettings"},{"$ref":"#/$defs/NoteTakerPolicy"},{"$ref":"#/$defs/PublicSite"},{"$ref":"#/$defs/UserPreferences"},{"$ref":"#/$defs/NotificationPage"},{"$ref":"#/$defs/InboxPage"}],"title":"Result"}},"required":["result"],"title":"workspaceOutput","type":"object"},"annotations":{"title":"Workspace","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_workspace","title":"Manage the workspace","description":"Invite people, change the workspace's settings and the caller's own, and clear notifications and inbox items. Settings and invitations need workspace.manage. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"DateOrder":{"description":"How dates are written: day-month-year, month-day-year or year-month-day.","enum":["dmy","mdy","ymd"],"title":"DateOrder","type":"string"},"HourCycle":{"description":"How times of day are written: 14:30 or 2:30 PM.","enum":["24h","12h"],"title":"HourCycle","type":"string"},"InboxAction":{"description":"What an inbox item can be answered with, through the service that owns it.","enum":["same","different","accept","resend","done","resume","retry","dismiss","hide"],"title":"InboxAction","type":"string"},"InboxSource":{"description":"One stream of the caller's inbox. Pings and mentions are notification kinds, listed on\ntheir own so a badge can count them apart from the rest.","enum":["notification","ping","mention","thread","task","suggestion","document","skipped","record_suggestion","extraction","alert","identity","duplicate","routing","reminder","automation"],"title":"InboxSource","type":"string"},"InvitationChange":{"additionalProperties":false,"description":"New roles for a pending invitation; its expiry stays.","properties":{"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"minItems":1,"title":"Roles","type":"array","uniqueItems":true},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version (the `version` read); None changes whatever is stored.","title":"Expected Version"}},"required":["roles"],"title":"InvitationChange","type":"object"},"LocaleField":{"description":"A part of `LocaleSettings` that may follow the level above (automatic).","enum":["locale","timezone","date_order","hour_cycle","week_start","currency"],"title":"LocaleField","type":"string"},"ManageWorkspaceAcceptInvitation":{"additionalProperties":false,"properties":{"invitation_id":{"description":"The invitation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Invitation Id","type":"string"}},"required":["invitation_id"],"title":"ManageWorkspaceAcceptInvitation","type":"object"},"ManageWorkspaceActOnInbox":{"additionalProperties":false,"properties":{"source":{"$ref":"#/$defs/InboxSource"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"action":{"anyOf":[{"$ref":"#/$defs/InboxAction"},{"type":"null"}],"default":null,"description":"For `POST /core/v1/inbox/act`: the answer (an identity review, a schema proposal, a\nsuggested task, an alert's commitment, a failed reminder)."}},"required":["source","id"],"title":"ManageWorkspaceActOnInbox","type":"object"},"ManageWorkspaceChangeInvitation":{"additionalProperties":false,"properties":{"invitation_id":{"description":"The invitation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Invitation Id","type":"string"},"change":{"$ref":"#/$defs/InvitationChange","description":"The change."}},"required":["invitation_id","change"],"title":"ManageWorkspaceChangeInvitation","type":"object"},"ManageWorkspaceChangeWorkspace":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"icon_url":{"anyOf":[{"maxLength":2048,"minLength":9,"pattern":"^https://","type":"string"},{"type":"null"}],"default":null,"title":"Icon Url"}},"title":"ManageWorkspaceChangeWorkspace","type":"object"},"ManageWorkspaceDeletePreference":{"additionalProperties":false,"properties":{"key":{"description":"The preference, e.g. `crm.sidebar`.","maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","title":"Key","type":"string"}},"required":["key"],"title":"ManageWorkspaceDeletePreference","type":"object"},"ManageWorkspaceDismissInbox":{"additionalProperties":false,"properties":{"source":{"$ref":"#/$defs/InboxSource"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"action":{"anyOf":[{"$ref":"#/$defs/InboxAction"},{"type":"null"}],"default":null,"description":"For `POST /core/v1/inbox/act`: the answer (an identity review, a schema proposal, a\nsuggested task, an alert's commitment, a failed reminder)."}},"required":["source","id"],"title":"ManageWorkspaceDismissInbox","type":"object"},"ManageWorkspaceDismissNotifications":{"additionalProperties":false,"properties":{"ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"minItems":1,"title":"Ids","type":"array","uniqueItems":true}},"required":["ids"],"title":"ManageWorkspaceDismissNotifications","type":"object"},"ManageWorkspaceGenerateOrgProfile":{"additionalProperties":false,"properties":{},"title":"ManageWorkspaceGenerateOrgProfile","type":"object"},"ManageWorkspaceGeneratePersona":{"additionalProperties":false,"properties":{},"title":"ManageWorkspaceGeneratePersona","type":"object"},"ManageWorkspaceHideInbox":{"additionalProperties":false,"properties":{"source":{"$ref":"#/$defs/InboxSource"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"action":{"anyOf":[{"$ref":"#/$defs/InboxAction"},{"type":"null"}],"default":null,"description":"For `POST /core/v1/inbox/act`: the answer (an identity review, a schema proposal, a\nsuggested task, an alert's commitment, a failed reminder)."}},"required":["source","id"],"title":"ManageWorkspaceHideInbox","type":"object"},"ManageWorkspaceInvite":{"additionalProperties":false,"properties":{"email":{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","title":"Email","type":"string"},"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"minItems":1,"title":"Roles","type":"array","uniqueItems":true},"locale":{"anyOf":[{"maxLength":35,"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","type":"string"},{"type":"null"}],"default":null,"description":"The language of the invitation email and the invited person's first language; a\nrenewal keeps the one it had when this is left out.","title":"Locale"}},"required":["email","roles"],"title":"ManageWorkspaceInvite","type":"object"},"ManageWorkspacePing":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"recipient_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"minItems":1,"title":"Recipient Ids","type":"array","uniqueItems":true},"link":{"$ref":"#/$defs/NotificationLink","description":"`record` or `activity`."},"message":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"required":["key","recipient_ids","link"],"title":"ManageWorkspacePing","type":"object"},"ManageWorkspaceReadInbox":{"additionalProperties":false,"properties":{"source":{"$ref":"#/$defs/InboxSource"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"action":{"anyOf":[{"$ref":"#/$defs/InboxAction"},{"type":"null"}],"default":null,"description":"For `POST /core/v1/inbox/act`: the answer (an identity review, a schema proposal, a\nsuggested task, an alert's commitment, a failed reminder)."}},"required":["source","id"],"title":"ManageWorkspaceReadInbox","type":"object"},"ManageWorkspaceReadNotifications":{"additionalProperties":false,"properties":{"ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Ids","type":"array","uniqueItems":true}},"title":"ManageWorkspaceReadNotifications","type":"object"},"ManageWorkspaceRevokeInvitation":{"additionalProperties":false,"properties":{"invitation_id":{"description":"The invitation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Invitation Id","type":"string"}},"required":["invitation_id"],"title":"ManageWorkspaceRevokeInvitation","type":"object"},"ManageWorkspaceSetLocale":{"additionalProperties":false,"properties":{"mine":{"default":false,"description":"The caller's own setting instead of the workspace's.","title":"Mine","type":"boolean"},"locale":{"default":"en","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","title":"Locale","type":"string"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"},"date_order":{"$ref":"#/$defs/DateOrder","default":"ymd"},"hour_cycle":{"$ref":"#/$defs/HourCycle","default":"24h"},"week_start":{"default":1,"description":"ISO weekday the week starts on: 1 is Monday, 7 Sunday.","maximum":7,"minimum":1,"title":"Week Start","type":"integer"},"currency":{"default":"USD","description":"How amounts are shown when a value names no currency.","pattern":"^[A-Z]{3}$","title":"Currency","type":"string"},"automatic":{"default":[],"description":"The parts set to follow the level above instead of this one's value (added in 1.x,\nadditive): a person's follow the workspace's, the workspace's Core's defaults. Written,\nthe values of these parts are ignored; read, they hold what applies.","items":{"$ref":"#/$defs/LocaleField"},"title":"Automatic","type":"array","uniqueItems":true},"inherited":{"default":[],"description":"Read only (added in 1.x, additive): the parts this level does not set, whose values come\nfrom the level above: the `automatic` ones, or every part of a level nobody set. Ignored\non write, so a value read and written back keeps its meaning.","items":{"$ref":"#/$defs/LocaleField"},"title":"Inherited","type":"array","uniqueItems":true},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetLocale","type":"object"},"ManageWorkspaceSetMeetingSettings":{"additionalProperties":false,"properties":{"default_visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"recording_default":{"default":false,"description":"Whether the app offers members the meeting bot switched on until they choose. It never\njoins a meeting by itself: Core joins only for a person who turned on their own join\npreference.","title":"Recording Default","type":"boolean"},"transcription_language":{"anyOf":[{"maxLength":35,"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","type":"string"},{"type":"null"}],"default":null,"description":"The language meetings are transcribed in; none lets the transcriber detect it. Handed\nto the host's worker with each join grant.","title":"Transcription Language"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetMeetingSettings","type":"object"},"ManageWorkspaceSetNoteTaker":{"additionalProperties":false,"properties":{"mode":{"$ref":"#/$defs/NoteTakerMode","default":"members_choose"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetNoteTaker","type":"object"},"ManageWorkspaceSetOrgProfile":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"website":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Website"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"industry":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Industry"},"size":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Size"},"location":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"offering":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"What the organisation sells or does.","title":"Offering"},"logo_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A library file (an image) shown as the workspace's logo.","title":"Logo File Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetOrgProfile","type":"object"},"ManageWorkspaceSetPersona":{"additionalProperties":false,"properties":{"mine":{"default":false,"description":"The caller's own setting instead of the workspace's.","title":"Mine","type":"boolean"},"instructions":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"tone":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Tone"},"signature":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Signature"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetPersona","type":"object"},"ManageWorkspaceSetPreference":{"additionalProperties":false,"properties":{"key":{"description":"The preference, e.g. `crm.sidebar`.","maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","title":"Key","type":"string"},"value":{"description":"Any JSON value.","title":"Value"}},"required":["key","value"],"title":"ManageWorkspaceSetPreference","type":"object"},"ManageWorkspaceSetPublicSite":{"additionalProperties":false,"properties":{"subdomain":{"anyOf":[{"maxLength":63,"minLength":3,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$","type":"string"},{"type":"null"}],"default":null,"description":"Unique across the installation; `/core/v1/public/sites/{subdomain}` names its tenant.","title":"Subdomain"},"title":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetPublicSite","type":"object"},"ManageWorkspaceSetSetup":{"additionalProperties":false,"properties":{"steps":{"maxProperties":100,"patternProperties":{"^[a-z][a-z0-9_]*$":{"$ref":"#/$defs/SetupStepState"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Steps","type":"object"},"current":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The step the checklist shows next.","title":"Current"},"dismissed":{"default":false,"description":"Someone closed the checklist; it stays closed.","title":"Dismissed","type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Completed At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"ManageWorkspaceSetSetup","type":"object"},"ManageWorkspaceUnhideInbox":{"additionalProperties":false,"properties":{"source":{"$ref":"#/$defs/InboxSource"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"action":{"anyOf":[{"$ref":"#/$defs/InboxAction"},{"type":"null"}],"default":null,"description":"For `POST /core/v1/inbox/act`: the answer (an identity review, a schema proposal, a\nsuggested task, an alert's commitment, a failed reminder)."}},"required":["source","id"],"title":"ManageWorkspaceUnhideInbox","type":"object"},"NoteTakerMode":{"description":"Whether the workspace lets its members use the meeting note-taker.","enum":["members_choose","off"],"title":"NoteTakerMode","type":"string"},"NotificationLink":{"additionalProperties":false,"properties":{"type":{"description":"What it is about: Core's own notices use `LinkTarget` (`activity`, `record`,\n`document`, `reminder`…); a host may name kinds of its own.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Type","type":"string"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For a `record` link, the record's object type when Core knows it, so a client routes to\nthe record without reading it first.","title":"Object Type"}},"required":["type","id"],"title":"NotificationLink","type":"object"},"SetupStepState":{"description":"Where one step of a workspace's setup checklist stands.","enum":["done","skipped"],"title":"SetupStepState","type":"string"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"invite":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceInvite"},{"type":"null"}],"default":null,"description":"Invite someone by email with roles; the same email again returns the pending invitation."},"change_invitation":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceChangeInvitation"},{"type":"null"}],"default":null,"description":"Change a pending invitation's roles."},"revoke_invitation":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceRevokeInvitation"},{"type":"null"}],"default":null,"description":"Withdraw a pending invitation."},"accept_invitation":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceAcceptInvitation"},{"type":"null"}],"default":null,"description":"Accept an invitation addressed to the caller (whoami lists them)."},"change_workspace":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceChangeWorkspace"},{"type":"null"}],"default":null,"description":"Rename the workspace or change its icon (workspace.manage)."},"set_org_profile":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetOrgProfile"},{"type":"null"}],"default":null,"description":"Replace the organisation profile."},"generate_org_profile":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceGenerateOrgProfile"},{"type":"null"}],"default":null,"description":"Draft the organisation profile from the workspace's website and data, and save it."},"set_persona":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetPersona"},{"type":"null"}],"default":null,"description":"Replace the agents' persona (or, with mine, the caller's own)."},"generate_persona":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceGeneratePersona"},{"type":"null"}],"default":null,"description":"Draft the agents' persona from the organisation profile, and save it."},"set_locale":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetLocale"},{"type":"null"}],"default":null,"description":"Replace the language, date order, time zone and week start (or, with mine, the caller's own)."},"set_setup":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetSetup"},{"type":"null"}],"default":null,"description":"Replace the workspace's setup checklist."},"set_meeting_settings":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetMeetingSettings"},{"type":"null"}],"default":null,"description":"Replace how the workspace records and shares meetings."},"set_note_taker":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetNoteTaker"},{"type":"null"}],"default":null,"description":"Switch the meeting note-taker off for every member, or leave it to their own choice. Off cancels pending joins."},"set_public_site":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetPublicSite"},{"type":"null"}],"default":null,"description":"Replace the workspace's public site settings."},"set_preference":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceSetPreference"},{"type":"null"}],"default":null,"description":"Save one of the caller's interface preferences."},"delete_preference":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceDeletePreference"},{"type":"null"}],"default":null,"description":"Forget one of the caller's interface preferences."},"read_notifications":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceReadNotifications"},{"type":"null"}],"default":null,"description":"Mark the caller's notifications read (some, or all)."},"dismiss_notifications":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceDismissNotifications"},{"type":"null"}],"default":null,"description":"Dismiss the caller's notifications (some, or all)."},"ping":{"anyOf":[{"$ref":"#/$defs/ManageWorkspacePing"},{"type":"null"}],"default":null,"description":"Notify members about a record or activity, with a message."},"read_inbox":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceReadInbox"},{"type":"null"}],"default":null,"description":"Mark inbox items read."},"dismiss_inbox":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceDismissInbox"},{"type":"null"}],"default":null,"description":"Dismiss inbox items."},"act_on_inbox":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceActOnInbox"},{"type":"null"}],"default":null,"description":"Answer an inbox item with one of its `actions` (accept, done, same, different, resend, dismiss, hide)."},"hide_inbox":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceHideInbox"},{"type":"null"}],"default":null,"description":"Hide a shared inbox item from the caller's own inbox only."},"unhide_inbox":{"anyOf":[{"$ref":"#/$defs/ManageWorkspaceUnhideInbox"},{"type":"null"}],"default":null,"description":"Show a hidden inbox item again."}},"title":"manage_workspaceArguments","type":"object"},"outputSchema":{"$defs":{"ChangeCount":{"additionalProperties":false,"description":"How many items a bulk change touched.","properties":{"changed":{"minimum":0,"title":"Changed","type":"integer"}},"required":["changed"],"title":"ChangeCount","type":"object"},"DateOrder":{"description":"How dates are written: day-month-year, month-day-year or year-month-day.","enum":["dmy","mdy","ymd"],"title":"DateOrder","type":"string"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"HourCycle":{"description":"How times of day are written: 14:30 or 2:30 PM.","enum":["24h","12h"],"title":"HourCycle","type":"string"},"Invitation":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"email":{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","title":"Email","type":"string"},"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"status":{"$ref":"#/$defs/InvitationStatus","default":"pending"},"invited_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"expires_at":{"format":"date-time","title":"Expires At","type":"string"},"accepted_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Accepted By"},"decided_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Decided At"},"locale":{"anyOf":[{"maxLength":35,"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","type":"string"},{"type":"null"}],"default":null,"description":"The language it was sent in; None follows the workspace's.","title":"Locale"},"link_token":{"anyOf":[{"maxLength":128,"minLength":32,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},{"type":"null"}],"default":null,"description":"The unguessable secret of the invitation's link (`/join?invite_token=…`), which shows a\npreview before anyone signs in (`InvitationPreview`). New with each invitation and renewal;\nNone on invitations written before links existed. It only previews: accepting still needs\nthe invited verified email.","title":"Link Token"},"version":{"default":1,"description":"Counts the invitation's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","email","roles","invited_by","created_at","expires_at"],"title":"Invitation","type":"object"},"InvitationStatus":{"enum":["pending","accepted","revoked"],"title":"InvitationStatus","type":"string"},"LocaleField":{"description":"A part of `LocaleSettings` that may follow the level above (automatic).","enum":["locale","timezone","date_order","hour_cycle","week_start","currency"],"title":"LocaleField","type":"string"},"LocaleSettings":{"additionalProperties":false,"description":"Language, time zone and date format: the workspace's, or one person's own.","properties":{"locale":{"default":"en","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","title":"Locale","type":"string"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"},"date_order":{"$ref":"#/$defs/DateOrder","default":"ymd"},"hour_cycle":{"$ref":"#/$defs/HourCycle","default":"24h"},"week_start":{"default":1,"description":"ISO weekday the week starts on: 1 is Monday, 7 Sunday.","maximum":7,"minimum":1,"title":"Week Start","type":"integer"},"currency":{"default":"USD","description":"How amounts are shown when a value names no currency.","pattern":"^[A-Z]{3}$","title":"Currency","type":"string"},"automatic":{"default":[],"description":"The parts set to follow the level above instead of this one's value (added in 1.x,\nadditive): a person's follow the workspace's, the workspace's Core's defaults. Written,\nthe values of these parts are ignored; read, they hold what applies.","items":{"$ref":"#/$defs/LocaleField"},"title":"Automatic","type":"array","uniqueItems":true},"inherited":{"default":[],"description":"Read only (added in 1.x, additive): the parts this level does not set, whose values come\nfrom the level above: the `automatic` ones, or every part of a level nobody set. Ignored\non write, so a value read and written back keeps its meaning.","items":{"$ref":"#/$defs/LocaleField"},"title":"Inherited","type":"array","uniqueItems":true},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"LocaleSettings","type":"object"},"MeetingSettings":{"additionalProperties":false,"description":"The workspace's meeting settings. The meeting rule: whether a new meeting that says\nnothing is shared with the workspace (`tenant`) or kept to its owner (`principal`). It\napplies to meetings recorded after it is set; a meeting's own sharing always wins.","properties":{"default_visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"recording_default":{"default":false,"description":"Whether the app offers members the meeting bot switched on until they choose. It never\njoins a meeting by itself: Core joins only for a person who turned on their own join\npreference.","title":"Recording Default","type":"boolean"},"transcription_language":{"anyOf":[{"maxLength":35,"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","type":"string"},{"type":"null"}],"default":null,"description":"The language meetings are transcribed in; none lets the transcriber detect it. Handed\nto the host's worker with each join grant.","title":"Transcription Language"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"MeetingSettings","type":"object"},"Membership":{"additionalProperties":false,"description":"A principal's membership of a tenant, and the roles it holds there.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"status":{"$ref":"#/$defs/MembershipStatus","default":"active"},"version":{"default":1,"description":"Counts the membership's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["tenant_id","principal_id"],"title":"Membership","type":"object"},"MembershipStatus":{"enum":["active","invited","suspended"],"title":"MembershipStatus","type":"string"},"NoteTakerMode":{"description":"Whether the workspace lets its members use the meeting note-taker.","enum":["members_choose","off"],"title":"NoteTakerMode","type":"string"},"NoteTakerPolicy":{"additionalProperties":false,"description":"Whether the workspace lets its members use the meeting note-taker. A setting of its own\n(`PUT /core/v1/workspace/settings/note-taker`), so a whole-object `MeetingSettings` write\nnever resets it. `off` stops every member's joins, whatever their own join preference says:\npending joins are cancelled and none is planned. Turning it back on to `members_choose`\ngives the choice back; nobody's preference changed in between.","properties":{"mode":{"$ref":"#/$defs/NoteTakerMode","default":"members_choose"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"NoteTakerPolicy","type":"object"},"OrgProfile":{"additionalProperties":false,"description":"The organisation the workspace belongs to, as its agents and documents describe it.","properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"website":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Website"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"industry":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Industry"},"size":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Size"},"location":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"offering":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"What the organisation sells or does.","title":"Offering"},"logo_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A library file (an image) shown as the workspace's logo.","title":"Logo File Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"OrgProfile","type":"object"},"Persona":{"additionalProperties":false,"description":"How the workspace's agents write.","properties":{"instructions":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"tone":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Tone"},"signature":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Signature"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"Persona","type":"object"},"PingReceipt":{"additionalProperties":false,"properties":{"notified":{"default":[],"description":"The recipients who are members and were notified.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Notified","type":"array"}},"title":"PingReceipt","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"PublicSite":{"additionalProperties":false,"description":"Where the workspace's public pages live: its knowledge base under a subdomain.","properties":{"subdomain":{"anyOf":[{"maxLength":63,"minLength":3,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$","type":"string"},{"type":"null"}],"default":null,"description":"Unique across the installation; `/core/v1/public/sites/{subdomain}` names its tenant.","title":"Subdomain"},"title":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"PublicSite","type":"object"},"SetupStepState":{"description":"Where one step of a workspace's setup checklist stands.","enum":["done","skipped"],"title":"SetupStepState","type":"string"},"TenantContext":{"additionalProperties":false,"description":"An existing tenant. Every Core data operation takes one explicitly.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"status":{"$ref":"#/$defs/TenantStatus","default":"active"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"slug":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Slug"},"icon_url":{"anyOf":[{"maxLength":2048,"minLength":9,"pattern":"^https://","type":"string"},{"type":"null"}],"default":null,"description":"The tenant's icon, for switchers and headers (added in 1.x, additive).","title":"Icon Url"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["tenant_id"],"title":"TenantContext","type":"object"},"TenantStatus":{"enum":["active","suspended"],"title":"TenantStatus","type":"string"},"UserPreference":{"additionalProperties":false,"description":"One per-person setting of a client (a table's column widths, a collapsed sidebar).","properties":{"key":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","title":"Key","type":"string"},"value":{"title":"Value"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"}},"required":["key","value"],"title":"UserPreference","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"},"WorkspaceSetup":{"additionalProperties":false,"description":"The workspace's setup checklist: which steps are done or skipped, where it stands and\nwhether it was dismissed. Step names are the host's (`company`, `invite`, `connect`), not\nCore's.","properties":{"steps":{"maxProperties":100,"patternProperties":{"^[a-z][a-z0-9_]*$":{"$ref":"#/$defs/SetupStepState"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Steps","type":"object"},"current":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The step the checklist shows next.","title":"Current"},"dismissed":{"default":false,"description":"Someone closed the checklist; it stays closed.","title":"Dismissed","type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Completed At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"title":"WorkspaceSetup","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/Invitation"},{"$ref":"#/$defs/Done"},{"$ref":"#/$defs/Membership"},{"$ref":"#/$defs/TenantContext"},{"$ref":"#/$defs/OrgProfile"},{"$ref":"#/$defs/Persona"},{"$ref":"#/$defs/LocaleSettings"},{"$ref":"#/$defs/WorkspaceSetup"},{"$ref":"#/$defs/MeetingSettings"},{"$ref":"#/$defs/NoteTakerPolicy"},{"$ref":"#/$defs/PublicSite"},{"$ref":"#/$defs/UserPreference"},{"$ref":"#/$defs/ChangeCount"},{"$ref":"#/$defs/PingReceipt"}],"title":"Result"}},"required":["result"],"title":"manage_workspaceOutput","type":"object"},"annotations":{"title":"Manage the workspace","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"schema","title":"Workspace schema","description":"The workspace's object types (people, companies, deals and custom ones) with their attributes, the ready-made templates, and schema proposals. Read it before reading or writing records; object type slugs are plural. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"ProposalStatus":{"enum":["proposed","accepted","dismissed"],"title":"ProposalStatus","type":"string"},"SchemaAccessPreview":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"required":["slug"],"title":"SchemaAccessPreview","type":"object"},"SchemaObjectType":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"}},"required":["slug"],"title":"SchemaObjectType","type":"object"},"SchemaObjectTypes":{"additionalProperties":false,"properties":{},"title":"SchemaObjectTypes","type":"object"},"SchemaProposal":{"additionalProperties":false,"properties":{"proposal_id":{"description":"The proposal's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Proposal Id","type":"string"}},"required":["proposal_id"],"title":"SchemaProposal","type":"object"},"SchemaProposals":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"status":{"anyOf":[{"$ref":"#/$defs/ProposalStatus"},{"type":"null"}],"default":"proposed","description":"None lists every status."},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"}},"title":"SchemaProposals","type":"object"},"SchemaSummaries":{"additionalProperties":false,"properties":{},"title":"SchemaSummaries","type":"object"},"SchemaTemplates":{"additionalProperties":false,"properties":{},"title":"SchemaTemplates","type":"object"},"SchemaValidateValues":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"values":{"additionalProperties":true,"title":"Values","type":"object"},"partial":{"default":false,"description":"True for an update: attributes left out are not checked for `required`.","title":"Partial","type":"boolean"}},"required":["slug"],"title":"SchemaValidateValues","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"object_types":{"anyOf":[{"$ref":"#/$defs/SchemaObjectTypes"},{"type":"null"}],"default":null,"description":"Every object type with its attributes."},"summaries":{"anyOf":[{"$ref":"#/$defs/SchemaSummaries"},{"type":"null"}],"default":null,"description":"Every object type with its record count, without attributes."},"object_type":{"anyOf":[{"$ref":"#/$defs/SchemaObjectType"},{"type":"null"}],"default":null,"description":"One object type with its attributes, options and relations."},"templates":{"anyOf":[{"$ref":"#/$defs/SchemaTemplates"},{"type":"null"}],"default":null,"description":"Ready-made object types (companies, people, deals, invoices, tickets, products, quotes…) with their attributes, defaults marked."},"proposals":{"anyOf":[{"$ref":"#/$defs/SchemaProposals"},{"type":"null"}],"default":null,"description":"Schema changes waiting for a person (or decided ones), newest first."},"proposal":{"anyOf":[{"$ref":"#/$defs/SchemaProposal"},{"type":"null"}],"default":null,"description":"One schema proposal with its evidence."},"validate_values":{"anyOf":[{"$ref":"#/$defs/SchemaValidateValues"},{"type":"null"}],"default":null,"description":"Check field values against an object type without writing: returns them coerced, or the invalid fields."},"access_preview":{"anyOf":[{"$ref":"#/$defs/SchemaAccessPreview"},{"type":"null"}],"default":null,"description":"Who could see and change an object type's records under an access policy, before setting it."}},"title":"schemaArguments","type":"object"},"outputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AccessPolicy":{"additionalProperties":false,"description":"Who can see and change the records of an object type.","properties":{"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"title":"AccessPolicy","type":"object"},"AccessPolicyPreview":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"policy":{"$ref":"#/$defs/AccessPolicy"},"members":{"default":[],"items":{"$ref":"#/$defs/AccessPreviewMember"},"title":"Members","type":"array"},"truncated":{"default":false,"title":"Truncated","type":"boolean"}},"required":["object_type","policy"],"title":"AccessPolicyPreview","type":"object"},"AccessPreviewMember":{"additionalProperties":false,"properties":{"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"read":{"default":false,"title":"Read","type":"boolean"},"write":{"default":false,"title":"Write","type":"boolean"}},"required":["principal_id"],"title":"AccessPreviewMember","type":"object"},"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"AttributeDef":{"additionalProperties":false,"description":"A typed field of an object type.","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"}},"required":["slug","name","type","id"],"title":"AttributeDef","type":"object"},"AttributeOption":{"additionalProperties":false,"description":"One choice of a select or multi-select attribute.","properties":{"value":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value","type":"string"},"label":{"maxLength":256,"minLength":1,"title":"Label","type":"string"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A palette token chosen by the application.","title":"Color"},"terminal":{"default":false,"description":"Ends a process when chosen, e.g. a closing stage.","title":"Terminal","type":"boolean"},"metadata":{"additionalProperties":true,"description":"Application meaning of the option, e.g. an outcome. Core does not interpret it.","title":"Metadata","type":"object"}},"required":["value","label"],"title":"AttributeOption","type":"object"},"AttributeSpec":{"additionalProperties":false,"description":"An attribute as its author writes it. Core adds the `id` (see `AttributeDef`).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"}},"required":["slug","name","type"],"title":"AttributeSpec","type":"object"},"AttributeType":{"enum":["string","text","number","decimal","boolean","date","datetime","select","multi_select","file","relation","json","recurring_amount","user"],"title":"AttributeType","type":"string"},"FieldValues":{"additionalProperties":false,"description":"Field values of one record, keyed by attribute slug.\n\nSent to be validated against an object type, and returned coerced to the attribute types.","properties":{"values":{"additionalProperties":true,"title":"Values","type":"object"},"partial":{"default":false,"description":"True for an update: attributes left out are not checked for `required`.","title":"Partial","type":"boolean"}},"title":"FieldValues","type":"object"},"FileCategory":{"additionalProperties":false,"description":"A named group for the files of an object type's records.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"}},"required":["id","name"],"title":"FileCategory","type":"object"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"ObjectTypeDef":{"additionalProperties":false,"description":"A tenant-defined type of record and its attributes.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeDef"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"file_categories":{"default":[],"description":"Groups for its records' files, in order. Changed only through\n`PUT …/{slug}/file-categories`, so writing a definition never replaces them.","items":{"$ref":"#/$defs/FileCategory"},"title":"File Categories","type":"array"},"version":{"default":1,"description":"Increases with every change of the definition.","minimum":1,"title":"Version","type":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["name","id","tenant_id","slug","created_at","updated_at"],"title":"ObjectTypeDef","type":"object"},"ObjectTypeList":{"additionalProperties":false,"description":"A tenant's object types, ordered by `order`, then slug.","properties":{"object_types":{"default":[],"items":{"$ref":"#/$defs/ObjectTypeDef"},"title":"Object Types","type":"array"}},"title":"ObjectTypeList","type":"object"},"ObjectTypeSpec":{"additionalProperties":false,"description":"An object type as its author writes it: everything but its identity and history.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"}},"required":["name"],"title":"ObjectTypeSpec","type":"object"},"ObjectTypeSummaries":{"additionalProperties":false,"properties":{"summaries":{"default":[],"items":{"$ref":"#/$defs/ObjectTypeSummary"},"title":"Summaries","type":"array"}},"title":"ObjectTypeSummaries","type":"object"},"ObjectTypeSummary":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"enabled":{"title":"Enabled","type":"boolean"},"attributes":{"minimum":0,"title":"Attributes","type":"integer"},"records":{"description":"Live and archived records.","minimum":0,"title":"Records","type":"integer"}},"required":["slug","name","enabled","attributes","records"],"title":"ObjectTypeSummary","type":"object"},"ObjectTypeTemplate":{"additionalProperties":false,"description":"A ready-made object type a tenant may install (companies, people, deals…).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/ObjectTypeSpec"},"default":{"type":"boolean","default":false,"description":"Installed in every new tenant.","title":"Default"}},"required":["slug","spec"],"title":"ObjectTypeTemplate","type":"object"},"ObjectTypeTemplateList":{"additionalProperties":false,"properties":{"templates":{"default":[],"items":{"$ref":"#/$defs/ObjectTypeTemplate"},"title":"Templates","type":"array"}},"title":"ObjectTypeTemplateList","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ProposalKind":{"enum":["object_type","attributes"],"title":"ProposalKind","type":"string"},"ProposalStatus":{"enum":["proposed","accepted","dismissed"],"title":"ProposalStatus","type":"string"},"RelationCardinality":{"description":"Enforced on the record holding the relation: `one_to_one` and `many_to_one` hold one\ntarget, the others a list.","enum":["one_to_one","one_to_many","many_to_many","many_to_one"],"title":"RelationCardinality","type":"string"},"RelationSpec":{"additionalProperties":false,"description":"The target and cardinality of a relation attribute.","properties":{"target_object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Target Object Type","type":"string"},"cardinality":{"$ref":"#/$defs/RelationCardinality"}},"required":["target_object_type","cardinality"],"title":"RelationSpec","type":"object"},"SchemaProposal":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/ProposalKind"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"spec":{"anyOf":[{"$ref":"#/$defs/ObjectTypeSpec"},{"type":"null"}],"default":null},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"$ref":"#/$defs/ProposalStatus","default":"proposed"},"evidence":{"default":[],"description":"The latest evidence, each once.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":25,"title":"Evidence","type":"array"},"support":{"default":1,"description":"How many times it was proposed with distinct evidence.","minimum":1,"title":"Support","type":"integer"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"},"suggested":{"default":false,"description":"Drafted by the LLM from data.","title":"Suggested","type":"boolean"},"external":{"default":false,"description":"Drawn, at least once, from ingested content people outside the tenant wrote (mail,\nmessages): never accepted automatically, so outside senders cannot shape the schema.","title":"External","type":"boolean"},"proposed_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"decided_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"decided_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Decided At"}},"required":["id","tenant_id","kind","object_type","proposed_by","created_at","updated_at"],"title":"SchemaProposal","type":"object"},"SchemaProposalPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"proposals":{"default":[],"items":{"$ref":"#/$defs/SchemaProposal"},"title":"Proposals","type":"array"}},"title":"SchemaProposalPage","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/ObjectTypeList"},{"$ref":"#/$defs/ObjectTypeSummaries"},{"$ref":"#/$defs/ObjectTypeDef"},{"$ref":"#/$defs/ObjectTypeTemplateList"},{"$ref":"#/$defs/SchemaProposalPage"},{"$ref":"#/$defs/SchemaProposal"},{"$ref":"#/$defs/FieldValues"},{"$ref":"#/$defs/AccessPolicyPreview"}],"title":"Result"}},"required":["result"],"title":"schemaOutput","type":"object"},"annotations":{"title":"Workspace schema","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_schema","title":"Manage the schema","description":"Create, change and delete object types (custom objects) and their attributes (custom fields), install templates and packs, and propose or decide schema changes. Needs ontology.manage, except proposing. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AccessPolicy":{"additionalProperties":false,"description":"Who can see and change the records of an object type.","properties":{"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"title":"AccessPolicy","type":"object"},"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"AttributeOption":{"additionalProperties":false,"description":"One choice of a select or multi-select attribute.","properties":{"value":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value","type":"string"},"label":{"maxLength":256,"minLength":1,"title":"Label","type":"string"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A palette token chosen by the application.","title":"Color"},"terminal":{"default":false,"description":"Ends a process when chosen, e.g. a closing stage.","title":"Terminal","type":"boolean"},"metadata":{"additionalProperties":true,"description":"Application meaning of the option, e.g. an outcome. Core does not interpret it.","title":"Metadata","type":"object"}},"required":["value","label"],"title":"AttributeOption","type":"object"},"AttributeSpec":{"additionalProperties":false,"description":"An attribute as its author writes it. Core adds the `id` (see `AttributeDef`).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"}},"required":["slug","name","type"],"title":"AttributeSpec","type":"object"},"AttributeType":{"enum":["string","text","number","decimal","boolean","date","datetime","select","multi_select","file","relation","json","recurring_amount","user"],"title":"AttributeType","type":"string"},"FileCategoryInput":{"additionalProperties":false,"description":"A category as a client sends it: without an id, it is a new one.","properties":{"id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Id"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"FileCategoryInput","type":"object"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"ItemScope":{"enum":["shared","personal"],"title":"ItemScope","type":"string"},"ManageSchemaAcceptProposal":{"additionalProperties":false,"properties":{"proposal_id":{"description":"The proposal's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Proposal Id","type":"string"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"attributes":{"description":"The proposed attributes to add; every one when empty.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Attributes","type":"array","uniqueItems":true}},"required":["proposal_id"],"title":"ManageSchemaAcceptProposal","type":"object"},"ManageSchemaCreatePack":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"slugs":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"minItems":1,"title":"Slugs","type":"array"},"scope":{"$ref":"#/$defs/ItemScope","default":"shared","description":"Shared packs are workspace-wide; personal ones stay with their owner."}},"required":["key","name","slugs"],"title":"ManageSchemaCreatePack","type":"object"},"ManageSchemaDefineAttribute":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/AttributeSpec","description":"The attribute."}},"required":["slug","spec"],"title":"ManageSchemaDefineAttribute","type":"object"},"ManageSchemaDefineObjectType":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/ObjectTypeSpec","description":"The definition."}},"required":["slug","spec"],"title":"ManageSchemaDefineObjectType","type":"object"},"ManageSchemaDeleteAttribute":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"attribute":{"description":"The attribute's slug.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"}},"required":["slug","attribute"],"title":"ManageSchemaDeleteAttribute","type":"object"},"ManageSchemaDeleteObjectType":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"}},"required":["slug"],"title":"ManageSchemaDeleteObjectType","type":"object"},"ManageSchemaDismissProposal":{"additionalProperties":false,"properties":{"proposal_id":{"description":"The proposal's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Proposal Id","type":"string"}},"required":["proposal_id"],"title":"ManageSchemaDismissProposal","type":"object"},"ManageSchemaDuplicateObjectType":{"additionalProperties":false,"properties":{"object_type":{"description":"The object type to copy, by slug.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"}},"required":["object_type","slug","name"],"title":"ManageSchemaDuplicateObjectType","type":"object"},"ManageSchemaInstallPack":{"additionalProperties":false,"properties":{"pack_id":{"description":"The pack's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Pack Id","type":"string"}},"required":["pack_id"],"title":"ManageSchemaInstallPack","type":"object"},"ManageSchemaInstallTemplates":{"additionalProperties":false,"properties":{"slugs":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"minItems":1,"title":"Slugs","type":"array"}},"required":["slugs"],"title":"ManageSchemaInstallTemplates","type":"object"},"ManageSchemaPropose":{"additionalProperties":false,"properties":{"kind":{"$ref":"#/$defs/ProposalKind"},"object_type":{"description":"The new type's slug, or the existing type the attributes are for.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"spec":{"anyOf":[{"$ref":"#/$defs/ObjectTypeSpec"},{"type":"null"}],"default":null},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"maxItems":50,"title":"Attributes","type":"array"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"evidence":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"What supports it (a conversation, a file): each piece of evidence counts once.","title":"Evidence"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"}},"required":["kind","object_type"],"title":"ManageSchemaPropose","type":"object"},"ManageSchemaReorderAttributes":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"slugs":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":500,"minItems":1,"title":"Slugs","type":"array"}},"required":["slug","slugs"],"title":"ManageSchemaReorderAttributes","type":"object"},"ManageSchemaReorderOptions":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"attribute":{"description":"The attribute's slug.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"values":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"minItems":1,"title":"Values","type":"array"}},"required":["slug","attribute","values"],"title":"ManageSchemaReorderOptions","type":"object"},"ManageSchemaSetFileCategories":{"additionalProperties":false,"properties":{"slug":{"description":"The object type's slug, e.g. `deals` (plural).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"categories":{"items":{"$ref":"#/$defs/FileCategoryInput"},"maxItems":30,"title":"Categories","type":"array"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version of the type (the `version` read).","title":"Expected Version"}},"required":["slug","categories"],"title":"ManageSchemaSetFileCategories","type":"object"},"ManageSchemaSuggest":{"additionalProperties":false,"properties":{"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Suggest attributes for this type; a new type when left out.","title":"Object Type"},"samples":{"description":"Example rows of the data (an import's, an integration's payloads).","items":{"additionalProperties":true,"type":"object"},"maxItems":20,"minItems":1,"title":"Samples","type":"array"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"What the data is about, in a person's words.","title":"Description"}},"required":["samples"],"title":"ManageSchemaSuggest","type":"object"},"ObjectTypeSpec":{"additionalProperties":false,"description":"An object type as its author writes it: everything but its identity and history.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"}},"required":["name"],"title":"ObjectTypeSpec","type":"object"},"ProposalKind":{"enum":["object_type","attributes"],"title":"ProposalKind","type":"string"},"RelationCardinality":{"description":"Enforced on the record holding the relation: `one_to_one` and `many_to_one` hold one\ntarget, the others a list.","enum":["one_to_one","one_to_many","many_to_many","many_to_one"],"title":"RelationCardinality","type":"string"},"RelationSpec":{"additionalProperties":false,"description":"The target and cardinality of a relation attribute.","properties":{"target_object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Target Object Type","type":"string"},"cardinality":{"$ref":"#/$defs/RelationCardinality"}},"required":["target_object_type","cardinality"],"title":"RelationSpec","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"}},"properties":{"define_object_type":{"anyOf":[{"$ref":"#/$defs/ManageSchemaDefineObjectType"},{"type":"null"}],"default":null,"description":"Create an object type, or replace its definition (name, attributes, access, settings). An identical definition changes nothing."},"delete_object_type":{"anyOf":[{"$ref":"#/$defs/ManageSchemaDeleteObjectType"},{"type":"null"}],"default":null,"description":"Delete a custom object type that has no records and that no other type relates to."},"duplicate_object_type":{"anyOf":[{"$ref":"#/$defs/ManageSchemaDuplicateObjectType"},{"type":"null"}],"default":null,"description":"Copy an object type's definition to a new slug; no records are copied."},"define_attribute":{"anyOf":[{"$ref":"#/$defs/ManageSchemaDefineAttribute"},{"type":"null"}],"default":null,"description":"Add an attribute (a custom field: text, number, date, select with options, relation, …) to an object type, or change one, options included."},"delete_attribute":{"anyOf":[{"$ref":"#/$defs/ManageSchemaDeleteAttribute"},{"type":"null"}],"default":null,"description":"Remove an attribute from an object type."},"reorder_attributes":{"anyOf":[{"$ref":"#/$defs/ManageSchemaReorderAttributes"},{"type":"null"}],"default":null,"description":"Put an object type's attributes in a new order."},"set_file_categories":{"anyOf":[{"$ref":"#/$defs/ManageSchemaSetFileCategories"},{"type":"null"}],"default":null,"description":"Replace an object type's file categories with this ordered list. A category left out is removed and its files become uncategorized."},"reorder_options":{"anyOf":[{"$ref":"#/$defs/ManageSchemaReorderOptions"},{"type":"null"}],"default":null,"description":"Put a select attribute's options (e.g. pipeline stages) in a new order."},"install_templates":{"anyOf":[{"$ref":"#/$defs/ManageSchemaInstallTemplates"},{"type":"null"}],"default":null,"description":"Add ready-made object types the workspace lacks; existing types are left as they are."},"create_pack":{"anyOf":[{"$ref":"#/$defs/ManageSchemaCreatePack"},{"type":"null"}],"default":null,"description":"Save a set of object types as a pack others can install."},"install_pack":{"anyOf":[{"$ref":"#/$defs/ManageSchemaInstallPack"},{"type":"null"}],"default":null,"description":"Install a pack's object types the workspace lacks."},"propose":{"anyOf":[{"$ref":"#/$defs/ManageSchemaPropose"},{"type":"null"}],"default":null,"description":"Propose a new object type, or attributes for an existing one, when the data calls for it. Nothing changes until a person accepts it; proposing the same change again adds its evidence. Needs ontology.view."},"suggest":{"anyOf":[{"$ref":"#/$defs/ManageSchemaSuggest"},{"type":"null"}],"default":null,"description":"Have Core propose an object type for sample data, or the attributes an existing type lacks for it; stored as a proposal."},"accept_proposal":{"anyOf":[{"$ref":"#/$defs/ManageSchemaAcceptProposal"},{"type":"null"}],"default":null,"description":"Apply a proposal, optionally renamed or with only some of its attributes."},"dismiss_proposal":{"anyOf":[{"$ref":"#/$defs/ManageSchemaDismissProposal"},{"type":"null"}],"default":null,"description":"Decline a proposal."}},"title":"manage_schemaArguments","type":"object"},"outputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AccessPolicy":{"additionalProperties":false,"description":"Who can see and change the records of an object type.","properties":{"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"title":"AccessPolicy","type":"object"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"AttributeDef":{"additionalProperties":false,"description":"A typed field of an object type.","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"}},"required":["slug","name","type","id"],"title":"AttributeDef","type":"object"},"AttributeOption":{"additionalProperties":false,"description":"One choice of a select or multi-select attribute.","properties":{"value":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value","type":"string"},"label":{"maxLength":256,"minLength":1,"title":"Label","type":"string"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A palette token chosen by the application.","title":"Color"},"terminal":{"default":false,"description":"Ends a process when chosen, e.g. a closing stage.","title":"Terminal","type":"boolean"},"metadata":{"additionalProperties":true,"description":"Application meaning of the option, e.g. an outcome. Core does not interpret it.","title":"Metadata","type":"object"}},"required":["value","label"],"title":"AttributeOption","type":"object"},"AttributeSpec":{"additionalProperties":false,"description":"An attribute as its author writes it. Core adds the `id` (see `AttributeDef`).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"}},"required":["slug","name","type"],"title":"AttributeSpec","type":"object"},"AttributeType":{"enum":["string","text","number","decimal","boolean","date","datetime","select","multi_select","file","relation","json","recurring_amount","user"],"title":"AttributeType","type":"string"},"CollectionSpec":{"additionalProperties":false,"description":"A named, curated set of records of one type, with attributes of its own.\n\nThe collection's attribute values live on each entry, never on the record, so a\ncollection can track \"what stage is this company at in this effort\" without adding a\nfield every company carries.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"maxItems":200,"title":"Attributes","type":"array"},"default_group_by":{"anyOf":[{"$ref":"#/$defs/GroupBy"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"CollectionSpec","type":"object"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"EmailTemplateSpec":{"additionalProperties":false,"properties":{"kind":{"const":"email_template","default":"email_template","title":"Kind","type":"string"},"subject":{"maxLength":1000000,"title":"Subject","type":"string"},"body_markdown":{"description":"`{{field}}` placeholders name record attributes.","maxLength":1000000,"title":"Body Markdown","type":"string"}},"required":["subject","body_markdown"],"title":"EmailTemplateSpec","type":"object"},"FavoriteFolderSpec":{"additionalProperties":false,"properties":{"kind":{"const":"favorite_folder","default":"favorite_folder","title":"Kind","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"title":"FavoriteFolderSpec","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FileCategory":{"additionalProperties":false,"description":"A named group for the files of an object type's records.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"}},"required":["id","name"],"title":"FileCategory","type":"object"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FormField":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"required":{"default":false,"title":"Required","type":"boolean"},"help":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Help"},"lookup":{"default":false,"description":"For a relation field of a public form: let people who have not signed in search the\ntarget records by title (their titles become public).","title":"Lookup","type":"boolean"}},"required":["field"],"title":"FormField","type":"object"},"FormSpec":{"additionalProperties":false,"description":"A form whose submissions create records of one object type.","properties":{"kind":{"const":"form","default":"form","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"items":{"$ref":"#/$defs/FormField"},"maxItems":100,"minItems":1,"title":"Fields","type":"array"},"public":{"default":false,"description":"Submitted without signing in, at `/core/v1/public/forms/{tenant}/{id}`.","title":"Public","type":"boolean"},"slug":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A readable public address: `/core/v1/public/forms/by-slug/{tenant slug}/{form slug}`.","title":"Slug"},"success_message":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Success Message"}},"required":["object_type","fields"],"title":"FormSpec","type":"object"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"GroupBy":{"additionalProperties":false,"description":"The select attribute a board groups by: the collection's own, or the record's.","properties":{"source":{"$ref":"#/$defs/GroupSource"},"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"}},"required":["source","attribute"],"title":"GroupBy","type":"object"},"GroupSource":{"description":"Whose attribute a collection's board groups by.","enum":["collection","object"],"title":"GroupSource","type":"string"},"ItemScope":{"enum":["shared","personal"],"title":"ItemScope","type":"string"},"ObjectTypeDef":{"additionalProperties":false,"description":"A tenant-defined type of record and its attributes.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeDef"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"file_categories":{"default":[],"description":"Groups for its records' files, in order. Changed only through\n`PUT …/{slug}/file-categories`, so writing a definition never replaces them.","items":{"$ref":"#/$defs/FileCategory"},"title":"File Categories","type":"array"},"version":{"default":1,"description":"Increases with every change of the definition.","minimum":1,"title":"Version","type":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["name","id","tenant_id","slug","created_at","updated_at"],"title":"ObjectTypeDef","type":"object"},"ObjectTypeList":{"additionalProperties":false,"description":"A tenant's object types, ordered by `order`, then slug.","properties":{"object_types":{"default":[],"items":{"$ref":"#/$defs/ObjectTypeDef"},"title":"Object Types","type":"array"}},"title":"ObjectTypeList","type":"object"},"ObjectTypeSpec":{"additionalProperties":false,"description":"An object type as its author writes it: everything but its identity and history.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"}},"required":["name"],"title":"ObjectTypeSpec","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ProposalKind":{"enum":["object_type","attributes"],"title":"ProposalKind","type":"string"},"ProposalStatus":{"enum":["proposed","accepted","dismissed"],"title":"ProposalStatus","type":"string"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RelationCardinality":{"description":"Enforced on the record holding the relation: `one_to_one` and `many_to_one` hold one\ntarget, the others a list.","enum":["one_to_one","one_to_many","many_to_many","many_to_one"],"title":"RelationCardinality","type":"string"},"RelationSpec":{"additionalProperties":false,"description":"The target and cardinality of a relation attribute.","properties":{"target_object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Target Object Type","type":"string"},"cardinality":{"$ref":"#/$defs/RelationCardinality"}},"required":["target_object_type","cardinality"],"title":"RelationSpec","type":"object"},"SchemaPackEntry":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/ObjectTypeSpec"}},"required":["slug","spec"],"title":"SchemaPackEntry","type":"object"},"SchemaPackSpec":{"additionalProperties":false,"description":"A frozen snapshot of object types that can be installed like shipped templates.","properties":{"kind":{"const":"schema_pack","default":"schema_pack","title":"Kind","type":"string"},"entries":{"items":{"$ref":"#/$defs/SchemaPackEntry"},"maxItems":50,"minItems":1,"title":"Entries","type":"array"}},"required":["entries"],"title":"SchemaPackSpec","type":"object"},"SchemaProposal":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/ProposalKind"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"spec":{"anyOf":[{"$ref":"#/$defs/ObjectTypeSpec"},{"type":"null"}],"default":null},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"$ref":"#/$defs/ProposalStatus","default":"proposed"},"evidence":{"default":[],"description":"The latest evidence, each once.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":25,"title":"Evidence","type":"array"},"support":{"default":1,"description":"How many times it was proposed with distinct evidence.","minimum":1,"title":"Support","type":"integer"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"},"suggested":{"default":false,"description":"Drafted by the LLM from data.","title":"Suggested","type":"boolean"},"external":{"default":false,"description":"Drawn, at least once, from ingested content people outside the tenant wrote (mail,\nmessages): never accepted automatically, so outside senders cannot shape the schema.","title":"External","type":"boolean"},"proposed_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"decided_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"decided_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Decided At"}},"required":["id","tenant_id","kind","object_type","proposed_by","created_at","updated_at"],"title":"SchemaProposal","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"StageRuleSpec":{"additionalProperties":false,"description":"What a record needs before it may sit in a stage (e.g. a deal's `negotiation`).","properties":{"kind":{"const":"stage_rule","default":"stage_rule","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"attribute":{"description":"The select attribute holding the stage.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"stage":{"description":"The option value the rule applies to.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"required_fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Fields","type":"array","uniqueItems":true},"required_activity_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Activity Kinds","type":"array","uniqueItems":true}},"required":["object_type","attribute","stage"],"title":"StageRuleSpec","type":"object"},"TaskProjectSpec":{"additionalProperties":false,"properties":{"kind":{"const":"task_project","default":"task_project","title":"Kind","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"icon":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A short mark shown beside the name: an emoji or an icon's name.","title":"Icon"},"archived":{"default":false,"title":"Archived","type":"boolean"}},"title":"TaskProjectSpec","type":"object"},"TaskStatusSpec":{"additionalProperties":false,"description":"A custom task status (an activity's `stage`) within a lifecycle `category`.","properties":{"kind":{"const":"task_status","default":"task_status","title":"Kind","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"category":{"$ref":"#/$defs/ActivityStatus"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"}},"required":["slug","category"],"title":"TaskStatusSpec","type":"object"},"ViewColumn":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"width":{"anyOf":[{"exclusiveMinimum":0,"maximum":2000,"type":"integer"},{"type":"null"}],"default":null,"title":"Width"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"required":["field"],"title":"ViewColumn","type":"object"},"ViewLayout":{"enum":["table","board","pipeline","list","calendar"],"title":"ViewLayout","type":"string"},"ViewSpec":{"additionalProperties":false,"description":"A saved way of looking at one object type's records.","properties":{"kind":{"const":"view","default":"view","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"layout":{"$ref":"#/$defs/ViewLayout","default":"table"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null},"group_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The attribute a board or pipeline groups by (its stage).","title":"Group By"},"columns":{"default":[],"items":{"$ref":"#/$defs/ViewColumn"},"maxItems":200,"title":"Columns","type":"array"},"default":{"type":"boolean","default":false,"description":"The view a type opens with (one per type and scope).","title":"Default"}},"required":["object_type"],"title":"ViewSpec","type":"object"},"WorkspaceItem":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/WorkspaceItemKind"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"scope":{"$ref":"#/$defs/ItemScope","default":"shared"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A personal item's owner.","title":"Owner Id"},"shared_with":{"description":"Members a personal item is shared with, to read (a view a person shared).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"spec":{"discriminator":{"mapping":{"collection":"#/$defs/CollectionSpec","email_template":"#/$defs/EmailTemplateSpec","favorite_folder":"#/$defs/FavoriteFolderSpec","form":"#/$defs/FormSpec","schema_pack":"#/$defs/SchemaPackSpec","stage_rule":"#/$defs/StageRuleSpec","task_project":"#/$defs/TaskProjectSpec","task_status":"#/$defs/TaskStatusSpec","view":"#/$defs/ViewSpec"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ViewSpec"},{"$ref":"#/$defs/TaskProjectSpec"},{"$ref":"#/$defs/TaskStatusSpec"},{"$ref":"#/$defs/FormSpec"},{"$ref":"#/$defs/EmailTemplateSpec"},{"$ref":"#/$defs/StageRuleSpec"},{"$ref":"#/$defs/FavoriteFolderSpec"},{"$ref":"#/$defs/CollectionSpec"},{"$ref":"#/$defs/SchemaPackSpec"}],"title":"Spec"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","kind","name","spec","created"],"title":"WorkspaceItem","type":"object"},"WorkspaceItemKind":{"enum":["view","task_project","task_status","form","email_template","stage_rule","favorite_folder","collection","schema_pack"],"title":"WorkspaceItemKind","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/ObjectTypeDef"},{"$ref":"#/$defs/Done"},{"$ref":"#/$defs/ObjectTypeList"},{"$ref":"#/$defs/WorkspaceItem"},{"$ref":"#/$defs/SchemaProposal"}],"title":"Result"}},"required":["result"],"title":"manage_schemaOutput","type":"object"},"annotations":{"title":"Manage the schema","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"records","title":"Records","description":"Find and read records of any object type (people, companies, deals, custom objects): query, group and count, relations, history, mentions, stage checks, and imports and exports. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"ColumnMapping":{"additionalProperties":false,"properties":{"column":{"description":"The CSV header, as written in the file.","maxLength":256,"minLength":1,"title":"Column","type":"string"},"field":{"description":"The attribute the column's cells set.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"}},"required":["column","field"],"title":"ColumnMapping","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RecordsBacklinks":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"required":["record_id"],"title":"RecordsBacklinks","type":"object"},"RecordsBoard":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"group_by":{"description":"A filterable attribute; a multi-select counts a record once per value.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Group By","type":"string"},"sum":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A number or decimal attribute to total per group.","title":"Sum"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"per_column":{"default":20,"description":"Records shown per column; a column's `count` covers them all.","maximum":100,"minimum":1,"title":"Per Column","type":"integer"},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null},"columns":{"default":[],"description":"The columns to fill, in this order (null for records without a value); the groups\nfound, largest first, when empty.","items":{},"maxItems":50,"title":"Columns","type":"array"}},"required":["object_type","group_by"],"title":"RecordsBoard","type":"object"},"RecordsCollections":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"RecordsCollections","type":"object"},"RecordsExpanded":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"RecordsExpanded","type":"object"},"RecordsFieldInsights":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"minItems":1,"title":"Fields","type":"array","uniqueItems":true}},"required":["record_id","fields"],"title":"RecordsFieldInsights","type":"object"},"RecordsGet":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"RecordsGet","type":"object"},"RecordsGroup":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"group_by":{"description":"A filterable attribute; a multi-select counts a record once per value.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Group By","type":"string"},"sum":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A number or decimal attribute to total per group.","title":"Sum"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"}},"required":["object_type","group_by"],"title":"RecordsGroup","type":"object"},"RecordsHistory":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"field":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Only this attribute.","title":"Field"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"required":["record_id"],"title":"RecordsHistory","type":"object"},"RecordsMentions":{"additionalProperties":false,"properties":{"query":{"default":"","description":"Text a name starts with or holds. Empty lists members and the records most recently\nchanged that the caller sees, for a menu shown before anything is typed.","maxLength":1000000,"title":"Query","type":"string"},"limit":{"default":10,"maximum":50,"minimum":1,"title":"Limit","type":"integer"},"include_records":{"default":true,"title":"Include Records","type":"boolean"},"include_members":{"default":true,"title":"Include Members","type":"boolean"}},"title":"RecordsMentions","type":"object"},"RecordsPreviewImport":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"file_id":{"description":"A ready CSV file (`/core/v1/files`).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"mappings":{"default":[],"description":"When given, the sample rows are validated against them.","items":{"$ref":"#/$defs/ColumnMapping"},"maxItems":500,"title":"Mappings","type":"array"}},"required":["object_type","file_id"],"title":"RecordsPreviewImport","type":"object"},"RecordsQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or any searchable text attribute.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only children of this record.","title":"Parent Record Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"equals":{"additionalProperties":true,"description":"Attribute slug → value: shorthand for `eq` filters.","title":"Equals","type":"object"},"filters":{"default":[],"description":"Every filter must hold.","items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"record_ids":{"description":"Only these records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`."}},"required":["object_type"],"title":"RecordsQuery","type":"object"},"RecordsRelations":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"RecordsRelations","type":"object"},"RecordsResolveMentions":{"additionalProperties":false,"properties":{"member_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Member Ids","type":"array","uniqueItems":true},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Record Ids","type":"array","uniqueItems":true}},"title":"RecordsResolveMentions","type":"object"},"RecordsStageCheck":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"RecordsStageCheck","type":"object"},"RecordsStageScan":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"only_violating":{"default":true,"title":"Only Violating","type":"boolean"}},"required":["object_type"],"title":"RecordsStageScan","type":"object"},"RecordsStats":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"minItems":1,"title":"Fields","type":"array","uniqueItems":true},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"}},"required":["object_type","fields"],"title":"RecordsStats","type":"object"},"RecordsTransfer":{"additionalProperties":false,"properties":{"transfer_id":{"description":"The transfer's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Transfer Id","type":"string"}},"required":["transfer_id"],"title":"RecordsTransfer","type":"object"},"RecordsTransfers":{"additionalProperties":false,"properties":{"kind":{"anyOf":[{"$ref":"#/$defs/TransferKind"},{"type":"null"}],"default":null,"description":"Only imports or only exports."},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"RecordsTransfers","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"TransferKind":{"enum":["import","export"],"title":"TransferKind","type":"string"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/RecordsQuery"},{"type":"null"}],"default":null,"description":"Records of one object type, newest first unless sorted: filter by any attribute (eq, ne, in, gt, lt, contains, is_empty…), search text, sort, page with `after`. Set include_total to count matches."},"get":{"anyOf":[{"$ref":"#/$defs/RecordsGet"},{"type":"null"}],"default":null,"description":"One record with all its field values."},"expanded":{"anyOf":[{"$ref":"#/$defs/RecordsExpanded"},{"type":"null"}],"default":null,"description":"One record with its outgoing links and the linked records the caller may view."},"group":{"anyOf":[{"$ref":"#/$defs/RecordsGroup"},{"type":"null"}],"default":null,"description":"Count (and sum a number attribute) per value of one attribute, e.g. a pipeline by stage or deals by owner, under the same filters as query."},"board":{"anyOf":[{"$ref":"#/$defs/RecordsBoard"},{"type":"null"}],"default":null,"description":"A board: the records of each value of one attribute (a pipeline's stages), with each column's count and sum."},"stats":{"anyOf":[{"$ref":"#/$defs/RecordsStats"},{"type":"null"}],"default":null,"description":"Column statistics of the records matching the same filters as query: a table's footer."},"relations":{"anyOf":[{"$ref":"#/$defs/RecordsRelations"},{"type":"null"}],"default":null,"description":"The records a record links to, through its relation attributes."},"backlinks":{"anyOf":[{"$ref":"#/$defs/RecordsBacklinks"},{"type":"null"}],"default":null,"description":"The records that link to a record, newest first."},"history":{"anyOf":[{"$ref":"#/$defs/RecordsHistory"},{"type":"null"}],"default":null,"description":"Who changed what in a record and when, field by field (old and new value), newest first; `field` narrows it to one attribute."},"field_insights":{"anyOf":[{"$ref":"#/$defs/RecordsFieldInsights"},{"type":"null"}],"default":null,"description":"How some of a record's fields changed over time, newest first."},"collections":{"anyOf":[{"$ref":"#/$defs/RecordsCollections"},{"type":"null"}],"default":null,"description":"The collections a record is in, with its entry in each."},"mentions":{"anyOf":[{"$ref":"#/$defs/RecordsMentions"},{"type":"null"}],"default":null,"description":"Records and members whose name matches some text, for an @-mention."},"resolve_mentions":{"anyOf":[{"$ref":"#/$defs/RecordsResolveMentions"},{"type":"null"}],"default":null,"description":"The display names of up to 100 mentioned records and members."},"stage_check":{"anyOf":[{"$ref":"#/$defs/RecordsStageCheck"},{"type":"null"}],"default":null,"description":"What a record lacks for the stage it is in (fields to fill, activities to log), by the workspace's stage rules."},"stage_scan":{"anyOf":[{"$ref":"#/$defs/RecordsStageScan"},{"type":"null"}],"default":null,"description":"Every record of an object type that breaks a stage rule, with what each lacks."},"preview_import":{"anyOf":[{"$ref":"#/$defs/RecordsPreviewImport"},{"type":"null"}],"default":null,"description":"An uploaded CSV's columns, first rows and the attribute each header suggests; with mappings, the sample rows' problems."},"transfers":{"anyOf":[{"$ref":"#/$defs/RecordsTransfers"},{"type":"null"}],"default":null,"description":"Imports and exports, newest first."},"transfer":{"anyOf":[{"$ref":"#/$defs/RecordsTransfer"},{"type":"null"}],"default":null,"description":"An import's or export's progress, counts, row errors and, for an export, its file (files' download fetches it)."}},"title":"recordsArguments","type":"object"},"outputSchema":{"$defs":{"AgentRef":{"additionalProperties":false,"description":"The agent a request was made for (ADR 0031 section 4, `Principal.agent`): set by the agent\nhost's turn authority from the deployment's agent, so the agent's use scope applies to the\ncalls it makes into Core.","properties":{"agent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The agent's home tenant, when it differs from the caller's: a shared Morphic AI\ndeployment is owned by the operator tenant while its turns act in each workspace\n(ADR 0040). `None` reads the agent's scope in the caller's tenant, as before.","title":"Tenant Id"}},"required":["agent_id"],"title":"AgentRef","type":"object"},"AppKind":{"description":"What reaches the workspace (ADR 0031).","enum":["frontend","mcp_client","api_key"],"title":"AppKind","type":"string"},"AppRef":{"additionalProperties":false,"description":"The app a request came through (attribution, ADR 0031 section 2).","properties":{"app_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"App Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"kind":{"$ref":"#/$defs/AppKind"},"first_party":{"default":false,"description":"Declared by the deployment (`MORPHIC_CORE_FIRST_PARTY_APPS`): attributed, never listed.","title":"First Party","type":"boolean"}},"required":["app_id","name","kind"],"title":"AppRef","type":"object"},"CollectionEntries":{"additionalProperties":false,"properties":{"entries":{"default":[],"items":{"$ref":"#/$defs/CollectionEntry"},"title":"Entries","type":"array"}},"title":"CollectionEntries","type":"object"},"CollectionEntry":{"additionalProperties":false,"description":"One record's membership of one collection, holding the collection's values for it.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"collection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"fields":{"additionalProperties":true,"title":"Fields","type":"object"},"position":{"default":0.0,"title":"Position","type":"number"},"added":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"},"changed":{"default":[],"description":"The collection attributes the entry's latest write set or changed (names, never\nvalues): what its `collection_entry.changed` event names in `payload.changed`.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"title":"Changed","type":"array"}},"required":["id","tenant_id","collection_id","record_id","added"],"title":"CollectionEntry","type":"object"},"ColumnMapping":{"additionalProperties":false,"properties":{"column":{"description":"The CSV header, as written in the file.","maxLength":256,"minLength":1,"title":"Column","type":"string"},"field":{"description":"The attribute the column's cells set.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"}},"required":["column","field"],"title":"ColumnMapping","type":"object"},"EntityRecord":{"additionalProperties":false,"description":"A record of some object type. Field values are keyed by attribute slug.","properties":{"id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"The value of the primary attribute, denormalised for lists and search.","title":"Title"},"fields":{"additionalProperties":true,"description":"Attribute slug → value. Shapes follow the attribute types in the ontology.","title":"Fields","type":"object"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Record Id"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Archived At"},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"source_binding":{"anyOf":[{"$ref":"#/$defs/SourceRecordBinding"},{"type":"null"}],"default":null,"description":"Core-owned source identity and effective owner; absent on ordinary records."},"version":{"default":1,"description":"Counts the record's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","object_type","created"],"title":"EntityRecord","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"ExportRequest":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"query":{"$ref":"#/$defs/RecordQuery","description":"Which records, in which order; its paging fields are ignored."},"fields":{"default":[],"description":"The columns after `id`; empty exports every enabled attribute.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":500,"title":"Fields","type":"array"},"filename":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Filename"},"format":{"$ref":"#/$defs/TransferExportFormat","default":"csv"}},"required":["key","query"],"title":"ExportRequest","type":"object"},"FieldChange":{"additionalProperties":false,"description":"One field's value before and after a write; `null` when it had none.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"before":{"default":null,"title":"Before"},"after":{"default":null,"title":"After"},"redacted":{"default":false,"description":"The values were erased on request; `before` and `after` are null.","title":"Redacted","type":"boolean"}},"required":["field"],"title":"FieldChange","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FieldStats":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"filled":{"minimum":0,"title":"Filled","type":"integer"},"empty":{"minimum":0,"title":"Empty","type":"integer"},"sum":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"For number and decimal attributes.","title":"Sum"},"average":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Average"},"min":{"default":null,"description":"For numbers, decimals, dates and datetimes.","title":"Min"},"max":{"default":null,"title":"Max"}},"required":["field","filled","empty"],"title":"FieldStats","type":"object"},"FieldTimelineEntry":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"revision":{"minimum":1,"title":"Revision","type":"integer"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"value":{"default":null,"title":"Value"},"actor_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Actor Id","type":"string"}},"required":["field","revision","occurred_at","actor_id"],"title":"FieldTimelineEntry","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"ImportPreview":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"title":"Columns","type":"array"},"rows":{"default":[],"description":"The first rows, as read.","items":{"items":{"type":"string"},"type":"array"},"title":"Rows","type":"array"},"total_rows":{"minimum":0,"title":"Total Rows","type":"integer"},"suggested":{"default":[],"description":"Columns whose header names an attribute (by slug or name).","items":{"$ref":"#/$defs/ColumnMapping"},"title":"Suggested","type":"array"},"errors":{"default":[],"description":"Problems in the sample rows under the request's mappings.","items":{"$ref":"#/$defs/RowError"},"title":"Errors","type":"array"}},"required":["columns","total_rows"],"title":"ImportPreview","type":"object"},"ImportRequest":{"additionalProperties":false,"properties":{"key":{"description":"Starting the same import again returns the first one.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"mappings":{"items":{"$ref":"#/$defs/ColumnMapping"},"maxItems":500,"minItems":1,"title":"Mappings","type":"array"},"match_on":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A mapped attribute that finds the record a row updates; without it every row creates.","title":"Match On"}},"required":["key","object_type","file_id","mappings"],"title":"ImportRequest","type":"object"},"Member":{"additionalProperties":false,"properties":{"membership":{"$ref":"#/$defs/Membership"},"profile":{"anyOf":[{"$ref":"#/$defs/UserProfile"},{"type":"null"}],"default":null,"description":"None for principals without a profile (API tokens, agents) or not signed in yet."}},"required":["membership"],"title":"Member","type":"object"},"Membership":{"additionalProperties":false,"description":"A principal's membership of a tenant, and the roles it holds there.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"roles":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"status":{"$ref":"#/$defs/MembershipStatus","default":"active"},"version":{"default":1,"description":"Counts the membership's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["tenant_id","principal_id"],"title":"Membership","type":"object"},"MembershipStatus":{"enum":["active","invited","suspended"],"title":"MembershipStatus","type":"string"},"MentionCandidates":{"additionalProperties":false,"properties":{"members":{"default":[],"items":{"$ref":"#/$defs/Member"},"title":"Members","type":"array"},"records":{"default":[],"items":{"$ref":"#/$defs/EntityRecord"},"title":"Records","type":"array"}},"title":"MentionCandidates","type":"object"},"MentionLabels":{"additionalProperties":false,"description":"Display labels for mentioned members and records; ones the caller may not see are left\nout.","properties":{"members":{"patternProperties":{"^\\S+$":{"maxLength":1000000,"type":"string"}},"propertyNames":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1},"title":"Members","type":"object"},"records":{"patternProperties":{"^\\S+$":{"maxLength":1000000,"type":"string"}},"propertyNames":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1},"title":"Records","type":"object"}},"title":"MentionLabels","type":"object"},"MutationOperation":{"enum":["create","update","archive","restore","delete"],"title":"MutationOperation","type":"string"},"Principal":{"additionalProperties":false,"description":"A `PrincipalRef` plus what governance needs to decide on its requests.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"roles":{"description":"Role slugs in this tenant. Role definitions are tenant data, not a Core enum.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"For tokens and agents: the most the credential may do. None means role permissions only.","title":"Scopes"},"via":{"anyOf":[{"$ref":"#/$defs/AppRef"},{"type":"null"}],"default":null,"description":"The app the call came through (ADR 0031): who a request is attributed to, set by the\nauthenticator from the token's client id or the key's app. None for a host's service\ncredential and for a person whose token names no client."},"agent":{"anyOf":[{"$ref":"#/$defs/AgentRef"},{"type":"null"}],"default":null,"description":"The agent the call is made for (ADR 0031 section 4): set by the agent host's turn\nauthority from the deployment's agent. Its use scope narrows the call beside the app's.\nNone for everything else."},"data_scope":{"$ref":"#/$defs/Visibility","default":"tenant","description":"Whether the principal sees tenant-wide data or only its own (e.g. a personal agent)."}},"required":["id","kind","tenant_id"],"title":"Principal","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordBoard":{"additionalProperties":false,"properties":{"columns":{"default":[],"items":{"$ref":"#/$defs/RecordBoardColumn"},"title":"Columns","type":"array"},"total":{"minimum":0,"title":"Total","type":"integer"},"truncated":{"default":false,"description":"The counts cover the first `max_grouped_records` matching records.","title":"Truncated","type":"boolean"}},"required":["total"],"title":"RecordBoard","type":"object"},"RecordBoardColumn":{"additionalProperties":false,"properties":{"value":{"title":"Value"},"count":{"minimum":0,"title":"Count","type":"integer"},"sum":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Sum"},"records":{"default":[],"items":{"$ref":"#/$defs/EntityRecord"},"title":"Records","type":"array"}},"required":["value","count"],"title":"RecordBoardColumn","type":"object"},"RecordChange":{"additionalProperties":false,"description":"One write of a record: its operation, the fields it changed and its provenance.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"record_revision":{"description":"The record's revision this write produced; changes are ordered by it.","minimum":1,"title":"Record Revision","type":"integer"},"operation":{"$ref":"#/$defs/MutationOperation"},"changes":{"default":[],"description":"Empty for archive, restore and delete, which change no field value.","items":{"$ref":"#/$defs/FieldChange"},"title":"Changes","type":"array"},"provenance":{"$ref":"#/$defs/Provenance"}},"required":["record_id","tenant_id","object_type","record_revision","operation","provenance"],"title":"RecordChange","type":"object"},"RecordFieldInsights":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"entries":{"default":[],"items":{"$ref":"#/$defs/FieldTimelineEntry"},"title":"Entries","type":"array"},"current":{"patternProperties":{"^[a-z][a-z0-9_]*$":{}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Current","type":"object"}},"required":["record_id"],"title":"RecordFieldInsights","type":"object"},"RecordGroup":{"additionalProperties":false,"properties":{"value":{"description":"The attribute's value; null for records without one.","title":"Value"},"count":{"minimum":0,"title":"Count","type":"integer"},"sum":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Sum"}},"required":["value","count"],"title":"RecordGroup","type":"object"},"RecordGroups":{"additionalProperties":false,"properties":{"groups":{"default":[],"description":"Largest first; among equals, records without a value last.","items":{"$ref":"#/$defs/RecordGroup"},"title":"Groups","type":"array"},"total":{"minimum":0,"title":"Total","type":"integer"},"truncated":{"default":false,"description":"True when more records matched than one grouping reads; the counts cover the first.","title":"Truncated","type":"boolean"}},"required":["total"],"title":"RecordGroups","type":"object"},"RecordHistory":{"additionalProperties":false,"description":"A record's changes, newest first.","properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"changes":{"default":[],"items":{"$ref":"#/$defs/RecordChange"},"title":"Changes","type":"array"}},"title":"RecordHistory","type":"object"},"RecordPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every record matching the query, when `include_total` asked.","title":"Total"},"records":{"default":[],"items":{"$ref":"#/$defs/EntityRecord"},"title":"Records","type":"array"}},"title":"RecordPage","type":"object"},"RecordQuery":{"additionalProperties":false,"description":"Lists records of one object type: newest first unless `sort` or `order_by` says\notherwise.","properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or any searchable text attribute.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only children of this record.","title":"Parent Record Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"equals":{"additionalProperties":true,"description":"Attribute slug → value: shorthand for `eq` filters.","title":"Equals","type":"object"},"filters":{"default":[],"description":"Every filter must hold.","items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"record_ids":{"description":"Only these records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`."}},"required":["object_type"],"title":"RecordQuery","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RecordStats":{"additionalProperties":false,"properties":{"total":{"minimum":0,"title":"Total","type":"integer"},"fields":{"default":[],"items":{"$ref":"#/$defs/FieldStats"},"title":"Fields","type":"array"},"truncated":{"default":false,"description":"Sums, averages and extremes cover the first `max_grouped_records` records; counts are\nexact.","title":"Truncated","type":"boolean"}},"required":["total"],"title":"RecordStats","type":"object"},"RecordWithRelations":{"additionalProperties":false,"description":"A record with its outgoing links and the linked records the caller may view.","properties":{"record":{"$ref":"#/$defs/EntityRecord"},"relations":{"default":[],"items":{"$ref":"#/$defs/RelationEdge"},"title":"Relations","type":"array"},"related":{"default":[],"items":{"$ref":"#/$defs/EntityRecord"},"title":"Related","type":"array"}},"required":["record"],"title":"RecordWithRelations","type":"object"},"RelationEdge":{"additionalProperties":false,"description":"A directed link between two records, typed by the relation attribute that holds it.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"from_record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"From Record Id","type":"string"},"to_record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"To Record Id","type":"string"},"attribute":{"description":"Slug of the relation attribute on the `from` record's object type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"created":{"$ref":"#/$defs/Provenance"},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["id","tenant_id","from_record_id","to_record_id","attribute","created"],"title":"RelationEdge","type":"object"},"RelationList":{"additionalProperties":false,"description":"Relation edges of one record, as seen by the caller. Backlinks are paged, newest\nfirst; a record's own outgoing links come in one list.","properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"edges":{"default":[],"items":{"$ref":"#/$defs/RelationEdge"},"title":"Edges","type":"array"}},"title":"RelationList","type":"object"},"RowError":{"additionalProperties":false,"properties":{"row":{"description":"The data row, counting from 1 after the header.","minimum":1,"title":"Row","type":"integer"},"error":{"$ref":"#/$defs/ErrorInfo"}},"required":["row","error"],"title":"RowError","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"SourceRecordBinding":{"additionalProperties":false,"description":"Trusted Core provenance binding for a connector-owned record.\n\nOnly Core's connector projection writer may create or advance this value. It is included\nin record reads so owner-scoped authorization can distinguish connector-owned records\nfrom ordinary records created by service principals.","properties":{"binding_id":{"pattern":"^source-field-binding:v1:[0-9a-f]{64}$","title":"Binding Id","type":"string"},"activation_id":{"pattern":"^source-field-activation:v1:[0-9a-f]{64}$","title":"Activation Id","type":"string"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The connection owner of a private record; absent on a shared one (`shared`).","title":"Owner Id"},"shared":{"default":false,"description":"A workspace record projected through a shared CRM binding (ADR 0028): no single owner,\nvisible as its type's own access policy says, and never erased with one contributor. Exactly\none of `owner_id` and `shared` identifies who the record belongs to.","title":"Shared","type":"boolean"},"object_type_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Object Type Id","type":"string"},"object_type_version":{"exclusiveMinimum":0,"title":"Object Type Version","type":"integer"},"source_key":{"maxLength":64,"minLength":64,"pattern":"^[0-9a-f]+$","title":"Source Key","type":"string"},"managed_attributes":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"minItems":1,"title":"Managed Attributes","type":"array","uniqueItems":true},"source_fence":{"exclusiveMinimum":0,"title":"Source Fence","type":"integer"}},"required":["binding_id","activation_id","object_type_id","object_type_version","source_key","managed_attributes","source_fence"],"title":"SourceRecordBinding","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"StageCheck":{"additionalProperties":false,"description":"What a record lacks for the stage it is in.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"violations":{"default":[],"items":{"$ref":"#/$defs/StageViolation"},"title":"Violations","type":"array"}},"required":["record_id"],"title":"StageCheck","type":"object"},"StageScan":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"checks":{"default":[],"items":{"$ref":"#/$defs/StageCheck"},"title":"Checks","type":"array"}},"title":"StageScan","type":"object"},"StageViolation":{"additionalProperties":false,"properties":{"rule_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"stage":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"missing_fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Missing Fields","type":"array","uniqueItems":true},"missing_activity_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Missing Activity Kinds","type":"array","uniqueItems":true}},"required":["rule_id","stage"],"title":"StageViolation","type":"object"},"Transfer":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/TransferKind"},"status":{"$ref":"#/$defs/TransferStatus","default":"pending"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"import_request":{"anyOf":[{"$ref":"#/$defs/ImportRequest"},{"type":"null"}],"default":null},"export_request":{"anyOf":[{"$ref":"#/$defs/ExportRequest"},{"type":"null"}],"default":null},"requester":{"$ref":"#/$defs/Principal","description":"Who started it: the transfer acts with their current access, never more."},"columns":{"default":[],"items":{"type":"string"},"title":"Columns","type":"array"},"total_rows":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Total Rows"},"processed_rows":{"default":0,"minimum":0,"title":"Processed Rows","type":"integer"},"created":{"default":0,"minimum":0,"title":"Created","type":"integer"},"updated":{"default":0,"minimum":0,"title":"Updated","type":"integer"},"failed":{"default":0,"minimum":0,"title":"Failed","type":"integer"},"errors":{"default":[],"description":"The first row errors (`TransferPolicy.max_errors`).","items":{"$ref":"#/$defs/RowError"},"title":"Errors","type":"array"},"cursor":{"default":0,"description":"The next chunk to process.","minimum":0,"title":"Cursor","type":"integer"},"page_after":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"An export's position in its query.","title":"Page After"},"file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"An export's CSV, once ready.","title":"File Id"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null,"description":"Why a failed transfer stopped."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","kind","object_type","requester","created_at"],"title":"Transfer","type":"object"},"TransferExportFormat":{"enum":["csv","xlsx"],"title":"TransferExportFormat","type":"string"},"TransferKind":{"enum":["import","export"],"title":"TransferKind","type":"string"},"TransferPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"transfers":{"default":[],"items":{"$ref":"#/$defs/Transfer"},"title":"Transfers","type":"array"}},"title":"TransferPage","type":"object"},"TransferStatus":{"enum":["pending","running","completed","partial","failed","cancelled"],"title":"TransferStatus","type":"string"},"UserProfile":{"additionalProperties":false,"properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"email":{"anyOf":[{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Email"},"email_verified":{"default":false,"title":"Email Verified","type":"boolean"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"avatar_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"title":"Avatar Url"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["id","updated_at"],"title":"UserProfile","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/RecordPage"},{"$ref":"#/$defs/EntityRecord"},{"$ref":"#/$defs/RecordWithRelations"},{"$ref":"#/$defs/RecordGroups"},{"$ref":"#/$defs/RecordBoard"},{"$ref":"#/$defs/RecordStats"},{"$ref":"#/$defs/RelationList"},{"$ref":"#/$defs/RecordHistory"},{"$ref":"#/$defs/RecordFieldInsights"},{"$ref":"#/$defs/CollectionEntries"},{"$ref":"#/$defs/MentionCandidates"},{"$ref":"#/$defs/MentionLabels"},{"$ref":"#/$defs/StageCheck"},{"$ref":"#/$defs/StageScan"},{"$ref":"#/$defs/ImportPreview"},{"$ref":"#/$defs/TransferPage"},{"$ref":"#/$defs/Transfer"}],"title":"Result"}},"required":["result"],"title":"recordsOutput","type":"object"},"annotations":{"title":"Records","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_records","title":"Manage records","description":"Create, update, archive, restore and delete records, link and unlink them, change many at once, move them to another type, merge duplicates, revert history, and import or export CSV. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"ColumnMapping":{"additionalProperties":false,"properties":{"column":{"description":"The CSV header, as written in the file.","maxLength":256,"minLength":1,"title":"Column","type":"string"},"field":{"description":"The attribute the column's cells set.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"}},"required":["column","field"],"title":"ColumnMapping","type":"object"},"EntityMutation":{"additionalProperties":false,"description":"A requested change to one record. Repeating a `mutation_id` returns the first result.\n\nCore stamps who and when from the authenticated caller, so a caller sends only what it\nknows: the tenant and provenance may be left out (when sent, the tenant must be the\ncaller's, and only the provenance's `source` is used).","properties":{"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Tenant Id"},"mutation_id":{"maxLength":512,"minLength":1,"title":"Mutation Id","type":"string"},"operation":{"$ref":"#/$defs/MutationOperation"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Required for every operation except `create`.","title":"Record Id"},"set_fields":{"additionalProperties":true,"description":"Attribute slug → new value.","title":"Set Fields","type":"object"},"unset_fields":{"description":"Attribute slugs to clear.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Unset Fields","type":"array","uniqueItems":true},"add_values":{"description":"List attribute slug → values to add, the others kept: a to-many relation's record ids\n(link records) or a multi-select's options. Update only.","patternProperties":{"^[a-z][a-z0-9_]*$":{"items":{},"type":"array"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Add Values","type":"object"},"remove_values":{"description":"List attribute slug → values to remove, the others kept (unlink records). Update\nonly; a list left empty is cleared.","patternProperties":{"^[a-z][a-z0-9_]*$":{"items":{},"type":"array"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Remove Values","type":"object"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Record Id"},"source":{"anyOf":[{"$ref":"#/$defs/SourceRef"},{"type":"null"}],"default":null,"description":"Where the change comes from (`api` when left out)."},"provenance":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null,"description":"Accepted for v1 compatibility; only its `source` is used, when `source` is absent."},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version (the `version` read); None changes whatever is stored.","title":"Expected Version"}},"required":["mutation_id","operation","object_type"],"title":"EntityMutation","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"ManageRecordsBulk":{"additionalProperties":false,"properties":{"bulk":{"$ref":"#/$defs/RecordBulk","description":"The mutations."}},"required":["bulk"],"title":"ManageRecordsBulk","type":"object"},"ManageRecordsCancelTransfer":{"additionalProperties":false,"properties":{"transfer_id":{"description":"The transfer's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Transfer Id","type":"string"}},"required":["transfer_id"],"title":"ManageRecordsCancelTransfer","type":"object"},"ManageRecordsClearPicture":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"ManageRecordsClearPicture","type":"object"},"ManageRecordsMerge":{"additionalProperties":false,"properties":{"mutation_id":{"maxLength":512,"minLength":1,"title":"Mutation Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"survivor_record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Survivor Record Id","type":"string"},"merged_record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Merged Record Id","type":"string"}},"required":["mutation_id","object_type","survivor_record_id","merged_record_id"],"title":"ManageRecordsMerge","type":"object"},"ManageRecordsMutate":{"additionalProperties":false,"properties":{"mutation":{"$ref":"#/$defs/EntityMutation","description":"The change."}},"required":["mutation"],"title":"ManageRecordsMutate","type":"object"},"ManageRecordsRedactHistory":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"field":{"description":"The attribute.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"}},"required":["record_id","field"],"title":"ManageRecordsRedactHistory","type":"object"},"ManageRecordsRetype":{"additionalProperties":false,"properties":{"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"minItems":1,"title":"Record Ids","type":"array","uniqueItems":true},"object_type":{"description":"The target object type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"dry_run":{"default":true,"title":"Dry Run","type":"boolean"}},"required":["record_ids","object_type"],"title":"ManageRecordsRetype","type":"object"},"ManageRecordsRevert":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"revision":{"description":"The history entry's revision.","minimum":1,"title":"Revision","type":"integer"}},"required":["record_id","revision"],"title":"ManageRecordsRevert","type":"object"},"ManageRecordsSetPicture":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"}},"required":["record_id","file_id"],"title":"ManageRecordsSetPicture","type":"object"},"ManageRecordsStartExport":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"query":{"$ref":"#/$defs/RecordQuery","description":"Which records, in which order; its paging fields are ignored."},"fields":{"default":[],"description":"The columns after `id`; empty exports every enabled attribute.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":500,"title":"Fields","type":"array"},"filename":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Filename"},"format":{"$ref":"#/$defs/TransferExportFormat","default":"csv"}},"required":["key","query"],"title":"ManageRecordsStartExport","type":"object"},"ManageRecordsStartImport":{"additionalProperties":false,"properties":{"key":{"description":"Starting the same import again returns the first one.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"mappings":{"items":{"$ref":"#/$defs/ColumnMapping"},"maxItems":500,"minItems":1,"title":"Mappings","type":"array"},"match_on":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A mapped attribute that finds the record a row updates; without it every row creates.","title":"Match On"}},"required":["key","object_type","file_id","mappings"],"title":"ManageRecordsStartImport","type":"object"},"MutationOperation":{"enum":["create","update","archive","restore","delete"],"title":"MutationOperation","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordBulk":{"additionalProperties":false,"description":"Up to 100 mutations, each applied on its own (no all-or-nothing) and idempotent by its\n`mutation_id`, so a retried batch completes what failed.","properties":{"mutations":{"items":{"$ref":"#/$defs/EntityMutation"},"maxItems":100,"minItems":1,"title":"Mutations","type":"array"}},"required":["mutations"],"title":"RecordBulk","type":"object"},"RecordQuery":{"additionalProperties":false,"description":"Lists records of one object type: newest first unless `sort` or `order_by` says\notherwise.","properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or any searchable text attribute.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only children of this record.","title":"Parent Record Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"equals":{"additionalProperties":true,"description":"Attribute slug → value: shorthand for `eq` filters.","title":"Equals","type":"object"},"filters":{"default":[],"description":"Every filter must hold.","items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"record_ids":{"description":"Only these records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`."}},"required":["object_type"],"title":"RecordQuery","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TransferExportFormat":{"enum":["csv","xlsx"],"title":"TransferExportFormat","type":"string"}},"properties":{"mutate":{"anyOf":[{"$ref":"#/$defs/ManageRecordsMutate"},{"type":"null"}],"default":null,"description":"Create, update, archive, restore or delete one record. On an update, `add_values`/`remove_values` link or unlink records (a to-many relation) and tag or untag (a multi-select) without resending the list. `mutation_id` makes it safe to retry: the same id returns the first result."},"bulk":{"anyOf":[{"$ref":"#/$defs/ManageRecordsBulk"},{"type":"null"}],"default":null,"description":"Up to 100 record mutations, each applied on its own and answered by index."},"retype":{"anyOf":[{"$ref":"#/$defs/ManageRecordsRetype"},{"type":"null"}],"default":null,"description":"Move up to 100 records to another object type, values mapped by system key or slug; unmapped values are kept in metadata. Run with dry_run first. Needs records.manage."},"merge":{"anyOf":[{"$ref":"#/$defs/ManageRecordsMerge"},{"type":"null"}],"default":null,"description":"Merge a duplicate record into a survivor: values, links and activities move, the duplicate is deleted and redirects to the survivor. The same mutation_id returns the first result."},"revert":{"anyOf":[{"$ref":"#/$defs/ManageRecordsRevert"},{"type":"null"}],"default":null,"description":"Undo an agent's edit (by its history revision): each field it changed is set back, unless changed again since."},"redact_history":{"anyOf":[{"$ref":"#/$defs/ManageRecordsRedactHistory"},{"type":"null"}],"default":null,"description":"Erase a field's past values from a record's history."},"set_picture":{"anyOf":[{"$ref":"#/$defs/ManageRecordsSetPicture"},{"type":"null"}],"default":null,"description":"Show an uploaded image file as the record's picture (a logo, a photo)."},"clear_picture":{"anyOf":[{"$ref":"#/$defs/ManageRecordsClearPicture"},{"type":"null"}],"default":null,"description":"Remove a record's picture."},"start_import":{"anyOf":[{"$ref":"#/$defs/ManageRecordsStartImport"},{"type":"null"}],"default":null,"description":"Import an uploaded CSV into one object type in the background, mapping columns to attributes; with match_on, rows update the record holding their value. Poll records' transfer."},"start_export":{"anyOf":[{"$ref":"#/$defs/ManageRecordsStartExport"},{"type":"null"}],"default":null,"description":"Export a record query to a CSV file in the background; records' transfer names the file when it is done."},"cancel_transfer":{"anyOf":[{"$ref":"#/$defs/ManageRecordsCancelTransfer"},{"type":"null"}],"default":null,"description":"Stop an import or export that is still running."}},"title":"manage_recordsArguments","type":"object"},"outputSchema":{"$defs":{"AgentRef":{"additionalProperties":false,"description":"The agent a request was made for (ADR 0031 section 4, `Principal.agent`): set by the agent\nhost's turn authority from the deployment's agent, so the agent's use scope applies to the\ncalls it makes into Core.","properties":{"agent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The agent's home tenant, when it differs from the caller's: a shared Morphic AI\ndeployment is owned by the operator tenant while its turns act in each workspace\n(ADR 0040). `None` reads the agent's scope in the caller's tenant, as before.","title":"Tenant Id"}},"required":["agent_id"],"title":"AgentRef","type":"object"},"AppKind":{"description":"What reaches the workspace (ADR 0031).","enum":["frontend","mcp_client","api_key"],"title":"AppKind","type":"string"},"AppRef":{"additionalProperties":false,"description":"The app a request came through (attribution, ADR 0031 section 2).","properties":{"app_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"App Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"kind":{"$ref":"#/$defs/AppKind"},"first_party":{"default":false,"description":"Declared by the deployment (`MORPHIC_CORE_FIRST_PARTY_APPS`): attributed, never listed.","title":"First Party","type":"boolean"}},"required":["app_id","name","kind"],"title":"AppRef","type":"object"},"ChangeRevert":{"additionalProperties":false,"description":"Undoing one change of a record (an agent's edit): its fields are set back to their\nvalues before it, as the person undoing it.","properties":{"record":{"$ref":"#/$defs/EntityRecord","description":"The record after the undo."},"reverted_revision":{"description":"The change undone.","minimum":1,"title":"Reverted Revision","type":"integer"},"restored":{"default":[],"description":"Fields set back to their earlier value.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Restored","type":"array"},"kept":{"default":[],"description":"Fields left as they are: changed again since, or their values were erased.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kept","type":"array"}},"required":["record","reverted_revision"],"title":"ChangeRevert","type":"object"},"ColumnMapping":{"additionalProperties":false,"properties":{"column":{"description":"The CSV header, as written in the file.","maxLength":256,"minLength":1,"title":"Column","type":"string"},"field":{"description":"The attribute the column's cells set.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"}},"required":["column","field"],"title":"ColumnMapping","type":"object"},"EntityRecord":{"additionalProperties":false,"description":"A record of some object type. Field values are keyed by attribute slug.","properties":{"id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"The value of the primary attribute, denormalised for lists and search.","title":"Title"},"fields":{"additionalProperties":true,"description":"Attribute slug → value. Shapes follow the attribute types in the ontology.","title":"Fields","type":"object"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Record Id"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Archived At"},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"source_binding":{"anyOf":[{"$ref":"#/$defs/SourceRecordBinding"},{"type":"null"}],"default":null,"description":"Core-owned source identity and effective owner; absent on ordinary records."},"version":{"default":1,"description":"Counts the record's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","object_type","created"],"title":"EntityRecord","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"ExportRequest":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"query":{"$ref":"#/$defs/RecordQuery","description":"Which records, in which order; its paging fields are ignored."},"fields":{"default":[],"description":"The columns after `id`; empty exports every enabled attribute.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":500,"title":"Fields","type":"array"},"filename":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Filename"},"format":{"$ref":"#/$defs/TransferExportFormat","default":"csv"}},"required":["key","query"],"title":"ExportRequest","type":"object"},"FieldChange":{"additionalProperties":false,"description":"One field's value before and after a write; `null` when it had none.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"before":{"default":null,"title":"Before"},"after":{"default":null,"title":"After"},"redacted":{"default":false,"description":"The values were erased on request; `before` and `after` are null.","title":"Redacted","type":"boolean"}},"required":["field"],"title":"FieldChange","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"ImportRequest":{"additionalProperties":false,"properties":{"key":{"description":"Starting the same import again returns the first one.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"mappings":{"items":{"$ref":"#/$defs/ColumnMapping"},"maxItems":500,"minItems":1,"title":"Mappings","type":"array"},"match_on":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A mapped attribute that finds the record a row updates; without it every row creates.","title":"Match On"}},"required":["key","object_type","file_id","mappings"],"title":"ImportRequest","type":"object"},"MutationOperation":{"enum":["create","update","archive","restore","delete"],"title":"MutationOperation","type":"string"},"Principal":{"additionalProperties":false,"description":"A `PrincipalRef` plus what governance needs to decide on its requests.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"roles":{"description":"Role slugs in this tenant. Role definitions are tenant data, not a Core enum.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"For tokens and agents: the most the credential may do. None means role permissions only.","title":"Scopes"},"via":{"anyOf":[{"$ref":"#/$defs/AppRef"},{"type":"null"}],"default":null,"description":"The app the call came through (ADR 0031): who a request is attributed to, set by the\nauthenticator from the token's client id or the key's app. None for a host's service\ncredential and for a person whose token names no client."},"agent":{"anyOf":[{"$ref":"#/$defs/AgentRef"},{"type":"null"}],"default":null,"description":"The agent the call is made for (ADR 0031 section 4): set by the agent host's turn\nauthority from the deployment's agent. Its use scope narrows the call beside the app's.\nNone for everything else."},"data_scope":{"$ref":"#/$defs/Visibility","default":"tenant","description":"Whether the principal sees tenant-wide data or only its own (e.g. a personal agent)."}},"required":["id","kind","tenant_id"],"title":"Principal","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordBulkItem":{"additionalProperties":false,"properties":{"index":{"minimum":0,"title":"Index","type":"integer"},"record":{"anyOf":[{"$ref":"#/$defs/EntityRecord"},{"type":"null"}],"default":null},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null}},"required":["index"],"title":"RecordBulkItem","type":"object"},"RecordBulkResult":{"additionalProperties":false,"properties":{"items":{"default":[],"description":"One per mutation, in order: a record, or the error that stopped it.","items":{"$ref":"#/$defs/RecordBulkItem"},"title":"Items","type":"array"}},"title":"RecordBulkResult","type":"object"},"RecordChange":{"additionalProperties":false,"description":"One write of a record: its operation, the fields it changed and its provenance.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"record_revision":{"description":"The record's revision this write produced; changes are ordered by it.","minimum":1,"title":"Record Revision","type":"integer"},"operation":{"$ref":"#/$defs/MutationOperation"},"changes":{"default":[],"description":"Empty for archive, restore and delete, which change no field value.","items":{"$ref":"#/$defs/FieldChange"},"title":"Changes","type":"array"},"provenance":{"$ref":"#/$defs/Provenance"}},"required":["record_id","tenant_id","object_type","record_revision","operation","provenance"],"title":"RecordChange","type":"object"},"RecordHistory":{"additionalProperties":false,"description":"A record's changes, newest first.","properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"changes":{"default":[],"items":{"$ref":"#/$defs/RecordChange"},"title":"Changes","type":"array"}},"title":"RecordHistory","type":"object"},"RecordQuery":{"additionalProperties":false,"description":"Lists records of one object type: newest first unless `sort` or `order_by` says\notherwise.","properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or any searchable text attribute.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only children of this record.","title":"Parent Record Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"equals":{"additionalProperties":true,"description":"Attribute slug → value: shorthand for `eq` filters.","title":"Equals","type":"object"},"filters":{"default":[],"description":"Every filter must hold.","items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"record_ids":{"description":"Only these records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`."}},"required":["object_type"],"title":"RecordQuery","type":"object"},"RecordRetypeItem":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"from_object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"From Object Type"},"moved":{"default":false,"description":"False on a dry run, for a record already of the target type, and on an error.","title":"Moved","type":"boolean"},"mapped":{"description":"Source attribute → the target attribute its value goes to.","patternProperties":{"^[a-z][a-z0-9_]*$":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Mapped","type":"object"},"unmapped":{"default":[],"description":"Values the target type has no place for (kept in the record's metadata).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Unmapped","type":"array"},"missing_required":{"default":[],"description":"Required target attributes left without a value: the record cannot move.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Missing Required","type":"array"},"linked_from":{"default":0,"description":"Live links into the record; it cannot move until they are removed, since they name\nits current type.","minimum":0,"title":"Linked From","type":"integer"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null}},"required":["record_id"],"title":"RecordRetypeItem","type":"object"},"RecordRetypeResult":{"additionalProperties":false,"properties":{"items":{"default":[],"description":"One per record, in id order.","items":{"$ref":"#/$defs/RecordRetypeItem"},"title":"Items","type":"array"}},"title":"RecordRetypeResult","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RowError":{"additionalProperties":false,"properties":{"row":{"description":"The data row, counting from 1 after the header.","minimum":1,"title":"Row","type":"integer"},"error":{"$ref":"#/$defs/ErrorInfo"}},"required":["row","error"],"title":"RowError","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"SourceRecordBinding":{"additionalProperties":false,"description":"Trusted Core provenance binding for a connector-owned record.\n\nOnly Core's connector projection writer may create or advance this value. It is included\nin record reads so owner-scoped authorization can distinguish connector-owned records\nfrom ordinary records created by service principals.","properties":{"binding_id":{"pattern":"^source-field-binding:v1:[0-9a-f]{64}$","title":"Binding Id","type":"string"},"activation_id":{"pattern":"^source-field-activation:v1:[0-9a-f]{64}$","title":"Activation Id","type":"string"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The connection owner of a private record; absent on a shared one (`shared`).","title":"Owner Id"},"shared":{"default":false,"description":"A workspace record projected through a shared CRM binding (ADR 0028): no single owner,\nvisible as its type's own access policy says, and never erased with one contributor. Exactly\none of `owner_id` and `shared` identifies who the record belongs to.","title":"Shared","type":"boolean"},"object_type_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Object Type Id","type":"string"},"object_type_version":{"exclusiveMinimum":0,"title":"Object Type Version","type":"integer"},"source_key":{"maxLength":64,"minLength":64,"pattern":"^[0-9a-f]+$","title":"Source Key","type":"string"},"managed_attributes":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"minItems":1,"title":"Managed Attributes","type":"array","uniqueItems":true},"source_fence":{"exclusiveMinimum":0,"title":"Source Fence","type":"integer"}},"required":["binding_id","activation_id","object_type_id","object_type_version","source_key","managed_attributes","source_fence"],"title":"SourceRecordBinding","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"Transfer":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/TransferKind"},"status":{"$ref":"#/$defs/TransferStatus","default":"pending"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"import_request":{"anyOf":[{"$ref":"#/$defs/ImportRequest"},{"type":"null"}],"default":null},"export_request":{"anyOf":[{"$ref":"#/$defs/ExportRequest"},{"type":"null"}],"default":null},"requester":{"$ref":"#/$defs/Principal","description":"Who started it: the transfer acts with their current access, never more."},"columns":{"default":[],"items":{"type":"string"},"title":"Columns","type":"array"},"total_rows":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Total Rows"},"processed_rows":{"default":0,"minimum":0,"title":"Processed Rows","type":"integer"},"created":{"default":0,"minimum":0,"title":"Created","type":"integer"},"updated":{"default":0,"minimum":0,"title":"Updated","type":"integer"},"failed":{"default":0,"minimum":0,"title":"Failed","type":"integer"},"errors":{"default":[],"description":"The first row errors (`TransferPolicy.max_errors`).","items":{"$ref":"#/$defs/RowError"},"title":"Errors","type":"array"},"cursor":{"default":0,"description":"The next chunk to process.","minimum":0,"title":"Cursor","type":"integer"},"page_after":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"An export's position in its query.","title":"Page After"},"file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"An export's CSV, once ready.","title":"File Id"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null,"description":"Why a failed transfer stopped."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","kind","object_type","requester","created_at"],"title":"Transfer","type":"object"},"TransferExportFormat":{"enum":["csv","xlsx"],"title":"TransferExportFormat","type":"string"},"TransferKind":{"enum":["import","export"],"title":"TransferKind","type":"string"},"TransferStatus":{"enum":["pending","running","completed","partial","failed","cancelled"],"title":"TransferStatus","type":"string"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/EntityRecord"},{"$ref":"#/$defs/RecordBulkResult"},{"$ref":"#/$defs/RecordRetypeResult"},{"$ref":"#/$defs/ChangeRevert"},{"$ref":"#/$defs/RecordHistory"},{"$ref":"#/$defs/Transfer"}],"title":"Result"}},"required":["result"],"title":"manage_recordsOutput","type":"object"},"annotations":{"title":"Manage records","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"activities","title":"Activities","description":"Read the timeline: notes, tasks, comments, calls, meetings and emails on records, their counts and change log, unread replies, meetings' sharing, and the caller's email drafts. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"ActivitiesCount":{"additionalProperties":false,"properties":{"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"mine":{"default":false,"description":"Activities assigned to the caller.","title":"Mine","type":"boolean"},"kinds":{"description":"Only these kinds (a task board's sections: `task`).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true}},"title":"ActivitiesCount","type":"object"},"ActivitiesDraft":{"additionalProperties":false,"properties":{"draft_id":{"description":"The email draft's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Draft Id","type":"string"}},"required":["draft_id"],"title":"ActivitiesDraft","type":"object"},"ActivitiesDrafts":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"thread_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Thread Id"},"updated_after":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Only drafts written (created or changed) at or after this time.","title":"Updated After"}},"title":"ActivitiesDrafts","type":"object"},"ActivitiesGet":{"additionalProperties":false,"properties":{"activity_id":{"description":"The activity's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"}},"required":["activity_id"],"title":"ActivitiesGet","type":"object"},"ActivitiesLog":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"One activity. Empty reads every activity the caller may see.","title":"Activity Id"},"actor_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only changes this principal made.","title":"Actor Id"},"kinds":{"description":"Only activities of these kinds. Empty reads every kind.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true},"since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Since"},"until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Until"}},"title":"ActivitiesLog","type":"object"},"ActivitiesMeetingAccess":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"}},"required":["meeting_id"],"title":"ActivitiesMeetingAccess","type":"object"},"ActivitiesMeetingRecap":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"}},"required":["meeting_id"],"title":"ActivitiesMeetingRecap","type":"object"},"ActivitiesMeetingSiblings":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"}},"required":["meeting_id"],"title":"ActivitiesMeetingSiblings","type":"object"},"ActivitiesQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or content.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"document_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Activities about this knowledge document (a page's comments), when the caller can see\nit.","title":"Document Id"},"kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true},"statuses":{"items":{"$ref":"#/$defs/ActivityStatus"},"title":"Statuses","type":"array","uniqueItems":true},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"due_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Only activities due before this time (overdue tasks: now, open).","title":"Due Before"},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Stage"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A thread: the activities answering this one.","title":"Parent Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"archived_only":{"default":false,"description":"Only archived activities (implies `include_archived`).","title":"Archived Only","type":"boolean"},"exclude_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Exclude Kinds","type":"array","uniqueItems":true},"priorities":{"items":{"$ref":"#/$defs/ActivityPriority"},"title":"Priorities","type":"array","uniqueItems":true},"created_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Created By"},"involving":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Assigned to or mentioning this principal.","title":"Involving"},"due_after":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due After"},"occurred_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Only activities that occurred at or before this time.","title":"Occurred Before"},"property_equals":{"description":"Only activities whose `properties` hold these exact top-level values (a meeting\nseries, an external id).","maxProperties":4,"patternProperties":{"^[a-z][a-z0-9_]*$":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Property Equals","type":"object"},"property_from":{"description":"Only activities whose top-level `properties` values are at or after these, compared as\ntext (UTC ISO times: a calendar event's `last_ends_at`).","maxProperties":4,"patternProperties":{"^[a-z][a-z0-9_]*$":{"maxLength":1000000,"type":"string"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Property From","type":"object"},"pinned_only":{"default":false,"title":"Pinned Only","type":"boolean"},"stages":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Stages","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/ActivitySort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`. Newest first by `occurred_at` when\nneither is given."},"include_child_counts":{"default":false,"description":"Also count each returned activity's children by kind (`ActivityPage.child_counts`):\na task's sub-tasks and comments.","title":"Include Child Counts","type":"boolean"}},"title":"ActivitiesQuery","type":"object"},"ActivitiesSummaries":{"additionalProperties":false,"properties":{"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"minItems":1,"title":"Record Ids","type":"array","uniqueItems":true}},"required":["record_ids"],"title":"ActivitiesSummaries","type":"object"},"ActivitiesUnread":{"additionalProperties":false,"properties":{"parent_ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"minItems":1,"title":"Parent Ids","type":"array","uniqueItems":true},"kinds":{"description":"Only replies of these kinds (`comment`); empty counts every reply.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true}},"required":["parent_ids"],"title":"ActivitiesUnread","type":"object"},"ActivityPriority":{"description":"Ranked as declared: a list ordered by priority puts `urgent` above `low`.","enum":["low","normal","high","urgent"],"title":"ActivityPriority","type":"string"},"ActivitySort":{"additionalProperties":false,"properties":{"field":{"$ref":"#/$defs/ActivitySortField","default":"occurred_at"},"direction":{"$ref":"#/$defs/SortDirection","default":"desc"}},"title":"ActivitySort","type":"object"},"ActivitySortField":{"enum":["occurred_at","start_at","due_at","created_at","updated_at","position","title","priority"],"title":"ActivitySortField","type":"string"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/ActivitiesQuery"},{"type":"null"}],"default":null,"description":"Activities newest first, by record, kinds, statuses, assignee, parent (a comment thread) or due date."},"get":{"anyOf":[{"$ref":"#/$defs/ActivitiesGet"},{"type":"null"}],"default":null,"description":"One activity."},"count":{"anyOf":[{"$ref":"#/$defs/ActivitiesCount"},{"type":"null"}],"default":null,"description":"Activities by kind, plus open and overdue tasks, for one record or the caller's own (mine)."},"summaries":{"anyOf":[{"$ref":"#/$defs/ActivitiesSummaries"},{"type":"null"}],"default":null,"description":"Activity counts for many records at once."},"log":{"anyOf":[{"$ref":"#/$defs/ActivitiesLog"},{"type":"null"}],"default":null,"description":"Changes to one activity, or the workspace's, newest first."},"unread":{"anyOf":[{"$ref":"#/$defs/ActivitiesUnread"},{"type":"null"}],"default":null,"description":"How many replies the caller has not read, per thread."},"meeting_access":{"anyOf":[{"$ref":"#/$defs/ActivitiesMeetingAccess"},{"type":"null"}],"default":null,"description":"Who can open a meeting, and the workspace rule it was created under."},"meeting_recap":{"anyOf":[{"$ref":"#/$defs/ActivitiesMeetingRecap"},{"type":"null"}],"default":null,"description":"A meeting's summary and its status, attendees, transcript and recording file."},"meeting_siblings":{"anyOf":[{"$ref":"#/$defs/ActivitiesMeetingSiblings"},{"type":"null"}],"default":null,"description":"The other meetings of a meeting's series."},"drafts":{"anyOf":[{"$ref":"#/$defs/ActivitiesDrafts"},{"type":"null"}],"default":null,"description":"The caller's email drafts newest first, by record or thread."},"draft":{"anyOf":[{"$ref":"#/$defs/ActivitiesDraft"},{"type":"null"}],"default":null,"description":"One email draft."}},"title":"activitiesArguments","type":"object"},"outputSchema":{"$defs":{"Activity":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"description":"Registered kind, e.g. `email`, `meeting`, `call`, `message`, `note`, `task`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"description":"Every record the activity is about.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"document_ids":{"description":"Knowledge documents the activity is about (a comment on a page); it is visible only to\nwho can see them all.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Document Ids","type":"array","uniqueItems":true},"properties":{"type":"object","additionalProperties":true,"description":"Kind-specific facts (a meeting's attendees, a call's duration). Core stores them; the\nkind's owner interprets them.","title":"Properties"},"status":{"anyOf":[{"$ref":"#/$defs/ActivityStatus"},{"type":"null"}],"default":null,"description":"For actionable activities (tasks, follow-ups); None for what simply happened."},"start_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the work starts (a task's span on a timeline); never after `due_at`.","title":"Start At"},"due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due At"},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"mentions":{"description":"People mentioned in a note or comment; members among them are notified.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Mentions","type":"array","uniqueItems":true},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The task project (a workspace item) a task belongs to.","title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A task's custom status (a workspace task status); `status` is its lifecycle.","title":"Stage"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Order on a board, among the activities of one stage.","title":"Position"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity this one answers: a comment on a task, a reply to a comment.","title":"Parent Id"},"priority":{"anyOf":[{"$ref":"#/$defs/ActivityPriority"},{"type":"null"}],"default":null},"pinned":{"default":false,"description":"Kept at the top of a record's history.","title":"Pinned","type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Set by Core when the status becomes `done`, cleared when it leaves `done`.","title":"Completed At"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Archived activities stay readable but leave default listings.","title":"Archived At"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"shared_with":{"description":"Members besides its owner who open a private activity (a shared meeting).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"source":{"$ref":"#/$defs/SourceRef"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"description":"Counts the activity's writes; pass it as `ActivityChange.expected_version` to change\nonly the version you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","kind","occurred_at","source","created"],"title":"Activity","type":"object"},"ActivityCounts":{"additionalProperties":false,"properties":{"by_kind":{"patternProperties":{"^[a-z][a-z0-9_]*$":{"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"By Kind","type":"object"},"by_status":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/$defs/ActivityStatus"},"title":"By Status","type":"object"},"by_stage":{"description":"Per task status slug (a board's sections).","patternProperties":{"^[a-z][a-z0-9_]*$":{"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"By Stage","type":"object"},"open":{"default":0,"minimum":0,"title":"Open","type":"integer"},"overdue":{"default":0,"description":"Open activities whose `due_at` has passed.","minimum":0,"title":"Overdue","type":"integer"}},"title":"ActivityCounts","type":"object"},"ActivityLogEntry":{"additionalProperties":false,"description":"One write of an activity: who, when, and the fields that moved.","properties":{"event_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"activity_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"},"action":{"$ref":"#/$defs/EventType"},"kind":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"actor":{"$ref":"#/$defs/PrincipalRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"version":{"minimum":1,"title":"Version","type":"integer"},"changes":{"default":[],"description":"The names of the fields the write changed, never their values, which only the activity\nitself holds. Empty when the activity was recorded, or the write predates field diffs.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Changes","type":"array"}},"required":["event_id","activity_id","action","kind","actor","occurred_at","version"],"title":"ActivityLogEntry","type":"object"},"ActivityLogPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"entries":{"default":[],"items":{"$ref":"#/$defs/ActivityLogEntry"},"title":"Entries","type":"array"}},"title":"ActivityLogPage","type":"object"},"ActivityPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every matching activity, when `include_total` asked (before record visibility, which\nmay hide some).","title":"Total"},"activities":{"default":[],"items":{"$ref":"#/$defs/Activity"},"title":"Activities","type":"array"},"child_counts":{"description":"When `include_child_counts` asked: per returned activity with children, how many of\nthem per kind the caller would list by `parent_id` (visible, neither deleted nor\narchived).","patternProperties":{"^\\S+$":{"patternProperties":{"^[a-z][a-z0-9_]*$":{"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"type":"object"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Child Counts","type":"object"}},"title":"ActivityPage","type":"object"},"ActivityPriority":{"description":"Ranked as declared: a list ordered by priority puts `urgent` above `low`.","enum":["low","normal","high","urgent"],"title":"ActivityPriority","type":"string"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"ActivitySummaries":{"additionalProperties":false,"properties":{"counts":{"patternProperties":{"^\\S+$":{"$ref":"#/$defs/ActivityCounts"}},"propertyNames":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1},"title":"Counts","type":"object"}},"title":"ActivitySummaries","type":"object"},"EmailDraft":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"to":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"To","type":"array"},"cc":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"Cc","type":"array"},"bcc":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"Bcc","type":"array"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"body":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"thread_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"An activity (usually email) this draft continues.","title":"Thread Id"},"reply_to_message_id":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"title":"Reply To Message Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","owner_id","created"],"title":"EmailDraft","type":"object"},"EmailDraftPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"drafts":{"default":[],"items":{"$ref":"#/$defs/EmailDraft"},"title":"Drafts","type":"array"}},"title":"EmailDraftPage","type":"object"},"EventType":{"description":"Every event Core publishes. See docs/modules/events.md.","enum":["tenant.created","tenant.updated","schema.changed","entity.created","entity.updated","entity.deleted","entity.history_redacted","relation.added","relation.removed","activity.recorded","activity.updated","activity.deleted","ingest.accepted","ingest.completed","source_item.accepted","source_schema.registered","acl.changed","invitation.created","invitation.accepted","invitation.updated","invitation.revoked","agent.created","agent.updated","agent.channel_changed","knowledge.created","knowledge.updated","transfer.requested","transfer.progressed","transfer.finished","document.created","document.updated","document.deleted","document_import.requested","document_import.progressed","document_import.finished","workspace_item.changed","favorite.changed","reminder.changed","field_reminder.changed","notifications.read","workspace_settings.changed","ingestion_routing.changed","ingestion.reset","ingestion.recompact","collection_entry.changed","notification.created","billing_account.changed","invoice.payment_failed","gold.alert_raised","billing_account.seats_over_limit","credits.low","credits.changed","admin.action","schema_proposal.changed","file_extraction.changed","file.changed","record_folder.changed","folder_share.changed","meeting_join_preference.changed","api_token.changed","app.created","app.changed","app.revoked","data_source.connected","data_source.changed","data_source.disconnected","client_connection.revoked","user_preference.changed","thread_read.changed","email_draft.changed","commitment.changed","audit.imported","enrichment_run.changed","enrichment_settings.changed","enrichment_field_map.changed","automation.changed","automation_run.changed"],"title":"EventType","type":"string"},"MeetingAccess":{"additionalProperties":false,"description":"A meeting's sharing as its people see it, and the workspace rule it was created under.","properties":{"meeting_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"visibility":{"$ref":"#/$defs/Visibility"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/SharedMeetingGrant"},"title":"Grants","type":"array"},"roles":{"default":[],"description":"The roles it was shared with since its people were last replaced.","items":{"$ref":"#/$defs/SharedMeetingRole"},"title":"Roles","type":"array"},"rule":{"$ref":"#/$defs/Visibility","description":"The workspace's default for new meetings (`MeetingSettings`)."}},"required":["meeting_id","visibility","rule"],"title":"MeetingAccess","type":"object"},"MeetingAttendee":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"email":{"anyOf":[{"maxLength":320,"minLength":3,"type":"string"},{"type":"null"}],"default":null,"title":"Email"},"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Set when the attendee is a member.","title":"Principal Id"}},"title":"MeetingAttendee","type":"object"},"MeetingRecap":{"additionalProperties":false,"description":"A meeting's recap, read from the typed keys of its properties (`RecapProperty`). A value\nthat does not have its documented shape is left out, never an error.","properties":{"meeting_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"summary_status":{"anyOf":[{"$ref":"#/$defs/MeetingSummaryStatus"},{"type":"null"}],"default":null,"description":"`ready` when there is a summary and no status was written."},"attendees":{"default":[],"items":{"$ref":"#/$defs/MeetingAttendee"},"title":"Attendees","type":"array"},"utterances":{"default":[],"description":"The transcript, in the order spoken.","items":{"$ref":"#/$defs/MeetingUtterance"},"title":"Utterances","type":"array"},"recording_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The recording in Core's files: read it at `GET /core/v1/files/{id}`.","title":"Recording File Id"},"version":{"default":1,"description":"The meeting's version, for `MeetingSummaryChange.expected_version`.","minimum":1,"title":"Version","type":"integer"}},"required":["meeting_id","occurred_at"],"title":"MeetingRecap","type":"object"},"MeetingShareLevel":{"description":"What a person a meeting is shared with gets.","enum":["view","follow"],"title":"MeetingShareLevel","type":"string"},"MeetingSibling":{"additionalProperties":false,"description":"One meeting of a series, as the caller sees it (no title when it is redacted).","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"source":{"$ref":"#/$defs/SourceRef"},"merged":{"default":false,"description":"Folded into another meeting of the series (`…/merge`).","title":"Merged","type":"boolean"}},"required":["id","occurred_at","source"],"title":"MeetingSibling","type":"object"},"MeetingSiblings":{"additionalProperties":false,"properties":{"series_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Series Id","type":"string"},"meetings":{"default":[],"description":"The ids of `siblings`, in the same order.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Meetings","type":"array"},"siblings":{"default":[],"items":{"$ref":"#/$defs/MeetingSibling"},"title":"Siblings","type":"array"}},"required":["series_id"],"title":"MeetingSiblings","type":"object"},"MeetingSummaryStatus":{"description":"Where a meeting's summary stands.","enum":["pending","ready","failed"],"title":"MeetingSummaryStatus","type":"string"},"MeetingUtterance":{"additionalProperties":false,"properties":{"speaker":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Speaker"},"text":{"maxLength":1000000,"title":"Text","type":"string"},"start_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"From the start of the recording.","title":"Start Seconds"},"end_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"title":"End Seconds"}},"required":["text"],"title":"MeetingUtterance","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SharedMeetingGrant":{"additionalProperties":false,"description":"A person a meeting is shared with, as read back.","properties":{"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"level":{"$ref":"#/$defs/MeetingShareLevel","default":"view"},"shared_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Who shared it at this level; none for a grant made before this was kept.","title":"Shared By"}},"required":["principal_id"],"title":"SharedMeetingGrant","type":"object"},"SharedMeetingRole":{"additionalProperties":false,"description":"A role a meeting was shared with, as read back: its members then were granted.","properties":{"role":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Role","type":"string"},"level":{"$ref":"#/$defs/MeetingShareLevel","default":"view"},"shared_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Shared By"}},"required":["role"],"title":"SharedMeetingRole","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"ThreadUnread":{"additionalProperties":false,"properties":{"counts":{"description":"Replies by others since the caller last read each thread (all, if never).","patternProperties":{"^\\S+$":{"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Counts","type":"object"}},"title":"ThreadUnread","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/ActivityPage"},{"$ref":"#/$defs/Activity"},{"$ref":"#/$defs/ActivityCounts"},{"$ref":"#/$defs/ActivitySummaries"},{"$ref":"#/$defs/ActivityLogPage"},{"$ref":"#/$defs/ThreadUnread"},{"$ref":"#/$defs/MeetingAccess"},{"$ref":"#/$defs/MeetingRecap"},{"$ref":"#/$defs/MeetingSiblings"},{"$ref":"#/$defs/EmailDraftPage"},{"$ref":"#/$defs/EmailDraft"}],"title":"Result"}},"required":["result"],"title":"activitiesOutput","type":"object"},"annotations":{"title":"Activities","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_activities","title":"Manage activities","description":"Record and change notes, tasks, comments (an activity with a parent), calls, meetings and emails; complete, reorder, archive or delete them; share and merge meetings; keep email drafts (Core never sends them). Set exactly one argument: the action to take.","inputSchema":{"$defs":{"ActivityBulkChange":{"additionalProperties":false,"description":"Apply one change to the selected activities, each on its own: complete, archive or\nreassign many.","properties":{"activity_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Activity Ids","type":"array"},"query":{"anyOf":[{"$ref":"#/$defs/ActivityQuery"},{"type":"null"}],"default":null,"description":"The activities a list would show (its paging is ignored): an archive view's \"empty\narchive\", or a filter's \"complete all\"."},"change":{"$ref":"#/$defs/ActivityChange"}},"required":["change"],"title":"ActivityBulkChange","type":"object"},"ActivityChange":{"additionalProperties":false,"description":"Changes to an activity; fields left out stay as they are.","properties":{"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"occurred_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Occurred At"},"record_ids":{"anyOf":[{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Record Ids"},"document_ids":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Document Ids"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Replaces the stored properties.","title":"Properties"},"status":{"anyOf":[{"$ref":"#/$defs/ActivityStatus"},{"type":"null"}],"default":null,"description":"`done` completes the activity (Core stamps `completed_at`); null clears the status."},"start_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Start At"},"due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due At"},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"mentions":{"anyOf":[{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Mentions"},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Stage"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Position"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Moves the activity under another one it may not already contain (a sub-task under a\ntask); null detaches it.","title":"Parent Id"},"priority":{"anyOf":[{"$ref":"#/$defs/ActivityPriority"},{"type":"null"}],"default":null},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Pinned"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null},"shared_with":{"anyOf":[{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Shared With"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True archives, false restores.","title":"Archived"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"When set, the change applies only if the activity is still at this `version`; else\n`conflict`, so two editors never overwrite each other unknowingly.","title":"Expected Version"}},"title":"ActivityChange","type":"object"},"ActivityDraft":{"additionalProperties":false,"description":"An activity to record. Recording the same `key` again returns the first activity.","properties":{"key":{"description":"The caller's identity for the activity (e.g. a provider event id).","maxLength":512,"minLength":1,"title":"Key","type":"string"},"kind":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"document_ids":{"description":"Knowledge documents the activity is about; a reply naming none takes its parent's.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Document Ids","type":"array","uniqueItems":true},"properties":{"type":"object","additionalProperties":true,"title":"Properties"},"status":{"anyOf":[{"$ref":"#/$defs/ActivityStatus"},{"type":"null"}],"default":null},"start_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the work starts; never after `due_at`.","title":"Start At"},"due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due At"},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"mentions":{"description":"People mentioned in a note or comment; members among them are notified.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Mentions","type":"array","uniqueItems":true},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The task project (a workspace item) a task belongs to.","title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A task's custom status (a workspace task status); `status` is its lifecycle.","title":"Stage"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Order on a board, among the activities of one stage.","title":"Position"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity this one answers; a reply naming no records takes its parent's.","title":"Parent Id"},"priority":{"anyOf":[{"$ref":"#/$defs/ActivityPriority"},{"type":"null"}],"default":null},"pinned":{"default":false,"title":"Pinned","type":"boolean"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"source":{"$ref":"#/$defs/SourceRef"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","kind","occurred_at","source"],"title":"ActivityDraft","type":"object"},"ActivityPosition":{"additionalProperties":false,"description":"Where one activity goes on a board.","properties":{"activity_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"},"position":{"title":"Position","type":"number"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Stage"},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"}},"required":["activity_id","position"],"title":"ActivityPosition","type":"object"},"ActivityPriority":{"description":"Ranked as declared: a list ordered by priority puts `urgent` above `low`.","enum":["low","normal","high","urgent"],"title":"ActivityPriority","type":"string"},"ActivityQuery":{"additionalProperties":false,"description":"Lists activities, newest first, as the caller may see them. The fixed parameters are\nshorthands for conditions ANDed with `where` (ADR 0027).","properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or content.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"document_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Activities about this knowledge document (a page's comments), when the caller can see\nit.","title":"Document Id"},"kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true},"statuses":{"items":{"$ref":"#/$defs/ActivityStatus"},"title":"Statuses","type":"array","uniqueItems":true},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"due_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Only activities due before this time (overdue tasks: now, open).","title":"Due Before"},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Stage"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A thread: the activities answering this one.","title":"Parent Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"archived_only":{"default":false,"description":"Only archived activities (implies `include_archived`).","title":"Archived Only","type":"boolean"},"exclude_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Exclude Kinds","type":"array","uniqueItems":true},"priorities":{"items":{"$ref":"#/$defs/ActivityPriority"},"title":"Priorities","type":"array","uniqueItems":true},"created_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Created By"},"involving":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Assigned to or mentioning this principal.","title":"Involving"},"due_after":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due After"},"occurred_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Only activities that occurred at or before this time.","title":"Occurred Before"},"property_equals":{"description":"Only activities whose `properties` hold these exact top-level values (a meeting\nseries, an external id).","maxProperties":4,"patternProperties":{"^[a-z][a-z0-9_]*$":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Property Equals","type":"object"},"property_from":{"description":"Only activities whose top-level `properties` values are at or after these, compared as\ntext (UTC ISO times: a calendar event's `last_ends_at`).","maxProperties":4,"patternProperties":{"^[a-z][a-z0-9_]*$":{"maxLength":1000000,"type":"string"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Property From","type":"object"},"pinned_only":{"default":false,"title":"Pinned Only","type":"boolean"},"stages":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Stages","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/ActivitySort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`. Newest first by `occurred_at` when\nneither is given."},"include_child_counts":{"default":false,"description":"Also count each returned activity's children by kind (`ActivityPage.child_counts`):\na task's sub-tasks and comments.","title":"Include Child Counts","type":"boolean"}},"title":"ActivityQuery","type":"object"},"ActivitySort":{"additionalProperties":false,"properties":{"field":{"$ref":"#/$defs/ActivitySortField","default":"occurred_at"},"direction":{"$ref":"#/$defs/SortDirection","default":"desc"}},"title":"ActivitySort","type":"object"},"ActivitySortField":{"enum":["occurred_at","start_at","due_at","created_at","updated_at","position","title","priority"],"title":"ActivitySortField","type":"string"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"EmailDraftChange":{"additionalProperties":false,"description":"The fields sent replace the stored ones; `null` clears a field (recipients and records\nbecome empty).","properties":{"to":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"default":null,"title":"To"},"cc":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"default":null,"title":"Cc"},"bcc":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"default":null,"title":"Bcc"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"body":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record_ids":{"anyOf":[{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Record Ids"},"thread_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Thread Id"},"reply_to_message_id":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"title":"Reply To Message Id"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"EmailDraftChange","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"ManageActivitiesArchiveCompleted":{"additionalProperties":false,"properties":{"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"completed_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Completed Before"},"include_cancelled":{"default":true,"title":"Include Cancelled","type":"boolean"},"kinds":{"description":"Only activities of these kinds (`task`); empty archives every finished kind.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true}},"title":"ManageActivitiesArchiveCompleted","type":"object"},"ManageActivitiesChange":{"additionalProperties":false,"properties":{"activity_id":{"description":"The activity's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"},"change":{"$ref":"#/$defs/ActivityChange","description":"The fields."}},"required":["activity_id","change"],"title":"ManageActivitiesChange","type":"object"},"ManageActivitiesChangeDraft":{"additionalProperties":false,"properties":{"draft_id":{"description":"The email draft's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Draft Id","type":"string"},"change":{"$ref":"#/$defs/EmailDraftChange","description":"The fields."}},"required":["draft_id","change"],"title":"ManageActivitiesChangeDraft","type":"object"},"ManageActivitiesChangeMany":{"additionalProperties":false,"properties":{"bulk":{"$ref":"#/$defs/ActivityBulkChange","description":"The change."}},"required":["bulk"],"title":"ManageActivitiesChangeMany","type":"object"},"ManageActivitiesCreateDraft":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"to":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"To","type":"array"},"cc":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"Cc","type":"array"},"bcc":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"Bcc","type":"array"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"body":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"thread_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Thread Id"},"reply_to_message_id":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"title":"Reply To Message Id"},"source":{"$ref":"#/$defs/SourceRef"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","source"],"title":"ManageActivitiesCreateDraft","type":"object"},"ManageActivitiesDelete":{"additionalProperties":false,"properties":{"activity_id":{"description":"The activity's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"}},"required":["activity_id"],"title":"ManageActivitiesDelete","type":"object"},"ManageActivitiesDeleteDraft":{"additionalProperties":false,"properties":{"draft_id":{"description":"The email draft's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Draft Id","type":"string"}},"required":["draft_id"],"title":"ManageActivitiesDeleteDraft","type":"object"},"ManageActivitiesDeleteMany":{"additionalProperties":false,"properties":{"activity_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Activity Ids","type":"array"},"query":{"anyOf":[{"$ref":"#/$defs/ActivityQuery"},{"type":"null"}],"default":null,"description":"The activities a list would show (its paging is ignored): an archive view's \"empty\narchive\", or a filter's \"complete all\"."}},"title":"ManageActivitiesDeleteMany","type":"object"},"ManageActivitiesErase":{"additionalProperties":false,"properties":{"activity_id":{"description":"The activity's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"}},"required":["activity_id"],"title":"ManageActivitiesErase","type":"object"},"ManageActivitiesLinkMeeting":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["meeting_id","record_id"],"title":"ManageActivitiesLinkMeeting","type":"object"},"ManageActivitiesMergeMeetings":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"duplicate_ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"minItems":1,"title":"Duplicate Ids","type":"array"}},"required":["meeting_id","duplicate_ids"],"title":"ManageActivitiesMergeMeetings","type":"object"},"ManageActivitiesReadThread":{"additionalProperties":false,"properties":{"parent_id":{"description":"The activity the replies are to.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Parent Id","type":"string"}},"required":["parent_id"],"title":"ManageActivitiesReadThread","type":"object"},"ManageActivitiesRecord":{"additionalProperties":false,"properties":{"key":{"description":"The caller's identity for the activity (e.g. a provider event id).","maxLength":512,"minLength":1,"title":"Key","type":"string"},"kind":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"document_ids":{"description":"Knowledge documents the activity is about; a reply naming none takes its parent's.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Document Ids","type":"array","uniqueItems":true},"properties":{"type":"object","additionalProperties":true,"title":"Properties"},"status":{"anyOf":[{"$ref":"#/$defs/ActivityStatus"},{"type":"null"}],"default":null},"start_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the work starts; never after `due_at`.","title":"Start At"},"due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due At"},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"mentions":{"description":"People mentioned in a note or comment; members among them are notified.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Mentions","type":"array","uniqueItems":true},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The task project (a workspace item) a task belongs to.","title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A task's custom status (a workspace task status); `status` is its lifecycle.","title":"Stage"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Order on a board, among the activities of one stage.","title":"Position"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity this one answers; a reply naming no records takes its parent's.","title":"Parent Id"},"priority":{"anyOf":[{"$ref":"#/$defs/ActivityPriority"},{"type":"null"}],"default":null},"pinned":{"default":false,"title":"Pinned","type":"boolean"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"source":{"$ref":"#/$defs/SourceRef"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","kind","occurred_at","source"],"title":"ManageActivitiesRecord","type":"object"},"ManageActivitiesRecordMany":{"additionalProperties":false,"properties":{"drafts":{"items":{"$ref":"#/$defs/ActivityDraft"},"maxItems":100,"minItems":1,"title":"Drafts","type":"array"}},"required":["drafts"],"title":"ManageActivitiesRecordMany","type":"object"},"ManageActivitiesReorder":{"additionalProperties":false,"properties":{"moves":{"items":{"$ref":"#/$defs/ActivityPosition"},"maxItems":200,"minItems":1,"title":"Moves","type":"array"}},"required":["moves"],"title":"ManageActivitiesReorder","type":"object"},"ManageActivitiesRestore":{"additionalProperties":false,"properties":{"activity_id":{"description":"The activity's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"}},"required":["activity_id"],"title":"ManageActivitiesRestore","type":"object"},"ManageActivitiesSetMeetingSummary":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"change":{"$ref":"#/$defs/MeetingSummaryChange","description":"The fields."}},"required":["meeting_id","change"],"title":"ManageActivitiesSetMeetingSummary","type":"object"},"ManageActivitiesShareMeeting":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null},"grants":{"anyOf":[{"items":{"$ref":"#/$defs/MeetingGrant"},"maxItems":200,"type":"array"},{"type":"null"}],"default":null,"title":"Grants"},"roles":{"default":[],"items":{"$ref":"#/$defs/MeetingRoleGrant"},"maxItems":20,"title":"Roles","type":"array"},"confirm":{"default":false,"title":"Confirm","type":"boolean"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["meeting_id"],"title":"ManageActivitiesShareMeeting","type":"object"},"ManageActivitiesUnlinkMeeting":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["meeting_id","record_id"],"title":"ManageActivitiesUnlinkMeeting","type":"object"},"ManageActivitiesUnmergeMeeting":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"}},"required":["meeting_id"],"title":"ManageActivitiesUnmergeMeeting","type":"object"},"MeetingGrant":{"additionalProperties":false,"properties":{"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"level":{"$ref":"#/$defs/MeetingShareLevel","default":"view"}},"required":["principal_id"],"title":"MeetingGrant","type":"object"},"MeetingRoleGrant":{"additionalProperties":false,"description":"Share with everyone who holds a role (a team) now: its active members are granted.","properties":{"role":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Role","type":"string"},"level":{"$ref":"#/$defs/MeetingShareLevel","default":"view"}},"required":["role"],"title":"MeetingRoleGrant","type":"object"},"MeetingShareLevel":{"description":"What a person a meeting is shared with gets.","enum":["view","follow"],"title":"MeetingShareLevel","type":"string"},"MeetingSummaryChange":{"additionalProperties":false,"description":"Edit a meeting's recap. `summary` is the summary every reader shows (the\n`RecapProperty.SUMMARY` property ingestion writes); sending it marks the summary `ready`,\nand null clears both. `content` is the meeting's body (its notes or transcript text).","properties":{"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"MeetingSummaryChange","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"record":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesRecord"},{"type":"null"}],"default":null,"description":"Record an activity tied to any number of records. The same `key` returns the first activity."},"record_many":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesRecordMany"},{"type":"null"}],"default":null,"description":"Up to 100 activities, each on its own and once per key."},"change":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesChange"},{"type":"null"}],"default":null,"description":"Change the fields sent (complete a task: status done; archive: archived true; move: record_ids). `expected_version` makes it conditional."},"change_many":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesChangeMany"},{"type":"null"}],"default":null,"description":"Apply one change to up to 100 activities by id, or to those a query matches (up to 1000), e.g. complete or archive them."},"reorder":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesReorder"},{"type":"null"}],"default":null,"description":"Move many activities at once (a drag on a board: status and position), each on its own."},"archive_completed":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesArchiveCompleted"},{"type":"null"}],"default":null,"description":"Archive the done (and cancelled) activities of one record or project, or the caller's, of the kinds given."},"delete":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesDelete"},{"type":"null"}],"default":null,"description":"Delete an activity and its descendants (sub-tasks, replies)."},"restore":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesRestore"},{"type":"null"}],"default":null,"description":"Bring back a deleted activity and the descendants deleted with it."},"delete_many":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesDeleteMany"},{"type":"null"}],"default":null,"description":"Delete up to 100 activities by id, or those a query matches (up to 1000), each on its own."},"erase":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesErase"},{"type":"null"}],"default":null,"description":"Delete an activity and erase its content for good, as a privacy request requires."},"read_thread":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesReadThread"},{"type":"null"}],"default":null,"description":"Mark the replies to an activity read for the caller."},"share_meeting":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesShareMeeting"},{"type":"null"}],"default":null,"description":"Share a meeting with the workspace, or keep it to its owner and the people or roles given."},"merge_meetings":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesMergeMeetings"},{"type":"null"}],"default":null,"description":"Fold duplicate recordings of one meeting into it."},"unmerge_meeting":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesUnmergeMeeting"},{"type":"null"}],"default":null,"description":"Split the recordings merged into a meeting apart again."},"set_meeting_summary":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesSetMeetingSummary"},{"type":"null"}],"default":null,"description":"Replace a meeting's title, body or summary."},"link_meeting":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesLinkMeeting"},{"type":"null"}],"default":null,"description":"Tie a meeting to one more record."},"unlink_meeting":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesUnlinkMeeting"},{"type":"null"}],"default":null,"description":"Untie a record from a meeting; its other records are kept."},"create_draft":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesCreateDraft"},{"type":"null"}],"default":null,"description":"An unsent email kept for the caller. The same `key` returns the first draft."},"change_draft":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesChangeDraft"},{"type":"null"}],"default":null,"description":"Replace the fields sent; null clears one."},"delete_draft":{"anyOf":[{"$ref":"#/$defs/ManageActivitiesDeleteDraft"},{"type":"null"}],"default":null,"description":"Delete an email draft."}},"title":"manage_activitiesArguments","type":"object"},"outputSchema":{"$defs":{"Activity":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"description":"Registered kind, e.g. `email`, `meeting`, `call`, `message`, `note`, `task`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"description":"Every record the activity is about.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"document_ids":{"description":"Knowledge documents the activity is about (a comment on a page); it is visible only to\nwho can see them all.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Document Ids","type":"array","uniqueItems":true},"properties":{"type":"object","additionalProperties":true,"description":"Kind-specific facts (a meeting's attendees, a call's duration). Core stores them; the\nkind's owner interprets them.","title":"Properties"},"status":{"anyOf":[{"$ref":"#/$defs/ActivityStatus"},{"type":"null"}],"default":null,"description":"For actionable activities (tasks, follow-ups); None for what simply happened."},"start_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the work starts (a task's span on a timeline); never after `due_at`.","title":"Start At"},"due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due At"},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"mentions":{"description":"People mentioned in a note or comment; members among them are notified.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Mentions","type":"array","uniqueItems":true},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The task project (a workspace item) a task belongs to.","title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A task's custom status (a workspace task status); `status` is its lifecycle.","title":"Stage"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Order on a board, among the activities of one stage.","title":"Position"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity this one answers: a comment on a task, a reply to a comment.","title":"Parent Id"},"priority":{"anyOf":[{"$ref":"#/$defs/ActivityPriority"},{"type":"null"}],"default":null},"pinned":{"default":false,"description":"Kept at the top of a record's history.","title":"Pinned","type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Set by Core when the status becomes `done`, cleared when it leaves `done`.","title":"Completed At"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Archived activities stay readable but leave default listings.","title":"Archived At"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"shared_with":{"description":"Members besides its owner who open a private activity (a shared meeting).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"source":{"$ref":"#/$defs/SourceRef"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"description":"Counts the activity's writes; pass it as `ActivityChange.expected_version` to change\nonly the version you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","kind","occurred_at","source","created"],"title":"Activity","type":"object"},"ActivityBulkItem":{"additionalProperties":false,"properties":{"index":{"minimum":0,"title":"Index","type":"integer"},"activity":{"anyOf":[{"$ref":"#/$defs/Activity"},{"type":"null"}],"default":null},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null}},"required":["index"],"title":"ActivityBulkItem","type":"object"},"ActivityBulkResult":{"additionalProperties":false,"properties":{"items":{"default":[],"items":{"$ref":"#/$defs/ActivityBulkItem"},"title":"Items","type":"array"},"has_more":{"default":false,"description":"A `query` matched more than `ActivitySelection.MAX_MATCHED`: run it again for the\nrest.","title":"Has More","type":"boolean"}},"title":"ActivityBulkResult","type":"object"},"ActivityPriority":{"description":"Ranked as declared: a list ordered by priority puts `urgent` above `low`.","enum":["low","normal","high","urgent"],"title":"ActivityPriority","type":"string"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"ArchiveReceipt":{"additionalProperties":false,"properties":{"archived":{"minimum":0,"title":"Archived","type":"integer"}},"required":["archived"],"title":"ArchiveReceipt","type":"object"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"EmailDraft":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"to":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"To","type":"array"},"cc":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"Cc","type":"array"},"bcc":{"default":[],"items":{"type":"string"},"maxItems":50,"title":"Bcc","type":"array"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"body":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"thread_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"An activity (usually email) this draft continues.","title":"Thread Id"},"reply_to_message_id":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"title":"Reply To Message Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","owner_id","created"],"title":"EmailDraft","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"ThreadRead":{"additionalProperties":false,"description":"Where one person stopped reading the replies to an activity.","properties":{"parent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Parent Id","type":"string"},"principal_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Principal Id","type":"string"},"read_at":{"format":"date-time","title":"Read At","type":"string"}},"required":["parent_id","principal_id","read_at"],"title":"ThreadRead","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/Activity"},{"$ref":"#/$defs/ActivityBulkResult"},{"$ref":"#/$defs/ArchiveReceipt"},{"$ref":"#/$defs/ThreadRead"},{"$ref":"#/$defs/EmailDraft"},{"$ref":"#/$defs/Done"}],"title":"Result"}},"required":["result"],"title":"manage_activitiesOutput","type":"object"},"annotations":{"title":"Manage activities","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"calendar","title":"Calendar","description":"Calendar events kept in Core, with their recurring occurrences. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"CalendarGet":{"additionalProperties":false,"properties":{"event_id":{"description":"The calendar event's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"}},"required":["event_id"],"title":"CalendarGet","type":"object"},"CalendarQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"window_start":{"format":"date-time","title":"Window Start","type":"string"},"window_end":{"format":"date-time","title":"Window End","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"expand":{"default":true,"title":"Expand","type":"boolean"}},"required":["window_start","window_end"],"title":"CalendarQuery","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/CalendarQuery"},{"type":"null"}],"default":null,"description":"Events with an instance in a window, oldest start first by default (occurred_at asc); follow `next_cursor` while `has_more`. order_by takes occurred_at (or start_time / starts_at), last_ends_at (or end_time / ends_at), title, description, created_at, updated_at; where takes those and location."},"get":{"anyOf":[{"$ref":"#/$defs/CalendarGet"},{"type":"null"}],"default":null,"description":"One calendar event."}},"title":"calendarArguments","type":"object"},"outputSchema":{"$defs":{"CalendarAttendee":{"additionalProperties":false,"properties":{"email":{"maxLength":320,"minLength":3,"title":"Email","type":"string"},"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Principal Id"},"response":{"default":"needs_action","enum":["needs_action","accepted","declined","tentative"],"title":"Response","type":"string"}},"required":["email"],"title":"CalendarAttendee","type":"object"},"CalendarEvent":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"schedule":{"$ref":"#/$defs/CalendarSchedule"},"attendees":{"default":[],"items":{"$ref":"#/$defs/CalendarAttendee"},"title":"Attendees","type":"array"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"visibility":{"$ref":"#/$defs/Visibility","default":"principal"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","schedule","created"],"title":"CalendarEvent","type":"object"},"CalendarEventPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"events":{"default":[],"items":{"$ref":"#/$defs/CalendarEvent"},"title":"Events","type":"array"},"occurrences":{"default":[],"items":{"$ref":"#/$defs/CalendarOccurrence"},"title":"Occurrences","type":"array"}},"title":"CalendarEventPage","type":"object"},"CalendarOccurrence":{"additionalProperties":false,"description":"One expanded instance of a calendar event (or the single instance when not recurring).","properties":{"event_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"original_starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Set on an instance edited on its own: the start the rule gives it.","title":"Original Starts At"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"all_day":{"default":false,"title":"All Day","type":"boolean"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true}},"required":["event_id","starts_at","ends_at"],"title":"CalendarOccurrence","type":"object"},"CalendarOccurrenceOverride":{"additionalProperties":false,"description":"One instance of a recurring event edited on its own. It stands in for the instance the\nrule generates at `original_starts_at`; a field left out follows the series.","properties":{"original_starts_at":{"description":"The start the rule gives the instance: the key of the edit.","format":"date-time","title":"Original Starts At","type":"string"},"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"}},"required":["original_starts_at","starts_at","ends_at"],"title":"CalendarOccurrenceOverride","type":"object"},"CalendarSchedule":{"additionalProperties":false,"properties":{"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"all_day":{"default":false,"title":"All Day","type":"boolean"},"timezone":{"anyOf":[{"maxLength":64,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The IANA zone a recurrence is expanded in (UTC when left out), so instances keep their\nlocal time across daylight-saving changes.","title":"Timezone"},"rrule":{"anyOf":[{"maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"One RFC 5545 RRULE (DAILY, WEEKLY, MONTHLY or YEARLY; UNTIL in UTC).","title":"Rrule"},"exdates":{"default":[],"description":"Instance starts left out of the series.","items":{"format":"date-time","type":"string"},"maxItems":500,"title":"Exdates","type":"array"},"overrides":{"default":[],"description":"Instances edited on their own, each keyed by a start the rule generates. An instance\nalso in `exdates` stays left out.","items":{"$ref":"#/$defs/CalendarOccurrenceOverride"},"maxItems":100,"title":"Overrides","type":"array"}},"required":["starts_at","ends_at"],"title":"CalendarSchedule","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/CalendarEventPage"},{"$ref":"#/$defs/CalendarEvent"}],"title":"Result"}},"required":["result"],"title":"calendarOutput","type":"object"},"annotations":{"title":"Calendar","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_calendar","title":"Manage the calendar","description":"Create, change and delete calendar events, and turn attendees into records. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"CalendarAttendee":{"additionalProperties":false,"properties":{"email":{"maxLength":320,"minLength":3,"title":"Email","type":"string"},"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Principal Id"},"response":{"default":"needs_action","enum":["needs_action","accepted","declined","tentative"],"title":"Response","type":"string"}},"required":["email"],"title":"CalendarAttendee","type":"object"},"CalendarAttendeeRecords":{"additionalProperties":false,"description":"Find, or create, a record of `object_type` for each attendee who is not a member, and\ntie those records to the event. An opt-in action: nothing does it on its own.","properties":{"object_type":{"description":"The people type, which must have an email attribute (`system_key` `email`).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["object_type"],"title":"CalendarAttendeeRecords","type":"object"},"CalendarEventChange":{"additionalProperties":false,"description":"The fields sent change; `location`, `conference_url` and `color` sent as null clear.","properties":{"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"schedule":{"anyOf":[{"$ref":"#/$defs/CalendarSchedule"},{"type":"null"}],"default":null},"attendees":{"anyOf":[{"items":{"$ref":"#/$defs/CalendarAttendee"},"type":"array"},{"type":"null"}],"default":null,"title":"Attendees"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"record_ids":{"anyOf":[{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Record Ids"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"CalendarEventChange","type":"object"},"CalendarOccurrenceChange":{"additionalProperties":false,"description":"Edit or cancel one instance of a recurring event, named by the start the rule gives it.\n`cancel` leaves it out of the series (an exception date). Otherwise the edit replaces any\nearlier edit of that instance: times left out are the instance's own, and other fields\nleft out follow the series.","properties":{"original_starts_at":{"format":"date-time","title":"Original Starts At","type":"string"},"cancel":{"default":false,"title":"Cancel","type":"boolean"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Starts At"},"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Ends At"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["original_starts_at"],"title":"CalendarOccurrenceChange","type":"object"},"CalendarOccurrenceOverride":{"additionalProperties":false,"description":"One instance of a recurring event edited on its own. It stands in for the instance the\nrule generates at `original_starts_at`; a field left out follows the series.","properties":{"original_starts_at":{"description":"The start the rule gives the instance: the key of the edit.","format":"date-time","title":"Original Starts At","type":"string"},"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"}},"required":["original_starts_at","starts_at","ends_at"],"title":"CalendarOccurrenceOverride","type":"object"},"CalendarSchedule":{"additionalProperties":false,"properties":{"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"all_day":{"default":false,"title":"All Day","type":"boolean"},"timezone":{"anyOf":[{"maxLength":64,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The IANA zone a recurrence is expanded in (UTC when left out), so instances keep their\nlocal time across daylight-saving changes.","title":"Timezone"},"rrule":{"anyOf":[{"maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"One RFC 5545 RRULE (DAILY, WEEKLY, MONTHLY or YEARLY; UNTIL in UTC).","title":"Rrule"},"exdates":{"default":[],"description":"Instance starts left out of the series.","items":{"format":"date-time","type":"string"},"maxItems":500,"title":"Exdates","type":"array"},"overrides":{"default":[],"description":"Instances edited on their own, each keyed by a start the rule generates. An instance\nalso in `exdates` stays left out.","items":{"$ref":"#/$defs/CalendarOccurrenceOverride"},"maxItems":100,"title":"Overrides","type":"array"}},"required":["starts_at","ends_at"],"title":"CalendarSchedule","type":"object"},"ManageCalendarAttendeeRecords":{"additionalProperties":false,"properties":{"event_id":{"description":"The calendar event's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"attendees":{"$ref":"#/$defs/CalendarAttendeeRecords","description":"The people type, and `expected_version`."}},"required":["event_id","attendees"],"title":"ManageCalendarAttendeeRecords","type":"object"},"ManageCalendarChange":{"additionalProperties":false,"properties":{"event_id":{"description":"The calendar event's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"change":{"$ref":"#/$defs/CalendarEventChange","description":"The fields."}},"required":["event_id","change"],"title":"ManageCalendarChange","type":"object"},"ManageCalendarChangeOccurrence":{"additionalProperties":false,"properties":{"event_id":{"description":"The calendar event's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"occurrence":{"$ref":"#/$defs/CalendarOccurrenceChange","description":"The instance's original start and its new values."}},"required":["event_id","occurrence"],"title":"ManageCalendarChangeOccurrence","type":"object"},"ManageCalendarCreate":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"schedule":{"$ref":"#/$defs/CalendarSchedule"},"attendees":{"default":[],"items":{"$ref":"#/$defs/CalendarAttendee"},"title":"Attendees","type":"array"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"visibility":{"$ref":"#/$defs/Visibility","default":"principal"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"source":{"$ref":"#/$defs/SourceRef"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","schedule","source"],"title":"ManageCalendarCreate","type":"object"},"ManageCalendarDelete":{"additionalProperties":false,"properties":{"event_id":{"description":"The calendar event's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"}},"required":["event_id"],"title":"ManageCalendarDelete","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"create":{"anyOf":[{"$ref":"#/$defs/ManageCalendarCreate"},{"type":"null"}],"default":null,"description":"A calendar event (one RRULE for a series, in the event's time zone), tied to records. The same `key` returns the first event."},"change":{"anyOf":[{"$ref":"#/$defs/ManageCalendarChange"},{"type":"null"}],"default":null,"description":"Change the fields sent; `expected_version` makes it conditional."},"change_occurrence":{"anyOf":[{"$ref":"#/$defs/ManageCalendarChangeOccurrence"},{"type":"null"}],"default":null,"description":"Edit or cancel one instance of a recurring event, named by the start its rule gives it; the rest of the series is kept."},"delete":{"anyOf":[{"$ref":"#/$defs/ManageCalendarDelete"},{"type":"null"}],"default":null,"description":"Delete a calendar event (the whole series)."},"attendee_records":{"anyOf":[{"$ref":"#/$defs/ManageCalendarAttendeeRecords"},{"type":"null"}],"default":null,"description":"Find, or create, a record of the given people type for each attendee who is not a member, and tie them to the event. Attendees whose match waits for review are listed, not tied."}},"title":"manage_calendarArguments","type":"object"},"outputSchema":{"$defs":{"CalendarAttendee":{"additionalProperties":false,"properties":{"email":{"maxLength":320,"minLength":3,"title":"Email","type":"string"},"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Principal Id"},"response":{"default":"needs_action","enum":["needs_action","accepted","declined","tentative"],"title":"Response","type":"string"}},"required":["email"],"title":"CalendarAttendee","type":"object"},"CalendarAttendeeRecordsResult":{"additionalProperties":false,"properties":{"event":{"$ref":"#/$defs/CalendarEvent"},"matched":{"default":[],"description":"Records identity resolution found for an attendee.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Matched","type":"array"},"created":{"default":[],"description":"Records created for attendees nobody had.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Created","type":"array"},"in_review":{"default":[],"description":"Attendee emails whose match waits for a person (an identity review); left untied.","items":{"type":"string"},"title":"In Review","type":"array"}},"required":["event"],"title":"CalendarAttendeeRecordsResult","type":"object"},"CalendarEvent":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"schedule":{"$ref":"#/$defs/CalendarSchedule"},"attendees":{"default":[],"items":{"$ref":"#/$defs/CalendarAttendee"},"title":"Attendees","type":"array"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"visibility":{"$ref":"#/$defs/Visibility","default":"principal"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","schedule","created"],"title":"CalendarEvent","type":"object"},"CalendarOccurrenceOverride":{"additionalProperties":false,"description":"One instance of a recurring event edited on its own. It stands in for the instance the\nrule generates at `original_starts_at`; a field left out follows the series.","properties":{"original_starts_at":{"description":"The start the rule gives the instance: the key of the edit.","format":"date-time","title":"Original Starts At","type":"string"},"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"location":{"anyOf":[{"description":"Where the event takes place: an address or a room, as written.","maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"conference_url":{"anyOf":[{"description":"The HTTPS link to join the event online, kept with its query.","maxLength":8192,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conference Url"},"color":{"anyOf":[{"description":"A colour token the app maps to a colour.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"}},"required":["original_starts_at","starts_at","ends_at"],"title":"CalendarOccurrenceOverride","type":"object"},"CalendarSchedule":{"additionalProperties":false,"properties":{"starts_at":{"format":"date-time","title":"Starts At","type":"string"},"ends_at":{"format":"date-time","title":"Ends At","type":"string"},"all_day":{"default":false,"title":"All Day","type":"boolean"},"timezone":{"anyOf":[{"maxLength":64,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The IANA zone a recurrence is expanded in (UTC when left out), so instances keep their\nlocal time across daylight-saving changes.","title":"Timezone"},"rrule":{"anyOf":[{"maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"One RFC 5545 RRULE (DAILY, WEEKLY, MONTHLY or YEARLY; UNTIL in UTC).","title":"Rrule"},"exdates":{"default":[],"description":"Instance starts left out of the series.","items":{"format":"date-time","type":"string"},"maxItems":500,"title":"Exdates","type":"array"},"overrides":{"default":[],"description":"Instances edited on their own, each keyed by a start the rule generates. An instance\nalso in `exdates` stays left out.","items":{"$ref":"#/$defs/CalendarOccurrenceOverride"},"maxItems":100,"title":"Overrides","type":"array"}},"required":["starts_at","ends_at"],"title":"CalendarSchedule","type":"object"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/CalendarEvent"},{"$ref":"#/$defs/Done"},{"$ref":"#/$defs/CalendarAttendeeRecordsResult"}],"title":"Result"}},"required":["result"],"title":"manage_calendarOutput","type":"object"},"annotations":{"title":"Manage the calendar","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"meetings","title":"Meetings","description":"List recorded meetings, read one meeting with recap, transcript and follow-up tasks, and search meeting transcripts. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"MeetingsGet":{"additionalProperties":false,"properties":{"meeting_id":{"description":"The meeting's id (an activity).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"transcript_offset":{"default":0,"description":"Character offset into the transcript.","minimum":0,"title":"Transcript Offset","type":"integer"},"transcript_limit":{"default":12000,"description":"Maximum transcript characters to return.","maximum":50000,"minimum":1,"title":"Transcript Limit","type":"integer"}},"required":["meeting_id"],"title":"MeetingsGet","type":"object"},"MeetingsQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"occurred_after":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Occurred After"},"occurred_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Occurred Before"},"attendee":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Attendee"},"linked":{"default":"all","enum":["all","linked","unlinked"],"title":"Linked","type":"string"}},"title":"MeetingsQuery","type":"object"},"MeetingsSearchTranscripts":{"additionalProperties":false,"properties":{"query":{"maxLength":200,"minLength":1,"title":"Query","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"occurred_after":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Occurred After"},"occurred_before":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Occurred Before"},"limit":{"default":20,"maximum":50,"minimum":1,"title":"Limit","type":"integer"},"snippets_per_meeting":{"default":3,"maximum":10,"minimum":1,"title":"Snippets Per Meeting","type":"integer"}},"required":["query"],"title":"MeetingsSearchTranscripts","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/MeetingsQuery"},{"type":"null"}],"default":null,"description":"List meetings newest first, with date range, record, attendee, text search or linked filters. Private meetings not opened for the caller show only metadata (`redacted=true`) unless filtering by text or attendee."},"get":{"anyOf":[{"$ref":"#/$defs/MeetingsGet"},{"type":"null"}],"default":null,"description":"One meeting with attendees, recap summary, transcript window and visible follow-up action items."},"search_transcripts":{"anyOf":[{"$ref":"#/$defs/MeetingsSearchTranscripts"},{"type":"null"}],"default":null,"description":"Search transcript text across meetings the caller can open."}},"title":"meetingsArguments","type":"object"},"outputSchema":{"$defs":{"Activity":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"description":"Registered kind, e.g. `email`, `meeting`, `call`, `message`, `note`, `task`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"description":"Every record the activity is about.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"document_ids":{"description":"Knowledge documents the activity is about (a comment on a page); it is visible only to\nwho can see them all.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Document Ids","type":"array","uniqueItems":true},"properties":{"type":"object","additionalProperties":true,"description":"Kind-specific facts (a meeting's attendees, a call's duration). Core stores them; the\nkind's owner interprets them.","title":"Properties"},"status":{"anyOf":[{"$ref":"#/$defs/ActivityStatus"},{"type":"null"}],"default":null,"description":"For actionable activities (tasks, follow-ups); None for what simply happened."},"start_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the work starts (a task's span on a timeline); never after `due_at`.","title":"Start At"},"due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Due At"},"assignee_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"},"mentions":{"description":"People mentioned in a note or comment; members among them are notified.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Mentions","type":"array","uniqueItems":true},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The task project (a workspace item) a task belongs to.","title":"Project Id"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A task's custom status (a workspace task status); `status` is its lifecycle.","title":"Stage"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Order on a board, among the activities of one stage.","title":"Position"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity this one answers: a comment on a task, a reply to a comment.","title":"Parent Id"},"priority":{"anyOf":[{"$ref":"#/$defs/ActivityPriority"},{"type":"null"}],"default":null},"pinned":{"default":false,"description":"Kept at the top of a record's history.","title":"Pinned","type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Set by Core when the status becomes `done`, cleared when it leaves `done`.","title":"Completed At"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Archived activities stay readable but leave default listings.","title":"Archived At"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"shared_with":{"description":"Members besides its owner who open a private activity (a shared meeting).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"source":{"$ref":"#/$defs/SourceRef"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"description":"Counts the activity's writes; pass it as `ActivityChange.expected_version` to change\nonly the version you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","kind","occurred_at","source","created"],"title":"Activity","type":"object"},"ActivityPriority":{"description":"Ranked as declared: a list ordered by priority puts `urgent` above `low`.","enum":["low","normal","high","urgent"],"title":"ActivityPriority","type":"string"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"MeetingAttendee":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"email":{"anyOf":[{"maxLength":320,"minLength":3,"type":"string"},{"type":"null"}],"default":null,"title":"Email"},"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Set when the attendee is a member.","title":"Principal Id"}},"title":"MeetingAttendee","type":"object"},"MeetingDetail":{"additionalProperties":false,"description":"One meeting with recap, transcript window, attendees and visible follow-up tasks.","properties":{"meeting_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"ended_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Ended At"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"summary_status":{"anyOf":[{"$ref":"#/$defs/MeetingSummaryStatus"},{"type":"null"}],"default":null},"attendees":{"default":[],"items":{"$ref":"#/$defs/MeetingAttendee"},"title":"Attendees","type":"array"},"utterances":{"default":[],"items":{"$ref":"#/$defs/MeetingUtterance"},"title":"Utterances","type":"array"},"transcript":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Transcript"},"transcript_total_chars":{"default":0,"minimum":0,"title":"Transcript Total Chars","type":"integer"},"transcript_truncated":{"default":false,"title":"Transcript Truncated","type":"boolean"},"next_transcript_offset":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Next Transcript Offset"},"recording_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Recording File Id"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"action_items":{"default":[],"items":{"$ref":"#/$defs/Activity"},"title":"Action Items","type":"array"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["meeting_id","occurred_at"],"title":"MeetingDetail","type":"object"},"MeetingListItem":{"additionalProperties":false,"description":"One meeting in a list; `redacted=True` when private and not opened for the caller.","properties":{"meeting_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"ended_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Ended At"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"summary_status":{"anyOf":[{"$ref":"#/$defs/MeetingSummaryStatus"},{"type":"null"}],"default":null},"attendees":{"default":[],"items":{"$ref":"#/$defs/MeetingAttendee"},"title":"Attendees","type":"array"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"recording_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Recording File Id"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"has_transcript":{"default":false,"title":"Has Transcript","type":"boolean"},"redacted":{"default":false,"title":"Redacted","type":"boolean"}},"required":["meeting_id","occurred_at"],"title":"MeetingListItem","type":"object"},"MeetingPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"items":{"default":[],"items":{"$ref":"#/$defs/MeetingListItem"},"title":"Items","type":"array"}},"title":"MeetingPage","type":"object"},"MeetingSummaryStatus":{"description":"Where a meeting's summary stands.","enum":["pending","ready","failed"],"title":"MeetingSummaryStatus","type":"string"},"MeetingTranscriptMatch":{"additionalProperties":false,"properties":{"meeting_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Meeting Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"attendees":{"default":[],"items":{"$ref":"#/$defs/MeetingAttendee"},"title":"Attendees","type":"array"},"snippets":{"default":[],"items":{"$ref":"#/$defs/TranscriptSnippet"},"title":"Snippets","type":"array"}},"required":["meeting_id","occurred_at"],"title":"MeetingTranscriptMatch","type":"object"},"MeetingTranscriptSearchResult":{"additionalProperties":false,"properties":{"items":{"default":[],"items":{"$ref":"#/$defs/MeetingTranscriptMatch"},"title":"Items","type":"array"},"total":{"default":0,"minimum":0,"title":"Total","type":"integer"},"limited":{"default":false,"title":"Limited","type":"boolean"}},"title":"MeetingTranscriptSearchResult","type":"object"},"MeetingUtterance":{"additionalProperties":false,"properties":{"speaker":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Speaker"},"text":{"maxLength":1000000,"title":"Text","type":"string"},"start_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"From the start of the recording.","title":"Start Seconds"},"end_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"title":"End Seconds"}},"required":["text"],"title":"MeetingUtterance","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TranscriptSnippet":{"additionalProperties":false,"description":"One matching utterance or line from a meeting transcript.","properties":{"speaker":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Speaker"},"text":{"maxLength":1000000,"title":"Text","type":"string"},"start_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Start Seconds"},"end_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"End Seconds"}},"required":["text"],"title":"TranscriptSnippet","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/MeetingPage"},{"$ref":"#/$defs/MeetingDetail"},{"$ref":"#/$defs/MeetingTranscriptSearchResult"}],"title":"Result"}},"required":["result"],"title":"meetingsOutput","type":"object"},"annotations":{"title":"Meetings","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"knowledge","title":"Knowledge","description":"What the workspace knows about its records: facts, commitments and memories, each record's summary page, questions about a record, relationship strength, and alerts on what needs attention. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"KnowledgeAlerts":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"include_dismissed":{"default":false,"title":"Include Dismissed","type":"boolean"}},"title":"KnowledgeAlerts","type":"object"},"KnowledgeAsk":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"question":{"maxLength":1000000,"minLength":1,"title":"Question","type":"string"}},"required":["record_id","question"],"title":"KnowledgeAsk","type":"object"},"KnowledgeCommitments":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"KnowledgeCommitments","type":"object"},"KnowledgeGet":{"additionalProperties":false,"properties":{"item_id":{"description":"The knowledge item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"}},"required":["item_id"],"title":"KnowledgeGet","type":"object"},"KnowledgeQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"kind":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"fact_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Fact Type"},"subject_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Subject Record Id"},"include_inactive":{"default":false,"description":"Also superseded and retracted items.","title":"Include Inactive","type":"boolean"}},"title":"KnowledgeQuery","type":"object"},"KnowledgeRelationship":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"KnowledgeRelationship","type":"object"},"KnowledgeSummary":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"KnowledgeSummary","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/KnowledgeQuery"},{"type":"null"}],"default":null,"description":"Knowledge items by record, kind or status, newest first."},"get":{"anyOf":[{"$ref":"#/$defs/KnowledgeGet"},{"type":"null"}],"default":null,"description":"One knowledge item."},"summary":{"anyOf":[{"$ref":"#/$defs/KnowledgeSummary"},{"type":"null"}],"default":null,"description":"How a record is doing in one page: status, people, open commitments, facts, recent activity and the next step, limited to what the caller may see."},"ask":{"anyOf":[{"$ref":"#/$defs/KnowledgeAsk"},{"type":"null"}],"default":null,"description":"Answer a question about one record from its summary page and the knowledge the caller may see, citing the lines it rests on (off unless the workspace turned record questions on)."},"alerts":{"anyOf":[{"$ref":"#/$defs/KnowledgeAlerts"},{"type":"null"}],"default":null,"description":"What needs attention: overdue commitments and tasks, and relationships gone quiet, on records the caller can see, newest first."},"relationship":{"anyOf":[{"$ref":"#/$defs/KnowledgeRelationship"},{"type":"null"}],"default":null,"description":"How warm a record's relationship is (0 to 1) from its recent activity, with its last interaction."},"commitments":{"anyOf":[{"$ref":"#/$defs/KnowledgeCommitments"},{"type":"null"}],"default":null,"description":"A record's dated commitments, open and expired, soonest due first."}},"title":"knowledgeArguments","type":"object"},"outputSchema":{"$defs":{"CommitmentState":{"description":"Where a dated commitment stands, as the gold sweep last saw it.","enum":["open","expired","done","cancelled"],"title":"CommitmentState","type":"string"},"GoldAlert":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"kind":{"$ref":"#/$defs/GoldAlertKind"},"subject_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The commitment or task the alert is about, when there is one.","title":"Subject Id"},"detail":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Detail"},"raised_at":{"format":"date-time","title":"Raised At","type":"string"},"dismissed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Dismissed At"}},"required":["id","tenant_id","record_id","kind","raised_at"],"title":"GoldAlert","type":"object"},"GoldAlertKind":{"description":"What the gold sweep flags about a record.","enum":["commitment_overdue","task_overdue","quiet"],"title":"GoldAlertKind","type":"string"},"GoldAlertPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"alerts":{"default":[],"items":{"$ref":"#/$defs/GoldAlert"},"title":"Alerts","type":"array"}},"title":"GoldAlertPage","type":"object"},"GoldAnswer":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"answer":{"description":"Empty when the page and knowledge the caller may see do not say.","maxLength":1000000,"title":"Answer","type":"string"},"sources":{"default":[],"description":"The lines and items the answer rests on, all of them visible to the caller.","items":{"$ref":"#/$defs/GoldSource"},"title":"Sources","type":"array"}},"required":["record_id","answer"],"title":"GoldAnswer","type":"object"},"GoldLine":{"additionalProperties":false,"properties":{"section":{"$ref":"#/$defs/GoldSection"},"text":{"maxLength":1000000,"title":"Text","type":"string"},"source_type":{"description":"`record`, `activity` or `knowledge`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Source Type","type":"string"},"source_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Id","type":"string"},"record_ids":{"description":"The records the source is tied to: a reader must see them all.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"}},"required":["section","text","source_type","source_id"],"title":"GoldLine","type":"object"},"GoldPage":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"lines":{"default":[],"items":{"$ref":"#/$defs/GoldLine"},"title":"Lines","type":"array"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"Prose over every line; given only to readers who may see every line.","title":"Summary"},"compacted_at":{"format":"date-time","title":"Compacted At","type":"string"},"stale":{"default":false,"description":"Something changed since it was compacted; it is compacted again shortly.","title":"Stale","type":"boolean"}},"required":["record_id","tenant_id","object_type","compacted_at"],"title":"GoldPage","type":"object"},"GoldSection":{"description":"The parts of a record's gold page, in reading order.","enum":["status","people","commitments","facts","activity","next_step"],"title":"GoldSection","type":"string"},"GoldSource":{"additionalProperties":false,"properties":{"source_type":{"description":"`record`, `activity` or `knowledge`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Source Type","type":"string"},"source_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Id","type":"string"}},"required":["source_type","source_id"],"title":"GoldSource","type":"object"},"KnowledgeItem":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"description":"Registered kind, e.g. `fact`, `commitment`, `document`, `memory`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"fact_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Registered sub-type within the kind, e.g. `timeline`.","title":"Fact Type"},"subject_record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Subject Record Ids","type":"array","uniqueItems":true},"content":{"maxLength":1000000,"title":"Content","type":"string"},"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Structured form of the content, shaped by the kind.","title":"Value"},"confidence":{"maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Required when visibility is `principal`.","title":"Owner Id"},"status":{"$ref":"#/$defs/KnowledgeStatus","default":"active"},"superseded_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Superseded By"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"},"provenance":{"$ref":"#/$defs/Provenance"},"source_event_id":{"anyOf":[{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The Core event the item was extracted from; the start of its provenance chain.","title":"Source Event Id"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["id","tenant_id","kind","content","confidence","provenance","created_at","updated_at"],"title":"KnowledgeItem","type":"object"},"KnowledgePage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"items":{"default":[],"items":{"$ref":"#/$defs/KnowledgeItem"},"title":"Items","type":"array"}},"title":"KnowledgePage","type":"object"},"KnowledgeStatus":{"enum":["active","superseded","retracted"],"title":"KnowledgeStatus","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordCommitments":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"commitments":{"default":[],"description":"Soonest due first.","items":{"$ref":"#/$defs/TrackedCommitment"},"title":"Commitments","type":"array"}},"required":["record_id"],"title":"RecordCommitments","type":"object"},"RelationshipStrength":{"additionalProperties":false,"description":"How warm a record's relationship is, from its recent activity.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"strength":{"description":"1 is contact in every week of the window, recent weeks weighing more; 0 is none.","maximum":1.0,"minimum":0.0,"title":"Strength","type":"number"},"interactions":{"description":"Tenant-wide activities in the strength window.","minimum":0,"title":"Interactions","type":"integer"},"last_interaction_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Interaction At"},"computed_at":{"description":"When the sweep last found different values (a sweep that finds the same writes nothing).","format":"date-time","title":"Computed At","type":"string"}},"required":["record_id","strength","interactions","computed_at"],"title":"RelationshipStrength","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TrackedCommitment":{"additionalProperties":false,"description":"A tenant-wide commitment with a due date (`value.due_at`), as the gold sweep tracks it.","properties":{"id":{"description":"The commitment's knowledge item id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"record_ids":{"default":[],"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"content":{"maxLength":1000000,"title":"Content","type":"string"},"due_at":{"format":"date-time","title":"Due At","type":"string"},"state":{"$ref":"#/$defs/CommitmentState"},"expired_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Expired At"},"checked_at":{"format":"date-time","title":"Checked At","type":"string"},"set_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"The person who last marked it done, cancelled or open."},"set_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Set At"}},"required":["id","content","due_at","state","checked_at"],"title":"TrackedCommitment","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/KnowledgePage"},{"$ref":"#/$defs/KnowledgeItem"},{"$ref":"#/$defs/GoldPage"},{"$ref":"#/$defs/GoldAnswer"},{"$ref":"#/$defs/GoldAlertPage"},{"$ref":"#/$defs/RelationshipStrength"},{"$ref":"#/$defs/RecordCommitments"}],"title":"Result"}},"required":["result"],"title":"knowledgeOutput","type":"object"},"annotations":{"title":"Knowledge","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_knowledge","title":"Manage knowledge","description":"Remember and retract knowledge, refresh a record's summary page, and settle alerts and commitments. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"CommitmentState":{"description":"Where a dated commitment stands, as the gold sweep last saw it.","enum":["open","expired","done","cancelled"],"title":"CommitmentState","type":"string"},"ManageKnowledgeCapture":{"additionalProperties":false,"properties":{"kind":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"fact_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Fact Type"},"subject_record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Subject Record Ids","type":"array","uniqueItems":true},"content":{"maxLength":1000000,"minLength":1,"title":"Content","type":"string"},"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Value"},"confidence":{"default":1.0,"maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"source_event_id":{"anyOf":[{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Source Event Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["kind","content"],"title":"ManageKnowledgeCapture","type":"object"},"ManageKnowledgeDismissAlert":{"additionalProperties":false,"properties":{"alert_id":{"description":"The alert.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Alert Id","type":"string"}},"required":["alert_id"],"title":"ManageKnowledgeDismissAlert","type":"object"},"ManageKnowledgeRefreshSummary":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"ManageKnowledgeRefreshSummary","type":"object"},"ManageKnowledgeRetract":{"additionalProperties":false,"properties":{"item_id":{"description":"The knowledge item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"}},"required":["item_id"],"title":"ManageKnowledgeRetract","type":"object"},"ManageKnowledgeSetCommitmentState":{"additionalProperties":false,"properties":{"commitment_id":{"description":"The commitment.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Commitment Id","type":"string"},"state":{"$ref":"#/$defs/CommitmentState"}},"required":["commitment_id","state"],"title":"ManageKnowledgeSetCommitmentState","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"capture":{"anyOf":[{"$ref":"#/$defs/ManageKnowledgeCapture"},{"type":"null"}],"default":null,"description":"Remember a fact, commitment, document or memory, tied to records. The same knowledge again returns the stored item."},"retract":{"anyOf":[{"$ref":"#/$defs/ManageKnowledgeRetract"},{"type":"null"}],"default":null,"description":"Mark a knowledge item as no longer true."},"refresh_summary":{"anyOf":[{"$ref":"#/$defs/ManageKnowledgeRefreshSummary"},{"type":"null"}],"default":null,"description":"Rebuild a record's summary page now."},"dismiss_alert":{"anyOf":[{"$ref":"#/$defs/ManageKnowledgeDismissAlert"},{"type":"null"}],"default":null,"description":"Dismiss an alert."},"set_commitment_state":{"anyOf":[{"$ref":"#/$defs/ManageKnowledgeSetCommitmentState"},{"type":"null"}],"default":null,"description":"Mark a tracked commitment done or cancelled, or reopen it."}},"title":"manage_knowledgeArguments","type":"object"},"outputSchema":{"$defs":{"CommitmentState":{"description":"Where a dated commitment stands, as the gold sweep last saw it.","enum":["open","expired","done","cancelled"],"title":"CommitmentState","type":"string"},"GoldAlert":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"kind":{"$ref":"#/$defs/GoldAlertKind"},"subject_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The commitment or task the alert is about, when there is one.","title":"Subject Id"},"detail":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Detail"},"raised_at":{"format":"date-time","title":"Raised At","type":"string"},"dismissed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Dismissed At"}},"required":["id","tenant_id","record_id","kind","raised_at"],"title":"GoldAlert","type":"object"},"GoldAlertKind":{"description":"What the gold sweep flags about a record.","enum":["commitment_overdue","task_overdue","quiet"],"title":"GoldAlertKind","type":"string"},"GoldLine":{"additionalProperties":false,"properties":{"section":{"$ref":"#/$defs/GoldSection"},"text":{"maxLength":1000000,"title":"Text","type":"string"},"source_type":{"description":"`record`, `activity` or `knowledge`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Source Type","type":"string"},"source_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Id","type":"string"},"record_ids":{"description":"The records the source is tied to: a reader must see them all.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"}},"required":["section","text","source_type","source_id"],"title":"GoldLine","type":"object"},"GoldPage":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"lines":{"default":[],"items":{"$ref":"#/$defs/GoldLine"},"title":"Lines","type":"array"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"Prose over every line; given only to readers who may see every line.","title":"Summary"},"compacted_at":{"format":"date-time","title":"Compacted At","type":"string"},"stale":{"default":false,"description":"Something changed since it was compacted; it is compacted again shortly.","title":"Stale","type":"boolean"}},"required":["record_id","tenant_id","object_type","compacted_at"],"title":"GoldPage","type":"object"},"GoldSection":{"description":"The parts of a record's gold page, in reading order.","enum":["status","people","commitments","facts","activity","next_step"],"title":"GoldSection","type":"string"},"KnowledgeItem":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"description":"Registered kind, e.g. `fact`, `commitment`, `document`, `memory`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"fact_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Registered sub-type within the kind, e.g. `timeline`.","title":"Fact Type"},"subject_record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Subject Record Ids","type":"array","uniqueItems":true},"content":{"maxLength":1000000,"title":"Content","type":"string"},"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Structured form of the content, shaped by the kind.","title":"Value"},"confidence":{"maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Required when visibility is `principal`.","title":"Owner Id"},"status":{"$ref":"#/$defs/KnowledgeStatus","default":"active"},"superseded_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Superseded By"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"},"provenance":{"$ref":"#/$defs/Provenance"},"source_event_id":{"anyOf":[{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The Core event the item was extracted from; the start of its provenance chain.","title":"Source Event Id"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["id","tenant_id","kind","content","confidence","provenance","created_at","updated_at"],"title":"KnowledgeItem","type":"object"},"KnowledgeStatus":{"enum":["active","superseded","retracted"],"title":"KnowledgeStatus","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TrackedCommitment":{"additionalProperties":false,"description":"A tenant-wide commitment with a due date (`value.due_at`), as the gold sweep tracks it.","properties":{"id":{"description":"The commitment's knowledge item id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"record_ids":{"default":[],"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"content":{"maxLength":1000000,"title":"Content","type":"string"},"due_at":{"format":"date-time","title":"Due At","type":"string"},"state":{"$ref":"#/$defs/CommitmentState"},"expired_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Expired At"},"checked_at":{"format":"date-time","title":"Checked At","type":"string"},"set_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"The person who last marked it done, cancelled or open."},"set_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Set At"}},"required":["id","content","due_at","state","checked_at"],"title":"TrackedCommitment","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/KnowledgeItem"},{"$ref":"#/$defs/GoldPage"},{"$ref":"#/$defs/GoldAlert"},{"$ref":"#/$defs/TrackedCommitment"}],"title":"Result"}},"required":["result"],"title":"manage_knowledgeOutput","type":"object"},"annotations":{"title":"Manage knowledge","readOnlyHint":false,"destructiveHint":false,"openWorldHint":false}},{"name":"documents","title":"Documents","description":"The knowledge base and the wiki: pages and folders in Markdown, their links, the caller's bookmarks, imports and wiki health. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"DocumentKind":{"enum":["folder","page"],"title":"DocumentKind","type":"string"},"DocumentReviewStatus":{"enum":["pending","approved","rejected","changes_requested"],"title":"DocumentReviewStatus","type":"string"},"DocumentSpace":{"enum":["kb","wiki"],"title":"DocumentSpace","type":"string"},"DocumentsBacklinks":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"required":["document_id"],"title":"DocumentsBacklinks","type":"object"},"DocumentsBookmarks":{"additionalProperties":false,"properties":{},"title":"DocumentsBookmarks","type":"object"},"DocumentsBySlug":{"additionalProperties":false,"properties":{"space":{"$ref":"#/$defs/DocumentSpace","description":"kb or wiki."},"slug":{"description":"The page's slug.","maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","title":"Slug","type":"string"}},"required":["space","slug"],"title":"DocumentsBySlug","type":"object"},"DocumentsGet":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"}},"required":["document_id"],"title":"DocumentsGet","type":"object"},"DocumentsImportStatus":{"additionalProperties":false,"properties":{"import_id":{"description":"The import's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Import Id","type":"string"}},"required":["import_id"],"title":"DocumentsImportStatus","type":"object"},"DocumentsImports":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"DocumentsImports","type":"object"},"DocumentsLint":{"additionalProperties":false,"properties":{},"title":"DocumentsLint","type":"object"},"DocumentsLog":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"document_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Document Id"},"space":{"anyOf":[{"$ref":"#/$defs/DocumentSpace"},{"type":"null"}],"default":null,"description":"Only documents of this space. Empty reads both."},"actor_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only changes this principal made.","title":"Actor Id"},"since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Since"},"until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Until"}},"title":"DocumentsLog","type":"object"},"DocumentsPreviewPublish":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"}},"required":["document_id"],"title":"DocumentsPreviewPublish","type":"object"},"DocumentsPreviewSharing":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null,"description":"`tenant` or `principal`; kept when left out."},"tenant_access":{"anyOf":[{"$ref":"#/$defs/AccessLevel"},{"type":"null"}],"default":null,"description":"What every member gets on a tenant-wide document; kept when left out."},"shared_with":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Shared With","type":"array","uniqueItems":true},"editors":{"description":"Members of `shared_with` who edit; the others view.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Editors","type":"array","uniqueItems":true},"cascade":{"default":false,"description":"Also apply it to every document under a folder that the caller may change.","title":"Cascade","type":"boolean"},"keep_own_sharing":{"default":false,"description":"With `cascade`, leave documents whose access already differed from the folder's (their\nown sharing) as they are.","title":"Keep Own Sharing","type":"boolean"}},"required":["document_id"],"title":"DocumentsPreviewSharing","type":"object"},"DocumentsQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or content.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"space":{"$ref":"#/$defs/DocumentSpace","default":"kb"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only this folder's documents.","title":"Parent Id"},"roots":{"default":false,"description":"Only documents at the top of the space.","title":"Roots","type":"boolean"},"slug_prefix":{"anyOf":[{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","type":"string"},{"type":"null"}],"default":null,"description":"Only documents under this slug, e.g. a wiki category.","title":"Slug Prefix"},"kind":{"anyOf":[{"$ref":"#/$defs/DocumentKind"},{"type":"null"}],"default":null},"review_status":{"anyOf":[{"$ref":"#/$defs/DocumentReviewStatus"},{"type":"null"}],"default":null,"description":"Only agent pages in this review state (the review inbox, the bin)."},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"deleted":{"default":false,"description":"The bin: documents deleted on their own (a folder's contents go with it) and agents'\nrejected pages, not yet purged, most recently binned first.","title":"Deleted","type":"boolean"}},"title":"DocumentsQuery","type":"object"},"DocumentsTrail":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"}},"required":["document_id"],"title":"DocumentsTrail","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/DocumentsQuery"},{"type":"null"}],"default":null,"description":"A folder's documents in order, a space's newest first, a wiki category (slug_prefix), search, deleted ones, or the pages waiting for review."},"get":{"anyOf":[{"$ref":"#/$defs/DocumentsGet"},{"type":"null"}],"default":null,"description":"One document with its Markdown content."},"by_slug":{"anyOf":[{"$ref":"#/$defs/DocumentsBySlug"},{"type":"null"}],"default":null,"description":"A page by its slug, e.g. procedures/onboarding, as [[links]] name it."},"trail":{"anyOf":[{"$ref":"#/$defs/DocumentsTrail"},{"type":"null"}],"default":null,"description":"A document's folders from the top of its space down to it."},"backlinks":{"anyOf":[{"$ref":"#/$defs/DocumentsBacklinks"},{"type":"null"}],"default":null,"description":"The pages that link to a page, by [[slug]] or by its id."},"bookmarks":{"anyOf":[{"$ref":"#/$defs/DocumentsBookmarks"},{"type":"null"}],"default":null,"description":"The caller's bookmarked documents, in their order."},"imports":{"anyOf":[{"$ref":"#/$defs/DocumentsImports"},{"type":"null"}],"default":null,"description":"Markdown imports, newest first."},"import_status":{"anyOf":[{"$ref":"#/$defs/DocumentsImportStatus"},{"type":"null"}],"default":null,"description":"One Markdown import's progress."},"lint":{"anyOf":[{"$ref":"#/$defs/DocumentsLint"},{"type":"null"}],"default":null,"description":"The wiki's problems: broken links, orphan and stale pages."},"log":{"anyOf":[{"$ref":"#/$defs/DocumentsLog"},{"type":"null"}],"default":null,"description":"Who changed documents (one, or a space's) and which fields, newest first, among those the caller opens."},"preview_publish":{"anyOf":[{"$ref":"#/$defs/DocumentsPreviewPublish"},{"type":"null"}],"default":null,"description":"What making a document public would publish (a folder publishes its subtree) and what blocks it; nothing changes."},"preview_sharing":{"anyOf":[{"$ref":"#/$defs/DocumentsPreviewSharing"},{"type":"null"}],"default":null,"description":"Who would start or stop opening or editing a document if it were shared this way (needs the right to share it); nothing changes."}},"title":"documentsArguments","type":"object"},"outputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AgentRef":{"additionalProperties":false,"description":"The agent a request was made for (ADR 0031 section 4, `Principal.agent`): set by the agent\nhost's turn authority from the deployment's agent, so the agent's use scope applies to the\ncalls it makes into Core.","properties":{"agent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The agent's home tenant, when it differs from the caller's: a shared Morphic AI\ndeployment is owned by the operator tenant while its turns act in each workspace\n(ADR 0040). `None` reads the agent's scope in the caller's tenant, as before.","title":"Tenant Id"}},"required":["agent_id"],"title":"AgentRef","type":"object"},"AppKind":{"description":"What reaches the workspace (ADR 0031).","enum":["frontend","mcp_client","api_key"],"title":"AppKind","type":"string"},"AppRef":{"additionalProperties":false,"description":"The app a request came through (attribution, ADR 0031 section 2).","properties":{"app_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"App Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"kind":{"$ref":"#/$defs/AppKind"},"first_party":{"default":false,"description":"Declared by the deployment (`MORPHIC_CORE_FIRST_PARTY_APPS`): attributed, never listed.","title":"First Party","type":"boolean"}},"required":["app_id","name","kind"],"title":"AppRef","type":"object"},"Document":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"space":{"$ref":"#/$defs/DocumentSpace"},"kind":{"$ref":"#/$defs/DocumentKind"},"title":{"maxLength":256,"minLength":1,"title":"Title","type":"string"},"slug":{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","title":"Slug","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"content_markdown":{"default":"","description":"The page's text: what search, agents and `[[links]]` read, whatever else holds it.","maxLength":1000000,"title":"Content Markdown","type":"string"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The page as a rich editor keeps it, beside `content_markdown`. A write of Markdown alone\nclears it, so it never contradicts the Markdown.","title":"Body"},"links":{"description":"The slugs this page links to with `[[slug]]`.","items":{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","type":"string"},"title":"Links","type":"array","uniqueItems":true},"referenced_document_ids":{"description":"Documents this page names by id (a page mention in a rich body), as its writer says.\nBacklinks follow these and `links` alike.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Referenced Document Ids","type":"array","uniqueItems":true},"record_ids":{"description":"Records the document is about; it is visible only to who can see them all.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant","description":"`tenant`: every member opens it, at `tenant_access`; `principal`: only its owner and\nthe members it is shared with."},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"tenant_access":{"$ref":"#/$defs/AccessLevel","default":"write","description":"What every member gets on a tenant-wide document: `write` (everyone edits) or `read`\n(everyone views; its owner and `editors` edit). A read-only one needs an owner."},"public":{"default":false,"description":"Readable by anyone with its link, without signing in. A public folder publishes what is\nunder it too: each tenant-wide, approved document about no record, through folders that\nare all such.","title":"Public","type":"boolean"},"shared_with":{"description":"Members besides its owner given access by name: they see it even when it is private.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"editors":{"description":"Members of `shared_with` who also edit it; the others only view it.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Editors","type":"array","uniqueItems":true},"cover_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Cover File Id"},"review":{"anyOf":[{"$ref":"#/$defs/DocumentReview"},{"type":"null"}],"default":null},"suggestion":{"anyOf":[{"$ref":"#/$defs/DocumentSuggestion"},{"type":"null"}],"default":null},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"deleted_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"Who put it in the bin: deleted it, or rejected it (an agent's page)."},"deleted_with":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The folder whose delete took it along; restoring that folder brings it back.","title":"Deleted With"},"cascade_count":{"default":0,"description":"On a deleted folder: how many documents its delete took along.","minimum":0,"title":"Cascade Count","type":"integer"},"purge_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When it leaves the bin for good.","title":"Purge At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"source":{"anyOf":[{"$ref":"#/$defs/DocumentSource"},{"type":"null"}],"default":null,"description":"Set for documents a connector keeps current."},"source_folder":{"anyOf":[{"$ref":"#/$defs/DocumentFolderSource"},{"type":"null"}],"default":null,"description":"Set for the private folders a connector's pages are filed under."},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","space","kind","title","slug","created"],"title":"Document","type":"object"},"DocumentBookmarks":{"additionalProperties":false,"description":"A person's bookmarked documents, in their order.","properties":{"document_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Document Ids","type":"array"}},"title":"DocumentBookmarks","type":"object"},"DocumentFolderSource":{"additionalProperties":false,"description":"The source scope a connector-created folder belongs to. The folder's title can name the\nrepository, so it is hidden with the scope's pages (never writable through a public change).","properties":{"source":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source","type":"string"},"external_account_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"External Account Id","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Collection Id"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"}},"required":["source","external_account_id","owner_id"],"title":"DocumentFolderSource","type":"object"},"DocumentImportItemError":{"additionalProperties":false,"properties":{"path":{"maxLength":500,"minLength":1,"title":"Path","type":"string"},"error":{"$ref":"#/$defs/ErrorInfo"}},"required":["path","error"],"title":"DocumentImportItemError","type":"object"},"DocumentImportPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"imports":{"default":[],"items":{"$ref":"#/$defs/DocumentImportRun"},"title":"Imports","type":"array"}},"title":"DocumentImportPage","type":"object"},"DocumentImportRun":{"additionalProperties":false,"description":"A knowledge-base import processed in the background.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"status":{"$ref":"#/$defs/TransferStatus","default":"pending"},"space":{"$ref":"#/$defs/DocumentSpace"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"file_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"File Ids","type":"array"},"requester":{"$ref":"#/$defs/Principal"},"total_files":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Total Files"},"processed_files":{"default":0,"minimum":0,"title":"Processed Files","type":"integer"},"folders_created":{"default":0,"minimum":0,"title":"Folders Created","type":"integer"},"pages_created":{"default":0,"minimum":0,"title":"Pages Created","type":"integer"},"pages_updated":{"default":0,"minimum":0,"title":"Pages Updated","type":"integer"},"failed":{"default":0,"minimum":0,"title":"Failed","type":"integer"},"errors":{"default":[],"items":{"$ref":"#/$defs/DocumentImportItemError"},"title":"Errors","type":"array"},"cursor":{"default":0,"minimum":0,"title":"Cursor","type":"integer"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null},"created_at":{"format":"date-time","title":"Created At","type":"string"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","key","space","requester","created_at"],"title":"DocumentImportRun","type":"object"},"DocumentKind":{"enum":["folder","page"],"title":"DocumentKind","type":"string"},"DocumentLogEntry":{"additionalProperties":false,"description":"One write of a document: who, when, and the fields that moved.","properties":{"event_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"document_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"action":{"$ref":"#/$defs/EventType"},"space":{"$ref":"#/$defs/DocumentSpace"},"kind":{"$ref":"#/$defs/DocumentKind"},"title":{"description":"The document's title now.","maxLength":256,"minLength":1,"title":"Title","type":"string"},"actor":{"$ref":"#/$defs/PrincipalRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"version":{"minimum":1,"title":"Version","type":"integer"},"changes":{"default":[],"description":"The names of the fields the write changed, never their values. Empty when it was\ncreated, or the write predates field names in events.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Changes","type":"array"}},"required":["event_id","document_id","action","space","kind","title","actor","occurred_at","version"],"title":"DocumentLogEntry","type":"object"},"DocumentLogPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"entries":{"default":[],"items":{"$ref":"#/$defs/DocumentLogEntry"},"title":"Entries","type":"array"}},"title":"DocumentLogPage","type":"object"},"DocumentPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"documents":{"default":[],"items":{"$ref":"#/$defs/Document"},"title":"Documents","type":"array"},"children_count":{"description":"On a list (`POST /core/v1/documents/query`): per folder returned, how many live documents\nit holds that the caller opens by their sharing (rejected pages aside). A folder with none is\nleft out.","patternProperties":{"^\\S+$":{"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Children Count","type":"object"}},"title":"DocumentPage","type":"object"},"DocumentPublishBlock":{"description":"Why a document cannot be made public.","enum":["private","about_records","in_review","not_editable"],"title":"DocumentPublishBlock","type":"string"},"DocumentPublishPreview":{"additionalProperties":false,"description":"What making a document public would publish: itself and, for a folder, the pages under\nit that are tenant-wide, approved and about no record.","properties":{"page_count":{"default":0,"minimum":0,"title":"Page Count","type":"integer"},"can_publish":{"title":"Can Publish","type":"boolean"},"block_reason":{"anyOf":[{"$ref":"#/$defs/DocumentPublishBlock"},{"type":"null"}],"default":null,"description":"Why it cannot be made public, when it cannot."}},"required":["can_publish"],"title":"DocumentPublishPreview","type":"object"},"DocumentReview":{"additionalProperties":false,"properties":{"status":{"$ref":"#/$defs/DocumentReviewStatus","default":"pending"},"author":{"$ref":"#/$defs/PrincipalRef"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"What the author says the page is for.","title":"Summary"},"decided_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"decided_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Decided At"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"Why it was rejected.","title":"Reason"},"purge_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a rejected page leaves the bin for good.","title":"Purge At"}},"required":["author"],"title":"DocumentReview","type":"object"},"DocumentReviewStatus":{"enum":["pending","approved","rejected","changes_requested"],"title":"DocumentReviewStatus","type":"string"},"DocumentSharingPreview":{"additionalProperties":false,"description":"What a `DocumentSharing` would do, before it is applied. People are the members holding\n`knowledge.view` (for opening) and `knowledge.write` (for editing), by sharing alone: a\ndocument about records still needs those records to be visible.","properties":{"gains_access":{"default":[],"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Gains Access","type":"array"},"loses_access":{"default":[],"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Loses Access","type":"array"},"gains_edit":{"default":[],"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Gains Edit","type":"array"},"loses_edit":{"default":[],"description":"Who stops editing but keeps opening it.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Loses Edit","type":"array"},"matching":{"default":0,"description":"With `cascade`: documents under the folder with the folder's access today, which follow.","minimum":0,"title":"Matching","type":"integer"},"own_sharing":{"default":0,"description":"With `cascade`: documents under the folder with access of their own, which follow unless\n`keep_own_sharing`.","minimum":0,"title":"Own Sharing","type":"integer"},"cannot_edit":{"default":0,"description":"With `cascade`: documents the caller opens but may not change, left as they are.","minimum":0,"title":"Cannot Edit","type":"integer"},"cannot_open":{"default":0,"description":"With `cascade`: documents the caller does not open, left as they are.","minimum":0,"title":"Cannot Open","type":"integer"}},"title":"DocumentSharingPreview","type":"object"},"DocumentSource":{"additionalProperties":false,"description":"Typed provenance and sync state of a document a connector keeps current. Only the source\nintake (`/core/v1/documents/source`) writes it; no public change can.","properties":{"source":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source","type":"string"},"external_account_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"External Account Id","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Collection Id"},"external_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"External Id","type":"string"},"connection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Connection Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"identity_key":{"description":"Digest of source, account, collection, external id and owner: one document per key.","pattern":"^[0-9a-f]{64}$","title":"Identity Key","type":"string"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Url"},"provider_version":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Provider Version","type":"string"},"synced_sha256":{"description":"Digest of the content the source last supplied; the page was edited when it differs.","pattern":"^[0-9a-f]{64}$","title":"Synced Sha256","type":"string"},"synced_title":{"maxLength":256,"minLength":1,"title":"Synced Title","type":"string"},"revision":{"description":"Counts applied source changes; callers fence their writes with it.","minimum":1,"title":"Revision","type":"integer"},"state":{"$ref":"#/$defs/SourceDocumentState","default":"active"},"state_changed_at":{"format":"date-time","title":"State Changed At","type":"string"},"state_reason":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"title":"State Reason"},"user_deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a person had deleted the page before the source hid it: the page stays deleted when\nthe source shows it again.","title":"User Deleted At"},"conflict":{"anyOf":[{"$ref":"#/$defs/DocumentSourceConflict"},{"type":"null"}],"default":null},"receipts":{"default":[],"items":{"$ref":"#/$defs/DocumentSourceReceipt"},"maxItems":32,"title":"Receipts","type":"array"}},"required":["source","external_account_id","external_id","connection_id","owner_id","identity_key","provider_version","synced_sha256","synced_title","revision","state_changed_at"],"title":"DocumentSource","type":"object"},"DocumentSourceConflict":{"additionalProperties":false,"description":"A source change a person's own edit blocked. Their text stays; the source's waits here.","properties":{"upstream_markdown":{"maxLength":1000000,"title":"Upstream Markdown","type":"string"},"upstream_sha256":{"pattern":"^[0-9a-f]{64}$","title":"Upstream Sha256","type":"string"},"provider_version":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Provider Version","type":"string"},"source_revision":{"minimum":1,"title":"Source Revision","type":"integer"},"detected_at":{"format":"date-time","title":"Detected At","type":"string"}},"required":["upstream_markdown","upstream_sha256","provider_version","source_revision","detected_at"],"title":"DocumentSourceConflict","type":"object"},"DocumentSourceReceipt":{"additionalProperties":false,"description":"A delivery this source document applied, kept with it so a replay is answered from the\nsame write that applied it (no crash window between change and receipt).","properties":{"delivery_id":{"maxLength":512,"minLength":1,"title":"Delivery Id","type":"string"},"fingerprint":{"pattern":"^[0-9a-f]{64}$","title":"Fingerprint","type":"string"},"outcome":{"$ref":"#/$defs/SourceDocumentOutcome"},"source_revision":{"minimum":0,"title":"Source Revision","type":"integer"}},"required":["delivery_id","fingerprint","outcome","source_revision"],"title":"DocumentSourceReceipt","type":"object"},"DocumentSpace":{"enum":["kb","wiki"],"title":"DocumentSpace","type":"string"},"DocumentSuggestion":{"additionalProperties":false,"description":"An agent's proposed new content for an approved page, waiting for a person.","properties":{"content_markdown":{"maxLength":1000000,"title":"Content Markdown","type":"string"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"author":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"}},"required":["content_markdown","author","created_at"],"title":"DocumentSuggestion","type":"object"},"DocumentTrail":{"additionalProperties":false,"description":"A document's folders from the top of its space down to it.","properties":{"ancestors":{"default":[],"items":{"$ref":"#/$defs/Document"},"title":"Ancestors","type":"array"}},"title":"DocumentTrail","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"EventType":{"description":"Every event Core publishes. See docs/modules/events.md.","enum":["tenant.created","tenant.updated","schema.changed","entity.created","entity.updated","entity.deleted","entity.history_redacted","relation.added","relation.removed","activity.recorded","activity.updated","activity.deleted","ingest.accepted","ingest.completed","source_item.accepted","source_schema.registered","acl.changed","invitation.created","invitation.accepted","invitation.updated","invitation.revoked","agent.created","agent.updated","agent.channel_changed","knowledge.created","knowledge.updated","transfer.requested","transfer.progressed","transfer.finished","document.created","document.updated","document.deleted","document_import.requested","document_import.progressed","document_import.finished","workspace_item.changed","favorite.changed","reminder.changed","field_reminder.changed","notifications.read","workspace_settings.changed","ingestion_routing.changed","ingestion.reset","ingestion.recompact","collection_entry.changed","notification.created","billing_account.changed","invoice.payment_failed","gold.alert_raised","billing_account.seats_over_limit","credits.low","credits.changed","admin.action","schema_proposal.changed","file_extraction.changed","file.changed","record_folder.changed","folder_share.changed","meeting_join_preference.changed","api_token.changed","app.created","app.changed","app.revoked","data_source.connected","data_source.changed","data_source.disconnected","client_connection.revoked","user_preference.changed","thread_read.changed","email_draft.changed","commitment.changed","audit.imported","enrichment_run.changed","enrichment_settings.changed","enrichment_field_map.changed","automation.changed","automation_run.changed"],"title":"EventType","type":"string"},"Principal":{"additionalProperties":false,"description":"A `PrincipalRef` plus what governance needs to decide on its requests.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"roles":{"description":"Role slugs in this tenant. Role definitions are tenant data, not a Core enum.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"For tokens and agents: the most the credential may do. None means role permissions only.","title":"Scopes"},"via":{"anyOf":[{"$ref":"#/$defs/AppRef"},{"type":"null"}],"default":null,"description":"The app the call came through (ADR 0031): who a request is attributed to, set by the\nauthenticator from the token's client id or the key's app. None for a host's service\ncredential and for a person whose token names no client."},"agent":{"anyOf":[{"$ref":"#/$defs/AgentRef"},{"type":"null"}],"default":null,"description":"The agent the call is made for (ADR 0031 section 4): set by the agent host's turn\nauthority from the deployment's agent. Its use scope narrows the call beside the app's.\nNone for everything else."},"data_scope":{"$ref":"#/$defs/Visibility","default":"tenant","description":"Whether the principal sees tenant-wide data or only its own (e.g. a personal agent)."}},"required":["id","kind","tenant_id"],"title":"Principal","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceDocumentOutcome":{"description":"How Core applied a delivery.","enum":["created","updated","unchanged","conflict","renamed","deleted","suspended","reauthorized","noop","duplicate"],"title":"SourceDocumentOutcome","type":"string"},"SourceDocumentState":{"description":"Whether a source document may be shown at all (`Document.source.state`).","enum":["active","source_deleted","access_suspended"],"title":"SourceDocumentState","type":"string"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TransferStatus":{"enum":["pending","running","completed","partial","failed","cancelled"],"title":"TransferStatus","type":"string"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"},"WikiLintIssue":{"additionalProperties":false,"properties":{"document_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"slug":{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","title":"Slug","type":"string"},"kind":{"$ref":"#/$defs/WikiLintKind"},"detail":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"The broken slug, or how long the page has been stale.","title":"Detail"}},"required":["document_id","slug","kind"],"title":"WikiLintIssue","type":"object"},"WikiLintKind":{"description":"What is wrong with a wiki page, found by maintenance lint.","enum":["broken_link","orphan","stale"],"title":"WikiLintKind","type":"string"},"WikiLintReport":{"additionalProperties":false,"properties":{"issues":{"default":[],"items":{"$ref":"#/$defs/WikiLintIssue"},"title":"Issues","type":"array"},"pages_scanned":{"default":0,"minimum":0,"title":"Pages Scanned","type":"integer"},"truncated":{"default":false,"description":"More pages exist than one lint reads: broken links and orphans are only reported for a\ncomplete scan, since a page beyond it could be the target or the linker.","title":"Truncated","type":"boolean"}},"title":"WikiLintReport","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/DocumentPage"},{"$ref":"#/$defs/Document"},{"$ref":"#/$defs/DocumentTrail"},{"$ref":"#/$defs/DocumentBookmarks"},{"$ref":"#/$defs/DocumentImportPage"},{"$ref":"#/$defs/DocumentImportRun"},{"$ref":"#/$defs/WikiLintReport"},{"$ref":"#/$defs/DocumentLogPage"},{"$ref":"#/$defs/DocumentPublishPreview"},{"$ref":"#/$defs/DocumentSharingPreview"}],"title":"Result"}},"required":["result"],"title":"documentsOutput","type":"object"},"annotations":{"title":"Documents","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_documents","title":"Manage documents","description":"Write knowledge-base and wiki pages: create, edit, append, move, share, duplicate, delete and restore; review agents' pages; bookmark; import Markdown; distill and promote wiki pages. An agent's page waits for a person's review. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"DocumentChange":{"additionalProperties":false,"description":"Omitted fields stay. Moving is a change of `parent_id` and `position`. Changing\n`content_markdown` without `body` clears the page's body: an editor sends both.","properties":{"title":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"content_markdown":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content Markdown"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Body"},"referenced_document_ids":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Referenced Document Ids"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"position":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Position"},"record_ids":{"anyOf":[{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Record Ids"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"tenant_access":{"anyOf":[{"$ref":"#/$defs/AccessLevel"},{"type":"null"}],"default":null},"public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Public"},"cover_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Cover File Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"For an agent's edit of an approved page, which becomes a suggestion.","title":"Summary"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"DocumentChange","type":"object"},"DocumentKind":{"enum":["folder","page"],"title":"DocumentKind","type":"string"},"DocumentSpace":{"enum":["kb","wiki"],"title":"DocumentSpace","type":"string"},"ManageDocumentsAppend":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"content_markdown":{"maxLength":1000000,"minLength":1,"title":"Content Markdown","type":"string"},"section":{"anyOf":[{"maxLength":255,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Section"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["document_id","content_markdown"],"title":"ManageDocumentsAppend","type":"object"},"ManageDocumentsCancelImport":{"additionalProperties":false,"properties":{"import_id":{"description":"The import's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Import Id","type":"string"}},"required":["import_id"],"title":"ManageDocumentsCancelImport","type":"object"},"ManageDocumentsCreate":{"additionalProperties":false,"properties":{"key":{"description":"Creating with the same key returns the first document.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"space":{"$ref":"#/$defs/DocumentSpace","default":"kb"},"kind":{"$ref":"#/$defs/DocumentKind","default":"page"},"title":{"maxLength":256,"minLength":1,"title":"Title","type":"string"},"slug":{"anyOf":[{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","type":"string"},{"type":"null"}],"default":null,"description":"Derived from the title (under the parent's slug) when left out.","title":"Slug"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"position":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Last among its siblings when left out.","title":"Position"},"content_markdown":{"default":"","maxLength":1000000,"title":"Content Markdown","type":"string"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"A rich editor's JSON for the page, sent with the Markdown it renders to.","title":"Body"},"referenced_document_ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Referenced Document Ids","type":"array","uniqueItems":true},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"tenant_access":{"$ref":"#/$defs/AccessLevel","default":"write"},"public":{"default":false,"title":"Public","type":"boolean"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"For an agent's page: what it is for, shown to its reviewer.","title":"Summary"},"pending_review":{"default":false,"description":"When true, the page waits for a person's review before it is treated as approved.","title":"Pending Review","type":"boolean"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","title"],"title":"ManageDocumentsCreate","type":"object"},"ManageDocumentsDecideSuggestion":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"accept":{"description":"Accept replaces the page's content with the suggestion; decline drops it.","title":"Accept","type":"boolean"}},"required":["document_id","accept"],"title":"ManageDocumentsDecideSuggestion","type":"object"},"ManageDocumentsDelete":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"}},"required":["document_id"],"title":"ManageDocumentsDelete","type":"object"},"ManageDocumentsDistill":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"document_ids":{"description":"Wiki pages to merge into one new page.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"minItems":2,"title":"Document Ids","type":"array"},"title":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"}},"required":["key","document_ids"],"title":"ManageDocumentsDistill","type":"object"},"ManageDocumentsDuplicate":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"title":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"`Copy of …` when left out.","title":"Title"}},"required":["document_id","key"],"title":"ManageDocumentsDuplicate","type":"object"},"ManageDocumentsEditSection":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"section":{"maxLength":255,"minLength":1,"title":"Section","type":"string"},"content_markdown":{"maxLength":1000000,"title":"Content Markdown","type":"string"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["document_id","section","content_markdown"],"title":"ManageDocumentsEditSection","type":"object"},"ManageDocumentsEmptyBin":{"additionalProperties":false,"properties":{"space":{"$ref":"#/$defs/DocumentSpace","default":"kb"}},"title":"ManageDocumentsEmptyBin","type":"object"},"ManageDocumentsImportMarkdown":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"space":{"$ref":"#/$defs/DocumentSpace","default":"kb"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"files":{"items":{"$ref":"#/$defs/MarkdownFile"},"maxItems":200,"minItems":1,"title":"Files","type":"array"}},"required":["key","files"],"title":"ManageDocumentsImportMarkdown","type":"object"},"ManageDocumentsPromote":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"document_id":{"description":"A wiki page to copy into the knowledge base for review.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"delete_source":{"default":true,"description":"Remove the wiki page after the copy is created.","title":"Delete Source","type":"boolean"}},"required":["key","document_id"],"title":"ManageDocumentsPromote","type":"object"},"ManageDocumentsPurge":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"}},"required":["document_id"],"title":"ManageDocumentsPurge","type":"object"},"ManageDocumentsReorder":{"additionalProperties":false,"properties":{"space":{"$ref":"#/$defs/DocumentSpace","default":"kb"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The folder; the top of the space when left out.","title":"Parent Id"},"document_ids":{"description":"Its documents in order: each takes its index as `position`. Documents left out keep\ntheirs.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"minItems":1,"title":"Document Ids","type":"array"}},"required":["document_ids"],"title":"ManageDocumentsReorder","type":"object"},"ManageDocumentsRestore":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"}},"required":["document_id"],"title":"ManageDocumentsRestore","type":"object"},"ManageDocumentsReview":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"approve":{"title":"Approve","type":"boolean"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"request_changes":{"default":false,"description":"Send it back to its author instead of rejecting it (with `approve` false).","title":"Request Changes","type":"boolean"}},"required":["document_id","approve"],"title":"ManageDocumentsReview","type":"object"},"ManageDocumentsSetBookmarks":{"additionalProperties":false,"properties":{"document_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Document Ids","type":"array"}},"title":"ManageDocumentsSetBookmarks","type":"object"},"ManageDocumentsShare":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null,"description":"`tenant` or `principal`; kept when left out."},"tenant_access":{"anyOf":[{"$ref":"#/$defs/AccessLevel"},{"type":"null"}],"default":null,"description":"What every member gets on a tenant-wide document; kept when left out."},"shared_with":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Shared With","type":"array","uniqueItems":true},"editors":{"description":"Members of `shared_with` who edit; the others view.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"title":"Editors","type":"array","uniqueItems":true},"cascade":{"default":false,"description":"Also apply it to every document under a folder that the caller may change.","title":"Cascade","type":"boolean"},"keep_own_sharing":{"default":false,"description":"With `cascade`, leave documents whose access already differed from the folder's (their\nown sharing) as they are.","title":"Keep Own Sharing","type":"boolean"}},"required":["document_id"],"title":"ManageDocumentsShare","type":"object"},"ManageDocumentsStartImport":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"space":{"$ref":"#/$defs/DocumentSpace","default":"kb"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"file_ids":{"description":"Ready files the caller uploaded (`/core/v1/files`).","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"minItems":1,"title":"File Ids","type":"array"}},"required":["key","file_ids"],"title":"ManageDocumentsStartImport","type":"object"},"ManageDocumentsUpdate":{"additionalProperties":false,"properties":{"document_id":{"description":"The document's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Document Id","type":"string"},"change":{"$ref":"#/$defs/DocumentChange","description":"The fields."}},"required":["document_id","change"],"title":"ManageDocumentsUpdate","type":"object"},"MarkdownFile":{"additionalProperties":false,"properties":{"path":{"description":"`folder/sub/page.md`: folders are created along the path.","maxLength":500,"minLength":1,"title":"Path","type":"string"},"content_markdown":{"maxLength":1000000,"title":"Content Markdown","type":"string"}},"required":["path","content_markdown"],"title":"MarkdownFile","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"create":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsCreate"},{"type":"null"}],"default":null,"description":"A page (or folder) in Markdown; [[slug]] links another page. Once per key."},"update":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsUpdate"},{"type":"null"}],"default":null,"description":"Change the fields sent (title, content, parent, position…). An agent's edit of an approved page becomes a suggestion for a person. New Markdown without a body clears the page's rich editor body."},"append":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsAppend"},{"type":"null"}],"default":null,"description":"Add Markdown at the end of a page, or of one of its sections (created when missing)."},"edit_section":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsEditSection"},{"type":"null"}],"default":null,"description":"Replace the body of the section under one heading of a page."},"delete":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsDelete"},{"type":"null"}],"default":null,"description":"Delete a document softly (restorable until purged). A folder takes its contents along."},"restore":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsRestore"},{"type":"null"}],"default":null,"description":"Take a document out of the bin: a deleted one under its folder if that is still there (a folder with its contents), a rejected page back to review."},"purge":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsPurge"},{"type":"null"}],"default":null,"description":"Remove a document in the bin for good."},"reorder":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsReorder"},{"type":"null"}],"default":null,"description":"Put a folder's documents (or the top level's) in a new order."},"empty_bin":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsEmptyBin"},{"type":"null"}],"default":null,"description":"Remove for good everything in a space's bin the caller may remove, a batch at a time."},"duplicate":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsDuplicate"},{"type":"null"}],"default":null,"description":"Copy a page under a new title."},"share":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsShare"},{"type":"null"}],"default":null,"description":"Choose who opens a document and who edits it: everyone (to read or to write) or named members, optionally for everything under a folder."},"review":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsReview"},{"type":"null"}],"default":null,"description":"Approve an agent's page, or ask for changes."},"decide_suggestion":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsDecideSuggestion"},{"type":"null"}],"default":null,"description":"Accept or decline an agent's suggested edit of a page."},"set_bookmarks":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsSetBookmarks"},{"type":"null"}],"default":null,"description":"Replace the caller's bookmarks (in their order)."},"import_markdown":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsImportMarkdown"},{"type":"null"}],"default":null,"description":"Import Markdown files sent inline as pages, folders kept."},"start_import":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsStartImport"},{"type":"null"}],"default":null,"description":"Import uploaded Markdown files (`.md` or a `.zip`) in the background."},"cancel_import":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsCancelImport"},{"type":"null"}],"default":null,"description":"Stop a Markdown import that is still running."},"distill":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsDistill"},{"type":"null"}],"default":null,"description":"Have Core distill several wiki pages into one new page (when the deployment turns distillation on)."},"promote":{"anyOf":[{"$ref":"#/$defs/ManageDocumentsPromote"},{"type":"null"}],"default":null,"description":"Copy a wiki page into the knowledge base (optionally deleting the wiki page)."}},"title":"manage_documentsArguments","type":"object"},"outputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AgentRef":{"additionalProperties":false,"description":"The agent a request was made for (ADR 0031 section 4, `Principal.agent`): set by the agent\nhost's turn authority from the deployment's agent, so the agent's use scope applies to the\ncalls it makes into Core.","properties":{"agent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The agent's home tenant, when it differs from the caller's: a shared Morphic AI\ndeployment is owned by the operator tenant while its turns act in each workspace\n(ADR 0040). `None` reads the agent's scope in the caller's tenant, as before.","title":"Tenant Id"}},"required":["agent_id"],"title":"AgentRef","type":"object"},"AppKind":{"description":"What reaches the workspace (ADR 0031).","enum":["frontend","mcp_client","api_key"],"title":"AppKind","type":"string"},"AppRef":{"additionalProperties":false,"description":"The app a request came through (attribution, ADR 0031 section 2).","properties":{"app_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"App Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"kind":{"$ref":"#/$defs/AppKind"},"first_party":{"default":false,"description":"Declared by the deployment (`MORPHIC_CORE_FIRST_PARTY_APPS`): attributed, never listed.","title":"First Party","type":"boolean"}},"required":["app_id","name","kind"],"title":"AppRef","type":"object"},"Document":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"space":{"$ref":"#/$defs/DocumentSpace"},"kind":{"$ref":"#/$defs/DocumentKind"},"title":{"maxLength":256,"minLength":1,"title":"Title","type":"string"},"slug":{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","title":"Slug","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"content_markdown":{"default":"","description":"The page's text: what search, agents and `[[links]]` read, whatever else holds it.","maxLength":1000000,"title":"Content Markdown","type":"string"},"body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The page as a rich editor keeps it, beside `content_markdown`. A write of Markdown alone\nclears it, so it never contradicts the Markdown.","title":"Body"},"links":{"description":"The slugs this page links to with `[[slug]]`.","items":{"maxLength":240,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$","type":"string"},"title":"Links","type":"array","uniqueItems":true},"referenced_document_ids":{"description":"Documents this page names by id (a page mention in a rich body), as its writer says.\nBacklinks follow these and `links` alike.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Referenced Document Ids","type":"array","uniqueItems":true},"record_ids":{"description":"Records the document is about; it is visible only to who can see them all.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant","description":"`tenant`: every member opens it, at `tenant_access`; `principal`: only its owner and\nthe members it is shared with."},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"tenant_access":{"$ref":"#/$defs/AccessLevel","default":"write","description":"What every member gets on a tenant-wide document: `write` (everyone edits) or `read`\n(everyone views; its owner and `editors` edit). A read-only one needs an owner."},"public":{"default":false,"description":"Readable by anyone with its link, without signing in. A public folder publishes what is\nunder it too: each tenant-wide, approved document about no record, through folders that\nare all such.","title":"Public","type":"boolean"},"shared_with":{"description":"Members besides its owner given access by name: they see it even when it is private.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"editors":{"description":"Members of `shared_with` who also edit it; the others only view it.","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Editors","type":"array","uniqueItems":true},"cover_file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Cover File Id"},"review":{"anyOf":[{"$ref":"#/$defs/DocumentReview"},{"type":"null"}],"default":null},"suggestion":{"anyOf":[{"$ref":"#/$defs/DocumentSuggestion"},{"type":"null"}],"default":null},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"deleted_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"Who put it in the bin: deleted it, or rejected it (an agent's page)."},"deleted_with":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The folder whose delete took it along; restoring that folder brings it back.","title":"Deleted With"},"cascade_count":{"default":0,"description":"On a deleted folder: how many documents its delete took along.","minimum":0,"title":"Cascade Count","type":"integer"},"purge_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When it leaves the bin for good.","title":"Purge At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"source":{"anyOf":[{"$ref":"#/$defs/DocumentSource"},{"type":"null"}],"default":null,"description":"Set for documents a connector keeps current."},"source_folder":{"anyOf":[{"$ref":"#/$defs/DocumentFolderSource"},{"type":"null"}],"default":null,"description":"Set for the private folders a connector's pages are filed under."},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","space","kind","title","slug","created"],"title":"Document","type":"object"},"DocumentBinPurgeResult":{"additionalProperties":false,"properties":{"purged":{"default":0,"description":"Documents removed for good, the contents of deleted folders included.","minimum":0,"title":"Purged","type":"integer"},"has_more":{"default":false,"description":"More remain in the bin than one call removes: call again.","title":"Has More","type":"boolean"}},"title":"DocumentBinPurgeResult","type":"object"},"DocumentBookmarks":{"additionalProperties":false,"description":"A person's bookmarked documents, in their order.","properties":{"document_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"title":"Document Ids","type":"array"}},"title":"DocumentBookmarks","type":"object"},"DocumentFolderSource":{"additionalProperties":false,"description":"The source scope a connector-created folder belongs to. The folder's title can name the\nrepository, so it is hidden with the scope's pages (never writable through a public change).","properties":{"source":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source","type":"string"},"external_account_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"External Account Id","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Collection Id"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"}},"required":["source","external_account_id","owner_id"],"title":"DocumentFolderSource","type":"object"},"DocumentImportItemError":{"additionalProperties":false,"properties":{"path":{"maxLength":500,"minLength":1,"title":"Path","type":"string"},"error":{"$ref":"#/$defs/ErrorInfo"}},"required":["path","error"],"title":"DocumentImportItemError","type":"object"},"DocumentImportRun":{"additionalProperties":false,"description":"A knowledge-base import processed in the background.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"status":{"$ref":"#/$defs/TransferStatus","default":"pending"},"space":{"$ref":"#/$defs/DocumentSpace"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"file_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"File Ids","type":"array"},"requester":{"$ref":"#/$defs/Principal"},"total_files":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Total Files"},"processed_files":{"default":0,"minimum":0,"title":"Processed Files","type":"integer"},"folders_created":{"default":0,"minimum":0,"title":"Folders Created","type":"integer"},"pages_created":{"default":0,"minimum":0,"title":"Pages Created","type":"integer"},"pages_updated":{"default":0,"minimum":0,"title":"Pages Updated","type":"integer"},"failed":{"default":0,"minimum":0,"title":"Failed","type":"integer"},"errors":{"default":[],"items":{"$ref":"#/$defs/DocumentImportItemError"},"title":"Errors","type":"array"},"cursor":{"default":0,"minimum":0,"title":"Cursor","type":"integer"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null},"created_at":{"format":"date-time","title":"Created At","type":"string"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","key","space","requester","created_at"],"title":"DocumentImportRun","type":"object"},"DocumentKind":{"enum":["folder","page"],"title":"DocumentKind","type":"string"},"DocumentPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"documents":{"default":[],"items":{"$ref":"#/$defs/Document"},"title":"Documents","type":"array"},"children_count":{"description":"On a list (`POST /core/v1/documents/query`): per folder returned, how many live documents\nit holds that the caller opens by their sharing (rejected pages aside). A folder with none is\nleft out.","patternProperties":{"^\\S+$":{"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Children Count","type":"object"}},"title":"DocumentPage","type":"object"},"DocumentRestoreResult":{"additionalProperties":false,"properties":{"document":{"$ref":"#/$defs/Document"},"restored_count":{"default":0,"description":"Documents a folder's delete took along that came back with it.","minimum":0,"title":"Restored Count","type":"integer"}},"required":["document"],"title":"DocumentRestoreResult","type":"object"},"DocumentReview":{"additionalProperties":false,"properties":{"status":{"$ref":"#/$defs/DocumentReviewStatus","default":"pending"},"author":{"$ref":"#/$defs/PrincipalRef"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"What the author says the page is for.","title":"Summary"},"decided_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"decided_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Decided At"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"Why it was rejected.","title":"Reason"},"purge_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a rejected page leaves the bin for good.","title":"Purge At"}},"required":["author"],"title":"DocumentReview","type":"object"},"DocumentReviewStatus":{"enum":["pending","approved","rejected","changes_requested"],"title":"DocumentReviewStatus","type":"string"},"DocumentSharingResult":{"additionalProperties":false,"properties":{"changed":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Changed","type":"array"},"skipped":{"default":0,"description":"Documents under the folder left as they were: their own sharing kept, or the caller may\nnot change or open them.","minimum":0,"title":"Skipped","type":"integer"}},"title":"DocumentSharingResult","type":"object"},"DocumentSource":{"additionalProperties":false,"description":"Typed provenance and sync state of a document a connector keeps current. Only the source\nintake (`/core/v1/documents/source`) writes it; no public change can.","properties":{"source":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source","type":"string"},"external_account_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"External Account Id","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Collection Id"},"external_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"External Id","type":"string"},"connection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Connection Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"identity_key":{"description":"Digest of source, account, collection, external id and owner: one document per key.","pattern":"^[0-9a-f]{64}$","title":"Identity Key","type":"string"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Url"},"provider_version":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Provider Version","type":"string"},"synced_sha256":{"description":"Digest of the content the source last supplied; the page was edited when it differs.","pattern":"^[0-9a-f]{64}$","title":"Synced Sha256","type":"string"},"synced_title":{"maxLength":256,"minLength":1,"title":"Synced Title","type":"string"},"revision":{"description":"Counts applied source changes; callers fence their writes with it.","minimum":1,"title":"Revision","type":"integer"},"state":{"$ref":"#/$defs/SourceDocumentState","default":"active"},"state_changed_at":{"format":"date-time","title":"State Changed At","type":"string"},"state_reason":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"title":"State Reason"},"user_deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a person had deleted the page before the source hid it: the page stays deleted when\nthe source shows it again.","title":"User Deleted At"},"conflict":{"anyOf":[{"$ref":"#/$defs/DocumentSourceConflict"},{"type":"null"}],"default":null},"receipts":{"default":[],"items":{"$ref":"#/$defs/DocumentSourceReceipt"},"maxItems":32,"title":"Receipts","type":"array"}},"required":["source","external_account_id","external_id","connection_id","owner_id","identity_key","provider_version","synced_sha256","synced_title","revision","state_changed_at"],"title":"DocumentSource","type":"object"},"DocumentSourceConflict":{"additionalProperties":false,"description":"A source change a person's own edit blocked. Their text stays; the source's waits here.","properties":{"upstream_markdown":{"maxLength":1000000,"title":"Upstream Markdown","type":"string"},"upstream_sha256":{"pattern":"^[0-9a-f]{64}$","title":"Upstream Sha256","type":"string"},"provider_version":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Provider Version","type":"string"},"source_revision":{"minimum":1,"title":"Source Revision","type":"integer"},"detected_at":{"format":"date-time","title":"Detected At","type":"string"}},"required":["upstream_markdown","upstream_sha256","provider_version","source_revision","detected_at"],"title":"DocumentSourceConflict","type":"object"},"DocumentSourceReceipt":{"additionalProperties":false,"description":"A delivery this source document applied, kept with it so a replay is answered from the\nsame write that applied it (no crash window between change and receipt).","properties":{"delivery_id":{"maxLength":512,"minLength":1,"title":"Delivery Id","type":"string"},"fingerprint":{"pattern":"^[0-9a-f]{64}$","title":"Fingerprint","type":"string"},"outcome":{"$ref":"#/$defs/SourceDocumentOutcome"},"source_revision":{"minimum":0,"title":"Source Revision","type":"integer"}},"required":["delivery_id","fingerprint","outcome","source_revision"],"title":"DocumentSourceReceipt","type":"object"},"DocumentSpace":{"enum":["kb","wiki"],"title":"DocumentSpace","type":"string"},"DocumentSuggestion":{"additionalProperties":false,"description":"An agent's proposed new content for an approved page, waiting for a person.","properties":{"content_markdown":{"maxLength":1000000,"title":"Content Markdown","type":"string"},"summary":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"author":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"}},"required":["content_markdown","author","created_at"],"title":"DocumentSuggestion","type":"object"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"MarkdownImportResult":{"additionalProperties":false,"properties":{"folders":{"minimum":0,"title":"Folders","type":"integer"},"pages":{"minimum":0,"title":"Pages","type":"integer"},"documents":{"default":[],"items":{"$ref":"#/$defs/Document"},"title":"Documents","type":"array"}},"required":["folders","pages"],"title":"MarkdownImportResult","type":"object"},"Principal":{"additionalProperties":false,"description":"A `PrincipalRef` plus what governance needs to decide on its requests.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"roles":{"description":"Role slugs in this tenant. Role definitions are tenant data, not a Core enum.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"For tokens and agents: the most the credential may do. None means role permissions only.","title":"Scopes"},"via":{"anyOf":[{"$ref":"#/$defs/AppRef"},{"type":"null"}],"default":null,"description":"The app the call came through (ADR 0031): who a request is attributed to, set by the\nauthenticator from the token's client id or the key's app. None for a host's service\ncredential and for a person whose token names no client."},"agent":{"anyOf":[{"$ref":"#/$defs/AgentRef"},{"type":"null"}],"default":null,"description":"The agent the call is made for (ADR 0031 section 4): set by the agent host's turn\nauthority from the deployment's agent. Its use scope narrows the call beside the app's.\nNone for everything else."},"data_scope":{"$ref":"#/$defs/Visibility","default":"tenant","description":"Whether the principal sees tenant-wide data or only its own (e.g. a personal agent)."}},"required":["id","kind","tenant_id"],"title":"Principal","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"SourceDocumentOutcome":{"description":"How Core applied a delivery.","enum":["created","updated","unchanged","conflict","renamed","deleted","suspended","reauthorized","noop","duplicate"],"title":"SourceDocumentOutcome","type":"string"},"SourceDocumentState":{"description":"Whether a source document may be shown at all (`Document.source.state`).","enum":["active","source_deleted","access_suspended"],"title":"SourceDocumentState","type":"string"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TransferStatus":{"enum":["pending","running","completed","partial","failed","cancelled"],"title":"TransferStatus","type":"string"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"},"WikiDistillResult":{"additionalProperties":false,"properties":{"document":{"$ref":"#/$defs/Document"}},"required":["document"],"title":"WikiDistillResult","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/Document"},{"$ref":"#/$defs/Done"},{"$ref":"#/$defs/DocumentRestoreResult"},{"$ref":"#/$defs/DocumentPage"},{"$ref":"#/$defs/DocumentBinPurgeResult"},{"$ref":"#/$defs/DocumentSharingResult"},{"$ref":"#/$defs/DocumentBookmarks"},{"$ref":"#/$defs/MarkdownImportResult"},{"$ref":"#/$defs/DocumentImportRun"},{"$ref":"#/$defs/WikiDistillResult"}],"title":"Result"}},"required":["result"],"title":"manage_documentsOutput","type":"object"},"annotations":{"title":"Manage documents","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"search","title":"Search the workspace","description":"Semantic search over the workspace's content (records, activities, knowledge, documents and the text of files on records), filtered to what the caller may see. Use it to find context before answering. `kinds: [\"file\"]` searches files only, `record_ids` one record's: each file hit is a passage of the file (`source_id` is the file id, `metadata.filename` its name, `[page N]` lines its pages); cite both.","inputSchema":{"$defs":{"RetrievalMode":{"enum":["fast","thorough"],"title":"RetrievalMode","type":"string"}},"properties":{"query":{"description":"","maxLength":1000000,"minLength":1,"title":"Query","type":"string"},"kinds":{"default":[],"description":"Restrict to these content kinds (e.g. `knowledge`, `record`). Empty means all.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Kinds","type":"array","uniqueItems":true},"record_ids":{"default":[],"description":"Restrict to content about these records. Empty means no restriction.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"mode":{"$ref":"#/$defs/RetrievalMode","default":"fast","description":""},"limit":{"default":8,"description":"","exclusiveMinimum":0,"maximum":50,"title":"Limit","type":"integer"}},"required":["query"],"title":"searchArguments","type":"object"},"outputSchema":{"$defs":{"ContextItem":{"additionalProperties":false,"description":"One retrieved piece of content.","properties":{"kind":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"source_id":{"description":"The Core object the content came from: a record, knowledge item or document ID.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Id","type":"string"},"text":{"maxLength":1000000,"title":"Text","type":"string"},"score":{"minimum":0.0,"title":"Score","type":"number"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["kind","source_id","text","score"],"title":"ContextItem","type":"object"}},"additionalProperties":false,"description":"Retrieved items, best first, already filtered for the querying principal.","properties":{"items":{"default":[],"items":{"$ref":"#/$defs/ContextItem"},"title":"Items","type":"array"}},"title":"ContextResult","type":"object"},"annotations":{"title":"Search the workspace","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"identity","title":"Identity","description":"Which record an email, phone or handle belongs to, and the possible duplicates waiting for a decision. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"IdentityHandle":{"additionalProperties":false,"description":"One way to reach a party: an email address, a phone number, a domain, or a\nconnector-defined handle such as a chat user id.","properties":{"kind":{"description":"`email`, `phone`, `domain`, or an open connector-defined kind like `slack_user`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"value":{"description":"As given; Core normalises it by kind before matching.","maxLength":256,"minLength":1,"title":"Value","type":"string"}},"required":["kind","value"],"title":"IdentityHandle","type":"object"},"IdentityResolve":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"handles":{"default":[],"items":{"$ref":"#/$defs/IdentityHandle"},"title":"Handles","type":"array"}},"required":["object_type"],"title":"IdentityResolve","type":"object"},"IdentityReviews":{"additionalProperties":false,"properties":{"object_type":{"description":"The object type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"required":["object_type"],"title":"IdentityReviews","type":"object"}},"properties":{"resolve":{"anyOf":[{"$ref":"#/$defs/IdentityResolve"},{"type":"null"}],"default":null,"description":"Find the record a handle belongs to (exact, then fuzzy)."},"reviews":{"anyOf":[{"$ref":"#/$defs/IdentityReviews"},{"type":"null"}],"default":null,"description":"Open match reviews of an object type: possible duplicates to decide."}},"title":"identityArguments","type":"object"},"outputSchema":{"$defs":{"IdentityHandle":{"additionalProperties":false,"description":"One way to reach a party: an email address, a phone number, a domain, or a\nconnector-defined handle such as a chat user id.","properties":{"kind":{"description":"`email`, `phone`, `domain`, or an open connector-defined kind like `slack_user`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"value":{"description":"As given; Core normalises it by kind before matching.","maxLength":256,"minLength":1,"title":"Value","type":"string"}},"required":["kind","value"],"title":"IdentityHandle","type":"object"},"IdentityResolution":{"additionalProperties":false,"description":"The resolver's answer. Deterministic: the same data always gives the same answer.","properties":{"outcome":{"$ref":"#/$defs/MatchOutcome"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Set exactly when the outcome is `matched`.","title":"Record Id"},"confidence":{"default":0.0,"maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"method":{"anyOf":[{"$ref":"#/$defs/MatchMethod"},{"type":"null"}],"default":null},"candidates":{"default":[],"description":"Best first. For `needs_review`, the ones a human should compare.","items":{"$ref":"#/$defs/MatchCandidate"},"title":"Candidates","type":"array"},"review_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Review Id"}},"required":["outcome"],"title":"IdentityResolution","type":"object"},"MatchCandidate":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"score":{"maximum":1.0,"minimum":0.0,"title":"Score","type":"number"},"method":{"$ref":"#/$defs/MatchMethod"}},"required":["record_id","score","method"],"title":"MatchCandidate","type":"object"},"MatchMethod":{"description":"How a handle came to be linked to a record.","enum":["exact","fuzzy","human","declared"],"title":"MatchMethod","type":"string"},"MatchOutcome":{"enum":["matched","needs_review","no_match"],"title":"MatchOutcome","type":"string"},"MatchReview":{"additionalProperties":false,"description":"An uncertain match waiting for a human decision.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"handles":{"default":[],"items":{"$ref":"#/$defs/IdentityHandle"},"title":"Handles","type":"array"},"candidate_record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Candidate Record Id","type":"string"},"score":{"maximum":1.0,"minimum":0.0,"title":"Score","type":"number"},"status":{"$ref":"#/$defs/ReviewStatus","default":"open"},"seen_count":{"default":1,"description":"How often the same party met the same candidate before a decision.","minimum":1,"title":"Seen Count","type":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"resolved":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null}},"required":["id","tenant_id","object_type","candidate_record_id","score","created_at"],"title":"MatchReview","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"ReviewList":{"additionalProperties":false,"description":"Open reviews, newest first.","properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"reviews":{"default":[],"items":{"$ref":"#/$defs/MatchReview"},"title":"Reviews","type":"array"}},"title":"ReviewList","type":"object"},"ReviewStatus":{"enum":["open","same","different"],"title":"ReviewStatus","type":"string"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/IdentityResolution"},{"$ref":"#/$defs/ReviewList"}],"title":"Result"}},"required":["result"],"title":"identityOutput","type":"object"},"annotations":{"title":"Identity","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_identity","title":"Manage identity","description":"Tie handles to records and decide match reviews (records' merge joins duplicates). Set exactly one argument: the action to take.","inputSchema":{"$defs":{"IdentityHandle":{"additionalProperties":false,"description":"One way to reach a party: an email address, a phone number, a domain, or a\nconnector-defined handle such as a chat user id.","properties":{"kind":{"description":"`email`, `phone`, `domain`, or an open connector-defined kind like `slack_user`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"value":{"description":"As given; Core normalises it by kind before matching.","maxLength":256,"minLength":1,"title":"Value","type":"string"}},"required":["kind","value"],"title":"IdentityHandle","type":"object"},"ManageIdentityDecide":{"additionalProperties":false,"properties":{"review_id":{"description":"The review.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Review Id","type":"string"},"same":{"description":"True: the party is the candidate (its handles are linked to it). False: never again\npropose this candidate for this party.","title":"Same","type":"boolean"}},"required":["review_id","same"],"title":"ManageIdentityDecide","type":"object"},"ManageIdentityLink":{"additionalProperties":false,"properties":{"handle":{"$ref":"#/$defs/IdentityHandle"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"}},"required":["handle","record_id","object_type"],"title":"ManageIdentityLink","type":"object"}},"properties":{"link":{"anyOf":[{"$ref":"#/$defs/ManageIdentityLink"},{"type":"null"}],"default":null,"description":"Tie a handle (email, phone…) to a record."},"decide":{"anyOf":[{"$ref":"#/$defs/ManageIdentityDecide"},{"type":"null"}],"default":null,"description":"Close a match review: same person (links the handles) or different."}},"title":"manage_identityArguments","type":"object"},"outputSchema":{"$defs":{"IdentityHandle":{"additionalProperties":false,"description":"One way to reach a party: an email address, a phone number, a domain, or a\nconnector-defined handle such as a chat user id.","properties":{"kind":{"description":"`email`, `phone`, `domain`, or an open connector-defined kind like `slack_user`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"value":{"description":"As given; Core normalises it by kind before matching.","maxLength":256,"minLength":1,"title":"Value","type":"string"}},"required":["kind","value"],"title":"IdentityHandle","type":"object"},"IdentityLink":{"additionalProperties":false,"description":"A remembered match: future resolutions of the handle go straight to the record.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"handle":{"$ref":"#/$defs/IdentityHandle","description":"Normalised."},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"confidence":{"maximum":1.0,"minimum":0.0,"title":"Confidence","type":"number"},"method":{"$ref":"#/$defs/MatchMethod"},"created":{"$ref":"#/$defs/Provenance"}},"required":["tenant_id","handle","record_id","object_type","confidence","method","created"],"title":"IdentityLink","type":"object"},"MatchMethod":{"description":"How a handle came to be linked to a record.","enum":["exact","fuzzy","human","declared"],"title":"MatchMethod","type":"string"},"MatchReview":{"additionalProperties":false,"description":"An uncertain match waiting for a human decision.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"handles":{"default":[],"items":{"$ref":"#/$defs/IdentityHandle"},"title":"Handles","type":"array"},"candidate_record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Candidate Record Id","type":"string"},"score":{"maximum":1.0,"minimum":0.0,"title":"Score","type":"number"},"status":{"$ref":"#/$defs/ReviewStatus","default":"open"},"seen_count":{"default":1,"description":"How often the same party met the same candidate before a decision.","minimum":1,"title":"Seen Count","type":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"resolved":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null}},"required":["id","tenant_id","object_type","candidate_record_id","score","created_at"],"title":"MatchReview","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"ReviewStatus":{"enum":["open","same","different"],"title":"ReviewStatus","type":"string"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/IdentityLink"},{"$ref":"#/$defs/MatchReview"}],"title":"Result"}},"required":["result"],"title":"manage_identityOutput","type":"object"},"annotations":{"title":"Manage identity","readOnlyHint":false,"destructiveHint":false,"openWorldHint":false}},{"name":"files","title":"Files","description":"Files in the workspace: records' attachments and the library, their downloads and previews, and records read out of files. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"ExtractionStatus":{"description":"Where reading a record out of a file stands.","enum":["pending","review","done","failed","abandoned"],"title":"ExtractionStatus","type":"string"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FileDisposition":{"description":"How a browser handles a signed download.","enum":["attachment","inline"],"title":"FileDisposition","type":"string"},"FilesDownload":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"disposition":{"$ref":"#/$defs/FileDisposition","default":"attachment","description":"`inline` to show a PDF, an image, audio or video in a page; other types are always attachments."}},"required":["file_id"],"title":"FilesDownload","type":"object"},"FilesExtraction":{"additionalProperties":false,"properties":{"extraction_id":{"description":"The extraction's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Extraction Id","type":"string"}},"required":["extraction_id"],"title":"FilesExtraction","type":"object"},"FilesExtractionAvailability":{"additionalProperties":false,"properties":{},"title":"FilesExtractionAvailability","type":"object"},"FilesExtractions":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"status":{"anyOf":[{"$ref":"#/$defs/ExtractionStatus"},{"type":"null"}],"default":null,"description":"e.g. `review`: the queue waiting for a person."},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"file_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"File Id"}},"title":"FilesExtractions","type":"object"},"FilesFolderImpact":{"additionalProperties":false,"properties":{"folder_id":{"description":"The folder's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Folder Id","type":"string"}},"required":["folder_id"],"title":"FilesFolderImpact","type":"object"},"FilesFolders":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"FilesFolders","type":"object"},"FilesGet":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"}},"required":["file_id"],"title":"FilesGet","type":"object"},"FilesPreview":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"}},"required":["file_id"],"title":"FilesPreview","type":"object"},"FilesQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text in the file name.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Attribute"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"An activity's files (a task's attachments).","title":"Activity Id"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The files directly in this folder of a record (not those of the folders under it).","title":"Folder Id"},"library":{"default":false,"description":"Files with no record or activity (the tenant's library and the caller's own).","title":"Library","type":"boolean"},"mine":{"default":false,"description":"Only files the caller uploaded.","title":"Mine","type":"boolean"},"content_type_prefix":{"anyOf":[{"maxLength":100,"pattern":"^[\\w.+/-]+$","type":"string"},{"type":"null"}],"default":null,"description":"e.g. `image/`.","title":"Content Type Prefix"},"metadata_equals":{"description":"Only files whose `metadata` hold these exact top-level values (how a file came to be:\n`origin: export`). Any other condition on `metadata.<key>` goes in `where`.","maxProperties":4,"patternProperties":{"^[a-z][a-z0-9_]*$":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Metadata Equals","type":"object"}},"title":"FilesQuery","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"query":{"anyOf":[{"$ref":"#/$defs/FilesQuery"},{"type":"null"}],"default":null,"description":"Ready files newest first: a record's attachments or the library's, by type or name."},"get":{"anyOf":[{"$ref":"#/$defs/FilesGet"},{"type":"null"}],"default":null,"description":"A file's name, type, size and what it is attached to."},"download":{"anyOf":[{"$ref":"#/$defs/FilesDownload"},{"type":"null"}],"default":null,"description":"A signed URL to download a file, valid for a few minutes."},"preview":{"anyOf":[{"$ref":"#/$defs/FilesPreview"},{"type":"null"}],"default":null,"description":"The start of a text file, or a CSV's header and first rows."},"folders":{"anyOf":[{"$ref":"#/$defs/FilesFolders"},{"type":"null"}],"default":null,"description":"A record's folders, parents first, with how many files and folders each holds. Its type's file categories are folders too (on the type)."},"folder_impact":{"anyOf":[{"$ref":"#/$defs/FilesFolderImpact"},{"type":"null"}],"default":null,"description":"What deleting a folder would delete: its files and folders."},"extractions":{"anyOf":[{"$ref":"#/$defs/FilesExtractions"},{"type":"null"}],"default":null,"description":"The caller's file extractions, newest first; status `review` is the queue of proposals waiting for a person."},"extraction":{"anyOf":[{"$ref":"#/$defs/FilesExtraction"},{"type":"null"}],"default":null,"description":"One extraction with its proposed values: each with its confidence, where in the document it was read, and any issue to check."},"extraction_availability":{"anyOf":[{"$ref":"#/$defs/FilesExtractionAvailability"},{"type":"null"}],"default":null,"description":"Whether reading records out of files is on, which file types it reads and the largest file."}},"title":"filesArguments","type":"object"},"outputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"BoundingBox":{"additionalProperties":false,"description":"A region of a page, as fractions of the page's width and height from its top-left\ncorner.","properties":{"x":{"maximum":1,"minimum":0,"title":"X","type":"number"},"y":{"maximum":1,"minimum":0,"title":"Y","type":"number"},"width":{"maximum":1,"minimum":0,"title":"Width","type":"number"},"height":{"maximum":1,"minimum":0,"title":"Height","type":"number"}},"required":["x","y","width","height"],"title":"BoundingBox","type":"object"},"Citation":{"additionalProperties":false,"description":"Where in the document a value was read: words found in its text, never only the\nmodel's say-so.","properties":{"quote":{"description":"The words as the document writes them.","maxLength":1000000,"title":"Quote","type":"string"},"page":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"The page they are on (1 for a document without pages).","title":"Page"},"box":{"anyOf":[{"$ref":"#/$defs/BoundingBox"},{"type":"null"}],"default":null,"description":"Where on the page, when text extraction gives the lines' positions (OCR)."}},"required":["quote"],"title":"Citation","type":"object"},"ExtractionAvailability":{"additionalProperties":false,"description":"Whether file extraction is on, and what it reads, before anything is uploaded.","properties":{"enabled":{"title":"Enabled","type":"boolean"},"content_types":{"default":[],"description":"Types read, exactly or by a prefix ending in `/` (`image/` when OCR is configured).","items":{"type":"string"},"title":"Content Types","type":"array"},"max_bytes":{"description":"The largest file read.","minimum":0,"title":"Max Bytes","type":"integer"}},"required":["enabled","max_bytes"],"title":"ExtractionAvailability","type":"object"},"ExtractionFailure":{"description":"Why no record could be read out of a file (`FileExtraction.failure`).","enum":["unsupported_type","too_large","unreadable","wrong_document","multiple_records","nothing_found","low_confidence","model_unavailable"],"title":"ExtractionFailure","type":"string"},"ExtractionIssue":{"description":"Why a person should look twice at one proposed value (`ProposedValue.issue`).","enum":["ambiguous_date","unparseable_date","unmapped_currency","low_confidence","unresolved_relation"],"title":"ExtractionIssue","type":"string"},"ExtractionPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"extractions":{"default":[],"items":{"$ref":"#/$defs/FileExtraction"},"title":"Extractions","type":"array"}},"title":"ExtractionPage","type":"object"},"ExtractionStatus":{"description":"Where reading a record out of a file stands.","enum":["pending","review","done","failed","abandoned"],"title":"ExtractionStatus","type":"string"},"FileAction":{"description":"What the caller may do with a file it sees (`FileInfo.allowed`).","enum":["change","share","delete"],"title":"FileAction","type":"string"},"FileDisposition":{"description":"How a browser handles a signed download.","enum":["attachment","inline"],"title":"FileDisposition","type":"string"},"FileDownload":{"additionalProperties":false,"properties":{"file":{"$ref":"#/$defs/FileInfo"},"url":{"title":"Url","type":"string"},"expires_at":{"format":"date-time","title":"Expires At","type":"string"},"disposition":{"$ref":"#/$defs/FileDisposition","default":"attachment","description":"How the URL serves the file: `inline` only when asked for and the type is safe to\nrender (`FilePolicy.inline_types`), else as an attachment."}},"required":["file","url","expires_at"],"title":"FileDownload","type":"object"},"FileExtraction":{"additionalProperties":false,"description":"A record read out of an uploaded file by a model, in the background, then confirmed by a\nperson (or created at once when the policy allows).","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"status":{"$ref":"#/$defs/ExtractionStatus","default":"pending"},"proposed":{"default":[],"description":"What the model read, once in review: one value per field, with options if ambiguous.","items":{"$ref":"#/$defs/ProposedValue"},"title":"Proposed","type":"array"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"description":"How sure the model was that the file is this record.","title":"Confidence"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record created, once done.","title":"Record Id"},"dropped":{"default":[],"description":"Fields the model answered that the type refused, left out of the record.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Dropped","type":"array"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"Why it failed.","title":"Reason"},"failure":{"anyOf":[{"$ref":"#/$defs/ExtractionFailure"},{"type":"null"}],"default":null,"description":"Why it failed, as a kind a client can act on (`reason` says it in words)."},"currency":{"anyOf":[{"pattern":"^[A-Z]{3}$","type":"string"},{"type":"null"}],"default":null,"description":"The currency the document's amounts are in (ISO 4217), when it says.","title":"Currency"},"attempts":{"default":0,"minimum":0,"title":"Attempts","type":"integer"},"requested_by":{"$ref":"#/$defs/PrincipalRef"},"requested_at":{"format":"date-time","title":"Requested At","type":"string"},"reviewed_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"Who confirmed or abandoned it (none when it was created at once)."},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","file_id","object_type","requested_by","requested_at"],"title":"FileExtraction","type":"object"},"FileInfo":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"filename":{"maxLength":256,"minLength":1,"title":"Filename","type":"string"},"content_type":{"title":"Content Type","type":"string"},"size":{"exclusiveMinimum":0,"title":"Size","type":"integer"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Attribute"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity the file is attached to; its access follows the activity's.","title":"Activity Id"},"category_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Its file category on the record's object type. An id the type no longer has reads as\nuncategorized.","title":"Category Id"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record's folder it sits in (`RecordFolder`); a file in a folder has no\n`category_id`.","title":"Folder Id"},"status":{"$ref":"#/$defs/FileStatus","default":"pending"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"shared_with":{"description":"Members besides its uploader who see a private library file (read only).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"grants":{"default":[],"description":"Members or roles a private library file is shared with, each at a level: `read` sees\nit, `write` also renames, moves and deletes it. A file on a record or an activity follows\nthat instead.","items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"},"created_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"description":"Counts the file's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"},"allowed":{"description":"What the caller may do with the file, worked out by the same checks the action runs\n(empty where Core hands a file to something other than a caller).","items":{"$ref":"#/$defs/FileAction"},"title":"Allowed","type":"array","uniqueItems":true}},"required":["id","tenant_id","filename","content_type","size","created_by","created_at"],"title":"FileInfo","type":"object"},"FilePage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"files":{"default":[],"items":{"$ref":"#/$defs/FileInfo"},"title":"Files","type":"array"}},"title":"FilePage","type":"object"},"FilePreview":{"additionalProperties":false,"description":"The start of a text file, or a CSV's header and first rows.","properties":{"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"text":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"columns":{"default":[],"items":{"type":"string"},"title":"Columns","type":"array"},"rows":{"default":[],"items":{"items":{"type":"string"},"type":"array"},"title":"Rows","type":"array"},"truncated":{"default":false,"title":"Truncated","type":"boolean"}},"required":["file_id"],"title":"FilePreview","type":"object"},"FileStatus":{"enum":["pending","ready"],"title":"FileStatus","type":"string"},"FolderParentKind":{"description":"Where a folder of a record's files sits.","enum":["root","category","folder"],"title":"FolderParentKind","type":"string"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ProposedValue":{"additionalProperties":false,"description":"One field's value as read out of a file, waiting for a person to confirm it.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"value":{"description":"What the field would hold; null when nothing usable was read (see `issue`): the field\nis left out unless the person fills it.","title":"Value"},"options":{"default":[],"description":"Other values the file could also mean, when it was ambiguous; empty when it was not.","items":{},"title":"Options","type":"array"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"description":"How sure the model was of this value.","title":"Confidence"},"citations":{"default":[],"description":"Where the value was read, when the words were found in the document.","items":{"$ref":"#/$defs/Citation"},"title":"Citations","type":"array"},"issue":{"anyOf":[{"$ref":"#/$defs/ExtractionIssue"},{"type":"null"}],"default":null,"description":"Why a person should look twice at it."},"candidates":{"default":[],"description":"For a relation field: records the name read may mean (the value is the one exact\nmatch, if there is one; a relation is never created from a file).","items":{"$ref":"#/$defs/RelationCandidate"},"title":"Candidates","type":"array"},"current":{"default":null,"description":"The record's value now, when the extraction fills an existing record.","title":"Current"}},"required":["field","value"],"title":"ProposedValue","type":"object"},"RecordFolder":{"additionalProperties":false,"description":"A folder people made on a record, holding files and other folders. The categories of the\nrecord's object type are folders every record of the type shows; these are the record's\nown.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"name":{"maxLength":255,"minLength":1,"pattern":"^[^/\\\\\\x00]*[^/\\\\\\x00\\s][^/\\\\\\x00]*$","title":"Name","type":"string"},"parent_kind":{"$ref":"#/$defs/FolderParentKind","default":"root"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The category's or the folder's id; none at the record's root. A folder whose category\nthe type no longer has reads as at the root.","title":"Parent Id"},"created_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"},"version":{"default":1,"description":"Counts the folder's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"},"files":{"default":0,"description":"Ready files in it and in every folder under it (in a listing).","minimum":0,"title":"Files","type":"integer"},"folders":{"default":0,"description":"Folders under it, at any depth (in a listing).","minimum":0,"title":"Folders","type":"integer"}},"required":["id","tenant_id","record_id","name","created_by","created_at"],"title":"RecordFolder","type":"object"},"RecordFolderImpact":{"additionalProperties":false,"description":"What deleting a folder deletes (asked before, or answered once done).","properties":{"folder_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Folder Id","type":"string"},"files":{"description":"Files in the folder and every folder under it.","minimum":0,"title":"Files","type":"integer"},"folders":{"description":"The folder itself and every folder under it.","minimum":1,"title":"Folders","type":"integer"}},"required":["folder_id","files","folders"],"title":"RecordFolderImpact","type":"object"},"RecordFolderList":{"additionalProperties":false,"description":"Every folder of a record, parents before their children.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"folders":{"default":[],"items":{"$ref":"#/$defs/RecordFolder"},"title":"Folders","type":"array"}},"required":["record_id"],"title":"RecordFolderList","type":"object"},"RelationCandidate":{"additionalProperties":false,"description":"A record a name read for a relation field may mean.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"exact":{"default":false,"description":"Its title is the name read, ignoring case.","title":"Exact","type":"boolean"}},"required":["record_id"],"title":"RelationCandidate","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/FilePage"},{"$ref":"#/$defs/FileInfo"},{"$ref":"#/$defs/FileDownload"},{"$ref":"#/$defs/FilePreview"},{"$ref":"#/$defs/RecordFolderList"},{"$ref":"#/$defs/RecordFolderImpact"},{"$ref":"#/$defs/ExtractionPage"},{"$ref":"#/$defs/FileExtraction"},{"$ref":"#/$defs/ExtractionAvailability"}],"title":"Result"}},"required":["result"],"title":"filesOutput","type":"object"},"annotations":{"title":"Files","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_files","title":"Manage files","description":"Upload, rename, move and delete files, transcribe recordings, and read records out of files (confirming what was read stays a person's step). Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"FileChange":{"additionalProperties":false,"description":"Rename, move to another record, attribute or activity, or share. Left-out fields stay.\n\nA file uploaded privately (a comment's attachment before the comment is posted) is\nattached to its activity or record once it exists: from then on it follows that.","properties":{"filename":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Filename"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Attribute"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Attach the file to this activity (a comment, a task); null detaches it.","title":"Activity Id"},"category_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Move it to this file category of its record's type (out of any folder); null makes it\nuncategorized.","title":"Category Id"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Move it into this folder of its record (out of any category); null takes it out of its\nfolder, to the record's root.","title":"Folder Id"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null},"shared_with":{"anyOf":[{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Shared With"},"grants":{"anyOf":[{"items":{"$ref":"#/$defs/AccessGrant"},"maxItems":100,"type":"array"},{"type":"null"}],"default":null,"description":"Replaces the file's grants (`FileInfo.grants`); only for a private library file.","title":"Grants"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version (the `version` read); None changes whatever is stored.","title":"Expected Version"}},"title":"FileChange","type":"object"},"FolderParentKind":{"description":"Where a folder of a record's files sits.","enum":["root","category","folder"],"title":"FolderParentKind","type":"string"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"ManageFilesAbandonExtraction":{"additionalProperties":false,"properties":{"extraction_id":{"description":"The extraction's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Extraction Id","type":"string"}},"required":["extraction_id"],"title":"ManageFilesAbandonExtraction","type":"object"},"ManageFilesChange":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"change":{"$ref":"#/$defs/FileChange","description":"The change."}},"required":["file_id","change"],"title":"ManageFilesChange","type":"object"},"ManageFilesChangeFolder":{"additionalProperties":false,"properties":{"folder_id":{"description":"The folder's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Folder Id","type":"string"},"change":{"$ref":"#/$defs/RecordFolderChange","description":"The change."}},"required":["folder_id","change"],"title":"ManageFilesChangeFolder","type":"object"},"ManageFilesConfirm":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"}},"required":["file_id"],"title":"ManageFilesConfirm","type":"object"},"ManageFilesCreateFolder":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"name":{"maxLength":255,"minLength":1,"pattern":"^[^/\\\\\\x00]*[^/\\\\\\x00\\s][^/\\\\\\x00]*$","title":"Name","type":"string"},"parent_kind":{"$ref":"#/$defs/FolderParentKind","default":"root"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The category's id or the folder's id; none at the record's root.","title":"Parent Id"}},"required":["record_id","name"],"title":"ManageFilesCreateFolder","type":"object"},"ManageFilesDelete":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"}},"required":["file_id"],"title":"ManageFilesDelete","type":"object"},"ManageFilesDeleteFolder":{"additionalProperties":false,"properties":{"folder_id":{"description":"The folder's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Folder Id","type":"string"}},"required":["folder_id"],"title":"ManageFilesDeleteFolder","type":"object"},"ManageFilesExtract":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"object_type":{"description":"The type of the record to read out of the file (an invoice, a contract…).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Fill this record of `object_type` instead of creating one: confirming updates it, and\neach proposed value shows the record's `current` one. Needs write access to it.","title":"Record Id"}},"required":["file_id","object_type"],"title":"ManageFilesExtract","type":"object"},"ManageFilesRetryExtraction":{"additionalProperties":false,"properties":{"extraction_id":{"description":"The extraction's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Extraction Id","type":"string"}},"required":["extraction_id"],"title":"ManageFilesRetryExtraction","type":"object"},"ManageFilesTranscribe":{"additionalProperties":false,"properties":{"file_id":{"description":"The file's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"}},"required":["file_id"],"title":"ManageFilesTranscribe","type":"object"},"ManageFilesUpload":{"additionalProperties":false,"properties":{"filename":{"maxLength":256,"minLength":1,"title":"Filename","type":"string"},"content_type":{"maxLength":255,"minLength":3,"pattern":"^[\\w.+-]+/[\\w.+-]+$","title":"Content Type","type":"string"},"size":{"description":"Bytes; the upload must be exactly this size.","exclusiveMinimum":0,"title":"Size","type":"integer"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record the file belongs to: its access follows the record's.","title":"Record Id"},"attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The record's file attribute the file fills (an attachment field).","title":"Attribute"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity the file is attached to (a task's file), instead of a record: its access\nfollows the activity's.","title":"Activity Id"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant","description":"A file with no record or activity: the whole tenant's library, or its uploader's own."},"category_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"One of the file categories of the record's object type; needs `record_id`.","title":"Category Id"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"One of the record's folders (`RecordFolder`), instead of a category; needs\n`record_id`.","title":"Folder Id"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"key":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The caller's key for this upload: a retry with the same key (and the same file) answers\nthe same pending file with a fresh upload link instead of creating another.","title":"Key"}},"required":["filename","content_type","size"],"title":"ManageFilesUpload","type":"object"},"RecordFolderChange":{"additionalProperties":false,"description":"Rename a folder or move it within its record. Left-out fields stay; `parent_kind` and\n`parent_id` move it together.","properties":{"name":{"anyOf":[{"maxLength":255,"minLength":1,"pattern":"^[^/\\\\\\x00]*[^/\\\\\\x00\\s][^/\\\\\\x00]*$","type":"string"},{"type":"null"}],"default":null,"title":"Name"},"parent_kind":{"anyOf":[{"$ref":"#/$defs/FolderParentKind"},{"type":"null"}],"default":null},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version (the `version` read); None changes whatever is stored.","title":"Expected Version"}},"title":"RecordFolderChange","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"upload":{"anyOf":[{"$ref":"#/$defs/ManageFilesUpload"},{"type":"null"}],"default":null,"description":"Get a signed URL to PUT a file's bytes to, then call confirm."},"confirm":{"anyOf":[{"$ref":"#/$defs/ManageFilesConfirm"},{"type":"null"}],"default":null,"description":"Mark an uploaded file ready once storage holds exactly what was granted."},"change":{"anyOf":[{"$ref":"#/$defs/ManageFilesChange"},{"type":"null"}],"default":null,"description":"Rename a file, move it to another record or attribute, or share it. Left-out fields stay."},"delete":{"anyOf":[{"$ref":"#/$defs/ManageFilesDelete"},{"type":"null"}],"default":null,"description":"Delete a file."},"create_folder":{"anyOf":[{"$ref":"#/$defs/ManageFilesCreateFolder"},{"type":"null"}],"default":null,"description":"Create a folder on a record: at its root, in a file category of its type or in another folder. A folder of that name already there is returned."},"change_folder":{"anyOf":[{"$ref":"#/$defs/ManageFilesChangeFolder"},{"type":"null"}],"default":null,"description":"Rename a folder or move it within its record."},"delete_folder":{"anyOf":[{"$ref":"#/$defs/ManageFilesDeleteFolder"},{"type":"null"}],"default":null,"description":"Delete a folder with every file and folder in it. Ask folder_impact first and confirm with the person."},"transcribe":{"anyOf":[{"$ref":"#/$defs/ManageFilesTranscribe"},{"type":"null"}],"default":null,"description":"Transcribe an audio or video file."},"extract":{"anyOf":[{"$ref":"#/$defs/ManageFilesExtract"},{"type":"null"}],"default":null,"description":"Read a record of an object type (an invoice, a contract…) out of an uploaded file in the background, or fill an existing record (`record_id`). The proposed values wait for a person to confirm them. Asking again returns the same extraction."},"abandon_extraction":{"anyOf":[{"$ref":"#/$defs/ManageFilesAbandonExtraction"},{"type":"null"}],"default":null,"description":"Drop an extraction's proposal."},"retry_extraction":{"anyOf":[{"$ref":"#/$defs/ManageFilesRetryExtraction"},{"type":"null"}],"default":null,"description":"Run a failed extraction again."}},"title":"manage_filesArguments","type":"object"},"outputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"BoundingBox":{"additionalProperties":false,"description":"A region of a page, as fractions of the page's width and height from its top-left\ncorner.","properties":{"x":{"maximum":1,"minimum":0,"title":"X","type":"number"},"y":{"maximum":1,"minimum":0,"title":"Y","type":"number"},"width":{"maximum":1,"minimum":0,"title":"Width","type":"number"},"height":{"maximum":1,"minimum":0,"title":"Height","type":"number"}},"required":["x","y","width","height"],"title":"BoundingBox","type":"object"},"Citation":{"additionalProperties":false,"description":"Where in the document a value was read: words found in its text, never only the\nmodel's say-so.","properties":{"quote":{"description":"The words as the document writes them.","maxLength":1000000,"title":"Quote","type":"string"},"page":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"The page they are on (1 for a document without pages).","title":"Page"},"box":{"anyOf":[{"$ref":"#/$defs/BoundingBox"},{"type":"null"}],"default":null,"description":"Where on the page, when text extraction gives the lines' positions (OCR)."}},"required":["quote"],"title":"Citation","type":"object"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"ExtractionFailure":{"description":"Why no record could be read out of a file (`FileExtraction.failure`).","enum":["unsupported_type","too_large","unreadable","wrong_document","multiple_records","nothing_found","low_confidence","model_unavailable"],"title":"ExtractionFailure","type":"string"},"ExtractionIssue":{"description":"Why a person should look twice at one proposed value (`ProposedValue.issue`).","enum":["ambiguous_date","unparseable_date","unmapped_currency","low_confidence","unresolved_relation"],"title":"ExtractionIssue","type":"string"},"ExtractionStatus":{"description":"Where reading a record out of a file stands.","enum":["pending","review","done","failed","abandoned"],"title":"ExtractionStatus","type":"string"},"FileAction":{"description":"What the caller may do with a file it sees (`FileInfo.allowed`).","enum":["change","share","delete"],"title":"FileAction","type":"string"},"FileExtraction":{"additionalProperties":false,"description":"A record read out of an uploaded file by a model, in the background, then confirmed by a\nperson (or created at once when the policy allows).","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"status":{"$ref":"#/$defs/ExtractionStatus","default":"pending"},"proposed":{"default":[],"description":"What the model read, once in review: one value per field, with options if ambiguous.","items":{"$ref":"#/$defs/ProposedValue"},"title":"Proposed","type":"array"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"description":"How sure the model was that the file is this record.","title":"Confidence"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record created, once done.","title":"Record Id"},"dropped":{"default":[],"description":"Fields the model answered that the type refused, left out of the record.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Dropped","type":"array"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"Why it failed.","title":"Reason"},"failure":{"anyOf":[{"$ref":"#/$defs/ExtractionFailure"},{"type":"null"}],"default":null,"description":"Why it failed, as a kind a client can act on (`reason` says it in words)."},"currency":{"anyOf":[{"pattern":"^[A-Z]{3}$","type":"string"},{"type":"null"}],"default":null,"description":"The currency the document's amounts are in (ISO 4217), when it says.","title":"Currency"},"attempts":{"default":0,"minimum":0,"title":"Attempts","type":"integer"},"requested_by":{"$ref":"#/$defs/PrincipalRef"},"requested_at":{"format":"date-time","title":"Requested At","type":"string"},"reviewed_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"Who confirmed or abandoned it (none when it was created at once)."},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","file_id","object_type","requested_by","requested_at"],"title":"FileExtraction","type":"object"},"FileInfo":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"filename":{"maxLength":256,"minLength":1,"title":"Filename","type":"string"},"content_type":{"title":"Content Type","type":"string"},"size":{"exclusiveMinimum":0,"title":"Size","type":"integer"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Attribute"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity the file is attached to; its access follows the activity's.","title":"Activity Id"},"category_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Its file category on the record's object type. An id the type no longer has reads as\nuncategorized.","title":"Category Id"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record's folder it sits in (`RecordFolder`); a file in a folder has no\n`category_id`.","title":"Folder Id"},"status":{"$ref":"#/$defs/FileStatus","default":"pending"},"visibility":{"$ref":"#/$defs/Visibility","default":"tenant"},"shared_with":{"description":"Members besides its uploader who see a private library file (read only).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"grants":{"default":[],"description":"Members or roles a private library file is shared with, each at a level: `read` sees\nit, `write` also renames, moves and deletes it. A file on a record or an activity follows\nthat instead.","items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"},"created_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"description":"Counts the file's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"},"allowed":{"description":"What the caller may do with the file, worked out by the same checks the action runs\n(empty where Core hands a file to something other than a caller).","items":{"$ref":"#/$defs/FileAction"},"title":"Allowed","type":"array","uniqueItems":true}},"required":["id","tenant_id","filename","content_type","size","created_by","created_at"],"title":"FileInfo","type":"object"},"FileStatus":{"enum":["pending","ready"],"title":"FileStatus","type":"string"},"FileTranscriptResult":{"additionalProperties":false,"properties":{"file_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"File Id","type":"string"},"transcript":{"maxLength":1000000,"title":"Transcript","type":"string"},"file":{"$ref":"#/$defs/FileInfo"}},"required":["file_id","transcript","file"],"title":"FileTranscriptResult","type":"object"},"FileUpload":{"additionalProperties":false,"properties":{"file":{"$ref":"#/$defs/FileInfo"},"url":{"title":"Url","type":"string"},"method":{"default":"PUT","title":"Method","type":"string"},"headers":{"additionalProperties":{"type":"string"},"description":"Headers the upload request must send as given (they are part of the signature).","title":"Headers","type":"object"},"expires_at":{"format":"date-time","title":"Expires At","type":"string"}},"required":["file","url","expires_at"],"title":"FileUpload","type":"object"},"FolderParentKind":{"description":"Where a folder of a record's files sits.","enum":["root","category","folder"],"title":"FolderParentKind","type":"string"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ProposedValue":{"additionalProperties":false,"description":"One field's value as read out of a file, waiting for a person to confirm it.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"value":{"description":"What the field would hold; null when nothing usable was read (see `issue`): the field\nis left out unless the person fills it.","title":"Value"},"options":{"default":[],"description":"Other values the file could also mean, when it was ambiguous; empty when it was not.","items":{},"title":"Options","type":"array"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"description":"How sure the model was of this value.","title":"Confidence"},"citations":{"default":[],"description":"Where the value was read, when the words were found in the document.","items":{"$ref":"#/$defs/Citation"},"title":"Citations","type":"array"},"issue":{"anyOf":[{"$ref":"#/$defs/ExtractionIssue"},{"type":"null"}],"default":null,"description":"Why a person should look twice at it."},"candidates":{"default":[],"description":"For a relation field: records the name read may mean (the value is the one exact\nmatch, if there is one; a relation is never created from a file).","items":{"$ref":"#/$defs/RelationCandidate"},"title":"Candidates","type":"array"},"current":{"default":null,"description":"The record's value now, when the extraction fills an existing record.","title":"Current"}},"required":["field","value"],"title":"ProposedValue","type":"object"},"RecordFolder":{"additionalProperties":false,"description":"A folder people made on a record, holding files and other folders. The categories of the\nrecord's object type are folders every record of the type shows; these are the record's\nown.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"name":{"maxLength":255,"minLength":1,"pattern":"^[^/\\\\\\x00]*[^/\\\\\\x00\\s][^/\\\\\\x00]*$","title":"Name","type":"string"},"parent_kind":{"$ref":"#/$defs/FolderParentKind","default":"root"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The category's or the folder's id; none at the record's root. A folder whose category\nthe type no longer has reads as at the root.","title":"Parent Id"},"created_by":{"$ref":"#/$defs/PrincipalRef"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"},"version":{"default":1,"description":"Counts the folder's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"},"files":{"default":0,"description":"Ready files in it and in every folder under it (in a listing).","minimum":0,"title":"Files","type":"integer"},"folders":{"default":0,"description":"Folders under it, at any depth (in a listing).","minimum":0,"title":"Folders","type":"integer"}},"required":["id","tenant_id","record_id","name","created_by","created_at"],"title":"RecordFolder","type":"object"},"RecordFolderImpact":{"additionalProperties":false,"description":"What deleting a folder deletes (asked before, or answered once done).","properties":{"folder_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Folder Id","type":"string"},"files":{"description":"Files in the folder and every folder under it.","minimum":0,"title":"Files","type":"integer"},"folders":{"description":"The folder itself and every folder under it.","minimum":1,"title":"Folders","type":"integer"}},"required":["folder_id","files","folders"],"title":"RecordFolderImpact","type":"object"},"RelationCandidate":{"additionalProperties":false,"description":"A record a name read for a relation field may mean.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"exact":{"default":false,"description":"Its title is the name read, ignoring case.","title":"Exact","type":"boolean"}},"required":["record_id"],"title":"RelationCandidate","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/FileUpload"},{"$ref":"#/$defs/FileInfo"},{"$ref":"#/$defs/Done"},{"$ref":"#/$defs/RecordFolder"},{"$ref":"#/$defs/RecordFolderImpact"},{"$ref":"#/$defs/FileTranscriptResult"},{"$ref":"#/$defs/FileExtraction"}],"title":"Result"}},"required":["result"],"title":"manage_filesOutput","type":"object"},"annotations":{"title":"Manage files","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"ingestion","title":"Ingestion","description":"Messages (emails, chats, calls, meetings) Core has taken in: where each stands and what it decided, totals, the skipped ones waiting for review, and how sources and new records are routed. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"IngestAction":{"description":"What ingestion did with a message.","enum":["ignore","archive","link_records","skipped_unclear"],"title":"IngestAction","type":"string"},"IngestStage":{"description":"How far processing of one ingested message got. Stages run in this order.","enum":["accepted","normalized","identity_resolved","conversation_built","classified","actionability_scored","records_written","activity_recorded","completed","failed"],"title":"IngestStage","type":"string"},"IngestionLlmBudget":{"additionalProperties":false,"properties":{"days":{"default":14,"description":"How many days back.","maximum":90,"minimum":1,"title":"Days","type":"integer"}},"title":"IngestionLlmBudget","type":"object"},"IngestionProvenance":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"IngestionProvenance","type":"object"},"IngestionQuery":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"stage":{"anyOf":[{"$ref":"#/$defs/IngestStage"},{"type":"null"}],"default":null},"action":{"anyOf":[{"$ref":"#/$defs/IngestAction"},{"type":"null"}],"default":null},"failed_only":{"default":false,"description":"Only messages whose last attempt failed.","title":"Failed Only","type":"boolean"},"source_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Source Type"}},"title":"IngestionQuery","type":"object"},"IngestionRouting":{"additionalProperties":false,"properties":{},"title":"IngestionRouting","type":"object"},"IngestionSkipped":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"resolved":{"default":false,"title":"Resolved","type":"boolean"}},"title":"IngestionSkipped","type":"object"},"IngestionSources":{"additionalProperties":false,"properties":{},"title":"IngestionSources","type":"object"},"IngestionStats":{"additionalProperties":false,"properties":{"since":{"description":"From (inclusive).","format":"date-time","title":"Since","type":"string"},"until":{"description":"To (exclusive).","format":"date-time","title":"Until","type":"string"}},"required":["since","until"],"title":"IngestionStats","type":"object"},"IngestionStatus":{"additionalProperties":false,"properties":{"ingest_id":{"description":"The ingested message's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"}},"required":["ingest_id"],"title":"IngestionStatus","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"status":{"anyOf":[{"$ref":"#/$defs/IngestionStatus"},{"type":"null"}],"default":null,"description":"Where processing of an ingested message stands and what it decided."},"query":{"anyOf":[{"$ref":"#/$defs/IngestionQuery"},{"type":"null"}],"default":null,"description":"Ingested messages newest first, by stage, action, source or failure."},"stats":{"anyOf":[{"$ref":"#/$defs/IngestionStats"},{"type":"null"}],"default":null,"description":"What ingestion did in a period: received, completed, failed, by action and by importance."},"skipped":{"anyOf":[{"$ref":"#/$defs/IngestionSkipped"},{"type":"null"}],"default":null,"description":"Messages ingestion skipped, waiting for a person (or resolved)."},"routing":{"anyOf":[{"$ref":"#/$defs/IngestionRouting"},{"type":"null"}],"default":null,"description":"Which object type new records of each archetype go to."},"sources":{"anyOf":[{"$ref":"#/$defs/IngestionSources"},{"type":"null"}],"default":null,"description":"How ingestion treats each source's messages."},"provenance":{"anyOf":[{"$ref":"#/$defs/IngestionProvenance"},{"type":"null"}],"default":null,"description":"The messages that created or changed a record."},"llm_budget":{"anyOf":[{"$ref":"#/$defs/IngestionLlmBudget"},{"type":"null"}],"default":null,"description":"What ingestion spends on the LLM per day, against its daily cap."}},"title":"ingestionArguments","type":"object"},"outputSchema":{"$defs":{"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"ChannelCategory":{"enum":["email","calendar","meeting_transcript","voice","chat","social","unknown"],"title":"ChannelCategory","type":"string"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"IdentityHandle":{"additionalProperties":false,"description":"One way to reach a party: an email address, a phone number, a domain, or a\nconnector-defined handle such as a chat user id.","properties":{"kind":{"description":"`email`, `phone`, `domain`, or an open connector-defined kind like `slack_user`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"value":{"description":"As given; Core normalises it by kind before matching.","maxLength":256,"minLength":1,"title":"Value","type":"string"}},"required":["kind","value"],"title":"IdentityHandle","type":"object"},"ImportanceBand":{"description":"What a message's importance score means for processing.","enum":["ignore","archive","summarize","promote"],"title":"ImportanceBand","type":"string"},"IngestAction":{"description":"What ingestion did with a message.","enum":["ignore","archive","link_records","skipped_unclear"],"title":"IngestAction","type":"string"},"IngestLane":{"description":"Which queue processes a message: a backfill in `bulk` never holds up `priority`.","enum":["priority","bulk"],"title":"IngestLane","type":"string"},"IngestProvenanceEntry":{"additionalProperties":false,"properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"source":{"$ref":"#/$defs/SourceRef"},"received_at":{"format":"date-time","title":"Received At","type":"string"},"stage":{"$ref":"#/$defs/IngestStage"},"action":{"anyOf":[{"$ref":"#/$defs/IngestAction"},{"type":"null"}],"default":null}},"required":["ingest_id","message_id","source","received_at","stage"],"title":"IngestProvenanceEntry","type":"object"},"IngestStage":{"description":"How far processing of one ingested message got. Stages run in this order.","enum":["accepted","normalized","identity_resolved","conversation_built","classified","actionability_scored","records_written","activity_recorded","completed","failed"],"title":"IngestStage","type":"string"},"IngestState":{"additionalProperties":false,"description":"Where processing of one ingested message stands, and what it decided.","properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"source":{"$ref":"#/$defs/SourceRef"},"received_at":{"format":"date-time","title":"Received At","type":"string"},"stage":{"$ref":"#/$defs/IngestStage","default":"accepted"},"participants":{"default":[],"items":{"$ref":"#/$defs/ResolvedParticipant"},"title":"Participants","type":"array"},"conversation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conversation Id"},"importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Importance"},"band":{"anyOf":[{"$ref":"#/$defs/ImportanceBand"},{"type":"null"}],"default":null},"classified_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Which classifier scored the message, e.g. `rules` or `llm`.","title":"Classified By"},"category":{"anyOf":[{"$ref":"#/$defs/MessageCategory"},{"type":"null"}],"default":null},"intents":{"items":{"$ref":"#/$defs/MessageIntent"},"title":"Intents","type":"array","uniqueItems":true},"action":{"anyOf":[{"$ref":"#/$defs/IngestAction"},{"type":"null"}],"default":null},"record_ids":{"description":"Every record the message is tied to: participants, organisations, linked records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"created_record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Created Record Ids","type":"array","uniqueItems":true},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity the message was recorded as (ADR 0012).","title":"Activity Id"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Completed At"},"replays":{"default":0,"description":"How many times the message was processed again on request.","minimum":0,"title":"Replays","type":"integer"},"lane":{"$ref":"#/$defs/IngestLane","default":"bulk"},"attempts":{"default":0,"description":"Failed attempts since the message was accepted or replayed.","minimum":0,"title":"Attempts","type":"integer"},"retry_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a failed message is tried again; None once it has succeeded or retries ran out.","title":"Retry At"}},"required":["ingest_id","tenant_id","message_id","source","received_at"],"title":"IngestState","type":"object"},"IngestStatePage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"states":{"default":[],"items":{"$ref":"#/$defs/IngestState"},"title":"States","type":"array"}},"title":"IngestStatePage","type":"object"},"IngestStats":{"additionalProperties":false,"description":"What ingestion did in [since, until).","properties":{"since":{"format":"date-time","title":"Since","type":"string"},"until":{"format":"date-time","title":"Until","type":"string"},"received":{"minimum":0,"title":"Received","type":"integer"},"completed":{"minimum":0,"title":"Completed","type":"integer"},"failed":{"description":"Messages whose last attempt failed.","minimum":0,"title":"Failed","type":"integer"},"by_action":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/$defs/IngestAction"},"title":"By Action","type":"object"},"by_band":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/$defs/ImportanceBand"},"title":"By Band","type":"object"}},"required":["since","until","received","completed","failed"],"title":"IngestStats","type":"object"},"IngestionRouting":{"additionalProperties":false,"description":"A tenant's routing of new records: the first matching rule, then the archetype's\ndefault, then the only type with the archetype. Anything else waits for review.","properties":{"defaults":{"additionalProperties":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"propertyNames":{"$ref":"#/$defs/Archetype"},"title":"Defaults","type":"object"},"rules":{"default":[],"items":{"$ref":"#/$defs/RoutingRule"},"maxItems":100,"title":"Rules","type":"array"},"version":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The stored version (0 before any is set). Sent back on a replace, it must still be\ncurrent, so two operators never overwrite each other's routing; left out, the replace\nalways applies.","title":"Version"}},"title":"IngestionRouting","type":"object"},"LlmBudget":{"additionalProperties":false,"description":"What ingestion spends on the LLM per day, newest first, against its daily cap. Tokens\nand credits come from recorded usage (the `core` metering backend).","properties":{"classify_with_llm":{"title":"Classify With Llm","type":"boolean"},"daily_cap":{"minimum":0,"title":"Daily Cap","type":"integer"},"days":{"default":[],"items":{"$ref":"#/$defs/LlmBudgetDay"},"title":"Days","type":"array"}},"required":["classify_with_llm","daily_cap"],"title":"LlmBudget","type":"object"},"LlmBudgetDay":{"additionalProperties":false,"properties":{"day":{"format":"date","title":"Day","type":"string"},"classifications":{"default":0,"description":"Messages the LLM classified.","minimum":0,"title":"Classifications","type":"integer"},"over_cap":{"default":0,"description":"Messages the rules classified because the day's cap was reached.","minimum":0,"title":"Over Cap","type":"integer"},"totals":{"description":"Tokens of every ingestion LLM call (classification, enrichment, threads).","patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"type":"number"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Totals","type":"object"},"credits":{"default":0.0,"title":"Credits","type":"number"}},"required":["day"],"title":"LlmBudgetDay","type":"object"},"MatchOutcome":{"enum":["matched","needs_review","no_match"],"title":"MatchOutcome","type":"string"},"MessageCategory":{"description":"What kind of message it is; some categories cap its band (`category_bands`).","enum":["sales","support","internal","marketing","spam","meeting","transactional","invoice","messaging","other"],"title":"MessageCategory","type":"string"},"MessageIntent":{"description":"What a message asks of its reader.","enum":["reply","meeting","payment","deadline","escalation"],"title":"MessageIntent","type":"string"},"ParticipantRole":{"enum":["sender","recipient"],"title":"ParticipantRole","type":"string"},"PartyKind":{"description":"Who a message participant is to the workspace.","enum":["external","internal","system","role"],"title":"PartyKind","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"RecordIngestProvenance":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"messages":{"default":[],"items":{"$ref":"#/$defs/IngestProvenanceEntry"},"title":"Messages","type":"array"}},"required":["record_id"],"title":"RecordIngestProvenance","type":"object"},"ResolvedParticipant":{"additionalProperties":false,"description":"A participant after normalisation and identity resolution.","properties":{"address":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Address","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"role":{"$ref":"#/$defs/ParticipantRole"},"handles":{"default":[],"description":"Normalised; empty when the address is not a valid handle of its channel.","items":{"$ref":"#/$defs/IdentityHandle"},"title":"Handles","type":"array"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The identity record the participant resolved to (or was created as).","title":"Record Id"},"outcome":{"anyOf":[{"$ref":"#/$defs/MatchOutcome"},{"type":"null"}],"default":null},"organization_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Organization Record Id"},"party":{"$ref":"#/$defs/PartyKind","default":"external","description":"Internal and system participants are never created as records, and their domains\nnever become organisations."}},"required":["address","role"],"title":"ResolvedParticipant","type":"object"},"RoutingRule":{"additionalProperties":false,"description":"Which object type receives the people (or organisations) of matching messages.","properties":{"archetype":{"$ref":"#/$defs/Archetype"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"domains":{"description":"The participant's email domain is one of these, or a subdomain of one.","items":{"maxLength":253,"minLength":1,"type":"string"},"maxItems":100,"title":"Domains","type":"array","uniqueItems":true},"source_types":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Source Types","type":"array","uniqueItems":true},"channels":{"items":{"$ref":"#/$defs/ChannelCategory"},"title":"Channels","type":"array","uniqueItems":true}},"required":["archetype","object_type"],"title":"RoutingRule","type":"object"},"SkippedAction":{"description":"How a person resolved a skipped message.","enum":["link","dismiss"],"title":"SkippedAction","type":"string"},"SkippedItem":{"additionalProperties":false,"description":"An important message no record could be tied to, waiting for a person.","properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"source_type":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"reason":{"maxLength":1000000,"title":"Reason","type":"string"},"resolved":{"default":false,"title":"Resolved","type":"boolean"},"resolution":{"anyOf":[{"$ref":"#/$defs/SkippedAction"},{"type":"null"}],"default":null},"resolved_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"resolved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Resolved At"},"created_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the message was kept for review.","title":"Created At"}},"required":["ingest_id","message_id","source_type","reason"],"title":"SkippedItem","type":"object"},"SkippedPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"items":{"default":[],"items":{"$ref":"#/$defs/SkippedItem"},"title":"Items","type":"array"}},"title":"SkippedPage","type":"object"},"SourceProfile":{"additionalProperties":false,"description":"How ingestion treats one source's messages in a tenant. Settings left out follow the\ndeployment's `IngestionPolicy`.","properties":{"source_type":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"min_importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every message of the source scores at least this (e.g. a call recorder).","title":"Min Importance"},"max_importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"...and at most this (0: the source's messages are ignored).","title":"Max Importance"},"classify_with_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Classify With Llm"},"create_records":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Whether unknown participants of the source's messages may become records.","title":"Create Records"},"lane":{"anyOf":[{"$ref":"#/$defs/IngestLane"},{"type":"null"}],"default":null}},"required":["source_type"],"title":"SourceProfile","type":"object"},"SourceProfileList":{"additionalProperties":false,"properties":{"profiles":{"default":[],"description":"By source type.","items":{"$ref":"#/$defs/SourceProfile"},"title":"Profiles","type":"array"}},"title":"SourceProfileList","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/IngestState"},{"$ref":"#/$defs/IngestStatePage"},{"$ref":"#/$defs/IngestStats"},{"$ref":"#/$defs/SkippedPage"},{"$ref":"#/$defs/IngestionRouting"},{"$ref":"#/$defs/SourceProfileList"},{"$ref":"#/$defs/RecordIngestProvenance"},{"$ref":"#/$defs/LlmBudget"}],"title":"Result"}},"required":["result"],"title":"ingestionOutput","type":"object"},"annotations":{"title":"Ingestion","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_ingestion","title":"Manage ingestion","description":"Submit messages, process them again, tie them to other records, resolve skipped ones, and set routing and source handling. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"Attachment":{"additionalProperties":false,"properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"mime_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"size_bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Size Bytes"},"url":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Url"}},"required":["name"],"title":"Attachment","type":"object"},"Channel":{"additionalProperties":false,"description":"The conversation surface a message arrived on.","properties":{"category":{"$ref":"#/$defs/ChannelCategory"},"type":{"description":"Connector-defined channel type, e.g. `inbox` or `direct_message`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Type","type":"string"},"id":{"description":"The channel inside the source, e.g. a mailbox or chat ID.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"}},"required":["category","type","id"],"title":"Channel","type":"object"},"ChannelCategory":{"enum":["email","calendar","meeting_transcript","voice","chat","social","unknown"],"title":"ChannelCategory","type":"string"},"IngestLane":{"description":"Which queue processes a message: a backfill in `bulk` never holds up `priority`.","enum":["priority","bulk"],"title":"IngestLane","type":"string"},"ManageIngestionIngest":{"additionalProperties":false,"properties":{"source":{"$ref":"#/$defs/SourceRef"},"channel":{"$ref":"#/$defs/Channel"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"thread_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Thread Id"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"submitted_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The tenant user the connector acted for, when there is one.","title":"Submitted By"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"content":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Content"},"participants":{"default":[],"items":{"$ref":"#/$defs/Participant"},"title":"Participants","type":"array"},"attachments":{"default":[],"items":{"$ref":"#/$defs/Attachment"},"title":"Attachments","type":"array"},"linked_records":{"default":[],"description":"Records the source already associates with this message.","items":{"$ref":"#/$defs/RecordRef"},"title":"Linked Records","type":"array"},"trust_level":{"$ref":"#/$defs/TrustLevel","default":"normal"},"headers":{"additionalProperties":{"maxLength":1000000,"type":"string"},"description":"Mail headers the source kept, for the rules: `List-Unsubscribe`, `Precedence`,\n`Auto-Submitted`, `X-Mailer`. Names compare case-insensitively.","maxProperties":50,"propertyNames":{"maxLength":100},"title":"Headers","type":"object"},"declared_activity_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Declared Activity Type"},"payload":{"additionalProperties":true,"description":"The provider payload, kept for reprocessing. Core does not depend on its shape.","title":"Payload","type":"object"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["source","channel","message_id","occurred_at"],"title":"ManageIngestionIngest","type":"object"},"ManageIngestionReanalyze":{"additionalProperties":false,"properties":{"activity_id":{"description":"The activity.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Activity Id","type":"string"}},"required":["activity_id"],"title":"ManageIngestionReanalyze","type":"object"},"ManageIngestionRelink":{"additionalProperties":false,"properties":{"ingest_id":{"description":"The ingested message's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"minItems":1,"title":"Record Ids","type":"array","uniqueItems":true}},"required":["ingest_id","record_ids"],"title":"ManageIngestionRelink","type":"object"},"ManageIngestionRemoveSource":{"additionalProperties":false,"properties":{"source_type":{"description":"The source.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"}},"required":["source_type"],"title":"ManageIngestionRemoveSource","type":"object"},"ManageIngestionReplay":{"additionalProperties":false,"properties":{"ingest_id":{"description":"The ingested message's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"}},"required":["ingest_id"],"title":"ManageIngestionReplay","type":"object"},"ManageIngestionReplayFailed":{"additionalProperties":false,"properties":{"limit":{"default":100,"description":"The most failed messages to replay, oldest first.","maximum":500,"minimum":1,"title":"Limit","type":"integer"}},"title":"ManageIngestionReplayFailed","type":"object"},"ManageIngestionResolveSkipped":{"additionalProperties":false,"properties":{"ingest_id":{"description":"The ingested message's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"action":{"$ref":"#/$defs/SkippedAction"},"record_ids":{"description":"For `link`: the records to tie the message to.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"title":"Record Ids","type":"array","uniqueItems":true}},"required":["ingest_id","action"],"title":"ManageIngestionResolveSkipped","type":"object"},"ManageIngestionResolveSkippedMany":{"additionalProperties":false,"properties":{"ingest_ids":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"minItems":1,"title":"Ingest Ids","type":"array","uniqueItems":true},"resolution":{"$ref":"#/$defs/SkippedResolution"}},"required":["ingest_ids","resolution"],"title":"ManageIngestionResolveSkippedMany","type":"object"},"ManageIngestionSetRouting":{"additionalProperties":false,"properties":{"defaults":{"additionalProperties":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"propertyNames":{"$ref":"#/$defs/Archetype"},"title":"Defaults","type":"object"},"rules":{"default":[],"items":{"$ref":"#/$defs/RoutingRule"},"maxItems":100,"title":"Rules","type":"array"},"version":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The stored version (0 before any is set). Sent back on a replace, it must still be\ncurrent, so two operators never overwrite each other's routing; left out, the replace\nalways applies.","title":"Version"}},"title":"ManageIngestionSetRouting","type":"object"},"ManageIngestionSetSource":{"additionalProperties":false,"properties":{"source_type":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"min_importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every message of the source scores at least this (e.g. a call recorder).","title":"Min Importance"},"max_importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"...and at most this (0: the source's messages are ignored).","title":"Max Importance"},"classify_with_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Classify With Llm"},"create_records":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Whether unknown participants of the source's messages may become records.","title":"Create Records"},"lane":{"anyOf":[{"$ref":"#/$defs/IngestLane"},{"type":"null"}],"default":null}},"required":["source_type"],"title":"ManageIngestionSetSource","type":"object"},"Participant":{"additionalProperties":false,"description":"A party to a message, as the connector saw it. Core resolves it to records.","properties":{"address":{"description":"Channel-specific handle: an email address, phone number or chat user ID.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Address","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"role":{"$ref":"#/$defs/ParticipantRole"},"recipient_kind":{"anyOf":[{"$ref":"#/$defs/RecipientKind"},{"type":"null"}],"default":null},"email":{"anyOf":[{"maxLength":320,"minLength":3,"pattern":"^\\S+@\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The participant's email when the source knows it besides `address` (a chat user's\nprofile email), so they resolve to the person who has it.","title":"Email"}},"required":["address","role"],"title":"Participant","type":"object"},"ParticipantRole":{"enum":["sender","recipient"],"title":"ParticipantRole","type":"string"},"RecipientKind":{"enum":["to","cc","bcc","attendee","channel","chat"],"title":"RecipientKind","type":"string"},"RecordRef":{"additionalProperties":false,"description":"Points at an entity record.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Slug of the record's object type, when the referrer knows it.","title":"Object Type"}},"required":["record_id"],"title":"RecordRef","type":"object"},"RoutingRule":{"additionalProperties":false,"description":"Which object type receives the people (or organisations) of matching messages.","properties":{"archetype":{"$ref":"#/$defs/Archetype"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"domains":{"description":"The participant's email domain is one of these, or a subdomain of one.","items":{"maxLength":253,"minLength":1,"type":"string"},"maxItems":100,"title":"Domains","type":"array","uniqueItems":true},"source_types":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Source Types","type":"array","uniqueItems":true},"channels":{"items":{"$ref":"#/$defs/ChannelCategory"},"title":"Channels","type":"array","uniqueItems":true}},"required":["archetype","object_type"],"title":"RoutingRule","type":"object"},"SkippedAction":{"description":"How a person resolved a skipped message.","enum":["link","dismiss"],"title":"SkippedAction","type":"string"},"SkippedResolution":{"additionalProperties":false,"properties":{"action":{"$ref":"#/$defs/SkippedAction"},"record_ids":{"description":"For `link`: the records to tie the message to.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":20,"title":"Record Ids","type":"array","uniqueItems":true}},"required":["action"],"title":"SkippedResolution","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"TrustLevel":{"enum":["high","normal","low"],"title":"TrustLevel","type":"string"}},"properties":{"ingest":{"anyOf":[{"$ref":"#/$defs/ManageIngestionIngest"},{"type":"null"}],"default":null,"description":"Submit an email, chat message, call or meeting for Core to resolve, classify and tie to records. Idempotent per source and message id."},"replay":{"anyOf":[{"$ref":"#/$defs/ManageIngestionReplay"},{"type":"null"}],"default":null,"description":"Process an ingested message again."},"replay_failed":{"anyOf":[{"$ref":"#/$defs/ManageIngestionReplayFailed"},{"type":"null"}],"default":null,"description":"Process the messages that failed again."},"relink":{"anyOf":[{"$ref":"#/$defs/ManageIngestionRelink"},{"type":"null"}],"default":null,"description":"Tie a message to exactly these records, replacing the ones ingestion chose; its activity follows."},"reanalyze":{"anyOf":[{"$ref":"#/$defs/ManageIngestionReanalyze"},{"type":"null"}],"default":null,"description":"Run the analysis of an ingested activity again."},"resolve_skipped":{"anyOf":[{"$ref":"#/$defs/ManageIngestionResolveSkipped"},{"type":"null"}],"default":null,"description":"Decide a skipped message: ingest it after all (tied to records), or dismiss it."},"resolve_skipped_many":{"anyOf":[{"$ref":"#/$defs/ManageIngestionResolveSkippedMany"},{"type":"null"}],"default":null,"description":"One decision for many skipped messages, each on its own."},"set_routing":{"anyOf":[{"$ref":"#/$defs/ManageIngestionSetRouting"},{"type":"null"}],"default":null,"description":"Replace the routing of new records."},"set_source":{"anyOf":[{"$ref":"#/$defs/ManageIngestionSetSource"},{"type":"null"}],"default":null,"description":"Set how ingestion treats one source's messages."},"remove_source":{"anyOf":[{"$ref":"#/$defs/ManageIngestionRemoveSource"},{"type":"null"}],"default":null,"description":"Forget a source's settings; the deployment's defaults apply."}},"title":"manage_ingestionArguments","type":"object"},"outputSchema":{"$defs":{"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"ChannelCategory":{"enum":["email","calendar","meeting_transcript","voice","chat","social","unknown"],"title":"ChannelCategory","type":"string"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"IdentityHandle":{"additionalProperties":false,"description":"One way to reach a party: an email address, a phone number, a domain, or a\nconnector-defined handle such as a chat user id.","properties":{"kind":{"description":"`email`, `phone`, `domain`, or an open connector-defined kind like `slack_user`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"value":{"description":"As given; Core normalises it by kind before matching.","maxLength":256,"minLength":1,"title":"Value","type":"string"}},"required":["kind","value"],"title":"IdentityHandle","type":"object"},"ImportanceBand":{"description":"What a message's importance score means for processing.","enum":["ignore","archive","summarize","promote"],"title":"ImportanceBand","type":"string"},"IngestAction":{"description":"What ingestion did with a message.","enum":["ignore","archive","link_records","skipped_unclear"],"title":"IngestAction","type":"string"},"IngestLane":{"description":"Which queue processes a message: a backfill in `bulk` never holds up `priority`.","enum":["priority","bulk"],"title":"IngestLane","type":"string"},"IngestReceipt":{"additionalProperties":false,"description":"Core's answer to an `IngestRequest`. A duplicate returns the original receipt.","properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"status":{"$ref":"#/$defs/IngestStatus"},"received_at":{"format":"date-time","title":"Received At","type":"string"}},"required":["ingest_id","tenant_id","message_id","status","received_at"],"title":"IngestReceipt","type":"object"},"IngestStage":{"description":"How far processing of one ingested message got. Stages run in this order.","enum":["accepted","normalized","identity_resolved","conversation_built","classified","actionability_scored","records_written","activity_recorded","completed","failed"],"title":"IngestStage","type":"string"},"IngestState":{"additionalProperties":false,"description":"Where processing of one ingested message stands, and what it decided.","properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"source":{"$ref":"#/$defs/SourceRef"},"received_at":{"format":"date-time","title":"Received At","type":"string"},"stage":{"$ref":"#/$defs/IngestStage","default":"accepted"},"participants":{"default":[],"items":{"$ref":"#/$defs/ResolvedParticipant"},"title":"Participants","type":"array"},"conversation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Conversation Id"},"importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Importance"},"band":{"anyOf":[{"$ref":"#/$defs/ImportanceBand"},{"type":"null"}],"default":null},"classified_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Which classifier scored the message, e.g. `rules` or `llm`.","title":"Classified By"},"category":{"anyOf":[{"$ref":"#/$defs/MessageCategory"},{"type":"null"}],"default":null},"intents":{"items":{"$ref":"#/$defs/MessageIntent"},"title":"Intents","type":"array","uniqueItems":true},"action":{"anyOf":[{"$ref":"#/$defs/IngestAction"},{"type":"null"}],"default":null},"record_ids":{"description":"Every record the message is tied to: participants, organisations, linked records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array","uniqueItems":true},"created_record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Created Record Ids","type":"array","uniqueItems":true},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The activity the message was recorded as (ADR 0012).","title":"Activity Id"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Completed At"},"replays":{"default":0,"description":"How many times the message was processed again on request.","minimum":0,"title":"Replays","type":"integer"},"lane":{"$ref":"#/$defs/IngestLane","default":"bulk"},"attempts":{"default":0,"description":"Failed attempts since the message was accepted or replayed.","minimum":0,"title":"Attempts","type":"integer"},"retry_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a failed message is tried again; None once it has succeeded or retries ran out.","title":"Retry At"}},"required":["ingest_id","tenant_id","message_id","source","received_at"],"title":"IngestState","type":"object"},"IngestStatus":{"enum":["accepted","deferred","duplicate","requeued"],"title":"IngestStatus","type":"string"},"IngestionRouting":{"additionalProperties":false,"description":"A tenant's routing of new records: the first matching rule, then the archetype's\ndefault, then the only type with the archetype. Anything else waits for review.","properties":{"defaults":{"additionalProperties":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"propertyNames":{"$ref":"#/$defs/Archetype"},"title":"Defaults","type":"object"},"rules":{"default":[],"items":{"$ref":"#/$defs/RoutingRule"},"maxItems":100,"title":"Rules","type":"array"},"version":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"The stored version (0 before any is set). Sent back on a replace, it must still be\ncurrent, so two operators never overwrite each other's routing; left out, the replace\nalways applies.","title":"Version"}},"title":"IngestionRouting","type":"object"},"MatchOutcome":{"enum":["matched","needs_review","no_match"],"title":"MatchOutcome","type":"string"},"MessageCategory":{"description":"What kind of message it is; some categories cap its band (`category_bands`).","enum":["sales","support","internal","marketing","spam","meeting","transactional","invoice","messaging","other"],"title":"MessageCategory","type":"string"},"MessageIntent":{"description":"What a message asks of its reader.","enum":["reply","meeting","payment","deadline","escalation"],"title":"MessageIntent","type":"string"},"ParticipantRole":{"enum":["sender","recipient"],"title":"ParticipantRole","type":"string"},"PartyKind":{"description":"Who a message participant is to the workspace.","enum":["external","internal","system","role"],"title":"PartyKind","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ReplayReceipt":{"additionalProperties":false,"properties":{"ingest_ids":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Ingest Ids","type":"array"}},"title":"ReplayReceipt","type":"object"},"ResolvedParticipant":{"additionalProperties":false,"description":"A participant after normalisation and identity resolution.","properties":{"address":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Address","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"role":{"$ref":"#/$defs/ParticipantRole"},"handles":{"default":[],"description":"Normalised; empty when the address is not a valid handle of its channel.","items":{"$ref":"#/$defs/IdentityHandle"},"title":"Handles","type":"array"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The identity record the participant resolved to (or was created as).","title":"Record Id"},"outcome":{"anyOf":[{"$ref":"#/$defs/MatchOutcome"},{"type":"null"}],"default":null},"organization_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Organization Record Id"},"party":{"$ref":"#/$defs/PartyKind","default":"external","description":"Internal and system participants are never created as records, and their domains\nnever become organisations."}},"required":["address","role"],"title":"ResolvedParticipant","type":"object"},"RoutingRule":{"additionalProperties":false,"description":"Which object type receives the people (or organisations) of matching messages.","properties":{"archetype":{"$ref":"#/$defs/Archetype"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"domains":{"description":"The participant's email domain is one of these, or a subdomain of one.","items":{"maxLength":253,"minLength":1,"type":"string"},"maxItems":100,"title":"Domains","type":"array","uniqueItems":true},"source_types":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Source Types","type":"array","uniqueItems":true},"channels":{"items":{"$ref":"#/$defs/ChannelCategory"},"title":"Channels","type":"array","uniqueItems":true}},"required":["archetype","object_type"],"title":"RoutingRule","type":"object"},"SkippedAction":{"description":"How a person resolved a skipped message.","enum":["link","dismiss"],"title":"SkippedAction","type":"string"},"SkippedBulkItem":{"additionalProperties":false,"properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"item":{"anyOf":[{"$ref":"#/$defs/SkippedItem"},{"type":"null"}],"default":null},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null}},"required":["ingest_id"],"title":"SkippedBulkItem","type":"object"},"SkippedBulkResult":{"additionalProperties":false,"properties":{"items":{"default":[],"description":"One per message, in id order: the resolved item, or the error that stopped it.","items":{"$ref":"#/$defs/SkippedBulkItem"},"title":"Items","type":"array"}},"title":"SkippedBulkResult","type":"object"},"SkippedItem":{"additionalProperties":false,"description":"An important message no record could be tied to, waiting for a person.","properties":{"ingest_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ingest Id","type":"string"},"message_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Message Id","type":"string"},"source_type":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"subject":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"reason":{"maxLength":1000000,"title":"Reason","type":"string"},"resolved":{"default":false,"title":"Resolved","type":"boolean"},"resolution":{"anyOf":[{"$ref":"#/$defs/SkippedAction"},{"type":"null"}],"default":null},"resolved_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"resolved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Resolved At"},"created_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the message was kept for review.","title":"Created At"}},"required":["ingest_id","message_id","source_type","reason"],"title":"SkippedItem","type":"object"},"SourceProfile":{"additionalProperties":false,"description":"How ingestion treats one source's messages in a tenant. Settings left out follow the\ndeployment's `IngestionPolicy`.","properties":{"source_type":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"min_importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every message of the source scores at least this (e.g. a call recorder).","title":"Min Importance"},"max_importance":{"anyOf":[{"maximum":100,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"...and at most this (0: the source's messages are ignored).","title":"Max Importance"},"classify_with_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Classify With Llm"},"create_records":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Whether unknown participants of the source's messages may become records.","title":"Create Records"},"lane":{"anyOf":[{"$ref":"#/$defs/IngestLane"},{"type":"null"}],"default":null}},"required":["source_type"],"title":"SourceProfile","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/IngestReceipt"},{"$ref":"#/$defs/IngestState"},{"$ref":"#/$defs/ReplayReceipt"},{"$ref":"#/$defs/SkippedItem"},{"$ref":"#/$defs/SkippedBulkResult"},{"$ref":"#/$defs/IngestionRouting"},{"$ref":"#/$defs/SourceProfile"},{"$ref":"#/$defs/Done"}],"title":"Result"}},"required":["result"],"title":"manage_ingestionOutput","type":"object"},"annotations":{"title":"Manage ingestion","readOnlyHint":false,"destructiveHint":false,"openWorldHint":false}},{"name":"agents","title":"Agents","description":"The workspace's agents and their configuration (context scope, plugins, routines); an agent runtime runs them. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AgentsGet":{"additionalProperties":false,"properties":{"agent_id":{"description":"The agent's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"}},"required":["agent_id"],"title":"AgentsGet","type":"object"},"AgentsList":{"additionalProperties":false,"properties":{"include_archived":{"default":false,"description":"Archived ones too.","title":"Include Archived","type":"boolean"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"AgentsList","type":"object"}},"properties":{"list":{"anyOf":[{"$ref":"#/$defs/AgentsList"},{"type":"null"}],"default":null,"description":"The agents, newest first."},"get":{"anyOf":[{"$ref":"#/$defs/AgentsGet"},{"type":"null"}],"default":null,"description":"One agent's configuration."}},"title":"agentsArguments","type":"object"},"outputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"Agent":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"status":{"$ref":"#/$defs/AgentStatus","default":"active"},"context_scope":{"$ref":"#/$defs/AgentContextScope"},"use_scope":{"anyOf":[{"$ref":"#/$defs/UseScope"},{"type":"null"}],"default":null},"plugins":{"default":[],"items":{"$ref":"#/$defs/AgentPlugin"},"title":"Plugins","type":"array"},"routines":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Routines","type":"array","uniqueItems":true},"runtime_deployment_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Runtime Deployment Id"},"deployment":{"anyOf":[{"$ref":"#/$defs/AgentDeployment"},{"type":"null"}],"default":null,"description":"The deployment the agent should have; null: configuration only."},"config_version":{"default":1,"description":"Increases with every change; runtimes reload when it moves.","minimum":1,"title":"Config Version","type":"integer"},"created_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["id","tenant_id","name","created_at","updated_at"],"title":"Agent","type":"object"},"AgentContextScope":{"additionalProperties":false,"properties":{"mode":{"$ref":"#/$defs/ContextScopeMode","default":"inherit"},"object_types":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Object Types","type":"array","uniqueItems":true},"sources":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Sources","type":"array","uniqueItems":true}},"title":"AgentContextScope","type":"object"},"AgentDeployment":{"additionalProperties":false,"description":"The deployment an agent should have. The agent host converges on it\n(`GET /agents/{id}/runtime` says how far it got).","properties":{"engine":{"description":"A catalog engine, or a registered image kind such as `revops`; the instance must offer\nit (`GET /agents/engines`).","pattern":"^[a-z][a-z0-9-]{1,39}$","title":"Engine","type":"string"},"version":{"anyOf":[{"pattern":"^[0-9A-Za-z][0-9A-Za-z.+_-]{0,63}$","type":"string"},{"type":"null"}],"default":null,"description":"Pin a listed version; omitted, the latest listed one when the deployment is created.","title":"Version"},"template":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Template"},"model":{"maxLength":200,"minLength":1,"title":"Model","type":"string"},"inference":{"default":"default","description":"The inference upstream the agent's calls go to.","maxLength":100,"minLength":1,"title":"Inference","type":"string"},"remote_endpoint":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"description":"For remote engines only: the agent the engine bridges to.","title":"Remote Endpoint"},"personality_preset":{"anyOf":[{"enum":["professional","friendly","concise","technical","custom"],"type":"string"},{"type":"null"}],"default":null,"description":"The agent's tone. Omitted: a first deployment is `professional` and a later one keeps\nwhat the agent has. Changing it applies to the running agent without a restart.","title":"Personality Preset"},"personality_custom":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text tone and style; required with, and only with, `personality_preset: custom`.","title":"Personality Custom"},"reasoning_effort":{"anyOf":[{"maxLength":20,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The deployment's global reasoning level for LLM calls. Omitted on update keeps the current\nlevel; a first deployment defaults to `low` in the agent host.","title":"Reasoning Effort"},"state":{"$ref":"#/$defs/AgentDeploymentState","default":"running"},"deployment_version":{"default":1,"description":"Raised by every change to the deployment, a stop and a restart.","minimum":1,"title":"Deployment Version","type":"integer"},"restart_token":{"default":0,"description":"Raised by a restart; a change makes the host redeploy.","minimum":0,"title":"Restart Token","type":"integer"},"upgrade_image":{"default":false,"description":"The last restart asked for the newest listed release of the engine.","title":"Upgrade Image","type":"boolean"},"update_policy":{"$ref":"#/$defs/AgentUpdatePolicy","default":{"mode":"notify","auto_window":null}},"owner":{"$ref":"#/$defs/AgentDeploymentOwner"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["engine","model","owner","updated_at"],"title":"AgentDeployment","type":"object"},"AgentDeploymentOwner":{"additionalProperties":false,"description":"Who the deployment acts as: the person or key that last set it, as it was then. The\nagent host runs it with exactly these scopes, so it can do no more than they could.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"maxItems":200,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Scopes"}},"required":["id","kind"],"title":"AgentDeploymentOwner","type":"object"},"AgentDeploymentState":{"description":"What an agent's owner wants of its deployment (ADR 0033 section 2).","enum":["running","stopped"],"title":"AgentDeploymentState","type":"string"},"AgentPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"agents":{"default":[],"items":{"$ref":"#/$defs/Agent"},"title":"Agents","type":"array"}},"title":"AgentPage","type":"object"},"AgentPlugin":{"additionalProperties":false,"properties":{"kind":{"$ref":"#/$defs/AgentPluginKind"},"ref":{"description":"The MCP server, connector toolkit or tool. Integration refs match without case.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ref","type":"string"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"allowed_tools":{"description":"Empty: every tool of the plugin.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Allowed Tools","type":"array","uniqueItems":true}},"required":["kind","ref"],"title":"AgentPlugin","type":"object"},"AgentPluginKind":{"enum":["mcp","integration","tool"],"title":"AgentPluginKind","type":"string"},"AgentStatus":{"enum":["active","archived"],"title":"AgentStatus","type":"string"},"AgentUpdateMode":{"enum":["off","notify","auto"],"title":"AgentUpdateMode","type":"string"},"AgentUpdatePolicy":{"additionalProperties":false,"properties":{"mode":{"$ref":"#/$defs/AgentUpdateMode"},"auto_window":{"anyOf":[{"$ref":"#/$defs/AgentUpdateWindow"},{"type":"null"}],"default":null,"description":"When absent, auto uses 01:00 to 05:00 UTC."}},"required":["mode"],"title":"AgentUpdatePolicy","type":"object"},"AgentUpdateWindow":{"additionalProperties":false,"properties":{"start_hour":{"maximum":23,"minimum":0,"title":"Start Hour","type":"integer"},"end_hour":{"maximum":23,"minimum":0,"title":"End Hour","type":"integer"},"timezone":{"maxLength":100,"minLength":1,"title":"Timezone","type":"string"}},"required":["start_hour","end_hour","timezone"],"title":"AgentUpdateWindow","type":"object"},"ContextScopeMode":{"enum":["inherit","restricted"],"title":"ContextScopeMode","type":"string"},"PolicyEffect":{"enum":["allow","deny","require_approval"],"title":"PolicyEffect","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ToolRule":{"additionalProperties":false,"properties":{"match":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*(\\.\\*)?$","title":"Match","type":"string"},"effect":{"$ref":"#/$defs/PolicyEffect"}},"required":["match","effect"],"title":"ToolRule","type":"object"},"UseScope":{"additionalProperties":false,"description":"What an app (or an agent) may do and see. It only narrows, never grants.","properties":{"actions":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"The ceiling of `CoreAction`s; `None` limits nothing.","title":"Actions"},"data":{"$ref":"#/$defs/UseScopeData"},"tools":{"$ref":"#/$defs/UseScopeTools"}},"title":"UseScope","type":"object"},"UseScopeData":{"additionalProperties":false,"description":"The data an app reaches. Each part left `None` limits nothing.","properties":{"object_types":{"anyOf":[{"patternProperties":{"^[a-z][a-z0-9_]*$":{"$ref":"#/$defs/AccessLevel"}},"propertyNames":{"maxLength":256,"minLength":1},"type":"object"},{"type":"null"}],"default":null,"description":"Object type slug to the highest access the app has to it; others are out of reach.","title":"Object Types"},"sources":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"The sources whose data the app may reach.","title":"Sources"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null,"description":"`principal`: only data the signed-in person owns."}},"title":"UseScopeData","type":"object"},"UseScopeTools":{"additionalProperties":false,"description":"Tool rules, the first match winning, then `default_effect`.","properties":{"rules":{"default":[],"items":{"$ref":"#/$defs/ToolRule"},"maxItems":100,"title":"Rules","type":"array"},"default_effect":{"$ref":"#/$defs/PolicyEffect","default":"allow"}},"title":"UseScopeTools","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/AgentPage"},{"$ref":"#/$defs/Agent"}],"title":"Result"}},"required":["result"],"title":"agentsOutput","type":"object"},"annotations":{"title":"Agents","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_agents","title":"Manage agents","description":"Create, configure and archive agents. Needs agents.manage. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AgentContextScope":{"additionalProperties":false,"properties":{"mode":{"$ref":"#/$defs/ContextScopeMode","default":"inherit"},"object_types":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Object Types","type":"array","uniqueItems":true},"sources":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Sources","type":"array","uniqueItems":true}},"title":"AgentContextScope","type":"object"},"AgentDeploymentSpec":{"additionalProperties":false,"description":"What to run for an agent (ADR 0033 section 2): the same choices as a host deployment.","properties":{"engine":{"description":"A catalog engine, or a registered image kind such as `revops`; the instance must offer\nit (`GET /agents/engines`).","pattern":"^[a-z][a-z0-9-]{1,39}$","title":"Engine","type":"string"},"version":{"anyOf":[{"pattern":"^[0-9A-Za-z][0-9A-Za-z.+_-]{0,63}$","type":"string"},{"type":"null"}],"default":null,"description":"Pin a listed version; omitted, the latest listed one when the deployment is created.","title":"Version"},"template":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Template"},"model":{"maxLength":200,"minLength":1,"title":"Model","type":"string"},"inference":{"default":"default","description":"The inference upstream the agent's calls go to.","maxLength":100,"minLength":1,"title":"Inference","type":"string"},"remote_endpoint":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"description":"For remote engines only: the agent the engine bridges to.","title":"Remote Endpoint"},"personality_preset":{"anyOf":[{"enum":["professional","friendly","concise","technical","custom"],"type":"string"},{"type":"null"}],"default":null,"description":"The agent's tone. Omitted: a first deployment is `professional` and a later one keeps\nwhat the agent has. Changing it applies to the running agent without a restart.","title":"Personality Preset"},"personality_custom":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text tone and style; required with, and only with, `personality_preset: custom`.","title":"Personality Custom"},"reasoning_effort":{"anyOf":[{"maxLength":20,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The deployment's global reasoning level for LLM calls. Omitted on update keeps the current\nlevel; a first deployment defaults to `low` in the agent host.","title":"Reasoning Effort"}},"required":["engine","model"],"title":"AgentDeploymentSpec","type":"object"},"AgentPlugin":{"additionalProperties":false,"properties":{"kind":{"$ref":"#/$defs/AgentPluginKind"},"ref":{"description":"The MCP server, connector toolkit or tool. Integration refs match without case.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ref","type":"string"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"allowed_tools":{"description":"Empty: every tool of the plugin.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Allowed Tools","type":"array","uniqueItems":true}},"required":["kind","ref"],"title":"AgentPlugin","type":"object"},"AgentPluginKind":{"enum":["mcp","integration","tool"],"title":"AgentPluginKind","type":"string"},"AgentUpdate":{"additionalProperties":false,"description":"Omitted fields stay; `runtime_deployment_id: null` detaches the runtime.","properties":{"name":{"anyOf":[{"maxLength":120,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"context_scope":{"anyOf":[{"$ref":"#/$defs/AgentContextScope"},{"type":"null"}],"default":null},"use_scope":{"anyOf":[{"$ref":"#/$defs/UseScope"},{"type":"null"}],"default":null,"description":"`null` (set explicitly) lifts the narrowing."},"plugins":{"anyOf":[{"items":{"$ref":"#/$defs/AgentPlugin"},"maxItems":50,"type":"array"},{"type":"null"}],"default":null,"title":"Plugins"},"routines":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":200,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Routines"},"runtime_deployment_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Runtime Deployment Id"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Apply only to this `config_version` (`409` when it moved on).","title":"Expected Version"}},"title":"AgentUpdate","type":"object"},"ContextScopeMode":{"enum":["inherit","restricted"],"title":"ContextScopeMode","type":"string"},"ManageAgentsArchive":{"additionalProperties":false,"properties":{"agent_id":{"description":"The agent's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"}},"required":["agent_id"],"title":"ManageAgentsArchive","type":"object"},"ManageAgentsCreate":{"additionalProperties":false,"properties":{"key":{"description":"Makes the create retry-safe: the same key returns the agent it created.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"context_scope":{"$ref":"#/$defs/AgentContextScope"},"use_scope":{"anyOf":[{"$ref":"#/$defs/UseScope"},{"type":"null"}],"default":null,"description":"What the workspace lets the agent use and see (ADR 0031): only narrows, `None` limits\nnothing. Beside `plugins` (what the agent has) and `context_scope` (what it asks to read)."},"plugins":{"default":[],"items":{"$ref":"#/$defs/AgentPlugin"},"maxItems":50,"title":"Plugins","type":"array"},"routines":{"description":"Routine definition ids; they do not schedule anything.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":200,"title":"Routines","type":"array","uniqueItems":true},"runtime_deployment_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Runtime Deployment Id"},"deployment":{"anyOf":[{"$ref":"#/$defs/AgentDeploymentSpec"},{"type":"null"}],"default":null,"description":"Create and deploy in one call."},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","name"],"title":"ManageAgentsCreate","type":"object"},"ManageAgentsUpdate":{"additionalProperties":false,"properties":{"agent_id":{"description":"The agent's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"change":{"$ref":"#/$defs/AgentUpdate","description":"Fields."}},"required":["agent_id","change"],"title":"ManageAgentsUpdate","type":"object"},"PolicyEffect":{"enum":["allow","deny","require_approval"],"title":"PolicyEffect","type":"string"},"ToolRule":{"additionalProperties":false,"properties":{"match":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*(\\.\\*)?$","title":"Match","type":"string"},"effect":{"$ref":"#/$defs/PolicyEffect"}},"required":["match","effect"],"title":"ToolRule","type":"object"},"UseScope":{"additionalProperties":false,"description":"What an app (or an agent) may do and see. It only narrows, never grants.","properties":{"actions":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"The ceiling of `CoreAction`s; `None` limits nothing.","title":"Actions"},"data":{"$ref":"#/$defs/UseScopeData"},"tools":{"$ref":"#/$defs/UseScopeTools"}},"title":"UseScope","type":"object"},"UseScopeData":{"additionalProperties":false,"description":"The data an app reaches. Each part left `None` limits nothing.","properties":{"object_types":{"anyOf":[{"patternProperties":{"^[a-z][a-z0-9_]*$":{"$ref":"#/$defs/AccessLevel"}},"propertyNames":{"maxLength":256,"minLength":1},"type":"object"},{"type":"null"}],"default":null,"description":"Object type slug to the highest access the app has to it; others are out of reach.","title":"Object Types"},"sources":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"The sources whose data the app may reach.","title":"Sources"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null,"description":"`principal`: only data the signed-in person owns."}},"title":"UseScopeData","type":"object"},"UseScopeTools":{"additionalProperties":false,"description":"Tool rules, the first match winning, then `default_effect`.","properties":{"rules":{"default":[],"items":{"$ref":"#/$defs/ToolRule"},"maxItems":100,"title":"Rules","type":"array"},"default_effect":{"$ref":"#/$defs/PolicyEffect","default":"allow"}},"title":"UseScopeTools","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"create":{"anyOf":[{"$ref":"#/$defs/ManageAgentsCreate"},{"type":"null"}],"default":null,"description":"A new agent. The same `key` returns the first agent."},"update":{"anyOf":[{"$ref":"#/$defs/ManageAgentsUpdate"},{"type":"null"}],"default":null,"description":"Change the fields sent; each change is a new configuration version."},"archive":{"anyOf":[{"$ref":"#/$defs/ManageAgentsArchive"},{"type":"null"}],"default":null,"description":"Archive an agent."}},"title":"manage_agentsArguments","type":"object"},"outputSchema":{"$defs":{"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"Agent":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"status":{"$ref":"#/$defs/AgentStatus","default":"active"},"context_scope":{"$ref":"#/$defs/AgentContextScope"},"use_scope":{"anyOf":[{"$ref":"#/$defs/UseScope"},{"type":"null"}],"default":null},"plugins":{"default":[],"items":{"$ref":"#/$defs/AgentPlugin"},"title":"Plugins","type":"array"},"routines":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Routines","type":"array","uniqueItems":true},"runtime_deployment_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Runtime Deployment Id"},"deployment":{"anyOf":[{"$ref":"#/$defs/AgentDeployment"},{"type":"null"}],"default":null,"description":"The deployment the agent should have; null: configuration only."},"config_version":{"default":1,"description":"Increases with every change; runtimes reload when it moves.","minimum":1,"title":"Config Version","type":"integer"},"created_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["id","tenant_id","name","created_at","updated_at"],"title":"Agent","type":"object"},"AgentContextScope":{"additionalProperties":false,"properties":{"mode":{"$ref":"#/$defs/ContextScopeMode","default":"inherit"},"object_types":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Object Types","type":"array","uniqueItems":true},"sources":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Sources","type":"array","uniqueItems":true}},"title":"AgentContextScope","type":"object"},"AgentDeployment":{"additionalProperties":false,"description":"The deployment an agent should have. The agent host converges on it\n(`GET /agents/{id}/runtime` says how far it got).","properties":{"engine":{"description":"A catalog engine, or a registered image kind such as `revops`; the instance must offer\nit (`GET /agents/engines`).","pattern":"^[a-z][a-z0-9-]{1,39}$","title":"Engine","type":"string"},"version":{"anyOf":[{"pattern":"^[0-9A-Za-z][0-9A-Za-z.+_-]{0,63}$","type":"string"},{"type":"null"}],"default":null,"description":"Pin a listed version; omitted, the latest listed one when the deployment is created.","title":"Version"},"template":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Template"},"model":{"maxLength":200,"minLength":1,"title":"Model","type":"string"},"inference":{"default":"default","description":"The inference upstream the agent's calls go to.","maxLength":100,"minLength":1,"title":"Inference","type":"string"},"remote_endpoint":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"description":"For remote engines only: the agent the engine bridges to.","title":"Remote Endpoint"},"personality_preset":{"anyOf":[{"enum":["professional","friendly","concise","technical","custom"],"type":"string"},{"type":"null"}],"default":null,"description":"The agent's tone. Omitted: a first deployment is `professional` and a later one keeps\nwhat the agent has. Changing it applies to the running agent without a restart.","title":"Personality Preset"},"personality_custom":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text tone and style; required with, and only with, `personality_preset: custom`.","title":"Personality Custom"},"reasoning_effort":{"anyOf":[{"maxLength":20,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The deployment's global reasoning level for LLM calls. Omitted on update keeps the current\nlevel; a first deployment defaults to `low` in the agent host.","title":"Reasoning Effort"},"state":{"$ref":"#/$defs/AgentDeploymentState","default":"running"},"deployment_version":{"default":1,"description":"Raised by every change to the deployment, a stop and a restart.","minimum":1,"title":"Deployment Version","type":"integer"},"restart_token":{"default":0,"description":"Raised by a restart; a change makes the host redeploy.","minimum":0,"title":"Restart Token","type":"integer"},"upgrade_image":{"default":false,"description":"The last restart asked for the newest listed release of the engine.","title":"Upgrade Image","type":"boolean"},"update_policy":{"$ref":"#/$defs/AgentUpdatePolicy","default":{"mode":"notify","auto_window":null}},"owner":{"$ref":"#/$defs/AgentDeploymentOwner"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["engine","model","owner","updated_at"],"title":"AgentDeployment","type":"object"},"AgentDeploymentOwner":{"additionalProperties":false,"description":"Who the deployment acts as: the person or key that last set it, as it was then. The\nagent host runs it with exactly these scopes, so it can do no more than they could.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"maxItems":200,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Scopes"}},"required":["id","kind"],"title":"AgentDeploymentOwner","type":"object"},"AgentDeploymentState":{"description":"What an agent's owner wants of its deployment (ADR 0033 section 2).","enum":["running","stopped"],"title":"AgentDeploymentState","type":"string"},"AgentPlugin":{"additionalProperties":false,"properties":{"kind":{"$ref":"#/$defs/AgentPluginKind"},"ref":{"description":"The MCP server, connector toolkit or tool. Integration refs match without case.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Ref","type":"string"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"allowed_tools":{"description":"Empty: every tool of the plugin.","items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Allowed Tools","type":"array","uniqueItems":true}},"required":["kind","ref"],"title":"AgentPlugin","type":"object"},"AgentPluginKind":{"enum":["mcp","integration","tool"],"title":"AgentPluginKind","type":"string"},"AgentStatus":{"enum":["active","archived"],"title":"AgentStatus","type":"string"},"AgentUpdateMode":{"enum":["off","notify","auto"],"title":"AgentUpdateMode","type":"string"},"AgentUpdatePolicy":{"additionalProperties":false,"properties":{"mode":{"$ref":"#/$defs/AgentUpdateMode"},"auto_window":{"anyOf":[{"$ref":"#/$defs/AgentUpdateWindow"},{"type":"null"}],"default":null,"description":"When absent, auto uses 01:00 to 05:00 UTC."}},"required":["mode"],"title":"AgentUpdatePolicy","type":"object"},"AgentUpdateWindow":{"additionalProperties":false,"properties":{"start_hour":{"maximum":23,"minimum":0,"title":"Start Hour","type":"integer"},"end_hour":{"maximum":23,"minimum":0,"title":"End Hour","type":"integer"},"timezone":{"maxLength":100,"minLength":1,"title":"Timezone","type":"string"}},"required":["start_hour","end_hour","timezone"],"title":"AgentUpdateWindow","type":"object"},"ContextScopeMode":{"enum":["inherit","restricted"],"title":"ContextScopeMode","type":"string"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"PolicyEffect":{"enum":["allow","deny","require_approval"],"title":"PolicyEffect","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ToolRule":{"additionalProperties":false,"properties":{"match":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*(\\.\\*)?$","title":"Match","type":"string"},"effect":{"$ref":"#/$defs/PolicyEffect"}},"required":["match","effect"],"title":"ToolRule","type":"object"},"UseScope":{"additionalProperties":false,"description":"What an app (or an agent) may do and see. It only narrows, never grants.","properties":{"actions":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"The ceiling of `CoreAction`s; `None` limits nothing.","title":"Actions"},"data":{"$ref":"#/$defs/UseScopeData"},"tools":{"$ref":"#/$defs/UseScopeTools"}},"title":"UseScope","type":"object"},"UseScopeData":{"additionalProperties":false,"description":"The data an app reaches. Each part left `None` limits nothing.","properties":{"object_types":{"anyOf":[{"patternProperties":{"^[a-z][a-z0-9_]*$":{"$ref":"#/$defs/AccessLevel"}},"propertyNames":{"maxLength":256,"minLength":1},"type":"object"},{"type":"null"}],"default":null,"description":"Object type slug to the highest access the app has to it; others are out of reach.","title":"Object Types"},"sources":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"The sources whose data the app may reach.","title":"Sources"},"visibility":{"anyOf":[{"$ref":"#/$defs/Visibility"},{"type":"null"}],"default":null,"description":"`principal`: only data the signed-in person owns."}},"title":"UseScopeData","type":"object"},"UseScopeTools":{"additionalProperties":false,"description":"Tool rules, the first match winning, then `default_effect`.","properties":{"rules":{"default":[],"items":{"$ref":"#/$defs/ToolRule"},"maxItems":100,"title":"Rules","type":"array"},"default_effect":{"$ref":"#/$defs/PolicyEffect","default":"allow"}},"title":"UseScopeTools","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/Agent"},{"$ref":"#/$defs/Done"}],"title":"Result"}},"required":["result"],"title":"manage_agentsOutput","type":"object"},"annotations":{"title":"Manage agents","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"organize","title":"Organize","description":"How the workspace is organized: saved views, collections (lists with their own fields and stages), forms, task statuses and projects, email templates, stage rules and favorite folders; the caller's favorites and reminders; and reminder rules on date fields. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"ItemScope":{"enum":["shared","personal"],"title":"ItemScope","type":"string"},"OrganizeCollectionRecords":{"additionalProperties":false,"properties":{"collection_id":{"description":"The collection (a workspace item).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the title or any searchable text attribute.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only children of this record.","title":"Parent Record Id"},"include_archived":{"default":false,"title":"Include Archived","type":"boolean"},"equals":{"additionalProperties":true,"description":"Attribute slug → value: shorthand for `eq` filters.","title":"Equals","type":"object"},"filters":{"default":[],"description":"Every filter must hold.","items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"record_ids":{"description":"Only these records.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":5000,"title":"Record Ids","type":"array","uniqueItems":true},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null,"description":"One sort key: shorthand for a one-key `order_by`."}},"required":["collection_id","object_type"],"title":"OrganizeCollectionRecords","type":"object"},"OrganizeEntries":{"additionalProperties":false,"properties":{"collection_id":{"description":"The collection (a workspace item).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"field":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Only entries whose value of this collection attribute equals `value` (a board column).","title":"Field"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"default":null,"title":"Value"}},"required":["collection_id"],"title":"OrganizeEntries","type":"object"},"OrganizeFavoriteTree":{"additionalProperties":false,"properties":{},"title":"OrganizeFavoriteTree","type":"object"},"OrganizeFavorites":{"additionalProperties":false,"properties":{"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only this folder's.","title":"Folder Id"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"OrganizeFavorites","type":"object"},"OrganizeItem":{"additionalProperties":false,"properties":{"item_id":{"description":"The workspace item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"}},"required":["item_id"],"title":"OrganizeItem","type":"object"},"OrganizeItems":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text in the item's name.","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"kind":{"$ref":"#/$defs/WorkspaceItemKind"},"scope":{"anyOf":[{"$ref":"#/$defs/ItemScope"},{"type":"null"}],"default":null,"description":"Both (the shared and the caller's personal) when left out."},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Views, forms and stage rules of this type.","title":"Object Type"},"shared_with_me":{"default":false,"description":"Only personal items others shared with the caller.","title":"Shared With Me","type":"boolean"},"include_deleted":{"default":false,"description":"Deleted items too (a deactivated task status), to restore one.","title":"Include Deleted","type":"boolean"}},"required":["kind"],"title":"OrganizeItems","type":"object"},"OrganizeMemberships":{"additionalProperties":false,"properties":{"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":500,"minItems":1,"title":"Record Ids","type":"array","uniqueItems":true}},"required":["record_ids"],"title":"OrganizeMemberships","type":"object"},"OrganizeRecordReminders":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"OrganizeRecordReminders","type":"object"},"OrganizeReminderDeliveries":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"rule_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Rule Id"},"failed":{"default":false,"description":"Only deliveries that reached their recipient through no channel.","title":"Failed","type":"boolean"}},"title":"OrganizeReminderDeliveries","type":"object"},"OrganizeReminderRulePreview":{"additionalProperties":false,"properties":{"rule_id":{"description":"The reminder rule's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"days":{"default":7,"description":"How many days ahead.","maximum":31,"minimum":1,"title":"Days","type":"integer"}},"required":["rule_id"],"title":"OrganizeReminderRulePreview","type":"object"},"OrganizeReminderRules":{"additionalProperties":false,"properties":{},"title":"OrganizeReminderRules","type":"object"},"OrganizeReminders":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"status":{"anyOf":[{"$ref":"#/$defs/ReminderStatus"},{"type":"null"}],"default":null}},"title":"OrganizeReminders","type":"object"},"OrganizeRevisions":{"additionalProperties":false,"properties":{"item_id":{"description":"The workspace item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"}},"required":["item_id"],"title":"OrganizeRevisions","type":"object"},"OrganizeSuggestStageRule":{"additionalProperties":false,"properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"stage":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"}},"required":["object_type","attribute","stage"],"title":"OrganizeSuggestStageRule","type":"object"},"OrganizeValidateStageRule":{"additionalProperties":false,"properties":{"kind":{"const":"stage_rule","default":"stage_rule","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"attribute":{"description":"The select attribute holding the stage.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"stage":{"description":"The option value the rule applies to.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"required_fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Fields","type":"array","uniqueItems":true},"required_activity_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Activity Kinds","type":"array","uniqueItems":true}},"required":["object_type","attribute","stage"],"title":"OrganizeValidateStageRule","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"ReminderStatus":{"enum":["pending","sent","dismissed"],"title":"ReminderStatus","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"WorkspaceItemKind":{"enum":["view","task_project","task_status","form","email_template","stage_rule","favorite_folder","collection","schema_pack"],"title":"WorkspaceItemKind","type":"string"}},"properties":{"items":{"anyOf":[{"$ref":"#/$defs/OrganizeItems"},{"type":"null"}],"default":null,"description":"Workspace items of one kind (view, collection, form, task_status, task_project, email_template, stage_rule, favorite_folder, schema_pack): the shared ones and the caller's own."},"item":{"anyOf":[{"$ref":"#/$defs/OrganizeItem"},{"type":"null"}],"default":null,"description":"One workspace item."},"revisions":{"anyOf":[{"$ref":"#/$defs/OrganizeRevisions"},{"type":"null"}],"default":null,"description":"Earlier versions of a workspace item (e.g. a stage rule's history)."},"entries":{"anyOf":[{"$ref":"#/$defs/OrganizeEntries"},{"type":"null"}],"default":null,"description":"A collection's entries in their order with their records; `field` and `value` narrow it to one board column."},"collection_records":{"anyOf":[{"$ref":"#/$defs/OrganizeCollectionRecords"},{"type":"null"}],"default":null,"description":"A collection's records, filtered and sorted like records' query."},"memberships":{"anyOf":[{"$ref":"#/$defs/OrganizeMemberships"},{"type":"null"}],"default":null,"description":"For each record, its entries in the collections the caller can read."},"favorites":{"anyOf":[{"$ref":"#/$defs/OrganizeFavorites"},{"type":"null"}],"default":null,"description":"The caller's favorites (records, documents, views…), in one folder or all."},"favorite_tree":{"anyOf":[{"$ref":"#/$defs/OrganizeFavoriteTree"},{"type":"null"}],"default":null,"description":"The caller's favorite folders in order, with their favorites, and the unfiled favorites."},"reminders":{"anyOf":[{"$ref":"#/$defs/OrganizeReminders"},{"type":"null"}],"default":null,"description":"The caller's reminders, soonest first; filter by record or status."},"reminder_rules":{"anyOf":[{"$ref":"#/$defs/OrganizeReminderRules"},{"type":"null"}],"default":null,"description":"Rules that remind people ahead of a date field (a renewal, a close date)."},"reminder_rule_preview":{"anyOf":[{"$ref":"#/$defs/OrganizeReminderRulePreview"},{"type":"null"}],"default":null,"description":"What a reminder rule would send in the next days, without sending anything."},"record_reminders":{"anyOf":[{"$ref":"#/$defs/OrganizeRecordReminders"},{"type":"null"}],"default":null,"description":"A record's field reminders: each rule on its type, the offsets it fires at for this record, and whether they are stopped."},"reminder_deliveries":{"anyOf":[{"$ref":"#/$defs/OrganizeReminderDeliveries"},{"type":"null"}],"default":null,"description":"Reminders rules have sent (or failed to), newest first."},"validate_stage_rule":{"anyOf":[{"$ref":"#/$defs/OrganizeValidateStageRule"},{"type":"null"}],"default":null,"description":"Check a stage rule before saving it."},"suggest_stage_rule":{"anyOf":[{"$ref":"#/$defs/OrganizeSuggestStageRule"},{"type":"null"}],"default":null,"description":"Have Core draft a stage rule from a plain description; nothing is saved."}},"title":"organizeArguments","type":"object"},"outputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AccessPolicy":{"additionalProperties":false,"description":"Who can see and change the records of an object type.","properties":{"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"title":"AccessPolicy","type":"object"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"AttributeOption":{"additionalProperties":false,"description":"One choice of a select or multi-select attribute.","properties":{"value":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value","type":"string"},"label":{"maxLength":256,"minLength":1,"title":"Label","type":"string"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A palette token chosen by the application.","title":"Color"},"terminal":{"default":false,"description":"Ends a process when chosen, e.g. a closing stage.","title":"Terminal","type":"boolean"},"metadata":{"additionalProperties":true,"description":"Application meaning of the option, e.g. an outcome. Core does not interpret it.","title":"Metadata","type":"object"}},"required":["value","label"],"title":"AttributeOption","type":"object"},"AttributeSpec":{"additionalProperties":false,"description":"An attribute as its author writes it. Core adds the `id` (see `AttributeDef`).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"}},"required":["slug","name","type"],"title":"AttributeSpec","type":"object"},"AttributeType":{"enum":["string","text","number","decimal","boolean","date","datetime","select","multi_select","file","relation","json","recurring_amount","user"],"title":"AttributeType","type":"string"},"CollectionEntry":{"additionalProperties":false,"description":"One record's membership of one collection, holding the collection's values for it.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"collection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"fields":{"additionalProperties":true,"title":"Fields","type":"object"},"position":{"default":0.0,"title":"Position","type":"number"},"added":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"},"changed":{"default":[],"description":"The collection attributes the entry's latest write set or changed (names, never\nvalues): what its `collection_entry.changed` event names in `payload.changed`.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"title":"Changed","type":"array"}},"required":["id","tenant_id","collection_id","record_id","added"],"title":"CollectionEntry","type":"object"},"CollectionEntryPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"entries":{"default":[],"items":{"$ref":"#/$defs/CollectionEntry"},"title":"Entries","type":"array"},"records":{"default":[],"description":"The entries' records, as the caller may see them.","items":{"$ref":"#/$defs/EntityRecord"},"title":"Records","type":"array"}},"title":"CollectionEntryPage","type":"object"},"CollectionMemberships":{"additionalProperties":false,"description":"For each record the caller can see, its entries in collections the caller can read.","properties":{"entries":{"patternProperties":{"^\\S+$":{"items":{"$ref":"#/$defs/CollectionEntry"},"type":"array"}},"propertyNames":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1},"title":"Entries","type":"object"}},"title":"CollectionMemberships","type":"object"},"CollectionSpec":{"additionalProperties":false,"description":"A named, curated set of records of one type, with attributes of its own.\n\nThe collection's attribute values live on each entry, never on the record, so a\ncollection can track \"what stage is this company at in this effort\" without adding a\nfield every company carries.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"maxItems":200,"title":"Attributes","type":"array"},"default_group_by":{"anyOf":[{"$ref":"#/$defs/GroupBy"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"CollectionSpec","type":"object"},"EmailTemplateSpec":{"additionalProperties":false,"properties":{"kind":{"const":"email_template","default":"email_template","title":"Kind","type":"string"},"subject":{"maxLength":1000000,"title":"Subject","type":"string"},"body_markdown":{"description":"`{{field}}` placeholders name record attributes.","maxLength":1000000,"title":"Body Markdown","type":"string"}},"required":["subject","body_markdown"],"title":"EmailTemplateSpec","type":"object"},"EntityRecord":{"additionalProperties":false,"description":"A record of some object type. Field values are keyed by attribute slug.","properties":{"id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"title":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"description":"The value of the primary attribute, denormalised for lists and search.","title":"Title"},"fields":{"additionalProperties":true,"description":"Attribute slug → value. Shapes follow the attribute types in the ontology.","title":"Fields","type":"object"},"parent_record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Record Id"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Archived At"},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"source_binding":{"anyOf":[{"$ref":"#/$defs/SourceRecordBinding"},{"type":"null"}],"default":null,"description":"Core-owned source identity and effective owner; absent on ordinary records."},"version":{"default":1,"description":"Counts the record's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","object_type","created"],"title":"EntityRecord","type":"object"},"Favorite":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"target":{"$ref":"#/$defs/FavoriteTarget"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Folder Id"},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"version":{"default":1,"description":"Counts the favorite's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","owner_id","target","created_at"],"title":"Favorite","type":"object"},"FavoriteFolderNode":{"additionalProperties":false,"properties":{"folder":{"$ref":"#/$defs/WorkspaceItem"},"favorites":{"default":[],"items":{"$ref":"#/$defs/Favorite"},"title":"Favorites","type":"array"}},"required":["folder"],"title":"FavoriteFolderNode","type":"object"},"FavoriteFolderSpec":{"additionalProperties":false,"properties":{"kind":{"const":"favorite_folder","default":"favorite_folder","title":"Kind","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"title":"FavoriteFolderSpec","type":"object"},"FavoritePage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"favorites":{"default":[],"items":{"$ref":"#/$defs/Favorite"},"title":"Favorites","type":"array"}},"title":"FavoritePage","type":"object"},"FavoriteTarget":{"additionalProperties":false,"properties":{"type":{"$ref":"#/$defs/FavoriteTargetType"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"}},"required":["type","id"],"title":"FavoriteTarget","type":"object"},"FavoriteTargetType":{"enum":["record","document","view","collection","activity","email_template"],"title":"FavoriteTargetType","type":"string"},"FavoriteTree":{"additionalProperties":false,"description":"The caller's folders (in their order, with their favorites) and unfiled favorites.","properties":{"folders":{"default":[],"items":{"$ref":"#/$defs/FavoriteFolderNode"},"title":"Folders","type":"array"},"unfiled":{"default":[],"items":{"$ref":"#/$defs/Favorite"},"title":"Unfiled","type":"array"}},"title":"FavoriteTree","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FieldReminderChannel":{"enum":["in_app","email"],"title":"FieldReminderChannel","type":"string"},"FieldReminderDelivery":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"rule_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"recipient_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Recipient Id","type":"string"},"due_on":{"description":"The day the reminder is for, in the recipient's time zone.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Due On","type":"string"},"offset":{"title":"Offset","type":"integer"},"channels":{"default":[],"description":"What it was sent through.","items":{"$ref":"#/$defs/FieldReminderChannel"},"title":"Channels","type":"array","uniqueItems":true},"sent_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Sent At"},"resent":{"default":0,"minimum":0,"title":"Resent","type":"integer"}},"required":["id","tenant_id","rule_id","record_id","recipient_id","due_on","offset"],"title":"FieldReminderDelivery","type":"object"},"FieldReminderDeliveryPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"deliveries":{"default":[],"items":{"$ref":"#/$defs/FieldReminderDelivery"},"title":"Deliveries","type":"array"}},"title":"FieldReminderDeliveryPage","type":"object"},"FieldReminderPreview":{"additionalProperties":false,"description":"What a rule would send, for the next days, without sending anything.","properties":{"deliveries":{"default":[],"items":{"$ref":"#/$defs/FieldReminderDelivery"},"title":"Deliveries","type":"array"}},"title":"FieldReminderPreview","type":"object"},"FieldReminderRecord":{"additionalProperties":false,"description":"The reminders of one record: every rule on its object type, as it applies to it.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rules":{"default":[],"items":{"$ref":"#/$defs/FieldReminderRecordRule"},"title":"Rules","type":"array"}},"required":["record_id"],"title":"FieldReminderRecord","type":"object"},"FieldReminderRecordRule":{"additionalProperties":false,"description":"One rule as it applies to one record: the offsets it fires at for this record (the\nrecord's override, or the rule's own) and whether the record's reminders are stopped.","properties":{"rule":{"$ref":"#/$defs/FieldReminderRule"},"offsets":{"items":{"maximum":365,"minimum":-365,"type":"integer"},"title":"Offsets","type":"array","uniqueItems":true},"overridden":{"default":false,"description":"The offsets are the record's own (`PUT /field-reminders/overrides`).","title":"Overridden","type":"boolean"},"suppressed":{"default":false,"description":"Stopped for this record now, by a suppression of this rule or of every rule.","title":"Suppressed","type":"boolean"},"suppressed_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a timed suppression ends; null while `suppressed` means for good.","title":"Suppressed Until"}},"required":["rule","offsets"],"title":"FieldReminderRecordRule","type":"object"},"FieldReminderRule":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"field":{"description":"A `date` or `datetime` attribute of the type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"offsets":{"description":"Days from the date: negative before it, 0 on it, positive after it.","items":{"maximum":365,"minimum":-365,"type":"integer"},"maxItems":10,"minItems":1,"title":"Offsets","type":"array","uniqueItems":true},"recipients":{"$ref":"#/$defs/ReminderRecipients"},"channels":{"default":["email","in_app"],"items":{"$ref":"#/$defs/FieldReminderChannel"},"title":"Channels","type":"array","uniqueItems":true},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"active":{"default":true,"title":"Active","type":"boolean"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","name","object_type","field","offsets","recipients"],"title":"FieldReminderRule","type":"object"},"FieldReminderRulePage":{"additionalProperties":false,"properties":{"rules":{"default":[],"items":{"$ref":"#/$defs/FieldReminderRule"},"title":"Rules","type":"array"}},"title":"FieldReminderRulePage","type":"object"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FormField":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"required":{"default":false,"title":"Required","type":"boolean"},"help":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Help"},"lookup":{"default":false,"description":"For a relation field of a public form: let people who have not signed in search the\ntarget records by title (their titles become public).","title":"Lookup","type":"boolean"}},"required":["field"],"title":"FormField","type":"object"},"FormSpec":{"additionalProperties":false,"description":"A form whose submissions create records of one object type.","properties":{"kind":{"const":"form","default":"form","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"items":{"$ref":"#/$defs/FormField"},"maxItems":100,"minItems":1,"title":"Fields","type":"array"},"public":{"default":false,"description":"Submitted without signing in, at `/core/v1/public/forms/{tenant}/{id}`.","title":"Public","type":"boolean"},"slug":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A readable public address: `/core/v1/public/forms/by-slug/{tenant slug}/{form slug}`.","title":"Slug"},"success_message":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Success Message"}},"required":["object_type","fields"],"title":"FormSpec","type":"object"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"GroupBy":{"additionalProperties":false,"description":"The select attribute a board groups by: the collection's own, or the record's.","properties":{"source":{"$ref":"#/$defs/GroupSource"},"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"}},"required":["source","attribute"],"title":"GroupBy","type":"object"},"GroupSource":{"description":"Whose attribute a collection's board groups by.","enum":["collection","object"],"title":"GroupSource","type":"string"},"ItemRevision":{"additionalProperties":false,"description":"An item as it was before one of its changes.","properties":{"revision":{"minimum":1,"title":"Revision","type":"integer"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"spec":{"discriminator":{"mapping":{"collection":"#/$defs/CollectionSpec","email_template":"#/$defs/EmailTemplateSpec","favorite_folder":"#/$defs/FavoriteFolderSpec","form":"#/$defs/FormSpec","schema_pack":"#/$defs/SchemaPackSpec","stage_rule":"#/$defs/StageRuleSpec","task_project":"#/$defs/TaskProjectSpec","task_status":"#/$defs/TaskStatusSpec","view":"#/$defs/ViewSpec"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ViewSpec"},{"$ref":"#/$defs/TaskProjectSpec"},{"$ref":"#/$defs/TaskStatusSpec"},{"$ref":"#/$defs/FormSpec"},{"$ref":"#/$defs/EmailTemplateSpec"},{"$ref":"#/$defs/StageRuleSpec"},{"$ref":"#/$defs/FavoriteFolderSpec"},{"$ref":"#/$defs/CollectionSpec"},{"$ref":"#/$defs/SchemaPackSpec"}],"title":"Spec"},"changed":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null,"description":"Who changed it away from this version, and when."}},"required":["revision","name","spec"],"title":"ItemRevision","type":"object"},"ItemRevisions":{"additionalProperties":false,"properties":{"revisions":{"default":[],"description":"Newest first; the last `WorkspacePolicy.item_revisions` changes.","items":{"$ref":"#/$defs/ItemRevision"},"title":"Revisions","type":"array"}},"title":"ItemRevisions","type":"object"},"ItemScope":{"enum":["shared","personal"],"title":"ItemScope","type":"string"},"ObjectTypeSpec":{"additionalProperties":false,"description":"An object type as its author writes it: everything but its identity and history.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"}},"required":["name"],"title":"ObjectTypeSpec","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every record matching the query, when `include_total` asked.","title":"Total"},"records":{"default":[],"items":{"$ref":"#/$defs/EntityRecord"},"title":"Records","type":"array"}},"title":"RecordPage","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RelationCardinality":{"description":"Enforced on the record holding the relation: `one_to_one` and `many_to_one` hold one\ntarget, the others a list.","enum":["one_to_one","one_to_many","many_to_many","many_to_one"],"title":"RelationCardinality","type":"string"},"RelationSpec":{"additionalProperties":false,"description":"The target and cardinality of a relation attribute.","properties":{"target_object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Target Object Type","type":"string"},"cardinality":{"$ref":"#/$defs/RelationCardinality"}},"required":["target_object_type","cardinality"],"title":"RelationSpec","type":"object"},"Reminder":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"remind_at":{"format":"date-time","title":"Remind At","type":"string"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"status":{"$ref":"#/$defs/ReminderStatus","default":"pending"},"created":{"$ref":"#/$defs/Provenance"},"sent_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Sent At"},"version":{"default":1,"description":"Counts the reminder's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","owner_id","remind_at","created"],"title":"Reminder","type":"object"},"ReminderPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"reminders":{"default":[],"items":{"$ref":"#/$defs/Reminder"},"title":"Reminders","type":"array"}},"title":"ReminderPage","type":"object"},"ReminderRecipients":{"additionalProperties":false,"description":"Who is reminded about each record.","properties":{"principal_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":50,"title":"Principal Ids","type":"array","uniqueItems":true},"user_fields":{"description":"`user` attributes of the record (its owner, its assignee): whoever they name.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":10,"title":"User Fields","type":"array","uniqueItems":true},"record_creator":{"default":false,"title":"Record Creator","type":"boolean"}},"title":"ReminderRecipients","type":"object"},"ReminderStatus":{"enum":["pending","sent","dismissed"],"title":"ReminderStatus","type":"string"},"SchemaPackEntry":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/ObjectTypeSpec"}},"required":["slug","spec"],"title":"SchemaPackEntry","type":"object"},"SchemaPackSpec":{"additionalProperties":false,"description":"A frozen snapshot of object types that can be installed like shipped templates.","properties":{"kind":{"const":"schema_pack","default":"schema_pack","title":"Kind","type":"string"},"entries":{"items":{"$ref":"#/$defs/SchemaPackEntry"},"maxItems":50,"minItems":1,"title":"Entries","type":"array"}},"required":["entries"],"title":"SchemaPackSpec","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SourceRecordBinding":{"additionalProperties":false,"description":"Trusted Core provenance binding for a connector-owned record.\n\nOnly Core's connector projection writer may create or advance this value. It is included\nin record reads so owner-scoped authorization can distinguish connector-owned records\nfrom ordinary records created by service principals.","properties":{"binding_id":{"pattern":"^source-field-binding:v1:[0-9a-f]{64}$","title":"Binding Id","type":"string"},"activation_id":{"pattern":"^source-field-activation:v1:[0-9a-f]{64}$","title":"Activation Id","type":"string"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The connection owner of a private record; absent on a shared one (`shared`).","title":"Owner Id"},"shared":{"default":false,"description":"A workspace record projected through a shared CRM binding (ADR 0028): no single owner,\nvisible as its type's own access policy says, and never erased with one contributor. Exactly\none of `owner_id` and `shared` identifies who the record belongs to.","title":"Shared","type":"boolean"},"object_type_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Object Type Id","type":"string"},"object_type_version":{"exclusiveMinimum":0,"title":"Object Type Version","type":"integer"},"source_key":{"maxLength":64,"minLength":64,"pattern":"^[0-9a-f]+$","title":"Source Key","type":"string"},"managed_attributes":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"minItems":1,"title":"Managed Attributes","type":"array","uniqueItems":true},"source_fence":{"exclusiveMinimum":0,"title":"Source Fence","type":"integer"}},"required":["binding_id","activation_id","object_type_id","object_type_version","source_key","managed_attributes","source_fence"],"title":"SourceRecordBinding","type":"object"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"StageRuleProposed":{"additionalProperties":false,"properties":{"spec":{"$ref":"#/$defs/StageRuleSpec"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"confidence":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"}},"required":["spec"],"title":"StageRuleProposed","type":"object"},"StageRuleSpec":{"additionalProperties":false,"description":"What a record needs before it may sit in a stage (e.g. a deal's `negotiation`).","properties":{"kind":{"const":"stage_rule","default":"stage_rule","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"attribute":{"description":"The select attribute holding the stage.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"stage":{"description":"The option value the rule applies to.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"required_fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Fields","type":"array","uniqueItems":true},"required_activity_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Activity Kinds","type":"array","uniqueItems":true}},"required":["object_type","attribute","stage"],"title":"StageRuleSpec","type":"object"},"StageRuleValidation":{"additionalProperties":false,"properties":{"valid":{"title":"Valid","type":"boolean"},"errors":{"default":[],"items":{"maxLength":1000000,"type":"string"},"title":"Errors","type":"array"}},"required":["valid"],"title":"StageRuleValidation","type":"object"},"TaskProjectSpec":{"additionalProperties":false,"properties":{"kind":{"const":"task_project","default":"task_project","title":"Kind","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"icon":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A short mark shown beside the name: an emoji or an icon's name.","title":"Icon"},"archived":{"default":false,"title":"Archived","type":"boolean"}},"title":"TaskProjectSpec","type":"object"},"TaskStatusSpec":{"additionalProperties":false,"description":"A custom task status (an activity's `stage`) within a lifecycle `category`.","properties":{"kind":{"const":"task_status","default":"task_status","title":"Kind","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"category":{"$ref":"#/$defs/ActivityStatus"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"}},"required":["slug","category"],"title":"TaskStatusSpec","type":"object"},"ViewColumn":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"width":{"anyOf":[{"exclusiveMinimum":0,"maximum":2000,"type":"integer"},{"type":"null"}],"default":null,"title":"Width"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"required":["field"],"title":"ViewColumn","type":"object"},"ViewLayout":{"enum":["table","board","pipeline","list","calendar"],"title":"ViewLayout","type":"string"},"ViewSpec":{"additionalProperties":false,"description":"A saved way of looking at one object type's records.","properties":{"kind":{"const":"view","default":"view","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"layout":{"$ref":"#/$defs/ViewLayout","default":"table"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null},"group_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The attribute a board or pipeline groups by (its stage).","title":"Group By"},"columns":{"default":[],"items":{"$ref":"#/$defs/ViewColumn"},"maxItems":200,"title":"Columns","type":"array"},"default":{"type":"boolean","default":false,"description":"The view a type opens with (one per type and scope).","title":"Default"}},"required":["object_type"],"title":"ViewSpec","type":"object"},"WorkspaceItem":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/WorkspaceItemKind"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"scope":{"$ref":"#/$defs/ItemScope","default":"shared"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A personal item's owner.","title":"Owner Id"},"shared_with":{"description":"Members a personal item is shared with, to read (a view a person shared).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"spec":{"discriminator":{"mapping":{"collection":"#/$defs/CollectionSpec","email_template":"#/$defs/EmailTemplateSpec","favorite_folder":"#/$defs/FavoriteFolderSpec","form":"#/$defs/FormSpec","schema_pack":"#/$defs/SchemaPackSpec","stage_rule":"#/$defs/StageRuleSpec","task_project":"#/$defs/TaskProjectSpec","task_status":"#/$defs/TaskStatusSpec","view":"#/$defs/ViewSpec"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ViewSpec"},{"$ref":"#/$defs/TaskProjectSpec"},{"$ref":"#/$defs/TaskStatusSpec"},{"$ref":"#/$defs/FormSpec"},{"$ref":"#/$defs/EmailTemplateSpec"},{"$ref":"#/$defs/StageRuleSpec"},{"$ref":"#/$defs/FavoriteFolderSpec"},{"$ref":"#/$defs/CollectionSpec"},{"$ref":"#/$defs/SchemaPackSpec"}],"title":"Spec"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","kind","name","spec","created"],"title":"WorkspaceItem","type":"object"},"WorkspaceItemKind":{"enum":["view","task_project","task_status","form","email_template","stage_rule","favorite_folder","collection","schema_pack"],"title":"WorkspaceItemKind","type":"string"},"WorkspaceItemPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"items":{"default":[],"items":{"$ref":"#/$defs/WorkspaceItem"},"title":"Items","type":"array"}},"title":"WorkspaceItemPage","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/WorkspaceItemPage"},{"$ref":"#/$defs/WorkspaceItem"},{"$ref":"#/$defs/ItemRevisions"},{"$ref":"#/$defs/CollectionEntryPage"},{"$ref":"#/$defs/RecordPage"},{"$ref":"#/$defs/CollectionMemberships"},{"$ref":"#/$defs/FavoritePage"},{"$ref":"#/$defs/FavoriteTree"},{"$ref":"#/$defs/ReminderPage"},{"$ref":"#/$defs/FieldReminderRulePage"},{"$ref":"#/$defs/FieldReminderPreview"},{"$ref":"#/$defs/FieldReminderRecord"},{"$ref":"#/$defs/FieldReminderDeliveryPage"},{"$ref":"#/$defs/StageRuleValidation"},{"$ref":"#/$defs/StageRuleProposed"}],"title":"Result"}},"required":["result"],"title":"organizeOutput","type":"object"},"annotations":{"title":"Organize","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_organize","title":"Manage organization","description":"Create, change, reorder and delete workspace items; add records to collections, change and remove their entries; favorite; set reminders; keep reminder rules; submit a form. Shared items need workspace.manage. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AccessPolicy":{"additionalProperties":false,"description":"Who can see and change the records of an object type.","properties":{"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"title":"AccessPolicy","type":"object"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"AttributeOption":{"additionalProperties":false,"description":"One choice of a select or multi-select attribute.","properties":{"value":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value","type":"string"},"label":{"maxLength":256,"minLength":1,"title":"Label","type":"string"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A palette token chosen by the application.","title":"Color"},"terminal":{"default":false,"description":"Ends a process when chosen, e.g. a closing stage.","title":"Terminal","type":"boolean"},"metadata":{"additionalProperties":true,"description":"Application meaning of the option, e.g. an outcome. Core does not interpret it.","title":"Metadata","type":"object"}},"required":["value","label"],"title":"AttributeOption","type":"object"},"AttributeSpec":{"additionalProperties":false,"description":"An attribute as its author writes it. Core adds the `id` (see `AttributeDef`).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"}},"required":["slug","name","type"],"title":"AttributeSpec","type":"object"},"AttributeType":{"enum":["string","text","number","decimal","boolean","date","datetime","select","multi_select","file","relation","json","recurring_amount","user"],"title":"AttributeType","type":"string"},"CollectionEntryChange":{"additionalProperties":false,"properties":{"fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Merged into the entry's values; a null value clears that attribute.","title":"Fields"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Position"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"CollectionEntryChange","type":"object"},"CollectionSpec":{"additionalProperties":false,"description":"A named, curated set of records of one type, with attributes of its own.\n\nThe collection's attribute values live on each entry, never on the record, so a\ncollection can track \"what stage is this company at in this effort\" without adding a\nfield every company carries.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"maxItems":200,"title":"Attributes","type":"array"},"default_group_by":{"anyOf":[{"$ref":"#/$defs/GroupBy"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"CollectionSpec","type":"object"},"EmailTemplateSpec":{"additionalProperties":false,"properties":{"kind":{"const":"email_template","default":"email_template","title":"Kind","type":"string"},"subject":{"maxLength":1000000,"title":"Subject","type":"string"},"body_markdown":{"description":"`{{field}}` placeholders name record attributes.","maxLength":1000000,"title":"Body Markdown","type":"string"}},"required":["subject","body_markdown"],"title":"EmailTemplateSpec","type":"object"},"FavoriteChange":{"additionalProperties":false,"properties":{"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Folder Id"},"position":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Position"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version (the `version` read); None changes whatever is stored.","title":"Expected Version"}},"title":"FavoriteChange","type":"object"},"FavoriteFolderSpec":{"additionalProperties":false,"properties":{"kind":{"const":"favorite_folder","default":"favorite_folder","title":"Kind","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"title":"FavoriteFolderSpec","type":"object"},"FavoritePlacement":{"additionalProperties":false,"properties":{"favorite_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Favorite Id","type":"string"},"position":{"minimum":0,"title":"Position","type":"integer"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Moves it into this folder (null: out of folders).","title":"Folder Id"}},"required":["favorite_id","position"],"title":"FavoritePlacement","type":"object"},"FavoriteTarget":{"additionalProperties":false,"properties":{"type":{"$ref":"#/$defs/FavoriteTargetType"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"}},"required":["type","id"],"title":"FavoriteTarget","type":"object"},"FavoriteTargetType":{"enum":["record","document","view","collection","activity","email_template"],"title":"FavoriteTargetType","type":"string"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FieldReminderChannel":{"enum":["in_app","email"],"title":"FieldReminderChannel","type":"string"},"FieldReminderRuleChange":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"offsets":{"anyOf":[{"items":{"maximum":365,"minimum":-365,"type":"integer"},"maxItems":10,"minItems":1,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Offsets"},"recipients":{"anyOf":[{"$ref":"#/$defs/ReminderRecipients"},{"type":"null"}],"default":null},"channels":{"anyOf":[{"items":{"$ref":"#/$defs/FieldReminderChannel"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"title":"Channels"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Active"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"FieldReminderRuleChange","type":"object"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FormField":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"required":{"default":false,"title":"Required","type":"boolean"},"help":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Help"},"lookup":{"default":false,"description":"For a relation field of a public form: let people who have not signed in search the\ntarget records by title (their titles become public).","title":"Lookup","type":"boolean"}},"required":["field"],"title":"FormField","type":"object"},"FormSpec":{"additionalProperties":false,"description":"A form whose submissions create records of one object type.","properties":{"kind":{"const":"form","default":"form","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"items":{"$ref":"#/$defs/FormField"},"maxItems":100,"minItems":1,"title":"Fields","type":"array"},"public":{"default":false,"description":"Submitted without signing in, at `/core/v1/public/forms/{tenant}/{id}`.","title":"Public","type":"boolean"},"slug":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A readable public address: `/core/v1/public/forms/by-slug/{tenant slug}/{form slug}`.","title":"Slug"},"success_message":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Success Message"}},"required":["object_type","fields"],"title":"FormSpec","type":"object"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"GroupBy":{"additionalProperties":false,"description":"The select attribute a board groups by: the collection's own, or the record's.","properties":{"source":{"$ref":"#/$defs/GroupSource"},"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"}},"required":["source","attribute"],"title":"GroupBy","type":"object"},"GroupSource":{"description":"Whose attribute a collection's board groups by.","enum":["collection","object"],"title":"GroupSource","type":"string"},"ItemPosition":{"additionalProperties":false,"properties":{"item_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"},"position":{"minimum":0,"title":"Position","type":"integer"}},"required":["item_id","position"],"title":"ItemPosition","type":"object"},"ItemScope":{"enum":["shared","personal"],"title":"ItemScope","type":"string"},"ManageOrganizeAddFavorite":{"additionalProperties":false,"properties":{"target":{"$ref":"#/$defs/FavoriteTarget"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Folder Id"},"position":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Position"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["target"],"title":"ManageOrganizeAddFavorite","type":"object"},"ManageOrganizeAddToCollection":{"additionalProperties":false,"properties":{"collection_id":{"description":"The collection (a workspace item).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"minItems":1,"title":"Record Ids","type":"array","uniqueItems":true},"fields":{"additionalProperties":true,"description":"Values of the collection's attributes for every record added.","title":"Fields","type":"object"}},"required":["collection_id","record_ids"],"title":"ManageOrganizeAddToCollection","type":"object"},"ManageOrganizeChangeEntry":{"additionalProperties":false,"properties":{"collection_id":{"description":"The collection (a workspace item).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"record_id":{"description":"The record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"change":{"$ref":"#/$defs/CollectionEntryChange","description":"The change."}},"required":["collection_id","record_id","change"],"title":"ManageOrganizeChangeEntry","type":"object"},"ManageOrganizeChangeFavorite":{"additionalProperties":false,"properties":{"favorite_id":{"description":"The favorite's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Favorite Id","type":"string"},"change":{"$ref":"#/$defs/FavoriteChange","description":"The change."}},"required":["favorite_id","change"],"title":"ManageOrganizeChangeFavorite","type":"object"},"ManageOrganizeChangeReminder":{"additionalProperties":false,"properties":{"reminder_id":{"description":"The reminder's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Reminder Id","type":"string"},"change":{"$ref":"#/$defs/ReminderChange","description":"The change."}},"required":["reminder_id","change"],"title":"ManageOrganizeChangeReminder","type":"object"},"ManageOrganizeChangeReminderRule":{"additionalProperties":false,"properties":{"rule_id":{"description":"The reminder rule's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"change":{"$ref":"#/$defs/FieldReminderRuleChange","description":"The change."}},"required":["rule_id","change"],"title":"ManageOrganizeChangeReminderRule","type":"object"},"ManageOrganizeClearReminderOverride":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rule_id":{"description":"The reminder rule's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"}},"required":["record_id","rule_id"],"title":"ManageOrganizeClearReminderOverride","type":"object"},"ManageOrganizeCreateItem":{"additionalProperties":false,"properties":{"key":{"description":"Creating with the same key returns the first item.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"scope":{"$ref":"#/$defs/ItemScope","default":"shared"},"position":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Position"},"spec":{"discriminator":{"mapping":{"collection":"#/$defs/CollectionSpec","email_template":"#/$defs/EmailTemplateSpec","favorite_folder":"#/$defs/FavoriteFolderSpec","form":"#/$defs/FormSpec","schema_pack":"#/$defs/SchemaPackSpec","stage_rule":"#/$defs/StageRuleSpec","task_project":"#/$defs/TaskProjectSpec","task_status":"#/$defs/TaskStatusSpec","view":"#/$defs/ViewSpec"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ViewSpec"},{"$ref":"#/$defs/TaskProjectSpec"},{"$ref":"#/$defs/TaskStatusSpec"},{"$ref":"#/$defs/FormSpec"},{"$ref":"#/$defs/EmailTemplateSpec"},{"$ref":"#/$defs/StageRuleSpec"},{"$ref":"#/$defs/FavoriteFolderSpec"},{"$ref":"#/$defs/CollectionSpec"},{"$ref":"#/$defs/SchemaPackSpec"}],"title":"Spec"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["key","name","spec"],"title":"ManageOrganizeCreateItem","type":"object"},"ManageOrganizeCreateReminderRule":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"offsets":{"items":{"maximum":365,"minimum":-365,"type":"integer"},"maxItems":10,"minItems":1,"title":"Offsets","type":"array","uniqueItems":true},"recipients":{"$ref":"#/$defs/ReminderRecipients"},"channels":{"default":["email","in_app"],"items":{"$ref":"#/$defs/FieldReminderChannel"},"title":"Channels","type":"array","uniqueItems":true},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["key","name","object_type","field","offsets","recipients"],"title":"ManageOrganizeCreateReminderRule","type":"object"},"ManageOrganizeDeleteItem":{"additionalProperties":false,"properties":{"item_id":{"description":"The workspace item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"}},"required":["item_id"],"title":"ManageOrganizeDeleteItem","type":"object"},"ManageOrganizeDeleteReminderRule":{"additionalProperties":false,"properties":{"rule_id":{"description":"The reminder rule's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"}},"required":["rule_id"],"title":"ManageOrganizeDeleteReminderRule","type":"object"},"ManageOrganizeRemoveFavorite":{"additionalProperties":false,"properties":{"favorite_id":{"description":"The favorite's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Favorite Id","type":"string"}},"required":["favorite_id"],"title":"ManageOrganizeRemoveFavorite","type":"object"},"ManageOrganizeRemoveFromCollection":{"additionalProperties":false,"properties":{"collection_id":{"description":"The collection (a workspace item).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"minItems":1,"title":"Record Ids","type":"array","uniqueItems":true}},"required":["collection_id","record_ids"],"title":"ManageOrganizeRemoveFromCollection","type":"object"},"ManageOrganizeReorderFavorites":{"additionalProperties":false,"properties":{"placements":{"items":{"$ref":"#/$defs/FavoritePlacement"},"maxItems":500,"minItems":1,"title":"Placements","type":"array"}},"required":["placements"],"title":"ManageOrganizeReorderFavorites","type":"object"},"ManageOrganizeReorderItems":{"additionalProperties":false,"properties":{"positions":{"items":{"$ref":"#/$defs/ItemPosition"},"maxItems":200,"minItems":1,"title":"Positions","type":"array"}},"required":["positions"],"title":"ManageOrganizeReorderItems","type":"object"},"ManageOrganizeResendReminder":{"additionalProperties":false,"properties":{"delivery_id":{"description":"The delivery.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Delivery Id","type":"string"}},"required":["delivery_id"],"title":"ManageOrganizeResendReminder","type":"object"},"ManageOrganizeRestoreItem":{"additionalProperties":false,"properties":{"item_id":{"description":"The workspace item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"}},"required":["item_id"],"title":"ManageOrganizeRestoreItem","type":"object"},"ManageOrganizeSetReminder":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"remind_at":{"format":"date-time","title":"Remind At","type":"string"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Someone else to remind (a member); the caller when left out.","title":"Owner Id"}},"required":["key","remind_at"],"title":"ManageOrganizeSetReminder","type":"object"},"ManageOrganizeSetReminderOverride":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rule_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"offsets":{"items":{"maximum":365,"minimum":-365,"type":"integer"},"maxItems":10,"minItems":1,"title":"Offsets","type":"array","uniqueItems":true}},"required":["record_id","rule_id","offsets"],"title":"ManageOrganizeSetReminderOverride","type":"object"},"ManageOrganizeSubmitForm":{"additionalProperties":false,"properties":{"item_id":{"description":"The workspace item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"},"key":{"description":"Submitting the same key again returns the first receipt.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"values":{"additionalProperties":true,"maxProperties":100,"title":"Values","type":"object"}},"required":["item_id","key"],"title":"ManageOrganizeSubmitForm","type":"object"},"ManageOrganizeSuppressReminders":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rule_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Rule Id"},"until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Until"}},"required":["record_id"],"title":"ManageOrganizeSuppressReminders","type":"object"},"ManageOrganizeToggleFavorite":{"additionalProperties":false,"properties":{"target":{"$ref":"#/$defs/FavoriteTarget"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Folder Id"}},"required":["target"],"title":"ManageOrganizeToggleFavorite","type":"object"},"ManageOrganizeUnsuppressReminders":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rule_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only this rule's.","title":"Rule Id"}},"required":["record_id"],"title":"ManageOrganizeUnsuppressReminders","type":"object"},"ManageOrganizeUpdateItem":{"additionalProperties":false,"properties":{"item_id":{"description":"The workspace item's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Item Id","type":"string"},"change":{"$ref":"#/$defs/WorkspaceItemChange","description":"The change."}},"required":["item_id","change"],"title":"ManageOrganizeUpdateItem","type":"object"},"ObjectTypeSpec":{"additionalProperties":false,"description":"An object type as its author writes it: everything but its identity and history.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"}},"required":["name"],"title":"ObjectTypeSpec","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RelationCardinality":{"description":"Enforced on the record holding the relation: `one_to_one` and `many_to_one` hold one\ntarget, the others a list.","enum":["one_to_one","one_to_many","many_to_many","many_to_one"],"title":"RelationCardinality","type":"string"},"RelationSpec":{"additionalProperties":false,"description":"The target and cardinality of a relation attribute.","properties":{"target_object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Target Object Type","type":"string"},"cardinality":{"$ref":"#/$defs/RelationCardinality"}},"required":["target_object_type","cardinality"],"title":"RelationSpec","type":"object"},"ReminderChange":{"additionalProperties":false,"properties":{"remind_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Remind At"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Dismissed"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Change only this version (the `version` read); None changes whatever is stored.","title":"Expected Version"}},"title":"ReminderChange","type":"object"},"ReminderRecipients":{"additionalProperties":false,"description":"Who is reminded about each record.","properties":{"principal_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":50,"title":"Principal Ids","type":"array","uniqueItems":true},"user_fields":{"description":"`user` attributes of the record (its owner, its assignee): whoever they name.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":10,"title":"User Fields","type":"array","uniqueItems":true},"record_creator":{"default":false,"title":"Record Creator","type":"boolean"}},"title":"ReminderRecipients","type":"object"},"SchemaPackEntry":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/ObjectTypeSpec"}},"required":["slug","spec"],"title":"SchemaPackEntry","type":"object"},"SchemaPackSpec":{"additionalProperties":false,"description":"A frozen snapshot of object types that can be installed like shipped templates.","properties":{"kind":{"const":"schema_pack","default":"schema_pack","title":"Kind","type":"string"},"entries":{"items":{"$ref":"#/$defs/SchemaPackEntry"},"maxItems":50,"minItems":1,"title":"Entries","type":"array"}},"required":["entries"],"title":"SchemaPackSpec","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"StageRuleSpec":{"additionalProperties":false,"description":"What a record needs before it may sit in a stage (e.g. a deal's `negotiation`).","properties":{"kind":{"const":"stage_rule","default":"stage_rule","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"attribute":{"description":"The select attribute holding the stage.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"stage":{"description":"The option value the rule applies to.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"required_fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Fields","type":"array","uniqueItems":true},"required_activity_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Activity Kinds","type":"array","uniqueItems":true}},"required":["object_type","attribute","stage"],"title":"StageRuleSpec","type":"object"},"TaskProjectSpec":{"additionalProperties":false,"properties":{"kind":{"const":"task_project","default":"task_project","title":"Kind","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"icon":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A short mark shown beside the name: an emoji or an icon's name.","title":"Icon"},"archived":{"default":false,"title":"Archived","type":"boolean"}},"title":"TaskProjectSpec","type":"object"},"TaskStatusSpec":{"additionalProperties":false,"description":"A custom task status (an activity's `stage`) within a lifecycle `category`.","properties":{"kind":{"const":"task_status","default":"task_status","title":"Kind","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"category":{"$ref":"#/$defs/ActivityStatus"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"}},"required":["slug","category"],"title":"TaskStatusSpec","type":"object"},"ViewColumn":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"width":{"anyOf":[{"exclusiveMinimum":0,"maximum":2000,"type":"integer"},{"type":"null"}],"default":null,"title":"Width"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"required":["field"],"title":"ViewColumn","type":"object"},"ViewLayout":{"enum":["table","board","pipeline","list","calendar"],"title":"ViewLayout","type":"string"},"ViewSpec":{"additionalProperties":false,"description":"A saved way of looking at one object type's records.","properties":{"kind":{"const":"view","default":"view","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"layout":{"$ref":"#/$defs/ViewLayout","default":"table"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null},"group_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The attribute a board or pipeline groups by (its stage).","title":"Group By"},"columns":{"default":[],"items":{"$ref":"#/$defs/ViewColumn"},"maxItems":200,"title":"Columns","type":"array"},"default":{"type":"boolean","default":false,"description":"The view a type opens with (one per type and scope).","title":"Default"}},"required":["object_type"],"title":"ViewSpec","type":"object"},"WorkspaceItemChange":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"position":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Position"},"spec":{"anyOf":[{"discriminator":{"mapping":{"collection":"#/$defs/CollectionSpec","email_template":"#/$defs/EmailTemplateSpec","favorite_folder":"#/$defs/FavoriteFolderSpec","form":"#/$defs/FormSpec","schema_pack":"#/$defs/SchemaPackSpec","stage_rule":"#/$defs/StageRuleSpec","task_project":"#/$defs/TaskProjectSpec","task_status":"#/$defs/TaskStatusSpec","view":"#/$defs/ViewSpec"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ViewSpec"},{"$ref":"#/$defs/TaskProjectSpec"},{"$ref":"#/$defs/TaskStatusSpec"},{"$ref":"#/$defs/FormSpec"},{"$ref":"#/$defs/EmailTemplateSpec"},{"$ref":"#/$defs/StageRuleSpec"},{"$ref":"#/$defs/FavoriteFolderSpec"},{"$ref":"#/$defs/CollectionSpec"},{"$ref":"#/$defs/SchemaPackSpec"}]},{"type":"null"}],"default":null,"description":"Replaces the spec (of the same kind).","title":"Spec"},"shared_with":{"anyOf":[{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":100,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"Who a personal item is shared with (its owner only).","title":"Shared With"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Metadata"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"WorkspaceItemChange","type":"object"}},"properties":{"create_item":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeCreateItem"},{"type":"null"}],"default":null,"description":"A view, collection, form, task status or project, email template, stage rule or favorite folder; `spec.kind` says which. The same `key` returns the first item."},"update_item":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeUpdateItem"},{"type":"null"}],"default":null,"description":"Rename, move, share or replace the spec (of the same kind) of a workspace item; a task project archives with spec.archived."},"delete_item":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeDeleteItem"},{"type":"null"}],"default":null,"description":"Delete a workspace item."},"restore_item":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeRestoreItem"},{"type":"null"}],"default":null,"description":"Bring back a deleted workspace item (reactivate a task status)."},"reorder_items":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeReorderItems"},{"type":"null"}],"default":null,"description":"New positions for many items (task statuses, views, folders)."},"add_to_collection":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeAddToCollection"},{"type":"null"}],"default":null,"description":"Add records of the collection's type, with values for its own attributes; a record already in it keeps its entry."},"change_entry":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeChangeEntry"},{"type":"null"}],"default":null,"description":"Set a record's values of the collection's attributes (merged; null clears) or its position or stage, without touching the record."},"remove_from_collection":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeRemoveFromCollection"},{"type":"null"}],"default":null,"description":"Take records out of a collection; the records stay."},"add_favorite":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeAddFavorite"},{"type":"null"}],"default":null,"description":"Favorite a record, document, view or other target, in a folder."},"toggle_favorite":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeToggleFavorite"},{"type":"null"}],"default":null,"description":"Favorite a target when it is not one yet, else unfavorite it."},"change_favorite":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeChangeFavorite"},{"type":"null"}],"default":null,"description":"Move a favorite to another folder or position, or change its note."},"remove_favorite":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeRemoveFavorite"},{"type":"null"}],"default":null,"description":"Unfavorite."},"reorder_favorites":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeReorderFavorites"},{"type":"null"}],"default":null,"description":"Place many favorites at once (folder and position)."},"set_reminder":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeSetReminder"},{"type":"null"}],"default":null,"description":"Remind the caller (or another member) at a time, often about a record. The same `key` returns the first reminder."},"change_reminder":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeChangeReminder"},{"type":"null"}],"default":null,"description":"Move a reminder, change its note, or dismiss it (dismissed true)."},"create_reminder_rule":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeCreateReminderRule"},{"type":"null"}],"default":null,"description":"Remind people some days before or after a date field (offsets), by notification or email. Once per key."},"change_reminder_rule":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeChangeReminderRule"},{"type":"null"}],"default":null,"description":"Change the fields sent of a reminder rule."},"delete_reminder_rule":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeDeleteReminderRule"},{"type":"null"}],"default":null,"description":"Delete a reminder rule."},"resend_reminder":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeResendReminder"},{"type":"null"}],"default":null,"description":"Send a failed reminder delivery again."},"suppress_reminders":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeSuppressReminders"},{"type":"null"}],"default":null,"description":"Stop a record's reminders (of one rule, or all), until a time or for good."},"unsuppress_reminders":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeUnsuppressReminders"},{"type":"null"}],"default":null,"description":"Let a record's reminders (of one rule, or all) be sent again."},"set_reminder_override":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeSetReminderOverride"},{"type":"null"}],"default":null,"description":"Per-record offsets for one rule, instead of the rule's defaults."},"clear_reminder_override":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeClearReminderOverride"},{"type":"null"}],"default":null,"description":"Use the rule's own offsets for a record again."},"submit_form":{"anyOf":[{"$ref":"#/$defs/ManageOrganizeSubmitForm"},{"type":"null"}],"default":null,"description":"Create a record through a form: only its fields are taken and required ones must be present. The same `key` returns the first record."}},"title":"manage_organizeArguments","type":"object"},"outputSchema":{"$defs":{"AccessGrant":{"additionalProperties":false,"description":"Gives one principal or role an access level.","properties":{"grantee_type":{"$ref":"#/$defs/GranteeType"},"grantee_id":{"description":"A principal ID or a role slug, depending on `grantee_type`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantee Id","type":"string"},"access_level":{"$ref":"#/$defs/AccessLevel"}},"required":["grantee_type","grantee_id","access_level"],"title":"AccessGrant","type":"object"},"AccessLevel":{"enum":["read","write"],"title":"AccessLevel","type":"string"},"AccessPolicy":{"additionalProperties":false,"description":"Who can see and change the records of an object type.","properties":{"share_scope":{"$ref":"#/$defs/ShareScope","default":"tenant"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Owner Id"},"grants":{"default":[],"items":{"$ref":"#/$defs/AccessGrant"},"title":"Grants","type":"array"}},"title":"AccessPolicy","type":"object"},"ActivityStatus":{"description":"Where an actionable activity (a task, a follow-up) stands.","enum":["open","done","cancelled","suggested"],"title":"ActivityStatus","type":"string"},"Archetype":{"description":"The role an object type plays, independent of what an application calls it.","enum":["identity","organization","interaction","process","reference"],"title":"Archetype","type":"string"},"AttributeOption":{"additionalProperties":false,"description":"One choice of a select or multi-select attribute.","properties":{"value":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value","type":"string"},"label":{"maxLength":256,"minLength":1,"title":"Label","type":"string"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A palette token chosen by the application.","title":"Color"},"terminal":{"default":false,"description":"Ends a process when chosen, e.g. a closing stage.","title":"Terminal","type":"boolean"},"metadata":{"additionalProperties":true,"description":"Application meaning of the option, e.g. an outcome. Core does not interpret it.","title":"Metadata","type":"object"}},"required":["value","label"],"title":"AttributeOption","type":"object"},"AttributeSpec":{"additionalProperties":false,"description":"An attribute as its author writes it. Core adds the `id` (see `AttributeDef`).","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"type":{"$ref":"#/$defs/AttributeType"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"required":{"default":false,"title":"Required","type":"boolean"},"unique":{"default":false,"title":"Unique","type":"boolean"},"system":{"default":false,"description":"Protected: it cannot be deleted, and its type and system key cannot change.","title":"System","type":"boolean"},"system_key":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Stable role of the attribute, e.g. `name` for the primary attribute.","title":"System Key"},"searchable":{"default":true,"title":"Searchable","type":"boolean"},"filterable":{"default":true,"title":"Filterable","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"options":{"default":[],"items":{"$ref":"#/$defs/AttributeOption"},"title":"Options","type":"array"},"relation":{"anyOf":[{"$ref":"#/$defs/RelationSpec"},{"type":"null"}],"default":null},"settings":{"additionalProperties":true,"description":"Type-specific settings, e.g. a currency. Core stores but does not interpret them.","title":"Settings","type":"object"}},"required":["slug","name","type"],"title":"AttributeSpec","type":"object"},"AttributeType":{"enum":["string","text","number","decimal","boolean","date","datetime","select","multi_select","file","relation","json","recurring_amount","user"],"title":"AttributeType","type":"string"},"ChangeCount":{"additionalProperties":false,"description":"How many items a bulk change touched.","properties":{"changed":{"minimum":0,"title":"Changed","type":"integer"}},"required":["changed"],"title":"ChangeCount","type":"object"},"CollectionEntries":{"additionalProperties":false,"properties":{"entries":{"default":[],"items":{"$ref":"#/$defs/CollectionEntry"},"title":"Entries","type":"array"}},"title":"CollectionEntries","type":"object"},"CollectionEntry":{"additionalProperties":false,"description":"One record's membership of one collection, holding the collection's values for it.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"collection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"fields":{"additionalProperties":true,"title":"Fields","type":"object"},"position":{"default":0.0,"title":"Position","type":"number"},"added":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"},"changed":{"default":[],"description":"The collection attributes the entry's latest write set or changed (names, never\nvalues): what its `collection_entry.changed` event names in `payload.changed`.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"title":"Changed","type":"array"}},"required":["id","tenant_id","collection_id","record_id","added"],"title":"CollectionEntry","type":"object"},"CollectionSpec":{"additionalProperties":false,"description":"A named, curated set of records of one type, with attributes of its own.\n\nThe collection's attribute values live on each entry, never on the record, so a\ncollection can track \"what stage is this company at in this effort\" without adding a\nfield every company carries.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"maxItems":200,"title":"Attributes","type":"array"},"default_group_by":{"anyOf":[{"$ref":"#/$defs/GroupBy"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"CollectionSpec","type":"object"},"Done":{"additionalProperties":false,"description":"The answer of an action that removes or archives something.","properties":{"done":{"default":true,"title":"Done","type":"boolean"}},"title":"Done","type":"object"},"EmailTemplateSpec":{"additionalProperties":false,"properties":{"kind":{"const":"email_template","default":"email_template","title":"Kind","type":"string"},"subject":{"maxLength":1000000,"title":"Subject","type":"string"},"body_markdown":{"description":"`{{field}}` placeholders name record attributes.","maxLength":1000000,"title":"Body Markdown","type":"string"}},"required":["subject","body_markdown"],"title":"EmailTemplateSpec","type":"object"},"Favorite":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"target":{"$ref":"#/$defs/FavoriteTarget"},"folder_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Folder Id"},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"version":{"default":1,"description":"Counts the favorite's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","owner_id","target","created_at"],"title":"Favorite","type":"object"},"FavoriteFolderSpec":{"additionalProperties":false,"properties":{"kind":{"const":"favorite_folder","default":"favorite_folder","title":"Kind","type":"string"},"parent_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parent Id"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"title":"FavoriteFolderSpec","type":"object"},"FavoritePage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"favorites":{"default":[],"items":{"$ref":"#/$defs/Favorite"},"title":"Favorites","type":"array"}},"title":"FavoritePage","type":"object"},"FavoriteTarget":{"additionalProperties":false,"properties":{"type":{"$ref":"#/$defs/FavoriteTargetType"},"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"}},"required":["type","id"],"title":"FavoriteTarget","type":"object"},"FavoriteTargetType":{"enum":["record","document","view","collection","activity","email_template"],"title":"FavoriteTargetType","type":"string"},"FavoriteToggled":{"additionalProperties":false,"properties":{"favorited":{"title":"Favorited","type":"boolean"},"favorite":{"anyOf":[{"$ref":"#/$defs/Favorite"},{"type":"null"}],"default":null}},"required":["favorited"],"title":"FavoriteToggled","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FieldReminderChannel":{"enum":["in_app","email"],"title":"FieldReminderChannel","type":"string"},"FieldReminderDelivery":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"rule_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"recipient_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Recipient Id","type":"string"},"due_on":{"description":"The day the reminder is for, in the recipient's time zone.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Due On","type":"string"},"offset":{"title":"Offset","type":"integer"},"channels":{"default":[],"description":"What it was sent through.","items":{"$ref":"#/$defs/FieldReminderChannel"},"title":"Channels","type":"array","uniqueItems":true},"sent_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Sent At"},"resent":{"default":0,"minimum":0,"title":"Resent","type":"integer"}},"required":["id","tenant_id","rule_id","record_id","recipient_id","due_on","offset"],"title":"FieldReminderDelivery","type":"object"},"FieldReminderOverride":{"additionalProperties":false,"description":"Per-record offsets for one rule, instead of the rule's defaults.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rule_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Rule Id","type":"string"},"offsets":{"items":{"maximum":365,"minimum":-365,"type":"integer"},"maxItems":10,"minItems":1,"title":"Offsets","type":"array","uniqueItems":true}},"required":["record_id","rule_id","offsets"],"title":"FieldReminderOverride","type":"object"},"FieldReminderRule":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"field":{"description":"A `date` or `datetime` attribute of the type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"offsets":{"description":"Days from the date: negative before it, 0 on it, positive after it.","items":{"maximum":365,"minimum":-365,"type":"integer"},"maxItems":10,"minItems":1,"title":"Offsets","type":"array","uniqueItems":true},"recipients":{"$ref":"#/$defs/ReminderRecipients"},"channels":{"default":["email","in_app"],"items":{"$ref":"#/$defs/FieldReminderChannel"},"title":"Channels","type":"array","uniqueItems":true},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"active":{"default":true,"title":"Active","type":"boolean"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","name","object_type","field","offsets","recipients"],"title":"FieldReminderRule","type":"object"},"FieldReminderSuppression":{"additionalProperties":false,"description":"Stop a record's reminders (of one rule, or all), until a time or for good.","properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"rule_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Rule Id"},"until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Until"}},"required":["record_id"],"title":"FieldReminderSuppression","type":"object"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FormField":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"required":{"default":false,"title":"Required","type":"boolean"},"help":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Help"},"lookup":{"default":false,"description":"For a relation field of a public form: let people who have not signed in search the\ntarget records by title (their titles become public).","title":"Lookup","type":"boolean"}},"required":["field"],"title":"FormField","type":"object"},"FormReceipt":{"additionalProperties":false,"properties":{"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"message":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"required":["record_id"],"title":"FormReceipt","type":"object"},"FormSpec":{"additionalProperties":false,"description":"A form whose submissions create records of one object type.","properties":{"kind":{"const":"form","default":"form","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"items":{"$ref":"#/$defs/FormField"},"maxItems":100,"minItems":1,"title":"Fields","type":"array"},"public":{"default":false,"description":"Submitted without signing in, at `/core/v1/public/forms/{tenant}/{id}`.","title":"Public","type":"boolean"},"slug":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A readable public address: `/core/v1/public/forms/by-slug/{tenant slug}/{form slug}`.","title":"Slug"},"success_message":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Success Message"}},"required":["object_type","fields"],"title":"FormSpec","type":"object"},"GranteeType":{"enum":["principal","role"],"title":"GranteeType","type":"string"},"GroupBy":{"additionalProperties":false,"description":"The select attribute a board groups by: the collection's own, or the record's.","properties":{"source":{"$ref":"#/$defs/GroupSource"},"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"}},"required":["source","attribute"],"title":"GroupBy","type":"object"},"GroupSource":{"description":"Whose attribute a collection's board groups by.","enum":["collection","object"],"title":"GroupSource","type":"string"},"ItemScope":{"enum":["shared","personal"],"title":"ItemScope","type":"string"},"ObjectTypeSpec":{"additionalProperties":false,"description":"An object type as its author writes it: everything but its identity and history.","properties":{"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"singular_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Singular Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"archetype":{"anyOf":[{"$ref":"#/$defs/Archetype"},{"type":"null"}],"default":null},"system":{"default":false,"description":"Protected: it cannot be deleted, nor stop being a system type.","title":"System","type":"boolean"},"enabled":{"default":true,"title":"Enabled","type":"boolean"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"},"attributes":{"default":[],"items":{"$ref":"#/$defs/AttributeSpec"},"title":"Attributes","type":"array"},"access":{"$ref":"#/$defs/AccessPolicy","description":"Records inherit this policy. There are no per-record ACLs."},"settings":{"additionalProperties":true,"title":"Settings","type":"object"}},"required":["name"],"title":"ObjectTypeSpec","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"Provenance":{"additionalProperties":false,"description":"Who changed something, through which source, and as part of which operation.","properties":{"actor":{"$ref":"#/$defs/PrincipalRef"},"source":{"$ref":"#/$defs/SourceRef"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Ties together every change made while serving one request or job.","title":"Correlation Id"}},"required":["actor","source","occurred_at"],"title":"Provenance","type":"object"},"RecordSort":{"additionalProperties":false,"description":"One sort key of a record list (the single-key `sort` shorthand of `RecordQuery`).","properties":{"field":{"description":"A filterable scalar attribute, or `title`, `created_at`, `updated_at`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"RecordSort","type":"object"},"RelationCardinality":{"description":"Enforced on the record holding the relation: `one_to_one` and `many_to_one` hold one\ntarget, the others a list.","enum":["one_to_one","one_to_many","many_to_many","many_to_one"],"title":"RelationCardinality","type":"string"},"RelationSpec":{"additionalProperties":false,"description":"The target and cardinality of a relation attribute.","properties":{"target_object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Target Object Type","type":"string"},"cardinality":{"$ref":"#/$defs/RelationCardinality"}},"required":["target_object_type","cardinality"],"title":"RelationSpec","type":"object"},"Reminder":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"owner_id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Owner Id","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"remind_at":{"format":"date-time","title":"Remind At","type":"string"},"note":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"status":{"$ref":"#/$defs/ReminderStatus","default":"pending"},"created":{"$ref":"#/$defs/Provenance"},"sent_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Sent At"},"version":{"default":1,"description":"Counts the reminder's writes; pass it back as `expected_version` to change only the\nversion you read.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","owner_id","remind_at","created"],"title":"Reminder","type":"object"},"ReminderRecipients":{"additionalProperties":false,"description":"Who is reminded about each record.","properties":{"principal_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":50,"title":"Principal Ids","type":"array","uniqueItems":true},"user_fields":{"description":"`user` attributes of the record (its owner, its assignee): whoever they name.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":10,"title":"User Fields","type":"array","uniqueItems":true},"record_creator":{"default":false,"title":"Record Creator","type":"boolean"}},"title":"ReminderRecipients","type":"object"},"ReminderStatus":{"enum":["pending","sent","dismissed"],"title":"ReminderStatus","type":"string"},"SchemaPackEntry":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"spec":{"$ref":"#/$defs/ObjectTypeSpec"}},"required":["slug","spec"],"title":"SchemaPackEntry","type":"object"},"SchemaPackSpec":{"additionalProperties":false,"description":"A frozen snapshot of object types that can be installed like shipped templates.","properties":{"kind":{"const":"schema_pack","default":"schema_pack","title":"Kind","type":"string"},"entries":{"items":{"$ref":"#/$defs/SchemaPackEntry"},"maxItems":50,"minItems":1,"title":"Entries","type":"array"}},"required":["entries"],"title":"SchemaPackSpec","type":"object"},"ShareScope":{"enum":["private","tenant"],"title":"ShareScope","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SourceRef":{"additionalProperties":false,"description":"Where data entered Core.","properties":{"source_type":{"description":"Open, connector-defined name such as `gmail`, `csv_import` or `api`.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Source Type","type":"string"},"source_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The item inside that source, e.g. a provider message ID.","title":"Source Id"}},"required":["source_type"],"title":"SourceRef","type":"object"},"StageRuleSpec":{"additionalProperties":false,"description":"What a record needs before it may sit in a stage (e.g. a deal's `negotiation`).","properties":{"kind":{"const":"stage_rule","default":"stage_rule","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"attribute":{"description":"The select attribute holding the stage.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"stage":{"description":"The option value the rule applies to.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Stage","type":"string"},"required_fields":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Fields","type":"array","uniqueItems":true},"required_activity_kinds":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Required Activity Kinds","type":"array","uniqueItems":true}},"required":["object_type","attribute","stage"],"title":"StageRuleSpec","type":"object"},"TaskProjectSpec":{"additionalProperties":false,"properties":{"kind":{"const":"task_project","default":"task_project","title":"Kind","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"icon":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A short mark shown beside the name: an emoji or an icon's name.","title":"Icon"},"archived":{"default":false,"title":"Archived","type":"boolean"}},"title":"TaskProjectSpec","type":"object"},"TaskStatusSpec":{"additionalProperties":false,"description":"A custom task status (an activity's `stage`) within a lifecycle `category`.","properties":{"kind":{"const":"task_status","default":"task_status","title":"Kind","type":"string"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"category":{"$ref":"#/$defs/ActivityStatus"},"color":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Color"},"order":{"default":0,"minimum":0,"title":"Order","type":"integer"}},"required":["slug","category"],"title":"TaskStatusSpec","type":"object"},"ViewColumn":{"additionalProperties":false,"properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Field","type":"string"},"width":{"anyOf":[{"exclusiveMinimum":0,"maximum":2000,"type":"integer"},{"type":"null"}],"default":null,"title":"Width"},"hidden":{"default":false,"title":"Hidden","type":"boolean"}},"required":["field"],"title":"ViewColumn","type":"object"},"ViewLayout":{"enum":["table","board","pipeline","list","calendar"],"title":"ViewLayout","type":"string"},"ViewSpec":{"additionalProperties":false,"description":"A saved way of looking at one object type's records.","properties":{"kind":{"const":"view","default":"view","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"layout":{"$ref":"#/$defs/ViewLayout","default":"table"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Search"},"sort":{"anyOf":[{"$ref":"#/$defs/RecordSort"},{"type":"null"}],"default":null},"group_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The attribute a board or pipeline groups by (its stage).","title":"Group By"},"columns":{"default":[],"items":{"$ref":"#/$defs/ViewColumn"},"maxItems":200,"title":"Columns","type":"array"},"default":{"type":"boolean","default":false,"description":"The view a type opens with (one per type and scope).","title":"Default"}},"required":["object_type"],"title":"ViewSpec","type":"object"},"WorkspaceItem":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/WorkspaceItemKind"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"scope":{"$ref":"#/$defs/ItemScope","default":"shared"},"owner_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A personal item's owner.","title":"Owner Id"},"shared_with":{"description":"Members a personal item is shared with, to read (a view a person shared).","items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Shared With","type":"array","uniqueItems":true},"position":{"default":0,"minimum":0,"title":"Position","type":"integer"},"spec":{"discriminator":{"mapping":{"collection":"#/$defs/CollectionSpec","email_template":"#/$defs/EmailTemplateSpec","favorite_folder":"#/$defs/FavoriteFolderSpec","form":"#/$defs/FormSpec","schema_pack":"#/$defs/SchemaPackSpec","stage_rule":"#/$defs/StageRuleSpec","task_project":"#/$defs/TaskProjectSpec","task_status":"#/$defs/TaskStatusSpec","view":"#/$defs/ViewSpec"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ViewSpec"},{"$ref":"#/$defs/TaskProjectSpec"},{"$ref":"#/$defs/TaskStatusSpec"},{"$ref":"#/$defs/FormSpec"},{"$ref":"#/$defs/EmailTemplateSpec"},{"$ref":"#/$defs/StageRuleSpec"},{"$ref":"#/$defs/FavoriteFolderSpec"},{"$ref":"#/$defs/CollectionSpec"},{"$ref":"#/$defs/SchemaPackSpec"}],"title":"Spec"},"created":{"$ref":"#/$defs/Provenance"},"updated":{"anyOf":[{"$ref":"#/$defs/Provenance"},{"type":"null"}],"default":null},"deleted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Deleted At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","kind","name","spec","created"],"title":"WorkspaceItem","type":"object"},"WorkspaceItemKind":{"enum":["view","task_project","task_status","form","email_template","stage_rule","favorite_folder","collection","schema_pack"],"title":"WorkspaceItemKind","type":"string"},"WorkspaceItemPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"items":{"default":[],"items":{"$ref":"#/$defs/WorkspaceItem"},"title":"Items","type":"array"}},"title":"WorkspaceItemPage","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/WorkspaceItem"},{"$ref":"#/$defs/Done"},{"$ref":"#/$defs/WorkspaceItemPage"},{"$ref":"#/$defs/CollectionEntries"},{"$ref":"#/$defs/CollectionEntry"},{"$ref":"#/$defs/ChangeCount"},{"$ref":"#/$defs/Favorite"},{"$ref":"#/$defs/FavoriteToggled"},{"$ref":"#/$defs/FavoritePage"},{"$ref":"#/$defs/Reminder"},{"$ref":"#/$defs/FieldReminderRule"},{"$ref":"#/$defs/FieldReminderDelivery"},{"$ref":"#/$defs/FieldReminderSuppression"},{"$ref":"#/$defs/FieldReminderOverride"},{"$ref":"#/$defs/FormReceipt"}],"title":"Result"}},"required":["result"],"title":"manage_organizeOutput","type":"object"},"annotations":{"title":"Manage organization","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}},{"name":"billing","title":"Billing","description":"The workspace's plan, credits and usage. Everything but plans, standing and models needs billing.view; paying stays in the billing pages. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"BillingAccount":{"additionalProperties":false,"properties":{},"title":"BillingAccount","type":"object"},"BillingCredits":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"BillingCredits","type":"object"},"BillingInvoices":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"}},"title":"BillingInvoices","type":"object"},"BillingModels":{"additionalProperties":false,"properties":{},"title":"BillingModels","type":"object"},"BillingPlans":{"additionalProperties":false,"properties":{},"title":"BillingPlans","type":"object"},"BillingReferralCodes":{"additionalProperties":false,"properties":{},"title":"BillingReferralCodes","type":"object"},"BillingReferralStats":{"additionalProperties":false,"properties":{},"title":"BillingReferralStats","type":"object"},"BillingStanding":{"additionalProperties":false,"properties":{},"title":"BillingStanding","type":"object"},"BillingUsage":{"additionalProperties":false,"properties":{"since":{"format":"date-time","title":"Since","type":"string"},"until":{"format":"date-time","title":"Until","type":"string"},"source_prefix":{"anyOf":[{"maxLength":100,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage whose source starts with this (`ingestion.`).","title":"Source Prefix"},"kinds":{"description":"Only these usage kinds (`llm.input_tokens`); all when empty.","items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"maxItems":20,"title":"Kinds","type":"array","uniqueItems":true},"group_by":{"$ref":"#/$defs/UsageGrouping","default":"source"}},"required":["since","until"],"title":"BillingUsage","type":"object"},"UsageGrouping":{"description":"How a usage report groups recorded usage.","enum":["day","source","principal","model","kind","app","agent"],"title":"UsageGrouping","type":"string"}},"properties":{"plans":{"anyOf":[{"$ref":"#/$defs/BillingPlans"},{"type":"null"}],"default":null,"description":"The plans and add-ons on offer: what each includes and costs."},"account":{"anyOf":[{"$ref":"#/$defs/BillingAccount"},{"type":"null"}],"default":null,"description":"The workspace's plan, add-ons, current period, limits and credit balance."},"standing":{"anyOf":[{"$ref":"#/$defs/BillingStanding"},{"type":"null"}],"default":null,"description":"What the plan allows (features, limits), the credit balance and whether credit-gated work may start. Every member may read it."},"credits":{"anyOf":[{"$ref":"#/$defs/BillingCredits"},{"type":"null"}],"default":null,"description":"The credit balance and its ledger (grants, usage charges, referrals, adjustments), newest first."},"usage":{"anyOf":[{"$ref":"#/$defs/BillingUsage"},{"type":"null"}],"default":null,"description":"Recorded usage in a period, grouped by day, source, person, model or kind, with its credit cost."},"invoices":{"anyOf":[{"$ref":"#/$defs/BillingInvoices"},{"type":"null"}],"default":null,"description":"The payment provider's invoices, newest first."},"models":{"anyOf":[{"$ref":"#/$defs/BillingModels"},{"type":"null"}],"default":null,"description":"The LLM models the workspace may use, with their rates."},"referral_codes":{"anyOf":[{"$ref":"#/$defs/BillingReferralCodes"},{"type":"null"}],"default":null,"description":"The workspace's referral codes."},"referral_stats":{"anyOf":[{"$ref":"#/$defs/BillingReferralStats"},{"type":"null"}],"default":null,"description":"What the workspace's referral code brought: people referred and credits earned."}},"title":"billingArguments","type":"object"},"outputSchema":{"$defs":{"AddOn":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"limits":{"description":"Added to the plan's limits per unit bought.","patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"minimum":0,"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Limits","type":"object"},"monthly_credits":{"default":0,"description":"Added per unit bought.","minimum":0,"title":"Monthly Credits","type":"integer"},"price":{"anyOf":[{"$ref":"#/$defs/Price"},{"type":"null"}],"default":null},"features":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Features","type":"array","uniqueItems":true},"unit":{"$ref":"#/$defs/PriceUnit","default":"flat","description":"`running_agent` bills each agent whose deployment runs: its quantity follows them and\nis never bought by hand."}},"required":["slug","name"],"title":"AddOn","type":"object"},"AutoRecharge":{"additionalProperties":false,"description":"Buy a credit pack on the saved payment method whenever the balance falls below\n`below`.","properties":{"pack":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Pack","type":"string"},"below":{"minimum":0,"title":"Below","type":"integer"}},"required":["pack","below"],"title":"AutoRecharge","type":"object"},"BillingAccount":{"additionalProperties":false,"description":"A tenant's plan, add-ons, subscription and credit balance.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"plan":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Plan","type":"string"},"add_ons":{"patternProperties":{"^[a-z][a-z0-9_]*$":{"maximum":1000,"minimum":1,"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Add Ons","type":"object"},"status":{"$ref":"#/$defs/SubscriptionStatus","default":"active"},"period_start":{"format":"date-time","title":"Period Start","type":"string"},"period_end":{"format":"date-time","title":"Period End","type":"string"},"cancel_at_period_end":{"default":false,"title":"Cancel At Period End","type":"boolean"},"credits":{"description":"The balance; negative once usage overran it.","title":"Credits","type":"integer"},"limits":{"description":"What the plan and add-ons allow, as set on the tenant.","patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"minimum":0,"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Limits","type":"object"},"managed_by_provider":{"default":false,"description":"Changed through the payment provider's checkout and portal (a paid subscription).","title":"Managed By Provider","type":"boolean"},"features":{"description":"What the plan and add-ons turn on; none while the account is blocked.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Features","type":"array","uniqueItems":true},"trial_ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Trial Ends At"},"blocked":{"default":false,"description":"Payment is overdue past the grace period, or the trial ended: the default plan's limits\nand features apply until it is settled.","title":"Blocked","type":"boolean"},"auto_recharge":{"anyOf":[{"$ref":"#/$defs/AutoRecharge"},{"type":"null"}],"default":null},"billing_exempt":{"default":false,"description":"Credits are not charged and credit-gated capabilities stay available.","title":"Billing Exempt","type":"boolean"},"domain_plan":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The plan an owner's trusted email domain grants in place of the default plan: its\nlimits and features apply while the account is on the default plan.","title":"Domain Plan"},"seats":{"default":0,"description":"Active members when last counted: the quantity of a per-seat price.","minimum":0,"title":"Seats","type":"integer"},"running_agents":{"default":0,"description":"Agents whose deployment runs when last counted: the quantity of a per-agent add-on.","minimum":0,"title":"Running Agents","type":"integer"},"over_seat_limit":{"default":false,"description":"More people are members than the plan's `member.seat` allows: let in through the\nidentity provider, and flagged for the owners to settle.","title":"Over Seat Limit","type":"boolean"},"trial_used":{"default":false,"description":"The workspace has had its self-serve trial.","title":"Trial Used","type":"boolean"},"version":{"default":1,"minimum":1,"title":"Version","type":"integer"}},"required":["tenant_id","plan","period_start","period_end","credits"],"title":"BillingAccount","type":"object"},"BillingInterval":{"enum":["month","year"],"title":"BillingInterval","type":"string"},"BillingStanding":{"additionalProperties":false,"description":"What the workspace's plan allows and whether it may spend credits: what every member\nreads (`GET /billing/standing`) and a host asks before work it charges (`GET\n/tenants/{id}/standing`). No prices, invoices or payment details.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"plan":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Plan","type":"string"},"status":{"$ref":"#/$defs/SubscriptionStatus","default":"active"},"features":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Features","type":"array","uniqueItems":true},"limits":{"patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"minimum":0,"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Limits","type":"object"},"credits":{"title":"Credits","type":"integer"},"trial_ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Trial Ends At"},"blocked":{"default":false,"title":"Blocked","type":"boolean"},"billing_exempt":{"default":false,"title":"Billing Exempt","type":"boolean"},"may_spend":{"description":"Credit-gated work may start: credits are left, or the workspace is exempt.","title":"May Spend","type":"boolean"},"over_seat_limit":{"default":false,"title":"Over Seat Limit","type":"boolean"}},"required":["tenant_id","plan","credits","may_spend"],"title":"BillingStanding","type":"object"},"CreditEntry":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/CreditEntryKind"},"amount":{"description":"Positive adds credits, negative spends them.","title":"Amount","type":"integer"},"reason":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"reference":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"What it was for: an invoice, a usage window, a referral.","title":"Reference"},"actor":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"}},"required":["id","tenant_id","kind","amount","occurred_at"],"title":"CreditEntry","type":"object"},"CreditEntryKind":{"enum":["grant","spend","adjustment","referral","purchase","opening"],"title":"CreditEntryKind","type":"string"},"CreditPack":{"additionalProperties":false,"description":"Credits bought once, on top of the plan's.","properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"credits":{"exclusiveMinimum":0,"title":"Credits","type":"integer"},"price":{"anyOf":[{"$ref":"#/$defs/Price"},{"type":"null"}],"default":null}},"required":["slug","name","credits"],"title":"CreditPack","type":"object"},"CreditPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"balance":{"title":"Balance","type":"integer"},"entries":{"default":[],"items":{"$ref":"#/$defs/CreditEntry"},"title":"Entries","type":"array"}},"required":["balance"],"title":"CreditPage","type":"object"},"Invoice":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"number":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Number"},"status":{"$ref":"#/$defs/InvoiceStatus"},"amount_due":{"$ref":"#/$defs/Money"},"amount_paid":{"$ref":"#/$defs/Money"},"period_start":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Period Start"},"period_end":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Period End"},"issued_at":{"format":"date-time","title":"Issued At","type":"string"},"hosted_url":{"anyOf":[{"maxLength":2048,"minLength":1,"pattern":"^https?://","type":"string"},{"type":"null"}],"default":null,"title":"Hosted Url"},"pdf_url":{"anyOf":[{"maxLength":2048,"minLength":1,"pattern":"^https?://","type":"string"},{"type":"null"}],"default":null,"title":"Pdf Url"},"provider_updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the payment provider last changed it: an older event never overwrites a newer one.","title":"Provider Updated At"}},"required":["id","tenant_id","status","amount_due","amount_paid","issued_at"],"title":"Invoice","type":"object"},"InvoicePage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"invoices":{"default":[],"items":{"$ref":"#/$defs/Invoice"},"title":"Invoices","type":"array"}},"title":"InvoicePage","type":"object"},"InvoiceStatus":{"enum":["draft","open","paid","void","uncollectible"],"title":"InvoiceStatus","type":"string"},"LlmModelCatalog":{"additionalProperties":false,"properties":{"models":{"default":[],"items":{"$ref":"#/$defs/LlmModelRate"},"title":"Models","type":"array"},"default_rates":{"patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"type":"number"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Default Rates","type":"object"}},"title":"LlmModelCatalog","type":"object"},"LlmModelRate":{"additionalProperties":false,"properties":{"model":{"maxLength":1000000,"title":"Model","type":"string"},"rates":{"patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"type":"number"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Rates","type":"object"}},"required":["model"],"title":"LlmModelRate","type":"object"},"Money":{"additionalProperties":false,"properties":{"amount":{"description":"In the currency's minor unit (cents).","minimum":0,"title":"Amount","type":"integer"},"currency":{"default":"usd","pattern":"^[a-z]{3}$","title":"Currency","type":"string"}},"required":["amount"],"title":"Money","type":"object"},"Plan":{"additionalProperties":false,"properties":{"slug":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Slug","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"limits":{"description":"The tenant's limits on this plan; a capability left out is unlimited.","patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"minimum":0,"type":"integer"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Limits","type":"object"},"monthly_credits":{"default":0,"minimum":0,"title":"Monthly Credits","type":"integer"},"price":{"anyOf":[{"$ref":"#/$defs/Price"},{"type":"null"}],"default":null,"description":"None for a free plan."},"public":{"default":true,"description":"Offered in the plan list; a private plan is set by platform administrators.","title":"Public","type":"boolean"},"features":{"description":"Features the plan turns on (`api_access`, `sso`…); the host application decides what\neach means.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Features","type":"array","uniqueItems":true},"trial_days":{"default":0,"description":"Days a workspace may try the plan without paying (`POST /billing/trial`).","maximum":365,"minimum":0,"title":"Trial Days","type":"integer"},"unit":{"$ref":"#/$defs/PriceUnit","default":"flat","description":"What the price is per: `seat` bills each active member, the quantity kept in step with\nthe provider as people join and leave."},"monthly_credits_per_seat":{"default":0,"description":"Credits each period per active member, on top of `monthly_credits`.","minimum":0,"title":"Monthly Credits Per Seat","type":"integer"},"product":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Which of the deployment's products the plan belongs to, for grouping plans on a\npricing page; Core treats every plan alike.","title":"Product"}},"required":["slug","name"],"title":"Plan","type":"object"},"PlanList":{"additionalProperties":false,"properties":{"plans":{"default":[],"items":{"$ref":"#/$defs/Plan"},"title":"Plans","type":"array"},"add_ons":{"default":[],"items":{"$ref":"#/$defs/AddOn"},"title":"Add Ons","type":"array"},"credit_packs":{"default":[],"items":{"$ref":"#/$defs/CreditPack"},"title":"Credit Packs","type":"array"}},"title":"PlanList","type":"object"},"Price":{"additionalProperties":false,"properties":{"money":{"$ref":"#/$defs/Money"},"interval":{"$ref":"#/$defs/BillingInterval","default":"month"}},"required":["money"],"title":"Price","type":"object"},"PriceUnit":{"description":"What one unit of a plan's or add-on's price is: the provider's quantity follows it.","enum":["flat","seat","running_agent"],"title":"PriceUnit","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"ReferralCodeEntry":{"additionalProperties":false,"properties":{"code":{"maxLength":32,"minLength":4,"pattern":"^[A-Z0-9]+$","title":"Code","type":"string"},"primary":{"default":false,"title":"Primary","type":"boolean"}},"required":["code"],"title":"ReferralCodeEntry","type":"object"},"ReferralCodePage":{"additionalProperties":false,"properties":{"codes":{"default":[],"items":{"$ref":"#/$defs/ReferralCodeEntry"},"title":"Codes","type":"array"}},"title":"ReferralCodePage","type":"object"},"ReferralStats":{"additionalProperties":false,"description":"What the workspace's referral code brought.","properties":{"code":{"maxLength":32,"minLength":4,"pattern":"^[A-Z0-9]+$","title":"Code","type":"string"},"referred":{"default":0,"description":"Workspaces that redeemed the code.","minimum":0,"title":"Referred","type":"integer"},"credits_earned":{"default":0,"title":"Credits Earned","type":"integer"},"referred_by":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The workspace whose code this one redeemed.","title":"Referred By"}},"required":["code"],"title":"ReferralStats","type":"object"},"SubscriptionStatus":{"enum":["active","trialing","past_due","unpaid","canceled","incomplete"],"title":"SubscriptionStatus","type":"string"},"UsageGrouping":{"description":"How a usage report groups recorded usage.","enum":["day","source","principal","model","kind","app","agent"],"title":"UsageGrouping","type":"string"},"UsageReport":{"additionalProperties":false,"properties":{"since":{"format":"date-time","title":"Since","type":"string"},"until":{"format":"date-time","title":"Until","type":"string"},"group_by":{"$ref":"#/$defs/UsageGrouping"},"rows":{"default":[],"description":"Days in order; other groups costliest first.","items":{"$ref":"#/$defs/UsageRow"},"title":"Rows","type":"array"},"totals":{"patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"type":"number"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Totals","type":"object"},"credits":{"default":0.0,"title":"Credits","type":"number"},"truncated":{"default":false,"description":"More usage was recorded than one report reads; the rows cover the first.","title":"Truncated","type":"boolean"}},"required":["since","until","group_by"],"title":"UsageReport","type":"object"},"UsageRow":{"additionalProperties":false,"properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The group's value (a day, source, principal id, model or kind); null when unknown.","title":"Key"},"totals":{"patternProperties":{"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$":{"type":"number"}},"propertyNames":{"maxLength":256,"minLength":3},"title":"Totals","type":"object"},"credits":{"default":0.0,"description":"The credits this usage costs at the deployment's `credit_rates`.","title":"Credits","type":"number"},"records":{"default":0,"minimum":0,"title":"Records","type":"integer"}},"title":"UsageRow","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/PlanList"},{"$ref":"#/$defs/BillingAccount"},{"$ref":"#/$defs/BillingStanding"},{"$ref":"#/$defs/CreditPage"},{"$ref":"#/$defs/UsageReport"},{"$ref":"#/$defs/InvoicePage"},{"$ref":"#/$defs/LlmModelCatalog"},{"$ref":"#/$defs/ReferralCodePage"},{"$ref":"#/$defs/ReferralStats"}],"title":"Result"}},"required":["result"],"title":"billingOutput","type":"object"},"annotations":{"title":"Billing","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"events","title":"Events","description":"The workspace's change history: every write, in order, with who made it. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AggregateType":{"enum":["tenant","object_type","entity","relation","activity","ingestion","knowledge","invitation","agent","data_source","agent_channel","transfer","document","document_import","workspace_item","notification","billing_account","credit_entry","collection_entry","favorite","reminder","field_reminder","workspace_setting","ingestion_routing","gold_alert","schema_proposal","file","file_extraction","record_folder","folder_share","api_token","app","client_connection","user_preference","thread_read","commitment","email_draft","source_item","source_schema","meeting_join_preference","enrichment_run","enrichment_settings","enrichment_field_map","automation","automation_run"],"title":"AggregateType","type":"string"},"EventType":{"description":"Every event Core publishes. See docs/modules/events.md.","enum":["tenant.created","tenant.updated","schema.changed","entity.created","entity.updated","entity.deleted","entity.history_redacted","relation.added","relation.removed","activity.recorded","activity.updated","activity.deleted","ingest.accepted","ingest.completed","source_item.accepted","source_schema.registered","acl.changed","invitation.created","invitation.accepted","invitation.updated","invitation.revoked","agent.created","agent.updated","agent.channel_changed","knowledge.created","knowledge.updated","transfer.requested","transfer.progressed","transfer.finished","document.created","document.updated","document.deleted","document_import.requested","document_import.progressed","document_import.finished","workspace_item.changed","favorite.changed","reminder.changed","field_reminder.changed","notifications.read","workspace_settings.changed","ingestion_routing.changed","ingestion.reset","ingestion.recompact","collection_entry.changed","notification.created","billing_account.changed","invoice.payment_failed","gold.alert_raised","billing_account.seats_over_limit","credits.low","credits.changed","admin.action","schema_proposal.changed","file_extraction.changed","file.changed","record_folder.changed","folder_share.changed","meeting_join_preference.changed","api_token.changed","app.created","app.changed","app.revoked","data_source.connected","data_source.changed","data_source.disconnected","client_connection.revoked","user_preference.changed","thread_read.changed","email_draft.changed","commitment.changed","audit.imported","enrichment_run.changed","enrichment_settings.changed","enrichment_field_map.changed","automation.changed","automation_run.changed"],"title":"EventType","type":"string"},"EventsGet":{"additionalProperties":false,"properties":{"event_id":{"description":"The event's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"}},"required":["event_id"],"title":"EventsGet","type":"object"},"EventsList":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's next_cursor.","title":"After"},"limit":{"default":50,"description":"Events per page (1-200).","title":"Limit","type":"integer"},"event_types":{"items":{"$ref":"#/$defs/EventType"},"title":"Event Types","type":"array","uniqueItems":true},"aggregate_type":{"anyOf":[{"$ref":"#/$defs/AggregateType"},{"type":"null"}],"default":null},"aggregate_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Aggregate Id"},"actor_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Only events this principal caused.","title":"Actor Id"},"occurred_from":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Inclusive start of `occurred_at`.","title":"Occurred From"},"occurred_to":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Inclusive end of `occurred_at`.","title":"Occurred To"},"payload_kinds":{"description":"Only events whose payload `kind` is one of these (an activity's kind).","items":{"type":"string"},"title":"Payload Kinds","type":"array","uniqueItems":true}},"title":"EventsList","type":"object"}},"properties":{"list":{"anyOf":[{"$ref":"#/$defs/EventsList"},{"type":"null"}],"default":null,"description":"Events in order; pass next_cursor back as `after` to read on or poll for new events."},"get":{"anyOf":[{"$ref":"#/$defs/EventsGet"},{"type":"null"}],"default":null,"description":"One event."}},"title":"eventsArguments","type":"object"},"outputSchema":{"$defs":{"AggregateType":{"enum":["tenant","object_type","entity","relation","activity","ingestion","knowledge","invitation","agent","data_source","agent_channel","transfer","document","document_import","workspace_item","notification","billing_account","credit_entry","collection_entry","favorite","reminder","field_reminder","workspace_setting","ingestion_routing","gold_alert","schema_proposal","file","file_extraction","record_folder","folder_share","api_token","app","client_connection","user_preference","thread_read","commitment","email_draft","source_item","source_schema","meeting_join_preference","enrichment_run","enrichment_settings","enrichment_field_map","automation","automation_run"],"title":"AggregateType","type":"string"},"CoreEvent":{"additionalProperties":false,"properties":{"event_id":{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Event Id","type":"string"},"event_type":{"$ref":"#/$defs/EventType"},"schema_version":{"default":1,"description":"Version of `payload` for this `event_type`. The envelope itself is versioned by path.","minimum":1,"title":"Schema Version","type":"integer"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"aggregate_type":{"$ref":"#/$defs/AggregateType"},"aggregate_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Aggregate Id","type":"string"},"occurred_at":{"format":"date-time","title":"Occurred At","type":"string"},"actor":{"$ref":"#/$defs/PrincipalRef"},"correlation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Correlation Id"},"causation_id":{"anyOf":[{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The event that caused this one, when a subscriber's change emits a new event.","title":"Causation Id"},"idempotency_key":{"maxLength":512,"minLength":1,"title":"Idempotency Key","type":"string"},"payload":{"additionalProperties":true,"title":"Payload","type":"object"}},"required":["event_id","event_type","tenant_id","aggregate_type","aggregate_id","occurred_at","actor","idempotency_key"],"title":"CoreEvent","type":"object"},"EventPage":{"additionalProperties":false,"description":"One page of the event ledger, oldest first.","properties":{"events":{"items":{"$ref":"#/$defs/CoreEvent"},"title":"Events","type":"array"},"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The position after the last event returned. Pass it back as `after` to read on, also\nwhen `has_more` is false, to poll for new events. None only when nothing matched yet.","title":"Next Cursor"},"has_more":{"default":false,"description":"Whether more events were already available when this page was read.","title":"Has More","type":"boolean"}},"required":["events"],"title":"EventPage","type":"object"},"EventType":{"description":"Every event Core publishes. See docs/modules/events.md.","enum":["tenant.created","tenant.updated","schema.changed","entity.created","entity.updated","entity.deleted","entity.history_redacted","relation.added","relation.removed","activity.recorded","activity.updated","activity.deleted","ingest.accepted","ingest.completed","source_item.accepted","source_schema.registered","acl.changed","invitation.created","invitation.accepted","invitation.updated","invitation.revoked","agent.created","agent.updated","agent.channel_changed","knowledge.created","knowledge.updated","transfer.requested","transfer.progressed","transfer.finished","document.created","document.updated","document.deleted","document_import.requested","document_import.progressed","document_import.finished","workspace_item.changed","favorite.changed","reminder.changed","field_reminder.changed","notifications.read","workspace_settings.changed","ingestion_routing.changed","ingestion.reset","ingestion.recompact","collection_entry.changed","notification.created","billing_account.changed","invoice.payment_failed","gold.alert_raised","billing_account.seats_over_limit","credits.low","credits.changed","admin.action","schema_proposal.changed","file_extraction.changed","file.changed","record_folder.changed","folder_share.changed","meeting_join_preference.changed","api_token.changed","app.created","app.changed","app.revoked","data_source.connected","data_source.changed","data_source.disconnected","client_connection.revoked","user_preference.changed","thread_read.changed","email_draft.changed","commitment.changed","audit.imported","enrichment_run.changed","enrichment_settings.changed","enrichment_field_map.changed","automation.changed","automation_run.changed"],"title":"EventType","type":"string"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/EventPage"},{"$ref":"#/$defs/CoreEvent"}],"title":"Result"}},"required":["result"],"title":"eventsOutput","type":"object"},"annotations":{"title":"Events","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"enrichment","title":"Enrichment","description":"Filling records' empty fields from external data providers: a record's enrichment state, runs and their progress, the providers with their credit price per resolved record, the workspace's settings and field maps. Needs enrichment.view. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"EnrichmentFieldMap":{"additionalProperties":false,"properties":{"object_type":{"description":"The object type's slug.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"mode":{"anyOf":[{"$ref":"#/$defs/EnrichmentMode"},{"type":"null"}],"default":null,"description":"organization or person; the type's archetype by default."}},"required":["object_type"],"title":"EnrichmentFieldMap","type":"object"},"EnrichmentMode":{"description":"What a lookup is about: an organization or a person. Chosen from a record's signals,\nperson signals first (ADR 0034, R2).","enum":["organization","person"],"title":"EnrichmentMode","type":"string"},"EnrichmentPreview":{"additionalProperties":false,"properties":{"kind":{"$ref":"#/$defs/EnrichmentRunKind"},"record_ids":{"default":[],"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":200,"title":"Record Ids","type":"array"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"attributes":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"title":"Attributes","type":"array"},"scope":{"anyOf":[{"$ref":"#/$defs/EnrichmentScope"},{"type":"null"}],"default":null},"force":{"default":false,"title":"Force","type":"boolean"}},"required":["kind"],"title":"EnrichmentPreview","type":"object"},"EnrichmentProviders":{"additionalProperties":false,"properties":{},"title":"EnrichmentProviders","type":"object"},"EnrichmentRecord":{"additionalProperties":false,"properties":{"record_id":{"description":"The record's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"}},"required":["record_id"],"title":"EnrichmentRecord","type":"object"},"EnrichmentRecords":{"additionalProperties":false,"properties":{"record_ids":{"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":200,"minItems":1,"title":"Record Ids","type":"array"}},"required":["record_ids"],"title":"EnrichmentRecords","type":"object"},"EnrichmentRun":{"additionalProperties":false,"properties":{"run_id":{"description":"The enrichment run's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Run Id","type":"string"}},"required":["run_id"],"title":"EnrichmentRun","type":"object"},"EnrichmentRunKind":{"enum":["record","records","object_type","column","on_create","import"],"title":"EnrichmentRunKind","type":"string"},"EnrichmentRunStatus":{"enum":["queued","planning","running","done","cancelled","failed","stopped"],"title":"EnrichmentRunStatus","type":"string"},"EnrichmentRuns":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"status":{"anyOf":[{"$ref":"#/$defs/EnrichmentRunStatus"},{"type":"null"}],"default":null},"kind":{"anyOf":[{"$ref":"#/$defs/EnrichmentRunKind"},{"type":"null"}],"default":null},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"requested_by":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Requested By"}},"title":"EnrichmentRuns","type":"object"},"EnrichmentScope":{"additionalProperties":false,"description":"Which records of an object type an `object_type` or `column` run covers.","properties":{"mode":{"$ref":"#/$defs/EnrichmentScopeMode","default":"missing_or_stale"},"stale_after":{"anyOf":[{"format":"duration","type":"string"},{"type":"null"}],"default":null,"description":"What `missing_or_stale` counts as stale; the deployment's `stale_after` (90 days) when\nnone.","title":"Stale After"},"attributes":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"type":"array"},{"type":"null"}],"default":null,"description":"The fields `missing_or_stale` checks for emptiness; every mapped field when none.","title":"Attributes"}},"title":"EnrichmentScope","type":"object"},"EnrichmentScopeMode":{"enum":["missing_or_stale","all"],"title":"EnrichmentScopeMode","type":"string"},"EnrichmentSettings":{"additionalProperties":false,"properties":{},"title":"EnrichmentSettings","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"}},"properties":{"record":{"anyOf":[{"$ref":"#/$defs/EnrichmentRecord"},{"type":"null"}],"default":null,"description":"A record's enrichment state: when it was last enriched and tried, each provider's last answer (no data, with its date), and which provider wrote each field. Never tried: no last_attempt_at."},"records":{"anyOf":[{"$ref":"#/$defs/EnrichmentRecords"},{"type":"null"}],"default":null,"description":"The enrichment state of up to 200 records; records you cannot see are left out."},"run":{"anyOf":[{"$ref":"#/$defs/EnrichmentRun"},{"type":"null"}],"default":null,"description":"One enrichment run: its status and counters (resolved, no data, skipped, failed, fields written, credits)."},"runs":{"anyOf":[{"$ref":"#/$defs/EnrichmentRuns"},{"type":"null"}],"default":null,"description":"Enrichment runs, newest first: your own, or all with enrichment.run_bulk."},"preview":{"anyOf":[{"$ref":"#/$defs/EnrichmentPreview"},{"type":"null"}],"default":null,"description":"What a run would do, without running it: records in scope, cache hits, provider calls and the credit estimate."},"providers":{"anyOf":[{"$ref":"#/$defs/EnrichmentProviders"},{"type":"null"}],"default":null,"description":"The providers, in the workspace's order: kind, what they look up and supply, available, enabled and credits per resolved record."},"settings":{"anyOf":[{"$ref":"#/$defs/EnrichmentSettings"},{"type":"null"}],"default":null,"description":"The workspace's provider order and switches, automatic enrichment and person mode."},"field_map":{"anyOf":[{"$ref":"#/$defs/EnrichmentFieldMap"},{"type":"null"}],"default":null,"description":"Which attribute of an object type each enrichment field fills, decided on first read."}},"title":"enrichmentArguments","type":"object"},"outputSchema":{"$defs":{"AgentRef":{"additionalProperties":false,"description":"The agent a request was made for (ADR 0031 section 4, `Principal.agent`): set by the agent\nhost's turn authority from the deployment's agent, so the agent's use scope applies to the\ncalls it makes into Core.","properties":{"agent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The agent's home tenant, when it differs from the caller's: a shared Morphic AI\ndeployment is owned by the operator tenant while its turns act in each workspace\n(ADR 0040). `None` reads the agent's scope in the caller's tenant, as before.","title":"Tenant Id"}},"required":["agent_id"],"title":"AgentRef","type":"object"},"AppKind":{"description":"What reaches the workspace (ADR 0031).","enum":["frontend","mcp_client","api_key"],"title":"AppKind","type":"string"},"AppRef":{"additionalProperties":false,"description":"The app a request came through (attribution, ADR 0031 section 2).","properties":{"app_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"App Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"kind":{"$ref":"#/$defs/AppKind"},"first_party":{"default":false,"description":"Declared by the deployment (`MORPHIC_CORE_FIRST_PARTY_APPS`): attributed, never listed.","title":"First Party","type":"boolean"}},"required":["app_id","name","kind"],"title":"AppRef","type":"object"},"AutoEnrich":{"additionalProperties":false,"properties":{"enabled":{"default":false,"title":"Enabled","type":"boolean"},"object_types":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"type":"array"},{"type":"null"}],"default":null,"description":"The object types enriched when a person creates or imports a record; null means every\ntype of archetype `organization` or `identity`.","title":"Object Types"}},"title":"AutoEnrich","type":"object"},"EnrichmentCounters":{"additionalProperties":false,"properties":{"total":{"default":0,"description":"Records in the run, once planned.","minimum":0,"title":"Total","type":"integer"},"resolved":{"default":0,"minimum":0,"title":"Resolved","type":"integer"},"no_data":{"default":0,"minimum":0,"title":"No Data","type":"integer"},"skipped":{"default":0,"minimum":0,"title":"Skipped","type":"integer"},"failed":{"default":0,"minimum":0,"title":"Failed","type":"integer"},"cached":{"default":0,"description":"Records answered from the payload cache, with no provider call (and no charge).","minimum":0,"title":"Cached","type":"integer"},"written_fields":{"default":0,"minimum":0,"title":"Written Fields","type":"integer"},"dropped":{"default":0,"description":"Values refused by the attribute's coercion, an identity check or the quote check.","minimum":0,"title":"Dropped","type":"integer"},"credits":{"default":0,"description":"Credits charged so far, at the rates in force when each was charged.","minimum":0,"title":"Credits","type":"number"},"not_reached":{"default":0,"description":"Records a stopped run did not look up.","minimum":0,"title":"Not Reached","type":"integer"}},"title":"EnrichmentCounters","type":"object"},"EnrichmentField":{"description":"Core's vocabulary of enrichable fields. A provider declares which it accepts as lookup\nsignals and which it supplies; a field map binds a workspace's attributes to them. Adding a\nvalue is additive.","enum":["name","domain","description","industry","employee_count","founded_year","hq_city","hq_region","hq_country","social_profile_url","phone","full_name","first_name","last_name","title","seniority","department","location","employer_domain","email"],"title":"EnrichmentField","type":"string"},"EnrichmentFieldMap":{"additionalProperties":false,"properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"mode":{"$ref":"#/$defs/EnrichmentMode"},"entries":{"default":[],"items":{"$ref":"#/$defs/FieldMapEntry"},"maxItems":500,"title":"Entries","type":"array"},"stale":{"default":false,"description":"The object type's schema changed since the map was decided: it is decided again on next\nuse.","title":"Stale","type":"boolean"},"version":{"default":0,"minimum":0,"title":"Version","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"}},"required":["tenant_id","object_type","mode"],"title":"EnrichmentFieldMap","type":"object"},"EnrichmentMode":{"description":"What a lookup is about: an organization or a person. Chosen from a record's signals,\nperson signals first (ADR 0034, R2).","enum":["organization","person"],"title":"EnrichmentMode","type":"string"},"EnrichmentOrigin":{"description":"How an enrichment of a record was started.","enum":["manual","bulk","column","on_create","import","monitor"],"title":"EnrichmentOrigin","type":"string"},"EnrichmentPreview":{"additionalProperties":false,"description":"What a run would do, before it runs.","properties":{"records":{"default":0,"description":"Records in scope.","minimum":0,"title":"Records","type":"integer"},"without_signals":{"default":0,"description":"Records in scope with nothing to look up by: they would be skipped.","minimum":0,"title":"Without Signals","type":"integer"},"cached":{"default":0,"description":"Records the payload cache would answer, at no charge.","minimum":0,"title":"Cached","type":"integer"},"lookups":{"default":0,"description":"Records a provider would be asked about.","minimum":0,"title":"Lookups","type":"integer"},"provider_calls":{"default":0,"description":"Calls to the first provider of the cascade, batched.","minimum":0,"title":"Provider Calls","type":"integer"},"credits_estimate":{"default":0,"description":"If every lookup resolved at the first provider's current rate: the most the run costs\nthere.","minimum":0,"title":"Credits Estimate","type":"number"},"truncated":{"default":false,"description":"The scope covers more than one run may (`max_run_records`); counts are for the\nrecords a run would take.","title":"Truncated","type":"boolean"}},"title":"EnrichmentPreview","type":"object"},"EnrichmentProviderInfo":{"additionalProperties":false,"description":"One provider of the deployment's catalog, merged with the workspace's settings. Labels\nand descriptions are the client's: Core ships no product copy.","properties":{"name":{"description":"The adapter's name.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name","type":"string"},"kind":{"$ref":"#/$defs/ProviderKind"},"modes":{"items":{"$ref":"#/$defs/EnrichmentMode"},"title":"Modes","type":"array","uniqueItems":true},"inferred":{"default":false,"description":"Its values are a model's reading of the web, not a lookup: it never fills email or\nphone.","title":"Inferred","type":"boolean"},"accepts":{"items":{"$ref":"#/$defs/EnrichmentField"},"title":"Accepts","type":"array","uniqueItems":true},"supplies":{"items":{"$ref":"#/$defs/EnrichmentField"},"title":"Supplies","type":"array","uniqueItems":true},"available":{"description":"Would it run now: the deployment has a credential for it.","title":"Available","type":"boolean"},"enabled":{"description":"The workspace's intent.","title":"Enabled","type":"boolean"},"order":{"description":"Its place in the workspace's cascade, first is 0.","minimum":0,"title":"Order","type":"integer"},"credits_per_record":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"What one resolved record costs at the deployment's `credit_rates`; none when no rate is\nset (nothing is charged).","title":"Credits Per Record"}},"required":["name","kind","modes","available","enabled","order"],"title":"EnrichmentProviderInfo","type":"object"},"EnrichmentRun":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/EnrichmentRunKind"},"origin":{"$ref":"#/$defs/EnrichmentOrigin"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"record_ids":{"default":[],"description":"The ids a `record` or `records` run named.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array"},"attributes":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Attributes","type":"array"},"scope":{"anyOf":[{"$ref":"#/$defs/EnrichmentScope"},{"type":"null"}],"default":null},"force":{"default":false,"title":"Force","type":"boolean"},"requester":{"$ref":"#/$defs/Principal","description":"Who asked: the run reads with their current access, never more."},"status":{"$ref":"#/$defs/EnrichmentRunStatus","default":"queued"},"counters":{"$ref":"#/$defs/EnrichmentCounters"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null,"description":"Why a failed run stopped."},"stopped_reason":{"anyOf":[{"$ref":"#/$defs/EnrichmentSkipReason"},{"type":"null"}],"default":null,"description":"Why a `stopped` run ended early (`no_credits`: the workspace's credits ran out)."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"},"cancelled_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Cancelled At"}},"required":["id","tenant_id","kind","origin","requester","created_at"],"title":"EnrichmentRun","type":"object"},"EnrichmentRunKind":{"enum":["record","records","object_type","column","on_create","import"],"title":"EnrichmentRunKind","type":"string"},"EnrichmentRunPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"runs":{"default":[],"items":{"$ref":"#/$defs/EnrichmentRun"},"title":"Runs","type":"array"}},"title":"EnrichmentRunPage","type":"object"},"EnrichmentRunStatus":{"enum":["queued","planning","running","done","cancelled","failed","stopped"],"title":"EnrichmentRunStatus","type":"string"},"EnrichmentScope":{"additionalProperties":false,"description":"Which records of an object type an `object_type` or `column` run covers.","properties":{"mode":{"$ref":"#/$defs/EnrichmentScopeMode","default":"missing_or_stale"},"stale_after":{"anyOf":[{"format":"duration","type":"string"},{"type":"null"}],"default":null,"description":"What `missing_or_stale` counts as stale; the deployment's `stale_after` (90 days) when\nnone.","title":"Stale After"},"attributes":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"type":"array"},{"type":"null"}],"default":null,"description":"The fields `missing_or_stale` checks for emptiness; every mapped field when none.","title":"Attributes"}},"title":"EnrichmentScope","type":"object"},"EnrichmentScopeMode":{"enum":["missing_or_stale","all"],"title":"EnrichmentScopeMode","type":"string"},"EnrichmentSettings":{"additionalProperties":false,"description":"A workspace's enrichment settings, read merged with the deployment's catalog: providers\nthe deployment no longer has are left out, new ones appended at their default.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"providers":{"default":[],"description":"The cascade, in order: each provider sees only the records the earlier ones did not\nresolve.","items":{"$ref":"#/$defs/ProviderSetting"},"maxItems":50,"title":"Providers","type":"array"},"auto_enrich":{"$ref":"#/$defs/AutoEnrich"},"person_mode":{"default":false,"description":"Whether person enrichment may run at all: it sends people's names and email addresses\nto a third party.","title":"Person Mode","type":"boolean"},"research_provider":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Which provider answers research questions; reserved for the research lane (later).","title":"Research Provider"},"version":{"default":0,"description":"`0` is the default, never stored.","minimum":0,"title":"Version","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["tenant_id"],"title":"EnrichmentSettings","type":"object"},"EnrichmentSkipReason":{"description":"Why a record of a run was skipped or failed (`EnrichmentItemOutcome` `skipped` or\n`failed`).","enum":["no_signals","person_mode_off","no_provider","unchanged","changed","gone","no_credits","cancelled","no_access","provider_error"],"title":"EnrichmentSkipReason","type":"string"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"FieldEnrichment":{"additionalProperties":false,"properties":{"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"provider":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Provider","type":"string"},"run_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Run Id","type":"string"},"written_at":{"format":"date-time","title":"Written At","type":"string"},"value_digest":{"description":"Of the value written, so a later run knows whether a person changed it since.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Value Digest","type":"string"},"inferred":{"default":false,"title":"Inferred","type":"boolean"}},"required":["attribute","provider","run_id","written_at","value_digest"],"title":"FieldEnrichment","type":"object"},"FieldMapBasis":{"description":"How an attribute was bound to an `EnrichmentField`.","enum":["system_key","name","suggested","person"],"title":"FieldMapBasis","type":"string"},"FieldMapEntry":{"additionalProperties":false,"properties":{"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"field":{"anyOf":[{"$ref":"#/$defs/EnrichmentField"},{"type":"null"}],"default":null,"description":"None: the attribute is not filled by enrichment (decided, so not asked again)."},"basis":{"$ref":"#/$defs/FieldMapBasis"},"definition_digest":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The attribute definition it was decided for; a changed attribute is decided again.","title":"Definition Digest"}},"required":["attribute","basis"],"title":"FieldMapEntry","type":"object"},"Principal":{"additionalProperties":false,"description":"A `PrincipalRef` plus what governance needs to decide on its requests.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"roles":{"description":"Role slugs in this tenant. Role definitions are tenant data, not a Core enum.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"For tokens and agents: the most the credential may do. None means role permissions only.","title":"Scopes"},"via":{"anyOf":[{"$ref":"#/$defs/AppRef"},{"type":"null"}],"default":null,"description":"The app the call came through (ADR 0031): who a request is attributed to, set by the\nauthenticator from the token's client id or the key's app. None for a host's service\ncredential and for a person whose token names no client."},"agent":{"anyOf":[{"$ref":"#/$defs/AgentRef"},{"type":"null"}],"default":null,"description":"The agent the call is made for (ADR 0031 section 4): set by the agent host's turn\nauthority from the deployment's agent. Its use scope narrows the call beside the app's.\nNone for everything else."},"data_scope":{"$ref":"#/$defs/Visibility","default":"tenant","description":"Whether the principal sees tenant-wide data or only its own (e.g. a personal agent)."}},"required":["id","kind","tenant_id"],"title":"Principal","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"ProviderAttempt":{"additionalProperties":false,"properties":{"provider":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Provider","type":"string"},"status":{"$ref":"#/$defs/ProviderAttemptStatus"},"at":{"format":"date-time","title":"At","type":"string"},"no_data_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When it last answered that it has nothing: the cell's \"No data found (date)\".","title":"No Data At"}},"required":["provider","status","at"],"title":"ProviderAttempt","type":"object"},"ProviderAttemptStatus":{"description":"What a provider last answered for a record.","enum":["resolved","no_data","failed","unavailable"],"title":"ProviderAttemptStatus","type":"string"},"ProviderKind":{"enum":["structured","sources"],"title":"ProviderKind","type":"string"},"ProviderList":{"additionalProperties":false,"description":"The providers a workspace can enrich with, in its cascade order.","properties":{"providers":{"default":[],"items":{"$ref":"#/$defs/EnrichmentProviderInfo"},"title":"Providers","type":"array"}},"title":"ProviderList","type":"object"},"ProviderSetting":{"additionalProperties":false,"properties":{"name":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name","type":"string"},"enabled":{"default":true,"title":"Enabled","type":"boolean"}},"required":["name"],"title":"ProviderSetting","type":"object"},"RecordEnrichment":{"additionalProperties":false,"description":"A record's enrichment state. A record never tried has no `last_attempt_at`.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"record_id":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Record Id","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"mode":{"anyOf":[{"$ref":"#/$defs/EnrichmentMode"},{"type":"null"}],"default":null},"last_enriched_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When a provider last resolved it.","title":"Last Enriched At"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Attempt At"},"last_origin":{"anyOf":[{"$ref":"#/$defs/EnrichmentOrigin"},{"type":"null"}],"default":null},"last_run_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Last Run Id"},"providers":{"default":[],"items":{"$ref":"#/$defs/ProviderAttempt"},"title":"Providers","type":"array"},"fields":{"default":[],"items":{"$ref":"#/$defs/FieldEnrichment"},"title":"Fields","type":"array"},"version":{"default":0,"minimum":0,"title":"Version","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"}},"required":["tenant_id","record_id"],"title":"RecordEnrichment","type":"object"},"RecordEnrichmentPage":{"additionalProperties":false,"description":"The state of each record asked for that the caller may see; others are left out.","properties":{"records":{"default":[],"items":{"$ref":"#/$defs/RecordEnrichment"},"title":"Records","type":"array"}},"title":"RecordEnrichmentPage","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/RecordEnrichment"},{"$ref":"#/$defs/RecordEnrichmentPage"},{"$ref":"#/$defs/EnrichmentRun"},{"$ref":"#/$defs/EnrichmentRunPage"},{"$ref":"#/$defs/EnrichmentPreview"},{"$ref":"#/$defs/ProviderList"},{"$ref":"#/$defs/EnrichmentSettings"},{"$ref":"#/$defs/EnrichmentFieldMap"}],"title":"Result"}},"required":["result"],"title":"enrichmentOutput","type":"object"},"annotations":{"title":"Enrichment","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_enrichment","title":"Manage enrichment","description":"Start and cancel enrichment runs, and change the workspace's enrichment settings and field maps. Runs spend the workspace's credits per resolved record. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AutoEnrich":{"additionalProperties":false,"properties":{"enabled":{"default":false,"title":"Enabled","type":"boolean"},"object_types":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"type":"array"},{"type":"null"}],"default":null,"description":"The object types enriched when a person creates or imports a record; null means every\ntype of archetype `organization` or `identity`.","title":"Object Types"}},"title":"AutoEnrich","type":"object"},"EnrichmentField":{"description":"Core's vocabulary of enrichable fields. A provider declares which it accepts as lookup\nsignals and which it supplies; a field map binds a workspace's attributes to them. Adding a\nvalue is additive.","enum":["name","domain","description","industry","employee_count","founded_year","hq_city","hq_region","hq_country","social_profile_url","phone","full_name","first_name","last_name","title","seniority","department","location","employer_domain","email"],"title":"EnrichmentField","type":"string"},"EnrichmentMode":{"description":"What a lookup is about: an organization or a person. Chosen from a record's signals,\nperson signals first (ADR 0034, R2).","enum":["organization","person"],"title":"EnrichmentMode","type":"string"},"EnrichmentRunKind":{"enum":["record","records","object_type","column","on_create","import"],"title":"EnrichmentRunKind","type":"string"},"EnrichmentScope":{"additionalProperties":false,"description":"Which records of an object type an `object_type` or `column` run covers.","properties":{"mode":{"$ref":"#/$defs/EnrichmentScopeMode","default":"missing_or_stale"},"stale_after":{"anyOf":[{"format":"duration","type":"string"},{"type":"null"}],"default":null,"description":"What `missing_or_stale` counts as stale; the deployment's `stale_after` (90 days) when\nnone.","title":"Stale After"},"attributes":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"type":"array"},{"type":"null"}],"default":null,"description":"The fields `missing_or_stale` checks for emptiness; every mapped field when none.","title":"Attributes"}},"title":"EnrichmentScope","type":"object"},"EnrichmentScopeMode":{"enum":["missing_or_stale","all"],"title":"EnrichmentScopeMode","type":"string"},"EnrichmentSettingsChange":{"additionalProperties":false,"description":"`PUT /core/v1/enrichment/settings`: only the fields given change.","properties":{"providers":{"anyOf":[{"items":{"$ref":"#/$defs/ProviderSetting"},"maxItems":50,"type":"array"},{"type":"null"}],"default":null,"description":"The whole order; providers left out keep their default place, after the ones given.","title":"Providers"},"auto_enrich":{"anyOf":[{"$ref":"#/$defs/AutoEnrich"},{"type":"null"}],"default":null},"person_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Person Mode"},"research_provider":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Research Provider"},"expected_version":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"title":"EnrichmentSettingsChange","type":"object"},"FieldMapAssignment":{"additionalProperties":false,"properties":{"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"field":{"anyOf":[{"$ref":"#/$defs/EnrichmentField"},{"type":"null"}],"default":null}},"required":["attribute"],"title":"FieldMapAssignment","type":"object"},"ManageEnrichmentCancel":{"additionalProperties":false,"properties":{"run_id":{"description":"The enrichment run's id.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Run Id","type":"string"}},"required":["run_id"],"title":"ManageEnrichmentCancel","type":"object"},"ManageEnrichmentEnrich":{"additionalProperties":false,"properties":{"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Names the request: the same key returns the same run.","title":"Idempotency Key"},"kind":{"$ref":"#/$defs/EnrichmentRunKind"},"record_ids":{"default":[],"items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":200,"title":"Record Ids","type":"array"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"attributes":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"title":"Attributes","type":"array"},"scope":{"anyOf":[{"$ref":"#/$defs/EnrichmentScope"},{"type":"null"}],"default":null},"force":{"default":false,"title":"Force","type":"boolean"}},"required":["kind"],"title":"ManageEnrichmentEnrich","type":"object"},"ManageEnrichmentSetFieldMap":{"additionalProperties":false,"properties":{"object_type":{"description":"The object type's slug.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"mode":{"$ref":"#/$defs/EnrichmentMode"},"entries":{"items":{"$ref":"#/$defs/FieldMapAssignment"},"maxItems":500,"title":"Entries","type":"array"},"expected_version":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["object_type","mode","entries"],"title":"ManageEnrichmentSetFieldMap","type":"object"},"ManageEnrichmentSetSettings":{"additionalProperties":false,"properties":{"change":{"$ref":"#/$defs/EnrichmentSettingsChange","description":"Fields."}},"required":["change"],"title":"ManageEnrichmentSetSettings","type":"object"},"ProviderSetting":{"additionalProperties":false,"properties":{"name":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name","type":"string"},"enabled":{"default":true,"title":"Enabled","type":"boolean"}},"required":["name"],"title":"ProviderSetting","type":"object"}},"properties":{"enrich":{"anyOf":[{"$ref":"#/$defs/ManageEnrichmentEnrich"},{"type":"null"}],"default":null,"description":"Start a run: `record` or `records` (record_ids, up to 200; needs enrichment.run and records.write on each), `object_type` or `column` (needs enrichment.run_bulk). Fills empty fields only unless `force`. Answers at once; follow it with enrichment(run=…)."},"cancel":{"anyOf":[{"$ref":"#/$defs/ManageEnrichmentCancel"},{"type":"null"}],"default":null,"description":"Stop a run: nothing more is scheduled, work in flight finishes. Its requester, or enrichment.run_bulk."},"set_settings":{"anyOf":[{"$ref":"#/$defs/ManageEnrichmentSetSettings"},{"type":"null"}],"default":null,"description":"Change the fields sent: provider order and switches, automatic enrichment, person mode. Needs enrichment.manage."},"set_field_map":{"anyOf":[{"$ref":"#/$defs/ManageEnrichmentSetFieldMap"},{"type":"null"}],"default":null,"description":"Correct which field fills which attribute; corrections are kept over suggestions. Needs enrichment.manage."}},"title":"manage_enrichmentArguments","type":"object"},"outputSchema":{"$defs":{"AgentRef":{"additionalProperties":false,"description":"The agent a request was made for (ADR 0031 section 4, `Principal.agent`): set by the agent\nhost's turn authority from the deployment's agent, so the agent's use scope applies to the\ncalls it makes into Core.","properties":{"agent_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Agent Id","type":"string"},"tenant_id":{"anyOf":[{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The agent's home tenant, when it differs from the caller's: a shared Morphic AI\ndeployment is owned by the operator tenant while its turns act in each workspace\n(ADR 0040). `None` reads the agent's scope in the caller's tenant, as before.","title":"Tenant Id"}},"required":["agent_id"],"title":"AgentRef","type":"object"},"AppKind":{"description":"What reaches the workspace (ADR 0031).","enum":["frontend","mcp_client","api_key"],"title":"AppKind","type":"string"},"AppRef":{"additionalProperties":false,"description":"The app a request came through (attribution, ADR 0031 section 2).","properties":{"app_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"App Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"kind":{"$ref":"#/$defs/AppKind"},"first_party":{"default":false,"description":"Declared by the deployment (`MORPHIC_CORE_FIRST_PARTY_APPS`): attributed, never listed.","title":"First Party","type":"boolean"}},"required":["app_id","name","kind"],"title":"AppRef","type":"object"},"AutoEnrich":{"additionalProperties":false,"properties":{"enabled":{"default":false,"title":"Enabled","type":"boolean"},"object_types":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":200,"type":"array"},{"type":"null"}],"default":null,"description":"The object types enriched when a person creates or imports a record; null means every\ntype of archetype `organization` or `identity`.","title":"Object Types"}},"title":"AutoEnrich","type":"object"},"EnrichmentCounters":{"additionalProperties":false,"properties":{"total":{"default":0,"description":"Records in the run, once planned.","minimum":0,"title":"Total","type":"integer"},"resolved":{"default":0,"minimum":0,"title":"Resolved","type":"integer"},"no_data":{"default":0,"minimum":0,"title":"No Data","type":"integer"},"skipped":{"default":0,"minimum":0,"title":"Skipped","type":"integer"},"failed":{"default":0,"minimum":0,"title":"Failed","type":"integer"},"cached":{"default":0,"description":"Records answered from the payload cache, with no provider call (and no charge).","minimum":0,"title":"Cached","type":"integer"},"written_fields":{"default":0,"minimum":0,"title":"Written Fields","type":"integer"},"dropped":{"default":0,"description":"Values refused by the attribute's coercion, an identity check or the quote check.","minimum":0,"title":"Dropped","type":"integer"},"credits":{"default":0,"description":"Credits charged so far, at the rates in force when each was charged.","minimum":0,"title":"Credits","type":"number"},"not_reached":{"default":0,"description":"Records a stopped run did not look up.","minimum":0,"title":"Not Reached","type":"integer"}},"title":"EnrichmentCounters","type":"object"},"EnrichmentField":{"description":"Core's vocabulary of enrichable fields. A provider declares which it accepts as lookup\nsignals and which it supplies; a field map binds a workspace's attributes to them. Adding a\nvalue is additive.","enum":["name","domain","description","industry","employee_count","founded_year","hq_city","hq_region","hq_country","social_profile_url","phone","full_name","first_name","last_name","title","seniority","department","location","employer_domain","email"],"title":"EnrichmentField","type":"string"},"EnrichmentFieldMap":{"additionalProperties":false,"properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"mode":{"$ref":"#/$defs/EnrichmentMode"},"entries":{"default":[],"items":{"$ref":"#/$defs/FieldMapEntry"},"maxItems":500,"title":"Entries","type":"array"},"stale":{"default":false,"description":"The object type's schema changed since the map was decided: it is decided again on next\nuse.","title":"Stale","type":"boolean"},"version":{"default":0,"minimum":0,"title":"Version","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"}},"required":["tenant_id","object_type","mode"],"title":"EnrichmentFieldMap","type":"object"},"EnrichmentMode":{"description":"What a lookup is about: an organization or a person. Chosen from a record's signals,\nperson signals first (ADR 0034, R2).","enum":["organization","person"],"title":"EnrichmentMode","type":"string"},"EnrichmentOrigin":{"description":"How an enrichment of a record was started.","enum":["manual","bulk","column","on_create","import","monitor"],"title":"EnrichmentOrigin","type":"string"},"EnrichmentRun":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"kind":{"$ref":"#/$defs/EnrichmentRunKind"},"origin":{"$ref":"#/$defs/EnrichmentOrigin"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"},"record_ids":{"default":[],"description":"The ids a `record` or `records` run named.","items":{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"title":"Record Ids","type":"array"},"attributes":{"default":[],"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Attributes","type":"array"},"scope":{"anyOf":[{"$ref":"#/$defs/EnrichmentScope"},{"type":"null"}],"default":null},"force":{"default":false,"title":"Force","type":"boolean"},"requester":{"$ref":"#/$defs/Principal","description":"Who asked: the run reads with their current access, never more."},"status":{"$ref":"#/$defs/EnrichmentRunStatus","default":"queued"},"counters":{"$ref":"#/$defs/EnrichmentCounters"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null,"description":"Why a failed run stopped."},"stopped_reason":{"anyOf":[{"$ref":"#/$defs/EnrichmentSkipReason"},{"type":"null"}],"default":null,"description":"Why a `stopped` run ended early (`no_credits`: the workspace's credits ran out)."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"},"cancelled_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Cancelled At"}},"required":["id","tenant_id","kind","origin","requester","created_at"],"title":"EnrichmentRun","type":"object"},"EnrichmentRunKind":{"enum":["record","records","object_type","column","on_create","import"],"title":"EnrichmentRunKind","type":"string"},"EnrichmentRunStatus":{"enum":["queued","planning","running","done","cancelled","failed","stopped"],"title":"EnrichmentRunStatus","type":"string"},"EnrichmentScope":{"additionalProperties":false,"description":"Which records of an object type an `object_type` or `column` run covers.","properties":{"mode":{"$ref":"#/$defs/EnrichmentScopeMode","default":"missing_or_stale"},"stale_after":{"anyOf":[{"format":"duration","type":"string"},{"type":"null"}],"default":null,"description":"What `missing_or_stale` counts as stale; the deployment's `stale_after` (90 days) when\nnone.","title":"Stale After"},"attributes":{"anyOf":[{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"type":"array"},{"type":"null"}],"default":null,"description":"The fields `missing_or_stale` checks for emptiness; every mapped field when none.","title":"Attributes"}},"title":"EnrichmentScope","type":"object"},"EnrichmentScopeMode":{"enum":["missing_or_stale","all"],"title":"EnrichmentScopeMode","type":"string"},"EnrichmentSettings":{"additionalProperties":false,"description":"A workspace's enrichment settings, read merged with the deployment's catalog: providers\nthe deployment no longer has are left out, new ones appended at their default.","properties":{"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"providers":{"default":[],"description":"The cascade, in order: each provider sees only the records the earlier ones did not\nresolve.","items":{"$ref":"#/$defs/ProviderSetting"},"maxItems":50,"title":"Providers","type":"array"},"auto_enrich":{"$ref":"#/$defs/AutoEnrich"},"person_mode":{"default":false,"description":"Whether person enrichment may run at all: it sends people's names and email addresses\nto a third party.","title":"Person Mode","type":"boolean"},"research_provider":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"Which provider answers research questions; reserved for the research lane (later).","title":"Research Provider"},"version":{"default":0,"description":"`0` is the default, never stored.","minimum":0,"title":"Version","type":"integer"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Updated At"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"}},"required":["tenant_id"],"title":"EnrichmentSettings","type":"object"},"EnrichmentSkipReason":{"description":"Why a record of a run was skipped or failed (`EnrichmentItemOutcome` `skipped` or\n`failed`).","enum":["no_signals","person_mode_off","no_provider","unchanged","changed","gone","no_credits","cancelled","no_access","provider_error"],"title":"EnrichmentSkipReason","type":"string"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"FieldMapBasis":{"description":"How an attribute was bound to an `EnrichmentField`.","enum":["system_key","name","suggested","person"],"title":"FieldMapBasis","type":"string"},"FieldMapEntry":{"additionalProperties":false,"properties":{"attribute":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"field":{"anyOf":[{"$ref":"#/$defs/EnrichmentField"},{"type":"null"}],"default":null,"description":"None: the attribute is not filled by enrichment (decided, so not asked again)."},"basis":{"$ref":"#/$defs/FieldMapBasis"},"definition_digest":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The attribute definition it was decided for; a changed attribute is decided again.","title":"Definition Digest"}},"required":["attribute","basis"],"title":"FieldMapEntry","type":"object"},"Principal":{"additionalProperties":false,"description":"A `PrincipalRef` plus what governance needs to decide on its requests.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"display_name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Display Name"},"roles":{"description":"Role slugs in this tenant. Role definitions are tenant data, not a Core enum.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Roles","type":"array","uniqueItems":true},"scopes":{"anyOf":[{"items":{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"For tokens and agents: the most the credential may do. None means role permissions only.","title":"Scopes"},"via":{"anyOf":[{"$ref":"#/$defs/AppRef"},{"type":"null"}],"default":null,"description":"The app the call came through (ADR 0031): who a request is attributed to, set by the\nauthenticator from the token's client id or the key's app. None for a host's service\ncredential and for a person whose token names no client."},"agent":{"anyOf":[{"$ref":"#/$defs/AgentRef"},{"type":"null"}],"default":null,"description":"The agent the call is made for (ADR 0031 section 4): set by the agent host's turn\nauthority from the deployment's agent. Its use scope narrows the call beside the app's.\nNone for everything else."},"data_scope":{"$ref":"#/$defs/Visibility","default":"tenant","description":"Whether the principal sees tenant-wide data or only its own (e.g. a personal agent)."}},"required":["id","kind","tenant_id"],"title":"Principal","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"ProviderSetting":{"additionalProperties":false,"properties":{"name":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name","type":"string"},"enabled":{"default":true,"title":"Enabled","type":"boolean"}},"required":["name"],"title":"ProviderSetting","type":"object"},"Visibility":{"description":"Who may see a piece of data inside its tenant.","enum":["tenant","principal"],"title":"Visibility","type":"string"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/EnrichmentRun"},{"$ref":"#/$defs/EnrichmentSettings"},{"$ref":"#/$defs/EnrichmentFieldMap"}],"title":"Result"}},"required":["result"],"title":"manage_enrichmentOutput","type":"object"},"annotations":{"title":"Manage enrichment","readOnlyHint":false,"destructiveHint":false,"openWorldHint":false}},{"name":"automations","title":"Automations","description":"The workspace's automations: their definitions, versions, what they can do, and their runs. Needs automations.view. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"AutomationRunStatus":{"enum":["queued","running","waiting","succeeded","failed","cancelled"],"title":"AutomationRunStatus","type":"string"},"AutomationStatus":{"enum":["draft","active","paused","archived"],"title":"AutomationStatus","type":"string"},"AutomationsCatalog":{"additionalProperties":false,"properties":{},"title":"AutomationsCatalog","type":"object"},"AutomationsGet":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"}},"required":["automation_id"],"title":"AutomationsGet","type":"object"},"AutomationsList":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"status":{"default":[],"description":"Shorthand: any of these (none: every status but archived).","items":{"$ref":"#/$defs/AutomationStatus"},"title":"Status","type":"array","uniqueItems":true},"trigger_kind":{"anyOf":[{"$ref":"#/$defs/TriggerKind"},{"type":"null"}],"default":null},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Object Type"}},"title":"AutomationsList","type":"object"},"AutomationsRun":{"additionalProperties":false,"properties":{"run_id":{"description":"The automation run.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Run Id","type":"string"}},"required":["run_id"],"title":"AutomationsRun","type":"object"},"AutomationsRuns":{"additionalProperties":false,"properties":{"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"automation_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Automation Id"},"status":{"default":[],"items":{"$ref":"#/$defs/AutomationRunStatus"},"title":"Status","type":"array","uniqueItems":true},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"}},"title":"AutomationsRuns","type":"object"},"AutomationsValidate":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"}},"required":["automation_id"],"title":"AutomationsValidate","type":"object"},"AutomationsVersion":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"number":{"description":"The published version's number.","title":"Number","type":"integer"}},"required":["automation_id","number"],"title":"AutomationsVersion","type":"object"},"AutomationsVersions":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"after":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A previous page's `next_cursor`; None reads from the start.","title":"After"},"limit":{"default":50,"maximum":200,"minimum":1,"title":"Limit","type":"integer"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null,"description":"Conditions on the resource's fields, ANDed with the list's own parameters."},"search":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Text found, ignoring case, in the list's searchable fields (a name, a title).","title":"Search"},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Skip this many first (page `n` of size `limit` is `offset = (n - 1) * limit`), instead\nof `after`. The page still carries a `next_cursor` to read on.","title":"Offset"},"include_total":{"default":false,"description":"Also count every match (the page's `total`).","title":"Include Total","type":"boolean"},"labelled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Labelled"}},"required":["automation_id"],"title":"AutomationsVersions","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"TriggerKind":{"enum":["record","activity","collection","schedule","manual"],"title":"TriggerKind","type":"string"}},"properties":{"list":{"anyOf":[{"$ref":"#/$defs/AutomationsList"},{"type":"null"}],"default":null,"description":"Automations, newest first; archived ones only when asked."},"get":{"anyOf":[{"$ref":"#/$defs/AutomationsGet"},{"type":"null"}],"default":null,"description":"One automation: its draft, status, settings and counters."},"catalog":{"anyOf":[{"$ref":"#/$defs/AutomationsCatalog"},{"type":"null"}],"default":null,"description":"The triggers, actions, fields and limits an automation can use."},"validate":{"anyOf":[{"$ref":"#/$defs/AutomationsValidate"},{"type":"null"}],"default":null,"description":"What stands between the draft and publishing it."},"versions":{"anyOf":[{"$ref":"#/$defs/AutomationsVersions"},{"type":"null"}],"default":null,"description":"An automation's published versions, newest first."},"version":{"anyOf":[{"$ref":"#/$defs/AutomationsVersion"},{"type":"null"}],"default":null,"description":"One published version."},"runs":{"anyOf":[{"$ref":"#/$defs/AutomationsRuns"},{"type":"null"}],"default":null,"description":"Runs, newest first: references, never content."},"run":{"anyOf":[{"$ref":"#/$defs/AutomationsRun"},{"type":"null"}],"default":null,"description":"One run with its step results."}},"title":"automationsArguments","type":"object"},"outputSchema":{"$defs":{"ActivityEventKind":{"description":"What happened to an activity, for an `activity` trigger.","enum":["created","updated"],"title":"ActivityEventKind","type":"string"},"ActivityTrigger":{"additionalProperties":false,"description":"An activity of some kinds was logged or changed.","properties":{"kind":{"const":"activity","default":"activity","title":"Kind","type":"string"},"kinds":{"description":"Activity kinds (none: every kind).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"title":"Kinds","type":"array","uniqueItems":true},"on":{"items":{"$ref":"#/$defs/ActivityEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"record_types":{"description":"Only activities linked to a record of these types (none: any).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"title":"Record Types","type":"array","uniqueItems":true}},"required":["on"],"title":"ActivityTrigger","type":"object"},"ArchiveRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"archive_record","default":"archive_record","title":"Action","type":"string"},"target":{"$ref":"#/$defs/RecordTarget"}},"required":["id"],"title":"ArchiveRecordStep","type":"object"},"Automation":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"status":{"$ref":"#/$defs/AutomationStatus","default":"draft"},"draft":{"anyOf":[{"$ref":"#/$defs/AutomationSpec"},{"type":"null"}],"default":null,"description":"What the editor holds; published versions are separate (`AutomationVersion`)."},"canvas":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The visual editor's layout. Core stores it and never reads it: what runs is the spec.","title":"Canvas"},"published_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Published Version"},"run_as":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The person whose authority runs act with: whoever published it last.","title":"Run As"},"trigger_kind":{"anyOf":[{"$ref":"#/$defs/TriggerKind"},{"type":"null"}],"default":null,"description":"The trigger of the published version (or the draft's, before the first publish)."},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The object type that trigger is about, when it names one.","title":"Object Type"},"settings":{"$ref":"#/$defs/AutomationSettings"},"stats":{"$ref":"#/$defs/AutomationStats"},"paused_reason":{"anyOf":[{"$ref":"#/$defs/AutomationPauseReason"},{"type":"null"}],"default":null},"created_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"None once the person is erased."},"updated_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Who last changed it.","title":"Updated By"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"version":{"default":1,"description":"Moves on every change a person makes (not on stats): `expected_version` compares it.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","name","created_at","updated_at"],"title":"Automation","type":"object"},"AutomationCatalog":{"additionalProperties":false,"description":"What an editor can offer: every trigger and action, the context paths, and the\noperators each field kind takes.","properties":{"triggers":{"default":[],"items":{"$ref":"#/$defs/CatalogEntry"},"title":"Triggers","type":"array"},"actions":{"default":[],"items":{"$ref":"#/$defs/CatalogEntry"},"title":"Actions","type":"array"},"context":{"default":[],"description":"Paths every run provides (`run.id`, `now`).","items":{"type":"string"},"title":"Context","type":"array"},"operators":{"default":[],"items":{"$ref":"#/$defs/OperatorSet"},"title":"Operators","type":"array"},"limits":{"additionalProperties":{"type":"integer"},"description":"The deployment's limits a draft must keep (`max_steps`, …).","title":"Limits","type":"object"}},"title":"AutomationCatalog","type":"object"},"AutomationIssue":{"additionalProperties":false,"description":"One reason a draft cannot be published, at the step and path it is about.","properties":{"step_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"None for the trigger, the condition or the automation itself.","title":"Step Id"},"path":{"description":"Where in the spec, dotted (`steps.3.fields.amount`, `trigger.object_type`).","maxLength":1000,"title":"Path","type":"string"},"code":{"$ref":"#/$defs/AutomationIssueCode"},"message":{"maxLength":1000000,"title":"Message","type":"string"}},"required":["path","code","message"],"title":"AutomationIssue","type":"object"},"AutomationIssueCode":{"description":"Why a draft cannot be published (`AutomationIssue.code`).","enum":["unknown_object_type","unknown_attribute","unknown_field","unknown_step","duplicate_step","unreachable_path","invalid_template","not_a_record","not_a_relation","deleted_record_read","delete_not_allowed","too_many_steps","limit_exceeded","invalid_value","invalid_schedule","unsupported_action"],"title":"AutomationIssueCode","type":"string"},"AutomationPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"automations":{"default":[],"items":{"$ref":"#/$defs/Automation"},"title":"Automations","type":"array"}},"title":"AutomationPage","type":"object"},"AutomationPauseReason":{"description":"Why Core paused an automation (a person's pause has none).","enum":["failing","run_as_unavailable","plan_limit","imported"],"title":"AutomationPauseReason","type":"string"},"AutomationRun":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"automation_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"version":{"description":"The version that runs; 0 for a test run of the draft.","minimum":0,"title":"Version","type":"integer"},"occurrence":{"$ref":"#/$defs/RunOccurrence"},"status":{"$ref":"#/$defs/AutomationRunStatus","default":"queued"},"test":{"default":false,"description":"A dry run: reads and conditions are evaluated, writes are simulated.","title":"Test","type":"boolean"},"depth":{"default":0,"description":"How many automation runs caused the event that started it.","minimum":0,"title":"Depth","type":"integer"},"step_index":{"default":0,"minimum":0,"title":"Step Index","type":"integer"},"steps":{"default":[],"items":{"$ref":"#/$defs/StepResult"},"maxItems":100,"title":"Steps","type":"array"},"wake_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Wake At"},"exit_reason":{"anyOf":[{"$ref":"#/$defs/SequenceExit"},{"type":"null"}],"default":null,"description":"Why a sequence's run ended early."},"retry_of":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The first run of the occurrence this run retries; every retry of it names that run.","title":"Retry Of"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the run last moved (a step claimed or finished): a run untouched for long is\nresumed.","title":"Updated At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","automation_id","version","occurrence","created_at"],"title":"AutomationRun","type":"object"},"AutomationRunPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"runs":{"default":[],"items":{"$ref":"#/$defs/AutomationRun"},"title":"Runs","type":"array"}},"title":"AutomationRunPage","type":"object"},"AutomationRunStatus":{"enum":["queued","running","waiting","succeeded","failed","cancelled"],"title":"AutomationRunStatus","type":"string"},"AutomationSettings":{"additionalProperties":false,"properties":{"allow_delete":{"default":false,"description":"`archive_record` steps may be published.","title":"Allow Delete","type":"boolean"},"sequence":{"anyOf":[{"$ref":"#/$defs/SequenceSettings"},{"type":"null"}],"default":null,"description":"Set on a sequence; lists and the builder tell them apart by it."}},"title":"AutomationSettings","type":"object"},"AutomationSpec":{"additionalProperties":false,"description":"What an automation does: one trigger, an optional condition, steps in order.","properties":{"trigger":{"discriminator":{"mapping":{"activity":"#/$defs/ActivityTrigger","collection":"#/$defs/CollectionTrigger","manual":"#/$defs/ManualTrigger","record":"#/$defs/RecordTrigger","schedule":"#/$defs/ScheduleTrigger"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/RecordTrigger"},{"$ref":"#/$defs/ActivityTrigger"},{"$ref":"#/$defs/CollectionTrigger"},{"$ref":"#/$defs/ScheduleTrigger"},{"$ref":"#/$defs/ManualTrigger"}],"title":"Trigger"},"when":{"anyOf":[{"$ref":"#/$defs/Condition"},{"type":"null"}],"default":null,"description":"Whether a run starts at all; an occurrence it filters out starts nothing."},"steps":{"items":{"discriminator":{"mapping":{"archive_record":"#/$defs/ArchiveRecordStep","collection":"#/$defs/CollectionStep","connector_tool":"#/$defs/ConnectorToolStep","create_record":"#/$defs/CreateRecordStep","create_task":"#/$defs/CreateTaskStep","find_records":"#/$defs/FindRecordsStep","log_activity":"#/$defs/LogActivityStep","notify":"#/$defs/NotifyStep","set_reminder":"#/$defs/SetReminderStep","stop_unless":"#/$defs/StopUnlessStep","update_record":"#/$defs/UpdateRecordStep","update_task":"#/$defs/UpdateTaskStep","wait":"#/$defs/WaitStep"},"propertyName":"action"},"oneOf":[{"$ref":"#/$defs/UpdateRecordStep"},{"$ref":"#/$defs/CreateRecordStep"},{"$ref":"#/$defs/ArchiveRecordStep"},{"$ref":"#/$defs/CreateTaskStep"},{"$ref":"#/$defs/UpdateTaskStep"},{"$ref":"#/$defs/LogActivityStep"},{"$ref":"#/$defs/NotifyStep"},{"$ref":"#/$defs/CollectionStep"},{"$ref":"#/$defs/SetReminderStep"},{"$ref":"#/$defs/FindRecordsStep"},{"$ref":"#/$defs/StopUnlessStep"},{"$ref":"#/$defs/WaitStep"},{"$ref":"#/$defs/ConnectorToolStep"}]},"maxItems":100,"minItems":1,"title":"Steps","type":"array"}},"required":["trigger","steps"],"title":"AutomationSpec","type":"object"},"AutomationStats":{"additionalProperties":false,"description":"What happened to the automation's occurrences: counted by Core, never written by\npeople.","properties":{"matched":{"default":0,"description":"Occurrences its trigger matched.","minimum":0,"title":"Matched","type":"integer"},"filtered":{"default":0,"description":"Matched occurrences its `when` filtered out (no run).","minimum":0,"title":"Filtered","type":"integer"},"dropped":{"default":0,"description":"Occurrences dropped over a limit (per event, per hour, queued, credits).","minimum":0,"title":"Dropped","type":"integer"},"loops_stopped":{"default":0,"description":"Occurrences not started because they came from its own runs or too deep a chain.","minimum":0,"title":"Loops Stopped","type":"integer"},"runs_started":{"default":0,"minimum":0,"title":"Runs Started","type":"integer"},"last_run_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Run At"},"last_failure_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Failure At"},"consecutive_failures":{"default":0,"minimum":0,"title":"Consecutive Failures","type":"integer"},"needs_review":{"default":false,"description":"The schema changed since it was published in a way that touches its steps.","title":"Needs Review","type":"boolean"},"next_due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"A schedule's next occurrence.","title":"Next Due At"},"schedule_from":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"The definition time `next_due_at` was worked out from: a later change works it out\nagain, so a resumed automation does not run for what it missed while paused.","title":"Schedule From"}},"title":"AutomationStats","type":"object"},"AutomationStatus":{"enum":["draft","active","paused","archived"],"title":"AutomationStatus","type":"string"},"AutomationValidation":{"additionalProperties":false,"properties":{"issues":{"default":[],"items":{"$ref":"#/$defs/AutomationIssue"},"title":"Issues","type":"array"}},"title":"AutomationValidation","type":"object"},"AutomationVersion":{"additionalProperties":false,"description":"A published spec, immutable but for its label.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"automation_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"number":{"minimum":1,"title":"Number","type":"integer"},"spec":{"$ref":"#/$defs/AutomationSpec"},"canvas":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The visual editor's layout. Core stores it and never reads it: what runs is the spec.","title":"Canvas"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Labelled versions are never pruned.","title":"Label"},"checksum":{"description":"A digest of the spec: equal specs have equal checksums.","maxLength":256,"minLength":1,"title":"Checksum","type":"string"},"published_at":{"format":"date-time","title":"Published At","type":"string"},"published_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Published By"}},"required":["id","tenant_id","automation_id","number","spec","checksum","published_at"],"title":"AutomationVersion","type":"object"},"AutomationVersionPage":{"additionalProperties":false,"properties":{"next_cursor":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Pass it back as `after` to read on. None when nothing more matched.","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"},"total":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Every match, when the request asked for it (`include_total`).","title":"Total"},"versions":{"default":[],"items":{"$ref":"#/$defs/AutomationVersion"},"title":"Versions","type":"array"}},"title":"AutomationVersionPage","type":"object"},"CatalogEntry":{"additionalProperties":false,"description":"One trigger or action: its JSON Schema and the paths later steps may read from it.","properties":{"name":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name","type":"string"},"json_schema":{"additionalProperties":true,"title":"Json Schema","type":"object"},"outputs":{"default":[],"description":"Template paths it provides (`record.{attribute}`: any attribute of its record).","items":{"type":"string"},"title":"Outputs","type":"array"},"description":{"default":"","maxLength":1000000,"title":"Description","type":"string"}},"required":["name","json_schema"],"title":"CatalogEntry","type":"object"},"CollectionEventKind":{"description":"What happened to a record in a collection, for a `collection` trigger.","enum":["added","removed","moved"],"title":"CollectionEventKind","type":"string"},"CollectionOp":{"enum":["add","move","remove"],"title":"CollectionOp","type":"string"},"CollectionStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"collection","default":"collection","title":"Action","type":"string"},"collection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"op":{"$ref":"#/$defs/CollectionOp"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The stage to add into or move to.","title":"Stage"},"target":{"$ref":"#/$defs/RecordTarget"}},"required":["id","collection_id","op"],"title":"CollectionStep","type":"object"},"CollectionTrigger":{"additionalProperties":false,"description":"A record was added to, moved within or removed from a collection.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"One collection, or any.","title":"Collection Id"},"on":{"items":{"$ref":"#/$defs/CollectionEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"to_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For `moved`: only into this stage.","title":"To Stage"},"from_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For `moved`: only out of this stage.","title":"From Stage"}},"required":["on"],"title":"CollectionTrigger","type":"object"},"Condition":{"additionalProperties":false,"description":"Conditions on one subject, in the list vocabulary (ADR 0027): the same operators and\ncoercion as a list filter.","properties":{"subject":{"$ref":"#/$defs/ConditionSubject","default":"record"},"where":{"$ref":"#/$defs/FilterGroup"}},"required":["where"],"title":"Condition","type":"object"},"ConditionSubject":{"description":"What a condition is evaluated against.","enum":["record","previous","activity","run"],"title":"ConditionSubject","type":"string"},"ConnectorToolStep":{"additionalProperties":false,"description":"Calls one tool of a connected app through Connector Hub, as the automation's publisher.\nThe Hub checks the person's access and the tool's policy on every call. A tool that needs\na person's approval is refused, because no one is there to approve it. A write is sent at\nmost once: when its outcome is unknown the step fails and is not repeated.","properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"connector_tool","default":"connector_tool","title":"Action","type":"string"},"connection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Connection Id","type":"string"},"tool":{"maxLength":200,"minLength":1,"title":"Tool","type":"string"},"read_only":{"default":false,"description":"Asks the Hub to refuse the call unless the tool is a read; only a read may be repeated.","title":"Read Only","type":"boolean"},"arguments":{"additionalProperties":true,"description":"The tool's arguments; strings may hold placeholders, at any depth.","title":"Arguments","type":"object"}},"required":["id","connection_id","tool"],"title":"ConnectorToolStep","type":"object"},"CreateRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"create_record","default":"create_record","title":"Action","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"maxProperties":100,"patternProperties":{"^[a-z][a-z0-9_]*$":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{}]}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Fields","type":"object"},"optional":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Optional","type":"array","uniqueItems":true},"link":{"anyOf":[{"$ref":"#/$defs/RelationLink"},{"type":"null"}],"default":null}},"required":["id","object_type"],"title":"CreateRecordStep","type":"object"},"CreateTaskStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"create_task","default":"create_task","title":"Action","type":"string"},"title":{"maxLength":10000,"minLength":1,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"assignee":{"anyOf":[{"$ref":"#/$defs/PrincipalChoice"},{"type":"null"}],"default":null},"due":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{"type":"null"}],"default":null},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"status":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Status"},"records":{"default":[],"description":"Records the task is about.","items":{"$ref":"#/$defs/RecordTarget"},"maxItems":10,"title":"Records","type":"array"}},"required":["id","title"],"title":"CreateTaskStep","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FindRecordsStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"find_records","default":"find_records","title":"Action","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"limit":{"default":1,"maximum":50,"minimum":1,"title":"Limit","type":"integer"},"pick":{"$ref":"#/$defs/RecordPick","default":"first"}},"required":["id","object_type"],"title":"FindRecordsStep","type":"object"},"LogActivityStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"log_activity","default":"log_activity","title":"Action","type":"string"},"kind":{"default":"note","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"maxLength":10000,"minLength":1,"title":"Body","type":"string"},"records":{"items":{"$ref":"#/$defs/RecordTarget"},"maxItems":10,"title":"Records","type":"array"}},"required":["id","body"],"title":"LogActivityStep","type":"object"},"ManualTrigger":{"additionalProperties":false,"description":"Someone presses Run, optionally on one record of a type.","properties":{"kind":{"const":"manual","default":"manual","title":"Kind","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"When set, a run is bound to one record of this type, which the caller picks.","title":"Object Type"}},"title":"ManualTrigger","type":"object"},"NotifyRecipients":{"additionalProperties":false,"description":"Who a `notify` step tells.","properties":{"principal_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":50,"title":"Principal Ids","type":"array","uniqueItems":true},"user_fields":{"description":"`user` attributes of the step's record: whoever they name.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":10,"title":"User Fields","type":"array","uniqueItems":true},"record_owner":{"default":false,"description":"The record's owner.","title":"Record Owner","type":"boolean"},"holders_of":{"anyOf":[{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},{"type":"null"}],"default":null,"description":"Every member whose roles allow this action (`automations.manage`).","title":"Holders Of"}},"title":"NotifyRecipients","type":"object"},"NotifyStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"notify","default":"notify","title":"Action","type":"string"},"recipients":{"$ref":"#/$defs/NotifyRecipients"},"title":{"maxLength":10000,"minLength":1,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record":{"anyOf":[{"$ref":"#/$defs/RecordTarget"},{"type":"null"}],"default":null,"description":"The record the notification links to (and whose fields and owner `recipients` read)."}},"required":["id","recipients","title"],"title":"NotifyStep","type":"object"},"OnFailure":{"enum":["stop","continue"],"title":"OnFailure","type":"string"},"OperatorSet":{"additionalProperties":false,"properties":{"kind":{"description":"A field kind (`text`, `number`, `date`, …).","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"operators":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"title":"Operators","type":"array"}},"required":["kind","operators"],"title":"OperatorSet","type":"object"},"PrincipalChoice":{"additionalProperties":false,"description":"One person: named, the run's publisher (`run_as`), or a placeholder naming a `user`\nattribute's value (`{{trigger.record.owner}}`).","properties":{"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Principal Id"},"publisher":{"default":false,"title":"Publisher","type":"boolean"},"template":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Template"}},"title":"PrincipalChoice","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"RecordEventKind":{"description":"What happened to a record, for a `record` trigger.","enum":["created","updated","archived","restored","deleted"],"title":"RecordEventKind","type":"string"},"RecordPick":{"description":"Which of the records `find_records` found later steps use.","enum":["only","first","all"],"title":"RecordPick","type":"string"},"RecordSelection":{"additionalProperties":false,"description":"Records of one type matching conditions: a schedule's `for_each`.","properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"RecordSelection","type":"object"},"RecordTarget":{"additionalProperties":false,"description":"The record a step acts on: the trigger record, or the record an earlier step found or\ncreated, or a single-valued relation of either.","properties":{"source":{"$ref":"#/$defs/TargetSource","default":"trigger"},"step_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The earlier step, when `source` is `step`.","title":"Step Id"},"relation":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A single-valued relation attribute of that record: act on the record it names.","title":"Relation"}},"title":"RecordTarget","type":"object"},"RecordTrigger":{"additionalProperties":false,"description":"A record of a type was created, changed, archived, restored or deleted.","properties":{"kind":{"const":"record","default":"record","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"on":{"items":{"$ref":"#/$defs/RecordEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"fields":{"description":"For `updated`: any of these changed (none: any change).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"title":"Fields","type":"array","uniqueItems":true}},"required":["object_type","on"],"title":"RecordTrigger","type":"object"},"RelationLink":{"additionalProperties":false,"description":"Link a created record to another through one of the created record's relations.","properties":{"attribute":{"description":"A relation attribute of the created record's type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"to":{"$ref":"#/$defs/RecordTarget"}},"required":["attribute"],"title":"RelationLink","type":"object"},"RelativeTime":{"additionalProperties":false,"description":"A time relative to now, or to a time the run knows: `{\"after\": \"P3D\"}` is three days\nfrom now; `{\"after\": \"-P1D\", \"since\": \"{{trigger.record.close_date}}\"}` the day before a\nrecord's date.","properties":{"after":{"default":"PT0S","description":"An ISO 8601 duration (`PT2H`, `P3D`); negative for before.","format":"duration","title":"After","type":"string"},"since":{"default":"now","description":"`now`, or one placeholder naming a date or a time of the run's context.","maxLength":10000,"title":"Since","type":"string"}},"title":"RelativeTime","type":"object"},"ResourceRef":{"additionalProperties":false,"description":"Points at anything the policy engine authorizes access to.","properties":{"type":{"description":"Resource kind, e.g. `record`, `object_type`, `knowledge`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Type","type":"string"},"id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The specific resource, or None for a collection-level action such as list or create.","title":"Id"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For records: the object type, whose ACL the record inherits.","title":"Object Type"}},"required":["type"],"title":"ResourceRef","type":"object"},"RunOccurrence":{"additionalProperties":false,"description":"What started a run, as references: never the payload of what happened.","properties":{"kind":{"$ref":"#/$defs/TriggerKind"},"key":{"description":"`event:<event_id>`, `schedule:<time>[:<record>]`, `manual:<key>`, `retry:<run>:<n>`.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"event_id":{"anyOf":[{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Event Id"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Activity Id"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Collection Id"},"revision":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"The version of the record (or collection entry) the event announced: where `previous`\nis read from (the record's history at that revision).","title":"Revision"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A collection trigger: the stage the record is in after the write.","title":"Stage"},"from_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A collection trigger: the stage it was in before.","title":"From Stage"},"scheduled_for":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Scheduled For"},"started_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"Who pressed Run (manual and test runs, retries); None once that person is erased."}},"required":["kind","key"],"title":"RunOccurrence","type":"object"},"ScheduleTrigger":{"additionalProperties":false,"description":"On a calendar: five-field cron in an IANA time zone.","properties":{"kind":{"const":"schedule","default":"schedule","title":"Kind","type":"string"},"cron":{"maxLength":100,"minLength":9,"pattern":"^[0-9*/,\\- ]+$","title":"Cron","type":"string"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"},"for_each":{"anyOf":[{"$ref":"#/$defs/RecordSelection"},{"type":"null"}],"default":null,"description":"One run per matching record (bounded by the deployment), instead of one run."}},"required":["cron"],"title":"ScheduleTrigger","type":"object"},"SequenceExit":{"description":"Why a record left a sequence before its last step.","enum":["replied","meeting_booked","unsubscribed","bounced","record_unavailable"],"title":"SequenceExit","type":"string"},"SequenceSettings":{"additionalProperties":false,"description":"What makes an automation a sequence: people enroll records in it (ADR 0039).","properties":{"stop_on_reply":{"default":true,"title":"Stop On Reply","type":"boolean"},"stop_on_meeting":{"default":true,"title":"Stop On Meeting","type":"boolean"},"unsubscribed_attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A checkbox attribute of the record. When set, the record leaves at its next step, and\nno setting turns this off.","title":"Unsubscribed Attribute"},"out_of_office_pause":{"default":"P3D","format":"duration","title":"Out Of Office Pause","type":"string"},"daily_send_limit":{"default":50,"description":"Writes per connected account per day. Over it a step waits; nothing is dropped.","maximum":2000,"minimum":1,"title":"Daily Send Limit","type":"integer"},"hourly_send_limit":{"default":6,"maximum":500,"minimum":1,"title":"Hourly Send Limit","type":"integer"}},"title":"SequenceSettings","type":"object"},"SetReminderStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"set_reminder","default":"set_reminder","title":"Action","type":"string"},"recipient":{"$ref":"#/$defs/PrincipalChoice"},"at":{"$ref":"#/$defs/RelativeTime"},"note":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"record":{"anyOf":[{"$ref":"#/$defs/RecordTarget"},{"type":"null"}],"default":null}},"required":["id","at"],"title":"SetReminderStep","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"StepResult":{"additionalProperties":false,"properties":{"step_id":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Step Id","type":"string"},"status":{"$ref":"#/$defs/StepStatus"},"attempts":{"default":0,"minimum":0,"title":"Attempts","type":"integer"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"},"refs":{"default":[],"description":"What the step read or wrote, to open under the reader's own access.","items":{"$ref":"#/$defs/ResourceRef"},"maxItems":60,"title":"Refs","type":"array"},"changed":{"default":[],"description":"Field names it changed, never their values.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Changed","type":"array"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null}},"required":["step_id","status"],"title":"StepResult","type":"object"},"StepStatus":{"enum":["running","succeeded","failed","skipped","simulated"],"title":"StepStatus","type":"string"},"StopUnlessStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"stop_unless","default":"stop_unless","title":"Action","type":"string"},"condition":{"$ref":"#/$defs/Condition"}},"required":["id","condition"],"title":"StopUnlessStep","type":"object"},"TargetSource":{"description":"Where a step's target record comes from.","enum":["trigger","step"],"title":"TargetSource","type":"string"},"TriggerKind":{"enum":["record","activity","collection","schedule","manual"],"title":"TriggerKind","type":"string"},"UpdateRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"update_record","default":"update_record","title":"Action","type":"string"},"target":{"$ref":"#/$defs/RecordTarget"},"fields":{"maxProperties":100,"minProperties":1,"patternProperties":{"^[a-z][a-z0-9_]*$":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{}]}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Fields","type":"object"},"optional":{"description":"Fields left unchanged, instead of failing the step, when their placeholder is empty.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Optional","type":"array","uniqueItems":true}},"required":["id","fields"],"title":"UpdateRecordStep","type":"object"},"UpdateTaskStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"update_task","default":"update_task","title":"Action","type":"string"},"task_step":{"description":"The earlier `create_task` step whose task this changes.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Task Step","type":"string"},"status":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Status"},"assignee":{"anyOf":[{"$ref":"#/$defs/PrincipalChoice"},{"type":"null"}],"default":null},"due":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{"type":"null"}],"default":null}},"required":["id","task_step"],"title":"UpdateTaskStep","type":"object"},"WaitStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"wait","default":"wait","title":"Action","type":"string"},"until":{"$ref":"#/$defs/RelativeTime"},"business_days":{"default":false,"description":"Count `until.after` in whole days, Monday to Friday (UTC).","title":"Business Days","type":"boolean"}},"required":["id","until"],"title":"WaitStep","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/AutomationPage"},{"$ref":"#/$defs/Automation"},{"$ref":"#/$defs/AutomationCatalog"},{"$ref":"#/$defs/AutomationValidation"},{"$ref":"#/$defs/AutomationVersionPage"},{"$ref":"#/$defs/AutomationVersion"},{"$ref":"#/$defs/AutomationRunPage"},{"$ref":"#/$defs/AutomationRun"}],"title":"Result"}},"required":["result"],"title":"automationsOutput","type":"object"},"annotations":{"title":"Automations","readOnlyHint":true,"destructiveHint":false,"openWorldHint":false}},{"name":"manage_automations","title":"Manage automations","description":"Create, change and publish automations (automations.manage), and run, cancel or retry them (automations.run). A published automation acts on its own. Set exactly one argument: the action to take.","inputSchema":{"$defs":{"ActivityEventKind":{"description":"What happened to an activity, for an `activity` trigger.","enum":["created","updated"],"title":"ActivityEventKind","type":"string"},"ActivityTrigger":{"additionalProperties":false,"description":"An activity of some kinds was logged or changed.","properties":{"kind":{"const":"activity","default":"activity","title":"Kind","type":"string"},"kinds":{"description":"Activity kinds (none: every kind).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"title":"Kinds","type":"array","uniqueItems":true},"on":{"items":{"$ref":"#/$defs/ActivityEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"record_types":{"description":"Only activities linked to a record of these types (none: any).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"title":"Record Types","type":"array","uniqueItems":true}},"required":["on"],"title":"ActivityTrigger","type":"object"},"ArchiveRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"archive_record","default":"archive_record","title":"Action","type":"string"},"target":{"$ref":"#/$defs/RecordTarget"}},"required":["id"],"title":"ArchiveRecordStep","type":"object"},"AutomationSettings":{"additionalProperties":false,"properties":{"allow_delete":{"default":false,"description":"`archive_record` steps may be published.","title":"Allow Delete","type":"boolean"},"sequence":{"anyOf":[{"$ref":"#/$defs/SequenceSettings"},{"type":"null"}],"default":null,"description":"Set on a sequence; lists and the builder tell them apart by it."}},"title":"AutomationSettings","type":"object"},"AutomationSpec":{"additionalProperties":false,"description":"What an automation does: one trigger, an optional condition, steps in order.","properties":{"trigger":{"discriminator":{"mapping":{"activity":"#/$defs/ActivityTrigger","collection":"#/$defs/CollectionTrigger","manual":"#/$defs/ManualTrigger","record":"#/$defs/RecordTrigger","schedule":"#/$defs/ScheduleTrigger"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/RecordTrigger"},{"$ref":"#/$defs/ActivityTrigger"},{"$ref":"#/$defs/CollectionTrigger"},{"$ref":"#/$defs/ScheduleTrigger"},{"$ref":"#/$defs/ManualTrigger"}],"title":"Trigger"},"when":{"anyOf":[{"$ref":"#/$defs/Condition"},{"type":"null"}],"default":null,"description":"Whether a run starts at all; an occurrence it filters out starts nothing."},"steps":{"items":{"discriminator":{"mapping":{"archive_record":"#/$defs/ArchiveRecordStep","collection":"#/$defs/CollectionStep","connector_tool":"#/$defs/ConnectorToolStep","create_record":"#/$defs/CreateRecordStep","create_task":"#/$defs/CreateTaskStep","find_records":"#/$defs/FindRecordsStep","log_activity":"#/$defs/LogActivityStep","notify":"#/$defs/NotifyStep","set_reminder":"#/$defs/SetReminderStep","stop_unless":"#/$defs/StopUnlessStep","update_record":"#/$defs/UpdateRecordStep","update_task":"#/$defs/UpdateTaskStep","wait":"#/$defs/WaitStep"},"propertyName":"action"},"oneOf":[{"$ref":"#/$defs/UpdateRecordStep"},{"$ref":"#/$defs/CreateRecordStep"},{"$ref":"#/$defs/ArchiveRecordStep"},{"$ref":"#/$defs/CreateTaskStep"},{"$ref":"#/$defs/UpdateTaskStep"},{"$ref":"#/$defs/LogActivityStep"},{"$ref":"#/$defs/NotifyStep"},{"$ref":"#/$defs/CollectionStep"},{"$ref":"#/$defs/SetReminderStep"},{"$ref":"#/$defs/FindRecordsStep"},{"$ref":"#/$defs/StopUnlessStep"},{"$ref":"#/$defs/WaitStep"},{"$ref":"#/$defs/ConnectorToolStep"}]},"maxItems":100,"minItems":1,"title":"Steps","type":"array"}},"required":["trigger","steps"],"title":"AutomationSpec","type":"object"},"CollectionEventKind":{"description":"What happened to a record in a collection, for a `collection` trigger.","enum":["added","removed","moved"],"title":"CollectionEventKind","type":"string"},"CollectionOp":{"enum":["add","move","remove"],"title":"CollectionOp","type":"string"},"CollectionStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"collection","default":"collection","title":"Action","type":"string"},"collection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"op":{"$ref":"#/$defs/CollectionOp"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The stage to add into or move to.","title":"Stage"},"target":{"$ref":"#/$defs/RecordTarget"}},"required":["id","collection_id","op"],"title":"CollectionStep","type":"object"},"CollectionTrigger":{"additionalProperties":false,"description":"A record was added to, moved within or removed from a collection.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"One collection, or any.","title":"Collection Id"},"on":{"items":{"$ref":"#/$defs/CollectionEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"to_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For `moved`: only into this stage.","title":"To Stage"},"from_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For `moved`: only out of this stage.","title":"From Stage"}},"required":["on"],"title":"CollectionTrigger","type":"object"},"Condition":{"additionalProperties":false,"description":"Conditions on one subject, in the list vocabulary (ADR 0027): the same operators and\ncoercion as a list filter.","properties":{"subject":{"$ref":"#/$defs/ConditionSubject","default":"record"},"where":{"$ref":"#/$defs/FilterGroup"}},"required":["where"],"title":"Condition","type":"object"},"ConditionSubject":{"description":"What a condition is evaluated against.","enum":["record","previous","activity","run"],"title":"ConditionSubject","type":"string"},"ConnectorToolStep":{"additionalProperties":false,"description":"Calls one tool of a connected app through Connector Hub, as the automation's publisher.\nThe Hub checks the person's access and the tool's policy on every call. A tool that needs\na person's approval is refused, because no one is there to approve it. A write is sent at\nmost once: when its outcome is unknown the step fails and is not repeated.","properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"connector_tool","default":"connector_tool","title":"Action","type":"string"},"connection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Connection Id","type":"string"},"tool":{"maxLength":200,"minLength":1,"title":"Tool","type":"string"},"read_only":{"default":false,"description":"Asks the Hub to refuse the call unless the tool is a read; only a read may be repeated.","title":"Read Only","type":"boolean"},"arguments":{"additionalProperties":true,"description":"The tool's arguments; strings may hold placeholders, at any depth.","title":"Arguments","type":"object"}},"required":["id","connection_id","tool"],"title":"ConnectorToolStep","type":"object"},"CreateRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"create_record","default":"create_record","title":"Action","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"maxProperties":100,"patternProperties":{"^[a-z][a-z0-9_]*$":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{}]}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Fields","type":"object"},"optional":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Optional","type":"array","uniqueItems":true},"link":{"anyOf":[{"$ref":"#/$defs/RelationLink"},{"type":"null"}],"default":null}},"required":["id","object_type"],"title":"CreateRecordStep","type":"object"},"CreateTaskStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"create_task","default":"create_task","title":"Action","type":"string"},"title":{"maxLength":10000,"minLength":1,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"assignee":{"anyOf":[{"$ref":"#/$defs/PrincipalChoice"},{"type":"null"}],"default":null},"due":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{"type":"null"}],"default":null},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"status":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Status"},"records":{"default":[],"description":"Records the task is about.","items":{"$ref":"#/$defs/RecordTarget"},"maxItems":10,"title":"Records","type":"array"}},"required":["id","title"],"title":"CreateTaskStep","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FindRecordsStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"find_records","default":"find_records","title":"Action","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"limit":{"default":1,"maximum":50,"minimum":1,"title":"Limit","type":"integer"},"pick":{"$ref":"#/$defs/RecordPick","default":"first"}},"required":["id","object_type"],"title":"FindRecordsStep","type":"object"},"LogActivityStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"log_activity","default":"log_activity","title":"Action","type":"string"},"kind":{"default":"note","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"maxLength":10000,"minLength":1,"title":"Body","type":"string"},"records":{"items":{"$ref":"#/$defs/RecordTarget"},"maxItems":10,"title":"Records","type":"array"}},"required":["id","body"],"title":"LogActivityStep","type":"object"},"ManageAutomationsArchive":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"}},"required":["automation_id"],"title":"ManageAutomationsArchive","type":"object"},"ManageAutomationsCancel":{"additionalProperties":false,"properties":{"run_id":{"description":"The automation run.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Run Id","type":"string"}},"required":["run_id"],"title":"ManageAutomationsCancel","type":"object"},"ManageAutomationsChange":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"name":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"spec":{"anyOf":[{"$ref":"#/$defs/AutomationSpec"},{"type":"null"}],"default":null},"canvas":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The visual editor's layout. Core stores it and never reads it: what runs is the spec.","title":"Canvas"},"settings":{"anyOf":[{"$ref":"#/$defs/AutomationSettings"},{"type":"null"}],"default":null},"status":{"anyOf":[{"enum":["active","paused"],"type":"string"},{"type":"null"}],"default":null,"title":"Status"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["automation_id"],"title":"ManageAutomationsChange","type":"object"},"ManageAutomationsCreate":{"additionalProperties":false,"properties":{"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"spec":{"anyOf":[{"$ref":"#/$defs/AutomationSpec"},{"type":"null"}],"default":null},"canvas":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The visual editor's layout. Core stores it and never reads it: what runs is the spec.","title":"Canvas"},"settings":{"$ref":"#/$defs/AutomationSettings"}},"required":["key","name"],"title":"ManageAutomationsCreate","type":"object"},"ManageAutomationsDuplicate":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"}},"required":["automation_id","key","name"],"title":"ManageAutomationsDuplicate","type":"object"},"ManageAutomationsLabelVersion":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"number":{"description":"The published version's number.","title":"Number","type":"integer"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"None removes the label.","title":"Label"}},"required":["automation_id","number"],"title":"ManageAutomationsLabelVersion","type":"object"},"ManageAutomationsPublish":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"}},"required":["automation_id"],"title":"ManageAutomationsPublish","type":"object"},"ManageAutomationsRestore":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"}},"required":["automation_id"],"title":"ManageAutomationsRestore","type":"object"},"ManageAutomationsRestoreVersion":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"number":{"description":"The published version's number.","title":"Number","type":"integer"}},"required":["automation_id","number"],"title":"ManageAutomationsRestoreVersion","type":"object"},"ManageAutomationsRetry":{"additionalProperties":false,"properties":{"run_id":{"description":"The automation run.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Run Id","type":"string"}},"required":["run_id"],"title":"ManageAutomationsRetry","type":"object"},"ManageAutomationsStart":{"additionalProperties":false,"properties":{"automation_id":{"description":"The automation.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"key":{"maxLength":512,"minLength":1,"title":"Key","type":"string"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The record to run on, when the trigger binds one.","title":"Record Id"},"test":{"default":false,"title":"Test","type":"boolean"},"version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"None: the published version, or the draft for a test run.","title":"Version"}},"required":["automation_id","key"],"title":"ManageAutomationsStart","type":"object"},"ManualTrigger":{"additionalProperties":false,"description":"Someone presses Run, optionally on one record of a type.","properties":{"kind":{"const":"manual","default":"manual","title":"Kind","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"When set, a run is bound to one record of this type, which the caller picks.","title":"Object Type"}},"title":"ManualTrigger","type":"object"},"NotifyRecipients":{"additionalProperties":false,"description":"Who a `notify` step tells.","properties":{"principal_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":50,"title":"Principal Ids","type":"array","uniqueItems":true},"user_fields":{"description":"`user` attributes of the step's record: whoever they name.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":10,"title":"User Fields","type":"array","uniqueItems":true},"record_owner":{"default":false,"description":"The record's owner.","title":"Record Owner","type":"boolean"},"holders_of":{"anyOf":[{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},{"type":"null"}],"default":null,"description":"Every member whose roles allow this action (`automations.manage`).","title":"Holders Of"}},"title":"NotifyRecipients","type":"object"},"NotifyStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"notify","default":"notify","title":"Action","type":"string"},"recipients":{"$ref":"#/$defs/NotifyRecipients"},"title":{"maxLength":10000,"minLength":1,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record":{"anyOf":[{"$ref":"#/$defs/RecordTarget"},{"type":"null"}],"default":null,"description":"The record the notification links to (and whose fields and owner `recipients` read)."}},"required":["id","recipients","title"],"title":"NotifyStep","type":"object"},"OnFailure":{"enum":["stop","continue"],"title":"OnFailure","type":"string"},"PrincipalChoice":{"additionalProperties":false,"description":"One person: named, the run's publisher (`run_as`), or a placeholder naming a `user`\nattribute's value (`{{trigger.record.owner}}`).","properties":{"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Principal Id"},"publisher":{"default":false,"title":"Publisher","type":"boolean"},"template":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Template"}},"title":"PrincipalChoice","type":"object"},"RecordEventKind":{"description":"What happened to a record, for a `record` trigger.","enum":["created","updated","archived","restored","deleted"],"title":"RecordEventKind","type":"string"},"RecordPick":{"description":"Which of the records `find_records` found later steps use.","enum":["only","first","all"],"title":"RecordPick","type":"string"},"RecordSelection":{"additionalProperties":false,"description":"Records of one type matching conditions: a schedule's `for_each`.","properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"RecordSelection","type":"object"},"RecordTarget":{"additionalProperties":false,"description":"The record a step acts on: the trigger record, or the record an earlier step found or\ncreated, or a single-valued relation of either.","properties":{"source":{"$ref":"#/$defs/TargetSource","default":"trigger"},"step_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The earlier step, when `source` is `step`.","title":"Step Id"},"relation":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A single-valued relation attribute of that record: act on the record it names.","title":"Relation"}},"title":"RecordTarget","type":"object"},"RecordTrigger":{"additionalProperties":false,"description":"A record of a type was created, changed, archived, restored or deleted.","properties":{"kind":{"const":"record","default":"record","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"on":{"items":{"$ref":"#/$defs/RecordEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"fields":{"description":"For `updated`: any of these changed (none: any change).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"title":"Fields","type":"array","uniqueItems":true}},"required":["object_type","on"],"title":"RecordTrigger","type":"object"},"RelationLink":{"additionalProperties":false,"description":"Link a created record to another through one of the created record's relations.","properties":{"attribute":{"description":"A relation attribute of the created record's type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"to":{"$ref":"#/$defs/RecordTarget"}},"required":["attribute"],"title":"RelationLink","type":"object"},"RelativeTime":{"additionalProperties":false,"description":"A time relative to now, or to a time the run knows: `{\"after\": \"P3D\"}` is three days\nfrom now; `{\"after\": \"-P1D\", \"since\": \"{{trigger.record.close_date}}\"}` the day before a\nrecord's date.","properties":{"after":{"default":"PT0S","description":"An ISO 8601 duration (`PT2H`, `P3D`); negative for before.","format":"duration","title":"After","type":"string"},"since":{"default":"now","description":"`now`, or one placeholder naming a date or a time of the run's context.","maxLength":10000,"title":"Since","type":"string"}},"title":"RelativeTime","type":"object"},"ScheduleTrigger":{"additionalProperties":false,"description":"On a calendar: five-field cron in an IANA time zone.","properties":{"kind":{"const":"schedule","default":"schedule","title":"Kind","type":"string"},"cron":{"maxLength":100,"minLength":9,"pattern":"^[0-9*/,\\- ]+$","title":"Cron","type":"string"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"},"for_each":{"anyOf":[{"$ref":"#/$defs/RecordSelection"},{"type":"null"}],"default":null,"description":"One run per matching record (bounded by the deployment), instead of one run."}},"required":["cron"],"title":"ScheduleTrigger","type":"object"},"SequenceSettings":{"additionalProperties":false,"description":"What makes an automation a sequence: people enroll records in it (ADR 0039).","properties":{"stop_on_reply":{"default":true,"title":"Stop On Reply","type":"boolean"},"stop_on_meeting":{"default":true,"title":"Stop On Meeting","type":"boolean"},"unsubscribed_attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A checkbox attribute of the record. When set, the record leaves at its next step, and\nno setting turns this off.","title":"Unsubscribed Attribute"},"out_of_office_pause":{"default":"P3D","format":"duration","title":"Out Of Office Pause","type":"string"},"daily_send_limit":{"default":50,"description":"Writes per connected account per day. Over it a step waits; nothing is dropped.","maximum":2000,"minimum":1,"title":"Daily Send Limit","type":"integer"},"hourly_send_limit":{"default":6,"maximum":500,"minimum":1,"title":"Hourly Send Limit","type":"integer"}},"title":"SequenceSettings","type":"object"},"SetReminderStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"set_reminder","default":"set_reminder","title":"Action","type":"string"},"recipient":{"$ref":"#/$defs/PrincipalChoice"},"at":{"$ref":"#/$defs/RelativeTime"},"note":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"record":{"anyOf":[{"$ref":"#/$defs/RecordTarget"},{"type":"null"}],"default":null}},"required":["id","at"],"title":"SetReminderStep","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"StopUnlessStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"stop_unless","default":"stop_unless","title":"Action","type":"string"},"condition":{"$ref":"#/$defs/Condition"}},"required":["id","condition"],"title":"StopUnlessStep","type":"object"},"TargetSource":{"description":"Where a step's target record comes from.","enum":["trigger","step"],"title":"TargetSource","type":"string"},"UpdateRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"update_record","default":"update_record","title":"Action","type":"string"},"target":{"$ref":"#/$defs/RecordTarget"},"fields":{"maxProperties":100,"minProperties":1,"patternProperties":{"^[a-z][a-z0-9_]*$":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{}]}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Fields","type":"object"},"optional":{"description":"Fields left unchanged, instead of failing the step, when their placeholder is empty.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Optional","type":"array","uniqueItems":true}},"required":["id","fields"],"title":"UpdateRecordStep","type":"object"},"UpdateTaskStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"update_task","default":"update_task","title":"Action","type":"string"},"task_step":{"description":"The earlier `create_task` step whose task this changes.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Task Step","type":"string"},"status":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Status"},"assignee":{"anyOf":[{"$ref":"#/$defs/PrincipalChoice"},{"type":"null"}],"default":null},"due":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{"type":"null"}],"default":null}},"required":["id","task_step"],"title":"UpdateTaskStep","type":"object"},"WaitStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"wait","default":"wait","title":"Action","type":"string"},"until":{"$ref":"#/$defs/RelativeTime"},"business_days":{"default":false,"description":"Count `until.after` in whole days, Monday to Friday (UTC).","title":"Business Days","type":"boolean"}},"required":["id","until"],"title":"WaitStep","type":"object"}},"properties":{"create":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsCreate"},{"type":"null"}],"default":null,"description":"A new automation, as a draft; the same key returns the first."},"change":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsChange"},{"type":"null"}],"default":null,"description":"Change the draft, settings or name, or pause or activate it."},"publish":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsPublish"},{"type":"null"}],"default":null,"description":"Publish the draft as a new version and activate it."},"archive":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsArchive"},{"type":"null"}],"default":null,"description":"Archive it: nothing runs until it is restored."},"restore":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsRestore"},{"type":"null"}],"default":null,"description":"Bring an archived automation back."},"duplicate":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsDuplicate"},{"type":"null"}],"default":null,"description":"Copy an automation into a new draft."},"start":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsStart"},{"type":"null"}],"default":null,"description":"Run it now, on a record when its trigger binds one. A test run of the draft makes no changes."},"cancel":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsCancel"},{"type":"null"}],"default":null,"description":"Stop a run at its next step."},"retry":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsRetry"},{"type":"null"}],"default":null,"description":"Run a failed run again; steps that succeeded are carried over."},"label_version":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsLabelVersion"},{"type":"null"}],"default":null,"description":"Name a version, which keeps it for good, or remove its name."},"restore_version":{"anyOf":[{"$ref":"#/$defs/ManageAutomationsRestoreVersion"},{"type":"null"}],"default":null,"description":"Copy a version into the draft; publishes nothing."}},"title":"manage_automationsArguments","type":"object"},"outputSchema":{"$defs":{"ActivityEventKind":{"description":"What happened to an activity, for an `activity` trigger.","enum":["created","updated"],"title":"ActivityEventKind","type":"string"},"ActivityTrigger":{"additionalProperties":false,"description":"An activity of some kinds was logged or changed.","properties":{"kind":{"const":"activity","default":"activity","title":"Kind","type":"string"},"kinds":{"description":"Activity kinds (none: every kind).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"title":"Kinds","type":"array","uniqueItems":true},"on":{"items":{"$ref":"#/$defs/ActivityEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"record_types":{"description":"Only activities linked to a record of these types (none: any).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"title":"Record Types","type":"array","uniqueItems":true}},"required":["on"],"title":"ActivityTrigger","type":"object"},"ArchiveRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"archive_record","default":"archive_record","title":"Action","type":"string"},"target":{"$ref":"#/$defs/RecordTarget"}},"required":["id"],"title":"ArchiveRecordStep","type":"object"},"Automation":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"name":{"maxLength":256,"minLength":1,"title":"Name","type":"string"},"description":{"anyOf":[{"maxLength":1000000,"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"status":{"$ref":"#/$defs/AutomationStatus","default":"draft"},"draft":{"anyOf":[{"$ref":"#/$defs/AutomationSpec"},{"type":"null"}],"default":null,"description":"What the editor holds; published versions are separate (`AutomationVersion`)."},"canvas":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The visual editor's layout. Core stores it and never reads it: what runs is the spec.","title":"Canvas"},"published_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Published Version"},"run_as":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The person whose authority runs act with: whoever published it last.","title":"Run As"},"trigger_kind":{"anyOf":[{"$ref":"#/$defs/TriggerKind"},{"type":"null"}],"default":null,"description":"The trigger of the published version (or the draft's, before the first publish)."},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The object type that trigger is about, when it names one.","title":"Object Type"},"settings":{"$ref":"#/$defs/AutomationSettings"},"stats":{"$ref":"#/$defs/AutomationStats"},"paused_reason":{"anyOf":[{"$ref":"#/$defs/AutomationPauseReason"},{"type":"null"}],"default":null},"created_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"None once the person is erased."},"updated_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"Who last changed it.","title":"Updated By"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"version":{"default":1,"description":"Moves on every change a person makes (not on stats): `expected_version` compares it.","minimum":1,"title":"Version","type":"integer"}},"required":["id","tenant_id","name","created_at","updated_at"],"title":"Automation","type":"object"},"AutomationArchived":{"additionalProperties":false,"properties":{"automation_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"archived":{"default":true,"title":"Archived","type":"boolean"}},"required":["automation_id"],"title":"AutomationArchived","type":"object"},"AutomationPauseReason":{"description":"Why Core paused an automation (a person's pause has none).","enum":["failing","run_as_unavailable","plan_limit","imported"],"title":"AutomationPauseReason","type":"string"},"AutomationRun":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"automation_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"version":{"description":"The version that runs; 0 for a test run of the draft.","minimum":0,"title":"Version","type":"integer"},"occurrence":{"$ref":"#/$defs/RunOccurrence"},"status":{"$ref":"#/$defs/AutomationRunStatus","default":"queued"},"test":{"default":false,"description":"A dry run: reads and conditions are evaluated, writes are simulated.","title":"Test","type":"boolean"},"depth":{"default":0,"description":"How many automation runs caused the event that started it.","minimum":0,"title":"Depth","type":"integer"},"step_index":{"default":0,"minimum":0,"title":"Step Index","type":"integer"},"steps":{"default":[],"items":{"$ref":"#/$defs/StepResult"},"maxItems":100,"title":"Steps","type":"array"},"wake_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Wake At"},"exit_reason":{"anyOf":[{"$ref":"#/$defs/SequenceExit"},{"type":"null"}],"default":null,"description":"Why a sequence's run ended early."},"retry_of":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The first run of the occurrence this run retries; every retry of it names that run.","title":"Retry Of"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the run last moved (a step claimed or finished): a run untouched for long is\nresumed.","title":"Updated At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["id","tenant_id","automation_id","version","occurrence","created_at"],"title":"AutomationRun","type":"object"},"AutomationRunStatus":{"enum":["queued","running","waiting","succeeded","failed","cancelled"],"title":"AutomationRunStatus","type":"string"},"AutomationSettings":{"additionalProperties":false,"properties":{"allow_delete":{"default":false,"description":"`archive_record` steps may be published.","title":"Allow Delete","type":"boolean"},"sequence":{"anyOf":[{"$ref":"#/$defs/SequenceSettings"},{"type":"null"}],"default":null,"description":"Set on a sequence; lists and the builder tell them apart by it."}},"title":"AutomationSettings","type":"object"},"AutomationSpec":{"additionalProperties":false,"description":"What an automation does: one trigger, an optional condition, steps in order.","properties":{"trigger":{"discriminator":{"mapping":{"activity":"#/$defs/ActivityTrigger","collection":"#/$defs/CollectionTrigger","manual":"#/$defs/ManualTrigger","record":"#/$defs/RecordTrigger","schedule":"#/$defs/ScheduleTrigger"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/RecordTrigger"},{"$ref":"#/$defs/ActivityTrigger"},{"$ref":"#/$defs/CollectionTrigger"},{"$ref":"#/$defs/ScheduleTrigger"},{"$ref":"#/$defs/ManualTrigger"}],"title":"Trigger"},"when":{"anyOf":[{"$ref":"#/$defs/Condition"},{"type":"null"}],"default":null,"description":"Whether a run starts at all; an occurrence it filters out starts nothing."},"steps":{"items":{"discriminator":{"mapping":{"archive_record":"#/$defs/ArchiveRecordStep","collection":"#/$defs/CollectionStep","connector_tool":"#/$defs/ConnectorToolStep","create_record":"#/$defs/CreateRecordStep","create_task":"#/$defs/CreateTaskStep","find_records":"#/$defs/FindRecordsStep","log_activity":"#/$defs/LogActivityStep","notify":"#/$defs/NotifyStep","set_reminder":"#/$defs/SetReminderStep","stop_unless":"#/$defs/StopUnlessStep","update_record":"#/$defs/UpdateRecordStep","update_task":"#/$defs/UpdateTaskStep","wait":"#/$defs/WaitStep"},"propertyName":"action"},"oneOf":[{"$ref":"#/$defs/UpdateRecordStep"},{"$ref":"#/$defs/CreateRecordStep"},{"$ref":"#/$defs/ArchiveRecordStep"},{"$ref":"#/$defs/CreateTaskStep"},{"$ref":"#/$defs/UpdateTaskStep"},{"$ref":"#/$defs/LogActivityStep"},{"$ref":"#/$defs/NotifyStep"},{"$ref":"#/$defs/CollectionStep"},{"$ref":"#/$defs/SetReminderStep"},{"$ref":"#/$defs/FindRecordsStep"},{"$ref":"#/$defs/StopUnlessStep"},{"$ref":"#/$defs/WaitStep"},{"$ref":"#/$defs/ConnectorToolStep"}]},"maxItems":100,"minItems":1,"title":"Steps","type":"array"}},"required":["trigger","steps"],"title":"AutomationSpec","type":"object"},"AutomationStats":{"additionalProperties":false,"description":"What happened to the automation's occurrences: counted by Core, never written by\npeople.","properties":{"matched":{"default":0,"description":"Occurrences its trigger matched.","minimum":0,"title":"Matched","type":"integer"},"filtered":{"default":0,"description":"Matched occurrences its `when` filtered out (no run).","minimum":0,"title":"Filtered","type":"integer"},"dropped":{"default":0,"description":"Occurrences dropped over a limit (per event, per hour, queued, credits).","minimum":0,"title":"Dropped","type":"integer"},"loops_stopped":{"default":0,"description":"Occurrences not started because they came from its own runs or too deep a chain.","minimum":0,"title":"Loops Stopped","type":"integer"},"runs_started":{"default":0,"minimum":0,"title":"Runs Started","type":"integer"},"last_run_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Run At"},"last_failure_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Failure At"},"consecutive_failures":{"default":0,"minimum":0,"title":"Consecutive Failures","type":"integer"},"needs_review":{"default":false,"description":"The schema changed since it was published in a way that touches its steps.","title":"Needs Review","type":"boolean"},"next_due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"A schedule's next occurrence.","title":"Next Due At"},"schedule_from":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"The definition time `next_due_at` was worked out from: a later change works it out\nagain, so a resumed automation does not run for what it missed while paused.","title":"Schedule From"}},"title":"AutomationStats","type":"object"},"AutomationStatus":{"enum":["draft","active","paused","archived"],"title":"AutomationStatus","type":"string"},"AutomationVersion":{"additionalProperties":false,"description":"A published spec, immutable but for its label.","properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"tenant_id":{"description":"Identifier of the tenant (workspace).","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Tenant Id","type":"string"},"automation_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Automation Id","type":"string"},"number":{"minimum":1,"title":"Number","type":"integer"},"spec":{"$ref":"#/$defs/AutomationSpec"},"canvas":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"The visual editor's layout. Core stores it and never reads it: what runs is the spec.","title":"Canvas"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Labelled versions are never pruned.","title":"Label"},"checksum":{"description":"A digest of the spec: equal specs have equal checksums.","maxLength":256,"minLength":1,"title":"Checksum","type":"string"},"published_at":{"format":"date-time","title":"Published At","type":"string"},"published_by":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Published By"}},"required":["id","tenant_id","automation_id","number","spec","checksum","published_at"],"title":"AutomationVersion","type":"object"},"CollectionEventKind":{"description":"What happened to a record in a collection, for a `collection` trigger.","enum":["added","removed","moved"],"title":"CollectionEventKind","type":"string"},"CollectionOp":{"enum":["add","move","remove"],"title":"CollectionOp","type":"string"},"CollectionStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"collection","default":"collection","title":"Action","type":"string"},"collection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Collection Id","type":"string"},"op":{"$ref":"#/$defs/CollectionOp"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The stage to add into or move to.","title":"Stage"},"target":{"$ref":"#/$defs/RecordTarget"}},"required":["id","collection_id","op"],"title":"CollectionStep","type":"object"},"CollectionTrigger":{"additionalProperties":false,"description":"A record was added to, moved within or removed from a collection.","properties":{"kind":{"const":"collection","default":"collection","title":"Kind","type":"string"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"One collection, or any.","title":"Collection Id"},"on":{"items":{"$ref":"#/$defs/CollectionEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"to_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For `moved`: only into this stage.","title":"To Stage"},"from_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For `moved`: only out of this stage.","title":"From Stage"}},"required":["on"],"title":"CollectionTrigger","type":"object"},"Condition":{"additionalProperties":false,"description":"Conditions on one subject, in the list vocabulary (ADR 0027): the same operators and\ncoercion as a list filter.","properties":{"subject":{"$ref":"#/$defs/ConditionSubject","default":"record"},"where":{"$ref":"#/$defs/FilterGroup"}},"required":["where"],"title":"Condition","type":"object"},"ConditionSubject":{"description":"What a condition is evaluated against.","enum":["record","previous","activity","run"],"title":"ConditionSubject","type":"string"},"ConnectorToolStep":{"additionalProperties":false,"description":"Calls one tool of a connected app through Connector Hub, as the automation's publisher.\nThe Hub checks the person's access and the tool's policy on every call. A tool that needs\na person's approval is refused, because no one is there to approve it. A write is sent at\nmost once: when its outcome is unknown the step fails and is not repeated.","properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"connector_tool","default":"connector_tool","title":"Action","type":"string"},"connection_id":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Connection Id","type":"string"},"tool":{"maxLength":200,"minLength":1,"title":"Tool","type":"string"},"read_only":{"default":false,"description":"Asks the Hub to refuse the call unless the tool is a read; only a read may be repeated.","title":"Read Only","type":"boolean"},"arguments":{"additionalProperties":true,"description":"The tool's arguments; strings may hold placeholders, at any depth.","title":"Arguments","type":"object"}},"required":["id","connection_id","tool"],"title":"ConnectorToolStep","type":"object"},"CreateRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"create_record","default":"create_record","title":"Action","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"fields":{"maxProperties":100,"patternProperties":{"^[a-z][a-z0-9_]*$":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{}]}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Fields","type":"object"},"optional":{"items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Optional","type":"array","uniqueItems":true},"link":{"anyOf":[{"$ref":"#/$defs/RelationLink"},{"type":"null"}],"default":null}},"required":["id","object_type"],"title":"CreateRecordStep","type":"object"},"CreateTaskStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"create_task","default":"create_task","title":"Action","type":"string"},"title":{"maxLength":10000,"minLength":1,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"assignee":{"anyOf":[{"$ref":"#/$defs/PrincipalChoice"},{"type":"null"}],"default":null},"due":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{"type":"null"}],"default":null},"project_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Project Id"},"status":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Status"},"records":{"default":[],"description":"Records the task is about.","items":{"$ref":"#/$defs/RecordTarget"},"maxItems":10,"title":"Records","type":"array"}},"required":["id","title"],"title":"CreateTaskStep","type":"object"},"ErrorCode":{"enum":["unauthenticated","tenant_mismatch","not_found","method_not_allowed","conflict","idempotency_conflict","policy_denied","validation_failed","rate_limited","not_configured","dependency_unavailable","internal"],"title":"ErrorCode","type":"string"},"ErrorInfo":{"additionalProperties":false,"description":"A Core error as consumers see it. Transports map `code` to their own status values.","properties":{"code":{"$ref":"#/$defs/ErrorCode","description":"Stable machine-readable error code."},"message":{"description":"Human-readable explanation. Never contains payload data or secrets.","maxLength":1000000,"title":"Message","type":"string"},"retryable":{"default":false,"description":"Whether repeating the same request may succeed.","title":"Retryable","type":"boolean"},"retry_after_seconds":{"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"How long to wait before retrying, when known.","title":"Retry After Seconds"},"details":{"additionalProperties":true,"description":"Structured context such as the offending field. Never contains secrets.","title":"Details","type":"object"}},"required":["code","message"],"title":"ErrorInfo","type":"object"},"FieldFilter":{"additionalProperties":false,"description":"One condition: a field, an operator and a value. Values are coerced by the field's\ntype, as a write would store them.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"op":{"$ref":"#/$defs/FilterOperator","default":"eq"},"value":{"default":null,"description":"A list for `in`/`not_in`; nothing for `is_empty`/`is_not_empty`.","title":"Value"}},"required":["field"],"title":"FieldFilter","type":"object"},"FilterGroup":{"additionalProperties":false,"description":"Conditions combined with `all` (and) or `any` (or), nesting up to three levels:\n`(stage = won) or (amount > 1000 and owner = me)`.","properties":{"match":{"$ref":"#/$defs/FilterMatch","default":"all"},"filters":{"default":[],"items":{"$ref":"#/$defs/FieldFilter"},"maxItems":20,"title":"Filters","type":"array"},"groups":{"default":[],"items":{"$ref":"#/$defs/FilterGroup"},"maxItems":10,"title":"Groups","type":"array"}},"title":"FilterGroup","type":"object"},"FilterMatch":{"description":"How a filter group combines its conditions.","enum":["all","any"],"title":"FilterMatch","type":"string"},"FilterOperator":{"description":"How a filter compares a field with its value.","enum":["eq","ne","in","not_in","gt","gte","lt","lte","contains","starts_with","not_contains","ends_with","is_empty","is_not_empty"],"title":"FilterOperator","type":"string"},"FindRecordsStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"find_records","default":"find_records","title":"Action","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null},"order_by":{"default":[],"items":{"$ref":"#/$defs/SortKey"},"maxItems":3,"title":"Order By","type":"array"},"limit":{"default":1,"maximum":50,"minimum":1,"title":"Limit","type":"integer"},"pick":{"$ref":"#/$defs/RecordPick","default":"first"}},"required":["id","object_type"],"title":"FindRecordsStep","type":"object"},"LogActivityStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"log_activity","default":"log_activity","title":"Action","type":"string"},"kind":{"default":"note","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Kind","type":"string"},"title":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"maxLength":10000,"minLength":1,"title":"Body","type":"string"},"records":{"items":{"$ref":"#/$defs/RecordTarget"},"maxItems":10,"title":"Records","type":"array"}},"required":["id","body"],"title":"LogActivityStep","type":"object"},"ManualTrigger":{"additionalProperties":false,"description":"Someone presses Run, optionally on one record of a type.","properties":{"kind":{"const":"manual","default":"manual","title":"Kind","type":"string"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"When set, a run is bound to one record of this type, which the caller picks.","title":"Object Type"}},"title":"ManualTrigger","type":"object"},"NotifyRecipients":{"additionalProperties":false,"description":"Who a `notify` step tells.","properties":{"principal_ids":{"items":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":50,"title":"Principal Ids","type":"array","uniqueItems":true},"user_fields":{"description":"`user` attributes of the step's record: whoever they name.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":10,"title":"User Fields","type":"array","uniqueItems":true},"record_owner":{"default":false,"description":"The record's owner.","title":"Record Owner","type":"boolean"},"holders_of":{"anyOf":[{"maxLength":256,"minLength":3,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","type":"string"},{"type":"null"}],"default":null,"description":"Every member whose roles allow this action (`automations.manage`).","title":"Holders Of"}},"title":"NotifyRecipients","type":"object"},"NotifyStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"notify","default":"notify","title":"Action","type":"string"},"recipients":{"$ref":"#/$defs/NotifyRecipients"},"title":{"maxLength":10000,"minLength":1,"title":"Title","type":"string"},"body":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Body"},"record":{"anyOf":[{"$ref":"#/$defs/RecordTarget"},{"type":"null"}],"default":null,"description":"The record the notification links to (and whose fields and owner `recipients` read)."}},"required":["id","recipients","title"],"title":"NotifyStep","type":"object"},"OnFailure":{"enum":["stop","continue"],"title":"OnFailure","type":"string"},"PrincipalChoice":{"additionalProperties":false,"description":"One person: named, the run's publisher (`run_as`), or a placeholder naming a `user`\nattribute's value (`{{trigger.record.owner}}`).","properties":{"principal_id":{"anyOf":[{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Principal Id"},"publisher":{"default":false,"title":"Publisher","type":"boolean"},"template":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Template"}},"title":"PrincipalChoice","type":"object"},"PrincipalKind":{"enum":["user","service","api_token","agent"],"title":"PrincipalKind","type":"string"},"PrincipalRef":{"additionalProperties":false,"description":"Points at the principal that acted, without carrying its roles or scopes.","properties":{"id":{"description":"Identifier of the acting principal.","maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Id","type":"string"},"kind":{"$ref":"#/$defs/PrincipalKind"}},"required":["id","kind"],"title":"PrincipalRef","type":"object"},"RecordEventKind":{"description":"What happened to a record, for a `record` trigger.","enum":["created","updated","archived","restored","deleted"],"title":"RecordEventKind","type":"string"},"RecordPick":{"description":"Which of the records `find_records` found later steps use.","enum":["only","first","all"],"title":"RecordPick","type":"string"},"RecordSelection":{"additionalProperties":false,"description":"Records of one type matching conditions: a schedule's `for_each`.","properties":{"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"where":{"anyOf":[{"$ref":"#/$defs/FilterGroup"},{"type":"null"}],"default":null}},"required":["object_type"],"title":"RecordSelection","type":"object"},"RecordTarget":{"additionalProperties":false,"description":"The record a step acts on: the trigger record, or the record an earlier step found or\ncreated, or a single-valued relation of either.","properties":{"source":{"$ref":"#/$defs/TargetSource","default":"trigger"},"step_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"The earlier step, when `source` is `step`.","title":"Step Id"},"relation":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A single-valued relation attribute of that record: act on the record it names.","title":"Relation"}},"title":"RecordTarget","type":"object"},"RecordTrigger":{"additionalProperties":false,"description":"A record of a type was created, changed, archived, restored or deleted.","properties":{"kind":{"const":"record","default":"record","title":"Kind","type":"string"},"object_type":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Object Type","type":"string"},"on":{"items":{"$ref":"#/$defs/RecordEventKind"},"minItems":1,"title":"On","type":"array","uniqueItems":true},"fields":{"description":"For `updated`: any of these changed (none: any change).","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":50,"title":"Fields","type":"array","uniqueItems":true}},"required":["object_type","on"],"title":"RecordTrigger","type":"object"},"RelationLink":{"additionalProperties":false,"description":"Link a created record to another through one of the created record's relations.","properties":{"attribute":{"description":"A relation attribute of the created record's type.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Attribute","type":"string"},"to":{"$ref":"#/$defs/RecordTarget"}},"required":["attribute"],"title":"RelationLink","type":"object"},"RelativeTime":{"additionalProperties":false,"description":"A time relative to now, or to a time the run knows: `{\"after\": \"P3D\"}` is three days\nfrom now; `{\"after\": \"-P1D\", \"since\": \"{{trigger.record.close_date}}\"}` the day before a\nrecord's date.","properties":{"after":{"default":"PT0S","description":"An ISO 8601 duration (`PT2H`, `P3D`); negative for before.","format":"duration","title":"After","type":"string"},"since":{"default":"now","description":"`now`, or one placeholder naming a date or a time of the run's context.","maxLength":10000,"title":"Since","type":"string"}},"title":"RelativeTime","type":"object"},"ResourceRef":{"additionalProperties":false,"description":"Points at anything the policy engine authorizes access to.","properties":{"type":{"description":"Resource kind, e.g. `record`, `object_type`, `knowledge`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Type","type":"string"},"id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"The specific resource, or None for a collection-level action such as list or create.","title":"Id"},"object_type":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"For records: the object type, whose ACL the record inherits.","title":"Object Type"}},"required":["type"],"title":"ResourceRef","type":"object"},"RunOccurrence":{"additionalProperties":false,"description":"What started a run, as references: never the payload of what happened.","properties":{"kind":{"$ref":"#/$defs/TriggerKind"},"key":{"description":"`event:<event_id>`, `schedule:<time>[:<record>]`, `manual:<key>`, `retry:<run>:<n>`.","maxLength":512,"minLength":1,"title":"Key","type":"string"},"event_id":{"anyOf":[{"description":"Deterministic identifier of a Core event.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Event Id"},"record_id":{"anyOf":[{"description":"Identifier of an entity record.","maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"},"activity_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Activity Id"},"collection_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Collection Id"},"revision":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"The version of the record (or collection entry) the event announced: where `previous`\nis read from (the record's history at that revision).","title":"Revision"},"stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A collection trigger: the stage the record is in after the write.","title":"Stage"},"from_stage":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"description":"A collection trigger: the stage it was in before.","title":"From Stage"},"scheduled_for":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Scheduled For"},"started_by":{"anyOf":[{"$ref":"#/$defs/PrincipalRef"},{"type":"null"}],"default":null,"description":"Who pressed Run (manual and test runs, retries); None once that person is erased."}},"required":["kind","key"],"title":"RunOccurrence","type":"object"},"ScheduleTrigger":{"additionalProperties":false,"description":"On a calendar: five-field cron in an IANA time zone.","properties":{"kind":{"const":"schedule","default":"schedule","title":"Kind","type":"string"},"cron":{"maxLength":100,"minLength":9,"pattern":"^[0-9*/,\\- ]+$","title":"Cron","type":"string"},"timezone":{"default":"UTC","maxLength":64,"minLength":1,"title":"Timezone","type":"string"},"for_each":{"anyOf":[{"$ref":"#/$defs/RecordSelection"},{"type":"null"}],"default":null,"description":"One run per matching record (bounded by the deployment), instead of one run."}},"required":["cron"],"title":"ScheduleTrigger","type":"object"},"SequenceExit":{"description":"Why a record left a sequence before its last step.","enum":["replied","meeting_booked","unsubscribed","bounced","record_unavailable"],"title":"SequenceExit","type":"string"},"SequenceSettings":{"additionalProperties":false,"description":"What makes an automation a sequence: people enroll records in it (ADR 0039).","properties":{"stop_on_reply":{"default":true,"title":"Stop On Reply","type":"boolean"},"stop_on_meeting":{"default":true,"title":"Stop On Meeting","type":"boolean"},"unsubscribed_attribute":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"description":"A checkbox attribute of the record. When set, the record leaves at its next step, and\nno setting turns this off.","title":"Unsubscribed Attribute"},"out_of_office_pause":{"default":"P3D","format":"duration","title":"Out Of Office Pause","type":"string"},"daily_send_limit":{"default":50,"description":"Writes per connected account per day. Over it a step waits; nothing is dropped.","maximum":2000,"minimum":1,"title":"Daily Send Limit","type":"integer"},"hourly_send_limit":{"default":6,"maximum":500,"minimum":1,"title":"Hourly Send Limit","type":"integer"}},"title":"SequenceSettings","type":"object"},"SetReminderStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"set_reminder","default":"set_reminder","title":"Action","type":"string"},"recipient":{"$ref":"#/$defs/PrincipalChoice"},"at":{"$ref":"#/$defs/RelativeTime"},"note":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"record":{"anyOf":[{"$ref":"#/$defs/RecordTarget"},{"type":"null"}],"default":null}},"required":["id","at"],"title":"SetReminderStep","type":"object"},"SortDirection":{"enum":["asc","desc"],"title":"SortDirection","type":"string"},"SortKey":{"additionalProperties":false,"description":"One key of a list's order: a sortable field of the resource's catalogue.","properties":{"field":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*(\\.[A-Za-z0-9_-]{1,128})?$","title":"Field","type":"string"},"direction":{"$ref":"#/$defs/SortDirection","default":"asc"}},"required":["field"],"title":"SortKey","type":"object"},"StepResult":{"additionalProperties":false,"properties":{"step_id":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Step Id","type":"string"},"status":{"$ref":"#/$defs/StepStatus"},"attempts":{"default":0,"minimum":0,"title":"Attempts","type":"integer"},"started_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Started At"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Finished At"},"refs":{"default":[],"description":"What the step read or wrote, to open under the reader's own access.","items":{"$ref":"#/$defs/ResourceRef"},"maxItems":60,"title":"Refs","type":"array"},"changed":{"default":[],"description":"Field names it changed, never their values.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Changed","type":"array"},"error":{"anyOf":[{"$ref":"#/$defs/ErrorInfo"},{"type":"null"}],"default":null}},"required":["step_id","status"],"title":"StepResult","type":"object"},"StepStatus":{"enum":["running","succeeded","failed","skipped","simulated"],"title":"StepStatus","type":"string"},"StopUnlessStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"stop_unless","default":"stop_unless","title":"Action","type":"string"},"condition":{"$ref":"#/$defs/Condition"}},"required":["id","condition"],"title":"StopUnlessStep","type":"object"},"TargetSource":{"description":"Where a step's target record comes from.","enum":["trigger","step"],"title":"TargetSource","type":"string"},"TriggerKind":{"enum":["record","activity","collection","schedule","manual"],"title":"TriggerKind","type":"string"},"UpdateRecordStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"update_record","default":"update_record","title":"Action","type":"string"},"target":{"$ref":"#/$defs/RecordTarget"},"fields":{"maxProperties":100,"minProperties":1,"patternProperties":{"^[a-z][a-z0-9_]*$":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{}]}},"propertyNames":{"maxLength":256,"minLength":1},"title":"Fields","type":"object"},"optional":{"description":"Fields left unchanged, instead of failing the step, when their placeholder is empty.","items":{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":100,"title":"Optional","type":"array","uniqueItems":true}},"required":["id","fields"],"title":"UpdateRecordStep","type":"object"},"UpdateTaskStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"update_task","default":"update_task","title":"Action","type":"string"},"task_step":{"description":"The earlier `create_task` step whose task this changes.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Task Step","type":"string"},"status":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}],"default":null,"title":"Status"},"assignee":{"anyOf":[{"$ref":"#/$defs/PrincipalChoice"},{"type":"null"}],"default":null},"due":{"anyOf":[{"$ref":"#/$defs/RelativeTime"},{"type":"null"}],"default":null}},"required":["id","task_step"],"title":"UpdateTaskStep","type":"object"},"WaitStep":{"additionalProperties":false,"properties":{"id":{"description":"Stable across edits; later steps read its output as `steps.<id>.…`.","maxLength":256,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Id","type":"string"},"label":{"anyOf":[{"maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Label"},"on_failure":{"$ref":"#/$defs/OnFailure","default":"stop"},"action":{"const":"wait","default":"wait","title":"Action","type":"string"},"until":{"$ref":"#/$defs/RelativeTime"},"business_days":{"default":false,"description":"Count `until.after` in whole days, Monday to Friday (UTC).","title":"Business Days","type":"boolean"}},"required":["id","until"],"title":"WaitStep","type":"object"}},"properties":{"result":{"anyOf":[{"$ref":"#/$defs/Automation"},{"$ref":"#/$defs/AutomationVersion"},{"$ref":"#/$defs/AutomationArchived"},{"$ref":"#/$defs/AutomationRun"}],"title":"Result"}},"required":["result"],"title":"manage_automationsOutput","type":"object"},"annotations":{"title":"Manage automations","readOnlyHint":false,"destructiveHint":true,"openWorldHint":false}}]}