@standards/schema 1.0.0-alpha.435 → 1.0.0-alpha.438

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- import{NonJsonValueError as e,asTenantId as t,asUserId as n,canonicalStringify as r,deepEqual as i,generateId as a,indexBy as o,sameStableValue as s,serializeCanonicalJson as c,serializeStableJson as l}from"./utils-DKrBP9EH.mjs";import{ACTIONABLE_DECISION_KINDS as u,AGENDA_BLOCK as d,AGGREGATE_BUCKETS as f,AGGREGATE_MEASURES as p,ARTIFACT_PREVIEW_EXTENSION as m,ATTRIBUTE_FILTER_OPERATORS as h,ATTRIBUTE_NAME_SCHEMA as ee,ATTRIBUTE_TYPES as te,ATTRIBUTE_TYPE_DESCRIPTORS as ne,BLOCK_CONTEXTS as re,BLOCK_PERIODS as ie,BLOCK_WIDTHS as g,CARD_BLOCK as _,CHART_BLOCK as v,CHART_KINDS as ae,CHART_ORDERS as oe,CONTENT_PLACEMENT_CONTEXTS as se,DECISIONS_BLOCK as ce,DECISION_INBOX_STATES as le,DECISION_KINDS as ue,DECISION_LINE_MAX_LENGTH as de,DECISION_LINK_TARGET_TYPES as fe,DECISION_LIST_STATES as pe,DECISION_READ_STATES as me,DECISION_SENDER_KINDS as he,DECISION_SETTINGS_AREAS as ge,DECISION_TITLE_MAX_LENGTH as _e,DECISION_TRANSFERS_KEY as ve,DECISION_TYPES_V1 as ye,DECISION_TYPE_ACCESS_GRANTED as be,DECISION_TYPE_AGENT_APPROVAL as xe,DECISION_TYPE_AGENT_MESSAGE as Se,DECISION_TYPE_AGENT_QUESTION as Ce,DECISION_TYPE_AGENT_REVIEW as we,DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED as Te,DECISION_TYPE_AGENT_SETUP as Ee,DECISION_TYPE_BUNDLE_SETUP as De,DECISION_TYPE_CONNECTOR_CONNECTION_ERROR as Oe,DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED as ke,DECISION_TYPE_ENVIRONMENT_BUILD_FAILED as Ae,DECISION_TYPE_KINDS as y,DECISION_TYPE_PERSON as je,DECISION_TYPE_RECORD_ASSIGNED as Me,DECISION_TYPE_RECORD_MENTIONED as Ne,DECISION_WORK_STATES as Pe,DEFAULT_LAYOUT_TRAITS as Fe,GROUPABLE_ATTRIBUTE_TYPES as Ie,HEADING_BLOCK as Le,HIERARCHY_ATTRIBUTE_IDS as Re,HIERARCHY_ATTRIBUTE_NAMES as ze,HIERARCHY_CHILD_IDS_LIMIT as Be,INVENTORY_LIMIT as Ve,LIST_VIEW_TAB_VISIBILITIES as He,LOCATION_FILTER_PROPERTIES as Ue,MAILBOX_BLOCK as We,MAX_AGGREGATE_GROUPS as Ge,MEASURABLE_ATTRIBUTE_TYPES as Ke,MEETINGS_UPCOMING_BLOCK as qe,METRIC_BLOCK as b,NATIVE_BLOCKS as Je,NATIVE_OBJECT_NAMES as Ye,NO_VALUE_OPERATORS as Xe,OBJECT_NAME_SCHEMA as Ze,OPERATORS_BY_TYPE as Qe,PAGE_GRID_COLUMNS as $e,QUALIFIED_SEPARATOR as et,QUERY_OBJECT as tt,RECORD_LINKS_BLOCK as nt,RECORD_LINKS_CONTENT as x,RECORD_LIST_SCOPES as rt,RECORD_OBJECT as it,RELATION_TARGET_ANY as at,REMOVED_OPERATOR_REPLACEMENTS as ot,RESERVED_ATTRIBUTE_NAMES as st,RESERVED_OBJECT_NAMES as ct,RESOURCE_VISIBILITIES as lt,RecordQuery as ut,SCHEMA_LIMITS as S,SYNONYM_ALIASES as dt,SYSTEM_ATTRIBUTES as ft,SYSTEM_ATTRIBUTE_I18N_KEYS as pt,SYSTEM_FIELD_NAMES as mt,SYSTEM_FILTER_ATTRIBUTE_TYPES as ht,TEXT_BLOCK as C,UNORDERED_CHART_KINDS as gt,assertUniqueBy as _t,attributeFilterTarget as vt,attributeInventory as yt,blockObjectInputs as bt,buildQualifiedAttribute as xt,canonicalizeFilterValue as St,capped as Ct,collectContentViewCatalogue as wt,collectQualifiedRuleIssues as Tt,collectionContentSourceSchema as Et,collectionSourceAddress as Dt,collectionSourceAddressOf as Ot,colorIdSchema as kt,columnsSchema as At,contentExtensionRegistry as w,contentReadObjects as jt,contentViewDefinitionSchema as T,contentViewDefinitionSchemaFor as Mt,currentActor as Nt,decisionArchiveAllResultSchema as Pt,decisionAttachmentSchema as Ft,decisionCountsSchema as It,decisionHandedBy as Lt,decisionLinkSchema as Rt,decisionListResultSchema as zt,decisionRecipientSchema as Bt,decisionSchema as Vt,decisionSenderSchema as Ht,decisionThreadKey as Ut,decisionTransferBy as Wt,decisionTransferTargetsSchema as Gt,decisionTransferTo as Kt,decisionTransfersOf as qt,decisionWithRecipientSchema as Jt,defineBlock as Yt,describeViewIssue as Xt,displayAttributesSchema as Zt,draftContentViewDefinitionSchema as Qt,draftContentViewDefinitionSchemaFor as $t,edgePropertyFilterTarget as en,extractCurrencyFilterValue as tn,extractFilterValue as nn,filterOperatorsOfType as rn,filterStateSchema as an,filterTargetsOf as on,findGridViolation as sn,findGroupViolation as cn,findLayoutRuleViolation as ln,findRelationAttribute as un,findRowLimitViolation as dn,formatDecisionLink as fn,getAttributeCapabilities as pn,getAttributeFilterOperators as mn,getHierarchyAttributes as hn,getObjectSystemAttributes as gn,getOperatorPolarity as _n,getRollupFilterOperators as vn,getSystemAttributeI18nKey as yn,getSystemAttributeList as bn,gridPositionSchema as xn,groupSizeMessage as Sn,groupedMembers as Cn,hasTypeTrait as wn,hasValueKind as Tn,iconNameSchema as E,inferInverseCardinality as En,input as Dn,invalidViewMessage as On,isActionableDecisionKind as kn,isAttributeFilterable as An,isAttributeGroupable as jn,isAttributeKanbanGroupable as Mn,isAttributeSearchable as Nn,isAttributeSortable as Pn,isBilateralRelation as Fn,isBoardGrouping as In,isCalendarDay as Ln,isCollectionContent as Rn,isDynamicValue as zn,isHierarchyAttribute as Bn,isLocationFilterProperty as Vn,isLocationPartOperator as Hn,isManagedSystemAttribute as Un,isNativeObjectName as D,isNoValueOperator as Wn,isPlainRecord as Gn,isRelativeDateValue as Kn,isSetMembershipOperator as qn,isUniversalRelation as Jn,isValueKindType as O,layoutTraitsOf as Yn,locationPartFilterTarget as Xn,memberlessGroups as k,metricComparePeriod as Zn,normalizeFilterRule as Qn,normalizeForEdgeRpc as $n,normalizeOperator as er,now as tr,overlaps as nr,pageTraitsOf as rr,parseBlockParameters as A,parseDecisionLink as ir,parseQualifiedAttribute as ar,parseRecordListScope as or,parseResourceVisibility as sr,publishedViewContentDefinitionSchema as j,query as cr,recordQueryDefinitionSchema as lr,relationAcceptsObject as ur,relationTargetsOf as dr,requireContentPlacement as fr,requireRecordContentContext as pr,requireSingleRelationTarget as mr,resolveCollectionActions as hr,resolveContentNavigation as gr,resolveEffectiveFilterType as _r,resolveIsWithinBounds as vr,resolveUtcDayBounds as yr,singleRelationTarget as br,sortsSchema as xr,sourcedAttributeOf as Sr,systemColumnFilterTarget as Cr,toMultiValueOperator as wr,toUtcDayString as Tr,today as Er,validateAttributeName as Dr,validateContentViewCatalogue as Or,validateIconName as kr,validateLabel as Ar,validateObjectName as jr,validateOptions as Mr,validateQualifiedRule as Nr,validateStoredViews as Pr,validateViewName as Fr}from"./attribute-validators-BGKhSoi4.mjs";import{COMPUTED_RETURN_TYPES as Ir,DEFAULT_VALIDATION_MESSAGES as Lr,SIMPLE_PROPERTY_TYPES as Rr,TEXT_FORMAT_PATTERNS as zr,WIRE_OFFERED_BASE_CONFIG as Br,WIRE_OMITTED_CONFIG_KEYS as Vr,attributeConfigSchemas as Hr,createAttributeValidator as Ur,createFormAttributeValidator as Wr,createObjectValidator as Gr,datePrecisionIssues as Kr,formatPhoneForDisplay as qr,formatZodErrors as Jr,getAttributeConfigSchema as Yr,getAttributeConfigWriteSchema as Xr,getIso2 as Zr,isEmptyValue as Qr,isNullishOrEmptyString as $r,isValuePresent as ei,normalizeCountrylessPhoneNumber as ti,normalizePhoneNumber as ni,parseAttributeConfig as ri,parseAttributeConfigForCreate as ii,parseAttributeConfigForUpdate as ai,propertyAttributeSchema as oi,propertyAttributeWireSchema as si,propertySchemaSchema as ci,propertySchemaWireSchema as li,refuseForeignKeys as ui,rejectUnknownAttributesOrThrow as di,resolveTextPattern as fi,selectOptionWriteSchema as pi,statusGroupSchema as mi,statusOptionWriteSchema as hi,validateAttribute as gi,validateDraft as _i,validateDraftOrThrow as vi,validateObject as yi,validateObjectOrThrow as bi,wireHiddenTypeConfigMask as xi,wireOmittedConfigKeysFor as Si,withoutUnknownOptionKeys as Ci}from"./all-DxqmnktK.mjs";import"./zod-locale.mjs";import{ACCESS_CAPABILITIES as wi,ACCESS_LEVELS as Ti,ACCESS_ROLES as Ei,ACTOR_TYPES as Di,AGENT_ASIDE_ANSWER_MAX_LENGTH as Oi,AGENT_ASIDE_HISTORY_LIMIT as ki,AGENT_ASIDE_QUESTION_MAX_LENGTH as Ai,AGENT_AVATAR_EXPRESSIONS as ji,AGENT_AVATAR_TYPES as Mi,AGENT_MESSAGE_KIND as Ni,AGENT_MESSAGE_SENDER_NAME_KEY as Pi,AGENT_NOTIFICATION_KIND as Fi,AGENT_SESSION_ACCESS_ROLES as Ii,AGENT_SESSION_LIST_ORDERS as Li,AGENT_SESSION_ORIGINS as Ri,AGENT_SESSION_PROVENANCES as zi,AGENT_STARTERS_MAX as Bi,AGENT_STARTER_MAX_LENGTH as Vi,AGENT_SYSTEM_PROMPT_MAX_LENGTH as Hi,AGENT_TASK_KINDS as Ui,AGENT_WAKE_KIND as Wi,AI_MODEL_INPUT_MODALITIES as Gi,AI_MODEL_PROFILE_LABELS as Ki,AI_MODEL_REASONING_MODES as qi,ALL_CATALOG_TOOL_NAMES as Ji,ALWAYS_KINDS as Yi,APPEARANCE_FACETS as Xi,APPROVAL_FAMILY_TOOL_NAMES as Zi,ARCHITECT_PUBLICATION_KIND as Qi,ASK_QUESTIONS_ANSWER_MAX_LENGTH as $i,ASK_QUESTIONS_ANSWER_MAX_VALUES as ea,ASK_QUESTIONS_FILE_REF as ta,ASK_QUESTIONS_MAX_ADDED_FILES as na,ASK_QUESTIONS_MAX_BATCH as ra,ASK_QUESTIONS_TOOL_NAME as ia,ATTACH_FILE_ACTIONS as aa,AUDIT_ACTIONS as oa,AUDIT_AGENT_SESSION_METADATA_KEY as sa,AUDIT_RESOURCE_TYPES as ca,AgentBuilder as M,BILLING_MODES as la,BROWSER_LAUNCH_TOOL_NAME as ua,BROWSER_TOOL_NAMES as da,BUNDLE_LOCALES as fa,BUNDLE_SETUP_PROMPT_MAX_LENGTH as pa,CATALOG_RESOURCES as ma,CONNECTION_GRANT_PROVIDERS as ha,CONNECTION_STATUS_IDS as ga,CONNECTOR_PROVIDER_IDS as _a,CONNECTOR_SCOPES as va,CONTINUATION_KEY_PATTERN as ya,CONVERSATION_SURFACES as ba,COPY_VERB_NAME as xa,CORE_RECORD_TOOL_NAMES as Sa,CORE_TOOL_NAMES as Ca,COUNT_MODES as wa,CUSTOM_LEVEL as Ta,DEFAULT_AGENT_EXECUTION_CONFIG as Ea,DEFAULT_AGENT_TOOL_GROUPS as Da,DEFAULT_APPEARANCE_ICON as Oa,DEFAULT_APPROVAL_POLICY as ka,DEFAULT_BLUEPRINT_TOOL_GROUPS as Aa,DEFAULT_DAILY_ACTIVITY_DAYS as ja,DEFAULT_DICTATION_LIMITS as Ma,DEFAULT_MEETING_BOT_DISPLAY_NAME as Na,DEFAULT_TENANT_SETTINGS as Pa,DEVICE_ACCESS_ROLES as Fa,DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS as Ia,DEVICE_CHANNEL_IDLE_POLL_MS as La,DEVICE_CHANNEL_KEEPALIVE_MS as Ra,DEVICE_CHANNEL_MAX_FRAME_BYTES as za,DEVICE_CHANNEL_PATH as Ba,DEVICE_CHANNEL_PRESENCE_MS as Va,DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION as Ha,DEVICE_COMMAND_ERROR_CODES as Ua,DEVICE_DESKTOP_STATES as Wa,DEVICE_SHELLS as Ga,DICTATION_FINALIZATION_TIMEOUT_MS as Ka,DICTATION_FRAME_BYTES as qa,DICTATION_MAX_BUFFER_BYTES as Ja,DICTATION_MAX_FRAME_BYTES as Ya,DICTATION_MAX_TRANSCRIPT_BYTES as Xa,DICTATION_MODEL_ID as Za,DICTATION_PREPARATION_TIMEOUT_MS as Qa,DICTATION_SAMPLE_RATE as $a,DICTATION_TICKET_TTL_MS as eo,DISCARD_ARCHITECT_DRAFT_TOOL_NAME as to,DOCUMENT_KINDS as no,DOCUMENT_SORT_MODES as ro,DRAFT_WRITE_TOOL_NAMES as io,DeviceChannelProtocolError as ao,DeviceChannelServerFrameSchema as oo,DeviceChannelWorkerFrameSchema as so,DeviceDesktopStatusSchema as co,EMAIL_CATEGORY_DEFAULT_COLOR as lo,EMAIL_CATEGORY_DEFAULT_ICON as uo,EMAIL_CATEGORY_DESCRIPTION_MAX as fo,EMAIL_CATEGORY_DESCRIPTION_MIN as po,EMAIL_CATEGORY_LIMIT as mo,EMAIL_CATEGORY_NAME_MAX as ho,EMAIL_CATEGORY_SCOPES as go,EMAIL_CLASSIFIED_BY as _o,EMAIL_DIRECTIONS as vo,EMAIL_PARTICIPANT_ROLES as yo,EMAIL_PROVIDERS as bo,EMAIL_RULE_SCOPES as xo,ENVIRONMENT_BUILD_LOG_STEPS as So,ENVIRONMENT_BUILD_LOG_STEP_PREFIX as Co,ENVIRONMENT_HARNESSES as wo,ENVIRONMENT_HARNESS_SANDBOX_WORKDIR as To,ENVIRONMENT_HARNESS_WORKDIR as Eo,ENVIRONMENT_IMAGES as Do,ENVIRONMENT_MEMORY_GB_PER_VCPU as Oo,ENVIRONMENT_NAME_MAX_CHARS as ko,ENVIRONMENT_NETWORK_ALLOW_MAX as Ao,ENVIRONMENT_SCRIPT_MAX_BYTES as jo,ENVIRONMENT_SIZES as Mo,ENVIRONMENT_SIZE_VCPUS as No,ENVIRONMENT_STANDARDS_WORKDIR as Po,ENV_VAR_KEY_PATTERN as Fo,ESTIMATED_COUNT_CAP as Io,FILE_LIST_MAX_IDS as Lo,FILE_OCR_STATUSES as Ro,FILE_URLS_MAX_IDS as zo,FORM_STATUSES as Bo,FORM_SUBMISSION_STATUSES as Vo,GET_ARCHITECT_DRAFT_TOOL_NAME as Ho,GITHUB_TRIGGER_CATALOG as Uo,GITHUB_TRIGGER_FAMILIES as Wo,GRANT_ENABLES as Go,HARNESS_BRIDGE_PORT as Ko,HITL_TOOL_NAMES as qo,IMAGE_FORMATS as Jo,IMAGE_SHAPES as Yo,IMAGE_SOURCES as Xo,INFERENCE_REASONING_OPTIONS as Zo,INFERENCE_ROUTING_MODES as Qo,INFERENCE_SPEEDS as $o,LAST_RUN_ERROR_MAX_LENGTH as es,LINK_COOKIE_MAX_AGE_MS as ts,LINK_DEFAULT_MS as ns,LINK_MAX_MS as rs,MACHINE_KEY_KINDS as is,MAILBOX_ACCOUNT_VISIBILITIES as as,MAILBOX_LIST_MODES as os,MAILBOX_READER_LAYOUTS as ss,MAIL_DRAFT_BODY_MAX_CHARS as cs,MAIL_DRAFT_MODES as ls,MAIL_SIGNATURE_MAX_CHARS as us,MAIL_SUBJECT_MAX_CHARS as ds,MAX_DAILY_ACTIVITY_DAYS as fs,MAX_TODOS as ps,MAX_TODO_DESCRIPTION_CHARS as ms,MAX_TODO_ID_CHARS as hs,MEETING_BOT_IMAGE as gs,MEETING_BOT_IMAGE_BASE64_MAX_LENGTH as _s,MEETING_BOT_MEMBER_CAP as vs,MEETING_BOT_NO_CREDITS as ys,MEETING_BOT_SILENT_REASON as bs,MEETING_CONFERENCE_REQUESTS as xs,MEETING_PARTICIPANT_ROLES as Ss,MEETING_RESPONSES as Cs,MEETING_RESPONSE_STATUSES as ws,MEETING_STATUSES as Ts,MEMORY_SPEND_LIMIT_PATTERN as Es,NATIVE_TOOL_GROUPS as Ds,NATIVE_TOOL_GROUP_CATALOG as Os,NEWS_DEFAULT_DISPLAY_DAYS as ks,NEWS_DISPLAY_CAP_DAYS as As,NEWS_INDEX_MAX_ENTRIES as js,NEWS_INTENSITIES as Ms,NEWS_TARGET_KINDS as Ns,NO_ACCESS as Ps,NO_RECORDING as Fs,OAUTH_TICKET_TTL_MS as Is,OBJECT_GRANT as Ls,OPEN_TOOL_PART_STATES as Rs,OPERATION_MAX_STEPS as zs,PERMISSION_ACTIONS as Bs,PERMISSION_CAPABILITIES as Vs,PERMISSION_CATALOG as Hs,PERSISTENCE_OWNED_QUOTA_KEYS as Us,PROVIDER_DRAFT_LABEL as Ws,PROVIDER_NAMES as Gs,PUBLIC_MAIL_DOMAINS as Ks,QUESTION_FAMILY_TOOL_NAMES as qs,QUOTA_KEYS as Js,RECENT_ACTIVITY_LEDGER_LIMIT as Ys,RECIPIENT_IDENTITIES_MAX as Xs,RECORDING_OVERRIDES as Zs,RECORDING_POLICIES as Qs,RECORD_ACCESS_ROLES as $s,RECORD_ACCESS_SOURCES as ec,RECORD_DRIVE_CURSOR_MAX_LENGTH as tc,RECORD_DRIVE_PAGE_DEFAULT_LIMIT as nc,RECORD_DRIVE_PAGE_MAX_LIMIT as rc,RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE as ic,RECORD_GRAPH_MAX_LIMIT_PER_NODE as ac,RECORD_GRAPH_MAX_NODES as oc,RECORD_IMAGE_MAX_BYTES as sc,REFERENCE_KINDS as cc,REPLY_MODES as lc,REPOSITORY_WILDCARD as uc,REQUEST_DESIGN_REVIEW_TOOL_NAME as dc,REQUEST_SETUP_TOOL_NAME as fc,RESOURCE_GRANT_KINDS as pc,RESOURCE_KIND_CATALOG as mc,ROUTING_PRICE_CEILINGS as hc,RUN_ORIGIN_METADATA_KEY as gc,SEND_VERB_NAME as _c,SESSION_INFERENCE_PATCH_KEYS as vc,SLACK_TRIGGER_CATALOG as yc,SLACK_TRIGGER_EVENTS as bc,SPEAKS_THROUGH_SEND_METADATA_KEY as xc,SURFACE_TOOL_NAMES as Sc,SYSTEM_EMAIL_CATEGORIES as Cc,SYSTEM_EMAIL_CATEGORY_NAMES as wc,SYSTEM_PART_CODES as Tc,TASK_DEMAND_LEVELS as Ec,TENANT_INVITATION_DEFAULT_TTL_MS as Dc,TENANT_INVITATION_DELIVERY_STATUSES as Oc,TENANT_INVITATION_MAX_TTL_MS as kc,TENANT_INVITATION_MIN_TTL_MS as Ac,TENANT_INVITATION_RESEND_INTERVAL_MS as jc,TENANT_INVITATION_STATUSES as Mc,TODO_PHASES as Nc,TODO_PLAN_STATUSES as Pc,TODO_STATUSES as Fc,TOOL_APPROVAL_STATES as Ic,TOOL_IMPACT_COUNT_KEYS as Lc,TRANSCRIPT_STATUSES as Rc,TRIAGE_ACTIONS as zc,TRIGGER_EVENT_TYPES as Bc,TRIGGER_MAX_REENTRY as Vc,TURN_OUTCOMES as Hc,UNSHAREABLE_OBJECT_NAMES as Uc,USAGE_MODALITIES as Wc,USAGE_SCOPES as Gc,USERS_RESOLVE_MAX_IDS as Kc,USER_STATUSES as qc,USER_WORK_POSTURES as Jc,VERB_NAMES as Yc,WAKE_TURN_METADATA_KEY as Xc,WAKE_TURN_SPOKE_METADATA_KEY as Zc,WALLET_STATUSES as Qc,accessGrantSchema as $c,actorSchema as el,agent as tl,agentApprovalResolutionSchema as nl,agentAvatarFromMetadata as rl,agentAvatarOutputSchema as il,agentAvatarSchema as al,agentConversationOverviewSchema as ol,agentDataChunk as sl,agentDefinitionActivitySchema as cl,agentDefinitionAudienceSchema as ll,agentDefinitionDailyActivitySchema as ul,agentDefinitionSchema as dl,agentDisplayName as fl,agentExecutionConfigOutputSchema as pl,agentHistoryMessageSchema as ml,agentInferencePreferencesOutputSchema as hl,agentInferencePreferencesSchema as gl,agentMemoryViewSchema as _l,agentMessageAttachmentSchema as vl,agentMessagePartSchema as yl,agentRequestAnswerSchema as bl,agentRoleSchema as xl,agentRolesSetResultSchema as Sl,agentRunSchema as Cl,agentRunStatusSchema as wl,agentScheduleOutputSchema as Tl,agentScheduleSchema as El,agentSessionAudienceSchema as Dl,agentSessionDefinitionAppearanceSchema as Ol,agentSessionHistoryPageSchema as kl,agentSessionInferenceOverridesInputSchema as Al,agentSessionInferenceOverridesSchema as jl,agentSessionLinkSchema as Ml,agentSessionMessageOutputSchema as Nl,agentSessionMessageSchema as Pl,agentSessionSchema as Fl,agentSetupResponseSchema as Il,agentStartersSchema as Ll,agentTodoPlanViewSchema as Rl,agentToolCatalogSchema as zl,agentTriggerBaseSchema as Bl,agentTriggerDefinitionSchema as Vl,agentTriggerLastCallSchema as Hl,agentTriggerPatchSchema as Ul,agentTriggerSchema as Wl,agentUIValidationError as Gl,agentWakeSchema as Kl,agentWakeViewSchema as ql,apiKeyRoleSchema as Jl,apiKeySchema as Yl,apiKeyWithSecretSchema as Xl,architectProjectionSchema as Zl,artifactQuoteSchema as Ql,askQuestionsOutputSchema as $l,assertCustomAgentUIMessageChunk as eu,assertSessionState as tu,attachedRecordDocumentSchema as nu,attributeOutputSchema as ru,attributeSaveOutputSchema as iu,auditChangeSchema as au,auditLogEntrySchema as ou,availableBundleSummarySchema as su,browserProfilePreparationSchema as cu,browserProfileViewSchema as lu,bundleAddPlanSchema as uu,bundleAddResultSchema as du,bundleContentsSchema as fu,bundleListSchema as pu,bundleModeSchema as mu,bundleOriginSchema as hu,bundlePieceKindSchema as gu,bundlePlanPieceSchema as _u,bundleRemovalPreviewSchema as vu,bundleStatusEntrySchema as yu,bundleStatusSchema as bu,bundleUpdateDependentSchema as xu,bundleUpdateGroupSchema as Su,bundleUpdatePieceKindSchema as Cu,bundleUpdatePieceSchema as wu,bundleUpdatePlanSchema as Tu,bundleUpdateReasonCodeSchema as Eu,bundleUpdateResultSchema as Du,cancelAgentWakeResultSchema as Ou,canonicalToolGroups as ku,capabilityForResource as Au,classificationRestoreSchema as ju,classificationUndoSchema as Mu,classifyEmailResultSchema as Nu,classifyEmailSchema as Pu,cliDefaultModelOf as Fu,cloudBrowserLiveViewSchema as Iu,collectionOutputSchema as Lu,collectionPageSchema as Ru,compareAgentSessionMessages as zu,compareVersions as Bu,compiledHarnessModels as Vu,computeReconnectDelay as Hu,computeRetryDelay as Uu,connectionCapabilitiesSchema as Wu,connectionGrantKindsOf as Gu,connectionSyncProgressSchema as Ku,connectionViewSchema as qu,connectorProvidersResultSchema as Ju,connectorTriggerMatchSchema as Yu,createAgentTriggerResultSchema as Xu,criticConfigOutputSchema as Zu,customDataChunkSchemas as Qu,declaredImageRequests as $u,decodeAgentSessionListCursor as ed,decodeRecordValues as td,defaultEnvironmentSchema as nd,deferredRetypeSchema as rd,deriveViewerAccess as id,deviceAudienceSchema as ad,deviceChannelUrl as od,documentFileSchema as sd,documentRecordOwnerPageSchema as cd,documentRecordOwnerSchema as ld,documentSchema as ud,documentWithSubCountSchema as dd,draftAppendOutputSchema as fd,draftCommandGuardSchema as pd,driveFileSchema as md,durableDateSchema as hd,editAgentSessionMessageResultSchema as gd,effectivePermissionsSchema as _d,emailAttachmentMetaSchema as vd,emailCategoryCreateSchema as yd,emailCategoryDeleteSchema as bd,emailCategorySchema as xd,emailCategoryScopeQuerySchema as Sd,emailCategoryUpdateSchema as Cd,emailCategoryUsageSchema as wd,emailParticipantRefSchema as Td,emailRuleScopeSchema as Ed,emailSenderRuleSchema as Dd,emailVerdictSchema as Od,encodeAgentSessionListCursor as kd,encodeRecordValues as Ad,envVarEntrySchema as jd,environmentBuildFailureSchema as Md,environmentBuildStateSchema as Nd,environmentDetailSchema as Pd,environmentHarness as Fd,environmentHarnessSchema as Id,environmentListSchema as Ld,environmentNetworkPolicyOutputSchema as Rd,environmentRepositorySourceSchema as zd,environmentSchema as Bd,environmentWorkdir as Vd,fileSchema as Hd,fileUrlsResponseSchema as Ud,findEnvironmentHarness as Wd,findGrantIssues as Gd,formDefinitionSchema as Kd,formSlotSchema as qd,formStepSchema as Jd,formSubmissionSchema as Yd,formatNewsTarget as Xd,formatReference as Zd,githubConditionSchema as Qd,githubTriggerMatchSchema as $d,grantKindOf as ef,harnessModelChoices as tf,harnessModelListSchema as nf,harnessModelOptionSchema as rf,hasLocale as af,humanRequestId as of,humanRequestKind as sf,imageModelFormatDefect as cf,imageModelIdSchema as lf,inferenceReasoningSchema as uf,inferenceRoutingSchema as df,inferenceSpeedSchema as ff,installedBundleSummarySchema as pf,isAgentMessageMetadata as mf,isAgentNotificationMetadata as hf,isAgentUIDataName as gf,isAgentWakeMetadata as _f,isAgentWrittenAuditEntry as vf,isArchitectPublicationMetadata as yf,isAwaitingHuman as bf,isBlocking as xf,isCatalogResource as Sf,isEnvironmentBuildLogStep as Cf,isEnvironmentHarnessId as wf,isFormDefinition as Tf,isImageSource as Ef,isMailProvider as Df,isMailboxListMode as Of,isNativeToolGroup as kf,isOpenToolPartState as Af,isParkedOnHuman as jf,isProviderDraft as Mf,isPublicMailDomain as Nf,isQuestionPart as Pf,isReplyMode as Ff,isResourceGrant as If,isRoutineActorMetadata as Lf,isSemver as Rf,isSessionInferencePatch as zf,isSystemEmailCategory as Bf,isSystemEmailCategoryName as Vf,isSystemPartCode as Hf,isToolApprovalState as Uf,isToolImpactCountKey as Wf,isWildcard as Gf,lastPublicationSchema as Kf,lastPublishErrorSchema as qf,levelActions as Jf,levelFloor as Yf,levelOf as Xf,linkedRecordRefSchema as Zf,lockingSendCall as Qf,loginSecretEntrySchema as $f,mailDraftAttachmentSchema as ep,mailDraftSchema as tp,mailSignatureSchema as np,mailboxAccountSchema as rp,mailboxCursorSchema as ip,mailboxEmailSchema as ap,mailboxListResponseSchema as op,mailboxSenderImageSchema as sp,mailboxThreadDetailSchema as cp,mailboxThreadSchema as lp,matchesRepositoryPattern as up,mcpCatalogCategorySchema as dp,mcpCatalogEntrySchema as fp,mcpOAuthAttemptStartedSchema as pp,mcpOAuthSetupSchema as mp,mcpServerAuthTypeSchema as hp,mcpServerStatusSchema as gp,mcpServerViewSchema as _p,meetingBotDispatchRequestSchema as vp,meetingBotDispatchResponseSchema as yp,meetingBotNotificationSchema as bp,meetingLinkedRecordSchema as xp,meetingParticipantRefSchema as Sp,meetingRecordingSchema as Cp,meetingSchema as wp,meetingSiblingRefSchema as Tp,meetingTranscriptProvenanceSchema as Ep,meetingTranscriptResponseSchema as Dp,meetingTranscriptSegmentSchema as Op,meetingTranscriptSourceRefSchema as kp,meetingsListResponseSchema as Ap,memberSchema as jp,mentionReferenceSchema as Mp,mergeSessionInferencePatch as Np,modelDefinitionOutputSchema as Pp,modelDefinitionSchema as Fp,modelReferenceOutputSchema as Ip,modelReferenceSchema as Lp,mutationReceiptSchema as Rp,myPreferencesSchema as zp,needsManageWhenUnattended as Bp,newsBodySchema as Vp,newsIndexSchema as Hp,normalizeNewsLocale as Up,normalizedMeetingTranscriptSchema as Wp,oauthAttemptStartedSchema as Gp,objectDefinitionOutputSchema as Kp,objectRecordOutputSchema as qp,openRequests as Jp,orderAgentSessionMessages as Yp,pageAudienceSchema as Xp,pageReadSchema as Zp,pageSummarySchema as Qp,parseAgentDefinitionAccessRole as $p,parseAgentSessionAccessRole as em,parseCountMode as tm,parseDeviceAccessRole as nm,parseDeviceChannelFrame as rm,parseMergedAgentTrigger as im,parseNewsBody as am,parseNewsIndex as om,parseNewsIntensity as sm,parseNewsTarget as cm,parseOptionalCountMode as lm,parsePageAccessRole as um,parseRecordAccessRole as dm,parseReference as fm,parseServerFrame as pm,parseToolGroupGrant as mm,parseWorkerFrame as hm,permissionFlagsSchema as gm,permissionGrantSchema as _m,permissionSchema as vm,preferenceEntry as ym,preferenceEntrySchema as bm,providerNameSchema as xm,publishBlockerSchema as Sm,publishDraftOutputSchema as Cm,quotaStateSchema as wm,readArchitectPublication as Tm,readAskQuestionsResult as Em,readRunOriginMetadata as Dm,recentActivityEntryKey as Om,recipientContactSchema as km,recipientIdentitySchema as Am,recipientSuggestionSchema as jm,recordAggregatesSchema as Mm,recordAudienceSchema as Nm,recordCollectionOutputSchema as Pm,recordDeletionCountSchema as Fm,recordDriveChildSchema as Im,recordDriveChildrenPageSchema as Lm,recordDriveSearchHitSchema as Rm,recordDriveSearchResultSchema as zm,recordGraphEdgeSchema as Bm,recordGraphNodeKey as Vm,recordGraphNodeSchema as Hm,recordGraphRequestSchema as Um,recordGraphResponseSchema as Wm,recordIncomingReferenceSchema as Gm,recordIncomingReferencesPageSchema as Km,recordMeetingsCount as qm,recordOperationSchema as Jm,recordPurgeResultSchema as Ym,recordValuesCodec as Xm,recordsBulkCreateResultSchema as Zm,recordsBulkDeleteResultSchema as Qm,recordsBulkUpdateResultSchema as $m,refineTrigger as eh,relationOptionSchema as th,relationOptionsResponseSchema as nh,replyDefaultsSchema as rh,requestedCapabilities as ih,resolveAppearance as ah,resolveLocalized as oh,resolvedRelationsBatchSchema as sh,resourceGrant as ch,resourceUsedBySchema as lh,retryPolicyOutputSchema as uh,retypeOptionsOutputSchema as dh,roleSchema as fh,routedMessageInferenceSchema as ph,routineAudiencePreviewSchema as mh,routineAudienceSchema as hh,sameActions as gh,schemaDraftOutputSchema as _h,schemaGroupListSchema as vh,schemaGroupSchema as yh,schemaStateAddressOf as bh,schemaStateEntrySchema as xh,schemaStateSchema as Sh,secretEntrySchema as Ch,servedAsIsAttributeSchema as wh,sessionImageUsageSchema as Th,sessionInferenceOverridesOutputSchema as Eh,sessionInferencePatchSchema as Dh,sessionStateSchema as Oh,setAgentSessionWorkPostureResultSchema as kh,slackConditionSchema as Ah,slackTriggerMatchSchema as jh,submitOutcomeSchema as Mh,syncBundleResultSchema as Nh,tenantInvitationSchema as Ph,tenantSettingsResponseSchema as Fh,tenantSettingsSchema as Ih,todoItemSchema as Lh,todoPlanSchema as Rh,toolImpactSchema as zh,triageResultSchema as Bh,userProfileSchema as Vh,utf8ByteLength as Hh,viewPreferenceAddressSchema as Uh,viewReadSchema as Wh,viewerAccessSchema as Gh,withPreferenceEntry as Kh,withoutTrailingSlashes as qh}from"./record-operation-D9HYWPOc.mjs";import{AccessDeniedError as Jh,AggregateValidationError as Yh,AmbiguousSchemaChangeError as Xh,AttributeInUseError as Zh,AttributeNotFoundError as Qh,ConcurrentModificationError as $h,DuplicateError as N,ExportTooLargeError as eg,ForbiddenError as tg,InvalidPermissionGrantError as ng,LogoProviderUnavailableError as rg,LogoSearchRateLimitedError as ig,MemoryNotFoundError as ag,NotFoundError as og,NotImplementedError as sg,ObjectNotFoundError as cg,ObjectReferencedError as lg,OrphanSystemAttributeError as ug,PageReferencedError as dg,ProtectedResourceError as fg,ProtectedRoleError as pg,QueryTimeoutError as mg,RealtimeDeliveryError as hg,RealtimeRateLimitedError as gg,RealtimeSubscriptionError as _g,RecordNotFoundError as vg,RecordReferencedError as yg,RepositoryError as bg,ReservedObjectNameError as P,RoleNotFoundError as xg,SCHEMA_ERROR_HTTP_STATUS as Sg,SchemaError as F,SchemaErrorCode as I,SearchBackendError as Cg,SearchPathNotIndexedError as wg,StorageError as Tg,SyncCascadeError as Eg,SyncConflictError as Dg,SyncError as Og,SystemEntityImmutableError as kg,ToolGroupGrantError as Ag,ValidationError as L,WorkspaceInvariantReason as jg,isAttributeInUseError as Mg,isNotFoundError as Ng,isObjectReferencedError as Pg,isProtectedResourceError as Fg,isRecordReferencedError as Ig,isSchemaError as Lg,isValidationError as Rg}from"./exceptions.mjs";import*as R from"zod";import{getCountryByIso2 as zg,isValidCurrencyCode as Bg,isValidIso3 as Vg}from"@standards/constants";import{parsePhoneNumberFromString as Hg}from"libphonenumber-js";const Ug=`__stndrdsNativeUiPartIds`,Wg=1;function invalidNativePartIds(){throw new L(`Native agent UI part IDs metadata is invalid`,[])}function isPlainRecord$1(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function nativeAgentUIPartIdMetadataKey(e,t){if(e.type===`text`||e.type===`reasoning`)return`${e.type}:${t}`;if(e.type===`tool`)return`tool:${e.toolCallId}`}function parseNativeAgentUIPartIdsMetadata(e){let t=e.metadata?.[Ug];isPlainRecord$1(t)||invalidNativePartIds(),Object.keys(t).length===2&&t.schemaVersion===1&&isPlainRecord$1(t.partIds)||invalidNativePartIds();let n=/* @__PURE__ */ new Map;for(let[t,r]of e.parts.entries()){let e=nativeAgentUIPartIdMetadataKey(r,t);!e||n.has(e)?e&&invalidNativePartIds():n.set(e,r)}let r=Object.entries(t.partIds);r.length!==n.size&&invalidNativePartIds();let i=/* @__PURE__ */ new Map,a={};for(let[e,t]of r){let r=n.get(e);r&&typeof t==`string`&&t.length>0||invalidNativePartIds();let o=i.get(t);o&&(r.type===`tool`||o!==r.type)&&invalidNativePartIds(),r.type===`tool`&&t!==r.toolCallId&&invalidNativePartIds(),i.set(t,r.type),a[e]=t}return a}const Gg=5,z=[`relation`,`multiRelation`,`formula`,`rollup`,`document`,`richtext`,`user`];function isFormSlotFieldRef(e){return e.type===`slot`}function isFormFreeFieldRef(e){return e.type===`free`}function resolveFieldRequired(e){return e.readOnly===!0?!1:e.fieldRequired===void 0?e.slotMode===`create`&&e.attributeRequired===!0:e.fieldRequired}function getSlotFieldTargets(e){return e.additionalSlotIds?.length?[e.slotId,...e.additionalSlotIds]:[e.slotId]}function formFieldKey(e){return isFormSlotFieldRef(e)?`${e.slotId}.${e.attribute}`:`free.${e.attribute.name}`}function formFieldFlatKey(e){return isFormSlotFieldRef(e)?e.attribute:e.attribute.name}function readFormFieldValue(e,t){return e[formFieldKey(t)]??e[formFieldFlatKey(t)]}function isFormFieldsRow(e){return e.type===`fields`}function isFormHeadingRow(e){return e.type===`heading`}function isFormSeparatorRow(e){return e.type===`separator`}function isFormTextRow(e){return e.type===`text`}function moveWidensAudience(e){return e.added.length>0||!e.workspaceBefore&&e.workspaceAfter}function resolvePropertyDefinitions(e){let t=e.properties;if(!t)return[];if(Array.isArray(t))return t;let n=t;return Array.isArray(n.definitions)?n.definitions:[]}function hasOptions(e){return O(e.type,`options`)}function schemaGroupKey(e){return`${e.kind}:${e.name}`}function refuse$2(e){throw new L(e,[{path:[`label`],message:e}])}function parseSchemaGroupPresentation(e){let t=e??{},n={};if(t.label!==void 0){let e=t.label;if(e===null)n.label=null;else if(typeof e!=`string`)refuse$2(`Label must be a string`);else{let t=e.trim();t.length===0&&refuse$2(`Label must not be empty`),t.length>S.labelLength&&refuse$2(`Label is too long (max ${S.labelLength} characters)`),n.label=t}}return n}const B=/^(?:core|bundle:.+)$/u;function parseSchemaOwner(e){if(e===null)return null;if(!B.test(e))throw new L(`Invalid schema owner "${e}"`,[]);return e}const Kg=[`web`,`presentation`,`document`,`spreadsheet`,`image`,`code`,`other`],qg=[`ephemeral`,`conversation`,`persistent`],Jg=[`source`,`preview`,`entrypoint`,`asset`];var NoopGeocodingAdapter=class{async autocomplete(){return await Promise.resolve([])}async geocode(){return await Promise.resolve(null)}};function computeByteMagnitude(e){if(e<=0)return{value:0,unitIndex:0};let t=1e3,n=Math.min(4,Math.floor(Math.log(e)/Math.log(t)));return{value:Number.parseFloat((e/t**n).toFixed(1)),unitIndex:n}}const Yg=[`B`,`KB`,`MB`,`GB`,`TB`];function formatByteSize(e){let{value:t,unitIndex:n}=computeByteMagnitude(e);return`${t} ${Yg[n]}`}const Xg=Object.freeze([`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`status`,`select`,`multiselect`,`location`]);function buildPropertySchema(e){let t=[];for(let n of e){let e=n.build();if(!Xg.includes(e.type))throw Error(`Property type "${e.type}" is not supported in .qualifyWith()`);t.push(e)}return{definitions:t}}const Zg=[`UPPER`,`LOWER`,`capitalize`,`trim`],Qg=[`prefix`,`suffix`,`wrap`,`default`],V=[...Zg,...Qg],$g=/^\s*where\s*(?::(.*))?$/s,e_=`[A-Za-z_][A-Za-z0-9_]*`,t_=/^[^\s,()|{}="']+$/,n_=RegExp(`^(${e_})\\s*=\\s*(.*)$`),r_=RegExp(`^(${e_})\\s+in\\s*\\(([^()]*)\\)$`);function isWherePipe(e){return $g.test(e)}function parseWherePipe(e){let t=e.match($g)?.[1]?.trim();if(!t)return null;let n=t.match(r_);if(n){let e=n[2].split(`,`).map(e=>e.trim());return e.every(e=>t_.test(e))?{property:n[1],values:e}:null}let r=t.match(n_);return r&&t_.test(r[2])?{property:r[1],values:[r[2]]}:null}const H=R.string().min(1,`labelExpression cannot be empty`).refine(e=>isLabelExpression(e),{message:`labelExpression must contain at least one {{ attribute }} interpolation`}).refine(e=>!/\{\{\s*\}\}/.test(e),{message:`labelExpression contains empty {{ }} interpolation`}).refine(e=>{let t=/(?<!\|)\|(?!\|)\s*(\w+)(?::[^|}]*)?/g,n;for(;(n=t.exec(e))!==null;){let e=n[1];if(!V.includes(e))return!1}return!0},{message:`Invalid pipe name. Valid pipes: ${V.join(`, `)}`});function validateLabelExpression(e){let t=H.safeParse(e);return t.success?{success:!0,attributes:extractAttributeNames(e)}:{success:!1,error:t.error.issues[0]?.message??`Invalid labelExpression`}}function applyPipe(e,t){let{name:n,args:r}=parsePipeExpression(t);switch(n){case`UPPER`:return e.toUpperCase();case`LOWER`:return e.toLowerCase();case`capitalize`:return e.replace(/(^|\s)\S/g,e=>e.toUpperCase());case`trim`:return e.trim();case`prefix`:return e?`${r[0]??``}${e}`:``;case`suffix`:return e?`${e}${r[0]??``}`:``;case`wrap`:return e?`${r[0]??``}${e}${r[1]??``}`:``;case`default`:return e||r[0]||``;default:return e}}function applyPipes(e,t){let n=e;for(let e of t)n=applyPipe(n,e);return n}function getValue(e,t){return t.split(`.`).reduce((e,t)=>{if(typeof e==`object`&&e)return e[t]},e)}const i_=`(Untitled)`;function parsePipeExpression(e){let t=e.match(/^(\w+)(?::(.*))?$/);if(!t)return{name:e,args:[]};let n=t[1],r=t[2];if(!r)return{name:n,args:[]};let i=[],a=/["']([^"']*?)["']/g,o;for(;(o=a.exec(r))!==null;)i.push(o[1]);return{name:n,args:i}}function*templateBlocks(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return;let r=e.indexOf(`}`,n+2);if(r<0)return;if(e[r+1]!==`}`){t=r+1;continue}t=r+2;let i=e.slice(n+2,r);i.length>0&&(yield{start:n,end:t,expr:i})}}function resolveLabelBlock(e,t){let n=e.split(`||`).map(e=>e.trim()),r=n[n.length-1].split(`|`).map(e=>e.trim());n[n.length-1]=r[0];let i=r.slice(1).filter(Boolean),a=n.filter(Boolean),o=``;for(let e of a){let n=toText(getValue(t,e));if(n!==``){o=n;break}}return applyPipes(o,i)}function renderLabelExpression(e,t,n=i_){let r=[],i=0;for(let n of templateBlocks(e))r.push(e.slice(i,n.start),resolveLabelBlock(n.expr,t)),i=n.end;return r.push(e.slice(i)),r.join(``).trim()||n}function toText(e){if(e==null||typeof e==`function`)return``;if(typeof e!=`object`)return String(e);if(Array.isArray(e))return e.map(toText).filter(Boolean).join(`,`);let t=e.toString;return typeof t==`function`&&t!==Object.prototype.toString?String(e):``}function isLabelExpression(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return!1;let r=e.indexOf(`}}`,n+2);if(r<0)return!1;if(e.slice(n+2,r).trim().length>0)return!0;t=r+2}return!1}function extractAttributePaths(e){let t=[];for(let n of templateBlocks(e)){let e=n.expr.trim();if(!e)continue;let r=e.split(`||`).map(e=>e.trim()),i=r[r.length-1];r[r.length-1]=i.split(`|`)[0].trim();for(let e of r)e&&!t.includes(e)&&t.push(e)}return t}function extractAttributeNames(e){let t=extractAttributePaths(e).map(e=>e.split(`.`)[0]).filter(e=>e.length>0);return[...new Set(t)]}const a_=/^\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}$/;function getSingleAttributeFromExpression(e){let t=e.trim().match(a_);return t?t[1]:null}function getEditableLabelAttribute(e,t){let n=getSingleAttributeFromExpression(e);if(n===null)return null;let r=t.find(e=>e.name===n);return!r||r.type!==`text`||pn(r).authoring.readOnly?null:r}const o_=`memory`,s_=4e3,c_=`workspace`,U={name:`name`,description:`description`,content:`content`,profileOf:`profileOf`,profileActor:`profileActor`,subjects:`subjects`,subjectId:`subjectId`};function textValue(e){return typeof e==`string`?e:``}function memoryPageViewOf(e){let{values:t}=e;return{id:e.id,name:textValue(t[U.name]),description:textValue(t[U.description]),content:textValue(t[U.content]),visibility:e.visibility,ownedBy:e.ownedBy,updatedAt:new Date(e.updatedAt).toISOString()}}const l_={meetingHour:`0.80`,computeVcpuHour:`0.20`,browserHour:`0.60`},u_=[`meeting.recording`,`sandbox.agent`,`sandbox.harness`,`sandbox.build`,`browser.session`];function isMeteredChargeKind(e){return u_.includes(e)}const d_=/^\d+(?:\.\d+)?$/u;function meteredUsd(e,t){if(!d_.test(e))throw new L(`Invalid metered rate "${e}"`,[]);if(!(t>=0&&t<=2**53-1))throw new L(`Invalid metered duration "${t}"`,[]);let[n=`0`,r=``]=e.split(`.`),i=BigInt(n+r)*BigInt(t.toFixed(12).replace(`.`,``)),a=10n**BigInt(r.length+12-4),o=(i+a-1n)/a,s=10n**BigInt(4),c=(o%s).toString().padStart(4,`0`).replace(/0+$/u,``);return c?`${o/s}.${c}`:`${o/s}`}const f_=`@standards/schema`;function createStandardSchemaProps(e){return{version:1,vendor:f_,validate:t=>{let n=e.safeParse(t);return n.success?{value:n.data}:{issues:n.error.issues.map(e=>({message:e.message,path:e.path}))}}}}function isStandardSchema(e){return typeof e==`object`&&!!e&&`~standard`in e&&typeof e[`~standard`]==`object`&&e[`~standard`].version===1}function asMutableArray(e){return e}var BaseAttributeBuilder=class{get"~standard"(){return createStandardSchemaProps(Ur(this.build()))}constructor(e,t,n){Dr(t),Ar(n),this.attr={name:t,label:n,type:e,required:!1,system:!0}}asPhantomState(){return this}required(){return this.attr.required=!0,this.asPhantomState()}optional(){return this.attr.required=!1,this.asPhantomState()}runtime(){return this.attr.system=!1,this}hidden(){return this.attr.hidden=!0,this}placeholder(e){return this.attr.placeholder=e,this}description(e){return this.attr.description=e,this}icon(e){return kr(e,`attribute "${this.attr.name}"`),this.attr.icon=e,this}order(e){return this.attr.order=e,this}defaultValue(e){return(`defaultValue`in this.attr||!O(String(this.attr.type),`computed`))&&(this.attr.defaultValue=e),this}metadata(e){return this.attr.metadata=e,this}build(){return this.attr}},TextAttributeBuilder=class extends BaseAttributeBuilder{minLength(e){return this.attr.minLength=e,this}maxLength(e){return this.attr.maxLength=e,this}pattern(e){return this.attr.pattern=e,this.attr.format=void 0,this}multiline(e=!0){return this.attr.multiline=e,this}email(){return this.attr.format=`email`,this.attr.pattern=void 0,this}url(){return this.attr.format=`url`,this.attr.pattern=void 0,this}slug(){return this.attr.format=`slug`,this.attr.pattern=void 0,this}};function text(e,t){return new TextAttributeBuilder(`text`,e,t)}var RichtextAttributeBuilder=class extends BaseAttributeBuilder{};function richtext(e,t){return new RichtextAttributeBuilder(`richtext`,e,t)}var NumberAttributeBuilder=class extends BaseAttributeBuilder{min(e){return this.attr.min=e,this}max(e){return this.attr.max=e,this}integer(){return this.attr.unit=`integer`,this.attr.decimals=0,this}decimal(e=2){return this.attr.unit=`decimal`,this.attr.decimals=e,this}percentage(){return this.attr.unit=`percentage`,this}renderAs(e){return this.attr.renderAs=e,this}};function number(e,t){return new NumberAttributeBuilder(`number`,e,t)}var CheckboxAttributeBuilder=class extends BaseAttributeBuilder{};function checkbox(e,t){return new CheckboxAttributeBuilder(`checkbox`,e,t)}var DateAttributeBuilder=class extends BaseAttributeBuilder{format(e){return this.attr.dateFormat=e,this}precision(e){return this.attr.precision=e,this}build(){let[e]=Kr(`date`,this.attr);if(e!==void 0)throw new L(e.message,[{path:[`precision`],message:e.message}]);return super.build()}minDate(e){return this.attr.minDate=e,this}maxDate(e){return this.attr.maxDate=e,this}endDate(){return this.attr.endDate=!0,this.asPhantomState()}includeTime(){return this.attr.includeTime=!0,this}timeFormat(e){return this.attr.timeFormat=e,this}};function date(e,t){return new DateAttributeBuilder(`date`,e,t)}var PhoneAttributeBuilder=class extends BaseAttributeBuilder{defaultCountry(e){return this.attr.defaultCountryCode=e,this}};function phone(e,t){return new PhoneAttributeBuilder(`phone`,e,t)}var CurrencyAttributeBuilder=class extends BaseAttributeBuilder{defaultCurrency(e){return this.attr.defaultCurrency=e,this}allowedCurrencies(e){return this.attr.allowedCurrencies=e,this}allowNegative(e=!0){return this.attr.allowNegative=e,this}};function currency(e,t){return new CurrencyAttributeBuilder(`currency`,e,t)}function setOptions(e,t){let n=asMutableArray(t);Mr(e.name??`unknown`,n),e.options=n}function addOption(e,t){e.options||=[],Mr(e.name??`unknown`,[...e.options,t]),e.options.push(t)}var StatusAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}};function status(e,t){return new StatusAttributeBuilder(`status`,e,t)}var SelectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function select(e,t){return new SelectAttributeBuilder(`select`,e,t)}var MultiselectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function multiselect(e,t){return new MultiselectAttributeBuilder(`multiselect`,e,t)}var LocationAttributeBuilder=class extends BaseAttributeBuilder{granularity(e){return this.attr.granularity=e,this}defaultCountry(e){return this.attr.defaultCountry=e,this}allowedCountries(e){return this.attr.allowedCountries=e,this}};function location(e,t){return new LocationAttributeBuilder(`location`,e,t)}var UserAttributeBuilder=class extends BaseAttributeBuilder{constructor(e,t){super(`user`,e,t),this.attr.types=[`user`,`agent`]}types(e){let t=[...new Set(e)];if(t.length===0)throw Error(`[AttributeBuilder] user.types must contain at least one type.`);return this.attr.types=t,this}multiple(){return this.attr.multiple=!0,this}notifiesOnAssign(){return this.attr.notifiesOnAssign=!0,this}actors(){return this.attr.actors=!0,this}};function user(e,t){return new UserAttributeBuilder(e,t)}var BaseRelationAttributeBuilder=class extends BaseAttributeBuilder{to(e,t){let n={object:e,...t};return this.attr.targets?.push(n),this}toAny(){return this.attr.targets=[{object:`*`}],this}qualifyWith(...e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.qualifyWith() must be called AFTER .to(). Example: relation("companies", "Companies").to("companies").qualifyWith(...)`);return this.attr.properties=buildPropertySchema(e),this}bilateral(e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.bilateral() must be called AFTER .to(). Example: relation("company", "Company").to("companies").bilateral({ ... })`);if(t.length>1)throw Error(`Bilateral relations are not supported for polymorphic relations (multiple .to() targets).`);if(Jn(this.attr))throw Error(`Bilateral relations are not supported for universal relations (.toAny()).`);let n=t[0]?.object;if(!n)throw new L(`Bilateral relation requires one target object`,[{path:[`bilateral`,`object`],message:`Bilateral relation requires one target object`}]);if(e.object&&e.object!==n){let t=`Bilateral inverse object ${e.object} must match relation target ${n}`;throw new L(t,[{path:[`bilateral`,`object`],message:t}])}return this.attr.bilateral={...e,object:n},this}},SingleRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t){super(`relation`,e,t),this.attr.cardinality=`one`,this.attr.targets=[]}many(){let e=new MultiRelationAttributeBuilder(this.attr.name,this.attr.label??``,{targets:this.attr.targets,isRequired:this.attr.required});return this.attr.system===!1&&e.runtime(),this.attr.hidden&&e.hidden(),this.attr.placeholder&&e.placeholder(this.attr.placeholder),this.attr.description&&e.description(this.attr.description),this.attr.icon&&e.icon(this.attr.icon),this.attr.order!==void 0&&e.order(this.attr.order),this.attr.metadata&&e.metadata(this.attr.metadata),e}},MultiRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t,n){super(`relation`,e,t),this.attr.cardinality=`many`,this.attr.targets=n?.targets??[],this.attr.defaultValue=[],n?.isRequired&&(this.attr.required=!0)}maxItems(e){return this.attr.maxItems=e,this}};function relation(e,t){return new SingleRelationAttributeBuilder(e,t)}var FormulaAttributeBuilder=class extends BaseAttributeBuilder{expression(e){return this.attr.expression=e,this}returns(e){return this.attr.returnType=e,this}decimals(e){return this.attr.decimals=e,this}currency(e){return this.attr.currencyCode=e,this}required(){throw Error(`Formula attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function formula(e,t){return new FormulaAttributeBuilder(`formula`,e,t)}var RollupAttributeBuilder=class extends BaseAttributeBuilder{from(e){return this.attr.relationAttribute=e,this}aggregate(e){return this.attr.targetAttribute=e,this}using(e){return this.attr.function=e,this}decimals(e){return this.attr.decimals=e,this}path(e){return this.attr.relationPath=e,this}targetType(e){return this.attr.targetAttributeType=e,this}targetOptions(e){return this.attr.targetAttributeOptions=asMutableArray(e),this}targetCurrency(e){return this.attr.targetCurrencyCode=e,this}build(){let e=this.attr.function,t=this.attr.targetAttributeType;if(e===`original`&&t!==void 0&&t!==`select`&&t!==`status`&&t!==`multiselect`){let e=this.attr.relationAttribute??`relation`,n=this.attr.targetAttribute??`field`;throw new F(`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${t}") was given. To surface a plain ${t} value from a related record, use a formula instead — e.g. formula("${this.attr.name}", "…").expression("${e}.${n}").`,I.VALIDATION_FAILED)}return super.build()}required(){throw Error(`Rollup attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function rollup(e,t){return new RollupAttributeBuilder(`rollup`,e,t)}var DocumentAttributeBuilder=class extends BaseAttributeBuilder{accepts(e){return this.attr.accepts=e,this}maxFileSize(e){return this.attr.maxFileSize=e,this}qualifyWith(...e){return this.attr.properties=buildPropertySchema(e),this}};function document(e,t){return new DocumentAttributeBuilder(`document`,e,t)}const W={owner:`standardshq`,repo:`skills`,ref:`stable`},G=`[A-Za-z0-9._-]+`,p_=`[A-Za-z0-9_-]+`,m_=RegExp(`^(${p_})/(${G})@([a-z0-9-]+)(?:#(${G}))?$`),h_=RegExp(`^(${p_})/(${G})$`),g_=/^[0-9a-f]{40}$/i;function isSafeSegment(e){return e!==`.`&&!e.startsWith(`-`)&&!e.includes(`..`)}function refuse$1(e,t){throw new L(`Invalid skill source "${e}": ${t} (expected owner/repo@skill or owner/repo@skill#ref)`,[{path:[`source`],message:t}])}function canonicalRef(e){return g_.test(e)?e.toLowerCase():e}function parseSkillSource(e){let t=e.trim(),n=t.startsWith(`github.com/`)?t.slice(11):t,r=m_.exec(n);if(!r)return refuse$1(e,`malformed or not a github.com source`);let[,i,a,o,s]=r;return[i,a,s??``].every(isSafeSegment)?{host:`github.com`,owner:i,repo:a,skill:o,ref:s===void 0?null:canonicalRef(s)}:refuse$1(e,"a segment cannot start with `-`, hold `..` or be `.`")}function isSkillRepository(e){return h_.exec(e)?.slice(1).every(isSafeSegment)??!1}function formatSkillSource(e){let t=`${e.owner}/${e.repo}@${e.skill}`;return e.ref===null?t:`${t}#${e.ref}`}function isPinnedSkillSource(e){return e.ref!==null&&g_.test(e.ref)}const K=/^[a-z0-9][a-z0-9-]{0,62}$/,q=`core`;function assertBundleName(e){if(!K.test(e))throw new L(`Invalid bundle name "${e}": expected a lowercase slug matching ${K}`,[]);if(e===`core`)throw new L(`Bundle name "${q}" is reserved`,[])}async function sha256Hex(e){let t=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e));return Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,`0`)).join(``)}function nameSlug(e,t){return e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).slice(0,t).replace(/^_+|_+$/g,``)}function cloneBuilderValue(e,t){try{return structuredClone(e)}catch{let e=`Builder configuration must contain cloneable data`;throw new L(e,[{path:t,message:e}])}}function requireBuilderName(e,t){if(typeof e!=`string`||e.trim().length===0)throw new L(`Name must not be blank`,[{path:t,message:`Name must not be blank`}])}function validateContentConfiguration(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw new L(`Invalid content configuration`,[{path:t,message:`Expected content configuration`}]);for(let n of[`name`,`label`,`placement`])if(Object.hasOwn(e,n)){let e=`Independent content configuration cannot define ${n}`;throw new L(e,[{path:[...t,n],message:e}])}let n=j.safeParse({...e,name:`content`,placement:e.type===`group`?`grid`:`main`});if(!n.success)throw L.fromZodErrors(n.error.issues.map(e=>({path:[...t,...e.path.map(String)],message:e.message})));n.data.type===`form`&&n.data.groups.forEach((e,n)=>requireBuilderName(e.name,[...t,`groups`,String(n),`name`]));let{name:r,label:i,placement:a,...o}=n.data;return cloneBuilderValue(o,t)}function validateLiteralContent(e,t){return validateContentConfiguration(e,t),cloneBuilderValue(e,t)}function positionOf(e){return{x:e.x,y:e.y,w:e.w,h:e.h}}function bottomOf(e){return e.y+e.h}function collides(e,t){return e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h}function firstCollision(e,t){return t.find(t=>collides(e,t))}function inReadingOrder$1(e){return[...e].sort((e,t)=>e.y-t.y||e.x-t.x)}function snapWidth(e,t,n){let r=12-t,i=g.filter(e=>e>=n&&e<=r);return i.length===0?g.find(e=>e>=n)??n:i.reduce((t,n)=>{let r=Math.abs(n-e),i=Math.abs(t-e);return r<i||r===i&&n>t?n:t})}function sharesColumns(e,t){return e.x<t.x+t.w&&t.x<e.x+e.w}function risenRow(e,t){return t.reduce((t,n)=>n.y<e.y&&sharesColumns(e,n)?Math.max(t,bottomOf(n)):t,0)}function packLayout(e,t){let n=e.map(e=>{let n=t?.get(e.i);return n===void 0?e:{...e,h:n}}),r=n.filter(e=>e.static===!0),i=new Map(r.map(e=>[e.i,e]));for(let e of inReadingOrder$1(n.filter(e=>e.static!==!0))){let t=risenRow(e,r),n=firstCollision({...e,y:t},r);for(;n!==void 0;)t=bottomOf(n),n=firstCollision({...e,y:t},r);let a={...e,y:t};r.push(a),i.set(e.i,a)}return n.map(e=>i.get(e.i)??e)}function settleLayout(e,t){let n=e.filter(e=>e.static===!0),r=e.filter(e=>e.static!==!0),i=/* @__PURE__ */ new Map;for(let e of[...inReadingOrder$1(r.filter(e=>t.has(e.i))),...inReadingOrder$1(r.filter(e=>!t.has(e.i)))]){let t=e,r=firstCollision(t,n);for(;r!==void 0;)t={...t,y:bottomOf(r)},r=firstCollision(t,n);n.push(t),i.set(e.i,t)}return packLayout(e.map(e=>i.get(e.i)??e))}function pageCompactor(){return{type:`vertical`,allowOverlap:!1,preventCollision:!1,compact:e=>packLayout(e).map(e=>({...e,moved:!1}))}}function clampHeight(e,t){let n=t.minHeight??1,r=t.maxHeight??1/0;return Math.max(1,n,Math.min(r,e))}function widthStepConstraint(e){return{name:`width-steps`,constrainSize:(t,n,r)=>{let i=e(t.i),a=snapWidth(n,t.x,i.minWidth);return i.height===`fit`?{w:a,h:t.h}:i.height===`flexible`?{w:a,h:clampHeight(r,i)}:{w:a,h:Math.max(1,r)}}}}function snapCell(e,t){let n=Math.max(0,Math.min(e.x,11)),r=snapWidth(e.w,n,t(e.i).minWidth);return{...e,x:Math.min(n,12-r),y:Math.max(0,e.y),w:r,h:Math.max(1,e.h)}}function samePosition(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function pushApart(e){let t=e.filter(e=>e.static===!0),n=/* @__PURE__ */ new Map;for(let r of inReadingOrder$1(e.filter(e=>e.static!==!0))){let e=r,i=firstCollision(e,t);for(;i!==void 0;){let n={...e,x:i.x+i.w};e=n.x+n.w<=12&&firstCollision(n,t)===void 0?n:{...e,y:bottomOf(i)},i=firstCollision(e,t)}t.push(e),n.set(r.i,e)}return e.map(e=>n.get(e.i)??e)}function isValidStatic(e){return[e.x,e.y,e.w,e.h].every(Number.isInteger)&&e.x>=0&&e.y>=0&&e.h>=1&&g.includes(e.w)&&e.x+e.w<=12}function keptStatics(e){let t=[],n=/* @__PURE__ */ new Set;for(let r of inReadingOrder$1(e.filter(e=>e.static===!0)))isValidStatic(r)&&firstCollision(r,t)===void 0?t.push(r):n.add(r.i);return e.map(e=>n.has(e.i)?{...e,static:!1}:e)}function boundedHeight(e,t){let n=t(e.i);if(e.static===!0||n.height!==`flexible`)return e;let r=clampHeight(e.h,n);return r===e.h?e:{...e,h:r}}function repairPageGrid(e,t){let n=[],r=keptStatics(e).map(e=>{let r=boundedHeight(e,t);return r!==e&&n.push({name:e.i,kind:`height`,from:positionOf(e),to:positionOf(r)}),r}).map(e=>{if(e.static===!0)return e;let r=snapCell(e,t);return samePosition(e,r)||n.push({name:e.i,kind:`width`,from:positionOf(e),to:positionOf(r)}),r}),i=pushApart(r);i.forEach((e,t)=>{let i=r[t];i!==void 0&&!samePosition(i,e)&&n.push({name:e.i,kind:`pushed`,from:positionOf(i),to:positionOf(e)})});let a=packLayout(i),o=keptFill(a,t);for(let e of inReadingOrder$1(a))e.i!==o&&t(e.i).height===`fill`&&n.push({name:e.i,kind:`fill`});return{cells:a,repairs:n}}function keptFill(e,t){return inReadingOrder$1(e).find(e=>e.static!==!0&&t(e.i).height===`fill`)?.i}function firstFreeSlot(e,t,n){let r=t.reduce((e,t)=>Math.max(e,bottomOf(t)),0);for(let i=n;i<=r;i+=1)for(let n=0;n+e.w<=6;n+=1)if(firstCollision({x:n,y:i,...e},t)===void 0)return{x:n,y:i};return{x:0,y:r}}function deriveLayout6(e,t){let n=[];for(let r of inReadingOrder$1(e)){let e=Math.min(6,Math.max(t(r.i).minWidth,Math.ceil(r.w/2))),i=n.at(-1)?.y??0;n.push({i:r.i,...firstFreeSlot({w:e,h:r.h},n,i),w:e,h:r.h})}return n}function figureSlot(e,t,n){for(let r of inReadingOrder$1(e.filter(e=>n.has(e.i)))){let n={x:r.x+r.w,y:r.y,...t};if(n.x+n.w<=12&&firstCollision(n,e)===void 0)return n}}function placeNew(e,t,n,r){let i={w:snapWidth(n.size.w,0,n.minWidth),h:Math.max(1,n.size.h)};return n.figure?{i:t,...figureSlot(e,i,r)??{x:0,y:0,...i}}:{i:t,x:0,y:e.reduce((e,t)=>Math.max(e,bottomOf(t)),0),...i}}function spanContent(e,t){if(!g.includes(t)){let e=`A block spans ${g.join(`, `)} columns, not ${String(t)}`;throw new L(e,[{path:[`content`,`span`],message:e}])}return{content:e,span:t}}function configureContent(e,t){try{return typeof e==`object`&&e&&`build`in e&&typeof e.build==`function`?{configuration:validateContentConfiguration(e.build(),t),extension:e.extension}:{configuration:validateContentConfiguration(e,t)}}catch(e){throw e instanceof L?new L(e.message,e.errors.map(e=>({...e,path:e.path[0]===`content`?[...t,...e.path.slice(1)]:e.path}))):e}}function storedQuery(e,t){let n=[`search`,`offset`].filter(t=>e.state[t]!==void 0);if(n.length>0)throw new L(`A ${t} cannot keep a query's ${n.join(` or `)}`,n.map(e=>({path:[t,e],message:`A ${t} stores no ${e}; use filters and limit instead`})));return e.toDefinition()}function checkInputs(e,t){for(let[n,r]of Object.entries(t)){let t=e.inputs[n];r!==void 0&&t!==void 0&&A({parameters:t.schema},r,[`content`,`parameters`,n])}return t}var BlockContentBuilder=class{constructor(e,t,n){this.extension=e,this.parameters=t,this.heightMode=n}copy(e,t){let n=this.constructor;return new n(this.extension,e,t)}with(e){let t={...this.parameters};for(let[n,r]of Object.entries(e))r===void 0?delete t[n]:t[n]=r;return checkInputs(this.extension,e),this.copy(t,this.heightMode)}height(e){return this.copy(this.parameters,e)}build(){let e={type:`custom`,extension:this.extension.name,parameters:cloneBuilderValue(this.parameters,[`content`,`parameters`]),...this.heightMode===void 0?{}:{height:this.heightMode}};return validateContentConfiguration(e,[`content`]),A(this.extension,e.parameters,[`content`,`parameters`]),e}span(e){return spanContent(this,e)}},Measures=class{count(){return this.measured(`count`)}sum(e){return this.measured(`sum`,e)}avg(e){return this.measured(`avg`,e)}min(e){return this.measured(`min`,e)}max(e){return this.measured(`max`,e)}};function measure(e,t,n){return{query:e,measure:t,...n===void 0?{}:{attribute:n}}}var MetricBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}trend(e,t){return this.with({trend:e,trendBucket:t})}compare(e,t){return this.with({compare:e,period:t})}target(e){return this.with({target:e})}},MetricQuery=class extends Measures{constructor(e){super(),this.query=e}measured(e,t){return new MetricBuilder(b,checkInputs(b,measure(this.query,e,t)))}};function groupBy(e){return typeof e==`string`?[e,void 0]:[e.attribute,e.bucket]}var ChartBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}by(e){let[t,n]=groupBy(e);return this.with({by:t,byBucket:n})}by2(e){let[t,n]=groupBy(e);return this.with({by2:t,by2Bucket:n})}kind(e){return this.with({kind:e})}bar(){return this.kind(`bar`)}horizontalBar(){return this.kind(`horizontal_bar`)}line(){return this.kind(`line`)}area(){return this.kind(`area`)}donut(){return this.kind(`donut`)}funnel(){return this.kind(`funnel`)}treemap(){return this.kind(`treemap`)}calendar(){return this.kind(`calendar`)}order(e){return this.with({order:e})}},ChartQuery=class extends Measures{constructor(e){super(),this.query=e}measured(e,t){return new ChartBuilder(v,checkInputs(v,{...measure(this.query,e,t),kind:`bar`}))}};const __={"7d":7,"30d":30};var AgendaBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}next(e){let t=typeof e==`number`?e:__[e];if(!Number.isInteger(t)||t<1){let e=`An agenda looks ahead a whole number of days, at least 1`;throw new L(e,[{path:[`content`,`parameters`,`next`],message:e}])}return this.with({next:t})}yearly(){return this.with({yearly:!0})}},CardBuilder=class extends BlockContentBuilder{fields(...e){return this.with({fields:e})}record(e){return this.with({record:e})}},DecisionsBuilder=class extends BlockContentBuilder{kinds(...e){return this.with({kinds:e})}limit(e){return this.with({limit:e})}},MeetingsUpcomingBuilder=class extends BlockContentBuilder{limit(e){return this.with({limit:e})}},MailboxBuilder=class extends BlockContentBuilder{category(e){return this.with({category:e})}important(){return this.with({important:!0})}unread(){return this.with({unread:!0})}limit(e){return this.with({limit:e})}label(e){return this.with({label:e})}};function metric(e){return new MetricQuery(storedQuery(e,`metric`))}function chart(e){return new ChartQuery(storedQuery(e,`chart`))}function agenda(e,t){return new AgendaBuilder(d,checkInputs(d,{query:storedQuery(e,`agenda`),attribute:t}))}function card(e){let t=e===void 0||typeof e==`string`?e:e.build().name;return new CardBuilder(_,t===void 0?{}:checkInputs(_,{object:t}))}function text$1(e){return new BlockContentBuilder(C,checkInputs(C,{markdown:e}))}function decisions(){return new DecisionsBuilder(ce,{})}function meetingsUpcoming(){return new MeetingsUpcomingBuilder(qe,{})}function mailbox(){return new MailboxBuilder(We,{})}function isSpanned(e){return typeof e==`object`&&!!e&&`span`in e&&`content`in e}function total(e){return e.reduce((e,t)=>e+t,0)}function spread(e){return e.length===0?0:Math.max(...e)-Math.min(...e)}function betterSplit(e,t){let n=total(e)-total(t);if(n!==0)return n>0;let r=spread(t)-spread(e);if(r!==0)return r>0;let i=e.findIndex((e,n)=>e!==t[n]);return i!==-1&&(e[i]??0)>(t[i]??0)}function splitColumns(e,t){let n=[...t];function visit(r,i){let a=t[r.length];if(a===void 0)betterSplit(r,n)&&(n=r);else for(let t of g)t>=a&&i+t<=e&&visit([...r,t],i+t)}return visit([],0),n}function rowWidths(e,t){let n=e.filter(e=>e.span===void 0);n.length>4&&reject(t,`A row holds at most 4 unsized blocks`);let r=total(e.map(e=>e.span??e.minWidth));r>12&&reject(t,`Blocks ${e.map(e=>`"${e.key}"`).join(`, `)} do not fit one row: they need at least ${r} of 12 columns`);let i=splitColumns(12-total(e.map(e=>e.span??0)),n.map(e=>e.minWidth)),a=0;return e.map(e=>{if(e.span!==void 0)return e.span;let t=i[a]??e.minWidth;return a+=1,t})}function reject(e,t){throw new L(t,[{path:e,message:t}])}function traitsOf(e,t=[]){return Yn(e,w,new Map(t.map(e=>[e.name,e])))}function headingNames(e){let t=new Set(e.flatMap(e=>e.kind===`heading`?e.meta.name===void 0?[]:[e.meta.name]:[...Object.keys(e.blocks),...e.group?.name===void 0?[]:[e.group.name]]));return e.flatMap(e=>{if(e.kind!==`heading`)return[];if(e.meta.name!==void 0)return[e.meta.name];let n=nameSlug(e.title,40),r=n===``?`heading`:`heading_${n}`,i=r;for(let e=2;t.has(i);e+=1)i=`${r}_${e}`;return t.add(i),[i]})}function headingEntry(e,t,n){let r={title:t,...n.description===void 0?{}:{description:n.description},...n.icon===void 0?{}:{icon:n.icon}};return{key:e,content:new BlockContentBuilder(Le,r),span:12}}function groupOf(e,t,n){let[r]=e.map(e=>e.name).sort(),i=Sn(e.length);return(i!==void 0||r===void 0)&&reject(n,String(i)),{type:`group`,name:t.name??`group_${r}`,placement:`grid`,...t.label===void 0?{}:{label:t.label},members:e.map(e=>e.name)}}function requirePlacement(e,t,n,r,i){if(e.type===`page`&&reject(i,`Content "${n}" cannot reference a page from a page`),fr(e,t,n,r,i),e.type!==`custom`)return;let a=t?.refine?.(e.parameters??{},r);a&&reject([...i,`parameters`,a.input],a.message)}var J=class PageBuilder{constructor(e){this.kind=`view`,this.data=e}icon(e){return new PageBuilder({...this.data,icon:e})}description(e){return new PageBuilder({...this.data,description:e})}home(){return new PageBuilder({...this.data,home:!0})}for(e){let t=typeof e==`string`?e:e.build().name;return new PageBuilder({...this.data,object:t})}row(e,t={}){let n=t.group===void 0?{kind:`row`,blocks:e}:{kind:`row`,blocks:e,group:t.group};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}heading(e,t={}){let n={kind:`heading`,title:e,meta:t};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}build(){let e=[`views`,`0`],{name:t,label:n,object:r,icon:i,description:a,home:o,sections:s}=this.data;requireBuilderName(t,[...e,`name`]),r!==void 0&&requireBuilderName(r,[...e,`object`]),o&&r!==void 0&&reject([...e,`home`],`Only a standalone page can be the home`),s.every(e=>e.kind===`row`&&Object.keys(e.blocks).length===0)&&reject([...e,`contents`],`A page declares at least one block`);let c=r===void 0?`page`:`record`,l=[],u=[],d=headingNames(s),f=0;for(let t of s){let n=[...e,`contents`,String(l.length)],r=(t.kind===`heading`?[headingEntry(d[f++]??``,t.title,t.meta)]:Object.entries(t.blocks).map(([e,t])=>isSpanned(t)?{key:e,content:t.content,span:t.span}:{key:e,content:t,span:void 0})).map(t=>{let n=[...e,`contents`,String(l.length)];requireBuilderName(t.key,[...n,`name`]);let{configuration:r,extension:i}=configureContent(t.content,n);requirePlacement(r,i,t.key,c,n);let a={...r,name:t.key,placement:`grid`};return l.push(a),{content:a,span:t.span}}),i=rowWidths(r.map(({content:e,span:t})=>({key:e.name,...t===void 0?{}:{span:t},minWidth:traitsOf(e).minWidth})),n),a=u.reduce((e,t)=>Math.max(e,t.y+t.h),0);if(t.kind===`row`&&t.group!==void 0){let e=groupOf(r.map(({content:e})=>e),t.group,n);l.push(e),u.push({i:e.name,x:0,y:a,w:12,h:traitsOf(e,l).size.h});continue}let o=0;r.forEach(({content:e},t)=>{let n=i[t]??0;u.push({i:e.name,x:o,y:a,w:n,h:traitsOf(e).size.h}),o+=n})}let p=Object.fromEntries(packLayout(u).map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),m={name:t,label:n,...r===void 0?{}:{object:r},context:`page`,...i===void 0?{}:{icon:i},...a===void 0?{}:{description:a},...o?{home:!0}:{},contents:l,grid:p},h=T.safeParse(m);if(!h.success)throw L.fromZodErrors(h.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return{kind:`view`,definition:cloneBuilderValue(m,e)}}};function page(e,t){return new J({name:e,label:t,object:void 0,sections:[]})}var Y=class ViewBuilder{constructor(e,t=[]){this.kind=`view`,this.data=cloneBuilderValue(e,[`views`,`0`]),this.extensions=t.map(e=>e&&{...e})}for(e){let t=typeof e==`string`?e:e.build().name;return new ViewBuilder({...this.data,object:t},this.extensions)}default(){return new ViewBuilder({...this.data,default:!0},this.extensions)}description(e){return new ViewBuilder({...this.data,description:e},this.extensions)}icon(e){return new ViewBuilder({...this.data,icon:e},this.extensions)}place(e,t,n,r,i){let{configuration:a,extension:o}=configureContent(n,[`views`,`0`,`contents`,String(this.data.contents.length)]),s={...a,name:e,label:t,placement:r},c=[...this.data.contents,s],l=i===void 0?{}:{anchors:{...this.data.anchors,[e]:{after:i}}};return new ViewBuilder({...this.data,...l,contents:c},[...this.extensions,o])}tab(e,t,n,r){return this.place(e,t,n,`main`,r?.after)}aside(e,t,n){return this.place(e,t,n,`aside`)}build(){let e=[`views`,`0`];requireBuilderName(this.data.name,[...e,`name`]),requireBuilderName(this.data.object,[...e,`object`]);let t=T.safeParse(this.data);if(!t.success)throw L.fromZodErrors(t.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return this.data.contents.forEach((t,n)=>{let r=[...e,`contents`,String(n)];requireBuilderName(t.name,[...r,`name`]),t.type===`form`&&t.groups.forEach((e,t)=>requireBuilderName(e.name,[...r,`groups`,String(t),`name`])),fr(t,this.extensions[n],t.name,this.data.context,r)}),{kind:`view`,definition:cloneBuilderValue(this.data,e)}}};function detailView(e,t){return new Y({name:e,label:t,object:void 0,context:`record`,contents:[]})}function listView(e,t){return new Y({name:e,label:t,object:void 0,context:`collection`,contents:[]})}function isViewPiece(e){return`kind`in e&&e.kind===`view`}function isObjectPiece(e){return!(isViewPiece(e)||e instanceof M)}function assertPiece(e,t){if(typeof e!=`object`||!e)throw new L(`Unsupported bundle piece: ${t}`,[]);if(isViewPiece(e)||e instanceof M||typeof e.build==`function`)return;let n=e.name;throw new L(`Unsupported bundle piece: ${typeof n==`string`?n:String(t)}`,[])}function declarationOf$1(e){return e instanceof J||e instanceof Y?e.build():e}function isPage(e){return e.definition.context===`page`}function validateView(e){let t=T.safeParse(e);if(t.success)return t.data;let n=typeof e==`object`&&e&&`name`in e?String(e.name):`(unnamed)`,r=L.fromZodErrors(t.error.issues.map(e=>({path:e.path.map(String),message:e.message})));throw new L(`View "${n}" is invalid. ${r.message}`,r.errors)}function identityOf(e){return`${e.object??``}:${e.name}`}function assertUniqueIdentities(e,t){let n=/* @__PURE__ */ new Set;for(let r of t){let t=identityOf(r);if(n.has(t))throw new N(e,r.name);n.add(t)}}function byIdentity(e){return(t,n)=>{let r=identityOf(e(t)),i=identityOf(e(n));return r<i?-1:+(r>i)}}async function hashBundlePieces(e){return sha256Hex(r({objects:[...e.objects].sort(byIdentity(e=>({name:e.name}))),views:[...e.views].sort(byIdentity(e=>e)),pages:[...e.pages].sort(byIdentity(e=>e.definition)),agents:[...e.agents].sort(byIdentity(e=>({name:e.name})))}))}const v_={title:120,context:200,prompt:pa};function assertSetupWithinLimits(e){let t=Object.keys(v_).flatMap(t=>{let n=v_[t],r=e[t];return r!==void 0&&r.length>n?[{path:[`setup`,t],message:`Setup ${t} must be at most ${n} characters`}]:[]});if(t.length>0)throw new L(`Bundle setup is invalid`,t)}function assertSetup(e,t){e&&assertSetupWithinLimits(e);for(let e of Object.values(t))assertSetupWithinLimits({title:e[`setup.title`],context:e[`setup.context`],prompt:e[`setup.prompt`]})}function assertSkills(e){let t=/* @__PURE__ */ new Set,n=e.flatMap(e=>{let n=skillProblem(e,t);return n===null?[]:[{path:[`skills`],message:n}]});if(n.length>0)throw new L(`Bundle skills are invalid`,n)}function skillProblem(e,t){let n;try{n=parseSkillSource(e)}catch(t){return t instanceof Error?t.message:`Invalid skill source "${e}"`}return n.owner!==W.owner||n.repo!==W.repo?`Skill "${e}" must come from ${W.owner}/${W.repo}`:n.ref===null?t.has(n.skill)?`Skill "${e}" is declared twice`:(t.add(n.skill),null):`Skill "${e}" cannot pin a ref`}async function builtBundleFromPieces(e){let t=e.name===q;t||assertBundleName(e.name);let{objects:n,pages:r,agents:i}=e,a=e.views.map(validateView),o=n.map(e=>e.name);if(assertUniqueIdentities(`object`,o.map(e=>({name:e}))),assertUniqueIdentities(`view`,a),assertUniqueIdentities(`page`,r.map(e=>e.definition)),assertUniqueIdentities(`agent`,i.map(e=>({name:e.name}))),!t){let e=o.find(D);if(e!==void 0)throw new P(e,`bundle`)}let{setup:s}=e,c=e.translations??{};assertSetup(s,c);let l=e.skills??[];return assertSkills(l),{name:e.name,label:e.label.trim(),description:e.description??null,hash:await hashBundlePieces({objects:n,views:a,pages:r,agents:i}),objects:n,views:a,pages:r,agents:i,uses:e.uses??[],samples:e.samples??[],...s?{setup:s}:{},...l.length>0?{skills:l}:{},translations:c}}const y_=Symbol.for(`standards.bundle`);function isBundle(e){return typeof e==`object`&&!!e&&e[y_]===!0}var BundleBuilder=class{constructor(e,t){this[y_]=!0,this.pieces=[],this.used=[],this.descriptionText=null,this.sampleRecords=[],this.skillSources=[],this.translationTables={},this.built=null,assertBundleName(e),this.name=e,this.label=t,this.objectBuilders=[]}description(e){return this.descriptionText=e,this.changed()}add(...e){return this.pieces.push(...e),this.objectBuilders.push(...e.filter(isObjectPiece)),this.changed(),this}uses(...e){return this.used.push(...e),this.changed()}samples(e){return this.sampleRecords=e,this.changed()}setup(e){return this.setupInvitation=e,this.changed()}skills(...e){return this.skillSources=[...this.skillSources,...e],this.changed()}translations(e,t){return this.translationTables[e]=t,this.changed()}build(){return this.built??=this.assemble(),this.built}changed(){return this.built=null,this}async assemble(){let e=[],t=[],n=[],r=[];for(let[i,a]of this.pieces.entries())if(assertPiece(a,i),a instanceof M)r.push(a.build());else if(isViewPiece(a)){let e=declarationOf$1(a);isPage(e)?n.push(e):t.push(e.definition)}else e.push(a.build());return this.assertNotInUsed(e),builtBundleFromPieces({name:this.name,label:this.label,description:this.descriptionText,objects:e,views:t,pages:n,agents:r,uses:this.used.map(e=>e.name),samples:this.sampleRecords,...this.setupInvitation?{setup:this.setupInvitation}:{},skills:this.skillSources,translations:{...this.translationTables}})}assertNotInUsed(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Set([this]),visit=e=>{if(!n.has(e)){n.add(e);for(let n of e.objectBuilders){let r=n.build().name;t.has(r)||t.set(r,e.name)}for(let t of e.used)visit(t)}};for(let e of this.used)visit(e);for(let{name:n}of e){let e=t.get(n);if(e!==void 0)throw new N(`object`,n,`Object "${n}" is declared by bundle "${this.name}" and by its used bundle "${e}"`)}}};function bundle(e,t){return new BundleBuilder(e,t)}function readOnlyOption(e){return e?.readOnly===void 0?{}:{readOnly:e.readOnly}}function buildFreeFieldRef(e,t){return{type:`free`,attribute:e.build(),label:t?.label,required:t?.required,prefillExpression:t?.prefillExpression,...readOnlyOption(t)}}function buildSlotFieldRef(e,t,n){let[r,...i]=Array.isArray(e)?e:[e];return{type:`slot`,slotId:r,additionalSlotIds:i.length>0?i:void 0,attribute:t,label:n?.label,required:n?.required,tooltip:n?.tooltip,...readOnlyOption(n)}}const b_=R.boolean().optional();var FormRowBuilder=class{constructor(e,t,n){this._finalized=!1,this.stepBuilder=e,this.rowData={id:t,order:n,type:`fields`,fields:[]}}field(e,t,n){return this.rowData.fields.push(buildSlotFieldRef(e,t,n)),this}freeField(e,t){return this.rowData.fields.push(buildFreeFieldRef(e,t)),this}row(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).row(e)}heading(e,t){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).heading(e,t)}separator(){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).separator()}text(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).text(e)}endRow(){return this._finalized?this.stepBuilder:(this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData))}},FormStepBuilder=class{constructor(e,t,n){this.rowOrder=0,this.formBuilder=e,this.stepData={id:t,label:n,rows:[]}}description(e){return this.stepData.description=e,this}field(e,t,n){this.rowOrder++;let r=`row-${this.stepData.id}-${this.rowOrder}`,i=buildSlotFieldRef(e,t,n),a={id:r,order:this.rowOrder,type:`fields`,fields:[i]};return this.stepData.rows.push(a),this}freeField(e,t){this.rowOrder++;let n=`row-${this.stepData.id}-${this.rowOrder}`,r=buildFreeFieldRef(e,t),i={id:n,order:this.rowOrder,type:`fields`,fields:[r]};return this.stepData.rows.push(i),this}row(e){return this.rowOrder++,new FormRowBuilder(this,e,this.rowOrder)}heading(e,t){this.rowOrder++;let n={id:`heading-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`heading`,content:e,level:t};return this.stepData.rows.push(n),this}separator(){this.rowOrder++;let e={id:`sep-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`separator`};return this.stepData.rows.push(e),this}text(e){this.rowOrder++;let t={id:`text-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`text`,content:e};return this.stepData.rows.push(t),this}step(e,t){return this.formBuilder._finalizeStep(this.stepData).step(e,t)}build(){return this.formBuilder._finalizeStep(this.stepData).build()}_finalizeRow(e){return e.fields.length>0&&this.stepData.rows.push(e),this}_getData(){return this.stepData}},FormBuilder=class{constructor(e,t){this.data={slots:[],steps:[],status:`draft`,version:1},this.validateName(e),this.data.name=e,this.data.label=t}description(e){return this.data.description=e,this}icon(e){return this.data.icon=e,this}status(e){return this.data.status=e,this}metadata(e){return this.data.metadata=e,this}slot(e,t,n){if(this.data.slots.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate slot id: "${e}"`);let r={id:e,objectName:t,label:n.label,mode:n.mode??`create`,color:n.color,icon:n.icon};return this.data.slots.push(r),this}step(e,t){if(this.data.steps.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate step id: "${e}"`);return new FormStepBuilder(this,e,t)}build(){return this.validateRequiredData(),this.validateSlotReferences(),this.validateFreeFields(),this.validatePrefillExpressions(),this.validateReadOnly(),this.data}_finalizeStep(e){return this.data.steps.push(e),this}validateName(e){let t=R.string().min(1,`Form name cannot be empty`).max(63,`Form name is too long (max 63 characters)`).regex(/^[a-z0-9]+(-[a-z0-9]+)*$/,{message:`Invalid form name format. Name must be in kebab-case: 'client-onboarding', 'contact-creation'`});try{t.parse(e)}catch(e){throw e instanceof R.ZodError?Error(`[FormBuilder] ${e.issues[0].message}`):e}}validateRequiredData(){if(this.data.slots.length===0)throw Error(`[FormBuilder] At least one slot is required. Use .slot() to add slots.`);if(this.data.steps.length===0)throw Error(`[FormBuilder] At least one step is required. Use .step() to add steps.`)}validateSlotReferences(){let e=new Map(this.data.slots.map(e=>[e.id,e.objectName]));for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(r.type!==`slot`)continue;let n=getSlotFieldTargets(r);for(let r of n)if(!e.has(r))throw Error(`[FormBuilder] Step "${t.id}" references unknown slot "${r}". Declare it with .slot("${r}", ...) first.`);let i=new Set(n.map(t=>e.get(t)));if(i.size>1)throw Error(`[FormBuilder] Step "${t.id}" field on attribute "${r.attribute}" targets slots of different objects (${[...i].join(`, `)}). A multi-slot field must target slots of the same object.`)}}validatePrefillExpressions(){let e=[...V,`join`,`where`];for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(!isFormFreeFieldRef(r)||!r.prefillExpression)continue;let n=r.prefillExpression,i=`prefillExpression on free field "${r.attribute.name}" in step "${t.id}"`;if(!isLabelExpression(n))throw Error(`[FormBuilder] ${i} must contain at least one {{ attribute }} interpolation.`);if(/\{\{\s*\}\}/.test(n))throw Error(`[FormBuilder] ${i} contains empty {{ }} interpolation.`);for(let a of n.matchAll(/(?<!\|)\|(?!\|)\s*(\w+)(?:\s*:[^|}]*)?/g)){let n=a[1];if(!e.includes(n))throw Error(`[FormBuilder] ${i} uses invalid pipe "${n}". Valid pipes: ${e.join(`, `)}`);let o=a[0].replace(/^\|/,``);if(isWherePipe(o)&&!parseWherePipe(o))throw new L(`[FormBuilder] ${i} has a malformed where: pipe "${o.trim()}". Write where:property=value or where:property in (a,b).`,[{path:[t.id,r.attribute.name,`prefillExpression`],message:`Malformed where: pipe`}])}}}validateReadOnly(){for(let e of this.data.steps)for(let t of e.rows)if(isFormFieldsRow(t))for(let n of t.fields){if(b_.safeParse(n.readOnly).success)continue;let t=isFormFreeFieldRef(n)?n.attribute.name:n.attribute,r=isFormFreeFieldRef(n)?`free field`:`field`;throw new L(`[FormBuilder] readOnly on ${r} "${t}" in step "${e.id}" must be a boolean.`,[{path:[e.id,t,`readOnly`],message:`Expected a boolean`}])}}validateFreeFields(){let e=new Set(z);for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n)){for(let r of n.fields)if(isFormFreeFieldRef(r)){let n=r.attribute.type;if(e.has(n))throw Error(`[FormBuilder] Free field in step "${t.id}" uses forbidden attribute type "${n}". Forbidden types: ${z.join(`, `)}`)}}}};function form(e,t){return new FormBuilder(e,t)}const x_=R.object({shape:R.enum(Yo),from:R.array(R.string().refine(e=>e.trim().length>0,`Must not be blank`)).optional()}).strict();function imageLookupKindOf(e){return e.type===`text`?e.format===`url`?`website`:e.format===`email`?`email`:`name`:null}function validateObjectImage(e){let t=e.image?.from;if(t===void 0)return;let refuse=(t,n)=>{throw new L(`Object "${e.name}": ${t}`,[{path:n===void 0?[`image`,`from`]:[`image`,`from`,String(n)],message:t}])};t.length===0&&refuse(`image.from must name at least one attribute`);let n=new Map((e.attributes??[]).map(e=>[e.name,e])),r=/* @__PURE__ */ new Set;for(let[e,i]of t.entries()){r.has(i)&&refuse(`image.from names "${i}" twice`,e),r.add(i);let t=n.get(i);t?imageLookupKindOf(t)===null&&refuse(`image.from names "${i}", a ${t.type} attribute: only text attributes can locate an image`,e):refuse(`image.from names "${i}", which is not one of its attributes`,e)}}function validateObjectExpressions(e){let{name:t,labelExpression:n,embeddingExpression:r}=e;if(!n)throw new F(`Object "${t}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,I.VALIDATION_FAILED);let i=H.safeParse(n);if(!i.success){let e=i.error.issues[0]?.message??`Invalid labelExpression`;throw new F(`Invalid labelExpression for "${t}": ${e}`,I.VALIDATION_FAILED)}if(r!==void 0){let e=H.safeParse(r);if(!e.success){let n=e.error.issues[0]?.message??`Invalid embeddingExpression`;throw new F(`Invalid embeddingExpression for "${t}": ${n}`,I.VALIDATION_FAILED)}}}var ObjectBuilder=class{get"~standard"(){return createStandardSchemaProps(Gr(this.build()))}constructor(e,t){this._sealed=!1,this._toleratedAttributes=[],this.validateName(e),this.obj={name:e,label:t,attributes:[],system:!0}}id(e){return this.obj.id=e,this}description(e){return this.obj.description=e,this}pluralLabel(e){return this._pluralLabel=e,this}icon(e){return this.obj.icon=e,this}color(e){return this.obj.color=e,this}image(e={}){return this.obj.image={shape:e.shape??`square`,...e.from===void 0?{}:{from:[...e.from]}},this}runtime(){return this.obj.system=!1,this}sealed(){return this._sealed=!0,this}tolerate(e){return this._toleratedAttributes=[...this._toleratedAttributes,...e],this}attribute(e){return this.pushAttributes([e]),this}attributes(e){return this.pushAttributes(e),this}pushAttributes(e){let t=e.map(e=>`build`in e&&typeof e.build==`function`?e.build():e);_t([...this.obj.attributes,...t],e=>e.name,e=>new N(`attribute`,e,`Object "${this.obj.name}": duplicate attribute name "${e}"`)),this.obj.attributes.push(...t)}metadata(e){return this.obj.metadata={...this.obj.metadata,...e},this}order(e){return this.obj.metadata={...this.obj.metadata,order:e},this}hidden(){return this.obj.metadata={...this.obj.metadata,hidden:!0},this}labelExpression(e){return this._labelExpression=e,this}embeddingExpression(e){return this._embeddingExpression=e,this}documentLayout(e){if(e.presets)for(let t of e.presets)validatePresetStructure(t.id,t.structure,1);return this.obj.documentLayout=e,this}hierarchical(){return this.obj.hierarchical=!0,this}build(){if(!this.obj.name)throw new L(`[ObjectBuilder] Missing required field: name`,[{path:[`name`],message:`name is required`}]);if(!this.obj.label)throw new L(`[ObjectBuilder] Missing required field: label`,[{path:[`label`],message:`label is required`}]);return validateObjectExpressions({name:this.obj.name,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression}),validateObjectImage({name:this.obj.name,image:this.obj.image,attributes:this.obj.attributes}),{...this.obj,pluralLabel:this._pluralLabel,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression,sealed:this._sealed,toleratedAttributes:this._toleratedAttributes}}validateName(e){e!==void 0&&jr(e)}};function object(e,t){if(D(e))throw new P(e,`builder`);return new ObjectBuilder(e,t)}function validatePresetStructure(e,t,n){let fail=(t,n)=>{throw new L(t,[{path:[`documentLayout`,`presets`,e],message:n}])};n>5&&fail(`Preset structure exceeds max depth of 5`,`Preset structure too deep`);let r=/* @__PURE__ */ new Set;for(let i of t){let t=i.title.trim();t.length===0&&fail(`Folder preset node title is required`,`Empty folder title`),t.includes(`/`)&&fail(`Folder preset node title cannot contain /`,`Folder title contains /: "${t}"`),r.has(t)&&fail(`Folder preset sibling titles must be unique`,`Duplicate folder title: "${t}"`),r.add(t),i.children&&i.children.length>0&&validatePresetStructure(e,i.children,n+1)}}function relationProperty(e){return requireBuilderName(e,[`relationProperty`]),{relationProperty:e}}var X=class ContentBuilder{constructor(e,t){this.data=cloneBuilderValue(e,[`content`]),this.extension=t===void 0?void 0:Object.freeze({name:t.name,contexts:t.contexts,parameters:t.parameters,refine:t.refine})}set(e){return new ContentBuilder({...this.data,...e},this.extension)}icon(e){return this.set({icon:e})}object(e){return this.set({objectName:e})}layout(e){let{layout:t,groupByAttribute:n,columnSizing:r,kanbanColumnOrder:i,kanbanColumnVisibility:a,kanbanPinnedColumns:o,...s}={...this.data,layout:void 0,groupByAttribute:void 0,columnSizing:void 0,kanbanColumnOrder:void 0,kanbanColumnVisibility:void 0,kanbanPinnedColumns:void 0};return new ContentBuilder({...s,...e},this.extension)}table(){return this.layout({layout:`table`})}list(){return this.layout({layout:`list`})}kanban(e){return this.layout({layout:`kanban`,groupByAttribute:e})}columns(...e){return this.set({columns:e})}actions(...e){return this.set({actions:e})}openMode(e){return this.set({openMode:e})}createMode(e){return this.set({createMode:e})}visibility(e){return this.set({visibility:e})}descriptionAttribute(e){return this.set({descriptionAttribute:e})}displayAttributes(...e){return this.set({displayAttributes:e})}columnSizing(e){return this.set({columnSizing:e})}kanbanColumnOrder(...e){return this.set({kanbanColumnOrder:e})}kanbanColumnVisibility(e){return this.set({kanbanColumnVisibility:e})}kanbanPinnedColumns(...e){return this.set({kanbanPinnedColumns:e})}formColumns(e){return this.set({formColumns:e})}density(e){return this.set({density:e})}titleAttribute(e){return this.set({titleAttribute:e})}allowUpload(e){return this.set({allowUpload:e})}allowRemove(e){return this.set({allowRemove:e})}hideAttachments(e){return this.set({hideAttachments:e})}relations(...e){return this.set({relations:e})}span(e){return spanContent(this,e)}height(e){return this.set({height:e})}build(){let e=validateLiteralContent(this.data,[`content`]);return this.extension&&e.type===`custom`&&A(this.extension,e.parameters,[`content`,`parameters`]),e}},S_=class GroupBuilder{constructor(e,t,n,r={}){this.data=cloneBuilderValue({name:e,label:t,fields:n,...r},[`group`])}field(e,t){let{name:n,label:r,fields:i,...a}=this.data;return new GroupBuilder(n,r,[...i,{attribute:e,...t}],a)}fields(...e){let{name:t,label:n,fields:r,...i}=this.data;return new GroupBuilder(t,n,[...r,...e.map(e=>({attribute:e}))],i)}description(e){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),description:e})}collapsible(e=!1){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),collapsible:!0,collapsed:e})}alwaysOpen(){let{collapsed:e,...t}=this.presentation();return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...t,collapsible:!1})}presentation(){let{name:e,label:t,fields:n,...r}=this.data;return r}build(){requireBuilderName(this.data.name,[`group`,`name`]);try{validateLiteralContent({type:`form`,groups:[this.data]},[`group`])}catch(e){throw e instanceof L?new L(e.message,e.errors.map(e=>({...e,path:e.path[1]===`groups`?[`group`,...e.path.slice(3)]:e.path}))):e}return cloneBuilderValue(this.data,[`group`])}};function group(e,t){return new S_(e,t,[])}function collection(e){return new X({type:`collection`,...storedQuery(e,`collection`)})}function form$1(...e){return new X({type:`form`,groups:e.map(e=>`build`in e?e.build():e)})}function activity(){return new X({type:`activity`})}function richtext$1(e){return new X({type:`richtext`,attribute:e})}function documents(){return new X({type:`documents`})}function forms(){return new X({type:`forms`})}function emails(...e){return new X({type:`emails`,emailAttributes:e})}function meetings(...e){return new X({type:`meetings`,emailAttributes:e})}function custom(e,t){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw new L(`Expected registered extension declaration`,[{path:[`content`,`extension`],message:`Expected registered extension declaration`}]);let n=validateContentConfiguration({type:`custom`,extension:e.name,parameters:t},[`content`]);if(n.type!==`custom`)throw new L(`Expected custom content`,[]);let r=new X({...n,extension:e.name},e);return r.build(),r}function recordLinksTab(){return[x.name,x.label,custom(nt,{}).icon(x.icon)]}function page$1(e){let{object:t,name:n}=e.definition;if(typeof t!=`string`){let e=`Page "${n}" is standalone; a record tab renders a record page (\`page(...).for(object)\`)`;throw new L(e,[{path:[`content`,`page`,`object`],message:e}])}return new X({type:`page`,page:{object:t,name:n}})}const C_={collection,metric,chart,agenda,card,text:text$1,decisions,meetingsUpcoming,mailbox,page:page$1,form:form$1,activity,richtext:richtext$1,documents,forms,emails,meetings,custom};function contentDefinition(e,t){if(t.suppressed)return null;let n=t.workspaceDefinition??t.sourceDefinition;return n===null?null:{...structuredClone(n),name:e}}function storedContentDefinition(e){let{name:t,...n}=e;return structuredClone(n)}function workspaceViewAuthoring(e,t={}){let n={main:0,aside:0};return{origin:`runtime`,mainOrderCustomized:!1,asideOrderCustomized:!1,gridCustomized:Object.keys(t).length>0,homeCustomized:!1,contents:Object.fromEntries(e.map(e=>[e.name,{sourceDefinition:null,workspaceDefinition:storedContentDefinition(e),suppressed:!1,sourcePosition:null,workspacePosition:e.placement===`grid`?null:n[e.placement]++,sourceGrid:null,workspaceGrid:t[e.name]??null}]))}}function byKind(e,t){let rank=e=>Number(e.definition.type===`group`);return rank(e)-rank(t)||e.name.localeCompare(t.name)}function inReadingOrder(e){return(t,n)=>{let r=e(t.name),i=e(n.name);return r===null||i===null?r===i?byKind(t,n):r?-1:1:r.y-i.y||r.x-i.x||byKind(t,n)}}function overLimit(e,t){let n=/* @__PURE__ */ new Set;if(e.length<=S.tabsPerView)return n;let r=new Map(e.map(e=>[e.name,e])),i=/* @__PURE__ */ new Map;for(let{name:t,definition:n}of e)if(n.type===`group`)for(let e of n.members)i.has(e)||i.set(e,t);let cellOf=e=>{let n=r.get(e),a=n?t(n.state):null;if(a!==null)return a;let o=r.get(i.get(e)??``);return o?t(o.state):null},a=e.filter(e=>e.state.sourceDefinition===null).sort(inReadingOrder(cellOf)).reverse();for(let t of a){if(e.length-n.size<=S.tabsPerView)break;if(n.has(t.name))continue;let i=t.definition.type===`group`?t.definition.members.flatMap(e=>{let t=r.get(e);return t&&t.definition.type!==`group`?[t]:[]}):[];if(!i.some(e=>e.state.sourceDefinition!==null))for(let e of[t,...i])n.add(e.name)}return n}function resolvePageGrid(e,t={}){let rawCell=t=>e.gridCustomized||t.sourceDefinition===null?t.workspaceGrid:t.sourceGrid,n=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{name:e,state:t,definition:n}]:[]}),r=k(n.map(e=>e.definition)),i=n.filter(e=>!r.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),a=overLimit(i,rawCell),o=i.filter(e=>!a.has(e.name)),s=new Map(o.map(e=>[e.name,e.definition])),c=t.traitsOf??rr(s,w),l=Cn([...s.values()]),u=o.filter(e=>!l.has(e.name)),d={},f=[],place=(e,t)=>{t&&!Object.values(d).some(e=>nr(t,e))?d[e]={...t}:f.push(e)};if(e.gridCustomized)for(let{name:e,state:t}of u)place(e,t.workspaceGrid);else{for(let{name:e,state:t}of u)t.sourceDefinition!==null&&place(e,t.sourceGrid);for(let{name:e,state:t}of u)t.sourceDefinition===null&&place(e,t.workspaceGrid)}let p=Math.max(0,...Object.values(d).map(e=>e.y+e.h));for(let t of f.sort()){let n=e.contents[t],{w:r,h:i}=n.workspaceGrid??n.sourceGrid??c(t).size;d[t]={x:0,y:p,w:r,h:i},p+=i}let m=repairPageGrid(Object.entries(d).map(([e,n])=>({i:e,...n,...t.statics?.has(e)?{static:!0}:{}})),c);return{grid:Object.fromEntries(m.cells.map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),repairs:[...[...a].map(e=>({name:e,kind:`dropped`})),...m.repairs]}}function droppedContents(e){return new Set(e.flatMap(e=>e.kind===`dropped`?[e.name]:[]))}function resolveViewContents(e){let t=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{definition:n,...t}]:[]}),n=[`main`,`aside`].flatMap(n=>{let r=n===`main`?e.mainOrderCustomized:e.asideOrderCustomized;return t.filter(e=>e.definition.placement===n).sort((e,t)=>{let n=r?e.workspacePosition:e.sourcePosition,i=r?t.workspacePosition:t.sourcePosition;if(n!==null&&i!==null&&n!==i)return n-i;if(n!==null&&i===null)return-1;if(i!==null&&n===null)return 1;let a=e.sourcePosition??e.workspacePosition,o=t.sourcePosition??t.workspacePosition;return a!==null&&o!==null&&a!==o?a-o:a!==null&&o===null?-1:o!==null&&a===null?1:e.definition.name.localeCompare(t.definition.name)}).map(e=>e.definition)}),r=k(t.map(e=>e.definition)),i=t.filter(e=>e.definition.placement===`grid`&&!r.has(e.definition.name)).map(e=>e.definition).sort((e,t)=>e.name.localeCompare(t.name));return[...n,...i]}let Z;function unaccentRules(){if(Z)return Z;let e=/* @__PURE__ */ new Map;for(let t of`
2
+ import{NonJsonValueError as e,asTenantId as t,asUserId as n,canonicalStringify as r,deepEqual as i,generateId as a,indexBy as o,sameStableValue as s,serializeCanonicalJson as c,serializeStableJson as l}from"./utils-DKrBP9EH.mjs";import{ACTIONABLE_DECISION_KINDS as u,AGENDA_BLOCK as d,AGGREGATE_BUCKETS as f,AGGREGATE_MEASURES as p,ARTIFACT_PREVIEW_EXTENSION as m,ATTRIBUTE_FILTER_OPERATORS as h,ATTRIBUTE_NAME_SCHEMA as ee,ATTRIBUTE_TYPES as te,ATTRIBUTE_TYPE_DESCRIPTORS as ne,BLOCK_CONTEXTS as re,BLOCK_PERIODS as ie,BLOCK_WIDTHS as g,CARD_BLOCK as _,CHART_BLOCK as v,CHART_KINDS as ae,CHART_ORDERS as oe,CONTENT_PLACEMENT_CONTEXTS as se,DECISIONS_BLOCK as ce,DECISION_INBOX_STATES as le,DECISION_KINDS as ue,DECISION_LINE_MAX_LENGTH as de,DECISION_LINK_TARGET_TYPES as fe,DECISION_LIST_STATES as pe,DECISION_READ_STATES as me,DECISION_SENDER_KINDS as he,DECISION_SETTINGS_AREAS as ge,DECISION_TITLE_MAX_LENGTH as _e,DECISION_TRANSFERS_KEY as ve,DECISION_TYPES_V1 as ye,DECISION_TYPE_ACCESS_GRANTED as be,DECISION_TYPE_AGENT_APPROVAL as xe,DECISION_TYPE_AGENT_MESSAGE as Se,DECISION_TYPE_AGENT_QUESTION as Ce,DECISION_TYPE_AGENT_REVIEW as we,DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED as Te,DECISION_TYPE_AGENT_SETUP as Ee,DECISION_TYPE_BUNDLE_SETUP as De,DECISION_TYPE_CONNECTOR_CONNECTION_ERROR as Oe,DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED as ke,DECISION_TYPE_ENVIRONMENT_BUILD_FAILED as Ae,DECISION_TYPE_KINDS as y,DECISION_TYPE_PERSON as je,DECISION_TYPE_RECORD_ASSIGNED as Me,DECISION_TYPE_RECORD_MENTIONED as Ne,DECISION_WORK_STATES as Pe,DEFAULT_LAYOUT_TRAITS as Fe,GROUPABLE_ATTRIBUTE_TYPES as Ie,HEADING_BLOCK as Le,HIERARCHY_ATTRIBUTE_IDS as Re,HIERARCHY_ATTRIBUTE_NAMES as ze,HIERARCHY_CHILD_IDS_LIMIT as Be,INVENTORY_LIMIT as Ve,LIST_VIEW_TAB_VISIBILITIES as He,LOCATION_FILTER_PROPERTIES as Ue,MAILBOX_BLOCK as We,MAX_AGGREGATE_GROUPS as Ge,MEASURABLE_ATTRIBUTE_TYPES as Ke,MEETINGS_UPCOMING_BLOCK as qe,METRIC_BLOCK as b,NATIVE_BLOCKS as Je,NATIVE_OBJECT_NAMES as Ye,NO_VALUE_OPERATORS as Xe,OBJECT_NAME_SCHEMA as Ze,OPERATORS_BY_TYPE as Qe,PAGE_GRID_COLUMNS as $e,QUALIFIED_SEPARATOR as et,QUERY_OBJECT as tt,RECORD_LINKS_BLOCK as nt,RECORD_LINKS_CONTENT as x,RECORD_LIST_SCOPES as rt,RECORD_OBJECT as it,RELATION_TARGET_ANY as at,REMOVED_OPERATOR_REPLACEMENTS as ot,RESERVED_ATTRIBUTE_NAMES as st,RESERVED_OBJECT_NAMES as ct,RESOURCE_VISIBILITIES as lt,RecordQuery as ut,SCHEMA_LIMITS as S,SYNONYM_ALIASES as dt,SYSTEM_ATTRIBUTES as ft,SYSTEM_ATTRIBUTE_I18N_KEYS as pt,SYSTEM_FIELD_NAMES as mt,SYSTEM_FILTER_ATTRIBUTE_TYPES as ht,TEXT_BLOCK as C,UNORDERED_CHART_KINDS as gt,assertUniqueBy as _t,attributeFilterTarget as vt,attributeInventory as yt,blockObjectInputs as bt,buildQualifiedAttribute as xt,canonicalizeFilterValue as St,capped as Ct,collectContentViewCatalogue as wt,collectQualifiedRuleIssues as Tt,collectionContentSourceSchema as Et,collectionSourceAddress as Dt,collectionSourceAddressOf as Ot,colorIdSchema as kt,columnsSchema as At,contentExtensionRegistry as w,contentReadObjects as jt,contentViewDefinitionSchema as T,contentViewDefinitionSchemaFor as Mt,currentActor as Nt,decisionArchiveAllResultSchema as Pt,decisionAttachmentSchema as Ft,decisionCountsSchema as It,decisionHandedBy as Lt,decisionLinkSchema as Rt,decisionListResultSchema as zt,decisionRecipientSchema as Bt,decisionSchema as Vt,decisionSenderSchema as Ht,decisionThreadKey as Ut,decisionTransferBy as Wt,decisionTransferTargetsSchema as Gt,decisionTransferTo as Kt,decisionTransfersOf as qt,decisionWithRecipientSchema as Jt,defineBlock as Yt,describeViewIssue as Xt,displayAttributesSchema as Zt,draftContentViewDefinitionSchema as Qt,draftContentViewDefinitionSchemaFor as $t,edgePropertyFilterTarget as en,extractCurrencyFilterValue as tn,extractFilterValue as nn,filterOperatorsOfType as rn,filterStateSchema as an,filterTargetsOf as on,findGridViolation as sn,findGroupViolation as cn,findLayoutRuleViolation as ln,findRelationAttribute as un,findRowLimitViolation as dn,formatDecisionLink as fn,getAttributeCapabilities as pn,getAttributeFilterOperators as mn,getHierarchyAttributes as hn,getObjectSystemAttributes as gn,getOperatorPolarity as _n,getRollupFilterOperators as vn,getSystemAttributeI18nKey as yn,getSystemAttributeList as bn,gridPositionSchema as xn,groupSizeMessage as Sn,groupedMembers as Cn,hasTypeTrait as wn,hasValueKind as Tn,iconNameSchema as E,inferInverseCardinality as En,input as Dn,invalidViewMessage as On,isActionableDecisionKind as kn,isAttributeFilterable as An,isAttributeGroupable as jn,isAttributeKanbanGroupable as Mn,isAttributeSearchable as Nn,isAttributeSortable as Pn,isBilateralRelation as Fn,isBoardGrouping as In,isCalendarDay as Ln,isCollectionContent as Rn,isDynamicValue as zn,isHierarchyAttribute as Bn,isLocationFilterProperty as Vn,isLocationPartOperator as Hn,isManagedSystemAttribute as Un,isNativeObjectName as D,isNoValueOperator as Wn,isPlainRecord as Gn,isRelativeDateValue as Kn,isSetMembershipOperator as qn,isUniversalRelation as Jn,isValueKindType as O,layoutTraitsOf as Yn,locationPartFilterTarget as Xn,memberlessGroups as k,metricComparePeriod as Zn,normalizeFilterRule as Qn,normalizeForEdgeRpc as $n,normalizeOperator as er,now as tr,overlaps as nr,pageTraitsOf as rr,parseBlockParameters as A,parseDecisionLink as ir,parseQualifiedAttribute as ar,parseRecordListScope as or,parseResourceVisibility as sr,publishedViewContentDefinitionSchema as j,query as cr,recordQueryDefinitionSchema as lr,relationAcceptsObject as ur,relationTargetsOf as dr,requireContentPlacement as fr,requireRecordContentContext as pr,requireSingleRelationTarget as mr,resolveCollectionActions as hr,resolveContentNavigation as gr,resolveEffectiveFilterType as _r,resolveIsWithinBounds as vr,resolveUtcDayBounds as yr,singleRelationTarget as br,sortsSchema as xr,sourcedAttributeOf as Sr,systemColumnFilterTarget as Cr,toMultiValueOperator as wr,toUtcDayString as Tr,today as Er,validateAttributeName as Dr,validateContentViewCatalogue as Or,validateIconName as kr,validateLabel as Ar,validateObjectName as jr,validateOptions as Mr,validateQualifiedRule as Nr,validateStoredViews as Pr,validateViewName as Fr}from"./attribute-validators-BndMvVLT.mjs";import{COMPUTED_RETURN_TYPES as Ir,DEFAULT_VALIDATION_MESSAGES as Lr,SIMPLE_PROPERTY_TYPES as Rr,TEXT_FORMAT_PATTERNS as zr,WIRE_OFFERED_BASE_CONFIG as Br,WIRE_OMITTED_CONFIG_KEYS as Vr,attributeConfigSchemas as Hr,createAttributeValidator as Ur,createFormAttributeValidator as Wr,createObjectValidator as Gr,datePrecisionIssues as Kr,formatPhoneForDisplay as qr,formatZodErrors as Jr,getAttributeConfigSchema as Yr,getAttributeConfigWriteSchema as Xr,getIso2 as Zr,isEmptyValue as Qr,isNullishOrEmptyString as $r,isValuePresent as ei,normalizeCountrylessPhoneNumber as ti,normalizePhoneNumber as ni,parseAttributeConfig as ri,parseAttributeConfigForCreate as ii,parseAttributeConfigForUpdate as ai,propertyAttributeSchema as oi,propertyAttributeWireSchema as si,propertySchemaSchema as ci,propertySchemaWireSchema as li,refuseForeignKeys as ui,rejectUnknownAttributesOrThrow as di,resolveTextPattern as fi,selectOptionWriteSchema as pi,statusGroupSchema as mi,statusOptionWriteSchema as hi,validateAttribute as gi,validateDraft as _i,validateDraftOrThrow as vi,validateObject as yi,validateObjectOrThrow as bi,wireHiddenTypeConfigMask as xi,wireOmittedConfigKeysFor as Si,withoutUnknownOptionKeys as Ci}from"./all-BYmKV0dE.mjs";import"./zod-locale.mjs";import{ACCESS_CAPABILITIES as wi,ACCESS_LEVELS as Ti,ACCESS_ROLES as Ei,ACTOR_TYPES as Di,AGENT_ASIDE_ANSWER_MAX_LENGTH as Oi,AGENT_ASIDE_HISTORY_LIMIT as ki,AGENT_ASIDE_QUESTION_MAX_LENGTH as Ai,AGENT_AVATAR_EXPRESSIONS as ji,AGENT_AVATAR_TYPES as Mi,AGENT_MESSAGE_KIND as Ni,AGENT_MESSAGE_SENDER_NAME_KEY as Pi,AGENT_NOTIFICATION_KIND as Fi,AGENT_SESSION_ACCESS_ROLES as Ii,AGENT_SESSION_LIST_ORDERS as Li,AGENT_SESSION_ORIGINS as Ri,AGENT_SESSION_PROVENANCES as zi,AGENT_STARTERS_MAX as Bi,AGENT_STARTER_MAX_LENGTH as Vi,AGENT_SYSTEM_PROMPT_MAX_LENGTH as Hi,AGENT_TASK_KINDS as Ui,AGENT_WAKE_KIND as Wi,AI_MODEL_INPUT_MODALITIES as Gi,AI_MODEL_PROFILE_LABELS as Ki,AI_MODEL_REASONING_MODES as qi,ALL_CATALOG_TOOL_NAMES as Ji,ALWAYS_KINDS as Yi,APPEARANCE_FACETS as Xi,APPROVAL_FAMILY_TOOL_NAMES as Zi,ARCHITECT_PUBLICATION_KIND as Qi,ASK_QUESTIONS_ANSWER_MAX_LENGTH as $i,ASK_QUESTIONS_ANSWER_MAX_VALUES as ea,ASK_QUESTIONS_FILE_REF as ta,ASK_QUESTIONS_MAX_ADDED_FILES as na,ASK_QUESTIONS_MAX_BATCH as ra,ASK_QUESTIONS_TOOL_NAME as ia,ATTACH_FILE_ACTIONS as aa,AUDIT_ACTIONS as oa,AUDIT_AGENT_SESSION_METADATA_KEY as sa,AUDIT_RESOURCE_TYPES as ca,AgentBuilder as M,BILLING_MODES as la,BROWSER_LAUNCH_TOOL_NAME as ua,BROWSER_TOOL_NAMES as da,BUNDLE_LOCALES as fa,BUNDLE_SETUP_PROMPT_MAX_LENGTH as pa,CATALOG_RESOURCES as ma,CHAT_PROVIDERS as ha,CONNECTION_GRANT_PROVIDERS as ga,CONNECTION_STATUS_IDS as _a,CONNECTOR_PROVIDER_IDS as va,CONNECTOR_SCOPES as ya,CONTINUATION_KEY_PATTERN as ba,CONVERSATION_SURFACES as xa,COPY_VERB_NAME as Sa,CORE_RECORD_TOOL_NAMES as Ca,CORE_TOOL_NAMES as wa,COUNT_MODES as Ta,CUSTOM_LEVEL as Ea,DEFAULT_AGENT_EXECUTION_CONFIG as Da,DEFAULT_AGENT_TOOL_GROUPS as Oa,DEFAULT_APPEARANCE_ICON as ka,DEFAULT_APPROVAL_POLICY as Aa,DEFAULT_BLUEPRINT_TOOL_GROUPS as ja,DEFAULT_DAILY_ACTIVITY_DAYS as Ma,DEFAULT_DICTATION_LIMITS as Na,DEFAULT_MEETING_BOT_DISPLAY_NAME as Pa,DEFAULT_TENANT_SETTINGS as Fa,DEVICE_ACCESS_ROLES as Ia,DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS as La,DEVICE_CHANNEL_IDLE_POLL_MS as Ra,DEVICE_CHANNEL_KEEPALIVE_MS as za,DEVICE_CHANNEL_MAX_FRAME_BYTES as Ba,DEVICE_CHANNEL_PATH as Va,DEVICE_CHANNEL_PRESENCE_MS as Ha,DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION as Ua,DEVICE_COMMAND_ERROR_CODES as Wa,DEVICE_DESKTOP_STATES as Ga,DEVICE_SHELLS as Ka,DICTATION_FINALIZATION_TIMEOUT_MS as qa,DICTATION_FRAME_BYTES as Ja,DICTATION_MAX_BUFFER_BYTES as Ya,DICTATION_MAX_FRAME_BYTES as Xa,DICTATION_MAX_TRANSCRIPT_BYTES as Za,DICTATION_MODEL_ID as Qa,DICTATION_PREPARATION_TIMEOUT_MS as $a,DICTATION_SAMPLE_RATE as eo,DICTATION_TICKET_TTL_MS as to,DISCARD_ARCHITECT_DRAFT_TOOL_NAME as no,DOCUMENT_KINDS as ro,DOCUMENT_SORT_MODES as io,DRAFT_WRITE_TOOL_NAMES as ao,DeviceChannelProtocolError as oo,DeviceChannelServerFrameSchema as so,DeviceChannelWorkerFrameSchema as co,DeviceDesktopStatusSchema as lo,EMAIL_CATEGORY_DEFAULT_COLOR as uo,EMAIL_CATEGORY_DEFAULT_ICON as fo,EMAIL_CATEGORY_DESCRIPTION_MAX as po,EMAIL_CATEGORY_DESCRIPTION_MIN as mo,EMAIL_CATEGORY_LIMIT as ho,EMAIL_CATEGORY_NAME_MAX as go,EMAIL_CATEGORY_SCOPES as _o,EMAIL_CLASSIFIED_BY as vo,EMAIL_DIRECTIONS as yo,EMAIL_PARTICIPANT_ROLES as bo,EMAIL_PROVIDERS as xo,EMAIL_RULE_SCOPES as So,ENVIRONMENT_BUILD_LOG_STEPS as Co,ENVIRONMENT_BUILD_LOG_STEP_PREFIX as wo,ENVIRONMENT_HARNESSES as To,ENVIRONMENT_HARNESS_SANDBOX_WORKDIR as Eo,ENVIRONMENT_HARNESS_WORKDIR as Do,ENVIRONMENT_IMAGES as Oo,ENVIRONMENT_MEMORY_GB_PER_VCPU as ko,ENVIRONMENT_NAME_MAX_CHARS as Ao,ENVIRONMENT_NETWORK_ALLOW_MAX as jo,ENVIRONMENT_SCRIPT_MAX_BYTES as Mo,ENVIRONMENT_SIZES as No,ENVIRONMENT_SIZE_VCPUS as Po,ENVIRONMENT_STANDARDS_WORKDIR as Fo,ENV_VAR_KEY_PATTERN as Io,ESTIMATED_COUNT_CAP as Lo,FILE_LIST_MAX_IDS as Ro,FILE_OCR_STATUSES as zo,FILE_URLS_MAX_IDS as Bo,FORM_STATUSES as Vo,FORM_SUBMISSION_STATUSES as Ho,GET_ARCHITECT_DRAFT_TOOL_NAME as Uo,GITHUB_TRIGGER_CATALOG as Wo,GITHUB_TRIGGER_FAMILIES as Go,GRANT_ENABLES as Ko,HARNESS_BRIDGE_PORT as qo,HITL_TOOL_NAMES as Jo,IMAGE_FORMATS as Yo,IMAGE_SHAPES as Xo,IMAGE_SOURCES as Zo,INFERENCE_REASONING_OPTIONS as Qo,INFERENCE_ROUTING_MODES as $o,INFERENCE_SPEEDS as es,LAST_RUN_ERROR_MAX_LENGTH as ts,LINK_COOKIE_MAX_AGE_MS as ns,LINK_DEFAULT_MS as rs,LINK_MAX_MS as is,MACHINE_KEY_KINDS as as,MAILBOX_ACCOUNT_VISIBILITIES as os,MAILBOX_LIST_MODES as ss,MAILBOX_READER_LAYOUTS as cs,MAIL_DRAFT_BODY_MAX_CHARS as ls,MAIL_DRAFT_MODES as us,MAIL_SIGNATURE_MAX_CHARS as ds,MAIL_SUBJECT_MAX_CHARS as fs,MAX_DAILY_ACTIVITY_DAYS as ps,MAX_TODOS as ms,MAX_TODO_DESCRIPTION_CHARS as hs,MAX_TODO_ID_CHARS as gs,MEETING_BOT_IMAGE as _s,MEETING_BOT_IMAGE_BASE64_MAX_LENGTH as vs,MEETING_BOT_MEMBER_CAP as ys,MEETING_BOT_NO_CREDITS as bs,MEETING_BOT_SILENT_REASON as xs,MEETING_CONFERENCE_REQUESTS as Ss,MEETING_PARTICIPANT_ROLES as Cs,MEETING_RESPONSES as ws,MEETING_RESPONSE_STATUSES as Ts,MEETING_STATUSES as Es,MEMORY_SPEND_LIMIT_PATTERN as Ds,NATIVE_TOOL_GROUPS as Os,NATIVE_TOOL_GROUP_CATALOG as ks,NEWS_DEFAULT_DISPLAY_DAYS as As,NEWS_DISPLAY_CAP_DAYS as js,NEWS_INDEX_MAX_ENTRIES as Ms,NEWS_INTENSITIES as Ns,NEWS_TARGET_KINDS as Ps,NO_ACCESS as Fs,NO_RECORDING as Is,OAUTH_TICKET_TTL_MS as Ls,OBJECT_GRANT as Rs,OPEN_TOOL_PART_STATES as zs,OPERATION_MAX_STEPS as Bs,PERMISSION_ACTIONS as Vs,PERMISSION_CAPABILITIES as Hs,PERMISSION_CATALOG as Us,PERSISTENCE_OWNED_QUOTA_KEYS as Ws,PROVIDER_DRAFT_LABEL as Gs,PROVIDER_NAMES as Ks,PUBLIC_MAIL_DOMAINS as qs,QUESTION_FAMILY_TOOL_NAMES as Js,QUOTA_KEYS as Ys,RECENT_ACTIVITY_LEDGER_LIMIT as Xs,RECIPIENT_IDENTITIES_MAX as Zs,RECORDING_OVERRIDES as Qs,RECORDING_POLICIES as $s,RECORD_ACCESS_ROLES as ec,RECORD_ACCESS_SOURCES as tc,RECORD_DRIVE_CURSOR_MAX_LENGTH as nc,RECORD_DRIVE_PAGE_DEFAULT_LIMIT as rc,RECORD_DRIVE_PAGE_MAX_LIMIT as ic,RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE as ac,RECORD_GRAPH_MAX_LIMIT_PER_NODE as oc,RECORD_GRAPH_MAX_NODES as sc,RECORD_IMAGE_MAX_BYTES as cc,REFERENCE_KINDS as lc,REPLY_MODES as uc,REPOSITORY_WILDCARD as dc,REQUEST_DESIGN_REVIEW_TOOL_NAME as fc,REQUEST_SETUP_TOOL_NAME as pc,RESOURCE_GRANT_KINDS as mc,RESOURCE_KIND_CATALOG as hc,ROUTING_PRICE_CEILINGS as gc,RUN_ORIGIN_METADATA_KEY as _c,SEND_VERB_NAME as vc,SESSION_INFERENCE_PATCH_KEYS as yc,SLACK_TRIGGER_CATALOG as bc,SLACK_TRIGGER_EVENTS as xc,SPEAKS_THROUGH_SEND_METADATA_KEY as Sc,SURFACE_TOOL_NAMES as Cc,SYSTEM_EMAIL_CATEGORIES as wc,SYSTEM_EMAIL_CATEGORY_NAMES as Tc,SYSTEM_PART_CODES as Ec,TASK_DEMAND_LEVELS as Dc,TENANT_INVITATION_DEFAULT_TTL_MS as Oc,TENANT_INVITATION_DELIVERY_STATUSES as kc,TENANT_INVITATION_MAX_TTL_MS as Ac,TENANT_INVITATION_MIN_TTL_MS as jc,TENANT_INVITATION_RESEND_INTERVAL_MS as Mc,TENANT_INVITATION_STATUSES as Nc,TODO_PHASES as Pc,TODO_PLAN_STATUSES as Fc,TODO_STATUSES as Ic,TOOL_APPROVAL_STATES as Lc,TOOL_IMPACT_COUNT_KEYS as Rc,TRANSCRIPT_STATUSES as zc,TRIAGE_ACTIONS as Bc,TRIGGER_EVENT_TYPES as Vc,TRIGGER_MAX_REENTRY as Hc,TURN_OUTCOMES as Uc,UNSHAREABLE_OBJECT_NAMES as Wc,USAGE_MODALITIES as Gc,USAGE_SCOPES as Kc,USERS_RESOLVE_MAX_IDS as qc,USER_STATUSES as Jc,USER_WORK_POSTURES as Yc,VERB_NAMES as Xc,WAKE_TURN_METADATA_KEY as Zc,WAKE_TURN_SPOKE_METADATA_KEY as Qc,WALLET_STATUSES as $c,accessGrantSchema as el,actorSchema as tl,agent as nl,agentApprovalResolutionSchema as rl,agentAvatarFromMetadata as il,agentAvatarOutputSchema as al,agentAvatarSchema as ol,agentConversationOverviewSchema as sl,agentDataChunk as cl,agentDefinitionActivitySchema as ll,agentDefinitionAudienceSchema as ul,agentDefinitionDailyActivitySchema as dl,agentDefinitionSchema as fl,agentDisplayName as pl,agentExecutionConfigOutputSchema as ml,agentHistoryMessageSchema as hl,agentInferencePreferencesOutputSchema as gl,agentInferencePreferencesSchema as _l,agentMemoryViewSchema as vl,agentMessageAttachmentSchema as yl,agentMessagePartSchema as bl,agentRequestAnswerSchema as xl,agentRoleSchema as Sl,agentRolesSetResultSchema as Cl,agentRunSchema as wl,agentRunStatusSchema as Tl,agentScheduleOutputSchema as El,agentScheduleSchema as Dl,agentSessionAudienceSchema as Ol,agentSessionDefinitionAppearanceSchema as kl,agentSessionHistoryPageSchema as Al,agentSessionInferenceOverridesInputSchema as jl,agentSessionInferenceOverridesSchema as Ml,agentSessionLinkSchema as Nl,agentSessionMessageOutputSchema as Pl,agentSessionMessageSchema as Fl,agentSessionSchema as Il,agentSetupResponseSchema as Ll,agentStartersSchema as Rl,agentTodoPlanViewSchema as zl,agentToolCatalogSchema as Bl,agentTriggerBaseSchema as Vl,agentTriggerDefinitionSchema as Hl,agentTriggerLastCallSchema as Ul,agentTriggerPatchSchema as Wl,agentTriggerSchema as Gl,agentUIValidationError as Kl,agentWakeSchema as ql,agentWakeViewSchema as Jl,apiKeyRoleSchema as Yl,apiKeySchema as Xl,apiKeyWithSecretSchema as Zl,architectProjectionSchema as Ql,artifactQuoteSchema as $l,askQuestionsOutputSchema as eu,assertCustomAgentUIMessageChunk as tu,assertSessionState as nu,attachedRecordDocumentSchema as ru,attributeOutputSchema as iu,attributeSaveOutputSchema as au,auditChangeSchema as ou,auditLogEntrySchema as su,availableBundleSummarySchema as cu,browserProfilePreparationSchema as lu,browserProfileViewSchema as uu,bundleAddPlanSchema as du,bundleAddResultSchema as fu,bundleContentsSchema as pu,bundleListSchema as mu,bundleModeSchema as hu,bundleOriginSchema as gu,bundlePieceKindSchema as _u,bundlePlanPieceSchema as vu,bundleRemovalPreviewSchema as yu,bundleStatusEntrySchema as bu,bundleStatusSchema as xu,bundleUpdateDependentSchema as Su,bundleUpdateGroupSchema as Cu,bundleUpdatePieceKindSchema as wu,bundleUpdatePieceSchema as Tu,bundleUpdatePlanSchema as Eu,bundleUpdateReasonCodeSchema as Du,bundleUpdateResultSchema as Ou,cancelAgentWakeResultSchema as ku,canonicalToolGroups as Au,capabilityForResource as ju,classificationRestoreSchema as Mu,classificationUndoSchema as Nu,classifyEmailResultSchema as Pu,classifyEmailSchema as Fu,cliDefaultModelOf as Iu,cloudBrowserLiveViewSchema as Lu,collectionOutputSchema as Ru,collectionPageSchema as zu,compareAgentSessionMessages as Bu,compareVersions as Vu,compiledHarnessModels as Hu,computeReconnectDelay as Uu,computeRetryDelay as Wu,connectionCapabilitiesSchema as Gu,connectionGrantKindsOf as Ku,connectionSyncProgressSchema as qu,connectionViewSchema as Ju,connectorProvidersResultSchema as Yu,connectorTriggerMatchSchema as Xu,createAgentTriggerResultSchema as Zu,criticConfigOutputSchema as Qu,customDataChunkSchemas as $u,declaredImageRequests as ed,decodeAgentSessionListCursor as td,decodeRecordValues as nd,defaultEnvironmentSchema as rd,deferredRetypeSchema as id,deriveViewerAccess as ad,deviceAudienceSchema as od,deviceChannelUrl as sd,documentFileSchema as cd,documentRecordOwnerPageSchema as ld,documentRecordOwnerSchema as ud,documentSchema as dd,documentWithSubCountSchema as fd,draftAppendOutputSchema as pd,draftCommandGuardSchema as md,driveFileSchema as hd,durableDateSchema as gd,editAgentSessionMessageResultSchema as _d,effectivePermissionsSchema as vd,emailAttachmentMetaSchema as yd,emailCategoryCreateSchema as bd,emailCategoryDeleteSchema as xd,emailCategorySchema as Sd,emailCategoryScopeQuerySchema as Cd,emailCategoryUpdateSchema as wd,emailCategoryUsageSchema as Td,emailParticipantRefSchema as Ed,emailRuleScopeSchema as Dd,emailSenderRuleSchema as Od,emailVerdictSchema as kd,encodeAgentSessionListCursor as Ad,encodeRecordValues as jd,envVarEntrySchema as Md,environmentBuildFailureSchema as Nd,environmentBuildStateSchema as Pd,environmentDetailSchema as Fd,environmentHarness as Id,environmentHarnessSchema as Ld,environmentListSchema as Rd,environmentNetworkPolicyOutputSchema as zd,environmentRepositorySourceSchema as Bd,environmentSchema as Vd,environmentWorkdir as Hd,fileSchema as Ud,fileUrlsResponseSchema as Wd,findEnvironmentHarness as Gd,findGrantIssues as Kd,formDefinitionSchema as qd,formSlotSchema as Jd,formStepSchema as Yd,formSubmissionSchema as Xd,formatNewsTarget as Zd,formatReference as Qd,githubConditionSchema as $d,githubTriggerMatchSchema as ef,grantKindOf as tf,harnessModelChoices as nf,harnessModelListSchema as rf,harnessModelOptionSchema as af,hasLocale as of,humanRequestId as sf,humanRequestKind as cf,imageModelFormatDefect as lf,imageModelIdSchema as uf,inferenceReasoningSchema as df,inferenceRoutingSchema as ff,inferenceSpeedSchema as pf,installedBundleSummarySchema as mf,isAgentMessageMetadata as hf,isAgentNotificationMetadata as gf,isAgentUIDataName as _f,isAgentWakeMetadata as vf,isAgentWrittenAuditEntry as yf,isArchitectPublicationMetadata as bf,isAwaitingHuman as xf,isBlocking as Sf,isCatalogResource as Cf,isEnvironmentBuildLogStep as wf,isEnvironmentHarnessId as Tf,isFormDefinition as Ef,isImageSource as Df,isMailProvider as Of,isMailboxListMode as kf,isNativeToolGroup as Af,isOpenToolPartState as jf,isParkedOnHuman as Mf,isProviderDraft as Nf,isPublicMailDomain as Pf,isQuestionPart as Ff,isReplyMode as If,isResourceGrant as Lf,isRoutineActorMetadata as Rf,isSemver as zf,isSessionInferencePatch as Bf,isSystemEmailCategory as Vf,isSystemEmailCategoryName as Hf,isSystemPartCode as Uf,isToolApprovalState as Wf,isToolImpactCountKey as Gf,isWildcard as Kf,lastPublicationSchema as qf,lastPublishErrorSchema as Jf,levelActions as Yf,levelFloor as Xf,levelOf as Zf,linkedRecordRefSchema as Qf,lockingSendCall as $f,loginSecretEntrySchema as ep,mailDraftAttachmentSchema as tp,mailDraftSchema as np,mailSignatureSchema as rp,mailboxAccountSchema as ip,mailboxCursorSchema as ap,mailboxEmailSchema as op,mailboxListResponseSchema as sp,mailboxSenderImageSchema as cp,mailboxThreadDetailSchema as lp,mailboxThreadSchema as up,matchesRepositoryPattern as dp,mcpCatalogCategorySchema as fp,mcpCatalogEntrySchema as pp,mcpOAuthAttemptStartedSchema as mp,mcpOAuthSetupSchema as hp,mcpServerAuthTypeSchema as gp,mcpServerStatusSchema as _p,mcpServerViewSchema as vp,meetingBotDispatchRequestSchema as yp,meetingBotDispatchResponseSchema as bp,meetingBotNotificationSchema as xp,meetingLinkedRecordSchema as Sp,meetingParticipantRefSchema as Cp,meetingRecordingSchema as wp,meetingSchema as Tp,meetingSiblingRefSchema as Ep,meetingTranscriptProvenanceSchema as Dp,meetingTranscriptResponseSchema as Op,meetingTranscriptSegmentSchema as kp,meetingTranscriptSourceRefSchema as Ap,meetingsListResponseSchema as jp,memberSchema as Mp,mentionReferenceSchema as Np,mergeSessionInferencePatch as Pp,modelDefinitionOutputSchema as Fp,modelDefinitionSchema as Ip,modelReferenceOutputSchema as Lp,modelReferenceSchema as Rp,mutationReceiptSchema as zp,myPreferencesSchema as Bp,needsManageWhenUnattended as Vp,newsBodySchema as Hp,newsIndexSchema as Up,normalizeNewsLocale as Wp,normalizedMeetingTranscriptSchema as Gp,oauthAttemptStartedSchema as Kp,objectDefinitionOutputSchema as qp,objectRecordOutputSchema as Jp,openRequests as Yp,orderAgentSessionMessages as Xp,pageAudienceSchema as Zp,pageReadSchema as Qp,pageSummarySchema as $p,parseAgentDefinitionAccessRole as em,parseAgentSessionAccessRole as tm,parseCountMode as nm,parseDeviceAccessRole as rm,parseDeviceChannelFrame as im,parseMergedAgentTrigger as am,parseNewsBody as om,parseNewsIndex as sm,parseNewsIntensity as cm,parseNewsTarget as lm,parseOptionalCountMode as um,parsePageAccessRole as dm,parseRecordAccessRole as fm,parseReference as pm,parseServerFrame as mm,parseToolGroupGrant as hm,parseWorkerFrame as gm,permissionFlagsSchema as _m,permissionGrantSchema as vm,permissionSchema as ym,preferenceEntry as bm,preferenceEntrySchema as xm,providerNameSchema as Sm,publishBlockerSchema as Cm,publishDraftOutputSchema as wm,quotaStateSchema as Tm,readArchitectPublication as Em,readAskQuestionsResult as Dm,readRunOriginMetadata as Om,recentActivityEntryKey as km,recipientContactSchema as Am,recipientIdentitySchema as jm,recipientSuggestionSchema as Mm,recordAggregatesSchema as Nm,recordAudienceSchema as Pm,recordCollectionOutputSchema as Fm,recordDeletionCountSchema as Im,recordDriveChildSchema as Lm,recordDriveChildrenPageSchema as Rm,recordDriveSearchHitSchema as zm,recordDriveSearchResultSchema as Bm,recordGraphEdgeSchema as Vm,recordGraphNodeKey as Hm,recordGraphNodeSchema as Um,recordGraphRequestSchema as Wm,recordGraphResponseSchema as Gm,recordIncomingReferenceSchema as Km,recordIncomingReferencesPageSchema as qm,recordMeetingsCount as Jm,recordOperationSchema as Ym,recordPurgeResultSchema as Xm,recordValuesCodec as Zm,recordsBulkCreateResultSchema as Qm,recordsBulkDeleteResultSchema as $m,recordsBulkUpdateResultSchema as eh,refineTrigger as th,relationOptionSchema as nh,relationOptionsResponseSchema as rh,replyDefaultsSchema as ih,requestedCapabilities as ah,resolveAppearance as oh,resolveLocalized as sh,resolvedRelationsBatchSchema as ch,resourceGrant as lh,resourceUsedBySchema as uh,retryPolicyOutputSchema as dh,retypeOptionsOutputSchema as fh,roleSchema as ph,routedMessageInferenceSchema as mh,routineAudiencePreviewSchema as hh,routineAudienceSchema as gh,sameActions as _h,schemaDraftOutputSchema as vh,schemaGroupListSchema as yh,schemaGroupSchema as bh,schemaStateAddressOf as xh,schemaStateEntrySchema as Sh,schemaStateSchema as Ch,secretEntrySchema as wh,servedAsIsAttributeSchema as Th,sessionImageUsageSchema as Eh,sessionInferenceOverridesOutputSchema as Dh,sessionInferencePatchSchema as Oh,sessionStateSchema as kh,setAgentSessionWorkPostureResultSchema as Ah,slackConditionSchema as jh,slackTriggerMatchSchema as Mh,submitOutcomeSchema as Nh,syncBundleResultSchema as Ph,tenantInvitationSchema as Fh,tenantSettingsResponseSchema as Ih,tenantSettingsSchema as Lh,todoItemSchema as Rh,todoPlanSchema as zh,toolImpactSchema as Bh,triageResultSchema as Vh,userProfileSchema as Hh,utf8ByteLength as Uh,viewPreferenceAddressSchema as Wh,viewReadSchema as Gh,viewerAccessSchema as Kh,withPreferenceEntry as qh,withoutTrailingSlashes as Jh}from"./record-operation-DBY5XtZW.mjs";import{AccessDeniedError as Yh,AggregateValidationError as Xh,AmbiguousSchemaChangeError as Zh,AttributeInUseError as Qh,AttributeNotFoundError as $h,ConcurrentModificationError as eg,DuplicateError as N,ExportTooLargeError as tg,ForbiddenError as ng,InvalidPermissionGrantError as rg,LogoProviderUnavailableError as ig,LogoSearchRateLimitedError as ag,MemoryNotFoundError as og,NotFoundError as sg,NotImplementedError as cg,ObjectNotFoundError as lg,ObjectReferencedError as ug,OrphanSystemAttributeError as dg,PageReferencedError as fg,ProtectedResourceError as pg,ProtectedRoleError as mg,QueryTimeoutError as hg,RealtimeDeliveryError as gg,RealtimeRateLimitedError as _g,RealtimeSubscriptionError as vg,RecordNotFoundError as yg,RecordReferencedError as bg,RepositoryError as xg,ReservedObjectNameError as P,RoleNotFoundError as Sg,SCHEMA_ERROR_HTTP_STATUS as Cg,SchemaError as F,SchemaErrorCode as I,SearchBackendError as wg,SearchPathNotIndexedError as Tg,StorageError as Eg,SyncCascadeError as Dg,SyncConflictError as Og,SyncError as kg,SystemEntityImmutableError as Ag,ToolGroupGrantError as jg,ValidationError as L,WorkspaceInvariantReason as Mg,isAttributeInUseError as Ng,isNotFoundError as Pg,isObjectReferencedError as Fg,isProtectedResourceError as Ig,isRecordReferencedError as Lg,isSchemaError as Rg,isValidationError as zg}from"./exceptions.mjs";import*as R from"zod";import{getCountryByIso2 as Bg,isValidCurrencyCode as Vg,isValidIso3 as Hg}from"@standards/constants";import{parsePhoneNumberFromString as Ug}from"libphonenumber-js";const Wg=`__stndrdsNativeUiPartIds`,Gg=1;function invalidNativePartIds(){throw new L(`Native agent UI part IDs metadata is invalid`,[])}function isPlainRecord$1(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function nativeAgentUIPartIdMetadataKey(e,t){if(e.type===`text`||e.type===`reasoning`)return`${e.type}:${t}`;if(e.type===`tool`)return`tool:${e.toolCallId}`}function parseNativeAgentUIPartIdsMetadata(e){let t=e.metadata?.[Wg];isPlainRecord$1(t)||invalidNativePartIds(),Object.keys(t).length===2&&t.schemaVersion===1&&isPlainRecord$1(t.partIds)||invalidNativePartIds();let n=/* @__PURE__ */ new Map;for(let[t,r]of e.parts.entries()){let e=nativeAgentUIPartIdMetadataKey(r,t);!e||n.has(e)?e&&invalidNativePartIds():n.set(e,r)}let r=Object.entries(t.partIds);r.length!==n.size&&invalidNativePartIds();let i=/* @__PURE__ */ new Map,a={};for(let[e,t]of r){let r=n.get(e);r&&typeof t==`string`&&t.length>0||invalidNativePartIds();let o=i.get(t);o&&(r.type===`tool`||o!==r.type)&&invalidNativePartIds(),r.type===`tool`&&t!==r.toolCallId&&invalidNativePartIds(),i.set(t,r.type),a[e]=t}return a}const Kg=5,z=[`relation`,`multiRelation`,`formula`,`rollup`,`document`,`richtext`,`user`];function isFormSlotFieldRef(e){return e.type===`slot`}function isFormFreeFieldRef(e){return e.type===`free`}function resolveFieldRequired(e){return e.readOnly===!0?!1:e.fieldRequired===void 0?e.slotMode===`create`&&e.attributeRequired===!0:e.fieldRequired}function getSlotFieldTargets(e){return e.additionalSlotIds?.length?[e.slotId,...e.additionalSlotIds]:[e.slotId]}function formFieldKey(e){return isFormSlotFieldRef(e)?`${e.slotId}.${e.attribute}`:`free.${e.attribute.name}`}function formFieldFlatKey(e){return isFormSlotFieldRef(e)?e.attribute:e.attribute.name}function readFormFieldValue(e,t){return e[formFieldKey(t)]??e[formFieldFlatKey(t)]}function isFormFieldsRow(e){return e.type===`fields`}function isFormHeadingRow(e){return e.type===`heading`}function isFormSeparatorRow(e){return e.type===`separator`}function isFormTextRow(e){return e.type===`text`}function moveWidensAudience(e){return e.added.length>0||!e.workspaceBefore&&e.workspaceAfter}function resolvePropertyDefinitions(e){let t=e.properties;if(!t)return[];if(Array.isArray(t))return t;let n=t;return Array.isArray(n.definitions)?n.definitions:[]}function hasOptions(e){return O(e.type,`options`)}function schemaGroupKey(e){return`${e.kind}:${e.name}`}function refuse$2(e){throw new L(e,[{path:[`label`],message:e}])}function parseSchemaGroupPresentation(e){let t=e??{},n={};if(t.label!==void 0){let e=t.label;if(e===null)n.label=null;else if(typeof e!=`string`)refuse$2(`Label must be a string`);else{let t=e.trim();t.length===0&&refuse$2(`Label must not be empty`),t.length>S.labelLength&&refuse$2(`Label is too long (max ${S.labelLength} characters)`),n.label=t}}return n}const B=/^(?:core|bundle:.+)$/u;function parseSchemaOwner(e){if(e===null)return null;if(!B.test(e))throw new L(`Invalid schema owner "${e}"`,[]);return e}const qg=[`web`,`presentation`,`document`,`spreadsheet`,`image`,`code`,`other`],Jg=[`ephemeral`,`conversation`,`persistent`],Yg=[`source`,`preview`,`entrypoint`,`asset`];var NoopGeocodingAdapter=class{async autocomplete(){return await Promise.resolve([])}async geocode(){return await Promise.resolve(null)}};function computeByteMagnitude(e){if(e<=0)return{value:0,unitIndex:0};let t=1e3,n=Math.min(4,Math.floor(Math.log(e)/Math.log(t)));return{value:Number.parseFloat((e/t**n).toFixed(1)),unitIndex:n}}const Xg=[`B`,`KB`,`MB`,`GB`,`TB`];function formatByteSize(e){let{value:t,unitIndex:n}=computeByteMagnitude(e);return`${t} ${Xg[n]}`}const Zg=Object.freeze([`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`status`,`select`,`multiselect`,`location`]);function buildPropertySchema(e){let t=[];for(let n of e){let e=n.build();if(!Zg.includes(e.type))throw Error(`Property type "${e.type}" is not supported in .qualifyWith()`);t.push(e)}return{definitions:t}}const Qg=[`UPPER`,`LOWER`,`capitalize`,`trim`],$g=[`prefix`,`suffix`,`wrap`,`default`],V=[...Qg,...$g],e_=/^\s*where\s*(?::(.*))?$/s,t_=`[A-Za-z_][A-Za-z0-9_]*`,n_=/^[^\s,()|{}="']+$/,r_=RegExp(`^(${t_})\\s*=\\s*(.*)$`),i_=RegExp(`^(${t_})\\s+in\\s*\\(([^()]*)\\)$`);function isWherePipe(e){return e_.test(e)}function parseWherePipe(e){let t=e.match(e_)?.[1]?.trim();if(!t)return null;let n=t.match(i_);if(n){let e=n[2].split(`,`).map(e=>e.trim());return e.every(e=>n_.test(e))?{property:n[1],values:e}:null}let r=t.match(r_);return r&&n_.test(r[2])?{property:r[1],values:[r[2]]}:null}const H=R.string().min(1,`labelExpression cannot be empty`).refine(e=>isLabelExpression(e),{message:`labelExpression must contain at least one {{ attribute }} interpolation`}).refine(e=>!/\{\{\s*\}\}/.test(e),{message:`labelExpression contains empty {{ }} interpolation`}).refine(e=>{let t=/(?<!\|)\|(?!\|)\s*(\w+)(?::[^|}]*)?/g,n;for(;(n=t.exec(e))!==null;){let e=n[1];if(!V.includes(e))return!1}return!0},{message:`Invalid pipe name. Valid pipes: ${V.join(`, `)}`});function validateLabelExpression(e){let t=H.safeParse(e);return t.success?{success:!0,attributes:extractAttributeNames(e)}:{success:!1,error:t.error.issues[0]?.message??`Invalid labelExpression`}}function applyPipe(e,t){let{name:n,args:r}=parsePipeExpression(t);switch(n){case`UPPER`:return e.toUpperCase();case`LOWER`:return e.toLowerCase();case`capitalize`:return e.replace(/(^|\s)\S/g,e=>e.toUpperCase());case`trim`:return e.trim();case`prefix`:return e?`${r[0]??``}${e}`:``;case`suffix`:return e?`${e}${r[0]??``}`:``;case`wrap`:return e?`${r[0]??``}${e}${r[1]??``}`:``;case`default`:return e||r[0]||``;default:return e}}function applyPipes(e,t){let n=e;for(let e of t)n=applyPipe(n,e);return n}function getValue(e,t){return t.split(`.`).reduce((e,t)=>{if(typeof e==`object`&&e)return e[t]},e)}const a_=`(Untitled)`;function parsePipeExpression(e){let t=e.match(/^(\w+)(?::(.*))?$/);if(!t)return{name:e,args:[]};let n=t[1],r=t[2];if(!r)return{name:n,args:[]};let i=[],a=/["']([^"']*?)["']/g,o;for(;(o=a.exec(r))!==null;)i.push(o[1]);return{name:n,args:i}}function*templateBlocks(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return;let r=e.indexOf(`}`,n+2);if(r<0)return;if(e[r+1]!==`}`){t=r+1;continue}t=r+2;let i=e.slice(n+2,r);i.length>0&&(yield{start:n,end:t,expr:i})}}function resolveLabelBlock(e,t){let n=e.split(`||`).map(e=>e.trim()),r=n[n.length-1].split(`|`).map(e=>e.trim());n[n.length-1]=r[0];let i=r.slice(1).filter(Boolean),a=n.filter(Boolean),o=``;for(let e of a){let n=toText(getValue(t,e));if(n!==``){o=n;break}}return applyPipes(o,i)}function renderLabelExpression(e,t,n=a_){let r=[],i=0;for(let n of templateBlocks(e))r.push(e.slice(i,n.start),resolveLabelBlock(n.expr,t)),i=n.end;return r.push(e.slice(i)),r.join(``).trim()||n}function toText(e){if(e==null||typeof e==`function`)return``;if(typeof e!=`object`)return String(e);if(Array.isArray(e))return e.map(toText).filter(Boolean).join(`,`);let t=e.toString;return typeof t==`function`&&t!==Object.prototype.toString?String(e):``}function isLabelExpression(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return!1;let r=e.indexOf(`}}`,n+2);if(r<0)return!1;if(e.slice(n+2,r).trim().length>0)return!0;t=r+2}return!1}function extractAttributePaths(e){let t=[];for(let n of templateBlocks(e)){let e=n.expr.trim();if(!e)continue;let r=e.split(`||`).map(e=>e.trim()),i=r[r.length-1];r[r.length-1]=i.split(`|`)[0].trim();for(let e of r)e&&!t.includes(e)&&t.push(e)}return t}function extractAttributeNames(e){let t=extractAttributePaths(e).map(e=>e.split(`.`)[0]).filter(e=>e.length>0);return[...new Set(t)]}const o_=/^\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}$/;function getSingleAttributeFromExpression(e){let t=e.trim().match(o_);return t?t[1]:null}function getEditableLabelAttribute(e,t){let n=getSingleAttributeFromExpression(e);if(n===null)return null;let r=t.find(e=>e.name===n);return!r||r.type!==`text`||pn(r).authoring.readOnly?null:r}const s_=`memory`,c_=4e3,l_=`workspace`,U={name:`name`,description:`description`,content:`content`,profileOf:`profileOf`,profileActor:`profileActor`,subjects:`subjects`,subjectId:`subjectId`};function textValue(e){return typeof e==`string`?e:``}function memoryPageViewOf(e){let{values:t}=e;return{id:e.id,name:textValue(t[U.name]),description:textValue(t[U.description]),content:textValue(t[U.content]),visibility:e.visibility,ownedBy:e.ownedBy,updatedAt:new Date(e.updatedAt).toISOString()}}const u_={meetingHour:`0.80`,computeVcpuHour:`0.20`,browserHour:`0.60`},d_=[`meeting.recording`,`sandbox.agent`,`sandbox.harness`,`sandbox.build`,`browser.session`];function isMeteredChargeKind(e){return d_.includes(e)}const f_=/^\d+(?:\.\d+)?$/u;function meteredUsd(e,t){if(!f_.test(e))throw new L(`Invalid metered rate "${e}"`,[]);if(!(t>=0&&t<=2**53-1))throw new L(`Invalid metered duration "${t}"`,[]);let[n=`0`,r=``]=e.split(`.`),i=BigInt(n+r)*BigInt(t.toFixed(12).replace(`.`,``)),a=10n**BigInt(r.length+12-4),o=(i+a-1n)/a,s=10n**BigInt(4),c=(o%s).toString().padStart(4,`0`).replace(/0+$/u,``);return c?`${o/s}.${c}`:`${o/s}`}const p_=`@standards/schema`;function createStandardSchemaProps(e){return{version:1,vendor:p_,validate:t=>{let n=e.safeParse(t);return n.success?{value:n.data}:{issues:n.error.issues.map(e=>({message:e.message,path:e.path}))}}}}function isStandardSchema(e){return typeof e==`object`&&!!e&&`~standard`in e&&typeof e[`~standard`]==`object`&&e[`~standard`].version===1}function asMutableArray(e){return e}var BaseAttributeBuilder=class{get"~standard"(){return createStandardSchemaProps(Ur(this.build()))}constructor(e,t,n){Dr(t),Ar(n),this.attr={name:t,label:n,type:e,required:!1,system:!0}}asPhantomState(){return this}required(){return this.attr.required=!0,this.asPhantomState()}optional(){return this.attr.required=!1,this.asPhantomState()}runtime(){return this.attr.system=!1,this}hidden(){return this.attr.hidden=!0,this}placeholder(e){return this.attr.placeholder=e,this}description(e){return this.attr.description=e,this}icon(e){return kr(e,`attribute "${this.attr.name}"`),this.attr.icon=e,this}order(e){return this.attr.order=e,this}defaultValue(e){return(`defaultValue`in this.attr||!O(String(this.attr.type),`computed`))&&(this.attr.defaultValue=e),this}metadata(e){return this.attr.metadata=e,this}build(){return this.attr}},TextAttributeBuilder=class extends BaseAttributeBuilder{minLength(e){return this.attr.minLength=e,this}maxLength(e){return this.attr.maxLength=e,this}pattern(e){return this.attr.pattern=e,this.attr.format=void 0,this}multiline(e=!0){return this.attr.multiline=e,this}email(){return this.attr.format=`email`,this.attr.pattern=void 0,this}url(){return this.attr.format=`url`,this.attr.pattern=void 0,this}slug(){return this.attr.format=`slug`,this.attr.pattern=void 0,this}};function text(e,t){return new TextAttributeBuilder(`text`,e,t)}var RichtextAttributeBuilder=class extends BaseAttributeBuilder{};function richtext(e,t){return new RichtextAttributeBuilder(`richtext`,e,t)}var NumberAttributeBuilder=class extends BaseAttributeBuilder{min(e){return this.attr.min=e,this}max(e){return this.attr.max=e,this}integer(){return this.attr.unit=`integer`,this.attr.decimals=0,this}decimal(e=2){return this.attr.unit=`decimal`,this.attr.decimals=e,this}percentage(){return this.attr.unit=`percentage`,this}renderAs(e){return this.attr.renderAs=e,this}};function number(e,t){return new NumberAttributeBuilder(`number`,e,t)}var CheckboxAttributeBuilder=class extends BaseAttributeBuilder{};function checkbox(e,t){return new CheckboxAttributeBuilder(`checkbox`,e,t)}var DateAttributeBuilder=class extends BaseAttributeBuilder{format(e){return this.attr.dateFormat=e,this}precision(e){return this.attr.precision=e,this}build(){let[e]=Kr(`date`,this.attr);if(e!==void 0)throw new L(e.message,[{path:[`precision`],message:e.message}]);return super.build()}minDate(e){return this.attr.minDate=e,this}maxDate(e){return this.attr.maxDate=e,this}endDate(){return this.attr.endDate=!0,this.asPhantomState()}includeTime(){return this.attr.includeTime=!0,this}timeFormat(e){return this.attr.timeFormat=e,this}};function date(e,t){return new DateAttributeBuilder(`date`,e,t)}var PhoneAttributeBuilder=class extends BaseAttributeBuilder{defaultCountry(e){return this.attr.defaultCountryCode=e,this}};function phone(e,t){return new PhoneAttributeBuilder(`phone`,e,t)}var CurrencyAttributeBuilder=class extends BaseAttributeBuilder{defaultCurrency(e){return this.attr.defaultCurrency=e,this}allowedCurrencies(e){return this.attr.allowedCurrencies=e,this}allowNegative(e=!0){return this.attr.allowNegative=e,this}};function currency(e,t){return new CurrencyAttributeBuilder(`currency`,e,t)}function setOptions(e,t){let n=asMutableArray(t);Mr(e.name??`unknown`,n),e.options=n}function addOption(e,t){e.options||=[],Mr(e.name??`unknown`,[...e.options,t]),e.options.push(t)}var StatusAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}};function status(e,t){return new StatusAttributeBuilder(`status`,e,t)}var SelectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function select(e,t){return new SelectAttributeBuilder(`select`,e,t)}var MultiselectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function multiselect(e,t){return new MultiselectAttributeBuilder(`multiselect`,e,t)}var LocationAttributeBuilder=class extends BaseAttributeBuilder{granularity(e){return this.attr.granularity=e,this}defaultCountry(e){return this.attr.defaultCountry=e,this}allowedCountries(e){return this.attr.allowedCountries=e,this}};function location(e,t){return new LocationAttributeBuilder(`location`,e,t)}var UserAttributeBuilder=class extends BaseAttributeBuilder{constructor(e,t){super(`user`,e,t),this.attr.types=[`user`,`agent`]}types(e){let t=[...new Set(e)];if(t.length===0)throw Error(`[AttributeBuilder] user.types must contain at least one type.`);return this.attr.types=t,this}multiple(){return this.attr.multiple=!0,this}notifiesOnAssign(){return this.attr.notifiesOnAssign=!0,this}actors(){return this.attr.actors=!0,this}};function user(e,t){return new UserAttributeBuilder(e,t)}var BaseRelationAttributeBuilder=class extends BaseAttributeBuilder{to(e,t){let n={object:e,...t};return this.attr.targets?.push(n),this}toAny(){return this.attr.targets=[{object:`*`}],this}qualifyWith(...e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.qualifyWith() must be called AFTER .to(). Example: relation("companies", "Companies").to("companies").qualifyWith(...)`);return this.attr.properties=buildPropertySchema(e),this}bilateral(e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.bilateral() must be called AFTER .to(). Example: relation("company", "Company").to("companies").bilateral({ ... })`);if(t.length>1)throw Error(`Bilateral relations are not supported for polymorphic relations (multiple .to() targets).`);if(Jn(this.attr))throw Error(`Bilateral relations are not supported for universal relations (.toAny()).`);let n=t[0]?.object;if(!n)throw new L(`Bilateral relation requires one target object`,[{path:[`bilateral`,`object`],message:`Bilateral relation requires one target object`}]);if(e.object&&e.object!==n){let t=`Bilateral inverse object ${e.object} must match relation target ${n}`;throw new L(t,[{path:[`bilateral`,`object`],message:t}])}return this.attr.bilateral={...e,object:n},this}},SingleRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t){super(`relation`,e,t),this.attr.cardinality=`one`,this.attr.targets=[]}many(){let e=new MultiRelationAttributeBuilder(this.attr.name,this.attr.label??``,{targets:this.attr.targets,isRequired:this.attr.required});return this.attr.system===!1&&e.runtime(),this.attr.hidden&&e.hidden(),this.attr.placeholder&&e.placeholder(this.attr.placeholder),this.attr.description&&e.description(this.attr.description),this.attr.icon&&e.icon(this.attr.icon),this.attr.order!==void 0&&e.order(this.attr.order),this.attr.metadata&&e.metadata(this.attr.metadata),e}},MultiRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t,n){super(`relation`,e,t),this.attr.cardinality=`many`,this.attr.targets=n?.targets??[],this.attr.defaultValue=[],n?.isRequired&&(this.attr.required=!0)}maxItems(e){return this.attr.maxItems=e,this}};function relation(e,t){return new SingleRelationAttributeBuilder(e,t)}var FormulaAttributeBuilder=class extends BaseAttributeBuilder{expression(e){return this.attr.expression=e,this}returns(e){return this.attr.returnType=e,this}decimals(e){return this.attr.decimals=e,this}currency(e){return this.attr.currencyCode=e,this}required(){throw Error(`Formula attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function formula(e,t){return new FormulaAttributeBuilder(`formula`,e,t)}var RollupAttributeBuilder=class extends BaseAttributeBuilder{from(e){return this.attr.relationAttribute=e,this}aggregate(e){return this.attr.targetAttribute=e,this}using(e){return this.attr.function=e,this}decimals(e){return this.attr.decimals=e,this}path(e){return this.attr.relationPath=e,this}targetType(e){return this.attr.targetAttributeType=e,this}targetOptions(e){return this.attr.targetAttributeOptions=asMutableArray(e),this}targetCurrency(e){return this.attr.targetCurrencyCode=e,this}build(){let e=this.attr.function,t=this.attr.targetAttributeType;if(e===`original`&&t!==void 0&&t!==`select`&&t!==`status`&&t!==`multiselect`){let e=this.attr.relationAttribute??`relation`,n=this.attr.targetAttribute??`field`;throw new F(`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${t}") was given. To surface a plain ${t} value from a related record, use a formula instead — e.g. formula("${this.attr.name}", "…").expression("${e}.${n}").`,I.VALIDATION_FAILED)}return super.build()}required(){throw Error(`Rollup attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function rollup(e,t){return new RollupAttributeBuilder(`rollup`,e,t)}var DocumentAttributeBuilder=class extends BaseAttributeBuilder{accepts(e){return this.attr.accepts=e,this}maxFileSize(e){return this.attr.maxFileSize=e,this}qualifyWith(...e){return this.attr.properties=buildPropertySchema(e),this}};function document(e,t){return new DocumentAttributeBuilder(`document`,e,t)}const W={owner:`standardshq`,repo:`skills`,ref:`stable`},G=`[A-Za-z0-9._-]+`,m_=`[A-Za-z0-9_-]+`,h_=RegExp(`^(${m_})/(${G})@([a-z0-9-]+)(?:#(${G}))?$`),g_=RegExp(`^(${m_})/(${G})$`),__=/^[0-9a-f]{40}$/i;function isSafeSegment(e){return e!==`.`&&!e.startsWith(`-`)&&!e.includes(`..`)}function refuse$1(e,t){throw new L(`Invalid skill source "${e}": ${t} (expected owner/repo@skill or owner/repo@skill#ref)`,[{path:[`source`],message:t}])}function canonicalRef(e){return __.test(e)?e.toLowerCase():e}function parseSkillSource(e){let t=e.trim(),n=t.startsWith(`github.com/`)?t.slice(11):t,r=h_.exec(n);if(!r)return refuse$1(e,`malformed or not a github.com source`);let[,i,a,o,s]=r;return[i,a,s??``].every(isSafeSegment)?{host:`github.com`,owner:i,repo:a,skill:o,ref:s===void 0?null:canonicalRef(s)}:refuse$1(e,"a segment cannot start with `-`, hold `..` or be `.`")}function isSkillRepository(e){return g_.exec(e)?.slice(1).every(isSafeSegment)??!1}function formatSkillSource(e){let t=`${e.owner}/${e.repo}@${e.skill}`;return e.ref===null?t:`${t}#${e.ref}`}function isPinnedSkillSource(e){return e.ref!==null&&__.test(e.ref)}const K=/^[a-z0-9][a-z0-9-]{0,62}$/,q=`core`;function assertBundleName(e){if(!K.test(e))throw new L(`Invalid bundle name "${e}": expected a lowercase slug matching ${K}`,[]);if(e===`core`)throw new L(`Bundle name "${q}" is reserved`,[])}async function sha256Hex(e){let t=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e));return Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,`0`)).join(``)}function nameSlug(e,t){return e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).slice(0,t).replace(/^_+|_+$/g,``)}function cloneBuilderValue(e,t){try{return structuredClone(e)}catch{let e=`Builder configuration must contain cloneable data`;throw new L(e,[{path:t,message:e}])}}function requireBuilderName(e,t){if(typeof e!=`string`||e.trim().length===0)throw new L(`Name must not be blank`,[{path:t,message:`Name must not be blank`}])}function validateContentConfiguration(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw new L(`Invalid content configuration`,[{path:t,message:`Expected content configuration`}]);for(let n of[`name`,`label`,`placement`])if(Object.hasOwn(e,n)){let e=`Independent content configuration cannot define ${n}`;throw new L(e,[{path:[...t,n],message:e}])}let n=j.safeParse({...e,name:`content`,placement:e.type===`group`?`grid`:`main`});if(!n.success)throw L.fromZodErrors(n.error.issues.map(e=>({path:[...t,...e.path.map(String)],message:e.message})));n.data.type===`form`&&n.data.groups.forEach((e,n)=>requireBuilderName(e.name,[...t,`groups`,String(n),`name`]));let{name:r,label:i,placement:a,...o}=n.data;return cloneBuilderValue(o,t)}function validateLiteralContent(e,t){return validateContentConfiguration(e,t),cloneBuilderValue(e,t)}function positionOf(e){return{x:e.x,y:e.y,w:e.w,h:e.h}}function bottomOf(e){return e.y+e.h}function collides(e,t){return e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h}function firstCollision(e,t){return t.find(t=>collides(e,t))}function inReadingOrder$1(e){return[...e].sort((e,t)=>e.y-t.y||e.x-t.x)}function snapWidth(e,t,n){let r=12-t,i=g.filter(e=>e>=n&&e<=r);return i.length===0?g.find(e=>e>=n)??n:i.reduce((t,n)=>{let r=Math.abs(n-e),i=Math.abs(t-e);return r<i||r===i&&n>t?n:t})}function sharesColumns(e,t){return e.x<t.x+t.w&&t.x<e.x+e.w}function risenRow(e,t){return t.reduce((t,n)=>n.y<e.y&&sharesColumns(e,n)?Math.max(t,bottomOf(n)):t,0)}function packLayout(e,t){let n=e.map(e=>{let n=t?.get(e.i);return n===void 0?e:{...e,h:n}}),r=n.filter(e=>e.static===!0),i=new Map(r.map(e=>[e.i,e]));for(let e of inReadingOrder$1(n.filter(e=>e.static!==!0))){let t=risenRow(e,r),n=firstCollision({...e,y:t},r);for(;n!==void 0;)t=bottomOf(n),n=firstCollision({...e,y:t},r);let a={...e,y:t};r.push(a),i.set(e.i,a)}return n.map(e=>i.get(e.i)??e)}function settleLayout(e,t){let n=e.filter(e=>e.static===!0),r=e.filter(e=>e.static!==!0),i=/* @__PURE__ */ new Map;for(let e of[...inReadingOrder$1(r.filter(e=>t.has(e.i))),...inReadingOrder$1(r.filter(e=>!t.has(e.i)))]){let t=e,r=firstCollision(t,n);for(;r!==void 0;)t={...t,y:bottomOf(r)},r=firstCollision(t,n);n.push(t),i.set(e.i,t)}return packLayout(e.map(e=>i.get(e.i)??e))}function pageCompactor(){return{type:`vertical`,allowOverlap:!1,preventCollision:!1,compact:e=>packLayout(e).map(e=>({...e,moved:!1}))}}function clampHeight(e,t){let n=t.minHeight??1,r=t.maxHeight??1/0;return Math.max(1,n,Math.min(r,e))}function widthStepConstraint(e){return{name:`width-steps`,constrainSize:(t,n,r)=>{let i=e(t.i),a=snapWidth(n,t.x,i.minWidth);return i.height===`fit`?{w:a,h:t.h}:i.height===`flexible`?{w:a,h:clampHeight(r,i)}:{w:a,h:Math.max(1,r)}}}}function snapCell(e,t){let n=Math.max(0,Math.min(e.x,11)),r=snapWidth(e.w,n,t(e.i).minWidth);return{...e,x:Math.min(n,12-r),y:Math.max(0,e.y),w:r,h:Math.max(1,e.h)}}function samePosition(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function pushApart(e){let t=e.filter(e=>e.static===!0),n=/* @__PURE__ */ new Map;for(let r of inReadingOrder$1(e.filter(e=>e.static!==!0))){let e=r,i=firstCollision(e,t);for(;i!==void 0;){let n={...e,x:i.x+i.w};e=n.x+n.w<=12&&firstCollision(n,t)===void 0?n:{...e,y:bottomOf(i)},i=firstCollision(e,t)}t.push(e),n.set(r.i,e)}return e.map(e=>n.get(e.i)??e)}function isValidStatic(e){return[e.x,e.y,e.w,e.h].every(Number.isInteger)&&e.x>=0&&e.y>=0&&e.h>=1&&g.includes(e.w)&&e.x+e.w<=12}function keptStatics(e){let t=[],n=/* @__PURE__ */ new Set;for(let r of inReadingOrder$1(e.filter(e=>e.static===!0)))isValidStatic(r)&&firstCollision(r,t)===void 0?t.push(r):n.add(r.i);return e.map(e=>n.has(e.i)?{...e,static:!1}:e)}function boundedHeight(e,t){let n=t(e.i);if(e.static===!0||n.height!==`flexible`)return e;let r=clampHeight(e.h,n);return r===e.h?e:{...e,h:r}}function repairPageGrid(e,t){let n=[],r=keptStatics(e).map(e=>{let r=boundedHeight(e,t);return r!==e&&n.push({name:e.i,kind:`height`,from:positionOf(e),to:positionOf(r)}),r}).map(e=>{if(e.static===!0)return e;let r=snapCell(e,t);return samePosition(e,r)||n.push({name:e.i,kind:`width`,from:positionOf(e),to:positionOf(r)}),r}),i=pushApart(r);i.forEach((e,t)=>{let i=r[t];i!==void 0&&!samePosition(i,e)&&n.push({name:e.i,kind:`pushed`,from:positionOf(i),to:positionOf(e)})});let a=packLayout(i),o=keptFill(a,t);for(let e of inReadingOrder$1(a))e.i!==o&&t(e.i).height===`fill`&&n.push({name:e.i,kind:`fill`});return{cells:a,repairs:n}}function keptFill(e,t){return inReadingOrder$1(e).find(e=>e.static!==!0&&t(e.i).height===`fill`)?.i}function firstFreeSlot(e,t,n){let r=t.reduce((e,t)=>Math.max(e,bottomOf(t)),0);for(let i=n;i<=r;i+=1)for(let n=0;n+e.w<=6;n+=1)if(firstCollision({x:n,y:i,...e},t)===void 0)return{x:n,y:i};return{x:0,y:r}}function deriveLayout6(e,t){let n=[];for(let r of inReadingOrder$1(e)){let e=Math.min(6,Math.max(t(r.i).minWidth,Math.ceil(r.w/2))),i=n.at(-1)?.y??0;n.push({i:r.i,...firstFreeSlot({w:e,h:r.h},n,i),w:e,h:r.h})}return n}function figureSlot(e,t,n){for(let r of inReadingOrder$1(e.filter(e=>n.has(e.i)))){let n={x:r.x+r.w,y:r.y,...t};if(n.x+n.w<=12&&firstCollision(n,e)===void 0)return n}}function placeNew(e,t,n,r){let i={w:snapWidth(n.size.w,0,n.minWidth),h:Math.max(1,n.size.h)};return n.figure?{i:t,...figureSlot(e,i,r)??{x:0,y:0,...i}}:{i:t,x:0,y:e.reduce((e,t)=>Math.max(e,bottomOf(t)),0),...i}}function spanContent(e,t){if(!g.includes(t)){let e=`A block spans ${g.join(`, `)} columns, not ${String(t)}`;throw new L(e,[{path:[`content`,`span`],message:e}])}return{content:e,span:t}}function configureContent(e,t){try{return typeof e==`object`&&e&&`build`in e&&typeof e.build==`function`?{configuration:validateContentConfiguration(e.build(),t),extension:e.extension}:{configuration:validateContentConfiguration(e,t)}}catch(e){throw e instanceof L?new L(e.message,e.errors.map(e=>({...e,path:e.path[0]===`content`?[...t,...e.path.slice(1)]:e.path}))):e}}function storedQuery(e,t){let n=[`search`,`offset`].filter(t=>e.state[t]!==void 0);if(n.length>0)throw new L(`A ${t} cannot keep a query's ${n.join(` or `)}`,n.map(e=>({path:[t,e],message:`A ${t} stores no ${e}; use filters and limit instead`})));return e.toDefinition()}function checkInputs(e,t){for(let[n,r]of Object.entries(t)){let t=e.inputs[n];r!==void 0&&t!==void 0&&A({parameters:t.schema},r,[`content`,`parameters`,n])}return t}var BlockContentBuilder=class{constructor(e,t,n){this.extension=e,this.parameters=t,this.heightMode=n}copy(e,t){let n=this.constructor;return new n(this.extension,e,t)}with(e){let t={...this.parameters};for(let[n,r]of Object.entries(e))r===void 0?delete t[n]:t[n]=r;return checkInputs(this.extension,e),this.copy(t,this.heightMode)}height(e){return this.copy(this.parameters,e)}build(){let e={type:`custom`,extension:this.extension.name,parameters:cloneBuilderValue(this.parameters,[`content`,`parameters`]),...this.heightMode===void 0?{}:{height:this.heightMode}};return validateContentConfiguration(e,[`content`]),A(this.extension,e.parameters,[`content`,`parameters`]),e}span(e){return spanContent(this,e)}},Measures=class{count(){return this.measured(`count`)}sum(e){return this.measured(`sum`,e)}cumulative(e){return this.measured(`cumulative`,e)}avg(e){return this.measured(`avg`,e)}min(e){return this.measured(`min`,e)}max(e){return this.measured(`max`,e)}};function measure(e,t,n){return{query:e,measure:t,...n===void 0?{}:{attribute:n}}}var MetricBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}trend(e,t){return this.with({trend:e,trendBucket:t})}compare(e,t){return this.with({compare:e,period:t})}target(e){return this.with({target:e})}},MetricQuery=class extends Measures{constructor(e){super(),this.query=e}measured(e,t){return new MetricBuilder(b,checkInputs(b,measure(this.query,e,t)))}};function groupBy(e){return typeof e==`string`?[e,void 0]:[e.attribute,e.bucket]}var ChartBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}by(e){let[t,n]=groupBy(e);return this.with({by:t,byBucket:n})}by2(e){let[t,n]=groupBy(e);return this.with({by2:t,by2Bucket:n})}kind(e){return this.with({kind:e})}bar(){return this.kind(`bar`)}horizontalBar(){return this.kind(`horizontal_bar`)}line(){return this.kind(`line`)}area(){return this.kind(`area`)}donut(){return this.kind(`donut`)}funnel(){return this.kind(`funnel`)}treemap(){return this.kind(`treemap`)}calendar(){return this.kind(`calendar`)}order(e){return this.with({order:e})}},ChartQuery=class extends Measures{constructor(e){super(),this.query=e}measured(e,t){return new ChartBuilder(v,checkInputs(v,{...measure(this.query,e,t),kind:`bar`}))}};const v_={"7d":7,"30d":30};var AgendaBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}next(e){let t=typeof e==`number`?e:v_[e];if(!Number.isInteger(t)||t<1){let e=`An agenda looks ahead a whole number of days, at least 1`;throw new L(e,[{path:[`content`,`parameters`,`next`],message:e}])}return this.with({next:t})}yearly(){return this.with({yearly:!0})}},CardBuilder=class extends BlockContentBuilder{fields(...e){return this.with({fields:e})}record(e){return this.with({record:e})}},DecisionsBuilder=class extends BlockContentBuilder{kinds(...e){return this.with({kinds:e})}limit(e){return this.with({limit:e})}},MeetingsUpcomingBuilder=class extends BlockContentBuilder{limit(e){return this.with({limit:e})}},MailboxBuilder=class extends BlockContentBuilder{category(e){return this.with({category:e})}important(){return this.with({important:!0})}unread(){return this.with({unread:!0})}limit(e){return this.with({limit:e})}label(e){return this.with({label:e})}};function metric(e){return new MetricQuery(storedQuery(e,`metric`))}function chart(e){return new ChartQuery(storedQuery(e,`chart`))}function agenda(e,t){return new AgendaBuilder(d,checkInputs(d,{query:storedQuery(e,`agenda`),attribute:t}))}function card(e){let t=e===void 0||typeof e==`string`?e:e.build().name;return new CardBuilder(_,t===void 0?{}:checkInputs(_,{object:t}))}function text$1(e){return new BlockContentBuilder(C,checkInputs(C,{markdown:e}))}function decisions(){return new DecisionsBuilder(ce,{})}function meetingsUpcoming(){return new MeetingsUpcomingBuilder(qe,{})}function mailbox(){return new MailboxBuilder(We,{})}function isSpanned(e){return typeof e==`object`&&!!e&&`span`in e&&`content`in e}function total(e){return e.reduce((e,t)=>e+t,0)}function spread(e){return e.length===0?0:Math.max(...e)-Math.min(...e)}function betterSplit(e,t){let n=total(e)-total(t);if(n!==0)return n>0;let r=spread(t)-spread(e);if(r!==0)return r>0;let i=e.findIndex((e,n)=>e!==t[n]);return i!==-1&&(e[i]??0)>(t[i]??0)}function splitColumns(e,t){let n=[...t];function visit(r,i){let a=t[r.length];if(a===void 0)betterSplit(r,n)&&(n=r);else for(let t of g)t>=a&&i+t<=e&&visit([...r,t],i+t)}return visit([],0),n}function rowWidths(e,t){let n=e.filter(e=>e.span===void 0);n.length>4&&reject(t,`A row holds at most 4 unsized blocks`);let r=total(e.map(e=>e.span??e.minWidth));r>12&&reject(t,`Blocks ${e.map(e=>`"${e.key}"`).join(`, `)} do not fit one row: they need at least ${r} of 12 columns`);let i=splitColumns(12-total(e.map(e=>e.span??0)),n.map(e=>e.minWidth)),a=0;return e.map(e=>{if(e.span!==void 0)return e.span;let t=i[a]??e.minWidth;return a+=1,t})}function reject(e,t){throw new L(t,[{path:e,message:t}])}function traitsOf(e,t=[]){return Yn(e,w,new Map(t.map(e=>[e.name,e])))}function headingNames(e){let t=new Set(e.flatMap(e=>e.kind===`heading`?e.meta.name===void 0?[]:[e.meta.name]:[...Object.keys(e.blocks),...e.group?.name===void 0?[]:[e.group.name]]));return e.flatMap(e=>{if(e.kind!==`heading`)return[];if(e.meta.name!==void 0)return[e.meta.name];let n=nameSlug(e.title,40),r=n===``?`heading`:`heading_${n}`,i=r;for(let e=2;t.has(i);e+=1)i=`${r}_${e}`;return t.add(i),[i]})}function headingEntry(e,t,n){let r={title:t,...n.description===void 0?{}:{description:n.description},...n.icon===void 0?{}:{icon:n.icon}};return{key:e,content:new BlockContentBuilder(Le,r),span:12}}function groupOf(e,t,n){let[r]=e.map(e=>e.name).sort(),i=Sn(e.length);return(i!==void 0||r===void 0)&&reject(n,String(i)),{type:`group`,name:t.name??`group_${r}`,placement:`grid`,...t.label===void 0?{}:{label:t.label},members:e.map(e=>e.name)}}function requirePlacement(e,t,n,r,i){if(e.type===`page`&&reject(i,`Content "${n}" cannot reference a page from a page`),fr(e,t,n,r,i),e.type!==`custom`)return;let a=t?.refine?.(e.parameters??{},r);a&&reject([...i,`parameters`,a.input],a.message)}var J=class PageBuilder{constructor(e){this.kind=`view`,this.data=e}icon(e){return new PageBuilder({...this.data,icon:e})}description(e){return new PageBuilder({...this.data,description:e})}home(){return new PageBuilder({...this.data,home:!0})}for(e){let t=typeof e==`string`?e:e.build().name;return new PageBuilder({...this.data,object:t})}row(e,t={}){let n=t.group===void 0?{kind:`row`,blocks:e}:{kind:`row`,blocks:e,group:t.group};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}heading(e,t={}){let n={kind:`heading`,title:e,meta:t};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}build(){let e=[`views`,`0`],{name:t,label:n,object:r,icon:i,description:a,home:o,sections:s}=this.data;requireBuilderName(t,[...e,`name`]),r!==void 0&&requireBuilderName(r,[...e,`object`]),o&&r!==void 0&&reject([...e,`home`],`Only a standalone page can be the home`),s.every(e=>e.kind===`row`&&Object.keys(e.blocks).length===0)&&reject([...e,`contents`],`A page declares at least one block`);let c=r===void 0?`page`:`record`,l=[],u=[],d=headingNames(s),f=0;for(let t of s){let n=[...e,`contents`,String(l.length)],r=(t.kind===`heading`?[headingEntry(d[f++]??``,t.title,t.meta)]:Object.entries(t.blocks).map(([e,t])=>isSpanned(t)?{key:e,content:t.content,span:t.span}:{key:e,content:t,span:void 0})).map(t=>{let n=[...e,`contents`,String(l.length)];requireBuilderName(t.key,[...n,`name`]);let{configuration:r,extension:i}=configureContent(t.content,n);requirePlacement(r,i,t.key,c,n);let a={...r,name:t.key,placement:`grid`};return l.push(a),{content:a,span:t.span}}),i=rowWidths(r.map(({content:e,span:t})=>({key:e.name,...t===void 0?{}:{span:t},minWidth:traitsOf(e).minWidth})),n),a=u.reduce((e,t)=>Math.max(e,t.y+t.h),0);if(t.kind===`row`&&t.group!==void 0){let e=groupOf(r.map(({content:e})=>e),t.group,n);l.push(e),u.push({i:e.name,x:0,y:a,w:12,h:traitsOf(e,l).size.h});continue}let o=0;r.forEach(({content:e},t)=>{let n=i[t]??0;u.push({i:e.name,x:o,y:a,w:n,h:traitsOf(e).size.h}),o+=n})}let p=Object.fromEntries(packLayout(u).map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),m={name:t,label:n,...r===void 0?{}:{object:r},context:`page`,...i===void 0?{}:{icon:i},...a===void 0?{}:{description:a},...o?{home:!0}:{},contents:l,grid:p},h=T.safeParse(m);if(!h.success)throw L.fromZodErrors(h.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return{kind:`view`,definition:cloneBuilderValue(m,e)}}};function page(e,t){return new J({name:e,label:t,object:void 0,sections:[]})}var Y=class ViewBuilder{constructor(e,t=[]){this.kind=`view`,this.data=cloneBuilderValue(e,[`views`,`0`]),this.extensions=t.map(e=>e&&{...e})}for(e){let t=typeof e==`string`?e:e.build().name;return new ViewBuilder({...this.data,object:t},this.extensions)}default(){return new ViewBuilder({...this.data,default:!0},this.extensions)}description(e){return new ViewBuilder({...this.data,description:e},this.extensions)}icon(e){return new ViewBuilder({...this.data,icon:e},this.extensions)}place(e,t,n,r,i){let{configuration:a,extension:o}=configureContent(n,[`views`,`0`,`contents`,String(this.data.contents.length)]),s={...a,name:e,label:t,placement:r},c=[...this.data.contents,s],l=i===void 0?{}:{anchors:{...this.data.anchors,[e]:{after:i}}};return new ViewBuilder({...this.data,...l,contents:c},[...this.extensions,o])}tab(e,t,n,r){return this.place(e,t,n,`main`,r?.after)}aside(e,t,n){return this.place(e,t,n,`aside`)}build(){let e=[`views`,`0`];requireBuilderName(this.data.name,[...e,`name`]),requireBuilderName(this.data.object,[...e,`object`]);let t=T.safeParse(this.data);if(!t.success)throw L.fromZodErrors(t.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return this.data.contents.forEach((t,n)=>{let r=[...e,`contents`,String(n)];requireBuilderName(t.name,[...r,`name`]),t.type===`form`&&t.groups.forEach((e,t)=>requireBuilderName(e.name,[...r,`groups`,String(t),`name`])),fr(t,this.extensions[n],t.name,this.data.context,r)}),{kind:`view`,definition:cloneBuilderValue(this.data,e)}}};function detailView(e,t){return new Y({name:e,label:t,object:void 0,context:`record`,contents:[]})}function listView(e,t){return new Y({name:e,label:t,object:void 0,context:`collection`,contents:[]})}function isViewPiece(e){return`kind`in e&&e.kind===`view`}function isObjectPiece(e){return!(isViewPiece(e)||e instanceof M)}function assertPiece(e,t){if(typeof e!=`object`||!e)throw new L(`Unsupported bundle piece: ${t}`,[]);if(isViewPiece(e)||e instanceof M||typeof e.build==`function`)return;let n=e.name;throw new L(`Unsupported bundle piece: ${typeof n==`string`?n:String(t)}`,[])}function declarationOf$1(e){return e instanceof J||e instanceof Y?e.build():e}function isPage(e){return e.definition.context===`page`}function validateView(e){let t=T.safeParse(e);if(t.success)return t.data;let n=typeof e==`object`&&e&&`name`in e?String(e.name):`(unnamed)`,r=L.fromZodErrors(t.error.issues.map(e=>({path:e.path.map(String),message:e.message})));throw new L(`View "${n}" is invalid. ${r.message}`,r.errors)}function identityOf(e){return`${e.object??``}:${e.name}`}function assertUniqueIdentities(e,t){let n=/* @__PURE__ */ new Set;for(let r of t){let t=identityOf(r);if(n.has(t))throw new N(e,r.name);n.add(t)}}function byIdentity(e){return(t,n)=>{let r=identityOf(e(t)),i=identityOf(e(n));return r<i?-1:+(r>i)}}async function hashBundlePieces(e){return sha256Hex(r({objects:[...e.objects].sort(byIdentity(e=>({name:e.name}))),views:[...e.views].sort(byIdentity(e=>e)),pages:[...e.pages].sort(byIdentity(e=>e.definition)),agents:[...e.agents].sort(byIdentity(e=>({name:e.name})))}))}const y_={title:120,context:200,prompt:pa};function assertSetupWithinLimits(e){let t=Object.keys(y_).flatMap(t=>{let n=y_[t],r=e[t];return r!==void 0&&r.length>n?[{path:[`setup`,t],message:`Setup ${t} must be at most ${n} characters`}]:[]});if(t.length>0)throw new L(`Bundle setup is invalid`,t)}function assertSetup(e,t){e&&assertSetupWithinLimits(e);for(let e of Object.values(t))assertSetupWithinLimits({title:e[`setup.title`],context:e[`setup.context`],prompt:e[`setup.prompt`]})}function assertSkills(e){let t=/* @__PURE__ */ new Set,n=e.flatMap(e=>{let n=skillProblem(e,t);return n===null?[]:[{path:[`skills`],message:n}]});if(n.length>0)throw new L(`Bundle skills are invalid`,n)}function skillProblem(e,t){let n;try{n=parseSkillSource(e)}catch(t){return t instanceof Error?t.message:`Invalid skill source "${e}"`}return n.owner!==W.owner||n.repo!==W.repo?`Skill "${e}" must come from ${W.owner}/${W.repo}`:n.ref===null?t.has(n.skill)?`Skill "${e}" is declared twice`:(t.add(n.skill),null):`Skill "${e}" cannot pin a ref`}async function builtBundleFromPieces(e){let t=e.name===q;t||assertBundleName(e.name);let{objects:n,pages:r,agents:i}=e,a=e.views.map(validateView),o=n.map(e=>e.name);if(assertUniqueIdentities(`object`,o.map(e=>({name:e}))),assertUniqueIdentities(`view`,a),assertUniqueIdentities(`page`,r.map(e=>e.definition)),assertUniqueIdentities(`agent`,i.map(e=>({name:e.name}))),!t){let e=o.find(D);if(e!==void 0)throw new P(e,`bundle`)}let{setup:s}=e,c=e.translations??{};assertSetup(s,c);let l=e.skills??[];return assertSkills(l),{name:e.name,label:e.label.trim(),description:e.description??null,hash:await hashBundlePieces({objects:n,views:a,pages:r,agents:i}),objects:n,views:a,pages:r,agents:i,uses:e.uses??[],samples:e.samples??[],...s?{setup:s}:{},...l.length>0?{skills:l}:{},translations:c}}const b_=Symbol.for(`standards.bundle`);function isBundle(e){return typeof e==`object`&&!!e&&e[b_]===!0}var BundleBuilder=class{constructor(e,t){this[b_]=!0,this.pieces=[],this.used=[],this.descriptionText=null,this.sampleRecords=[],this.skillSources=[],this.translationTables={},this.built=null,assertBundleName(e),this.name=e,this.label=t,this.objectBuilders=[]}description(e){return this.descriptionText=e,this.changed()}add(...e){return this.pieces.push(...e),this.objectBuilders.push(...e.filter(isObjectPiece)),this.changed(),this}uses(...e){return this.used.push(...e),this.changed()}samples(e){return this.sampleRecords=e,this.changed()}setup(e){return this.setupInvitation=e,this.changed()}skills(...e){return this.skillSources=[...this.skillSources,...e],this.changed()}translations(e,t){return this.translationTables[e]=t,this.changed()}build(){return this.built??=this.assemble(),this.built}changed(){return this.built=null,this}async assemble(){let e=[],t=[],n=[],r=[];for(let[i,a]of this.pieces.entries())if(assertPiece(a,i),a instanceof M)r.push(a.build());else if(isViewPiece(a)){let e=declarationOf$1(a);isPage(e)?n.push(e):t.push(e.definition)}else e.push(a.build());return this.assertNotInUsed(e),builtBundleFromPieces({name:this.name,label:this.label,description:this.descriptionText,objects:e,views:t,pages:n,agents:r,uses:this.used.map(e=>e.name),samples:this.sampleRecords,...this.setupInvitation?{setup:this.setupInvitation}:{},skills:this.skillSources,translations:{...this.translationTables}})}assertNotInUsed(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Set([this]),visit=e=>{if(!n.has(e)){n.add(e);for(let n of e.objectBuilders){let r=n.build().name;t.has(r)||t.set(r,e.name)}for(let t of e.used)visit(t)}};for(let e of this.used)visit(e);for(let{name:n}of e){let e=t.get(n);if(e!==void 0)throw new N(`object`,n,`Object "${n}" is declared by bundle "${this.name}" and by its used bundle "${e}"`)}}};function bundle(e,t){return new BundleBuilder(e,t)}function readOnlyOption(e){return e?.readOnly===void 0?{}:{readOnly:e.readOnly}}function buildFreeFieldRef(e,t){return{type:`free`,attribute:e.build(),label:t?.label,required:t?.required,prefillExpression:t?.prefillExpression,...readOnlyOption(t)}}function buildSlotFieldRef(e,t,n){let[r,...i]=Array.isArray(e)?e:[e];return{type:`slot`,slotId:r,additionalSlotIds:i.length>0?i:void 0,attribute:t,label:n?.label,required:n?.required,tooltip:n?.tooltip,...readOnlyOption(n)}}const x_=R.boolean().optional();var FormRowBuilder=class{constructor(e,t,n){this._finalized=!1,this.stepBuilder=e,this.rowData={id:t,order:n,type:`fields`,fields:[]}}field(e,t,n){return this.rowData.fields.push(buildSlotFieldRef(e,t,n)),this}freeField(e,t){return this.rowData.fields.push(buildFreeFieldRef(e,t)),this}row(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).row(e)}heading(e,t){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).heading(e,t)}separator(){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).separator()}text(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).text(e)}endRow(){return this._finalized?this.stepBuilder:(this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData))}},FormStepBuilder=class{constructor(e,t,n){this.rowOrder=0,this.formBuilder=e,this.stepData={id:t,label:n,rows:[]}}description(e){return this.stepData.description=e,this}field(e,t,n){this.rowOrder++;let r=`row-${this.stepData.id}-${this.rowOrder}`,i=buildSlotFieldRef(e,t,n),a={id:r,order:this.rowOrder,type:`fields`,fields:[i]};return this.stepData.rows.push(a),this}freeField(e,t){this.rowOrder++;let n=`row-${this.stepData.id}-${this.rowOrder}`,r=buildFreeFieldRef(e,t),i={id:n,order:this.rowOrder,type:`fields`,fields:[r]};return this.stepData.rows.push(i),this}row(e){return this.rowOrder++,new FormRowBuilder(this,e,this.rowOrder)}heading(e,t){this.rowOrder++;let n={id:`heading-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`heading`,content:e,level:t};return this.stepData.rows.push(n),this}separator(){this.rowOrder++;let e={id:`sep-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`separator`};return this.stepData.rows.push(e),this}text(e){this.rowOrder++;let t={id:`text-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`text`,content:e};return this.stepData.rows.push(t),this}step(e,t){return this.formBuilder._finalizeStep(this.stepData).step(e,t)}build(){return this.formBuilder._finalizeStep(this.stepData).build()}_finalizeRow(e){return e.fields.length>0&&this.stepData.rows.push(e),this}_getData(){return this.stepData}},FormBuilder=class{constructor(e,t){this.data={slots:[],steps:[],status:`draft`,version:1},this.validateName(e),this.data.name=e,this.data.label=t}description(e){return this.data.description=e,this}icon(e){return this.data.icon=e,this}status(e){return this.data.status=e,this}metadata(e){return this.data.metadata=e,this}slot(e,t,n){if(this.data.slots.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate slot id: "${e}"`);let r={id:e,objectName:t,label:n.label,mode:n.mode??`create`,color:n.color,icon:n.icon};return this.data.slots.push(r),this}step(e,t){if(this.data.steps.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate step id: "${e}"`);return new FormStepBuilder(this,e,t)}build(){return this.validateRequiredData(),this.validateSlotReferences(),this.validateFreeFields(),this.validatePrefillExpressions(),this.validateReadOnly(),this.data}_finalizeStep(e){return this.data.steps.push(e),this}validateName(e){let t=R.string().min(1,`Form name cannot be empty`).max(63,`Form name is too long (max 63 characters)`).regex(/^[a-z0-9]+(-[a-z0-9]+)*$/,{message:`Invalid form name format. Name must be in kebab-case: 'client-onboarding', 'contact-creation'`});try{t.parse(e)}catch(e){throw e instanceof R.ZodError?Error(`[FormBuilder] ${e.issues[0].message}`):e}}validateRequiredData(){if(this.data.slots.length===0)throw Error(`[FormBuilder] At least one slot is required. Use .slot() to add slots.`);if(this.data.steps.length===0)throw Error(`[FormBuilder] At least one step is required. Use .step() to add steps.`)}validateSlotReferences(){let e=new Map(this.data.slots.map(e=>[e.id,e.objectName]));for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(r.type!==`slot`)continue;let n=getSlotFieldTargets(r);for(let r of n)if(!e.has(r))throw Error(`[FormBuilder] Step "${t.id}" references unknown slot "${r}". Declare it with .slot("${r}", ...) first.`);let i=new Set(n.map(t=>e.get(t)));if(i.size>1)throw Error(`[FormBuilder] Step "${t.id}" field on attribute "${r.attribute}" targets slots of different objects (${[...i].join(`, `)}). A multi-slot field must target slots of the same object.`)}}validatePrefillExpressions(){let e=[...V,`join`,`where`];for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(!isFormFreeFieldRef(r)||!r.prefillExpression)continue;let n=r.prefillExpression,i=`prefillExpression on free field "${r.attribute.name}" in step "${t.id}"`;if(!isLabelExpression(n))throw Error(`[FormBuilder] ${i} must contain at least one {{ attribute }} interpolation.`);if(/\{\{\s*\}\}/.test(n))throw Error(`[FormBuilder] ${i} contains empty {{ }} interpolation.`);for(let a of n.matchAll(/(?<!\|)\|(?!\|)\s*(\w+)(?:\s*:[^|}]*)?/g)){let n=a[1];if(!e.includes(n))throw Error(`[FormBuilder] ${i} uses invalid pipe "${n}". Valid pipes: ${e.join(`, `)}`);let o=a[0].replace(/^\|/,``);if(isWherePipe(o)&&!parseWherePipe(o))throw new L(`[FormBuilder] ${i} has a malformed where: pipe "${o.trim()}". Write where:property=value or where:property in (a,b).`,[{path:[t.id,r.attribute.name,`prefillExpression`],message:`Malformed where: pipe`}])}}}validateReadOnly(){for(let e of this.data.steps)for(let t of e.rows)if(isFormFieldsRow(t))for(let n of t.fields){if(x_.safeParse(n.readOnly).success)continue;let t=isFormFreeFieldRef(n)?n.attribute.name:n.attribute,r=isFormFreeFieldRef(n)?`free field`:`field`;throw new L(`[FormBuilder] readOnly on ${r} "${t}" in step "${e.id}" must be a boolean.`,[{path:[e.id,t,`readOnly`],message:`Expected a boolean`}])}}validateFreeFields(){let e=new Set(z);for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n)){for(let r of n.fields)if(isFormFreeFieldRef(r)){let n=r.attribute.type;if(e.has(n))throw Error(`[FormBuilder] Free field in step "${t.id}" uses forbidden attribute type "${n}". Forbidden types: ${z.join(`, `)}`)}}}};function form(e,t){return new FormBuilder(e,t)}const S_=R.object({shape:R.enum(Xo),from:R.array(R.string().refine(e=>e.trim().length>0,`Must not be blank`)).optional()}).strict();function imageLookupKindOf(e){return e.type===`text`?e.format===`url`?`website`:e.format===`email`?`email`:`name`:null}function validateObjectImage(e){let t=e.image?.from;if(t===void 0)return;let refuse=(t,n)=>{throw new L(`Object "${e.name}": ${t}`,[{path:n===void 0?[`image`,`from`]:[`image`,`from`,String(n)],message:t}])};t.length===0&&refuse(`image.from must name at least one attribute`);let n=new Map((e.attributes??[]).map(e=>[e.name,e])),r=/* @__PURE__ */ new Set;for(let[e,i]of t.entries()){r.has(i)&&refuse(`image.from names "${i}" twice`,e),r.add(i);let t=n.get(i);t?imageLookupKindOf(t)===null&&refuse(`image.from names "${i}", a ${t.type} attribute: only text attributes can locate an image`,e):refuse(`image.from names "${i}", which is not one of its attributes`,e)}}function validateObjectExpressions(e){let{name:t,labelExpression:n,embeddingExpression:r}=e;if(!n)throw new F(`Object "${t}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,I.VALIDATION_FAILED);let i=H.safeParse(n);if(!i.success){let e=i.error.issues[0]?.message??`Invalid labelExpression`;throw new F(`Invalid labelExpression for "${t}": ${e}`,I.VALIDATION_FAILED)}if(r!==void 0){let e=H.safeParse(r);if(!e.success){let n=e.error.issues[0]?.message??`Invalid embeddingExpression`;throw new F(`Invalid embeddingExpression for "${t}": ${n}`,I.VALIDATION_FAILED)}}}var ObjectBuilder=class{get"~standard"(){return createStandardSchemaProps(Gr(this.build()))}constructor(e,t){this._sealed=!1,this._toleratedAttributes=[],this.validateName(e),this.obj={name:e,label:t,attributes:[],system:!0}}id(e){return this.obj.id=e,this}description(e){return this.obj.description=e,this}pluralLabel(e){return this._pluralLabel=e,this}icon(e){return this.obj.icon=e,this}color(e){return this.obj.color=e,this}image(e={}){return this.obj.image={shape:e.shape??`square`,...e.from===void 0?{}:{from:[...e.from]}},this}runtime(){return this.obj.system=!1,this}sealed(){return this._sealed=!0,this}tolerate(e){return this._toleratedAttributes=[...this._toleratedAttributes,...e],this}attribute(e){return this.pushAttributes([e]),this}attributes(e){return this.pushAttributes(e),this}pushAttributes(e){let t=e.map(e=>`build`in e&&typeof e.build==`function`?e.build():e);_t([...this.obj.attributes,...t],e=>e.name,e=>new N(`attribute`,e,`Object "${this.obj.name}": duplicate attribute name "${e}"`)),this.obj.attributes.push(...t)}metadata(e){return this.obj.metadata={...this.obj.metadata,...e},this}order(e){return this.obj.metadata={...this.obj.metadata,order:e},this}hidden(){return this.obj.metadata={...this.obj.metadata,hidden:!0},this}labelExpression(e){return this._labelExpression=e,this}embeddingExpression(e){return this._embeddingExpression=e,this}documentLayout(e){if(e.presets)for(let t of e.presets)validatePresetStructure(t.id,t.structure,1);return this.obj.documentLayout=e,this}hierarchical(){return this.obj.hierarchical=!0,this}build(){if(!this.obj.name)throw new L(`[ObjectBuilder] Missing required field: name`,[{path:[`name`],message:`name is required`}]);if(!this.obj.label)throw new L(`[ObjectBuilder] Missing required field: label`,[{path:[`label`],message:`label is required`}]);return validateObjectExpressions({name:this.obj.name,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression}),validateObjectImage({name:this.obj.name,image:this.obj.image,attributes:this.obj.attributes}),{...this.obj,pluralLabel:this._pluralLabel,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression,sealed:this._sealed,toleratedAttributes:this._toleratedAttributes}}validateName(e){e!==void 0&&jr(e)}};function object(e,t){if(D(e))throw new P(e,`builder`);return new ObjectBuilder(e,t)}function validatePresetStructure(e,t,n){let fail=(t,n)=>{throw new L(t,[{path:[`documentLayout`,`presets`,e],message:n}])};n>5&&fail(`Preset structure exceeds max depth of 5`,`Preset structure too deep`);let r=/* @__PURE__ */ new Set;for(let i of t){let t=i.title.trim();t.length===0&&fail(`Folder preset node title is required`,`Empty folder title`),t.includes(`/`)&&fail(`Folder preset node title cannot contain /`,`Folder title contains /: "${t}"`),r.has(t)&&fail(`Folder preset sibling titles must be unique`,`Duplicate folder title: "${t}"`),r.add(t),i.children&&i.children.length>0&&validatePresetStructure(e,i.children,n+1)}}function relationProperty(e){return requireBuilderName(e,[`relationProperty`]),{relationProperty:e}}var X=class ContentBuilder{constructor(e,t){this.data=cloneBuilderValue(e,[`content`]),this.extension=t===void 0?void 0:Object.freeze({name:t.name,contexts:t.contexts,parameters:t.parameters,refine:t.refine})}set(e){return new ContentBuilder({...this.data,...e},this.extension)}icon(e){return this.set({icon:e})}object(e){return this.set({objectName:e})}layout(e){let{layout:t,groupByAttribute:n,columnSizing:r,kanbanColumnOrder:i,kanbanColumnVisibility:a,kanbanPinnedColumns:o,...s}={...this.data,layout:void 0,groupByAttribute:void 0,columnSizing:void 0,kanbanColumnOrder:void 0,kanbanColumnVisibility:void 0,kanbanPinnedColumns:void 0};return new ContentBuilder({...s,...e},this.extension)}table(){return this.layout({layout:`table`})}list(){return this.layout({layout:`list`})}kanban(e){return this.layout({layout:`kanban`,groupByAttribute:e})}columns(...e){return this.set({columns:e})}actions(...e){return this.set({actions:e})}openMode(e){return this.set({openMode:e})}createMode(e){return this.set({createMode:e})}visibility(e){return this.set({visibility:e})}descriptionAttribute(e){return this.set({descriptionAttribute:e})}displayAttributes(...e){return this.set({displayAttributes:e})}columnSizing(e){return this.set({columnSizing:e})}kanbanColumnOrder(...e){return this.set({kanbanColumnOrder:e})}kanbanColumnVisibility(e){return this.set({kanbanColumnVisibility:e})}kanbanPinnedColumns(...e){return this.set({kanbanPinnedColumns:e})}formColumns(e){return this.set({formColumns:e})}density(e){return this.set({density:e})}titleAttribute(e){return this.set({titleAttribute:e})}allowUpload(e){return this.set({allowUpload:e})}allowRemove(e){return this.set({allowRemove:e})}hideAttachments(e){return this.set({hideAttachments:e})}relations(...e){return this.set({relations:e})}span(e){return spanContent(this,e)}height(e){return this.set({height:e})}build(){let e=validateLiteralContent(this.data,[`content`]);return this.extension&&e.type===`custom`&&A(this.extension,e.parameters,[`content`,`parameters`]),e}},C_=class GroupBuilder{constructor(e,t,n,r={}){this.data=cloneBuilderValue({name:e,label:t,fields:n,...r},[`group`])}field(e,t){let{name:n,label:r,fields:i,...a}=this.data;return new GroupBuilder(n,r,[...i,{attribute:e,...t}],a)}fields(...e){let{name:t,label:n,fields:r,...i}=this.data;return new GroupBuilder(t,n,[...r,...e.map(e=>({attribute:e}))],i)}description(e){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),description:e})}collapsible(e=!1){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),collapsible:!0,collapsed:e})}alwaysOpen(){let{collapsed:e,...t}=this.presentation();return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...t,collapsible:!1})}presentation(){let{name:e,label:t,fields:n,...r}=this.data;return r}build(){requireBuilderName(this.data.name,[`group`,`name`]);try{validateLiteralContent({type:`form`,groups:[this.data]},[`group`])}catch(e){throw e instanceof L?new L(e.message,e.errors.map(e=>({...e,path:e.path[1]===`groups`?[`group`,...e.path.slice(3)]:e.path}))):e}return cloneBuilderValue(this.data,[`group`])}};function group(e,t){return new C_(e,t,[])}function collection(e){return new X({type:`collection`,...storedQuery(e,`collection`)})}function form$1(...e){return new X({type:`form`,groups:e.map(e=>`build`in e?e.build():e)})}function activity(){return new X({type:`activity`})}function richtext$1(e){return new X({type:`richtext`,attribute:e})}function documents(){return new X({type:`documents`})}function forms(){return new X({type:`forms`})}function emails(...e){return new X({type:`emails`,emailAttributes:e})}function meetings(...e){return new X({type:`meetings`,emailAttributes:e})}function custom(e,t){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw new L(`Expected registered extension declaration`,[{path:[`content`,`extension`],message:`Expected registered extension declaration`}]);let n=validateContentConfiguration({type:`custom`,extension:e.name,parameters:t},[`content`]);if(n.type!==`custom`)throw new L(`Expected custom content`,[]);let r=new X({...n,extension:e.name},e);return r.build(),r}function recordLinksTab(){return[x.name,x.label,custom(nt,{}).icon(x.icon)]}function page$1(e){let{object:t,name:n}=e.definition;if(typeof t!=`string`){let e=`Page "${n}" is standalone; a record tab renders a record page (\`page(...).for(object)\`)`;throw new L(e,[{path:[`content`,`page`,`object`],message:e}])}return new X({type:`page`,page:{object:t,name:n}})}const w_={collection,metric,chart,agenda,card,text:text$1,decisions,meetingsUpcoming,mailbox,page:page$1,form:form$1,activity,richtext:richtext$1,documents,forms,emails,meetings,custom};function contentDefinition(e,t){if(t.suppressed)return null;let n=t.workspaceDefinition??t.sourceDefinition;return n===null?null:{...structuredClone(n),name:e}}function storedContentDefinition(e){let{name:t,...n}=e;return structuredClone(n)}function workspaceViewAuthoring(e,t={}){let n={main:0,aside:0};return{origin:`runtime`,mainOrderCustomized:!1,asideOrderCustomized:!1,gridCustomized:Object.keys(t).length>0,homeCustomized:!1,contents:Object.fromEntries(e.map(e=>[e.name,{sourceDefinition:null,workspaceDefinition:storedContentDefinition(e),suppressed:!1,sourcePosition:null,workspacePosition:e.placement===`grid`?null:n[e.placement]++,sourceGrid:null,workspaceGrid:t[e.name]??null}]))}}function byKind(e,t){let rank=e=>Number(e.definition.type===`group`);return rank(e)-rank(t)||e.name.localeCompare(t.name)}function inReadingOrder(e){return(t,n)=>{let r=e(t.name),i=e(n.name);return r===null||i===null?r===i?byKind(t,n):r?-1:1:r.y-i.y||r.x-i.x||byKind(t,n)}}function overLimit(e,t){let n=/* @__PURE__ */ new Set;if(e.length<=S.tabsPerView)return n;let r=new Map(e.map(e=>[e.name,e])),i=/* @__PURE__ */ new Map;for(let{name:t,definition:n}of e)if(n.type===`group`)for(let e of n.members)i.has(e)||i.set(e,t);let cellOf=e=>{let n=r.get(e),a=n?t(n.state):null;if(a!==null)return a;let o=r.get(i.get(e)??``);return o?t(o.state):null},a=e.filter(e=>e.state.sourceDefinition===null).sort(inReadingOrder(cellOf)).reverse();for(let t of a){if(e.length-n.size<=S.tabsPerView)break;if(n.has(t.name))continue;let i=t.definition.type===`group`?t.definition.members.flatMap(e=>{let t=r.get(e);return t&&t.definition.type!==`group`?[t]:[]}):[];if(!i.some(e=>e.state.sourceDefinition!==null))for(let e of[t,...i])n.add(e.name)}return n}function resolvePageGrid(e,t={}){let rawCell=t=>e.gridCustomized||t.sourceDefinition===null?t.workspaceGrid:t.sourceGrid,n=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{name:e,state:t,definition:n}]:[]}),r=k(n.map(e=>e.definition)),i=n.filter(e=>!r.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),a=overLimit(i,rawCell),o=i.filter(e=>!a.has(e.name)),s=new Map(o.map(e=>[e.name,e.definition])),c=t.traitsOf??rr(s,w),l=Cn([...s.values()]),u=o.filter(e=>!l.has(e.name)),d={},f=[],place=(e,t)=>{t&&!Object.values(d).some(e=>nr(t,e))?d[e]={...t}:f.push(e)};if(e.gridCustomized)for(let{name:e,state:t}of u)place(e,t.workspaceGrid);else{for(let{name:e,state:t}of u)t.sourceDefinition!==null&&place(e,t.sourceGrid);for(let{name:e,state:t}of u)t.sourceDefinition===null&&place(e,t.workspaceGrid)}let p=Math.max(0,...Object.values(d).map(e=>e.y+e.h));for(let t of f.sort()){let n=e.contents[t],{w:r,h:i}=n.workspaceGrid??n.sourceGrid??c(t).size;d[t]={x:0,y:p,w:r,h:i},p+=i}let m=repairPageGrid(Object.entries(d).map(([e,n])=>({i:e,...n,...t.statics?.has(e)?{static:!0}:{}})),c);return{grid:Object.fromEntries(m.cells.map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),repairs:[...[...a].map(e=>({name:e,kind:`dropped`})),...m.repairs]}}function droppedContents(e){return new Set(e.flatMap(e=>e.kind===`dropped`?[e.name]:[]))}function resolveViewContents(e){let t=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{definition:n,...t}]:[]}),n=[`main`,`aside`].flatMap(n=>{let r=n===`main`?e.mainOrderCustomized:e.asideOrderCustomized;return t.filter(e=>e.definition.placement===n).sort((e,t)=>{let n=r?e.workspacePosition:e.sourcePosition,i=r?t.workspacePosition:t.sourcePosition;if(n!==null&&i!==null&&n!==i)return n-i;if(n!==null&&i===null)return-1;if(i!==null&&n===null)return 1;let a=e.sourcePosition??e.workspacePosition,o=t.sourcePosition??t.workspacePosition;return a!==null&&o!==null&&a!==o?a-o:a!==null&&o===null?-1:o!==null&&a===null?1:e.definition.name.localeCompare(t.definition.name)}).map(e=>e.definition)}),r=k(t.map(e=>e.definition)),i=t.filter(e=>e.definition.placement===`grid`&&!r.has(e.definition.name)).map(e=>e.definition).sort((e,t)=>e.name.localeCompare(t.name));return[...n,...i]}let Z;function unaccentRules(){if(Z)return Z;let e=/* @__PURE__ */ new Map;for(let t of`
3
3
  ¡!
4
4
  ©(C)
5
5
  «<<
@@ -1651,4 +1651,4 @@ import{NonJsonValueError as e,asTenantId as t,asUserId as n,canonicalStringify a
1651
1651
  🄨(Y)
1652
1652
  🄩(Z)
1653
1653
  `.split(`
1654
- `)){if(t===``)continue;let n=String.fromCodePoint(t.codePointAt(0)??0);e.set(n,t.slice(n.length))}return Z=e,e}function unaccent(e){let t=unaccentRules(),n=``;for(let r of e)n+=t.get(r)??r;return n}function foldText(e){return unaccent(e).toLowerCase()}const w_={phone:`text`,currency:`number`},T_={rename:[`kind`,`object`,`from`,`to`],phone:[`kind`,`object`,`attribute`,`to`,`defaultCountryCode`],currency:[`kind`,`object`,`attribute`,`to`,`currencyCode`]};function refuse(e,t,n){throw new L(n,[{path:t===void 0?[`resolutions`,String(e)]:[`resolutions`,String(e),t],message:n}])}function assertKeys(e,t,n){for(let r of n)(typeof t[r]!=`string`||t[r]===``)&&refuse(e,r,`Resolution ${e} needs a non-empty string \`${r}\``);let r=Object.keys(t).find(e=>!n.includes(e));r!==void 0&&refuse(e,r,`Resolution ${e} has an unknown field \`${r}\``)}function assertResolution(e,t){if(Gn(t)||refuse(e,void 0,`Resolution ${e} must be an object`),t.kind===`rename`){assertKeys(e,t,T_.rename),t.from===t.to&&refuse(e,`to`,`Resolution ${e} renames "${t.from}" to itself`);return}if(t.kind!==`retype`&&refuse(e,`kind`,`Unknown resolution kind ${JSON.stringify(t.kind)}: expected "rename" or "retype"`),t.to!==`phone`&&t.to!==`currency`&&refuse(e,`to`,`Unsupported retype to ${JSON.stringify(t.to)}: a push converts text → phone and number → currency only`),assertKeys(e,t,T_[t.to]),t.to===`phone`){let n=t.defaultCountryCode;/^[A-Z]{3}$/.test(n)&&Vg(n)||refuse(e,`defaultCountryCode`,`Resolution ${e}: "${n}" is not an ISO 3166-1 alpha-3 country code`);return}let n=t.currencyCode;/^[A-Z]{3}$/.test(n)&&Bg(n)||refuse(e,`currencyCode`,`Resolution ${e}: "${n}" is not a supported ISO 4217 currency code`)}function addressesOf(e){return e.kind===`rename`?{reads:e.from,lands:e.to}:{reads:e.attribute,lands:e.attribute}}function assertSchemaSourceResolutions(e){if(!Array.isArray(e))throw new L("`resolutions` must be an array",[{path:[`resolutions`],message:"`resolutions` must be an array"}]);if(e.length>100)throw new L(`A push carries ${e.length} resolutions; the limit is 100`,[]);let t=/* @__PURE__ */ new Set;for(let[n,r]of e.entries()){assertResolution(n,r);let{reads:e,lands:i}=addressesOf(r);for(let[a,o]of[[`${r.kind}:${r.object}.${e}`,`of "${r.object}.${e}"`],[`${r.kind}>${r.object}.${i}`,`onto "${r.object}.${i}"`]])t.has(a)&&refuse(n,void 0,`Resolution ${n} repeats a ${r.kind} ${o}`),t.add(a)}}function phoneFromText(e,t){let n=e.trim();if(n===``)return{value:null};let r=Hg(n,Zr(t));if(!r?.isPossible()||r.country===void 0||r.ext!==void 0)return;let i=zg(r.country)?.iso3;if(i!==void 0)return{value:{countryCode:i,phoneNumber:ni(n,i)}}}function convertRetypedValue(e,t,n={}){if(t===null)return{value:null};if(e.to===`phone`)return typeof t==`string`?phoneFromText(t,e.defaultCountryCode):void 0;if(typeof t==`number`&&Math.abs(t)<=2**53-1&&!(t<0&&n.allowNegative!==!0))return{value:{code:e.currencyCode,value:t}}}const Q=R.string().refine(e=>e.trim().length>0,`Must not be blank`),E_=bh(Q),D_=R.object({label:Q,pluralLabel:R.string().optional(),description:R.string().optional(),icon:E.optional(),color:kt.optional(),image:x_.optional(),labelExpression:R.string(),embeddingExpression:R.string().optional(),sealed:R.boolean().optional(),toleratedAttributes:R.array(Q).optional(),metadata:R.record(R.string(),R.unknown()).optional(),documentLayout:R.record(R.string(),R.unknown()).optional(),hierarchical:R.boolean().optional(),defaultDriveSort:R.enum(ro).optional()}).strict();function failure(e){throw new L(e,[])}function definitionSchema(e){return R.custom(t=>{let n=R.record(R.string(),R.unknown()).parse(t);for(let t of e[0]===`view`?[`object`,`name`]:[`name`])Object.hasOwn(n,t)&&failure(`Invalid schema state: unrecognized definition key ${t}`);switch(e[0]){case`object`:D_.parse(n);break;case`attribute`:{let e=R.enum(te).parse(n.type);Yr(e).extend({type:R.literal(e),label:Q,required:R.boolean().optional(),unique:R.boolean().optional(),icon:E.optional()}).strict().parse(n);break}case`view`:{let{contents:t,...r}=n,i=R.array(Q).parse(t);new Set(i).size!==i.length&&failure(`Invalid schema state: duplicate content membership`),Qt.parse({...r,object:e[1],name:e[2],contents:[]});break}case`content`:j.parse({...n,name:e[3]})}return!0})}function compareSchemaStateEntries(e,t){let n=JSON.stringify(e.address),r=JSON.stringify(t.address);return n<r?-1:+(n>r)}function schemaStateSourcePayload(e){return{modelVersion:1,hashVersion:1,entries:[...e].sort(compareSchemaStateEntries).filter(e=>e.source!==null).map(({address:e,source:t})=>({address:e,source:t}))}}function parseState(e){let t=R.record(R.string(),R.unknown()).parse(e);for(let[e,n]of[[`modelVersion`,`model`],[`hashVersion`,`hash`]])t[e]!==1&&failure(`Unsupported schema ${n} version: expected 1, received ${t[e]===void 0?`missing`:String(t[e])}`);let n=R.object({modelVersion:R.literal(1),hashVersion:R.literal(1),tenant:Q,sourceFingerprint:R.string().regex(/^[a-f0-9]{64}$/),entries:R.array(R.unknown())}).strict().safeParse(e);if(!n.success){let e=n.error.issues.find(e=>e.code===`unrecognized_keys`);throw e?.code===`unrecognized_keys`&&failure(`Invalid schema state: unrecognized key ${e.keys[0]}`),L.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})))}let r=/* @__PURE__ */ new Set,i=n.data.entries.map(e=>{let t=E_.parse(R.object({address:R.unknown()}).parse(e).address),n=JSON.stringify(t);r.has(n)&&failure(`Invalid schema state: duplicate address ${n}`),r.add(n);let i=definitionSchema(t).nullable(),a=t[0]===`object`||t[0]===`attribute`?R.object({id:R.string().uuid(),updatedAt:R.string().datetime()}).strict():R.object({id:R.string().uuid(),revision:R.number().int().nonnegative()}).strict(),o=R.object({address:E_,source:i,effective:i,status:R.enum([`source`,`runtime`,`copy`,`suppressed`]),sourceOwner:R.string().regex(B).nullable(),guard:a.nullable()}).strict().parse(e);return(o.status===`runtime`&&(o.source!==null||o.effective===null||o.sourceOwner!==null)||o.status===`suppressed`&&(t[0]!==`content`||o.source===null||o.effective!==null||o.guard===null)||o.status===`copy`&&(o.source===null||o.effective===null)||o.effective!==null&&o.guard===null||o.source===null&&o.effective===null)&&failure(`Invalid schema state: inconsistent status at ${n}`),{...o,sourceOwner:parseSchemaOwner(o.sourceOwner)}});return{...n.data,entries:i.sort(compareSchemaStateEntries)}}function parseSchemaState(e){try{return parseState(e)}catch(e){throw e instanceof R.ZodError?L.fromZodErrors(e.issues.map(e=>({path:e.path.map(String),message:e.message}))):e}}function diffSchemaState(e){let t=[];for(let n of[...e.entries].sort(compareSchemaStateEntries)){let e=n.source===null?`added`:n.status===`suppressed`?`suppressed`:n.effective===null?`removed`:r(n.source)===r(n.effective)?n.status===`copy`?`copied`:null:`changed`;e&&t.push({...n,change:e})}return{modelVersion:1,tenant:e.tenant,sourceFingerprint:e.sourceFingerprint,changes:t}}const $=R.string().min(1),O_=R.union([R.object({objectName:$,viewName:$,contentName:$.optional()}).strict().describe(`Full configuration of a view, or of one content when contentName is given`),R.object({objectId:$}).strict().describe(`An object with its attributes, by id`),R.object({objectName:$}).strict().describe(`An object with its attributes`),R.object({objectId:$,attributeName:$}).strict().describe(`One attribute's config, by name`),R.object({objectId:$,attributeId:$}).strict().describe(`One attribute's config, by id`),R.object({objectId:$,recordId:$}).strict().describe(`One sample record`)]);function parseNamedTarget(e){let t=O_.safeParse(e);if(!t.success)throw new L(`Invalid scoped target`,[{path:[`target`],message:`Expected exactly one named target branch`}]);return t.data}const k_=[`object`,`attribute`,`view`,`content`,`sample`],A_=100,j_=R.object({mode:R.enum([`inline`,`window`]),interaction:R.enum([`static`,`interactive`]),size:R.enum([`compact`,`regular`]),aspectRatio:R.number().positive().finite().optional()}).strict(),M_=R.object({artifactId:R.string().min(1),revision:R.number().int().positive(),name:R.string().min(1),kind:R.string().min(1),retention:R.enum(qg),display:j_}).strict();function readArtifactResult(e){let t=M_.safeParse(e);return t.success?t.data:null}const N_=R.string().regex(/^[^/\s]+\/[^/\s]+$/),P_=R.object({kind:R.literal(`generated-image`),artifact:R.unknown(),generation:R.object({attemptId:R.uuid(),requestedModelId:N_,executedModelId:N_.nullable(),format:R.enum(Jo),mimeType:R.enum([`image/png`,`image/jpeg`,`image/webp`])}).strict()}).strict();function readGeneratedImageResult(e){let t=P_.safeParse(e);if(!t.success)return null;let n=readArtifactResult(t.data.artifact);return!n||n.kind!==`image`?null:{...t.data,artifact:{...n,kind:`image`}}}function isCompletedToolPart(e){return e.type===`tool`&&e.state===`completed`}function readString(e,t){let n=e[t];return typeof n==`string`?n:void 0}function upsertWithPrecedence(e,t,n,r){let i=e.get(t),a=i&&r[i.kind]>r[n.kind]?i:n;e.delete(t),e.set(t,a)}function asRecord(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function readRefId(e,t,n){let r=readString(e,t),i=`${n}:`;return r?.startsWith(i)&&r.length>i.length?r.slice(i.length):void 0}function verbResultEntries(e){let t=asRecord(e);if(!t)return[];let n=[t];for(let e of[`members`,`created`,`updated`]){let r=t[e];if(Array.isArray(r))for(let e of r){let t=asRecord(e);t&&n.push(t)}}return n.filter(e=>!(`error`in e))}function extractReadRecordIds(e){let t=/* @__PURE__ */ new Set;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.name!==`read`)continue;let n=e.args.refs;if(Array.isArray(n))for(let e of n){if(typeof e!=`string`)continue;let n=fm(e);n.ok&&n.ref.kind===`record`&&t.add(n.ref.id)}}return[...t]}const F_={created:1,modified:0};function readSingleRecordEntry(e){if(typeof e!=`object`||!e)return null;let t=e,n=typeof t.record==`object`&&t.record!==null?t.record:void 0,r=(n&&readString(n,`id`))??readString(t,`recordId`);return r?{id:r,label:(n&&readString(n,`label`))??r,objectName:(n&&readString(n,`objectName`))??``}:null}function readBulkRecordEntries(e,t,n){if(typeof e!=`object`||!e)return[];let r=e[t];if(!Array.isArray(r))return[];let i=[];for(let e of r){if(typeof e!=`object`||!e)continue;let t=e,r=readString(t,`id`);r&&i.push({id:r,label:readString(t,`label`)??r,objectName:readString(t,`objectName`)??n})}return i}function readVerbRecordEntries(e){let t=asRecord(asRecord(e.result)?.record),n=readString(e.args,`object`)??(t&&readString(t,`objectName`))??``,r=[];for(let t of verbResultEntries(e.result)){let e=readRefId(t,`ref`,`record`);e&&r.push({id:e,label:readString(t,`title`)||readString(t,`label`)||e,objectName:readString(t,`objectName`)??n})}return r}function extractTouchedRecords(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e))continue;let n=[],r;if(e.name===`create_record`||e.name===`update_record`||e.name===`edit_content`){let t=readSingleRecordEntry(e.result);n=t?[t]:[],r=e.name===`create_record`?`created`:`modified`}else if(e.name===`bulk_create_records`||e.name===`bulk_update_records`){let t=readString(e.args,`objectId`)??``,i=e.name===`bulk_create_records`?`created`:`updated`;n=readBulkRecordEntries(e.result,i,t),r=e.name===`bulk_create_records`?`created`:`modified`}else if(e.name===`write`)n=readVerbRecordEntries(e),r=readString(e.args,`action`)===`create`?`created`:`modified`;else continue;for(let e of n){let n={recordId:e.id,objectName:e.objectName,label:e.label,kind:r};upsertWithPrecedence(t,e.id,n,F_)}}return[...t.values()]}const I_={modified:1,consulted:0};function isFilePart(e){return e.type===`file`}function entryFromDocumentMutation(e,t){if(typeof e.result!=`object`||e.result===null)return null;let n=e.result,r=readString(n,`documentId`)??(t===`folderId`?readString(n,t):void 0);return r?{id:r,title:readString(e.args,`name`)??readString(e.args,`title`)??r,kind:`modified`}:null}function entryFromReadDocument(e){let t=readString(e.args,`documentId`);return t?{id:t,title:t,kind:`consulted`}:null}function entryFromRef(e,t,n){let r=readRefId(e,`ref`,`file`),i=r??readRefId(e,`ref`,`document`);return i?{id:i,...r?{fileId:r}:{},title:n||readString(e,`title`)||i,kind:t,mimeType:readString(e,`mimeType`)}:null}function entriesFromOrganize(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=readString(e.args,`action`),r=readString(e.args,`name`)??readString(e.args,`title`),i=readString(t,`documentId`);if(i)return[{id:i,title:r??i,kind:`modified`}];let a=readString(t,`folderId`);if(a)return n===`create_folder`?[{id:a,title:r??a,kind:`modified`}]:[];let o=entryFromRef(t,`modified`,r);return o?[o]:[]}function entriesFromCopy(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=(Array.isArray(t.copied)?t.copied:[]).flatMap(e=>{let t=asRecord(e),n=t?entryFromRef(t,`modified`,void 0):null;return n?[n]:[]});if(n.length>0)return n;let r=entryFromRef(t,t.ref!==void 0&&t.ref===readString(e.args,`from`)?`consulted`:`modified`,void 0);return r?[r]:[]}function entriesFromRead(e){let t=asRecord(e.result);return(Array.isArray(t?.members)?t.members:[]).flatMap(e=>{let t=asRecord(e);if(!t||`error`in t||!readRefId(t,`ref`,`document`))return[];let n=entryFromRef(t,`consulted`,void 0);return n?[n]:[]})}function entriesFromToolPart(e){switch(e.name){case`organize`:return entriesFromOrganize(e);case`copy`:return entriesFromCopy(e);case`read`:return entriesFromRead(e);default:{let t=entryFromToolPart(e);return t?[t]:[]}}}function entryFromSandboxUpload(e){if(typeof e.result!=`object`||e.result===null)return null;let t=e.result,n=readString(t,`fileId`);return n?{id:n,fileId:n,title:readString(t,`title`)??n,kind:`modified`,mimeType:readString(t,`mimeType`)}:null}function entryFromToolPart(e){switch(e.name){case`update_document`:case`attach_file`:return entryFromDocumentMutation(e,`documentId`);case`create_folder`:return entryFromDocumentMutation(e,`folderId`);case`read_document`:return entryFromReadDocument(e);case`sandbox_upload_file`:return entryFromSandboxUpload(e);default:return null}}function extractTouchedDocuments(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`){for(let e of n.parts)if(isCompletedToolPart(e))for(let n of entriesFromToolPart(e))upsertWithPrecedence(t,n.id,n,I_);else if(isFilePart(e)&&e.fileId){let n={id:e.fileId,fileId:e.fileId,title:e.name||e.fileId,kind:`modified`,mimeType:e.mimeType};upsertWithPrecedence(t,n.id,n,I_)}}return[...t.values()]}function extractTouchedArtifacts(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.error)continue;let n=e.name===`generate_image`?readGeneratedImageResult(e.result)?.artifact:e.name===`publish_artifact`?readArtifactResult(e.result):null;if(!n)continue;let r=`${n.artifactId}:${n.revision}`;t.delete(r),t.set(r,n)}return[...t.values()]}function isNonBlankString(e){return typeof e==`string`&&/\S/u.test(e)}const L_=R.object({provider:R.custom(e=>isNonBlankString(e)&&e.length<=200,{message:`must be a non-blank string of at most 200 characters`}),model:R.string().max(200).regex(/\S/u)});function preference(e,t){return{key:e,value:t.value,default:t.default,audited:t.audited??!1,...t.parameter===void 0?{}:{parameter:t.parameter},...t.parameters===void 0?{}:{parameters:t.parameters},...t.refine===void 0?{}:{refine:t.refine}}}const R_=``;function refusal(e,t){return{ok:!1,field:e,message:t,issues:[{path:[e],message:t}]}}function declarationOf(e,t){return`get`in e?e.get(t):e.find(e=>e.key===t)}function locatePreference(e,t,n){let r=declarationOf(e,t);return r?r.parameter===void 0?n===void 0?{ok:!0,declaration:r,parameter:``}:refusal(`parameter`,`Preference "${t}" takes no parameter`):n===void 0||n===``||n.trim()!==n?refusal(`parameter`,`Preference "${t}" is keyed by ${r.parameter}`):r.parameters&&!r.parameters.includes(n)?refusal(`parameter`,`"${n}" is not a ${r.parameter} of "${t}"`):{ok:!0,declaration:r,parameter:n}:refusal(`key`,`Unknown preference "${t}"`)}function judgePreferenceWrite(e,t,n,r){let i=locatePreference(e,t,n);if(!i.ok)return i;let a=i.declaration.value.safeParse(r);if(a.success){let e=i.declaration.refine?.(a.data,i.parameter);return e===void 0?{...i,value:a.data}:refusal(`value`,e)}return{ok:!1,field:`value`,message:`Invalid value for preference "${t}"`,issues:a.error.issues.map(e=>({path:[`value`,...e.path.map(String)],message:e.message}))}}const z_=R.strictObject({model:L_.optional(),routing:R.literal(`auto`).optional()}),B_=R.strictObject({inApp:R.boolean()});function isActionableType(e){let t=y[e];return t!==void 0&&kn(t.kind)}const V_=[preference(`workPosture`,{value:R.enum(Jc),default:`auto`,audited:!0}),preference(`chat.default`,{value:z_,default:{},audited:!0}),preference(`conversationSurface`,{value:R.enum(ba),default:`panel`}),preference(`mailboxListMode`,{value:R.enum(os),default:`threads`}),preference(`mailboxReaderLayout`,{value:R.enum(ss),default:`panel`}),preference(`home`,{value:R.string().uuid().nullable(),default:null}),preference(`memory.learnFromEmail`,{value:R.boolean(),default:!0,audited:!0}),preference(`memory.shareWithTeam`,{value:R.boolean(),default:!0,audited:!0}),preference(`onboarding.completed`,{value:R.boolean(),default:!1,audited:!1}),preference(`decisions.seenAt`,{value:R.iso.datetime().nullable(),default:null}),preference(`decisions.delivery`,{value:B_,default:{inApp:!0},parameter:`decision type`,parameters:Object.keys(y),refine:(e,t)=>!e.inApp&&isActionableType(t)?`A "${t}" decision asks you to act: it is always shown in-app`:void 0})];export{wi as ACCESS_CAPABILITIES,Ti as ACCESS_LEVELS,Ei as ACCESS_ROLES,u as ACTIONABLE_DECISION_KINDS,Di as ACTOR_TYPES,d as AGENDA_BLOCK,Oi as AGENT_ASIDE_ANSWER_MAX_LENGTH,ki as AGENT_ASIDE_HISTORY_LIMIT,Ai as AGENT_ASIDE_QUESTION_MAX_LENGTH,ji as AGENT_AVATAR_EXPRESSIONS,Mi as AGENT_AVATAR_TYPES,Ni as AGENT_MESSAGE_KIND,Pi as AGENT_MESSAGE_SENDER_NAME_KEY,Fi as AGENT_NOTIFICATION_KIND,Ii as AGENT_SESSION_ACCESS_ROLES,Li as AGENT_SESSION_LIST_ORDERS,Ri as AGENT_SESSION_ORIGINS,zi as AGENT_SESSION_PROVENANCES,Bi as AGENT_STARTERS_MAX,Vi as AGENT_STARTER_MAX_LENGTH,Hi as AGENT_SYSTEM_PROMPT_MAX_LENGTH,Ui as AGENT_TASK_KINDS,Wi as AGENT_WAKE_KIND,f as AGGREGATE_BUCKETS,p as AGGREGATE_MEASURES,Gi as AI_MODEL_INPUT_MODALITIES,Ki as AI_MODEL_PROFILE_LABELS,qi as AI_MODEL_REASONING_MODES,Xg as ALLOWED_PROPERTY_TYPES,Ji as ALL_CATALOG_TOOL_NAMES,V as ALL_PIPES,Yi as ALWAYS_KINDS,Xi as APPEARANCE_FACETS,Zi as APPROVAL_FAMILY_TOOL_NAMES,Qi as ARCHITECT_PUBLICATION_KIND,Jg as ARTIFACT_FILE_ROLES,Kg as ARTIFACT_KINDS,m as ARTIFACT_PREVIEW_EXTENSION,qg as ARTIFACT_RETENTIONS,$i as ASK_QUESTIONS_ANSWER_MAX_LENGTH,ea as ASK_QUESTIONS_ANSWER_MAX_VALUES,ta as ASK_QUESTIONS_FILE_REF,na as ASK_QUESTIONS_MAX_ADDED_FILES,ra as ASK_QUESTIONS_MAX_BATCH,ia as ASK_QUESTIONS_TOOL_NAME,aa as ATTACH_FILE_ACTIONS,h as ATTRIBUTE_FILTER_OPERATORS,ee as ATTRIBUTE_NAME_SCHEMA,te as ATTRIBUTE_TYPES,ne as ATTRIBUTE_TYPE_DESCRIPTORS,oa as AUDIT_ACTIONS,sa as AUDIT_AGENT_SESSION_METADATA_KEY,ca as AUDIT_RESOURCE_TYPES,Jh as AccessDeniedError,AgendaBuilder,M as AgentBuilder,Yh as AggregateValidationError,Xh as AmbiguousSchemaChangeError,Zh as AttributeInUseError,Qh as AttributeNotFoundError,la as BILLING_MODES,re as BLOCK_CONTEXTS,ie as BLOCK_PERIODS,g as BLOCK_WIDTHS,ua as BROWSER_LAUNCH_TOOL_NAME,da as BROWSER_TOOL_NAMES,fa as BUNDLE_LOCALES,K as BUNDLE_NAME_PATTERN,pa as BUNDLE_SETUP_PROMPT_MAX_LENGTH,Yg as BYTE_UNIT_LABELS,BlockContentBuilder,BundleBuilder,_ as CARD_BLOCK,ma as CATALOG_RESOURCES,v as CHART_BLOCK,ae as CHART_KINDS,oe as CHART_ORDERS,Ir as COMPUTED_RETURN_TYPES,ha as CONNECTION_GRANT_PROVIDERS,ga as CONNECTION_STATUS_IDS,_a as CONNECTOR_PROVIDER_IDS,va as CONNECTOR_SCOPES,se as CONTENT_PLACEMENT_CONTEXTS,ya as CONTINUATION_KEY_PATTERN,ba as CONVERSATION_SURFACES,xa as COPY_VERB_NAME,q as CORE_BUNDLE_NAME,V_ as CORE_PREFERENCES,Sa as CORE_RECORD_TOOL_NAMES,Ca as CORE_TOOL_NAMES,wa as COUNT_MODES,Ta as CUSTOM_LEVEL,CardBuilder,ChartBuilder,ChartQuery,$h as ConcurrentModificationError,X as ContentBuilder,ce as DECISIONS_BLOCK,le as DECISION_INBOX_STATES,ue as DECISION_KINDS,de as DECISION_LINE_MAX_LENGTH,fe as DECISION_LINK_TARGET_TYPES,pe as DECISION_LIST_STATES,me as DECISION_READ_STATES,he as DECISION_SENDER_KINDS,ge as DECISION_SETTINGS_AREAS,_e as DECISION_TITLE_MAX_LENGTH,ve as DECISION_TRANSFERS_KEY,ye as DECISION_TYPES_V1,be as DECISION_TYPE_ACCESS_GRANTED,xe as DECISION_TYPE_AGENT_APPROVAL,Se as DECISION_TYPE_AGENT_MESSAGE,Ce as DECISION_TYPE_AGENT_QUESTION,we as DECISION_TYPE_AGENT_REVIEW,Te as DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,Ee as DECISION_TYPE_AGENT_SETUP,De as DECISION_TYPE_BUNDLE_SETUP,Oe as DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,ke as DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,Ae as DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,y as DECISION_TYPE_KINDS,je as DECISION_TYPE_PERSON,Me as DECISION_TYPE_RECORD_ASSIGNED,Ne as DECISION_TYPE_RECORD_MENTIONED,Pe as DECISION_WORK_STATES,Ea as DEFAULT_AGENT_EXECUTION_CONFIG,Da as DEFAULT_AGENT_TOOL_GROUPS,Oa as DEFAULT_APPEARANCE_ICON,ka as DEFAULT_APPROVAL_POLICY,Aa as DEFAULT_BLUEPRINT_TOOL_GROUPS,ja as DEFAULT_DAILY_ACTIVITY_DAYS,Ma as DEFAULT_DICTATION_LIMITS,i_ as DEFAULT_LABEL_FALLBACK,Fe as DEFAULT_LAYOUT_TRAITS,Na as DEFAULT_MEETING_BOT_DISPLAY_NAME,Pa as DEFAULT_TENANT_SETTINGS,Lr as DEFAULT_VALIDATION_MESSAGES,Fa as DEVICE_ACCESS_ROLES,Ia as DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS,La as DEVICE_CHANNEL_IDLE_POLL_MS,Ra as DEVICE_CHANNEL_KEEPALIVE_MS,za as DEVICE_CHANNEL_MAX_FRAME_BYTES,Ba as DEVICE_CHANNEL_PATH,Va as DEVICE_CHANNEL_PRESENCE_MS,Ha as DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION,Ua as DEVICE_COMMAND_ERROR_CODES,Wa as DEVICE_DESKTOP_STATES,Ga as DEVICE_SHELLS,Ka as DICTATION_FINALIZATION_TIMEOUT_MS,qa as DICTATION_FRAME_BYTES,Ja as DICTATION_MAX_BUFFER_BYTES,Ya as DICTATION_MAX_FRAME_BYTES,Xa as DICTATION_MAX_TRANSCRIPT_BYTES,Za as DICTATION_MODEL_ID,Qa as DICTATION_PREPARATION_TIMEOUT_MS,$a as DICTATION_SAMPLE_RATE,eo as DICTATION_TICKET_TTL_MS,to as DISCARD_ARCHITECT_DRAFT_TOOL_NAME,no as DOCUMENT_KINDS,ro as DOCUMENT_SORT_MODES,k_ as DRAFT_CONFLICT_KINDS,io as DRAFT_WRITE_TOOL_NAMES,DecisionsBuilder,ao as DeviceChannelProtocolError,oo as DeviceChannelServerFrameSchema,so as DeviceChannelWorkerFrameSchema,co as DeviceDesktopStatusSchema,N as DuplicateError,lo as EMAIL_CATEGORY_DEFAULT_COLOR,uo as EMAIL_CATEGORY_DEFAULT_ICON,fo as EMAIL_CATEGORY_DESCRIPTION_MAX,po as EMAIL_CATEGORY_DESCRIPTION_MIN,mo as EMAIL_CATEGORY_LIMIT,ho as EMAIL_CATEGORY_NAME_MAX,go as EMAIL_CATEGORY_SCOPES,_o as EMAIL_CLASSIFIED_BY,vo as EMAIL_DIRECTIONS,yo as EMAIL_PARTICIPANT_ROLES,bo as EMAIL_PROVIDERS,xo as EMAIL_RULE_SCOPES,So as ENVIRONMENT_BUILD_LOG_STEPS,Co as ENVIRONMENT_BUILD_LOG_STEP_PREFIX,wo as ENVIRONMENT_HARNESSES,To as ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,Eo as ENVIRONMENT_HARNESS_WORKDIR,Do as ENVIRONMENT_IMAGES,Oo as ENVIRONMENT_MEMORY_GB_PER_VCPU,ko as ENVIRONMENT_NAME_MAX_CHARS,Ao as ENVIRONMENT_NETWORK_ALLOW_MAX,jo as ENVIRONMENT_SCRIPT_MAX_BYTES,Mo as ENVIRONMENT_SIZES,No as ENVIRONMENT_SIZE_VCPUS,Po as ENVIRONMENT_STANDARDS_WORKDIR,Fo as ENV_VAR_KEY_PATTERN,Io as ESTIMATED_COUNT_CAP,eg as ExportTooLargeError,Lo as FILE_LIST_MAX_IDS,Ro as FILE_OCR_STATUSES,zo as FILE_URLS_MAX_IDS,z as FORM_FORBIDDEN_ATTRIBUTE_TYPES,Bo as FORM_STATUSES,Vo as FORM_SUBMISSION_STATUSES,tg as ForbiddenError,FormBuilder,FormRowBuilder,FormStepBuilder,Ho as GET_ARCHITECT_DRAFT_TOOL_NAME,Uo as GITHUB_TRIGGER_CATALOG,Wo as GITHUB_TRIGGER_FAMILIES,Go as GRANT_ENABLES,Ie as GROUPABLE_ATTRIBUTE_TYPES,S_ as GroupBuilder,Ko as HARNESS_BRIDGE_PORT,Le as HEADING_BLOCK,Re as HIERARCHY_ATTRIBUTE_IDS,ze as HIERARCHY_ATTRIBUTE_NAMES,Be as HIERARCHY_CHILD_IDS_LIMIT,qo as HITL_TOOL_NAMES,Jo as IMAGE_FORMATS,Yo as IMAGE_SHAPES,Xo as IMAGE_SOURCES,Zo as INFERENCE_REASONING_OPTIONS,Qo as INFERENCE_ROUTING_MODES,$o as INFERENCE_SPEEDS,Ve as INVENTORY_LIMIT,ng as InvalidPermissionGrantError,es as LAST_RUN_ERROR_MAX_LENGTH,ts as LINK_COOKIE_MAX_AGE_MS,ns as LINK_DEFAULT_MS,rs as LINK_MAX_MS,He as LIST_VIEW_TAB_VISIBILITIES,Ue as LOCATION_FILTER_PROPERTIES,rg as LogoProviderUnavailableError,ig as LogoSearchRateLimitedError,is as MACHINE_KEY_KINDS,as as MAILBOX_ACCOUNT_VISIBILITIES,We as MAILBOX_BLOCK,os as MAILBOX_LIST_MODES,ss as MAILBOX_READER_LAYOUTS,cs as MAIL_DRAFT_BODY_MAX_CHARS,ls as MAIL_DRAFT_MODES,us as MAIL_SIGNATURE_MAX_CHARS,ds as MAIL_SUBJECT_MAX_CHARS,Ge as MAX_AGGREGATE_GROUPS,fs as MAX_DAILY_ACTIVITY_DAYS,Gg as MAX_PRESET_DEPTH,ps as MAX_TODOS,ms as MAX_TODO_DESCRIPTION_CHARS,hs as MAX_TODO_ID_CHARS,A_ as MCP_SERVER_NAME_MAX_LENGTH,Ke as MEASURABLE_ATTRIBUTE_TYPES,qe as MEETINGS_UPCOMING_BLOCK,gs as MEETING_BOT_IMAGE,_s as MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,vs as MEETING_BOT_MEMBER_CAP,ys as MEETING_BOT_NO_CREDITS,bs as MEETING_BOT_SILENT_REASON,xs as MEETING_CONFERENCE_REQUESTS,Ss as MEETING_PARTICIPANT_ROLES,Cs as MEETING_RESPONSES,ws as MEETING_RESPONSE_STATUSES,Ts as MEETING_STATUSES,U as MEMORY_ATTRIBUTES,s_ as MEMORY_PAGE_MAX_CHARS,Es as MEMORY_SPEND_LIMIT_PATTERN,c_ as MEMORY_WORKSPACE_PROFILE,o_ as MEMORY_WRITE_SOURCE,u_ as METERED_CHARGE_KINDS,l_ as METERED_RATES_USD,b as METRIC_BLOCK,MailboxBuilder,ag as MemoryNotFoundError,MetricBuilder,MetricQuery,MultiRelationAttributeBuilder,Ug as NATIVE_AGENT_UI_PART_IDS_METADATA_KEY,Wg as NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION,Je as NATIVE_BLOCKS,Ye as NATIVE_OBJECT_NAMES,Ds as NATIVE_TOOL_GROUPS,Os as NATIVE_TOOL_GROUP_CATALOG,ks as NEWS_DEFAULT_DISPLAY_DAYS,As as NEWS_DISPLAY_CAP_DAYS,js as NEWS_INDEX_MAX_ENTRIES,Ms as NEWS_INTENSITIES,Ns as NEWS_TARGET_KINDS,Ps as NO_ACCESS,R_ as NO_PREFERENCE_PARAMETER,Fs as NO_RECORDING,Xe as NO_VALUE_OPERATORS,e as NonJsonValueError,NoopGeocodingAdapter,og as NotFoundError,sg as NotImplementedError,Is as OAUTH_TICKET_TTL_MS,Ls as OBJECT_GRANT,Ze as OBJECT_NAME_SCHEMA,W as OFFICIAL_SKILLS_REPO,Rs as OPEN_TOOL_PART_STATES,zs as OPERATION_MAX_STEPS,Qe as OPERATORS_BY_TYPE,ObjectBuilder,cg as ObjectNotFoundError,lg as ObjectReferencedError,ug as OrphanSystemAttributeError,$e as PAGE_GRID_COLUMNS,Bs as PERMISSION_ACTIONS,Vs as PERMISSION_CAPABILITIES,Hs as PERMISSION_CATALOG,Us as PERSISTENCE_OWNED_QUOTA_KEYS,Qg as PIPES_WITH_ARGS,Ws as PROVIDER_DRAFT_LABEL,Gs as PROVIDER_NAMES,Ks as PUBLIC_MAIL_DOMAINS,J as PageBuilder,dg as PageReferencedError,fg as ProtectedResourceError,pg as ProtectedRoleError,et as QUALIFIED_SEPARATOR,tt as QUERY_OBJECT,qs as QUESTION_FAMILY_TOOL_NAMES,Js as QUOTA_KEYS,mg as QueryTimeoutError,Ys as RECENT_ACTIVITY_LEDGER_LIMIT,Xs as RECIPIENT_IDENTITIES_MAX,Zs as RECORDING_OVERRIDES,Qs as RECORDING_POLICIES,$s as RECORD_ACCESS_ROLES,ec as RECORD_ACCESS_SOURCES,tc as RECORD_DRIVE_CURSOR_MAX_LENGTH,nc as RECORD_DRIVE_PAGE_DEFAULT_LIMIT,rc as RECORD_DRIVE_PAGE_MAX_LIMIT,ic as RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,ac as RECORD_GRAPH_MAX_LIMIT_PER_NODE,oc as RECORD_GRAPH_MAX_NODES,sc as RECORD_IMAGE_MAX_BYTES,nt as RECORD_LINKS_BLOCK,x as RECORD_LINKS_CONTENT,rt as RECORD_LIST_SCOPES,it as RECORD_OBJECT,cc as REFERENCE_KINDS,at as RELATION_TARGET_ANY,ot as REMOVED_OPERATOR_REPLACEMENTS,lc as REPLY_MODES,uc as REPOSITORY_WILDCARD,dc as REQUEST_DESIGN_REVIEW_TOOL_NAME,fc as REQUEST_SETUP_TOOL_NAME,st as RESERVED_ATTRIBUTE_NAMES,ct as RESERVED_OBJECT_NAMES,pc as RESOURCE_GRANT_KINDS,mc as RESOURCE_KIND_CATALOG,lt as RESOURCE_VISIBILITIES,hc as ROUTING_PRICE_CEILINGS,gc as RUN_ORIGIN_METADATA_KEY,hg as RealtimeDeliveryError,gg as RealtimeRateLimitedError,_g as RealtimeSubscriptionError,vg as RecordNotFoundError,ut as RecordQuery,yg as RecordReferencedError,bg as RepositoryError,P as ReservedObjectNameError,xg as RoleNotFoundError,Sg as SCHEMA_ERROR_HTTP_STATUS,S as SCHEMA_LIMITS,B as SCHEMA_OWNER_PATTERN,w_ as SCHEMA_SOURCE_RETYPE_FROM,_c as SEND_VERB_NAME,vc as SESSION_INFERENCE_PATCH_KEYS,Zg as SIMPLE_PIPES,Rr as SIMPLE_PROPERTY_TYPES,yc as SLACK_TRIGGER_CATALOG,bc as SLACK_TRIGGER_EVENTS,xc as SPEAKS_THROUGH_SEND_METADATA_KEY,f_ as STANDARD_SCHEMA_VENDOR,Sc as SURFACE_TOOL_NAMES,dt as SYNONYM_ALIASES,ft as SYSTEM_ATTRIBUTES,pt as SYSTEM_ATTRIBUTE_I18N_KEYS,Cc as SYSTEM_EMAIL_CATEGORIES,wc as SYSTEM_EMAIL_CATEGORY_NAMES,mt as SYSTEM_FIELD_NAMES,ht as SYSTEM_FILTER_ATTRIBUTE_TYPES,Tc as SYSTEM_PART_CODES,F as SchemaError,I as SchemaErrorCode,Cg as SearchBackendError,wg as SearchPathNotIndexedError,SingleRelationAttributeBuilder,Tg as StorageError,Eg as SyncCascadeError,Dg as SyncConflictError,Og as SyncError,kg as SystemEntityImmutableError,Ec as TASK_DEMAND_LEVELS,Dc as TENANT_INVITATION_DEFAULT_TTL_MS,Oc as TENANT_INVITATION_DELIVERY_STATUSES,kc as TENANT_INVITATION_MAX_TTL_MS,Ac as TENANT_INVITATION_MIN_TTL_MS,jc as TENANT_INVITATION_RESEND_INTERVAL_MS,Mc as TENANT_INVITATION_STATUSES,C as TEXT_BLOCK,zr as TEXT_FORMAT_PATTERNS,Nc as TODO_PHASES,Pc as TODO_PLAN_STATUSES,Fc as TODO_STATUSES,Ic as TOOL_APPROVAL_STATES,Lc as TOOL_IMPACT_COUNT_KEYS,Rc as TRANSCRIPT_STATUSES,zc as TRIAGE_ACTIONS,Bc as TRIGGER_EVENT_TYPES,Vc as TRIGGER_MAX_REENTRY,Hc as TURN_OUTCOMES,Ag as ToolGroupGrantError,gt as UNORDERED_CHART_KINDS,Uc as UNSHAREABLE_OBJECT_NAMES,Wc as USAGE_MODALITIES,Gc as USAGE_SCOPES,Kc as USERS_RESOLVE_MAX_IDS,qc as USER_STATUSES,Jc as USER_WORK_POSTURES,Yc as VERB_NAMES,L as ValidationError,Y as ViewBuilder,Xc as WAKE_TURN_METADATA_KEY,Zc as WAKE_TURN_SPOKE_METADATA_KEY,Qc as WALLET_STATUSES,Br as WIRE_OFFERED_BASE_CONFIG,Vr as WIRE_OMITTED_CONFIG_KEYS,jg as WorkspaceInvariantReason,$c as accessGrantSchema,el as actorSchema,tl as agent,nl as agentApprovalResolutionSchema,rl as agentAvatarFromMetadata,il as agentAvatarOutputSchema,al as agentAvatarSchema,ol as agentConversationOverviewSchema,sl as agentDataChunk,cl as agentDefinitionActivitySchema,ll as agentDefinitionAudienceSchema,ul as agentDefinitionDailyActivitySchema,dl as agentDefinitionSchema,fl as agentDisplayName,pl as agentExecutionConfigOutputSchema,ml as agentHistoryMessageSchema,hl as agentInferencePreferencesOutputSchema,gl as agentInferencePreferencesSchema,_l as agentMemoryViewSchema,vl as agentMessageAttachmentSchema,yl as agentMessagePartSchema,bl as agentRequestAnswerSchema,xl as agentRoleSchema,Sl as agentRolesSetResultSchema,Cl as agentRunSchema,wl as agentRunStatusSchema,Tl as agentScheduleOutputSchema,El as agentScheduleSchema,Dl as agentSessionAudienceSchema,Ol as agentSessionDefinitionAppearanceSchema,kl as agentSessionHistoryPageSchema,Al as agentSessionInferenceOverridesInputSchema,jl as agentSessionInferenceOverridesSchema,Ml as agentSessionLinkSchema,Nl as agentSessionMessageOutputSchema,Pl as agentSessionMessageSchema,Fl as agentSessionSchema,Il as agentSetupResponseSchema,Ll as agentStartersSchema,Rl as agentTodoPlanViewSchema,zl as agentToolCatalogSchema,Bl as agentTriggerBaseSchema,Vl as agentTriggerDefinitionSchema,Hl as agentTriggerLastCallSchema,Ul as agentTriggerPatchSchema,Wl as agentTriggerSchema,Gl as agentUIValidationError,Kl as agentWakeSchema,ql as agentWakeViewSchema,Jl as apiKeyRoleSchema,Yl as apiKeySchema,Xl as apiKeyWithSecretSchema,applyPipes,Zl as architectProjectionSchema,Ql as artifactQuoteSchema,t as asTenantId,n as asUserId,$l as askQuestionsOutputSchema,assertBundleName,eu as assertCustomAgentUIMessageChunk,assertSchemaSourceResolutions,tu as assertSessionState,nu as attachedRecordDocumentSchema,Hr as attributeConfigSchemas,vt as attributeFilterTarget,yt as attributeInventory,ru as attributeOutputSchema,iu as attributeSaveOutputSchema,au as auditChangeSchema,ou as auditLogEntrySchema,su as availableBundleSummarySchema,bt as blockObjectInputs,cu as browserProfilePreparationSchema,lu as browserProfileViewSchema,buildPropertySchema,xt as buildQualifiedAttribute,builtBundleFromPieces,bundle,uu as bundleAddPlanSchema,du as bundleAddResultSchema,fu as bundleContentsSchema,pu as bundleListSchema,mu as bundleModeSchema,hu as bundleOriginSchema,gu as bundlePieceKindSchema,_u as bundlePlanPieceSchema,vu as bundleRemovalPreviewSchema,yu as bundleStatusEntrySchema,bu as bundleStatusSchema,xu as bundleUpdateDependentSchema,Su as bundleUpdateGroupSchema,Cu as bundleUpdatePieceKindSchema,wu as bundleUpdatePieceSchema,Tu as bundleUpdatePlanSchema,Eu as bundleUpdateReasonCodeSchema,Du as bundleUpdateResultSchema,Ou as cancelAgentWakeResultSchema,r as canonicalStringify,ku as canonicalToolGroups,St as canonicalizeFilterValue,Au as capabilityForResource,Ct as capped,checkbox,ju as classificationRestoreSchema,Mu as classificationUndoSchema,Nu as classifyEmailResultSchema,Pu as classifyEmailSchema,Fu as cliDefaultModelOf,Iu as cloudBrowserLiveViewSchema,wt as collectContentViewCatalogue,Tt as collectQualifiedRuleIssues,Et as collectionContentSourceSchema,Lu as collectionOutputSchema,Ru as collectionPageSchema,Dt as collectionSourceAddress,Ot as collectionSourceAddressOf,kt as colorIdSchema,At as columnsSchema,zu as compareAgentSessionMessages,compareSchemaStateEntries,Bu as compareVersions,Vu as compiledHarnessModels,computeByteMagnitude,Hu as computeReconnectDelay,Uu as computeRetryDelay,Wu as connectionCapabilitiesSchema,Gu as connectionGrantKindsOf,Ku as connectionSyncProgressSchema,qu as connectionViewSchema,Ju as connectorProvidersResultSchema,Yu as connectorTriggerMatchSchema,C_ as content,contentDefinition,w as contentExtensionRegistry,jt as contentReadObjects,T as contentViewDefinitionSchema,Mt as contentViewDefinitionSchemaFor,convertRetypedValue,Xu as createAgentTriggerResultSchema,Ur as createAttributeValidator,Wr as createFormAttributeValidator,createStandardSchemaProps,Zu as criticConfigOutputSchema,currency,Nt as currentActor,Qu as customDataChunkSchemas,date,Pt as decisionArchiveAllResultSchema,Ft as decisionAttachmentSchema,It as decisionCountsSchema,Lt as decisionHandedBy,Rt as decisionLinkSchema,zt as decisionListResultSchema,Bt as decisionRecipientSchema,Vt as decisionSchema,Ht as decisionSenderSchema,Ut as decisionThreadKey,Wt as decisionTransferBy,Gt as decisionTransferTargetsSchema,Kt as decisionTransferTo,qt as decisionTransfersOf,Jt as decisionWithRecipientSchema,$u as declaredImageRequests,ed as decodeAgentSessionListCursor,td as decodeRecordValues,i as deepEqual,nd as defaultEnvironmentSchema,rd as deferredRetypeSchema,Yt as defineBlock,deriveLayout6,id as deriveViewerAccess,Xt as describeViewIssue,detailView,ad as deviceAudienceSchema,od as deviceChannelUrl,diffSchemaState,Zt as displayAttributesSchema,document,sd as documentFileSchema,cd as documentRecordOwnerPageSchema,ld as documentRecordOwnerSchema,ud as documentSchema,dd as documentWithSubCountSchema,fd as draftAppendOutputSchema,pd as draftCommandGuardSchema,Qt as draftContentViewDefinitionSchema,$t as draftContentViewDefinitionSchemaFor,md as driveFileSchema,droppedContents,hd as durableDateSchema,en as edgePropertyFilterTarget,gd as editAgentSessionMessageResultSchema,_d as effectivePermissionsSchema,vd as emailAttachmentMetaSchema,yd as emailCategoryCreateSchema,bd as emailCategoryDeleteSchema,xd as emailCategorySchema,Sd as emailCategoryScopeQuerySchema,Cd as emailCategoryUpdateSchema,wd as emailCategoryUsageSchema,Td as emailParticipantRefSchema,Ed as emailRuleScopeSchema,Dd as emailSenderRuleSchema,Od as emailVerdictSchema,kd as encodeAgentSessionListCursor,Ad as encodeRecordValues,jd as envVarEntrySchema,Md as environmentBuildFailureSchema,Nd as environmentBuildStateSchema,Pd as environmentDetailSchema,Fd as environmentHarness,Id as environmentHarnessSchema,Ld as environmentListSchema,Rd as environmentNetworkPolicyOutputSchema,zd as environmentRepositorySourceSchema,Bd as environmentSchema,Vd as environmentWorkdir,extractAttributeNames,extractAttributePaths,tn as extractCurrencyFilterValue,nn as extractFilterValue,extractReadRecordIds,extractTouchedArtifacts,extractTouchedDocuments,extractTouchedRecords,Hd as fileSchema,Ud as fileUrlsResponseSchema,rn as filterOperatorsOfType,an as filterStateSchema,on as filterTargetsOf,Wd as findEnvironmentHarness,Gd as findGrantIssues,sn as findGridViolation,cn as findGroupViolation,ln as findLayoutRuleViolation,un as findRelationAttribute,dn as findRowLimitViolation,foldText,form,Kd as formDefinitionSchema,formFieldFlatKey,formFieldKey,qd as formSlotSchema,Jd as formStepSchema,Yd as formSubmissionSchema,formatByteSize,fn as formatDecisionLink,Xd as formatNewsTarget,qr as formatPhoneForDisplay,Zd as formatReference,formatSkillSource,Jr as formatZodErrors,formula,a as generateId,pn as getAttributeCapabilities,Yr as getAttributeConfigSchema,Xr as getAttributeConfigWriteSchema,mn as getAttributeFilterOperators,getEditableLabelAttribute,hn as getHierarchyAttributes,gn as getObjectSystemAttributes,_n as getOperatorPolarity,vn as getRollupFilterOperators,getSingleAttributeFromExpression,getSlotFieldTargets,yn as getSystemAttributeI18nKey,bn as getSystemAttributeList,Qd as githubConditionSchema,$d as githubTriggerMatchSchema,ef as grantKindOf,xn as gridPositionSchema,group,Sn as groupSizeMessage,Cn as groupedMembers,tf as harnessModelChoices,nf as harnessModelListSchema,rf as harnessModelOptionSchema,af as hasLocale,hasOptions,wn as hasTypeTrait,Tn as hasValueKind,hashBundlePieces,of as humanRequestId,sf as humanRequestKind,E as iconNameSchema,imageLookupKindOf,cf as imageModelFormatDefect,lf as imageModelIdSchema,o as indexBy,En as inferInverseCardinality,uf as inferenceReasoningSchema,df as inferenceRoutingSchema,ff as inferenceSpeedSchema,Dn as input,pf as installedBundleSummarySchema,On as invalidViewMessage,kn as isActionableDecisionKind,mf as isAgentMessageMetadata,hf as isAgentNotificationMetadata,gf as isAgentUIDataName,_f as isAgentWakeMetadata,vf as isAgentWrittenAuditEntry,yf as isArchitectPublicationMetadata,An as isAttributeFilterable,jn as isAttributeGroupable,Mg as isAttributeInUseError,Mn as isAttributeKanbanGroupable,Nn as isAttributeSearchable,Pn as isAttributeSortable,bf as isAwaitingHuman,Fn as isBilateralRelation,xf as isBlocking,In as isBoardGrouping,isBundle,Ln as isCalendarDay,Sf as isCatalogResource,Rn as isCollectionContent,zn as isDynamicValue,Qr as isEmptyValue,Cf as isEnvironmentBuildLogStep,wf as isEnvironmentHarnessId,Tf as isFormDefinition,isFormFieldsRow,isFormFreeFieldRef,isFormHeadingRow,isFormSeparatorRow,isFormSlotFieldRef,isFormTextRow,Bn as isHierarchyAttribute,Ef as isImageSource,isLabelExpression,Vn as isLocationFilterProperty,Hn as isLocationPartOperator,Df as isMailProvider,Of as isMailboxListMode,Un as isManagedSystemAttribute,isMeteredChargeKind,D as isNativeObjectName,kf as isNativeToolGroup,Wn as isNoValueOperator,Ng as isNotFoundError,$r as isNullishOrEmptyString,Pg as isObjectReferencedError,Af as isOpenToolPartState,jf as isParkedOnHuman,isPinnedSkillSource,Gn as isPlainRecord,Fg as isProtectedResourceError,Mf as isProviderDraft,Nf as isPublicMailDomain,Pf as isQuestionPart,Ig as isRecordReferencedError,Kn as isRelativeDateValue,Ff as isReplyMode,If as isResourceGrant,Lf as isRoutineActorMetadata,Lg as isSchemaError,Rf as isSemver,zf as isSessionInferencePatch,qn as isSetMembershipOperator,isSkillRepository,isStandardSchema,Bf as isSystemEmailCategory,Vf as isSystemEmailCategoryName,Hf as isSystemPartCode,Uf as isToolApprovalState,Wf as isToolImpactCountKey,Jn as isUniversalRelation,Rg as isValidationError,O as isValueKindType,ei as isValuePresent,isWherePipe,Gf as isWildcard,judgePreferenceWrite,keptFill,H as labelExpressionSchema,Kf as lastPublicationSchema,qf as lastPublishErrorSchema,Yn as layoutTraitsOf,Jf as levelActions,Yf as levelFloor,Xf as levelOf,Zf as linkedRecordRefSchema,listView,locatePreference,location,Xn as locationPartFilterTarget,Qf as lockingSendCall,$f as loginSecretEntrySchema,ep as mailDraftAttachmentSchema,tp as mailDraftSchema,np as mailSignatureSchema,rp as mailboxAccountSchema,ip as mailboxCursorSchema,ap as mailboxEmailSchema,op as mailboxListResponseSchema,sp as mailboxSenderImageSchema,cp as mailboxThreadDetailSchema,lp as mailboxThreadSchema,up as matchesRepositoryPattern,dp as mcpCatalogCategorySchema,fp as mcpCatalogEntrySchema,pp as mcpOAuthAttemptStartedSchema,mp as mcpOAuthSetupSchema,hp as mcpServerAuthTypeSchema,gp as mcpServerStatusSchema,_p as mcpServerViewSchema,vp as meetingBotDispatchRequestSchema,yp as meetingBotDispatchResponseSchema,bp as meetingBotNotificationSchema,xp as meetingLinkedRecordSchema,Sp as meetingParticipantRefSchema,Cp as meetingRecordingSchema,wp as meetingSchema,Tp as meetingSiblingRefSchema,Ep as meetingTranscriptProvenanceSchema,Dp as meetingTranscriptResponseSchema,Op as meetingTranscriptSegmentSchema,kp as meetingTranscriptSourceRefSchema,Ap as meetingsListResponseSchema,jp as memberSchema,k as memberlessGroups,memoryPageViewOf,Mp as mentionReferenceSchema,Np as mergeSessionInferencePatch,meteredUsd,Zn as metricComparePeriod,Pp as modelDefinitionOutputSchema,Fp as modelDefinitionSchema,L_ as modelIdentitySchema,Ip as modelReferenceOutputSchema,Lp as modelReferenceSchema,moveWidensAudience,multiselect,Rp as mutationReceiptSchema,zp as myPreferencesSchema,nameSlug,O_ as namedTargetSchema,nativeAgentUIPartIdMetadataKey,Bp as needsManageWhenUnattended,Vp as newsBodySchema,Hp as newsIndexSchema,ti as normalizeCountrylessPhoneNumber,Qn as normalizeFilterRule,$n as normalizeForEdgeRpc,Up as normalizeNewsLocale,er as normalizeOperator,ni as normalizePhoneNumber,Wp as normalizedMeetingTranscriptSchema,tr as now,number,Gp as oauthAttemptStartedSchema,object,Kp as objectDefinitionOutputSchema,x_ as objectImageSchema,qp as objectRecordOutputSchema,Jp as openRequests,Yp as orderAgentSessionMessages,packLayout,page,Xp as pageAudienceSchema,pageCompactor,Zp as pageReadSchema,Qp as pageSummarySchema,rr as pageTraitsOf,$p as parseAgentDefinitionAccessRole,em as parseAgentSessionAccessRole,ri as parseAttributeConfig,ii as parseAttributeConfigForCreate,ai as parseAttributeConfigForUpdate,A as parseBlockParameters,tm as parseCountMode,ir as parseDecisionLink,nm as parseDeviceAccessRole,rm as parseDeviceChannelFrame,im as parseMergedAgentTrigger,parseNamedTarget,parseNativeAgentUIPartIdsMetadata,am as parseNewsBody,om as parseNewsIndex,sm as parseNewsIntensity,cm as parseNewsTarget,lm as parseOptionalCountMode,um as parsePageAccessRole,ar as parseQualifiedAttribute,dm as parseRecordAccessRole,or as parseRecordListScope,fm as parseReference,sr as parseResourceVisibility,parseSchemaGroupPresentation,parseSchemaOwner,parseSchemaState,pm as parseServerFrame,parseSkillSource,mm as parseToolGroupGrant,parseWherePipe,hm as parseWorkerFrame,gm as permissionFlagsSchema,_m as permissionGrantSchema,vm as permissionSchema,phone,placeNew,preference,ym as preferenceEntry,bm as preferenceEntrySchema,oi as propertyAttributeSchema,si as propertyAttributeWireSchema,ci as propertySchemaSchema,li as propertySchemaWireSchema,xm as providerNameSchema,Sm as publishBlockerSchema,Cm as publishDraftOutputSchema,j as publishedViewContentDefinitionSchema,cr as query,wm as quotaStateSchema,Tm as readArchitectPublication,readArtifactResult,Em as readAskQuestionsResult,readFormFieldValue,readGeneratedImageResult,Dm as readRunOriginMetadata,Om as recentActivityEntryKey,km as recipientContactSchema,Am as recipientIdentitySchema,jm as recipientSuggestionSchema,Mm as recordAggregatesSchema,Nm as recordAudienceSchema,Pm as recordCollectionOutputSchema,Fm as recordDeletionCountSchema,Im as recordDriveChildSchema,Lm as recordDriveChildrenPageSchema,Rm as recordDriveSearchHitSchema,zm as recordDriveSearchResultSchema,Bm as recordGraphEdgeSchema,Vm as recordGraphNodeKey,Hm as recordGraphNodeSchema,Um as recordGraphRequestSchema,Wm as recordGraphResponseSchema,Gm as recordIncomingReferenceSchema,Km as recordIncomingReferencesPageSchema,recordLinksTab,qm as recordMeetingsCount,Jm as recordOperationSchema,Ym as recordPurgeResultSchema,lr as recordQueryDefinitionSchema,Xm as recordValuesCodec,Zm as recordsBulkCreateResultSchema,Qm as recordsBulkDeleteResultSchema,$m as recordsBulkUpdateResultSchema,eh as refineTrigger,ui as refuseForeignKeys,di as rejectUnknownAttributesOrThrow,relation,ur as relationAcceptsObject,th as relationOptionSchema,nh as relationOptionsResponseSchema,relationProperty,dr as relationTargetsOf,renderLabelExpression,repairPageGrid,rh as replyDefaultsSchema,ih as requestedCapabilities,pr as requireRecordContentContext,mr as requireSingleRelationTarget,ah as resolveAppearance,hr as resolveCollectionActions,gr as resolveContentNavigation,_r as resolveEffectiveFilterType,resolveFieldRequired,vr as resolveIsWithinBounds,oh as resolveLocalized,resolvePageGrid,resolvePropertyDefinitions,fi as resolveTextPattern,yr as resolveUtcDayBounds,resolveViewContents,sh as resolvedRelationsBatchSchema,ch as resourceGrant,lh as resourceUsedBySchema,uh as retryPolicyOutputSchema,dh as retypeOptionsOutputSchema,richtext,fh as roleSchema,rollup,ph as routedMessageInferenceSchema,mh as routineAudiencePreviewSchema,hh as routineAudienceSchema,gh as sameActions,s as sameStableValue,_h as schemaDraftOutputSchema,schemaGroupKey,vh as schemaGroupListSchema,yh as schemaGroupSchema,xh as schemaStateEntrySchema,Sh as schemaStateSchema,schemaStateSourcePayload,Ch as secretEntrySchema,select,pi as selectOptionWriteSchema,c as serializeCanonicalJson,l as serializeStableJson,wh as servedAsIsAttributeSchema,Th as sessionImageUsageSchema,Eh as sessionInferenceOverridesOutputSchema,Dh as sessionInferencePatchSchema,Oh as sessionStateSchema,kh as setAgentSessionWorkPostureResultSchema,settleLayout,sha256Hex,br as singleRelationTarget,Ah as slackConditionSchema,jh as slackTriggerMatchSchema,snapWidth,xr as sortsSchema,Sr as sourcedAttributeOf,status,mi as statusGroupSchema,hi as statusOptionWriteSchema,storedContentDefinition,Mh as submitOutcomeSchema,Nh as syncBundleResultSchema,Cr as systemColumnFilterTarget,Ph as tenantInvitationSchema,Fh as tenantSettingsResponseSchema,Ih as tenantSettingsSchema,text,wr as toMultiValueOperator,Tr as toUtcDayString,Er as today,Lh as todoItemSchema,Rh as todoPlanSchema,zh as toolImpactSchema,Bh as triageResultSchema,unaccent,user,Vh as userProfileSchema,Hh as utf8ByteLength,gi as validateAttribute,Dr as validateAttributeName,Or as validateContentViewCatalogue,_i as validateDraft,vi as validateDraftOrThrow,validateLabelExpression,yi as validateObject,validateObjectExpressions,validateObjectImage,jr as validateObjectName,bi as validateObjectOrThrow,Nr as validateQualifiedRule,Pr as validateStoredViews,Fr as validateViewName,Uh as viewPreferenceAddressSchema,Wh as viewReadSchema,Gh as viewerAccessSchema,widthStepConstraint,xi as wireHiddenTypeConfigMask,Si as wireOmittedConfigKeysFor,Kh as withPreferenceEntry,qh as withoutTrailingSlashes,Ci as withoutUnknownOptionKeys,workspaceViewAuthoring};
1654
+ `)){if(t===``)continue;let n=String.fromCodePoint(t.codePointAt(0)??0);e.set(n,t.slice(n.length))}return Z=e,e}function unaccent(e){let t=unaccentRules(),n=``;for(let r of e)n+=t.get(r)??r;return n}function foldText(e){return unaccent(e).toLowerCase()}const T_={phone:`text`,currency:`number`},E_={rename:[`kind`,`object`,`from`,`to`],phone:[`kind`,`object`,`attribute`,`to`,`defaultCountryCode`],currency:[`kind`,`object`,`attribute`,`to`,`currencyCode`]};function refuse(e,t,n){throw new L(n,[{path:t===void 0?[`resolutions`,String(e)]:[`resolutions`,String(e),t],message:n}])}function assertKeys(e,t,n){for(let r of n)(typeof t[r]!=`string`||t[r]===``)&&refuse(e,r,`Resolution ${e} needs a non-empty string \`${r}\``);let r=Object.keys(t).find(e=>!n.includes(e));r!==void 0&&refuse(e,r,`Resolution ${e} has an unknown field \`${r}\``)}function assertResolution(e,t){if(Gn(t)||refuse(e,void 0,`Resolution ${e} must be an object`),t.kind===`rename`){assertKeys(e,t,E_.rename),t.from===t.to&&refuse(e,`to`,`Resolution ${e} renames "${t.from}" to itself`);return}if(t.kind!==`retype`&&refuse(e,`kind`,`Unknown resolution kind ${JSON.stringify(t.kind)}: expected "rename" or "retype"`),t.to!==`phone`&&t.to!==`currency`&&refuse(e,`to`,`Unsupported retype to ${JSON.stringify(t.to)}: a push converts text → phone and number → currency only`),assertKeys(e,t,E_[t.to]),t.to===`phone`){let n=t.defaultCountryCode;/^[A-Z]{3}$/.test(n)&&Hg(n)||refuse(e,`defaultCountryCode`,`Resolution ${e}: "${n}" is not an ISO 3166-1 alpha-3 country code`);return}let n=t.currencyCode;/^[A-Z]{3}$/.test(n)&&Vg(n)||refuse(e,`currencyCode`,`Resolution ${e}: "${n}" is not a supported ISO 4217 currency code`)}function addressesOf(e){return e.kind===`rename`?{reads:e.from,lands:e.to}:{reads:e.attribute,lands:e.attribute}}function assertSchemaSourceResolutions(e){if(!Array.isArray(e))throw new L("`resolutions` must be an array",[{path:[`resolutions`],message:"`resolutions` must be an array"}]);if(e.length>100)throw new L(`A push carries ${e.length} resolutions; the limit is 100`,[]);let t=/* @__PURE__ */ new Set;for(let[n,r]of e.entries()){assertResolution(n,r);let{reads:e,lands:i}=addressesOf(r);for(let[a,o]of[[`${r.kind}:${r.object}.${e}`,`of "${r.object}.${e}"`],[`${r.kind}>${r.object}.${i}`,`onto "${r.object}.${i}"`]])t.has(a)&&refuse(n,void 0,`Resolution ${n} repeats a ${r.kind} ${o}`),t.add(a)}}function phoneFromText(e,t){let n=e.trim();if(n===``)return{value:null};let r=Ug(n,Zr(t));if(!r?.isPossible()||r.country===void 0||r.ext!==void 0)return;let i=Bg(r.country)?.iso3;if(i!==void 0)return{value:{countryCode:i,phoneNumber:ni(n,i)}}}function convertRetypedValue(e,t,n={}){if(t===null)return{value:null};if(e.to===`phone`)return typeof t==`string`?phoneFromText(t,e.defaultCountryCode):void 0;if(typeof t==`number`&&Math.abs(t)<=2**53-1&&!(t<0&&n.allowNegative!==!0))return{value:{code:e.currencyCode,value:t}}}const Q=R.string().refine(e=>e.trim().length>0,`Must not be blank`),D_=xh(Q),O_=R.object({label:Q,pluralLabel:R.string().optional(),description:R.string().optional(),icon:E.optional(),color:kt.optional(),image:S_.optional(),labelExpression:R.string(),embeddingExpression:R.string().optional(),sealed:R.boolean().optional(),toleratedAttributes:R.array(Q).optional(),metadata:R.record(R.string(),R.unknown()).optional(),documentLayout:R.record(R.string(),R.unknown()).optional(),hierarchical:R.boolean().optional(),defaultDriveSort:R.enum(io).optional()}).strict();function failure(e){throw new L(e,[])}function definitionSchema(e){return R.custom(t=>{let n=R.record(R.string(),R.unknown()).parse(t);for(let t of e[0]===`view`?[`object`,`name`]:[`name`])Object.hasOwn(n,t)&&failure(`Invalid schema state: unrecognized definition key ${t}`);switch(e[0]){case`object`:O_.parse(n);break;case`attribute`:{let e=R.enum(te).parse(n.type);Yr(e).extend({type:R.literal(e),label:Q,required:R.boolean().optional(),unique:R.boolean().optional(),icon:E.optional()}).strict().parse(n);break}case`view`:{let{contents:t,...r}=n,i=R.array(Q).parse(t);new Set(i).size!==i.length&&failure(`Invalid schema state: duplicate content membership`),Qt.parse({...r,object:e[1],name:e[2],contents:[]});break}case`content`:j.parse({...n,name:e[3]})}return!0})}function compareSchemaStateEntries(e,t){let n=JSON.stringify(e.address),r=JSON.stringify(t.address);return n<r?-1:+(n>r)}function schemaStateSourcePayload(e){return{modelVersion:1,hashVersion:1,entries:[...e].sort(compareSchemaStateEntries).filter(e=>e.source!==null).map(({address:e,source:t})=>({address:e,source:t}))}}function parseState(e){let t=R.record(R.string(),R.unknown()).parse(e);for(let[e,n]of[[`modelVersion`,`model`],[`hashVersion`,`hash`]])t[e]!==1&&failure(`Unsupported schema ${n} version: expected 1, received ${t[e]===void 0?`missing`:String(t[e])}`);let n=R.object({modelVersion:R.literal(1),hashVersion:R.literal(1),tenant:Q,sourceFingerprint:R.string().regex(/^[a-f0-9]{64}$/),entries:R.array(R.unknown())}).strict().safeParse(e);if(!n.success){let e=n.error.issues.find(e=>e.code===`unrecognized_keys`);throw e?.code===`unrecognized_keys`&&failure(`Invalid schema state: unrecognized key ${e.keys[0]}`),L.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})))}let r=/* @__PURE__ */ new Set,i=n.data.entries.map(e=>{let t=D_.parse(R.object({address:R.unknown()}).parse(e).address),n=JSON.stringify(t);r.has(n)&&failure(`Invalid schema state: duplicate address ${n}`),r.add(n);let i=definitionSchema(t).nullable(),a=t[0]===`object`||t[0]===`attribute`?R.object({id:R.string().uuid(),updatedAt:R.string().datetime()}).strict():R.object({id:R.string().uuid(),revision:R.number().int().nonnegative()}).strict(),o=R.object({address:D_,source:i,effective:i,status:R.enum([`source`,`runtime`,`copy`,`suppressed`]),sourceOwner:R.string().regex(B).nullable(),guard:a.nullable()}).strict().parse(e);return(o.status===`runtime`&&(o.source!==null||o.effective===null||o.sourceOwner!==null)||o.status===`suppressed`&&(t[0]!==`content`||o.source===null||o.effective!==null||o.guard===null)||o.status===`copy`&&(o.source===null||o.effective===null)||o.effective!==null&&o.guard===null||o.source===null&&o.effective===null)&&failure(`Invalid schema state: inconsistent status at ${n}`),{...o,sourceOwner:parseSchemaOwner(o.sourceOwner)}});return{...n.data,entries:i.sort(compareSchemaStateEntries)}}function parseSchemaState(e){try{return parseState(e)}catch(e){throw e instanceof R.ZodError?L.fromZodErrors(e.issues.map(e=>({path:e.path.map(String),message:e.message}))):e}}function diffSchemaState(e){let t=[];for(let n of[...e.entries].sort(compareSchemaStateEntries)){let e=n.source===null?`added`:n.status===`suppressed`?`suppressed`:n.effective===null?`removed`:r(n.source)===r(n.effective)?n.status===`copy`?`copied`:null:`changed`;e&&t.push({...n,change:e})}return{modelVersion:1,tenant:e.tenant,sourceFingerprint:e.sourceFingerprint,changes:t}}const $=R.string().min(1),k_=R.union([R.object({objectName:$,viewName:$,contentName:$.optional()}).strict().describe(`Full configuration of a view, or of one content when contentName is given`),R.object({objectId:$}).strict().describe(`An object with its attributes, by id`),R.object({objectName:$}).strict().describe(`An object with its attributes`),R.object({objectId:$,attributeName:$}).strict().describe(`One attribute's config, by name`),R.object({objectId:$,attributeId:$}).strict().describe(`One attribute's config, by id`),R.object({objectId:$,recordId:$}).strict().describe(`One sample record`)]);function parseNamedTarget(e){let t=k_.safeParse(e);if(!t.success)throw new L(`Invalid scoped target`,[{path:[`target`],message:`Expected exactly one named target branch`}]);return t.data}const A_=[`object`,`attribute`,`view`,`content`,`sample`],j_=100,M_=R.object({mode:R.enum([`inline`,`window`]),interaction:R.enum([`static`,`interactive`]),size:R.enum([`compact`,`regular`]),aspectRatio:R.number().positive().finite().optional()}).strict(),N_=R.object({artifactId:R.string().min(1),revision:R.number().int().positive(),name:R.string().min(1),kind:R.string().min(1),retention:R.enum(Jg),display:M_}).strict();function readArtifactResult(e){let t=N_.safeParse(e);return t.success?t.data:null}const P_=R.string().regex(/^[^/\s]+\/[^/\s]+$/),F_=R.object({kind:R.literal(`generated-image`),artifact:R.unknown(),generation:R.object({attemptId:R.uuid(),requestedModelId:P_,executedModelId:P_.nullable(),format:R.enum(Yo),mimeType:R.enum([`image/png`,`image/jpeg`,`image/webp`])}).strict()}).strict();function readGeneratedImageResult(e){let t=F_.safeParse(e);if(!t.success)return null;let n=readArtifactResult(t.data.artifact);return!n||n.kind!==`image`?null:{...t.data,artifact:{...n,kind:`image`}}}function isCompletedToolPart(e){return e.type===`tool`&&e.state===`completed`}function readString(e,t){let n=e[t];return typeof n==`string`?n:void 0}function upsertWithPrecedence(e,t,n,r){let i=e.get(t),a=i&&r[i.kind]>r[n.kind]?i:n;e.delete(t),e.set(t,a)}function asRecord(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function readRefId(e,t,n){let r=readString(e,t),i=`${n}:`;return r?.startsWith(i)&&r.length>i.length?r.slice(i.length):void 0}function verbResultEntries(e){let t=asRecord(e);if(!t)return[];let n=[t];for(let e of[`members`,`created`,`updated`]){let r=t[e];if(Array.isArray(r))for(let e of r){let t=asRecord(e);t&&n.push(t)}}return n.filter(e=>!(`error`in e))}function extractReadRecordIds(e){let t=/* @__PURE__ */ new Set;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.name!==`read`)continue;let n=e.args.refs;if(Array.isArray(n))for(let e of n){if(typeof e!=`string`)continue;let n=pm(e);n.ok&&n.ref.kind===`record`&&t.add(n.ref.id)}}return[...t]}const I_={created:1,modified:0};function readSingleRecordEntry(e){if(typeof e!=`object`||!e)return null;let t=e,n=typeof t.record==`object`&&t.record!==null?t.record:void 0,r=(n&&readString(n,`id`))??readString(t,`recordId`);return r?{id:r,label:(n&&readString(n,`label`))??r,objectName:(n&&readString(n,`objectName`))??``}:null}function readBulkRecordEntries(e,t,n){if(typeof e!=`object`||!e)return[];let r=e[t];if(!Array.isArray(r))return[];let i=[];for(let e of r){if(typeof e!=`object`||!e)continue;let t=e,r=readString(t,`id`);r&&i.push({id:r,label:readString(t,`label`)??r,objectName:readString(t,`objectName`)??n})}return i}function readVerbRecordEntries(e){let t=asRecord(asRecord(e.result)?.record),n=readString(e.args,`object`)??(t&&readString(t,`objectName`))??``,r=[];for(let t of verbResultEntries(e.result)){let e=readRefId(t,`ref`,`record`);e&&r.push({id:e,label:readString(t,`title`)||readString(t,`label`)||e,objectName:readString(t,`objectName`)??n})}return r}function extractTouchedRecords(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e))continue;let n=[],r;if(e.name===`create_record`||e.name===`update_record`||e.name===`edit_content`){let t=readSingleRecordEntry(e.result);n=t?[t]:[],r=e.name===`create_record`?`created`:`modified`}else if(e.name===`bulk_create_records`||e.name===`bulk_update_records`){let t=readString(e.args,`objectId`)??``,i=e.name===`bulk_create_records`?`created`:`updated`;n=readBulkRecordEntries(e.result,i,t),r=e.name===`bulk_create_records`?`created`:`modified`}else if(e.name===`write`)n=readVerbRecordEntries(e),r=readString(e.args,`action`)===`create`?`created`:`modified`;else continue;for(let e of n){let n={recordId:e.id,objectName:e.objectName,label:e.label,kind:r};upsertWithPrecedence(t,e.id,n,I_)}}return[...t.values()]}const L_={modified:1,consulted:0};function isFilePart(e){return e.type===`file`}function entryFromDocumentMutation(e,t){if(typeof e.result!=`object`||e.result===null)return null;let n=e.result,r=readString(n,`documentId`)??(t===`folderId`?readString(n,t):void 0);return r?{id:r,title:readString(e.args,`name`)??readString(e.args,`title`)??r,kind:`modified`}:null}function entryFromReadDocument(e){let t=readString(e.args,`documentId`);return t?{id:t,title:t,kind:`consulted`}:null}function entryFromRef(e,t,n){let r=readRefId(e,`ref`,`file`),i=r??readRefId(e,`ref`,`document`);return i?{id:i,...r?{fileId:r}:{},title:n||readString(e,`title`)||i,kind:t,mimeType:readString(e,`mimeType`)}:null}function entriesFromOrganize(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=readString(e.args,`action`),r=readString(e.args,`name`)??readString(e.args,`title`),i=readString(t,`documentId`);if(i)return[{id:i,title:r??i,kind:`modified`}];let a=readString(t,`folderId`);if(a)return n===`create_folder`?[{id:a,title:r??a,kind:`modified`}]:[];let o=entryFromRef(t,`modified`,r);return o?[o]:[]}function entriesFromCopy(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=(Array.isArray(t.copied)?t.copied:[]).flatMap(e=>{let t=asRecord(e),n=t?entryFromRef(t,`modified`,void 0):null;return n?[n]:[]});if(n.length>0)return n;let r=entryFromRef(t,t.ref!==void 0&&t.ref===readString(e.args,`from`)?`consulted`:`modified`,void 0);return r?[r]:[]}function entriesFromRead(e){let t=asRecord(e.result);return(Array.isArray(t?.members)?t.members:[]).flatMap(e=>{let t=asRecord(e);if(!t||`error`in t||!readRefId(t,`ref`,`document`))return[];let n=entryFromRef(t,`consulted`,void 0);return n?[n]:[]})}function entriesFromToolPart(e){switch(e.name){case`organize`:return entriesFromOrganize(e);case`copy`:return entriesFromCopy(e);case`read`:return entriesFromRead(e);default:{let t=entryFromToolPart(e);return t?[t]:[]}}}function entryFromSandboxUpload(e){if(typeof e.result!=`object`||e.result===null)return null;let t=e.result,n=readString(t,`fileId`);return n?{id:n,fileId:n,title:readString(t,`title`)??n,kind:`modified`,mimeType:readString(t,`mimeType`)}:null}function entryFromToolPart(e){switch(e.name){case`update_document`:case`attach_file`:return entryFromDocumentMutation(e,`documentId`);case`create_folder`:return entryFromDocumentMutation(e,`folderId`);case`read_document`:return entryFromReadDocument(e);case`sandbox_upload_file`:return entryFromSandboxUpload(e);default:return null}}function extractTouchedDocuments(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`){for(let e of n.parts)if(isCompletedToolPart(e))for(let n of entriesFromToolPart(e))upsertWithPrecedence(t,n.id,n,L_);else if(isFilePart(e)&&e.fileId){let n={id:e.fileId,fileId:e.fileId,title:e.name||e.fileId,kind:`modified`,mimeType:e.mimeType};upsertWithPrecedence(t,n.id,n,L_)}}return[...t.values()]}function extractTouchedArtifacts(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.error)continue;let n=e.name===`generate_image`?readGeneratedImageResult(e.result)?.artifact:e.name===`publish_artifact`?readArtifactResult(e.result):null;if(!n)continue;let r=`${n.artifactId}:${n.revision}`;t.delete(r),t.set(r,n)}return[...t.values()]}function isNonBlankString(e){return typeof e==`string`&&/\S/u.test(e)}const R_=R.object({provider:R.custom(e=>isNonBlankString(e)&&e.length<=200,{message:`must be a non-blank string of at most 200 characters`}),model:R.string().max(200).regex(/\S/u)});function preference(e,t){return{key:e,value:t.value,default:t.default,audited:t.audited??!1,...t.parameter===void 0?{}:{parameter:t.parameter},...t.parameters===void 0?{}:{parameters:t.parameters},...t.refine===void 0?{}:{refine:t.refine}}}const z_=``;function refusal(e,t){return{ok:!1,field:e,message:t,issues:[{path:[e],message:t}]}}function declarationOf(e,t){return`get`in e?e.get(t):e.find(e=>e.key===t)}function locatePreference(e,t,n){let r=declarationOf(e,t);return r?r.parameter===void 0?n===void 0?{ok:!0,declaration:r,parameter:``}:refusal(`parameter`,`Preference "${t}" takes no parameter`):n===void 0||n===``||n.trim()!==n?refusal(`parameter`,`Preference "${t}" is keyed by ${r.parameter}`):r.parameters&&!r.parameters.includes(n)?refusal(`parameter`,`"${n}" is not a ${r.parameter} of "${t}"`):{ok:!0,declaration:r,parameter:n}:refusal(`key`,`Unknown preference "${t}"`)}function judgePreferenceWrite(e,t,n,r){let i=locatePreference(e,t,n);if(!i.ok)return i;let a=i.declaration.value.safeParse(r);if(a.success){let e=i.declaration.refine?.(a.data,i.parameter);return e===void 0?{...i,value:a.data}:refusal(`value`,e)}return{ok:!1,field:`value`,message:`Invalid value for preference "${t}"`,issues:a.error.issues.map(e=>({path:[`value`,...e.path.map(String)],message:e.message}))}}const B_=R.strictObject({model:R_.optional(),routing:R.literal(`auto`).optional()}),V_=R.strictObject({inApp:R.boolean()});function isActionableType(e){let t=y[e];return t!==void 0&&kn(t.kind)}const H_=[preference(`workPosture`,{value:R.enum(Yc),default:`auto`,audited:!0}),preference(`chat.default`,{value:B_,default:{},audited:!0}),preference(`conversationSurface`,{value:R.enum(xa),default:`panel`}),preference(`mailboxListMode`,{value:R.enum(ss),default:`threads`}),preference(`mailboxReaderLayout`,{value:R.enum(cs),default:`panel`}),preference(`home`,{value:R.string().uuid().nullable(),default:null}),preference(`memory.learnFromEmail`,{value:R.boolean(),default:!0,audited:!0}),preference(`memory.shareWithTeam`,{value:R.boolean(),default:!0,audited:!0}),preference(`onboarding.completed`,{value:R.boolean(),default:!1,audited:!1}),preference(`decisions.seenAt`,{value:R.iso.datetime().nullable(),default:null}),preference(`decisions.delivery`,{value:V_,default:{inApp:!0},parameter:`decision type`,parameters:Object.keys(y),refine:(e,t)=>!e.inApp&&isActionableType(t)?`A "${t}" decision asks you to act: it is always shown in-app`:void 0})];export{wi as ACCESS_CAPABILITIES,Ti as ACCESS_LEVELS,Ei as ACCESS_ROLES,u as ACTIONABLE_DECISION_KINDS,Di as ACTOR_TYPES,d as AGENDA_BLOCK,Oi as AGENT_ASIDE_ANSWER_MAX_LENGTH,ki as AGENT_ASIDE_HISTORY_LIMIT,Ai as AGENT_ASIDE_QUESTION_MAX_LENGTH,ji as AGENT_AVATAR_EXPRESSIONS,Mi as AGENT_AVATAR_TYPES,Ni as AGENT_MESSAGE_KIND,Pi as AGENT_MESSAGE_SENDER_NAME_KEY,Fi as AGENT_NOTIFICATION_KIND,Ii as AGENT_SESSION_ACCESS_ROLES,Li as AGENT_SESSION_LIST_ORDERS,Ri as AGENT_SESSION_ORIGINS,zi as AGENT_SESSION_PROVENANCES,Bi as AGENT_STARTERS_MAX,Vi as AGENT_STARTER_MAX_LENGTH,Hi as AGENT_SYSTEM_PROMPT_MAX_LENGTH,Ui as AGENT_TASK_KINDS,Wi as AGENT_WAKE_KIND,f as AGGREGATE_BUCKETS,p as AGGREGATE_MEASURES,Gi as AI_MODEL_INPUT_MODALITIES,Ki as AI_MODEL_PROFILE_LABELS,qi as AI_MODEL_REASONING_MODES,Zg as ALLOWED_PROPERTY_TYPES,Ji as ALL_CATALOG_TOOL_NAMES,V as ALL_PIPES,Yi as ALWAYS_KINDS,Xi as APPEARANCE_FACETS,Zi as APPROVAL_FAMILY_TOOL_NAMES,Qi as ARCHITECT_PUBLICATION_KIND,Yg as ARTIFACT_FILE_ROLES,qg as ARTIFACT_KINDS,m as ARTIFACT_PREVIEW_EXTENSION,Jg as ARTIFACT_RETENTIONS,$i as ASK_QUESTIONS_ANSWER_MAX_LENGTH,ea as ASK_QUESTIONS_ANSWER_MAX_VALUES,ta as ASK_QUESTIONS_FILE_REF,na as ASK_QUESTIONS_MAX_ADDED_FILES,ra as ASK_QUESTIONS_MAX_BATCH,ia as ASK_QUESTIONS_TOOL_NAME,aa as ATTACH_FILE_ACTIONS,h as ATTRIBUTE_FILTER_OPERATORS,ee as ATTRIBUTE_NAME_SCHEMA,te as ATTRIBUTE_TYPES,ne as ATTRIBUTE_TYPE_DESCRIPTORS,oa as AUDIT_ACTIONS,sa as AUDIT_AGENT_SESSION_METADATA_KEY,ca as AUDIT_RESOURCE_TYPES,Yh as AccessDeniedError,AgendaBuilder,M as AgentBuilder,Xh as AggregateValidationError,Zh as AmbiguousSchemaChangeError,Qh as AttributeInUseError,$h as AttributeNotFoundError,la as BILLING_MODES,re as BLOCK_CONTEXTS,ie as BLOCK_PERIODS,g as BLOCK_WIDTHS,ua as BROWSER_LAUNCH_TOOL_NAME,da as BROWSER_TOOL_NAMES,fa as BUNDLE_LOCALES,K as BUNDLE_NAME_PATTERN,pa as BUNDLE_SETUP_PROMPT_MAX_LENGTH,Xg as BYTE_UNIT_LABELS,BlockContentBuilder,BundleBuilder,_ as CARD_BLOCK,ma as CATALOG_RESOURCES,v as CHART_BLOCK,ae as CHART_KINDS,oe as CHART_ORDERS,ha as CHAT_PROVIDERS,Ir as COMPUTED_RETURN_TYPES,ga as CONNECTION_GRANT_PROVIDERS,_a as CONNECTION_STATUS_IDS,va as CONNECTOR_PROVIDER_IDS,ya as CONNECTOR_SCOPES,se as CONTENT_PLACEMENT_CONTEXTS,ba as CONTINUATION_KEY_PATTERN,xa as CONVERSATION_SURFACES,Sa as COPY_VERB_NAME,q as CORE_BUNDLE_NAME,H_ as CORE_PREFERENCES,Ca as CORE_RECORD_TOOL_NAMES,wa as CORE_TOOL_NAMES,Ta as COUNT_MODES,Ea as CUSTOM_LEVEL,CardBuilder,ChartBuilder,ChartQuery,eg as ConcurrentModificationError,X as ContentBuilder,ce as DECISIONS_BLOCK,le as DECISION_INBOX_STATES,ue as DECISION_KINDS,de as DECISION_LINE_MAX_LENGTH,fe as DECISION_LINK_TARGET_TYPES,pe as DECISION_LIST_STATES,me as DECISION_READ_STATES,he as DECISION_SENDER_KINDS,ge as DECISION_SETTINGS_AREAS,_e as DECISION_TITLE_MAX_LENGTH,ve as DECISION_TRANSFERS_KEY,ye as DECISION_TYPES_V1,be as DECISION_TYPE_ACCESS_GRANTED,xe as DECISION_TYPE_AGENT_APPROVAL,Se as DECISION_TYPE_AGENT_MESSAGE,Ce as DECISION_TYPE_AGENT_QUESTION,we as DECISION_TYPE_AGENT_REVIEW,Te as DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,Ee as DECISION_TYPE_AGENT_SETUP,De as DECISION_TYPE_BUNDLE_SETUP,Oe as DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,ke as DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,Ae as DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,y as DECISION_TYPE_KINDS,je as DECISION_TYPE_PERSON,Me as DECISION_TYPE_RECORD_ASSIGNED,Ne as DECISION_TYPE_RECORD_MENTIONED,Pe as DECISION_WORK_STATES,Da as DEFAULT_AGENT_EXECUTION_CONFIG,Oa as DEFAULT_AGENT_TOOL_GROUPS,ka as DEFAULT_APPEARANCE_ICON,Aa as DEFAULT_APPROVAL_POLICY,ja as DEFAULT_BLUEPRINT_TOOL_GROUPS,Ma as DEFAULT_DAILY_ACTIVITY_DAYS,Na as DEFAULT_DICTATION_LIMITS,a_ as DEFAULT_LABEL_FALLBACK,Fe as DEFAULT_LAYOUT_TRAITS,Pa as DEFAULT_MEETING_BOT_DISPLAY_NAME,Fa as DEFAULT_TENANT_SETTINGS,Lr as DEFAULT_VALIDATION_MESSAGES,Ia as DEVICE_ACCESS_ROLES,La as DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS,Ra as DEVICE_CHANNEL_IDLE_POLL_MS,za as DEVICE_CHANNEL_KEEPALIVE_MS,Ba as DEVICE_CHANNEL_MAX_FRAME_BYTES,Va as DEVICE_CHANNEL_PATH,Ha as DEVICE_CHANNEL_PRESENCE_MS,Ua as DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION,Wa as DEVICE_COMMAND_ERROR_CODES,Ga as DEVICE_DESKTOP_STATES,Ka as DEVICE_SHELLS,qa as DICTATION_FINALIZATION_TIMEOUT_MS,Ja as DICTATION_FRAME_BYTES,Ya as DICTATION_MAX_BUFFER_BYTES,Xa as DICTATION_MAX_FRAME_BYTES,Za as DICTATION_MAX_TRANSCRIPT_BYTES,Qa as DICTATION_MODEL_ID,$a as DICTATION_PREPARATION_TIMEOUT_MS,eo as DICTATION_SAMPLE_RATE,to as DICTATION_TICKET_TTL_MS,no as DISCARD_ARCHITECT_DRAFT_TOOL_NAME,ro as DOCUMENT_KINDS,io as DOCUMENT_SORT_MODES,A_ as DRAFT_CONFLICT_KINDS,ao as DRAFT_WRITE_TOOL_NAMES,DecisionsBuilder,oo as DeviceChannelProtocolError,so as DeviceChannelServerFrameSchema,co as DeviceChannelWorkerFrameSchema,lo as DeviceDesktopStatusSchema,N as DuplicateError,uo as EMAIL_CATEGORY_DEFAULT_COLOR,fo as EMAIL_CATEGORY_DEFAULT_ICON,po as EMAIL_CATEGORY_DESCRIPTION_MAX,mo as EMAIL_CATEGORY_DESCRIPTION_MIN,ho as EMAIL_CATEGORY_LIMIT,go as EMAIL_CATEGORY_NAME_MAX,_o as EMAIL_CATEGORY_SCOPES,vo as EMAIL_CLASSIFIED_BY,yo as EMAIL_DIRECTIONS,bo as EMAIL_PARTICIPANT_ROLES,xo as EMAIL_PROVIDERS,So as EMAIL_RULE_SCOPES,Co as ENVIRONMENT_BUILD_LOG_STEPS,wo as ENVIRONMENT_BUILD_LOG_STEP_PREFIX,To as ENVIRONMENT_HARNESSES,Eo as ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,Do as ENVIRONMENT_HARNESS_WORKDIR,Oo as ENVIRONMENT_IMAGES,ko as ENVIRONMENT_MEMORY_GB_PER_VCPU,Ao as ENVIRONMENT_NAME_MAX_CHARS,jo as ENVIRONMENT_NETWORK_ALLOW_MAX,Mo as ENVIRONMENT_SCRIPT_MAX_BYTES,No as ENVIRONMENT_SIZES,Po as ENVIRONMENT_SIZE_VCPUS,Fo as ENVIRONMENT_STANDARDS_WORKDIR,Io as ENV_VAR_KEY_PATTERN,Lo as ESTIMATED_COUNT_CAP,tg as ExportTooLargeError,Ro as FILE_LIST_MAX_IDS,zo as FILE_OCR_STATUSES,Bo as FILE_URLS_MAX_IDS,z as FORM_FORBIDDEN_ATTRIBUTE_TYPES,Vo as FORM_STATUSES,Ho as FORM_SUBMISSION_STATUSES,ng as ForbiddenError,FormBuilder,FormRowBuilder,FormStepBuilder,Uo as GET_ARCHITECT_DRAFT_TOOL_NAME,Wo as GITHUB_TRIGGER_CATALOG,Go as GITHUB_TRIGGER_FAMILIES,Ko as GRANT_ENABLES,Ie as GROUPABLE_ATTRIBUTE_TYPES,C_ as GroupBuilder,qo as HARNESS_BRIDGE_PORT,Le as HEADING_BLOCK,Re as HIERARCHY_ATTRIBUTE_IDS,ze as HIERARCHY_ATTRIBUTE_NAMES,Be as HIERARCHY_CHILD_IDS_LIMIT,Jo as HITL_TOOL_NAMES,Yo as IMAGE_FORMATS,Xo as IMAGE_SHAPES,Zo as IMAGE_SOURCES,Qo as INFERENCE_REASONING_OPTIONS,$o as INFERENCE_ROUTING_MODES,es as INFERENCE_SPEEDS,Ve as INVENTORY_LIMIT,rg as InvalidPermissionGrantError,ts as LAST_RUN_ERROR_MAX_LENGTH,ns as LINK_COOKIE_MAX_AGE_MS,rs as LINK_DEFAULT_MS,is as LINK_MAX_MS,He as LIST_VIEW_TAB_VISIBILITIES,Ue as LOCATION_FILTER_PROPERTIES,ig as LogoProviderUnavailableError,ag as LogoSearchRateLimitedError,as as MACHINE_KEY_KINDS,os as MAILBOX_ACCOUNT_VISIBILITIES,We as MAILBOX_BLOCK,ss as MAILBOX_LIST_MODES,cs as MAILBOX_READER_LAYOUTS,ls as MAIL_DRAFT_BODY_MAX_CHARS,us as MAIL_DRAFT_MODES,ds as MAIL_SIGNATURE_MAX_CHARS,fs as MAIL_SUBJECT_MAX_CHARS,Ge as MAX_AGGREGATE_GROUPS,ps as MAX_DAILY_ACTIVITY_DAYS,Kg as MAX_PRESET_DEPTH,ms as MAX_TODOS,hs as MAX_TODO_DESCRIPTION_CHARS,gs as MAX_TODO_ID_CHARS,j_ as MCP_SERVER_NAME_MAX_LENGTH,Ke as MEASURABLE_ATTRIBUTE_TYPES,qe as MEETINGS_UPCOMING_BLOCK,_s as MEETING_BOT_IMAGE,vs as MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,ys as MEETING_BOT_MEMBER_CAP,bs as MEETING_BOT_NO_CREDITS,xs as MEETING_BOT_SILENT_REASON,Ss as MEETING_CONFERENCE_REQUESTS,Cs as MEETING_PARTICIPANT_ROLES,ws as MEETING_RESPONSES,Ts as MEETING_RESPONSE_STATUSES,Es as MEETING_STATUSES,U as MEMORY_ATTRIBUTES,c_ as MEMORY_PAGE_MAX_CHARS,Ds as MEMORY_SPEND_LIMIT_PATTERN,l_ as MEMORY_WORKSPACE_PROFILE,s_ as MEMORY_WRITE_SOURCE,d_ as METERED_CHARGE_KINDS,u_ as METERED_RATES_USD,b as METRIC_BLOCK,MailboxBuilder,og as MemoryNotFoundError,MetricBuilder,MetricQuery,MultiRelationAttributeBuilder,Wg as NATIVE_AGENT_UI_PART_IDS_METADATA_KEY,Gg as NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION,Je as NATIVE_BLOCKS,Ye as NATIVE_OBJECT_NAMES,Os as NATIVE_TOOL_GROUPS,ks as NATIVE_TOOL_GROUP_CATALOG,As as NEWS_DEFAULT_DISPLAY_DAYS,js as NEWS_DISPLAY_CAP_DAYS,Ms as NEWS_INDEX_MAX_ENTRIES,Ns as NEWS_INTENSITIES,Ps as NEWS_TARGET_KINDS,Fs as NO_ACCESS,z_ as NO_PREFERENCE_PARAMETER,Is as NO_RECORDING,Xe as NO_VALUE_OPERATORS,e as NonJsonValueError,NoopGeocodingAdapter,sg as NotFoundError,cg as NotImplementedError,Ls as OAUTH_TICKET_TTL_MS,Rs as OBJECT_GRANT,Ze as OBJECT_NAME_SCHEMA,W as OFFICIAL_SKILLS_REPO,zs as OPEN_TOOL_PART_STATES,Bs as OPERATION_MAX_STEPS,Qe as OPERATORS_BY_TYPE,ObjectBuilder,lg as ObjectNotFoundError,ug as ObjectReferencedError,dg as OrphanSystemAttributeError,$e as PAGE_GRID_COLUMNS,Vs as PERMISSION_ACTIONS,Hs as PERMISSION_CAPABILITIES,Us as PERMISSION_CATALOG,Ws as PERSISTENCE_OWNED_QUOTA_KEYS,$g as PIPES_WITH_ARGS,Gs as PROVIDER_DRAFT_LABEL,Ks as PROVIDER_NAMES,qs as PUBLIC_MAIL_DOMAINS,J as PageBuilder,fg as PageReferencedError,pg as ProtectedResourceError,mg as ProtectedRoleError,et as QUALIFIED_SEPARATOR,tt as QUERY_OBJECT,Js as QUESTION_FAMILY_TOOL_NAMES,Ys as QUOTA_KEYS,hg as QueryTimeoutError,Xs as RECENT_ACTIVITY_LEDGER_LIMIT,Zs as RECIPIENT_IDENTITIES_MAX,Qs as RECORDING_OVERRIDES,$s as RECORDING_POLICIES,ec as RECORD_ACCESS_ROLES,tc as RECORD_ACCESS_SOURCES,nc as RECORD_DRIVE_CURSOR_MAX_LENGTH,rc as RECORD_DRIVE_PAGE_DEFAULT_LIMIT,ic as RECORD_DRIVE_PAGE_MAX_LIMIT,ac as RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,oc as RECORD_GRAPH_MAX_LIMIT_PER_NODE,sc as RECORD_GRAPH_MAX_NODES,cc as RECORD_IMAGE_MAX_BYTES,nt as RECORD_LINKS_BLOCK,x as RECORD_LINKS_CONTENT,rt as RECORD_LIST_SCOPES,it as RECORD_OBJECT,lc as REFERENCE_KINDS,at as RELATION_TARGET_ANY,ot as REMOVED_OPERATOR_REPLACEMENTS,uc as REPLY_MODES,dc as REPOSITORY_WILDCARD,fc as REQUEST_DESIGN_REVIEW_TOOL_NAME,pc as REQUEST_SETUP_TOOL_NAME,st as RESERVED_ATTRIBUTE_NAMES,ct as RESERVED_OBJECT_NAMES,mc as RESOURCE_GRANT_KINDS,hc as RESOURCE_KIND_CATALOG,lt as RESOURCE_VISIBILITIES,gc as ROUTING_PRICE_CEILINGS,_c as RUN_ORIGIN_METADATA_KEY,gg as RealtimeDeliveryError,_g as RealtimeRateLimitedError,vg as RealtimeSubscriptionError,yg as RecordNotFoundError,ut as RecordQuery,bg as RecordReferencedError,xg as RepositoryError,P as ReservedObjectNameError,Sg as RoleNotFoundError,Cg as SCHEMA_ERROR_HTTP_STATUS,S as SCHEMA_LIMITS,B as SCHEMA_OWNER_PATTERN,T_ as SCHEMA_SOURCE_RETYPE_FROM,vc as SEND_VERB_NAME,yc as SESSION_INFERENCE_PATCH_KEYS,Qg as SIMPLE_PIPES,Rr as SIMPLE_PROPERTY_TYPES,bc as SLACK_TRIGGER_CATALOG,xc as SLACK_TRIGGER_EVENTS,Sc as SPEAKS_THROUGH_SEND_METADATA_KEY,p_ as STANDARD_SCHEMA_VENDOR,Cc as SURFACE_TOOL_NAMES,dt as SYNONYM_ALIASES,ft as SYSTEM_ATTRIBUTES,pt as SYSTEM_ATTRIBUTE_I18N_KEYS,wc as SYSTEM_EMAIL_CATEGORIES,Tc as SYSTEM_EMAIL_CATEGORY_NAMES,mt as SYSTEM_FIELD_NAMES,ht as SYSTEM_FILTER_ATTRIBUTE_TYPES,Ec as SYSTEM_PART_CODES,F as SchemaError,I as SchemaErrorCode,wg as SearchBackendError,Tg as SearchPathNotIndexedError,SingleRelationAttributeBuilder,Eg as StorageError,Dg as SyncCascadeError,Og as SyncConflictError,kg as SyncError,Ag as SystemEntityImmutableError,Dc as TASK_DEMAND_LEVELS,Oc as TENANT_INVITATION_DEFAULT_TTL_MS,kc as TENANT_INVITATION_DELIVERY_STATUSES,Ac as TENANT_INVITATION_MAX_TTL_MS,jc as TENANT_INVITATION_MIN_TTL_MS,Mc as TENANT_INVITATION_RESEND_INTERVAL_MS,Nc as TENANT_INVITATION_STATUSES,C as TEXT_BLOCK,zr as TEXT_FORMAT_PATTERNS,Pc as TODO_PHASES,Fc as TODO_PLAN_STATUSES,Ic as TODO_STATUSES,Lc as TOOL_APPROVAL_STATES,Rc as TOOL_IMPACT_COUNT_KEYS,zc as TRANSCRIPT_STATUSES,Bc as TRIAGE_ACTIONS,Vc as TRIGGER_EVENT_TYPES,Hc as TRIGGER_MAX_REENTRY,Uc as TURN_OUTCOMES,jg as ToolGroupGrantError,gt as UNORDERED_CHART_KINDS,Wc as UNSHAREABLE_OBJECT_NAMES,Gc as USAGE_MODALITIES,Kc as USAGE_SCOPES,qc as USERS_RESOLVE_MAX_IDS,Jc as USER_STATUSES,Yc as USER_WORK_POSTURES,Xc as VERB_NAMES,L as ValidationError,Y as ViewBuilder,Zc as WAKE_TURN_METADATA_KEY,Qc as WAKE_TURN_SPOKE_METADATA_KEY,$c as WALLET_STATUSES,Br as WIRE_OFFERED_BASE_CONFIG,Vr as WIRE_OMITTED_CONFIG_KEYS,Mg as WorkspaceInvariantReason,el as accessGrantSchema,tl as actorSchema,nl as agent,rl as agentApprovalResolutionSchema,il as agentAvatarFromMetadata,al as agentAvatarOutputSchema,ol as agentAvatarSchema,sl as agentConversationOverviewSchema,cl as agentDataChunk,ll as agentDefinitionActivitySchema,ul as agentDefinitionAudienceSchema,dl as agentDefinitionDailyActivitySchema,fl as agentDefinitionSchema,pl as agentDisplayName,ml as agentExecutionConfigOutputSchema,hl as agentHistoryMessageSchema,gl as agentInferencePreferencesOutputSchema,_l as agentInferencePreferencesSchema,vl as agentMemoryViewSchema,yl as agentMessageAttachmentSchema,bl as agentMessagePartSchema,xl as agentRequestAnswerSchema,Sl as agentRoleSchema,Cl as agentRolesSetResultSchema,wl as agentRunSchema,Tl as agentRunStatusSchema,El as agentScheduleOutputSchema,Dl as agentScheduleSchema,Ol as agentSessionAudienceSchema,kl as agentSessionDefinitionAppearanceSchema,Al as agentSessionHistoryPageSchema,jl as agentSessionInferenceOverridesInputSchema,Ml as agentSessionInferenceOverridesSchema,Nl as agentSessionLinkSchema,Pl as agentSessionMessageOutputSchema,Fl as agentSessionMessageSchema,Il as agentSessionSchema,Ll as agentSetupResponseSchema,Rl as agentStartersSchema,zl as agentTodoPlanViewSchema,Bl as agentToolCatalogSchema,Vl as agentTriggerBaseSchema,Hl as agentTriggerDefinitionSchema,Ul as agentTriggerLastCallSchema,Wl as agentTriggerPatchSchema,Gl as agentTriggerSchema,Kl as agentUIValidationError,ql as agentWakeSchema,Jl as agentWakeViewSchema,Yl as apiKeyRoleSchema,Xl as apiKeySchema,Zl as apiKeyWithSecretSchema,applyPipes,Ql as architectProjectionSchema,$l as artifactQuoteSchema,t as asTenantId,n as asUserId,eu as askQuestionsOutputSchema,assertBundleName,tu as assertCustomAgentUIMessageChunk,assertSchemaSourceResolutions,nu as assertSessionState,ru as attachedRecordDocumentSchema,Hr as attributeConfigSchemas,vt as attributeFilterTarget,yt as attributeInventory,iu as attributeOutputSchema,au as attributeSaveOutputSchema,ou as auditChangeSchema,su as auditLogEntrySchema,cu as availableBundleSummarySchema,bt as blockObjectInputs,lu as browserProfilePreparationSchema,uu as browserProfileViewSchema,buildPropertySchema,xt as buildQualifiedAttribute,builtBundleFromPieces,bundle,du as bundleAddPlanSchema,fu as bundleAddResultSchema,pu as bundleContentsSchema,mu as bundleListSchema,hu as bundleModeSchema,gu as bundleOriginSchema,_u as bundlePieceKindSchema,vu as bundlePlanPieceSchema,yu as bundleRemovalPreviewSchema,bu as bundleStatusEntrySchema,xu as bundleStatusSchema,Su as bundleUpdateDependentSchema,Cu as bundleUpdateGroupSchema,wu as bundleUpdatePieceKindSchema,Tu as bundleUpdatePieceSchema,Eu as bundleUpdatePlanSchema,Du as bundleUpdateReasonCodeSchema,Ou as bundleUpdateResultSchema,ku as cancelAgentWakeResultSchema,r as canonicalStringify,Au as canonicalToolGroups,St as canonicalizeFilterValue,ju as capabilityForResource,Ct as capped,checkbox,Mu as classificationRestoreSchema,Nu as classificationUndoSchema,Pu as classifyEmailResultSchema,Fu as classifyEmailSchema,Iu as cliDefaultModelOf,Lu as cloudBrowserLiveViewSchema,wt as collectContentViewCatalogue,Tt as collectQualifiedRuleIssues,Et as collectionContentSourceSchema,Ru as collectionOutputSchema,zu as collectionPageSchema,Dt as collectionSourceAddress,Ot as collectionSourceAddressOf,kt as colorIdSchema,At as columnsSchema,Bu as compareAgentSessionMessages,compareSchemaStateEntries,Vu as compareVersions,Hu as compiledHarnessModels,computeByteMagnitude,Uu as computeReconnectDelay,Wu as computeRetryDelay,Gu as connectionCapabilitiesSchema,Ku as connectionGrantKindsOf,qu as connectionSyncProgressSchema,Ju as connectionViewSchema,Yu as connectorProvidersResultSchema,Xu as connectorTriggerMatchSchema,w_ as content,contentDefinition,w as contentExtensionRegistry,jt as contentReadObjects,T as contentViewDefinitionSchema,Mt as contentViewDefinitionSchemaFor,convertRetypedValue,Zu as createAgentTriggerResultSchema,Ur as createAttributeValidator,Wr as createFormAttributeValidator,createStandardSchemaProps,Qu as criticConfigOutputSchema,currency,Nt as currentActor,$u as customDataChunkSchemas,date,Pt as decisionArchiveAllResultSchema,Ft as decisionAttachmentSchema,It as decisionCountsSchema,Lt as decisionHandedBy,Rt as decisionLinkSchema,zt as decisionListResultSchema,Bt as decisionRecipientSchema,Vt as decisionSchema,Ht as decisionSenderSchema,Ut as decisionThreadKey,Wt as decisionTransferBy,Gt as decisionTransferTargetsSchema,Kt as decisionTransferTo,qt as decisionTransfersOf,Jt as decisionWithRecipientSchema,ed as declaredImageRequests,td as decodeAgentSessionListCursor,nd as decodeRecordValues,i as deepEqual,rd as defaultEnvironmentSchema,id as deferredRetypeSchema,Yt as defineBlock,deriveLayout6,ad as deriveViewerAccess,Xt as describeViewIssue,detailView,od as deviceAudienceSchema,sd as deviceChannelUrl,diffSchemaState,Zt as displayAttributesSchema,document,cd as documentFileSchema,ld as documentRecordOwnerPageSchema,ud as documentRecordOwnerSchema,dd as documentSchema,fd as documentWithSubCountSchema,pd as draftAppendOutputSchema,md as draftCommandGuardSchema,Qt as draftContentViewDefinitionSchema,$t as draftContentViewDefinitionSchemaFor,hd as driveFileSchema,droppedContents,gd as durableDateSchema,en as edgePropertyFilterTarget,_d as editAgentSessionMessageResultSchema,vd as effectivePermissionsSchema,yd as emailAttachmentMetaSchema,bd as emailCategoryCreateSchema,xd as emailCategoryDeleteSchema,Sd as emailCategorySchema,Cd as emailCategoryScopeQuerySchema,wd as emailCategoryUpdateSchema,Td as emailCategoryUsageSchema,Ed as emailParticipantRefSchema,Dd as emailRuleScopeSchema,Od as emailSenderRuleSchema,kd as emailVerdictSchema,Ad as encodeAgentSessionListCursor,jd as encodeRecordValues,Md as envVarEntrySchema,Nd as environmentBuildFailureSchema,Pd as environmentBuildStateSchema,Fd as environmentDetailSchema,Id as environmentHarness,Ld as environmentHarnessSchema,Rd as environmentListSchema,zd as environmentNetworkPolicyOutputSchema,Bd as environmentRepositorySourceSchema,Vd as environmentSchema,Hd as environmentWorkdir,extractAttributeNames,extractAttributePaths,tn as extractCurrencyFilterValue,nn as extractFilterValue,extractReadRecordIds,extractTouchedArtifacts,extractTouchedDocuments,extractTouchedRecords,Ud as fileSchema,Wd as fileUrlsResponseSchema,rn as filterOperatorsOfType,an as filterStateSchema,on as filterTargetsOf,Gd as findEnvironmentHarness,Kd as findGrantIssues,sn as findGridViolation,cn as findGroupViolation,ln as findLayoutRuleViolation,un as findRelationAttribute,dn as findRowLimitViolation,foldText,form,qd as formDefinitionSchema,formFieldFlatKey,formFieldKey,Jd as formSlotSchema,Yd as formStepSchema,Xd as formSubmissionSchema,formatByteSize,fn as formatDecisionLink,Zd as formatNewsTarget,qr as formatPhoneForDisplay,Qd as formatReference,formatSkillSource,Jr as formatZodErrors,formula,a as generateId,pn as getAttributeCapabilities,Yr as getAttributeConfigSchema,Xr as getAttributeConfigWriteSchema,mn as getAttributeFilterOperators,getEditableLabelAttribute,hn as getHierarchyAttributes,gn as getObjectSystemAttributes,_n as getOperatorPolarity,vn as getRollupFilterOperators,getSingleAttributeFromExpression,getSlotFieldTargets,yn as getSystemAttributeI18nKey,bn as getSystemAttributeList,$d as githubConditionSchema,ef as githubTriggerMatchSchema,tf as grantKindOf,xn as gridPositionSchema,group,Sn as groupSizeMessage,Cn as groupedMembers,nf as harnessModelChoices,rf as harnessModelListSchema,af as harnessModelOptionSchema,of as hasLocale,hasOptions,wn as hasTypeTrait,Tn as hasValueKind,hashBundlePieces,sf as humanRequestId,cf as humanRequestKind,E as iconNameSchema,imageLookupKindOf,lf as imageModelFormatDefect,uf as imageModelIdSchema,o as indexBy,En as inferInverseCardinality,df as inferenceReasoningSchema,ff as inferenceRoutingSchema,pf as inferenceSpeedSchema,Dn as input,mf as installedBundleSummarySchema,On as invalidViewMessage,kn as isActionableDecisionKind,hf as isAgentMessageMetadata,gf as isAgentNotificationMetadata,_f as isAgentUIDataName,vf as isAgentWakeMetadata,yf as isAgentWrittenAuditEntry,bf as isArchitectPublicationMetadata,An as isAttributeFilterable,jn as isAttributeGroupable,Ng as isAttributeInUseError,Mn as isAttributeKanbanGroupable,Nn as isAttributeSearchable,Pn as isAttributeSortable,xf as isAwaitingHuman,Fn as isBilateralRelation,Sf as isBlocking,In as isBoardGrouping,isBundle,Ln as isCalendarDay,Cf as isCatalogResource,Rn as isCollectionContent,zn as isDynamicValue,Qr as isEmptyValue,wf as isEnvironmentBuildLogStep,Tf as isEnvironmentHarnessId,Ef as isFormDefinition,isFormFieldsRow,isFormFreeFieldRef,isFormHeadingRow,isFormSeparatorRow,isFormSlotFieldRef,isFormTextRow,Bn as isHierarchyAttribute,Df as isImageSource,isLabelExpression,Vn as isLocationFilterProperty,Hn as isLocationPartOperator,Of as isMailProvider,kf as isMailboxListMode,Un as isManagedSystemAttribute,isMeteredChargeKind,D as isNativeObjectName,Af as isNativeToolGroup,Wn as isNoValueOperator,Pg as isNotFoundError,$r as isNullishOrEmptyString,Fg as isObjectReferencedError,jf as isOpenToolPartState,Mf as isParkedOnHuman,isPinnedSkillSource,Gn as isPlainRecord,Ig as isProtectedResourceError,Nf as isProviderDraft,Pf as isPublicMailDomain,Ff as isQuestionPart,Lg as isRecordReferencedError,Kn as isRelativeDateValue,If as isReplyMode,Lf as isResourceGrant,Rf as isRoutineActorMetadata,Rg as isSchemaError,zf as isSemver,Bf as isSessionInferencePatch,qn as isSetMembershipOperator,isSkillRepository,isStandardSchema,Vf as isSystemEmailCategory,Hf as isSystemEmailCategoryName,Uf as isSystemPartCode,Wf as isToolApprovalState,Gf as isToolImpactCountKey,Jn as isUniversalRelation,zg as isValidationError,O as isValueKindType,ei as isValuePresent,isWherePipe,Kf as isWildcard,judgePreferenceWrite,keptFill,H as labelExpressionSchema,qf as lastPublicationSchema,Jf as lastPublishErrorSchema,Yn as layoutTraitsOf,Yf as levelActions,Xf as levelFloor,Zf as levelOf,Qf as linkedRecordRefSchema,listView,locatePreference,location,Xn as locationPartFilterTarget,$f as lockingSendCall,ep as loginSecretEntrySchema,tp as mailDraftAttachmentSchema,np as mailDraftSchema,rp as mailSignatureSchema,ip as mailboxAccountSchema,ap as mailboxCursorSchema,op as mailboxEmailSchema,sp as mailboxListResponseSchema,cp as mailboxSenderImageSchema,lp as mailboxThreadDetailSchema,up as mailboxThreadSchema,dp as matchesRepositoryPattern,fp as mcpCatalogCategorySchema,pp as mcpCatalogEntrySchema,mp as mcpOAuthAttemptStartedSchema,hp as mcpOAuthSetupSchema,gp as mcpServerAuthTypeSchema,_p as mcpServerStatusSchema,vp as mcpServerViewSchema,yp as meetingBotDispatchRequestSchema,bp as meetingBotDispatchResponseSchema,xp as meetingBotNotificationSchema,Sp as meetingLinkedRecordSchema,Cp as meetingParticipantRefSchema,wp as meetingRecordingSchema,Tp as meetingSchema,Ep as meetingSiblingRefSchema,Dp as meetingTranscriptProvenanceSchema,Op as meetingTranscriptResponseSchema,kp as meetingTranscriptSegmentSchema,Ap as meetingTranscriptSourceRefSchema,jp as meetingsListResponseSchema,Mp as memberSchema,k as memberlessGroups,memoryPageViewOf,Np as mentionReferenceSchema,Pp as mergeSessionInferencePatch,meteredUsd,Zn as metricComparePeriod,Fp as modelDefinitionOutputSchema,Ip as modelDefinitionSchema,R_ as modelIdentitySchema,Lp as modelReferenceOutputSchema,Rp as modelReferenceSchema,moveWidensAudience,multiselect,zp as mutationReceiptSchema,Bp as myPreferencesSchema,nameSlug,k_ as namedTargetSchema,nativeAgentUIPartIdMetadataKey,Vp as needsManageWhenUnattended,Hp as newsBodySchema,Up as newsIndexSchema,ti as normalizeCountrylessPhoneNumber,Qn as normalizeFilterRule,$n as normalizeForEdgeRpc,Wp as normalizeNewsLocale,er as normalizeOperator,ni as normalizePhoneNumber,Gp as normalizedMeetingTranscriptSchema,tr as now,number,Kp as oauthAttemptStartedSchema,object,qp as objectDefinitionOutputSchema,S_ as objectImageSchema,Jp as objectRecordOutputSchema,Yp as openRequests,Xp as orderAgentSessionMessages,packLayout,page,Zp as pageAudienceSchema,pageCompactor,Qp as pageReadSchema,$p as pageSummarySchema,rr as pageTraitsOf,em as parseAgentDefinitionAccessRole,tm as parseAgentSessionAccessRole,ri as parseAttributeConfig,ii as parseAttributeConfigForCreate,ai as parseAttributeConfigForUpdate,A as parseBlockParameters,nm as parseCountMode,ir as parseDecisionLink,rm as parseDeviceAccessRole,im as parseDeviceChannelFrame,am as parseMergedAgentTrigger,parseNamedTarget,parseNativeAgentUIPartIdsMetadata,om as parseNewsBody,sm as parseNewsIndex,cm as parseNewsIntensity,lm as parseNewsTarget,um as parseOptionalCountMode,dm as parsePageAccessRole,ar as parseQualifiedAttribute,fm as parseRecordAccessRole,or as parseRecordListScope,pm as parseReference,sr as parseResourceVisibility,parseSchemaGroupPresentation,parseSchemaOwner,parseSchemaState,mm as parseServerFrame,parseSkillSource,hm as parseToolGroupGrant,parseWherePipe,gm as parseWorkerFrame,_m as permissionFlagsSchema,vm as permissionGrantSchema,ym as permissionSchema,phone,placeNew,preference,bm as preferenceEntry,xm as preferenceEntrySchema,oi as propertyAttributeSchema,si as propertyAttributeWireSchema,ci as propertySchemaSchema,li as propertySchemaWireSchema,Sm as providerNameSchema,Cm as publishBlockerSchema,wm as publishDraftOutputSchema,j as publishedViewContentDefinitionSchema,cr as query,Tm as quotaStateSchema,Em as readArchitectPublication,readArtifactResult,Dm as readAskQuestionsResult,readFormFieldValue,readGeneratedImageResult,Om as readRunOriginMetadata,km as recentActivityEntryKey,Am as recipientContactSchema,jm as recipientIdentitySchema,Mm as recipientSuggestionSchema,Nm as recordAggregatesSchema,Pm as recordAudienceSchema,Fm as recordCollectionOutputSchema,Im as recordDeletionCountSchema,Lm as recordDriveChildSchema,Rm as recordDriveChildrenPageSchema,zm as recordDriveSearchHitSchema,Bm as recordDriveSearchResultSchema,Vm as recordGraphEdgeSchema,Hm as recordGraphNodeKey,Um as recordGraphNodeSchema,Wm as recordGraphRequestSchema,Gm as recordGraphResponseSchema,Km as recordIncomingReferenceSchema,qm as recordIncomingReferencesPageSchema,recordLinksTab,Jm as recordMeetingsCount,Ym as recordOperationSchema,Xm as recordPurgeResultSchema,lr as recordQueryDefinitionSchema,Zm as recordValuesCodec,Qm as recordsBulkCreateResultSchema,$m as recordsBulkDeleteResultSchema,eh as recordsBulkUpdateResultSchema,th as refineTrigger,ui as refuseForeignKeys,di as rejectUnknownAttributesOrThrow,relation,ur as relationAcceptsObject,nh as relationOptionSchema,rh as relationOptionsResponseSchema,relationProperty,dr as relationTargetsOf,renderLabelExpression,repairPageGrid,ih as replyDefaultsSchema,ah as requestedCapabilities,pr as requireRecordContentContext,mr as requireSingleRelationTarget,oh as resolveAppearance,hr as resolveCollectionActions,gr as resolveContentNavigation,_r as resolveEffectiveFilterType,resolveFieldRequired,vr as resolveIsWithinBounds,sh as resolveLocalized,resolvePageGrid,resolvePropertyDefinitions,fi as resolveTextPattern,yr as resolveUtcDayBounds,resolveViewContents,ch as resolvedRelationsBatchSchema,lh as resourceGrant,uh as resourceUsedBySchema,dh as retryPolicyOutputSchema,fh as retypeOptionsOutputSchema,richtext,ph as roleSchema,rollup,mh as routedMessageInferenceSchema,hh as routineAudiencePreviewSchema,gh as routineAudienceSchema,_h as sameActions,s as sameStableValue,vh as schemaDraftOutputSchema,schemaGroupKey,yh as schemaGroupListSchema,bh as schemaGroupSchema,Sh as schemaStateEntrySchema,Ch as schemaStateSchema,schemaStateSourcePayload,wh as secretEntrySchema,select,pi as selectOptionWriteSchema,c as serializeCanonicalJson,l as serializeStableJson,Th as servedAsIsAttributeSchema,Eh as sessionImageUsageSchema,Dh as sessionInferenceOverridesOutputSchema,Oh as sessionInferencePatchSchema,kh as sessionStateSchema,Ah as setAgentSessionWorkPostureResultSchema,settleLayout,sha256Hex,br as singleRelationTarget,jh as slackConditionSchema,Mh as slackTriggerMatchSchema,snapWidth,xr as sortsSchema,Sr as sourcedAttributeOf,status,mi as statusGroupSchema,hi as statusOptionWriteSchema,storedContentDefinition,Nh as submitOutcomeSchema,Ph as syncBundleResultSchema,Cr as systemColumnFilterTarget,Fh as tenantInvitationSchema,Ih as tenantSettingsResponseSchema,Lh as tenantSettingsSchema,text,wr as toMultiValueOperator,Tr as toUtcDayString,Er as today,Rh as todoItemSchema,zh as todoPlanSchema,Bh as toolImpactSchema,Vh as triageResultSchema,unaccent,user,Hh as userProfileSchema,Uh as utf8ByteLength,gi as validateAttribute,Dr as validateAttributeName,Or as validateContentViewCatalogue,_i as validateDraft,vi as validateDraftOrThrow,validateLabelExpression,yi as validateObject,validateObjectExpressions,validateObjectImage,jr as validateObjectName,bi as validateObjectOrThrow,Nr as validateQualifiedRule,Pr as validateStoredViews,Fr as validateViewName,Wh as viewPreferenceAddressSchema,Gh as viewReadSchema,Kh as viewerAccessSchema,widthStepConstraint,xi as wireHiddenTypeConfigMask,Si as wireOmittedConfigKeysFor,qh as withPreferenceEntry,Jh as withoutTrailingSlashes,Ci as withoutUnknownOptionKeys,workspaceViewAuthoring};