@vertesia/common 1.5.0-dev.20260722.120446Z → 1.5.0-dev.20260725.083715Z
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/apps.d.ts +40 -1
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js.map +1 -1
- package/lib/environment.d.ts +2 -0
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js.map +1 -1
- package/lib/interaction.d.ts +73 -1
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +48 -0
- package/lib/interaction.js.map +1 -1
- package/lib/store/agent-run.d.ts +23 -1
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/conversation-state.d.ts +2 -0
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/store.d.ts +8 -1
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +13 -0
- package/lib/store/store.js.map +1 -1
- package/lib/store/workflow.d.ts +5 -1
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +5 -0
- package/lib/store/workflow.js.map +1 -1
- package/lib/vertesia-common.js +2 -2
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +4 -4
- package/src/agent-resources.test.ts +100 -0
- package/src/apps.ts +50 -1
- package/src/environment.ts +2 -0
- package/src/interaction.ts +131 -1
- package/src/store/agent-run.ts +29 -0
- package/src/store/content-type-editing.test.ts +17 -0
- package/src/store/conversation-state.ts +3 -0
- package/src/store/store.ts +22 -0
- package/src/store/workflow.ts +9 -0
package/lib/vertesia-common.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import e from"ajv";var t;(function(e){e.int_read=`interaction:read`,e.int_write=`interaction:write`,e.int_delete=`interaction:delete`,e.int_execute=`interaction:execute`,e.run_read=`run:read`,e.run_write=`run:write`,e.env_admin=`environment:admin`,e.app_manage=`app:manage`,e.project_admin=`project:admin`,e.project_integration_read=`project:integration_read`,e.project_settings_write=`project:settings_write`,e.api_key_create=`api_key:create`,e.api_key_read=`api_key:read`,e.api_key_secret_read=`api_key:secret_read`,e.api_key_update=`api_key:update`,e.api_key_delete=`api_key:delete`,e.account_read=`account:read`,e.account_write=`account:write`,e.account_admin=`account:admin`,e.manage_billing=`account:billing`,e.billing_read=`billing:read`,e.audit_read=`audit:read`,e.account_member=`account:member`,e.content_read=`content:read`,e.content_read_all=`content:read_all`,e.content_write=`content:write`,e.content_delete=`content:delete`,e.content_admin=`content:admin`,e.content_superadmin=`content:superadmin`,e.workflow_read=`workflow:read`,e.workflow_run=`workflow:run`,e.workflow_admin=`workflow:admin`,e.workflow_superadmin=`workflow:superadmin`,e.agent_run_read=`agent_run:read`,e.task_read=`task:read`,e.task_manage=`task:manage`,e.iam_impersonate=`iam:impersonate`,e.studio_access=`studio:access`})(t||={});var n;(function(e){e.project=`project`,e.environment=`environment`,e.account=`account`,e.interaction=`interaction`,e.app=`application`,e.resource_set=`content_set`})(n||={});var r;(function(e){e.user=`user`,e.group=`group`,e.apikey=`apikey`,e.principal_set=`principal_set`})(r||={});var i;(function(e){e[e.public=0]=`public`,e[e.internal=1]=`internal`,e[e.confidential=2]=`confidential`,e[e.restricted=3]=`restricted`,e[e.secret=4]=`secret`})(i||={});const a=[`Public`,`Internal`,`Confidential`,`Restricted`,`Secret`];function o(e){return a[e]??`Unknown`}function s(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function c(e,t){return t===`.`||t===`json`?e:t.split(`.`).reduce((e,t)=>{if(Array.isArray(e)&&/^\d+$/.test(t))return e[Number(t)];if(s(e))return e[t]},e)}function ee(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function l(e,t){return e.replace(/\{\{\s*([\w.-]+|\.)\s*\}\}/g,(e,n)=>ee(c(t,n)))}function te(e){return typeof e==`string`?e:e==null?``:ee(e)}function ne(e,t){let n=e?.trim();return n?l(n,t).trim():te(t)}var re;(function(e){e.secret=`sk`})(re||={});var ie;(function(e){e.User=`user`,e.OAuthAccess=`oauth_access`,e.Group=`group`,e.ApiKey=`apikey`,e.ServiceAccount=`service_account`,e.Agent=`agent`,e.Schedule=`schedule`})(ie||={});const ae=[`default`,`footer`,`settings`],oe=/^[a-z0-9]+(?:_[a-z0-9]+)*$/,se=/^[a-z0-9]+(?:_[a-z0-9]+)*$/;function ce(e){return oe.test(e)}function le(e){return se.test(e)}function ue(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``).replace(/_+/g,`_`)}function de(e){return e.replace(/_/g,`-`)}function fe(e,t){if(!e||typeof e!=`object`)throw TypeError(`Tool collection must be an object`);let n=t&&e.url?ye(e.url,t):e.url,r=n!==e.url;if(e.type===`mcp`){let t=ue(e.id||e.name||e.url);if(r||!e.id)return{...e,url:n,id:e.id||t}}else if(r)return{...e,url:n};return e}const pe=[`ui`,`tools`,`interactions`,`types`,`processes`,`views`,`templates`,`dashboards`],me=`x-vertesia-app-version`,he=[`interaction`,`agent`,`type`,`process`,`view`,`template`,`dashboard`,`activity`,`tool`],ge=[`pending`,`built`,`done`],_e=`docs/app-capability-manifest.json`;function ve(e,t){return e?.access_control??t?.access_control??`all`}function ye(e,t){return!e||!t?e:e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,n)=>{let r=t[n];return typeof r!=`string`||!r?e:be(r)})}function be(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return t===e.length?e:e.slice(0,t)}const xe=20*1024*1024,Se=80*1024*1024,Ce=20,we=`docs/`,Te=[`ui`,`tools`,`interactions`,`types`,`processes`,`views`,`templates`,`dashboards`,`settings`,`widgets`,`activities`,`all`],Ee=[`app_portal`,`docs`,`help`,`user_menu`],De=[`create`,`update`,`delete`,`bulk_create`,`bulk_change_type`,`bulk_update`,`bulk_delete`,`attach`,`detach`,`credentials_fill`,`credentials_totp_generation`,`publish`,`unpublish`,`inference`,`embedding`,`image_generation`,`document_processed`],Oe=[`inference`,`embedding`,`image_generation`],ke=[`time`,`action`,`resource_type`,`event_category`,`provider`,`project_id`,`details.pipeline`,`details.verdict`,`details.workflow_type`,`details.rule_id`,`model`];function Ae(e){return e.type===`email`}function je(e){return e.type===`interactive`}const Me=`id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts`,Ne=`${Me} result_schema`;var Pe;(function(e){e.draft=`draft`,e.published=`published`,e.archived=`archived`,e.code=`code`,e.unknown=`unknown`})(Pe||={});var Fe;(function(e){e.created=`created`,e.processing=`processing`,e.completed=`completed`,e.failed=`failed`})(Fe||={});var u;(function(e){e.STANDARD=`STANDARD`,e.RESTRICTED=`RESTRICTED`,e.DEBUG=`DEBUG`})(u||={});var d;(function(e){e.STANDARD=`Run data is stored for both the model inputs and output.`,e.RESTRICTED=`No run data is stored for the model inputs — only the model output.`,e.DEBUG=`Run data is stored for the model inputs and output, schema, and final prompt.`})(d||={});const Ie={[u.STANDARD]:d.STANDARD,[u.RESTRICTED]:d.RESTRICTED,[u.DEBUG]:d.DEBUG};var Le;(function(e){e.Collection=`collection`})(Le||={});var Re;(function(e){e.api=`api`,e.cli=`cli`,e.ui=`ui`,e.webhook=`webhook`,e.test=`test-data`,e.system=`system`,e.schedule=`schedule`})(Re||={});const ze=`-result -parameters -result_schema -prompt`;var f;(function(e){e.RUN_AND_INTERACTION_CONFIG=`RUN_AND_INTERACTION_CONFIG`,e.RUN_CONFIG_ONLY=`RUN_CONFIG_ONLY`,e.INTERACTION_CONFIG_ONLY=`INTERACTION_CONFIG_ONLY`})(f||={});var p;(function(e){e.RUN_AND_INTERACTION_CONFIG=`This run configuration is used. Undefined options are filled with interaction configuration.`,e.RUN_CONFIG_ONLY=`Only this run configuration is used. Undefined options remain undefined.`,e.INTERACTION_CONFIG_ONLY=`Only interaction configuration is used.`})(p||={});const Be={[f.RUN_AND_INTERACTION_CONFIG]:p.RUN_AND_INTERACTION_CONFIG,[f.RUN_CONFIG_ONLY]:p.RUN_CONFIG_ONLY,[f.INTERACTION_CONFIG_ONLY]:p.INTERACTION_CONFIG_ONLY};var Ve;(function(e){e.config=`config`,e.interaction=`interaction`,e.environmentDefault=`environmentDefault`,e.projectSystemDefault=`projectSystemDefault`,e.projectBaseDefault=`projectBaseDefault`,e.projectModalityDefault=`projectModalityDefault`,e.projectLegacyDefault=`projectLegacyDefault`})(Ve||={});function m(e){return e?.find(Ae)}function He(e){return!!m(e)}function Ue(e,t){let n=e||[],r=n.findIndex(Ae);if(r===-1)return t.to_email?[...n,{type:`email`,...t}]:n;let i=[...n];return i[r]={...i[r],...t,type:`email`},i}function We(e,t,n){let r=m(e);if(!r)return e||[];let i=r.references?[...r.references]:[];return i.includes(t)||i.push(t),Ue(e,{in_reply_to:t,references:i,thread_subject:n||r.thread_subject})}var h;(function(e){e.STRING=`STRING`,e.INTEGER=`INTEGER`,e.BIGINT=`BIGINT`,e.FLOAT=`FLOAT`,e.DOUBLE=`DOUBLE`,e.DECIMAL=`DECIMAL`,e.BOOLEAN=`BOOLEAN`,e.DATE=`DATE`,e.TIMESTAMP=`TIMESTAMP`,e.JSON=`JSON`})(h||={});var Ge;(function(e){e.EMAIL=`email`,e.PHONE=`phone`,e.URL=`url`,e.CURRENCY=`currency`,e.PERCENTAGE=`percentage`,e.PERSON_NAME=`person_name`,e.ADDRESS=`address`,e.COUNTRY=`country`,e.DATE_ISO=`date_iso`,e.IDENTIFIER=`identifier`})(Ge||={});const Ke={[h.STRING]:`VARCHAR`,[h.INTEGER]:`INTEGER`,[h.BIGINT]:`BIGINT`,[h.FLOAT]:`FLOAT`,[h.DOUBLE]:`DOUBLE`,[h.DECIMAL]:`DECIMAL(18,4)`,[h.BOOLEAN]:`BOOLEAN`,[h.DATE]:`DATE`,[h.TIMESTAMP]:`TIMESTAMP`,[h.JSON]:`JSON`};var qe;(function(e){e.CREATING=`creating`,e.ACTIVE=`active`,e.ERROR=`error`,e.ARCHIVED=`archived`})(qe||={});var Je;(function(e){e.PENDING=`pending`,e.PROCESSING=`processing`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.ROLLED_BACK=`rolled_back`})(Je||={});const Ye={retention_days:30,snapshots_exempt:!0};var Xe;(function(e){e.ACTIVE=`active`,e.ARCHIVED=`archived`})(Xe||={});const Ze={columns:2,cellWidth:600,cellHeight:400,padding:20},Qe={"claude-3-5-haiku-20241022":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0}},$e={"claude-3-5-haiku":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-haiku":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-sonnet":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-opus":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-7":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0}},et={input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0};function tt(e){let t=e.toLowerCase();if(t in Qe)return Qe[t];let n;for(let e of Object.keys($e))t.startsWith(e)&&(!n||e.length>n.length)&&(n=e);return n?$e[n]:et}const nt={"o1-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},o3:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"deepseek-r1-0528":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"deepseek-v3-0324":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"mistral-medium-2505":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"mistral-nemo":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"llama-4-scout-17b-16e-instruct":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1}},rt={"gpt-3.5-turbo":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"gpt-35-turbo":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"gpt-35":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"gpt-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"gpt-4.1":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"gpt-4.5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"gpt-4o":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},gpt:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},o1:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o1-preview":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o1-pro":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o3-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o4-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},o4:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},o:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-3.1":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-3.2":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"llama-3.3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},llama:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"mistral-large":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"mistral-small":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},mistral:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"phi-4":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},phi:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"deepseek-r1":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"deepseek-v3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},deepseek:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"ai21-jamba":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},ai21:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},jamba:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"cohere-command":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},cohere:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},command:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"grok-3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},grok:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0}},it=[`image`,`vision`],at=[`video`],ot=[`audio`],st=[`text`],ct=[`image`],lt=[`video`],ut=[`audio`],dt=[`text`],ft=[`embed`],pt=[`tool`,`gpt-4`,`gpt-4o`,`o1`,`o3`,`o4`,`llama-3`,`mistral-large`,`mistral-small`,`jamba`,`cohere`,`command`,`grok`];function g(e,t){return t.some(t=>e.includes(t))}function mt(e){let{baseModel:t}=ht(e),n=t.toLowerCase(),r=nt[n];if(r)return _(r,n);let i,a=0;for(let e of Object.keys(rt))n.startsWith(e)&&e.length>a&&(i=e,a=e.length);if(i)return _(rt[i],n);let o={text:g(n,st)||!0,image:g(n,it)||void 0,video:g(n,at)||void 0,audio:g(n,ot)||void 0,embed:!1},s={text:g(n,dt)||!0,image:g(n,ct)||void 0,video:g(n,lt)||void 0,audio:g(n,ut)||void 0,embed:g(n,ft)||void 0},c=g(n,pt)||void 0;return _({input:o,output:s,tool_support:c,tool_support_streaming:c||void 0},n)}function _(e,t){return t.startsWith(`gpt-`)||t.startsWith(`o1`)||t.startsWith(`o3`)||t.startsWith(`o4`)?e:{...e,tool_support:!1,tool_support_streaming:!1}}function ht(e){let t=e.split(`::`);return t.length===2?{deploymentName:t[0],baseModel:t[1]}:{deploymentName:e,baseModel:e}}function v(e,t){return t.some(t=>e.includes(t))}function y(e,t,n,r=0){let i=e.indexOf(t);if(i===-1)return!1;let a=e.slice(i+t.length).match(/^(\d+)(?:[.-](\d+))?/);if(!a)return!1;let o=Number(a[1]),s=Number(a[2]??0);return o>n||o===n&&s>=r}function gt(e){let t=e.toLowerCase(),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return t.includes(`inference-profile/`)?r.replace(/^[^.]+\./,``):r}function _t(e){if(v(e,[`nova-2-multimodal-embeddings`,`titan-embed`,`cohere.embed`,`marengo-embed`]))return{input:{text:!0,image:v(e,[`multimodal`,`embed-image`,`embed-v4`,`marengo`]),video:v(e,[`multimodal`,`marengo`]),audio:e.includes(`multimodal`),embed:!1},output:{text:!1,image:!1,video:!1,audio:!1,embed:!0}};if(v(e,[`nova-canvas`,`titan-image-generator`]))return{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1}};if(e.includes(`nova-reel`))return{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!1,video:!0,audio:!1,embed:!1}};let t=e.includes(`anthropic.claude`)&&!e.includes(`claude-3-5-haiku`)||e.includes(`amazon.nova`)&&!e.includes(`nova-micro`)||e.includes(`google.gemma`)||v(e,[`meta.llama3-2-11b`,`meta.llama3-2-90b`,`meta.llama4`])||v(e,[`mistral.magistral-`,`mistral.ministral-3-`,`mistral.mistral-large-3-`,`mistral.pixtral-`])||y(e,`kimi-k`,2,5)||e.includes(`nemotron-nano-12b`)||e.includes(`qwen3-vl`)||e.includes(`palmyra-vision`)||e.startsWith(`openai.gpt-`)&&!e.includes(`gpt-oss`)||e.startsWith(`xai.grok-`),n=e.includes(`amazon.nova`)&&!e.includes(`nova-micro`)||e.includes(`twelvelabs.pegasus`)||y(e,`google.gemma-`,4),r=v(e,[`nova-sonic`,`mistral.voxtral-`])||e.includes(`google.gemma-4-e2b`);return{input:{text:!e.includes(`nova-sonic-v1`),image:t,video:n,audio:r,embed:!1},output:{text:!0,image:!1,video:!1,audio:e.includes(`nova-sonic`),embed:!1}}}function vt(e){if(e.includes(`ai21.jamba`))return{context_window:256e3,max_output_tokens:4096};if(e.includes(`amazon.nova-2`))return{context_window:1e6,max_output_tokens:65536};if(e.includes(`amazon.nova-premier`))return{context_window:1e6,max_output_tokens:25600};if(e.includes(`amazon.nova-micro`))return{context_window:128e3,max_output_tokens:5120};if(v(e,[`amazon.nova-lite`,`amazon.nova-pro`]))return{context_window:3e5,max_output_tokens:5120};if(e.includes(`anthropic.claude`)){if(v(e,[`claude-fable-5`,`claude-mythos`,`claude-sonnet-5`,`claude-opus-4-6`,`claude-opus-4-7`,`claude-opus-4-8`]))return{context_window:1e6,max_output_tokens:131072};if(e.includes(`claude-sonnet-4-6`))return{context_window:1e6,max_output_tokens:65536};if(e.includes(`claude-haiku-4-5`))return{context_window:2e5,max_output_tokens:63999};if(v(e,[`claude-opus-4-5`,`claude-sonnet-4`]))return{context_window:2e5,max_output_tokens:65536};if(e.includes(`claude-opus-4-1`))return{context_window:2e5,max_output_tokens:32e3};if(e.includes(`claude-3-5-haiku`))return{context_window:2e5,max_output_tokens:8192};if(e.includes(`claude-3-haiku`))return{context_window:2e5,max_output_tokens:4096}}return e.includes(`cohere.command-r`)?{context_window:128e3,max_output_tokens:4096}:y(e,`deepseek.v`,3,2)?{context_window:163840,max_output_tokens:8192}:v(e,[`deepseek.v3`,`deepseek.r1`])?{context_window:128e3,max_output_tokens:8192}:e.includes(`google.gemma-4-31b`)||e.includes(`google.gemma-4-26b`)?{context_window:256e3}:e.includes(`google.gemma-4-e2b`)?{context_window:128e3}:e.includes(`google.gemma-3-`)?{context_window:128e3,max_output_tokens:8192}:e.includes(`meta.llama4-scout`)?{context_window:1e7,max_output_tokens:8192}:e.includes(`meta.llama4-maverick`)?{context_window:1e6,max_output_tokens:8192}:e.includes(`meta.llama3-`)&&!e.includes(`llama3-1`)&&!e.includes(`llama3-2`)&&!e.includes(`llama3-3`)?{context_window:8192,max_output_tokens:8192}:v(e,[`meta.llama3-1`,`meta.llama3-2`,`meta.llama3-3`])?{context_window:128e3,max_output_tokens:4096}:y(e,`minimax.minimax-m`,2,1)?{context_window:196e3,max_output_tokens:8192}:e.includes(`minimax.minimax-m2`)?{context_window:1e6,max_output_tokens:8192}:v(e,[`mistral.devstral-2`,`mistral.mistral-large-3`])?{context_window:256e3,max_output_tokens:32768}:e.includes(`mistral.magistral-`)?{context_window:128e3,max_output_tokens:40960}:e.includes(`mistral.ministral-3-`)?{context_window:128e3,max_output_tokens:8192}:e.includes(`mistral.pixtral-`)?{context_window:128e3,max_output_tokens:16384}:v(e,[`mistral.mistral-7b`,`mistral.mistral-large-2402`,`mistral.mistral-small-2402`,`mistral.mixtral-`,`mistral.voxtral-`])?{context_window:32e3,max_output_tokens:e.includes(`voxtral`)?void 0:4096}:v(e,[`moonshot.kimi-k2`,`moonshotai.kimi-k2`])?{context_window:256e3,max_output_tokens:16384}:v(e,[`nvidia.nemotron-nano-3`,`nvidia.nemotron-super-3`])?{context_window:256e3,max_output_tokens:e.includes(`super`)?32768:8192}:e.includes(`nvidia.nemotron-nano-`)?{context_window:128e3,max_output_tokens:8192}:e.startsWith(`openai.gpt-5`)?{context_window:272e3}:e.includes(`openai.gpt-oss`)?{context_window:128e3,max_output_tokens:16384}:e.includes(`qwen3-235b`)?{context_window:256e3,max_output_tokens:8192}:e.includes(`qwen3-32b`)?{context_window:32e3,max_output_tokens:8192}:e.includes(`qwen3-coder-30b`)?{context_window:256e3,max_output_tokens:16384}:e.includes(`qwen3-coder-480b`)?{context_window:128e3,max_output_tokens:16384}:e.includes(`qwen3-coder-next`)?{context_window:256e3,max_output_tokens:16384}:v(e,[`qwen3-next-`,`qwen3-vl-`])?{context_window:256e3,max_output_tokens:8192}:e.includes(`writer.palmyra-vision`)?{context_window:4096,max_output_tokens:4096}:v(e,[`writer.palmyra-x4`,`writer.palmyra-x5`])?{context_window:128e3,max_output_tokens:8192}:e.startsWith(`xai.grok-`)?{context_window:1e6}:v(e,[`zai.glm-4.7`,`zai.glm-4.6`])?{context_window:203e3,max_output_tokens:4096}:e.includes(`zai.glm-5`)?{context_window:2e5,max_output_tokens:131072}:{}}function yt(e){let t=!1,n=!1;return e.includes(`anthropic.claude`)?(t=!0,n=!e.includes(`claude-3-5-haiku`)):e.includes(`ai21.jamba`)&&!e.includes(`jamba-instruct`)||e.includes(`amazon.nova`)&&!v(e,[`nova-canvas`,`nova-reel`])||e.includes(`cohere.command-r`)?(t=!0,n=!0):(e.includes(`meta.llama3-1`)||v(e,[`meta.llama3-2-11b`,`meta.llama3-2-90b`])||v(e,[`mistral.mistral-large`,`mistral.pixtral`])||e.includes(`twelvelabs.pegasus`)||e.includes(`writer.palmyra`))&&(t=!0),{tool_support:t,tool_support_streaming:t&&n}}function bt(e){let t=gt(e);return{..._t(t),...vt(t)}}function xt(e,t){let n=gt(e);if(t===`runtime`&&(n.startsWith(`openai.gpt-`)&&!n.includes(`gpt-oss`)||n.startsWith(`xai.grok-`)||y(n,`google.gemma-`,4)))return{input:{},output:{}};let r=bt(n),i=t===`mantle`?{tool_support:!0,tool_support_streaming:!0}:yt(n);return{input:r.input,output:r.output,...i}}function St(e){return xt(e,`runtime`)}var b;(function(e){e.openai=`openai`,e.openai_compatible=`openai_compatible`,e.azure_openai=`azure_openai`,e.azure_foundry=`azure_foundry`,e.huggingface_ie=`huggingface_ie`,e.replicate=`replicate`,e.bedrock=`bedrock`,e.bedrock_mantle=`bedrock_mantle`,e.vertexai=`vertexai`,e.togetherai=`togetherai`,e.mistralai=`mistralai`,e.groq=`groq`,e.watsonx=`watsonx`,e.xai=`xai`,e.anthropic=`anthropic`})(b||={});const Ct={openai:{id:b.openai,name:`OpenAI`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},azure_openai:{id:b.azure_openai,name:`Azure OpenAI`,requiresApiKey:!1,requiresEndpointUrl:!0,supportSearch:!1},azure_foundry:{id:b.azure_foundry,name:`Microsoft Foundry`,requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},huggingface_ie:{id:b.huggingface_ie,name:`HuggingFace Inference Endpoint`,requiresApiKey:!0,requiresEndpointUrl:!0},replicate:{id:b.replicate,name:`Replicate`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!0},bedrock:{id:b.bedrock,name:`Amazon Bedrock`,requiresApiKey:!1,requiresEndpointUrl:!1,endpointPlaceholder:`region name (eg. us-east-1)`,supportSearch:!1},bedrock_mantle:{id:b.bedrock_mantle,name:`Amazon Bedrock Mantle`,requiresApiKey:!1,requiresEndpointUrl:!0,endpointPlaceholder:`region name (eg. us-west-2)`,supportSearch:!1},vertexai:{id:b.vertexai,name:`Google Agent Platform (Vertex AI)`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},togetherai:{id:b.togetherai,name:`Together AI`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},mistralai:{id:b.mistralai,name:`Mistral AI`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},groq:{id:b.groq,name:`Groq Cloud`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},watsonx:{id:b.watsonx,name:`IBM WatsonX`,requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},xai:{id:b.xai,name:`xAI (Grok)`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},openai_compatible:{id:b.openai_compatible,name:`OpenAI Compatible`,requiresApiKey:!0,requiresEndpointUrl:!0,endpointPlaceholder:`https://api.example.com/v1`,supportSearch:!1},anthropic:{id:b.anthropic,name:`Anthropic`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1}};var x;(function(e){e.max_tokens=`max_tokens`,e.temperature=`temperature`,e.top_p=`top_p`,e.top_k=`top_k`,e.presence_penalty=`presence_penalty`,e.frequency_penalty=`frequency_penalty`,e.stop_sequence=`stop_sequence`,e.effort=`effort`,e.seed=`seed`,e.number_of_images=`number_of_images`})(x||={});var S;(function(e){e.numeric=`numeric`,e.enum=`enum`,e.boolean=`boolean`,e.string_list=`string_list`})(S||={});var wt;(function(e){e.safety=`safety`,e.system=`system`,e.user=`user`,e.assistant=`assistant`,e.negative=`negative`,e.mask=`mask`,e.tool=`tool`})(wt||={});var Tt;(function(e){e.text=`text`,e.image=`image`})(Tt||={});var Et;(function(e){e.Available=`available`,e.Pending=`pending`,e.Stopped=`stopped`,e.Unavailable=`unavailable`,e.Unknown=`unknown`,e.Legacy=`legacy`})(Et||={});var Dt;(function(e){e.Classifier=`classifier`,e.Regressor=`regressor`,e.Clustering=`clustering`,e.AnomalyDetection=`anomaly-detection`,e.TimeSeries=`time-series`,e.Text=`text`,e.Image=`image`,e.Audio=`audio`,e.Video=`video`,e.Embedding=`embedding`,e.Chat=`chat`,e.Code=`code`,e.NLP=`nlp`,e.MultiModal=`multi-modal`,e.Test=`test`,e.Other=`other`,e.Unknown=`unknown`})(Dt||={});var Ot;(function(e){e.running=`running`,e.succeeded=`succeeded`,e.failed=`failed`,e.cancelled=`cancelled`})(Ot||={}),x.max_tokens,S.numeric,x.temperature,S.numeric,x.top_p,S.numeric,x.top_k,S.numeric,x.presence_penalty,S.numeric,x.frequency_penalty,S.numeric,x.stop_sequence,S.string_list;function kt(e,t,n,r){let i=e.toLowerCase(),a=i.indexOf(t.toLowerCase());if(a===-1)return!1;let o=i.slice(a+t.length).match(/^(\d+)(?:[.-](\d+))?/);if(!o)return!1;let s=Number(o[1]),c=Number(o[2]??0);return s>n||s===n&&c>=r}const At=new Set([`deepseek`,`minimax`,`mistral`,`moonshot`,`moonshotai`,`nvidia`,`qwen`,`writer`,`zai`]),jt={anthropic:`Anthropic`,deepseek:`DeepSeek`,google:`Google`,minimax:`MiniMax`,mistral:`Mistral AI`,moonshot:`Moonshot AI`,moonshotai:`Moonshot AI`,nvidia:`NVIDIA`,openai:`OpenAI`,qwen:`Qwen`,writer:`Writer`,xai:`xAI`,zai:`Z.AI`};function Mt(e){return e.split(`.`)[0]}function Nt(e){let t=e.toLowerCase(),n=Mt(t);if(n===`anthropic`&&t.includes(`.claude-`))return`messages`;if(n===`openai`)return t.includes(`.gpt-oss`)?`chat_completions`:t.includes(`.gpt-`)?`responses`:void 0;if(n===`xai`&&t.includes(`.grok-`))return`responses`;if(n===`google`&&t.includes(`.gemma-`))return kt(t,`google.gemma-`,4,0)?`responses`:kt(t,`google.gemma-`,3,0)?`chat_completions`:void 0;if(At.has(n))return`chat_completions`}function Pt(e){let t=e.toLowerCase(),n=Nt(t);if(!n)return;let r=Mt(t);return{protocol:n,owner:jt[r]??r}}function Ft(e){return Pt(e)?xt(e,`mantle`):{input:{},output:{}}}const It={"chatgpt-4o-latest":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0}},Lt={gpt:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-3.5":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"gpt-4":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4-turbo":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4o":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4.1":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4.5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"chatgpt-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"dall-e":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"gpt-oss":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},o:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"o1-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"o1-preview":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"omni-moderation":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},sora:{input:{text:!0,image:!0,video:!0,audio:!1,embed:!1},output:{text:!1,image:!1,video:!0,audio:!0,embed:!1},tool_support:!1},"text-embedding":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!1,video:!1,audio:!1,embed:!0},tool_support:!1},"text-moderation":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},whisper:{input:{text:!1,image:!1,video:!1,audio:!0,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1}},Rt=[`image`],zt=[`video`],Bt=[`audio`],Vt=[`text`],Ht=[`image`],Ut=[`video`],Wt=[`audio`],Gt=[`text`],Kt=[`embed`],qt=[`tool`,`gpt`,`gpt-5`,`o1`,`o3`,`o4`];function C(e,t){return t.some(t=>e.includes(t))}function Jt(e){return e.toLowerCase()}function Yt(e){let t=Jt(e),n=It[t];if(n)return{...n,tool_support_streaming:n.tool_support_streaming??n.tool_support};let r,i=0;for(let e of Object.keys(Lt))t.startsWith(e)&&e.length>i&&(r=e,i=e.length);if(r){let e=Lt[r];return{...e,tool_support_streaming:e.tool_support_streaming??e.tool_support}}let a={text:C(t,Vt)||void 0,image:C(t,Rt)||void 0,video:C(t,zt)||void 0,audio:C(t,Bt)||void 0,embed:!1},o={text:C(t,Gt)||void 0,image:C(t,Ht)||void 0,video:C(t,Ut)||void 0,audio:C(t,Wt)||void 0,embed:C(t,Kt)||void 0},s=C(t,qt)||void 0;return{input:a,output:o,tool_support:s,tool_support_streaming:s}}const Xt={"gemini-2.0-flash-lite-001":{input:{text:!0,image:!0,video:!0,audio:!0,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"gemma-4-26b-a4b-it-maas":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1}},Zt={gemini:{input:{text:!0,image:!0,video:!0,audio:!0,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gemini-2.5-flash-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"gemini-3.0-pro-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"gemini-3.0-flash-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},imagen:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-3.0":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-3.0-capability":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-4.0":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-4.0-capability":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},claude:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},llama:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"llama-2":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"llama-3.2":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"llama-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"grok-3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},grok:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},deepseek:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},gemma:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},glm:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-oss":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},kimi:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},minimax:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},qwen:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0}},Qt=[`image`],$t=[`video`],en=[`audio`],tn=[`text`],nn=[`image`],rn=[`video`],an=[`audio`],on=[`text`],sn=[`embed`],cn=[`tool`,`sonnet`,`opus`,`gemini`,`claude`,`grok`,`deepseek`,`gemma`,`glm`,`gpt-oss`,`kimi`,`llama`,`minimax`,`qwen`];function w(e,t){return t.some(t=>e.includes(t))}function ln(e){let t=e.toLowerCase().split(`/`);return t[t.length-1]}function un(e){let t=ln(e),n=Xt[t];if(n)return n;let r,i=0;for(let e of Object.keys(Zt))t.startsWith(e)&&e.length>i&&(r=e,i=e.length);return r?Zt[r]:{input:{text:w(t,tn)||void 0,image:w(t,Qt)||void 0,video:w(t,$t)||void 0,audio:w(t,en)||void 0,embed:!1},output:{text:w(t,on)||void 0,image:w(t,nn)||void 0,video:w(t,rn)||void 0,audio:w(t,an)||void 0,embed:w(t,sn)||void 0},tool_support:w(t,cn)||void 0}}function dn(e,t){if(e.startsWith(`locations/`)){let t=e.split(`/`);t.length>=3&&(e=t.slice(2).join(`/`))}let n=fn(e,t);return n.input.audio=!1,n.output.audio=!1,n.output.video=!1,n}function fn(e,t){switch(t?.toLowerCase()){case b.anthropic:return tt(e);case b.vertexai:return un(e);case b.openai:return Yt(e);case b.openai_compatible:return T(e);case b.bedrock:return St(e);case b.bedrock_mantle:return Ft(e);case b.azure_foundry:return mt(e);case b.groq:case b.mistralai:return T(e);case b.togetherai:return hn(e);case b.xai:return{input:{text:!0,image:e.includes(`vision`)},output:{text:!0},tool_support:!0};default:return e.startsWith(`gpt`)?Yt(e):e.startsWith(`claude`)?tt(e):e.startsWith(`grok`)?{input:{text:!0,image:e.includes(`vision`)},output:{text:!0},tool_support:!0}:e.startsWith(`publishers/`)?un(e):e.startsWith(`arn:aws`)?St(e):{input:{},output:{}}}}const pn=[`image`,`embed`,`moderation`,`whisper`,`sora`,`dall-e`,`tts`];function T(e){let t=Yt(e);if(t.tool_support!==void 0)return t;let n=e.toLowerCase(),r=pn.some(e=>n.includes(e));return{input:{text:!0},output:{text:!0},tool_support:!r,tool_support_streaming:!r}}const mn=[`vision`,`llama-4`,`gemma-3`,`qwen2-vl`,`qwen2.5-vl`,`-vl-`];function hn(e){let t=T(e),n=e.toLowerCase();return mn.some(e=>n.includes(e))&&(t.input={...t.input,image:!0}),t}function gn(e,t,n=!1){let r=dn(e,t);return n?!!(r.tool_support_streaming??r.tool_support):!!r.tool_support}var _n;(function(e){e.TEXT_IMAGE=`TEXT_IMAGE`,e.EDIT_MODE_INPAINT_REMOVAL=`EDIT_MODE_INPAINT_REMOVAL`,e.EDIT_MODE_INPAINT_INSERTION=`EDIT_MODE_INPAINT_INSERTION`,e.EDIT_MODE_BGSWAP=`EDIT_MODE_BGSWAP`,e.EDIT_MODE_OUTPAINT=`EDIT_MODE_OUTPAINT`,e.CUSTOMIZATION_SUBJECT=`CUSTOMIZATION_SUBJECT`,e.CUSTOMIZATION_STYLE=`CUSTOMIZATION_STYLE`,e.CUSTOMIZATION_CONTROLLED=`CUSTOMIZATION_CONTROLLED`,e.CUSTOMIZATION_INSTRUCT=`CUSTOMIZATION_INSTRUCT`})(_n||={});var vn;(function(e){e.MASK_MODE_USER_PROVIDED=`MASK_MODE_USER_PROVIDED`,e.MASK_MODE_BACKGROUND=`MASK_MODE_BACKGROUND`,e.MASK_MODE_FOREGROUND=`MASK_MODE_FOREGROUND`,e.MASK_MODE_SEMANTIC=`MASK_MODE_SEMANTIC`})(vn||={});var yn;(function(e){e.HIGH=`HIGH`,e.MEDIUM=`MEDIUM`,e.LOW=`LOW`,e.MINIMAL=`MINIMAL`,e.THINKING_LEVEL_UNSPECIFIED=`THINKING_LEVEL_UNSPECIFIED`})(yn||={});var E;(function(e){e.virtual_lb=`virtual_lb`,e.virtual_mediator=`virtual_mediator`,e.test=`test`})(E||={});const bn={...b,...E},xn={virtual_lb:{id:E.virtual_lb,name:`Virtual - Load Balancer`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},virtual_mediator:{id:E.virtual_mediator,name:`Virtual - Mediator`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},test:{id:E.test,name:`Test LLM`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1}},Sn={...Ct,...xn};function Cn(e){if(!e||e.provider!==bn.vertexai)return;let t=e.settings?.bucket_access_principal;return typeof t==`string`&&t.trim().length>0?t.trim():void 0}const wn=`id name tags description properties clearance compartments`,Tn=`members`;function En(e){return e.startsWith(`*.`)?e.slice(2):e}function Dn(e){return e.startsWith(`[`)&&e.endsWith(`]`)?e.slice(1,-1):e}function On(e){let t=e.indexOf(`:`);return t>=0&&e.indexOf(`:`,t+1)>=0&&!e.startsWith(`[`)}function kn(e){return e.includes(` `)||e.includes(` `)||e.includes(`
|
|
2
|
-
`)||e.includes(`\r`)||e.includes(`\f`)||e.includes(`\v`)}function D(e){if(typeof e!=`string`)return;let t=e.trim().toLowerCase();if(t){t=En(t),t=t.endsWith(`.`)?t.slice(0,-1):t,t.includes(`://`)||(t=On(t)?`https://[${t}]`:`https://${t}`);try{let e=En(Dn(new URL(t).hostname.toLowerCase()));return e=e.endsWith(`.`)?e.slice(0,-1):e,e&&!kn(e)?e:void 0}catch{return}}}function O(e,t){try{return D((t?new URL(e,t):new URL(e)).hostname)}catch{return}}function An(e){return Array.isArray(e)?Array.from(new Set(e.map(e=>D(e)).filter(e=>!!e))):[]}function jn(e,t){if(!t||t.length===0)return!0;let n=D(e);return n?t.some(e=>{let t=D(e);return!!t&&(n===t||n.endsWith(`.${t}`))}):!1}function Mn(e,t,n){if(!t||t.length===0)return!0;let r=O(e,n);return!!r&&jn(r,t)}function Nn(e){let t=D(e);return!!t&&(t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`vertesia.io`||t.endsWith(`.vertesia.io`))}function Pn(e){return Nn(O(e))}var Fn;(function(e){e.gladia=`gladia`,e.github=`github`,e.aws=`aws`,e.magic_pdf=`magic_pdf`,e.serper=`serper`,e.exa=`exa`,e.linkup=`linkup`,e.resend=`resend`,e.ask_user_webhook=`ask_user_webhook`})(Fn||={});function In(e,t){return{...t,integration:e}}var Ln;(function(e){e.analyzed_pages=`analyzed_pages`,e.extracted_tables=`extracted_tables`,e.analyzed_images=`analyzed_images`,e.input_token_used=`input_token_used`,e.output_token_used=`output_token_used`,e.task_run=`task_run`})(Ln||={});const Rn=`openid`,k=`profile`,zn=`offline_access`,Bn=`project_switch`,Vn=[Rn,k,zn],Hn=[Bn],Un=new Set([t.api_key_secret_read,t.manage_billing,t.billing_read,t.iam_impersonate,t.studio_access]),Wn=Object.values(t).filter(e=>!Un.has(e)),Gn=new Set(Vn),Kn=new Set(Hn),qn=new Set(Wn),Jn=/^[0-9a-f]{24}$/i,Yn=`project:`;function Xn(){return[...Wn]}function Zn(e){return Gn.has(e)}function Qn(e){return Kn.has(e)}function $n(e){return qn.has(e)}function er(e){return Zn(e)||Qn(e)||$n(e)}function tr(e){return e.startsWith(Yn)?Jn.test(e.slice(8)):!1}function nr(e){return`${Yn}${e}`}function rr(e){return e.includes(Rn)}function ir(e){return e.includes(k)}function ar(e){return e.includes(zn)}function or(e){return e.includes(Bn)}function sr(e){return rr(e)?[...e]:e.filter(e=>e!==k)}function cr(e){return e.filter($n)}var lr=class{parent;parentUnits;spanUnits;unitsDone;constructor(e,t,n){this.parent=e,this.parentUnits=t,this.spanUnits=n,this.unitsDone=0}done(e){let t=this.spanUnits-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e,this.parent.done(e*this.parentUnits/this.spanUnits))}get parentUnitsDone(){return Math.round(this.unitsDone*this.parentUnits/this.spanUnits)}get isDone(){return this.unitsDone>=this.spanUnits}},ur=class{total;unitsDone=0;constructor(e){this.total=e}get fraction(){return this.unitsDone/this.total}get percent(){return Math.round(this.fraction*100)}get isDone(){return this.unitsDone>=this.total}done(e){let t=this.total-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e)}span(e,t){return new lr(this,e,t||e)}};const dr=`sys:GeneralAgent`,fr=`^[a-z][a-z0-9_-]*$`,A=`^[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*$`,pr=RegExp(fr),j=RegExp(A),mr=[`security`,`revision`,`is_deleted`,`embeddings_text`,`embeddings_image`,`embeddings_properties`,`_indexing_metadata`],hr=A,gr=j;function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var N;(function(e){e.owner=`owner`,e.admin=`admin`,e.manager=`manager`,e.developer=`developer`,e.application=`application`,e.automation=`automation`,e.content_processor=`content_processor`,e.consumer=`consumer`,e.executor=`executor`,e.reader=`reader`,e.auditor=`auditor`,e.support=`support`,e.billing=`billing`,e.member=`member`,e.app_member=`app_member`,e.content_superadmin=`content_superadmin`})(N||={});function _r(e,t){switch(t){case N.owner:return!0;case N.admin:return e!==N.billing&&e!==N.owner;case N.developer:return e===N.developer;case N.billing:return e===N.billing;default:return!1}}var vr;(function(e){e.public=`public`,e.account=`account`,e.project=`project`})(vr||={});var P;(function(e){e.content_type=`content_type`,e.intake=`intake`,e.analysis=`analysis`,e.agent=`agent`,e.non_applicable=`non_applicable`})(P||={});const yr={ExtractInformation:P.intake,SelectDocumentType:P.intake,GenerateMetadataModel:P.content_type,ChunkDocument:P.intake,IdentifyTextSections:P.intake,AnalyzeDocument:P.analysis,ReduceTextSections:P.analysis,GenericAgent:P.non_applicable,AdhocTaskAgent:P.non_applicable,Mediator:P.non_applicable,AnalyzeConversation:P.analysis,GetAgentConversationTopic:P.analysis,ContentSearchAgent:P.analysis,StudioAssistant:P.agent};function br(e){e.startsWith(`sys:`)&&(e=e.substring(4));let t=yr[e];if(t!==P.non_applicable)return t||void 0}const xr={type:`object`,properties:{enabled:{type:`boolean`,nullable:!0,description:`Enable the browser_use workflow-level tool for this project. Defaults to true.`},default_policy:{type:`string`,nullable:!0,enum:[`read_only`,`low_write`,`requires_approval`,`unrestricted`],description:`Risk policy used when a browser_use call does not specify one. Defaults to low_write.`},max_policy:{type:`string`,nullable:!0,enum:[`read_only`,`low_write`,`requires_approval`,`unrestricted`],description:`Maximum risk policy a browser_use call may request. Defaults to unrestricted.`},allowed_hosts:{type:`array`,nullable:!0,items:{type:`string`},description:`Optional project-wide host allowlist. When present, browser_use calls can only request hosts contained by this list.`},allow_file_uploads:{type:`boolean`,nullable:!0,description:`Allow replay scripts to hydrate artifacts/documents as files in the browser sandbox. Defaults to true.`},allow_playwright_scripts:{type:`boolean`,nullable:!0,description:`Allow browser_playwright_script in browser workstreams. Defaults to true.`},capture_screenshots:{type:`string`,nullable:!0,enum:[`off`,`on_action`,`each_turn`],description:`Persist browser screenshots for UI progress. Defaults to on_action.`},prefer_raw_screenshots:{type:`boolean`,nullable:!0,description:`Prefer unannotated screenshots in the browser-use UI widget. Defaults to true.`}},required:[],additionalProperties:!1},Sr=[`keyword`,`text`,`boolean`,`long`,`double`,`date`],Cr=8191;function wr(e){if(e===void 0)return[];if(!e||typeof e!=`object`||Array.isArray(e))return[`indexing.property_mappings must be an object keyed by property path`];let t=Object.entries(e),n=[];t.length>200&&n.push(`indexing.property_mappings must contain at most 200 fields`);let r=new Set(Sr);for(let[e,i]of t){let t=`indexing.property_mappings.${e}`;if(j.test(e)||n.push(`${t} must be a dot-separated path containing only letters, numbers, and underscores`),!i||typeof i!=`object`||Array.isArray(i)){n.push(`${t} must be an object`);continue}let a=i,o=Object.keys(a).filter(e=>![`type`,`format`,`ignore_above`,`ignore_malformed`].includes(e));o.length>0&&n.push(`${t} contains unsupported option(s): ${o.join(`, `)}`),(typeof a.type!=`string`||!r.has(a.type))&&n.push(`${t}.type must be one of: ${Sr.join(`, `)}`),a.format!==void 0&&(a.type!==`date`||typeof a.format!=`string`)&&n.push(`${t}.format is supported only for date mappings`),a.ignore_above!==void 0&&(a.type!==`keyword`||!Number.isInteger(a.ignore_above)||a.ignore_above<1||a.ignore_above>Cr)&&n.push(`${t}.ignore_above is supported only for keyword mappings and must be an integer from 1 to ${Cr}`),a.ignore_malformed!==void 0&&(![`long`,`double`,`date`].includes(String(a.type))||typeof a.ignore_malformed!=`boolean`)&&n.push(`${t}.ignore_malformed is supported only for long, double, and date mappings`)}return n}var Tr;(function(e){e.text=`text`,e.image=`image`,e.properties=`properties`})(Tr||={});var F;(function(e){e.full_text=`full_text`})(F||={});const Er={...Tr,...F},Dr=`id name account`;function Or(e){return e<5e4?{shard_size:Math.max(Math.ceil(e/4),5e3),parallel_shard_count:Math.min(4,Math.max(1,Math.ceil(e/5e3))),max_shards:4}:e<5e5?{shard_size:5e4,parallel_shard_count:8,max_shards:10}:e<2e6?{shard_size:1e5,parallel_shard_count:8,max_shards:20}:{shard_size:25e4,parallel_shard_count:8,max_shards:40}}const kr={en:`English`,zh:`Chinese`,es:`Spanish`,hi:`Hindi`,ar:`Arabic`,pt:`Portuguese`,bn:`Bengali`,ru:`Russian`,ja:`Japanese`,de:`German`,fr:`French`,ko:`Korean`,it:`Italian`,tr:`Turkish`,vi:`Vietnamese`,pl:`Polish`,uk:`Ukrainian`,nl:`Dutch`,th:`Thai`,el:`Greek`,cs:`Czech`,sv:`Swedish`,ro:`Romanian`,hu:`Hungarian`,da:`Danish`,fi:`Finnish`,no:`Norwegian`,he:`Hebrew`,id:`Indonesian`,fa:`Persian`},Ar=[`running`],jr=3e4,Mr=5e4,I=[`content`,`workflow`,`security`,`billing`,`system`,`external`],L=[`high`,`normal`,`low`],Nr=10,Pr=30,Fr=4e3,Ir=2e4,Lr=2e3,Rr=`received`,zr=`external_event`,Br=`external:`,Vr=N.automation,Hr=[N.automation,N.executor,N.reader],Ur=`!.!!.!=.!==.%.*.+.-./.<.<=.==.===.>.>=.?:.all.and.cat.filter.if.in.map.max.merge.min.missing.missing_some.none.or.reduce.some.substr.var`.split(`.`);function R(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function z(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Wr(e,t){if(!R(e)){t.push(`filter must be an object`);return}let n=e;if(n.event_category!==void 0)if(!z(n.event_category))t.push(`filter.event_category must be an array of strings`);else for(let e of n.event_category)e!==`*`&&!I.includes(e)&&t.push(`filter.event_category contains unsupported value: ${e}`);if(n.exclude_event_category!==void 0)if(!z(n.exclude_event_category))t.push(`filter.exclude_event_category must be an array of strings`);else for(let e of n.exclude_event_category)I.includes(e)||t.push(`filter.exclude_event_category contains unsupported value: ${e}`);n.action!==void 0&&!z(n.action)&&t.push(`filter.action must be an array of strings`),n.resource_type!==void 0&&!z(n.resource_type)&&t.push(`filter.resource_type must be an array of strings`),n.condition!==void 0&&!R(n.condition)&&t.push(`filter.condition must be a JSON Logic object`)}function Gr(e,t){if(!R(e)){t.push(`target must be an object`);return}let n=e.type;if(n!==`workflow`&&n!==`webhook`&&n!==`agent`&&n!==`process`){t.push(`target.type must be one of workflow, webhook, agent, process`);return}let r=e;switch(r.type){case`workflow`:(typeof r.endpoint!=`string`||r.endpoint.length===0)&&t.push(`workflow target requires a non-empty "endpoint"`);break;case`webhook`:(typeof r.url!=`string`||r.url.length===0)&&t.push(`webhook target requires a non-empty "url"`),r.timeout_ms!==void 0&&(!Number.isInteger(r.timeout_ms)||r.timeout_ms<=0||r.timeout_ms>5e4)&&t.push(`webhook target.timeout_ms must be an integer between 1 and ${Mr}`),r.signing_mode!==void 0&&r.signing_mode!==`signed`&&r.signing_mode!==`legacy_unsigned`&&t.push(`webhook target.signing_mode must be "signed" or "legacy_unsigned"`),r.payload_mode!==void 0&&r.payload_mode!==`event_envelope`&&r.payload_mode!==`legacy_notify_endpoint`&&r.payload_mode!==`workflow_notification`&&t.push(`webhook target.payload_mode must be "event_envelope", "legacy_notify_endpoint" or "workflow_notification"`),r.encrypted_headers===!0&&t.push(`webhook target.encrypted_headers is not supported`),r.headers!==void 0&&!R(r.headers)&&t.push(`webhook target.headers must be an object of strings`);break;case`process`:(typeof r.process_ref!=`string`||r.process_ref.length===0)&&!R(r.process_definition)&&t.push(`process target requires "process_ref" or an inline "process_definition"`);break;case`agent`:{let e=r.on_match??`start`;e!==`start`&&e!==`signal`&&e!==`ensure`&&t.push(`agent target.on_match must be "start", "signal", or "ensure"`),(e===`signal`||e===`ensure`)&&(typeof r.message_path!=`string`||r.message_path.length===0)&&t.push(`agent target.message_path is required when on_match is "${e}"`),r.signal_name!==void 0&&r.signal_name!==`UserInput`&&t.push(`agent target.signal_name must be "UserInput"`);for(let e of[`interaction_ref`,`message_path`,`client_message_id_path`,`skip_if_path_exists`,`author_path`]){let n=r[e];n!==void 0&&typeof n!=`string`&&t.push(`agent target.${e} must be a string`)}if(r.metadata!==void 0&&!R(r.metadata)&&t.push(`agent target.metadata must be an object`),r.statuses!==void 0)if(!z(r.statuses))t.push(`agent target.statuses must be an array of strings`);else{let e=r.statuses.filter(e=>!Ar.includes(e));e.length>0&&t.push(`agent target.statuses may only contain signalable statuses: ${e.join(`, `)} not allowed. Allowed: ${Ar.join(`, `)} (terminal runs are handled by on_terminal).`)}for(let e of[`ignore_author_patterns`,`require_command_prefixes`,`require_mentions`]){let n=r[e];n!==void 0&&!z(n)&&t.push(`agent target.${e} must be an array of strings`)}r.missing_thread!==void 0&&(e===`signal`?r.missing_thread!==`retry`&&r.missing_thread!==`skip`&&t.push(`agent target.missing_thread must be "retry" or "skip"`):t.push(`agent target.missing_thread is only valid when on_match is "signal"`)),r.on_terminal!==void 0&&r.on_terminal!==`skip`&&r.on_terminal!==`restart`&&t.push(`agent target.on_terminal must be "skip" or "restart"`);break}}}function Kr(e,t){e.description!==void 0&&typeof e.description!=`string`&&t.push(`description must be a string`),e.run_as_role!==void 0&&!Object.values(N).includes(e.run_as_role)&&t.push(`run_as_role contains unsupported value: ${e.run_as_role}`),e.enabled!==void 0&&typeof e.enabled!=`boolean`&&t.push(`enabled must be a boolean`),e.priority!==void 0&&!L.includes(e.priority)&&t.push(`priority must be one of ${L.join(`, `)}`)}function qr(e){let t=[];return(typeof e?.name!=`string`||e.name.trim().length===0)&&t.push(`name is required`),e?.scope!==void 0&&e.scope!==`account`&&e.scope!==`project`&&t.push(`scope must be "account" or "project"`),e?.filter===void 0?t.push(`filter is required`):Wr(e.filter,t),e?.target===void 0?t.push(`target is required`):Gr(e.target,t),e?.run_as_role===void 0&&t.push(`run_as_role is required`),Kr(e??{},t),{valid:t.length===0,errors:t}}function Jr(e){let t=[];return R(e)?(e.name!==void 0&&(typeof e.name!=`string`||e.name.trim().length===0)&&t.push(`name must be a non-empty string`),e.filter!==void 0&&Wr(e.filter,t),e.target!==void 0&&Gr(e.target,t),Kr(e,t),{valid:t.length===0,errors:t}):{valid:!1,errors:[`update payload must be an object`]}}function Yr(e){let t=qr(e);if(!t.valid)throw Error(t.errors.join(`; `))}function Xr(e){let t=Jr(e);if(!t.valid)throw Error(t.errors.join(`; `))}var Zr;(function(e){e.draft=`draft`,e.published=`published`,e.archived=`archived`})(Zr||={});var B;(function(e){e.chat=`chat`,e.template=`template`})(B||={});var Qr;(function(e){e.jst=`jst`,e.handlebars=`handlebars`,e.text=`text`})(Qr||={});var $r;(function(e){e.project=`Project`,e.projects=`Projects`,e.environment=`Environment`,e.user=`User`,e.account=`Account`,e.interaction=`Interaction`,e.userGroup=`UserGroup`})($r||={});const ei=[`document`,`collection`,`task`],ti=`x-extract`;function ni(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function ri(e,t){if(!e.startsWith(`#/`))return;let n=t;for(let t of e.slice(2).split(`/`).map(ni)){if(!n||typeof n!=`object`||Array.isArray(n))return;n=n[t]}return n}function ii(e,t,n){if(!e||typeof e!=`object`||Array.isArray(e))return!0;let r=e;if(r[`x-extract`]===!1)return!1;if(typeof r.$ref==`string`&&!n.has(r.$ref)){n.add(r.$ref);let e=ri(r.$ref,t);if(e!==void 0)return ii(e,t,n)}return!0}function V(e,t=e){return ii(e,t,new Set)}function ai(e,t){if(!Array.isArray(e))return;let n=e.map(e=>H(e,t)).filter(e=>e!==void 0);return n.length>0?n:void 0}function oi(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return;let n={};for(let[r,i]of Object.entries(e)){let e=H(i,t);e!==void 0&&(n[r]=e)}return Object.keys(n).length>0?n:void 0}function H(e,t){if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(e=>H(e,t));if(!V(e,t))return;let n={...e};for(let e of[`$defs`,`definitions`]){let r=oi(n[e],t);r?n[e]=r:delete n[e]}if(n.items&&typeof n.items==`object`){let e=H(n.items,t);e===void 0?delete n.items:n.items=e}for(let e of[`anyOf`,`oneOf`,`allOf`])if(Array.isArray(n[e])){let r=ai(n[e],t);if(!r)return;n[e]=r}if(n.additionalProperties&&typeof n.additionalProperties==`object`&&(n.additionalProperties=H(n.additionalProperties,t)??!1),n.properties&&typeof n.properties==`object`&&!Array.isArray(n.properties)){let e={};for(let[r,i]of Object.entries(n.properties)){let n=H(i,t);n!==void 0&&(e[r]=n)}if(n.properties=e,Array.isArray(n.required)){let t=n.required.filter(t=>typeof t==`string`&&t in e);t.length>0?n.required=t:delete n.required}}return delete n[ti],n}function si(e){return H(e,e)??{}}function ci(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return e;let n=e;return typeof n.$ref==`string`?ri(n.$ref,t)??e:e}function U(e,t,n,r){if(!n||typeof n!=`object`||Array.isArray(n))return t;let i=ci(n,r);if(!i||typeof i!=`object`||Array.isArray(i))return t;let a=i;if(Array.isArray(t)){let e=a.items;return!e||typeof e!=`object`?t:t.map(t=>U(void 0,t,e,r))}if(!t||typeof t!=`object`||Array.isArray(t))return t;let o=a.properties;if(!o||typeof o!=`object`||Array.isArray(o))return t;let s=e&&typeof e==`object`&&!Array.isArray(e)?e:{},c=t,ee=o,l={...c};for(let[e,t]of Object.entries(ee)){if(!V(t,r)){e in s?l[e]=s[e]:delete l[e];continue}e in c&&(l[e]=U(s[e],c[e],t,r))}return l}function li(e,t,n){return U(e,t,n,n)}const ui=[`ask`,`auto_review`,`full_control`];function di(e,t){return t===!0?e??`full_control`:`full_control`}function fi(e){return typeof e==`string`&&ui.includes(e)}var pi;(function(e){e.active=`active`,e.archived=`archived`})(pi||={});function mi(e){return`agents/${e}/tool-input-refs.json`}function hi(e,t){let n=e?.agent_run_id||t;return e?.launch_id&&e?.agent_run_id?`${n}/workstreams/${e.launch_id}`:n}function gi(e){return`steps`in e&&e.steps?{...e,spec_format:`steps`}:{...e,spec_format:`activities`}}const _i=`id name description tags created_at updated_at`;function vi(e,t){return`${e.slice(0,6)}:workflow_execution_request:${t}:grounded`}const yi={type:`object`,description:`Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.`,properties:{mime_type:{type:`string`,description:`The format of the rendition. This is a MIME type.`},source_etag:{type:`string`,description:`The ETag of the file used for the rendition.`,nullable:!0},height:{type:`integer`,description:`The height of the rendition`,nullable:!0},width:{type:`integer`,description:`The width of the rendition`,nullable:!0},multipart:{type:`boolean`,description:`If the rendition is a multi-part rendition`,nullable:!0,default:!1},total_parts:{type:`integer`,description:`The total number of parts in the rendition`,nullable:!0}},required:[`mime_type`]},bi={type:`object`,description:`Represent a semantic chunk of a document`,properties:{source_etag:{type:`string`,description:`The ETag of the file used for the rendition.`,nullable:!0},part_number:{type:`integer`,description:`The part number of the chunk`},title:{type:`string`,description:`The title of the chunk`,nullable:!0},source_line_start:{type:`integer`,description:`The line number where the chunk starts`,nullable:!0},source_line_end:{type:`integer`,description:`The line number where the chunk ends`,nullable:!0},type:{type:`string`,description:`The type of the chunk`,enum:[`text`,`image`,`table`,`chart`,`diagram`,`code`,`other`],nullable:!0},page_number:{type:`integer`,description:`The page number of the document part`,nullable:!0},description:{type:`string`,description:`The description of the document part, if it's an image, the exhaustive description of the image`,nullable:!0},height:{type:`integer`,description:`The height of the rendition`,nullable:!0},width:{type:`integer`,description:`The width of the rendition`,nullable:!0}},required:[`part_number`]},xi=1,Si=`https://schemas.vertesia.com/process-definition.v1.schema.json`,Ci={$id:Si,type:`object`,description:`A process definition describes a state-machine workflow executed by the Process Engine.`,properties:{format_version:{type:`integer`,const:1,description:`Native process definition format version.`},process:{type:`string`,minLength:1,description:`Stable process code, for example invoice_approval.`},description:{type:`string`,nullable:!0,description:`Optional human-readable process description.`},initial:{type:`string`,minLength:1,description:`Initial node id. Semantic validation verifies this exists in nodes.`},model:{type:`string`,nullable:!0,description:`Optional default model for agent and interaction nodes.`},context:{$ref:`#/$defs/processContextDefinition`},nodes:{type:`object`,description:`Map of node id to node definition.`,minProperties:1,required:[],additionalProperties:{$ref:`#/$defs/nodeDefinition`}},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`format_version`,`process`,`initial`,`context`,`nodes`],additionalProperties:!1,$defs:{metadataDefinition:{type:`object`,nullable:!0,description:`Execution-irrelevant metadata such as editor layout, provenance, and audit hints.`,required:[],additionalProperties:!0},processContextDefinition:{type:`object`,properties:{schema:{description:`JSON Schema for the process context.`,anyOf:[{type:`boolean`},{type:`object`,additionalProperties:!0}]},initial:{type:`object`,description:`Initial context values.`,required:[],additionalProperties:!0}},required:[`schema`,`initial`],additionalProperties:!1},nodeDefinition:{type:`object`,description:`A state-machine node executed by the Process Engine.`,properties:{type:{type:`string`,enum:[`tool`,`interaction`,`agent`,`process`,`human_task`,`foreach`,`branch`,`condition`,`final`],description:`Node executor type.`},tool:{type:`string`,nullable:!0,description:`Builtin or remote tool name for tool nodes.`},interaction:{type:`string`,nullable:!0,description:`Interaction id or sys: interaction for interaction and agent nodes.`},process:{type:`string`,nullable:!0,description:`Stored child process id or process code for process nodes.`},process_definition:{$ref:`#`,description:`Inline child process definition for process nodes.`},process_version:{type:`number`,nullable:!0,description:`Stored child process version.`},run_type:{type:`string`,enum:[`supervised`,`programmatic`],nullable:!0,description:`Run type for child process nodes.`},returns:{$ref:`#/$defs/processNodeReturnsDefinition`},result_schema:{$ref:`#/$defs/jsonSchemaDefinition`,description:`Optional JSON Schema for structured output from interaction and agent nodes.`},prompt:{type:`string`,nullable:!0,description:`Prompt or instructions for agent and interaction nodes.`},input:{type:`object`,nullable:!0,description:`Node input template. Values may contain {{context_path}} placeholders.`,required:[],additionalProperties:!0},config:{type:`object`,nullable:!0,description:`Executor-specific configuration.`,required:[],additionalProperties:!0},title:{type:`string`,nullable:!0,description:`Short display title.`},description:{type:`string`,nullable:!0,description:`Developer-facing node description.`},human_description:{type:`string`,nullable:!0,description:`End-user-facing explanation of what this node does.`},writes:{type:`array`,nullable:!0,description:`Context paths this node may write.`,items:{type:`string`}},skippable:{type:`boolean`,nullable:!0,description:`Whether a supervisor may skip this node.`},max_retries:{type:`number`,nullable:!0,description:`Maximum node retry attempts.`},transitions:{type:`array`,nullable:!0,description:`Outgoing transitions. Semantic validation verifies targets exist.`,items:{$ref:`#/$defs/transitionDefinition`}},tools:{type:`array`,nullable:!0,description:`Additional tool names available to an agent node.`,items:{type:`string`}},model:{type:`string`,nullable:!0,description:`Model override for this node.`},task:{$ref:`#/$defs/humanTaskDefinition`},foreach:{type:`string`,nullable:!0,description:`Context path to an array for foreach nodes.`},as:{type:`string`,nullable:!0,description:`Variable name for the current foreach item. Defaults to item.`},item_id:{type:`string`,nullable:!0,description:`Template for a stable item id in foreach collection output.`},node:{$ref:`#/$defs/nodeDefinition`,description:`Child node executed for each foreach item or branch child definition.`},max_concurrency:{type:`integer`,minimum:1,nullable:!0,description:`Maximum concurrent child executions for foreach nodes.`},collect:{description:`Where and how to collect foreach or branch results.`,oneOf:[{type:`string`,minLength:1},{$ref:`#/$defs/parallelCollectDefinition`}]},failure_policy:{type:`string`,enum:[`fail_fast`,`collect_errors`],nullable:!0,description:`Foreach or branch failure policy.`},join:{type:`string`,enum:[`all`],nullable:!0,description:`Branch join policy.`},branches:{type:`array`,nullable:!0,description:`Condition or branch-node branches. Semantic validation verifies the type-specific shape.`,items:{oneOf:[{$ref:`#/$defs/branchDefinition`},{$ref:`#/$defs/branchNodeBranchDefinition`}]}},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`type`],additionalProperties:!1},transitionDefinition:{type:`object`,properties:{to:{type:`string`,minLength:1,description:`Target node id.`},guard:{$ref:`#/$defs/jsonLogicRule`,description:`JSON Logic guard evaluated before transition.`},trigger:{type:`string`,enum:[`auto`,`agent`,`user`],nullable:!0,description:`Transition trigger. Omitted means auto.`},label:{type:`string`,nullable:!0,description:`Display label.`},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`to`],additionalProperties:!1},branchDefinition:{type:`object`,properties:{to:{type:`string`,minLength:1,description:`Target node id.`},when:{$ref:`#/$defs/jsonLogicRule`,description:`JSON Logic condition for this branch.`},default:{type:`boolean`,nullable:!0,description:`Fallback branch used when no condition matches.`},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`to`],additionalProperties:!1},branchNodeBranchDefinition:{type:`object`,properties:{id:{type:`string`,minLength:1,description:`Stable branch id.`},title:{type:`string`,nullable:!0,description:`Optional branch title.`},description:{type:`string`,nullable:!0,description:`Optional branch description.`},node:{$ref:`#/$defs/nodeDefinition`,description:`Child node executed for this branch.`},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`id`,`node`],additionalProperties:!1},humanTaskDefinition:{type:`object`,properties:{title:{type:`string`,minLength:1,description:`Task title shown in the inbox.`},description:{type:`string`,nullable:!0,description:`Task instructions shown to the assignee.`},assignee:{type:`string`,nullable:!0,description:`User id or group:<name> assignee reference.`},fields:{type:`array`,description:`Fields required to complete the task.`,items:{$ref:`#/$defs/taskField`}}},required:[`title`,`fields`],additionalProperties:!1},taskField:{type:`object`,properties:{name:{type:`string`,minLength:1,description:`Context/result field name.`},type:{type:`string`,enum:[`string`,`number`,`boolean`,`select`,`text`],description:`Input field type.`},required:{type:`boolean`,nullable:!0,description:`Whether the field must be answered.`},label:{type:`string`,nullable:!0,description:`Display label.`},options:{type:`array`,nullable:!0,description:`Allowed options for select fields.`,items:{type:`string`}},default:{description:`Default field value.`}},required:[`name`,`type`],additionalProperties:!1},processNodeReturnsDefinition:{type:`object`,properties:{from:{type:`string`,nullable:!0,description:`Path to read from child state or context.`},context:{type:`array`,nullable:!0,description:`Child context paths to return.`,items:{type:`string`}}},required:[],additionalProperties:!1},parallelCollectDefinition:{type:`object`,properties:{into:{type:`string`,minLength:1,description:`Context key receiving collected results.`},mode:{type:`string`,enum:[`array`],nullable:!0,description:`Collection mode.`},include:{type:`array`,nullable:!0,description:`Fields included in each collected item.`,items:{type:`string`,enum:[`status`,`index`,`item`,`item_id`,`branch_id`,`branch_title`,`output`,`context_update`,`error`,`child_run_id`,`child_workflow_id`,`child_workflow_run_id`]}}},required:[`into`],additionalProperties:!1},jsonLogicRule:{type:`object`,description:`JSON Logic expression.`,required:[],additionalProperties:!0},jsonSchemaDefinition:{type:`object`,nullable:!0,description:`JSON Schema object.`,required:[],additionalProperties:!0}}};function wi(e){let t=new Set;for(let n of e)t.add(n.id),t.add(n.name),n.type===`sys`&&t.add(`sys:${n.name}`),n.type===`app`&&!n.id.startsWith(`app:`)&&t.add(`app:${n.id}`),(n.type===`stored`||n.type===`draft`)&&(t.add(`${n.name}@draft`),t.add(`${n.id}@draft`),typeof n.version==`number`&&(t.add(`${n.name}@${n.version}`),t.add(`${n.id}@${n.version}`)));return[...t]}const Ti=1024*1024,Ei=64,Di=4096;function Oi(e,t={}){let n=ki(e,t);if(!n.valid)throw Error(n.errors.join(`; `))}function ki(e,t={}){let n=[],r=ji(t);new TextEncoder().encode(JSON.stringify(e)).length>1048576&&n.push(`process definition exceeds ${Ti} bytes`),e.process||n.push(`process is missing`),e.format_version!==1&&n.push(`format_version must be 1`),e.initial||n.push(`initial node is missing`),!e.nodes||Object.keys(e.nodes).length===0?n.push(`nodes are missing`):e.initial&&!e.nodes[e.initial]&&n.push(`initial node "${e.initial}" does not exist`),e.context?.schema||n.push(`context.schema is missing`),e.context?.initial||n.push(`context.initial is missing`);for(let[t,i]of Object.entries(e.nodes??{}))Ai(e,t,i,n,r);return{valid:n.length===0,errors:n}}function Ai(e,t,n,r,i){if(Ri(n.type)||r.push(`node "${t}" has invalid type "${String(n.type)}"`),n.type===`human_task`)if(!n.task)r.push(`human_task node "${t}" is missing task`);else if(!n.task.title)r.push(`human_task node "${t}" task title is missing`);else if(!Array.isArray(n.task.fields))r.push(`human_task node "${t}" task fields must be an array`);else{let e=[`string`,`number`,`boolean`,`select`,`text`];n.task.fields.forEach((n,i)=>{let a=`human_task node "${t}" task.fields[${i}]`;if(!W(n)){r.push(`${a} must be an object`);return}(typeof n.name!=`string`||n.name.length===0)&&r.push(`${a}.name must be a non-empty string (not "id")`),(typeof n.type!=`string`||!e.includes(n.type))&&r.push(`${a}.type must be one of ${e.join(`, `)}`),n.type===`select`&&!(Array.isArray(n.options)&&n.options.length>0)&&r.push(`${a} of type "select" requires a non-empty options[] array`)})}if(n.type===`tool`&&Mi(t,n,r,i),(n.type===`interaction`||n.type===`agent`)&&n.interaction&&i.knownInteractions&&(Ii(n.interaction,i.knownInteractions)||r.push(`${n.type} node "${t}" references unknown interaction "${n.interaction}"`)),(n.type===`interaction`||n.type===`agent`)&&n.result_schema!==void 0&&!W(n.result_schema)&&r.push(`${n.type} node "${t}" result_schema must be a JSON Schema object`),n.type===`process`&&(!n.process&&!n.process_definition&&r.push(`process node "${t}" is missing process or process_definition`),n.run_type&&!zi(n.run_type)&&r.push(`process node "${t}" has invalid run_type "${String(n.run_type)}"`),n.returns?.from!==void 0&&typeof n.returns.from!=`string`&&r.push(`process node "${t}" returns.from must be a string`),n.returns?.context!==void 0&&!Ki(n.returns.context)&&r.push(`process node "${t}" returns.context must be an array of strings`),n.process_definition)){let e=ki(n.process_definition,i.options);for(let n of e.errors)r.push(`process node "${t}" process_definition: ${n}`)}if(n.type===`foreach`&&(n.foreach||r.push(`foreach node "${t}" is missing foreach`),n.node||r.push(`foreach node "${t}" is missing node`),n.max_concurrency!==void 0&&(!Number.isInteger(n.max_concurrency)||n.max_concurrency<1)&&r.push(`foreach node "${t}" max_concurrency must be a positive integer`),n.item_id!==void 0&&typeof n.item_id!=`string`&&r.push(`foreach node "${t}" item_id must be a string`),Wi(`foreach`,t,n.collect,r),n.node&&Ui(e,{ownerLabel:`foreach node "${t}"`,childPath:`${t}.node`,childLabel:`foreach node "${t}" child node`,child:n.node},r,i)),n.type===`branch`){(!Array.isArray(n.branches)||n.branches.length===0)&&r.push(`branch node "${t}" must define at least one branch`),n.join!==void 0&&n.join!==`all`&&r.push(`branch node "${t}" join must be "all"`),Wi(`branch`,t,n.collect,r);let a=Xi(n),o=new Set;for(let[n,s]of a.entries()){if(s.id?o.has(s.id)?r.push(`branch node "${t}" has duplicate branch id "${s.id}"`):o.add(s.id):r.push(`branch node "${t}" branch at index ${n} is missing id`),!s.node){r.push(`branch node "${t}" branch "${s.id||n}" is missing node`);continue}Ui(e,{ownerLabel:`branch node "${t}" branch "${s.id||n}"`,childPath:`${t}.branches.${n}.node`,childLabel:`branch node "${t}" branch "${s.id||n}" child node`,child:s.node},r,i)}}n.failure_policy&&!Vi(n.failure_policy)&&r.push(`node "${t}" has invalid failure_policy "${String(n.failure_policy)}"`);for(let i of n.transitions??[])e.nodes[i.to]||r.push(`node "${t}" has transition to "${i.to}" which does not exist`),i.trigger&&!Bi(i.trigger)&&r.push(`node "${t}" has invalid transition trigger "${i.trigger}"`),typeof i.guard==`string`?r.push(`node "${t}" transition to "${i.to}" guard must be a JSON Logic object`):i.guard&&qi(`node "${t}" transition to "${i.to}" guard`,i.guard,r);for(let[i,a]of Yi(n).entries())Li(a,`condition`)&&r.push(`node "${t}" branch at index ${i} uses string condition; use JSON Logic in "when" instead`),Li(a,`guard`)&&r.push(`node "${t}" branch at index ${i} uses string guard; use JSON Logic in "when" instead`),e.nodes[a.to]||r.push(`node "${t}" has branch to "${a.to}" which does not exist`),typeof a.when==`string`?r.push(`node "${t}" branch to "${a.to}" when must be a JSON Logic object`):a.when&&qi(`node "${t}" branch to "${a.to}" guard`,a.when,r)}function ji(e){return{options:e,knownTools:e.knownTools?new Set(e.knownTools):void 0,knownInteractions:e.knownInteractions?new Set(e.knownInteractions):void 0}}function Mi(e,t,n,r){if(!t.tool){n.push(`tool node "${e}" is missing tool`);return}r.knownTools&&!r.knownTools.has(t.tool)&&n.push(`tool node "${e}" references unknown tool "${t.tool}"`),t.tool===`set_context`&&Ni(e,t,n)}function Ni(e,t,n){let r=t.input;if(!W(r)){n.push(`tool node "${e}" set_context input must be an object`);return}for(let t of Object.keys(r))t!==`updates`&&t!==`reason`&&t!==`event_id`&&n.push(`tool node "${e}" set_context input has unsupported property "${t}"`);if(!W(r.updates)){n.push(`tool node "${e}" set_context input.updates must be an object`);return}r.reason!==void 0&&typeof r.reason!=`string`&&n.push(`tool node "${e}" set_context input.reason must be a string`),r.event_id!==void 0&&typeof r.event_id!=`string`&&n.push(`tool node "${e}" set_context input.event_id must be a string`),Pi(e,t,r.updates,n)}function Pi(e,t,n,r){let i=Object.keys(n);if(i.length!==0){if(!Array.isArray(t.writes)||t.writes.length===0){r.push(`tool node "${e}" set_context updates require declared writes`);return}for(let n of i)n.startsWith(`_`)&&r.push(`tool node "${e}" set_context cannot write reserved context field "${n}"`),Fi(n,t.writes)||r.push(`tool node "${e}" set_context updates "${n}" but writes does not allow it`)}}function Fi(e,t){return t.some(t=>e===t||e.startsWith(`${t}.`))}function Ii(e,t){return t.has(e)?!0:e.includes(`@`)?t.has(e.slice(0,e.lastIndexOf(`@`))):!1}function Li(e,t){return W(e)&&typeof e[t]==`string`}function Ri(e){return e===`tool`||e===`interaction`||e===`agent`||e===`process`||e===`human_task`||e===`foreach`||e===`branch`||e===`condition`||e===`final`}function zi(e){return e===`supervised`||e===`programmatic`}function Bi(e){return e===`auto`||e===`agent`||e===`user`}function Vi(e){return e===`fail_fast`||e===`collect_errors`}function Hi(e){return e===`tool`||e===`interaction`||e===`agent`||e===`process`}function Ui(e,t,n,r){let{ownerLabel:i,childPath:a,childLabel:o,child:s}=t;if(!Hi(s.type)){n.push(`${i} has unsupported child node type "${String(s.type)}"`);return}(s.transitions??[]).length>0&&n.push(`${o} must not define transitions`),(s.branches??[]).length>0&&n.push(`${o} must not define branches`),Ai(e,a,{...s,transitions:void 0,branches:void 0},n,r)}function Wi(e,t,n,r){if(n!==void 0){if(typeof n==`string`){n||r.push(`${e} node "${t}" collect must not be empty`);return}if(!W(n)){r.push(`${e} node "${t}" collect must be a string or object`);return}if((typeof n.into!=`string`||!n.into)&&r.push(`${e} node "${t}" collect.into is required`),n.mode!==void 0&&n.mode!==`array`&&r.push(`${e} node "${t}" collect.mode must be "array"`),n.include!==void 0){if(!Array.isArray(n.include)){r.push(`${e} node "${t}" collect.include must be an array`);return}for(let i of n.include)(typeof i!=`string`||!Gi(i))&&r.push(`${e} node "${t}" collect.include has invalid field "${String(i)}"`)}}}function Gi(e){return e===`status`||e===`index`||e===`item`||e===`item_id`||e===`branch_id`||e===`branch_title`||e===`output`||e===`context_update`||e===`error`||e===`child_run_id`||e===`child_workflow_id`||e===`child_workflow_run_id`}function Ki(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function qi(e,t,n){let r=Ji(t);r.depth>64&&n.push(`${e} exceeds maximum depth 64`),r.nodes>4096&&n.push(`${e} exceeds maximum node count ${Di}`)}function Ji(e){let t=0,n=0,r=[{value:e,depth:1}];for(;r.length>0;){let e=r.pop();if(e){if(n+=1,t=Math.max(t,e.depth),n>4096||t>64)break;if(Array.isArray(e.value))for(let t of e.value)r.push({value:t,depth:e.depth+1});else if(W(e.value))for(let t of Object.values(e.value))r.push({value:t,depth:e.depth+1})}}return{depth:t,nodes:n}}function W(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Yi(e){return e.type===`condition`&&Array.isArray(e.branches)?e.branches.filter(Zi):[]}function Xi(e){return e.type===`branch`&&Array.isArray(e.branches)?e.branches.filter(Qi):[]}function Zi(e){return`to`in e}function Qi(e){return`node`in e}var $i;(function(e){e.create=`create`,e.change_type=`change_type`,e.update=`update`,e.revision_created=`revision_created`,e.delete=`delete`,e.workflow_finished=`workflow_finished`,e.workflow_execution_request=`workflow_execution_request`,e.api_request=`api_request`})($i||={});function ea(e){return e.input?.inputType===`objectIds`?e.input.objectIds:e.objectIds?e.objectIds:[]}var ta;(function(e){e.SCHEDULED=`scheduled`,e.RUNNING=`running`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.CANCELED=`canceled`,e.TIMED_OUT=`timed_out`,e.TERMINATED=`terminated`,e.SENT=`sent`,e.RECEIVED=`received`})(ta||={});var na;(function(e){e.ACTIVITY=`activity`,e.CHILD_WORKFLOW=`childWorkflow`,e.SIGNAL=`signal`,e.TIMER=`timer`})(na||={});var G;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.RUNNING=1]=`RUNNING`,e[e.COMPLETED=2]=`COMPLETED`,e[e.FAILED=3]=`FAILED`,e[e.CANCELED=4]=`CANCELED`,e[e.TERMINATED=5]=`TERMINATED`,e[e.CONTINUED_AS_NEW=6]=`CONTINUED_AS_NEW`,e[e.TIMED_OUT=7]=`TIMED_OUT`})(G||={});var K;(function(e){e[e.SYSTEM=0]=`SYSTEM`,e[e.THOUGHT=1]=`THOUGHT`,e[e.PLAN=2]=`PLAN`,e[e.UPDATE=3]=`UPDATE`,e[e.COMPLETE=4]=`COMPLETE`,e[e.WARNING=5]=`WARNING`,e[e.ERROR=6]=`ERROR`,e[e.ANSWER=7]=`ANSWER`,e[e.QUESTION=8]=`QUESTION`,e[e.REQUEST_INPUT=9]=`REQUEST_INPUT`,e[e.IDLE=10]=`IDLE`,e[e.TERMINATED=11]=`TERMINATED`,e[e.STREAMING_CHUNK=12]=`STREAMING_CHUNK`,e[e.BATCH_PROGRESS=13]=`BATCH_PROGRESS`,e[e.RESTARTING=14]=`RESTARTING`})(K||={});function ra(e){let t=e.details;return e.type===K.THOUGHT&&!!t&&typeof t==`object`&&typeof t.tool==`string`}function ia(e){let t=e.details;return e.type===K.UPDATE&&!!t&&typeof t==`object`&&(t.event_class===`document_created`||t.event_class===`document_updated`)&&typeof t.document_id==`string`}function aa(e){let t=e.details;return e.type===K.SYSTEM&&!!t&&typeof t==`object`&&t.system_type===`file_processing`&&Array.isArray(t.files)}function oa(e){let t=e.details;return e.type===K.PLAN&&!!t&&typeof t==`object`&&Array.isArray(t.plan)}function sa(e){return e.type===K.REQUEST_INPUT&&!!e.details&&typeof e.details==`object`}function ca(e){return typeof e==`object`&&!!e&&`t`in e}function la(e){return typeof e==`object`&&!!e&&`type`in e&&!(`t`in e)}const ua={system:K.SYSTEM,thought:K.THOUGHT,plan:K.PLAN,update:K.UPDATE,complete:K.COMPLETE,warning:K.WARNING,error:K.ERROR,answer:K.ANSWER,question:K.QUESTION,request_input:K.REQUEST_INPUT,idle:K.IDLE,terminated:K.TERMINATED,streaming_chunk:K.STREAMING_CHUNK,batch_progress:K.BATCH_PROGRESS},da={0:K.SYSTEM,1:K.THOUGHT,2:K.PLAN,3:K.UPDATE,4:K.COMPLETE,5:K.WARNING,6:K.ERROR,7:K.ANSWER,8:K.QUESTION,9:K.REQUEST_INPUT,10:K.IDLE,11:K.TERMINATED,12:K.STREAMING_CHUNK,13:K.BATCH_PROGRESS};function fa(e){return typeof e==`number`?da[e]??K.UPDATE:typeof e==`string`?ua[e]??K.UPDATE:K.UPDATE}function pa(e){let t={t:fa(e.type)};return e.message&&(t.m=e.message),e.workstream_id&&e.workstream_id!==`main`&&(t.w=e.workstream_id),e.timestamp&&(t.ts=e.timestamp),t.t===K.STREAMING_CHUNK&&e.details?e.details.is_final&&(t.f=1):e.details&&(t.d=e.details),t}function ma(e){let t=typeof e==`string`?JSON.parse(e):e;if(ca(t))return t;if(la(t))return pa(t);throw Error(`Unknown message format`)}function ha(e,t={}){let n={t:e};return t.message&&(n.m=t.message),t.workstreamId&&t.workstreamId!==`main`&&(n.w=t.workstreamId),t.details&&(n.d=t.details),t.isFinal&&(n.f=1),t.timestamp&&(n.ts=t.timestamp),n}function ga(e,t=``){let n={type:e.t,timestamp:e.ts||Date.now(),workflow_run_id:t,message:e.m||``,workstream_id:e.w||`main`};if(e.d!==void 0&&e.d!==null&&(n.details=e.d),e.t===K.STREAMING_CHUNK){let t=typeof e.d==`object`&&e.d!==null?e.d:{},r=typeof t.streaming_id==`string`?t.streaming_id:e.w||`main`,i=e.i??(typeof t.activity_id==`string`?t.activity_id:void 0);n.details={...t,streaming_id:r,is_final:e.f===1,...i?{activity_id:i}:{}}}return n}var _a;(function(e){e.UPLOADING=`uploading`,e.PROCESSING=`processing`,e.READY=`ready`,e.ERROR=`error`})(_a||={});function va(e){return`workflow:${e}:channel`}function ya(e){return`workflow:${e}:updates`}const ba=`low_priority`;function xa(e,t){return`renditions/${e}/${t.max_hw}`}function Sa(e){return e.format===`pdf`||e.format===`docx`}function Ca(e){return e===G.COMPLETED||e===G.FAILED||e===G.CANCELED||e===G.TERMINATED||e===G.TIMED_OUT}const wa={EVERY_HOUR:`0 * * * *`,EVERY_DAY_MIDNIGHT:`0 0 * * *`,EVERY_DAY_9AM:`0 9 * * *`,EVERY_MONDAY_MIDNIGHT:`0 0 * * MON`,EVERY_WEEKDAY_9AM:`0 9 * * MON-FRI`,FIRST_OF_MONTH:`0 0 1 * *`},Ta={EVERY_HOUR:`Every hour`,EVERY_DAY_MIDNIGHT:`Daily at midnight`,EVERY_DAY_9AM:`Daily at 9:00 AM`,EVERY_MONDAY_MIDNIGHT:`Every Monday at midnight`,EVERY_WEEKDAY_9AM:`Weekdays at 9:00 AM`,FIRST_OF_MONTH:`First day of month at midnight`};var Ea;(function(e){e.COLLECTION_ID=`x-collection-id`,e.PROCESSING_PRIORITY=`x-processing-priority`,e.CREATE_REVISION=`x-create-revision`,e.REVISION_LABEL=`x-revision-label`,e.SUPPRESS_WORKFLOWS=`x-suppress-workflows`})(Ea||={});var Da;(function(e){e.DATA_STORE_ID=`x-data-store-id`})(Da||={});var Oa;(function(e){e.created=`created`,e.processing=`processing`,e.ready=`ready`,e.completed=`completed`,e.failed=`failed`,e.archived=`archived`})(Oa||={});var ka;(function(e){e.Video=`video`,e.Image=`image`,e.Audio=`audio`,e.Document=`document`,e.Code=`code`,e.Other=`other`})(ka||={});const Aa=`Poster`,ja=`Audio`,Ma=`Web`,Na=`PDF`,Pa={success:`success`};function Fa(e){return e.id}function Ia(e){let t=`code`in e?e.code:void 0,n=e.id||t||``,r=e.name||``;return e.ref_type===`incode`||Va(n)?{ref_type:`incode`,id:n,name:r}:{ref_type:`stored`,id:n,name:r}}const La={type:`string`,enum:[`all`,`located`],description:`Named pages selection: 'all' or 'located' (the locate-pass result). Default all.`,nullable:!0},Ra={type:`array`,items:{type:`array`,items:{type:`integer`},minItems:2,maxItems:2},description:`Static inclusive [start, end] page ranges; negative indexes count from the end ([[1,2],[-1,-1]] = first two pages plus the last). Wins over scope when set.`,nullable:!0},za={type:`object`,description:`Interaction execution configuration such as model, environment, and model options.`,nullable:!0,required:[],additionalProperties:!0,properties:{id:{type:`string`,nullable:!0},environment:{type:`string`,nullable:!0},model:{type:`string`,nullable:!0},do_validate:{type:`boolean`,nullable:!0},run_data:{type:`string`,nullable:!0},configMode:{type:`string`,nullable:!0},model_options:{type:`object`,nullable:!0,required:[],additionalProperties:!0},http_timeout:{type:`object`,nullable:!0,required:[],additionalProperties:!0}}},Ba={type:`object`,description:`Per-content-type policy for standard intake: type selection, conversion, extraction, rendering, and embeddings.`,required:[],additionalProperties:!1,properties:{mode:{type:`string`,enum:[`programmatic`,`agentic`],description:`Intake orchestration mode. Use programmatic unless the user explicitly asks for agentic intake.`,nullable:!0},identification:{type:`object`,description:`Guidance used by automatic type selection to recognize this type before full extraction.`,nullable:!0,required:[],additionalProperties:!1,properties:{guidance:{type:`string`,description:`Classifier-facing description of what this type is and when it should be selected.`,nullable:!0},distinguish_from:{type:`string`,description:`How to distinguish this type from common look-alike document types.`,nullable:!0},examples:{type:`array`,description:`Object ids of human-confirmed examples for this type.`,nullable:!0,items:{type:`string`}}}},locate:{type:`object`,description:`Document-map pass: labeled page-thumbnail contact sheets and one vision call return which pages matter for this type. Scopes conversion/extraction and plans visual extraction.`,nullable:!0,required:[`instructions`],additionalProperties:!1,properties:{instructions:{type:`string`,description:`What to look for (e.g. "commercial terms, payment schedule, signature pages").`},detail:{type:`integer`,enum:[8,16],description:`Pages per contact sheet: 8 = bigger tiles with readable headings. Default 16.`,nullable:!0},min_pages:{type:`integer`,minimum:0,description:`Only run the locate pass when the page count is at least this. Default 8.`,nullable:!0}}},text_conversion:{type:`object`,description:`Controls source-to-text conversion before extraction, search, and text embeddings.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Set false for extraction-only types that should not create converted markdown/text.`,nullable:!0},method:{type:`string`,enum:[`auto`,`basic`,`llm`,`custom`],description:`Conversion method. Use auto unless the user asks for a specific converter.`,nullable:!0},custom:{type:`object`,description:`Custom conversion implementation for method=custom.`,nullable:!0,required:[],additionalProperties:!1,properties:{interaction:{type:`string`,description:`Interaction id to call for custom conversion.`,nullable:!0},agent:{type:`string`,description:`Agent id to launch for custom conversion.`,nullable:!0}}},instructions:{type:`string`,description:`Instructions for what source content to preserve during conversion.`,nullable:!0},output_format:{type:`string`,enum:[`markdown`,`text`],description:`Output format for converted text. Prefer markdown for readable documents.`,nullable:!0},scope:La,page_ranges:Ra}},extraction:{type:`object`,description:`Controls structured property extraction against the content type object_schema.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Whether intake should extract structured properties for this type.`,nullable:!0},source:{type:`string`,enum:[`auto`,`text`,`vision`,`mixed`],description:`Evidence source for extraction: auto chooses text or vision, text sends text only, vision sends image/PDF evidence only, mixed sends both.`,nullable:!0},instructions:{type:`string`,description:`Type-specific extraction instructions such as pages or sections to ignore.`,nullable:!0},interaction:{type:`string`,description:`Interaction id used for extraction. Omit to use the system extractor.`,nullable:!0},scope:La,page_ranges:Ra,max_pages:{type:`integer`,minimum:1,description:`Cap on pages sent to extraction. Default 20.`,nullable:!0},vision:{type:`object`,description:`Vision evidence budget for visual extraction. Detail names reference platform-defined profiles; the type never sets dpi, quality, or resolution.`,nullable:!0,required:[],additionalProperties:!1,properties:{default_detail:{type:`string`,enum:[`low`,`standard`,`high`],description:`Detail profile used when the plan does not request one. Default standard.`,nullable:!0},allowed_details:{type:`array`,items:{type:`string`,enum:[`low`,`standard`,`high`]},description:`Detail profiles the plan may request. Others fall back to default_detail.`,nullable:!0},max_image_tokens:{type:`integer`,minimum:1,description:`PRIMARY budget: estimated image tokens per extraction call. Default 16000.`,nullable:!0},max_payload_mb:{type:`number`,minimum:1,description:`Transport guard in megabytes. Default 16.`,nullable:!0},max_pages_per_call:{type:`integer`,minimum:1,description:`Cap on page images per extraction call. Default 8.`,nullable:!0}}},verification:{type:`object`,description:`Optional safe-mode verification of extracted values against source evidence.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Whether to verify extracted values after extraction.`,nullable:!0},model:{type:`string`,description:`Verifier model override.`,nullable:!0},environment:{type:`string`,description:`Verifier environment override.`,nullable:!0},materiality:{type:`string`,description:`What errors are material for this type.`,nullable:!0},threshold:{type:`number`,minimum:0,maximum:1,description:`Minimum verification confidence before flag/block behavior applies.`,nullable:!0},max_retries:{type:`integer`,minimum:0,description:`Maximum extraction retries when verification fails.`,nullable:!0},on_fail:{type:`string`,enum:[`flag`,`block`],description:`Failure behavior after retries: flag for review or block property write.`,nullable:!0}}},grounding:{type:`object`,description:`PDF block-level citation grounding policy. When enabled, property extraction uses the grounded child workflow and stores citations plus annotated proof output.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Enable PDF block-level citation grounding for this type.`,nullable:!0},interaction:{type:`string`,description:`Grounded extraction interaction id. Omit to use the system grounded extractor.`,nullable:!0},max_pages:{type:`integer`,minimum:1,description:`Maximum pages to process.`,nullable:!0},force_ocr:{type:`boolean`,description:`Run OCR on every page even when a text layer exists.`,nullable:!0},use_vision:{type:`boolean`,description:`Attach instrumented page images to the grounded extraction prompt.`,nullable:!0},raster_mode:{type:`string`,enum:[`vision`,`ocr`],description:`How to read pages with no digital text layer (scans). 'vision' (default) reads off the page image and skips OCR; 'ocr' is the legacy OCR-then-block-ground path.`,nullable:!0},grid_cell_pt:{type:`number`,minimum:1,description:`A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid; tune per the model in config. Default 14.`,nullable:!0},omit_block_boxes:{type:`boolean`,description:`Drop block bounding boxes from the extraction prompt (only sound with use_vision).`,nullable:!0},window_pages:{type:`integer`,minimum:1,description:`Maximum pages per extraction call before sequential window completion (later windows append to prior). Default 3.`,nullable:!0},update_properties:{type:`boolean`,description:`Update object properties with grounded extraction data. Default true.`,nullable:!0},config:za,hard_config:za,hardness_threshold:{type:`number`,minimum:0,maximum:1,description:`Hardness score at or above which hard_config is used. Default 0.5.`,nullable:!0},min_citation_density:{type:`number`,minimum:0,maximum:1,description:`Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.`,nullable:!0},refresh_ocr:{type:`boolean`,description:`Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).`,nullable:!0},review:{type:`object`,description:`Optional post-extraction review pass for hard content.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Set false to disable an inherited grounding review pass for this type.`,nullable:!0},config:za,threshold:{type:`number`,minimum:0,maximum:1,description:`Hardness score at or above which review runs.`,nullable:!0},coverage_threshold:{type:`number`,minimum:0,maximum:1,description:`Review also runs when any page's citation coverage falls below this floor. Default 0.2.`,nullable:!0},force:{type:`boolean`,description:`Run review regardless of hardness.`,nullable:!0}}}}}}},rendering_template:{type:`string`,description:`Handlebars template used to materialize extracted properties into object text.`,nullable:!0},embeddings:{type:`object`,description:`Per-type embedding switches. Omitted fields inherit the project embedding policy.`,nullable:!0,required:[],additionalProperties:!1,properties:{text:{type:`boolean`,description:`Whether to generate text embeddings.`,nullable:!0},image:{type:`boolean`,description:`Whether to generate image embeddings.`,nullable:!0},properties:{type:`boolean`,description:`Whether to generate property embeddings.`,nullable:!0}}},generate_toc:{type:`boolean`,description:`Whether intake should generate table-of-contents sections for this type.`,nullable:!0},default_view:{type:`string`,enum:[`auto`,`text`,`pdf`,`image`,`properties`],description:`Preferred first view for objects of this type.`,nullable:!0}}};function Va(e){return e.includes(`:`)}var Ha;(function(e){e.single=`single`,e.multiple=`multiple`,e.none=`none`})(Ha||={});var q;(function(e){e.jpeg=`jpeg`,e.png=`png`,e.webp=`webp`})(q||={});var J;(function(e){e.docx=`docx`,e.pdf=`pdf`})(J||={});const Y={"image/*":[q.jpeg,q.png,q.webp],"video/*":[q.jpeg,q.png],"application/pdf":[q.jpeg,q.png,q.webp],"text/markdown":[J.pdf,J.docx],"text/*":[J.docx],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[J.pdf],"application/msword":[J.pdf],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[J.pdf],"application/vnd.ms-powerpoint":[J.pdf]};function Ua(e,t){if(!e)return!1;let n=t;if(Y[e]?.some(e=>e===n))return!0;let[r]=e.split(`/`),i=`${r}/*`;return!!Y[i]?.some(e=>e===n)}function Wa(e){if(!e)return[];if(Y[e])return[...Y[e]];let[t]=e.split(`/`),n=`${t}/*`,r=Y[n];return r?[...r]:[]}function Ga(e){return Ua(e,q.jpeg)}var Ka;(function(e){e.normal=`normal`,e.low=`low`})(Ka||={});const qa={TERMINATE:`TERMINATE`,ABANDON:`ABANDON`,REQUEST_CANCEL:`REQUEST_CANCEL`,PARENT_CLOSE_POLICY_UNSPECIFIED:void 0,PARENT_CLOSE_POLICY_TERMINATE:`TERMINATE`,PARENT_CLOSE_POLICY_ABANDON:`ABANDON`,PARENT_CLOSE_POLICY_REQUEST_CANCEL:`REQUEST_CANCEL`};function Ja(e){return e.type===`apikey`}function Ya(e){return e.type===`user`}function Xa(e){return e.type===`project`}function Za(e){return e.type===`environment`}function Qa(e){return e.type===`agent`}function $a(e){return e.type===`service_account`}var eo;(function(e){e.created=`created`,e.building=`building`,e.prepared=`prepared`,e.processing=`processing`,e.completed=`completed`,e.cancelled=`cancelled`,e.failed=`failed`})(eo||={});var to;(function(e){e.userInvite=`user-invite`,e.migration=`migration`})(to||={});const no=`id name email picture`,ro=`early-access`,io=`restricted_environment`;var ao;(function(e){e.aws=`aws`,e.gcp=`gcp`,e.azure=`azure`})(ao||={});var oo;(function(e){e.stripe=`stripe`,e.invoice=`invoice`})(oo||={});var X;(function(e){e.vertesia=`vertesia`,e.partner=`partner`,e.free=`free`,e.customer=`customer`,e.prospect=`prospect`,e.unknown=`unknown`})(X||={});var Z;(function(e){e.standard=`standard`,e.enterprise=`enterprise`})(Z||={});function so(e){switch(e){case X.customer:case X.vertesia:return Z.enterprise;default:return Z.standard}}const co=63,lo=1e3,uo=[`admin`,`api`,`apps`,`auth`,`cdn`,`docs`,`internal-auth`,`mcp`,`status`,`sts`,`www`],fo=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;function po(e){return e.trim().toLowerCase()}function mo(e){if(!e)return`Account namespace is required`;if(e.length>63||!fo.test(e))return`Account namespace must be a lowercase DNS label containing only letters, numbers, and hyphens`;if(uo.includes(e))return`Account namespace '${e}' is reserved`}const ho=`id name`;function go(e,t){return`${e.slice(-6)}_${t.slice(-6)}`}function _o(e){return go(e.account,e.id)}function vo(e){return{name:e.name,description:e.description,input_schema:e.input_schema}}function yo(e){return e&&e.map(vo)}function bo(e){if(!e)return e;if(Array.isArray(e))for(let t of e)bo(t);else if(typeof e==`object`){let t=e;xo(t)&&Co(t);for(let[e,n]of Object.entries(t))e===`editor`&&(n===`textarea`||n===`document`||n===`media`)||e===`format`&&(n===`textarea`||n===`document`||n===`media`)?delete t[e]:typeof n==`object`&&bo(n)}return e}function xo(e){return e.editor===`document`||e.format===`document`||e.format===`media`}const So=`Use 'store:<document_id>' format to reference a document from the content store.`;function Co(e){e.type||=`string`,e.description?typeof e.description==`string`&&!e.description.includes(`Use 'store:<document_id>' format to reference a document from the content store.`)&&(e.description=`${e.description} ${So}`):e.description=So}function wo(e){let t={},n=[];for(let r of e)if(r.properties){if(r.required)for(let e of r.required)n.includes(e)||n.push(e);Object.assign(t,r.properties)}return Object.keys(t).length>0?{properties:t,required:n,type:`object`}:null}function To(e){let t={},n=new Set;for(let r of e)if(r.template?.inputSchema?.properties){let e=r.template?.inputSchema;if(e.required)for(let t of e.required)n.add(t);Object.assign(t,e.properties)}else r.type===B.chat&&(Object.assign(t,{chat:{type:`array`,items:{type:`object`,properties:{role:{type:`string`,enum:[wt.assistant,wt.user]},content:{type:`string`}},required:[`role`,`content`]}}}),n.add(`chat`));return Object.keys(t).length>0?{properties:t,required:Array.from(n)}:null}function Eo(e){return e.prompts?To(e.prompts):null}function Do(e){let t={},n=new Set;for(let r of e)if(r.schema?.properties){let e=r.schema;if(e.required)for(let t of e.required)n.add(t);Object.assign(t,e.properties)}return Object.keys(t).length>0?{properties:t,required:Array.from(n)}:null}var Oo;(function(e){e[e.COMPLETION_RESULT_V1=20250925]=`COMPLETION_RESULT_V1`,e[e.DOWNLOAD_URL_NO_MIME_TYPE_V1=20260210]=`DOWNLOAD_URL_NO_MIME_TYPE_V1`,e[e.MEDIA_BLOB_STORAGE_V1=20260319]=`MEDIA_BLOB_STORAGE_V1`})(Oo||={});const ko=1;function Ao(e){return`/view/${encodeURIComponent(e)}`}const jo=[`text`,`keyword`,`number`,`date`,`boolean`],Mo=[`text`,`date`,`number`,`badge`,`user`,`content_type`,`location`];function No(e){return{name:e.name,...e.description===void 0?{}:{description:e.description},...e.enabled===void 0?{}:{enabled:e.enabled},...e.layout===void 0?{}:{layout:e.layout},...e.scope===void 0?{}:{scope:e.scope},...e.navigation===void 0?{}:{navigation:e.navigation},...e.search===void 0?{}:{search:e.search},...e.results===void 0?{}:{results:e.results}}}function Po(e){return{...No(e),description:e.description}}const Fo=`https://schemas.vertesia.com/view-experience.v1.schema.json`,Io=`https://schemas.vertesia.com/persisted-view-experience.v1.schema.json`,Q={$id:Fo,type:`object`,title:`View Experience`,description:`A reusable content navigation and search experience. Save it through /api/v1/views, then render it at /view/<id>.`,properties:{name:{type:`string`,minLength:1,maxLength:120,description:`Human-readable View name.`},description:{type:`string`,maxLength:4e3,description:`Purpose and intended audience of this View.`},enabled:{type:`boolean`,description:`Whether the View may be executed.`},layout:{$ref:`#/$defs/layout`},scope:{$ref:`#/$defs/scope`},navigation:{type:`array`,maxItems:20,description:`Ordered facets or hierarchies used to browse the scoped content.`,items:{oneOf:[{$ref:`#/$defs/locationNavigation`},{$ref:`#/$defs/collectionNavigation`},{$ref:`#/$defs/termsNavigation`},{$ref:`#/$defs/hierarchyNavigation`},{$ref:`#/$defs/rangeNavigation`}]}},search:{$ref:`#/$defs/search`},results:{$ref:`#/$defs/results`}},required:[`name`],additionalProperties:!1,$defs:{configurationId:{type:`string`,minLength:1,maxLength:64,pattern:fr,description:`Stable id starting with a letter and containing letters, numbers, underscores, or hyphens.`},fieldName:{type:`string`,minLength:1,maxLength:160,pattern:A,description:`Dot-separated Elasticsearch field name.`},stringArray:{type:`array`,maxItems:100,items:{type:`string`,minLength:1}},layout:{type:`object`,description:`Overall browsing layout.`,properties:{mode:{type:`string`,enum:[`browse`,`worklist`],description:`Browse emphasizes discovery; worklist emphasizes case-style task handling.`},navigation_position:{type:`string`,enum:[`sidebar`,`top`],description:`Where navigation widgets appear.`}},required:[],additionalProperties:!1},scope:{type:`object`,description:`Hard boundary applied to every search and navigation query.`,properties:{type_ids:{$ref:`#/$defs/stringArray`,description:`Content type ids included in the View.`},locations:{$ref:`#/$defs/stringArray`,description:`Absolute content location roots included in the View.`},collection_ids:{$ref:`#/$defs/stringArray`,description:`Collection ids included in the View.`},include_collection_descendants:{type:`boolean`,description:`Include descendants of scoped collections.`},fixed_filter:{type:`object`,description:`Elasticsearch query clause always applied by the runtime. Script-like and unsafe clauses are rejected.`,required:[],additionalProperties:!0},head_only:{type:`boolean`,description:`Return only current head revisions.`}},required:[],additionalProperties:!1},locationNavigation:{type:`object`,title:`Location hierarchy`,description:`Browse the hierarchical content location path.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`location`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},roots:{type:`array`,maxItems:50,items:{type:`string`,pattern:`^/`},description:`Absolute location roots shown by the hierarchy.`},depth:{type:`integer`,minimum:1,maximum:20}},required:[`id`,`label`,`source`],additionalProperties:!1},collectionNavigation:{type:`object`,title:`Collection hierarchy`,description:`Browse collection membership and optionally collection descendants.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`collection`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},roots:{type:`array`,maxItems:50,items:{type:`string`,minLength:1}},include_descendants:{type:`boolean`}},required:[`id`,`label`,`source`],additionalProperties:!1},termsNavigation:{type:`object`,title:`Property facet`,description:`Bucket a keyword-like property such as brand.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`terms`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},size:{type:`integer`,minimum:1,maximum:500},sort:{type:`string`,enum:[`count`,`label`]}},required:[`id`,`label`,`source`,`field`],additionalProperties:!1},hierarchyLevel:{type:`object`,title:`Property hierarchy level`,description:`One mapped property in a drill-down hierarchy.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},size:{type:`integer`,minimum:1,maximum:500},sort:{type:`string`,enum:[`count`,`label`]}},required:[`id`,`label`,`field`],additionalProperties:!1},hierarchyNavigation:{type:`object`,title:`Property hierarchy`,description:`Drill down through mapped properties such as State, then City.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`hierarchy`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{const:!1},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},levels:{type:`array`,minItems:2,maxItems:10,items:{$ref:`#/$defs/hierarchyLevel`}}},required:[`id`,`label`,`source`,`levels`],additionalProperties:!1},rangeDefinition:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},from:{type:`number`},to:{type:`number`}},required:[`id`,`label`],additionalProperties:!1,anyOf:[{required:[`from`]},{required:[`to`]}]},rangeNavigation:{type:`object`,title:`Numeric range facet`,description:`Bucket a numeric property such as project_size into authored ranges.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`range`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},ranges:{type:`array`,minItems:1,items:{$ref:`#/$defs/rangeDefinition`}}},required:[`id`,`label`,`source`,`field`,`ranges`],additionalProperties:!1},keyTerm:{type:`object`,description:`A URL-serializable structured search input.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},type:{type:`string`,enum:[...jo]},multiple:{type:`boolean`},operator:{type:`string`,enum:[`match`,`term`,`range`]}},required:[`id`,`label`,`type`],additionalProperties:!1},searchField:{type:`object`,description:`A mapped Elasticsearch field available to query planning and deterministic full-text fallback.`,properties:{field:{$ref:`#/$defs/fieldName`},description:{type:`string`,minLength:1,maxLength:500,description:`Semantic meaning of the field for query planners.`},type:{type:`string`,enum:[...jo],description:`Mapping hint used only when the active index does not expose the field type.`},mode:{type:`string`,enum:[`auto`,`full_text`,`exact`],description:`Whether the field supports scoring text queries, structured exact queries, or mapping-derived behavior.`},boost:{type:`number`,minimum:.1,maximum:20,description:`Relative boost when the field participates in multi-field text search.`}},required:[`field`],additionalProperties:!1},interactionConfig:{type:`object`,description:`One execution configuration for the agentic search model. Set environment and/or model to override project defaults.`,properties:{id:{type:`string`},environment:{type:`string`},model:{type:`string`},do_validate:{type:`boolean`},run_data:{type:`string`},configMode:{type:`string`},model_options:{type:`object`,required:[],additionalProperties:!0},prompt_cache_key:{type:`string`},prompt_cache_schema_suffix:{type:`boolean`},http_timeout:{type:`object`,required:[],additionalProperties:!0}},required:[],additionalProperties:!0},agenticSearch:{type:`object`,description:`Agentic query planning configuration. The default interaction is sys:ContentSearchAgent and it emits secured Elasticsearch DSL.`,properties:{interaction:{type:`string`,maxLength:200,description:`Interaction id. Defaults to sys:ContentSearchAgent.`},config:{$ref:`#/$defs/interactionConfig`},instructions:{type:`string`,maxLength:4e3,description:`Domain-specific guidance for translating natural language into Elasticsearch DSL.`},mode:{type:`string`,enum:[`query`],description:`Generate and validate an Elasticsearch query before execution.`},timeout_ms:{type:`integer`,minimum:1e3,maximum:6e4},minimum_confidence:{type:`number`,minimum:0,maximum:1}},required:[],additionalProperties:!1},search:{type:`object`,description:`Text and structured search configuration.`,properties:{renderer:{type:`string`,maxLength:120,description:`Optional app-registered search renderer name.`},mode:{type:`string`,enum:[`deterministic`,`agentic`]},placeholder:{type:`string`,maxLength:240},fields:{type:`array`,maxItems:50,items:{$ref:`#/$defs/searchField`},description:`Fields disclosed to query planning. Text-capable entries also define deterministic fallback search.`},key_terms:{type:`array`,maxItems:50,items:{$ref:`#/$defs/keyTerm`}},agentic:{$ref:`#/$defs/agenticSearch`}},required:[],additionalProperties:!1},resultField:{type:`object`,properties:{field:{$ref:`#/$defs/fieldName`},label:{type:`string`,maxLength:120},format:{type:`string`,enum:[...Mo]},fallback:{type:`string`,maxLength:240}},required:[`field`],additionalProperties:!1},resultMedia:{type:`object`,properties:{source:{type:`string`,enum:[`content_thumbnail`,`property`,`type_icon`]},field:{$ref:`#/$defs/fieldName`},fit:{type:`string`,enum:[`cover`,`contain`]},fallback:{type:`string`,enum:[`type_icon`,`placeholder`,`none`]}},required:[`source`],additionalProperties:!1},resultFieldArray:{type:`array`,items:{$ref:`#/$defs/resultField`}},listDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`list`},title:{$ref:`#/$defs/resultField`},subtitle:{$ref:`#/$defs/resultFieldArray`},description:{$ref:`#/$defs/resultField`},media:{$ref:`#/$defs/resultMedia`},badges:{$ref:`#/$defs/resultFieldArray`}},required:[`id`,`label`,`type`,`title`],additionalProperties:!1},tableColumn:{type:`object`,properties:{field:{$ref:`#/$defs/fieldName`},label:{type:`string`,maxLength:120},format:{type:`string`,enum:[...Mo]},fallback:{type:`string`,maxLength:240},width:{type:`integer`,minimum:40,maximum:2e3},sortable:{type:`boolean`},sort_option:{$ref:`#/$defs/configurationId`}},required:[`field`],additionalProperties:!1},tableDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`table`},columns:{type:`array`,minItems:1,items:{$ref:`#/$defs/tableColumn`}}},required:[`id`,`label`,`type`,`columns`],additionalProperties:!1},cardsDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`cards`},title:{$ref:`#/$defs/resultField`},description:{$ref:`#/$defs/resultField`},media:{$ref:`#/$defs/resultMedia`},fields:{$ref:`#/$defs/resultFieldArray`},badges:{$ref:`#/$defs/resultFieldArray`},columns:{type:`integer`,enum:[2,3,4,5,6]}},required:[`id`,`label`,`type`,`title`],additionalProperties:!1},galleryDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`gallery`},media:{$ref:`#/$defs/resultMedia`},title:{$ref:`#/$defs/resultField`},caption:{$ref:`#/$defs/resultFieldArray`},columns:{type:`integer`,enum:[2,3,4,5,6]}},required:[`id`,`label`,`type`,`media`,`title`],additionalProperties:!1},boardCard:{type:`object`,properties:{title:{$ref:`#/$defs/resultField`},description:{$ref:`#/$defs/resultField`},media:{$ref:`#/$defs/resultMedia`},fields:{$ref:`#/$defs/resultFieldArray`},badges:{$ref:`#/$defs/resultFieldArray`}},required:[`title`],additionalProperties:!1},boardColumn:{type:`object`,properties:{value:{type:`string`,minLength:1},label:{type:`string`,minLength:1,maxLength:120},order:{type:`integer`}},required:[`value`,`label`],additionalProperties:!1},boardDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`board`},group_by:{$ref:`#/$defs/fieldName`},columns:{type:`array`,items:{$ref:`#/$defs/boardColumn`}},card:{$ref:`#/$defs/boardCard`}},required:[`id`,`label`,`type`,`group_by`,`card`],additionalProperties:!1},display:{oneOf:[{$ref:`#/$defs/listDisplay`},{$ref:`#/$defs/tableDisplay`},{$ref:`#/$defs/cardsDisplay`},{$ref:`#/$defs/galleryDisplay`},{$ref:`#/$defs/boardDisplay`}]},sortClause:{type:`object`,properties:{field:{$ref:`#/$defs/fieldName`},order:{type:`string`,enum:[`asc`,`desc`]}},required:[`field`,`order`],additionalProperties:!1},sortOption:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},sort:{type:`array`,minItems:1,items:{$ref:`#/$defs/sortClause`}}},required:[`id`,`label`,`sort`],additionalProperties:!1},results:{type:`object`,description:`Built-in or app-rendered visual result layouts.`,properties:{default_display:{$ref:`#/$defs/configurationId`},allow_display_switch:{type:`boolean`},displays:{type:`array`,minItems:1,maxItems:10,items:{$ref:`#/$defs/display`}},default_sort:{$ref:`#/$defs/configurationId`},sort_options:{type:`array`,items:{$ref:`#/$defs/sortOption`}}},required:[`default_display`,`displays`],additionalProperties:!1}}},Lo={...Q,$id:Io,title:`Persisted View Experience`,properties:{...Q.properties,description:{...Q.properties.description,minLength:1}},required:[`name`,`description`]},Ro=new Set([`bool`,`match`,`multi_match`,`simple_query_string`,`term`,`terms`,`range`,`exists`,`ids`,`prefix`,`match_all`]),zo=new Set(mr);function Bo(e,t,n,r){if(typeof t!=`string`||!j.test(t)){e.push({path:n,message:`must be a dot-separated field name`});return}if(zo.has(t.split(`.`)[0])){e.push({path:n,message:`field '${t}' is server-controlled`});return}r.allowedFields&&!r.allowedFields.has(t)&&e.push({path:n,message:`field '${t}' is not available to this View`})}function Vo(e,t,n,r,i){let a=i.allowedOperators?.get(t);a&&!a.has(n)&&e.push({path:r,message:`operator '${n}' is not available for field '${t}'`})}function Ho(e,t,n,r,i){if(!M(t)){e.push({path:n,message:`must be an object keyed by field name`});return}let a=Object.entries(t);if(a.length!==1){e.push({path:n,message:`must reference exactly one field`});return}let[o,s]=a[0];Bo(e,o,`${n}.${o}`,i),r(s,`${n}.${o}`,o)}function Uo(e,t,n,r,i){if(r.clauses++,r.clauses>100){e.push({path:n,message:`exceeds the maximum of 100 query clauses`});return}if(!M(t)){e.push({path:n,message:`must be an Elasticsearch query object`});return}let a=Object.entries(t);if(a.length!==1){e.push({path:n,message:`must contain exactly one query clause`});return}let[o,s]=a[0];if(!Ro.has(o)){e.push({path:`${n}.${o}`,message:`query type '${o}' is not supported`});return}if(o===`match_all`){M(s)||e.push({path:`${n}.match_all`,message:`must be an object`});return}if(o===`bool`){if(!M(s)){e.push({path:`${n}.bool`,message:`must be an object`});return}let t=new Set([`must`,`filter`,`should`,`must_not`,`minimum_should_match`]);for(let r of Object.keys(s))t.has(r)||e.push({path:`${n}.bool.${r}`,message:`is not supported`});for(let t of[`must`,`filter`,`should`,`must_not`]){let a=s[t];if(a===void 0)continue;let o=Array.isArray(a)?a:[a];o.length>50&&e.push({path:`${n}.bool.${t}`,message:`must contain at most 50 clauses`}),o.forEach((a,o)=>{Uo(e,a,`${n}.bool.${t}[${o}]`,r,i)})}let a=s.minimum_should_match;a!==void 0&&typeof a!=`number`&&typeof a!=`string`&&e.push({path:`${n}.bool.minimum_should_match`,message:`must be a number or string`});return}if(o===`exists`){M(s)?(Bo(e,s.field,`${n}.exists.field`,i),typeof s.field==`string`&&Vo(e,s.field,`exists`,`${n}.exists.field`,i)):e.push({path:`${n}.exists`,message:`must be an object`});return}if(o===`ids`){!M(s)||!Array.isArray(s.values)||s.values.length>1e3?e.push({path:`${n}.ids.values`,message:`must be an array containing at most 1000 IDs`}):s.values.some(e=>typeof e!=`string`)&&e.push({path:`${n}.ids.values`,message:`must contain only strings`});return}if(o===`multi_match`||o===`simple_query_string`){if(!M(s)||typeof s.query!=`string`){e.push({path:`${n}.${o}.query`,message:`must be a string`});return}!Array.isArray(s.fields)||s.fields.length===0||s.fields.length>20?e.push({path:`${n}.${o}.fields`,message:`must contain between 1 and 20 fields`}):s.fields.forEach((t,r)=>{let a=typeof t==`string`?t.split(`^`)[0]:t;Bo(e,a,`${n}.${o}.fields[${r}]`,i),typeof a==`string`&&Vo(e,a,o,`${n}.${o}.fields[${r}]`,i)});return}if(M(s)){let t=Object.entries(s);t.length===1&&Vo(e,t[0][0],o,`${n}.${o}.${t[0][0]}`,i)}Ho(e,s,`${n}.${o}`,(t,n,r)=>{if(o===`terms`){(!Array.isArray(t)||t.length>1e3)&&e.push({path:n,message:`must be an array containing at most 1000 values`});return}if(o===`range`){if(!M(t)){e.push({path:n,message:`must be a range object`});return}let r=new Set([`gt`,`gte`,`lt`,`lte`]);(Object.keys(t).length===0||Object.keys(t).some(e=>!r.has(e)))&&e.push({path:n,message:`supports only gt, gte, lt, and lte`});return}if(o===`prefix`){r!==`location`&&e.push({path:n,message:`prefix queries are supported only for location`});let i=M(t)?t.value:t;(typeof i!=`string`||!i.startsWith(`/`)||!i.endsWith(`/`))&&e.push({path:n,message:`must be a boundary-aware absolute location prefix`});return}if(o===`match`){typeof(M(t)?t.query:t)!=`string`&&e.push({path:n,message:`must contain a string query`});return}if(o===`term`&&M(t)){let r=new Set([`value`,`boost`,`case_insensitive`]);if(!(`value`in t)||Object.keys(t).some(e=>!r.has(e))){e.push({path:n,message:`supports only value, boost, and case_insensitive options`});return}(M(t.value)||Array.isArray(t.value))&&e.push({path:`${n}.value`,message:`must be a scalar value`}),t.boost!==void 0&&typeof t.boost!=`number`&&e.push({path:`${n}.boost`,message:`must be a number`}),t.case_insensitive!==void 0&&typeof t.case_insensitive!=`boolean`&&e.push({path:`${n}.case_insensitive`,message:`must be a boolean`});return}(M(t)||Array.isArray(t))&&e.push({path:n,message:`must be a scalar value`})},i)}function Wo(e,t){if(t.clauses++,t.clauses>100||!M(e))return e;let n=Object.entries(e);if(n.length!==1)return e;let[r,i]=n[0];if(r===`bool`&&M(i)){let e={...i};for(let n of[`must`,`filter`,`should`,`must_not`]){let r=i[n];Array.isArray(r)?e[n]=r.map(e=>Wo(e,t)):r!==void 0&&(e[n]=Wo(r,t))}return{bool:e}}if(r!==`term`||!M(i))return e;let a=Object.entries(i);if(a.length!==1)return e;let[o,s]=a[0];return!M(s)||Object.keys(s).length!==1||!(`value`in s)?e:{term:{[o]:s.value}}}function Go(e){return Wo(e,{clauses:0})}function Ko(e,t=`query`,n={}){let r=[];return Uo(r,Go(e),t,{clauses:0},n),r}function qo(e,t=`query`,n={}){let r=Go(e),i=[];if(Uo(i,r,t,{clauses:0},n),i.length>0)throw Error(i.map(e=>`${e.path} ${e.message}`).join(`; `));return r}const Jo=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Yo=/^app:([A-Za-z0-9][A-Za-z0-9._@-]*):([A-Za-z0-9][A-Za-z0-9._:-]*)$/;function $(e,t,n,r=`must be unique`){let i=new Set;t.forEach((t,a)=>{i.has(t)&&e.push({path:n(a),message:r}),i.add(t)})}function Xo(e,t,n){t?.source===`property`&&t.field===void 0&&e.push({path:`${n}.field`,message:`is required when media source is property`})}function Zo(e,t,n,r){let i=`results.displays[${n}]`;t.type===`list`?Xo(e,t.media,`${i}.media`):t.type===`table`?t.columns.forEach((t,n)=>{t.sort_option!==void 0&&!r.has(t.sort_option)&&e.push({path:`${i}.columns[${n}].sort_option`,message:`must reference a configured sort option`})}):t.type===`cards`||t.type===`gallery`?Xo(e,t.media,`${i}.media`):Xo(e,t.card.media,`${i}.card.media`)}function Qo(e,t){$(e,t.map(e=>e.id),e=>`navigation[${e}].id`),t.forEach((t,n)=>{let r=`navigation[${n}]`;t.source===`hierarchy`?($(e,t.levels.map(e=>e.id),e=>`${r}.levels[${e}].id`,`must be unique within the hierarchy`),$(e,t.levels.map(e=>e.field),e=>`${r}.levels[${e}].field`,`must be unique within the hierarchy`)):t.source===`range`&&($(e,t.ranges.map(e=>e.id),e=>`${r}.ranges[${e}].id`,`must be unique within the range facet`),t.ranges.forEach((t,n)=>{t.from!==void 0&&t.to!==void 0&&t.from>=t.to&&e.push({path:`${r}.ranges[${n}]`,message:`from must be less than to`})}))})}function $o(e,t){let n=t.search;if(n===void 0)return;n.mode!==`agentic`&&n.agentic!==void 0&&e.push({path:`search.agentic`,message:`requires search.mode to be agentic`});let r=n.fields??[];$(e,r.map(e=>e.field),e=>`search.fields[${e}].field`),r.forEach((t,n)=>{t.mode===`full_text`&&t.type!==void 0&&t.type!==`text`&&e.push({path:`search.fields[${n}].type`,message:`must be text when mode is full_text`})});let i=n.key_terms??[];$(e,i.map(e=>e.id),e=>`search.key_terms[${e}].id`),n.mode!==`agentic`&&i.forEach((t,n)=>{t.field===void 0&&e.push({path:`search.key_terms[${n}].field`,message:`is required for deterministic search`})})}function es(e,t){let n=t.results;if(n===void 0)return;let r=n.sort_options??[];$(e,r.map(e=>e.id),e=>`results.sort_options[${e}].id`);let i=new Set(r.map(e=>e.id));n.default_sort!==void 0&&!i.has(n.default_sort)&&e.push({path:`results.default_sort`,message:`must reference a configured sort option`}),$(e,n.displays.map(e=>e.id),e=>`results.displays[${e}].id`),new Set(n.displays.map(e=>e.id)).has(n.default_display)||e.push({path:`results.default_display`,message:`must reference a configured display`}),n.displays.forEach((t,n)=>{Zo(e,t,n,i)})}function ts(e,t=`draft`){let n=[];return t===`persisted`&&e.description?.trim().length===0&&n.push({path:`description`,message:`must explain the View purpose`}),e.scope?.fixed_filter!==void 0&&n.push(...Ko(e.scope.fixed_filter,`scope.fixed_filter`)),Qo(n,e.navigation??[]),$o(n,e),es(n,e),n}function ns(e){if(typeof e!=`string`||e.trim()===``)return[{path:`id`,message:`must be a non-empty string`}];let t=[];return e.length>64&&t.push({path:`id`,message:`must contain at most 64 characters`}),Jo.test(e)||t.push({path:`id`,message:`must be a lowercase URL-safe slug`}),t}function rs(e){if(typeof e!=`string`)return;let t=Yo.exec(e);if(t)return{app_name:t[1],local_id:t[2]}}const is=new e.default({allErrors:!0,strict:!1}),as=is.compile(Q),os=is.compile(Lo);function ss(e){return e===``?`configuration`:e.slice(1).split(`/`).map(e=>e.replaceAll(`~1`,`/`).replaceAll(`~0`,`~`)).reduce((e,t)=>/^\d+$/.test(t)?`${e}[${t}]`:e.length===0?t:`${e}.${t}`,``)}function cs(e){let t=ss(e.instancePath);if(e.keyword===`required`&&`missingProperty`in e.params){let n=String(e.params.missingProperty);return t===`configuration`?n:`${t}.${n}`}if(e.keyword===`additionalProperties`&&`additionalProperty`in e.params){let n=String(e.params.additionalProperty);return t===`configuration`?n:`${t}.${n}`}return t}function ls(e,t){let n=t===`persisted`?os:as;if(n(e))return[];let r=(n.errors??[]).map(e=>({path:cs(e),message:e.message??`is invalid`}));return[...new Map(r.map(e=>[`${e.path}\u0000${e.message}`,e])).values()]}function us(e,t=`draft`){let n=ls(e,t);return n.length>0?n:ts(e,t)}function ds(e){return us(e,`draft`)}function fs(e){return us(e,`persisted`)}var ps;(function(e){e.AgentRunStarted=`agent_run_started`,e.AgentRunCompleted=`agent_run_completed`,e.LlmCall=`llm_call`,e.ToolCall=`tool_call`})(ps||={});var ms;(function(e){e.Start=`start`,e.ResumeTools=`resume_tools`,e.ResumeUser=`resume_user`,e.Checkpoint=`checkpoint`,e.NestedInteraction=`nested_interaction`})(ms||={});var hs;(function(e){e.Builtin=`builtin`,e.Interaction=`interaction`,e.Remote=`remote`,e.Skill=`skill`})(hs||={});export{lo as ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH,co as ACCOUNT_NAMESPACE_MAX_LENGTH,ge as APP_ARTIFACT_STATUSES,he as APP_ARTIFACT_TYPES,pe as APP_CAPABILITIES,_e as APP_CAPABILITY_MANIFEST_PATH,Te as APP_PACKAGE_SCOPES,Ce as APP_REPO_DOCUMENT_UPLOAD_MAX_FILES,xe as APP_REPO_DOCUMENT_UPLOAD_MAX_FILE_BYTES,Se as APP_REPO_DOCUMENT_UPLOAD_MAX_TOTAL_BYTES,we as APP_REPO_DOCUMENT_UPLOAD_PREFIX,me as APP_VERSION_HEADER,ja as AUDIO_RENDITION_NAME,De as AUDIT_ACTIONS,ke as AUDIT_AGGREGATION_DIMENSIONS,ei as AbacScopes,r as AccessControlPrincipalType,n as AccessControlResourceType,ho as AccountRefPopulate,X as AccountType,ps as AgentEventType,K as AgentMessageType,Le as AgentSearchScope,ui as AgentToolApprovalModes,re as ApiKeyTypes,Oo as ApiVersions,Oe as BILLABLE_AUDIT_ACTIONS,oo as BillingMethod,xr as BrowserUseProjectConfigurationSchema,Ee as COMPOSITE_APP_HEADER_BUILTIN_IDS,wa as CRON_PRESETS,Ta as CRON_PRESET_LABELS,pi as CollectionStatus,f as ConfigModes,p as ConfigModesDescription,Be as ConfigModesOptions,$i as ContentEventName,ka as ContentNature,Ea as ContentObjectApiHeaders,Ka as ContentObjectProcessingPriority,Oa as ContentObjectStatus,Ba as ContentTypeIntakePolicySchema,E as CustomProviders,xn as CustomProvidersList,Ke as DATA_COLUMN_TYPE_TO_DUCKDB,Ze as DEFAULT_DASHBOARD_LAYOUT,dr as DEFAULT_EVENT_AGENT_INTERACTION_REF,Vr as DEFAULT_EVENT_SUBSCRIPTION_RUN_AS_ROLE,Rr as DEFAULT_EXTERNAL_EVENT_ACTION,zr as DEFAULT_EXTERNAL_EVENT_RESOURCE_TYPE,Ye as DEFAULT_RETENTION_CONFIG,Nr as DEFAULT_SEMANTIC_AGENT_MAX_ITERATIONS,Fr as DEFAULT_SEMANTIC_MAX_CONTENT_CHARS,jr as DEFAULT_WEBHOOK_TIMEOUT_MS,So as DOCUMENT_STORE_HINT,Xe as DashboardStatus,h as DataColumnType,Da as DataStoreApiHeaders,qe as DataStoreStatus,ao as Datacenters,bi as DocumentPartSchema,ro as EARLY_ACCESS_ANNOTATION,j as ELASTICSEARCH_FIELD_PATH_PATTERN,A as ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE,I as EVENT_CATEGORIES,Ur as EVENT_CONDITION_JSON_LOGIC_OPERATORS,L as EVENT_PRIORITIES,Hr as EVENT_SUBSCRIPTION_RUN_AS_ROLES,Br as EXTERNAL_EVENT_SOURCE_PREFIX,ze as ExecutionRunRefSelect,Fe as ExecutionRunStatus,_a as FileProcessingStatus,F as FullTextType,q as ImageRenditionFormat,Je as ImportStatus,Me as InteractionRefPopulate,Ne as InteractionRefWithSchemaPopulate,Pe as InteractionStatus,ba as LOW_PRIORITY_TASK_QUEUE,ms as LlmCallType,Ti as MAX_PROCESS_DEFINITION_BYTES,Ei as MAX_PROCESS_GUARD_DEPTH,Di as MAX_PROCESS_GUARD_NODES,Pr as MAX_SEMANTIC_AGENT_MAX_ITERATIONS,Lr as MAX_SEMANTIC_CONDITION_INSTRUCTION_LENGTH,Ir as MAX_SEMANTIC_MAX_CONTENT_CHARS,Mr as MAX_WEBHOOK_TIMEOUT_MS,oe as MCP_COLLECTION_ID_PATTERN,se as MCP_COLLECTION_NAMESPACE_PATTERN,Tn as MEMBERS_GROUP_NAME,J as MarkdownRenditionFormat,Ln as MeterNames,Ve as ModelSource,Hn as OAUTH_PLATFORM_SCOPES,zn as OAUTH_SCOPE_OFFLINE_ACCESS,Rn as OAUTH_SCOPE_OPENID,k as OAUTH_SCOPE_PROFILE,Bn as OAUTH_SCOPE_PROJECT_SWITCH,Vn as OAUTH_STANDARD_SCOPES,Na as PDF_RENDITION_NAME,Io as PERSISTED_VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID,Aa as POSTER_RENDITION_NAME,ae as PREFERRED_SECTIONS,xi as PROCESS_DEFINITION_FORMAT_VERSION,Si as PROCESS_DEFINITION_JSON_SCHEMA_ID,Sr as PROJECT_SEARCH_PROPERTY_TYPES,qa as ParentClosePolicy,t as Permission,Lo as PersistedViewExperienceConfigurationJsonSchema,ie as PrincipalType,Ci as ProcessDefinitionBodyJsonSchema,ur as Progress,Dr as ProjectRefPopulate,B as PromptSegmentDefType,Zr as PromptStatus,Z as QuotaTier,uo as RESERVED_ACCOUNT_NAMESPACES,io as RESTRICTED_ENVIRONMENT_ERROR_CODE,yi as RenditionSchema,$r as ResolvableRefType,vr as ResourceVisibility,d as RunDataStorageDescription,u as RunDataStorageLevel,Ie as RunDataStorageOptions,Re as RunSourceTypes,mr as SERVER_CONTROLLED_VIEW_FIELD_ROOTS,kr as SUPPORTED_SEARCH_LANGUAGES,yr as SYSTEM_INTERACTION_CATEGORIES,Er as SearchTypes,i as SecurityLevel,a as SecurityLevelLabels,Ge as SemanticColumnType,Tr as SupportedEmbeddingTypes,Fn as SupportedIntegrations,bn as SupportedProviders,Sn as SupportedProvidersList,P as SystemInteractionCategory,N as SystemRoles,ta as TaskStatus,na as TaskType,hs as TelemetryToolType,Qr as TemplateType,Pa as TextExtractionStatus,eo as TrainingSessionStatus,to as TransientTokenType,wn as UserGroupRefPopulate,no as UserRefPopulate,pr as VIEW_CONFIGURATION_ID_PATTERN,fr as VIEW_CONFIGURATION_ID_PATTERN_SOURCE,Fo as VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID,ko as VIEW_EXPERIENCE_SCHEMA_VERSION,gr as VIEW_FIELD_PATTERN,hr as VIEW_FIELD_PATTERN_SOURCE,Mo as VIEW_RESULT_FIELD_FORMATS,jo as VIEW_SEARCH_FIELD_TYPES,Q as ViewExperienceConfigurationJsonSchema,Ma as WEB_VIDEO_RENDITION_NAME,_i as WorkflowDefinitionRefPopulate,G as WorkflowExecutionStatus,Ha as WorkflowRuleInputType,ti as X_EXTRACT,To as _mergePromptsSchema,qo as asSupportedViewQuery,Or as autoTuneReindexParams,Ua as canGenerateRendition,ha as createCompactMessage,nr as createOAuthProjectBindingScope,ue as deriveMCPCollectionId,ve as effectiveAppAccessControl,cr as extractOAuthPermissionScopes,m as findEmailChannel,mo as getAccountNamespaceValidationError,Fa as getContentTypeRefId,hi as getConversationStorageId,qr as getCreateEventSubscriptionValidationResult,de as getDefaultOAuthAppNameForCollectionId,ea as getDocumentIds,vi as getGroundedExtractionWorkflowId,Xn as getOAuthPermissionScopes,sr as getOAuthScopesWithProfileDependency,Po as getPersistedViewExperienceConfiguration,ki as getProcessDefinitionValidationResult,wi as getProcessInteractionValidationSelectors,xa as getRenditionsPath,o as getSecurityLevelLabel,Wa as getSupportedRenditionFormats,br as getSystemInteractionCategory,go as getTenantId,_o as getTenantIdFromProject,Jr as getUpdateEventSubscriptionValidationResult,Cn as getVertexBucketAccessPrincipal,No as getViewExperienceConfiguration,va as getWorkflowChannel,ya as getWorkflowUpdatesKey,He as hasEmailChannel,ar as hasOAuthOfflineAccessScope,rr as hasOAuthOpenIdScope,ir as hasOAuthProfileScope,or as hasOAuthProjectSwitchScope,O as hostFromUrl,jn as hostMatchesAny,Qa as isAgentRequest,fi as isAgentToolApprovalMode,Ja as isApiKeyRequest,ca as isCompactMessage,ia as isDocumentEventMessage,Ae as isEmailChannel,Za as isEnvironmentRequest,V as isExtractableSchemaNode,aa as isFileProcessingMessage,Va as isInCodeType,je as isInteractiveChannel,la as isLegacyMessage,Nn as isLocalhostOrVertesiaHost,Pn as isLocalhostOrVertesiaUrl,Sa as isMarkdownRenditionVars,$n as isOAuthPermissionScope,Qn as isOAuthPlatformScope,tr as isOAuthProjectBindingScope,Zn as isOAuthStandardScope,er as isOAuthSupportedScope,oa as isPlanMessage,Xa as isProjectRequest,sa as isRequestInputMessage,_r as isRoleIncludedIn,$a as isServiceAccountRequest,ra as isToolCallMessage,Ya as isUserRequest,ce as isValidMCPCollectionId,le as isValidMCPCollectionNamespace,M as isViewValidationRecord,Ca as isWorkflowTerminalStatus,Do as mergeInCodePromptSchemas,wo as mergeJSONSchemas,li as mergePreservingNonExtractable,Eo as mergePromptsSchema,po as normalizeAccountNamespace,di as normalizeAgentToolApprovalMode,D as normalizeHost,An as normalizeHostList,fa as normalizeMessageType,fe as normalizeToolCollection,Go as normalizeViewQuery,rs as parseAppViewExperienceId,ma as parseMessage,so as quotaTierForAccountType,bo as removeExtraProperties,te as renderAgentRequestFallback,ne as renderAgentRequestMessage,l as renderAgentRequestTemplate,vo as sanitizeToolDefinition,yo as sanitizeToolDefinitions,si as schemaForExtraction,gn as supportsToolUse,Ga as supportsVisualRendition,ga as toAgentMessage,pa as toCompactMessage,mi as toolInputRefsArtifactPath,Ue as updateEmailChannel,We as updateEmailThreading,Mn as urlMatchesAnyHost,Yr as validateCreateEventSubscriptionInput,fs as validatePersistedViewExperienceConfiguration,Oi as validateProcessDefinitionBody,wr as validateProjectSearchPropertyMappings,Ko as validateSupportedViewQuery,Xr as validateUpdateEventSubscriptionInput,us as validateViewConfiguration,ds as validateViewExperienceConfiguration,ns as validateViewExperienceId,Ao as viewExperienceRoute,Ia as withContentObjectTypeRefDiscriminator,gi as withDSLWorkflowSpecDiscriminator,In as withProjectIntegrationDiscriminator};
|
|
1
|
+
import e from"ajv";var t;(function(e){e.int_read=`interaction:read`,e.int_write=`interaction:write`,e.int_delete=`interaction:delete`,e.int_execute=`interaction:execute`,e.run_read=`run:read`,e.run_write=`run:write`,e.env_admin=`environment:admin`,e.app_manage=`app:manage`,e.project_admin=`project:admin`,e.project_integration_read=`project:integration_read`,e.project_settings_write=`project:settings_write`,e.api_key_create=`api_key:create`,e.api_key_read=`api_key:read`,e.api_key_secret_read=`api_key:secret_read`,e.api_key_update=`api_key:update`,e.api_key_delete=`api_key:delete`,e.account_read=`account:read`,e.account_write=`account:write`,e.account_admin=`account:admin`,e.manage_billing=`account:billing`,e.billing_read=`billing:read`,e.audit_read=`audit:read`,e.account_member=`account:member`,e.content_read=`content:read`,e.content_read_all=`content:read_all`,e.content_write=`content:write`,e.content_delete=`content:delete`,e.content_admin=`content:admin`,e.content_superadmin=`content:superadmin`,e.workflow_read=`workflow:read`,e.workflow_run=`workflow:run`,e.workflow_admin=`workflow:admin`,e.workflow_superadmin=`workflow:superadmin`,e.agent_run_read=`agent_run:read`,e.task_read=`task:read`,e.task_manage=`task:manage`,e.iam_impersonate=`iam:impersonate`,e.studio_access=`studio:access`})(t||={});var n;(function(e){e.project=`project`,e.environment=`environment`,e.account=`account`,e.interaction=`interaction`,e.app=`application`,e.resource_set=`content_set`})(n||={});var r;(function(e){e.user=`user`,e.group=`group`,e.apikey=`apikey`,e.principal_set=`principal_set`})(r||={});var i;(function(e){e[e.public=0]=`public`,e[e.internal=1]=`internal`,e[e.confidential=2]=`confidential`,e[e.restricted=3]=`restricted`,e[e.secret=4]=`secret`})(i||={});const a=[`Public`,`Internal`,`Confidential`,`Restricted`,`Secret`];function o(e){return a[e]??`Unknown`}function s(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function c(e,t){return t===`.`||t===`json`?e:t.split(`.`).reduce((e,t)=>{if(Array.isArray(e)&&/^\d+$/.test(t))return e[Number(t)];if(s(e))return e[t]},e)}function l(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function u(e,t){return e.replace(/\{\{\s*([\w.-]+|\.)\s*\}\}/g,(e,n)=>l(c(t,n)))}function ee(e){return typeof e==`string`?e:e==null?``:l(e)}function te(e,t){let n=e?.trim();return n?u(n,t).trim():ee(t)}var ne;(function(e){e.secret=`sk`})(ne||={});var re;(function(e){e.User=`user`,e.OAuthAccess=`oauth_access`,e.Group=`group`,e.ApiKey=`apikey`,e.ServiceAccount=`service_account`,e.Agent=`agent`,e.Schedule=`schedule`})(re||={});const ie=[`default`,`footer`,`settings`],ae=/^[a-z0-9]+(?:_[a-z0-9]+)*$/,oe=/^[a-z0-9]+(?:_[a-z0-9]+)*$/;function se(e){return ae.test(e)}function ce(e){return oe.test(e)}function le(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``).replace(/_+/g,`_`)}function ue(e){return e.replace(/_/g,`-`)}function de(e,t){if(!e||typeof e!=`object`)throw TypeError(`Tool collection must be an object`);let n=t&&e.url?ve(e.url,t):e.url,r=n!==e.url;if(e.type===`mcp`){let t=le(e.id||e.name||e.url);if(r||!e.id)return{...e,url:n,id:e.id||t}}else if(r)return{...e,url:n};return e}const fe=[`ui`,`tools`,`interactions`,`types`,`processes`,`views`,`templates`,`dashboards`],pe=`x-vertesia-app-version`,me=[`interaction`,`agent`,`type`,`process`,`view`,`template`,`dashboard`,`activity`,`tool`],he=[`pending`,`built`,`done`],ge=`docs/app-capability-manifest.json`;function _e(e,t){return e?.access_control??t?.access_control??`all`}function ve(e,t){return!e||!t?e:e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,n)=>{let r=t[n];return typeof r!=`string`||!r?e:ye(r)})}function ye(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return t===e.length?e:e.slice(0,t)}const be=20*1024*1024,xe=80*1024*1024,Se=20,Ce=`docs/`,we=[`ui`,`tools`,`interactions`,`types`,`processes`,`views`,`templates`,`dashboards`,`settings`,`widgets`,`activities`,`all`],Te=[`app_portal`,`docs`,`help`,`user_menu`],Ee=[`create`,`update`,`delete`,`bulk_create`,`bulk_change_type`,`bulk_update`,`bulk_delete`,`attach`,`detach`,`credentials_fill`,`credentials_totp_generation`,`publish`,`unpublish`,`inference`,`embedding`,`image_generation`,`document_processed`],De=[`inference`,`embedding`,`image_generation`],Oe=[`time`,`action`,`resource_type`,`event_category`,`provider`,`project_id`,`details.pipeline`,`details.verdict`,`details.workflow_type`,`details.rule_id`,`model`];function ke(e){return e.type===`email`}function Ae(e){return e.type===`interactive`}const je=`id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts`,Me=`${je} result_schema`;var Ne;(function(e){e.draft=`draft`,e.published=`published`,e.archived=`archived`,e.code=`code`,e.unknown=`unknown`})(Ne||={});var Pe;(function(e){e.created=`created`,e.processing=`processing`,e.completed=`completed`,e.failed=`failed`})(Pe||={});var d;(function(e){e.STANDARD=`STANDARD`,e.RESTRICTED=`RESTRICTED`,e.DEBUG=`DEBUG`})(d||={});var f;(function(e){e.STANDARD=`Run data is stored for both the model inputs and output.`,e.RESTRICTED=`No run data is stored for the model inputs — only the model output.`,e.DEBUG=`Run data is stored for the model inputs and output, schema, and final prompt.`})(f||={});const Fe={[d.STANDARD]:f.STANDARD,[d.RESTRICTED]:f.RESTRICTED,[d.DEBUG]:f.DEBUG};var Ie;(function(e){e.Collection=`collection`})(Ie||={});const Le=[`document`,`collection`,`content_type`,`interaction`,`prompt`,`agent`,`workflow`,`process`,`process_run`,`interaction_run`,`view`],Re=[`created`,`updated`,`deleted`];function p(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let{type:e,id:r,label:i,action:a,revision_id:o}=n;typeof e!=`string`||!Le.includes(e)||typeof r==`string`&&r.length!==0&&(typeof a!=`string`||!Re.includes(a)||t.push({type:e,id:r,label:typeof i==`string`&&i.length>0?i:r,action:a,...typeof o==`string`&&o.length>0?{revision_id:o}:{}}))}return t}function ze(e){return p(e.meta?.resources)}var Be;(function(e){e.api=`api`,e.cli=`cli`,e.ui=`ui`,e.webhook=`webhook`,e.test=`test-data`,e.system=`system`,e.schedule=`schedule`})(Be||={});const Ve=`-result -parameters -result_schema -prompt`;var m;(function(e){e.RUN_AND_INTERACTION_CONFIG=`RUN_AND_INTERACTION_CONFIG`,e.RUN_CONFIG_ONLY=`RUN_CONFIG_ONLY`,e.INTERACTION_CONFIG_ONLY=`INTERACTION_CONFIG_ONLY`})(m||={});var h;(function(e){e.RUN_AND_INTERACTION_CONFIG=`This run configuration is used. Undefined options are filled with interaction configuration.`,e.RUN_CONFIG_ONLY=`Only this run configuration is used. Undefined options remain undefined.`,e.INTERACTION_CONFIG_ONLY=`Only interaction configuration is used.`})(h||={});const He={[m.RUN_AND_INTERACTION_CONFIG]:h.RUN_AND_INTERACTION_CONFIG,[m.RUN_CONFIG_ONLY]:h.RUN_CONFIG_ONLY,[m.INTERACTION_CONFIG_ONLY]:h.INTERACTION_CONFIG_ONLY};var Ue;(function(e){e.config=`config`,e.interaction=`interaction`,e.environmentDefault=`environmentDefault`,e.projectSystemDefault=`projectSystemDefault`,e.projectBaseDefault=`projectBaseDefault`,e.projectModalityDefault=`projectModalityDefault`,e.projectLegacyDefault=`projectLegacyDefault`})(Ue||={});function We(e){return e?.find(ke)}function Ge(e){return!!We(e)}function Ke(e,t){let n=e||[],r=n.findIndex(ke);if(r===-1)return t.to_email?[...n,{type:`email`,...t}]:n;let i=[...n];return i[r]={...i[r],...t,type:`email`},i}function qe(e,t,n){let r=We(e);if(!r)return e||[];let i=r.references?[...r.references]:[];return i.includes(t)||i.push(t),Ke(e,{in_reply_to:t,references:i,thread_subject:n||r.thread_subject})}var g;(function(e){e.STRING=`STRING`,e.INTEGER=`INTEGER`,e.BIGINT=`BIGINT`,e.FLOAT=`FLOAT`,e.DOUBLE=`DOUBLE`,e.DECIMAL=`DECIMAL`,e.BOOLEAN=`BOOLEAN`,e.DATE=`DATE`,e.TIMESTAMP=`TIMESTAMP`,e.JSON=`JSON`})(g||={});var Je;(function(e){e.EMAIL=`email`,e.PHONE=`phone`,e.URL=`url`,e.CURRENCY=`currency`,e.PERCENTAGE=`percentage`,e.PERSON_NAME=`person_name`,e.ADDRESS=`address`,e.COUNTRY=`country`,e.DATE_ISO=`date_iso`,e.IDENTIFIER=`identifier`})(Je||={});const Ye={[g.STRING]:`VARCHAR`,[g.INTEGER]:`INTEGER`,[g.BIGINT]:`BIGINT`,[g.FLOAT]:`FLOAT`,[g.DOUBLE]:`DOUBLE`,[g.DECIMAL]:`DECIMAL(18,4)`,[g.BOOLEAN]:`BOOLEAN`,[g.DATE]:`DATE`,[g.TIMESTAMP]:`TIMESTAMP`,[g.JSON]:`JSON`};var Xe;(function(e){e.CREATING=`creating`,e.ACTIVE=`active`,e.ERROR=`error`,e.ARCHIVED=`archived`})(Xe||={});var Ze;(function(e){e.PENDING=`pending`,e.PROCESSING=`processing`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.ROLLED_BACK=`rolled_back`})(Ze||={});const Qe={retention_days:30,snapshots_exempt:!0};var $e;(function(e){e.ACTIVE=`active`,e.ARCHIVED=`archived`})($e||={});const et={columns:2,cellWidth:600,cellHeight:400,padding:20},tt={"claude-3-5-haiku-20241022":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0}},nt={"claude-3-5-haiku":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-haiku":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-sonnet":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-opus":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3-7":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-3":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"claude-":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0}},rt={input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0};function it(e){let t=e.toLowerCase();if(t in tt)return tt[t];let n;for(let e of Object.keys(nt))t.startsWith(e)&&(!n||e.length>n.length)&&(n=e);return n?nt[n]:rt}const at={"o1-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},o3:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"deepseek-r1-0528":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"deepseek-v3-0324":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"mistral-medium-2505":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"mistral-nemo":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"llama-4-scout-17b-16e-instruct":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1}},ot={"gpt-3.5-turbo":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"gpt-35-turbo":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"gpt-35":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"gpt-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"gpt-4.1":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"gpt-4.5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"gpt-4o":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},gpt:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},o1:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o1-preview":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o1-pro":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o3-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"o4-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},o4:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},o:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-3.1":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-3.2":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"llama-3.3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"llama-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},llama:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"mistral-large":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"mistral-small":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},mistral:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"phi-4":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},phi:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"deepseek-r1":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"deepseek-v3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},deepseek:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"ai21-jamba":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},ai21:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},jamba:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"cohere-command":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},cohere:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},command:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"grok-3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},grok:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0}},st=[`image`,`vision`],ct=[`video`],lt=[`audio`],ut=[`text`],dt=[`image`],ft=[`video`],pt=[`audio`],mt=[`text`],ht=[`embed`],gt=[`tool`,`gpt-4`,`gpt-4o`,`o1`,`o3`,`o4`,`llama-3`,`mistral-large`,`mistral-small`,`jamba`,`cohere`,`command`,`grok`];function _(e,t){return t.some(t=>e.includes(t))}function _t(e){let{baseModel:t}=yt(e),n=t.toLowerCase(),r=at[n];if(r)return vt(r,n);let i,a=0;for(let e of Object.keys(ot))n.startsWith(e)&&e.length>a&&(i=e,a=e.length);if(i)return vt(ot[i],n);let o={text:_(n,ut)||!0,image:_(n,st)||void 0,video:_(n,ct)||void 0,audio:_(n,lt)||void 0,embed:!1},s={text:_(n,mt)||!0,image:_(n,dt)||void 0,video:_(n,ft)||void 0,audio:_(n,pt)||void 0,embed:_(n,ht)||void 0},c=_(n,gt)||void 0;return vt({input:o,output:s,tool_support:c,tool_support_streaming:c||void 0},n)}function vt(e,t){return t.startsWith(`gpt-`)||t.startsWith(`o1`)||t.startsWith(`o3`)||t.startsWith(`o4`)?e:{...e,tool_support:!1,tool_support_streaming:!1}}function yt(e){let t=e.split(`::`);return t.length===2?{deploymentName:t[0],baseModel:t[1]}:{deploymentName:e,baseModel:e}}function v(e,t){return t.some(t=>e.includes(t))}function y(e,t,n,r=0){let i=e.indexOf(t);if(i===-1)return!1;let a=e.slice(i+t.length).match(/^(\d+)(?:[.-](\d+))?/);if(!a)return!1;let o=Number(a[1]),s=Number(a[2]??0);return o>n||o===n&&s>=r}function bt(e){let t=e.toLowerCase(),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return t.includes(`inference-profile/`)?r.replace(/^[^.]+\./,``):r}function xt(e){if(v(e,[`nova-2-multimodal-embeddings`,`titan-embed`,`cohere.embed`,`marengo-embed`]))return{input:{text:!0,image:v(e,[`multimodal`,`embed-image`,`embed-v4`,`marengo`]),video:v(e,[`multimodal`,`marengo`]),audio:e.includes(`multimodal`),embed:!1},output:{text:!1,image:!1,video:!1,audio:!1,embed:!0}};if(v(e,[`nova-canvas`,`titan-image-generator`]))return{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1}};if(e.includes(`nova-reel`))return{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!1,video:!0,audio:!1,embed:!1}};let t=e.includes(`anthropic.claude`)&&!e.includes(`claude-3-5-haiku`)||e.includes(`amazon.nova`)&&!e.includes(`nova-micro`)||e.includes(`google.gemma`)||v(e,[`meta.llama3-2-11b`,`meta.llama3-2-90b`,`meta.llama4`])||v(e,[`mistral.magistral-`,`mistral.ministral-3-`,`mistral.mistral-large-3-`,`mistral.pixtral-`])||y(e,`kimi-k`,2,5)||e.includes(`nemotron-nano-12b`)||e.includes(`qwen3-vl`)||e.includes(`palmyra-vision`)||e.startsWith(`openai.gpt-`)&&!e.includes(`gpt-oss`)||e.startsWith(`xai.grok-`),n=e.includes(`amazon.nova`)&&!e.includes(`nova-micro`)||e.includes(`twelvelabs.pegasus`)||y(e,`google.gemma-`,4),r=v(e,[`nova-sonic`,`mistral.voxtral-`])||e.includes(`google.gemma-4-e2b`);return{input:{text:!e.includes(`nova-sonic-v1`),image:t,video:n,audio:r,embed:!1},output:{text:!0,image:!1,video:!1,audio:e.includes(`nova-sonic`),embed:!1}}}function St(e){if(e.includes(`ai21.jamba`))return{context_window:256e3,max_output_tokens:4096};if(e.includes(`amazon.nova-2`))return{context_window:1e6,max_output_tokens:65536};if(e.includes(`amazon.nova-premier`))return{context_window:1e6,max_output_tokens:25600};if(e.includes(`amazon.nova-micro`))return{context_window:128e3,max_output_tokens:5120};if(v(e,[`amazon.nova-lite`,`amazon.nova-pro`]))return{context_window:3e5,max_output_tokens:5120};if(e.includes(`anthropic.claude`)){if(v(e,[`claude-fable-5`,`claude-mythos`,`claude-sonnet-5`,`claude-opus-4-6`,`claude-opus-4-7`,`claude-opus-4-8`]))return{context_window:1e6,max_output_tokens:131072};if(e.includes(`claude-sonnet-4-6`))return{context_window:1e6,max_output_tokens:65536};if(e.includes(`claude-haiku-4-5`))return{context_window:2e5,max_output_tokens:63999};if(v(e,[`claude-opus-4-5`,`claude-sonnet-4`]))return{context_window:2e5,max_output_tokens:65536};if(e.includes(`claude-opus-4-1`))return{context_window:2e5,max_output_tokens:32e3};if(e.includes(`claude-3-5-haiku`))return{context_window:2e5,max_output_tokens:8192};if(e.includes(`claude-3-haiku`))return{context_window:2e5,max_output_tokens:4096}}return e.includes(`cohere.command-r`)?{context_window:128e3,max_output_tokens:4096}:y(e,`deepseek.v`,3,2)?{context_window:163840,max_output_tokens:8192}:v(e,[`deepseek.v3`,`deepseek.r1`])?{context_window:128e3,max_output_tokens:8192}:e.includes(`google.gemma-4-31b`)||e.includes(`google.gemma-4-26b`)?{context_window:256e3}:e.includes(`google.gemma-4-e2b`)?{context_window:128e3}:e.includes(`google.gemma-3-`)?{context_window:128e3,max_output_tokens:8192}:e.includes(`meta.llama4-scout`)?{context_window:1e7,max_output_tokens:8192}:e.includes(`meta.llama4-maverick`)?{context_window:1e6,max_output_tokens:8192}:e.includes(`meta.llama3-`)&&!e.includes(`llama3-1`)&&!e.includes(`llama3-2`)&&!e.includes(`llama3-3`)?{context_window:8192,max_output_tokens:8192}:v(e,[`meta.llama3-1`,`meta.llama3-2`,`meta.llama3-3`])?{context_window:128e3,max_output_tokens:4096}:y(e,`minimax.minimax-m`,2,1)?{context_window:196e3,max_output_tokens:8192}:e.includes(`minimax.minimax-m2`)?{context_window:1e6,max_output_tokens:8192}:v(e,[`mistral.devstral-2`,`mistral.mistral-large-3`])?{context_window:256e3,max_output_tokens:32768}:e.includes(`mistral.magistral-`)?{context_window:128e3,max_output_tokens:40960}:e.includes(`mistral.ministral-3-`)?{context_window:128e3,max_output_tokens:8192}:e.includes(`mistral.pixtral-`)?{context_window:128e3,max_output_tokens:16384}:v(e,[`mistral.mistral-7b`,`mistral.mistral-large-2402`,`mistral.mistral-small-2402`,`mistral.mixtral-`,`mistral.voxtral-`])?{context_window:32e3,max_output_tokens:e.includes(`voxtral`)?void 0:4096}:v(e,[`moonshot.kimi-k2`,`moonshotai.kimi-k2`])?{context_window:256e3,max_output_tokens:16384}:v(e,[`nvidia.nemotron-nano-3`,`nvidia.nemotron-super-3`])?{context_window:256e3,max_output_tokens:e.includes(`super`)?32768:8192}:e.includes(`nvidia.nemotron-nano-`)?{context_window:128e3,max_output_tokens:8192}:e.startsWith(`openai.gpt-5`)?{context_window:272e3}:e.includes(`openai.gpt-oss`)?{context_window:128e3,max_output_tokens:16384}:e.includes(`qwen3-235b`)?{context_window:256e3,max_output_tokens:8192}:e.includes(`qwen3-32b`)?{context_window:32e3,max_output_tokens:8192}:e.includes(`qwen3-coder-30b`)?{context_window:256e3,max_output_tokens:16384}:e.includes(`qwen3-coder-480b`)?{context_window:128e3,max_output_tokens:16384}:e.includes(`qwen3-coder-next`)?{context_window:256e3,max_output_tokens:16384}:v(e,[`qwen3-next-`,`qwen3-vl-`])?{context_window:256e3,max_output_tokens:8192}:e.includes(`writer.palmyra-vision`)?{context_window:4096,max_output_tokens:4096}:v(e,[`writer.palmyra-x4`,`writer.palmyra-x5`])?{context_window:128e3,max_output_tokens:8192}:e.startsWith(`xai.grok-`)?{context_window:1e6}:v(e,[`zai.glm-4.7`,`zai.glm-4.6`])?{context_window:203e3,max_output_tokens:4096}:e.includes(`zai.glm-5`)?{context_window:2e5,max_output_tokens:131072}:{}}function Ct(e){let t=!1,n=!1;return e.includes(`anthropic.claude`)?(t=!0,n=!e.includes(`claude-3-5-haiku`)):e.includes(`ai21.jamba`)&&!e.includes(`jamba-instruct`)||e.includes(`amazon.nova`)&&!v(e,[`nova-canvas`,`nova-reel`])||e.includes(`cohere.command-r`)?(t=!0,n=!0):(e.includes(`meta.llama3-1`)||v(e,[`meta.llama3-2-11b`,`meta.llama3-2-90b`])||v(e,[`mistral.mistral-large`,`mistral.pixtral`])||e.includes(`twelvelabs.pegasus`)||e.includes(`writer.palmyra`))&&(t=!0),{tool_support:t,tool_support_streaming:t&&n}}function wt(e){let t=bt(e);return{...xt(t),...St(t)}}function Tt(e,t){let n=bt(e);if(t===`runtime`&&(n.startsWith(`openai.gpt-`)&&!n.includes(`gpt-oss`)||n.startsWith(`xai.grok-`)||y(n,`google.gemma-`,4)))return{input:{},output:{}};let r=wt(n),i=t===`mantle`?{tool_support:!0,tool_support_streaming:!0}:Ct(n);return{input:r.input,output:r.output,...i}}function Et(e){return Tt(e,`runtime`)}var b;(function(e){e.openai=`openai`,e.openai_compatible=`openai_compatible`,e.azure_openai=`azure_openai`,e.azure_foundry=`azure_foundry`,e.huggingface_ie=`huggingface_ie`,e.replicate=`replicate`,e.bedrock=`bedrock`,e.bedrock_mantle=`bedrock_mantle`,e.vertexai=`vertexai`,e.togetherai=`togetherai`,e.mistralai=`mistralai`,e.groq=`groq`,e.watsonx=`watsonx`,e.xai=`xai`,e.anthropic=`anthropic`})(b||={});const Dt={openai:{id:b.openai,name:`OpenAI`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},azure_openai:{id:b.azure_openai,name:`Azure OpenAI`,requiresApiKey:!1,requiresEndpointUrl:!0,supportSearch:!1},azure_foundry:{id:b.azure_foundry,name:`Microsoft Foundry`,requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},huggingface_ie:{id:b.huggingface_ie,name:`HuggingFace Inference Endpoint`,requiresApiKey:!0,requiresEndpointUrl:!0},replicate:{id:b.replicate,name:`Replicate`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!0},bedrock:{id:b.bedrock,name:`Amazon Bedrock`,requiresApiKey:!1,requiresEndpointUrl:!1,endpointPlaceholder:`region name (eg. us-east-1)`,supportSearch:!1},bedrock_mantle:{id:b.bedrock_mantle,name:`Amazon Bedrock Mantle`,requiresApiKey:!1,requiresEndpointUrl:!0,endpointPlaceholder:`region name (eg. us-west-2)`,supportSearch:!1},vertexai:{id:b.vertexai,name:`Google Agent Platform (Vertex AI)`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},togetherai:{id:b.togetherai,name:`Together AI`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},mistralai:{id:b.mistralai,name:`Mistral AI`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},groq:{id:b.groq,name:`Groq Cloud`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},watsonx:{id:b.watsonx,name:`IBM WatsonX`,requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},xai:{id:b.xai,name:`xAI (Grok)`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},openai_compatible:{id:b.openai_compatible,name:`OpenAI Compatible`,requiresApiKey:!0,requiresEndpointUrl:!0,endpointPlaceholder:`https://api.example.com/v1`,supportSearch:!1},anthropic:{id:b.anthropic,name:`Anthropic`,requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1}};var x;(function(e){e.max_tokens=`max_tokens`,e.temperature=`temperature`,e.top_p=`top_p`,e.top_k=`top_k`,e.presence_penalty=`presence_penalty`,e.frequency_penalty=`frequency_penalty`,e.stop_sequence=`stop_sequence`,e.effort=`effort`,e.seed=`seed`,e.number_of_images=`number_of_images`})(x||={});var S;(function(e){e.numeric=`numeric`,e.enum=`enum`,e.boolean=`boolean`,e.string_list=`string_list`})(S||={});var Ot;(function(e){e.safety=`safety`,e.system=`system`,e.user=`user`,e.assistant=`assistant`,e.negative=`negative`,e.mask=`mask`,e.tool=`tool`})(Ot||={});var kt;(function(e){e.text=`text`,e.image=`image`})(kt||={});var At;(function(e){e.Available=`available`,e.Pending=`pending`,e.Stopped=`stopped`,e.Unavailable=`unavailable`,e.Unknown=`unknown`,e.Legacy=`legacy`})(At||={});var jt;(function(e){e.Classifier=`classifier`,e.Regressor=`regressor`,e.Clustering=`clustering`,e.AnomalyDetection=`anomaly-detection`,e.TimeSeries=`time-series`,e.Text=`text`,e.Image=`image`,e.Audio=`audio`,e.Video=`video`,e.Embedding=`embedding`,e.Chat=`chat`,e.Code=`code`,e.NLP=`nlp`,e.MultiModal=`multi-modal`,e.Test=`test`,e.Other=`other`,e.Unknown=`unknown`})(jt||={});var Mt;(function(e){e.running=`running`,e.succeeded=`succeeded`,e.failed=`failed`,e.cancelled=`cancelled`})(Mt||={}),x.max_tokens,S.numeric,x.temperature,S.numeric,x.top_p,S.numeric,x.top_k,S.numeric,x.presence_penalty,S.numeric,x.frequency_penalty,S.numeric,x.stop_sequence,S.string_list;function Nt(e,t,n,r){let i=e.toLowerCase(),a=i.indexOf(t.toLowerCase());if(a===-1)return!1;let o=i.slice(a+t.length).match(/^(\d+)(?:[.-](\d+))?/);if(!o)return!1;let s=Number(o[1]),c=Number(o[2]??0);return s>n||s===n&&c>=r}const Pt=new Set([`deepseek`,`minimax`,`mistral`,`moonshot`,`moonshotai`,`nvidia`,`qwen`,`writer`,`zai`]),Ft={anthropic:`Anthropic`,deepseek:`DeepSeek`,google:`Google`,minimax:`MiniMax`,mistral:`Mistral AI`,moonshot:`Moonshot AI`,moonshotai:`Moonshot AI`,nvidia:`NVIDIA`,openai:`OpenAI`,qwen:`Qwen`,writer:`Writer`,xai:`xAI`,zai:`Z.AI`};function It(e){return e.split(`.`)[0]}function Lt(e){let t=e.toLowerCase(),n=It(t);if(n===`anthropic`&&t.includes(`.claude-`))return`messages`;if(n===`openai`)return t.includes(`.gpt-oss`)?`chat_completions`:t.includes(`.gpt-`)?`responses`:void 0;if(n===`xai`&&t.includes(`.grok-`))return`responses`;if(n===`google`&&t.includes(`.gemma-`))return Nt(t,`google.gemma-`,4,0)?`responses`:Nt(t,`google.gemma-`,3,0)?`chat_completions`:void 0;if(Pt.has(n))return`chat_completions`}function Rt(e){let t=e.toLowerCase(),n=Lt(t);if(!n)return;let r=It(t);return{protocol:n,owner:Ft[r]??r}}function zt(e){return Rt(e)?Tt(e,`mantle`):{input:{},output:{}}}const Bt={"chatgpt-4o-latest":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0}},Vt={gpt:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-3.5":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"gpt-4":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4-turbo":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4o":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4.1":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-4.5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-5":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"chatgpt-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"dall-e":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"gpt-oss":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},o:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"o1-mini":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"o1-preview":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"omni-moderation":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},sora:{input:{text:!0,image:!0,video:!0,audio:!1,embed:!1},output:{text:!1,image:!1,video:!0,audio:!0,embed:!1},tool_support:!1},"text-embedding":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!1,video:!1,audio:!1,embed:!0},tool_support:!1},"text-moderation":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},whisper:{input:{text:!1,image:!1,video:!1,audio:!0,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1}},Ht=[`image`],Ut=[`video`],Wt=[`audio`],Gt=[`text`],Kt=[`image`],qt=[`video`],Jt=[`audio`],Yt=[`text`],Xt=[`embed`],Zt=[`tool`,`gpt`,`gpt-5`,`o1`,`o3`,`o4`];function C(e,t){return t.some(t=>e.includes(t))}function Qt(e){return e.toLowerCase()}function $t(e){let t=Qt(e),n=Bt[t];if(n)return{...n,tool_support_streaming:n.tool_support_streaming??n.tool_support};let r,i=0;for(let e of Object.keys(Vt))t.startsWith(e)&&e.length>i&&(r=e,i=e.length);if(r){let e=Vt[r];return{...e,tool_support_streaming:e.tool_support_streaming??e.tool_support}}let a={text:C(t,Gt)||void 0,image:C(t,Ht)||void 0,video:C(t,Ut)||void 0,audio:C(t,Wt)||void 0,embed:!1},o={text:C(t,Yt)||void 0,image:C(t,Kt)||void 0,video:C(t,qt)||void 0,audio:C(t,Jt)||void 0,embed:C(t,Xt)||void 0},s=C(t,Zt)||void 0;return{input:a,output:o,tool_support:s,tool_support_streaming:s}}const en={"gemini-2.0-flash-lite-001":{input:{text:!0,image:!0,video:!0,audio:!0,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"gemma-4-26b-a4b-it-maas":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1}},tn={gemini:{input:{text:!0,image:!0,video:!0,audio:!0,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gemini-2.5-flash-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"gemini-3.0-pro-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"gemini-3.0-flash-image":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},imagen:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-3.0":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-3.0-capability":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-4.0":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},"imagen-4.0-capability":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!1,image:!0,video:!1,audio:!1,embed:!1},tool_support:!1},claude:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},llama:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"llama-2":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},"llama-3.2":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"llama-4":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"grok-3":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},grok:{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},deepseek:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},gemma:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!1},glm:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},"gpt-oss":{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},kimi:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},minimax:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0},qwen:{input:{text:!0,image:!1,video:!1,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0}},nn=[`image`],rn=[`video`],an=[`audio`],on=[`text`],sn=[`image`],cn=[`video`],ln=[`audio`],un=[`text`],dn=[`embed`],fn=[`tool`,`sonnet`,`opus`,`gemini`,`claude`,`grok`,`deepseek`,`gemma`,`glm`,`gpt-oss`,`kimi`,`llama`,`minimax`,`qwen`];function w(e,t){return t.some(t=>e.includes(t))}function pn(e){let t=e.toLowerCase().split(`/`);return t[t.length-1]}function mn(e){let t=pn(e),n=en[t];if(n)return n;let r,i=0;for(let e of Object.keys(tn))t.startsWith(e)&&e.length>i&&(r=e,i=e.length);return r?tn[r]:{input:{text:w(t,on)||void 0,image:w(t,nn)||void 0,video:w(t,rn)||void 0,audio:w(t,an)||void 0,embed:!1},output:{text:w(t,un)||void 0,image:w(t,sn)||void 0,video:w(t,cn)||void 0,audio:w(t,ln)||void 0,embed:w(t,dn)||void 0},tool_support:w(t,fn)||void 0}}function hn(e,t){if(e.startsWith(`locations/`)){let t=e.split(`/`);t.length>=3&&(e=t.slice(2).join(`/`))}let n=gn(e,t);return n.input.audio=!1,n.output.audio=!1,n.output.video=!1,n}function gn(e,t){switch(t?.toLowerCase()){case b.anthropic:return it(e);case b.vertexai:return mn(e);case b.openai:return $t(e);case b.openai_compatible:return vn(e);case b.bedrock:return Et(e);case b.bedrock_mantle:return zt(e);case b.azure_foundry:return _t(e);case b.groq:case b.mistralai:return vn(e);case b.togetherai:return bn(e);case b.xai:return{input:{text:!0,image:e.includes(`vision`)},output:{text:!0},tool_support:!0};default:return e.startsWith(`gpt`)?$t(e):e.startsWith(`claude`)?it(e):e.startsWith(`grok`)?{input:{text:!0,image:e.includes(`vision`)},output:{text:!0},tool_support:!0}:e.startsWith(`publishers/`)?mn(e):e.startsWith(`arn:aws`)?Et(e):{input:{},output:{}}}}const _n=[`image`,`embed`,`moderation`,`whisper`,`sora`,`dall-e`,`tts`];function vn(e){let t=$t(e);if(t.tool_support!==void 0)return t;let n=e.toLowerCase(),r=_n.some(e=>n.includes(e));return{input:{text:!0},output:{text:!0},tool_support:!r,tool_support_streaming:!r}}const yn=[`vision`,`llama-4`,`gemma-3`,`qwen2-vl`,`qwen2.5-vl`,`-vl-`];function bn(e){let t=vn(e),n=e.toLowerCase();return yn.some(e=>n.includes(e))&&(t.input={...t.input,image:!0}),t}function xn(e,t,n=!1){let r=hn(e,t);return n?!!(r.tool_support_streaming??r.tool_support):!!r.tool_support}var Sn;(function(e){e.TEXT_IMAGE=`TEXT_IMAGE`,e.EDIT_MODE_INPAINT_REMOVAL=`EDIT_MODE_INPAINT_REMOVAL`,e.EDIT_MODE_INPAINT_INSERTION=`EDIT_MODE_INPAINT_INSERTION`,e.EDIT_MODE_BGSWAP=`EDIT_MODE_BGSWAP`,e.EDIT_MODE_OUTPAINT=`EDIT_MODE_OUTPAINT`,e.CUSTOMIZATION_SUBJECT=`CUSTOMIZATION_SUBJECT`,e.CUSTOMIZATION_STYLE=`CUSTOMIZATION_STYLE`,e.CUSTOMIZATION_CONTROLLED=`CUSTOMIZATION_CONTROLLED`,e.CUSTOMIZATION_INSTRUCT=`CUSTOMIZATION_INSTRUCT`})(Sn||={});var Cn;(function(e){e.MASK_MODE_USER_PROVIDED=`MASK_MODE_USER_PROVIDED`,e.MASK_MODE_BACKGROUND=`MASK_MODE_BACKGROUND`,e.MASK_MODE_FOREGROUND=`MASK_MODE_FOREGROUND`,e.MASK_MODE_SEMANTIC=`MASK_MODE_SEMANTIC`})(Cn||={});var wn;(function(e){e.HIGH=`HIGH`,e.MEDIUM=`MEDIUM`,e.LOW=`LOW`,e.MINIMAL=`MINIMAL`,e.THINKING_LEVEL_UNSPECIFIED=`THINKING_LEVEL_UNSPECIFIED`})(wn||={});var T;(function(e){e.virtual_lb=`virtual_lb`,e.virtual_mediator=`virtual_mediator`,e.test=`test`})(T||={});const Tn={...b,...T},En={virtual_lb:{id:T.virtual_lb,name:`Virtual - Load Balancer`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},virtual_mediator:{id:T.virtual_mediator,name:`Virtual - Mediator`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},test:{id:T.test,name:`Test LLM`,requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1}},Dn={...Dt,...En};function On(e){if(!e||e.provider!==Tn.vertexai)return;let t=e.settings?.bucket_access_principal;return typeof t==`string`&&t.trim().length>0?t.trim():void 0}const kn=`id name tags description properties clearance compartments`,An=`members`;function jn(e){return e.startsWith(`*.`)?e.slice(2):e}function Mn(e){return e.startsWith(`[`)&&e.endsWith(`]`)?e.slice(1,-1):e}function Nn(e){let t=e.indexOf(`:`);return t>=0&&e.indexOf(`:`,t+1)>=0&&!e.startsWith(`[`)}function Pn(e){return e.includes(` `)||e.includes(` `)||e.includes(`
|
|
2
|
+
`)||e.includes(`\r`)||e.includes(`\f`)||e.includes(`\v`)}function E(e){if(typeof e!=`string`)return;let t=e.trim().toLowerCase();if(t){t=jn(t),t=t.endsWith(`.`)?t.slice(0,-1):t,t.includes(`://`)||(t=Nn(t)?`https://[${t}]`:`https://${t}`);try{let e=jn(Mn(new URL(t).hostname.toLowerCase()));return e=e.endsWith(`.`)?e.slice(0,-1):e,e&&!Pn(e)?e:void 0}catch{return}}}function D(e,t){try{return E((t?new URL(e,t):new URL(e)).hostname)}catch{return}}function Fn(e){return Array.isArray(e)?Array.from(new Set(e.map(e=>E(e)).filter(e=>!!e))):[]}function In(e,t){if(!t||t.length===0)return!0;let n=E(e);return n?t.some(e=>{let t=E(e);return!!t&&(n===t||n.endsWith(`.${t}`))}):!1}function Ln(e,t,n){if(!t||t.length===0)return!0;let r=D(e,n);return!!r&&In(r,t)}function Rn(e){let t=E(e);return!!t&&(t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`vertesia.io`||t.endsWith(`.vertesia.io`))}function zn(e){return Rn(D(e))}var Bn;(function(e){e.gladia=`gladia`,e.github=`github`,e.aws=`aws`,e.magic_pdf=`magic_pdf`,e.serper=`serper`,e.exa=`exa`,e.linkup=`linkup`,e.resend=`resend`,e.ask_user_webhook=`ask_user_webhook`})(Bn||={});function Vn(e,t){return{...t,integration:e}}var Hn;(function(e){e.analyzed_pages=`analyzed_pages`,e.extracted_tables=`extracted_tables`,e.analyzed_images=`analyzed_images`,e.input_token_used=`input_token_used`,e.output_token_used=`output_token_used`,e.task_run=`task_run`})(Hn||={});const Un=`openid`,O=`profile`,k=`offline_access`,Wn=`project_switch`,Gn=[Un,O,k],Kn=[Wn],qn=new Set([t.api_key_secret_read,t.manage_billing,t.billing_read,t.iam_impersonate,t.studio_access]),Jn=Object.values(t).filter(e=>!qn.has(e)),Yn=new Set(Gn),Xn=new Set(Kn),Zn=new Set(Jn),Qn=/^[0-9a-f]{24}$/i,$n=`project:`;function er(){return[...Jn]}function tr(e){return Yn.has(e)}function nr(e){return Xn.has(e)}function rr(e){return Zn.has(e)}function ir(e){return tr(e)||nr(e)||rr(e)}function ar(e){return e.startsWith($n)?Qn.test(e.slice(8)):!1}function or(e){return`${$n}${e}`}function sr(e){return e.includes(Un)}function cr(e){return e.includes(O)}function lr(e){return e.includes(k)}function ur(e){return e.includes(Wn)}function dr(e){return sr(e)?[...e]:e.filter(e=>e!==O)}function fr(e){return e.filter(rr)}var pr=class{parent;parentUnits;spanUnits;unitsDone;constructor(e,t,n){this.parent=e,this.parentUnits=t,this.spanUnits=n,this.unitsDone=0}done(e){let t=this.spanUnits-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e,this.parent.done(e*this.parentUnits/this.spanUnits))}get parentUnitsDone(){return Math.round(this.unitsDone*this.parentUnits/this.spanUnits)}get isDone(){return this.unitsDone>=this.spanUnits}},mr=class{total;unitsDone=0;constructor(e){this.total=e}get fraction(){return this.unitsDone/this.total}get percent(){return Math.round(this.fraction*100)}get isDone(){return this.unitsDone>=this.total}done(e){let t=this.total-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e)}span(e,t){return new pr(this,e,t||e)}};const hr=`sys:GeneralAgent`,gr=`^[a-z][a-z0-9_-]*$`,A=`^[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*$`,_r=RegExp(gr),j=RegExp(A),vr=[`security`,`revision`,`is_deleted`,`embeddings_text`,`embeddings_image`,`embeddings_properties`,`_indexing_metadata`],yr=A,br=j;function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var N;(function(e){e.owner=`owner`,e.admin=`admin`,e.manager=`manager`,e.developer=`developer`,e.application=`application`,e.automation=`automation`,e.content_processor=`content_processor`,e.consumer=`consumer`,e.executor=`executor`,e.reader=`reader`,e.auditor=`auditor`,e.support=`support`,e.billing=`billing`,e.member=`member`,e.app_member=`app_member`,e.content_superadmin=`content_superadmin`})(N||={});function xr(e,t){switch(t){case N.owner:return!0;case N.admin:return e!==N.billing&&e!==N.owner;case N.developer:return e===N.developer;case N.billing:return e===N.billing;default:return!1}}var Sr;(function(e){e.public=`public`,e.account=`account`,e.project=`project`})(Sr||={});var P;(function(e){e.content_type=`content_type`,e.intake=`intake`,e.analysis=`analysis`,e.agent=`agent`,e.non_applicable=`non_applicable`})(P||={});const Cr={ExtractInformation:P.intake,SelectDocumentType:P.intake,GenerateMetadataModel:P.content_type,ChunkDocument:P.intake,IdentifyTextSections:P.intake,AnalyzeDocument:P.analysis,ReduceTextSections:P.analysis,GenericAgent:P.non_applicable,AdhocTaskAgent:P.non_applicable,Mediator:P.non_applicable,AnalyzeConversation:P.analysis,GetAgentConversationTopic:P.analysis,ContentSearchAgent:P.analysis,StudioAssistant:P.agent};function wr(e){e.startsWith(`sys:`)&&(e=e.substring(4));let t=Cr[e];if(t!==P.non_applicable)return t||void 0}const Tr={type:`object`,properties:{enabled:{type:`boolean`,nullable:!0,description:`Enable the browser_use workflow-level tool for this project. Defaults to true.`},default_policy:{type:`string`,nullable:!0,enum:[`read_only`,`low_write`,`requires_approval`,`unrestricted`],description:`Risk policy used when a browser_use call does not specify one. Defaults to low_write.`},max_policy:{type:`string`,nullable:!0,enum:[`read_only`,`low_write`,`requires_approval`,`unrestricted`],description:`Maximum risk policy a browser_use call may request. Defaults to unrestricted.`},allowed_hosts:{type:`array`,nullable:!0,items:{type:`string`},description:`Optional project-wide host allowlist. When present, browser_use calls can only request hosts contained by this list.`},allow_file_uploads:{type:`boolean`,nullable:!0,description:`Allow replay scripts to hydrate artifacts/documents as files in the browser sandbox. Defaults to true.`},allow_playwright_scripts:{type:`boolean`,nullable:!0,description:`Allow browser_playwright_script in browser workstreams. Defaults to true.`},capture_screenshots:{type:`string`,nullable:!0,enum:[`off`,`on_action`,`each_turn`],description:`Persist browser screenshots for UI progress. Defaults to on_action.`},prefer_raw_screenshots:{type:`boolean`,nullable:!0,description:`Prefer unannotated screenshots in the browser-use UI widget. Defaults to true.`}},required:[],additionalProperties:!1},Er=[`keyword`,`text`,`boolean`,`long`,`double`,`date`],Dr=8191;function Or(e){if(e===void 0)return[];if(!e||typeof e!=`object`||Array.isArray(e))return[`indexing.property_mappings must be an object keyed by property path`];let t=Object.entries(e),n=[];t.length>200&&n.push(`indexing.property_mappings must contain at most 200 fields`);let r=new Set(Er);for(let[e,i]of t){let t=`indexing.property_mappings.${e}`;if(j.test(e)||n.push(`${t} must be a dot-separated path containing only letters, numbers, and underscores`),!i||typeof i!=`object`||Array.isArray(i)){n.push(`${t} must be an object`);continue}let a=i,o=Object.keys(a).filter(e=>![`type`,`format`,`ignore_above`,`ignore_malformed`].includes(e));o.length>0&&n.push(`${t} contains unsupported option(s): ${o.join(`, `)}`),(typeof a.type!=`string`||!r.has(a.type))&&n.push(`${t}.type must be one of: ${Er.join(`, `)}`),a.format!==void 0&&(a.type!==`date`||typeof a.format!=`string`)&&n.push(`${t}.format is supported only for date mappings`),a.ignore_above!==void 0&&(a.type!==`keyword`||!Number.isInteger(a.ignore_above)||a.ignore_above<1||a.ignore_above>Dr)&&n.push(`${t}.ignore_above is supported only for keyword mappings and must be an integer from 1 to ${Dr}`),a.ignore_malformed!==void 0&&(![`long`,`double`,`date`].includes(String(a.type))||typeof a.ignore_malformed!=`boolean`)&&n.push(`${t}.ignore_malformed is supported only for long, double, and date mappings`)}return n}var F;(function(e){e.text=`text`,e.image=`image`,e.properties=`properties`})(F||={});var I;(function(e){e.full_text=`full_text`})(I||={});const kr={...F,...I},Ar=`id name account`;function jr(e){return e<5e4?{shard_size:Math.max(Math.ceil(e/4),5e3),parallel_shard_count:Math.min(4,Math.max(1,Math.ceil(e/5e3))),max_shards:4}:e<5e5?{shard_size:5e4,parallel_shard_count:8,max_shards:10}:e<2e6?{shard_size:1e5,parallel_shard_count:8,max_shards:20}:{shard_size:25e4,parallel_shard_count:8,max_shards:40}}const Mr={en:`English`,zh:`Chinese`,es:`Spanish`,hi:`Hindi`,ar:`Arabic`,pt:`Portuguese`,bn:`Bengali`,ru:`Russian`,ja:`Japanese`,de:`German`,fr:`French`,ko:`Korean`,it:`Italian`,tr:`Turkish`,vi:`Vietnamese`,pl:`Polish`,uk:`Ukrainian`,nl:`Dutch`,th:`Thai`,el:`Greek`,cs:`Czech`,sv:`Swedish`,ro:`Romanian`,hu:`Hungarian`,da:`Danish`,fi:`Finnish`,no:`Norwegian`,he:`Hebrew`,id:`Indonesian`,fa:`Persian`},Nr=[`running`],Pr=3e4,Fr=5e4,L=[`content`,`workflow`,`security`,`billing`,`system`,`external`],R=[`high`,`normal`,`low`],Ir=10,Lr=30,Rr=4e3,zr=2e4,Br=2e3,Vr=`received`,Hr=`external_event`,Ur=`external:`,Wr=N.automation,Gr=[N.automation,N.executor,N.reader],Kr=`!.!!.!=.!==.%.*.+.-./.<.<=.==.===.>.>=.?:.all.and.cat.filter.if.in.map.max.merge.min.missing.missing_some.none.or.reduce.some.substr.var`.split(`.`);function z(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function B(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function qr(e,t){if(!z(e)){t.push(`filter must be an object`);return}let n=e;if(n.event_category!==void 0)if(!B(n.event_category))t.push(`filter.event_category must be an array of strings`);else for(let e of n.event_category)e!==`*`&&!L.includes(e)&&t.push(`filter.event_category contains unsupported value: ${e}`);if(n.exclude_event_category!==void 0)if(!B(n.exclude_event_category))t.push(`filter.exclude_event_category must be an array of strings`);else for(let e of n.exclude_event_category)L.includes(e)||t.push(`filter.exclude_event_category contains unsupported value: ${e}`);n.action!==void 0&&!B(n.action)&&t.push(`filter.action must be an array of strings`),n.resource_type!==void 0&&!B(n.resource_type)&&t.push(`filter.resource_type must be an array of strings`),n.condition!==void 0&&!z(n.condition)&&t.push(`filter.condition must be a JSON Logic object`)}function Jr(e,t){if(!z(e)){t.push(`target must be an object`);return}let n=e.type;if(n!==`workflow`&&n!==`webhook`&&n!==`agent`&&n!==`process`){t.push(`target.type must be one of workflow, webhook, agent, process`);return}let r=e;switch(r.type){case`workflow`:(typeof r.endpoint!=`string`||r.endpoint.length===0)&&t.push(`workflow target requires a non-empty "endpoint"`);break;case`webhook`:(typeof r.url!=`string`||r.url.length===0)&&t.push(`webhook target requires a non-empty "url"`),r.timeout_ms!==void 0&&(!Number.isInteger(r.timeout_ms)||r.timeout_ms<=0||r.timeout_ms>5e4)&&t.push(`webhook target.timeout_ms must be an integer between 1 and ${Fr}`),r.signing_mode!==void 0&&r.signing_mode!==`signed`&&r.signing_mode!==`legacy_unsigned`&&t.push(`webhook target.signing_mode must be "signed" or "legacy_unsigned"`),r.payload_mode!==void 0&&r.payload_mode!==`event_envelope`&&r.payload_mode!==`legacy_notify_endpoint`&&r.payload_mode!==`workflow_notification`&&t.push(`webhook target.payload_mode must be "event_envelope", "legacy_notify_endpoint" or "workflow_notification"`),r.encrypted_headers===!0&&t.push(`webhook target.encrypted_headers is not supported`),r.headers!==void 0&&!z(r.headers)&&t.push(`webhook target.headers must be an object of strings`);break;case`process`:(typeof r.process_ref!=`string`||r.process_ref.length===0)&&!z(r.process_definition)&&t.push(`process target requires "process_ref" or an inline "process_definition"`);break;case`agent`:{let e=r.on_match??`start`;e!==`start`&&e!==`signal`&&e!==`ensure`&&t.push(`agent target.on_match must be "start", "signal", or "ensure"`),(e===`signal`||e===`ensure`)&&(typeof r.message_path!=`string`||r.message_path.length===0)&&t.push(`agent target.message_path is required when on_match is "${e}"`),r.signal_name!==void 0&&r.signal_name!==`UserInput`&&t.push(`agent target.signal_name must be "UserInput"`);for(let e of[`interaction_ref`,`message_path`,`client_message_id_path`,`skip_if_path_exists`,`author_path`]){let n=r[e];n!==void 0&&typeof n!=`string`&&t.push(`agent target.${e} must be a string`)}if(r.metadata!==void 0&&!z(r.metadata)&&t.push(`agent target.metadata must be an object`),r.statuses!==void 0)if(!B(r.statuses))t.push(`agent target.statuses must be an array of strings`);else{let e=r.statuses.filter(e=>!Nr.includes(e));e.length>0&&t.push(`agent target.statuses may only contain signalable statuses: ${e.join(`, `)} not allowed. Allowed: ${Nr.join(`, `)} (terminal runs are handled by on_terminal).`)}for(let e of[`ignore_author_patterns`,`require_command_prefixes`,`require_mentions`]){let n=r[e];n!==void 0&&!B(n)&&t.push(`agent target.${e} must be an array of strings`)}r.missing_thread!==void 0&&(e===`signal`?r.missing_thread!==`retry`&&r.missing_thread!==`skip`&&t.push(`agent target.missing_thread must be "retry" or "skip"`):t.push(`agent target.missing_thread is only valid when on_match is "signal"`)),r.on_terminal!==void 0&&r.on_terminal!==`skip`&&r.on_terminal!==`restart`&&t.push(`agent target.on_terminal must be "skip" or "restart"`);break}}}function Yr(e,t){e.description!==void 0&&typeof e.description!=`string`&&t.push(`description must be a string`),e.run_as_role!==void 0&&!Object.values(N).includes(e.run_as_role)&&t.push(`run_as_role contains unsupported value: ${e.run_as_role}`),e.enabled!==void 0&&typeof e.enabled!=`boolean`&&t.push(`enabled must be a boolean`),e.priority!==void 0&&!R.includes(e.priority)&&t.push(`priority must be one of ${R.join(`, `)}`)}function Xr(e){let t=[];return(typeof e?.name!=`string`||e.name.trim().length===0)&&t.push(`name is required`),e?.scope!==void 0&&e.scope!==`account`&&e.scope!==`project`&&t.push(`scope must be "account" or "project"`),e?.filter===void 0?t.push(`filter is required`):qr(e.filter,t),e?.target===void 0?t.push(`target is required`):Jr(e.target,t),e?.run_as_role===void 0&&t.push(`run_as_role is required`),Yr(e??{},t),{valid:t.length===0,errors:t}}function Zr(e){let t=[];return z(e)?(e.name!==void 0&&(typeof e.name!=`string`||e.name.trim().length===0)&&t.push(`name must be a non-empty string`),e.filter!==void 0&&qr(e.filter,t),e.target!==void 0&&Jr(e.target,t),Yr(e,t),{valid:t.length===0,errors:t}):{valid:!1,errors:[`update payload must be an object`]}}function Qr(e){let t=Xr(e);if(!t.valid)throw Error(t.errors.join(`; `))}function $r(e){let t=Zr(e);if(!t.valid)throw Error(t.errors.join(`; `))}var ei;(function(e){e.draft=`draft`,e.published=`published`,e.archived=`archived`})(ei||={});var V;(function(e){e.chat=`chat`,e.template=`template`})(V||={});var ti;(function(e){e.jst=`jst`,e.handlebars=`handlebars`,e.text=`text`})(ti||={});var ni;(function(e){e.project=`Project`,e.projects=`Projects`,e.environment=`Environment`,e.user=`User`,e.account=`Account`,e.interaction=`Interaction`,e.userGroup=`UserGroup`})(ni||={});const ri=[`document`,`collection`,`task`],ii=`x-extract`;function ai(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function oi(e,t){if(!e.startsWith(`#/`))return;let n=t;for(let t of e.slice(2).split(`/`).map(ai)){if(!n||typeof n!=`object`||Array.isArray(n))return;n=n[t]}return n}function si(e,t,n){if(!e||typeof e!=`object`||Array.isArray(e))return!0;let r=e;if(r[`x-extract`]===!1)return!1;if(typeof r.$ref==`string`&&!n.has(r.$ref)){n.add(r.$ref);let e=oi(r.$ref,t);if(e!==void 0)return si(e,t,n)}return!0}function H(e,t=e){return si(e,t,new Set)}function ci(e,t){if(!Array.isArray(e))return;let n=e.map(e=>U(e,t)).filter(e=>e!==void 0);return n.length>0?n:void 0}function li(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return;let n={};for(let[r,i]of Object.entries(e)){let e=U(i,t);e!==void 0&&(n[r]=e)}return Object.keys(n).length>0?n:void 0}function U(e,t){if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(e=>U(e,t));if(!H(e,t))return;let n={...e};for(let e of[`$defs`,`definitions`]){let r=li(n[e],t);r?n[e]=r:delete n[e]}if(n.items&&typeof n.items==`object`){let e=U(n.items,t);e===void 0?delete n.items:n.items=e}for(let e of[`anyOf`,`oneOf`,`allOf`])if(Array.isArray(n[e])){let r=ci(n[e],t);if(!r)return;n[e]=r}if(n.additionalProperties&&typeof n.additionalProperties==`object`&&(n.additionalProperties=U(n.additionalProperties,t)??!1),n.properties&&typeof n.properties==`object`&&!Array.isArray(n.properties)){let e={};for(let[r,i]of Object.entries(n.properties)){let n=U(i,t);n!==void 0&&(e[r]=n)}if(n.properties=e,Array.isArray(n.required)){let t=n.required.filter(t=>typeof t==`string`&&t in e);t.length>0?n.required=t:delete n.required}}return delete n[ii],n}function ui(e){return U(e,e)??{}}function di(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return e;let n=e;return typeof n.$ref==`string`?oi(n.$ref,t)??e:e}function fi(e,t,n,r){if(!n||typeof n!=`object`||Array.isArray(n))return t;let i=di(n,r);if(!i||typeof i!=`object`||Array.isArray(i))return t;let a=i;if(Array.isArray(t)){let e=a.items;return!e||typeof e!=`object`?t:t.map(t=>fi(void 0,t,e,r))}if(!t||typeof t!=`object`||Array.isArray(t))return t;let o=a.properties;if(!o||typeof o!=`object`||Array.isArray(o))return t;let s=e&&typeof e==`object`&&!Array.isArray(e)?e:{},c=t,l=o,u={...c};for(let[e,t]of Object.entries(l)){if(!H(t,r)){e in s?u[e]=s[e]:delete u[e];continue}e in c&&(u[e]=fi(s[e],c[e],t,r))}return u}function pi(e,t,n){return fi(e,t,n,n)}const mi=[`ask`,`auto_review`,`full_control`];function hi(e,t){return t===!0?e??`full_control`:`full_control`}function gi(e){return typeof e==`string`&&mi.includes(e)}var _i;(function(e){e.active=`active`,e.archived=`archived`})(_i||={});function vi(e){return`agents/${e}/tool-input-refs.json`}function yi(e,t){let n=e?.agent_run_id||t;return e?.launch_id&&e?.agent_run_id?`${n}/workstreams/${e.launch_id}`:n}function bi(e){return`steps`in e&&e.steps?{...e,spec_format:`steps`}:{...e,spec_format:`activities`}}const xi=`id name description tags created_at updated_at`;function Si(e,t){return`${e.slice(0,6)}:workflow_execution_request:${t}:grounded`}const Ci={type:`object`,description:`Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.`,properties:{mime_type:{type:`string`,description:`The format of the rendition. This is a MIME type.`},source_etag:{type:`string`,description:`The ETag of the file used for the rendition.`,nullable:!0},height:{type:`integer`,description:`The height of the rendition`,nullable:!0},width:{type:`integer`,description:`The width of the rendition`,nullable:!0},multipart:{type:`boolean`,description:`If the rendition is a multi-part rendition`,nullable:!0,default:!1},total_parts:{type:`integer`,description:`The total number of parts in the rendition`,nullable:!0}},required:[`mime_type`]},wi={type:`object`,description:`Represent a semantic chunk of a document`,properties:{source_etag:{type:`string`,description:`The ETag of the file used for the rendition.`,nullable:!0},part_number:{type:`integer`,description:`The part number of the chunk`},title:{type:`string`,description:`The title of the chunk`,nullable:!0},source_line_start:{type:`integer`,description:`The line number where the chunk starts`,nullable:!0},source_line_end:{type:`integer`,description:`The line number where the chunk ends`,nullable:!0},type:{type:`string`,description:`The type of the chunk`,enum:[`text`,`image`,`table`,`chart`,`diagram`,`code`,`other`],nullable:!0},page_number:{type:`integer`,description:`The page number of the document part`,nullable:!0},description:{type:`string`,description:`The description of the document part, if it's an image, the exhaustive description of the image`,nullable:!0},height:{type:`integer`,description:`The height of the rendition`,nullable:!0},width:{type:`integer`,description:`The width of the rendition`,nullable:!0}},required:[`part_number`]},Ti=1,Ei=`https://schemas.vertesia.com/process-definition.v1.schema.json`,Di={$id:Ei,type:`object`,description:`A process definition describes a state-machine workflow executed by the Process Engine.`,properties:{format_version:{type:`integer`,const:1,description:`Native process definition format version.`},process:{type:`string`,minLength:1,description:`Stable process code, for example invoice_approval.`},description:{type:`string`,nullable:!0,description:`Optional human-readable process description.`},initial:{type:`string`,minLength:1,description:`Initial node id. Semantic validation verifies this exists in nodes.`},model:{type:`string`,nullable:!0,description:`Optional default model for agent and interaction nodes.`},context:{$ref:`#/$defs/processContextDefinition`},nodes:{type:`object`,description:`Map of node id to node definition.`,minProperties:1,required:[],additionalProperties:{$ref:`#/$defs/nodeDefinition`}},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`format_version`,`process`,`initial`,`context`,`nodes`],additionalProperties:!1,$defs:{metadataDefinition:{type:`object`,nullable:!0,description:`Execution-irrelevant metadata such as editor layout, provenance, and audit hints.`,required:[],additionalProperties:!0},processContextDefinition:{type:`object`,properties:{schema:{description:`JSON Schema for the process context.`,anyOf:[{type:`boolean`},{type:`object`,additionalProperties:!0}]},initial:{type:`object`,description:`Initial context values.`,required:[],additionalProperties:!0}},required:[`schema`,`initial`],additionalProperties:!1},nodeDefinition:{type:`object`,description:`A state-machine node executed by the Process Engine.`,properties:{type:{type:`string`,enum:[`tool`,`interaction`,`agent`,`process`,`human_task`,`foreach`,`branch`,`condition`,`final`],description:`Node executor type.`},tool:{type:`string`,nullable:!0,description:`Builtin or remote tool name for tool nodes.`},interaction:{type:`string`,nullable:!0,description:`Interaction id or sys: interaction for interaction and agent nodes.`},process:{type:`string`,nullable:!0,description:`Stored child process id or process code for process nodes.`},process_definition:{$ref:`#`,description:`Inline child process definition for process nodes.`},process_version:{type:`number`,nullable:!0,description:`Stored child process version.`},run_type:{type:`string`,enum:[`supervised`,`programmatic`],nullable:!0,description:`Run type for child process nodes.`},returns:{$ref:`#/$defs/processNodeReturnsDefinition`},result_schema:{$ref:`#/$defs/jsonSchemaDefinition`,description:`Optional JSON Schema for structured output from interaction and agent nodes.`},prompt:{type:`string`,nullable:!0,description:`Prompt or instructions for agent and interaction nodes.`},input:{type:`object`,nullable:!0,description:`Node input template. Values may contain {{context_path}} placeholders.`,required:[],additionalProperties:!0},config:{type:`object`,nullable:!0,description:`Executor-specific configuration.`,required:[],additionalProperties:!0},title:{type:`string`,nullable:!0,description:`Short display title.`},description:{type:`string`,nullable:!0,description:`Developer-facing node description.`},human_description:{type:`string`,nullable:!0,description:`End-user-facing explanation of what this node does.`},writes:{type:`array`,nullable:!0,description:`Context paths this node may write.`,items:{type:`string`}},skippable:{type:`boolean`,nullable:!0,description:`Whether a supervisor may skip this node.`},max_retries:{type:`number`,nullable:!0,description:`Maximum node retry attempts.`},transitions:{type:`array`,nullable:!0,description:`Outgoing transitions. Semantic validation verifies targets exist.`,items:{$ref:`#/$defs/transitionDefinition`}},tools:{type:`array`,nullable:!0,description:`Additional tool names available to an agent node.`,items:{type:`string`}},model:{type:`string`,nullable:!0,description:`Model override for this node.`},task:{$ref:`#/$defs/humanTaskDefinition`},foreach:{type:`string`,nullable:!0,description:`Context path to an array for foreach nodes.`},as:{type:`string`,nullable:!0,description:`Variable name for the current foreach item. Defaults to item.`},item_id:{type:`string`,nullable:!0,description:`Template for a stable item id in foreach collection output.`},node:{$ref:`#/$defs/nodeDefinition`,description:`Child node executed for each foreach item or branch child definition.`},max_concurrency:{type:`integer`,minimum:1,nullable:!0,description:`Maximum concurrent child executions for foreach nodes.`},collect:{description:`Where and how to collect foreach or branch results.`,oneOf:[{type:`string`,minLength:1},{$ref:`#/$defs/parallelCollectDefinition`}]},failure_policy:{type:`string`,enum:[`fail_fast`,`collect_errors`],nullable:!0,description:`Foreach or branch failure policy.`},join:{type:`string`,enum:[`all`],nullable:!0,description:`Branch join policy.`},branches:{type:`array`,nullable:!0,description:`Condition or branch-node branches. Semantic validation verifies the type-specific shape.`,items:{oneOf:[{$ref:`#/$defs/branchDefinition`},{$ref:`#/$defs/branchNodeBranchDefinition`}]}},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`type`],additionalProperties:!1},transitionDefinition:{type:`object`,properties:{to:{type:`string`,minLength:1,description:`Target node id.`},guard:{$ref:`#/$defs/jsonLogicRule`,description:`JSON Logic guard evaluated before transition.`},trigger:{type:`string`,enum:[`auto`,`agent`,`user`],nullable:!0,description:`Transition trigger. Omitted means auto.`},label:{type:`string`,nullable:!0,description:`Display label.`},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`to`],additionalProperties:!1},branchDefinition:{type:`object`,properties:{to:{type:`string`,minLength:1,description:`Target node id.`},when:{$ref:`#/$defs/jsonLogicRule`,description:`JSON Logic condition for this branch.`},default:{type:`boolean`,nullable:!0,description:`Fallback branch used when no condition matches.`},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`to`],additionalProperties:!1},branchNodeBranchDefinition:{type:`object`,properties:{id:{type:`string`,minLength:1,description:`Stable branch id.`},title:{type:`string`,nullable:!0,description:`Optional branch title.`},description:{type:`string`,nullable:!0,description:`Optional branch description.`},node:{$ref:`#/$defs/nodeDefinition`,description:`Child node executed for this branch.`},metadata:{$ref:`#/$defs/metadataDefinition`}},required:[`id`,`node`],additionalProperties:!1},humanTaskDefinition:{type:`object`,properties:{title:{type:`string`,minLength:1,description:`Task title shown in the inbox.`},description:{type:`string`,nullable:!0,description:`Task instructions shown to the assignee.`},assignee:{type:`string`,nullable:!0,description:`User id or group:<name> assignee reference.`},fields:{type:`array`,description:`Fields required to complete the task.`,items:{$ref:`#/$defs/taskField`}}},required:[`title`,`fields`],additionalProperties:!1},taskField:{type:`object`,properties:{name:{type:`string`,minLength:1,description:`Context/result field name.`},type:{type:`string`,enum:[`string`,`number`,`boolean`,`select`,`text`],description:`Input field type.`},required:{type:`boolean`,nullable:!0,description:`Whether the field must be answered.`},label:{type:`string`,nullable:!0,description:`Display label.`},options:{type:`array`,nullable:!0,description:`Allowed options for select fields.`,items:{type:`string`}},default:{description:`Default field value.`}},required:[`name`,`type`],additionalProperties:!1},processNodeReturnsDefinition:{type:`object`,properties:{from:{type:`string`,nullable:!0,description:`Path to read from child state or context.`},context:{type:`array`,nullable:!0,description:`Child context paths to return.`,items:{type:`string`}}},required:[],additionalProperties:!1},parallelCollectDefinition:{type:`object`,properties:{into:{type:`string`,minLength:1,description:`Context key receiving collected results.`},mode:{type:`string`,enum:[`array`],nullable:!0,description:`Collection mode.`},include:{type:`array`,nullable:!0,description:`Fields included in each collected item.`,items:{type:`string`,enum:[`status`,`index`,`item`,`item_id`,`branch_id`,`branch_title`,`output`,`context_update`,`error`,`child_run_id`,`child_workflow_id`,`child_workflow_run_id`]}}},required:[`into`],additionalProperties:!1},jsonLogicRule:{type:`object`,description:`JSON Logic expression.`,required:[],additionalProperties:!0},jsonSchemaDefinition:{type:`object`,nullable:!0,description:`JSON Schema object.`,required:[],additionalProperties:!0}}};function Oi(e){let t=new Set;for(let n of e)t.add(n.id),t.add(n.name),n.type===`sys`&&t.add(`sys:${n.name}`),n.type===`app`&&!n.id.startsWith(`app:`)&&t.add(`app:${n.id}`),(n.type===`stored`||n.type===`draft`)&&(t.add(`${n.name}@draft`),t.add(`${n.id}@draft`),typeof n.version==`number`&&(t.add(`${n.name}@${n.version}`),t.add(`${n.id}@${n.version}`)));return[...t]}const ki=1024*1024,Ai=64,ji=4096;function Mi(e,t={}){let n=Ni(e,t);if(!n.valid)throw Error(n.errors.join(`; `))}function Ni(e,t={}){let n=[],r=Fi(t);new TextEncoder().encode(JSON.stringify(e)).length>1048576&&n.push(`process definition exceeds ${ki} bytes`),e.process||n.push(`process is missing`),e.format_version!==1&&n.push(`format_version must be 1`),e.initial||n.push(`initial node is missing`),!e.nodes||Object.keys(e.nodes).length===0?n.push(`nodes are missing`):e.initial&&!e.nodes[e.initial]&&n.push(`initial node "${e.initial}" does not exist`),e.context?.schema||n.push(`context.schema is missing`),e.context?.initial||n.push(`context.initial is missing`);for(let[t,i]of Object.entries(e.nodes??{}))Pi(e,t,i,n,r);return{valid:n.length===0,errors:n}}function Pi(e,t,n,r,i){if(Hi(n.type)||r.push(`node "${t}" has invalid type "${String(n.type)}"`),n.type===`human_task`)if(!n.task)r.push(`human_task node "${t}" is missing task`);else if(!n.task.title)r.push(`human_task node "${t}" task title is missing`);else if(!Array.isArray(n.task.fields))r.push(`human_task node "${t}" task fields must be an array`);else{let e=[`string`,`number`,`boolean`,`select`,`text`];n.task.fields.forEach((n,i)=>{let a=`human_task node "${t}" task.fields[${i}]`;if(!W(n)){r.push(`${a} must be an object`);return}(typeof n.name!=`string`||n.name.length===0)&&r.push(`${a}.name must be a non-empty string (not "id")`),(typeof n.type!=`string`||!e.includes(n.type))&&r.push(`${a}.type must be one of ${e.join(`, `)}`),n.type===`select`&&!(Array.isArray(n.options)&&n.options.length>0)&&r.push(`${a} of type "select" requires a non-empty options[] array`)})}if(n.type===`tool`&&Ii(t,n,r,i),(n.type===`interaction`||n.type===`agent`)&&n.interaction&&i.knownInteractions&&(Bi(n.interaction,i.knownInteractions)||r.push(`${n.type} node "${t}" references unknown interaction "${n.interaction}"`)),(n.type===`interaction`||n.type===`agent`)&&n.result_schema!==void 0&&!W(n.result_schema)&&r.push(`${n.type} node "${t}" result_schema must be a JSON Schema object`),n.type===`process`&&(!n.process&&!n.process_definition&&r.push(`process node "${t}" is missing process or process_definition`),n.run_type&&!Ui(n.run_type)&&r.push(`process node "${t}" has invalid run_type "${String(n.run_type)}"`),n.returns?.from!==void 0&&typeof n.returns.from!=`string`&&r.push(`process node "${t}" returns.from must be a string`),n.returns?.context!==void 0&&!Xi(n.returns.context)&&r.push(`process node "${t}" returns.context must be an array of strings`),n.process_definition)){let e=Ni(n.process_definition,i.options);for(let n of e.errors)r.push(`process node "${t}" process_definition: ${n}`)}if(n.type===`foreach`&&(n.foreach||r.push(`foreach node "${t}" is missing foreach`),n.node||r.push(`foreach node "${t}" is missing node`),n.max_concurrency!==void 0&&(!Number.isInteger(n.max_concurrency)||n.max_concurrency<1)&&r.push(`foreach node "${t}" max_concurrency must be a positive integer`),n.item_id!==void 0&&typeof n.item_id!=`string`&&r.push(`foreach node "${t}" item_id must be a string`),Ji(`foreach`,t,n.collect,r),n.node&&qi(e,{ownerLabel:`foreach node "${t}"`,childPath:`${t}.node`,childLabel:`foreach node "${t}" child node`,child:n.node},r,i)),n.type===`branch`){(!Array.isArray(n.branches)||n.branches.length===0)&&r.push(`branch node "${t}" must define at least one branch`),n.join!==void 0&&n.join!==`all`&&r.push(`branch node "${t}" join must be "all"`),Ji(`branch`,t,n.collect,r);let a=ea(n),o=new Set;for(let[n,s]of a.entries()){if(s.id?o.has(s.id)?r.push(`branch node "${t}" has duplicate branch id "${s.id}"`):o.add(s.id):r.push(`branch node "${t}" branch at index ${n} is missing id`),!s.node){r.push(`branch node "${t}" branch "${s.id||n}" is missing node`);continue}qi(e,{ownerLabel:`branch node "${t}" branch "${s.id||n}"`,childPath:`${t}.branches.${n}.node`,childLabel:`branch node "${t}" branch "${s.id||n}" child node`,child:s.node},r,i)}}n.failure_policy&&!Gi(n.failure_policy)&&r.push(`node "${t}" has invalid failure_policy "${String(n.failure_policy)}"`);for(let i of n.transitions??[])e.nodes[i.to]||r.push(`node "${t}" has transition to "${i.to}" which does not exist`),i.trigger&&!Wi(i.trigger)&&r.push(`node "${t}" has invalid transition trigger "${i.trigger}"`),typeof i.guard==`string`?r.push(`node "${t}" transition to "${i.to}" guard must be a JSON Logic object`):i.guard&&Zi(`node "${t}" transition to "${i.to}" guard`,i.guard,r);for(let[i,a]of $i(n).entries())Vi(a,`condition`)&&r.push(`node "${t}" branch at index ${i} uses string condition; use JSON Logic in "when" instead`),Vi(a,`guard`)&&r.push(`node "${t}" branch at index ${i} uses string guard; use JSON Logic in "when" instead`),e.nodes[a.to]||r.push(`node "${t}" has branch to "${a.to}" which does not exist`),typeof a.when==`string`?r.push(`node "${t}" branch to "${a.to}" when must be a JSON Logic object`):a.when&&Zi(`node "${t}" branch to "${a.to}" guard`,a.when,r)}function Fi(e){return{options:e,knownTools:e.knownTools?new Set(e.knownTools):void 0,knownInteractions:e.knownInteractions?new Set(e.knownInteractions):void 0}}function Ii(e,t,n,r){if(!t.tool){n.push(`tool node "${e}" is missing tool`);return}r.knownTools&&!r.knownTools.has(t.tool)&&n.push(`tool node "${e}" references unknown tool "${t.tool}"`),t.tool===`set_context`&&Li(e,t,n)}function Li(e,t,n){let r=t.input;if(!W(r)){n.push(`tool node "${e}" set_context input must be an object`);return}for(let t of Object.keys(r))t!==`updates`&&t!==`reason`&&t!==`event_id`&&n.push(`tool node "${e}" set_context input has unsupported property "${t}"`);if(!W(r.updates)){n.push(`tool node "${e}" set_context input.updates must be an object`);return}r.reason!==void 0&&typeof r.reason!=`string`&&n.push(`tool node "${e}" set_context input.reason must be a string`),r.event_id!==void 0&&typeof r.event_id!=`string`&&n.push(`tool node "${e}" set_context input.event_id must be a string`),Ri(e,t,r.updates,n)}function Ri(e,t,n,r){let i=Object.keys(n);if(i.length!==0){if(!Array.isArray(t.writes)||t.writes.length===0){r.push(`tool node "${e}" set_context updates require declared writes`);return}for(let n of i)n.startsWith(`_`)&&r.push(`tool node "${e}" set_context cannot write reserved context field "${n}"`),zi(n,t.writes)||r.push(`tool node "${e}" set_context updates "${n}" but writes does not allow it`)}}function zi(e,t){return t.some(t=>e===t||e.startsWith(`${t}.`))}function Bi(e,t){return t.has(e)?!0:e.includes(`@`)?t.has(e.slice(0,e.lastIndexOf(`@`))):!1}function Vi(e,t){return W(e)&&typeof e[t]==`string`}function Hi(e){return e===`tool`||e===`interaction`||e===`agent`||e===`process`||e===`human_task`||e===`foreach`||e===`branch`||e===`condition`||e===`final`}function Ui(e){return e===`supervised`||e===`programmatic`}function Wi(e){return e===`auto`||e===`agent`||e===`user`}function Gi(e){return e===`fail_fast`||e===`collect_errors`}function Ki(e){return e===`tool`||e===`interaction`||e===`agent`||e===`process`}function qi(e,t,n,r){let{ownerLabel:i,childPath:a,childLabel:o,child:s}=t;if(!Ki(s.type)){n.push(`${i} has unsupported child node type "${String(s.type)}"`);return}(s.transitions??[]).length>0&&n.push(`${o} must not define transitions`),(s.branches??[]).length>0&&n.push(`${o} must not define branches`),Pi(e,a,{...s,transitions:void 0,branches:void 0},n,r)}function Ji(e,t,n,r){if(n!==void 0){if(typeof n==`string`){n||r.push(`${e} node "${t}" collect must not be empty`);return}if(!W(n)){r.push(`${e} node "${t}" collect must be a string or object`);return}if((typeof n.into!=`string`||!n.into)&&r.push(`${e} node "${t}" collect.into is required`),n.mode!==void 0&&n.mode!==`array`&&r.push(`${e} node "${t}" collect.mode must be "array"`),n.include!==void 0){if(!Array.isArray(n.include)){r.push(`${e} node "${t}" collect.include must be an array`);return}for(let i of n.include)(typeof i!=`string`||!Yi(i))&&r.push(`${e} node "${t}" collect.include has invalid field "${String(i)}"`)}}}function Yi(e){return e===`status`||e===`index`||e===`item`||e===`item_id`||e===`branch_id`||e===`branch_title`||e===`output`||e===`context_update`||e===`error`||e===`child_run_id`||e===`child_workflow_id`||e===`child_workflow_run_id`}function Xi(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Zi(e,t,n){let r=Qi(t);r.depth>64&&n.push(`${e} exceeds maximum depth 64`),r.nodes>4096&&n.push(`${e} exceeds maximum node count ${ji}`)}function Qi(e){let t=0,n=0,r=[{value:e,depth:1}];for(;r.length>0;){let e=r.pop();if(e){if(n+=1,t=Math.max(t,e.depth),n>4096||t>64)break;if(Array.isArray(e.value))for(let t of e.value)r.push({value:t,depth:e.depth+1});else if(W(e.value))for(let t of Object.values(e.value))r.push({value:t,depth:e.depth+1})}}return{depth:t,nodes:n}}function W(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function $i(e){return e.type===`condition`&&Array.isArray(e.branches)?e.branches.filter(ta):[]}function ea(e){return e.type===`branch`&&Array.isArray(e.branches)?e.branches.filter(na):[]}function ta(e){return`to`in e}function na(e){return`node`in e}var ra;(function(e){e.create=`create`,e.change_type=`change_type`,e.update=`update`,e.revision_created=`revision_created`,e.delete=`delete`,e.workflow_finished=`workflow_finished`,e.workflow_execution_request=`workflow_execution_request`,e.api_request=`api_request`})(ra||={});function ia(e){return e.input?.inputType===`objectIds`?e.input.objectIds:e.objectIds?e.objectIds:[]}var aa;(function(e){e.SCHEDULED=`scheduled`,e.RUNNING=`running`,e.COMPLETED=`completed`,e.FAILED=`failed`,e.CANCELED=`canceled`,e.TIMED_OUT=`timed_out`,e.TERMINATED=`terminated`,e.SENT=`sent`,e.RECEIVED=`received`})(aa||={});var oa;(function(e){e.ACTIVITY=`activity`,e.CHILD_WORKFLOW=`childWorkflow`,e.SIGNAL=`signal`,e.TIMER=`timer`})(oa||={});var G;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.RUNNING=1]=`RUNNING`,e[e.COMPLETED=2]=`COMPLETED`,e[e.FAILED=3]=`FAILED`,e[e.CANCELED=4]=`CANCELED`,e[e.TERMINATED=5]=`TERMINATED`,e[e.CONTINUED_AS_NEW=6]=`CONTINUED_AS_NEW`,e[e.TIMED_OUT=7]=`TIMED_OUT`})(G||={});var K;(function(e){e[e.SYSTEM=0]=`SYSTEM`,e[e.THOUGHT=1]=`THOUGHT`,e[e.PLAN=2]=`PLAN`,e[e.UPDATE=3]=`UPDATE`,e[e.COMPLETE=4]=`COMPLETE`,e[e.WARNING=5]=`WARNING`,e[e.ERROR=6]=`ERROR`,e[e.ANSWER=7]=`ANSWER`,e[e.QUESTION=8]=`QUESTION`,e[e.REQUEST_INPUT=9]=`REQUEST_INPUT`,e[e.IDLE=10]=`IDLE`,e[e.TERMINATED=11]=`TERMINATED`,e[e.STREAMING_CHUNK=12]=`STREAMING_CHUNK`,e[e.BATCH_PROGRESS=13]=`BATCH_PROGRESS`,e[e.RESTARTING=14]=`RESTARTING`})(K||={});function sa(e){let t=e.details;return e.type===K.THOUGHT&&!!t&&typeof t==`object`&&typeof t.tool==`string`}function ca(e){return p(e.details?.resources)}function la(e){let t=e.details;return e.type===K.UPDATE&&!!t&&typeof t==`object`&&(t.event_class===`document_created`||t.event_class===`document_updated`)&&typeof t.document_id==`string`}function ua(e){let t=e.details;return e.type===K.SYSTEM&&!!t&&typeof t==`object`&&t.system_type===`file_processing`&&Array.isArray(t.files)}function da(e){let t=e.details;return e.type===K.PLAN&&!!t&&typeof t==`object`&&Array.isArray(t.plan)}function fa(e){return e.type===K.REQUEST_INPUT&&!!e.details&&typeof e.details==`object`}function pa(e){return typeof e==`object`&&!!e&&`t`in e}function ma(e){return typeof e==`object`&&!!e&&`type`in e&&!(`t`in e)}const ha={system:K.SYSTEM,thought:K.THOUGHT,plan:K.PLAN,update:K.UPDATE,complete:K.COMPLETE,warning:K.WARNING,error:K.ERROR,answer:K.ANSWER,question:K.QUESTION,request_input:K.REQUEST_INPUT,idle:K.IDLE,terminated:K.TERMINATED,streaming_chunk:K.STREAMING_CHUNK,batch_progress:K.BATCH_PROGRESS},ga={0:K.SYSTEM,1:K.THOUGHT,2:K.PLAN,3:K.UPDATE,4:K.COMPLETE,5:K.WARNING,6:K.ERROR,7:K.ANSWER,8:K.QUESTION,9:K.REQUEST_INPUT,10:K.IDLE,11:K.TERMINATED,12:K.STREAMING_CHUNK,13:K.BATCH_PROGRESS};function _a(e){return typeof e==`number`?ga[e]??K.UPDATE:typeof e==`string`?ha[e]??K.UPDATE:K.UPDATE}function va(e){let t={t:_a(e.type)};return e.message&&(t.m=e.message),e.workstream_id&&e.workstream_id!==`main`&&(t.w=e.workstream_id),e.timestamp&&(t.ts=e.timestamp),t.t===K.STREAMING_CHUNK&&e.details?e.details.is_final&&(t.f=1):e.details&&(t.d=e.details),t}function ya(e){let t=typeof e==`string`?JSON.parse(e):e;if(pa(t))return t;if(ma(t))return va(t);throw Error(`Unknown message format`)}function ba(e,t={}){let n={t:e};return t.message&&(n.m=t.message),t.workstreamId&&t.workstreamId!==`main`&&(n.w=t.workstreamId),t.details&&(n.d=t.details),t.isFinal&&(n.f=1),t.timestamp&&(n.ts=t.timestamp),n}function xa(e,t=``){let n={type:e.t,timestamp:e.ts||Date.now(),workflow_run_id:t,message:e.m||``,workstream_id:e.w||`main`};if(e.d!==void 0&&e.d!==null&&(n.details=e.d),e.t===K.STREAMING_CHUNK){let t=typeof e.d==`object`&&e.d!==null?e.d:{},r=typeof t.streaming_id==`string`?t.streaming_id:e.w||`main`,i=e.i??(typeof t.activity_id==`string`?t.activity_id:void 0);n.details={...t,streaming_id:r,is_final:e.f===1,...i?{activity_id:i}:{}}}return n}var Sa;(function(e){e.UPLOADING=`uploading`,e.PROCESSING=`processing`,e.READY=`ready`,e.ERROR=`error`})(Sa||={});function Ca(e){return`workflow:${e}:channel`}function wa(e){return`workflow:${e}:updates`}const Ta=`low_priority`;function Ea(e,t){return`renditions/${e}/${t.max_hw}`}function Da(e){return e.format===`pdf`||e.format===`docx`}function Oa(e){return e===G.COMPLETED||e===G.FAILED||e===G.CANCELED||e===G.TERMINATED||e===G.TIMED_OUT}const ka={EVERY_HOUR:`0 * * * *`,EVERY_DAY_MIDNIGHT:`0 0 * * *`,EVERY_DAY_9AM:`0 9 * * *`,EVERY_MONDAY_MIDNIGHT:`0 0 * * MON`,EVERY_WEEKDAY_9AM:`0 9 * * MON-FRI`,FIRST_OF_MONTH:`0 0 1 * *`},Aa={EVERY_HOUR:`Every hour`,EVERY_DAY_MIDNIGHT:`Daily at midnight`,EVERY_DAY_9AM:`Daily at 9:00 AM`,EVERY_MONDAY_MIDNIGHT:`Every Monday at midnight`,EVERY_WEEKDAY_9AM:`Weekdays at 9:00 AM`,FIRST_OF_MONTH:`First day of month at midnight`};var ja;(function(e){e.COLLECTION_ID=`x-collection-id`,e.PROCESSING_PRIORITY=`x-processing-priority`,e.CREATE_REVISION=`x-create-revision`,e.REVISION_LABEL=`x-revision-label`,e.SUPPRESS_WORKFLOWS=`x-suppress-workflows`})(ja||={});var Ma;(function(e){e.DATA_STORE_ID=`x-data-store-id`})(Ma||={});var Na;(function(e){e.created=`created`,e.processing=`processing`,e.ready=`ready`,e.completed=`completed`,e.failed=`failed`,e.archived=`archived`})(Na||={});var Pa;(function(e){e.Video=`video`,e.Image=`image`,e.Audio=`audio`,e.Document=`document`,e.Code=`code`,e.Other=`other`})(Pa||={});const Fa=`Poster`,Ia=`Audio`,La=`Web`,Ra=`PDF`,za={success:`success`};function Ba(e){return e.id}function Va(e){let t=`code`in e?e.code:void 0,n=e.id||t||``,r=e.name||``;return e.ref_type===`incode`||qa(n)?{ref_type:`incode`,id:n,name:r}:{ref_type:`stored`,id:n,name:r}}const Ha={type:`object`,description:`Per-content-type policy for collaborative document editing.`,required:[],additionalProperties:!1,properties:{interaction:{type:`string`,description:`Agent interaction used for new document-editing sessions. Omit to use sys:GeneralAgent.`,nullable:!0}}},Ua={type:`string`,enum:[`all`,`located`],description:`Named pages selection: 'all' or 'located' (the locate-pass result). Default all.`,nullable:!0},Wa={type:`array`,items:{type:`array`,items:{type:`integer`},minItems:2,maxItems:2},description:`Static inclusive [start, end] page ranges; negative indexes count from the end ([[1,2],[-1,-1]] = first two pages plus the last). Wins over scope when set.`,nullable:!0},Ga={type:`object`,description:`Interaction execution configuration such as model, environment, and model options.`,nullable:!0,required:[],additionalProperties:!0,properties:{id:{type:`string`,nullable:!0},environment:{type:`string`,nullable:!0},model:{type:`string`,nullable:!0},do_validate:{type:`boolean`,nullable:!0},run_data:{type:`string`,nullable:!0},configMode:{type:`string`,nullable:!0},model_options:{type:`object`,nullable:!0,required:[],additionalProperties:!0},http_timeout:{type:`object`,nullable:!0,required:[],additionalProperties:!0}}},Ka={type:`object`,description:`Per-content-type policy for standard intake: type selection, conversion, extraction, rendering, and embeddings.`,required:[],additionalProperties:!1,properties:{mode:{type:`string`,enum:[`programmatic`,`agentic`],description:`Intake orchestration mode. Use programmatic unless the user explicitly asks for agentic intake.`,nullable:!0},identification:{type:`object`,description:`Guidance used by automatic type selection to recognize this type before full extraction.`,nullable:!0,required:[],additionalProperties:!1,properties:{guidance:{type:`string`,description:`Classifier-facing description of what this type is and when it should be selected.`,nullable:!0},distinguish_from:{type:`string`,description:`How to distinguish this type from common look-alike document types.`,nullable:!0},examples:{type:`array`,description:`Object ids of human-confirmed examples for this type.`,nullable:!0,items:{type:`string`}}}},locate:{type:`object`,description:`Document-map pass: labeled page-thumbnail contact sheets and one vision call return which pages matter for this type. Scopes conversion/extraction and plans visual extraction.`,nullable:!0,required:[`instructions`],additionalProperties:!1,properties:{instructions:{type:`string`,description:`What to look for (e.g. "commercial terms, payment schedule, signature pages").`},detail:{type:`integer`,enum:[8,16],description:`Pages per contact sheet: 8 = bigger tiles with readable headings. Default 16.`,nullable:!0},min_pages:{type:`integer`,minimum:0,description:`Only run the locate pass when the page count is at least this. Default 8.`,nullable:!0}}},text_conversion:{type:`object`,description:`Controls source-to-text conversion before extraction, search, and text embeddings.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Set false for extraction-only types that should not create converted markdown/text.`,nullable:!0},method:{type:`string`,enum:[`auto`,`basic`,`llm`,`custom`],description:`Conversion method. Use auto unless the user asks for a specific converter.`,nullable:!0},custom:{type:`object`,description:`Custom conversion implementation for method=custom.`,nullable:!0,required:[],additionalProperties:!1,properties:{interaction:{type:`string`,description:`Interaction id to call for custom conversion.`,nullable:!0},agent:{type:`string`,description:`Agent id to launch for custom conversion.`,nullable:!0}}},instructions:{type:`string`,description:`Instructions for what source content to preserve during conversion.`,nullable:!0},output_format:{type:`string`,enum:[`markdown`,`text`],description:`Output format for converted text. Prefer markdown for readable documents.`,nullable:!0},scope:Ua,page_ranges:Wa}},extraction:{type:`object`,description:`Controls structured property extraction against the content type object_schema.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Whether intake should extract structured properties for this type.`,nullable:!0},source:{type:`string`,enum:[`auto`,`text`,`vision`,`mixed`],description:`Evidence source for extraction: auto chooses text or vision, text sends text only, vision sends image/PDF evidence only, mixed sends both.`,nullable:!0},instructions:{type:`string`,description:`Type-specific extraction instructions such as pages or sections to ignore.`,nullable:!0},interaction:{type:`string`,description:`Interaction id used for extraction. Omit to use the system extractor.`,nullable:!0},scope:Ua,page_ranges:Wa,max_pages:{type:`integer`,minimum:1,description:`Cap on pages sent to extraction. Default 20.`,nullable:!0},vision:{type:`object`,description:`Vision evidence budget for visual extraction. Detail names reference platform-defined profiles; the type never sets dpi, quality, or resolution.`,nullable:!0,required:[],additionalProperties:!1,properties:{default_detail:{type:`string`,enum:[`low`,`standard`,`high`],description:`Detail profile used when the plan does not request one. Default standard.`,nullable:!0},allowed_details:{type:`array`,items:{type:`string`,enum:[`low`,`standard`,`high`]},description:`Detail profiles the plan may request. Others fall back to default_detail.`,nullable:!0},max_image_tokens:{type:`integer`,minimum:1,description:`PRIMARY budget: estimated image tokens per extraction call. Default 16000.`,nullable:!0},max_payload_mb:{type:`number`,minimum:1,description:`Transport guard in megabytes. Default 16.`,nullable:!0},max_pages_per_call:{type:`integer`,minimum:1,description:`Cap on page images per extraction call. Default 8.`,nullable:!0}}},verification:{type:`object`,description:`Optional safe-mode verification of extracted values against source evidence.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Whether to verify extracted values after extraction.`,nullable:!0},model:{type:`string`,description:`Verifier model override.`,nullable:!0},environment:{type:`string`,description:`Verifier environment override.`,nullable:!0},materiality:{type:`string`,description:`What errors are material for this type.`,nullable:!0},threshold:{type:`number`,minimum:0,maximum:1,description:`Minimum verification confidence before flag/block behavior applies.`,nullable:!0},max_retries:{type:`integer`,minimum:0,description:`Maximum extraction retries when verification fails.`,nullable:!0},on_fail:{type:`string`,enum:[`flag`,`block`],description:`Failure behavior after retries: flag for review or block property write.`,nullable:!0}}},grounding:{type:`object`,description:`PDF block-level citation grounding policy. When enabled, property extraction uses the grounded child workflow and stores citations plus annotated proof output.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Enable PDF block-level citation grounding for this type.`,nullable:!0},interaction:{type:`string`,description:`Grounded extraction interaction id. Omit to use the system grounded extractor.`,nullable:!0},max_pages:{type:`integer`,minimum:1,description:`Maximum pages to process.`,nullable:!0},force_ocr:{type:`boolean`,description:`Run OCR on every page even when a text layer exists.`,nullable:!0},use_vision:{type:`boolean`,description:`Attach instrumented page images to the grounded extraction prompt.`,nullable:!0},raster_mode:{type:`string`,enum:[`vision`,`ocr`],description:`How to read pages with no digital text layer (scans). 'vision' (default) reads off the page image and skips OCR; 'ocr' is the legacy OCR-then-block-ground path.`,nullable:!0},grid_cell_pt:{type:`number`,minimum:1,description:`A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid; tune per the model in config. Default 14.`,nullable:!0},omit_block_boxes:{type:`boolean`,description:`Drop block bounding boxes from the extraction prompt (only sound with use_vision).`,nullable:!0},window_pages:{type:`integer`,minimum:1,description:`Maximum pages per extraction call before sequential window completion (later windows append to prior). Default 3.`,nullable:!0},update_properties:{type:`boolean`,description:`Update object properties with grounded extraction data. Default true.`,nullable:!0},config:Ga,hard_config:Ga,hardness_threshold:{type:`number`,minimum:0,maximum:1,description:`Hardness score at or above which hard_config is used. Default 0.5.`,nullable:!0},min_citation_density:{type:`number`,minimum:0,maximum:1,description:`Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.`,nullable:!0},refresh_ocr:{type:`boolean`,description:`Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).`,nullable:!0},review:{type:`object`,description:`Optional post-extraction review pass for hard content.`,nullable:!0,required:[],additionalProperties:!1,properties:{enabled:{type:`boolean`,description:`Set false to disable an inherited grounding review pass for this type.`,nullable:!0},config:Ga,threshold:{type:`number`,minimum:0,maximum:1,description:`Hardness score at or above which review runs.`,nullable:!0},coverage_threshold:{type:`number`,minimum:0,maximum:1,description:`Review also runs when any page's citation coverage falls below this floor. Default 0.2.`,nullable:!0},force:{type:`boolean`,description:`Run review regardless of hardness.`,nullable:!0}}}}}}},rendering_template:{type:`string`,description:`Handlebars template used to materialize extracted properties into object text.`,nullable:!0},embeddings:{type:`object`,description:`Per-type embedding switches. Omitted fields inherit the project embedding policy.`,nullable:!0,required:[],additionalProperties:!1,properties:{text:{type:`boolean`,description:`Whether to generate text embeddings.`,nullable:!0},image:{type:`boolean`,description:`Whether to generate image embeddings.`,nullable:!0},properties:{type:`boolean`,description:`Whether to generate property embeddings.`,nullable:!0}}},generate_toc:{type:`boolean`,description:`Whether intake should generate table-of-contents sections for this type.`,nullable:!0},default_view:{type:`string`,enum:[`auto`,`text`,`pdf`,`image`,`properties`],description:`Preferred first view for objects of this type.`,nullable:!0}}};function qa(e){return e.includes(`:`)}var Ja;(function(e){e.single=`single`,e.multiple=`multiple`,e.none=`none`})(Ja||={});var q;(function(e){e.jpeg=`jpeg`,e.png=`png`,e.webp=`webp`})(q||={});var J;(function(e){e.docx=`docx`,e.pdf=`pdf`})(J||={});const Y={"image/*":[q.jpeg,q.png,q.webp],"video/*":[q.jpeg,q.png],"application/pdf":[q.jpeg,q.png,q.webp],"text/markdown":[J.pdf,J.docx],"text/*":[J.docx],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[J.pdf],"application/msword":[J.pdf],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[J.pdf],"application/vnd.ms-powerpoint":[J.pdf]};function Ya(e,t){if(!e)return!1;let n=t;if(Y[e]?.some(e=>e===n))return!0;let[r]=e.split(`/`),i=`${r}/*`;return!!Y[i]?.some(e=>e===n)}function Xa(e){if(!e)return[];if(Y[e])return[...Y[e]];let[t]=e.split(`/`),n=`${t}/*`,r=Y[n];return r?[...r]:[]}function Za(e){return Ya(e,q.jpeg)}var Qa;(function(e){e.normal=`normal`,e.low=`low`})(Qa||={});const $a={TERMINATE:`TERMINATE`,ABANDON:`ABANDON`,REQUEST_CANCEL:`REQUEST_CANCEL`,PARENT_CLOSE_POLICY_UNSPECIFIED:void 0,PARENT_CLOSE_POLICY_TERMINATE:`TERMINATE`,PARENT_CLOSE_POLICY_ABANDON:`ABANDON`,PARENT_CLOSE_POLICY_REQUEST_CANCEL:`REQUEST_CANCEL`};function eo(e){return e.type===`apikey`}function to(e){return e.type===`user`}function no(e){return e.type===`project`}function ro(e){return e.type===`environment`}function io(e){return e.type===`agent`}function ao(e){return e.type===`service_account`}var oo;(function(e){e.created=`created`,e.building=`building`,e.prepared=`prepared`,e.processing=`processing`,e.completed=`completed`,e.cancelled=`cancelled`,e.failed=`failed`})(oo||={});var so;(function(e){e.userInvite=`user-invite`,e.migration=`migration`})(so||={});const co=`id name email picture`,lo=`early-access`,uo=`restricted_environment`;var fo;(function(e){e.aws=`aws`,e.gcp=`gcp`,e.azure=`azure`})(fo||={});var po;(function(e){e.stripe=`stripe`,e.invoice=`invoice`})(po||={});var X;(function(e){e.vertesia=`vertesia`,e.partner=`partner`,e.free=`free`,e.customer=`customer`,e.prospect=`prospect`,e.unknown=`unknown`})(X||={});var Z;(function(e){e.standard=`standard`,e.enterprise=`enterprise`})(Z||={});function mo(e){switch(e){case X.customer:case X.vertesia:return Z.enterprise;default:return Z.standard}}const ho=63,go=1e3,_o=[`admin`,`api`,`apps`,`auth`,`cdn`,`docs`,`internal-auth`,`mcp`,`status`,`sts`,`www`],vo=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;function yo(e){return e.trim().toLowerCase()}function bo(e){if(!e)return`Account namespace is required`;if(e.length>63||!vo.test(e))return`Account namespace must be a lowercase DNS label containing only letters, numbers, and hyphens`;if(_o.includes(e))return`Account namespace '${e}' is reserved`}const xo=`id name`;function So(e,t){return`${e.slice(-6)}_${t.slice(-6)}`}function Co(e){return So(e.account,e.id)}function wo(e){return{name:e.name,description:e.description,input_schema:e.input_schema}}function To(e){return e&&e.map(wo)}function Eo(e){if(!e)return e;if(Array.isArray(e))for(let t of e)Eo(t);else if(typeof e==`object`){let t=e;Do(t)&&ko(t);for(let[e,n]of Object.entries(t))e===`editor`&&(n===`textarea`||n===`document`||n===`media`)||e===`format`&&(n===`textarea`||n===`document`||n===`media`)?delete t[e]:typeof n==`object`&&Eo(n)}return e}function Do(e){return e.editor===`document`||e.format===`document`||e.format===`media`}const Oo=`Use 'store:<document_id>' format to reference a document from the content store.`;function ko(e){e.type||=`string`,e.description?typeof e.description==`string`&&!e.description.includes(`Use 'store:<document_id>' format to reference a document from the content store.`)&&(e.description=`${e.description} ${Oo}`):e.description=Oo}function Ao(e){let t={},n=[];for(let r of e)if(r.properties){if(r.required)for(let e of r.required)n.includes(e)||n.push(e);Object.assign(t,r.properties)}return Object.keys(t).length>0?{properties:t,required:n,type:`object`}:null}function jo(e){let t={},n=new Set;for(let r of e)if(r.template?.inputSchema?.properties){let e=r.template?.inputSchema;if(e.required)for(let t of e.required)n.add(t);Object.assign(t,e.properties)}else r.type===V.chat&&(Object.assign(t,{chat:{type:`array`,items:{type:`object`,properties:{role:{type:`string`,enum:[Ot.assistant,Ot.user]},content:{type:`string`}},required:[`role`,`content`]}}}),n.add(`chat`));return Object.keys(t).length>0?{properties:t,required:Array.from(n)}:null}function Mo(e){return e.prompts?jo(e.prompts):null}function No(e){let t={},n=new Set;for(let r of e)if(r.schema?.properties){let e=r.schema;if(e.required)for(let t of e.required)n.add(t);Object.assign(t,e.properties)}return Object.keys(t).length>0?{properties:t,required:Array.from(n)}:null}var Po;(function(e){e[e.COMPLETION_RESULT_V1=20250925]=`COMPLETION_RESULT_V1`,e[e.DOWNLOAD_URL_NO_MIME_TYPE_V1=20260210]=`DOWNLOAD_URL_NO_MIME_TYPE_V1`,e[e.MEDIA_BLOB_STORAGE_V1=20260319]=`MEDIA_BLOB_STORAGE_V1`})(Po||={});const Fo=1;function Io(e){return`/view/${encodeURIComponent(e)}`}const Lo=[`text`,`keyword`,`number`,`date`,`boolean`],Ro=[`text`,`date`,`number`,`badge`,`user`,`content_type`,`location`];function zo(e){return{name:e.name,...e.description===void 0?{}:{description:e.description},...e.enabled===void 0?{}:{enabled:e.enabled},...e.layout===void 0?{}:{layout:e.layout},...e.scope===void 0?{}:{scope:e.scope},...e.navigation===void 0?{}:{navigation:e.navigation},...e.search===void 0?{}:{search:e.search},...e.results===void 0?{}:{results:e.results}}}function Bo(e){return{...zo(e),description:e.description}}const Vo=`https://schemas.vertesia.com/view-experience.v1.schema.json`,Ho=`https://schemas.vertesia.com/persisted-view-experience.v1.schema.json`,Q={$id:Vo,type:`object`,title:`View Experience`,description:`A reusable content navigation and search experience. Save it through /api/v1/views, then render it at /view/<id>.`,properties:{name:{type:`string`,minLength:1,maxLength:120,description:`Human-readable View name.`},description:{type:`string`,maxLength:4e3,description:`Purpose and intended audience of this View.`},enabled:{type:`boolean`,description:`Whether the View may be executed.`},layout:{$ref:`#/$defs/layout`},scope:{$ref:`#/$defs/scope`},navigation:{type:`array`,maxItems:20,description:`Ordered facets or hierarchies used to browse the scoped content.`,items:{oneOf:[{$ref:`#/$defs/locationNavigation`},{$ref:`#/$defs/collectionNavigation`},{$ref:`#/$defs/termsNavigation`},{$ref:`#/$defs/hierarchyNavigation`},{$ref:`#/$defs/rangeNavigation`}]}},search:{$ref:`#/$defs/search`},results:{$ref:`#/$defs/results`}},required:[`name`],additionalProperties:!1,$defs:{configurationId:{type:`string`,minLength:1,maxLength:64,pattern:gr,description:`Stable id starting with a letter and containing letters, numbers, underscores, or hyphens.`},fieldName:{type:`string`,minLength:1,maxLength:160,pattern:A,description:`Dot-separated Elasticsearch field name.`},stringArray:{type:`array`,maxItems:100,items:{type:`string`,minLength:1}},layout:{type:`object`,description:`Overall browsing layout.`,properties:{mode:{type:`string`,enum:[`browse`,`worklist`],description:`Browse emphasizes discovery; worklist emphasizes case-style task handling.`},navigation_position:{type:`string`,enum:[`sidebar`,`top`],description:`Where navigation widgets appear.`}},required:[],additionalProperties:!1},scope:{type:`object`,description:`Hard boundary applied to every search and navigation query.`,properties:{type_ids:{$ref:`#/$defs/stringArray`,description:`Content type ids included in the View.`},locations:{$ref:`#/$defs/stringArray`,description:`Absolute content location roots included in the View.`},collection_ids:{$ref:`#/$defs/stringArray`,description:`Collection ids included in the View.`},include_collection_descendants:{type:`boolean`,description:`Include descendants of scoped collections.`},fixed_filter:{type:`object`,description:`Elasticsearch query clause always applied by the runtime. Script-like and unsafe clauses are rejected.`,required:[],additionalProperties:!0},head_only:{type:`boolean`,description:`Return only current head revisions.`}},required:[],additionalProperties:!1},locationNavigation:{type:`object`,title:`Location hierarchy`,description:`Browse the hierarchical content location path.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`location`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},roots:{type:`array`,maxItems:50,items:{type:`string`,pattern:`^/`},description:`Absolute location roots shown by the hierarchy.`},depth:{type:`integer`,minimum:1,maximum:20}},required:[`id`,`label`,`source`],additionalProperties:!1},collectionNavigation:{type:`object`,title:`Collection hierarchy`,description:`Browse collection membership and optionally collection descendants.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`collection`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},roots:{type:`array`,maxItems:50,items:{type:`string`,minLength:1}},include_descendants:{type:`boolean`}},required:[`id`,`label`,`source`],additionalProperties:!1},termsNavigation:{type:`object`,title:`Property facet`,description:`Bucket a keyword-like property such as brand.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`terms`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},size:{type:`integer`,minimum:1,maximum:500},sort:{type:`string`,enum:[`count`,`label`]}},required:[`id`,`label`,`source`,`field`],additionalProperties:!1},hierarchyLevel:{type:`object`,title:`Property hierarchy level`,description:`One mapped property in a drill-down hierarchy.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},size:{type:`integer`,minimum:1,maximum:500},sort:{type:`string`,enum:[`count`,`label`]}},required:[`id`,`label`,`field`],additionalProperties:!1},hierarchyNavigation:{type:`object`,title:`Property hierarchy`,description:`Drill down through mapped properties such as State, then City.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`hierarchy`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{const:!1},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},levels:{type:`array`,minItems:2,maxItems:10,items:{$ref:`#/$defs/hierarchyLevel`}}},required:[`id`,`label`,`source`,`levels`],additionalProperties:!1},rangeDefinition:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},from:{type:`number`},to:{type:`number`}},required:[`id`,`label`],additionalProperties:!1,anyOf:[{required:[`from`]},{required:[`to`]}]},rangeNavigation:{type:`object`,title:`Numeric range facet`,description:`Bucket a numeric property such as project_size into authored ranges.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},source:{const:`range`},presentation:{type:`string`,enum:[`tree`,`list`,`select`,`chips`]},multi_select:{type:`boolean`},order:{type:`integer`},renderer:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},ranges:{type:`array`,minItems:1,items:{$ref:`#/$defs/rangeDefinition`}}},required:[`id`,`label`,`source`,`field`,`ranges`],additionalProperties:!1},keyTerm:{type:`object`,description:`A URL-serializable structured search input.`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},field:{$ref:`#/$defs/fieldName`},type:{type:`string`,enum:[...Lo]},multiple:{type:`boolean`},operator:{type:`string`,enum:[`match`,`term`,`range`]}},required:[`id`,`label`,`type`],additionalProperties:!1},searchField:{type:`object`,description:`A mapped Elasticsearch field available to query planning and deterministic full-text fallback.`,properties:{field:{$ref:`#/$defs/fieldName`},description:{type:`string`,minLength:1,maxLength:500,description:`Semantic meaning of the field for query planners.`},type:{type:`string`,enum:[...Lo],description:`Mapping hint used only when the active index does not expose the field type.`},mode:{type:`string`,enum:[`auto`,`full_text`,`exact`],description:`Whether the field supports scoring text queries, structured exact queries, or mapping-derived behavior.`},boost:{type:`number`,minimum:.1,maximum:20,description:`Relative boost when the field participates in multi-field text search.`}},required:[`field`],additionalProperties:!1},interactionConfig:{type:`object`,description:`One execution configuration for the agentic search model. Set environment and/or model to override project defaults.`,properties:{id:{type:`string`},environment:{type:`string`},model:{type:`string`},do_validate:{type:`boolean`},run_data:{type:`string`},configMode:{type:`string`},model_options:{type:`object`,required:[],additionalProperties:!0},prompt_cache_key:{type:`string`},prompt_cache_schema_suffix:{type:`boolean`},http_timeout:{type:`object`,required:[],additionalProperties:!0}},required:[],additionalProperties:!0},agenticSearch:{type:`object`,description:`Agentic query planning configuration. The default interaction is sys:ContentSearchAgent and it emits secured Elasticsearch DSL.`,properties:{interaction:{type:`string`,maxLength:200,description:`Interaction id. Defaults to sys:ContentSearchAgent.`},config:{$ref:`#/$defs/interactionConfig`},instructions:{type:`string`,maxLength:4e3,description:`Domain-specific guidance for translating natural language into Elasticsearch DSL.`},mode:{type:`string`,enum:[`query`],description:`Generate and validate an Elasticsearch query before execution.`},timeout_ms:{type:`integer`,minimum:1e3,maximum:6e4},minimum_confidence:{type:`number`,minimum:0,maximum:1}},required:[],additionalProperties:!1},search:{type:`object`,description:`Text and structured search configuration.`,properties:{renderer:{type:`string`,maxLength:120,description:`Optional app-registered search renderer name.`},mode:{type:`string`,enum:[`deterministic`,`agentic`]},placeholder:{type:`string`,maxLength:240},fields:{type:`array`,maxItems:50,items:{$ref:`#/$defs/searchField`},description:`Fields disclosed to query planning. Text-capable entries also define deterministic fallback search.`},key_terms:{type:`array`,maxItems:50,items:{$ref:`#/$defs/keyTerm`}},agentic:{$ref:`#/$defs/agenticSearch`}},required:[],additionalProperties:!1},resultField:{type:`object`,properties:{field:{$ref:`#/$defs/fieldName`},label:{type:`string`,maxLength:120},format:{type:`string`,enum:[...Ro]},fallback:{type:`string`,maxLength:240}},required:[`field`],additionalProperties:!1},resultMedia:{type:`object`,properties:{source:{type:`string`,enum:[`content_thumbnail`,`property`,`type_icon`]},field:{$ref:`#/$defs/fieldName`},fit:{type:`string`,enum:[`cover`,`contain`]},fallback:{type:`string`,enum:[`type_icon`,`placeholder`,`none`]}},required:[`source`],additionalProperties:!1},resultFieldArray:{type:`array`,items:{$ref:`#/$defs/resultField`}},listDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`list`},title:{$ref:`#/$defs/resultField`},subtitle:{$ref:`#/$defs/resultFieldArray`},description:{$ref:`#/$defs/resultField`},media:{$ref:`#/$defs/resultMedia`},badges:{$ref:`#/$defs/resultFieldArray`}},required:[`id`,`label`,`type`,`title`],additionalProperties:!1},tableColumn:{type:`object`,properties:{field:{$ref:`#/$defs/fieldName`},label:{type:`string`,maxLength:120},format:{type:`string`,enum:[...Ro]},fallback:{type:`string`,maxLength:240},width:{type:`integer`,minimum:40,maximum:2e3},sortable:{type:`boolean`},sort_option:{$ref:`#/$defs/configurationId`}},required:[`field`],additionalProperties:!1},tableDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`table`},columns:{type:`array`,minItems:1,items:{$ref:`#/$defs/tableColumn`}}},required:[`id`,`label`,`type`,`columns`],additionalProperties:!1},cardsDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`cards`},title:{$ref:`#/$defs/resultField`},description:{$ref:`#/$defs/resultField`},media:{$ref:`#/$defs/resultMedia`},fields:{$ref:`#/$defs/resultFieldArray`},badges:{$ref:`#/$defs/resultFieldArray`},columns:{type:`integer`,enum:[2,3,4,5,6]}},required:[`id`,`label`,`type`,`title`],additionalProperties:!1},galleryDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`gallery`},media:{$ref:`#/$defs/resultMedia`},title:{$ref:`#/$defs/resultField`},caption:{$ref:`#/$defs/resultFieldArray`},columns:{type:`integer`,enum:[2,3,4,5,6]}},required:[`id`,`label`,`type`,`media`,`title`],additionalProperties:!1},boardCard:{type:`object`,properties:{title:{$ref:`#/$defs/resultField`},description:{$ref:`#/$defs/resultField`},media:{$ref:`#/$defs/resultMedia`},fields:{$ref:`#/$defs/resultFieldArray`},badges:{$ref:`#/$defs/resultFieldArray`}},required:[`title`],additionalProperties:!1},boardColumn:{type:`object`,properties:{value:{type:`string`,minLength:1},label:{type:`string`,minLength:1,maxLength:120},order:{type:`integer`}},required:[`value`,`label`],additionalProperties:!1},boardDisplay:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},renderer:{type:`string`,minLength:1,maxLength:120},page_size:{type:`integer`,minimum:1,maximum:200},type:{const:`board`},group_by:{$ref:`#/$defs/fieldName`},columns:{type:`array`,items:{$ref:`#/$defs/boardColumn`}},card:{$ref:`#/$defs/boardCard`}},required:[`id`,`label`,`type`,`group_by`,`card`],additionalProperties:!1},display:{oneOf:[{$ref:`#/$defs/listDisplay`},{$ref:`#/$defs/tableDisplay`},{$ref:`#/$defs/cardsDisplay`},{$ref:`#/$defs/galleryDisplay`},{$ref:`#/$defs/boardDisplay`}]},sortClause:{type:`object`,properties:{field:{$ref:`#/$defs/fieldName`},order:{type:`string`,enum:[`asc`,`desc`]}},required:[`field`,`order`],additionalProperties:!1},sortOption:{type:`object`,properties:{id:{$ref:`#/$defs/configurationId`},label:{type:`string`,minLength:1,maxLength:120},sort:{type:`array`,minItems:1,items:{$ref:`#/$defs/sortClause`}}},required:[`id`,`label`,`sort`],additionalProperties:!1},results:{type:`object`,description:`Built-in or app-rendered visual result layouts.`,properties:{default_display:{$ref:`#/$defs/configurationId`},allow_display_switch:{type:`boolean`},displays:{type:`array`,minItems:1,maxItems:10,items:{$ref:`#/$defs/display`}},default_sort:{$ref:`#/$defs/configurationId`},sort_options:{type:`array`,items:{$ref:`#/$defs/sortOption`}}},required:[`default_display`,`displays`],additionalProperties:!1}}},Uo={...Q,$id:Ho,title:`Persisted View Experience`,properties:{...Q.properties,description:{...Q.properties.description,minLength:1}},required:[`name`,`description`]},Wo=new Set([`bool`,`match`,`multi_match`,`simple_query_string`,`term`,`terms`,`range`,`exists`,`ids`,`prefix`,`match_all`]),Go=new Set(vr);function Ko(e,t,n,r){if(typeof t!=`string`||!j.test(t)){e.push({path:n,message:`must be a dot-separated field name`});return}if(Go.has(t.split(`.`)[0])){e.push({path:n,message:`field '${t}' is server-controlled`});return}r.allowedFields&&!r.allowedFields.has(t)&&e.push({path:n,message:`field '${t}' is not available to this View`})}function qo(e,t,n,r,i){let a=i.allowedOperators?.get(t);a&&!a.has(n)&&e.push({path:r,message:`operator '${n}' is not available for field '${t}'`})}function Jo(e,t,n,r,i){if(!M(t)){e.push({path:n,message:`must be an object keyed by field name`});return}let a=Object.entries(t);if(a.length!==1){e.push({path:n,message:`must reference exactly one field`});return}let[o,s]=a[0];Ko(e,o,`${n}.${o}`,i),r(s,`${n}.${o}`,o)}function Yo(e,t,n,r,i){if(r.clauses++,r.clauses>100){e.push({path:n,message:`exceeds the maximum of 100 query clauses`});return}if(!M(t)){e.push({path:n,message:`must be an Elasticsearch query object`});return}let a=Object.entries(t);if(a.length!==1){e.push({path:n,message:`must contain exactly one query clause`});return}let[o,s]=a[0];if(!Wo.has(o)){e.push({path:`${n}.${o}`,message:`query type '${o}' is not supported`});return}if(o===`match_all`){M(s)||e.push({path:`${n}.match_all`,message:`must be an object`});return}if(o===`bool`){if(!M(s)){e.push({path:`${n}.bool`,message:`must be an object`});return}let t=new Set([`must`,`filter`,`should`,`must_not`,`minimum_should_match`]);for(let r of Object.keys(s))t.has(r)||e.push({path:`${n}.bool.${r}`,message:`is not supported`});for(let t of[`must`,`filter`,`should`,`must_not`]){let a=s[t];if(a===void 0)continue;let o=Array.isArray(a)?a:[a];o.length>50&&e.push({path:`${n}.bool.${t}`,message:`must contain at most 50 clauses`}),o.forEach((a,o)=>{Yo(e,a,`${n}.bool.${t}[${o}]`,r,i)})}let a=s.minimum_should_match;a!==void 0&&typeof a!=`number`&&typeof a!=`string`&&e.push({path:`${n}.bool.minimum_should_match`,message:`must be a number or string`});return}if(o===`exists`){M(s)?(Ko(e,s.field,`${n}.exists.field`,i),typeof s.field==`string`&&qo(e,s.field,`exists`,`${n}.exists.field`,i)):e.push({path:`${n}.exists`,message:`must be an object`});return}if(o===`ids`){!M(s)||!Array.isArray(s.values)||s.values.length>1e3?e.push({path:`${n}.ids.values`,message:`must be an array containing at most 1000 IDs`}):s.values.some(e=>typeof e!=`string`)&&e.push({path:`${n}.ids.values`,message:`must contain only strings`});return}if(o===`multi_match`||o===`simple_query_string`){if(!M(s)||typeof s.query!=`string`){e.push({path:`${n}.${o}.query`,message:`must be a string`});return}!Array.isArray(s.fields)||s.fields.length===0||s.fields.length>20?e.push({path:`${n}.${o}.fields`,message:`must contain between 1 and 20 fields`}):s.fields.forEach((t,r)=>{let a=typeof t==`string`?t.split(`^`)[0]:t;Ko(e,a,`${n}.${o}.fields[${r}]`,i),typeof a==`string`&&qo(e,a,o,`${n}.${o}.fields[${r}]`,i)});return}if(M(s)){let t=Object.entries(s);t.length===1&&qo(e,t[0][0],o,`${n}.${o}.${t[0][0]}`,i)}Jo(e,s,`${n}.${o}`,(t,n,r)=>{if(o===`terms`){(!Array.isArray(t)||t.length>1e3)&&e.push({path:n,message:`must be an array containing at most 1000 values`});return}if(o===`range`){if(!M(t)){e.push({path:n,message:`must be a range object`});return}let r=new Set([`gt`,`gte`,`lt`,`lte`]);(Object.keys(t).length===0||Object.keys(t).some(e=>!r.has(e)))&&e.push({path:n,message:`supports only gt, gte, lt, and lte`});return}if(o===`prefix`){r!==`location`&&e.push({path:n,message:`prefix queries are supported only for location`});let i=M(t)?t.value:t;(typeof i!=`string`||!i.startsWith(`/`)||!i.endsWith(`/`))&&e.push({path:n,message:`must be a boundary-aware absolute location prefix`});return}if(o===`match`){typeof(M(t)?t.query:t)!=`string`&&e.push({path:n,message:`must contain a string query`});return}if(o===`term`&&M(t)){let r=new Set([`value`,`boost`,`case_insensitive`]);if(!(`value`in t)||Object.keys(t).some(e=>!r.has(e))){e.push({path:n,message:`supports only value, boost, and case_insensitive options`});return}(M(t.value)||Array.isArray(t.value))&&e.push({path:`${n}.value`,message:`must be a scalar value`}),t.boost!==void 0&&typeof t.boost!=`number`&&e.push({path:`${n}.boost`,message:`must be a number`}),t.case_insensitive!==void 0&&typeof t.case_insensitive!=`boolean`&&e.push({path:`${n}.case_insensitive`,message:`must be a boolean`});return}(M(t)||Array.isArray(t))&&e.push({path:n,message:`must be a scalar value`})},i)}function Xo(e,t){if(t.clauses++,t.clauses>100||!M(e))return e;let n=Object.entries(e);if(n.length!==1)return e;let[r,i]=n[0];if(r===`bool`&&M(i)){let e={...i};for(let n of[`must`,`filter`,`should`,`must_not`]){let r=i[n];Array.isArray(r)?e[n]=r.map(e=>Xo(e,t)):r!==void 0&&(e[n]=Xo(r,t))}return{bool:e}}if(r!==`term`||!M(i))return e;let a=Object.entries(i);if(a.length!==1)return e;let[o,s]=a[0];return!M(s)||Object.keys(s).length!==1||!(`value`in s)?e:{term:{[o]:s.value}}}function Zo(e){return Xo(e,{clauses:0})}function Qo(e,t=`query`,n={}){let r=[];return Yo(r,Zo(e),t,{clauses:0},n),r}function $o(e,t=`query`,n={}){let r=Zo(e),i=[];if(Yo(i,r,t,{clauses:0},n),i.length>0)throw Error(i.map(e=>`${e.path} ${e.message}`).join(`; `));return r}const es=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,ts=/^app:([A-Za-z0-9][A-Za-z0-9._@-]*):([A-Za-z0-9][A-Za-z0-9._:-]*)$/;function $(e,t,n,r=`must be unique`){let i=new Set;t.forEach((t,a)=>{i.has(t)&&e.push({path:n(a),message:r}),i.add(t)})}function ns(e,t,n){t?.source===`property`&&t.field===void 0&&e.push({path:`${n}.field`,message:`is required when media source is property`})}function rs(e,t,n,r){let i=`results.displays[${n}]`;t.type===`list`?ns(e,t.media,`${i}.media`):t.type===`table`?t.columns.forEach((t,n)=>{t.sort_option!==void 0&&!r.has(t.sort_option)&&e.push({path:`${i}.columns[${n}].sort_option`,message:`must reference a configured sort option`})}):t.type===`cards`||t.type===`gallery`?ns(e,t.media,`${i}.media`):ns(e,t.card.media,`${i}.card.media`)}function is(e,t){$(e,t.map(e=>e.id),e=>`navigation[${e}].id`),t.forEach((t,n)=>{let r=`navigation[${n}]`;t.source===`hierarchy`?($(e,t.levels.map(e=>e.id),e=>`${r}.levels[${e}].id`,`must be unique within the hierarchy`),$(e,t.levels.map(e=>e.field),e=>`${r}.levels[${e}].field`,`must be unique within the hierarchy`)):t.source===`range`&&($(e,t.ranges.map(e=>e.id),e=>`${r}.ranges[${e}].id`,`must be unique within the range facet`),t.ranges.forEach((t,n)=>{t.from!==void 0&&t.to!==void 0&&t.from>=t.to&&e.push({path:`${r}.ranges[${n}]`,message:`from must be less than to`})}))})}function as(e,t){let n=t.search;if(n===void 0)return;n.mode!==`agentic`&&n.agentic!==void 0&&e.push({path:`search.agentic`,message:`requires search.mode to be agentic`});let r=n.fields??[];$(e,r.map(e=>e.field),e=>`search.fields[${e}].field`),r.forEach((t,n)=>{t.mode===`full_text`&&t.type!==void 0&&t.type!==`text`&&e.push({path:`search.fields[${n}].type`,message:`must be text when mode is full_text`})});let i=n.key_terms??[];$(e,i.map(e=>e.id),e=>`search.key_terms[${e}].id`),n.mode!==`agentic`&&i.forEach((t,n)=>{t.field===void 0&&e.push({path:`search.key_terms[${n}].field`,message:`is required for deterministic search`})})}function os(e,t){let n=t.results;if(n===void 0)return;let r=n.sort_options??[];$(e,r.map(e=>e.id),e=>`results.sort_options[${e}].id`);let i=new Set(r.map(e=>e.id));n.default_sort!==void 0&&!i.has(n.default_sort)&&e.push({path:`results.default_sort`,message:`must reference a configured sort option`}),$(e,n.displays.map(e=>e.id),e=>`results.displays[${e}].id`),new Set(n.displays.map(e=>e.id)).has(n.default_display)||e.push({path:`results.default_display`,message:`must reference a configured display`}),n.displays.forEach((t,n)=>{rs(e,t,n,i)})}function ss(e,t=`draft`){let n=[];return t===`persisted`&&e.description?.trim().length===0&&n.push({path:`description`,message:`must explain the View purpose`}),e.scope?.fixed_filter!==void 0&&n.push(...Qo(e.scope.fixed_filter,`scope.fixed_filter`)),is(n,e.navigation??[]),as(n,e),os(n,e),n}function cs(e){if(typeof e!=`string`||e.trim()===``)return[{path:`id`,message:`must be a non-empty string`}];let t=[];return e.length>64&&t.push({path:`id`,message:`must contain at most 64 characters`}),es.test(e)||t.push({path:`id`,message:`must be a lowercase URL-safe slug`}),t}function ls(e){if(typeof e!=`string`)return;let t=ts.exec(e);if(t)return{app_name:t[1],local_id:t[2]}}const us=new e.default({allErrors:!0,strict:!1}),ds=us.compile(Q),fs=us.compile(Uo);function ps(e){return e===``?`configuration`:e.slice(1).split(`/`).map(e=>e.replaceAll(`~1`,`/`).replaceAll(`~0`,`~`)).reduce((e,t)=>/^\d+$/.test(t)?`${e}[${t}]`:e.length===0?t:`${e}.${t}`,``)}function ms(e){let t=ps(e.instancePath);if(e.keyword===`required`&&`missingProperty`in e.params){let n=String(e.params.missingProperty);return t===`configuration`?n:`${t}.${n}`}if(e.keyword===`additionalProperties`&&`additionalProperty`in e.params){let n=String(e.params.additionalProperty);return t===`configuration`?n:`${t}.${n}`}return t}function hs(e,t){let n=t===`persisted`?fs:ds;if(n(e))return[];let r=(n.errors??[]).map(e=>({path:ms(e),message:e.message??`is invalid`}));return[...new Map(r.map(e=>[`${e.path}\u0000${e.message}`,e])).values()]}function gs(e,t=`draft`){let n=hs(e,t);return n.length>0?n:ss(e,t)}function _s(e){return gs(e,`draft`)}function vs(e){return gs(e,`persisted`)}var ys;(function(e){e.AgentRunStarted=`agent_run_started`,e.AgentRunCompleted=`agent_run_completed`,e.LlmCall=`llm_call`,e.ToolCall=`tool_call`})(ys||={});var bs;(function(e){e.Start=`start`,e.ResumeTools=`resume_tools`,e.ResumeUser=`resume_user`,e.Checkpoint=`checkpoint`,e.NestedInteraction=`nested_interaction`})(bs||={});var xs;(function(e){e.Builtin=`builtin`,e.Interaction=`interaction`,e.Remote=`remote`,e.Skill=`skill`})(xs||={});export{go as ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH,ho as ACCOUNT_NAMESPACE_MAX_LENGTH,he as APP_ARTIFACT_STATUSES,me as APP_ARTIFACT_TYPES,fe as APP_CAPABILITIES,ge as APP_CAPABILITY_MANIFEST_PATH,we as APP_PACKAGE_SCOPES,Se as APP_REPO_DOCUMENT_UPLOAD_MAX_FILES,be as APP_REPO_DOCUMENT_UPLOAD_MAX_FILE_BYTES,xe as APP_REPO_DOCUMENT_UPLOAD_MAX_TOTAL_BYTES,Ce as APP_REPO_DOCUMENT_UPLOAD_PREFIX,pe as APP_VERSION_HEADER,Ia as AUDIO_RENDITION_NAME,Ee as AUDIT_ACTIONS,Oe as AUDIT_AGGREGATION_DIMENSIONS,ri as AbacScopes,r as AccessControlPrincipalType,n as AccessControlResourceType,xo as AccountRefPopulate,X as AccountType,ys as AgentEventType,K as AgentMessageType,Ie as AgentSearchScope,mi as AgentToolApprovalModes,ne as ApiKeyTypes,Po as ApiVersions,De as BILLABLE_AUDIT_ACTIONS,po as BillingMethod,Tr as BrowserUseProjectConfigurationSchema,Te as COMPOSITE_APP_HEADER_BUILTIN_IDS,ka as CRON_PRESETS,Aa as CRON_PRESET_LABELS,_i as CollectionStatus,m as ConfigModes,h as ConfigModesDescription,He as ConfigModesOptions,ra as ContentEventName,Pa as ContentNature,ja as ContentObjectApiHeaders,Qa as ContentObjectProcessingPriority,Na as ContentObjectStatus,Ha as ContentTypeEditingPolicySchema,Ka as ContentTypeIntakePolicySchema,T as CustomProviders,En as CustomProvidersList,Ye as DATA_COLUMN_TYPE_TO_DUCKDB,et as DEFAULT_DASHBOARD_LAYOUT,hr as DEFAULT_EVENT_AGENT_INTERACTION_REF,Wr as DEFAULT_EVENT_SUBSCRIPTION_RUN_AS_ROLE,Vr as DEFAULT_EXTERNAL_EVENT_ACTION,Hr as DEFAULT_EXTERNAL_EVENT_RESOURCE_TYPE,Qe as DEFAULT_RETENTION_CONFIG,Ir as DEFAULT_SEMANTIC_AGENT_MAX_ITERATIONS,Rr as DEFAULT_SEMANTIC_MAX_CONTENT_CHARS,Pr as DEFAULT_WEBHOOK_TIMEOUT_MS,Oo as DOCUMENT_STORE_HINT,$e as DashboardStatus,g as DataColumnType,Ma as DataStoreApiHeaders,Xe as DataStoreStatus,fo as Datacenters,wi as DocumentPartSchema,lo as EARLY_ACCESS_ANNOTATION,j as ELASTICSEARCH_FIELD_PATH_PATTERN,A as ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE,L as EVENT_CATEGORIES,Kr as EVENT_CONDITION_JSON_LOGIC_OPERATORS,R as EVENT_PRIORITIES,Gr as EVENT_SUBSCRIPTION_RUN_AS_ROLES,Ur as EXTERNAL_EVENT_SOURCE_PREFIX,Ve as ExecutionRunRefSelect,Pe as ExecutionRunStatus,Sa as FileProcessingStatus,I as FullTextType,q as ImageRenditionFormat,Ze as ImportStatus,je as InteractionRefPopulate,Me as InteractionRefWithSchemaPopulate,Ne as InteractionStatus,Ta as LOW_PRIORITY_TASK_QUEUE,bs as LlmCallType,ki as MAX_PROCESS_DEFINITION_BYTES,Ai as MAX_PROCESS_GUARD_DEPTH,ji as MAX_PROCESS_GUARD_NODES,Lr as MAX_SEMANTIC_AGENT_MAX_ITERATIONS,Br as MAX_SEMANTIC_CONDITION_INSTRUCTION_LENGTH,zr as MAX_SEMANTIC_MAX_CONTENT_CHARS,Fr as MAX_WEBHOOK_TIMEOUT_MS,ae as MCP_COLLECTION_ID_PATTERN,oe as MCP_COLLECTION_NAMESPACE_PATTERN,An as MEMBERS_GROUP_NAME,J as MarkdownRenditionFormat,Hn as MeterNames,Ue as ModelSource,Kn as OAUTH_PLATFORM_SCOPES,k as OAUTH_SCOPE_OFFLINE_ACCESS,Un as OAUTH_SCOPE_OPENID,O as OAUTH_SCOPE_PROFILE,Wn as OAUTH_SCOPE_PROJECT_SWITCH,Gn as OAUTH_STANDARD_SCOPES,Ra as PDF_RENDITION_NAME,Ho as PERSISTED_VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID,Fa as POSTER_RENDITION_NAME,ie as PREFERRED_SECTIONS,Ti as PROCESS_DEFINITION_FORMAT_VERSION,Ei as PROCESS_DEFINITION_JSON_SCHEMA_ID,Er as PROJECT_SEARCH_PROPERTY_TYPES,$a as ParentClosePolicy,t as Permission,Uo as PersistedViewExperienceConfigurationJsonSchema,re as PrincipalType,Di as ProcessDefinitionBodyJsonSchema,mr as Progress,Ar as ProjectRefPopulate,V as PromptSegmentDefType,ei as PromptStatus,Z as QuotaTier,_o as RESERVED_ACCOUNT_NAMESPACES,uo as RESTRICTED_ENVIRONMENT_ERROR_CODE,Ci as RenditionSchema,ni as ResolvableRefType,Sr as ResourceVisibility,f as RunDataStorageDescription,d as RunDataStorageLevel,Fe as RunDataStorageOptions,Be as RunSourceTypes,vr as SERVER_CONTROLLED_VIEW_FIELD_ROOTS,Mr as SUPPORTED_SEARCH_LANGUAGES,Cr as SYSTEM_INTERACTION_CATEGORIES,kr as SearchTypes,i as SecurityLevel,a as SecurityLevelLabels,Je as SemanticColumnType,F as SupportedEmbeddingTypes,Bn as SupportedIntegrations,Tn as SupportedProviders,Dn as SupportedProvidersList,P as SystemInteractionCategory,N as SystemRoles,aa as TaskStatus,oa as TaskType,xs as TelemetryToolType,ti as TemplateType,za as TextExtractionStatus,oo as TrainingSessionStatus,so as TransientTokenType,kn as UserGroupRefPopulate,co as UserRefPopulate,_r as VIEW_CONFIGURATION_ID_PATTERN,gr as VIEW_CONFIGURATION_ID_PATTERN_SOURCE,Vo as VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID,Fo as VIEW_EXPERIENCE_SCHEMA_VERSION,br as VIEW_FIELD_PATTERN,yr as VIEW_FIELD_PATTERN_SOURCE,Ro as VIEW_RESULT_FIELD_FORMATS,Lo as VIEW_SEARCH_FIELD_TYPES,Q as ViewExperienceConfigurationJsonSchema,La as WEB_VIDEO_RENDITION_NAME,xi as WorkflowDefinitionRefPopulate,G as WorkflowExecutionStatus,Ja as WorkflowRuleInputType,ii as X_EXTRACT,jo as _mergePromptsSchema,$o as asSupportedViewQuery,jr as autoTuneReindexParams,Ya as canGenerateRendition,ba as createCompactMessage,or as createOAuthProjectBindingScope,le as deriveMCPCollectionId,_e as effectiveAppAccessControl,fr as extractOAuthPermissionScopes,We as findEmailChannel,bo as getAccountNamespaceValidationError,Ba as getContentTypeRefId,yi as getConversationStorageId,Xr as getCreateEventSubscriptionValidationResult,ue as getDefaultOAuthAppNameForCollectionId,ia as getDocumentIds,Si as getGroundedExtractionWorkflowId,er as getOAuthPermissionScopes,dr as getOAuthScopesWithProfileDependency,Bo as getPersistedViewExperienceConfiguration,Ni as getProcessDefinitionValidationResult,Oi as getProcessInteractionValidationSelectors,Ea as getRenditionsPath,ca as getResourcesFromMessage,ze as getResourcesFromToolResult,o as getSecurityLevelLabel,Xa as getSupportedRenditionFormats,wr as getSystemInteractionCategory,So as getTenantId,Co as getTenantIdFromProject,Zr as getUpdateEventSubscriptionValidationResult,On as getVertexBucketAccessPrincipal,zo as getViewExperienceConfiguration,Ca as getWorkflowChannel,wa as getWorkflowUpdatesKey,Ge as hasEmailChannel,lr as hasOAuthOfflineAccessScope,sr as hasOAuthOpenIdScope,cr as hasOAuthProfileScope,ur as hasOAuthProjectSwitchScope,D as hostFromUrl,In as hostMatchesAny,io as isAgentRequest,gi as isAgentToolApprovalMode,eo as isApiKeyRequest,pa as isCompactMessage,la as isDocumentEventMessage,ke as isEmailChannel,ro as isEnvironmentRequest,H as isExtractableSchemaNode,ua as isFileProcessingMessage,qa as isInCodeType,Ae as isInteractiveChannel,ma as isLegacyMessage,Rn as isLocalhostOrVertesiaHost,zn as isLocalhostOrVertesiaUrl,Da as isMarkdownRenditionVars,rr as isOAuthPermissionScope,nr as isOAuthPlatformScope,ar as isOAuthProjectBindingScope,tr as isOAuthStandardScope,ir as isOAuthSupportedScope,da as isPlanMessage,no as isProjectRequest,fa as isRequestInputMessage,xr as isRoleIncludedIn,ao as isServiceAccountRequest,sa as isToolCallMessage,to as isUserRequest,se as isValidMCPCollectionId,ce as isValidMCPCollectionNamespace,M as isViewValidationRecord,Oa as isWorkflowTerminalStatus,No as mergeInCodePromptSchemas,Ao as mergeJSONSchemas,pi as mergePreservingNonExtractable,Mo as mergePromptsSchema,yo as normalizeAccountNamespace,p as normalizeAgentResources,hi as normalizeAgentToolApprovalMode,E as normalizeHost,Fn as normalizeHostList,_a as normalizeMessageType,de as normalizeToolCollection,Zo as normalizeViewQuery,ls as parseAppViewExperienceId,ya as parseMessage,mo as quotaTierForAccountType,Eo as removeExtraProperties,ee as renderAgentRequestFallback,te as renderAgentRequestMessage,u as renderAgentRequestTemplate,wo as sanitizeToolDefinition,To as sanitizeToolDefinitions,ui as schemaForExtraction,xn as supportsToolUse,Za as supportsVisualRendition,xa as toAgentMessage,va as toCompactMessage,vi as toolInputRefsArtifactPath,Ke as updateEmailChannel,qe as updateEmailThreading,Ln as urlMatchesAnyHost,Qr as validateCreateEventSubscriptionInput,vs as validatePersistedViewExperienceConfiguration,Mi as validateProcessDefinitionBody,Or as validateProjectSearchPropertyMappings,Qo as validateSupportedViewQuery,$r as validateUpdateEventSubscriptionInput,gs as validateViewConfiguration,_s as validateViewExperienceConfiguration,cs as validateViewExperienceId,Io as viewExperienceRoute,Va as withContentObjectTypeRefDiscriminator,bi as withDSLWorkflowSpecDiscriminator,Vn as withProjectIntegrationDiscriminator};
|
|
3
3
|
//# sourceMappingURL=vertesia-common.js.map
|