asteroid-odyssey 1.7.310 → 1.7.312

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- 'use strict';var N=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>N(t,r,i)):N(t,r,s));}),t}},F={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var X=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:p,sseMaxRetryAttempts:l,sseMaxRetryDelay:a,sseSleepFn:c,url:g,...n})=>{let f,D=c??(d=>new Promise(E=>setTimeout(E,d)));return {stream:async function*(){let d=p??3e3,E=0,h=n.signal??new AbortController().signal;for(;!h.aborted;){E++;let O=n.headers instanceof Headers?n.headers:new Headers(n.headers);f!==void 0&&O.set("Last-Event-ID",f);try{let P={redirect:"follow",...n,body:n.serializedBody,headers:O,signal:h},w=new Request(g,P);e&&(w=await e(g,P));let u=await(n.fetch??globalThis.fetch)(w);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let y=u.body.pipeThrough(new TextDecoderStream).getReader(),C="",q=()=>{try{y.cancel();}catch{}};h.addEventListener("abort",q);try{for(;;){let{done:ee,value:te}=await y.read();if(ee)break;C+=te,C=C.replace(/\r\n/g,`
1
+ 'use strict';var N=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>N(t,r,i)):N(t,r,s));}),t}},L={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var X=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:p,sseMaxRetryAttempts:l,sseMaxRetryDelay:a,sseSleepFn:c,url:u,...n})=>{let E,D=c??(d=>new Promise(f=>setTimeout(f,d)));return {stream:async function*(){let d=p??3e3,f=0,w=n.signal??new AbortController().signal;for(;!w.aborted;){f++;let O=n.headers instanceof Headers?n.headers:new Headers(n.headers);E!==void 0&&O.set("Last-Event-ID",E);try{let P={redirect:"follow",...n,body:n.serializedBody,headers:O,signal:w},m=new Request(u,P);e&&(m=await e(u,P));let A=await(n.fetch??globalThis.fetch)(m);if(!A.ok)throw new Error(`SSE failed: ${A.status} ${A.statusText}`);if(!A.body)throw new Error("No body in SSE response");let x=A.body.pipeThrough(new TextDecoderStream).getReader(),C="",q=()=>{try{x.cancel();}catch{}};w.addEventListener("abort",q);try{for(;;){let{done:ee,value:te}=await x.read();if(ee)break;C+=te,C=C.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let M=C.split(`
4
4
 
5
5
  `);C=M.pop()??"";for(let re of M){let oe=re.split(`
6
- `),v=[],z;for(let m of oe)if(m.startsWith("data:"))v.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))z=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))f=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let j=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(j)||(d=j);}let R,V=!1;if(v.length){let m=v.join(`
7
- `);try{R=JSON.parse(m),V=!0;}catch{R=m;}}V&&(i&&await i(R),s&&(R=await s(R))),r?.({data:R,event:z,id:f,retry:d}),v.length&&(yield R);}}}finally{h.removeEventListener("abort",q),y.releaseLock();}break}catch(P){if(t?.(P),l!==void 0&&E>=l)break;let w=Math.min(d*2**(E-1),a??3e4);await D(w);}}}()}};var ne=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},se=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},I=({allowReserved:e,explode:t,name:r,style:s,value:i})=>{if(!t){let a=(e?i:i.map(c=>encodeURIComponent(c))).join(se(s));switch(s){case "label":return `.${a}`;case "matrix":return `;${r}=${a}`;case "simple":return a;default:return `${r}=${a}`}}let p=ne(s),l=i.map(a=>s==="label"||s==="simple"?e?a:encodeURIComponent(a):S({allowReserved:e,name:r,value:a})).join(p);return s==="label"||s==="matrix"?p+l:l},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},W=({allowReserved:e,explode:t,name:r,style:s,value:i,valueOnly:p})=>{if(i instanceof Date)return p?i.toISOString():`${r}=${i.toISOString()}`;if(s!=="deepObject"&&!t){let c=[];Object.entries(i).forEach(([n,f])=>{c=[...c,n,e?f:encodeURIComponent(f)];});let g=c.join(",");switch(s){case "form":return `${r}=${g}`;case "label":return `.${g}`;case "matrix":return `;${r}=${g}`;default:return g}}let l=ie(s),a=Object.entries(i).map(([c,g])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${c}]`:c,value:g})).join(l);return s==="label"||s==="matrix"?l+a:a};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let i of s){let p=false,l=i.substring(1,i.length-1),a="simple";l.endsWith("*")&&(p=true,l=l.substring(0,l.length-1)),l.startsWith(".")?(l=l.substring(1),a="label"):l.startsWith(";")&&(l=l.substring(1),a="matrix");let c=e[l];if(c==null)continue;if(Array.isArray(c)){r=r.replace(i,I({explode:p,name:l,style:a,value:c}));continue}if(typeof c=="object"){r=r.replace(i,W({explode:p,name:l,style:a,value:c,valueOnly:true}));continue}if(a==="matrix"){r=r.replace(i,`;${S({name:l,value:c})}`);continue}let g=encodeURIComponent(a==="label"?`.${c}`:c);r=r.replace(i,g);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:i})=>{let p=i.startsWith("/")?i:`/${i}`,l=(e??"")+p;t&&(l=le({path:t,url:l}));let a=r?s(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(l+=`?${a}`),l};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let p in s){let l=s[p];if(l==null)continue;let a=e[p]||t;if(Array.isArray(l)){let c=I({allowReserved:a.allowReserved,explode:true,name:p,style:"form",value:l,...a.array});c&&i.push(c);}else if(typeof l=="object"){let c=W({allowReserved:a.allowReserved,explode:true,name:p,style:"deepObject",value:l,...a.object});c&&i.push(c);}else {let c=S({allowReserved:a.allowReserved,name:p,value:l});c&&i.push(c);}}return i.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let i=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[i]=s;break;case "cookie":t.headers.append("Cookie",`${i}=${s}`);break;default:t.headers.set(i,s);break}}},U=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=L(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},L=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[i,p]of s)if(p===null)t.delete(i);else if(Array.isArray(p))for(let l of p)t.append(i,l);else p!==void 0&&t.set(i,typeof p=="object"?JSON.stringify(p):p);}return t},b=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new b,request:new b,response:new b}),de=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),ge={"Content-Type":"application/json"},T=(e={})=>({...F,headers:ge,parseAs:"auto",querySerializer:de,...e});var B=(e={})=>{let t=K(T(),e),r=()=>({...t}),s=g=>(t=K(t,g),r()),i=Z(),p=async g=>{let n={...t,...g,fetch:g.fetch??t.fetch??globalThis.fetch,headers:L(t.headers,g.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let f=U(n);return {opts:n,url:f}},l=async g=>{let{opts:n,url:f}=await p(g),D={redirect:"follow",...n,body:$(n)},x=new Request(f,D);for(let A of i.request.fns)A&&(x=await A(x,n));let k=n.fetch,d;try{d=await k(x);}catch(A){let u=A;for(let y of i.error.fns)y&&(u=await y(A,void 0,x,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:x,response:void 0}}for(let A of i.response.fns)A&&(d=await A(d,x,n));let E={request:x,response:d};if(d.ok){let A=(n.parseAs==="auto"?_(d.headers.get("Content-Type")):n.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let y;switch(A){case "arrayBuffer":case "blob":case "text":y=await d[A]();break;case "formData":y=new FormData;break;case "stream":y=d.body;break;default:y={};break}return n.responseStyle==="data"?y:{data:y,...E}}let u;switch(A){case "arrayBuffer":case "blob":case "formData":case "json":case "text":u=await d[A]();break;case "stream":return n.responseStyle==="data"?d.body:{data:d.body,...E}}return A==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.responseStyle==="data"?u:{data:u,...E}}let h=await d.text(),O;try{O=JSON.parse(h);}catch{}let P=O??h,w=P;for(let A of i.error.fns)A&&(w=await A(P,d,x,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...E}},a=g=>n=>l({...n,method:g}),c=g=>async n=>{let{opts:f,url:D}=await p(n);return X({...f,body:f.body,headers:f.headers,method:g,onRequest:async(x,k)=>{let d=new Request(x,k);for(let E of i.request.fns)E&&(d=await E(d,f));return d},url:D})};return {buildUrl:U,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:i,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:l,setConfig:s,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:a("TRACE")}};var o=B(T({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var Ae=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity",...e}),ue=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/notable",...e}),fe=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/window-stats",...e}),Ee=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),ye=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),me=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),we=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),he=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),Re=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),De=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ce=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),be=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails",...e}),Ge=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails/{emailId}",...e}),Ie=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),We=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/available-tools",...e}),Fe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e}),Ue=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),je=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/inputs",...e}),Xe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/output-schemas",...e}),He=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),$e=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/context",...e}),Qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e}),_e=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}",...e}),Ze=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}/stop",...e}),et=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),tt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),rt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),ot=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files",...e}),nt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files/{fileId}/download",...e}),st=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),it=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),at=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files/{fileId}/download",...e}),lt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/debug-files/{fileId}/download",...e}),ct=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files",...e}),pt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files/{fileId}/download",...e}),dt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),gt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),At=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),ut=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ft=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}}),Et=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}});
8
- exports.adminCustomerActivityList=Ae;exports.adminCustomerActivityNotableList=ue;exports.adminCustomerActivityWindowStatsList=fe;exports.agentByIdDelete=Fe;exports.agentByIdUpdate=Ue;exports.agentCreate=We;exports.agentExecutePost=Ke;exports.agentList=Ie;exports.agentProfileClearBrowserCache=Te;exports.agentProfileDelete=Oe;exports.agentProfileDuplicate=ke;exports.agentProfileGet=Ce;exports.agentProfileGetInboxEmail=Ge;exports.agentProfileGetInboxEmails=ve;exports.agentProfilePoolDelete=xe;exports.agentProfilePoolGet=me;exports.agentProfilePoolMembersAdd=Re;exports.agentProfilePoolMembersList=Pe;exports.agentProfilePoolMembersRemove=he;exports.agentProfilePoolUpdate=we;exports.agentProfilePoolsCreate=ye;exports.agentProfilePoolsList=Ee;exports.agentProfileUpdate=be;exports.agentProfilesCreate=De;exports.agentProfilesList=Se;exports.agentWorkflowsCreate=qe;exports.agentWorkflowsDeleteWorkflow=ze;exports.agentWorkflowsExecute=je;exports.agentWorkflowsGet=Ve;exports.agentWorkflowsGetInputs=Ne;exports.agentWorkflowsGetOutputSchemas=Xe;exports.agentWorkflowsList=Be;exports.agentWorkflowsPublish=He;exports.agentWorkflowsValidate=Me;exports.availableToolsList=Le;exports.client=o;exports.contextGet=$e;exports.docsSearchSearch=Qe;exports.environmentByIdGet=Ye;exports.environmentByIdStop=Ze;exports.environmentsList=Je;exports.environmentsStart=_e;exports.executionActivitiesGet=rt;exports.executionAgentFileDownloadRedirect=nt;exports.executionAgentFilesGet=ot;exports.executionContextFileDownloadRedirect=at;exports.executionContextFilesGet=st;exports.executionContextFilesUpload=it;exports.executionDebugFileDownloadRedirect=lt;exports.executionFileDownloadRedirect=pt;exports.executionFilesGet=ct;exports.executionGet=tt;exports.executionRecordingRedirect=dt;exports.executionStatusUpdate=gt;exports.executionUserMessagesAdd=At;exports.executionsList=et;exports.schemaValidationValidate=ut;exports.tempFilesStage=ft;exports.workflowSpecValidationValidate=Et;
6
+ `),v=[],z;for(let h of oe)if(h.startsWith("data:"))v.push(h.replace(/^data:\s*/,""));else if(h.startsWith("event:"))z=h.replace(/^event:\s*/,"");else if(h.startsWith("id:"))E=h.replace(/^id:\s*/,"");else if(h.startsWith("retry:")){let j=Number.parseInt(h.replace(/^retry:\s*/,""),10);Number.isNaN(j)||(d=j);}let R,V=!1;if(v.length){let h=v.join(`
7
+ `);try{R=JSON.parse(h),V=!0;}catch{R=h;}}V&&(i&&await i(R),s&&(R=await s(R))),r?.({data:R,event:z,id:E,retry:d}),v.length&&(yield R);}}}finally{w.removeEventListener("abort",q),x.releaseLock();}break}catch(P){if(t?.(P),l!==void 0&&f>=l)break;let m=Math.min(d*2**(f-1),a??3e4);await D(m);}}}()}};var ne=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},se=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},I=({allowReserved:e,explode:t,name:r,style:s,value:i})=>{if(!t){let a=(e?i:i.map(c=>encodeURIComponent(c))).join(se(s));switch(s){case "label":return `.${a}`;case "matrix":return `;${r}=${a}`;case "simple":return a;default:return `${r}=${a}`}}let p=ne(s),l=i.map(a=>s==="label"||s==="simple"?e?a:encodeURIComponent(a):S({allowReserved:e,name:r,value:a})).join(p);return s==="label"||s==="matrix"?p+l:l},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},W=({allowReserved:e,explode:t,name:r,style:s,value:i,valueOnly:p})=>{if(i instanceof Date)return p?i.toISOString():`${r}=${i.toISOString()}`;if(s!=="deepObject"&&!t){let c=[];Object.entries(i).forEach(([n,E])=>{c=[...c,n,e?E:encodeURIComponent(E)];});let u=c.join(",");switch(s){case "form":return `${r}=${u}`;case "label":return `.${u}`;case "matrix":return `;${r}=${u}`;default:return u}}let l=ie(s),a=Object.entries(i).map(([c,u])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${c}]`:c,value:u})).join(l);return s==="label"||s==="matrix"?l+a:a};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let i of s){let p=false,l=i.substring(1,i.length-1),a="simple";l.endsWith("*")&&(p=true,l=l.substring(0,l.length-1)),l.startsWith(".")?(l=l.substring(1),a="label"):l.startsWith(";")&&(l=l.substring(1),a="matrix");let c=e[l];if(c==null)continue;if(Array.isArray(c)){r=r.replace(i,I({explode:p,name:l,style:a,value:c}));continue}if(typeof c=="object"){r=r.replace(i,W({explode:p,name:l,style:a,value:c,valueOnly:true}));continue}if(a==="matrix"){r=r.replace(i,`;${S({name:l,value:c})}`);continue}let u=encodeURIComponent(a==="label"?`.${c}`:c);r=r.replace(i,u);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:i})=>{let p=i.startsWith("/")?i:`/${i}`,l=(e??"")+p;t&&(l=le({path:t,url:l}));let a=r?s(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(l+=`?${a}`),l};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let p in s){let l=s[p];if(l==null)continue;let a=e[p]||t;if(Array.isArray(l)){let c=I({allowReserved:a.allowReserved,explode:true,name:p,style:"form",value:l,...a.array});c&&i.push(c);}else if(typeof l=="object"){let c=W({allowReserved:a.allowReserved,explode:true,name:p,style:"deepObject",value:l,...a.object});c&&i.push(c);}else {let c=S({allowReserved:a.allowReserved,name:p,value:l});c&&i.push(c);}}return i.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let i=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[i]=s;break;case "cookie":t.headers.append("Cookie",`${i}=${s}`);break;default:t.headers.set(i,s);break}}},F=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=B(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},B=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[i,p]of s)if(p===null)t.delete(i);else if(Array.isArray(p))for(let l of p)t.append(i,l);else p!==void 0&&t.set(i,typeof p=="object"?JSON.stringify(p):p);}return t},b=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new b,request:new b,response:new b}),de=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),ue={"Content-Type":"application/json"},T=(e={})=>({...L,headers:ue,parseAs:"auto",querySerializer:de,...e});var U=(e={})=>{let t=K(T(),e),r=()=>({...t}),s=u=>(t=K(t,u),r()),i=Z(),p=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:B(t.headers,u.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let E=F(n);return {opts:n,url:E}},l=async u=>{let{opts:n,url:E}=await p(u),D={redirect:"follow",...n,body:$(n)},y=new Request(E,D);for(let g of i.request.fns)g&&(y=await g(y,n));let k=n.fetch,d;try{d=await k(y);}catch(g){let A=g;for(let x of i.error.fns)x&&(A=await x(g,void 0,y,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,request:y,response:void 0}}for(let g of i.response.fns)g&&(d=await g(d,y,n));let f={request:y,response:d};if(d.ok){let g=(n.parseAs==="auto"?_(d.headers.get("Content-Type")):n.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let x;switch(g){case "arrayBuffer":case "blob":case "text":x=await d[g]();break;case "formData":x=new FormData;break;case "stream":x=d.body;break;default:x={};break}return n.responseStyle==="data"?x:{data:x,...f}}let A;switch(g){case "arrayBuffer":case "blob":case "formData":case "json":case "text":A=await d[g]();break;case "stream":return n.responseStyle==="data"?d.body:{data:d.body,...f}}return g==="json"&&(n.responseValidator&&await n.responseValidator(A),n.responseTransformer&&(A=await n.responseTransformer(A))),n.responseStyle==="data"?A:{data:A,...f}}let w=await d.text(),O;try{O=JSON.parse(w);}catch{}let P=O??w,m=P;for(let g of i.error.fns)g&&(m=await g(P,d,y,n));if(m=m||{},n.throwOnError)throw m;return n.responseStyle==="data"?void 0:{error:m,...f}},a=u=>n=>l({...n,method:u}),c=u=>async n=>{let{opts:E,url:D}=await p(n);return X({...E,body:E.body,headers:E.headers,method:u,onRequest:async(y,k)=>{let d=new Request(y,k);for(let f of i.request.fns)f&&(d=await f(d,E));return d},url:D})};return {buildUrl:F,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:i,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:l,setConfig:s,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:a("TRACE")}};var o=U(T({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity",...e}),Ae=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/notable",...e}),Ee=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/window-stats",...e}),fe=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),xe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),he=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),me=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),Re=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),De=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ce=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),be=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails",...e}),Ge=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails/{emailId}",...e}),Ie=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),We=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/available-tools",...e}),Le=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e}),Fe=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),je=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/inputs",...e}),Xe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/output-schemas",...e}),He=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),$e=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/context",...e}),Qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e}),_e=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}",...e}),Ze=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}/stop",...e}),et=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches",...e}),tt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches",...e,headers:{"Content-Type":"application/json",...e.headers}}),rt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}",...e}),ot=e=>(e.client??o).put({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}/cancel",...e}),nt=e=>(e.client??o).put({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}/pause",...e}),st=e=>(e.client??o).put({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}/resume",...e}),it=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),at=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),lt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),ct=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files",...e}),pt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files/{fileId}/download",...e}),dt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),ut=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),gt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files/{fileId}/download",...e}),At=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/debug-files/{fileId}/download",...e}),Et=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files",...e}),ft=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files/{fileId}/download",...e}),xt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),yt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),ht=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),mt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/scheduled-executions",...e}),wt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pt=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}}),Rt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}});
8
+ exports.adminCustomerActivityList=ge;exports.adminCustomerActivityNotableList=Ae;exports.adminCustomerActivityWindowStatsList=Ee;exports.agentByIdDelete=Le;exports.agentByIdUpdate=Fe;exports.agentCreate=We;exports.agentExecutePost=Ke;exports.agentList=Ie;exports.agentProfileClearBrowserCache=Te;exports.agentProfileDelete=Oe;exports.agentProfileDuplicate=ke;exports.agentProfileGet=Ce;exports.agentProfileGetInboxEmail=Ge;exports.agentProfileGetInboxEmails=ve;exports.agentProfilePoolDelete=ye;exports.agentProfilePoolGet=he;exports.agentProfilePoolMembersAdd=Re;exports.agentProfilePoolMembersList=Pe;exports.agentProfilePoolMembersRemove=we;exports.agentProfilePoolUpdate=me;exports.agentProfilePoolsCreate=xe;exports.agentProfilePoolsList=fe;exports.agentProfileUpdate=be;exports.agentProfilesCreate=De;exports.agentProfilesList=Se;exports.agentWorkflowsCreate=qe;exports.agentWorkflowsDeleteWorkflow=ze;exports.agentWorkflowsExecute=je;exports.agentWorkflowsGet=Ve;exports.agentWorkflowsGetInputs=Ne;exports.agentWorkflowsGetOutputSchemas=Xe;exports.agentWorkflowsList=Ue;exports.agentWorkflowsPublish=He;exports.agentWorkflowsValidate=Me;exports.availableToolsList=Be;exports.client=o;exports.contextGet=$e;exports.docsSearchSearch=Qe;exports.environmentByIdGet=Ye;exports.environmentByIdStop=Ze;exports.environmentsList=Je;exports.environmentsStart=_e;exports.executionActivitiesGet=lt;exports.executionAgentFileDownloadRedirect=pt;exports.executionAgentFilesGet=ct;exports.executionBatchCancel=ot;exports.executionBatchGet=rt;exports.executionBatchPause=nt;exports.executionBatchResume=st;exports.executionBatchesCreate=tt;exports.executionBatchesList=et;exports.executionContextFileDownloadRedirect=gt;exports.executionContextFilesGet=dt;exports.executionContextFilesUpload=ut;exports.executionDebugFileDownloadRedirect=At;exports.executionFileDownloadRedirect=ft;exports.executionFilesGet=Et;exports.executionGet=at;exports.executionRecordingRedirect=xt;exports.executionStatusUpdate=yt;exports.executionUserMessagesAdd=ht;exports.executionsList=it;exports.scheduledExecutionsList=mt;exports.schemaValidationValidate=wt;exports.tempFilesStage=Pt;exports.workflowSpecValidationValidate=Rt;
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- var N=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>N(t,r,i)):N(t,r,s));}),t}},F={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var X=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:p,sseMaxRetryAttempts:l,sseMaxRetryDelay:a,sseSleepFn:c,url:g,...n})=>{let f,D=c??(d=>new Promise(E=>setTimeout(E,d)));return {stream:async function*(){let d=p??3e3,E=0,h=n.signal??new AbortController().signal;for(;!h.aborted;){E++;let O=n.headers instanceof Headers?n.headers:new Headers(n.headers);f!==void 0&&O.set("Last-Event-ID",f);try{let P={redirect:"follow",...n,body:n.serializedBody,headers:O,signal:h},w=new Request(g,P);e&&(w=await e(g,P));let u=await(n.fetch??globalThis.fetch)(w);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let y=u.body.pipeThrough(new TextDecoderStream).getReader(),C="",q=()=>{try{y.cancel();}catch{}};h.addEventListener("abort",q);try{for(;;){let{done:ee,value:te}=await y.read();if(ee)break;C+=te,C=C.replace(/\r\n/g,`
1
+ var N=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>N(t,r,i)):N(t,r,s));}),t}},L={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var X=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:p,sseMaxRetryAttempts:l,sseMaxRetryDelay:a,sseSleepFn:c,url:u,...n})=>{let E,D=c??(d=>new Promise(f=>setTimeout(f,d)));return {stream:async function*(){let d=p??3e3,f=0,w=n.signal??new AbortController().signal;for(;!w.aborted;){f++;let O=n.headers instanceof Headers?n.headers:new Headers(n.headers);E!==void 0&&O.set("Last-Event-ID",E);try{let P={redirect:"follow",...n,body:n.serializedBody,headers:O,signal:w},m=new Request(u,P);e&&(m=await e(u,P));let A=await(n.fetch??globalThis.fetch)(m);if(!A.ok)throw new Error(`SSE failed: ${A.status} ${A.statusText}`);if(!A.body)throw new Error("No body in SSE response");let x=A.body.pipeThrough(new TextDecoderStream).getReader(),C="",q=()=>{try{x.cancel();}catch{}};w.addEventListener("abort",q);try{for(;;){let{done:ee,value:te}=await x.read();if(ee)break;C+=te,C=C.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let M=C.split(`
4
4
 
5
5
  `);C=M.pop()??"";for(let re of M){let oe=re.split(`
6
- `),v=[],z;for(let m of oe)if(m.startsWith("data:"))v.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))z=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))f=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let j=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(j)||(d=j);}let R,V=!1;if(v.length){let m=v.join(`
7
- `);try{R=JSON.parse(m),V=!0;}catch{R=m;}}V&&(i&&await i(R),s&&(R=await s(R))),r?.({data:R,event:z,id:f,retry:d}),v.length&&(yield R);}}}finally{h.removeEventListener("abort",q),y.releaseLock();}break}catch(P){if(t?.(P),l!==void 0&&E>=l)break;let w=Math.min(d*2**(E-1),a??3e4);await D(w);}}}()}};var ne=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},se=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},I=({allowReserved:e,explode:t,name:r,style:s,value:i})=>{if(!t){let a=(e?i:i.map(c=>encodeURIComponent(c))).join(se(s));switch(s){case "label":return `.${a}`;case "matrix":return `;${r}=${a}`;case "simple":return a;default:return `${r}=${a}`}}let p=ne(s),l=i.map(a=>s==="label"||s==="simple"?e?a:encodeURIComponent(a):S({allowReserved:e,name:r,value:a})).join(p);return s==="label"||s==="matrix"?p+l:l},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},W=({allowReserved:e,explode:t,name:r,style:s,value:i,valueOnly:p})=>{if(i instanceof Date)return p?i.toISOString():`${r}=${i.toISOString()}`;if(s!=="deepObject"&&!t){let c=[];Object.entries(i).forEach(([n,f])=>{c=[...c,n,e?f:encodeURIComponent(f)];});let g=c.join(",");switch(s){case "form":return `${r}=${g}`;case "label":return `.${g}`;case "matrix":return `;${r}=${g}`;default:return g}}let l=ie(s),a=Object.entries(i).map(([c,g])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${c}]`:c,value:g})).join(l);return s==="label"||s==="matrix"?l+a:a};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let i of s){let p=false,l=i.substring(1,i.length-1),a="simple";l.endsWith("*")&&(p=true,l=l.substring(0,l.length-1)),l.startsWith(".")?(l=l.substring(1),a="label"):l.startsWith(";")&&(l=l.substring(1),a="matrix");let c=e[l];if(c==null)continue;if(Array.isArray(c)){r=r.replace(i,I({explode:p,name:l,style:a,value:c}));continue}if(typeof c=="object"){r=r.replace(i,W({explode:p,name:l,style:a,value:c,valueOnly:true}));continue}if(a==="matrix"){r=r.replace(i,`;${S({name:l,value:c})}`);continue}let g=encodeURIComponent(a==="label"?`.${c}`:c);r=r.replace(i,g);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:i})=>{let p=i.startsWith("/")?i:`/${i}`,l=(e??"")+p;t&&(l=le({path:t,url:l}));let a=r?s(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(l+=`?${a}`),l};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let p in s){let l=s[p];if(l==null)continue;let a=e[p]||t;if(Array.isArray(l)){let c=I({allowReserved:a.allowReserved,explode:true,name:p,style:"form",value:l,...a.array});c&&i.push(c);}else if(typeof l=="object"){let c=W({allowReserved:a.allowReserved,explode:true,name:p,style:"deepObject",value:l,...a.object});c&&i.push(c);}else {let c=S({allowReserved:a.allowReserved,name:p,value:l});c&&i.push(c);}}return i.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let i=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[i]=s;break;case "cookie":t.headers.append("Cookie",`${i}=${s}`);break;default:t.headers.set(i,s);break}}},U=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=L(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},L=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[i,p]of s)if(p===null)t.delete(i);else if(Array.isArray(p))for(let l of p)t.append(i,l);else p!==void 0&&t.set(i,typeof p=="object"?JSON.stringify(p):p);}return t},b=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new b,request:new b,response:new b}),de=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),ge={"Content-Type":"application/json"},T=(e={})=>({...F,headers:ge,parseAs:"auto",querySerializer:de,...e});var B=(e={})=>{let t=K(T(),e),r=()=>({...t}),s=g=>(t=K(t,g),r()),i=Z(),p=async g=>{let n={...t,...g,fetch:g.fetch??t.fetch??globalThis.fetch,headers:L(t.headers,g.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let f=U(n);return {opts:n,url:f}},l=async g=>{let{opts:n,url:f}=await p(g),D={redirect:"follow",...n,body:$(n)},x=new Request(f,D);for(let A of i.request.fns)A&&(x=await A(x,n));let k=n.fetch,d;try{d=await k(x);}catch(A){let u=A;for(let y of i.error.fns)y&&(u=await y(A,void 0,x,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:x,response:void 0}}for(let A of i.response.fns)A&&(d=await A(d,x,n));let E={request:x,response:d};if(d.ok){let A=(n.parseAs==="auto"?_(d.headers.get("Content-Type")):n.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let y;switch(A){case "arrayBuffer":case "blob":case "text":y=await d[A]();break;case "formData":y=new FormData;break;case "stream":y=d.body;break;default:y={};break}return n.responseStyle==="data"?y:{data:y,...E}}let u;switch(A){case "arrayBuffer":case "blob":case "formData":case "json":case "text":u=await d[A]();break;case "stream":return n.responseStyle==="data"?d.body:{data:d.body,...E}}return A==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.responseStyle==="data"?u:{data:u,...E}}let h=await d.text(),O;try{O=JSON.parse(h);}catch{}let P=O??h,w=P;for(let A of i.error.fns)A&&(w=await A(P,d,x,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...E}},a=g=>n=>l({...n,method:g}),c=g=>async n=>{let{opts:f,url:D}=await p(n);return X({...f,body:f.body,headers:f.headers,method:g,onRequest:async(x,k)=>{let d=new Request(x,k);for(let E of i.request.fns)E&&(d=await E(d,f));return d},url:D})};return {buildUrl:U,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:i,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:l,setConfig:s,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:a("TRACE")}};var o=B(T({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var Ae=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity",...e}),ue=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/notable",...e}),fe=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/window-stats",...e}),Ee=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),ye=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),me=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),we=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),he=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),Re=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),De=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ce=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),be=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails",...e}),Ge=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails/{emailId}",...e}),Ie=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),We=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/available-tools",...e}),Fe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e}),Ue=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),je=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/inputs",...e}),Xe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/output-schemas",...e}),He=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),$e=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/context",...e}),Qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e}),_e=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}",...e}),Ze=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}/stop",...e}),et=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),tt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),rt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),ot=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files",...e}),nt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files/{fileId}/download",...e}),st=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),it=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),at=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files/{fileId}/download",...e}),lt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/debug-files/{fileId}/download",...e}),ct=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files",...e}),pt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files/{fileId}/download",...e}),dt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),gt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),At=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),ut=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ft=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}}),Et=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}});
8
- export{Ae as adminCustomerActivityList,ue as adminCustomerActivityNotableList,fe as adminCustomerActivityWindowStatsList,Fe as agentByIdDelete,Ue as agentByIdUpdate,We as agentCreate,Ke as agentExecutePost,Ie as agentList,Te as agentProfileClearBrowserCache,Oe as agentProfileDelete,ke as agentProfileDuplicate,Ce as agentProfileGet,Ge as agentProfileGetInboxEmail,ve as agentProfileGetInboxEmails,xe as agentProfilePoolDelete,me as agentProfilePoolGet,Re as agentProfilePoolMembersAdd,Pe as agentProfilePoolMembersList,he as agentProfilePoolMembersRemove,we as agentProfilePoolUpdate,ye as agentProfilePoolsCreate,Ee as agentProfilePoolsList,be as agentProfileUpdate,De as agentProfilesCreate,Se as agentProfilesList,qe as agentWorkflowsCreate,ze as agentWorkflowsDeleteWorkflow,je as agentWorkflowsExecute,Ve as agentWorkflowsGet,Ne as agentWorkflowsGetInputs,Xe as agentWorkflowsGetOutputSchemas,Be as agentWorkflowsList,He as agentWorkflowsPublish,Me as agentWorkflowsValidate,Le as availableToolsList,o as client,$e as contextGet,Qe as docsSearchSearch,Ye as environmentByIdGet,Ze as environmentByIdStop,Je as environmentsList,_e as environmentsStart,rt as executionActivitiesGet,nt as executionAgentFileDownloadRedirect,ot as executionAgentFilesGet,at as executionContextFileDownloadRedirect,st as executionContextFilesGet,it as executionContextFilesUpload,lt as executionDebugFileDownloadRedirect,pt as executionFileDownloadRedirect,ct as executionFilesGet,tt as executionGet,dt as executionRecordingRedirect,gt as executionStatusUpdate,At as executionUserMessagesAdd,et as executionsList,ut as schemaValidationValidate,ft as tempFilesStage,Et as workflowSpecValidationValidate};
6
+ `),v=[],z;for(let h of oe)if(h.startsWith("data:"))v.push(h.replace(/^data:\s*/,""));else if(h.startsWith("event:"))z=h.replace(/^event:\s*/,"");else if(h.startsWith("id:"))E=h.replace(/^id:\s*/,"");else if(h.startsWith("retry:")){let j=Number.parseInt(h.replace(/^retry:\s*/,""),10);Number.isNaN(j)||(d=j);}let R,V=!1;if(v.length){let h=v.join(`
7
+ `);try{R=JSON.parse(h),V=!0;}catch{R=h;}}V&&(i&&await i(R),s&&(R=await s(R))),r?.({data:R,event:z,id:E,retry:d}),v.length&&(yield R);}}}finally{w.removeEventListener("abort",q),x.releaseLock();}break}catch(P){if(t?.(P),l!==void 0&&f>=l)break;let m=Math.min(d*2**(f-1),a??3e4);await D(m);}}}()}};var ne=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},se=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},I=({allowReserved:e,explode:t,name:r,style:s,value:i})=>{if(!t){let a=(e?i:i.map(c=>encodeURIComponent(c))).join(se(s));switch(s){case "label":return `.${a}`;case "matrix":return `;${r}=${a}`;case "simple":return a;default:return `${r}=${a}`}}let p=ne(s),l=i.map(a=>s==="label"||s==="simple"?e?a:encodeURIComponent(a):S({allowReserved:e,name:r,value:a})).join(p);return s==="label"||s==="matrix"?p+l:l},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},W=({allowReserved:e,explode:t,name:r,style:s,value:i,valueOnly:p})=>{if(i instanceof Date)return p?i.toISOString():`${r}=${i.toISOString()}`;if(s!=="deepObject"&&!t){let c=[];Object.entries(i).forEach(([n,E])=>{c=[...c,n,e?E:encodeURIComponent(E)];});let u=c.join(",");switch(s){case "form":return `${r}=${u}`;case "label":return `.${u}`;case "matrix":return `;${r}=${u}`;default:return u}}let l=ie(s),a=Object.entries(i).map(([c,u])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${c}]`:c,value:u})).join(l);return s==="label"||s==="matrix"?l+a:a};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let i of s){let p=false,l=i.substring(1,i.length-1),a="simple";l.endsWith("*")&&(p=true,l=l.substring(0,l.length-1)),l.startsWith(".")?(l=l.substring(1),a="label"):l.startsWith(";")&&(l=l.substring(1),a="matrix");let c=e[l];if(c==null)continue;if(Array.isArray(c)){r=r.replace(i,I({explode:p,name:l,style:a,value:c}));continue}if(typeof c=="object"){r=r.replace(i,W({explode:p,name:l,style:a,value:c,valueOnly:true}));continue}if(a==="matrix"){r=r.replace(i,`;${S({name:l,value:c})}`);continue}let u=encodeURIComponent(a==="label"?`.${c}`:c);r=r.replace(i,u);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:i})=>{let p=i.startsWith("/")?i:`/${i}`,l=(e??"")+p;t&&(l=le({path:t,url:l}));let a=r?s(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(l+=`?${a}`),l};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let p in s){let l=s[p];if(l==null)continue;let a=e[p]||t;if(Array.isArray(l)){let c=I({allowReserved:a.allowReserved,explode:true,name:p,style:"form",value:l,...a.array});c&&i.push(c);}else if(typeof l=="object"){let c=W({allowReserved:a.allowReserved,explode:true,name:p,style:"deepObject",value:l,...a.object});c&&i.push(c);}else {let c=S({allowReserved:a.allowReserved,name:p,value:l});c&&i.push(c);}}return i.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let i=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[i]=s;break;case "cookie":t.headers.append("Cookie",`${i}=${s}`);break;default:t.headers.set(i,s);break}}},F=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=B(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},B=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[i,p]of s)if(p===null)t.delete(i);else if(Array.isArray(p))for(let l of p)t.append(i,l);else p!==void 0&&t.set(i,typeof p=="object"?JSON.stringify(p):p);}return t},b=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new b,request:new b,response:new b}),de=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),ue={"Content-Type":"application/json"},T=(e={})=>({...L,headers:ue,parseAs:"auto",querySerializer:de,...e});var U=(e={})=>{let t=K(T(),e),r=()=>({...t}),s=u=>(t=K(t,u),r()),i=Z(),p=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:B(t.headers,u.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let E=F(n);return {opts:n,url:E}},l=async u=>{let{opts:n,url:E}=await p(u),D={redirect:"follow",...n,body:$(n)},y=new Request(E,D);for(let g of i.request.fns)g&&(y=await g(y,n));let k=n.fetch,d;try{d=await k(y);}catch(g){let A=g;for(let x of i.error.fns)x&&(A=await x(g,void 0,y,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,request:y,response:void 0}}for(let g of i.response.fns)g&&(d=await g(d,y,n));let f={request:y,response:d};if(d.ok){let g=(n.parseAs==="auto"?_(d.headers.get("Content-Type")):n.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let x;switch(g){case "arrayBuffer":case "blob":case "text":x=await d[g]();break;case "formData":x=new FormData;break;case "stream":x=d.body;break;default:x={};break}return n.responseStyle==="data"?x:{data:x,...f}}let A;switch(g){case "arrayBuffer":case "blob":case "formData":case "json":case "text":A=await d[g]();break;case "stream":return n.responseStyle==="data"?d.body:{data:d.body,...f}}return g==="json"&&(n.responseValidator&&await n.responseValidator(A),n.responseTransformer&&(A=await n.responseTransformer(A))),n.responseStyle==="data"?A:{data:A,...f}}let w=await d.text(),O;try{O=JSON.parse(w);}catch{}let P=O??w,m=P;for(let g of i.error.fns)g&&(m=await g(P,d,y,n));if(m=m||{},n.throwOnError)throw m;return n.responseStyle==="data"?void 0:{error:m,...f}},a=u=>n=>l({...n,method:u}),c=u=>async n=>{let{opts:E,url:D}=await p(n);return X({...E,body:E.body,headers:E.headers,method:u,onRequest:async(y,k)=>{let d=new Request(y,k);for(let f of i.request.fns)f&&(d=await f(d,E));return d},url:D})};return {buildUrl:F,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:i,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:l,setConfig:s,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:a("TRACE")}};var o=U(T({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity",...e}),Ae=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/notable",...e}),Ee=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/admin/customer-activity/window-stats",...e}),fe=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),xe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),he=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),me=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),Re=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),De=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ce=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),be=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails",...e}),Ge=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/inbox-emails/{emailId}",...e}),Ie=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),We=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/available-tools",...e}),Le=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e}),Fe=e=>(e.client??o).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??o).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ve=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),je=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/inputs",...e}),Xe=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/output-schemas",...e}),He=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),$e=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/context",...e}),Qe=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e}),_e=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}",...e}),Ze=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/environments/{environmentId}/stop",...e}),et=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches",...e}),tt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches",...e,headers:{"Content-Type":"application/json",...e.headers}}),rt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}",...e}),ot=e=>(e.client??o).put({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}/cancel",...e}),nt=e=>(e.client??o).put({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}/pause",...e}),st=e=>(e.client??o).put({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/execution-batches/{batchId}/resume",...e}),it=e=>(e?.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),at=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),lt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),ct=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files",...e}),pt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/agent-files/{fileId}/download",...e}),dt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),ut=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),gt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files/{fileId}/download",...e}),At=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/debug-files/{fileId}/download",...e}),Et=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files",...e}),ft=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/files/{fileId}/download",...e}),xt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),yt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),ht=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),mt=e=>(e.client??o).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/scheduled-executions",...e}),wt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pt=e=>(e.client??o).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}}),Rt=e=>(e.client??o).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/workflows/validate",...e,headers:{"Content-Type":"application/json",...e.headers}});
8
+ export{ge as adminCustomerActivityList,Ae as adminCustomerActivityNotableList,Ee as adminCustomerActivityWindowStatsList,Le as agentByIdDelete,Fe as agentByIdUpdate,We as agentCreate,Ke as agentExecutePost,Ie as agentList,Te as agentProfileClearBrowserCache,Oe as agentProfileDelete,ke as agentProfileDuplicate,Ce as agentProfileGet,Ge as agentProfileGetInboxEmail,ve as agentProfileGetInboxEmails,ye as agentProfilePoolDelete,he as agentProfilePoolGet,Re as agentProfilePoolMembersAdd,Pe as agentProfilePoolMembersList,we as agentProfilePoolMembersRemove,me as agentProfilePoolUpdate,xe as agentProfilePoolsCreate,fe as agentProfilePoolsList,be as agentProfileUpdate,De as agentProfilesCreate,Se as agentProfilesList,qe as agentWorkflowsCreate,ze as agentWorkflowsDeleteWorkflow,je as agentWorkflowsExecute,Ve as agentWorkflowsGet,Ne as agentWorkflowsGetInputs,Xe as agentWorkflowsGetOutputSchemas,Ue as agentWorkflowsList,He as agentWorkflowsPublish,Me as agentWorkflowsValidate,Be as availableToolsList,o as client,$e as contextGet,Qe as docsSearchSearch,Ye as environmentByIdGet,Ze as environmentByIdStop,Je as environmentsList,_e as environmentsStart,lt as executionActivitiesGet,pt as executionAgentFileDownloadRedirect,ct as executionAgentFilesGet,ot as executionBatchCancel,rt as executionBatchGet,nt as executionBatchPause,st as executionBatchResume,tt as executionBatchesCreate,et as executionBatchesList,gt as executionContextFileDownloadRedirect,dt as executionContextFilesGet,ut as executionContextFilesUpload,At as executionDebugFileDownloadRedirect,ft as executionFileDownloadRedirect,Et as executionFilesGet,at as executionGet,xt as executionRecordingRedirect,yt as executionStatusUpdate,ht as executionUserMessagesAdd,it as executionsList,mt as scheduledExecutionsList,wt as schemaValidationValidate,Pt as tempFilesStage,Rt as workflowSpecValidationValidate};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asteroid-odyssey",
3
- "version": "1.7.310",
3
+ "version": "1.7.312",
4
4
  "description": "SDK for interacting with Asteroid Agents API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",