@standards/schema 1.0.0-alpha.445 → 1.0.0-alpha.447

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/dist/access-levels-BWuVeyAD.js +2 -0
  2. package/dist/access-levels-CpH_EGwX.mjs +2 -0
  3. package/dist/access-output.schema-DdveaHhd.js +2 -0
  4. package/dist/access-output.schema-DrsybmDW.mjs +2 -0
  5. package/dist/access.operations-Bfr0Hr5a.mjs +2 -0
  6. package/dist/access.operations-Ta7Yti9-.js +2 -0
  7. package/dist/actors-D6cncaeM.mjs +2 -0
  8. package/dist/actors-DtSC4jD7.js +2 -0
  9. package/dist/actors.operations-BRdW-IBc.js +2 -0
  10. package/dist/actors.operations-SAbl_3vt.mjs +2 -0
  11. package/dist/admin-tenant-CnP_XZGi.js +2 -0
  12. package/dist/admin-tenant-DJ_Vt8X6.mjs +2 -0
  13. package/dist/agent-appearance.schema-5maenk3l.mjs +2 -0
  14. package/dist/agent-appearance.schema-Azj0Y4h4.js +2 -0
  15. package/dist/agent-approvals.operations-BXtDpYb9.js +2 -0
  16. package/dist/agent-approvals.operations-DrEi2amV.mjs +2 -0
  17. package/dist/agent-definitions.operations-CkfVj_vQ.mjs +2 -0
  18. package/dist/agent-definitions.operations-Dah-26La.js +2 -0
  19. package/dist/agent-fronts.operations-Q92n0JZN.js +2 -0
  20. package/dist/agent-fronts.operations-ZQUdWd_4.mjs +2 -0
  21. package/dist/agent-memory.operations-B0nLFWs9.js +2 -0
  22. package/dist/agent-memory.operations-C25OLsqq.mjs +2 -0
  23. package/dist/agent-message.schema-DwQVDXLy.mjs +2 -0
  24. package/dist/agent-message.schema-SmA4ydqf.js +2 -0
  25. package/dist/agent-messages.operations-Aa1vk7xu.mjs +2 -0
  26. package/dist/agent-messages.operations-CCXX8cuW.js +2 -0
  27. package/dist/agent-output.schema-8ajlE5_g.js +2 -0
  28. package/dist/agent-output.schema-BQsbh8pJ.mjs +2 -0
  29. package/dist/agent-runs.operations-BVNctI5C.js +2 -0
  30. package/dist/agent-runs.operations-Gp-UpNB9.mjs +2 -0
  31. package/dist/agent-schemas-52_rE61D.mjs +2 -0
  32. package/dist/agent-schemas-BmTE5O3J.js +2 -0
  33. package/dist/agent-session-list-cursor-BFnecxvH.js +2 -0
  34. package/dist/agent-session-list-cursor-cpmpINuz.mjs +2 -0
  35. package/dist/agent-sessions.operations-B8yM9St8.mjs +2 -0
  36. package/dist/agent-sessions.operations-Bu04RCgZ.js +2 -0
  37. package/dist/agent-triggers.operations-0tOTD7Vh.js +2 -0
  38. package/dist/agent-triggers.operations-BJz4_xUq.mjs +2 -0
  39. package/dist/ai-dictation-BJvVgzjC.mjs +2 -0
  40. package/dist/ai-dictation-zV6sAESe.js +2 -0
  41. package/dist/ai-output.schema-CQKoZCbn.mjs +2 -0
  42. package/dist/ai-output.schema-DHm6HAfH.js +2 -0
  43. package/dist/ai.operations--Cx0o8wQ.mjs +2 -0
  44. package/dist/ai.operations-DAKLy-dv.js +2 -0
  45. package/dist/all-BCAZCVxV.mjs +4 -0
  46. package/dist/all-PUaQuM_2.js +4 -0
  47. package/dist/api/http.d.mts +6 -0
  48. package/dist/api/http.d.ts +6 -0
  49. package/dist/api/http.js +2 -0
  50. package/dist/api/http.mjs +2 -0
  51. package/dist/api/index.d.mts +10 -26922
  52. package/dist/api/index.d.ts +10 -26922
  53. package/dist/api/index.js +1 -1
  54. package/dist/api/index.mjs +1 -1
  55. package/dist/api/wire.d.mts +93 -0
  56. package/dist/api/wire.d.ts +93 -0
  57. package/dist/api/wire.js +2 -0
  58. package/dist/api/wire.mjs +2 -0
  59. package/dist/api-keys-C9vGsnf5.mjs +2 -0
  60. package/dist/api-keys-DrqoTFFb.js +2 -0
  61. package/dist/api-keys.operations-BbAn06Vn.mjs +2 -0
  62. package/dist/api-keys.operations-Dtiv6rWJ.js +2 -0
  63. package/dist/app-operation-groups-B0GLoqHi.d.ts +26792 -0
  64. package/dist/app-operation-groups-CG6l7J3l.d.mts +26791 -0
  65. package/dist/appearance-C0Mh9jK2.mjs +2 -0
  66. package/dist/appearance-DrCaK9XJ.js +2 -0
  67. package/dist/artifacts.operations-D6aBIbPf.mjs +2 -0
  68. package/dist/artifacts.operations-DZ60VQ3Q.js +2 -0
  69. package/dist/attribute-validators-D9vS6qK9.mjs +11 -0
  70. package/dist/attribute-validators-j-HiW0On.js +11 -0
  71. package/dist/attributes-B2wmzoDI.js +2 -0
  72. package/dist/attributes-DYUkML5S.mjs +2 -0
  73. package/dist/audit-Cjoaib0c.js +2 -0
  74. package/dist/audit-jbBwdDtV.mjs +2 -0
  75. package/dist/audit.operations-CzoEnsuj.js +2 -0
  76. package/dist/audit.operations-R7llfS_r.mjs +2 -0
  77. package/dist/browser-profile-output.schema-ChhKkoin.mjs +2 -0
  78. package/dist/browser-profile-output.schema-DOGfwtLW.js +2 -0
  79. package/dist/browser-profiles.operations-BBdmypd0.js +2 -0
  80. package/dist/browser-profiles.operations-CUJaaU8y.mjs +2 -0
  81. package/dist/bundle-output.schema-Ck4tpVVV.js +2 -0
  82. package/dist/bundle-output.schema-UAlU8-CS.mjs +2 -0
  83. package/dist/bundles.operations-CplZLAxi.js +2 -0
  84. package/dist/bundles.operations-CrgrLCAC.mjs +2 -0
  85. package/dist/cli-login.operations-C1KbNeHA.js +2 -0
  86. package/dist/cli-login.operations-cUUchS4E.mjs +2 -0
  87. package/dist/connected-apps.operations-BavndGSL.js +2 -0
  88. package/dist/connected-apps.operations-DDDkIn_k.mjs +2 -0
  89. package/dist/connectors.operations-CR20Yhbf.mjs +2 -0
  90. package/dist/connectors.operations-CWW21SJJ.js +2 -0
  91. package/dist/consumer-variables.operations-Cc90oB8D.mjs +2 -0
  92. package/dist/consumer-variables.operations-DY9v4AY-.js +2 -0
  93. package/dist/decisions-CFoL49Jb.js +2 -0
  94. package/dist/decisions-DNvAXetH.mjs +2 -0
  95. package/dist/decisions.operations-BmQnmIwC.js +2 -0
  96. package/dist/decisions.operations-Dx-QEhXt.mjs +2 -0
  97. package/dist/device-channel-BQ8SMmLM.js +2 -0
  98. package/dist/device-channel-CmrDyl1C.mjs +2 -0
  99. package/dist/devices.operations-BJG7PBgi.js +2 -0
  100. package/dist/devices.operations-D4vKQtuv.mjs +2 -0
  101. package/dist/dictation.operations-BqbZnhBo.mjs +2 -0
  102. package/dist/dictation.operations-D0JxX5Ut.js +2 -0
  103. package/dist/documents-BrgkFEjS.mjs +2 -0
  104. package/dist/documents-KBlpK-vw.js +2 -0
  105. package/dist/documents.operations-BOstEBEu.mjs +2 -0
  106. package/dist/documents.operations-eY2Z-5Ss.js +2 -0
  107. package/dist/email-classification-DEHTSbVv.js +2 -0
  108. package/dist/email-classification-Jk8hARsL.mjs +2 -0
  109. package/dist/email-classification.operations-BBmw-sma.mjs +2 -0
  110. package/dist/email-classification.operations-C0nSe3CD.js +2 -0
  111. package/dist/email-classification.schema-B2RE9-Sz.js +2 -0
  112. package/dist/email-classification.schema-CzlbP3hF.mjs +2 -0
  113. package/dist/emails-COHIot9L.mjs +2 -0
  114. package/dist/emails-scn5zKZZ.js +2 -0
  115. package/dist/emails.operations-Bqd4AR-o.mjs +2 -0
  116. package/dist/emails.operations-nOPoU4qW.js +2 -0
  117. package/dist/embeddings-admin.operations-Cf12v9Y6.mjs +2 -0
  118. package/dist/embeddings-admin.operations-DN0wBZuY.js +2 -0
  119. package/dist/env-vars-C6h8XxDu.js +2 -0
  120. package/dist/env-vars-jepH5HKe.mjs +2 -0
  121. package/dist/env-vars.operations-CtwkPw4o.mjs +2 -0
  122. package/dist/env-vars.operations-DxgfKwIg.js +2 -0
  123. package/dist/environment-output.schema-BI9aKP85.js +2 -0
  124. package/dist/environment-output.schema-BLWKrRV9.mjs +2 -0
  125. package/dist/environments-Cjl7Rn63.js +2 -0
  126. package/dist/environments-NJ6AU6QA.mjs +2 -0
  127. package/dist/environments.operations-DOC5sPZj.js +2 -0
  128. package/dist/environments.operations-sRFx_6kV.mjs +2 -0
  129. package/dist/{exceptions-YHdKk5N8.d.ts → exceptions-Csd70p_-.d.ts} +19 -2
  130. package/dist/{exceptions-zQlC2r1F.d.mts → exceptions-gxRQUb2w.d.mts} +19 -2
  131. package/dist/exceptions.d.mts +1 -1
  132. package/dist/exceptions.d.ts +1 -1
  133. package/dist/exceptions.js +1 -1
  134. package/dist/exceptions.mjs +1 -1
  135. package/dist/files-BX-FFR4x.js +2 -0
  136. package/dist/files-sTU3trJX.mjs +2 -0
  137. package/dist/files.operations-ByEQ45rC.mjs +2 -0
  138. package/dist/files.operations-DvsUX624.js +2 -0
  139. package/dist/folders.operations-DjhIHfPy.mjs +2 -0
  140. package/dist/folders.operations-Dn9m5HgA.js +2 -0
  141. package/dist/forms.operations-DTe1LrLl.js +2 -0
  142. package/dist/forms.operations-HHnD9fWG.mjs +2 -0
  143. package/dist/geocoding.operations-C_22EAvv.mjs +2 -0
  144. package/dist/geocoding.operations-DI5T-bXQ.js +2 -0
  145. package/dist/human-request-BuTNChfy.js +2 -0
  146. package/dist/human-request-D386w0xS.mjs +2 -0
  147. package/dist/image-generation-JBLnNqb4.js +2 -0
  148. package/dist/image-generation-RBIQzj-e.mjs +2 -0
  149. package/dist/{index-D7FwaSvK.d.ts → index-O2gvfWg3.d.ts} +2354 -3541
  150. package/dist/index.d.mts +4 -4
  151. package/dist/index.d.ts +4 -4
  152. package/dist/index.js +2 -2
  153. package/dist/index.mjs +2 -2
  154. package/dist/input--LxhjMnL.js +2 -0
  155. package/dist/input-De22VS-9.mjs +2 -0
  156. package/dist/input-g4tO6Jkf.d.ts +82 -0
  157. package/dist/limits-C23L0g-a.js +2 -0
  158. package/dist/limits-DVUX5n4b.mjs +2 -0
  159. package/dist/linked-records-BjT-7LOU.mjs +2 -0
  160. package/dist/linked-records-CzzwaP1w.js +2 -0
  161. package/dist/logos.operations-Cof7YcyL.js +2 -0
  162. package/dist/logos.operations-DMp3Fv_i.mjs +2 -0
  163. package/dist/machines-BgWsvhyM.js +2 -0
  164. package/dist/machines-BwCQPG_y.mjs +2 -0
  165. package/dist/machines.operations-DuXeEb9-.js +2 -0
  166. package/dist/machines.operations-L17tNtr7.mjs +2 -0
  167. package/dist/mail-drafts.operations-BKMuIsFk.js +2 -0
  168. package/dist/mail-drafts.operations-CM-7tBgp.mjs +2 -0
  169. package/dist/mail-signatures.operations-maphvktU.js +2 -0
  170. package/dist/mail-signatures.operations-u61NViKI.mjs +2 -0
  171. package/dist/mcp-output.schema-B4xXiOjp.mjs +2 -0
  172. package/dist/mcp-output.schema-DWfW_GXR.js +2 -0
  173. package/dist/mcp-servers.operations-BBrpVqtv.mjs +2 -0
  174. package/dist/mcp-servers.operations-DKv3os6D.js +2 -0
  175. package/dist/meetings-C3LSWdAv.js +2 -0
  176. package/dist/meetings-ZzFZppmw.mjs +2 -0
  177. package/dist/meetings-admin.operations-CqOdAuEY.js +2 -0
  178. package/dist/meetings-admin.operations-DlBEkQ3A.mjs +2 -0
  179. package/dist/meetings.operations-CEodnE61.js +2 -0
  180. package/dist/meetings.operations-C_S4qoij.mjs +2 -0
  181. package/dist/models.operations-B-KLcOff.mjs +2 -0
  182. package/dist/models.operations-D1mh86qV.js +2 -0
  183. package/dist/move-impact.schema-CIhGrFEu.mjs +2 -0
  184. package/dist/move-impact.schema-Ur5k3_PI.js +2 -0
  185. package/dist/my-preferences-CtaRodws.js +2 -0
  186. package/dist/my-preferences-DLy4chuc.mjs +2 -0
  187. package/dist/news-feed.schema-BXcS3qnp.js +2 -0
  188. package/dist/news-feed.schema-uNDJX8lC.mjs +2 -0
  189. package/dist/news.operations-Ct__1yeE.js +2 -0
  190. package/dist/news.operations-bv6Xi29p.mjs +2 -0
  191. package/dist/oauth.operations-BkKp9Hys.js +2 -0
  192. package/dist/oauth.operations-Dwz0dPe0.mjs +2 -0
  193. package/dist/objects-DjZy05b7.js +2 -0
  194. package/dist/objects-LC_PpZf5.mjs +2 -0
  195. package/dist/operation-Ljhj0S-y.mjs +2 -0
  196. package/dist/operation-b0CY8USr.js +2 -0
  197. package/dist/output-CcagLVwl.js +2 -0
  198. package/dist/output-D0Gkm-0Z.mjs +2 -0
  199. package/dist/page-query-B8Evn_OX.mjs +2 -0
  200. package/dist/page-query-BIn1m1Dx.js +2 -0
  201. package/dist/pages-C1vZaC93.mjs +2 -0
  202. package/dist/pages-DQEuRvk2.js +2 -0
  203. package/dist/pages.operations-CWBsE2KN.js +2 -0
  204. package/dist/pages.operations-DE4h2piU.mjs +2 -0
  205. package/dist/pagination-B06cCddv.mjs +2 -0
  206. package/dist/pagination-CheieRD0.js +2 -0
  207. package/dist/path-Ch_NPREA.d.mts +81 -0
  208. package/dist/permission-catalog-7nqArygr.js +2 -0
  209. package/dist/permission-catalog-DVCRvATl.mjs +2 -0
  210. package/dist/permissions-BsNNXXmY.js +2 -0
  211. package/dist/permissions-CGYTdS2h.mjs +2 -0
  212. package/dist/permissions.operations-BpGpRcI5.js +2 -0
  213. package/dist/permissions.operations-CUOPZGr_.mjs +2 -0
  214. package/dist/plain-record-BnKWrGQv.js +2 -0
  215. package/dist/plain-record-is3DxPBL.mjs +2 -0
  216. package/dist/primitives-BlZoUw54.mjs +2 -0
  217. package/dist/primitives-x0WE42fG.js +2 -0
  218. package/dist/{record-query-BiyWXSWA.d.mts → proposal-types-BnAD5nxA.d.mts} +9741 -10928
  219. package/dist/proposal-types-Buln0mbM.js +2 -0
  220. package/dist/proposal-types-ncv1cymr.mjs +2 -0
  221. package/dist/query-integers-CZDEkFmm.mjs +2 -0
  222. package/dist/query-integers-EVkedFO4.js +2 -0
  223. package/dist/quota-CremykHV.mjs +2 -0
  224. package/dist/quota-lbHfQAU7.js +2 -0
  225. package/dist/quotas.operations-CDn6mxGZ.js +2 -0
  226. package/dist/quotas.operations-DuUMhQct.mjs +2 -0
  227. package/dist/recent-activity-CDUZCvvx.mjs +2 -0
  228. package/dist/recent-activity-CTn3aJC5.js +2 -0
  229. package/dist/recent-activity.operations-C8HN3T2E.mjs +2 -0
  230. package/dist/recent-activity.operations-Cv7zUBG5.js +2 -0
  231. package/dist/record-memory.operations-D8K9_bDh.js +2 -0
  232. package/dist/record-memory.operations-DNRWqANQ.mjs +2 -0
  233. package/dist/record-operation-CD04q2YF.mjs +2 -0
  234. package/dist/record-operation-CHR8fOWv.js +2 -0
  235. package/dist/record-operations.operations-2fObhHf5.mjs +2 -0
  236. package/dist/record-operations.operations-iGcbXsAX.js +2 -0
  237. package/dist/record-output.schema-7M4ZhtFF.mjs +2 -0
  238. package/dist/record-output.schema-B-LsiXui.js +2 -0
  239. package/dist/records.operations-DesIdHKN.js +2 -0
  240. package/dist/records.operations-XplmsQb5.mjs +2 -0
  241. package/dist/relation-output.schema-CMfZ80ZC.js +2 -0
  242. package/dist/relation-output.schema-DnC1Swai.mjs +2 -0
  243. package/dist/relations.operations-C8OKmNI3.mjs +2 -0
  244. package/dist/relations.operations-TbsHto3V.js +2 -0
  245. package/dist/rolldown-runtime-BXZUx0GO.js +2 -0
  246. package/dist/schema-draft.operations-BrhXpB88.js +2 -0
  247. package/dist/schema-draft.operations-DO2aPqiB.mjs +2 -0
  248. package/dist/schema-groups.operations-BKGvDU0g.mjs +2 -0
  249. package/dist/schema-groups.operations-CQJVh2ul.js +2 -0
  250. package/dist/schema-objects.operations-BIm7_OUC.js +2 -0
  251. package/dist/schema-objects.operations-CKZquSV-.mjs +2 -0
  252. package/dist/schema-output.schema-DToLL5Hj.mjs +2 -0
  253. package/dist/schema-output.schema-yXth-j90.js +2 -0
  254. package/dist/schema-state.operations-YgW67wKw.mjs +2 -0
  255. package/dist/schema-state.operations-_rWxCFRF.js +2 -0
  256. package/dist/screens.operations-C2PmD9Jo.mjs +2 -0
  257. package/dist/screens.operations-CMCDeLu5.js +2 -0
  258. package/dist/search-admin.operations-BuNlL2_R.js +2 -0
  259. package/dist/search-admin.operations-MaUHp0Ws.mjs +2 -0
  260. package/dist/search-output.schema-BGEo1jc3.mjs +2 -0
  261. package/dist/search-output.schema-BOnf-I4-.js +2 -0
  262. package/dist/search.operations-BU2vkMiM.mjs +2 -0
  263. package/dist/search.operations-CV4h80dL.js +2 -0
  264. package/dist/skills.operations-B89X73C5.mjs +2 -0
  265. package/dist/skills.operations-CI7WSfj8.js +2 -0
  266. package/dist/string-rules-BGEVHs7B.js +2 -0
  267. package/dist/string-rules-Oo22T_2_.mjs +2 -0
  268. package/dist/submission-DQQndGsT.mjs +2 -0
  269. package/dist/submission-Y4L17hji.js +2 -0
  270. package/dist/system-attributes-4e6FXKws.js +2 -0
  271. package/dist/system-attributes-vbOzw6KO.mjs +2 -0
  272. package/dist/tenant-invitations-C8eRu6F1.mjs +2 -0
  273. package/dist/tenant-invitations-DMnJYl5A.js +2 -0
  274. package/dist/tenant-invitations.operations-CoENfK1m.mjs +2 -0
  275. package/dist/tenant-invitations.operations-DVzd6sH6.js +2 -0
  276. package/dist/tenant-settings-DibR3Pj9.mjs +2 -0
  277. package/dist/tenant-settings-H8PuqeVJ.js +2 -0
  278. package/dist/tenant-settings.operations-BlOjAUBb.mjs +2 -0
  279. package/dist/tenant-settings.operations-D1tiAc5T.js +2 -0
  280. package/dist/tool-group-catalog-DcmK8-aP.mjs +2 -0
  281. package/dist/tool-group-catalog-VfPutaoA.js +2 -0
  282. package/dist/types-BaRAoumN.mjs +2 -0
  283. package/dist/types-Bbd8SJk_.mjs +2 -0
  284. package/dist/types-DLY2ZL0J.js +2 -0
  285. package/dist/types-HyrREoFh.js +2 -0
  286. package/dist/unchecked-C4sB97e1.js +2 -0
  287. package/dist/unchecked-DAFXyX5y.mjs +2 -0
  288. package/dist/user-profiles-CJHB2U55.js +2 -0
  289. package/dist/user-profiles-Dh5QFnXc.mjs +2 -0
  290. package/dist/users.operations-Bdz9bPn7.js +2 -0
  291. package/dist/users.operations-BhIIB4IN.mjs +2 -0
  292. package/dist/{utils-BZMgedee.d.mts → utils-BHf9KKOr.d.mts} +1 -1
  293. package/dist/{utils-CwQlKDYz.d.ts → utils-_R0m2ygt.d.ts} +1 -1
  294. package/dist/utils.d.mts +1 -1
  295. package/dist/utils.d.ts +1 -1
  296. package/dist/uuid-param-BuV4RQRp.mjs +2 -0
  297. package/dist/uuid-param-Djtff5Vy.js +2 -0
  298. package/dist/validation/all.d.mts +2 -2
  299. package/dist/validation/all.d.ts +2 -2
  300. package/dist/validation/all.js +1 -1
  301. package/dist/validation/all.mjs +1 -1
  302. package/dist/view-config.schema-BimOzKR_.js +2 -0
  303. package/dist/view-config.schema-DstNUMiD.mjs +2 -0
  304. package/dist/views.operations-B23oCL5P.js +2 -0
  305. package/dist/views.operations-B38jfGlX.mjs +2 -0
  306. package/dist/wire-types-B5ixUf2P.d.mts +11 -0
  307. package/dist/wire-types-btvuxrFk.d.ts +11 -0
  308. package/openapi.json +1957 -2503
  309. package/package.json +22 -2
  310. package/dist/all-BrGOpgV8.js +0 -4
  311. package/dist/all-Df9IeCkI.mjs +0 -4
  312. package/dist/attribute-validators-BJdOkURX.mjs +0 -11
  313. package/dist/attribute-validators-rgM_bLG1.js +0 -11
  314. package/dist/record-operation-BrYpYAKR.js +0 -2
  315. package/dist/record-operation-DSjDUW-6.mjs +0 -2
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- import{NonJsonValueError as e,asTenantId as t,asUserId as n,canonicalStringify as r,deepEqual as i,generateId as a,indexBy as o,sameStableValue as s,serializeCanonicalJson as c,serializeStableJson as l}from"./utils-DKrBP9EH.mjs";import{ACTIONABLE_DECISION_KINDS as u,AGENDA_BLOCK as d,AGGREGATE_BUCKETS as f,AGGREGATE_MEASURES as p,ARTIFACT_PREVIEW_EXTENSION as m,ATTRIBUTE_FILTER_OPERATORS as h,ATTRIBUTE_NAME_SCHEMA as ee,ATTRIBUTE_TYPES as te,ATTRIBUTE_TYPE_DESCRIPTORS as ne,BLOCK_CONTEXTS as re,BLOCK_PERIODS as ie,BLOCK_WIDTHS as g,CARD_BLOCK as _,CHART_BLOCK as v,CHART_KINDS as ae,CHART_ORDERS as oe,CONTENT_PLACEMENT_CONTEXTS as se,DECISIONS_BLOCK as ce,DECISION_INBOX_STATES as le,DECISION_KINDS as ue,DECISION_LINE_MAX_LENGTH as de,DECISION_LINK_TARGET_TYPES as fe,DECISION_LIST_STATES as pe,DECISION_READ_STATES as me,DECISION_SENDER_KINDS as he,DECISION_SETTINGS_AREAS as ge,DECISION_TITLE_MAX_LENGTH as _e,DECISION_TRANSFERS_KEY as ve,DECISION_TYPES_V1 as ye,DECISION_TYPE_ACCESS_GRANTED as be,DECISION_TYPE_AGENT_APPROVAL as xe,DECISION_TYPE_AGENT_MESSAGE as Se,DECISION_TYPE_AGENT_QUESTION as Ce,DECISION_TYPE_AGENT_REVIEW as we,DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED as Te,DECISION_TYPE_AGENT_SETUP as Ee,DECISION_TYPE_BUNDLE_SETUP as De,DECISION_TYPE_CONNECTOR_CONNECTION_ERROR as Oe,DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED as ke,DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED as Ae,DECISION_TYPE_ENVIRONMENT_BUILD_FAILED as je,DECISION_TYPE_KINDS as y,DECISION_TYPE_PERSON as Me,DECISION_TYPE_RECORD_ASSIGNED as Ne,DECISION_TYPE_RECORD_MENTIONED as Pe,DECISION_WORK_STATES as Fe,DEFAULT_LAYOUT_TRAITS as Ie,GROUPABLE_ATTRIBUTE_TYPES as Le,HEADING_BLOCK as Re,HIERARCHY_ATTRIBUTE_IDS as ze,HIERARCHY_ATTRIBUTE_NAMES as Be,HIERARCHY_CHILD_IDS_LIMIT as Ve,INVENTORY_LIMIT as He,LIST_VIEW_TAB_VISIBILITIES as Ue,LOCATION_FILTER_PROPERTIES as We,MAILBOX_BLOCK as Ge,MAX_AGGREGATE_GROUPS as Ke,MEASURABLE_ATTRIBUTE_TYPES as qe,MEETINGS_UPCOMING_BLOCK as Je,METRIC_BLOCK as b,NATIVE_BLOCKS as Ye,NATIVE_OBJECT_NAMES as Xe,NO_VALUE_OPERATORS as Ze,OBJECT_NAME_SCHEMA as Qe,OPERATORS_BY_TYPE as $e,PAGE_GRID_COLUMNS as et,QUALIFIED_SEPARATOR as tt,QUERY_OBJECT as nt,RECORD_LINKS_BLOCK as rt,RECORD_LINKS_CONTENT as x,RECORD_LIST_SCOPES as it,RECORD_OBJECT as at,RELATION_TARGET_ANY as ot,REMOVED_OPERATOR_REPLACEMENTS as st,RESERVED_ATTRIBUTE_NAMES as ct,RESERVED_OBJECT_NAMES as lt,RESOURCE_VISIBILITIES as ut,RecordQuery as dt,SCHEMA_LIMITS as S,SYNONYM_ALIASES as ft,SYSTEM_ATTRIBUTES as pt,SYSTEM_ATTRIBUTE_I18N_KEYS as mt,SYSTEM_FIELD_NAMES as ht,SYSTEM_FILTER_ATTRIBUTE_TYPES as gt,TEXT_BLOCK as C,UNORDERED_CHART_KINDS as _t,assertUniqueBy as vt,attributeFilterTarget as yt,attributeInventory as bt,blockObjectInputs as xt,buildQualifiedAttribute as St,canonicalizeFilterValue as Ct,capped as wt,collectContentViewCatalogue as Tt,collectQualifiedRuleIssues as Et,collectionContentSourceSchema as Dt,collectionSourceAddress as Ot,collectionSourceAddressOf as kt,colorIdSchema as At,columnsSchema as jt,contentExtensionRegistry as w,contentReadObjects as Mt,contentViewDefinitionSchema as T,contentViewDefinitionSchemaFor as Nt,currentActor as Pt,decisionArchiveAllResultSchema as Ft,decisionAttachmentSchema as It,decisionCountsSchema as Lt,decisionHandedBy as Rt,decisionLinkSchema as zt,decisionListResultSchema as Bt,decisionRecipientSchema as Vt,decisionSchema as Ht,decisionSenderSchema as Ut,decisionThreadKey as Wt,decisionTransferBy as Gt,decisionTransferTargetsSchema as Kt,decisionTransferTo as qt,decisionTransfersOf as Jt,decisionWithRecipientSchema as Yt,defineBlock as Xt,describeViewIssue as Zt,displayAttributesSchema as Qt,draftContentViewDefinitionSchema as $t,draftContentViewDefinitionSchemaFor as en,edgePropertyFilterTarget as tn,extractCurrencyFilterValue as nn,extractFilterValue as rn,filterOperatorsOfType as an,filterStateSchema as on,filterTargetsOf as sn,findGridViolation as cn,findGroupViolation as ln,findLayoutRuleViolation as un,findRelationAttribute as dn,findRowLimitViolation as fn,formatDecisionLink as pn,getAttributeCapabilities as mn,getAttributeFilterOperators as hn,getHierarchyAttributes as gn,getObjectSystemAttributes as _n,getOperatorPolarity as vn,getRollupFilterOperators as yn,getSystemAttributeI18nKey as bn,getSystemAttributeList as xn,gridPositionSchema as Sn,groupSizeMessage as Cn,groupedMembers as wn,hasTypeTrait as Tn,hasValueKind as En,iconNameSchema as E,inferInverseCardinality as Dn,input as On,invalidViewMessage as kn,isActionableDecisionKind as An,isAttributeFilterable as jn,isAttributeGroupable as Mn,isAttributeKanbanGroupable as Nn,isAttributeSearchable as Pn,isAttributeSortable as Fn,isBilateralRelation as In,isBoardGrouping as Ln,isCalendarDay as Rn,isCollectionContent as zn,isDynamicValue as Bn,isHierarchyAttribute as Vn,isLocationFilterProperty as Hn,isLocationPartOperator as Un,isManagedSystemAttribute as Wn,isNativeObjectName as D,isNoValueOperator as Gn,isPlainRecord as Kn,isRelativeDateValue as qn,isSetMembershipOperator as Jn,isUniversalRelation as Yn,isValueKindType as O,layoutTraitsOf as Xn,locationPartFilterTarget as Zn,memberlessGroups as k,metricComparePeriod as Qn,normalizeFilterRule as $n,normalizeForEdgeRpc as er,normalizeOperator as tr,now as nr,overlaps as rr,pageTraitsOf as ir,parseBlockParameters as A,parseDecisionLink as ar,parseQualifiedAttribute as or,parseRecordListScope as sr,parseResourceVisibility as cr,publishedViewContentDefinitionSchema as j,query as lr,recordQueryDefinitionSchema as ur,relationAcceptsObject as dr,relationTargetsOf as fr,requireContentPlacement as pr,requireRecordContentContext as mr,requireSingleRelationTarget as hr,resolveCollectionActions as gr,resolveContentNavigation as _r,resolveEffectiveFilterType as vr,resolveIsWithinBounds as yr,resolveUtcDayBounds as br,singleRelationTarget as xr,sortsSchema as Sr,sourcedAttributeOf as Cr,systemColumnFilterTarget as wr,toMultiValueOperator as Tr,toUtcDayString as Er,today as Dr,validateAttributeName as Or,validateContentViewCatalogue as kr,validateIconName as Ar,validateLabel as jr,validateObjectName as Mr,validateOptions as Nr,validateQualifiedRule as Pr,validateStoredViews as Fr,validateViewName as Ir}from"./attribute-validators-BJdOkURX.mjs";import{COMPUTED_RETURN_TYPES as Lr,DEFAULT_VALIDATION_MESSAGES as Rr,SIMPLE_PROPERTY_TYPES as zr,TEXT_FORMAT_PATTERNS as Br,WIRE_OFFERED_BASE_CONFIG as Vr,WIRE_OMITTED_CONFIG_KEYS as Hr,attributeConfigSchemas as Ur,createAttributeValidator as Wr,createFormAttributeValidator as Gr,createObjectValidator as Kr,datePrecisionIssues as qr,formatPhoneForDisplay as Jr,formatZodErrors as Yr,getAttributeConfigSchema as Xr,getAttributeConfigWriteSchema as Zr,getIso2 as Qr,isEmptyValue as $r,isNullishOrEmptyString as ei,isValuePresent as ti,normalizeCountrylessPhoneNumber as ni,normalizePhoneNumber as ri,parseAttributeConfig as ii,parseAttributeConfigForCreate as ai,parseAttributeConfigForUpdate as oi,propertyAttributeSchema as si,propertyAttributeWireSchema as ci,propertySchemaSchema as li,propertySchemaWireSchema as ui,refuseForeignKeys as di,rejectUnknownAttributesOrThrow as fi,resolveTextPattern as pi,selectOptionWriteSchema as mi,statusGroupSchema as hi,statusOptionWriteSchema as gi,validateAttribute as _i,validateDraft as vi,validateDraftOrThrow as yi,validateObject as bi,validateObjectOrThrow as xi,wireHiddenTypeConfigMask as Si,wireOmittedConfigKeysFor as Ci,withoutUnknownOptionKeys as wi}from"./all-Df9IeCkI.mjs";import"./zod-locale.mjs";import{ACCESS_CAPABILITIES as Ti,ACCESS_LEVELS as Ei,ACCESS_ROLES as Di,ACTOR_TYPES as Oi,AGENT_ASIDE_ANSWER_MAX_LENGTH as ki,AGENT_ASIDE_HISTORY_LIMIT as Ai,AGENT_ASIDE_QUESTION_MAX_LENGTH as ji,AGENT_AVATAR_EXPRESSIONS as Mi,AGENT_AVATAR_TYPES as Ni,AGENT_MESSAGE_KIND as Pi,AGENT_MESSAGE_SENDER_NAME_KEY as Fi,AGENT_NOTIFICATION_KIND as Ii,AGENT_SESSION_ACCESS_ROLES as Li,AGENT_SESSION_LIST_ORDERS as Ri,AGENT_SESSION_ORIGINS as zi,AGENT_SESSION_PROVENANCES as Bi,AGENT_STARTERS_MAX as Vi,AGENT_STARTER_MAX_LENGTH as Hi,AGENT_SYSTEM_PROMPT_MAX_LENGTH as Ui,AGENT_TASK_KINDS as Wi,AGENT_WAKE_KIND as Gi,AI_MODEL_INPUT_MODALITIES as Ki,AI_MODEL_PROFILE_LABELS as qi,AI_MODEL_REASONING_MODES as Ji,ALL_CATALOG_TOOL_NAMES as Yi,ALWAYS_KINDS as Xi,APPEARANCE_FACETS as Zi,APPROVAL_FAMILY_TOOL_NAMES as Qi,ARCHITECT_PUBLICATION_KIND as $i,ASK_QUESTIONS_ANSWER_MAX_LENGTH as ea,ASK_QUESTIONS_ANSWER_MAX_VALUES as ta,ASK_QUESTIONS_FILE_REF as na,ASK_QUESTIONS_MAX_ADDED_FILES as ra,ASK_QUESTIONS_MAX_BATCH as ia,ASK_QUESTIONS_TOOL_NAME as aa,ATTACH_FILE_ACTIONS as oa,AUDIT_ACTIONS as sa,AUDIT_AGENT_SESSION_METADATA_KEY as ca,AUDIT_RESOURCE_TYPES as la,AgentBuilder as M,BILLING_MODES as ua,BROWSER_LAUNCH_TOOL_NAME as da,BROWSER_TOOL_NAMES as fa,BUNDLE_LOCALES as pa,BUNDLE_SETUP_PROMPT_MAX_LENGTH as ma,CATALOG_RESOURCES as ha,CHAT_PROVIDERS as ga,CONNECTION_GRANT_PROVIDERS as _a,CONNECTION_STATUS_IDS as va,CONNECTOR_PROVIDER_IDS as ya,CONNECTOR_SCOPES as ba,CONTINUATION_KEY_PATTERN as xa,CONVERSATION_SURFACES as Sa,COPY_VERB_NAME as Ca,CORE_RECORD_TOOL_NAMES as wa,CORE_TOOL_NAMES as Ta,COUNT_MODES as Ea,CUSTOM_LEVEL as Da,DEFAULT_AGENT_EXECUTION_CONFIG as Oa,DEFAULT_AGENT_TOOL_GROUPS as ka,DEFAULT_APPEARANCE_ICON as Aa,DEFAULT_APPROVAL_POLICY as ja,DEFAULT_BLUEPRINT_TOOL_GROUPS as Ma,DEFAULT_DAILY_ACTIVITY_DAYS as Na,DEFAULT_DICTATION_LIMITS as Pa,DEFAULT_MEETING_BOT_DISPLAY_NAME as Fa,DEFAULT_TENANT_SETTINGS as Ia,DEVICE_ACCESS_ROLES as La,DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS as Ra,DEVICE_CHANNEL_IDLE_POLL_MS as za,DEVICE_CHANNEL_KEEPALIVE_MS as Ba,DEVICE_CHANNEL_MAX_FRAME_BYTES as Va,DEVICE_CHANNEL_PATH as Ha,DEVICE_CHANNEL_PRESENCE_MS as Ua,DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION as Wa,DEVICE_COMMAND_ERROR_CODES as Ga,DEVICE_DESKTOP_STATES as Ka,DEVICE_SHELLS as qa,DICTATION_FINALIZATION_TIMEOUT_MS as Ja,DICTATION_FRAME_BYTES as Ya,DICTATION_MAX_BUFFER_BYTES as Xa,DICTATION_MAX_FRAME_BYTES as Za,DICTATION_MAX_TRANSCRIPT_BYTES as Qa,DICTATION_MODEL_ID as $a,DICTATION_PREPARATION_TIMEOUT_MS as eo,DICTATION_SAMPLE_RATE as to,DICTATION_TICKET_TTL_MS as no,DISCARD_ARCHITECT_DRAFT_TOOL_NAME as ro,DOCUMENT_KINDS as io,DOCUMENT_SORT_MODES as ao,DRAFT_WRITE_TOOL_NAMES as oo,DeviceChannelProtocolError as so,DeviceChannelServerFrameSchema as co,DeviceChannelWorkerFrameSchema as lo,DeviceDesktopStatusSchema as uo,EMAIL_CATEGORY_DEFAULT_COLOR as fo,EMAIL_CATEGORY_DEFAULT_ICON as po,EMAIL_CATEGORY_DESCRIPTION_MAX as mo,EMAIL_CATEGORY_DESCRIPTION_MIN as ho,EMAIL_CATEGORY_LIMIT as go,EMAIL_CATEGORY_NAME_MAX as _o,EMAIL_CATEGORY_SCOPES as vo,EMAIL_CLASSIFIED_BY as yo,EMAIL_DIRECTIONS as bo,EMAIL_PARTICIPANT_ROLES as xo,EMAIL_PROVIDERS as So,EMAIL_RULE_SCOPES as Co,ENVIRONMENT_BUILD_LOG_STEPS as wo,ENVIRONMENT_BUILD_LOG_STEP_PREFIX as To,ENVIRONMENT_HARNESSES as Eo,ENVIRONMENT_HARNESS_SANDBOX_WORKDIR as Do,ENVIRONMENT_HARNESS_WORKDIR as Oo,ENVIRONMENT_IMAGES as ko,ENVIRONMENT_MEMORY_GB_PER_VCPU as Ao,ENVIRONMENT_NAME_MAX_CHARS as jo,ENVIRONMENT_NETWORK_ALLOW_MAX as Mo,ENVIRONMENT_SCRIPT_MAX_BYTES as No,ENVIRONMENT_SIZES as Po,ENVIRONMENT_SIZE_VCPUS as Fo,ENVIRONMENT_STANDARDS_WORKDIR as Io,ENV_VAR_KEY_PATTERN as Lo,ESTIMATED_COUNT_CAP as Ro,FILE_LIST_MAX_IDS as zo,FILE_OCR_STATUSES as Bo,FILE_URLS_MAX_IDS as Vo,FORM_STATUSES as Ho,FORM_SUBMISSION_STATUSES as Uo,GET_ARCHITECT_DRAFT_TOOL_NAME as Wo,GITHUB_TRIGGER_CATALOG as Go,GITHUB_TRIGGER_FAMILIES as Ko,GRANT_ENABLES as qo,HARNESS_BRIDGE_PORT as Jo,HITL_TOOL_NAMES as Yo,IMAGE_FORMATS as Xo,IMAGE_SHAPES as Zo,IMAGE_SOURCES as Qo,INFERENCE_REASONING_OPTIONS as $o,INFERENCE_ROUTING_MODES as es,INFERENCE_SPEEDS as ts,LAST_RUN_ERROR_MAX_LENGTH as ns,LINK_COOKIE_MAX_AGE_MS as rs,LINK_DEFAULT_MS as is,LINK_MAX_MS as as,MACHINE_KEY_KINDS as os,MAILBOX_ACCOUNT_VISIBILITIES as ss,MAILBOX_LIST_MODES as cs,MAILBOX_READER_LAYOUTS as ls,MAIL_DRAFT_BODY_MAX_CHARS as us,MAIL_DRAFT_MODES as ds,MAIL_SIGNATURE_MAX_CHARS as fs,MAIL_SUBJECT_MAX_CHARS as ps,MAX_DAILY_ACTIVITY_DAYS as ms,MAX_TODOS as hs,MAX_TODO_DESCRIPTION_CHARS as gs,MAX_TODO_ID_CHARS as _s,MEETING_BOT_IMAGE as vs,MEETING_BOT_IMAGE_BASE64_MAX_LENGTH as ys,MEETING_BOT_MEMBER_CAP as bs,MEETING_BOT_NO_CREDITS as xs,MEETING_BOT_SILENT_REASON as Ss,MEETING_CONFERENCE_REQUESTS as Cs,MEETING_PARTICIPANT_ROLES as ws,MEETING_RESPONSES as Ts,MEETING_RESPONSE_STATUSES as Es,MEETING_STATUSES as Ds,MEMORY_SPEND_LIMIT_PATTERN as Os,NATIVE_TOOL_GROUPS as ks,NATIVE_TOOL_GROUP_CATALOG as As,NEWS_DEFAULT_DISPLAY_DAYS as js,NEWS_DISPLAY_CAP_DAYS as Ms,NEWS_INDEX_MAX_ENTRIES as Ns,NEWS_INTENSITIES as Ps,NEWS_TARGET_KINDS as Fs,NO_ACCESS as Is,NO_RECORDING as Ls,OAUTH_TICKET_TTL_MS as Rs,OBJECT_GRANT as zs,OPEN_TOOL_PART_STATES as Bs,OPERATION_MAX_STEPS as Vs,PERMISSION_ACTIONS as Hs,PERMISSION_CAPABILITIES as Us,PERMISSION_CATALOG as Ws,PERSISTENCE_OWNED_QUOTA_KEYS as Gs,PROVIDER_DRAFT_LABEL as Ks,PROVIDER_NAMES as qs,PUBLIC_MAIL_DOMAINS as Js,QUESTION_FAMILY_TOOL_NAMES as Ys,QUOTA_KEYS as Xs,RECENT_ACTIVITY_LEDGER_LIMIT as Zs,RECIPIENT_IDENTITIES_MAX as Qs,RECORDING_OVERRIDES as $s,RECORDING_POLICIES as ec,RECORD_ACCESS_ROLES as tc,RECORD_ACCESS_SOURCES as nc,RECORD_DRIVE_CURSOR_MAX_LENGTH as rc,RECORD_DRIVE_PAGE_DEFAULT_LIMIT as ic,RECORD_DRIVE_PAGE_MAX_LIMIT as ac,RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE as oc,RECORD_GRAPH_MAX_LIMIT_PER_NODE as sc,RECORD_GRAPH_MAX_NODES as cc,RECORD_IMAGE_MAX_BYTES as lc,REFERENCE_KINDS as uc,REPLY_MODES as dc,REPOSITORY_WILDCARD as fc,REQUEST_DESIGN_REVIEW_TOOL_NAME as pc,REQUEST_SETUP_TOOL_NAME as mc,RESOURCE_GRANT_KINDS as hc,RESOURCE_KIND_CATALOG as gc,ROUTING_PRICE_CEILINGS as _c,RUN_ORIGIN_METADATA_KEY as vc,SEND_VERB_NAME as yc,SESSION_INFERENCE_PATCH_KEYS as bc,SLACK_TRIGGER_CATALOG as xc,SLACK_TRIGGER_EVENTS as Sc,SPEAKS_THROUGH_SEND_METADATA_KEY as Cc,SURFACE_TOOL_NAMES as wc,SYSTEM_EMAIL_CATEGORIES as Tc,SYSTEM_EMAIL_CATEGORY_NAMES as Ec,SYSTEM_PART_CODES as Dc,TASK_DEMAND_LEVELS as Oc,TENANT_INVITATION_DEFAULT_TTL_MS as kc,TENANT_INVITATION_DELIVERY_STATUSES as Ac,TENANT_INVITATION_MAX_TTL_MS as jc,TENANT_INVITATION_MIN_TTL_MS as Mc,TENANT_INVITATION_RESEND_INTERVAL_MS as Nc,TENANT_INVITATION_STATUSES as Pc,TODO_PHASES as Fc,TODO_PLAN_STATUSES as Ic,TODO_STATUSES as Lc,TOOL_APPROVAL_STATES as Rc,TOOL_IMPACT_COUNT_KEYS as zc,TRANSCRIPT_STATUSES as Bc,TRIAGE_ACTIONS as Vc,TRIGGER_EVENT_TYPES as Hc,TRIGGER_MAX_REENTRY as Uc,TURN_OUTCOMES as Wc,UNSHAREABLE_OBJECT_NAMES as Gc,USAGE_MODALITIES as Kc,USAGE_SCOPES as qc,USERS_RESOLVE_MAX_IDS as Jc,USER_STATUSES as Yc,USER_WORK_POSTURES as Xc,VERB_NAMES as Zc,WAKE_TURN_METADATA_KEY as Qc,WAKE_TURN_SPOKE_METADATA_KEY as $c,WALLET_STATUSES as el,accessGrantSchema as tl,actorSchema as nl,agent as rl,agentApprovalResolutionSchema as il,agentAvatarFromMetadata as al,agentAvatarOutputSchema as ol,agentAvatarSchema as sl,agentConversationOverviewSchema as cl,agentDataChunk as ll,agentDefinitionActivitySchema as ul,agentDefinitionAudienceSchema as dl,agentDefinitionDailyActivitySchema as fl,agentDefinitionSchema as pl,agentDisplayName as ml,agentExecutionConfigOutputSchema as hl,agentHistoryMessageSchema as gl,agentInferencePreferencesOutputSchema as _l,agentInferencePreferencesSchema as vl,agentMemoryViewSchema as yl,agentMessageAttachmentSchema as bl,agentMessagePartSchema as xl,agentRequestAnswerSchema as Sl,agentRoleSchema as Cl,agentRolesSetResultSchema as wl,agentRunSchema as Tl,agentRunStatusSchema as El,agentScheduleOutputSchema as Dl,agentScheduleSchema as Ol,agentSessionAudienceSchema as kl,agentSessionDefinitionAppearanceSchema as Al,agentSessionHistoryPageSchema as jl,agentSessionInferenceOverridesInputSchema as Ml,agentSessionInferenceOverridesSchema as Nl,agentSessionLinkSchema as Pl,agentSessionMessageOutputSchema as Fl,agentSessionMessageSchema as Il,agentSessionSchema as Ll,agentSetupResponseSchema as Rl,agentStartersSchema as zl,agentTodoPlanViewSchema as Bl,agentToolCatalogSchema as Vl,agentTriggerBaseSchema as Hl,agentTriggerDefinitionSchema as Ul,agentTriggerLastCallSchema as Wl,agentTriggerPatchSchema as Gl,agentTriggerSchema as Kl,agentUIValidationError as ql,agentWakeSchema as Jl,agentWakeViewSchema as Yl,apiKeyRoleSchema as Xl,apiKeySchema as Zl,apiKeyWithSecretSchema as Ql,architectProjectionSchema as $l,artifactQuoteSchema as eu,askQuestionsOutputSchema as tu,assertCustomAgentUIMessageChunk as nu,assertSessionState as ru,attachedRecordDocumentSchema as iu,attributeOutputSchema as au,attributeSaveOutputSchema as ou,auditChangeSchema as su,auditLogEntrySchema as cu,availableBundleSummarySchema as lu,browserProfilePreparationSchema as uu,browserProfileViewSchema as du,bundleAddPlanSchema as fu,bundleAddResultSchema as pu,bundleContentsSchema as mu,bundleListSchema as hu,bundleModeSchema as gu,bundleOriginSchema as _u,bundlePieceKindSchema as vu,bundlePlanPieceSchema as yu,bundleRemovalCascadeSchema as bu,bundleRemovalPreviewSchema as xu,bundleRemovalRowSchema as Su,bundleStatusEntrySchema as Cu,bundleStatusSchema as wu,bundleSyncPreviewSchema as Tu,bundleUpdateDependentSchema as Eu,bundleUpdateGroupSchema as Du,bundleUpdatePieceKindSchema as Ou,bundleUpdatePieceSchema as ku,bundleUpdatePlanSchema as Au,bundleUpdateReasonCodeSchema as ju,bundleUpdateResultSchema as Mu,cancelAgentWakeResultSchema as Nu,canonicalToolGroups as Pu,capabilityForResource as Fu,classificationRestoreSchema as Iu,classificationUndoSchema as Lu,classifyEmailResultSchema as Ru,classifyEmailSchema as zu,cliDefaultModelOf as Bu,cloudBrowserLiveViewSchema as Vu,collectionOutputSchema as Hu,collectionPageSchema as Uu,compareAgentSessionMessages as Wu,compareVersions as Gu,compiledHarnessModels as Ku,computeReconnectDelay as qu,computeRetryDelay as Ju,connectionCapabilitiesSchema as Yu,connectionGrantKindsOf as Xu,connectionSyncProgressSchema as Zu,connectionViewSchema as Qu,connectorProvidersResultSchema as $u,connectorTriggerMatchSchema as ed,createAgentTriggerResultSchema as td,criticConfigOutputSchema as nd,customDataChunkSchemas as rd,declaredImageRequests as id,decodeAgentSessionListCursor as ad,decodeRecordValues as od,defaultEnvironmentSchema as sd,deferredRetypeSchema as cd,deriveViewerAccess as ld,deviceAudienceSchema as ud,deviceChannelUrl as dd,documentFileSchema as fd,documentRecordOwnerPageSchema as pd,documentRecordOwnerSchema as md,documentSchema as hd,documentWithSubCountSchema as gd,draftAppendOutputSchema as _d,draftCommandGuardSchema as vd,driveFileSchema as yd,durableDateSchema as bd,editAgentSessionMessageResultSchema as xd,effectivePermissionsSchema as Sd,emailAttachmentMetaSchema as Cd,emailCategoryCreateSchema as wd,emailCategoryDeleteSchema as Td,emailCategorySchema as Ed,emailCategoryScopeQuerySchema as Dd,emailCategoryUpdateSchema as Od,emailCategoryUsageSchema as kd,emailParticipantRefSchema as Ad,emailRuleScopeSchema as jd,emailSenderRuleSchema as Md,emailVerdictSchema as Nd,encodeAgentSessionListCursor as Pd,encodeRecordValues as Fd,envVarEntrySchema as Id,environmentBuildFailureSchema as Ld,environmentBuildStateSchema as Rd,environmentDetailSchema as zd,environmentHarness as Bd,environmentHarnessSchema as Vd,environmentListSchema as Hd,environmentNetworkPolicyOutputSchema as Ud,environmentRepositorySourceSchema as Wd,environmentSchema as Gd,environmentWorkdir as Kd,fileSchema as qd,fileUrlsResponseSchema as Jd,findEnvironmentHarness as Yd,findGrantIssues as Xd,formDefinitionSchema as Zd,formSlotSchema as Qd,formStepSchema as $d,formSubmissionSchema as ef,formatNewsTarget as tf,formatReference as nf,githubConditionSchema as rf,githubTriggerMatchSchema as af,grantKindOf as of,harnessModelChoices as sf,harnessModelListSchema as cf,harnessModelOptionSchema as lf,hasLocale as uf,humanRequestId as df,humanRequestKind as ff,imageModelFormatDefect as pf,imageModelIdSchema as mf,inferenceReasoningSchema as hf,inferenceRoutingSchema as gf,inferenceSpeedSchema as _f,installedBundleSummarySchema as vf,isAgentMessageMetadata as yf,isAgentNotificationMetadata as bf,isAgentUIDataName as xf,isAgentWakeMetadata as Sf,isAgentWrittenAuditEntry as Cf,isArchitectPublicationMetadata as wf,isAwaitingHuman as Tf,isBlocking as Ef,isCatalogResource as Df,isEnvironmentBuildLogStep as Of,isEnvironmentHarnessId as kf,isFormDefinition as Af,isImageSource as jf,isMailProvider as Mf,isMailboxListMode as Nf,isNativeToolGroup as Pf,isOpenToolPartState as Ff,isParkedOnHuman as If,isProviderDraft as Lf,isPublicMailDomain as Rf,isQuestionPart as zf,isReplyMode as Bf,isResourceGrant as Vf,isRoutineActorMetadata as Hf,isSemver as Uf,isSessionInferencePatch as Wf,isSystemEmailCategory as Gf,isSystemEmailCategoryName as Kf,isSystemPartCode as qf,isToolApprovalState as Jf,isToolImpactCountKey as Yf,isWildcard as Xf,lastPublicationSchema as Zf,lastPublishErrorSchema as Qf,levelActions as $f,levelFloor as ep,levelOf as tp,linkedRecordRefSchema as np,lockingSendCall as rp,loginSecretEntrySchema as ip,mailDraftAttachmentSchema as ap,mailDraftSchema as op,mailSignatureSchema as sp,mailboxAccountSchema as cp,mailboxCursorSchema as lp,mailboxEmailSchema as up,mailboxListResponseSchema as dp,mailboxSenderImageSchema as fp,mailboxThreadDetailSchema as pp,mailboxThreadSchema as mp,matchesRepositoryPattern as hp,mcpCatalogCategorySchema as gp,mcpCatalogEntrySchema as _p,mcpOAuthAttemptStartedSchema as vp,mcpOAuthSetupSchema as yp,mcpServerAuthTypeSchema as bp,mcpServerStatusSchema as xp,mcpServerViewSchema as Sp,meetingBotDispatchRequestSchema as Cp,meetingBotDispatchResponseSchema as wp,meetingBotNotificationSchema as Tp,meetingLinkedRecordSchema as Ep,meetingParticipantRefSchema as Dp,meetingRecordingSchema as Op,meetingSchema as kp,meetingSiblingRefSchema as Ap,meetingTranscriptProvenanceSchema as jp,meetingTranscriptResponseSchema as Mp,meetingTranscriptSegmentSchema as Np,meetingTranscriptSourceRefSchema as Pp,meetingsListResponseSchema as Fp,memberSchema as Ip,mentionReferenceSchema as Lp,mergeSessionInferencePatch as Rp,modelDefinitionOutputSchema as zp,modelDefinitionSchema as Bp,modelReferenceOutputSchema as Vp,modelReferenceSchema as Hp,mutationReceiptSchema as Up,myPreferencesSchema as Wp,needsManageWhenUnattended as Gp,newsBodySchema as Kp,newsIndexSchema as qp,normalizeNewsLocale as Jp,normalizedMeetingTranscriptSchema as Yp,oauthAttemptStartedSchema as Xp,objectDefinitionOutputSchema as Zp,objectRecordOutputSchema as Qp,openRequests as $p,orderAgentSessionMessages as em,pageAudienceSchema as tm,pageReadSchema as nm,pageSummarySchema as rm,parseAgentDefinitionAccessRole as im,parseAgentSessionAccessRole as am,parseCountMode as om,parseDeviceAccessRole as sm,parseDeviceChannelFrame as cm,parseMergedAgentTrigger as lm,parseNewsBody as um,parseNewsIndex as dm,parseNewsIntensity as fm,parseNewsTarget as pm,parseOptionalCountMode as mm,parsePageAccessRole as hm,parseRecordAccessRole as gm,parseReference as _m,parseServerFrame as vm,parseToolGroupGrant as ym,parseWorkerFrame as bm,permissionFlagsSchema as xm,permissionGrantSchema as Sm,permissionSchema as Cm,preferenceEntry as wm,preferenceEntrySchema as Tm,providerNameSchema as Em,publishBlockerSchema as Dm,publishDraftOutputSchema as Om,quotaStateSchema as km,readArchitectPublication as Am,readAskQuestionsResult as jm,readRunOriginMetadata as Mm,recentActivityEntryKey as Nm,recipientContactSchema as Pm,recipientIdentitySchema as Fm,recipientSuggestionSchema as Im,recordAggregatesSchema as Lm,recordAudienceSchema as Rm,recordCollectionOutputSchema as zm,recordDeletionCountSchema as Bm,recordDriveChildSchema as Vm,recordDriveChildrenPageSchema as Hm,recordDriveSearchHitSchema as Um,recordDriveSearchResultSchema as Wm,recordGraphEdgeSchema as Gm,recordGraphNodeKey as Km,recordGraphNodeSchema as qm,recordGraphRequestSchema as Jm,recordGraphResponseSchema as Ym,recordIncomingReferenceSchema as Xm,recordIncomingReferencesPageSchema as Zm,recordMeetingsCount as Qm,recordOperationSchema as $m,recordPurgeResultSchema as eh,recordValuesCodec as th,recordsBulkCreateResultSchema as nh,recordsBulkDeleteResultSchema as rh,recordsBulkUpdateResultSchema as ih,refineTrigger as ah,relationOptionSchema as oh,relationOptionsResponseSchema as sh,replyDefaultsSchema as ch,requestedCapabilities as lh,resolveAppearance as uh,resolveLocalized as dh,resolvedRelationsBatchSchema as fh,resourceGrant as ph,resourceUsedBySchema as mh,retryPolicyOutputSchema as hh,retypeOptionsOutputSchema as gh,roleSchema as _h,routedMessageInferenceSchema as vh,routineAudiencePreviewSchema as yh,routineAudienceSchema as bh,sameActions as xh,schemaDraftOutputSchema as Sh,schemaGroupListSchema as Ch,schemaGroupSchema as wh,schemaStateAddressOf as Th,schemaStateEntrySchema as Eh,schemaStateSchema as Dh,secretEntrySchema as Oh,servedAsIsAttributeSchema as kh,sessionImageUsageSchema as Ah,sessionInferenceOverridesOutputSchema as jh,sessionInferencePatchSchema as Mh,sessionStateSchema as Nh,setAgentSessionWorkPostureResultSchema as Ph,slackConditionSchema as Fh,slackTriggerMatchSchema as Ih,submitOutcomeSchema as Lh,syncBundleResultSchema as Rh,tenantInvitationSchema as zh,tenantSettingsResponseSchema as Bh,tenantSettingsSchema as Vh,todoItemSchema as Hh,todoPlanSchema as Uh,toolImpactSchema as Wh,triageResultSchema as Gh,userProfileSchema as Kh,utf8ByteLength as qh,viewPreferenceAddressSchema as Jh,viewReadSchema as Yh,viewerAccessSchema as Xh,withPreferenceEntry as Zh,withoutTrailingSlashes as Qh}from"./record-operation-DSjDUW-6.mjs";import{AccessDeniedError as $h,AggregateValidationError as eg,AmbiguousSchemaChangeError as tg,AttributeInUseError as ng,AttributeNotFoundError as rg,ConcurrentModificationError as ig,DuplicateError as N,ExportTooLargeError as ag,ForbiddenError as og,InvalidPermissionGrantError as sg,LogoProviderUnavailableError as cg,LogoSearchRateLimitedError as lg,MemoryNotFoundError as ug,NotFoundError as dg,NotImplementedError as fg,ObjectNotFoundError as pg,ObjectReferencedError as mg,OrphanSystemAttributeError as hg,PageReferencedError as gg,ProtectedResourceError as _g,ProtectedRoleError as vg,QueryTimeoutError as yg,RealtimeDeliveryError as bg,RealtimeRateLimitedError as xg,RealtimeSubscriptionError as Sg,RecordNotFoundError as Cg,RecordReferencedError as wg,RepositoryError as Tg,ReservedObjectNameError as P,RoleNotFoundError as Eg,SCHEMA_ERROR_HTTP_STATUS as Dg,SchemaError as F,SchemaErrorCode as I,SearchBackendError as Og,SearchPathNotIndexedError as kg,StorageError as Ag,SyncCascadeError as jg,SyncConflictError as Mg,SyncError as Ng,SystemEntityImmutableError as Pg,ToolGroupGrantError as Fg,ValidationError as L,WorkspaceInvariantReason as Ig,isAttributeInUseError as Lg,isNotFoundError as Rg,isObjectReferencedError as zg,isProtectedResourceError as Bg,isRecordReferencedError as Vg,isSchemaError as Hg,isValidationError as Ug}from"./exceptions.mjs";import*as R from"zod";import{getCountryByIso2 as Wg,isValidCurrencyCode as Gg,isValidIso3 as Kg}from"@standards/constants";import{parsePhoneNumberFromString as qg}from"libphonenumber-js";const Jg=`__stndrdsNativeUiPartIds`,Yg=1;function invalidNativePartIds(){throw new L(`Native agent UI part IDs metadata is invalid`,[])}function isPlainRecord$1(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function nativeAgentUIPartIdMetadataKey(e,t){if(e.type===`text`||e.type===`reasoning`)return`${e.type}:${t}`;if(e.type===`tool`)return`tool:${e.toolCallId}`}function parseNativeAgentUIPartIdsMetadata(e){let t=e.metadata?.[Jg];isPlainRecord$1(t)||invalidNativePartIds(),Object.keys(t).length===2&&t.schemaVersion===1&&isPlainRecord$1(t.partIds)||invalidNativePartIds();let n=/* @__PURE__ */ new Map;for(let[t,r]of e.parts.entries()){let e=nativeAgentUIPartIdMetadataKey(r,t);!e||n.has(e)?e&&invalidNativePartIds():n.set(e,r)}let r=Object.entries(t.partIds);r.length!==n.size&&invalidNativePartIds();let i=/* @__PURE__ */ new Map,a={};for(let[e,t]of r){let r=n.get(e);r&&typeof t==`string`&&t.length>0||invalidNativePartIds();let o=i.get(t);o&&(r.type===`tool`||o!==r.type)&&invalidNativePartIds(),r.type===`tool`&&t!==r.toolCallId&&invalidNativePartIds(),i.set(t,r.type),a[e]=t}return a}const Xg=5,z=[`relation`,`multiRelation`,`formula`,`rollup`,`document`,`richtext`,`user`];function isFormSlotFieldRef(e){return e.type===`slot`}function isFormFreeFieldRef(e){return e.type===`free`}function resolveFieldRequired(e){return e.readOnly===!0?!1:e.fieldRequired===void 0?e.slotMode===`create`&&e.attributeRequired===!0:e.fieldRequired}function getSlotFieldTargets(e){return e.additionalSlotIds?.length?[e.slotId,...e.additionalSlotIds]:[e.slotId]}function formFieldKey(e){return isFormSlotFieldRef(e)?`${e.slotId}.${e.attribute}`:`free.${e.attribute.name}`}function formFieldFlatKey(e){return isFormSlotFieldRef(e)?e.attribute:e.attribute.name}function readFormFieldValue(e,t){return e[formFieldKey(t)]??e[formFieldFlatKey(t)]}function isFormFieldsRow(e){return e.type===`fields`}function isFormHeadingRow(e){return e.type===`heading`}function isFormSeparatorRow(e){return e.type===`separator`}function isFormTextRow(e){return e.type===`text`}function moveWidensAudience(e){return e.added.length>0||!e.workspaceBefore&&e.workspaceAfter}function resolvePropertyDefinitions(e){let t=e.properties;if(!t)return[];if(Array.isArray(t))return t;let n=t;return Array.isArray(n.definitions)?n.definitions:[]}function hasOptions(e){return O(e.type,`options`)}function schemaGroupKey(e){return`${e.kind}:${e.name}`}function refuse$2(e){throw new L(e,[{path:[`label`],message:e}])}function parseSchemaGroupPresentation(e){let t=e??{},n={};if(t.label!==void 0){let e=t.label;if(e===null)n.label=null;else if(typeof e!=`string`)refuse$2(`Label must be a string`);else{let t=e.trim();t.length===0&&refuse$2(`Label must not be empty`),t.length>S.labelLength&&refuse$2(`Label is too long (max ${S.labelLength} characters)`),n.label=t}}return n}const B=/^(?:core|bundle:.+)$/u;function parseSchemaOwner(e){if(e===null)return null;if(!B.test(e))throw new L(`Invalid schema owner "${e}"`,[]);return e}const Zg=[`web`,`presentation`,`document`,`spreadsheet`,`image`,`code`,`other`],Qg=[`ephemeral`,`conversation`,`persistent`],$g=[`source`,`preview`,`entrypoint`,`asset`];var NoopGeocodingAdapter=class{async autocomplete(){return await Promise.resolve([])}async geocode(){return await Promise.resolve(null)}};function computeByteMagnitude(e){if(e<=0)return{value:0,unitIndex:0};let t=1e3,n=Math.min(4,Math.floor(Math.log(e)/Math.log(t)));return{value:Number.parseFloat((e/t**n).toFixed(1)),unitIndex:n}}const e_=[`B`,`KB`,`MB`,`GB`,`TB`];function formatByteSize(e){let{value:t,unitIndex:n}=computeByteMagnitude(e);return`${t} ${e_[n]}`}const t_=Object.freeze([`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`status`,`select`,`multiselect`,`location`]);function buildPropertySchema(e){let t=[];for(let n of e){let e=n.build();if(!t_.includes(e.type))throw Error(`Property type "${e.type}" is not supported in .qualifyWith()`);t.push(e)}return{definitions:t}}const n_=[`UPPER`,`LOWER`,`capitalize`,`trim`],r_=[`prefix`,`suffix`,`wrap`,`default`],V=[...n_,...r_],i_=/^\s*where\s*(?::(.*))?$/s,a_=`[A-Za-z_][A-Za-z0-9_]*`,o_=/^[^\s,()|{}="']+$/,s_=RegExp(`^(${a_})\\s*=\\s*(.*)$`),c_=RegExp(`^(${a_})\\s+in\\s*\\(([^()]*)\\)$`);function isWherePipe(e){return i_.test(e)}function parseWherePipe(e){let t=e.match(i_)?.[1]?.trim();if(!t)return null;let n=t.match(c_);if(n){let e=n[2].split(`,`).map(e=>e.trim());return e.every(e=>o_.test(e))?{property:n[1],values:e}:null}let r=t.match(s_);return r&&o_.test(r[2])?{property:r[1],values:[r[2]]}:null}const H=R.string().min(1,`labelExpression cannot be empty`).refine(e=>isLabelExpression(e),{message:`labelExpression must contain at least one {{ attribute }} interpolation`}).refine(e=>!/\{\{\s*\}\}/.test(e),{message:`labelExpression contains empty {{ }} interpolation`}).refine(e=>{let t=/(?<!\|)\|(?!\|)\s*(\w+)(?::[^|}]*)?/g,n;for(;(n=t.exec(e))!==null;){let e=n[1];if(!V.includes(e))return!1}return!0},{message:`Invalid pipe name. Valid pipes: ${V.join(`, `)}`});function validateLabelExpression(e){let t=H.safeParse(e);return t.success?{success:!0,attributes:extractAttributeNames(e)}:{success:!1,error:t.error.issues[0]?.message??`Invalid labelExpression`}}function applyPipe(e,t){let{name:n,args:r}=parsePipeExpression(t);switch(n){case`UPPER`:return e.toUpperCase();case`LOWER`:return e.toLowerCase();case`capitalize`:return e.replace(/(^|\s)\S/g,e=>e.toUpperCase());case`trim`:return e.trim();case`prefix`:return e?`${r[0]??``}${e}`:``;case`suffix`:return e?`${e}${r[0]??``}`:``;case`wrap`:return e?`${r[0]??``}${e}${r[1]??``}`:``;case`default`:return e||r[0]||``;default:return e}}function applyPipes(e,t){let n=e;for(let e of t)n=applyPipe(n,e);return n}function getValue(e,t){return t.split(`.`).reduce((e,t)=>{if(typeof e==`object`&&e)return e[t]},e)}const l_=`(Untitled)`;function parsePipeExpression(e){let t=e.match(/^(\w+)(?::(.*))?$/);if(!t)return{name:e,args:[]};let n=t[1],r=t[2];if(!r)return{name:n,args:[]};let i=[],a=/["']([^"']*?)["']/g,o;for(;(o=a.exec(r))!==null;)i.push(o[1]);return{name:n,args:i}}function*templateBlocks(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return;let r=e.indexOf(`}`,n+2);if(r<0)return;if(e[r+1]!==`}`){t=r+1;continue}t=r+2;let i=e.slice(n+2,r);i.length>0&&(yield{start:n,end:t,expr:i})}}function resolveLabelBlock(e,t){let n=e.split(`||`).map(e=>e.trim()),r=n[n.length-1].split(`|`).map(e=>e.trim());n[n.length-1]=r[0];let i=r.slice(1).filter(Boolean),a=n.filter(Boolean),o=``;for(let e of a){let n=toText(getValue(t,e));if(n!==``){o=n;break}}return applyPipes(o,i)}function renderLabelExpression(e,t,n=l_){let r=[],i=0;for(let n of templateBlocks(e))r.push(e.slice(i,n.start),resolveLabelBlock(n.expr,t)),i=n.end;return r.push(e.slice(i)),r.join(``).trim()||n}function toText(e){if(e==null||typeof e==`function`)return``;if(typeof e!=`object`)return String(e);if(Array.isArray(e))return e.map(toText).filter(Boolean).join(`,`);let t=e.toString;return typeof t==`function`&&t!==Object.prototype.toString?String(e):``}function isLabelExpression(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return!1;let r=e.indexOf(`}}`,n+2);if(r<0)return!1;if(e.slice(n+2,r).trim().length>0)return!0;t=r+2}return!1}function extractAttributePaths(e){let t=[];for(let n of templateBlocks(e)){let e=n.expr.trim();if(!e)continue;let r=e.split(`||`).map(e=>e.trim()),i=r[r.length-1];r[r.length-1]=i.split(`|`)[0].trim();for(let e of r)e&&!t.includes(e)&&t.push(e)}return t}function extractAttributeNames(e){let t=extractAttributePaths(e).map(e=>e.split(`.`)[0]).filter(e=>e.length>0);return[...new Set(t)]}const u_=/^\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}$/;function getSingleAttributeFromExpression(e){let t=e.trim().match(u_);return t?t[1]:null}function getEditableLabelAttribute(e,t){let n=getSingleAttributeFromExpression(e);if(n===null)return null;let r=t.find(e=>e.name===n);return!r||r.type!==`text`||mn(r).authoring.readOnly?null:r}const d_=`memory`,f_=4e3,p_=`workspace`,U={name:`name`,description:`description`,content:`content`,profileOf:`profileOf`,profileActor:`profileActor`,subjects:`subjects`,subjectId:`subjectId`};function textValue(e){return typeof e==`string`?e:``}function memoryPageViewOf(e){let{values:t}=e;return{id:e.id,name:textValue(t[U.name]),description:textValue(t[U.description]),content:textValue(t[U.content]),visibility:e.visibility,ownedBy:e.ownedBy,updatedAt:new Date(e.updatedAt).toISOString()}}const m_={meetingHour:`0.80`,computeVcpuHour:`0.20`,browserHour:`0.60`},h_=[`meeting.recording`,`sandbox.agent`,`sandbox.harness`,`sandbox.build`,`browser.session`];function isMeteredChargeKind(e){return h_.includes(e)}const g_=/^\d+(?:\.\d+)?$/u;function meteredUsd(e,t){if(!g_.test(e))throw new L(`Invalid metered rate "${e}"`,[]);if(!(t>=0&&t<=2**53-1))throw new L(`Invalid metered duration "${t}"`,[]);let[n=`0`,r=``]=e.split(`.`),i=BigInt(n+r)*BigInt(t.toFixed(12).replace(`.`,``)),a=10n**BigInt(r.length+12-4),o=(i+a-1n)/a,s=10n**BigInt(4),c=(o%s).toString().padStart(4,`0`).replace(/0+$/u,``);return c?`${o/s}.${c}`:`${o/s}`}const __=`database`,v_=`@standards/schema`;function createStandardSchemaProps(e){return{version:1,vendor:v_,validate:t=>{let n=e.safeParse(t);return n.success?{value:n.data}:{issues:n.error.issues.map(e=>({message:e.message,path:e.path}))}}}}function isStandardSchema(e){return typeof e==`object`&&!!e&&`~standard`in e&&typeof e[`~standard`]==`object`&&e[`~standard`].version===1}function asMutableArray(e){return e}var BaseAttributeBuilder=class{get"~standard"(){return createStandardSchemaProps(Wr(this.build()))}constructor(e,t,n){Or(t),jr(n),this.attr={name:t,label:n,type:e,required:!1,system:!0}}asPhantomState(){return this}required(){return this.attr.required=!0,this.asPhantomState()}optional(){return this.attr.required=!1,this.asPhantomState()}runtime(){return this.attr.system=!1,this}hidden(){return this.attr.hidden=!0,this}placeholder(e){return this.attr.placeholder=e,this}description(e){return this.attr.description=e,this}icon(e){return Ar(e,`attribute "${this.attr.name}"`),this.attr.icon=e,this}order(e){return this.attr.order=e,this}defaultValue(e){return(`defaultValue`in this.attr||!O(String(this.attr.type),`computed`))&&(this.attr.defaultValue=e),this}metadata(e){return this.attr.metadata=e,this}build(){return this.attr}},TextAttributeBuilder=class extends BaseAttributeBuilder{minLength(e){return this.attr.minLength=e,this}maxLength(e){return this.attr.maxLength=e,this}pattern(e){return this.attr.pattern=e,this.attr.format=void 0,this}multiline(e=!0){return this.attr.multiline=e,this}email(){return this.attr.format=`email`,this.attr.pattern=void 0,this}url(){return this.attr.format=`url`,this.attr.pattern=void 0,this}slug(){return this.attr.format=`slug`,this.attr.pattern=void 0,this}};function text(e,t){return new TextAttributeBuilder(`text`,e,t)}var RichtextAttributeBuilder=class extends BaseAttributeBuilder{};function richtext(e,t){return new RichtextAttributeBuilder(`richtext`,e,t)}var NumberAttributeBuilder=class extends BaseAttributeBuilder{min(e){return this.attr.min=e,this}max(e){return this.attr.max=e,this}integer(){return this.attr.unit=`integer`,this.attr.decimals=0,this}decimal(e=2){return this.attr.unit=`decimal`,this.attr.decimals=e,this}percentage(){return this.attr.unit=`percentage`,this}renderAs(e){return this.attr.renderAs=e,this}};function number(e,t){return new NumberAttributeBuilder(`number`,e,t)}var CheckboxAttributeBuilder=class extends BaseAttributeBuilder{};function checkbox(e,t){return new CheckboxAttributeBuilder(`checkbox`,e,t)}var DateAttributeBuilder=class extends BaseAttributeBuilder{format(e){return this.attr.dateFormat=e,this}precision(e){return this.attr.precision=e,this}build(){let[e]=qr(`date`,this.attr);if(e!==void 0)throw new L(e.message,[{path:[`precision`],message:e.message}]);return super.build()}minDate(e){return this.attr.minDate=e,this}maxDate(e){return this.attr.maxDate=e,this}endDate(){return this.attr.endDate=!0,this.asPhantomState()}includeTime(){return this.attr.includeTime=!0,this}timeFormat(e){return this.attr.timeFormat=e,this}};function date(e,t){return new DateAttributeBuilder(`date`,e,t)}var PhoneAttributeBuilder=class extends BaseAttributeBuilder{defaultCountry(e){return this.attr.defaultCountryCode=e,this}};function phone(e,t){return new PhoneAttributeBuilder(`phone`,e,t)}var CurrencyAttributeBuilder=class extends BaseAttributeBuilder{defaultCurrency(e){return this.attr.defaultCurrency=e,this}allowedCurrencies(e){return this.attr.allowedCurrencies=e,this}allowNegative(e=!0){return this.attr.allowNegative=e,this}};function currency(e,t){return new CurrencyAttributeBuilder(`currency`,e,t)}function setOptions(e,t){let n=asMutableArray(t);Nr(e.name??`unknown`,n),e.options=n}function addOption(e,t){e.options||=[],Nr(e.name??`unknown`,[...e.options,t]),e.options.push(t)}var StatusAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}};function status(e,t){return new StatusAttributeBuilder(`status`,e,t)}var SelectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function select(e,t){return new SelectAttributeBuilder(`select`,e,t)}var MultiselectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function multiselect(e,t){return new MultiselectAttributeBuilder(`multiselect`,e,t)}var LocationAttributeBuilder=class extends BaseAttributeBuilder{granularity(e){return this.attr.granularity=e,this}defaultCountry(e){return this.attr.defaultCountry=e,this}allowedCountries(e){return this.attr.allowedCountries=e,this}};function location(e,t){return new LocationAttributeBuilder(`location`,e,t)}var UserAttributeBuilder=class extends BaseAttributeBuilder{constructor(e,t){super(`user`,e,t),this.attr.types=[`user`,`agent`]}types(e){let t=[...new Set(e)];if(t.length===0)throw Error(`[AttributeBuilder] user.types must contain at least one type.`);return this.attr.types=t,this}multiple(){return this.attr.multiple=!0,this}notifiesOnAssign(){return this.attr.notifiesOnAssign=!0,this}actors(){return this.attr.actors=!0,this}};function user(e,t){return new UserAttributeBuilder(e,t)}var BaseRelationAttributeBuilder=class extends BaseAttributeBuilder{to(e,t){let n={object:e,...t};return this.attr.targets?.push(n),this}toAny(){return this.attr.targets=[{object:`*`}],this}qualifyWith(...e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.qualifyWith() must be called AFTER .to(). Example: relation("companies", "Companies").to("companies").qualifyWith(...)`);return this.attr.properties=buildPropertySchema(e),this}bilateral(e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.bilateral() must be called AFTER .to(). Example: relation("company", "Company").to("companies").bilateral({ ... })`);if(t.length>1)throw Error(`Bilateral relations are not supported for polymorphic relations (multiple .to() targets).`);if(Yn(this.attr))throw Error(`Bilateral relations are not supported for universal relations (.toAny()).`);let n=t[0]?.object;if(!n)throw new L(`Bilateral relation requires one target object`,[{path:[`bilateral`,`object`],message:`Bilateral relation requires one target object`}]);if(e.object&&e.object!==n){let t=`Bilateral inverse object ${e.object} must match relation target ${n}`;throw new L(t,[{path:[`bilateral`,`object`],message:t}])}return this.attr.bilateral={...e,object:n},this}},SingleRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t){super(`relation`,e,t),this.attr.cardinality=`one`,this.attr.targets=[]}many(){let e=new MultiRelationAttributeBuilder(this.attr.name,this.attr.label??``,{targets:this.attr.targets,isRequired:this.attr.required});return this.attr.system===!1&&e.runtime(),this.attr.hidden&&e.hidden(),this.attr.placeholder&&e.placeholder(this.attr.placeholder),this.attr.description&&e.description(this.attr.description),this.attr.icon&&e.icon(this.attr.icon),this.attr.order!==void 0&&e.order(this.attr.order),this.attr.metadata&&e.metadata(this.attr.metadata),e}},MultiRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t,n){super(`relation`,e,t),this.attr.cardinality=`many`,this.attr.targets=n?.targets??[],this.attr.defaultValue=[],n?.isRequired&&(this.attr.required=!0)}maxItems(e){return this.attr.maxItems=e,this}};function relation(e,t){return new SingleRelationAttributeBuilder(e,t)}var FormulaAttributeBuilder=class extends BaseAttributeBuilder{expression(e){return this.attr.expression=e,this}returns(e){return this.attr.returnType=e,this}decimals(e){return this.attr.decimals=e,this}currency(e){return this.attr.currencyCode=e,this}required(){throw Error(`Formula attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function formula(e,t){return new FormulaAttributeBuilder(`formula`,e,t)}var RollupAttributeBuilder=class extends BaseAttributeBuilder{from(e){return this.attr.relationAttribute=e,this}aggregate(e){return this.attr.targetAttribute=e,this}using(e){return this.attr.function=e,this}decimals(e){return this.attr.decimals=e,this}path(e){return this.attr.relationPath=e,this}targetType(e){return this.attr.targetAttributeType=e,this}targetOptions(e){return this.attr.targetAttributeOptions=asMutableArray(e),this}targetCurrency(e){return this.attr.targetCurrencyCode=e,this}build(){let e=this.attr.function,t=this.attr.targetAttributeType;if(e===`original`&&t!==void 0&&t!==`select`&&t!==`status`&&t!==`multiselect`){let e=this.attr.relationAttribute??`relation`,n=this.attr.targetAttribute??`field`;throw new F(`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${t}") was given. To surface a plain ${t} value from a related record, use a formula instead — e.g. formula("${this.attr.name}", "…").expression("${e}.${n}").`,I.VALIDATION_FAILED)}return super.build()}required(){throw Error(`Rollup attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function rollup(e,t){return new RollupAttributeBuilder(`rollup`,e,t)}var DocumentAttributeBuilder=class extends BaseAttributeBuilder{accepts(e){return this.attr.accepts=e,this}maxFileSize(e){return this.attr.maxFileSize=e,this}qualifyWith(...e){return this.attr.properties=buildPropertySchema(e),this}};function document(e,t){return new DocumentAttributeBuilder(`document`,e,t)}const W={owner:`standardshq`,repo:`skills`,ref:`stable`},G=`[A-Za-z0-9._-]+`,y_=`[A-Za-z0-9_-]+`,b_=RegExp(`^(${y_})/(${G})@([a-z0-9-]+)(?:#(${G}))?$`),x_=RegExp(`^(${y_})/(${G})$`),S_=/^[0-9a-f]{40}$/i;function isSafeSegment(e){return e!==`.`&&!e.startsWith(`-`)&&!e.includes(`..`)}function refuse$1(e,t){throw new L(`Invalid skill source "${e}": ${t} (expected owner/repo@skill or owner/repo@skill#ref)`,[{path:[`source`],message:t}])}function canonicalRef(e){return S_.test(e)?e.toLowerCase():e}function parseSkillSource(e){let t=e.trim(),n=t.startsWith(`github.com/`)?t.slice(11):t,r=b_.exec(n);if(!r)return refuse$1(e,`malformed or not a github.com source`);let[,i,a,o,s]=r;return[i,a,s??``].every(isSafeSegment)?{host:`github.com`,owner:i,repo:a,skill:o,ref:s===void 0?null:canonicalRef(s)}:refuse$1(e,"a segment cannot start with `-`, hold `..` or be `.`")}function isSkillRepository(e){return x_.exec(e)?.slice(1).every(isSafeSegment)??!1}function formatSkillSource(e){let t=`${e.owner}/${e.repo}@${e.skill}`;return e.ref===null?t:`${t}#${e.ref}`}function isPinnedSkillSource(e){return e.ref!==null&&S_.test(e.ref)}const K=/^[a-z0-9][a-z0-9-]{0,62}$/,q=`core`;function assertBundleName(e){if(!K.test(e))throw new L(`Invalid bundle name "${e}": expected a lowercase slug matching ${K}`,[]);if(e===`core`)throw new L(`Bundle name "${q}" is reserved`,[])}async function sha256Hex(e){let t=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e));return Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,`0`)).join(``)}function nameSlug(e,t){return e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).slice(0,t).replace(/^_+|_+$/g,``)}function cloneBuilderValue(e,t){try{return structuredClone(e)}catch{let e=`Builder configuration must contain cloneable data`;throw new L(e,[{path:t,message:e}])}}function requireBuilderName(e,t){if(typeof e!=`string`||e.trim().length===0)throw new L(`Name must not be blank`,[{path:t,message:`Name must not be blank`}])}function validateContentConfiguration(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw new L(`Invalid content configuration`,[{path:t,message:`Expected content configuration`}]);for(let n of[`name`,`label`,`placement`])if(Object.hasOwn(e,n)){let e=`Independent content configuration cannot define ${n}`;throw new L(e,[{path:[...t,n],message:e}])}let n=j.safeParse({...e,name:`content`,placement:e.type===`group`?`grid`:`main`});if(!n.success)throw L.fromZodErrors(n.error.issues.map(e=>({path:[...t,...e.path.map(String)],message:e.message})));n.data.type===`form`&&n.data.groups.forEach((e,n)=>requireBuilderName(e.name,[...t,`groups`,String(n),`name`]));let{name:r,label:i,placement:a,...o}=n.data;return cloneBuilderValue(o,t)}function validateLiteralContent(e,t){return validateContentConfiguration(e,t),cloneBuilderValue(e,t)}function positionOf(e){return{x:e.x,y:e.y,w:e.w,h:e.h}}function bottomOf(e){return e.y+e.h}function collides(e,t){return e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h}function firstCollision(e,t){return t.find(t=>collides(e,t))}function inReadingOrder$1(e){return[...e].sort((e,t)=>e.y-t.y||e.x-t.x)}function snapWidth(e,t,n){let r=12-t,i=g.filter(e=>e>=n&&e<=r);return i.length===0?g.find(e=>e>=n)??n:i.reduce((t,n)=>{let r=Math.abs(n-e),i=Math.abs(t-e);return r<i||r===i&&n>t?n:t})}function sharesColumns(e,t){return e.x<t.x+t.w&&t.x<e.x+e.w}function risenRow(e,t){return t.reduce((t,n)=>n.y<e.y&&sharesColumns(e,n)?Math.max(t,bottomOf(n)):t,0)}function packLayout(e,t){let n=e.map(e=>{let n=t?.get(e.i);return n===void 0?e:{...e,h:n}}),r=n.filter(e=>e.static===!0),i=new Map(r.map(e=>[e.i,e]));for(let e of inReadingOrder$1(n.filter(e=>e.static!==!0))){let t=risenRow(e,r),n=firstCollision({...e,y:t},r);for(;n!==void 0;)t=bottomOf(n),n=firstCollision({...e,y:t},r);let a={...e,y:t};r.push(a),i.set(e.i,a)}return n.map(e=>i.get(e.i)??e)}function settleLayout(e,t){let n=e.filter(e=>e.static===!0),r=e.filter(e=>e.static!==!0),i=/* @__PURE__ */ new Map;for(let e of[...inReadingOrder$1(r.filter(e=>t.has(e.i))),...inReadingOrder$1(r.filter(e=>!t.has(e.i)))]){let t=e,r=firstCollision(t,n);for(;r!==void 0;)t={...t,y:bottomOf(r)},r=firstCollision(t,n);n.push(t),i.set(e.i,t)}return packLayout(e.map(e=>i.get(e.i)??e))}function pageCompactor(){return{type:`vertical`,allowOverlap:!1,preventCollision:!1,compact:e=>packLayout(e).map(e=>({...e,moved:!1}))}}function clampHeight(e,t){let n=t.minHeight??1,r=t.maxHeight??1/0;return Math.max(1,n,Math.min(r,e))}function widthStepConstraint(e){return{name:`width-steps`,constrainSize:(t,n,r)=>{let i=e(t.i),a=snapWidth(n,t.x,i.minWidth);return i.height===`fit`?{w:a,h:t.h}:i.height===`flexible`?{w:a,h:clampHeight(r,i)}:{w:a,h:Math.max(1,r)}}}}function snapCell(e,t){let n=Math.max(0,Math.min(e.x,11)),r=snapWidth(e.w,n,t(e.i).minWidth);return{...e,x:Math.min(n,12-r),y:Math.max(0,e.y),w:r,h:Math.max(1,e.h)}}function samePosition(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function pushApart(e){let t=e.filter(e=>e.static===!0),n=/* @__PURE__ */ new Map;for(let r of inReadingOrder$1(e.filter(e=>e.static!==!0))){let e=r,i=firstCollision(e,t);for(;i!==void 0;){let n={...e,x:i.x+i.w};e=n.x+n.w<=12&&firstCollision(n,t)===void 0?n:{...e,y:bottomOf(i)},i=firstCollision(e,t)}t.push(e),n.set(r.i,e)}return e.map(e=>n.get(e.i)??e)}function isValidStatic(e){return[e.x,e.y,e.w,e.h].every(Number.isInteger)&&e.x>=0&&e.y>=0&&e.h>=1&&g.includes(e.w)&&e.x+e.w<=12}function keptStatics(e){let t=[],n=/* @__PURE__ */ new Set;for(let r of inReadingOrder$1(e.filter(e=>e.static===!0)))isValidStatic(r)&&firstCollision(r,t)===void 0?t.push(r):n.add(r.i);return e.map(e=>n.has(e.i)?{...e,static:!1}:e)}function boundedHeight(e,t){let n=t(e.i);if(e.static===!0||n.height!==`flexible`)return e;let r=clampHeight(e.h,n);return r===e.h?e:{...e,h:r}}function repairPageGrid(e,t){let n=[],r=keptStatics(e).map(e=>{let r=boundedHeight(e,t);return r!==e&&n.push({name:e.i,kind:`height`,from:positionOf(e),to:positionOf(r)}),r}).map(e=>{if(e.static===!0)return e;let r=snapCell(e,t);return samePosition(e,r)||n.push({name:e.i,kind:`width`,from:positionOf(e),to:positionOf(r)}),r}),i=pushApart(r);i.forEach((e,t)=>{let i=r[t];i!==void 0&&!samePosition(i,e)&&n.push({name:e.i,kind:`pushed`,from:positionOf(i),to:positionOf(e)})});let a=packLayout(i),o=keptFill(a,t);for(let e of inReadingOrder$1(a))e.i!==o&&t(e.i).height===`fill`&&n.push({name:e.i,kind:`fill`});return{cells:a,repairs:n}}function keptFill(e,t){return inReadingOrder$1(e).find(e=>e.static!==!0&&t(e.i).height===`fill`)?.i}function firstFreeSlot(e,t,n){let r=t.reduce((e,t)=>Math.max(e,bottomOf(t)),0);for(let i=n;i<=r;i+=1)for(let n=0;n+e.w<=6;n+=1)if(firstCollision({x:n,y:i,...e},t)===void 0)return{x:n,y:i};return{x:0,y:r}}function deriveLayout6(e,t){let n=[];for(let r of inReadingOrder$1(e)){let e=Math.min(6,Math.max(t(r.i).minWidth,Math.ceil(r.w/2))),i=n.at(-1)?.y??0;n.push({i:r.i,...firstFreeSlot({w:e,h:r.h},n,i),w:e,h:r.h})}return n}function figureSlot(e,t,n){for(let r of inReadingOrder$1(e.filter(e=>n.has(e.i)))){let n={x:r.x+r.w,y:r.y,...t};if(n.x+n.w<=12&&firstCollision(n,e)===void 0)return n}}function placeNew(e,t,n,r){let i={w:snapWidth(n.size.w,0,n.minWidth),h:Math.max(1,n.size.h)};return n.figure?{i:t,...figureSlot(e,i,r)??{x:0,y:0,...i}}:{i:t,x:0,y:e.reduce((e,t)=>Math.max(e,bottomOf(t)),0),...i}}function spanContent(e,t){if(!g.includes(t)){let e=`A block spans ${g.join(`, `)} columns, not ${String(t)}`;throw new L(e,[{path:[`content`,`span`],message:e}])}return{content:e,span:t}}function configureContent(e,t){try{return typeof e==`object`&&e&&`build`in e&&typeof e.build==`function`?{configuration:validateContentConfiguration(e.build(),t),extension:e.extension}:{configuration:validateContentConfiguration(e,t)}}catch(e){throw e instanceof L?new L(e.message,e.errors.map(e=>({...e,path:e.path[0]===`content`?[...t,...e.path.slice(1)]:e.path}))):e}}function storedQuery(e,t){let n=[`search`,`offset`].filter(t=>e.state[t]!==void 0);if(n.length>0)throw new L(`A ${t} cannot keep a query's ${n.join(` or `)}`,n.map(e=>({path:[t,e],message:`A ${t} stores no ${e}; use filters and limit instead`})));return e.toDefinition()}function checkInputs(e,t){for(let[n,r]of Object.entries(t)){let t=e.inputs[n];r!==void 0&&t!==void 0&&A({parameters:t.schema},r,[`content`,`parameters`,n])}return t}var BlockContentBuilder=class{constructor(e,t,n){this.extension=e,this.parameters=t,this.heightMode=n}copy(e,t){let n=this.constructor;return new n(this.extension,e,t)}with(e){let t={...this.parameters};for(let[n,r]of Object.entries(e))r===void 0?delete t[n]:t[n]=r;return checkInputs(this.extension,e),this.copy(t,this.heightMode)}height(e){return this.copy(this.parameters,e)}build(){let e={type:`custom`,extension:this.extension.name,parameters:cloneBuilderValue(this.parameters,[`content`,`parameters`]),...this.heightMode===void 0?{}:{height:this.heightMode}};return validateContentConfiguration(e,[`content`]),A(this.extension,e.parameters,[`content`,`parameters`]),e}span(e){return spanContent(this,e)}},Measures=class{count(){return this.measured(`count`)}sum(e){return this.measured(`sum`,e)}cumulative(e){return this.measured(`cumulative`,e)}avg(e){return this.measured(`avg`,e)}min(e){return this.measured(`min`,e)}max(e){return this.measured(`max`,e)}};function measure(e,t,n){return{query:e,measure:t,...n===void 0?{}:{attribute:n}}}var MetricBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}trend(e,t){return this.with({trend:e,trendBucket:t})}compare(e,t){return this.with({compare:e,period:t})}target(e){return this.with({target:e})}},MetricQuery=class extends Measures{constructor(e){super(),this.query=e}measured(e,t){return new MetricBuilder(b,checkInputs(b,measure(this.query,e,t)))}};function groupBy(e){return typeof e==`string`?[e,void 0]:[e.attribute,e.bucket]}var ChartBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}by(e){let[t,n]=groupBy(e);return this.with({by:t,byBucket:n})}by2(e){let[t,n]=groupBy(e);return this.with({by2:t,by2Bucket:n})}kind(e){return this.with({kind:e})}bar(){return this.kind(`bar`)}horizontalBar(){return this.kind(`horizontal_bar`)}line(){return this.kind(`line`)}area(){return this.kind(`area`)}donut(){return this.kind(`donut`)}funnel(){return this.kind(`funnel`)}treemap(){return this.kind(`treemap`)}calendar(){return this.kind(`calendar`)}order(e){return this.with({order:e})}},ChartQuery=class extends Measures{constructor(e){super(),this.query=e}measured(e,t){return new ChartBuilder(v,checkInputs(v,{...measure(this.query,e,t),kind:`bar`}))}};const C_={"7d":7,"30d":30};var AgendaBuilder=class extends BlockContentBuilder{label(e){return this.with({label:e})}next(e){let t=typeof e==`number`?e:C_[e];if(!Number.isInteger(t)||t<1){let e=`An agenda looks ahead a whole number of days, at least 1`;throw new L(e,[{path:[`content`,`parameters`,`next`],message:e}])}return this.with({next:t})}yearly(){return this.with({yearly:!0})}},CardBuilder=class extends BlockContentBuilder{fields(...e){return this.with({fields:e})}record(e){return this.with({record:e})}},DecisionsBuilder=class extends BlockContentBuilder{kinds(...e){return this.with({kinds:e})}limit(e){return this.with({limit:e})}},MeetingsUpcomingBuilder=class extends BlockContentBuilder{limit(e){return this.with({limit:e})}},MailboxBuilder=class extends BlockContentBuilder{category(e){return this.with({category:e})}important(){return this.with({important:!0})}unread(){return this.with({unread:!0})}limit(e){return this.with({limit:e})}label(e){return this.with({label:e})}};function metric(e){return new MetricQuery(storedQuery(e,`metric`))}function chart(e){return new ChartQuery(storedQuery(e,`chart`))}function agenda(e,t){return new AgendaBuilder(d,checkInputs(d,{query:storedQuery(e,`agenda`),attribute:t}))}function card(e){let t=e===void 0||typeof e==`string`?e:e.build().name;return new CardBuilder(_,t===void 0?{}:checkInputs(_,{object:t}))}function text$1(e){return new BlockContentBuilder(C,checkInputs(C,{markdown:e}))}function decisions(){return new DecisionsBuilder(ce,{})}function meetingsUpcoming(){return new MeetingsUpcomingBuilder(Je,{})}function mailbox(){return new MailboxBuilder(Ge,{})}function isSpanned(e){return typeof e==`object`&&!!e&&`span`in e&&`content`in e}function total(e){return e.reduce((e,t)=>e+t,0)}function spread(e){return e.length===0?0:Math.max(...e)-Math.min(...e)}function betterSplit(e,t){let n=total(e)-total(t);if(n!==0)return n>0;let r=spread(t)-spread(e);if(r!==0)return r>0;let i=e.findIndex((e,n)=>e!==t[n]);return i!==-1&&(e[i]??0)>(t[i]??0)}function splitColumns(e,t){let n=[...t];function visit(r,i){let a=t[r.length];if(a===void 0)betterSplit(r,n)&&(n=r);else for(let t of g)t>=a&&i+t<=e&&visit([...r,t],i+t)}return visit([],0),n}function rowWidths(e,t){let n=e.filter(e=>e.span===void 0);n.length>4&&reject(t,`A row holds at most 4 unsized blocks`);let r=total(e.map(e=>e.span??e.minWidth));r>12&&reject(t,`Blocks ${e.map(e=>`"${e.key}"`).join(`, `)} do not fit one row: they need at least ${r} of 12 columns`);let i=splitColumns(12-total(e.map(e=>e.span??0)),n.map(e=>e.minWidth)),a=0;return e.map(e=>{if(e.span!==void 0)return e.span;let t=i[a]??e.minWidth;return a+=1,t})}function reject(e,t){throw new L(t,[{path:e,message:t}])}function traitsOf(e,t=[]){return Xn(e,w,new Map(t.map(e=>[e.name,e])))}function headingNames(e){let t=new Set(e.flatMap(e=>e.kind===`heading`?e.meta.name===void 0?[]:[e.meta.name]:[...Object.keys(e.blocks),...e.group?.name===void 0?[]:[e.group.name]]));return e.flatMap(e=>{if(e.kind!==`heading`)return[];if(e.meta.name!==void 0)return[e.meta.name];let n=nameSlug(e.title,40),r=n===``?`heading`:`heading_${n}`,i=r;for(let e=2;t.has(i);e+=1)i=`${r}_${e}`;return t.add(i),[i]})}function headingEntry(e,t,n){let r={title:t,...n.description===void 0?{}:{description:n.description},...n.icon===void 0?{}:{icon:n.icon}};return{key:e,content:new BlockContentBuilder(Re,r),span:12}}function groupOf(e,t,n){let[r]=e.map(e=>e.name).sort(),i=Cn(e.length);return(i!==void 0||r===void 0)&&reject(n,String(i)),{type:`group`,name:t.name??`group_${r}`,placement:`grid`,...t.label===void 0?{}:{label:t.label},members:e.map(e=>e.name)}}function requirePlacement(e,t,n,r,i){if(e.type===`page`&&reject(i,`Content "${n}" cannot reference a page from a page`),pr(e,t,n,r,i),e.type!==`custom`)return;let a=t?.refine?.(e.parameters??{},r);a&&reject([...i,`parameters`,a.input],a.message)}var J=class PageBuilder{constructor(e){this.kind=`view`,this.data=e}icon(e){return new PageBuilder({...this.data,icon:e})}description(e){return new PageBuilder({...this.data,description:e})}home(){return new PageBuilder({...this.data,home:!0})}for(e){let t=typeof e==`string`?e:e.build().name;return new PageBuilder({...this.data,object:t})}row(e,t={}){let n=t.group===void 0?{kind:`row`,blocks:e}:{kind:`row`,blocks:e,group:t.group};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}heading(e,t={}){let n={kind:`heading`,title:e,meta:t};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}build(){let e=[`views`,`0`],{name:t,label:n,object:r,icon:i,description:a,home:o,sections:s}=this.data;requireBuilderName(t,[...e,`name`]),r!==void 0&&requireBuilderName(r,[...e,`object`]),o&&r!==void 0&&reject([...e,`home`],`Only a standalone page can be the home`),s.every(e=>e.kind===`row`&&Object.keys(e.blocks).length===0)&&reject([...e,`contents`],`A page declares at least one block`);let c=r===void 0?`page`:`record`,l=[],u=[],d=headingNames(s),f=0;for(let t of s){let n=[...e,`contents`,String(l.length)],r=(t.kind===`heading`?[headingEntry(d[f++]??``,t.title,t.meta)]:Object.entries(t.blocks).map(([e,t])=>isSpanned(t)?{key:e,content:t.content,span:t.span}:{key:e,content:t,span:void 0})).map(t=>{let n=[...e,`contents`,String(l.length)];requireBuilderName(t.key,[...n,`name`]);let{configuration:r,extension:i}=configureContent(t.content,n);requirePlacement(r,i,t.key,c,n);let a={...r,name:t.key,placement:`grid`};return l.push(a),{content:a,span:t.span}}),i=rowWidths(r.map(({content:e,span:t})=>({key:e.name,...t===void 0?{}:{span:t},minWidth:traitsOf(e).minWidth})),n),a=u.reduce((e,t)=>Math.max(e,t.y+t.h),0);if(t.kind===`row`&&t.group!==void 0){let e=groupOf(r.map(({content:e})=>e),t.group,n);l.push(e),u.push({i:e.name,x:0,y:a,w:12,h:traitsOf(e,l).size.h});continue}let o=0;r.forEach(({content:e},t)=>{let n=i[t]??0;u.push({i:e.name,x:o,y:a,w:n,h:traitsOf(e).size.h}),o+=n})}let p=Object.fromEntries(packLayout(u).map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),m={name:t,label:n,...r===void 0?{}:{object:r},context:`page`,...i===void 0?{}:{icon:i},...a===void 0?{}:{description:a},...o?{home:!0}:{},contents:l,grid:p},h=T.safeParse(m);if(!h.success)throw L.fromZodErrors(h.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return{kind:`view`,definition:cloneBuilderValue(m,e)}}};function page(e,t){return new J({name:e,label:t,object:void 0,sections:[]})}var Y=class ViewBuilder{constructor(e,t=[]){this.kind=`view`,this.data=cloneBuilderValue(e,[`views`,`0`]),this.extensions=t.map(e=>e&&{...e})}for(e){let t=typeof e==`string`?e:e.build().name;return new ViewBuilder({...this.data,object:t},this.extensions)}default(){return new ViewBuilder({...this.data,default:!0},this.extensions)}description(e){return new ViewBuilder({...this.data,description:e},this.extensions)}icon(e){return new ViewBuilder({...this.data,icon:e},this.extensions)}place(e,t,n,r,i){let{configuration:a,extension:o}=configureContent(n,[`views`,`0`,`contents`,String(this.data.contents.length)]),s={...a,name:e,label:t,placement:r},c=[...this.data.contents,s],l=i===void 0?{}:{anchors:{...this.data.anchors,[e]:{after:i}}};return new ViewBuilder({...this.data,...l,contents:c},[...this.extensions,o])}tab(e,t,n,r){return this.place(e,t,n,`main`,r?.after)}aside(e,t,n){return this.place(e,t,n,`aside`)}build(){let e=[`views`,`0`];requireBuilderName(this.data.name,[...e,`name`]),requireBuilderName(this.data.object,[...e,`object`]);let t=T.safeParse(this.data);if(!t.success)throw L.fromZodErrors(t.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return this.data.contents.forEach((t,n)=>{let r=[...e,`contents`,String(n)];requireBuilderName(t.name,[...r,`name`]),t.type===`form`&&t.groups.forEach((e,t)=>requireBuilderName(e.name,[...r,`groups`,String(t),`name`])),pr(t,this.extensions[n],t.name,this.data.context,r)}),{kind:`view`,definition:cloneBuilderValue(this.data,e)}}};function detailView(e,t){return new Y({name:e,label:t,object:void 0,context:`record`,contents:[]})}function listView(e,t){return new Y({name:e,label:t,object:void 0,context:`collection`,contents:[]})}function isViewPiece(e){return`kind`in e&&e.kind===`view`}function isObjectPiece(e){return!(isViewPiece(e)||e instanceof M)}function assertPiece(e,t){if(typeof e!=`object`||!e)throw new L(`Unsupported bundle piece: ${t}`,[]);if(isViewPiece(e)||e instanceof M||typeof e.build==`function`)return;let n=e.name;throw new L(`Unsupported bundle piece: ${typeof n==`string`?n:String(t)}`,[])}function declarationOf$1(e){return e instanceof J||e instanceof Y?e.build():e}function isPage(e){return e.definition.context===`page`}function validateView(e){let t=T.safeParse(e);if(t.success)return t.data;let n=typeof e==`object`&&e&&`name`in e?String(e.name):`(unnamed)`,r=L.fromZodErrors(t.error.issues.map(e=>({path:e.path.map(String),message:e.message})));throw new L(`View "${n}" is invalid. ${r.message}`,r.errors)}function identityOf(e){return`${e.object??``}:${e.name}`}function assertUniqueIdentities(e,t){let n=/* @__PURE__ */ new Set;for(let r of t){let t=identityOf(r);if(n.has(t))throw new N(e,r.name);n.add(t)}}function byIdentity(e){return(t,n)=>{let r=identityOf(e(t)),i=identityOf(e(n));return r<i?-1:+(r>i)}}async function hashBundlePieces(e){return sha256Hex(r({objects:[...e.objects].sort(byIdentity(e=>({name:e.name}))),views:[...e.views].sort(byIdentity(e=>e)),pages:[...e.pages].sort(byIdentity(e=>e.definition)),agents:[...e.agents].sort(byIdentity(e=>({name:e.name})))}))}const w_={title:120,context:200,prompt:ma};function assertSetupWithinLimits(e){let t=Object.keys(w_).flatMap(t=>{let n=w_[t],r=e[t];return r!==void 0&&r.length>n?[{path:[`setup`,t],message:`Setup ${t} must be at most ${n} characters`}]:[]});if(t.length>0)throw new L(`Bundle setup is invalid`,t)}function assertSetup(e,t){e&&assertSetupWithinLimits(e);for(let e of Object.values(t))assertSetupWithinLimits({title:e[`setup.title`],context:e[`setup.context`],prompt:e[`setup.prompt`]})}function assertSkills(e){let t=/* @__PURE__ */ new Set,n=e.flatMap(e=>{let n=skillProblem(e,t);return n===null?[]:[{path:[`skills`],message:n}]});if(n.length>0)throw new L(`Bundle skills are invalid`,n)}function skillProblem(e,t){let n;try{n=parseSkillSource(e)}catch(t){return t instanceof Error?t.message:`Invalid skill source "${e}"`}return n.owner!==W.owner||n.repo!==W.repo?`Skill "${e}" must come from ${W.owner}/${W.repo}`:n.ref===null?t.has(n.skill)?`Skill "${e}" is declared twice`:(t.add(n.skill),null):`Skill "${e}" cannot pin a ref`}async function builtBundleFromPieces(e){let t=e.name===q;t||assertBundleName(e.name);let{objects:n,pages:r,agents:i}=e,a=e.views.map(validateView),o=n.map(e=>e.name);if(assertUniqueIdentities(`object`,o.map(e=>({name:e}))),assertUniqueIdentities(`view`,a),assertUniqueIdentities(`page`,r.map(e=>e.definition)),assertUniqueIdentities(`agent`,i.map(e=>({name:e.name}))),!t){let e=o.find(D);if(e!==void 0)throw new P(e,`bundle`)}let{setup:s}=e,c=e.translations??{};assertSetup(s,c);let l=e.skills??[];return assertSkills(l),{name:e.name,label:e.label.trim(),description:e.description??null,hash:await hashBundlePieces({objects:n,views:a,pages:r,agents:i}),objects:n,views:a,pages:r,agents:i,uses:e.uses??[],samples:e.samples??[],...s?{setup:s}:{},...l.length>0?{skills:l}:{},translations:c}}const T_=Symbol.for(`standards.bundle`);function isBundle(e){return typeof e==`object`&&!!e&&e[T_]===!0}var BundleBuilder=class{constructor(e,t){this[T_]=!0,this.pieces=[],this.used=[],this.descriptionText=null,this.sampleRecords=[],this.skillSources=[],this.translationTables={},this.built=null,assertBundleName(e),this.name=e,this.label=t,this.objectBuilders=[]}description(e){return this.descriptionText=e,this.changed()}add(...e){return this.pieces.push(...e),this.objectBuilders.push(...e.filter(isObjectPiece)),this.changed(),this}uses(...e){return this.used.push(...e),this.changed()}samples(e){return this.sampleRecords=e,this.changed()}setup(e){return this.setupInvitation=e,this.changed()}skills(...e){return this.skillSources=[...this.skillSources,...e],this.changed()}translations(e,t){return this.translationTables[e]=t,this.changed()}build(){return this.built??=this.assemble(),this.built}changed(){return this.built=null,this}async assemble(){let e=[],t=[],n=[],r=[];for(let[i,a]of this.pieces.entries())if(assertPiece(a,i),a instanceof M)r.push(a.build());else if(isViewPiece(a)){let e=declarationOf$1(a);isPage(e)?n.push(e):t.push(e.definition)}else e.push(a.build());return this.assertNotInUsed(e),builtBundleFromPieces({name:this.name,label:this.label,description:this.descriptionText,objects:e,views:t,pages:n,agents:r,uses:this.used.map(e=>e.name),samples:this.sampleRecords,...this.setupInvitation?{setup:this.setupInvitation}:{},skills:this.skillSources,translations:{...this.translationTables}})}assertNotInUsed(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Set([this]),visit=e=>{if(!n.has(e)){n.add(e);for(let n of e.objectBuilders){let r=n.build().name;t.has(r)||t.set(r,e.name)}for(let t of e.used)visit(t)}};for(let e of this.used)visit(e);for(let{name:n}of e){let e=t.get(n);if(e!==void 0)throw new N(`object`,n,`Object "${n}" is declared by bundle "${this.name}" and by its used bundle "${e}"`)}}};function bundle(e,t){return new BundleBuilder(e,t)}function readOnlyOption(e){return e?.readOnly===void 0?{}:{readOnly:e.readOnly}}function buildFreeFieldRef(e,t){return{type:`free`,attribute:e.build(),label:t?.label,required:t?.required,prefillExpression:t?.prefillExpression,...readOnlyOption(t)}}function buildSlotFieldRef(e,t,n){let[r,...i]=Array.isArray(e)?e:[e];return{type:`slot`,slotId:r,additionalSlotIds:i.length>0?i:void 0,attribute:t,label:n?.label,required:n?.required,tooltip:n?.tooltip,...readOnlyOption(n)}}const E_=R.boolean().optional();var FormRowBuilder=class{constructor(e,t,n){this._finalized=!1,this.stepBuilder=e,this.rowData={id:t,order:n,type:`fields`,fields:[]}}field(e,t,n){return this.rowData.fields.push(buildSlotFieldRef(e,t,n)),this}freeField(e,t){return this.rowData.fields.push(buildFreeFieldRef(e,t)),this}row(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).row(e)}heading(e,t){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).heading(e,t)}separator(){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).separator()}text(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).text(e)}endRow(){return this._finalized?this.stepBuilder:(this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData))}},FormStepBuilder=class{constructor(e,t,n){this.rowOrder=0,this.formBuilder=e,this.stepData={id:t,label:n,rows:[]}}description(e){return this.stepData.description=e,this}field(e,t,n){this.rowOrder++;let r=`row-${this.stepData.id}-${this.rowOrder}`,i=buildSlotFieldRef(e,t,n),a={id:r,order:this.rowOrder,type:`fields`,fields:[i]};return this.stepData.rows.push(a),this}freeField(e,t){this.rowOrder++;let n=`row-${this.stepData.id}-${this.rowOrder}`,r=buildFreeFieldRef(e,t),i={id:n,order:this.rowOrder,type:`fields`,fields:[r]};return this.stepData.rows.push(i),this}row(e){return this.rowOrder++,new FormRowBuilder(this,e,this.rowOrder)}heading(e,t){this.rowOrder++;let n={id:`heading-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`heading`,content:e,level:t};return this.stepData.rows.push(n),this}separator(){this.rowOrder++;let e={id:`sep-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`separator`};return this.stepData.rows.push(e),this}text(e){this.rowOrder++;let t={id:`text-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`text`,content:e};return this.stepData.rows.push(t),this}step(e,t){return this.formBuilder._finalizeStep(this.stepData).step(e,t)}build(){return this.formBuilder._finalizeStep(this.stepData).build()}_finalizeRow(e){return e.fields.length>0&&this.stepData.rows.push(e),this}_getData(){return this.stepData}},FormBuilder=class{constructor(e,t){this.data={slots:[],steps:[],status:`draft`,version:1},this.validateName(e),this.data.name=e,this.data.label=t}description(e){return this.data.description=e,this}icon(e){return this.data.icon=e,this}status(e){return this.data.status=e,this}metadata(e){return this.data.metadata=e,this}slot(e,t,n){if(this.data.slots.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate slot id: "${e}"`);let r={id:e,objectName:t,label:n.label,mode:n.mode??`create`,color:n.color,icon:n.icon};return this.data.slots.push(r),this}step(e,t){if(this.data.steps.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate step id: "${e}"`);return new FormStepBuilder(this,e,t)}build(){return this.validateRequiredData(),this.validateSlotReferences(),this.validateFreeFields(),this.validatePrefillExpressions(),this.validateReadOnly(),this.data}_finalizeStep(e){return this.data.steps.push(e),this}validateName(e){let t=R.string().min(1,`Form name cannot be empty`).max(63,`Form name is too long (max 63 characters)`).regex(/^[a-z0-9]+(-[a-z0-9]+)*$/,{message:`Invalid form name format. Name must be in kebab-case: 'client-onboarding', 'contact-creation'`});try{t.parse(e)}catch(e){throw e instanceof R.ZodError?Error(`[FormBuilder] ${e.issues[0].message}`):e}}validateRequiredData(){if(this.data.slots.length===0)throw Error(`[FormBuilder] At least one slot is required. Use .slot() to add slots.`);if(this.data.steps.length===0)throw Error(`[FormBuilder] At least one step is required. Use .step() to add steps.`)}validateSlotReferences(){let e=new Map(this.data.slots.map(e=>[e.id,e.objectName]));for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(r.type!==`slot`)continue;let n=getSlotFieldTargets(r);for(let r of n)if(!e.has(r))throw Error(`[FormBuilder] Step "${t.id}" references unknown slot "${r}". Declare it with .slot("${r}", ...) first.`);let i=new Set(n.map(t=>e.get(t)));if(i.size>1)throw Error(`[FormBuilder] Step "${t.id}" field on attribute "${r.attribute}" targets slots of different objects (${[...i].join(`, `)}). A multi-slot field must target slots of the same object.`)}}validatePrefillExpressions(){let e=[...V,`join`,`where`];for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(!isFormFreeFieldRef(r)||!r.prefillExpression)continue;let n=r.prefillExpression,i=`prefillExpression on free field "${r.attribute.name}" in step "${t.id}"`;if(!isLabelExpression(n))throw Error(`[FormBuilder] ${i} must contain at least one {{ attribute }} interpolation.`);if(/\{\{\s*\}\}/.test(n))throw Error(`[FormBuilder] ${i} contains empty {{ }} interpolation.`);for(let a of n.matchAll(/(?<!\|)\|(?!\|)\s*(\w+)(?:\s*:[^|}]*)?/g)){let n=a[1];if(!e.includes(n))throw Error(`[FormBuilder] ${i} uses invalid pipe "${n}". Valid pipes: ${e.join(`, `)}`);let o=a[0].replace(/^\|/,``);if(isWherePipe(o)&&!parseWherePipe(o))throw new L(`[FormBuilder] ${i} has a malformed where: pipe "${o.trim()}". Write where:property=value or where:property in (a,b).`,[{path:[t.id,r.attribute.name,`prefillExpression`],message:`Malformed where: pipe`}])}}}validateReadOnly(){for(let e of this.data.steps)for(let t of e.rows)if(isFormFieldsRow(t))for(let n of t.fields){if(E_.safeParse(n.readOnly).success)continue;let t=isFormFreeFieldRef(n)?n.attribute.name:n.attribute,r=isFormFreeFieldRef(n)?`free field`:`field`;throw new L(`[FormBuilder] readOnly on ${r} "${t}" in step "${e.id}" must be a boolean.`,[{path:[e.id,t,`readOnly`],message:`Expected a boolean`}])}}validateFreeFields(){let e=new Set(z);for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n)){for(let r of n.fields)if(isFormFreeFieldRef(r)){let n=r.attribute.type;if(e.has(n))throw Error(`[FormBuilder] Free field in step "${t.id}" uses forbidden attribute type "${n}". Forbidden types: ${z.join(`, `)}`)}}}};function form(e,t){return new FormBuilder(e,t)}const D_=R.object({shape:R.enum(Zo),from:R.array(R.string().refine(e=>e.trim().length>0,`Must not be blank`)).optional()}).strict();function imageLookupKindOf(e){return e.type===`text`?e.format===`url`?`website`:e.format===`email`?`email`:`name`:null}function validateObjectImage(e){let t=e.image?.from;if(t===void 0)return;let refuse=(t,n)=>{throw new L(`Object "${e.name}": ${t}`,[{path:n===void 0?[`image`,`from`]:[`image`,`from`,String(n)],message:t}])};t.length===0&&refuse(`image.from must name at least one attribute`);let n=new Map((e.attributes??[]).map(e=>[e.name,e])),r=/* @__PURE__ */ new Set;for(let[e,i]of t.entries()){r.has(i)&&refuse(`image.from names "${i}" twice`,e),r.add(i);let t=n.get(i);t?imageLookupKindOf(t)===null&&refuse(`image.from names "${i}", a ${t.type} attribute: only text attributes can locate an image`,e):refuse(`image.from names "${i}", which is not one of its attributes`,e)}}function validateObjectExpressions(e){let{name:t,labelExpression:n,embeddingExpression:r}=e;if(!n)throw new F(`Object "${t}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,I.VALIDATION_FAILED);let i=H.safeParse(n);if(!i.success){let e=i.error.issues[0]?.message??`Invalid labelExpression`;throw new F(`Invalid labelExpression for "${t}": ${e}`,I.VALIDATION_FAILED)}if(r!==void 0){let e=H.safeParse(r);if(!e.success){let n=e.error.issues[0]?.message??`Invalid embeddingExpression`;throw new F(`Invalid embeddingExpression for "${t}": ${n}`,I.VALIDATION_FAILED)}}}var ObjectBuilder=class{get"~standard"(){return createStandardSchemaProps(Kr(this.build()))}constructor(e,t){this._sealed=!1,this._toleratedAttributes=[],this.validateName(e),this.obj={name:e,label:t,attributes:[],system:!0}}id(e){return this.obj.id=e,this}description(e){return this.obj.description=e,this}pluralLabel(e){return this._pluralLabel=e,this}icon(e){return this.obj.icon=e,this}color(e){return this.obj.color=e,this}image(e={}){return this.obj.image={shape:e.shape??`square`,...e.from===void 0?{}:{from:[...e.from]}},this}runtime(){return this.obj.system=!1,this}sealed(){return this._sealed=!0,this}tolerate(e){return this._toleratedAttributes=[...this._toleratedAttributes,...e],this}attribute(e){return this.pushAttributes([e]),this}attributes(e){return this.pushAttributes(e),this}pushAttributes(e){let t=e.map(e=>`build`in e&&typeof e.build==`function`?e.build():e);vt([...this.obj.attributes,...t],e=>e.name,e=>new N(`attribute`,e,`Object "${this.obj.name}": duplicate attribute name "${e}"`)),this.obj.attributes.push(...t)}metadata(e){return this.obj.metadata={...this.obj.metadata,...e},this}order(e){return this.obj.metadata={...this.obj.metadata,order:e},this}hidden(){return this.obj.metadata={...this.obj.metadata,hidden:!0},this}labelExpression(e){return this._labelExpression=e,this}embeddingExpression(e){return this._embeddingExpression=e,this}documentLayout(e){if(e.presets)for(let t of e.presets)validatePresetStructure(t.id,t.structure,1);return this.obj.documentLayout=e,this}hierarchical(){return this.obj.hierarchical=!0,this}build(){if(!this.obj.name)throw new L(`[ObjectBuilder] Missing required field: name`,[{path:[`name`],message:`name is required`}]);if(!this.obj.label)throw new L(`[ObjectBuilder] Missing required field: label`,[{path:[`label`],message:`label is required`}]);return validateObjectExpressions({name:this.obj.name,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression}),validateObjectImage({name:this.obj.name,image:this.obj.image,attributes:this.obj.attributes}),{...this.obj,pluralLabel:this._pluralLabel,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression,sealed:this._sealed,toleratedAttributes:this._toleratedAttributes}}validateName(e){e!==void 0&&Mr(e)}};function object(e,t){if(D(e))throw new P(e,`builder`);return new ObjectBuilder(e,t)}function validatePresetStructure(e,t,n){let fail=(t,n)=>{throw new L(t,[{path:[`documentLayout`,`presets`,e],message:n}])};n>5&&fail(`Preset structure exceeds max depth of 5`,`Preset structure too deep`);let r=/* @__PURE__ */ new Set;for(let i of t){let t=i.title.trim();t.length===0&&fail(`Folder preset node title is required`,`Empty folder title`),t.includes(`/`)&&fail(`Folder preset node title cannot contain /`,`Folder title contains /: "${t}"`),r.has(t)&&fail(`Folder preset sibling titles must be unique`,`Duplicate folder title: "${t}"`),r.add(t),i.children&&i.children.length>0&&validatePresetStructure(e,i.children,n+1)}}function relationProperty(e){return requireBuilderName(e,[`relationProperty`]),{relationProperty:e}}var X=class ContentBuilder{constructor(e,t){this.data=cloneBuilderValue(e,[`content`]),this.extension=t===void 0?void 0:Object.freeze({name:t.name,contexts:t.contexts,parameters:t.parameters,refine:t.refine})}set(e){return new ContentBuilder({...this.data,...e},this.extension)}icon(e){return this.set({icon:e})}object(e){return this.set({objectName:e})}layout(e){let{layout:t,groupByAttribute:n,columnSizing:r,kanbanColumnOrder:i,kanbanColumnVisibility:a,kanbanPinnedColumns:o,...s}={...this.data,layout:void 0,groupByAttribute:void 0,columnSizing:void 0,kanbanColumnOrder:void 0,kanbanColumnVisibility:void 0,kanbanPinnedColumns:void 0};return new ContentBuilder({...s,...e},this.extension)}table(){return this.layout({layout:`table`})}list(){return this.layout({layout:`list`})}kanban(e){return this.layout({layout:`kanban`,groupByAttribute:e})}columns(...e){return this.set({columns:e})}actions(...e){return this.set({actions:e})}openMode(e){return this.set({openMode:e})}createMode(e){return this.set({createMode:e})}visibility(e){return this.set({visibility:e})}descriptionAttribute(e){return this.set({descriptionAttribute:e})}displayAttributes(...e){return this.set({displayAttributes:e})}columnSizing(e){return this.set({columnSizing:e})}kanbanColumnOrder(...e){return this.set({kanbanColumnOrder:e})}kanbanColumnVisibility(e){return this.set({kanbanColumnVisibility:e})}kanbanPinnedColumns(...e){return this.set({kanbanPinnedColumns:e})}formColumns(e){return this.set({formColumns:e})}density(e){return this.set({density:e})}titleAttribute(e){return this.set({titleAttribute:e})}allowUpload(e){return this.set({allowUpload:e})}allowRemove(e){return this.set({allowRemove:e})}hideAttachments(e){return this.set({hideAttachments:e})}relations(...e){return this.set({relations:e})}span(e){return spanContent(this,e)}height(e){return this.set({height:e})}build(){let e=validateLiteralContent(this.data,[`content`]);return this.extension&&e.type===`custom`&&A(this.extension,e.parameters,[`content`,`parameters`]),e}},O_=class GroupBuilder{constructor(e,t,n,r={}){this.data=cloneBuilderValue({name:e,label:t,fields:n,...r},[`group`])}field(e,t){let{name:n,label:r,fields:i,...a}=this.data;return new GroupBuilder(n,r,[...i,{attribute:e,...t}],a)}fields(...e){let{name:t,label:n,fields:r,...i}=this.data;return new GroupBuilder(t,n,[...r,...e.map(e=>({attribute:e}))],i)}description(e){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),description:e})}collapsible(e=!1){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),collapsible:!0,collapsed:e})}alwaysOpen(){let{collapsed:e,...t}=this.presentation();return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...t,collapsible:!1})}presentation(){let{name:e,label:t,fields:n,...r}=this.data;return r}build(){requireBuilderName(this.data.name,[`group`,`name`]);try{validateLiteralContent({type:`form`,groups:[this.data]},[`group`])}catch(e){throw e instanceof L?new L(e.message,e.errors.map(e=>({...e,path:e.path[1]===`groups`?[`group`,...e.path.slice(3)]:e.path}))):e}return cloneBuilderValue(this.data,[`group`])}};function group(e,t){return new O_(e,t,[])}function collection(e){return new X({type:`collection`,...storedQuery(e,`collection`)})}function form$1(...e){return new X({type:`form`,groups:e.map(e=>`build`in e?e.build():e)})}function activity(){return new X({type:`activity`})}function richtext$1(e){return new X({type:`richtext`,attribute:e})}function documents(){return new X({type:`documents`})}function forms(){return new X({type:`forms`})}function emails(...e){return new X({type:`emails`,emailAttributes:e})}function meetings(...e){return new X({type:`meetings`,emailAttributes:e})}function custom(e,t){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw new L(`Expected registered extension declaration`,[{path:[`content`,`extension`],message:`Expected registered extension declaration`}]);let n=validateContentConfiguration({type:`custom`,extension:e.name,parameters:t},[`content`]);if(n.type!==`custom`)throw new L(`Expected custom content`,[]);let r=new X({...n,extension:e.name},e);return r.build(),r}function recordLinksTab(){return[x.name,x.label,custom(rt,{}).icon(x.icon)]}function page$1(e){let{object:t,name:n}=e.definition;if(typeof t!=`string`){let e=`Page "${n}" is standalone; a record tab renders a record page (\`page(...).for(object)\`)`;throw new L(e,[{path:[`content`,`page`,`object`],message:e}])}return new X({type:`page`,page:{object:t,name:n}})}const k_={collection,metric,chart,agenda,card,text:text$1,decisions,meetingsUpcoming,mailbox,page:page$1,form:form$1,activity,richtext:richtext$1,documents,forms,emails,meetings,custom};function contentDefinition(e,t){if(t.suppressed)return null;let n=t.workspaceDefinition??t.sourceDefinition;return n===null?null:{...structuredClone(n),name:e}}function storedContentDefinition(e){let{name:t,...n}=e;return structuredClone(n)}function workspaceViewAuthoring(e,t={}){let n={main:0,aside:0};return{origin:`runtime`,mainOrderCustomized:!1,asideOrderCustomized:!1,gridCustomized:Object.keys(t).length>0,homeCustomized:!1,contents:Object.fromEntries(e.map(e=>[e.name,{sourceDefinition:null,workspaceDefinition:storedContentDefinition(e),suppressed:!1,sourcePosition:null,workspacePosition:e.placement===`grid`?null:n[e.placement]++,sourceGrid:null,workspaceGrid:t[e.name]??null}]))}}function byKind(e,t){let rank=e=>Number(e.definition.type===`group`);return rank(e)-rank(t)||e.name.localeCompare(t.name)}function inReadingOrder(e){return(t,n)=>{let r=e(t.name),i=e(n.name);return r===null||i===null?r===i?byKind(t,n):r?-1:1:r.y-i.y||r.x-i.x||byKind(t,n)}}function overLimit(e,t){let n=/* @__PURE__ */ new Set;if(e.length<=S.tabsPerView)return n;let r=new Map(e.map(e=>[e.name,e])),i=/* @__PURE__ */ new Map;for(let{name:t,definition:n}of e)if(n.type===`group`)for(let e of n.members)i.has(e)||i.set(e,t);let cellOf=e=>{let n=r.get(e),a=n?t(n.state):null;if(a!==null)return a;let o=r.get(i.get(e)??``);return o?t(o.state):null},a=e.filter(e=>e.state.sourceDefinition===null).sort(inReadingOrder(cellOf)).reverse();for(let t of a){if(e.length-n.size<=S.tabsPerView)break;if(n.has(t.name))continue;let i=t.definition.type===`group`?t.definition.members.flatMap(e=>{let t=r.get(e);return t&&t.definition.type!==`group`?[t]:[]}):[];if(!i.some(e=>e.state.sourceDefinition!==null))for(let e of[t,...i])n.add(e.name)}return n}function resolvePageGrid(e,t={}){let rawCell=t=>e.gridCustomized||t.sourceDefinition===null?t.workspaceGrid:t.sourceGrid,n=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{name:e,state:t,definition:n}]:[]}),r=k(n.map(e=>e.definition)),i=n.filter(e=>!r.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),a=overLimit(i,rawCell),o=i.filter(e=>!a.has(e.name)),s=new Map(o.map(e=>[e.name,e.definition])),c=t.traitsOf??ir(s,w),l=wn([...s.values()]),u=o.filter(e=>!l.has(e.name)),d={},f=[],place=(e,t)=>{t&&!Object.values(d).some(e=>rr(t,e))?d[e]={...t}:f.push(e)};if(e.gridCustomized)for(let{name:e,state:t}of u)place(e,t.workspaceGrid);else{for(let{name:e,state:t}of u)t.sourceDefinition!==null&&place(e,t.sourceGrid);for(let{name:e,state:t}of u)t.sourceDefinition===null&&place(e,t.workspaceGrid)}let p=Math.max(0,...Object.values(d).map(e=>e.y+e.h));for(let t of f.sort()){let n=e.contents[t],{w:r,h:i}=n.workspaceGrid??n.sourceGrid??c(t).size;d[t]={x:0,y:p,w:r,h:i},p+=i}let m=repairPageGrid(Object.entries(d).map(([e,n])=>({i:e,...n,...t.statics?.has(e)?{static:!0}:{}})),c);return{grid:Object.fromEntries(m.cells.map(({i:e,x:t,y:n,w:r,h:i})=>[e,{x:t,y:n,w:r,h:i}])),repairs:[...[...a].map(e=>({name:e,kind:`dropped`})),...m.repairs]}}function droppedContents(e){return new Set(e.flatMap(e=>e.kind===`dropped`?[e.name]:[]))}function resolveViewContents(e){let t=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{definition:n,...t}]:[]}),n=[`main`,`aside`].flatMap(n=>{let r=n===`main`?e.mainOrderCustomized:e.asideOrderCustomized;return t.filter(e=>e.definition.placement===n).sort((e,t)=>{let n=r?e.workspacePosition:e.sourcePosition,i=r?t.workspacePosition:t.sourcePosition;if(n!==null&&i!==null&&n!==i)return n-i;if(n!==null&&i===null)return-1;if(i!==null&&n===null)return 1;let a=e.sourcePosition??e.workspacePosition,o=t.sourcePosition??t.workspacePosition;return a!==null&&o!==null&&a!==o?a-o:a!==null&&o===null?-1:o!==null&&a===null?1:e.definition.name.localeCompare(t.definition.name)}).map(e=>e.definition)}),r=k(t.map(e=>e.definition)),i=t.filter(e=>e.definition.placement===`grid`&&!r.has(e.definition.name)).map(e=>e.definition).sort((e,t)=>e.name.localeCompare(t.name));return[...n,...i]}let Z;function unaccentRules(){if(Z)return Z;let e=/* @__PURE__ */ new Map;for(let t of`
2
+ import{NonJsonValueError as e,asTenantId as t,asUserId as n,canonicalStringify as r,deepEqual as i,generateId as a,indexBy as o,sameStableValue as s,serializeCanonicalJson as c,serializeStableJson as l}from"./utils-DKrBP9EH.mjs";import{isPlainRecord as u}from"./plain-record-is3DxPBL.mjs";import{CATALOG_RESOURCES as d,CUSTOM_LEVEL as f,NO_ACCESS as p,OBJECT_GRANT as ee,PERMISSION_CAPABILITIES as te,PERMISSION_CATALOG as ne,capabilityForResource as re,isCatalogResource as ie,levelActions as ae,levelFloor as oe,levelOf as se,sameActions as ce}from"./permission-catalog-DVCRvATl.mjs";import{ATTRIBUTE_DESCRIPTION_TOO_LONG as le,COMPUTED_RETURN_TYPES as ue,DEFAULT_VALIDATION_MESSAGES as de,TEXT_FORMAT_PATTERNS as fe,WIRE_OFFERED_BASE_CONFIG as pe,attributeConfigSchemas as me,createAttributeValidator as he,createFormAttributeValidator as ge,createObjectValidator as _e,datePrecisionIssues as ve,formatPhoneForDisplay as ye,formatZodErrors as be,getAttributeConfigSchema as xe,getIso2 as Se,isEmptyValue as Ce,isNullishOrEmptyString as we,isValuePresent as Te,normalizeCountrylessPhoneNumber as Ee,normalizePhoneNumber as De,parseAttributeConfig as Oe,parseAttributeConfigForCreate as ke,parseAttributeConfigForUpdate as Ae,propertyAttributeSchema as je,propertySchemaSchema as Me,rejectUnknownAttributesOrThrow as Ne,resolveTextPattern as Pe,selectOptionWriteSchema as Fe,statusGroupSchema as Ie,statusOptionWriteSchema as Le,validateAttribute as Re,validateDraft as ze,validateDraftOrThrow as Be,validateObject as Ve,validateObjectOrThrow as He,wireOmittedConfigKeysFor as Ue,withoutUnknownOptionKeys as We}from"./all-BCAZCVxV.mjs";import{apiKeyRoleSchema as Ge,apiKeySchema as Ke,apiKeyWithSecretSchema as qe}from"./api-keys-C9vGsnf5.mjs";import{ACTOR_TYPES as Je,actorSchema as Ye}from"./actors-D6cncaeM.mjs";import{NO_VALUE_OPERATORS as Xe,OPERATORS_BY_TYPE as Ze,PAGE_GRID_COLUMNS as m,QUALIFIED_SEPARATOR as Qe,REMOVED_OPERATOR_REPLACEMENTS as $e,SYNONYM_ALIASES as et,SYSTEM_FILTER_ATTRIBUTE_TYPES as tt,attributeFilterTarget as nt,buildQualifiedAttribute as rt,canonicalizeFilterValue as it,collectQualifiedRuleIssues as at,collectionContentSourceSchema as ot,columnsSchema as st,contentViewDefinitionSchema as h,currentActor as ct,displayAttributesSchema as lt,draftContentViewDefinitionSchema as ut,edgePropertyFilterTarget as dt,extractCurrencyFilterValue as ft,extractFilterValue as pt,filterOperatorsOfType as mt,filterStateSchema as g,filterTargetsOf as ht,getOperatorPolarity as gt,getRollupFilterOperators as _t,isBlockWidth as vt,isCalendarDay as yt,isDynamicValue as bt,isLocationPartOperator as xt,isNoValueOperator as St,isRelativeDateValue as Ct,isSetMembershipOperator as wt,locationPartFilterTarget as Tt,normalizeFilterRule as Et,normalizeForEdgeRpc as Dt,normalizeOperator as Ot,now as kt,parseQualifiedAttribute as At,publishedViewContentDefinitionSchema as _,resolveIsWithinBounds as jt,resolveUtcDayBounds as Mt,sortsSchema as Nt,systemColumnFilterTarget as Pt,toMultiValueOperator as Ft,toUtcDayString as It,today as Lt,validateQualifiedRule as Rt}from"./view-config.schema-DstNUMiD.mjs";import"./zod-locale.mjs";import{ATTRIBUTE_FILTER_OPERATORS as zt,ATTRIBUTE_TYPES as Bt,ATTRIBUTE_TYPE_DESCRIPTORS as Vt,LOCATION_FILTER_PROPERTIES as Ht,RELATION_TARGET_ANY as Ut,getAttributeCapabilities as Wt,getAttributeFilterOperators as Gt,hasTypeTrait as Kt,hasValueKind as qt,inferInverseCardinality as Jt,isAttributeFilterable as Yt,isAttributeGroupable as Xt,isAttributeKanbanGroupable as Zt,isAttributeSearchable as Qt,isAttributeSortable as $t,isBilateralRelation as en,isLocationFilterProperty as tn,isUniversalRelation as nn,isValueKindType as rn,relationTargetsOf as an,resolveEffectiveFilterType as on}from"./attributes-DYUkML5S.mjs";import{PERMISSION_ACTIONS as sn,effectivePermissionsSchema as cn,findGrantIssues as ln,permissionFlagsSchema as un,permissionGrantSchema as dn,permissionSchema as fn,roleSchema as pn}from"./permissions-CGYTdS2h.mjs";import{AccessDeniedError as mn,AggregateValidationError as hn,AmbiguousSchemaChangeError as gn,AttributeInUseError as _n,AttributeNotFoundError as vn,ConcurrentModificationError as yn,DuplicateError as v,ExportTooLargeError as bn,ForbiddenError as xn,InvalidPermissionGrantError as Sn,LogoProviderUnavailableError as Cn,LogoSearchRateLimitedError as wn,MemoryNotFoundError as Tn,NotFoundError as En,NotImplementedError as Dn,ObjectNotFoundError as On,ObjectReferencedError as kn,OrphanSystemAttributeError as An,PageReferencedError as jn,ProtectedResourceError as Mn,ProtectedRoleError as Nn,QueryTimeoutError as Pn,RealtimeDeliveryError as Fn,RealtimeRateLimitedError as In,RealtimeSubscriptionError as Ln,RecordNotFoundError as Rn,RecordReferencedError as zn,RepositoryError as Bn,ReservedObjectNameError as y,RoleNotFoundError as Vn,SCHEMA_ERROR_HTTP_STATUS as Hn,SchemaError as b,SchemaErrorCode as x,SearchBackendError as Un,SearchPathNotIndexedError as Wn,StorageError as Gn,SyncCascadeError as Kn,SyncConflictError as qn,SyncError as Jn,SystemEntityImmutableError as Yn,ToolGroupGrantError as Xn,ValidationError as S,WorkspaceInvariantReason as Zn,isAttributeInUseError as Qn,isNotFoundError as $n,isObjectReferencedError as er,isProtectedResourceError as tr,isRecordReferencedError as nr,isSchemaError as rr,isValidationError as ir}from"./exceptions.mjs";import{DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS as ar,DEVICE_CHANNEL_IDLE_POLL_MS as or,DEVICE_CHANNEL_KEEPALIVE_MS as sr,DEVICE_CHANNEL_MAX_FRAME_BYTES as cr,DEVICE_CHANNEL_PATH as lr,DEVICE_CHANNEL_PRESENCE_MS as ur,DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION as dr,DEVICE_COMMAND_ERROR_CODES as fr,DEVICE_DESKTOP_STATES as pr,DEVICE_SHELLS as mr,DeviceChannelProtocolError as hr,DeviceChannelServerFrameSchema as gr,DeviceChannelWorkerFrameSchema as _r,DeviceDesktopStatusSchema as vr,computeReconnectDelay as yr,computeRetryDelay as br,deviceChannelUrl as xr,parseDeviceChannelFrame as Sr,parseServerFrame as Cr,parseWorkerFrame as wr}from"./device-channel-CmrDyl1C.mjs";import{LIST_VIEW_TAB_VISIBILITIES as Tr,NATIVE_OBJECT_NAMES as Er,RECORD_LIST_SCOPES as Dr,RESERVED_ATTRIBUTE_NAMES as Or,RESERVED_OBJECT_NAMES as kr,RESOURCE_VISIBILITIES as Ar,SYSTEM_FIELD_NAMES as jr,isNativeObjectName as C,parseRecordListScope as Mr,parseResourceVisibility as Nr}from"./objects-LC_PpZf5.mjs";import{AGENT_SESSION_ORIGINS as Pr,BROWSER_LAUNCH_TOOL_NAME as Fr,CONTINUATION_KEY_PATTERN as Ir,DEFINITION_KINDS as Lr,ENV_VAR_KEY_PATTERN as Rr,GITHUB_TRIGGER_CATALOG as zr,GITHUB_TRIGGER_FAMILIES as Br,NATIVE_TOOL_GROUPS as Vr,NEW_DEFINITION_ID as Hr,REFERENCE_KINDS as Ur,REPOSITORY_WILDCARD as Wr,RESOURCE_GRANT_KINDS as Gr,SLACK_TRIGGER_CATALOG as Kr,SLACK_TRIGGER_EVENTS as qr,TRIGGER_EVENT_TYPES as Jr,TRIGGER_MAX_REENTRY as Yr,agentApprovalResolutionSchema as Xr,agentAvatarOutputSchema as Zr,agentConversationOverviewSchema as Qr,agentDefinitionActivitySchema as $r,agentDefinitionAudienceSchema as ei,agentDefinitionDailyActivitySchema as ti,agentDefinitionSchema as ni,agentExecutionConfigOutputSchema as ri,agentHistoryMessageSchema as ii,agentInferencePreferencesOutputSchema as ai,agentMemoryViewSchema as oi,agentRequestAnswerSchema as si,agentRoleSchema as ci,agentRolesSetResultSchema as li,agentRunSchema as ui,agentRunStatusSchema as di,agentScheduleOutputSchema as fi,agentScheduleSchema as pi,agentSessionAudienceSchema as mi,agentSessionDefinitionAppearanceSchema as hi,agentSessionHistoryPageSchema as gi,agentSessionLinkSchema as _i,agentSessionMessageOutputSchema as vi,agentSessionSchema as yi,agentSetupResponseSchema as bi,agentTodoPlanViewSchema as xi,agentToolCatalogSchema as Si,agentTriggerBaseSchema as Ci,agentTriggerDefinitionSchema as wi,agentTriggerLastCallSchema as Ti,agentTriggerPatchSchema as Ei,agentTriggerSchema as Di,agentWakeSchema as Oi,agentWakeViewSchema as ki,cancelAgentWakeResultSchema as Ai,connectorTriggerMatchSchema as ji,createAgentTriggerResultSchema as Mi,criticConfigOutputSchema as Ni,editAgentSessionMessageResultSchema as Pi,formatReference as Fi,githubConditionSchema as Ii,githubEventActions as Li,githubTriggerMatchSchema as Ri,isWildcard as zi,matchesRepositoryPattern as Bi,modelDefinitionOutputSchema as Vi,modelReferenceOutputSchema as Hi,parseMergedAgentTrigger as Ui,parseReference as Wi,refineTrigger as Gi,resourceUsedBySchema as Ki,retryPolicyOutputSchema as qi,routineAudiencePreviewSchema as Ji,routineAudienceSchema as Yi,sessionImageUsageSchema as Xi,sessionInferenceOverridesOutputSchema as Zi,sessionStateSchema as Qi,slackConditionSchema as $i,slackTriggerMatchSchema as ea,submitOutcomeSchema as ta}from"./agent-output.schema-BQsbh8pJ.mjs";import{FORM_STATUSES as na,FORM_SUBMISSION_STATUSES as ra,formDefinitionSchema as ia,formSlotSchema as aa,formStepSchema as oa,formSubmissionSchema as sa,isFormDefinition as ca}from"./submission-DQQndGsT.mjs";import{CHAT_PROVIDERS as la,CONNECTION_STATUS_IDS as ua,CONNECTOR_PROVIDER_IDS as da,CONNECTOR_SCOPES as fa,connectionCapabilitiesSchema as pa,connectionSyncProgressSchema as ma,connectionViewSchema as ha,connectorProvidersResultSchema as ga,requestedCapabilities as _a}from"./types-BaRAoumN.mjs";import{APPEARANCE_FACETS as va,DEFAULT_APPEARANCE_ICON as ya,IMAGE_SHAPES as ba,IMAGE_SOURCES as xa,isImageSource as Sa,resolveAppearance as Ca}from"./appearance-C0Mh9jK2.mjs";import{ACCESS_CAPABILITIES as wa,ACCESS_LEVELS as Ta}from"./access-levels-CpH_EGwX.mjs";import{linkedRecordRefSchema as Ea}from"./linked-records-BjT-7LOU.mjs";import{BILLING_MODES as Da,DEFAULT_DICTATION_LIMITS as Oa,DICTATION_FINALIZATION_TIMEOUT_MS as ka,DICTATION_FRAME_BYTES as Aa,DICTATION_MAX_BUFFER_BYTES as ja,DICTATION_MAX_FRAME_BYTES as Ma,DICTATION_MAX_TRANSCRIPT_BYTES as Na,DICTATION_MODEL_ID as Pa,DICTATION_PREPARATION_TIMEOUT_MS as Fa,DICTATION_SAMPLE_RATE as Ia,DICTATION_TICKET_TTL_MS as La,USAGE_MODALITIES as Ra,USAGE_SCOPES as za,WALLET_STATUSES as Ba}from"./ai-dictation-BJvVgzjC.mjs";import{COUNT_MODES as Va,ESTIMATED_COUNT_CAP as Ha,parseCountMode as Ua,parseOptionalCountMode as Wa}from"./pagination-B06cCddv.mjs";import{MEETING_BOT_IMAGE as Ga,MEETING_BOT_IMAGE_BASE64_MAX_LENGTH as Ka,MEETING_BOT_MEMBER_CAP as qa,MEETING_BOT_NO_CREDITS as Ja,MEETING_BOT_SILENT_REASON as Ya,MEETING_CONFERENCE_REQUESTS as Xa,MEETING_PARTICIPANT_ROLES as Za,MEETING_RESPONSES as Qa,MEETING_RESPONSE_STATUSES as $a,MEETING_STATUSES as eo,NO_RECORDING as to,RECORDING_OVERRIDES as no,RECORDING_POLICIES as ro,TRANSCRIPT_STATUSES as io,meetingBotDispatchRequestSchema as ao,meetingBotDispatchResponseSchema as oo,meetingBotNotificationSchema as so,meetingLinkedRecordSchema as co,meetingParticipantRefSchema as lo,meetingRecordingSchema as uo,meetingSchema as fo,meetingSiblingRefSchema as po,meetingTranscriptProvenanceSchema as mo,meetingTranscriptResponseSchema as ho,meetingTranscriptSegmentSchema as go,meetingTranscriptSourceRefSchema as _o,meetingsListResponseSchema as vo,normalizedMeetingTranscriptSchema as yo,recordMeetingsCount as bo}from"./meetings-ZzFZppmw.mjs";import{HIERARCHY_ATTRIBUTE_IDS as xo,HIERARCHY_ATTRIBUTE_NAMES as So,HIERARCHY_CHILD_IDS_LIMIT as Co,SYSTEM_ATTRIBUTES as wo,SYSTEM_ATTRIBUTE_I18N_KEYS as To,getHierarchyAttributes as Eo,getObjectSystemAttributes as Do,getSystemAttributeI18nKey as Oo,getSystemAttributeList as ko,isHierarchyAttribute as Ao,isManagedSystemAttribute as jo}from"./system-attributes-vbOzw6KO.mjs";import{envVarEntrySchema as Mo,loginSecretEntrySchema as No,secretEntrySchema as Po}from"./env-vars-jepH5HKe.mjs";import{AUDIT_ACTIONS as Fo,AUDIT_AGENT_SESSION_METADATA_KEY as Io,AUDIT_RESOURCE_TYPES as Lo,auditChangeSchema as Ro,auditLogEntrySchema as zo,isAgentWrittenAuditEntry as Bo}from"./audit-jbBwdDtV.mjs";import{SCHEMA_LIMITS as w,characterCount as Vo}from"./limits-DVUX5n4b.mjs";import{ALL_CATALOG_TOOL_NAMES as Ho,ALWAYS_KINDS as Uo,BROWSER_TOOL_NAMES as Wo,CONNECTION_GRANT_PROVIDERS as Go,COPY_VERB_NAME as Ko,CORE_RECORD_TOOL_NAMES as qo,CORE_TOOL_NAMES as Jo,DEFAULT_AGENT_TOOL_GROUPS as Yo,DEFAULT_BLUEPRINT_TOOL_GROUPS as Xo,GRANT_ENABLES as Zo,NATIVE_TOOL_GROUP_CATALOG as Qo,RESOURCE_KIND_CATALOG as $o,SEND_VERB_NAME as es,START_VERB_NAME as ts,SURFACE_TOOL_NAMES as ns,VERB_NAMES as rs,canonicalToolGroups as is,connectionGrantKindsOf as as,grantKindOf as os,isNativeToolGroup as ss,isResourceGrant as cs,needsManageWhenUnattended as ls,parseToolGroupGrant as us,resourceGrant as ds}from"./tool-group-catalog-DcmK8-aP.mjs";import{RECENT_ACTIVITY_LEDGER_LIMIT as fs,recentActivityEntryKey as ps}from"./recent-activity-CDUZCvvx.mjs";import{FILE_LIST_MAX_IDS as ms,FILE_URLS_MAX_IDS as hs,RECORD_IMAGE_MAX_BYTES as gs,fileSchema as _s,fileUrlsResponseSchema as vs}from"./files-sTU3trJX.mjs";import{ATTACH_FILE_ACTIONS as ys,DOCUMENT_KINDS as bs,DOCUMENT_SORT_MODES as xs,FILE_OCR_STATUSES as Ss,RECORD_DRIVE_CURSOR_MAX_LENGTH as Cs,RECORD_DRIVE_PAGE_DEFAULT_LIMIT as ws,RECORD_DRIVE_PAGE_MAX_LIMIT as Ts,attachedRecordDocumentSchema as Es,documentFileSchema as Ds,documentRecordOwnerPageSchema as Os,documentRecordOwnerSchema as ks,documentSchema as As,documentWithSubCountSchema as js,driveFileSchema as Ms,recordDriveChildSchema as Ns,recordDriveChildrenPageSchema as Ps,recordDriveSearchHitSchema as Fs,recordDriveSearchResultSchema as Is}from"./documents-BrgkFEjS.mjs";import{pageReadSchema as Ls,pageSummarySchema as Rs}from"./pages-C1vZaC93.mjs";import{colorIdSchema as zs,iconNameSchema as Bs}from"./primitives-BlZoUw54.mjs";import{architectProjectionSchema as Vs,attributeOutputSchema as Hs,attributeSaveOutputSchema as Us,draftAppendOutputSchema as Ws,draftCommandGuardSchema as Gs,lastPublicationSchema as Ks,lastPublishErrorSchema as qs,mutationReceiptSchema as Js,objectDefinitionOutputSchema as Ys,publishBlockerSchema as Xs,publishDraftOutputSchema as Zs,retypeOptionsOutputSchema as Qs,schemaDraftOutputSchema as $s,schemaGroupListSchema as ec,schemaGroupSchema as tc,schemaStateAddressOf as nc,schemaStateEntrySchema as rc,schemaStateSchema as ic,viewPreferenceAddressSchema as ac,viewReadSchema as oc}from"./schema-output.schema-DToLL5Hj.mjs";import{DEFAULT_MEETING_BOT_DISPLAY_NAME as sc,DEFAULT_TENANT_SETTINGS as cc,USD_AMOUNT_PATTERN as lc,tenantSettingsResponseSchema as uc,tenantSettingsSchema as dc}from"./tenant-settings-DibR3Pj9.mjs";import{TENANT_INVITATION_DEFAULT_TTL_MS as fc,TENANT_INVITATION_DELIVERY_STATUSES as pc,TENANT_INVITATION_MAX_TTL_MS as mc,TENANT_INVITATION_MIN_TTL_MS as hc,TENANT_INVITATION_RESEND_INTERVAL_MS as gc,TENANT_INVITATION_STATUSES as _c,tenantInvitationSchema as vc}from"./tenant-invitations-C8eRu6F1.mjs";import{ATTRIBUTE_NAME_SCHEMA as yc,OBJECT_NAME_SCHEMA as bc,assertUniqueBy as xc,optionInverseMismatch as Sc,validateAttributeName as Cc,validateIconName as wc,validateLabel as Tc,validateObjectName as Ec,validateOptions as Dc,validateViewName as Oc}from"./attribute-validators-D9vS6qK9.mjs";import{DRAFT_CONFLICT_KINDS as kc,namedTargetSchema as Ac,parseNamedTarget as jc}from"./proposal-types-ncv1cymr.mjs";import{PERSISTENCE_OWNED_QUOTA_KEYS as Mc,QUOTA_KEYS as Nc,quotaStateSchema as Pc}from"./quota-CremykHV.mjs";import{OAUTH_TICKET_TTL_MS as Fc,oauthAttemptStartedSchema as Ic}from"./types-Bbd8SJk_.mjs";import{EMAIL_DIRECTIONS as Lc,EMAIL_PARTICIPANT_ROLES as Rc,EMAIL_PROVIDERS as zc,MAILBOX_ACCOUNT_VISIBILITIES as Bc,MAILBOX_LIST_MODES as Vc,MAILBOX_READER_LAYOUTS as Hc,MAILBOX_TOTAL_LOCATIONS as Uc,MAIL_CHANGES_MAX as Wc,MAIL_DRAFT_BODY_MAX_CHARS as Gc,MAIL_DRAFT_MODES as Kc,MAIL_SIGNATURE_MAX_CHARS as qc,MAIL_SUBJECT_MAX_CHARS as Jc,PROVIDER_DRAFT_LABEL as Yc,RECIPIENT_IDENTITIES_MAX as Xc,REPLY_MODES as Zc,TRIAGE_ACTIONS as Qc,emailAttachmentMetaSchema as $c,emailParticipantRefSchema as el,isMailProvider as tl,isMailboxListMode as nl,isProviderDraft as rl,isReplyMode as il,mailChangesSchema as al,mailDraftAttachmentSchema as ol,mailDraftSchema as sl,mailSignatureSchema as cl,mailStateSchema as ll,mailboxAccountSchema as ul,mailboxCountSchema as dl,mailboxCursorSchema as fl,mailboxEmailSchema as pl,mailboxFolderTotalSchema as ml,mailboxListResponseSchema as hl,mailboxSenderImageSchema as gl,mailboxThreadDetailSchema as _l,mailboxThreadSchema as vl,mailboxTotalsSchema as yl,recipientContactSchema as bl,recipientIdentitySchema as xl,recipientSuggestionSchema as Sl,replyDefaultsSchema as Cl,triageResultSchema as wl}from"./emails-COHIot9L.mjs";import{EMAIL_CATEGORY_SCOPES as Tl,EMAIL_CLASSIFIED_BY as El,EMAIL_RULE_SCOPES as Dl,classificationUndoSchema as Ol,classifyEmailResultSchema as kl,emailCategorySchema as Al,emailCategoryUsageSchema as jl,emailSenderRuleSchema as Ml,emailVerdictSchema as Nl}from"./email-classification-Jk8hARsL.mjs";import{IMAGE_FORMATS as Pl,declaredImageRequests as Fl,imageModelFormatDefect as Il}from"./image-generation-RBIQzj-e.mjs";import{ENVIRONMENT_BUILD_LOG_STEPS as Ll,ENVIRONMENT_BUILD_LOG_STEP_PREFIX as Rl,ENVIRONMENT_IMAGES as zl,ENVIRONMENT_MEMORY_GB_PER_VCPU as Bl,ENVIRONMENT_NETWORK_ALLOW_MAX as Vl,ENVIRONMENT_SCRIPT_MAX_BYTES as Hl,ENVIRONMENT_SIZES as Ul,ENVIRONMENT_SIZE_VCPUS as Wl,isEnvironmentBuildLogStep as Gl,utf8ByteLength as Kl}from"./environments-NJ6AU6QA.mjs";import{decodeAgentSessionListCursor as ql,encodeAgentSessionListCursor as Jl}from"./agent-session-list-cursor-cpmpINuz.mjs";import{HARNESS_BRIDGE_PORT as Yl,LINK_COOKIE_MAX_AGE_MS as Xl,LINK_DEFAULT_MS as Zl,LINK_MAX_MS as Ql,MACHINE_KEY_KINDS as $l}from"./machines-BwCQPG_y.mjs";import{AGENT_ASIDE_ANSWER_MAX_LENGTH as eu,AGENT_ASIDE_HISTORY_LIMIT as tu,AGENT_ASIDE_QUESTION_MAX_LENGTH as nu,AGENT_AVATAR_EXPRESSIONS as ru,AGENT_AVATAR_TYPES as iu,AGENT_MESSAGE_KIND as au,AGENT_MESSAGE_SENDER_NAME_KEY as ou,AGENT_NOTIFICATION_KIND as su,AGENT_SESSION_LIST_ORDERS as cu,AGENT_SESSION_PROVENANCES as lu,AGENT_STARTERS_MAX as uu,AGENT_STARTER_MAX_LENGTH as du,AGENT_SYSTEM_PROMPT_MAX_LENGTH as fu,AGENT_TASK_KINDS as pu,AGENT_WAKE_KIND as mu,AI_MODEL_INPUT_MODALITIES as hu,AI_MODEL_PROFILE_LABELS as gu,AI_MODEL_REASONING_MODES as _u,ARCHITECT_PUBLICATION_KIND as vu,DEFAULT_APPROVAL_POLICY as yu,DEFAULT_DAILY_ACTIVITY_DAYS as bu,INFERENCE_REASONING_OPTIONS as xu,INFERENCE_ROUTING_MODES as Su,INFERENCE_SPEEDS as Cu,LAST_RUN_ERROR_MAX_LENGTH as wu,MAX_DAILY_ACTIVITY_DAYS as Tu,MAX_TODOS as Eu,MAX_TODO_DESCRIPTION_CHARS as Du,MAX_TODO_ID_CHARS as Ou,OPEN_TOOL_PART_STATES as ku,PROVIDER_NAMES as Au,ROUTING_PRICE_CEILINGS as ju,RUN_ORIGIN_METADATA_KEY as Mu,SESSION_INFERENCE_PATCH_KEYS as Nu,SPEAKS_THROUGH_SEND_METADATA_KEY as Pu,SYSTEM_PART_CODES as Fu,TASK_DEMAND_LEVELS as Iu,TODO_PLAN_STATUSES as Lu,TODO_STATUSES as Ru,TOOL_APPROVAL_STATES as zu,TOOL_IMPACT_COUNT_KEYS as Bu,TURN_OUTCOMES as Vu,WAKE_TURN_METADATA_KEY as Hu,WAKE_TURN_SPOKE_METADATA_KEY as Uu,agentDataChunk as Wu,agentDisplayName as Gu,agentInferencePreferencesSchema as Ku,agentMessageAttachmentSchema as qu,agentMessagePartSchema as Ju,agentSessionInferenceOverridesInputSchema as Yu,agentSessionInferenceOverridesSchema as Xu,agentSessionMessageSchema as Zu,agentUIValidationError as Qu,artifactQuoteSchema as $u,assertCustomAgentUIMessageChunk as ed,assertSessionState as td,compareAgentSessionMessages as nd,customDataChunkSchemas as rd,durableDateSchema as id,imageModelIdSchema as ad,inferenceReasoningSchema as od,inferenceRoutingSchema as sd,inferenceSpeedSchema as cd,isAgentMessageMetadata as ld,isAgentNotificationMetadata as ud,isAgentUIDataName as dd,isAgentWakeMetadata as fd,isArchitectPublicationMetadata as pd,isOpenToolPartState as md,isRoutineActorMetadata as hd,isSessionInferencePatch as gd,isSystemPartCode as _d,isToolApprovalState as vd,isToolImpactCountKey as yd,mentionReferenceSchema as bd,mergeSessionInferencePatch as xd,modelDefinitionSchema as Sd,modelReferenceSchema as Cd,orderAgentSessionMessages as wd,providerNameSchema as Td,readArchitectPublication as Ed,readRunOriginMetadata as Dd,routedMessageInferenceSchema as Od,sessionInferencePatchSchema as kd,todoItemSchema as Ad,todoPlanSchema as jd,toolImpactSchema as Md}from"./agent-message.schema-DwQVDXLy.mjs";import{ACCESS_ROLES as Nd,AGENT_SESSION_ACCESS_ROLES as Pd,DEVICE_ACCESS_ROLES as Fd,RECORD_ACCESS_ROLES as Id,RECORD_ACCESS_SOURCES as Ld,UNSHAREABLE_OBJECT_NAMES as Rd,accessGrantSchema as zd,deriveViewerAccess as Bd,deviceAudienceSchema as Vd,pageAudienceSchema as Hd,parseAgentDefinitionAccessRole as Ud,parseAgentSessionAccessRole as Wd,parseDeviceAccessRole as Gd,parsePageAccessRole as Kd,parseRecordAccessRole as qd,recordAudienceSchema as Jd,viewerAccessSchema as Yd}from"./access-output.schema-DrsybmDW.mjs";import{browserProfilePreparationSchema as Xd,browserProfileViewSchema as Zd,cloudBrowserLiveViewSchema as Qd}from"./browser-profile-output.schema-ChhKkoin.mjs";import{BUNDLE_LOCALES as $d,BUNDLE_SETUP_PROMPT_MAX_LENGTH as ef,availableBundleSummarySchema as tf,bundleAddPlanSchema as nf,bundleAddResultSchema as rf,bundleContentsSchema as af,bundleListSchema as of,bundleModeSchema as sf,bundleOriginSchema as cf,bundlePieceKindSchema as lf,bundlePlanPieceSchema as uf,bundleRemovalCascadeSchema as df,bundleRemovalPreviewSchema as ff,bundleRemovalRowSchema as pf,bundleStatusEntrySchema as mf,bundleStatusSchema as hf,bundleSyncPreviewSchema as gf,bundleUpdateDependentSchema as _f,bundleUpdateGroupSchema as vf,bundleUpdatePieceKindSchema as yf,bundleUpdatePieceSchema as bf,bundleUpdatePlanSchema as xf,bundleUpdateReasonCodeSchema as Sf,bundleUpdateResultSchema as Cf,deferredRetypeSchema as wf,installedBundleSummarySchema as Tf,servedAsIsAttributeSchema as Ef,syncBundleResultSchema as Df}from"./bundle-output.schema-UAlU8-CS.mjs";import{ENVIRONMENT_HARNESSES as Of,ENVIRONMENT_HARNESS_SANDBOX_WORKDIR as kf,ENVIRONMENT_HARNESS_WORKDIR as Af,ENVIRONMENT_NAME_MAX_CHARS as jf,ENVIRONMENT_STANDARDS_WORKDIR as Mf,cliDefaultModelOf as Nf,compiledHarnessModels as Pf,defaultEnvironmentSchema as Ff,environmentBuildFailureSchema as If,environmentBuildStateSchema as Lf,environmentDetailSchema as Rf,environmentHarness as zf,environmentHarnessSchema as Bf,environmentListSchema as Vf,environmentNetworkPolicyOutputSchema as Hf,environmentRepositorySourceSchema as Uf,environmentSchema as Wf,environmentWorkdir as Gf,findEnvironmentHarness as Kf,harnessModelChoices as qf,harnessModelListSchema as Jf,harnessModelOptionSchema as Yf,isEnvironmentHarnessId as Xf}from"./environment-output.schema-BLWKrRV9.mjs";import{mcpCatalogCategorySchema as Zf,mcpCatalogEntrySchema as Qf,mcpOAuthAttemptStartedSchema as $f,mcpOAuthSetupSchema as ep,mcpServerAuthTypeSchema as tp,mcpServerStatusSchema as np,mcpServerViewSchema as rp}from"./mcp-output.schema-B4xXiOjp.mjs";import{RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE as ip,RECORD_GRAPH_MAX_LIMIT_PER_NODE as ap,RECORD_GRAPH_MAX_NODES as op,recordGraphEdgeSchema as sp,recordGraphNodeKey as cp,recordGraphNodeSchema as lp,recordGraphRequestSchema as up,recordGraphResponseSchema as dp,relationOptionSchema as fp,relationOptionsResponseSchema as pp,resolvedRelationsBatchSchema as mp}from"./relation-output.schema-DnC1Swai.mjs";import{AGGREGATE_BUCKETS as hp,AGGREGATE_MEASURES as gp,MAX_AGGREGATE_GROUPS as _p,MAX_AGGREGATE_SERIES as vp,PASSED_AT as yp,collectionOutputSchema as bp,collectionPageSchema as xp,decodeRecordValues as Sp,defaultPassagesTo as Cp,encodeRecordValues as wp,objectRecordOutputSchema as Tp,recordAggregatesSchema as Ep,recordCollectionOutputSchema as Dp,recordDeletionCountSchema as Op,recordIncomingReferenceSchema as kp,recordIncomingReferencesPageSchema as Ap,recordPurgeResultSchema as jp,recordValuesCodec as Mp,recordsBulkCreateResultSchema as Np,recordsBulkDeleteResultSchema as Pp,recordsBulkUpdateResultSchema as Fp}from"./record-output.schema-7M4ZhtFF.mjs";import{EMAIL_CATEGORY_DEFAULT_COLOR as Ip,EMAIL_CATEGORY_DEFAULT_ICON as Lp,EMAIL_CATEGORY_DESCRIPTION_MAX as Rp,EMAIL_CATEGORY_DESCRIPTION_MIN as zp,EMAIL_CATEGORY_LIMIT as Bp,EMAIL_CATEGORY_NAME_MAX as Vp,PUBLIC_MAIL_DOMAINS as Hp,SYSTEM_EMAIL_CATEGORIES as Up,SYSTEM_EMAIL_CATEGORY_NAMES as Wp,classificationRestoreSchema as Gp,classifyEmailSchema as Kp,emailCategoryCreateSchema as qp,emailCategoryDeleteSchema as Jp,emailCategoryScopeQuerySchema as Yp,emailCategoryUpdateSchema as Xp,emailRuleScopeSchema as Zp,isPublicMailDomain as Qp,isSystemEmailCategory as $p,isSystemEmailCategoryName as em}from"./email-classification.schema-CzlbP3hF.mjs";import{AgentBuilder as T,DEFAULT_AGENT_EXECUTION_CONFIG as tm,agent as nm,agentAvatarFromMetadata as rm,agentAvatarSchema as im,agentStartersSchema as am}from"./agent-appearance.schema-5maenk3l.mjs";import{APPROVAL_FAMILY_TOOL_NAMES as om,ASK_QUESTIONS_ANSWER_MAX_LENGTH as sm,ASK_QUESTIONS_ANSWER_MAX_VALUES as cm,ASK_QUESTIONS_FILE_REF as lm,ASK_QUESTIONS_MAX_ADDED_FILES as um,ASK_QUESTIONS_MAX_BATCH as dm,ASK_QUESTIONS_TOOL_NAME as fm,DISCARD_ARCHITECT_DRAFT_TOOL_NAME as pm,DRAFT_WRITE_TOOL_NAMES as mm,GET_ARCHITECT_DRAFT_TOOL_NAME as hm,HITL_TOOL_NAMES as gm,QUESTION_FAMILY_TOOL_NAMES as _m,REQUEST_DESIGN_REVIEW_TOOL_NAME as vm,REQUEST_SETUP_TOOL_NAME as ym,askQuestionsOutputSchema as bm,humanRequestId as xm,humanRequestKind as Sm,isAwaitingHuman as Cm,isBlocking as wm,isParkedOnHuman as Tm,isQuestionPart as Em,lockingSendCall as Dm,openRequests as Om,readAskQuestionsResult as km}from"./human-request-D386w0xS.mjs";import{ACTIONABLE_DECISION_KINDS as Am,DECISION_INBOX_STATES as jm,DECISION_KINDS as Mm,DECISION_LINE_MAX_LENGTH as Nm,DECISION_LINK_TARGET_TYPES as Pm,DECISION_LIST_STATES as Fm,DECISION_READ_STATES as Im,DECISION_SENDER_KINDS as Lm,DECISION_SETTINGS_AREAS as Rm,DECISION_TITLE_MAX_LENGTH as zm,DECISION_TRANSFERS_KEY as Bm,DECISION_TYPES_V1 as Vm,DECISION_TYPE_ACCESS_GRANTED as Hm,DECISION_TYPE_AGENT_APPROVAL as Um,DECISION_TYPE_AGENT_MESSAGE as Wm,DECISION_TYPE_AGENT_QUESTION as Gm,DECISION_TYPE_AGENT_REVIEW as Km,DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED as qm,DECISION_TYPE_AGENT_SETUP as Jm,DECISION_TYPE_BUNDLE_SETUP as Ym,DECISION_TYPE_CONNECTOR_CONNECTION_ERROR as Xm,DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED as Zm,DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED as Qm,DECISION_TYPE_ENVIRONMENT_BUILD_FAILED as $m,DECISION_TYPE_KINDS as E,DECISION_TYPE_PERSON as eh,DECISION_TYPE_RECORD_ASSIGNED as th,DECISION_TYPE_RECORD_MENTIONED as nh,DECISION_WORK_STATES as rh,decisionArchiveAllResultSchema as ih,decisionAttachmentSchema as ah,decisionCountsSchema as oh,decisionHandedBy as sh,decisionLinkSchema as ch,decisionListResultSchema as lh,decisionRecipientSchema as uh,decisionSchema as dh,decisionSenderSchema as fh,decisionThreadKey as ph,decisionTransferBy as mh,decisionTransferTargetsSchema as hh,decisionTransferTo as gh,decisionTransfersOf as _h,decisionWithRecipientSchema as vh,formatDecisionLink as yh,isActionableDecisionKind as bh,parseDecisionLink as xh}from"./decisions-DNvAXetH.mjs";import{CONVERSATION_SURFACES as Sh,USERS_RESOLVE_MAX_IDS as Ch,USER_STATUSES as wh,USER_WORK_POSTURES as Th,memberSchema as Eh,userProfileSchema as Dh}from"./user-profiles-Dh5QFnXc.mjs";import{NEWS_DEFAULT_DISPLAY_DAYS as Oh,NEWS_DISPLAY_CAP_DAYS as kh,NEWS_INDEX_MAX_ENTRIES as Ah,NEWS_INTENSITIES as jh,NEWS_TARGET_KINDS as Mh,compareVersions as Nh,formatNewsTarget as Ph,hasLocale as Fh,isSemver as Ih,newsBodySchema as Lh,newsIndexSchema as Rh,normalizeNewsLocale as zh,parseNewsBody as Bh,parseNewsIndex as Vh,parseNewsIntensity as Hh,parseNewsTarget as Uh,resolveLocalized as Wh,withoutTrailingSlashes as Gh}from"./news-feed.schema-uNDJX8lC.mjs";import{myPreferencesSchema as Kh,preferenceEntry as qh,preferenceEntrySchema as Jh,withPreferenceEntry as Yh}from"./my-preferences-DLy4chuc.mjs";import{OPERATION_MAX_STEPS as Xh,recordOperationSchema as Zh}from"./record-operation-CD04q2YF.mjs";import*as D from"zod";import{getCountryByIso2 as Qh,isValidCurrencyCode as $h,isValidIso3 as eg}from"@standards/constants";import{parsePhoneNumberFromString as tg}from"libphonenumber-js";const ng=`__stndrdsNativeUiPartIds`,rg=1;function invalidNativePartIds(){throw new S(`Native agent UI part IDs metadata is invalid`,[])}function isPlainRecord$1(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function nativeAgentUIPartIdMetadataKey(e,t){if(e.type===`text`||e.type===`reasoning`)return`${e.type}:${t}`;if(e.type===`tool`)return`tool:${e.toolCallId}`}function parseNativeAgentUIPartIdsMetadata(e){let t=e.metadata?.[ng];isPlainRecord$1(t)||invalidNativePartIds(),Object.keys(t).length===2&&t.schemaVersion===1&&isPlainRecord$1(t.partIds)||invalidNativePartIds();let n=/* @__PURE__ */ new Map;for(let[t,r]of e.parts.entries()){let e=nativeAgentUIPartIdMetadataKey(r,t);!e||n.has(e)?e&&invalidNativePartIds():n.set(e,r)}let r=Object.entries(t.partIds);r.length!==n.size&&invalidNativePartIds();let i=/* @__PURE__ */ new Map,a={};for(let[e,t]of r){let r=n.get(e);r&&typeof t==`string`&&t.length>0||invalidNativePartIds();let o=i.get(t);o&&(r.type===`tool`||o!==r.type)&&invalidNativePartIds(),r.type===`tool`&&t!==r.toolCallId&&invalidNativePartIds(),i.set(t,r.type),a[e]=t}return a}const ig=5,O=[`relation`,`multiRelation`,`formula`,`rollup`,`document`,`richtext`,`user`];function isFormSlotFieldRef(e){return e.type===`slot`}function isFormFreeFieldRef(e){return e.type===`free`}function resolveFieldRequired(e){return e.readOnly===!0?!1:e.fieldRequired===void 0?e.slotMode===`create`&&e.attributeRequired===!0:e.fieldRequired}function getSlotFieldTargets(e){return e.additionalSlotIds?.length?[e.slotId,...e.additionalSlotIds]:[e.slotId]}function formFieldKey(e){return isFormSlotFieldRef(e)?`${e.slotId}.${e.attribute}`:`free.${e.attribute.name}`}function formFieldFlatKey(e){return isFormSlotFieldRef(e)?e.attribute:e.attribute.name}function readFormFieldValue(e,t){return e[formFieldKey(t)]??e[formFieldFlatKey(t)]}function isFormFieldsRow(e){return e.type===`fields`}function isFormHeadingRow(e){return e.type===`heading`}function isFormSeparatorRow(e){return e.type===`separator`}function isFormTextRow(e){return e.type===`text`}function moveWidensAudience(e){return e.added.length>0||!e.workspaceBefore&&e.workspaceAfter}function resolvePropertyDefinitions(e){let t=e.properties;if(!t)return[];if(Array.isArray(t))return t;let n=t;return Array.isArray(n.definitions)?n.definitions:[]}function hasOptions(e){return rn(e.type,`options`)}function schemaGroupKey(e){return`${e.kind}:${e.name}`}function refuse$2(e){throw new S(e,[{path:[`label`],message:e}])}function parseSchemaGroupPresentation(e){let t=e??{},n={};if(t.label!==void 0){let e=t.label;if(e===null)n.label=null;else if(typeof e!=`string`)refuse$2(`Label must be a string`);else{let t=e.trim();t.length===0&&refuse$2(`Label must not be empty`),t.length>w.labelLength&&refuse$2(`Label is too long (max ${w.labelLength} characters)`),n.label=t}}return n}const k=/^(?:core|bundle:.+)$/u;function parseSchemaOwner(e){if(e===null)return null;if(!k.test(e))throw new S(`Invalid schema owner "${e}"`,[]);return e}const ag=[`web`,`presentation`,`document`,`spreadsheet`,`image`,`code`,`other`],og=[`ephemeral`,`conversation`,`persistent`],sg=[`source`,`preview`,`entrypoint`,`asset`];var NoopGeocodingAdapter=class{async autocomplete(){return await Promise.resolve([])}async geocode(){return await Promise.resolve(null)}};function computeByteMagnitude(e){if(e<=0)return{value:0,unitIndex:0};let t=1e3,n=Math.min(4,Math.floor(Math.log(e)/Math.log(t)));return{value:Number.parseFloat((e/t**n).toFixed(1)),unitIndex:n}}const cg=[`B`,`KB`,`MB`,`GB`,`TB`];function formatByteSize(e){let{value:t,unitIndex:n}=computeByteMagnitude(e);return`${t} ${cg[n]}`}const lg=Object.freeze([`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`status`,`select`,`multiselect`,`location`]);function buildPropertySchema(e){let t=[];for(let n of e){let e=n.build();if(!lg.includes(e.type))throw Error(`Property type "${e.type}" is not supported in .qualifyWith()`);t.push(e)}return{definitions:t}}const ug=[`UPPER`,`LOWER`,`capitalize`,`trim`],dg=[`prefix`,`suffix`,`wrap`,`default`],A=[...ug,...dg],fg=/^\s*where\s*(?::(.*))?$/s,pg=`[A-Za-z_][A-Za-z0-9_]*`,mg=/^[^\s,()|{}="']+$/,hg=RegExp(`^(${pg})\\s*=\\s*(.*)$`),gg=RegExp(`^(${pg})\\s+in\\s*\\(([^()]*)\\)$`);function isWherePipe(e){return fg.test(e)}function parseWherePipe(e){let t=e.match(fg)?.[1]?.trim();if(!t)return null;let n=t.match(gg);if(n){let e=n[2].split(`,`).map(e=>e.trim());return e.every(e=>mg.test(e))?{property:n[1],values:e}:null}let r=t.match(hg);return r&&mg.test(r[2])?{property:r[1],values:[r[2]]}:null}const j=D.string().min(1,`labelExpression cannot be empty`).refine(e=>isLabelExpression(e),{message:`labelExpression must contain at least one {{ attribute }} interpolation`}).refine(e=>!/\{\{\s*\}\}/.test(e),{message:`labelExpression contains empty {{ }} interpolation`}).refine(e=>{let t=/(?<!\|)\|(?!\|)\s*(\w+)(?::[^|}]*)?/g,n;for(;(n=t.exec(e))!==null;){let e=n[1];if(!A.includes(e))return!1}return!0},{message:`Invalid pipe name. Valid pipes: ${A.join(`, `)}`});function validateLabelExpression(e){let t=j.safeParse(e);return t.success?{success:!0,attributes:extractAttributeNames(e)}:{success:!1,error:t.error.issues[0]?.message??`Invalid labelExpression`}}function applyPipe(e,t){let{name:n,args:r}=parsePipeExpression(t);switch(n){case`UPPER`:return e.toUpperCase();case`LOWER`:return e.toLowerCase();case`capitalize`:return e.replace(/(^|\s)\S/g,e=>e.toUpperCase());case`trim`:return e.trim();case`prefix`:return e?`${r[0]??``}${e}`:``;case`suffix`:return e?`${e}${r[0]??``}`:``;case`wrap`:return e?`${r[0]??``}${e}${r[1]??``}`:``;case`default`:return e||r[0]||``;default:return e}}function applyPipes(e,t){let n=e;for(let e of t)n=applyPipe(n,e);return n}function getValue(e,t){return t.split(`.`).reduce((e,t)=>{if(typeof e==`object`&&e)return e[t]},e)}const _g=`(Untitled)`;function parsePipeExpression(e){let t=e.match(/^(\w+)(?::(.*))?$/);if(!t)return{name:e,args:[]};let n=t[1],r=t[2];if(!r)return{name:n,args:[]};let i=[],a=/["']([^"']*?)["']/g,o;for(;(o=a.exec(r))!==null;)i.push(o[1]);return{name:n,args:i}}function*templateBlocks(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return;let r=e.indexOf(`}`,n+2);if(r<0)return;if(e[r+1]!==`}`){t=r+1;continue}t=r+2;let i=e.slice(n+2,r);i.length>0&&(yield{start:n,end:t,expr:i})}}function resolveLabelBlock(e,t){let n=e.split(`||`).map(e=>e.trim()),r=n[n.length-1].split(`|`).map(e=>e.trim());n[n.length-1]=r[0];let i=r.slice(1).filter(Boolean),a=n.filter(Boolean),o=``;for(let e of a){let n=toText(getValue(t,e));if(n!==``){o=n;break}}return applyPipes(o,i)}function renderLabelExpression(e,t,n=_g){let r=[],i=0;for(let n of templateBlocks(e))r.push(e.slice(i,n.start),resolveLabelBlock(n.expr,t)),i=n.end;return r.push(e.slice(i)),r.join(``).trim()||n}function toText(e){if(e==null||typeof e==`function`)return``;if(typeof e!=`object`)return String(e);if(Array.isArray(e))return e.map(toText).filter(Boolean).join(`,`);let t=e.toString;return typeof t==`function`&&t!==Object.prototype.toString?String(e):``}function isLabelExpression(e){let t=0;for(;t<e.length;){let n=e.indexOf(`{{`,t);if(n<0)return!1;let r=e.indexOf(`}}`,n+2);if(r<0)return!1;if(e.slice(n+2,r).trim().length>0)return!0;t=r+2}return!1}function extractAttributePaths(e){let t=[];for(let n of templateBlocks(e)){let e=n.expr.trim();if(!e)continue;let r=e.split(`||`).map(e=>e.trim()),i=r[r.length-1];r[r.length-1]=i.split(`|`)[0].trim();for(let e of r)e&&!t.includes(e)&&t.push(e)}return t}function extractAttributeNames(e){let t=extractAttributePaths(e).map(e=>e.split(`.`)[0]).filter(e=>e.length>0);return[...new Set(t)]}const vg=/^\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}$/;function getSingleAttributeFromExpression(e){let t=e.trim().match(vg);return t?t[1]:null}function getEditableLabelAttribute(e,t){let n=getSingleAttributeFromExpression(e);if(n===null)return null;let r=t.find(e=>e.name===n);return!r||r.type!==`text`||Wt(r).authoring.readOnly?null:r}const yg=`memory`,bg=4e3,xg=`workspace`,M={name:`name`,description:`description`,content:`content`,profileOf:`profileOf`,profileActor:`profileActor`,subjects:`subjects`,subjectId:`subjectId`};function textValue(e){return typeof e==`string`?e:``}function memoryPageViewOf(e){let{values:t}=e;return{id:e.id,name:textValue(t[M.name]),description:textValue(t[M.description]),content:textValue(t[M.content]),visibility:e.visibility,ownedBy:e.ownedBy,updatedAt:new Date(e.updatedAt).toISOString()}}const Sg={meetingHour:`0.80`,computeVcpuHour:`0.20`,browserHour:`0.60`},Cg=[`meeting.recording`,`sandbox.agent`,`sandbox.harness`,`sandbox.build`,`browser.session`];function isMeteredChargeKind(e){return Cg.includes(e)}const wg=/^\d+(?:\.\d+)?$/u;function meteredUsd(e,t){if(!wg.test(e))throw new S(`Invalid metered rate "${e}"`,[]);if(!(t>=0&&t<=2**53-1))throw new S(`Invalid metered duration "${t}"`,[]);let[n=`0`,r=``]=e.split(`.`),i=BigInt(n+r)*BigInt(t.toFixed(12).replace(`.`,``)),a=10n**BigInt(r.length+12-4),o=(i+a-1n)/a,s=10n**BigInt(4),c=(o%s).toString().padStart(4,`0`).replace(/0+$/u,``);return c?`${o/s}.${c}`:`${o/s}`}const Tg=`database`,Eg=`@standards/schema`;function createStandardSchemaProps(e){return{version:1,vendor:Eg,validate:t=>{let n=e.safeParse(t);return n.success?{value:n.data}:{issues:n.error.issues.map(e=>({message:e.message,path:e.path}))}}}}function isStandardSchema(e){return typeof e==`object`&&!!e&&`~standard`in e&&typeof e[`~standard`]==`object`&&e[`~standard`].version===1}function asMutableArray(e){return e}var BaseAttributeBuilder=class{get"~standard"(){return createStandardSchemaProps(he(this.build()))}constructor(e,t,n){Cc(t),Tc(n),this.attr={name:t,label:n,type:e,required:!1,system:!0}}asPhantomState(){return this}required(){return this.attr.required=!0,this.asPhantomState()}optional(){return this.attr.required=!1,this.asPhantomState()}runtime(){return this.attr.system=!1,this}hidden(){return this.attr.hidden=!0,this}placeholder(e){return this.attr.placeholder=e,this}description(e){if(Vo(e)>w.attributeDescriptionLength){let e=`Attribute "${this.attr.name}": ${le}`;throw new S(e,[{path:[`description`],message:e}])}return this.attr.description=e,this}icon(e){return wc(e,`attribute "${this.attr.name}"`),this.attr.icon=e,this}order(e){return this.attr.order=e,this}defaultValue(e){return(`defaultValue`in this.attr||!rn(String(this.attr.type),`computed`))&&(this.attr.defaultValue=e),this}metadata(e){return this.attr.metadata=e,this}build(){return this.attr}},TextAttributeBuilder=class extends BaseAttributeBuilder{minLength(e){return this.attr.minLength=e,this}maxLength(e){return this.attr.maxLength=e,this}pattern(e){return this.attr.pattern=e,this.attr.format=void 0,this}multiline(e=!0){return this.attr.multiline=e,this}email(){return this.attr.format=`email`,this.attr.pattern=void 0,this}url(){return this.attr.format=`url`,this.attr.pattern=void 0,this}slug(){return this.attr.format=`slug`,this.attr.pattern=void 0,this}};function text(e,t){return new TextAttributeBuilder(`text`,e,t)}var RichtextAttributeBuilder=class extends BaseAttributeBuilder{};function richtext(e,t){return new RichtextAttributeBuilder(`richtext`,e,t)}var NumberAttributeBuilder=class extends BaseAttributeBuilder{min(e){return this.attr.min=e,this}max(e){return this.attr.max=e,this}integer(){return this.attr.unit=`integer`,this.attr.decimals=0,this}decimal(e=2){return this.attr.unit=`decimal`,this.attr.decimals=e,this}percentage(){return this.attr.unit=`percentage`,this}renderAs(e){return this.attr.renderAs=e,this}};function number(e,t){return new NumberAttributeBuilder(`number`,e,t)}var CheckboxAttributeBuilder=class extends BaseAttributeBuilder{};function checkbox(e,t){return new CheckboxAttributeBuilder(`checkbox`,e,t)}var DateAttributeBuilder=class extends BaseAttributeBuilder{format(e){return this.attr.dateFormat=e,this}precision(e){return this.attr.precision=e,this}build(){let[e]=ve(`date`,this.attr);if(e!==void 0)throw new S(e.message,[{path:[`precision`],message:e.message}]);return super.build()}minDate(e){return this.attr.minDate=e,this}maxDate(e){return this.attr.maxDate=e,this}endDate(){return this.attr.endDate=!0,this.asPhantomState()}includeTime(){return this.attr.includeTime=!0,this}timeFormat(e){return this.attr.timeFormat=e,this}};function date(e,t){return new DateAttributeBuilder(`date`,e,t)}var PhoneAttributeBuilder=class extends BaseAttributeBuilder{defaultCountry(e){return this.attr.defaultCountryCode=e,this}};function phone(e,t){return new PhoneAttributeBuilder(`phone`,e,t)}var CurrencyAttributeBuilder=class extends BaseAttributeBuilder{defaultCurrency(e){return this.attr.defaultCurrency=e,this}allowedCurrencies(e){return this.attr.allowedCurrencies=e,this}allowNegative(e=!0){return this.attr.allowNegative=e,this}};function currency(e,t){return new CurrencyAttributeBuilder(`currency`,e,t)}function setOptions(e,t){let n=asMutableArray(t);Dc(e.name??`unknown`,n),e.options=n}function addOption(e,t){e.options||=[],Dc(e.name??`unknown`,[...e.options,t]),e.options.push(t)}var StatusAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}};function status(e,t){return new StatusAttributeBuilder(`status`,e,t)}var SelectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function select(e,t){return new SelectAttributeBuilder(`select`,e,t)}var MultiselectAttributeBuilder=class extends BaseAttributeBuilder{options(e){return setOptions(this.attr,e),this.asPhantomState()}option(e){return addOption(this.attr,e),this}renderAs(e){return this.attr.renderAs=e,this}};function multiselect(e,t){return new MultiselectAttributeBuilder(`multiselect`,e,t)}var LocationAttributeBuilder=class extends BaseAttributeBuilder{granularity(e){return this.attr.granularity=e,this}defaultCountry(e){return this.attr.defaultCountry=e,this}allowedCountries(e){return this.attr.allowedCountries=e,this}};function location(e,t){return new LocationAttributeBuilder(`location`,e,t)}var UserAttributeBuilder=class extends BaseAttributeBuilder{constructor(e,t){super(`user`,e,t),this.attr.types=[`user`,`agent`]}types(e){let t=[...new Set(e)];if(t.length===0)throw Error(`[AttributeBuilder] user.types must contain at least one type.`);return this.attr.types=t,this}multiple(){return this.attr.multiple=!0,this}notifiesOnAssign(){return this.attr.notifiesOnAssign=!0,this}actors(){return this.attr.actors=!0,this}};function user(e,t){return new UserAttributeBuilder(e,t)}var BaseRelationAttributeBuilder=class extends BaseAttributeBuilder{to(e,t){let n={object:e,...t};return this.attr.targets?.push(n),this}toAny(){return this.attr.targets=[{object:`*`}],this}qualifyWith(...e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.qualifyWith() must be called AFTER .to(). Example: relation("companies", "Companies").to("companies").qualifyWith(...)`);return this.attr.properties=buildPropertySchema(e),this}bilateral(e){let t=this.attr.targets;if(!t||t.length===0)throw Error(`.bilateral() must be called AFTER .to(). Example: relation("company", "Company").to("companies").bilateral({ ... })`);if(t.length>1)throw Error(`Bilateral relations are not supported for polymorphic relations (multiple .to() targets).`);if(nn(this.attr))throw Error(`Bilateral relations are not supported for universal relations (.toAny()).`);let n=t[0]?.object;if(!n)throw new S(`Bilateral relation requires one target object`,[{path:[`bilateral`,`object`],message:`Bilateral relation requires one target object`}]);if(e.object&&e.object!==n){let t=`Bilateral inverse object ${e.object} must match relation target ${n}`;throw new S(t,[{path:[`bilateral`,`object`],message:t}])}return this.attr.bilateral={...e,object:n},this}},SingleRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t){super(`relation`,e,t),this.attr.cardinality=`one`,this.attr.targets=[]}many(){let e=new MultiRelationAttributeBuilder(this.attr.name,this.attr.label??``,{targets:this.attr.targets,isRequired:this.attr.required});return this.attr.system===!1&&e.runtime(),this.attr.hidden&&e.hidden(),this.attr.placeholder&&e.placeholder(this.attr.placeholder),this.attr.description&&e.description(this.attr.description),this.attr.icon&&e.icon(this.attr.icon),this.attr.order!==void 0&&e.order(this.attr.order),this.attr.metadata&&e.metadata(this.attr.metadata),e}},MultiRelationAttributeBuilder=class extends BaseRelationAttributeBuilder{constructor(e,t,n){super(`relation`,e,t),this.attr.cardinality=`many`,this.attr.targets=n?.targets??[],this.attr.defaultValue=[],n?.isRequired&&(this.attr.required=!0)}maxItems(e){return this.attr.maxItems=e,this}};function relation(e,t){return new SingleRelationAttributeBuilder(e,t)}var FormulaAttributeBuilder=class extends BaseAttributeBuilder{expression(e){return this.attr.expression=e,this}returns(e){return this.attr.returnType=e,this}decimals(e){return this.attr.decimals=e,this}currency(e){return this.attr.currencyCode=e,this}required(){throw Error(`Formula attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function formula(e,t){return new FormulaAttributeBuilder(`formula`,e,t)}var RollupAttributeBuilder=class extends BaseAttributeBuilder{from(e){return this.attr.relationAttribute=e,this}aggregate(e){return this.attr.targetAttribute=e,this}using(e){return this.attr.function=e,this}decimals(e){return this.attr.decimals=e,this}path(e){return this.attr.relationPath=e,this}targetType(e){return this.attr.targetAttributeType=e,this}targetOptions(e){return this.attr.targetAttributeOptions=asMutableArray(e),this}targetCurrency(e){return this.attr.targetCurrencyCode=e,this}build(){let e=this.attr.function,t=this.attr.targetAttributeType;if(e===`original`&&t!==void 0&&t!==`select`&&t!==`status`&&t!==`multiselect`){let e=this.attr.relationAttribute??`relation`,n=this.attr.targetAttribute??`field`;throw new b(`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${t}") was given. To surface a plain ${t} value from a related record, use a formula instead — e.g. formula("${this.attr.name}", "…").expression("${e}.${n}").`,x.VALIDATION_FAILED)}return super.build()}required(){throw Error(`Rollup attributes cannot be required: they are computed read-only values. Remove .required() from this attribute definition.`)}};function rollup(e,t){return new RollupAttributeBuilder(`rollup`,e,t)}var DocumentAttributeBuilder=class extends BaseAttributeBuilder{accepts(e){return this.attr.accepts=e,this}maxFileSize(e){return this.attr.maxFileSize=e,this}qualifyWith(...e){return this.attr.properties=buildPropertySchema(e),this}};function document(e,t){return new DocumentAttributeBuilder(`document`,e,t)}const N={owner:`standardshq`,repo:`skills`,ref:`stable`},P=`[A-Za-z0-9._-]+`,Dg=`[A-Za-z0-9_-]+`,Og=RegExp(`^(${Dg})/(${P})@([a-z0-9-]+)(?:#(${P}))?$`),kg=RegExp(`^(${Dg})/(${P})$`),Ag=/^[0-9a-f]{40}$/i;function isSafeSegment(e){return e!==`.`&&!e.startsWith(`-`)&&!e.includes(`..`)}function refuse$1(e,t){throw new S(`Invalid skill source "${e}": ${t} (expected owner/repo@skill or owner/repo@skill#ref)`,[{path:[`source`],message:t}])}function canonicalRef(e){return Ag.test(e)?e.toLowerCase():e}function parseSkillSource(e){let t=e.trim(),n=t.startsWith(`github.com/`)?t.slice(11):t,r=Og.exec(n);if(!r)return refuse$1(e,`malformed or not a github.com source`);let[,i,a,o,s]=r;return[i,a,s??``].every(isSafeSegment)?{host:`github.com`,owner:i,repo:a,skill:o,ref:s===void 0?null:canonicalRef(s)}:refuse$1(e,"a segment cannot start with `-`, hold `..` or be `.`")}function isSkillRepository(e){return kg.exec(e)?.slice(1).every(isSafeSegment)??!1}function formatSkillSource(e){let t=`${e.owner}/${e.repo}@${e.skill}`;return e.ref===null?t:`${t}#${e.ref}`}function isPinnedSkillSource(e){return e.ref!==null&&Ag.test(e.ref)}const F=/^[a-z0-9][a-z0-9-]{0,62}$/,I=`core`;function assertBundleName(e){if(!F.test(e))throw new S(`Invalid bundle name "${e}": expected a lowercase slug matching ${F}`,[]);if(e===`core`)throw new S(`Bundle name "${I}" is reserved`,[])}async function sha256Hex(e){let t=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e));return Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,`0`)).join(``)}const jg=D.object({source:ot,filters:g.optional(),sorts:Nt.optional(),limit:D.number().int().nonnegative().optional()}).strict();var RecordQuery=class{constructor(e){this.state=e}with(e){return new this.constructor({...this.state,...e})}rule(e,t,n){return this.with({rules:[...this.state.rules,{attribute:e,operator:t,value:n}]})}eq(e,t){return this.rule(e,`is`,t)}neq(e,t){return this.rule(e,`is_not`,t)}gt(e,t){return this.rule(e,`greater_than`,t)}gte(e,t){return this.rule(e,`greater_or_equal`,t)}lt(e,t){return this.rule(e,`less_than`,t)}lte(e,t){return this.rule(e,`less_or_equal`,t)}contains(e,t){return this.rule(e,`contains`,t)}notContains(e,t){return this.rule(e,`not_contains`,t)}startsWith(e,t){return this.rule(e,`starts_with`,t)}endsWith(e,t){return this.rule(e,`ends_with`,t)}in(e,t){return this.rule(e,`any_of`,t)}notIn(e,t){return this.rule(e,`none_of`,t)}isEmpty(e){return this.rule(e,`is_empty`,null)}isNotEmpty(e){return this.rule(e,`is_not_empty`,null)}where(...e){return this.with({rules:[...this.state.rules,...e.map(e=>({...e}))]})}or(){return this.with({combinator:`or`})}orderBy(e,t=`asc`){return this.with({sorts:[...this.state.sorts,{attribute:e,direction:t}]})}limit(e){return this.with({limit:e})}offset(e){return this.with({offset:e})}search(e){return this.with({search:e})}related(e){return this.with({scope:{kind:`related`,relation:e}})}relatedFrom(e){return this.with({scope:{kind:`relatedFrom`,relation:e}})}toDefinition(){let{object:e,scope:t,rules:n,combinator:r,sorts:i,limit:a}=this.state;return{source:t?.kind===`related`?{relation:t.relation}:t?.kind===`relatedFrom`?{object:e,relation:t.relation}:{object:e},...n.length>0?{filters:{combinator:r,rules:n.map(e=>({...e}))}}:{},...i.length>0?{sorts:i.map(e=>({...e}))}:{},...a===void 0?{}:{limit:a}}}};function query(e){return new RecordQuery({object:typeof e==`string`?e:e.build().name,combinator:`and`,rules:[],sorts:[]})}const L=[`day`,`week`,`month`,`quarter`,`year`],R=`$query`,Mg=`$record`,Ng=[`data`,`time`,`goal`,`display`];function inputsObject(e){let t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t.isOptional?t.schema.optional():t.schema]));return D.object(t).strict()}function createInput(e){return Object.freeze({...e,optional:()=>createInput({...e,isOptional:!0}),inSection:t=>createInput({...e,section:t}),showWhen:(t,n)=>createInput(typeof t==`string`?{...e,when:{key:t,...n?.not?{not:n.not}:{}}}:{...e,shownIf:t,...n?.on===void 0?{}:{when:{key:n.on}}}),many:()=>createInput({...e,isMany:!0,schema:D.array(e.schema).min(1)})})}function objectNameOf(e){return e===void 0||typeof e==`string`?e:e.build().name}function scalar(e,t,n){return createInput({kind:e,of:objectNameOf(n),isOptional:!1,isMany:!1,schema:t})}function name$1(){return D.string().min(1)}function itemsSchema(e,{min:t,max:n}){return D.array(inputsObject(e)).superRefine((e,r)=>{e.length>n&&r.addIssue({code:`custom`,path:[n],message:`At most ${n} items`}),e.length<t&&r.addIssue({code:`custom`,message:`At least ${t} ${t===1?`item`:`items`}`})})}const z={object:e=>scalar(`object`,name$1(),e),attribute:(e,t)=>createInput({kind:`attribute`,of:objectNameOf(e),options:t,isOptional:!1,isMany:!1,schema:name$1()}),query:e=>scalar(`query`,jg,e),record:e=>scalar(`record`,name$1(),e),agent:()=>scalar(`agent`,name$1()),routine:()=>scalar(`routine`,name$1()),view:()=>scalar(`view`,name$1()),url:()=>scalar(`url`,D.url().refine(e=>/^https?:\/\//.test(e),`Only http(s) links`)),emailCategory:()=>scalar(`emailCategory`,name$1()),enum:e=>createInput({kind:`enum`,isOptional:!1,isMany:!1,schema:D.enum(e)}),text:()=>scalar(`text`,name$1()),number:()=>scalar(`number`,D.number()),boolean:()=>scalar(`boolean`,D.boolean()),period:()=>scalar(`period`,D.enum(L)),option:e=>createInput({kind:`option`,field:e,isOptional:!1,isMany:!1,schema:name$1()}),filters:e=>scalar(`filters`,g,e),list:(e,t)=>createInput({kind:`list`,list:Object.freeze({items:Object.freeze({...e}),min:t.min,max:t.max}),isOptional:!1,isMany:!1,schema:itemsSchema(e,t)})},B=[`page`,`record`,`display`];function blockIssuePath(e){return[e.input,...e.index===void 0?[]:[e.index],...e.item===void 0?[]:[e.item]]}function defineBlock(e){return Object.freeze({name:e.name,label:e.label,icon:e.icon,family:e.family,contexts:Object.freeze([...e.contexts]),inputs:Object.freeze({...e.inputs}),...e.layout===void 0?{}:{layout:Object.freeze({...e.layout})},parameters:inputsObject(e.inputs).superRefine((t,n)=>{let r=e.refine?.(t);r&&n.addIssue({code:`custom`,path:blockIssuePath(r),message:r.message})}),...e.refine===void 0?{}:{refine:(t,n)=>e.refine?.(t,n)}})}function parseBlockParameters(e,t,n){let r=e.parameters.safeParse(structuredClone(t??{}));if(!r.success)throw S.fromZodErrors(r.error.issues.map(e=>({path:[...n,...e.path.map(String)],message:e.message})));return r.data}function blockObjectInputs(e,t,n){return Object.entries(e.inputs).flatMap(([e,r])=>{let i=t[e];if(r.kind===`object`&&typeof i==`string`)return[i];if(r.kind===`query`&&typeof i==`object`&&i){let e=i.source;if(!e)return[];if(`object`in e&&typeof e.object==`string`)return[e.object];let t=n?.attributes.find(t=>t.name===e.relation);return t?an(t):[]}return[]})}function nameSlug(e,t){return e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).slice(0,t).replace(/^_+|_+$/g,``)}function cloneBuilderValue(e,t){try{return structuredClone(e)}catch{let e=`Builder configuration must contain cloneable data`;throw new S(e,[{path:t,message:e}])}}function requireBuilderName(e,t){if(typeof e!=`string`||e.trim().length===0)throw new S(`Name must not be blank`,[{path:t,message:`Name must not be blank`}])}function validateContentConfiguration(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw new S(`Invalid content configuration`,[{path:t,message:`Expected content configuration`}]);for(let n of[`name`,`label`,`placement`])if(Object.hasOwn(e,n)){let e=`Independent content configuration cannot define ${n}`;throw new S(e,[{path:[...t,n],message:e}])}let n=_.safeParse({...e,name:`content`,placement:`main`});if(!n.success)throw S.fromZodErrors(n.error.issues.map(e=>({path:[...t,...e.path.map(String)],message:e.message})));n.data.type===`form`&&n.data.groups.forEach((e,n)=>requireBuilderName(e.name,[...t,`groups`,String(n),`name`]));let{name:r,label:i,placement:a,...o}=n.data;return cloneBuilderValue(o,t)}function validateLiteralContent(e,t){return validateContentConfiguration(e,t),cloneBuilderValue(e,t)}function findRelationAttribute(e,t){return e.attributes.find(e=>e.name===t&&e.type===`relation`)}function relationAcceptsObject(e,t){return e.targets.some(e=>e.object===t||e.object===`*`)}function singleRelationTarget(e){let[t,...n]=e.targets;return t&&n.length===0&&t.object!==`*`?t.object:void 0}function requireSingleRelationTarget(e,t=[e.name,`targets`]){let n=singleRelationTarget(e);if(n===void 0){let n=`Relation "${e.name}" requires one concrete collection target`;throw new S(n,[{path:t,message:n}])}return n}function isCollectionContent(e){return e.type===`collection`}function collectionSourceAddress(e){return e.relation===void 0?{kind:`object`,object:e.object}:e.object===void 0?{kind:`related`,relation:e.relation}:{kind:`relatedFrom`,object:e.object,relation:e.relation}}function collectionSourceAddressOf(e){if(!e||typeof e!=`object`)return;let t=`object`in e?e.object:void 0,n=`relation`in e?e.relation:void 0;if(typeof t==`string`&&typeof n==`string`)return{kind:`relatedFrom`,object:t,relation:n};if(typeof t==`string`&&n===void 0)return{kind:`object`,object:t};if(typeof n==`string`&&t===void 0)return{kind:`related`,relation:n}}function sourcedAttributeOf(e,t){if(t.type===`richtext`)return typeof t.attribute==`string`&&e!==void 0?{object:e,attribute:t.attribute}:void 0;if(t.type!==`collection`)return;let n=collectionSourceAddressOf(t.source);if(n?.kind===`related`)return e===void 0?void 0:{object:e,attribute:n.relation};if(n?.kind===`relatedFrom`)return{object:n.object,attribute:n.relation}}function requireRecordContentContext(e,t,n){if(t!==`record`){let r=`Content "${e}" requires record context. In ${t===`page`?`a standalone page`:`a collection view`} only a collection that lists a whole object, or a custom content that does not require a record, is allowed.`;throw new S(r,[{path:n,message:r}])}}function resolveContentNavigation(e){let t=e.openMode??`page`;return{openMode:t,createMode:e.createMode??t}}function resolveCollectionActions(e,t){return[...new Set(t)].filter(t=>e.actions===void 0||e.actions.includes(t))}const Pg={collection:[`page`,`record`,`display`],form:[`record`],activity:[`record`],richtext:[`record`],documents:[`record`],forms:[`record`],emails:[`record`],meetings:[`record`]},Fg={collection:{size:{w:12,h:8},minWidth:6,height:`flexible`,minHeight:4,maxHeight:20},activity:{size:{w:12,h:8},minWidth:6,height:`flexible`},page:{size:{w:12,h:8},minWidth:6,height:`flexible`}};function contentPlacementContexts(e,t){return e.type===`custom`?t?.contexts:e.type===`page`||e.type===`collection`&&collectionSourceAddress(e.source).kind!==`object`?[`record`]:Pg[e.type]}function requireContentPlacement(e,t,n,r,i){let a=contentPlacementContexts(e,t);a&&!a.includes(hostPlacementContext(r))&&(requireRecordContentContext(n,r,i),reject$1(i,`Content "${n}" cannot be placed in a record view or a record page`))}function hostPlacementContext(e){return e===`record`?`record`:`page`}function contentContextOf(e){return e.context===`page`&&e.object!==void 0?`record`:e.context}const Ig=/* @__PURE__ */ new WeakSet;function violationOf(e,t,n,r){if(!(e instanceof b))throw e;let i=e instanceof S?e.errors[0]:void 0;return{key:JSON.stringify([t,n,e.code,Ig.has(e)?`Invalid content view`:e.message]),contentName:n,path:i?.path??r,message:e.message,code:e.code,error:e}}const Lg=systemAttributeMap({name:``});function systemAttributeMap(e){return new Map(Do(e).map(e=>[e.name,e]))}function reject$1(e,t){throw new S(t,[{path:e,message:t}])}function requireName(e,t){e.trim().length===0&&reject$1(t,`API name must not be empty`)}function indexUnique(e,t,n){let r=/* @__PURE__ */ new Map;return e.forEach((e,i)=>{if(requireName(e.name,[...n,String(i),`name`]),r.has(e.name))throw new v(t,e.name);r.set(e.name,e)}),r}const Rg=30;function capped(e,t){let n=e.slice(0,t).join(`, `);return e.length>t?`${n} … and ${e.length-t} more`:n}function attributeInventory(e,t){return t.length===0?`Object "${e}" has no attributes yet.`:`Attributes of "${e}": ${capped(t,30)}`}function requireAttribute(e,t,n,r,i){if(requireName(t,n),!e)return;let a=e.attributes?.get(t)??(e.system??Lg).get(t);if(!a){if(!e.attributes||So.has(t))return;let r=attributeInventory(e.name,[...e.attributes.keys()]);reject$1(n,`Unknown attribute "${e.name}.${t}". ${r}${i?.()??``}`)}let o=r===void 0?[]:[r].flat();return o.length>0&&!o.includes(a.type)&&reject$1(n,`Attribute "${e.name}.${t}" must have type ${o.join(` or `)}`),a}function collectContentViewCatalogue(e){let t=e.mode??`published`,n=/* @__PURE__ */ new Map;e.objects.forEach((e,t)=>{if(requireName(e.name,[`objects`,String(t),`name`]),n.has(e.name))throw new v(`object`,e.name);n.set(e.name,{name:e.name,system:systemAttributeMap(e),attributes:indexUnique(e.attributes,`attribute`,[`objects`,String(t),`attributes`])})});let r=/* @__PURE__ */ new Set;(e.reservedObjects??[]).forEach((e,i)=>{let a=[`reservedObjects`,String(i)];requireName(e,a),n.has(e)||(t!==`draft`&&reject$1(a,`Unresolved reserved object "${e}"`),r.add(e),n.set(e,{name:e}))});let i=indexUnique(e.extensions??[],`extension`,[`extensions`]);function resolveObject(e,t){requireName(e,t);let r=n.get(e);return r||reject$1(t,`Unknown object "${e}"`),r}function inverseAddresses(e){let t=[];for(let[r,i]of n)if(r!==e)for(let n of i.attributes?.values()??[])n.type===`relation`&&relationAcceptsObject(n,e)&&t.push(`relatedFrom("${r}", "${n.name}")`);return t.sort().slice(0,3)}let a=t===`draft`?ut:h,o=/* @__PURE__ */ new Map,s=/* @__PURE__ */ new Map,c=[],l=[];function parseView(e,t){let n=a.safeParse(e);if(!n.success){let r=new S(invalidViewMessage(e,n.error.issues[0]),n.error.issues.map(e=>({path:[...t,...e.path.map(String)],message:e.message,code:e.code})));throw Ig.add(r),r}let r=n.data;requireName(r.name,[...t,`name`]);let i=r.object??``,c=o.get(i)??/* @__PURE__ */ new Set;if(c.has(r.name))throw new v(`view`,`${i}.${r.name}`);if(c.add(r.name),o.set(i,c),r.context!==`page`&&r.default){let e=s.get(r.object)??/* @__PURE__ */ new Set;if(e.has(r.context))throw new v(`default view`,`${r.object}.${r.context}`);e.add(r.context),s.set(r.object,e)}return r}return e.views.forEach((t,n)=>{let r=[`views`,String(n)],a=t,o=`${String(a?.object??`?`)}.${String(a?.name??n)}`,s,u;try{s=parseView(t,r),u=s.object===void 0?void 0:resolveObject(s.object,[...r,`object`])}catch(e){c.push(violationOf(e,o,null,r));return}s.contents.forEach((t,a)=>{let l=[...r,`contents`,String(a)];try{requireName(t.name,[...l,`name`]),validateContent(t,l,u,contentContextOf(s),i,resolveObject,inverseAddresses,e.authoringViews?.has(n)===!0)}catch(e){c.push(violationOf(e,o,t.name,l))}}),l.push(s)}),l.forEach((t,n)=>{t.contents.forEach((r,i)=>{if(r.type!==`page`)return;let a=[`views`,String(n),`contents`,String(i),`page`],o=l.find(e=>e.context===`page`&&e.object===r.page.object&&e.name===r.page.name),s=t.context===`page`?`Content "${r.name}" cannot reference a page from a page`:t.object===r.page.object?o||e.complete!==!0?void 0:`Unknown page "${r.page.object}.${r.page.name}"`:`Content "${r.name}" must reference a page of "${String(t.object)}", not of "${r.page.object}"`;s!==void 0&&c.push(violationOf(new S(s,[{path:a,message:s}]),`${String(t.object)}.${t.name}`,r.name,a))})}),{views:l,unresolvedObjects:[...r].sort(),violations:c}}function validateStoredViews(e){let t=collectContentViewCatalogue(e).violations[0];if(t)throw t.error}function describeViewIssue(e){let t=e.path.length>0?` (${e.path.map(String).join(`.`)})`:``;return`${e.message}${t}`}function invalidViewMessage(e,t){let n=typeof e==`object`&&e?e:{},r=typeof n.name==`string`?` "${n.name}"`:``,i=typeof n.object==`string`?` of "${n.object}"`:``;return t?`Invalid content view${r}${i}: ${describeViewIssue(t)}`:`Invalid content view${r}${i}`}function validateContentViewCatalogue(e){let{views:t,unresolvedObjects:n,violations:r}=collectContentViewCatalogue(e),i=r[0];if(i)throw i.error;return{views:t,unresolvedObjects:n}}function resolveStoredQuery(e,t,n,{owner:r,requireRecord:i,resolveObject:a,inverseAddresses:o}){let s=collectionSourceAddress(e.source),c,l;if(s.kind===`object`)c=a(s.object,[...t,`source`,`object`]);else if(s.kind===`related`){i();let e=[...t,`source`,`relation`],hint=()=>{if(!r)return``;let e=o(r.name);return e.length===0?``:`. Records pointing at "${r.name}" are addressed from the other side: ${e.join(`, `)}`},n=requireAttribute(r,s.relation,e,`relation`,hint);n?.type===`relation`&&(l=n,c=a(requireSingleRelationTarget(n,e),e))}else{i(),c=a(s.object,[...t,`source`,`object`]);let o=[...t,`source`,`relation`],l=requireAttribute(c,s.relation,o,`relation`);if(l?.type===`relation`&&r&&!relationAcceptsObject(l,r.name)){let e=l.targets.map(e=>`"${e.object}"`).join(`, `);reject$1(o,`Relation "${s.object}.${s.relation}" targets ${e}, not "${r.name}"`)}e.filters?.combinator===`or`&&reject$1([...t,`filters`,`combinator`],`${n} addresses "${s.object}" from the far side, so its filters must use the "and" combinator`)}return e.sorts?.forEach((e,n)=>requireAttribute(c,e.attribute,[...t,`sorts`,String(n),`attribute`])),e.filters?.rules.forEach((e,n)=>requireAttribute(c,e.attribute,[...t,`filters`,`rules`,String(n),`attribute`])),{target:c,relationAttribute:l}}function resolveBlockObjects({block:e,path:t,scope:n},{inputs:r,values:i,at:a},o){let s=Object.entries(r),c;for(let[t,r]of s){let o=i[t];if(r.kind!==`query`||o===void 0)continue;let s=o,l=`Block "${e.name}"`;c={target:resolveStoredQuery(s,[...a,t],l,n).target}}c??=o?.queried;let l=s.find(([,e])=>e.kind===`object`)?.[0],u=l===void 0?void 0:i[l];function record(){return typeof u==`string`?n.resolveObject(u,[...a,l??`object`]):o?o.record():(n.owner||reject$1(t,`Block "${e.name}" names attributes, so it needs an object or a record host`),n.owner)}function attributeScope(e){if(e!==void 0)return e===`$query`?c?.target:e===`$record`?record():n.resolveObject(e,a)}return{queried:c,record,attributeScope}}function optionsOf(e){return e.type===`status`||e.type===`select`?e.options:[]}function requireNamedAttributes(e,t,n,r){let i=(Array.isArray(t)?t:[t]).map((i,a)=>typeof i==`string`?requireAttribute(e,i,Array.isArray(t)?[...n,String(a)]:n,r):void 0);return Array.isArray(t)?void 0:i[0]}function requireOptions(e,t,n,r){let i=optionsOf(e);(Array.isArray(t)?t:[t]).forEach((a,o)=>{let s=Array.isArray(t)?[...n,String(o)]:n,c=i.find(e=>e.value===a);c===void 0&&reject$1(s,`"${String(a)}" is not an option of "${e.name}"`),r&&c.archived&&reject$1(s,`"${String(a)}" is an archived option of "${e.name}"`)})}function validateBlockReferences(e,t,n,r,i){function walk(t,a,o,s){let c=Object.entries(t),{queried:l,record:u,attributeScope:d}=resolveBlockObjects({block:e,path:n,scope:r},{inputs:t,values:a,at:o},s),f=new Map(s?.fields);for(let[e,t]of c){let n=a[e];if(t.kind===`attribute`&&n!==void 0){let r=requireNamedAttributes(d(t.of),n,[...o,e],t.options?.types);Array.isArray(n)||f.set(e,r)}t.kind===`filters`&&n!==void 0&&n.rules.forEach((n,r)=>requireAttribute(d(t.of),n.attribute,[...o,e,`rules`,String(r),`attribute`]))}for(let[e,t]of c){let n=a[e],r=t.field===void 0?void 0:f.get(t.field);t.kind===`option`&&n!==void 0&&r!==void 0&&requireOptions(r,n,[...o,e],i)}for(let[e,n]of c){let r=n.when?.key,i=r===void 0?void 0:t[r],s=r===void 0?void 0:a[r];n.kind===`period`&&a[e]!==void 0&&i?.kind===`attribute`&&typeof s==`string`&&requireAttribute(d(i.of),s,[...o,r??e],[`date`])}let p={queried:l,record:u,fields:f};for(let[e,t]of c){let n=a[e],r=t.list;t.kind===`list`&&r!==void 0&&Array.isArray(n)&&n.forEach((t,n)=>walk(r.items,t,[...o,e,String(n)],p))}}walk(e.inputs,t,n,void 0)}function isBoardGrouping(e){return(e?.type===`status`||e?.type===`select`)&&!e.hidden}function requireBoardGrouping(e,t,n){let r=t.type===`status`||t.type===`select`?`is hidden`:`is a ${t.type}`;isBoardGrouping(t)||reject$1(n,`A board groups by a visible status or select attribute: "${e}.${t.name}" ${r}`)}function validateContent(e,t,n,r,i,a,o,s){function requireRecord(){requireRecordContentContext(e.name,r,t)}let c={owner:n,requireRecord,resolveObject:a,inverseAddresses:o},l=hostPlacementContext(r);if(e.type===`custom`){let n=i.get(e.extension);n||reject$1([...t,`extension`],`Unknown extension "${e.extension}"`),contentPlacementContexts(e,n)?.includes(l)||reject$1([...t,`extension`],`${e.extension} cannot be placed here`);let r=n.parameters.safeParse(structuredClone(e.parameters??{}));if(!r.success)throw new S(`Invalid extension parameters`,r.error.issues.map(e=>({path:[...t,`parameters`,...e.path.map(String)],message:e.message,code:e.code})));let a=r.data,o=n.refine?.(a,l);o&&reject$1([...t,`parameters`,...blockIssuePath(o).map(String)],o.message),validateBlockReferences(n,a,[...t,`parameters`],c,s)}else if(requireContentPlacement(e,void 0,e.name,r,t),e.type!==`page`){if(e.type===`collection`){let{target:n,relationAttribute:r}=resolveStoredQuery(e,t,`Collection "${e.name}"`,c);if(e.columns?.forEach((e,i)=>{let a=[...t,`columns`,String(i)];if(typeof e==`string`){requireAttribute(n,e,a);return}let o=[...a,`relationProperty`];r||reject$1(o,`Relation property columns require a relation source`),r.properties?.definitions.some(t=>t.name===e.relationProperty)||reject$1(o,`Unknown relation property "${e.relationProperty}"`)}),e.displayAttributes?.forEach((e,r)=>requireAttribute(n,e,[...t,`displayAttributes`,String(r)])),s&&e.layout!==`table`&&(e.displayAttributes?.length??0)>w.displayAttributesPerCard&&reject$1([...t,`displayAttributes`],`A ${e.layout} shows at most ${w.displayAttributesPerCard} displayed attributes`),e.descriptionAttribute!==void 0&&requireAttribute(n,e.descriptionAttribute,[...t,`descriptionAttribute`]),e.layout===`kanban`&&e.groupByAttribute!==void 0){let r=[...t,`groupByAttribute`],i=requireAttribute(n,e.groupByAttribute,r);s&&i&&n&&requireBoardGrouping(n.name,i,r)}}else switch(e.type){case`form`:e.groups.forEach((e,r)=>{let i=[...t,`groups`,String(r)];requireName(e.name,[...i,`name`]),e.fields.forEach((e,t)=>requireAttribute(n,e.attribute,[...i,`fields`,String(t),`attribute`]))});break;case`richtext`:requireAttribute(n,e.attribute,[...t,`attribute`],`richtext`),e.titleAttribute!==void 0&&requireAttribute(n,e.titleAttribute,[...t,`titleAttribute`],`text`);break;case`emails`:case`meetings`:e.emailAttributes.forEach((e,r)=>requireAttribute(n,e,[...t,`emailAttributes`,String(r)],`text`));break;case`documents`:e.relations?.forEach((e,r)=>requireAttribute(n,e,[...t,`relations`,String(r)],`relation`));break;case`forms`:e.objectName!==void 0&&a(e.objectName,[...t,`objectName`]);break;case`activity`:break;default:reject$1(t,`Unknown content type: ${String(e)}`)}}}const zg=defineBlock({name:`artifact_preview`,label:`Preview`,icon:`eye`,family:`context`,contexts:[`record`],layout:{size:{w:6,h:8},minWidth:4,height:`flexible`,minHeight:4,maxHeight:20},inputs:{}}),Bg=[`number`,`currency`],V=[`status`,`select`,`user`,`relation`,`date`],Vg=[`records`,`passages`],Hg=[`status`,`select`],Ug=4,Wg=[`bar`,`horizontal_bar`,`line`,`donut`,`treemap`],Gg=[`value_desc`,`value_asc`,`label`],H=[`line`];function measureIssue({measure:e=`count`,attribute:t}){return e===`count`?t===void 0?void 0:{input:`attribute`,message:`count measures records; it takes no attribute`}:t===void 0?{input:`attribute`,message:`${String(e)} needs a number or currency attribute`}:void 0}function countIssue(e){let{count:t,measure:n,attribute:r,date:i,field:a,to:o}=e;if(t!==`passages`)return a===void 0?o===void 0?measureIssue(e):{input:`to`,message:`to counts passages`}:{input:`field`,message:`field tracks passages`};if(n!==void 0)return{input:`measure`,message:`passages are counted`};if(r!==void 0)return{input:`attribute`,message:`passages are counted`};if(i!==void 0)return{input:`date`,message:`passages read when they passed`};if(a===void 0)return{input:`field`,message:`passages track a status or select field`};if(o===void 0)return{input:`to`,message:`passages need the options they enter`}}function requires(e,t,n){return e[t]!==void 0&&e[n]===void 0?{input:t,message:`${t} needs ${n}`}:void 0}function kindIssue(e){let{kind:t,by:n,by2:r}=e;if(r!==void 0&&r===n)return{input:`by2`,message:`by2 must differ from by`};if(t===`donut`&&r!==void 0)return{input:`kind`,message:`a donut splits one grouping (by), and no second`};if(t===`treemap`&&(n===void 0||r!==void 0))return{input:`kind`,message:`a treemap needs one grouping (by), and no second`};let i=H;if(e.order!==void 0&&i.includes(t))return{input:`order`,message:`order applies to bar, horizontal_bar, donut or treemap`}}function countedInputs(){return{count:z.enum(Vg).optional().inSection(`data`),measure:z.enum(gp).optional().inSection(`data`).showWhen(e=>e.count!==`passages`),attribute:z.attribute(R,{types:Bg}).optional().showWhen(`measure`,{not:[`count`]}),field:z.attribute(R,{types:Hg}).optional().showWhen(e=>e.count===`passages`),to:z.option(`field`).many().optional().showWhen(`field`)}}function timeIssue({count:e,date:t,compare:n,curve:r}){if(e!==`passages`&&(n!==void 0||r!==void 0)&&t===void 0)return{input:`date`,message:`compare and curve read a date`};if(typeof n!=`string`||typeof r!=`string`)return;let i=L;return i.indexOf(n)>i.indexOf(r)?void 0:{input:`compare`,message:`compare must be wider than curve`}}function datedPeriod(){return z.period().optional().inSection(`time`).showWhen(e=>e.count===`passages`||e.date!==void 0,{on:`date`})}const U=defineBlock({name:`metric`,label:`Indicateur`,icon:`trending-up`,family:`data`,contexts:[`page`,`record`,`display`],layout:{size:{w:3,h:2},minWidth:3,height:`fit`,maxHeight:4},inputs:{query:z.query(),...countedInputs(),date:z.attribute(R,{types:[`date`]}).optional().inSection(`time`).showWhen(e=>e.count!==`passages`),compare:datedPeriod(),curve:datedPeriod(),target:z.number().optional().inSection(`goal`)},refine:e=>countIssue(e)??timeIssue(e)??(e.target!==void 0&&e.target<=0?{input:`target`,message:`target must be above zero`}:void 0)});function seriesOf(e){return Array.isArray(e.series)?e.series.filter(e=>typeof e==`object`&&!!e):[]}function isTimeChart(e){let t=seriesOf(e);return t.length>1||t.some(e=>e.count===`passages`)}function groupsByDate(e,t){return e.by!==void 0&&t.isDate(`by`)}function seriesIssue(e,t){let n=e.map(e=>e.name);for(let[r,i]of e.entries()){let a=(n.indexOf(i.name)<r?{input:`name`,message:`series names are unique in a chart`}:void 0)??(i.date===void 0||t?void 0:{input:`date`,message:`a series reads a date on a chart of several series`})??(i.filters===void 0||e.length>1?void 0:{input:`filters`,message:`a series filters on its own in a chart of several`})??countIssue(i);if(a)return{input:`series`,index:r,item:a.input,message:a.message}}}function timeChartIssue(e){for(let t of[`by`,`by2`,`order`])if(e[t]!==void 0)return{input:t,message:`a chart of several series or of passages takes no ${t}`};if(e.kind===`donut`||e.kind===`treemap`)return{input:`kind`,message:`a chart of several series is drawn as bars or lines`}}const Kg=[`count`,`sum`];function cumulateIssue(e,t,n){if(e.cumulate!==void 0)return!n&&e.byBucket===void 0?{input:`cumulate`,message:`cumulate runs along a date`}:t.every(e=>Kg.includes(e.measure??`count`))?void 0:{input:`cumulate`,message:`only a count or a sum cumulates`}}const qg={name:z.text(),label:z.text().optional(),...countedInputs(),date:z.attribute(R,{types:[`date`]}).optional().showWhen(e=>e.count!==`passages`&&isTimeChart(e)),filters:z.filters(R).optional().showWhen(e=>seriesOf(e).length>1)},W=defineBlock({name:`chart`,label:`Graphique`,icon:`chart-bar`,family:`data`,contexts:[`page`,`record`,`display`],layout:{size:{w:4,h:6},minWidth:4,height:`flexible`,minHeight:4,maxHeight:12},inputs:{query:z.query(),series:z.list(qg,{min:1,max:4}),kind:z.enum(Wg),by:z.attribute(R,{types:V}).optional().inSection(`display`).showWhen(e=>!isTimeChart(e)),byBucket:z.period().optional().inSection(`display`).showWhen((e,t)=>isTimeChart(e)||groupsByDate(e,t),{on:`by`}),by2:z.attribute(R,{types:V}).optional().inSection(`display`).showWhen(e=>!isTimeChart(e)&&e.by!==void 0,{on:`by`}),order:z.enum(Gg).optional().inSection(`display`).showWhen(e=>{let t=H;return!(isTimeChart(e)||t.includes(e.kind))}),cumulate:z.boolean().optional().inSection(`display`).showWhen((e,t)=>isTimeChart(e)||groupsByDate(e,t))},refine:e=>{let t=seriesOf(e),n=isTimeChart(e);return seriesIssue(t,n)??(n?timeChartIssue(e):requires(e,`byBucket`,`by`)??requires(e,`by2`,`by`)??kindIssue(e))??cumulateIssue(e,t,n)}}),G=defineBlock({name:`heading`,label:`Titre`,icon:`type-text`,family:`layout`,contexts:[`page`,`record`],layout:{size:{w:12,h:1},minWidth:6,height:`fit`,maxHeight:3},inputs:{description:z.text().optional()}}),Jg=[`decisions`,`forYou`],K=defineBlock({name:`decisions`,label:`Décisions`,icon:`inbox`,family:`people`,contexts:[`page`],layout:{size:{w:4,h:4},minWidth:3,height:`flexible`,minHeight:3,maxHeight:10},inputs:{pile:z.enum(Jg).optional().inSection(`data`)}}),q=defineBlock({name:`record_links`,label:`Bubble`,icon:`share`,family:`context`,contexts:[`record`],layout:{size:{w:6,h:8},minWidth:6,height:`flexible`,minHeight:6,maxHeight:16},inputs:{}}),J={name:`bubble`,type:`custom`,extension:q.name,placement:`main`,label:q.label,icon:q.icon,parameters:{}},Yg=[zg,U,W,G,K,q],Xg=/* @__PURE__ */ new Set([`name`,`label`,`icon`,`family`,`contexts`,`inputs`,`parameters`,`layout`,`refine`]),Zg=Yg;var ContentExtensionRegistry=class{constructor(){this.extensions=/* @__PURE__ */ new Map,this.seed()}register(e){let t=Array.isArray(e)?e:[e],n=/* @__PURE__ */ new Set;t.forEach((e,t)=>{if(this.prepare(e,t),n.has(e.name))throw new v(`content extension`,e.name);n.add(e.name)});for(let e of t)this.extensions.set(e.name,e);return this}prepare(e,t){let n=[`extensions`,String(t)],reject=e=>{throw new S(e,[{path:n,message:e}])};if((typeof e!=`object`||!e||Array.isArray(e))&&reject(`Expected a content extension declaration`),Object.keys(e).some(e=>!Xg.has(e))&&reject(`Expected only ${[...Xg].join(`, `)}`),(typeof e.name!=`string`||e.name.trim().length===0)&&reject(`API name must not be empty`),(!Array.isArray(e.contexts)||e.contexts.length===0||e.contexts.some(e=>!B.includes(e)))&&reject(`contexts must be a non-empty list of ${B.join(`, `)}`),typeof e.parameters?.safeParse!=`function`&&reject(`parameters must be a Zod schema`),this.extensions.has(e.name))throw new v(`content extension`,e.name)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return[...this.extensions.values()]}get size(){return this.extensions.size}clear(){this.extensions.clear(),this.seed()}seed(){for(let e of Zg)this.extensions.set(e.name,e)}};const Y=new ContentExtensionRegistry,X=Object.freeze({size:Object.freeze({w:4,h:4}),minWidth:3,height:`flexible`,minHeight:2});function resolveLayout(e){return e===void 0?X:{size:e.size??X.size,minWidth:e.minWidth??X.minWidth,height:e.height??X.height,...e.minHeight===void 0?{}:{minHeight:e.minHeight},...e.maxHeight===void 0?{}:{maxHeight:e.maxHeight}}}function layoutTraitsOf(e,t){return e.type===`custom`?resolveLayout(t.get(e.extension)?.layout):e.type in Fg?resolveLayout(Fg[e.type]):X}function pageTraitsOf(e,t){return n=>{let r=e.get(n);return r?layoutTraitsOf(r,t):X}}function spanContent(e,t){if(!vt(t)){let e=`A block spans 1 to 12 columns, not ${String(t)}`;throw new S(e,[{path:[`content`,`span`],message:e}])}return{content:e,span:t}}function configureContent(e,t){try{return typeof e==`object`&&e&&`build`in e&&typeof e.build==`function`?{configuration:validateContentConfiguration(e.build(),t),extension:e.extension,...e.title===void 0?{}:{title:e.title}}:{configuration:validateContentConfiguration(e,t)}}catch(e){throw e instanceof S?new S(e.message,e.errors.map(e=>({...e,path:e.path[0]===`content`?[...t,...e.path.slice(1)]:e.path}))):e}}function storedQuery(e,t){let n=[`search`,`offset`].filter(t=>e.state[t]!==void 0);if(n.length>0)throw new S(`A ${t} cannot keep a query's ${n.join(` or `)}`,n.map(e=>({path:[t,e],message:`A ${t} stores no ${e}; use filters and limit instead`})));return e.toDefinition()}function checkInputs(e,t){for(let[n,r]of Object.entries(t)){let t=e.inputs[n];r!==void 0&&t!==void 0&&parseBlockParameters({parameters:t.schema},r,[`content`,`parameters`,n])}return t}var BlockContentBuilder=class{constructor(e,t,n={}){this.extension=e,this.parameters=t,this.frame=n}get title(){return this.frame.title}copy(e,t){let n=this.constructor;return new n(this.extension,e,t)}with(e){let t={...this.parameters};for(let[n,r]of Object.entries(e))r===void 0?delete t[n]:t[n]=r;return checkInputs(this.extension,e),this.copy(t,this.frame)}label(e){return this.copy(this.parameters,{...this.frame,title:e})}icon(e){return this.copy(this.parameters,{...this.frame,icon:e})}height(e){return this.copy(this.parameters,{...this.frame,height:e})}build(){let{icon:e,height:t}=this.frame,n={type:`custom`,extension:this.extension.name,parameters:cloneBuilderValue(this.parameters,[`content`,`parameters`]),...e===void 0?{}:{icon:e},...t===void 0?{}:{height:t}};return validateContentConfiguration(n,[`content`]),parseBlockParameters(this.extension,n.parameters,[`content`,`parameters`]),n}span(e){return spanContent(this,e)}},Measures=class{measured(e,t){return this.counted({measure:e,...t===void 0?{}:{attribute:t}})}count(){return this.measured(`count`)}sum(e){return this.measured(`sum`,e)}avg(e){return this.measured(`avg`,e)}min(e){return this.measured(`min`,e)}max(e){return this.measured(`max`,e)}passages(e,t){return this.counted({count:`passages`,field:e,to:[...t.to]})}},MetricBuilder=class extends BlockContentBuilder{date(e){return this.with({date:e})}trend(e,t){return this.with({date:e,curve:t})}curve(e){return this.with({curve:e})}compare(e){return this.with({compare:e})}target(e){return this.with({target:e})}},MetricQuery=class extends Measures{constructor(e){super(),this.query=e}counted(e){return new MetricBuilder(U,checkInputs(U,{query:this.query,...e}))}},Qg=class SeriesBuilder{constructor(e){this.item=e}with(e){return new SeriesBuilder({...this.item,...e})}label(e){return this.with({label:e})}date(e){return this.with({date:e})}filters(e){return this.with({filters:e})}},SeriesQuery=class extends Measures{constructor(e){super(),this.name=e}counted(e){return new Qg({name:this.name,...e})}};function seriesItem(e,t){return{...t(new SeriesQuery(e)).item}}function groupBy(e){return typeof e==`string`?[e,void 0]:[e.attribute,e.bucket]}var ChartBuilder=class extends BlockContentBuilder{series(e,t){let n=Array.isArray(this.parameters.series)?this.parameters.series:[];return this.with({series:[...n,seriesItem(e,t)]})}cumulate(){return this.with({cumulate:!0})}bucket(e){return this.with({byBucket:e})}by(e){let[t,n]=groupBy(e);return this.with({by:t,byBucket:n})}by2(e){return this.with({by2:e})}kind(e){return this.with({kind:e})}bar(){return this.kind(`bar`)}horizontalBar(){return this.kind(`horizontal_bar`)}line(){return this.kind(`line`)}donut(){return this.kind(`donut`)}treemap(){return this.kind(`treemap`)}order(e){return this.with({order:e})}},ChartQuery=class extends Measures{constructor(e){super(),this.query=e}chart(e){return new ChartBuilder(W,checkInputs(W,{query:this.query,series:[e],kind:`bar`}))}counted(e){return this.chart({name:`s1`,...e})}series(e,t){return this.chart(seriesItem(e,t))}},DecisionsBuilder=class extends BlockContentBuilder{pile(e){return this.with({pile:e})}},HeadingBuilder=class extends BlockContentBuilder{description(e){return this.with({description:e})}};function metric(e){return new MetricQuery(storedQuery(e,`metric`))}function chart(e){return new ChartQuery(storedQuery(e,`chart`))}function decisions(){return new DecisionsBuilder(K,{})}function heading(e){return new HeadingBuilder(G,{},{title:e})}const $g=m/3;function isSpanned(e){return typeof e==`object`&&!!e&&`span`in e&&`content`in e}function total(e){return e.reduce((e,t)=>e+t,0)}function spread(e){return e.length===0?0:Math.max(...e)-Math.min(...e)}function betterSplit(e,t){let n=total(e)-total(t);if(n!==0)return n>0;let r=spread(t)-spread(e);if(r!==0)return r>0;let i=e.findIndex((e,n)=>e!==t[n]);return i!==-1&&(e[i]??0)>(t[i]??0)}function splitColumns(e,t){let n=[...t];function visit(r,i){let a=t[r.length];if(a===void 0)betterSplit(r,n)&&(n=r);else for(let t=a;i+t<=e;t+=1)visit([...r,t],i+t)}return visit([],0),n}function rowWidths(e,t){let n=e.filter(e=>e.span===void 0);n.length>$g&&reject(t,`A row holds at most ${$g} unsized blocks`);let r=total(e.map(e=>e.span??e.minWidth));r>m&&reject(t,`Blocks ${e.map(e=>`"${e.key}"`).join(`, `)} do not fit one row: they need at least ${r} of ${m} columns`);let i=m-total(e.map(e=>e.span??0)),a=splitColumns(i,n.map(e=>e.minWidth)),o=0,s=e.map(e=>{if(e.span!==void 0)return e.span;let t=a[o]??e.minWidth;return o+=1,t}),c=s.length-1;return n.length===0&&c>=0&&i>0&&(s[c]=(s[c]??0)+i),s}function reject(e,t){throw new S(t,[{path:e,message:t}])}function headingNames(e){let t=new Set(e.flatMap(e=>e.kind===`heading`?e.meta.name===void 0?[]:[e.meta.name]:Object.keys(e.blocks)));return e.flatMap(e=>{if(e.kind!==`heading`)return[];if(e.meta.name!==void 0)return[e.meta.name];let n=nameSlug(e.title,40),r=n===``?`heading`:`heading_${n}`,i=r;for(let e=2;t.has(i);e+=1)i=`${r}_${e}`;return t.add(i),[i]})}function headingEntry(e,t,n){let r=n.description===void 0?heading(t):heading(t).description(n.description);return{key:e,content:n.icon===void 0?r:r.icon(n.icon),span:m}}function requirePlacement(e,t,n,r,i){if(e.type===`page`&&reject(i,`Content "${n}" cannot reference a page from a page`),requireContentPlacement(e,t,n,r,i),e.type!==`custom`)return;let a=t?.refine?.(e.parameters??{},r);a&&reject([...i,`parameters`,...blockIssuePath(a).map(String)],a.message)}var e_=class PageBuilder{constructor(e){this.kind=`view`,this.data=e}icon(e){return new PageBuilder({...this.data,icon:e})}description(e){return new PageBuilder({...this.data,description:e})}home(){return new PageBuilder({...this.data,home:!0})}for(e){let t=typeof e==`string`?e:e.build().name;return new PageBuilder({...this.data,object:t})}row(e,t={}){Object.hasOwn(t,`group`)&&reject([`views`,`0`,`contents`],`A row has no group: put .heading("…") before it, and { joined: true } to share one card`),t.height!==void 0&&!Number.isInteger(t.height||NaN)&&reject([`views`,`0`,`contents`],`A row height is a positive whole number of rows`),t.height!==void 0&&t.height<=0&&reject([`views`,`0`,`contents`],`A row height is a positive whole number of rows`);let n={kind:`row`,blocks:e,joined:t.joined===!0,...t.height===void 0?{}:{height:t.height}};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}heading(e,t={}){e.trim()===``&&reject([`views`,`0`,`contents`],`A heading needs a title`);let n={kind:`heading`,title:e,meta:t};return new PageBuilder({...this.data,sections:[...this.data.sections,n]})}build(){let e=[`views`,`0`],{name:t,label:n,object:r,icon:i,description:a,home:o,sections:s}=this.data;requireBuilderName(t,[...e,`name`]),r!==void 0&&requireBuilderName(r,[...e,`object`]),o&&r!==void 0&&reject([...e,`home`],`Only a standalone page can be the home`),s.every(e=>e.kind===`row`&&Object.keys(e.blocks).length===0)&&reject([...e,`contents`],`A page declares at least one block`);let c=r===void 0?`page`:`record`,l=[],u=headingNames(s),d=0;for(let t of s){let n=[...e,`contents`,String(l.length)],r=(t.kind===`heading`?[headingEntry(u[d++]??``,t.title,t.meta)]:Object.entries(t.blocks).map(([e,t])=>isSpanned(t)?{key:e,content:t.content,span:t.span}:{key:e,content:t,span:void 0})).map((t,n)=>{let r=[...e,`contents`,String(l.length+n)];requireBuilderName(t.key,[...r,`name`]);let{configuration:i,extension:a,title:o}=configureContent(t.content,r);return`width`in i&&i.width!==void 0&&reject([...r,`width`],`Block "${t.key}" sets a width of its own: use .span() to size a block`),requirePlacement(i,a,t.key,c,r),{content:{...i,name:t.key,...o===void 0?{}:{label:o},placement:`grid`},span:t.span}}),i=rowWidths(r.map(({content:e,span:t})=>({key:e.name,...t===void 0?{}:{span:t},minWidth:layoutTraitsOf(e,Y).minWidth})),n);r.forEach(({content:e},n)=>{let r=i[n];l.push(t.kind===`heading`||r===void 0?e:{...e,width:r,...t.height!==void 0&&e.height===void 0&&layoutTraitsOf(e,Y).height!==`fit`?{height:t.height}:{},...t.joined&&n>0?{joined:!0}:{}})})}let f={name:t,label:n,...r===void 0?{}:{object:r},context:`page`,...i===void 0?{}:{icon:i},...a===void 0?{}:{description:a},...o?{home:!0}:{},contents:l},p=h.safeParse(f);if(!p.success)throw S.fromZodErrors(p.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return{kind:`view`,definition:cloneBuilderValue(f,e)}}};function page(e,t){return new e_({name:e,label:t,object:void 0,sections:[]})}var Z=class ViewBuilder{constructor(e,t=[]){this.kind=`view`,this.data=cloneBuilderValue(e,[`views`,`0`]),this.extensions=t.map(e=>e&&{...e})}for(e){let t=typeof e==`string`?e:e.build().name;return new ViewBuilder({...this.data,object:t},this.extensions)}default(){return new ViewBuilder({...this.data,default:!0},this.extensions)}description(e){return new ViewBuilder({...this.data,description:e},this.extensions)}icon(e){return new ViewBuilder({...this.data,icon:e},this.extensions)}place(e,t,n,r,i){let{configuration:a,extension:o}=configureContent(n,[`views`,`0`,`contents`,String(this.data.contents.length)]),s={...a,name:e,label:t,placement:r},c=[...this.data.contents,s],l=i===void 0?{}:{anchors:{...this.data.anchors,[e]:{after:i}}};return new ViewBuilder({...this.data,...l,contents:c},[...this.extensions,o])}tab(e,t,n,r){return this.place(e,t,n,`main`,r?.after)}aside(e,t,n){return this.place(e,t,n,`aside`)}build(){let e=[`views`,`0`];requireBuilderName(this.data.name,[...e,`name`]),requireBuilderName(this.data.object,[...e,`object`]);let t=h.safeParse(this.data);if(!t.success)throw S.fromZodErrors(t.error.issues.map(t=>({path:[...e,...t.path.map(String)],message:t.message})));return this.data.contents.forEach((t,n)=>{let r=[...e,`contents`,String(n)];requireBuilderName(t.name,[...r,`name`]),t.type===`form`&&t.groups.forEach((e,t)=>requireBuilderName(e.name,[...r,`groups`,String(t),`name`])),requireContentPlacement(t,this.extensions[n],t.name,this.data.context,r)}),{kind:`view`,definition:cloneBuilderValue(this.data,e)}}};function detailView(e,t){return new Z({name:e,label:t,object:void 0,context:`record`,contents:[]})}function listView(e,t){return new Z({name:e,label:t,object:void 0,context:`collection`,contents:[]})}function isViewPiece(e){return`kind`in e&&e.kind===`view`}function isObjectPiece(e){return!(isViewPiece(e)||e instanceof T)}function assertPiece(e,t){if(typeof e!=`object`||!e)throw new S(`Unsupported bundle piece: ${t}`,[]);if(isViewPiece(e)||e instanceof T||typeof e.build==`function`)return;let n=e.name;throw new S(`Unsupported bundle piece: ${typeof n==`string`?n:String(t)}`,[])}function declarationOf$1(e){return e instanceof e_||e instanceof Z?e.build():e}function isPage(e){return e.definition.context===`page`}function validateView(e){let t=h.safeParse(e);if(t.success)return t.data;let n=typeof e==`object`&&e&&`name`in e?String(e.name):`(unnamed)`,r=S.fromZodErrors(t.error.issues.map(e=>({path:e.path.map(String),message:e.message})));throw new S(`View "${n}" is invalid. ${r.message}`,r.errors)}function identityOf(e){return`${e.object??``}:${e.name}`}function assertUniqueIdentities(e,t){let n=/* @__PURE__ */ new Set;for(let r of t){let t=identityOf(r);if(n.has(t))throw new v(e,r.name);n.add(t)}}function byIdentity(e){return(t,n)=>{let r=identityOf(e(t)),i=identityOf(e(n));return r<i?-1:+(r>i)}}async function hashBundlePieces(e){return sha256Hex(r({objects:[...e.objects].sort(byIdentity(e=>({name:e.name}))),views:[...e.views].sort(byIdentity(e=>e)),pages:[...e.pages].sort(byIdentity(e=>e.definition)),agents:[...e.agents].sort(byIdentity(e=>({name:e.name})))}))}const t_={title:120,context:200,prompt:ef};function assertSetupWithinLimits(e){let t=Object.keys(t_).flatMap(t=>{let n=t_[t],r=e[t];return r!==void 0&&r.length>n?[{path:[`setup`,t],message:`Setup ${t} must be at most ${n} characters`}]:[]});if(t.length>0)throw new S(`Bundle setup is invalid`,t)}function assertSetup(e,t){e&&assertSetupWithinLimits(e);for(let e of Object.values(t))assertSetupWithinLimits({title:e[`setup.title`],context:e[`setup.context`],prompt:e[`setup.prompt`]})}function assertSkills(e){let t=/* @__PURE__ */ new Set,n=e.flatMap(e=>{let n=skillProblem(e,t);return n===null?[]:[{path:[`skills`],message:n}]});if(n.length>0)throw new S(`Bundle skills are invalid`,n)}function skillProblem(e,t){let n;try{n=parseSkillSource(e)}catch(t){return t instanceof Error?t.message:`Invalid skill source "${e}"`}return n.owner!==N.owner||n.repo!==N.repo?`Skill "${e}" must come from ${N.owner}/${N.repo}`:n.ref===null?t.has(n.skill)?`Skill "${e}" is declared twice`:(t.add(n.skill),null):`Skill "${e}" cannot pin a ref`}async function builtBundleFromPieces(e){let t=e.name===I;t||assertBundleName(e.name);let{objects:n,pages:r,agents:i}=e,a=e.views.map(validateView),o=n.map(e=>e.name);if(assertUniqueIdentities(`object`,o.map(e=>({name:e}))),assertUniqueIdentities(`view`,a),assertUniqueIdentities(`page`,r.map(e=>e.definition)),assertUniqueIdentities(`agent`,i.map(e=>({name:e.name}))),!t){let e=o.find(C);if(e!==void 0)throw new y(e,`bundle`)}let{setup:s}=e,c=e.translations??{};assertSetup(s,c);let l=e.skills??[];return assertSkills(l),{name:e.name,label:e.label.trim(),description:e.description??null,hash:await hashBundlePieces({objects:n,views:a,pages:r,agents:i}),objects:n,views:a,pages:r,agents:i,uses:e.uses??[],samples:e.samples??[],...s?{setup:s}:{},...l.length>0?{skills:l}:{},translations:c}}const n_=Symbol.for(`standards.bundle`);function isBundle(e){return typeof e==`object`&&!!e&&e[n_]===!0}var BundleBuilder=class{constructor(e,t){this[n_]=!0,this.pieces=[],this.used=[],this.descriptionText=null,this.sampleRecords=[],this.skillSources=[],this.translationTables={},this.built=null,assertBundleName(e),this.name=e,this.label=t,this.objectBuilders=[]}description(e){return this.descriptionText=e,this.changed()}add(...e){return this.pieces.push(...e),this.objectBuilders.push(...e.filter(isObjectPiece)),this.changed(),this}uses(...e){return this.used.push(...e),this.changed()}samples(e){return this.sampleRecords=e,this.changed()}setup(e){return this.setupInvitation=e,this.changed()}skills(...e){return this.skillSources=[...this.skillSources,...e],this.changed()}translations(e,t){return this.translationTables[e]=t,this.changed()}build(){return this.built??=this.assemble(),this.built}changed(){return this.built=null,this}async assemble(){let e=[],t=[],n=[],r=[];for(let[i,a]of this.pieces.entries())if(assertPiece(a,i),a instanceof T)r.push(a.build());else if(isViewPiece(a)){let e=declarationOf$1(a);isPage(e)?n.push(e):t.push(e.definition)}else e.push(a.build());return this.assertNotInUsed(e),builtBundleFromPieces({name:this.name,label:this.label,description:this.descriptionText,objects:e,views:t,pages:n,agents:r,uses:this.used.map(e=>e.name),samples:this.sampleRecords,...this.setupInvitation?{setup:this.setupInvitation}:{},skills:this.skillSources,translations:{...this.translationTables}})}assertNotInUsed(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Set([this]),visit=e=>{if(!n.has(e)){n.add(e);for(let n of e.objectBuilders){let r=n.build().name;t.has(r)||t.set(r,e.name)}for(let t of e.used)visit(t)}};for(let e of this.used)visit(e);for(let{name:n}of e){let e=t.get(n);if(e!==void 0)throw new v(`object`,n,`Object "${n}" is declared by bundle "${this.name}" and by its used bundle "${e}"`)}}};function bundle(e,t){return new BundleBuilder(e,t)}function readOnlyOption(e){return e?.readOnly===void 0?{}:{readOnly:e.readOnly}}function buildFreeFieldRef(e,t){return{type:`free`,attribute:e.build(),label:t?.label,required:t?.required,prefillExpression:t?.prefillExpression,...readOnlyOption(t)}}function buildSlotFieldRef(e,t,n){let[r,...i]=Array.isArray(e)?e:[e];return{type:`slot`,slotId:r,additionalSlotIds:i.length>0?i:void 0,attribute:t,label:n?.label,required:n?.required,tooltip:n?.tooltip,...readOnlyOption(n)}}const r_=D.boolean().optional();var FormRowBuilder=class{constructor(e,t,n){this._finalized=!1,this.stepBuilder=e,this.rowData={id:t,order:n,type:`fields`,fields:[]}}field(e,t,n){return this.rowData.fields.push(buildSlotFieldRef(e,t,n)),this}freeField(e,t){return this.rowData.fields.push(buildFreeFieldRef(e,t)),this}row(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).row(e)}heading(e,t){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).heading(e,t)}separator(){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).separator()}text(e){return this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData).text(e)}endRow(){return this._finalized?this.stepBuilder:(this._finalized=!0,this.stepBuilder._finalizeRow(this.rowData))}},FormStepBuilder=class{constructor(e,t,n){this.rowOrder=0,this.formBuilder=e,this.stepData={id:t,label:n,rows:[]}}description(e){return this.stepData.description=e,this}field(e,t,n){this.rowOrder++;let r=`row-${this.stepData.id}-${this.rowOrder}`,i=buildSlotFieldRef(e,t,n),a={id:r,order:this.rowOrder,type:`fields`,fields:[i]};return this.stepData.rows.push(a),this}freeField(e,t){this.rowOrder++;let n=`row-${this.stepData.id}-${this.rowOrder}`,r=buildFreeFieldRef(e,t),i={id:n,order:this.rowOrder,type:`fields`,fields:[r]};return this.stepData.rows.push(i),this}row(e){return this.rowOrder++,new FormRowBuilder(this,e,this.rowOrder)}heading(e,t){this.rowOrder++;let n={id:`heading-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`heading`,content:e,level:t};return this.stepData.rows.push(n),this}separator(){this.rowOrder++;let e={id:`sep-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`separator`};return this.stepData.rows.push(e),this}text(e){this.rowOrder++;let t={id:`text-${this.stepData.id}-${this.rowOrder}`,order:this.rowOrder,type:`text`,content:e};return this.stepData.rows.push(t),this}step(e,t){return this.formBuilder._finalizeStep(this.stepData).step(e,t)}build(){return this.formBuilder._finalizeStep(this.stepData).build()}_finalizeRow(e){return e.fields.length>0&&this.stepData.rows.push(e),this}_getData(){return this.stepData}},FormBuilder=class{constructor(e,t){this.data={slots:[],steps:[],status:`draft`,version:1},this.validateName(e),this.data.name=e,this.data.label=t}description(e){return this.data.description=e,this}icon(e){return this.data.icon=e,this}status(e){return this.data.status=e,this}metadata(e){return this.data.metadata=e,this}slot(e,t,n){if(this.data.slots.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate slot id: "${e}"`);let r={id:e,objectName:t,label:n.label,mode:n.mode??`create`,color:n.color,icon:n.icon};return this.data.slots.push(r),this}step(e,t){if(this.data.steps.some(t=>t.id===e))throw Error(`[FormBuilder] Duplicate step id: "${e}"`);return new FormStepBuilder(this,e,t)}build(){return this.validateRequiredData(),this.validateSlotReferences(),this.validateFreeFields(),this.validatePrefillExpressions(),this.validateReadOnly(),this.data}_finalizeStep(e){return this.data.steps.push(e),this}validateName(e){let t=D.string().min(1,`Form name cannot be empty`).max(63,`Form name is too long (max 63 characters)`).regex(/^[a-z0-9]+(-[a-z0-9]+)*$/,{message:`Invalid form name format. Name must be in kebab-case: 'client-onboarding', 'contact-creation'`});try{t.parse(e)}catch(e){throw e instanceof D.ZodError?Error(`[FormBuilder] ${e.issues[0].message}`):e}}validateRequiredData(){if(this.data.slots.length===0)throw Error(`[FormBuilder] At least one slot is required. Use .slot() to add slots.`);if(this.data.steps.length===0)throw Error(`[FormBuilder] At least one step is required. Use .step() to add steps.`)}validateSlotReferences(){let e=new Map(this.data.slots.map(e=>[e.id,e.objectName]));for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(r.type!==`slot`)continue;let n=getSlotFieldTargets(r);for(let r of n)if(!e.has(r))throw Error(`[FormBuilder] Step "${t.id}" references unknown slot "${r}". Declare it with .slot("${r}", ...) first.`);let i=new Set(n.map(t=>e.get(t)));if(i.size>1)throw Error(`[FormBuilder] Step "${t.id}" field on attribute "${r.attribute}" targets slots of different objects (${[...i].join(`, `)}). A multi-slot field must target slots of the same object.`)}}validatePrefillExpressions(){let e=[...A,`join`,`where`];for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n))for(let r of n.fields){if(!isFormFreeFieldRef(r)||!r.prefillExpression)continue;let n=r.prefillExpression,i=`prefillExpression on free field "${r.attribute.name}" in step "${t.id}"`;if(!isLabelExpression(n))throw Error(`[FormBuilder] ${i} must contain at least one {{ attribute }} interpolation.`);if(/\{\{\s*\}\}/.test(n))throw Error(`[FormBuilder] ${i} contains empty {{ }} interpolation.`);for(let a of n.matchAll(/(?<!\|)\|(?!\|)\s*(\w+)(?:\s*:[^|}]*)?/g)){let n=a[1];if(!e.includes(n))throw Error(`[FormBuilder] ${i} uses invalid pipe "${n}". Valid pipes: ${e.join(`, `)}`);let o=a[0].replace(/^\|/,``);if(isWherePipe(o)&&!parseWherePipe(o))throw new S(`[FormBuilder] ${i} has a malformed where: pipe "${o.trim()}". Write where:property=value or where:property in (a,b).`,[{path:[t.id,r.attribute.name,`prefillExpression`],message:`Malformed where: pipe`}])}}}validateReadOnly(){for(let e of this.data.steps)for(let t of e.rows)if(isFormFieldsRow(t))for(let n of t.fields){if(r_.safeParse(n.readOnly).success)continue;let t=isFormFreeFieldRef(n)?n.attribute.name:n.attribute,r=isFormFreeFieldRef(n)?`free field`:`field`;throw new S(`[FormBuilder] readOnly on ${r} "${t}" in step "${e.id}" must be a boolean.`,[{path:[e.id,t,`readOnly`],message:`Expected a boolean`}])}}validateFreeFields(){let e=new Set(O);for(let t of this.data.steps)for(let n of t.rows)if(isFormFieldsRow(n)){for(let r of n.fields)if(isFormFreeFieldRef(r)){let n=r.attribute.type;if(e.has(n))throw Error(`[FormBuilder] Free field in step "${t.id}" uses forbidden attribute type "${n}". Forbidden types: ${O.join(`, `)}`)}}}};function form(e,t){return new FormBuilder(e,t)}const i_=D.object({shape:D.enum(ba),from:D.array(D.string().refine(e=>e.trim().length>0,`Must not be blank`)).optional()}).strict();function imageLookupKindOf(e){return e.type===`text`?e.format===`url`?`website`:e.format===`email`?`email`:`name`:null}function validateObjectImage(e){let t=e.image?.from;if(t===void 0)return;let refuse=(t,n)=>{throw new S(`Object "${e.name}": ${t}`,[{path:n===void 0?[`image`,`from`]:[`image`,`from`,String(n)],message:t}])};t.length===0&&refuse(`image.from must name at least one attribute`);let n=new Map((e.attributes??[]).map(e=>[e.name,e])),r=/* @__PURE__ */ new Set;for(let[e,i]of t.entries()){r.has(i)&&refuse(`image.from names "${i}" twice`,e),r.add(i);let t=n.get(i);t?imageLookupKindOf(t)===null&&refuse(`image.from names "${i}", a ${t.type} attribute: only text attributes can locate an image`,e):refuse(`image.from names "${i}", which is not one of its attributes`,e)}}function validateObjectExpressions(e){let{name:t,labelExpression:n,embeddingExpression:r}=e;if(!n)throw new b(`Object "${t}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,x.VALIDATION_FAILED);let i=j.safeParse(n);if(!i.success){let e=i.error.issues[0]?.message??`Invalid labelExpression`;throw new b(`Invalid labelExpression for "${t}": ${e}`,x.VALIDATION_FAILED)}if(r!==void 0){let e=j.safeParse(r);if(!e.success){let n=e.error.issues[0]?.message??`Invalid embeddingExpression`;throw new b(`Invalid embeddingExpression for "${t}": ${n}`,x.VALIDATION_FAILED)}}}var ObjectBuilder=class{get"~standard"(){return createStandardSchemaProps(_e(this.build()))}constructor(e,t){this._sealed=!1,this._toleratedAttributes=[],this.validateName(e),this.obj={name:e,label:t,attributes:[],system:!0}}id(e){return this.obj.id=e,this}description(e){return this.obj.description=e,this}pluralLabel(e){return this._pluralLabel=e,this}icon(e){return this.obj.icon=e,this}color(e){return this.obj.color=e,this}image(e={}){return this.obj.image={shape:e.shape??`square`,...e.from===void 0?{}:{from:[...e.from]}},this}runtime(){return this.obj.system=!1,this}sealed(){return this._sealed=!0,this}tolerate(e){return this._toleratedAttributes=[...this._toleratedAttributes,...e],this}attribute(e){return this.pushAttributes([e]),this}attributes(e){return this.pushAttributes(e),this}pushAttributes(e){let t=e.map(e=>`build`in e&&typeof e.build==`function`?e.build():e);xc([...this.obj.attributes,...t],e=>e.name,e=>new v(`attribute`,e,`Object "${this.obj.name}": duplicate attribute name "${e}"`)),this.obj.attributes.push(...t)}metadata(e){return this.obj.metadata={...this.obj.metadata,...e},this}order(e){return this.obj.metadata={...this.obj.metadata,order:e},this}hidden(){return this.obj.metadata={...this.obj.metadata,hidden:!0},this}labelExpression(e){return this._labelExpression=e,this}embeddingExpression(e){return this._embeddingExpression=e,this}documentLayout(e){if(e.presets)for(let t of e.presets)validatePresetStructure(t.id,t.structure,1);return this.obj.documentLayout=e,this}hierarchical(){return this.obj.hierarchical=!0,this}build(){if(!this.obj.name)throw new S(`[ObjectBuilder] Missing required field: name`,[{path:[`name`],message:`name is required`}]);if(!this.obj.label)throw new S(`[ObjectBuilder] Missing required field: label`,[{path:[`label`],message:`label is required`}]);return validateObjectExpressions({name:this.obj.name,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression}),validateObjectImage({name:this.obj.name,image:this.obj.image,attributes:this.obj.attributes}),{...this.obj,pluralLabel:this._pluralLabel,labelExpression:this._labelExpression,embeddingExpression:this._embeddingExpression,sealed:this._sealed,toleratedAttributes:this._toleratedAttributes}}validateName(e){e!==void 0&&Ec(e)}};function object(e,t){if(C(e))throw new y(e,`builder`);return new ObjectBuilder(e,t)}function validatePresetStructure(e,t,n){let fail=(t,n)=>{throw new S(t,[{path:[`documentLayout`,`presets`,e],message:n}])};n>5&&fail(`Preset structure exceeds max depth of 5`,`Preset structure too deep`);let r=/* @__PURE__ */ new Set;for(let i of t){let t=i.title.trim();t.length===0&&fail(`Folder preset node title is required`,`Empty folder title`),t.includes(`/`)&&fail(`Folder preset node title cannot contain /`,`Folder title contains /: "${t}"`),r.has(t)&&fail(`Folder preset sibling titles must be unique`,`Duplicate folder title: "${t}"`),r.add(t),i.children&&i.children.length>0&&validatePresetStructure(e,i.children,n+1)}}function relationProperty(e){return requireBuilderName(e,[`relationProperty`]),{relationProperty:e}}var Q=class ContentBuilder{constructor(e,t){this.data=cloneBuilderValue(e,[`content`]),this.extension=t===void 0?void 0:Object.freeze({name:t.name,contexts:t.contexts,parameters:t.parameters,refine:t.refine})}set(e){return new ContentBuilder({...this.data,...e},this.extension)}icon(e){return this.set({icon:e})}object(e){return this.set({objectName:e})}layout(e){let{layout:t,groupByAttribute:n,columnSizing:r,kanbanColumnOrder:i,kanbanColumnVisibility:a,kanbanPinnedColumns:o,...s}={...this.data,layout:void 0,groupByAttribute:void 0,columnSizing:void 0,kanbanColumnOrder:void 0,kanbanColumnVisibility:void 0,kanbanPinnedColumns:void 0};return new ContentBuilder({...s,...e},this.extension)}table(){return this.layout({layout:`table`})}list(){return this.layout({layout:`list`})}kanban(e){return this.layout({layout:`kanban`,groupByAttribute:e})}columns(...e){return this.set({columns:e})}actions(...e){return this.set({actions:e})}openMode(e){return this.set({openMode:e})}createMode(e){return this.set({createMode:e})}visibility(e){return this.set({visibility:e})}descriptionAttribute(e){return this.set({descriptionAttribute:e})}displayAttributes(...e){return this.set({displayAttributes:e})}columnSizing(e){return this.set({columnSizing:e})}kanbanColumnOrder(...e){return this.set({kanbanColumnOrder:e})}kanbanColumnVisibility(e){return this.set({kanbanColumnVisibility:e})}kanbanPinnedColumns(...e){return this.set({kanbanPinnedColumns:e})}formColumns(e){return this.set({formColumns:e})}density(e){return this.set({density:e})}titleAttribute(e){return this.set({titleAttribute:e})}allowUpload(e){return this.set({allowUpload:e})}allowRemove(e){return this.set({allowRemove:e})}hideAttachments(e){return this.set({hideAttachments:e})}relations(...e){return this.set({relations:e})}span(e){return spanContent(this,e)}height(e){return this.set({height:e})}build(){let e=validateLiteralContent(this.data,[`content`]);return this.extension&&e.type===`custom`&&parseBlockParameters(this.extension,e.parameters,[`content`,`parameters`]),e}},a_=class GroupBuilder{constructor(e,t,n,r={}){this.data=cloneBuilderValue({name:e,label:t,fields:n,...r},[`group`])}field(e,t){let{name:n,label:r,fields:i,...a}=this.data;return new GroupBuilder(n,r,[...i,{attribute:e,...t}],a)}fields(...e){let{name:t,label:n,fields:r,...i}=this.data;return new GroupBuilder(t,n,[...r,...e.map(e=>({attribute:e}))],i)}description(e){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),description:e})}collapsible(e=!1){return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...this.presentation(),collapsible:!0,collapsed:e})}alwaysOpen(){let{collapsed:e,...t}=this.presentation();return new GroupBuilder(this.data.name,this.data.label,this.data.fields,{...t,collapsible:!1})}presentation(){let{name:e,label:t,fields:n,...r}=this.data;return r}build(){requireBuilderName(this.data.name,[`group`,`name`]);try{validateLiteralContent({type:`form`,groups:[this.data]},[`group`])}catch(e){throw e instanceof S?new S(e.message,e.errors.map(e=>({...e,path:e.path[1]===`groups`?[`group`,...e.path.slice(3)]:e.path}))):e}return cloneBuilderValue(this.data,[`group`])}};function group(e,t){return new a_(e,t,[])}function collection(e){return new Q({type:`collection`,...storedQuery(e,`collection`)})}function form$1(...e){return new Q({type:`form`,groups:e.map(e=>`build`in e?e.build():e)})}function activity(){return new Q({type:`activity`})}function richtext$1(e){return new Q({type:`richtext`,attribute:e})}function documents(){return new Q({type:`documents`})}function forms(){return new Q({type:`forms`})}function emails(...e){return new Q({type:`emails`,emailAttributes:e})}function meetings(...e){return new Q({type:`meetings`,emailAttributes:e})}function custom(e,t){if(typeof e!=`object`||!e||typeof e.name!=`string`)throw new S(`Expected registered extension declaration`,[{path:[`content`,`extension`],message:`Expected registered extension declaration`}]);let n=validateContentConfiguration({type:`custom`,extension:e.name,parameters:t},[`content`]);if(n.type!==`custom`)throw new S(`Expected custom content`,[]);let r=new Q({...n,extension:e.name},e);return r.build(),r}function recordLinksTab(){return[J.name,J.label,custom(q,{}).icon(J.icon)]}function page$1(e){let{object:t,name:n}=e.definition;if(typeof t!=`string`){let e=`Page "${n}" is standalone; a record tab renders a record page (\`page(...).for(object)\`)`;throw new S(e,[{path:[`content`,`page`,`object`],message:e}])}return new Q({type:`page`,page:{object:t,name:n}})}const o_={collection,metric,chart,decisions,page:page$1,form:form$1,activity,richtext:richtext$1,documents,forms,emails,meetings,custom};function contentDefinition(e,t){if(t.suppressed)return null;let n=t.workspaceDefinition??t.sourceDefinition;return n===null?null:{...structuredClone(n),name:e}}function storedContentDefinition(e){let{name:t,...n}=e;return structuredClone(n)}function workspaceViewAuthoring(e){let t={main:0,aside:0,grid:0};return{origin:`runtime`,mainOrderCustomized:!1,asideOrderCustomized:!1,homeCustomized:!1,contents:Object.fromEntries(e.map(e=>[e.name,{sourceDefinition:null,workspaceDefinition:storedContentDefinition(e),suppressed:!1,sourcePosition:null,workspacePosition:t[e.placement]++}]))}}function overLimit(e){let t=/* @__PURE__ */ new Set,n=e.length-w.tabsPerView;for(let r of[...e].reverse()){if(n<=0)break;r.sourceDefinition===null&&(t.add(r.definition.name),--n)}return t}function resolveViewContents(e,{trim:t=!0}={}){let n=Object.entries(e.contents).flatMap(([e,t])=>{let n=contentDefinition(e,t);return n?[{definition:n,...t}]:[]});return[`main`,`aside`,`grid`].flatMap(r=>{let i=r===`aside`?e.asideOrderCustomized:e.mainOrderCustomized,a=n.filter(e=>e.definition.placement===r).sort((e,t)=>{let n=i?e.workspacePosition:e.sourcePosition,r=i?t.workspacePosition:t.sourcePosition;if(n!==null&&r!==null&&n!==r)return n-r;if(n!==null&&r===null)return-1;if(r!==null&&n===null)return 1;let a=e.sourcePosition??e.workspacePosition,o=t.sourcePosition??t.workspacePosition;return a!==null&&o!==null&&a!==o?a-o:a!==null&&o===null?-1:o!==null&&a===null?1:e.definition.name.localeCompare(t.definition.name)}),o=t&&r===`grid`?overLimit(a):/* @__PURE__ */ new Set;return a.filter(e=>!o.has(e.definition.name)).map(e=>e.definition)})}function cardWidth(e){let t=e.reduce((e,t)=>e+t.width,0);return Math.min(m,t)}function pageItems(e,t){let n=[],r=!0;for(let i of e){let e=i.heading?m:i.width??t(i),a={kind:i.hidden?`hidden`:`block`,name:i.name,width:e},o=n.at(-1);if(i.joined&&!i.heading&&!r&&o){let e=o.kind===`card`?o.members:[o];e.push(a),n[n.length-1]={kind:`card`,width:cardWidth(e),members:e}}else n.push(a);r=i.heading===!0}return n}function isPageHeading(e){return e.type===`custom`&&e.extension===G.name}function pageFlowBlocks(e){let t=e.blocks.map(e=>({name:e.name,...e.width===void 0?{}:{width:e.width},...e.joined===void 0?{}:{joined:e.joined},...isPageHeading(e)?{heading:!0}:{}}));for(let{after:n,...r}of e.hidden){let e=n===null?0:t.findIndex(e=>e.name===n)+1;t.splice(e,0,{...r,hidden:!0})}return t}let s_;function unaccentRules(){if(s_)return s_;let e=/* @__PURE__ */ new Map;for(let t of`
3
3
  ¡!
4
4
  ©(C)
5
5
  «<<
@@ -1651,4 +1651,4 @@ import{NonJsonValueError as e,asTenantId as t,asUserId as n,canonicalStringify a
1651
1651
  🄨(Y)
1652
1652
  🄩(Z)
1653
1653
  `.split(`
1654
- `)){if(t===``)continue;let n=String.fromCodePoint(t.codePointAt(0)??0);e.set(n,t.slice(n.length))}return Z=e,e}function unaccent(e){let t=unaccentRules(),n=``;for(let r of e)n+=t.get(r)??r;return n}function foldText(e){return unaccent(e).toLowerCase()}const A_={phone:`text`,currency:`number`},j_={rename:[`kind`,`object`,`from`,`to`],phone:[`kind`,`object`,`attribute`,`to`,`defaultCountryCode`],currency:[`kind`,`object`,`attribute`,`to`,`currencyCode`]};function refuse(e,t,n){throw new L(n,[{path:t===void 0?[`resolutions`,String(e)]:[`resolutions`,String(e),t],message:n}])}function assertKeys(e,t,n){for(let r of n)(typeof t[r]!=`string`||t[r]===``)&&refuse(e,r,`Resolution ${e} needs a non-empty string \`${r}\``);let r=Object.keys(t).find(e=>!n.includes(e));r!==void 0&&refuse(e,r,`Resolution ${e} has an unknown field \`${r}\``)}function assertResolution(e,t){if(Kn(t)||refuse(e,void 0,`Resolution ${e} must be an object`),t.kind===`rename`){assertKeys(e,t,j_.rename),t.from===t.to&&refuse(e,`to`,`Resolution ${e} renames "${t.from}" to itself`);return}if(t.kind!==`retype`&&refuse(e,`kind`,`Unknown resolution kind ${JSON.stringify(t.kind)}: expected "rename" or "retype"`),t.to!==`phone`&&t.to!==`currency`&&refuse(e,`to`,`Unsupported retype to ${JSON.stringify(t.to)}: a push converts text → phone and number → currency only`),assertKeys(e,t,j_[t.to]),t.to===`phone`){let n=t.defaultCountryCode;/^[A-Z]{3}$/.test(n)&&Kg(n)||refuse(e,`defaultCountryCode`,`Resolution ${e}: "${n}" is not an ISO 3166-1 alpha-3 country code`);return}let n=t.currencyCode;/^[A-Z]{3}$/.test(n)&&Gg(n)||refuse(e,`currencyCode`,`Resolution ${e}: "${n}" is not a supported ISO 4217 currency code`)}function addressesOf(e){return e.kind===`rename`?{reads:e.from,lands:e.to}:{reads:e.attribute,lands:e.attribute}}function assertSchemaSourceResolutions(e){if(!Array.isArray(e))throw new L("`resolutions` must be an array",[{path:[`resolutions`],message:"`resolutions` must be an array"}]);if(e.length>100)throw new L(`A push carries ${e.length} resolutions; the limit is 100`,[]);let t=/* @__PURE__ */ new Set;for(let[n,r]of e.entries()){assertResolution(n,r);let{reads:e,lands:i}=addressesOf(r);for(let[a,o]of[[`${r.kind}:${r.object}.${e}`,`of "${r.object}.${e}"`],[`${r.kind}>${r.object}.${i}`,`onto "${r.object}.${i}"`]])t.has(a)&&refuse(n,void 0,`Resolution ${n} repeats a ${r.kind} ${o}`),t.add(a)}}function phoneFromText(e,t){let n=e.trim();if(n===``)return{value:null};let r=qg(n,Qr(t));if(!r?.isPossible()||r.country===void 0||r.ext!==void 0)return;let i=Wg(r.country)?.iso3;if(i!==void 0)return{value:{countryCode:i,phoneNumber:ri(n,i)}}}function convertRetypedValue(e,t,n={}){if(t===null)return{value:null};if(e.to===`phone`)return typeof t==`string`?phoneFromText(t,e.defaultCountryCode):void 0;if(typeof t==`number`&&Math.abs(t)<=2**53-1&&!(t<0&&n.allowNegative!==!0))return{value:{code:e.currencyCode,value:t}}}const Q=R.string().refine(e=>e.trim().length>0,`Must not be blank`),M_=Th(Q),N_=R.object({label:Q,pluralLabel:R.string().optional(),description:R.string().optional(),icon:E.optional(),color:At.optional(),image:D_.optional(),labelExpression:R.string(),embeddingExpression:R.string().optional(),sealed:R.boolean().optional(),toleratedAttributes:R.array(Q).optional(),metadata:R.record(R.string(),R.unknown()).optional(),documentLayout:R.record(R.string(),R.unknown()).optional(),hierarchical:R.boolean().optional(),defaultDriveSort:R.enum(ao).optional()}).strict();function failure(e){throw new L(e,[])}function definitionSchema(e){return R.custom(t=>{let n=R.record(R.string(),R.unknown()).parse(t);for(let t of e[0]===`view`?[`object`,`name`]:[`name`])Object.hasOwn(n,t)&&failure(`Invalid schema state: unrecognized definition key ${t}`);switch(e[0]){case`object`:N_.parse(n);break;case`attribute`:{let e=R.enum(te).parse(n.type);Xr(e).extend({type:R.literal(e),label:Q,required:R.boolean().optional(),unique:R.boolean().optional(),icon:E.optional()}).strict().parse(n);break}case`view`:{let{contents:t,...r}=n,i=R.array(Q).parse(t);new Set(i).size!==i.length&&failure(`Invalid schema state: duplicate content membership`),$t.parse({...r,object:e[1],name:e[2],contents:[]});break}case`content`:j.parse({...n,name:e[3]})}return!0})}function compareSchemaStateEntries(e,t){let n=JSON.stringify(e.address),r=JSON.stringify(t.address);return n<r?-1:+(n>r)}function schemaStateSourcePayload(e){return{modelVersion:1,hashVersion:1,entries:[...e].sort(compareSchemaStateEntries).filter(e=>e.source!==null).map(({address:e,source:t})=>({address:e,source:t}))}}function parseState(e){let t=R.record(R.string(),R.unknown()).parse(e);for(let[e,n]of[[`modelVersion`,`model`],[`hashVersion`,`hash`]])t[e]!==1&&failure(`Unsupported schema ${n} version: expected 1, received ${t[e]===void 0?`missing`:String(t[e])}`);let n=R.object({modelVersion:R.literal(1),hashVersion:R.literal(1),tenant:Q,sourceFingerprint:R.string().regex(/^[a-f0-9]{64}$/),entries:R.array(R.unknown())}).strict().safeParse(e);if(!n.success){let e=n.error.issues.find(e=>e.code===`unrecognized_keys`);throw e?.code===`unrecognized_keys`&&failure(`Invalid schema state: unrecognized key ${e.keys[0]}`),L.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})))}let r=/* @__PURE__ */ new Set,i=n.data.entries.map(e=>{let t=M_.parse(R.object({address:R.unknown()}).parse(e).address),n=JSON.stringify(t);r.has(n)&&failure(`Invalid schema state: duplicate address ${n}`),r.add(n);let i=definitionSchema(t).nullable(),a=t[0]===`object`||t[0]===`attribute`?R.object({id:R.string().uuid(),updatedAt:R.string().datetime()}).strict():R.object({id:R.string().uuid(),revision:R.number().int().nonnegative()}).strict(),o=R.object({address:M_,source:i,effective:i,status:R.enum([`source`,`runtime`,`copy`,`suppressed`]),sourceOwner:R.string().regex(B).nullable(),guard:a.nullable()}).strict().parse(e);return(o.status===`runtime`&&(o.source!==null||o.effective===null||o.sourceOwner!==null)||o.status===`suppressed`&&(t[0]!==`content`||o.source===null||o.effective!==null||o.guard===null)||o.status===`copy`&&(o.source===null||o.effective===null)||o.effective!==null&&o.guard===null||o.source===null&&o.effective===null)&&failure(`Invalid schema state: inconsistent status at ${n}`),{...o,sourceOwner:parseSchemaOwner(o.sourceOwner)}});return{...n.data,entries:i.sort(compareSchemaStateEntries)}}function parseSchemaState(e){try{return parseState(e)}catch(e){throw e instanceof R.ZodError?L.fromZodErrors(e.issues.map(e=>({path:e.path.map(String),message:e.message}))):e}}function diffSchemaState(e){let t=[];for(let n of[...e.entries].sort(compareSchemaStateEntries)){let e=n.source===null?`added`:n.status===`suppressed`?`suppressed`:n.effective===null?`removed`:r(n.source)===r(n.effective)?n.status===`copy`?`copied`:null:`changed`;e&&t.push({...n,change:e})}return{modelVersion:1,tenant:e.tenant,sourceFingerprint:e.sourceFingerprint,changes:t}}const $=R.string().min(1),P_=R.union([R.object({objectName:$,viewName:$,contentName:$.optional()}).strict().describe(`Full configuration of a view, or of one content when contentName is given`),R.object({objectId:$}).strict().describe(`An object with its attributes, by id`),R.object({objectName:$}).strict().describe(`An object with its attributes`),R.object({objectId:$,attributeName:$}).strict().describe(`One attribute's config, by name`),R.object({objectId:$,attributeId:$}).strict().describe(`One attribute's config, by id`),R.object({objectId:$,recordId:$}).strict().describe(`One sample record`)]);function parseNamedTarget(e){let t=P_.safeParse(e);if(!t.success)throw new L(`Invalid scoped target`,[{path:[`target`],message:`Expected exactly one named target branch`}]);return t.data}const F_=[`object`,`attribute`,`view`,`content`,`sample`],I_=100,L_=R.object({mode:R.enum([`inline`,`window`]),interaction:R.enum([`static`,`interactive`]),size:R.enum([`compact`,`regular`]),aspectRatio:R.number().positive().finite().optional()}).strict(),R_=R.object({artifactId:R.string().min(1),revision:R.number().int().positive(),name:R.string().min(1),kind:R.string().min(1),retention:R.enum(Qg),display:L_}).strict();function readArtifactResult(e){let t=R_.safeParse(e);return t.success?t.data:null}const z_=R.string().regex(/^[^/\s]+\/[^/\s]+$/),B_=R.object({kind:R.literal(`generated-image`),artifact:R.unknown(),generation:R.object({attemptId:R.uuid(),requestedModelId:z_,executedModelId:z_.nullable(),format:R.enum(Xo),mimeType:R.enum([`image/png`,`image/jpeg`,`image/webp`])}).strict()}).strict();function readGeneratedImageResult(e){let t=B_.safeParse(e);if(!t.success)return null;let n=readArtifactResult(t.data.artifact);return!n||n.kind!==`image`?null:{...t.data,artifact:{...n,kind:`image`}}}function isCompletedToolPart(e){return e.type===`tool`&&e.state===`completed`}function readString(e,t){let n=e[t];return typeof n==`string`?n:void 0}function upsertWithPrecedence(e,t,n,r){let i=e.get(t),a=i&&r[i.kind]>r[n.kind]?i:n;e.delete(t),e.set(t,a)}function asRecord(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function readRefId(e,t,n){let r=readString(e,t),i=`${n}:`;return r?.startsWith(i)&&r.length>i.length?r.slice(i.length):void 0}function verbResultEntries(e){let t=asRecord(e);if(!t)return[];let n=[t];for(let e of[`members`,`created`,`updated`]){let r=t[e];if(Array.isArray(r))for(let e of r){let t=asRecord(e);t&&n.push(t)}}return n.filter(e=>!(`error`in e))}function extractReadRecordIds(e){let t=/* @__PURE__ */ new Set;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.name!==`read`)continue;let n=e.args.refs;if(Array.isArray(n))for(let e of n){if(typeof e!=`string`)continue;let n=_m(e);n.ok&&n.ref.kind===`record`&&t.add(n.ref.id)}}return[...t]}const V_={created:1,modified:0};function readSingleRecordEntry(e){if(typeof e!=`object`||!e)return null;let t=e,n=typeof t.record==`object`&&t.record!==null?t.record:void 0,r=(n&&readString(n,`id`))??readString(t,`recordId`);return r?{id:r,label:(n&&readString(n,`label`))??r,objectName:(n&&readString(n,`objectName`))??``}:null}function readBulkRecordEntries(e,t,n){if(typeof e!=`object`||!e)return[];let r=e[t];if(!Array.isArray(r))return[];let i=[];for(let e of r){if(typeof e!=`object`||!e)continue;let t=e,r=readString(t,`id`);r&&i.push({id:r,label:readString(t,`label`)??r,objectName:readString(t,`objectName`)??n})}return i}function readVerbRecordEntries(e){let t=asRecord(asRecord(e.result)?.record),n=readString(e.args,`object`)??(t&&readString(t,`objectName`))??``,r=[];for(let t of verbResultEntries(e.result)){let e=readRefId(t,`ref`,`record`);e&&r.push({id:e,label:readString(t,`title`)||readString(t,`label`)||e,objectName:readString(t,`objectName`)??n})}return r}function extractTouchedRecords(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e))continue;let n=[],r;if(e.name===`create_record`||e.name===`update_record`||e.name===`edit_content`){let t=readSingleRecordEntry(e.result);n=t?[t]:[],r=e.name===`create_record`?`created`:`modified`}else if(e.name===`bulk_create_records`||e.name===`bulk_update_records`){let t=readString(e.args,`objectId`)??``,i=e.name===`bulk_create_records`?`created`:`updated`;n=readBulkRecordEntries(e.result,i,t),r=e.name===`bulk_create_records`?`created`:`modified`}else if(e.name===`write`)n=readVerbRecordEntries(e),r=readString(e.args,`action`)===`create`?`created`:`modified`;else continue;for(let e of n){let n={recordId:e.id,objectName:e.objectName,label:e.label,kind:r};upsertWithPrecedence(t,e.id,n,V_)}}return[...t.values()]}const H_={modified:1,consulted:0};function isFilePart(e){return e.type===`file`}function entryFromDocumentMutation(e,t){if(typeof e.result!=`object`||e.result===null)return null;let n=e.result,r=readString(n,`documentId`)??(t===`folderId`?readString(n,t):void 0);return r?{id:r,title:readString(e.args,`name`)??readString(e.args,`title`)??r,kind:`modified`}:null}function entryFromReadDocument(e){let t=readString(e.args,`documentId`);return t?{id:t,title:t,kind:`consulted`}:null}function entryFromRef(e,t,n){let r=readRefId(e,`ref`,`file`),i=r??readRefId(e,`ref`,`document`);return i?{id:i,...r?{fileId:r}:{},title:n||readString(e,`title`)||i,kind:t,mimeType:readString(e,`mimeType`)}:null}function entriesFromOrganize(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=readString(e.args,`action`),r=readString(e.args,`name`)??readString(e.args,`title`),i=readString(t,`documentId`);if(i)return[{id:i,title:r??i,kind:`modified`}];let a=readString(t,`folderId`);if(a)return n===`create_folder`?[{id:a,title:r??a,kind:`modified`}]:[];let o=entryFromRef(t,`modified`,r);return o?[o]:[]}function entriesFromCopy(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=(Array.isArray(t.copied)?t.copied:[]).flatMap(e=>{let t=asRecord(e),n=t?entryFromRef(t,`modified`,void 0):null;return n?[n]:[]});if(n.length>0)return n;let r=entryFromRef(t,t.ref!==void 0&&t.ref===readString(e.args,`from`)?`consulted`:`modified`,void 0);return r?[r]:[]}function entriesFromRead(e){let t=asRecord(e.result);return(Array.isArray(t?.members)?t.members:[]).flatMap(e=>{let t=asRecord(e);if(!t||`error`in t||!readRefId(t,`ref`,`document`))return[];let n=entryFromRef(t,`consulted`,void 0);return n?[n]:[]})}function entriesFromToolPart(e){switch(e.name){case`organize`:return entriesFromOrganize(e);case`copy`:return entriesFromCopy(e);case`read`:return entriesFromRead(e);default:{let t=entryFromToolPart(e);return t?[t]:[]}}}function entryFromSandboxUpload(e){if(typeof e.result!=`object`||e.result===null)return null;let t=e.result,n=readString(t,`fileId`);return n?{id:n,fileId:n,title:readString(t,`title`)??n,kind:`modified`,mimeType:readString(t,`mimeType`)}:null}function entryFromToolPart(e){switch(e.name){case`update_document`:case`attach_file`:return entryFromDocumentMutation(e,`documentId`);case`create_folder`:return entryFromDocumentMutation(e,`folderId`);case`read_document`:return entryFromReadDocument(e);case`sandbox_upload_file`:return entryFromSandboxUpload(e);default:return null}}function extractTouchedDocuments(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`){for(let e of n.parts)if(isCompletedToolPart(e))for(let n of entriesFromToolPart(e))upsertWithPrecedence(t,n.id,n,H_);else if(isFilePart(e)&&e.fileId){let n={id:e.fileId,fileId:e.fileId,title:e.name||e.fileId,kind:`modified`,mimeType:e.mimeType};upsertWithPrecedence(t,n.id,n,H_)}}return[...t.values()]}function extractTouchedArtifacts(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.error)continue;let n=e.name===`generate_image`?readGeneratedImageResult(e.result)?.artifact:e.name===`publish_artifact`?readArtifactResult(e.result):null;if(!n)continue;let r=`${n.artifactId}:${n.revision}`;t.delete(r),t.set(r,n)}return[...t.values()]}function isNonBlankString(e){return typeof e==`string`&&/\S/u.test(e)}const U_=R.object({provider:R.custom(e=>isNonBlankString(e)&&e.length<=200,{message:`must be a non-blank string of at most 200 characters`}),model:R.string().max(200).regex(/\S/u)});function preference(e,t){return{key:e,value:t.value,default:t.default,audited:t.audited??!1,...t.parameter===void 0?{}:{parameter:t.parameter},...t.parameters===void 0?{}:{parameters:t.parameters},...t.refine===void 0?{}:{refine:t.refine}}}const W_=``;function refusal(e,t){return{ok:!1,field:e,message:t,issues:[{path:[e],message:t}]}}function declarationOf(e,t){return`get`in e?e.get(t):e.find(e=>e.key===t)}function locatePreference(e,t,n){let r=declarationOf(e,t);return r?r.parameter===void 0?n===void 0?{ok:!0,declaration:r,parameter:``}:refusal(`parameter`,`Preference "${t}" takes no parameter`):n===void 0||n===``||n.trim()!==n?refusal(`parameter`,`Preference "${t}" is keyed by ${r.parameter}`):r.parameters&&!r.parameters.includes(n)?refusal(`parameter`,`"${n}" is not a ${r.parameter} of "${t}"`):{ok:!0,declaration:r,parameter:n}:refusal(`key`,`Unknown preference "${t}"`)}function judgePreferenceWrite(e,t,n,r){let i=locatePreference(e,t,n);if(!i.ok)return i;let a=i.declaration.value.safeParse(r);if(a.success){let e=i.declaration.refine?.(a.data,i.parameter);return e===void 0?{...i,value:a.data}:refusal(`value`,e)}return{ok:!1,field:`value`,message:`Invalid value for preference "${t}"`,issues:a.error.issues.map(e=>({path:[`value`,...e.path.map(String)],message:e.message}))}}const G_=R.strictObject({model:U_.optional(),routing:R.literal(`auto`).optional()}),K_=R.strictObject({inApp:R.boolean()});function isActionableType(e){let t=y[e];return t!==void 0&&An(t.kind)}const q_=[preference(`workPosture`,{value:R.enum(Xc),default:`auto`,audited:!0}),preference(`chat.default`,{value:G_,default:{},audited:!0}),preference(`conversationSurface`,{value:R.enum(Sa),default:`panel`}),preference(`mailboxListMode`,{value:R.enum(cs),default:`threads`}),preference(`mailboxReaderLayout`,{value:R.enum(ls),default:`panel`}),preference(`home`,{value:R.string().uuid().nullable(),default:null}),preference(`memory.learnFromEmail`,{value:R.boolean(),default:!0,audited:!0}),preference(`memory.shareWithTeam`,{value:R.boolean(),default:!0,audited:!0}),preference(`onboarding.completed`,{value:R.boolean(),default:!1,audited:!1}),preference(`decisions.seenAt`,{value:R.iso.datetime().nullable(),default:null}),preference(`decisions.delivery`,{value:K_,default:{inApp:!0},parameter:`decision type`,parameters:Object.keys(y),refine:(e,t)=>!e.inApp&&isActionableType(t)?`A "${t}" decision asks you to act: it is always shown in-app`:void 0})];export{Ti as ACCESS_CAPABILITIES,Ei as ACCESS_LEVELS,Di as ACCESS_ROLES,u as ACTIONABLE_DECISION_KINDS,Oi as ACTOR_TYPES,d as AGENDA_BLOCK,ki as AGENT_ASIDE_ANSWER_MAX_LENGTH,Ai as AGENT_ASIDE_HISTORY_LIMIT,ji as AGENT_ASIDE_QUESTION_MAX_LENGTH,Mi as AGENT_AVATAR_EXPRESSIONS,Ni as AGENT_AVATAR_TYPES,Pi as AGENT_MESSAGE_KIND,Fi as AGENT_MESSAGE_SENDER_NAME_KEY,Ii as AGENT_NOTIFICATION_KIND,Li as AGENT_SESSION_ACCESS_ROLES,Ri as AGENT_SESSION_LIST_ORDERS,zi as AGENT_SESSION_ORIGINS,Bi as AGENT_SESSION_PROVENANCES,Vi as AGENT_STARTERS_MAX,Hi as AGENT_STARTER_MAX_LENGTH,Ui as AGENT_SYSTEM_PROMPT_MAX_LENGTH,Wi as AGENT_TASK_KINDS,Gi as AGENT_WAKE_KIND,f as AGGREGATE_BUCKETS,p as AGGREGATE_MEASURES,Ki as AI_MODEL_INPUT_MODALITIES,qi as AI_MODEL_PROFILE_LABELS,Ji as AI_MODEL_REASONING_MODES,t_ as ALLOWED_PROPERTY_TYPES,Yi as ALL_CATALOG_TOOL_NAMES,V as ALL_PIPES,Xi as ALWAYS_KINDS,Zi as APPEARANCE_FACETS,Qi as APPROVAL_FAMILY_TOOL_NAMES,$i as ARCHITECT_PUBLICATION_KIND,$g as ARTIFACT_FILE_ROLES,Zg as ARTIFACT_KINDS,m as ARTIFACT_PREVIEW_EXTENSION,Qg as ARTIFACT_RETENTIONS,ea as ASK_QUESTIONS_ANSWER_MAX_LENGTH,ta as ASK_QUESTIONS_ANSWER_MAX_VALUES,na as ASK_QUESTIONS_FILE_REF,ra as ASK_QUESTIONS_MAX_ADDED_FILES,ia as ASK_QUESTIONS_MAX_BATCH,aa as ASK_QUESTIONS_TOOL_NAME,oa as ATTACH_FILE_ACTIONS,h as ATTRIBUTE_FILTER_OPERATORS,ee as ATTRIBUTE_NAME_SCHEMA,te as ATTRIBUTE_TYPES,ne as ATTRIBUTE_TYPE_DESCRIPTORS,sa as AUDIT_ACTIONS,ca as AUDIT_AGENT_SESSION_METADATA_KEY,la as AUDIT_RESOURCE_TYPES,$h as AccessDeniedError,AgendaBuilder,M as AgentBuilder,eg as AggregateValidationError,tg as AmbiguousSchemaChangeError,ng as AttributeInUseError,rg as AttributeNotFoundError,ua as BILLING_MODES,re as BLOCK_CONTEXTS,ie as BLOCK_PERIODS,g as BLOCK_WIDTHS,da as BROWSER_LAUNCH_TOOL_NAME,fa as BROWSER_TOOL_NAMES,pa as BUNDLE_LOCALES,K as BUNDLE_NAME_PATTERN,ma as BUNDLE_SETUP_PROMPT_MAX_LENGTH,e_ as BYTE_UNIT_LABELS,BlockContentBuilder,BundleBuilder,_ as CARD_BLOCK,ha as CATALOG_RESOURCES,v as CHART_BLOCK,ae as CHART_KINDS,oe as CHART_ORDERS,ga as CHAT_PROVIDERS,Lr as COMPUTED_RETURN_TYPES,_a as CONNECTION_GRANT_PROVIDERS,va as CONNECTION_STATUS_IDS,ya as CONNECTOR_PROVIDER_IDS,ba as CONNECTOR_SCOPES,se as CONTENT_PLACEMENT_CONTEXTS,xa as CONTINUATION_KEY_PATTERN,Sa as CONVERSATION_SURFACES,Ca as COPY_VERB_NAME,q as CORE_BUNDLE_NAME,q_ as CORE_PREFERENCES,wa as CORE_RECORD_TOOL_NAMES,Ta as CORE_TOOL_NAMES,Ea as COUNT_MODES,Da as CUSTOM_LEVEL,CardBuilder,ChartBuilder,ChartQuery,ig as ConcurrentModificationError,X as ContentBuilder,ce as DECISIONS_BLOCK,le as DECISION_INBOX_STATES,ue as DECISION_KINDS,de as DECISION_LINE_MAX_LENGTH,fe as DECISION_LINK_TARGET_TYPES,pe as DECISION_LIST_STATES,me as DECISION_READ_STATES,he as DECISION_SENDER_KINDS,ge as DECISION_SETTINGS_AREAS,_e as DECISION_TITLE_MAX_LENGTH,ve as DECISION_TRANSFERS_KEY,ye as DECISION_TYPES_V1,be as DECISION_TYPE_ACCESS_GRANTED,xe as DECISION_TYPE_AGENT_APPROVAL,Se as DECISION_TYPE_AGENT_MESSAGE,Ce as DECISION_TYPE_AGENT_QUESTION,we as DECISION_TYPE_AGENT_REVIEW,Te as DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,Ee as DECISION_TYPE_AGENT_SETUP,De as DECISION_TYPE_BUNDLE_SETUP,Oe as DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,ke as DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,Ae as DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED,je as DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,y as DECISION_TYPE_KINDS,Me as DECISION_TYPE_PERSON,Ne as DECISION_TYPE_RECORD_ASSIGNED,Pe as DECISION_TYPE_RECORD_MENTIONED,Fe as DECISION_WORK_STATES,Oa as DEFAULT_AGENT_EXECUTION_CONFIG,ka as DEFAULT_AGENT_TOOL_GROUPS,Aa as DEFAULT_APPEARANCE_ICON,ja as DEFAULT_APPROVAL_POLICY,Ma as DEFAULT_BLUEPRINT_TOOL_GROUPS,__ as DEFAULT_CUSTOM_OBJECT_ICON,Na as DEFAULT_DAILY_ACTIVITY_DAYS,Pa as DEFAULT_DICTATION_LIMITS,l_ as DEFAULT_LABEL_FALLBACK,Ie as DEFAULT_LAYOUT_TRAITS,Fa as DEFAULT_MEETING_BOT_DISPLAY_NAME,Ia as DEFAULT_TENANT_SETTINGS,Rr as DEFAULT_VALIDATION_MESSAGES,La as DEVICE_ACCESS_ROLES,Ra as DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS,za as DEVICE_CHANNEL_IDLE_POLL_MS,Ba as DEVICE_CHANNEL_KEEPALIVE_MS,Va as DEVICE_CHANNEL_MAX_FRAME_BYTES,Ha as DEVICE_CHANNEL_PATH,Ua as DEVICE_CHANNEL_PRESENCE_MS,Wa as DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION,Ga as DEVICE_COMMAND_ERROR_CODES,Ka as DEVICE_DESKTOP_STATES,qa as DEVICE_SHELLS,Ja as DICTATION_FINALIZATION_TIMEOUT_MS,Ya as DICTATION_FRAME_BYTES,Xa as DICTATION_MAX_BUFFER_BYTES,Za as DICTATION_MAX_FRAME_BYTES,Qa as DICTATION_MAX_TRANSCRIPT_BYTES,$a as DICTATION_MODEL_ID,eo as DICTATION_PREPARATION_TIMEOUT_MS,to as DICTATION_SAMPLE_RATE,no as DICTATION_TICKET_TTL_MS,ro as DISCARD_ARCHITECT_DRAFT_TOOL_NAME,io as DOCUMENT_KINDS,ao as DOCUMENT_SORT_MODES,F_ as DRAFT_CONFLICT_KINDS,oo as DRAFT_WRITE_TOOL_NAMES,DecisionsBuilder,so as DeviceChannelProtocolError,co as DeviceChannelServerFrameSchema,lo as DeviceChannelWorkerFrameSchema,uo as DeviceDesktopStatusSchema,N as DuplicateError,fo as EMAIL_CATEGORY_DEFAULT_COLOR,po as EMAIL_CATEGORY_DEFAULT_ICON,mo as EMAIL_CATEGORY_DESCRIPTION_MAX,ho as EMAIL_CATEGORY_DESCRIPTION_MIN,go as EMAIL_CATEGORY_LIMIT,_o as EMAIL_CATEGORY_NAME_MAX,vo as EMAIL_CATEGORY_SCOPES,yo as EMAIL_CLASSIFIED_BY,bo as EMAIL_DIRECTIONS,xo as EMAIL_PARTICIPANT_ROLES,So as EMAIL_PROVIDERS,Co as EMAIL_RULE_SCOPES,wo as ENVIRONMENT_BUILD_LOG_STEPS,To as ENVIRONMENT_BUILD_LOG_STEP_PREFIX,Eo as ENVIRONMENT_HARNESSES,Do as ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,Oo as ENVIRONMENT_HARNESS_WORKDIR,ko as ENVIRONMENT_IMAGES,Ao as ENVIRONMENT_MEMORY_GB_PER_VCPU,jo as ENVIRONMENT_NAME_MAX_CHARS,Mo as ENVIRONMENT_NETWORK_ALLOW_MAX,No as ENVIRONMENT_SCRIPT_MAX_BYTES,Po as ENVIRONMENT_SIZES,Fo as ENVIRONMENT_SIZE_VCPUS,Io as ENVIRONMENT_STANDARDS_WORKDIR,Lo as ENV_VAR_KEY_PATTERN,Ro as ESTIMATED_COUNT_CAP,ag as ExportTooLargeError,zo as FILE_LIST_MAX_IDS,Bo as FILE_OCR_STATUSES,Vo as FILE_URLS_MAX_IDS,z as FORM_FORBIDDEN_ATTRIBUTE_TYPES,Ho as FORM_STATUSES,Uo as FORM_SUBMISSION_STATUSES,og as ForbiddenError,FormBuilder,FormRowBuilder,FormStepBuilder,Wo as GET_ARCHITECT_DRAFT_TOOL_NAME,Go as GITHUB_TRIGGER_CATALOG,Ko as GITHUB_TRIGGER_FAMILIES,qo as GRANT_ENABLES,Le as GROUPABLE_ATTRIBUTE_TYPES,O_ as GroupBuilder,Jo as HARNESS_BRIDGE_PORT,Re as HEADING_BLOCK,ze as HIERARCHY_ATTRIBUTE_IDS,Be as HIERARCHY_ATTRIBUTE_NAMES,Ve as HIERARCHY_CHILD_IDS_LIMIT,Yo as HITL_TOOL_NAMES,Xo as IMAGE_FORMATS,Zo as IMAGE_SHAPES,Qo as IMAGE_SOURCES,$o as INFERENCE_REASONING_OPTIONS,es as INFERENCE_ROUTING_MODES,ts as INFERENCE_SPEEDS,He as INVENTORY_LIMIT,sg as InvalidPermissionGrantError,ns as LAST_RUN_ERROR_MAX_LENGTH,rs as LINK_COOKIE_MAX_AGE_MS,is as LINK_DEFAULT_MS,as as LINK_MAX_MS,Ue as LIST_VIEW_TAB_VISIBILITIES,We as LOCATION_FILTER_PROPERTIES,cg as LogoProviderUnavailableError,lg as LogoSearchRateLimitedError,os as MACHINE_KEY_KINDS,ss as MAILBOX_ACCOUNT_VISIBILITIES,Ge as MAILBOX_BLOCK,cs as MAILBOX_LIST_MODES,ls as MAILBOX_READER_LAYOUTS,us as MAIL_DRAFT_BODY_MAX_CHARS,ds as MAIL_DRAFT_MODES,fs as MAIL_SIGNATURE_MAX_CHARS,ps as MAIL_SUBJECT_MAX_CHARS,Ke as MAX_AGGREGATE_GROUPS,ms as MAX_DAILY_ACTIVITY_DAYS,Xg as MAX_PRESET_DEPTH,hs as MAX_TODOS,gs as MAX_TODO_DESCRIPTION_CHARS,_s as MAX_TODO_ID_CHARS,I_ as MCP_SERVER_NAME_MAX_LENGTH,qe as MEASURABLE_ATTRIBUTE_TYPES,Je as MEETINGS_UPCOMING_BLOCK,vs as MEETING_BOT_IMAGE,ys as MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,bs as MEETING_BOT_MEMBER_CAP,xs as MEETING_BOT_NO_CREDITS,Ss as MEETING_BOT_SILENT_REASON,Cs as MEETING_CONFERENCE_REQUESTS,ws as MEETING_PARTICIPANT_ROLES,Ts as MEETING_RESPONSES,Es as MEETING_RESPONSE_STATUSES,Ds as MEETING_STATUSES,U as MEMORY_ATTRIBUTES,f_ as MEMORY_PAGE_MAX_CHARS,Os as MEMORY_SPEND_LIMIT_PATTERN,p_ as MEMORY_WORKSPACE_PROFILE,d_ as MEMORY_WRITE_SOURCE,h_ as METERED_CHARGE_KINDS,m_ as METERED_RATES_USD,b as METRIC_BLOCK,MailboxBuilder,ug as MemoryNotFoundError,MetricBuilder,MetricQuery,MultiRelationAttributeBuilder,Jg as NATIVE_AGENT_UI_PART_IDS_METADATA_KEY,Yg as NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION,Ye as NATIVE_BLOCKS,Xe as NATIVE_OBJECT_NAMES,ks as NATIVE_TOOL_GROUPS,As as NATIVE_TOOL_GROUP_CATALOG,js as NEWS_DEFAULT_DISPLAY_DAYS,Ms as NEWS_DISPLAY_CAP_DAYS,Ns as NEWS_INDEX_MAX_ENTRIES,Ps as NEWS_INTENSITIES,Fs as NEWS_TARGET_KINDS,Is as NO_ACCESS,W_ as NO_PREFERENCE_PARAMETER,Ls as NO_RECORDING,Ze as NO_VALUE_OPERATORS,e as NonJsonValueError,NoopGeocodingAdapter,dg as NotFoundError,fg as NotImplementedError,Rs as OAUTH_TICKET_TTL_MS,zs as OBJECT_GRANT,Qe as OBJECT_NAME_SCHEMA,W as OFFICIAL_SKILLS_REPO,Bs as OPEN_TOOL_PART_STATES,Vs as OPERATION_MAX_STEPS,$e as OPERATORS_BY_TYPE,ObjectBuilder,pg as ObjectNotFoundError,mg as ObjectReferencedError,hg as OrphanSystemAttributeError,et as PAGE_GRID_COLUMNS,Hs as PERMISSION_ACTIONS,Us as PERMISSION_CAPABILITIES,Ws as PERMISSION_CATALOG,Gs as PERSISTENCE_OWNED_QUOTA_KEYS,r_ as PIPES_WITH_ARGS,Ks as PROVIDER_DRAFT_LABEL,qs as PROVIDER_NAMES,Js as PUBLIC_MAIL_DOMAINS,J as PageBuilder,gg as PageReferencedError,_g as ProtectedResourceError,vg as ProtectedRoleError,tt as QUALIFIED_SEPARATOR,nt as QUERY_OBJECT,Ys as QUESTION_FAMILY_TOOL_NAMES,Xs as QUOTA_KEYS,yg as QueryTimeoutError,Zs as RECENT_ACTIVITY_LEDGER_LIMIT,Qs as RECIPIENT_IDENTITIES_MAX,$s as RECORDING_OVERRIDES,ec as RECORDING_POLICIES,tc as RECORD_ACCESS_ROLES,nc as RECORD_ACCESS_SOURCES,rc as RECORD_DRIVE_CURSOR_MAX_LENGTH,ic as RECORD_DRIVE_PAGE_DEFAULT_LIMIT,ac as RECORD_DRIVE_PAGE_MAX_LIMIT,oc as RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,sc as RECORD_GRAPH_MAX_LIMIT_PER_NODE,cc as RECORD_GRAPH_MAX_NODES,lc as RECORD_IMAGE_MAX_BYTES,rt as RECORD_LINKS_BLOCK,x as RECORD_LINKS_CONTENT,it as RECORD_LIST_SCOPES,at as RECORD_OBJECT,uc as REFERENCE_KINDS,ot as RELATION_TARGET_ANY,st as REMOVED_OPERATOR_REPLACEMENTS,dc as REPLY_MODES,fc as REPOSITORY_WILDCARD,pc as REQUEST_DESIGN_REVIEW_TOOL_NAME,mc as REQUEST_SETUP_TOOL_NAME,ct as RESERVED_ATTRIBUTE_NAMES,lt as RESERVED_OBJECT_NAMES,hc as RESOURCE_GRANT_KINDS,gc as RESOURCE_KIND_CATALOG,ut as RESOURCE_VISIBILITIES,_c as ROUTING_PRICE_CEILINGS,vc as RUN_ORIGIN_METADATA_KEY,bg as RealtimeDeliveryError,xg as RealtimeRateLimitedError,Sg as RealtimeSubscriptionError,Cg as RecordNotFoundError,dt as RecordQuery,wg as RecordReferencedError,Tg as RepositoryError,P as ReservedObjectNameError,Eg as RoleNotFoundError,Dg as SCHEMA_ERROR_HTTP_STATUS,S as SCHEMA_LIMITS,B as SCHEMA_OWNER_PATTERN,A_ as SCHEMA_SOURCE_RETYPE_FROM,yc as SEND_VERB_NAME,bc as SESSION_INFERENCE_PATCH_KEYS,n_ as SIMPLE_PIPES,zr as SIMPLE_PROPERTY_TYPES,xc as SLACK_TRIGGER_CATALOG,Sc as SLACK_TRIGGER_EVENTS,Cc as SPEAKS_THROUGH_SEND_METADATA_KEY,v_ as STANDARD_SCHEMA_VENDOR,wc as SURFACE_TOOL_NAMES,ft as SYNONYM_ALIASES,pt as SYSTEM_ATTRIBUTES,mt as SYSTEM_ATTRIBUTE_I18N_KEYS,Tc as SYSTEM_EMAIL_CATEGORIES,Ec as SYSTEM_EMAIL_CATEGORY_NAMES,ht as SYSTEM_FIELD_NAMES,gt as SYSTEM_FILTER_ATTRIBUTE_TYPES,Dc as SYSTEM_PART_CODES,F as SchemaError,I as SchemaErrorCode,Og as SearchBackendError,kg as SearchPathNotIndexedError,SingleRelationAttributeBuilder,Ag as StorageError,jg as SyncCascadeError,Mg as SyncConflictError,Ng as SyncError,Pg as SystemEntityImmutableError,Oc as TASK_DEMAND_LEVELS,kc as TENANT_INVITATION_DEFAULT_TTL_MS,Ac as TENANT_INVITATION_DELIVERY_STATUSES,jc as TENANT_INVITATION_MAX_TTL_MS,Mc as TENANT_INVITATION_MIN_TTL_MS,Nc as TENANT_INVITATION_RESEND_INTERVAL_MS,Pc as TENANT_INVITATION_STATUSES,C as TEXT_BLOCK,Br as TEXT_FORMAT_PATTERNS,Fc as TODO_PHASES,Ic as TODO_PLAN_STATUSES,Lc as TODO_STATUSES,Rc as TOOL_APPROVAL_STATES,zc as TOOL_IMPACT_COUNT_KEYS,Bc as TRANSCRIPT_STATUSES,Vc as TRIAGE_ACTIONS,Hc as TRIGGER_EVENT_TYPES,Uc as TRIGGER_MAX_REENTRY,Wc as TURN_OUTCOMES,Fg as ToolGroupGrantError,_t as UNORDERED_CHART_KINDS,Gc as UNSHAREABLE_OBJECT_NAMES,Kc as USAGE_MODALITIES,qc as USAGE_SCOPES,Jc as USERS_RESOLVE_MAX_IDS,Yc as USER_STATUSES,Xc as USER_WORK_POSTURES,Zc as VERB_NAMES,L as ValidationError,Y as ViewBuilder,Qc as WAKE_TURN_METADATA_KEY,$c as WAKE_TURN_SPOKE_METADATA_KEY,el as WALLET_STATUSES,Vr as WIRE_OFFERED_BASE_CONFIG,Hr as WIRE_OMITTED_CONFIG_KEYS,Ig as WorkspaceInvariantReason,tl as accessGrantSchema,nl as actorSchema,rl as agent,il as agentApprovalResolutionSchema,al as agentAvatarFromMetadata,ol as agentAvatarOutputSchema,sl as agentAvatarSchema,cl as agentConversationOverviewSchema,ll as agentDataChunk,ul as agentDefinitionActivitySchema,dl as agentDefinitionAudienceSchema,fl as agentDefinitionDailyActivitySchema,pl as agentDefinitionSchema,ml as agentDisplayName,hl as agentExecutionConfigOutputSchema,gl as agentHistoryMessageSchema,_l as agentInferencePreferencesOutputSchema,vl as agentInferencePreferencesSchema,yl as agentMemoryViewSchema,bl as agentMessageAttachmentSchema,xl as agentMessagePartSchema,Sl as agentRequestAnswerSchema,Cl as agentRoleSchema,wl as agentRolesSetResultSchema,Tl as agentRunSchema,El as agentRunStatusSchema,Dl as agentScheduleOutputSchema,Ol as agentScheduleSchema,kl as agentSessionAudienceSchema,Al as agentSessionDefinitionAppearanceSchema,jl as agentSessionHistoryPageSchema,Ml as agentSessionInferenceOverridesInputSchema,Nl as agentSessionInferenceOverridesSchema,Pl as agentSessionLinkSchema,Fl as agentSessionMessageOutputSchema,Il as agentSessionMessageSchema,Ll as agentSessionSchema,Rl as agentSetupResponseSchema,zl as agentStartersSchema,Bl as agentTodoPlanViewSchema,Vl as agentToolCatalogSchema,Hl as agentTriggerBaseSchema,Ul as agentTriggerDefinitionSchema,Wl as agentTriggerLastCallSchema,Gl as agentTriggerPatchSchema,Kl as agentTriggerSchema,ql as agentUIValidationError,Jl as agentWakeSchema,Yl as agentWakeViewSchema,Xl as apiKeyRoleSchema,Zl as apiKeySchema,Ql as apiKeyWithSecretSchema,applyPipes,$l as architectProjectionSchema,eu as artifactQuoteSchema,t as asTenantId,n as asUserId,tu as askQuestionsOutputSchema,assertBundleName,nu as assertCustomAgentUIMessageChunk,assertSchemaSourceResolutions,ru as assertSessionState,iu as attachedRecordDocumentSchema,Ur as attributeConfigSchemas,yt as attributeFilterTarget,bt as attributeInventory,au as attributeOutputSchema,ou as attributeSaveOutputSchema,su as auditChangeSchema,cu as auditLogEntrySchema,lu as availableBundleSummarySchema,xt as blockObjectInputs,uu as browserProfilePreparationSchema,du as browserProfileViewSchema,buildPropertySchema,St as buildQualifiedAttribute,builtBundleFromPieces,bundle,fu as bundleAddPlanSchema,pu as bundleAddResultSchema,mu as bundleContentsSchema,hu as bundleListSchema,gu as bundleModeSchema,_u as bundleOriginSchema,vu as bundlePieceKindSchema,yu as bundlePlanPieceSchema,bu as bundleRemovalCascadeSchema,xu as bundleRemovalPreviewSchema,Su as bundleRemovalRowSchema,Cu as bundleStatusEntrySchema,wu as bundleStatusSchema,Tu as bundleSyncPreviewSchema,Eu as bundleUpdateDependentSchema,Du as bundleUpdateGroupSchema,Ou as bundleUpdatePieceKindSchema,ku as bundleUpdatePieceSchema,Au as bundleUpdatePlanSchema,ju as bundleUpdateReasonCodeSchema,Mu as bundleUpdateResultSchema,Nu as cancelAgentWakeResultSchema,r as canonicalStringify,Pu as canonicalToolGroups,Ct as canonicalizeFilterValue,Fu as capabilityForResource,wt as capped,checkbox,Iu as classificationRestoreSchema,Lu as classificationUndoSchema,Ru as classifyEmailResultSchema,zu as classifyEmailSchema,Bu as cliDefaultModelOf,Vu as cloudBrowserLiveViewSchema,Tt as collectContentViewCatalogue,Et as collectQualifiedRuleIssues,Dt as collectionContentSourceSchema,Hu as collectionOutputSchema,Uu as collectionPageSchema,Ot as collectionSourceAddress,kt as collectionSourceAddressOf,At as colorIdSchema,jt as columnsSchema,Wu as compareAgentSessionMessages,compareSchemaStateEntries,Gu as compareVersions,Ku as compiledHarnessModels,computeByteMagnitude,qu as computeReconnectDelay,Ju as computeRetryDelay,Yu as connectionCapabilitiesSchema,Xu as connectionGrantKindsOf,Zu as connectionSyncProgressSchema,Qu as connectionViewSchema,$u as connectorProvidersResultSchema,ed as connectorTriggerMatchSchema,k_ as content,contentDefinition,w as contentExtensionRegistry,Mt as contentReadObjects,T as contentViewDefinitionSchema,Nt as contentViewDefinitionSchemaFor,convertRetypedValue,td as createAgentTriggerResultSchema,Wr as createAttributeValidator,Gr as createFormAttributeValidator,createStandardSchemaProps,nd as criticConfigOutputSchema,currency,Pt as currentActor,rd as customDataChunkSchemas,date,Ft as decisionArchiveAllResultSchema,It as decisionAttachmentSchema,Lt as decisionCountsSchema,Rt as decisionHandedBy,zt as decisionLinkSchema,Bt as decisionListResultSchema,Vt as decisionRecipientSchema,Ht as decisionSchema,Ut as decisionSenderSchema,Wt as decisionThreadKey,Gt as decisionTransferBy,Kt as decisionTransferTargetsSchema,qt as decisionTransferTo,Jt as decisionTransfersOf,Yt as decisionWithRecipientSchema,id as declaredImageRequests,ad as decodeAgentSessionListCursor,od as decodeRecordValues,i as deepEqual,sd as defaultEnvironmentSchema,cd as deferredRetypeSchema,Xt as defineBlock,deriveLayout6,ld as deriveViewerAccess,Zt as describeViewIssue,detailView,ud as deviceAudienceSchema,dd as deviceChannelUrl,diffSchemaState,Qt as displayAttributesSchema,document,fd as documentFileSchema,pd as documentRecordOwnerPageSchema,md as documentRecordOwnerSchema,hd as documentSchema,gd as documentWithSubCountSchema,_d as draftAppendOutputSchema,vd as draftCommandGuardSchema,$t as draftContentViewDefinitionSchema,en as draftContentViewDefinitionSchemaFor,yd as driveFileSchema,droppedContents,bd as durableDateSchema,tn as edgePropertyFilterTarget,xd as editAgentSessionMessageResultSchema,Sd as effectivePermissionsSchema,Cd as emailAttachmentMetaSchema,wd as emailCategoryCreateSchema,Td as emailCategoryDeleteSchema,Ed as emailCategorySchema,Dd as emailCategoryScopeQuerySchema,Od as emailCategoryUpdateSchema,kd as emailCategoryUsageSchema,Ad as emailParticipantRefSchema,jd as emailRuleScopeSchema,Md as emailSenderRuleSchema,Nd as emailVerdictSchema,Pd as encodeAgentSessionListCursor,Fd as encodeRecordValues,Id as envVarEntrySchema,Ld as environmentBuildFailureSchema,Rd as environmentBuildStateSchema,zd as environmentDetailSchema,Bd as environmentHarness,Vd as environmentHarnessSchema,Hd as environmentListSchema,Ud as environmentNetworkPolicyOutputSchema,Wd as environmentRepositorySourceSchema,Gd as environmentSchema,Kd as environmentWorkdir,extractAttributeNames,extractAttributePaths,nn as extractCurrencyFilterValue,rn as extractFilterValue,extractReadRecordIds,extractTouchedArtifacts,extractTouchedDocuments,extractTouchedRecords,qd as fileSchema,Jd as fileUrlsResponseSchema,an as filterOperatorsOfType,on as filterStateSchema,sn as filterTargetsOf,Yd as findEnvironmentHarness,Xd as findGrantIssues,cn as findGridViolation,ln as findGroupViolation,un as findLayoutRuleViolation,dn as findRelationAttribute,fn as findRowLimitViolation,foldText,form,Zd as formDefinitionSchema,formFieldFlatKey,formFieldKey,Qd as formSlotSchema,$d as formStepSchema,ef as formSubmissionSchema,formatByteSize,pn as formatDecisionLink,tf as formatNewsTarget,Jr as formatPhoneForDisplay,nf as formatReference,formatSkillSource,Yr as formatZodErrors,formula,a as generateId,mn as getAttributeCapabilities,Xr as getAttributeConfigSchema,Zr as getAttributeConfigWriteSchema,hn as getAttributeFilterOperators,getEditableLabelAttribute,gn as getHierarchyAttributes,_n as getObjectSystemAttributes,vn as getOperatorPolarity,yn as getRollupFilterOperators,getSingleAttributeFromExpression,getSlotFieldTargets,bn as getSystemAttributeI18nKey,xn as getSystemAttributeList,rf as githubConditionSchema,af as githubTriggerMatchSchema,of as grantKindOf,Sn as gridPositionSchema,group,Cn as groupSizeMessage,wn as groupedMembers,sf as harnessModelChoices,cf as harnessModelListSchema,lf as harnessModelOptionSchema,uf as hasLocale,hasOptions,Tn as hasTypeTrait,En as hasValueKind,hashBundlePieces,df as humanRequestId,ff as humanRequestKind,E as iconNameSchema,imageLookupKindOf,pf as imageModelFormatDefect,mf as imageModelIdSchema,o as indexBy,Dn as inferInverseCardinality,hf as inferenceReasoningSchema,gf as inferenceRoutingSchema,_f as inferenceSpeedSchema,On as input,vf as installedBundleSummarySchema,kn as invalidViewMessage,An as isActionableDecisionKind,yf as isAgentMessageMetadata,bf as isAgentNotificationMetadata,xf as isAgentUIDataName,Sf as isAgentWakeMetadata,Cf as isAgentWrittenAuditEntry,wf as isArchitectPublicationMetadata,jn as isAttributeFilterable,Mn as isAttributeGroupable,Lg as isAttributeInUseError,Nn as isAttributeKanbanGroupable,Pn as isAttributeSearchable,Fn as isAttributeSortable,Tf as isAwaitingHuman,In as isBilateralRelation,Ef as isBlocking,Ln as isBoardGrouping,isBundle,Rn as isCalendarDay,Df as isCatalogResource,zn as isCollectionContent,Bn as isDynamicValue,$r as isEmptyValue,Of as isEnvironmentBuildLogStep,kf as isEnvironmentHarnessId,Af as isFormDefinition,isFormFieldsRow,isFormFreeFieldRef,isFormHeadingRow,isFormSeparatorRow,isFormSlotFieldRef,isFormTextRow,Vn as isHierarchyAttribute,jf as isImageSource,isLabelExpression,Hn as isLocationFilterProperty,Un as isLocationPartOperator,Mf as isMailProvider,Nf as isMailboxListMode,Wn as isManagedSystemAttribute,isMeteredChargeKind,D as isNativeObjectName,Pf as isNativeToolGroup,Gn as isNoValueOperator,Rg as isNotFoundError,ei as isNullishOrEmptyString,zg as isObjectReferencedError,Ff as isOpenToolPartState,If as isParkedOnHuman,isPinnedSkillSource,Kn as isPlainRecord,Bg as isProtectedResourceError,Lf as isProviderDraft,Rf as isPublicMailDomain,zf as isQuestionPart,Vg as isRecordReferencedError,qn as isRelativeDateValue,Bf as isReplyMode,Vf as isResourceGrant,Hf as isRoutineActorMetadata,Hg as isSchemaError,Uf as isSemver,Wf as isSessionInferencePatch,Jn as isSetMembershipOperator,isSkillRepository,isStandardSchema,Gf as isSystemEmailCategory,Kf as isSystemEmailCategoryName,qf as isSystemPartCode,Jf as isToolApprovalState,Yf as isToolImpactCountKey,Yn as isUniversalRelation,Ug as isValidationError,O as isValueKindType,ti as isValuePresent,isWherePipe,Xf as isWildcard,judgePreferenceWrite,keptFill,H as labelExpressionSchema,Zf as lastPublicationSchema,Qf as lastPublishErrorSchema,Xn as layoutTraitsOf,$f as levelActions,ep as levelFloor,tp as levelOf,np as linkedRecordRefSchema,listView,locatePreference,location,Zn as locationPartFilterTarget,rp as lockingSendCall,ip as loginSecretEntrySchema,ap as mailDraftAttachmentSchema,op as mailDraftSchema,sp as mailSignatureSchema,cp as mailboxAccountSchema,lp as mailboxCursorSchema,up as mailboxEmailSchema,dp as mailboxListResponseSchema,fp as mailboxSenderImageSchema,pp as mailboxThreadDetailSchema,mp as mailboxThreadSchema,hp as matchesRepositoryPattern,gp as mcpCatalogCategorySchema,_p as mcpCatalogEntrySchema,vp as mcpOAuthAttemptStartedSchema,yp as mcpOAuthSetupSchema,bp as mcpServerAuthTypeSchema,xp as mcpServerStatusSchema,Sp as mcpServerViewSchema,Cp as meetingBotDispatchRequestSchema,wp as meetingBotDispatchResponseSchema,Tp as meetingBotNotificationSchema,Ep as meetingLinkedRecordSchema,Dp as meetingParticipantRefSchema,Op as meetingRecordingSchema,kp as meetingSchema,Ap as meetingSiblingRefSchema,jp as meetingTranscriptProvenanceSchema,Mp as meetingTranscriptResponseSchema,Np as meetingTranscriptSegmentSchema,Pp as meetingTranscriptSourceRefSchema,Fp as meetingsListResponseSchema,Ip as memberSchema,k as memberlessGroups,memoryPageViewOf,Lp as mentionReferenceSchema,Rp as mergeSessionInferencePatch,meteredUsd,Qn as metricComparePeriod,zp as modelDefinitionOutputSchema,Bp as modelDefinitionSchema,U_ as modelIdentitySchema,Vp as modelReferenceOutputSchema,Hp as modelReferenceSchema,moveWidensAudience,multiselect,Up as mutationReceiptSchema,Wp as myPreferencesSchema,nameSlug,P_ as namedTargetSchema,nativeAgentUIPartIdMetadataKey,Gp as needsManageWhenUnattended,Kp as newsBodySchema,qp as newsIndexSchema,ni as normalizeCountrylessPhoneNumber,$n as normalizeFilterRule,er as normalizeForEdgeRpc,Jp as normalizeNewsLocale,tr as normalizeOperator,ri as normalizePhoneNumber,Yp as normalizedMeetingTranscriptSchema,nr as now,number,Xp as oauthAttemptStartedSchema,object,Zp as objectDefinitionOutputSchema,D_ as objectImageSchema,Qp as objectRecordOutputSchema,$p as openRequests,em as orderAgentSessionMessages,packLayout,page,tm as pageAudienceSchema,pageCompactor,nm as pageReadSchema,rm as pageSummarySchema,ir as pageTraitsOf,im as parseAgentDefinitionAccessRole,am as parseAgentSessionAccessRole,ii as parseAttributeConfig,ai as parseAttributeConfigForCreate,oi as parseAttributeConfigForUpdate,A as parseBlockParameters,om as parseCountMode,ar as parseDecisionLink,sm as parseDeviceAccessRole,cm as parseDeviceChannelFrame,lm as parseMergedAgentTrigger,parseNamedTarget,parseNativeAgentUIPartIdsMetadata,um as parseNewsBody,dm as parseNewsIndex,fm as parseNewsIntensity,pm as parseNewsTarget,mm as parseOptionalCountMode,hm as parsePageAccessRole,or as parseQualifiedAttribute,gm as parseRecordAccessRole,sr as parseRecordListScope,_m as parseReference,cr as parseResourceVisibility,parseSchemaGroupPresentation,parseSchemaOwner,parseSchemaState,vm as parseServerFrame,parseSkillSource,ym as parseToolGroupGrant,parseWherePipe,bm as parseWorkerFrame,xm as permissionFlagsSchema,Sm as permissionGrantSchema,Cm as permissionSchema,phone,placeNew,preference,wm as preferenceEntry,Tm as preferenceEntrySchema,si as propertyAttributeSchema,ci as propertyAttributeWireSchema,li as propertySchemaSchema,ui as propertySchemaWireSchema,Em as providerNameSchema,Dm as publishBlockerSchema,Om as publishDraftOutputSchema,j as publishedViewContentDefinitionSchema,lr as query,km as quotaStateSchema,Am as readArchitectPublication,readArtifactResult,jm as readAskQuestionsResult,readFormFieldValue,readGeneratedImageResult,Mm as readRunOriginMetadata,Nm as recentActivityEntryKey,Pm as recipientContactSchema,Fm as recipientIdentitySchema,Im as recipientSuggestionSchema,Lm as recordAggregatesSchema,Rm as recordAudienceSchema,zm as recordCollectionOutputSchema,Bm as recordDeletionCountSchema,Vm as recordDriveChildSchema,Hm as recordDriveChildrenPageSchema,Um as recordDriveSearchHitSchema,Wm as recordDriveSearchResultSchema,Gm as recordGraphEdgeSchema,Km as recordGraphNodeKey,qm as recordGraphNodeSchema,Jm as recordGraphRequestSchema,Ym as recordGraphResponseSchema,Xm as recordIncomingReferenceSchema,Zm as recordIncomingReferencesPageSchema,recordLinksTab,Qm as recordMeetingsCount,$m as recordOperationSchema,eh as recordPurgeResultSchema,ur as recordQueryDefinitionSchema,th as recordValuesCodec,nh as recordsBulkCreateResultSchema,rh as recordsBulkDeleteResultSchema,ih as recordsBulkUpdateResultSchema,ah as refineTrigger,di as refuseForeignKeys,fi as rejectUnknownAttributesOrThrow,relation,dr as relationAcceptsObject,oh as relationOptionSchema,sh as relationOptionsResponseSchema,relationProperty,fr as relationTargetsOf,renderLabelExpression,repairPageGrid,ch as replyDefaultsSchema,lh as requestedCapabilities,mr as requireRecordContentContext,hr as requireSingleRelationTarget,uh as resolveAppearance,gr as resolveCollectionActions,_r as resolveContentNavigation,vr as resolveEffectiveFilterType,resolveFieldRequired,yr as resolveIsWithinBounds,dh as resolveLocalized,resolvePageGrid,resolvePropertyDefinitions,pi as resolveTextPattern,br as resolveUtcDayBounds,resolveViewContents,fh as resolvedRelationsBatchSchema,ph as resourceGrant,mh as resourceUsedBySchema,hh as retryPolicyOutputSchema,gh as retypeOptionsOutputSchema,richtext,_h as roleSchema,rollup,vh as routedMessageInferenceSchema,yh as routineAudiencePreviewSchema,bh as routineAudienceSchema,xh as sameActions,s as sameStableValue,Sh as schemaDraftOutputSchema,schemaGroupKey,Ch as schemaGroupListSchema,wh as schemaGroupSchema,Eh as schemaStateEntrySchema,Dh as schemaStateSchema,schemaStateSourcePayload,Oh as secretEntrySchema,select,mi as selectOptionWriteSchema,c as serializeCanonicalJson,l as serializeStableJson,kh as servedAsIsAttributeSchema,Ah as sessionImageUsageSchema,jh as sessionInferenceOverridesOutputSchema,Mh as sessionInferencePatchSchema,Nh as sessionStateSchema,Ph as setAgentSessionWorkPostureResultSchema,settleLayout,sha256Hex,xr as singleRelationTarget,Fh as slackConditionSchema,Ih as slackTriggerMatchSchema,snapWidth,Sr as sortsSchema,Cr as sourcedAttributeOf,status,hi as statusGroupSchema,gi as statusOptionWriteSchema,storedContentDefinition,Lh as submitOutcomeSchema,Rh as syncBundleResultSchema,wr as systemColumnFilterTarget,zh as tenantInvitationSchema,Bh as tenantSettingsResponseSchema,Vh as tenantSettingsSchema,text,Tr as toMultiValueOperator,Er as toUtcDayString,Dr as today,Hh as todoItemSchema,Uh as todoPlanSchema,Wh as toolImpactSchema,Gh as triageResultSchema,unaccent,user,Kh as userProfileSchema,qh as utf8ByteLength,_i as validateAttribute,Or as validateAttributeName,kr as validateContentViewCatalogue,vi as validateDraft,yi as validateDraftOrThrow,validateLabelExpression,bi as validateObject,validateObjectExpressions,validateObjectImage,Mr as validateObjectName,xi as validateObjectOrThrow,Pr as validateQualifiedRule,Fr as validateStoredViews,Ir as validateViewName,Jh as viewPreferenceAddressSchema,Yh as viewReadSchema,Xh as viewerAccessSchema,widthStepConstraint,Si as wireHiddenTypeConfigMask,Ci as wireOmittedConfigKeysFor,Zh as withPreferenceEntry,Qh as withoutTrailingSlashes,wi as withoutUnknownOptionKeys,workspaceViewAuthoring};
1654
+ `)){if(t===``)continue;let n=String.fromCodePoint(t.codePointAt(0)??0);e.set(n,t.slice(n.length))}return s_=e,e}function unaccent(e){let t=unaccentRules(),n=``;for(let r of e)n+=t.get(r)??r;return n}function foldText(e){return unaccent(e).toLowerCase()}const c_={phone:`text`,currency:`number`},l_={rename:[`kind`,`object`,`from`,`to`],phone:[`kind`,`object`,`attribute`,`to`,`defaultCountryCode`],currency:[`kind`,`object`,`attribute`,`to`,`currencyCode`]};function refuse(e,t,n){throw new S(n,[{path:t===void 0?[`resolutions`,String(e)]:[`resolutions`,String(e),t],message:n}])}function assertKeys(e,t,n){for(let r of n)(typeof t[r]!=`string`||t[r]===``)&&refuse(e,r,`Resolution ${e} needs a non-empty string \`${r}\``);let r=Object.keys(t).find(e=>!n.includes(e));r!==void 0&&refuse(e,r,`Resolution ${e} has an unknown field \`${r}\``)}function assertResolution(e,t){if(u(t)||refuse(e,void 0,`Resolution ${e} must be an object`),t.kind===`rename`){assertKeys(e,t,l_.rename),t.from===t.to&&refuse(e,`to`,`Resolution ${e} renames "${t.from}" to itself`);return}if(t.kind!==`retype`&&refuse(e,`kind`,`Unknown resolution kind ${JSON.stringify(t.kind)}: expected "rename" or "retype"`),t.to!==`phone`&&t.to!==`currency`&&refuse(e,`to`,`Unsupported retype to ${JSON.stringify(t.to)}: a push converts text → phone and number → currency only`),assertKeys(e,t,l_[t.to]),t.to===`phone`){let n=t.defaultCountryCode;/^[A-Z]{3}$/.test(n)&&eg(n)||refuse(e,`defaultCountryCode`,`Resolution ${e}: "${n}" is not an ISO 3166-1 alpha-3 country code`);return}let n=t.currencyCode;/^[A-Z]{3}$/.test(n)&&$h(n)||refuse(e,`currencyCode`,`Resolution ${e}: "${n}" is not a supported ISO 4217 currency code`)}function addressesOf(e){return e.kind===`rename`?{reads:e.from,lands:e.to}:{reads:e.attribute,lands:e.attribute}}function assertSchemaSourceResolutions(e){if(!Array.isArray(e))throw new S("`resolutions` must be an array",[{path:[`resolutions`],message:"`resolutions` must be an array"}]);if(e.length>100)throw new S(`A push carries ${e.length} resolutions; the limit is 100`,[]);let t=/* @__PURE__ */ new Set;for(let[n,r]of e.entries()){assertResolution(n,r);let{reads:e,lands:i}=addressesOf(r);for(let[a,o]of[[`${r.kind}:${r.object}.${e}`,`of "${r.object}.${e}"`],[`${r.kind}>${r.object}.${i}`,`onto "${r.object}.${i}"`]])t.has(a)&&refuse(n,void 0,`Resolution ${n} repeats a ${r.kind} ${o}`),t.add(a)}}function phoneFromText(e,t){let n=e.trim();if(n===``)return{value:null};let r=tg(n,Se(t));if(!r?.isPossible()||r.country===void 0||r.ext!==void 0)return;let i=Qh(r.country)?.iso3;if(i!==void 0)return{value:{countryCode:i,phoneNumber:De(n,i)}}}function convertRetypedValue(e,t,n={}){if(t===null)return{value:null};if(e.to===`phone`)return typeof t==`string`?phoneFromText(t,e.defaultCountryCode):void 0;if(typeof t==`number`&&Math.abs(t)<=2**53-1&&!(t<0&&n.allowNegative!==!0))return{value:{code:e.currencyCode,value:t}}}const $=D.string().refine(e=>e.trim().length>0,`Must not be blank`),u_=nc($),d_=D.object({label:$,pluralLabel:D.string().optional(),description:D.string().optional(),icon:Bs.optional(),color:zs.optional(),image:i_.optional(),labelExpression:D.string(),embeddingExpression:D.string().optional(),sealed:D.boolean().optional(),toleratedAttributes:D.array($).optional(),metadata:D.record(D.string(),D.unknown()).optional(),documentLayout:D.record(D.string(),D.unknown()).optional(),hierarchical:D.boolean().optional(),defaultDriveSort:D.enum(xs).optional()}).strict();function failure(e){throw new S(e,[])}function definitionSchema(e){return D.custom(t=>{let n=D.record(D.string(),D.unknown()).parse(t);for(let t of e[0]===`view`?[`object`,`name`]:[`name`])Object.hasOwn(n,t)&&failure(`Invalid schema state: unrecognized definition key ${t}`);switch(e[0]){case`object`:d_.parse(n);break;case`attribute`:{let e=D.enum(Bt).parse(n.type);xe(e).extend({type:D.literal(e),label:$,required:D.boolean().optional(),unique:D.boolean().optional(),icon:Bs.optional()}).strict().parse(n);break}case`view`:{let{contents:t,...r}=n,i=D.array($).parse(t);new Set(i).size!==i.length&&failure(`Invalid schema state: duplicate content membership`),ut.parse({...r,object:e[1],name:e[2],contents:[]});break}case`content`:_.parse({...n,name:e[3]})}return!0})}function compareSchemaStateEntries(e,t){let n=JSON.stringify(e.address),r=JSON.stringify(t.address);return n<r?-1:+(n>r)}function schemaStateSourcePayload(e){return{modelVersion:1,hashVersion:1,entries:[...e].sort(compareSchemaStateEntries).filter(e=>e.source!==null).map(({address:e,source:t})=>({address:e,source:t}))}}function parseState(e){let t=D.record(D.string(),D.unknown()).parse(e);for(let[e,n]of[[`modelVersion`,`model`],[`hashVersion`,`hash`]])t[e]!==1&&failure(`Unsupported schema ${n} version: expected 1, received ${t[e]===void 0?`missing`:String(t[e])}`);let n=D.object({modelVersion:D.literal(1),hashVersion:D.literal(1),tenant:$,sourceFingerprint:D.string().regex(/^[a-f0-9]{64}$/),entries:D.array(D.unknown())}).strict().safeParse(e);if(!n.success){let e=n.error.issues.find(e=>e.code===`unrecognized_keys`);throw e?.code===`unrecognized_keys`&&failure(`Invalid schema state: unrecognized key ${e.keys[0]}`),S.fromZodErrors(n.error.issues.map(e=>({path:e.path.map(String),message:e.message})))}let r=/* @__PURE__ */ new Set,i=n.data.entries.map(e=>{let t=u_.parse(D.object({address:D.unknown()}).parse(e).address),n=JSON.stringify(t);r.has(n)&&failure(`Invalid schema state: duplicate address ${n}`),r.add(n);let i=definitionSchema(t).nullable(),a=t[0]===`object`||t[0]===`attribute`?D.object({id:D.string().uuid(),updatedAt:D.string().datetime()}).strict():D.object({id:D.string().uuid(),revision:D.number().int().nonnegative()}).strict(),o=D.object({address:u_,source:i,effective:i,status:D.enum([`source`,`runtime`,`copy`,`suppressed`]),sourceOwner:D.string().regex(k).nullable(),guard:a.nullable()}).strict().parse(e);return(o.status===`runtime`&&(o.source!==null||o.effective===null||o.sourceOwner!==null)||o.status===`suppressed`&&(t[0]!==`content`||o.source===null||o.effective!==null||o.guard===null)||o.status===`copy`&&(o.source===null||o.effective===null)||o.effective!==null&&o.guard===null||o.source===null&&o.effective===null)&&failure(`Invalid schema state: inconsistent status at ${n}`),{...o,sourceOwner:parseSchemaOwner(o.sourceOwner)}});return{...n.data,entries:i.sort(compareSchemaStateEntries)}}function parseSchemaState(e){try{return parseState(e)}catch(e){throw e instanceof D.ZodError?S.fromZodErrors(e.issues.map(e=>({path:e.path.map(String),message:e.message}))):e}}function diffSchemaState(e){let t=[];for(let n of[...e.entries].sort(compareSchemaStateEntries)){let e=n.source===null?`added`:n.status===`suppressed`?`suppressed`:n.effective===null?`removed`:r(n.source)===r(n.effective)?n.status===`copy`?`copied`:null:`changed`;e&&t.push({...n,change:e})}return{modelVersion:1,tenant:e.tenant,sourceFingerprint:e.sourceFingerprint,changes:t}}const f_=100,p_=D.object({mode:D.enum([`inline`,`window`]),interaction:D.enum([`static`,`interactive`]),size:D.enum([`compact`,`regular`]),aspectRatio:D.number().positive().finite().optional()}).strict(),m_=D.object({artifactId:D.string().min(1),revision:D.number().int().positive(),name:D.string().min(1),kind:D.string().min(1),retention:D.enum(og),display:p_}).strict();function readArtifactResult(e){let t=m_.safeParse(e);return t.success?t.data:null}const h_=D.string().regex(/^[^/\s]+\/[^/\s]+$/),g_=D.object({kind:D.literal(`generated-image`),artifact:D.unknown(),generation:D.object({attemptId:D.uuid(),requestedModelId:h_,executedModelId:h_.nullable(),format:D.enum(Pl),mimeType:D.enum([`image/png`,`image/jpeg`,`image/webp`])}).strict()}).strict();function readGeneratedImageResult(e){let t=g_.safeParse(e);if(!t.success)return null;let n=readArtifactResult(t.data.artifact);return!n||n.kind!==`image`?null:{...t.data,artifact:{...n,kind:`image`}}}function isCompletedToolPart(e){return e.type===`tool`&&e.state===`completed`}function readString(e,t){let n=e[t];return typeof n==`string`?n:void 0}function upsertWithPrecedence(e,t,n,r){let i=e.get(t),a=i&&r[i.kind]>r[n.kind]?i:n;e.delete(t),e.set(t,a)}function asRecord(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function readRefId(e,t,n){let r=readString(e,t),i=`${n}:`;return r?.startsWith(i)&&r.length>i.length?r.slice(i.length):void 0}function verbResultEntries(e){let t=asRecord(e);if(!t)return[];let n=[t];for(let e of[`members`,`created`,`updated`]){let r=t[e];if(Array.isArray(r))for(let e of r){let t=asRecord(e);t&&n.push(t)}}return n.filter(e=>!(`error`in e))}function extractReadRecordIds(e){let t=/* @__PURE__ */ new Set;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.name!==`read`)continue;let n=e.args.refs;if(Array.isArray(n))for(let e of n){if(typeof e!=`string`)continue;let n=Wi(e);n.ok&&n.ref.kind===`record`&&t.add(n.ref.id)}}return[...t]}const __={created:1,modified:0};function readSingleRecordEntry(e){if(typeof e!=`object`||!e)return null;let t=e,n=typeof t.record==`object`&&t.record!==null?t.record:void 0,r=(n&&readString(n,`id`))??readString(t,`recordId`);return r?{id:r,label:(n&&readString(n,`label`))??r,objectName:(n&&readString(n,`objectName`))??``}:null}function readBulkRecordEntries(e,t,n){if(typeof e!=`object`||!e)return[];let r=e[t];if(!Array.isArray(r))return[];let i=[];for(let e of r){if(typeof e!=`object`||!e)continue;let t=e,r=readString(t,`id`);r&&i.push({id:r,label:readString(t,`label`)??r,objectName:readString(t,`objectName`)??n})}return i}function readVerbRecordEntries(e){let t=asRecord(asRecord(e.result)?.record),n=readString(e.args,`object`)??(t&&readString(t,`objectName`))??``,r=[];for(let t of verbResultEntries(e.result)){let e=readRefId(t,`ref`,`record`);e&&r.push({id:e,label:readString(t,`title`)||readString(t,`label`)||e,objectName:readString(t,`objectName`)??n})}return r}function extractTouchedRecords(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e))continue;let n=[],r;if(e.name===`create_record`||e.name===`update_record`||e.name===`edit_content`){let t=readSingleRecordEntry(e.result);n=t?[t]:[],r=e.name===`create_record`?`created`:`modified`}else if(e.name===`bulk_create_records`||e.name===`bulk_update_records`){let t=readString(e.args,`objectId`)??``,i=e.name===`bulk_create_records`?`created`:`updated`;n=readBulkRecordEntries(e.result,i,t),r=e.name===`bulk_create_records`?`created`:`modified`}else if(e.name===`write`)n=readVerbRecordEntries(e),r=readString(e.args,`action`)===`create`?`created`:`modified`;else continue;for(let e of n){let n={recordId:e.id,objectName:e.objectName,label:e.label,kind:r};upsertWithPrecedence(t,e.id,n,__)}}return[...t.values()]}const v_={modified:1,consulted:0};function isFilePart(e){return e.type===`file`}function entryFromDocumentMutation(e,t){if(typeof e.result!=`object`||e.result===null)return null;let n=e.result,r=readString(n,`documentId`)??(t===`folderId`?readString(n,t):void 0);return r?{id:r,title:readString(e.args,`name`)??readString(e.args,`title`)??r,kind:`modified`}:null}function entryFromReadDocument(e){let t=readString(e.args,`documentId`);return t?{id:t,title:t,kind:`consulted`}:null}function entryFromRef(e,t,n){let r=readRefId(e,`ref`,`file`),i=r??readRefId(e,`ref`,`document`);return i?{id:i,...r?{fileId:r}:{},title:n||readString(e,`title`)||i,kind:t,mimeType:readString(e,`mimeType`)}:null}function entriesFromOrganize(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=readString(e.args,`action`),r=readString(e.args,`name`)??readString(e.args,`title`),i=readString(t,`documentId`);if(i)return[{id:i,title:r??i,kind:`modified`}];let a=readString(t,`folderId`);if(a)return n===`create_folder`?[{id:a,title:r??a,kind:`modified`}]:[];let o=entryFromRef(t,`modified`,r);return o?[o]:[]}function entriesFromCopy(e){let t=asRecord(e.result);if(!t||`error`in t)return[];let n=(Array.isArray(t.copied)?t.copied:[]).flatMap(e=>{let t=asRecord(e),n=t?entryFromRef(t,`modified`,void 0):null;return n?[n]:[]});if(n.length>0)return n;let r=entryFromRef(t,t.ref!==void 0&&t.ref===readString(e.args,`from`)?`consulted`:`modified`,void 0);return r?[r]:[]}function entriesFromRead(e){let t=asRecord(e.result);return(Array.isArray(t?.members)?t.members:[]).flatMap(e=>{let t=asRecord(e);if(!t||`error`in t||!readRefId(t,`ref`,`document`))return[];let n=entryFromRef(t,`consulted`,void 0);return n?[n]:[]})}function entriesFromToolPart(e){switch(e.name){case`organize`:return entriesFromOrganize(e);case`copy`:return entriesFromCopy(e);case`read`:return entriesFromRead(e);default:{let t=entryFromToolPart(e);return t?[t]:[]}}}function entryFromSandboxUpload(e){if(typeof e.result!=`object`||e.result===null)return null;let t=e.result,n=readString(t,`fileId`);return n?{id:n,fileId:n,title:readString(t,`title`)??n,kind:`modified`,mimeType:readString(t,`mimeType`)}:null}function entryFromToolPart(e){switch(e.name){case`update_document`:case`attach_file`:return entryFromDocumentMutation(e,`documentId`);case`create_folder`:return entryFromDocumentMutation(e,`folderId`);case`read_document`:return entryFromReadDocument(e);case`sandbox_upload_file`:return entryFromSandboxUpload(e);default:return null}}function extractTouchedDocuments(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`){for(let e of n.parts)if(isCompletedToolPart(e))for(let n of entriesFromToolPart(e))upsertWithPrecedence(t,n.id,n,v_);else if(isFilePart(e)&&e.fileId){let n={id:e.fileId,fileId:e.fileId,title:e.name||e.fileId,kind:`modified`,mimeType:e.mimeType};upsertWithPrecedence(t,n.id,n,v_)}}return[...t.values()]}function extractTouchedArtifacts(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.role===`assistant`)for(let e of n.parts){if(!isCompletedToolPart(e)||e.error)continue;let n=e.name===`generate_image`?readGeneratedImageResult(e.result)?.artifact:e.name===`publish_artifact`?readArtifactResult(e.result):null;if(!n)continue;let r=`${n.artifactId}:${n.revision}`;t.delete(r),t.set(r,n)}return[...t.values()]}function isNonBlankString(e){return typeof e==`string`&&/\S/u.test(e)}const y_=D.object({provider:D.custom(e=>isNonBlankString(e)&&e.length<=200,{message:`must be a non-blank string of at most 200 characters`}),model:D.string().max(200).regex(/\S/u)});function preference(e,t){return{key:e,value:t.value,default:t.default,audited:t.audited??!1,...t.parameter===void 0?{}:{parameter:t.parameter},...t.parameters===void 0?{}:{parameters:t.parameters},...t.refine===void 0?{}:{refine:t.refine}}}const b_=``;function refusal(e,t){return{ok:!1,field:e,message:t,issues:[{path:[e],message:t}]}}function declarationOf(e,t){return`get`in e?e.get(t):e.find(e=>e.key===t)}function locatePreference(e,t,n){let r=declarationOf(e,t);return r?r.parameter===void 0?n===void 0?{ok:!0,declaration:r,parameter:``}:refusal(`parameter`,`Preference "${t}" takes no parameter`):n===void 0||n===``||n.trim()!==n?refusal(`parameter`,`Preference "${t}" is keyed by ${r.parameter}`):r.parameters&&!r.parameters.includes(n)?refusal(`parameter`,`"${n}" is not a ${r.parameter} of "${t}"`):{ok:!0,declaration:r,parameter:n}:refusal(`key`,`Unknown preference "${t}"`)}function judgePreferenceWrite(e,t,n,r){let i=locatePreference(e,t,n);if(!i.ok)return i;let a=i.declaration.value.safeParse(r);if(a.success){let e=i.declaration.refine?.(a.data,i.parameter);return e===void 0?{...i,value:a.data}:refusal(`value`,e)}return{ok:!1,field:`value`,message:`Invalid value for preference "${t}"`,issues:a.error.issues.map(e=>({path:[`value`,...e.path.map(String)],message:e.message}))}}const x_=D.strictObject({model:y_.optional(),routing:D.literal(`auto`).optional()}),S_=D.strictObject({inApp:D.boolean()});function isActionableType(e){let t=E[e];return t!==void 0&&bh(t.kind)}const C_=[preference(`workPosture`,{value:D.preprocess(e=>e===`architect`?`auto`:e,D.enum(Th)),default:`auto`,audited:!0}),preference(`chat.default`,{value:x_,default:{},audited:!0}),preference(`conversationSurface`,{value:D.enum(Sh),default:`panel`}),preference(`mailboxListMode`,{value:D.enum(Vc),default:`threads`}),preference(`mailboxReaderLayout`,{value:D.enum(Hc),default:`panel`}),preference(`home`,{value:D.string().uuid().nullable(),default:null}),preference(`memory.learnFromEmail`,{value:D.boolean(),default:!0,audited:!0}),preference(`memory.shareWithTeam`,{value:D.boolean(),default:!0,audited:!0}),preference(`onboarding.completed`,{value:D.boolean(),default:!1,audited:!1}),preference(`decisions.seenAt`,{value:D.iso.datetime().nullable(),default:null}),preference(`decisions.delivery`,{value:S_,default:{inApp:!0},parameter:`decision type`,parameters:Object.keys(E),refine:(e,t)=>!e.inApp&&isActionableType(t)?`A "${t}" decision asks you to act: it is always shown in-app`:void 0})];export{wa as ACCESS_CAPABILITIES,Ta as ACCESS_LEVELS,Nd as ACCESS_ROLES,Am as ACTIONABLE_DECISION_KINDS,Je as ACTOR_TYPES,eu as AGENT_ASIDE_ANSWER_MAX_LENGTH,tu as AGENT_ASIDE_HISTORY_LIMIT,nu as AGENT_ASIDE_QUESTION_MAX_LENGTH,ru as AGENT_AVATAR_EXPRESSIONS,iu as AGENT_AVATAR_TYPES,au as AGENT_MESSAGE_KIND,ou as AGENT_MESSAGE_SENDER_NAME_KEY,su as AGENT_NOTIFICATION_KIND,Pd as AGENT_SESSION_ACCESS_ROLES,cu as AGENT_SESSION_LIST_ORDERS,Pr as AGENT_SESSION_ORIGINS,lu as AGENT_SESSION_PROVENANCES,uu as AGENT_STARTERS_MAX,du as AGENT_STARTER_MAX_LENGTH,fu as AGENT_SYSTEM_PROMPT_MAX_LENGTH,pu as AGENT_TASK_KINDS,mu as AGENT_WAKE_KIND,hp as AGGREGATE_BUCKETS,gp as AGGREGATE_MEASURES,hu as AI_MODEL_INPUT_MODALITIES,gu as AI_MODEL_PROFILE_LABELS,_u as AI_MODEL_REASONING_MODES,lg as ALLOWED_PROPERTY_TYPES,Ho as ALL_CATALOG_TOOL_NAMES,A as ALL_PIPES,Uo as ALWAYS_KINDS,va as APPEARANCE_FACETS,om as APPROVAL_FAMILY_TOOL_NAMES,vu as ARCHITECT_PUBLICATION_KIND,sg as ARTIFACT_FILE_ROLES,ag as ARTIFACT_KINDS,zg as ARTIFACT_PREVIEW_EXTENSION,og as ARTIFACT_RETENTIONS,sm as ASK_QUESTIONS_ANSWER_MAX_LENGTH,cm as ASK_QUESTIONS_ANSWER_MAX_VALUES,lm as ASK_QUESTIONS_FILE_REF,um as ASK_QUESTIONS_MAX_ADDED_FILES,dm as ASK_QUESTIONS_MAX_BATCH,fm as ASK_QUESTIONS_TOOL_NAME,ys as ATTACH_FILE_ACTIONS,zt as ATTRIBUTE_FILTER_OPERATORS,yc as ATTRIBUTE_NAME_SCHEMA,Bt as ATTRIBUTE_TYPES,Vt as ATTRIBUTE_TYPE_DESCRIPTORS,Fo as AUDIT_ACTIONS,Io as AUDIT_AGENT_SESSION_METADATA_KEY,Lo as AUDIT_RESOURCE_TYPES,mn as AccessDeniedError,T as AgentBuilder,hn as AggregateValidationError,gn as AmbiguousSchemaChangeError,_n as AttributeInUseError,vn as AttributeNotFoundError,Da as BILLING_MODES,B as BLOCK_CONTEXTS,Vg as BLOCK_COUNTS,Ng as BLOCK_INPUT_SECTIONS,L as BLOCK_PERIODS,Fr as BROWSER_LAUNCH_TOOL_NAME,Wo as BROWSER_TOOL_NAMES,$d as BUNDLE_LOCALES,F as BUNDLE_NAME_PATTERN,ef as BUNDLE_SETUP_PROMPT_MAX_LENGTH,cg as BYTE_UNIT_LABELS,BlockContentBuilder,BundleBuilder,d as CATALOG_RESOURCES,W as CHART_BLOCK,Wg as CHART_KINDS,Gg as CHART_ORDERS,la as CHAT_PROVIDERS,ue as COMPUTED_RETURN_TYPES,Go as CONNECTION_GRANT_PROVIDERS,ua as CONNECTION_STATUS_IDS,da as CONNECTOR_PROVIDER_IDS,fa as CONNECTOR_SCOPES,Pg as CONTENT_PLACEMENT_CONTEXTS,Ir as CONTINUATION_KEY_PATTERN,Sh as CONVERSATION_SURFACES,Ko as COPY_VERB_NAME,I as CORE_BUNDLE_NAME,C_ as CORE_PREFERENCES,qo as CORE_RECORD_TOOL_NAMES,Jo as CORE_TOOL_NAMES,Va as COUNT_MODES,f as CUSTOM_LEVEL,ChartBuilder,ChartQuery,yn as ConcurrentModificationError,Q as ContentBuilder,K as DECISIONS_BLOCK,jm as DECISION_INBOX_STATES,Mm as DECISION_KINDS,Nm as DECISION_LINE_MAX_LENGTH,Pm as DECISION_LINK_TARGET_TYPES,Fm as DECISION_LIST_STATES,Jg as DECISION_PILES,Im as DECISION_READ_STATES,Lm as DECISION_SENDER_KINDS,Rm as DECISION_SETTINGS_AREAS,zm as DECISION_TITLE_MAX_LENGTH,Bm as DECISION_TRANSFERS_KEY,Vm as DECISION_TYPES_V1,Hm as DECISION_TYPE_ACCESS_GRANTED,Um as DECISION_TYPE_AGENT_APPROVAL,Wm as DECISION_TYPE_AGENT_MESSAGE,Gm as DECISION_TYPE_AGENT_QUESTION,Km as DECISION_TYPE_AGENT_REVIEW,qm as DECISION_TYPE_AGENT_ROUTINE_RUN_FAILED,Jm as DECISION_TYPE_AGENT_SETUP,Ym as DECISION_TYPE_BUNDLE_SETUP,Xm as DECISION_TYPE_CONNECTOR_CONNECTION_ERROR,Zm as DECISION_TYPE_CONNECTOR_CONNECTION_REAUTH_REQUIRED,Qm as DECISION_TYPE_CONNECTOR_CONNECTION_SEND_NOT_GRANTED,$m as DECISION_TYPE_ENVIRONMENT_BUILD_FAILED,E as DECISION_TYPE_KINDS,eh as DECISION_TYPE_PERSON,th as DECISION_TYPE_RECORD_ASSIGNED,nh as DECISION_TYPE_RECORD_MENTIONED,rh as DECISION_WORK_STATES,tm as DEFAULT_AGENT_EXECUTION_CONFIG,Yo as DEFAULT_AGENT_TOOL_GROUPS,ya as DEFAULT_APPEARANCE_ICON,yu as DEFAULT_APPROVAL_POLICY,Xo as DEFAULT_BLUEPRINT_TOOL_GROUPS,Tg as DEFAULT_CUSTOM_OBJECT_ICON,bu as DEFAULT_DAILY_ACTIVITY_DAYS,Oa as DEFAULT_DICTATION_LIMITS,_g as DEFAULT_LABEL_FALLBACK,X as DEFAULT_LAYOUT_TRAITS,sc as DEFAULT_MEETING_BOT_DISPLAY_NAME,cc as DEFAULT_TENANT_SETTINGS,de as DEFAULT_VALIDATION_MESSAGES,Lr as DEFINITION_KINDS,Fd as DEVICE_ACCESS_ROLES,ar as DEVICE_CHANNEL_AUTHENTICATE_TIMEOUT_MS,or as DEVICE_CHANNEL_IDLE_POLL_MS,sr as DEVICE_CHANNEL_KEEPALIVE_MS,cr as DEVICE_CHANNEL_MAX_FRAME_BYTES,lr as DEVICE_CHANNEL_PATH,ur as DEVICE_CHANNEL_PRESENCE_MS,dr as DEVICE_CHANNEL_WORKER_CLOSE_PROTOCOL_VIOLATION,fr as DEVICE_COMMAND_ERROR_CODES,pr as DEVICE_DESKTOP_STATES,mr as DEVICE_SHELLS,ka as DICTATION_FINALIZATION_TIMEOUT_MS,Aa as DICTATION_FRAME_BYTES,ja as DICTATION_MAX_BUFFER_BYTES,Ma as DICTATION_MAX_FRAME_BYTES,Na as DICTATION_MAX_TRANSCRIPT_BYTES,Pa as DICTATION_MODEL_ID,Fa as DICTATION_PREPARATION_TIMEOUT_MS,Ia as DICTATION_SAMPLE_RATE,La as DICTATION_TICKET_TTL_MS,pm as DISCARD_ARCHITECT_DRAFT_TOOL_NAME,bs as DOCUMENT_KINDS,xs as DOCUMENT_SORT_MODES,kc as DRAFT_CONFLICT_KINDS,mm as DRAFT_WRITE_TOOL_NAMES,DecisionsBuilder,hr as DeviceChannelProtocolError,gr as DeviceChannelServerFrameSchema,_r as DeviceChannelWorkerFrameSchema,vr as DeviceDesktopStatusSchema,v as DuplicateError,Ip as EMAIL_CATEGORY_DEFAULT_COLOR,Lp as EMAIL_CATEGORY_DEFAULT_ICON,Rp as EMAIL_CATEGORY_DESCRIPTION_MAX,zp as EMAIL_CATEGORY_DESCRIPTION_MIN,Bp as EMAIL_CATEGORY_LIMIT,Vp as EMAIL_CATEGORY_NAME_MAX,Tl as EMAIL_CATEGORY_SCOPES,El as EMAIL_CLASSIFIED_BY,Lc as EMAIL_DIRECTIONS,Rc as EMAIL_PARTICIPANT_ROLES,zc as EMAIL_PROVIDERS,Dl as EMAIL_RULE_SCOPES,Ll as ENVIRONMENT_BUILD_LOG_STEPS,Rl as ENVIRONMENT_BUILD_LOG_STEP_PREFIX,Of as ENVIRONMENT_HARNESSES,kf as ENVIRONMENT_HARNESS_SANDBOX_WORKDIR,Af as ENVIRONMENT_HARNESS_WORKDIR,zl as ENVIRONMENT_IMAGES,Bl as ENVIRONMENT_MEMORY_GB_PER_VCPU,jf as ENVIRONMENT_NAME_MAX_CHARS,Vl as ENVIRONMENT_NETWORK_ALLOW_MAX,Hl as ENVIRONMENT_SCRIPT_MAX_BYTES,Ul as ENVIRONMENT_SIZES,Wl as ENVIRONMENT_SIZE_VCPUS,Mf as ENVIRONMENT_STANDARDS_WORKDIR,Rr as ENV_VAR_KEY_PATTERN,Ha as ESTIMATED_COUNT_CAP,bn as ExportTooLargeError,ms as FILE_LIST_MAX_IDS,Ss as FILE_OCR_STATUSES,hs as FILE_URLS_MAX_IDS,O as FORM_FORBIDDEN_ATTRIBUTE_TYPES,na as FORM_STATUSES,ra as FORM_SUBMISSION_STATUSES,xn as ForbiddenError,FormBuilder,FormRowBuilder,FormStepBuilder,hm as GET_ARCHITECT_DRAFT_TOOL_NAME,zr as GITHUB_TRIGGER_CATALOG,Br as GITHUB_TRIGGER_FAMILIES,Zo as GRANT_ENABLES,V as GROUPABLE_ATTRIBUTE_TYPES,a_ as GroupBuilder,Yl as HARNESS_BRIDGE_PORT,G as HEADING_BLOCK,xo as HIERARCHY_ATTRIBUTE_IDS,So as HIERARCHY_ATTRIBUTE_NAMES,Co as HIERARCHY_CHILD_IDS_LIMIT,gm as HITL_TOOL_NAMES,HeadingBuilder,Pl as IMAGE_FORMATS,ba as IMAGE_SHAPES,xa as IMAGE_SOURCES,xu as INFERENCE_REASONING_OPTIONS,Su as INFERENCE_ROUTING_MODES,Cu as INFERENCE_SPEEDS,Rg as INVENTORY_LIMIT,Sn as InvalidPermissionGrantError,wu as LAST_RUN_ERROR_MAX_LENGTH,Xl as LINK_COOKIE_MAX_AGE_MS,Zl as LINK_DEFAULT_MS,Ql as LINK_MAX_MS,Tr as LIST_VIEW_TAB_VISIBILITIES,Ht as LOCATION_FILTER_PROPERTIES,Cn as LogoProviderUnavailableError,wn as LogoSearchRateLimitedError,$l as MACHINE_KEY_KINDS,Bc as MAILBOX_ACCOUNT_VISIBILITIES,Vc as MAILBOX_LIST_MODES,Hc as MAILBOX_READER_LAYOUTS,Uc as MAILBOX_TOTAL_LOCATIONS,Wc as MAIL_CHANGES_MAX,Gc as MAIL_DRAFT_BODY_MAX_CHARS,Kc as MAIL_DRAFT_MODES,qc as MAIL_SIGNATURE_MAX_CHARS,Jc as MAIL_SUBJECT_MAX_CHARS,_p as MAX_AGGREGATE_GROUPS,vp as MAX_AGGREGATE_SERIES,Ug as MAX_CHART_SERIES,Tu as MAX_DAILY_ACTIVITY_DAYS,ig as MAX_PRESET_DEPTH,Eu as MAX_TODOS,Du as MAX_TODO_DESCRIPTION_CHARS,Ou as MAX_TODO_ID_CHARS,f_ as MCP_SERVER_NAME_MAX_LENGTH,Bg as MEASURABLE_ATTRIBUTE_TYPES,Ga as MEETING_BOT_IMAGE,Ka as MEETING_BOT_IMAGE_BASE64_MAX_LENGTH,qa as MEETING_BOT_MEMBER_CAP,Ja as MEETING_BOT_NO_CREDITS,Ya as MEETING_BOT_SILENT_REASON,Xa as MEETING_CONFERENCE_REQUESTS,Za as MEETING_PARTICIPANT_ROLES,Qa as MEETING_RESPONSES,$a as MEETING_RESPONSE_STATUSES,eo as MEETING_STATUSES,M as MEMORY_ATTRIBUTES,bg as MEMORY_PAGE_MAX_CHARS,xg as MEMORY_WORKSPACE_PROFILE,yg as MEMORY_WRITE_SOURCE,Cg as METERED_CHARGE_KINDS,Sg as METERED_RATES_USD,U as METRIC_BLOCK,Tn as MemoryNotFoundError,MetricBuilder,MetricQuery,MultiRelationAttributeBuilder,ng as NATIVE_AGENT_UI_PART_IDS_METADATA_KEY,rg as NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION,Yg as NATIVE_BLOCKS,Er as NATIVE_OBJECT_NAMES,Vr as NATIVE_TOOL_GROUPS,Qo as NATIVE_TOOL_GROUP_CATALOG,Oh as NEWS_DEFAULT_DISPLAY_DAYS,kh as NEWS_DISPLAY_CAP_DAYS,Ah as NEWS_INDEX_MAX_ENTRIES,jh as NEWS_INTENSITIES,Mh as NEWS_TARGET_KINDS,Hr as NEW_DEFINITION_ID,p as NO_ACCESS,b_ as NO_PREFERENCE_PARAMETER,to as NO_RECORDING,Xe as NO_VALUE_OPERATORS,e as NonJsonValueError,NoopGeocodingAdapter,En as NotFoundError,Dn as NotImplementedError,Fc as OAUTH_TICKET_TTL_MS,ee as OBJECT_GRANT,bc as OBJECT_NAME_SCHEMA,N as OFFICIAL_SKILLS_REPO,ku as OPEN_TOOL_PART_STATES,Xh as OPERATION_MAX_STEPS,Ze as OPERATORS_BY_TYPE,ObjectBuilder,On as ObjectNotFoundError,kn as ObjectReferencedError,An as OrphanSystemAttributeError,m as PAGE_GRID_COLUMNS,Hg as PASSAGE_FIELD_TYPES,yp as PASSED_AT,sn as PERMISSION_ACTIONS,te as PERMISSION_CAPABILITIES,ne as PERMISSION_CATALOG,Mc as PERSISTENCE_OWNED_QUOTA_KEYS,dg as PIPES_WITH_ARGS,Yc as PROVIDER_DRAFT_LABEL,Au as PROVIDER_NAMES,Hp as PUBLIC_MAIL_DOMAINS,e_ as PageBuilder,jn as PageReferencedError,Mn as ProtectedResourceError,Nn as ProtectedRoleError,Qe as QUALIFIED_SEPARATOR,R as QUERY_OBJECT,_m as QUESTION_FAMILY_TOOL_NAMES,Nc as QUOTA_KEYS,Pn as QueryTimeoutError,fs as RECENT_ACTIVITY_LEDGER_LIMIT,Xc as RECIPIENT_IDENTITIES_MAX,no as RECORDING_OVERRIDES,ro as RECORDING_POLICIES,Id as RECORD_ACCESS_ROLES,Ld as RECORD_ACCESS_SOURCES,Cs as RECORD_DRIVE_CURSOR_MAX_LENGTH,ws as RECORD_DRIVE_PAGE_DEFAULT_LIMIT,Ts as RECORD_DRIVE_PAGE_MAX_LIMIT,ip as RECORD_GRAPH_DEFAULT_LIMIT_PER_NODE,ap as RECORD_GRAPH_MAX_LIMIT_PER_NODE,op as RECORD_GRAPH_MAX_NODES,gs as RECORD_IMAGE_MAX_BYTES,q as RECORD_LINKS_BLOCK,J as RECORD_LINKS_CONTENT,Dr as RECORD_LIST_SCOPES,Mg as RECORD_OBJECT,Ur as REFERENCE_KINDS,Ut as RELATION_TARGET_ANY,$e as REMOVED_OPERATOR_REPLACEMENTS,Zc as REPLY_MODES,Wr as REPOSITORY_WILDCARD,vm as REQUEST_DESIGN_REVIEW_TOOL_NAME,ym as REQUEST_SETUP_TOOL_NAME,Or as RESERVED_ATTRIBUTE_NAMES,kr as RESERVED_OBJECT_NAMES,Gr as RESOURCE_GRANT_KINDS,$o as RESOURCE_KIND_CATALOG,Ar as RESOURCE_VISIBILITIES,ju as ROUTING_PRICE_CEILINGS,Mu as RUN_ORIGIN_METADATA_KEY,Fn as RealtimeDeliveryError,In as RealtimeRateLimitedError,Ln as RealtimeSubscriptionError,Rn as RecordNotFoundError,RecordQuery,zn as RecordReferencedError,Bn as RepositoryError,y as ReservedObjectNameError,Vn as RoleNotFoundError,Hn as SCHEMA_ERROR_HTTP_STATUS,w as SCHEMA_LIMITS,k as SCHEMA_OWNER_PATTERN,c_ as SCHEMA_SOURCE_RETYPE_FROM,es as SEND_VERB_NAME,Nu as SESSION_INFERENCE_PATCH_KEYS,ug as SIMPLE_PIPES,Kr as SLACK_TRIGGER_CATALOG,qr as SLACK_TRIGGER_EVENTS,Pu as SPEAKS_THROUGH_SEND_METADATA_KEY,Eg as STANDARD_SCHEMA_VENDOR,ts as START_VERB_NAME,ns as SURFACE_TOOL_NAMES,et as SYNONYM_ALIASES,wo as SYSTEM_ATTRIBUTES,To as SYSTEM_ATTRIBUTE_I18N_KEYS,Up as SYSTEM_EMAIL_CATEGORIES,Wp as SYSTEM_EMAIL_CATEGORY_NAMES,jr as SYSTEM_FIELD_NAMES,tt as SYSTEM_FILTER_ATTRIBUTE_TYPES,Fu as SYSTEM_PART_CODES,b as SchemaError,x as SchemaErrorCode,Un as SearchBackendError,Wn as SearchPathNotIndexedError,Qg as SeriesBuilder,SeriesQuery,SingleRelationAttributeBuilder,Gn as StorageError,Kn as SyncCascadeError,qn as SyncConflictError,Jn as SyncError,Yn as SystemEntityImmutableError,Iu as TASK_DEMAND_LEVELS,fc as TENANT_INVITATION_DEFAULT_TTL_MS,pc as TENANT_INVITATION_DELIVERY_STATUSES,mc as TENANT_INVITATION_MAX_TTL_MS,hc as TENANT_INVITATION_MIN_TTL_MS,gc as TENANT_INVITATION_RESEND_INTERVAL_MS,_c as TENANT_INVITATION_STATUSES,fe as TEXT_FORMAT_PATTERNS,Lu as TODO_PLAN_STATUSES,Ru as TODO_STATUSES,zu as TOOL_APPROVAL_STATES,Bu as TOOL_IMPACT_COUNT_KEYS,io as TRANSCRIPT_STATUSES,Qc as TRIAGE_ACTIONS,Jr as TRIGGER_EVENT_TYPES,Yr as TRIGGER_MAX_REENTRY,Vu as TURN_OUTCOMES,Xn as ToolGroupGrantError,H as UNORDERED_CHART_KINDS,Rd as UNSHAREABLE_OBJECT_NAMES,Ra as USAGE_MODALITIES,za as USAGE_SCOPES,lc as USD_AMOUNT_PATTERN,Ch as USERS_RESOLVE_MAX_IDS,wh as USER_STATUSES,Th as USER_WORK_POSTURES,rs as VERB_NAMES,S as ValidationError,Z as ViewBuilder,Hu as WAKE_TURN_METADATA_KEY,Uu as WAKE_TURN_SPOKE_METADATA_KEY,Ba as WALLET_STATUSES,pe as WIRE_OFFERED_BASE_CONFIG,Zn as WorkspaceInvariantReason,zd as accessGrantSchema,Ye as actorSchema,nm as agent,Xr as agentApprovalResolutionSchema,rm as agentAvatarFromMetadata,Zr as agentAvatarOutputSchema,im as agentAvatarSchema,Qr as agentConversationOverviewSchema,Wu as agentDataChunk,$r as agentDefinitionActivitySchema,ei as agentDefinitionAudienceSchema,ti as agentDefinitionDailyActivitySchema,ni as agentDefinitionSchema,Gu as agentDisplayName,ri as agentExecutionConfigOutputSchema,ii as agentHistoryMessageSchema,ai as agentInferencePreferencesOutputSchema,Ku as agentInferencePreferencesSchema,oi as agentMemoryViewSchema,qu as agentMessageAttachmentSchema,Ju as agentMessagePartSchema,si as agentRequestAnswerSchema,ci as agentRoleSchema,li as agentRolesSetResultSchema,ui as agentRunSchema,di as agentRunStatusSchema,fi as agentScheduleOutputSchema,pi as agentScheduleSchema,mi as agentSessionAudienceSchema,hi as agentSessionDefinitionAppearanceSchema,gi as agentSessionHistoryPageSchema,Yu as agentSessionInferenceOverridesInputSchema,Xu as agentSessionInferenceOverridesSchema,_i as agentSessionLinkSchema,vi as agentSessionMessageOutputSchema,Zu as agentSessionMessageSchema,yi as agentSessionSchema,bi as agentSetupResponseSchema,am as agentStartersSchema,xi as agentTodoPlanViewSchema,Si as agentToolCatalogSchema,Ci as agentTriggerBaseSchema,wi as agentTriggerDefinitionSchema,Ti as agentTriggerLastCallSchema,Ei as agentTriggerPatchSchema,Di as agentTriggerSchema,Qu as agentUIValidationError,Oi as agentWakeSchema,ki as agentWakeViewSchema,Ge as apiKeyRoleSchema,Ke as apiKeySchema,qe as apiKeyWithSecretSchema,applyPipes,Vs as architectProjectionSchema,$u as artifactQuoteSchema,t as asTenantId,n as asUserId,bm as askQuestionsOutputSchema,assertBundleName,ed as assertCustomAgentUIMessageChunk,assertSchemaSourceResolutions,td as assertSessionState,Es as attachedRecordDocumentSchema,me as attributeConfigSchemas,nt as attributeFilterTarget,attributeInventory,Hs as attributeOutputSchema,Us as attributeSaveOutputSchema,Ro as auditChangeSchema,zo as auditLogEntrySchema,tf as availableBundleSummarySchema,blockObjectInputs,Xd as browserProfilePreparationSchema,Zd as browserProfileViewSchema,buildPropertySchema,rt as buildQualifiedAttribute,builtBundleFromPieces,bundle,nf as bundleAddPlanSchema,rf as bundleAddResultSchema,af as bundleContentsSchema,of as bundleListSchema,sf as bundleModeSchema,cf as bundleOriginSchema,lf as bundlePieceKindSchema,uf as bundlePlanPieceSchema,df as bundleRemovalCascadeSchema,ff as bundleRemovalPreviewSchema,pf as bundleRemovalRowSchema,mf as bundleStatusEntrySchema,hf as bundleStatusSchema,gf as bundleSyncPreviewSchema,_f as bundleUpdateDependentSchema,vf as bundleUpdateGroupSchema,yf as bundleUpdatePieceKindSchema,bf as bundleUpdatePieceSchema,xf as bundleUpdatePlanSchema,Sf as bundleUpdateReasonCodeSchema,Cf as bundleUpdateResultSchema,Ai as cancelAgentWakeResultSchema,r as canonicalStringify,is as canonicalToolGroups,it as canonicalizeFilterValue,re as capabilityForResource,capped,Vo as characterCount,checkbox,Gp as classificationRestoreSchema,Ol as classificationUndoSchema,kl as classifyEmailResultSchema,Kp as classifyEmailSchema,Nf as cliDefaultModelOf,Qd as cloudBrowserLiveViewSchema,collectContentViewCatalogue,at as collectQualifiedRuleIssues,ot as collectionContentSourceSchema,bp as collectionOutputSchema,xp as collectionPageSchema,collectionSourceAddress,collectionSourceAddressOf,zs as colorIdSchema,st as columnsSchema,nd as compareAgentSessionMessages,compareSchemaStateEntries,Nh as compareVersions,Pf as compiledHarnessModels,computeByteMagnitude,yr as computeReconnectDelay,br as computeRetryDelay,pa as connectionCapabilitiesSchema,as as connectionGrantKindsOf,ma as connectionSyncProgressSchema,ha as connectionViewSchema,ga as connectorProvidersResultSchema,ji as connectorTriggerMatchSchema,o_ as content,contentDefinition,Y as contentExtensionRegistry,h as contentViewDefinitionSchema,convertRetypedValue,Mi as createAgentTriggerResultSchema,he as createAttributeValidator,ge as createFormAttributeValidator,createStandardSchemaProps,Ni as criticConfigOutputSchema,currency,ct as currentActor,rd as customDataChunkSchemas,date,ih as decisionArchiveAllResultSchema,ah as decisionAttachmentSchema,oh as decisionCountsSchema,sh as decisionHandedBy,ch as decisionLinkSchema,lh as decisionListResultSchema,uh as decisionRecipientSchema,dh as decisionSchema,fh as decisionSenderSchema,ph as decisionThreadKey,mh as decisionTransferBy,hh as decisionTransferTargetsSchema,gh as decisionTransferTo,_h as decisionTransfersOf,vh as decisionWithRecipientSchema,Fl as declaredImageRequests,ql as decodeAgentSessionListCursor,Sp as decodeRecordValues,i as deepEqual,Ff as defaultEnvironmentSchema,Cp as defaultPassagesTo,wf as deferredRetypeSchema,defineBlock,Bd as deriveViewerAccess,describeViewIssue,detailView,Vd as deviceAudienceSchema,xr as deviceChannelUrl,diffSchemaState,lt as displayAttributesSchema,document,Ds as documentFileSchema,Os as documentRecordOwnerPageSchema,ks as documentRecordOwnerSchema,As as documentSchema,js as documentWithSubCountSchema,Ws as draftAppendOutputSchema,Gs as draftCommandGuardSchema,ut as draftContentViewDefinitionSchema,Ms as driveFileSchema,id as durableDateSchema,dt as edgePropertyFilterTarget,Pi as editAgentSessionMessageResultSchema,cn as effectivePermissionsSchema,$c as emailAttachmentMetaSchema,qp as emailCategoryCreateSchema,Jp as emailCategoryDeleteSchema,Al as emailCategorySchema,Yp as emailCategoryScopeQuerySchema,Xp as emailCategoryUpdateSchema,jl as emailCategoryUsageSchema,el as emailParticipantRefSchema,Zp as emailRuleScopeSchema,Ml as emailSenderRuleSchema,Nl as emailVerdictSchema,Jl as encodeAgentSessionListCursor,wp as encodeRecordValues,Mo as envVarEntrySchema,If as environmentBuildFailureSchema,Lf as environmentBuildStateSchema,Rf as environmentDetailSchema,zf as environmentHarness,Bf as environmentHarnessSchema,Vf as environmentListSchema,Hf as environmentNetworkPolicyOutputSchema,Uf as environmentRepositorySourceSchema,Wf as environmentSchema,Gf as environmentWorkdir,extractAttributeNames,extractAttributePaths,ft as extractCurrencyFilterValue,pt as extractFilterValue,extractReadRecordIds,extractTouchedArtifacts,extractTouchedDocuments,extractTouchedRecords,_s as fileSchema,vs as fileUrlsResponseSchema,mt as filterOperatorsOfType,g as filterStateSchema,ht as filterTargetsOf,Kf as findEnvironmentHarness,ln as findGrantIssues,findRelationAttribute,foldText,form,ia as formDefinitionSchema,formFieldFlatKey,formFieldKey,aa as formSlotSchema,oa as formStepSchema,sa as formSubmissionSchema,formatByteSize,yh as formatDecisionLink,Ph as formatNewsTarget,ye as formatPhoneForDisplay,Fi as formatReference,formatSkillSource,be as formatZodErrors,formula,a as generateId,Wt as getAttributeCapabilities,xe as getAttributeConfigSchema,Gt as getAttributeFilterOperators,getEditableLabelAttribute,Eo as getHierarchyAttributes,Do as getObjectSystemAttributes,gt as getOperatorPolarity,_t as getRollupFilterOperators,getSingleAttributeFromExpression,getSlotFieldTargets,Oo as getSystemAttributeI18nKey,ko as getSystemAttributeList,Ii as githubConditionSchema,Li as githubEventActions,Ri as githubTriggerMatchSchema,os as grantKindOf,group,qf as harnessModelChoices,Jf as harnessModelListSchema,Yf as harnessModelOptionSchema,Fh as hasLocale,hasOptions,Kt as hasTypeTrait,qt as hasValueKind,hashBundlePieces,xm as humanRequestId,Sm as humanRequestKind,Bs as iconNameSchema,imageLookupKindOf,Il as imageModelFormatDefect,ad as imageModelIdSchema,o as indexBy,Jt as inferInverseCardinality,od as inferenceReasoningSchema,sd as inferenceRoutingSchema,cd as inferenceSpeedSchema,z as input,Tf as installedBundleSummarySchema,invalidViewMessage,bh as isActionableDecisionKind,ld as isAgentMessageMetadata,ud as isAgentNotificationMetadata,dd as isAgentUIDataName,fd as isAgentWakeMetadata,Bo as isAgentWrittenAuditEntry,pd as isArchitectPublicationMetadata,Yt as isAttributeFilterable,Xt as isAttributeGroupable,Qn as isAttributeInUseError,Zt as isAttributeKanbanGroupable,Qt as isAttributeSearchable,$t as isAttributeSortable,Cm as isAwaitingHuman,en as isBilateralRelation,wm as isBlocking,isBoardGrouping,isBundle,yt as isCalendarDay,ie as isCatalogResource,isCollectionContent,bt as isDynamicValue,Ce as isEmptyValue,Gl as isEnvironmentBuildLogStep,Xf as isEnvironmentHarnessId,ca as isFormDefinition,isFormFieldsRow,isFormFreeFieldRef,isFormHeadingRow,isFormSeparatorRow,isFormSlotFieldRef,isFormTextRow,Ao as isHierarchyAttribute,Sa as isImageSource,isLabelExpression,tn as isLocationFilterProperty,xt as isLocationPartOperator,tl as isMailProvider,nl as isMailboxListMode,jo as isManagedSystemAttribute,isMeteredChargeKind,C as isNativeObjectName,ss as isNativeToolGroup,St as isNoValueOperator,$n as isNotFoundError,we as isNullishOrEmptyString,er as isObjectReferencedError,md as isOpenToolPartState,isPageHeading,Tm as isParkedOnHuman,isPinnedSkillSource,u as isPlainRecord,tr as isProtectedResourceError,rl as isProviderDraft,Qp as isPublicMailDomain,Em as isQuestionPart,nr as isRecordReferencedError,Ct as isRelativeDateValue,il as isReplyMode,cs as isResourceGrant,hd as isRoutineActorMetadata,rr as isSchemaError,Ih as isSemver,gd as isSessionInferencePatch,wt as isSetMembershipOperator,isSkillRepository,isStandardSchema,$p as isSystemEmailCategory,em as isSystemEmailCategoryName,_d as isSystemPartCode,isTimeChart,vd as isToolApprovalState,yd as isToolImpactCountKey,nn as isUniversalRelation,ir as isValidationError,rn as isValueKindType,Te as isValuePresent,isWherePipe,zi as isWildcard,judgePreferenceWrite,j as labelExpressionSchema,Ks as lastPublicationSchema,qs as lastPublishErrorSchema,layoutTraitsOf,ae as levelActions,oe as levelFloor,se as levelOf,Ea as linkedRecordRefSchema,listView,locatePreference,location,Tt as locationPartFilterTarget,Dm as lockingSendCall,No as loginSecretEntrySchema,al as mailChangesSchema,ol as mailDraftAttachmentSchema,sl as mailDraftSchema,cl as mailSignatureSchema,ll as mailStateSchema,ul as mailboxAccountSchema,dl as mailboxCountSchema,fl as mailboxCursorSchema,pl as mailboxEmailSchema,ml as mailboxFolderTotalSchema,hl as mailboxListResponseSchema,gl as mailboxSenderImageSchema,_l as mailboxThreadDetailSchema,vl as mailboxThreadSchema,yl as mailboxTotalsSchema,Bi as matchesRepositoryPattern,Zf as mcpCatalogCategorySchema,Qf as mcpCatalogEntrySchema,$f as mcpOAuthAttemptStartedSchema,ep as mcpOAuthSetupSchema,tp as mcpServerAuthTypeSchema,np as mcpServerStatusSchema,rp as mcpServerViewSchema,ao as meetingBotDispatchRequestSchema,oo as meetingBotDispatchResponseSchema,so as meetingBotNotificationSchema,co as meetingLinkedRecordSchema,lo as meetingParticipantRefSchema,uo as meetingRecordingSchema,fo as meetingSchema,po as meetingSiblingRefSchema,mo as meetingTranscriptProvenanceSchema,ho as meetingTranscriptResponseSchema,go as meetingTranscriptSegmentSchema,_o as meetingTranscriptSourceRefSchema,vo as meetingsListResponseSchema,Eh as memberSchema,memoryPageViewOf,bd as mentionReferenceSchema,xd as mergeSessionInferencePatch,meteredUsd,Vi as modelDefinitionOutputSchema,Sd as modelDefinitionSchema,y_ as modelIdentitySchema,Hi as modelReferenceOutputSchema,Cd as modelReferenceSchema,moveWidensAudience,multiselect,Js as mutationReceiptSchema,Kh as myPreferencesSchema,nameSlug,Ac as namedTargetSchema,nativeAgentUIPartIdMetadataKey,ls as needsManageWhenUnattended,Lh as newsBodySchema,Rh as newsIndexSchema,Ee as normalizeCountrylessPhoneNumber,Et as normalizeFilterRule,Dt as normalizeForEdgeRpc,zh as normalizeNewsLocale,Ot as normalizeOperator,De as normalizePhoneNumber,yo as normalizedMeetingTranscriptSchema,kt as now,number,Ic as oauthAttemptStartedSchema,object,Ys as objectDefinitionOutputSchema,i_ as objectImageSchema,Tp as objectRecordOutputSchema,Om as openRequests,Sc as optionInverseMismatch,wd as orderAgentSessionMessages,page,Hd as pageAudienceSchema,pageFlowBlocks,pageItems,Ls as pageReadSchema,Rs as pageSummarySchema,pageTraitsOf,Ud as parseAgentDefinitionAccessRole,Wd as parseAgentSessionAccessRole,Oe as parseAttributeConfig,ke as parseAttributeConfigForCreate,Ae as parseAttributeConfigForUpdate,parseBlockParameters,Ua as parseCountMode,xh as parseDecisionLink,Gd as parseDeviceAccessRole,Sr as parseDeviceChannelFrame,Ui as parseMergedAgentTrigger,jc as parseNamedTarget,parseNativeAgentUIPartIdsMetadata,Bh as parseNewsBody,Vh as parseNewsIndex,Hh as parseNewsIntensity,Uh as parseNewsTarget,Wa as parseOptionalCountMode,Kd as parsePageAccessRole,At as parseQualifiedAttribute,qd as parseRecordAccessRole,Mr as parseRecordListScope,Wi as parseReference,Nr as parseResourceVisibility,parseSchemaGroupPresentation,parseSchemaOwner,parseSchemaState,Cr as parseServerFrame,parseSkillSource,us as parseToolGroupGrant,parseWherePipe,wr as parseWorkerFrame,un as permissionFlagsSchema,dn as permissionGrantSchema,fn as permissionSchema,phone,preference,qh as preferenceEntry,Jh as preferenceEntrySchema,je as propertyAttributeSchema,Me as propertySchemaSchema,Td as providerNameSchema,Xs as publishBlockerSchema,Zs as publishDraftOutputSchema,_ as publishedViewContentDefinitionSchema,query,Pc as quotaStateSchema,Ed as readArchitectPublication,readArtifactResult,km as readAskQuestionsResult,readFormFieldValue,readGeneratedImageResult,Dd as readRunOriginMetadata,ps as recentActivityEntryKey,bl as recipientContactSchema,xl as recipientIdentitySchema,Sl as recipientSuggestionSchema,Ep as recordAggregatesSchema,Jd as recordAudienceSchema,Dp as recordCollectionOutputSchema,Op as recordDeletionCountSchema,Ns as recordDriveChildSchema,Ps as recordDriveChildrenPageSchema,Fs as recordDriveSearchHitSchema,Is as recordDriveSearchResultSchema,sp as recordGraphEdgeSchema,cp as recordGraphNodeKey,lp as recordGraphNodeSchema,up as recordGraphRequestSchema,dp as recordGraphResponseSchema,kp as recordIncomingReferenceSchema,Ap as recordIncomingReferencesPageSchema,recordLinksTab,bo as recordMeetingsCount,Zh as recordOperationSchema,jp as recordPurgeResultSchema,jg as recordQueryDefinitionSchema,Mp as recordValuesCodec,Np as recordsBulkCreateResultSchema,Pp as recordsBulkDeleteResultSchema,Fp as recordsBulkUpdateResultSchema,Gi as refineTrigger,Ne as rejectUnknownAttributesOrThrow,relation,relationAcceptsObject,fp as relationOptionSchema,pp as relationOptionsResponseSchema,relationProperty,an as relationTargetsOf,renderLabelExpression,Cl as replyDefaultsSchema,_a as requestedCapabilities,requireRecordContentContext,requireSingleRelationTarget,Ca as resolveAppearance,resolveCollectionActions,resolveContentNavigation,on as resolveEffectiveFilterType,resolveFieldRequired,jt as resolveIsWithinBounds,Wh as resolveLocalized,resolvePropertyDefinitions,Pe as resolveTextPattern,Mt as resolveUtcDayBounds,resolveViewContents,mp as resolvedRelationsBatchSchema,ds as resourceGrant,Ki as resourceUsedBySchema,qi as retryPolicyOutputSchema,Qs as retypeOptionsOutputSchema,richtext,pn as roleSchema,rollup,Od as routedMessageInferenceSchema,Ji as routineAudiencePreviewSchema,Yi as routineAudienceSchema,ce as sameActions,s as sameStableValue,$s as schemaDraftOutputSchema,schemaGroupKey,ec as schemaGroupListSchema,tc as schemaGroupSchema,rc as schemaStateEntrySchema,ic as schemaStateSchema,schemaStateSourcePayload,Po as secretEntrySchema,select,Fe as selectOptionWriteSchema,c as serializeCanonicalJson,l as serializeStableJson,Ef as servedAsIsAttributeSchema,Xi as sessionImageUsageSchema,Zi as sessionInferenceOverridesOutputSchema,kd as sessionInferencePatchSchema,Qi as sessionStateSchema,sha256Hex,singleRelationTarget,$i as slackConditionSchema,ea as slackTriggerMatchSchema,Nt as sortsSchema,sourcedAttributeOf,status,Ie as statusGroupSchema,Le as statusOptionWriteSchema,storedContentDefinition,ta as submitOutcomeSchema,Df as syncBundleResultSchema,Pt as systemColumnFilterTarget,vc as tenantInvitationSchema,uc as tenantSettingsResponseSchema,dc as tenantSettingsSchema,text,Ft as toMultiValueOperator,It as toUtcDayString,Lt as today,Ad as todoItemSchema,jd as todoPlanSchema,Md as toolImpactSchema,wl as triageResultSchema,unaccent,user,Dh as userProfileSchema,Kl as utf8ByteLength,Re as validateAttribute,Cc as validateAttributeName,validateContentViewCatalogue,ze as validateDraft,Be as validateDraftOrThrow,validateLabelExpression,Ve as validateObject,validateObjectExpressions,validateObjectImage,Ec as validateObjectName,He as validateObjectOrThrow,Rt as validateQualifiedRule,validateStoredViews,Oc as validateViewName,ac as viewPreferenceAddressSchema,oc as viewReadSchema,Yd as viewerAccessSchema,Ue as wireOmittedConfigKeysFor,Yh as withPreferenceEntry,Gh as withoutTrailingSlashes,We as withoutUnknownOptionKeys,workspaceViewAuthoring};