@standards/schema 1.0.0-alpha.444 → 1.0.0-alpha.446

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.
Files changed (38) hide show
  1. package/dist/all-2xry8t7d.js +4 -0
  2. package/dist/all-BWpaP2E2.mjs +4 -0
  3. package/dist/api/index.d.mts +110 -69
  4. package/dist/api/index.d.ts +110 -69
  5. package/dist/api/index.js +1 -1
  6. package/dist/api/index.mjs +1 -1
  7. package/dist/attribute-validators-CFa9B00S.mjs +11 -0
  8. package/dist/attribute-validators-Djse5LWc.js +11 -0
  9. package/dist/{exceptions-zQlC2r1F.d.mts → exceptions-BjtmXIip.d.mts} +10 -2
  10. package/dist/{exceptions-YHdKk5N8.d.ts → exceptions-CxTJ-9hJ.d.ts} +10 -2
  11. package/dist/exceptions.d.mts +1 -1
  12. package/dist/exceptions.d.ts +1 -1
  13. package/dist/exceptions.js +1 -1
  14. package/dist/exceptions.mjs +1 -1
  15. package/dist/{index-BxDb1xz7.d.ts → index-BoesrnBX.d.ts} +2204 -3098
  16. package/dist/index.d.mts +4 -4
  17. package/dist/index.d.ts +4 -4
  18. package/dist/index.js +2 -2
  19. package/dist/index.mjs +2 -2
  20. package/dist/record-operation-BBOde9mE.mjs +2 -0
  21. package/dist/record-operation-BLhz84I4.js +2 -0
  22. package/dist/{record-query-CJVicxN7.d.mts → record-query-BMeq7JRi.d.mts} +2185 -3079
  23. package/dist/{utils-CwQlKDYz.d.ts → utils-BdmqhdNL.d.ts} +1 -1
  24. package/dist/{utils-BZMgedee.d.mts → utils-DPto28bh.d.mts} +1 -1
  25. package/dist/utils.d.mts +1 -1
  26. package/dist/utils.d.ts +1 -1
  27. package/dist/validation/all.d.mts +2 -2
  28. package/dist/validation/all.d.ts +2 -2
  29. package/dist/validation/all.js +1 -1
  30. package/dist/validation/all.mjs +1 -1
  31. package/openapi.json +193 -192
  32. package/package.json +2 -2
  33. package/dist/all-BrGOpgV8.js +0 -4
  34. package/dist/all-Df9IeCkI.mjs +0 -4
  35. package/dist/attribute-validators-BJdOkURX.mjs +0 -11
  36. package/dist/attribute-validators-rgM_bLG1.js +0 -11
  37. package/dist/record-operation-BrYpYAKR.js +0 -2
  38. package/dist/record-operation-DSjDUW-6.mjs +0 -2
package/dist/index.js 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
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-CZwl7iUo.js"),t=require("./attribute-validators-rgM_bLG1.js"),n=require("./all-BrGOpgV8.js");require("./zod-locale.js");const r=require("./record-operation-BrYpYAKR.js"),i=require("./exceptions.js");let a=require("zod");a=t.__toESM(a);let o=require("@standards/constants"),s=require("libphonenumber-js");const c=`__stndrdsNativeUiPartIds`;function invalidNativePartIds(){throw new i.ValidationError(`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?.[c];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 l=[`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 t.isValueKindType(e.type,`options`)}function schemaGroupKey(e){return`${e.kind}:${e.name}`}function refuse$2(e){throw new i.ValidationError(e,[{path:[`label`],message:e}])}function parseSchemaGroupPresentation(e){let n=e??{},r={};if(n.label!==void 0){let e=n.label;if(e===null)r.label=null;else if(typeof e!=`string`)refuse$2(`Label must be a string`);else{let n=e.trim();n.length===0&&refuse$2(`Label must not be empty`),n.length>t.SCHEMA_LIMITS.labelLength&&refuse$2(`Label is too long (max ${t.SCHEMA_LIMITS.labelLength} characters)`),r.label=n}}return r}const u=/^(?:core|bundle:.+)$/u;function parseSchemaOwner(e){if(e===null)return null;if(!u.test(e))throw new i.ValidationError(`Invalid schema owner "${e}"`,[]);return e}const d=[`web`,`presentation`,`document`,`spreadsheet`,`image`,`code`,`other`],f=[`ephemeral`,`conversation`,`persistent`],p=[`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 m=[`B`,`KB`,`MB`,`GB`,`TB`];function formatByteSize(e){let{value:t,unitIndex:n}=computeByteMagnitude(e);return`${t} ${m[n]}`}const h=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(!h.includes(e.type))throw Error(`Property type "${e.type}" is not supported in .qualifyWith()`);t.push(e)}return{definitions:t}}const g=[`UPPER`,`LOWER`,`capitalize`,`trim`],_=[`prefix`,`suffix`,`wrap`,`default`],v=[...g,..._],y=/^\s*where\s*(?::(.*))?$/s,b=`[A-Za-z_][A-Za-z0-9_]*`,x=/^[^\s,()|{}="']+$/,ee=RegExp(`^(${b})\\s*=\\s*(.*)$`),S=RegExp(`^(${b})\\s+in\\s*\\(([^()]*)\\)$`);function isWherePipe(e){return y.test(e)}function parseWherePipe(e){let t=e.match(y)?.[1]?.trim();if(!t)return null;let n=t.match(S);if(n){let e=n[2].split(`,`).map(e=>e.trim());return e.every(e=>x.test(e))?{property:n[1],values:e}:null}let r=t.match(ee);return r&&x.test(r[2])?{property:r[1],values:[r[2]]}:null}const C=a.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=C.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 w=`(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=w){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 te=/^\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}$/;function getSingleAttributeFromExpression(e){let t=e.trim().match(te);return t?t[1]:null}function getEditableLabelAttribute(e,n){let r=getSingleAttributeFromExpression(e);if(r===null)return null;let i=n.find(e=>e.name===r);return!i||i.type!==`text`||t.getAttributeCapabilities(i).authoring.readOnly?null:i}const T={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[T.name]),description:textValue(t[T.description]),content:textValue(t[T.content]),visibility:e.visibility,ownedBy:e.ownedBy,updatedAt:new Date(e.updatedAt).toISOString()}}const ne={meetingHour:`0.80`,computeVcpuHour:`0.20`,browserHour:`0.60`},E=[`meeting.recording`,`sandbox.agent`,`sandbox.harness`,`sandbox.build`,`browser.session`];function isMeteredChargeKind(e){return E.includes(e)}const D=/^\d+(?:\.\d+)?$/u;function meteredUsd(e,t){if(!D.test(e))throw new i.ValidationError(`Invalid metered rate "${e}"`,[]);if(!(t>=0&&t<=2**53-1))throw new i.ValidationError(`Invalid metered duration "${t}"`,[]);let[n=`0`,r=``]=e.split(`.`),a=BigInt(n+r)*BigInt(t.toFixed(12).replace(`.`,``)),o=10n**BigInt(r.length+12-4),s=(a+o-1n)/o,c=10n**BigInt(4),l=(s%c).toString().padStart(4,`0`).replace(/0+$/u,``);return l?`${s/c}.${l}`:`${s/c}`}const O=`@standards/schema`;function createStandardSchemaProps(e){return{version:1,vendor:O,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(n.createAttributeValidator(this.build()))}constructor(e,n,r){t.validateAttributeName(n),t.validateLabel(r),this.attr={name:n,label:r,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 t.validateIconName(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||!t.isValueKindType(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]=n.datePrecisionIssues(`date`,this.attr);if(e!==void 0)throw new i.ValidationError(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,n){let r=asMutableArray(n);t.validateOptions(e.name??`unknown`,r),e.options=r}function addOption(e,n){e.options||=[],t.validateOptions(e.name??`unknown`,[...e.options,n]),e.options.push(n)}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 n=this.attr.targets;if(!n||n.length===0)throw Error(`.bilateral() must be called AFTER .to(). Example: relation("company", "Company").to("companies").bilateral({ ... })`);if(n.length>1)throw Error(`Bilateral relations are not supported for polymorphic relations (multiple .to() targets).`);if(t.isUniversalRelation(this.attr))throw Error(`Bilateral relations are not supported for universal relations (.toAny()).`);let r=n[0]?.object;if(!r)throw new i.ValidationError(`Bilateral relation requires one target object`,[{path:[`bilateral`,`object`],message:`Bilateral relation requires one target object`}]);if(e.object&&e.object!==r){let t=`Bilateral inverse object ${e.object} must match relation target ${r}`;throw new i.ValidationError(t,[{path:[`bilateral`,`object`],message:t}])}return this.attr.bilateral={...e,object:r},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 i.SchemaError(`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.SchemaErrorCode.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 k={owner:`standardshq`,repo:`skills`,ref:`stable`},A=`[A-Za-z0-9._-]+`,j=`[A-Za-z0-9_-]+`,M=RegExp(`^(${j})/(${A})@([a-z0-9-]+)(?:#(${A}))?$`),re=RegExp(`^(${j})/(${A})$`),N=/^[0-9a-f]{40}$/i;function isSafeSegment(e){return e!==`.`&&!e.startsWith(`-`)&&!e.includes(`..`)}function refuse$1(e,t){throw new i.ValidationError(`Invalid skill source "${e}": ${t} (expected owner/repo@skill or owner/repo@skill#ref)`,[{path:[`source`],message:t}])}function canonicalRef(e){return N.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 re.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&&N.test(e.ref)}const P=/^[a-z0-9][a-z0-9-]{0,62}$/,F=`core`;function assertBundleName(e){if(!P.test(e))throw new i.ValidationError(`Invalid bundle name "${e}": expected a lowercase slug matching ${P}`,[]);if(e===`core`)throw new i.ValidationError(`Bundle name "${F}" 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 i.ValidationError(e,[{path:t,message:e}])}}function requireBuilderName(e,t){if(typeof e!=`string`||e.trim().length===0)throw new i.ValidationError(`Name must not be blank`,[{path:t,message:`Name must not be blank`}])}function validateContentConfiguration(e,n){if(typeof e!=`object`||!e||Array.isArray(e))throw new i.ValidationError(`Invalid content configuration`,[{path:n,message:`Expected content configuration`}]);for(let t of[`name`,`label`,`placement`])if(Object.hasOwn(e,t)){let e=`Independent content configuration cannot define ${t}`;throw new i.ValidationError(e,[{path:[...n,t],message:e}])}let r=t.publishedViewContentDefinitionSchema.safeParse({...e,name:`content`,placement:e.type===`group`?`grid`:`main`});if(!r.success)throw i.ValidationError.fromZodErrors(r.error.issues.map(e=>({path:[...n,...e.path.map(String)],message:e.message})));r.data.type===`form`&&r.data.groups.forEach((e,t)=>requireBuilderName(e.name,[...n,`groups`,String(t),`name`]));let{name:a,label:o,placement:s,...c}=r.data;return cloneBuilderValue(c,n)}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,n,r){let i=12-n,a=t.BLOCK_WIDTHS.filter(e=>e>=r&&e<=i);return a.length===0?t.BLOCK_WIDTHS.find(e=>e>=r)??r:a.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&&t.BLOCK_WIDTHS.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,n){if(!t.BLOCK_WIDTHS.includes(n)){let e=`A block spans ${t.BLOCK_WIDTHS.join(`, `)} columns, not ${String(n)}`;throw new i.ValidationError(e,[{path:[`content`,`span`],message:e}])}return{content:e,span:n}}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 i.ValidationError?new i.ValidationError(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 i.ValidationError(`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,n){for(let[r,i]of Object.entries(n)){let n=e.inputs[r];i!==void 0&&n!==void 0&&t.parseBlockParameters({parameters:n.schema},i,[`content`,`parameters`,r])}return n}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`]),t.parseBlockParameters(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,n){return new MetricBuilder(t.METRIC_BLOCK,checkInputs(t.METRIC_BLOCK,measure(this.query,e,n)))}};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,n){return new ChartBuilder(t.CHART_BLOCK,checkInputs(t.CHART_BLOCK,{...measure(this.query,e,n),kind:`bar`}))}};const ie={"7d":7,"30d":30};var AgendaBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}next(e){let t=typeof e==`number`?e:ie[e];if(!Number.isInteger(t)||t<1){let e=`An agenda looks ahead a whole number of days, at least 1`;throw new i.ValidationError(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,n){return new AgendaBuilder(t.AGENDA_BLOCK,checkInputs(t.AGENDA_BLOCK,{query:storedQuery(e,`agenda`),attribute:n}))}function card(e){let n=e===void 0||typeof e==`string`?e:e.build().name;return new CardBuilder(t.CARD_BLOCK,n===void 0?{}:checkInputs(t.CARD_BLOCK,{object:n}))}function text$1(e){return new BlockContentBuilder(t.TEXT_BLOCK,checkInputs(t.TEXT_BLOCK,{markdown:e}))}function decisions(){return new DecisionsBuilder(t.DECISIONS_BLOCK,{})}function meetingsUpcoming(){return new MeetingsUpcomingBuilder(t.MEETINGS_UPCOMING_BLOCK,{})}function mailbox(){return new MailboxBuilder(t.MAILBOX_BLOCK,{})}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,n){let r=[...n];function visit(i,a){let o=n[i.length];if(o===void 0)betterSplit(i,r)&&(r=i);else for(let n of t.BLOCK_WIDTHS)n>=o&&a+n<=e&&visit([...i,n],a+n)}return visit([],0),r}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 i.ValidationError(t,[{path:e,message:t}])}function traitsOf(e,n=[]){return t.layoutTraitsOf(e,t.contentExtensionRegistry,new Map(n.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,n,r){let i={title:n,...r.description===void 0?{}:{description:r.description},...r.icon===void 0?{}:{icon:r.icon}};return{key:e,content:new BlockContentBuilder(t.HEADING_BLOCK,i),span:12}}function groupOf(e,n,r){let[i]=e.map(e=>e.name).sort(),a=t.groupSizeMessage(e.length);return(a!==void 0||i===void 0)&&reject(r,String(a)),{type:`group`,name:n.name??`group_${i}`,placement:`grid`,...n.label===void 0?{}:{label:n.label},members:e.map(e=>e.name)}}function requirePlacement(e,n,r,i,a){if(e.type===`page`&&reject(a,`Content "${r}" cannot reference a page from a page`),t.requireContentPlacement(e,n,r,i,a),e.type!==`custom`)return;let o=n?.refine?.(e.parameters??{},i);o&&reject([...a,`parameters`,o.input],o.message)}var I=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:n,label:r,object:a,icon:o,description:s,home:c,sections:l}=this.data;requireBuilderName(n,[...e,`name`]),a!==void 0&&requireBuilderName(a,[...e,`object`]),c&&a!==void 0&&reject([...e,`home`],`Only a standalone page can be the home`),l.every(e=>e.kind===`row`&&Object.keys(e.blocks).length===0)&&reject([...e,`contents`],`A page declares at least one block`);let u=a===void 0?`page`:`record`,d=[],f=[],p=headingNames(l),m=0;for(let t of l){let n=[...e,`contents`,String(d.length)],r=(t.kind===`heading`?[headingEntry(p[m++]??``,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(d.length)];requireBuilderName(t.key,[...n,`name`]);let{configuration:r,extension:i}=configureContent(t.content,n);requirePlacement(r,i,t.key,u,n);let a={...r,name:t.key,placement:`grid`};return d.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=f.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);d.push(e),f.push({i:e.name,x:0,y:a,w:12,h:traitsOf(e,d).size.h});continue}let o=0;r.forEach(({content:e},t)=>{let n=i[t]??0;f.push({i:e.name,x:o,y:a,w:n,h:traitsOf(e).size.h}),o+=n})}let h=Object.fromEntries(packLayout(f).map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),g={name:n,label:r,...a===void 0?{}:{object:a},context:`page`,...o===void 0?{}:{icon:o},...s===void 0?{}:{description:s},...c?{home:!0}:{},contents:d,grid:h},_=t.contentViewDefinitionSchema.safeParse(g);if(!_.success)throw i.ValidationError.fromZodErrors(_.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return{kind:`view`,definition:cloneBuilderValue(g,e)}}};function page(e,t){return new I({name:e,label:t,object:void 0,sections:[]})}var L=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 n=t.contentViewDefinitionSchema.safeParse(this.data);if(!n.success)throw i.ValidationError.fromZodErrors(n.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return this.data.contents.forEach((n,r)=>{let i=[...e,`contents`,String(r)];requireBuilderName(n.name,[...i,`name`]),n.type===`form`&&n.groups.forEach((e,t)=>requireBuilderName(e.name,[...i,`groups`,String(t),`name`])),t.requireContentPlacement(n,this.extensions[r],n.name,this.data.context,i)}),{kind:`view`,definition:cloneBuilderValue(this.data,e)}}};function detailView(e,t){return new L({name:e,label:t,object:void 0,context:`record`,contents:[]})}function listView(e,t){return new L({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 r.AgentBuilder)}function assertPiece(e,t){if(typeof e!=`object`||!e)throw new i.ValidationError(`Unsupported bundle piece: ${t}`,[]);if(isViewPiece(e)||e instanceof r.AgentBuilder||typeof e.build==`function`)return;let n=e.name;throw new i.ValidationError(`Unsupported bundle piece: ${typeof n==`string`?n:String(t)}`,[])}function declarationOf$1(e){return e instanceof I||e instanceof L?e.build():e}function isPage(e){return e.definition.context===`page`}function validateView(e){let n=t.contentViewDefinitionSchema.safeParse(e);if(n.success)return n.data;let r=typeof e==`object`&&e&&`name`in e?String(e.name):`(unnamed)`,a=i.ValidationError.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})));throw new i.ValidationError(`View "${r}" is invalid. ${a.message}`,a.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 i.DuplicateError(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(t){return sha256Hex(e.canonicalStringify({objects:[...t.objects].sort(byIdentity(e=>({name:e.name}))),views:[...t.views].sort(byIdentity(e=>e)),pages:[...t.pages].sort(byIdentity(e=>e.definition)),agents:[...t.agents].sort(byIdentity(e=>({name:e.name})))}))}const R={title:120,context:200,prompt:r.BUNDLE_SETUP_PROMPT_MAX_LENGTH};function assertSetupWithinLimits(e){let t=Object.keys(R).flatMap(t=>{let n=R[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 i.ValidationError(`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 i.ValidationError(`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!==k.owner||n.repo!==k.repo?`Skill "${e}" must come from ${k.owner}/${k.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 n=e.name===F;n||assertBundleName(e.name);let{objects:r,pages:a,agents:o}=e,s=e.views.map(validateView),c=r.map(e=>e.name);if(assertUniqueIdentities(`object`,c.map(e=>({name:e}))),assertUniqueIdentities(`view`,s),assertUniqueIdentities(`page`,a.map(e=>e.definition)),assertUniqueIdentities(`agent`,o.map(e=>({name:e.name}))),!n){let e=c.find(t.isNativeObjectName);if(e!==void 0)throw new i.ReservedObjectNameError(e,`bundle`)}let{setup:l}=e,u=e.translations??{};assertSetup(l,u);let d=e.skills??[];return assertSkills(d),{name:e.name,label:e.label.trim(),description:e.description??null,hash:await hashBundlePieces({objects:r,views:s,pages:a,agents:o}),objects:r,views:s,pages:a,agents:o,uses:e.uses??[],samples:e.samples??[],...l?{setup:l}:{},...d.length>0?{skills:d}:{},translations:u}}const z=Symbol.for(`standards.bundle`);function isBundle(e){return typeof e==`object`&&!!e&&e[z]===!0}var BundleBuilder=class{constructor(e,t){this[z]=!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=[],i=[];for(let[a,o]of this.pieces.entries())if(assertPiece(o,a),o instanceof r.AgentBuilder)i.push(o.build());else if(isViewPiece(o)){let e=declarationOf$1(o);isPage(e)?n.push(e):t.push(e.definition)}else e.push(o.build());return this.assertNotInUsed(e),builtBundleFromPieces({name:this.name,label:this.label,description:this.descriptionText,objects:e,views:t,pages:n,agents:i,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 i.DuplicateError(`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 ae=a.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=a.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 a.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,a=`prefillExpression on free field "${r.attribute.name}" in step "${t.id}"`;if(!isLabelExpression(n))throw Error(`[FormBuilder] ${a} must contain at least one {{ attribute }} interpolation.`);if(/\{\{\s*\}\}/.test(n))throw Error(`[FormBuilder] ${a} contains empty {{ }} interpolation.`);for(let o of n.matchAll(/(?<!\|)\|(?!\|)\s*(\w+)(?:\s*:[^|}]*)?/g)){let n=o[1];if(!e.includes(n))throw Error(`[FormBuilder] ${a} uses invalid pipe "${n}". Valid pipes: ${e.join(`, `)}`);let s=o[0].replace(/^\|/,``);if(isWherePipe(s)&&!parseWherePipe(s))throw new i.ValidationError(`[FormBuilder] ${a} has a malformed where: pipe "${s.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(ae.safeParse(n.readOnly).success)continue;let t=isFormFreeFieldRef(n)?n.attribute.name:n.attribute,r=isFormFreeFieldRef(n)?`free field`:`field`;throw new i.ValidationError(`[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(l);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: ${l.join(`, `)}`)}}}};function form(e,t){return new FormBuilder(e,t)}const B=a.object({shape:a.enum(r.IMAGE_SHAPES),from:a.array(a.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 i.ValidationError(`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 i.SchemaError(`Object "${t}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,i.SchemaErrorCode.VALIDATION_FAILED);let a=C.safeParse(n);if(!a.success){let e=a.error.issues[0]?.message??`Invalid labelExpression`;throw new i.SchemaError(`Invalid labelExpression for "${t}": ${e}`,i.SchemaErrorCode.VALIDATION_FAILED)}if(r!==void 0){let e=C.safeParse(r);if(!e.success){let n=e.error.issues[0]?.message??`Invalid embeddingExpression`;throw new i.SchemaError(`Invalid embeddingExpression for "${t}": ${n}`,i.SchemaErrorCode.VALIDATION_FAILED)}}}var ObjectBuilder=class{get"~standard"(){return createStandardSchemaProps(n.createObjectValidator(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 n=e.map(e=>`build`in e&&typeof e.build==`function`?e.build():e);t.assertUniqueBy([...this.obj.attributes,...n],e=>e.name,e=>new i.DuplicateError(`attribute`,e,`Object "${this.obj.name}": duplicate attribute name "${e}"`)),this.obj.attributes.push(...n)}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 i.ValidationError(`[ObjectBuilder] Missing required field: name`,[{path:[`name`],message:`name is required`}]);if(!this.obj.label)throw new i.ValidationError(`[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&&t.validateObjectName(e)}};function object(e,n){if(t.isNativeObjectName(e))throw new i.ReservedObjectNameError(e,`builder`);return new ObjectBuilder(e,n)}function validatePresetStructure(e,t,n){let fail=(t,n)=>{throw new i.ValidationError(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 V=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`&&t.parseBlockParameters(this.extension,e.parameters,[`content`,`parameters`]),e}},H=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 i.ValidationError?new i.ValidationError(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 H(e,t,[])}function collection(e){return new V({type:`collection`,...storedQuery(e,`collection`)})}function form$1(...e){return new V({type:`form`,groups:e.map(e=>`build`in e?e.build():e)})}function activity(){return new V({type:`activity`})}function richtext$1(e){return new V({type:`richtext`,attribute:e})}function documents(){return new V({type:`documents`})}function forms(){return new V({type:`forms`})}function emails(...e){return new V({type:`emails`,emailAttributes:e})}function meetings(...e){return new V({type:`meetings`,emailAttributes:e})}function custom(e,t){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw new i.ValidationError(`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 i.ValidationError(`Expected custom content`,[]);let r=new V({...n,extension:e.name},e);return r.build(),r}function recordLinksTab(){return[t.RECORD_LINKS_CONTENT.name,t.RECORD_LINKS_CONTENT.label,custom(t.RECORD_LINKS_BLOCK,{}).icon(t.RECORD_LINKS_CONTENT.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 i.ValidationError(e,[{path:[`content`,`page`,`object`],message:e}])}return new V({type:`page`,page:{object:t,name:n}})}const oe={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,n){let r=/* @__PURE__ */ new Set;if(e.length<=t.SCHEMA_LIMITS.tabsPerView)return r;let i=new Map(e.map(e=>[e.name,e])),a=/* @__PURE__ */ new Map;for(let{name:t,definition:n}of e)if(n.type===`group`)for(let e of n.members)a.has(e)||a.set(e,t);let cellOf=e=>{let t=i.get(e),r=t?n(t.state):null;if(r!==null)return r;let o=i.get(a.get(e)??``);return o?n(o.state):null},o=e.filter(e=>e.state.sourceDefinition===null).sort(inReadingOrder(cellOf)).reverse();for(let n of o){if(e.length-r.size<=t.SCHEMA_LIMITS.tabsPerView)break;if(r.has(n.name))continue;let a=n.definition.type===`group`?n.definition.members.flatMap(e=>{let t=i.get(e);return t&&t.definition.type!==`group`?[t]:[]}):[];if(!a.some(e=>e.state.sourceDefinition!==null))for(let e of[n,...a])r.add(e.name)}return r}function resolvePageGrid(e,n={}){let rawCell=t=>e.gridCustomized||t.sourceDefinition===null?t.workspaceGrid:t.sourceGrid,r=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{name:e,state:t,definition:n}]:[]}),i=t.memberlessGroups(r.map(e=>e.definition)),a=r.filter(e=>!i.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),o=overLimit(a,rawCell),s=a.filter(e=>!o.has(e.name)),c=new Map(s.map(e=>[e.name,e.definition])),l=n.traitsOf??t.pageTraitsOf(c,t.contentExtensionRegistry),u=t.groupedMembers([...c.values()]),d=s.filter(e=>!u.has(e.name)),f={},p=[],place=(e,n)=>{n&&!Object.values(f).some(e=>t.overlaps(n,e))?f[e]={...n}:p.push(e)};if(e.gridCustomized)for(let{name:e,state:t}of d)place(e,t.workspaceGrid);else{for(let{name:e,state:t}of d)t.sourceDefinition!==null&&place(e,t.sourceGrid);for(let{name:e,state:t}of d)t.sourceDefinition===null&&place(e,t.workspaceGrid)}let m=Math.max(0,...Object.values(f).map(e=>e.y+e.h));for(let t of p.sort()){let n=e.contents[t],{w:r,h:i}=n.workspaceGrid??n.sourceGrid??l(t).size;f[t]={x:0,y:m,w:r,h:i},m+=i}let h=repairPageGrid(Object.entries(f).map(([e,t])=>({i:e,...t,...n.statics?.has(e)?{static:!0}:{}})),l);return{grid:Object.fromEntries(h.cells.map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),repairs:[...[...o].map(e=>({name:e,kind:`dropped`})),...h.repairs]}}function droppedContents(e){return new Set(e.flatMap(e=>e.kind===`dropped`?[e.name]:[]))}function resolveViewContents(e){let n=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{definition:n,...t}]:[]}),r=[`main`,`aside`].flatMap(t=>{let r=t===`main`?e.mainOrderCustomized:e.asideOrderCustomized;return n.filter(e=>e.definition.placement===t).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)}),i=t.memberlessGroups(n.map(e=>e.definition)),a=n.filter(e=>e.definition.placement===`grid`&&!i.has(e.definition.name)).map(e=>e.definition).sort((e,t)=>e.name.localeCompare(t.name));return[...r,...a]}let U;function unaccentRules(){if(U)return U;let e=/* @__PURE__ */ new Map;for(let t of`
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-CZwl7iUo.js"),t=require("./attribute-validators-Djse5LWc.js"),n=require("./all-2xry8t7d.js");require("./zod-locale.js");const r=require("./record-operation-BLhz84I4.js"),i=require("./exceptions.js");let a=require("zod");a=t.__toESM(a);let o=require("@standards/constants"),s=require("libphonenumber-js");const c=`__stndrdsNativeUiPartIds`;function invalidNativePartIds(){throw new i.ValidationError(`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?.[c];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 l=[`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 t.isValueKindType(e.type,`options`)}function schemaGroupKey(e){return`${e.kind}:${e.name}`}function refuse$2(e){throw new i.ValidationError(e,[{path:[`label`],message:e}])}function parseSchemaGroupPresentation(e){let n=e??{},r={};if(n.label!==void 0){let e=n.label;if(e===null)r.label=null;else if(typeof e!=`string`)refuse$2(`Label must be a string`);else{let n=e.trim();n.length===0&&refuse$2(`Label must not be empty`),n.length>t.SCHEMA_LIMITS.labelLength&&refuse$2(`Label is too long (max ${t.SCHEMA_LIMITS.labelLength} characters)`),r.label=n}}return r}const u=/^(?:core|bundle:.+)$/u;function parseSchemaOwner(e){if(e===null)return null;if(!u.test(e))throw new i.ValidationError(`Invalid schema owner "${e}"`,[]);return e}const d=[`web`,`presentation`,`document`,`spreadsheet`,`image`,`code`,`other`],f=[`ephemeral`,`conversation`,`persistent`],p=[`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 m=[`B`,`KB`,`MB`,`GB`,`TB`];function formatByteSize(e){let{value:t,unitIndex:n}=computeByteMagnitude(e);return`${t} ${m[n]}`}const h=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(!h.includes(e.type))throw Error(`Property type "${e.type}" is not supported in .qualifyWith()`);t.push(e)}return{definitions:t}}const g=[`UPPER`,`LOWER`,`capitalize`,`trim`],ee=[`prefix`,`suffix`,`wrap`,`default`],_=[...g,...ee],te=/^\s*where\s*(?::(.*))?$/s,ne=`[A-Za-z_][A-Za-z0-9_]*`,re=/^[^\s,()|{}="']+$/,ie=RegExp(`^(${ne})\\s*=\\s*(.*)$`),ae=RegExp(`^(${ne})\\s+in\\s*\\(([^()]*)\\)$`);function isWherePipe(e){return te.test(e)}function parseWherePipe(e){let t=e.match(te)?.[1]?.trim();if(!t)return null;let n=t.match(ae);if(n){let e=n[2].split(`,`).map(e=>e.trim());return e.every(e=>re.test(e))?{property:n[1],values:e}:null}let r=t.match(ie);return r&&re.test(r[2])?{property:r[1],values:[r[2]]}:null}const v=a.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(!_.includes(e))return!1}return!0},{message:`Invalid pipe name. Valid pipes: ${_.join(`, `)}`});function validateLabelExpression(e){let t=v.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 oe=`(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=oe){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 se=/^\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}$/;function getSingleAttributeFromExpression(e){let t=e.trim().match(se);return t?t[1]:null}function getEditableLabelAttribute(e,n){let r=getSingleAttributeFromExpression(e);if(r===null)return null;let i=n.find(e=>e.name===r);return!i||i.type!==`text`||t.getAttributeCapabilities(i).authoring.readOnly?null:i}const y={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[y.name]),description:textValue(t[y.description]),content:textValue(t[y.content]),visibility:e.visibility,ownedBy:e.ownedBy,updatedAt:new Date(e.updatedAt).toISOString()}}const ce={meetingHour:`0.80`,computeVcpuHour:`0.20`,browserHour:`0.60`},le=[`meeting.recording`,`sandbox.agent`,`sandbox.harness`,`sandbox.build`,`browser.session`];function isMeteredChargeKind(e){return le.includes(e)}const ue=/^\d+(?:\.\d+)?$/u;function meteredUsd(e,t){if(!ue.test(e))throw new i.ValidationError(`Invalid metered rate "${e}"`,[]);if(!(t>=0&&t<=2**53-1))throw new i.ValidationError(`Invalid metered duration "${t}"`,[]);let[n=`0`,r=``]=e.split(`.`),a=BigInt(n+r)*BigInt(t.toFixed(12).replace(`.`,``)),o=10n**BigInt(r.length+12-4),s=(a+o-1n)/o,c=10n**BigInt(4),l=(s%c).toString().padStart(4,`0`).replace(/0+$/u,``);return l?`${s/c}.${l}`:`${s/c}`}const de=`@standards/schema`;function createStandardSchemaProps(e){return{version:1,vendor:de,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(n.createAttributeValidator(this.build()))}constructor(e,n,r){t.validateAttributeName(n),t.validateLabel(r),this.attr={name:n,label:r,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){if(t.characterCount(e)>t.SCHEMA_LIMITS.attributeDescriptionLength){let e=`Attribute "${this.attr.name}": ${n.ATTRIBUTE_DESCRIPTION_TOO_LONG}`;throw new i.ValidationError(e,[{path:[`description`],message:e}])}return this.attr.description=e,this}icon(e){return t.validateIconName(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||!t.isValueKindType(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]=n.datePrecisionIssues(`date`,this.attr);if(e!==void 0)throw new i.ValidationError(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,n){let r=asMutableArray(n);t.validateOptions(e.name??`unknown`,r),e.options=r}function addOption(e,n){e.options||=[],t.validateOptions(e.name??`unknown`,[...e.options,n]),e.options.push(n)}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 n=this.attr.targets;if(!n||n.length===0)throw Error(`.bilateral() must be called AFTER .to(). Example: relation("company", "Company").to("companies").bilateral({ ... })`);if(n.length>1)throw Error(`Bilateral relations are not supported for polymorphic relations (multiple .to() targets).`);if(t.isUniversalRelation(this.attr))throw Error(`Bilateral relations are not supported for universal relations (.toAny()).`);let r=n[0]?.object;if(!r)throw new i.ValidationError(`Bilateral relation requires one target object`,[{path:[`bilateral`,`object`],message:`Bilateral relation requires one target object`}]);if(e.object&&e.object!==r){let t=`Bilateral inverse object ${e.object} must match relation target ${r}`;throw new i.ValidationError(t,[{path:[`bilateral`,`object`],message:t}])}return this.attr.bilateral={...e,object:r},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 i.SchemaError(`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.SchemaErrorCode.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 b={owner:`standardshq`,repo:`skills`,ref:`stable`},x=`[A-Za-z0-9._-]+`,fe=`[A-Za-z0-9_-]+`,pe=RegExp(`^(${fe})/(${x})@([a-z0-9-]+)(?:#(${x}))?$`),me=RegExp(`^(${fe})/(${x})$`),he=/^[0-9a-f]{40}$/i;function isSafeSegment(e){return e!==`.`&&!e.startsWith(`-`)&&!e.includes(`..`)}function refuse$1(e,t){throw new i.ValidationError(`Invalid skill source "${e}": ${t} (expected owner/repo@skill or owner/repo@skill#ref)`,[{path:[`source`],message:t}])}function canonicalRef(e){return he.test(e)?e.toLowerCase():e}function parseSkillSource(e){let t=e.trim(),n=t.startsWith(`github.com/`)?t.slice(11):t,r=pe.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 me.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&&he.test(e.ref)}const S=/^[a-z0-9][a-z0-9-]{0,62}$/,C=`core`;function assertBundleName(e){if(!S.test(e))throw new i.ValidationError(`Invalid bundle name "${e}": expected a lowercase slug matching ${S}`,[]);if(e===`core`)throw new i.ValidationError(`Bundle name "${C}" 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(``)}const ge=a.object({source:t.collectionContentSourceSchema,filters:t.filterStateSchema.optional(),sorts:t.sortsSchema.optional(),limit:a.number().int().nonnegative().optional()}).strict();var RecordQuery=class{constructor(e){this.state=e}with(e){return new this.constructor({...this.state,...e})}rule(e,t,n){return this.with({rules:[...this.state.rules,{attribute:e,operator:t,value:n}]})}eq(e,t){return this.rule(e,`is`,t)}neq(e,t){return this.rule(e,`is_not`,t)}gt(e,t){return this.rule(e,`greater_than`,t)}gte(e,t){return this.rule(e,`greater_or_equal`,t)}lt(e,t){return this.rule(e,`less_than`,t)}lte(e,t){return this.rule(e,`less_or_equal`,t)}contains(e,t){return this.rule(e,`contains`,t)}notContains(e,t){return this.rule(e,`not_contains`,t)}startsWith(e,t){return this.rule(e,`starts_with`,t)}endsWith(e,t){return this.rule(e,`ends_with`,t)}in(e,t){return this.rule(e,`any_of`,t)}notIn(e,t){return this.rule(e,`none_of`,t)}isEmpty(e){return this.rule(e,`is_empty`,null)}isNotEmpty(e){return this.rule(e,`is_not_empty`,null)}where(...e){return this.with({rules:[...this.state.rules,...e.map(e=>({...e}))]})}or(){return this.with({combinator:`or`})}orderBy(e,t=`asc`){return this.with({sorts:[...this.state.sorts,{attribute:e,direction:t}]})}limit(e){return this.with({limit:e})}offset(e){return this.with({offset:e})}search(e){return this.with({search:e})}related(e){return this.with({scope:{kind:`related`,relation:e}})}relatedFrom(e){return this.with({scope:{kind:`relatedFrom`,relation:e}})}toDefinition(){let{object:e,scope:t,rules:n,combinator:r,sorts:i,limit:a}=this.state;return{source:t?.kind===`related`?{relation:t.relation}:t?.kind===`relatedFrom`?{object:e,relation:t.relation}:{object:e},...n.length>0?{filters:{combinator:r,rules:n.map(e=>({...e}))}}:{},...i.length>0?{sorts:i.map(e=>({...e}))}:{},...a===void 0?{}:{limit:a}}}};function query(e){return new RecordQuery({object:typeof e==`string`?e:e.build().name,combinator:`and`,rules:[],sorts:[]})}const w=[`day`,`week`,`month`,`quarter`,`year`],T=`$query`,_e=[`data`,`time`,`goal`,`display`];function inputsObject(e){let t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.isOptional?t.schema.optional():t.schema]));return a.object(t).strict()}function createInput(e){return Object.freeze({...e,optional:()=>createInput({...e,isOptional:!0}),inSection:t=>createInput({...e,section:t}),showWhen:(t,n)=>createInput(typeof t==`string`?{...e,when:{key:t,...n?.not?{not:n.not}:{}}}:{...e,shownIf:t,...n?.on===void 0?{}:{when:{key:n.on}}}),many:()=>createInput({...e,isMany:!0,schema:a.array(e.schema).min(1)})})}function objectNameOf(e){return e===void 0||typeof e==`string`?e:e.build().name}function scalar(e,t,n){return createInput({kind:e,of:objectNameOf(n),isOptional:!1,isMany:!1,schema:t})}function name$1(){return a.string().min(1)}function itemsSchema(e,{min:t,max:n}){return a.array(inputsObject(e)).superRefine((e,r)=>{e.length>n&&r.addIssue({code:`custom`,path:[n],message:`At most ${n} items`}),e.length<t&&r.addIssue({code:`custom`,message:`At least ${t} ${t===1?`item`:`items`}`})})}const E={object:e=>scalar(`object`,name$1(),e),attribute:(e,t)=>createInput({kind:`attribute`,of:objectNameOf(e),options:t,isOptional:!1,isMany:!1,schema:name$1()}),query:e=>scalar(`query`,ge,e),record:e=>scalar(`record`,name$1(),e),agent:()=>scalar(`agent`,name$1()),routine:()=>scalar(`routine`,name$1()),view:()=>scalar(`view`,name$1()),url:()=>scalar(`url`,a.url().refine(e=>/^https?:\/\//.test(e),`Only http(s) links`)),emailCategory:()=>scalar(`emailCategory`,name$1()),enum:e=>createInput({kind:`enum`,isOptional:!1,isMany:!1,schema:a.enum(e)}),text:()=>scalar(`text`,name$1()),number:()=>scalar(`number`,a.number()),boolean:()=>scalar(`boolean`,a.boolean()),period:()=>scalar(`period`,a.enum(w)),option:e=>createInput({kind:`option`,field:e,isOptional:!1,isMany:!1,schema:name$1()}),filters:e=>scalar(`filters`,t.filterStateSchema,e),list:(e,t)=>createInput({kind:`list`,list:Object.freeze({items:Object.freeze({...e}),min:t.min,max:t.max}),isOptional:!1,isMany:!1,schema:itemsSchema(e,t)})},D=[`page`,`record`,`display`];function blockIssuePath(e){return[e.input,...e.index===void 0?[]:[e.index],...e.item===void 0?[]:[e.item]]}function defineBlock(e){return Object.freeze({name:e.name,label:e.label,icon:e.icon,family:e.family,contexts:Object.freeze([...e.contexts]),inputs:Object.freeze({...e.inputs}),...e.layout===void 0?{}:{layout:Object.freeze({...e.layout})},parameters:inputsObject(e.inputs).superRefine((t,n)=>{let r=e.refine?.(t);r&&n.addIssue({code:`custom`,path:blockIssuePath(r),message:r.message})}),...e.refine===void 0?{}:{refine:(t,n)=>e.refine?.(t,n)}})}function parseBlockParameters(e,t,n){let r=e.parameters.safeParse(structuredClone(t??{}));if(!r.success)throw i.ValidationError.fromZodErrors(r.error.issues.map(e=>({path:[...n,...e.path.map(String)],message:e.message})));return r.data}function blockObjectInputs(e,n,r){return Object.entries(e.inputs).flatMap(([e,i])=>{let a=n[e];if(i.kind===`object`&&typeof a==`string`)return[a];if(i.kind===`query`&&typeof a==`object`&&a){let e=a.source;if(!e)return[];if(`object`in e&&typeof e.object==`string`)return[e.object];let n=r?.attributes.find(t=>t.name===e.relation);return n?t.relationTargetsOf(n):[]}return[]})}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 i.ValidationError(e,[{path:t,message:e}])}}function requireBuilderName(e,t){if(typeof e!=`string`||e.trim().length===0)throw new i.ValidationError(`Name must not be blank`,[{path:t,message:`Name must not be blank`}])}function validateContentConfiguration(e,n){if(typeof e!=`object`||!e||Array.isArray(e))throw new i.ValidationError(`Invalid content configuration`,[{path:n,message:`Expected content configuration`}]);for(let t of[`name`,`label`,`placement`])if(Object.hasOwn(e,t)){let e=`Independent content configuration cannot define ${t}`;throw new i.ValidationError(e,[{path:[...n,t],message:e}])}let r=t.publishedViewContentDefinitionSchema.safeParse({...e,name:`content`,placement:`main`});if(!r.success)throw i.ValidationError.fromZodErrors(r.error.issues.map(e=>({path:[...n,...e.path.map(String)],message:e.message})));r.data.type===`form`&&r.data.groups.forEach((e,t)=>requireBuilderName(e.name,[...n,`groups`,String(t),`name`]));let{name:a,label:o,placement:s,...c}=r.data;return cloneBuilderValue(c,n)}function validateLiteralContent(e,t){return validateContentConfiguration(e,t),cloneBuilderValue(e,t)}function findRelationAttribute(e,t){return e.attributes.find(e=>e.name===t&&e.type===`relation`)}function relationAcceptsObject(e,t){return e.targets.some(e=>e.object===t||e.object===`*`)}function singleRelationTarget(e){let[t,...n]=e.targets;return t&&n.length===0&&t.object!==`*`?t.object:void 0}function requireSingleRelationTarget(e,t=[e.name,`targets`]){let n=singleRelationTarget(e);if(n===void 0){let n=`Relation "${e.name}" requires one concrete collection target`;throw new i.ValidationError(n,[{path:t,message:n}])}return n}function isCollectionContent(e){return e.type===`collection`}function collectionSourceAddress(e){return e.relation===void 0?{kind:`object`,object:e.object}:e.object===void 0?{kind:`related`,relation:e.relation}:{kind:`relatedFrom`,object:e.object,relation:e.relation}}function collectionSourceAddressOf(e){if(!e||typeof e!=`object`)return;let t=`object`in e?e.object:void 0,n=`relation`in e?e.relation:void 0;if(typeof t==`string`&&typeof n==`string`)return{kind:`relatedFrom`,object:t,relation:n};if(typeof t==`string`&&n===void 0)return{kind:`object`,object:t};if(typeof n==`string`&&t===void 0)return{kind:`related`,relation:n}}function sourcedAttributeOf(e,t){if(t.type===`richtext`)return typeof t.attribute==`string`&&e!==void 0?{object:e,attribute:t.attribute}:void 0;if(t.type!==`collection`)return;let n=collectionSourceAddressOf(t.source);if(n?.kind===`related`)return e===void 0?void 0:{object:e,attribute:n.relation};if(n?.kind===`relatedFrom`)return{object:n.object,attribute:n.relation}}function requireRecordContentContext(e,t,n){if(t!==`record`){let r=`Content "${e}" requires record context. In ${t===`page`?`a standalone page`:`a collection view`} only a collection that lists a whole object, or a custom content that does not require a record, is allowed.`;throw new i.ValidationError(r,[{path:n,message:r}])}}function resolveContentNavigation(e){let t=e.openMode??`page`;return{openMode:t,createMode:e.createMode??t}}function resolveCollectionActions(e,t){return[...new Set(t)].filter(t=>e.actions===void 0||e.actions.includes(t))}const O={collection:[`page`,`record`,`display`],form:[`record`],activity:[`record`],richtext:[`record`],documents:[`record`],forms:[`record`],emails:[`record`],meetings:[`record`]},k={collection:{size:{w:12,h:8},minWidth:6,height:`flexible`,minHeight:4,maxHeight:20},activity:{size:{w:12,h:8},minWidth:6,height:`flexible`},page:{size:{w:12,h:8},minWidth:6,height:`flexible`}};function contentPlacementContexts(e,t){return e.type===`custom`?t?.contexts:e.type===`page`||e.type===`collection`&&collectionSourceAddress(e.source).kind!==`object`?[`record`]:O[e.type]}function requireContentPlacement(e,t,n,r,i){let a=contentPlacementContexts(e,t);a&&!a.includes(hostPlacementContext(r))&&(requireRecordContentContext(n,r,i),reject$1(i,`Content "${n}" cannot be placed in a record view or a record page`))}function hostPlacementContext(e){return e===`record`?`record`:`page`}function contentContextOf(e){return e.context===`page`&&e.object!==void 0?`record`:e.context}const A=/* @__PURE__ */ new WeakSet;function violationOf(e,t,n,r){if(!(e instanceof i.SchemaError))throw e;let a=e instanceof i.ValidationError?e.errors[0]:void 0;return{key:JSON.stringify([t,n,e.code,A.has(e)?`Invalid content view`:e.message]),contentName:n,path:a?.path??r,message:e.message,code:e.code,error:e}}const ve=systemAttributeMap({name:``});function systemAttributeMap(e){return new Map(t.getObjectSystemAttributes(e).map(e=>[e.name,e]))}function reject$1(e,t){throw new i.ValidationError(t,[{path:e,message:t}])}function requireName(e,t){e.trim().length===0&&reject$1(t,`API name must not be empty`)}function indexUnique(e,t,n){let r=/* @__PURE__ */ new Map;return e.forEach((e,a)=>{if(requireName(e.name,[...n,String(a),`name`]),r.has(e.name))throw new i.DuplicateError(t,e.name);r.set(e.name,e)}),r}function capped(e,t){let n=e.slice(0,t).join(`, `);return e.length>t?`${n} … and ${e.length-t} more`:n}function attributeInventory(e,t){return t.length===0?`Object "${e}" has no attributes yet.`:`Attributes of "${e}": ${capped(t,30)}`}function requireAttribute(e,n,r,i,a){if(requireName(n,r),!e)return;let o=e.attributes?.get(n)??(e.system??ve).get(n);if(!o){if(!e.attributes||t.HIERARCHY_ATTRIBUTE_NAMES.has(n))return;let i=attributeInventory(e.name,[...e.attributes.keys()]);reject$1(r,`Unknown attribute "${e.name}.${n}". ${i}${a?.()??``}`)}let s=i===void 0?[]:[i].flat();return s.length>0&&!s.includes(o.type)&&reject$1(r,`Attribute "${e.name}.${n}" must have type ${s.join(` or `)}`),o}function collectContentViewCatalogue(e){let n=e.mode??`published`,r=/* @__PURE__ */ new Map;e.objects.forEach((e,t)=>{if(requireName(e.name,[`objects`,String(t),`name`]),r.has(e.name))throw new i.DuplicateError(`object`,e.name);r.set(e.name,{name:e.name,system:systemAttributeMap(e),attributes:indexUnique(e.attributes,`attribute`,[`objects`,String(t),`attributes`])})});let a=/* @__PURE__ */ new Set;(e.reservedObjects??[]).forEach((e,t)=>{let i=[`reservedObjects`,String(t)];requireName(e,i),r.has(e)||(n!==`draft`&&reject$1(i,`Unresolved reserved object "${e}"`),a.add(e),r.set(e,{name:e}))});let o=indexUnique(e.extensions??[],`extension`,[`extensions`]);function resolveObject(e,t){requireName(e,t);let n=r.get(e);return n||reject$1(t,`Unknown object "${e}"`),n}function inverseAddresses(e){let t=[];for(let[n,i]of r)if(n!==e)for(let r of i.attributes?.values()??[])r.type===`relation`&&relationAcceptsObject(r,e)&&t.push(`relatedFrom("${n}", "${r.name}")`);return t.sort().slice(0,3)}let s=n===`draft`?t.draftContentViewDefinitionSchema:t.contentViewDefinitionSchema,c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,u=[],d=[];function parseView(e,t){let n=s.safeParse(e);if(!n.success){let r=new i.ValidationError(invalidViewMessage(e,n.error.issues[0]),n.error.issues.map(e=>({path:[...t,...e.path.map(String)],message:e.message,code:e.code})));throw A.add(r),r}let r=n.data;requireName(r.name,[...t,`name`]);let a=r.object??``,o=c.get(a)??/* @__PURE__ */ new Set;if(o.has(r.name))throw new i.DuplicateError(`view`,`${a}.${r.name}`);if(o.add(r.name),c.set(a,o),r.context!==`page`&&r.default){let e=l.get(r.object)??/* @__PURE__ */ new Set;if(e.has(r.context))throw new i.DuplicateError(`default view`,`${r.object}.${r.context}`);e.add(r.context),l.set(r.object,e)}return r}return e.views.forEach((t,n)=>{let r=[`views`,String(n)],i=t,a=`${String(i?.object??`?`)}.${String(i?.name??n)}`,s,c;try{s=parseView(t,r),c=s.object===void 0?void 0:resolveObject(s.object,[...r,`object`])}catch(e){u.push(violationOf(e,a,null,r));return}s.contents.forEach((t,i)=>{let l=[...r,`contents`,String(i)];try{requireName(t.name,[...l,`name`]),validateContent(t,l,c,contentContextOf(s),o,resolveObject,inverseAddresses,e.authoringViews?.has(n)===!0)}catch(e){u.push(violationOf(e,a,t.name,l))}}),d.push(s)}),d.forEach((t,n)=>{t.contents.forEach((r,a)=>{if(r.type!==`page`)return;let o=[`views`,String(n),`contents`,String(a),`page`],s=d.find(e=>e.context===`page`&&e.object===r.page.object&&e.name===r.page.name),c=t.context===`page`?`Content "${r.name}" cannot reference a page from a page`:t.object===r.page.object?s||e.complete!==!0?void 0:`Unknown page "${r.page.object}.${r.page.name}"`:`Content "${r.name}" must reference a page of "${String(t.object)}", not of "${r.page.object}"`;c!==void 0&&u.push(violationOf(new i.ValidationError(c,[{path:o,message:c}]),`${String(t.object)}.${t.name}`,r.name,o))})}),{views:d,unresolvedObjects:[...a].sort(),violations:u}}function validateStoredViews(e){let t=collectContentViewCatalogue(e).violations[0];if(t)throw t.error}function describeViewIssue(e){let t=e.path.length>0?` (${e.path.map(String).join(`.`)})`:``;return`${e.message}${t}`}function invalidViewMessage(e,t){let n=typeof e==`object`&&e?e:{},r=typeof n.name==`string`?` "${n.name}"`:``,i=typeof n.object==`string`?` of "${n.object}"`:``;return t?`Invalid content view${r}${i}: ${describeViewIssue(t)}`:`Invalid content view${r}${i}`}function validateContentViewCatalogue(e){let{views:t,unresolvedObjects:n,violations:r}=collectContentViewCatalogue(e),i=r[0];if(i)throw i.error;return{views:t,unresolvedObjects:n}}function resolveStoredQuery(e,t,n,{owner:r,requireRecord:i,resolveObject:a,inverseAddresses:o}){let s=collectionSourceAddress(e.source),c,l;if(s.kind===`object`)c=a(s.object,[...t,`source`,`object`]);else if(s.kind===`related`){i();let e=[...t,`source`,`relation`],hint=()=>{if(!r)return``;let e=o(r.name);return e.length===0?``:`. Records pointing at "${r.name}" are addressed from the other side: ${e.join(`, `)}`},n=requireAttribute(r,s.relation,e,`relation`,hint);n?.type===`relation`&&(l=n,c=a(requireSingleRelationTarget(n,e),e))}else{i(),c=a(s.object,[...t,`source`,`object`]);let o=[...t,`source`,`relation`],l=requireAttribute(c,s.relation,o,`relation`);if(l?.type===`relation`&&r&&!relationAcceptsObject(l,r.name)){let e=l.targets.map(e=>`"${e.object}"`).join(`, `);reject$1(o,`Relation "${s.object}.${s.relation}" targets ${e}, not "${r.name}"`)}e.filters?.combinator===`or`&&reject$1([...t,`filters`,`combinator`],`${n} addresses "${s.object}" from the far side, so its filters must use the "and" combinator`)}return e.sorts?.forEach((e,n)=>requireAttribute(c,e.attribute,[...t,`sorts`,String(n),`attribute`])),e.filters?.rules.forEach((e,n)=>requireAttribute(c,e.attribute,[...t,`filters`,`rules`,String(n),`attribute`])),{target:c,relationAttribute:l}}function resolveBlockObjects({block:e,path:t,scope:n},{inputs:r,values:i,at:a},o){let s=Object.entries(r),c;for(let[t,r]of s){let o=i[t];if(r.kind!==`query`||o===void 0)continue;let s=o,l=`Block "${e.name}"`;c={target:resolveStoredQuery(s,[...a,t],l,n).target}}c??=o?.queried;let l=s.find(([,e])=>e.kind===`object`)?.[0],u=l===void 0?void 0:i[l];function record(){return typeof u==`string`?n.resolveObject(u,[...a,l??`object`]):o?o.record():(n.owner||reject$1(t,`Block "${e.name}" names attributes, so it needs an object or a record host`),n.owner)}function attributeScope(e){if(e!==void 0)return e===`$query`?c?.target:e===`$record`?record():n.resolveObject(e,a)}return{queried:c,record,attributeScope}}function optionsOf(e){return e.type===`status`||e.type===`select`?e.options:[]}function requireNamedAttributes(e,t,n,r){let i=(Array.isArray(t)?t:[t]).map((i,a)=>typeof i==`string`?requireAttribute(e,i,Array.isArray(t)?[...n,String(a)]:n,r):void 0);return Array.isArray(t)?void 0:i[0]}function requireOptions(e,t,n,r){let i=optionsOf(e);(Array.isArray(t)?t:[t]).forEach((a,o)=>{let s=Array.isArray(t)?[...n,String(o)]:n,c=i.find(e=>e.value===a);c===void 0&&reject$1(s,`"${String(a)}" is not an option of "${e.name}"`),r&&c.archived&&reject$1(s,`"${String(a)}" is an archived option of "${e.name}"`)})}function validateBlockReferences(e,t,n,r,i){function walk(t,a,o,s){let c=Object.entries(t),{queried:l,record:u,attributeScope:d}=resolveBlockObjects({block:e,path:n,scope:r},{inputs:t,values:a,at:o},s),f=new Map(s?.fields);for(let[e,t]of c){let n=a[e];if(t.kind===`attribute`&&n!==void 0){let r=requireNamedAttributes(d(t.of),n,[...o,e],t.options?.types);Array.isArray(n)||f.set(e,r)}t.kind===`filters`&&n!==void 0&&n.rules.forEach((n,r)=>requireAttribute(d(t.of),n.attribute,[...o,e,`rules`,String(r),`attribute`]))}for(let[e,t]of c){let n=a[e],r=t.field===void 0?void 0:f.get(t.field);t.kind===`option`&&n!==void 0&&r!==void 0&&requireOptions(r,n,[...o,e],i)}for(let[e,n]of c){let r=n.when?.key,i=r===void 0?void 0:t[r],s=r===void 0?void 0:a[r];n.kind===`period`&&a[e]!==void 0&&i?.kind===`attribute`&&typeof s==`string`&&requireAttribute(d(i.of),s,[...o,r??e],[`date`])}let p={queried:l,record:u,fields:f};for(let[e,t]of c){let n=a[e],r=t.list;t.kind===`list`&&r!==void 0&&Array.isArray(n)&&n.forEach((t,n)=>walk(r.items,t,[...o,e,String(n)],p))}}walk(e.inputs,t,n,void 0)}function isBoardGrouping(e){return(e?.type===`status`||e?.type===`select`)&&!e.hidden}function requireBoardGrouping(e,t,n){let r=t.type===`status`||t.type===`select`?`is hidden`:`is a ${t.type}`;isBoardGrouping(t)||reject$1(n,`A board groups by a visible status or select attribute: "${e}.${t.name}" ${r}`)}function validateContent(e,n,r,a,o,s,c,l){function requireRecord(){requireRecordContentContext(e.name,a,n)}let u={owner:r,requireRecord,resolveObject:s,inverseAddresses:c},d=hostPlacementContext(a);if(e.type===`custom`){let t=o.get(e.extension);t||reject$1([...n,`extension`],`Unknown extension "${e.extension}"`),contentPlacementContexts(e,t)?.includes(d)||reject$1([...n,`extension`],`${e.extension} cannot be placed here`);let r=t.parameters.safeParse(structuredClone(e.parameters??{}));if(!r.success)throw new i.ValidationError(`Invalid extension parameters`,r.error.issues.map(e=>({path:[...n,`parameters`,...e.path.map(String)],message:e.message,code:e.code})));let a=r.data,s=t.refine?.(a,d);s&&reject$1([...n,`parameters`,...blockIssuePath(s).map(String)],s.message),validateBlockReferences(t,a,[...n,`parameters`],u,l)}else if(requireContentPlacement(e,void 0,e.name,a,n),e.type!==`page`){if(e.type===`collection`){let{target:r,relationAttribute:i}=resolveStoredQuery(e,n,`Collection "${e.name}"`,u);if(e.columns?.forEach((e,t)=>{let a=[...n,`columns`,String(t)];if(typeof e==`string`){requireAttribute(r,e,a);return}let o=[...a,`relationProperty`];i||reject$1(o,`Relation property columns require a relation source`),i.properties?.definitions.some(t=>t.name===e.relationProperty)||reject$1(o,`Unknown relation property "${e.relationProperty}"`)}),e.displayAttributes?.forEach((e,t)=>requireAttribute(r,e,[...n,`displayAttributes`,String(t)])),l&&e.layout!==`table`&&(e.displayAttributes?.length??0)>t.SCHEMA_LIMITS.displayAttributesPerCard&&reject$1([...n,`displayAttributes`],`A ${e.layout} shows at most ${t.SCHEMA_LIMITS.displayAttributesPerCard} displayed attributes`),e.descriptionAttribute!==void 0&&requireAttribute(r,e.descriptionAttribute,[...n,`descriptionAttribute`]),e.layout===`kanban`&&e.groupByAttribute!==void 0){let t=[...n,`groupByAttribute`],i=requireAttribute(r,e.groupByAttribute,t);l&&i&&r&&requireBoardGrouping(r.name,i,t)}}else switch(e.type){case`form`:e.groups.forEach((e,t)=>{let i=[...n,`groups`,String(t)];requireName(e.name,[...i,`name`]),e.fields.forEach((e,t)=>requireAttribute(r,e.attribute,[...i,`fields`,String(t),`attribute`]))});break;case`richtext`:requireAttribute(r,e.attribute,[...n,`attribute`],`richtext`),e.titleAttribute!==void 0&&requireAttribute(r,e.titleAttribute,[...n,`titleAttribute`],`text`);break;case`emails`:case`meetings`:e.emailAttributes.forEach((e,t)=>requireAttribute(r,e,[...n,`emailAttributes`,String(t)],`text`));break;case`documents`:e.relations?.forEach((e,t)=>requireAttribute(r,e,[...n,`relations`,String(t)],`relation`));break;case`forms`:e.objectName!==void 0&&s(e.objectName,[...n,`objectName`]);break;case`activity`:break;default:reject$1(n,`Unknown content type: ${String(e)}`)}}}const j=defineBlock({name:`artifact_preview`,label:`Preview`,icon:`eye`,family:`context`,contexts:[`record`],layout:{size:{w:6,h:8},minWidth:4,height:`flexible`,minHeight:4,maxHeight:20},inputs:{}}),M=[`number`,`currency`],N=[`status`,`select`,`user`,`relation`,`date`],P=[`records`,`passages`],F=[`status`,`select`],I=[`bar`,`horizontal_bar`,`line`,`donut`,`treemap`],L=[`value_desc`,`value_asc`,`label`],R=[`line`];function measureIssue({measure:e=`count`,attribute:t}){return e===`count`?t===void 0?void 0:{input:`attribute`,message:`count measures records; it takes no attribute`}:t===void 0?{input:`attribute`,message:`${String(e)} needs a number or currency attribute`}:void 0}function countIssue(e){let{count:t,measure:n,attribute:r,date:i,field:a,to:o}=e;if(t!==`passages`)return a===void 0?o===void 0?measureIssue(e):{input:`to`,message:`to counts passages`}:{input:`field`,message:`field tracks passages`};if(n!==void 0)return{input:`measure`,message:`passages are counted`};if(r!==void 0)return{input:`attribute`,message:`passages are counted`};if(i!==void 0)return{input:`date`,message:`passages read when they passed`};if(a===void 0)return{input:`field`,message:`passages track a status or select field`};if(o===void 0)return{input:`to`,message:`passages need the options they enter`}}function requires(e,t,n){return e[t]!==void 0&&e[n]===void 0?{input:t,message:`${t} needs ${n}`}:void 0}function kindIssue(e){let{kind:t,by:n,by2:r}=e;if(r!==void 0&&r===n)return{input:`by2`,message:`by2 must differ from by`};if(t===`donut`&&r!==void 0)return{input:`kind`,message:`a donut splits one grouping (by), and no second`};if(t===`treemap`&&(n===void 0||r!==void 0))return{input:`kind`,message:`a treemap needs one grouping (by), and no second`};let i=R;if(e.order!==void 0&&i.includes(t))return{input:`order`,message:`order applies to bar, horizontal_bar, donut or treemap`}}function countedInputs(){return{count:E.enum(P).optional().inSection(`data`),measure:E.enum(r.AGGREGATE_MEASURES).optional().inSection(`data`).showWhen(e=>e.count!==`passages`),attribute:E.attribute(T,{types:M}).optional().showWhen(`measure`,{not:[`count`]}),field:E.attribute(T,{types:F}).optional().showWhen(e=>e.count===`passages`),to:E.option(`field`).many().optional().showWhen(`field`)}}function timeIssue({count:e,date:t,compare:n,curve:r}){if(e!==`passages`&&(n!==void 0||r!==void 0)&&t===void 0)return{input:`date`,message:`compare and curve read a date`};if(typeof n!=`string`||typeof r!=`string`)return;let i=w;return i.indexOf(n)>i.indexOf(r)?void 0:{input:`compare`,message:`compare must be wider than curve`}}function datedPeriod(){return E.period().optional().inSection(`time`).showWhen(e=>e.count===`passages`||e.date!==void 0,{on:`date`})}const z=defineBlock({name:`metric`,label:`Indicateur`,icon:`trending-up`,family:`data`,contexts:[`page`,`record`,`display`],layout:{size:{w:3,h:2},minWidth:3,height:`fit`,maxHeight:4},inputs:{query:E.query(),...countedInputs(),date:E.attribute(T,{types:[`date`]}).optional().inSection(`time`).showWhen(e=>e.count!==`passages`),compare:datedPeriod(),curve:datedPeriod(),target:E.number().optional().inSection(`goal`)},refine:e=>countIssue(e)??timeIssue(e)??(e.target!==void 0&&e.target<=0?{input:`target`,message:`target must be above zero`}:void 0)});function seriesOf(e){return Array.isArray(e.series)?e.series.filter(e=>typeof e==`object`&&!!e):[]}function isTimeChart(e){let t=seriesOf(e);return t.length>1||t.some(e=>e.count===`passages`)}function groupsByDate(e,t){return e.by!==void 0&&t.isDate(`by`)}function seriesIssue(e,t){let n=e.map(e=>e.name);for(let[r,i]of e.entries()){let a=(n.indexOf(i.name)<r?{input:`name`,message:`series names are unique in a chart`}:void 0)??(i.date===void 0||t?void 0:{input:`date`,message:`a series reads a date on a chart of several series`})??(i.filters===void 0||e.length>1?void 0:{input:`filters`,message:`a series filters on its own in a chart of several`})??countIssue(i);if(a)return{input:`series`,index:r,item:a.input,message:a.message}}}function timeChartIssue(e){for(let t of[`by`,`by2`,`order`])if(e[t]!==void 0)return{input:t,message:`a chart of several series or of passages takes no ${t}`};if(e.kind===`donut`||e.kind===`treemap`)return{input:`kind`,message:`a chart of several series is drawn as bars or lines`}}const ye=[`count`,`sum`];function cumulateIssue(e,t,n){if(e.cumulate!==void 0)return!n&&e.byBucket===void 0?{input:`cumulate`,message:`cumulate runs along a date`}:t.every(e=>ye.includes(e.measure??`count`))?void 0:{input:`cumulate`,message:`only a count or a sum cumulates`}}const be={name:E.text(),label:E.text().optional(),...countedInputs(),date:E.attribute(T,{types:[`date`]}).optional().showWhen(e=>e.count!==`passages`&&isTimeChart(e)),filters:E.filters(T).optional().showWhen(e=>seriesOf(e).length>1)},B=defineBlock({name:`chart`,label:`Graphique`,icon:`chart-bar`,family:`data`,contexts:[`page`,`record`,`display`],layout:{size:{w:4,h:6},minWidth:4,height:`flexible`,minHeight:4,maxHeight:12},inputs:{query:E.query(),series:E.list(be,{min:1,max:4}),kind:E.enum(I),by:E.attribute(T,{types:N}).optional().inSection(`display`).showWhen(e=>!isTimeChart(e)),byBucket:E.period().optional().inSection(`display`).showWhen((e,t)=>isTimeChart(e)||groupsByDate(e,t),{on:`by`}),by2:E.attribute(T,{types:N}).optional().inSection(`display`).showWhen(e=>!isTimeChart(e)&&e.by!==void 0,{on:`by`}),order:E.enum(L).optional().inSection(`display`).showWhen(e=>{let t=R;return!(isTimeChart(e)||t.includes(e.kind))}),cumulate:E.boolean().optional().inSection(`display`).showWhen((e,t)=>isTimeChart(e)||groupsByDate(e,t))},refine:e=>{let t=seriesOf(e),n=isTimeChart(e);return seriesIssue(t,n)??(n?timeChartIssue(e):requires(e,`byBucket`,`by`)??requires(e,`by2`,`by`)??kindIssue(e))??cumulateIssue(e,t,n)}}),V=defineBlock({name:`heading`,label:`Titre`,icon:`type-text`,family:`layout`,contexts:[`page`,`record`],layout:{size:{w:12,h:1},minWidth:6,height:`fit`,maxHeight:3},inputs:{description:E.text().optional()}}),xe=[`decisions`,`forYou`],H=defineBlock({name:`decisions`,label:`Décisions`,icon:`inbox`,family:`people`,contexts:[`page`],layout:{size:{w:4,h:4},minWidth:3,height:`flexible`,minHeight:3,maxHeight:10},inputs:{pile:E.enum(xe).optional().inSection(`data`)}}),U=defineBlock({name:`record_links`,label:`Bubble`,icon:`share`,family:`context`,contexts:[`record`],layout:{size:{w:6,h:8},minWidth:6,height:`flexible`,minHeight:6,maxHeight:16},inputs:{}}),W={name:`bubble`,type:`custom`,extension:U.name,placement:`main`,label:U.label,icon:U.icon,parameters:{}},Se=[j,z,B,V,H,U],Ce=/* @__PURE__ */ new Set([`name`,`label`,`icon`,`family`,`contexts`,`inputs`,`parameters`,`layout`,`refine`]),we=Se;var ContentExtensionRegistry=class{constructor(){this.extensions=/* @__PURE__ */ new Map,this.seed()}register(e){let t=Array.isArray(e)?e:[e],n=/* @__PURE__ */ new Set;t.forEach((e,t)=>{if(this.prepare(e,t),n.has(e.name))throw new i.DuplicateError(`content extension`,e.name);n.add(e.name)});for(let e of t)this.extensions.set(e.name,e);return this}prepare(e,t){let n=[`extensions`,String(t)],reject=e=>{throw new i.ValidationError(e,[{path:n,message:e}])};if((typeof e!=`object`||!e||Array.isArray(e))&&reject(`Expected a content extension declaration`),Object.keys(e).some(e=>!Ce.has(e))&&reject(`Expected only ${[...Ce].join(`, `)}`),(typeof e.name!=`string`||e.name.trim().length===0)&&reject(`API name must not be empty`),(!Array.isArray(e.contexts)||e.contexts.length===0||e.contexts.some(e=>!D.includes(e)))&&reject(`contexts must be a non-empty list of ${D.join(`, `)}`),typeof e.parameters?.safeParse!=`function`&&reject(`parameters must be a Zod schema`),this.extensions.has(e.name))throw new i.DuplicateError(`content extension`,e.name)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return[...this.extensions.values()]}get size(){return this.extensions.size}clear(){this.extensions.clear(),this.seed()}seed(){for(let e of we)this.extensions.set(e.name,e)}};const G=new ContentExtensionRegistry,K=Object.freeze({size:Object.freeze({w:4,h:4}),minWidth:3,height:`flexible`,minHeight:2});function resolveLayout(e){return e===void 0?K:{size:e.size??K.size,minWidth:e.minWidth??K.minWidth,height:e.height??K.height,...e.minHeight===void 0?{}:{minHeight:e.minHeight},...e.maxHeight===void 0?{}:{maxHeight:e.maxHeight}}}function layoutTraitsOf(e,t){return e.type===`custom`?resolveLayout(t.get(e.extension)?.layout):e.type in k?resolveLayout(k[e.type]):K}function pageTraitsOf(e,t){return n=>{let r=e.get(n);return r?layoutTraitsOf(r,t):K}}function spanContent(e,n){if(!t.isBlockWidth(n)){let e=`A block spans 1 to 12 columns, not ${String(n)}`;throw new i.ValidationError(e,[{path:[`content`,`span`],message:e}])}return{content:e,span:n}}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,...e.title===void 0?{}:{title:e.title}}:{configuration:validateContentConfiguration(e,t)}}catch(e){throw e instanceof i.ValidationError?new i.ValidationError(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 i.ValidationError(`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&&parseBlockParameters({parameters:t.schema},r,[`content`,`parameters`,n])}return t}var BlockContentBuilder=class{constructor(e,t,n={}){this.extension=e,this.parameters=t,this.frame=n}get title(){return this.frame.title}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.frame)}label(e){return this.copy(this.parameters,{...this.frame,title:e})}icon(e){return this.copy(this.parameters,{...this.frame,icon:e})}height(e){return this.copy(this.parameters,{...this.frame,height:e})}build(){let{icon:e,height:t}=this.frame,n={type:`custom`,extension:this.extension.name,parameters:cloneBuilderValue(this.parameters,[`content`,`parameters`]),...e===void 0?{}:{icon:e},...t===void 0?{}:{height:t}};return validateContentConfiguration(n,[`content`]),parseBlockParameters(this.extension,n.parameters,[`content`,`parameters`]),n}span(e){return spanContent(this,e)}},Measures=class{measured(e,t){return this.counted({measure:e,...t===void 0?{}:{attribute:t}})}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)}passages(e,t){return this.counted({count:`passages`,field:e,to:[...t.to]})}},MetricBuilder=class extends BlockContentBuilder{date(e){return this.with({date:e})}trend(e,t){return this.with({date:e,curve:t})}curve(e){return this.with({curve:e})}compare(e){return this.with({compare:e})}target(e){return this.with({target:e})}},MetricQuery=class extends Measures{constructor(e){super(),this.query=e}counted(e){return new MetricBuilder(z,checkInputs(z,{query:this.query,...e}))}},Te=class SeriesBuilder{constructor(e){this.item=e}with(e){return new SeriesBuilder({...this.item,...e})}label(e){return this.with({label:e})}date(e){return this.with({date:e})}filters(e){return this.with({filters:e})}},SeriesQuery=class extends Measures{constructor(e){super(),this.name=e}counted(e){return new Te({name:this.name,...e})}};function seriesItem(e,t){return{...t(new SeriesQuery(e)).item}}function groupBy(e){return typeof e==`string`?[e,void 0]:[e.attribute,e.bucket]}var ChartBuilder=class extends BlockContentBuilder{series(e,t){let n=Array.isArray(this.parameters.series)?this.parameters.series:[];return this.with({series:[...n,seriesItem(e,t)]})}cumulate(){return this.with({cumulate:!0})}bucket(e){return this.with({byBucket:e})}by(e){let[t,n]=groupBy(e);return this.with({by:t,byBucket:n})}by2(e){return this.with({by2:e})}kind(e){return this.with({kind:e})}bar(){return this.kind(`bar`)}horizontalBar(){return this.kind(`horizontal_bar`)}line(){return this.kind(`line`)}donut(){return this.kind(`donut`)}treemap(){return this.kind(`treemap`)}order(e){return this.with({order:e})}},ChartQuery=class extends Measures{constructor(e){super(),this.query=e}chart(e){return new ChartBuilder(B,checkInputs(B,{query:this.query,series:[e],kind:`bar`}))}counted(e){return this.chart({name:`s1`,...e})}series(e,t){return this.chart(seriesItem(e,t))}},DecisionsBuilder=class extends BlockContentBuilder{pile(e){return this.with({pile:e})}},HeadingBuilder=class extends BlockContentBuilder{description(e){return this.with({description:e})}};function metric(e){return new MetricQuery(storedQuery(e,`metric`))}function chart(e){return new ChartQuery(storedQuery(e,`chart`))}function decisions(){return new DecisionsBuilder(H,{})}function heading(e){return new HeadingBuilder(V,{},{title:e})}const Ee=t.PAGE_GRID_COLUMNS/3;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=a;i+t<=e;t+=1)visit([...r,t],i+t)}return visit([],0),n}function rowWidths(e,n){let r=e.filter(e=>e.span===void 0);r.length>Ee&&reject(n,`A row holds at most ${Ee} unsized blocks`);let i=total(e.map(e=>e.span??e.minWidth));i>t.PAGE_GRID_COLUMNS&&reject(n,`Blocks ${e.map(e=>`"${e.key}"`).join(`, `)} do not fit one row: they need at least ${i} of ${t.PAGE_GRID_COLUMNS} columns`);let a=t.PAGE_GRID_COLUMNS-total(e.map(e=>e.span??0)),o=splitColumns(a,r.map(e=>e.minWidth)),s=0,c=e.map(e=>{if(e.span!==void 0)return e.span;let t=o[s]??e.minWidth;return s+=1,t}),l=c.length-1;return r.length===0&&l>=0&&a>0&&(c[l]=(c[l]??0)+a),c}function reject(e,t){throw new i.ValidationError(t,[{path:e,message:t}])}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)));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,n,r){let i=r.description===void 0?heading(n):heading(n).description(r.description);return{key:e,content:r.icon===void 0?i:i.icon(r.icon),span:t.PAGE_GRID_COLUMNS}}function requirePlacement(e,t,n,r,i){if(e.type===`page`&&reject(i,`Content "${n}" cannot reference a page from a page`),requireContentPlacement(e,t,n,r,i),e.type!==`custom`)return;let a=t?.refine?.(e.parameters??{},r);a&&reject([...i,`parameters`,...blockIssuePath(a).map(String)],a.message)}var q=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={}){Object.hasOwn(t,`group`)&&reject([`views`,`0`,`contents`],`A row has no group: put .heading("…") before it, and { joined: true } to share one card`),t.height!==void 0&&!Number.isInteger(t.height||NaN)&&reject([`views`,`0`,`contents`],`A row height is a positive whole number of rows`),t.height!==void 0&&t.height<=0&&reject([`views`,`0`,`contents`],`A row height is a positive whole number of rows`);let n={kind:`row`,blocks:e,joined:t.joined===!0,...t.height===void 0?{}:{height:t.height}};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}heading(e,t={}){e.trim()===``&&reject([`views`,`0`,`contents`],`A heading needs a title`);let n={kind:`heading`,title:e,meta:t};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}build(){let e=[`views`,`0`],{name:n,label:r,object:a,icon:o,description:s,home:c,sections:l}=this.data;requireBuilderName(n,[...e,`name`]),a!==void 0&&requireBuilderName(a,[...e,`object`]),c&&a!==void 0&&reject([...e,`home`],`Only a standalone page can be the home`),l.every(e=>e.kind===`row`&&Object.keys(e.blocks).length===0)&&reject([...e,`contents`],`A page declares at least one block`);let u=a===void 0?`page`:`record`,d=[],f=headingNames(l),p=0;for(let t of l){let n=[...e,`contents`,String(d.length)],r=(t.kind===`heading`?[headingEntry(f[p++]??``,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,n)=>{let r=[...e,`contents`,String(d.length+n)];requireBuilderName(t.key,[...r,`name`]);let{configuration:i,extension:a,title:o}=configureContent(t.content,r);return`width`in i&&i.width!==void 0&&reject([...r,`width`],`Block "${t.key}" sets a width of its own: use .span() to size a block`),requirePlacement(i,a,t.key,u,r),{content:{...i,name:t.key,...o===void 0?{}:{label:o},placement:`grid`},span:t.span}}),i=rowWidths(r.map(({content:e,span:t})=>({key:e.name,...t===void 0?{}:{span:t},minWidth:layoutTraitsOf(e,G).minWidth})),n);r.forEach(({content:e},n)=>{let r=i[n];d.push(t.kind===`heading`||r===void 0?e:{...e,width:r,...t.height!==void 0&&e.height===void 0&&layoutTraitsOf(e,G).height!==`fit`?{height:t.height}:{},...t.joined&&n>0?{joined:!0}:{}})})}let m={name:n,label:r,...a===void 0?{}:{object:a},context:`page`,...o===void 0?{}:{icon:o},...s===void 0?{}:{description:s},...c?{home:!0}:{},contents:d},h=t.contentViewDefinitionSchema.safeParse(m);if(!h.success)throw i.ValidationError.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 q({name:e,label:t,object:void 0,sections:[]})}var J=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 n=t.contentViewDefinitionSchema.safeParse(this.data);if(!n.success)throw i.ValidationError.fromZodErrors(n.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`])),requireContentPlacement(t,this.extensions[n],t.name,this.data.context,r)}),{kind:`view`,definition:cloneBuilderValue(this.data,e)}}};function detailView(e,t){return new J({name:e,label:t,object:void 0,context:`record`,contents:[]})}function listView(e,t){return new J({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 r.AgentBuilder)}function assertPiece(e,t){if(typeof e!=`object`||!e)throw new i.ValidationError(`Unsupported bundle piece: ${t}`,[]);if(isViewPiece(e)||e instanceof r.AgentBuilder||typeof e.build==`function`)return;let n=e.name;throw new i.ValidationError(`Unsupported bundle piece: ${typeof n==`string`?n:String(t)}`,[])}function declarationOf$1(e){return e instanceof q||e instanceof J?e.build():e}function isPage(e){return e.definition.context===`page`}function validateView(e){let n=t.contentViewDefinitionSchema.safeParse(e);if(n.success)return n.data;let r=typeof e==`object`&&e&&`name`in e?String(e.name):`(unnamed)`,a=i.ValidationError.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})));throw new i.ValidationError(`View "${r}" is invalid. ${a.message}`,a.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 i.DuplicateError(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(t){return sha256Hex(e.canonicalStringify({objects:[...t.objects].sort(byIdentity(e=>({name:e.name}))),views:[...t.views].sort(byIdentity(e=>e)),pages:[...t.pages].sort(byIdentity(e=>e.definition)),agents:[...t.agents].sort(byIdentity(e=>({name:e.name})))}))}const De={title:120,context:200,prompt:r.BUNDLE_SETUP_PROMPT_MAX_LENGTH};function assertSetupWithinLimits(e){let t=Object.keys(De).flatMap(t=>{let n=De[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 i.ValidationError(`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 i.ValidationError(`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!==b.owner||n.repo!==b.repo?`Skill "${e}" must come from ${b.owner}/${b.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 n=e.name===C;n||assertBundleName(e.name);let{objects:r,pages:a,agents:o}=e,s=e.views.map(validateView),c=r.map(e=>e.name);if(assertUniqueIdentities(`object`,c.map(e=>({name:e}))),assertUniqueIdentities(`view`,s),assertUniqueIdentities(`page`,a.map(e=>e.definition)),assertUniqueIdentities(`agent`,o.map(e=>({name:e.name}))),!n){let e=c.find(t.isNativeObjectName);if(e!==void 0)throw new i.ReservedObjectNameError(e,`bundle`)}let{setup:l}=e,u=e.translations??{};assertSetup(l,u);let d=e.skills??[];return assertSkills(d),{name:e.name,label:e.label.trim(),description:e.description??null,hash:await hashBundlePieces({objects:r,views:s,pages:a,agents:o}),objects:r,views:s,pages:a,agents:o,uses:e.uses??[],samples:e.samples??[],...l?{setup:l}:{},...d.length>0?{skills:d}:{},translations:u}}const Oe=Symbol.for(`standards.bundle`);function isBundle(e){return typeof e==`object`&&!!e&&e[Oe]===!0}var BundleBuilder=class{constructor(e,t){this[Oe]=!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=[],i=[];for(let[a,o]of this.pieces.entries())if(assertPiece(o,a),o instanceof r.AgentBuilder)i.push(o.build());else if(isViewPiece(o)){let e=declarationOf$1(o);isPage(e)?n.push(e):t.push(e.definition)}else e.push(o.build());return this.assertNotInUsed(e),builtBundleFromPieces({name:this.name,label:this.label,description:this.descriptionText,objects:e,views:t,pages:n,agents:i,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 i.DuplicateError(`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 ke=a.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=a.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 a.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=[..._,`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,a=`prefillExpression on free field "${r.attribute.name}" in step "${t.id}"`;if(!isLabelExpression(n))throw Error(`[FormBuilder] ${a} must contain at least one {{ attribute }} interpolation.`);if(/\{\{\s*\}\}/.test(n))throw Error(`[FormBuilder] ${a} contains empty {{ }} interpolation.`);for(let o of n.matchAll(/(?<!\|)\|(?!\|)\s*(\w+)(?:\s*:[^|}]*)?/g)){let n=o[1];if(!e.includes(n))throw Error(`[FormBuilder] ${a} uses invalid pipe "${n}". Valid pipes: ${e.join(`, `)}`);let s=o[0].replace(/^\|/,``);if(isWherePipe(s)&&!parseWherePipe(s))throw new i.ValidationError(`[FormBuilder] ${a} has a malformed where: pipe "${s.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(ke.safeParse(n.readOnly).success)continue;let t=isFormFreeFieldRef(n)?n.attribute.name:n.attribute,r=isFormFreeFieldRef(n)?`free field`:`field`;throw new i.ValidationError(`[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(l);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: ${l.join(`, `)}`)}}}};function form(e,t){return new FormBuilder(e,t)}const Ae=a.object({shape:a.enum(r.IMAGE_SHAPES),from:a.array(a.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 i.ValidationError(`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 i.SchemaError(`Object "${t}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,i.SchemaErrorCode.VALIDATION_FAILED);let a=v.safeParse(n);if(!a.success){let e=a.error.issues[0]?.message??`Invalid labelExpression`;throw new i.SchemaError(`Invalid labelExpression for "${t}": ${e}`,i.SchemaErrorCode.VALIDATION_FAILED)}if(r!==void 0){let e=v.safeParse(r);if(!e.success){let n=e.error.issues[0]?.message??`Invalid embeddingExpression`;throw new i.SchemaError(`Invalid embeddingExpression for "${t}": ${n}`,i.SchemaErrorCode.VALIDATION_FAILED)}}}var ObjectBuilder=class{get"~standard"(){return createStandardSchemaProps(n.createObjectValidator(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 n=e.map(e=>`build`in e&&typeof e.build==`function`?e.build():e);t.assertUniqueBy([...this.obj.attributes,...n],e=>e.name,e=>new i.DuplicateError(`attribute`,e,`Object "${this.obj.name}": duplicate attribute name "${e}"`)),this.obj.attributes.push(...n)}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 i.ValidationError(`[ObjectBuilder] Missing required field: name`,[{path:[`name`],message:`name is required`}]);if(!this.obj.label)throw new i.ValidationError(`[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&&t.validateObjectName(e)}};function object(e,n){if(t.isNativeObjectName(e))throw new i.ReservedObjectNameError(e,`builder`);return new ObjectBuilder(e,n)}function validatePresetStructure(e,t,n){let fail=(t,n)=>{throw new i.ValidationError(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 Y=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`&&parseBlockParameters(this.extension,e.parameters,[`content`,`parameters`]),e}},je=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 i.ValidationError?new i.ValidationError(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 je(e,t,[])}function collection(e){return new Y({type:`collection`,...storedQuery(e,`collection`)})}function form$1(...e){return new Y({type:`form`,groups:e.map(e=>`build`in e?e.build():e)})}function activity(){return new Y({type:`activity`})}function richtext$1(e){return new Y({type:`richtext`,attribute:e})}function documents(){return new Y({type:`documents`})}function forms(){return new Y({type:`forms`})}function emails(...e){return new Y({type:`emails`,emailAttributes:e})}function meetings(...e){return new Y({type:`meetings`,emailAttributes:e})}function custom(e,t){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw new i.ValidationError(`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 i.ValidationError(`Expected custom content`,[]);let r=new Y({...n,extension:e.name},e);return r.build(),r}function recordLinksTab(){return[W.name,W.label,custom(U,{}).icon(W.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 i.ValidationError(e,[{path:[`content`,`page`,`object`],message:e}])}return new Y({type:`page`,page:{object:t,name:n}})}const Me={collection,metric,chart,decisions,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){let t={main:0,aside:0,grid:0};return{origin:`runtime`,mainOrderCustomized:!1,asideOrderCustomized:!1,homeCustomized:!1,contents:Object.fromEntries(e.map(e=>[e.name,{sourceDefinition:null,workspaceDefinition:storedContentDefinition(e),suppressed:!1,sourcePosition:null,workspacePosition:t[e.placement]++}]))}}function overLimit(e){let n=/* @__PURE__ */ new Set,r=e.length-t.SCHEMA_LIMITS.tabsPerView;for(let t of[...e].reverse()){if(r<=0)break;t.sourceDefinition===null&&(n.add(t.definition.name),--r)}return n}function resolveViewContents(e,{trim:t=!0}={}){let n=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{definition:n,...t}]:[]});return[`main`,`aside`,`grid`].flatMap(r=>{let i=r===`aside`?e.asideOrderCustomized:e.mainOrderCustomized,a=n.filter(e=>e.definition.placement===r).sort((e,t)=>{let n=i?e.workspacePosition:e.sourcePosition,r=i?t.workspacePosition:t.sourcePosition;if(n!==null&&r!==null&&n!==r)return n-r;if(n!==null&&r===null)return-1;if(r!==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)}),o=t&&r===`grid`?overLimit(a):/* @__PURE__ */ new Set;return a.filter(e=>!o.has(e.definition.name)).map(e=>e.definition)})}function cardWidth(e){let n=e.reduce((e,t)=>e+t.width,0);return Math.min(t.PAGE_GRID_COLUMNS,n)}function pageItems(e,n){let r=[],i=!0;for(let a of e){let e=a.heading?t.PAGE_GRID_COLUMNS:a.width??n(a),o={kind:a.hidden?`hidden`:`block`,name:a.name,width:e},s=r.at(-1);if(a.joined&&!a.heading&&!i&&s){let e=s.kind===`card`?s.members:[s];e.push(o),r[r.length-1]={kind:`card`,width:cardWidth(e),members:e}}else r.push(o);i=a.heading===!0}return r}function isPageHeading(e){return e.type===`custom`&&e.extension===V.name}function pageFlowBlocks(e){let t=e.blocks.map(e=>({name:e.name,...e.width===void 0?{}:{width:e.width},...e.joined===void 0?{}:{joined:e.joined},...isPageHeading(e)?{heading:!0}:{}}));for(let{after:n,...r}of e.hidden){let e=n===null?0:t.findIndex(e=>e.name===n)+1;t.splice(e,0,{...r,hidden:!0})}return t}let X;function unaccentRules(){if(X)return X;let e=/* @__PURE__ */ new Map;for(let t of`
3
3
  ¡!
4
4
  ©(C)
5
5
  «<<
@@ -1651,4 +1651,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
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 U=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`},G={rename:[`kind`,`object`,`from`,`to`],phone:[`kind`,`object`,`attribute`,`to`,`defaultCountryCode`],currency:[`kind`,`object`,`attribute`,`to`,`currencyCode`]};function refuse(e,t,n){throw new i.ValidationError(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,n){if(t.isPlainRecord(n)||refuse(e,void 0,`Resolution ${e} must be an object`),n.kind===`rename`){assertKeys(e,n,G.rename),n.from===n.to&&refuse(e,`to`,`Resolution ${e} renames "${n.from}" to itself`);return}if(n.kind!==`retype`&&refuse(e,`kind`,`Unknown resolution kind ${JSON.stringify(n.kind)}: expected "rename" or "retype"`),n.to!==`phone`&&n.to!==`currency`&&refuse(e,`to`,`Unsupported retype to ${JSON.stringify(n.to)}: a push converts text → phone and number → currency only`),assertKeys(e,n,G[n.to]),n.to===`phone`){let t=n.defaultCountryCode;/^[A-Z]{3}$/.test(t)&&(0,o.isValidIso3)(t)||refuse(e,`defaultCountryCode`,`Resolution ${e}: "${t}" is not an ISO 3166-1 alpha-3 country code`);return}let r=n.currencyCode;/^[A-Z]{3}$/.test(r)&&(0,o.isValidCurrencyCode)(r)||refuse(e,`currencyCode`,`Resolution ${e}: "${r}" 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 i.ValidationError("`resolutions` must be an array",[{path:[`resolutions`],message:"`resolutions` must be an array"}]);if(e.length>100)throw new i.ValidationError(`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 r=e.trim();if(r===``)return{value:null};let i=(0,s.parsePhoneNumberFromString)(r,n.getIso2(t));if(!i?.isPossible()||i.country===void 0||i.ext!==void 0)return;let a=(0,o.getCountryByIso2)(i.country)?.iso3;if(a!==void 0)return{value:{countryCode:a,phoneNumber:n.normalizePhoneNumber(r,a)}}}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 K=a.string().refine(e=>e.trim().length>0,`Must not be blank`),q=r.schemaStateAddressOf(K),se=a.object({label:K,pluralLabel:a.string().optional(),description:a.string().optional(),icon:t.iconNameSchema.optional(),color:t.colorIdSchema.optional(),image:B.optional(),labelExpression:a.string(),embeddingExpression:a.string().optional(),sealed:a.boolean().optional(),toleratedAttributes:a.array(K).optional(),metadata:a.record(a.string(),a.unknown()).optional(),documentLayout:a.record(a.string(),a.unknown()).optional(),hierarchical:a.boolean().optional(),defaultDriveSort:a.enum(r.DOCUMENT_SORT_MODES).optional()}).strict();function failure(e){throw new i.ValidationError(e,[])}function definitionSchema(e){return a.custom(r=>{let i=a.record(a.string(),a.unknown()).parse(r);for(let t of e[0]===`view`?[`object`,`name`]:[`name`])Object.hasOwn(i,t)&&failure(`Invalid schema state: unrecognized definition key ${t}`);switch(e[0]){case`object`:se.parse(i);break;case`attribute`:{let e=a.enum(t.ATTRIBUTE_TYPES).parse(i.type);n.getAttributeConfigSchema(e).extend({type:a.literal(e),label:K,required:a.boolean().optional(),unique:a.boolean().optional(),icon:t.iconNameSchema.optional()}).strict().parse(i);break}case`view`:{let{contents:n,...r}=i,o=a.array(K).parse(n);new Set(o).size!==o.length&&failure(`Invalid schema state: duplicate content membership`),t.draftContentViewDefinitionSchema.parse({...r,object:e[1],name:e[2],contents:[]});break}case`content`:t.publishedViewContentDefinitionSchema.parse({...i,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=a.record(a.string(),a.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=a.object({modelVersion:a.literal(1),hashVersion:a.literal(1),tenant:K,sourceFingerprint:a.string().regex(/^[a-f0-9]{64}$/),entries:a.array(a.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]}`),i.ValidationError.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})))}let r=/* @__PURE__ */ new Set,o=n.data.entries.map(e=>{let t=q.parse(a.object({address:a.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(),o=t[0]===`object`||t[0]===`attribute`?a.object({id:a.string().uuid(),updatedAt:a.string().datetime()}).strict():a.object({id:a.string().uuid(),revision:a.number().int().nonnegative()}).strict(),s=a.object({address:q,source:i,effective:i,status:a.enum([`source`,`runtime`,`copy`,`suppressed`]),sourceOwner:a.string().regex(u).nullable(),guard:o.nullable()}).strict().parse(e);return(s.status===`runtime`&&(s.source!==null||s.effective===null||s.sourceOwner!==null)||s.status===`suppressed`&&(t[0]!==`content`||s.source===null||s.effective!==null||s.guard===null)||s.status===`copy`&&(s.source===null||s.effective===null)||s.effective!==null&&s.guard===null||s.source===null&&s.effective===null)&&failure(`Invalid schema state: inconsistent status at ${n}`),{...s,sourceOwner:parseSchemaOwner(s.sourceOwner)}});return{...n.data,entries:o.sort(compareSchemaStateEntries)}}function parseSchemaState(e){try{return parseState(e)}catch(e){throw e instanceof a.ZodError?i.ValidationError.fromZodErrors(e.issues.map(e=>({path:e.path.map(String),message:e.message}))):e}}function diffSchemaState(t){let n=[];for(let r of[...t.entries].sort(compareSchemaStateEntries)){let t=r.source===null?`added`:r.status===`suppressed`?`suppressed`:r.effective===null?`removed`:e.canonicalStringify(r.source)===e.canonicalStringify(r.effective)?r.status===`copy`?`copied`:null:`changed`;t&&n.push({...r,change:t})}return{modelVersion:1,tenant:t.tenant,sourceFingerprint:t.sourceFingerprint,changes:n}}const J=a.string().min(1),Y=a.union([a.object({objectName:J,viewName:J,contentName:J.optional()}).strict().describe(`Full configuration of a view, or of one content when contentName is given`),a.object({objectId:J}).strict().describe(`An object with its attributes, by id`),a.object({objectName:J}).strict().describe(`An object with its attributes`),a.object({objectId:J,attributeName:J}).strict().describe(`One attribute's config, by name`),a.object({objectId:J,attributeId:J}).strict().describe(`One attribute's config, by id`),a.object({objectId:J,recordId:J}).strict().describe(`One sample record`)]);function parseNamedTarget(e){let t=Y.safeParse(e);if(!t.success)throw new i.ValidationError(`Invalid scoped target`,[{path:[`target`],message:`Expected exactly one named target branch`}]);return t.data}const ce=[`object`,`attribute`,`view`,`content`,`sample`],le=a.object({mode:a.enum([`inline`,`window`]),interaction:a.enum([`static`,`interactive`]),size:a.enum([`compact`,`regular`]),aspectRatio:a.number().positive().finite().optional()}).strict(),X=a.object({artifactId:a.string().min(1),revision:a.number().int().positive(),name:a.string().min(1),kind:a.string().min(1),retention:a.enum(f),display:le}).strict();function readArtifactResult(e){let t=X.safeParse(e);return t.success?t.data:null}const Z=a.string().regex(/^[^/\s]+\/[^/\s]+$/),ue=a.object({kind:a.literal(`generated-image`),artifact:a.unknown(),generation:a.object({attemptId:a.uuid(),requestedModelId:Z,executedModelId:Z.nullable(),format:a.enum(r.IMAGE_FORMATS),mimeType:a.enum([`image/png`,`image/jpeg`,`image/webp`])}).strict()}).strict();function readGeneratedImageResult(e){let t=ue.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=r.parseReference(e);n.ok&&n.ref.kind===`record`&&t.add(n.ref.id)}}return[...t]}const de={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,de)}}return[...t.values()]}const Q={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,Q);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,Q)}}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 $=a.object({provider:a.custom(e=>isNonBlankString(e)&&e.length<=200,{message:`must be a non-blank string of at most 200 characters`}),model:a.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}}}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 fe=a.strictObject({model:$.optional(),routing:a.literal(`auto`).optional()}),pe=a.strictObject({inApp:a.boolean()});function isActionableType(e){let n=t.DECISION_TYPE_KINDS[e];return n!==void 0&&t.isActionableDecisionKind(n.kind)}const me=[preference(`workPosture`,{value:a.enum(r.USER_WORK_POSTURES),default:`auto`,audited:!0}),preference(`chat.default`,{value:fe,default:{},audited:!0}),preference(`conversationSurface`,{value:a.enum(r.CONVERSATION_SURFACES),default:`panel`}),preference(`mailboxListMode`,{value:a.enum(r.MAILBOX_LIST_MODES),default:`threads`}),preference(`mailboxReaderLayout`,{value:a.enum(r.MAILBOX_READER_LAYOUTS),default:`panel`}),preference(`home`,{value:a.string().uuid().nullable(),default:null}),preference(`memory.learnFromEmail`,{value:a.boolean(),default:!0,audited:!0}),preference(`memory.shareWithTeam`,{value:a.boolean(),default:!0,audited:!0}),preference(`onboarding.completed`,{value:a.boolean(),default:!1,audited:!1}),preference(`decisions.seenAt`,{value:a.iso.datetime().nullable(),default:null}),preference(`decisions.delivery`,{value:pe,default:{inApp:!0},parameter:`decision type`,parameters:Object.keys(t.DECISION_TYPE_KINDS),refine:(e,t)=>!e.inApp&&isActionableType(t)?`A "${t}" decision asks you to act: it is always shown in-app`:void 0})];exports.ACCESS_CAPABILITIES=r.ACCESS_CAPABILITIES,exports.ACCESS_LEVELS=r.ACCESS_LEVELS,exports.ACCESS_ROLES=r.ACCESS_ROLES,exports.ACTIONABLE_DECISION_KINDS=t.ACTIONABLE_DECISION_KINDS,exports.ACTOR_TYPES=r.ACTOR_TYPES,exports.AGENDA_BLOCK=t.AGENDA_BLOCK,exports.AGENT_ASIDE_ANSWER_MAX_LENGTH=r.AGENT_ASIDE_ANSWER_MAX_LENGTH,exports.AGENT_ASIDE_HISTORY_LIMIT=r.AGENT_ASIDE_HISTORY_LIMIT,exports.AGENT_ASIDE_QUESTION_MAX_LENGTH=r.AGENT_ASIDE_QUESTION_MAX_LENGTH,exports.AGENT_AVATAR_EXPRESSIONS=r.AGENT_AVATAR_EXPRESSIONS,exports.AGENT_AVATAR_TYPES=r.AGENT_AVATAR_TYPES,exports.AGENT_MESSAGE_KIND=r.AGENT_MESSAGE_KIND,exports.AGENT_MESSAGE_SENDER_NAME_KEY=r.AGENT_MESSAGE_SENDER_NAME_KEY,exports.AGENT_NOTIFICATION_KIND=r.AGENT_NOTIFICATION_KIND,exports.AGENT_SESSION_ACCESS_ROLES=r.AGENT_SESSION_ACCESS_ROLES,exports.AGENT_SESSION_LIST_ORDERS=r.AGENT_SESSION_LIST_ORDERS,exports.AGENT_SESSION_ORIGINS=r.AGENT_SESSION_ORIGINS,exports.AGENT_SESSION_PROVENANCES=r.AGENT_SESSION_PROVENANCES,exports.AGENT_STARTERS_MAX=r.AGENT_STARTERS_MAX,exports.AGENT_STARTER_MAX_LENGTH=r.AGENT_STARTER_MAX_LENGTH,exports.AGENT_SYSTEM_PROMPT_MAX_LENGTH=r.AGENT_SYSTEM_PROMPT_MAX_LENGTH,exports.AGENT_TASK_KINDS=r.AGENT_TASK_KINDS,exports.AGENT_WAKE_KIND=r.AGENT_WAKE_KIND,exports.AGGREGATE_BUCKETS=t.AGGREGATE_BUCKETS,exports.AGGREGATE_MEASURES=t.AGGREGATE_MEASURES,exports.AI_MODEL_INPUT_MODALITIES=r.AI_MODEL_INPUT_MODALITIES,exports.AI_MODEL_PROFILE_LABELS=r.AI_MODEL_PROFILE_LABELS,exports.AI_MODEL_REASONING_MODES=r.AI_MODEL_REASONING_MODES,exports.ALLOWED_PROPERTY_TYPES=h,exports.ALL_CATALOG_TOOL_NAMES=r.ALL_CATALOG_TOOL_NAMES,exports.ALL_PIPES=v,exports.ALWAYS_KINDS=r.ALWAYS_KINDS,exports.APPEARANCE_FACETS=r.APPEARANCE_FACETS,exports.APPROVAL_FAMILY_TOOL_NAMES=r.APPROVAL_FAMILY_TOOL_NAMES,exports.ARCHITECT_PUBLICATION_KIND=r.ARCHITECT_PUBLICATION_KIND,exports.ARTIFACT_FILE_ROLES=p,exports.ARTIFACT_KINDS=d,exports.ARTIFACT_PREVIEW_EXTENSION=t.ARTIFACT_PREVIEW_EXTENSION,exports.ARTIFACT_RETENTIONS=f,exports.ASK_QUESTIONS_ANSWER_MAX_LENGTH=r.ASK_QUESTIONS_ANSWER_MAX_LENGTH,exports.ASK_QUESTIONS_ANSWER_MAX_VALUES=r.ASK_QUESTIONS_ANSWER_MAX_VALUES,exports.ASK_QUESTIONS_FILE_REF=r.ASK_QUESTIONS_FILE_REF,exports.ASK_QUESTIONS_MAX_ADDED_FILES=r.ASK_QUESTIONS_MAX_ADDED_FILES,exports.ASK_QUESTIONS_MAX_BATCH=r.ASK_QUESTIONS_MAX_BATCH,exports.ASK_QUESTIONS_TOOL_NAME=r.ASK_QUESTIONS_TOOL_NAME,exports.ATTACH_FILE_ACTIONS=r.ATTACH_FILE_ACTIONS,exports.ATTRIBUTE_FILTER_OPERATORS=t.ATTRIBUTE_FILTER_OPERATORS,exports.ATTRIBUTE_NAME_SCHEMA=t.ATTRIBUTE_NAME_SCHEMA,exports.ATTRIBUTE_TYPES=t.ATTRIBUTE_TYPES,exports.ATTRIBUTE_TYPE_DESCRIPTORS=t.ATTRIBUTE_TYPE_DESCRIPTORS,exports.AUDIT_ACTIONS=r.AUDIT_ACTIONS,exports.AUDIT_AGENT_SESSION_METADATA_KEY=r.AUDIT_AGENT_SESSION_METADATA_KEY,exports.AUDIT_RESOURCE_TYPES=r.AUDIT_RESOURCE_TYPES,exports.AccessDeniedError=i.AccessDeniedError,exports.AgendaBuilder=AgendaBuilder,exports.AgentBuilder=r.AgentBuilder,exports.AggregateValidationError=i.AggregateValidationError,exports.AmbiguousSchemaChangeError=i.AmbiguousSchemaChangeError,exports.AttributeInUseError=i.AttributeInUseError,exports.AttributeNotFoundError=i.AttributeNotFoundError,exports.BILLING_MODES=r.BILLING_MODES,exports.BLOCK_CONTEXTS=t.BLOCK_CONTEXTS,exports.BLOCK_PERIODS=t.BLOCK_PERIODS,exports.BLOCK_WIDTHS=t.BLOCK_WIDTHS,exports.BROWSER_LAUNCH_TOOL_NAME=r.BROWSER_LAUNCH_TOOL_NAME,exports.BROWSER_TOOL_NAMES=r.BROWSER_TOOL_NAMES,exports.BUNDLE_LOCALES=r.BUNDLE_LOCALES,exports.BUNDLE_NAME_PATTERN=P,exports.BUNDLE_SETUP_PROMPT_MAX_LENGTH=r.BUNDLE_SETUP_PROMPT_MAX_LENGTH,exports.BYTE_UNIT_LABELS=m,exports.BlockContentBuilder=BlockContentBuilder,exports.BundleBuilder=BundleBuilder,exports.CARD_BLOCK=t.CARD_BLOCK,exports.CATALOG_RESOURCES=r.CATALOG_RESOURCES,exports.CHART_BLOCK=t.CHART_BLOCK,exports.CHART_KINDS=t.CHART_KINDS,exports.CHART_ORDERS=t.CHART_ORDERS,exports.CHAT_PROVIDERS=r.CHAT_PROVIDERS,exports.COMPUTED_RETURN_TYPES=n.COMPUTED_RETURN_TYPES,exports.CONNECTION_GRANT_PROVIDERS=r.CONNECTION_GRANT_PROVIDERS,exports.CONNECTION_STATUS_IDS=r.CONNECTION_STATUS_IDS,exports.CONNECTOR_PROVIDER_IDS=r.CONNECTOR_PROVIDER_IDS,exports.CONNECTOR_SCOPES=r.CONNECTOR_SCOPES,exports.CONTENT_PLACEMENT_CONTEXTS=t.CONTENT_PLACEMENT_CONTEXTS,exports.CONTINUATION_KEY_PATTERN=r.CONTINUATION_KEY_PATTERN,exports.CONVERSATION_SURFACES=r.CONVERSATION_SURFACES,exports.COPY_VERB_NAME=r.COPY_VERB_NAME,exports.CORE_BUNDLE_NAME=F,exports.CORE_PREFERENCES=me,exports.CORE_RECORD_TOOL_NAMES=r.CORE_RECORD_TOOL_NAMES,exports.CORE_TOOL_NAMES=r.CORE_TOOL_NAMES,exports.COUNT_MODES=r.COUNT_MODES,exports.CUSTOM_LEVEL=r.CUSTOM_LEVEL,exports.CardBuilder=CardBuilder,exports.ChartBuilder=ChartBuilder,exports.ChartQuery=ChartQuery,exports.ConcurrentModificationError=i.ConcurrentModificationError,exports.ContentBuilder=V,exports.DECISIONS_BLOCK=t.DECISIONS_BLOCK,exports.DECISION_INBOX_STATES=t.DECISION_INBOX_STATES,exports.DECISION_KINDS=t.DECISION_KINDS,exports.DECISION_LINE_MAX_LENGTH=t.DECISION_LINE_MAX_LENGTH,exports.DECISION_LINK_TARGET_TYPES=t.DECISION_LINK_TARGET_TYPES,exports.DECISION_LIST_STATES=t.DECISION_LIST_STATES,exports.DECISION_READ_STATES=t.DECISION_READ_STATES,exports.DECISION_SENDER_KINDS=t.DECISION_SENDER_KINDS,exports.DECISION_SETTINGS_AREAS=t.DECISION_SETTINGS_AREAS,exports.DECISION_TITLE_MAX_LENGTH=t.DECISION_TITLE_MAX_LENGTH,exports.DECISION_TRANSFERS_KEY=t.DECISION_TRANSFERS_KEY,exports.DECISION_TYPES_V1=t.DECISION_TYPES_V1,exports.DECISION_TYPE_ACCESS_GRANTED=t.DECISION_TYPE_ACCESS_GRANTED,exports.DECISION_TYPE_AGENT_APPROVAL=t.DECISION_TYPE_AGENT_APPROVAL,exports.DECISION_TYPE_AGENT_MESSAGE=t.DECISION_TYPE_AGENT_MESSAGE,exports.DECISION_TYPE_AGENT_QUESTION=t.DECISION_TYPE_AGENT_QUESTION,exports.DECISION_TYPE_AGENT_REVIEW=t.DECISION_TYPE_AGENT_REVIEW,exports.DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED=t.DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,exports.DECISION_TYPE_AGENT_SETUP=t.DECISION_TYPE_AGENT_SETUP,exports.DECISION_TYPE_BUNDLE_SETUP=t.DECISION_TYPE_BUNDLE_SETUP,exports.DECISION_TYPE_CONNECTOR_CONNECTION_ERROR=t.DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,exports.DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED=t.DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,exports.DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED=t.DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED,exports.DECISION_TYPE_ENVIRONMENT_BUILD_FAILED=t.DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,exports.DECISION_TYPE_KINDS=t.DECISION_TYPE_KINDS,exports.DECISION_TYPE_PERSON=t.DECISION_TYPE_PERSON,exports.DECISION_TYPE_RECORD_ASSIGNED=t.DECISION_TYPE_RECORD_ASSIGNED,exports.DECISION_TYPE_RECORD_MENTIONED=t.DECISION_TYPE_RECORD_MENTIONED,exports.DECISION_WORK_STATES=t.DECISION_WORK_STATES,exports.DEFAULT_AGENT_EXECUTION_CONFIG=r.DEFAULT_AGENT_EXECUTION_CONFIG,exports.DEFAULT_AGENT_TOOL_GROUPS=r.DEFAULT_AGENT_TOOL_GROUPS,exports.DEFAULT_APPEARANCE_ICON=r.DEFAULT_APPEARANCE_ICON,exports.DEFAULT_APPROVAL_POLICY=r.DEFAULT_APPROVAL_POLICY,exports.DEFAULT_BLUEPRINT_TOOL_GROUPS=r.DEFAULT_BLUEPRINT_TOOL_GROUPS,exports.DEFAULT_CUSTOM_OBJECT_ICON=`database`,exports.DEFAULT_DAILY_ACTIVITY_DAYS=r.DEFAULT_DAILY_ACTIVITY_DAYS,exports.DEFAULT_DICTATION_LIMITS=r.DEFAULT_DICTATION_LIMITS,exports.DEFAULT_LABEL_FALLBACK=w,exports.DEFAULT_LAYOUT_TRAITS=t.DEFAULT_LAYOUT_TRAITS,exports.DEFAULT_MEETING_BOT_DISPLAY_NAME=r.DEFAULT_MEETING_BOT_DISPLAY_NAME,exports.DEFAULT_TENANT_SETTINGS=r.DEFAULT_TENANT_SETTINGS,exports.DEFAULT_VALIDATION_MESSAGES=n.DEFAULT_VALIDATION_MESSAGES,exports.DEVICE_ACCESS_ROLES=r.DEVICE_ACCESS_ROLES,exports.DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS=r.DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS,exports.DEVICE_CHANNEL_IDLE_POLL_MS=r.DEVICE_CHANNEL_IDLE_POLL_MS,exports.DEVICE_CHANNEL_KEEPALIVE_MS=r.DEVICE_CHANNEL_KEEPALIVE_MS,exports.DEVICE_CHANNEL_MAX_FRAME_BYTES=r.DEVICE_CHANNEL_MAX_FRAME_BYTES,exports.DEVICE_CHANNEL_PATH=r.DEVICE_CHANNEL_PATH,exports.DEVICE_CHANNEL_PRESENCE_MS=r.DEVICE_CHANNEL_PRESENCE_MS,exports.DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION=r.DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION,exports.DEVICE_COMMAND_ERROR_CODES=r.DEVICE_COMMAND_ERROR_CODES,exports.DEVICE_DESKTOP_STATES=r.DEVICE_DESKTOP_STATES,exports.DEVICE_SHELLS=r.DEVICE_SHELLS,exports.DICTATION_FINALIZATION_TIMEOUT_MS=r.DICTATION_FINALIZATION_TIMEOUT_MS,exports.DICTATION_FRAME_BYTES=r.DICTATION_FRAME_BYTES,exports.DICTATION_MAX_BUFFER_BYTES=r.DICTATION_MAX_BUFFER_BYTES,exports.DICTATION_MAX_FRAME_BYTES=r.DICTATION_MAX_FRAME_BYTES,exports.DICTATION_MAX_TRANSCRIPT_BYTES=r.DICTATION_MAX_TRANSCRIPT_BYTES,exports.DICTATION_MODEL_ID=r.DICTATION_MODEL_ID,exports.DICTATION_PREPARATION_TIMEOUT_MS=r.DICTATION_PREPARATION_TIMEOUT_MS,exports.DICTATION_SAMPLE_RATE=r.DICTATION_SAMPLE_RATE,exports.DICTATION_TICKET_TTL_MS=r.DICTATION_TICKET_TTL_MS,exports.DISCARD_ARCHITECT_DRAFT_TOOL_NAME=r.DISCARD_ARCHITECT_DRAFT_TOOL_NAME,exports.DOCUMENT_KINDS=r.DOCUMENT_KINDS,exports.DOCUMENT_SORT_MODES=r.DOCUMENT_SORT_MODES,exports.DRAFT_CONFLICT_KINDS=ce,exports.DRAFT_WRITE_TOOL_NAMES=r.DRAFT_WRITE_TOOL_NAMES,exports.DecisionsBuilder=DecisionsBuilder,exports.DeviceChannelProtocolError=r.DeviceChannelProtocolError,exports.DeviceChannelServerFrameSchema=r.DeviceChannelServerFrameSchema,exports.DeviceChannelWorkerFrameSchema=r.DeviceChannelWorkerFrameSchema,exports.DeviceDesktopStatusSchema=r.DeviceDesktopStatusSchema,exports.DuplicateError=i.DuplicateError,exports.EMAIL_CATEGORY_DEFAULT_COLOR=r.EMAIL_CATEGORY_DEFAULT_COLOR,exports.EMAIL_CATEGORY_DEFAULT_ICON=r.EMAIL_CATEGORY_DEFAULT_ICON,exports.EMAIL_CATEGORY_DESCRIPTION_MAX=r.EMAIL_CATEGORY_DESCRIPTION_MAX,exports.EMAIL_CATEGORY_DESCRIPTION_MIN=r.EMAIL_CATEGORY_DESCRIPTION_MIN,exports.EMAIL_CATEGORY_LIMIT=r.EMAIL_CATEGORY_LIMIT,exports.EMAIL_CATEGORY_NAME_MAX=r.EMAIL_CATEGORY_NAME_MAX,exports.EMAIL_CATEGORY_SCOPES=r.EMAIL_CATEGORY_SCOPES,exports.EMAIL_CLASSIFIED_BY=r.EMAIL_CLASSIFIED_BY,exports.EMAIL_DIRECTIONS=r.EMAIL_DIRECTIONS,exports.EMAIL_PARTICIPANT_ROLES=r.EMAIL_PARTICIPANT_ROLES,exports.EMAIL_PROVIDERS=r.EMAIL_PROVIDERS,exports.EMAIL_RULE_SCOPES=r.EMAIL_RULE_SCOPES,exports.ENVIRONMENT_BUILD_LOG_STEPS=r.ENVIRONMENT_BUILD_LOG_STEPS,exports.ENVIRONMENT_BUILD_LOG_STEP_PREFIX=r.ENVIRONMENT_BUILD_LOG_STEP_PREFIX,exports.ENVIRONMENT_HARNESSES=r.ENVIRONMENT_HARNESSES,exports.ENVIRONMENT_HARNESS_SANDBOX_WORKDIR=r.ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,exports.ENVIRONMENT_HARNESS_WORKDIR=r.ENVIRONMENT_HARNESS_WORKDIR,exports.ENVIRONMENT_IMAGES=r.ENVIRONMENT_IMAGES,exports.ENVIRONMENT_MEMORY_GB_PER_VCPU=r.ENVIRONMENT_MEMORY_GB_PER_VCPU,exports.ENVIRONMENT_NAME_MAX_CHARS=r.ENVIRONMENT_NAME_MAX_CHARS,exports.ENVIRONMENT_NETWORK_ALLOW_MAX=r.ENVIRONMENT_NETWORK_ALLOW_MAX,exports.ENVIRONMENT_SCRIPT_MAX_BYTES=r.ENVIRONMENT_SCRIPT_MAX_BYTES,exports.ENVIRONMENT_SIZES=r.ENVIRONMENT_SIZES,exports.ENVIRONMENT_SIZE_VCPUS=r.ENVIRONMENT_SIZE_VCPUS,exports.ENVIRONMENT_STANDARDS_WORKDIR=r.ENVIRONMENT_STANDARDS_WORKDIR,exports.ENV_VAR_KEY_PATTERN=r.ENV_VAR_KEY_PATTERN,exports.ESTIMATED_COUNT_CAP=r.ESTIMATED_COUNT_CAP,exports.ExportTooLargeError=i.ExportTooLargeError,exports.FILE_LIST_MAX_IDS=r.FILE_LIST_MAX_IDS,exports.FILE_OCR_STATUSES=r.FILE_OCR_STATUSES,exports.FILE_URLS_MAX_IDS=r.FILE_URLS_MAX_IDS,exports.FORM_FORBIDDEN_ATTRIBUTE_TYPES=l,exports.FORM_STATUSES=r.FORM_STATUSES,exports.FORM_SUBMISSION_STATUSES=r.FORM_SUBMISSION_STATUSES,exports.ForbiddenError=i.ForbiddenError,exports.FormBuilder=FormBuilder,exports.FormRowBuilder=FormRowBuilder,exports.FormStepBuilder=FormStepBuilder,exports.GET_ARCHITECT_DRAFT_TOOL_NAME=r.GET_ARCHITECT_DRAFT_TOOL_NAME,exports.GITHUB_TRIGGER_CATALOG=r.GITHUB_TRIGGER_CATALOG,exports.GITHUB_TRIGGER_FAMILIES=r.GITHUB_TRIGGER_FAMILIES,exports.GRANT_ENABLES=r.GRANT_ENABLES,exports.GROUPABLE_ATTRIBUTE_TYPES=t.GROUPABLE_ATTRIBUTE_TYPES,exports.GroupBuilder=H,exports.HARNESS_BRIDGE_PORT=r.HARNESS_BRIDGE_PORT,exports.HEADING_BLOCK=t.HEADING_BLOCK,exports.HIERARCHY_ATTRIBUTE_IDS=t.HIERARCHY_ATTRIBUTE_IDS,exports.HIERARCHY_ATTRIBUTE_NAMES=t.HIERARCHY_ATTRIBUTE_NAMES,exports.HIERARCHY_CHILD_IDS_LIMIT=t.HIERARCHY_CHILD_IDS_LIMIT,exports.HITL_TOOL_NAMES=r.HITL_TOOL_NAMES,exports.IMAGE_FORMATS=r.IMAGE_FORMATS,exports.IMAGE_SHAPES=r.IMAGE_SHAPES,exports.IMAGE_SOURCES=r.IMAGE_SOURCES,exports.INFERENCE_REASONING_OPTIONS=r.INFERENCE_REASONING_OPTIONS,exports.INFERENCE_ROUTING_MODES=r.INFERENCE_ROUTING_MODES,exports.INFERENCE_SPEEDS=r.INFERENCE_SPEEDS,exports.INVENTORY_LIMIT=t.INVENTORY_LIMIT,exports.InvalidPermissionGrantError=i.InvalidPermissionGrantError,exports.LAST_RUN_ERROR_MAX_LENGTH=r.LAST_RUN_ERROR_MAX_LENGTH,exports.LINK_COOKIE_MAX_AGE_MS=r.LINK_COOKIE_MAX_AGE_MS,exports.LINK_DEFAULT_MS=r.LINK_DEFAULT_MS,exports.LINK_MAX_MS=r.LINK_MAX_MS,exports.LIST_VIEW_TAB_VISIBILITIES=t.LIST_VIEW_TAB_VISIBILITIES,exports.LOCATION_FILTER_PROPERTIES=t.LOCATION_FILTER_PROPERTIES,exports.LogoProviderUnavailableError=i.LogoProviderUnavailableError,exports.LogoSearchRateLimitedError=i.LogoSearchRateLimitedError,exports.MACHINE_KEY_KINDS=r.MACHINE_KEY_KINDS,exports.MAILBOX_ACCOUNT_VISIBILITIES=r.MAILBOX_ACCOUNT_VISIBILITIES,exports.MAILBOX_BLOCK=t.MAILBOX_BLOCK,exports.MAILBOX_LIST_MODES=r.MAILBOX_LIST_MODES,exports.MAILBOX_READER_LAYOUTS=r.MAILBOX_READER_LAYOUTS,exports.MAIL_DRAFT_BODY_MAX_CHARS=r.MAIL_DRAFT_BODY_MAX_CHARS,exports.MAIL_DRAFT_MODES=r.MAIL_DRAFT_MODES,exports.MAIL_SIGNATURE_MAX_CHARS=r.MAIL_SIGNATURE_MAX_CHARS,exports.MAIL_SUBJECT_MAX_CHARS=r.MAIL_SUBJECT_MAX_CHARS,exports.MAX_AGGREGATE_GROUPS=t.MAX_AGGREGATE_GROUPS,exports.MAX_DAILY_ACTIVITY_DAYS=r.MAX_DAILY_ACTIVITY_DAYS,exports.MAX_PRESET_DEPTH=5,exports.MAX_TODOS=r.MAX_TODOS,exports.MAX_TODO_DESCRIPTION_CHARS=r.MAX_TODO_DESCRIPTION_CHARS,exports.MAX_TODO_ID_CHARS=r.MAX_TODO_ID_CHARS,exports.MCP_SERVER_NAME_MAX_LENGTH=100,exports.MEASURABLE_ATTRIBUTE_TYPES=t.MEASURABLE_ATTRIBUTE_TYPES,exports.MEETINGS_UPCOMING_BLOCK=t.MEETINGS_UPCOMING_BLOCK,exports.MEETING_BOT_IMAGE=r.MEETING_BOT_IMAGE,exports.MEETING_BOT_IMAGE_BASE64_MAX_LENGTH=r.MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,exports.MEETING_BOT_MEMBER_CAP=r.MEETING_BOT_MEMBER_CAP,exports.MEETING_BOT_NO_CREDITS=r.MEETING_BOT_NO_CREDITS,exports.MEETING_BOT_SILENT_REASON=r.MEETING_BOT_SILENT_REASON,exports.MEETING_CONFERENCE_REQUESTS=r.MEETING_CONFERENCE_REQUESTS,exports.MEETING_PARTICIPANT_ROLES=r.MEETING_PARTICIPANT_ROLES,exports.MEETING_RESPONSES=r.MEETING_RESPONSES,exports.MEETING_RESPONSE_STATUSES=r.MEETING_RESPONSE_STATUSES,exports.MEETING_STATUSES=r.MEETING_STATUSES,exports.MEMORY_ATTRIBUTES=T,exports.MEMORY_PAGE_MAX_CHARS=4e3,exports.MEMORY_SPEND_LIMIT_PATTERN=r.MEMORY_SPEND_LIMIT_PATTERN,exports.MEMORY_WORKSPACE_PROFILE=`workspace`,exports.MEMORY_WRITE_SOURCE=`memory`,exports.METERED_CHARGE_KINDS=E,exports.METERED_RATES_USD=ne,exports.METRIC_BLOCK=t.METRIC_BLOCK,exports.MailboxBuilder=MailboxBuilder,exports.MemoryNotFoundError=i.MemoryNotFoundError,exports.MetricBuilder=MetricBuilder,exports.MetricQuery=MetricQuery,exports.MultiRelationAttributeBuilder=MultiRelationAttributeBuilder,exports.NATIVE_AGENT_UI_PART_IDS_METADATA_KEY=c,exports.NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION=1,exports.NATIVE_BLOCKS=t.NATIVE_BLOCKS,exports.NATIVE_OBJECT_NAMES=t.NATIVE_OBJECT_NAMES,exports.NATIVE_TOOL_GROUPS=r.NATIVE_TOOL_GROUPS,exports.NATIVE_TOOL_GROUP_CATALOG=r.NATIVE_TOOL_GROUP_CATALOG,exports.NEWS_DEFAULT_DISPLAY_DAYS=r.NEWS_DEFAULT_DISPLAY_DAYS,exports.NEWS_DISPLAY_CAP_DAYS=r.NEWS_DISPLAY_CAP_DAYS,exports.NEWS_INDEX_MAX_ENTRIES=r.NEWS_INDEX_MAX_ENTRIES,exports.NEWS_INTENSITIES=r.NEWS_INTENSITIES,exports.NEWS_TARGET_KINDS=r.NEWS_TARGET_KINDS,exports.NO_ACCESS=r.NO_ACCESS,exports.NO_PREFERENCE_PARAMETER=``,exports.NO_RECORDING=r.NO_RECORDING,exports.NO_VALUE_OPERATORS=t.NO_VALUE_OPERATORS,exports.NonJsonValueError=e.NonJsonValueError,exports.NoopGeocodingAdapter=NoopGeocodingAdapter,exports.NotFoundError=i.NotFoundError,exports.NotImplementedError=i.NotImplementedError,exports.OAUTH_TICKET_TTL_MS=r.OAUTH_TICKET_TTL_MS,exports.OBJECT_GRANT=r.OBJECT_GRANT,exports.OBJECT_NAME_SCHEMA=t.OBJECT_NAME_SCHEMA,exports.OFFICIAL_SKILLS_REPO=k,exports.OPEN_TOOL_PART_STATES=r.OPEN_TOOL_PART_STATES,exports.OPERATION_MAX_STEPS=r.OPERATION_MAX_STEPS,exports.OPERATORS_BY_TYPE=t.OPERATORS_BY_TYPE,exports.ObjectBuilder=ObjectBuilder,exports.ObjectNotFoundError=i.ObjectNotFoundError,exports.ObjectReferencedError=i.ObjectReferencedError,exports.OrphanSystemAttributeError=i.OrphanSystemAttributeError,exports.PAGE_GRID_COLUMNS=t.PAGE_GRID_COLUMNS,exports.PERMISSION_ACTIONS=r.PERMISSION_ACTIONS,exports.PERMISSION_CAPABILITIES=r.PERMISSION_CAPABILITIES,exports.PERMISSION_CATALOG=r.PERMISSION_CATALOG,exports.PERSISTENCE_OWNED_QUOTA_KEYS=r.PERSISTENCE_OWNED_QUOTA_KEYS,exports.PIPES_WITH_ARGS=_,exports.PROVIDER_DRAFT_LABEL=r.PROVIDER_DRAFT_LABEL,exports.PROVIDER_NAMES=r.PROVIDER_NAMES,exports.PUBLIC_MAIL_DOMAINS=r.PUBLIC_MAIL_DOMAINS,exports.PageBuilder=I,exports.PageReferencedError=i.PageReferencedError,exports.ProtectedResourceError=i.ProtectedResourceError,exports.ProtectedRoleError=i.ProtectedRoleError,exports.QUALIFIED_SEPARATOR=t.QUALIFIED_SEPARATOR,exports.QUERY_OBJECT=t.QUERY_OBJECT,exports.QUESTION_FAMILY_TOOL_NAMES=r.QUESTION_FAMILY_TOOL_NAMES,exports.QUOTA_KEYS=r.QUOTA_KEYS,exports.QueryTimeoutError=i.QueryTimeoutError,exports.RECENT_ACTIVITY_LEDGER_LIMIT=r.RECENT_ACTIVITY_LEDGER_LIMIT,exports.RECIPIENT_IDENTITIES_MAX=r.RECIPIENT_IDENTITIES_MAX,exports.RECORDING_OVERRIDES=r.RECORDING_OVERRIDES,exports.RECORDING_POLICIES=r.RECORDING_POLICIES,exports.RECORD_ACCESS_ROLES=r.RECORD_ACCESS_ROLES,exports.RECORD_ACCESS_SOURCES=r.RECORD_ACCESS_SOURCES,exports.RECORD_DRIVE_CURSOR_MAX_LENGTH=r.RECORD_DRIVE_CURSOR_MAX_LENGTH,exports.RECORD_DRIVE_PAGE_DEFAULT_LIMIT=r.RECORD_DRIVE_PAGE_DEFAULT_LIMIT,exports.RECORD_DRIVE_PAGE_MAX_LIMIT=r.RECORD_DRIVE_PAGE_MAX_LIMIT,exports.RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE=r.RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,exports.RECORD_GRAPH_MAX_LIMIT_PER_NODE=r.RECORD_GRAPH_MAX_LIMIT_PER_NODE,exports.RECORD_GRAPH_MAX_NODES=r.RECORD_GRAPH_MAX_NODES,exports.RECORD_IMAGE_MAX_BYTES=r.RECORD_IMAGE_MAX_BYTES,exports.RECORD_LINKS_BLOCK=t.RECORD_LINKS_BLOCK,exports.RECORD_LINKS_CONTENT=t.RECORD_LINKS_CONTENT,exports.RECORD_LIST_SCOPES=t.RECORD_LIST_SCOPES,exports.RECORD_OBJECT=t.RECORD_OBJECT,exports.REFERENCE_KINDS=r.REFERENCE_KINDS,exports.RELATION_TARGET_ANY=t.RELATION_TARGET_ANY,exports.REMOVED_OPERATOR_REPLACEMENTS=t.REMOVED_OPERATOR_REPLACEMENTS,exports.REPLY_MODES=r.REPLY_MODES,exports.REPOSITORY_WILDCARD=r.REPOSITORY_WILDCARD,exports.REQUEST_DESIGN_REVIEW_TOOL_NAME=r.REQUEST_DESIGN_REVIEW_TOOL_NAME,exports.REQUEST_SETUP_TOOL_NAME=r.REQUEST_SETUP_TOOL_NAME,exports.RESERVED_ATTRIBUTE_NAMES=t.RESERVED_ATTRIBUTE_NAMES,exports.RESERVED_OBJECT_NAMES=t.RESERVED_OBJECT_NAMES,exports.RESOURCE_GRANT_KINDS=r.RESOURCE_GRANT_KINDS,exports.RESOURCE_KIND_CATALOG=r.RESOURCE_KIND_CATALOG,exports.RESOURCE_VISIBILITIES=t.RESOURCE_VISIBILITIES,exports.ROUTING_PRICE_CEILINGS=r.ROUTING_PRICE_CEILINGS,exports.RUN_ORIGIN_METADATA_KEY=r.RUN_ORIGIN_METADATA_KEY,exports.RealtimeDeliveryError=i.RealtimeDeliveryError,exports.RealtimeRateLimitedError=i.RealtimeRateLimitedError,exports.RealtimeSubscriptionError=i.RealtimeSubscriptionError,exports.RecordNotFoundError=i.RecordNotFoundError,exports.RecordQuery=t.RecordQuery,exports.RecordReferencedError=i.RecordReferencedError,exports.RepositoryError=i.RepositoryError,exports.ReservedObjectNameError=i.ReservedObjectNameError,exports.RoleNotFoundError=i.RoleNotFoundError,exports.SCHEMA_ERROR_HTTP_STATUS=i.SCHEMA_ERROR_HTTP_STATUS,exports.SCHEMA_LIMITS=t.SCHEMA_LIMITS,exports.SCHEMA_OWNER_PATTERN=u,exports.SCHEMA_SOURCE_RETYPE_FROM=W,exports.SEND_VERB_NAME=r.SEND_VERB_NAME,exports.SESSION_INFERENCE_PATCH_KEYS=r.SESSION_INFERENCE_PATCH_KEYS,exports.SIMPLE_PIPES=g,exports.SIMPLE_PROPERTY_TYPES=n.SIMPLE_PROPERTY_TYPES,exports.SLACK_TRIGGER_CATALOG=r.SLACK_TRIGGER_CATALOG,exports.SLACK_TRIGGER_EVENTS=r.SLACK_TRIGGER_EVENTS,exports.SPEAKS_THROUGH_SEND_METADATA_KEY=r.SPEAKS_THROUGH_SEND_METADATA_KEY,exports.STANDARD_SCHEMA_VENDOR=O,exports.SURFACE_TOOL_NAMES=r.SURFACE_TOOL_NAMES,exports.SYNONYM_ALIASES=t.SYNONYM_ALIASES,exports.SYSTEM_ATTRIBUTES=t.SYSTEM_ATTRIBUTES,exports.SYSTEM_ATTRIBUTE_I18N_KEYS=t.SYSTEM_ATTRIBUTE_I18N_KEYS,exports.SYSTEM_EMAIL_CATEGORIES=r.SYSTEM_EMAIL_CATEGORIES,exports.SYSTEM_EMAIL_CATEGORY_NAMES=r.SYSTEM_EMAIL_CATEGORY_NAMES,exports.SYSTEM_FIELD_NAMES=t.SYSTEM_FIELD_NAMES,exports.SYSTEM_FILTER_ATTRIBUTE_TYPES=t.SYSTEM_FILTER_ATTRIBUTE_TYPES,exports.SYSTEM_PART_CODES=r.SYSTEM_PART_CODES,exports.SchemaError=i.SchemaError,exports.SchemaErrorCode=i.SchemaErrorCode,exports.SearchBackendError=i.SearchBackendError,exports.SearchPathNotIndexedError=i.SearchPathNotIndexedError,exports.SingleRelationAttributeBuilder=SingleRelationAttributeBuilder,exports.StorageError=i.StorageError,exports.SyncCascadeError=i.SyncCascadeError,exports.SyncConflictError=i.SyncConflictError,exports.SyncError=i.SyncError,exports.SystemEntityImmutableError=i.SystemEntityImmutableError,exports.TASK_DEMAND_LEVELS=r.TASK_DEMAND_LEVELS,exports.TENANT_INVITATION_DEFAULT_TTL_MS=r.TENANT_INVITATION_DEFAULT_TTL_MS,exports.TENANT_INVITATION_DELIVERY_STATUSES=r.TENANT_INVITATION_DELIVERY_STATUSES,exports.TENANT_INVITATION_MAX_TTL_MS=r.TENANT_INVITATION_MAX_TTL_MS,exports.TENANT_INVITATION_MIN_TTL_MS=r.TENANT_INVITATION_MIN_TTL_MS,exports.TENANT_INVITATION_RESEND_INTERVAL_MS=r.TENANT_INVITATION_RESEND_INTERVAL_MS,exports.TENANT_INVITATION_STATUSES=r.TENANT_INVITATION_STATUSES,exports.TEXT_BLOCK=t.TEXT_BLOCK,exports.TEXT_FORMAT_PATTERNS=n.TEXT_FORMAT_PATTERNS,exports.TODO_PHASES=r.TODO_PHASES,exports.TODO_PLAN_STATUSES=r.TODO_PLAN_STATUSES,exports.TODO_STATUSES=r.TODO_STATUSES,exports.TOOL_APPROVAL_STATES=r.TOOL_APPROVAL_STATES,exports.TOOL_IMPACT_COUNT_KEYS=r.TOOL_IMPACT_COUNT_KEYS,exports.TRANSCRIPT_STATUSES=r.TRANSCRIPT_STATUSES,exports.TRIAGE_ACTIONS=r.TRIAGE_ACTIONS,exports.TRIGGER_EVENT_TYPES=r.TRIGGER_EVENT_TYPES,exports.TRIGGER_MAX_REENTRY=r.TRIGGER_MAX_REENTRY,exports.TURN_OUTCOMES=r.TURN_OUTCOMES,exports.ToolGroupGrantError=i.ToolGroupGrantError,exports.UNORDERED_CHART_KINDS=t.UNORDERED_CHART_KINDS,exports.UNSHAREABLE_OBJECT_NAMES=r.UNSHAREABLE_OBJECT_NAMES,exports.USAGE_MODALITIES=r.USAGE_MODALITIES,exports.USAGE_SCOPES=r.USAGE_SCOPES,exports.USERS_RESOLVE_MAX_IDS=r.USERS_RESOLVE_MAX_IDS,exports.USER_STATUSES=r.USER_STATUSES,exports.USER_WORK_POSTURES=r.USER_WORK_POSTURES,exports.VERB_NAMES=r.VERB_NAMES,exports.ValidationError=i.ValidationError,exports.ViewBuilder=L,exports.WAKE_TURN_METADATA_KEY=r.WAKE_TURN_METADATA_KEY,exports.WAKE_TURN_SPOKE_METADATA_KEY=r.WAKE_TURN_SPOKE_METADATA_KEY,exports.WALLET_STATUSES=r.WALLET_STATUSES,exports.WIRE_OFFERED_BASE_CONFIG=n.WIRE_OFFERED_BASE_CONFIG,exports.WIRE_OMITTED_CONFIG_KEYS=n.WIRE_OMITTED_CONFIG_KEYS,exports.WorkspaceInvariantReason=i.WorkspaceInvariantReason,exports.accessGrantSchema=r.accessGrantSchema,exports.actorSchema=r.actorSchema,exports.agent=r.agent,exports.agentApprovalResolutionSchema=r.agentApprovalResolutionSchema,exports.agentAvatarFromMetadata=r.agentAvatarFromMetadata,exports.agentAvatarOutputSchema=r.agentAvatarOutputSchema,exports.agentAvatarSchema=r.agentAvatarSchema,exports.agentConversationOverviewSchema=r.agentConversationOverviewSchema,exports.agentDataChunk=r.agentDataChunk,exports.agentDefinitionActivitySchema=r.agentDefinitionActivitySchema,exports.agentDefinitionAudienceSchema=r.agentDefinitionAudienceSchema,exports.agentDefinitionDailyActivitySchema=r.agentDefinitionDailyActivitySchema,exports.agentDefinitionSchema=r.agentDefinitionSchema,exports.agentDisplayName=r.agentDisplayName,exports.agentExecutionConfigOutputSchema=r.agentExecutionConfigOutputSchema,exports.agentHistoryMessageSchema=r.agentHistoryMessageSchema,exports.agentInferencePreferencesOutputSchema=r.agentInferencePreferencesOutputSchema,exports.agentInferencePreferencesSchema=r.agentInferencePreferencesSchema,exports.agentMemoryViewSchema=r.agentMemoryViewSchema,exports.agentMessageAttachmentSchema=r.agentMessageAttachmentSchema,exports.agentMessagePartSchema=r.agentMessagePartSchema,exports.agentRequestAnswerSchema=r.agentRequestAnswerSchema,exports.agentRoleSchema=r.agentRoleSchema,exports.agentRolesSetResultSchema=r.agentRolesSetResultSchema,exports.agentRunSchema=r.agentRunSchema,exports.agentRunStatusSchema=r.agentRunStatusSchema,exports.agentScheduleOutputSchema=r.agentScheduleOutputSchema,exports.agentScheduleSchema=r.agentScheduleSchema,exports.agentSessionAudienceSchema=r.agentSessionAudienceSchema,exports.agentSessionDefinitionAppearanceSchema=r.agentSessionDefinitionAppearanceSchema,exports.agentSessionHistoryPageSchema=r.agentSessionHistoryPageSchema,exports.agentSessionInferenceOverridesInputSchema=r.agentSessionInferenceOverridesInputSchema,exports.agentSessionInferenceOverridesSchema=r.agentSessionInferenceOverridesSchema,exports.agentSessionLinkSchema=r.agentSessionLinkSchema,exports.agentSessionMessageOutputSchema=r.agentSessionMessageOutputSchema,exports.agentSessionMessageSchema=r.agentSessionMessageSchema,exports.agentSessionSchema=r.agentSessionSchema,exports.agentSetupResponseSchema=r.agentSetupResponseSchema,exports.agentStartersSchema=r.agentStartersSchema,exports.agentTodoPlanViewSchema=r.agentTodoPlanViewSchema,exports.agentToolCatalogSchema=r.agentToolCatalogSchema,exports.agentTriggerBaseSchema=r.agentTriggerBaseSchema,exports.agentTriggerDefinitionSchema=r.agentTriggerDefinitionSchema,exports.agentTriggerLastCallSchema=r.agentTriggerLastCallSchema,exports.agentTriggerPatchSchema=r.agentTriggerPatchSchema,exports.agentTriggerSchema=r.agentTriggerSchema,exports.agentUIValidationError=r.agentUIValidationError,exports.agentWakeSchema=r.agentWakeSchema,exports.agentWakeViewSchema=r.agentWakeViewSchema,exports.apiKeyRoleSchema=r.apiKeyRoleSchema,exports.apiKeySchema=r.apiKeySchema,exports.apiKeyWithSecretSchema=r.apiKeyWithSecretSchema,exports.applyPipes=applyPipes,exports.architectProjectionSchema=r.architectProjectionSchema,exports.artifactQuoteSchema=r.artifactQuoteSchema,exports.asTenantId=e.asTenantId,exports.asUserId=e.asUserId,exports.askQuestionsOutputSchema=r.askQuestionsOutputSchema,exports.assertBundleName=assertBundleName,exports.assertCustomAgentUIMessageChunk=r.assertCustomAgentUIMessageChunk,exports.assertSchemaSourceResolutions=assertSchemaSourceResolutions,exports.assertSessionState=r.assertSessionState,exports.attachedRecordDocumentSchema=r.attachedRecordDocumentSchema,exports.attributeConfigSchemas=n.attributeConfigSchemas,exports.attributeFilterTarget=t.attributeFilterTarget,exports.attributeInventory=t.attributeInventory,exports.attributeOutputSchema=r.attributeOutputSchema,exports.attributeSaveOutputSchema=r.attributeSaveOutputSchema,exports.auditChangeSchema=r.auditChangeSchema,exports.auditLogEntrySchema=r.auditLogEntrySchema,exports.availableBundleSummarySchema=r.availableBundleSummarySchema,exports.blockObjectInputs=t.blockObjectInputs,exports.browserProfilePreparationSchema=r.browserProfilePreparationSchema,exports.browserProfileViewSchema=r.browserProfileViewSchema,exports.buildPropertySchema=buildPropertySchema,exports.buildQualifiedAttribute=t.buildQualifiedAttribute,exports.builtBundleFromPieces=builtBundleFromPieces,exports.bundle=bundle,exports.bundleAddPlanSchema=r.bundleAddPlanSchema,exports.bundleAddResultSchema=r.bundleAddResultSchema,exports.bundleContentsSchema=r.bundleContentsSchema,exports.bundleListSchema=r.bundleListSchema,exports.bundleModeSchema=r.bundleModeSchema,exports.bundleOriginSchema=r.bundleOriginSchema,exports.bundlePieceKindSchema=r.bundlePieceKindSchema,exports.bundlePlanPieceSchema=r.bundlePlanPieceSchema,exports.bundleRemovalCascadeSchema=r.bundleRemovalCascadeSchema,exports.bundleRemovalPreviewSchema=r.bundleRemovalPreviewSchema,exports.bundleRemovalRowSchema=r.bundleRemovalRowSchema,exports.bundleStatusEntrySchema=r.bundleStatusEntrySchema,exports.bundleStatusSchema=r.bundleStatusSchema,exports.bundleSyncPreviewSchema=r.bundleSyncPreviewSchema,exports.bundleUpdateDependentSchema=r.bundleUpdateDependentSchema,exports.bundleUpdateGroupSchema=r.bundleUpdateGroupSchema,exports.bundleUpdatePieceKindSchema=r.bundleUpdatePieceKindSchema,exports.bundleUpdatePieceSchema=r.bundleUpdatePieceSchema,exports.bundleUpdatePlanSchema=r.bundleUpdatePlanSchema,exports.bundleUpdateReasonCodeSchema=r.bundleUpdateReasonCodeSchema,exports.bundleUpdateResultSchema=r.bundleUpdateResultSchema,exports.cancelAgentWakeResultSchema=r.cancelAgentWakeResultSchema,exports.canonicalStringify=e.canonicalStringify,exports.canonicalToolGroups=r.canonicalToolGroups,exports.canonicalizeFilterValue=t.canonicalizeFilterValue,exports.capabilityForResource=r.capabilityForResource,exports.capped=t.capped,exports.checkbox=checkbox,exports.classificationRestoreSchema=r.classificationRestoreSchema,exports.classificationUndoSchema=r.classificationUndoSchema,exports.classifyEmailResultSchema=r.classifyEmailResultSchema,exports.classifyEmailSchema=r.classifyEmailSchema,exports.cliDefaultModelOf=r.cliDefaultModelOf,exports.cloudBrowserLiveViewSchema=r.cloudBrowserLiveViewSchema,exports.collectContentViewCatalogue=t.collectContentViewCatalogue,exports.collectQualifiedRuleIssues=t.collectQualifiedRuleIssues,exports.collectionContentSourceSchema=t.collectionContentSourceSchema,exports.collectionOutputSchema=r.collectionOutputSchema,exports.collectionPageSchema=r.collectionPageSchema,exports.collectionSourceAddress=t.collectionSourceAddress,exports.collectionSourceAddressOf=t.collectionSourceAddressOf,exports.colorIdSchema=t.colorIdSchema,exports.columnsSchema=t.columnsSchema,exports.compareAgentSessionMessages=r.compareAgentSessionMessages,exports.compareSchemaStateEntries=compareSchemaStateEntries,exports.compareVersions=r.compareVersions,exports.compiledHarnessModels=r.compiledHarnessModels,exports.computeByteMagnitude=computeByteMagnitude,exports.computeReconnectDelay=r.computeReconnectDelay,exports.computeRetryDelay=r.computeRetryDelay,exports.connectionCapabilitiesSchema=r.connectionCapabilitiesSchema,exports.connectionGrantKindsOf=r.connectionGrantKindsOf,exports.connectionSyncProgressSchema=r.connectionSyncProgressSchema,exports.connectionViewSchema=r.connectionViewSchema,exports.connectorProvidersResultSchema=r.connectorProvidersResultSchema,exports.connectorTriggerMatchSchema=r.connectorTriggerMatchSchema,exports.content=oe,exports.contentDefinition=contentDefinition,exports.contentExtensionRegistry=t.contentExtensionRegistry,exports.contentReadObjects=t.contentReadObjects,exports.contentViewDefinitionSchema=t.contentViewDefinitionSchema,exports.contentViewDefinitionSchemaFor=t.contentViewDefinitionSchemaFor,exports.convertRetypedValue=convertRetypedValue,exports.createAgentTriggerResultSchema=r.createAgentTriggerResultSchema,exports.createAttributeValidator=n.createAttributeValidator,exports.createFormAttributeValidator=n.createFormAttributeValidator,exports.createStandardSchemaProps=createStandardSchemaProps,exports.criticConfigOutputSchema=r.criticConfigOutputSchema,exports.currency=currency,exports.currentActor=t.currentActor,exports.customDataChunkSchemas=r.customDataChunkSchemas,exports.date=date,exports.decisionArchiveAllResultSchema=t.decisionArchiveAllResultSchema,exports.decisionAttachmentSchema=t.decisionAttachmentSchema,exports.decisionCountsSchema=t.decisionCountsSchema,exports.decisionHandedBy=t.decisionHandedBy,exports.decisionLinkSchema=t.decisionLinkSchema,exports.decisionListResultSchema=t.decisionListResultSchema,exports.decisionRecipientSchema=t.decisionRecipientSchema,exports.decisionSchema=t.decisionSchema,exports.decisionSenderSchema=t.decisionSenderSchema,exports.decisionThreadKey=t.decisionThreadKey,exports.decisionTransferBy=t.decisionTransferBy,exports.decisionTransferTargetsSchema=t.decisionTransferTargetsSchema,exports.decisionTransferTo=t.decisionTransferTo,exports.decisionTransfersOf=t.decisionTransfersOf,exports.decisionWithRecipientSchema=t.decisionWithRecipientSchema,exports.declaredImageRequests=r.declaredImageRequests,exports.decodeAgentSessionListCursor=r.decodeAgentSessionListCursor,exports.decodeRecordValues=r.decodeRecordValues,exports.deepEqual=e.deepEqual,exports.defaultEnvironmentSchema=r.defaultEnvironmentSchema,exports.deferredRetypeSchema=r.deferredRetypeSchema,exports.defineBlock=t.defineBlock,exports.deriveLayout6=deriveLayout6,exports.deriveViewerAccess=r.deriveViewerAccess,exports.describeViewIssue=t.describeViewIssue,exports.detailView=detailView,exports.deviceAudienceSchema=r.deviceAudienceSchema,exports.deviceChannelUrl=r.deviceChannelUrl,exports.diffSchemaState=diffSchemaState,exports.displayAttributesSchema=t.displayAttributesSchema,exports.document=document,exports.documentFileSchema=r.documentFileSchema,exports.documentRecordOwnerPageSchema=r.documentRecordOwnerPageSchema,exports.documentRecordOwnerSchema=r.documentRecordOwnerSchema,exports.documentSchema=r.documentSchema,exports.documentWithSubCountSchema=r.documentWithSubCountSchema,exports.draftAppendOutputSchema=r.draftAppendOutputSchema,exports.draftCommandGuardSchema=r.draftCommandGuardSchema,exports.draftContentViewDefinitionSchema=t.draftContentViewDefinitionSchema,exports.draftContentViewDefinitionSchemaFor=t.draftContentViewDefinitionSchemaFor,exports.driveFileSchema=r.driveFileSchema,exports.droppedContents=droppedContents,exports.durableDateSchema=r.durableDateSchema,exports.edgePropertyFilterTarget=t.edgePropertyFilterTarget,exports.editAgentSessionMessageResultSchema=r.editAgentSessionMessageResultSchema,exports.effectivePermissionsSchema=r.effectivePermissionsSchema,exports.emailAttachmentMetaSchema=r.emailAttachmentMetaSchema,exports.emailCategoryCreateSchema=r.emailCategoryCreateSchema,exports.emailCategoryDeleteSchema=r.emailCategoryDeleteSchema,exports.emailCategorySchema=r.emailCategorySchema,exports.emailCategoryScopeQuerySchema=r.emailCategoryScopeQuerySchema,exports.emailCategoryUpdateSchema=r.emailCategoryUpdateSchema,exports.emailCategoryUsageSchema=r.emailCategoryUsageSchema,exports.emailParticipantRefSchema=r.emailParticipantRefSchema,exports.emailRuleScopeSchema=r.emailRuleScopeSchema,exports.emailSenderRuleSchema=r.emailSenderRuleSchema,exports.emailVerdictSchema=r.emailVerdictSchema,exports.encodeAgentSessionListCursor=r.encodeAgentSessionListCursor,exports.encodeRecordValues=r.encodeRecordValues,exports.envVarEntrySchema=r.envVarEntrySchema,exports.environmentBuildFailureSchema=r.environmentBuildFailureSchema,exports.environmentBuildStateSchema=r.environmentBuildStateSchema,exports.environmentDetailSchema=r.environmentDetailSchema,exports.environmentHarness=r.environmentHarness,exports.environmentHarnessSchema=r.environmentHarnessSchema,exports.environmentListSchema=r.environmentListSchema,exports.environmentNetworkPolicyOutputSchema=r.environmentNetworkPolicyOutputSchema,exports.environmentRepositorySourceSchema=r.environmentRepositorySourceSchema,exports.environmentSchema=r.environmentSchema,exports.environmentWorkdir=r.environmentWorkdir,exports.extractAttributeNames=extractAttributeNames,exports.extractAttributePaths=extractAttributePaths,exports.extractCurrencyFilterValue=t.extractCurrencyFilterValue,exports.extractFilterValue=t.extractFilterValue,exports.extractReadRecordIds=extractReadRecordIds,exports.extractTouchedArtifacts=extractTouchedArtifacts,exports.extractTouchedDocuments=extractTouchedDocuments,exports.extractTouchedRecords=extractTouchedRecords,exports.fileSchema=r.fileSchema,exports.fileUrlsResponseSchema=r.fileUrlsResponseSchema,exports.filterOperatorsOfType=t.filterOperatorsOfType,exports.filterStateSchema=t.filterStateSchema,exports.filterTargetsOf=t.filterTargetsOf,exports.findEnvironmentHarness=r.findEnvironmentHarness,exports.findGrantIssues=r.findGrantIssues,exports.findGridViolation=t.findGridViolation,exports.findGroupViolation=t.findGroupViolation,exports.findLayoutRuleViolation=t.findLayoutRuleViolation,exports.findRelationAttribute=t.findRelationAttribute,exports.findRowLimitViolation=t.findRowLimitViolation,exports.foldText=foldText,exports.form=form,exports.formDefinitionSchema=r.formDefinitionSchema,exports.formFieldFlatKey=formFieldFlatKey,exports.formFieldKey=formFieldKey,exports.formSlotSchema=r.formSlotSchema,exports.formStepSchema=r.formStepSchema,exports.formSubmissionSchema=r.formSubmissionSchema,exports.formatByteSize=formatByteSize,exports.formatDecisionLink=t.formatDecisionLink,exports.formatNewsTarget=r.formatNewsTarget,exports.formatPhoneForDisplay=n.formatPhoneForDisplay,exports.formatReference=r.formatReference,exports.formatSkillSource=formatSkillSource,exports.formatZodErrors=n.formatZodErrors,exports.formula=formula,exports.generateId=e.generateId,exports.getAttributeCapabilities=t.getAttributeCapabilities,exports.getAttributeConfigSchema=n.getAttributeConfigSchema,exports.getAttributeConfigWriteSchema=n.getAttributeConfigWriteSchema,exports.getAttributeFilterOperators=t.getAttributeFilterOperators,exports.getEditableLabelAttribute=getEditableLabelAttribute,exports.getHierarchyAttributes=t.getHierarchyAttributes,exports.getObjectSystemAttributes=t.getObjectSystemAttributes,exports.getOperatorPolarity=t.getOperatorPolarity,exports.getRollupFilterOperators=t.getRollupFilterOperators,exports.getSingleAttributeFromExpression=getSingleAttributeFromExpression,exports.getSlotFieldTargets=getSlotFieldTargets,exports.getSystemAttributeI18nKey=t.getSystemAttributeI18nKey,exports.getSystemAttributeList=t.getSystemAttributeList,exports.githubConditionSchema=r.githubConditionSchema,exports.githubTriggerMatchSchema=r.githubTriggerMatchSchema,exports.grantKindOf=r.grantKindOf,exports.gridPositionSchema=t.gridPositionSchema,exports.group=group,exports.groupSizeMessage=t.groupSizeMessage,exports.groupedMembers=t.groupedMembers,exports.harnessModelChoices=r.harnessModelChoices,exports.harnessModelListSchema=r.harnessModelListSchema,exports.harnessModelOptionSchema=r.harnessModelOptionSchema,exports.hasLocale=r.hasLocale,exports.hasOptions=hasOptions,exports.hasTypeTrait=t.hasTypeTrait,exports.hasValueKind=t.hasValueKind,exports.hashBundlePieces=hashBundlePieces,exports.humanRequestId=r.humanRequestId,exports.humanRequestKind=r.humanRequestKind,exports.iconNameSchema=t.iconNameSchema,exports.imageLookupKindOf=imageLookupKindOf,exports.imageModelFormatDefect=r.imageModelFormatDefect,exports.imageModelIdSchema=r.imageModelIdSchema,exports.indexBy=e.indexBy,exports.inferInverseCardinality=t.inferInverseCardinality,exports.inferenceReasoningSchema=r.inferenceReasoningSchema,exports.inferenceRoutingSchema=r.inferenceRoutingSchema,exports.inferenceSpeedSchema=r.inferenceSpeedSchema,exports.input=t.input,exports.installedBundleSummarySchema=r.installedBundleSummarySchema,exports.invalidViewMessage=t.invalidViewMessage,exports.isActionableDecisionKind=t.isActionableDecisionKind,exports.isAgentMessageMetadata=r.isAgentMessageMetadata,exports.isAgentNotificationMetadata=r.isAgentNotificationMetadata,exports.isAgentUIDataName=r.isAgentUIDataName,exports.isAgentWakeMetadata=r.isAgentWakeMetadata,exports.isAgentWrittenAuditEntry=r.isAgentWrittenAuditEntry,exports.isArchitectPublicationMetadata=r.isArchitectPublicationMetadata,exports.isAttributeFilterable=t.isAttributeFilterable,exports.isAttributeGroupable=t.isAttributeGroupable,exports.isAttributeInUseError=i.isAttributeInUseError,exports.isAttributeKanbanGroupable=t.isAttributeKanbanGroupable,exports.isAttributeSearchable=t.isAttributeSearchable,exports.isAttributeSortable=t.isAttributeSortable,exports.isAwaitingHuman=r.isAwaitingHuman,exports.isBilateralRelation=t.isBilateralRelation,exports.isBlocking=r.isBlocking,exports.isBoardGrouping=t.isBoardGrouping,exports.isBundle=isBundle,exports.isCalendarDay=t.isCalendarDay,exports.isCatalogResource=r.isCatalogResource,exports.isCollectionContent=t.isCollectionContent,exports.isDynamicValue=t.isDynamicValue,exports.isEmptyValue=n.isEmptyValue,exports.isEnvironmentBuildLogStep=r.isEnvironmentBuildLogStep,exports.isEnvironmentHarnessId=r.isEnvironmentHarnessId,exports.isFormDefinition=r.isFormDefinition,exports.isFormFieldsRow=isFormFieldsRow,exports.isFormFreeFieldRef=isFormFreeFieldRef,exports.isFormHeadingRow=isFormHeadingRow,exports.isFormSeparatorRow=isFormSeparatorRow,exports.isFormSlotFieldRef=isFormSlotFieldRef,exports.isFormTextRow=isFormTextRow,exports.isHierarchyAttribute=t.isHierarchyAttribute,exports.isImageSource=r.isImageSource,exports.isLabelExpression=isLabelExpression,exports.isLocationFilterProperty=t.isLocationFilterProperty,exports.isLocationPartOperator=t.isLocationPartOperator,exports.isMailProvider=r.isMailProvider,exports.isMailboxListMode=r.isMailboxListMode,exports.isManagedSystemAttribute=t.isManagedSystemAttribute,exports.isMeteredChargeKind=isMeteredChargeKind,exports.isNativeObjectName=t.isNativeObjectName,exports.isNativeToolGroup=r.isNativeToolGroup,exports.isNoValueOperator=t.isNoValueOperator,exports.isNotFoundError=i.isNotFoundError,exports.isNullishOrEmptyString=n.isNullishOrEmptyString,exports.isObjectReferencedError=i.isObjectReferencedError,exports.isOpenToolPartState=r.isOpenToolPartState,exports.isParkedOnHuman=r.isParkedOnHuman,exports.isPinnedSkillSource=isPinnedSkillSource,exports.isPlainRecord=t.isPlainRecord,exports.isProtectedResourceError=i.isProtectedResourceError,exports.isProviderDraft=r.isProviderDraft,exports.isPublicMailDomain=r.isPublicMailDomain,exports.isQuestionPart=r.isQuestionPart,exports.isRecordReferencedError=i.isRecordReferencedError,exports.isRelativeDateValue=t.isRelativeDateValue,exports.isReplyMode=r.isReplyMode,exports.isResourceGrant=r.isResourceGrant,exports.isRoutineActorMetadata=r.isRoutineActorMetadata,exports.isSchemaError=i.isSchemaError,exports.isSemver=r.isSemver,exports.isSessionInferencePatch=r.isSessionInferencePatch,exports.isSetMembershipOperator=t.isSetMembershipOperator,exports.isSkillRepository=isSkillRepository,exports.isStandardSchema=isStandardSchema,exports.isSystemEmailCategory=r.isSystemEmailCategory,exports.isSystemEmailCategoryName=r.isSystemEmailCategoryName,exports.isSystemPartCode=r.isSystemPartCode,exports.isToolApprovalState=r.isToolApprovalState,exports.isToolImpactCountKey=r.isToolImpactCountKey,exports.isUniversalRelation=t.isUniversalRelation,exports.isValidationError=i.isValidationError,exports.isValueKindType=t.isValueKindType,exports.isValuePresent=n.isValuePresent,exports.isWherePipe=isWherePipe,exports.isWildcard=r.isWildcard,exports.judgePreferenceWrite=judgePreferenceWrite,exports.keptFill=keptFill,exports.labelExpressionSchema=C,exports.lastPublicationSchema=r.lastPublicationSchema,exports.lastPublishErrorSchema=r.lastPublishErrorSchema,exports.layoutTraitsOf=t.layoutTraitsOf,exports.levelActions=r.levelActions,exports.levelFloor=r.levelFloor,exports.levelOf=r.levelOf,exports.linkedRecordRefSchema=r.linkedRecordRefSchema,exports.listView=listView,exports.locatePreference=locatePreference,exports.location=location,exports.locationPartFilterTarget=t.locationPartFilterTarget,exports.lockingSendCall=r.lockingSendCall,exports.loginSecretEntrySchema=r.loginSecretEntrySchema,exports.mailDraftAttachmentSchema=r.mailDraftAttachmentSchema,exports.mailDraftSchema=r.mailDraftSchema,exports.mailSignatureSchema=r.mailSignatureSchema,exports.mailboxAccountSchema=r.mailboxAccountSchema,exports.mailboxCursorSchema=r.mailboxCursorSchema,exports.mailboxEmailSchema=r.mailboxEmailSchema,exports.mailboxListResponseSchema=r.mailboxListResponseSchema,exports.mailboxSenderImageSchema=r.mailboxSenderImageSchema,exports.mailboxThreadDetailSchema=r.mailboxThreadDetailSchema,exports.mailboxThreadSchema=r.mailboxThreadSchema,exports.matchesRepositoryPattern=r.matchesRepositoryPattern,exports.mcpCatalogCategorySchema=r.mcpCatalogCategorySchema,exports.mcpCatalogEntrySchema=r.mcpCatalogEntrySchema,exports.mcpOAuthAttemptStartedSchema=r.mcpOAuthAttemptStartedSchema,exports.mcpOAuthSetupSchema=r.mcpOAuthSetupSchema,exports.mcpServerAuthTypeSchema=r.mcpServerAuthTypeSchema,exports.mcpServerStatusSchema=r.mcpServerStatusSchema,exports.mcpServerViewSchema=r.mcpServerViewSchema,exports.meetingBotDispatchRequestSchema=r.meetingBotDispatchRequestSchema,exports.meetingBotDispatchResponseSchema=r.meetingBotDispatchResponseSchema,exports.meetingBotNotificationSchema=r.meetingBotNotificationSchema,exports.meetingLinkedRecordSchema=r.meetingLinkedRecordSchema,exports.meetingParticipantRefSchema=r.meetingParticipantRefSchema,exports.meetingRecordingSchema=r.meetingRecordingSchema,exports.meetingSchema=r.meetingSchema,exports.meetingSiblingRefSchema=r.meetingSiblingRefSchema,exports.meetingTranscriptProvenanceSchema=r.meetingTranscriptProvenanceSchema,exports.meetingTranscriptResponseSchema=r.meetingTranscriptResponseSchema,exports.meetingTranscriptSegmentSchema=r.meetingTranscriptSegmentSchema,exports.meetingTranscriptSourceRefSchema=r.meetingTranscriptSourceRefSchema,exports.meetingsListResponseSchema=r.meetingsListResponseSchema,exports.memberSchema=r.memberSchema,exports.memberlessGroups=t.memberlessGroups,exports.memoryPageViewOf=memoryPageViewOf,exports.mentionReferenceSchema=r.mentionReferenceSchema,exports.mergeSessionInferencePatch=r.mergeSessionInferencePatch,exports.meteredUsd=meteredUsd,exports.metricComparePeriod=t.metricComparePeriod,exports.modelDefinitionOutputSchema=r.modelDefinitionOutputSchema,exports.modelDefinitionSchema=r.modelDefinitionSchema,exports.modelIdentitySchema=$,exports.modelReferenceOutputSchema=r.modelReferenceOutputSchema,exports.modelReferenceSchema=r.modelReferenceSchema,exports.moveWidensAudience=moveWidensAudience,exports.multiselect=multiselect,exports.mutationReceiptSchema=r.mutationReceiptSchema,exports.myPreferencesSchema=r.myPreferencesSchema,exports.nameSlug=nameSlug,exports.namedTargetSchema=Y,exports.nativeAgentUIPartIdMetadataKey=nativeAgentUIPartIdMetadataKey,exports.needsManageWhenUnattended=r.needsManageWhenUnattended,exports.newsBodySchema=r.newsBodySchema,exports.newsIndexSchema=r.newsIndexSchema,exports.normalizeCountrylessPhoneNumber=n.normalizeCountrylessPhoneNumber,exports.normalizeFilterRule=t.normalizeFilterRule,exports.normalizeForEdgeRpc=t.normalizeForEdgeRpc,exports.normalizeNewsLocale=r.normalizeNewsLocale,exports.normalizeOperator=t.normalizeOperator,exports.normalizePhoneNumber=n.normalizePhoneNumber,exports.normalizedMeetingTranscriptSchema=r.normalizedMeetingTranscriptSchema,exports.now=t.now,exports.number=number,exports.oauthAttemptStartedSchema=r.oauthAttemptStartedSchema,exports.object=object,exports.objectDefinitionOutputSchema=r.objectDefinitionOutputSchema,exports.objectImageSchema=B,exports.objectRecordOutputSchema=r.objectRecordOutputSchema,exports.openRequests=r.openRequests,exports.orderAgentSessionMessages=r.orderAgentSessionMessages,exports.packLayout=packLayout,exports.page=page,exports.pageAudienceSchema=r.pageAudienceSchema,exports.pageCompactor=pageCompactor,exports.pageReadSchema=r.pageReadSchema,exports.pageSummarySchema=r.pageSummarySchema,exports.pageTraitsOf=t.pageTraitsOf,exports.parseAgentDefinitionAccessRole=r.parseAgentDefinitionAccessRole,exports.parseAgentSessionAccessRole=r.parseAgentSessionAccessRole,exports.parseAttributeConfig=n.parseAttributeConfig,exports.parseAttributeConfigForCreate=n.parseAttributeConfigForCreate,exports.parseAttributeConfigForUpdate=n.parseAttributeConfigForUpdate,exports.parseBlockParameters=t.parseBlockParameters,exports.parseCountMode=r.parseCountMode,exports.parseDecisionLink=t.parseDecisionLink,exports.parseDeviceAccessRole=r.parseDeviceAccessRole,exports.parseDeviceChannelFrame=r.parseDeviceChannelFrame,exports.parseMergedAgentTrigger=r.parseMergedAgentTrigger,exports.parseNamedTarget=parseNamedTarget,exports.parseNativeAgentUIPartIdsMetadata=parseNativeAgentUIPartIdsMetadata,exports.parseNewsBody=r.parseNewsBody,exports.parseNewsIndex=r.parseNewsIndex,exports.parseNewsIntensity=r.parseNewsIntensity,exports.parseNewsTarget=r.parseNewsTarget,exports.parseOptionalCountMode=r.parseOptionalCountMode,exports.parsePageAccessRole=r.parsePageAccessRole,exports.parseQualifiedAttribute=t.parseQualifiedAttribute,exports.parseRecordAccessRole=r.parseRecordAccessRole,exports.parseRecordListScope=t.parseRecordListScope,exports.parseReference=r.parseReference,exports.parseResourceVisibility=t.parseResourceVisibility,exports.parseSchemaGroupPresentation=parseSchemaGroupPresentation,exports.parseSchemaOwner=parseSchemaOwner,exports.parseSchemaState=parseSchemaState,exports.parseServerFrame=r.parseServerFrame,exports.parseSkillSource=parseSkillSource,exports.parseToolGroupGrant=r.parseToolGroupGrant,exports.parseWherePipe=parseWherePipe,exports.parseWorkerFrame=r.parseWorkerFrame,exports.permissionFlagsSchema=r.permissionFlagsSchema,exports.permissionGrantSchema=r.permissionGrantSchema,exports.permissionSchema=r.permissionSchema,exports.phone=phone,exports.placeNew=placeNew,exports.preference=preference,exports.preferenceEntry=r.preferenceEntry,exports.preferenceEntrySchema=r.preferenceEntrySchema,exports.propertyAttributeSchema=n.propertyAttributeSchema,exports.propertyAttributeWireSchema=n.propertyAttributeWireSchema,exports.propertySchemaSchema=n.propertySchemaSchema,exports.propertySchemaWireSchema=n.propertySchemaWireSchema,exports.providerNameSchema=r.providerNameSchema,exports.publishBlockerSchema=r.publishBlockerSchema,exports.publishDraftOutputSchema=r.publishDraftOutputSchema,exports.publishedViewContentDefinitionSchema=t.publishedViewContentDefinitionSchema,exports.query=t.query,exports.quotaStateSchema=r.quotaStateSchema,exports.readArchitectPublication=r.readArchitectPublication,exports.readArtifactResult=readArtifactResult,exports.readAskQuestionsResult=r.readAskQuestionsResult,exports.readFormFieldValue=readFormFieldValue,exports.readGeneratedImageResult=readGeneratedImageResult,exports.readRunOriginMetadata=r.readRunOriginMetadata,exports.recentActivityEntryKey=r.recentActivityEntryKey,exports.recipientContactSchema=r.recipientContactSchema,exports.recipientIdentitySchema=r.recipientIdentitySchema,exports.recipientSuggestionSchema=r.recipientSuggestionSchema,exports.recordAggregatesSchema=r.recordAggregatesSchema,exports.recordAudienceSchema=r.recordAudienceSchema,exports.recordCollectionOutputSchema=r.recordCollectionOutputSchema,exports.recordDeletionCountSchema=r.recordDeletionCountSchema,exports.recordDriveChildSchema=r.recordDriveChildSchema,exports.recordDriveChildrenPageSchema=r.recordDriveChildrenPageSchema,exports.recordDriveSearchHitSchema=r.recordDriveSearchHitSchema,exports.recordDriveSearchResultSchema=r.recordDriveSearchResultSchema,exports.recordGraphEdgeSchema=r.recordGraphEdgeSchema,exports.recordGraphNodeKey=r.recordGraphNodeKey,exports.recordGraphNodeSchema=r.recordGraphNodeSchema,exports.recordGraphRequestSchema=r.recordGraphRequestSchema,exports.recordGraphResponseSchema=r.recordGraphResponseSchema,exports.recordIncomingReferenceSchema=r.recordIncomingReferenceSchema,exports.recordIncomingReferencesPageSchema=r.recordIncomingReferencesPageSchema,exports.recordLinksTab=recordLinksTab,exports.recordMeetingsCount=r.recordMeetingsCount,exports.recordOperationSchema=r.recordOperationSchema,exports.recordPurgeResultSchema=r.recordPurgeResultSchema,exports.recordQueryDefinitionSchema=t.recordQueryDefinitionSchema,exports.recordValuesCodec=r.recordValuesCodec,exports.recordsBulkCreateResultSchema=r.recordsBulkCreateResultSchema,exports.recordsBulkDeleteResultSchema=r.recordsBulkDeleteResultSchema,exports.recordsBulkUpdateResultSchema=r.recordsBulkUpdateResultSchema,exports.refineTrigger=r.refineTrigger,exports.refuseForeignKeys=n.refuseForeignKeys,exports.rejectUnknownAttributesOrThrow=n.rejectUnknownAttributesOrThrow,exports.relation=relation,exports.relationAcceptsObject=t.relationAcceptsObject,exports.relationOptionSchema=r.relationOptionSchema,exports.relationOptionsResponseSchema=r.relationOptionsResponseSchema,exports.relationProperty=relationProperty,exports.relationTargetsOf=t.relationTargetsOf,exports.renderLabelExpression=renderLabelExpression,exports.repairPageGrid=repairPageGrid,exports.replyDefaultsSchema=r.replyDefaultsSchema,exports.requestedCapabilities=r.requestedCapabilities,exports.requireRecordContentContext=t.requireRecordContentContext,exports.requireSingleRelationTarget=t.requireSingleRelationTarget,exports.resolveAppearance=r.resolveAppearance,exports.resolveCollectionActions=t.resolveCollectionActions,exports.resolveContentNavigation=t.resolveContentNavigation,exports.resolveEffectiveFilterType=t.resolveEffectiveFilterType,exports.resolveFieldRequired=resolveFieldRequired,exports.resolveIsWithinBounds=t.resolveIsWithinBounds,exports.resolveLocalized=r.resolveLocalized,exports.resolvePageGrid=resolvePageGrid,exports.resolvePropertyDefinitions=resolvePropertyDefinitions,exports.resolveTextPattern=n.resolveTextPattern,exports.resolveUtcDayBounds=t.resolveUtcDayBounds,exports.resolveViewContents=resolveViewContents,exports.resolvedRelationsBatchSchema=r.resolvedRelationsBatchSchema,exports.resourceGrant=r.resourceGrant,exports.resourceUsedBySchema=r.resourceUsedBySchema,exports.retryPolicyOutputSchema=r.retryPolicyOutputSchema,exports.retypeOptionsOutputSchema=r.retypeOptionsOutputSchema,exports.richtext=richtext,exports.roleSchema=r.roleSchema,exports.rollup=rollup,exports.routedMessageInferenceSchema=r.routedMessageInferenceSchema,exports.routineAudiencePreviewSchema=r.routineAudiencePreviewSchema,exports.routineAudienceSchema=r.routineAudienceSchema,exports.sameActions=r.sameActions,exports.sameStableValue=e.sameStableValue,exports.schemaDraftOutputSchema=r.schemaDraftOutputSchema,exports.schemaGroupKey=schemaGroupKey,exports.schemaGroupListSchema=r.schemaGroupListSchema,exports.schemaGroupSchema=r.schemaGroupSchema,exports.schemaStateEntrySchema=r.schemaStateEntrySchema,exports.schemaStateSchema=r.schemaStateSchema,exports.schemaStateSourcePayload=schemaStateSourcePayload,exports.secretEntrySchema=r.secretEntrySchema,exports.select=select,exports.selectOptionWriteSchema=n.selectOptionWriteSchema,exports.serializeCanonicalJson=e.serializeCanonicalJson,exports.serializeStableJson=e.serializeStableJson,exports.servedAsIsAttributeSchema=r.servedAsIsAttributeSchema,exports.sessionImageUsageSchema=r.sessionImageUsageSchema,exports.sessionInferenceOverridesOutputSchema=r.sessionInferenceOverridesOutputSchema,exports.sessionInferencePatchSchema=r.sessionInferencePatchSchema,exports.sessionStateSchema=r.sessionStateSchema,exports.setAgentSessionWorkPostureResultSchema=r.setAgentSessionWorkPostureResultSchema,exports.settleLayout=settleLayout,exports.sha256Hex=sha256Hex,exports.singleRelationTarget=t.singleRelationTarget,exports.slackConditionSchema=r.slackConditionSchema,exports.slackTriggerMatchSchema=r.slackTriggerMatchSchema,exports.snapWidth=snapWidth,exports.sortsSchema=t.sortsSchema,exports.sourcedAttributeOf=t.sourcedAttributeOf,exports.status=status,exports.statusGroupSchema=n.statusGroupSchema,exports.statusOptionWriteSchema=n.statusOptionWriteSchema,exports.storedContentDefinition=storedContentDefinition,exports.submitOutcomeSchema=r.submitOutcomeSchema,exports.syncBundleResultSchema=r.syncBundleResultSchema,exports.systemColumnFilterTarget=t.systemColumnFilterTarget,exports.tenantInvitationSchema=r.tenantInvitationSchema,exports.tenantSettingsResponseSchema=r.tenantSettingsResponseSchema,exports.tenantSettingsSchema=r.tenantSettingsSchema,exports.text=text,exports.toMultiValueOperator=t.toMultiValueOperator,exports.toUtcDayString=t.toUtcDayString,exports.today=t.today,exports.todoItemSchema=r.todoItemSchema,exports.todoPlanSchema=r.todoPlanSchema,exports.toolImpactSchema=r.toolImpactSchema,exports.triageResultSchema=r.triageResultSchema,exports.unaccent=unaccent,exports.user=user,exports.userProfileSchema=r.userProfileSchema,exports.utf8ByteLength=r.utf8ByteLength,exports.validateAttribute=n.validateAttribute,exports.validateAttributeName=t.validateAttributeName,exports.validateContentViewCatalogue=t.validateContentViewCatalogue,exports.validateDraft=n.validateDraft,exports.validateDraftOrThrow=n.validateDraftOrThrow,exports.validateLabelExpression=validateLabelExpression,exports.validateObject=n.validateObject,exports.validateObjectExpressions=validateObjectExpressions,exports.validateObjectImage=validateObjectImage,exports.validateObjectName=t.validateObjectName,exports.validateObjectOrThrow=n.validateObjectOrThrow,exports.validateQualifiedRule=t.validateQualifiedRule,exports.validateStoredViews=t.validateStoredViews,exports.validateViewName=t.validateViewName,exports.viewPreferenceAddressSchema=r.viewPreferenceAddressSchema,exports.viewReadSchema=r.viewReadSchema,exports.viewerAccessSchema=r.viewerAccessSchema,exports.widthStepConstraint=widthStepConstraint,exports.wireHiddenTypeConfigMask=n.wireHiddenTypeConfigMask,exports.wireOmittedConfigKeysFor=n.wireOmittedConfigKeysFor,exports.withPreferenceEntry=r.withPreferenceEntry,exports.withoutTrailingSlashes=r.withoutTrailingSlashes,exports.withoutUnknownOptionKeys=n.withoutUnknownOptionKeys,exports.workspaceViewAuthoring=workspaceViewAuthoring;
1654
+ `)){if(t===``)continue;let n=String.fromCodePoint(t.codePointAt(0)??0);e.set(n,t.slice(n.length))}return X=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 Ne={phone:`text`,currency:`number`},Pe={rename:[`kind`,`object`,`from`,`to`],phone:[`kind`,`object`,`attribute`,`to`,`defaultCountryCode`],currency:[`kind`,`object`,`attribute`,`to`,`currencyCode`]};function refuse(e,t,n){throw new i.ValidationError(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,n){if(t.isPlainRecord(n)||refuse(e,void 0,`Resolution ${e} must be an object`),n.kind===`rename`){assertKeys(e,n,Pe.rename),n.from===n.to&&refuse(e,`to`,`Resolution ${e} renames "${n.from}" to itself`);return}if(n.kind!==`retype`&&refuse(e,`kind`,`Unknown resolution kind ${JSON.stringify(n.kind)}: expected "rename" or "retype"`),n.to!==`phone`&&n.to!==`currency`&&refuse(e,`to`,`Unsupported retype to ${JSON.stringify(n.to)}: a push converts text → phone and number → currency only`),assertKeys(e,n,Pe[n.to]),n.to===`phone`){let t=n.defaultCountryCode;/^[A-Z]{3}$/.test(t)&&(0,o.isValidIso3)(t)||refuse(e,`defaultCountryCode`,`Resolution ${e}: "${t}" is not an ISO 3166-1 alpha-3 country code`);return}let r=n.currencyCode;/^[A-Z]{3}$/.test(r)&&(0,o.isValidCurrencyCode)(r)||refuse(e,`currencyCode`,`Resolution ${e}: "${r}" 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 i.ValidationError("`resolutions` must be an array",[{path:[`resolutions`],message:"`resolutions` must be an array"}]);if(e.length>100)throw new i.ValidationError(`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 r=e.trim();if(r===``)return{value:null};let i=(0,s.parsePhoneNumberFromString)(r,n.getIso2(t));if(!i?.isPossible()||i.country===void 0||i.ext!==void 0)return;let a=(0,o.getCountryByIso2)(i.country)?.iso3;if(a!==void 0)return{value:{countryCode:a,phoneNumber:n.normalizePhoneNumber(r,a)}}}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 Z=a.string().refine(e=>e.trim().length>0,`Must not be blank`),Fe=r.schemaStateAddressOf(Z),Ie=a.object({label:Z,pluralLabel:a.string().optional(),description:a.string().optional(),icon:t.iconNameSchema.optional(),color:t.colorIdSchema.optional(),image:Ae.optional(),labelExpression:a.string(),embeddingExpression:a.string().optional(),sealed:a.boolean().optional(),toleratedAttributes:a.array(Z).optional(),metadata:a.record(a.string(),a.unknown()).optional(),documentLayout:a.record(a.string(),a.unknown()).optional(),hierarchical:a.boolean().optional(),defaultDriveSort:a.enum(r.DOCUMENT_SORT_MODES).optional()}).strict();function failure(e){throw new i.ValidationError(e,[])}function definitionSchema(e){return a.custom(r=>{let i=a.record(a.string(),a.unknown()).parse(r);for(let t of e[0]===`view`?[`object`,`name`]:[`name`])Object.hasOwn(i,t)&&failure(`Invalid schema state: unrecognized definition key ${t}`);switch(e[0]){case`object`:Ie.parse(i);break;case`attribute`:{let e=a.enum(t.ATTRIBUTE_TYPES).parse(i.type);n.getAttributeConfigSchema(e).extend({type:a.literal(e),label:Z,required:a.boolean().optional(),unique:a.boolean().optional(),icon:t.iconNameSchema.optional()}).strict().parse(i);break}case`view`:{let{contents:n,...r}=i,o=a.array(Z).parse(n);new Set(o).size!==o.length&&failure(`Invalid schema state: duplicate content membership`),t.draftContentViewDefinitionSchema.parse({...r,object:e[1],name:e[2],contents:[]});break}case`content`:t.publishedViewContentDefinitionSchema.parse({...i,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=a.record(a.string(),a.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=a.object({modelVersion:a.literal(1),hashVersion:a.literal(1),tenant:Z,sourceFingerprint:a.string().regex(/^[a-f0-9]{64}$/),entries:a.array(a.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]}`),i.ValidationError.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})))}let r=/* @__PURE__ */ new Set,o=n.data.entries.map(e=>{let t=Fe.parse(a.object({address:a.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(),o=t[0]===`object`||t[0]===`attribute`?a.object({id:a.string().uuid(),updatedAt:a.string().datetime()}).strict():a.object({id:a.string().uuid(),revision:a.number().int().nonnegative()}).strict(),s=a.object({address:Fe,source:i,effective:i,status:a.enum([`source`,`runtime`,`copy`,`suppressed`]),sourceOwner:a.string().regex(u).nullable(),guard:o.nullable()}).strict().parse(e);return(s.status===`runtime`&&(s.source!==null||s.effective===null||s.sourceOwner!==null)||s.status===`suppressed`&&(t[0]!==`content`||s.source===null||s.effective!==null||s.guard===null)||s.status===`copy`&&(s.source===null||s.effective===null)||s.effective!==null&&s.guard===null||s.source===null&&s.effective===null)&&failure(`Invalid schema state: inconsistent status at ${n}`),{...s,sourceOwner:parseSchemaOwner(s.sourceOwner)}});return{...n.data,entries:o.sort(compareSchemaStateEntries)}}function parseSchemaState(e){try{return parseState(e)}catch(e){throw e instanceof a.ZodError?i.ValidationError.fromZodErrors(e.issues.map(e=>({path:e.path.map(String),message:e.message}))):e}}function diffSchemaState(t){let n=[];for(let r of[...t.entries].sort(compareSchemaStateEntries)){let t=r.source===null?`added`:r.status===`suppressed`?`suppressed`:r.effective===null?`removed`:e.canonicalStringify(r.source)===e.canonicalStringify(r.effective)?r.status===`copy`?`copied`:null:`changed`;t&&n.push({...r,change:t})}return{modelVersion:1,tenant:t.tenant,sourceFingerprint:t.sourceFingerprint,changes:n}}const Q=a.string().min(1),Le=a.union([a.object({objectName:Q,viewName:Q,contentName:Q.optional()}).strict().describe(`Full configuration of a view, or of one content when contentName is given`),a.object({objectId:Q}).strict().describe(`An object with its attributes, by id`),a.object({objectName:Q}).strict().describe(`An object with its attributes`),a.object({objectId:Q,attributeName:Q}).strict().describe(`One attribute's config, by name`),a.object({objectId:Q,attributeId:Q}).strict().describe(`One attribute's config, by id`),a.object({objectId:Q,recordId:Q}).strict().describe(`One sample record`)]);function parseNamedTarget(e){let t=Le.safeParse(e);if(!t.success)throw new i.ValidationError(`Invalid scoped target`,[{path:[`target`],message:`Expected exactly one named target branch`}]);return t.data}const Re=[`object`,`attribute`,`view`,`content`,`sample`],ze=a.object({mode:a.enum([`inline`,`window`]),interaction:a.enum([`static`,`interactive`]),size:a.enum([`compact`,`regular`]),aspectRatio:a.number().positive().finite().optional()}).strict(),Be=a.object({artifactId:a.string().min(1),revision:a.number().int().positive(),name:a.string().min(1),kind:a.string().min(1),retention:a.enum(f),display:ze}).strict();function readArtifactResult(e){let t=Be.safeParse(e);return t.success?t.data:null}const Ve=a.string().regex(/^[^/\s]+\/[^/\s]+$/),He=a.object({kind:a.literal(`generated-image`),artifact:a.unknown(),generation:a.object({attemptId:a.uuid(),requestedModelId:Ve,executedModelId:Ve.nullable(),format:a.enum(r.IMAGE_FORMATS),mimeType:a.enum([`image/png`,`image/jpeg`,`image/webp`])}).strict()}).strict();function readGeneratedImageResult(e){let t=He.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=r.parseReference(e);n.ok&&n.ref.kind===`record`&&t.add(n.ref.id)}}return[...t]}const Ue={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,Ue)}}return[...t.values()]}const We={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,We);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,We)}}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 $=a.object({provider:a.custom(e=>isNonBlankString(e)&&e.length<=200,{message:`must be a non-blank string of at most 200 characters`}),model:a.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}}}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 Ge=a.strictObject({model:$.optional(),routing:a.literal(`auto`).optional()}),Ke=a.strictObject({inApp:a.boolean()});function isActionableType(e){let t=r.DECISION_TYPE_KINDS[e];return t!==void 0&&r.isActionableDecisionKind(t.kind)}const qe=[preference(`workPosture`,{value:a.enum(r.USER_WORK_POSTURES),default:`auto`,audited:!0}),preference(`chat.default`,{value:Ge,default:{},audited:!0}),preference(`conversationSurface`,{value:a.enum(r.CONVERSATION_SURFACES),default:`panel`}),preference(`mailboxListMode`,{value:a.enum(r.MAILBOX_LIST_MODES),default:`threads`}),preference(`mailboxReaderLayout`,{value:a.enum(r.MAILBOX_READER_LAYOUTS),default:`panel`}),preference(`home`,{value:a.string().uuid().nullable(),default:null}),preference(`memory.learnFromEmail`,{value:a.boolean(),default:!0,audited:!0}),preference(`memory.shareWithTeam`,{value:a.boolean(),default:!0,audited:!0}),preference(`onboarding.completed`,{value:a.boolean(),default:!1,audited:!1}),preference(`decisions.seenAt`,{value:a.iso.datetime().nullable(),default:null}),preference(`decisions.delivery`,{value:Ke,default:{inApp:!0},parameter:`decision type`,parameters:Object.keys(r.DECISION_TYPE_KINDS),refine:(e,t)=>!e.inApp&&isActionableType(t)?`A "${t}" decision asks you to act: it is always shown in-app`:void 0})];exports.ACCESS_CAPABILITIES=r.ACCESS_CAPABILITIES,exports.ACCESS_LEVELS=r.ACCESS_LEVELS,exports.ACCESS_ROLES=r.ACCESS_ROLES,exports.ACTIONABLE_DECISION_KINDS=r.ACTIONABLE_DECISION_KINDS,exports.ACTOR_TYPES=r.ACTOR_TYPES,exports.AGENT_ASIDE_ANSWER_MAX_LENGTH=r.AGENT_ASIDE_ANSWER_MAX_LENGTH,exports.AGENT_ASIDE_HISTORY_LIMIT=r.AGENT_ASIDE_HISTORY_LIMIT,exports.AGENT_ASIDE_QUESTION_MAX_LENGTH=r.AGENT_ASIDE_QUESTION_MAX_LENGTH,exports.AGENT_AVATAR_EXPRESSIONS=r.AGENT_AVATAR_EXPRESSIONS,exports.AGENT_AVATAR_TYPES=r.AGENT_AVATAR_TYPES,exports.AGENT_MESSAGE_KIND=r.AGENT_MESSAGE_KIND,exports.AGENT_MESSAGE_SENDER_NAME_KEY=r.AGENT_MESSAGE_SENDER_NAME_KEY,exports.AGENT_NOTIFICATION_KIND=r.AGENT_NOTIFICATION_KIND,exports.AGENT_SESSION_ACCESS_ROLES=r.AGENT_SESSION_ACCESS_ROLES,exports.AGENT_SESSION_LIST_ORDERS=r.AGENT_SESSION_LIST_ORDERS,exports.AGENT_SESSION_ORIGINS=r.AGENT_SESSION_ORIGINS,exports.AGENT_SESSION_PROVENANCES=r.AGENT_SESSION_PROVENANCES,exports.AGENT_STARTERS_MAX=r.AGENT_STARTERS_MAX,exports.AGENT_STARTER_MAX_LENGTH=r.AGENT_STARTER_MAX_LENGTH,exports.AGENT_SYSTEM_PROMPT_MAX_LENGTH=r.AGENT_SYSTEM_PROMPT_MAX_LENGTH,exports.AGENT_TASK_KINDS=r.AGENT_TASK_KINDS,exports.AGENT_WAKE_KIND=r.AGENT_WAKE_KIND,exports.AGGREGATE_BUCKETS=r.AGGREGATE_BUCKETS,exports.AGGREGATE_MEASURES=r.AGGREGATE_MEASURES,exports.AI_MODEL_INPUT_MODALITIES=r.AI_MODEL_INPUT_MODALITIES,exports.AI_MODEL_PROFILE_LABELS=r.AI_MODEL_PROFILE_LABELS,exports.AI_MODEL_REASONING_MODES=r.AI_MODEL_REASONING_MODES,exports.ALLOWED_PROPERTY_TYPES=h,exports.ALL_CATALOG_TOOL_NAMES=r.ALL_CATALOG_TOOL_NAMES,exports.ALL_PIPES=_,exports.ALWAYS_KINDS=r.ALWAYS_KINDS,exports.APPEARANCE_FACETS=r.APPEARANCE_FACETS,exports.APPROVAL_FAMILY_TOOL_NAMES=r.APPROVAL_FAMILY_TOOL_NAMES,exports.ARCHITECT_PUBLICATION_KIND=r.ARCHITECT_PUBLICATION_KIND,exports.ARTIFACT_FILE_ROLES=p,exports.ARTIFACT_KINDS=d,exports.ARTIFACT_PREVIEW_EXTENSION=j,exports.ARTIFACT_RETENTIONS=f,exports.ASK_QUESTIONS_ANSWER_MAX_LENGTH=r.ASK_QUESTIONS_ANSWER_MAX_LENGTH,exports.ASK_QUESTIONS_ANSWER_MAX_VALUES=r.ASK_QUESTIONS_ANSWER_MAX_VALUES,exports.ASK_QUESTIONS_FILE_REF=r.ASK_QUESTIONS_FILE_REF,exports.ASK_QUESTIONS_MAX_ADDED_FILES=r.ASK_QUESTIONS_MAX_ADDED_FILES,exports.ASK_QUESTIONS_MAX_BATCH=r.ASK_QUESTIONS_MAX_BATCH,exports.ASK_QUESTIONS_TOOL_NAME=r.ASK_QUESTIONS_TOOL_NAME,exports.ATTACH_FILE_ACTIONS=r.ATTACH_FILE_ACTIONS,exports.ATTRIBUTE_FILTER_OPERATORS=t.ATTRIBUTE_FILTER_OPERATORS,exports.ATTRIBUTE_NAME_SCHEMA=t.ATTRIBUTE_NAME_SCHEMA,exports.ATTRIBUTE_TYPES=t.ATTRIBUTE_TYPES,exports.ATTRIBUTE_TYPE_DESCRIPTORS=t.ATTRIBUTE_TYPE_DESCRIPTORS,exports.AUDIT_ACTIONS=r.AUDIT_ACTIONS,exports.AUDIT_AGENT_SESSION_METADATA_KEY=r.AUDIT_AGENT_SESSION_METADATA_KEY,exports.AUDIT_RESOURCE_TYPES=r.AUDIT_RESOURCE_TYPES,exports.AccessDeniedError=i.AccessDeniedError,exports.AgentBuilder=r.AgentBuilder,exports.AggregateValidationError=i.AggregateValidationError,exports.AmbiguousSchemaChangeError=i.AmbiguousSchemaChangeError,exports.AttributeInUseError=i.AttributeInUseError,exports.AttributeNotFoundError=i.AttributeNotFoundError,exports.BILLING_MODES=r.BILLING_MODES,exports.BLOCK_CONTEXTS=D,exports.BLOCK_COUNTS=P,exports.BLOCK_INPUT_SECTIONS=_e,exports.BLOCK_PERIODS=w,exports.BROWSER_LAUNCH_TOOL_NAME=r.BROWSER_LAUNCH_TOOL_NAME,exports.BROWSER_TOOL_NAMES=r.BROWSER_TOOL_NAMES,exports.BUNDLE_LOCALES=r.BUNDLE_LOCALES,exports.BUNDLE_NAME_PATTERN=S,exports.BUNDLE_SETUP_PROMPT_MAX_LENGTH=r.BUNDLE_SETUP_PROMPT_MAX_LENGTH,exports.BYTE_UNIT_LABELS=m,exports.BlockContentBuilder=BlockContentBuilder,exports.BundleBuilder=BundleBuilder,exports.CATALOG_RESOURCES=r.CATALOG_RESOURCES,exports.CHART_BLOCK=B,exports.CHART_KINDS=I,exports.CHART_ORDERS=L,exports.CHAT_PROVIDERS=r.CHAT_PROVIDERS,exports.COMPUTED_RETURN_TYPES=n.COMPUTED_RETURN_TYPES,exports.CONNECTION_GRANT_PROVIDERS=r.CONNECTION_GRANT_PROVIDERS,exports.CONNECTION_STATUS_IDS=r.CONNECTION_STATUS_IDS,exports.CONNECTOR_PROVIDER_IDS=r.CONNECTOR_PROVIDER_IDS,exports.CONNECTOR_SCOPES=r.CONNECTOR_SCOPES,exports.CONTENT_PLACEMENT_CONTEXTS=O,exports.CONTINUATION_KEY_PATTERN=r.CONTINUATION_KEY_PATTERN,exports.CONVERSATION_SURFACES=r.CONVERSATION_SURFACES,exports.COPY_VERB_NAME=r.COPY_VERB_NAME,exports.CORE_BUNDLE_NAME=C,exports.CORE_PREFERENCES=qe,exports.CORE_RECORD_TOOL_NAMES=r.CORE_RECORD_TOOL_NAMES,exports.CORE_TOOL_NAMES=r.CORE_TOOL_NAMES,exports.COUNT_MODES=r.COUNT_MODES,exports.CUSTOM_LEVEL=r.CUSTOM_LEVEL,exports.ChartBuilder=ChartBuilder,exports.ChartQuery=ChartQuery,exports.ConcurrentModificationError=i.ConcurrentModificationError,exports.ContentBuilder=Y,exports.DECISIONS_BLOCK=H,exports.DECISION_INBOX_STATES=r.DECISION_INBOX_STATES,exports.DECISION_KINDS=r.DECISION_KINDS,exports.DECISION_LINE_MAX_LENGTH=r.DECISION_LINE_MAX_LENGTH,exports.DECISION_LINK_TARGET_TYPES=r.DECISION_LINK_TARGET_TYPES,exports.DECISION_LIST_STATES=r.DECISION_LIST_STATES,exports.DECISION_PILES=xe,exports.DECISION_READ_STATES=r.DECISION_READ_STATES,exports.DECISION_SENDER_KINDS=r.DECISION_SENDER_KINDS,exports.DECISION_SETTINGS_AREAS=r.DECISION_SETTINGS_AREAS,exports.DECISION_TITLE_MAX_LENGTH=r.DECISION_TITLE_MAX_LENGTH,exports.DECISION_TRANSFERS_KEY=r.DECISION_TRANSFERS_KEY,exports.DECISION_TYPES_V1=r.DECISION_TYPES_V1,exports.DECISION_TYPE_ACCESS_GRANTED=r.DECISION_TYPE_ACCESS_GRANTED,exports.DECISION_TYPE_AGENT_APPROVAL=r.DECISION_TYPE_AGENT_APPROVAL,exports.DECISION_TYPE_AGENT_MESSAGE=r.DECISION_TYPE_AGENT_MESSAGE,exports.DECISION_TYPE_AGENT_QUESTION=r.DECISION_TYPE_AGENT_QUESTION,exports.DECISION_TYPE_AGENT_REVIEW=r.DECISION_TYPE_AGENT_REVIEW,exports.DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED=r.DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,exports.DECISION_TYPE_AGENT_SETUP=r.DECISION_TYPE_AGENT_SETUP,exports.DECISION_TYPE_BUNDLE_SETUP=r.DECISION_TYPE_BUNDLE_SETUP,exports.DECISION_TYPE_CONNECTOR_CONNECTION_ERROR=r.DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,exports.DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED=r.DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,exports.DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED=r.DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED,exports.DECISION_TYPE_ENVIRONMENT_BUILD_FAILED=r.DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,exports.DECISION_TYPE_KINDS=r.DECISION_TYPE_KINDS,exports.DECISION_TYPE_PERSON=r.DECISION_TYPE_PERSON,exports.DECISION_TYPE_RECORD_ASSIGNED=r.DECISION_TYPE_RECORD_ASSIGNED,exports.DECISION_TYPE_RECORD_MENTIONED=r.DECISION_TYPE_RECORD_MENTIONED,exports.DECISION_WORK_STATES=r.DECISION_WORK_STATES,exports.DEFAULT_AGENT_EXECUTION_CONFIG=r.DEFAULT_AGENT_EXECUTION_CONFIG,exports.DEFAULT_AGENT_TOOL_GROUPS=r.DEFAULT_AGENT_TOOL_GROUPS,exports.DEFAULT_APPEARANCE_ICON=r.DEFAULT_APPEARANCE_ICON,exports.DEFAULT_APPROVAL_POLICY=r.DEFAULT_APPROVAL_POLICY,exports.DEFAULT_BLUEPRINT_TOOL_GROUPS=r.DEFAULT_BLUEPRINT_TOOL_GROUPS,exports.DEFAULT_CUSTOM_OBJECT_ICON=`database`,exports.DEFAULT_DAILY_ACTIVITY_DAYS=r.DEFAULT_DAILY_ACTIVITY_DAYS,exports.DEFAULT_DICTATION_LIMITS=r.DEFAULT_DICTATION_LIMITS,exports.DEFAULT_LABEL_FALLBACK=oe,exports.DEFAULT_LAYOUT_TRAITS=K,exports.DEFAULT_MEETING_BOT_DISPLAY_NAME=r.DEFAULT_MEETING_BOT_DISPLAY_NAME,exports.DEFAULT_TENANT_SETTINGS=r.DEFAULT_TENANT_SETTINGS,exports.DEFAULT_VALIDATION_MESSAGES=n.DEFAULT_VALIDATION_MESSAGES,exports.DEVICE_ACCESS_ROLES=r.DEVICE_ACCESS_ROLES,exports.DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS=r.DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS,exports.DEVICE_CHANNEL_IDLE_POLL_MS=r.DEVICE_CHANNEL_IDLE_POLL_MS,exports.DEVICE_CHANNEL_KEEPALIVE_MS=r.DEVICE_CHANNEL_KEEPALIVE_MS,exports.DEVICE_CHANNEL_MAX_FRAME_BYTES=r.DEVICE_CHANNEL_MAX_FRAME_BYTES,exports.DEVICE_CHANNEL_PATH=r.DEVICE_CHANNEL_PATH,exports.DEVICE_CHANNEL_PRESENCE_MS=r.DEVICE_CHANNEL_PRESENCE_MS,exports.DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION=r.DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION,exports.DEVICE_COMMAND_ERROR_CODES=r.DEVICE_COMMAND_ERROR_CODES,exports.DEVICE_DESKTOP_STATES=r.DEVICE_DESKTOP_STATES,exports.DEVICE_SHELLS=r.DEVICE_SHELLS,exports.DICTATION_FINALIZATION_TIMEOUT_MS=r.DICTATION_FINALIZATION_TIMEOUT_MS,exports.DICTATION_FRAME_BYTES=r.DICTATION_FRAME_BYTES,exports.DICTATION_MAX_BUFFER_BYTES=r.DICTATION_MAX_BUFFER_BYTES,exports.DICTATION_MAX_FRAME_BYTES=r.DICTATION_MAX_FRAME_BYTES,exports.DICTATION_MAX_TRANSCRIPT_BYTES=r.DICTATION_MAX_TRANSCRIPT_BYTES,exports.DICTATION_MODEL_ID=r.DICTATION_MODEL_ID,exports.DICTATION_PREPARATION_TIMEOUT_MS=r.DICTATION_PREPARATION_TIMEOUT_MS,exports.DICTATION_SAMPLE_RATE=r.DICTATION_SAMPLE_RATE,exports.DICTATION_TICKET_TTL_MS=r.DICTATION_TICKET_TTL_MS,exports.DISCARD_ARCHITECT_DRAFT_TOOL_NAME=r.DISCARD_ARCHITECT_DRAFT_TOOL_NAME,exports.DOCUMENT_KINDS=r.DOCUMENT_KINDS,exports.DOCUMENT_SORT_MODES=r.DOCUMENT_SORT_MODES,exports.DRAFT_CONFLICT_KINDS=Re,exports.DRAFT_WRITE_TOOL_NAMES=r.DRAFT_WRITE_TOOL_NAMES,exports.DecisionsBuilder=DecisionsBuilder,exports.DeviceChannelProtocolError=r.DeviceChannelProtocolError,exports.DeviceChannelServerFrameSchema=r.DeviceChannelServerFrameSchema,exports.DeviceChannelWorkerFrameSchema=r.DeviceChannelWorkerFrameSchema,exports.DeviceDesktopStatusSchema=r.DeviceDesktopStatusSchema,exports.DuplicateError=i.DuplicateError,exports.EMAIL_CATEGORY_DEFAULT_COLOR=r.EMAIL_CATEGORY_DEFAULT_COLOR,exports.EMAIL_CATEGORY_DEFAULT_ICON=r.EMAIL_CATEGORY_DEFAULT_ICON,exports.EMAIL_CATEGORY_DESCRIPTION_MAX=r.EMAIL_CATEGORY_DESCRIPTION_MAX,exports.EMAIL_CATEGORY_DESCRIPTION_MIN=r.EMAIL_CATEGORY_DESCRIPTION_MIN,exports.EMAIL_CATEGORY_LIMIT=r.EMAIL_CATEGORY_LIMIT,exports.EMAIL_CATEGORY_NAME_MAX=r.EMAIL_CATEGORY_NAME_MAX,exports.EMAIL_CATEGORY_SCOPES=r.EMAIL_CATEGORY_SCOPES,exports.EMAIL_CLASSIFIED_BY=r.EMAIL_CLASSIFIED_BY,exports.EMAIL_DIRECTIONS=r.EMAIL_DIRECTIONS,exports.EMAIL_PARTICIPANT_ROLES=r.EMAIL_PARTICIPANT_ROLES,exports.EMAIL_PROVIDERS=r.EMAIL_PROVIDERS,exports.EMAIL_RULE_SCOPES=r.EMAIL_RULE_SCOPES,exports.ENVIRONMENT_BUILD_LOG_STEPS=r.ENVIRONMENT_BUILD_LOG_STEPS,exports.ENVIRONMENT_BUILD_LOG_STEP_PREFIX=r.ENVIRONMENT_BUILD_LOG_STEP_PREFIX,exports.ENVIRONMENT_HARNESSES=r.ENVIRONMENT_HARNESSES,exports.ENVIRONMENT_HARNESS_SANDBOX_WORKDIR=r.ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,exports.ENVIRONMENT_HARNESS_WORKDIR=r.ENVIRONMENT_HARNESS_WORKDIR,exports.ENVIRONMENT_IMAGES=r.ENVIRONMENT_IMAGES,exports.ENVIRONMENT_MEMORY_GB_PER_VCPU=r.ENVIRONMENT_MEMORY_GB_PER_VCPU,exports.ENVIRONMENT_NAME_MAX_CHARS=r.ENVIRONMENT_NAME_MAX_CHARS,exports.ENVIRONMENT_NETWORK_ALLOW_MAX=r.ENVIRONMENT_NETWORK_ALLOW_MAX,exports.ENVIRONMENT_SCRIPT_MAX_BYTES=r.ENVIRONMENT_SCRIPT_MAX_BYTES,exports.ENVIRONMENT_SIZES=r.ENVIRONMENT_SIZES,exports.ENVIRONMENT_SIZE_VCPUS=r.ENVIRONMENT_SIZE_VCPUS,exports.ENVIRONMENT_STANDARDS_WORKDIR=r.ENVIRONMENT_STANDARDS_WORKDIR,exports.ENV_VAR_KEY_PATTERN=r.ENV_VAR_KEY_PATTERN,exports.ESTIMATED_COUNT_CAP=r.ESTIMATED_COUNT_CAP,exports.ExportTooLargeError=i.ExportTooLargeError,exports.FILE_LIST_MAX_IDS=r.FILE_LIST_MAX_IDS,exports.FILE_OCR_STATUSES=r.FILE_OCR_STATUSES,exports.FILE_URLS_MAX_IDS=r.FILE_URLS_MAX_IDS,exports.FORM_FORBIDDEN_ATTRIBUTE_TYPES=l,exports.FORM_STATUSES=r.FORM_STATUSES,exports.FORM_SUBMISSION_STATUSES=r.FORM_SUBMISSION_STATUSES,exports.ForbiddenError=i.ForbiddenError,exports.FormBuilder=FormBuilder,exports.FormRowBuilder=FormRowBuilder,exports.FormStepBuilder=FormStepBuilder,exports.GET_ARCHITECT_DRAFT_TOOL_NAME=r.GET_ARCHITECT_DRAFT_TOOL_NAME,exports.GITHUB_TRIGGER_CATALOG=r.GITHUB_TRIGGER_CATALOG,exports.GITHUB_TRIGGER_FAMILIES=r.GITHUB_TRIGGER_FAMILIES,exports.GRANT_ENABLES=r.GRANT_ENABLES,exports.GROUPABLE_ATTRIBUTE_TYPES=N,exports.GroupBuilder=je,exports.HARNESS_BRIDGE_PORT=r.HARNESS_BRIDGE_PORT,exports.HEADING_BLOCK=V,exports.HIERARCHY_ATTRIBUTE_IDS=t.HIERARCHY_ATTRIBUTE_IDS,exports.HIERARCHY_ATTRIBUTE_NAMES=t.HIERARCHY_ATTRIBUTE_NAMES,exports.HIERARCHY_CHILD_IDS_LIMIT=t.HIERARCHY_CHILD_IDS_LIMIT,exports.HITL_TOOL_NAMES=r.HITL_TOOL_NAMES,exports.HeadingBuilder=HeadingBuilder,exports.IMAGE_FORMATS=r.IMAGE_FORMATS,exports.IMAGE_SHAPES=r.IMAGE_SHAPES,exports.IMAGE_SOURCES=r.IMAGE_SOURCES,exports.INFERENCE_REASONING_OPTIONS=r.INFERENCE_REASONING_OPTIONS,exports.INFERENCE_ROUTING_MODES=r.INFERENCE_ROUTING_MODES,exports.INFERENCE_SPEEDS=r.INFERENCE_SPEEDS,exports.INVENTORY_LIMIT=30,exports.InvalidPermissionGrantError=i.InvalidPermissionGrantError,exports.LAST_RUN_ERROR_MAX_LENGTH=r.LAST_RUN_ERROR_MAX_LENGTH,exports.LINK_COOKIE_MAX_AGE_MS=r.LINK_COOKIE_MAX_AGE_MS,exports.LINK_DEFAULT_MS=r.LINK_DEFAULT_MS,exports.LINK_MAX_MS=r.LINK_MAX_MS,exports.LIST_VIEW_TAB_VISIBILITIES=t.LIST_VIEW_TAB_VISIBILITIES,exports.LOCATION_FILTER_PROPERTIES=t.LOCATION_FILTER_PROPERTIES,exports.LogoProviderUnavailableError=i.LogoProviderUnavailableError,exports.LogoSearchRateLimitedError=i.LogoSearchRateLimitedError,exports.MACHINE_KEY_KINDS=r.MACHINE_KEY_KINDS,exports.MAILBOX_ACCOUNT_VISIBILITIES=r.MAILBOX_ACCOUNT_VISIBILITIES,exports.MAILBOX_LIST_MODES=r.MAILBOX_LIST_MODES,exports.MAILBOX_READER_LAYOUTS=r.MAILBOX_READER_LAYOUTS,exports.MAIL_DRAFT_BODY_MAX_CHARS=r.MAIL_DRAFT_BODY_MAX_CHARS,exports.MAIL_DRAFT_MODES=r.MAIL_DRAFT_MODES,exports.MAIL_SIGNATURE_MAX_CHARS=r.MAIL_SIGNATURE_MAX_CHARS,exports.MAIL_SUBJECT_MAX_CHARS=r.MAIL_SUBJECT_MAX_CHARS,exports.MAX_AGGREGATE_GROUPS=r.MAX_AGGREGATE_GROUPS,exports.MAX_AGGREGATE_SERIES=r.MAX_AGGREGATE_SERIES,exports.MAX_CHART_SERIES=4,exports.MAX_DAILY_ACTIVITY_DAYS=r.MAX_DAILY_ACTIVITY_DAYS,exports.MAX_PRESET_DEPTH=5,exports.MAX_TODOS=r.MAX_TODOS,exports.MAX_TODO_DESCRIPTION_CHARS=r.MAX_TODO_DESCRIPTION_CHARS,exports.MAX_TODO_ID_CHARS=r.MAX_TODO_ID_CHARS,exports.MCP_SERVER_NAME_MAX_LENGTH=100,exports.MEASURABLE_ATTRIBUTE_TYPES=M,exports.MEETING_BOT_IMAGE=r.MEETING_BOT_IMAGE,exports.MEETING_BOT_IMAGE_BASE64_MAX_LENGTH=r.MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,exports.MEETING_BOT_MEMBER_CAP=r.MEETING_BOT_MEMBER_CAP,exports.MEETING_BOT_NO_CREDITS=r.MEETING_BOT_NO_CREDITS,exports.MEETING_BOT_SILENT_REASON=r.MEETING_BOT_SILENT_REASON,exports.MEETING_CONFERENCE_REQUESTS=r.MEETING_CONFERENCE_REQUESTS,exports.MEETING_PARTICIPANT_ROLES=r.MEETING_PARTICIPANT_ROLES,exports.MEETING_RESPONSES=r.MEETING_RESPONSES,exports.MEETING_RESPONSE_STATUSES=r.MEETING_RESPONSE_STATUSES,exports.MEETING_STATUSES=r.MEETING_STATUSES,exports.MEMORY_ATTRIBUTES=y,exports.MEMORY_PAGE_MAX_CHARS=4e3,exports.MEMORY_WORKSPACE_PROFILE=`workspace`,exports.MEMORY_WRITE_SOURCE=`memory`,exports.METERED_CHARGE_KINDS=le,exports.METERED_RATES_USD=ce,exports.METRIC_BLOCK=z,exports.MemoryNotFoundError=i.MemoryNotFoundError,exports.MetricBuilder=MetricBuilder,exports.MetricQuery=MetricQuery,exports.MultiRelationAttributeBuilder=MultiRelationAttributeBuilder,exports.NATIVE_AGENT_UI_PART_IDS_METADATA_KEY=c,exports.NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION=1,exports.NATIVE_BLOCKS=Se,exports.NATIVE_OBJECT_NAMES=t.NATIVE_OBJECT_NAMES,exports.NATIVE_TOOL_GROUPS=r.NATIVE_TOOL_GROUPS,exports.NATIVE_TOOL_GROUP_CATALOG=r.NATIVE_TOOL_GROUP_CATALOG,exports.NEWS_DEFAULT_DISPLAY_DAYS=r.NEWS_DEFAULT_DISPLAY_DAYS,exports.NEWS_DISPLAY_CAP_DAYS=r.NEWS_DISPLAY_CAP_DAYS,exports.NEWS_INDEX_MAX_ENTRIES=r.NEWS_INDEX_MAX_ENTRIES,exports.NEWS_INTENSITIES=r.NEWS_INTENSITIES,exports.NEWS_TARGET_KINDS=r.NEWS_TARGET_KINDS,exports.NO_ACCESS=r.NO_ACCESS,exports.NO_PREFERENCE_PARAMETER=``,exports.NO_RECORDING=r.NO_RECORDING,exports.NO_VALUE_OPERATORS=t.NO_VALUE_OPERATORS,exports.NonJsonValueError=e.NonJsonValueError,exports.NoopGeocodingAdapter=NoopGeocodingAdapter,exports.NotFoundError=i.NotFoundError,exports.NotImplementedError=i.NotImplementedError,exports.OAUTH_TICKET_TTL_MS=r.OAUTH_TICKET_TTL_MS,exports.OBJECT_GRANT=r.OBJECT_GRANT,exports.OBJECT_NAME_SCHEMA=t.OBJECT_NAME_SCHEMA,exports.OFFICIAL_SKILLS_REPO=b,exports.OPEN_TOOL_PART_STATES=r.OPEN_TOOL_PART_STATES,exports.OPERATION_MAX_STEPS=r.OPERATION_MAX_STEPS,exports.OPERATORS_BY_TYPE=t.OPERATORS_BY_TYPE,exports.ObjectBuilder=ObjectBuilder,exports.ObjectNotFoundError=i.ObjectNotFoundError,exports.ObjectReferencedError=i.ObjectReferencedError,exports.OrphanSystemAttributeError=i.OrphanSystemAttributeError,exports.PAGE_GRID_COLUMNS=t.PAGE_GRID_COLUMNS,exports.PASSAGE_FIELD_TYPES=F,exports.PASSED_AT=r.PASSED_AT,exports.PERMISSION_ACTIONS=r.PERMISSION_ACTIONS,exports.PERMISSION_CAPABILITIES=r.PERMISSION_CAPABILITIES,exports.PERMISSION_CATALOG=r.PERMISSION_CATALOG,exports.PERSISTENCE_OWNED_QUOTA_KEYS=r.PERSISTENCE_OWNED_QUOTA_KEYS,exports.PIPES_WITH_ARGS=ee,exports.PROVIDER_DRAFT_LABEL=r.PROVIDER_DRAFT_LABEL,exports.PROVIDER_NAMES=r.PROVIDER_NAMES,exports.PUBLIC_MAIL_DOMAINS=r.PUBLIC_MAIL_DOMAINS,exports.PageBuilder=q,exports.PageReferencedError=i.PageReferencedError,exports.ProtectedResourceError=i.ProtectedResourceError,exports.ProtectedRoleError=i.ProtectedRoleError,exports.QUALIFIED_SEPARATOR=t.QUALIFIED_SEPARATOR,exports.QUERY_OBJECT=T,exports.QUESTION_FAMILY_TOOL_NAMES=r.QUESTION_FAMILY_TOOL_NAMES,exports.QUOTA_KEYS=r.QUOTA_KEYS,exports.QueryTimeoutError=i.QueryTimeoutError,exports.RECENT_ACTIVITY_LEDGER_LIMIT=r.RECENT_ACTIVITY_LEDGER_LIMIT,exports.RECIPIENT_IDENTITIES_MAX=r.RECIPIENT_IDENTITIES_MAX,exports.RECORDING_OVERRIDES=r.RECORDING_OVERRIDES,exports.RECORDING_POLICIES=r.RECORDING_POLICIES,exports.RECORD_ACCESS_ROLES=r.RECORD_ACCESS_ROLES,exports.RECORD_ACCESS_SOURCES=r.RECORD_ACCESS_SOURCES,exports.RECORD_DRIVE_CURSOR_MAX_LENGTH=r.RECORD_DRIVE_CURSOR_MAX_LENGTH,exports.RECORD_DRIVE_PAGE_DEFAULT_LIMIT=r.RECORD_DRIVE_PAGE_DEFAULT_LIMIT,exports.RECORD_DRIVE_PAGE_MAX_LIMIT=r.RECORD_DRIVE_PAGE_MAX_LIMIT,exports.RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE=r.RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,exports.RECORD_GRAPH_MAX_LIMIT_PER_NODE=r.RECORD_GRAPH_MAX_LIMIT_PER_NODE,exports.RECORD_GRAPH_MAX_NODES=r.RECORD_GRAPH_MAX_NODES,exports.RECORD_IMAGE_MAX_BYTES=r.RECORD_IMAGE_MAX_BYTES,exports.RECORD_LINKS_BLOCK=U,exports.RECORD_LINKS_CONTENT=W,exports.RECORD_LIST_SCOPES=t.RECORD_LIST_SCOPES,exports.RECORD_OBJECT=`$record`,exports.REFERENCE_KINDS=r.REFERENCE_KINDS,exports.RELATION_TARGET_ANY=t.RELATION_TARGET_ANY,exports.REMOVED_OPERATOR_REPLACEMENTS=t.REMOVED_OPERATOR_REPLACEMENTS,exports.REPLY_MODES=r.REPLY_MODES,exports.REPOSITORY_WILDCARD=r.REPOSITORY_WILDCARD,exports.REQUEST_DESIGN_REVIEW_TOOL_NAME=r.REQUEST_DESIGN_REVIEW_TOOL_NAME,exports.REQUEST_SETUP_TOOL_NAME=r.REQUEST_SETUP_TOOL_NAME,exports.RESERVED_ATTRIBUTE_NAMES=t.RESERVED_ATTRIBUTE_NAMES,exports.RESERVED_OBJECT_NAMES=t.RESERVED_OBJECT_NAMES,exports.RESOURCE_GRANT_KINDS=r.RESOURCE_GRANT_KINDS,exports.RESOURCE_KIND_CATALOG=r.RESOURCE_KIND_CATALOG,exports.RESOURCE_VISIBILITIES=t.RESOURCE_VISIBILITIES,exports.ROUTING_PRICE_CEILINGS=r.ROUTING_PRICE_CEILINGS,exports.RUN_ORIGIN_METADATA_KEY=r.RUN_ORIGIN_METADATA_KEY,exports.RealtimeDeliveryError=i.RealtimeDeliveryError,exports.RealtimeRateLimitedError=i.RealtimeRateLimitedError,exports.RealtimeSubscriptionError=i.RealtimeSubscriptionError,exports.RecordNotFoundError=i.RecordNotFoundError,exports.RecordQuery=RecordQuery,exports.RecordReferencedError=i.RecordReferencedError,exports.RepositoryError=i.RepositoryError,exports.ReservedObjectNameError=i.ReservedObjectNameError,exports.RoleNotFoundError=i.RoleNotFoundError,exports.SCHEMA_ERROR_HTTP_STATUS=i.SCHEMA_ERROR_HTTP_STATUS,exports.SCHEMA_LIMITS=t.SCHEMA_LIMITS,exports.SCHEMA_OWNER_PATTERN=u,exports.SCHEMA_SOURCE_RETYPE_FROM=Ne,exports.SEND_VERB_NAME=r.SEND_VERB_NAME,exports.SESSION_INFERENCE_PATCH_KEYS=r.SESSION_INFERENCE_PATCH_KEYS,exports.SIMPLE_PIPES=g,exports.SIMPLE_PROPERTY_TYPES=n.SIMPLE_PROPERTY_TYPES,exports.SLACK_TRIGGER_CATALOG=r.SLACK_TRIGGER_CATALOG,exports.SLACK_TRIGGER_EVENTS=r.SLACK_TRIGGER_EVENTS,exports.SPEAKS_THROUGH_SEND_METADATA_KEY=r.SPEAKS_THROUGH_SEND_METADATA_KEY,exports.STANDARD_SCHEMA_VENDOR=de,exports.SURFACE_TOOL_NAMES=r.SURFACE_TOOL_NAMES,exports.SYNONYM_ALIASES=t.SYNONYM_ALIASES,exports.SYSTEM_ATTRIBUTES=t.SYSTEM_ATTRIBUTES,exports.SYSTEM_ATTRIBUTE_I18N_KEYS=t.SYSTEM_ATTRIBUTE_I18N_KEYS,exports.SYSTEM_EMAIL_CATEGORIES=r.SYSTEM_EMAIL_CATEGORIES,exports.SYSTEM_EMAIL_CATEGORY_NAMES=r.SYSTEM_EMAIL_CATEGORY_NAMES,exports.SYSTEM_FIELD_NAMES=t.SYSTEM_FIELD_NAMES,exports.SYSTEM_FILTER_ATTRIBUTE_TYPES=t.SYSTEM_FILTER_ATTRIBUTE_TYPES,exports.SYSTEM_PART_CODES=r.SYSTEM_PART_CODES,exports.SchemaError=i.SchemaError,exports.SchemaErrorCode=i.SchemaErrorCode,exports.SearchBackendError=i.SearchBackendError,exports.SearchPathNotIndexedError=i.SearchPathNotIndexedError,exports.SeriesBuilder=Te,exports.SeriesQuery=SeriesQuery,exports.SingleRelationAttributeBuilder=SingleRelationAttributeBuilder,exports.StorageError=i.StorageError,exports.SyncCascadeError=i.SyncCascadeError,exports.SyncConflictError=i.SyncConflictError,exports.SyncError=i.SyncError,exports.SystemEntityImmutableError=i.SystemEntityImmutableError,exports.TASK_DEMAND_LEVELS=r.TASK_DEMAND_LEVELS,exports.TENANT_INVITATION_DEFAULT_TTL_MS=r.TENANT_INVITATION_DEFAULT_TTL_MS,exports.TENANT_INVITATION_DELIVERY_STATUSES=r.TENANT_INVITATION_DELIVERY_STATUSES,exports.TENANT_INVITATION_MAX_TTL_MS=r.TENANT_INVITATION_MAX_TTL_MS,exports.TENANT_INVITATION_MIN_TTL_MS=r.TENANT_INVITATION_MIN_TTL_MS,exports.TENANT_INVITATION_RESEND_INTERVAL_MS=r.TENANT_INVITATION_RESEND_INTERVAL_MS,exports.TENANT_INVITATION_STATUSES=r.TENANT_INVITATION_STATUSES,exports.TEXT_FORMAT_PATTERNS=n.TEXT_FORMAT_PATTERNS,exports.TODO_PHASES=r.TODO_PHASES,exports.TODO_PLAN_STATUSES=r.TODO_PLAN_STATUSES,exports.TODO_STATUSES=r.TODO_STATUSES,exports.TOOL_APPROVAL_STATES=r.TOOL_APPROVAL_STATES,exports.TOOL_IMPACT_COUNT_KEYS=r.TOOL_IMPACT_COUNT_KEYS,exports.TRANSCRIPT_STATUSES=r.TRANSCRIPT_STATUSES,exports.TRIAGE_ACTIONS=r.TRIAGE_ACTIONS,exports.TRIGGER_EVENT_TYPES=r.TRIGGER_EVENT_TYPES,exports.TRIGGER_MAX_REENTRY=r.TRIGGER_MAX_REENTRY,exports.TURN_OUTCOMES=r.TURN_OUTCOMES,exports.ToolGroupGrantError=i.ToolGroupGrantError,exports.UNORDERED_CHART_KINDS=R,exports.UNSHAREABLE_OBJECT_NAMES=r.UNSHAREABLE_OBJECT_NAMES,exports.USAGE_MODALITIES=r.USAGE_MODALITIES,exports.USAGE_SCOPES=r.USAGE_SCOPES,exports.USD_AMOUNT_PATTERN=r.USD_AMOUNT_PATTERN,exports.USERS_RESOLVE_MAX_IDS=r.USERS_RESOLVE_MAX_IDS,exports.USER_STATUSES=r.USER_STATUSES,exports.USER_WORK_POSTURES=r.USER_WORK_POSTURES,exports.VERB_NAMES=r.VERB_NAMES,exports.ValidationError=i.ValidationError,exports.ViewBuilder=J,exports.WAKE_TURN_METADATA_KEY=r.WAKE_TURN_METADATA_KEY,exports.WAKE_TURN_SPOKE_METADATA_KEY=r.WAKE_TURN_SPOKE_METADATA_KEY,exports.WALLET_STATUSES=r.WALLET_STATUSES,exports.WIRE_OFFERED_BASE_CONFIG=n.WIRE_OFFERED_BASE_CONFIG,exports.WIRE_OMITTED_CONFIG_KEYS=n.WIRE_OMITTED_CONFIG_KEYS,exports.WorkspaceInvariantReason=i.WorkspaceInvariantReason,exports.accessGrantSchema=r.accessGrantSchema,exports.actorSchema=r.actorSchema,exports.agent=r.agent,exports.agentApprovalResolutionSchema=r.agentApprovalResolutionSchema,exports.agentAvatarFromMetadata=r.agentAvatarFromMetadata,exports.agentAvatarOutputSchema=r.agentAvatarOutputSchema,exports.agentAvatarSchema=r.agentAvatarSchema,exports.agentConversationOverviewSchema=r.agentConversationOverviewSchema,exports.agentDataChunk=r.agentDataChunk,exports.agentDefinitionActivitySchema=r.agentDefinitionActivitySchema,exports.agentDefinitionAudienceSchema=r.agentDefinitionAudienceSchema,exports.agentDefinitionDailyActivitySchema=r.agentDefinitionDailyActivitySchema,exports.agentDefinitionSchema=r.agentDefinitionSchema,exports.agentDisplayName=r.agentDisplayName,exports.agentExecutionConfigOutputSchema=r.agentExecutionConfigOutputSchema,exports.agentHistoryMessageSchema=r.agentHistoryMessageSchema,exports.agentInferencePreferencesOutputSchema=r.agentInferencePreferencesOutputSchema,exports.agentInferencePreferencesSchema=r.agentInferencePreferencesSchema,exports.agentMemoryViewSchema=r.agentMemoryViewSchema,exports.agentMessageAttachmentSchema=r.agentMessageAttachmentSchema,exports.agentMessagePartSchema=r.agentMessagePartSchema,exports.agentRequestAnswerSchema=r.agentRequestAnswerSchema,exports.agentRoleSchema=r.agentRoleSchema,exports.agentRolesSetResultSchema=r.agentRolesSetResultSchema,exports.agentRunSchema=r.agentRunSchema,exports.agentRunStatusSchema=r.agentRunStatusSchema,exports.agentScheduleOutputSchema=r.agentScheduleOutputSchema,exports.agentScheduleSchema=r.agentScheduleSchema,exports.agentSessionAudienceSchema=r.agentSessionAudienceSchema,exports.agentSessionDefinitionAppearanceSchema=r.agentSessionDefinitionAppearanceSchema,exports.agentSessionHistoryPageSchema=r.agentSessionHistoryPageSchema,exports.agentSessionInferenceOverridesInputSchema=r.agentSessionInferenceOverridesInputSchema,exports.agentSessionInferenceOverridesSchema=r.agentSessionInferenceOverridesSchema,exports.agentSessionLinkSchema=r.agentSessionLinkSchema,exports.agentSessionMessageOutputSchema=r.agentSessionMessageOutputSchema,exports.agentSessionMessageSchema=r.agentSessionMessageSchema,exports.agentSessionSchema=r.agentSessionSchema,exports.agentSetupResponseSchema=r.agentSetupResponseSchema,exports.agentStartersSchema=r.agentStartersSchema,exports.agentTodoPlanViewSchema=r.agentTodoPlanViewSchema,exports.agentToolCatalogSchema=r.agentToolCatalogSchema,exports.agentTriggerBaseSchema=r.agentTriggerBaseSchema,exports.agentTriggerDefinitionSchema=r.agentTriggerDefinitionSchema,exports.agentTriggerLastCallSchema=r.agentTriggerLastCallSchema,exports.agentTriggerPatchSchema=r.agentTriggerPatchSchema,exports.agentTriggerSchema=r.agentTriggerSchema,exports.agentUIValidationError=r.agentUIValidationError,exports.agentWakeSchema=r.agentWakeSchema,exports.agentWakeViewSchema=r.agentWakeViewSchema,exports.apiKeyRoleSchema=r.apiKeyRoleSchema,exports.apiKeySchema=r.apiKeySchema,exports.apiKeyWithSecretSchema=r.apiKeyWithSecretSchema,exports.applyPipes=applyPipes,exports.architectProjectionSchema=r.architectProjectionSchema,exports.artifactQuoteSchema=r.artifactQuoteSchema,exports.asTenantId=e.asTenantId,exports.asUserId=e.asUserId,exports.askQuestionsOutputSchema=r.askQuestionsOutputSchema,exports.assertBundleName=assertBundleName,exports.assertCustomAgentUIMessageChunk=r.assertCustomAgentUIMessageChunk,exports.assertSchemaSourceResolutions=assertSchemaSourceResolutions,exports.assertSessionState=r.assertSessionState,exports.attachedRecordDocumentSchema=r.attachedRecordDocumentSchema,exports.attributeConfigSchemas=n.attributeConfigSchemas,exports.attributeFilterTarget=t.attributeFilterTarget,exports.attributeInventory=attributeInventory,exports.attributeOutputSchema=r.attributeOutputSchema,exports.attributeSaveOutputSchema=r.attributeSaveOutputSchema,exports.auditChangeSchema=r.auditChangeSchema,exports.auditLogEntrySchema=r.auditLogEntrySchema,exports.availableBundleSummarySchema=r.availableBundleSummarySchema,exports.blockObjectInputs=blockObjectInputs,exports.browserProfilePreparationSchema=r.browserProfilePreparationSchema,exports.browserProfileViewSchema=r.browserProfileViewSchema,exports.buildPropertySchema=buildPropertySchema,exports.buildQualifiedAttribute=t.buildQualifiedAttribute,exports.builtBundleFromPieces=builtBundleFromPieces,exports.bundle=bundle,exports.bundleAddPlanSchema=r.bundleAddPlanSchema,exports.bundleAddResultSchema=r.bundleAddResultSchema,exports.bundleContentsSchema=r.bundleContentsSchema,exports.bundleListSchema=r.bundleListSchema,exports.bundleModeSchema=r.bundleModeSchema,exports.bundleOriginSchema=r.bundleOriginSchema,exports.bundlePieceKindSchema=r.bundlePieceKindSchema,exports.bundlePlanPieceSchema=r.bundlePlanPieceSchema,exports.bundleRemovalCascadeSchema=r.bundleRemovalCascadeSchema,exports.bundleRemovalPreviewSchema=r.bundleRemovalPreviewSchema,exports.bundleRemovalRowSchema=r.bundleRemovalRowSchema,exports.bundleStatusEntrySchema=r.bundleStatusEntrySchema,exports.bundleStatusSchema=r.bundleStatusSchema,exports.bundleSyncPreviewSchema=r.bundleSyncPreviewSchema,exports.bundleUpdateDependentSchema=r.bundleUpdateDependentSchema,exports.bundleUpdateGroupSchema=r.bundleUpdateGroupSchema,exports.bundleUpdatePieceKindSchema=r.bundleUpdatePieceKindSchema,exports.bundleUpdatePieceSchema=r.bundleUpdatePieceSchema,exports.bundleUpdatePlanSchema=r.bundleUpdatePlanSchema,exports.bundleUpdateReasonCodeSchema=r.bundleUpdateReasonCodeSchema,exports.bundleUpdateResultSchema=r.bundleUpdateResultSchema,exports.cancelAgentWakeResultSchema=r.cancelAgentWakeResultSchema,exports.canonicalStringify=e.canonicalStringify,exports.canonicalToolGroups=r.canonicalToolGroups,exports.canonicalizeFilterValue=t.canonicalizeFilterValue,exports.capabilityForResource=r.capabilityForResource,exports.capped=capped,exports.characterCount=t.characterCount,exports.checkbox=checkbox,exports.classificationRestoreSchema=r.classificationRestoreSchema,exports.classificationUndoSchema=r.classificationUndoSchema,exports.classifyEmailResultSchema=r.classifyEmailResultSchema,exports.classifyEmailSchema=r.classifyEmailSchema,exports.cliDefaultModelOf=r.cliDefaultModelOf,exports.cloudBrowserLiveViewSchema=r.cloudBrowserLiveViewSchema,exports.collectContentViewCatalogue=collectContentViewCatalogue,exports.collectQualifiedRuleIssues=t.collectQualifiedRuleIssues,exports.collectionContentSourceSchema=t.collectionContentSourceSchema,exports.collectionOutputSchema=r.collectionOutputSchema,exports.collectionPageSchema=r.collectionPageSchema,exports.collectionSourceAddress=collectionSourceAddress,exports.collectionSourceAddressOf=collectionSourceAddressOf,exports.colorIdSchema=t.colorIdSchema,exports.columnsSchema=t.columnsSchema,exports.compareAgentSessionMessages=r.compareAgentSessionMessages,exports.compareSchemaStateEntries=compareSchemaStateEntries,exports.compareVersions=r.compareVersions,exports.compiledHarnessModels=r.compiledHarnessModels,exports.computeByteMagnitude=computeByteMagnitude,exports.computeReconnectDelay=r.computeReconnectDelay,exports.computeRetryDelay=r.computeRetryDelay,exports.connectionCapabilitiesSchema=r.connectionCapabilitiesSchema,exports.connectionGrantKindsOf=r.connectionGrantKindsOf,exports.connectionSyncProgressSchema=r.connectionSyncProgressSchema,exports.connectionViewSchema=r.connectionViewSchema,exports.connectorProvidersResultSchema=r.connectorProvidersResultSchema,exports.connectorTriggerMatchSchema=r.connectorTriggerMatchSchema,exports.content=Me,exports.contentDefinition=contentDefinition,exports.contentExtensionRegistry=G,exports.contentViewDefinitionSchema=t.contentViewDefinitionSchema,exports.convertRetypedValue=convertRetypedValue,exports.createAgentTriggerResultSchema=r.createAgentTriggerResultSchema,exports.createAttributeValidator=n.createAttributeValidator,exports.createFormAttributeValidator=n.createFormAttributeValidator,exports.createStandardSchemaProps=createStandardSchemaProps,exports.criticConfigOutputSchema=r.criticConfigOutputSchema,exports.currency=currency,exports.currentActor=t.currentActor,exports.customDataChunkSchemas=r.customDataChunkSchemas,exports.date=date,exports.decisionArchiveAllResultSchema=r.decisionArchiveAllResultSchema,exports.decisionAttachmentSchema=r.decisionAttachmentSchema,exports.decisionCountsSchema=r.decisionCountsSchema,exports.decisionHandedBy=r.decisionHandedBy,exports.decisionLinkSchema=r.decisionLinkSchema,exports.decisionListResultSchema=r.decisionListResultSchema,exports.decisionRecipientSchema=r.decisionRecipientSchema,exports.decisionSchema=r.decisionSchema,exports.decisionSenderSchema=r.decisionSenderSchema,exports.decisionThreadKey=r.decisionThreadKey,exports.decisionTransferBy=r.decisionTransferBy,exports.decisionTransferTargetsSchema=r.decisionTransferTargetsSchema,exports.decisionTransferTo=r.decisionTransferTo,exports.decisionTransfersOf=r.decisionTransfersOf,exports.decisionWithRecipientSchema=r.decisionWithRecipientSchema,exports.declaredImageRequests=r.declaredImageRequests,exports.decodeAgentSessionListCursor=r.decodeAgentSessionListCursor,exports.decodeRecordValues=r.decodeRecordValues,exports.deepEqual=e.deepEqual,exports.defaultEnvironmentSchema=r.defaultEnvironmentSchema,exports.defaultPassagesTo=r.defaultPassagesTo,exports.deferredRetypeSchema=r.deferredRetypeSchema,exports.defineBlock=defineBlock,exports.deriveViewerAccess=r.deriveViewerAccess,exports.describeViewIssue=describeViewIssue,exports.detailView=detailView,exports.deviceAudienceSchema=r.deviceAudienceSchema,exports.deviceChannelUrl=r.deviceChannelUrl,exports.diffSchemaState=diffSchemaState,exports.displayAttributesSchema=t.displayAttributesSchema,exports.document=document,exports.documentFileSchema=r.documentFileSchema,exports.documentRecordOwnerPageSchema=r.documentRecordOwnerPageSchema,exports.documentRecordOwnerSchema=r.documentRecordOwnerSchema,exports.documentSchema=r.documentSchema,exports.documentWithSubCountSchema=r.documentWithSubCountSchema,exports.draftAppendOutputSchema=r.draftAppendOutputSchema,exports.draftCommandGuardSchema=r.draftCommandGuardSchema,exports.draftContentViewDefinitionSchema=t.draftContentViewDefinitionSchema,exports.driveFileSchema=r.driveFileSchema,exports.durableDateSchema=r.durableDateSchema,exports.edgePropertyFilterTarget=t.edgePropertyFilterTarget,exports.editAgentSessionMessageResultSchema=r.editAgentSessionMessageResultSchema,exports.effectivePermissionsSchema=r.effectivePermissionsSchema,exports.emailAttachmentMetaSchema=r.emailAttachmentMetaSchema,exports.emailCategoryCreateSchema=r.emailCategoryCreateSchema,exports.emailCategoryDeleteSchema=r.emailCategoryDeleteSchema,exports.emailCategorySchema=r.emailCategorySchema,exports.emailCategoryScopeQuerySchema=r.emailCategoryScopeQuerySchema,exports.emailCategoryUpdateSchema=r.emailCategoryUpdateSchema,exports.emailCategoryUsageSchema=r.emailCategoryUsageSchema,exports.emailParticipantRefSchema=r.emailParticipantRefSchema,exports.emailRuleScopeSchema=r.emailRuleScopeSchema,exports.emailSenderRuleSchema=r.emailSenderRuleSchema,exports.emailVerdictSchema=r.emailVerdictSchema,exports.encodeAgentSessionListCursor=r.encodeAgentSessionListCursor,exports.encodeRecordValues=r.encodeRecordValues,exports.envVarEntrySchema=r.envVarEntrySchema,exports.environmentBuildFailureSchema=r.environmentBuildFailureSchema,exports.environmentBuildStateSchema=r.environmentBuildStateSchema,exports.environmentDetailSchema=r.environmentDetailSchema,exports.environmentHarness=r.environmentHarness,exports.environmentHarnessSchema=r.environmentHarnessSchema,exports.environmentListSchema=r.environmentListSchema,exports.environmentNetworkPolicyOutputSchema=r.environmentNetworkPolicyOutputSchema,exports.environmentRepositorySourceSchema=r.environmentRepositorySourceSchema,exports.environmentSchema=r.environmentSchema,exports.environmentWorkdir=r.environmentWorkdir,exports.extractAttributeNames=extractAttributeNames,exports.extractAttributePaths=extractAttributePaths,exports.extractCurrencyFilterValue=t.extractCurrencyFilterValue,exports.extractFilterValue=t.extractFilterValue,exports.extractReadRecordIds=extractReadRecordIds,exports.extractTouchedArtifacts=extractTouchedArtifacts,exports.extractTouchedDocuments=extractTouchedDocuments,exports.extractTouchedRecords=extractTouchedRecords,exports.fileSchema=r.fileSchema,exports.fileUrlsResponseSchema=r.fileUrlsResponseSchema,exports.filterOperatorsOfType=t.filterOperatorsOfType,exports.filterStateSchema=t.filterStateSchema,exports.filterTargetsOf=t.filterTargetsOf,exports.findEnvironmentHarness=r.findEnvironmentHarness,exports.findGrantIssues=r.findGrantIssues,exports.findRelationAttribute=findRelationAttribute,exports.foldText=foldText,exports.form=form,exports.formDefinitionSchema=r.formDefinitionSchema,exports.formFieldFlatKey=formFieldFlatKey,exports.formFieldKey=formFieldKey,exports.formSlotSchema=r.formSlotSchema,exports.formStepSchema=r.formStepSchema,exports.formSubmissionSchema=r.formSubmissionSchema,exports.formatByteSize=formatByteSize,exports.formatDecisionLink=r.formatDecisionLink,exports.formatNewsTarget=r.formatNewsTarget,exports.formatPhoneForDisplay=n.formatPhoneForDisplay,exports.formatReference=r.formatReference,exports.formatSkillSource=formatSkillSource,exports.formatZodErrors=n.formatZodErrors,exports.formula=formula,exports.generateId=e.generateId,exports.getAttributeCapabilities=t.getAttributeCapabilities,exports.getAttributeConfigSchema=n.getAttributeConfigSchema,exports.getAttributeConfigWriteSchema=n.getAttributeConfigWriteSchema,exports.getAttributeFilterOperators=t.getAttributeFilterOperators,exports.getEditableLabelAttribute=getEditableLabelAttribute,exports.getHierarchyAttributes=t.getHierarchyAttributes,exports.getObjectSystemAttributes=t.getObjectSystemAttributes,exports.getOperatorPolarity=t.getOperatorPolarity,exports.getRollupFilterOperators=t.getRollupFilterOperators,exports.getSingleAttributeFromExpression=getSingleAttributeFromExpression,exports.getSlotFieldTargets=getSlotFieldTargets,exports.getSystemAttributeI18nKey=t.getSystemAttributeI18nKey,exports.getSystemAttributeList=t.getSystemAttributeList,exports.githubConditionSchema=r.githubConditionSchema,exports.githubTriggerMatchSchema=r.githubTriggerMatchSchema,exports.grantKindOf=r.grantKindOf,exports.group=group,exports.harnessModelChoices=r.harnessModelChoices,exports.harnessModelListSchema=r.harnessModelListSchema,exports.harnessModelOptionSchema=r.harnessModelOptionSchema,exports.hasLocale=r.hasLocale,exports.hasOptions=hasOptions,exports.hasTypeTrait=t.hasTypeTrait,exports.hasValueKind=t.hasValueKind,exports.hashBundlePieces=hashBundlePieces,exports.humanRequestId=r.humanRequestId,exports.humanRequestKind=r.humanRequestKind,exports.iconNameSchema=t.iconNameSchema,exports.imageLookupKindOf=imageLookupKindOf,exports.imageModelFormatDefect=r.imageModelFormatDefect,exports.imageModelIdSchema=r.imageModelIdSchema,exports.indexBy=e.indexBy,exports.inferInverseCardinality=t.inferInverseCardinality,exports.inferenceReasoningSchema=r.inferenceReasoningSchema,exports.inferenceRoutingSchema=r.inferenceRoutingSchema,exports.inferenceSpeedSchema=r.inferenceSpeedSchema,exports.input=E,exports.installedBundleSummarySchema=r.installedBundleSummarySchema,exports.invalidViewMessage=invalidViewMessage,exports.isActionableDecisionKind=r.isActionableDecisionKind,exports.isAgentMessageMetadata=r.isAgentMessageMetadata,exports.isAgentNotificationMetadata=r.isAgentNotificationMetadata,exports.isAgentUIDataName=r.isAgentUIDataName,exports.isAgentWakeMetadata=r.isAgentWakeMetadata,exports.isAgentWrittenAuditEntry=r.isAgentWrittenAuditEntry,exports.isArchitectPublicationMetadata=r.isArchitectPublicationMetadata,exports.isAttributeFilterable=t.isAttributeFilterable,exports.isAttributeGroupable=t.isAttributeGroupable,exports.isAttributeInUseError=i.isAttributeInUseError,exports.isAttributeKanbanGroupable=t.isAttributeKanbanGroupable,exports.isAttributeSearchable=t.isAttributeSearchable,exports.isAttributeSortable=t.isAttributeSortable,exports.isAwaitingHuman=r.isAwaitingHuman,exports.isBilateralRelation=t.isBilateralRelation,exports.isBlocking=r.isBlocking,exports.isBoardGrouping=isBoardGrouping,exports.isBundle=isBundle,exports.isCalendarDay=t.isCalendarDay,exports.isCatalogResource=r.isCatalogResource,exports.isCollectionContent=isCollectionContent,exports.isDynamicValue=t.isDynamicValue,exports.isEmptyValue=n.isEmptyValue,exports.isEnvironmentBuildLogStep=r.isEnvironmentBuildLogStep,exports.isEnvironmentHarnessId=r.isEnvironmentHarnessId,exports.isFormDefinition=r.isFormDefinition,exports.isFormFieldsRow=isFormFieldsRow,exports.isFormFreeFieldRef=isFormFreeFieldRef,exports.isFormHeadingRow=isFormHeadingRow,exports.isFormSeparatorRow=isFormSeparatorRow,exports.isFormSlotFieldRef=isFormSlotFieldRef,exports.isFormTextRow=isFormTextRow,exports.isHierarchyAttribute=t.isHierarchyAttribute,exports.isImageSource=r.isImageSource,exports.isLabelExpression=isLabelExpression,exports.isLocationFilterProperty=t.isLocationFilterProperty,exports.isLocationPartOperator=t.isLocationPartOperator,exports.isMailProvider=r.isMailProvider,exports.isMailboxListMode=r.isMailboxListMode,exports.isManagedSystemAttribute=t.isManagedSystemAttribute,exports.isMeteredChargeKind=isMeteredChargeKind,exports.isNativeObjectName=t.isNativeObjectName,exports.isNativeToolGroup=r.isNativeToolGroup,exports.isNoValueOperator=t.isNoValueOperator,exports.isNotFoundError=i.isNotFoundError,exports.isNullishOrEmptyString=n.isNullishOrEmptyString,exports.isObjectReferencedError=i.isObjectReferencedError,exports.isOpenToolPartState=r.isOpenToolPartState,exports.isPageHeading=isPageHeading,exports.isParkedOnHuman=r.isParkedOnHuman,exports.isPinnedSkillSource=isPinnedSkillSource,exports.isPlainRecord=t.isPlainRecord,exports.isProtectedResourceError=i.isProtectedResourceError,exports.isProviderDraft=r.isProviderDraft,exports.isPublicMailDomain=r.isPublicMailDomain,exports.isQuestionPart=r.isQuestionPart,exports.isRecordReferencedError=i.isRecordReferencedError,exports.isRelativeDateValue=t.isRelativeDateValue,exports.isReplyMode=r.isReplyMode,exports.isResourceGrant=r.isResourceGrant,exports.isRoutineActorMetadata=r.isRoutineActorMetadata,exports.isSchemaError=i.isSchemaError,exports.isSemver=r.isSemver,exports.isSessionInferencePatch=r.isSessionInferencePatch,exports.isSetMembershipOperator=t.isSetMembershipOperator,exports.isSkillRepository=isSkillRepository,exports.isStandardSchema=isStandardSchema,exports.isSystemEmailCategory=r.isSystemEmailCategory,exports.isSystemEmailCategoryName=r.isSystemEmailCategoryName,exports.isSystemPartCode=r.isSystemPartCode,exports.isTimeChart=isTimeChart,exports.isToolApprovalState=r.isToolApprovalState,exports.isToolImpactCountKey=r.isToolImpactCountKey,exports.isUniversalRelation=t.isUniversalRelation,exports.isValidationError=i.isValidationError,exports.isValueKindType=t.isValueKindType,exports.isValuePresent=n.isValuePresent,exports.isWherePipe=isWherePipe,exports.isWildcard=r.isWildcard,exports.judgePreferenceWrite=judgePreferenceWrite,exports.labelExpressionSchema=v,exports.lastPublicationSchema=r.lastPublicationSchema,exports.lastPublishErrorSchema=r.lastPublishErrorSchema,exports.layoutTraitsOf=layoutTraitsOf,exports.levelActions=r.levelActions,exports.levelFloor=r.levelFloor,exports.levelOf=r.levelOf,exports.linkedRecordRefSchema=r.linkedRecordRefSchema,exports.listView=listView,exports.locatePreference=locatePreference,exports.location=location,exports.locationPartFilterTarget=t.locationPartFilterTarget,exports.lockingSendCall=r.lockingSendCall,exports.loginSecretEntrySchema=r.loginSecretEntrySchema,exports.mailDraftAttachmentSchema=r.mailDraftAttachmentSchema,exports.mailDraftSchema=r.mailDraftSchema,exports.mailSignatureSchema=r.mailSignatureSchema,exports.mailboxAccountSchema=r.mailboxAccountSchema,exports.mailboxCursorSchema=r.mailboxCursorSchema,exports.mailboxEmailSchema=r.mailboxEmailSchema,exports.mailboxListResponseSchema=r.mailboxListResponseSchema,exports.mailboxSenderImageSchema=r.mailboxSenderImageSchema,exports.mailboxThreadDetailSchema=r.mailboxThreadDetailSchema,exports.mailboxThreadSchema=r.mailboxThreadSchema,exports.matchesRepositoryPattern=r.matchesRepositoryPattern,exports.mcpCatalogCategorySchema=r.mcpCatalogCategorySchema,exports.mcpCatalogEntrySchema=r.mcpCatalogEntrySchema,exports.mcpOAuthAttemptStartedSchema=r.mcpOAuthAttemptStartedSchema,exports.mcpOAuthSetupSchema=r.mcpOAuthSetupSchema,exports.mcpServerAuthTypeSchema=r.mcpServerAuthTypeSchema,exports.mcpServerStatusSchema=r.mcpServerStatusSchema,exports.mcpServerViewSchema=r.mcpServerViewSchema,exports.meetingBotDispatchRequestSchema=r.meetingBotDispatchRequestSchema,exports.meetingBotDispatchResponseSchema=r.meetingBotDispatchResponseSchema,exports.meetingBotNotificationSchema=r.meetingBotNotificationSchema,exports.meetingLinkedRecordSchema=r.meetingLinkedRecordSchema,exports.meetingParticipantRefSchema=r.meetingParticipantRefSchema,exports.meetingRecordingSchema=r.meetingRecordingSchema,exports.meetingSchema=r.meetingSchema,exports.meetingSiblingRefSchema=r.meetingSiblingRefSchema,exports.meetingTranscriptProvenanceSchema=r.meetingTranscriptProvenanceSchema,exports.meetingTranscriptResponseSchema=r.meetingTranscriptResponseSchema,exports.meetingTranscriptSegmentSchema=r.meetingTranscriptSegmentSchema,exports.meetingTranscriptSourceRefSchema=r.meetingTranscriptSourceRefSchema,exports.meetingsListResponseSchema=r.meetingsListResponseSchema,exports.memberSchema=r.memberSchema,exports.memoryPageViewOf=memoryPageViewOf,exports.mentionReferenceSchema=r.mentionReferenceSchema,exports.mergeSessionInferencePatch=r.mergeSessionInferencePatch,exports.meteredUsd=meteredUsd,exports.modelDefinitionOutputSchema=r.modelDefinitionOutputSchema,exports.modelDefinitionSchema=r.modelDefinitionSchema,exports.modelIdentitySchema=$,exports.modelReferenceOutputSchema=r.modelReferenceOutputSchema,exports.modelReferenceSchema=r.modelReferenceSchema,exports.moveWidensAudience=moveWidensAudience,exports.multiselect=multiselect,exports.mutationReceiptSchema=r.mutationReceiptSchema,exports.myPreferencesSchema=r.myPreferencesSchema,exports.nameSlug=nameSlug,exports.namedTargetSchema=Le,exports.nativeAgentUIPartIdMetadataKey=nativeAgentUIPartIdMetadataKey,exports.needsManageWhenUnattended=r.needsManageWhenUnattended,exports.newsBodySchema=r.newsBodySchema,exports.newsIndexSchema=r.newsIndexSchema,exports.normalizeCountrylessPhoneNumber=n.normalizeCountrylessPhoneNumber,exports.normalizeFilterRule=t.normalizeFilterRule,exports.normalizeForEdgeRpc=t.normalizeForEdgeRpc,exports.normalizeNewsLocale=r.normalizeNewsLocale,exports.normalizeOperator=t.normalizeOperator,exports.normalizePhoneNumber=n.normalizePhoneNumber,exports.normalizedMeetingTranscriptSchema=r.normalizedMeetingTranscriptSchema,exports.now=t.now,exports.number=number,exports.oauthAttemptStartedSchema=r.oauthAttemptStartedSchema,exports.object=object,exports.objectDefinitionOutputSchema=r.objectDefinitionOutputSchema,exports.objectImageSchema=Ae,exports.objectRecordOutputSchema=r.objectRecordOutputSchema,exports.openRequests=r.openRequests,exports.orderAgentSessionMessages=r.orderAgentSessionMessages,exports.page=page,exports.pageAudienceSchema=r.pageAudienceSchema,exports.pageFlowBlocks=pageFlowBlocks,exports.pageItems=pageItems,exports.pageReadSchema=r.pageReadSchema,exports.pageSummarySchema=r.pageSummarySchema,exports.pageTraitsOf=pageTraitsOf,exports.parseAgentDefinitionAccessRole=r.parseAgentDefinitionAccessRole,exports.parseAgentSessionAccessRole=r.parseAgentSessionAccessRole,exports.parseAttributeConfig=n.parseAttributeConfig,exports.parseAttributeConfigForCreate=n.parseAttributeConfigForCreate,exports.parseAttributeConfigForUpdate=n.parseAttributeConfigForUpdate,exports.parseBlockParameters=parseBlockParameters,exports.parseCountMode=r.parseCountMode,exports.parseDecisionLink=r.parseDecisionLink,exports.parseDeviceAccessRole=r.parseDeviceAccessRole,exports.parseDeviceChannelFrame=r.parseDeviceChannelFrame,exports.parseMergedAgentTrigger=r.parseMergedAgentTrigger,exports.parseNamedTarget=parseNamedTarget,exports.parseNativeAgentUIPartIdsMetadata=parseNativeAgentUIPartIdsMetadata,exports.parseNewsBody=r.parseNewsBody,exports.parseNewsIndex=r.parseNewsIndex,exports.parseNewsIntensity=r.parseNewsIntensity,exports.parseNewsTarget=r.parseNewsTarget,exports.parseOptionalCountMode=r.parseOptionalCountMode,exports.parsePageAccessRole=r.parsePageAccessRole,exports.parseQualifiedAttribute=t.parseQualifiedAttribute,exports.parseRecordAccessRole=r.parseRecordAccessRole,exports.parseRecordListScope=t.parseRecordListScope,exports.parseReference=r.parseReference,exports.parseResourceVisibility=t.parseResourceVisibility,exports.parseSchemaGroupPresentation=parseSchemaGroupPresentation,exports.parseSchemaOwner=parseSchemaOwner,exports.parseSchemaState=parseSchemaState,exports.parseServerFrame=r.parseServerFrame,exports.parseSkillSource=parseSkillSource,exports.parseToolGroupGrant=r.parseToolGroupGrant,exports.parseWherePipe=parseWherePipe,exports.parseWorkerFrame=r.parseWorkerFrame,exports.permissionFlagsSchema=r.permissionFlagsSchema,exports.permissionGrantSchema=r.permissionGrantSchema,exports.permissionSchema=r.permissionSchema,exports.phone=phone,exports.preference=preference,exports.preferenceEntry=r.preferenceEntry,exports.preferenceEntrySchema=r.preferenceEntrySchema,exports.propertyAttributeSchema=n.propertyAttributeSchema,exports.propertyAttributeWireSchema=n.propertyAttributeWireSchema,exports.propertySchemaSchema=n.propertySchemaSchema,exports.propertySchemaWireSchema=n.propertySchemaWireSchema,exports.providerNameSchema=r.providerNameSchema,exports.publishBlockerSchema=r.publishBlockerSchema,exports.publishDraftOutputSchema=r.publishDraftOutputSchema,exports.publishedViewContentDefinitionSchema=t.publishedViewContentDefinitionSchema,exports.query=query,exports.quotaStateSchema=r.quotaStateSchema,exports.readArchitectPublication=r.readArchitectPublication,exports.readArtifactResult=readArtifactResult,exports.readAskQuestionsResult=r.readAskQuestionsResult,exports.readFormFieldValue=readFormFieldValue,exports.readGeneratedImageResult=readGeneratedImageResult,exports.readRunOriginMetadata=r.readRunOriginMetadata,exports.recentActivityEntryKey=r.recentActivityEntryKey,exports.recipientContactSchema=r.recipientContactSchema,exports.recipientIdentitySchema=r.recipientIdentitySchema,exports.recipientSuggestionSchema=r.recipientSuggestionSchema,exports.recordAggregatesSchema=r.recordAggregatesSchema,exports.recordAudienceSchema=r.recordAudienceSchema,exports.recordCollectionOutputSchema=r.recordCollectionOutputSchema,exports.recordDeletionCountSchema=r.recordDeletionCountSchema,exports.recordDriveChildSchema=r.recordDriveChildSchema,exports.recordDriveChildrenPageSchema=r.recordDriveChildrenPageSchema,exports.recordDriveSearchHitSchema=r.recordDriveSearchHitSchema,exports.recordDriveSearchResultSchema=r.recordDriveSearchResultSchema,exports.recordGraphEdgeSchema=r.recordGraphEdgeSchema,exports.recordGraphNodeKey=r.recordGraphNodeKey,exports.recordGraphNodeSchema=r.recordGraphNodeSchema,exports.recordGraphRequestSchema=r.recordGraphRequestSchema,exports.recordGraphResponseSchema=r.recordGraphResponseSchema,exports.recordIncomingReferenceSchema=r.recordIncomingReferenceSchema,exports.recordIncomingReferencesPageSchema=r.recordIncomingReferencesPageSchema,exports.recordLinksTab=recordLinksTab,exports.recordMeetingsCount=r.recordMeetingsCount,exports.recordOperationSchema=r.recordOperationSchema,exports.recordPurgeResultSchema=r.recordPurgeResultSchema,exports.recordQueryDefinitionSchema=ge,exports.recordValuesCodec=r.recordValuesCodec,exports.recordsBulkCreateResultSchema=r.recordsBulkCreateResultSchema,exports.recordsBulkDeleteResultSchema=r.recordsBulkDeleteResultSchema,exports.recordsBulkUpdateResultSchema=r.recordsBulkUpdateResultSchema,exports.refineTrigger=r.refineTrigger,exports.refuseForeignKeys=n.refuseForeignKeys,exports.rejectUnknownAttributesOrThrow=n.rejectUnknownAttributesOrThrow,exports.relation=relation,exports.relationAcceptsObject=relationAcceptsObject,exports.relationOptionSchema=r.relationOptionSchema,exports.relationOptionsResponseSchema=r.relationOptionsResponseSchema,exports.relationProperty=relationProperty,exports.relationTargetsOf=t.relationTargetsOf,exports.renderLabelExpression=renderLabelExpression,exports.replyDefaultsSchema=r.replyDefaultsSchema,exports.requestedCapabilities=r.requestedCapabilities,exports.requireRecordContentContext=requireRecordContentContext,exports.requireSingleRelationTarget=requireSingleRelationTarget,exports.resolveAppearance=r.resolveAppearance,exports.resolveCollectionActions=resolveCollectionActions,exports.resolveContentNavigation=resolveContentNavigation,exports.resolveEffectiveFilterType=t.resolveEffectiveFilterType,exports.resolveFieldRequired=resolveFieldRequired,exports.resolveIsWithinBounds=t.resolveIsWithinBounds,exports.resolveLocalized=r.resolveLocalized,exports.resolvePropertyDefinitions=resolvePropertyDefinitions,exports.resolveTextPattern=n.resolveTextPattern,exports.resolveUtcDayBounds=t.resolveUtcDayBounds,exports.resolveViewContents=resolveViewContents,exports.resolvedRelationsBatchSchema=r.resolvedRelationsBatchSchema,exports.resourceGrant=r.resourceGrant,exports.resourceUsedBySchema=r.resourceUsedBySchema,exports.retryPolicyOutputSchema=r.retryPolicyOutputSchema,exports.retypeOptionsOutputSchema=r.retypeOptionsOutputSchema,exports.richtext=richtext,exports.roleSchema=r.roleSchema,exports.rollup=rollup,exports.routedMessageInferenceSchema=r.routedMessageInferenceSchema,exports.routineAudiencePreviewSchema=r.routineAudiencePreviewSchema,exports.routineAudienceSchema=r.routineAudienceSchema,exports.sameActions=r.sameActions,exports.sameStableValue=e.sameStableValue,exports.schemaDraftOutputSchema=r.schemaDraftOutputSchema,exports.schemaGroupKey=schemaGroupKey,exports.schemaGroupListSchema=r.schemaGroupListSchema,exports.schemaGroupSchema=r.schemaGroupSchema,exports.schemaStateEntrySchema=r.schemaStateEntrySchema,exports.schemaStateSchema=r.schemaStateSchema,exports.schemaStateSourcePayload=schemaStateSourcePayload,exports.secretEntrySchema=r.secretEntrySchema,exports.select=select,exports.selectOptionWriteSchema=n.selectOptionWriteSchema,exports.serializeCanonicalJson=e.serializeCanonicalJson,exports.serializeStableJson=e.serializeStableJson,exports.servedAsIsAttributeSchema=r.servedAsIsAttributeSchema,exports.sessionImageUsageSchema=r.sessionImageUsageSchema,exports.sessionInferenceOverridesOutputSchema=r.sessionInferenceOverridesOutputSchema,exports.sessionInferencePatchSchema=r.sessionInferencePatchSchema,exports.sessionStateSchema=r.sessionStateSchema,exports.setAgentSessionWorkPostureResultSchema=r.setAgentSessionWorkPostureResultSchema,exports.sha256Hex=sha256Hex,exports.singleRelationTarget=singleRelationTarget,exports.slackConditionSchema=r.slackConditionSchema,exports.slackTriggerMatchSchema=r.slackTriggerMatchSchema,exports.sortsSchema=t.sortsSchema,exports.sourcedAttributeOf=sourcedAttributeOf,exports.status=status,exports.statusGroupSchema=n.statusGroupSchema,exports.statusOptionWriteSchema=n.statusOptionWriteSchema,exports.storedContentDefinition=storedContentDefinition,exports.submitOutcomeSchema=r.submitOutcomeSchema,exports.syncBundleResultSchema=r.syncBundleResultSchema,exports.systemColumnFilterTarget=t.systemColumnFilterTarget,exports.tenantInvitationSchema=r.tenantInvitationSchema,exports.tenantSettingsResponseSchema=r.tenantSettingsResponseSchema,exports.tenantSettingsSchema=r.tenantSettingsSchema,exports.text=text,exports.toMultiValueOperator=t.toMultiValueOperator,exports.toUtcDayString=t.toUtcDayString,exports.today=t.today,exports.todoItemSchema=r.todoItemSchema,exports.todoPlanSchema=r.todoPlanSchema,exports.toolImpactSchema=r.toolImpactSchema,exports.triageResultSchema=r.triageResultSchema,exports.unaccent=unaccent,exports.user=user,exports.userProfileSchema=r.userProfileSchema,exports.utf8ByteLength=r.utf8ByteLength,exports.validateAttribute=n.validateAttribute,exports.validateAttributeName=t.validateAttributeName,exports.validateContentViewCatalogue=validateContentViewCatalogue,exports.validateDraft=n.validateDraft,exports.validateDraftOrThrow=n.validateDraftOrThrow,exports.validateLabelExpression=validateLabelExpression,exports.validateObject=n.validateObject,exports.validateObjectExpressions=validateObjectExpressions,exports.validateObjectImage=validateObjectImage,exports.validateObjectName=t.validateObjectName,exports.validateObjectOrThrow=n.validateObjectOrThrow,exports.validateQualifiedRule=t.validateQualifiedRule,exports.validateStoredViews=validateStoredViews,exports.validateViewName=t.validateViewName,exports.viewPreferenceAddressSchema=r.viewPreferenceAddressSchema,exports.viewReadSchema=r.viewReadSchema,exports.viewerAccessSchema=r.viewerAccessSchema,exports.wireHiddenTypeConfigMask=n.wireHiddenTypeConfigMask,exports.wireOmittedConfigKeysFor=n.wireOmittedConfigKeysFor,exports.withPreferenceEntry=r.withPreferenceEntry,exports.withoutTrailingSlashes=r.withoutTrailingSlashes,exports.withoutUnknownOptionKeys=n.withoutUnknownOptionKeys,exports.workspaceViewAuthoring=workspaceViewAuthoring;