@vertesia/common 1.4.0-dev.20260615.051508Z → 1.4.0
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/access-control.d.ts +2 -6
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +3 -0
- package/lib/access-control.js.map +1 -1
- package/lib/apikey.d.ts +4 -5
- package/lib/apikey.d.ts.map +1 -1
- package/lib/apikey.js.map +1 -1
- package/lib/apps.d.ts +15 -275
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js.map +1 -1
- package/lib/ask-user.d.ts +29 -1
- package/lib/ask-user.d.ts.map +1 -1
- package/lib/data-platform.d.ts +33 -121
- package/lib/data-platform.d.ts.map +1 -1
- package/lib/data-platform.js.map +1 -1
- package/lib/environment.d.ts +11 -1
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interaction.d.ts +11 -7
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js.map +1 -1
- package/lib/json-schema.d.ts +1 -1
- package/lib/json-schema.d.ts.map +1 -1
- package/lib/oauth-scopes.d.ts +5 -0
- package/lib/oauth-scopes.d.ts.map +1 -1
- package/lib/oauth-scopes.js +10 -1
- package/lib/oauth-scopes.js.map +1 -1
- package/lib/oauth-server.d.ts +17 -0
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/project.d.ts +1 -1
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js +26 -26
- package/lib/project.js.map +1 -1
- package/lib/roles/types.d.ts +54 -0
- package/lib/roles/types.d.ts.map +1 -0
- package/lib/roles/types.js +17 -0
- package/lib/roles/types.js.map +1 -0
- package/lib/store/agent-approval.d.ts +18 -0
- package/lib/store/agent-approval.d.ts.map +1 -0
- package/lib/store/agent-approval.js +11 -0
- package/lib/store/agent-approval.js.map +1 -0
- package/lib/store/agent-run.d.ts +18 -4
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/conversation-state.d.ts +54 -30
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js +0 -3
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/index.d.ts +1 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +1 -0
- package/lib/store/index.js.map +1 -1
- package/lib/store/signals.d.ts +15 -0
- package/lib/store/signals.d.ts.map +1 -1
- package/lib/store/workflow.d.ts +41 -2
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +8 -5
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-token-types.d.ts +2 -2
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/transient-tokens.d.ts +2 -2
- package/lib/transient-tokens.d.ts.map +1 -1
- package/lib/user.d.ts +2 -2
- package/lib/user.d.ts.map +1 -1
- package/lib/vertesia-common.js +1 -1
- package/lib/vertesia-common.js.map +1 -1
- package/package.json +7 -6
- package/src/access-control.ts +5 -6
- package/src/apikey.ts +4 -5
- package/src/apps.ts +15 -298
- package/src/ask-user.ts +31 -1
- package/src/data-platform.ts +35 -129
- package/src/environment.ts +12 -1
- package/src/index.ts +1 -1
- package/src/interaction.ts +13 -7
- package/src/json-schema.ts +1 -0
- package/src/oauth-scopes.ts +13 -1
- package/src/oauth-server.ts +17 -0
- package/src/project.ts +8 -8
- package/src/roles/types.ts +58 -0
- package/src/store/agent-approval.test.ts +18 -0
- package/src/store/agent-approval.ts +33 -0
- package/src/store/agent-run.ts +20 -3
- package/src/store/conversation-state.ts +62 -36
- package/src/store/index.ts +1 -0
- package/src/store/signals.ts +16 -0
- package/src/store/workflow.test.ts +60 -0
- package/src/store/workflow.ts +51 -7
- package/src/sts-token-types.ts +2 -2
- package/src/transient-tokens.ts +2 -2
- package/src/user.ts +2 -2
- package/lib/roles.d.ts +0 -19
- package/lib/roles.d.ts.map +0 -1
- package/lib/roles.js +0 -228
- package/lib/roles.js.map +0 -1
- package/src/roles.test.ts +0 -30
- package/src/roles.ts +0 -251
package/lib/vertesia-common.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e,t,o,i;!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"}(e||(e={})),function(e){e.project="project",e.environment="environment",e.account="account",e.interaction="interaction",e.app="application",e.content_set="content_set"}(t||(t={})),function(e){e.user="user",e.group="group",e.apikey="apikey",e.principal_set="principal_set"}(o||(o={})),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||(i={}));const n=["Public","Internal","Confidential","Restricted","Secret"];function r(e){return n[e]??"Unknown"}function a(e,t){return"."===t||"json"===t?e:t.split(".").reduce((e,t)=>{return Array.isArray(e)&&/^\d+$/.test(t)?e[Number(t)]:(o=e)&&"object"==typeof o&&!Array.isArray(o)?e[t]:void 0;var o},e)}function s(e){if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)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,o)=>s(a(t,o)))}function d(e){return"string"==typeof e?e:null==e?"":s(e)}function p(e,t){const o=e?.trim();if(!o)return d(t);return u(o,t).trim()}var c,l;!function(e){e.secret="sk"}(c||(c={})),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"}(l||(l={}));const m=["default","footer","settings"],_=/^[a-z0-9]+(?:_[a-z0-9]+)*$/,g=/^[a-z0-9]+(?:_[a-z0-9]+)*$/;function f(e){return _.test(e)}function h(e){return g.test(e)}function b(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").replace(/_+/g,"_")}function v(e){return e.replace(/_/g,"-")}function y(e,t){if(!e||"object"!=typeof e)throw new TypeError("Tool collection must be an object");const o=t&&e.url?w(e.url,t):e.url,i=o!==e.url;if("mcp"===e.type){const t=b(e.id||e.name||e.url);if(i||!e.id)return{...e,url:o,id:e.id||t}}else if(i)return{...e,url:o};return e}function x(e,t){return e?.access_control??t?.access_control??"all"}const E=new Set(["production","preview","staging"]);function T(e){return!!e&&!E.has(e.toLowerCase())}function w(e,t){return e&&t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,o)=>{const i=t[o];return"string"==typeof i&&i?function(e){let t=e.length;for(;t>0&&"/"===e[t-1];)t--;return t===e.length?e:e.slice(0,t)}(i):e}):e}function N(e,t,o,i){let n;return n=i&&e.endpoint_overrides?.[i]&&T(i)?e.endpoint_overrides[i]:t&&e.endpoint_overrides?.[t]&&T(t)?e.endpoint_overrides[t]:e.endpoint,n?w(n,o):n}function A(e,t,o,i){if(!e)return;if(e.endpoint){const n=N(e,t,o,i);n&&n!==e.endpoint&&(e.endpoint=n)}const n=e.tool_collections;if(n&&Array.isArray(n))for(let e=0;e<n.length;e++){const t=n[e];if(t&&"object"==typeof t&&t.url){const e=w(t.url,o);e!==t.url&&(t.url=e)}}}const I=["inference","embedding","image_generation"];function O(e){return"email"===e.type}function D(e){return"interactive"===e.type}const S="id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts",R=`${S} result_schema`;var k,$,C,L;!function(e){e.draft="draft",e.published="published",e.archived="archived",e.code="code",e.unknown="unknown"}(k||(k={})),function(e){e.created="created",e.processing="processing",e.completed="completed",e.failed="failed"}($||($={})),function(e){e.STANDARD="STANDARD",e.RESTRICTED="RESTRICTED",e.DEBUG="DEBUG"}(C||(C={})),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."}(L||(L={}));const M={[C.STANDARD]:L.STANDARD,[C.RESTRICTED]:L.RESTRICTED,[C.DEBUG]:L.DEBUG};var U,j;!function(e){e.Collection="collection"}(U||(U={})),function(e){e.api="api",e.cli="cli",e.ui="ui",e.webhook="webhook",e.test="test-data",e.system="system",e.schedule="schedule"}(j||(j={}));const P="-result -parameters -result_schema -prompt";var G,q;!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"}(G||(G={})),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."}(q||(q={}));const W={[G.RUN_AND_INTERACTION_CONFIG]:q.RUN_AND_INTERACTION_CONFIG,[G.RUN_CONFIG_ONLY]:q.RUN_CONFIG_ONLY,[G.INTERACTION_CONFIG_ONLY]:q.INTERACTION_CONFIG_ONLY};var F,B,Y;function H(e){return e?.find(O)}function K(e){return!!H(e)}function V(e,t){const o=e||[],i=o.findIndex(O);if(-1===i)return t.to_email?[...o,{type:"email",...t}]:o;const n=[...o];return n[i]={...n[i],...t,type:"email"},n}function z(e,t,o){const i=H(e);if(!i)return e||[];const n=i.references?[...i.references]:[];return n.includes(t)||n.push(t),V(e,{in_reply_to:t,references:n,thread_subject:o||i.thread_subject})}!function(e){e.config="config",e.interaction="interaction",e.environmentDefault="environmentDefault",e.projectSystemDefault="projectSystemDefault",e.projectBaseDefault="projectBaseDefault",e.projectModalityDefault="projectModalityDefault",e.projectLegacyDefault="projectLegacyDefault"}(F||(F={})),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"}(B||(B={})),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"}(Y||(Y={}));const J={[B.STRING]:"VARCHAR",[B.INTEGER]:"INTEGER",[B.BIGINT]:"BIGINT",[B.FLOAT]:"FLOAT",[B.DOUBLE]:"DOUBLE",[B.DECIMAL]:"DECIMAL(18,4)",[B.BOOLEAN]:"BOOLEAN",[B.DATE]:"DATE",[B.TIMESTAMP]:"TIMESTAMP",[B.JSON]:"JSON"};var Q,Z;!function(e){e.CREATING="creating",e.ACTIVE="active",e.ERROR="error",e.ARCHIVED="archived"}(Q||(Q={})),function(e){e.PENDING="pending",e.PROCESSING="processing",e.COMPLETED="completed",e.FAILED="failed",e.ROLLED_BACK="rolled_back"}(Z||(Z={}));const X={retention_days:30,snapshots_exempt:!0};var ee;!function(e){e.ACTIVE="active",e.ARCHIVED="archived"}(ee||(ee={}));const te={columns:2,cellWidth:600,cellHeight:400,padding:20},oe={"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}},ie={"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}},ne={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 re(e){const t=e.toLowerCase();if(t in oe)return oe[t];let o;for(const e of Object.keys(ie))t.startsWith(e)&&(!o||e.length>o.length)&&(o=e);return o?ie[o]:ne}const ae={"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}},se={"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}},ue=["image","vision"],de=["video"],pe=["audio"],ce=["text"],le=["image"],me=["video"],_e=["audio"],ge=["text"],fe=["embed"],he=["tool","gpt-4","gpt-4o","o1","o3","o4","llama-3","mistral-large","mistral-small","jamba","cohere","command","grok"];function be(e,t){return t.some(t=>e.includes(t))}function ve(e,t){return t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.startsWith("o4")?e:{...e,tool_support:!1,tool_support_streaming:!1}}const ye={},xe={"meta.llama3-1-70b-instruct-v1:0":{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},"meta.llama3-1-8b-instruct-v1:0":{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}},Ee={"ai21.jamba-instruct-v1:0":{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},"amazon.nova-canvas-v1:0":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{image:!0,text:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"amazon.nova-micro-v1:0":{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},"anthropic.claude-3-5-haiku-20241022-v1:0":{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},"meta.llama3-2-11b-instruct-v1:0":{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},"meta.llama3-2-90b-instruct-v1:0":{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}},Te={"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},"amazon.nova":{input:{text:!0,image:!0,video:!0,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"amazon.titan":{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},"anthropic.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:!1},"anthropic.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},"cohere.command-r":{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:!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},"meta.llama3-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},"meta.llama3-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},"meta.llama3-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:!1,tool_support_streaming:!1},"meta.llama3":{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},"meta.llama4":{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},"mistral.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.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},"mistral.mixtral":{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.pixtral":{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},"openai.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:!1,tool_support_streaming:!1},"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:!1,tool_support_streaming:!1},"twelvelabs.":{input:{text:!0,image:!1,video:!0,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"writer.palmyra":{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}};const we=["image"],Ne=["video"],Ae=["audio"],Ie=["text"],Oe=["image"],De=["video"],Se=["audio"],Re=["text"],ke=["embed"],$e=["tool","sonnet","opus","nova","palmyra","command-r","mistral-large","pixtral"];function Ce(e,t){return t.some(t=>e.includes(t))}function Le(e){const t=e.toLowerCase();let o=t;if(/^arn:aws:bedrock:[^:]+:[^:]*:(inference-profile|foundation-model)\/.+/i.test(t)){const e=t.lastIndexOf("foundation-model/"),i=t.lastIndexOf("inference-profile/");-1!==e?o=t.substring(e):-1!==i&&(o=t.substring(i))}const i=o.startsWith("inference-profile/"),n=o.startsWith("foundation-model/"),r=function(e){const t=e.toLowerCase(),o=t.lastIndexOf("/");let i=-1===o?t:t.slice(o+1);return t.includes("inference-profile/")&&(i=i.replace(/^[^.]+\./,"")),i}(o);if(n){const e=ye[r];if(e)return e}else if(i){const e=xe[r];if(e)return e}const a=Ee[r];if(a)return a;const s=function(e,t){let o;for(const i of Object.keys(t))e.startsWith(i)&&(!o||i.length>o.length)&&(o=i);return o?t[o]:void 0}(r,Te);if(s)return s;const u=function(e){const t=e.toLowerCase();if(t.includes("inference-profile")){const e=t.split("/");if(e.length>1){const t=e[e.length-1],o=t.split(".");return o.length>1&&"deepseek"===o[1]?`deepseek-${o.slice(2).join(".")}`:o.length>2?o.slice(2).join("."):t}}return t}(r);return{input:{text:Ce(u,Ie)||void 0,image:Ce(u,we)||void 0,video:Ce(u,Ne)||void 0,audio:Ce(u,Ae)||void 0,embed:!1},output:{text:Ce(u,Re)||void 0,image:Ce(u,Oe)||void 0,video:Ce(u,De)||void 0,audio:Ce(u,Se)||void 0,embed:Ce(u,ke)||void 0},tool_support:Ce(u,$e)||void 0}}const Me={"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}},Ue={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:!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},"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}},je=["image"],Pe=["video"],Ge=["audio"],qe=["text"],We=["image"],Fe=["video"],Be=["audio"],Ye=["text"],He=["embed"],Ke=["tool","gpt","gpt-5","o1","o3","o4"];function Ve(e,t){return t.some(t=>e.includes(t))}function ze(e){const t=e.toLowerCase();const o=Me[t];if(o)return{...o,tool_support_streaming:o.tool_support_streaming??o.tool_support};let i,n=0;for(const e of Object.keys(Ue))t.startsWith(e)&&e.length>n&&(i=e,n=e.length);if(i){const e=Ue[i];return{...e,tool_support_streaming:e.tool_support_streaming??e.tool_support}}const r={text:Ve(t,qe)||void 0,image:Ve(t,je)||void 0,video:Ve(t,Pe)||void 0,audio:Ve(t,Ge)||void 0,embed:!1},a={text:Ve(t,Ye)||void 0,image:Ve(t,We)||void 0,video:Ve(t,Fe)||void 0,audio:Ve(t,Be)||void 0,embed:Ve(t,He)||void 0},s=Ve(t,Ke)||void 0;return{input:r,output:a,tool_support:s,tool_support_streaming:s}}const Je={"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}},Qe={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}},Ze=["image"],Xe=["video"],et=["audio"],tt=["text"],ot=["image"],it=["video"],nt=["audio"],rt=["text"],at=["embed"],st=["tool","sonnet","opus","gemini","claude"];function ut(e,t){return t.some(t=>e.includes(t))}function dt(e){const t=function(e){const t=e.toLowerCase().split("/");return t[t.length-1]}(e),o=Je[t];if(o)return o;let i,n=0;for(const e of Object.keys(Qe))t.startsWith(e)&&e.length>n&&(i=e,n=e.length);if(i)return Qe[i];return{input:{text:ut(t,tt)||void 0,image:ut(t,Ze)||void 0,video:ut(t,Xe)||void 0,audio:ut(t,et)||void 0,embed:!1},output:{text:ut(t,rt)||void 0,image:ut(t,ot)||void 0,video:ut(t,it)||void 0,audio:ut(t,nt)||void 0,embed:ut(t,at)||void 0},tool_support:ut(t,st)||void 0}}var pt;!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.vertexai="vertexai",e.togetherai="togetherai",e.mistralai="mistralai",e.groq="groq",e.watsonx="watsonx",e.xai="xai",e.anthropic="anthropic"}(pt||(pt={}));const ct={openai:{id:pt.openai,name:"OpenAI",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},azure_openai:{id:pt.azure_openai,name:"Azure OpenAI",requiresApiKey:!1,requiresEndpointUrl:!0,supportSearch:!1},azure_foundry:{id:pt.azure_foundry,name:"Microsoft Foundry",requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},huggingface_ie:{id:pt.huggingface_ie,name:"HuggingFace Inference Endpoint",requiresApiKey:!0,requiresEndpointUrl:!0},replicate:{id:pt.replicate,name:"Replicate",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!0},bedrock:{id:pt.bedrock,name:"Amazon Bedrock",requiresApiKey:!1,requiresEndpointUrl:!1,endpointPlaceholder:"region name (eg. us-east-1)",supportSearch:!1},vertexai:{id:pt.vertexai,name:"Google Agent Platform (Vertex AI)",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},togetherai:{id:pt.togetherai,name:"Together AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},mistralai:{id:pt.mistralai,name:"Mistral AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},groq:{id:pt.groq,name:"Groq Cloud",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},watsonx:{id:pt.watsonx,name:"IBM WatsonX",requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},xai:{id:pt.xai,name:"xAI (Grok)",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},openai_compatible:{id:pt.openai_compatible,name:"OpenAI Compatible",requiresApiKey:!0,requiresEndpointUrl:!0,endpointPlaceholder:"https://api.example.com/v1",supportSearch:!1},anthropic:{id:pt.anthropic,name:"Anthropic",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1}};var lt,mt,_t,gt,ft,ht,bt;function vt(e,t){if(e.startsWith("locations/")){const t=e.split("/");t.length>=3&&(e=t.slice(2).join("/"))}const o=function(e,t){switch(t?.toLowerCase()){case pt.anthropic:return re(e);case pt.vertexai:return dt(e);case pt.openai:return ze(e);case pt.openai_compatible:return xt(e);case pt.bedrock:return Le(e);case pt.azure_foundry:return function(e){const{baseModel:t}=function(e){const t=e.split("::");return 2===t.length?{deploymentName:t[0],baseModel:t[1]}:{deploymentName:e,baseModel:e}}(e),o=t.toLowerCase(),i=ae[o];if(i)return ve(i,o);let n,r=0;for(const e of Object.keys(se))o.startsWith(e)&&e.length>r&&(n=e,r=e.length);if(n)return ve(se[n],o);const a={text:be(o,ce)||!0,image:be(o,ue)||void 0,video:be(o,de)||void 0,audio:be(o,pe)||void 0,embed:!1},s={text:be(o,ge)||!0,image:be(o,le)||void 0,video:be(o,me)||void 0,audio:be(o,_e)||void 0,embed:be(o,fe)||void 0},u=be(o,he)||void 0;return ve({input:a,output:s,tool_support:u,tool_support_streaming:u||void 0},o)}(e);case pt.groq:case pt.togetherai:case pt.mistralai:return xt(e);case pt.xai:return{input:{text:!0,image:e.includes("vision")},output:{text:!0},tool_support:!0,tool_support_streaming:!1};default:return e.startsWith("gpt")?ze(e):e.startsWith("claude")?re(e):e.startsWith("grok")?{input:{text:!0,image:e.includes("vision")},output:{text:!0},tool_support:!0,tool_support_streaming:!1}:e.startsWith("publishers/")?dt(e):e.startsWith("arn:aws")?Le(e):{input:{},output:{}}}}(e,t);return o.input.audio=!1,o.output.audio=!1,o.output.video=!1,o}!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"}(lt||(lt={})),function(e){e.numeric="numeric",e.enum="enum",e.boolean="boolean",e.string_list="string_list"}(mt||(mt={})),function(e){e.safety="safety",e.system="system",e.user="user",e.assistant="assistant",e.negative="negative",e.mask="mask",e.tool="tool"}(_t||(_t={})),function(e){e.text="text",e.image="image"}(gt||(gt={})),function(e){e.Available="available",e.Pending="pending",e.Stopped="stopped",e.Unavailable="unavailable",e.Unknown="unknown",e.Legacy="legacy"}(ft||(ft={})),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"}(ht||(ht={})),function(e){e.running="running",e.succeeded="succeeded",e.failed="failed",e.cancelled="cancelled"}(bt||(bt={}));const yt=["image","embed","moderation","whisper","sora","dall-e","tts"];function xt(e){const t=ze(e);if(void 0!==t.tool_support)return t;const o=e.toLowerCase(),i=yt.some(e=>o.includes(e));return{input:{text:!0},output:{text:!0},tool_support:!i,tool_support_streaming:!i}}function Et(e,t,o=!1){const i=vt(e,t);return o?!!i.tool_support_streaming:!!i.tool_support}var Tt,wt,Nt,At;lt.max_tokens,mt.numeric,lt.temperature,mt.numeric,lt.top_p,mt.numeric,lt.top_k,mt.numeric,lt.presence_penalty,mt.numeric,lt.frequency_penalty,mt.numeric,lt.stop_sequence,mt.string_list,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"}(Tt||(Tt={})),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"}(wt||(wt={})),function(e){e.HIGH="HIGH",e.MEDIUM="MEDIUM",e.LOW="LOW",e.MINIMAL="MINIMAL",e.THINKING_LEVEL_UNSPECIFIED="THINKING_LEVEL_UNSPECIFIED"}(Nt||(Nt={})),function(e){e.virtual_lb="virtual_lb",e.virtual_mediator="virtual_mediator",e.test="test"}(At||(At={}));const It={...pt,...At},Ot={virtual_lb:{id:At.virtual_lb,name:"Virtual - Load Balancer",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},virtual_mediator:{id:At.virtual_mediator,name:"Virtual - Mediator",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},test:{id:At.test,name:"Test LLM",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1}},Dt={...ct,...Ot};function St(e){if(!e||e.provider!==It.vertexai)return;const t=e.settings?.bucket_access_principal;return"string"==typeof t&&t.trim().length>0?t.trim():void 0}const Rt="id name tags description properties clearance compartments",kt="members";function $t(e){return e.startsWith("*.")?e.slice(2):e}function Ct(e){if("string"!=typeof e)return;let t=e.trim().toLowerCase();if(t){t=$t(t),t=t.endsWith(".")?t.slice(0,-1):t,t.includes("://")||(t=function(e){const t=e.indexOf(":");return t>=0&&e.indexOf(":",t+1)>=0&&!e.startsWith("[")}(t)?`https://[${t}]`:`https://${t}`);try{let e=$t(function(e){return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e}(new URL(t).hostname.toLowerCase()));return e=e.endsWith(".")?e.slice(0,-1):e,e&&!function(e){return e.includes(" ")||e.includes("\t")||e.includes("\n")||e.includes("\r")||e.includes("\f")||e.includes("\v")}(e)?e:void 0}catch{return}}}function Lt(e,t){try{return Ct((t?new URL(e,t):new URL(e)).hostname)}catch{return}}function Mt(e){return Array.isArray(e)?Array.from(new Set(e.map(e=>Ct(e)).filter(e=>!!e))):[]}function Ut(e,t){if(!t||0===t.length)return!0;const o=Ct(e);return!!o&&t.some(e=>{const t=Ct(e);return!!t&&(o===t||o.endsWith(`.${t}`))})}function jt(e,t,o){if(!t||0===t.length)return!0;const i=Lt(e,o);return!!i&&Ut(i,t)}function Pt(e){const t=Ct(e);return!!t&&("localhost"===t||"127.0.0.1"===t||"::1"===t||"vertesia.io"===t||t.endsWith(".vertesia.io"))}function Gt(e){return Pt(Lt(e))}var qt,Wt;function Ft(e,t){return{...t,integration:e}}!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"}(qt||(qt={})),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"}(Wt||(Wt={}));const Bt="openid",Yt="profile",Ht="offline_access",Kt=[Bt,Yt,Ht],Vt=new Set([e.api_key_secret_read,e.manage_billing,e.billing_read,e.iam_impersonate,e.studio_access]),zt=Object.values(e).filter(e=>!Vt.has(e)),Jt=new Set(Kt),Qt=new Set(zt),Zt=/^[0-9a-f]{24}$/i,Xt="project:";function eo(){return[...zt]}function to(e){return Jt.has(e)}function oo(e){return Qt.has(e)}function io(e){return to(e)||oo(e)}function no(e){return!!e.startsWith(Xt)&&Zt.test(e.slice(8))}function ro(e){return`${Xt}${e}`}function ao(e){return e.includes(Bt)}function so(e){return e.includes(Yt)}function uo(e){return e.includes(Ht)}function po(e){return ao(e)?[...e]:e.filter(e=>e!==Yt)}function co(e){return e.filter(oo)}class lo{parent;parentUnits;spanUnits;unitsDone;constructor(e,t,o){this.parent=e,this.parentUnits=t,this.spanUnits=o,this.unitsDone=0}done(e){const 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}}class mo{total;unitsDone=0;constructor(e){this.total=e}get fraction(){return this.unitsDone/this.total}get percent(){return Math.round(100*this.fraction)}get isDone(){return this.unitsDone>=this.total}done(e){const t=this.total-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e)}span(e,t){return new lo(this,e,t||e)}}var _o,go,fo;function ho(e,t){switch(t){case _o.owner:return!0;case _o.admin:return e!==_o.billing&&e!==_o.owner;case _o.developer:return e===_o.developer;case _o.billing:return e===_o.billing;default:return!1}}!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"}(_o||(_o={})),function(e){e.public="public",e.account="account",e.project="project"}(go||(go={})),function(e){e.content_type="content_type",e.intake="intake",e.analysis="analysis",e.agent="agent",e.non_applicable="non_applicable"}(fo||(fo={}));const bo={ExtractInformation:fo.intake,SelectDocumentType:fo.intake,GenerateMetadataModel:fo.content_type,ChunkDocument:fo.intake,IdentifyTextSections:fo.intake,AnalyzeDocument:fo.analysis,ReduceTextSections:fo.analysis,GenericAgent:fo.non_applicable,AdhocTaskAgent:fo.non_applicable,Mediator:fo.non_applicable,AnalyzeConversation:fo.analysis,GetAgentConversationTopic:fo.analysis,StudioAssistant:fo.agent};function vo(e){e.startsWith("sys:")&&(e=e.substring(4));const t=bo[e];if(t!==fo.non_applicable)return t||void 0}const yo={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};var xo,Eo;!function(e){e.text="text",e.image="image",e.properties="properties"}(xo||(xo={})),function(e){e.full_text="full_text"}(Eo||(Eo={}));const To={...xo,...Eo},wo="id name account";function No(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 Ao={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"};var Io,Oo,Do,So;!function(e){e.draft="draft",e.published="published",e.archived="archived"}(Io||(Io={})),function(e){e.chat="chat",e.template="template"}(Oo||(Oo={})),function(e){e.jst="jst",e.handlebars="handlebars",e.text="text"}(Do||(Do={})),function(e){e.project="Project",e.projects="Projects",e.environment="Environment",e.user="User",e.account="Account",e.interaction="Interaction",e.userGroup="UserGroup"}(So||(So={}));class Ro{name;permissions;constructor(e,t){this.name=e,this.permissions=new Set(t)}hasPermission(e){return this.permissions.has(e)}}class ko{roles;constructor(e){this.roles=e}static fromRoleNames(e){const t=e.map(e=>jo(e));return new ko(t)}static fromRoleName(e){const t=[jo(e)];return new ko(t)}hasPermission(e){return this.roles.some(t=>t.hasPermission(e))}}class $o extends Ro{name;constructor(t,o){super(t,[e.account_member,...o]),this.name=t}}class Co extends $o{constructor(){super(_o.developer,Object.values(e)),this.permissions.delete(e.account_admin),this.permissions.delete(e.project_admin),this.permissions.delete(e.project_settings_write),this.permissions.delete(e.env_admin),this.permissions.delete(e.manage_billing),this.permissions.delete(e.audit_read),this.permissions.delete(e.agent_run_read),this.permissions.delete(e.content_read_all),this.permissions.delete(e.content_superadmin),this.permissions.delete(e.workflow_superadmin)}}const Lo=[e.studio_access,e.account_read,e.project_integration_read,e.api_key_read,e.billing_read,e.audit_read,e.int_read,e.run_read,e.content_read,e.content_read_all,e.task_read,e.workflow_read,e.agent_run_read];class Mo extends $o{constructor(e){super(e,Lo)}}const Uo={[_o.owner]:new class extends $o{constructor(){super(_o.owner,Object.values(e))}},[_o.admin]:new class extends $o{constructor(){super(_o.admin,Object.values(e))}},[_o.manager]:new class extends $o{constructor(){super(_o.manager,Object.values(e)),this.permissions.delete(e.account_admin),this.permissions.delete(e.manage_billing),this.permissions.delete(e.audit_read),this.permissions.delete(e.agent_run_read),this.permissions.delete(e.content_read_all),this.permissions.delete(e.content_superadmin),this.permissions.delete(e.workflow_superadmin)}},[_o.developer]:new Co,[_o.application]:new class extends $o{constructor(){super(_o.application,[e.int_read,e.int_execute,e.int_write,e.run_read,e.content_write,e.content_read,e.content_write,e.content_admin,e.project_admin,e.workflow_run,e.project_settings_write,e.account_write])}},[_o.automation]:new class extends $o{constructor(){super(_o.automation,[e.content_read,e.content_write,e.content_admin,e.int_read,e.int_execute,e.run_read,e.workflow_run,e.project_integration_read])}},[_o.content_processor]:new class extends $o{constructor(){super(_o.content_processor,[e.content_read,e.content_write,e.content_admin,e.content_superadmin,e.int_execute,e.workflow_read,e.workflow_run,e.run_read])}},[_o.consumer]:new class extends $o{constructor(){super(_o.consumer,[e.content_admin,e.content_read,e.content_write,e.content_delete,e.int_read,e.int_execute,e.run_read,e.workflow_run])}},[_o.executor]:new class extends $o{constructor(){super(_o.executor,[e.int_execute,e.run_read,e.workflow_run])}},[_o.reader]:new class extends $o{constructor(){super(_o.reader,[e.int_read,e.run_read,e.content_read])}},[_o.auditor]:new Mo(_o.auditor),[_o.support]:new Mo(_o.support),[_o.billing]:new class extends $o{constructor(){super(_o.billing,[e.manage_billing])}},[_o.app_member]:new class extends $o{constructor(){super(_o.app_member,[e.int_read,e.int_execute,e.int_write,e.run_read,e.content_write,e.content_read,e.content_delete,e.workflow_run])}},[_o.member]:new $o(_o.member,[]),[_o.content_superadmin]:new class extends Co{constructor(){super(),this.name=_o.content_superadmin,this.permissions.add(e.content_superadmin)}}};function jo(e){const t=Uo[e];if(!t)throw new Error(`Role ${e} not found`);return t}function Po(){return Object.values(Uo)}function Go(e){const t=new Set;for(const o of e){const e=jo(o);for(const o of e.permissions)t.add(o)}return Array.from(t)}var qo;function Wo(e){return`agents/${e}/tool-input-refs.json`}function Fo(e,t){const o=e?.agent_run_id||t;return e?.launch_id&&e?.agent_run_id?`${o}/workstreams/${e.launch_id}`:o}function Bo(e){return"steps"in e&&e.steps?{...e,spec_format:"steps"}:{...e,spec_format:"activities"}}!function(e){e.active="active",e.archived="archived"}(qo||(qo={}));const Yo="id name description tags created_at updated_at",Ho={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"]},Ko={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"]},Vo=1,zo="https://schemas.vertesia.com/process-definition.v1.schema.json",Jo={$id:zo,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 Qo(e){const t=new Set;for(const o of e)t.add(o.id),t.add(o.name),"sys"===o.type&&t.add(`sys:${o.name}`),"app"!==o.type||o.id.startsWith("app:")||t.add(`app:${o.id}`),"stored"!==o.type&&"draft"!==o.type||(t.add(`${o.name}@draft`),t.add(`${o.id}@draft`),"number"==typeof o.version&&(t.add(`${o.name}@${o.version}`),t.add(`${o.id}@${o.version}`)));return[...t]}const Zo=1048576,Xo=64,ei=4096;function ti(e,t={}){const o=oi(e,t);if(!o.valid)throw new Error(o.errors.join("; "))}function oi(e,t={}){const o=[],i=function(e){return{options:e,knownTools:e.knownTools?new Set(e.knownTools):void 0,knownInteractions:e.knownInteractions?new Set(e.knownInteractions):void 0}}(t);(new TextEncoder).encode(JSON.stringify(e)).length>Zo&&o.push("process definition exceeds 1048576 bytes"),e.process||o.push("process is missing"),1!==e.format_version&&o.push("format_version must be 1"),e.initial||o.push("initial node is missing"),e.nodes&&0!==Object.keys(e.nodes).length?e.initial&&!e.nodes[e.initial]&&o.push(`initial node "${e.initial}" does not exist`):o.push("nodes are missing"),e.context?.schema||o.push("context.schema is missing"),e.context?.initial||o.push("context.initial is missing");for(const[t,n]of Object.entries(e.nodes??{}))ii(e,t,n,o,i);return{valid:0===o.length,errors:o}}function ii(e,t,o,i,n){var r;if("tool"!==(r=o.type)&&"interaction"!==r&&"agent"!==r&&"process"!==r&&"human_task"!==r&&"foreach"!==r&&"branch"!==r&&"condition"!==r&&"final"!==r&&i.push(`node "${t}" has invalid type "${String(o.type)}"`),"human_task"===o.type&&(o.task?o.task.title?Array.isArray(o.task.fields)||i.push(`human_task node "${t}" task fields must be an array`):i.push(`human_task node "${t}" task title is missing`):i.push(`human_task node "${t}" is missing task`)),"tool"===o.type&&function(e,t,o,i){if(!t.tool)return void o.push(`tool node "${e}" is missing tool`);i.knownTools&&!i.knownTools.has(t.tool)&&o.push(`tool node "${e}" references unknown tool "${t.tool}"`);"set_context"===t.tool&&function(e,t,o){const i=t.input;if(!ci(i))return void o.push(`tool node "${e}" set_context input must be an object`);for(const t of Object.keys(i))"updates"!==t&&"reason"!==t&&"event_id"!==t&&o.push(`tool node "${e}" set_context input has unsupported property "${t}"`);if(!ci(i.updates))return void o.push(`tool node "${e}" set_context input.updates must be an object`);void 0!==i.reason&&"string"!=typeof i.reason&&o.push(`tool node "${e}" set_context input.reason must be a string`);void 0!==i.event_id&&"string"!=typeof i.event_id&&o.push(`tool node "${e}" set_context input.event_id must be a string`);!function(e,t,o,i){const n=Object.keys(o);if(0===n.length)return;if(!Array.isArray(t.writes)||0===t.writes.length)return void i.push(`tool node "${e}" set_context updates require declared writes`);for(const o of n)o.startsWith("_")&&i.push(`tool node "${e}" set_context cannot write reserved context field "${o}"`),ni(o,t.writes)||i.push(`tool node "${e}" set_context updates "${o}" but writes does not allow it`)}(e,t,i.updates,o)}(e,t,o)}(t,o,i,n),("interaction"===o.type||"agent"===o.type)&&o.interaction&&n.knownInteractions&&(function(e,t){if(t.has(e))return!0;if(!e.includes("@"))return!1;return t.has(e.slice(0,e.lastIndexOf("@")))}(o.interaction,n.knownInteractions)||i.push(`${o.type} node "${t}" references unknown interaction "${o.interaction}"`)),"interaction"!==o.type&&"agent"!==o.type||void 0===o.result_schema||ci(o.result_schema)||i.push(`${o.type} node "${t}" result_schema must be a JSON Schema object`),"process"===o.type&&(o.process||o.process_definition||i.push(`process node "${t}" is missing process or process_definition`),o.run_type&&!function(e){return"supervised"===e||"programmatic"===e}(o.run_type)&&i.push(`process node "${t}" has invalid run_type "${String(o.run_type)}"`),void 0!==o.returns?.from&&"string"!=typeof o.returns.from&&i.push(`process node "${t}" returns.from must be a string`),void 0===o.returns?.context||function(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)}(o.returns.context)||i.push(`process node "${t}" returns.context must be an array of strings`),o.process_definition)){const e=oi(o.process_definition,n.options);for(const o of e.errors)i.push(`process node "${t}" process_definition: ${o}`)}if("foreach"===o.type&&(o.foreach||i.push(`foreach node "${t}" is missing foreach`),o.node||i.push(`foreach node "${t}" is missing node`),void 0!==o.max_concurrency&&(!Number.isInteger(o.max_concurrency)||o.max_concurrency<1)&&i.push(`foreach node "${t}" max_concurrency must be a positive integer`),void 0!==o.item_id&&"string"!=typeof o.item_id&&i.push(`foreach node "${t}" item_id must be a string`),ui("foreach",t,o.collect,i),o.node&&si(e,{ownerLabel:`foreach node "${t}"`,childPath:`${t}.node`,childLabel:`foreach node "${t}" child node`,child:o.node},i,n)),"branch"===o.type){Array.isArray(o.branches)&&0!==o.branches.length||i.push(`branch node "${t}" must define at least one branch`),void 0!==o.join&&"all"!==o.join&&i.push(`branch node "${t}" join must be "all"`),ui("branch",t,o.collect,i);const r=function(e){return"branch"===e.type&&Array.isArray(e.branches)?e.branches.filter(mi):[]}(o),a=new Set;for(const[o,s]of r.entries())s.id?a.has(s.id)?i.push(`branch node "${t}" has duplicate branch id "${s.id}"`):a.add(s.id):i.push(`branch node "${t}" branch at index ${o} is missing id`),s.node?si(e,{ownerLabel:`branch node "${t}" branch "${s.id||o}"`,childPath:`${t}.branches.${o}.node`,childLabel:`branch node "${t}" branch "${s.id||o}" child node`,child:s.node},i,n):i.push(`branch node "${t}" branch "${s.id||o}" is missing node`)}o.failure_policy&&!function(e){return"fail_fast"===e||"collect_errors"===e}(o.failure_policy)&&i.push(`node "${t}" has invalid failure_policy "${String(o.failure_policy)}"`);for(const n of o.transitions??[])e.nodes[n.to]||i.push(`node "${t}" has transition to "${n.to}" which does not exist`),n.trigger&&!ai(n.trigger)&&i.push(`node "${t}" has invalid transition trigger "${n.trigger}"`),"string"==typeof n.guard?i.push(`node "${t}" transition to "${n.to}" guard must be a JSON Logic object`):n.guard&&pi(`node "${t}" transition to "${n.to}" guard`,n.guard,i);for(const[n,r]of function(e){return"condition"===e.type&&Array.isArray(e.branches)?e.branches.filter(li):[]}(o).entries())ri(r,"condition")&&i.push(`node "${t}" branch at index ${n} uses string condition; use JSON Logic in "when" instead`),ri(r,"guard")&&i.push(`node "${t}" branch at index ${n} uses string guard; use JSON Logic in "when" instead`),e.nodes[r.to]||i.push(`node "${t}" has branch to "${r.to}" which does not exist`),"string"==typeof r.when?i.push(`node "${t}" branch to "${r.to}" when must be a JSON Logic object`):r.when&&pi(`node "${t}" branch to "${r.to}" guard`,r.when,i)}function ni(e,t){return t.some(t=>e===t||e.startsWith(`${t}.`))}function ri(e,t){return ci(e)&&"string"==typeof e[t]}function ai(e){return"auto"===e||"agent"===e||"user"===e}function si(e,t,o,i){const{ownerLabel:n,childPath:r,childLabel:a,child:s}=t;var u;"tool"===(u=s.type)||"interaction"===u||"agent"===u||"process"===u?((s.transitions??[]).length>0&&o.push(`${a} must not define transitions`),(s.branches??[]).length>0&&o.push(`${a} must not define branches`),ii(e,r,{...s,transitions:void 0,branches:void 0},o,i)):o.push(`${n} has unsupported child node type "${String(s.type)}"`)}function ui(e,t,o,i){if(void 0!==o)if("string"!=typeof o)if(ci(o)){if("string"==typeof o.into&&o.into||i.push(`${e} node "${t}" collect.into is required`),void 0!==o.mode&&"array"!==o.mode&&i.push(`${e} node "${t}" collect.mode must be "array"`),void 0!==o.include){if(!Array.isArray(o.include))return void i.push(`${e} node "${t}" collect.include must be an array`);for(const n of o.include)"string"==typeof n&&di(n)||i.push(`${e} node "${t}" collect.include has invalid field "${String(n)}"`)}}else i.push(`${e} node "${t}" collect must be a string or object`);else o||i.push(`${e} node "${t}" collect must not be empty`)}function di(e){return"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"===e}function pi(e,t,o){const i=function(e){let t=0,o=0;const i=[{value:e,depth:1}];for(;i.length>0;){const e=i.pop();if(e){if(o+=1,t=Math.max(t,e.depth),o>ei||t>64)break;if(Array.isArray(e.value))for(const t of e.value)i.push({value:t,depth:e.depth+1});else if(ci(e.value))for(const t of Object.values(e.value))i.push({value:t,depth:e.depth+1})}}return{depth:t,nodes:o}}(t);i.depth>64&&o.push(`${e} exceeds maximum depth 64`),i.nodes>ei&&o.push(`${e} exceeds maximum node count 4096`)}function ci(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}function li(e){return"to"in e}function mi(e){return"node"in e}var _i,gi,fi,hi,bi;function vi(e){return"objectIds"===e.input?.inputType?e.input.objectIds:e.objectIds?e.objectIds:[]}function yi(e){const t=e.details;return e.type===bi.THOUGHT&&!!t&&"object"==typeof t&&"string"==typeof t.tool}function xi(e){const t=e.details;return e.type===bi.UPDATE&&!!t&&"object"==typeof t&&("document_created"===t.event_class||"document_updated"===t.event_class)&&"string"==typeof t.document_id}function Ei(e){const t=e.details;return e.type===bi.SYSTEM&&!!t&&"object"==typeof t&&"file_processing"===t.system_type&&Array.isArray(t.files)}function Ti(e){const t=e.details;return e.type===bi.PLAN&&!!t&&"object"==typeof t&&Array.isArray(t.plan)}function wi(e){return e.type===bi.REQUEST_INPUT&&!!e.details&&"object"==typeof e.details}function Ni(e){return"object"==typeof e&&null!==e&&"t"in e}function Ai(e){return"object"==typeof e&&null!==e&&"type"in e&&!("t"in e)}!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||(_i={})),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"}(gi||(gi={})),function(e){e.ACTIVITY="activity",e.CHILD_WORKFLOW="childWorkflow",e.SIGNAL="signal",e.TIMER="timer"}(fi||(fi={})),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"}(hi||(hi={})),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"}(bi||(bi={}));const Ii={system:bi.SYSTEM,thought:bi.THOUGHT,plan:bi.PLAN,update:bi.UPDATE,complete:bi.COMPLETE,warning:bi.WARNING,error:bi.ERROR,answer:bi.ANSWER,question:bi.QUESTION,request_input:bi.REQUEST_INPUT,idle:bi.IDLE,terminated:bi.TERMINATED,streaming_chunk:bi.STREAMING_CHUNK,batch_progress:bi.BATCH_PROGRESS},Oi={0:bi.SYSTEM,1:bi.THOUGHT,2:bi.PLAN,3:bi.UPDATE,4:bi.COMPLETE,5:bi.WARNING,6:bi.ERROR,7:bi.ANSWER,8:bi.QUESTION,9:bi.REQUEST_INPUT,10:bi.IDLE,11:bi.TERMINATED,12:bi.STREAMING_CHUNK,13:bi.BATCH_PROGRESS};function Di(e){return"number"==typeof e?Oi[e]??bi.UPDATE:"string"==typeof e?Ii[e]??bi.UPDATE:bi.UPDATE}function Si(e){const t={t:Di(e.type)};if(e.message&&(t.m=e.message),e.workstream_id&&"main"!==e.workstream_id&&(t.w=e.workstream_id),e.timestamp&&(t.ts=e.timestamp),t.t===bi.STREAMING_CHUNK&&e.details){e.details.is_final&&(t.f=1)}else e.details&&(t.d=e.details);return t}function Ri(e){const t="string"==typeof e?JSON.parse(e):e;if(Ni(t))return t;if(Ai(t))return Si(t);throw new Error("Unknown message format")}function ki(e,t={}){const o={t:e};return t.message&&(o.m=t.message),t.workstreamId&&"main"!==t.workstreamId&&(o.w=t.workstreamId),t.details&&(o.d=t.details),t.isFinal&&(o.f=1),t.timestamp&&(o.ts=t.timestamp),o}function $i(e,t=""){const o={type:e.t,timestamp:e.ts||Date.now(),workflow_run_id:t,message:e.m||"",workstream_id:e.w||"main"};return void 0!==e.d&&null!==e.d&&(o.details=e.d),e.t===bi.STREAMING_CHUNK&&(o.details={..."object"==typeof e.d?e.d:{},streaming_id:e.w||"main",is_final:1===e.f,activity_id:e.i}),o}var Ci;function Li(e){return`workflow:${e}:channel`}function Mi(e){return`workflow:${e}:updates`}!function(e){e.UPLOADING="uploading",e.PROCESSING="processing",e.READY="ready",e.ERROR="error"}(Ci||(Ci={}));const Ui="low_priority";function ji(e,t){return`renditions/${e}/${t.max_hw}`}function Pi(e){return"pdf"===e.format||"docx"===e.format}function Gi(e){return e===hi.COMPLETED||e===hi.FAILED||e===hi.CANCELED||e===hi.TERMINATED||e===hi.TIMED_OUT}const qi={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 * *"},Wi={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 Fi,Bi,Yi,Hi;!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"}(Fi||(Fi={})),function(e){e.DATA_STORE_ID="x-data-store-id"}(Bi||(Bi={})),function(e){e.created="created",e.processing="processing",e.ready="ready",e.completed="completed",e.failed="failed",e.archived="archived"}(Yi||(Yi={})),function(e){e.Video="video",e.Image="image",e.Audio="audio",e.Document="document",e.Code="code",e.Other="other"}(Hi||(Hi={}));const Ki="Poster",Vi="Audio",zi="Web",Ji="PDF",Qi={success:"success"};function Zi(e){return e.id}function Xi(e){const t="code"in e?e.code:void 0,o=e.id||t||"",i=e.name||"";return"incode"===e.ref_type||en(o)?{ref_type:"incode",id:o,name:i}:{ref_type:"stored",id:o,name:i}}function en(e){return e.includes(":")}var tn,on,nn;!function(e){e.single="single",e.multiple="multiple",e.none="none"}(tn||(tn={})),function(e){e.jpeg="jpeg",e.png="png",e.webp="webp"}(on||(on={})),function(e){e.docx="docx",e.pdf="pdf"}(nn||(nn={}));const rn={"image/*":[on.jpeg,on.png,on.webp],"video/*":[on.jpeg,on.png],"application/pdf":[on.jpeg,on.png,on.webp],"text/markdown":[nn.pdf,nn.docx],"text/*":[nn.docx],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[nn.pdf],"application/msword":[nn.pdf],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[nn.pdf],"application/vnd.ms-powerpoint":[nn.pdf]};function an(e,t){if(!e)return!1;const o=t,i=rn[e];if(i?.some(e=>e===o))return!0;const[n]=e.split("/"),r=rn[`${n}/*`];return!!r?.some(e=>e===o)}function sn(e){if(!e)return[];if(rn[e])return[...rn[e]];const[t]=e.split("/"),o=rn[`${t}/*`];return o?[...o]:[]}function un(e){return an(e,on.jpeg)}var dn;!function(e){e.normal="normal",e.low="low"}(dn||(dn={}));const pn={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 cn(e){return"apikey"===e.type}function ln(e){return"user"===e.type}function mn(e){return"project"===e.type}function _n(e){return"environment"===e.type}function gn(e){return"agent"===e.type}function fn(e){return"service_account"===e.type}var hn,bn;!function(e){e.created="created",e.building="building",e.prepared="prepared",e.processing="processing",e.completed="completed",e.cancelled="cancelled",e.failed="failed"}(hn||(hn={})),function(e){e.userInvite="user-invite",e.migration="migration"}(bn||(bn={}));const vn="id name email picture";var yn,xn,En;!function(e){e.aws="aws",e.gcp="gcp",e.azure="azure"}(yn||(yn={})),function(e){e.stripe="stripe",e.invoice="invoice"}(xn||(xn={})),function(e){e.vertesia="vertesia",e.partner="partner",e.free="free",e.customer="customer",e.prospect="prospect",e.unknown="unknown"}(En||(En={}));const Tn="id name";function wn(e,t){return`${e.slice(-6)}_${t.slice(-6)}`}function Nn(e){return wn(e.account,e.id)}function An(e){return{name:e.name,description:e.description,input_schema:e.input_schema}}function In(e){return e?e.map(An):e}function On(e){if(!e)return e;if(Array.isArray(e))for(const t of e)On(t);else if("object"==typeof e){const t=e;(function(e){return"document"===e.editor||"document"===e.format||"media"===e.format})(t)&&function(e){e.type||(e.type="string");e.description?"string"!=typeof e.description||e.description.includes(Dn)||(e.description=`${e.description} ${Dn}`):e.description=Dn}(t);for(const[e,o]of Object.entries(t))("editor"!==e||"textarea"!==o&&"document"!==o&&"media"!==o)&&("format"!==e||"textarea"!==o&&"document"!==o&&"media"!==o)?"object"==typeof o&&On(o):delete t[e]}return e}const Dn="Use 'store:<document_id>' format to reference a document from the content store.";function Sn(e){const t={},o=[];for(const i of e)if(i.properties){if(i.required)for(const e of i.required)o.includes(e)||o.push(e);Object.assign(t,i.properties)}return Object.keys(t).length>0?{properties:t,required:o,type:"object"}:null}function Rn(e){const t={},o=new Set;for(const i of e)if(i.template?.inputSchema?.properties){const e=i.template?.inputSchema;if(e.required)for(const t of e.required)o.add(t);Object.assign(t,e.properties)}else i.type===Oo.chat&&(Object.assign(t,{chat:{type:"array",items:{type:"object",properties:{role:{type:"string",enum:[_t.assistant,_t.user]},content:{type:"string"}},required:["role","content"]}}}),o.add("chat"));return Object.keys(t).length>0?{properties:t,required:Array.from(o)}:null}function kn(e){return e.prompts?Rn(e.prompts):null}function $n(e){const t={},o=new Set;for(const i of e)if(i.schema?.properties){const e=i.schema;if(e.required)for(const t of e.required)o.add(t);Object.assign(t,e.properties)}return Object.keys(t).length>0?{properties:t,required:Array.from(o)}:null}var Cn,Ln,Mn,Un;!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"}(Cn||(Cn={})),function(e){e.AgentRunStarted="agent_run_started",e.AgentRunCompleted="agent_run_completed",e.LlmCall="llm_call",e.ToolCall="tool_call"}(Ln||(Ln={})),function(e){e.Start="start",e.ResumeTools="resume_tools",e.ResumeUser="resume_user",e.Checkpoint="checkpoint",e.NestedInteraction="nested_interaction"}(Mn||(Mn={})),function(e){e.Builtin="builtin",e.Interaction="interaction",e.Remote="remote",e.Skill="skill"}(Un||(Un={}));export{Vi as AUDIO_RENDITION_NAME,o as AccessControlPrincipalType,t as AccessControlResourceType,Tn as AccountRefPopulate,En as AccountType,Ln as AgentEventType,bi as AgentMessageType,U as AgentSearchScope,c as ApiKeyTypes,Cn as ApiVersions,I as BILLABLE_AUDIT_ACTIONS,xn as BillingMethod,yo as BrowserUseProjectConfigurationSchema,qi as CRON_PRESETS,Wi as CRON_PRESET_LABELS,qo as CollectionStatus,G as ConfigModes,q as ConfigModesDescription,W as ConfigModesOptions,_i as ContentEventName,Hi as ContentNature,Fi as ContentObjectApiHeaders,dn as ContentObjectProcessingPriority,Yi as ContentObjectStatus,At as CustomProviders,Ot as CustomProvidersList,J as DATA_COLUMN_TYPE_TO_DUCKDB,te as DEFAULT_DASHBOARD_LAYOUT,X as DEFAULT_RETENTION_CONFIG,Dn as DOCUMENT_STORE_HINT,ee as DashboardStatus,B as DataColumnType,Bi as DataStoreApiHeaders,Q as DataStoreStatus,yn as Datacenters,Ko as DocumentPartSchema,P as ExecutionRunRefSelect,$ as ExecutionRunStatus,Ci as FileProcessingStatus,Eo as FullTextType,on as ImageRenditionFormat,Z as ImportStatus,S as InteractionRefPopulate,R as InteractionRefWithSchemaPopulate,k as InteractionStatus,Ui as LOW_PRIORITY_TASK_QUEUE,Mn as LlmCallType,Zo as MAX_PROCESS_DEFINITION_BYTES,Xo as MAX_PROCESS_GUARD_DEPTH,ei as MAX_PROCESS_GUARD_NODES,_ as MCP_COLLECTION_ID_PATTERN,g as MCP_COLLECTION_NAMESPACE_PATTERN,kt as MEMBERS_GROUP_NAME,nn as MarkdownRenditionFormat,Wt as MeterNames,F as ModelSource,Ht as OAUTH_SCOPE_OFFLINE_ACCESS,Bt as OAUTH_SCOPE_OPENID,Yt as OAUTH_SCOPE_PROFILE,Kt as OAUTH_STANDARD_SCOPES,Ji as PDF_RENDITION_NAME,Ki as POSTER_RENDITION_NAME,m as PREFERRED_SECTIONS,Vo as PROCESS_DEFINITION_FORMAT_VERSION,zo as PROCESS_DEFINITION_JSON_SCHEMA_ID,pn as ParentClosePolicy,e as Permission,l as PrincipalType,Jo as ProcessDefinitionBodyJsonSchema,mo as Progress,wo as ProjectRefPopulate,_o as ProjectRoles,Oo as PromptSegmentDefType,Io as PromptStatus,Ho as RenditionSchema,So as ResolvableRefType,go as ResourceVisibility,Ro as Role,ko as RoleList,L as RunDataStorageDescription,C as RunDataStorageLevel,M as RunDataStorageOptions,j as RunSourceTypes,Ao as SUPPORTED_SEARCH_LANGUAGES,bo as SYSTEM_INTERACTION_CATEGORIES,To as SearchTypes,i as SecurityLevel,n as SecurityLevelLabels,Y as SemanticColumnType,xo as SupportedEmbeddingTypes,qt as SupportedIntegrations,It as SupportedProviders,Dt as SupportedProvidersList,fo as SystemInteractionCategory,gi as TaskStatus,fi as TaskType,Un as TelemetryToolType,Do as TemplateType,Qi as TextExtractionStatus,hn as TrainingSessionStatus,bn as TransientTokenType,Rt as UserGroupRefPopulate,vn as UserRefPopulate,zi as WEB_VIDEO_RENDITION_NAME,Yo as WorkflowDefinitionRefPopulate,hi as WorkflowExecutionStatus,tn as WorkflowRuleInputType,Rn as _mergePromptsSchema,No as autoTuneReindexParams,an as canGenerateRendition,ki as createCompactMessage,ro as createOAuthProjectBindingScope,b as deriveMCPCollectionId,x as effectiveAppAccessControl,co as extractOAuthPermissionScopes,H as findEmailChannel,Zi as getContentTypeRefId,Fo as getConversationStorageId,v as getDefaultOAuthAppNameForCollectionId,vi as getDocumentIds,eo as getOAuthPermissionScopes,po as getOAuthScopesWithProfileDependency,Go as getPermissionsForRoles,oi as getProcessDefinitionValidationResult,Qo as getProcessInteractionValidationSelectors,ji as getRenditionsPath,jo as getRoleByName,r as getSecurityLevelLabel,sn as getSupportedRenditionFormats,vo as getSystemInteractionCategory,wn as getTenantId,Nn as getTenantIdFromProject,St as getVertexBucketAccessPrincipal,Li as getWorkflowChannel,Mi as getWorkflowUpdatesKey,K as hasEmailChannel,uo as hasOAuthOfflineAccessScope,ao as hasOAuthOpenIdScope,so as hasOAuthProfileScope,Lt as hostFromUrl,Ut as hostMatchesAny,gn as isAgentRequest,cn as isApiKeyRequest,Ni as isCompactMessage,xi as isDocumentEventMessage,O as isEmailChannel,_n as isEnvironmentRequest,Ei as isFileProcessingMessage,en as isInCodeType,D as isInteractiveChannel,Ai as isLegacyMessage,Pt as isLocalhostOrVertesiaHost,Gt as isLocalhostOrVertesiaUrl,Pi as isMarkdownRenditionVars,oo as isOAuthPermissionScope,no as isOAuthProjectBindingScope,to as isOAuthStandardScope,io as isOAuthSupportedScope,Ti as isPlanMessage,mn as isProjectRequest,wi as isRequestInputMessage,ho as isRoleIncludedIn,fn as isServiceAccountRequest,yi as isToolCallMessage,ln as isUserRequest,T as isValidEndpointOverrideEnv,f as isValidMCPCollectionId,h as isValidMCPCollectionNamespace,Gi as isWorkflowTerminalStatus,Po as listRoles,$n as mergeInCodePromptSchemas,Sn as mergeJSONSchemas,kn as mergePromptsSchema,Ct as normalizeHost,Mt as normalizeHostList,Di as normalizeMessageType,y as normalizeToolCollection,Ri as parseMessage,On as removeExtraProperties,d as renderAgentRequestFallback,p as renderAgentRequestMessage,u as renderAgentRequestTemplate,N as resolveAppEndpoint,A as resolveManifestUrls,An as sanitizeToolDefinition,In as sanitizeToolDefinitions,w as substituteEndpoints,Et as supportsToolUse,un as supportsVisualRendition,$i as toAgentMessage,Si as toCompactMessage,Wo as toolInputRefsArtifactPath,V as updateEmailChannel,z as updateEmailThreading,jt as urlMatchesAnyHost,ti as validateProcessDefinitionBody,Xi as withContentObjectTypeRefDiscriminator,Bo as withDSLWorkflowSpecDiscriminator,Ft as withProjectIntegrationDiscriminator};
|
|
1
|
+
var e,t,o,i;!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"}(e||(e={})),function(e){e.project="project",e.environment="environment",e.account="account",e.interaction="interaction",e.app="application",e.content_set="content_set"}(t||(t={})),function(e){e.user="user",e.group="group",e.apikey="apikey",e.principal_set="principal_set"}(o||(o={})),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||(i={}));const n=["Public","Internal","Confidential","Restricted","Secret"];function r(e){return n[e]??"Unknown"}function a(e,t){return"."===t||"json"===t?e:t.split(".").reduce((e,t)=>{return Array.isArray(e)&&/^\d+$/.test(t)?e[Number(t)]:(o=e)&&"object"==typeof o&&!Array.isArray(o)?e[t]:void 0;var o},e)}function s(e){if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)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,o)=>s(a(t,o)))}function d(e){return"string"==typeof e?e:null==e?"":s(e)}function p(e,t){const o=e?.trim();if(!o)return d(t);return u(o,t).trim()}var c,l;!function(e){e.secret="sk"}(c||(c={})),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"}(l||(l={}));const m=["default","footer","settings"],_=/^[a-z0-9]+(?:_[a-z0-9]+)*$/,g=/^[a-z0-9]+(?:_[a-z0-9]+)*$/;function f(e){return _.test(e)}function h(e){return g.test(e)}function b(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").replace(/_+/g,"_")}function v(e){return e.replace(/_/g,"-")}function y(e,t){if(!e||"object"!=typeof e)throw new TypeError("Tool collection must be an object");const o=t&&e.url?A(e.url,t):e.url,i=o!==e.url;if("mcp"===e.type){const t=b(e.id||e.name||e.url);if(i||!e.id)return{...e,url:o,id:e.id||t}}else if(i)return{...e,url:o};return e}function x(e,t){return e?.access_control??t?.access_control??"all"}const E=new Set(["production","preview","staging"]);function T(e){return!!e&&!E.has(e.toLowerCase())}function A(e,t){return e&&t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,o)=>{const i=t[o];return"string"==typeof i&&i?function(e){let t=e.length;for(;t>0&&"/"===e[t-1];)t--;return t===e.length?e:e.slice(0,t)}(i):e}):e}function N(e,t,o,i){let n;return n=i&&e.endpoint_overrides?.[i]&&T(i)?e.endpoint_overrides[i]:t&&e.endpoint_overrides?.[t]&&T(t)?e.endpoint_overrides[t]:e.endpoint,n?A(n,o):n}function I(e,t,o,i){if(!e)return;if(e.endpoint){const n=N(e,t,o,i);n&&n!==e.endpoint&&(e.endpoint=n)}const n=e.tool_collections;if(n&&Array.isArray(n))for(let e=0;e<n.length;e++){const t=n[e];if(t&&"object"==typeof t&&t.url){const e=A(t.url,o);e!==t.url&&(t.url=e)}}}const O=["inference","embedding","image_generation"];function w(e){return"email"===e.type}function D(e){return"interactive"===e.type}const S="id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts",R=`${S} result_schema`;var k,C,$,L;!function(e){e.draft="draft",e.published="published",e.archived="archived",e.code="code",e.unknown="unknown"}(k||(k={})),function(e){e.created="created",e.processing="processing",e.completed="completed",e.failed="failed"}(C||(C={})),function(e){e.STANDARD="STANDARD",e.RESTRICTED="RESTRICTED",e.DEBUG="DEBUG"}($||($={})),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."}(L||(L={}));const M={[$.STANDARD]:L.STANDARD,[$.RESTRICTED]:L.RESTRICTED,[$.DEBUG]:L.DEBUG};var U,j;!function(e){e.Collection="collection"}(U||(U={})),function(e){e.api="api",e.cli="cli",e.ui="ui",e.webhook="webhook",e.test="test-data",e.system="system",e.schedule="schedule"}(j||(j={}));const P="-result -parameters -result_schema -prompt";var G,q;!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"}(G||(G={})),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."}(q||(q={}));const W={[G.RUN_AND_INTERACTION_CONFIG]:q.RUN_AND_INTERACTION_CONFIG,[G.RUN_CONFIG_ONLY]:q.RUN_CONFIG_ONLY,[G.INTERACTION_CONFIG_ONLY]:q.INTERACTION_CONFIG_ONLY};var F,B,Y;function H(e){return e?.find(w)}function K(e){return!!H(e)}function V(e,t){const o=e||[],i=o.findIndex(w);if(-1===i)return t.to_email?[...o,{type:"email",...t}]:o;const n=[...o];return n[i]={...n[i],...t,type:"email"},n}function z(e,t,o){const i=H(e);if(!i)return e||[];const n=i.references?[...i.references]:[];return n.includes(t)||n.push(t),V(e,{in_reply_to:t,references:n,thread_subject:o||i.thread_subject})}!function(e){e.config="config",e.interaction="interaction",e.environmentDefault="environmentDefault",e.projectSystemDefault="projectSystemDefault",e.projectBaseDefault="projectBaseDefault",e.projectModalityDefault="projectModalityDefault",e.projectLegacyDefault="projectLegacyDefault"}(F||(F={})),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"}(B||(B={})),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"}(Y||(Y={}));const J={[B.STRING]:"VARCHAR",[B.INTEGER]:"INTEGER",[B.BIGINT]:"BIGINT",[B.FLOAT]:"FLOAT",[B.DOUBLE]:"DOUBLE",[B.DECIMAL]:"DECIMAL(18,4)",[B.BOOLEAN]:"BOOLEAN",[B.DATE]:"DATE",[B.TIMESTAMP]:"TIMESTAMP",[B.JSON]:"JSON"};var Q,Z;!function(e){e.CREATING="creating",e.ACTIVE="active",e.ERROR="error",e.ARCHIVED="archived"}(Q||(Q={})),function(e){e.PENDING="pending",e.PROCESSING="processing",e.COMPLETED="completed",e.FAILED="failed",e.ROLLED_BACK="rolled_back"}(Z||(Z={}));const X={retention_days:30,snapshots_exempt:!0};var ee;!function(e){e.ACTIVE="active",e.ARCHIVED="archived"}(ee||(ee={}));const te={columns:2,cellWidth:600,cellHeight:400,padding:20},oe={"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}},ie={"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}},ne={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 re(e){const t=e.toLowerCase();if(t in oe)return oe[t];let o;for(const e of Object.keys(ie))t.startsWith(e)&&(!o||e.length>o.length)&&(o=e);return o?ie[o]:ne}const ae={"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}},se={"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}},ue=["image","vision"],de=["video"],pe=["audio"],ce=["text"],le=["image"],me=["video"],_e=["audio"],ge=["text"],fe=["embed"],he=["tool","gpt-4","gpt-4o","o1","o3","o4","llama-3","mistral-large","mistral-small","jamba","cohere","command","grok"];function be(e,t){return t.some(t=>e.includes(t))}function ve(e,t){return t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.startsWith("o4")?e:{...e,tool_support:!1,tool_support_streaming:!1}}const ye={},xe={"meta.llama3-1-70b-instruct-v1:0":{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},"meta.llama3-1-8b-instruct-v1:0":{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}},Ee={"ai21.jamba-instruct-v1:0":{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},"amazon.nova-canvas-v1:0":{input:{text:!0,image:!0,video:!1,audio:!1,embed:!1},output:{image:!0,text:!1,video:!1,audio:!1,embed:!1},tool_support:!1,tool_support_streaming:!1},"amazon.nova-micro-v1:0":{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},"anthropic.claude-3-5-haiku-20241022-v1:0":{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},"meta.llama3-2-11b-instruct-v1:0":{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},"meta.llama3-2-90b-instruct-v1:0":{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}},Te={"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},"amazon.nova":{input:{text:!0,image:!0,video:!0,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!0},"amazon.titan":{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},"anthropic.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:!1},"anthropic.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},"cohere.command-r":{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:!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},"meta.llama3-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},"meta.llama3-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},"meta.llama3-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:!1,tool_support_streaming:!1},"meta.llama3":{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},"meta.llama4":{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},"mistral.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.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},"mistral.mixtral":{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.pixtral":{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},"openai.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:!1,tool_support_streaming:!1},"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:!1,tool_support_streaming:!1},"twelvelabs.":{input:{text:!0,image:!1,video:!0,audio:!1,embed:!1},output:{text:!0,image:!1,video:!1,audio:!1,embed:!1},tool_support:!0,tool_support_streaming:!1},"writer.palmyra":{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}};const Ae=["image"],Ne=["video"],Ie=["audio"],Oe=["text"],we=["image"],De=["video"],Se=["audio"],Re=["text"],ke=["embed"],Ce=["tool","sonnet","opus","nova","palmyra","command-r","mistral-large","pixtral"];function $e(e,t){return t.some(t=>e.includes(t))}function Le(e){const t=e.toLowerCase();let o=t;if(/^arn:aws:bedrock:[^:]+:[^:]*:(inference-profile|foundation-model)\/.+/i.test(t)){const e=t.lastIndexOf("foundation-model/"),i=t.lastIndexOf("inference-profile/");-1!==e?o=t.substring(e):-1!==i&&(o=t.substring(i))}const i=o.startsWith("inference-profile/"),n=o.startsWith("foundation-model/"),r=function(e){const t=e.toLowerCase(),o=t.lastIndexOf("/");let i=-1===o?t:t.slice(o+1);return t.includes("inference-profile/")&&(i=i.replace(/^[^.]+\./,"")),i}(o);if(n){const e=ye[r];if(e)return e}else if(i){const e=xe[r];if(e)return e}const a=Ee[r];if(a)return a;const s=function(e,t){let o;for(const i of Object.keys(t))e.startsWith(i)&&(!o||i.length>o.length)&&(o=i);return o?t[o]:void 0}(r,Te);if(s)return s;const u=function(e){const t=e.toLowerCase();if(t.includes("inference-profile")){const e=t.split("/");if(e.length>1){const t=e[e.length-1],o=t.split(".");return o.length>1&&"deepseek"===o[1]?`deepseek-${o.slice(2).join(".")}`:o.length>2?o.slice(2).join("."):t}}return t}(r);return{input:{text:$e(u,Oe)||void 0,image:$e(u,Ae)||void 0,video:$e(u,Ne)||void 0,audio:$e(u,Ie)||void 0,embed:!1},output:{text:$e(u,Re)||void 0,image:$e(u,we)||void 0,video:$e(u,De)||void 0,audio:$e(u,Se)||void 0,embed:$e(u,ke)||void 0},tool_support:$e(u,Ce)||void 0}}const Me={"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}},Ue={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:!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},"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}},je=["image"],Pe=["video"],Ge=["audio"],qe=["text"],We=["image"],Fe=["video"],Be=["audio"],Ye=["text"],He=["embed"],Ke=["tool","gpt","gpt-5","o1","o3","o4"];function Ve(e,t){return t.some(t=>e.includes(t))}function ze(e){const t=e.toLowerCase();const o=Me[t];if(o)return{...o,tool_support_streaming:o.tool_support_streaming??o.tool_support};let i,n=0;for(const e of Object.keys(Ue))t.startsWith(e)&&e.length>n&&(i=e,n=e.length);if(i){const e=Ue[i];return{...e,tool_support_streaming:e.tool_support_streaming??e.tool_support}}const r={text:Ve(t,qe)||void 0,image:Ve(t,je)||void 0,video:Ve(t,Pe)||void 0,audio:Ve(t,Ge)||void 0,embed:!1},a={text:Ve(t,Ye)||void 0,image:Ve(t,We)||void 0,video:Ve(t,Fe)||void 0,audio:Ve(t,Be)||void 0,embed:Ve(t,He)||void 0},s=Ve(t,Ke)||void 0;return{input:r,output:a,tool_support:s,tool_support_streaming:s}}const Je={"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}},Qe={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}},Ze=["image"],Xe=["video"],et=["audio"],tt=["text"],ot=["image"],it=["video"],nt=["audio"],rt=["text"],at=["embed"],st=["tool","sonnet","opus","gemini","claude"];function ut(e,t){return t.some(t=>e.includes(t))}function dt(e){const t=function(e){const t=e.toLowerCase().split("/");return t[t.length-1]}(e),o=Je[t];if(o)return o;let i,n=0;for(const e of Object.keys(Qe))t.startsWith(e)&&e.length>n&&(i=e,n=e.length);if(i)return Qe[i];return{input:{text:ut(t,tt)||void 0,image:ut(t,Ze)||void 0,video:ut(t,Xe)||void 0,audio:ut(t,et)||void 0,embed:!1},output:{text:ut(t,rt)||void 0,image:ut(t,ot)||void 0,video:ut(t,it)||void 0,audio:ut(t,nt)||void 0,embed:ut(t,at)||void 0},tool_support:ut(t,st)||void 0}}var pt;!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.vertexai="vertexai",e.togetherai="togetherai",e.mistralai="mistralai",e.groq="groq",e.watsonx="watsonx",e.xai="xai",e.anthropic="anthropic"}(pt||(pt={}));const ct={openai:{id:pt.openai,name:"OpenAI",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},azure_openai:{id:pt.azure_openai,name:"Azure OpenAI",requiresApiKey:!1,requiresEndpointUrl:!0,supportSearch:!1},azure_foundry:{id:pt.azure_foundry,name:"Microsoft Foundry",requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},huggingface_ie:{id:pt.huggingface_ie,name:"HuggingFace Inference Endpoint",requiresApiKey:!0,requiresEndpointUrl:!0},replicate:{id:pt.replicate,name:"Replicate",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!0},bedrock:{id:pt.bedrock,name:"Amazon Bedrock",requiresApiKey:!1,requiresEndpointUrl:!1,endpointPlaceholder:"region name (eg. us-east-1)",supportSearch:!1},vertexai:{id:pt.vertexai,name:"Google Agent Platform (Vertex AI)",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},togetherai:{id:pt.togetherai,name:"Together AI",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},mistralai:{id:pt.mistralai,name:"Mistral AI",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},groq:{id:pt.groq,name:"Groq Cloud",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},watsonx:{id:pt.watsonx,name:"IBM WatsonX",requiresApiKey:!0,requiresEndpointUrl:!0,supportSearch:!1},xai:{id:pt.xai,name:"xAI (Grok)",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1},openai_compatible:{id:pt.openai_compatible,name:"OpenAI Compatible",requiresApiKey:!0,requiresEndpointUrl:!0,endpointPlaceholder:"https://api.example.com/v1",supportSearch:!1},anthropic:{id:pt.anthropic,name:"Anthropic",requiresApiKey:!0,requiresEndpointUrl:!1,supportSearch:!1}};var lt,mt,_t,gt,ft,ht,bt;function vt(e,t){if(e.startsWith("locations/")){const t=e.split("/");t.length>=3&&(e=t.slice(2).join("/"))}const o=function(e,t){switch(t?.toLowerCase()){case pt.anthropic:return re(e);case pt.vertexai:return dt(e);case pt.openai:return ze(e);case pt.openai_compatible:return xt(e);case pt.bedrock:return Le(e);case pt.azure_foundry:return function(e){const{baseModel:t}=function(e){const t=e.split("::");return 2===t.length?{deploymentName:t[0],baseModel:t[1]}:{deploymentName:e,baseModel:e}}(e),o=t.toLowerCase(),i=ae[o];if(i)return ve(i,o);let n,r=0;for(const e of Object.keys(se))o.startsWith(e)&&e.length>r&&(n=e,r=e.length);if(n)return ve(se[n],o);const a={text:be(o,ce)||!0,image:be(o,ue)||void 0,video:be(o,de)||void 0,audio:be(o,pe)||void 0,embed:!1},s={text:be(o,ge)||!0,image:be(o,le)||void 0,video:be(o,me)||void 0,audio:be(o,_e)||void 0,embed:be(o,fe)||void 0},u=be(o,he)||void 0;return ve({input:a,output:s,tool_support:u,tool_support_streaming:u||void 0},o)}(e);case pt.groq:case pt.togetherai:case pt.mistralai:return xt(e);case pt.xai:return{input:{text:!0,image:e.includes("vision")},output:{text:!0},tool_support:!0,tool_support_streaming:!1};default:return e.startsWith("gpt")?ze(e):e.startsWith("claude")?re(e):e.startsWith("grok")?{input:{text:!0,image:e.includes("vision")},output:{text:!0},tool_support:!0,tool_support_streaming:!1}:e.startsWith("publishers/")?dt(e):e.startsWith("arn:aws")?Le(e):{input:{},output:{}}}}(e,t);return o.input.audio=!1,o.output.audio=!1,o.output.video=!1,o}!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"}(lt||(lt={})),function(e){e.numeric="numeric",e.enum="enum",e.boolean="boolean",e.string_list="string_list"}(mt||(mt={})),function(e){e.safety="safety",e.system="system",e.user="user",e.assistant="assistant",e.negative="negative",e.mask="mask",e.tool="tool"}(_t||(_t={})),function(e){e.text="text",e.image="image"}(gt||(gt={})),function(e){e.Available="available",e.Pending="pending",e.Stopped="stopped",e.Unavailable="unavailable",e.Unknown="unknown",e.Legacy="legacy"}(ft||(ft={})),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"}(ht||(ht={})),function(e){e.running="running",e.succeeded="succeeded",e.failed="failed",e.cancelled="cancelled"}(bt||(bt={}));const yt=["image","embed","moderation","whisper","sora","dall-e","tts"];function xt(e){const t=ze(e);if(void 0!==t.tool_support)return t;const o=e.toLowerCase(),i=yt.some(e=>o.includes(e));return{input:{text:!0},output:{text:!0},tool_support:!i,tool_support_streaming:!i}}function Et(e,t,o=!1){const i=vt(e,t);return o?!!i.tool_support_streaming:!!i.tool_support}var Tt,At,Nt,It;lt.max_tokens,mt.numeric,lt.temperature,mt.numeric,lt.top_p,mt.numeric,lt.top_k,mt.numeric,lt.presence_penalty,mt.numeric,lt.frequency_penalty,mt.numeric,lt.stop_sequence,mt.string_list,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"}(Tt||(Tt={})),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"}(At||(At={})),function(e){e.HIGH="HIGH",e.MEDIUM="MEDIUM",e.LOW="LOW",e.MINIMAL="MINIMAL",e.THINKING_LEVEL_UNSPECIFIED="THINKING_LEVEL_UNSPECIFIED"}(Nt||(Nt={})),function(e){e.virtual_lb="virtual_lb",e.virtual_mediator="virtual_mediator",e.test="test"}(It||(It={}));const Ot={...pt,...It},wt={virtual_lb:{id:It.virtual_lb,name:"Virtual - Load Balancer",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},virtual_mediator:{id:It.virtual_mediator,name:"Virtual - Mediator",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1},test:{id:It.test,name:"Test LLM",requiresApiKey:!1,requiresEndpointUrl:!1,supportSearch:!1}},Dt={...ct,...wt};function St(e){if(!e||e.provider!==Ot.vertexai)return;const t=e.settings?.bucket_access_principal;return"string"==typeof t&&t.trim().length>0?t.trim():void 0}const Rt="id name tags description properties clearance compartments",kt="members";function Ct(e){return e.startsWith("*.")?e.slice(2):e}function $t(e){if("string"!=typeof e)return;let t=e.trim().toLowerCase();if(t){t=Ct(t),t=t.endsWith(".")?t.slice(0,-1):t,t.includes("://")||(t=function(e){const t=e.indexOf(":");return t>=0&&e.indexOf(":",t+1)>=0&&!e.startsWith("[")}(t)?`https://[${t}]`:`https://${t}`);try{let e=Ct(function(e){return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e}(new URL(t).hostname.toLowerCase()));return e=e.endsWith(".")?e.slice(0,-1):e,e&&!function(e){return e.includes(" ")||e.includes("\t")||e.includes("\n")||e.includes("\r")||e.includes("\f")||e.includes("\v")}(e)?e:void 0}catch{return}}}function Lt(e,t){try{return $t((t?new URL(e,t):new URL(e)).hostname)}catch{return}}function Mt(e){return Array.isArray(e)?Array.from(new Set(e.map(e=>$t(e)).filter(e=>!!e))):[]}function Ut(e,t){if(!t||0===t.length)return!0;const o=$t(e);return!!o&&t.some(e=>{const t=$t(e);return!!t&&(o===t||o.endsWith(`.${t}`))})}function jt(e,t,o){if(!t||0===t.length)return!0;const i=Lt(e,o);return!!i&&Ut(i,t)}function Pt(e){const t=$t(e);return!!t&&("localhost"===t||"127.0.0.1"===t||"::1"===t||"vertesia.io"===t||t.endsWith(".vertesia.io"))}function Gt(e){return Pt(Lt(e))}var qt,Wt;function Ft(e,t){return{...t,integration:e}}!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"}(qt||(qt={})),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"}(Wt||(Wt={}));const Bt="openid",Yt="profile",Ht="offline_access",Kt="project_switch",Vt=[Bt,Yt,Ht],zt=[Kt],Jt=new Set([e.api_key_secret_read,e.manage_billing,e.billing_read,e.iam_impersonate,e.studio_access]),Qt=Object.values(e).filter(e=>!Jt.has(e)),Zt=new Set(Vt),Xt=new Set(zt),eo=new Set(Qt),to=/^[0-9a-f]{24}$/i,oo="project:";function io(){return[...Qt]}function no(e){return Zt.has(e)}function ro(e){return Xt.has(e)}function ao(e){return eo.has(e)}function so(e){return no(e)||ro(e)||ao(e)}function uo(e){return!!e.startsWith(oo)&&to.test(e.slice(8))}function po(e){return`${oo}${e}`}function co(e){return e.includes(Bt)}function lo(e){return e.includes(Yt)}function mo(e){return e.includes(Ht)}function _o(e){return e.includes(Kt)}function go(e){return co(e)?[...e]:e.filter(e=>e!==Yt)}function fo(e){return e.filter(ao)}class ho{parent;parentUnits;spanUnits;unitsDone;constructor(e,t,o){this.parent=e,this.parentUnits=t,this.spanUnits=o,this.unitsDone=0}done(e){const 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}}class bo{total;unitsDone=0;constructor(e){this.total=e}get fraction(){return this.unitsDone/this.total}get percent(){return Math.round(100*this.fraction)}get isDone(){return this.unitsDone>=this.total}done(e){const t=this.total-this.unitsDone;t&&((!e||e>t)&&(e=t),this.unitsDone+=e)}span(e,t){return new ho(this,e,t||e)}}var vo,yo,xo;function Eo(e,t){switch(t){case vo.owner:return!0;case vo.admin:return e!==vo.billing&&e!==vo.owner;case vo.developer:return e===vo.developer;case vo.billing:return e===vo.billing;default:return!1}}!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"}(vo||(vo={})),function(e){e.public="public",e.account="account",e.project="project"}(yo||(yo={})),function(e){e.content_type="content_type",e.intake="intake",e.analysis="analysis",e.agent="agent",e.non_applicable="non_applicable"}(xo||(xo={}));const To={ExtractInformation:xo.intake,SelectDocumentType:xo.intake,GenerateMetadataModel:xo.content_type,ChunkDocument:xo.intake,IdentifyTextSections:xo.intake,AnalyzeDocument:xo.analysis,ReduceTextSections:xo.analysis,GenericAgent:xo.non_applicable,AdhocTaskAgent:xo.non_applicable,Mediator:xo.non_applicable,AnalyzeConversation:xo.analysis,GetAgentConversationTopic:xo.analysis,StudioAssistant:xo.agent};function Ao(e){e.startsWith("sys:")&&(e=e.substring(4));const t=To[e];if(t!==xo.non_applicable)return t||void 0}const No={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};var Io,Oo;!function(e){e.text="text",e.image="image",e.properties="properties"}(Io||(Io={})),function(e){e.full_text="full_text"}(Oo||(Oo={}));const wo={...Io,...Oo},Do="id name account";function So(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 Ro={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"};var ko,Co,$o,Lo;!function(e){e.draft="draft",e.published="published",e.archived="archived"}(ko||(ko={})),function(e){e.chat="chat",e.template="template"}(Co||(Co={})),function(e){e.jst="jst",e.handlebars="handlebars",e.text="text"}($o||($o={})),function(e){e.project="Project",e.projects="Projects",e.environment="Environment",e.user="User",e.account="Account",e.interaction="Interaction",e.userGroup="UserGroup"}(Lo||(Lo={}));const Mo=["document","collection","task"],Uo=["ask","auto_review","full_control"];function jo(e,t){return!0!==t?"full_control":e??"full_control"}function Po(e){return"string"==typeof e&&Uo.includes(e)}var Go;function qo(e,t){const o=e?.agent_run_id||t;return e?.launch_id&&e?.agent_run_id?`${o}/workstreams/${e.launch_id}`:o}function Wo(e){return"steps"in e&&e.steps?{...e,spec_format:"steps"}:{...e,spec_format:"activities"}}!function(e){e.active="active",e.archived="archived"}(Go||(Go={}));const Fo="id name description tags created_at updated_at",Bo={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"]},Yo={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"]},Ho=1,Ko="https://schemas.vertesia.com/process-definition.v1.schema.json",Vo={$id:Ko,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 zo(e){const t=new Set;for(const o of e)t.add(o.id),t.add(o.name),"sys"===o.type&&t.add(`sys:${o.name}`),"app"!==o.type||o.id.startsWith("app:")||t.add(`app:${o.id}`),"stored"!==o.type&&"draft"!==o.type||(t.add(`${o.name}@draft`),t.add(`${o.id}@draft`),"number"==typeof o.version&&(t.add(`${o.name}@${o.version}`),t.add(`${o.id}@${o.version}`)));return[...t]}const Jo=1048576,Qo=64,Zo=4096;function Xo(e,t={}){const o=ei(e,t);if(!o.valid)throw new Error(o.errors.join("; "))}function ei(e,t={}){const o=[],i=function(e){return{options:e,knownTools:e.knownTools?new Set(e.knownTools):void 0,knownInteractions:e.knownInteractions?new Set(e.knownInteractions):void 0}}(t);(new TextEncoder).encode(JSON.stringify(e)).length>Jo&&o.push("process definition exceeds 1048576 bytes"),e.process||o.push("process is missing"),1!==e.format_version&&o.push("format_version must be 1"),e.initial||o.push("initial node is missing"),e.nodes&&0!==Object.keys(e.nodes).length?e.initial&&!e.nodes[e.initial]&&o.push(`initial node "${e.initial}" does not exist`):o.push("nodes are missing"),e.context?.schema||o.push("context.schema is missing"),e.context?.initial||o.push("context.initial is missing");for(const[t,n]of Object.entries(e.nodes??{}))ti(e,t,n,o,i);return{valid:0===o.length,errors:o}}function ti(e,t,o,i,n){var r;if("tool"!==(r=o.type)&&"interaction"!==r&&"agent"!==r&&"process"!==r&&"human_task"!==r&&"foreach"!==r&&"branch"!==r&&"condition"!==r&&"final"!==r&&i.push(`node "${t}" has invalid type "${String(o.type)}"`),"human_task"===o.type&&(o.task?o.task.title?Array.isArray(o.task.fields)||i.push(`human_task node "${t}" task fields must be an array`):i.push(`human_task node "${t}" task title is missing`):i.push(`human_task node "${t}" is missing task`)),"tool"===o.type&&function(e,t,o,i){if(!t.tool)return void o.push(`tool node "${e}" is missing tool`);i.knownTools&&!i.knownTools.has(t.tool)&&o.push(`tool node "${e}" references unknown tool "${t.tool}"`);"set_context"===t.tool&&function(e,t,o){const i=t.input;if(!di(i))return void o.push(`tool node "${e}" set_context input must be an object`);for(const t of Object.keys(i))"updates"!==t&&"reason"!==t&&"event_id"!==t&&o.push(`tool node "${e}" set_context input has unsupported property "${t}"`);if(!di(i.updates))return void o.push(`tool node "${e}" set_context input.updates must be an object`);void 0!==i.reason&&"string"!=typeof i.reason&&o.push(`tool node "${e}" set_context input.reason must be a string`);void 0!==i.event_id&&"string"!=typeof i.event_id&&o.push(`tool node "${e}" set_context input.event_id must be a string`);!function(e,t,o,i){const n=Object.keys(o);if(0===n.length)return;if(!Array.isArray(t.writes)||0===t.writes.length)return void i.push(`tool node "${e}" set_context updates require declared writes`);for(const o of n)o.startsWith("_")&&i.push(`tool node "${e}" set_context cannot write reserved context field "${o}"`),oi(o,t.writes)||i.push(`tool node "${e}" set_context updates "${o}" but writes does not allow it`)}(e,t,i.updates,o)}(e,t,o)}(t,o,i,n),("interaction"===o.type||"agent"===o.type)&&o.interaction&&n.knownInteractions&&(function(e,t){if(t.has(e))return!0;if(!e.includes("@"))return!1;return t.has(e.slice(0,e.lastIndexOf("@")))}(o.interaction,n.knownInteractions)||i.push(`${o.type} node "${t}" references unknown interaction "${o.interaction}"`)),"interaction"!==o.type&&"agent"!==o.type||void 0===o.result_schema||di(o.result_schema)||i.push(`${o.type} node "${t}" result_schema must be a JSON Schema object`),"process"===o.type&&(o.process||o.process_definition||i.push(`process node "${t}" is missing process or process_definition`),o.run_type&&!function(e){return"supervised"===e||"programmatic"===e}(o.run_type)&&i.push(`process node "${t}" has invalid run_type "${String(o.run_type)}"`),void 0!==o.returns?.from&&"string"!=typeof o.returns.from&&i.push(`process node "${t}" returns.from must be a string`),void 0===o.returns?.context||function(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)}(o.returns.context)||i.push(`process node "${t}" returns.context must be an array of strings`),o.process_definition)){const e=ei(o.process_definition,n.options);for(const o of e.errors)i.push(`process node "${t}" process_definition: ${o}`)}if("foreach"===o.type&&(o.foreach||i.push(`foreach node "${t}" is missing foreach`),o.node||i.push(`foreach node "${t}" is missing node`),void 0!==o.max_concurrency&&(!Number.isInteger(o.max_concurrency)||o.max_concurrency<1)&&i.push(`foreach node "${t}" max_concurrency must be a positive integer`),void 0!==o.item_id&&"string"!=typeof o.item_id&&i.push(`foreach node "${t}" item_id must be a string`),ai("foreach",t,o.collect,i),o.node&&ri(e,{ownerLabel:`foreach node "${t}"`,childPath:`${t}.node`,childLabel:`foreach node "${t}" child node`,child:o.node},i,n)),"branch"===o.type){Array.isArray(o.branches)&&0!==o.branches.length||i.push(`branch node "${t}" must define at least one branch`),void 0!==o.join&&"all"!==o.join&&i.push(`branch node "${t}" join must be "all"`),ai("branch",t,o.collect,i);const r=function(e){return"branch"===e.type&&Array.isArray(e.branches)?e.branches.filter(ci):[]}(o),a=new Set;for(const[o,s]of r.entries())s.id?a.has(s.id)?i.push(`branch node "${t}" has duplicate branch id "${s.id}"`):a.add(s.id):i.push(`branch node "${t}" branch at index ${o} is missing id`),s.node?ri(e,{ownerLabel:`branch node "${t}" branch "${s.id||o}"`,childPath:`${t}.branches.${o}.node`,childLabel:`branch node "${t}" branch "${s.id||o}" child node`,child:s.node},i,n):i.push(`branch node "${t}" branch "${s.id||o}" is missing node`)}o.failure_policy&&!function(e){return"fail_fast"===e||"collect_errors"===e}(o.failure_policy)&&i.push(`node "${t}" has invalid failure_policy "${String(o.failure_policy)}"`);for(const n of o.transitions??[])e.nodes[n.to]||i.push(`node "${t}" has transition to "${n.to}" which does not exist`),n.trigger&&!ni(n.trigger)&&i.push(`node "${t}" has invalid transition trigger "${n.trigger}"`),"string"==typeof n.guard?i.push(`node "${t}" transition to "${n.to}" guard must be a JSON Logic object`):n.guard&&ui(`node "${t}" transition to "${n.to}" guard`,n.guard,i);for(const[n,r]of function(e){return"condition"===e.type&&Array.isArray(e.branches)?e.branches.filter(pi):[]}(o).entries())ii(r,"condition")&&i.push(`node "${t}" branch at index ${n} uses string condition; use JSON Logic in "when" instead`),ii(r,"guard")&&i.push(`node "${t}" branch at index ${n} uses string guard; use JSON Logic in "when" instead`),e.nodes[r.to]||i.push(`node "${t}" has branch to "${r.to}" which does not exist`),"string"==typeof r.when?i.push(`node "${t}" branch to "${r.to}" when must be a JSON Logic object`):r.when&&ui(`node "${t}" branch to "${r.to}" guard`,r.when,i)}function oi(e,t){return t.some(t=>e===t||e.startsWith(`${t}.`))}function ii(e,t){return di(e)&&"string"==typeof e[t]}function ni(e){return"auto"===e||"agent"===e||"user"===e}function ri(e,t,o,i){const{ownerLabel:n,childPath:r,childLabel:a,child:s}=t;var u;"tool"===(u=s.type)||"interaction"===u||"agent"===u||"process"===u?((s.transitions??[]).length>0&&o.push(`${a} must not define transitions`),(s.branches??[]).length>0&&o.push(`${a} must not define branches`),ti(e,r,{...s,transitions:void 0,branches:void 0},o,i)):o.push(`${n} has unsupported child node type "${String(s.type)}"`)}function ai(e,t,o,i){if(void 0!==o)if("string"!=typeof o)if(di(o)){if("string"==typeof o.into&&o.into||i.push(`${e} node "${t}" collect.into is required`),void 0!==o.mode&&"array"!==o.mode&&i.push(`${e} node "${t}" collect.mode must be "array"`),void 0!==o.include){if(!Array.isArray(o.include))return void i.push(`${e} node "${t}" collect.include must be an array`);for(const n of o.include)"string"==typeof n&&si(n)||i.push(`${e} node "${t}" collect.include has invalid field "${String(n)}"`)}}else i.push(`${e} node "${t}" collect must be a string or object`);else o||i.push(`${e} node "${t}" collect must not be empty`)}function si(e){return"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"===e}function ui(e,t,o){const i=function(e){let t=0,o=0;const i=[{value:e,depth:1}];for(;i.length>0;){const e=i.pop();if(e){if(o+=1,t=Math.max(t,e.depth),o>Zo||t>64)break;if(Array.isArray(e.value))for(const t of e.value)i.push({value:t,depth:e.depth+1});else if(di(e.value))for(const t of Object.values(e.value))i.push({value:t,depth:e.depth+1})}}return{depth:t,nodes:o}}(t);i.depth>64&&o.push(`${e} exceeds maximum depth 64`),i.nodes>Zo&&o.push(`${e} exceeds maximum node count 4096`)}function di(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}function pi(e){return"to"in e}function ci(e){return"node"in e}var li,mi,_i,gi,fi;function hi(e){return"objectIds"===e.input?.inputType?e.input.objectIds:e.objectIds?e.objectIds:[]}function bi(e){const t=e.details;return e.type===fi.THOUGHT&&!!t&&"object"==typeof t&&"string"==typeof t.tool}function vi(e){const t=e.details;return e.type===fi.UPDATE&&!!t&&"object"==typeof t&&("document_created"===t.event_class||"document_updated"===t.event_class)&&"string"==typeof t.document_id}function yi(e){const t=e.details;return e.type===fi.SYSTEM&&!!t&&"object"==typeof t&&"file_processing"===t.system_type&&Array.isArray(t.files)}function xi(e){const t=e.details;return e.type===fi.PLAN&&!!t&&"object"==typeof t&&Array.isArray(t.plan)}function Ei(e){return e.type===fi.REQUEST_INPUT&&!!e.details&&"object"==typeof e.details}function Ti(e){return"object"==typeof e&&null!==e&&"t"in e}function Ai(e){return"object"==typeof e&&null!==e&&"type"in e&&!("t"in e)}!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"}(li||(li={})),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"}(mi||(mi={})),function(e){e.ACTIVITY="activity",e.CHILD_WORKFLOW="childWorkflow",e.SIGNAL="signal",e.TIMER="timer"}(_i||(_i={})),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"}(gi||(gi={})),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"}(fi||(fi={}));const Ni={system:fi.SYSTEM,thought:fi.THOUGHT,plan:fi.PLAN,update:fi.UPDATE,complete:fi.COMPLETE,warning:fi.WARNING,error:fi.ERROR,answer:fi.ANSWER,question:fi.QUESTION,request_input:fi.REQUEST_INPUT,idle:fi.IDLE,terminated:fi.TERMINATED,streaming_chunk:fi.STREAMING_CHUNK,batch_progress:fi.BATCH_PROGRESS},Ii={0:fi.SYSTEM,1:fi.THOUGHT,2:fi.PLAN,3:fi.UPDATE,4:fi.COMPLETE,5:fi.WARNING,6:fi.ERROR,7:fi.ANSWER,8:fi.QUESTION,9:fi.REQUEST_INPUT,10:fi.IDLE,11:fi.TERMINATED,12:fi.STREAMING_CHUNK,13:fi.BATCH_PROGRESS};function Oi(e){return"number"==typeof e?Ii[e]??fi.UPDATE:"string"==typeof e?Ni[e]??fi.UPDATE:fi.UPDATE}function wi(e){const t={t:Oi(e.type)};if(e.message&&(t.m=e.message),e.workstream_id&&"main"!==e.workstream_id&&(t.w=e.workstream_id),e.timestamp&&(t.ts=e.timestamp),t.t===fi.STREAMING_CHUNK&&e.details){e.details.is_final&&(t.f=1)}else e.details&&(t.d=e.details);return t}function Di(e){const t="string"==typeof e?JSON.parse(e):e;if(Ti(t))return t;if(Ai(t))return wi(t);throw new Error("Unknown message format")}function Si(e,t={}){const o={t:e};return t.message&&(o.m=t.message),t.workstreamId&&"main"!==t.workstreamId&&(o.w=t.workstreamId),t.details&&(o.d=t.details),t.isFinal&&(o.f=1),t.timestamp&&(o.ts=t.timestamp),o}function Ri(e,t=""){const o={type:e.t,timestamp:e.ts||Date.now(),workflow_run_id:t,message:e.m||"",workstream_id:e.w||"main"};if(void 0!==e.d&&null!==e.d&&(o.details=e.d),e.t===fi.STREAMING_CHUNK){const t="object"==typeof e.d&&null!==e.d?e.d:{},i="string"==typeof t.streaming_id?t.streaming_id:e.w||"main",n=e.i??("string"==typeof t.activity_id?t.activity_id:void 0);o.details={...t,streaming_id:i,is_final:1===e.f,...n?{activity_id:n}:{}}}return o}var ki;function Ci(e){return`workflow:${e}:channel`}function $i(e){return`workflow:${e}:updates`}!function(e){e.UPLOADING="uploading",e.PROCESSING="processing",e.READY="ready",e.ERROR="error"}(ki||(ki={}));const Li="low_priority";function Mi(e,t){return`renditions/${e}/${t.max_hw}`}function Ui(e){return"pdf"===e.format||"docx"===e.format}function ji(e){return e===gi.COMPLETED||e===gi.FAILED||e===gi.CANCELED||e===gi.TERMINATED||e===gi.TIMED_OUT}const Pi={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 * *"},Gi={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 qi,Wi,Fi,Bi;!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"}(qi||(qi={})),function(e){e.DATA_STORE_ID="x-data-store-id"}(Wi||(Wi={})),function(e){e.created="created",e.processing="processing",e.ready="ready",e.completed="completed",e.failed="failed",e.archived="archived"}(Fi||(Fi={})),function(e){e.Video="video",e.Image="image",e.Audio="audio",e.Document="document",e.Code="code",e.Other="other"}(Bi||(Bi={}));const Yi="Poster",Hi="Audio",Ki="Web",Vi="PDF",zi={success:"success"};function Ji(e){return e.id}function Qi(e){const t="code"in e?e.code:void 0,o=e.id||t||"",i=e.name||"";return"incode"===e.ref_type||Zi(o)?{ref_type:"incode",id:o,name:i}:{ref_type:"stored",id:o,name:i}}function Zi(e){return e.includes(":")}var Xi,en,tn;!function(e){e.single="single",e.multiple="multiple",e.none="none"}(Xi||(Xi={})),function(e){e.jpeg="jpeg",e.png="png",e.webp="webp"}(en||(en={})),function(e){e.docx="docx",e.pdf="pdf"}(tn||(tn={}));const on={"image/*":[en.jpeg,en.png,en.webp],"video/*":[en.jpeg,en.png],"application/pdf":[en.jpeg,en.png,en.webp],"text/markdown":[tn.pdf,tn.docx],"text/*":[tn.docx],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[tn.pdf],"application/msword":[tn.pdf],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[tn.pdf],"application/vnd.ms-powerpoint":[tn.pdf]};function nn(e,t){if(!e)return!1;const o=t,i=on[e];if(i?.some(e=>e===o))return!0;const[n]=e.split("/"),r=on[`${n}/*`];return!!r?.some(e=>e===o)}function rn(e){if(!e)return[];if(on[e])return[...on[e]];const[t]=e.split("/"),o=on[`${t}/*`];return o?[...o]:[]}function an(e){return nn(e,en.jpeg)}var sn;!function(e){e.normal="normal",e.low="low"}(sn||(sn={}));const un={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 dn(e){return"apikey"===e.type}function pn(e){return"user"===e.type}function cn(e){return"project"===e.type}function ln(e){return"environment"===e.type}function mn(e){return"agent"===e.type}function _n(e){return"service_account"===e.type}var gn,fn;!function(e){e.created="created",e.building="building",e.prepared="prepared",e.processing="processing",e.completed="completed",e.cancelled="cancelled",e.failed="failed"}(gn||(gn={})),function(e){e.userInvite="user-invite",e.migration="migration"}(fn||(fn={}));const hn="id name email picture";var bn,vn,yn;!function(e){e.aws="aws",e.gcp="gcp",e.azure="azure"}(bn||(bn={})),function(e){e.stripe="stripe",e.invoice="invoice"}(vn||(vn={})),function(e){e.vertesia="vertesia",e.partner="partner",e.free="free",e.customer="customer",e.prospect="prospect",e.unknown="unknown"}(yn||(yn={}));const xn="id name";function En(e,t){return`${e.slice(-6)}_${t.slice(-6)}`}function Tn(e){return En(e.account,e.id)}function An(e){return{name:e.name,description:e.description,input_schema:e.input_schema}}function Nn(e){return e?e.map(An):e}function In(e){if(!e)return e;if(Array.isArray(e))for(const t of e)In(t);else if("object"==typeof e){const t=e;(function(e){return"document"===e.editor||"document"===e.format||"media"===e.format})(t)&&function(e){e.type||(e.type="string");e.description?"string"!=typeof e.description||e.description.includes(On)||(e.description=`${e.description} ${On}`):e.description=On}(t);for(const[e,o]of Object.entries(t))("editor"!==e||"textarea"!==o&&"document"!==o&&"media"!==o)&&("format"!==e||"textarea"!==o&&"document"!==o&&"media"!==o)?"object"==typeof o&&In(o):delete t[e]}return e}const On="Use 'store:<document_id>' format to reference a document from the content store.";function wn(e){const t={},o=[];for(const i of e)if(i.properties){if(i.required)for(const e of i.required)o.includes(e)||o.push(e);Object.assign(t,i.properties)}return Object.keys(t).length>0?{properties:t,required:o,type:"object"}:null}function Dn(e){const t={},o=new Set;for(const i of e)if(i.template?.inputSchema?.properties){const e=i.template?.inputSchema;if(e.required)for(const t of e.required)o.add(t);Object.assign(t,e.properties)}else i.type===Co.chat&&(Object.assign(t,{chat:{type:"array",items:{type:"object",properties:{role:{type:"string",enum:[_t.assistant,_t.user]},content:{type:"string"}},required:["role","content"]}}}),o.add("chat"));return Object.keys(t).length>0?{properties:t,required:Array.from(o)}:null}function Sn(e){return e.prompts?Dn(e.prompts):null}function Rn(e){const t={},o=new Set;for(const i of e)if(i.schema?.properties){const e=i.schema;if(e.required)for(const t of e.required)o.add(t);Object.assign(t,e.properties)}return Object.keys(t).length>0?{properties:t,required:Array.from(o)}:null}var kn,Cn,$n,Ln;!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"}(kn||(kn={})),function(e){e.AgentRunStarted="agent_run_started",e.AgentRunCompleted="agent_run_completed",e.LlmCall="llm_call",e.ToolCall="tool_call"}(Cn||(Cn={})),function(e){e.Start="start",e.ResumeTools="resume_tools",e.ResumeUser="resume_user",e.Checkpoint="checkpoint",e.NestedInteraction="nested_interaction"}($n||($n={})),function(e){e.Builtin="builtin",e.Interaction="interaction",e.Remote="remote",e.Skill="skill"}(Ln||(Ln={}));export{Hi as AUDIO_RENDITION_NAME,Mo as AbacScopes,o as AccessControlPrincipalType,t as AccessControlResourceType,xn as AccountRefPopulate,yn as AccountType,Cn as AgentEventType,fi as AgentMessageType,U as AgentSearchScope,Uo as AgentToolApprovalModes,c as ApiKeyTypes,kn as ApiVersions,O as BILLABLE_AUDIT_ACTIONS,vn as BillingMethod,No as BrowserUseProjectConfigurationSchema,Pi as CRON_PRESETS,Gi as CRON_PRESET_LABELS,Go as CollectionStatus,G as ConfigModes,q as ConfigModesDescription,W as ConfigModesOptions,li as ContentEventName,Bi as ContentNature,qi as ContentObjectApiHeaders,sn as ContentObjectProcessingPriority,Fi as ContentObjectStatus,It as CustomProviders,wt as CustomProvidersList,J as DATA_COLUMN_TYPE_TO_DUCKDB,te as DEFAULT_DASHBOARD_LAYOUT,X as DEFAULT_RETENTION_CONFIG,On as DOCUMENT_STORE_HINT,ee as DashboardStatus,B as DataColumnType,Wi as DataStoreApiHeaders,Q as DataStoreStatus,bn as Datacenters,Yo as DocumentPartSchema,P as ExecutionRunRefSelect,C as ExecutionRunStatus,ki as FileProcessingStatus,Oo as FullTextType,en as ImageRenditionFormat,Z as ImportStatus,S as InteractionRefPopulate,R as InteractionRefWithSchemaPopulate,k as InteractionStatus,Li as LOW_PRIORITY_TASK_QUEUE,$n as LlmCallType,Jo as MAX_PROCESS_DEFINITION_BYTES,Qo as MAX_PROCESS_GUARD_DEPTH,Zo as MAX_PROCESS_GUARD_NODES,_ as MCP_COLLECTION_ID_PATTERN,g as MCP_COLLECTION_NAMESPACE_PATTERN,kt as MEMBERS_GROUP_NAME,tn as MarkdownRenditionFormat,Wt as MeterNames,F as ModelSource,zt as OAUTH_PLATFORM_SCOPES,Ht as OAUTH_SCOPE_OFFLINE_ACCESS,Bt as OAUTH_SCOPE_OPENID,Yt as OAUTH_SCOPE_PROFILE,Kt as OAUTH_SCOPE_PROJECT_SWITCH,Vt as OAUTH_STANDARD_SCOPES,Vi as PDF_RENDITION_NAME,Yi as POSTER_RENDITION_NAME,m as PREFERRED_SECTIONS,Ho as PROCESS_DEFINITION_FORMAT_VERSION,Ko as PROCESS_DEFINITION_JSON_SCHEMA_ID,un as ParentClosePolicy,e as Permission,l as PrincipalType,Vo as ProcessDefinitionBodyJsonSchema,bo as Progress,Do as ProjectRefPopulate,Co as PromptSegmentDefType,ko as PromptStatus,Bo as RenditionSchema,Lo as ResolvableRefType,yo as ResourceVisibility,L as RunDataStorageDescription,$ as RunDataStorageLevel,M as RunDataStorageOptions,j as RunSourceTypes,Ro as SUPPORTED_SEARCH_LANGUAGES,To as SYSTEM_INTERACTION_CATEGORIES,wo as SearchTypes,i as SecurityLevel,n as SecurityLevelLabels,Y as SemanticColumnType,Io as SupportedEmbeddingTypes,qt as SupportedIntegrations,Ot as SupportedProviders,Dt as SupportedProvidersList,xo as SystemInteractionCategory,vo as SystemRoles,mi as TaskStatus,_i as TaskType,Ln as TelemetryToolType,$o as TemplateType,zi as TextExtractionStatus,gn as TrainingSessionStatus,fn as TransientTokenType,Rt as UserGroupRefPopulate,hn as UserRefPopulate,Ki as WEB_VIDEO_RENDITION_NAME,Fo as WorkflowDefinitionRefPopulate,gi as WorkflowExecutionStatus,Xi as WorkflowRuleInputType,Dn as _mergePromptsSchema,So as autoTuneReindexParams,nn as canGenerateRendition,Si as createCompactMessage,po as createOAuthProjectBindingScope,b as deriveMCPCollectionId,x as effectiveAppAccessControl,fo as extractOAuthPermissionScopes,H as findEmailChannel,Ji as getContentTypeRefId,qo as getConversationStorageId,v as getDefaultOAuthAppNameForCollectionId,hi as getDocumentIds,io as getOAuthPermissionScopes,go as getOAuthScopesWithProfileDependency,ei as getProcessDefinitionValidationResult,zo as getProcessInteractionValidationSelectors,Mi as getRenditionsPath,r as getSecurityLevelLabel,rn as getSupportedRenditionFormats,Ao as getSystemInteractionCategory,En as getTenantId,Tn as getTenantIdFromProject,St as getVertexBucketAccessPrincipal,Ci as getWorkflowChannel,$i as getWorkflowUpdatesKey,K as hasEmailChannel,mo as hasOAuthOfflineAccessScope,co as hasOAuthOpenIdScope,lo as hasOAuthProfileScope,_o as hasOAuthProjectSwitchScope,Lt as hostFromUrl,Ut as hostMatchesAny,mn as isAgentRequest,Po as isAgentToolApprovalMode,dn as isApiKeyRequest,Ti as isCompactMessage,vi as isDocumentEventMessage,w as isEmailChannel,ln as isEnvironmentRequest,yi as isFileProcessingMessage,Zi as isInCodeType,D as isInteractiveChannel,Ai as isLegacyMessage,Pt as isLocalhostOrVertesiaHost,Gt as isLocalhostOrVertesiaUrl,Ui as isMarkdownRenditionVars,ao as isOAuthPermissionScope,ro as isOAuthPlatformScope,uo as isOAuthProjectBindingScope,no as isOAuthStandardScope,so as isOAuthSupportedScope,xi as isPlanMessage,cn as isProjectRequest,Ei as isRequestInputMessage,Eo as isRoleIncludedIn,_n as isServiceAccountRequest,bi as isToolCallMessage,pn as isUserRequest,T as isValidEndpointOverrideEnv,f as isValidMCPCollectionId,h as isValidMCPCollectionNamespace,ji as isWorkflowTerminalStatus,Rn as mergeInCodePromptSchemas,wn as mergeJSONSchemas,Sn as mergePromptsSchema,jo as normalizeAgentToolApprovalMode,$t as normalizeHost,Mt as normalizeHostList,Oi as normalizeMessageType,y as normalizeToolCollection,Di as parseMessage,In as removeExtraProperties,d as renderAgentRequestFallback,p as renderAgentRequestMessage,u as renderAgentRequestTemplate,N as resolveAppEndpoint,I as resolveManifestUrls,An as sanitizeToolDefinition,Nn as sanitizeToolDefinitions,A as substituteEndpoints,Et as supportsToolUse,an as supportsVisualRendition,Ri as toAgentMessage,wi as toCompactMessage,V as updateEmailChannel,z as updateEmailThreading,jt as urlMatchesAnyHost,Xo as validateProcessDefinitionBody,Qi as withContentObjectTypeRefDiscriminator,Wo as withDSLWorkflowSpecDiscriminator,Ft as withProjectIntegrationDiscriminator};
|
|
2
2
|
//# sourceMappingURL=vertesia-common.js.map
|