@standards/schema 1.0.0-alpha.411 → 1.0.0-alpha.413
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{all-B606hHr3.mjs → all-B9epSh3g.mjs} +1 -1
- package/dist/{all-DaEjCqVl.d.ts → all-Cg6JJd0x.d.ts} +252 -252
- package/dist/{all-CuE-2q6r.d.mts → all-CkcnOJxd.d.mts} +252 -252
- package/dist/{all-C-dQf23e.js → all-iuPkq14_.js} +1 -1
- package/dist/api/index.d.mts +253 -97
- package/dist/api/index.d.ts +253 -97
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/{attributes-D4nvUmw6.d.ts → attributes-DW19xkoM.d.ts} +1 -1
- package/dist/{attributes-BgPCTw3y.d.mts → attributes-QBySx30F.d.mts} +1 -1
- package/dist/{checkbox-D11vN4kY.d.mts → checkbox-O7Onsazk.d.mts} +2 -2
- package/dist/{checkbox-DSAorFpa.d.ts → checkbox-u5bh3lq-.d.ts} +2 -2
- package/dist/{date-C29k_cah.d.ts → date-Bn8fqwCq.d.ts} +2 -2
- package/dist/{date-CtZVrU3Z.d.mts → date-D7JMxFgD.d.mts} +2 -2
- package/dist/{exceptions-CmMd5DGH.d.ts → exceptions-BHqt4Omx.d.mts} +3 -1
- package/dist/{exceptions-CmMd5DGH.d.mts → exceptions-BHqt4Omx.d.ts} +3 -1
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-CCt_hCgK.d.ts → index-BFKJEyq-.d.ts} +1 -1
- package/dist/{index-BgJpzGaC.d.ts → index-C8VygCbt.d.ts} +5553 -5317
- package/dist/{index-CK8JL1dT.d.ts → index-Cc3a-97k.d.ts} +5 -3
- package/dist/{index-CKiYLDTp.d.mts → index-CkhBfmkf.d.mts} +5553 -5317
- package/dist/{index-BDMlzqIt.d.ts → index-CtmwL85u.d.ts} +3 -3
- package/dist/{index-CcFQSyk9.d.mts → index-DR5eSskq.d.mts} +5 -3
- package/dist/{index-Ckbiu3d9.d.mts → index-D_IPqiMd.d.mts} +3 -3
- package/dist/{index-B6XCKKgD.d.mts → index-jE6uAt4g.d.mts} +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/local-path-CDRPquGU.js +2 -0
- package/dist/local-path-PA4ZoNKq.mjs +2 -0
- package/dist/{number-g88uoxhJ.d.mts → number-DGfXEFnt.d.mts} +2 -2
- package/dist/{number-BGpvOweC.d.ts → number-DiV9wvFE.d.ts} +2 -2
- package/dist/{objects-Ddi_zEYp.d.mts → objects-B4OojzI4.d.mts} +2 -2
- package/dist/{objects-Bt5C4BNO.d.ts → objects-Cvd1pe1g.d.ts} +2 -2
- package/dist/record-aggregates-BrLE4IsX.mjs +2 -0
- package/dist/record-aggregates-BuOfVWPJ.js +2 -0
- package/dist/record-operation-B4DrBgkp.mjs +2 -0
- package/dist/record-operation-BA4V9LB0.js +2 -0
- package/dist/{text-Dyxn_QlR.d.mts → text-8GklpZzL.d.mts} +2 -2
- package/dist/{text-CMMMIBIT.d.ts → text-Biomo4m8.d.ts} +2 -2
- package/dist/{utils-mBdW0zGZ.d.mts → utils-BT8u9zYO.d.mts} +11 -1
- package/dist/{utils-Du85J1nY.d.ts → utils-CChBw_3d.d.ts} +11 -1
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/core/index.d.mts +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/package.json +2 -2
- package/dist/record-aggregates-Cl_62tuW.mjs +0 -2
- package/dist/record-aggregates-eFfvQOzG.js +0 -2
- package/dist/record-operation-BI3fiAdX.js +0 -2
- package/dist/record-operation-C-IkTR6T.mjs +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
+
const e=`https://local-path.invalid`;function isLocalPath(t){if(!t.startsWith(`/`))return!1;let n=URL.parse(t,e);return n?.origin===e&&!n.pathname.startsWith(`//`)}Object.defineProperty(exports,"isLocalPath",{enumerable:!0,get:function(){return isLocalPath}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
+
const e=`https://local-path.invalid`;function isLocalPath(t){if(!t.startsWith(`/`))return!1;let n=URL.parse(t,e);return n?.origin===e&&!n.pathname.startsWith(`//`)}export{isLocalPath};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { NumberAttribute } from "./attributes-
|
|
3
|
-
import { ValidationMessages } from "./index-
|
|
2
|
+
import { NumberAttribute } from "./attributes-QBySx30F.mjs";
|
|
3
|
+
import { ValidationMessages } from "./index-jE6uAt4g.mjs";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/primitives/number.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { NumberAttribute } from "./attributes-
|
|
3
|
-
import { ValidationMessages } from "./index-
|
|
2
|
+
import { NumberAttribute } from "./attributes-DW19xkoM.js";
|
|
3
|
+
import { ValidationMessages } from "./index-BFKJEyq-.js";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/primitives/number.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Uuid } from "./utils-
|
|
3
|
-
import { Attribute } from "./attributes-
|
|
2
|
+
import { Uuid } from "./utils-BT8u9zYO.mjs";
|
|
3
|
+
import { Attribute } from "./attributes-QBySx30F.mjs";
|
|
4
4
|
import { ColorId, IconName } from "@standards/constants";
|
|
5
5
|
//#region src/types/appearance.d.ts
|
|
6
6
|
/** Icon used when neither the entity nor its parent has one. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Uuid } from "./utils-
|
|
3
|
-
import { Attribute } from "./attributes-
|
|
2
|
+
import { Uuid } from "./utils-CChBw_3d.js";
|
|
3
|
+
import { Attribute } from "./attributes-DW19xkoM.js";
|
|
4
4
|
import { ColorId, IconName } from "@standards/constants";
|
|
5
5
|
//#region src/types/appearance.d.ts
|
|
6
6
|
/** Icon used when neither the entity nor its parent has one. */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
+
const e=[`question`,`approval`,`review`,`handoff`,`report`,`fyi`],t=[`unread`,`read`,`archived`],n=[`none`,`pending`,`completed`,`dismissed`,`expired`],r=[`open`,`snoozed`,`closed`,`answered`,`withdrawn`,`expired`,`unread`,`read`,`archived`],i=[`record`,`session`,`document`,`agent`,`routine`,`page`,`email_thread`];function formatDecisionLink(e){return e.targetType===`record`?`record:${e.objectName??``}:${e.targetId}`:`${e.targetType}:${e.targetId}`}function parseDecisionLink(e){let[t,...n]=e.split(`:`);if(!i.includes(t??``))return null;let r=t;if(r===`record`){let[e,t]=n;return n.length===2&&e&&t?{targetType:r,targetId:t,objectName:e}:null}let a=n.join(`:`);return a?{targetType:r,targetId:a}:null}function decisionThreadKey(e){return`decision:${e}`}const a=120,o=200,s=`agent.question`,c=`agent.approval`,l=`agent.review`,u=`agent.setup`,d=`agent.routine_run.failed`,f=`agent.message`,p=`connector.connection.reauth_required`,m=`connector.connection.error`,h=`record.assigned`,g=`record.mentioned`,_=`access.granted`,v=`environment.build.failed`,y=`person.decision`,b=`bundle.setup`,x=[s,c,l,u,d,f,p,m,h,g,_,v,y,b],S=[`question`,`approval`,`review`,`handoff`];function isActionableDecisionKind(e){return S.includes(e)}const C=[`agents`,`connectors`,`assignment`,`mentions`,`sharing`],w={[s]:{kind:`question`,area:null},[c]:{kind:`approval`,area:null},[l]:{kind:`review`,area:null},[u]:{kind:`handoff`,area:null},[d]:{kind:`question`,area:`agents`},[f]:{kind:`report`,area:`agents`},[p]:{kind:`handoff`,area:`connectors`},[m]:{kind:`handoff`,area:`connectors`},[h]:{kind:`fyi`,area:`assignment`},[g]:{kind:`fyi`,area:`mentions`},[_]:{kind:`fyi`,area:`sharing`},[v]:{kind:`fyi`,area:`agents`},[y]:{kind:`question`,area:null},[b]:{kind:`handoff`,area:null}},T=`transfers`;function isDecisionTransfer(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.fromActorId==`string`&&typeof t.toActorId==`string`&&typeof t.toLabel==`string`&&typeof t.at==`string`}function decisionTransfersOf(e){let t=e.payload[T];return Array.isArray(t)?t.filter(isDecisionTransfer):[]}function decisionTransferBy(e,t){return decisionTransfersOf(e).filter(e=>e.fromActorId===t).at(-1)}const E=[`open`,`answered`,`withdrawn`,`expired`,`info`],D={createdAt:`createdAt`,updatedAt:`updatedAt`,createdBy:`createdBy`,lastUpdatedBy:`lastUpdatedBy`,attachments:`attachments`,parentId:`parentId`,childIds:`childIds`};function getSystemAttributeI18nKey(e){return D[e]}const O={createdAt:{id:`system:createdAt`,name:`createdAt`,label:`Created time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was created`},updatedAt:{id:`system:updatedAt`,name:`updatedAt`,label:`Last edited time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was last modified`},createdBy:{id:`system:createdBy`,name:`createdBy`,label:`Created by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who created this record`},lastUpdatedBy:{id:`system:lastUpdatedBy`,name:`lastUpdatedBy`,label:`Last edited by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who last modified this record`},attachments:{id:`system:attachments`,name:`attachments`,label:`Attachments`,type:`document`,required:!1,system:!0,hidden:!0,icon:`paperclip`,description:`Free-form document attachments`}};function getSystemAttributeList(){return Object.values(O)}function isManagedSystemAttribute(e){return e.id?.startsWith(`system:`)??!1}const k=[`hierarchy:parentId`,`hierarchy:childIds`],A=new Set([`parentId`,`childIds`]),j=6;function getHierarchyAttributes(e){if(!e.hierarchical)return[];let t=[{object:e.name}];return[{id:k[0],name:`parentId`,label:`Parent`,type:`relation`,cardinality:`one`,targets:t,required:!1,system:!0,icon:`corner-left-up`,description:`The record this one sits under`},{id:k[1],name:`childIds`,label:`Sub-items`,type:`relation`,cardinality:`many`,targets:t,required:!1,system:!0,icon:`corner-down-right`,description:`The records that sit under this one`}]}function isHierarchyAttribute(e){return e.id?.startsWith(`hierarchy:`)??!1}function getObjectSystemAttributes(e){return[...getSystemAttributeList(),...getHierarchyAttributes(e)]}const M=100,N=[`count`,`sum`,`avg`,`min`,`max`],P=[`day`,`week`,`month`,`quarter`,`year`];export{S as ACTIONABLE_DECISION_KINDS,P as AGGREGATE_BUCKETS,N as AGGREGATE_MEASURES,t as DECISION_INBOX_STATES,e as DECISION_KINDS,o as DECISION_LINE_MAX_LENGTH,i as DECISION_LINK_TARGET_TYPES,r as DECISION_LIST_STATES,E as DECISION_READ_STATES,C as DECISION_SETTINGS_AREAS,a as DECISION_TITLE_MAX_LENGTH,T as DECISION_TRANSFERS_KEY,x as DECISION_TYPES_V1,_ as DECISION_TYPE_ACCESS_GRANTED,c as DECISION_TYPE_AGENT_APPROVAL,f as DECISION_TYPE_AGENT_MESSAGE,s as DECISION_TYPE_AGENT_QUESTION,l as DECISION_TYPE_AGENT_REVIEW,d as DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,u as DECISION_TYPE_AGENT_SETUP,b as DECISION_TYPE_BUNDLE_SETUP,m as DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,p as DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,v as DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,w as DECISION_TYPE_KINDS,y as DECISION_TYPE_PERSON,h as DECISION_TYPE_RECORD_ASSIGNED,g as DECISION_TYPE_RECORD_MENTIONED,n as DECISION_WORK_STATES,k as HIERARCHY_ATTRIBUTE_IDS,A as HIERARCHY_ATTRIBUTE_NAMES,j as HIERARCHY_CHILD_IDS_LIMIT,M as MAX_AGGREGATE_GROUPS,O as SYSTEM_ATTRIBUTES,D as SYSTEM_ATTRIBUTE_I18N_KEYS,decisionThreadKey,decisionTransferBy,decisionTransfersOf,formatDecisionLink,getHierarchyAttributes,getObjectSystemAttributes,getSystemAttributeI18nKey,getSystemAttributeList,isActionableDecisionKind,isHierarchyAttribute,isManagedSystemAttribute,parseDecisionLink};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
+
const e=[`question`,`approval`,`review`,`handoff`,`report`,`fyi`],t=[`unread`,`read`,`archived`],n=[`none`,`pending`,`completed`,`dismissed`,`expired`],r=[`open`,`snoozed`,`closed`,`answered`,`withdrawn`,`expired`,`unread`,`read`,`archived`],i=[`record`,`session`,`document`,`agent`,`routine`,`page`,`email_thread`];function formatDecisionLink(e){return e.targetType===`record`?`record:${e.objectName??``}:${e.targetId}`:`${e.targetType}:${e.targetId}`}function parseDecisionLink(e){let[t,...n]=e.split(`:`);if(!i.includes(t??``))return null;let r=t;if(r===`record`){let[e,t]=n;return n.length===2&&e&&t?{targetType:r,targetId:t,objectName:e}:null}let a=n.join(`:`);return a?{targetType:r,targetId:a}:null}function decisionThreadKey(e){return`decision:${e}`}const a=`agent.question`,o=`agent.approval`,s=`agent.review`,c=`agent.setup`,l=`agent.routine_run.failed`,u=`agent.message`,d=`connector.connection.reauth_required`,f=`connector.connection.error`,p=`record.assigned`,m=`record.mentioned`,h=`access.granted`,g=`environment.build.failed`,_=`person.decision`,v=`bundle.setup`,y=[a,o,s,c,l,u,d,f,p,m,h,g,_,v],b=[`question`,`approval`,`review`,`handoff`];function isActionableDecisionKind(e){return b.includes(e)}const x=[`agents`,`connectors`,`assignment`,`mentions`,`sharing`],S={[a]:{kind:`question`,area:null},[o]:{kind:`approval`,area:null},[s]:{kind:`review`,area:null},[c]:{kind:`handoff`,area:null},[l]:{kind:`question`,area:`agents`},[u]:{kind:`report`,area:`agents`},[d]:{kind:`handoff`,area:`connectors`},[f]:{kind:`handoff`,area:`connectors`},[p]:{kind:`fyi`,area:`assignment`},[m]:{kind:`fyi`,area:`mentions`},[h]:{kind:`fyi`,area:`sharing`},[g]:{kind:`fyi`,area:`agents`},[_]:{kind:`question`,area:null},[v]:{kind:`handoff`,area:null}},C=`transfers`;function isDecisionTransfer(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.fromActorId==`string`&&typeof t.toActorId==`string`&&typeof t.toLabel==`string`&&typeof t.at==`string`}function decisionTransfersOf(e){let t=e.payload[C];return Array.isArray(t)?t.filter(isDecisionTransfer):[]}function decisionTransferBy(e,t){return decisionTransfersOf(e).filter(e=>e.fromActorId===t).at(-1)}const w=[`open`,`answered`,`withdrawn`,`expired`,`info`],T={createdAt:`createdAt`,updatedAt:`updatedAt`,createdBy:`createdBy`,lastUpdatedBy:`lastUpdatedBy`,attachments:`attachments`,parentId:`parentId`,childIds:`childIds`};function getSystemAttributeI18nKey(e){return T[e]}const E={createdAt:{id:`system:createdAt`,name:`createdAt`,label:`Created time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was created`},updatedAt:{id:`system:updatedAt`,name:`updatedAt`,label:`Last edited time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was last modified`},createdBy:{id:`system:createdBy`,name:`createdBy`,label:`Created by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who created this record`},lastUpdatedBy:{id:`system:lastUpdatedBy`,name:`lastUpdatedBy`,label:`Last edited by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who last modified this record`},attachments:{id:`system:attachments`,name:`attachments`,label:`Attachments`,type:`document`,required:!1,system:!0,hidden:!0,icon:`paperclip`,description:`Free-form document attachments`}};function getSystemAttributeList(){return Object.values(E)}function isManagedSystemAttribute(e){return e.id?.startsWith(`system:`)??!1}const D=[`hierarchy:parentId`,`hierarchy:childIds`],O=new Set([`parentId`,`childIds`]);function getHierarchyAttributes(e){if(!e.hierarchical)return[];let t=[{object:e.name}];return[{id:D[0],name:`parentId`,label:`Parent`,type:`relation`,cardinality:`one`,targets:t,required:!1,system:!0,icon:`corner-left-up`,description:`The record this one sits under`},{id:D[1],name:`childIds`,label:`Sub-items`,type:`relation`,cardinality:`many`,targets:t,required:!1,system:!0,icon:`corner-down-right`,description:`The records that sit under this one`}]}function isHierarchyAttribute(e){return e.id?.startsWith(`hierarchy:`)??!1}function getObjectSystemAttributes(e){return[...getSystemAttributeList(),...getHierarchyAttributes(e)]}const k=[`count`,`sum`,`avg`,`min`,`max`],A=[`day`,`week`,`month`,`quarter`,`year`];Object.defineProperty(exports,"ACTIONABLE_DECISION_KINDS",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"AGGREGATE_BUCKETS",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"AGGREGATE_MEASURES",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"DECISION_INBOX_STATES",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"DECISION_KINDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"DECISION_LINE_MAX_LENGTH",{enumerable:!0,get:function(){return 200}}),Object.defineProperty(exports,"DECISION_LINK_TARGET_TYPES",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"DECISION_LIST_STATES",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"DECISION_READ_STATES",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"DECISION_SETTINGS_AREAS",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"DECISION_TITLE_MAX_LENGTH",{enumerable:!0,get:function(){return 120}}),Object.defineProperty(exports,"DECISION_TRANSFERS_KEY",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"DECISION_TYPES_V1",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"DECISION_TYPE_ACCESS_GRANTED",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"DECISION_TYPE_AGENT_APPROVAL",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"DECISION_TYPE_AGENT_MESSAGE",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"DECISION_TYPE_AGENT_QUESTION",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"DECISION_TYPE_AGENT_REVIEW",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"DECISION_TYPE_AGENT_SETUP",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"DECISION_TYPE_BUNDLE_SETUP",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"DECISION_TYPE_CONNECTOR_CONNECTION_ERROR",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"DECISION_TYPE_ENVIRONMENT_BUILD_FAILED",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"DECISION_TYPE_KINDS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"DECISION_TYPE_PERSON",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"DECISION_TYPE_RECORD_ASSIGNED",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"DECISION_TYPE_RECORD_MENTIONED",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"DECISION_WORK_STATES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"HIERARCHY_ATTRIBUTE_IDS",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"HIERARCHY_ATTRIBUTE_NAMES",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"HIERARCHY_CHILD_IDS_LIMIT",{enumerable:!0,get:function(){return 6}}),Object.defineProperty(exports,"MAX_AGGREGATE_GROUPS",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"SYSTEM_ATTRIBUTES",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"SYSTEM_ATTRIBUTE_I18N_KEYS",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"decisionThreadKey",{enumerable:!0,get:function(){return decisionThreadKey}}),Object.defineProperty(exports,"decisionTransferBy",{enumerable:!0,get:function(){return decisionTransferBy}}),Object.defineProperty(exports,"decisionTransfersOf",{enumerable:!0,get:function(){return decisionTransfersOf}}),Object.defineProperty(exports,"formatDecisionLink",{enumerable:!0,get:function(){return formatDecisionLink}}),Object.defineProperty(exports,"getHierarchyAttributes",{enumerable:!0,get:function(){return getHierarchyAttributes}}),Object.defineProperty(exports,"getObjectSystemAttributes",{enumerable:!0,get:function(){return getObjectSystemAttributes}}),Object.defineProperty(exports,"getSystemAttributeI18nKey",{enumerable:!0,get:function(){return getSystemAttributeI18nKey}}),Object.defineProperty(exports,"getSystemAttributeList",{enumerable:!0,get:function(){return getSystemAttributeList}}),Object.defineProperty(exports,"isActionableDecisionKind",{enumerable:!0,get:function(){return isActionableDecisionKind}}),Object.defineProperty(exports,"isHierarchyAttribute",{enumerable:!0,get:function(){return isHierarchyAttribute}}),Object.defineProperty(exports,"isManagedSystemAttribute",{enumerable:!0,get:function(){return isManagedSystemAttribute}}),Object.defineProperty(exports,"parseDecisionLink",{enumerable:!0,get:function(){return parseDecisionLink}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
+
import{SchemaError as e,SchemaErrorCode as t,ToolGroupGrantError as n,ValidationError as r}from"./exceptions.mjs";import"./zod-locale.mjs";import{assertUniqueBy as i,colorIdSchema as ee,iconNameSchema as te}from"./primitives-BCJLtpaI.mjs";import*as a from"zod";import{AVATAR_COLOR_IDS as ne}from"@standards/constants";const re=[`completed`,`failed`,`cancelled`];function invalidSessionState(n){throw new e(n,t.INVARIANT_VIOLATION)}function assertSessionState(e){e.phase===`running`?e.runningTurnId===void 0&&invalidSessionState(`running session without runningTurnId`):e.runningTurnId!==void 0&&invalidSessionState(`runningTurnId present on a ${e.phase} session`),e.phase===`parked`?e.parkedOn===void 0&&invalidSessionState(`parked session without parkedOn`):e.parkedOn!==void 0&&invalidSessionState(`parkedOn present on a ${e.phase} session`),e.locked===!0&&e.phase!==`parked`&&invalidSessionState(`locked ${e.phase} session`),e.parkedOn===`human`?e.humanRequestIds===void 0&&invalidSessionState(`human-parked session without humanRequestIds`):e.humanRequestIds!==void 0&&invalidSessionState(`humanRequestIds present on a session not parked on a human`)}const ie=[`createdAt`,`lastActivity`],ae=[`mine`,`shared`,`team`],o=Object.freeze({mutation:`ask`,destructive:`ask`,outward:`ask`}),oe=[`active`,`completed`,`abandoned`],s=[`openai`,`anthropic`,`google`,`spacexai`,`deepseek`,`moonshotai`,`alibaba`,`mistral`,`minimax`,`meta`,`zai`,`cursor`],c=[`standard`,`fast`],l=[`none`,`minimal`,`low`,`medium`,`high`,`xhigh`],u=[`conversation`,`writing`,`coding`,`analysis`,`extraction`],se=[`light`,`standard`,`heavy`],ce=[`manual`,`auto`],le={interactive:{inputPerMillionUsd:5,outputPerMillionUsd:25},delegated:{inputPerMillionUsd:2,outputPerMillionUsd:12}},d=[`model`,`speed`,`reasoning`,`imageModel`,`routing`];function mergeSessionInferencePatch(e,t){let n={...e};for(let e of d){let r=t[e];r===null?delete n[e]:r!==void 0&&Object.assign(n,{[e]:r})}return t.model&&t.routing===void 0&&(n.routing=`manual`),n}function isRoutineActorMetadata(e){return e?.kind===`routine`}const ue=[`octopus`,`clover`,`flower`,`triangle`,`square`,`blob`,`circle`,`drop`,`hexagon`,`pill`,`pebble`,`puddle`],de=[`relaxed`,`neutral`],fe=4,pe=200;function agentDisplayName(e){return e.label?.trim()||e.name}const me=5e4,f=[`approval-requested`,`approval-responded`,`approval-dispatched`],he=[`streaming`,`running`,`pending`,...f];function isOpenToolPartState(e){return he.includes(e)}function isToolApprovalState(e){return f.includes(e)}const ge=[`records`,`descendants`,`brokenLinks`,`denied`,`files`];function isToolImpactCountKey(e){return ge.includes(e)}const p=[`CREDITS_EXHAUSTED`,`MEMBER_CAP_REACHED`];function isSystemPartCode(e){return typeof e==`string`&&p.includes(e)}const _e=20,ve=4e3,ye=32e3;function compareAgentSessionMessages(e,t){let n=e.createdAt.getTime()-t.createdAt.getTime();return n===0?e.id.localeCompare(t.id):n}function orderAgentSessionMessages(e){return[...e].sort(compareAgentSessionMessages)}const be=200,xe=182,Se=366,Ce=`agent-notification`;function isAgentNotificationMetadata(e){return e?.kind===Ce}const m=`agent-message`;function isAgentMessageMetadata(e){return e?.kind===m}const h=`architect-publication`;function isArchitectPublicationMetadata(e){return e?.kind===h}const we=[`object`,`attribute`,`view`,`page`],Te=[`objectName`,`attributeName`,`viewName`,`pageId`];function readPublishRefusalTarget(e){if(typeof e!=`object`||!e)return;let t=e,n=we.find(e=>e===t.kind);if(n===void 0)return;let r={kind:n};for(let e of Te)typeof t[e]==`string`&&(r[e]=t[e]);return r}function readArchitectPublication(e){if(!isArchitectPublicationMetadata(e))return;let t=e?.publication;if(typeof t!=`object`||!t)return;let n=t;if(n.outcome===`published`){let e=n.operations;return typeof e==`number`&&Number.isInteger(e)&&e>=0?{outcome:`published`,operations:e}:void 0}if(n.outcome!==`refused`)return;let r=readPublishRefusalTarget(n.target);return{outcome:`refused`,...r?{target:r}:{},...typeof n.reason==`string`?{reason:n.reason}:{}}}const Ee=`speaksThroughSend`,De=[`pending`,`in_progress`,`completed`,`blocked`],g=[`objects`,`fields`,`relations`,`views`,`samples`],Oe=50,ke=80,Ae=500,_=[`sandbox`,`web`,`image`,`memory`,`bulk`,`activity`,`orchestration`,`host`,`cloud-browser`,`agent-config`],v=`browser_launch`,y=[`mcp`,`email.read`,`email.send`,`calendar.read`,`github`,`slack.read`,`slack.write`,`device`,`browser-profile`,`login`],je=[`definition`,`default`,`child`,`inline`],Me=[`manual`,`name-asc`,`name-desc`,`date-desc`,`date-asc`],Ne=100,Pe=500,Fe=2048,b=[`reader`,`runner`,`editor`],x=[`reader`,`editor`],Ie=[`manual`,`meeting_attendee`],Le=new Set([`memory`,`skill`]),S=[`runner`],C=[`reader`];function parseRole(e,t){if(typeof t==`string`&&e.includes(t))return t;let n=`role must be one of: ${e.join(`, `)}`;throw new r(n,[{path:[`role`],message:n}])}function parseRecordAccessRole(e){return parseRole(x,e)}function parseAgentDefinitionAccessRole(e){return parseRole(b,e)}function parsePageAccessRole(e){return parseRole(x,e)}function parseDeviceAccessRole(e){return parseRole(S,e)}function parseAgentSessionAccessRole(e){return parseRole(C,e)}function deriveViewerAccess(e,t){return e.visibility===`workspace`?`workspace`:e.ownedBy!==null&&t.includes(e.ownedBy)?`owner`:e.viewerGrant===`editor`?`editor`:e.viewerGrant===`runner`?`runner`:`reader`}const Re=[`fr`,`en`],ze=2e3,w=[`none`,`estimated`,`exact`];function parseCountMode(e){if(typeof e==`string`&&w.includes(e))return e;throw new r(`countMode must be one of: ${w.join(`, `)} (received: ${String(e)})`,[])}function parseOptionalCountMode(e){return e===void 0?void 0:parseCountMode(e)}const Be=1e4,Ve=[`record`,`object`,`attribute`,`view`,`user`,`role`,`settings`,`file`,`agent`,`bundle`,`tenant_invitation`,`api_key`,`agent_session`],He=`record.created,record.updated,record.deleted,record.restored,record.purged,record.access_changed,agent.access_changed,agent_session.supervised_read,object.created,object.updated,object.deleted,attribute.created,attribute.updated,attribute.deleted,view.created,view.updated,view.deleted,bundle.synced,bundle.removed,bundle.added,user.created,user.invited,user.updated,user.deleted,user.login,user.logout,tenant_invitation.created,tenant_invitation.delivery_failed,tenant_invitation.resent,tenant_invitation.revoked,tenant_invitation.accepted,role.created,role.updated,role.deleted,role.assigned,role.revoked,api_key.detached,settings.updated,file.uploaded,file.updated,file.deleted`.split(`,`),Ue=`agentSessionId`;function isAgentWrittenAuditEntry(e){return e.actorType===`agent`||typeof e.metadata?.agentSessionId==`string`}const We=[`draft_schema`],Ge=`discard_architect_draft`,T=`request_design_review`,Ke=`get_architect_draft`,E=[`search`,`query`,`read`,`write`,`delete`,`organize`,`copy`,`send`],qe=`send`,Je=`copy`,D=[...E,`edit_content`],O=[...D,`compact_context`,`request_work_mode`,`write_todos`],k=[v],A=[`get_agents`,`upsert_agent`],Ye=[`record`,`document`,`file`,`skill`,`schema`,`guide`,`decision`],j={memory:{kinds:[`memory`],capabilities:[],tools:[`propose_memory`]},bulk:{kinds:[],capabilities:[`bulk`],tools:[]},activity:{kinds:[],capabilities:[`activity`],tools:[]},"email.read":{kinds:[`email`,`thread`],capabilities:[`copy_email`],tools:[]},"email.send":{kinds:[`email`,`thread`,`draft`],capabilities:[`copy_email`],tools:[]},"calendar.read":{kinds:[`event`],capabilities:[`transcript`],tools:[]}},M={sandbox:{icon:`terminal`,tools:[`exec_command`,`publish_artifact`,`sandbox_validate_payload`]},web:{icon:`globe`,tools:[`read_webpage`,`web_search`]},image:{icon:`image`,tools:[`generate_image`]},memory:{icon:`book-open`,tools:j.memory.tools},bulk:{icon:`layers-two`,tools:j.bulk.tools},activity:{icon:`activity`,tools:j.activity.tools},orchestration:{icon:`git-branch`,tools:[`spawn_agent`]},host:{icon:`wrench`,tools:[]},"cloud-browser":{icon:`globe`,tools:k},"agent-config":{icon:`sparkles`,tools:A}},N={mcp:{icon:`puzzle`,tools:[]},"email.read":{icon:`envelope`,tools:j[`email.read`].tools},"email.send":{icon:`send`,tools:j[`email.send`].tools},"calendar.read":{icon:`calendar`,tools:j[`calendar.read`].tools},github:{icon:`brand-github`,tools:[]},"slack.read":{icon:`brand-slack`,tools:[`slack_read`,`slack_find`,`slack_download_file`]},"slack.write":{icon:`brand-slack`,tools:[`slack_send`,`slack_react`,`slack_set_status`]},device:{icon:`desktop`,tools:[`exec_command`]},"browser-profile":{icon:`globe`,tools:k},login:{icon:`key`,tools:[]}},Xe={sandbox:{kinds:[],capabilities:[],tools:M.sandbox.tools},web:{kinds:[],capabilities:[],tools:M.web.tools},image:{kinds:[],capabilities:[],tools:M.image.tools},memory:j.memory,bulk:j.bulk,activity:j.activity,orchestration:{kinds:[],capabilities:[],tools:M.orchestration.tools},host:{kinds:[],capabilities:[],tools:M.host.tools},"cloud-browser":{kinds:[],capabilities:[],tools:M[`cloud-browser`].tools},"agent-config":{kinds:[],capabilities:[],tools:M[`agent-config`].tools},mcp:{kinds:[],capabilities:[],tools:N.mcp.tools},"email.read":j[`email.read`],"email.send":j[`email.send`],"calendar.read":j[`calendar.read`],github:{kinds:[],capabilities:[],tools:N.github.tools},"slack.read":{kinds:[],capabilities:[],tools:N[`slack.read`].tools},"slack.write":{kinds:[],capabilities:[],tools:N[`slack.write`].tools},device:{kinds:[],capabilities:[],tools:N.device.tools},"browser-profile":{kinds:[],capabilities:[],tools:N[`browser-profile`].tools},login:{kinds:[],capabilities:[],tools:N.login.tools}},Ze={schema:[`discard_architect_draft`,`draft_schema`,`get_architect_draft`,`get_schema_history`,`request_design_review`,`search_icons`],"agent-config":A,setup:[`request_setup`],internal:[`load_toolset`]},Qe=[...new Set([...O,..._.flatMap(e=>M[e].tools),...y.flatMap(e=>N[e].tools)])],$e={"email.read":[`gmail`,`outlook`],"email.send":[`gmail`,`outlook`],"calendar.read":[`google-calendar`,`outlook-calendar`]};function connectionGrantKindsOf(e){switch(e){case`github`:return[`github`];case`slack`:return[`slack.read`,`slack.write`];case`google-calendar`:case`outlook-calendar`:return[`calendar.read`];case`gmail`:case`outlook`:return[`email.read`,`email.send`]}}const et=[`activity`,`bulk`,`image`,`memory`,`orchestration`,`sandbox`,`web`],P=[`memory`],tt=new Set([`sandbox`,`host`,`cloud-browser`]);function needsManageWhenUnattended(e){return tt.has(e)||isResourceGrant(e)}function isNativeToolGroup(e){return _.includes(e)}function parseToolGroupGrant(e){if(isNativeToolGroup(e))return{type:`native`,group:e};let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);return r.length===0||!y.includes(n)?null:{type:`resource`,kind:n,id:r}}function grantKindOf(e){let t=parseToolGroupGrant(e);return t?.type===`resource`?t.kind:null}function isResourceGrant(e){return parseToolGroupGrant(e)?.type===`resource`}function resourceGrant(e,t){return`${e}:${t}`}function canonicalToolGroups(e){return[...new Set(e)].sort()}const F=`ask_questions`,I=`request_setup`,nt=new Set([F,T,I]),rt=new Set([F,I]),it=new Set([T]),at=4,ot=2e3,st=50,ct=a.union([a.object({value:a.string(),label:a.string()}).strict(),a.object({values:a.array(a.string()),labels:a.array(a.string()),text:a.string().optional()}).strict(),a.object({text:a.string()}).strict()]),lt=a.object({skipped:a.boolean().describe(`True if the person skipped all questions`),answers:a.record(a.string(),ct).describe(`Map of question ID to the answer given, with each chosen option's value and label`),answeredBy:a.object({id:a.string(),name:a.string()}).optional().describe(`Who answered: one of the people the question went to, not always the person you act for`)});function readAskQuestionsResult(e){let t=lt.safeParse(e);return t.success?t.data:null}function hasQuestions(e){return typeof e!=`object`||!e||!(`questions`in e)?!1:Array.isArray(e.questions)&&e.questions.length>0}function isQuestionPart(e){return rt.has(e.name)||e.name===`send`&&hasQuestions(e.args)}function argsOf(e){return typeof e.args==`object`&&e.args!==null?e.args:void 0}function awaitedChildOf(e){let t=argsOf(e);if(e.name!==`send`||t?.wait!==!0)return;let n=t.ref;return typeof n==`string`&&n.startsWith(`session:`)?n.slice(8):void 0}function lockingSendCall(e,t){let n=new Map,r=[];for(let i of e){if(i.name!==`send`)continue;if(isQuestionPart(i)){t.requestIds.includes(i.id)&&r.push(i);continue}let e=awaitedChildOf(i);e!==void 0&&n.set(e,i)}for(let[e,i]of n)(t.awaitedChildIds===void 0||t.awaitedChildIds.includes(e))&&r.push(i);let i=new Map(e.map((e,t)=>[e,t]));return r.filter(e=>argsOf(e)?.lock===!0).sort((e,t)=>(i.get(t)??0)-(i.get(e)??0))[0]}function humanRequestKind(e){return isQuestionPart(e)?`question`:e.approvalId==null?it.has(e.name)?`review`:null:`approval`}function isAwaitingHuman(e){let t=humanRequestKind(e);return t===null||e.state===`streaming`||!isOpenToolPartState(e.state)||e.result!==void 0||e.error!==void 0?!1:t!==`approval`||e.state===`approval-requested`&&e.approved===void 0}function isBlocking(e){let t=humanRequestKind(e);return t===`review`?isOpenToolPartState(e.state):t===`approval`&&e.state===`approval-requested`&&e.approved===void 0}function humanRequestId(e){return isQuestionPart(e)?e.toolCallId:e.approvalId??e.toolCallId}function openRequests(e,t){let n=t.blocking?isBlocking:isAwaitingHuman,r=[];for(let t of e)for(let e of t.parts??[])isToolRequestPart(e)&&n(e)&&r.push({part:e,id:humanRequestId(e),requestedAt:t.createdAt});return r}function isToolRequestPart(e){return e.type===`tool`}function isParkedOnHuman(e){return e?.phase===`parked`&&e.parkedOn===`human`}const ut=50;function recentActivityEntryKey(e){return e.kind===`record`?JSON.stringify([`record`,e.objectName,e.recordId]):JSON.stringify([`conversation`,`sessionId`in e?e.sessionId:e.session.id])}const dt=200,ft=5242880,pt=`Notetaker`,mt=/^\d{1,9}(\.\d{1,6})?$/,ht={meetingRecordingPolicy:`none`,meetingBotDisplayName:pt,memoryPersonMonthlyLimitUsd:null,memoryTenantMonthlyLimitUsd:null,findImages:!0,memberMonthlyCapCredits:null},gt=[`active`,`suspended`],_t=[`architect`,`manual`,`auto`],vt=[`panel`,`fullscreen`],yt=200,bt=50,xt=200,St=50,Ct=a.discriminatedUnion(`type`,[a.strictObject({type:a.literal(`record`),object:a.string().min(1),id:a.guid()}),a.strictObject({type:a.literal(`user`),id:a.guid()})]),wt=a.strictObject({nodes:a.array(Ct).min(1).max(50),limitPerNode:a.number().int().min(1).max(200).default(50)});function recordGraphNodeKey(e){return e.type===`record`?`record:${e.object}:${e.id}`:`user:${e.id}`}const Tt=100,Et=`work`,Dt=`/vercel/sandbox/${Et}`,Ot=`/workspace`;function environmentWorkdir(e){return e?Dt:Ot}const kt=[{id:`claude-code`,label:`Claude Code`,provider:`anthropic`,apiKeyEnv:`ANTHROPIC_API_KEY`,models:[{id:`sonnet`,label:`Claude Sonnet`},{id:`opus`,label:`Claude Opus`},{id:`haiku`,label:`Claude Haiku`}],defaultModel:`sonnet`},{id:`codex`,label:`Codex`,provider:`openai`,apiKeyEnv:`OPENAI_API_KEY`,models:[{id:`gpt-6.1-sol`,label:`GPT-6.1 Sol`},{id:`gpt-6-luna`,label:`GPT-6 Luna`},{id:`gpt-6-astra`,label:`GPT-6 Astra`}],defaultModel:`gpt-6.1-sol`},{id:`cursor`,label:`Cursor`,provider:`cursor`,apiKeyEnv:`CURSOR_API_KEY`,models:[{id:`auto`,label:`Auto`,cliDefault:!0},{id:`composer-2.5`,label:`Composer 2.5`}],defaultModel:`auto`}],L=new Map(kt.map(e=>[e.id,e]));function isEnvironmentHarnessId(e){return L.has(e)}function findEnvironmentHarness(e){return L.get(e)}function environmentHarness(n){let r=L.get(n);if(!r)throw new e(`Unknown harness "${n}"`,t.INVARIANT_VIOLATION);return r}function cliDefaultModelOf(e){return environmentHarness(e).models.find(e=>e.cliDefault)?.id}function compiledHarnessModels(e){let t=environmentHarness(e);return t.models.map(e=>({id:e.id,label:e.label,...e.id===t.defaultModel?{isDefault:!0}:{}}))}function harnessModelChoices(e,t){let{provider:n}=environmentHarness(e);return t.map(e=>({id:e.id,provider:n,label:e.label,...e.isDefault?{isDefault:!0}:{}}))}const At=[`code`,`documents`],jt=[`small`,`default`,`large`],Mt={small:2,default:4,large:8},Nt=2,Pt=`── `,Ft=65536,It=100;function utf8ByteLength(e){return new TextEncoder().encode(e).length}const Lt=[{key:`direct`,icon:`message`,color:`ink`,description:`A message a person wrote to this mailbox: a conversation, a question, a request, a reply.`},{key:`transactional`,icon:`credit-card`,color:`terra`,description:`An automated message about an account or an operation: receipt, invoice, payment, order, shipping, booking, password reset, security alert.`},{key:`notifications`,icon:`bell`,color:`ochre`,description:`An automated alert from a tool or a service: activity on GitHub, Slack, a calendar, a CRM, a monitoring system.`},{key:`newsletters`,icon:`book-open`,color:`stone`,description:`Editorial content the mailbox subscribed to: newsletters, digests, articles, community updates.`},{key:`marketing`,icon:`percentage`,color:`iris`,description:`Promotion or prospecting: offers, discounts, product announcements, cold sales outreach.`}],Rt={direct:{en:`Direct`,fr:`Direct`},transactional:{en:`Transactional`,fr:`Transactionnel`},notifications:{en:`Notifications`,fr:`Notifications`},newsletters:{en:`Newsletters`,fr:`Newsletters`},marketing:{en:`Marketing`,fr:`Marketing`}},zt=8,Bt=24,Vt=10,Ht=500,Ut=`tag`,Wt=`stone`,Gt=new Set(`gmail.com,googlemail.com,outlook.com,hotmail.com,hotmail.fr,outlook.fr,live.com,live.fr,msn.com,yahoo.com,yahoo.fr,icloud.com,me.com,mac.com,proton.me,protonmail.com,gmx.com,gmx.fr,orange.fr,wanadoo.fr,free.fr,laposte.net,sfr.fr,bbox.fr,numericable.fr,aol.com`.split(`,`)),Kt=new Set(Lt.map(e=>e.key)),qt=new Set(Object.entries(Rt).flatMap(([e,t])=>[e,t.en,t.fr].map(e=>e.toLowerCase())));function isSystemEmailCategory(e){return Kt.has(e)}function isSystemEmailCategoryName(e){return qt.has(e.trim().toLowerCase())}function isPublicMailDomain(e){return Gt.has(e.toLowerCase())}const R={maxConcurrentRuns:3,retryPolicy:{maxRetries:3,backoffMs:1e3,backoffMultiplier:2}};var AgentBuilder=class{constructor(e){if(!e.name||e.name.trim().length===0)throw new r(`Agent name is required`,[]);this.bp={name:e.name,system:!0,visibility:`workspace`,triggers:[]}}description(e){return this.bp.description=e,this}label(e){return this.bp.label=e,this}avatar(e){return this.bp.avatar={type:e.type,color:e.color,expression:e.expression??`relaxed`},this}starters(e){return e.length===0?delete this.bp.starters:this.bp.starters=[...e],this}systemPrompt(e){return this.bp.systemPrompt=e,this}model(e,t,n){return this.bp.model={provider:e,model:t,...n},this}toolGroups(e){let r=e.find(e=>!isNativeToolGroup(e));if(r!==void 0)throw new n(t.AGENT_TOOL_GROUP_UNKNOWN,r,`Agent "${this.bp.name}": "${r}" is not a native tool group (blueprints cannot grant tenant resources)`);return this.bp.toolGroups=canonicalToolGroups(e),this}schedule(e){return this.bp.schedule={...e,enabled:e.enabled??!0},this}config(e){let t=this.bp.config??R,n=e.inference===void 0?t.inference:{...t.inference,...e.inference};return this.bp.config={...t,...e,...n===void 0?{}:{inference:n}},this}delegation(e){return Object.assign(this.bp,e),this}approval(e){return this.bp.approval={...o,...this.bp.approval,...e},this}visibility(e){return this.bp.visibility=e,this}trigger(e,t,n){return this.bp.triggers.push({name:e,eventType:t,...n,enabled:n?.enabled??!0}),this}runtime(){return this.bp.system=!1,this}build(){if(!this.bp.systemPrompt)throw new r(`Agent "${this.bp.name}": systemPrompt is required`,[]);if(!this.bp.model)throw new r(`Agent "${this.bp.name}": model is required`,[]);if(this.bp.system&&this.bp.visibility===`private`)throw new r(`Agent "${this.bp.name}": system agents must use workspace visibility`,[]);return i(this.bp.triggers,e=>e.name,e=>new r(`Agent "${this.bp.name}": duplicate trigger name "${e}"`,[])),{...this.bp,visibility:this.bp.visibility??`workspace`,toolGroups:this.bp.toolGroups??[...P],config:this.bp.config??R,systemPrompt:this.bp.systemPrompt,model:this.bp.model}}};function agent(e){return new AgentBuilder(e)}const z={issue:{events:[`issues`],actions:[`opened`,`edited`,`closed`,`reopened`,`labeled`,`unlabeled`,`assigned`,`unassigned`,`milestoned`,`demilestoned`,`transferred`,`pinned`],conditions:[`label`,`issueLabels`,`assignees`,`milestone`,`issueType`,`text`]},pull_request:{events:[`pull_request`],actions:[`opened`,`ready_for_review`,`synchronize`,`review_requested`,`merged`,`closed`,`reopened`,`converted_to_draft`,`labeled`,`assigned`,`edited`],conditions:[`baseBranch`,`headBranch`,`draft`,`issueLabels`,`changedPaths`,`prAuthor`]},review:{events:[`pull_request_review`],actions:[`submitted`,`edited`,`dismissed`],conditions:[`reviewState`,`prAuthor`]},comment:{events:[`issue_comment`,`pull_request_review_comment`,`commit_comment`],actions:[`created`,`edited`,`deleted`],conditions:[`text`,`issueAuthor`,`prAuthor`]},push:{events:[`push`],actions:[`pushed`],conditions:[`branch`,`changedPaths`,`forced`]},ref:{events:[`create`,`delete`],actions:[`created`,`deleted`],conditions:[`refType`,`branch`,`tag`]},workflow:{events:[`workflow_run`],actions:[`requested`,`in_progress`,`completed`],conditions:[`workflowName`,`conclusion`,`branch`,`originEvent`]},check:{events:[`check_suite`,`check_run`],actions:[`completed`,`rerequested`],conditions:[`checkApp`,`checkName`,`conclusion`]},project_item:{events:[`projects_v2_item`],actions:[`created`,`edited`,`archived`,`restored`,`deleted`],conditions:[`project`,`projectField`,`from`,`to`,`itemType`]},release:{events:[`release`],actions:[`published`,`created`,`edited`,`prereleased`,`deleted`],conditions:[`prerelease`,`tag`]},discussion:{events:[`discussion`,`discussion_comment`],actions:[`created`,`commented`,`answered`,`labeled`,`closed`],conditions:[`category`,`issueLabels`,`text`]},repository:{events:[`star`,`fork`,`repository`],actions:[`starred`,`forked`,`created`,`archived`],conditions:[]}},Jt={mention:{events:[`app_mention`],conditions:[`text`]},message:{events:[`message`],conditions:[`position`,`text`,`hasFile`]},dm:{events:[`message`],conditions:[`text`,`hasFile`]},reaction:{events:[`reaction_added`],conditions:[`messageAuthor`]},member_joined:{events:[`member_joined_channel`],conditions:[]}},Yt=a.object({field:a.literal(`text`),operator:a.enum([`contains`,`starts_with`]),value:a.string().min(1)}).strict();function stringCondition(e){return a.object({field:a.literal(e),value:a.string().min(1)}).strict()}function booleanCondition(e){return a.object({field:a.literal(e),value:a.boolean()}).strict()}function listCondition(e){return a.object({field:a.literal(e),operator:a.enum([`any`,`all`]).default(`any`),value:a.array(a.string().min(1)).min(1)}).strict()}const Xt=a.discriminatedUnion(`field`,[Yt,stringCondition(`label`),listCondition(`issueLabels`),listCondition(`assignees`),stringCondition(`milestone`),stringCondition(`issueType`),stringCondition(`baseBranch`),stringCondition(`headBranch`),stringCondition(`branch`),booleanCondition(`draft`),stringCondition(`changedPaths`),booleanCondition(`forced`),stringCondition(`prAuthor`),stringCondition(`issueAuthor`),a.object({field:a.literal(`reviewState`),value:a.enum([`approved`,`changes_requested`,`commented`])}).strict(),stringCondition(`workflowName`),stringCondition(`checkApp`),stringCondition(`checkName`),stringCondition(`conclusion`),stringCondition(`originEvent`),stringCondition(`project`),stringCondition(`projectField`),a.object({field:a.literal(`from`),value:a.string().nullable()}).strict(),a.object({field:a.literal(`to`),value:a.string().nullable()}).strict(),a.object({field:a.literal(`itemType`),value:a.enum([`issue`,`pull_request`,`draft`])}).strict(),booleanCondition(`prerelease`),stringCondition(`tag`),a.object({field:a.literal(`refType`),value:a.enum([`branch`,`tag`])}).strict(),stringCondition(`category`)]),Zt=a.discriminatedUnion(`field`,[Yt,a.object({field:a.literal(`position`),value:a.enum([`top_level`,`reply`])}).strict(),booleanCondition(`hasFile`),stringCondition(`messageAuthor`)]),Qt=a.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/),$t=a.enum([`human`,`me`,`any`]),en=a.object({family:a.enum(Object.keys(z)),actions:a.array(a.string()).default([]),repositories:a.array(Qt).default([]),sender:a.union([$t,a.object({logins:a.array(a.string().min(1)).min(1)}).strict()]).default(`human`),conditions:a.array(Xt).default([])}).strict().superRefine((e,t)=>{let n=z[e.family];e.actions.forEach((r,i)=>{n.actions.includes(r)||t.addIssue({code:`custom`,path:[`actions`,i],message:`Action ${r} is not supported by ${e.family}`})}),e.conditions.forEach((r,i)=>{n.conditions.includes(r.field)||t.addIssue({code:`custom`,path:[`conditions`,i,`field`],message:`Condition ${r.field} is not supported by ${e.family}`})})}).transform(e=>e),tn=a.object({on:a.enum([`mention`,`message`,`dm`,`reaction`,`member_joined`]),channels:a.array(a.string().min(1)).default([]),reactions:a.array(a.string().min(1)).optional(),sender:a.union([$t,a.object({users:a.array(a.string().min(1)).min(1)}).strict()]).default(`human`),conditions:a.array(Zt).default([])}).strict().superRefine((e,t)=>{e.conditions.forEach((n,r)=>{Jt[e.on].conditions.includes(n.field)||t.addIssue({code:`custom`,path:[`conditions`,r,`field`],message:`Condition ${n.field} is not supported by ${e.on}`})}),e.reactions!==void 0&&e.on!==`reaction`&&t.addIssue({code:`custom`,path:[`reactions`],message:`reactions requires on=reaction`})}).transform(e=>e),nn=a.union([en,tn]),rn=[`read`,`write`,`full`],an=[`accepted`,`declined`,`tentative`],on=`sent nothing back`,sn=`MEETING_BOT_NO_CREDITS`,cn=[`force`,`skip`],ln=[`none`,`all`,`external_only`],un={override:null,status:`none`,failureReason:null,waitingRoom:!1,botId:null},dn=a.object({speaker:a.string().nullable(),startsAtMs:a.number(),endsAtMs:a.number(),text:a.string()}),fn=a.object({fullText:a.string(),segments:a.array(dn),language:a.string().nullable(),startedAt:a.string().nullable(),endedAt:a.string().nullable()}),pn={width:1280,height:720,maxBytes:13e5,mimeType:`image/jpeg`},mn=Math.ceil(pn.maxBytes/3)*4,hn=a.object({conferenceJoinUrl:a.string().min(1),botDisplayName:a.string().min(1),startsAt:a.string().nullable(),callbackUrl:a.url(),botImageJpeg:a.string().max(mn).optional()}),gn=a.object({botId:a.string().min(1)}),_n=a.discriminatedUnion(`kind`,[a.object({kind:a.literal(`transcript-ready`),botId:a.string().min(1)}),a.object({kind:a.literal(`failure`),botId:a.string().min(1),reason:a.string()}),a.object({kind:a.literal(`waiting-room`),botId:a.string().min(1),waiting:a.boolean()})]);function recordMeetingsCount(e){return typeof e.total==`number`?{total:e.total,isExact:e.totalIsExact!==!1}:null}const vn=100;let yn=function(e){return e.Desktop=`desktop`,e}({});function isMailProvider(e){return e===`gmail`||e===`outlook`}const bn=`DRAFT`;function isProviderDraft(e){return e.includes(bn)}const xn=[`read`,`unread`,`archive`,`trash`,`restore`],Sn=[`threads`,`messages`];function isMailboxListMode(e){return Sn.includes(e)}const Cn=[`reply`,`reply_all`];function isReplyMode(e){return Cn.includes(e)}const wn=2e5,Tn=2e4,En=998,Dn=100,On=/^[A-Za-z0-9_-]+$/,kn=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?Z$/,An=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function encodeAgentSessionListCursor(e){return btoa(`${e.at}|${e.id}`).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function decodeAgentSessionListCursor(e){if(e.length>256||!On.test(e))return null;let t;try{t=atob(e.replace(/-/g,`+`).replace(/_/g,`/`))}catch{return null}let[n,r,...i]=t.split(`|`);return i.length>0||!n||!r||!kn.test(n)||!An.test(r)?null:isRealInstant(n)?{at:n,id:r}:null}function isRealInstant(e){let t=new Date(e);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,19)===e.slice(0,19)}const jn={added:a.array(a.string()).readonly(),removed:a.array(a.string()).readonly(),roleChanged:a.array(a.string()).readonly(),workspaceBefore:a.boolean(),workspaceAfter:a.boolean(),subtreeSize:a.number().int().nonnegative()},Mn=a.object(jn).readonly(),Nn=a.object(jn).strict().readonly(),B=a.number().finite().nonnegative(),V=a.enum(s),H=a.enum(c),U=a.enum(l),W=a.enum(ce),G=a.object({provider:V,model:a.string().min(1)}).strict(),Pn=a.object({speed:H.optional(),reasoning:U.optional(),routing:W.optional()}).strict(),K=a.string().regex(/^[a-z0-9][a-z0-9-]*\/[a-z0-9][a-z0-9._-]*$/),Fn=a.object({model:G.optional(),speed:H.optional(),reasoning:U.optional(),imageModel:K.optional(),routing:W.optional()}).strict(),In=Fn.refine(e=>d.some(t=>e[t]!==void 0),{message:`At least one inference override is required`});function isSessionInferencePatch(e){return Object.keys(e).length>0&&Object.values(e).every(e=>e!==void 0)}const Ln=a.object({model:G.nullable().optional(),speed:H.nullable().optional(),reasoning:U.nullable().optional(),imageModel:K.nullable().optional(),routing:W.nullable().optional()}).strict().refine(isSessionInferencePatch,{message:`At least one inference override is required`}),Rn=a.object({model:a.string().min(1),routing:a.object({mode:a.literal(`auto`),tasks:a.array(a.enum(u)).optional(),demand:a.enum(se).optional(),reason:a.enum([`selected`,`retained`,`fallback`]).optional(),relation:a.enum([`continue`,`modify`,`new`,`aside`,`unknown`]).optional(),anchorMessageId:a.string().min(1).optional()})}),zn=a.object({objectName:a.string(),id:a.string(),label:a.string(),objectIcon:a.string().optional()}).strict(),q=a.object({label:a.string(),denied:a.boolean().optional(),deletion:a.object({target:a.string().optional(),count:B.optional(),restorableDays:B.optional()}).strict().optional(),record:zn.optional(),object:a.object({name:a.string(),label:a.string()}).strict().optional(),email:a.object({from:a.string(),to:a.array(a.string()),cc:a.array(a.string()),bcc:a.array(a.string()),subject:a.string().nullable(),text:a.string(),truncatedChars:B,outsideThread:a.array(a.string()),attachments:a.array(a.object({name:a.string(),size:B}).strict()),updatedAt:a.string(),forwarded:a.object({from:a.string(),subject:a.string().nullable(),quote:a.string(),quoteTruncatedChars:B}).strict().optional()}).strict().optional(),move:Nn.optional(),parent:zn.nullable().optional(),skill:a.object({source:a.string(),description:a.string(),audience:a.enum([`private`,`workspace`]),files:B,hasScripts:a.boolean()}).strict().optional(),outgoingText:a.string().optional(),counts:a.record(a.string(),B).optional(),warnings:a.array(a.string()).optional()}).strict(),Bn=a.union([a.object({type:a.literal(`text`),text:a.string()}).strict(),a.object({type:a.literal(`reasoning`),text:a.string()}).strict(),a.object({type:a.literal(`system`),code:a.enum(p)}).strict(),a.object({type:a.literal(`sent-message`),text:a.string(),attachments:a.array(a.string()).optional()}).strict(),a.object({type:a.literal(`error`),error:a.string(),errorClass:a.string().optional()}).strict(),a.object({type:a.literal(`tool`),toolCallId:a.string(),name:a.string(),args:a.record(a.string(),a.unknown()),result:a.unknown().optional(),error:a.string().optional(),errorCode:a.enum([`output_limit_reached`,`interrupted`,t.INVALID_TOOL_INPUT,`external_outcome_unknown`,`external_not_dispatched`]).optional(),state:a.enum([`streaming`,`running`,`completed`,`error`,`pending`,`approval-requested`,`approval-responded`,`approval-dispatched`]),durationMs:B.optional(),approvalId:a.string().optional(),approvalImpact:q.optional(),approved:a.boolean().optional(),approvalReason:a.string().optional(),approvalDecidedBy:a.string().optional(),approvalDecidedAt:a.string().optional(),approvalRelaxableByAuto:a.boolean().optional()}).strict(),a.object({type:a.literal(`file`),fileId:a.string(),name:a.string(),mimeType:a.string()}).strict(),a.object({type:a.literal(`compaction`),state:a.literal(`in-progress`),reason:a.enum([`preflight_threshold`,`overflow_recovery`]),estimatedTokens:B.optional(),reportedTokens:B.optional()}).strict(),a.object({type:a.literal(`compaction`),state:a.literal(`completed`),tokensBefore:B,tokensAfter:B,tokensSaved:B,strategy:a.enum([`no-op`,`summary`,`truncation`]),durationMs:B,summary:a.string().optional()}).strict(),a.object({type:a.literal(`compaction`),state:a.literal(`failed`),reason:a.string(),durationMs:B.optional()}).strict()]),Vn=a.object({id:a.string(),name:a.string(),mimeType:a.string(),size:B}).strict(),Hn=a.object({id:a.string(),artifactId:a.string(),revision:a.number().int().min(1),selectedText:a.string()}).strict(),Un=a.object({id:a.string(),type:a.string().transform(e=>e),entityId:a.string(),label:a.string(),objectName:a.string().optional(),startIndex:B,endIndex:B}).strict(),Wn=a.object({provider:V,model:a.string(),maxTokens:B.optional(),contextWindow:B.optional()}).strict(),Gn=a.union([a.date(),a.string().datetime({offset:!0}).transform(e=>new Date(e))]),Kn=a.object({id:a.string(),sessionId:a.string(),tenantId:a.string().optional(),runId:a.string().optional(),role:a.enum([`user`,`assistant`,`system`,`tool`]),parts:a.array(Bn),attachments:a.array(Vn).optional(),mentions:a.array(Un).optional(),quotes:a.array(Hn).optional(),model:Wn.optional(),tokenUsage:a.object({input:B,output:B}).strict().optional(),metadata:a.record(a.string(),a.unknown()).optional(),createdAt:Gn}).strict(),qn=a.object({id:a.string(),description:a.string(),status:a.enum([`pending`,`in_progress`,`completed`,`blocked`]),result:a.string().optional(),updatedAt:B.optional(),target:a.object({phase:a.enum(g)}).strict().optional()}).strict(),Jn=a.object({id:a.string(),sessionId:a.string(),status:a.enum([`active`,`completed`,`abandoned`]),todos:a.array(qn),version:B,createdAt:a.string(),updatedAt:a.string(),completedAt:a.string().optional()}).strict(),J={"compaction-start":a.object({reason:a.enum([`preflight_threshold`,`overflow_recovery`]),estimatedTokens:B.optional(),reportedTokens:B.optional()}).strict(),"compaction-end":a.object({tokensBefore:B,tokensAfter:B,tokensSaved:B,strategy:a.enum([`no-op`,`summary`,`truncation`]),durationMs:B,summary:a.string().optional()}).strict(),"compaction-failed":a.object({reason:a.string()}).strict(),usage:a.object({messageId:a.string().min(1).optional(),inputTokens:B,outputTokens:B,totalTokens:B,cacheReadTokens:B.optional(),cacheCreationTokens:B.optional(),contextWindow:B,residentTokens:B,utilization:a.number().finite().min(0).max(1),costUsd:B.optional()}).strict(),"sent-message":a.object({text:a.string(),attachments:a.array(a.string()).optional()}).strict(),"message-updated":a.object({message:Kn}).strict(),"approval-context":a.object({approvalId:a.string(),toolCallId:a.string(),impact:q.optional(),relaxableByAuto:a.boolean().optional()}).strict()};function isAgentUIDataName(e){return e in J}function agentUIValidationError(e){return new r(`Invalid agent UI message chunk`,e.map(e=>({path:e.path.map(String),message:e.message,code:e.code})))}function assertCustomAgentUIMessageChunk(e){if(typeof e!=`object`||!e||typeof e.type!=`string`)throw new r(`Invalid agent UI message chunk`,[{path:[`type`],message:`Expected UI message chunk type`,code:`invalid_type`}]);let t=e.type;if(!t.startsWith(`data-`))throw new r(`Invalid agent UI message chunk`,[{path:[`type`],message:`Expected agent data chunk type`,code:`invalid_value`}]);let n=t.slice(5);if(!isAgentUIDataName(n))throw new r(`Invalid agent UI message chunk`,[{path:[`type`],message:`Unknown agent UI data type: ${n}`,code:`invalid_value`}]);let i=a.object({type:a.literal(`data-${n}`),id:a.string().optional(),data:J[n],transient:a.boolean().optional()}).strict().safeParse(e);if(!i.success)throw agentUIValidationError(i.error.issues);return i.data}function agentDataChunk(e,t,n){return assertCustomAgentUIMessageChunk({type:`data-${e}`,...n?.id===void 0?{}:{id:n.id},data:t,...n?.transient===void 0?{}:{transient:n.transient}})}const Yn=a.string().trim().min(1).max(24),Xn=a.string().trim().min(10).max(500),Zn=a.enum([`address`,`domain`]),Qn=a.object({scope:a.enum([`personal`,`workspace`]),name:Yn,description:Xn,icon:te.default(`tag`),color:ee.default(Wt)}),$n=a.object({name:Yn.optional(),description:Xn.optional(),icon:te.optional(),color:ee.optional()}).refine(e=>Object.values(e).some(e=>e!==void 0),{message:`Nothing to update`}),er=a.object({moveTo:a.string().min(1).nullable().default(null)}),tr=a.object({category:a.string().min(1).optional(),important:a.boolean().optional()}).refine(e=>e.category!==void 0||e.important!==void 0,{message:`Nothing to classify`}),nr=a.object({verdict:a.object({category:a.string().min(1).nullable(),important:a.boolean(),classifiedBy:a.enum([`model`,`rule`,`manual`]).nullable()}),ruleId:a.string().uuid().nullable(),previousRule:a.object({scope:Zn,match:a.string().trim().toLowerCase().min(1),category:a.string().min(1)}).nullable()}).refine(e=>e.ruleId!==null||e.previousRule===null,{message:`A previous rule needs the rule it restores`}),rr=a.object({scope:a.literal(`domain`)}),ir=a.object({scope:a.enum([`personal`,`workspace`])}),Y=a.object({type:a.enum(ue),color:a.enum(ne),expression:a.enum(de).default(`relaxed`)}).strict(),ar=a.array(a.string().trim().min(1).max(200)).max(4);function agentAvatarFromMetadata(e){let t=Y.safeParse(e);return t.success?t.data:void 0}const or=[`record.created`,`record.updated`,`record.deleted`,`form.submitted`,`webhook`,`github`,`slack`],sr=new Set([`record.created`,`record.updated`,`record.deleted`]),cr=/^[A-Z_][A-Z0-9_]*$/,lr=a.object({cron:a.string().min(9),timezone:a.string().optional(),enabled:a.boolean(),input:a.record(a.string(),a.unknown()).optional(),runFor:a.enum([`armer`,`audience`]).optional(),audience:a.object({workspace:a.boolean(),roleIds:a.array(a.uuid()),actorIds:a.array(a.uuid())}).optional(),continueConversation:a.boolean().optional()}),ur=/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/,X=a.object({name:a.string().max(120).optional(),eventType:a.enum(or),objectId:a.guid().optional(),watchedFields:a.array(a.string()).max(50).optional(),debounceMs:a.number().int().min(0).max(3e5).optional(),filter:a.object({combinator:a.enum([`and`,`or`]).default(`and`),rules:a.array(a.object({attribute:a.string(),operator:a.string(),value:a.unknown().optional()}))}).optional(),formDefinitionId:a.string().optional(),continuationKey:a.string().max(200).regex(ur).nullable().optional(),connectionId:a.guid().optional(),match:nn.optional(),continueConversation:a.boolean().optional(),enabled:a.boolean().optional()});function refineTrigger(e){return e.refine(e=>!e.watchedFields?.length||e.eventType===`record.updated`,{message:`watchedFields requires eventType=record.updated`,path:[`watchedFields`]}).refine(e=>!(e.eventType&&sr.has(e.eventType))||!!e.objectId,{message:`objectId is required for record.* triggers`,path:[`objectId`]}).refine(e=>!(e.continuationKey&&e.eventType)||e.eventType===`webhook`,{message:`continuationKey requires eventType=webhook`,path:[`continuationKey`]}).superRefine((e,t)=>{let n=e.eventType===`github`||e.eventType===`slack`;if(n&&!e.connectionId&&t.addIssue({code:`custom`,path:[`connectionId`],message:`connectionId is required for native connector triggers`}),n&&!e.match&&t.addIssue({code:`custom`,path:[`match`],message:`match is required for native connector triggers`}),e.match&&e.eventType&&((e.eventType===`github`?`family`in e.match:e.eventType===`slack`&&`on`in e.match)||t.addIssue({code:`custom`,path:[`match`],message:`match must belong to the trigger provider`})),e.eventType&&!n)for(let n of[`connectionId`,`continueConversation`])e[n]!==void 0&&t.addIssue({code:`custom`,path:[n],message:`${n} requires a native connector trigger`})})}const dr=refineTrigger(X).transform(e=>({...e,...e.eventType===`github`||e.eventType===`slack`?{continueConversation:e.continueConversation??!0}:{}})),fr=X.partial();function parseMergedAgentTrigger(e,t){let n=fr.safeParse(t);if(!n.success)throw triggerValidationError(n.error);let r=Object.fromEntries(Object.entries(n.data).filter(([,e])=>e!==void 0)),i=dr.safeParse({...e,...r});if(!i.success)throw triggerValidationError(i.error);return i.data}function triggerValidationError(e){return new r(`Invalid agent trigger`,e.issues.map(e=>({path:e.path.map(String),message:e.message})))}const pr=100,Z=a.uuid(),Q=a.record(a.string(),a.unknown()),mr=a.strictObject({objectName:a.string(),recordId:Z,attribute:a.string(),base:a.unknown(),props:Q.optional()}),hr=a.strictObject({kind:a.literal(`record.set`),objectId:Z,recordId:Z,values:Q,base:Q.optional()}),gr=a.strictObject({kind:a.literal(`record.create`),objectId:Z,recordId:Z,values:Q,options:a.strictObject({visibility:a.enum([`workspace`,`private`]).optional(),allowDraft:a.boolean().optional(),linkTo:mr.optional(),parentId:Z.optional()}).optional()}),_r=a.strictObject({kind:a.literal(`record.delete`),objectId:Z,recordId:Z}),vr=a.strictObject({kind:a.literal(`record.restore`),objectId:Z,recordId:Z}),$=a.string().min(1),yr=a.discriminatedUnion(`command`,[a.strictObject({command:a.literal(`replace`),oldText:$,newText:a.string(),replaceAll:a.boolean().optional()}),a.strictObject({command:a.literal(`insert`),text:$,after:$.optional()})]),br=a.strictObject({kind:a.literal(`record.patch`),objectId:Z,recordId:Z,attribute:a.string(),edit:yr}),xr=a.discriminatedUnion(`kind`,[hr,gr,_r,vr,br]),Sr=a.strictObject({opId:Z,steps:a.array(xr).min(1).max(100)}).superRefine((e,t)=>{let n=new Set;for(let r of e.steps){if(n.has(r.recordId)){t.addIssue({code:`custom`,message:`one step per record`,path:[`steps`]});return}n.add(r.recordId)}});export{rn as ACCESS_LEVELS,b as ACCESS_ROLES,ye as AGENT_ASIDE_ANSWER_MAX_LENGTH,_e as AGENT_ASIDE_HISTORY_LIMIT,ve as AGENT_ASIDE_QUESTION_MAX_LENGTH,de as AGENT_AVATAR_EXPRESSIONS,ue as AGENT_AVATAR_TYPES,m as AGENT_MESSAGE_KIND,Ce as AGENT_NOTIFICATION_KIND,C as AGENT_SESSION_ACCESS_ROLES,ie as AGENT_SESSION_LIST_ORDERS,je as AGENT_SESSION_ORIGINS,ae as AGENT_SESSION_PROVENANCES,fe as AGENT_STARTERS_MAX,pe as AGENT_STARTER_MAX_LENGTH,me as AGENT_SYSTEM_PROMPT_MAX_LENGTH,u as AGENT_TASK_KINDS,Qe as ALL_CATALOG_TOOL_NAMES,Ye as ALWAYS_KINDS,it as APPROVAL_FAMILY_TOOL_NAMES,h as ARCHITECT_PUBLICATION_KIND,ot as ASK_QUESTIONS_ANSWER_MAX_LENGTH,st as ASK_QUESTIONS_ANSWER_MAX_VALUES,at as ASK_QUESTIONS_MAX_BATCH,F as ASK_QUESTIONS_TOOL_NAME,He as AUDIT_ACTIONS,Ue as AUDIT_AGENT_SESSION_METADATA_KEY,Ve as AUDIT_RESOURCE_TYPES,AgentBuilder,v as BROWSER_LAUNCH_TOOL_NAME,k as BROWSER_TOOL_NAMES,Re as BUNDLE_LOCALES,ze as BUNDLE_SETUP_PROMPT_MAX_LENGTH,$e as CONNECTION_GRANT_PROVIDERS,ur as CONTINUATION_KEY_PATTERN,vt as CONVERSATION_SURFACES,Je as COPY_VERB_NAME,D as CORE_RECORD_TOOL_NAMES,O as CORE_TOOL_NAMES,w as COUNT_MODES,R as DEFAULT_AGENT_EXECUTION_CONFIG,et as DEFAULT_AGENT_TOOL_GROUPS,o as DEFAULT_APPROVAL_POLICY,P as DEFAULT_BLUEPRINT_TOOL_GROUPS,xe as DEFAULT_DAILY_ACTIVITY_DAYS,pt as DEFAULT_MEETING_BOT_DISPLAY_NAME,ht as DEFAULT_TENANT_SETTINGS,S as DEVICE_ACCESS_ROLES,Ge as DISCARD_ARCHITECT_DRAFT_TOOL_NAME,Me as DOCUMENT_SORT_MODES,We as DRAFT_WRITE_TOOL_NAMES,Wt as EMAIL_CATEGORY_DEFAULT_COLOR,Ut as EMAIL_CATEGORY_DEFAULT_ICON,Ht as EMAIL_CATEGORY_DESCRIPTION_MAX,Vt as EMAIL_CATEGORY_DESCRIPTION_MIN,zt as EMAIL_CATEGORY_LIMIT,Bt as EMAIL_CATEGORY_NAME_MAX,Pt as ENVIRONMENT_BUILD_LOG_STEP_PREFIX,kt as ENVIRONMENT_HARNESSES,Et as ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,Dt as ENVIRONMENT_HARNESS_WORKDIR,At as ENVIRONMENT_IMAGES,Nt as ENVIRONMENT_MEMORY_GB_PER_VCPU,Tt as ENVIRONMENT_NAME_MAX_CHARS,It as ENVIRONMENT_NETWORK_ALLOW_MAX,Ft as ENVIRONMENT_SCRIPT_MAX_BYTES,jt as ENVIRONMENT_SIZES,Mt as ENVIRONMENT_SIZE_VCPUS,Ot as ENVIRONMENT_STANDARDS_WORKDIR,cr as ENV_VAR_KEY_PATTERN,Be as ESTIMATED_COUNT_CAP,dt as FILE_URLS_MAX_IDS,Ke as GET_ARCHITECT_DRAFT_TOOL_NAME,z as GITHUB_TRIGGER_CATALOG,Xe as GRANT_ENABLES,nt as HITL_TOOL_NAMES,l as INFERENCE_REASONING_OPTIONS,ce as INFERENCE_ROUTING_MODES,c as INFERENCE_SPEEDS,be as LAST_RUN_ERROR_MAX_LENGTH,Sn as MAILBOX_LIST_MODES,wn as MAIL_DRAFT_BODY_MAX_CHARS,Tn as MAIL_SIGNATURE_MAX_CHARS,En as MAIL_SUBJECT_MAX_CHARS,Se as MAX_DAILY_ACTIVITY_DAYS,Oe as MAX_TODOS,Ae as MAX_TODO_DESCRIPTION_CHARS,ke as MAX_TODO_ID_CHARS,vn as MCP_SERVER_NAME_MAX_LENGTH,pn as MEETING_BOT_IMAGE,mn as MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,sn as MEETING_BOT_NO_CREDITS,on as MEETING_BOT_SILENT_REASON,an as MEETING_RESPONSES,mt as MEMORY_SPEND_LIMIT_PATTERN,yn as McpOAuthCompletionMode,_ as NATIVE_TOOL_GROUPS,M as NATIVE_TOOL_GROUP_CATALOG,un as NO_RECORDING,he as OPEN_TOOL_PART_STATES,pr as OPERATION_MAX_STEPS,bn as PROVIDER_DRAFT_LABEL,s as PROVIDER_NAMES,Gt as PUBLIC_MAIL_DOMAINS,rt as QUESTION_FAMILY_TOOL_NAMES,ut as RECENT_ACTIVITY_LEDGER_LIMIT,Dn as RECIPIENT_IDENTITIES_MAX,cn as RECORDING_OVERRIDES,ln as RECORDING_POLICIES,x as RECORD_ACCESS_ROLES,Ie as RECORD_ACCESS_SOURCES,Fe as RECORD_DRIVE_CURSOR_MAX_LENGTH,Ne as RECORD_DRIVE_PAGE_DEFAULT_LIMIT,Pe as RECORD_DRIVE_PAGE_MAX_LIMIT,St as RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,xt as RECORD_GRAPH_MAX_LIMIT_PER_NODE,bt as RECORD_GRAPH_MAX_NODES,ft as RECORD_IMAGE_MAX_BYTES,Cn as REPLY_MODES,T as REQUEST_DESIGN_REVIEW_TOOL_NAME,I as REQUEST_SETUP_TOOL_NAME,y as RESOURCE_GRANT_KINDS,N as RESOURCE_KIND_CATALOG,le as ROUTING_PRICE_CEILINGS,qe as SEND_VERB_NAME,d as SESSION_INFERENCE_PATCH_KEYS,Jt as SLACK_TRIGGER_CATALOG,Ee as SPEAKS_THROUGH_SEND_METADATA_KEY,Ze as SURFACE_TOOL_NAMES,Lt as SYSTEM_EMAIL_CATEGORIES,Rt as SYSTEM_EMAIL_CATEGORY_NAMES,p as SYSTEM_PART_CODES,se as TASK_DEMAND_LEVELS,g as TODO_PHASES,oe as TODO_PLAN_STATUSES,De as TODO_STATUSES,f as TOOL_APPROVAL_STATES,ge as TOOL_IMPACT_COUNT_KEYS,xn as TRIAGE_ACTIONS,or as TRIGGER_EVENT_TYPES,re as TURN_OUTCOMES,Le as UNSHAREABLE_OBJECT_NAMES,yt as USERS_RESOLVE_MAX_IDS,gt as USER_STATUSES,_t as USER_WORK_POSTURES,E as VERB_NAMES,agent,agentAvatarFromMetadata,Y as agentAvatarSchema,agentDataChunk,agentDisplayName,Pn as agentInferencePreferencesSchema,Vn as agentMessageAttachmentSchema,Bn as agentMessagePartSchema,lr as agentScheduleSchema,Fn as agentSessionInferenceOverridesInputSchema,In as agentSessionInferenceOverridesSchema,Kn as agentSessionMessageSchema,ar as agentStartersSchema,X as agentTriggerBaseSchema,fr as agentTriggerPatchSchema,dr as agentTriggerSchema,agentUIValidationError,Hn as artifactQuoteSchema,lt as askQuestionsOutputSchema,assertCustomAgentUIMessageChunk,assertSessionState,canonicalToolGroups,nr as classificationRestoreSchema,tr as classifyEmailSchema,cliDefaultModelOf,compareAgentSessionMessages,compiledHarnessModels,connectionGrantKindsOf,nn as connectorTriggerMatchSchema,J as customDataChunkSchemas,decodeAgentSessionListCursor,deriveViewerAccess,Gn as durableDateSchema,Qn as emailCategoryCreateSchema,er as emailCategoryDeleteSchema,ir as emailCategoryScopeQuerySchema,$n as emailCategoryUpdateSchema,rr as emailRuleScopeSchema,encodeAgentSessionListCursor,environmentHarness,environmentWorkdir,findEnvironmentHarness,Xt as githubConditionSchema,en as githubTriggerMatchSchema,grantKindOf,harnessModelChoices,humanRequestId,humanRequestKind,K as imageModelIdSchema,U as inferenceReasoningSchema,W as inferenceRoutingSchema,H as inferenceSpeedSchema,isAgentMessageMetadata,isAgentNotificationMetadata,isAgentUIDataName,isAgentWrittenAuditEntry,isArchitectPublicationMetadata,isAwaitingHuman,isBlocking,isEnvironmentHarnessId,isMailProvider,isMailboxListMode,isNativeToolGroup,isOpenToolPartState,isParkedOnHuman,isProviderDraft,isPublicMailDomain,isQuestionPart,isReplyMode,isResourceGrant,isRoutineActorMetadata,isSessionInferencePatch,isSystemEmailCategory,isSystemEmailCategoryName,isSystemPartCode,isToolApprovalState,isToolImpactCountKey,lockingSendCall,hn as meetingBotDispatchRequestSchema,gn as meetingBotDispatchResponseSchema,_n as meetingBotNotificationSchema,dn as meetingTranscriptSegmentSchema,Un as mentionReferenceSchema,mergeSessionInferencePatch,Wn as modelDefinitionSchema,G as modelReferenceSchema,Mn as moveImpactSchema,needsManageWhenUnattended,fn as normalizedMeetingTranscriptSchema,openRequests,orderAgentSessionMessages,parseAgentDefinitionAccessRole,parseAgentSessionAccessRole,parseCountMode,parseDeviceAccessRole,parseMergedAgentTrigger,parseOptionalCountMode,parsePageAccessRole,parseRecordAccessRole,parseToolGroupGrant,V as providerNameSchema,readArchitectPublication,readAskQuestionsResult,recentActivityEntryKey,recordGraphNodeKey,wt as recordGraphRequestSchema,recordMeetingsCount,Sr as recordOperationSchema,refineTrigger,resourceGrant,Rn as routedMessageInferenceSchema,Ln as sessionInferencePatchSchema,Zt as slackConditionSchema,tn as slackTriggerMatchSchema,qn as todoItemSchema,Jn as todoPlanSchema,q as toolImpactSchema,utf8ByteLength};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
+
const e=require("./rolldown-runtime-DETHMehu.js"),t=require("./exceptions.js");require("./zod-locale.js");const n=require("./primitives-CVbrjJ24.js");let r=require("zod");r=e.__toESM(r);let i=require("@standards/constants");const a=[`completed`,`failed`,`cancelled`];function invalidSessionState(e){throw new t.SchemaError(e,t.SchemaErrorCode.INVARIANT_VIOLATION)}function assertSessionState(e){e.phase===`running`?e.runningTurnId===void 0&&invalidSessionState(`running session without runningTurnId`):e.runningTurnId!==void 0&&invalidSessionState(`runningTurnId present on a ${e.phase} session`),e.phase===`parked`?e.parkedOn===void 0&&invalidSessionState(`parked session without parkedOn`):e.parkedOn!==void 0&&invalidSessionState(`parkedOn present on a ${e.phase} session`),e.locked===!0&&e.phase!==`parked`&&invalidSessionState(`locked ${e.phase} session`),e.parkedOn===`human`?e.humanRequestIds===void 0&&invalidSessionState(`human-parked session without humanRequestIds`):e.humanRequestIds!==void 0&&invalidSessionState(`humanRequestIds present on a session not parked on a human`)}const ee=[`createdAt`,`lastActivity`],te=[`mine`,`shared`,`team`],o=Object.freeze({mutation:`ask`,destructive:`ask`,outward:`ask`}),ne=[`active`,`completed`,`abandoned`],re=[`openai`,`anthropic`,`google`,`spacexai`,`deepseek`,`moonshotai`,`alibaba`,`mistral`,`minimax`,`meta`,`zai`,`cursor`],ie=[`standard`,`fast`],ae=[`none`,`minimal`,`low`,`medium`,`high`,`xhigh`],s=[`conversation`,`writing`,`coding`,`analysis`,`extraction`],c=[`light`,`standard`,`heavy`],l=[`manual`,`auto`],oe={interactive:{inputPerMillionUsd:5,outputPerMillionUsd:25},delegated:{inputPerMillionUsd:2,outputPerMillionUsd:12}},u=[`model`,`speed`,`reasoning`,`imageModel`,`routing`];function mergeSessionInferencePatch(e,t){let n={...e};for(let e of u){let r=t[e];r===null?delete n[e]:r!==void 0&&Object.assign(n,{[e]:r})}return t.model&&t.routing===void 0&&(n.routing=`manual`),n}function isRoutineActorMetadata(e){return e?.kind===`routine`}const d=[`octopus`,`clover`,`flower`,`triangle`,`square`,`blob`,`circle`,`drop`,`hexagon`,`pill`,`pebble`,`puddle`],f=[`relaxed`,`neutral`];function agentDisplayName(e){return e.label?.trim()||e.name}const p=[`approval-requested`,`approval-responded`,`approval-dispatched`],se=[`streaming`,`running`,`pending`,...p];function isOpenToolPartState(e){return se.includes(e)}function isToolApprovalState(e){return p.includes(e)}const ce=[`records`,`descendants`,`brokenLinks`,`denied`,`files`];function isToolImpactCountKey(e){return ce.includes(e)}const m=[`CREDITS_EXHAUSTED`,`MEMBER_CAP_REACHED`];function isSystemPartCode(e){return typeof e==`string`&&m.includes(e)}function compareAgentSessionMessages(e,t){let n=e.createdAt.getTime()-t.createdAt.getTime();return n===0?e.id.localeCompare(t.id):n}function orderAgentSessionMessages(e){return[...e].sort(compareAgentSessionMessages)}const le=`agent-notification`;function isAgentNotificationMetadata(e){return e?.kind===le}const ue=`agent-message`;function isAgentMessageMetadata(e){return e?.kind===ue}const de=`architect-publication`;function isArchitectPublicationMetadata(e){return e?.kind===de}const fe=[`object`,`attribute`,`view`,`page`],pe=[`objectName`,`attributeName`,`viewName`,`pageId`];function readPublishRefusalTarget(e){if(typeof e!=`object`||!e)return;let t=e,n=fe.find(e=>e===t.kind);if(n===void 0)return;let r={kind:n};for(let e of pe)typeof t[e]==`string`&&(r[e]=t[e]);return r}function readArchitectPublication(e){if(!isArchitectPublicationMetadata(e))return;let t=e?.publication;if(typeof t!=`object`||!t)return;let n=t;if(n.outcome===`published`){let e=n.operations;return typeof e==`number`&&Number.isInteger(e)&&e>=0?{outcome:`published`,operations:e}:void 0}if(n.outcome!==`refused`)return;let r=readPublishRefusalTarget(n.target);return{outcome:`refused`,...r?{target:r}:{},...typeof n.reason==`string`?{reason:n.reason}:{}}}const me=[`pending`,`in_progress`,`completed`,`blocked`],he=[`objects`,`fields`,`relations`,`views`,`samples`],h=[`sandbox`,`web`,`image`,`memory`,`bulk`,`activity`,`orchestration`,`host`,`cloud-browser`,`agent-config`],ge=`browser_launch`,g=[`mcp`,`email.read`,`email.send`,`calendar.read`,`github`,`slack.read`,`slack.write`,`device`,`browser-profile`,`login`],_e=[`definition`,`default`,`child`,`inline`],ve=[`manual`,`name-asc`,`name-desc`,`date-desc`,`date-asc`],_=[`reader`,`runner`,`editor`],v=[`reader`,`editor`],ye=[`manual`,`meeting_attendee`],be=new Set([`memory`,`skill`]),y=[`runner`],b=[`reader`];function parseRole(e,n){if(typeof n==`string`&&e.includes(n))return n;let r=`role must be one of: ${e.join(`, `)}`;throw new t.ValidationError(r,[{path:[`role`],message:r}])}function parseRecordAccessRole(e){return parseRole(v,e)}function parseAgentDefinitionAccessRole(e){return parseRole(_,e)}function parsePageAccessRole(e){return parseRole(v,e)}function parseDeviceAccessRole(e){return parseRole(y,e)}function parseAgentSessionAccessRole(e){return parseRole(b,e)}function deriveViewerAccess(e,t){return e.visibility===`workspace`?`workspace`:e.ownedBy!==null&&t.includes(e.ownedBy)?`owner`:e.viewerGrant===`editor`?`editor`:e.viewerGrant===`runner`?`runner`:`reader`}const xe=[`fr`,`en`],x=[`none`,`estimated`,`exact`];function parseCountMode(e){if(typeof e==`string`&&x.includes(e))return e;throw new t.ValidationError(`countMode must be one of: ${x.join(`, `)} (received: ${String(e)})`,[])}function parseOptionalCountMode(e){return e===void 0?void 0:parseCountMode(e)}const Se=[`record`,`object`,`attribute`,`view`,`user`,`role`,`settings`,`file`,`agent`,`bundle`,`tenant_invitation`,`api_key`,`agent_session`],Ce=`record.created,record.updated,record.deleted,record.restored,record.purged,record.access_changed,agent.access_changed,agent_session.supervised_read,object.created,object.updated,object.deleted,attribute.created,attribute.updated,attribute.deleted,view.created,view.updated,view.deleted,bundle.synced,bundle.removed,bundle.added,user.created,user.invited,user.updated,user.deleted,user.login,user.logout,tenant_invitation.created,tenant_invitation.delivery_failed,tenant_invitation.resent,tenant_invitation.revoked,tenant_invitation.accepted,role.created,role.updated,role.deleted,role.assigned,role.revoked,api_key.detached,settings.updated,file.uploaded,file.updated,file.deleted`.split(`,`);function isAgentWrittenAuditEntry(e){return e.actorType===`agent`||typeof e.metadata?.agentSessionId==`string`}const we=[`draft_schema`],S=`request_design_review`,C=[`search`,`query`,`read`,`write`,`delete`,`organize`,`copy`,`send`],w=[...C,`edit_content`],T=[...w,`compact_context`,`request_work_mode`,`write_todos`],E=[ge],D=[`get_agents`,`upsert_agent`],Te=[`record`,`document`,`file`,`skill`,`schema`,`guide`,`decision`],O={memory:{kinds:[`memory`],capabilities:[],tools:[`propose_memory`]},bulk:{kinds:[],capabilities:[`bulk`],tools:[]},activity:{kinds:[],capabilities:[`activity`],tools:[]},"email.read":{kinds:[`email`,`thread`],capabilities:[`copy_email`],tools:[]},"email.send":{kinds:[`email`,`thread`,`draft`],capabilities:[`copy_email`],tools:[]},"calendar.read":{kinds:[`event`],capabilities:[`transcript`],tools:[]}},k={sandbox:{icon:`terminal`,tools:[`exec_command`,`publish_artifact`,`sandbox_validate_payload`]},web:{icon:`globe`,tools:[`read_webpage`,`web_search`]},image:{icon:`image`,tools:[`generate_image`]},memory:{icon:`book-open`,tools:O.memory.tools},bulk:{icon:`layers-two`,tools:O.bulk.tools},activity:{icon:`activity`,tools:O.activity.tools},orchestration:{icon:`git-branch`,tools:[`spawn_agent`]},host:{icon:`wrench`,tools:[]},"cloud-browser":{icon:`globe`,tools:E},"agent-config":{icon:`sparkles`,tools:D}},A={mcp:{icon:`puzzle`,tools:[]},"email.read":{icon:`envelope`,tools:O[`email.read`].tools},"email.send":{icon:`send`,tools:O[`email.send`].tools},"calendar.read":{icon:`calendar`,tools:O[`calendar.read`].tools},github:{icon:`brand-github`,tools:[]},"slack.read":{icon:`brand-slack`,tools:[`slack_read`,`slack_find`,`slack_download_file`]},"slack.write":{icon:`brand-slack`,tools:[`slack_send`,`slack_react`,`slack_set_status`]},device:{icon:`desktop`,tools:[`exec_command`]},"browser-profile":{icon:`globe`,tools:E},login:{icon:`key`,tools:[]}},Ee={sandbox:{kinds:[],capabilities:[],tools:k.sandbox.tools},web:{kinds:[],capabilities:[],tools:k.web.tools},image:{kinds:[],capabilities:[],tools:k.image.tools},memory:O.memory,bulk:O.bulk,activity:O.activity,orchestration:{kinds:[],capabilities:[],tools:k.orchestration.tools},host:{kinds:[],capabilities:[],tools:k.host.tools},"cloud-browser":{kinds:[],capabilities:[],tools:k[`cloud-browser`].tools},"agent-config":{kinds:[],capabilities:[],tools:k[`agent-config`].tools},mcp:{kinds:[],capabilities:[],tools:A.mcp.tools},"email.read":O[`email.read`],"email.send":O[`email.send`],"calendar.read":O[`calendar.read`],github:{kinds:[],capabilities:[],tools:A.github.tools},"slack.read":{kinds:[],capabilities:[],tools:A[`slack.read`].tools},"slack.write":{kinds:[],capabilities:[],tools:A[`slack.write`].tools},device:{kinds:[],capabilities:[],tools:A.device.tools},"browser-profile":{kinds:[],capabilities:[],tools:A[`browser-profile`].tools},login:{kinds:[],capabilities:[],tools:A.login.tools}},De={schema:[`discard_architect_draft`,`draft_schema`,`get_architect_draft`,`get_schema_history`,`request_design_review`,`search_icons`],"agent-config":D,setup:[`request_setup`],internal:[`load_toolset`]},Oe=[...new Set([...T,...h.flatMap(e=>k[e].tools),...g.flatMap(e=>A[e].tools)])],ke={"email.read":[`gmail`,`outlook`],"email.send":[`gmail`,`outlook`],"calendar.read":[`google-calendar`,`outlook-calendar`]};function connectionGrantKindsOf(e){switch(e){case`github`:return[`github`];case`slack`:return[`slack.read`,`slack.write`];case`google-calendar`:case`outlook-calendar`:return[`calendar.read`];case`gmail`:case`outlook`:return[`email.read`,`email.send`]}}const Ae=[`activity`,`bulk`,`image`,`memory`,`orchestration`,`sandbox`,`web`],j=[`memory`],je=new Set([`sandbox`,`host`,`cloud-browser`]);function needsManageWhenUnattended(e){return je.has(e)||isResourceGrant(e)}function isNativeToolGroup(e){return h.includes(e)}function parseToolGroupGrant(e){if(isNativeToolGroup(e))return{type:`native`,group:e};let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(0,t),r=e.slice(t+1);return r.length===0||!g.includes(n)?null:{type:`resource`,kind:n,id:r}}function grantKindOf(e){let t=parseToolGroupGrant(e);return t?.type===`resource`?t.kind:null}function isResourceGrant(e){return parseToolGroupGrant(e)?.type===`resource`}function resourceGrant(e,t){return`${e}:${t}`}function canonicalToolGroups(e){return[...new Set(e)].sort()}const M=`ask_questions`,N=`request_setup`,Me=new Set([M,S,N]),P=new Set([M,N]),F=new Set([S]),Ne=r.union([r.object({value:r.string(),label:r.string()}).strict(),r.object({values:r.array(r.string()),labels:r.array(r.string()),text:r.string().optional()}).strict(),r.object({text:r.string()}).strict()]),I=r.object({skipped:r.boolean().describe(`True if the person skipped all questions`),answers:r.record(r.string(),Ne).describe(`Map of question ID to the answer given, with each chosen option's value and label`),answeredBy:r.object({id:r.string(),name:r.string()}).optional().describe(`Who answered: one of the people the question went to, not always the person you act for`)});function readAskQuestionsResult(e){let t=I.safeParse(e);return t.success?t.data:null}function hasQuestions(e){return typeof e!=`object`||!e||!(`questions`in e)?!1:Array.isArray(e.questions)&&e.questions.length>0}function isQuestionPart(e){return P.has(e.name)||e.name===`send`&&hasQuestions(e.args)}function argsOf(e){return typeof e.args==`object`&&e.args!==null?e.args:void 0}function awaitedChildOf(e){let t=argsOf(e);if(e.name!==`send`||t?.wait!==!0)return;let n=t.ref;return typeof n==`string`&&n.startsWith(`session:`)?n.slice(8):void 0}function lockingSendCall(e,t){let n=new Map,r=[];for(let i of e){if(i.name!==`send`)continue;if(isQuestionPart(i)){t.requestIds.includes(i.id)&&r.push(i);continue}let e=awaitedChildOf(i);e!==void 0&&n.set(e,i)}for(let[e,i]of n)(t.awaitedChildIds===void 0||t.awaitedChildIds.includes(e))&&r.push(i);let i=new Map(e.map((e,t)=>[e,t]));return r.filter(e=>argsOf(e)?.lock===!0).sort((e,t)=>(i.get(t)??0)-(i.get(e)??0))[0]}function humanRequestKind(e){return isQuestionPart(e)?`question`:e.approvalId==null?F.has(e.name)?`review`:null:`approval`}function isAwaitingHuman(e){let t=humanRequestKind(e);return t===null||e.state===`streaming`||!isOpenToolPartState(e.state)||e.result!==void 0||e.error!==void 0?!1:t!==`approval`||e.state===`approval-requested`&&e.approved===void 0}function isBlocking(e){let t=humanRequestKind(e);return t===`review`?isOpenToolPartState(e.state):t===`approval`&&e.state===`approval-requested`&&e.approved===void 0}function humanRequestId(e){return isQuestionPart(e)?e.toolCallId:e.approvalId??e.toolCallId}function openRequests(e,t){let n=t.blocking?isBlocking:isAwaitingHuman,r=[];for(let t of e)for(let e of t.parts??[])isToolRequestPart(e)&&n(e)&&r.push({part:e,id:humanRequestId(e),requestedAt:t.createdAt});return r}function isToolRequestPart(e){return e.type===`tool`}function isParkedOnHuman(e){return e?.phase===`parked`&&e.parkedOn===`human`}function recentActivityEntryKey(e){return e.kind===`record`?JSON.stringify([`record`,e.objectName,e.recordId]):JSON.stringify([`conversation`,`sessionId`in e?e.sessionId:e.session.id])}const L=`Notetaker`,Pe=/^\d{1,9}(\.\d{1,6})?$/,Fe={meetingRecordingPolicy:`none`,meetingBotDisplayName:L,memoryPersonMonthlyLimitUsd:null,memoryTenantMonthlyLimitUsd:null,findImages:!0,memberMonthlyCapCredits:null},Ie=[`active`,`suspended`],Le=[`architect`,`manual`,`auto`],Re=[`panel`,`fullscreen`],ze=r.discriminatedUnion(`type`,[r.strictObject({type:r.literal(`record`),object:r.string().min(1),id:r.guid()}),r.strictObject({type:r.literal(`user`),id:r.guid()})]),Be=r.strictObject({nodes:r.array(ze).min(1).max(50),limitPerNode:r.number().int().min(1).max(200).default(50)});function recordGraphNodeKey(e){return e.type===`record`?`record:${e.object}:${e.id}`:`user:${e.id}`}const Ve=`work`,He=`/vercel/sandbox/${Ve}`,Ue=`/workspace`;function environmentWorkdir(e){return e?He:Ue}const We=[{id:`claude-code`,label:`Claude Code`,provider:`anthropic`,apiKeyEnv:`ANTHROPIC_API_KEY`,models:[{id:`sonnet`,label:`Claude Sonnet`},{id:`opus`,label:`Claude Opus`},{id:`haiku`,label:`Claude Haiku`}],defaultModel:`sonnet`},{id:`codex`,label:`Codex`,provider:`openai`,apiKeyEnv:`OPENAI_API_KEY`,models:[{id:`gpt-6.1-sol`,label:`GPT-6.1 Sol`},{id:`gpt-6-luna`,label:`GPT-6 Luna`},{id:`gpt-6-astra`,label:`GPT-6 Astra`}],defaultModel:`gpt-6.1-sol`},{id:`cursor`,label:`Cursor`,provider:`cursor`,apiKeyEnv:`CURSOR_API_KEY`,models:[{id:`auto`,label:`Auto`,cliDefault:!0},{id:`composer-2.5`,label:`Composer 2.5`}],defaultModel:`auto`}],R=new Map(We.map(e=>[e.id,e]));function isEnvironmentHarnessId(e){return R.has(e)}function findEnvironmentHarness(e){return R.get(e)}function environmentHarness(e){let n=R.get(e);if(!n)throw new t.SchemaError(`Unknown harness "${e}"`,t.SchemaErrorCode.INVARIANT_VIOLATION);return n}function cliDefaultModelOf(e){return environmentHarness(e).models.find(e=>e.cliDefault)?.id}function compiledHarnessModels(e){let t=environmentHarness(e);return t.models.map(e=>({id:e.id,label:e.label,...e.id===t.defaultModel?{isDefault:!0}:{}}))}function harnessModelChoices(e,t){let{provider:n}=environmentHarness(e);return t.map(e=>({id:e.id,provider:n,label:e.label,...e.isDefault?{isDefault:!0}:{}}))}const Ge=[`code`,`documents`],Ke=[`small`,`default`,`large`],qe={small:2,default:4,large:8};function utf8ByteLength(e){return new TextEncoder().encode(e).length}const Je=[{key:`direct`,icon:`message`,color:`ink`,description:`A message a person wrote to this mailbox: a conversation, a question, a request, a reply.`},{key:`transactional`,icon:`credit-card`,color:`terra`,description:`An automated message about an account or an operation: receipt, invoice, payment, order, shipping, booking, password reset, security alert.`},{key:`notifications`,icon:`bell`,color:`ochre`,description:`An automated alert from a tool or a service: activity on GitHub, Slack, a calendar, a CRM, a monitoring system.`},{key:`newsletters`,icon:`book-open`,color:`stone`,description:`Editorial content the mailbox subscribed to: newsletters, digests, articles, community updates.`},{key:`marketing`,icon:`percentage`,color:`iris`,description:`Promotion or prospecting: offers, discounts, product announcements, cold sales outreach.`}],Ye={direct:{en:`Direct`,fr:`Direct`},transactional:{en:`Transactional`,fr:`Transactionnel`},notifications:{en:`Notifications`,fr:`Notifications`},newsletters:{en:`Newsletters`,fr:`Newsletters`},marketing:{en:`Marketing`,fr:`Marketing`}},Xe=`stone`,Ze=new Set(`gmail.com,googlemail.com,outlook.com,hotmail.com,hotmail.fr,outlook.fr,live.com,live.fr,msn.com,yahoo.com,yahoo.fr,icloud.com,me.com,mac.com,proton.me,protonmail.com,gmx.com,gmx.fr,orange.fr,wanadoo.fr,free.fr,laposte.net,sfr.fr,bbox.fr,numericable.fr,aol.com`.split(`,`)),Qe=new Set(Je.map(e=>e.key)),$e=new Set(Object.entries(Ye).flatMap(([e,t])=>[e,t.en,t.fr].map(e=>e.toLowerCase())));function isSystemEmailCategory(e){return Qe.has(e)}function isSystemEmailCategoryName(e){return $e.has(e.trim().toLowerCase())}function isPublicMailDomain(e){return Ze.has(e.toLowerCase())}const z={maxConcurrentRuns:3,retryPolicy:{maxRetries:3,backoffMs:1e3,backoffMultiplier:2}};var AgentBuilder=class{constructor(e){if(!e.name||e.name.trim().length===0)throw new t.ValidationError(`Agent name is required`,[]);this.bp={name:e.name,system:!0,visibility:`workspace`,triggers:[]}}description(e){return this.bp.description=e,this}label(e){return this.bp.label=e,this}avatar(e){return this.bp.avatar={type:e.type,color:e.color,expression:e.expression??`relaxed`},this}starters(e){return e.length===0?delete this.bp.starters:this.bp.starters=[...e],this}systemPrompt(e){return this.bp.systemPrompt=e,this}model(e,t,n){return this.bp.model={provider:e,model:t,...n},this}toolGroups(e){let n=e.find(e=>!isNativeToolGroup(e));if(n!==void 0)throw new t.ToolGroupGrantError(t.SchemaErrorCode.AGENT_TOOL_GROUP_UNKNOWN,n,`Agent "${this.bp.name}": "${n}" is not a native tool group (blueprints cannot grant tenant resources)`);return this.bp.toolGroups=canonicalToolGroups(e),this}schedule(e){return this.bp.schedule={...e,enabled:e.enabled??!0},this}config(e){let t=this.bp.config??z,n=e.inference===void 0?t.inference:{...t.inference,...e.inference};return this.bp.config={...t,...e,...n===void 0?{}:{inference:n}},this}delegation(e){return Object.assign(this.bp,e),this}approval(e){return this.bp.approval={...o,...this.bp.approval,...e},this}visibility(e){return this.bp.visibility=e,this}trigger(e,t,n){return this.bp.triggers.push({name:e,eventType:t,...n,enabled:n?.enabled??!0}),this}runtime(){return this.bp.system=!1,this}build(){if(!this.bp.systemPrompt)throw new t.ValidationError(`Agent "${this.bp.name}": systemPrompt is required`,[]);if(!this.bp.model)throw new t.ValidationError(`Agent "${this.bp.name}": model is required`,[]);if(this.bp.system&&this.bp.visibility===`private`)throw new t.ValidationError(`Agent "${this.bp.name}": system agents must use workspace visibility`,[]);return n.assertUniqueBy(this.bp.triggers,e=>e.name,e=>new t.ValidationError(`Agent "${this.bp.name}": duplicate trigger name "${e}"`,[])),{...this.bp,visibility:this.bp.visibility??`workspace`,toolGroups:this.bp.toolGroups??[...j],config:this.bp.config??z,systemPrompt:this.bp.systemPrompt,model:this.bp.model}}};function agent(e){return new AgentBuilder(e)}const B={issue:{events:[`issues`],actions:[`opened`,`edited`,`closed`,`reopened`,`labeled`,`unlabeled`,`assigned`,`unassigned`,`milestoned`,`demilestoned`,`transferred`,`pinned`],conditions:[`label`,`issueLabels`,`assignees`,`milestone`,`issueType`,`text`]},pull_request:{events:[`pull_request`],actions:[`opened`,`ready_for_review`,`synchronize`,`review_requested`,`merged`,`closed`,`reopened`,`converted_to_draft`,`labeled`,`assigned`,`edited`],conditions:[`baseBranch`,`headBranch`,`draft`,`issueLabels`,`changedPaths`,`prAuthor`]},review:{events:[`pull_request_review`],actions:[`submitted`,`edited`,`dismissed`],conditions:[`reviewState`,`prAuthor`]},comment:{events:[`issue_comment`,`pull_request_review_comment`,`commit_comment`],actions:[`created`,`edited`,`deleted`],conditions:[`text`,`issueAuthor`,`prAuthor`]},push:{events:[`push`],actions:[`pushed`],conditions:[`branch`,`changedPaths`,`forced`]},ref:{events:[`create`,`delete`],actions:[`created`,`deleted`],conditions:[`refType`,`branch`,`tag`]},workflow:{events:[`workflow_run`],actions:[`requested`,`in_progress`,`completed`],conditions:[`workflowName`,`conclusion`,`branch`,`originEvent`]},check:{events:[`check_suite`,`check_run`],actions:[`completed`,`rerequested`],conditions:[`checkApp`,`checkName`,`conclusion`]},project_item:{events:[`projects_v2_item`],actions:[`created`,`edited`,`archived`,`restored`,`deleted`],conditions:[`project`,`projectField`,`from`,`to`,`itemType`]},release:{events:[`release`],actions:[`published`,`created`,`edited`,`prereleased`,`deleted`],conditions:[`prerelease`,`tag`]},discussion:{events:[`discussion`,`discussion_comment`],actions:[`created`,`commented`,`answered`,`labeled`,`closed`],conditions:[`category`,`issueLabels`,`text`]},repository:{events:[`star`,`fork`,`repository`],actions:[`starred`,`forked`,`created`,`archived`],conditions:[]}},et={mention:{events:[`app_mention`],conditions:[`text`]},message:{events:[`message`],conditions:[`position`,`text`,`hasFile`]},dm:{events:[`message`],conditions:[`text`,`hasFile`]},reaction:{events:[`reaction_added`],conditions:[`messageAuthor`]},member_joined:{events:[`member_joined_channel`],conditions:[]}},tt=r.object({field:r.literal(`text`),operator:r.enum([`contains`,`starts_with`]),value:r.string().min(1)}).strict();function stringCondition(e){return r.object({field:r.literal(e),value:r.string().min(1)}).strict()}function booleanCondition(e){return r.object({field:r.literal(e),value:r.boolean()}).strict()}function listCondition(e){return r.object({field:r.literal(e),operator:r.enum([`any`,`all`]).default(`any`),value:r.array(r.string().min(1)).min(1)}).strict()}const nt=r.discriminatedUnion(`field`,[tt,stringCondition(`label`),listCondition(`issueLabels`),listCondition(`assignees`),stringCondition(`milestone`),stringCondition(`issueType`),stringCondition(`baseBranch`),stringCondition(`headBranch`),stringCondition(`branch`),booleanCondition(`draft`),stringCondition(`changedPaths`),booleanCondition(`forced`),stringCondition(`prAuthor`),stringCondition(`issueAuthor`),r.object({field:r.literal(`reviewState`),value:r.enum([`approved`,`changes_requested`,`commented`])}).strict(),stringCondition(`workflowName`),stringCondition(`checkApp`),stringCondition(`checkName`),stringCondition(`conclusion`),stringCondition(`originEvent`),stringCondition(`project`),stringCondition(`projectField`),r.object({field:r.literal(`from`),value:r.string().nullable()}).strict(),r.object({field:r.literal(`to`),value:r.string().nullable()}).strict(),r.object({field:r.literal(`itemType`),value:r.enum([`issue`,`pull_request`,`draft`])}).strict(),booleanCondition(`prerelease`),stringCondition(`tag`),r.object({field:r.literal(`refType`),value:r.enum([`branch`,`tag`])}).strict(),stringCondition(`category`)]),rt=r.discriminatedUnion(`field`,[tt,r.object({field:r.literal(`position`),value:r.enum([`top_level`,`reply`])}).strict(),booleanCondition(`hasFile`),stringCondition(`messageAuthor`)]),it=r.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/),at=r.enum([`human`,`me`,`any`]),ot=r.object({family:r.enum(Object.keys(B)),actions:r.array(r.string()).default([]),repositories:r.array(it).default([]),sender:r.union([at,r.object({logins:r.array(r.string().min(1)).min(1)}).strict()]).default(`human`),conditions:r.array(nt).default([])}).strict().superRefine((e,t)=>{let n=B[e.family];e.actions.forEach((r,i)=>{n.actions.includes(r)||t.addIssue({code:`custom`,path:[`actions`,i],message:`Action ${r} is not supported by ${e.family}`})}),e.conditions.forEach((r,i)=>{n.conditions.includes(r.field)||t.addIssue({code:`custom`,path:[`conditions`,i,`field`],message:`Condition ${r.field} is not supported by ${e.family}`})})}).transform(e=>e),st=r.object({on:r.enum([`mention`,`message`,`dm`,`reaction`,`member_joined`]),channels:r.array(r.string().min(1)).default([]),reactions:r.array(r.string().min(1)).optional(),sender:r.union([at,r.object({users:r.array(r.string().min(1)).min(1)}).strict()]).default(`human`),conditions:r.array(rt).default([])}).strict().superRefine((e,t)=>{e.conditions.forEach((n,r)=>{et[e.on].conditions.includes(n.field)||t.addIssue({code:`custom`,path:[`conditions`,r,`field`],message:`Condition ${n.field} is not supported by ${e.on}`})}),e.reactions!==void 0&&e.on!==`reaction`&&t.addIssue({code:`custom`,path:[`reactions`],message:`reactions requires on=reaction`})}).transform(e=>e),ct=r.union([ot,st]),lt=[`read`,`write`,`full`],ut=[`accepted`,`declined`,`tentative`],dt=[`force`,`skip`],ft=[`none`,`all`,`external_only`],pt={override:null,status:`none`,failureReason:null,waitingRoom:!1,botId:null},mt=r.object({speaker:r.string().nullable(),startsAtMs:r.number(),endsAtMs:r.number(),text:r.string()}),ht=r.object({fullText:r.string(),segments:r.array(mt),language:r.string().nullable(),startedAt:r.string().nullable(),endedAt:r.string().nullable()}),gt={width:1280,height:720,maxBytes:13e5,mimeType:`image/jpeg`},_t=Math.ceil(gt.maxBytes/3)*4,vt=r.object({conferenceJoinUrl:r.string().min(1),botDisplayName:r.string().min(1),startsAt:r.string().nullable(),callbackUrl:r.url(),botImageJpeg:r.string().max(_t).optional()}),yt=r.object({botId:r.string().min(1)}),bt=r.discriminatedUnion(`kind`,[r.object({kind:r.literal(`transcript-ready`),botId:r.string().min(1)}),r.object({kind:r.literal(`failure`),botId:r.string().min(1),reason:r.string()}),r.object({kind:r.literal(`waiting-room`),botId:r.string().min(1),waiting:r.boolean()})]);function recordMeetingsCount(e){return typeof e.total==`number`?{total:e.total,isExact:e.totalIsExact!==!1}:null}let xt=function(e){return e.Desktop=`desktop`,e}({});function isMailProvider(e){return e===`gmail`||e===`outlook`}const St=`DRAFT`;function isProviderDraft(e){return e.includes(St)}const Ct=[`read`,`unread`,`archive`,`trash`,`restore`],wt=[`threads`,`messages`];function isMailboxListMode(e){return wt.includes(e)}const Tt=[`reply`,`reply_all`];function isReplyMode(e){return Tt.includes(e)}const Et=/^[A-Za-z0-9_-]+$/,Dt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?Z$/,Ot=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function encodeAgentSessionListCursor(e){return btoa(`${e.at}|${e.id}`).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function decodeAgentSessionListCursor(e){if(e.length>256||!Et.test(e))return null;let t;try{t=atob(e.replace(/-/g,`+`).replace(/_/g,`/`))}catch{return null}let[n,r,...i]=t.split(`|`);return i.length>0||!n||!r||!Dt.test(n)||!Ot.test(r)?null:isRealInstant(n)?{at:n,id:r}:null}function isRealInstant(e){let t=new Date(e);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,19)===e.slice(0,19)}const kt={added:r.array(r.string()).readonly(),removed:r.array(r.string()).readonly(),roleChanged:r.array(r.string()).readonly(),workspaceBefore:r.boolean(),workspaceAfter:r.boolean(),subtreeSize:r.number().int().nonnegative()},At=r.object(kt).readonly(),jt=r.object(kt).strict().readonly(),V=r.number().finite().nonnegative(),H=r.enum(re),U=r.enum(ie),W=r.enum(ae),G=r.enum(l),K=r.object({provider:H,model:r.string().min(1)}).strict(),Mt=r.object({speed:U.optional(),reasoning:W.optional(),routing:G.optional()}).strict(),q=r.string().regex(/^[a-z0-9][a-z0-9-]*\/[a-z0-9][a-z0-9._-]*$/),Nt=r.object({model:K.optional(),speed:U.optional(),reasoning:W.optional(),imageModel:q.optional(),routing:G.optional()}).strict(),Pt=Nt.refine(e=>u.some(t=>e[t]!==void 0),{message:`At least one inference override is required`});function isSessionInferencePatch(e){return Object.keys(e).length>0&&Object.values(e).every(e=>e!==void 0)}const Ft=r.object({model:K.nullable().optional(),speed:U.nullable().optional(),reasoning:W.nullable().optional(),imageModel:q.nullable().optional(),routing:G.nullable().optional()}).strict().refine(isSessionInferencePatch,{message:`At least one inference override is required`}),It=r.object({model:r.string().min(1),routing:r.object({mode:r.literal(`auto`),tasks:r.array(r.enum(s)).optional(),demand:r.enum(c).optional(),reason:r.enum([`selected`,`retained`,`fallback`]).optional(),relation:r.enum([`continue`,`modify`,`new`,`aside`,`unknown`]).optional(),anchorMessageId:r.string().min(1).optional()})}),Lt=r.object({objectName:r.string(),id:r.string(),label:r.string(),objectIcon:r.string().optional()}).strict(),J=r.object({label:r.string(),denied:r.boolean().optional(),deletion:r.object({target:r.string().optional(),count:V.optional(),restorableDays:V.optional()}).strict().optional(),record:Lt.optional(),object:r.object({name:r.string(),label:r.string()}).strict().optional(),email:r.object({from:r.string(),to:r.array(r.string()),cc:r.array(r.string()),bcc:r.array(r.string()),subject:r.string().nullable(),text:r.string(),truncatedChars:V,outsideThread:r.array(r.string()),attachments:r.array(r.object({name:r.string(),size:V}).strict()),updatedAt:r.string(),forwarded:r.object({from:r.string(),subject:r.string().nullable(),quote:r.string(),quoteTruncatedChars:V}).strict().optional()}).strict().optional(),move:jt.optional(),parent:Lt.nullable().optional(),skill:r.object({source:r.string(),description:r.string(),audience:r.enum([`private`,`workspace`]),files:V,hasScripts:r.boolean()}).strict().optional(),outgoingText:r.string().optional(),counts:r.record(r.string(),V).optional(),warnings:r.array(r.string()).optional()}).strict(),Rt=r.union([r.object({type:r.literal(`text`),text:r.string()}).strict(),r.object({type:r.literal(`reasoning`),text:r.string()}).strict(),r.object({type:r.literal(`system`),code:r.enum(m)}).strict(),r.object({type:r.literal(`sent-message`),text:r.string(),attachments:r.array(r.string()).optional()}).strict(),r.object({type:r.literal(`error`),error:r.string(),errorClass:r.string().optional()}).strict(),r.object({type:r.literal(`tool`),toolCallId:r.string(),name:r.string(),args:r.record(r.string(),r.unknown()),result:r.unknown().optional(),error:r.string().optional(),errorCode:r.enum([`output_limit_reached`,`interrupted`,t.SchemaErrorCode.INVALID_TOOL_INPUT,`external_outcome_unknown`,`external_not_dispatched`]).optional(),state:r.enum([`streaming`,`running`,`completed`,`error`,`pending`,`approval-requested`,`approval-responded`,`approval-dispatched`]),durationMs:V.optional(),approvalId:r.string().optional(),approvalImpact:J.optional(),approved:r.boolean().optional(),approvalReason:r.string().optional(),approvalDecidedBy:r.string().optional(),approvalDecidedAt:r.string().optional(),approvalRelaxableByAuto:r.boolean().optional()}).strict(),r.object({type:r.literal(`file`),fileId:r.string(),name:r.string(),mimeType:r.string()}).strict(),r.object({type:r.literal(`compaction`),state:r.literal(`in-progress`),reason:r.enum([`preflight_threshold`,`overflow_recovery`]),estimatedTokens:V.optional(),reportedTokens:V.optional()}).strict(),r.object({type:r.literal(`compaction`),state:r.literal(`completed`),tokensBefore:V,tokensAfter:V,tokensSaved:V,strategy:r.enum([`no-op`,`summary`,`truncation`]),durationMs:V,summary:r.string().optional()}).strict(),r.object({type:r.literal(`compaction`),state:r.literal(`failed`),reason:r.string(),durationMs:V.optional()}).strict()]),zt=r.object({id:r.string(),name:r.string(),mimeType:r.string(),size:V}).strict(),Bt=r.object({id:r.string(),artifactId:r.string(),revision:r.number().int().min(1),selectedText:r.string()}).strict(),Vt=r.object({id:r.string(),type:r.string().transform(e=>e),entityId:r.string(),label:r.string(),objectName:r.string().optional(),startIndex:V,endIndex:V}).strict(),Ht=r.object({provider:H,model:r.string(),maxTokens:V.optional(),contextWindow:V.optional()}).strict(),Ut=r.union([r.date(),r.string().datetime({offset:!0}).transform(e=>new Date(e))]),Wt=r.object({id:r.string(),sessionId:r.string(),tenantId:r.string().optional(),runId:r.string().optional(),role:r.enum([`user`,`assistant`,`system`,`tool`]),parts:r.array(Rt),attachments:r.array(zt).optional(),mentions:r.array(Vt).optional(),quotes:r.array(Bt).optional(),model:Ht.optional(),tokenUsage:r.object({input:V,output:V}).strict().optional(),metadata:r.record(r.string(),r.unknown()).optional(),createdAt:Ut}).strict(),Gt=r.object({id:r.string(),description:r.string(),status:r.enum([`pending`,`in_progress`,`completed`,`blocked`]),result:r.string().optional(),updatedAt:V.optional(),target:r.object({phase:r.enum(he)}).strict().optional()}).strict(),Kt=r.object({id:r.string(),sessionId:r.string(),status:r.enum([`active`,`completed`,`abandoned`]),todos:r.array(Gt),version:V,createdAt:r.string(),updatedAt:r.string(),completedAt:r.string().optional()}).strict(),Y={"compaction-start":r.object({reason:r.enum([`preflight_threshold`,`overflow_recovery`]),estimatedTokens:V.optional(),reportedTokens:V.optional()}).strict(),"compaction-end":r.object({tokensBefore:V,tokensAfter:V,tokensSaved:V,strategy:r.enum([`no-op`,`summary`,`truncation`]),durationMs:V,summary:r.string().optional()}).strict(),"compaction-failed":r.object({reason:r.string()}).strict(),usage:r.object({messageId:r.string().min(1).optional(),inputTokens:V,outputTokens:V,totalTokens:V,cacheReadTokens:V.optional(),cacheCreationTokens:V.optional(),contextWindow:V,residentTokens:V,utilization:r.number().finite().min(0).max(1),costUsd:V.optional()}).strict(),"sent-message":r.object({text:r.string(),attachments:r.array(r.string()).optional()}).strict(),"message-updated":r.object({message:Wt}).strict(),"approval-context":r.object({approvalId:r.string(),toolCallId:r.string(),impact:J.optional(),relaxableByAuto:r.boolean().optional()}).strict()};function isAgentUIDataName(e){return e in Y}function agentUIValidationError(e){return new t.ValidationError(`Invalid agent UI message chunk`,e.map(e=>({path:e.path.map(String),message:e.message,code:e.code})))}function assertCustomAgentUIMessageChunk(e){if(typeof e!=`object`||!e||typeof e.type!=`string`)throw new t.ValidationError(`Invalid agent UI message chunk`,[{path:[`type`],message:`Expected UI message chunk type`,code:`invalid_type`}]);let n=e.type;if(!n.startsWith(`data-`))throw new t.ValidationError(`Invalid agent UI message chunk`,[{path:[`type`],message:`Expected agent data chunk type`,code:`invalid_value`}]);let i=n.slice(5);if(!isAgentUIDataName(i))throw new t.ValidationError(`Invalid agent UI message chunk`,[{path:[`type`],message:`Unknown agent UI data type: ${i}`,code:`invalid_value`}]);let a=r.object({type:r.literal(`data-${i}`),id:r.string().optional(),data:Y[i],transient:r.boolean().optional()}).strict().safeParse(e);if(!a.success)throw agentUIValidationError(a.error.issues);return a.data}function agentDataChunk(e,t,n){return assertCustomAgentUIMessageChunk({type:`data-${e}`,...n?.id===void 0?{}:{id:n.id},data:t,...n?.transient===void 0?{}:{transient:n.transient}})}const qt=r.string().trim().min(1).max(24),Jt=r.string().trim().min(10).max(500),Yt=r.enum([`address`,`domain`]),Xt=r.object({scope:r.enum([`personal`,`workspace`]),name:qt,description:Jt,icon:n.iconNameSchema.default(`tag`),color:n.colorIdSchema.default(Xe)}),Zt=r.object({name:qt.optional(),description:Jt.optional(),icon:n.iconNameSchema.optional(),color:n.colorIdSchema.optional()}).refine(e=>Object.values(e).some(e=>e!==void 0),{message:`Nothing to update`}),Qt=r.object({moveTo:r.string().min(1).nullable().default(null)}),$t=r.object({category:r.string().min(1).optional(),important:r.boolean().optional()}).refine(e=>e.category!==void 0||e.important!==void 0,{message:`Nothing to classify`}),en=r.object({verdict:r.object({category:r.string().min(1).nullable(),important:r.boolean(),classifiedBy:r.enum([`model`,`rule`,`manual`]).nullable()}),ruleId:r.string().uuid().nullable(),previousRule:r.object({scope:Yt,match:r.string().trim().toLowerCase().min(1),category:r.string().min(1)}).nullable()}).refine(e=>e.ruleId!==null||e.previousRule===null,{message:`A previous rule needs the rule it restores`}),tn=r.object({scope:r.literal(`domain`)}),nn=r.object({scope:r.enum([`personal`,`workspace`])}),rn=r.object({type:r.enum(d),color:r.enum(i.AVATAR_COLOR_IDS),expression:r.enum(f).default(`relaxed`)}).strict(),an=r.array(r.string().trim().min(1).max(200)).max(4);function agentAvatarFromMetadata(e){let t=rn.safeParse(e);return t.success?t.data:void 0}const on=[`record.created`,`record.updated`,`record.deleted`,`form.submitted`,`webhook`,`github`,`slack`],sn=new Set([`record.created`,`record.updated`,`record.deleted`]),cn=/^[A-Z_][A-Z0-9_]*$/,ln=r.object({cron:r.string().min(9),timezone:r.string().optional(),enabled:r.boolean(),input:r.record(r.string(),r.unknown()).optional(),runFor:r.enum([`armer`,`audience`]).optional(),audience:r.object({workspace:r.boolean(),roleIds:r.array(r.uuid()),actorIds:r.array(r.uuid())}).optional(),continueConversation:r.boolean().optional()}),un=/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/,X=r.object({name:r.string().max(120).optional(),eventType:r.enum(on),objectId:r.guid().optional(),watchedFields:r.array(r.string()).max(50).optional(),debounceMs:r.number().int().min(0).max(3e5).optional(),filter:r.object({combinator:r.enum([`and`,`or`]).default(`and`),rules:r.array(r.object({attribute:r.string(),operator:r.string(),value:r.unknown().optional()}))}).optional(),formDefinitionId:r.string().optional(),continuationKey:r.string().max(200).regex(un).nullable().optional(),connectionId:r.guid().optional(),match:ct.optional(),continueConversation:r.boolean().optional(),enabled:r.boolean().optional()});function refineTrigger(e){return e.refine(e=>!e.watchedFields?.length||e.eventType===`record.updated`,{message:`watchedFields requires eventType=record.updated`,path:[`watchedFields`]}).refine(e=>!(e.eventType&&sn.has(e.eventType))||!!e.objectId,{message:`objectId is required for record.* triggers`,path:[`objectId`]}).refine(e=>!(e.continuationKey&&e.eventType)||e.eventType===`webhook`,{message:`continuationKey requires eventType=webhook`,path:[`continuationKey`]}).superRefine((e,t)=>{let n=e.eventType===`github`||e.eventType===`slack`;if(n&&!e.connectionId&&t.addIssue({code:`custom`,path:[`connectionId`],message:`connectionId is required for native connector triggers`}),n&&!e.match&&t.addIssue({code:`custom`,path:[`match`],message:`match is required for native connector triggers`}),e.match&&e.eventType&&((e.eventType===`github`?`family`in e.match:e.eventType===`slack`&&`on`in e.match)||t.addIssue({code:`custom`,path:[`match`],message:`match must belong to the trigger provider`})),e.eventType&&!n)for(let n of[`connectionId`,`continueConversation`])e[n]!==void 0&&t.addIssue({code:`custom`,path:[n],message:`${n} requires a native connector trigger`})})}const dn=refineTrigger(X).transform(e=>({...e,...e.eventType===`github`||e.eventType===`slack`?{continueConversation:e.continueConversation??!0}:{}})),fn=X.partial();function parseMergedAgentTrigger(e,t){let n=fn.safeParse(t);if(!n.success)throw triggerValidationError(n.error);let r=Object.fromEntries(Object.entries(n.data).filter(([,e])=>e!==void 0)),i=dn.safeParse({...e,...r});if(!i.success)throw triggerValidationError(i.error);return i.data}function triggerValidationError(e){return new t.ValidationError(`Invalid agent trigger`,e.issues.map(e=>({path:e.path.map(String),message:e.message})))}const Z=r.uuid(),Q=r.record(r.string(),r.unknown()),pn=r.strictObject({objectName:r.string(),recordId:Z,attribute:r.string(),base:r.unknown(),props:Q.optional()}),mn=r.strictObject({kind:r.literal(`record.set`),objectId:Z,recordId:Z,values:Q,base:Q.optional()}),hn=r.strictObject({kind:r.literal(`record.create`),objectId:Z,recordId:Z,values:Q,options:r.strictObject({visibility:r.enum([`workspace`,`private`]).optional(),allowDraft:r.boolean().optional(),linkTo:pn.optional(),parentId:Z.optional()}).optional()}),gn=r.strictObject({kind:r.literal(`record.delete`),objectId:Z,recordId:Z}),_n=r.strictObject({kind:r.literal(`record.restore`),objectId:Z,recordId:Z}),$=r.string().min(1),vn=r.discriminatedUnion(`command`,[r.strictObject({command:r.literal(`replace`),oldText:$,newText:r.string(),replaceAll:r.boolean().optional()}),r.strictObject({command:r.literal(`insert`),text:$,after:$.optional()})]),yn=r.strictObject({kind:r.literal(`record.patch`),objectId:Z,recordId:Z,attribute:r.string(),edit:vn}),bn=r.discriminatedUnion(`kind`,[mn,hn,gn,_n,yn]),xn=r.strictObject({opId:Z,steps:r.array(bn).min(1).max(100)}).superRefine((e,t)=>{let n=new Set;for(let r of e.steps){if(n.has(r.recordId)){t.addIssue({code:`custom`,message:`one step per record`,path:[`steps`]});return}n.add(r.recordId)}});Object.defineProperty(exports,"ACCESS_LEVELS",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"ACCESS_ROLES",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"AGENT_ASIDE_ANSWER_MAX_LENGTH",{enumerable:!0,get:function(){return 32e3}}),Object.defineProperty(exports,"AGENT_ASIDE_HISTORY_LIMIT",{enumerable:!0,get:function(){return 20}}),Object.defineProperty(exports,"AGENT_ASIDE_QUESTION_MAX_LENGTH",{enumerable:!0,get:function(){return 4e3}}),Object.defineProperty(exports,"AGENT_AVATAR_EXPRESSIONS",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"AGENT_AVATAR_TYPES",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"AGENT_MESSAGE_KIND",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"AGENT_NOTIFICATION_KIND",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"AGENT_SESSION_ACCESS_ROLES",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"AGENT_SESSION_LIST_ORDERS",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"AGENT_SESSION_ORIGINS",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"AGENT_SESSION_PROVENANCES",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"AGENT_STARTERS_MAX",{enumerable:!0,get:function(){return 4}}),Object.defineProperty(exports,"AGENT_STARTER_MAX_LENGTH",{enumerable:!0,get:function(){return 200}}),Object.defineProperty(exports,"AGENT_SYSTEM_PROMPT_MAX_LENGTH",{enumerable:!0,get:function(){return 5e4}}),Object.defineProperty(exports,"AGENT_TASK_KINDS",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"ALL_CATALOG_TOOL_NAMES",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"ALWAYS_KINDS",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"APPROVAL_FAMILY_TOOL_NAMES",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"ARCHITECT_PUBLICATION_KIND",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"ASK_QUESTIONS_ANSWER_MAX_LENGTH",{enumerable:!0,get:function(){return 2e3}}),Object.defineProperty(exports,"ASK_QUESTIONS_ANSWER_MAX_VALUES",{enumerable:!0,get:function(){return 50}}),Object.defineProperty(exports,"ASK_QUESTIONS_MAX_BATCH",{enumerable:!0,get:function(){return 4}}),Object.defineProperty(exports,"ASK_QUESTIONS_TOOL_NAME",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"AUDIT_ACTIONS",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"AUDIT_AGENT_SESSION_METADATA_KEY",{enumerable:!0,get:function(){return`agentSessionId`}}),Object.defineProperty(exports,"AUDIT_RESOURCE_TYPES",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"AgentBuilder",{enumerable:!0,get:function(){return AgentBuilder}}),Object.defineProperty(exports,"BROWSER_LAUNCH_TOOL_NAME",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"BROWSER_TOOL_NAMES",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"BUNDLE_LOCALES",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"BUNDLE_SETUP_PROMPT_MAX_LENGTH",{enumerable:!0,get:function(){return 2e3}}),Object.defineProperty(exports,"CONNECTION_GRANT_PROVIDERS",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"CONTINUATION_KEY_PATTERN",{enumerable:!0,get:function(){return un}}),Object.defineProperty(exports,"CONVERSATION_SURFACES",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"COPY_VERB_NAME",{enumerable:!0,get:function(){return`copy`}}),Object.defineProperty(exports,"CORE_RECORD_TOOL_NAMES",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"CORE_TOOL_NAMES",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"COUNT_MODES",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"DEFAULT_AGENT_EXECUTION_CONFIG",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"DEFAULT_AGENT_TOOL_GROUPS",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"DEFAULT_APPROVAL_POLICY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"DEFAULT_BLUEPRINT_TOOL_GROUPS",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"DEFAULT_DAILY_ACTIVITY_DAYS",{enumerable:!0,get:function(){return 182}}),Object.defineProperty(exports,"DEFAULT_MEETING_BOT_DISPLAY_NAME",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"DEFAULT_TENANT_SETTINGS",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"DEVICE_ACCESS_ROLES",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"DISCARD_ARCHITECT_DRAFT_TOOL_NAME",{enumerable:!0,get:function(){return`discard_architect_draft`}}),Object.defineProperty(exports,"DOCUMENT_SORT_MODES",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"DRAFT_WRITE_TOOL_NAMES",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"EMAIL_CATEGORY_DEFAULT_COLOR",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"EMAIL_CATEGORY_DEFAULT_ICON",{enumerable:!0,get:function(){return`tag`}}),Object.defineProperty(exports,"EMAIL_CATEGORY_DESCRIPTION_MAX",{enumerable:!0,get:function(){return 500}}),Object.defineProperty(exports,"EMAIL_CATEGORY_DESCRIPTION_MIN",{enumerable:!0,get:function(){return 10}}),Object.defineProperty(exports,"EMAIL_CATEGORY_LIMIT",{enumerable:!0,get:function(){return 8}}),Object.defineProperty(exports,"EMAIL_CATEGORY_NAME_MAX",{enumerable:!0,get:function(){return 24}}),Object.defineProperty(exports,"ENVIRONMENT_BUILD_LOG_STEP_PREFIX",{enumerable:!0,get:function(){return`── `}}),Object.defineProperty(exports,"ENVIRONMENT_HARNESSES",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"ENVIRONMENT_HARNESS_SANDBOX_WORKDIR",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"ENVIRONMENT_HARNESS_WORKDIR",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"ENVIRONMENT_IMAGES",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"ENVIRONMENT_MEMORY_GB_PER_VCPU",{enumerable:!0,get:function(){return 2}}),Object.defineProperty(exports,"ENVIRONMENT_NAME_MAX_CHARS",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"ENVIRONMENT_NETWORK_ALLOW_MAX",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"ENVIRONMENT_SCRIPT_MAX_BYTES",{enumerable:!0,get:function(){return 65536}}),Object.defineProperty(exports,"ENVIRONMENT_SIZES",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"ENVIRONMENT_SIZE_VCPUS",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"ENVIRONMENT_STANDARDS_WORKDIR",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"ENV_VAR_KEY_PATTERN",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,"ESTIMATED_COUNT_CAP",{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,"FILE_URLS_MAX_IDS",{enumerable:!0,get:function(){return 200}}),Object.defineProperty(exports,"GET_ARCHITECT_DRAFT_TOOL_NAME",{enumerable:!0,get:function(){return`get_architect_draft`}}),Object.defineProperty(exports,"GITHUB_TRIGGER_CATALOG",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"GRANT_ENABLES",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"HITL_TOOL_NAMES",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"INFERENCE_REASONING_OPTIONS",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"INFERENCE_ROUTING_MODES",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"INFERENCE_SPEEDS",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"LAST_RUN_ERROR_MAX_LENGTH",{enumerable:!0,get:function(){return 200}}),Object.defineProperty(exports,"MAILBOX_LIST_MODES",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"MAIL_DRAFT_BODY_MAX_CHARS",{enumerable:!0,get:function(){return 2e5}}),Object.defineProperty(exports,"MAIL_SIGNATURE_MAX_CHARS",{enumerable:!0,get:function(){return 2e4}}),Object.defineProperty(exports,"MAIL_SUBJECT_MAX_CHARS",{enumerable:!0,get:function(){return 998}}),Object.defineProperty(exports,"MAX_DAILY_ACTIVITY_DAYS",{enumerable:!0,get:function(){return 366}}),Object.defineProperty(exports,"MAX_TODOS",{enumerable:!0,get:function(){return 50}}),Object.defineProperty(exports,"MAX_TODO_DESCRIPTION_CHARS",{enumerable:!0,get:function(){return 500}}),Object.defineProperty(exports,"MAX_TODO_ID_CHARS",{enumerable:!0,get:function(){return 80}}),Object.defineProperty(exports,"MCP_SERVER_NAME_MAX_LENGTH",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"MEETING_BOT_IMAGE",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,"MEETING_BOT_IMAGE_BASE64_MAX_LENGTH",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"MEETING_BOT_NO_CREDITS",{enumerable:!0,get:function(){return`MEETING_BOT_NO_CREDITS`}}),Object.defineProperty(exports,"MEETING_BOT_SILENT_REASON",{enumerable:!0,get:function(){return`sent nothing back`}}),Object.defineProperty(exports,"MEETING_RESPONSES",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"MEMORY_SPEND_LIMIT_PATTERN",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"McpOAuthCompletionMode",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"NATIVE_TOOL_GROUPS",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"NATIVE_TOOL_GROUP_CATALOG",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"NO_RECORDING",{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,"OPEN_TOOL_PART_STATES",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"OPERATION_MAX_STEPS",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"PROVIDER_DRAFT_LABEL",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"PROVIDER_NAMES",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"PUBLIC_MAIL_DOMAINS",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"QUESTION_FAMILY_TOOL_NAMES",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"RECENT_ACTIVITY_LEDGER_LIMIT",{enumerable:!0,get:function(){return 50}}),Object.defineProperty(exports,"RECIPIENT_IDENTITIES_MAX",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"RECORDING_OVERRIDES",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"RECORDING_POLICIES",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,"RECORD_ACCESS_ROLES",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"RECORD_ACCESS_SOURCES",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"RECORD_DRIVE_CURSOR_MAX_LENGTH",{enumerable:!0,get:function(){return 2048}}),Object.defineProperty(exports,"RECORD_DRIVE_PAGE_DEFAULT_LIMIT",{enumerable:!0,get:function(){return 100}}),Object.defineProperty(exports,"RECORD_DRIVE_PAGE_MAX_LIMIT",{enumerable:!0,get:function(){return 500}}),Object.defineProperty(exports,"RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE",{enumerable:!0,get:function(){return 50}}),Object.defineProperty(exports,"RECORD_GRAPH_MAX_LIMIT_PER_NODE",{enumerable:!0,get:function(){return 200}}),Object.defineProperty(exports,"RECORD_GRAPH_MAX_NODES",{enumerable:!0,get:function(){return 50}}),Object.defineProperty(exports,"RECORD_IMAGE_MAX_BYTES",{enumerable:!0,get:function(){return 5242880}}),Object.defineProperty(exports,"REPLY_MODES",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"REQUEST_DESIGN_REVIEW_TOOL_NAME",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"REQUEST_SETUP_TOOL_NAME",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"RESOURCE_GRANT_KINDS",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"RESOURCE_KIND_CATALOG",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"ROUTING_PRICE_CEILINGS",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"SEND_VERB_NAME",{enumerable:!0,get:function(){return`send`}}),Object.defineProperty(exports,"SESSION_INFERENCE_PATCH_KEYS",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"SLACK_TRIGGER_CATALOG",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"SPEAKS_THROUGH_SEND_METADATA_KEY",{enumerable:!0,get:function(){return`speaksThroughSend`}}),Object.defineProperty(exports,"SURFACE_TOOL_NAMES",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"SYSTEM_EMAIL_CATEGORIES",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"SYSTEM_EMAIL_CATEGORY_NAMES",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"SYSTEM_PART_CODES",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"TASK_DEMAND_LEVELS",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"TODO_PHASES",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"TODO_PLAN_STATUSES",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"TODO_STATUSES",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"TOOL_APPROVAL_STATES",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"TOOL_IMPACT_COUNT_KEYS",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"TRIAGE_ACTIONS",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,"TRIGGER_EVENT_TYPES",{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,"TURN_OUTCOMES",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"UNSHAREABLE_OBJECT_NAMES",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"USERS_RESOLVE_MAX_IDS",{enumerable:!0,get:function(){return 200}}),Object.defineProperty(exports,"USER_STATUSES",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"USER_WORK_POSTURES",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"VERB_NAMES",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"agent",{enumerable:!0,get:function(){return agent}}),Object.defineProperty(exports,"agentAvatarFromMetadata",{enumerable:!0,get:function(){return agentAvatarFromMetadata}}),Object.defineProperty(exports,"agentAvatarSchema",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,"agentDataChunk",{enumerable:!0,get:function(){return agentDataChunk}}),Object.defineProperty(exports,"agentDisplayName",{enumerable:!0,get:function(){return agentDisplayName}}),Object.defineProperty(exports,"agentInferencePreferencesSchema",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,"agentMessageAttachmentSchema",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"agentMessagePartSchema",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"agentScheduleSchema",{enumerable:!0,get:function(){return ln}}),Object.defineProperty(exports,"agentSessionInferenceOverridesInputSchema",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"agentSessionInferenceOverridesSchema",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"agentSessionMessageSchema",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,"agentStartersSchema",{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,"agentTriggerBaseSchema",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"agentTriggerPatchSchema",{enumerable:!0,get:function(){return fn}}),Object.defineProperty(exports,"agentTriggerSchema",{enumerable:!0,get:function(){return dn}}),Object.defineProperty(exports,"agentUIValidationError",{enumerable:!0,get:function(){return agentUIValidationError}}),Object.defineProperty(exports,"artifactQuoteSchema",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,"askQuestionsOutputSchema",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"assertCustomAgentUIMessageChunk",{enumerable:!0,get:function(){return assertCustomAgentUIMessageChunk}}),Object.defineProperty(exports,"assertSessionState",{enumerable:!0,get:function(){return assertSessionState}}),Object.defineProperty(exports,"canonicalToolGroups",{enumerable:!0,get:function(){return canonicalToolGroups}}),Object.defineProperty(exports,"classificationRestoreSchema",{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,"classifyEmailSchema",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,"cliDefaultModelOf",{enumerable:!0,get:function(){return cliDefaultModelOf}}),Object.defineProperty(exports,"compareAgentSessionMessages",{enumerable:!0,get:function(){return compareAgentSessionMessages}}),Object.defineProperty(exports,"compiledHarnessModels",{enumerable:!0,get:function(){return compiledHarnessModels}}),Object.defineProperty(exports,"connectionGrantKindsOf",{enumerable:!0,get:function(){return connectionGrantKindsOf}}),Object.defineProperty(exports,"connectorTriggerMatchSchema",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"customDataChunkSchemas",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"decodeAgentSessionListCursor",{enumerable:!0,get:function(){return decodeAgentSessionListCursor}}),Object.defineProperty(exports,"deriveViewerAccess",{enumerable:!0,get:function(){return deriveViewerAccess}}),Object.defineProperty(exports,"durableDateSchema",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,"emailCategoryCreateSchema",{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,"emailCategoryDeleteSchema",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,"emailCategoryScopeQuerySchema",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,"emailCategoryUpdateSchema",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,"emailRuleScopeSchema",{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,"encodeAgentSessionListCursor",{enumerable:!0,get:function(){return encodeAgentSessionListCursor}}),Object.defineProperty(exports,"environmentHarness",{enumerable:!0,get:function(){return environmentHarness}}),Object.defineProperty(exports,"environmentWorkdir",{enumerable:!0,get:function(){return environmentWorkdir}}),Object.defineProperty(exports,"findEnvironmentHarness",{enumerable:!0,get:function(){return findEnvironmentHarness}}),Object.defineProperty(exports,"githubConditionSchema",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"githubTriggerMatchSchema",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"grantKindOf",{enumerable:!0,get:function(){return grantKindOf}}),Object.defineProperty(exports,"harnessModelChoices",{enumerable:!0,get:function(){return harnessModelChoices}}),Object.defineProperty(exports,"humanRequestId",{enumerable:!0,get:function(){return humanRequestId}}),Object.defineProperty(exports,"humanRequestKind",{enumerable:!0,get:function(){return humanRequestKind}}),Object.defineProperty(exports,"imageModelIdSchema",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"inferenceReasoningSchema",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"inferenceRoutingSchema",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"inferenceSpeedSchema",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"isAgentMessageMetadata",{enumerable:!0,get:function(){return isAgentMessageMetadata}}),Object.defineProperty(exports,"isAgentNotificationMetadata",{enumerable:!0,get:function(){return isAgentNotificationMetadata}}),Object.defineProperty(exports,"isAgentUIDataName",{enumerable:!0,get:function(){return isAgentUIDataName}}),Object.defineProperty(exports,"isAgentWrittenAuditEntry",{enumerable:!0,get:function(){return isAgentWrittenAuditEntry}}),Object.defineProperty(exports,"isArchitectPublicationMetadata",{enumerable:!0,get:function(){return isArchitectPublicationMetadata}}),Object.defineProperty(exports,"isAwaitingHuman",{enumerable:!0,get:function(){return isAwaitingHuman}}),Object.defineProperty(exports,"isBlocking",{enumerable:!0,get:function(){return isBlocking}}),Object.defineProperty(exports,"isEnvironmentHarnessId",{enumerable:!0,get:function(){return isEnvironmentHarnessId}}),Object.defineProperty(exports,"isMailProvider",{enumerable:!0,get:function(){return isMailProvider}}),Object.defineProperty(exports,"isMailboxListMode",{enumerable:!0,get:function(){return isMailboxListMode}}),Object.defineProperty(exports,"isNativeToolGroup",{enumerable:!0,get:function(){return isNativeToolGroup}}),Object.defineProperty(exports,"isOpenToolPartState",{enumerable:!0,get:function(){return isOpenToolPartState}}),Object.defineProperty(exports,"isParkedOnHuman",{enumerable:!0,get:function(){return isParkedOnHuman}}),Object.defineProperty(exports,"isProviderDraft",{enumerable:!0,get:function(){return isProviderDraft}}),Object.defineProperty(exports,"isPublicMailDomain",{enumerable:!0,get:function(){return isPublicMailDomain}}),Object.defineProperty(exports,"isQuestionPart",{enumerable:!0,get:function(){return isQuestionPart}}),Object.defineProperty(exports,"isReplyMode",{enumerable:!0,get:function(){return isReplyMode}}),Object.defineProperty(exports,"isResourceGrant",{enumerable:!0,get:function(){return isResourceGrant}}),Object.defineProperty(exports,"isRoutineActorMetadata",{enumerable:!0,get:function(){return isRoutineActorMetadata}}),Object.defineProperty(exports,"isSessionInferencePatch",{enumerable:!0,get:function(){return isSessionInferencePatch}}),Object.defineProperty(exports,"isSystemEmailCategory",{enumerable:!0,get:function(){return isSystemEmailCategory}}),Object.defineProperty(exports,"isSystemEmailCategoryName",{enumerable:!0,get:function(){return isSystemEmailCategoryName}}),Object.defineProperty(exports,"isSystemPartCode",{enumerable:!0,get:function(){return isSystemPartCode}}),Object.defineProperty(exports,"isToolApprovalState",{enumerable:!0,get:function(){return isToolApprovalState}}),Object.defineProperty(exports,"isToolImpactCountKey",{enumerable:!0,get:function(){return isToolImpactCountKey}}),Object.defineProperty(exports,"lockingSendCall",{enumerable:!0,get:function(){return lockingSendCall}}),Object.defineProperty(exports,"meetingBotDispatchRequestSchema",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"meetingBotDispatchResponseSchema",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,"meetingBotNotificationSchema",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,"meetingTranscriptSegmentSchema",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,"mentionReferenceSchema",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,"mergeSessionInferencePatch",{enumerable:!0,get:function(){return mergeSessionInferencePatch}}),Object.defineProperty(exports,"modelDefinitionSchema",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,"modelReferenceSchema",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"moveImpactSchema",{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,"needsManageWhenUnattended",{enumerable:!0,get:function(){return needsManageWhenUnattended}}),Object.defineProperty(exports,"normalizedMeetingTranscriptSchema",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,"openRequests",{enumerable:!0,get:function(){return openRequests}}),Object.defineProperty(exports,"orderAgentSessionMessages",{enumerable:!0,get:function(){return orderAgentSessionMessages}}),Object.defineProperty(exports,"parseAgentDefinitionAccessRole",{enumerable:!0,get:function(){return parseAgentDefinitionAccessRole}}),Object.defineProperty(exports,"parseAgentSessionAccessRole",{enumerable:!0,get:function(){return parseAgentSessionAccessRole}}),Object.defineProperty(exports,"parseCountMode",{enumerable:!0,get:function(){return parseCountMode}}),Object.defineProperty(exports,"parseDeviceAccessRole",{enumerable:!0,get:function(){return parseDeviceAccessRole}}),Object.defineProperty(exports,"parseMergedAgentTrigger",{enumerable:!0,get:function(){return parseMergedAgentTrigger}}),Object.defineProperty(exports,"parseOptionalCountMode",{enumerable:!0,get:function(){return parseOptionalCountMode}}),Object.defineProperty(exports,"parsePageAccessRole",{enumerable:!0,get:function(){return parsePageAccessRole}}),Object.defineProperty(exports,"parseRecordAccessRole",{enumerable:!0,get:function(){return parseRecordAccessRole}}),Object.defineProperty(exports,"parseToolGroupGrant",{enumerable:!0,get:function(){return parseToolGroupGrant}}),Object.defineProperty(exports,"providerNameSchema",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"readArchitectPublication",{enumerable:!0,get:function(){return readArchitectPublication}}),Object.defineProperty(exports,"readAskQuestionsResult",{enumerable:!0,get:function(){return readAskQuestionsResult}}),Object.defineProperty(exports,"recentActivityEntryKey",{enumerable:!0,get:function(){return recentActivityEntryKey}}),Object.defineProperty(exports,"recordGraphNodeKey",{enumerable:!0,get:function(){return recordGraphNodeKey}}),Object.defineProperty(exports,"recordGraphRequestSchema",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"recordMeetingsCount",{enumerable:!0,get:function(){return recordMeetingsCount}}),Object.defineProperty(exports,"recordOperationSchema",{enumerable:!0,get:function(){return xn}}),Object.defineProperty(exports,"refineTrigger",{enumerable:!0,get:function(){return refineTrigger}}),Object.defineProperty(exports,"resourceGrant",{enumerable:!0,get:function(){return resourceGrant}}),Object.defineProperty(exports,"routedMessageInferenceSchema",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"sessionInferencePatchSchema",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"slackConditionSchema",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"slackTriggerMatchSchema",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"todoItemSchema",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"todoPlanSchema",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,"toolImpactSchema",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"utf8ByteLength",{enumerable:!0,get:function(){return utf8ByteLength}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { TextAttribute } from "./attributes-
|
|
3
|
-
import { ValidationMessages } from "./index-
|
|
2
|
+
import { TextAttribute } from "./attributes-QBySx30F.mjs";
|
|
3
|
+
import { ValidationMessages } from "./index-jE6uAt4g.mjs";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/primitives/text.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { TextAttribute } from "./attributes-
|
|
3
|
-
import { ValidationMessages } from "./index-
|
|
2
|
+
import { TextAttribute } from "./attributes-DW19xkoM.js";
|
|
3
|
+
import { ValidationMessages } from "./index-BFKJEyq-.js";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/primitives/text.d.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { SchemaError } from "./exceptions-
|
|
2
|
+
import { SchemaError } from "./exceptions-BHqt4Omx.mjs";
|
|
3
3
|
//#region src/utils/stable-json.d.ts
|
|
4
4
|
export declare class NonJsonValueError extends SchemaError {
|
|
5
5
|
constructor();
|
|
@@ -41,6 +41,16 @@ export declare function serializeCanonicalJson(value: unknown): string;
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function sameStableValue(left: unknown, right: unknown): boolean;
|
|
43
43
|
//#endregion
|
|
44
|
+
//#region src/utils/local-path.d.ts
|
|
45
|
+
/**
|
|
46
|
+
* A same-origin path, as the browser will resolve it. Not a prefix test:
|
|
47
|
+
* the URL parser turns `/\host` into `//host` and drops tabs and newlines,
|
|
48
|
+
* so `//host`, `/\host` and `/\t/host` all leave the origin. A path that
|
|
49
|
+
* resolves to `//…` (`/.//host`) is refused too: re-read as a URL by a
|
|
50
|
+
* router or a later hop, it names a host.
|
|
51
|
+
*/
|
|
52
|
+
export declare function isLocalPath(value: string): boolean;
|
|
53
|
+
//#endregion
|
|
44
54
|
//#region src/utils.d.ts
|
|
45
55
|
/**
|
|
46
56
|
* Brand symbol for nominal typing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { SchemaError } from "./exceptions-
|
|
2
|
+
import { SchemaError } from "./exceptions-BHqt4Omx.js";
|
|
3
3
|
//#region src/utils/stable-json.d.ts
|
|
4
4
|
export declare class NonJsonValueError extends SchemaError {
|
|
5
5
|
constructor();
|
|
@@ -41,6 +41,16 @@ export declare function serializeCanonicalJson(value: unknown): string;
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function sameStableValue(left: unknown, right: unknown): boolean;
|
|
43
43
|
//#endregion
|
|
44
|
+
//#region src/utils/local-path.d.ts
|
|
45
|
+
/**
|
|
46
|
+
* A same-origin path, as the browser will resolve it. Not a prefix test:
|
|
47
|
+
* the URL parser turns `/\host` into `//host` and drops tabs and newlines,
|
|
48
|
+
* so `//host`, `/\host` and `/\t/host` all leave the origin. A path that
|
|
49
|
+
* resolves to `//…` (`/.//host`) is refused too: re-read as a URL by a
|
|
50
|
+
* router or a later hop, it names a host.
|
|
51
|
+
*/
|
|
52
|
+
export declare function isLocalPath(value: string): boolean;
|
|
53
|
+
//#endregion
|
|
44
54
|
//#region src/utils.d.ts
|
|
45
55
|
/**
|
|
46
56
|
* Brand symbol for nominal typing.
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy } from "./utils-
|
|
3
|
-
export { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy };
|
|
2
|
+
import { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy, isLocalPath } from "./utils-BT8u9zYO.mjs";
|
|
3
|
+
export { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy, isLocalPath };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy } from "./utils-
|
|
3
|
-
export { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy };
|
|
2
|
+
import { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy, isLocalPath } from "./utils-CChBw_3d.js";
|
|
3
|
+
export { TenantId, UserId, Uuid, asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy, isLocalPath };
|
package/dist/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-B-gGq3FS.js");exports.asTenantId=e.asTenantId,exports.asUserId=e.asUserId,exports.canonicalStringify=e.canonicalStringify,exports.deepEqual=e.deepEqual,exports.generateId=e.generateId,exports.indexBy=e.indexBy;
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-B-gGq3FS.js"),t=require("./local-path-CDRPquGU.js");exports.asTenantId=e.asTenantId,exports.asUserId=e.asUserId,exports.canonicalStringify=e.canonicalStringify,exports.deepEqual=e.deepEqual,exports.generateId=e.generateId,exports.indexBy=e.indexBy,exports.isLocalPath=t.isLocalPath;
|
package/dist/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
import{asTenantId as e,asUserId as t,canonicalStringify as n,deepEqual as r,generateId as i,indexBy as a}from"./utils-DaejNWxh.mjs";export{e as asTenantId,t as asUserId,n as canonicalStringify,r as deepEqual,i as generateId,a as indexBy};
|
|
2
|
+
import{asTenantId as e,asUserId as t,canonicalStringify as n,deepEqual as r,generateId as i,indexBy as a}from"./utils-DaejNWxh.mjs";import{isLocalPath as o}from"./local-path-PA4ZoNKq.mjs";export{e as asTenantId,t as asUserId,n as canonicalStringify,r as deepEqual,i as generateId,a as indexBy,o as isLocalPath};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { SCHEMA_LIMITS, collectionContentSourceSchema, colorIdSchema, contentViewDefinitionSchema, draftContentViewDefinitionSchema, iconNameSchema, publishedViewContentDefinitionSchema } from "../all-
|
|
3
|
-
import { SIMPLE_PROPERTY_TYPES, WIRE_OFFERED_BASE_CONFIG, WIRE_OMITTED_CONFIG_KEYS, attributeConfigSchemas, getAttributeConfigSchema, getAttributeConfigWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, refuseForeignKeys, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema, wireHiddenTypeConfigMask, wireOmittedConfigKeysFor, withoutUnknownOptionKeys } from "../index-
|
|
4
|
-
import { DEFAULT_VALIDATION_MESSAGES, ValidationMessages, ValidationResult, formatZodErrors } from "../index-
|
|
5
|
-
import { createAttributeValidator, createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from "../index-
|
|
2
|
+
import { SCHEMA_LIMITS, collectionContentSourceSchema, colorIdSchema, contentViewDefinitionSchema, draftContentViewDefinitionSchema, iconNameSchema, publishedViewContentDefinitionSchema } from "../all-CkcnOJxd.mjs";
|
|
3
|
+
import { SIMPLE_PROPERTY_TYPES, WIRE_OFFERED_BASE_CONFIG, WIRE_OMITTED_CONFIG_KEYS, attributeConfigSchemas, getAttributeConfigSchema, getAttributeConfigWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, refuseForeignKeys, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema, wireHiddenTypeConfigMask, wireOmittedConfigKeysFor, withoutUnknownOptionKeys } from "../index-DR5eSskq.mjs";
|
|
4
|
+
import { DEFAULT_VALIDATION_MESSAGES, ValidationMessages, ValidationResult, formatZodErrors } from "../index-jE6uAt4g.mjs";
|
|
5
|
+
import { createAttributeValidator, createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from "../index-D_IPqiMd.mjs";
|
|
6
6
|
export { DEFAULT_VALIDATION_MESSAGES, SCHEMA_LIMITS, SIMPLE_PROPERTY_TYPES, type ValidationMessages, type ValidationResult, WIRE_OFFERED_BASE_CONFIG, WIRE_OMITTED_CONFIG_KEYS, attributeConfigSchemas, collectionContentSourceSchema, colorIdSchema, contentViewDefinitionSchema, createAttributeValidator, createFormAttributeValidator, draftContentViewDefinitionSchema, formatZodErrors, getAttributeConfigSchema, getAttributeConfigWriteSchema, iconNameSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, publishedViewContentDefinitionSchema, refuseForeignKeys, rejectUnknownAttributesOrThrow, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow, wireHiddenTypeConfigMask, wireOmittedConfigKeysFor, withoutUnknownOptionKeys };
|
package/dist/validation/all.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { SCHEMA_LIMITS, collectionContentSourceSchema, colorIdSchema, contentViewDefinitionSchema, draftContentViewDefinitionSchema, iconNameSchema, publishedViewContentDefinitionSchema } from "../all-
|
|
3
|
-
import { SIMPLE_PROPERTY_TYPES, WIRE_OFFERED_BASE_CONFIG, WIRE_OMITTED_CONFIG_KEYS, attributeConfigSchemas, getAttributeConfigSchema, getAttributeConfigWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, refuseForeignKeys, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema, wireHiddenTypeConfigMask, wireOmittedConfigKeysFor, withoutUnknownOptionKeys } from "../index-
|
|
4
|
-
import { DEFAULT_VALIDATION_MESSAGES, ValidationMessages, ValidationResult, formatZodErrors } from "../index-
|
|
5
|
-
import { createAttributeValidator, createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from "../index-
|
|
2
|
+
import { SCHEMA_LIMITS, collectionContentSourceSchema, colorIdSchema, contentViewDefinitionSchema, draftContentViewDefinitionSchema, iconNameSchema, publishedViewContentDefinitionSchema } from "../all-Cg6JJd0x.js";
|
|
3
|
+
import { SIMPLE_PROPERTY_TYPES, WIRE_OFFERED_BASE_CONFIG, WIRE_OMITTED_CONFIG_KEYS, attributeConfigSchemas, getAttributeConfigSchema, getAttributeConfigWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, refuseForeignKeys, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema, wireHiddenTypeConfigMask, wireOmittedConfigKeysFor, withoutUnknownOptionKeys } from "../index-Cc3a-97k.js";
|
|
4
|
+
import { DEFAULT_VALIDATION_MESSAGES, ValidationMessages, ValidationResult, formatZodErrors } from "../index-BFKJEyq-.js";
|
|
5
|
+
import { createAttributeValidator, createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from "../index-CtmwL85u.js";
|
|
6
6
|
export { DEFAULT_VALIDATION_MESSAGES, SCHEMA_LIMITS, SIMPLE_PROPERTY_TYPES, type ValidationMessages, type ValidationResult, WIRE_OFFERED_BASE_CONFIG, WIRE_OMITTED_CONFIG_KEYS, attributeConfigSchemas, collectionContentSourceSchema, colorIdSchema, contentViewDefinitionSchema, createAttributeValidator, createFormAttributeValidator, draftContentViewDefinitionSchema, formatZodErrors, getAttributeConfigSchema, getAttributeConfigWriteSchema, iconNameSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, publishedViewContentDefinitionSchema, refuseForeignKeys, rejectUnknownAttributesOrThrow, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow, wireHiddenTypeConfigMask, wireOmittedConfigKeysFor, withoutUnknownOptionKeys };
|
package/dist/validation/all.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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("../all-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../all-iuPkq14_.js"),t=require("../primitives-CVbrjJ24.js"),n=require("../config-YSw2jzWj.js"),r=require("../object-5-wnsH0o.js"),i=require("../core-DAxRlJ5i.js");exports.DEFAULT_VALIDATION_MESSAGES=i.DEFAULT_VALIDATION_MESSAGES,exports.SCHEMA_LIMITS=t.SCHEMA_LIMITS,exports.SIMPLE_PROPERTY_TYPES=n.SIMPLE_PROPERTY_TYPES,exports.WIRE_OFFERED_BASE_CONFIG=n.WIRE_OFFERED_BASE_CONFIG,exports.WIRE_OMITTED_CONFIG_KEYS=n.WIRE_OMITTED_CONFIG_KEYS,exports.attributeConfigSchemas=n.attributeConfigSchemas,exports.collectionContentSourceSchema=e.collectionContentSourceSchema,exports.colorIdSchema=t.colorIdSchema,exports.contentViewDefinitionSchema=e.contentViewDefinitionSchema,exports.createAttributeValidator=r.createAttributeValidator,exports.createFormAttributeValidator=r.createFormAttributeValidator,exports.draftContentViewDefinitionSchema=e.draftContentViewDefinitionSchema,exports.formatZodErrors=i.formatZodErrors,exports.getAttributeConfigSchema=n.getAttributeConfigSchema,exports.getAttributeConfigWriteSchema=n.getAttributeConfigWriteSchema,exports.iconNameSchema=t.iconNameSchema,exports.parseAttributeConfig=n.parseAttributeConfig,exports.parseAttributeConfigForCreate=n.parseAttributeConfigForCreate,exports.parseAttributeConfigForUpdate=n.parseAttributeConfigForUpdate,exports.propertyAttributeSchema=n.propertyAttributeSchema,exports.propertyAttributeWireSchema=n.propertyAttributeWireSchema,exports.propertySchemaSchema=n.propertySchemaSchema,exports.propertySchemaWireSchema=n.propertySchemaWireSchema,exports.publishedViewContentDefinitionSchema=e.publishedViewContentDefinitionSchema,exports.refuseForeignKeys=n.refuseForeignKeys,exports.rejectUnknownAttributesOrThrow=r.rejectUnknownAttributesOrThrow,exports.selectOptionWriteSchema=n.selectOptionWriteSchema,exports.statusGroupSchema=n.statusGroupSchema,exports.statusOptionWriteSchema=n.statusOptionWriteSchema,exports.validateAttribute=r.validateAttribute,exports.validateDraft=r.validateDraft,exports.validateDraftOrThrow=r.validateDraftOrThrow,exports.validateObject=r.validateObject,exports.validateObjectOrThrow=r.validateObjectOrThrow,exports.wireHiddenTypeConfigMask=n.wireHiddenTypeConfigMask,exports.wireOmittedConfigKeysFor=n.wireOmittedConfigKeysFor,exports.withoutUnknownOptionKeys=n.withoutUnknownOptionKeys;
|
package/dist/validation/all.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
import{collectionContentSourceSchema as e,contentViewDefinitionSchema as t,draftContentViewDefinitionSchema as n,publishedViewContentDefinitionSchema as r}from"../all-
|
|
2
|
+
import{collectionContentSourceSchema as e,contentViewDefinitionSchema as t,draftContentViewDefinitionSchema as n,publishedViewContentDefinitionSchema as r}from"../all-B9epSh3g.mjs";import{SCHEMA_LIMITS as i,colorIdSchema as a,iconNameSchema as o}from"../primitives-BCJLtpaI.mjs";import{SIMPLE_PROPERTY_TYPES as s,WIRE_OFFERED_BASE_CONFIG as c,WIRE_OMITTED_CONFIG_KEYS as l,attributeConfigSchemas as u,getAttributeConfigSchema as d,getAttributeConfigWriteSchema as f,parseAttributeConfig as p,parseAttributeConfigForCreate as m,parseAttributeConfigForUpdate as h,propertyAttributeSchema as g,propertyAttributeWireSchema as _,propertySchemaSchema as v,propertySchemaWireSchema as y,refuseForeignKeys as b,selectOptionWriteSchema as x,statusGroupSchema as S,statusOptionWriteSchema as C,wireHiddenTypeConfigMask as w,wireOmittedConfigKeysFor as T,withoutUnknownOptionKeys as E}from"../config-iUwnquKr.mjs";import{createAttributeValidator as D,createFormAttributeValidator as O,rejectUnknownAttributesOrThrow as k,validateAttribute as A,validateDraft as j,validateDraftOrThrow as M,validateObject as N,validateObjectOrThrow as P}from"../object-BF5y6bgs.mjs";import{DEFAULT_VALIDATION_MESSAGES as F,formatZodErrors as I}from"../core-rKI7Q9_U.mjs";export{F as DEFAULT_VALIDATION_MESSAGES,i as SCHEMA_LIMITS,s as SIMPLE_PROPERTY_TYPES,c as WIRE_OFFERED_BASE_CONFIG,l as WIRE_OMITTED_CONFIG_KEYS,u as attributeConfigSchemas,e as collectionContentSourceSchema,a as colorIdSchema,t as contentViewDefinitionSchema,D as createAttributeValidator,O as createFormAttributeValidator,n as draftContentViewDefinitionSchema,I as formatZodErrors,d as getAttributeConfigSchema,f as getAttributeConfigWriteSchema,o as iconNameSchema,p as parseAttributeConfig,m as parseAttributeConfigForCreate,h as parseAttributeConfigForUpdate,g as propertyAttributeSchema,_ as propertyAttributeWireSchema,v as propertySchemaSchema,y as propertySchemaWireSchema,r as publishedViewContentDefinitionSchema,b as refuseForeignKeys,k as rejectUnknownAttributesOrThrow,x as selectOptionWriteSchema,S as statusGroupSchema,C as statusOptionWriteSchema,A as validateAttribute,j as validateDraft,M as validateDraftOrThrow,N as validateObject,P as validateObjectOrThrow,w as wireHiddenTypeConfigMask,T as wireOmittedConfigKeysFor,E as withoutUnknownOptionKeys};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { CurrencyAttribute } from "../../attributes-
|
|
3
|
-
import { ValidationMessages } from "../../index-
|
|
2
|
+
import { CurrencyAttribute } from "../../attributes-QBySx30F.mjs";
|
|
3
|
+
import { ValidationMessages } from "../../index-jE6uAt4g.mjs";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/complex/currency.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { CurrencyAttribute } from "../../attributes-
|
|
3
|
-
import { ValidationMessages } from "../../index-
|
|
2
|
+
import { CurrencyAttribute } from "../../attributes-DW19xkoM.js";
|
|
3
|
+
import { ValidationMessages } from "../../index-BFKJEyq-.js";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/complex/currency.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { LocationAttribute } from "../../attributes-
|
|
3
|
-
import { ValidationMessages } from "../../index-
|
|
2
|
+
import { LocationAttribute } from "../../attributes-QBySx30F.mjs";
|
|
3
|
+
import { ValidationMessages } from "../../index-jE6uAt4g.mjs";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/complex/location.d.ts
|
|
6
6
|
type LocationShape = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { LocationAttribute } from "../../attributes-
|
|
3
|
-
import { ValidationMessages } from "../../index-
|
|
2
|
+
import { LocationAttribute } from "../../attributes-DW19xkoM.js";
|
|
3
|
+
import { ValidationMessages } from "../../index-BFKJEyq-.js";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/complex/location.d.ts
|
|
6
6
|
type LocationShape = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { PhoneAttribute } from "../../attributes-
|
|
3
|
-
import { ValidationMessages } from "../../index-
|
|
2
|
+
import { PhoneAttribute } from "../../attributes-QBySx30F.mjs";
|
|
3
|
+
import { ValidationMessages } from "../../index-jE6uAt4g.mjs";
|
|
4
4
|
import * as z$2 from "zod";
|
|
5
5
|
//#region src/validation/complex/phone.d.ts
|
|
6
6
|
/**
|