@datalayer/agent-runtimes 1.5.87 → 1.5.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist-embed/datalayer-app-main.js +4 -4
  2. package/lib/apps/apps/checks.d.ts +1 -1
  3. package/lib/apps/apps/checks.js +1 -1
  4. package/lib/apps/apps/computer.d.ts +1 -1
  5. package/lib/apps/apps/computer.js +1 -1
  6. package/lib/apps/apps/pluginPair.d.ts +1 -1
  7. package/lib/apps/apps/rules.d.ts +1 -1
  8. package/lib/apps/apps/rules.js +2 -2
  9. package/lib/apps/apps/visitorToken.d.ts +1 -1
  10. package/lib/apps/apps/visitorToken.js +1 -1
  11. package/lib/apps/core/appFiles.js +1 -1
  12. package/lib/apps/plugins/a2ui-surface/toolResult.d.ts +1 -1
  13. package/lib/apps/plugins/a2ui-surface/toolResult.js +1 -1
  14. package/lib/apps/plugins/app-page/appPageModel.d.ts +1 -1
  15. package/lib/apps/plugins/app-page/appPageModel.js +1 -1
  16. package/lib/portable/hosts/client.d.ts +11 -1
  17. package/lib/portable/hosts/client.js +12 -6
  18. package/lib/portable/hosts/contracts.json +9 -3
  19. package/lib/portable/hosts/index.d.ts +1 -1
  20. package/lib/portable/records.d.ts +1 -1
  21. package/lib/portable/records.js +1 -1
  22. package/lib/portable/semantic-events.json +3 -3
  23. package/lib/portable/semanticOfAgUi.d.ts +1 -1
  24. package/lib/runtimes/variants.d.ts +1 -1
  25. package/lib/runtimes/variants.js +1 -1
  26. package/lib/specs/agents/agents.d.ts +1 -0
  27. package/lib/specs/agents/agents.js +49 -0
  28. package/lib/specs/apps.js +32 -32
  29. package/lib/specs/harnesses.d.ts +1 -0
  30. package/lib/specs/harnesses.js +62 -19
  31. package/lib/specs/index.d.ts +1 -1
  32. package/lib/specs/index.js +1 -1
  33. package/package.json +1 -1
  34. package/scripts/codegen/generate_apps.py +1 -1
  35. package/scripts/validate_pap_examples.py +1 -1
@@ -2324,7 +2324,7 @@ Execution failed: ${Du}`,diff:Pu}}}catch(Pu){const Ou=Pu instanceof Error?Pu.mes
2324
2324
  `)}function decode$4(Au,lo){return decodeFromLines(Au.split(`
2325
2325
  `))}function encodeLines(Au,lo){return encodeJsonValue(normalizeValue(Au),resolveOptions(),0)}function decodeFromLines(Au,lo){const $u=resolveDecodeOptions();return buildValueFromEvents(decodeStreamSync$1(Au,{indent:$u.indent,strict:$u.strict}))}function resolveOptions(Au){return{indent:2,delimiter:DEFAULT_DELIMITER,keyFolding:"off",flattenDepth:Number.POSITIVE_INFINITY}}function resolveDecodeOptions(Au){return{indent:2,strict:!0,expandPaths:"off"}}function formatResponse(Au,lo){return lo==="json"?Au:encode$4(Au)}class DefaultExecutor{documentId;store;constructor(lo,$u){this.documentId=lo,this.store=$u}async execute(lo,$u){const Ru=this.store[lo];if(typeof Ru!="function")throw new Error(`Store method '${lo}' not found or not a function`);const Iu=typeof $u=="object"&&$u!==null?{id:this.documentId,...$u}:{id:this.documentId};return await Ru.call(this.store,Iu)}}class OperationRunner{async execute(lo,$u,Ru){const Iu=await lo.execute($u,Ru);return formatResponse(Iu,Ru.format)}}const notebookToolDefinitions=[insertCellTool,deleteCellsTool,updateCellTool,readCellTool,readAllCellsTool,runCellTool,executeCodeTool],notebookToolOperations={insertCell:insertCellOperation,deleteCells:deleteCellsOperation,updateCell:updateCellOperation,readCell:readCellOperation,readAllCells:readAllCellsOperation,runCell:runCellOperation,executeCodeInNotebook:executeCodeOperation,executeCode:executeCodeOperation},notebookTools={definitions:notebookToolDefinitions,operations:notebookToolOperations},SPACE_CONTEXT_COOKIE="datalayer-space-context",SPACE_CONTEXT_COOKIE_MAX_AGE=3600*24*365,readSpaceContextCookie=()=>{if(typeof document>"u")return;const Au=SPACE_CONTEXT_COOKIE.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),lo=document.cookie.match(new RegExp(`(?:^|;\\s*)${Au}=([^;]*)`));if(lo?.[1])try{const $u=JSON.parse(decodeURIComponent(lo[1]));return!$u||typeof $u!="object"||typeof $u.id!="string"?void 0:{id:$u.id,handle:typeof $u.handle=="string"?$u.handle:void 0,name:typeof $u.name=="string"?$u.name:void 0}}catch{return}},writeSpaceContextCookie=Au=>{if(typeof document>"u")return;if(!Au?.id){document.cookie=`${SPACE_CONTEXT_COOKIE}=; path=/; max-age=0; SameSite=Lax`;return}const lo=encodeURIComponent(JSON.stringify({id:Au.id,handle:Au.handle,name:Au.name}));document.cookie=`${SPACE_CONTEXT_COOKIE}=${lo}; path=/; max-age=${SPACE_CONTEXT_COOKIE_MAX_AGE}; SameSite=Lax`},initialSpaceContext=readSpaceContextCookie(),layoutStore=createStore$1((Au,lo)=>({backdrop:void 0,banner:void 0,bootstrapped:!1,item:void 0,itemsRefreshCount:0,leftPortal:void 0,leftSidebarVariant:"empty",organization:void 0,rightPortal:void 0,screenCapture:void 0,space:initialSpaceContext,team:void 0,hideBackdrop:()=>Au($u=>({backdrop:{open:!1,message:void 0}})),hideScreencapture:()=>Au($u=>({screenshot:{open:!1,message:void 0}})),setBootstrapped:$u=>Au(Ru=>({bootstrapped:$u})),showBackdrop:$u=>Au(Ru=>({backdrop:{open:!0,message:$u}})),showScreencapture:$u=>Au(Ru=>({screenshot:{open:!0,message:$u}})),setBanner:$u=>Au(Ru=>({banner:{timestamp:new Date,message:$u.message,variant:$u.variant}})),setLeftPortal:$u=>Au(Ru=>({leftPortal:$u})),setRightPortal:$u=>Au(Ru=>({rightPortal:$u})),resetLeftPortal:()=>Au($u=>({leftPortal:$u.leftPortal?.pinned?$u.leftPortal:void 0})),resetRightPortal:()=>Au($u=>({rightPortal:$u.rightPortal?.pinned?$u.rightPortal:void 0})),resetForcedLeftPortal:()=>Au($u=>({leftPortal:void 0})),resetForcedRightPortal:()=>Au($u=>({rightPortal:void 0})),setLeftSidebarVariant:$u=>Au(Ru=>({leftSidebarVariant:$u})),updateLayoutOrganization:$u=>Au(Ru=>({organization:$u?{...Ru.organization,...$u}:void 0})),updateLayoutTeam:$u=>Au(Ru=>({team:$u?{...Ru.team,...$u}:void 0})),updateLayoutSpace:$u=>Au(Ru=>{const Iu=$u?{...Ru.space,...$u}:void 0;return writeSpaceContextCookie(Iu),{space:Iu}}),setItem:$u=>Au(Ru=>({item:$u})),triggerItemsRefresh:()=>Au($u=>({itemsRefreshCount:$u.itemsRefreshCount+1})),setScreencapture:$u=>Au(Ru=>({screenCapture:$u})),reset:()=>Au($u=>({bootstrapped:!1}))}));registerSessionState({forget:()=>{const Au=layoutStore.getState();Au.updateLayoutSpace(void 0),Au.updateLayoutOrganization(void 0),Au.updateLayoutTeam(void 0),Au.setItem(void 0)}});function useLayoutStore(Au){return useStore$1(layoutStore,Au)}var ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,PROTOCOL_RELATIVE_URL_REGEX=/^[\\/]{2}/;function normalizeProtocolRelativeUrl(Au,lo){return lo+Au.replace(/\\/g,"/")}function invariant(Au,lo){if(Au===!1||Au===null||typeof Au>"u")throw new Error(lo)}function warning(Au,lo){if(!Au){typeof console<"u"&&console.warn(lo);try{throw new Error(lo)}catch{}}}function createPath({pathname:Au="/",search:lo="",hash:$u=""}){return lo&&lo!=="?"&&(Au+=lo.charAt(0)==="?"?lo:"?"+lo),$u&&$u!=="#"&&(Au+=$u.charAt(0)==="#"?$u:"#"+$u),Au}function parsePath(Au){let lo={};if(Au){let $u=Au.indexOf("#");$u>=0&&(lo.hash=Au.substring($u),Au=Au.substring(0,$u));let Ru=Au.indexOf("?");Ru>=0&&(lo.search=Au.substring(Ru),Au=Au.substring(0,Ru)),Au&&(lo.pathname=Au)}return lo}function matchRoutes(Au,lo,$u="/"){return matchRoutesImpl(Au,lo,$u,!1)}function matchRoutesImpl(Au,lo,$u,Ru,Iu){let Pu=typeof lo=="string"?parsePath(lo):lo,Ou=stripBasename(Pu.pathname||"/",$u);if(Ou==null)return null;let Mu=flattenAndRankRoutes(Au),Du=null,Lu=decodePath(Ou);for(let Bu=0;Du==null&&Bu<Mu.length;++Bu)Du=matchRouteBranch(Mu[Bu],Lu,Ru);return Du}function flattenAndRankRoutes(Au){let lo=flattenRoutes(Au);return rankRouteBranches(lo),lo}function flattenRoutes(Au,lo=[],$u=[],Ru="",Iu=!1){let Pu=(Ou,Mu,Du=Iu,Lu)=>{let Bu={relativePath:Lu===void 0?Ou.path||"":Lu,caseSensitive:Ou.caseSensitive===!0,childrenIndex:Mu,route:Ou};if(Bu.relativePath.startsWith("/")){if(!Bu.relativePath.startsWith(Ru)&&Du)return;invariant(Bu.relativePath.startsWith(Ru),`Absolute route path "${Bu.relativePath}" nested under path "${Ru}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),Bu.relativePath=Bu.relativePath.slice(Ru.length)}let ju=joinPaths([Ru,Bu.relativePath]),Fu=$u.concat(Bu);Ou.children&&Ou.children.length>0&&(invariant(Ou.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${ju}".`),flattenRoutes(Ou.children,lo,Fu,ju,Du)),!(Ou.path==null&&!Ou.index)&&lo.push({path:ju,score:computeScore(ju,Ou.index),routesMeta:Fu.map((zu,Uu)=>{let[Hu,Vu]=compilePath(zu.relativePath,zu.caseSensitive,Uu===Fu.length-1);return{...zu,matcher:Hu,compiledParams:Vu}})})};return Au.forEach((Ou,Mu)=>{if(Ou.path===""||!Ou.path?.includes("?"))Pu(Ou,Mu);else for(let Du of explodeOptionalSegments(Ou.path))Pu(Ou,Mu,!0,Du)}),lo}function explodeOptionalSegments(Au){let lo=Au.split("/");if(lo.length===0)return[];let[$u,...Ru]=lo,Iu=$u.endsWith("?"),Pu=$u.replace(/\?$/,"");if(Ru.length===0)return Iu?[Pu,""]:[Pu];let Ou=explodeOptionalSegments(Ru.join("/")),Mu=[];return Mu.push(...Ou.map(Du=>Du===""?Pu:[Pu,Du].join("/"))),Iu&&Mu.push(...Ou),Mu.map(Du=>Au.startsWith("/")&&Du===""?"/":Du)}function rankRouteBranches(Au){Au.sort((lo,$u)=>lo.score!==$u.score?$u.score-lo.score:compareIndexes(lo.routesMeta.map(Ru=>Ru.childrenIndex),$u.routesMeta.map(Ru=>Ru.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=Au=>Au==="*";function computeScore(Au,lo){let $u=Au.split("/"),Ru=$u.length;return $u.some(isSplat)&&(Ru+=splatPenalty),lo&&(Ru+=indexRouteValue),$u.filter(Iu=>!isSplat(Iu)).reduce((Iu,Pu)=>Iu+(paramRe.test(Pu)?dynamicSegmentValue:Pu===""?emptySegmentValue:staticSegmentValue),Ru)}function compareIndexes(Au,lo){return Au.length===lo.length&&Au.slice(0,-1).every((Ru,Iu)=>Ru===lo[Iu])?Au[Au.length-1]-lo[lo.length-1]:0}function matchRouteBranch(Au,lo,$u=!1){let{routesMeta:Ru}=Au,Iu={},Pu="/",Ou=[];for(let Mu=0;Mu<Ru.length;++Mu){let Du=Ru[Mu],Lu=Mu===Ru.length-1,Bu=Pu==="/"?lo:lo.slice(Pu.length)||"/",ju={path:Du.relativePath,caseSensitive:Du.caseSensitive,end:Lu},Fu=Du.matcher&&Du.compiledParams?matchPathImpl(ju,Bu,Du.matcher,Du.compiledParams):matchPath(ju,Bu),zu=Du.route;if(!Fu&&Lu&&$u&&!Ru[Ru.length-1].route.index&&(Fu=matchPath({path:Du.relativePath,caseSensitive:Du.caseSensitive,end:!1},Bu)),!Fu)return null;Object.assign(Iu,Fu.params),Ou.push({params:Iu,pathname:joinPaths([Pu,Fu.pathname]),pathnameBase:normalizePathname$1(joinPaths([Pu,Fu.pathnameBase])),route:zu}),Fu.pathnameBase!=="/"&&(Pu=joinPaths([Pu,Fu.pathnameBase]))}return Ou}function matchPath(Au,lo){typeof Au=="string"&&(Au={path:Au,caseSensitive:!1,end:!0});let[$u,Ru]=compilePath(Au.path,Au.caseSensitive,Au.end);return matchPathImpl(Au,lo,$u,Ru)}function matchPathImpl(Au,lo,$u,Ru){let Iu=lo.match($u);if(!Iu)return null;let Pu=Iu[0],Ou=removeTrailingSlash(Pu,1),Mu=Iu.slice(1);return{params:Ru.reduce((Lu,{paramName:Bu,isOptional:ju},Fu)=>{if(Bu==="*"){let Uu=Mu[Fu]||"";Ou=removeTrailingSlash(Pu.slice(0,Pu.length-Uu.length),1)}const zu=Mu[Fu];return ju&&!zu?Lu[Bu]=void 0:Lu[Bu]=(zu||"").replace(/%2F/g,"/"),Lu},{}),pathname:Pu,pathnameBase:Ou,pattern:Au}}function compilePath(Au,lo=!1,$u=!0){warning(Au==="*"||!Au.endsWith("*")||Au.endsWith("/*"),`Route path "${Au}" will be treated as if it were "${Au.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${Au.replace(/\*$/,"/*")}".`);let Ru=[],Iu="^"+Au.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(Ou,Mu,Du,Lu,Bu)=>{if(Ru.push({paramName:Mu,isOptional:Du!=null}),Du){let ju=Bu.charAt(Lu+Ou.length);return ju&&ju!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return Au.endsWith("*")?(Ru.push({paramName:"*"}),Iu+=Au==="*"||Au==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):$u?Iu+="\\/*$":Au!==""&&Au!=="/"&&(Iu+="(?:(?=\\/|$))"),[new RegExp(Iu,lo?void 0:"i"),Ru]}function decodePath(Au){try{return Au.split("/").map(lo=>decodeURIComponent(lo).replace(/\//g,"%2F")).join("/")}catch(lo){return warning(!1,`The URL path "${Au}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${lo}).`),Au}}function stripBasename(Au,lo){if(lo==="/")return Au;if(!Au.toLowerCase().startsWith(lo.toLowerCase()))return null;let $u=lo.endsWith("/")?lo.length-1:lo.length,Ru=Au.charAt($u);return Ru&&Ru!=="/"?null:Au.slice($u)||"/"}function resolvePath(Au,lo="/"){let{pathname:$u,search:Ru="",hash:Iu=""}=typeof Au=="string"?parsePath(Au):Au,Pu;return $u?($u=removeDoubleSlashes($u),$u.startsWith("/")||$u.startsWith("\\")?Pu=resolvePathname($u.substring(1),"/"):Pu=resolvePathname($u,lo)):Pu=lo,{pathname:Pu,search:normalizeSearch(Ru),hash:normalizeHash(Iu)}}function resolvePathname(Au,lo){let $u=removeTrailingSlash(lo).split("/");return Au.split("/").forEach(Iu=>{Iu===".."?$u.length>1&&$u.pop():Iu!=="."&&$u.push(Iu)}),$u.length>1?$u.join("/"):"/"}function getInvalidPathError(Au,lo,$u,Ru){return`Cannot include a '${Au}' character in a manually specified \`to.${lo}\` field [${JSON.stringify(Ru)}]. Please separate it out to the \`to.${$u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(Au){return Au.filter((lo,$u)=>$u===0||lo.route.path&&lo.route.path.length>0)}function getResolveToMatches(Au){let lo=getPathContributingMatches(Au);return lo.map(($u,Ru)=>Ru===lo.length-1?$u.pathname:$u.pathnameBase)}function resolveTo(Au,lo,$u,Ru=!1){let Iu;typeof Au=="string"?Iu=parsePath(Au):(Iu={...Au},invariant(!Iu.pathname||!Iu.pathname.includes("?"),getInvalidPathError("?","pathname","search",Iu)),invariant(!Iu.pathname||!Iu.pathname.includes("#"),getInvalidPathError("#","pathname","hash",Iu)),invariant(!Iu.search||!Iu.search.includes("#"),getInvalidPathError("#","search","hash",Iu)));let Pu=Au===""||Iu.pathname==="",Ou=Pu?"/":Iu.pathname,Mu;if(Ou==null)Mu=$u;else{let ju=lo.length-1;if(!Ru&&Ou.startsWith("..")){let Fu=Ou.split("/");for(;Fu[0]==="..";)Fu.shift(),ju-=1;Iu.pathname=Fu.join("/")}Mu=ju>=0?lo[ju]:"/"}let Du=resolvePath(Iu,Mu),Lu=Ou&&Ou!=="/"&&Ou.endsWith("/"),Bu=(Pu||Ou===".")&&$u.endsWith("/");return!Du.pathname.endsWith("/")&&(Lu||Bu)&&(Du.pathname+="/"),Du}var removeDoubleSlashes=Au=>Au.replace(/[\\/]{2,}/g,"/"),joinPaths=Au=>removeDoubleSlashes(Au.join("/"));function removeTrailingSlash(Au,lo=0){let $u=Au.length;for(;$u>lo&&Au.charCodeAt($u-1)===47;)$u--;return $u===Au.length?Au:Au.slice(0,$u)}var normalizePathname$1=Au=>removeTrailingSlash(Au).replace(/^\/*/,"/"),normalizeSearch=Au=>!Au||Au==="?"?"":Au.startsWith("?")?Au:"?"+Au,normalizeHash=Au=>!Au||Au==="#"?"":Au.startsWith("#")?Au:"#"+Au,ErrorResponseImpl=class{constructor(Au,lo,$u,Ru=!1){this.status=Au,this.statusText=lo||"",this.internal=Ru,$u instanceof Error?(this.data=$u.toString(),this.error=$u):this.data=$u}};function isRouteErrorResponse(Au){return Au!=null&&typeof Au.status=="number"&&typeof Au.statusText=="string"&&typeof Au.internal=="boolean"&&"data"in Au}function getRoutePattern(Au){let lo=Au.map($u=>$u.route.path).filter(Boolean);return joinPaths(lo)||"/"}var isBrowser=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function parseToInfo(Au,lo){let $u=Au;if(typeof $u!="string"||!ABSOLUTE_URL_REGEX.test($u))return{absoluteURL:void 0,isExternal:!1,to:$u};let Ru=$u,Iu=!1;if(isBrowser)try{let Pu=new URL(window.location.href),Ou=PROTOCOL_RELATIVE_URL_REGEX.test($u)?new URL(normalizeProtocolRelativeUrl($u,Pu.protocol)):new URL($u),Mu=stripBasename(Ou.pathname,lo);Ou.origin===Pu.origin&&Mu!=null?$u=Mu+Ou.search+Ou.hash:Iu=!0}catch{warning(!1,`<Link to="${$u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:Ru,isExternal:Iu,to:$u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var DEFAULT_NAVIGATION_URL=new URL("http://localhost");function getNavigatorCurrentUrl(Au){if(Au.createURL)return Au.createURL("/");try{return new URL(Au.createHref("/"),DEFAULT_NAVIGATION_URL)}catch{return DEFAULT_NAVIGATION_URL}}function isSameOrigin$3(Au,lo){return Au.origin===lo.origin&&(Au.origin!=="null"||Au.protocol===lo.protocol&&Au.host===lo.host)}function isExplicitUrl(Au,lo){if(Au.startsWith("//"))return!0;let $u=lo.protocol.toLowerCase();return Au.toLowerCase().startsWith($u)?lo.host===""||Au.slice($u.length).startsWith("//"):!1}function validateNavigationTarget(Au,lo,$u,Ru){let Iu=null;try{Iu=Au==null?null:new URL(Au,$u)}catch{}let Pu=new URL(lo,$u),Ou=Iu!=null&&!isSameOrigin$3(Iu,$u),Mu=!isSameOrigin$3(Pu,$u);if(Ru==="reject"){if(Ou||Mu)throw new Error("External navigation is not allowed")}else if(Mu&&(Iu==null||!isExplicitUrl(Au,Iu)||!isSameOrigin$3(Iu,Pu)))throw new Error("External navigation is not allowed")}var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"];new Set(validMutationMethodsArr);var validRequestMethodsArr=["GET",...validMutationMethodsArr];new Set(validRequestMethodsArr);var invalidProtocols=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function hasInvalidProtocol(Au){try{return invalidProtocols.includes(new URL(Au).protocol)}catch{return!1}}var DataRouterContext=reactExports.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=reactExports.createContext(null);DataRouterStateContext.displayName="DataRouterState";var RSCRouterContext=reactExports.createContext(!1);function useIsRSCRouterContext(){return reactExports.useContext(RSCRouterContext)}var ViewTransitionContext=reactExports.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=reactExports.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=reactExports.createContext(null);AwaitContext.displayName="Await";var NavigationContext=reactExports.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=reactExports.createContext(null);LocationContext.displayName="Location";var RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=reactExports.createContext(null);RouteErrorContext.displayName="RouteError";var ERROR_DIGEST_BASE="REACT_ROUTER_ERROR",ERROR_DIGEST_REDIRECT="REDIRECT",ERROR_DIGEST_ROUTE_ERROR_RESPONSE="ROUTE_ERROR_RESPONSE";function decodeRedirectErrorDigest(Au){if(Au.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`))try{let lo=JSON.parse(Au.slice(28));if(typeof lo=="object"&&lo&&typeof lo.status=="number"&&typeof lo.statusText=="string"&&typeof lo.location=="string"&&typeof lo.reloadDocument=="boolean"&&typeof lo.replace=="boolean")return lo}catch{}}function decodeRouteErrorResponseDigest(Au){if(Au.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`))try{let lo=JSON.parse(Au.slice(40));if(typeof lo=="object"&&lo&&typeof lo.status=="number"&&typeof lo.statusText=="string")return new ErrorResponseImpl(lo.status,lo.statusText,lo.data)}catch{}}function useHref(Au,{relative:lo}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a <Router> component.");let{basename:$u,navigator:Ru}=reactExports.useContext(NavigationContext),{hash:Iu,pathname:Pu,search:Ou}=useResolvedPath(Au,{relative:lo}),Mu=Pu;return $u!=="/"&&(Mu=Pu==="/"?$u:joinPaths([$u,Pu])),Ru.createHref({pathname:Mu,search:Ou,hash:Iu})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation$1(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a <Router> component."),reactExports.useContext(LocationContext).location}var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(Au){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(Au)}function useNavigate$1(){let{isDataRoute:Au}=reactExports.useContext(RouteContext);return Au?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a <Router> component.");let Au=reactExports.useContext(DataRouterContext),{basename:lo,navigator:$u}=reactExports.useContext(NavigationContext),{matches:Ru}=reactExports.useContext(RouteContext),{pathname:Iu}=useLocation$1(),Pu=JSON.stringify(getResolveToMatches(Ru)),Ou=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{Ou.current=!0}),reactExports.useCallback((Du,Lu={})=>{if(warning(Ou.current,navigateEffectWarning),!Ou.current)return;if(typeof Du=="number"){$u.go(Du);return}let Bu=resolveTo(Du,JSON.parse(Pu),Iu,Lu.relative==="path");Au==null&&lo!=="/"&&(Bu.pathname=Bu.pathname==="/"?lo:joinPaths([lo,Bu.pathname])),validateNavigationTarget(typeof Du=="string"?Du:createPath(Du),$u.createHref(Bu),getNavigatorCurrentUrl($u),"reject"),(Lu.replace?$u.replace:$u.push)(Bu,Lu.state,Lu)},[lo,$u,Pu,Iu,Au])}reactExports.createContext(null);function useResolvedPath(Au,{relative:lo}={}){let{matches:$u}=reactExports.useContext(RouteContext),{pathname:Ru}=useLocation$1(),Iu=JSON.stringify(getResolveToMatches($u));return reactExports.useMemo(()=>resolveTo(Au,JSON.parse(Iu),Ru,lo==="path"),[Au,Iu,Ru,lo])}function useRoutesImpl(Au,lo,$u){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:Ru}=reactExports.useContext(NavigationContext),{matches:Iu}=reactExports.useContext(RouteContext),Pu=Iu[Iu.length-1],Ou=Pu?Pu.params:{},Mu=Pu?Pu.pathname:"/",Du=Pu?Pu.pathnameBase:"/",Lu=Pu&&Pu.route;{let Vu=Lu&&Lu.path||"";warningOnce(Mu,!Lu||Vu.endsWith("*")||Vu.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${Mu}" (under <Route path="${Vu}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2326
2326
 
2327
- Please change the parent <Route path="${Vu}"> to <Route path="${Vu==="/"?"*":`${Vu}/*`}">.`)}let Bu=useLocation$1(),ju;ju=Bu;let Fu=ju.pathname||"/",zu=Fu;if(Du!=="/"){let Vu=Du.replace(/^\//,"").split("/");zu="/"+Fu.replace(/^\//,"").split("/").slice(Vu.length).join("/")}let Uu=$u&&$u.state.matches.length?$u.state.matches.map(Vu=>Object.assign(Vu,{route:$u.manifest[Vu.route.id]||Vu.route})):matchRoutes(Au,{pathname:zu});return warning(Lu||Uu!=null,`No routes matched location "${ju.pathname}${ju.search}${ju.hash}" `),warning(Uu==null||Uu[Uu.length-1].route.element!==void 0||Uu[Uu.length-1].route.Component!==void 0||Uu[Uu.length-1].route.lazy!==void 0,`Matched leaf route at location "${ju.pathname}${ju.search}${ju.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(Uu&&Uu.map(Vu=>Object.assign({},Vu,{params:Object.assign({},Ou,Vu.params),pathname:joinPaths([Du,Ru.encodeLocation?Ru.encodeLocation(Vu.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Vu.pathname]),pathnameBase:Vu.pathnameBase==="/"?Du:joinPaths([Du,Ru.encodeLocation?Ru.encodeLocation(Vu.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Vu.pathnameBase])})),Iu,$u)}function DefaultErrorComponent(){let Au=useRouteError(),lo=isRouteErrorResponse(Au)?`${Au.status} ${Au.statusText}`:Au instanceof Error?Au.message:JSON.stringify(Au),$u=Au instanceof Error?Au.stack:null,Ru="rgba(200,200,200, 0.5)",Iu={padding:"0.5rem",backgroundColor:Ru},Pu={padding:"2px 4px",backgroundColor:Ru},Ou=null;return console.error("Error handled by React Router default ErrorBoundary:",Au),Ou=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:Pu},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:Pu},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},lo),$u?reactExports.createElement("pre",{style:Iu},$u):null,Ou)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(Au){super(Au),this.state={location:Au.location,revalidation:Au.revalidation,error:Au.error}}static getDerivedStateFromError(Au){return{error:Au}}static getDerivedStateFromProps(Au,lo){return lo.location!==Au.location||lo.revalidation!=="idle"&&Au.revalidation==="idle"?{error:Au.error,location:Au.location,revalidation:Au.revalidation}:{error:Au.error!==void 0?Au.error:lo.error,location:lo.location,revalidation:Au.revalidation||lo.revalidation}}componentDidCatch(Au,lo){this.props.onError?this.props.onError(Au,lo):console.error("React Router caught the following error during render",Au)}render(){let Au=this.state.error;if(this.context&&typeof Au=="object"&&Au&&"digest"in Au&&typeof Au.digest=="string"){const $u=decodeRouteErrorResponseDigest(Au.digest);$u&&(Au=$u)}let lo=Au!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:Au,children:this.props.component})):this.props.children;return this.context?reactExports.createElement(RSCErrorHandler,{error:Au},lo):lo}};RenderErrorBoundary.contextType=RSCRouterContext;var errorRedirectHandledMap=new WeakMap;function RSCErrorHandler({children:Au,error:lo}){let{basename:$u,navigator:Ru}=reactExports.useContext(NavigationContext);if(typeof lo=="object"&&lo&&"digest"in lo&&typeof lo.digest=="string"){let Iu=decodeRedirectErrorDigest(lo.digest);if(Iu){let Pu=errorRedirectHandledMap.get(lo);if(Pu)throw Pu;let Ou=parseToInfo(Iu.location,$u),Mu=Ou.absoluteURL||Ou.to;if(validateNavigationTarget(Iu.location,Mu,getNavigatorCurrentUrl(Ru),"allow-explicit"),hasInvalidProtocol(Mu))throw new Error("Invalid redirect location");if(isBrowser&&!errorRedirectHandledMap.get(lo))if(Ou.isExternal||Iu.reloadDocument)window.location.href=Mu;else{const Du=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(Ou.to,{replace:Iu.replace}));throw errorRedirectHandledMap.set(lo,Du),Du}return reactExports.createElement("meta",{httpEquiv:"refresh",content:`0;url=${Mu}`})}}return Au}function RenderedRoute({routeContext:Au,match:lo,children:$u}){let Ru=reactExports.useContext(DataRouterContext);return Ru&&Ru.static&&Ru.staticContext&&(lo.route.errorElement||lo.route.ErrorBoundary)&&(Ru.staticContext._deepestRenderedBoundaryId=lo.route.id),reactExports.createElement(RouteContext.Provider,{value:Au},$u)}function _renderMatches(Au,lo=[],$u){let Ru=$u?.state;if(Au==null){if(!Ru)return null;if(Ru.errors)Au=Ru.matches;else if(lo.length===0&&!Ru.initialized&&Ru.matches.length>0)Au=Ru.matches;else return null}let Iu=Au,Pu=Ru?.errors;if(Pu!=null){let Bu=Iu.findIndex(ju=>ju.route.id&&Pu?.[ju.route.id]!==void 0);invariant(Bu>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(Pu).join(",")}`),Iu=Iu.slice(0,Math.min(Iu.length,Bu+1))}let Ou=!1,Mu=-1;if($u&&Ru){Ou=Ru.renderFallback;for(let Bu=0;Bu<Iu.length;Bu++){let ju=Iu[Bu];if((ju.route.HydrateFallback||ju.route.hydrateFallbackElement)&&(Mu=Bu),ju.route.id){let{loaderData:Fu,errors:zu}=Ru,Uu=ju.route.loader&&!Fu.hasOwnProperty(ju.route.id)&&(!zu||zu[ju.route.id]===void 0);if(ju.route.lazy||Uu){$u.isStatic&&(Ou=!0),Mu>=0?Iu=Iu.slice(0,Mu+1):Iu=[Iu[0]];break}}}}let Du=$u?.onError,Lu=Ru&&Du?(Bu,ju)=>{Du(Bu,{location:Ru.location,params:Ru.matches?.[0]?.params??{},pattern:getRoutePattern(Ru.matches),errorInfo:ju})}:void 0;return Iu.reduceRight((Bu,ju,Fu)=>{let zu,Uu=!1,Hu=null,Vu=null;Ru&&(zu=Pu&&ju.route.id?Pu[ju.route.id]:void 0,Hu=ju.route.errorElement||defaultErrorElement,Ou&&(Mu<0&&Fu===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),Uu=!0,Vu=null):Mu===Fu&&(Uu=!0,Vu=ju.route.hydrateFallbackElement||null)));let Gu=lo.concat(Iu.slice(0,Fu+1)),Wu=()=>{let Zu;return zu?Zu=Hu:Uu?Zu=Vu:ju.route.Component?Zu=reactExports.createElement(ju.route.Component,null):ju.route.element?Zu=ju.route.element:Zu=Bu,reactExports.createElement(RenderedRoute,{match:ju,routeContext:{outlet:Bu,matches:Gu,isDataRoute:Ru!=null},children:Zu})};return Ru&&(ju.route.ErrorBoundary||ju.route.errorElement||Fu===0)?reactExports.createElement(RenderErrorBoundary,{location:Ru.location,revalidation:Ru.revalidation,component:Hu,error:zu,children:Wu(),routeContext:{outlet:null,matches:Gu,isDataRoute:!0},onError:Lu}):Wu()},null)}function getDataRouterConsoleError(Au){return`${Au} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(Au){let lo=reactExports.useContext(DataRouterContext);return invariant(lo,getDataRouterConsoleError(Au)),lo}function useDataRouterState(Au){let lo=reactExports.useContext(DataRouterStateContext);return invariant(lo,getDataRouterConsoleError(Au)),lo}function useRouteContext(Au){let lo=reactExports.useContext(RouteContext);return invariant(lo,getDataRouterConsoleError(Au)),lo}function useCurrentRouteId(Au){let lo=useRouteContext(Au),$u=lo.matches[lo.matches.length-1];return invariant($u.route.id,`${Au} can only be used on routes that contain a unique "id"`),$u.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){let Au=reactExports.useContext(RouteErrorContext),lo=useDataRouterState("useRouteError"),$u=useCurrentRouteId("useRouteError");return Au!==void 0?Au:lo.errors?.[$u]}function useNavigateStable(){let{router:Au}=useDataRouterContext("useNavigate"),lo=useCurrentRouteId("useNavigate"),$u=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{$u.current=!0}),reactExports.useCallback(async(Iu,Pu={})=>{warning($u.current,navigateEffectWarning),$u.current&&(typeof Iu=="number"?await Au.navigate(Iu):await Au.navigate(Iu,{fromRouteId:lo,...Pu}))},[Au,lo])}var alreadyWarned={};function warningOnce(Au,lo,$u){!lo&&!alreadyWarned[Au]&&(alreadyWarned[Au]=!0,warning(!1,$u))}reactExports.memo(DataRoutes2);function DataRoutes2({routes:Au,manifest:lo,future:$u,state:Ru,isStatic:Iu,onError:Pu}){return useRoutesImpl(Au,void 0,{manifest:lo,state:Ru,isStatic:Iu,onError:Pu})}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(Au){return typeof HTMLElement<"u"&&Au instanceof HTMLElement}function isButtonElement(Au){return isHtmlElement(Au)&&Au.tagName.toLowerCase()==="button"}function isFormElement(Au){return isHtmlElement(Au)&&Au.tagName.toLowerCase()==="form"}function isInputElement(Au){return isHtmlElement(Au)&&Au.tagName.toLowerCase()==="input"}function isModifiedEvent(Au){return!!(Au.metaKey||Au.altKey||Au.ctrlKey||Au.shiftKey)}function shouldProcessLinkClick(Au,lo){return Au.button===0&&(!lo||lo==="_self")&&!isModifiedEvent(Au)}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(Au){return Au!=null&&!supportedFormEncTypes.has(Au)?(warning(!1,`"${Au}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):Au}function getFormSubmissionInfo(Au,lo){let $u,Ru,Iu,Pu,Ou;if(isFormElement(Au)){let Mu=Au.getAttribute("action");Ru=Mu?stripBasename(Mu,lo):null,$u=Au.getAttribute("method")||defaultMethod,Iu=getFormEncType(Au.getAttribute("enctype"))||defaultEncType,Pu=new FormData(Au)}else if(isButtonElement(Au)||isInputElement(Au)&&(Au.type==="submit"||Au.type==="image")){let Mu=Au.form;if(Mu==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let Du=Au.getAttribute("formaction")||Mu.getAttribute("action");if(Ru=Du?stripBasename(Du,lo):null,$u=Au.getAttribute("formmethod")||Mu.getAttribute("method")||defaultMethod,Iu=getFormEncType(Au.getAttribute("formenctype"))||getFormEncType(Mu.getAttribute("enctype"))||defaultEncType,Pu=new FormData(Mu,Au),!isFormDataSubmitterSupported()){let{name:Lu,type:Bu,value:ju}=Au;if(Bu==="image"){let Fu=Lu?`${Lu}.`:"";Pu.append(`${Fu}x`,"0"),Pu.append(`${Fu}y`,"0")}else Lu&&Pu.append(Lu,ju)}}else{if(isHtmlElement(Au))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');$u=defaultMethod,Ru=null,Iu=defaultEncType,Ou=Au}return Pu&&Iu==="text/plain"&&(Ou=Pu,Pu=void 0),{action:Ru,method:$u.toLowerCase(),encType:Iu,formData:Pu,body:Ou}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function invariant2(Au,lo){if(Au===!1||Au===null||typeof Au>"u")throw new Error(lo)}function singleFetchUrl(Au,lo,$u,Ru){let Iu=typeof Au=="string"?new URL(Au,typeof window>"u"?"server://singlefetch/":window.location.origin):Au;return $u?Iu.pathname.endsWith("/")?Iu.pathname=`${Iu.pathname}_.${Ru}`:Iu.pathname=`${Iu.pathname}.${Ru}`:Iu.pathname==="/"?Iu.pathname=`_root.${Ru}`:lo&&stripBasename(Iu.pathname,lo)==="/"?Iu.pathname=`${removeTrailingSlash(lo)}/_root.${Ru}`:Iu.pathname=`${removeTrailingSlash(Iu.pathname)}.${Ru}`,Iu}async function loadRouteModule(Au,lo){if(Au.id in lo)return lo[Au.id];try{let $u=await import(Au.module);return lo[Au.id]=$u,$u}catch($u){return console.error(`Error loading route module \`${Au.module}\`, reloading page...`),console.error($u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(Au){return Au==null?!1:Au.href==null?Au.rel==="preload"&&typeof Au.imageSrcSet=="string"&&typeof Au.imageSizes=="string":typeof Au.rel=="string"&&typeof Au.href=="string"}async function getKeyedPrefetchLinks(Au,lo,$u){let Ru=await Promise.all(Au.map(async Iu=>{let Pu=lo.routes[Iu.route.id];if(Pu){let Ou=await loadRouteModule(Pu,$u);return Ou.links?Ou.links():[]}return[]}));return dedupeLinkDescriptors(Ru.flat(1).filter(isHtmlLinkDescriptor).filter(Iu=>Iu.rel==="stylesheet"||Iu.rel==="preload").map(Iu=>Iu.rel==="stylesheet"?{...Iu,rel:"prefetch",as:"style"}:{...Iu,rel:"prefetch"}))}function getNewMatchesForLinks(Au,lo,$u,Ru,Iu,Pu){let Ou=(Du,Lu)=>$u[Lu]?Du.route.id!==$u[Lu].route.id:!0,Mu=(Du,Lu)=>$u[Lu].pathname!==Du.pathname||$u[Lu].route.path?.endsWith("*")&&$u[Lu].params["*"]!==Du.params["*"];return Pu==="assets"?lo.filter((Du,Lu)=>Ou(Du,Lu)||Mu(Du,Lu)):Pu==="data"?lo.filter((Du,Lu)=>{let Bu=Ru.routes[Du.route.id];if(!Bu||!Bu.hasLoader)return!1;if(Ou(Du,Lu)||Mu(Du,Lu))return!0;if(Du.route.shouldRevalidate){let ju=Du.route.shouldRevalidate({currentUrl:new URL(Iu.pathname+Iu.search+Iu.hash,window.origin),currentParams:$u[0]?.params||{},nextUrl:new URL(Au,window.origin),nextParams:Du.params,defaultShouldRevalidate:!0});if(typeof ju=="boolean")return ju}return!0}):[]}function getModuleLinkHrefs(Au,lo,{includeHydrateFallback:$u}={}){return dedupeHrefs(Au.map(Ru=>{let Iu=lo.routes[Ru.route.id];if(!Iu)return[];let Pu=[Iu.module];return Iu.clientActionModule&&(Pu=Pu.concat(Iu.clientActionModule)),Iu.clientLoaderModule&&(Pu=Pu.concat(Iu.clientLoaderModule)),$u&&Iu.hydrateFallbackModule&&(Pu=Pu.concat(Iu.hydrateFallbackModule)),Iu.imports&&(Pu=Pu.concat(Iu.imports)),Pu}).flat(1))}function dedupeHrefs(Au){return[...new Set(Au)]}function sortKeys(Au){let lo={},$u=Object.keys(Au).sort();for(let Ru of $u)lo[Ru]=Au[Ru];return lo}function dedupeLinkDescriptors(Au,lo){let $u=new Set;return new Set(lo),Au.reduce((Ru,Iu)=>{let Pu=JSON.stringify(sortKeys(Iu));return $u.has(Pu)||($u.add(Pu),Ru.push({key:Pu,link:Iu})),Ru},[])}function useDataRouterContext2(){let Au=reactExports.useContext(DataRouterContext);return invariant2(Au,"You must render this element inside a <DataRouterContext.Provider> element"),Au}function useDataRouterStateContext(){let Au=reactExports.useContext(DataRouterStateContext);return invariant2(Au,"You must render this element inside a <DataRouterStateContext.Provider> element"),Au}var FrameworkContext=reactExports.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let Au=reactExports.useContext(FrameworkContext);return invariant2(Au,"You must render this element inside a <HydratedRouter> element"),Au}function usePrefetchBehavior(Au,lo){let $u=reactExports.useContext(FrameworkContext),[Ru,Iu]=reactExports.useState(!1),[Pu,Ou]=reactExports.useState(!1),{onFocus:Mu,onBlur:Du,onMouseEnter:Lu,onMouseLeave:Bu,onTouchStart:ju}=lo,Fu=reactExports.useRef(null);reactExports.useEffect(()=>{if(Au==="render"&&Ou(!0),Au==="viewport"){let Hu=Gu=>{Gu.forEach(Wu=>{Ou(Wu.isIntersecting)})},Vu=new IntersectionObserver(Hu,{threshold:.5});return Fu.current&&Vu.observe(Fu.current),()=>{Vu.disconnect()}}},[Au]),reactExports.useEffect(()=>{if(Ru){let Hu=setTimeout(()=>{Ou(!0)},100);return()=>{clearTimeout(Hu)}}},[Ru]);let zu=()=>{Iu(!0)},Uu=()=>{Iu(!1),Ou(!1)};return $u?Au!=="intent"?[Pu,Fu,{}]:[Pu,Fu,{onFocus:composeEventHandlers(Mu,zu),onBlur:composeEventHandlers(Du,Uu),onMouseEnter:composeEventHandlers(Lu,zu),onMouseLeave:composeEventHandlers(Bu,Uu),onTouchStart:composeEventHandlers(ju,zu)}]:[!1,Fu,{}]}function composeEventHandlers(Au,lo){return $u=>{Au&&Au($u),$u.defaultPrevented||lo($u)}}function PrefetchPageLinks({page:Au,...lo}){let $u=useIsRSCRouterContext(),{nonce:Ru}=useFrameworkContext(),{router:Iu}=useDataRouterContext2(),Pu=reactExports.useMemo(()=>matchRoutes(Iu.routes,Au,Iu.basename),[Iu.routes,Au,Iu.basename]);return Pu?(lo.nonce==null&&Ru&&(lo={...lo,nonce:Ru}),$u?reactExports.createElement(RSCPrefetchPageLinksImpl,{page:Au,matches:Pu,...lo}):reactExports.createElement(PrefetchPageLinksImpl,{page:Au,matches:Pu,...lo})):null}function useKeyedPrefetchLinks(Au){let{manifest:lo,routeModules:$u}=useFrameworkContext(),[Ru,Iu]=reactExports.useState([]);return reactExports.useEffect(()=>{let Pu=!1;return getKeyedPrefetchLinks(Au,lo,$u).then(Ou=>{Pu||Iu(Ou)}),()=>{Pu=!0}},[Au,lo,$u]),Ru}function RSCPrefetchPageLinksImpl({page:Au,matches:lo,...$u}){let Ru=useLocation$1(),{future:Iu}=useFrameworkContext(),{basename:Pu}=useDataRouterContext2(),Ou=reactExports.useMemo(()=>{if(Au===Ru.pathname+Ru.search+Ru.hash)return[];let Mu=singleFetchUrl(Au,Pu,Iu.v8_trailingSlashAwareDataRequests,"rsc"),Du=!1,Lu=[];for(let Bu of lo)typeof Bu.route.shouldRevalidate=="function"?Du=!0:Lu.push(Bu.route.id);return Du&&Lu.length>0&&Mu.searchParams.set("_routes",Lu.join(",")),[Mu.pathname+Mu.search]},[Pu,Iu.v8_trailingSlashAwareDataRequests,Au,Ru,lo]);return reactExports.createElement(reactExports.Fragment,null,Ou.map(Mu=>reactExports.createElement("link",{key:Mu,rel:"prefetch",as:"fetch",href:Mu,...$u})))}function PrefetchPageLinksImpl({page:Au,matches:lo,...$u}){let Ru=useLocation$1(),{future:Iu,manifest:Pu,routeModules:Ou}=useFrameworkContext(),{basename:Mu}=useDataRouterContext2(),{loaderData:Du,matches:Lu}=useDataRouterStateContext(),Bu=reactExports.useMemo(()=>getNewMatchesForLinks(Au,lo,Lu,Pu,Ru,"data"),[Au,lo,Lu,Pu,Ru]),ju=reactExports.useMemo(()=>getNewMatchesForLinks(Au,lo,Lu,Pu,Ru,"assets"),[Au,lo,Lu,Pu,Ru]),Fu=reactExports.useMemo(()=>{if(Au===Ru.pathname+Ru.search+Ru.hash)return[];let Hu=new Set,Vu=!1;if(lo.forEach(Wu=>{let Zu=Pu.routes[Wu.route.id];!Zu||!Zu.hasLoader||(!Bu.some(Ju=>Ju.route.id===Wu.route.id)&&Wu.route.id in Du&&Ou[Wu.route.id]?.shouldRevalidate||Zu.hasClientLoader?Vu=!0:Hu.add(Wu.route.id))}),Hu.size===0)return[];let Gu=singleFetchUrl(Au,Mu,Iu.v8_trailingSlashAwareDataRequests,"data");return Vu&&Hu.size>0&&Gu.searchParams.set("_routes",lo.filter(Wu=>Hu.has(Wu.route.id)).map(Wu=>Wu.route.id).join(",")),[Gu.pathname+Gu.search]},[Mu,Iu.v8_trailingSlashAwareDataRequests,Du,Ru,Pu,Bu,lo,Au,Ou]),zu=reactExports.useMemo(()=>getModuleLinkHrefs(ju,Pu),[ju,Pu]),Uu=useKeyedPrefetchLinks(ju);return reactExports.createElement(reactExports.Fragment,null,Fu.map(Hu=>reactExports.createElement("link",{key:Hu,rel:"prefetch",as:"fetch",href:Hu,...$u})),zu.map(Hu=>reactExports.createElement("link",{key:Hu,rel:"modulepreload",href:Hu,...$u})),Uu.map(({key:Hu,link:Vu})=>reactExports.createElement("link",{key:Hu,nonce:$u.nonce,...Vu,crossOrigin:Vu.crossOrigin??$u.crossOrigin})))}function mergeRefs(...Au){return lo=>{Au.forEach($u=>{typeof $u=="function"?$u(lo):$u!=null&&($u.current=lo)})}}var isBrowser2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser2&&(window.__reactRouterVersion="7.18.3")}catch(Au){}var Link=reactExports.forwardRef(function Au({onClick:lo,discover:$u="render",prefetch:Ru="none",relative:Iu,reloadDocument:Pu,replace:Ou,mask:Mu,state:Du,target:Lu,to:Bu,preventScrollReset:ju,viewTransition:Fu,defaultShouldRevalidate:zu,...Uu},Hu){let{basename:Vu,navigator:Gu,useTransitions:Wu}=reactExports.useContext(NavigationContext),Zu=typeof Bu=="string"&&ABSOLUTE_URL_REGEX.test(Bu),Ju=parseToInfo(Bu,Vu);Bu=Ju.to;let Yu=useHref(Bu,{relative:Iu}),Xu=useLocation$1(),ed=null;if(Mu){let Sd=resolveTo(Mu,[],Xu.mask?Xu.mask.pathname:"/",!0);Vu!=="/"&&(Sd.pathname=Sd.pathname==="/"?Vu:joinPaths([Vu,Sd.pathname])),ed=Gu.createHref(Sd)}let[td,nd,od]=usePrefetchBehavior(Ru,Uu),sd=useLinkClickHandler(Bu,{replace:Ou,mask:Mu,state:Du,target:Lu,preventScrollReset:ju,relative:Iu,viewTransition:Fu,defaultShouldRevalidate:zu,useTransitions:Wu});function ad(Sd){lo&&lo(Sd),Sd.defaultPrevented||sd(Sd)}let pd=!(Ju.isExternal||Pu),vd=reactExports.createElement("a",{...Uu,...od,href:(pd?ed:void 0)||Ju.absoluteURL||Yu,onClick:pd?ad:lo,ref:mergeRefs(Hu,nd),target:Lu,"data-discover":!Zu&&$u==="render"?"true":void 0});return td&&!Zu?reactExports.createElement(reactExports.Fragment,null,vd,reactExports.createElement(PrefetchPageLinks,{page:Yu})):vd});Link.displayName="Link";var NavLink=reactExports.forwardRef(function Au({"aria-current":lo="page",caseSensitive:$u=!1,className:Ru="",end:Iu=!1,style:Pu,to:Ou,viewTransition:Mu,children:Du,...Lu},Bu){let ju=useResolvedPath(Ou,{relative:Lu.relative}),Fu=useLocation$1(),zu=reactExports.useContext(DataRouterStateContext),{navigator:Uu,basename:Hu}=reactExports.useContext(NavigationContext),Vu=zu!=null&&useViewTransitionState(ju)&&Mu===!0,Gu=Uu.encodeLocation?Uu.encodeLocation(ju).pathname:ju.pathname,Wu=Fu.pathname,Zu=zu&&zu.navigation&&zu.navigation.location?zu.navigation.location.pathname:null;$u||(Wu=Wu.toLowerCase(),Zu=Zu?Zu.toLowerCase():null,Gu=Gu.toLowerCase()),Zu&&Hu&&(Zu=stripBasename(Zu,Hu)||Zu);const Ju=Gu!=="/"&&Gu.endsWith("/")?Gu.length-1:Gu.length;let Yu=Wu===Gu||!Iu&&Wu.startsWith(Gu)&&Wu.charAt(Ju)==="/",Xu=Zu!=null&&(Zu===Gu||!Iu&&Zu.startsWith(Gu)&&Zu.charAt(Gu.length)==="/"),ed={isActive:Yu,isPending:Xu,isTransitioning:Vu},td=Yu?lo:void 0,nd;typeof Ru=="function"?nd=Ru(ed):nd=[Ru,Yu?"active":null,Xu?"pending":null,Vu?"transitioning":null].filter(Boolean).join(" ");let od=typeof Pu=="function"?Pu(ed):Pu;return reactExports.createElement(Link,{...Lu,"aria-current":td,className:nd,ref:Bu,style:od,to:Ou,viewTransition:Mu},typeof Du=="function"?Du(ed):Du)});NavLink.displayName="NavLink";var Form$1=reactExports.forwardRef(({discover:Au="render",fetcherKey:lo,navigate:$u,reloadDocument:Ru,replace:Iu,state:Pu,method:Ou=defaultMethod,action:Mu,onSubmit:Du,relative:Lu,preventScrollReset:Bu,viewTransition:ju,defaultShouldRevalidate:Fu,...zu},Uu)=>{let{useTransitions:Hu}=reactExports.useContext(NavigationContext),Vu=useSubmit(),Gu=useFormAction(Mu,{relative:Lu}),Wu=Ou.toLowerCase()==="get"?"get":"post",Zu=typeof Mu=="string"&&ABSOLUTE_URL_REGEX.test(Mu),Ju=Yu=>{if(Du&&Du(Yu),Yu.defaultPrevented)return;Yu.preventDefault();let Xu=Yu.nativeEvent.submitter,ed=Xu?.getAttribute("formmethod")||Ou,td=()=>Vu(Xu||Yu.currentTarget,{fetcherKey:lo,method:ed,navigate:$u,replace:Iu,state:Pu,relative:Lu,preventScrollReset:Bu,viewTransition:ju,defaultShouldRevalidate:Fu});Hu&&$u!==!1?reactExports.startTransition(()=>td()):td()};return reactExports.createElement("form",{ref:Uu,method:Wu,action:Gu,onSubmit:Ru?Du:Ju,...zu,"data-discover":!Zu&&Au==="render"?"true":void 0})});Form$1.displayName="Form";function getDataRouterConsoleError2(Au){return`${Au} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(Au){let lo=reactExports.useContext(DataRouterContext);return invariant(lo,getDataRouterConsoleError2(Au)),lo}function useLinkClickHandler(Au,{target:lo,replace:$u,mask:Ru,state:Iu,preventScrollReset:Pu,relative:Ou,viewTransition:Mu,defaultShouldRevalidate:Du,useTransitions:Lu}={}){let Bu=useNavigate$1(),ju=useLocation$1(),Fu=useResolvedPath(Au,{relative:Ou});return reactExports.useCallback(zu=>{if(shouldProcessLinkClick(zu,lo)){zu.preventDefault();let Uu=$u!==void 0?$u:createPath(ju)===createPath(Fu),Hu=()=>Bu(Au,{replace:Uu,mask:Ru,state:Iu,preventScrollReset:Pu,relative:Ou,viewTransition:Mu,defaultShouldRevalidate:Du});Lu?reactExports.startTransition(()=>Hu()):Hu()}},[ju,Bu,Fu,$u,Ru,Iu,lo,Au,Pu,Ou,Mu,Du,Lu])}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:Au}=useDataRouterContext3("useSubmit"),{basename:lo}=reactExports.useContext(NavigationContext),$u=useRouteId(),Ru=Au.fetch,Iu=Au.navigate;return reactExports.useCallback(async(Pu,Ou={})=>{let{action:Mu,method:Du,encType:Lu,formData:Bu,body:ju}=getFormSubmissionInfo(Pu,lo);if(Ou.navigate===!1){let Fu=Ou.fetcherKey||getUniqueFetcherId();await Ru(Fu,$u,Ou.action||Mu,{defaultShouldRevalidate:Ou.defaultShouldRevalidate,preventScrollReset:Ou.preventScrollReset,formData:Bu,body:ju,formMethod:Ou.method||Du,formEncType:Ou.encType||Lu,flushSync:Ou.flushSync})}else await Iu(Ou.action||Mu,{defaultShouldRevalidate:Ou.defaultShouldRevalidate,preventScrollReset:Ou.preventScrollReset,formData:Bu,body:ju,formMethod:Ou.method||Du,formEncType:Ou.encType||Lu,replace:Ou.replace,state:Ou.state,fromRouteId:$u,flushSync:Ou.flushSync,viewTransition:Ou.viewTransition})},[Ru,Iu,lo,$u])}function useFormAction(Au,{relative:lo}={}){let{basename:$u}=reactExports.useContext(NavigationContext),Ru=reactExports.useContext(RouteContext);invariant(Ru,"useFormAction must be used inside a RouteContext");let[Iu]=Ru.matches.slice(-1),Pu={...useResolvedPath(Au||".",{relative:lo})},Ou=useLocation$1();if(Au==null){Pu.search=Ou.search;let Mu=new URLSearchParams(Pu.search),Du=Mu.getAll("index");if(Du.some(Bu=>Bu==="")){Mu.delete("index"),Du.filter(ju=>ju).forEach(ju=>Mu.append("index",ju));let Bu=Mu.toString();Pu.search=Bu?`?${Bu}`:""}}return(!Au||Au===".")&&Iu.route.index&&(Pu.search=Pu.search?Pu.search.replace(/^\?/,"?index&"):"?index"),$u!=="/"&&(Pu.pathname=Pu.pathname==="/"?$u:joinPaths([$u,Pu.pathname])),createPath(Pu)}function useViewTransitionState(Au,{relative:lo}={}){let $u=reactExports.useContext(ViewTransitionContext);invariant($u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:Ru}=useDataRouterContext3("useViewTransitionState"),Iu=useResolvedPath(Au,{relative:lo});if(!$u.isTransitioning)return!1;let Pu=stripBasename($u.currentLocation.pathname,Ru)||$u.currentLocation.pathname,Ou=stripBasename($u.nextLocation.pathname,Ru)||$u.nextLocation.pathname;return matchPath(Iu.pathname,Ou)!=null||matchPath(Iu.pathname,Pu)!=null}const useLocationRR=useLocation$1,useNavigateRR=useNavigate$1,useLocation=()=>{const[Au,lo]=reactExports.useState(()=>typeof window>"u"?{pathname:"/",search:"",hash:"",state:null,key:"default"}:{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:window.history.state,key:"default"}),$u=typeof window<"u"&&!!window.__NEXT_DATA__,Ru=typeof window<"u";let Iu=null,Pu=!1;try{!$u&&useLocationRR&&Ru&&(Iu=useLocationRR(),Pu=!!Iu)}catch{}return reactExports.useEffect(()=>{if(Pu)return;const Ou=()=>{lo({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:window.history.state,key:"native-"+Date.now()})};return window.addEventListener("popstate",Ou),window.addEventListener("pushstate",Ou),window.addEventListener("replacestate",Ou),()=>{window.removeEventListener("popstate",Ou),window.removeEventListener("pushstate",Ou),window.removeEventListener("replacestate",Ou)}},[Pu]),Pu&&Iu?Iu:Au},NAVIGATION_VIEW_HOMES={studio:"/studio",home:"/platform",agentify:"/agentify",research:"/research",admin:"/admin",apps:"/apps/apps"},LIBRARY_VIEW="library",AGENTS_VIEW="agents",SETTINGS_VIEW="settings",DATALAYER_VIEW="datalayer",CONTENTS_VIEW="contents",TUTOR_VIEW="tutor",STORAGE_KEY="datalayer-navigation",SHELL_COOKIE="datalayer-signed-in-view",FORMER_TABS_KEY="datalayer_view_tabs",COOKIE_MAX_AGE_DAYS=365,isView=Au=>Au==="studio"||Au==="home"||Au==="agentify"||Au==="research"||Au==="admin"||Au==="apps";function readCookie(Au){if(typeof document>"u")return;const lo=document.cookie.split("; ").find($u=>$u.startsWith(`${Au}=`));return lo?decodeURIComponent(lo.slice(Au.length+1)):void 0}function writeCookie(Au,lo){if(typeof document>"u")return;const $u=COOKIE_MAX_AGE_DAYS*24*60*60;document.cookie=`${Au}=${encodeURIComponent(lo)}; path=/; max-age=${$u}; SameSite=Lax`}function readLocal(Au){try{return globalThis.localStorage?.getItem(Au)??null}catch{return null}}function restore(){let Au={};const lo=readLocal(STORAGE_KEY);if(lo)try{const Ru=JSON.parse(lo),Iu=Ru?.state??Ru;Au=Iu&&typeof Iu=="object"?Iu:{}}catch{Au={}}else{const Ru=readLocal(FORMER_TABS_KEY);if(Ru)try{const{state:Iu}=JSON.parse(Ru);Au={tabsByView:Iu?.tabsByView??{}}}catch{Au={}}}const $u=readCookie(SHELL_COOKIE);return isView($u)&&(Au.view=$u),Au.lastRouteByView=restoredRoutes(Au.lastRouteByView),Au}function restoredRoutes(Au){const lo={};if(!Au||typeof Au!="object")return lo;for(const[$u,Ru]of Object.entries(Au))isView($u)&&isRouteOfView(Ru,$u)&&(lo[$u]=Ru);return lo}function persist$1(Au){const lo={view:Au.view,lastRouteByView:Au.lastRouteByView,tabsByView:Au.tabsByView};try{globalThis.localStorage?.setItem(STORAGE_KEY,JSON.stringify(lo))}catch{}writeCookie(SHELL_COOKIE,Au.view)}function pathOf(Au){const lo=Au.search(/[?#]/);return lo===-1?Au:Au.slice(0,lo)}function isRememberableRoute(Au){if(!Au.startsWith("/"))return!1;const lo=pathOf(Au);return!["/signin","/signup","/login","/logout","/oauth2","/oauth","/join"].some($u=>lo===$u||lo.startsWith(`${$u}/`))&&!isShellNeutralRoute(Au)&&!isHostedAppRoute(Au)}const APPS_SHELL_SECTIONS=new Set(["activity","agents","apps","components","connections","contents","context","deployments","evalsets","examples","home","models","readiness","reports","rules","runs","shared","skills","usage","workspace"]);function isHostedAppRoute(Au){const lo=pathOf(Au).split("/").filter(Boolean);return lo[0]==="apps"&&lo.length>=2&&!APPS_SHELL_SECTIONS.has(lo[1])&&(lo.length===2||lo.length===4&&lo[2]==="preview")}function isShellNeutralRoute(Au){const lo=pathOf(Au);return["/settings","/docs","/decks"].some($u=>lo===$u||lo.startsWith(`${$u}/`))}function viewForRoute(Au,lo){const $u=pathOf(Au);return lo&&isShellNeutralRoute(Au)?lo:$u==="/"||$u==="/studio"||$u.startsWith("/studio/")||$u==="/settings"||$u.startsWith("/settings/")||$u==="/agentspecs"||$u.startsWith("/agentspecs/")?"studio":$u==="/agentify"||$u.startsWith("/agentify/")?"agentify":$u==="/research"||$u.startsWith("/research/")?"research":$u==="/admin"||$u.startsWith("/admin/")?"admin":$u==="/apps"||$u.startsWith("/apps/")?"apps":AGENTIFY_SPACE_PAGE.test($u)||AGENTIFY_ACCOUNT_PAGE.test($u)?"agentify":"home"}const AGENTIFY_SPACE_PAGE=/^\/(?!docs\/)[^/]+\/[^/]+\/(?:decks|spreadsheets|courses|course|lessons|exercises|assignments)(?:\/|$)/,AGENTIFY_ACCOUNT_PAGE=/^\/(?!docs\/)[^/]+\/courses$/;function isRouteOfView(Au,lo){return typeof Au=="string"&&isRememberableRoute(Au)&&viewForRoute(Au)===lo}const initial=restore(),navigationStore=createStore$1((Au,lo)=>({view:initial.view??"studio",lastRouteByView:initial.lastRouteByView??{},tabsByView:initial.tabsByView??{},requestedRoute:void 0,docsOrigin:void 0,setView:$u=>{Au({view:$u}),persist$1(lo())},toggleView:()=>{Au($u=>({view:$u.view==="home"?"agentify":"home"})),persist$1(lo())},rememberRoute:($u,Ru)=>{if(!isRememberableRoute($u))return;const Iu=Ru??viewForRoute($u),Pu=Ru===void 0,Ou=lo();Ou.lastRouteByView[Iu]===$u&&(!Pu||Ou.view===Iu)||(Au(Mu=>({view:Pu?Iu:Mu.view,lastRouteByView:{...Mu.lastRouteByView,[Iu]:$u}})),persist$1(lo()))},routeForView:$u=>{const Ru=lo().lastRouteByView[$u];return isRouteOfView(Ru,$u)?Ru:NAVIGATION_VIEW_HOMES[$u]},setViewTab:($u,Ru)=>{lo().tabsByView[$u]!==Ru&&(Au(Iu=>({tabsByView:{...Iu.tabsByView,[$u]:Ru}})),persist$1(lo()))},getViewTab:$u=>lo().tabsByView[$u],setRequestedRoute:$u=>Au({requestedRoute:$u}),clearRequestedRoute:()=>Au({requestedRoute:void 0}),setDocsOrigin:$u=>Au({docsOrigin:$u})}));registerSessionState({forget:()=>{navigationStore.setState({lastRouteByView:{},tabsByView:{},requestedRoute:void 0,docsOrigin:void 0}),persist$1(navigationStore.getState())},localStorageKeys:[FORMER_TABS_KEY]});function useNavigationState(Au){return useStore$1(navigationStore,Au??(lo=>lo))}const useNavigationStore=Object.assign(useNavigationState,{getState:navigationStore.getState,setState:navigationStore.setState,subscribe:navigationStore.subscribe}),navigationListeners=new Set,notifyNavigationChange=()=>{navigationListeners.forEach(Au=>Au())},createNativeNavigate=()=>(Au,lo)=>{if(typeof window>"u")return;const $u=new URL(Au,window.location.href),Ru=lo||{},Iu=Ru.state||null;Ru.replace?(window.history.replaceState(Iu,"",$u.href),window.dispatchEvent(new Event("replacestate"))):(window.history.pushState(Iu,"",$u.href),window.dispatchEvent(new Event("pushstate"))),notifyNavigationChange(),Ru.scroll!==!1&&window.scrollTo(0,0)};function isNewTabClick(Au){return!!Au.metaKey||!!Au.ctrlKey||!!Au.shiftKey||!!Au.altKey||Au.button===1}const resolveUrl$1=Au=>new URL(Au,window.location.href).href;function openInNewTab(Au){window.open(resolveUrl$1(Au),"_blank","noopener,noreferrer")}function isLinkTo(Au,lo){const $u=Au.currentTarget??Au.target,Ru=$u&&typeof $u.closest=="function"?$u.closest("a[href]"):null;if(!Ru)return!1;try{return resolveUrl$1(Ru.getAttribute("href")??"")===resolveUrl$1(lo)}catch{return!1}}const isEvent=Au=>!!Au&&typeof Au.preventDefault=="function";function parseCall(Au,lo,$u){if(isEvent(Au)){const Ru=typeof lo=="boolean"?{resetPortals:lo,...$u??{}}:{...lo??{},...$u??{}};return{event:Au,options:Ru}}return typeof Au=="boolean"?{options:{resetPortals:Au,...typeof lo=="object"?lo:{},...$u??{}}}:{options:{...Au??{}}}}const useNavigate=()=>{const Au=useLayoutStore(),lo=typeof window<"u"&&!!window.__NEXT_DATA__,$u=typeof window<"u";let Ru=null;if(!lo&&useNavigateRR&&$u)try{Ru=useNavigateRR()}catch{}const Iu=reactExports.useMemo(()=>createNativeNavigate(),[]);return reactExports.useCallback((Pu,Ou,Mu,Du)=>{if(typeof window>"u")return;const{event:Lu,options:Bu}=parseCall(Ou,Mu,Du);if(typeof Pu=="number"){Lu?.preventDefault(),Ru?Ru(Pu):window.history.go(Pu);return}if(Lu&&isNewTabClick(Lu)){isLinkTo(Lu,Pu)||(Lu.preventDefault(),openInNewTab(Pu));return}if(Bu.newTab){Lu?.preventDefault(),openInNewTab(Pu);return}if(Lu?.preventDefault(),Bu.scroll!==!1&&(window.scrollTo(0,0),document.body.scrollTop=0),iamStore.getState().user&&navigationStore.getState().rememberRoute(Pu),Ru){Ru(Pu,{replace:Bu.replace,state:Bu.state});return}Bu.resetPortals!==!1&&(Au.resetLeftPortal(),Au.resetRightPortal()),Iu(Pu,{replace:Bu.replace,state:Bu.state,scroll:Bu.scroll})},[Ru,Iu,Au])};var propTypes$2={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var Au="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=Au,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var Au=requireReactPropTypesSecret();function lo(){}function $u(){}return $u.resetWarningCache=lo,factoryWithThrowingShims=function(){function Ru(Ou,Mu,Du,Lu,Bu,ju){if(ju!==Au){var Fu=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Fu.name="Invariant Violation",Fu}}Ru.isRequired=Ru;function Iu(){return Ru}var Pu={array:Ru,bigint:Ru,bool:Ru,func:Ru,number:Ru,object:Ru,string:Ru,symbol:Ru,any:Ru,arrayOf:Iu,element:Ru,elementType:Ru,instanceOf:Iu,node:Ru,objectOf:Iu,oneOf:Iu,oneOfType:Iu,shape:Iu,exact:Iu,checkPropTypes:$u,resetWarningCache:lo};return Pu.PropTypes=Pu,Pu},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes$2.exports=requireFactoryWithThrowingShims()()),propTypes$2.exports}var propTypesExports=requirePropTypes();const s$5=getDefaultExportFromCjs(propTypesExports);var L$4=Au=>typeof Au=="number"&&!isNaN(Au),N$3=Au=>typeof Au=="string",P$5=Au=>typeof Au=="function",ut$5=Au=>N$3(Au)||L$4(Au),F$4=Au=>reactExports.isValidElement(Au)||N$3(Au)||P$5(Au)||L$4(Au),Qt$3=1,st$5=()=>`${Qt$3++}`,I$3=new Map,U$5=[],rt$5=new Set,ht$4=()=>I$3.size>0,Ct$5=(Au,{containerId:lo})=>{var $u;return($u=I$3.get(lo||1))==null?void 0:$u.toasts.get(Au)};function X$5(Au,lo){var $u;if(lo)return!!(($u=I$3.get(lo))!=null&&$u.isToastActive(Au));let Ru=!1;return I$3.forEach(Iu=>{Iu.isToastActive(Au)&&(Ru=!0)}),Ru}function xt$4(Au){if(!ht$4()){U$5=U$5.filter(lo=>Au!=null&&lo.options.toastId!==Au);return}if(Au==null||ut$5(Au))I$3.forEach(lo=>{lo.removeToast(Au)});else if(Au&&("containerId"in Au||"id"in Au)){let lo=I$3.get(Au.containerId);lo?lo.removeToast(Au.id):I$3.forEach($u=>{$u.removeToast(Au.id)})}}var Et$4=(Au={})=>{I$3.forEach(lo=>{lo.props.limit&&(!Au.containerId||lo.id===Au.containerId)&&lo.clearQueue()})};function nt$5(Au,lo){F$4(Au)&&(ht$4()||U$5.push({content:Au,options:lo}),I$3.forEach($u=>{$u.buildToast(Au,lo)}))}function it$5(Au,lo){I$3.forEach($u=>{(lo==null||!(lo!=null&&lo.containerId)||lo?.containerId===$u.id)&&$u.toggle(Au,lo?.id)})}function St$4(Au){return rt$5.add(Au),()=>{rt$5.delete(Au)}}function qt$3(Au){return Au&&(N$3(Au.toastId)||L$4(Au.toastId))?Au.toastId:st$5()}function H$4(Au,lo){return nt$5(Au,lo),lo.toastId}function Q$4(Au,lo){return{...lo,type:lo&&lo.type||Au,toastId:qt$3(lo)}}function W$4(Au){return(lo,$u)=>H$4(lo,Q$4(Au,$u))}function y$6(Au,lo){return H$4(Au,Q$4("default",lo))}y$6.loading=(Au,lo)=>H$4(Au,Q$4("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...lo}));function Kt$4(Au,{pending:lo,error:$u,success:Ru},Iu){let Pu;lo&&(Pu=N$3(lo)?y$6.loading(lo,Iu):y$6.loading(lo.render,{...Iu,...lo}));let Ou={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},Mu=(Lu,Bu,ju)=>{if(Bu==null){y$6.dismiss(Pu);return}let Fu={type:Lu,...Ou,...Iu,data:ju},zu=N$3(Bu)?{render:Bu}:Bu;return Pu?y$6.update(Pu,{...Fu,...zu}):y$6(zu.render,{...Fu,...zu}),ju},Du=P$5(Au)?Au():Au;return Du.then(Lu=>Mu("success",Ru,Lu)).catch(Lu=>Mu("error",$u,Lu)),Du}y$6.promise=Kt$4;y$6.success=W$4("success");y$6.info=W$4("info");y$6.error=W$4("error");y$6.warning=W$4("warning");y$6.warn=y$6.warning;y$6.dark=(Au,lo)=>H$4(Au,Q$4("default",{theme:"dark",...lo}));function Yt$3(Au){xt$4(Au)}y$6.dismiss=Yt$3;y$6.clearWaitingQueue=Et$4;y$6.isActive=X$5;y$6.update=(Au,lo={})=>{let $u=Ct$5(Au,lo);if($u){let{props:Ru,content:Iu}=$u,Pu={delay:100,...Ru,...lo,toastId:lo.toastId||Au,updateId:st$5()};Pu.toastId!==Au&&(Pu.staleId=Au);let Ou=Pu.render||Iu;delete Pu.render,H$4(Ou,Pu)}};y$6.done=Au=>{y$6.update(Au,{progress:1})};y$6.onChange=St$4;y$6.play=Au=>it$5(!0,Au);y$6.pause=Au=>it$5(!1,Au);const JupyterReactTheme=vM.lazy(()=>__vitePreload(()=>import("./chunks/index-BUmmTwes.js").then(Au=>Au.r),[],import.meta.url).then(Au=>({default:Au.JupyterReactTheme})));let NotificationApi;isInsideJupyterLab()&&__vitePreload(()=>import("./chunks/index-BtwU5-oj.js").then(Au=>Au.q),[],import.meta.url).then(Au=>{NotificationApi=Au.Notification});const TOAST_POSITION="bottom-right",THEME_STORAGE_KEY="datalayer-theme";function resolveToastTheme(){if(typeof window>"u")return"dark";let Au;try{const $u=window.localStorage.getItem(THEME_STORAGE_KEY);$u&&(Au=JSON.parse($u)?.state?.colorMode)}catch{}return Au==="light"?"light":Au==="dark"||window.matchMedia?.("(prefers-color-scheme: dark)")?.matches?"dark":"light"}const displayType2Class={accent:"primary",link:"invisible",warn:"danger",default:"default"};function ToastButton({action:Au,closeToast:lo}){const $u=Ru=>{Au.callback(Ru),Ru.defaultPrevented||lo()};return jsxRuntimeExports.jsx(ButtonComponent,{title:Au.caption??Au.label,onClick:$u,variant:displayType2Class[Au.displayType??"default"],size:"small",children:Au.label})}function createContent(Au,lo,$u){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"jp-toast-message",children:Au.split(`
2327
+ Please change the parent <Route path="${Vu}"> to <Route path="${Vu==="/"?"*":`${Vu}/*`}">.`)}let Bu=useLocation$1(),ju;ju=Bu;let Fu=ju.pathname||"/",zu=Fu;if(Du!=="/"){let Vu=Du.replace(/^\//,"").split("/");zu="/"+Fu.replace(/^\//,"").split("/").slice(Vu.length).join("/")}let Uu=$u&&$u.state.matches.length?$u.state.matches.map(Vu=>Object.assign(Vu,{route:$u.manifest[Vu.route.id]||Vu.route})):matchRoutes(Au,{pathname:zu});return warning(Lu||Uu!=null,`No routes matched location "${ju.pathname}${ju.search}${ju.hash}" `),warning(Uu==null||Uu[Uu.length-1].route.element!==void 0||Uu[Uu.length-1].route.Component!==void 0||Uu[Uu.length-1].route.lazy!==void 0,`Matched leaf route at location "${ju.pathname}${ju.search}${ju.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(Uu&&Uu.map(Vu=>Object.assign({},Vu,{params:Object.assign({},Ou,Vu.params),pathname:joinPaths([Du,Ru.encodeLocation?Ru.encodeLocation(Vu.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Vu.pathname]),pathnameBase:Vu.pathnameBase==="/"?Du:joinPaths([Du,Ru.encodeLocation?Ru.encodeLocation(Vu.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Vu.pathnameBase])})),Iu,$u)}function DefaultErrorComponent(){let Au=useRouteError(),lo=isRouteErrorResponse(Au)?`${Au.status} ${Au.statusText}`:Au instanceof Error?Au.message:JSON.stringify(Au),$u=Au instanceof Error?Au.stack:null,Ru="rgba(200,200,200, 0.5)",Iu={padding:"0.5rem",backgroundColor:Ru},Pu={padding:"2px 4px",backgroundColor:Ru},Ou=null;return console.error("Error handled by React Router default ErrorBoundary:",Au),Ou=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:Pu},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:Pu},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},lo),$u?reactExports.createElement("pre",{style:Iu},$u):null,Ou)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(Au){super(Au),this.state={location:Au.location,revalidation:Au.revalidation,error:Au.error}}static getDerivedStateFromError(Au){return{error:Au}}static getDerivedStateFromProps(Au,lo){return lo.location!==Au.location||lo.revalidation!=="idle"&&Au.revalidation==="idle"?{error:Au.error,location:Au.location,revalidation:Au.revalidation}:{error:Au.error!==void 0?Au.error:lo.error,location:lo.location,revalidation:Au.revalidation||lo.revalidation}}componentDidCatch(Au,lo){this.props.onError?this.props.onError(Au,lo):console.error("React Router caught the following error during render",Au)}render(){let Au=this.state.error;if(this.context&&typeof Au=="object"&&Au&&"digest"in Au&&typeof Au.digest=="string"){const $u=decodeRouteErrorResponseDigest(Au.digest);$u&&(Au=$u)}let lo=Au!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:Au,children:this.props.component})):this.props.children;return this.context?reactExports.createElement(RSCErrorHandler,{error:Au},lo):lo}};RenderErrorBoundary.contextType=RSCRouterContext;var errorRedirectHandledMap=new WeakMap;function RSCErrorHandler({children:Au,error:lo}){let{basename:$u,navigator:Ru}=reactExports.useContext(NavigationContext);if(typeof lo=="object"&&lo&&"digest"in lo&&typeof lo.digest=="string"){let Iu=decodeRedirectErrorDigest(lo.digest);if(Iu){let Pu=errorRedirectHandledMap.get(lo);if(Pu)throw Pu;let Ou=parseToInfo(Iu.location,$u),Mu=Ou.absoluteURL||Ou.to;if(validateNavigationTarget(Iu.location,Mu,getNavigatorCurrentUrl(Ru),"allow-explicit"),hasInvalidProtocol(Mu))throw new Error("Invalid redirect location");if(isBrowser&&!errorRedirectHandledMap.get(lo))if(Ou.isExternal||Iu.reloadDocument)window.location.href=Mu;else{const Du=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(Ou.to,{replace:Iu.replace}));throw errorRedirectHandledMap.set(lo,Du),Du}return reactExports.createElement("meta",{httpEquiv:"refresh",content:`0;url=${Mu}`})}}return Au}function RenderedRoute({routeContext:Au,match:lo,children:$u}){let Ru=reactExports.useContext(DataRouterContext);return Ru&&Ru.static&&Ru.staticContext&&(lo.route.errorElement||lo.route.ErrorBoundary)&&(Ru.staticContext._deepestRenderedBoundaryId=lo.route.id),reactExports.createElement(RouteContext.Provider,{value:Au},$u)}function _renderMatches(Au,lo=[],$u){let Ru=$u?.state;if(Au==null){if(!Ru)return null;if(Ru.errors)Au=Ru.matches;else if(lo.length===0&&!Ru.initialized&&Ru.matches.length>0)Au=Ru.matches;else return null}let Iu=Au,Pu=Ru?.errors;if(Pu!=null){let Bu=Iu.findIndex(ju=>ju.route.id&&Pu?.[ju.route.id]!==void 0);invariant(Bu>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(Pu).join(",")}`),Iu=Iu.slice(0,Math.min(Iu.length,Bu+1))}let Ou=!1,Mu=-1;if($u&&Ru){Ou=Ru.renderFallback;for(let Bu=0;Bu<Iu.length;Bu++){let ju=Iu[Bu];if((ju.route.HydrateFallback||ju.route.hydrateFallbackElement)&&(Mu=Bu),ju.route.id){let{loaderData:Fu,errors:zu}=Ru,Uu=ju.route.loader&&!Fu.hasOwnProperty(ju.route.id)&&(!zu||zu[ju.route.id]===void 0);if(ju.route.lazy||Uu){$u.isStatic&&(Ou=!0),Mu>=0?Iu=Iu.slice(0,Mu+1):Iu=[Iu[0]];break}}}}let Du=$u?.onError,Lu=Ru&&Du?(Bu,ju)=>{Du(Bu,{location:Ru.location,params:Ru.matches?.[0]?.params??{},pattern:getRoutePattern(Ru.matches),errorInfo:ju})}:void 0;return Iu.reduceRight((Bu,ju,Fu)=>{let zu,Uu=!1,Hu=null,Vu=null;Ru&&(zu=Pu&&ju.route.id?Pu[ju.route.id]:void 0,Hu=ju.route.errorElement||defaultErrorElement,Ou&&(Mu<0&&Fu===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),Uu=!0,Vu=null):Mu===Fu&&(Uu=!0,Vu=ju.route.hydrateFallbackElement||null)));let Gu=lo.concat(Iu.slice(0,Fu+1)),Wu=()=>{let Zu;return zu?Zu=Hu:Uu?Zu=Vu:ju.route.Component?Zu=reactExports.createElement(ju.route.Component,null):ju.route.element?Zu=ju.route.element:Zu=Bu,reactExports.createElement(RenderedRoute,{match:ju,routeContext:{outlet:Bu,matches:Gu,isDataRoute:Ru!=null},children:Zu})};return Ru&&(ju.route.ErrorBoundary||ju.route.errorElement||Fu===0)?reactExports.createElement(RenderErrorBoundary,{location:Ru.location,revalidation:Ru.revalidation,component:Hu,error:zu,children:Wu(),routeContext:{outlet:null,matches:Gu,isDataRoute:!0},onError:Lu}):Wu()},null)}function getDataRouterConsoleError(Au){return`${Au} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(Au){let lo=reactExports.useContext(DataRouterContext);return invariant(lo,getDataRouterConsoleError(Au)),lo}function useDataRouterState(Au){let lo=reactExports.useContext(DataRouterStateContext);return invariant(lo,getDataRouterConsoleError(Au)),lo}function useRouteContext(Au){let lo=reactExports.useContext(RouteContext);return invariant(lo,getDataRouterConsoleError(Au)),lo}function useCurrentRouteId(Au){let lo=useRouteContext(Au),$u=lo.matches[lo.matches.length-1];return invariant($u.route.id,`${Au} can only be used on routes that contain a unique "id"`),$u.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){let Au=reactExports.useContext(RouteErrorContext),lo=useDataRouterState("useRouteError"),$u=useCurrentRouteId("useRouteError");return Au!==void 0?Au:lo.errors?.[$u]}function useNavigateStable(){let{router:Au}=useDataRouterContext("useNavigate"),lo=useCurrentRouteId("useNavigate"),$u=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{$u.current=!0}),reactExports.useCallback(async(Iu,Pu={})=>{warning($u.current,navigateEffectWarning),$u.current&&(typeof Iu=="number"?await Au.navigate(Iu):await Au.navigate(Iu,{fromRouteId:lo,...Pu}))},[Au,lo])}var alreadyWarned={};function warningOnce(Au,lo,$u){!lo&&!alreadyWarned[Au]&&(alreadyWarned[Au]=!0,warning(!1,$u))}reactExports.memo(DataRoutes2);function DataRoutes2({routes:Au,manifest:lo,future:$u,state:Ru,isStatic:Iu,onError:Pu}){return useRoutesImpl(Au,void 0,{manifest:lo,state:Ru,isStatic:Iu,onError:Pu})}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(Au){return typeof HTMLElement<"u"&&Au instanceof HTMLElement}function isButtonElement(Au){return isHtmlElement(Au)&&Au.tagName.toLowerCase()==="button"}function isFormElement(Au){return isHtmlElement(Au)&&Au.tagName.toLowerCase()==="form"}function isInputElement(Au){return isHtmlElement(Au)&&Au.tagName.toLowerCase()==="input"}function isModifiedEvent(Au){return!!(Au.metaKey||Au.altKey||Au.ctrlKey||Au.shiftKey)}function shouldProcessLinkClick(Au,lo){return Au.button===0&&(!lo||lo==="_self")&&!isModifiedEvent(Au)}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(Au){return Au!=null&&!supportedFormEncTypes.has(Au)?(warning(!1,`"${Au}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):Au}function getFormSubmissionInfo(Au,lo){let $u,Ru,Iu,Pu,Ou;if(isFormElement(Au)){let Mu=Au.getAttribute("action");Ru=Mu?stripBasename(Mu,lo):null,$u=Au.getAttribute("method")||defaultMethod,Iu=getFormEncType(Au.getAttribute("enctype"))||defaultEncType,Pu=new FormData(Au)}else if(isButtonElement(Au)||isInputElement(Au)&&(Au.type==="submit"||Au.type==="image")){let Mu=Au.form;if(Mu==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let Du=Au.getAttribute("formaction")||Mu.getAttribute("action");if(Ru=Du?stripBasename(Du,lo):null,$u=Au.getAttribute("formmethod")||Mu.getAttribute("method")||defaultMethod,Iu=getFormEncType(Au.getAttribute("formenctype"))||getFormEncType(Mu.getAttribute("enctype"))||defaultEncType,Pu=new FormData(Mu,Au),!isFormDataSubmitterSupported()){let{name:Lu,type:Bu,value:ju}=Au;if(Bu==="image"){let Fu=Lu?`${Lu}.`:"";Pu.append(`${Fu}x`,"0"),Pu.append(`${Fu}y`,"0")}else Lu&&Pu.append(Lu,ju)}}else{if(isHtmlElement(Au))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');$u=defaultMethod,Ru=null,Iu=defaultEncType,Ou=Au}return Pu&&Iu==="text/plain"&&(Ou=Pu,Pu=void 0),{action:Ru,method:$u.toLowerCase(),encType:Iu,formData:Pu,body:Ou}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function invariant2(Au,lo){if(Au===!1||Au===null||typeof Au>"u")throw new Error(lo)}function singleFetchUrl(Au,lo,$u,Ru){let Iu=typeof Au=="string"?new URL(Au,typeof window>"u"?"server://singlefetch/":window.location.origin):Au;return $u?Iu.pathname.endsWith("/")?Iu.pathname=`${Iu.pathname}_.${Ru}`:Iu.pathname=`${Iu.pathname}.${Ru}`:Iu.pathname==="/"?Iu.pathname=`_root.${Ru}`:lo&&stripBasename(Iu.pathname,lo)==="/"?Iu.pathname=`${removeTrailingSlash(lo)}/_root.${Ru}`:Iu.pathname=`${removeTrailingSlash(Iu.pathname)}.${Ru}`,Iu}async function loadRouteModule(Au,lo){if(Au.id in lo)return lo[Au.id];try{let $u=await import(Au.module);return lo[Au.id]=$u,$u}catch($u){return console.error(`Error loading route module \`${Au.module}\`, reloading page...`),console.error($u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(Au){return Au==null?!1:Au.href==null?Au.rel==="preload"&&typeof Au.imageSrcSet=="string"&&typeof Au.imageSizes=="string":typeof Au.rel=="string"&&typeof Au.href=="string"}async function getKeyedPrefetchLinks(Au,lo,$u){let Ru=await Promise.all(Au.map(async Iu=>{let Pu=lo.routes[Iu.route.id];if(Pu){let Ou=await loadRouteModule(Pu,$u);return Ou.links?Ou.links():[]}return[]}));return dedupeLinkDescriptors(Ru.flat(1).filter(isHtmlLinkDescriptor).filter(Iu=>Iu.rel==="stylesheet"||Iu.rel==="preload").map(Iu=>Iu.rel==="stylesheet"?{...Iu,rel:"prefetch",as:"style"}:{...Iu,rel:"prefetch"}))}function getNewMatchesForLinks(Au,lo,$u,Ru,Iu,Pu){let Ou=(Du,Lu)=>$u[Lu]?Du.route.id!==$u[Lu].route.id:!0,Mu=(Du,Lu)=>$u[Lu].pathname!==Du.pathname||$u[Lu].route.path?.endsWith("*")&&$u[Lu].params["*"]!==Du.params["*"];return Pu==="assets"?lo.filter((Du,Lu)=>Ou(Du,Lu)||Mu(Du,Lu)):Pu==="data"?lo.filter((Du,Lu)=>{let Bu=Ru.routes[Du.route.id];if(!Bu||!Bu.hasLoader)return!1;if(Ou(Du,Lu)||Mu(Du,Lu))return!0;if(Du.route.shouldRevalidate){let ju=Du.route.shouldRevalidate({currentUrl:new URL(Iu.pathname+Iu.search+Iu.hash,window.origin),currentParams:$u[0]?.params||{},nextUrl:new URL(Au,window.origin),nextParams:Du.params,defaultShouldRevalidate:!0});if(typeof ju=="boolean")return ju}return!0}):[]}function getModuleLinkHrefs(Au,lo,{includeHydrateFallback:$u}={}){return dedupeHrefs(Au.map(Ru=>{let Iu=lo.routes[Ru.route.id];if(!Iu)return[];let Pu=[Iu.module];return Iu.clientActionModule&&(Pu=Pu.concat(Iu.clientActionModule)),Iu.clientLoaderModule&&(Pu=Pu.concat(Iu.clientLoaderModule)),$u&&Iu.hydrateFallbackModule&&(Pu=Pu.concat(Iu.hydrateFallbackModule)),Iu.imports&&(Pu=Pu.concat(Iu.imports)),Pu}).flat(1))}function dedupeHrefs(Au){return[...new Set(Au)]}function sortKeys(Au){let lo={},$u=Object.keys(Au).sort();for(let Ru of $u)lo[Ru]=Au[Ru];return lo}function dedupeLinkDescriptors(Au,lo){let $u=new Set;return new Set(lo),Au.reduce((Ru,Iu)=>{let Pu=JSON.stringify(sortKeys(Iu));return $u.has(Pu)||($u.add(Pu),Ru.push({key:Pu,link:Iu})),Ru},[])}function useDataRouterContext2(){let Au=reactExports.useContext(DataRouterContext);return invariant2(Au,"You must render this element inside a <DataRouterContext.Provider> element"),Au}function useDataRouterStateContext(){let Au=reactExports.useContext(DataRouterStateContext);return invariant2(Au,"You must render this element inside a <DataRouterStateContext.Provider> element"),Au}var FrameworkContext=reactExports.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let Au=reactExports.useContext(FrameworkContext);return invariant2(Au,"You must render this element inside a <HydratedRouter> element"),Au}function usePrefetchBehavior(Au,lo){let $u=reactExports.useContext(FrameworkContext),[Ru,Iu]=reactExports.useState(!1),[Pu,Ou]=reactExports.useState(!1),{onFocus:Mu,onBlur:Du,onMouseEnter:Lu,onMouseLeave:Bu,onTouchStart:ju}=lo,Fu=reactExports.useRef(null);reactExports.useEffect(()=>{if(Au==="render"&&Ou(!0),Au==="viewport"){let Hu=Gu=>{Gu.forEach(Wu=>{Ou(Wu.isIntersecting)})},Vu=new IntersectionObserver(Hu,{threshold:.5});return Fu.current&&Vu.observe(Fu.current),()=>{Vu.disconnect()}}},[Au]),reactExports.useEffect(()=>{if(Ru){let Hu=setTimeout(()=>{Ou(!0)},100);return()=>{clearTimeout(Hu)}}},[Ru]);let zu=()=>{Iu(!0)},Uu=()=>{Iu(!1),Ou(!1)};return $u?Au!=="intent"?[Pu,Fu,{}]:[Pu,Fu,{onFocus:composeEventHandlers(Mu,zu),onBlur:composeEventHandlers(Du,Uu),onMouseEnter:composeEventHandlers(Lu,zu),onMouseLeave:composeEventHandlers(Bu,Uu),onTouchStart:composeEventHandlers(ju,zu)}]:[!1,Fu,{}]}function composeEventHandlers(Au,lo){return $u=>{Au&&Au($u),$u.defaultPrevented||lo($u)}}function PrefetchPageLinks({page:Au,...lo}){let $u=useIsRSCRouterContext(),{nonce:Ru}=useFrameworkContext(),{router:Iu}=useDataRouterContext2(),Pu=reactExports.useMemo(()=>matchRoutes(Iu.routes,Au,Iu.basename),[Iu.routes,Au,Iu.basename]);return Pu?(lo.nonce==null&&Ru&&(lo={...lo,nonce:Ru}),$u?reactExports.createElement(RSCPrefetchPageLinksImpl,{page:Au,matches:Pu,...lo}):reactExports.createElement(PrefetchPageLinksImpl,{page:Au,matches:Pu,...lo})):null}function useKeyedPrefetchLinks(Au){let{manifest:lo,routeModules:$u}=useFrameworkContext(),[Ru,Iu]=reactExports.useState([]);return reactExports.useEffect(()=>{let Pu=!1;return getKeyedPrefetchLinks(Au,lo,$u).then(Ou=>{Pu||Iu(Ou)}),()=>{Pu=!0}},[Au,lo,$u]),Ru}function RSCPrefetchPageLinksImpl({page:Au,matches:lo,...$u}){let Ru=useLocation$1(),{future:Iu}=useFrameworkContext(),{basename:Pu}=useDataRouterContext2(),Ou=reactExports.useMemo(()=>{if(Au===Ru.pathname+Ru.search+Ru.hash)return[];let Mu=singleFetchUrl(Au,Pu,Iu.v8_trailingSlashAwareDataRequests,"rsc"),Du=!1,Lu=[];for(let Bu of lo)typeof Bu.route.shouldRevalidate=="function"?Du=!0:Lu.push(Bu.route.id);return Du&&Lu.length>0&&Mu.searchParams.set("_routes",Lu.join(",")),[Mu.pathname+Mu.search]},[Pu,Iu.v8_trailingSlashAwareDataRequests,Au,Ru,lo]);return reactExports.createElement(reactExports.Fragment,null,Ou.map(Mu=>reactExports.createElement("link",{key:Mu,rel:"prefetch",as:"fetch",href:Mu,...$u})))}function PrefetchPageLinksImpl({page:Au,matches:lo,...$u}){let Ru=useLocation$1(),{future:Iu,manifest:Pu,routeModules:Ou}=useFrameworkContext(),{basename:Mu}=useDataRouterContext2(),{loaderData:Du,matches:Lu}=useDataRouterStateContext(),Bu=reactExports.useMemo(()=>getNewMatchesForLinks(Au,lo,Lu,Pu,Ru,"data"),[Au,lo,Lu,Pu,Ru]),ju=reactExports.useMemo(()=>getNewMatchesForLinks(Au,lo,Lu,Pu,Ru,"assets"),[Au,lo,Lu,Pu,Ru]),Fu=reactExports.useMemo(()=>{if(Au===Ru.pathname+Ru.search+Ru.hash)return[];let Hu=new Set,Vu=!1;if(lo.forEach(Wu=>{let Zu=Pu.routes[Wu.route.id];!Zu||!Zu.hasLoader||(!Bu.some(Ju=>Ju.route.id===Wu.route.id)&&Wu.route.id in Du&&Ou[Wu.route.id]?.shouldRevalidate||Zu.hasClientLoader?Vu=!0:Hu.add(Wu.route.id))}),Hu.size===0)return[];let Gu=singleFetchUrl(Au,Mu,Iu.v8_trailingSlashAwareDataRequests,"data");return Vu&&Hu.size>0&&Gu.searchParams.set("_routes",lo.filter(Wu=>Hu.has(Wu.route.id)).map(Wu=>Wu.route.id).join(",")),[Gu.pathname+Gu.search]},[Mu,Iu.v8_trailingSlashAwareDataRequests,Du,Ru,Pu,Bu,lo,Au,Ou]),zu=reactExports.useMemo(()=>getModuleLinkHrefs(ju,Pu),[ju,Pu]),Uu=useKeyedPrefetchLinks(ju);return reactExports.createElement(reactExports.Fragment,null,Fu.map(Hu=>reactExports.createElement("link",{key:Hu,rel:"prefetch",as:"fetch",href:Hu,...$u})),zu.map(Hu=>reactExports.createElement("link",{key:Hu,rel:"modulepreload",href:Hu,...$u})),Uu.map(({key:Hu,link:Vu})=>reactExports.createElement("link",{key:Hu,nonce:$u.nonce,...Vu,crossOrigin:Vu.crossOrigin??$u.crossOrigin})))}function mergeRefs(...Au){return lo=>{Au.forEach($u=>{typeof $u=="function"?$u(lo):$u!=null&&($u.current=lo)})}}var isBrowser2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser2&&(window.__reactRouterVersion="7.18.3")}catch(Au){}var Link=reactExports.forwardRef(function Au({onClick:lo,discover:$u="render",prefetch:Ru="none",relative:Iu,reloadDocument:Pu,replace:Ou,mask:Mu,state:Du,target:Lu,to:Bu,preventScrollReset:ju,viewTransition:Fu,defaultShouldRevalidate:zu,...Uu},Hu){let{basename:Vu,navigator:Gu,useTransitions:Wu}=reactExports.useContext(NavigationContext),Zu=typeof Bu=="string"&&ABSOLUTE_URL_REGEX.test(Bu),Ju=parseToInfo(Bu,Vu);Bu=Ju.to;let Yu=useHref(Bu,{relative:Iu}),Xu=useLocation$1(),ed=null;if(Mu){let Sd=resolveTo(Mu,[],Xu.mask?Xu.mask.pathname:"/",!0);Vu!=="/"&&(Sd.pathname=Sd.pathname==="/"?Vu:joinPaths([Vu,Sd.pathname])),ed=Gu.createHref(Sd)}let[td,nd,od]=usePrefetchBehavior(Ru,Uu),sd=useLinkClickHandler(Bu,{replace:Ou,mask:Mu,state:Du,target:Lu,preventScrollReset:ju,relative:Iu,viewTransition:Fu,defaultShouldRevalidate:zu,useTransitions:Wu});function ad(Sd){lo&&lo(Sd),Sd.defaultPrevented||sd(Sd)}let pd=!(Ju.isExternal||Pu),vd=reactExports.createElement("a",{...Uu,...od,href:(pd?ed:void 0)||Ju.absoluteURL||Yu,onClick:pd?ad:lo,ref:mergeRefs(Hu,nd),target:Lu,"data-discover":!Zu&&$u==="render"?"true":void 0});return td&&!Zu?reactExports.createElement(reactExports.Fragment,null,vd,reactExports.createElement(PrefetchPageLinks,{page:Yu})):vd});Link.displayName="Link";var NavLink=reactExports.forwardRef(function Au({"aria-current":lo="page",caseSensitive:$u=!1,className:Ru="",end:Iu=!1,style:Pu,to:Ou,viewTransition:Mu,children:Du,...Lu},Bu){let ju=useResolvedPath(Ou,{relative:Lu.relative}),Fu=useLocation$1(),zu=reactExports.useContext(DataRouterStateContext),{navigator:Uu,basename:Hu}=reactExports.useContext(NavigationContext),Vu=zu!=null&&useViewTransitionState(ju)&&Mu===!0,Gu=Uu.encodeLocation?Uu.encodeLocation(ju).pathname:ju.pathname,Wu=Fu.pathname,Zu=zu&&zu.navigation&&zu.navigation.location?zu.navigation.location.pathname:null;$u||(Wu=Wu.toLowerCase(),Zu=Zu?Zu.toLowerCase():null,Gu=Gu.toLowerCase()),Zu&&Hu&&(Zu=stripBasename(Zu,Hu)||Zu);const Ju=Gu!=="/"&&Gu.endsWith("/")?Gu.length-1:Gu.length;let Yu=Wu===Gu||!Iu&&Wu.startsWith(Gu)&&Wu.charAt(Ju)==="/",Xu=Zu!=null&&(Zu===Gu||!Iu&&Zu.startsWith(Gu)&&Zu.charAt(Gu.length)==="/"),ed={isActive:Yu,isPending:Xu,isTransitioning:Vu},td=Yu?lo:void 0,nd;typeof Ru=="function"?nd=Ru(ed):nd=[Ru,Yu?"active":null,Xu?"pending":null,Vu?"transitioning":null].filter(Boolean).join(" ");let od=typeof Pu=="function"?Pu(ed):Pu;return reactExports.createElement(Link,{...Lu,"aria-current":td,className:nd,ref:Bu,style:od,to:Ou,viewTransition:Mu},typeof Du=="function"?Du(ed):Du)});NavLink.displayName="NavLink";var Form$1=reactExports.forwardRef(({discover:Au="render",fetcherKey:lo,navigate:$u,reloadDocument:Ru,replace:Iu,state:Pu,method:Ou=defaultMethod,action:Mu,onSubmit:Du,relative:Lu,preventScrollReset:Bu,viewTransition:ju,defaultShouldRevalidate:Fu,...zu},Uu)=>{let{useTransitions:Hu}=reactExports.useContext(NavigationContext),Vu=useSubmit(),Gu=useFormAction(Mu,{relative:Lu}),Wu=Ou.toLowerCase()==="get"?"get":"post",Zu=typeof Mu=="string"&&ABSOLUTE_URL_REGEX.test(Mu),Ju=Yu=>{if(Du&&Du(Yu),Yu.defaultPrevented)return;Yu.preventDefault();let Xu=Yu.nativeEvent.submitter,ed=Xu?.getAttribute("formmethod")||Ou,td=()=>Vu(Xu||Yu.currentTarget,{fetcherKey:lo,method:ed,navigate:$u,replace:Iu,state:Pu,relative:Lu,preventScrollReset:Bu,viewTransition:ju,defaultShouldRevalidate:Fu});Hu&&$u!==!1?reactExports.startTransition(()=>td()):td()};return reactExports.createElement("form",{ref:Uu,method:Wu,action:Gu,onSubmit:Ru?Du:Ju,...zu,"data-discover":!Zu&&Au==="render"?"true":void 0})});Form$1.displayName="Form";function getDataRouterConsoleError2(Au){return`${Au} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(Au){let lo=reactExports.useContext(DataRouterContext);return invariant(lo,getDataRouterConsoleError2(Au)),lo}function useLinkClickHandler(Au,{target:lo,replace:$u,mask:Ru,state:Iu,preventScrollReset:Pu,relative:Ou,viewTransition:Mu,defaultShouldRevalidate:Du,useTransitions:Lu}={}){let Bu=useNavigate$1(),ju=useLocation$1(),Fu=useResolvedPath(Au,{relative:Ou});return reactExports.useCallback(zu=>{if(shouldProcessLinkClick(zu,lo)){zu.preventDefault();let Uu=$u!==void 0?$u:createPath(ju)===createPath(Fu),Hu=()=>Bu(Au,{replace:Uu,mask:Ru,state:Iu,preventScrollReset:Pu,relative:Ou,viewTransition:Mu,defaultShouldRevalidate:Du});Lu?reactExports.startTransition(()=>Hu()):Hu()}},[ju,Bu,Fu,$u,Ru,Iu,lo,Au,Pu,Ou,Mu,Du,Lu])}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:Au}=useDataRouterContext3("useSubmit"),{basename:lo}=reactExports.useContext(NavigationContext),$u=useRouteId(),Ru=Au.fetch,Iu=Au.navigate;return reactExports.useCallback(async(Pu,Ou={})=>{let{action:Mu,method:Du,encType:Lu,formData:Bu,body:ju}=getFormSubmissionInfo(Pu,lo);if(Ou.navigate===!1){let Fu=Ou.fetcherKey||getUniqueFetcherId();await Ru(Fu,$u,Ou.action||Mu,{defaultShouldRevalidate:Ou.defaultShouldRevalidate,preventScrollReset:Ou.preventScrollReset,formData:Bu,body:ju,formMethod:Ou.method||Du,formEncType:Ou.encType||Lu,flushSync:Ou.flushSync})}else await Iu(Ou.action||Mu,{defaultShouldRevalidate:Ou.defaultShouldRevalidate,preventScrollReset:Ou.preventScrollReset,formData:Bu,body:ju,formMethod:Ou.method||Du,formEncType:Ou.encType||Lu,replace:Ou.replace,state:Ou.state,fromRouteId:$u,flushSync:Ou.flushSync,viewTransition:Ou.viewTransition})},[Ru,Iu,lo,$u])}function useFormAction(Au,{relative:lo}={}){let{basename:$u}=reactExports.useContext(NavigationContext),Ru=reactExports.useContext(RouteContext);invariant(Ru,"useFormAction must be used inside a RouteContext");let[Iu]=Ru.matches.slice(-1),Pu={...useResolvedPath(Au||".",{relative:lo})},Ou=useLocation$1();if(Au==null){Pu.search=Ou.search;let Mu=new URLSearchParams(Pu.search),Du=Mu.getAll("index");if(Du.some(Bu=>Bu==="")){Mu.delete("index"),Du.filter(ju=>ju).forEach(ju=>Mu.append("index",ju));let Bu=Mu.toString();Pu.search=Bu?`?${Bu}`:""}}return(!Au||Au===".")&&Iu.route.index&&(Pu.search=Pu.search?Pu.search.replace(/^\?/,"?index&"):"?index"),$u!=="/"&&(Pu.pathname=Pu.pathname==="/"?$u:joinPaths([$u,Pu.pathname])),createPath(Pu)}function useViewTransitionState(Au,{relative:lo}={}){let $u=reactExports.useContext(ViewTransitionContext);invariant($u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:Ru}=useDataRouterContext3("useViewTransitionState"),Iu=useResolvedPath(Au,{relative:lo});if(!$u.isTransitioning)return!1;let Pu=stripBasename($u.currentLocation.pathname,Ru)||$u.currentLocation.pathname,Ou=stripBasename($u.nextLocation.pathname,Ru)||$u.nextLocation.pathname;return matchPath(Iu.pathname,Ou)!=null||matchPath(Iu.pathname,Pu)!=null}const useLocationRR=useLocation$1,useNavigateRR=useNavigate$1,useLocation=()=>{const[Au,lo]=reactExports.useState(()=>typeof window>"u"?{pathname:"/",search:"",hash:"",state:null,key:"default"}:{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:window.history.state,key:"default"}),$u=typeof window<"u"&&!!window.__NEXT_DATA__,Ru=typeof window<"u";let Iu=null,Pu=!1;try{!$u&&useLocationRR&&Ru&&(Iu=useLocationRR(),Pu=!!Iu)}catch{}return reactExports.useEffect(()=>{if(Pu)return;const Ou=()=>{lo({pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:window.history.state,key:"native-"+Date.now()})};return window.addEventListener("popstate",Ou),window.addEventListener("pushstate",Ou),window.addEventListener("replacestate",Ou),()=>{window.removeEventListener("popstate",Ou),window.removeEventListener("pushstate",Ou),window.removeEventListener("replacestate",Ou)}},[Pu]),Pu&&Iu?Iu:Au},NAVIGATION_VIEW_HOMES={studio:"/studio",home:"/platform",agentify:"/agentify",research:"/research",admin:"/admin",apps:"/apps/apps"},LIBRARY_VIEW="library",AGENTS_VIEW="agents",SETTINGS_VIEW="settings",DATALAYER_VIEW="datalayer",CONTENTS_VIEW="contents",TUTOR_VIEW="tutor",STORAGE_KEY="datalayer-navigation",SHELL_COOKIE="datalayer-signed-in-view",FORMER_TABS_KEY="datalayer_view_tabs",COOKIE_MAX_AGE_DAYS=365,isView=Au=>Au==="studio"||Au==="home"||Au==="agentify"||Au==="research"||Au==="admin"||Au==="apps";function readCookie(Au){if(typeof document>"u")return;const lo=document.cookie.split("; ").find($u=>$u.startsWith(`${Au}=`));return lo?decodeURIComponent(lo.slice(Au.length+1)):void 0}function writeCookie(Au,lo){if(typeof document>"u")return;const $u=COOKIE_MAX_AGE_DAYS*24*60*60;document.cookie=`${Au}=${encodeURIComponent(lo)}; path=/; max-age=${$u}; SameSite=Lax`}function readLocal(Au){try{return globalThis.localStorage?.getItem(Au)??null}catch{return null}}function restore(){let Au={};const lo=readLocal(STORAGE_KEY);if(lo)try{const Ru=JSON.parse(lo),Iu=Ru?.state??Ru;Au=Iu&&typeof Iu=="object"?Iu:{}}catch{Au={}}else{const Ru=readLocal(FORMER_TABS_KEY);if(Ru)try{const{state:Iu}=JSON.parse(Ru);Au={tabsByView:Iu?.tabsByView??{}}}catch{Au={}}}const $u=readCookie(SHELL_COOKIE);return isView($u)&&(Au.view=$u),Au.lastRouteByView=restoredRoutes(Au.lastRouteByView),Au}function restoredRoutes(Au){const lo={};if(!Au||typeof Au!="object")return lo;for(const[$u,Ru]of Object.entries(Au))isView($u)&&isRouteOfView(Ru,$u)&&(lo[$u]=Ru);return lo}function persist$1(Au){const lo={view:Au.view,lastRouteByView:Au.lastRouteByView,tabsByView:Au.tabsByView};try{globalThis.localStorage?.setItem(STORAGE_KEY,JSON.stringify(lo))}catch{}writeCookie(SHELL_COOKIE,Au.view)}function pathOf(Au){const lo=Au.search(/[?#]/);return lo===-1?Au:Au.slice(0,lo)}function isRememberableRoute(Au){if(!Au.startsWith("/"))return!1;const lo=pathOf(Au);return!["/signin","/signup","/login","/logout","/oauth2","/oauth","/join"].some($u=>lo===$u||lo.startsWith(`${$u}/`))&&!isShellNeutralRoute(Au)&&!isHostedAppRoute(Au)}const APPS_SHELL_SECTIONS=new Set(["activity","agents","apps","components","connections","contents","context","deployments","evalsets","examples","home","models","readiness","reports","rules","runs","shared","skills","usage","workspace"]);function isHostedAppRoute(Au){const lo=pathOf(Au).split("/").filter(Boolean);return lo[0]==="apps"&&lo.length>=2&&!APPS_SHELL_SECTIONS.has(lo[1])&&(lo.length===2||lo.length===4&&lo[2]==="preview")}function isShellNeutralRoute(Au){const lo=pathOf(Au);return["/settings","/docs","/decks"].some($u=>lo===$u||lo.startsWith(`${$u}/`))}function viewForRoute(Au,lo){const $u=pathOf(Au);return lo&&isShellNeutralRoute(Au)?lo:$u==="/"||$u==="/studio"||$u.startsWith("/studio/")||$u==="/settings"||$u.startsWith("/settings/")||$u==="/agentspecs"||$u.startsWith("/agentspecs/")?"studio":$u==="/agentify"||$u.startsWith("/agentify/")?"agentify":$u==="/research"||$u.startsWith("/research/")?"research":$u==="/admin"||$u.startsWith("/admin/")||$u==="/svg"||$u.startsWith("/svg/")?"admin":$u==="/apps"||$u.startsWith("/apps/")?"apps":AGENTIFY_SPACE_PAGE.test($u)||AGENTIFY_ACCOUNT_PAGE.test($u)?"agentify":"home"}const AGENTIFY_SPACE_PAGE=/^\/(?!docs\/)[^/]+\/[^/]+\/(?:decks|spreadsheets|courses|course|lessons|exercises|assignments)(?:\/|$)/,AGENTIFY_ACCOUNT_PAGE=/^\/(?!docs\/)[^/]+\/courses$/;function isRouteOfView(Au,lo){return typeof Au=="string"&&isRememberableRoute(Au)&&viewForRoute(Au)===lo}const initial=restore(),navigationStore=createStore$1((Au,lo)=>({view:initial.view??"studio",lastRouteByView:initial.lastRouteByView??{},tabsByView:initial.tabsByView??{},requestedRoute:void 0,docsOrigin:void 0,setView:$u=>{Au({view:$u}),persist$1(lo())},toggleView:()=>{Au($u=>({view:$u.view==="home"?"agentify":"home"})),persist$1(lo())},rememberRoute:($u,Ru)=>{if(!isRememberableRoute($u))return;const Iu=Ru??viewForRoute($u),Pu=Ru===void 0,Ou=lo();Ou.lastRouteByView[Iu]===$u&&(!Pu||Ou.view===Iu)||(Au(Mu=>({view:Pu?Iu:Mu.view,lastRouteByView:{...Mu.lastRouteByView,[Iu]:$u}})),persist$1(lo()))},routeForView:$u=>{const Ru=lo().lastRouteByView[$u];return isRouteOfView(Ru,$u)?Ru:NAVIGATION_VIEW_HOMES[$u]},setViewTab:($u,Ru)=>{lo().tabsByView[$u]!==Ru&&(Au(Iu=>({tabsByView:{...Iu.tabsByView,[$u]:Ru}})),persist$1(lo()))},getViewTab:$u=>lo().tabsByView[$u],setRequestedRoute:$u=>Au({requestedRoute:$u}),clearRequestedRoute:()=>Au({requestedRoute:void 0}),setDocsOrigin:$u=>Au({docsOrigin:$u})}));registerSessionState({forget:()=>{navigationStore.setState({lastRouteByView:{},tabsByView:{},requestedRoute:void 0,docsOrigin:void 0}),persist$1(navigationStore.getState())},localStorageKeys:[FORMER_TABS_KEY]});function useNavigationState(Au){return useStore$1(navigationStore,Au??(lo=>lo))}const useNavigationStore=Object.assign(useNavigationState,{getState:navigationStore.getState,setState:navigationStore.setState,subscribe:navigationStore.subscribe}),navigationListeners=new Set,notifyNavigationChange=()=>{navigationListeners.forEach(Au=>Au())},createNativeNavigate=()=>(Au,lo)=>{if(typeof window>"u")return;const $u=new URL(Au,window.location.href),Ru=lo||{},Iu=Ru.state||null;Ru.replace?(window.history.replaceState(Iu,"",$u.href),window.dispatchEvent(new Event("replacestate"))):(window.history.pushState(Iu,"",$u.href),window.dispatchEvent(new Event("pushstate"))),notifyNavigationChange(),Ru.scroll!==!1&&window.scrollTo(0,0)};function isNewTabClick(Au){return!!Au.metaKey||!!Au.ctrlKey||!!Au.shiftKey||!!Au.altKey||Au.button===1}const resolveUrl$1=Au=>new URL(Au,window.location.href).href;function openInNewTab(Au){window.open(resolveUrl$1(Au),"_blank","noopener,noreferrer")}function isLinkTo(Au,lo){const $u=Au.currentTarget??Au.target,Ru=$u&&typeof $u.closest=="function"?$u.closest("a[href]"):null;if(!Ru)return!1;try{return resolveUrl$1(Ru.getAttribute("href")??"")===resolveUrl$1(lo)}catch{return!1}}const isEvent=Au=>!!Au&&typeof Au.preventDefault=="function";function parseCall(Au,lo,$u){if(isEvent(Au)){const Ru=typeof lo=="boolean"?{resetPortals:lo,...$u??{}}:{...lo??{},...$u??{}};return{event:Au,options:Ru}}return typeof Au=="boolean"?{options:{resetPortals:Au,...typeof lo=="object"?lo:{},...$u??{}}}:{options:{...Au??{}}}}const useNavigate=()=>{const Au=useLayoutStore(),lo=typeof window<"u"&&!!window.__NEXT_DATA__,$u=typeof window<"u";let Ru=null;if(!lo&&useNavigateRR&&$u)try{Ru=useNavigateRR()}catch{}const Iu=reactExports.useMemo(()=>createNativeNavigate(),[]);return reactExports.useCallback((Pu,Ou,Mu,Du)=>{if(typeof window>"u")return;const{event:Lu,options:Bu}=parseCall(Ou,Mu,Du);if(typeof Pu=="number"){Lu?.preventDefault(),Ru?Ru(Pu):window.history.go(Pu);return}if(Lu&&isNewTabClick(Lu)){isLinkTo(Lu,Pu)||(Lu.preventDefault(),openInNewTab(Pu));return}if(Bu.newTab){Lu?.preventDefault(),openInNewTab(Pu);return}if(Lu?.preventDefault(),Bu.scroll!==!1&&(window.scrollTo(0,0),document.body.scrollTop=0),iamStore.getState().user&&navigationStore.getState().rememberRoute(Pu),Ru){Ru(Pu,{replace:Bu.replace,state:Bu.state});return}Bu.resetPortals!==!1&&(Au.resetLeftPortal(),Au.resetRightPortal()),Iu(Pu,{replace:Bu.replace,state:Bu.state,scroll:Bu.scroll})},[Ru,Iu,Au])};var propTypes$2={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var Au="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=Au,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var Au=requireReactPropTypesSecret();function lo(){}function $u(){}return $u.resetWarningCache=lo,factoryWithThrowingShims=function(){function Ru(Ou,Mu,Du,Lu,Bu,ju){if(ju!==Au){var Fu=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Fu.name="Invariant Violation",Fu}}Ru.isRequired=Ru;function Iu(){return Ru}var Pu={array:Ru,bigint:Ru,bool:Ru,func:Ru,number:Ru,object:Ru,string:Ru,symbol:Ru,any:Ru,arrayOf:Iu,element:Ru,elementType:Ru,instanceOf:Iu,node:Ru,objectOf:Iu,oneOf:Iu,oneOfType:Iu,shape:Iu,exact:Iu,checkPropTypes:$u,resetWarningCache:lo};return Pu.PropTypes=Pu,Pu},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes$2.exports=requireFactoryWithThrowingShims()()),propTypes$2.exports}var propTypesExports=requirePropTypes();const s$5=getDefaultExportFromCjs(propTypesExports);var L$4=Au=>typeof Au=="number"&&!isNaN(Au),N$3=Au=>typeof Au=="string",P$5=Au=>typeof Au=="function",ut$5=Au=>N$3(Au)||L$4(Au),F$4=Au=>reactExports.isValidElement(Au)||N$3(Au)||P$5(Au)||L$4(Au),Qt$3=1,st$5=()=>`${Qt$3++}`,I$3=new Map,U$5=[],rt$5=new Set,ht$4=()=>I$3.size>0,Ct$5=(Au,{containerId:lo})=>{var $u;return($u=I$3.get(lo||1))==null?void 0:$u.toasts.get(Au)};function X$5(Au,lo){var $u;if(lo)return!!(($u=I$3.get(lo))!=null&&$u.isToastActive(Au));let Ru=!1;return I$3.forEach(Iu=>{Iu.isToastActive(Au)&&(Ru=!0)}),Ru}function xt$4(Au){if(!ht$4()){U$5=U$5.filter(lo=>Au!=null&&lo.options.toastId!==Au);return}if(Au==null||ut$5(Au))I$3.forEach(lo=>{lo.removeToast(Au)});else if(Au&&("containerId"in Au||"id"in Au)){let lo=I$3.get(Au.containerId);lo?lo.removeToast(Au.id):I$3.forEach($u=>{$u.removeToast(Au.id)})}}var Et$4=(Au={})=>{I$3.forEach(lo=>{lo.props.limit&&(!Au.containerId||lo.id===Au.containerId)&&lo.clearQueue()})};function nt$5(Au,lo){F$4(Au)&&(ht$4()||U$5.push({content:Au,options:lo}),I$3.forEach($u=>{$u.buildToast(Au,lo)}))}function it$5(Au,lo){I$3.forEach($u=>{(lo==null||!(lo!=null&&lo.containerId)||lo?.containerId===$u.id)&&$u.toggle(Au,lo?.id)})}function St$4(Au){return rt$5.add(Au),()=>{rt$5.delete(Au)}}function qt$3(Au){return Au&&(N$3(Au.toastId)||L$4(Au.toastId))?Au.toastId:st$5()}function H$4(Au,lo){return nt$5(Au,lo),lo.toastId}function Q$4(Au,lo){return{...lo,type:lo&&lo.type||Au,toastId:qt$3(lo)}}function W$4(Au){return(lo,$u)=>H$4(lo,Q$4(Au,$u))}function y$6(Au,lo){return H$4(Au,Q$4("default",lo))}y$6.loading=(Au,lo)=>H$4(Au,Q$4("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...lo}));function Kt$4(Au,{pending:lo,error:$u,success:Ru},Iu){let Pu;lo&&(Pu=N$3(lo)?y$6.loading(lo,Iu):y$6.loading(lo.render,{...Iu,...lo}));let Ou={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},Mu=(Lu,Bu,ju)=>{if(Bu==null){y$6.dismiss(Pu);return}let Fu={type:Lu,...Ou,...Iu,data:ju},zu=N$3(Bu)?{render:Bu}:Bu;return Pu?y$6.update(Pu,{...Fu,...zu}):y$6(zu.render,{...Fu,...zu}),ju},Du=P$5(Au)?Au():Au;return Du.then(Lu=>Mu("success",Ru,Lu)).catch(Lu=>Mu("error",$u,Lu)),Du}y$6.promise=Kt$4;y$6.success=W$4("success");y$6.info=W$4("info");y$6.error=W$4("error");y$6.warning=W$4("warning");y$6.warn=y$6.warning;y$6.dark=(Au,lo)=>H$4(Au,Q$4("default",{theme:"dark",...lo}));function Yt$3(Au){xt$4(Au)}y$6.dismiss=Yt$3;y$6.clearWaitingQueue=Et$4;y$6.isActive=X$5;y$6.update=(Au,lo={})=>{let $u=Ct$5(Au,lo);if($u){let{props:Ru,content:Iu}=$u,Pu={delay:100,...Ru,...lo,toastId:lo.toastId||Au,updateId:st$5()};Pu.toastId!==Au&&(Pu.staleId=Au);let Ou=Pu.render||Iu;delete Pu.render,H$4(Ou,Pu)}};y$6.done=Au=>{y$6.update(Au,{progress:1})};y$6.onChange=St$4;y$6.play=Au=>it$5(!0,Au);y$6.pause=Au=>it$5(!1,Au);const JupyterReactTheme=vM.lazy(()=>__vitePreload(()=>import("./chunks/index-BUmmTwes.js").then(Au=>Au.r),[],import.meta.url).then(Au=>({default:Au.JupyterReactTheme})));let NotificationApi;isInsideJupyterLab()&&__vitePreload(()=>import("./chunks/index-BtwU5-oj.js").then(Au=>Au.q),[],import.meta.url).then(Au=>{NotificationApi=Au.Notification});const TOAST_POSITION="bottom-right",THEME_STORAGE_KEY="datalayer-theme";function resolveToastTheme(){if(typeof window>"u")return"dark";let Au;try{const $u=window.localStorage.getItem(THEME_STORAGE_KEY);$u&&(Au=JSON.parse($u)?.state?.colorMode)}catch{}return Au==="light"?"light":Au==="dark"||window.matchMedia?.("(prefers-color-scheme: dark)")?.matches?"dark":"light"}const displayType2Class={accent:"primary",link:"invisible",warn:"danger",default:"default"};function ToastButton({action:Au,closeToast:lo}){const $u=Ru=>{Au.callback(Ru),Ru.defaultPrevented||lo()};return jsxRuntimeExports.jsx(ButtonComponent,{title:Au.caption??Au.label,onClick:$u,variant:displayType2Class[Au.displayType??"default"],size:"small",children:Au.label})}function createContent(Au,lo,$u){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"jp-toast-message",children:Au.split(`
2328
2328
  `).map((Ru,Iu)=>jsxRuntimeExports.jsxs(vM.Fragment,{children:[Iu>0?jsxRuntimeExports.jsx("br",{}):null,Ru]},`part-${Iu}`))}),($u?.length??0)>0&&jsxRuntimeExports.jsxs("div",{className:"jp-toast-buttonBar",children:[jsxRuntimeExports.jsx("div",{className:"jp-toast-spacer"}),$u.map((Ru,Iu)=>jsxRuntimeExports.jsx(vM.Suspense,{fallback:null,children:jsxRuntimeExports.jsx(JupyterReactTheme,{children:jsxRuntimeExports.jsx(ToastButton,{action:Ru,closeToast:lo})})},"button-"+Iu))]})]})}const useToast=()=>{const Au=isInsideJupyterLab();return Object.freeze({enqueueToast:(Ru,Iu={variant:"info"})=>{const{actions:Pu,autoClose:Ou}=Iu,Mu=resolveToastTheme();switch(Iu.variant){case"info":return Au&&NotificationApi?NotificationApi.info(Ru,{autoClose:Ou??5e3,actions:Pu}):y$6.info(({closeToast:Du})=>createContent(Ru,()=>{Du&&Du()},Pu),{autoClose:Ou,position:TOAST_POSITION,theme:Mu});case"success":return Au&&NotificationApi?NotificationApi.success(Ru,{autoClose:Ou??5e3,actions:Pu}):y$6.success(({closeToast:Du})=>createContent(Ru,()=>{Du&&Du()},Pu),{autoClose:Ou,position:TOAST_POSITION,theme:Mu});case"warning":return Au&&NotificationApi?NotificationApi.warning(Ru,{autoClose:Ou??!1,actions:Pu}):y$6.warning(({closeToast:Du})=>createContent(Ru,()=>{Du&&Du()},Pu),{autoClose:Ou??!1,position:TOAST_POSITION,theme:Mu});case"error":return Au&&NotificationApi?NotificationApi.error(Ru,{autoClose:Ou??!1,actions:Pu}):y$6.error(({closeToast:Du})=>createContent(Ru,()=>{Du&&Du()},Pu),{autoClose:Ou??!1,position:TOAST_POSITION,theme:Mu})}},dismiss:Ru=>{Au&&NotificationApi?NotificationApi.dismiss(Ru):y$6.dismiss(Ru)},trackAsyncTask:(Ru,Iu)=>{const Pu=resolveToastTheme();return Au&&NotificationApi?NotificationApi.promise(Ru,Iu):y$6.promise(Ru,{error:{render:Iu.error.message,...Iu.error.options},pending:Iu.pending.message,success:{render:Iu.success.message,...Iu.success.options}},{position:TOAST_POSITION,theme:Pu,...Iu.pending.options})}})},PUBLIC_PATH_PREFIXES=["/about","/agents","/agentspecs","/aws/marketplace","/blog","/careers","/community","/compare","/connect","/contact","/dataliens","/docs","/events","/features","/gallery","/integrations","/join/confirm/user","/library","/outbounds/contacts/unsubscribe","/outbounds/invites/pages","/outbounds/invites/unsubscribe","/outbounds/users/unsubscribe","/partners","/password","/pricing","/privacy","/public","/releases","/reports","/research","/search","/settings/agentspecs","/signup/confirm/user","/support","/team","/terms","/testimonials","/trust","/tutorials","/usecases","/use-cases"],normalizePathname=Au=>((Au||"").split("?")[0]?.split("#")[0]||"/").trim().toLowerCase().replace(/\/+$/,"")||"/",isPublicPath=Au=>{const lo=normalizePathname(Au);return PUBLIC_PATH_PREFIXES.some($u=>lo===$u||lo.startsWith(`${$u}/`))};function useDatalayer(Au={}){const{loginRoute:lo="/login",notifyOnError:$u=!0}=Au,Ru=useLocation(),Iu=Lu=>{if(Lu!=="/login")return Lu;const Bu=Ru.pathname||"",ju="/jupyter/kernels",Fu="/jupyter/iam";if(Bu.includes(ju)){const[zu]=Bu.split(ju);return`${zu}${ju}/login`}if(Bu.includes(Fu)){const[zu]=Bu.split(Fu);return`${zu}${Fu}/login`}return Lu},{enqueueToast:Pu}=useToast(),Ou=useIAMStore(),Mu=useNavigate();return{requestDatalayer:async Lu=>{const{loginRoute:Bu=lo,notifyOnError:ju=$u,...Fu}=Lu,zu=Fu.token??Ou.token;return requestDatalayerAPI({...Fu,token:zu}).then(Uu=>Uu).catch(Uu=>{if(Uu.name==="RunResponseError"){const Hu=Uu,Vu=Hu.response.status===403;if(Hu.response.status===401){console.log("Datalayer sent a 401 return code.");const Wu=Iu(Bu),Zu=isPublicPath(Ru.pathname||"");!(Ru.pathname===Wu||Ru.pathname.endsWith("/login"))&&!Zu&&(Ou.logout(),Mu(Wu))}else ju&&!Vu&&(Hu.warnings&&Hu.warnings.forEach(Wu=>Pu(`${Wu}`,{variant:"warning"})),Hu.errors&&Hu.errors.forEach(Wu=>Pu(`${Wu}`,{variant:"error"})),Hu.message?Pu(`${Hu.message}`,{variant:"error"}):Pu("API Error",{variant:"error"}),Hu.exceptionMessage&&Pu(`${Hu.exceptionMessage}`,{variant:"error"}));return{success:!1,sucess:!1,message:Hu.message,errors:Hu.errors,warnings:Hu.warnings,detail:Hu.detail,status:Hu.response.status,code:Hu.response.status===403?"FORBIDDEN":`HTTP_${Hu.response.status}`}}throw console.log("Error",Uu),ju&&Pu(`${Uu.message}`,{variant:"error"}),Uu})}}}const API_BASE_PATHS={AI_AGENTS:"/api/ai-agents/v1",CONTENTS:"/api/contents/v1",IAM:"/api/iam/v1",MCP:"/api/mcp/v1",OTEL:"/api/otel/v1",RUNTIMES:"/api/runtimes/v1",SCHEDULER:"/api/scheduler/v1",SPACER:"/api/spacer/v1"},DEFAULT_SERVICE_URLS={AI_AGENTS:"https://r1.datalayer.run",RUNTIMES:"https://r1.datalayer.run"};function isMacOS(){return typeof navigator>"u"?!1:/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function useKeyboardShortcuts({enabled:Au=!0,shortcuts:lo}){const $u=reactExports.useCallback(Ru=>{if(!Au)return;const Iu=Ru.target,Pu=Iu.tagName==="INPUT"||Iu.tagName==="SELECT"||Iu.tagName==="TEXTAREA"||Iu.isContentEditable;for(const Ou of lo){if(Pu&&!Ou.allowInInput&&Ou.key!=="Escape"||Ru.key.toLowerCase()!==Ou.key.toLowerCase())continue;const Mu=isMacOS()?Ru.metaKey:Ru.ctrlKey;if(!(Ou.ctrlOrCmd&&!Mu)&&!(!Ou.ctrlOrCmd&&Mu&&Ou.key!=="Escape")&&!(Ou.shift&&!Ru.shiftKey)&&!(Ou.alt&&!Ru.altKey)){Ru.preventDefault(),Ru.stopPropagation(),Ou.handler();break}}},[Au,lo]);reactExports.useEffect(()=>{if(Au)return document.addEventListener("keydown",$u),()=>{document.removeEventListener("keydown",$u)}},[Au,$u])}function useChatKeyboardShortcuts({onToggle:Au,onNewChat:lo,onClear:$u,onFocusInput:Ru,enabled:Iu=!0}){const Pu=[];Au&&Pu.push({key:"k",ctrlOrCmd:!0,handler:Au,description:"Toggle chat sidebar"}),lo&&Pu.push({key:"n",ctrlOrCmd:!0,shift:!0,handler:lo,description:"Start new chat"}),$u&&Pu.push({key:"Backspace",ctrlOrCmd:!0,shift:!0,handler:$u,description:"Clear chat messages"}),Ru&&Pu.push({key:"/",handler:Ru,description:"Focus chat input"}),Au&&Pu.push({key:"Escape",handler:Au,description:"Close chat sidebar",allowInInput:!0}),useKeyboardShortcuts({enabled:Iu,shortcuts:Pu})}function getShortcutDisplay(Au){const lo=[],$u=isMacOS();lo.push($u?"⌘":"Ctrl"),Au.shift&&lo.push($u?"⇧":"Shift"),Au.alt&&lo.push($u?"⌥":"Alt");let Ru=Au.key.toUpperCase();return Au.key==="Escape"&&(Ru="Esc"),Au.key==="Backspace"&&(Ru=$u?"⌫":"Del"),lo.push(Ru),lo.join($u?"":"+")}const __vite_import_meta_env__={BASE_URL:"./",DEV:!1,MODE:"production",PROD:!0,SSR:!1},trackedConnections=new Map,getTrackedConnectionState=Au=>{const lo=trackedConnections.get(Au);return lo?Object.fromEntries(Object.entries(lo.stores).map(([$u,Ru])=>[$u,Ru.getState()])):{}},extractConnectionInformation=(Au,lo,$u)=>{if(Au===void 0)return{type:"untracked",connection:lo.connect($u)};const Ru=trackedConnections.get($u.name);if(Ru)return{type:"tracked",store:Au,...Ru};const Iu={connection:lo.connect($u),stores:{}};return trackedConnections.set($u.name,Iu),{type:"tracked",store:Au,...Iu}},devtoolsImpl=(Au,lo={})=>($u,Ru,Iu)=>{const{enabled:Pu,anonymousActionType:Ou,store:Mu,...Du}=lo;let Lu;try{Lu=(Pu??(__vite_import_meta_env__?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!Lu)return(__vite_import_meta_env__?"production":void 0)!=="production"&&Pu&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),Au($u,Ru,Iu);const{connection:Bu,...ju}=extractConnectionInformation(Mu,Lu,Du);let Fu=!0;Iu.setState=(Hu,Vu,Gu)=>{const Wu=$u(Hu,Vu);if(!Fu)return Wu;const Zu=Gu===void 0?{type:Ou||"anonymous"}:typeof Gu=="string"?{type:Gu}:Gu;return Mu===void 0?(Bu?.send(Zu,Ru()),Wu):(Bu?.send({...Zu,type:`${Mu}/${Zu.type}`},{...getTrackedConnectionState(Du.name),[Mu]:Iu.getState()}),Wu)};const zu=(...Hu)=>{const Vu=Fu;Fu=!1,$u(...Hu),Fu=Vu},Uu=Au(Iu.setState,Ru,Iu);if(ju.type==="untracked"?Bu?.init(Uu):(ju.stores[ju.store]=Iu,Bu?.init(Object.fromEntries(Object.entries(ju.stores).map(([Hu,Vu])=>[Hu,Hu===ju.store?Uu:Vu.getState()])))),Iu.dispatchFromDevtools&&typeof Iu.dispatch=="function"){let Hu=!1;const Vu=Iu.dispatch;Iu.dispatch=(...Gu)=>{(__vite_import_meta_env__?"production":void 0)!=="production"&&Gu[0].type==="__setState"&&!Hu&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),Hu=!0),Vu(...Gu)}}return Bu.subscribe(Hu=>{var Vu;switch(Hu.type){case"ACTION":if(typeof Hu.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return parseJsonThen(Hu.payload,Gu=>{if(Gu.type==="__setState"){if(Mu===void 0){zu(Gu.state);return}Object.keys(Gu.state).length!==1&&console.error(`
2329
2329
  [zustand devtools middleware] Unsupported __setState action format.
2330
2330
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
@@ -2419,7 +2419,7 @@ ${lo}:`]}}function getResponseMetadata2({id:Au,model:lo,created:$u}){return{id:A
2419
2419
  `)?1:0),LANGUAGES={py:"python",pyi:"python",ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",json:"json",md:"markdown",mdx:"markdown",yaml:"yaml",yml:"yaml",toml:"toml",sh:"bash",bash:"bash",css:"css",scss:"scss",html:"html",xml:"xml",sql:"sql",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",rb:"ruby",ipynb:"json",txt:"text"};function languageOf$1(Au){const lo=Au.split("/").pop()??"";if(lo==="Dockerfile"||lo==="Makefile")return lo.toLowerCase();const $u=lo.lastIndexOf(".");return $u>0?LANGUAGES[lo.slice($u+1).toLowerCase()]??"text":"text"}const DIFF_LINES_LIMIT=2e3,lines=Au=>Au===""?[]:Au.replace(/\n$/,"").split(`
2420
2420
  `);function unifiedDiffLines(Au,lo){const $u=Au===null?[]:lines(Au),Ru=lines(lo);if($u.length>DIFF_LINES_LIMIT||Ru.length>DIFF_LINES_LIMIT)return[...$u.map(Du=>({kind:"remove",text:Du})),...Ru.map(Du=>({kind:"add",text:Du}))];const Iu=[];for(let Du=0;Du<=$u.length;Du++)Iu.push(new Uint32Array(Ru.length+1));for(let Du=$u.length-1;Du>=0;Du--)for(let Lu=Ru.length-1;Lu>=0;Lu--)Iu[Du][Lu]=$u[Du]===Ru[Lu]?Iu[Du+1][Lu+1]+1:Math.max(Iu[Du+1][Lu],Iu[Du][Lu+1]);const Pu=[];let Ou=0,Mu=0;for(;Ou<$u.length&&Mu<Ru.length;)$u[Ou]===Ru[Mu]?(Pu.push({kind:"context",text:$u[Ou]}),Ou++,Mu++):Iu[Ou+1][Mu]>=Iu[Ou][Mu+1]?(Pu.push({kind:"remove",text:$u[Ou]}),Ou++):(Pu.push({kind:"add",text:Ru[Mu]}),Mu++);for(;Ou<$u.length;)Pu.push({kind:"remove",text:$u[Ou++]});for(;Mu<Ru.length;)Pu.push({kind:"add",text:Ru[Mu++]});return Pu}const THREAD_WORDS={opening:"Opening your conversation…",notOpened:Au=>`Your conversation could not be opened, so this is a new one: ${Au}`};function messagesOfThread(Au){if(!Array.isArray(Au))return[];const lo=[];for(const $u of Au){if(!$u||typeof $u!="object")continue;const{id:Ru,role:Iu,content:Pu,activityType:Ou}=$u;if(Iu==="activity"&&Ou===REACTOR_UI_NAME)throw new Error(`Activity ${String(Ru)}: what a message showed comes on the ui socket (RU-W)`);(Iu==="user"||Iu==="assistant")&&typeof Ru=="string"&&typeof Pu=="string"&&Pu.trim()&&lo.push({id:Ru,role:Iu,content:Iu==="user"?askedOf(Pu):Pu,createdAt:new Date})}return lo}function snapshotOfStream(Au){let lo;for(const $u of eventsOfStream(Au))$u.type==="MESSAGES_SNAPSHOT"&&Array.isArray($u.messages)&&(lo=$u.messages);return lo}async function detailOf(Au){try{const lo=await Au.json();if(typeof lo.detail=="string"&&lo.detail)return lo.detail}catch{}return`${Au.status}`}async function openThread({agentBaseUrl:Au,agentId:lo,uid:$u,token:Ru,fetcher:Iu=fetch}){const Pu=`${Au.replace(/\/+$/,"")}/api/v1/apps/sessions/${encodeURIComponent($u)}`,Ou=Ru?{Authorization:`Bearer ${Ru}`}:{},Mu=await Iu(`${Pu}/messages`,{headers:Ou});if(Mu.ok){const Bu=await Mu.json();return messagesOfThread(Bu.messages)}if(Mu.status!==404)throw new Error(await detailOf(Mu));const Du=await Iu(`${Pu}/resume`,{method:"POST",headers:{"Content-Type":"application/json",...Ou},body:JSON.stringify({agent:lo})});if(!Du.ok)throw new Error(await detailOf(Du));const Lu=snapshotOfStream(await Du.text());if(!Lu)throw new Error(`The runtime said nothing of session ${$u}.`);return messagesOfThread(Lu)}const ITEM_LIMIT=400,MESSAGE_TEXT_LIMIT=1e5,TOOL_TEXT_LIMIT=4e3,DIAGNOSTIC_LIMIT=50,DEVICE_LIMITS={items:ITEM_LIMIT,messageText:MESSAGE_TEXT_LIMIT,toolText:TOOL_TEXT_LIMIT,diagnostics:DIAGNOSTIC_LIMIT},BROWSER_LIMITS={items:5e3,messageText:1e6,toolText:1e6,diagnostics:DIAGNOSTIC_LIMIT},CUT_MARK="… (cut: too long to keep on this device)",emptyConversation=(Au=DEVICE_LIMITS)=>{for(const[lo,$u]of Object.entries(Au))if(!Number.isInteger($u)||$u<1)throw new Error(`A conversation's ${lo} bound is ${String($u)}: give a whole number of at least 1.`);return{items:[],running:!1,session:null,asking:null,dropped:0,diagnostics:[],turnRows:0,limits:Au}},text$g=Au=>typeof Au=="string"?Au:"",cut=(Au,lo)=>Au.length>lo?`${Au.slice(0,lo)}${CUT_MARK}`:Au,appended=(Au,lo,$u)=>Au.endsWith(CUT_MARK)?Au:cut(Au+lo,$u),isRecord$2=Au=>!!Au&&typeof Au=="object"&&!Array.isArray(Au);function withoutMeta(Au){if(isRecord$2(Au)&&"_meta"in Au){const{_meta:lo,...$u}=Au;return $u}return Au}function said$1(Au){return Au==null?"":typeof Au=="string"?Au:JSON.stringify(Au)}function questionOf$1(Au){if(!Au||typeof Au!="object")return null;const lo=Au,$u=lo.kind;if($u!=="text"&&$u!=="choice"&&$u!=="form"&&$u!=="file")throw new Error(`The application asks something no client knows: ${String($u)}.`);const Ru=Pu=>Array.isArray(Pu)?Pu.filter(Ou=>typeof Ou=="string"):[],Iu=lo.schema;return{kind:$u,prompt:text$g(lo.prompt),options:Ru(lo.options),schema:isRecord$2(Iu)?Iu:null,accept:Ru(lo.accept)}}function withItems(Au,lo,$u=0){const Ru=lo.length-Au.limits.items;return{...Au,items:Ru>0?lo.slice(Ru):lo,dropped:Au.dropped+Math.max(0,Ru),turnRows:Au.turnRows+$u}}function changed$1(Au,lo,$u){const Ru=Au.items.findIndex(Pu=>Pu.id===lo);if(Ru<0)return null;const Iu=Au.items.slice();return Iu[Ru]=$u(Iu[Ru]),{...Au,items:Iu}}function noted(Au,lo){const $u={type:lo.type,name:text$g(lo.name)||text$g(lo.activityType)};return{...Au,diagnostics:[...Au.diagnostics,$u].slice(-Au.limits.diagnostics)}}const HARNESS_TOOL_CALL="datalayer.harness.tool_call";function withRunningDisplay(Au,lo){if(!isRecord$2(lo)||!isRecord$2(lo._meta))return null;const $u=lo._meta[DISPLAY_META_KEY];if($u===void 0)return null;const Ru=protocolDisplayOf($u);if(!Ru)throw new Error(`${HARNESS_TOOL_CALL} of ${text$g(lo.id)} carries a display no client reads.`);return changed$1(Au,text$g(lo.id),Iu=>Iu.kind==="tool"&&Iu.status==="running"?{...Iu,value:{_meta:lo._meta},display:Ru}:Iu)}let rowCount=0;const rowId=Au=>`${Au}-${Date.now().toString(36)}-${rowCount+=1}`;function toolRow(Au,lo){return{kind:"tool",id:Au,name:lo,args:"",input:null,status:"running",awaiting:null,result:"",value:void 0,error:"",executionError:"",codeError:null,exitCode:null,display:null}}function withInput(Au,lo,$u){const Ru=JSON.stringify(lo),Iu=Ru.length<=$u;return{...Au,args:cut(Ru,$u),input:Iu?lo:null}}const asksThePerson=Au=>!!Au&&Array.isArray(Au.steps);function withResult(Au,lo,$u,Ru=!1){const Iu=lo.result,Pu=said$1(withoutMeta(Iu)),Ou=isRecord$2(Iu)?Iu:null,Mu=typeof Ou?.execution_error=="string"?Ou.execution_error:"",Du=isRecord$2(Ou?.code_error)?Ou.code_error:null,Lu=Du?{name:text$g(Du.name)||"Error",value:text$g(Du.value)||"Unknown error",traceback:cut(text$g(Du.traceback),$u)}:null,Bu=Ou&&typeof Ou.exit_code=="number"?Ou.exit_code:null,ju=!lo.success||Mu!==""||Lu!==null||Bu!==null&&Bu!==0||Ou?.execution_ok===!1,Fu=ju||Ru?null:Ou?.pending_approval===!0?"approval":asksThePerson(Au.input)?"person":null;return{...Au,status:ju?"error":Fu?"running":"complete",awaiting:Fu,result:cut(Pu,$u),value:Pu.length<=$u?Iu:void 0,error:lo.error??"",executionError:cut(Mu,$u),codeError:Lu,exitCode:Bu,display:displayOfToolResult(Au.name,Iu,Au.id)}}function rowsOfSnapshot(Au,lo,$u){if(!Array.isArray(Au))throw new Error("A messages snapshot carries no list of messages.");const Ru=[],Iu=new Map;for(const Pu of Au){for(const Ou of messagesOfThread([Pu]))Ru.push({kind:"message",id:Ou.id,role:Ou.role==="user"?"user":"assistant",text:cut(typeof Ou.content=="string"?Ou.content:"",lo.messageText),streaming:!1});if(isRecord$2(Pu)){if(Pu.role==="assistant"&&Pu.toolCalls!==void 0){if(!Array.isArray(Pu.toolCalls))throw new Error(`Message ${String(Pu.id)}'s tool calls are not a list.`);for(const Ou of Pu.toolCalls){const Mu=isRecord$2(Ou)?Ou.function:void 0;if(!isRecord$2(Ou)||typeof Ou.id!="string"||!isRecord$2(Mu))throw new Error(`Message ${String(Pu.id)} holds a tool call without its id and function.`);const Du=text$g(Mu.arguments);let Lu=null;if(Du&&Du.length<=lo.toolText){let Bu;try{Bu=JSON.parse(Du)}catch{Bu=void 0}if(!isRecord$2(Bu))throw new Error(`Tool call ${Ou.id}'s arguments are not a JSON object.`);Lu=Bu}Iu.set(Ou.id,Ru.length),Ru.push({...toolRow(Ou.id,text$g(Mu.name)),args:cut(Du,lo.toolText),input:Du?Lu:{},status:"complete"})}}if(Pu.role==="tool"){const Ou=text$g(Pu.toolCallId),Mu=Iu.get(Ou);if(Mu===void 0){$u.push(Ou||"no call");continue}Ru[Mu]=withResult(Ru[Mu],toolResultOf(Pu.content),lo.toolText,!0)}}}return Ru}function withPrompt(Au,lo,$u){return withItems({...Au,asking:null},[...Au.items,{kind:"message",id:lo,role:"user",text:$u,streaming:!1}])}function withoutItems(Au,lo){const $u=new Set(lo);return{...Au,items:Au.items.filter(Ru=>!$u.has(Ru.id))}}function withTurnEnded(Au,lo){const $u=Au.items.map(Iu=>Iu.kind==="message"&&Iu.streaming?{...Iu,streaming:!1}:Iu.kind==="tool"&&Iu.status==="running"?{...Iu,status:"error",awaiting:null,error:RUN_END_WORDS[lo]}:Iu.kind==="step"&&Iu.status==="running"?{...Iu,status:"complete"}:Iu),Ru={...Au,items:$u,running:!1};return withItems(Ru,[...$u,{kind:"end",id:rowId("end"),end:lo,words:RUN_END_WORDS[lo]}])}function withError(Au,lo){const $u=Au.items.map(Ru=>Ru.kind==="message"&&Ru.streaming?{...Ru,streaming:!1}:Ru.kind==="tool"&&Ru.status==="running"?{...Ru,status:"error",awaiting:null}:Ru.kind==="step"&&Ru.status==="running"?{...Ru,status:"complete"}:Ru);return withItems({...Au,running:!1},[...$u,{kind:"error",id:rowId("error"),text:lo}])}function required(Au,lo){const $u=Au[lo];if(typeof $u!="string"||!$u)throw new Error(`${Au.type} carries no ${lo}.`);return $u}function reduceConversation(Au,lo){const{limits:$u}=Au;switch(lo.type){case"RUN_STARTED":return{...Au,running:!0,asking:null,turnRows:0};case"TEXT_MESSAGE_START":{const Ru=text$g(lo.messageId)||rowId("message");if(Au.items.some(Pu=>Pu.id===Ru))return Au;const Iu=lo.role==="user"?"user":"assistant";return withItems(Au,[...Au.items,{kind:"message",id:Ru,role:Iu,text:"",streaming:!0}],1)}case"TEXT_MESSAGE_CONTENT":case"TEXT_MESSAGE_CHUNK":{const Ru=text$g(lo.delta),Iu=text$g(lo.messageId),Pu=changed$1(Au,Iu,Ou=>Ou.kind==="message"?{...Ou,text:appended(Ou.text,Ru,$u.messageText)}:Ou);return Pu||withItems(Au,[...Au.items,{kind:"message",id:Iu||rowId("message"),role:lo.role==="user"?"user":"assistant",text:cut(Ru,$u.messageText),streaming:lo.type==="TEXT_MESSAGE_CONTENT"}],1)}case"TEXT_MESSAGE_END":return changed$1(Au,text$g(lo.messageId),Ru=>Ru.kind==="message"?{...Ru,streaming:!1}:Ru)??Au;case"MESSAGE_SAID":{const Ru=required(lo,"messageId");if(typeof lo.text!="string")throw new Error(`MESSAGE_SAID of ${Ru} carries no text.`);if(lo.role!=="user"&&lo.role!=="assistant")throw new Error(`MESSAGE_SAID of ${Ru} is said by ${String(lo.role)}: only the person or the assistant speaks here.`);const Iu=lo.role,Pu=cut(lo.text,$u.messageText),Ou=Iu==="assistant"&&lo.streaming!==!1,Mu=Au.items.findIndex(Du=>Du.id===Ru);if(Mu>=0){const Du=Au.items[Mu];if(Du.kind!=="message")throw new Error(`MESSAGE_SAID of ${Ru} names a ${Du.kind} row.`);const Lu=Au.items.slice();return Lu[Mu]={...Du,text:Pu,streaming:Ou},{...Au,items:Lu}}return withItems(Au,[...Au.items,{kind:"message",id:Ru,role:Iu,text:Pu,streaming:Ou}],1)}case"TOOL_CALL_START":{const Ru=text$g(lo.toolCallId)||rowId("tool");return Au.items.some(Iu=>Iu.id===Ru)?Au:withItems(Au,[...Au.items,toolRow(Ru,text$g(lo.toolCallName)||text$g(lo.name))],1)}case"TOOL_CALL_ARGS":return changed$1(Au,text$g(lo.toolCallId),Ru=>Ru.kind==="tool"?{...Ru,args:appended(Ru.args,text$g(lo.delta),$u.toolText)}:Ru)??Au;case"TOOL_CALL_END":return changed$1(Au,text$g(lo.toolCallId),Ru=>{if(Ru.kind!=="tool"||Ru.args.endsWith(CUT_MARK))return Ru;if(!Ru.args)return{...Ru,input:{}};let Iu;try{Iu=JSON.parse(Ru.args)}catch{Iu=void 0}return isRecord$2(Iu)?{...Ru,input:Iu}:{...Ru,status:"error",awaiting:null,error:"Its arguments are not a JSON object."}})??Au;case"TOOL_CALL_SAID":{const Ru=required(lo,"toolCallId"),Iu=required(lo,"toolCallName");if(!isRecord$2(lo.args))throw new Error(`TOOL_CALL_SAID of ${Ru} carries arguments that are not an object.`);const Pu=lo.args,Ou=Au.items.findIndex(Lu=>Lu.id===Ru);if(Ou<0)return withItems(Au,[...Au.items,withInput(toolRow(Ru,Iu),Pu,$u.toolText)],1);const Mu=Au.items[Ou];if(Mu.kind!=="tool")throw new Error(`TOOL_CALL_SAID of ${Ru} names a ${Mu.kind} row.`);const Du=Au.items.slice();return Du[Ou]=withInput(Mu,{...Mu.input??{},...Pu},$u.toolText),{...Au,items:Du}}case"TOOL_CALL_RESULT":{const Ru=toolResultOf(lo.content);return changed$1(Au,text$g(lo.toolCallId),Iu=>Iu.kind==="tool"?withResult(Iu,Ru,$u.toolText):Iu)??noted(Au,lo)}case"TOOL_CALL_DONE":{const Ru=required(lo,"toolCallId");if(typeof lo.success!="boolean")throw new Error(`TOOL_CALL_DONE of ${Ru} does not say whether it succeeded.`);if(lo.error!==void 0&&typeof lo.error!="string")throw new Error(`TOOL_CALL_DONE of ${Ru} says its error in no words.`);const Iu={result:lo.result,success:lo.success,...lo.error!==void 0?{error:lo.error}:{}};return changed$1(Au,Ru,Pu=>Pu.kind==="tool"?withResult(Pu,Iu,$u.toolText,lo.answered===!0):Pu)??noted(Au,lo)}case"STEP_STARTED":{const Ru=text$g(lo.stepName)||text$g(lo.name);return withItems(Au,[...Au.items,{kind:"step",id:rowId("step"),name:Ru,status:"running"}],1)}case"STEP_FINISHED":{const Ru=text$g(lo.stepName)||text$g(lo.name),Iu=Au.items.map((Ou,Mu)=>({item:Ou,index:Mu})).reverse().find(({item:Ou})=>Ou.kind==="step"&&Ou.name===Ru&&Ou.status==="running");if(!Iu)return noted(Au,lo);const Pu=Au.items.slice();return Pu[Iu.index]={...Iu.item,status:"complete"},{...Au,items:Pu}}case"MESSAGES_SNAPSHOT":{const Ru=[],Iu=rowsOfSnapshot(lo.messages,$u,Ru),Pu=withItems({...Au,dropped:0},Iu,1);return Ru.reduce((Ou,Mu)=>noted(Ou,{type:"TOOL_CALL_RESULT",name:`${Mu} (no call)`}),Pu)}case"CUSTOM":{if(lo.name===REACTOR_UI_NAME)return withError(Au,UI_ON_RUN);if(lo.name==="loop.session"&&isRecord$2(lo.value)){const Ru=lo.value;return{...Au,session:Ru,asking:questionOf$1(Ru.asking)??Au.asking}}return lo.name===HARNESS_TOOL_CALL?withRunningDisplay(Au,lo.value)??noted(Au,lo):noted(Au,lo)}case"ACTIVITY_SNAPSHOT":case"ACTIVITY_DELTA":return lo.activityType===REACTOR_UI_NAME?withError(Au,UI_ON_RUN):noted(Au,lo);case"RUN_FINISHED":{const Ru=isRecord$2(lo.result)?lo.result:{},Iu=questionOf$1(Ru.asking),Pu=Au.items.map(Mu=>Mu.kind==="message"&&Mu.streaming?{...Mu,streaming:!1}:Mu),Ou={...Au,items:Pu,running:!1,asking:Iu};return Iu||Au.turnRows>0?Ou:withItems(Ou,[...Pu,{kind:"end",id:rowId("end"),end:"answered",words:RUN_END_WORDS.answered}])}case"RUN_ERROR":return withError(Au,text$g(lo.message)||"Run failed");default:return noted(Au,lo)}}const emptyChatLayer=()=>({extras:new Map,displays:new Map,speakers:new Map,steps:[]}),toolCardId=Au=>`tool-${Au}`,rowIdOf=Au=>"toolCallId"in Au&&Au.id===toolCardId(Au.toolCallId)?Au.toolCallId:Au.id;function cardStatusOf(Au){return Au.status!=="running"?Au.status:Au.awaiting==="approval"?"inProgress":"executing"}function toolCallOf(Au){return{id:toolCardId(Au.id),type:"tool-call",toolCallId:Au.id,toolName:Au.name,args:Au.input??{},...Au.value!==void 0?{result:Au.value}:Au.result?{result:Au.result}:{},status:cardStatusOf(Au),...Au.error?{error:Au.error}:{},...Au.executionError?{executionError:Au.executionError}:{},...Au.codeError?{codeError:{name:Au.codeError.name,value:Au.codeError.value,...Au.codeError.traceback?{traceback:Au.codeError.traceback}:{}}}:{},...Au.exitCode!==null?{exitCode:Au.exitCode}:{}}}function withToolSummaries(Au,lo=[]){const $u=lo.filter(Pu=>Pu.summaryOf);if($u.length===0)return Au;let Ru=!1;const Iu=Au.map(Pu=>{if(!isToolCallMessage(Pu))return Pu;const Ou=Pu,Mu=$u.find(Lu=>Lu.name===Ou.toolName);if(!Mu?.summaryOf||Ou.result===void 0)return Pu;const Du=Mu.summaryOf(Ou.args,Ou.result)?.trim();return!Du||Du===Ou.summary?Pu:(Ru=!0,{...Ou,summary:Du})});return Ru?Iu:Au}function conversationDrawer(Au){const lo=new Map,$u=(Iu,Pu)=>{const Ou=Pu.extras.get(Iu.id),Mu=Pu.displays.get(Iu.id),Du=Pu.speakers.get(Iu.id),Lu=lo.get(Iu.id);if(Lu&&Lu.row===Iu&&Lu.extras===Ou&&Lu.displays===Mu&&Lu.speaker===Du)return Lu.item;const Bu={...Ou,createdAt:Ou?.createdAt??new Date,id:Iu.id,role:Iu.kind==="message"?Iu.role:"assistant",content:Iu.kind==="message"?Iu.text:Au(Iu.text),...Mu?{displays:Mu}:{},...Du?{speaker:Du}:{}};return lo.set(Iu.id,{row:Iu,extras:Ou,displays:Mu,speaker:Du,item:Bu}),Bu},Ru=Iu=>{const Pu=lo.get(Iu.id);if(Pu&&Pu.row===Iu)return Pu.item;const Ou=toolCallOf(Iu);return lo.set(Iu.id,{row:Iu,item:Ou}),Ou};return(Iu,Pu)=>{const Ou=[],Mu=new Map;for(const Lu of Pu.steps)Mu.set(Lu.after,[...Mu.get(Lu.after)??[],Lu.item]);Ou.push(...Mu.get(null)??[]);const Du=new Set;for(const Lu of Iu.items)Du.add(Lu.id),Lu.kind==="message"||Lu.kind==="error"?Ou.push($u(Lu,Pu)):Lu.kind==="tool"&&Ou.push(Ru(Lu)),Ou.push(...Mu.get(Lu.id)??[]);for(const[Lu,Bu]of Mu)Lu!==null&&!Du.has(Lu)&&Ou.push(...Bu);for(const Lu of lo.keys())Du.has(Lu)||lo.delete(Lu);return Ou}}function isSubagentRunOver(Au){return Au.some(lo=>lo.phase==="end"||lo.phase==="error")}function getMonitoringCacheKey(Au,lo){return`${Au||"__unknown_service__"}::${lo||"__unknown_agent__"}`}function getTransportEndpoint(Au,lo,$u){switch(lo){case"vercel-ai":return`${Au}/api/v1/vercel-ai/${$u}`;case"a2a":return`${Au}/api/v1/a2a/agents/${$u}/`;case"acp":return`${Au}/api/v1/acp/ws/${$u}`;default:return`${Au}/api/v1/ag-ui/${$u}/`}}function toAgentRuntimeBaseUrl(Au){const lo=Au.replace(/\/$/,"");return lo.includes("/api/agent-runtimes")?lo:lo.includes("/api/jupyter-server")?lo.replace("/api/jupyter-server","/api/agent-runtimes"):lo.includes("/jupyter/server/")?lo.replace("/jupyter/server/","/agent-runtimes/"):lo.includes("/jupyter-server/")?lo.replace("/jupyter-server/","/agent-runtimes/"):lo.replace("/jupyter/","/agent-runtimes/")}async function createAgentOnRuntime(Au,lo,$u={}){const{iamStore:Ru}=await __vitePreload(async()=>{const{iamStore:Lu}=await import("./chunks/index-J-pyZzZ8.js");return{iamStore:Lu}},[],import.meta.url),Iu=Ru.getState().token||"";if(!$u.protocol&&!$u.agentSpecId)throw new Error("Agent protocol is required. Provide config.protocol from the selected spec/config.");const Pu=$u.protocol||"vercel-ai";if(!$u.model&&!$u.agentSpecId)throw new Error("Agent model is required. Provide config.model from the selected spec/config.");const Ou={name:$u.name||lo,description:$u.description||"AI assistant",agent_library:$u.agentLibrary||"pydantic-ai",transport:Pu,model:$u.model,system_prompt:$u.systemPrompt||"You are a helpful AI assistant."};$u.agentSpecId&&(Ou.agent_spec_id=$u.agentSpecId),typeof $u.enableSkills=="boolean"&&(Ou.enable_skills=$u.enableSkills),Array.isArray($u.backendTools)&&(Ou.backend_tools=$u.backendTools),$u.inferenceProvider&&(Ou.inferenceProvider=$u.inferenceProvider),typeof $u.enableCodemode=="boolean"&&(Ou.enable_codemode=$u.enableCodemode),$u.sandboxVariant&&(Ou.sandbox_variant=$u.sandboxVariant),$u.jupyterSandbox&&(Ou.jupyter_sandbox=$u.jupyterSandbox),$u.createPayload&&typeof $u.createPayload=="object"&&Object.assign(Ou,$u.createPayload);const Mu=await fetch(`${Au}/api/v1/agents`,{method:"POST",headers:{"Content-Type":"application/json",...Iu?{Authorization:`Bearer ${Iu}`}:{}},body:JSON.stringify(Ou)});if(Mu.ok||Mu.status===400||Mu.status===409){const Lu=getTransportEndpoint(Au,Pu,lo);return{agentId:lo,endpoint:Lu,isReady:!0}}const Du=await Mu.json().catch(()=>({}));throw new Error(Du.detail||`Failed to create agent: ${Mu.status}`)}const initialRuntimeState={runtime:null,status:"idle",error:null,isLaunching:!1,historyVersion:0,toolDecisionRequest:null},initialWsState={wsState:"closed",approvals:[],pendingApprovalCount:0,subagentActivity:{},compaction:null,contextSnapshot:null,costUsage:null,mcpStatus:null,codemodeStatus:null,fullContext:null,monitoringCache:{},loadedSkillsByAgentId:{}},initialNotebookState={ephemeralNotebookModels:{},ephemeralDocumentModels:{},editorModeByRuntime:{}},countPendingApprovals=Au=>Au.filter(lo=>lo.status==="pending").length;let _ws=null;const _wsByAgentId=new Map;function _resolveWs(Au){const lo=_wsByAgentId.size>0;if(Au){const $u=_wsByAgentId.get(Au);if($u&&$u.readyState===WebSocket.OPEN)return $u;if(lo)return null}return lo?null:_ws&&_ws.readyState===WebSocket.OPEN?_ws:null}const agentRuntimeStore=createStore$1()(subscribeWithSelector(persist((Au,lo)=>({agents:[],upsertAgent:$u=>{Au(Ru=>{const Iu=Ru.agents.findIndex(Mu=>Mu.id===$u.id),Pu=Date.now();if(Iu>=0){const Mu=[...Ru.agents];return Mu[Iu]={...Mu[Iu],...$u,lastUpdated:Pu},{agents:Mu}}const Ou={name:$u.name||$u.id,description:$u.description||"",status:$u.status||"initializing",lastUpdated:Pu,...$u};return{agents:[...Ru.agents,Ou]}})},getAgentById:$u=>lo().agents.find(Ru=>Ru.id===$u),getAgentByUrl:($u,Ru)=>lo().agents.find(Iu=>Iu.baseUrl===$u&&Iu.protocol===Ru),updateAgentStatus:($u,Ru,Iu=null)=>{Au(Pu=>{const Ou=Pu.agents.findIndex(Mu=>Mu.id===$u);if(Ou>=0){const Mu=[...Pu.agents];return Mu[Ou]={...Mu[Ou],status:Ru,error:Iu,lastUpdated:Date.now()},{agents:Mu}}return{}})},toggleAgentStatus:$u=>{Au(Ru=>{const Iu=Ru.agents.findIndex(Pu=>Pu.id===$u);if(Iu>=0){const Pu=[...Ru.agents],Ou=Pu[Iu].status;return Pu[Iu]={...Pu[Iu],status:Ou==="running"?"paused":"running",lastUpdated:Date.now()},{agents:Pu}}return{}})},deleteAgent:$u=>{Au(Ru=>{const{[$u]:Iu,...Pu}=Ru.loadedSkillsByAgentId;return{agents:Ru.agents.filter(Ou=>Ou.id!==$u),loadedSkillsByAgentId:Pu}})},clearAgents:()=>{Au({agents:[]})},setLoadedSkillsForAgent:($u,Ru)=>{Au(Iu=>({loadedSkillsByAgentId:{...Iu.loadedSkillsByAgentId,[$u]:Ru}}))},getLoadedSkillsForAgent:$u=>lo().loadedSkillsByAgentId[$u]??[],clearLoadedSkillsForAgent:$u=>{Au(Ru=>{if(!($u in Ru.loadedSkillsByAgentId))return{};const{[$u]:Iu,...Pu}=Ru.loadedSkillsByAgentId;return{loadedSkillsByAgentId:Pu}})},setEphemeralNotebookModel:($u,Ru)=>{Au(Iu=>({ephemeralNotebookModels:{...Iu.ephemeralNotebookModels,[$u]:Ru}}))},getEphemeralNotebookModel:$u=>lo().ephemeralNotebookModels[$u]??null,clearEphemeralNotebookModel:$u=>{Au(Ru=>{if(!($u in Ru.ephemeralNotebookModels))return{};const{[$u]:Iu,...Pu}=Ru.ephemeralNotebookModels;return{ephemeralNotebookModels:Pu}})},setEphemeralDocumentModel:($u,Ru)=>{Au(Iu=>({ephemeralDocumentModels:{...Iu.ephemeralDocumentModels,[$u]:Ru}}))},getEphemeralDocumentModel:$u=>lo().ephemeralDocumentModels[$u]??null,clearEphemeralDocumentModel:$u=>{Au(Ru=>{if(!($u in Ru.ephemeralDocumentModels))return{};const{[$u]:Iu,...Pu}=Ru.ephemeralDocumentModels;return{ephemeralDocumentModels:Pu}})},setEditorMode:($u,Ru)=>{$u&&Au(Iu=>({editorModeByRuntime:{...Iu.editorModeByRuntime,[$u]:Ru}}))},getEditorMode:$u=>lo().editorModeByRuntime[$u]??null,...initialRuntimeState,connectAgent:$u=>{const Ru=$u.jupyterBaseUrl||$u.serviceManager?.serverSettings.baseUrl;if(!Ru)throw new Error("connectAgent requires either jupyterBaseUrl or serviceManager");const Iu=toAgentRuntimeBaseUrl(Ru);Au({runtime:{runtimeName:$u.runtimeName,environmentName:$u.environmentName,jupyterBaseUrl:Ru,agentBaseUrl:Iu,serviceManager:$u.serviceManager,status:"ready",kernelId:$u.kernelId},status:"ready",error:null})},launchAgent:async $u=>{Au({status:"launching",error:null,isLaunching:!0});try{const{createRuntime:Ru}=await __vitePreload(async()=>{const{createRuntime:ju}=await Promise.resolve().then(()=>actions);return{createRuntime:ju}},void 0,import.meta.url),{runtimesStore:Iu}=await __vitePreload(async()=>{const{runtimesStore:ju}=await import("./chunks/index-DghIPf1A.js");return{runtimesStore:ju}},[],import.meta.url);$u.runtimesUrl&&Iu.setState({runtimesUrl:$u.runtimesUrl});const{runtimesUrl:Pu,...Ou}=$u,Mu=await Ru({environmentName:Ou.environmentName,creditsLimit:Ou.creditsLimit,type:Ou.type||"notebook",givenName:Ou.givenName,capabilities:Ou.capabilities,snapshot:Ou.snapshot,appSpec:Ou.appSpec,appUid:Ou.appUid,deploymentUid:Ou.deploymentUid});Au({status:"connecting"});const Du=Mu.ingress,Lu=toAgentRuntimeBaseUrl(Du),Bu={runtimeName:Mu.runtime_name,environmentName:Mu.environment.name,jupyterBaseUrl:Du,agentBaseUrl:Lu,status:"ready"};return Au({runtime:Bu,status:"ready",isLaunching:!1}),Bu}catch(Ru){const Iu=Ru instanceof Error?Ru.message:"Failed to launch runtime";throw Au({status:"error",error:Iu,isLaunching:!1}),Ru}},createAgent:async($u={})=>{const{runtime:Ru}=lo();if(!Ru)throw new Error("No runtime connected. Launch or connect to a runtime first.");try{const Iu=$u.name||Ru.runtimeName,Pu=await createAgentOnRuntime(Ru.agentBaseUrl,Iu,$u);return Au({runtime:{...Ru,agentId:Pu.agentId,endpoint:Pu.endpoint,isReady:Pu.isReady}}),Pu}catch(Iu){const Pu=Iu instanceof Error?Iu.message:"Failed to create agent";throw Au({error:Pu}),Iu}},disconnect:()=>{Au({runtime:null,status:"disconnected",error:null})},clearError:()=>Au({error:null}),setError:$u=>Au({error:$u,status:"error"}),...initialWsState,...initialNotebookState,setWsState:$u=>Au({wsState:$u}),setWs:($u,Ru)=>{_ws=$u,Ru&&($u?_wsByAgentId.set(Ru,$u):_wsByAgentId.delete(Ru))},applySnapshot:$u=>Au(Ru=>({approvals:Ru.approvals,pendingApprovalCount:Ru.pendingApprovalCount,contextSnapshot:$u.contextSnapshot??null,costUsage:$u.costUsage??null,mcpStatus:$u.mcpStatus??null,codemodeStatus:$u.codemodeStatus??null,fullContext:$u.fullContext??null})),appendSubagentEvent:$u=>Au(Ru=>{const Iu=$u.toolCallId??$u.subagentName,Pu=Ru.subagentActivity[Iu]??[];return Pu.some(Ou=>Ou.phase==="error"&&Ou.error===SUBAGENT_STOPPED)?{}:{subagentActivity:{...Ru.subagentActivity,[Iu]:[...Pu,$u]}}}),clearSubagentActivity:()=>Au({subagentActivity:{}}),stopSubagentActivity:()=>Au($u=>{let Ru=!1;const Iu={};for(const[Pu,Ou]of Object.entries($u.subagentActivity)){if(Ou.length===0||isSubagentRunOver(Ou)){Iu[Pu]=Ou;continue}Ru=!0,Iu[Pu]=[...Ou,{subagentName:Ou[0].subagentName,toolCallId:Ou[0].toolCallId??Pu,phase:"error",error:SUBAGENT_STOPPED,transport:Ou[0].transport}]}return Ru?{subagentActivity:Iu}:{}}),requestHistoryReload:()=>Au($u=>({historyVersion:$u.historyVersion+1})),requestToolDecision:$u=>Au(Ru=>({toolDecisionRequest:{seq:(Ru.toolDecisionRequest?.seq??0)+1,...$u}})),setCompaction:$u=>Au({compaction:$u}),upsertApproval:$u=>Au(Ru=>{const Iu=Ru.approvals.filter(Ou=>Ou.id!==$u.id),Pu=[$u,...Iu];return{approvals:Pu,pendingApprovalCount:countPendingApprovals(Pu)}}),removeApproval:$u=>Au(Ru=>{const Iu=Ru.approvals.filter(Pu=>Pu.id!==$u);return{approvals:Iu,pendingApprovalCount:countPendingApprovals(Iu)}}),sendDecision:($u,Ru,Iu,Pu,Ou)=>{const Mu=_resolveWs(Ou);return Mu?(Mu.send(JSON.stringify({type:"tool_approval_decision",approvalId:$u,approved:Ru,...Iu?{note:Iu}:{},...Pu?{toolCallId:Pu}:{}})),!0):!1},requestRefresh:$u=>{const Ru=_resolveWs($u);return Ru?(Ru.send(JSON.stringify({type:"request_snapshot"})),Ru.send(JSON.stringify({type:"request_otel_flush"})),!0):!1},sendRawMessage:($u,Ru)=>{const Iu=_resolveWs(Ru);return Iu?(Iu.send(JSON.stringify($u)),!0):!1},appendLocalTokenTurn:({serviceName:$u,agentId:Ru,timestampMs:Iu,promptTokens:Pu,completionTokens:Ou,totalTokens:Mu})=>{Au(Du=>{const Lu=getMonitoringCacheKey($u,Ru),Bu=Du.monitoringCache[Lu]??{tokenTurns:[],costPoints:[]},ju=[...Bu.tokenTurns],Fu=ju[ju.length-1];if(Fu&&Fu.userMessageTokens===Pu&&Fu.aiMessageTokens===Ou&&Fu.systemPromptTokens===0&&Fu.toolsDescriptionTokens===0&&Fu.toolsUsageTokens===0&&Fu.totalTokens===Mu)return ju[ju.length-1]={...Fu,timestampMs:Math.max(Fu.timestampMs,Iu)},{monitoringCache:{...Du.monitoringCache,[Lu]:{...Bu,tokenTurns:ju}}};const zu=(Fu?.turnNumber??0)+1;return ju.push({turnNumber:zu,timestampMs:Iu,systemPromptTokens:0,toolsDescriptionTokens:0,userMessageTokens:Pu,aiMessageTokens:Ou,toolsUsageTokens:0,totalTokens:Mu}),{monitoringCache:{...Du.monitoringCache,[Lu]:{...Bu,tokenTurns:ju}}}})},mergeTokenTurns:({serviceName:$u,agentId:Ru,turns:Iu})=>{Iu.length!==0&&Au(Pu=>{const Ou=getMonitoringCacheKey($u,Ru),Mu=Pu.monitoringCache[Ou]??{tokenTurns:[],costPoints:[]},Du=new Map;for(const Bu of Mu.tokenTurns)Du.set(Bu.turnNumber,Bu);for(const Bu of Iu)Du.set(Bu.turnNumber,Bu);const Lu=Array.from(Du.values()).sort((Bu,ju)=>Bu.turnNumber-ju.turnNumber);return{monitoringCache:{...Pu.monitoringCache,[Ou]:{...Mu,tokenTurns:Lu}}}})},appendLocalTokenTurnFull:({serviceName:$u,agentId:Ru,timestampMs:Iu,systemPromptTokens:Pu,toolsDescriptionTokens:Ou,userMessageTokens:Mu,aiMessageTokens:Du,toolsUsageTokens:Lu,totalTokens:Bu})=>{Au(ju=>{const Fu=getMonitoringCacheKey($u,Ru),zu=ju.monitoringCache[Fu]??{tokenTurns:[],costPoints:[]},Uu=[...zu.tokenTurns],Hu=Uu[Uu.length-1];if(Hu&&Hu.systemPromptTokens===Pu&&Hu.toolsDescriptionTokens===Ou&&Hu.userMessageTokens===Mu&&Hu.aiMessageTokens===Du&&Hu.toolsUsageTokens===Lu&&Hu.totalTokens===Bu)return Uu[Uu.length-1]={...Hu,timestampMs:Math.max(Hu.timestampMs,Iu)},{monitoringCache:{...ju.monitoringCache,[Fu]:{...zu,tokenTurns:Uu}}};const Vu=(Hu?.turnNumber??0)+1;return Uu.push({turnNumber:Vu,timestampMs:Iu,systemPromptTokens:Pu,toolsDescriptionTokens:Ou,userMessageTokens:Mu,aiMessageTokens:Du,toolsUsageTokens:Lu,totalTokens:Bu}),{monitoringCache:{...ju.monitoringCache,[Fu]:{...zu,tokenTurns:Uu}}}})},upsertLocalCostPoint:({serviceName:$u,agentId:Ru,timestampMs:Iu,cumulativeUsd:Pu})=>{Au(Ou=>{const Mu=getMonitoringCacheKey($u,Ru),Du=Ou.monitoringCache[Mu]??{tokenTurns:[],costPoints:[]},Lu=[...Du.costPoints],Bu=Lu.findIndex(ju=>Math.abs(ju.timestampMs-Iu)<1);return Bu>=0?Lu[Bu]={...Lu[Bu],cumulativeUsd:Math.max(Lu[Bu].cumulativeUsd,Pu)}:Lu.push({timestampMs:Iu,cumulativeUsd:Pu}),Lu.sort((ju,Fu)=>ju.timestampMs-Fu.timestampMs),{monitoringCache:{...Ou.monitoringCache,[Mu]:{...Du,costPoints:Lu}}}})},mergeCostPoints:({serviceName:$u,agentId:Ru,points:Iu})=>{Iu.length!==0&&Au(Pu=>{const Ou=getMonitoringCacheKey($u,Ru),Mu=Pu.monitoringCache[Ou]??{tokenTurns:[],costPoints:[]},Du=new Map;for(const Bu of Mu.costPoints)Du.set(Bu.timestampMs,Bu);for(const Bu of Iu){const ju=Du.get(Bu.timestampMs);ju?Du.set(Bu.timestampMs,{timestampMs:Bu.timestampMs,cumulativeUsd:Math.max(ju.cumulativeUsd,Bu.cumulativeUsd)}):Du.set(Bu.timestampMs,Bu)}const Lu=Array.from(Du.values()).sort((Bu,ju)=>Bu.timestampMs-ju.timestampMs);return{monitoringCache:{...Pu.monitoringCache,[Ou]:{...Mu,costPoints:Lu}}}})},reset:()=>{if(_ws)try{_ws.close(1e3,"reset")}catch{}_ws=null,_wsByAgentId.clear(),Au($u=>({...initialRuntimeState,...initialWsState,ephemeralNotebookModels:$u.ephemeralNotebookModels,ephemeralDocumentModels:$u.ephemeralDocumentModels,editorModeByRuntime:$u.editorModeByRuntime}))},resetWs:()=>{if(_ws)try{_ws.close(1e3,"reset")}catch{}_ws=null,_wsByAgentId.clear(),Au($u=>({...initialWsState,ephemeralNotebookModels:$u.ephemeralNotebookModels,ephemeralDocumentModels:$u.ephemeralDocumentModels,editorModeByRuntime:$u.editorModeByRuntime,subagentActivity:$u.subagentActivity}))}}),{name:"agent-runtimes-storage",storage:createJSONStorage(()=>localStorage),partialize:Au=>({agents:Au.agents.map(lo=>({id:lo.id,name:lo.name,description:lo.description,baseUrl:lo.baseUrl,transport:lo.protocol,status:lo.status,lastUpdated:lo.lastUpdated,documentId:lo.documentId,runtimeId:lo.runtimeId})),monitoringCache:Au.monitoringCache,loadedSkillsByAgentId:Au.loadedSkillsByAgentId,ephemeralNotebookModels:Au.ephemeralNotebookModels,ephemeralDocumentModels:Au.ephemeralDocumentModels,editorModeByRuntime:Au.editorModeByRuntime})})));function useAgentRuntimeStore(Au){return useStore$1(agentRuntimeStore,Au||($u=>$u))}const useAgentRuntimeStoreWithStatics=useAgentRuntimeStore;useAgentRuntimeStoreWithStatics.getState=agentRuntimeStore.getState;useAgentRuntimeStoreWithStatics.subscribe=agentRuntimeStore.subscribe;const useAgentRuntimeConnection=()=>useAgentRuntimeStore(Au=>Au.runtime),useAgentRuntimeStatus=()=>useAgentRuntimeStore(Au=>Au.status),useAgentRuntimeError=()=>useAgentRuntimeStore(Au=>Au.error),useAgentRuntimeIsLaunching=()=>useAgentRuntimeStore(Au=>Au.isLaunching),useAgentRuntimeMcpStatus=()=>useAgentRuntimeStore(Au=>Au.mcpStatus),useAgentRuntimeFullContext=()=>useAgentRuntimeStore(Au=>Au.fullContext),useAgentRuntimeContextSnapshot=()=>useAgentRuntimeStore(Au=>Au.contextSnapshot),useAgentRuntimeCodemodeStatus=()=>useAgentRuntimeStore(Au=>Au.codemodeStatus),useAgentRuntimeWsState=()=>useAgentRuntimeStore(Au=>Au.wsState),EMPTY_SUBAGENT_EVENTS=[],useAgentRuntimeSubagentActivity=Au=>useAgentRuntimeStore(lo=>Au?lo.subagentActivity[Au]??EMPTY_SUBAGENT_EVENTS:EMPTY_SUBAGENT_EVENTS),useAgentRuntimeSubagentActivityByToolCall=(Au,lo)=>useAgentRuntimeStore($u=>{if(Au){const Ru=$u.subagentActivity[Au];if(Ru&&Ru.length>0)return Ru}if(lo){const Ru=$u.subagentActivity[lo];if(Ru&&Ru.length>0)return Ru;let Iu;for(const Pu of Object.values($u.subagentActivity))Pu.length>0&&Pu[0]?.subagentName===lo&&(Iu=Pu);if(Iu)return Iu}return EMPTY_SUBAGENT_EVENTS}),useAgentRuntimeActiveSubagentToolCallId=()=>useAgentRuntimeStore(Au=>{let lo=null;for(const[$u,Ru]of Object.entries(Au.subagentActivity))Ru.length!==0&&(isSubagentRunOver(Ru)||(lo=$u));return lo});agentRuntimeStore.subscribe;async function requestAPI(Au="",lo={}){const $u=libExports$3.ServerConnection.makeSettings(),Ru=libExports$5.URLExt.join($u.baseUrl,"agent_runtimes",Au);let Iu;try{Iu=await libExports$3.ServerConnection.makeRequest(Ru,lo,$u)}catch(Ou){throw new libExports$3.ServerConnection.NetworkError(Ou)}let Pu=await Iu.text();if(Pu.length>0)try{Pu=JSON.parse(Pu)}catch{}if(!Iu.ok)throw new libExports$3.ServerConnection.ResponseError(Iu,Pu.message||Pu);return Pu}function useConfig(Au,lo,$u,Ru){return reactExports.useContext(QueryClientContext)?useQuery({queryFn:async()=>{if(lo){const Pu={"Content-Type":"application/json"};$u&&(Pu.Authorization=`Bearer ${$u}`);let Ou=lo;if(Ru){const Du=new URL(lo,window.location.origin);Du.searchParams.set("agent_id",Ru),Ou=Du.toString()}const Mu=await fetch(Ou,{headers:Pu});if(!Mu.ok)throw new Error(`Config fetch failed: ${Mu.statusText}`);return Mu.json()}return requestAPI("configure")},queryKey:["models",lo||"jupyter-server",Ru||"global"],enabled:Au,retry:1}):{data:void 0,isLoading:!1,isError:!1,error:null,refetch:()=>Promise.resolve({data:void 0})}}function parseSkillStatus(Au){return Au==="available"||Au==="enabled"||Au==="loaded"?Au:"available"}function useSkills(Au,lo,$u){const Ru=useAgentRuntimeCodemodeStatus(),Iu=reactExports.useMemo(()=>{if(!Ru)return;const Pu=(Ru.skills??[]).map(Ou=>({id:Ou.id??Ou.name,name:Ou.name,description:Ou.description,tags:Ou.tags,has_scripts:Ou.has_scripts,has_resources:Ou.has_resources,status:parseSkillStatus(Ou.status),approved:Ou.approved!==!1,skill_definition:Ou.skill_definition??null,source_variant:Ou.source_variant,module:Ou.module,package:Ou.package,method:Ou.method,path:Ou.path}));return{skills:Pu,total:Pu.length}},[Ru]);return{data:Iu,isLoading:!1,isError:!1,error:null,refetch:()=>Promise.resolve({data:Iu})}}function useSkillActions(Au){const lo=reactExports.useCallback(Pu=>{const Ou=agentRuntimeStore.getState().sendRawMessage({type:"skill_enable",skillId:Pu},Au);return Ou||console.warn("[useSkillActions] skill_enable dropped: websocket not ready"),Ou},[Au]),$u=reactExports.useCallback(Pu=>{const Ou=agentRuntimeStore.getState().sendRawMessage({type:"skill_disable",skillId:Pu},Au);return Ou||console.warn("[useSkillActions] skill_disable dropped: websocket not ready"),Ou},[Au]),Ru=reactExports.useCallback(Pu=>{const Ou=agentRuntimeStore.getState().sendRawMessage({type:"skill_approve",skillId:Pu},Au);return Ou||console.warn("[useSkillActions] skill_approve dropped: websocket not ready"),Ou},[Au]),Iu=reactExports.useCallback(Pu=>{const Ou=agentRuntimeStore.getState().sendRawMessage({type:"skill_unapprove",skillId:Pu},Au);return Ou||console.warn("[useSkillActions] skill_unapprove dropped: websocket not ready"),Ou},[Au]);return{enableSkill:lo,disableSkill:$u,approveSkill:Ru,unapproveSkill:Iu}}function useContextSnapshot(Au,lo,$u,Ru){return{data:useAgentRuntimeContextSnapshot()??void 0,isLoading:!1,isError:!1,error:null}}const RECONNECT_BASE_MS$1=1e3,RECONNECT_MAX_MS$1=3e4;function isRetryableCloseCode(Au){return!new Set([1002,1003,1007,1008,4401,4403]).has(Au)}function useSandbox(Au,lo,$u,Ru){const[Iu,Pu]=reactExports.useState(void 0),Ou=reactExports.useRef(null);reactExports.useEffect(()=>{if(!Au||!lo){Pu(void 0);return}const Du=getApiBaseFromConfig(lo);if(!Du)return;const Lu=Du.replace(/^http/,"ws"),Bu=[];Ru&&Bu.push(`agent_id=${encodeURIComponent(Ru)}`),$u&&Bu.push(`token=${encodeURIComponent($u)}`);const ju=`${Lu}/configure/sandbox/ws${Bu.length?`?${Bu.join("&")}`:""}`;let Fu=!1,zu,Uu=0;const Hu=Gu=>{if(Fu||!isRetryableCloseCode(Gu))return;const Wu=Math.min(RECONNECT_BASE_MS$1*2**Uu,RECONNECT_MAX_MS$1);Uu+=1,zu=setTimeout(Vu,Wu)},Vu=()=>{if(Fu)return;const Gu=new WebSocket(ju);Ou.current=Gu,Gu.onopen=()=>{Uu=0},Gu.onmessage=Wu=>{try{const Zu=JSON.parse(Wu.data);if(Zu&&Zu.action==="interrupt")return;const Ju=typeof Zu?.variant=="string"?Zu.variant:"";Pu({available:Ju!=="unavailable"&&Ju!=="error",sandbox_running:!!Zu?.sandbox_running,is_executing:!!Zu?.is_executing,variant:Ju})}catch{}},Gu.onclose=Wu=>{Ou.current=null,Hu(Wu.code)},Gu.onerror=()=>{Gu.close()}};return Vu(),()=>{Fu=!0,zu&&clearTimeout(zu),Ou.current?.close(),Ou.current=null,Pu(void 0)}},[Au,lo,$u,Ru]);const Mu=reactExports.useCallback(()=>{const Du=Ou.current;Du&&Du.readyState===WebSocket.OPEN&&Du.send(JSON.stringify({action:"interrupt"}))},[]);return{data:Iu,interrupt:Mu}}function _typeof$8(Au){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$8(Au)}function _createClass$8(Au,lo,$u){return Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _classCallCheck$8(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _callSuper$1(Au,lo,$u){return lo=_getPrototypeOf$1(lo),_possibleConstructorReturn$1(Au,_isNativeReflectConstruct$1()?Reflect.construct(lo,$u||[],_getPrototypeOf$1(Au).constructor):lo.apply(Au,$u))}function _possibleConstructorReturn$1(Au,lo){if(lo&&(_typeof$8(lo)==="object"||typeof lo=="function"))return lo;if(lo!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(Au)}function _assertThisInitialized$1(Au){if(Au===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Au}function _inherits$1(Au,lo){if(typeof lo!="function"&&lo!==null)throw new TypeError("Super expression must either be null or a function");Au.prototype=Object.create(lo&&lo.prototype,{constructor:{value:Au,writable:!0,configurable:!0}}),Object.defineProperty(Au,"prototype",{writable:!1}),lo&&_setPrototypeOf$1(Au,lo)}function _wrapNativeSuper(Au){var lo=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(Ru){if(Ru===null||!_isNativeFunction(Ru))return Ru;if(typeof Ru!="function")throw new TypeError("Super expression must either be null or a function");if(typeof lo<"u"){if(lo.has(Ru))return lo.get(Ru);lo.set(Ru,Iu)}function Iu(){return _construct(Ru,arguments,_getPrototypeOf$1(this).constructor)}return Iu.prototype=Object.create(Ru.prototype,{constructor:{value:Iu,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$1(Iu,Ru)},_wrapNativeSuper(Au)}function _construct(Au,lo,$u){if(_isNativeReflectConstruct$1())return Reflect.construct.apply(null,arguments);var Ru=[null];Ru.push.apply(Ru,lo);var Iu=new(Au.bind.apply(Au,Ru));return $u&&_setPrototypeOf$1(Iu,$u.prototype),Iu}function _isNativeReflectConstruct$1(){try{var Au=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$1=function(){return!!Au})()}function _isNativeFunction(Au){try{return Function.toString.call(Au).indexOf("[native code]")!==-1}catch{return typeof Au=="function"}}function _setPrototypeOf$1(Au,lo){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ru,Iu){return Ru.__proto__=Iu,Ru},_setPrototypeOf$1(Au,lo)}function _getPrototypeOf$1(Au){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($u){return $u.__proto__||Object.getPrototypeOf($u)},_getPrototypeOf$1(Au)}var DetailedError=(function(Au){function lo($u){var Ru,Iu=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,Pu=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ou=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(_classCallCheck$8(this,lo),Ru=_callSuper$1(this,lo,[$u]),Ru.originalRequest=Pu,Ru.originalResponse=Ou,Ru.causingError=Iu,Iu!=null&&($u+=", caused by ".concat(Iu.toString())),Pu!=null){var Mu=Pu.getHeader("X-Request-ID")||"n/a",Du=Pu.getMethod(),Lu=Pu.getURL(),Bu=Ou?Ou.getStatus():"n/a",ju=Ou?Ou.getBody()||"":"n/a";$u+=", originated from request (method: ".concat(Du,", url: ").concat(Lu,", response code: ").concat(Bu,", response text: ").concat(ju,", request id: ").concat(Mu,")")}return Ru.message=$u,Ru}return _inherits$1(lo,Au),_createClass$8(lo)})(_wrapNativeSuper(Error));function log(Au){}function _typeof$7(Au){"@babel/helpers - typeof";return _typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$7(Au)}function _classCallCheck$7(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$7(Ru.key),Ru)}}function _createClass$7(Au,lo,$u){return lo&&_defineProperties$7(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$7(Au){var lo=_toPrimitive$7(Au,"string");return _typeof$7(lo)=="symbol"?lo:lo+""}function _toPrimitive$7(Au,lo){if(_typeof$7(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$7(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var NoopUrlStorage=(function(){function Au(){_classCallCheck$7(this,Au)}return _createClass$7(Au,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function($u){return Promise.resolve([])}},{key:"removeUpload",value:function($u){return Promise.resolve()}},{key:"addUpload",value:function($u,Ru){return Promise.resolve(null)}}])})();const version$1="3.9.5",VERSION=version$1,_TD=typeof TextDecoder=="function"?new TextDecoder("utf-8",{ignoreBOM:!0}):void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(Au=>{let lo={};return Au.forEach(($u,Ru)=>lo[$u]=Ru),lo})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):Au=>new Uint8Array(Array.prototype.slice.call(Au,0)),_mkUriSafe=Au=>Au.replace(/=/g,"").replace(/[+\/]/g,lo=>lo=="+"?"-":"_"),_tidyB64=Au=>Au.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=Au=>{let lo,$u,Ru,Iu,Pu="";const Ou=Au.length%3;for(let Mu=0;Mu<Au.length;){if(($u=Au.charCodeAt(Mu++))>255||(Ru=Au.charCodeAt(Mu++))>255||(Iu=Au.charCodeAt(Mu++))>255)throw new TypeError("invalid character found");lo=$u<<16|Ru<<8|Iu,Pu+=b64chs[lo>>18&63]+b64chs[lo>>12&63]+b64chs[lo>>6&63]+b64chs[lo&63]}return Ou?Pu.slice(0,Ou-3)+"===".substring(Ou):Pu},_btoa=typeof btoa=="function"?Au=>btoa(Au):btoaPolyfill,_fromUint8Array=typeof Uint8Array.prototype.toBase64=="function"?Function.prototype.call.bind(Uint8Array.prototype.toBase64):Au=>{let $u=[];for(let Ru=0,Iu=Au.length;Ru<Iu;Ru+=4096)$u.push(_fromCC.apply(null,Au.subarray(Ru,Ru+4096)));return _btoa($u.join(""))},fromUint8Array=(Au,lo=!1)=>lo?_mkUriSafe(_fromUint8Array(Au)):_fromUint8Array(Au),cb_utob=Au=>{if(Au.length<2){var lo=Au.charCodeAt(0);return lo<128?Au:lo<2048?_fromCC(192|lo>>>6)+_fromCC(128|lo&63):_fromCC(224|lo>>>12&15)+_fromCC(128|lo>>>6&63)+_fromCC(128|lo&63)}else{var lo=65536+(Au.charCodeAt(0)-55296)*1024+(Au.charCodeAt(1)-56320);return _fromCC(240|lo>>>18&7)+_fromCC(128|lo>>>12&63)+_fromCC(128|lo>>>6&63)+_fromCC(128|lo&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g,utob=Au=>Au.replace(re_utob,cb_utob),_encode=_TE?Au=>_fromUint8Array(_TE.encode(Au)):Au=>_btoa(utob(Au)),encode$3=(Au,lo=!1)=>lo?_mkUriSafe(_encode(Au)):_encode(Au),encodeURI$1=Au=>encode$3(Au,!0),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=Au=>{switch(Au.length){case 4:var lo=(7&Au.charCodeAt(0))<<18|(63&Au.charCodeAt(1))<<12|(63&Au.charCodeAt(2))<<6|63&Au.charCodeAt(3),$u=lo-65536;return _fromCC(($u>>>10)+55296)+_fromCC(($u&1023)+56320);case 3:return _fromCC((15&Au.charCodeAt(0))<<12|(63&Au.charCodeAt(1))<<6|63&Au.charCodeAt(2));default:return _fromCC((31&Au.charCodeAt(0))<<6|63&Au.charCodeAt(1))}},btou=Au=>Au.replace(re_btou,cb_btou),atobPolyfill=Au=>{if(Au=Au.replace(/\s+/g,""),!b64re.test(Au))throw new TypeError("malformed base64.");Au+="==".slice(2-(Au.length&3));let lo,$u,Ru,Iu=[];for(let Pu=0;Pu<Au.length;)lo=b64tab[Au.charAt(Pu++)]<<18|b64tab[Au.charAt(Pu++)]<<12|($u=b64tab[Au.charAt(Pu++)])<<6|(Ru=b64tab[Au.charAt(Pu++)]),$u===64?Iu.push(_fromCC(lo>>16&255)):Ru===64?Iu.push(_fromCC(lo>>16&255,lo>>8&255)):Iu.push(_fromCC(lo>>16&255,lo>>8&255,lo&255));return Iu.join("")},_atob=typeof atob=="function"?Au=>atob(_tidyB64(Au)):atobPolyfill,_toUint8Array=typeof Uint8Array.fromBase64=="function"?Au=>Uint8Array.fromBase64(Au):Au=>_U8Afrom(_atob(Au).split("").map(lo=>lo.charCodeAt(0))),toUint8Array=Au=>_toUint8Array(_unURI(Au)),_decode=_TD?Au=>_TD.decode(_toUint8Array(Au)):Au=>btou(_atob(Au)),_unURI=Au=>_tidyB64(Au.replace(/[-_]/g,lo=>lo=="-"?"+":"/")),decode$3=Au=>_decode(_unURI(Au)),isValid$1=Au=>{if(typeof Au!="string")return!1;const lo=Au.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(lo)||!/[^\s0-9a-zA-Z\-_]/.test(lo)},_noEnum=Au=>({value:Au,enumerable:!1,writable:!0,configurable:!0}),extendString=function(){const Au=(lo,$u)=>Object.defineProperty(String.prototype,lo,_noEnum($u));Au("fromBase64",function(){return decode$3(this)}),Au("toBase64",function(lo){return encode$3(this,lo)}),Au("toBase64URI",function(){return encode$3(this,!0)}),Au("toBase64URL",function(){return encode$3(this,!0)}),Au("toUint8Array",function(){return toUint8Array(this)})},extendUint8Array=function(){const Au=(lo,$u)=>Object.defineProperty(Uint8Array.prototype,lo,_noEnum($u));Au("toBase64",function(lo){return fromUint8Array(this,lo)}),Au("toBase64URI",function(){return fromUint8Array(this,!0)}),Au("toBase64URL",function(){return fromUint8Array(this,!0)})},extendBuiltins=()=>{extendString(),extendUint8Array()},gBase64={version:version$1,VERSION,atob:_atob,atobPolyfill,btoa:_btoa,btoaPolyfill,fromBase64:decode$3,toBase64:encode$3,encode:encode$3,encodeURI:encodeURI$1,encodeURL:encodeURI$1,utob,btou,decode:decode$3,isValid:isValid$1,fromUint8Array,toUint8Array,extendString,extendUint8Array,extendBuiltins};var urlParseExports=requireUrlParse();const URL$1=getDefaultExportFromCjs(urlParseExports);function uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Au){var lo=Math.random()*16|0,$u=Au==="x"?lo:lo&3|8;return $u.toString(16)})}function _regeneratorRuntime$1(){_regeneratorRuntime$1=function(){return lo};var Au,lo={},$u=Object.prototype,Ru=$u.hasOwnProperty,Iu=Object.defineProperty||function(_d,bd,wd){_d[bd]=wd.value},Pu=typeof Symbol=="function"?Symbol:{},Ou=Pu.iterator||"@@iterator",Mu=Pu.asyncIterator||"@@asyncIterator",Du=Pu.toStringTag||"@@toStringTag";function Lu(_d,bd,wd){return Object.defineProperty(_d,bd,{value:wd,enumerable:!0,configurable:!0,writable:!0}),_d[bd]}try{Lu({},"")}catch{Lu=function(wd,Ad,gd){return wd[Ad]=gd}}function Bu(_d,bd,wd,Ad){var gd=bd&&bd.prototype instanceof Gu?bd:Gu,dd=Object.create(gd.prototype),yd=new vd(Ad||[]);return Iu(dd,"_invoke",{value:od(_d,wd,yd)}),dd}function ju(_d,bd,wd){try{return{type:"normal",arg:_d.call(bd,wd)}}catch(Ad){return{type:"throw",arg:Ad}}}lo.wrap=Bu;var Fu="suspendedStart",zu="suspendedYield",Uu="executing",Hu="completed",Vu={};function Gu(){}function Wu(){}function Zu(){}var Ju={};Lu(Ju,Ou,function(){return this});var Yu=Object.getPrototypeOf,Xu=Yu&&Yu(Yu(Sd([])));Xu&&Xu!==$u&&Ru.call(Xu,Ou)&&(Ju=Xu);var ed=Zu.prototype=Gu.prototype=Object.create(Ju);function td(_d){["next","throw","return"].forEach(function(bd){Lu(_d,bd,function(wd){return this._invoke(bd,wd)})})}function nd(_d,bd){function wd(gd,dd,yd,ld){var ud=ju(_d[gd],_d,dd);if(ud.type!=="throw"){var hd=ud.arg,md=hd.value;return md&&_typeof$6(md)=="object"&&Ru.call(md,"__await")?bd.resolve(md.__await).then(function(Ed){wd("next",Ed,yd,ld)},function(Ed){wd("throw",Ed,yd,ld)}):bd.resolve(md).then(function(Ed){hd.value=Ed,yd(hd)},function(Ed){return wd("throw",Ed,yd,ld)})}ld(ud.arg)}var Ad;Iu(this,"_invoke",{value:function(dd,yd){function ld(){return new bd(function(ud,hd){wd(dd,yd,ud,hd)})}return Ad=Ad?Ad.then(ld,ld):ld()}})}function od(_d,bd,wd){var Ad=Fu;return function(gd,dd){if(Ad===Uu)throw Error("Generator is already running");if(Ad===Hu){if(gd==="throw")throw dd;return{value:Au,done:!0}}for(wd.method=gd,wd.arg=dd;;){var yd=wd.delegate;if(yd){var ld=sd(yd,wd);if(ld){if(ld===Vu)continue;return ld}}if(wd.method==="next")wd.sent=wd._sent=wd.arg;else if(wd.method==="throw"){if(Ad===Fu)throw Ad=Hu,wd.arg;wd.dispatchException(wd.arg)}else wd.method==="return"&&wd.abrupt("return",wd.arg);Ad=Uu;var ud=ju(_d,bd,wd);if(ud.type==="normal"){if(Ad=wd.done?Hu:zu,ud.arg===Vu)continue;return{value:ud.arg,done:wd.done}}ud.type==="throw"&&(Ad=Hu,wd.method="throw",wd.arg=ud.arg)}}}function sd(_d,bd){var wd=bd.method,Ad=_d.iterator[wd];if(Ad===Au)return bd.delegate=null,wd==="throw"&&_d.iterator.return&&(bd.method="return",bd.arg=Au,sd(_d,bd),bd.method==="throw")||wd!=="return"&&(bd.method="throw",bd.arg=new TypeError("The iterator does not provide a '"+wd+"' method")),Vu;var gd=ju(Ad,_d.iterator,bd.arg);if(gd.type==="throw")return bd.method="throw",bd.arg=gd.arg,bd.delegate=null,Vu;var dd=gd.arg;return dd?dd.done?(bd[_d.resultName]=dd.value,bd.next=_d.nextLoc,bd.method!=="return"&&(bd.method="next",bd.arg=Au),bd.delegate=null,Vu):dd:(bd.method="throw",bd.arg=new TypeError("iterator result is not an object"),bd.delegate=null,Vu)}function ad(_d){var bd={tryLoc:_d[0]};1 in _d&&(bd.catchLoc=_d[1]),2 in _d&&(bd.finallyLoc=_d[2],bd.afterLoc=_d[3]),this.tryEntries.push(bd)}function pd(_d){var bd=_d.completion||{};bd.type="normal",delete bd.arg,_d.completion=bd}function vd(_d){this.tryEntries=[{tryLoc:"root"}],_d.forEach(ad,this),this.reset(!0)}function Sd(_d){if(_d||_d===""){var bd=_d[Ou];if(bd)return bd.call(_d);if(typeof _d.next=="function")return _d;if(!isNaN(_d.length)){var wd=-1,Ad=function gd(){for(;++wd<_d.length;)if(Ru.call(_d,wd))return gd.value=_d[wd],gd.done=!1,gd;return gd.value=Au,gd.done=!0,gd};return Ad.next=Ad}}throw new TypeError(_typeof$6(_d)+" is not iterable")}return Wu.prototype=Zu,Iu(ed,"constructor",{value:Zu,configurable:!0}),Iu(Zu,"constructor",{value:Wu,configurable:!0}),Wu.displayName=Lu(Zu,Du,"GeneratorFunction"),lo.isGeneratorFunction=function(_d){var bd=typeof _d=="function"&&_d.constructor;return!!bd&&(bd===Wu||(bd.displayName||bd.name)==="GeneratorFunction")},lo.mark=function(_d){return Object.setPrototypeOf?Object.setPrototypeOf(_d,Zu):(_d.__proto__=Zu,Lu(_d,Du,"GeneratorFunction")),_d.prototype=Object.create(ed),_d},lo.awrap=function(_d){return{__await:_d}},td(nd.prototype),Lu(nd.prototype,Mu,function(){return this}),lo.AsyncIterator=nd,lo.async=function(_d,bd,wd,Ad,gd){gd===void 0&&(gd=Promise);var dd=new nd(Bu(_d,bd,wd,Ad),gd);return lo.isGeneratorFunction(bd)?dd:dd.next().then(function(yd){return yd.done?yd.value:dd.next()})},td(ed),Lu(ed,Du,"Generator"),Lu(ed,Ou,function(){return this}),Lu(ed,"toString",function(){return"[object Generator]"}),lo.keys=function(_d){var bd=Object(_d),wd=[];for(var Ad in bd)wd.push(Ad);return wd.reverse(),function gd(){for(;wd.length;){var dd=wd.pop();if(dd in bd)return gd.value=dd,gd.done=!1,gd}return gd.done=!0,gd}},lo.values=Sd,vd.prototype={constructor:vd,reset:function(bd){if(this.prev=0,this.next=0,this.sent=this._sent=Au,this.done=!1,this.delegate=null,this.method="next",this.arg=Au,this.tryEntries.forEach(pd),!bd)for(var wd in this)wd.charAt(0)==="t"&&Ru.call(this,wd)&&!isNaN(+wd.slice(1))&&(this[wd]=Au)},stop:function(){this.done=!0;var bd=this.tryEntries[0].completion;if(bd.type==="throw")throw bd.arg;return this.rval},dispatchException:function(bd){if(this.done)throw bd;var wd=this;function Ad(hd,md){return yd.type="throw",yd.arg=bd,wd.next=hd,md&&(wd.method="next",wd.arg=Au),!!md}for(var gd=this.tryEntries.length-1;gd>=0;--gd){var dd=this.tryEntries[gd],yd=dd.completion;if(dd.tryLoc==="root")return Ad("end");if(dd.tryLoc<=this.prev){var ld=Ru.call(dd,"catchLoc"),ud=Ru.call(dd,"finallyLoc");if(ld&&ud){if(this.prev<dd.catchLoc)return Ad(dd.catchLoc,!0);if(this.prev<dd.finallyLoc)return Ad(dd.finallyLoc)}else if(ld){if(this.prev<dd.catchLoc)return Ad(dd.catchLoc,!0)}else{if(!ud)throw Error("try statement without catch or finally");if(this.prev<dd.finallyLoc)return Ad(dd.finallyLoc)}}}},abrupt:function(bd,wd){for(var Ad=this.tryEntries.length-1;Ad>=0;--Ad){var gd=this.tryEntries[Ad];if(gd.tryLoc<=this.prev&&Ru.call(gd,"finallyLoc")&&this.prev<gd.finallyLoc){var dd=gd;break}}dd&&(bd==="break"||bd==="continue")&&dd.tryLoc<=wd&&wd<=dd.finallyLoc&&(dd=null);var yd=dd?dd.completion:{};return yd.type=bd,yd.arg=wd,dd?(this.method="next",this.next=dd.finallyLoc,Vu):this.complete(yd)},complete:function(bd,wd){if(bd.type==="throw")throw bd.arg;return bd.type==="break"||bd.type==="continue"?this.next=bd.arg:bd.type==="return"?(this.rval=this.arg=bd.arg,this.method="return",this.next="end"):bd.type==="normal"&&wd&&(this.next=wd),Vu},finish:function(bd){for(var wd=this.tryEntries.length-1;wd>=0;--wd){var Ad=this.tryEntries[wd];if(Ad.finallyLoc===bd)return this.complete(Ad.completion,Ad.afterLoc),pd(Ad),Vu}},catch:function(bd){for(var wd=this.tryEntries.length-1;wd>=0;--wd){var Ad=this.tryEntries[wd];if(Ad.tryLoc===bd){var gd=Ad.completion;if(gd.type==="throw"){var dd=gd.arg;pd(Ad)}return dd}}throw Error("illegal catch attempt")},delegateYield:function(bd,wd,Ad){return this.delegate={iterator:Sd(bd),resultName:wd,nextLoc:Ad},this.method==="next"&&(this.arg=Au),Vu}},lo}function asyncGeneratorStep$1(Au,lo,$u,Ru,Iu,Pu,Ou){try{var Mu=Au[Pu](Ou),Du=Mu.value}catch(Lu){$u(Lu);return}Mu.done?lo(Du):Promise.resolve(Du).then(Ru,Iu)}function _asyncToGenerator$1(Au){return function(){var lo=this,$u=arguments;return new Promise(function(Ru,Iu){var Pu=Au.apply(lo,$u);function Ou(Du){asyncGeneratorStep$1(Pu,Ru,Iu,Ou,Mu,"next",Du)}function Mu(Du){asyncGeneratorStep$1(Pu,Ru,Iu,Ou,Mu,"throw",Du)}Ou(void 0)})}}function _slicedToArray$1(Au,lo){return _arrayWithHoles$1(Au)||_iterableToArrayLimit$1(Au,lo)||_unsupportedIterableToArray$1(Au,lo)||_nonIterableRest$1()}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2421
2421
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit$1(Au,lo){var $u=Au==null?null:typeof Symbol<"u"&&Au[Symbol.iterator]||Au["@@iterator"];if($u!=null){var Ru,Iu,Pu,Ou,Mu=[],Du=!0,Lu=!1;try{if(Pu=($u=$u.call(Au)).next,lo!==0)for(;!(Du=(Ru=Pu.call($u)).done)&&(Mu.push(Ru.value),Mu.length!==lo);Du=!0);}catch(Bu){Lu=!0,Iu=Bu}finally{try{if(!Du&&$u.return!=null&&(Ou=$u.return(),Object(Ou)!==Ou))return}finally{if(Lu)throw Iu}}return Mu}}function _arrayWithHoles$1(Au){if(Array.isArray(Au))return Au}function _typeof$6(Au){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$6(Au)}function _createForOfIteratorHelper(Au,lo){var $u=typeof Symbol<"u"&&Au[Symbol.iterator]||Au["@@iterator"];if(!$u){if(Array.isArray(Au)||($u=_unsupportedIterableToArray$1(Au))||lo){$u&&(Au=$u);var Ru=0,Iu=function(){};return{s:Iu,n:function(){return Ru>=Au.length?{done:!0}:{done:!1,value:Au[Ru++]}},e:function(Lu){throw Lu},f:Iu}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2422
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Pu=!0,Ou=!1,Mu;return{s:function(){$u=$u.call(Au)},n:function(){var Lu=$u.next();return Pu=Lu.done,Lu},e:function(Lu){Ou=!0,Mu=Lu},f:function(){try{!Pu&&$u.return!=null&&$u.return()}finally{if(Ou)throw Mu}}}}function _unsupportedIterableToArray$1(Au,lo){if(Au){if(typeof Au=="string")return _arrayLikeToArray$1(Au,lo);var $u=Object.prototype.toString.call(Au).slice(8,-1);if($u==="Object"&&Au.constructor&&($u=Au.constructor.name),$u==="Map"||$u==="Set")return Array.from(Au);if($u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($u))return _arrayLikeToArray$1(Au,lo)}}function _arrayLikeToArray$1(Au,lo){(lo==null||lo>Au.length)&&(lo=Au.length);for(var $u=0,Ru=new Array(lo);$u<lo;$u++)Ru[$u]=Au[$u];return Ru}function ownKeys$1(Au,lo){var $u=Object.keys(Au);if(Object.getOwnPropertySymbols){var Ru=Object.getOwnPropertySymbols(Au);lo&&(Ru=Ru.filter(function(Iu){return Object.getOwnPropertyDescriptor(Au,Iu).enumerable})),$u.push.apply($u,Ru)}return $u}function _objectSpread$1(Au){for(var lo=1;lo<arguments.length;lo++){var $u=arguments[lo]!=null?arguments[lo]:{};lo%2?ownKeys$1(Object($u),!0).forEach(function(Ru){_defineProperty$1(Au,Ru,$u[Ru])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Au,Object.getOwnPropertyDescriptors($u)):ownKeys$1(Object($u)).forEach(function(Ru){Object.defineProperty(Au,Ru,Object.getOwnPropertyDescriptor($u,Ru))})}return Au}function _defineProperty$1(Au,lo,$u){return lo=_toPropertyKey$6(lo),lo in Au?Object.defineProperty(Au,lo,{value:$u,enumerable:!0,configurable:!0,writable:!0}):Au[lo]=$u,Au}function _classCallCheck$6(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$6(Ru.key),Ru)}}function _createClass$6(Au,lo,$u){return lo&&_defineProperties$6(Au.prototype,lo),$u&&_defineProperties$6(Au,$u),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$6(Au){var lo=_toPrimitive$6(Au,"string");return _typeof$6(lo)=="symbol"?lo:lo+""}function _toPrimitive$6(Au,lo){if(_typeof$6(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$6(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var PROTOCOL_TUS_V1="tus-v1",PROTOCOL_IETF_DRAFT_03="ietf-draft-03",PROTOCOL_IETF_DRAFT_05="ietf-draft-05",defaultOptions$2={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:defaultOnShouldRetry,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:PROTOCOL_TUS_V1},BaseUpload=(function(){function Au(lo,$u){_classCallCheck$6(this,Au),"resume"in $u&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=$u,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=lo,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return _createClass$6(Au,[{key:"findPreviousUploads",value:function(){var $u=this;return this.options.fingerprint(this.file,this.options).then(function(Ru){return $u._urlStorage.findUploadsByFingerprint(Ru)})}},{key:"resumeFromPreviousUpload",value:function($u){this.url=$u.uploadUrl||null,this._parallelUploadUrls=$u.parallelUploadUrls||null,this._urlStorageKey=$u.urlStorageKey}},{key:"start",value:function(){var $u=this,Ru=this.file;if(!Ru){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(![PROTOCOL_TUS_V1,PROTOCOL_IETF_DRAFT_03,PROTOCOL_IETF_DRAFT_05].includes(this.options.protocol)){this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var Iu=this.options.retryDelays;if(Iu!=null&&Object.prototype.toString.call(Iu)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var Pu=0,Ou=["uploadUrl","uploadSize","uploadLengthDeferred"];Pu<Ou.length;Pu++){var Mu=Ou[Pu];if(this.options[Mu]){this._emitError(new Error("tus: cannot use the ".concat(Mu," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(Ru,this.options).then(function(Du){return $u._fingerprint=Du,$u._source?$u._source:$u.options.fileReader.openFile(Ru,$u.options.chunkSize)}).then(function(Du){if($u._source=Du,$u.options.uploadLengthDeferred)$u._size=null;else if($u.options.uploadSize!=null){if($u._size=Number($u.options.uploadSize),Number.isNaN($u._size)){$u._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if($u._size=$u._source.size,$u._size==null){$u._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}$u.options.parallelUploads>1||$u._parallelUploadUrls!=null?$u._startParallelUpload():$u._startSingleUpload()}).catch(function(Du){$u._emitError(Du)})}},{key:"_startParallelUpload",value:function(){var $u,Ru=this,Iu=this._size,Pu=0;this._parallelUploads=[];var Ou=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,Mu=($u=this.options.parallelUploadBoundaries)!==null&&$u!==void 0?$u:splitSizeIntoParts(this._source.size,Ou);this._parallelUploadUrls&&Mu.forEach(function(Bu,ju){Bu.uploadUrl=Ru._parallelUploadUrls[ju]||null}),this._parallelUploadUrls=new Array(Mu.length);var Du=Mu.map(function(Bu,ju){var Fu=0;return Ru._source.slice(Bu.start,Bu.end).then(function(zu){var Uu=zu.value;return new Promise(function(Hu,Vu){var Gu=_objectSpread$1(_objectSpread$1({},Ru.options),{},{uploadUrl:Bu.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:Ru.options.metadataForPartialUploads,headers:_objectSpread$1(_objectSpread$1({},Ru.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:Hu,onError:Vu,onProgress:function(Ju){Pu=Pu-Fu+Ju,Fu=Ju,Ru._emitProgress(Pu,Iu)},onUploadUrlAvailable:function(){Ru._parallelUploadUrls[ju]=Wu.url,Ru._parallelUploadUrls.filter(function(Ju){return!!Ju}).length===Mu.length&&Ru._saveUploadInUrlStorage()}}),Wu=new Au(Uu,Gu);Wu.start(),Ru._parallelUploads.push(Wu)})})}),Lu;Promise.all(Du).then(function(){Lu=Ru._openRequest("POST",Ru.options.endpoint),Lu.setHeader("Upload-Concat","final;".concat(Ru._parallelUploadUrls.join(" ")));var Bu=encodeMetadata(Ru.options.metadata);return Bu!==""&&Lu.setHeader("Upload-Metadata",Bu),Ru._sendRequest(Lu,null)}).then(function(Bu){if(!inStatusCategory(Bu.getStatus(),200)){Ru._emitHttpError(Lu,Bu,"tus: unexpected response while creating upload");return}var ju=Bu.getHeader("Location");if(ju==null){Ru._emitHttpError(Lu,Bu,"tus: invalid or missing Location header");return}Ru.url=resolveUrl(Ru.options.endpoint,ju),"Created upload at ".concat(Ru.url),Ru._emitSuccess(Bu)}).catch(function(Bu){Ru._emitError(Bu)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){"Resuming upload from previous URL: ".concat(this.url),this._resumeUpload();return}if(this.options.uploadUrl!=null){"Resuming upload from provided URL: ".concat(this.options.uploadUrl),this.url=this.options.uploadUrl,this._resumeUpload();return}this._createUpload()}},{key:"abort",value:function($u){var Ru=this;if(this._parallelUploads!=null){var Iu=_createForOfIteratorHelper(this._parallelUploads),Pu;try{for(Iu.s();!(Pu=Iu.n()).done;){var Ou=Pu.value;Ou.abort($u)}}catch(Mu){Iu.e(Mu)}finally{Iu.f()}}return this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!$u||this.url==null?Promise.resolve():Au.terminate(this.url,this.options).then(function(){return Ru._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function($u,Ru,Iu,Pu){this._emitError(new DetailedError(Iu,Pu,$u,Ru))}},{key:"_emitError",value:function($u){var Ru=this;if(!this._aborted){if(this.options.retryDelays!=null){var Iu=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(Iu&&(this._retryAttempt=0),shouldRetry($u,this._retryAttempt,this.options)){var Pu=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){Ru.start()},Pu);return}}if(typeof this.options.onError=="function")this.options.onError($u);else throw $u}}},{key:"_emitSuccess",value:function($u){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess({lastResponse:$u})}},{key:"_emitProgress",value:function($u,Ru){typeof this.options.onProgress=="function"&&this.options.onProgress($u,Ru)}},{key:"_emitChunkComplete",value:function($u,Ru,Iu){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete($u,Ru,Iu)}},{key:"_createUpload",value:function(){var $u=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var Ru=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?Ru.setHeader("Upload-Defer-Length","1"):Ru.setHeader("Upload-Length","".concat(this._size));var Iu=encodeMetadata(this.options.metadata);Iu!==""&&Ru.setHeader("Upload-Metadata",Iu);var Pu;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,Pu=this._addChunkToRequest(Ru)):((this.options.protocol===PROTOCOL_IETF_DRAFT_03||this.options.protocol===PROTOCOL_IETF_DRAFT_05)&&Ru.setHeader("Upload-Complete","?0"),Pu=this._sendRequest(Ru,null)),Pu.then(function(Ou){if(!inStatusCategory(Ou.getStatus(),200)){$u._emitHttpError(Ru,Ou,"tus: unexpected response while creating upload");return}var Mu=Ou.getHeader("Location");if(Mu==null){$u._emitHttpError(Ru,Ou,"tus: invalid or missing Location header");return}if($u.url=resolveUrl($u.options.endpoint,Mu),"Created upload at ".concat($u.url),typeof $u.options.onUploadUrlAvailable=="function"&&$u.options.onUploadUrlAvailable(),$u._size===0){$u._emitSuccess(Ou),$u._source.close();return}$u._saveUploadInUrlStorage().then(function(){$u.options.uploadDataDuringCreation?$u._handleUploadResponse(Ru,Ou):($u._offset=0,$u._performUpload())})}).catch(function(Ou){$u._emitHttpError(Ru,null,"tus: failed to create upload",Ou)})}},{key:"_resumeUpload",value:function(){var $u=this,Ru=this._openRequest("HEAD",this.url),Iu=this._sendRequest(Ru,null);Iu.then(function(Pu){var Ou=Pu.getStatus();if(!inStatusCategory(Ou,200)){if(Ou===423){$u._emitHttpError(Ru,Pu,"tus: upload is currently locked; retry later");return}if(inStatusCategory(Ou,400)&&$u._removeFromUrlStorage(),!$u.options.endpoint){$u._emitHttpError(Ru,Pu,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}$u.url=null,$u._createUpload();return}var Mu=Number.parseInt(Pu.getHeader("Upload-Offset"),10);if(Number.isNaN(Mu)){$u._emitHttpError(Ru,Pu,"tus: invalid or missing offset value");return}var Du=Number.parseInt(Pu.getHeader("Upload-Length"),10);if(Number.isNaN(Du)&&!$u.options.uploadLengthDeferred&&$u.options.protocol===PROTOCOL_TUS_V1){$u._emitHttpError(Ru,Pu,"tus: invalid or missing length value");return}typeof $u.options.onUploadUrlAvailable=="function"&&$u.options.onUploadUrlAvailable(),$u._saveUploadInUrlStorage().then(function(){if(Mu===Du){$u._emitProgress(Du,Du),$u._emitSuccess(Pu);return}$u._offset=Mu,$u._performUpload()})}).catch(function(Pu){$u._emitHttpError(Ru,null,"tus: failed to resume upload",Pu)})}},{key:"_performUpload",value:function(){var $u=this;if(!this._aborted){var Ru;this.options.overridePatchMethod?(Ru=this._openRequest("POST",this.url),Ru.setHeader("X-HTTP-Method-Override","PATCH")):Ru=this._openRequest("PATCH",this.url),Ru.setHeader("Upload-Offset","".concat(this._offset));var Iu=this._addChunkToRequest(Ru);Iu.then(function(Pu){if(!inStatusCategory(Pu.getStatus(),200)){$u._emitHttpError(Ru,Pu,"tus: unexpected response while uploading chunk");return}$u._handleUploadResponse(Ru,Pu)}).catch(function(Pu){$u._aborted||$u._emitHttpError(Ru,null,"tus: failed to upload chunk at offset ".concat($u._offset),Pu)})}}},{key:"_addChunkToRequest",value:function($u){var Ru=this,Iu=this._offset,Pu=this._offset+this.options.chunkSize;return $u.setProgressHandler(function(Ou){Ru._emitProgress(Iu+Ou,Ru._size)}),this.options.protocol===PROTOCOL_TUS_V1?$u.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===PROTOCOL_IETF_DRAFT_05&&$u.setHeader("Content-Type","application/partial-upload"),(Pu===Number.POSITIVE_INFINITY||Pu>this._size)&&!this.options.uploadLengthDeferred&&(Pu=this._size),this._source.slice(Iu,Pu).then(function(Ou){var Mu=Ou.value,Du=Ou.done,Lu=Mu!=null&&Mu.size?Mu.size:0;Ru.options.uploadLengthDeferred&&Du&&(Ru._size=Ru._offset+Lu,$u.setHeader("Upload-Length","".concat(Ru._size)));var Bu=Ru._offset+Lu;return!Ru.options.uploadLengthDeferred&&Du&&Bu!==Ru._size?Promise.reject(new Error("upload was configured with a size of ".concat(Ru._size," bytes, but the source is done after ").concat(Bu," bytes"))):Mu===null?Ru._sendRequest($u):((Ru.options.protocol===PROTOCOL_IETF_DRAFT_03||Ru.options.protocol===PROTOCOL_IETF_DRAFT_05)&&$u.setHeader("Upload-Complete",Du?"?1":"?0"),Ru._emitProgress(Ru._offset,Ru._size),Ru._sendRequest($u,Mu))})}},{key:"_handleUploadResponse",value:function($u,Ru){var Iu=Number.parseInt(Ru.getHeader("Upload-Offset"),10);if(Number.isNaN(Iu)){this._emitHttpError($u,Ru,"tus: invalid or missing offset value");return}if(this._emitProgress(Iu,this._size),this._emitChunkComplete(Iu-this._offset,Iu,this._size),this._offset=Iu,Iu===this._size){this._emitSuccess(Ru),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function($u,Ru){var Iu=openRequest($u,Ru,this.options);return this._req=Iu,Iu}},{key:"_removeFromUrlStorage",value:function(){var $u=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(Ru){$u._emitError(Ru)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var $u=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var Ru={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?Ru.parallelUploadUrls=this._parallelUploadUrls:Ru.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,Ru).then(function(Iu){$u._urlStorageKey=Iu})}},{key:"_sendRequest",value:function($u){var Ru=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return sendRequest($u,Ru,this.options)}}],[{key:"terminate",value:function($u){var Ru=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Iu=openRequest("DELETE",$u,Ru);return sendRequest(Iu,null,Ru).then(function(Pu){if(Pu.getStatus()!==204)throw new DetailedError("tus: unexpected response while terminating upload",null,Iu,Pu)}).catch(function(Pu){if(Pu instanceof DetailedError||(Pu=new DetailedError("tus: failed to terminate upload",Pu,Iu,null)),!shouldRetry(Pu,0,Ru))throw Pu;var Ou=Ru.retryDelays[0],Mu=Ru.retryDelays.slice(1),Du=_objectSpread$1(_objectSpread$1({},Ru),{},{retryDelays:Mu});return new Promise(function(Lu){return setTimeout(Lu,Ou)}).then(function(){return Au.terminate($u,Du)})})}}])})();function encodeMetadata(Au){return Object.entries(Au).map(function(lo){var $u=_slicedToArray$1(lo,2),Ru=$u[0],Iu=$u[1];return"".concat(Ru," ").concat(gBase64.encode(String(Iu)))}).join(",")}function inStatusCategory(Au,lo){return Au>=lo&&Au<lo+100}function openRequest(Au,lo,$u){var Ru=$u.httpStack.createRequest(Au,lo);$u.protocol===PROTOCOL_IETF_DRAFT_03?Ru.setHeader("Upload-Draft-Interop-Version","5"):$u.protocol===PROTOCOL_IETF_DRAFT_05?Ru.setHeader("Upload-Draft-Interop-Version","6"):Ru.setHeader("Tus-Resumable","1.0.0");for(var Iu=$u.headers||{},Pu=0,Ou=Object.entries(Iu);Pu<Ou.length;Pu++){var Mu=_slicedToArray$1(Ou[Pu],2),Du=Mu[0],Lu=Mu[1];Ru.setHeader(Du,Lu)}if($u.addRequestId){var Bu=uuid();Ru.setHeader("X-Request-ID",Bu)}return Ru}function sendRequest(Au,lo,$u){return _sendRequest2.apply(this,arguments)}function _sendRequest2(){return _sendRequest2=_asyncToGenerator$1(_regeneratorRuntime$1().mark(function Au(lo,$u,Ru){var Iu;return _regeneratorRuntime$1().wrap(function(Ou){for(;;)switch(Ou.prev=Ou.next){case 0:if(typeof Ru.onBeforeRequest!="function"){Ou.next=3;break}return Ou.next=3,Ru.onBeforeRequest(lo);case 3:return Ou.next=5,lo.send($u);case 5:if(Iu=Ou.sent,typeof Ru.onAfterResponse!="function"){Ou.next=9;break}return Ou.next=9,Ru.onAfterResponse(lo,Iu);case 9:return Ou.abrupt("return",Iu);case 10:case"end":return Ou.stop()}},Au)})),_sendRequest2.apply(this,arguments)}function isOnline(){var Au=!0;return typeof navigator<"u"&&navigator.onLine===!1&&(Au=!1),Au}function shouldRetry(Au,lo,$u){return $u.retryDelays==null||lo>=$u.retryDelays.length||Au.originalRequest==null?!1:$u&&typeof $u.onShouldRetry=="function"?$u.onShouldRetry(Au,lo,$u):defaultOnShouldRetry(Au)}function defaultOnShouldRetry(Au){var lo=Au.originalResponse?Au.originalResponse.getStatus():0;return(!inStatusCategory(lo,400)||lo===409||lo===423)&&isOnline()}function resolveUrl(Au,lo){return new URL$1(lo,Au).toString()}function splitSizeIntoParts(Au,lo){for(var $u=Math.floor(Au/lo),Ru=[],Iu=0;Iu<lo;Iu++)Ru.push({start:$u*Iu,end:$u*(Iu+1)});return Ru[lo-1].end=Au,Ru}BaseUpload.defaultOptions=defaultOptions$2;var isReactNative=function Au(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function uriToBlob(Au){return new Promise(function(lo,$u){var Ru=new XMLHttpRequest;Ru.responseType="blob",Ru.onload=function(){var Iu=Ru.response;lo(Iu)},Ru.onerror=function(Iu){$u(Iu)},Ru.open("GET",Au),Ru.send()})}var isCordova=function Au(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")};function readAsByteArray(Au){return new Promise(function(lo,$u){var Ru=new FileReader;Ru.onload=function(){var Iu=new Uint8Array(Ru.result);lo({value:Iu})},Ru.onerror=function(Iu){$u(Iu)},Ru.readAsArrayBuffer(Au)})}function _typeof$5(Au){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$5(Au)}function _classCallCheck$5(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$5(Ru.key),Ru)}}function _createClass$5(Au,lo,$u){return lo&&_defineProperties$5(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$5(Au){var lo=_toPrimitive$5(Au,"string");return _typeof$5(lo)=="symbol"?lo:lo+""}function _toPrimitive$5(Au,lo){if(_typeof$5(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$5(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var FileSource=(function(){function Au(lo){_classCallCheck$5(this,Au),this._file=lo,this.size=lo.size}return _createClass$5(Au,[{key:"slice",value:function($u,Ru){if(isCordova())return readAsByteArray(this._file.slice($u,Ru));var Iu=this._file.slice($u,Ru),Pu=Ru>=this.size;return Promise.resolve({value:Iu,done:Pu})}},{key:"close",value:function(){}}])})();function _typeof$4(Au){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$4(Au)}function _classCallCheck$4(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$4(Ru.key),Ru)}}function _createClass$4(Au,lo,$u){return lo&&_defineProperties$4(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$4(Au){var lo=_toPrimitive$4(Au,"string");return _typeof$4(lo)=="symbol"?lo:lo+""}function _toPrimitive$4(Au,lo){if(_typeof$4(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$4(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}function len(Au){return Au===void 0?0:Au.size!==void 0?Au.size:Au.length}function concat(Au,lo){if(Au.concat)return Au.concat(lo);if(Au instanceof Blob)return new Blob([Au,lo],{type:Au.type});if(Au.set){var $u=new Au.constructor(Au.length+lo.length);return $u.set(Au),$u.set(lo,Au.length),$u}throw new Error("Unknown data type")}var StreamSource=(function(){function Au(lo){_classCallCheck$4(this,Au),this._buffer=void 0,this._bufferOffset=0,this._reader=lo,this._done=!1}return _createClass$4(Au,[{key:"slice",value:function($u,Ru){return $u<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone($u,Ru)}},{key:"_readUntilEnoughDataOrDone",value:function($u,Ru){var Iu=this,Pu=Ru<=this._bufferOffset+len(this._buffer);if(this._done||Pu){var Ou=this._getDataFromBuffer($u,Ru),Mu=Ou==null?this._done:!1;return Promise.resolve({value:Ou,done:Mu})}return this._reader.read().then(function(Du){var Lu=Du.value,Bu=Du.done;return Bu?Iu._done=!0:Iu._buffer===void 0?Iu._buffer=Lu:Iu._buffer=concat(Iu._buffer,Lu),Iu._readUntilEnoughDataOrDone($u,Ru)})}},{key:"_getDataFromBuffer",value:function($u,Ru){$u>this._bufferOffset&&(this._buffer=this._buffer.slice($u-this._bufferOffset),this._bufferOffset=$u);var Iu=len(this._buffer)===0;return this._done&&Iu?null:this._buffer.slice(0,Ru-$u)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])})();function _typeof$3(Au){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$3(Au)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return lo};var Au,lo={},$u=Object.prototype,Ru=$u.hasOwnProperty,Iu=Object.defineProperty||function(_d,bd,wd){_d[bd]=wd.value},Pu=typeof Symbol=="function"?Symbol:{},Ou=Pu.iterator||"@@iterator",Mu=Pu.asyncIterator||"@@asyncIterator",Du=Pu.toStringTag||"@@toStringTag";function Lu(_d,bd,wd){return Object.defineProperty(_d,bd,{value:wd,enumerable:!0,configurable:!0,writable:!0}),_d[bd]}try{Lu({},"")}catch{Lu=function(wd,Ad,gd){return wd[Ad]=gd}}function Bu(_d,bd,wd,Ad){var gd=bd&&bd.prototype instanceof Gu?bd:Gu,dd=Object.create(gd.prototype),yd=new vd(Ad||[]);return Iu(dd,"_invoke",{value:od(_d,wd,yd)}),dd}function ju(_d,bd,wd){try{return{type:"normal",arg:_d.call(bd,wd)}}catch(Ad){return{type:"throw",arg:Ad}}}lo.wrap=Bu;var Fu="suspendedStart",zu="suspendedYield",Uu="executing",Hu="completed",Vu={};function Gu(){}function Wu(){}function Zu(){}var Ju={};Lu(Ju,Ou,function(){return this});var Yu=Object.getPrototypeOf,Xu=Yu&&Yu(Yu(Sd([])));Xu&&Xu!==$u&&Ru.call(Xu,Ou)&&(Ju=Xu);var ed=Zu.prototype=Gu.prototype=Object.create(Ju);function td(_d){["next","throw","return"].forEach(function(bd){Lu(_d,bd,function(wd){return this._invoke(bd,wd)})})}function nd(_d,bd){function wd(gd,dd,yd,ld){var ud=ju(_d[gd],_d,dd);if(ud.type!=="throw"){var hd=ud.arg,md=hd.value;return md&&_typeof$3(md)=="object"&&Ru.call(md,"__await")?bd.resolve(md.__await).then(function(Ed){wd("next",Ed,yd,ld)},function(Ed){wd("throw",Ed,yd,ld)}):bd.resolve(md).then(function(Ed){hd.value=Ed,yd(hd)},function(Ed){return wd("throw",Ed,yd,ld)})}ld(ud.arg)}var Ad;Iu(this,"_invoke",{value:function(dd,yd){function ld(){return new bd(function(ud,hd){wd(dd,yd,ud,hd)})}return Ad=Ad?Ad.then(ld,ld):ld()}})}function od(_d,bd,wd){var Ad=Fu;return function(gd,dd){if(Ad===Uu)throw Error("Generator is already running");if(Ad===Hu){if(gd==="throw")throw dd;return{value:Au,done:!0}}for(wd.method=gd,wd.arg=dd;;){var yd=wd.delegate;if(yd){var ld=sd(yd,wd);if(ld){if(ld===Vu)continue;return ld}}if(wd.method==="next")wd.sent=wd._sent=wd.arg;else if(wd.method==="throw"){if(Ad===Fu)throw Ad=Hu,wd.arg;wd.dispatchException(wd.arg)}else wd.method==="return"&&wd.abrupt("return",wd.arg);Ad=Uu;var ud=ju(_d,bd,wd);if(ud.type==="normal"){if(Ad=wd.done?Hu:zu,ud.arg===Vu)continue;return{value:ud.arg,done:wd.done}}ud.type==="throw"&&(Ad=Hu,wd.method="throw",wd.arg=ud.arg)}}}function sd(_d,bd){var wd=bd.method,Ad=_d.iterator[wd];if(Ad===Au)return bd.delegate=null,wd==="throw"&&_d.iterator.return&&(bd.method="return",bd.arg=Au,sd(_d,bd),bd.method==="throw")||wd!=="return"&&(bd.method="throw",bd.arg=new TypeError("The iterator does not provide a '"+wd+"' method")),Vu;var gd=ju(Ad,_d.iterator,bd.arg);if(gd.type==="throw")return bd.method="throw",bd.arg=gd.arg,bd.delegate=null,Vu;var dd=gd.arg;return dd?dd.done?(bd[_d.resultName]=dd.value,bd.next=_d.nextLoc,bd.method!=="return"&&(bd.method="next",bd.arg=Au),bd.delegate=null,Vu):dd:(bd.method="throw",bd.arg=new TypeError("iterator result is not an object"),bd.delegate=null,Vu)}function ad(_d){var bd={tryLoc:_d[0]};1 in _d&&(bd.catchLoc=_d[1]),2 in _d&&(bd.finallyLoc=_d[2],bd.afterLoc=_d[3]),this.tryEntries.push(bd)}function pd(_d){var bd=_d.completion||{};bd.type="normal",delete bd.arg,_d.completion=bd}function vd(_d){this.tryEntries=[{tryLoc:"root"}],_d.forEach(ad,this),this.reset(!0)}function Sd(_d){if(_d||_d===""){var bd=_d[Ou];if(bd)return bd.call(_d);if(typeof _d.next=="function")return _d;if(!isNaN(_d.length)){var wd=-1,Ad=function gd(){for(;++wd<_d.length;)if(Ru.call(_d,wd))return gd.value=_d[wd],gd.done=!1,gd;return gd.value=Au,gd.done=!0,gd};return Ad.next=Ad}}throw new TypeError(_typeof$3(_d)+" is not iterable")}return Wu.prototype=Zu,Iu(ed,"constructor",{value:Zu,configurable:!0}),Iu(Zu,"constructor",{value:Wu,configurable:!0}),Wu.displayName=Lu(Zu,Du,"GeneratorFunction"),lo.isGeneratorFunction=function(_d){var bd=typeof _d=="function"&&_d.constructor;return!!bd&&(bd===Wu||(bd.displayName||bd.name)==="GeneratorFunction")},lo.mark=function(_d){return Object.setPrototypeOf?Object.setPrototypeOf(_d,Zu):(_d.__proto__=Zu,Lu(_d,Du,"GeneratorFunction")),_d.prototype=Object.create(ed),_d},lo.awrap=function(_d){return{__await:_d}},td(nd.prototype),Lu(nd.prototype,Mu,function(){return this}),lo.AsyncIterator=nd,lo.async=function(_d,bd,wd,Ad,gd){gd===void 0&&(gd=Promise);var dd=new nd(Bu(_d,bd,wd,Ad),gd);return lo.isGeneratorFunction(bd)?dd:dd.next().then(function(yd){return yd.done?yd.value:dd.next()})},td(ed),Lu(ed,Du,"Generator"),Lu(ed,Ou,function(){return this}),Lu(ed,"toString",function(){return"[object Generator]"}),lo.keys=function(_d){var bd=Object(_d),wd=[];for(var Ad in bd)wd.push(Ad);return wd.reverse(),function gd(){for(;wd.length;){var dd=wd.pop();if(dd in bd)return gd.value=dd,gd.done=!1,gd}return gd.done=!0,gd}},lo.values=Sd,vd.prototype={constructor:vd,reset:function(bd){if(this.prev=0,this.next=0,this.sent=this._sent=Au,this.done=!1,this.delegate=null,this.method="next",this.arg=Au,this.tryEntries.forEach(pd),!bd)for(var wd in this)wd.charAt(0)==="t"&&Ru.call(this,wd)&&!isNaN(+wd.slice(1))&&(this[wd]=Au)},stop:function(){this.done=!0;var bd=this.tryEntries[0].completion;if(bd.type==="throw")throw bd.arg;return this.rval},dispatchException:function(bd){if(this.done)throw bd;var wd=this;function Ad(hd,md){return yd.type="throw",yd.arg=bd,wd.next=hd,md&&(wd.method="next",wd.arg=Au),!!md}for(var gd=this.tryEntries.length-1;gd>=0;--gd){var dd=this.tryEntries[gd],yd=dd.completion;if(dd.tryLoc==="root")return Ad("end");if(dd.tryLoc<=this.prev){var ld=Ru.call(dd,"catchLoc"),ud=Ru.call(dd,"finallyLoc");if(ld&&ud){if(this.prev<dd.catchLoc)return Ad(dd.catchLoc,!0);if(this.prev<dd.finallyLoc)return Ad(dd.finallyLoc)}else if(ld){if(this.prev<dd.catchLoc)return Ad(dd.catchLoc,!0)}else{if(!ud)throw Error("try statement without catch or finally");if(this.prev<dd.finallyLoc)return Ad(dd.finallyLoc)}}}},abrupt:function(bd,wd){for(var Ad=this.tryEntries.length-1;Ad>=0;--Ad){var gd=this.tryEntries[Ad];if(gd.tryLoc<=this.prev&&Ru.call(gd,"finallyLoc")&&this.prev<gd.finallyLoc){var dd=gd;break}}dd&&(bd==="break"||bd==="continue")&&dd.tryLoc<=wd&&wd<=dd.finallyLoc&&(dd=null);var yd=dd?dd.completion:{};return yd.type=bd,yd.arg=wd,dd?(this.method="next",this.next=dd.finallyLoc,Vu):this.complete(yd)},complete:function(bd,wd){if(bd.type==="throw")throw bd.arg;return bd.type==="break"||bd.type==="continue"?this.next=bd.arg:bd.type==="return"?(this.rval=this.arg=bd.arg,this.method="return",this.next="end"):bd.type==="normal"&&wd&&(this.next=wd),Vu},finish:function(bd){for(var wd=this.tryEntries.length-1;wd>=0;--wd){var Ad=this.tryEntries[wd];if(Ad.finallyLoc===bd)return this.complete(Ad.completion,Ad.afterLoc),pd(Ad),Vu}},catch:function(bd){for(var wd=this.tryEntries.length-1;wd>=0;--wd){var Ad=this.tryEntries[wd];if(Ad.tryLoc===bd){var gd=Ad.completion;if(gd.type==="throw"){var dd=gd.arg;pd(Ad)}return dd}}throw Error("illegal catch attempt")},delegateYield:function(bd,wd,Ad){return this.delegate={iterator:Sd(bd),resultName:wd,nextLoc:Ad},this.method==="next"&&(this.arg=Au),Vu}},lo}function asyncGeneratorStep(Au,lo,$u,Ru,Iu,Pu,Ou){try{var Mu=Au[Pu](Ou),Du=Mu.value}catch(Lu){$u(Lu);return}Mu.done?lo(Du):Promise.resolve(Du).then(Ru,Iu)}function _asyncToGenerator(Au){return function(){var lo=this,$u=arguments;return new Promise(function(Ru,Iu){var Pu=Au.apply(lo,$u);function Ou(Du){asyncGeneratorStep(Pu,Ru,Iu,Ou,Mu,"next",Du)}function Mu(Du){asyncGeneratorStep(Pu,Ru,Iu,Ou,Mu,"throw",Du)}Ou(void 0)})}}function _classCallCheck$3(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$3(Ru.key),Ru)}}function _createClass$3(Au,lo,$u){return lo&&_defineProperties$3(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$3(Au){var lo=_toPrimitive$3(Au,"string");return _typeof$3(lo)=="symbol"?lo:lo+""}function _toPrimitive$3(Au,lo){if(_typeof$3(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$3(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var FileReader$1=(function(){function Au(){_classCallCheck$3(this,Au)}return _createClass$3(Au,[{key:"openFile",value:(function(){var lo=_asyncToGenerator(_regeneratorRuntime().mark(function Ru(Iu,Pu){var Ou;return _regeneratorRuntime().wrap(function(Du){for(;;)switch(Du.prev=Du.next){case 0:if(!(isReactNative()&&Iu&&typeof Iu.uri<"u")){Du.next=11;break}return Du.prev=1,Du.next=4,uriToBlob(Iu.uri);case 4:return Ou=Du.sent,Du.abrupt("return",new FileSource(Ou));case 8:throw Du.prev=8,Du.t0=Du.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(Du.t0));case 11:if(!(typeof Iu.slice=="function"&&typeof Iu.size<"u")){Du.next=13;break}return Du.abrupt("return",Promise.resolve(new FileSource(Iu)));case 13:if(typeof Iu.read!="function"){Du.next=18;break}if(Pu=Number(Pu),Number.isFinite(Pu)){Du.next=17;break}return Du.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return Du.abrupt("return",Promise.resolve(new StreamSource(Iu,Pu)));case 18:return Du.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return Du.stop()}},Ru,null,[[1,8]])}));function $u(Ru,Iu){return lo.apply(this,arguments)}return $u})()}])})();function fingerprint(Au,lo){return isReactNative()?Promise.resolve(reactNativeFingerprint(Au,lo)):Promise.resolve(["tus-br",Au.name,Au.type,Au.size,Au.lastModified,lo.endpoint].join("-"))}function reactNativeFingerprint(Au,lo){var $u=Au.exif?hashCode(JSON.stringify(Au.exif)):"noexif";return["tus-rn",Au.name||"noname",Au.size||"nosize",$u,lo.endpoint].join("/")}function hashCode(Au){var lo=0;if(Au.length===0)return lo;for(var $u=0;$u<Au.length;$u++){var Ru=Au.charCodeAt($u);lo=(lo<<5)-lo+Ru,lo&=lo}return lo}function _typeof$2(Au){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$2(Au)}function _classCallCheck$2(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$2(Ru.key),Ru)}}function _createClass$2(Au,lo,$u){return lo&&_defineProperties$2(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$2(Au){var lo=_toPrimitive$2(Au,"string");return _typeof$2(lo)=="symbol"?lo:lo+""}function _toPrimitive$2(Au,lo){if(_typeof$2(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$2(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var XHRHttpStack=(function(){function Au(){_classCallCheck$2(this,Au)}return _createClass$2(Au,[{key:"createRequest",value:function($u,Ru){return new Request$1($u,Ru)}},{key:"getName",value:function(){return"XHRHttpStack"}}])})(),Request$1=(function(){function Au(lo,$u){_classCallCheck$2(this,Au),this._xhr=new XMLHttpRequest,this._xhr.open(lo,$u,!0),this._method=lo,this._url=$u,this._headers={}}return _createClass$2(Au,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function($u,Ru){this._xhr.setRequestHeader($u,Ru),this._headers[$u]=Ru}},{key:"getHeader",value:function($u){return this._headers[$u]}},{key:"setProgressHandler",value:function($u){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(Ru){Ru.lengthComputable&&$u(Ru.loaded)})}},{key:"send",value:function(){var $u=this,Ru=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(Iu,Pu){$u._xhr.onload=function(){Iu(new Response$1($u._xhr))},$u._xhr.onerror=function(Ou){Pu(Ou)},$u._xhr.send(Ru)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])})(),Response$1=(function(){function Au(lo){_classCallCheck$2(this,Au),this._xhr=lo}return _createClass$2(Au,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function($u){return this._xhr.getResponseHeader($u)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])})();function _typeof$1(Au){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$1(Au)}function _classCallCheck$1(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$1(Ru.key),Ru)}}function _createClass$1(Au,lo,$u){return lo&&_defineProperties$1(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$1(Au){var lo=_toPrimitive$1(Au,"string");return _typeof$1(lo)=="symbol"?lo:lo+""}function _toPrimitive$1(Au,lo){if(_typeof$1(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$1(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var hasStorage=!1;try{hasStorage="localStorage"in window;var key="tusSupport",originalValue=localStorage.getItem(key);localStorage.setItem(key,originalValue),originalValue===null&&localStorage.removeItem(key)}catch(Au){if(Au.code===Au.SECURITY_ERR||Au.code===Au.QUOTA_EXCEEDED_ERR)hasStorage=!1;else throw Au}var canStoreURLs=hasStorage,WebStorageUrlStorage=(function(){function Au(){_classCallCheck$1(this,Au)}return _createClass$1(Au,[{key:"findAllUploads",value:function(){var $u=this._findEntries("tus::");return Promise.resolve($u)}},{key:"findUploadsByFingerprint",value:function($u){var Ru=this._findEntries("tus::".concat($u,"::"));return Promise.resolve(Ru)}},{key:"removeUpload",value:function($u){return localStorage.removeItem($u),Promise.resolve()}},{key:"addUpload",value:function($u,Ru){var Iu=Math.round(Math.random()*1e12),Pu="tus::".concat($u,"::").concat(Iu);return localStorage.setItem(Pu,JSON.stringify(Ru)),Promise.resolve(Pu)}},{key:"_findEntries",value:function($u){for(var Ru=[],Iu=0;Iu<localStorage.length;Iu++){var Pu=localStorage.key(Iu);if(Pu.indexOf($u)===0)try{var Ou=JSON.parse(localStorage.getItem(Pu));Ou.urlStorageKey=Pu,Ru.push(Ou)}catch{}}return Ru}}])})();function _typeof(Au){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof(Au)}function _classCallCheck(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey(Ru.key),Ru)}}function _createClass(Au,lo,$u){return $u&&_defineProperties(Au,$u),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _callSuper(Au,lo,$u){return lo=_getPrototypeOf(lo),_possibleConstructorReturn(Au,_isNativeReflectConstruct()?Reflect.construct(lo,$u||[],_getPrototypeOf(Au).constructor):lo.apply(Au,$u))}function _possibleConstructorReturn(Au,lo){if(lo&&(_typeof(lo)==="object"||typeof lo=="function"))return lo;if(lo!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(Au)}function _assertThisInitialized(Au){if(Au===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Au}function _isNativeReflectConstruct(){try{var Au=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct=function(){return!!Au})()}function _getPrototypeOf(Au){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($u){return $u.__proto__||Object.getPrototypeOf($u)},_getPrototypeOf(Au)}function _inherits(Au,lo){if(typeof lo!="function"&&lo!==null)throw new TypeError("Super expression must either be null or a function");Au.prototype=Object.create(lo&&lo.prototype,{constructor:{value:Au,writable:!0,configurable:!0}}),Object.defineProperty(Au,"prototype",{writable:!1}),lo&&_setPrototypeOf(Au,lo)}function _setPrototypeOf(Au,lo){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ru,Iu){return Ru.__proto__=Iu,Ru},_setPrototypeOf(Au,lo)}function ownKeys(Au,lo){var $u=Object.keys(Au);if(Object.getOwnPropertySymbols){var Ru=Object.getOwnPropertySymbols(Au);lo&&(Ru=Ru.filter(function(Iu){return Object.getOwnPropertyDescriptor(Au,Iu).enumerable})),$u.push.apply($u,Ru)}return $u}function _objectSpread(Au){for(var lo=1;lo<arguments.length;lo++){var $u=arguments[lo]!=null?arguments[lo]:{};lo%2?ownKeys(Object($u),!0).forEach(function(Ru){_defineProperty(Au,Ru,$u[Ru])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Au,Object.getOwnPropertyDescriptors($u)):ownKeys(Object($u)).forEach(function(Ru){Object.defineProperty(Au,Ru,Object.getOwnPropertyDescriptor($u,Ru))})}return Au}function _defineProperty(Au,lo,$u){return lo=_toPropertyKey(lo),lo in Au?Object.defineProperty(Au,lo,{value:$u,enumerable:!0,configurable:!0,writable:!0}):Au[lo]=$u,Au}function _toPropertyKey(Au){var lo=_toPrimitive(Au,"string");return _typeof(lo)=="symbol"?lo:lo+""}function _toPrimitive(Au,lo){if(_typeof(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var defaultOptions$1=_objectSpread(_objectSpread({},BaseUpload.defaultOptions),{},{httpStack:new XHRHttpStack,fileReader:new FileReader$1,urlStorage:canStoreURLs?new WebStorageUrlStorage:new NoopUrlStorage,fingerprint}),Upload=(function(Au){function lo(){var $u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Ru=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _classCallCheck(this,lo),Ru=_objectSpread(_objectSpread({},defaultOptions$1),Ru),_callSuper(this,lo,[$u,Ru])}return _inherits(lo,Au),_createClass(lo,null,[{key:"terminate",value:function(Ru){var Iu=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Iu=_objectSpread(_objectSpread({},defaultOptions$1),Iu),BaseUpload.terminate(Ru,Iu)}}])})(BaseUpload);const RUNTIMES_API_PREFIX="api/runtimes/v1";function join$1(Au,lo){return`${Au.replace(/\/+$/,"")}/${lo.replace(/^\/+/,"")}`}function runtimesUrl(Au){return join$1(Au,`${RUNTIMES_API_PREFIX}/runtimes`)}function runtimeUrl(Au,lo){return`${runtimesUrl(Au)}/${lo}`}function sandboxSnapshotsUrl(Au){return join$1(Au,`${RUNTIMES_API_PREFIX}/sandbox-snapshots`)}function sandboxSnapshotUrl(Au,lo){return`${sandboxSnapshotsUrl(Au)}/${lo}`}function asCodeSandboxSnapshot(Au){const{uid:lo,updated_at:$u,format_version:Ru,...Iu}=Au;return{...Iu,id:lo,updatedAt:new Date($u),formatVersion:Ru}}async function getEnvironments(){const Au=await requestDatalayerAPI({url:libExports$5.URLExt.join(runtimesStore.getState().runtimesUrl,"api/runtimes/v1/environments"),token:iamStore.getState().token});return Au.success?Au.environments??[]:(console.error("Failed to fetch available environments.",Au),[])}async function createRuntime(Au){const{externalToken:lo,token:$u}=iamStore.getState();if(typeof Au.creditsLimit!="number"||!Number.isFinite(Au.creditsLimit)||Au.creditsLimit<0)throw new Error(`Invalid runtime creditsLimit for environment ${Au.environmentName}. A number of zero or more is required.`);if(Au.deploymentUid&&!Au.appUid)throw new Error(`Deployment ${Au.deploymentUid} is named without its application: give appUid.`);if(Au.appUid&&!Au.appSpec)throw new Error(`Application ${Au.appUid} is launched without its Appspec: give appSpec, so its runtime is given the secrets its connections declare.`);const Ru={name:Au.environmentName};Au.environmentVersion!==void 0&&Au.environmentVersion!==""&&(Ru.version=Au.environmentVersion);const Iu={environment:Ru,type:Au.type??"notebook",given_name:Au.givenName,credits_limit:Au.creditsLimit};Au.capabilities&&(Iu.capabilities=Au.capabilities),Au.snapshot&&(Iu.from=Au.snapshot),Au.appUid&&(Iu.app_uid=Au.appUid),Au.deploymentUid&&(Iu.deployment_uid=Au.deploymentUid),Au.appSpec&&(Iu.app_spec=Au.appSpec);const Pu=await requestDatalayerAPI({url:runtimesUrl(runtimesStore.getState().runtimesUrl),method:"POST",body:Iu,token:$u,headers:lo?{"X-External-Token":lo}:void 0});if(!Pu.success||!Pu.runtime){const Ou=`Failed to create a kernel for the environment ${Au.environmentName}.`;throw console.error(Ou,Pu),new Error(Ou)}return Pu.runtime}async function getRuntimes(){const Au=await requestDatalayerAPI({url:runtimesUrl(runtimesStore.getState().runtimesUrl),token:iamStore.getState().token});if(!Au.success){const lo="Failed to list the running kernels.";throw console.error(lo,Au),new Error(lo)}return Au.runtimes??[]}async function getRuntimeRecord(Au){try{return(await requestDatalayerAPI({url:runtimeUrl(runtimesStore.getState().runtimesUrl,Au),token:iamStore.getState().token})).runtime??null}catch(lo){if(lo.response?.status===404)return null;throw lo}}async function deleteRuntime(Au){const lo=iamStore.getState().externalToken;await requestDatalayerAPI({url:runtimeUrl(runtimesStore.getState().runtimesUrl,Au.id)+libExports$5.URLExt.objectToQueryString(Au.reason?{reason:Au.reason}:{}),method:"DELETE",token:iamStore.getState().token,headers:lo?{"X-External-Token":lo}:void 0})}async function snapshotRuntime(Au){const lo=await requestDatalayerAPI({url:sandboxSnapshotsUrl(runtimesStore.getState().runtimesUrl),method:"POST",body:{runtime_name:Au.id,name:Au.name,description:Au.description,stop:Au.stop},token:iamStore.getState().token});if(!lo.success)throw new Error(`Failed to take the code sandbox snapshot ${Au.id} - ${lo}`);if(lo.snapshot)return asCodeSandboxSnapshot(lo.snapshot)}async function getSandboxSnapshots(){const Au=await requestDatalayerAPI({url:sandboxSnapshotsUrl(runtimesStore.getState().runtimesUrl),token:iamStore.getState().token});return Au.success?(Au.snapshots??[]).map(asCodeSandboxSnapshot):(console.error("Failed to fetch code sandbox snapshots.",Au),[])}async function loadSandboxSnapshot(Au){const lo=await requestDatalayerAPI({url:runtimeUrl(runtimesStore.getState().runtimesUrl,Au.id),method:"PUT",body:{from:Au.from},token:iamStore.getState().token});if(!lo.success)throw new Error(`Failed to load the code sandbox snapshot; ${lo.message}`)}function createSandboxSnapshotDownloadURL(Au){return sandboxSnapshotUrl(runtimesStore.getState().runtimesUrl,Au)+libExports$5.URLExt.objectToQueryString({download:"1",token:iamStore.getState().token??""})}function exportCodeSandboxSnapshot(Au){const lo=createSandboxSnapshotDownloadURL(Au),$u=document.createElement("a");$u.href=lo,$u.download="",document.body.appendChild($u),$u.click(),document.body.removeChild($u)}async function deleteCodeSandboxSnapshot(Au){await requestDatalayerAPI({url:sandboxSnapshotUrl(runtimesStore.getState().runtimesUrl,Au),method:"DELETE",token:iamStore.getState().token})}async function updateCodeSandboxSnapshot(Au,lo){(lo.name||lo.description)&&await requestDatalayerAPI({url:sandboxSnapshotUrl(runtimesStore.getState().runtimesUrl,Au),method:"PATCH",body:{...lo},token:iamStore.getState().token})}async function uploadCodeSandboxSnapshot(Au){if(Au.file.size===0)return Promise.reject("Empty Code Sandbox Snapshot.");const lo=new PromiseDelegate,$u=new Upload(Au.file,{endpoint:`${sandboxSnapshotsUrl(runtimesStore.getState().runtimesUrl)}/upload`,headers:{Authorization:`Bearer ${iamStore.getState().token}`},retryDelays:null,metadata:Au.metadata,onError:Iu=>{console.error(`Failed to upload ${Au.metadata.filename}.`,Iu),lo.reject(Iu)},onProgress:Au.onProgress,onSuccess:()=>{lo.resolve()}}),Ru=await $u.findPreviousUploads();return Ru.length&&$u.resumeFromPreviousUpload(Ru[0]),$u.start(),lo.promise}const actions=Object.freeze(Object.defineProperty({__proto__:null,createRuntime,createSandboxSnapshotDownloadURL,deleteCodeSandboxSnapshot,deleteRuntime,exportCodeSandboxSnapshot,getEnvironments,getRuntimeRecord,getRuntimes,getSandboxSnapshots,loadSandboxSnapshot,snapshotRuntime,updateCodeSandboxSnapshot,uploadCodeSandboxSnapshot},Symbol.toStringTag,{value:"Module"})),CLAUDE_CODE_HARNESS_0_0_1={id:"claude-code",version:"0.0.1",name:"Claude Code",description:"Anthropic's coding agent, driven over ACP through the Agent Client Protocol project's adapter on the Claude Agent SDK.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://github.com/agentclientprotocol/claude-agent-acp",acp:{command:"npx",args:["-y","@agentclientprotocol/claude-agent-acp@0.91.0"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:["default","plan","acceptEdits","bypassPermissions"],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"api_key_only",licence:"Apache-2.0 (adapter); Anthropic Commercial Terms of Service (the agent)"},skills:{format:"skill-md",dir:".claude/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!0,compaction:"own",modes:["default","plan","acceptEdits","bypassPermissions"],autoRun:["^(cal|uptime|cat|head|tail|wc|stat|strings|hexdump|od|nl|id|uname|free|df|du|locale|groups|nproc|basename|dirname|realpath|cut|paste|tr|column|tac|rev|fold|expand|unexpand|fmt|comm|cmp|numfmt|readlink|diff|true|false|sleep|which|type|expr|seq|tsort|pr)(\\s|$)","^(pwd|whoami|alias|history|arch|ifconfig|ip addr)(\\s|$)","^(claude (-h|--help)|node (-v|--version)|python3? --version)$","^(echo|uniq|jq|cd|ls|find)(\\s|$)","^(xargs|file|sed|sort|man|help|netstat|ps|base64|grep|egrep|fgrep|rg|sha256sum|sha1sum|md5sum|tree|date|hostname|lsof|pgrep|tput|ss|fd|fdfind|test)(\\s|$)","^git (diff|log|show|shortlog|reflog|stash (list|show)|ls-remote|status|blame|ls-files|config --get|remote( show)?|merge-base|rev-parse|rev-list|describe|cat-file|for-each-ref|grep|worktree list|tag|branch)(\\s|$)","^gh (pr (view|list|diff|checks|status)|issue (view|list|status)|repo view|run (list|view)|auth status|release (list|view)|workflow (list|view)|label list|search (repos|issues|prs|commits|code))(\\s|$)","^docker (ps|images|logs|inspect)(\\s|$)"]},instructionsFile:"CLAUDE.md",registered:{adapter:"@agentclientprotocol/claude-agent-acp",version:"0.91.0",licenceSource:"https://www.npmjs.com/package/@agentclientprotocol/claude-agent-acp",termsSource:"https://code.claude.com/docs/en/legal-and-compliance",credential:"An Anthropic API key (ANTHROPIC_API_KEY), the person's own",binaries:"Node 22 (engines.node >=22 on npm), git",note:"Anthropic's legal page (read 2026-10-15): running Claude Code in hosted sandboxes or agent infrastructure requires the Commercial Terms; each end user authenticates with their own API key or subscription; developers may not route requests through Free, Pro or Max plan credentials on behalf of their users, nor collect or intermediate Claude.ai credentials. So only API keys are taken; a subscription login is refused. The npm package moved from @zed-industries (0.23.1, March 2026) to @agentclientprotocol."}},CODEX_HARNESS_0_0_1={id:"codex",version:"0.0.1",name:"Codex",description:"OpenAI's coding agent, driven over ACP through the Agent Client Protocol project's adapter, which ships the Codex binary it drives.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://github.com/agentclientprotocol/codex-acp",acp:{command:"npx",args:["-y","@agentclientprotocol/codex-acp@2.2.2"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:["read-only","workspace-write","agent","agent-full-access"],env:{NO_BROWSER:"1"},nativeSession:"none"},requires:{secrets:["OPENAI_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"api_key_only",licence:"Apache-2.0 (adapter); OpenAI Terms of Use (the agent)"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!0,compaction:"own",modes:["read-only","workspace-write","agent","agent-full-access"],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"@agentclientprotocol/codex-acp",version:"2.2.2",licenceSource:"https://www.npmjs.com/package/@agentclientprotocol/codex-acp",termsSource:"https://learn.chatgpt.com/docs/auth",credential:"An OpenAI API key (OPENAI_API_KEY or CODEX_API_KEY), the person's own",binaries:"Node 22 (as the Agent Client Protocol project's adapters; unstated on npm), git",note:"Codex's authentication page (read 2026-10-15) recommends API keys for automation and device-code login for headless machines; a ChatGPT login needs a browser and is hidden with NO_BROWSER=1 in the adapter. Only API keys are taken; a ChatGPT login is refused. The Zed-scoped package was archived on 22 July 2026 and names this one."}},CUSTOM_HARNESS_0_0_1={id:"custom",version:"0.0.1",name:"Custom harness",description:"An organization's own ACP agent, its command named by the organization's own harness spec and never typed into a form.",enabled:!1,unavailable_because:"",tags:["harness"],docs:"",requires:{secrets:[],binaries:[]},terms:{servedToThirdParties:"organizations_own",licence:"The organization's own"},skills:{format:"none",dir:""},honours:{model:!1,subagents:!1},capabilities:{resume:"none",forkHistory:"none",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"",registered:{adapter:"The organization's own",version:"0",licenceSource:"https://agentspecs.datalayer.tech/harnesses",termsSource:"https://agentspecs.datalayer.tech/harnesses",credential:"The organization's own",binaries:"",note:"Not launchable from the shared catalogue; an organization's own harness spec names the command and answers for its terms."}},FAST_AGENT_HARNESS_0_0_1={id:"fast-agent",version:"0.0.1",name:"fast-agent",description:"llmindset's agent framework served over ACP; each agent it defines is a session mode, with any model provider it is configured with.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and Gemini CLI (28 October 2026); fast-agent is a framework served over ACP, not a coding agent, its adapter is a Python tool the runtime image does not carry, and it has not been drilled on Datalayer.",tags:["harness","framework"],docs:"https://github.com/evalstate/fast-agent/blob/main/docs/docs/acp/index.md",acp:{command:"uvx",args:["fast-agent-acp==0.10.45"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:[],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["uvx"]},terms:{servedToThirdParties:"permitted",licence:"Apache-2.0"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"fast-agent-acp",version:"0.10.45",licenceSource:"https://pypi.org/project/fast-agent-acp/",termsSource:"https://github.com/evalstate/fast-agent/blob/main/LICENSE",credential:"The provider's key fast-agent is given (ANTHROPIC_API_KEY, OPENAI_API_KEY or HF_TOKEN); ANTHROPIC_API_KEY declared",binaries:"uv (uvx), Python 3.12 to 3.15 (requires_python on PyPI)",note:"A framework, not a coding agent: each agent it defines is an ACP mode; the client's MCP servers are attached; sessions are listed. Launched with uvx fast-agent-acp (docs/docs/acp/index.md); reads skills from .fast-agent/skills, .agents/skills and .claude/skills; its default prompt reads AGENTS.md."}},GEMINI_CLI_HARNESS_0_0_1={id:"gemini-cli",version:"0.0.1",name:"Gemini CLI",description:"Google's coding agent, which speaks ACP itself when started with --experimental-acp.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/cli-reference.md",acp:{command:"npx",args:["-y","@google/gemini-cli@0.64.0","--experimental-acp"],protocolVersion:1,loadSession:!1,mcp:"lend",modes:["default","auto_edit","yolo","plan"],env:{},nativeSession:"none"},requires:{secrets:["GEMINI_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"api_key_only",licence:"Apache-2.0 (the agent); Gemini API or Gemini Code Assist terms (the model)",tierRestrictions:"Gemini Code Assist Standard or Enterprise for a Google login (the individuals tier stopped being served on 18 June 2026); a Gemini API key otherwise"},skills:{format:"skill-md",dir:".gemini/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"none",forkHistory:"replay",interrupt:!0,steering:!1,images:!0,compaction:"own",modes:["default","auto_edit","yolo","plan"],autoRun:[]},instructionsFile:"GEMINI.md",registered:{adapter:"@google/gemini-cli",version:"0.64.0",licenceSource:"https://www.npmjs.com/package/@google/gemini-cli",termsSource:"https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals",credential:"A Gemini API key (GEMINI_API_KEY), the person's own; or a Google login on a Code Assist Standard or Enterprise subscription",binaries:"Node 20 or later (engines.node >=20 on npm), git",note:`Google's notice (read 2026-10-15): "Starting June 18, 2026, Gemini Code Assist IDE extensions stopped serving requests for the Gemini Code Assist for individuals"; Standard and Enterprise follow a separate schedule. The ACP flag is --experimental-acp in the CLI reference (docs/cli/cli-reference.md).`}},GOOSE_HARNESS_0_0_1={id:"goose",version:"0.0.1",name:"goose",description:"Block's open agent (now the Agentic AI Foundation's), which speaks ACP itself with goose acp; any model provider it is configured with.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and Gemini CLI (28 October 2026); goose is a binary of its own release, not an npm adapter, the runtime image does not carry it, and it has not been drilled on Datalayer.",tags:["harness"],docs:"https://block.github.io/goose/docs/gdk/acp/",acp:{command:"goose",args:["acp"],protocolVersion:1,loadSession:!1,mcp:"lend",modes:[],env:{GOOSE_PROVIDER:"anthropic"},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["goose@1.54.0","git"]},terms:{servedToThirdParties:"permitted",licence:"Apache-2.0"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"none",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:".goosehints",registered:{adapter:"goose",version:"1.54.0",licenceSource:"https://github.com/aaif-goose/goose",termsSource:"https://github.com/aaif-goose/goose/blob/main/LICENSE",credential:"The provider's key goose is configured with (GOOSE_PROVIDER); ANTHROPIC_API_KEY declared",binaries:"The goose CLI (release v1.54.0 of 8 October 2026), git",note:"Open source under Apache-2.0, no vendor terms of its own; the model provider's terms apply to the key. Launched as goose acp (documentation/docs/gdk/acp/index.md)."}},OPENCODE_HARNESS_0_0_1={id:"opencode",version:"0.0.1",name:"OpenCode",description:"Anomaly's open coding agent, which speaks ACP itself with opencode acp; any model provider it is configured with.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://opencode.ai/docs/acp/",acp:{command:"npx",args:["-y","opencode-ai@1.19.0","acp"],protocolVersion:1,loadSession:!1,mcp:"lend",modes:[],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"permitted",licence:"MIT"},skills:{format:"skill-md",dir:".opencode/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"none",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"opencode-ai",version:"1.19.0",licenceSource:"https://www.npmjs.com/package/opencode-ai",termsSource:"https://github.com/anomalyco/opencode/blob/dev/LICENSE",credential:"The provider's key OpenCode is configured with; ANTHROPIC_API_KEY declared",binaries:"Node (the opencode-ai package), git",note:"Open source under MIT, no vendor terms of its own; the model provider's terms apply to the key. Launched as opencode acp (opencode.ai/docs/acp); reads skills from .opencode/skills, .claude/skills and .agents/skills."}},OPENHANDS_HARNESS_0_0_1={id:"openhands",version:"0.0.1",name:"OpenHands",description:"The OpenHands CLI, which speaks ACP itself with openhands acp; any model provider it is configured with.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and Gemini CLI (28 October 2026); OpenHands' adapter is a Python tool the runtime image does not carry, and it has not been drilled on Datalayer.",tags:["harness"],docs:"https://docs.openhands.dev/openhands/usage/run-openhands/acp",acp:{command:"uvx",args:["--from","openhands==1.16.0","openhands","acp","--override-with-envs"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:["always-ask","always-approve","llm-approve"],env:{},nativeSession:"none"},requires:{secrets:["LLM_API_KEY"],binaries:["uvx","git"]},terms:{servedToThirdParties:"permitted",licence:"MIT"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:["always-ask","always-approve","llm-approve"],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"openhands",version:"1.16.0",licenceSource:"https://pypi.org/project/openhands/",termsSource:"https://github.com/OpenHands/OpenHands-CLI/blob/main/LICENSE",credential:"The provider's key OpenHands reads as LLM_API_KEY, with LLM_MODEL, under --override-with-envs",binaries:"uv (uvx), Python 3.12 or later, git",note:"Open source under MIT, no vendor terms of its own; the model provider's terms apply to the key. Launched as openhands acp (OpenHands-CLI README; docs.openhands.dev's ACP page); resumes with --resume; reads skills from .agents/skills (.openhands/skills is legacy)."}},HARNESS_CATALOGUE={"claude-code":CLAUDE_CODE_HARNESS_0_0_1,codex:CODEX_HARNESS_0_0_1,custom:CUSTOM_HARNESS_0_0_1,"fast-agent":FAST_AGENT_HARNESS_0_0_1,"gemini-cli":GEMINI_CLI_HARNESS_0_0_1,goose:GOOSE_HARNESS_0_0_1,opencode:OPENCODE_HARNESS_0_0_1,openhands:OPENHANDS_HARNESS_0_0_1};function listHarnesses(){return Object.values(HARNESS_CATALOGUE)}const AGENT_RUNTIME_VARIANTS=["browser-vercelai","local-pydanticai","cloud-pydanticai"],DEFAULT_AGENT_RUNTIME_VARIANT="cloud-pydanticai",VARIANT_BY_LEGACY_TARGET={"backend-services":"cloud-pydanticai","local-agent-runtimes":"local-pydanticai"};function isAgentRuntimeVariant(Au){return typeof Au=="string"&&AGENT_RUNTIME_VARIANTS.includes(Au)}function toAgentRuntimeVariant(Au,lo=DEFAULT_AGENT_RUNTIME_VARIANT){return Au?isAgentRuntimeVariant(Au)?Au:VARIANT_BY_LEGACY_TARGET[Au]??lo:lo}function locationOf(Au){return Au.slice(0,Au.indexOf("-"))}function runsInBrowser(Au){return locationOf(Au)==="browser"}function legacyTargetOf(Au){return locationOf(Au)==="cloud"?"backend-services":"local-agent-runtimes"}const runtimesStore=createStore$1((Au,lo)=>({configuration:{maxNotebookRuntimes:5,maxCellRuntimes:3},setConfiguration:$u=>{Au(Ru=>JSONExt.deepEqual(Ru.configuration,$u)?{}:{configuration:{...$u}})},runtimesUrl:coreStore.getState().configuration?.runtimesUrl,tab:0,getIntTab:()=>Math.floor(lo().tab),setTab:$u=>Au(Ru=>({tab:$u})),runtimes:[],refreshRuntimes:async()=>{const $u=await getRuntimes();JSONExt.deepEqual(lo().runtimes,$u)||Au({runtimes:[...$u]})},removeRuntime:$u=>{if(!$u)return;const Ru=lo().runtimes,Iu=Ru.filter(Pu=>Pu.runtime_name!==$u);Iu.length!==Ru.length&&Au({runtimes:Iu})},runtimeModels:[],addRuntimeModel:$u=>{const Ru=lo().runtimeModels;Ru.findIndex(Pu=>$u.id&&$u.id===Pu.id||!!$u.uid&&$u.uid===Pu.uid)<0&&Au({runtimeModels:[...Ru,$u]})},removeRuntimeModel:$u=>{const Ru=[...lo().runtimeModels],Iu=Ru?.findIndex(Pu=>!!Pu.id&&$u===Pu.id||$u===Pu.runtime_name)??-1;Iu>=0&&(Ru.splice(Iu,1),Au({runtimeModels:Ru}))},setRuntimeModels:$u=>{JSONExt.deepEqual(lo().runtimeModels,$u)||Au({runtimeModels:[...$u]})},multiServiceManager:void 0,setMultiServiceManager:$u=>{Au(Ru=>({multiServiceManager:$u}))},showDisclaimer:!1,setShowDisclaimer:$u=>{Au(Ru=>({showDisclaimer:$u}))},runtimeSnapshots:[],addSandboxSnapshot:$u=>{const Ru=lo().runtimeSnapshots,Iu=Ru.findIndex(Pu=>Pu.id===$u.id);if(Iu<0){const Pu=[...Ru,$u];Au({runtimeSnapshots:Pu})}else if(!JSONExt.deepEqual(Ru[Iu],$u)){const Pu=[...Ru];Pu.splice(Iu,1,$u),Au({runtimeSnapshots:Pu})}},removeSandboxSnapshot:$u=>{const Ru=lo().runtimeSnapshots,Iu=Ru.findIndex(Pu=>Pu.id===$u);if(Iu>=0){const Pu=[...Ru];Pu.splice(Iu,1),Au({runtimeSnapshots:Pu})}},setSandboxSnapshots:$u=>{JSONExt.deepEqual(lo().runtimeSnapshots,$u)||Au({runtimeSnapshots:[...$u]})},version:"",setVersion:$u=>{$u&&!lo().version&&Au(Ru=>({version:$u}))}})),kernelsPoll=new Poll({auto:!0,factory:()=>runtimesStore.getState().refreshRuntimes(),frequency:{interval:61*1e3,backoff:!0,max:300*1e3},name:"@datalayer/jupyter-kernels:KernelsManager#kernels",standby:()=>iamStore.getState().token||runtimesStore.getState().runtimesUrl?"when-hidden":!0});runtimesStore.subscribe((Au,lo)=>{if(!JSONExt.deepEqual(Au.runtimes,lo.runtimes)){const $u=Date.now(),Ru=Math.min(...Au.runtimes.map(Iu=>Iu.expired_at?parseFloat(Iu.expired_at):1/0))*1e3;$u+kernelsPoll.frequency.interval>Ru+2e3&&setTimeout(()=>{kernelsPoll.refresh()},Ru+2e3-$u)}});coreStore.subscribe((Au,lo)=>{if(Au.configuration.runtimesUrl&&Au.configuration.runtimesUrl!==lo.configuration.runtimesUrl){const $u=Au.configuration.runtimesUrl;console.log(`Updating runtimesUrl with new value ${$u}`),runtimesStore.setState({runtimesUrl:$u}),kernelsPoll.refresh().then(()=>kernelsPoll.tick).catch(Ru=>{console.error("Failed to refresh kernel servers list following service URL changed.",Ru)})}});function useRuntimesStore(Au){return useStore$1(runtimesStore,Au)}const DEFAULT_AGENT_CONFIG={name:"ai-agent",description:"AI Assistant",model:"",systemPrompt:"You are a helpful AI assistant.",agentLibrary:"pydantic-ai",protocol:"vercel-ai"};requireManager();const sandboxManagersByRuntime=new Map;function registerSandboxServiceManager(Au,lo){const $u=String(Au||"").trim();if(!$u||!lo)return()=>{};let Ru=sandboxManagersByRuntime.get($u);return Ru||(Ru=new Set,sandboxManagersByRuntime.set($u,Ru)),Ru.add(lo),()=>{const Iu=sandboxManagersByRuntime.get($u);Iu&&(Iu.delete(lo),Iu.size===0&&sandboxManagersByRuntime.delete($u))}}function disposeSandboxServiceManagers(Au){const lo=String(Au||"").trim();if(!lo)return;const $u=sandboxManagersByRuntime.get(lo);$u&&(sandboxManagersByRuntime.delete(lo),$u.forEach(Ru=>{try{disposeServiceManager(Ru)}catch(Iu){console.warn(`[sandboxServiceManagers] Failed disposing service manager for pod ${lo}`,Iu)}}))}function launchesOwnRoutesOnly(Au){return!!Au?.deploymentUid}const base$2=Au=>Au.trim().replace(/\/$/,"");function agentDeletionUrl(Au,lo,$u){if(!$u)return`${base$2(Au)}/api/v1/agents/${encodeURIComponent(lo)}`}function runtimeModelsUrl(Au,lo,$u){if(!$u)return`${base$2(Au)}/api/v1/configure/models?agent_id=${encodeURIComponent(lo)}`}const EMPTY_RUNTIMES=[],BROWSER_AGENT_CONNECTION=Object.freeze({runtimeName:"",environmentName:"",jupyterBaseUrl:"",agentBaseUrl:"",status:"ready",isReady:!0}),AGENT_QUERY_OPTIONS={staleTime:300*1e3,gcTime:600*1e3},agentQueryKeys={agentRuntimes:{all:()=>["agentRuntimes"],lists:()=>[...agentQueryKeys.agentRuntimes.all(),"list"],details:()=>[...agentQueryKeys.agentRuntimes.all(),"detail"],detail:Au=>[...agentQueryKeys.agentRuntimes.details(),Au]},checkpoints:{all:()=>["checkpoints"],lists:()=>[...agentQueryKeys.checkpoints.all(),"list"]}},DELETED_POD_TOMBSTONE_TTL_MS=300*1e3,deletedRuntimeTombstones=new Map;function markRuntimeDeleted(Au){const lo=String(Au||"").trim();lo&&(deletedRuntimeTombstones.set(lo,Date.now()),disposeSandboxServiceManagers(lo))}function clearRuntimeDeleted(Au){deletedRuntimeTombstones.delete(String(Au||"").trim())}const LIVE_RUNTIME_STATUSES=new Set(["running","resumed","starting","resuming"]);function isStaleDeletedRuntime(Au){const lo=String(Au?.runtime_name||"").trim(),$u=deletedRuntimeTombstones.get(lo);return $u===void 0?!1:Date.now()-$u>DELETED_POD_TOMBSTONE_TTL_MS?(deletedRuntimeTombstones.delete(lo),!1):LIVE_RUNTIME_STATUSES.has(Au.status)}const RUNTIME_STATUS_MAP={resume:"resumed",resumed:"resumed",resuming:"resuming",pausing:"pausing",paused:"paused",starting:"starting",pending:"starting",launching:"starting",terminated:"terminated",archived:"archived",running:"running"};function toAgentRuntimeData(Au){const lo=typeof Au.status=="string"?Au.status.toLowerCase():"",$u=RUNTIME_STATUS_MAP[lo]??"running",Ru=Au.environment;return{...Au,environment:{name:String(Ru?.name||"").trim(),title:String(Ru?.title||"").trim()||void 0,cpu:String(Ru?.cpu||"").trim()||void 0,memory:String(Ru?.memory||"").trim()||void 0,gpu:String(Ru?.gpu||"").trim()||void 0,resources:Ru?.resources},status:$u,name:Au.given_name||Au.runtime_name,id:Au.runtime_name,url:Au.ingress,messageCount:0,agent_spec_id:Au.agent_spec_id||void 0,content_attachments:Array.isArray(Au.content_attachments)?Au.content_attachments:[]}}function useAgentRuntimes(Au={}){const{agentSpecId:lo,agentConfig:$u,autoCreateAgent:Ru=!0,autoStart:Iu=!1,agentSpec:Pu,variant:Ou,runtimeCreationTarget:Mu,runtimeCreationBaseUrl:Du,runtimeConnection:Lu,appLaunch:Bu}=Au,ju=toAgentRuntimeVariant(Ou??Mu),Fu=launchesOwnRoutesOnly(Bu),{configuration:zu}=useCoreStore(),Uu=useAgentRuntimeConnection(),Hu=useAgentRuntimeStatus(),Vu=useAgentRuntimeError(),Gu=useAgentRuntimeIsLaunching(),Wu=useAgentRuntimeStore($d=>$d.launchAgent),Zu=useAgentRuntimeStore($d=>$d.connectAgent),Ju=useAgentRuntimeStore($d=>$d.createAgent),Yu=useAgentRuntimeStore($d=>$d.disconnect),[Xu,ed]=reactExports.useState("idle"),[td,nd]=reactExports.useState(null),[od,sd]=reactExports.useState(!1),ad=reactExports.useRef(!1),[pd,vd]=reactExports.useState(!1),Sd=reactExports.useRef(!1),_d=reactExports.useRef(null),bd=reactExports.useRef(!1),wd=reactExports.useRef($u);wd.current=$u;const Ad=!!lo&&locationOf(ju)==="cloud",gd=Lu?[Lu.runtimeName,Lu.environmentName,Lu.jupyterBaseUrl||Lu.serviceManager?.serverSettings.baseUrl||"",Lu.kernelId||""].join(":"):null,dd=reactExports.useMemo(()=>Du||(runsInBrowser(ju)?"":locationOf(ju)==="local"?"http://localhost:8765":zu?.runtimesUrl||void 0||"https://r1.datalayer.run"),[zu?.runtimesUrl,Du,ju]),yd=reactExports.useCallback(async()=>{try{const{iamStore:$d,coreStore:Id}=await __vitePreload(async()=>{const{iamStore:th,coreStore:Eh}=await import("./chunks/index-J-pyZzZ8.js");return{iamStore:th,coreStore:Eh}},[],import.meta.url),Vd=$d.getState().token||"",Wd=Id.getState().configuration?.aiAgentsUrl||"";return{token:Vd,aiAgentsUrl:Wd,runtimesUrl:dd}}catch{return{token:"",aiAgentsUrl:"",runtimesUrl:""}}},[dd]);reactExports.useEffect(()=>{!Lu||!gd||(Uu?[Uu.runtimeName,Uu.environmentName,Uu.jupyterBaseUrl||"",Uu.kernelId||""].join(":"):null)===gd||(Sd.current=!1,Zu(Lu))},[Lu,gd,Uu,Zu]);const ld=reactExports.useCallback(async $d=>{if(runsInBrowser(ju))return BROWSER_AGENT_CONNECTION;if(Ad){ed("launching"),nd(null);try{const Vd=(typeof $u?.name=="string"&&$u.name||typeof Pu?.name=="string"&&Pu.name||`${lo}`).replace(/\//g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,63),Md=await Wu($d?{...$d,...Bu,runtimesUrl:dd}:{environmentName:"ai-agents-env",creditsLimit:10,givenName:Vd,...Bu,runtimesUrl:dd});return ed("ready"),Md}catch(Id){const Vd=Id instanceof Error?Id.message:String(Id);throw nd(Vd),ed("error"),Id}}else{if(!$d)throw new Error("Runtime options are required in connect mode");return Wu({...$d,runtimesUrl:dd})}},[$u?.name,Pu?.name,lo,Bu,Ad,dd,Wu,ju]),ud=reactExports.useCallback(async $d=>{if(bd.current)throw new Error("Agent creation already in progress");bd.current=!0,sd(!0);try{const Id={};Pu&&(Pu.model&&(Id.model=Pu.model),Pu.protocol&&(Id.protocol=Pu.protocol),Pu.systemPrompt&&(Id.systemPrompt=Pu.systemPrompt),Pu.description&&(Id.description=Pu.description),Pu.name&&(Id.name=Pu.name));const Vd={...DEFAULT_AGENT_CONFIG,...Id,...$u,...$d,name:$d?.name||$u?.name||(Ad&&lo?lo:Uu?.runtimeName)};return await Ju(Vd)}catch(Id){const Vd=Id instanceof Error?Id.message:String(Id);throw Ad&&(nd(Vd),ed("error")),Id}finally{bd.current=!1,sd(!1)}},[lo,$u,Pu,Ad,Uu,Ju]),hd=reactExports.useCallback(async()=>{const $d=Uu?.agentId,Id=Uu?.agentBaseUrl,Vd=$d&&Id?agentDeletionUrl(Id,$d,Fu):void 0;if(Vd)try{const{token:Md}=await yd();await fetch(Vd,{method:"DELETE",headers:Md?{Authorization:`Bearer ${Md}`}:{}})}catch{}Sd.current=!1,ad.current=!1,ed("idle"),nd(null),agentRuntimeStore.getState().reset()},[Uu?.agentId,Uu?.agentBaseUrl,yd,Fu]);reactExports.useEffect(()=>{!Ad&&Ru&&Uu&&Hu==="ready"&&!Uu.isReady&&!Sd.current&&(Sd.current=!0,Ju(wd.current).catch($d=>{console.error("[useAgent] Failed to auto-create agent:",$d),Sd.current=!1}))},[Ad,Ru,Uu,Hu,Ju]),reactExports.useEffect(()=>{Ad&&Ru&&Uu&&(Xu==="ready"||Xu==="resumed")&&!Uu.isReady&&!Sd.current&&(Sd.current=!0,ud(wd.current).catch($d=>{console.error("[useAgents] Failed to auto-create agent:",$d);const Id=$d instanceof Error?$d.message:String($d);nd(Id),ed("error"),Sd.current=!1}))},[Ad,Ru,Uu,Xu,ud]),reactExports.useEffect(()=>{const $d=Uu?.runtimeName||null;if(!$d){_d.current=null;return}_d.current&&_d.current!==$d&&(Sd.current=!1),_d.current=$d},[Uu?.runtimeName]),reactExports.useEffect(()=>{if(!Ad||Uu||Xu!=="idle")return;if(Bu){vd(!0);return}let $d=!1;return(async()=>{try{const{token:Vd,runtimesUrl:Md}=await yd();if(!Vd)return;const{listRuntimes:Wd}=await __vitePreload(async()=>{const{listRuntimes:ih}=await import("./chunks/runtimes-D0qXa51n.js");return{listRuntimes:ih}},[],import.meta.url),ah=((await Wd(Vd,Md)).runtimes||[]).filter(ih=>ih.environment?.name!=="ai-agents-env"?!1:lo?ih.agent_spec_id===lo:!0).slice().sort((ih,Mh)=>{const qd=Number(ih.started_at||0);return Number(Mh.started_at||0)-qd})[0];if($d||!ah?.runtime_name||!ah?.ingress)return;Zu({runtimeName:ah.runtime_name,environmentName:ah.environment.name,jupyterBaseUrl:ah.ingress}),Sd.current=!1;const yh=ah,vh=typeof yh.status=="string"?yh.status.toLowerCase():"",Jd=RUNTIME_STATUS_MAP[vh]??"running",eh=Jd==="paused"?"paused":Jd==="resuming"||Jd==="resumed"?"resumed":"running";ed(eh==="paused"?"paused":eh==="resumed"?"resumed":"ready")}catch(Vd){console.warn("[useAgents] Failed to find existing runtime:",Vd)}finally{$d||vd(!0)}})(),()=>{$d=!0}},[Ad,Uu,Iu,Xu,yd,lo,Bu,Zu]),reactExports.useEffect(()=>{(Hu==="disconnected"||Hu==="idle")&&(Sd.current=!1)},[Hu]),reactExports.useEffect(()=>{Ad&&Iu&&pd&&!Uu&&!ad.current&&Xu==="idle"&&(ad.current=!0,ld())},[Ad,Iu,pd,Uu,Xu,ld]),reactExports.useEffect(()=>{Vu&&Ad&&Xu!=="error"&&(nd(Vu),ed("error"))},[Vu,Ad,Xu]);const md=runsInBrowser(ju),Ed=md?"ready":Ad?Xu:Hu,Td=md?null:Ad&&td||Vu,Rd=md?!0:Ad?(Xu==="ready"||Xu==="resumed")&&!!Uu?.isReady:Hu==="ready"&&!!Uu?.isReady,jd=Uu?.endpoint||null,Cd=Uu?.serviceManager||null;return{runtime:Uu,status:Ed,isLaunching:Gu,launchRuntime:ld,connectToRuntime:Zu,disconnect:Yu,endpoint:jd,serviceManager:Cd,createAgent:ud,teardown:hd,isCreating:od,isReady:Rd,error:Td,variant:ju,runtimeCreationTarget:legacyTargetOf(ju),runtimeCreationBaseUrl:dd}}function useAgentRuntimesQuery(Au,lo){const{configuration:$u}=useCoreStore(),{requestDatalayer:Ru}=useDatalayer({notifyOnError:!1}),{user:Iu}=useIAMStore(),Pu=useQueryClient();return useQuery({queryKey:[...agentQueryKeys.agentRuntimes.lists(),"","","",""],queryFn:async()=>{const Mu=new URLSearchParams().toString(),Du=await Ru({url:`${runtimesUrl($u.runtimesUrl)}${Mu?`?${Mu}`:""}`,method:"GET"});if(Du.success&&Du.runtimes){const Lu=Du.runtimes.filter(Bu=>Bu.environment?.name==="ai-agents-env").map(toAgentRuntimeData).filter(Bu=>!isStaleDeletedRuntime(Bu));return Lu.forEach(Bu=>{Pu.setQueryData(agentQueryKeys.agentRuntimes.detail(Bu.runtime_name),Bu)}),Lu}return[]},...AGENT_QUERY_OPTIONS,refetchInterval:lo?.refetchInterval??1e4,refetchOnMount:!0,refetchOnWindowFocus:!0,enabled:(lo?.enabled??!0)&&!!Iu})}function useCreateAgentRuntime(){const{configuration:Au}=useCoreStore(),{requestDatalayer:lo}=useDatalayer({notifyOnError:!1}),$u=useQueryClient();return useMutation({mutationFn:async Ru=>{const Iu=(Ru.contentAttachmentUids??[]).map(Pu=>String(Pu||"").trim()).filter(Boolean);return lo({url:runtimesUrl(Au.runtimesUrl),method:"POST",body:{environment:{name:Ru.environmentName||"ai-agents-env"},given_name:Ru.givenName||"Agent",credits_limit:Ru.creditsLimit||10,type:Ru.type||"notebook",editor_variant:Ru.editorVariant||"none",enable_codemode:Ru.enableCodemode??!1,agent_spec_id:Ru.agentSpecId||void 0,agent_spec:Ru.agentSpec||void 0,user_account_handle:Ru.userAccountHandle||void 0,billing_entity_uid:Ru.billingEntityUid||void 0,billing_entity_type:Ru.billingEntityType||void 0,billing_entity_handle:Ru.billingEntityHandle||void 0,billing_source_organization_uid:Ru.billingSourceOrganizationUid||void 0,billing_source_organization_handle:Ru.billingSourceOrganizationHandle||void 0,runtime_name:Ru.runtimeName||void 0,content_attachment_uids:Iu.length?Iu:void 0}})},onSuccess:Ru=>{if(Ru.success&&Ru.runtime){const Iu=toAgentRuntimeData(Ru.runtime);clearRuntimeDeleted(Iu.runtime_name),$u.setQueryData(agentQueryKeys.agentRuntimes.detail(Iu.runtime_name),Iu),$u.invalidateQueries({queryKey:agentQueryKeys.agentRuntimes.all()})}}})}function useDeleteAgentRuntime(){const{configuration:Au}=useCoreStore(),{requestDatalayer:lo}=useDatalayer({notifyOnError:!1}),$u=useQueryClient(),Ru=Pu=>{if(!Pu||typeof Pu!="object")return;const Ou=Pu.response;return typeof Ou?.status=="number"?Ou.status:void 0},Iu=Pu=>{if(!Pu||typeof Pu!="object")return"";const Ou=Pu.response?.data;return String(Ou?.detail||Ou?.message||Pu.message||"").toLowerCase()};return useMutation({mutationFn:async Pu=>{try{return await lo({url:runtimeUrl(Au.runtimesUrl,Pu),method:"DELETE"})}catch(Ou){const Mu=Ru(Ou),Du=Iu(Ou);if(!(Mu===404||Du.includes("no reservation")||Du.includes("unknown reservation")||Du.includes("not found")))throw Ou;try{throw await lo({url:runtimeUrl(Au.runtimesUrl,Pu),method:"GET"}),Ou}catch(Bu){if(Ru(Bu)===404)return{success:!0,recovered:!0};throw Ou}}},onSuccess:(Pu,Ou)=>{markRuntimeDeleted(Ou),runtimesStore.getState().removeRuntime(Ou),$u.setQueriesData({queryKey:agentQueryKeys.agentRuntimes.lists()},Mu=>Array.isArray(Mu)?Mu.filter(Du=>Du.runtime_name!==Ou):Mu),$u.cancelQueries({queryKey:agentQueryKeys.agentRuntimes.detail(Ou)}),$u.removeQueries({queryKey:agentQueryKeys.agentRuntimes.detail(Ou)}),$u.invalidateQueries({queryKey:agentQueryKeys.agentRuntimes.lists()}),$u.refetchQueries({queryKey:agentQueryKeys.agentRuntimes.lists(),type:"active"}),$u.invalidateQueries({queryKey:agentQueryKeys.checkpoints.all()})}})}function useRefreshAgentRuntimes(){const Au=useQueryClient();return reactExports.useCallback(()=>{Au.invalidateQueries({queryKey:agentQueryKeys.agentRuntimes.all()})},[Au])}const DEFAULT_LIFECYCLE_RECORD={resumePending:!1,pauseLockedForResumed:!1};create$f()(persist((Au,lo)=>({byRuntimeKey:{},markResumePending:$u=>{$u&&Au(Ru=>({byRuntimeKey:{...Ru.byRuntimeKey,[$u]:{...DEFAULT_LIFECYCLE_RECORD,...Ru.byRuntimeKey[$u]??{},resumePending:!0}}}))},markResumeFailed:$u=>{$u&&Au(Ru=>({byRuntimeKey:{...Ru.byRuntimeKey,[$u]:{...DEFAULT_LIFECYCLE_RECORD,...Ru.byRuntimeKey[$u]??{},resumePending:!1,pauseLockedForResumed:!1}}}))},markResumeSettled:$u=>{$u&&Au(Ru=>({byRuntimeKey:{...Ru.byRuntimeKey,[$u]:{...DEFAULT_LIFECYCLE_RECORD,...Ru.byRuntimeKey[$u]??{},resumePending:!1,pauseLockedForResumed:!0}}}))},clearRuntimeLifecycle:$u=>{if(!$u)return;const Ru={...lo().byRuntimeKey};delete Ru[$u],Au({byRuntimeKey:Ru})}}),{name:"datalayer-agent-lifecycle",storage:createJSONStorage(()=>localStorage),partialize:Au=>({byRuntimeKey:Au.byRuntimeKey})}));function useAgentsRuntimes(Au,lo){const $u=useAgentRuntimesQuery(Au,lo),Ru=useCreateAgentRuntime(),Iu=useDeleteAgentRuntime(),Pu=useRefreshAgentRuntimes(),Ou=reactExports.useCallback(async(Mu,Du)=>{const Lu=String(Mu||"").trim();if(Lu)return Du?.beforeStop&&await Du.beforeStop(),Iu.mutateAsync(Lu)},[Iu]);return reactExports.useMemo(()=>({runtimes:$u.data??EMPTY_RUNTIMES,isRuntimesLoading:$u.isLoading,isRuntimesError:$u.isError,runtimesError:$u.error,refetchRuntimes:()=>$u.refetch(),refreshRuntimes:Pu,stopRuntimeByName:Ou,createRuntime:async Mu=>Ru.mutateAsync(Mu)}),[$u.data,$u.isLoading,$u.isError,$u.error,$u.refetch,Pu,Ou,Ru,Iu])}const DEFAULT_WS_PATH="/api/v1/tool-approvals/ws",DEFAULT_RECONNECT_DELAY_MS=3e3;function useAgentRuntimeWebSocket(Au){const{enabled:lo=!0,baseUrl:$u,authToken:Ru,agentId:Iu,autoReconnect:Pu=!0,reconnectDelayMs:Ou=DEFAULT_RECONNECT_DELAY_MS,maxReconnectAttempts:Mu}=Au,Du=reactExports.useRef(Au.onMessage);Du.current=Au.onMessage,reactExports.useEffect(()=>{if(!lo||!$u){agentRuntimeStore.getState().setWsState("closed");return}let Lu=!1,Bu=0,ju=null;function Fu(){const Uu=`${$u}${DEFAULT_WS_PATH}`,Hu=new URL(Uu.replace(/^http/,"ws"));return Ru&&Hu.searchParams.set("token",Ru),Iu&&Hu.searchParams.set("agent_id",Iu),Hu.toString()}function zu(){if(Lu)return;const Uu=Fu();agentRuntimeStore.getState().setWsState("connecting");const Hu=new WebSocket(Uu);agentRuntimeStore.getState().setWs(Hu,Iu),Hu.onopen=()=>{Bu=0,agentRuntimeStore.getState().setWsState("connected")},Hu.onmessage=Vu=>{let Gu;try{Gu=JSON.parse(String(Vu.data))}catch{return}const Wu=parseAgentStreamMessage(Gu);if(Du.current?.({type:Wu?.type,payload:Wu?.payload,raw:Gu}),!Wu)return;const Zu=agentRuntimeStore.getState();if(Wu.type==="agent.snapshot"){Zu.applySnapshot(Wu.payload);return}if(Wu.type==="agent.subagent"){Zu.appendSubagentEvent(Wu.payload);return}if(Wu.type==="agent.compaction"){Zu.setCompaction(Wu.payload);return}},Hu.onclose=()=>{if(agentRuntimeStore.getState().setWs(null,Iu),agentRuntimeStore.getState().setWsState("closed"),Lu||!Pu||(Bu+=1,typeof Mu=="number"&&Bu>Mu))return;const Vu=typeof Ou=="function"?Ou(Bu):Ou;ju=setTimeout(zu,Math.max(0,Vu))},Hu.onerror=()=>{(Hu.readyState===WebSocket.CONNECTING||Hu.readyState===WebSocket.OPEN)&&Hu.close()}}return zu(),()=>{Lu=!0,ju&&clearTimeout(ju),agentRuntimeStore.getState().setWs(null,Iu),agentRuntimeStore.getState().resetWs()}},[lo,$u,Ru,Iu,Pu,Ou,Mu])}const ALPHAVANTAGE_MCP_SERVER_0_0_1={id:"alphavantage",version:"0.0.1",name:"Alpha Vantage",description:"Financial market data and stock information",icon:"@primer/octicons-react:graph",emoji:"💹",url:"",command:"uvx",args:["av-mcp==0.2.1","${ALPHAVANTAGE_API_KEY}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["ALPHAVANTAGE_API_KEY:0.0.1"]},CHART_MCP_SERVER_0_0_1={id:"chart",version:"0.0.1",name:"Chart Generator",description:"Generate charts and visualizations",icon:"@datalayer/icons-react:chart-bar",emoji:"📊",url:"",command:"npx",args:["-y","@antv/mcp-server-chart"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},DATALAYER_MCP_SERVER_0_0_1={id:"datalayer",version:"0.0.1",name:"Datalayer",description:"Read, edit and run Jupyter notebooks on Datalayer, with sandboxes and data",icon:"@datalayer/icons-react:datalayer",emoji:"🚀",url:"",command:"npx",args:["-y","mcp-remote","https://mcp.datalayer.run/mcp","--header","Authorization: Bearer ${DATALAYER_API_KEY}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["DATALAYER_API_KEY:0.0.1"]},EARTHDATA_MCP_SERVER_0_0_1={id:"earthdata",version:"0.0.1",name:"Earthdata MCP",description:"Access NASA Earthdata search and metadata capabilities",icon:"@datalayer/icons-react:globe-americas",emoji:"🌍",url:"",command:"npx",args:["-y","mcp-remote","https://mcp.datalayer.run/mcp?only=earthdata","--header","Authorization: Bearer ${DATALAYER_API_KEY}"],transport:"stdio",enabled:!0,isAvailable:!1,tools:[],requiredEnvVars:["DATALAYER_API_KEY:0.0.1"]},EURUS_MCP_SERVER_0_0_1={id:"eurus",version:"0.0.1",name:"Eurus Climate MCP",description:"Climate and reanalysis analysis tools for spatial workflows",icon:"@primer/octicons-react:cloud",emoji:"🌦️",url:"",command:"eurus-mcp",args:[],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},FILESYSTEM_MCP_SERVER_0_0_1={id:"filesystem",version:"0.0.1",name:"Filesystem",description:"Local filesystem read/write operations",icon:"@primer/octicons-react:file-directory",emoji:"📁",url:"",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem","${TMPDIR}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},GITHUB_MCP_SERVER_0_0_1={id:"github",version:"0.0.1",name:"GitHub",description:"GitHub repository operations (issues, PRs, code search)",icon:"@datalayer/icons-react:github-mark",emoji:"🐙",url:"",command:"docker",args:["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["GITHUB_TOKEN:0.0.1"]},GOOGLE_WORKSPACE_MCP_SERVER_0_0_1={id:"google-workspace",version:"0.0.1",name:"Google Workspace",description:"Gmail of the person an application acts for, read or read and send, with a token Datalayer mints per call",icon:"@datalayer/icons-react:google",emoji:"📧",url:"http://127.0.0.1:9711/mcp",command:"uvx",args:["workspace-mcp","--transport","streamable-http","--permissions","gmail:send"],transport:"streamable-http",enabled:!0,isAvailable:!1,tools:[],requiredEnvVars:[]},HUGGINGFACE_MCP_SERVER_0_0_1={id:"huggingface",version:"0.0.1",name:"Hugging Face",description:"Hugging Face models, datasets, spaces, and papers access",icon:"@primer/octicons-react:hubot",emoji:"🤗",url:"",command:"npx",args:["-y","mcp-remote","https://huggingface.co/mcp","--header","Authorization: Bearer ${HF_TOKEN}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["HF_TOKEN:0.0.1"]},KAGGLE_MCP_SERVER_0_0_1={id:"kaggle",version:"0.0.1",name:"Kaggle",description:"Kaggle datasets, models, competitions, and notebooks access",icon:"@datalayer/icons-react:kaggle",emoji:"🏆",url:"",command:"npx",args:["-y","mcp-remote","https://www.kaggle.com/mcp","--header","Authorization: Bearer ${KAGGLE_API_TOKEN}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["KAGGLE_API_TOKEN:0.0.1"]},ODOO_ACCOUNTING_MCP_SERVER_0_0_1={id:"odoo-accounting",version:"0.0.1",name:"Odoo Accounting",description:"An accountant's day in Odoo — invoices, bills, journal entries, reconciliations, bank lines and tax returns — through the Datalayer MCP server",icon:"@datalayer/icons-react:odoo",emoji:"🧮",url:"",command:"npx",args:["-y","mcp-remote","https://mcp.datalayer.run/mcp?only=odoo-accounting","--header","Authorization: Bearer ${DATALAYER_API_KEY}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["DATALAYER_API_KEY:0.0.1"]},ODOO_MCP_SERVER_0_0_1={id:"odoo",version:"0.0.1",name:"Odoo",description:"Odoo ERP operations (search, invoices, journals, reconciliations)",icon:"@datalayer/icons-react:odoo",emoji:"🧾",url:"",command:"uvx",args:["mcp-server-odoo"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},SALESFORCE_MCP_SERVER_0_0_1={id:"salesforce",version:"0.0.1",name:"Salesforce",description:"Salesforce CRM operations (queries, reports, objects, SOQL)",icon:"@primer/octicons-react:briefcase",emoji:"☁️",url:"",command:"npx",args:["-y","@anthropic/salesforce-mcp-server"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["SALESFORCE_ACCESS_TOKEN:0.0.1","SALESFORCE_INSTANCE_URL:0.0.1"]},SLACK_MCP_SERVER_0_0_1={id:"slack",version:"0.0.1",name:"Slack",description:"Slack messaging and channel operations",icon:"@datalayer/icons-react:slack",emoji:"💬",url:"",command:"npx",args:["-y","@datalayer/slack-mcp-server"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["SLACK_BOT_TOKEN:0.0.1","SLACK_TEAM_ID:0.0.1","SLACK_CHANNEL_IDS:0.0.1"]},TAVILY_MCP_SERVER_0_0_1={id:"tavily",version:"0.0.1",name:"Tavily Search",description:"Web search and research capabilities via Tavily API",icon:"@primer/octicons-react:search",emoji:"🔍",url:"",command:"npx",args:["-y","tavily-mcp"],transport:"stdio",enabled:!0,isAvailable:!1,tools:[],requiredEnvVars:["TAVILY_API_KEY:0.0.1"]},MCP_SERVER_LIBRARY={alphavantage:ALPHAVANTAGE_MCP_SERVER_0_0_1,chart:CHART_MCP_SERVER_0_0_1,datalayer:DATALAYER_MCP_SERVER_0_0_1,earthdata:EARTHDATA_MCP_SERVER_0_0_1,eurus:EURUS_MCP_SERVER_0_0_1,filesystem:FILESYSTEM_MCP_SERVER_0_0_1,github:GITHUB_MCP_SERVER_0_0_1,"google-workspace":GOOGLE_WORKSPACE_MCP_SERVER_0_0_1,huggingface:HUGGINGFACE_MCP_SERVER_0_0_1,kaggle:KAGGLE_MCP_SERVER_0_0_1,"odoo-accounting":ODOO_ACCOUNTING_MCP_SERVER_0_0_1,odoo:ODOO_MCP_SERVER_0_0_1,salesforce:SALESFORCE_MCP_SERVER_0_0_1,slack:SLACK_MCP_SERVER_0_0_1,tavily:TAVILY_MCP_SERVER_0_0_1},ACCOUNTING_SKILL_SPEC_0_0_1={id:"accounting",version:"0.0.1",name:"Accounting Skill",description:"Accounting analysis workflows for reconciliation, close, variance, and audit-ready summaries",module:"agent_skills.skills.accounting",package:void 0,method:void 0,path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["pandas>=2.0.0"],tags:["accounting","finance","reconciliation","close"],icon:"@primer/octicons-react:book",emoji:"🧮",enabled:!1},CRAWL_SKILL_SPEC_0_0_1={id:"crawl",version:"0.0.1",name:"Web Crawl Skill",description:"Web crawling and content extraction capabilities",module:"agent_skills.skills.crawl",package:void 0,method:void 0,path:void 0,requiredEnvVars:["TAVILY_API_KEY:0.0.1"],optionalEnvVars:[],dependencies:["requests>=2.31.0","beautifulsoup4>=4.12.0"],tags:["web","crawl","scraping"],icon:"@primer/octicons-react:globe",emoji:"🌐",enabled:!0},EVENTS_SKILL_SPEC_0_0_1={id:"events",version:"0.0.1",name:"Events Skill",description:"Event generation, enrichment, and lifecycle orchestration",module:"agent_skills.skills.events",package:void 0,method:void 0,path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["httpx>=0.27.0"],tags:["events","orchestration","automation"],icon:"@primer/octicons-react:calendar",emoji:"📅",enabled:!1},GITHUB_SKILL_SPEC_0_0_1={id:"github",version:"0.0.1",name:"GitHub Skill",description:"GitHub repository management and code operations",module:"agent_skills.skills.github",package:void 0,method:void 0,path:void 0,requiredEnvVars:["GITHUB_TOKEN:0.0.1"],optionalEnvVars:[],dependencies:["PyGithub>=2.1.0"],tags:["github","git","code"],icon:"@datalayer/icons-react:github-mark",emoji:"🐙",enabled:!1},JOKES_SKILL_SPEC_0_0_1={id:"jokes",version:"0.0.1",name:"Jokes Skill",description:"Return random jokes from a local path-based skill.",module:void 0,package:void 0,method:void 0,path:"jokes",requiredEnvVars:[],optionalEnvVars:[],dependencies:[],tags:["fun","humor","demo"],icon:"@primer/octicons-react:smiley",emoji:"😄",enabled:!1},PDF_SKILL_SPEC_0_0_1={id:"pdf",version:"0.0.1",name:"PDF Processing Skill",description:"PDF document reading, parsing, and extraction",module:"agent_skills.skills.pdf",package:void 0,method:void 0,path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["PyPDF2>=3.0.0","pdfplumber>=0.10.0"],tags:["pdf","documents","extraction"],icon:"@primer/octicons-react:file",emoji:"📄",enabled:!1},TEXT_SUMMARIZER_SKILL_SPEC_0_0_1={id:"text-summarizer",version:"0.0.1",name:"Text Summarizer Skill",description:"Summarize text content using extractive and abstractive techniques. Use when the user asks for summaries, key points, or condensed versions of documents.",module:void 0,package:"agent_skills.skills.text_summarizer",method:"summarize_text",path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["agent-skills>=0.0.1"],tags:["nlp","summarization","text-processing"],icon:"@primer/octicons-react:note",emoji:"📝",enabled:!1},SKILLS_CATALOG={accounting:ACCOUNTING_SKILL_SPEC_0_0_1,crawl:CRAWL_SKILL_SPEC_0_0_1,events:EVENTS_SKILL_SPEC_0_0_1,github:GITHUB_SKILL_SPEC_0_0_1,jokes:JOKES_SKILL_SPEC_0_0_1,pdf:PDF_SKILL_SPEC_0_0_1,"text-summarizer":TEXT_SUMMARIZER_SKILL_SPEC_0_0_1},CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1={id:"create-plan",version:"0.0.1",name:"Create Plan",description:"Create a plan with multiple steps and emit an AG-UI state snapshot.",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"create_plan"},icon:"@primer/octicons-react:list-unordered",emoji:"📋"},CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1={id:"current-time",version:"0.0.1",name:"Current Time",description:"Return the current time in ISO format for a given timezone.",tags:["example","ag-ui","time"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"current_time"},icon:"@primer/octicons-react:clock",emoji:"🕒"},DECIDE_BACKEND_TOOL_SPEC_0_0_1={id:"decide",version:"0.0.1",name:"Decide",description:"Ask Jev typed questions about a text — noul (does a statement hold, with its probability), choice (one of named options) or score (a step on a rubric) — and get the typed answers back, through datalayer-ai-inference.",tags:["runtime","decisions","jev"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.tools.decisions",method:"decide"},icon:"@primer/octicons-react:law",emoji:"⚖️"},DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1={id:"display-recipe",version:"0.0.1",name:"Display Recipe",description:"Update the shared recipe state and emit an AG-UI state snapshot.",tags:["example","ag-ui","shared-state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"display_recipe"},icon:"@primer/octicons-react:book",emoji:"🍳"},EXAMPLE_CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1={id:"example-create-plan",version:"0.0.1",name:"Create Plan",description:"Create a plan with multiple steps and emit an AG-UI state snapshot.",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"create_plan"},icon:"@primer/octicons-react:list-unordered",emoji:"📋"},EXAMPLE_CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1={id:"example-current-time",version:"0.0.1",name:"Current Time",description:"Return the current time in ISO format for a given timezone.",tags:["example","ag-ui","time"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"current_time"},icon:"@primer/octicons-react:clock",emoji:"🕒"},EXAMPLE_DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1={id:"example-display-recipe",version:"0.0.1",name:"Display Recipe",description:"Update the shared recipe state and emit an AG-UI state snapshot.",tags:["example","ag-ui","shared-state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"display_recipe"},icon:"@primer/octicons-react:book",emoji:"🍳"},EXAMPLE_GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1={id:"example-generate-haiku",version:"0.0.1",name:"Generate Haiku",description:"Generate a haiku (Japanese + English + gradient) rendered as a card by the frontend.",tags:["example","ag-ui","generative-ui"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_haiku"},icon:"@primer/octicons-react:pencil",emoji:"🖋️"},EXAMPLE_GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1={id:"example-generate-task-steps",version:"0.0.1",name:"Generate Task Steps",description:"Generate task steps for human review and emit an AG-UI state snapshot.",tags:["example","ag-ui","human-in-the-loop"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_task_steps"},icon:"@primer/octicons-react:tasklist",emoji:"🙋"},EXAMPLE_GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1={id:"example-get-weather",version:"0.0.1",name:"Get Weather",description:"Fetch current weather for a location from the Open-Meteo API for frontend rendering.",tags:["example","ag-ui","weather"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"get_weather"},icon:"@primer/octicons-react:sun",emoji:"🌤️"},EXAMPLE_RENDER_A2UI_SURFACE_BACKEND_TOOL_SPEC_0_0_1={id:"example-render-a2ui-surface",version:"0.0.1",name:"Render A2UI Surface",description:"Turn a declarative field spec into a validated A2UI v0.9 surface rendered live by the frontend as an interactive form/card.",tags:["example","ag-ui","a2ui","generative-ui"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.a2ui",method:"render_a2ui_surface"},icon:"@primer/octicons-react:browser",emoji:"🎛️"},EXAMPLE_UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1={id:"example-update-plan-step",version:"0.0.1",name:"Update Plan Step",description:"Update a plan step and emit an AG-UI state delta (JSON Patch RFC 6902).",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"update_plan_step"},icon:"@primer/octicons-react:checklist",emoji:"✅"},GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1={id:"generate-haiku",version:"0.0.1",name:"Generate Haiku",description:"Generate a haiku (Japanese + English + gradient) rendered as a card by the frontend.",tags:["example","ag-ui","generative-ui"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_haiku"},icon:"@primer/octicons-react:pencil",emoji:"🖋️"},GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1={id:"generate-task-steps",version:"0.0.1",name:"Generate Task Steps",description:"Generate task steps for human review and emit an AG-UI state snapshot.",tags:["example","ag-ui","human-in-the-loop"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_task_steps"},icon:"@primer/octicons-react:tasklist",emoji:"🙋"},GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1={id:"get-weather",version:"0.0.1",name:"Get Weather",description:"Fetch current weather for a location from the Open-Meteo API for frontend rendering.",tags:["example","ag-ui","weather"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"get_weather"},icon:"@primer/octicons-react:sun",emoji:"🌤️"},RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1={id:"runtime-echo",version:"0.0.1",name:"Runtime Echo",description:"Echo text back to the caller for quick runtime verification.",tags:["runtime","utility"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools",method:"runtime_echo"},icon:"@primer/octicons-react:comment",emoji:"💬"},RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1={id:"runtime-send-mail",version:"0.0.1",name:"Runtime Send Mail (Fake)",description:"Fake mail sender for tool approval demos; returns a simulated send receipt.",tags:["runtime","approval","mail"],enabled:!0,approval:"manual",timeout:void 0,requiresApproval:!0,runtime:{language:"python",package:"agent_runtimes.examples.tools",method:"runtime_send_mail"},icon:"@primer/octicons-react:mail",emoji:"📧"},RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1={id:"runtime-sensitive-echo",version:"0.0.1",name:"Runtime Sensitive Echo",description:"Echo text with a manual approval checkpoint before execution.",tags:["runtime","approval"],enabled:!0,approval:"manual",timeout:void 0,requiresApproval:!0,runtime:{language:"python",package:"agent_runtimes.examples.tools",method:"runtime_sensitive_echo"},icon:"@primer/octicons-react:shield",emoji:"🛡️"},UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1={id:"update-plan-step",version:"0.0.1",name:"Update Plan Step",description:"Update a plan step and emit an AG-UI state delta (JSON Patch RFC 6902).",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"update_plan_step"},icon:"@primer/octicons-react:checklist",emoji:"✅"},BACKEND_TOOL_CATALOG={"create-plan":CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1,"current-time":CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1,decide:DECIDE_BACKEND_TOOL_SPEC_0_0_1,"display-recipe":DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1,"example-create-plan":EXAMPLE_CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1,"example-current-time":EXAMPLE_CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1,"example-display-recipe":EXAMPLE_DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1,"example-generate-haiku":EXAMPLE_GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1,"example-generate-task-steps":EXAMPLE_GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1,"example-get-weather":EXAMPLE_GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1,"example-render-a2ui-surface":EXAMPLE_RENDER_A2UI_SURFACE_BACKEND_TOOL_SPEC_0_0_1,"example-update-plan-step":EXAMPLE_UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1,"generate-haiku":GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1,"generate-task-steps":GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1,"get-weather":GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1,"runtime-echo":RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1,"runtime-send-mail":RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1,"runtime-sensitive-echo":RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1,"update-plan-step":UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1},DECKS_FRONTEND_TOOL_SPEC_0_0_1={id:"decks",version:"0.0.1",name:"Decks",description:"Read, write and drive presentations kept as data — a deck, its slides, and the one on screen.",tags:["frontend","decks","presentations"],enabled:!0,toolset:["decks_list_decks","decks_get_deck","decks_create_deck","decks_update_deck","decks_update_slide","decks_insert_slide","decks_delete_slide","decks_list_slides","decks_get_slide","decks_add_slide","decks_delete_deck","decks_list","decks_open","decks_go_to_slide","decks_next_slide","decks_previous_slide","decks_present","decks_print"],icon:"@primer/octicons-react:project",emoji:"🃏"},JUPYTER_NOTEBOOK_EDIT_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook-edit",version:"0.0.1",name:"Jupyter Notebook (edit)",description:"Read and edit a notebook, and run cells — but never delete from it.",tags:["frontend","notebook","edit"],enabled:!0,toolset:["readCell","readAllCells","insertCell","updateCell","runCell","executeCode"],icon:"@datalayer/icons-react:jupyter",emoji:"📓"},JUPYTER_NOTEBOOK_PROPOSE_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook-propose",version:"0.0.1",name:"Jupyter Notebook (propose)",description:"Read a notebook and propose changes for a person to accept, never applying them.",tags:["frontend","notebook","propose"],enabled:!0,toolset:["readCell","readAllCells","proposeCellUpdate","runCell"],icon:"@datalayer/icons-react:jupyter",emoji:"📓"},JUPYTER_NOTEBOOK_READ_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook-read",version:"0.0.1",name:"Jupyter Notebook (read only)",description:"Read a notebook without changing it — cells, outputs and errors.",tags:["frontend","notebook","read"],enabled:!0,toolset:["readCell","readAllCells"],icon:"@datalayer/icons-react:jupyter",emoji:"📓"},JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook",version:"0.0.1",name:"Jupyter Notebook",description:"Frontend tools for interacting with Jupyter notebooks.",tags:["frontend","notebook","jupyter-server"],enabled:!0,toolset:"all",icon:"@datalayer/icons-react:jupyter",emoji:"📓"},LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1={id:"lexical-document",version:"0.0.1",name:"Lexical Document",description:"Frontend tools for interacting with Lexical documents: reading and writing blocks, running Jupyter cells in the page, and drawing diagrams into the document with Excalidraw.",tags:["frontend","document","lexical","drawing","diagram"],enabled:!0,toolset:"all",icon:"@primer/octicons-react:file",emoji:"📄"},FRONTEND_TOOL_CATALOG={decks:DECKS_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-edit":JUPYTER_NOTEBOOK_EDIT_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-propose":JUPYTER_NOTEBOOK_PROPOSE_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-read":JUPYTER_NOTEBOOK_READ_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook":JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1,"lexical-document":LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1},MCP_SERVER_MAP$1={"alphavantage:0.0.1":ALPHAVANTAGE_MCP_SERVER_0_0_1,"chart:0.0.1":CHART_MCP_SERVER_0_0_1,"earthdata:0.0.1":EARTHDATA_MCP_SERVER_0_0_1,"eurus:0.0.1":EURUS_MCP_SERVER_0_0_1,"filesystem:0.0.1":FILESYSTEM_MCP_SERVER_0_0_1,"github:0.0.1":GITHUB_MCP_SERVER_0_0_1,"google-workspace:0.0.1":GOOGLE_WORKSPACE_MCP_SERVER_0_0_1,"huggingface:0.0.1":HUGGINGFACE_MCP_SERVER_0_0_1,"kaggle:0.0.1":KAGGLE_MCP_SERVER_0_0_1,"odoo:0.0.1":ODOO_MCP_SERVER_0_0_1,"salesforce:0.0.1":SALESFORCE_MCP_SERVER_0_0_1,"slack:0.0.1":SLACK_MCP_SERVER_0_0_1,"tavily:0.0.1":TAVILY_MCP_SERVER_0_0_1},SKILL_MAP$1={"accounting:0.0.1":ACCOUNTING_SKILL_SPEC_0_0_1,"crawl:0.0.1":CRAWL_SKILL_SPEC_0_0_1,"events:0.0.1":EVENTS_SKILL_SPEC_0_0_1,"github:0.0.1":GITHUB_SKILL_SPEC_0_0_1,"jokes:0.0.1":JOKES_SKILL_SPEC_0_0_1,"pdf:0.0.1":PDF_SKILL_SPEC_0_0_1,"text-summarizer:0.0.1":TEXT_SUMMARIZER_SKILL_SPEC_0_0_1};function toAgentSkillSpec$1(Au){return{id:Au.id,name:Au.name,description:Au.description,version:Au.version??"0.0.1",tags:Au.tags,enabled:Au.enabled,requiredEnvVars:Au.requiredEnvVars}}const TOOL_MAP$1={"decide:0.0.1":DECIDE_BACKEND_TOOL_SPEC_0_0_1,"example-create-plan:0.0.1":EXAMPLE_CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1,"example-current-time:0.0.1":EXAMPLE_CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1,"example-display-recipe:0.0.1":EXAMPLE_DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1,"example-generate-haiku:0.0.1":EXAMPLE_GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1,"example-generate-task-steps:0.0.1":EXAMPLE_GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1,"example-get-weather:0.0.1":EXAMPLE_GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1,"example-render-a2ui-surface:0.0.1":EXAMPLE_RENDER_A2UI_SURFACE_BACKEND_TOOL_SPEC_0_0_1,"example-update-plan-step:0.0.1":EXAMPLE_UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1,"runtime-echo:0.0.1":RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1,"runtime-send-mail:0.0.1":RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1,"runtime-sensitive-echo:0.0.1":RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1},FRONTEND_TOOL_MAP$1={"decks:0.0.1":DECKS_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-edit:0.0.1":JUPYTER_NOTEBOOK_EDIT_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-propose:0.0.1":JUPYTER_NOTEBOOK_PROPOSE_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-read:0.0.1":JUPYTER_NOTEBOOK_READ_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook:0.0.1":JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1,"lexical-document:0.0.1":LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1},EXAMPLE_A2A_RESEARCHER_AGENTSPEC_0_0_1={id:"example-a2a-researcher",version:"0.0.1",name:"Example A2A Researcher",description:"A research specialist served over the A2A protocol. Given a topic, gathers the key facts and returns concise, source-aware notes.",tags:["research","a2a"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"search",emoji:"🔎",color:"#0EA5E9",suggestions:[{text:"Gather the key facts on a topic, with sources",summary:"Key facts with sources"}],welcomeMessage:"A2A researcher ready.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:void 0,harness:"pydantic-ai",systemPrompt:"You are a meticulous research specialist, reached by other agents over the A2A protocol. Given a topic, gather the key facts and return concise, source-aware notes. Prefer verifiable claims and flag anything uncertain. Answer with the notes themselves: no preamble, no questions back. You have no tools and no web access: work from what you know, and say when something should be checked.",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"a2a",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_A2A_WRITER_AGENTSPEC_0_0_1={id:"example-a2a-writer",version:"0.0.1",name:"Example A2A Writer",description:"A writing specialist served over the A2A protocol. Given notes or instructions, produces clear, well-structured prose.",tags:["writing","a2a"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"pencil",emoji:"✍️",color:"#F59E0B",suggestions:[{text:"Turn a set of notes into a short, structured write-up",summary:"Notes into a write-up"}],welcomeMessage:"A2A writer ready.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:void 0,harness:"pydantic-ai",systemPrompt:"You are a concise writing specialist, reached by other agents over the A2A protocol. Given notes or findings, produce clear, well-structured prose. Keep it focused and free of filler. Answer with the text itself: no preamble, no questions back. You have no tools: work from the notes and instructions you are given.",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"a2a",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_A2A_AGENTSPEC_0_0_1={id:"example-a2a",version:"0.0.1",name:"Example A2A Agent",description:"Demonstrates delegation to separate agents over the A2A protocol. The orchestrator hands research and writing to a researcher and a writer that run as agents of their own — launched beside it on the local server, or on Datalayer runtimes when it runs in the cloud — and talks to them over A2A.",tags:["research","workflow","a2a"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"broadcast",emoji:"📡",color:"#7C3AED",suggestions:[{text:"Research three key facts about the A2A protocol through the researcher, then have the writer turn them into one short paragraph.",summary:"Research then write over A2A"},{text:"Have the researcher gather five source-backed notes on Jupyter kernels and report them to me as they are.",summary:"Research via the A2A researcher"},{text:"Have the writer draft a short guide to naming variables from these points: be specific, prefer words to abbreviations, keep units in the name.",summary:"Draft via the A2A writer"}],welcomeMessage:"A2A example agent ready. Ask me to delegate research and writing to the agents I reach over A2A.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:'You are the A2A Orchestrator. You do not research or write yourself: you split a request into specialist tasks and hand each to a separate agent reached over the A2A protocol, then synthesize their answers into one coherent reply.\nYour agents are `researcher` — facts, background, source-backed notes — and `writer` — clear, structured prose from notes or instructions. Reach them with `delegate_task`, naming the agent; a request to "research and write" is two delegations, the researcher\'s notes handed to the writer. Give each a task it can carry out without the rest of this conversation. The first delegation to an agent may take a moment while it is launched.\nAnswer in the conversation, and only with the tools you actually have; never call a tool you were not given.',systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:{includeGeneralPurpose:!1,subagents:[{name:"researcher",description:"A separate research agent, reached over A2A. Gathers facts and source-backed notes on a topic; use for research, fact-finding and background gathering.",ref:"example-a2a-researcher:0.0.1",a2a:{launch:"auto"}},{name:"writer",description:"A separate writing agent, reached over A2A. Turns notes into clear, well-structured prose; use for summaries, drafts and final write-ups.",ref:"example-a2a-writer:0.0.1",a2a:{launch:"auto"}}]}},EXAMPLE_A2UI_AGENT_SPEC_0_0_1={id:"example-a2ui-agent",version:"0.0.1",name:"A2UI Agent",description:"An AG-UI agent that generates interactive A2UI surfaces on demand. Describe a form, intake, configurator, survey or booking flow and the agent renders a validated, themeable A2UI surface you can fill in.",tags:["workflow","automation","analysis"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["example-render-a2ui-surface:0.0.1"]],frontendTools:[],frontendRenderTools:[{tool:"render_a2ui_surface",renderer:"a2ui-surface"}],environmentName:"ai-agents-env",icon:"browser",emoji:"🎛️",color:"#6366F1",suggestions:[{text:"Build a support ticket intake form with category, priority and a description.",summary:"Support ticket form"},{text:"Create a trip booking form with destination, dates, travelers and budget.",summary:"Trip booking form"},{text:"Generate a customer feedback survey with a rating slider and comments.",summary:"Feedback survey"},{text:"Make a product configurator for a laptop with CPU, RAM and add-ons.",summary:"Laptop configurator"}],welcomeMessage:`Hi! I turn requests into interactive A2UI surfaces. Ask me to build a form, survey, configurator or booking flow and I'll render it live for you.
2422
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Pu=!0,Ou=!1,Mu;return{s:function(){$u=$u.call(Au)},n:function(){var Lu=$u.next();return Pu=Lu.done,Lu},e:function(Lu){Ou=!0,Mu=Lu},f:function(){try{!Pu&&$u.return!=null&&$u.return()}finally{if(Ou)throw Mu}}}}function _unsupportedIterableToArray$1(Au,lo){if(Au){if(typeof Au=="string")return _arrayLikeToArray$1(Au,lo);var $u=Object.prototype.toString.call(Au).slice(8,-1);if($u==="Object"&&Au.constructor&&($u=Au.constructor.name),$u==="Map"||$u==="Set")return Array.from(Au);if($u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($u))return _arrayLikeToArray$1(Au,lo)}}function _arrayLikeToArray$1(Au,lo){(lo==null||lo>Au.length)&&(lo=Au.length);for(var $u=0,Ru=new Array(lo);$u<lo;$u++)Ru[$u]=Au[$u];return Ru}function ownKeys$1(Au,lo){var $u=Object.keys(Au);if(Object.getOwnPropertySymbols){var Ru=Object.getOwnPropertySymbols(Au);lo&&(Ru=Ru.filter(function(Iu){return Object.getOwnPropertyDescriptor(Au,Iu).enumerable})),$u.push.apply($u,Ru)}return $u}function _objectSpread$1(Au){for(var lo=1;lo<arguments.length;lo++){var $u=arguments[lo]!=null?arguments[lo]:{};lo%2?ownKeys$1(Object($u),!0).forEach(function(Ru){_defineProperty$1(Au,Ru,$u[Ru])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Au,Object.getOwnPropertyDescriptors($u)):ownKeys$1(Object($u)).forEach(function(Ru){Object.defineProperty(Au,Ru,Object.getOwnPropertyDescriptor($u,Ru))})}return Au}function _defineProperty$1(Au,lo,$u){return lo=_toPropertyKey$6(lo),lo in Au?Object.defineProperty(Au,lo,{value:$u,enumerable:!0,configurable:!0,writable:!0}):Au[lo]=$u,Au}function _classCallCheck$6(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$6(Ru.key),Ru)}}function _createClass$6(Au,lo,$u){return lo&&_defineProperties$6(Au.prototype,lo),$u&&_defineProperties$6(Au,$u),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$6(Au){var lo=_toPrimitive$6(Au,"string");return _typeof$6(lo)=="symbol"?lo:lo+""}function _toPrimitive$6(Au,lo){if(_typeof$6(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$6(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var PROTOCOL_TUS_V1="tus-v1",PROTOCOL_IETF_DRAFT_03="ietf-draft-03",PROTOCOL_IETF_DRAFT_05="ietf-draft-05",defaultOptions$2={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:defaultOnShouldRetry,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:PROTOCOL_TUS_V1},BaseUpload=(function(){function Au(lo,$u){_classCallCheck$6(this,Au),"resume"in $u&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=$u,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=lo,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return _createClass$6(Au,[{key:"findPreviousUploads",value:function(){var $u=this;return this.options.fingerprint(this.file,this.options).then(function(Ru){return $u._urlStorage.findUploadsByFingerprint(Ru)})}},{key:"resumeFromPreviousUpload",value:function($u){this.url=$u.uploadUrl||null,this._parallelUploadUrls=$u.parallelUploadUrls||null,this._urlStorageKey=$u.urlStorageKey}},{key:"start",value:function(){var $u=this,Ru=this.file;if(!Ru){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(![PROTOCOL_TUS_V1,PROTOCOL_IETF_DRAFT_03,PROTOCOL_IETF_DRAFT_05].includes(this.options.protocol)){this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var Iu=this.options.retryDelays;if(Iu!=null&&Object.prototype.toString.call(Iu)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var Pu=0,Ou=["uploadUrl","uploadSize","uploadLengthDeferred"];Pu<Ou.length;Pu++){var Mu=Ou[Pu];if(this.options[Mu]){this._emitError(new Error("tus: cannot use the ".concat(Mu," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(Ru,this.options).then(function(Du){return $u._fingerprint=Du,$u._source?$u._source:$u.options.fileReader.openFile(Ru,$u.options.chunkSize)}).then(function(Du){if($u._source=Du,$u.options.uploadLengthDeferred)$u._size=null;else if($u.options.uploadSize!=null){if($u._size=Number($u.options.uploadSize),Number.isNaN($u._size)){$u._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if($u._size=$u._source.size,$u._size==null){$u._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}$u.options.parallelUploads>1||$u._parallelUploadUrls!=null?$u._startParallelUpload():$u._startSingleUpload()}).catch(function(Du){$u._emitError(Du)})}},{key:"_startParallelUpload",value:function(){var $u,Ru=this,Iu=this._size,Pu=0;this._parallelUploads=[];var Ou=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,Mu=($u=this.options.parallelUploadBoundaries)!==null&&$u!==void 0?$u:splitSizeIntoParts(this._source.size,Ou);this._parallelUploadUrls&&Mu.forEach(function(Bu,ju){Bu.uploadUrl=Ru._parallelUploadUrls[ju]||null}),this._parallelUploadUrls=new Array(Mu.length);var Du=Mu.map(function(Bu,ju){var Fu=0;return Ru._source.slice(Bu.start,Bu.end).then(function(zu){var Uu=zu.value;return new Promise(function(Hu,Vu){var Gu=_objectSpread$1(_objectSpread$1({},Ru.options),{},{uploadUrl:Bu.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:Ru.options.metadataForPartialUploads,headers:_objectSpread$1(_objectSpread$1({},Ru.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:Hu,onError:Vu,onProgress:function(Ju){Pu=Pu-Fu+Ju,Fu=Ju,Ru._emitProgress(Pu,Iu)},onUploadUrlAvailable:function(){Ru._parallelUploadUrls[ju]=Wu.url,Ru._parallelUploadUrls.filter(function(Ju){return!!Ju}).length===Mu.length&&Ru._saveUploadInUrlStorage()}}),Wu=new Au(Uu,Gu);Wu.start(),Ru._parallelUploads.push(Wu)})})}),Lu;Promise.all(Du).then(function(){Lu=Ru._openRequest("POST",Ru.options.endpoint),Lu.setHeader("Upload-Concat","final;".concat(Ru._parallelUploadUrls.join(" ")));var Bu=encodeMetadata(Ru.options.metadata);return Bu!==""&&Lu.setHeader("Upload-Metadata",Bu),Ru._sendRequest(Lu,null)}).then(function(Bu){if(!inStatusCategory(Bu.getStatus(),200)){Ru._emitHttpError(Lu,Bu,"tus: unexpected response while creating upload");return}var ju=Bu.getHeader("Location");if(ju==null){Ru._emitHttpError(Lu,Bu,"tus: invalid or missing Location header");return}Ru.url=resolveUrl(Ru.options.endpoint,ju),"Created upload at ".concat(Ru.url),Ru._emitSuccess(Bu)}).catch(function(Bu){Ru._emitError(Bu)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){"Resuming upload from previous URL: ".concat(this.url),this._resumeUpload();return}if(this.options.uploadUrl!=null){"Resuming upload from provided URL: ".concat(this.options.uploadUrl),this.url=this.options.uploadUrl,this._resumeUpload();return}this._createUpload()}},{key:"abort",value:function($u){var Ru=this;if(this._parallelUploads!=null){var Iu=_createForOfIteratorHelper(this._parallelUploads),Pu;try{for(Iu.s();!(Pu=Iu.n()).done;){var Ou=Pu.value;Ou.abort($u)}}catch(Mu){Iu.e(Mu)}finally{Iu.f()}}return this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!$u||this.url==null?Promise.resolve():Au.terminate(this.url,this.options).then(function(){return Ru._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function($u,Ru,Iu,Pu){this._emitError(new DetailedError(Iu,Pu,$u,Ru))}},{key:"_emitError",value:function($u){var Ru=this;if(!this._aborted){if(this.options.retryDelays!=null){var Iu=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(Iu&&(this._retryAttempt=0),shouldRetry($u,this._retryAttempt,this.options)){var Pu=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){Ru.start()},Pu);return}}if(typeof this.options.onError=="function")this.options.onError($u);else throw $u}}},{key:"_emitSuccess",value:function($u){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess({lastResponse:$u})}},{key:"_emitProgress",value:function($u,Ru){typeof this.options.onProgress=="function"&&this.options.onProgress($u,Ru)}},{key:"_emitChunkComplete",value:function($u,Ru,Iu){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete($u,Ru,Iu)}},{key:"_createUpload",value:function(){var $u=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var Ru=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?Ru.setHeader("Upload-Defer-Length","1"):Ru.setHeader("Upload-Length","".concat(this._size));var Iu=encodeMetadata(this.options.metadata);Iu!==""&&Ru.setHeader("Upload-Metadata",Iu);var Pu;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,Pu=this._addChunkToRequest(Ru)):((this.options.protocol===PROTOCOL_IETF_DRAFT_03||this.options.protocol===PROTOCOL_IETF_DRAFT_05)&&Ru.setHeader("Upload-Complete","?0"),Pu=this._sendRequest(Ru,null)),Pu.then(function(Ou){if(!inStatusCategory(Ou.getStatus(),200)){$u._emitHttpError(Ru,Ou,"tus: unexpected response while creating upload");return}var Mu=Ou.getHeader("Location");if(Mu==null){$u._emitHttpError(Ru,Ou,"tus: invalid or missing Location header");return}if($u.url=resolveUrl($u.options.endpoint,Mu),"Created upload at ".concat($u.url),typeof $u.options.onUploadUrlAvailable=="function"&&$u.options.onUploadUrlAvailable(),$u._size===0){$u._emitSuccess(Ou),$u._source.close();return}$u._saveUploadInUrlStorage().then(function(){$u.options.uploadDataDuringCreation?$u._handleUploadResponse(Ru,Ou):($u._offset=0,$u._performUpload())})}).catch(function(Ou){$u._emitHttpError(Ru,null,"tus: failed to create upload",Ou)})}},{key:"_resumeUpload",value:function(){var $u=this,Ru=this._openRequest("HEAD",this.url),Iu=this._sendRequest(Ru,null);Iu.then(function(Pu){var Ou=Pu.getStatus();if(!inStatusCategory(Ou,200)){if(Ou===423){$u._emitHttpError(Ru,Pu,"tus: upload is currently locked; retry later");return}if(inStatusCategory(Ou,400)&&$u._removeFromUrlStorage(),!$u.options.endpoint){$u._emitHttpError(Ru,Pu,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}$u.url=null,$u._createUpload();return}var Mu=Number.parseInt(Pu.getHeader("Upload-Offset"),10);if(Number.isNaN(Mu)){$u._emitHttpError(Ru,Pu,"tus: invalid or missing offset value");return}var Du=Number.parseInt(Pu.getHeader("Upload-Length"),10);if(Number.isNaN(Du)&&!$u.options.uploadLengthDeferred&&$u.options.protocol===PROTOCOL_TUS_V1){$u._emitHttpError(Ru,Pu,"tus: invalid or missing length value");return}typeof $u.options.onUploadUrlAvailable=="function"&&$u.options.onUploadUrlAvailable(),$u._saveUploadInUrlStorage().then(function(){if(Mu===Du){$u._emitProgress(Du,Du),$u._emitSuccess(Pu);return}$u._offset=Mu,$u._performUpload()})}).catch(function(Pu){$u._emitHttpError(Ru,null,"tus: failed to resume upload",Pu)})}},{key:"_performUpload",value:function(){var $u=this;if(!this._aborted){var Ru;this.options.overridePatchMethod?(Ru=this._openRequest("POST",this.url),Ru.setHeader("X-HTTP-Method-Override","PATCH")):Ru=this._openRequest("PATCH",this.url),Ru.setHeader("Upload-Offset","".concat(this._offset));var Iu=this._addChunkToRequest(Ru);Iu.then(function(Pu){if(!inStatusCategory(Pu.getStatus(),200)){$u._emitHttpError(Ru,Pu,"tus: unexpected response while uploading chunk");return}$u._handleUploadResponse(Ru,Pu)}).catch(function(Pu){$u._aborted||$u._emitHttpError(Ru,null,"tus: failed to upload chunk at offset ".concat($u._offset),Pu)})}}},{key:"_addChunkToRequest",value:function($u){var Ru=this,Iu=this._offset,Pu=this._offset+this.options.chunkSize;return $u.setProgressHandler(function(Ou){Ru._emitProgress(Iu+Ou,Ru._size)}),this.options.protocol===PROTOCOL_TUS_V1?$u.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===PROTOCOL_IETF_DRAFT_05&&$u.setHeader("Content-Type","application/partial-upload"),(Pu===Number.POSITIVE_INFINITY||Pu>this._size)&&!this.options.uploadLengthDeferred&&(Pu=this._size),this._source.slice(Iu,Pu).then(function(Ou){var Mu=Ou.value,Du=Ou.done,Lu=Mu!=null&&Mu.size?Mu.size:0;Ru.options.uploadLengthDeferred&&Du&&(Ru._size=Ru._offset+Lu,$u.setHeader("Upload-Length","".concat(Ru._size)));var Bu=Ru._offset+Lu;return!Ru.options.uploadLengthDeferred&&Du&&Bu!==Ru._size?Promise.reject(new Error("upload was configured with a size of ".concat(Ru._size," bytes, but the source is done after ").concat(Bu," bytes"))):Mu===null?Ru._sendRequest($u):((Ru.options.protocol===PROTOCOL_IETF_DRAFT_03||Ru.options.protocol===PROTOCOL_IETF_DRAFT_05)&&$u.setHeader("Upload-Complete",Du?"?1":"?0"),Ru._emitProgress(Ru._offset,Ru._size),Ru._sendRequest($u,Mu))})}},{key:"_handleUploadResponse",value:function($u,Ru){var Iu=Number.parseInt(Ru.getHeader("Upload-Offset"),10);if(Number.isNaN(Iu)){this._emitHttpError($u,Ru,"tus: invalid or missing offset value");return}if(this._emitProgress(Iu,this._size),this._emitChunkComplete(Iu-this._offset,Iu,this._size),this._offset=Iu,Iu===this._size){this._emitSuccess(Ru),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function($u,Ru){var Iu=openRequest($u,Ru,this.options);return this._req=Iu,Iu}},{key:"_removeFromUrlStorage",value:function(){var $u=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(Ru){$u._emitError(Ru)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var $u=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var Ru={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?Ru.parallelUploadUrls=this._parallelUploadUrls:Ru.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,Ru).then(function(Iu){$u._urlStorageKey=Iu})}},{key:"_sendRequest",value:function($u){var Ru=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return sendRequest($u,Ru,this.options)}}],[{key:"terminate",value:function($u){var Ru=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Iu=openRequest("DELETE",$u,Ru);return sendRequest(Iu,null,Ru).then(function(Pu){if(Pu.getStatus()!==204)throw new DetailedError("tus: unexpected response while terminating upload",null,Iu,Pu)}).catch(function(Pu){if(Pu instanceof DetailedError||(Pu=new DetailedError("tus: failed to terminate upload",Pu,Iu,null)),!shouldRetry(Pu,0,Ru))throw Pu;var Ou=Ru.retryDelays[0],Mu=Ru.retryDelays.slice(1),Du=_objectSpread$1(_objectSpread$1({},Ru),{},{retryDelays:Mu});return new Promise(function(Lu){return setTimeout(Lu,Ou)}).then(function(){return Au.terminate($u,Du)})})}}])})();function encodeMetadata(Au){return Object.entries(Au).map(function(lo){var $u=_slicedToArray$1(lo,2),Ru=$u[0],Iu=$u[1];return"".concat(Ru," ").concat(gBase64.encode(String(Iu)))}).join(",")}function inStatusCategory(Au,lo){return Au>=lo&&Au<lo+100}function openRequest(Au,lo,$u){var Ru=$u.httpStack.createRequest(Au,lo);$u.protocol===PROTOCOL_IETF_DRAFT_03?Ru.setHeader("Upload-Draft-Interop-Version","5"):$u.protocol===PROTOCOL_IETF_DRAFT_05?Ru.setHeader("Upload-Draft-Interop-Version","6"):Ru.setHeader("Tus-Resumable","1.0.0");for(var Iu=$u.headers||{},Pu=0,Ou=Object.entries(Iu);Pu<Ou.length;Pu++){var Mu=_slicedToArray$1(Ou[Pu],2),Du=Mu[0],Lu=Mu[1];Ru.setHeader(Du,Lu)}if($u.addRequestId){var Bu=uuid();Ru.setHeader("X-Request-ID",Bu)}return Ru}function sendRequest(Au,lo,$u){return _sendRequest2.apply(this,arguments)}function _sendRequest2(){return _sendRequest2=_asyncToGenerator$1(_regeneratorRuntime$1().mark(function Au(lo,$u,Ru){var Iu;return _regeneratorRuntime$1().wrap(function(Ou){for(;;)switch(Ou.prev=Ou.next){case 0:if(typeof Ru.onBeforeRequest!="function"){Ou.next=3;break}return Ou.next=3,Ru.onBeforeRequest(lo);case 3:return Ou.next=5,lo.send($u);case 5:if(Iu=Ou.sent,typeof Ru.onAfterResponse!="function"){Ou.next=9;break}return Ou.next=9,Ru.onAfterResponse(lo,Iu);case 9:return Ou.abrupt("return",Iu);case 10:case"end":return Ou.stop()}},Au)})),_sendRequest2.apply(this,arguments)}function isOnline(){var Au=!0;return typeof navigator<"u"&&navigator.onLine===!1&&(Au=!1),Au}function shouldRetry(Au,lo,$u){return $u.retryDelays==null||lo>=$u.retryDelays.length||Au.originalRequest==null?!1:$u&&typeof $u.onShouldRetry=="function"?$u.onShouldRetry(Au,lo,$u):defaultOnShouldRetry(Au)}function defaultOnShouldRetry(Au){var lo=Au.originalResponse?Au.originalResponse.getStatus():0;return(!inStatusCategory(lo,400)||lo===409||lo===423)&&isOnline()}function resolveUrl(Au,lo){return new URL$1(lo,Au).toString()}function splitSizeIntoParts(Au,lo){for(var $u=Math.floor(Au/lo),Ru=[],Iu=0;Iu<lo;Iu++)Ru.push({start:$u*Iu,end:$u*(Iu+1)});return Ru[lo-1].end=Au,Ru}BaseUpload.defaultOptions=defaultOptions$2;var isReactNative=function Au(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function uriToBlob(Au){return new Promise(function(lo,$u){var Ru=new XMLHttpRequest;Ru.responseType="blob",Ru.onload=function(){var Iu=Ru.response;lo(Iu)},Ru.onerror=function(Iu){$u(Iu)},Ru.open("GET",Au),Ru.send()})}var isCordova=function Au(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")};function readAsByteArray(Au){return new Promise(function(lo,$u){var Ru=new FileReader;Ru.onload=function(){var Iu=new Uint8Array(Ru.result);lo({value:Iu})},Ru.onerror=function(Iu){$u(Iu)},Ru.readAsArrayBuffer(Au)})}function _typeof$5(Au){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$5(Au)}function _classCallCheck$5(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$5(Ru.key),Ru)}}function _createClass$5(Au,lo,$u){return lo&&_defineProperties$5(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$5(Au){var lo=_toPrimitive$5(Au,"string");return _typeof$5(lo)=="symbol"?lo:lo+""}function _toPrimitive$5(Au,lo){if(_typeof$5(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$5(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var FileSource=(function(){function Au(lo){_classCallCheck$5(this,Au),this._file=lo,this.size=lo.size}return _createClass$5(Au,[{key:"slice",value:function($u,Ru){if(isCordova())return readAsByteArray(this._file.slice($u,Ru));var Iu=this._file.slice($u,Ru),Pu=Ru>=this.size;return Promise.resolve({value:Iu,done:Pu})}},{key:"close",value:function(){}}])})();function _typeof$4(Au){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$4(Au)}function _classCallCheck$4(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$4(Ru.key),Ru)}}function _createClass$4(Au,lo,$u){return lo&&_defineProperties$4(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$4(Au){var lo=_toPrimitive$4(Au,"string");return _typeof$4(lo)=="symbol"?lo:lo+""}function _toPrimitive$4(Au,lo){if(_typeof$4(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$4(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}function len(Au){return Au===void 0?0:Au.size!==void 0?Au.size:Au.length}function concat(Au,lo){if(Au.concat)return Au.concat(lo);if(Au instanceof Blob)return new Blob([Au,lo],{type:Au.type});if(Au.set){var $u=new Au.constructor(Au.length+lo.length);return $u.set(Au),$u.set(lo,Au.length),$u}throw new Error("Unknown data type")}var StreamSource=(function(){function Au(lo){_classCallCheck$4(this,Au),this._buffer=void 0,this._bufferOffset=0,this._reader=lo,this._done=!1}return _createClass$4(Au,[{key:"slice",value:function($u,Ru){return $u<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone($u,Ru)}},{key:"_readUntilEnoughDataOrDone",value:function($u,Ru){var Iu=this,Pu=Ru<=this._bufferOffset+len(this._buffer);if(this._done||Pu){var Ou=this._getDataFromBuffer($u,Ru),Mu=Ou==null?this._done:!1;return Promise.resolve({value:Ou,done:Mu})}return this._reader.read().then(function(Du){var Lu=Du.value,Bu=Du.done;return Bu?Iu._done=!0:Iu._buffer===void 0?Iu._buffer=Lu:Iu._buffer=concat(Iu._buffer,Lu),Iu._readUntilEnoughDataOrDone($u,Ru)})}},{key:"_getDataFromBuffer",value:function($u,Ru){$u>this._bufferOffset&&(this._buffer=this._buffer.slice($u-this._bufferOffset),this._bufferOffset=$u);var Iu=len(this._buffer)===0;return this._done&&Iu?null:this._buffer.slice(0,Ru-$u)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])})();function _typeof$3(Au){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$3(Au)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return lo};var Au,lo={},$u=Object.prototype,Ru=$u.hasOwnProperty,Iu=Object.defineProperty||function(_d,bd,wd){_d[bd]=wd.value},Pu=typeof Symbol=="function"?Symbol:{},Ou=Pu.iterator||"@@iterator",Mu=Pu.asyncIterator||"@@asyncIterator",Du=Pu.toStringTag||"@@toStringTag";function Lu(_d,bd,wd){return Object.defineProperty(_d,bd,{value:wd,enumerable:!0,configurable:!0,writable:!0}),_d[bd]}try{Lu({},"")}catch{Lu=function(wd,Ad,gd){return wd[Ad]=gd}}function Bu(_d,bd,wd,Ad){var gd=bd&&bd.prototype instanceof Gu?bd:Gu,dd=Object.create(gd.prototype),yd=new vd(Ad||[]);return Iu(dd,"_invoke",{value:od(_d,wd,yd)}),dd}function ju(_d,bd,wd){try{return{type:"normal",arg:_d.call(bd,wd)}}catch(Ad){return{type:"throw",arg:Ad}}}lo.wrap=Bu;var Fu="suspendedStart",zu="suspendedYield",Uu="executing",Hu="completed",Vu={};function Gu(){}function Wu(){}function Zu(){}var Ju={};Lu(Ju,Ou,function(){return this});var Yu=Object.getPrototypeOf,Xu=Yu&&Yu(Yu(Sd([])));Xu&&Xu!==$u&&Ru.call(Xu,Ou)&&(Ju=Xu);var ed=Zu.prototype=Gu.prototype=Object.create(Ju);function td(_d){["next","throw","return"].forEach(function(bd){Lu(_d,bd,function(wd){return this._invoke(bd,wd)})})}function nd(_d,bd){function wd(gd,dd,yd,ld){var ud=ju(_d[gd],_d,dd);if(ud.type!=="throw"){var hd=ud.arg,md=hd.value;return md&&_typeof$3(md)=="object"&&Ru.call(md,"__await")?bd.resolve(md.__await).then(function(Ed){wd("next",Ed,yd,ld)},function(Ed){wd("throw",Ed,yd,ld)}):bd.resolve(md).then(function(Ed){hd.value=Ed,yd(hd)},function(Ed){return wd("throw",Ed,yd,ld)})}ld(ud.arg)}var Ad;Iu(this,"_invoke",{value:function(dd,yd){function ld(){return new bd(function(ud,hd){wd(dd,yd,ud,hd)})}return Ad=Ad?Ad.then(ld,ld):ld()}})}function od(_d,bd,wd){var Ad=Fu;return function(gd,dd){if(Ad===Uu)throw Error("Generator is already running");if(Ad===Hu){if(gd==="throw")throw dd;return{value:Au,done:!0}}for(wd.method=gd,wd.arg=dd;;){var yd=wd.delegate;if(yd){var ld=sd(yd,wd);if(ld){if(ld===Vu)continue;return ld}}if(wd.method==="next")wd.sent=wd._sent=wd.arg;else if(wd.method==="throw"){if(Ad===Fu)throw Ad=Hu,wd.arg;wd.dispatchException(wd.arg)}else wd.method==="return"&&wd.abrupt("return",wd.arg);Ad=Uu;var ud=ju(_d,bd,wd);if(ud.type==="normal"){if(Ad=wd.done?Hu:zu,ud.arg===Vu)continue;return{value:ud.arg,done:wd.done}}ud.type==="throw"&&(Ad=Hu,wd.method="throw",wd.arg=ud.arg)}}}function sd(_d,bd){var wd=bd.method,Ad=_d.iterator[wd];if(Ad===Au)return bd.delegate=null,wd==="throw"&&_d.iterator.return&&(bd.method="return",bd.arg=Au,sd(_d,bd),bd.method==="throw")||wd!=="return"&&(bd.method="throw",bd.arg=new TypeError("The iterator does not provide a '"+wd+"' method")),Vu;var gd=ju(Ad,_d.iterator,bd.arg);if(gd.type==="throw")return bd.method="throw",bd.arg=gd.arg,bd.delegate=null,Vu;var dd=gd.arg;return dd?dd.done?(bd[_d.resultName]=dd.value,bd.next=_d.nextLoc,bd.method!=="return"&&(bd.method="next",bd.arg=Au),bd.delegate=null,Vu):dd:(bd.method="throw",bd.arg=new TypeError("iterator result is not an object"),bd.delegate=null,Vu)}function ad(_d){var bd={tryLoc:_d[0]};1 in _d&&(bd.catchLoc=_d[1]),2 in _d&&(bd.finallyLoc=_d[2],bd.afterLoc=_d[3]),this.tryEntries.push(bd)}function pd(_d){var bd=_d.completion||{};bd.type="normal",delete bd.arg,_d.completion=bd}function vd(_d){this.tryEntries=[{tryLoc:"root"}],_d.forEach(ad,this),this.reset(!0)}function Sd(_d){if(_d||_d===""){var bd=_d[Ou];if(bd)return bd.call(_d);if(typeof _d.next=="function")return _d;if(!isNaN(_d.length)){var wd=-1,Ad=function gd(){for(;++wd<_d.length;)if(Ru.call(_d,wd))return gd.value=_d[wd],gd.done=!1,gd;return gd.value=Au,gd.done=!0,gd};return Ad.next=Ad}}throw new TypeError(_typeof$3(_d)+" is not iterable")}return Wu.prototype=Zu,Iu(ed,"constructor",{value:Zu,configurable:!0}),Iu(Zu,"constructor",{value:Wu,configurable:!0}),Wu.displayName=Lu(Zu,Du,"GeneratorFunction"),lo.isGeneratorFunction=function(_d){var bd=typeof _d=="function"&&_d.constructor;return!!bd&&(bd===Wu||(bd.displayName||bd.name)==="GeneratorFunction")},lo.mark=function(_d){return Object.setPrototypeOf?Object.setPrototypeOf(_d,Zu):(_d.__proto__=Zu,Lu(_d,Du,"GeneratorFunction")),_d.prototype=Object.create(ed),_d},lo.awrap=function(_d){return{__await:_d}},td(nd.prototype),Lu(nd.prototype,Mu,function(){return this}),lo.AsyncIterator=nd,lo.async=function(_d,bd,wd,Ad,gd){gd===void 0&&(gd=Promise);var dd=new nd(Bu(_d,bd,wd,Ad),gd);return lo.isGeneratorFunction(bd)?dd:dd.next().then(function(yd){return yd.done?yd.value:dd.next()})},td(ed),Lu(ed,Du,"Generator"),Lu(ed,Ou,function(){return this}),Lu(ed,"toString",function(){return"[object Generator]"}),lo.keys=function(_d){var bd=Object(_d),wd=[];for(var Ad in bd)wd.push(Ad);return wd.reverse(),function gd(){for(;wd.length;){var dd=wd.pop();if(dd in bd)return gd.value=dd,gd.done=!1,gd}return gd.done=!0,gd}},lo.values=Sd,vd.prototype={constructor:vd,reset:function(bd){if(this.prev=0,this.next=0,this.sent=this._sent=Au,this.done=!1,this.delegate=null,this.method="next",this.arg=Au,this.tryEntries.forEach(pd),!bd)for(var wd in this)wd.charAt(0)==="t"&&Ru.call(this,wd)&&!isNaN(+wd.slice(1))&&(this[wd]=Au)},stop:function(){this.done=!0;var bd=this.tryEntries[0].completion;if(bd.type==="throw")throw bd.arg;return this.rval},dispatchException:function(bd){if(this.done)throw bd;var wd=this;function Ad(hd,md){return yd.type="throw",yd.arg=bd,wd.next=hd,md&&(wd.method="next",wd.arg=Au),!!md}for(var gd=this.tryEntries.length-1;gd>=0;--gd){var dd=this.tryEntries[gd],yd=dd.completion;if(dd.tryLoc==="root")return Ad("end");if(dd.tryLoc<=this.prev){var ld=Ru.call(dd,"catchLoc"),ud=Ru.call(dd,"finallyLoc");if(ld&&ud){if(this.prev<dd.catchLoc)return Ad(dd.catchLoc,!0);if(this.prev<dd.finallyLoc)return Ad(dd.finallyLoc)}else if(ld){if(this.prev<dd.catchLoc)return Ad(dd.catchLoc,!0)}else{if(!ud)throw Error("try statement without catch or finally");if(this.prev<dd.finallyLoc)return Ad(dd.finallyLoc)}}}},abrupt:function(bd,wd){for(var Ad=this.tryEntries.length-1;Ad>=0;--Ad){var gd=this.tryEntries[Ad];if(gd.tryLoc<=this.prev&&Ru.call(gd,"finallyLoc")&&this.prev<gd.finallyLoc){var dd=gd;break}}dd&&(bd==="break"||bd==="continue")&&dd.tryLoc<=wd&&wd<=dd.finallyLoc&&(dd=null);var yd=dd?dd.completion:{};return yd.type=bd,yd.arg=wd,dd?(this.method="next",this.next=dd.finallyLoc,Vu):this.complete(yd)},complete:function(bd,wd){if(bd.type==="throw")throw bd.arg;return bd.type==="break"||bd.type==="continue"?this.next=bd.arg:bd.type==="return"?(this.rval=this.arg=bd.arg,this.method="return",this.next="end"):bd.type==="normal"&&wd&&(this.next=wd),Vu},finish:function(bd){for(var wd=this.tryEntries.length-1;wd>=0;--wd){var Ad=this.tryEntries[wd];if(Ad.finallyLoc===bd)return this.complete(Ad.completion,Ad.afterLoc),pd(Ad),Vu}},catch:function(bd){for(var wd=this.tryEntries.length-1;wd>=0;--wd){var Ad=this.tryEntries[wd];if(Ad.tryLoc===bd){var gd=Ad.completion;if(gd.type==="throw"){var dd=gd.arg;pd(Ad)}return dd}}throw Error("illegal catch attempt")},delegateYield:function(bd,wd,Ad){return this.delegate={iterator:Sd(bd),resultName:wd,nextLoc:Ad},this.method==="next"&&(this.arg=Au),Vu}},lo}function asyncGeneratorStep(Au,lo,$u,Ru,Iu,Pu,Ou){try{var Mu=Au[Pu](Ou),Du=Mu.value}catch(Lu){$u(Lu);return}Mu.done?lo(Du):Promise.resolve(Du).then(Ru,Iu)}function _asyncToGenerator(Au){return function(){var lo=this,$u=arguments;return new Promise(function(Ru,Iu){var Pu=Au.apply(lo,$u);function Ou(Du){asyncGeneratorStep(Pu,Ru,Iu,Ou,Mu,"next",Du)}function Mu(Du){asyncGeneratorStep(Pu,Ru,Iu,Ou,Mu,"throw",Du)}Ou(void 0)})}}function _classCallCheck$3(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$3(Ru.key),Ru)}}function _createClass$3(Au,lo,$u){return lo&&_defineProperties$3(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$3(Au){var lo=_toPrimitive$3(Au,"string");return _typeof$3(lo)=="symbol"?lo:lo+""}function _toPrimitive$3(Au,lo){if(_typeof$3(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$3(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var FileReader$1=(function(){function Au(){_classCallCheck$3(this,Au)}return _createClass$3(Au,[{key:"openFile",value:(function(){var lo=_asyncToGenerator(_regeneratorRuntime().mark(function Ru(Iu,Pu){var Ou;return _regeneratorRuntime().wrap(function(Du){for(;;)switch(Du.prev=Du.next){case 0:if(!(isReactNative()&&Iu&&typeof Iu.uri<"u")){Du.next=11;break}return Du.prev=1,Du.next=4,uriToBlob(Iu.uri);case 4:return Ou=Du.sent,Du.abrupt("return",new FileSource(Ou));case 8:throw Du.prev=8,Du.t0=Du.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(Du.t0));case 11:if(!(typeof Iu.slice=="function"&&typeof Iu.size<"u")){Du.next=13;break}return Du.abrupt("return",Promise.resolve(new FileSource(Iu)));case 13:if(typeof Iu.read!="function"){Du.next=18;break}if(Pu=Number(Pu),Number.isFinite(Pu)){Du.next=17;break}return Du.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return Du.abrupt("return",Promise.resolve(new StreamSource(Iu,Pu)));case 18:return Du.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return Du.stop()}},Ru,null,[[1,8]])}));function $u(Ru,Iu){return lo.apply(this,arguments)}return $u})()}])})();function fingerprint(Au,lo){return isReactNative()?Promise.resolve(reactNativeFingerprint(Au,lo)):Promise.resolve(["tus-br",Au.name,Au.type,Au.size,Au.lastModified,lo.endpoint].join("-"))}function reactNativeFingerprint(Au,lo){var $u=Au.exif?hashCode(JSON.stringify(Au.exif)):"noexif";return["tus-rn",Au.name||"noname",Au.size||"nosize",$u,lo.endpoint].join("/")}function hashCode(Au){var lo=0;if(Au.length===0)return lo;for(var $u=0;$u<Au.length;$u++){var Ru=Au.charCodeAt($u);lo=(lo<<5)-lo+Ru,lo&=lo}return lo}function _typeof$2(Au){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$2(Au)}function _classCallCheck$2(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$2(Ru.key),Ru)}}function _createClass$2(Au,lo,$u){return lo&&_defineProperties$2(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$2(Au){var lo=_toPrimitive$2(Au,"string");return _typeof$2(lo)=="symbol"?lo:lo+""}function _toPrimitive$2(Au,lo){if(_typeof$2(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$2(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var XHRHttpStack=(function(){function Au(){_classCallCheck$2(this,Au)}return _createClass$2(Au,[{key:"createRequest",value:function($u,Ru){return new Request$1($u,Ru)}},{key:"getName",value:function(){return"XHRHttpStack"}}])})(),Request$1=(function(){function Au(lo,$u){_classCallCheck$2(this,Au),this._xhr=new XMLHttpRequest,this._xhr.open(lo,$u,!0),this._method=lo,this._url=$u,this._headers={}}return _createClass$2(Au,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function($u,Ru){this._xhr.setRequestHeader($u,Ru),this._headers[$u]=Ru}},{key:"getHeader",value:function($u){return this._headers[$u]}},{key:"setProgressHandler",value:function($u){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(Ru){Ru.lengthComputable&&$u(Ru.loaded)})}},{key:"send",value:function(){var $u=this,Ru=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(Iu,Pu){$u._xhr.onload=function(){Iu(new Response$1($u._xhr))},$u._xhr.onerror=function(Ou){Pu(Ou)},$u._xhr.send(Ru)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])})(),Response$1=(function(){function Au(lo){_classCallCheck$2(this,Au),this._xhr=lo}return _createClass$2(Au,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function($u){return this._xhr.getResponseHeader($u)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])})();function _typeof$1(Au){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof$1(Au)}function _classCallCheck$1(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey$1(Ru.key),Ru)}}function _createClass$1(Au,lo,$u){return lo&&_defineProperties$1(Au.prototype,lo),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _toPropertyKey$1(Au){var lo=_toPrimitive$1(Au,"string");return _typeof$1(lo)=="symbol"?lo:lo+""}function _toPrimitive$1(Au,lo){if(_typeof$1(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof$1(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var hasStorage=!1;try{hasStorage="localStorage"in window;var key="tusSupport",originalValue=localStorage.getItem(key);localStorage.setItem(key,originalValue),originalValue===null&&localStorage.removeItem(key)}catch(Au){if(Au.code===Au.SECURITY_ERR||Au.code===Au.QUOTA_EXCEEDED_ERR)hasStorage=!1;else throw Au}var canStoreURLs=hasStorage,WebStorageUrlStorage=(function(){function Au(){_classCallCheck$1(this,Au)}return _createClass$1(Au,[{key:"findAllUploads",value:function(){var $u=this._findEntries("tus::");return Promise.resolve($u)}},{key:"findUploadsByFingerprint",value:function($u){var Ru=this._findEntries("tus::".concat($u,"::"));return Promise.resolve(Ru)}},{key:"removeUpload",value:function($u){return localStorage.removeItem($u),Promise.resolve()}},{key:"addUpload",value:function($u,Ru){var Iu=Math.round(Math.random()*1e12),Pu="tus::".concat($u,"::").concat(Iu);return localStorage.setItem(Pu,JSON.stringify(Ru)),Promise.resolve(Pu)}},{key:"_findEntries",value:function($u){for(var Ru=[],Iu=0;Iu<localStorage.length;Iu++){var Pu=localStorage.key(Iu);if(Pu.indexOf($u)===0)try{var Ou=JSON.parse(localStorage.getItem(Pu));Ou.urlStorageKey=Pu,Ru.push(Ou)}catch{}}return Ru}}])})();function _typeof(Au){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lo){return typeof lo}:function(lo){return lo&&typeof Symbol=="function"&&lo.constructor===Symbol&&lo!==Symbol.prototype?"symbol":typeof lo},_typeof(Au)}function _classCallCheck(Au,lo){if(!(Au instanceof lo))throw new TypeError("Cannot call a class as a function")}function _defineProperties(Au,lo){for(var $u=0;$u<lo.length;$u++){var Ru=lo[$u];Ru.enumerable=Ru.enumerable||!1,Ru.configurable=!0,"value"in Ru&&(Ru.writable=!0),Object.defineProperty(Au,_toPropertyKey(Ru.key),Ru)}}function _createClass(Au,lo,$u){return $u&&_defineProperties(Au,$u),Object.defineProperty(Au,"prototype",{writable:!1}),Au}function _callSuper(Au,lo,$u){return lo=_getPrototypeOf(lo),_possibleConstructorReturn(Au,_isNativeReflectConstruct()?Reflect.construct(lo,$u||[],_getPrototypeOf(Au).constructor):lo.apply(Au,$u))}function _possibleConstructorReturn(Au,lo){if(lo&&(_typeof(lo)==="object"||typeof lo=="function"))return lo;if(lo!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(Au)}function _assertThisInitialized(Au){if(Au===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Au}function _isNativeReflectConstruct(){try{var Au=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct=function(){return!!Au})()}function _getPrototypeOf(Au){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($u){return $u.__proto__||Object.getPrototypeOf($u)},_getPrototypeOf(Au)}function _inherits(Au,lo){if(typeof lo!="function"&&lo!==null)throw new TypeError("Super expression must either be null or a function");Au.prototype=Object.create(lo&&lo.prototype,{constructor:{value:Au,writable:!0,configurable:!0}}),Object.defineProperty(Au,"prototype",{writable:!1}),lo&&_setPrototypeOf(Au,lo)}function _setPrototypeOf(Au,lo){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ru,Iu){return Ru.__proto__=Iu,Ru},_setPrototypeOf(Au,lo)}function ownKeys(Au,lo){var $u=Object.keys(Au);if(Object.getOwnPropertySymbols){var Ru=Object.getOwnPropertySymbols(Au);lo&&(Ru=Ru.filter(function(Iu){return Object.getOwnPropertyDescriptor(Au,Iu).enumerable})),$u.push.apply($u,Ru)}return $u}function _objectSpread(Au){for(var lo=1;lo<arguments.length;lo++){var $u=arguments[lo]!=null?arguments[lo]:{};lo%2?ownKeys(Object($u),!0).forEach(function(Ru){_defineProperty(Au,Ru,$u[Ru])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Au,Object.getOwnPropertyDescriptors($u)):ownKeys(Object($u)).forEach(function(Ru){Object.defineProperty(Au,Ru,Object.getOwnPropertyDescriptor($u,Ru))})}return Au}function _defineProperty(Au,lo,$u){return lo=_toPropertyKey(lo),lo in Au?Object.defineProperty(Au,lo,{value:$u,enumerable:!0,configurable:!0,writable:!0}):Au[lo]=$u,Au}function _toPropertyKey(Au){var lo=_toPrimitive(Au,"string");return _typeof(lo)=="symbol"?lo:lo+""}function _toPrimitive(Au,lo){if(_typeof(Au)!="object"||!Au)return Au;var $u=Au[Symbol.toPrimitive];if($u!==void 0){var Ru=$u.call(Au,lo);if(_typeof(Ru)!="object")return Ru;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Au)}var defaultOptions$1=_objectSpread(_objectSpread({},BaseUpload.defaultOptions),{},{httpStack:new XHRHttpStack,fileReader:new FileReader$1,urlStorage:canStoreURLs?new WebStorageUrlStorage:new NoopUrlStorage,fingerprint}),Upload=(function(Au){function lo(){var $u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Ru=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _classCallCheck(this,lo),Ru=_objectSpread(_objectSpread({},defaultOptions$1),Ru),_callSuper(this,lo,[$u,Ru])}return _inherits(lo,Au),_createClass(lo,null,[{key:"terminate",value:function(Ru){var Iu=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Iu=_objectSpread(_objectSpread({},defaultOptions$1),Iu),BaseUpload.terminate(Ru,Iu)}}])})(BaseUpload);const RUNTIMES_API_PREFIX="api/runtimes/v1";function join$1(Au,lo){return`${Au.replace(/\/+$/,"")}/${lo.replace(/^\/+/,"")}`}function runtimesUrl(Au){return join$1(Au,`${RUNTIMES_API_PREFIX}/runtimes`)}function runtimeUrl(Au,lo){return`${runtimesUrl(Au)}/${lo}`}function sandboxSnapshotsUrl(Au){return join$1(Au,`${RUNTIMES_API_PREFIX}/sandbox-snapshots`)}function sandboxSnapshotUrl(Au,lo){return`${sandboxSnapshotsUrl(Au)}/${lo}`}function asCodeSandboxSnapshot(Au){const{uid:lo,updated_at:$u,format_version:Ru,...Iu}=Au;return{...Iu,id:lo,updatedAt:new Date($u),formatVersion:Ru}}async function getEnvironments(){const Au=await requestDatalayerAPI({url:libExports$5.URLExt.join(runtimesStore.getState().runtimesUrl,"api/runtimes/v1/environments"),token:iamStore.getState().token});return Au.success?Au.environments??[]:(console.error("Failed to fetch available environments.",Au),[])}async function createRuntime(Au){const{externalToken:lo,token:$u}=iamStore.getState();if(typeof Au.creditsLimit!="number"||!Number.isFinite(Au.creditsLimit)||Au.creditsLimit<0)throw new Error(`Invalid runtime creditsLimit for environment ${Au.environmentName}. A number of zero or more is required.`);if(Au.deploymentUid&&!Au.appUid)throw new Error(`Deployment ${Au.deploymentUid} is named without its application: give appUid.`);if(Au.appUid&&!Au.appSpec)throw new Error(`Application ${Au.appUid} is launched without its Appspec: give appSpec, so its runtime is given the secrets its connections declare.`);const Ru={name:Au.environmentName};Au.environmentVersion!==void 0&&Au.environmentVersion!==""&&(Ru.version=Au.environmentVersion);const Iu={environment:Ru,type:Au.type??"notebook",given_name:Au.givenName,credits_limit:Au.creditsLimit};Au.capabilities&&(Iu.capabilities=Au.capabilities),Au.snapshot&&(Iu.from=Au.snapshot),Au.appUid&&(Iu.app_uid=Au.appUid),Au.deploymentUid&&(Iu.deployment_uid=Au.deploymentUid),Au.appSpec&&(Iu.app_spec=Au.appSpec);const Pu=await requestDatalayerAPI({url:runtimesUrl(runtimesStore.getState().runtimesUrl),method:"POST",body:Iu,token:$u,headers:lo?{"X-External-Token":lo}:void 0});if(!Pu.success||!Pu.runtime){const Ou=`Failed to create a kernel for the environment ${Au.environmentName}.`;throw console.error(Ou,Pu),new Error(Ou)}return Pu.runtime}async function getRuntimes(){const Au=await requestDatalayerAPI({url:runtimesUrl(runtimesStore.getState().runtimesUrl),token:iamStore.getState().token});if(!Au.success){const lo="Failed to list the running kernels.";throw console.error(lo,Au),new Error(lo)}return Au.runtimes??[]}async function getRuntimeRecord(Au){try{return(await requestDatalayerAPI({url:runtimeUrl(runtimesStore.getState().runtimesUrl,Au),token:iamStore.getState().token})).runtime??null}catch(lo){if(lo.response?.status===404)return null;throw lo}}async function deleteRuntime(Au){const lo=iamStore.getState().externalToken;await requestDatalayerAPI({url:runtimeUrl(runtimesStore.getState().runtimesUrl,Au.id)+libExports$5.URLExt.objectToQueryString(Au.reason?{reason:Au.reason}:{}),method:"DELETE",token:iamStore.getState().token,headers:lo?{"X-External-Token":lo}:void 0})}async function snapshotRuntime(Au){const lo=await requestDatalayerAPI({url:sandboxSnapshotsUrl(runtimesStore.getState().runtimesUrl),method:"POST",body:{runtime_name:Au.id,name:Au.name,description:Au.description,stop:Au.stop},token:iamStore.getState().token});if(!lo.success)throw new Error(`Failed to take the code sandbox snapshot ${Au.id} - ${lo}`);if(lo.snapshot)return asCodeSandboxSnapshot(lo.snapshot)}async function getSandboxSnapshots(){const Au=await requestDatalayerAPI({url:sandboxSnapshotsUrl(runtimesStore.getState().runtimesUrl),token:iamStore.getState().token});return Au.success?(Au.snapshots??[]).map(asCodeSandboxSnapshot):(console.error("Failed to fetch code sandbox snapshots.",Au),[])}async function loadSandboxSnapshot(Au){const lo=await requestDatalayerAPI({url:runtimeUrl(runtimesStore.getState().runtimesUrl,Au.id),method:"PUT",body:{from:Au.from},token:iamStore.getState().token});if(!lo.success)throw new Error(`Failed to load the code sandbox snapshot; ${lo.message}`)}function createSandboxSnapshotDownloadURL(Au){return sandboxSnapshotUrl(runtimesStore.getState().runtimesUrl,Au)+libExports$5.URLExt.objectToQueryString({download:"1",token:iamStore.getState().token??""})}function exportCodeSandboxSnapshot(Au){const lo=createSandboxSnapshotDownloadURL(Au),$u=document.createElement("a");$u.href=lo,$u.download="",document.body.appendChild($u),$u.click(),document.body.removeChild($u)}async function deleteCodeSandboxSnapshot(Au){await requestDatalayerAPI({url:sandboxSnapshotUrl(runtimesStore.getState().runtimesUrl,Au),method:"DELETE",token:iamStore.getState().token})}async function updateCodeSandboxSnapshot(Au,lo){(lo.name||lo.description)&&await requestDatalayerAPI({url:sandboxSnapshotUrl(runtimesStore.getState().runtimesUrl,Au),method:"PATCH",body:{...lo},token:iamStore.getState().token})}async function uploadCodeSandboxSnapshot(Au){if(Au.file.size===0)return Promise.reject("Empty Code Sandbox Snapshot.");const lo=new PromiseDelegate,$u=new Upload(Au.file,{endpoint:`${sandboxSnapshotsUrl(runtimesStore.getState().runtimesUrl)}/upload`,headers:{Authorization:`Bearer ${iamStore.getState().token}`},retryDelays:null,metadata:Au.metadata,onError:Iu=>{console.error(`Failed to upload ${Au.metadata.filename}.`,Iu),lo.reject(Iu)},onProgress:Au.onProgress,onSuccess:()=>{lo.resolve()}}),Ru=await $u.findPreviousUploads();return Ru.length&&$u.resumeFromPreviousUpload(Ru[0]),$u.start(),lo.promise}const actions=Object.freeze(Object.defineProperty({__proto__:null,createRuntime,createSandboxSnapshotDownloadURL,deleteCodeSandboxSnapshot,deleteRuntime,exportCodeSandboxSnapshot,getEnvironments,getRuntimeRecord,getRuntimes,getSandboxSnapshots,loadSandboxSnapshot,snapshotRuntime,updateCodeSandboxSnapshot,uploadCodeSandboxSnapshot},Symbol.toStringTag,{value:"Module"})),CLAUDE_CODE_HARNESS_0_0_1={id:"claude-code",version:"0.0.1",name:"Claude Code",description:"Anthropic's coding agent, driven over ACP through the Agent Client Protocol project's adapter on the Claude Agent SDK.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://github.com/agentclientprotocol/claude-agent-acp",acp:{command:"npx",args:["-y","@agentclientprotocol/claude-agent-acp@0.91.0"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:["default","plan","acceptEdits","bypassPermissions"],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"api_key_only",licence:"Apache-2.0 (adapter); Anthropic Commercial Terms of Service (the agent)"},skills:{format:"skill-md",dir:".claude/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!0,compaction:"own",modes:["default","plan","acceptEdits","bypassPermissions"],autoRun:["^(cal|uptime|cat|head|tail|wc|stat|strings|hexdump|od|nl|id|uname|free|df|du|locale|groups|nproc|basename|dirname|realpath|cut|paste|tr|column|tac|rev|fold|expand|unexpand|fmt|comm|cmp|numfmt|readlink|diff|true|false|sleep|which|type|expr|seq|tsort|pr)(\\s|$)","^(pwd|whoami|alias|history|arch|ifconfig|ip addr)(\\s|$)","^(claude (-h|--help)|node (-v|--version)|python3? --version)$","^(echo|uniq|jq|cd|ls|find)(\\s|$)","^(xargs|file|sed|sort|man|help|netstat|ps|base64|grep|egrep|fgrep|rg|sha256sum|sha1sum|md5sum|tree|date|hostname|lsof|pgrep|tput|ss|fd|fdfind|test)(\\s|$)","^git (diff|log|show|shortlog|reflog|stash (list|show)|ls-remote|status|blame|ls-files|config --get|remote( show)?|merge-base|rev-parse|rev-list|describe|cat-file|for-each-ref|grep|worktree list|tag|branch)(\\s|$)","^gh (pr (view|list|diff|checks|status)|issue (view|list|status)|repo view|run (list|view)|auth status|release (list|view)|workflow (list|view)|label list|search (repos|issues|prs|commits|code))(\\s|$)","^docker (ps|images|logs|inspect)(\\s|$)"]},instructionsFile:"CLAUDE.md",registered:{adapter:"@agentclientprotocol/claude-agent-acp",version:"0.91.0",licenceSource:"https://www.npmjs.com/package/@agentclientprotocol/claude-agent-acp",termsSource:"https://code.claude.com/docs/en/legal-and-compliance",credential:"An Anthropic API key (ANTHROPIC_API_KEY), the person's own",binaries:"Node 22 (engines.node >=22 on npm), git",note:"Anthropic's legal page (read 2026-10-15): running Claude Code in hosted sandboxes or agent infrastructure requires the Commercial Terms; each end user authenticates with their own API key or subscription; developers may not route requests through Free, Pro or Max plan credentials on behalf of their users, nor collect or intermediate Claude.ai credentials. So only API keys are taken; a subscription login is refused. The npm package moved from @zed-industries (0.23.1, March 2026) to @agentclientprotocol."}},CODEX_HARNESS_0_0_1={id:"codex",version:"0.0.1",name:"Codex",description:"OpenAI's coding agent, driven over ACP through the Agent Client Protocol project's adapter, which ships the Codex binary it drives.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://github.com/agentclientprotocol/codex-acp",acp:{command:"npx",args:["-y","@agentclientprotocol/codex-acp@2.2.2"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:["read-only","workspace-write","agent","agent-full-access"],env:{NO_BROWSER:"1"},nativeSession:"none"},requires:{secrets:["OPENAI_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"api_key_only",licence:"Apache-2.0 (adapter); OpenAI Terms of Use (the agent)"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!0,compaction:"own",modes:["read-only","workspace-write","agent","agent-full-access"],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"@agentclientprotocol/codex-acp",version:"2.2.2",licenceSource:"https://www.npmjs.com/package/@agentclientprotocol/codex-acp",termsSource:"https://learn.chatgpt.com/docs/auth",credential:"An OpenAI API key (OPENAI_API_KEY or CODEX_API_KEY), the person's own",binaries:"Node 22 (as the Agent Client Protocol project's adapters; unstated on npm), git",note:"Codex's authentication page (read 2026-10-15) recommends API keys for automation and device-code login for headless machines; a ChatGPT login needs a browser and is hidden with NO_BROWSER=1 in the adapter. Only API keys are taken; a ChatGPT login is refused. The Zed-scoped package was archived on 22 July 2026 and names this one."}},CUSTOM_HARNESS_0_0_1={id:"custom",version:"0.0.1",name:"Custom harness",description:"An organization's own ACP agent, its command named by the organization's own harness spec and never typed into a form.",enabled:!1,unavailable_because:"",tags:["harness"],docs:"",requires:{secrets:[],binaries:[]},terms:{servedToThirdParties:"organizations_own",licence:"The organization's own"},skills:{format:"none",dir:""},honours:{model:!1,subagents:!1},capabilities:{resume:"none",forkHistory:"none",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"",registered:{adapter:"The organization's own",version:"0",licenceSource:"https://agentspecs.datalayer.tech/harnesses",termsSource:"https://agentspecs.datalayer.tech/harnesses",credential:"The organization's own",binaries:"",note:"Not launchable from the shared catalogue; an organization's own harness spec names the command and answers for its terms."}},FAST_AGENT_HARNESS_0_0_1={id:"fast-agent",version:"0.0.1",name:"fast-agent",description:"llmindset's agent framework served over ACP; each agent it defines is a session mode, with any model provider it is configured with.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and pi (28 October 2026); fast-agent is a framework served over ACP, not a coding agent, its adapter is a Python tool the runtime image does not carry, and it has not been drilled on Datalayer.",tags:["harness","framework"],docs:"https://github.com/evalstate/fast-agent/blob/main/docs/docs/acp/index.md",acp:{command:"uvx",args:["fast-agent-acp==0.10.45"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:[],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["uvx"]},terms:{servedToThirdParties:"permitted",licence:"Apache-2.0"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"fast-agent-acp",version:"0.10.45",licenceSource:"https://pypi.org/project/fast-agent-acp/",termsSource:"https://github.com/evalstate/fast-agent/blob/main/LICENSE",credential:"The provider's key fast-agent is given (ANTHROPIC_API_KEY, OPENAI_API_KEY or HF_TOKEN); ANTHROPIC_API_KEY declared",binaries:"uv (uvx), Python 3.12 to 3.15 (requires_python on PyPI)",note:"A framework, not a coding agent: each agent it defines is an ACP mode; the client's MCP servers are attached; sessions are listed. Launched with uvx fast-agent-acp (docs/docs/acp/index.md); reads skills from .fast-agent/skills, .agents/skills and .claude/skills; its default prompt reads AGENTS.md."}},GEMINI_CLI_HARNESS_0_0_1={id:"gemini-cli",version:"0.0.1",name:"Gemini CLI",description:"Google's coding agent, which speaks ACP itself when started with --experimental-acp.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and pi (28 October 2026); Gemini CLI's API host (generativelanguage.googleapis.com) is outside a Datalayer runtime's egress boundary and is not routed through ai-inference, so it stays unfunded and unoffered there (the user's decision, 28 October 2026).",tags:["harness"],docs:"https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/cli-reference.md",acp:{command:"npx",args:["-y","@google/gemini-cli@0.64.0","--experimental-acp"],protocolVersion:1,loadSession:!1,mcp:"lend",modes:["default","auto_edit","yolo","plan"],env:{},nativeSession:"none"},requires:{secrets:["GEMINI_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"api_key_only",licence:"Apache-2.0 (the agent); Gemini API or Gemini Code Assist terms (the model)",tierRestrictions:"Gemini Code Assist Standard or Enterprise for a Google login (the individuals tier stopped being served on 18 June 2026); a Gemini API key otherwise"},skills:{format:"skill-md",dir:".gemini/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"none",forkHistory:"replay",interrupt:!0,steering:!1,images:!0,compaction:"own",modes:["default","auto_edit","yolo","plan"],autoRun:[]},instructionsFile:"GEMINI.md",registered:{adapter:"@google/gemini-cli",version:"0.64.0",licenceSource:"https://www.npmjs.com/package/@google/gemini-cli",termsSource:"https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals",credential:"A Gemini API key (GEMINI_API_KEY), the person's own; or a Google login on a Code Assist Standard or Enterprise subscription",binaries:"Node 20 or later (engines.node >=20 on npm), git",note:`Google's notice (read 2026-10-15): "Starting June 18, 2026, Gemini Code Assist IDE extensions stopped serving requests for the Gemini Code Assist for individuals"; Standard and Enterprise follow a separate schedule. The ACP flag is --experimental-acp in the CLI reference (docs/cli/cli-reference.md).`}},GOOSE_HARNESS_0_0_1={id:"goose",version:"0.0.1",name:"goose",description:"Block's open agent (now the Agentic AI Foundation's), which speaks ACP itself with goose acp; any model provider it is configured with.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and pi (28 October 2026); goose is a binary of its own release, not an npm adapter, the runtime image does not carry it, and it has not been drilled on Datalayer.",tags:["harness"],docs:"https://block.github.io/goose/docs/gdk/acp/",acp:{command:"goose",args:["acp"],protocolVersion:1,loadSession:!1,mcp:"lend",modes:[],env:{GOOSE_PROVIDER:"anthropic"},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["goose@1.54.0","git"]},terms:{servedToThirdParties:"permitted",licence:"Apache-2.0"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"none",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:".goosehints",registered:{adapter:"goose",version:"1.54.0",licenceSource:"https://github.com/aaif-goose/goose",termsSource:"https://github.com/aaif-goose/goose/blob/main/LICENSE",credential:"The provider's key goose is configured with (GOOSE_PROVIDER); ANTHROPIC_API_KEY declared",binaries:"The goose CLI (release v1.54.0 of 8 October 2026), git",note:"Open source under Apache-2.0, no vendor terms of its own; the model provider's terms apply to the key. Launched as goose acp (documentation/docs/gdk/acp/index.md)."}},OPENCODE_HARNESS_0_0_1={id:"opencode",version:"0.0.1",name:"OpenCode",description:"Anomaly's open coding agent, which speaks ACP itself with opencode acp; any model provider it is configured with.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://opencode.ai/docs/acp/",acp:{command:"npx",args:["-y","opencode-ai@1.19.0","acp"],protocolVersion:1,loadSession:!1,mcp:"lend",modes:[],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"permitted",licence:"MIT"},skills:{format:"skill-md",dir:".opencode/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"none",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"opencode-ai",version:"1.19.0",licenceSource:"https://www.npmjs.com/package/opencode-ai",termsSource:"https://github.com/anomalyco/opencode/blob/dev/LICENSE",credential:"The provider's key OpenCode is configured with; ANTHROPIC_API_KEY declared",binaries:"Node (the opencode-ai package), git",note:"Open source under MIT, no vendor terms of its own; the model provider's terms apply to the key. Launched as opencode acp (opencode.ai/docs/acp); reads skills from .opencode/skills, .claude/skills and .agents/skills."}},OPENHANDS_HARNESS_0_0_1={id:"openhands",version:"0.0.1",name:"OpenHands",description:"The OpenHands CLI, which speaks ACP itself with openhands acp; any model provider it is configured with.",enabled:!1,unavailable_because:"the catalogue offers four harnesses today — Claude Code, Codex, OpenCode and pi (28 October 2026); OpenHands' adapter is a Python tool the runtime image does not carry, and it has not been drilled on Datalayer.",tags:["harness"],docs:"https://docs.openhands.dev/openhands/usage/run-openhands/acp",acp:{command:"uvx",args:["--from","openhands==1.16.0","openhands","acp","--override-with-envs"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:["always-ask","always-approve","llm-approve"],env:{},nativeSession:"none"},requires:{secrets:["LLM_API_KEY"],binaries:["uvx","git"]},terms:{servedToThirdParties:"permitted",licence:"MIT"},skills:{format:"skill-md",dir:".agents/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:["always-ask","always-approve","llm-approve"],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"openhands",version:"1.16.0",licenceSource:"https://pypi.org/project/openhands/",termsSource:"https://github.com/OpenHands/OpenHands-CLI/blob/main/LICENSE",credential:"The provider's key OpenHands reads as LLM_API_KEY, with LLM_MODEL, under --override-with-envs",binaries:"uv (uvx), Python 3.12 or later, git",note:"Open source under MIT, no vendor terms of its own; the model provider's terms apply to the key. Launched as openhands acp (OpenHands-CLI README; docs.openhands.dev's ACP page); resumes with --resume; reads skills from .agents/skills (.openhands/skills is legacy)."}},PI_HARNESS_0_0_1={id:"pi",version:"0.0.1",name:"pi",description:"Earendil's pi coding agent, driven over ACP through the pi-acp adapter, which spawns the published pi executable; any model provider pi is configured with.",enabled:!0,unavailable_because:"",tags:["harness"],docs:"https://github.com/svkozak/pi-acp",acp:{command:"npx",args:["-y","pi-acp@0.0.34"],protocolVersion:1,loadSession:!0,mcp:"lend",modes:[],env:{},nativeSession:"none"},requires:{secrets:["ANTHROPIC_API_KEY"],binaries:["node","git"]},terms:{servedToThirdParties:"permitted",licence:"MIT (adapter); MIT (the agent, @earendil-works/pi-coding-agent 1.4.0)"},skills:{format:"skill-md",dir:".pi/skills"},honours:{model:!0,subagents:!1},capabilities:{resume:"load",forkHistory:"replay",interrupt:!0,steering:!1,images:!1,compaction:"own",modes:[],autoRun:[]},instructionsFile:"AGENTS.md",registered:{adapter:"pi-acp",version:"0.0.34",licenceSource:"https://www.npmjs.com/package/pi-acp",termsSource:"https://github.com/earendil-works/pi/blob/main/LICENSE",credential:"The provider's key pi is configured with; ANTHROPIC_API_KEY declared, the person's own",binaries:"Node 22 (pi-coding-agent engines.node >=22.19.0; pi-acp >=20), the pi executable 1.4.0 on the PATH (@earendil-works/pi-coding-agent), git",note:"Read 2026-10-28. pi speaks no ACP itself; pi-acp 0.0.34 (MIT, an individual's, github.com/svkozak/pi-acp) speaks ACP JSON-RPC over stdio and spawns the published `pi` executable with `pi --mode rpc`, so pi 1.4.0 runs as published — chosen over @automatalabs/pi-acp 0.9.4 (Apache-2.0, in-process, which embeds pi 0.87.1 through its SDK on a fork's package). Open source under MIT on both sides, no vendor terms of their own; the model provider's terms apply to the key. Session persistence through pi's own session files (session/load)."}},HARNESS_CATALOGUE={"claude-code":CLAUDE_CODE_HARNESS_0_0_1,codex:CODEX_HARNESS_0_0_1,custom:CUSTOM_HARNESS_0_0_1,"fast-agent":FAST_AGENT_HARNESS_0_0_1,"gemini-cli":GEMINI_CLI_HARNESS_0_0_1,goose:GOOSE_HARNESS_0_0_1,opencode:OPENCODE_HARNESS_0_0_1,openhands:OPENHANDS_HARNESS_0_0_1,pi:PI_HARNESS_0_0_1};function listHarnesses(){return Object.values(HARNESS_CATALOGUE)}const AGENT_RUNTIME_VARIANTS=["browser-vercelai","local-pydanticai","cloud-pydanticai"],DEFAULT_AGENT_RUNTIME_VARIANT="cloud-pydanticai",VARIANT_BY_LEGACY_TARGET={"backend-services":"cloud-pydanticai","local-agent-runtimes":"local-pydanticai"};function isAgentRuntimeVariant(Au){return typeof Au=="string"&&AGENT_RUNTIME_VARIANTS.includes(Au)}function toAgentRuntimeVariant(Au,lo=DEFAULT_AGENT_RUNTIME_VARIANT){return Au?isAgentRuntimeVariant(Au)?Au:VARIANT_BY_LEGACY_TARGET[Au]??lo:lo}function locationOf(Au){return Au.slice(0,Au.indexOf("-"))}function runsInBrowser(Au){return locationOf(Au)==="browser"}function legacyTargetOf(Au){return locationOf(Au)==="cloud"?"backend-services":"local-agent-runtimes"}const runtimesStore=createStore$1((Au,lo)=>({configuration:{maxNotebookRuntimes:5,maxCellRuntimes:3},setConfiguration:$u=>{Au(Ru=>JSONExt.deepEqual(Ru.configuration,$u)?{}:{configuration:{...$u}})},runtimesUrl:coreStore.getState().configuration?.runtimesUrl,tab:0,getIntTab:()=>Math.floor(lo().tab),setTab:$u=>Au(Ru=>({tab:$u})),runtimes:[],refreshRuntimes:async()=>{const $u=await getRuntimes();JSONExt.deepEqual(lo().runtimes,$u)||Au({runtimes:[...$u]})},removeRuntime:$u=>{if(!$u)return;const Ru=lo().runtimes,Iu=Ru.filter(Pu=>Pu.runtime_name!==$u);Iu.length!==Ru.length&&Au({runtimes:Iu})},runtimeModels:[],addRuntimeModel:$u=>{const Ru=lo().runtimeModels;Ru.findIndex(Pu=>$u.id&&$u.id===Pu.id||!!$u.uid&&$u.uid===Pu.uid)<0&&Au({runtimeModels:[...Ru,$u]})},removeRuntimeModel:$u=>{const Ru=[...lo().runtimeModels],Iu=Ru?.findIndex(Pu=>!!Pu.id&&$u===Pu.id||$u===Pu.runtime_name)??-1;Iu>=0&&(Ru.splice(Iu,1),Au({runtimeModels:Ru}))},setRuntimeModels:$u=>{JSONExt.deepEqual(lo().runtimeModels,$u)||Au({runtimeModels:[...$u]})},multiServiceManager:void 0,setMultiServiceManager:$u=>{Au(Ru=>({multiServiceManager:$u}))},showDisclaimer:!1,setShowDisclaimer:$u=>{Au(Ru=>({showDisclaimer:$u}))},runtimeSnapshots:[],addSandboxSnapshot:$u=>{const Ru=lo().runtimeSnapshots,Iu=Ru.findIndex(Pu=>Pu.id===$u.id);if(Iu<0){const Pu=[...Ru,$u];Au({runtimeSnapshots:Pu})}else if(!JSONExt.deepEqual(Ru[Iu],$u)){const Pu=[...Ru];Pu.splice(Iu,1,$u),Au({runtimeSnapshots:Pu})}},removeSandboxSnapshot:$u=>{const Ru=lo().runtimeSnapshots,Iu=Ru.findIndex(Pu=>Pu.id===$u);if(Iu>=0){const Pu=[...Ru];Pu.splice(Iu,1),Au({runtimeSnapshots:Pu})}},setSandboxSnapshots:$u=>{JSONExt.deepEqual(lo().runtimeSnapshots,$u)||Au({runtimeSnapshots:[...$u]})},version:"",setVersion:$u=>{$u&&!lo().version&&Au(Ru=>({version:$u}))}})),kernelsPoll=new Poll({auto:!0,factory:()=>runtimesStore.getState().refreshRuntimes(),frequency:{interval:61*1e3,backoff:!0,max:300*1e3},name:"@datalayer/jupyter-kernels:KernelsManager#kernels",standby:()=>iamStore.getState().token||runtimesStore.getState().runtimesUrl?"when-hidden":!0});runtimesStore.subscribe((Au,lo)=>{if(!JSONExt.deepEqual(Au.runtimes,lo.runtimes)){const $u=Date.now(),Ru=Math.min(...Au.runtimes.map(Iu=>Iu.expired_at?parseFloat(Iu.expired_at):1/0))*1e3;$u+kernelsPoll.frequency.interval>Ru+2e3&&setTimeout(()=>{kernelsPoll.refresh()},Ru+2e3-$u)}});coreStore.subscribe((Au,lo)=>{if(Au.configuration.runtimesUrl&&Au.configuration.runtimesUrl!==lo.configuration.runtimesUrl){const $u=Au.configuration.runtimesUrl;console.log(`Updating runtimesUrl with new value ${$u}`),runtimesStore.setState({runtimesUrl:$u}),kernelsPoll.refresh().then(()=>kernelsPoll.tick).catch(Ru=>{console.error("Failed to refresh kernel servers list following service URL changed.",Ru)})}});function useRuntimesStore(Au){return useStore$1(runtimesStore,Au)}const DEFAULT_AGENT_CONFIG={name:"ai-agent",description:"AI Assistant",model:"",systemPrompt:"You are a helpful AI assistant.",agentLibrary:"pydantic-ai",protocol:"vercel-ai"};requireManager();const sandboxManagersByRuntime=new Map;function registerSandboxServiceManager(Au,lo){const $u=String(Au||"").trim();if(!$u||!lo)return()=>{};let Ru=sandboxManagersByRuntime.get($u);return Ru||(Ru=new Set,sandboxManagersByRuntime.set($u,Ru)),Ru.add(lo),()=>{const Iu=sandboxManagersByRuntime.get($u);Iu&&(Iu.delete(lo),Iu.size===0&&sandboxManagersByRuntime.delete($u))}}function disposeSandboxServiceManagers(Au){const lo=String(Au||"").trim();if(!lo)return;const $u=sandboxManagersByRuntime.get(lo);$u&&(sandboxManagersByRuntime.delete(lo),$u.forEach(Ru=>{try{disposeServiceManager(Ru)}catch(Iu){console.warn(`[sandboxServiceManagers] Failed disposing service manager for pod ${lo}`,Iu)}}))}function launchesOwnRoutesOnly(Au){return!!Au?.deploymentUid}const base$2=Au=>Au.trim().replace(/\/$/,"");function agentDeletionUrl(Au,lo,$u){if(!$u)return`${base$2(Au)}/api/v1/agents/${encodeURIComponent(lo)}`}function runtimeModelsUrl(Au,lo,$u){if(!$u)return`${base$2(Au)}/api/v1/configure/models?agent_id=${encodeURIComponent(lo)}`}const EMPTY_RUNTIMES=[],BROWSER_AGENT_CONNECTION=Object.freeze({runtimeName:"",environmentName:"",jupyterBaseUrl:"",agentBaseUrl:"",status:"ready",isReady:!0}),AGENT_QUERY_OPTIONS={staleTime:300*1e3,gcTime:600*1e3},agentQueryKeys={agentRuntimes:{all:()=>["agentRuntimes"],lists:()=>[...agentQueryKeys.agentRuntimes.all(),"list"],details:()=>[...agentQueryKeys.agentRuntimes.all(),"detail"],detail:Au=>[...agentQueryKeys.agentRuntimes.details(),Au]},checkpoints:{all:()=>["checkpoints"],lists:()=>[...agentQueryKeys.checkpoints.all(),"list"]}},DELETED_POD_TOMBSTONE_TTL_MS=300*1e3,deletedRuntimeTombstones=new Map;function markRuntimeDeleted(Au){const lo=String(Au||"").trim();lo&&(deletedRuntimeTombstones.set(lo,Date.now()),disposeSandboxServiceManagers(lo))}function clearRuntimeDeleted(Au){deletedRuntimeTombstones.delete(String(Au||"").trim())}const LIVE_RUNTIME_STATUSES=new Set(["running","resumed","starting","resuming"]);function isStaleDeletedRuntime(Au){const lo=String(Au?.runtime_name||"").trim(),$u=deletedRuntimeTombstones.get(lo);return $u===void 0?!1:Date.now()-$u>DELETED_POD_TOMBSTONE_TTL_MS?(deletedRuntimeTombstones.delete(lo),!1):LIVE_RUNTIME_STATUSES.has(Au.status)}const RUNTIME_STATUS_MAP={resume:"resumed",resumed:"resumed",resuming:"resuming",pausing:"pausing",paused:"paused",starting:"starting",pending:"starting",launching:"starting",terminated:"terminated",archived:"archived",running:"running"};function toAgentRuntimeData(Au){const lo=typeof Au.status=="string"?Au.status.toLowerCase():"",$u=RUNTIME_STATUS_MAP[lo]??"running",Ru=Au.environment;return{...Au,environment:{name:String(Ru?.name||"").trim(),title:String(Ru?.title||"").trim()||void 0,cpu:String(Ru?.cpu||"").trim()||void 0,memory:String(Ru?.memory||"").trim()||void 0,gpu:String(Ru?.gpu||"").trim()||void 0,resources:Ru?.resources},status:$u,name:Au.given_name||Au.runtime_name,id:Au.runtime_name,url:Au.ingress,messageCount:0,agent_spec_id:Au.agent_spec_id||void 0,content_attachments:Array.isArray(Au.content_attachments)?Au.content_attachments:[]}}function useAgentRuntimes(Au={}){const{agentSpecId:lo,agentConfig:$u,autoCreateAgent:Ru=!0,autoStart:Iu=!1,agentSpec:Pu,variant:Ou,runtimeCreationTarget:Mu,runtimeCreationBaseUrl:Du,runtimeConnection:Lu,appLaunch:Bu}=Au,ju=toAgentRuntimeVariant(Ou??Mu),Fu=launchesOwnRoutesOnly(Bu),{configuration:zu}=useCoreStore(),Uu=useAgentRuntimeConnection(),Hu=useAgentRuntimeStatus(),Vu=useAgentRuntimeError(),Gu=useAgentRuntimeIsLaunching(),Wu=useAgentRuntimeStore($d=>$d.launchAgent),Zu=useAgentRuntimeStore($d=>$d.connectAgent),Ju=useAgentRuntimeStore($d=>$d.createAgent),Yu=useAgentRuntimeStore($d=>$d.disconnect),[Xu,ed]=reactExports.useState("idle"),[td,nd]=reactExports.useState(null),[od,sd]=reactExports.useState(!1),ad=reactExports.useRef(!1),[pd,vd]=reactExports.useState(!1),Sd=reactExports.useRef(!1),_d=reactExports.useRef(null),bd=reactExports.useRef(!1),wd=reactExports.useRef($u);wd.current=$u;const Ad=!!lo&&locationOf(ju)==="cloud",gd=Lu?[Lu.runtimeName,Lu.environmentName,Lu.jupyterBaseUrl||Lu.serviceManager?.serverSettings.baseUrl||"",Lu.kernelId||""].join(":"):null,dd=reactExports.useMemo(()=>Du||(runsInBrowser(ju)?"":locationOf(ju)==="local"?"http://localhost:8765":zu?.runtimesUrl||void 0||"https://r1.datalayer.run"),[zu?.runtimesUrl,Du,ju]),yd=reactExports.useCallback(async()=>{try{const{iamStore:$d,coreStore:Id}=await __vitePreload(async()=>{const{iamStore:th,coreStore:Eh}=await import("./chunks/index-J-pyZzZ8.js");return{iamStore:th,coreStore:Eh}},[],import.meta.url),Vd=$d.getState().token||"",Wd=Id.getState().configuration?.aiAgentsUrl||"";return{token:Vd,aiAgentsUrl:Wd,runtimesUrl:dd}}catch{return{token:"",aiAgentsUrl:"",runtimesUrl:""}}},[dd]);reactExports.useEffect(()=>{!Lu||!gd||(Uu?[Uu.runtimeName,Uu.environmentName,Uu.jupyterBaseUrl||"",Uu.kernelId||""].join(":"):null)===gd||(Sd.current=!1,Zu(Lu))},[Lu,gd,Uu,Zu]);const ld=reactExports.useCallback(async $d=>{if(runsInBrowser(ju))return BROWSER_AGENT_CONNECTION;if(Ad){ed("launching"),nd(null);try{const Vd=(typeof $u?.name=="string"&&$u.name||typeof Pu?.name=="string"&&Pu.name||`${lo}`).replace(/\//g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,63),Md=await Wu($d?{...$d,...Bu,runtimesUrl:dd}:{environmentName:"ai-agents-env",creditsLimit:10,givenName:Vd,...Bu,runtimesUrl:dd});return ed("ready"),Md}catch(Id){const Vd=Id instanceof Error?Id.message:String(Id);throw nd(Vd),ed("error"),Id}}else{if(!$d)throw new Error("Runtime options are required in connect mode");return Wu({...$d,runtimesUrl:dd})}},[$u?.name,Pu?.name,lo,Bu,Ad,dd,Wu,ju]),ud=reactExports.useCallback(async $d=>{if(bd.current)throw new Error("Agent creation already in progress");bd.current=!0,sd(!0);try{const Id={};Pu&&(Pu.model&&(Id.model=Pu.model),Pu.protocol&&(Id.protocol=Pu.protocol),Pu.systemPrompt&&(Id.systemPrompt=Pu.systemPrompt),Pu.description&&(Id.description=Pu.description),Pu.name&&(Id.name=Pu.name));const Vd={...DEFAULT_AGENT_CONFIG,...Id,...$u,...$d,name:$d?.name||$u?.name||(Ad&&lo?lo:Uu?.runtimeName)};return await Ju(Vd)}catch(Id){const Vd=Id instanceof Error?Id.message:String(Id);throw Ad&&(nd(Vd),ed("error")),Id}finally{bd.current=!1,sd(!1)}},[lo,$u,Pu,Ad,Uu,Ju]),hd=reactExports.useCallback(async()=>{const $d=Uu?.agentId,Id=Uu?.agentBaseUrl,Vd=$d&&Id?agentDeletionUrl(Id,$d,Fu):void 0;if(Vd)try{const{token:Md}=await yd();await fetch(Vd,{method:"DELETE",headers:Md?{Authorization:`Bearer ${Md}`}:{}})}catch{}Sd.current=!1,ad.current=!1,ed("idle"),nd(null),agentRuntimeStore.getState().reset()},[Uu?.agentId,Uu?.agentBaseUrl,yd,Fu]);reactExports.useEffect(()=>{!Ad&&Ru&&Uu&&Hu==="ready"&&!Uu.isReady&&!Sd.current&&(Sd.current=!0,Ju(wd.current).catch($d=>{console.error("[useAgent] Failed to auto-create agent:",$d),Sd.current=!1}))},[Ad,Ru,Uu,Hu,Ju]),reactExports.useEffect(()=>{Ad&&Ru&&Uu&&(Xu==="ready"||Xu==="resumed")&&!Uu.isReady&&!Sd.current&&(Sd.current=!0,ud(wd.current).catch($d=>{console.error("[useAgents] Failed to auto-create agent:",$d);const Id=$d instanceof Error?$d.message:String($d);nd(Id),ed("error"),Sd.current=!1}))},[Ad,Ru,Uu,Xu,ud]),reactExports.useEffect(()=>{const $d=Uu?.runtimeName||null;if(!$d){_d.current=null;return}_d.current&&_d.current!==$d&&(Sd.current=!1),_d.current=$d},[Uu?.runtimeName]),reactExports.useEffect(()=>{if(!Ad||Uu||Xu!=="idle")return;if(Bu){vd(!0);return}let $d=!1;return(async()=>{try{const{token:Vd,runtimesUrl:Md}=await yd();if(!Vd)return;const{listRuntimes:Wd}=await __vitePreload(async()=>{const{listRuntimes:ih}=await import("./chunks/runtimes-D0qXa51n.js");return{listRuntimes:ih}},[],import.meta.url),ah=((await Wd(Vd,Md)).runtimes||[]).filter(ih=>ih.environment?.name!=="ai-agents-env"?!1:lo?ih.agent_spec_id===lo:!0).slice().sort((ih,Mh)=>{const qd=Number(ih.started_at||0);return Number(Mh.started_at||0)-qd})[0];if($d||!ah?.runtime_name||!ah?.ingress)return;Zu({runtimeName:ah.runtime_name,environmentName:ah.environment.name,jupyterBaseUrl:ah.ingress}),Sd.current=!1;const yh=ah,vh=typeof yh.status=="string"?yh.status.toLowerCase():"",Jd=RUNTIME_STATUS_MAP[vh]??"running",eh=Jd==="paused"?"paused":Jd==="resuming"||Jd==="resumed"?"resumed":"running";ed(eh==="paused"?"paused":eh==="resumed"?"resumed":"ready")}catch(Vd){console.warn("[useAgents] Failed to find existing runtime:",Vd)}finally{$d||vd(!0)}})(),()=>{$d=!0}},[Ad,Uu,Iu,Xu,yd,lo,Bu,Zu]),reactExports.useEffect(()=>{(Hu==="disconnected"||Hu==="idle")&&(Sd.current=!1)},[Hu]),reactExports.useEffect(()=>{Ad&&Iu&&pd&&!Uu&&!ad.current&&Xu==="idle"&&(ad.current=!0,ld())},[Ad,Iu,pd,Uu,Xu,ld]),reactExports.useEffect(()=>{Vu&&Ad&&Xu!=="error"&&(nd(Vu),ed("error"))},[Vu,Ad,Xu]);const md=runsInBrowser(ju),Ed=md?"ready":Ad?Xu:Hu,Td=md?null:Ad&&td||Vu,Rd=md?!0:Ad?(Xu==="ready"||Xu==="resumed")&&!!Uu?.isReady:Hu==="ready"&&!!Uu?.isReady,jd=Uu?.endpoint||null,Cd=Uu?.serviceManager||null;return{runtime:Uu,status:Ed,isLaunching:Gu,launchRuntime:ld,connectToRuntime:Zu,disconnect:Yu,endpoint:jd,serviceManager:Cd,createAgent:ud,teardown:hd,isCreating:od,isReady:Rd,error:Td,variant:ju,runtimeCreationTarget:legacyTargetOf(ju),runtimeCreationBaseUrl:dd}}function useAgentRuntimesQuery(Au,lo){const{configuration:$u}=useCoreStore(),{requestDatalayer:Ru}=useDatalayer({notifyOnError:!1}),{user:Iu}=useIAMStore(),Pu=useQueryClient();return useQuery({queryKey:[...agentQueryKeys.agentRuntimes.lists(),"","","",""],queryFn:async()=>{const Mu=new URLSearchParams().toString(),Du=await Ru({url:`${runtimesUrl($u.runtimesUrl)}${Mu?`?${Mu}`:""}`,method:"GET"});if(Du.success&&Du.runtimes){const Lu=Du.runtimes.filter(Bu=>Bu.environment?.name==="ai-agents-env").map(toAgentRuntimeData).filter(Bu=>!isStaleDeletedRuntime(Bu));return Lu.forEach(Bu=>{Pu.setQueryData(agentQueryKeys.agentRuntimes.detail(Bu.runtime_name),Bu)}),Lu}return[]},...AGENT_QUERY_OPTIONS,refetchInterval:lo?.refetchInterval??1e4,refetchOnMount:!0,refetchOnWindowFocus:!0,enabled:(lo?.enabled??!0)&&!!Iu})}function useCreateAgentRuntime(){const{configuration:Au}=useCoreStore(),{requestDatalayer:lo}=useDatalayer({notifyOnError:!1}),$u=useQueryClient();return useMutation({mutationFn:async Ru=>{const Iu=(Ru.contentAttachmentUids??[]).map(Pu=>String(Pu||"").trim()).filter(Boolean);return lo({url:runtimesUrl(Au.runtimesUrl),method:"POST",body:{environment:{name:Ru.environmentName||"ai-agents-env"},given_name:Ru.givenName||"Agent",credits_limit:Ru.creditsLimit||10,type:Ru.type||"notebook",editor_variant:Ru.editorVariant||"none",enable_codemode:Ru.enableCodemode??!1,agent_spec_id:Ru.agentSpecId||void 0,agent_spec:Ru.agentSpec||void 0,user_account_handle:Ru.userAccountHandle||void 0,billing_entity_uid:Ru.billingEntityUid||void 0,billing_entity_type:Ru.billingEntityType||void 0,billing_entity_handle:Ru.billingEntityHandle||void 0,billing_source_organization_uid:Ru.billingSourceOrganizationUid||void 0,billing_source_organization_handle:Ru.billingSourceOrganizationHandle||void 0,runtime_name:Ru.runtimeName||void 0,content_attachment_uids:Iu.length?Iu:void 0}})},onSuccess:Ru=>{if(Ru.success&&Ru.runtime){const Iu=toAgentRuntimeData(Ru.runtime);clearRuntimeDeleted(Iu.runtime_name),$u.setQueryData(agentQueryKeys.agentRuntimes.detail(Iu.runtime_name),Iu),$u.invalidateQueries({queryKey:agentQueryKeys.agentRuntimes.all()})}}})}function useDeleteAgentRuntime(){const{configuration:Au}=useCoreStore(),{requestDatalayer:lo}=useDatalayer({notifyOnError:!1}),$u=useQueryClient(),Ru=Pu=>{if(!Pu||typeof Pu!="object")return;const Ou=Pu.response;return typeof Ou?.status=="number"?Ou.status:void 0},Iu=Pu=>{if(!Pu||typeof Pu!="object")return"";const Ou=Pu.response?.data;return String(Ou?.detail||Ou?.message||Pu.message||"").toLowerCase()};return useMutation({mutationFn:async Pu=>{try{return await lo({url:runtimeUrl(Au.runtimesUrl,Pu),method:"DELETE"})}catch(Ou){const Mu=Ru(Ou),Du=Iu(Ou);if(!(Mu===404||Du.includes("no reservation")||Du.includes("unknown reservation")||Du.includes("not found")))throw Ou;try{throw await lo({url:runtimeUrl(Au.runtimesUrl,Pu),method:"GET"}),Ou}catch(Bu){if(Ru(Bu)===404)return{success:!0,recovered:!0};throw Ou}}},onSuccess:(Pu,Ou)=>{markRuntimeDeleted(Ou),runtimesStore.getState().removeRuntime(Ou),$u.setQueriesData({queryKey:agentQueryKeys.agentRuntimes.lists()},Mu=>Array.isArray(Mu)?Mu.filter(Du=>Du.runtime_name!==Ou):Mu),$u.cancelQueries({queryKey:agentQueryKeys.agentRuntimes.detail(Ou)}),$u.removeQueries({queryKey:agentQueryKeys.agentRuntimes.detail(Ou)}),$u.invalidateQueries({queryKey:agentQueryKeys.agentRuntimes.lists()}),$u.refetchQueries({queryKey:agentQueryKeys.agentRuntimes.lists(),type:"active"}),$u.invalidateQueries({queryKey:agentQueryKeys.checkpoints.all()})}})}function useRefreshAgentRuntimes(){const Au=useQueryClient();return reactExports.useCallback(()=>{Au.invalidateQueries({queryKey:agentQueryKeys.agentRuntimes.all()})},[Au])}const DEFAULT_LIFECYCLE_RECORD={resumePending:!1,pauseLockedForResumed:!1};create$f()(persist((Au,lo)=>({byRuntimeKey:{},markResumePending:$u=>{$u&&Au(Ru=>({byRuntimeKey:{...Ru.byRuntimeKey,[$u]:{...DEFAULT_LIFECYCLE_RECORD,...Ru.byRuntimeKey[$u]??{},resumePending:!0}}}))},markResumeFailed:$u=>{$u&&Au(Ru=>({byRuntimeKey:{...Ru.byRuntimeKey,[$u]:{...DEFAULT_LIFECYCLE_RECORD,...Ru.byRuntimeKey[$u]??{},resumePending:!1,pauseLockedForResumed:!1}}}))},markResumeSettled:$u=>{$u&&Au(Ru=>({byRuntimeKey:{...Ru.byRuntimeKey,[$u]:{...DEFAULT_LIFECYCLE_RECORD,...Ru.byRuntimeKey[$u]??{},resumePending:!1,pauseLockedForResumed:!0}}}))},clearRuntimeLifecycle:$u=>{if(!$u)return;const Ru={...lo().byRuntimeKey};delete Ru[$u],Au({byRuntimeKey:Ru})}}),{name:"datalayer-agent-lifecycle",storage:createJSONStorage(()=>localStorage),partialize:Au=>({byRuntimeKey:Au.byRuntimeKey})}));function useAgentsRuntimes(Au,lo){const $u=useAgentRuntimesQuery(Au,lo),Ru=useCreateAgentRuntime(),Iu=useDeleteAgentRuntime(),Pu=useRefreshAgentRuntimes(),Ou=reactExports.useCallback(async(Mu,Du)=>{const Lu=String(Mu||"").trim();if(Lu)return Du?.beforeStop&&await Du.beforeStop(),Iu.mutateAsync(Lu)},[Iu]);return reactExports.useMemo(()=>({runtimes:$u.data??EMPTY_RUNTIMES,isRuntimesLoading:$u.isLoading,isRuntimesError:$u.isError,runtimesError:$u.error,refetchRuntimes:()=>$u.refetch(),refreshRuntimes:Pu,stopRuntimeByName:Ou,createRuntime:async Mu=>Ru.mutateAsync(Mu)}),[$u.data,$u.isLoading,$u.isError,$u.error,$u.refetch,Pu,Ou,Ru,Iu])}const DEFAULT_WS_PATH="/api/v1/tool-approvals/ws",DEFAULT_RECONNECT_DELAY_MS=3e3;function useAgentRuntimeWebSocket(Au){const{enabled:lo=!0,baseUrl:$u,authToken:Ru,agentId:Iu,autoReconnect:Pu=!0,reconnectDelayMs:Ou=DEFAULT_RECONNECT_DELAY_MS,maxReconnectAttempts:Mu}=Au,Du=reactExports.useRef(Au.onMessage);Du.current=Au.onMessage,reactExports.useEffect(()=>{if(!lo||!$u){agentRuntimeStore.getState().setWsState("closed");return}let Lu=!1,Bu=0,ju=null;function Fu(){const Uu=`${$u}${DEFAULT_WS_PATH}`,Hu=new URL(Uu.replace(/^http/,"ws"));return Ru&&Hu.searchParams.set("token",Ru),Iu&&Hu.searchParams.set("agent_id",Iu),Hu.toString()}function zu(){if(Lu)return;const Uu=Fu();agentRuntimeStore.getState().setWsState("connecting");const Hu=new WebSocket(Uu);agentRuntimeStore.getState().setWs(Hu,Iu),Hu.onopen=()=>{Bu=0,agentRuntimeStore.getState().setWsState("connected")},Hu.onmessage=Vu=>{let Gu;try{Gu=JSON.parse(String(Vu.data))}catch{return}const Wu=parseAgentStreamMessage(Gu);if(Du.current?.({type:Wu?.type,payload:Wu?.payload,raw:Gu}),!Wu)return;const Zu=agentRuntimeStore.getState();if(Wu.type==="agent.snapshot"){Zu.applySnapshot(Wu.payload);return}if(Wu.type==="agent.subagent"){Zu.appendSubagentEvent(Wu.payload);return}if(Wu.type==="agent.compaction"){Zu.setCompaction(Wu.payload);return}},Hu.onclose=()=>{if(agentRuntimeStore.getState().setWs(null,Iu),agentRuntimeStore.getState().setWsState("closed"),Lu||!Pu||(Bu+=1,typeof Mu=="number"&&Bu>Mu))return;const Vu=typeof Ou=="function"?Ou(Bu):Ou;ju=setTimeout(zu,Math.max(0,Vu))},Hu.onerror=()=>{(Hu.readyState===WebSocket.CONNECTING||Hu.readyState===WebSocket.OPEN)&&Hu.close()}}return zu(),()=>{Lu=!0,ju&&clearTimeout(ju),agentRuntimeStore.getState().setWs(null,Iu),agentRuntimeStore.getState().resetWs()}},[lo,$u,Ru,Iu,Pu,Ou,Mu])}const ALPHAVANTAGE_MCP_SERVER_0_0_1={id:"alphavantage",version:"0.0.1",name:"Alpha Vantage",description:"Financial market data and stock information",icon:"@primer/octicons-react:graph",emoji:"💹",url:"",command:"uvx",args:["av-mcp==0.2.1","${ALPHAVANTAGE_API_KEY}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["ALPHAVANTAGE_API_KEY:0.0.1"]},CHART_MCP_SERVER_0_0_1={id:"chart",version:"0.0.1",name:"Chart Generator",description:"Generate charts and visualizations",icon:"@datalayer/icons-react:chart-bar",emoji:"📊",url:"",command:"npx",args:["-y","@antv/mcp-server-chart"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},DATALAYER_MCP_SERVER_0_0_1={id:"datalayer",version:"0.0.1",name:"Datalayer",description:"Read, edit and run Jupyter notebooks on Datalayer, with sandboxes and data",icon:"@datalayer/icons-react:datalayer",emoji:"🚀",url:"",command:"npx",args:["-y","mcp-remote","https://mcp.datalayer.run/mcp","--header","Authorization: Bearer ${DATALAYER_API_KEY}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["DATALAYER_API_KEY:0.0.1"]},EARTHDATA_MCP_SERVER_0_0_1={id:"earthdata",version:"0.0.1",name:"Earthdata MCP",description:"Access NASA Earthdata search and metadata capabilities",icon:"@datalayer/icons-react:globe-americas",emoji:"🌍",url:"",command:"npx",args:["-y","mcp-remote","https://mcp.datalayer.run/mcp?only=earthdata","--header","Authorization: Bearer ${DATALAYER_API_KEY}"],transport:"stdio",enabled:!0,isAvailable:!1,tools:[],requiredEnvVars:["DATALAYER_API_KEY:0.0.1"]},EURUS_MCP_SERVER_0_0_1={id:"eurus",version:"0.0.1",name:"Eurus Climate MCP",description:"Climate and reanalysis analysis tools for spatial workflows",icon:"@primer/octicons-react:cloud",emoji:"🌦️",url:"",command:"eurus-mcp",args:[],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},FILESYSTEM_MCP_SERVER_0_0_1={id:"filesystem",version:"0.0.1",name:"Filesystem",description:"Local filesystem read/write operations",icon:"@primer/octicons-react:file-directory",emoji:"📁",url:"",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem","${TMPDIR}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},GITHUB_MCP_SERVER_0_0_1={id:"github",version:"0.0.1",name:"GitHub",description:"GitHub repository operations (issues, PRs, code search)",icon:"@datalayer/icons-react:github-mark",emoji:"🐙",url:"",command:"docker",args:["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["GITHUB_TOKEN:0.0.1"]},GOOGLE_WORKSPACE_MCP_SERVER_0_0_1={id:"google-workspace",version:"0.0.1",name:"Google Workspace",description:"Gmail of the person an application acts for, read or read and send, with a token Datalayer mints per call",icon:"@datalayer/icons-react:google",emoji:"📧",url:"http://127.0.0.1:9711/mcp",command:"uvx",args:["workspace-mcp","--transport","streamable-http","--permissions","gmail:send"],transport:"streamable-http",enabled:!0,isAvailable:!1,tools:[],requiredEnvVars:[]},HUGGINGFACE_MCP_SERVER_0_0_1={id:"huggingface",version:"0.0.1",name:"Hugging Face",description:"Hugging Face models, datasets, spaces, and papers access",icon:"@primer/octicons-react:hubot",emoji:"🤗",url:"",command:"npx",args:["-y","mcp-remote","https://huggingface.co/mcp","--header","Authorization: Bearer ${HF_TOKEN}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["HF_TOKEN:0.0.1"]},KAGGLE_MCP_SERVER_0_0_1={id:"kaggle",version:"0.0.1",name:"Kaggle",description:"Kaggle datasets, models, competitions, and notebooks access",icon:"@datalayer/icons-react:kaggle",emoji:"🏆",url:"",command:"npx",args:["-y","mcp-remote","https://www.kaggle.com/mcp","--header","Authorization: Bearer ${KAGGLE_API_TOKEN}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["KAGGLE_API_TOKEN:0.0.1"]},ODOO_ACCOUNTING_MCP_SERVER_0_0_1={id:"odoo-accounting",version:"0.0.1",name:"Odoo Accounting",description:"An accountant's day in Odoo — invoices, bills, journal entries, reconciliations, bank lines and tax returns — through the Datalayer MCP server",icon:"@datalayer/icons-react:odoo",emoji:"🧮",url:"",command:"npx",args:["-y","mcp-remote","https://mcp.datalayer.run/mcp?only=odoo-accounting","--header","Authorization: Bearer ${DATALAYER_API_KEY}"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["DATALAYER_API_KEY:0.0.1"]},ODOO_MCP_SERVER_0_0_1={id:"odoo",version:"0.0.1",name:"Odoo",description:"Odoo ERP operations (search, invoices, journals, reconciliations)",icon:"@datalayer/icons-react:odoo",emoji:"🧾",url:"",command:"uvx",args:["mcp-server-odoo"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:[]},SALESFORCE_MCP_SERVER_0_0_1={id:"salesforce",version:"0.0.1",name:"Salesforce",description:"Salesforce CRM operations (queries, reports, objects, SOQL)",icon:"@primer/octicons-react:briefcase",emoji:"☁️",url:"",command:"npx",args:["-y","@anthropic/salesforce-mcp-server"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["SALESFORCE_ACCESS_TOKEN:0.0.1","SALESFORCE_INSTANCE_URL:0.0.1"]},SLACK_MCP_SERVER_0_0_1={id:"slack",version:"0.0.1",name:"Slack",description:"Slack messaging and channel operations",icon:"@datalayer/icons-react:slack",emoji:"💬",url:"",command:"npx",args:["-y","@datalayer/slack-mcp-server"],transport:"stdio",enabled:!1,isAvailable:!1,tools:[],requiredEnvVars:["SLACK_BOT_TOKEN:0.0.1","SLACK_TEAM_ID:0.0.1","SLACK_CHANNEL_IDS:0.0.1"]},TAVILY_MCP_SERVER_0_0_1={id:"tavily",version:"0.0.1",name:"Tavily Search",description:"Web search and research capabilities via Tavily API",icon:"@primer/octicons-react:search",emoji:"🔍",url:"",command:"npx",args:["-y","tavily-mcp"],transport:"stdio",enabled:!0,isAvailable:!1,tools:[],requiredEnvVars:["TAVILY_API_KEY:0.0.1"]},MCP_SERVER_LIBRARY={alphavantage:ALPHAVANTAGE_MCP_SERVER_0_0_1,chart:CHART_MCP_SERVER_0_0_1,datalayer:DATALAYER_MCP_SERVER_0_0_1,earthdata:EARTHDATA_MCP_SERVER_0_0_1,eurus:EURUS_MCP_SERVER_0_0_1,filesystem:FILESYSTEM_MCP_SERVER_0_0_1,github:GITHUB_MCP_SERVER_0_0_1,"google-workspace":GOOGLE_WORKSPACE_MCP_SERVER_0_0_1,huggingface:HUGGINGFACE_MCP_SERVER_0_0_1,kaggle:KAGGLE_MCP_SERVER_0_0_1,"odoo-accounting":ODOO_ACCOUNTING_MCP_SERVER_0_0_1,odoo:ODOO_MCP_SERVER_0_0_1,salesforce:SALESFORCE_MCP_SERVER_0_0_1,slack:SLACK_MCP_SERVER_0_0_1,tavily:TAVILY_MCP_SERVER_0_0_1},ACCOUNTING_SKILL_SPEC_0_0_1={id:"accounting",version:"0.0.1",name:"Accounting Skill",description:"Accounting analysis workflows for reconciliation, close, variance, and audit-ready summaries",module:"agent_skills.skills.accounting",package:void 0,method:void 0,path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["pandas>=2.0.0"],tags:["accounting","finance","reconciliation","close"],icon:"@primer/octicons-react:book",emoji:"🧮",enabled:!1},CRAWL_SKILL_SPEC_0_0_1={id:"crawl",version:"0.0.1",name:"Web Crawl Skill",description:"Web crawling and content extraction capabilities",module:"agent_skills.skills.crawl",package:void 0,method:void 0,path:void 0,requiredEnvVars:["TAVILY_API_KEY:0.0.1"],optionalEnvVars:[],dependencies:["requests>=2.31.0","beautifulsoup4>=4.12.0"],tags:["web","crawl","scraping"],icon:"@primer/octicons-react:globe",emoji:"🌐",enabled:!0},EVENTS_SKILL_SPEC_0_0_1={id:"events",version:"0.0.1",name:"Events Skill",description:"Event generation, enrichment, and lifecycle orchestration",module:"agent_skills.skills.events",package:void 0,method:void 0,path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["httpx>=0.27.0"],tags:["events","orchestration","automation"],icon:"@primer/octicons-react:calendar",emoji:"📅",enabled:!1},GITHUB_SKILL_SPEC_0_0_1={id:"github",version:"0.0.1",name:"GitHub Skill",description:"GitHub repository management and code operations",module:"agent_skills.skills.github",package:void 0,method:void 0,path:void 0,requiredEnvVars:["GITHUB_TOKEN:0.0.1"],optionalEnvVars:[],dependencies:["PyGithub>=2.1.0"],tags:["github","git","code"],icon:"@datalayer/icons-react:github-mark",emoji:"🐙",enabled:!1},JOKES_SKILL_SPEC_0_0_1={id:"jokes",version:"0.0.1",name:"Jokes Skill",description:"Return random jokes from a local path-based skill.",module:void 0,package:void 0,method:void 0,path:"jokes",requiredEnvVars:[],optionalEnvVars:[],dependencies:[],tags:["fun","humor","demo"],icon:"@primer/octicons-react:smiley",emoji:"😄",enabled:!1},PDF_SKILL_SPEC_0_0_1={id:"pdf",version:"0.0.1",name:"PDF Processing Skill",description:"PDF document reading, parsing, and extraction",module:"agent_skills.skills.pdf",package:void 0,method:void 0,path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["PyPDF2>=3.0.0","pdfplumber>=0.10.0"],tags:["pdf","documents","extraction"],icon:"@primer/octicons-react:file",emoji:"📄",enabled:!1},TEXT_SUMMARIZER_SKILL_SPEC_0_0_1={id:"text-summarizer",version:"0.0.1",name:"Text Summarizer Skill",description:"Summarize text content using extractive and abstractive techniques. Use when the user asks for summaries, key points, or condensed versions of documents.",module:void 0,package:"agent_skills.skills.text_summarizer",method:"summarize_text",path:void 0,requiredEnvVars:[],optionalEnvVars:[],dependencies:["agent-skills>=0.0.1"],tags:["nlp","summarization","text-processing"],icon:"@primer/octicons-react:note",emoji:"📝",enabled:!1},SKILLS_CATALOG={accounting:ACCOUNTING_SKILL_SPEC_0_0_1,crawl:CRAWL_SKILL_SPEC_0_0_1,events:EVENTS_SKILL_SPEC_0_0_1,github:GITHUB_SKILL_SPEC_0_0_1,jokes:JOKES_SKILL_SPEC_0_0_1,pdf:PDF_SKILL_SPEC_0_0_1,"text-summarizer":TEXT_SUMMARIZER_SKILL_SPEC_0_0_1},CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1={id:"create-plan",version:"0.0.1",name:"Create Plan",description:"Create a plan with multiple steps and emit an AG-UI state snapshot.",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"create_plan"},icon:"@primer/octicons-react:list-unordered",emoji:"📋"},CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1={id:"current-time",version:"0.0.1",name:"Current Time",description:"Return the current time in ISO format for a given timezone.",tags:["example","ag-ui","time"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"current_time"},icon:"@primer/octicons-react:clock",emoji:"🕒"},DECIDE_BACKEND_TOOL_SPEC_0_0_1={id:"decide",version:"0.0.1",name:"Decide",description:"Ask Jev typed questions about a text — noul (does a statement hold, with its probability), choice (one of named options) or score (a step on a rubric) — and get the typed answers back, through datalayer-ai-inference.",tags:["runtime","decisions","jev"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.tools.decisions",method:"decide"},icon:"@primer/octicons-react:law",emoji:"⚖️"},DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1={id:"display-recipe",version:"0.0.1",name:"Display Recipe",description:"Update the shared recipe state and emit an AG-UI state snapshot.",tags:["example","ag-ui","shared-state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"display_recipe"},icon:"@primer/octicons-react:book",emoji:"🍳"},EXAMPLE_CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1={id:"example-create-plan",version:"0.0.1",name:"Create Plan",description:"Create a plan with multiple steps and emit an AG-UI state snapshot.",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"create_plan"},icon:"@primer/octicons-react:list-unordered",emoji:"📋"},EXAMPLE_CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1={id:"example-current-time",version:"0.0.1",name:"Current Time",description:"Return the current time in ISO format for a given timezone.",tags:["example","ag-ui","time"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"current_time"},icon:"@primer/octicons-react:clock",emoji:"🕒"},EXAMPLE_DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1={id:"example-display-recipe",version:"0.0.1",name:"Display Recipe",description:"Update the shared recipe state and emit an AG-UI state snapshot.",tags:["example","ag-ui","shared-state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"display_recipe"},icon:"@primer/octicons-react:book",emoji:"🍳"},EXAMPLE_GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1={id:"example-generate-haiku",version:"0.0.1",name:"Generate Haiku",description:"Generate a haiku (Japanese + English + gradient) rendered as a card by the frontend.",tags:["example","ag-ui","generative-ui"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_haiku"},icon:"@primer/octicons-react:pencil",emoji:"🖋️"},EXAMPLE_GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1={id:"example-generate-task-steps",version:"0.0.1",name:"Generate Task Steps",description:"Generate task steps for human review and emit an AG-UI state snapshot.",tags:["example","ag-ui","human-in-the-loop"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_task_steps"},icon:"@primer/octicons-react:tasklist",emoji:"🙋"},EXAMPLE_GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1={id:"example-get-weather",version:"0.0.1",name:"Get Weather",description:"Fetch current weather for a location from the Open-Meteo API for frontend rendering.",tags:["example","ag-ui","weather"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"get_weather"},icon:"@primer/octicons-react:sun",emoji:"🌤️"},EXAMPLE_RENDER_A2UI_SURFACE_BACKEND_TOOL_SPEC_0_0_1={id:"example-render-a2ui-surface",version:"0.0.1",name:"Render A2UI Surface",description:"Turn a declarative field spec into a validated A2UI v0.9 surface rendered live by the frontend as an interactive form/card.",tags:["example","ag-ui","a2ui","generative-ui"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.a2ui",method:"render_a2ui_surface"},icon:"@primer/octicons-react:browser",emoji:"🎛️"},EXAMPLE_UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1={id:"example-update-plan-step",version:"0.0.1",name:"Update Plan Step",description:"Update a plan step and emit an AG-UI state delta (JSON Patch RFC 6902).",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"update_plan_step"},icon:"@primer/octicons-react:checklist",emoji:"✅"},GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1={id:"generate-haiku",version:"0.0.1",name:"Generate Haiku",description:"Generate a haiku (Japanese + English + gradient) rendered as a card by the frontend.",tags:["example","ag-ui","generative-ui"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_haiku"},icon:"@primer/octicons-react:pencil",emoji:"🖋️"},GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1={id:"generate-task-steps",version:"0.0.1",name:"Generate Task Steps",description:"Generate task steps for human review and emit an AG-UI state snapshot.",tags:["example","ag-ui","human-in-the-loop"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"generate_task_steps"},icon:"@primer/octicons-react:tasklist",emoji:"🙋"},GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1={id:"get-weather",version:"0.0.1",name:"Get Weather",description:"Fetch current weather for a location from the Open-Meteo API for frontend rendering.",tags:["example","ag-ui","weather"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"get_weather"},icon:"@primer/octicons-react:sun",emoji:"🌤️"},RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1={id:"runtime-echo",version:"0.0.1",name:"Runtime Echo",description:"Echo text back to the caller for quick runtime verification.",tags:["runtime","utility"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools",method:"runtime_echo"},icon:"@primer/octicons-react:comment",emoji:"💬"},RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1={id:"runtime-send-mail",version:"0.0.1",name:"Runtime Send Mail (Fake)",description:"Fake mail sender for tool approval demos; returns a simulated send receipt.",tags:["runtime","approval","mail"],enabled:!0,approval:"manual",timeout:void 0,requiresApproval:!0,runtime:{language:"python",package:"agent_runtimes.examples.tools",method:"runtime_send_mail"},icon:"@primer/octicons-react:mail",emoji:"📧"},RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1={id:"runtime-sensitive-echo",version:"0.0.1",name:"Runtime Sensitive Echo",description:"Echo text with a manual approval checkpoint before execution.",tags:["runtime","approval"],enabled:!0,approval:"manual",timeout:void 0,requiresApproval:!0,runtime:{language:"python",package:"agent_runtimes.examples.tools",method:"runtime_sensitive_echo"},icon:"@primer/octicons-react:shield",emoji:"🛡️"},UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1={id:"update-plan-step",version:"0.0.1",name:"Update Plan Step",description:"Update a plan step and emit an AG-UI state delta (JSON Patch RFC 6902).",tags:["example","ag-ui","state"],enabled:!0,approval:"auto",timeout:void 0,requiresApproval:!1,runtime:{language:"python",package:"agent_runtimes.examples.tools.ag_ui",method:"update_plan_step"},icon:"@primer/octicons-react:checklist",emoji:"✅"},BACKEND_TOOL_CATALOG={"create-plan":CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1,"current-time":CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1,decide:DECIDE_BACKEND_TOOL_SPEC_0_0_1,"display-recipe":DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1,"example-create-plan":EXAMPLE_CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1,"example-current-time":EXAMPLE_CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1,"example-display-recipe":EXAMPLE_DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1,"example-generate-haiku":EXAMPLE_GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1,"example-generate-task-steps":EXAMPLE_GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1,"example-get-weather":EXAMPLE_GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1,"example-render-a2ui-surface":EXAMPLE_RENDER_A2UI_SURFACE_BACKEND_TOOL_SPEC_0_0_1,"example-update-plan-step":EXAMPLE_UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1,"generate-haiku":GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1,"generate-task-steps":GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1,"get-weather":GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1,"runtime-echo":RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1,"runtime-send-mail":RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1,"runtime-sensitive-echo":RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1,"update-plan-step":UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1},DECKS_FRONTEND_TOOL_SPEC_0_0_1={id:"decks",version:"0.0.1",name:"Decks",description:"Read, write and drive presentations kept as data — a deck, its slides, and the one on screen.",tags:["frontend","decks","presentations"],enabled:!0,toolset:["decks_list_decks","decks_get_deck","decks_create_deck","decks_update_deck","decks_update_slide","decks_insert_slide","decks_delete_slide","decks_list_slides","decks_get_slide","decks_add_slide","decks_delete_deck","decks_list","decks_open","decks_go_to_slide","decks_next_slide","decks_previous_slide","decks_present","decks_print"],icon:"@primer/octicons-react:project",emoji:"🃏"},JUPYTER_NOTEBOOK_EDIT_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook-edit",version:"0.0.1",name:"Jupyter Notebook (edit)",description:"Read and edit a notebook, and run cells — but never delete from it.",tags:["frontend","notebook","edit"],enabled:!0,toolset:["readCell","readAllCells","insertCell","updateCell","runCell","executeCode"],icon:"@datalayer/icons-react:jupyter",emoji:"📓"},JUPYTER_NOTEBOOK_PROPOSE_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook-propose",version:"0.0.1",name:"Jupyter Notebook (propose)",description:"Read a notebook and propose changes for a person to accept, never applying them.",tags:["frontend","notebook","propose"],enabled:!0,toolset:["readCell","readAllCells","proposeCellUpdate","runCell"],icon:"@datalayer/icons-react:jupyter",emoji:"📓"},JUPYTER_NOTEBOOK_READ_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook-read",version:"0.0.1",name:"Jupyter Notebook (read only)",description:"Read a notebook without changing it — cells, outputs and errors.",tags:["frontend","notebook","read"],enabled:!0,toolset:["readCell","readAllCells"],icon:"@datalayer/icons-react:jupyter",emoji:"📓"},JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1={id:"jupyter-notebook",version:"0.0.1",name:"Jupyter Notebook",description:"Frontend tools for interacting with Jupyter notebooks.",tags:["frontend","notebook","jupyter-server"],enabled:!0,toolset:"all",icon:"@datalayer/icons-react:jupyter",emoji:"📓"},LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1={id:"lexical-document",version:"0.0.1",name:"Lexical Document",description:"Frontend tools for interacting with Lexical documents: reading and writing blocks, running Jupyter cells in the page, and drawing diagrams into the document with Excalidraw.",tags:["frontend","document","lexical","drawing","diagram"],enabled:!0,toolset:"all",icon:"@primer/octicons-react:file",emoji:"📄"},FRONTEND_TOOL_CATALOG={decks:DECKS_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-edit":JUPYTER_NOTEBOOK_EDIT_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-propose":JUPYTER_NOTEBOOK_PROPOSE_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-read":JUPYTER_NOTEBOOK_READ_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook":JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1,"lexical-document":LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1},MCP_SERVER_MAP$1={"alphavantage:0.0.1":ALPHAVANTAGE_MCP_SERVER_0_0_1,"chart:0.0.1":CHART_MCP_SERVER_0_0_1,"earthdata:0.0.1":EARTHDATA_MCP_SERVER_0_0_1,"eurus:0.0.1":EURUS_MCP_SERVER_0_0_1,"filesystem:0.0.1":FILESYSTEM_MCP_SERVER_0_0_1,"github:0.0.1":GITHUB_MCP_SERVER_0_0_1,"google-workspace:0.0.1":GOOGLE_WORKSPACE_MCP_SERVER_0_0_1,"huggingface:0.0.1":HUGGINGFACE_MCP_SERVER_0_0_1,"kaggle:0.0.1":KAGGLE_MCP_SERVER_0_0_1,"odoo:0.0.1":ODOO_MCP_SERVER_0_0_1,"salesforce:0.0.1":SALESFORCE_MCP_SERVER_0_0_1,"slack:0.0.1":SLACK_MCP_SERVER_0_0_1,"tavily:0.0.1":TAVILY_MCP_SERVER_0_0_1},SKILL_MAP$1={"accounting:0.0.1":ACCOUNTING_SKILL_SPEC_0_0_1,"crawl:0.0.1":CRAWL_SKILL_SPEC_0_0_1,"events:0.0.1":EVENTS_SKILL_SPEC_0_0_1,"github:0.0.1":GITHUB_SKILL_SPEC_0_0_1,"jokes:0.0.1":JOKES_SKILL_SPEC_0_0_1,"pdf:0.0.1":PDF_SKILL_SPEC_0_0_1,"text-summarizer:0.0.1":TEXT_SUMMARIZER_SKILL_SPEC_0_0_1};function toAgentSkillSpec$1(Au){return{id:Au.id,name:Au.name,description:Au.description,version:Au.version??"0.0.1",tags:Au.tags,enabled:Au.enabled,requiredEnvVars:Au.requiredEnvVars}}const TOOL_MAP$1={"decide:0.0.1":DECIDE_BACKEND_TOOL_SPEC_0_0_1,"example-create-plan:0.0.1":EXAMPLE_CREATE_PLAN_BACKEND_TOOL_SPEC_0_0_1,"example-current-time:0.0.1":EXAMPLE_CURRENT_TIME_BACKEND_TOOL_SPEC_0_0_1,"example-display-recipe:0.0.1":EXAMPLE_DISPLAY_RECIPE_BACKEND_TOOL_SPEC_0_0_1,"example-generate-haiku:0.0.1":EXAMPLE_GENERATE_HAIKU_BACKEND_TOOL_SPEC_0_0_1,"example-generate-task-steps:0.0.1":EXAMPLE_GENERATE_TASK_STEPS_BACKEND_TOOL_SPEC_0_0_1,"example-get-weather:0.0.1":EXAMPLE_GET_WEATHER_BACKEND_TOOL_SPEC_0_0_1,"example-render-a2ui-surface:0.0.1":EXAMPLE_RENDER_A2UI_SURFACE_BACKEND_TOOL_SPEC_0_0_1,"example-update-plan-step:0.0.1":EXAMPLE_UPDATE_PLAN_STEP_BACKEND_TOOL_SPEC_0_0_1,"runtime-echo:0.0.1":RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1,"runtime-send-mail:0.0.1":RUNTIME_SEND_MAIL_BACKEND_TOOL_SPEC_0_0_1,"runtime-sensitive-echo:0.0.1":RUNTIME_SENSITIVE_ECHO_BACKEND_TOOL_SPEC_0_0_1},FRONTEND_TOOL_MAP$1={"decks:0.0.1":DECKS_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-edit:0.0.1":JUPYTER_NOTEBOOK_EDIT_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-propose:0.0.1":JUPYTER_NOTEBOOK_PROPOSE_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook-read:0.0.1":JUPYTER_NOTEBOOK_READ_FRONTEND_TOOL_SPEC_0_0_1,"jupyter-notebook:0.0.1":JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1,"lexical-document:0.0.1":LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1},EXAMPLE_A2A_RESEARCHER_AGENTSPEC_0_0_1={id:"example-a2a-researcher",version:"0.0.1",name:"Example A2A Researcher",description:"A research specialist served over the A2A protocol. Given a topic, gathers the key facts and returns concise, source-aware notes.",tags:["research","a2a"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"search",emoji:"🔎",color:"#0EA5E9",suggestions:[{text:"Gather the key facts on a topic, with sources",summary:"Key facts with sources"}],welcomeMessage:"A2A researcher ready.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:void 0,harness:"pydantic-ai",systemPrompt:"You are a meticulous research specialist, reached by other agents over the A2A protocol. Given a topic, gather the key facts and return concise, source-aware notes. Prefer verifiable claims and flag anything uncertain. Answer with the notes themselves: no preamble, no questions back. You have no tools and no web access: work from what you know, and say when something should be checked.",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"a2a",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_A2A_WRITER_AGENTSPEC_0_0_1={id:"example-a2a-writer",version:"0.0.1",name:"Example A2A Writer",description:"A writing specialist served over the A2A protocol. Given notes or instructions, produces clear, well-structured prose.",tags:["writing","a2a"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"pencil",emoji:"✍️",color:"#F59E0B",suggestions:[{text:"Turn a set of notes into a short, structured write-up",summary:"Notes into a write-up"}],welcomeMessage:"A2A writer ready.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:void 0,harness:"pydantic-ai",systemPrompt:"You are a concise writing specialist, reached by other agents over the A2A protocol. Given notes or findings, produce clear, well-structured prose. Keep it focused and free of filler. Answer with the text itself: no preamble, no questions back. You have no tools: work from the notes and instructions you are given.",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"a2a",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_A2A_AGENTSPEC_0_0_1={id:"example-a2a",version:"0.0.1",name:"Example A2A Agent",description:"Demonstrates delegation to separate agents over the A2A protocol. The orchestrator hands research and writing to a researcher and a writer that run as agents of their own — launched beside it on the local server, or on Datalayer runtimes when it runs in the cloud — and talks to them over A2A.",tags:["research","workflow","a2a"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"broadcast",emoji:"📡",color:"#7C3AED",suggestions:[{text:"Research three key facts about the A2A protocol through the researcher, then have the writer turn them into one short paragraph.",summary:"Research then write over A2A"},{text:"Have the researcher gather five source-backed notes on Jupyter kernels and report them to me as they are.",summary:"Research via the A2A researcher"},{text:"Have the writer draft a short guide to naming variables from these points: be specific, prefer words to abbreviations, keep units in the name.",summary:"Draft via the A2A writer"}],welcomeMessage:"A2A example agent ready. Ask me to delegate research and writing to the agents I reach over A2A.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:'You are the A2A Orchestrator. You do not research or write yourself: you split a request into specialist tasks and hand each to a separate agent reached over the A2A protocol, then synthesize their answers into one coherent reply.\nYour agents are `researcher` — facts, background, source-backed notes — and `writer` — clear, structured prose from notes or instructions. Reach them with `delegate_task`, naming the agent; a request to "research and write" is two delegations, the researcher\'s notes handed to the writer. Give each a task it can carry out without the rest of this conversation. The first delegation to an agent may take a moment while it is launched.\nAnswer in the conversation, and only with the tools you actually have; never call a tool you were not given.',systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:{includeGeneralPurpose:!1,subagents:[{name:"researcher",description:"A separate research agent, reached over A2A. Gathers facts and source-backed notes on a topic; use for research, fact-finding and background gathering.",ref:"example-a2a-researcher:0.0.1",a2a:{launch:"auto"}},{name:"writer",description:"A separate writing agent, reached over A2A. Turns notes into clear, well-structured prose; use for summaries, drafts and final write-ups.",ref:"example-a2a-writer:0.0.1",a2a:{launch:"auto"}}]}},EXAMPLE_A2UI_AGENT_SPEC_0_0_1={id:"example-a2ui-agent",version:"0.0.1",name:"A2UI Agent",description:"An AG-UI agent that generates interactive A2UI surfaces on demand. Describe a form, intake, configurator, survey or booking flow and the agent renders a validated, themeable A2UI surface you can fill in.",tags:["workflow","automation","analysis"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["example-render-a2ui-surface:0.0.1"]],frontendTools:[],frontendRenderTools:[{tool:"render_a2ui_surface",renderer:"a2ui-surface"}],environmentName:"ai-agents-env",icon:"browser",emoji:"🎛️",color:"#6366F1",suggestions:[{text:"Build a support ticket intake form with category, priority and a description.",summary:"Support ticket form"},{text:"Create a trip booking form with destination, dates, travelers and budget.",summary:"Trip booking form"},{text:"Generate a customer feedback survey with a rating slider and comments.",summary:"Feedback survey"},{text:"Make a product configurator for a laptop with CPU, RAM and add-ons.",summary:"Laptop configurator"}],welcomeMessage:`Hi! I turn requests into interactive A2UI surfaces. Ask me to build a form, survey, configurator or booking flow and I'll render it live for you.
2423
2423
  `,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:void 0,harness:"pydantic-ai",systemPrompt:"You are an A2UI generative-UI agent. You render real, interactive user\ninterfaces (forms, intakes, configurators, surveys, bookings, checklists)\nfrom the user's request.\n\nHow to respond:\n1. ALWAYS call the `render_a2ui_surface` tool to produce the UI. Never\n describe the form in prose instead of rendering it.\n2. Choose a concise `title` and a one-sentence `intro`.\n3. Design a sensible ordered list of `fields`. Pick the best `type` for each:\n - `text` / `email` for short input, `longtext` for descriptions/notes\n - `choice` (single) or `multichoice` (many) with `options` for pick-lists\n - `checkbox` for yes/no, `slider` (with `min`/`max`) for ranges/ratings\n - `date` / `datetime` for scheduling\n4. When the request implies triage or categorization (e.g. support tickets),\n add `summary_items` such as detected Category or Priority.\n5. Keep forms focused: usually 4-8 fields.\n6. After the tool call, reply with ONE short sentence confirming what you\n built. Do NOT repeat every field in text — the surface is shown directly.\n",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"ag-ui",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_A2UI_JUPYTER_OUTPUT_AGENTSPEC_0_0_1={id:"example-a2ui-jupyter-output",version:"0.0.1",name:"A2UI Jupyter Output Agent",description:"Drives the A2UI Jupyter Output example by selecting a kernel-output demonstration and asking the frontend to execute it in the connected sandbox.",tags:["a2ui","jupyter","output"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:"notebook",emoji:"📓",color:"#0969DA",suggestions:[{text:"Run something in the code sandbox that prints as it goes.",summary:"Streaming output",emoji:"📜"},{text:"Plot a chart in the code sandbox and show me the image.",summary:"Plot a chart",emoji:"📈"},{text:"Build a small DataFrame in the code sandbox and show it as a table.",summary:"DataFrame as a table",emoji:"🧮"},{text:"Run something in the code sandbox that fails, so I can see the traceback.",summary:"Show a traceback",emoji:"🐛"},{text:"Show me an interactive slider from the code sandbox.",summary:"Interactive slider",emoji:"🎛️"},{text:"Give me a surface with buttons I can press.",summary:"Buttons to press",emoji:"🖲️"}],welcomeMessage:"Choose a suggestion to execute a Jupyter output demonstration and compare the kernel output with its A2UI surface.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You operate the A2UI Jupyter Output example. It exists to show one code\nsandbox execution twice over: what the kernel itself returned, and the A2UI\nsurface the server converter made of the same outputs.\n\nShowing that comparison is done with one tool and nothing else:\n`run_jupyter_output_demo`, whose `kind` is one of `stream`, `figure`,\n`table`, `error`, `ipywidgets`, or `interactive`.\n\nSo: whenever somebody asks you to run something in the code sandbox, or to\nshow what some kind of output looks like, call `run_jupyter_output_demo`\nexactly once with the kind that matches what they asked for. They will ask\nin ordinary words rather than by naming the tool or the kind, and reading\nthe request is your job:\n\n- printing, stdout, output arriving as it goes, a returned value -> `stream`\n- a plot, a chart, a figure, an image -> `figure`\n- a DataFrame, a table, tabular data -> `table`\n- a failure, an exception, a traceback, something that breaks -> `error`\n- a slider, a widget, an interactive control -> `ipywidgets`\n- a surface with buttons, something to press or click -> `interactive`\n\nNever write or execute Python of your own instead. The six demonstrations\nare fixed on purpose: the two panels are only worth comparing when both are\nshowing the same execution, and substituted code breaks the comparison the\nexample exists to make.\n\nAfter the tool returns, say in a sentence what was run and that it is now\nvisible in both the A2UI Surface and the Jupyter Output panels, with a word\non what differs between them where it is interesting. An `error`\ndemonstration is deliberate and has succeeded when its traceback is on\nscreen — do not apologise for it or offer to fix the code.\n",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"vercel-ai",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_A2UI_VIEWER_AGENTSPEC_0_0_1={id:"example-a2ui-viewer",version:"0.0.1",name:"A2UI Viewer Agent",description:"Answers beside the A2UI Viewer, whose scenes — a recipe card, a booking form, a sales snapshot and a shipping status — it renders on request as live A2UI surfaces, and runs code in the sandbox to show its outputs.",tags:["a2ui","viewer","loop"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["example-render-a2ui-surface:0.0.1"]],frontendTools:[],frontendRenderTools:[{tool:"render_a2ui_surface",renderer:"a2ui-surface"}],environmentName:"ai-agents-env",icon:"browser",emoji:"🔍",color:"#6366F1",suggestions:[{text:"Show a recipe card for a Mediterranean quinoa bowl, with a photo, its rating and review count, prep and cook time, and how many it serves.",summary:"Recipe Card",emoji:"🍲"},{text:"Build a table booking form with party size, date and time, dietary requirements and a Submit Reservation button.",summary:"Booking Form",emoji:"📅"},{text:"Show a Q2 sales snapshot by category — Apparel, Electronics, Home Goods and Health & Beauty — as KPI tiles under one headline.",summary:"Sales Snapshot",emoji:"📈"},{text:"Show a package status card with the tracking number, the steps from placed to shipped to out for delivery, and the ETA.",summary:"Shipping Status",emoji:"📦"},{text:"Plot a chart in the code sandbox and show me the image.",summary:"Plot a chart",emoji:"📈"},{text:"Build a small DataFrame in the code sandbox and show it as a table.",summary:"DataFrame as a table",emoji:"🧮"},{text:"Run something in the code sandbox that fails, so I can see the traceback.",summary:"Show a traceback",emoji:"🐛"},{text:"Show me an interactive slider from the code sandbox.",summary:"Interactive slider",emoji:"🎛️"}],welcomeMessage:"This is the A2UI Viewer. Pick a scene above to see a surface drawn from A2UI messages, ask me to render one of them here, or run something in the code sandbox and see its output.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"browser",harness:"vercel-ai",systemPrompt:"You answer beside the A2UI Viewer, an example that renders A2UI surfaces\nfrom pasted protocol messages: a recipe card, a table booking form, a sales\nsnapshot of KPI tiles, and a shipping status timeline.\n\nWhen asked for a surface — one of those, or anything like them:\n1. ALWAYS call the `render_a2ui_surface` tool to produce it. Never describe\n the surface in prose instead of rendering it.\n2. Choose a concise `title` and a one-sentence `intro`.\n3. Design a sensible ordered list of `fields`, picking the best `type` for\n each: `text` / `email` for short input, `longtext` for notes, `choice`\n or `multichoice` with `options` for pick-lists, `checkbox` for yes/no,\n `slider` with `min`/`max` for ranges and ratings, `date` / `datetime`\n for scheduling. A card that shows values rather than asking for them\n still renders as a surface: put each value in a field with its label.\n4. After the tool call, reply with ONE short sentence saying what you\n rendered. Do not repeat the fields in text — the surface is shown.\n\nWhen asked to run code, use `execute_code` in the sandbox and let the\noutputs speak: a figure, a table, a traceback, a widget. Do not look for\nhelpers or skills in the sandbox; write the Python yourself.\n",systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"vercel-ai",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_AGENT_CRITIC_LOOP_FOR_ANALYSIS_AGENTSPEC_0_0_1={id:"example-agent-critic-loop-for-analysis",version:"0.0.1",name:"Agent Critic Loop for Analysis",description:"Use a planner, executor, and critic agent loop to iteratively improve analysis quality and reduce logical errors in outputs.",tags:["analysis","data-quality","analytics"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"sync",emoji:"📊",color:"#1F883D",suggestions:[{text:"Use /home/datalayer/datasets/datalayer-nfs/finance/transactions_q1.csv and run a critic loop: first produce a reconciliation analysis, then critique it for gaps and publish a corrected final report.",summary:"Critic loop on transactions"}],welcomeMessage:"Hi! I can help with agent critic loop for analysis. Share data, files, or context and I will run the workflow end-to-end, explain what matters, and suggest practical next steps.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are a specialized assistant for this gallery workflow: Agent Critic Loop for Analysis. Objective: Use a planner, executor, and critic agent loop to iteratively improve analysis quality and reduce logical errors in outputs. Use the runtime tools and notebook execution environment when needed. Keep outputs concise, structured, and decision-oriented. Provide clear reasoning and recommended next actions.",systemPromptCodemodeAddons:"Compose focused execution steps, validate intermediate results, and summarize outcomes after each run. Prefer efficient, reproducible code paths.",goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0,token_reduction:"~80%",speedup:"~1.5x"},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_AGENTIC_CHAT_AGENTSPEC_0_0_1={id:"example-agentic-chat",version:"0.0.1",name:"Agentic Chat",description:"A basic conversational AG-UI agent that can chat and use a tool to get the current time in any timezone.",tags:["workflow","automation","analysis"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["example-current-time:0.0.1"]],frontendTools:[],environmentName:"ai-agents-env",icon:"clock",emoji:"🕒",color:"#6366F1",suggestions:[{text:"What is the current time?",summary:"Current time"},{text:"What's the current date?",summary:"Current date"}],welcomeMessage:`Hi! Ask me for the current time in any timezone.
2424
2424
  `,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:void 0,harness:"pydantic-ai",systemPrompt:`You are a helpful assistant that can provide the current time in any timezone. Use the current_time tool when asked about the time. Keep your responses concise and helpful.
2425
2425
  `,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"ag-ui",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_AGENTIC_GENERATIVE_UI_AGENTSPEC_0_0_1={id:"example-agentic-generative-ui",version:"0.0.1",name:"Agentic Generative UI",description:"An AG-UI agent that creates plans with steps and updates individual steps as progress is made using JSON Patch (RFC 6902) state deltas.",tags:["workflow","automation","analysis"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["example-create-plan:0.0.1"],TOOL_MAP$1["example-update-plan-step:0.0.1"]],frontendTools:[],environmentName:"ai-agents-env",icon:"list-unordered",emoji:"📋",color:"#6366F1",suggestions:[{text:"Create a project plan for building a mobile app.",summary:"Mobile app plan"},{text:"Generate a marketing strategy for a new product launch.",summary:"Marketing strategy"}],welcomeMessage:`Hi! Give me a goal and I'll create a plan, then work through the steps.
@@ -2487,7 +2487,7 @@ contemplation. That said, any topic is fair game.
2487
2487
 
2488
2488
  Do not repeat the haiku content in your text response - the UI will display it
2489
2489
  beautifully. Just acknowledge that you've created the haiku.
2490
- `,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"ag-ui",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_CLAUDE_CODE_AGENTSPEC_0_0_1={id:"example-harness-claude-code",version:"0.0.1",name:"A Claude Code Agent",description:"Claude Code as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"claude-code",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_CODEX_AGENTSPEC_0_0_1={id:"example-harness-codex",version:"0.0.1",name:"A Codex Agent",description:"OpenAI's Codex as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's OPENAI_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"codex",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_FAST_AGENT_SPEC_0_0_1={id:"example-harness-fast-agent",version:"0.0.1",name:"A fast-agent Agent",description:"fast-agent as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"fast-agent",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_GEMINI_CLI_AGENTSPEC_0_0_1={id:"example-harness-gemini-cli",version:"0.0.1",name:"A Gemini CLI Agent",description:"Google's Gemini CLI as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's GEMINI_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"gemini-cli",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_GOOSE_AGENTSPEC_0_0_1={id:"example-harness-goose",version:"0.0.1",name:"A goose Agent",description:"goose as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"goose",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_OPENCODE_AGENTSPEC_0_0_1={id:"example-harness-opencode",version:"0.0.1",name:"An OpenCode Agent",description:"OpenCode as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"opencode",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1={id:"example-harness-openhands",version:"0.0.1",name:"An OpenHands Agent",description:"The OpenHands CLI as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's LLM_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"openhands",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HOOKS_AGENTSPEC_0_0_1={id:"example-hooks",version:"0.0.1",name:"Example Hooks Agent",description:"Demonstrates pre-hooks and post-hooks executed in the sandbox lifecycle.",tags:["workflow","automation","analysis"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[],environmentName:"ai-agents-env",icon:"zap",emoji:"🪝",color:"#0E7490",suggestions:[{text:"Read the pre-hook marker file at /tmp/agent_runtimes_pre_hook_demo.txt using execute_code.",summary:"Read the pre-hook marker"},{text:"Print the hook_ran_at and hook_name variables that the pre-hook set in the sandbox.",summary:"Print the hook variables"},{text:"Run execute_code to verify that the 'rich' package was installed by the pre-hook.",summary:"Verify rich installed"},{text:"Show me all variables that the pre-hook defined in the sandbox namespace.",summary:"Pre-hook variables"},{text:"Call runtime_sensitive_echo with reason 'audit' to trigger per-tool authorization hooks.",summary:"Trigger authorization hooks"},{text:"Use execute_code to read /tmp/agent_runtimes_tool_approvals_audit.jsonl and summarize the latest authorization + execution entries.",summary:"Summarize the audit log"}],welcomeMessage:`I ran a pre-hook before starting up. It installed the 'rich' package, wrote a marker file, and set several sandbox variables (hook_name, hook_ran_at, hook_env). Ask me to read the file or inspect those variables.
2490
+ `,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:"ag-ui",ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_CLAUDE_CODE_AGENTSPEC_0_0_1={id:"example-harness-claude-code",version:"0.0.1",name:"A Claude Code Agent",description:"Claude Code as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"claude-code",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_CODEX_AGENTSPEC_0_0_1={id:"example-harness-codex",version:"0.0.1",name:"A Codex Agent",description:"OpenAI's Codex as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's OPENAI_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"codex",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_FAST_AGENT_SPEC_0_0_1={id:"example-harness-fast-agent",version:"0.0.1",name:"A fast-agent Agent",description:"fast-agent as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"fast-agent",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_GEMINI_CLI_AGENTSPEC_0_0_1={id:"example-harness-gemini-cli",version:"0.0.1",name:"A Gemini CLI Agent",description:"Google's Gemini CLI as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's GEMINI_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"gemini-cli",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_GOOSE_AGENTSPEC_0_0_1={id:"example-harness-goose",version:"0.0.1",name:"A goose Agent",description:"goose as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"goose",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_OPENCODE_AGENTSPEC_0_0_1={id:"example-harness-opencode",version:"0.0.1",name:"An OpenCode Agent",description:"OpenCode as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"opencode",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1={id:"example-harness-openhands",version:"0.0.1",name:"An OpenHands Agent",description:"The OpenHands CLI as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's LLM_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"openhands",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HARNESS_PI_AGENTSPEC_0_0_1={id:"example-harness-pi",version:"0.0.1",name:"A pi Agent",description:"pi as a Datalayer agent: launched in the runtime over the Agent Client Protocol, its files, terminals and permissions decided by the Shield under the application's Rules, every action in the record. Needs the account's ANTHROPIC_API_KEY.",tags:["coding","harness","acp"],domain:void 0,enabled:!1,model:void 0,mcpServers:[],skills:[].filter(Boolean),backendTools:[],frontendTools:[],environmentName:"ai-agents-env",icon:void 0,emoji:void 0,color:void 0,suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pi",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:void 0,delegable:[],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},EXAMPLE_HOOKS_AGENTSPEC_0_0_1={id:"example-hooks",version:"0.0.1",name:"Example Hooks Agent",description:"Demonstrates pre-hooks and post-hooks executed in the sandbox lifecycle.",tags:["workflow","automation","analysis"],domain:void 0,enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[],environmentName:"ai-agents-env",icon:"zap",emoji:"🪝",color:"#0E7490",suggestions:[{text:"Read the pre-hook marker file at /tmp/agent_runtimes_pre_hook_demo.txt using execute_code.",summary:"Read the pre-hook marker"},{text:"Print the hook_ran_at and hook_name variables that the pre-hook set in the sandbox.",summary:"Print the hook variables"},{text:"Run execute_code to verify that the 'rich' package was installed by the pre-hook.",summary:"Verify rich installed"},{text:"Show me all variables that the pre-hook defined in the sandbox namespace.",summary:"Pre-hook variables"},{text:"Call runtime_sensitive_echo with reason 'audit' to trigger per-tool authorization hooks.",summary:"Trigger authorization hooks"},{text:"Use execute_code to read /tmp/agent_runtimes_tool_approvals_audit.jsonl and summarize the latest authorization + execution entries.",summary:"Summarize the audit log"}],welcomeMessage:`I ran a pre-hook before starting up. It installed the 'rich' package, wrote a marker file, and set several sandbox variables (hook_name, hook_ran_at, hook_env). Ask me to read the file or inspect those variables.
2491
2491
  `,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"eval",harness:"pydantic-ai",systemPrompt:`You are a demo assistant for lifecycle hooks.
2492
2492
  The sandbox pre-hook ran before this agent started and did three things:
2493
2493
  1. Installed the Python package 'rich' (pip install). 2. Wrote a UTF-8 marker file to /tmp/agent_runtimes_pre_hook_demo.txt
@@ -3147,7 +3147,7 @@ Use only tools actually provided to you.
3147
3147
  `,goal:void 0,delegable:[{id:"data.analyse"},{id:"document.summarise"}],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_SUMMARIZE_DOCUMENTS_AGENTSPEC_0_0_1={id:"worker-summarize-documents",version:"0.0.1",name:"Summarize Documents",description:"A generic document summarization agent that processes PDFs, Word files, Markdown, and plain text. Produces structured executive summaries with key findings, action items, and metadata extraction. Useful across every industry vertical — from legal contracts to research papers.",tags:["personal-assistant","agent-worker","research","document-processing","summarization"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["filesystem:0.0.1"]],skills:[SKILL_MAP$1["pdf:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["pdf:0.0.1"]):void 0,SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"file",emoji:"📄",color:"#8250df",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:void 0,systemPromptCodemodeAddons:void 0,goal:"Summarize uploaded documents (PDFs, Word, Markdown, text) into structured executive summaries. Extract key findings, decisions, action items, dates, and named entities. Output a concise summary (max 500 words) plus metadata in JSON format.",delegable:[{id:"data.extract"},{id:"document.summarise"},{id:"document.extract"},{id:"research.gather"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:{type:"event",event:"document_uploaded",description:"Triggered when a new document is uploaded to the workspace",prompt:"Handle the 'document_uploaded' event and execute the workflow end-to-end."},modelConfig:{temperature:.2,max_tokens:4096},mcpServerTools:[{server:"Document Reader",tools:[{name:"read_pdf",approval:"auto"},{name:"read_docx",approval:"auto"},{name:"extract_text",approval:"auto"}]},{server:"Output Writer",tools:[{name:"write_summary",approval:"auto"},{name:"store_metadata",approval:"auto"}]}],guardrails:[{name:"Default Platform User",identity_provider:"datalayer",identity_name:"doc-agent@acme.com",permissions:{"read:data":!0,"write:data":!0,"execute:code":!0,"access:internet":!1,"send:email":!1,"deploy:production":!1},token_limits:{per_run:"30K",per_day:"300K",per_month:"3M"}}],evals:[{name:"Summarization Accuracy",category:"reasoning",task_count:350},{name:"Key Finding Extraction",category:"reasoning",task_count:280},{name:"Action Item Detection",category:"coding",task_count:200}],codemode:void 0,output:{type:"Markdown",formats:["Markdown","JSON"],template:"executive-summary-v1",storage:"s3://acme-summaries/"},advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:{slack:"#document-summaries",email:"team@acme.com"},memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_SYNC_CRM_CONTACTS_AGENTSPEC_0_0_1={id:"worker-sync-crm-contacts",version:"0.0.1",name:"Sync CRM Contacts",description:"A multi-agent team that collects and aggregates contact data from multiple CRM sources, analyzes and deduplicates records, writes cleaned data back, and generates sync summary reports.",tags:["marketing","agent-worker","sales","crm","data-acquisition"],domain:"marketing",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["filesystem:0.0.1"],MCP_SERVER_MAP$1["slack:0.0.1"]],skills:[SKILL_MAP$1["pdf:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["pdf:0.0.1"]):void 0,SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"people",emoji:"🔄",color:"#0969da",suggestions:[{text:"Run a full CRM contact sync now",summary:"Full CRM sync"},{text:"Show the latest sync report",summary:"Latest sync report"},{text:"How many duplicates were found in the last run?",summary:"Duplicates found"},{text:"List contacts that failed to sync",summary:"Failed contacts"}],welcomeMessage:`Hello! I'm the CRM Contact Sync team orchestrator. I coordinate four specialised agents — Data Collector, Analyzer, Sync Writer, and Report Generator — to keep your CRM contacts clean, deduplicated, and in sync across all platforms.
3148
3148
  `,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:`You are the supervisor of a CRM contact synchronization team. You coordinate four agents in sequence: 1. Data Collector — pulls contact data from Salesforce, HubSpot, and other CRM sources 2. Analyzer — identifies duplicates, patterns, and data quality issues 3. Sync Writer — writes cleaned, merged contacts back to all CRM systems 4. Report Generator — produces sync summary reports and sends notifications Route tasks sequentially. Escalate to human review if any sync operation fails 3 times. Always confirm merge decisions for contacts with conflicting data.
3149
3149
  `,systemPromptCodemodeAddons:void 0,goal:"Collect and aggregate contact data from multiple CRM sources, analyze and deduplicate records, write cleaned data back to CRM systems, and generate sync summary reports with notifications.",delegable:[{id:"data.acquire"},{id:"data.transform"},{id:"data.analyse"},{id:"report.author"},{id:"document.author"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:{type:"schedule",cron:"0 2 * * *",description:`Daily at 02:00 — sync CRM contacts across all sources during off-peak hours.
3150
- `,prompt:"Run the scheduled workflow and produce the configured deliverable."},modelConfig:void 0,mcpServerTools:void 0,guardrails:[{name:"GitHub CI Bot",identity_provider:"github",identity_name:"ci-bot@acme.com",permissions:{"read:data":!0,"write:data":!0,"execute:code":!0,"access:internet":!0,"send:email":!0,"deploy:production":!1},token_limits:{per_run:"60K",per_day:"600K",per_month:"6M"}}],evals:[{name:"Data Quality",category:"coding",task_count:300},{name:"Deduplication Accuracy",category:"reasoning",task_count:150}],codemode:{enabled:!0,token_reduction:"~85%",speedup:"~1.5× faster"},output:{formats:["JSON","PDF"],template:"CRM Sync Report",storage:"/outputs/crm-sync/"},advanced:{cost_limit:"$10.00 per run",time_limit:"600 seconds",max_iterations:100,validation:"All CRM records must reconcile after sync"},checkpoints:void 0,authorizationPolicy:"",notifications:{email:"jennifer.c@company.com",slack:"#crm-sync"},memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_THEMATIC_ANALYSIS_AGENTSPEC_0_0_1={id:"worker-thematic-analysis",version:"0.0.1",name:"Thematic Analyst",description:"Codes transcripts, extracts themes, and organizes qualitative evidence.",tags:["market-analyst","agent-worker"],domain:"market-analyst",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["tavily:0.0.1"],MCP_SERVER_MAP$1["salesforce:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["crawl:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["crawl:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"note",emoji:"🔎",color:"#EC4899",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Thematic Analysis Worker, an autonomous agent worker in the market analyst domain. Codes transcripts, extracts themes, and organizes qualitative evidence. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Code transcripts, extract themes, and organize the supporting evidence.",delegable:[{id:"data.extract"},{id:"data.analyse"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_TRAVEL_RECOMMENDER_AGENTSPEC_0_0_1={id:"worker-travel-recommender",version:"0.0.1",name:"Travel Recommender",description:"Researches travel options and builds personalized itineraries with source comparison.",tags:["personal-assistant","agent-worker"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["tavily:0.0.1"],MCP_SERVER_MAP$1["google-workspace:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["crawl:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["crawl:0.0.1"]):void 0,SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"globe",emoji:"🤖",color:"#A855F7",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Travel Recommender, an autonomous agent worker in the personal assistant domain. Researches travel options and builds personalized itineraries with source comparison. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Research travel options and build a personalized itinerary, comparing sources and prices.",delegable:[{id:"research.gather"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_TRENDS_SEEKER_AGENTSPEC_0_0_1={id:"worker-trends-seeker",version:"0.0.1",name:"Trends Seeker",description:"Tracks emerging trends across sources and summarizes what is gaining momentum.",tags:["personal-assistant","agent-worker"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["tavily:0.0.1"],MCP_SERVER_MAP$1["google-workspace:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["crawl:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["crawl:0.0.1"]):void 0,SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"graph",emoji:"🤖",color:"#A855F7",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Trends Seeker, an autonomous agent worker in the personal assistant domain. Tracks emerging trends across sources and summarizes what is gaining momentum. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Track emerging trends across sources and summarize what is worth attention and why.",delegable:[{id:"document.summarise"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_VARIANT_ANALYSIS_AGENTSPEC_0_0_1={id:"worker-variant-analysis",version:"0.0.1",name:"Variant Analyst",description:"Analyzes genomic variants, annotates findings, and prepares interpretable reports.",tags:["life-sciences","agent-worker"],domain:"life-sciences",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["huggingface:0.0.1"],MCP_SERVER_MAP$1["kaggle:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["pdf:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["pdf:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"beaker",emoji:"🧬",color:"#06B6D4",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Variant Analysis Worker, an autonomous agent worker in the life sciences domain. Analyzes genomic variants, annotates findings, and prepares interpretable reports. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Analyze and annotate genomic variants and produce an interpretable, provenance-tracked report.",delegable:[{id:"data.analyse"},{id:"report.author"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_WEEKLY_EXECUTIVE_BRIEFING_AGENTSPEC_0_0_1={id:"worker-weekly-executive-briefing",version:"0.0.1",name:"Weekly Executive Briefing",description:"Generate a weekly executive summary with KPI deltas, top risks, and recommended actions from operational and analytics data.",tags:["personal-assistant","agent-worker","analytics","reporting","risk"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"lightbulb",emoji:"📊",color:"#1F883D",suggestions:[{text:"Use /home/datalayer/datasets/datalayer-nfs/sales/sales_pipeline.csv to produce a weekly executive briefing with trends, risks, and actions.",summary:"Weekly executive briefing"}],welcomeMessage:"Hi! I can help with weekly executive briefing. Share data, files, or context and I will run the workflow end-to-end, explain what matters, and suggest practical next steps.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are a specialized assistant for this gallery workflow: Weekly Executive Briefing. Objective: Generate a weekly executive summary with KPI deltas, top risks, and recommended actions from operational and analytics data. Use the runtime tools and notebook execution environment when needed. Keep outputs concise, structured, and decision-oriented. Provide clear reasoning and recommended next actions.",systemPromptCodemodeAddons:"Compose focused execution steps, validate intermediate results, and summarize outcomes after each run. Prefer efficient, reproducible code paths.",goal:void 0,delegable:[{id:"data.analyse"},{id:"report.author"}],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0,token_reduction:"~80%",speedup:"~1.5x"},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},AGENTSPECS$1={"example-a2a-researcher":EXAMPLE_A2A_RESEARCHER_AGENTSPEC_0_0_1,"example-a2a-writer":EXAMPLE_A2A_WRITER_AGENTSPEC_0_0_1,"example-a2a":EXAMPLE_A2A_AGENTSPEC_0_0_1,"example-a2ui-agent":EXAMPLE_A2UI_AGENT_SPEC_0_0_1,"example-a2ui-jupyter-output":EXAMPLE_A2UI_JUPYTER_OUTPUT_AGENTSPEC_0_0_1,"example-a2ui-viewer":EXAMPLE_A2UI_VIEWER_AGENTSPEC_0_0_1,"example-agent-critic-loop-for-analysis":EXAMPLE_AGENT_CRITIC_LOOP_FOR_ANALYSIS_AGENTSPEC_0_0_1,"example-agentic-chat":EXAMPLE_AGENTIC_CHAT_AGENTSPEC_0_0_1,"example-agentic-generative-ui":EXAMPLE_AGENTIC_GENERATIVE_UI_AGENTSPEC_0_0_1,"example-ai-creates-dashboards":EXAMPLE_AI_CREATES_DASHBOARDS_AGENTSPEC_0_0_1,"example-ai-explains-notebook-output":EXAMPLE_AI_EXPLAINS_NOTEBOOK_OUTPUT_AGENTSPEC_0_0_1,"example-ai-writes-pandas-code":EXAMPLE_AI_WRITES_PANDAS_CODE_AGENTSPEC_0_0_1,"example-analyze-excel-spreadsheet":EXAMPLE_ANALYZE_EXCEL_SPREADSHEET_AGENTSPEC_0_0_1,"example-backend-tool-rendering":EXAMPLE_BACKEND_TOOL_RENDERING_AGENTSPEC_0_0_1,"example-blank":EXAMPLE_BLANK_AGENTSPEC_0_0_1,"example-build-notebook-with-one-prompt":EXAMPLE_BUILD_NOTEBOOK_WITH_ONE_PROMPT_AGENTSPEC_0_0_1,"example-checkpoints":EXAMPLE_CHECKPOINTS_AGENTSPEC_0_0_1,"example-cloudflare":EXAMPLE_CLOUDFLARE_AGENTSPEC_0_0_1,"example-code-sandbox":EXAMPLE_CODE_SANDBOX_AGENTSPEC_0_0_1,"example-codemode":EXAMPLE_CODEMODE_AGENTSPEC_0_0_1,"example-compaction":EXAMPLE_COMPACTION_AGENTSPEC_0_0_1,"example-compare-two-spreadsheets":EXAMPLE_COMPARE_TWO_SPREADSHEETS_AGENTSPEC_0_0_1,"example-cost-comparison-report":EXAMPLE_COST_COMPARISON_REPORT_AGENTSPEC_0_0_1,"example-decks":EXAMPLE_DECKS_AGENTSPEC_0_0_1,"example-document-agent-sidebar":EXAMPLE_DOCUMENT_AGENT_SIDEBAR_AGENTSPEC_0_0_1,"example-document-agent":EXAMPLE_DOCUMENT_AGENT_SPEC_0_0_1,"example-evals-nocodemode":EXAMPLE_EVALS_NOCODEMODE_AGENTSPEC_0_0_1,"example-evals":EXAMPLE_EVALS_AGENTSPEC_0_0_1,"example-explore-sql-database":EXAMPLE_EXPLORE_SQL_DATABASE_AGENTSPEC_0_0_1,"example-five-ai-agents-analyze-csv":EXAMPLE_FIVE_AI_AGENTS_ANALYZE_CSV_AGENTSPEC_0_0_1,"example-five-notebooks-in-parallel":EXAMPLE_FIVE_NOTEBOOKS_IN_PARALLEL_AGENTSPEC_0_0_1,"example-full":EXAMPLE_FULL_AGENTSPEC_0_0_1,"example-gpt-and-claude-collaborate":EXAMPLE_GPT_AND_CLAUDE_COLLABORATE_AGENTSPEC_0_0_1,"example-guardrails":EXAMPLE_GUARDRAILS_AGENTSPEC_0_0_1,"example-haiku-generative-ui":EXAMPLE_HAIKU_GENERATIVE_UI_AGENTSPEC_0_0_1,"example-harness-claude-code":EXAMPLE_HARNESS_CLAUDE_CODE_AGENTSPEC_0_0_1,"example-harness-codex":EXAMPLE_HARNESS_CODEX_AGENTSPEC_0_0_1,"example-harness-fast-agent":EXAMPLE_HARNESS_FAST_AGENT_SPEC_0_0_1,"example-harness-gemini-cli":EXAMPLE_HARNESS_GEMINI_CLI_AGENTSPEC_0_0_1,"example-harness-goose":EXAMPLE_HARNESS_GOOSE_AGENTSPEC_0_0_1,"example-harness-opencode":EXAMPLE_HARNESS_OPENCODE_AGENTSPEC_0_0_1,"example-harness-openhands":EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1,"example-hooks":EXAMPLE_HOOKS_AGENTSPEC_0_0_1,"example-human-approved-automation":EXAMPLE_HUMAN_APPROVED_AUTOMATION_AGENTSPEC_0_0_1,"example-human-in-the-loop":EXAMPLE_HUMAN_IN_THE_LOOP_AGENTSPEC_0_0_1,"example-inference":EXAMPLE_INFERENCE_AGENTSPEC_0_0_1,"example-long-running-agent-overnight":EXAMPLE_LONG_RUNNING_AGENT_OVERNIGHT_AGENTSPEC_0_0_1,"example-mcp":EXAMPLE_MCP_AGENTSPEC_0_0_1,"example-memory":EXAMPLE_MEMORY_AGENTSPEC_0_0_1,"example-monitoring":EXAMPLE_MONITORING_AGENTSPEC_0_0_1,"example-multi-agent-data-cleaning":EXAMPLE_MULTI_AGENT_DATA_CLEANING_AGENTSPEC_0_0_1,"example-multi-agent-root-cause-analysis":EXAMPLE_MULTI_AGENT_ROOT_CAUSE_ANALYSIS_AGENTSPEC_0_0_1,"example-no-codemode":EXAMPLE_NO_CODEMODE_AGENTSPEC_0_0_1,"example-notifications":EXAMPLE_NOTIFICATIONS_AGENTSPEC_0_0_1,"example-one-trigger-approval":EXAMPLE_ONE_TRIGGER_APPROVAL_AGENTSPEC_0_0_1,"example-one-trigger":EXAMPLE_ONE_TRIGGER_AGENTSPEC_0_0_1,"example-otel":EXAMPLE_OTEL_AGENTSPEC_0_0_1,"example-output":EXAMPLE_OUTPUT_AGENTSPEC_0_0_1,"example-parameters":EXAMPLE_PARAMETERS_AGENTSPEC_0_0_1,"example-replace-excel-pivot-work":EXAMPLE_REPLACE_EXCEL_PIVOT_WORK_AGENTSPEC_0_0_1,"example-resumable-etl-with-checkpoints":EXAMPLE_RESUMABLE_ETL_WITH_CHECKPOINTS_AGENTSPEC_0_0_1,"example-run-python-safely-in-the-cloud":EXAMPLE_RUN_PYTHON_SAFELY_IN_THE_CLOUD_AGENTSPEC_0_0_1,"example-sandbox-colab":EXAMPLE_SANDBOX_COLAB_AGENTSPEC_0_0_1,"example-sandbox-datalayer":EXAMPLE_SANDBOX_DATALAYER_AGENTSPEC_0_0_1,"example-sandbox-docker":EXAMPLE_SANDBOX_DOCKER_AGENTSPEC_0_0_1,"example-sandbox-eval":EXAMPLE_SANDBOX_EVAL_AGENTSPEC_0_0_1,"example-sandbox-jupyter":EXAMPLE_SANDBOX_JUPYTER_AGENTSPEC_0_0_1,"example-sandbox-kaggle":EXAMPLE_SANDBOX_KAGGLE_AGENTSPEC_0_0_1,"example-sandbox-modal":EXAMPLE_SANDBOX_MODAL_AGENTSPEC_0_0_1,"example-sandbox-monty":EXAMPLE_SANDBOX_MONTY_AGENTSPEC_0_0_1,"example-shared-state":EXAMPLE_SHARED_STATE_AGENTSPEC_0_0_1,"example-simple":EXAMPLE_SIMPLE_AGENTSPEC_0_0_1,"example-skills":EXAMPLE_SKILLS_AGENTSPEC_0_0_1,"example-subagents":EXAMPLE_SUBAGENTS_AGENTSPEC_0_0_1,"example-tool-approvals":EXAMPLE_TOOL_APPROVALS_AGENTSPEC_0_0_1,"example-tool-based-generative-ui":EXAMPLE_TOOL_BASED_GENERATIVE_UI_AGENTSPEC_0_0_1,"jupyter-cell-fixer":JUPYTER_CELL_FIXER_AGENTSPEC_0_0_1,"jupyter-data-analyst":JUPYTER_DATA_ANALYST_AGENTSPEC_0_0_1,"jupyter-notebook-compactor":JUPYTER_NOTEBOOK_COMPACTOR_AGENTSPEC_0_0_1,"jupyter-notebook-reproducer":JUPYTER_NOTEBOOK_REPRODUCER_AGENTSPEC_0_0_1,"jupyter-notebook-reviewer":JUPYTER_NOTEBOOK_REVIEWER_AGENTSPEC_0_0_1,"jupyter-notebook-writer":JUPYTER_NOTEBOOK_WRITER_AGENTSPEC_0_0_1,"jupyter-tutor":JUPYTER_TUTOR_AGENTSPEC_0_0_1,"loop-shell":LOOP_SHELL_AGENTSPEC_0_0_1,"worker-accountant":WORKER_ACCOUNTANT_AGENTSPEC_0_0_1,"worker-agent-reviews-sql":WORKER_AGENT_REVIEWS_SQL_AGENTSPEC_0_0_1,"worker-analyze-campaign-performance":WORKER_ANALYZE_CAMPAIGN_PERFORMANCE_AGENTSPEC_0_0_1,"worker-analyze-support-tickets":WORKER_ANALYZE_SUPPORT_TICKETS_AGENTSPEC_0_0_1,"worker-ap-invoice":WORKER_AP_INVOICE_AGENTSPEC_0_0_1,"worker-audit-inventory-levels":WORKER_AUDIT_INVENTORY_LEVELS_AGENTSPEC_0_0_1,"worker-audit-pack-builder":WORKER_AUDIT_PACK_BUILDER_AGENTSPEC_0_0_1,"worker-automate-regulatory-reporting":WORKER_AUTOMATE_REGULATORY_REPORTING_AGENTSPEC_0_0_1,"worker-backtest-auditor":WORKER_BACKTEST_AUDITOR_AGENTSPEC_0_0_1,"worker-bank-reconciliation":WORKER_BANK_RECONCILIATION_AGENTSPEC_0_0_1,"worker-campaign-planning":WORKER_CAMPAIGN_PLANNING_AGENTSPEC_0_0_1,"worker-cat-exposure":WORKER_CAT_EXPOSURE_AGENTSPEC_0_0_1,"worker-change-detection":WORKER_CHANGE_DETECTION_AGENTSPEC_0_0_1,"worker-classify-route-emails":WORKER_CLASSIFY_ROUTE_EMAILS_AGENTSPEC_0_0_1,"worker-cms-astro":WORKER_CMS_ASTRO_AGENTSPEC_0_0_1,"worker-coding-tutor":WORKER_CODING_TUTOR_AGENTSPEC_0_0_1,"worker-cohort-comparison":WORKER_COHORT_COMPARISON_AGENTSPEC_0_0_1,"worker-collections":WORKER_COLLECTIONS_AGENTSPEC_0_0_1,"worker-community-response":WORKER_COMMUNITY_RESPONSE_AGENTSPEC_0_0_1,"worker-competitive-intelligence":WORKER_COMPETITIVE_INTELLIGENCE_AGENTSPEC_0_0_1,"worker-compliance-report-draft":WORKER_COMPLIANCE_REPORT_DRAFT_AGENTSPEC_0_0_1,"worker-comprehensive-sales-analytics":WORKER_COMPREHENSIVE_SALES_ANALYTICS_AGENTSPEC_0_0_1,"worker-compute-cost-optimizer":WORKER_COMPUTE_COST_OPTIMIZER_AGENTSPEC_0_0_1,"worker-content-repurposing":WORKER_CONTENT_REPURPOSING_AGENTSPEC_0_0_1,"worker-crawler":WORKER_CRAWLER_AGENTSPEC_0_0_1,"worker-crop-monitoring":WORKER_CROP_MONITORING_AGENTSPEC_0_0_1,"worker-curtailment-investigator":WORKER_CURTAILMENT_INVESTIGATOR_AGENTSPEC_0_0_1,"worker-customer-churn-analysis":WORKER_CUSTOMER_CHURN_ANALYSIS_AGENTSPEC_0_0_1,"worker-customer-interviewer":WORKER_CUSTOMER_INTERVIEWER_AGENTSPEC_0_0_1,"worker-data-acquisition":WORKER_DATA_ACQUISITION_AGENTSPEC_0_0_1,"worker-disaster-assessment":WORKER_DISASTER_ASSESSMENT_AGENTSPEC_0_0_1,"worker-document-qa":WORKER_DOCUMENT_QA_AGENTSPEC_0_0_1,"worker-end-of-month-performance":WORKER_END_OF_MONTH_PERFORMANCE_AGENTSPEC_0_0_1,"worker-energy-trading-analyst":WORKER_ENERGY_TRADING_ANALYST_AGENTSPEC_0_0_1,"worker-environmental-compliance":WORKER_ENVIRONMENTAL_COMPLIANCE_AGENTSPEC_0_0_1,"worker-event-response":WORKER_EVENT_RESPONSE_AGENTSPEC_0_0_1,"worker-evidence-repository":WORKER_EVIDENCE_REPOSITORY_AGENTSPEC_0_0_1,"worker-expense-audit":WORKER_EXPENSE_AUDIT_AGENTSPEC_0_0_1,"worker-exposure-data-quality":WORKER_EXPOSURE_DATA_QUALITY_AGENTSPEC_0_0_1,"worker-extract-data-from-files":WORKER_EXTRACT_DATA_FROM_FILES_AGENTSPEC_0_0_1,"worker-extract-kpis-from-quarterly-pdf":WORKER_EXTRACT_KPIS_FROM_QUARTERLY_PDF_AGENTSPEC_0_0_1,"worker-factor-analysis":WORKER_FACTOR_ANALYSIS_AGENTSPEC_0_0_1,"worker-financial-viz":WORKER_FINANCIAL_VIZ_AGENTSPEC_0_0_1,"worker-generate-weekly-reports":WORKER_GENERATE_WEEKLY_REPORTS_AGENTSPEC_0_0_1,"worker-github-agent":WORKER_GITHUB_AGENT_SPEC_0_0_1,"worker-grid-forecast":WORKER_GRID_FORECAST_AGENTSPEC_0_0_1,"worker-information-routing":WORKER_INFORMATION_ROUTING_AGENTSPEC_0_0_1,"worker-infrastructure-monitoring":WORKER_INFRASTRUCTURE_MONITORING_AGENTSPEC_0_0_1,"worker-insurance-claims-review":WORKER_INSURANCE_CLAIMS_REVIEW_AGENTSPEC_0_0_1,"worker-interview-guide":WORKER_INTERVIEW_GUIDE_AGENTSPEC_0_0_1,"worker-inventory-demand-planning":WORKER_INVENTORY_DEMAND_PLANNING_AGENTSPEC_0_0_1,"worker-job-hunter":WORKER_JOB_HUNTER_AGENTSPEC_0_0_1,"worker-mail-triage":WORKER_MAIL_TRIAGE_AGENTSPEC_0_0_1,"worker-marketing-analytics":WORKER_MARKETING_ANALYTICS_AGENTSPEC_0_0_1,"worker-medical-research-review":WORKER_MEDICAL_RESEARCH_REVIEW_AGENTSPEC_0_0_1,"worker-model-comparison":WORKER_MODEL_COMPARISON_AGENTSPEC_0_0_1,"worker-monitor-sales-kpis":WORKER_MONITOR_SALES_KPIS_AGENTSPEC_0_0_1,"worker-month-end-close":WORKER_MONTH_END_CLOSE_AGENTSPEC_0_0_1,"worker-news-aggregator":WORKER_NEWS_AGGREGATOR_AGENTSPEC_0_0_1,"worker-optimize-dynamic-pricing":WORKER_OPTIMIZE_DYNAMIC_PRICING_AGENTSPEC_0_0_1,"worker-optimize-grid-operations":WORKER_OPTIMIZE_GRID_OPERATIONS_AGENTSPEC_0_0_1,"worker-optimize-sql-query-performance":WORKER_OPTIMIZE_SQL_QUERY_PERFORMANCE_AGENTSPEC_0_0_1,"worker-performance-attribution":WORKER_PERFORMANCE_ATTRIBUTION_AGENTSPEC_0_0_1,"worker-pipeline-debugger":WORKER_PIPELINE_DEBUGGER_AGENTSPEC_0_0_1,"worker-pitcher":WORKER_PITCHER_AGENTSPEC_0_0_1,"worker-portfolio-accumulation":WORKER_PORTFOLIO_ACCUMULATION_AGENTSPEC_0_0_1,"worker-portfolio-risk":WORKER_PORTFOLIO_RISK_AGENTSPEC_0_0_1,"worker-predictive-maintenance":WORKER_PREDICTIVE_MAINTENANCE_AGENTSPEC_0_0_1,"worker-process-citizen-requests":WORKER_PROCESS_CITIZEN_REQUESTS_AGENTSPEC_0_0_1,"worker-process-clinical-trial-data":WORKER_PROCESS_CLINICAL_TRIAL_DATA_AGENTSPEC_0_0_1,"worker-process-financial-transactions":WORKER_PROCESS_FINANCIAL_TRANSACTIONS_AGENTSPEC_0_0_1,"worker-product-finder":WORKER_PRODUCT_FINDER_AGENTSPEC_0_0_1,"worker-quant-research":WORKER_QUANT_RESEARCH_AGENTSPEC_0_0_1,"worker-renewable-asset-performance":WORKER_RENEWABLE_ASSET_PERFORMANCE_AGENTSPEC_0_0_1,"worker-research-recruiter":WORKER_RESEARCH_RECRUITER_AGENTSPEC_0_0_1,"worker-rna-seq":WORKER_RNA_SEQ_AGENTSPEC_0_0_1,"worker-sales-forecasting":WORKER_SALES_FORECASTING_AGENTSPEC_0_0_1,"worker-sales-pipeline-board-report":WORKER_SALES_PIPELINE_BOARD_REPORT_AGENTSPEC_0_0_1,"worker-scenario-testing":WORKER_SCENARIO_TESTING_AGENTSPEC_0_0_1,"worker-scheduled-nightly-data-quality-checks":WORKER_SCHEDULED_NIGHTLY_DATA_QUALITY_CHECKS_AGENTSPEC_0_0_1,"worker-scientific-notebook-assistant":WORKER_SCIENTIFIC_NOTEBOOK_ASSISTANT_AGENTSPEC_0_0_1,"worker-single-cell-processing":WORKER_SINGLE_CELL_PROCESSING_AGENTSPEC_0_0_1,"worker-social-listening":WORKER_SOCIAL_LISTENING_AGENTSPEC_0_0_1,"worker-social-marketer":WORKER_SOCIAL_MARKETER_AGENTSPEC_0_0_1,"worker-spatial-data-analysis":WORKER_SPATIAL_DATA_ANALYSIS_AGENTSPEC_0_0_1,"worker-summarize-documents":WORKER_SUMMARIZE_DOCUMENTS_AGENTSPEC_0_0_1,"worker-sync-crm-contacts":WORKER_SYNC_CRM_CONTACTS_AGENTSPEC_0_0_1,"worker-thematic-analysis":WORKER_THEMATIC_ANALYSIS_AGENTSPEC_0_0_1,"worker-travel-recommender":WORKER_TRAVEL_RECOMMENDER_AGENTSPEC_0_0_1,"worker-trends-seeker":WORKER_TRENDS_SEEKER_AGENTSPEC_0_0_1,"worker-variant-analysis":WORKER_VARIANT_ANALYSIS_AGENTSPEC_0_0_1,"worker-weekly-executive-briefing":WORKER_WEEKLY_EXECUTIVE_BRIEFING_AGENTSPEC_0_0_1},AGENTSPECS={...AGENTSPECS$1};function resolveAgentId(Au){if(Au in AGENTSPECS)return Au;const lo=Au.lastIndexOf(":");if(lo>0){const $u=Au.slice(0,lo);if($u in AGENTSPECS)return $u}return Au}function getAgentspecs(Au){return AGENTSPECS[resolveAgentId(Au)]}function listAgentspecs(Au){return Object.values(AGENTSPECS)}const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1={id:"analyze-campaign-performance",version:"0.0.1",name:"Analyze Campaign Performance Team",description:"A multi-agent team that unifies marketing data from Google Ads, Meta, TikTok, LinkedIn, GA4, CRM, and email platforms. Normalises metrics into a unified view, detects performance anomalies in real time, and generates budget reallocation recommendations to maximise ROAS.",tags:["marketing","media","campaigns","analytics","advertising","social-media"],enabled:!0,icon:"megaphone",emoji:"📢",color:"#8250df",agentSpecId:"analyze-campaign-performance:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Campaign Analytics Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with Platform Connector to pull data from all ad platforms, then Metrics Normaliser for unified KPIs, then Anomaly Detector for real-time performance monitoring, then Budget Optimiser for reallocation recommendations. Escalate CPA spikes above 50% immediately.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:2},agents:[{id:"cp-1",name:"Platform Connector Agent",ref:"",role:"initiator",goal:"Pull campaign data from Google Ads, Meta, TikTok, LinkedIn, GA4, and email platforms",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Ad Platforms MCP",tools:["Google Ads Connector","Meta Ads Connector","TikTok Ads Connector","LinkedIn Ads Connector","GA4 Connector"],trigger:"Schedule: Every 4 hours",approval:"auto"},{id:"cp-2",name:"Metrics Normaliser Agent",ref:"",role:"contributor",goal:"Normalise CPA, ROAS, CTR, and attribution across all platforms into unified view",dependsOn:["cp-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Analytics MCP",tools:["Metric Unifier","Currency Converter","Attribution Mapper","Naming Convention Resolver"],trigger:"",approval:"auto"},{id:"cp-3",name:"Anomaly Detector Agent",ref:"",role:"contributor",goal:"Monitor all KPIs for CTR drops, CPA spikes, and budget pacing issues",dependsOn:["cp-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Monitoring MCP",tools:["Anomaly Scanner","Budget Pacer","Alert Generator","Campaign Pauser"],trigger:"",approval:"manual"},{id:"cp-4",name:"Budget Optimiser Agent",ref:"",role:"finalizer",goal:"Generate budget reallocation recommendations to maximise ROAS across channels",dependsOn:["cp-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Optimisation MCP",tools:["ROAS Calculator","Budget Allocator","Scenario Modeller","Report Generator"],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-camp-1",trigger:"budget_threshold_exceeded",action:"pause_and_notify",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"high"},{id:"rr-camp-2",trigger:"data_quality_low",action:"retry_collection",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"medium"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","csv","json"],template:"Campaign Performance Report",storage:"s3://reports/campaign-analytics/"}},ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1={id:"analyze-support-tickets",version:"0.0.1",name:"Analyze Support Tickets Team",description:"A multi-agent team that triages incoming support tickets, categorizes by urgency and topic, identifies recurring patterns, and generates resolution recommendations with escalation paths.",tags:["analytics","data","support","tickets"],enabled:!0,icon:"issue-opened",emoji:"🎫",color:"#bf8700",agentSpecId:"analyze-support-tickets:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Support Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route new tickets to the Triage Agent first, then to the Categorizer, then to the Pattern Analyzer. Escalate P1/critical tickets immediately to human support leads.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"180s",retryOnFailure:!0,maxRetries:2},agents:[{id:"st-1",name:"Triage Agent",ref:"",role:"initiator",goal:"Ingest new support tickets and assess urgency level (P1-P4)",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Helpdesk MCP",tools:["Ticket Reader","Priority Classifier"],trigger:"Event: new ticket received",approval:"auto"},{id:"st-2",name:"Categorizer Agent",ref:"",role:"contributor",goal:"Categorize tickets by topic, product area, and sentiment",dependsOn:["st-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"NLP Pipeline MCP",tools:["Topic Classifier","Sentiment Analyzer","Product Tagger"],trigger:"",approval:"auto"},{id:"st-3",name:"Pattern Analyzer Agent",ref:"",role:"finalizer",goal:"Identify recurring issues and generate resolution recommendations",dependsOn:["st-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics MCP",tools:["Pattern Detector","Knowledge Base Search","Resolution Generator"],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-supp-1",trigger:"ticket_surge_detected",action:"escalate_to_supervisor",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"high"},{id:"rr-supp-2",trigger:"classification_confidence_low",action:"request_human_review",auto:!1,maxRetries:1,escalateAfterRetries:1,priority:"medium"}],healthMonitoring:{heartbeatInterval:"15s",staleThreshold:"60s",unresponsiveThreshold:"180s",stuckThreshold:"300s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","json"],template:"Support Ticket Analysis",storage:"s3://reports/support-analytics/"}},AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1={id:"audit-inventory-levels",version:"0.0.1",name:"Audit Inventory Levels Team",description:"A multi-agent team that monitors inventory levels across warehouses, detects discrepancies between physical and system counts, forecasts demand by SKU, and generates automated reorder recommendations.",tags:["finance","automation","inventory","supply-chain"],enabled:!0,icon:"package",emoji:"📦",color:"#0969da",agentSpecId:"audit-inventory-levels:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Inventory Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with the Scanner to pull current levels, then Auditor to check discrepancies, then Forecaster for demand predictions, then Planner for reorder recommendations, then Reporter for the final audit report. Escalate critical shortages immediately.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!0,maxRetries:3},agents:[{id:"inv-1",name:"Inventory Scanner Agent",ref:"",role:"initiator",goal:"Pull current inventory levels from all warehouse management systems",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Warehouse MCP",tools:["WMS Connector","Barcode Scanner API"],trigger:"Schedule: Every 6 hours",approval:"auto"},{id:"inv-2",name:"Discrepancy Auditor Agent",ref:"",role:"contributor",goal:"Compare system counts vs physical counts and flag discrepancies",dependsOn:["inv-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Audit MCP",tools:["Count Comparator","Discrepancy Logger","Shrinkage Calculator"],trigger:"",approval:"auto"},{id:"inv-3",name:"Demand Forecaster Agent",ref:"",role:"contributor",goal:"Forecast demand by SKU using historical sales and seasonal patterns",dependsOn:["inv-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics MCP",tools:["Time Series Model","Seasonal Analyzer","External Signals Fetcher"],trigger:"",approval:"auto"},{id:"inv-4",name:"Reorder Planner Agent",ref:"",role:"contributor",goal:"Calculate optimal reorder points and generate purchase order recommendations",dependsOn:["inv-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Procurement MCP",tools:["EOQ Calculator","Supplier Catalog","PO Generator"],trigger:"",approval:"manual"},{id:"inv-5",name:"Audit Report Agent",ref:"",role:"finalizer",goal:"Compile inventory audit report with discrepancies, forecasts, and reorder plan",dependsOn:["inv-4"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","Chart Builder","Email Sender"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-inv-1",trigger:"stockout_risk_detected",action:"escalate_to_supervisor",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"high"},{id:"rr-inv-2",trigger:"discrepancy_threshold_exceeded",action:"flag_for_manual_audit",auto:!1,maxRetries:2,escalateAfterRetries:2,priority:"high"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","xlsx","csv"],template:"Inventory Audit Report",storage:"s3://reports/inventory-audits/"}},AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1={id:"automate-regulatory-reporting",version:"0.0.1",name:"Automate Regulatory Reporting Team",description:"A multi-agent team that automates end-to-end regulatory reporting for financial institutions. Ingests data from trading systems, risk engines, and accounting platforms, reconciles positions, computes risk metrics, validates against regulatory rules (Basel III/IV, MiFID II, SOX), and generates submission-ready compliance reports with full audit trails.",tags:["finance","compliance","regulatory","risk","banking","audit"],enabled:!0,icon:"shield-check",emoji:"🏦",color:"#0969da",agentSpecId:"automate-regulatory-reporting:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Compliance Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with Data Ingestion to pull positions and transactions, then Risk Calculator for metric computation, then Reconciliation Agent to cross-check figures, then Validation Agent for regulatory rule checks, then Report Generator for submission-ready output. Escalate any reconciliation breaks above $10K immediately to the compliance team.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"900s",retryOnFailure:!0,maxRetries:2},agents:[{id:"reg-1",name:"Data Ingestion Agent",ref:"",role:"initiator",goal:"Extract positions, transactions, and P&L from trading and accounting systems",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Trading Systems MCP",tools:["Position Reader","Transaction Fetcher","P&L Extractor"],trigger:"Schedule: Monthly on the 3rd business day",approval:"auto"},{id:"reg-2",name:"Risk Calculator Agent",ref:"",role:"contributor",goal:"Compute Basel III/IV risk-weighted assets, capital ratios, and VaR metrics",dependsOn:["reg-1"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Risk Engine MCP",tools:["RWA Calculator","VaR Engine","Capital Ratio Computer","Stress Test Runner"],trigger:"",approval:"auto"},{id:"reg-3",name:"Reconciliation Agent",ref:"",role:"contributor",goal:"Cross-check computed figures against source systems and flag discrepancies",dependsOn:["reg-2"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Reconciliation MCP",tools:["Position Reconciler","Break Detector","Audit Logger"],trigger:"",approval:"auto"},{id:"reg-4",name:"Validation Agent",ref:"",role:"contributor",goal:"Validate all metrics against Basel III/IV, MiFID II, and SOX regulatory rules",dependsOn:["reg-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Compliance Rules MCP",tools:["Basel Rule Validator","MiFID II Checker","SOX Control Verifier"],trigger:"",approval:"manual"},{id:"reg-5",name:"Report Generator Agent",ref:"",role:"finalizer",goal:"Generate submission-ready regulatory reports with full data lineage and audit trail",dependsOn:["reg-4"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","XBRL Formatter","Email Sender"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-reg-1",trigger:"compliance_violation_detected",action:"halt_and_escalate",auto:!0,maxRetries:0,escalateAfterRetries:0,priority:"critical"},{id:"rr-reg-2",trigger:"data_validation_failure",action:"retry_with_fallback",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"high"}],healthMonitoring:{heartbeatInterval:"15s",staleThreshold:"60s",unresponsiveThreshold:"120s",stuckThreshold:"300s",maxRestartAttempts:2},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","xbrl","json"],template:"Regulatory Submission Report",storage:"s3://reports/regulatory-submissions/"}},CODING_AGENTS_TEAM_SPEC_0_0_1={id:"coding-agents",version:"0.0.1",name:"Coding Agents",description:"Claude Code writes the change and Codex reviews it, each behind the Shield: a supervisor delegates to them over ACP with a budget, a deadline and the files it may touch, and reads back their plans and their diffs.",tags:["coding","harness","review"],enabled:!0,icon:"code",emoji:"🛡️",color:"#1F6FEB",agentSpecId:"",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Lead",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"Split the request into a change and its review: hand the change to the Coder with the files it may touch, then the diff to the Reviewer, and answer with the change and what the review found.",instructions:"You lead two coding agents. Hand the change to the Coder with the files it may touch and a deadline, wait for its diff, hand the diff to the Reviewer, and answer with the change and the review. Never edit a file yourself.",approval:"auto",canTerminate:!0},routingInstructions:"",suggestions:[{text:"Add a test for the function in the open file, then review it.",summary:"A change and its review",icon:"code",emoji:"🧪"}],delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:void 0,agents:[{id:"coder",name:"Coder",ref:"",harness:"claude-code",role:"contributor",goal:"Make the change asked, inside the workspace, in the files the manifest names; answer with what changed and why.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"reviewer",name:"Reviewer",ref:"",harness:"codex",role:"reviewer",goal:"Read the Coder's diff and say what is wrong with it, file by file; edit nothing.",dependsOn:["coder"],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1={id:"comprehensive-sales-analytics",version:"0.0.1",name:"Comprehensive Sales Analytics Team",description:"A multi-agent team that replaces a single KPI monitor with four specialized agents: a Data Collector that pulls real-time CRM metrics, an Anomaly Detector that flags statistical outliers, a Trend Analyzer that identifies patterns and forecasts, and a Report Generator that compiles executive dashboards and sends alerts. Together they deliver deeper insights, faster detection, and richer reporting than any single agent could.",tags:["sales","analytics","kpi","monitoring","horizontal"],enabled:!0,icon:"graph",emoji:"📈",color:"#1a7f37",agentSpecId:"comprehensive-sales-analytics:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Sales Analytics Supervisor",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route data collection to KPI Collector first, then pass raw metrics to Anomaly Detector and Trend Analyzer in parallel, then aggregate all outputs into the Report Generator. Escalate if anomalies exceed the critical threshold (>25% deviation from target).",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:3},agents:[{id:"sa-1",name:"KPI Data Collector",ref:"",role:"initiator",goal:"Pull real-time sales metrics from CRM, ERP, and marketing platforms. Normalize data into a unified schema with timestamps, dimensions (region, product line, rep), and measures (revenue, pipeline, conversion).",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"CRM Data Server",tools:["get_sales_data","get_customer_list","API Connector"],trigger:"Schedule: Daily at 7:30 AM",approval:"auto"},{id:"sa-2",name:"Anomaly Detector",ref:"",role:"contributor",goal:"Apply statistical anomaly detection (Z-score, IQR, moving average) to the collected KPIs. Flag any metric deviating more than 10% from its rolling 30-day average. Classify anomalies as info, warning, or critical.",dependsOn:["sa-1"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics Server",tools:["run_analysis","Statistical Analysis","ML Predictor"],trigger:"",approval:"auto"},{id:"sa-3",name:"Trend Analyzer",ref:"",role:"contributor",goal:"Identify week-over-week, month-over-month, and quarter-over-quarter trends. Generate 30-day forecasts for each KPI using time-series models. Highlight the top 3 improving and top 3 declining metrics.",dependsOn:["sa-1"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics Server",tools:["run_analysis","generate_charts","Forecaster"],trigger:"",approval:"auto"},{id:"sa-4",name:"Executive Report Generator",ref:"",role:"finalizer",goal:"Compile all insights — raw KPIs, anomalies, trends, and forecasts — into a polished executive dashboard with charts, tables, and narrative commentary. Send the report via Slack and email. Highlight critical anomalies with a red-flag summary at the top.",dependsOn:["sa-2","sa-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","Chart Builder","Email Sender","Slack Notifier"],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-sales-1",trigger:"anomaly_critical",action:"escalate_to_supervisor",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"high"},{id:"rr-sales-2",trigger:"data_stale",action:"retry_collection",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"medium"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","xlsx","json"],template:"Executive Sales Dashboard",storage:"s3://reports/sales-analytics/"}},CROP_MONITORING_TEAM_SPEC_0_0_2={id:"crop-monitoring",version:"0.0.2",name:"Crop Monitoring",description:"One agent, its data: Crop Monitoring follows crop vigour and growth over a season from the satellite imagery NASA Earthdata holds, and flags the fields that need attention.",tags:["example","scene","earth-observation","agriculture","earthdata","a2a"],enabled:!0,icon:"telescope",emoji:"🛰️",color:"#1a7f37",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Crop Monitoring",ref:"",app:"crop-monitoring:0.0.2",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Crop Monitoring answers every request from the imagery itself, one search at a time, and reports what the granules show without adding to it.",entry:"crop-monitoring",suggestions:[{text:"How has crop vigour evolved over the last three months around 45.5N, 10.2E?",emoji:"🌱"},{text:"Which fields around 41.9N, 12.5E show a drop in vegetation this month compared with last?",emoji:"🌾"},{text:"Which datasets and granules cover the Po valley for June 2026?",emoji:"🛰️"},{text:"Save the June 2026 granules of the Po valley to my Space.",emoji:"💾"}],delegation:{maxDepth:0,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!1,maxRetries:0},agents:[{id:"crop-monitoring",name:"",ref:"",app:"crop-monitoring:0.0.2",runsIn:"runtime",role:"initiator",goal:"Take the person's field and period, search the imagery that covers them, and report the vigour, the growth and the fields to watch.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},DISASTER_ASSESSMENT_TEAM_SPEC_0_0_2={id:"disaster-assessment",version:"0.0.2",name:"Disaster Assessment",description:"An event desk in the browser that gets the area a disaster affected and the damage from Disaster Assessment, and what changed on the ground from Change detection, each on a runtime over A2A, each reading NASA Earthdata. Event response takes the event and reports; the two others read the imagery and answer.",tags:["example","scene","earth-observation","disaster","insurance","earthdata","a2a"],enabled:!0,icon:"pulse",emoji:"🛰️",color:"#cf222e",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Event response",ref:"",app:"event-response:0.0.3",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Event response asks Disaster Assessment for the area and the damage, and Change detection for the change on the ground, one request each, and reports what they answer without adding to it.",entry:"event-response",suggestions:[{text:"Valencia, Spain, was flooded on 29 October 2024. What was affected, and what changed?",emoji:"🌊"},{text:"Fires burned around Los Angeles from 7 January 2025. Which imagery shows what changed?",emoji:"🔥"},{text:"The Ahr valley was hit by a storm on 14 July 2021. Chart the imagery found each day from 10 to 20 July.",emoji:"🌧️"},{text:"Send the Valencia flood assessment to the emergency services.",emoji:"📣"}],delegation:{maxDepth:1,allowPeerDelegation:!0,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!1,maxRetries:0},agents:[{id:"event-response",name:"",ref:"",app:"event-response:0.0.3",runsIn:"browser",talksTo:[{member:"disaster-assessment",over:"a2a"},{member:"change-detection",over:"a2a"}],role:"initiator",goal:"Take the person's event, ask Disaster Assessment and Change detection for it, and report what they answered.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"disaster-assessment",name:"",ref:"",app:"disaster-assessment:0.0.2",runsIn:"runtime",role:"contributor",goal:"Estimate the area the event affected and the extent of the damage from the imagery before and after it, over A2A.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"change-detection",name:"",ref:"",app:"change-detection:0.0.2",runsIn:"runtime",role:"contributor",goal:"Find what changed on the ground between the two dates from the imagery, over A2A.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},JUPYTER_TEAM_SPEC_0_0_1={id:"jupyter",version:"0.0.1",name:"Jupyter Team",description:"Six agents working in the same Jupyter notebook: the Analyst adds and runs the cells, the Reviewer checks them and records what it finds, the Writer writes the result up between them, Decks turns what they found into a presentation, the Tutor teaches the person Python in the cells they have, and the Compactor rewrites the notebook as short as it can be without changing what it computes.",tags:["notebook","jupyter","collaboration","analysis","review","presentations","teaching","refactoring"],enabled:!0,icon:"book",emoji:"📓",color:"#F37726",agentSpecId:"",orchestrationProtocol:"datalayer",executionMode:"supervisor",supervisor:{name:"Jupyter Analyst",ref:"jupyter-data-analyst:0.0.1",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"Keep the work in the notebook. Answer analysis requests directly; send a request to check something to the Reviewer, a request to write something up to the Writer, a request for slides to Decks, a question about the code to the Tutor and a request to tidy the notebook to the Compactor — and never leave results anywhere but the cells, or the deck made from them.",instructions:"",approval:"auto",canTerminate:!1},routingInstructions:'Send anything about exploring, computing, plotting or extending the analysis — "analyze", "plot", "compute", "add a cell that…" — to the Jupyter Analyst. Send anything about checking, verifying, doubting or re-running — "find what is wrong", "check this", "is this right", "re-run" — to Jupyter Reviewer. Send anything about explaining, summarising, writing up or verifying the wording of a conclusion to Jupyter Writer. Send anything about slides, a deck or a presentation — "make a deck of this", "turn the findings into slides", "present this", "add a slide" — to Jupyter Decks, which builds the deck from what the cells show and opens it beside the conversation. Send anything about understanding or learning — "what does this do", "why did this fail", "teach me", a request for an exercise — to Jupyter Tutor. Send anything about the shape of the notebook — shortening it, merging cells, removing dead code or stale outputs — to Jupyter Compactor. When a request is two of these, the one that produces cells goes first and the one that reads them follows: the Analyst before the Writer or Decks ("analyze this and write it up", "analyze this and make a deck"), the Tutor before the Compactor ("clean this up and explain what you did"). Never let the Compactor rewrite a notebook the person is still learning from without saying what changed. When none fits, answer directly rather than forcing the request onto a specialist.',suggestions:[{text:"Analyze the dataset",summary:"Analyze the dataset",icon:"graph",emoji:"🔎"},{text:"Find what is wrong",summary:"Find what is wrong",icon:"checklist",emoji:"🧐"},{text:"Verify the conclusion",summary:"Verify the conclusion",icon:"pencil",emoji:"✍️"},{text:"Turn the findings into a deck",summary:"Findings into a deck",icon:"project",emoji:"📊"},{text:"Explain this notebook cell by cell, as if I am new to Python",summary:"Cell by cell, for beginners",icon:"book",emoji:"📖"},{text:"Shorten this notebook without changing what it computes",summary:"Shorten the notebook",icon:"fold",emoji:"✂️"}],delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:1},agents:[{id:"analyst",name:"Jupyter Analyst",ref:"jupyter-data-analyst:0.0.1",role:"initiator",goal:"Explore the data in the open notebook — add the cells, run them, and leave the results on them for the others to build on.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"reviewer",name:"Jupyter Reviewer",ref:"jupyter-notebook-reviewer:0.0.1",role:"reviewer",goal:"Re-run what matters, find what is wrong or unsupported, and record the verdict in the notebook beside the code it concerns.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"writer",name:"Jupyter Writer",ref:"jupyter-notebook-writer:0.0.1",role:"finalizer",goal:"Write the analysis up between the cells — summary, explanations, conclusion — saying only what the cells support.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"decks",name:"Jupyter Decks",ref:"example-decks:0.0.1",role:"contributor",goal:"Turn what the notebook found into a deck — a title, the numbers as metrics or a chart, the conclusion — open it beside the conversation, and step through it on request.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"tutor",name:"Jupyter Tutor",ref:"jupyter-tutor:0.0.1",role:"contributor",goal:"Teach the person Python in the notebook they have open — what their code does, why it broke, and what to try next — leaving them able to write the next cell themselves.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"compactor",name:"Jupyter Compactor",ref:"jupyter-notebook-compactor:0.0.1",role:"finalizer",goal:"Rewrite the notebook as short as it can be without changing what it computes, and report exactly which cells were touched.",dependsOn:[],subagents:[{name:"CellFixer",ref:"jupyter-cell-fixer:0.0.1",description:"Fixes a failing cell and proves the fix by running it. Reach for this when compaction uncovers a cell that was already broken — repairing it is not part of compacting, and silently leaving it is worse.",instructions:""},{name:"NotebookReproducer",ref:"jupyter-notebook-reproducer:0.0.1",description:"Runs the notebook top to bottom on a fresh sandbox and reports what does not reproduce. Reach for this to prove a compaction changed nothing, which is the claim a compaction rests on.",instructions:""}],model:"",mcpServer:"",tools:[],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-nb-1",trigger:"compaction_would_change_results",action:"request_human_review",auto:!1,maxRetries:0,escalateAfterRetries:0,priority:"high"},{id:"rr-nb-2",trigger:"learner_repeatedly_stuck",action:"escalate_to_supervisor",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"medium"},{id:"rr-nb-3",trigger:"review_found_unsupported_claim",action:"escalate_to_supervisor",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"medium"}],healthMonitoring:{heartbeatInterval:"15s",staleThreshold:"60s",unresponsiveThreshold:"180s",stuckThreshold:"300s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["ipynb","markdown"],template:"Notebook Session Summary",storage:""}},MONTH_END_CLOSE_TEAM_SPEC_0_0_2={id:"month-end-close",version:"0.0.2",name:"Month-end Close",description:"One agent, its data: Month-end Close drives the close from the Odoo books, which it only reads — the checklist, the accruals to book, the reconciliation gaps that remain.",tags:["example","scene","accounting","finance","odoo","a2a"],enabled:!0,icon:"sync",emoji:"🧾",color:"#bf8700",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Month-end Close",ref:"",app:"month-end-close:0.0.2",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Month-end Close answers every request from the books itself, one read at a time, and reports what the books hold without adding to it.",entry:"month-end-close",suggestions:[{text:"Where does the month-end close stand for last month? Give me the checklist.",emoji:"☑️"},{text:"Which accruals should be booked for last month? Show me the entries each rests on.",emoji:"🧾"},{text:"Chart last month's expenses by account against the month before.",emoji:"📊"},{text:"Post the accruals you suggested for last month.",emoji:"✍️"}],delegation:{maxDepth:0,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!1,maxRetries:0},agents:[{id:"month-end-close",name:"",ref:"",app:"month-end-close:0.0.2",runsIn:"runtime",role:"initiator",goal:"Take the person's request, read the period's books, and report where the close stands: what is done, what is to book, what is still open.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1={id:"notebook-benchmark",version:"0.0.1",name:"Notebook Benchmark Team",description:"Runs a notebook benchmark end to end: one agent executes it from a clean sandbox, a second compares what came out against what the evalset expected, and a third checks the comparison before it is published. Section 17's vertical slice.",tags:["benchmark","notebook","evaluation","orchestration"],enabled:!0,icon:"beaker",emoji:"🧪",color:"#1ABC9C",agentSpecId:"jupyter-data-analyst:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Benchmark Supervisor",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Place the runner first and wait for it: nothing can be analysed before the notebook has run. Give the analyst the runner's outputs and the evalset's expectations, and the reviewer the analyst's comparison. Answer with the reviewer's verdict and the evidence behind it, never with a summary of your own that nothing produced.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"900s",retryOnFailure:!0,maxRetries:2},agents:[{id:"runner",name:"Benchmark Runner",ref:"",role:"initiator",goal:"Execute the benchmark's notebook from a clean sandbox and return it with its outputs",dependsOn:[],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"",tools:["Notebook Executor"],trigger:"",approval:"auto"},{id:"analyst",name:"Benchmark Analyst",ref:"",role:"contributor",goal:"Compare what the notebook produced against what the evalset expected, and say where and by how much they differ",dependsOn:["runner"],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"",tools:["Notebook Reader"],trigger:"",approval:"auto"},{id:"reviewer",name:"Benchmark Reviewer",ref:"",role:"finalizer",goal:"Check the analyst's comparison against the notebook's own outputs and say whether the conclusion is supported by the evidence",dependsOn:["analyst"],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"",tools:["Notebook Reader"],trigger:"",approval:"auto"}]},OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1={id:"optimize-grid-operations",version:"0.0.1",name:"Optimize Grid Operations Team",description:"A multi-agent team that processes millions of IoT sensor data points from smart meters, substations, and renewable generation assets. Predicts equipment failures 2–4 weeks in advance, optimises load balancing across the grid, and reduces unplanned downtime by 50%.",tags:["energy","utilities","smart-grid","iot","predictive-maintenance","sustainability"],enabled:!0,icon:"zap",emoji:"⚡",color:"#1a7f37",agentSpecId:"optimize-grid-operations:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Grid Operations Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with Sensor Ingestion to process real-time telemetry, then Anomaly Detector for pattern identification, then Failure Predictor for maintenance forecasting, then Grid Balancer for load optimisation. Escalate critical failure predictions (< 48h) immediately to operations dispatch.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!0,maxRetries:3},agents:[{id:"grid-1",name:"Sensor Ingestion Agent",ref:"",role:"initiator",goal:"Ingest and process real-time telemetry from SCADA, smart meters, and IoT gateways",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"SCADA MCP",tools:["SCADA Connector","Smart Meter Reader","IoT Gateway Adapter","Time Series Processor"],trigger:"Schedule: Every 5 minutes",approval:"auto"},{id:"grid-2",name:"Anomaly Detector Agent",ref:"",role:"contributor",goal:"Detect vibration, temperature, and voltage anomalies across all grid assets",dependsOn:["grid-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Monitoring MCP",tools:["Vibration Analyzer","Temperature Anomaly Detector","Voltage Pattern Scanner","Historical Comparator"],trigger:"",approval:"auto"},{id:"grid-3",name:"Failure Predictor Agent",ref:"",role:"contributor",goal:"Predict equipment failures 2–4 weeks in advance using anomaly patterns and failure history",dependsOn:["grid-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Predictive Analytics MCP",tools:["Failure Correlation Engine","Risk Scorer","Maintenance Scheduler","Work Order Generator"],trigger:"",approval:"manual"},{id:"grid-4",name:"Grid Balancer Agent",ref:"",role:"finalizer",goal:"Optimise real-time load balancing across renewable and conventional generation sources",dependsOn:["grid-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Grid Control MCP",tools:["Load Forecaster","Renewable Integration Model","Dispatch Optimiser","Grid Stability Checker"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-grid-1",trigger:"grid_instability_detected",action:"emergency_rebalance",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"critical"},{id:"rr-grid-2",trigger:"forecast_deviation_high",action:"recalibrate_model",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"medium"}],healthMonitoring:{heartbeatInterval:"10s",staleThreshold:"30s",unresponsiveThreshold:"60s",stuckThreshold:"120s",maxRestartAttempts:5},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["json","csv","pdf"],template:"Grid Operations Dashboard",storage:"s3://reports/grid-operations/"}},PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1={id:"process-citizen-requests",version:"0.0.1",name:"Process Citizen Requests Team",description:"A multi-agent team that automates citizen request processing for government agencies. Classifies and triages permits, FOIA requests, and benefit claims from multiple channels. Models policy impacts across population datasets and ensures every automated decision is explainable, auditable, and compliant with transparency mandates.",tags:["government","public-sector","civic","policy","compliance","transparency"],enabled:!0,icon:"organization",emoji:"🏛️",color:"#0550ae",agentSpecId:"process-citizen-requests:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Citizen Services Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route incoming citizen requests to the Intake Agent for classification and triage, then to the Case Processor for handling and routing, then to the Policy Analyst for impact assessment on relevant items, then to the Transparency Agent for audit trail and public documentation. Escalate urgent citizen safety issues immediately to supervisors.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:2},agents:[{id:"cit-1",name:"Intake & Classification Agent",ref:"",role:"initiator",goal:"Classify, triage, and route citizen submissions from web portals, email, and documents",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Citizen Portal MCP",tools:["Request Classifier","Urgency Assessor","Jurisdiction Router","OCR Scanner"],trigger:"Event: new citizen request received",approval:"auto"},{id:"cit-2",name:"Case Processor Agent",ref:"",role:"contributor",goal:"Process and route requests to appropriate departments with required documentation",dependsOn:["cit-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Case Management MCP",tools:["Case Creator","Document Assembler","Department Router","Status Tracker"],trigger:"",approval:"auto"},{id:"cit-3",name:"Policy Impact Analyst Agent",ref:"",role:"contributor",goal:"Model policy outcomes across population datasets with scenario simulation",dependsOn:["cit-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Policy Analytics MCP",tools:["Monte Carlo Simulator","Demographic Analyzer","Budget Impact Model","Scenario Comparator"],trigger:"",approval:"manual"},{id:"cit-4",name:"Transparency & Audit Agent",ref:"",role:"finalizer",goal:"Generate explainable decision documentation with full audit trail for public record",dependsOn:["cit-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Compliance MCP",tools:["Decision Explainer","Audit Trail Builder","FOIA Compliance Checker","Public Record Generator"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-cit-1",trigger:"priority_request_detected",action:"fast_track_processing",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"high"},{id:"rr-cit-2",trigger:"policy_ambiguity_detected",action:"request_human_review",auto:!1,maxRetries:1,escalateAfterRetries:1,priority:"medium"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","json"],template:"Citizen Request Processing Report",storage:"s3://reports/citizen-requests/"}},PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1={id:"process-clinical-trial-data",version:"0.0.1",name:"Process Clinical Trial Data Team",description:"A multi-agent team that automates clinical trial data processing across dozens of trial sites. Harmonises patient records and lab results to CDISC SDTM format, detects safety signals and adverse events in real time, and prepares submission-ready datasets — all with strict HIPAA and GxP compliance guardrails.",tags:["healthcare","pharma","clinical-trials","patient-data","compliance"],enabled:!0,icon:"heart",emoji:"🏥",color:"#cf222e",agentSpecId:"process-clinical-trial-data:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Clinical Data Orchestrator Agent",ref:"",model:"anthropic:claude-sonnet-4-20250514",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route incoming data through the Ingestion Agent first for format detection and parsing, then to Harmonisation Agent for CDISC SDTM standardisation, then Safety Monitor for adverse event screening, then Submission Preparer for final dataset assembly. Escalate serious adverse events (SAEs) immediately to the medical officer.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!0,maxRetries:2},agents:[{id:"ct-1",name:"Data Ingestion Agent",ref:"",role:"initiator",goal:"Ingest patient records, lab results, and CRFs from clinical sites",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Clinical EDC MCP",tools:["Medidata Connector","Veeva Vault Reader","Oracle Clinical Adapter","Format Detector"],trigger:"Event: new data batch received from site",approval:"auto"},{id:"ct-2",name:"Harmonisation Agent",ref:"",role:"contributor",goal:"Standardise all data to CDISC SDTM format with MedDRA coding",dependsOn:["ct-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Data Standards MCP",tools:["SDTM Mapper","MedDRA Coder","Unit Converter","Site Normaliser"],trigger:"",approval:"auto"},{id:"ct-3",name:"Safety Monitor Agent",ref:"",role:"contributor",goal:"Screen every data point for adverse events and safety signals",dependsOn:["ct-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Safety Database MCP",tools:["AE Classifier","Signal Detector","SAE Escalator","Evidence Trail Builder"],trigger:"",approval:"manual"},{id:"ct-4",name:"Submission Preparer Agent",ref:"",role:"finalizer",goal:"Assemble submission-ready SDTM datasets with validation and define.xml",dependsOn:["ct-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Submission MCP",tools:["Dataset Validator","Define.xml Generator","PDF Report Builder","Compliance Checker"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-clin-1",trigger:"safety_signal_detected",action:"halt_and_escalate",auto:!0,maxRetries:0,escalateAfterRetries:0,priority:"critical"},{id:"rr-clin-2",trigger:"data_integrity_violation",action:"quarantine_and_notify",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"critical"}],healthMonitoring:{heartbeatInterval:"10s",staleThreshold:"45s",unresponsiveThreshold:"90s",stuckThreshold:"180s",maxRestartAttempts:2},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","json","xml"],template:"Clinical Trial Data Report",storage:"s3://reports/clinical-trials/"}},SALES_AND_ACCOUNTING_TEAM_SPEC_0_0_2={id:"sales-and-accounting",version:"0.0.2",name:"Sales and Accounting",description:"A sales desk in the browser that gets financial reports from an accounting application on a runtime, over A2A. Sales takes the request and reports the answer; Accounting reads the Odoo books and answers.",tags:["example","sales","accounting","finance","a2a","odoo"],enabled:!0,icon:"people",emoji:"🤝",color:"#0969da",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Sales",ref:"",app:"sales:0.0.3",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Sales asks Accounting for every figure from the books, one request each time, and reports what Accounting answers without adding to it.",entry:"sales",suggestions:[{text:"Which customer invoices are still open, and how much is due in total?",emoji:"🧾"},{text:"Chart the aged receivables as of today, by customer.",emoji:"⏳"},{text:"Which invoices make up the largest balance due? Show me each one.",emoji:"🔎"},{text:"Send a payment reminder to every customer whose invoice is overdue.",emoji:"✉️"}],delegation:{maxDepth:1,allowPeerDelegation:!0,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!1,maxRetries:0},agents:[{id:"sales",name:"",ref:"",app:"sales:0.0.3",runsIn:"browser",talksTo:[{member:"accounting",over:"a2a"}],role:"initiator",goal:"Take the person's request for a financial report, ask Accounting for it, and hand over what Accounting answered.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"accounting",name:"",ref:"",app:"accounting:0.0.2",runsIn:"runtime",role:"contributor",goal:"Answer report requests from the Odoo books, read only, over A2A.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1={id:"sync-crm-contacts",version:"0.0.1",name:"Sync CRM Contacts Team",description:"A multi-agent team that collects and aggregates contact data from multiple CRM sources, analyzes and deduplicates records, writes cleaned data back, and generates sync summary reports.",tags:["sales","crm","data-sync","deduplication"],enabled:!0,icon:"people",emoji:"🔄",color:"#0969da",agentSpecId:"sync-crm-contacts:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"CRM Orchestrator Agent",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route data collection tasks to the Data Collector first, then analysis, then sync, then reporting. Escalate to human if sync fails 3 times.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:3},agents:[{id:"tm-1",name:"Data Collector Agent",ref:"",role:"initiator",goal:"Collect and aggregate contact data from multiple CRM sources",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Data Processing MCP",tools:["API Connector","Data Parser"],trigger:"Schedule: Daily at 2:00 AM",approval:"auto"},{id:"tm-2",name:"Analyzer Agent",ref:"",role:"contributor",goal:"Analyze collected data and identify patterns and duplicates",dependsOn:["tm-1"],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"Analytics MCP",tools:["Statistical Analysis","ML Predictor","Deduplicator"],trigger:"",approval:"manual"},{id:"tm-3",name:"Sync Writer Agent",ref:"",role:"contributor",goal:"Write cleaned and merged contacts back to the CRM systems",dependsOn:["tm-2"],subagents:[],model:"openai:gpt-4.1",mcpServer:"CRM Write MCP",tools:["Salesforce Connector","HubSpot Connector"],trigger:"",approval:"manual"},{id:"tm-4",name:"Report Generator Agent",ref:"",role:"finalizer",goal:"Generate sync summary reports and send notifications",dependsOn:["tm-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","Chart Builder","Email Sender"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-crm-1",trigger:"sync_conflict_detected",action:"log_and_skip",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"medium"},{id:"rr-crm-2",trigger:"api_rate_limit_hit",action:"backoff_and_retry",auto:!0,maxRetries:5,escalateAfterRetries:5,priority:"low"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!1},output:{formats:["json","csv"],template:"CRM Sync Summary",storage:"s3://reports/crm-sync/"}},TEAM_SPECS={"analyze-campaign-performance":ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1,"analyze-support-tickets":ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1,"audit-inventory-levels":AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1,"automate-regulatory-reporting":AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1,"coding-agents":CODING_AGENTS_TEAM_SPEC_0_0_1,"comprehensive-sales-analytics":COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1,"crop-monitoring":CROP_MONITORING_TEAM_SPEC_0_0_2,"disaster-assessment":DISASTER_ASSESSMENT_TEAM_SPEC_0_0_2,jupyter:JUPYTER_TEAM_SPEC_0_0_1,"month-end-close":MONTH_END_CLOSE_TEAM_SPEC_0_0_2,"notebook-benchmark":NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1,"optimize-grid-operations":OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1,"process-citizen-requests":PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1,"process-clinical-trial-data":PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1,"sales-and-accounting":SALES_AND_ACCOUNTING_TEAM_SPEC_0_0_2,"sync-crm-contacts":SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1},VOICE_CATALOGUE={"kokoro-af-heart":{id:"kokoro-af-heart",version:"0.0.1",name:"Heart",description:"A warm American English voice, Kokoro's best graded (A).",engine:"kokoro",model:"kokoro-82m",voice:"af_heart",languages:["en-US"],where:["server","machine"],licence:{weights:"Apache-2.0"},attribution:"",watermark:!1,sample:"Hello. I read the answers aloud, sentence by sentence, as they are written."},"kokoro-bf-emma":{id:"kokoro-bf-emma",version:"0.0.1",name:"Emma",description:"A clear British English voice.",engine:"kokoro",model:"kokoro-82m",voice:"bf_emma",languages:["en-GB"],where:["server","machine"],licence:{weights:"Apache-2.0"},attribution:"",watermark:!1,sample:"Hello. I read the answers aloud, sentence by sentence, as they are written."},"kokoro-ff-siwis":{id:"kokoro-ff-siwis",version:"0.0.1",name:"Siwis",description:"A French voice, Kokoro's only one, trained on the SIWIS French Speech Synthesis Database, whose licence asks for its attribution.",engine:"kokoro",model:"kokoro-82m",voice:"ff_siwis",languages:["fr-FR"],where:["server","machine"],licence:{weights:"Apache-2.0",dataset:"CC-BY-4.0"},attribution:"Trained on the SIWIS French Speech Synthesis Database, by Pierre-Edouard Honnet, Alexandros Lazaridis and Philip N. Garner (Idiap Research Institute) and Junichi Yamagishi (National Institute of Informatics, Japan, and the University of Edinburgh), under CC BY 4.0.",watermark:!1,sample:"Bonjour. Je lis les réponses à voix haute, phrase par phrase, à mesure qu'elles s'écrivent."}},SPEECH_MODEL_CATALOGUE={"kokoro-82m":{id:"kokoro-82m",version:"0.0.1",name:"Kokoro 82M",description:"Text to speech on Datalayer's servers, on CPU: hexgrad's Kokoro-82M v1.0 exported to ONNX, in full precision, with the voices file that holds its 54 voices, run by kokoro-onnx. Its phonemes come from eSpeak NG (GPL-3.0), which runs on the server and is never sent to a browser. Full precision, not the 8-bit export: on a 16-core CPU the 8-bit one speaks slower than real time (6 s for 3.9 s of speech), this one about four times faster than real time (1 s).",provider:"hexgrad",task:"tts",engine:"kokoro-onnx",dtype:"fp32",languages:["en","fr","es","it","pt","hi","ja","zh"],where:["server","machine"],streaming:!1,licence:{weights:"Apache-2.0",code:"MIT"},attribution:"",upstream:"https://huggingface.co/hexgrad/Kokoro-82M",revision:"model-files-v1.0",files:[{path:"kokoro-v1.0.onnx",sha256:"7d5df8ecf7d4b1878015a32686053fd0eebe2bc377234608764cc0ef3636a6c5",size:325532387},{path:"voices-v1.0.bin",sha256:"bca610b8308e8d99f32e6fe4197e7ec01679264efed0cac9140fe9c29f1fbf7d",size:28214398}]},"moonshine-base-en-server":{id:"moonshine-base-en-server",version:"0.0.1",name:"Moonshine Base (English, server)",description:"Speech to text on Datalayer's servers, in English: Useful Sensors' Moonshine Base (61M parameters), the same 8-bit ONNX export the browser runs, run by onnxruntime on the CPU with a greedy decoder. Its encoder is as long as the speech, with no 30-second window: it hears spoken turns in English, about seven times faster than Whisper small.",provider:"usefulsensors",task:"stt",engine:"onnxruntime",dtype:"q8",languages:["en"],where:["server"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/UsefulSensors/moonshine-base",revision:"b1e9b6aae3c3c7298f10c3798393fdf38e8fbbad",files:[{path:"config.json",sha256:"fab7241d1e9fc6c2370c4c6dfb5da79bb54d67ed9ab6b507ac51d29d2abe01d1",size:922},{path:"generation_config.json",sha256:"f9b3f711b57be7def2e50a8942f64f36ee0a55fad5b84ff93a687b6c5bcc1d44",size:147},{path:"preprocessor_config.json",sha256:"fa43a7017ef85cd1d0fba0d9aae77c8adb16990ae6f11115631f41ec5d8aa679",size:128},{path:"special_tokens_map.json",sha256:"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",size:3},{path:"tokenizer.json",sha256:"7b913404bdd039af4756783218af4440bc07fb7d6d8258d677e34f95b3ec416f",size:3761754},{path:"tokenizer_config.json",sha256:"edaee394565d428ea98a663ae7209cdcfeefc5585c42d7a570ff7c986df2cd15",size:135735},{path:"onnx/encoder_model_quantized.onnx",sha256:"1dd9ab0a7f987113d30affcba5a068d11c8f90fa0223caa3e491ade431ad9751",size:20513063},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"cc9f3cd6698a369c6008b41aa60aa3fb3322e7f03c9bdf19d8e6b7200afca4f3",size:42498870}]},"moonshine-base-en":{id:"moonshine-base-en",version:"0.0.1",name:"Moonshine Base (English)",description:"Speech to text in the browser, in English: Useful Sensors' Moonshine Base (61M parameters), its ONNX export quantized to 8 bits, run by transformers.js. One of the English models whose weights are MIT; the legacy non-English Moonshine models are under a non-commercial licence and are not listed.",provider:"usefulsensors",task:"stt",engine:"transformers.js",dtype:"q8",languages:["en"],where:["device"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/UsefulSensors/moonshine-base",revision:"b1e9b6aae3c3c7298f10c3798393fdf38e8fbbad",files:[{path:"config.json",sha256:"fab7241d1e9fc6c2370c4c6dfb5da79bb54d67ed9ab6b507ac51d29d2abe01d1",size:922},{path:"generation_config.json",sha256:"f9b3f711b57be7def2e50a8942f64f36ee0a55fad5b84ff93a687b6c5bcc1d44",size:147},{path:"preprocessor_config.json",sha256:"fa43a7017ef85cd1d0fba0d9aae77c8adb16990ae6f11115631f41ec5d8aa679",size:128},{path:"special_tokens_map.json",sha256:"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",size:3},{path:"tokenizer.json",sha256:"7b913404bdd039af4756783218af4440bc07fb7d6d8258d677e34f95b3ec416f",size:3761754},{path:"tokenizer_config.json",sha256:"edaee394565d428ea98a663ae7209cdcfeefc5585c42d7a570ff7c986df2cd15",size:135735},{path:"onnx/encoder_model_quantized.onnx",sha256:"1dd9ab0a7f987113d30affcba5a068d11c8f90fa0223caa3e491ade431ad9751",size:20513063},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"cc9f3cd6698a369c6008b41aa60aa3fb3322e7f03c9bdf19d8e6b7200afca4f3",size:42498870}]},"moonshine-tiny-en":{id:"moonshine-tiny-en",version:"0.0.1",name:"Moonshine Tiny (English)",description:"Speech to text in the browser, in English: Useful Sensors' Moonshine Tiny (27M parameters), its ONNX export quantized to 8 bits, run by transformers.js. One of the English models whose weights are MIT; the legacy non-English Moonshine models are under a non-commercial licence and are not listed.",provider:"usefulsensors",task:"stt",engine:"transformers.js",dtype:"q8",languages:["en"],where:["device"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/UsefulSensors/moonshine-tiny",revision:"a6da1241cd305dcd64eab1edbd615f2bb9aabb95",files:[{path:"config.json",sha256:"558e1e02069137c796ace1e50c48d8fe451f04a295929138e6bea885517f0edb",size:921},{path:"generation_config.json",sha256:"f9b3f711b57be7def2e50a8942f64f36ee0a55fad5b84ff93a687b6c5bcc1d44",size:147},{path:"preprocessor_config.json",sha256:"fa43a7017ef85cd1d0fba0d9aae77c8adb16990ae6f11115631f41ec5d8aa679",size:128},{path:"special_tokens_map.json",sha256:"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",size:3},{path:"tokenizer.json",sha256:"7b913404bdd039af4756783218af4440bc07fb7d6d8258d677e34f95b3ec416f",size:3761754},{path:"tokenizer_config.json",sha256:"edaee394565d428ea98a663ae7209cdcfeefc5585c42d7a570ff7c986df2cd15",size:135735},{path:"onnx/encoder_model_quantized.onnx",sha256:"c6fc4b7bc5af75c0591fd157a1f3829b533d18e9769a888fd95a62e470dd4f4a",size:7937661},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"eed87831c3a6103534aae7d47a5d485025c659a1323901513961c39fe8a1a367",size:20243286}]},"silero-vad":{id:"silero-vad",version:"0.0.1",name:"Silero VAD",description:"Where speech starts and ends in what the microphone heard, in the browser: Silero VAD (about 2 MB), the build @ricky0123/vad-web 0.0.31 ships and runs on onnxruntime-web. Push-to-talk keeps the speech it finds and drops the rest.",provider:"snakers4",task:"vad",engine:"vad-web",dtype:"fp32",languages:[],where:["device"],streaming:!0,licence:{weights:"MIT",code:"ISC"},attribution:"",upstream:"https://github.com/snakers4/silero-vad",revision:"0.0.31",files:[{path:"silero_vad_legacy.onnx",sha256:"a35ebf52fd3ce5f1469b2a36158dba761bc47b973ea3382b3186ca15b1f5af28",size:1807522}]},"whisper-base":{id:"whisper-base",version:"0.0.1",name:"Whisper Base",description:"Speech to text in the browser for the languages Moonshine's MIT models do not speak, French first: OpenAI's Whisper base (74M parameters, 99 languages), its ONNX export quantized to 8 bits, run by transformers.js. A clip at a time.",provider:"openai",task:"stt",engine:"transformers.js",dtype:"q8",languages:["en","fr"],where:["device"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/openai/whisper-base",revision:"1846881b6b3a3024392c1eea3ad983695bc23925",files:[{path:"config.json",sha256:"f4d0608f7d918166da7edb3e188de5ef1bfe70d9802e785d271fd88111e9cf4b",size:2243},{path:"generation_config.json",sha256:"61070cf8de25b1e9256e8e102ded49d8d24a8369ed36ef84fdf21549e68125a0",size:3832},{path:"preprocessor_config.json",sha256:"a6a76d28c93edb273669eb9e0b0636a2bddbb1272c3261e47b7ca6dfdbac1b8d",size:339},{path:"special_tokens_map.json",sha256:"e67ae3a0aaa99abcd9f187138e12db1f65c16a14761c50ef10eef2c174a7a691",size:2194},{path:"tokenizer.json",sha256:"27fc476bfe7f17299480be2273fc0608e4d5a99aba2ab5dec5374b4482d1a566",size:2480466},{path:"tokenizer_config.json",sha256:"2e036e4dbacfdeb7242c7d4ec4149f4a16e86026048f94d1637e3a8ee9c6a573",size:282682},{path:"added_tokens.json",sha256:"9715fd2243b6f06a5858b5e32950d2853f73dd5bc201aafcf76f5082a2d8acd1",size:34604},{path:"normalizer.json",sha256:"bf1c507dc8724ca9cf9903640dacfb69dae2f00edee4f21ceba106a7392f26dd",size:52666},{path:"vocab.json",sha256:"50d6a919f0a0601d56a04eb583c780d18553aa388254ba3158eb6a00f13e2c1a",size:1036584},{path:"onnx/encoder_model_quantized.onnx",sha256:"5862993336bf33acd23736071aae2b32261d3b1b2f37780194460d4ef974dd46",size:23201314},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"fa3ef9902734ce5ae6f9ef2bdb2ba9a6c4b5785b09f4f420ce036573dc9d090b",size:53693315}]},"whisper-large-v3-turbo":{id:"whisper-large-v3-turbo",version:"0.0.1",name:"Whisper Large v3 Turbo",description:"Speech to text on Datalayer's servers, on CPU: OpenAI's Whisper large-v3-turbo (809M parameters, 99 languages), converted to CTranslate2 in half precision and run by faster-whisper, its weights quantized to 8 bits when loaded. A recording of up to a minute at a time; the language is detected when the page does not say it.",provider:"openai",task:"stt",engine:"faster-whisper",dtype:"float16",languages:["en","fr","es","it","pt","de","nl","ja","zh","hi"],where:["server"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/openai/whisper-large-v3-turbo",revision:"0a363e9161cbc7ed1431c9597a8ceaf0c4f78fcf",files:[{path:"config.json",sha256:"b0253ea6c0d3bea6b1e19e91a02acfd3b53f4467362efcb5a3e6b16c9b3a9b7e",size:2263},{path:"preprocessor_config.json",sha256:"7ccc62c6f2765af1f3b46c00c9b5894426835a05021c8b9c01eecb6dfb542711",size:340},{path:"tokenizer.json",sha256:"297b13372ac43916285644fb9687add3cc62ee2a1adb60da3dc25cc94c1871fd",size:2710337},{path:"vocabulary.json",sha256:"c69260f2ab26d659b7c398f9a2b2b48ed0df16c3b47d7326782fd9cba71690c1",size:1068114},{path:"model.bin",sha256:"e76620f83d5f5b69efd3d87e3dc180c1bd21df9fbebacfd4335e5e1efcc018da",size:1617884929}]},"whisper-small":{id:"whisper-small",version:"0.0.1",name:"Whisper Small",description:"Speech to text on Datalayer's servers for short spoken turns, on CPU: OpenAI's Whisper small (244M parameters, 99 languages), converted to CTranslate2 and run by faster-whisper, its weights quantized to 8 bits when loaded. About four times faster than large-v3-turbo; on the fixtures it hears English as well (3.3% against 2.4%) and French less well (16.1% against 2.6%). Recordings longer than a turn go to large-v3-turbo.",provider:"openai",task:"stt",engine:"faster-whisper",dtype:"float16",languages:["en","fr","es","it","pt","de","nl","ja","zh","hi"],where:["server","machine"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/openai/whisper-small",revision:"536b0662742c02347bc0e980a01041f333bce120",files:[{path:"config.json",sha256:"b55496ac7940a7ae47d2c01eab40edfd8701feec1229d9cce3b40014383fb828",size:2370},{path:"tokenizer.json",sha256:"fb7b63191e9bb045082c79fd742a3106a12c99513ab30df4a0d47fa6cb6fd0ab",size:2203239},{path:"vocabulary.txt",sha256:"34ce3fe1c5041027b3f8d42912270993f986dbc4bb34cf27f951e34a1e453913",size:459861},{path:"model.bin",sha256:"3e305921506d8872816023e4c273e75d2419fb89b24da97b4fe7bce14170d671",size:483546902}]}};function voiceSpeaks(Au,lo){return Au.languages.some($u=>$u===lo||$u.split("-")[0]===lo)}function voiceFor(Au){const lo=Object.values(VOICE_CATALOGUE);return lo.find($u=>$u.languages.includes(Au))??lo.find($u=>voiceSpeaks($u,Au.split("-")[0]))}function transcriberFor(Au){const lo=Au.split("-")[0],$u=Object.values(SPEECH_MODEL_CATALOGUE).filter(Ru=>Ru.task==="stt"&&Ru.where.includes("device")&&Ru.languages.includes(lo));return $u.find(Ru=>Ru.id==="moonshine-tiny-en")??$u.find(Ru=>Ru.id.startsWith("moonshine-"))??$u[0]}const MCP_SERVER_MAP={"tavily:0.0.1":TAVILY_MCP_SERVER_0_0_1},SKILL_MAP={"crawl:0.0.1":CRAWL_SKILL_SPEC_0_0_1,"events:0.0.1":EVENTS_SKILL_SPEC_0_0_1,"github:0.0.1":GITHUB_SKILL_SPEC_0_0_1,"text-summarizer:0.0.1":TEXT_SUMMARIZER_SKILL_SPEC_0_0_1};function toAgentSkillSpec(Au){return{id:Au.id,name:Au.name,description:Au.description,version:Au.version??"0.0.1",tags:Au.tags,enabled:Au.enabled,requiredEnvVars:Au.requiredEnvVars}}const TOOL_MAP={"runtime-echo:0.0.1":RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1},FRONTEND_TOOL_MAP={"jupyter-notebook:0.0.1":JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1,"lexical-document:0.0.1":LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1},COG_CRAWLER_AGENTSPEC_0_0_1={id:"cog-crawler",version:"0.0.1",name:"Crawler Cog",description:"Researches the web and public repositories under the Web Research Frame: every finding rests on a source that was opened, is cited, and is checked before it is reported.",tags:["market-analyst","agent-worker","research","github","analysis","cog"],domain:"market-analyst",enabled:!0,model:"bedrock:us.anthropic.claude-sonnet-4-6",modelAdditionals:["alibaba:qwen-max"],mcpServers:[MCP_SERVER_MAP["tavily:0.0.1"]],skills:[SKILL_MAP["github:0.0.1"]?toAgentSkillSpec(SKILL_MAP["github:0.0.1"]):void 0,SKILL_MAP["events:0.0.1"]?toAgentSkillSpec(SKILL_MAP["events:0.0.1"]):void 0,SKILL_MAP["crawl:0.0.1"]?toAgentSkillSpec(SKILL_MAP["crawl:0.0.1"]):void 0].filter(Boolean),backendTools:[],frontendTools:[FRONTEND_TOOL_MAP["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"globe",emoji:"🌐",color:"#10B981",suggestions:[{text:"Search the web for recent news about AI agents",summary:"AI agent news"},{text:"Find trending open-source Python projects on GitHub",summary:"Trending Python projects"},{text:"Research best practices for building RAG applications",summary:"RAG best practices"},{text:"Compare popular JavaScript frameworks in 2024",summary:"JavaScript frameworks 2024"}],welcomeMessage:`Hi! I'm the Crawler Cog. I research the web and GitHub under the Web Research Frame: I open what I cite, I say which sources are primary, and I tell you where sources disagree.
3150
+ `,prompt:"Run the scheduled workflow and produce the configured deliverable."},modelConfig:void 0,mcpServerTools:void 0,guardrails:[{name:"GitHub CI Bot",identity_provider:"github",identity_name:"ci-bot@acme.com",permissions:{"read:data":!0,"write:data":!0,"execute:code":!0,"access:internet":!0,"send:email":!0,"deploy:production":!1},token_limits:{per_run:"60K",per_day:"600K",per_month:"6M"}}],evals:[{name:"Data Quality",category:"coding",task_count:300},{name:"Deduplication Accuracy",category:"reasoning",task_count:150}],codemode:{enabled:!0,token_reduction:"~85%",speedup:"~1.5× faster"},output:{formats:["JSON","PDF"],template:"CRM Sync Report",storage:"/outputs/crm-sync/"},advanced:{cost_limit:"$10.00 per run",time_limit:"600 seconds",max_iterations:100,validation:"All CRM records must reconcile after sync"},checkpoints:void 0,authorizationPolicy:"",notifications:{email:"jennifer.c@company.com",slack:"#crm-sync"},memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_THEMATIC_ANALYSIS_AGENTSPEC_0_0_1={id:"worker-thematic-analysis",version:"0.0.1",name:"Thematic Analyst",description:"Codes transcripts, extracts themes, and organizes qualitative evidence.",tags:["market-analyst","agent-worker"],domain:"market-analyst",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["tavily:0.0.1"],MCP_SERVER_MAP$1["salesforce:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["crawl:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["crawl:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"note",emoji:"🔎",color:"#EC4899",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Thematic Analysis Worker, an autonomous agent worker in the market analyst domain. Codes transcripts, extracts themes, and organizes qualitative evidence. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Code transcripts, extract themes, and organize the supporting evidence.",delegable:[{id:"data.extract"},{id:"data.analyse"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_TRAVEL_RECOMMENDER_AGENTSPEC_0_0_1={id:"worker-travel-recommender",version:"0.0.1",name:"Travel Recommender",description:"Researches travel options and builds personalized itineraries with source comparison.",tags:["personal-assistant","agent-worker"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["tavily:0.0.1"],MCP_SERVER_MAP$1["google-workspace:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["crawl:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["crawl:0.0.1"]):void 0,SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"globe",emoji:"🤖",color:"#A855F7",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Travel Recommender, an autonomous agent worker in the personal assistant domain. Researches travel options and builds personalized itineraries with source comparison. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Research travel options and build a personalized itinerary, comparing sources and prices.",delegable:[{id:"research.gather"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_TRENDS_SEEKER_AGENTSPEC_0_0_1={id:"worker-trends-seeker",version:"0.0.1",name:"Trends Seeker",description:"Tracks emerging trends across sources and summarizes what is gaining momentum.",tags:["personal-assistant","agent-worker"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["tavily:0.0.1"],MCP_SERVER_MAP$1["google-workspace:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["crawl:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["crawl:0.0.1"]):void 0,SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"graph",emoji:"🤖",color:"#A855F7",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Trends Seeker, an autonomous agent worker in the personal assistant domain. Tracks emerging trends across sources and summarizes what is gaining momentum. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Track emerging trends across sources and summarize what is worth attention and why.",delegable:[{id:"document.summarise"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_VARIANT_ANALYSIS_AGENTSPEC_0_0_1={id:"worker-variant-analysis",version:"0.0.1",name:"Variant Analyst",description:"Analyzes genomic variants, annotates findings, and prepares interpretable reports.",tags:["life-sciences","agent-worker"],domain:"life-sciences",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[MCP_SERVER_MAP$1["huggingface:0.0.1"],MCP_SERVER_MAP$1["kaggle:0.0.1"]],skills:[SKILL_MAP$1["text-summarizer:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["text-summarizer:0.0.1"]):void 0,SKILL_MAP$1["pdf:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["pdf:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"],TOOL_MAP$1["runtime-sensitive-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"beaker",emoji:"🧬",color:"#06B6D4",suggestions:[],welcomeMessage:void 0,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are the Variant Analysis Worker, an autonomous agent worker in the life sciences domain. Analyzes genomic variants, annotates findings, and prepares interpretable reports. Work step by step, show your reasoning and evidence, and require explicit human approval before any external or irreversible action.",systemPromptCodemodeAddons:void 0,goal:"Analyze and annotate genomic variants and produce an interpretable, provenance-tracked report.",delegable:[{id:"data.analyse"},{id:"report.author"}],protocol:"vercel-ai",ui:[{plugin:"a2ui-surface",renderer:"a2ui"}],protocols:[],trigger:void 0,modelConfig:{temperature:.5,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},WORKER_WEEKLY_EXECUTIVE_BRIEFING_AGENTSPEC_0_0_1={id:"worker-weekly-executive-briefing",version:"0.0.1",name:"Weekly Executive Briefing",description:"Generate a weekly executive summary with KPI deltas, top risks, and recommended actions from operational and analytics data.",tags:["personal-assistant","agent-worker","analytics","reporting","risk"],domain:"personal-assistant",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[SKILL_MAP$1["events:0.0.1"]?toAgentSkillSpec$1(SKILL_MAP$1["events:0.0.1"]):void 0].filter(Boolean),backendTools:[TOOL_MAP$1["runtime-echo:0.0.1"]],frontendTools:[FRONTEND_TOOL_MAP$1["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP$1["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"lightbulb",emoji:"📊",color:"#1F883D",suggestions:[{text:"Use /home/datalayer/datasets/datalayer-nfs/sales/sales_pipeline.csv to produce a weekly executive briefing with trends, risks, and actions.",summary:"Weekly executive briefing"}],welcomeMessage:"Hi! I can help with weekly executive briefing. Share data, files, or context and I will run the workflow end-to-end, explain what matters, and suggest practical next steps.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:"You are a specialized assistant for this gallery workflow: Weekly Executive Briefing. Objective: Generate a weekly executive summary with KPI deltas, top risks, and recommended actions from operational and analytics data. Use the runtime tools and notebook execution environment when needed. Keep outputs concise, structured, and decision-oriented. Provide clear reasoning and recommended next actions.",systemPromptCodemodeAddons:"Compose focused execution steps, validate intermediate results, and summarize outcomes after each run. Prefer efficient, reproducible code paths.",goal:void 0,delegable:[{id:"data.analyse"},{id:"report.author"}],protocol:void 0,ui:[],protocols:[],trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0,token_reduction:"~80%",speedup:"~1.5x"},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},AGENTSPECS$1={"example-a2a-researcher":EXAMPLE_A2A_RESEARCHER_AGENTSPEC_0_0_1,"example-a2a-writer":EXAMPLE_A2A_WRITER_AGENTSPEC_0_0_1,"example-a2a":EXAMPLE_A2A_AGENTSPEC_0_0_1,"example-a2ui-agent":EXAMPLE_A2UI_AGENT_SPEC_0_0_1,"example-a2ui-jupyter-output":EXAMPLE_A2UI_JUPYTER_OUTPUT_AGENTSPEC_0_0_1,"example-a2ui-viewer":EXAMPLE_A2UI_VIEWER_AGENTSPEC_0_0_1,"example-agent-critic-loop-for-analysis":EXAMPLE_AGENT_CRITIC_LOOP_FOR_ANALYSIS_AGENTSPEC_0_0_1,"example-agentic-chat":EXAMPLE_AGENTIC_CHAT_AGENTSPEC_0_0_1,"example-agentic-generative-ui":EXAMPLE_AGENTIC_GENERATIVE_UI_AGENTSPEC_0_0_1,"example-ai-creates-dashboards":EXAMPLE_AI_CREATES_DASHBOARDS_AGENTSPEC_0_0_1,"example-ai-explains-notebook-output":EXAMPLE_AI_EXPLAINS_NOTEBOOK_OUTPUT_AGENTSPEC_0_0_1,"example-ai-writes-pandas-code":EXAMPLE_AI_WRITES_PANDAS_CODE_AGENTSPEC_0_0_1,"example-analyze-excel-spreadsheet":EXAMPLE_ANALYZE_EXCEL_SPREADSHEET_AGENTSPEC_0_0_1,"example-backend-tool-rendering":EXAMPLE_BACKEND_TOOL_RENDERING_AGENTSPEC_0_0_1,"example-blank":EXAMPLE_BLANK_AGENTSPEC_0_0_1,"example-build-notebook-with-one-prompt":EXAMPLE_BUILD_NOTEBOOK_WITH_ONE_PROMPT_AGENTSPEC_0_0_1,"example-checkpoints":EXAMPLE_CHECKPOINTS_AGENTSPEC_0_0_1,"example-cloudflare":EXAMPLE_CLOUDFLARE_AGENTSPEC_0_0_1,"example-code-sandbox":EXAMPLE_CODE_SANDBOX_AGENTSPEC_0_0_1,"example-codemode":EXAMPLE_CODEMODE_AGENTSPEC_0_0_1,"example-compaction":EXAMPLE_COMPACTION_AGENTSPEC_0_0_1,"example-compare-two-spreadsheets":EXAMPLE_COMPARE_TWO_SPREADSHEETS_AGENTSPEC_0_0_1,"example-cost-comparison-report":EXAMPLE_COST_COMPARISON_REPORT_AGENTSPEC_0_0_1,"example-decks":EXAMPLE_DECKS_AGENTSPEC_0_0_1,"example-document-agent-sidebar":EXAMPLE_DOCUMENT_AGENT_SIDEBAR_AGENTSPEC_0_0_1,"example-document-agent":EXAMPLE_DOCUMENT_AGENT_SPEC_0_0_1,"example-evals-nocodemode":EXAMPLE_EVALS_NOCODEMODE_AGENTSPEC_0_0_1,"example-evals":EXAMPLE_EVALS_AGENTSPEC_0_0_1,"example-explore-sql-database":EXAMPLE_EXPLORE_SQL_DATABASE_AGENTSPEC_0_0_1,"example-five-ai-agents-analyze-csv":EXAMPLE_FIVE_AI_AGENTS_ANALYZE_CSV_AGENTSPEC_0_0_1,"example-five-notebooks-in-parallel":EXAMPLE_FIVE_NOTEBOOKS_IN_PARALLEL_AGENTSPEC_0_0_1,"example-full":EXAMPLE_FULL_AGENTSPEC_0_0_1,"example-gpt-and-claude-collaborate":EXAMPLE_GPT_AND_CLAUDE_COLLABORATE_AGENTSPEC_0_0_1,"example-guardrails":EXAMPLE_GUARDRAILS_AGENTSPEC_0_0_1,"example-haiku-generative-ui":EXAMPLE_HAIKU_GENERATIVE_UI_AGENTSPEC_0_0_1,"example-harness-claude-code":EXAMPLE_HARNESS_CLAUDE_CODE_AGENTSPEC_0_0_1,"example-harness-codex":EXAMPLE_HARNESS_CODEX_AGENTSPEC_0_0_1,"example-harness-fast-agent":EXAMPLE_HARNESS_FAST_AGENT_SPEC_0_0_1,"example-harness-gemini-cli":EXAMPLE_HARNESS_GEMINI_CLI_AGENTSPEC_0_0_1,"example-harness-goose":EXAMPLE_HARNESS_GOOSE_AGENTSPEC_0_0_1,"example-harness-opencode":EXAMPLE_HARNESS_OPENCODE_AGENTSPEC_0_0_1,"example-harness-openhands":EXAMPLE_HARNESS_OPENHANDS_AGENTSPEC_0_0_1,"example-harness-pi":EXAMPLE_HARNESS_PI_AGENTSPEC_0_0_1,"example-hooks":EXAMPLE_HOOKS_AGENTSPEC_0_0_1,"example-human-approved-automation":EXAMPLE_HUMAN_APPROVED_AUTOMATION_AGENTSPEC_0_0_1,"example-human-in-the-loop":EXAMPLE_HUMAN_IN_THE_LOOP_AGENTSPEC_0_0_1,"example-inference":EXAMPLE_INFERENCE_AGENTSPEC_0_0_1,"example-long-running-agent-overnight":EXAMPLE_LONG_RUNNING_AGENT_OVERNIGHT_AGENTSPEC_0_0_1,"example-mcp":EXAMPLE_MCP_AGENTSPEC_0_0_1,"example-memory":EXAMPLE_MEMORY_AGENTSPEC_0_0_1,"example-monitoring":EXAMPLE_MONITORING_AGENTSPEC_0_0_1,"example-multi-agent-data-cleaning":EXAMPLE_MULTI_AGENT_DATA_CLEANING_AGENTSPEC_0_0_1,"example-multi-agent-root-cause-analysis":EXAMPLE_MULTI_AGENT_ROOT_CAUSE_ANALYSIS_AGENTSPEC_0_0_1,"example-no-codemode":EXAMPLE_NO_CODEMODE_AGENTSPEC_0_0_1,"example-notifications":EXAMPLE_NOTIFICATIONS_AGENTSPEC_0_0_1,"example-one-trigger-approval":EXAMPLE_ONE_TRIGGER_APPROVAL_AGENTSPEC_0_0_1,"example-one-trigger":EXAMPLE_ONE_TRIGGER_AGENTSPEC_0_0_1,"example-otel":EXAMPLE_OTEL_AGENTSPEC_0_0_1,"example-output":EXAMPLE_OUTPUT_AGENTSPEC_0_0_1,"example-parameters":EXAMPLE_PARAMETERS_AGENTSPEC_0_0_1,"example-replace-excel-pivot-work":EXAMPLE_REPLACE_EXCEL_PIVOT_WORK_AGENTSPEC_0_0_1,"example-resumable-etl-with-checkpoints":EXAMPLE_RESUMABLE_ETL_WITH_CHECKPOINTS_AGENTSPEC_0_0_1,"example-run-python-safely-in-the-cloud":EXAMPLE_RUN_PYTHON_SAFELY_IN_THE_CLOUD_AGENTSPEC_0_0_1,"example-sandbox-colab":EXAMPLE_SANDBOX_COLAB_AGENTSPEC_0_0_1,"example-sandbox-datalayer":EXAMPLE_SANDBOX_DATALAYER_AGENTSPEC_0_0_1,"example-sandbox-docker":EXAMPLE_SANDBOX_DOCKER_AGENTSPEC_0_0_1,"example-sandbox-eval":EXAMPLE_SANDBOX_EVAL_AGENTSPEC_0_0_1,"example-sandbox-jupyter":EXAMPLE_SANDBOX_JUPYTER_AGENTSPEC_0_0_1,"example-sandbox-kaggle":EXAMPLE_SANDBOX_KAGGLE_AGENTSPEC_0_0_1,"example-sandbox-modal":EXAMPLE_SANDBOX_MODAL_AGENTSPEC_0_0_1,"example-sandbox-monty":EXAMPLE_SANDBOX_MONTY_AGENTSPEC_0_0_1,"example-shared-state":EXAMPLE_SHARED_STATE_AGENTSPEC_0_0_1,"example-simple":EXAMPLE_SIMPLE_AGENTSPEC_0_0_1,"example-skills":EXAMPLE_SKILLS_AGENTSPEC_0_0_1,"example-subagents":EXAMPLE_SUBAGENTS_AGENTSPEC_0_0_1,"example-tool-approvals":EXAMPLE_TOOL_APPROVALS_AGENTSPEC_0_0_1,"example-tool-based-generative-ui":EXAMPLE_TOOL_BASED_GENERATIVE_UI_AGENTSPEC_0_0_1,"jupyter-cell-fixer":JUPYTER_CELL_FIXER_AGENTSPEC_0_0_1,"jupyter-data-analyst":JUPYTER_DATA_ANALYST_AGENTSPEC_0_0_1,"jupyter-notebook-compactor":JUPYTER_NOTEBOOK_COMPACTOR_AGENTSPEC_0_0_1,"jupyter-notebook-reproducer":JUPYTER_NOTEBOOK_REPRODUCER_AGENTSPEC_0_0_1,"jupyter-notebook-reviewer":JUPYTER_NOTEBOOK_REVIEWER_AGENTSPEC_0_0_1,"jupyter-notebook-writer":JUPYTER_NOTEBOOK_WRITER_AGENTSPEC_0_0_1,"jupyter-tutor":JUPYTER_TUTOR_AGENTSPEC_0_0_1,"loop-shell":LOOP_SHELL_AGENTSPEC_0_0_1,"worker-accountant":WORKER_ACCOUNTANT_AGENTSPEC_0_0_1,"worker-agent-reviews-sql":WORKER_AGENT_REVIEWS_SQL_AGENTSPEC_0_0_1,"worker-analyze-campaign-performance":WORKER_ANALYZE_CAMPAIGN_PERFORMANCE_AGENTSPEC_0_0_1,"worker-analyze-support-tickets":WORKER_ANALYZE_SUPPORT_TICKETS_AGENTSPEC_0_0_1,"worker-ap-invoice":WORKER_AP_INVOICE_AGENTSPEC_0_0_1,"worker-audit-inventory-levels":WORKER_AUDIT_INVENTORY_LEVELS_AGENTSPEC_0_0_1,"worker-audit-pack-builder":WORKER_AUDIT_PACK_BUILDER_AGENTSPEC_0_0_1,"worker-automate-regulatory-reporting":WORKER_AUTOMATE_REGULATORY_REPORTING_AGENTSPEC_0_0_1,"worker-backtest-auditor":WORKER_BACKTEST_AUDITOR_AGENTSPEC_0_0_1,"worker-bank-reconciliation":WORKER_BANK_RECONCILIATION_AGENTSPEC_0_0_1,"worker-campaign-planning":WORKER_CAMPAIGN_PLANNING_AGENTSPEC_0_0_1,"worker-cat-exposure":WORKER_CAT_EXPOSURE_AGENTSPEC_0_0_1,"worker-change-detection":WORKER_CHANGE_DETECTION_AGENTSPEC_0_0_1,"worker-classify-route-emails":WORKER_CLASSIFY_ROUTE_EMAILS_AGENTSPEC_0_0_1,"worker-cms-astro":WORKER_CMS_ASTRO_AGENTSPEC_0_0_1,"worker-coding-tutor":WORKER_CODING_TUTOR_AGENTSPEC_0_0_1,"worker-cohort-comparison":WORKER_COHORT_COMPARISON_AGENTSPEC_0_0_1,"worker-collections":WORKER_COLLECTIONS_AGENTSPEC_0_0_1,"worker-community-response":WORKER_COMMUNITY_RESPONSE_AGENTSPEC_0_0_1,"worker-competitive-intelligence":WORKER_COMPETITIVE_INTELLIGENCE_AGENTSPEC_0_0_1,"worker-compliance-report-draft":WORKER_COMPLIANCE_REPORT_DRAFT_AGENTSPEC_0_0_1,"worker-comprehensive-sales-analytics":WORKER_COMPREHENSIVE_SALES_ANALYTICS_AGENTSPEC_0_0_1,"worker-compute-cost-optimizer":WORKER_COMPUTE_COST_OPTIMIZER_AGENTSPEC_0_0_1,"worker-content-repurposing":WORKER_CONTENT_REPURPOSING_AGENTSPEC_0_0_1,"worker-crawler":WORKER_CRAWLER_AGENTSPEC_0_0_1,"worker-crop-monitoring":WORKER_CROP_MONITORING_AGENTSPEC_0_0_1,"worker-curtailment-investigator":WORKER_CURTAILMENT_INVESTIGATOR_AGENTSPEC_0_0_1,"worker-customer-churn-analysis":WORKER_CUSTOMER_CHURN_ANALYSIS_AGENTSPEC_0_0_1,"worker-customer-interviewer":WORKER_CUSTOMER_INTERVIEWER_AGENTSPEC_0_0_1,"worker-data-acquisition":WORKER_DATA_ACQUISITION_AGENTSPEC_0_0_1,"worker-disaster-assessment":WORKER_DISASTER_ASSESSMENT_AGENTSPEC_0_0_1,"worker-document-qa":WORKER_DOCUMENT_QA_AGENTSPEC_0_0_1,"worker-end-of-month-performance":WORKER_END_OF_MONTH_PERFORMANCE_AGENTSPEC_0_0_1,"worker-energy-trading-analyst":WORKER_ENERGY_TRADING_ANALYST_AGENTSPEC_0_0_1,"worker-environmental-compliance":WORKER_ENVIRONMENTAL_COMPLIANCE_AGENTSPEC_0_0_1,"worker-event-response":WORKER_EVENT_RESPONSE_AGENTSPEC_0_0_1,"worker-evidence-repository":WORKER_EVIDENCE_REPOSITORY_AGENTSPEC_0_0_1,"worker-expense-audit":WORKER_EXPENSE_AUDIT_AGENTSPEC_0_0_1,"worker-exposure-data-quality":WORKER_EXPOSURE_DATA_QUALITY_AGENTSPEC_0_0_1,"worker-extract-data-from-files":WORKER_EXTRACT_DATA_FROM_FILES_AGENTSPEC_0_0_1,"worker-extract-kpis-from-quarterly-pdf":WORKER_EXTRACT_KPIS_FROM_QUARTERLY_PDF_AGENTSPEC_0_0_1,"worker-factor-analysis":WORKER_FACTOR_ANALYSIS_AGENTSPEC_0_0_1,"worker-financial-viz":WORKER_FINANCIAL_VIZ_AGENTSPEC_0_0_1,"worker-generate-weekly-reports":WORKER_GENERATE_WEEKLY_REPORTS_AGENTSPEC_0_0_1,"worker-github-agent":WORKER_GITHUB_AGENT_SPEC_0_0_1,"worker-grid-forecast":WORKER_GRID_FORECAST_AGENTSPEC_0_0_1,"worker-information-routing":WORKER_INFORMATION_ROUTING_AGENTSPEC_0_0_1,"worker-infrastructure-monitoring":WORKER_INFRASTRUCTURE_MONITORING_AGENTSPEC_0_0_1,"worker-insurance-claims-review":WORKER_INSURANCE_CLAIMS_REVIEW_AGENTSPEC_0_0_1,"worker-interview-guide":WORKER_INTERVIEW_GUIDE_AGENTSPEC_0_0_1,"worker-inventory-demand-planning":WORKER_INVENTORY_DEMAND_PLANNING_AGENTSPEC_0_0_1,"worker-job-hunter":WORKER_JOB_HUNTER_AGENTSPEC_0_0_1,"worker-mail-triage":WORKER_MAIL_TRIAGE_AGENTSPEC_0_0_1,"worker-marketing-analytics":WORKER_MARKETING_ANALYTICS_AGENTSPEC_0_0_1,"worker-medical-research-review":WORKER_MEDICAL_RESEARCH_REVIEW_AGENTSPEC_0_0_1,"worker-model-comparison":WORKER_MODEL_COMPARISON_AGENTSPEC_0_0_1,"worker-monitor-sales-kpis":WORKER_MONITOR_SALES_KPIS_AGENTSPEC_0_0_1,"worker-month-end-close":WORKER_MONTH_END_CLOSE_AGENTSPEC_0_0_1,"worker-news-aggregator":WORKER_NEWS_AGGREGATOR_AGENTSPEC_0_0_1,"worker-optimize-dynamic-pricing":WORKER_OPTIMIZE_DYNAMIC_PRICING_AGENTSPEC_0_0_1,"worker-optimize-grid-operations":WORKER_OPTIMIZE_GRID_OPERATIONS_AGENTSPEC_0_0_1,"worker-optimize-sql-query-performance":WORKER_OPTIMIZE_SQL_QUERY_PERFORMANCE_AGENTSPEC_0_0_1,"worker-performance-attribution":WORKER_PERFORMANCE_ATTRIBUTION_AGENTSPEC_0_0_1,"worker-pipeline-debugger":WORKER_PIPELINE_DEBUGGER_AGENTSPEC_0_0_1,"worker-pitcher":WORKER_PITCHER_AGENTSPEC_0_0_1,"worker-portfolio-accumulation":WORKER_PORTFOLIO_ACCUMULATION_AGENTSPEC_0_0_1,"worker-portfolio-risk":WORKER_PORTFOLIO_RISK_AGENTSPEC_0_0_1,"worker-predictive-maintenance":WORKER_PREDICTIVE_MAINTENANCE_AGENTSPEC_0_0_1,"worker-process-citizen-requests":WORKER_PROCESS_CITIZEN_REQUESTS_AGENTSPEC_0_0_1,"worker-process-clinical-trial-data":WORKER_PROCESS_CLINICAL_TRIAL_DATA_AGENTSPEC_0_0_1,"worker-process-financial-transactions":WORKER_PROCESS_FINANCIAL_TRANSACTIONS_AGENTSPEC_0_0_1,"worker-product-finder":WORKER_PRODUCT_FINDER_AGENTSPEC_0_0_1,"worker-quant-research":WORKER_QUANT_RESEARCH_AGENTSPEC_0_0_1,"worker-renewable-asset-performance":WORKER_RENEWABLE_ASSET_PERFORMANCE_AGENTSPEC_0_0_1,"worker-research-recruiter":WORKER_RESEARCH_RECRUITER_AGENTSPEC_0_0_1,"worker-rna-seq":WORKER_RNA_SEQ_AGENTSPEC_0_0_1,"worker-sales-forecasting":WORKER_SALES_FORECASTING_AGENTSPEC_0_0_1,"worker-sales-pipeline-board-report":WORKER_SALES_PIPELINE_BOARD_REPORT_AGENTSPEC_0_0_1,"worker-scenario-testing":WORKER_SCENARIO_TESTING_AGENTSPEC_0_0_1,"worker-scheduled-nightly-data-quality-checks":WORKER_SCHEDULED_NIGHTLY_DATA_QUALITY_CHECKS_AGENTSPEC_0_0_1,"worker-scientific-notebook-assistant":WORKER_SCIENTIFIC_NOTEBOOK_ASSISTANT_AGENTSPEC_0_0_1,"worker-single-cell-processing":WORKER_SINGLE_CELL_PROCESSING_AGENTSPEC_0_0_1,"worker-social-listening":WORKER_SOCIAL_LISTENING_AGENTSPEC_0_0_1,"worker-social-marketer":WORKER_SOCIAL_MARKETER_AGENTSPEC_0_0_1,"worker-spatial-data-analysis":WORKER_SPATIAL_DATA_ANALYSIS_AGENTSPEC_0_0_1,"worker-summarize-documents":WORKER_SUMMARIZE_DOCUMENTS_AGENTSPEC_0_0_1,"worker-sync-crm-contacts":WORKER_SYNC_CRM_CONTACTS_AGENTSPEC_0_0_1,"worker-thematic-analysis":WORKER_THEMATIC_ANALYSIS_AGENTSPEC_0_0_1,"worker-travel-recommender":WORKER_TRAVEL_RECOMMENDER_AGENTSPEC_0_0_1,"worker-trends-seeker":WORKER_TRENDS_SEEKER_AGENTSPEC_0_0_1,"worker-variant-analysis":WORKER_VARIANT_ANALYSIS_AGENTSPEC_0_0_1,"worker-weekly-executive-briefing":WORKER_WEEKLY_EXECUTIVE_BRIEFING_AGENTSPEC_0_0_1},AGENTSPECS={...AGENTSPECS$1};function resolveAgentId(Au){if(Au in AGENTSPECS)return Au;const lo=Au.lastIndexOf(":");if(lo>0){const $u=Au.slice(0,lo);if($u in AGENTSPECS)return $u}return Au}function getAgentspecs(Au){return AGENTSPECS[resolveAgentId(Au)]}function listAgentspecs(Au){return Object.values(AGENTSPECS)}const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1={id:"analyze-campaign-performance",version:"0.0.1",name:"Analyze Campaign Performance Team",description:"A multi-agent team that unifies marketing data from Google Ads, Meta, TikTok, LinkedIn, GA4, CRM, and email platforms. Normalises metrics into a unified view, detects performance anomalies in real time, and generates budget reallocation recommendations to maximise ROAS.",tags:["marketing","media","campaigns","analytics","advertising","social-media"],enabled:!0,icon:"megaphone",emoji:"📢",color:"#8250df",agentSpecId:"analyze-campaign-performance:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Campaign Analytics Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with Platform Connector to pull data from all ad platforms, then Metrics Normaliser for unified KPIs, then Anomaly Detector for real-time performance monitoring, then Budget Optimiser for reallocation recommendations. Escalate CPA spikes above 50% immediately.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:2},agents:[{id:"cp-1",name:"Platform Connector Agent",ref:"",role:"initiator",goal:"Pull campaign data from Google Ads, Meta, TikTok, LinkedIn, GA4, and email platforms",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Ad Platforms MCP",tools:["Google Ads Connector","Meta Ads Connector","TikTok Ads Connector","LinkedIn Ads Connector","GA4 Connector"],trigger:"Schedule: Every 4 hours",approval:"auto"},{id:"cp-2",name:"Metrics Normaliser Agent",ref:"",role:"contributor",goal:"Normalise CPA, ROAS, CTR, and attribution across all platforms into unified view",dependsOn:["cp-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Analytics MCP",tools:["Metric Unifier","Currency Converter","Attribution Mapper","Naming Convention Resolver"],trigger:"",approval:"auto"},{id:"cp-3",name:"Anomaly Detector Agent",ref:"",role:"contributor",goal:"Monitor all KPIs for CTR drops, CPA spikes, and budget pacing issues",dependsOn:["cp-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Monitoring MCP",tools:["Anomaly Scanner","Budget Pacer","Alert Generator","Campaign Pauser"],trigger:"",approval:"manual"},{id:"cp-4",name:"Budget Optimiser Agent",ref:"",role:"finalizer",goal:"Generate budget reallocation recommendations to maximise ROAS across channels",dependsOn:["cp-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Optimisation MCP",tools:["ROAS Calculator","Budget Allocator","Scenario Modeller","Report Generator"],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-camp-1",trigger:"budget_threshold_exceeded",action:"pause_and_notify",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"high"},{id:"rr-camp-2",trigger:"data_quality_low",action:"retry_collection",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"medium"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","csv","json"],template:"Campaign Performance Report",storage:"s3://reports/campaign-analytics/"}},ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1={id:"analyze-support-tickets",version:"0.0.1",name:"Analyze Support Tickets Team",description:"A multi-agent team that triages incoming support tickets, categorizes by urgency and topic, identifies recurring patterns, and generates resolution recommendations with escalation paths.",tags:["analytics","data","support","tickets"],enabled:!0,icon:"issue-opened",emoji:"🎫",color:"#bf8700",agentSpecId:"analyze-support-tickets:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Support Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route new tickets to the Triage Agent first, then to the Categorizer, then to the Pattern Analyzer. Escalate P1/critical tickets immediately to human support leads.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"180s",retryOnFailure:!0,maxRetries:2},agents:[{id:"st-1",name:"Triage Agent",ref:"",role:"initiator",goal:"Ingest new support tickets and assess urgency level (P1-P4)",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Helpdesk MCP",tools:["Ticket Reader","Priority Classifier"],trigger:"Event: new ticket received",approval:"auto"},{id:"st-2",name:"Categorizer Agent",ref:"",role:"contributor",goal:"Categorize tickets by topic, product area, and sentiment",dependsOn:["st-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"NLP Pipeline MCP",tools:["Topic Classifier","Sentiment Analyzer","Product Tagger"],trigger:"",approval:"auto"},{id:"st-3",name:"Pattern Analyzer Agent",ref:"",role:"finalizer",goal:"Identify recurring issues and generate resolution recommendations",dependsOn:["st-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics MCP",tools:["Pattern Detector","Knowledge Base Search","Resolution Generator"],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-supp-1",trigger:"ticket_surge_detected",action:"escalate_to_supervisor",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"high"},{id:"rr-supp-2",trigger:"classification_confidence_low",action:"request_human_review",auto:!1,maxRetries:1,escalateAfterRetries:1,priority:"medium"}],healthMonitoring:{heartbeatInterval:"15s",staleThreshold:"60s",unresponsiveThreshold:"180s",stuckThreshold:"300s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","json"],template:"Support Ticket Analysis",storage:"s3://reports/support-analytics/"}},AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1={id:"audit-inventory-levels",version:"0.0.1",name:"Audit Inventory Levels Team",description:"A multi-agent team that monitors inventory levels across warehouses, detects discrepancies between physical and system counts, forecasts demand by SKU, and generates automated reorder recommendations.",tags:["finance","automation","inventory","supply-chain"],enabled:!0,icon:"package",emoji:"📦",color:"#0969da",agentSpecId:"audit-inventory-levels:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Inventory Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with the Scanner to pull current levels, then Auditor to check discrepancies, then Forecaster for demand predictions, then Planner for reorder recommendations, then Reporter for the final audit report. Escalate critical shortages immediately.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!0,maxRetries:3},agents:[{id:"inv-1",name:"Inventory Scanner Agent",ref:"",role:"initiator",goal:"Pull current inventory levels from all warehouse management systems",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Warehouse MCP",tools:["WMS Connector","Barcode Scanner API"],trigger:"Schedule: Every 6 hours",approval:"auto"},{id:"inv-2",name:"Discrepancy Auditor Agent",ref:"",role:"contributor",goal:"Compare system counts vs physical counts and flag discrepancies",dependsOn:["inv-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Audit MCP",tools:["Count Comparator","Discrepancy Logger","Shrinkage Calculator"],trigger:"",approval:"auto"},{id:"inv-3",name:"Demand Forecaster Agent",ref:"",role:"contributor",goal:"Forecast demand by SKU using historical sales and seasonal patterns",dependsOn:["inv-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics MCP",tools:["Time Series Model","Seasonal Analyzer","External Signals Fetcher"],trigger:"",approval:"auto"},{id:"inv-4",name:"Reorder Planner Agent",ref:"",role:"contributor",goal:"Calculate optimal reorder points and generate purchase order recommendations",dependsOn:["inv-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Procurement MCP",tools:["EOQ Calculator","Supplier Catalog","PO Generator"],trigger:"",approval:"manual"},{id:"inv-5",name:"Audit Report Agent",ref:"",role:"finalizer",goal:"Compile inventory audit report with discrepancies, forecasts, and reorder plan",dependsOn:["inv-4"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","Chart Builder","Email Sender"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-inv-1",trigger:"stockout_risk_detected",action:"escalate_to_supervisor",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"high"},{id:"rr-inv-2",trigger:"discrepancy_threshold_exceeded",action:"flag_for_manual_audit",auto:!1,maxRetries:2,escalateAfterRetries:2,priority:"high"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","xlsx","csv"],template:"Inventory Audit Report",storage:"s3://reports/inventory-audits/"}},AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1={id:"automate-regulatory-reporting",version:"0.0.1",name:"Automate Regulatory Reporting Team",description:"A multi-agent team that automates end-to-end regulatory reporting for financial institutions. Ingests data from trading systems, risk engines, and accounting platforms, reconciles positions, computes risk metrics, validates against regulatory rules (Basel III/IV, MiFID II, SOX), and generates submission-ready compliance reports with full audit trails.",tags:["finance","compliance","regulatory","risk","banking","audit"],enabled:!0,icon:"shield-check",emoji:"🏦",color:"#0969da",agentSpecId:"automate-regulatory-reporting:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Compliance Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with Data Ingestion to pull positions and transactions, then Risk Calculator for metric computation, then Reconciliation Agent to cross-check figures, then Validation Agent for regulatory rule checks, then Report Generator for submission-ready output. Escalate any reconciliation breaks above $10K immediately to the compliance team.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"900s",retryOnFailure:!0,maxRetries:2},agents:[{id:"reg-1",name:"Data Ingestion Agent",ref:"",role:"initiator",goal:"Extract positions, transactions, and P&L from trading and accounting systems",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Trading Systems MCP",tools:["Position Reader","Transaction Fetcher","P&L Extractor"],trigger:"Schedule: Monthly on the 3rd business day",approval:"auto"},{id:"reg-2",name:"Risk Calculator Agent",ref:"",role:"contributor",goal:"Compute Basel III/IV risk-weighted assets, capital ratios, and VaR metrics",dependsOn:["reg-1"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Risk Engine MCP",tools:["RWA Calculator","VaR Engine","Capital Ratio Computer","Stress Test Runner"],trigger:"",approval:"auto"},{id:"reg-3",name:"Reconciliation Agent",ref:"",role:"contributor",goal:"Cross-check computed figures against source systems and flag discrepancies",dependsOn:["reg-2"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Reconciliation MCP",tools:["Position Reconciler","Break Detector","Audit Logger"],trigger:"",approval:"auto"},{id:"reg-4",name:"Validation Agent",ref:"",role:"contributor",goal:"Validate all metrics against Basel III/IV, MiFID II, and SOX regulatory rules",dependsOn:["reg-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Compliance Rules MCP",tools:["Basel Rule Validator","MiFID II Checker","SOX Control Verifier"],trigger:"",approval:"manual"},{id:"reg-5",name:"Report Generator Agent",ref:"",role:"finalizer",goal:"Generate submission-ready regulatory reports with full data lineage and audit trail",dependsOn:["reg-4"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","XBRL Formatter","Email Sender"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-reg-1",trigger:"compliance_violation_detected",action:"halt_and_escalate",auto:!0,maxRetries:0,escalateAfterRetries:0,priority:"critical"},{id:"rr-reg-2",trigger:"data_validation_failure",action:"retry_with_fallback",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"high"}],healthMonitoring:{heartbeatInterval:"15s",staleThreshold:"60s",unresponsiveThreshold:"120s",stuckThreshold:"300s",maxRestartAttempts:2},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","xbrl","json"],template:"Regulatory Submission Report",storage:"s3://reports/regulatory-submissions/"}},CODING_AGENTS_TEAM_SPEC_0_0_1={id:"coding-agents",version:"0.0.1",name:"Coding Agents",description:"Claude Code writes the change and Codex reviews it, each behind the Shield: a supervisor delegates to them over ACP with a budget, a deadline and the files it may touch, and reads back their plans and their diffs.",tags:["coding","harness","review"],enabled:!0,icon:"code",emoji:"🛡️",color:"#1F6FEB",agentSpecId:"",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Lead",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"Split the request into a change and its review: hand the change to the Coder with the files it may touch, then the diff to the Reviewer, and answer with the change and what the review found.",instructions:"You lead two coding agents. Hand the change to the Coder with the files it may touch and a deadline, wait for its diff, hand the diff to the Reviewer, and answer with the change and the review. Never edit a file yourself.",approval:"auto",canTerminate:!0},routingInstructions:"",suggestions:[{text:"Add a test for the function in the open file, then review it.",summary:"A change and its review",icon:"code",emoji:"🧪"}],delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:void 0,agents:[{id:"coder",name:"Coder",ref:"",harness:"claude-code",role:"contributor",goal:"Make the change asked, inside the workspace, in the files the manifest names; answer with what changed and why.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"reviewer",name:"Reviewer",ref:"",harness:"codex",role:"reviewer",goal:"Read the Coder's diff and say what is wrong with it, file by file; edit nothing.",dependsOn:["coder"],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1={id:"comprehensive-sales-analytics",version:"0.0.1",name:"Comprehensive Sales Analytics Team",description:"A multi-agent team that replaces a single KPI monitor with four specialized agents: a Data Collector that pulls real-time CRM metrics, an Anomaly Detector that flags statistical outliers, a Trend Analyzer that identifies patterns and forecasts, and a Report Generator that compiles executive dashboards and sends alerts. Together they deliver deeper insights, faster detection, and richer reporting than any single agent could.",tags:["sales","analytics","kpi","monitoring","horizontal"],enabled:!0,icon:"graph",emoji:"📈",color:"#1a7f37",agentSpecId:"comprehensive-sales-analytics:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Sales Analytics Supervisor",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route data collection to KPI Collector first, then pass raw metrics to Anomaly Detector and Trend Analyzer in parallel, then aggregate all outputs into the Report Generator. Escalate if anomalies exceed the critical threshold (>25% deviation from target).",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:3},agents:[{id:"sa-1",name:"KPI Data Collector",ref:"",role:"initiator",goal:"Pull real-time sales metrics from CRM, ERP, and marketing platforms. Normalize data into a unified schema with timestamps, dimensions (region, product line, rep), and measures (revenue, pipeline, conversion).",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"CRM Data Server",tools:["get_sales_data","get_customer_list","API Connector"],trigger:"Schedule: Daily at 7:30 AM",approval:"auto"},{id:"sa-2",name:"Anomaly Detector",ref:"",role:"contributor",goal:"Apply statistical anomaly detection (Z-score, IQR, moving average) to the collected KPIs. Flag any metric deviating more than 10% from its rolling 30-day average. Classify anomalies as info, warning, or critical.",dependsOn:["sa-1"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics Server",tools:["run_analysis","Statistical Analysis","ML Predictor"],trigger:"",approval:"auto"},{id:"sa-3",name:"Trend Analyzer",ref:"",role:"contributor",goal:"Identify week-over-week, month-over-month, and quarter-over-quarter trends. Generate 30-day forecasts for each KPI using time-series models. Highlight the top 3 improving and top 3 declining metrics.",dependsOn:["sa-1"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Analytics Server",tools:["run_analysis","generate_charts","Forecaster"],trigger:"",approval:"auto"},{id:"sa-4",name:"Executive Report Generator",ref:"",role:"finalizer",goal:"Compile all insights — raw KPIs, anomalies, trends, and forecasts — into a polished executive dashboard with charts, tables, and narrative commentary. Send the report via Slack and email. Highlight critical anomalies with a red-flag summary at the top.",dependsOn:["sa-2","sa-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","Chart Builder","Email Sender","Slack Notifier"],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-sales-1",trigger:"anomaly_critical",action:"escalate_to_supervisor",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"high"},{id:"rr-sales-2",trigger:"data_stale",action:"retry_collection",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"medium"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","xlsx","json"],template:"Executive Sales Dashboard",storage:"s3://reports/sales-analytics/"}},CROP_MONITORING_TEAM_SPEC_0_0_2={id:"crop-monitoring",version:"0.0.2",name:"Crop Monitoring",description:"One agent, its data: Crop Monitoring follows crop vigour and growth over a season from the satellite imagery NASA Earthdata holds, and flags the fields that need attention.",tags:["example","scene","earth-observation","agriculture","earthdata","a2a"],enabled:!0,icon:"telescope",emoji:"🛰️",color:"#1a7f37",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Crop Monitoring",ref:"",app:"crop-monitoring:0.0.2",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Crop Monitoring answers every request from the imagery itself, one search at a time, and reports what the granules show without adding to it.",entry:"crop-monitoring",suggestions:[{text:"How has crop vigour evolved over the last three months around 45.5N, 10.2E?",emoji:"🌱"},{text:"Which fields around 41.9N, 12.5E show a drop in vegetation this month compared with last?",emoji:"🌾"},{text:"Which datasets and granules cover the Po valley for June 2026?",emoji:"🛰️"},{text:"Save the June 2026 granules of the Po valley to my Space.",emoji:"💾"}],delegation:{maxDepth:0,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!1,maxRetries:0},agents:[{id:"crop-monitoring",name:"",ref:"",app:"crop-monitoring:0.0.2",runsIn:"runtime",role:"initiator",goal:"Take the person's field and period, search the imagery that covers them, and report the vigour, the growth and the fields to watch.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},DISASTER_ASSESSMENT_TEAM_SPEC_0_0_2={id:"disaster-assessment",version:"0.0.2",name:"Disaster Assessment",description:"An event desk in the browser that gets the area a disaster affected and the damage from Disaster Assessment, and what changed on the ground from Change detection, each on a runtime over A2A, each reading NASA Earthdata. Event response takes the event and reports; the two others read the imagery and answer.",tags:["example","scene","earth-observation","disaster","insurance","earthdata","a2a"],enabled:!0,icon:"pulse",emoji:"🛰️",color:"#cf222e",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Event response",ref:"",app:"event-response:0.0.3",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Event response asks Disaster Assessment for the area and the damage, and Change detection for the change on the ground, one request each, and reports what they answer without adding to it.",entry:"event-response",suggestions:[{text:"Valencia, Spain, was flooded on 29 October 2024. What was affected, and what changed?",emoji:"🌊"},{text:"Fires burned around Los Angeles from 7 January 2025. Which imagery shows what changed?",emoji:"🔥"},{text:"The Ahr valley was hit by a storm on 14 July 2021. Chart the imagery found each day from 10 to 20 July.",emoji:"🌧️"},{text:"Send the Valencia flood assessment to the emergency services.",emoji:"📣"}],delegation:{maxDepth:1,allowPeerDelegation:!0,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!1,maxRetries:0},agents:[{id:"event-response",name:"",ref:"",app:"event-response:0.0.3",runsIn:"browser",talksTo:[{member:"disaster-assessment",over:"a2a"},{member:"change-detection",over:"a2a"}],role:"initiator",goal:"Take the person's event, ask Disaster Assessment and Change detection for it, and report what they answered.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"disaster-assessment",name:"",ref:"",app:"disaster-assessment:0.0.2",runsIn:"runtime",role:"contributor",goal:"Estimate the area the event affected and the extent of the damage from the imagery before and after it, over A2A.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"change-detection",name:"",ref:"",app:"change-detection:0.0.2",runsIn:"runtime",role:"contributor",goal:"Find what changed on the ground between the two dates from the imagery, over A2A.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},JUPYTER_TEAM_SPEC_0_0_1={id:"jupyter",version:"0.0.1",name:"Jupyter Team",description:"Six agents working in the same Jupyter notebook: the Analyst adds and runs the cells, the Reviewer checks them and records what it finds, the Writer writes the result up between them, Decks turns what they found into a presentation, the Tutor teaches the person Python in the cells they have, and the Compactor rewrites the notebook as short as it can be without changing what it computes.",tags:["notebook","jupyter","collaboration","analysis","review","presentations","teaching","refactoring"],enabled:!0,icon:"book",emoji:"📓",color:"#F37726",agentSpecId:"",orchestrationProtocol:"datalayer",executionMode:"supervisor",supervisor:{name:"Jupyter Analyst",ref:"jupyter-data-analyst:0.0.1",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"Keep the work in the notebook. Answer analysis requests directly; send a request to check something to the Reviewer, a request to write something up to the Writer, a request for slides to Decks, a question about the code to the Tutor and a request to tidy the notebook to the Compactor — and never leave results anywhere but the cells, or the deck made from them.",instructions:"",approval:"auto",canTerminate:!1},routingInstructions:'Send anything about exploring, computing, plotting or extending the analysis — "analyze", "plot", "compute", "add a cell that…" — to the Jupyter Analyst. Send anything about checking, verifying, doubting or re-running — "find what is wrong", "check this", "is this right", "re-run" — to Jupyter Reviewer. Send anything about explaining, summarising, writing up or verifying the wording of a conclusion to Jupyter Writer. Send anything about slides, a deck or a presentation — "make a deck of this", "turn the findings into slides", "present this", "add a slide" — to Jupyter Decks, which builds the deck from what the cells show and opens it beside the conversation. Send anything about understanding or learning — "what does this do", "why did this fail", "teach me", a request for an exercise — to Jupyter Tutor. Send anything about the shape of the notebook — shortening it, merging cells, removing dead code or stale outputs — to Jupyter Compactor. When a request is two of these, the one that produces cells goes first and the one that reads them follows: the Analyst before the Writer or Decks ("analyze this and write it up", "analyze this and make a deck"), the Tutor before the Compactor ("clean this up and explain what you did"). Never let the Compactor rewrite a notebook the person is still learning from without saying what changed. When none fits, answer directly rather than forcing the request onto a specialist.',suggestions:[{text:"Analyze the dataset",summary:"Analyze the dataset",icon:"graph",emoji:"🔎"},{text:"Find what is wrong",summary:"Find what is wrong",icon:"checklist",emoji:"🧐"},{text:"Verify the conclusion",summary:"Verify the conclusion",icon:"pencil",emoji:"✍️"},{text:"Turn the findings into a deck",summary:"Findings into a deck",icon:"project",emoji:"📊"},{text:"Explain this notebook cell by cell, as if I am new to Python",summary:"Cell by cell, for beginners",icon:"book",emoji:"📖"},{text:"Shorten this notebook without changing what it computes",summary:"Shorten the notebook",icon:"fold",emoji:"✂️"}],delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:1},agents:[{id:"analyst",name:"Jupyter Analyst",ref:"jupyter-data-analyst:0.0.1",role:"initiator",goal:"Explore the data in the open notebook — add the cells, run them, and leave the results on them for the others to build on.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"reviewer",name:"Jupyter Reviewer",ref:"jupyter-notebook-reviewer:0.0.1",role:"reviewer",goal:"Re-run what matters, find what is wrong or unsupported, and record the verdict in the notebook beside the code it concerns.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"writer",name:"Jupyter Writer",ref:"jupyter-notebook-writer:0.0.1",role:"finalizer",goal:"Write the analysis up between the cells — summary, explanations, conclusion — saying only what the cells support.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"decks",name:"Jupyter Decks",ref:"example-decks:0.0.1",role:"contributor",goal:"Turn what the notebook found into a deck — a title, the numbers as metrics or a chart, the conclusion — open it beside the conversation, and step through it on request.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"tutor",name:"Jupyter Tutor",ref:"jupyter-tutor:0.0.1",role:"contributor",goal:"Teach the person Python in the notebook they have open — what their code does, why it broke, and what to try next — leaving them able to write the next cell themselves.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"compactor",name:"Jupyter Compactor",ref:"jupyter-notebook-compactor:0.0.1",role:"finalizer",goal:"Rewrite the notebook as short as it can be without changing what it computes, and report exactly which cells were touched.",dependsOn:[],subagents:[{name:"CellFixer",ref:"jupyter-cell-fixer:0.0.1",description:"Fixes a failing cell and proves the fix by running it. Reach for this when compaction uncovers a cell that was already broken — repairing it is not part of compacting, and silently leaving it is worse.",instructions:""},{name:"NotebookReproducer",ref:"jupyter-notebook-reproducer:0.0.1",description:"Runs the notebook top to bottom on a fresh sandbox and reports what does not reproduce. Reach for this to prove a compaction changed nothing, which is the claim a compaction rests on.",instructions:""}],model:"",mcpServer:"",tools:[],trigger:"",approval:"manual"}],reactionRules:[{id:"rr-nb-1",trigger:"compaction_would_change_results",action:"request_human_review",auto:!1,maxRetries:0,escalateAfterRetries:0,priority:"high"},{id:"rr-nb-2",trigger:"learner_repeatedly_stuck",action:"escalate_to_supervisor",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"medium"},{id:"rr-nb-3",trigger:"review_found_unsupported_claim",action:"escalate_to_supervisor",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"medium"}],healthMonitoring:{heartbeatInterval:"15s",staleThreshold:"60s",unresponsiveThreshold:"180s",stuckThreshold:"300s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["ipynb","markdown"],template:"Notebook Session Summary",storage:""}},MONTH_END_CLOSE_TEAM_SPEC_0_0_2={id:"month-end-close",version:"0.0.2",name:"Month-end Close",description:"One agent, its data: Month-end Close drives the close from the Odoo books, which it only reads — the checklist, the accruals to book, the reconciliation gaps that remain.",tags:["example","scene","accounting","finance","odoo","a2a"],enabled:!0,icon:"sync",emoji:"🧾",color:"#bf8700",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Month-end Close",ref:"",app:"month-end-close:0.0.2",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Month-end Close answers every request from the books itself, one read at a time, and reports what the books hold without adding to it.",entry:"month-end-close",suggestions:[{text:"Where does the month-end close stand for last month? Give me the checklist.",emoji:"☑️"},{text:"Which accruals should be booked for last month? Show me the entries each rests on.",emoji:"🧾"},{text:"Chart last month's expenses by account against the month before.",emoji:"📊"},{text:"Post the accruals you suggested for last month.",emoji:"✍️"}],delegation:{maxDepth:0,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!1,maxRetries:0},agents:[{id:"month-end-close",name:"",ref:"",app:"month-end-close:0.0.2",runsIn:"runtime",role:"initiator",goal:"Take the person's request, read the period's books, and report where the close stands: what is done, what is to book, what is still open.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1={id:"notebook-benchmark",version:"0.0.1",name:"Notebook Benchmark Team",description:"Runs a notebook benchmark end to end: one agent executes it from a clean sandbox, a second compares what came out against what the evalset expected, and a third checks the comparison before it is published. Section 17's vertical slice.",tags:["benchmark","notebook","evaluation","orchestration"],enabled:!0,icon:"beaker",emoji:"🧪",color:"#1ABC9C",agentSpecId:"jupyter-data-analyst:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Benchmark Supervisor",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Place the runner first and wait for it: nothing can be analysed before the notebook has run. Give the analyst the runner's outputs and the evalset's expectations, and the reviewer the analyst's comparison. Answer with the reviewer's verdict and the evidence behind it, never with a summary of your own that nothing produced.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"900s",retryOnFailure:!0,maxRetries:2},agents:[{id:"runner",name:"Benchmark Runner",ref:"",role:"initiator",goal:"Execute the benchmark's notebook from a clean sandbox and return it with its outputs",dependsOn:[],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"",tools:["Notebook Executor"],trigger:"",approval:"auto"},{id:"analyst",name:"Benchmark Analyst",ref:"",role:"contributor",goal:"Compare what the notebook produced against what the evalset expected, and say where and by how much they differ",dependsOn:["runner"],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"",tools:["Notebook Reader"],trigger:"",approval:"auto"},{id:"reviewer",name:"Benchmark Reviewer",ref:"",role:"finalizer",goal:"Check the analyst's comparison against the notebook's own outputs and say whether the conclusion is supported by the evidence",dependsOn:["analyst"],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"",tools:["Notebook Reader"],trigger:"",approval:"auto"}]},OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1={id:"optimize-grid-operations",version:"0.0.1",name:"Optimize Grid Operations Team",description:"A multi-agent team that processes millions of IoT sensor data points from smart meters, substations, and renewable generation assets. Predicts equipment failures 2–4 weeks in advance, optimises load balancing across the grid, and reduces unplanned downtime by 50%.",tags:["energy","utilities","smart-grid","iot","predictive-maintenance","sustainability"],enabled:!0,icon:"zap",emoji:"⚡",color:"#1a7f37",agentSpecId:"optimize-grid-operations:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Grid Operations Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Start with Sensor Ingestion to process real-time telemetry, then Anomaly Detector for pattern identification, then Failure Predictor for maintenance forecasting, then Grid Balancer for load optimisation. Escalate critical failure predictions (< 48h) immediately to operations dispatch.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!0,maxRetries:3},agents:[{id:"grid-1",name:"Sensor Ingestion Agent",ref:"",role:"initiator",goal:"Ingest and process real-time telemetry from SCADA, smart meters, and IoT gateways",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"SCADA MCP",tools:["SCADA Connector","Smart Meter Reader","IoT Gateway Adapter","Time Series Processor"],trigger:"Schedule: Every 5 minutes",approval:"auto"},{id:"grid-2",name:"Anomaly Detector Agent",ref:"",role:"contributor",goal:"Detect vibration, temperature, and voltage anomalies across all grid assets",dependsOn:["grid-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Monitoring MCP",tools:["Vibration Analyzer","Temperature Anomaly Detector","Voltage Pattern Scanner","Historical Comparator"],trigger:"",approval:"auto"},{id:"grid-3",name:"Failure Predictor Agent",ref:"",role:"contributor",goal:"Predict equipment failures 2–4 weeks in advance using anomaly patterns and failure history",dependsOn:["grid-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Predictive Analytics MCP",tools:["Failure Correlation Engine","Risk Scorer","Maintenance Scheduler","Work Order Generator"],trigger:"",approval:"manual"},{id:"grid-4",name:"Grid Balancer Agent",ref:"",role:"finalizer",goal:"Optimise real-time load balancing across renewable and conventional generation sources",dependsOn:["grid-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Grid Control MCP",tools:["Load Forecaster","Renewable Integration Model","Dispatch Optimiser","Grid Stability Checker"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-grid-1",trigger:"grid_instability_detected",action:"emergency_rebalance",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"critical"},{id:"rr-grid-2",trigger:"forecast_deviation_high",action:"recalibrate_model",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"medium"}],healthMonitoring:{heartbeatInterval:"10s",staleThreshold:"30s",unresponsiveThreshold:"60s",stuckThreshold:"120s",maxRestartAttempts:5},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["json","csv","pdf"],template:"Grid Operations Dashboard",storage:"s3://reports/grid-operations/"}},PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1={id:"process-citizen-requests",version:"0.0.1",name:"Process Citizen Requests Team",description:"A multi-agent team that automates citizen request processing for government agencies. Classifies and triages permits, FOIA requests, and benefit claims from multiple channels. Models policy impacts across population datasets and ensures every automated decision is explainable, auditable, and compliant with transparency mandates.",tags:["government","public-sector","civic","policy","compliance","transparency"],enabled:!0,icon:"organization",emoji:"🏛️",color:"#0550ae",agentSpecId:"process-citizen-requests:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Citizen Services Orchestrator Agent",ref:"",model:"openai:gpt-4.1",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route incoming citizen requests to the Intake Agent for classification and triage, then to the Case Processor for handling and routing, then to the Policy Analyst for impact assessment on relevant items, then to the Transparency Agent for audit trail and public documentation. Escalate urgent citizen safety issues immediately to supervisors.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:2},agents:[{id:"cit-1",name:"Intake & Classification Agent",ref:"",role:"initiator",goal:"Classify, triage, and route citizen submissions from web portals, email, and documents",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Citizen Portal MCP",tools:["Request Classifier","Urgency Assessor","Jurisdiction Router","OCR Scanner"],trigger:"Event: new citizen request received",approval:"auto"},{id:"cit-2",name:"Case Processor Agent",ref:"",role:"contributor",goal:"Process and route requests to appropriate departments with required documentation",dependsOn:["cit-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Case Management MCP",tools:["Case Creator","Document Assembler","Department Router","Status Tracker"],trigger:"",approval:"auto"},{id:"cit-3",name:"Policy Impact Analyst Agent",ref:"",role:"contributor",goal:"Model policy outcomes across population datasets with scenario simulation",dependsOn:["cit-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Policy Analytics MCP",tools:["Monte Carlo Simulator","Demographic Analyzer","Budget Impact Model","Scenario Comparator"],trigger:"",approval:"manual"},{id:"cit-4",name:"Transparency & Audit Agent",ref:"",role:"finalizer",goal:"Generate explainable decision documentation with full audit trail for public record",dependsOn:["cit-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Compliance MCP",tools:["Decision Explainer","Audit Trail Builder","FOIA Compliance Checker","Public Record Generator"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-cit-1",trigger:"priority_request_detected",action:"fast_track_processing",auto:!0,maxRetries:2,escalateAfterRetries:2,priority:"high"},{id:"rr-cit-2",trigger:"policy_ambiguity_detected",action:"request_human_review",auto:!1,maxRetries:1,escalateAfterRetries:1,priority:"medium"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","json"],template:"Citizen Request Processing Report",storage:"s3://reports/citizen-requests/"}},PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1={id:"process-clinical-trial-data",version:"0.0.1",name:"Process Clinical Trial Data Team",description:"A multi-agent team that automates clinical trial data processing across dozens of trial sites. Harmonises patient records and lab results to CDISC SDTM format, detects safety signals and adverse events in real time, and prepares submission-ready datasets — all with strict HIPAA and GxP compliance guardrails.",tags:["healthcare","pharma","clinical-trials","patient-data","compliance"],enabled:!0,icon:"heart",emoji:"🏥",color:"#cf222e",agentSpecId:"process-clinical-trial-data:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"Clinical Data Orchestrator Agent",ref:"",model:"anthropic:claude-sonnet-4-20250514",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route incoming data through the Ingestion Agent first for format detection and parsing, then to Harmonisation Agent for CDISC SDTM standardisation, then Safety Monitor for adverse event screening, then Submission Preparer for final dataset assembly. Escalate serious adverse events (SAEs) immediately to the medical officer.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"600s",retryOnFailure:!0,maxRetries:2},agents:[{id:"ct-1",name:"Data Ingestion Agent",ref:"",role:"initiator",goal:"Ingest patient records, lab results, and CRFs from clinical sites",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Clinical EDC MCP",tools:["Medidata Connector","Veeva Vault Reader","Oracle Clinical Adapter","Format Detector"],trigger:"Event: new data batch received from site",approval:"auto"},{id:"ct-2",name:"Harmonisation Agent",ref:"",role:"contributor",goal:"Standardise all data to CDISC SDTM format with MedDRA coding",dependsOn:["ct-1"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Data Standards MCP",tools:["SDTM Mapper","MedDRA Coder","Unit Converter","Site Normaliser"],trigger:"",approval:"auto"},{id:"ct-3",name:"Safety Monitor Agent",ref:"",role:"contributor",goal:"Screen every data point for adverse events and safety signals",dependsOn:["ct-2"],subagents:[],model:"anthropic:claude-sonnet-4-20250514",mcpServer:"Safety Database MCP",tools:["AE Classifier","Signal Detector","SAE Escalator","Evidence Trail Builder"],trigger:"",approval:"manual"},{id:"ct-4",name:"Submission Preparer Agent",ref:"",role:"finalizer",goal:"Assemble submission-ready SDTM datasets with validation and define.xml",dependsOn:["ct-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Submission MCP",tools:["Dataset Validator","Define.xml Generator","PDF Report Builder","Compliance Checker"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-clin-1",trigger:"safety_signal_detected",action:"halt_and_escalate",auto:!0,maxRetries:0,escalateAfterRetries:0,priority:"critical"},{id:"rr-clin-2",trigger:"data_integrity_violation",action:"quarantine_and_notify",auto:!0,maxRetries:1,escalateAfterRetries:1,priority:"critical"}],healthMonitoring:{heartbeatInterval:"10s",staleThreshold:"45s",unresponsiveThreshold:"90s",stuckThreshold:"180s",maxRestartAttempts:2},notifications:{on_start:!0,on_completion:!0,on_failure:!0,on_escalation:!0},output:{formats:["pdf","json","xml"],template:"Clinical Trial Data Report",storage:"s3://reports/clinical-trials/"}},SALES_AND_ACCOUNTING_TEAM_SPEC_0_0_2={id:"sales-and-accounting",version:"0.0.2",name:"Sales and Accounting",description:"A sales desk in the browser that gets financial reports from an accounting application on a runtime, over A2A. Sales takes the request and reports the answer; Accounting reads the Odoo books and answers.",tags:["example","sales","accounting","finance","a2a","odoo"],enabled:!0,icon:"people",emoji:"🤝",color:"#0969da",agentSpecId:"",orchestrationProtocol:"a2a",executionMode:"supervisor",supervisor:{name:"Sales",ref:"",app:"sales:0.0.3",model:"",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Sales asks Accounting for every figure from the books, one request each time, and reports what Accounting answers without adding to it.",entry:"sales",suggestions:[{text:"Which customer invoices are still open, and how much is due in total?",emoji:"🧾"},{text:"Chart the aged receivables as of today, by customer.",emoji:"⏳"},{text:"Which invoices make up the largest balance due? Show me each one.",emoji:"🔎"},{text:"Send a payment reminder to every customer whose invoice is overdue.",emoji:"✉️"}],delegation:{maxDepth:1,allowPeerDelegation:!0,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!1,maxRetries:0},agents:[{id:"sales",name:"",ref:"",app:"sales:0.0.3",runsIn:"browser",talksTo:[{member:"accounting",over:"a2a"}],role:"initiator",goal:"Take the person's request for a financial report, ask Accounting for it, and hand over what Accounting answered.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"},{id:"accounting",name:"",ref:"",app:"accounting:0.0.2",runsIn:"runtime",role:"contributor",goal:"Answer report requests from the Odoo books, read only, over A2A.",dependsOn:[],subagents:[],model:"",mcpServer:"",tools:[],trigger:"",approval:"auto"}]},SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1={id:"sync-crm-contacts",version:"0.0.1",name:"Sync CRM Contacts Team",description:"A multi-agent team that collects and aggregates contact data from multiple CRM sources, analyzes and deduplicates records, writes cleaned data back, and generates sync summary reports.",tags:["sales","crm","data-sync","deduplication"],enabled:!0,icon:"people",emoji:"🔄",color:"#0969da",agentSpecId:"sync-crm-contacts:0.0.1",orchestrationProtocol:"datalayer",executionMode:"sequential",supervisor:{name:"CRM Orchestrator Agent",ref:"",model:"bedrock:us.anthropic.claude-sonnet-4-6",goal:"",instructions:"",approval:"auto",canTerminate:!0},routingInstructions:"Route data collection tasks to the Data Collector first, then analysis, then sync, then reporting. Escalate to human if sync fails 3 times.",delegation:{maxDepth:2,allowPeerDelegation:!1,includeGeneralPurpose:!1},context:{sharing:"shared"},validation:{timeout:"300s",retryOnFailure:!0,maxRetries:3},agents:[{id:"tm-1",name:"Data Collector Agent",ref:"",role:"initiator",goal:"Collect and aggregate contact data from multiple CRM sources",dependsOn:[],subagents:[],model:"openai:gpt-4.1",mcpServer:"Data Processing MCP",tools:["API Connector","Data Parser"],trigger:"Schedule: Daily at 2:00 AM",approval:"auto"},{id:"tm-2",name:"Analyzer Agent",ref:"",role:"contributor",goal:"Analyze collected data and identify patterns and duplicates",dependsOn:["tm-1"],subagents:[],model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServer:"Analytics MCP",tools:["Statistical Analysis","ML Predictor","Deduplicator"],trigger:"",approval:"manual"},{id:"tm-3",name:"Sync Writer Agent",ref:"",role:"contributor",goal:"Write cleaned and merged contacts back to the CRM systems",dependsOn:["tm-2"],subagents:[],model:"openai:gpt-4.1",mcpServer:"CRM Write MCP",tools:["Salesforce Connector","HubSpot Connector"],trigger:"",approval:"manual"},{id:"tm-4",name:"Report Generator Agent",ref:"",role:"finalizer",goal:"Generate sync summary reports and send notifications",dependsOn:["tm-3"],subagents:[],model:"openai:gpt-4.1",mcpServer:"Document Generation MCP",tools:["PDF Generator","Chart Builder","Email Sender"],trigger:"",approval:"auto"}],reactionRules:[{id:"rr-crm-1",trigger:"sync_conflict_detected",action:"log_and_skip",auto:!0,maxRetries:3,escalateAfterRetries:3,priority:"medium"},{id:"rr-crm-2",trigger:"api_rate_limit_hit",action:"backoff_and_retry",auto:!0,maxRetries:5,escalateAfterRetries:5,priority:"low"}],healthMonitoring:{heartbeatInterval:"30s",staleThreshold:"120s",unresponsiveThreshold:"300s",stuckThreshold:"600s",maxRestartAttempts:3},notifications:{on_start:!1,on_completion:!0,on_failure:!0,on_escalation:!1},output:{formats:["json","csv"],template:"CRM Sync Summary",storage:"s3://reports/crm-sync/"}},TEAM_SPECS={"analyze-campaign-performance":ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1,"analyze-support-tickets":ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1,"audit-inventory-levels":AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1,"automate-regulatory-reporting":AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1,"coding-agents":CODING_AGENTS_TEAM_SPEC_0_0_1,"comprehensive-sales-analytics":COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1,"crop-monitoring":CROP_MONITORING_TEAM_SPEC_0_0_2,"disaster-assessment":DISASTER_ASSESSMENT_TEAM_SPEC_0_0_2,jupyter:JUPYTER_TEAM_SPEC_0_0_1,"month-end-close":MONTH_END_CLOSE_TEAM_SPEC_0_0_2,"notebook-benchmark":NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1,"optimize-grid-operations":OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1,"process-citizen-requests":PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1,"process-clinical-trial-data":PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1,"sales-and-accounting":SALES_AND_ACCOUNTING_TEAM_SPEC_0_0_2,"sync-crm-contacts":SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1},VOICE_CATALOGUE={"kokoro-af-heart":{id:"kokoro-af-heart",version:"0.0.1",name:"Heart",description:"A warm American English voice, Kokoro's best graded (A).",engine:"kokoro",model:"kokoro-82m",voice:"af_heart",languages:["en-US"],where:["server","machine"],licence:{weights:"Apache-2.0"},attribution:"",watermark:!1,sample:"Hello. I read the answers aloud, sentence by sentence, as they are written."},"kokoro-bf-emma":{id:"kokoro-bf-emma",version:"0.0.1",name:"Emma",description:"A clear British English voice.",engine:"kokoro",model:"kokoro-82m",voice:"bf_emma",languages:["en-GB"],where:["server","machine"],licence:{weights:"Apache-2.0"},attribution:"",watermark:!1,sample:"Hello. I read the answers aloud, sentence by sentence, as they are written."},"kokoro-ff-siwis":{id:"kokoro-ff-siwis",version:"0.0.1",name:"Siwis",description:"A French voice, Kokoro's only one, trained on the SIWIS French Speech Synthesis Database, whose licence asks for its attribution.",engine:"kokoro",model:"kokoro-82m",voice:"ff_siwis",languages:["fr-FR"],where:["server","machine"],licence:{weights:"Apache-2.0",dataset:"CC-BY-4.0"},attribution:"Trained on the SIWIS French Speech Synthesis Database, by Pierre-Edouard Honnet, Alexandros Lazaridis and Philip N. Garner (Idiap Research Institute) and Junichi Yamagishi (National Institute of Informatics, Japan, and the University of Edinburgh), under CC BY 4.0.",watermark:!1,sample:"Bonjour. Je lis les réponses à voix haute, phrase par phrase, à mesure qu'elles s'écrivent."}},SPEECH_MODEL_CATALOGUE={"kokoro-82m":{id:"kokoro-82m",version:"0.0.1",name:"Kokoro 82M",description:"Text to speech on Datalayer's servers, on CPU: hexgrad's Kokoro-82M v1.0 exported to ONNX, in full precision, with the voices file that holds its 54 voices, run by kokoro-onnx. Its phonemes come from eSpeak NG (GPL-3.0), which runs on the server and is never sent to a browser. Full precision, not the 8-bit export: on a 16-core CPU the 8-bit one speaks slower than real time (6 s for 3.9 s of speech), this one about four times faster than real time (1 s).",provider:"hexgrad",task:"tts",engine:"kokoro-onnx",dtype:"fp32",languages:["en","fr","es","it","pt","hi","ja","zh"],where:["server","machine"],streaming:!1,licence:{weights:"Apache-2.0",code:"MIT"},attribution:"",upstream:"https://huggingface.co/hexgrad/Kokoro-82M",revision:"model-files-v1.0",files:[{path:"kokoro-v1.0.onnx",sha256:"7d5df8ecf7d4b1878015a32686053fd0eebe2bc377234608764cc0ef3636a6c5",size:325532387},{path:"voices-v1.0.bin",sha256:"bca610b8308e8d99f32e6fe4197e7ec01679264efed0cac9140fe9c29f1fbf7d",size:28214398}]},"moonshine-base-en-server":{id:"moonshine-base-en-server",version:"0.0.1",name:"Moonshine Base (English, server)",description:"Speech to text on Datalayer's servers, in English: Useful Sensors' Moonshine Base (61M parameters), the same 8-bit ONNX export the browser runs, run by onnxruntime on the CPU with a greedy decoder. Its encoder is as long as the speech, with no 30-second window: it hears spoken turns in English, about seven times faster than Whisper small.",provider:"usefulsensors",task:"stt",engine:"onnxruntime",dtype:"q8",languages:["en"],where:["server"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/UsefulSensors/moonshine-base",revision:"b1e9b6aae3c3c7298f10c3798393fdf38e8fbbad",files:[{path:"config.json",sha256:"fab7241d1e9fc6c2370c4c6dfb5da79bb54d67ed9ab6b507ac51d29d2abe01d1",size:922},{path:"generation_config.json",sha256:"f9b3f711b57be7def2e50a8942f64f36ee0a55fad5b84ff93a687b6c5bcc1d44",size:147},{path:"preprocessor_config.json",sha256:"fa43a7017ef85cd1d0fba0d9aae77c8adb16990ae6f11115631f41ec5d8aa679",size:128},{path:"special_tokens_map.json",sha256:"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",size:3},{path:"tokenizer.json",sha256:"7b913404bdd039af4756783218af4440bc07fb7d6d8258d677e34f95b3ec416f",size:3761754},{path:"tokenizer_config.json",sha256:"edaee394565d428ea98a663ae7209cdcfeefc5585c42d7a570ff7c986df2cd15",size:135735},{path:"onnx/encoder_model_quantized.onnx",sha256:"1dd9ab0a7f987113d30affcba5a068d11c8f90fa0223caa3e491ade431ad9751",size:20513063},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"cc9f3cd6698a369c6008b41aa60aa3fb3322e7f03c9bdf19d8e6b7200afca4f3",size:42498870}]},"moonshine-base-en":{id:"moonshine-base-en",version:"0.0.1",name:"Moonshine Base (English)",description:"Speech to text in the browser, in English: Useful Sensors' Moonshine Base (61M parameters), its ONNX export quantized to 8 bits, run by transformers.js. One of the English models whose weights are MIT; the legacy non-English Moonshine models are under a non-commercial licence and are not listed.",provider:"usefulsensors",task:"stt",engine:"transformers.js",dtype:"q8",languages:["en"],where:["device"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/UsefulSensors/moonshine-base",revision:"b1e9b6aae3c3c7298f10c3798393fdf38e8fbbad",files:[{path:"config.json",sha256:"fab7241d1e9fc6c2370c4c6dfb5da79bb54d67ed9ab6b507ac51d29d2abe01d1",size:922},{path:"generation_config.json",sha256:"f9b3f711b57be7def2e50a8942f64f36ee0a55fad5b84ff93a687b6c5bcc1d44",size:147},{path:"preprocessor_config.json",sha256:"fa43a7017ef85cd1d0fba0d9aae77c8adb16990ae6f11115631f41ec5d8aa679",size:128},{path:"special_tokens_map.json",sha256:"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",size:3},{path:"tokenizer.json",sha256:"7b913404bdd039af4756783218af4440bc07fb7d6d8258d677e34f95b3ec416f",size:3761754},{path:"tokenizer_config.json",sha256:"edaee394565d428ea98a663ae7209cdcfeefc5585c42d7a570ff7c986df2cd15",size:135735},{path:"onnx/encoder_model_quantized.onnx",sha256:"1dd9ab0a7f987113d30affcba5a068d11c8f90fa0223caa3e491ade431ad9751",size:20513063},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"cc9f3cd6698a369c6008b41aa60aa3fb3322e7f03c9bdf19d8e6b7200afca4f3",size:42498870}]},"moonshine-tiny-en":{id:"moonshine-tiny-en",version:"0.0.1",name:"Moonshine Tiny (English)",description:"Speech to text in the browser, in English: Useful Sensors' Moonshine Tiny (27M parameters), its ONNX export quantized to 8 bits, run by transformers.js. One of the English models whose weights are MIT; the legacy non-English Moonshine models are under a non-commercial licence and are not listed.",provider:"usefulsensors",task:"stt",engine:"transformers.js",dtype:"q8",languages:["en"],where:["device"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/UsefulSensors/moonshine-tiny",revision:"a6da1241cd305dcd64eab1edbd615f2bb9aabb95",files:[{path:"config.json",sha256:"558e1e02069137c796ace1e50c48d8fe451f04a295929138e6bea885517f0edb",size:921},{path:"generation_config.json",sha256:"f9b3f711b57be7def2e50a8942f64f36ee0a55fad5b84ff93a687b6c5bcc1d44",size:147},{path:"preprocessor_config.json",sha256:"fa43a7017ef85cd1d0fba0d9aae77c8adb16990ae6f11115631f41ec5d8aa679",size:128},{path:"special_tokens_map.json",sha256:"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",size:3},{path:"tokenizer.json",sha256:"7b913404bdd039af4756783218af4440bc07fb7d6d8258d677e34f95b3ec416f",size:3761754},{path:"tokenizer_config.json",sha256:"edaee394565d428ea98a663ae7209cdcfeefc5585c42d7a570ff7c986df2cd15",size:135735},{path:"onnx/encoder_model_quantized.onnx",sha256:"c6fc4b7bc5af75c0591fd157a1f3829b533d18e9769a888fd95a62e470dd4f4a",size:7937661},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"eed87831c3a6103534aae7d47a5d485025c659a1323901513961c39fe8a1a367",size:20243286}]},"silero-vad":{id:"silero-vad",version:"0.0.1",name:"Silero VAD",description:"Where speech starts and ends in what the microphone heard, in the browser: Silero VAD (about 2 MB), the build @ricky0123/vad-web 0.0.31 ships and runs on onnxruntime-web. Push-to-talk keeps the speech it finds and drops the rest.",provider:"snakers4",task:"vad",engine:"vad-web",dtype:"fp32",languages:[],where:["device"],streaming:!0,licence:{weights:"MIT",code:"ISC"},attribution:"",upstream:"https://github.com/snakers4/silero-vad",revision:"0.0.31",files:[{path:"silero_vad_legacy.onnx",sha256:"a35ebf52fd3ce5f1469b2a36158dba761bc47b973ea3382b3186ca15b1f5af28",size:1807522}]},"whisper-base":{id:"whisper-base",version:"0.0.1",name:"Whisper Base",description:"Speech to text in the browser for the languages Moonshine's MIT models do not speak, French first: OpenAI's Whisper base (74M parameters, 99 languages), its ONNX export quantized to 8 bits, run by transformers.js. A clip at a time.",provider:"openai",task:"stt",engine:"transformers.js",dtype:"q8",languages:["en","fr"],where:["device"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/openai/whisper-base",revision:"1846881b6b3a3024392c1eea3ad983695bc23925",files:[{path:"config.json",sha256:"f4d0608f7d918166da7edb3e188de5ef1bfe70d9802e785d271fd88111e9cf4b",size:2243},{path:"generation_config.json",sha256:"61070cf8de25b1e9256e8e102ded49d8d24a8369ed36ef84fdf21549e68125a0",size:3832},{path:"preprocessor_config.json",sha256:"a6a76d28c93edb273669eb9e0b0636a2bddbb1272c3261e47b7ca6dfdbac1b8d",size:339},{path:"special_tokens_map.json",sha256:"e67ae3a0aaa99abcd9f187138e12db1f65c16a14761c50ef10eef2c174a7a691",size:2194},{path:"tokenizer.json",sha256:"27fc476bfe7f17299480be2273fc0608e4d5a99aba2ab5dec5374b4482d1a566",size:2480466},{path:"tokenizer_config.json",sha256:"2e036e4dbacfdeb7242c7d4ec4149f4a16e86026048f94d1637e3a8ee9c6a573",size:282682},{path:"added_tokens.json",sha256:"9715fd2243b6f06a5858b5e32950d2853f73dd5bc201aafcf76f5082a2d8acd1",size:34604},{path:"normalizer.json",sha256:"bf1c507dc8724ca9cf9903640dacfb69dae2f00edee4f21ceba106a7392f26dd",size:52666},{path:"vocab.json",sha256:"50d6a919f0a0601d56a04eb583c780d18553aa388254ba3158eb6a00f13e2c1a",size:1036584},{path:"onnx/encoder_model_quantized.onnx",sha256:"5862993336bf33acd23736071aae2b32261d3b1b2f37780194460d4ef974dd46",size:23201314},{path:"onnx/decoder_model_merged_quantized.onnx",sha256:"fa3ef9902734ce5ae6f9ef2bdb2ba9a6c4b5785b09f4f420ce036573dc9d090b",size:53693315}]},"whisper-large-v3-turbo":{id:"whisper-large-v3-turbo",version:"0.0.1",name:"Whisper Large v3 Turbo",description:"Speech to text on Datalayer's servers, on CPU: OpenAI's Whisper large-v3-turbo (809M parameters, 99 languages), converted to CTranslate2 in half precision and run by faster-whisper, its weights quantized to 8 bits when loaded. A recording of up to a minute at a time; the language is detected when the page does not say it.",provider:"openai",task:"stt",engine:"faster-whisper",dtype:"float16",languages:["en","fr","es","it","pt","de","nl","ja","zh","hi"],where:["server"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/openai/whisper-large-v3-turbo",revision:"0a363e9161cbc7ed1431c9597a8ceaf0c4f78fcf",files:[{path:"config.json",sha256:"b0253ea6c0d3bea6b1e19e91a02acfd3b53f4467362efcb5a3e6b16c9b3a9b7e",size:2263},{path:"preprocessor_config.json",sha256:"7ccc62c6f2765af1f3b46c00c9b5894426835a05021c8b9c01eecb6dfb542711",size:340},{path:"tokenizer.json",sha256:"297b13372ac43916285644fb9687add3cc62ee2a1adb60da3dc25cc94c1871fd",size:2710337},{path:"vocabulary.json",sha256:"c69260f2ab26d659b7c398f9a2b2b48ed0df16c3b47d7326782fd9cba71690c1",size:1068114},{path:"model.bin",sha256:"e76620f83d5f5b69efd3d87e3dc180c1bd21df9fbebacfd4335e5e1efcc018da",size:1617884929}]},"whisper-small":{id:"whisper-small",version:"0.0.1",name:"Whisper Small",description:"Speech to text on Datalayer's servers for short spoken turns, on CPU: OpenAI's Whisper small (244M parameters, 99 languages), converted to CTranslate2 and run by faster-whisper, its weights quantized to 8 bits when loaded. About four times faster than large-v3-turbo; on the fixtures it hears English as well (3.3% against 2.4%) and French less well (16.1% against 2.6%). Recordings longer than a turn go to large-v3-turbo.",provider:"openai",task:"stt",engine:"faster-whisper",dtype:"float16",languages:["en","fr","es","it","pt","de","nl","ja","zh","hi"],where:["server","machine"],streaming:!1,licence:{weights:"MIT",code:"MIT"},attribution:"",upstream:"https://huggingface.co/openai/whisper-small",revision:"536b0662742c02347bc0e980a01041f333bce120",files:[{path:"config.json",sha256:"b55496ac7940a7ae47d2c01eab40edfd8701feec1229d9cce3b40014383fb828",size:2370},{path:"tokenizer.json",sha256:"fb7b63191e9bb045082c79fd742a3106a12c99513ab30df4a0d47fa6cb6fd0ab",size:2203239},{path:"vocabulary.txt",sha256:"34ce3fe1c5041027b3f8d42912270993f986dbc4bb34cf27f951e34a1e453913",size:459861},{path:"model.bin",sha256:"3e305921506d8872816023e4c273e75d2419fb89b24da97b4fe7bce14170d671",size:483546902}]}};function voiceSpeaks(Au,lo){return Au.languages.some($u=>$u===lo||$u.split("-")[0]===lo)}function voiceFor(Au){const lo=Object.values(VOICE_CATALOGUE);return lo.find($u=>$u.languages.includes(Au))??lo.find($u=>voiceSpeaks($u,Au.split("-")[0]))}function transcriberFor(Au){const lo=Au.split("-")[0],$u=Object.values(SPEECH_MODEL_CATALOGUE).filter(Ru=>Ru.task==="stt"&&Ru.where.includes("device")&&Ru.languages.includes(lo));return $u.find(Ru=>Ru.id==="moonshine-tiny-en")??$u.find(Ru=>Ru.id.startsWith("moonshine-"))??$u[0]}const MCP_SERVER_MAP={"tavily:0.0.1":TAVILY_MCP_SERVER_0_0_1},SKILL_MAP={"crawl:0.0.1":CRAWL_SKILL_SPEC_0_0_1,"events:0.0.1":EVENTS_SKILL_SPEC_0_0_1,"github:0.0.1":GITHUB_SKILL_SPEC_0_0_1,"text-summarizer:0.0.1":TEXT_SUMMARIZER_SKILL_SPEC_0_0_1};function toAgentSkillSpec(Au){return{id:Au.id,name:Au.name,description:Au.description,version:Au.version??"0.0.1",tags:Au.tags,enabled:Au.enabled,requiredEnvVars:Au.requiredEnvVars}}const TOOL_MAP={"runtime-echo:0.0.1":RUNTIME_ECHO_BACKEND_TOOL_SPEC_0_0_1},FRONTEND_TOOL_MAP={"jupyter-notebook:0.0.1":JUPYTER_NOTEBOOK_FRONTEND_TOOL_SPEC_0_0_1,"lexical-document:0.0.1":LEXICAL_DOCUMENT_FRONTEND_TOOL_SPEC_0_0_1},COG_CRAWLER_AGENTSPEC_0_0_1={id:"cog-crawler",version:"0.0.1",name:"Crawler Cog",description:"Researches the web and public repositories under the Web Research Frame: every finding rests on a source that was opened, is cited, and is checked before it is reported.",tags:["market-analyst","agent-worker","research","github","analysis","cog"],domain:"market-analyst",enabled:!0,model:"bedrock:us.anthropic.claude-sonnet-4-6",modelAdditionals:["alibaba:qwen-max"],mcpServers:[MCP_SERVER_MAP["tavily:0.0.1"]],skills:[SKILL_MAP["github:0.0.1"]?toAgentSkillSpec(SKILL_MAP["github:0.0.1"]):void 0,SKILL_MAP["events:0.0.1"]?toAgentSkillSpec(SKILL_MAP["events:0.0.1"]):void 0,SKILL_MAP["crawl:0.0.1"]?toAgentSkillSpec(SKILL_MAP["crawl:0.0.1"]):void 0].filter(Boolean),backendTools:[],frontendTools:[FRONTEND_TOOL_MAP["jupyter-notebook:0.0.1"],FRONTEND_TOOL_MAP["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"globe",emoji:"🌐",color:"#10B981",suggestions:[{text:"Search the web for recent news about AI agents",summary:"AI agent news"},{text:"Find trending open-source Python projects on GitHub",summary:"Trending Python projects"},{text:"Research best practices for building RAG applications",summary:"RAG best practices"},{text:"Compare popular JavaScript frameworks in 2024",summary:"JavaScript frameworks 2024"}],welcomeMessage:`Hi! I'm the Crawler Cog. I research the web and GitHub under the Web Research Frame: I open what I cite, I say which sources are primary, and I tell you where sources disagree.
3151
3151
  `,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:`You are a web crawling and research assistant with access to Tavily search and GitHub tools. Use Tavily to search the web for current information and search GitHub repositories for relevant projects. Synthesize information from multiple sources and provide clear summaries with sources cited.
3152
3152
 
3153
3153
  ## Frames