@myagentroam/node 0.9.33 → 0.9.35

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.
@@ -1,2 +1,2 @@
1
1
  /* mar-release-protected */
2
- const _0x15fdad=_0x105e;(function(_0x2076ba,_0x2d0bd4){const _0x307d84=_0x105e,_0x505e60=_0x2076ba();while(!![]){try{const _0x3330a1=parseInt(_0x307d84(0x16c))/(0x19bb+-0x9d0+-0xfea)*(-parseInt(_0x307d84(0x207))/(-0xa10+-0xef*0x1b+0x2347))+-parseInt(_0x307d84(0x1fd))/(-0xf5f+-0x10bf+0x23*0xeb)+parseInt(_0x307d84(0x217))/(-0x1*-0x39a+-0x4d5+0x13f)*(parseInt(_0x307d84(0x140))/(-0x16d9*-0x1+0x1*-0x503+-0x11d1))+-parseInt(_0x307d84(0xf9))/(-0x1345+0x2b1*-0x1+-0x1d5*-0xc)*(-parseInt(_0x307d84(0x203))/(-0x1dec+-0x189b+-0x2*-0x1b47))+parseInt(_0x307d84(0x178))/(0x1c*-0x54+-0x260a+0x2f42)+-parseInt(_0x307d84(0x243))/(0xa3*0x18+-0x11f1+0x2b2)*(parseInt(_0x307d84(0x223))/(0x7db+0x1af+-0x260*0x4))+parseInt(_0x307d84(0x1aa))/(-0x1db*-0x4+0xe54*-0x2+0x1547);if(_0x3330a1===_0x2d0bd4)break;else _0x505e60['push'](_0x505e60['shift']());}catch(_0x570e31){_0x505e60['push'](_0x505e60['shift']());}}}(_0x31c6,0xf6212+0xb6907+-0x1158af));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,open,readFile,readlink,readdir,realpath,rename,rm,utimes}from'node:fs/promises';import{isAbsolute,join,relative,resolve,sep}from'node:path';import{conversationTemplateDraftSchema,conversationTemplateSummarySchema,hostedConversationConfigUpdateInputSchema,hostedConversationCreateInputSchema,hostedConversationDeleteResultSchema,hostedConversationFileDeleteInputSchema,hostedConversationFileDeleteResultSchema,hostedConversationFileReadInputSchema,hostedConversationFileReadResultSchema,hostedConversationFilesSchema,hostedConversationIdInputSchema,hostedConversationListInputSchema,hostedConversationListPageSchema,hostedConversationMessageInputSchema,hostedConversationMetadataUpdateInputSchema,hostedConversationSnapshotSchema,hostedConversationSummarySchema,hostedConversationUnwatchInputSchema,hostedConversationUploadChunkInputSchema,hostedConversationUploadControlInputSchema,hostedConversationUploadCreateInputSchema,hostedConversationUploadPreflightInputSchema,hostedConversationUploadPreflightResultSchema,hostedConversationUploadSchema,hostedConversationWatchInputSchema,marAgentRuntimeModelConfigurationSchema,mcpInstallationConfigurationSchema,mcpRuntimeDescriptorSchema}from'@myagentroam/protocol';import{sessionTitleFromFirstMessage}from'../util/node-operation-parsers.js';import{safeErrorCode}from'../util/safe-error.js';import{SessionWatchSlotCoordinator}from'./session-watch-slot-coordinator.js';const HOST_POLICY_VERSION=0x4*0xff+0x488+-0x883,MAX_FILE_READ_BYTES=(0x2cc+-0x3*-0x5db+-0x125d)*(-0x2254+0x4d3*-0x4+-0x4*-0xe68),WATCH_TTL_MS=-0xb*0xf6b+0x155f*0x1+0x26b*0x86,RUNTIME_LINK_ROOTS=[_0x15fdad(0x1ca),_0x15fdad(0x20b),_0x15fdad(0x222),_0x15fdad(0x1fa),_0x15fdad(0x1d6)],RESERVED_SANDBOX_ROOTS=[_0x15fdad(0x1bc),_0x15fdad(0x26d),_0x15fdad(0x160),_0x15fdad(0x1ca),_0x15fdad(0x20b),_0x15fdad(0x222),_0x15fdad(0x1fa),_0x15fdad(0x1d6),_0x15fdad(0x176),_0x15fdad(0x111),_0x15fdad(0x212),_0x15fdad(0x19b)];export class HostedConversationNodeService{[_0x15fdad(0x17e)];[_0x15fdad(0x26b)];['id'];[_0x15fdad(0x196)]=new Map();[_0x15fdad(0x233)]=new Map();[_0x15fdad(0x146)]=new Map();[_0x15fdad(0x139)]=new Map();[_0x15fdad(0x1e8)]=new Map();[_0x15fdad(0x272)]=new Set();[_0x15fdad(0x15c)]=new Map();[_0x15fdad(0x204)]=new Map();[_0x15fdad(0x14d)]=new Set();[_0x15fdad(0x118)]=new Map();[_0x15fdad(0x285)]=new Set();[_0x15fdad(0x1e4)];[_0x15fdad(0x121)]=0x19c3+0x271+-0x1c34;[_0x15fdad(0x125)]=0xa2a+-0x6f1*-0x5+0x15*-0x223;constructor(_0x4fa128){const _0x2ac339=_0x15fdad;this[_0x2ac339(0x17e)]=_0x4fa128,this[_0x2ac339(0x26b)]=_0x4fa128[_0x2ac339(0x26b)]??Date[_0x2ac339(0x26b)],this['id']=_0x4fa128['id']??randomUUID,this[_0x2ac339(0x1e4)]=_0x4fa128[_0x2ac339(0x1e4)]??new SessionWatchSlotCoordinator();}[_0x15fdad(0x264)](){const _0x3bcad7=_0x15fdad;return{'conversation.hosted.list':_0x5d3ba3=>this[_0x3bcad7(0x1f1)](_0x5d3ba3),'conversation.hosted.create':_0x5b72ee=>this[_0x3bcad7(0x19d)](_0x5b72ee),'conversation.hosted.get':_0x4c16eb=>this[_0x3bcad7(0x28d)](_0x4c16eb),'conversation.hosted.watch':_0x538b55=>this[_0x3bcad7(0x236)](_0x538b55),'conversation.hosted.unwatch':_0x49478c=>this[_0x3bcad7(0x29f)](_0x49478c),'conversation.hosted.message':_0x4bb3c7=>this[_0x3bcad7(0x167)](_0x4bb3c7),'conversation.hosted.interrupt':_0x29f0f7=>this[_0x3bcad7(0x198)](_0x29f0f7),'conversation.hosted.config.update':_0x1b24d0=>this[_0x3bcad7(0x274)](_0x1b24d0),'conversation.hosted.metadata.update':_0x154435=>this[_0x3bcad7(0x1dd)](_0x154435),'conversation.hosted.files.list':_0xa5d09f=>this[_0x3bcad7(0x211)](_0xa5d09f),'conversation.hosted.file.read':_0x44c12f=>this[_0x3bcad7(0x157)](_0x44c12f),'conversation.hosted.file.delete':_0x45450a=>this[_0x3bcad7(0x24b)](_0x45450a),'conversation.hosted.files.upload.preflight':_0x2e5dbf=>this[_0x3bcad7(0x1e0)](_0x2e5dbf),'conversation.hosted.files.upload.create':_0x23f72e=>this[_0x3bcad7(0x1f5)](_0x23f72e),'conversation.hosted.files.upload.chunk':_0x2edc4d=>this[_0x3bcad7(0x260)](_0x2edc4d),'conversation.hosted.files.upload.status':_0x45dbd3=>this[_0x3bcad7(0x187)](_0x45dbd3),'conversation.hosted.files.upload.complete':_0x55e70a=>this[_0x3bcad7(0x1eb)](_0x55e70a),'conversation.hosted.files.upload.cancel':_0x361a9e=>this[_0x3bcad7(0xfc)](_0x361a9e),'conversation.hosted.delete':_0x2d9950=>this[_0x3bcad7(0x11b)](_0x2d9950)};}[_0x15fdad(0x1f1)](_0x93808a){const _0x26bd0f=_0x15fdad,_0x51e5e9=hostedRequest(_0x93808a),_0x15688c=hostedConversationListInputSchema[_0x26bd0f(0x26a)](_0x51e5e9[_0x26bd0f(0x229)]),_0x4e8cb0=this[_0x26bd0f(0x17e)][_0x26bd0f(0x141)][_0x26bd0f(0x159)]({'userId':_0x51e5e9[_0x26bd0f(0x14e)],'limit':_0x15688c[_0x26bd0f(0x1e5)],..._0x15688c[_0x26bd0f(0x234)]===undefined?{}:{'cursor':_0x15688c[_0x26bd0f(0x234)]}});return hostedConversationListPageSchema[_0x26bd0f(0x26a)]({..._0x4e8cb0,'items':_0x4e8cb0[_0x26bd0f(0x16b)][_0x26bd0f(0x238)](_0x3d6283=>({..._0x3d6283,'activity':this[_0x26bd0f(0xfb)](_0x3d6283['id'])}))});}[_0x15fdad(0x19d)](_0xe3c42b){const _0x3ea987=_0x15fdad,_0x374f2a=hostedRequest(_0xe3c42b),_0x3a57aa=hostedConversationCreateInputSchema[_0x3ea987(0x26a)](_0x374f2a[_0x3ea987(0x229)]),_0x35487c=conversationTemplateSummarySchema[_0x3ea987(0x26a)](_0x374f2a[_0x3ea987(0x294)]),_0x3df369=runtimeModels(_0x374f2a[_0x3ea987(0x244)]);if(_0x35487c['id']!==_0x3a57aa[_0x3ea987(0x13a)]||_0x35487c[_0x3ea987(0x158)]!==this[_0x3ea987(0x17e)][_0x3ea987(0x158)]()||!_0x35487c[_0x3ea987(0x28a)]||_0x35487c[_0x3ea987(0x115)]!==_0x3ea987(0x173)||_0x35487c[_0x3ea987(0x18f)]===null)throw new Error(_0x3ea987(0x227));const _0x667d95=_0x374f2a[_0x3ea987(0x14e)]+'\x00'+_0x3a57aa[_0x3ea987(0x1f3)],_0x2fa924=this[_0x3ea987(0x196)][_0x3ea987(0x28d)](_0x667d95);if(_0x2fa924!==undefined)return _0x2fa924;const _0x4030bf=this[_0x3ea987(0x17e)][_0x3ea987(0x141)][_0x3ea987(0x21d)](_0x374f2a[_0x3ea987(0x14e)],_0x3a57aa[_0x3ea987(0x1f3)]);if(_0x4030bf!==undefined)return this[_0x3ea987(0x21e)](_0x374f2a[_0x3ea987(0x14e)],_0x4030bf['id'],_0x3df369);const _0x143045=this[_0x3ea987(0x193)](_0x374f2a[_0x3ea987(0x14e)],_0x3a57aa[_0x3ea987(0x1f3)],_0x35487c,_0x3df369,_0x374f2a[_0x3ea987(0x1da)]);return this[_0x3ea987(0x196)][_0x3ea987(0x1a1)](_0x667d95,_0x143045),void _0x143045[_0x3ea987(0x21c)](()=>this[_0x3ea987(0x196)][_0x3ea987(0x11b)](_0x667d95))[_0x3ea987(0x100)](()=>undefined),_0x143045;}async[_0x15fdad(0x193)](_0x381354,_0x593353,_0x2385f3,_0x4d12f2,_0x9e123c){const _0xb4b374=_0x15fdad;await this[_0xb4b374(0x17e)][_0xb4b374(0x148)]?.();const _0x2f0ecf=await this[_0xb4b374(0x11c)](_0x2385f3[_0xb4b374(0x18f)],_0x2385f3['id'],!![]),_0x35a214=selectModel(_0x2f0ecf,_0x4d12f2,_0x2f0ecf[_0xb4b374(0x251)][_0xb4b374(0xfe)]),_0x316420=this['id'](),_0x4e3fe1=await this[_0xb4b374(0x17e)][_0xb4b374(0x141)][_0xb4b374(0x1ff)](_0x381354,_0x316420),_0x48e469=this[_0xb4b374(0x151)](_0x4e3fe1[_0xb4b374(0x1ea)],_0x2f0ecf),_0x2b3d8a=this[_0xb4b374(0x1f7)](_0x4e3fe1[_0xb4b374(0x1ea)],_0x2f0ecf);let _0x5923a9;try{const _0x37ccee=await this[_0xb4b374(0x17e)][_0xb4b374(0x133)][_0xb4b374(0x263)]({'conversationId':_0x316420,'homeDirectory':_0x4e3fe1[_0xb4b374(0x1ea)][_0xb4b374(0x154)],'workspaceDirectory':_0x2f0ecf[_0xb4b374(0x175)],'systemInstruction':systemInstruction(_0x2f0ecf),'defaultModelId':_0x35a214['id'],'models':networkModels(allowedModels(_0x2f0ecf,_0x4d12f2),_0x2f0ecf[_0xb4b374(0x1c5)][_0xb4b374(0x1a4)]),..._0x9e123c===undefined?{}:{'runtimeScopeId':_0x9e123c},'pathMounts':_0x48e469,'processExecutor':_0x2b3d8a});_0x5923a9=_0x37ccee[_0xb4b374(0x269)];const _0x3647b0=this[_0xb4b374(0x26b)](),_0x649cbe={'id':_0x316420,'nodeId':this[_0xb4b374(0x17e)][_0xb4b374(0x158)](),'sessionId':_0x5923a9,'templateId':_0x2385f3['id'],'templateName':_0x2385f3[_0xb4b374(0x255)],'activeVersionId':_0x2f0ecf['id'],'title':_0x2385f3[_0xb4b374(0x255)],'titleSource':_0xb4b374(0x1a0),'pinnedAt':null,'status':_0xb4b374(0x173),'modelId':_0x35a214['id'],'createdAt':_0x3647b0,'updatedAt':_0x3647b0,'lastActivityAt':_0x3647b0,'userStorageKey':_0x4e3fe1[_0xb4b374(0x165)],'conversationStorageKey':_0x4e3fe1[_0xb4b374(0x169)],'clientRequestId':_0x593353,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0x2f0ecf[_0xb4b374(0x1c5)][_0xb4b374(0x112)][_0xb4b374(0x1a3)]}},_0x2557ad=await this[_0xb4b374(0x17e)][_0xb4b374(0x141)][_0xb4b374(0x193)](_0x649cbe);return _0x2557ad['id']!==_0x316420&&(await this[_0xb4b374(0x17e)][_0xb4b374(0x133)][_0xb4b374(0x26e)]({'conversationId':_0x316420,'sessionId':_0x5923a9,'homeDirectory':_0x4e3fe1[_0xb4b374(0x1ea)][_0xb4b374(0x154)]})[_0xb4b374(0x100)](()=>undefined),await rm(_0x4e3fe1[_0xb4b374(0x1ea)][_0xb4b374(0x10c)],{'recursive':!![],'force':!![]})),this[_0xb4b374(0x21e)](_0x381354,_0x2557ad['id'],_0x4d12f2);}catch(_0x225024){if(_0x5923a9!==undefined)await this[_0xb4b374(0x17e)][_0xb4b374(0x133)][_0xb4b374(0x26e)]({'conversationId':_0x316420,'sessionId':_0x5923a9,'homeDirectory':_0x4e3fe1[_0xb4b374(0x1ea)][_0xb4b374(0x154)]})[_0xb4b374(0x100)](()=>undefined);await rm(_0x4e3fe1[_0xb4b374(0x1ea)][_0xb4b374(0x10c)],{'recursive':!![],'force':!![]})[_0xb4b374(0x100)](()=>undefined);throw _0x225024;}}async[_0x15fdad(0x28d)](_0x72e432){const _0x23924e=_0x15fdad,_0x2a880b=hostedRequest(_0x72e432),_0x506303=hostedConversationIdInputSchema[_0x23924e(0x26a)](_0x2a880b[_0x23924e(0x229)]);return this[_0x23924e(0x21e)](_0x2a880b[_0x23924e(0x14e)],_0x506303[_0x23924e(0x1b4)],runtimeModels(_0x2a880b[_0x23924e(0x244)]),_0x2a880b[_0x23924e(0x119)]);}async[_0x15fdad(0x21e)](_0xaebf1b,_0x1f7904,_0x44ae75,_0x3e636a=![]){const _0x311ec0=_0x15fdad;let _0x1c37fe=this[_0x311ec0(0x17e)][_0x311ec0(0x141)][_0x311ec0(0x221)](_0xaebf1b,_0x1f7904);if(_0x3e636a)_0x1c37fe=await this[_0x311ec0(0x17e)][_0x311ec0(0x141)][_0x311ec0(0xff)](_0xaebf1b,_0x1f7904,this[_0x311ec0(0x26b)]());const _0x5fc5de=await this[_0x311ec0(0x11c)](_0x1c37fe[_0x311ec0(0x1fe)],_0x1c37fe[_0x311ec0(0x13a)]),_0x5c066b=networkModels(allowedModels(_0x5fc5de,_0x44ae75),_0x5fc5de[_0x311ec0(0x1c5)][_0x311ec0(0x1a4)]),_0x436aba=this[_0x311ec0(0x17e)][_0x311ec0(0x141)][_0x311ec0(0x215)](_0xaebf1b,_0x1c37fe['id']),_0x145571=await this[_0x311ec0(0x17e)][_0x311ec0(0x133)][_0x311ec0(0x1c9)]({'conversationId':_0x1c37fe['id'],'sessionId':_0x1c37fe[_0x311ec0(0x269)],'homeDirectory':_0x436aba[_0x311ec0(0x154)],'modelId':_0x1c37fe[_0x311ec0(0x22d)]});return hostedConversationSnapshotSchema[_0x311ec0(0x26a)]({'conversation':this[_0x311ec0(0x108)](_0x1c37fe),'template':templateSummary(_0x1c37fe,_0x5fc5de[_0x311ec0(0x1c5)]),'run':this[_0x311ec0(0x146)][_0x311ec0(0x28d)](_0x1c37fe['id'])?.[_0x311ec0(0x168)]??null,'turns':_0x145571,'files':this[_0x311ec0(0x17e)][_0x311ec0(0x141)][_0x311ec0(0x211)](_0xaebf1b,_0x1c37fe['id']),'models':_0x5c066b[_0x311ec0(0x238)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0x15fdad(0x236)](_0x42aaf9){const _0x5b3da4=_0x15fdad,_0x3a4eec=hostedRequest(_0x42aaf9),_0x567a7a=hostedConversationWatchInputSchema[_0x5b3da4(0x26a)](_0x3a4eec[_0x5b3da4(0x229)]),_0x18936f=this[_0x5b3da4(0x17e)][_0x5b3da4(0x141)][_0x5b3da4(0x221)](_0x3a4eec[_0x5b3da4(0x14e)],_0x567a7a[_0x5b3da4(0x1b4)]);if(this[_0x5b3da4(0x285)][_0x5b3da4(0x12a)](_0x18936f['id']))throw new Error(_0x5b3da4(0x1b5));const _0x782085=requireWatchSessionHash(_0x3a4eec[_0x5b3da4(0x21a)]),_0x54f30e=watchOwnerKey(_0x782085,_0x567a7a[_0x5b3da4(0x15d)]);if(_0x567a7a[_0x5b3da4(0x103)]===_0x5b3da4(0x181)){const _0x41c043=this[_0x5b3da4(0x118)][_0x5b3da4(0x28d)](_0x54f30e);if(_0x41c043===undefined||!this[_0x5b3da4(0x1e4)][_0x5b3da4(0x12c)](_0x54f30e,_0x41c043[_0x5b3da4(0x166)])||_0x41c043[_0x5b3da4(0x1f9)]!==_0x567a7a[_0x5b3da4(0x1f9)]||_0x41c043[_0x5b3da4(0x1b4)]!==_0x567a7a[_0x5b3da4(0x1b4)]||_0x41c043[_0x5b3da4(0x14e)]!==_0x3a4eec[_0x5b3da4(0x14e)]||_0x41c043[_0x5b3da4(0x105)]<=Date[_0x5b3da4(0x26b)]()){this[_0x5b3da4(0x163)](_0x54f30e);throw new Error(_0x5b3da4(0x174));}return _0x41c043[_0x5b3da4(0x105)]=Date[_0x5b3da4(0x26b)]()+WATCH_TTL_MS,clearTimeout(_0x41c043[_0x5b3da4(0x130)]),_0x41c043[_0x5b3da4(0x130)]=this[_0x5b3da4(0x13c)](_0x54f30e),this[_0x5b3da4(0x1a7)](_0x41c043);}const _0xd5df94=runtimeModels(_0x3a4eec[_0x5b3da4(0x244)]),_0x30395a=this[_0x5b3da4(0x118)][_0x5b3da4(0x28d)](_0x54f30e);if(_0x30395a!==undefined&&this[_0x5b3da4(0x1e4)][_0x5b3da4(0x12c)](_0x54f30e,_0x30395a[_0x5b3da4(0x166)])&&_0x30395a[_0x5b3da4(0x1f9)]===_0x567a7a[_0x5b3da4(0x1f9)]&&_0x30395a[_0x5b3da4(0x1b4)]===_0x567a7a[_0x5b3da4(0x1b4)]&&_0x30395a[_0x5b3da4(0x14e)]===_0x3a4eec[_0x5b3da4(0x14e)]&&_0x30395a[_0x5b3da4(0x105)]>Date[_0x5b3da4(0x26b)]())return _0x30395a[_0x5b3da4(0x105)]=Date[_0x5b3da4(0x26b)]()+WATCH_TTL_MS,clearTimeout(_0x30395a[_0x5b3da4(0x130)]),_0x30395a[_0x5b3da4(0x130)]=this[_0x5b3da4(0x13c)](_0x54f30e),this[_0x5b3da4(0x1a7)](_0x30395a);this[_0x5b3da4(0x163)](_0x54f30e);const _0x49ffb8=this[_0x5b3da4(0x1e4)][_0x5b3da4(0x14c)](_0x54f30e,_0x5b3da4(0x1bf),()=>this[_0x5b3da4(0x163)](_0x54f30e)),_0x5f086a={'ownerKey':_0x54f30e,'slotToken':_0x49ffb8,'sessionHash':_0x782085,'workbenchConnectionId':_0x567a7a[_0x5b3da4(0x15d)],'watchId':_0x567a7a[_0x5b3da4(0x1f9)],'conversationId':_0x567a7a[_0x5b3da4(0x1b4)],'userId':_0x3a4eec[_0x5b3da4(0x14e)],'models':_0xd5df94,'nodeGeneration':this[_0x5b3da4(0x17e)][_0x5b3da4(0x209)]?.()??_0x5b3da4(0x1b8),'pendingEvents':[],'expiresAt':Date[_0x5b3da4(0x26b)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x5f086a[_0x5b3da4(0x130)]=this[_0x5b3da4(0x13c)](_0x54f30e),this[_0x5b3da4(0x118)][_0x5b3da4(0x1a1)](_0x54f30e,_0x5f086a),void this[_0x5b3da4(0x24e)](_0x5f086a),this[_0x5b3da4(0x1a7)](_0x5f086a);}[_0x15fdad(0x29f)](_0xa36ee0){const _0x535c73=_0x15fdad,_0x1b9e09=hostedRequest(_0xa36ee0),_0x35fdfc=hostedConversationUnwatchInputSchema[_0x535c73(0x26a)](_0x1b9e09[_0x535c73(0x229)]);this[_0x535c73(0x17e)][_0x535c73(0x141)][_0x535c73(0x221)](_0x1b9e09[_0x535c73(0x14e)],_0x35fdfc[_0x535c73(0x1b4)]);const _0x190f64=watchOwnerKey(requireWatchSessionHash(_0x1b9e09[_0x535c73(0x21a)]),_0x35fdfc[_0x535c73(0x15d)]),_0x59125c=this[_0x535c73(0x118)][_0x535c73(0x28d)](_0x190f64);if(_0x59125c?.[_0x535c73(0x1f9)]===_0x35fdfc[_0x535c73(0x1f9)]&&_0x59125c[_0x535c73(0x1b4)]===_0x35fdfc[_0x535c73(0x1b4)]&&_0x59125c[_0x535c73(0x14e)]===_0x1b9e09[_0x535c73(0x14e)])this[_0x535c73(0x163)](_0x190f64);return{'unwatched':!![]};}[_0x15fdad(0x228)](_0x215a23,_0x24d404){const _0x3afcf1=_0x15fdad;return this[_0x3afcf1(0x13d)](_0x215a23,{'conversationId':_0x215a23,'kind':_0x3afcf1(0x133),'runtimeEvent':_0x24d404});}[_0x15fdad(0x1e9)](_0x279146){const _0x24db51=_0x15fdad;return this[_0x24db51(0x285)][_0x24db51(0x12a)](_0x279146)||this[_0x24db51(0x146)][_0x24db51(0x12a)](_0x279146)||this[_0x24db51(0x139)][_0x24db51(0x12a)](_0x279146)||[...this[_0x24db51(0x118)][_0x24db51(0x13f)]()][_0x24db51(0x16a)](_0x4d94e2=>_0x4d94e2[_0x24db51(0x1b4)]===_0x279146)||[...this[_0x24db51(0x15c)][_0x24db51(0x13f)]()][_0x24db51(0x16a)](_0x516872=>_0x516872[_0x24db51(0x1b4)]===_0x279146&&_0x516872[_0x24db51(0x115)]===_0x24db51(0x171))||[...this[_0x24db51(0x233)][_0x24db51(0x1d9)]()][_0x24db51(0x16a)](_0x4b7f45=>_0x4b7f45[_0x24db51(0x27e)](_0x279146+'\x00'));}[_0x15fdad(0x1d4)](_0x474f8d){const _0x1651c2=_0x15fdad;if(this[_0x1651c2(0x1e9)](_0x474f8d))return undefined;return this[_0x1651c2(0x285)][_0x1651c2(0x188)](_0x474f8d),()=>{const _0x1196cd=_0x1651c2;this[_0x1196cd(0x285)][_0x1196cd(0x11b)](_0x474f8d);};}async[_0x15fdad(0x1e6)](_0x50076d){const _0x5640ca=_0x15fdad,_0x3c729e=this[_0x5640ca(0x17e)][_0x5640ca(0x141)][_0x5640ca(0x213)](_0x50076d);await this[_0x5640ca(0x17e)][_0x5640ca(0x133)][_0x5640ca(0x26e)]({'conversationId':_0x50076d['id'],'sessionId':_0x50076d[_0x5640ca(0x269)],'homeDirectory':_0x3c729e[_0x5640ca(0x154)]})[_0x5640ca(0x100)](()=>undefined);}[_0x15fdad(0x25f)](){const _0x154a90=_0x15fdad;for(const [_0x24eeb0,_0x3e80da]of this[_0x154a90(0x146)]){const _0x2c393d=runInterruptionKey(_0x24eeb0,_0x3e80da[_0x154a90(0x168)]['id']);this[_0x154a90(0x272)][_0x154a90(0x188)](_0x2c393d);if(!_0x3e80da[_0x154a90(0x1dc)]())this[_0x154a90(0x272)][_0x154a90(0x11b)](_0x2c393d);}for(const _0x1fd62e of[...this[_0x154a90(0x118)][_0x154a90(0x1d9)]()])this[_0x154a90(0x163)](_0x1fd62e);}[_0x15fdad(0x167)](_0x491aec){const _0x3d12b3=_0x15fdad,_0x4805ea=hostedRequest(_0x491aec),_0x15af92=hostedConversationMessageInputSchema[_0x3d12b3(0x26a)](_0x4805ea[_0x3d12b3(0x229)]),_0x2ab337=_0x15af92[_0x3d12b3(0x1b4)]+'\x00'+_0x15af92[_0x3d12b3(0x25c)],_0xc6cb65=this[_0x3d12b3(0x233)][_0x3d12b3(0x28d)](_0x2ab337);if(_0xc6cb65!==undefined)return _0xc6cb65;const _0x515f3f=this[_0x3d12b3(0x17e)][_0x3d12b3(0x141)][_0x3d12b3(0x246)](_0x4805ea[_0x3d12b3(0x14e)],_0x15af92[_0x3d12b3(0x1b4)],_0x15af92[_0x3d12b3(0x25c)]);if(_0x515f3f!==undefined){const _0x24bf64=this[_0x3d12b3(0x17e)][_0x3d12b3(0x141)][_0x3d12b3(0x221)](_0x4805ea[_0x3d12b3(0x14e)],_0x15af92[_0x3d12b3(0x1b4)]);return Promise[_0x3d12b3(0x1e7)]({'conversation':this[_0x3d12b3(0x108)](_0x24bf64),'run':runFromMessage(_0x515f3f)});}if([...this[_0x3d12b3(0x233)][_0x3d12b3(0x1d9)]()][_0x3d12b3(0x16a)](_0x56a280=>_0x56a280[_0x3d12b3(0x27e)](_0x15af92[_0x3d12b3(0x1b4)]+'\x00')))return Promise[_0x3d12b3(0x270)](new Error(_0x3d12b3(0x101)));const _0xf011ae=this[_0x3d12b3(0x117)](_0x4805ea,_0x15af92);return this[_0x3d12b3(0x233)][_0x3d12b3(0x1a1)](_0x2ab337,_0xf011ae),void _0xf011ae[_0x3d12b3(0x21c)](()=>this[_0x3d12b3(0x233)][_0x3d12b3(0x11b)](_0x2ab337))[_0x3d12b3(0x100)](()=>undefined),_0xf011ae;}async[_0x15fdad(0x117)](_0x57ae4b,_0x295deb){const _0x411f56=_0x15fdad;let _0x40865e=this[_0x411f56(0x17e)][_0x411f56(0x141)][_0x411f56(0x221)](_0x57ae4b[_0x411f56(0x14e)],_0x295deb[_0x411f56(0x1b4)]);if(this[_0x411f56(0x285)][_0x411f56(0x12a)](_0x40865e['id']))throw new Error(_0x411f56(0x1b5));if(_0x40865e[_0x411f56(0x115)]!==_0x411f56(0x173))throw new Error(_0x411f56(0x1b5));if(this[_0x411f56(0x146)][_0x411f56(0x12a)](_0x40865e['id']))throw new Error(_0x411f56(0x101));const _0x371646=sessionTitleFromFirstMessage(_0x295deb[_0x411f56(0x250)]),_0x437243=_0x371646[_0x411f56(0x16e)]>-0x2213+0x1*0x623+0x37e*0x8&&!this[_0x411f56(0x17e)][_0x411f56(0x141)][_0x411f56(0x297)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e['id']),_0xf72f4c=runtimeModels(_0x57ae4b[_0x411f56(0x244)]),_0x29dcbe=this[_0x411f56(0x17e)][_0x411f56(0x141)][_0x411f56(0x215)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e['id']);let _0x25eaa6,_0x2bdefe,_0x37652b,_0x1bf791;const _0x24ecf5=_0x40865e[_0x411f56(0x119)]?undefined:this[_0x411f56(0x23d)](_0x40865e[_0x411f56(0x13a)]);if(_0x24ecf5!==undefined&&_0x24ecf5!==_0x40865e[_0x411f56(0x1fe)]){const _0x381888=_0x40865e[_0x411f56(0x1fe)],_0x221fc9=_0x24ecf5;try{_0x25eaa6=await this[_0x411f56(0x11c)](_0x221fc9,_0x40865e[_0x411f56(0x13a)],!![]),_0x2bdefe=selectModel(_0x25eaa6,_0xf72f4c,_0x295deb[_0x411f56(0x22d)]??_0x25eaa6[_0x411f56(0x251)][_0x411f56(0xfe)]),_0x37652b=resolveMcpServers(_0x25eaa6,this[_0x411f56(0x17e)][_0x411f56(0x202)]??process.env),this[_0x411f56(0x151)](_0x29dcbe,_0x25eaa6),this[_0x411f56(0x1f7)](_0x29dcbe,_0x25eaa6),_0x1bf791={'previousVersionId':_0x381888,'targetVersionId':_0x221fc9};}catch(_0x47a1e0){this[_0x411f56(0x189)](_0x40865e,_0x381888,_0x221fc9,_0x47a1e0);throw new Error(_0x411f56(0xf8));}}else _0x25eaa6=await this[_0x411f56(0x11c)](_0x40865e[_0x411f56(0x1fe)],_0x40865e[_0x411f56(0x13a)],!![]),_0x2bdefe=selectModel(_0x25eaa6,_0xf72f4c,_0x295deb[_0x411f56(0x22d)]??_0x40865e[_0x411f56(0x22d)]);const _0x417424=await Promise[_0x411f56(0x1f2)](_0x295deb[_0x411f56(0x29b)][_0x411f56(0x238)](_0x2399ab=>this[_0x411f56(0x286)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e['id'],_0x2399ab))),_0x36384a=attachmentPrompt(_0x295deb[_0x411f56(0x250)],_0x417424),_0x80f918=join(_0x29dcbe[_0x411f56(0x1c4)],_0x411f56(0x15b)+randomUUID());await mkdir(_0x80f918,{'mode':0x1c0}),this[_0x411f56(0x275)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e,_0x411f56(0x1ef),this[_0x411f56(0x26b)]());const _0x58d24e=[];let _0x4ea142=![];const _0x5b5474=await this[_0x411f56(0x17e)][_0x411f56(0x133)][_0x411f56(0x259)]({'conversationId':_0x40865e['id'],'sessionId':_0x40865e[_0x411f56(0x269)],'clientMessageId':_0x295deb[_0x411f56(0x25c)],'userPrompt':_0x295deb[_0x411f56(0x250)],'prompt':_0x36384a,'attachmentIds':_0x295deb[_0x411f56(0x29b)],'access':_0x411f56(0x1b1),'modelId':_0x2bdefe['id'],'models':networkModels(allowedModels(_0x25eaa6,_0xf72f4c),_0x25eaa6[_0x411f56(0x1c5)][_0x411f56(0x1a4)]),..._0x57ae4b[_0x411f56(0x1da)]===undefined?{}:{'runtimeScopeId':_0x57ae4b[_0x411f56(0x1da)]},'systemInstruction':systemInstruction(_0x25eaa6),'homeDirectory':_0x29dcbe[_0x411f56(0x154)],'workspaceDirectory':_0x25eaa6[_0x411f56(0x175)],'temporaryDirectory':_0x80f918,'pathMounts':this[_0x411f56(0x151)](_0x29dcbe,_0x25eaa6),'processExecutor':this[_0x411f56(0x1f7)](_0x29dcbe,_0x25eaa6,_0x80f918),'mcpServers':_0x37652b??resolveMcpServers(_0x25eaa6,this[_0x411f56(0x17e)][_0x411f56(0x202)]??process.env),'webAccess':_0x25eaa6[_0x411f56(0x1c5)][_0x411f56(0x1a4)]!==_0x411f56(0x16f),'onEvent':_0x580a44=>{const _0x3fa6a2=_0x411f56;if(_0x4ea142)this[_0x3fa6a2(0x228)](_0x40865e['id'],_0x580a44);else _0x58d24e[_0x3fa6a2(0x24d)](_0x580a44);}})[_0x411f56(0x100)](async _0x3a431e=>{const _0x31df3d=_0x411f56;this[_0x31df3d(0x275)](_0x57ae4b[_0x31df3d(0x14e)],_0x40865e,_0x31df3d(0x29d),this[_0x31df3d(0x26b)]()),await rm(_0x80f918,{'recursive':!![],'force':!![]})[_0x31df3d(0x100)](()=>undefined);if(_0x1bf791!==undefined){this[_0x31df3d(0x189)](_0x40865e,_0x1bf791[_0x31df3d(0x1d5)],_0x1bf791[_0x31df3d(0x256)],_0x3a431e);throw new Error(_0x31df3d(0xf8));}throw _0x3a431e;}),_0x19a85f=_0x5b5474[_0x411f56(0x168)][_0x411f56(0x116)];let _0x46f355=![],_0x3569c3;try{this[_0x411f56(0x17e)][_0x411f56(0x141)][_0x411f56(0x21f)]({'conversationId':_0x40865e['id'],'clientMessageId':_0x295deb[_0x411f56(0x25c)],'runId':_0x5b5474[_0x411f56(0x168)]['id'],'userTextPresent':_0x371646[_0x411f56(0x16e)]>-0x218*-0x5+-0xb3*-0x25+0x2457*-0x1,'status':_0x411f56(0x16d),'createdAt':_0x19a85f,'updatedAt':_0x19a85f}),_0x46f355=!![];const _0x85776e=this[_0x411f56(0x26b)]();_0x3569c3=await this[_0x411f56(0x17e)][_0x411f56(0x141)][_0x411f56(0x248)]({'conversationId':_0x40865e['id'],'modelId':_0x2bdefe['id'],'activityAt':_0x85776e,..._0x1bf791===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0x1bf791[_0x411f56(0x1d5)],'activeVersionId':_0x1bf791[_0x411f56(0x256)],'maxStorageBytes':_0x25eaa6[_0x411f56(0x1c5)][_0x411f56(0x112)][_0x411f56(0x1a3)]}},..._0x437243?{'automaticTitle':_0x371646}:{}});}catch(_0x208c22){try{_0x5b5474[_0x411f56(0x1dc)]();}catch{}const _0x287b4a=await _0x5b5474[_0x411f56(0x128)][_0x411f56(0x100)](()=>({'status':_0x411f56(0x27f),'completedAt':this[_0x411f56(0x26b)]()}));if(_0x46f355)try{this[_0x411f56(0x17e)][_0x411f56(0x141)][_0x411f56(0x1e2)](_0x40865e['id'],_0x295deb[_0x411f56(0x25c)],_0x287b4a[_0x411f56(0x115)],_0x287b4a[_0x411f56(0x295)]);}catch{}await rm(_0x80f918,{'recursive':!![],'force':!![]})[_0x411f56(0x100)](()=>undefined),this[_0x411f56(0x275)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e,_0x411f56(0x29d),_0x287b4a[_0x411f56(0x295)]);if(_0x1bf791!==undefined)this[_0x411f56(0x189)](_0x40865e,_0x1bf791[_0x411f56(0x1d5)],_0x1bf791[_0x411f56(0x256)],_0x208c22);throw _0x208c22;}_0x40865e=_0x3569c3[_0x411f56(0x131)];if(_0x1bf791!==undefined)this[_0x411f56(0x13d)](_0x40865e['id'],{'conversationId':_0x40865e['id'],'kind':_0x411f56(0x289),'upgrade':{'status':_0x411f56(0x11a),'previousVersionId':_0x1bf791[_0x411f56(0x1d5)],'targetVersionId':_0x1bf791[_0x411f56(0x256)],'activeVersionId':_0x40865e[_0x411f56(0x1fe)],'conversation':this[_0x411f56(0x108)](_0x40865e),'error':null}});this[_0x411f56(0x146)][_0x411f56(0x1a1)](_0x40865e['id'],_0x5b5474),this[_0x411f56(0x275)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e,_0x411f56(0x16d),_0x5b5474[_0x411f56(0x168)][_0x411f56(0x116)]);if(_0x3569c3[_0x411f56(0x195)])this[_0x411f56(0x13d)](_0x40865e['id'],{'conversationId':_0x40865e['id'],'kind':_0x411f56(0x131),'conversation':this[_0x411f56(0x108)](_0x40865e)});this[_0x411f56(0x13d)](_0x40865e['id'],{'conversationId':_0x40865e['id'],'kind':_0x411f56(0x168),'run':_0x5b5474[_0x411f56(0x168)]}),_0x4ea142=!![];for(const _0x5dd999 of _0x58d24e)this[_0x411f56(0x228)](_0x40865e['id'],_0x5dd999);_0x58d24e[_0x411f56(0x16e)]=0x1f5d+-0x15c4+-0x999;const _0x183680=_0x5b5474[_0x411f56(0x128)][_0x411f56(0x122)](_0x26d7fa=>this[_0x411f56(0x261)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e['id'],_0x295deb[_0x411f56(0x25c)],_0x5b5474[_0x411f56(0x168)],_0x26d7fa),()=>this[_0x411f56(0x261)](_0x57ae4b[_0x411f56(0x14e)],_0x40865e['id'],_0x295deb[_0x411f56(0x25c)],_0x5b5474[_0x411f56(0x168)],{'status':_0x411f56(0x27f),'completedAt':this[_0x411f56(0x26b)]()}))[_0x411f56(0x100)](()=>undefined)[_0x411f56(0x21c)](async()=>{const _0x3e3830=_0x411f56;this[_0x3e3830(0x272)][_0x3e3830(0x11b)](runInterruptionKey(_0x40865e['id'],_0x5b5474[_0x3e3830(0x168)]['id']));if(this[_0x3e3830(0x146)][_0x3e3830(0x28d)](_0x40865e['id'])===_0x5b5474)this[_0x3e3830(0x146)][_0x3e3830(0x11b)](_0x40865e['id']);if(this[_0x3e3830(0x139)][_0x3e3830(0x28d)](_0x40865e['id'])===_0x183680)this[_0x3e3830(0x139)][_0x3e3830(0x11b)](_0x40865e['id']);await rm(_0x80f918,{'recursive':!![],'force':!![]})[_0x3e3830(0x100)](()=>undefined);});return this[_0x411f56(0x139)][_0x411f56(0x1a1)](_0x40865e['id'],_0x183680),void _0x183680,{'conversation':this[_0x411f56(0x108)](_0x40865e),'run':_0x5b5474[_0x411f56(0x168)]};}async[_0x15fdad(0x261)](_0x3b868e,_0x29308e,_0x53653e,_0x104f6d,_0x27cbcb){const _0x200c6d=_0x15fdad,_0x43d326=runInterruptionKey(_0x29308e,_0x104f6d['id']),_0x4432c8=this[_0x200c6d(0x272)][_0x200c6d(0x12a)](_0x43d326);let _0x39a54d;try{this[_0x200c6d(0x17e)][_0x200c6d(0x141)][_0x200c6d(0x1e2)](_0x29308e,_0x53653e,_0x27cbcb[_0x200c6d(0x115)],_0x27cbcb[_0x200c6d(0x295)]);try{const _0x76ab73=await this[_0x200c6d(0x17e)][_0x200c6d(0x141)][_0x200c6d(0x26f)](_0x3b868e,_0x29308e);this[_0x200c6d(0x13d)](_0x29308e,{'conversationId':_0x29308e,'kind':_0x200c6d(0x2a1),'files':_0x76ab73,'error':null});}catch(_0x125e71){this[_0x200c6d(0x13d)](_0x29308e,{'conversationId':_0x29308e,'kind':_0x200c6d(0x2a1),'files':this[_0x200c6d(0x17e)][_0x200c6d(0x141)][_0x200c6d(0x211)](_0x3b868e,_0x29308e),'error':{'code':safeErrorCode(_0x125e71,_0x200c6d(0x11d)),'message':_0x200c6d(0x1ce)}});}await this[_0x200c6d(0x17e)][_0x200c6d(0x141)][_0x200c6d(0x293)](_0x29308e,_0x27cbcb[_0x200c6d(0x295)]),this[_0x200c6d(0x13d)](_0x29308e,{'conversationId':_0x29308e,'kind':_0x200c6d(0x168),'run':{'id':_0x104f6d['id'],'status':_0x27cbcb[_0x200c6d(0x115)],'startedAt':_0x104f6d[_0x200c6d(0x116)],'completedAt':_0x27cbcb[_0x200c6d(0x295)]}}),await this[_0x200c6d(0x162)](_0x29308e,_0x27cbcb[_0x200c6d(0x1cc)],_0x27cbcb[_0x200c6d(0x295)])[_0x200c6d(0x100)](()=>undefined),_0x39a54d=this[_0x200c6d(0x17e)][_0x200c6d(0x141)][_0x200c6d(0x221)](_0x3b868e,_0x29308e);}finally{this[_0x200c6d(0x272)][_0x200c6d(0x11b)](_0x43d326);if(_0x39a54d===undefined)try{_0x39a54d=this[_0x200c6d(0x17e)][_0x200c6d(0x141)][_0x200c6d(0x221)](_0x3b868e,_0x29308e);}catch{}if(_0x39a54d!==undefined)this[_0x200c6d(0x275)](_0x3b868e,_0x39a54d,_0x200c6d(0x29d),_0x27cbcb[_0x200c6d(0x295)]);}if(_0x39a54d!==undefined&&(_0x27cbcb[_0x200c6d(0x115)]!==_0x200c6d(0x2a2)||!_0x4432c8))this[_0x200c6d(0x123)](_0x3b868e,_0x39a54d,_0x104f6d['id'],_0x27cbcb);}async[_0x15fdad(0x162)](_0x2d56ef,_0x31206a,_0x30c7ef){const _0x2a4cd7=_0x15fdad,_0x4b2a5f=automaticHostedConversationTitle(_0x31206a);if(_0x4b2a5f===undefined)return;const _0x24a91f=await this[_0x2a4cd7(0x17e)][_0x2a4cd7(0x141)][_0x2a4cd7(0x1c8)](_0x2d56ef,_0x4b2a5f,_0x30c7ef);if(_0x24a91f===undefined)return;this[_0x2a4cd7(0x13d)](_0x2d56ef,{'conversationId':_0x2d56ef,'kind':_0x2a4cd7(0x131),'conversation':this[_0x2a4cd7(0x108)](_0x24a91f)});}[_0x15fdad(0x198)](_0x5db719){const _0x13f25b=_0x15fdad,_0x1defe0=hostedRequest(_0x5db719),_0x182b0d=hostedConversationIdInputSchema[_0x13f25b(0x26a)](_0x1defe0[_0x13f25b(0x229)]),_0x1f27b6=this[_0x13f25b(0x17e)][_0x13f25b(0x141)][_0x13f25b(0x221)](_0x1defe0[_0x13f25b(0x14e)],_0x182b0d[_0x13f25b(0x1b4)]),_0x59fd58=this[_0x13f25b(0x146)][_0x13f25b(0x28d)](_0x182b0d[_0x13f25b(0x1b4)]);if(_0x59fd58===undefined)return{'interrupted':![]};const _0x27d3b9=runInterruptionKey(_0x1f27b6['id'],_0x59fd58[_0x13f25b(0x168)]['id']);this[_0x13f25b(0x272)][_0x13f25b(0x188)](_0x27d3b9);try{const _0x114378=_0x59fd58[_0x13f25b(0x1dc)]();if(!_0x114378)return this[_0x13f25b(0x272)][_0x13f25b(0x11b)](_0x27d3b9),{'interrupted':![]};return this[_0x13f25b(0x275)](_0x1defe0[_0x13f25b(0x14e)],_0x1f27b6,_0x13f25b(0x252),this[_0x13f25b(0x26b)]()),{'interrupted':!![]};}catch(_0x1f736b){this[_0x13f25b(0x272)][_0x13f25b(0x11b)](_0x27d3b9);throw _0x1f736b;}}async[_0x15fdad(0x274)](_0x366445){const _0x5986ff=_0x15fdad,_0xebf81d=hostedRequest(_0x366445),_0x25938c=hostedConversationConfigUpdateInputSchema[_0x5986ff(0x26a)](_0xebf81d[_0x5986ff(0x229)]),_0x315a17=this[_0x5986ff(0x17e)][_0x5986ff(0x141)][_0x5986ff(0x221)](_0xebf81d[_0x5986ff(0x14e)],_0x25938c[_0x5986ff(0x1b4)]);if(this[_0x5986ff(0x285)][_0x5986ff(0x12a)](_0x315a17['id']))throw new Error(_0x5986ff(0x1b5));const _0x46b63a=await this[_0x5986ff(0x11c)](_0x315a17[_0x5986ff(0x1fe)],_0x315a17[_0x5986ff(0x13a)]),_0x5b238a=runtimeModels(_0xebf81d[_0x5986ff(0x244)]),_0x3bacd8=selectModel(_0x46b63a,_0x5b238a,_0x25938c[_0x5986ff(0x22d)]??_0x315a17[_0x5986ff(0x22d)]),_0x5ea81e=this[_0x5986ff(0x26b)](),_0xbc7c43=await this[_0x5986ff(0x17e)][_0x5986ff(0x141)][_0x5986ff(0x18b)](_0x315a17['id'],_0x43b779=>({..._0x43b779,'modelId':_0x3bacd8['id'],'updatedAt':_0x5ea81e,'lastActivityAt':_0x5ea81e}));return this[_0x5986ff(0x13d)](_0x315a17['id'],{'conversationId':_0x315a17['id'],'kind':_0x5986ff(0x184),'conversation':this[_0x5986ff(0x108)](_0xbc7c43)}),{'conversation':this[_0x5986ff(0x108)](_0xbc7c43)};}async[_0x15fdad(0x1dd)](_0x2482da){const _0xa0620b=_0x15fdad,_0x461e79=hostedRequest(_0x2482da),_0x5bb08a=hostedConversationMetadataUpdateInputSchema[_0xa0620b(0x26a)](_0x461e79[_0xa0620b(0x229)]),_0x2e72e5=this[_0xa0620b(0x17e)][_0xa0620b(0x141)][_0xa0620b(0x221)](_0x461e79[_0xa0620b(0x14e)],_0x5bb08a[_0xa0620b(0x1b4)]);if(this[_0xa0620b(0x285)][_0xa0620b(0x12a)](_0x2e72e5['id']))throw new Error(_0xa0620b(0x1b5));const _0x2c22d0=this[_0xa0620b(0x26b)](),_0x2281cf=await this[_0xa0620b(0x17e)][_0xa0620b(0x141)][_0xa0620b(0x18b)](_0x2e72e5['id'],_0x3ab1a5=>({..._0x3ab1a5,'title':_0x5bb08a[_0xa0620b(0x1cc)]??_0x3ab1a5[_0xa0620b(0x1cc)],'titleSource':_0x5bb08a[_0xa0620b(0x1cc)]===undefined?_0x3ab1a5[_0xa0620b(0x26c)]:_0xa0620b(0x242),'pinnedAt':_0x5bb08a[_0xa0620b(0x268)]===undefined?_0x3ab1a5[_0xa0620b(0x17b)]:_0x5bb08a[_0xa0620b(0x268)]?_0x2c22d0:null,'updatedAt':_0x2c22d0,'lastActivityAt':_0x3ab1a5[_0xa0620b(0x11e)]}));return this[_0xa0620b(0x13d)](_0x2e72e5['id'],{'conversationId':_0x2e72e5['id'],'kind':_0xa0620b(0x184),'conversation':this[_0xa0620b(0x108)](_0x2281cf)}),{'conversation':this[_0xa0620b(0x108)](_0x2281cf)};}async[_0x15fdad(0x211)](_0x5305b0){const _0x1845d8=_0x15fdad,_0x56fdff=hostedRequest(_0x5305b0),_0x130962=hostedConversationIdInputSchema[_0x1845d8(0x26a)](_0x56fdff[_0x1845d8(0x229)]);return hostedConversationFilesSchema[_0x1845d8(0x26a)]({'files':this[_0x1845d8(0x17e)][_0x1845d8(0x141)][_0x1845d8(0x211)](_0x56fdff[_0x1845d8(0x14e)],_0x130962[_0x1845d8(0x1b4)])});}async[_0x15fdad(0x157)](_0x4e004d){const _0x5e487e=_0x15fdad,_0x50208d=hostedRequest(_0x4e004d),_0x49305b=hostedConversationFileReadInputSchema[_0x5e487e(0x26a)](_0x50208d[_0x5e487e(0x229)]),_0x2ea870=this[_0x5e487e(0x17e)][_0x5e487e(0x141)][_0x5e487e(0x1ad)](_0x50208d[_0x5e487e(0x14e)],_0x49305b[_0x5e487e(0x1b4)],_0x49305b[_0x5e487e(0x164)]),_0x151985=this[_0x5e487e(0x17e)][_0x5e487e(0x141)][_0x5e487e(0x277)](_0x50208d[_0x5e487e(0x14e)],_0x2ea870);await assertRegularFile(_0x151985,_0x2ea870[_0x5e487e(0x1b2)]);const _0x263d6c=_0x49305b[_0x5e487e(0x1d7)]??-0x2*-0x12d1+0x1*-0x1a2f+-0xb73;if(_0x263d6c>_0x2ea870[_0x5e487e(0x1b2)])throw new Error(_0x5e487e(0x284));const _0x28c6b7=Math[_0x5e487e(0x155)](_0x49305b[_0x5e487e(0x1e5)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x1b3c30=await open(_0x151985,'r');try{const _0x2d119f=Buffer[_0x5e487e(0x280)](Math[_0x5e487e(0x155)](_0x28c6b7,Math[_0x5e487e(0x14f)](-0x246b*-0x1+-0x27*-0x47+-0x2f3c,_0x2ea870[_0x5e487e(0x1b2)]-_0x263d6c))),_0x2156c9=await _0x1b3c30[_0x5e487e(0x1c0)](_0x2d119f,-0x184f+0x13f9+0x456,_0x2d119f[_0x5e487e(0x16e)],_0x263d6c),_0x33019f=_0x263d6c+_0x2156c9[_0x5e487e(0x13b)],_0x5e8f9a=_0x33019f>=_0x2ea870[_0x5e487e(0x1b2)];return hostedConversationFileReadResultSchema[_0x5e487e(0x26a)]({'file':_0x2ea870,'encoding':_0x5e487e(0x191),'content':_0x2d119f[_0x5e487e(0x218)](-0x1f3*-0x1+-0x2*0xb5a+0x14c1,_0x2156c9[_0x5e487e(0x13b)])[_0x5e487e(0x25b)](_0x5e487e(0x191)),'offset':_0x263d6c,'nextOffset':_0x5e8f9a?null:_0x33019f,'eof':_0x5e8f9a});}finally{await _0x1b3c30[_0x5e487e(0x214)]();}}async[_0x15fdad(0x24b)](_0xd7ac2c){const _0x542d3e=_0x15fdad,_0x4404ba=hostedRequest(_0xd7ac2c),_0x27245f=hostedConversationFileDeleteInputSchema[_0x542d3e(0x26a)](_0x4404ba[_0x542d3e(0x229)]);this[_0x542d3e(0x197)](_0x4404ba[_0x542d3e(0x14e)],_0x27245f[_0x542d3e(0x1b4)]);const _0x48765f=_0x27245f[_0x542d3e(0x1b4)]+'\x00'+_0x27245f[_0x542d3e(0x164)];if(this[_0x542d3e(0x14d)][_0x542d3e(0x12a)](_0x48765f))throw new Error(_0x542d3e(0x1e3));this[_0x542d3e(0x14d)][_0x542d3e(0x188)](_0x48765f);try{const _0x54a9da=await this[_0x542d3e(0x17e)][_0x542d3e(0x141)][_0x542d3e(0x24b)](_0x4404ba[_0x542d3e(0x14e)],_0x27245f[_0x542d3e(0x1b4)],_0x27245f[_0x542d3e(0x164)],this[_0x542d3e(0x26b)]()),_0x23a5d1=hostedConversationFileDeleteResultSchema[_0x542d3e(0x26a)]({'deletedFileId':_0x27245f[_0x542d3e(0x164)],'files':_0x54a9da});return this[_0x542d3e(0x13d)](_0x27245f[_0x542d3e(0x1b4)],{'conversationId':_0x27245f[_0x542d3e(0x1b4)],'kind':_0x542d3e(0x2a1),'files':_0x23a5d1[_0x542d3e(0x2a1)],'error':null}),_0x23a5d1;}finally{this[_0x542d3e(0x14d)][_0x542d3e(0x11b)](_0x48765f);}}async[_0x15fdad(0x1e0)](_0x527b84){const _0x51dced=_0x15fdad,_0xbfe2cc=hostedRequest(_0x527b84),_0x252784=hostedConversationUploadPreflightInputSchema[_0x51dced(0x26a)](_0xbfe2cc[_0x51dced(0x229)]),_0x2370d8=this[_0x51dced(0x197)](_0xbfe2cc[_0x51dced(0x14e)],_0x252784[_0x51dced(0x1b4)]),_0x4d6137=await this[_0x51dced(0x11c)](_0x2370d8[_0x51dced(0x1fe)],_0x2370d8[_0x51dced(0x13a)]),_0x28d302=this[_0x51dced(0x17e)][_0x51dced(0x141)][_0x51dced(0x215)](_0xbfe2cc[_0x51dced(0x14e)],_0x2370d8['id']),_0x1ac70c=await Promise[_0x51dced(0x1f2)](_0x252784[_0x51dced(0x2a1)][_0x51dced(0x238)](async _0x4b2e8a=>({'name':_0x4b2e8a[_0x51dced(0x255)],'status':await this[_0x51dced(0x1c3)](_0x28d302,_0x2370d8,_0x4d6137[_0x51dced(0x1c5)],_0x4b2e8a[_0x51dced(0x255)],_0x4b2e8a[_0x51dced(0x1b2)])})));return hostedConversationUploadPreflightResultSchema[_0x51dced(0x26a)]({'files':_0x1ac70c});}async[_0x15fdad(0x1f5)](_0x1c6d13){const _0x4fb860=_0x15fdad,_0x416e0b=hostedRequest(_0x1c6d13),_0x30032b=hostedConversationUploadCreateInputSchema[_0x4fb860(0x26a)](_0x416e0b[_0x4fb860(0x229)]),_0x139e20=this[_0x4fb860(0x197)](_0x416e0b[_0x4fb860(0x14e)],_0x30032b[_0x4fb860(0x1b4)]),_0x2513aa=_0x416e0b[_0x4fb860(0x14e)]+'\x00'+_0x139e20['id']+'\x00'+_0x30032b[_0x4fb860(0x1f3)],_0x5e8bce=this[_0x4fb860(0x204)][_0x4fb860(0x28d)](_0x2513aa);if(_0x5e8bce!==undefined){const _0x3b449e=this[_0x4fb860(0x15c)][_0x4fb860(0x28d)](_0x5e8bce);if(_0x3b449e!==undefined)return{'upload':hostedConversationUploadSchema[_0x4fb860(0x26a)](uploadProjection(_0x3b449e))};}const _0xf8edf9=await this[_0x4fb860(0x11c)](_0x139e20[_0x4fb860(0x1fe)],_0x139e20[_0x4fb860(0x13a)]),_0x56d7ce=this[_0x4fb860(0x17e)][_0x4fb860(0x141)][_0x4fb860(0x215)](_0x416e0b[_0x4fb860(0x14e)],_0x139e20['id']),_0x25bf7a=await this[_0x4fb860(0x1c3)](_0x56d7ce,_0x139e20,_0xf8edf9[_0x4fb860(0x1c5)],_0x30032b[_0x4fb860(0x255)],_0x30032b[_0x4fb860(0x1b2)]);if(_0x25bf7a===_0x4fb860(0x15f)||_0x25bf7a===_0x4fb860(0x17d))throw new Error(_0x4fb860(0x1a6));if(_0x25bf7a!==_0x4fb860(0x22f))throw new Error(_0x4fb860(0x138));const _0x4a1b30=this['id'](),_0x356695=join(_0x56d7ce[_0x4fb860(0x1ed)],'.'+_0x4a1b30+_0x4fb860(0x10f)),_0x4be7cb=join(_0x56d7ce[_0x4fb860(0x1ed)],_0x30032b[_0x4fb860(0x255)]),_0x332944=await open(_0x356695,'wx',-0x1fa3+0x1b80+0x5a3);await _0x332944[_0x4fb860(0x214)]();const _0x31c6eb={'uploadId':_0x4a1b30,'conversationId':_0x139e20['id'],'userId':_0x416e0b[_0x4fb860(0x14e)],'clientRequestId':_0x30032b[_0x4fb860(0x1f3)],'name':_0x30032b[_0x4fb860(0x255)],'mimeType':_0x30032b[_0x4fb860(0x28b)],'size':_0x30032b[_0x4fb860(0x1b2)],'temporaryPath':_0x356695,'targetPath':_0x4be7cb,'receivedBytes':0x0,'status':_0x4fb860(0x171)};return this[_0x4fb860(0x15c)][_0x4fb860(0x1a1)](_0x4a1b30,_0x31c6eb),this[_0x4fb860(0x204)][_0x4fb860(0x1a1)](_0x2513aa,_0x4a1b30),{'upload':hostedConversationUploadSchema[_0x4fb860(0x26a)](uploadProjection(_0x31c6eb))};}async[_0x15fdad(0x260)](_0x1ca217){const _0x270518=_0x15fdad,_0x23ee6f=hostedRequest(_0x1ca217),_0x523c6e=hostedConversationUploadChunkInputSchema[_0x270518(0x26a)](_0x23ee6f[_0x270518(0x229)]),_0x183009=this[_0x270518(0x241)](_0x23ee6f[_0x270518(0x14e)],_0x523c6e[_0x270518(0x1b4)],_0x523c6e[_0x270518(0x152)]);if(_0x183009[_0x270518(0x115)]!==_0x270518(0x171))throw new Error(_0x270518(0x273));if(_0x523c6e[_0x270518(0x1d7)]!==_0x183009[_0x270518(0x190)])throw new Error(_0x270518(0x1a5));const _0xa5d20a=Buffer[_0x270518(0x245)](_0x523c6e[_0x270518(0x290)],_0x270518(0x191));if(_0x183009[_0x270518(0x190)]+_0xa5d20a[_0x270518(0x1d2)]>_0x183009[_0x270518(0x1b2)])throw new Error(_0x270518(0x205));await assertUploadTemporaryFile(_0x183009[_0x270518(0x144)],_0x183009[_0x270518(0x190)]);const _0x448588=await open(_0x183009[_0x270518(0x144)],'r+');try{await _0x448588[_0x270518(0x147)](_0xa5d20a,0x84c+0x25*0xa0+-0x1f6c,_0xa5d20a[_0x270518(0x1d2)],_0x183009[_0x270518(0x190)]);}finally{await _0x448588[_0x270518(0x214)]();}return _0x183009[_0x270518(0x190)]+=_0xa5d20a[_0x270518(0x1d2)],{'upload':hostedConversationUploadSchema[_0x270518(0x26a)](uploadProjection(_0x183009))};}[_0x15fdad(0x187)](_0x25ff1a){const _0x1c85c8=_0x15fdad,_0x23e812=hostedRequest(_0x25ff1a),_0x2944b8=hostedConversationUploadControlInputSchema[_0x1c85c8(0x26a)](_0x23e812[_0x1c85c8(0x229)]),_0x4ed428=this[_0x1c85c8(0x241)](_0x23e812[_0x1c85c8(0x14e)],_0x2944b8[_0x1c85c8(0x1b4)],_0x2944b8[_0x1c85c8(0x152)]);return{'upload':hostedConversationUploadSchema[_0x1c85c8(0x26a)](uploadProjection(_0x4ed428))};}async[_0x15fdad(0x1eb)](_0x10eaf8){const _0x54ce79=_0x15fdad,_0x3a6991=hostedRequest(_0x10eaf8),_0x1b1be8=hostedConversationUploadControlInputSchema[_0x54ce79(0x26a)](_0x3a6991[_0x54ce79(0x229)]),_0x5e1cac=this[_0x54ce79(0x241)](_0x3a6991[_0x54ce79(0x14e)],_0x1b1be8[_0x54ce79(0x1b4)],_0x1b1be8[_0x54ce79(0x152)]);if(_0x5e1cac[_0x54ce79(0x115)]===_0x54ce79(0x1a8))return{'upload':hostedConversationUploadSchema[_0x54ce79(0x26a)](uploadProjection(_0x5e1cac))};if(_0x5e1cac[_0x54ce79(0x115)]!==_0x54ce79(0x171)||_0x5e1cac[_0x54ce79(0x190)]!==_0x5e1cac[_0x54ce79(0x1b2)])throw new Error(_0x54ce79(0x10d));const _0x388a3d=this[_0x54ce79(0x197)](_0x3a6991[_0x54ce79(0x14e)],_0x5e1cac[_0x54ce79(0x1b4)]),_0x53b11b=await this[_0x54ce79(0x11c)](_0x388a3d[_0x54ce79(0x1fe)],_0x388a3d[_0x54ce79(0x13a)]);if(_0x5e1cac[_0x54ce79(0x1b2)]>_0x53b11b[_0x54ce79(0x1c5)][_0x54ce79(0x112)][_0x54ce79(0x258)]||_0x388a3d[_0x54ce79(0x25a)][_0x54ce79(0x161)]+_0x5e1cac[_0x54ce79(0x1b2)]>_0x388a3d[_0x54ce79(0x25a)][_0x54ce79(0x18a)])throw new Error(_0x54ce79(0x1a6));await assertUploadTemporaryFile(_0x5e1cac[_0x54ce79(0x144)],_0x5e1cac[_0x54ce79(0x1b2)]);const _0x3c528d=await lstat(_0x5e1cac[_0x54ce79(0x235)])[_0x54ce79(0x100)](_0x413c87=>{const _0x48d02f=_0x54ce79;if(_0x413c87[_0x48d02f(0x145)]===_0x48d02f(0x18d))return undefined;throw _0x413c87;});if(_0x3c528d!==undefined)throw new Error(_0x54ce79(0x138));const _0x2dc5cf=await open(_0x5e1cac[_0x54ce79(0x144)],'r+');try{await _0x2dc5cf[_0x54ce79(0x110)]();}finally{await _0x2dc5cf[_0x54ce79(0x214)]();}await rename(_0x5e1cac[_0x54ce79(0x144)],_0x5e1cac[_0x54ce79(0x235)]);const _0x13d081=this[_0x54ce79(0x26b)]();try{await utimes(_0x5e1cac[_0x54ce79(0x235)],new Date(_0x13d081),new Date(_0x13d081));const _0x4ab754={'id':this[_0x54ce79(0x17e)][_0x54ce79(0x141)][_0x54ce79(0x113)](_0x5e1cac[_0x54ce79(0x1b4)],_0x54ce79(0x18e),_0x5e1cac[_0x54ce79(0x255)]),'conversationId':_0x5e1cac[_0x54ce79(0x1b4)],'category':_0x54ce79(0x18e),'relativePath':_0x5e1cac[_0x54ce79(0x255)],'displayName':_0x5e1cac[_0x54ce79(0x255)],'mimeType':_0x5e1cac[_0x54ce79(0x28b)],'size':_0x5e1cac[_0x54ce79(0x1b2)],'source':_0x54ce79(0x296),'createdAt':_0x13d081,'updatedAt':_0x13d081};return _0x5e1cac[_0x54ce79(0x27b)]=await this[_0x54ce79(0x17e)][_0x54ce79(0x141)][_0x54ce79(0x249)](_0x3a6991[_0x54ce79(0x14e)],_0x4ab754),_0x5e1cac[_0x54ce79(0x115)]=_0x54ce79(0x1a8),this[_0x54ce79(0x13d)](_0x5e1cac[_0x54ce79(0x1b4)],{'conversationId':_0x5e1cac[_0x54ce79(0x1b4)],'kind':_0x54ce79(0x2a1),'files':this[_0x54ce79(0x17e)][_0x54ce79(0x141)][_0x54ce79(0x211)](_0x3a6991[_0x54ce79(0x14e)],_0x5e1cac[_0x54ce79(0x1b4)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x54ce79(0x26a)](uploadProjection(_0x5e1cac))};}catch(_0xd69ff6){await rename(_0x5e1cac[_0x54ce79(0x235)],_0x5e1cac[_0x54ce79(0x144)])[_0x54ce79(0x100)](()=>undefined);throw _0xd69ff6;}}async[_0x15fdad(0xfc)](_0x322061){const _0x2756b5=_0x15fdad,_0xc0eb8a=hostedRequest(_0x322061),_0x1808e7=hostedConversationUploadControlInputSchema[_0x2756b5(0x26a)](_0xc0eb8a[_0x2756b5(0x229)]),_0x136f49=this[_0x2756b5(0x241)](_0xc0eb8a[_0x2756b5(0x14e)],_0x1808e7[_0x2756b5(0x1b4)],_0x1808e7[_0x2756b5(0x152)]);if(_0x136f49[_0x2756b5(0x115)]===_0x2756b5(0x1a8))throw new Error(_0x2756b5(0x273));return _0x136f49[_0x2756b5(0x115)]=_0x2756b5(0x24f),await rm(_0x136f49[_0x2756b5(0x144)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x2756b5(0x26a)](uploadProjection(_0x136f49))};}async[_0x15fdad(0x11b)](_0x2cfafc){const _0x3313c5=_0x15fdad,_0x2ddab9=hostedRequest(_0x2cfafc),_0xdc00b0=hostedConversationIdInputSchema[_0x3313c5(0x26a)](_0x2ddab9[_0x3313c5(0x229)]),_0x2f7600=this[_0x3313c5(0x17e)][_0x3313c5(0x141)][_0x3313c5(0x221)](_0x2ddab9[_0x3313c5(0x14e)],_0xdc00b0[_0x3313c5(0x1b4)]);if(this[_0x3313c5(0x285)][_0x3313c5(0x12a)](_0x2f7600['id']))throw new Error(_0x3313c5(0x1b5));this[_0x3313c5(0x285)][_0x3313c5(0x188)](_0x2f7600['id']);try{await this[_0x3313c5(0x1d8)](_0x2f7600['id']);const _0x36155a=this[_0x3313c5(0x146)][_0x3313c5(0x28d)](_0x2f7600['id']);if(_0x36155a!==undefined){const _0x3f8fd7=runInterruptionKey(_0x2f7600['id'],_0x36155a[_0x3313c5(0x168)]['id']);this[_0x3313c5(0x272)][_0x3313c5(0x188)](_0x3f8fd7);if(!_0x36155a[_0x3313c5(0x1dc)]())this[_0x3313c5(0x272)][_0x3313c5(0x11b)](_0x3f8fd7);}await this[_0x3313c5(0x194)](_0x2ddab9[_0x3313c5(0x14e)],_0x2f7600['id']);const _0x5ad754=this[_0x3313c5(0x17e)][_0x3313c5(0x141)][_0x3313c5(0x215)](_0x2ddab9[_0x3313c5(0x14e)],_0x2f7600['id']);return await this[_0x3313c5(0x17e)][_0x3313c5(0x133)][_0x3313c5(0x26e)]({'conversationId':_0x2f7600['id'],'sessionId':_0x2f7600[_0x3313c5(0x269)],'homeDirectory':_0x5ad754[_0x3313c5(0x154)]})[_0x3313c5(0x100)](()=>undefined),await this[_0x3313c5(0x139)][_0x3313c5(0x28d)](_0x2f7600['id'])?.[_0x3313c5(0x100)](()=>undefined),this[_0x3313c5(0x21b)](_0x2f7600['id']),await this[_0x3313c5(0x17e)][_0x3313c5(0x141)][_0x3313c5(0x1b9)](_0x2f7600['id']),this[_0x3313c5(0x1e8)][_0x3313c5(0x11b)](_0x2f7600['id']),hostedConversationDeleteResultSchema[_0x3313c5(0x26a)]({'deletedConversationId':_0x2f7600['id']});}finally{this[_0x3313c5(0x285)][_0x3313c5(0x11b)](_0x2f7600['id']);}}async[_0x15fdad(0x1d8)](_0x5274dd){const _0x155eb3=_0x15fdad,_0x55ddb7=_0x5274dd+'\x00',_0x28b9e1=[...this[_0x155eb3(0x233)][_0x155eb3(0x1cd)]()][_0x155eb3(0x20f)](([_0x42b746])=>_0x42b746[_0x155eb3(0x27e)](_0x55ddb7))[_0x155eb3(0x238)](([,_0x33345f])=>_0x33345f);await Promise[_0x155eb3(0x20d)](_0x28b9e1);}async[_0x15fdad(0x24e)](_0x16c8aa){const _0x5c1c11=_0x15fdad;try{const _0x494ced=await this[_0x5c1c11(0x28d)]({'conversationId':_0x16c8aa[_0x5c1c11(0x1b4)],'__requestUserId':_0x16c8aa[_0x5c1c11(0x14e)],'__marAgentModels':_0x16c8aa[_0x5c1c11(0x244)]});if(this[_0x5c1c11(0x118)][_0x5c1c11(0x28d)](_0x16c8aa[_0x5c1c11(0x137)])!==_0x16c8aa)return;this[_0x5c1c11(0x17e)][_0x5c1c11(0x183)]?.({'type':_0x5c1c11(0x192),'workbenchConnectionId':_0x16c8aa[_0x5c1c11(0x15d)],'watchId':_0x16c8aa[_0x5c1c11(0x1f9)],'nodeGeneration':_0x16c8aa[_0x5c1c11(0x209)],'nodeId':this[_0x5c1c11(0x17e)][_0x5c1c11(0x158)](),'conversationId':_0x16c8aa[_0x5c1c11(0x1b4)],'revision':0x1,'snapshotSequence':++this[_0x5c1c11(0x121)],'expiresAt':_0x16c8aa[_0x5c1c11(0x105)],'payload':_0x494ced}),_0x16c8aa[_0x5c1c11(0x28f)]=!![];for(const _0x5157c6 of _0x16c8aa[_0x5c1c11(0x24c)])this[_0x5c1c11(0x14b)](_0x16c8aa,_0x5157c6);_0x16c8aa[_0x5c1c11(0x24c)][_0x5c1c11(0x16e)]=0x1*0x26ed+-0x1e7a+-0x873;}catch(_0x576f3a){if(this[_0x5c1c11(0x118)][_0x5c1c11(0x28d)](_0x16c8aa[_0x5c1c11(0x137)])!==_0x16c8aa)return;this[_0x5c1c11(0x17e)][_0x5c1c11(0x183)]?.({'type':_0x5c1c11(0x283),'workbenchConnectionId':_0x16c8aa[_0x5c1c11(0x15d)],'watchType':_0x5c1c11(0x1bf),'watchId':_0x16c8aa[_0x5c1c11(0x1f9)],'nodeGeneration':_0x16c8aa[_0x5c1c11(0x209)],'nodeId':this[_0x5c1c11(0x17e)][_0x5c1c11(0x158)](),'conversationId':_0x16c8aa[_0x5c1c11(0x1b4)],'code':safeErrorCode(_0x576f3a,_0x5c1c11(0x1f4)),'message':_0x5c1c11(0x12e)}),this[_0x5c1c11(0x163)](_0x16c8aa[_0x5c1c11(0x137)]);}}[_0x15fdad(0xfb)](_0x20cf1a){const _0x2a6a20=_0x15fdad;return this[_0x2a6a20(0x1e8)][_0x2a6a20(0x28d)](_0x20cf1a)??{'status':_0x2a6a20(0x29d),'version':0x0,'updatedAt':0x0};}[_0x15fdad(0x108)](_0xb5c8bd){const _0x5355b9=_0x15fdad;return hostedConversationSummary(_0xb5c8bd,this[_0x5355b9(0xfb)](_0xb5c8bd['id']));}[_0x15fdad(0x275)](_0x24fbf2,_0x4ce01d,_0x75deb8,_0x1dbb8f){const _0x3abc74=_0x15fdad,_0x3896c3=this[_0x3abc74(0xfb)](_0x4ce01d['id']),_0x8c67df={'status':_0x75deb8,'version':_0x3896c3[_0x3abc74(0x1c7)]+(-0x68*0x8+0xf5e+-0xc1d*0x1),'updatedAt':_0x1dbb8f};this[_0x3abc74(0x1e8)][_0x3abc74(0x1a1)](_0x4ce01d['id'],_0x8c67df),this[_0x3abc74(0x27c)]({'kind':_0x3abc74(0xfb),'userId':_0x24fbf2,'templateId':_0x4ce01d[_0x3abc74(0x13a)],'conversationId':_0x4ce01d['id'],'activity':_0x8c67df});}[_0x15fdad(0x123)](_0x13e654,_0x55d694,_0xe5eaf3,_0x1cfb43){const _0xa57a58=_0x15fdad;this[_0xa57a58(0x27c)]({'kind':_0xa57a58(0x1ae),'event':{'runId':_0xe5eaf3,'sequence':0x1,'eventType':_0xa57a58(0x1ae),'payload':{'targetType':_0xa57a58(0x12b),'userId':_0x13e654,'templateId':_0x55d694[_0xa57a58(0x13a)],'conversationId':_0x55d694['id'],'conversationTitle':_0x55d694[_0xa57a58(0x1cc)],'runId':_0xe5eaf3,'notificationId':_0xa57a58(0x262)+this[_0xa57a58(0x17e)][_0xa57a58(0x158)]()+':'+_0x55d694['id']+':'+_0xe5eaf3,'kind':_0xa57a58(0x231),'outcome':_0x1cfb43[_0xa57a58(0x115)],'occurredAt':_0x1cfb43[_0xa57a58(0x295)]},'createdAt':_0x1cfb43[_0xa57a58(0x295)]}});}[_0x15fdad(0x27c)](_0x1d8fb4){const _0x1ddf8e=_0x15fdad,_0x1cb019=this[_0x1ddf8e(0x17e)][_0x1ddf8e(0x27d)]?.(_0x1d8fb4)??{'sequence':++this[_0x1ddf8e(0x125)],'category':_0x1ddf8e(0x1bf),'payload':_0x1d8fb4};if(_0x1cb019!==undefined)this[_0x1ddf8e(0x17e)][_0x1ddf8e(0x1b3)]?.(_0x1cb019);}[_0x15fdad(0x189)](_0xb45edc,_0x5d043f,_0x3b5327,_0x3b4a77){const _0x590b26=_0x15fdad;this[_0x590b26(0x13d)](_0xb45edc['id'],{'conversationId':_0xb45edc['id'],'kind':_0x590b26(0x289),'upgrade':{'status':_0x590b26(0x27f),'previousVersionId':_0x5d043f,'targetVersionId':_0x3b5327,'activeVersionId':_0xb45edc[_0x590b26(0x1fe)],'conversation':this[_0x590b26(0x108)](_0xb45edc),'error':{'code':safeErrorCode(_0x3b4a77,_0x590b26(0xf8)),'message':_0x590b26(0x29e)}}});}[_0x15fdad(0x13d)](_0x348334,_0x4a1e3e){const _0x2865dd=_0x15fdad,_0x27fe89=[...this[_0x2865dd(0x118)][_0x2865dd(0x13f)]()][_0x2865dd(0x20f)](_0x3139f2=>_0x3139f2[_0x2865dd(0x1b4)]===_0x348334);if(_0x27fe89[_0x2865dd(0x16e)]===-0x2*0x116+-0x2*0x14+0x254)return![];const _0x4f0462=this[_0x2865dd(0x17e)][_0x2865dd(0x27d)]?.(_0x4a1e3e)??{'sequence':++this[_0x2865dd(0x125)],'category':_0x2865dd(0x1bf),'payload':_0x4a1e3e};if(_0x4f0462===undefined)return![];for(const _0x51c5c6 of _0x27fe89){if(!_0x51c5c6[_0x2865dd(0x28f)])_0x51c5c6[_0x2865dd(0x24c)][_0x2865dd(0x24d)](_0x4f0462);else this[_0x2865dd(0x14b)](_0x51c5c6,_0x4f0462);}return!![];}[_0x15fdad(0x14b)](_0x40e499,_0x511bee){const _0x3b6e50=_0x15fdad;this[_0x3b6e50(0x17e)][_0x3b6e50(0x183)]?.({'type':_0x3b6e50(0x20e),'workbenchConnectionId':_0x40e499[_0x3b6e50(0x15d)],'watchId':_0x40e499[_0x3b6e50(0x1f9)],'nodeGeneration':_0x40e499[_0x3b6e50(0x209)],'nodeId':this[_0x3b6e50(0x17e)][_0x3b6e50(0x158)](),'conversationId':_0x40e499[_0x3b6e50(0x1b4)],'expiresAt':_0x40e499[_0x3b6e50(0x105)],'event':_0x511bee});}[_0x15fdad(0x1a7)](_0x1e05be){const _0x31054b=_0x15fdad;return{'accepted':!![],'watchId':_0x1e05be[_0x31054b(0x1f9)],'nodeGeneration':_0x1e05be[_0x31054b(0x209)],'expiresAt':_0x1e05be[_0x31054b(0x105)]};}[_0x15fdad(0x21b)](_0x594216){const _0x3d67d2=_0x15fdad;for(const _0x3e821d of[...this[_0x3d67d2(0x118)][_0x3d67d2(0x13f)]()])if(_0x3e821d[_0x3d67d2(0x1b4)]===_0x594216)this[_0x3d67d2(0x163)](_0x3e821d[_0x3d67d2(0x137)]);}[_0x15fdad(0x163)](_0x479124){const _0x3888a3=_0x15fdad,_0x5073f5=this[_0x3888a3(0x118)][_0x3888a3(0x28d)](_0x479124);if(_0x5073f5===undefined)return;clearTimeout(_0x5073f5[_0x3888a3(0x130)]),this[_0x3888a3(0x118)][_0x3888a3(0x11b)](_0x479124),this[_0x3888a3(0x1e4)][_0x3888a3(0x232)](_0x479124,_0x5073f5[_0x3888a3(0x166)]);}[_0x15fdad(0x13c)](_0x687ec){const _0x5dae02=_0x15fdad,_0x48191a=setTimeout(()=>this[_0x5dae02(0x163)](_0x687ec),WATCH_TTL_MS);return _0x48191a[_0x5dae02(0x291)](),_0x48191a;}[_0x15fdad(0x197)](_0x4b73d1,_0x200e92){const _0x393700=_0x15fdad,_0x3268e4=this[_0x393700(0x17e)][_0x393700(0x141)][_0x393700(0x221)](_0x4b73d1,_0x200e92);if(this[_0x393700(0x285)][_0x393700(0x12a)](_0x3268e4['id']))throw new Error(_0x393700(0x1b5));if(_0x3268e4[_0x393700(0x115)]!==_0x393700(0x173))throw new Error(_0x393700(0x1b5));return _0x3268e4;}[_0x15fdad(0x241)](_0x24bdd1,_0x4a4415,_0x1db70){const _0x43eff2=_0x15fdad;this[_0x43eff2(0x17e)][_0x43eff2(0x141)][_0x43eff2(0x221)](_0x24bdd1,_0x4a4415);const _0x255ab2=this[_0x43eff2(0x15c)][_0x43eff2(0x28d)](_0x1db70);if(_0x255ab2===undefined||_0x255ab2[_0x43eff2(0x14e)]!==_0x24bdd1||_0x255ab2[_0x43eff2(0x1b4)]!==_0x4a4415)throw new Error(_0x43eff2(0x12d));return _0x255ab2;}async[_0x15fdad(0x194)](_0x1e503f,_0x397135){const _0x3ec161=_0x15fdad;for(const _0x4e0271 of this[_0x3ec161(0x15c)][_0x3ec161(0x13f)]()){if(_0x4e0271[_0x3ec161(0x14e)]!==_0x1e503f||_0x4e0271[_0x3ec161(0x1b4)]!==_0x397135)continue;_0x4e0271[_0x3ec161(0x115)]===_0x3ec161(0x171)&&(_0x4e0271[_0x3ec161(0x115)]=_0x3ec161(0x24f),await rm(_0x4e0271[_0x3ec161(0x144)],{'force':!![]})[_0x3ec161(0x100)](()=>undefined));}}async[_0x15fdad(0x286)](_0x2df9fe,_0x107c1b,_0x42ca73){const _0xfc0ce6=_0x15fdad,_0x1ae711=this[_0xfc0ce6(0x17e)][_0xfc0ce6(0x141)][_0xfc0ce6(0x1ad)](_0x2df9fe,_0x107c1b,_0x42ca73);if(_0x1ae711[_0xfc0ce6(0x265)]!==_0xfc0ce6(0x18e))throw new Error(_0xfc0ce6(0x1fc));return await assertRegularFile(this[_0xfc0ce6(0x17e)][_0xfc0ce6(0x141)][_0xfc0ce6(0x277)](_0x2df9fe,_0x1ae711),_0x1ae711[_0xfc0ce6(0x1b2)]),_0x1ae711;}async[_0x15fdad(0x1c3)](_0x4bae1c,_0x4071dd,_0x4d707e,_0x84bde3,_0xea5230){const _0x1e84f2=_0x15fdad;if(_0xea5230>_0x4d707e[_0x1e84f2(0x112)][_0x1e84f2(0x258)])return _0x1e84f2(0x17d);if(_0x4071dd[_0x1e84f2(0x25a)][_0x1e84f2(0x161)]+_0xea5230>_0x4071dd[_0x1e84f2(0x25a)][_0x1e84f2(0x18a)])return _0x1e84f2(0x15f);const _0x5b3626=await lstat(join(_0x4bae1c[_0x1e84f2(0x1ed)],_0x84bde3))[_0x1e84f2(0x100)](_0x4adc5e=>{const _0x5dc039=_0x1e84f2;if(_0x4adc5e[_0x5dc039(0x145)]===_0x5dc039(0x18d))return undefined;throw _0x4adc5e;});return _0x5b3626===undefined?_0x1e84f2(0x22f):_0x1e84f2(0x13e);}[_0x15fdad(0x151)](_0x27ae6f,_0xfd492f){const _0x4ad17d=_0x15fdad,_0x166b7=[{'logicalPath':_0x4ad17d(0x1bc),'physicalPath':_0xfd492f[_0x4ad17d(0x175)],'writable':![]},{'logicalPath':_0x4ad17d(0x247),'physicalPath':_0x27ae6f[_0x4ad17d(0x1ed)],'writable':!![]},{'logicalPath':_0x4ad17d(0x28c),'physicalPath':_0x27ae6f[_0x4ad17d(0x1b7)],'writable':!![]}];if(_0xfd492f[_0x4ad17d(0x23a)]!==undefined)_0x166b7[_0x4ad17d(0x24d)]({'logicalPath':_0xfd492f[_0x4ad17d(0x23a)],'physicalPath':_0xfd492f[_0x4ad17d(0x175)],'writable':![]},{'logicalPath':join(_0xfd492f[_0x4ad17d(0x23a)],_0x4ad17d(0x1cf)),'physicalPath':_0x27ae6f[_0x4ad17d(0x1ed)],'writable':!![]},{'logicalPath':join(_0xfd492f[_0x4ad17d(0x23a)],_0x4ad17d(0x27a)),'physicalPath':_0x27ae6f[_0x4ad17d(0x1b7)],'writable':!![]});return _0x166b7;}[_0x15fdad(0x1f7)](_0x506b58,_0x367ca6,_0x73c979=_0x506b58[_0x15fdad(0x1c4)]){const _0x53086c=_0x15fdad;return this[_0x53086c(0x17e)][_0x53086c(0x1f6)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x367ca6[_0x53086c(0x175)],..._0x367ca6[_0x53086c(0x23a)]===undefined?{}:{'sourceWorkspacePath':_0x367ca6[_0x53086c(0x23a)]},'inboxDirectory':_0x506b58[_0x53086c(0x1ed)],'outputDirectory':_0x506b58[_0x53086c(0x1b7)],'temporaryDirectory':_0x73c979,'networkMode':_0x367ca6[_0x53086c(0x1c5)][_0x53086c(0x1a4)]});}[_0x15fdad(0x23d)](_0x2cf5b3){const _0x459658=_0x15fdad,_0x3bff30=this[_0x459658(0x17e)][_0x459658(0x1f8)][_0x459658(0x1c6)][_0x459658(0x127)](_0x459658(0xfd))[_0x459658(0x28d)](_0x2cf5b3);if(_0x3bff30===undefined)return undefined;if(typeof _0x3bff30['id']!==_0x459658(0x19a))throw new Error(_0x459658(0x135));return _0x3bff30['id'];}async[_0x15fdad(0x11c)](_0x1e86ef,_0x359366,_0xea6a0e=![]){const _0x4f1d08=_0x15fdad,_0x8ed56=this[_0x4f1d08(0x17e)][_0x4f1d08(0x1f8)][_0x4f1d08(0x1c6)][_0x4f1d08(0x127)](_0x4f1d08(0x1c1))[_0x4f1d08(0x28d)](_0x1e86ef,_0x359366);if(_0x8ed56===undefined||_0x8ed56[_0x4f1d08(0x115)]!==_0x4f1d08(0x1bb)&&_0x8ed56[_0x4f1d08(0x115)]!==_0x4f1d08(0x109)||_0x8ed56[_0x4f1d08(0x180)]!==HOST_POLICY_VERSION||typeof _0x8ed56[_0x4f1d08(0x153)]!==_0x4f1d08(0x19a)||typeof _0x8ed56[_0x4f1d08(0x239)]!==_0x4f1d08(0x19a)||typeof _0x8ed56[_0x4f1d08(0x1c2)]!==_0x4f1d08(0x19a)||typeof _0x8ed56[_0x4f1d08(0x225)]!==_0x4f1d08(0x19a)||typeof _0x8ed56[_0x4f1d08(0xfa)]!==_0x4f1d08(0x19a))throw new Error(_0x4f1d08(0x135));const _0x3cb3a1=this[_0x4f1d08(0x17e)][_0x4f1d08(0x141)][_0x4f1d08(0x1ba)](_0x8ed56[_0x4f1d08(0x153)]),_0x149dab=join(_0x3cb3a1,_0x4f1d08(0x206)),_0x4e43dc=join(_0x3cb3a1,_0x4f1d08(0x271)),_0x357099=await lstat(_0x149dab)[_0x4f1d08(0x100)](()=>undefined),_0x1d80c6=await lstat(_0x4e43dc)[_0x4f1d08(0x100)](()=>undefined);if(_0x357099===undefined||!_0x357099[_0x4f1d08(0x200)]()||_0x357099[_0x4f1d08(0x267)]()||_0x1d80c6===undefined||!_0x1d80c6[_0x4f1d08(0x299)]()||_0x1d80c6[_0x4f1d08(0x267)]())throw new Error(_0x4f1d08(0x135));let _0x37ea78;try{const _0x157335=await readFile(_0x149dab,_0x4f1d08(0x2a3)),_0x434136=_0x157335[_0x4f1d08(0x114)]('\x0a')?_0x157335[_0x4f1d08(0x29c)](-0x1af3*-0x1+-0x2f*0xc7+0x996,-(0xc7+-0x9e*0x13+-0x4*-0x2bd)):_0x157335;if(_0x434136!==_0x8ed56[_0x4f1d08(0x239)]||createHash(_0x4f1d08(0x288))[_0x4f1d08(0x281)](_0x434136)[_0x4f1d08(0x278)](_0x4f1d08(0x177))!==_0x8ed56[_0x4f1d08(0x225)])throw new Error(_0x4f1d08(0x135));_0x37ea78=JSON[_0x4f1d08(0x26a)](_0x434136);}catch{throw new Error(_0x4f1d08(0x135));}if(!record(_0x37ea78))throw new Error(_0x4f1d08(0x135));const _0x2c64a9=publishedTemplateSnapshot(_0x37ea78),_0x83e899=publishedTemplateDraft(_0x2c64a9[_0x4f1d08(0x219)],_0x37ea78[_0x4f1d08(0x1c5)]),_0x53a0f2=_0x83e899[_0x4f1d08(0x1c5)],_0x3319fe=publishedMcpServers(_0x37ea78[_0x4f1d08(0x17f)]),_0x32722d=publishedTemplateContentHash(_0x2c64a9[_0x4f1d08(0x216)],_0x2c64a9[_0x4f1d08(0x1cd)],_0x2c64a9[_0x4f1d08(0x219)]),_0x573122=_0x2c64a9[_0x4f1d08(0x1cd)][_0x4f1d08(0x240)]((_0x18c37a,_0x3aa331)=>_0x18c37a+_0x3aa331[_0x4f1d08(0x1b2)],0x186+-0x1a*-0xaa+0x1e1*-0xa);if(_0x37ea78[_0x4f1d08(0x287)]!==_0x8ed56[_0x4f1d08(0xfa)]||createHash(_0x4f1d08(0x288))[_0x4f1d08(0x281)](JSON[_0x4f1d08(0x11f)](_0x3319fe))[_0x4f1d08(0x278)](_0x4f1d08(0x177))!==_0x8ed56[_0x4f1d08(0xfa)]||_0x37ea78[_0x4f1d08(0x22c)]!==_0x8ed56[_0x4f1d08(0x1c2)]||_0x32722d!==_0x8ed56[_0x4f1d08(0x1c2)]||_0x8ed56[_0x4f1d08(0x1a2)]!==_0x2c64a9[_0x4f1d08(0x1cd)][_0x4f1d08(0x16e)]||_0x8ed56[_0x4f1d08(0x1ec)]!==_0x573122)throw new Error(_0x4f1d08(0x135));if(_0x37ea78[_0x4f1d08(0x156)]!==_0x1e86ef||_0x37ea78[_0x4f1d08(0x13a)]!==_0x359366||_0x37ea78[_0x4f1d08(0x143)]!==HOST_POLICY_VERSION||_0x53a0f2[_0x4f1d08(0x13a)]!==_0x359366||_0x53a0f2[_0x4f1d08(0x158)]!==this[_0x4f1d08(0x17e)][_0x4f1d08(0x158)]())throw new Error(_0x4f1d08(0x135));if(_0xea6a0e)await verifyPublishedTemplateContent(_0x4e43dc,_0x2c64a9[_0x4f1d08(0x216)],_0x2c64a9[_0x4f1d08(0x1cd)]);return{'id':_0x1e86ef,'templateId':_0x359366,'storageKey':_0x8ed56[_0x4f1d08(0x153)],'templateDirectory':_0x4e43dc,..._0x2c64a9[_0x4f1d08(0x23a)]===undefined?{}:{'sourceWorkspacePath':_0x2c64a9[_0x4f1d08(0x23a)]},'draft':_0x53a0f2,'modelPolicy':_0x83e899[_0x4f1d08(0x251)],'mcpServers':_0x3319fe};}}function hostedRequest(_0x3ba81f){const _0x288da5=_0x15fdad;if(!record(_0x3ba81f))throw new Error(_0x288da5(0x237));const {__requestUserId:_0x44bb7c,__template:_0x4b40d7,__marAgentModel:_0x4ac0b5,__marAgentModels:_0x5957df,__marAgentRuntimeScopeId:_0x50ce77,__workspaceWatchSessionHash:_0xa6fee7,__templateDeleted:_0x204a92,..._0x5d1e3c}=_0x3ba81f;if(typeof _0x44bb7c!==_0x288da5(0x150)||!Number[_0x288da5(0x126)](_0x44bb7c)||_0x44bb7c<=-0x131*-0x18+-0x1*-0x1b05+-0x379d)throw new Error(_0x288da5(0x237));if(_0x204a92!==undefined&&_0x204a92!==!![])throw new Error(_0x288da5(0x237));if(_0x50ce77!==undefined&&(typeof _0x50ce77!==_0x288da5(0x19a)||_0x50ce77[_0x288da5(0x16e)]===-0xf6*-0x1+-0xa11+-0x15*-0x6f))throw new Error(_0x288da5(0x237));return{'data':_0x5d1e3c,'userId':_0x44bb7c,..._0x4b40d7===undefined?{}:{'template':_0x4b40d7},..._0x4ac0b5===undefined?{}:{'model':_0x4ac0b5},..._0x5957df===undefined?{}:{'models':_0x5957df},..._0x50ce77===undefined?{}:{'runtimeScopeId':_0x50ce77},..._0xa6fee7===undefined?{}:{'sessionHash':_0xa6fee7},..._0x204a92===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x1ec989){const _0xaebce0=_0x15fdad;if(typeof _0x1ec989!==_0xaebce0(0x19a)||_0x1ec989[_0xaebce0(0x16e)]===-0x5*-0x1ba+0x25b4+-0x2e56*0x1)throw new Error(_0xaebce0(0x237));return _0x1ec989;}function watchOwnerKey(_0x44b337,_0x15b201){return _0x44b337+':'+_0x15b201;}function runtimeModels(_0x56dc97){const _0x12857b=_0x15fdad;return marAgentRuntimeModelConfigurationSchema[_0x12857b(0x24a)]()[_0x12857b(0x26a)](_0x56dc97);}function allowedModels(_0xaa0c46,_0x816008){const _0x31060e=_0x15fdad,_0x335ef5=new Set(_0xaa0c46[_0x31060e(0x251)][_0x31060e(0x199)]);return _0x816008[_0x31060e(0x20f)](_0x5658dd=>_0x5658dd[_0x31060e(0x201)]&&_0x335ef5[_0x31060e(0x12a)](_0xaa0c46[_0x31060e(0x251)][_0x31060e(0x10b)]===_0x31060e(0x2a4)?_0x5658dd[_0x31060e(0x22d)]:_0x5658dd['id']));}function selectModel(_0x13f594,_0x314e08,_0x55be45){const _0x4908c5=_0x15fdad,_0x1aba32=allowedModels(_0x13f594,_0x314e08),_0x57e69b=_0x1aba32[_0x4908c5(0x20a)](_0x5e0ffe=>_0x5e0ffe['id']===_0x55be45);if(_0x57e69b!==undefined)return _0x57e69b;const _0x97fbe0=_0x1aba32[_0x4908c5(0x20a)](_0x1344fa=>(_0x13f594[_0x4908c5(0x251)][_0x4908c5(0x10b)]===_0x4908c5(0x2a4)?_0x1344fa[_0x4908c5(0x22d)]:_0x1344fa['id'])===_0x13f594[_0x4908c5(0x251)][_0x4908c5(0xfe)]);if(_0x97fbe0!==undefined)return _0x97fbe0;const _0x2d989e=_0x13f594[_0x4908c5(0x251)][_0x4908c5(0x199)][_0x4908c5(0x238)](_0x563106=>_0x1aba32[_0x4908c5(0x20a)](_0x5c7b9f=>(_0x13f594[_0x4908c5(0x251)][_0x4908c5(0x10b)]===_0x4908c5(0x2a4)?_0x5c7b9f[_0x4908c5(0x22d)]:_0x5c7b9f['id'])===_0x563106))[_0x4908c5(0x20a)](_0x27c176=>_0x27c176!==undefined);if(_0x2d989e===undefined)throw new Error(_0x4908c5(0x1e1));return _0x2d989e;}function publishedTemplateDraft(_0x451d5e,_0x559eb9){const _0x38e0f1=_0x15fdad,_0xc53229=conversationTemplateDraftSchema[_0x38e0f1(0x230)](_0x559eb9);if(_0xc53229[_0x38e0f1(0x107)]){const {allowedModels:_0x4ca788,defaultModelId:_0xcad477,..._0x1de85c}=_0xc53229[_0x38e0f1(0x229)];return{'draft':_0x1de85c,'modelPolicy':{'identity':_0x38e0f1(0x2a4),'allowedIds':_0x4ca788[_0x38e0f1(0x238)](_0xc5a3b7=>_0xc5a3b7[_0x38e0f1(0x22d)]),'defaultId':_0xcad477}};}if(_0x451d5e!==0x17*-0x191+-0xe*-0x25a+-0xc7*-0x4||!record(_0x559eb9)||_0x38e0f1(0x1f0)in _0x559eb9||!Array[_0x38e0f1(0x298)](_0x559eb9[_0x38e0f1(0x276)]))throw new Error(_0x38e0f1(0x135));const _0x15ed73=_0x559eb9[_0x38e0f1(0x276)],_0x302541={..._0x559eb9};delete _0x302541[_0x38e0f1(0x276)];const _0xebe405=conversationTemplateDraftSchema[_0x38e0f1(0x230)]({..._0x302541,'allowedModels':_0x15ed73[_0x38e0f1(0x238)](_0x5c9658=>({'modelId':_0x5c9658,'name':_0x5c9658}))});if(!_0xebe405[_0x38e0f1(0x107)])throw new Error(_0x38e0f1(0x135));const {allowedModels:_0x590b8e,defaultModelId:_0x4e0b84,..._0x30bc37}=_0xebe405[_0x38e0f1(0x229)];return{'draft':_0x30bc37,'modelPolicy':{'identity':_0x38e0f1(0x18c),'allowedIds':_0x590b8e[_0x38e0f1(0x238)](_0x310556=>_0x310556[_0x38e0f1(0x22d)]),'defaultId':_0x4e0b84}};}function networkModels(_0x49f0cf,_0x181678){const _0x3f48c3=_0x15fdad;if(_0x181678!==_0x3f48c3(0x16f))return _0x49f0cf;return _0x49f0cf[_0x3f48c3(0x238)](_0x54e1bb=>_0x54e1bb[_0x3f48c3(0x19e)]?{..._0x54e1bb,'hostedWebSearch':![]}:_0x54e1bb);}function publishedMcpServers(_0x39897e){const _0x4a0330=_0x15fdad;if(!Array[_0x4a0330(0x298)](_0x39897e))throw new Error(_0x4a0330(0x135));return _0x39897e[_0x4a0330(0x238)](_0x540754=>{const _0x1a8173=_0x4a0330;if(!record(_0x540754))throw new Error(_0x1a8173(0x135));const _0x2a99ca=Object[_0x1a8173(0x1d9)](_0x540754)[_0x1a8173(0x102)]()[_0x1a8173(0x22e)](',');if(_0x2a99ca!==_0x1a8173(0x1db))throw new Error(_0x1a8173(0x135));const _0x5dc9a7=mcpRuntimeDescriptorSchema[_0x1a8173(0x26a)](_0x540754[_0x1a8173(0x133)]),_0x3c73da=mcpInstallationConfigurationSchema[_0x1a8173(0x26a)](_0x540754[_0x1a8173(0x184)]);if(typeof _0x540754['id']!==_0x1a8173(0x19a)||typeof _0x540754[_0x1a8173(0x172)]!==_0x1a8173(0x19a)||typeof _0x540754[_0x1a8173(0x2a0)]!==_0x1a8173(0x19a)||typeof _0x540754[_0x1a8173(0x1c7)]!==_0x1a8173(0x19a)||_0x540754[_0x1a8173(0x254)]!==_0x1a8173(0x120)&&_0x540754[_0x1a8173(0x254)]!==_0x1a8173(0x224)||_0x540754[_0x1a8173(0x19c)]!==_0x5dc9a7[_0x1a8173(0x19c)])throw new Error(_0x1a8173(0x135));return{'id':_0x540754['id'],'serverName':_0x540754[_0x1a8173(0x172)],'displayName':_0x540754[_0x1a8173(0x2a0)],'version':_0x540754[_0x1a8173(0x1c7)],'origin':_0x540754[_0x1a8173(0x254)],'transport':_0x5dc9a7[_0x1a8173(0x19c)],'runtime':_0x5dc9a7,'configuration':_0x3c73da};});}function publishedTemplateSnapshot(_0x291200){const _0x32c5b1=_0x15fdad;if(_0x291200[_0x32c5b1(0x219)]===-0xf1b+0x320+0xbfc){const _0x20cd2b=publishedTemplateFiles(_0x291200[_0x32c5b1(0x2a1)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x20cd2b),'entries':_0x20cd2b};}if(_0x291200[_0x32c5b1(0x219)]!==0xd8b*-0x2+0x289+0x188f||typeof _0x291200[_0x32c5b1(0x23a)]!==_0x32c5b1(0x19a)||!Array[_0x32c5b1(0x298)](_0x291200[_0x32c5b1(0x216)])||!Array[_0x32c5b1(0x298)](_0x291200[_0x32c5b1(0x1cd)]))throw new Error(_0x32c5b1(0x135));validatePublishedSourceWorkspacePath(_0x291200[_0x32c5b1(0x23a)]);const _0x528bf3=_0x291200[_0x32c5b1(0x216)][_0x32c5b1(0x238)](safePublishedTemplateRelativePath);if(new Set(_0x528bf3)[_0x32c5b1(0x1b2)]!==_0x528bf3[_0x32c5b1(0x16e)]||_0x528bf3[_0x32c5b1(0x29a)](_0x32c5b1(0x1cf))||_0x528bf3[_0x32c5b1(0x29a)](_0x32c5b1(0x27a)))throw new Error(_0x32c5b1(0x135));const _0x55117a=_0x291200[_0x32c5b1(0x1cd)][_0x32c5b1(0x238)](publishedTemplateEntry);if(new Set(_0x55117a[_0x32c5b1(0x238)](_0x3d6883=>_0x3d6883[_0x32c5b1(0x266)]))[_0x32c5b1(0x1b2)]!==_0x55117a[_0x32c5b1(0x16e)])throw new Error(_0x32c5b1(0x135));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x291200[_0x32c5b1(0x23a)],'directories':_0x528bf3,'entries':_0x55117a};}function publishedTemplateEntry(_0x3c98eb){const _0x4189ae=_0x15fdad;if(!record(_0x3c98eb))throw new Error(_0x4189ae(0x135));if(_0x3c98eb[_0x4189ae(0x1be)]===_0x4189ae(0x1d0))return publishedTemplateFile(_0x3c98eb,!![]);if(_0x3c98eb[_0x4189ae(0x1be)]!==_0x4189ae(0x182)||typeof _0x3c98eb[_0x4189ae(0x22b)]!==_0x4189ae(0x19a)||_0x3c98eb[_0x4189ae(0x22b)][_0x4189ae(0x16e)]===0x550+0x1533+-0x1a83||_0x3c98eb[_0x4189ae(0x22b)][_0x4189ae(0x29a)]('\x00')||_0x3c98eb[_0x4189ae(0x1ee)]!==_0x4189ae(0x220)&&_0x3c98eb[_0x4189ae(0x1ee)]!==_0x4189ae(0x15e)||typeof _0x3c98eb[_0x4189ae(0x124)]!==_0x4189ae(0x19a))throw new Error(_0x4189ae(0x135));const _0x4290d8=safePublishedTemplateRelativePath(_0x3c98eb[_0x4189ae(0x266)]),_0xc6f81f=safePublishedTemplateSize(_0x3c98eb[_0x4189ae(0x1b2)]),_0xc51ad9=_0x3c98eb[_0x4189ae(0x22b)],_0x3ae7aa=_0x3c98eb[_0x4189ae(0x1ee)],_0x4a281f=_0x3c98eb[_0x4189ae(0x124)];if(_0xc6f81f!==Buffer[_0x4189ae(0x1d2)](_0xc51ad9))throw new Error(_0x4189ae(0x135));if(_0x3ae7aa===_0x4189ae(0x220))safePublishedTemplateRelativePath(_0x4a281f);else{if(!isAbsolute(_0x4a281f)||!RUNTIME_LINK_ROOTS[_0x4189ae(0x16a)](_0x379278=>_0x4a281f===_0x379278||within(_0x379278,_0x4a281f)))throw new Error(_0x4189ae(0x135));}return{'kind':_0x4189ae(0x182),'relativePath':_0x4290d8,'size':_0xc6f81f,'linkTarget':_0xc51ad9,'targetKind':_0x3ae7aa,'resolvedTarget':_0x4a281f};}function publishedTemplateFiles(_0x32eeb5){const _0x555ef0=_0x15fdad;if(!Array[_0x555ef0(0x298)](_0x32eeb5))throw new Error(_0x555ef0(0x135));const _0x2c970=new Set();return _0x32eeb5[_0x555ef0(0x238)](_0x5491f0=>{const _0x381695=_0x555ef0,_0xaba18=publishedTemplateFile(_0x5491f0);if(_0x2c970[_0x381695(0x12a)](_0xaba18[_0x381695(0x266)]))throw new Error(_0x381695(0x135));return _0x2c970[_0x381695(0x188)](_0xaba18[_0x381695(0x266)]),_0xaba18;});}function publishedTemplateFile(_0x76d7e1,_0x33c5bb=![]){const _0x5c48dd=_0x15fdad;if(!record(_0x76d7e1)||_0x33c5bb&&_0x76d7e1[_0x5c48dd(0x1be)]!==_0x5c48dd(0x1d0)||typeof _0x76d7e1[_0x5c48dd(0x1cb)]!==_0x5c48dd(0x1b6)||typeof _0x76d7e1[_0x5c48dd(0x288)]!==_0x5c48dd(0x19a)||!/^[a-f0-9]{64}$/u[_0x5c48dd(0x292)](_0x76d7e1[_0x5c48dd(0x288)]))throw new Error(_0x5c48dd(0x135));return{'kind':_0x5c48dd(0x1d0),'relativePath':safePublishedTemplateRelativePath(_0x76d7e1[_0x5c48dd(0x266)]),'size':safePublishedTemplateSize(_0x76d7e1[_0x5c48dd(0x1b2)]),'executable':_0x76d7e1[_0x5c48dd(0x1cb)],'sha256':_0x76d7e1[_0x5c48dd(0x288)]};}function safePublishedTemplateRelativePath(_0x3e0802){const _0x3c71b9=_0x15fdad;if(typeof _0x3e0802!==_0x3c71b9(0x19a)||_0x3e0802[_0x3c71b9(0x16e)]===0x1*0x679+0x206b+-0x4c*0x83||_0x3e0802[_0x3c71b9(0x27e)]('/')||_0x3e0802[_0x3c71b9(0x29a)]('\x5c')||_0x3e0802[_0x3c71b9(0x279)]('/')[_0x3c71b9(0x16a)](_0x170e27=>_0x170e27[_0x3c71b9(0x16e)]===-0x2298+0x4*-0xb3+0x2564||_0x170e27==='.'||_0x170e27==='..'))throw new Error(_0x3c71b9(0x135));return _0x3e0802;}function safePublishedTemplateSize(_0x3eb36a){const _0x915193=_0x15fdad;if(!Number[_0x915193(0x126)](_0x3eb36a)||_0x3eb36a<0x101d+0x1c86+-0x2ca3)throw new Error(_0x915193(0x135));return _0x3eb36a;}function legacyPublishedTemplateDirectories(_0x271c24){const _0x1a6838=_0x15fdad,_0x3a69ba=new Set();for(const _0x3bff8d of _0x271c24){const _0x2091a3=_0x3bff8d[_0x1a6838(0x266)][_0x1a6838(0x279)]('/');for(let _0x50db33=-0x46c*-0x8+0xc41*-0x3+0x164;_0x50db33<_0x2091a3[_0x1a6838(0x16e)];_0x50db33+=-0xb29+0x19db*-0x1+-0x15f*-0x1b)_0x3a69ba[_0x1a6838(0x188)](_0x2091a3[_0x1a6838(0x29c)](-0x1b*0xb5+-0xfe1+0x18*0x175,_0x50db33)[_0x1a6838(0x22e)]('/'));}return[..._0x3a69ba][_0x1a6838(0x102)]((_0x22cdb8,_0x32a6ea)=>_0x22cdb8[_0x1a6838(0x1ab)](_0x32a6ea,_0x1a6838(0x1af)));}function publishedTemplateContentHash(_0x1c86fc,_0x4f3fa9,_0xa528d0){const _0x164ccb=_0x15fdad,_0x4eb0e3=_0xa528d0===-0x6f*-0x59+0xc6b+0x3301*-0x1?_0x4f3fa9[_0x164ccb(0x238)](_0x287d04=>{const _0x1b871a=_0x164ccb;if(_0x287d04[_0x1b871a(0x1be)]!==_0x1b871a(0x1d0))throw new Error(_0x1b871a(0x135));return _0x287d04[_0x1b871a(0x266)]+'\x00'+_0x287d04[_0x1b871a(0x1b2)]+'\x00'+_0x287d04[_0x1b871a(0x288)];})[_0x164ccb(0x22e)]('\x0a'):[..._0x1c86fc[_0x164ccb(0x238)](_0x27cd9a=>_0x164ccb(0x186)+_0x27cd9a),..._0x4f3fa9[_0x164ccb(0x238)](_0x4a1854=>_0x4a1854[_0x164ccb(0x1be)]===_0x164ccb(0x1d0)?_0x4a1854[_0x164ccb(0x1be)]+'\x00'+_0x4a1854[_0x164ccb(0x266)]+'\x00'+_0x4a1854[_0x164ccb(0x1b2)]+'\x00'+(_0x4a1854[_0x164ccb(0x1cb)]?-0x10*-0x1a2+-0xce9*-0x1+-0x2708:-0x2f*0xca+-0x1eb6+-0x4*-0x10f3)+'\x00'+_0x4a1854[_0x164ccb(0x288)]:_0x4a1854[_0x164ccb(0x1be)]+'\x00'+_0x4a1854[_0x164ccb(0x266)]+'\x00'+_0x4a1854[_0x164ccb(0x1b2)]+'\x00'+_0x4a1854[_0x164ccb(0x22b)]+'\x00'+_0x4a1854[_0x164ccb(0x1ee)]+'\x00'+_0x4a1854[_0x164ccb(0x124)])][_0x164ccb(0x22e)]('\x0a');return createHash(_0x164ccb(0x288))[_0x164ccb(0x281)](_0x4eb0e3)[_0x164ccb(0x278)](_0x164ccb(0x177));}async function verifyPublishedTemplateContent(_0x13db47,_0x580c63,_0x443890){const _0x557926=_0x15fdad,_0x4d03e0=new Map(_0x443890[_0x557926(0x238)](_0x26d5c7=>[_0x26d5c7[_0x557926(0x266)],_0x26d5c7])),_0x52cadc=new Set([..._0x580c63,_0x557926(0x1cf),_0x557926(0x27a)]),_0x2fd6e4=new Set(),_0x46e75a=await listPublishedTemplateEntries(_0x13db47,_0x52cadc,_0x2fd6e4);if(_0x46e75a[_0x557926(0x16e)]!==_0x4d03e0[_0x557926(0x1b2)]||_0x2fd6e4[_0x557926(0x1b2)]!==_0x52cadc[_0x557926(0x1b2)])throw new Error(_0x557926(0x135));for(const _0x46c0f2 of _0x46e75a){const _0x1db83b=_0x4d03e0[_0x557926(0x28d)](_0x46c0f2[_0x557926(0x266)]);if(_0x1db83b===undefined||_0x1db83b[_0x557926(0x1be)]!==_0x46c0f2[_0x557926(0x1be)])throw new Error(_0x557926(0x135));if(_0x1db83b[_0x557926(0x1be)]===_0x557926(0x1d0)&&_0x46c0f2[_0x557926(0x1be)]===_0x557926(0x1d0)){if(_0x1db83b[_0x557926(0x1b2)]!==_0x46c0f2[_0x557926(0x1b2)]||_0x1db83b[_0x557926(0x1cb)]!==_0x46c0f2[_0x557926(0x1cb)]||_0x46c0f2[_0x557926(0x103)]!==(_0x1db83b[_0x557926(0x1cb)]?0x1cf7*0x1+0x1*0x15d1+-0x85*0x5f:0x1d5d+0x11*-0x15a+0x4f*-0x11)||_0x1db83b[_0x557926(0x288)]!==_0x46c0f2[_0x557926(0x288)])throw new Error(_0x557926(0x135));continue;}if(_0x1db83b[_0x557926(0x1be)]!==_0x557926(0x182)||_0x46c0f2[_0x557926(0x1be)]!==_0x557926(0x182)||_0x1db83b[_0x557926(0x1b2)]!==_0x46c0f2[_0x557926(0x1b2)]||_0x1db83b[_0x557926(0x22b)]!==_0x46c0f2[_0x557926(0x22b)])throw new Error(_0x557926(0x135));await verifyPublishedSymlinkResolution(_0x13db47,_0x1db83b,_0x46c0f2[_0x557926(0x142)]);}}async function verifyPublishedSymlinkResolution(_0xc235f6,_0x2fd3d9,_0x219f93){const _0xe0b083=_0x15fdad;let _0x278668;try{_0x278668=await realpath(_0x219f93);}catch{throw new Error(_0xe0b083(0x135));}if(_0x2fd3d9[_0xe0b083(0x1ee)]===_0xe0b083(0x15e)){if(_0x278668!==_0x2fd3d9[_0xe0b083(0x124)])throw new Error(_0xe0b083(0x135));return;}let _0x215401,_0x836b0e;try{[_0x215401,_0x836b0e]=await Promise[_0xe0b083(0x1f2)]([realpath(join(_0xc235f6,..._0x2fd3d9[_0xe0b083(0x124)][_0xe0b083(0x279)]('/'))),realpath(_0xc235f6)]);}catch{throw new Error(_0xe0b083(0x135));}if(_0x278668!==_0x215401||!within(_0x836b0e,_0x278668))throw new Error(_0xe0b083(0x135));}async function listPublishedTemplateEntries(_0x326f5e,_0x4a263c,_0xaf3554,_0x5b2752=''){const _0x1e29ba=_0x15fdad,_0x3ccba6=await lstat(_0x326f5e);if(!_0x3ccba6[_0x1e29ba(0x299)]()||_0x3ccba6[_0x1e29ba(0x267)]()||(_0x3ccba6[_0x1e29ba(0x103)]&-0xeec+0x1*-0x7ae+0x833*0x3)!==-0x261f+-0x7ef*0x1+0x2f7b)throw new Error(_0x1e29ba(0x135));const _0x47b5c5=[];for(const _0x57964b of await readdir(_0x326f5e,{'withFileTypes':!![]})){const _0x54ff11=join(_0x326f5e,_0x57964b[_0x1e29ba(0x255)]),_0x56f746=_0x5b2752[_0x1e29ba(0x16e)]===0x26ea+-0x1*-0x1625+-0x3d0f?_0x57964b[_0x1e29ba(0x255)]:_0x5b2752+'/'+_0x57964b[_0x1e29ba(0x255)],_0x414616=await lstat(_0x54ff11);if(_0x414616[_0x1e29ba(0x267)]()){const _0x37022b=await readlink(_0x54ff11);_0x47b5c5[_0x1e29ba(0x24d)]({'kind':_0x1e29ba(0x182),'relativePath':_0x56f746,'size':Buffer[_0x1e29ba(0x1d2)](_0x37022b),'linkTarget':_0x37022b,'sourcePath':_0x54ff11});continue;}if(_0x414616[_0x1e29ba(0x299)]()){if(!_0x4a263c[_0x1e29ba(0x12a)](_0x56f746))throw new Error(_0x1e29ba(0x135));_0xaf3554[_0x1e29ba(0x188)](_0x56f746),_0x47b5c5[_0x1e29ba(0x24d)](...await listPublishedTemplateEntries(_0x54ff11,_0x4a263c,_0xaf3554,_0x56f746));}else{if(!_0x414616[_0x1e29ba(0x200)]()||_0x414616[_0x1e29ba(0x134)]!==0xca*0x7+-0x2285+-0x80*-0x3a||!Number[_0x1e29ba(0x126)](_0x414616[_0x1e29ba(0x1b2)]))throw new Error(_0x1e29ba(0x135));_0x47b5c5[_0x1e29ba(0x24d)]({'kind':_0x1e29ba(0x1d0),'relativePath':_0x56f746,'size':_0x414616[_0x1e29ba(0x1b2)],'executable':(_0x414616[_0x1e29ba(0x103)]&-0x8f8+-0x2*-0x376+0x255*0x1)!==-0xe66*-0x1+0x9*0x440+-0x34a6,'mode':_0x414616[_0x1e29ba(0x103)]&-0x43*0x27+0x1bd4+-0x14*0xc8,'sha256':createHash(_0x1e29ba(0x288))[_0x1e29ba(0x281)](await readFile(_0x54ff11))[_0x1e29ba(0x278)](_0x1e29ba(0x177))});}}return _0x47b5c5;}function validatePublishedSourceWorkspacePath(_0x2e6d5c){const _0x551984=_0x15fdad;if(!isAbsolute(_0x2e6d5c)||resolve(_0x2e6d5c)!==_0x2e6d5c||_0x2e6d5c==='/'||RESERVED_SANDBOX_ROOTS[_0x551984(0x16a)](_0x29e483=>_0x2e6d5c===_0x29e483||within(_0x29e483,_0x2e6d5c)||within(_0x2e6d5c,_0x29e483)))throw new Error(_0x551984(0x135));}function within(_0x6d4eb8,_0x2e691a){const _0x4c942a=_0x15fdad,_0x14a638=relative(_0x6d4eb8,_0x2e691a);return _0x14a638[_0x4c942a(0x16e)]>0x1b19*0x1+-0x17ee+-0x32b&&_0x14a638!=='..'&&!_0x14a638[_0x4c942a(0x27e)]('..'+sep);}function resolveMcpServers(_0x118b4b,_0x223dc1){const _0x1b2964=_0x15fdad,_0x53a00c=_0x5a962f=>{const _0xd12e0a=_0x105e,_0x28deeb={};for(const [_0xc4871,_0xb0e76d]of Object[_0xd12e0a(0x1cd)](_0x5a962f??{})){const _0x376652=_0x223dc1[_0xb0e76d[_0xd12e0a(0x1bd)]];if(_0x376652===undefined)throw new Error(_0xd12e0a(0x25d));_0x28deeb[_0xc4871]=_0x376652;}return _0x28deeb;};return _0x118b4b[_0x1b2964(0x17f)][_0x1b2964(0x253)](_0x21c0f8=>{const _0x3e095a=_0x1b2964;if(_0x21c0f8[_0x3e095a(0x133)][_0x3e095a(0x19c)]===_0x3e095a(0x17a)){if(_0x118b4b[_0x3e095a(0x1c5)][_0x3e095a(0x1a4)]!==_0x3e095a(0x185))return[];return[{'name':_0x21c0f8[_0x3e095a(0x172)],'lifecycle':_0x3e095a(0x10e),'transport':_0x3e095a(0x17a),'url':_0x21c0f8[_0x3e095a(0x133)][_0x3e095a(0x12f)],'headers':{..._0x53a00c(_0x21c0f8[_0x3e095a(0x133)][_0x3e095a(0x23c)]),..._0x53a00c(_0x21c0f8[_0x3e095a(0x184)][_0x3e095a(0x23c)])}}];}return[{'name':_0x21c0f8[_0x3e095a(0x172)],'lifecycle':_0x3e095a(0x10e),'transport':_0x3e095a(0x2a5),'command':_0x21c0f8[_0x3e095a(0x133)][_0x3e095a(0x22a)],'args':[..._0x21c0f8[_0x3e095a(0x133)][_0x3e095a(0x1d1)],..._0x21c0f8[_0x3e095a(0x184)][_0x3e095a(0x1fb)]??[]],'environment':{..._0x53a00c(_0x21c0f8[_0x3e095a(0x133)][_0x3e095a(0x1ac)]),..._0x53a00c(_0x21c0f8[_0x3e095a(0x184)][_0x3e095a(0x1ac)])}}];});}function hostedConversationSummary(_0xe0de6c,_0x8b6260){const _0x247446=_0x15fdad;return hostedConversationSummarySchema[_0x247446(0x26a)]({'id':_0xe0de6c['id'],'nodeId':_0xe0de6c[_0x247446(0x158)],'sessionId':_0xe0de6c[_0x247446(0x269)],'templateId':_0xe0de6c[_0x247446(0x13a)],'templateName':_0xe0de6c[_0x247446(0x104)],'activeVersionId':_0xe0de6c[_0x247446(0x1fe)],'title':_0xe0de6c[_0x247446(0x1cc)],'pinnedAt':_0xe0de6c[_0x247446(0x17b)],'status':_0xe0de6c[_0x247446(0x115)],'modelId':_0xe0de6c[_0x247446(0x22d)],'createdAt':_0xe0de6c[_0x247446(0x20c)],'updatedAt':_0xe0de6c[_0x247446(0x10a)],'lastActivityAt':_0xe0de6c[_0x247446(0x11e)],..._0x8b6260===undefined?{}:{'activity':_0x8b6260}});}function templateSummary(_0xf23f17,_0x7d2a14){const _0x2b8167=_0x15fdad;return conversationTemplateSummarySchema[_0x2b8167(0x26a)]({'id':_0xf23f17[_0x2b8167(0x13a)],'nodeId':_0xf23f17[_0x2b8167(0x158)],'name':_0xf23f17[_0x2b8167(0x104)],'description':_0x7d2a14[_0x2b8167(0x136)],'status':_0xf23f17[_0x2b8167(0x119)]?_0x2b8167(0x14a):_0x2b8167(0x173),'currentVersionId':_0xf23f17[_0x2b8167(0x1fe)],'available':!_0xf23f17[_0x2b8167(0x119)],'createdAt':_0xf23f17[_0x2b8167(0x20c)],'updatedAt':_0x7d2a14[_0x2b8167(0x10a)]});}function modelSummary(_0x866730,_0x1a9bc2){const _0x3ecd52=_0x15fdad;return{'id':_0x866730['id'],'name':_0x866730[_0x3ecd52(0x255)],'protocol':_0x866730[_0x3ecd52(0x1a9)],'baseUrl':_0x866730[_0x3ecd52(0x208)],'modelId':_0x866730[_0x3ecd52(0x22d)],'contextWindowTokens':_0x866730[_0x3ecd52(0x17c)],'maxOutputTokens':_0x866730[_0x3ecd52(0x149)],'inputCapabilities':_0x866730[_0x3ecd52(0x1d3)],'outputCapabilities':_0x866730[_0x3ecd52(0x179)],'reasoningEfforts':_0x866730[_0x3ecd52(0x19f)],'hostedWebSearch':_0x866730[_0x3ecd52(0x19e)],..._0x866730[_0x3ecd52(0x1de)]===undefined?{}:{'responsesTransport':_0x866730[_0x3ecd52(0x1de)]},'responsesPreviousResponseId':_0x866730[_0x3ecd52(0x132)],'enabled':_0x866730[_0x3ecd52(0x201)],'sortOrder':_0x1a9bc2,'apiKeyConfigured':!![]};}function systemInstruction(_0x572226){const _0x2595c6=_0x15fdad,_0x9a7605=_0x572226[_0x2595c6(0x1c5)],_0x4aed64=_0x9a7605[_0x2595c6(0x1a4)]===_0x2595c6(0x16f)?_0x2595c6(0x106):_0x2595c6(0x23f);return[_0x2595c6(0x23b),_0x2595c6(0x226),_0x2595c6(0x1b0),..._0x572226[_0x2595c6(0x23a)]===undefined?[]:[_0x2595c6(0x210)+_0x572226[_0x2595c6(0x23a)]+_0x2595c6(0x28e)+join(_0x572226[_0x2595c6(0x23a)],_0x2595c6(0x1cf))+_0x2595c6(0x170)+join(_0x572226[_0x2595c6(0x23a)],_0x2595c6(0x27a))+_0x2595c6(0x257)],_0x2595c6(0x15a),_0x4aed64][_0x2595c6(0x22e)]('\x0a');}function attachmentPrompt(_0x5b4233,_0x4725d5){const _0x2989e5=_0x15fdad;if(_0x4725d5[_0x2989e5(0x16e)]===-0x1d82+0x213a+0x1c*-0x22)return _0x5b4233;const _0x3413c6=_0x4725d5[_0x2989e5(0x238)](_0x11c71b=>_0x2989e5(0x23e)+_0x11c71b[_0x2989e5(0x266)])[_0x2989e5(0x22e)]('\x0a');return''+_0x5b4233+(_0x5b4233[_0x2989e5(0x129)]()[_0x2989e5(0x16e)]===0x95+0x1*0x1fab+-0x2b0*0xc?'':'\x0a\x0a')+_0x2989e5(0x1df)+_0x3413c6;}function automaticHostedConversationTitle(_0xdb0619){const _0xb1fea2=_0x15fdad;if(_0xdb0619===undefined)return undefined;const _0x1e76e0=sessionTitleFromFirstMessage(_0xdb0619);if(_0x1e76e0[_0xb1fea2(0x16e)]===-0x1d52+-0x1*-0x169f+0x7*0xf5||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0xb1fea2(0x292)](_0x1e76e0))return undefined;return _0x1e76e0;}function runFromMessage(_0x14d301){const _0xf496a0=_0x15fdad;return{'id':_0x14d301[_0xf496a0(0x282)],'status':_0x14d301[_0xf496a0(0x115)],'startedAt':_0x14d301[_0xf496a0(0x20c)],'completedAt':_0x14d301[_0xf496a0(0x115)]===_0xf496a0(0x16d)?null:_0x14d301[_0xf496a0(0x10a)]};}function _0x31c6(){const _0x385e76=['BwLTzvr5Cgu','l3DVCMTZCgfJzs9VDxrWDxq','z2v0','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','CMvHzhK','zgf0yujHC2u2na','Dw5Yzwy','DgvZDa','ywr2yw5JzuXHC3rby3rPDML0Eq','DgvTCgXHDgu','y29TCgXLDgvKqxq','vvnfuG','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','AxnbCNjHEq','AxneAxjLy3rVCNK','Aw5JBhvKzxm','yxr0ywnOBwvUDeLKCW','C2XPy2u','surmrq','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','Dw53yxrJAa','zgLZCgXHEu5HBwu','zMLSzxm','su5urvjsvvburuq','DxrMoa','vvbtvfjfqu1Ftu9eruXFsuq','u1resu8','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','mZCWmteXohbdBKHdBG','BwnWx2nVBMzPz19OyxnO','ywn0AxzPDhK','y2fUy2vSvxbSB2fK','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','zgvMyxvSDeLK','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','y2f0y2G','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','C29YDa','Bw9Kzq','DgvTCgXHDgvoyw1L','zxHWAxjLC0f0','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','C3vJy2vZCW','C3vTBwfYEq','uKvuquLoruq','DxbKyxrLzef0','AwrLBNrPDhK','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','rvHfq1vusu9o','lNvWBg9Hza','C3LUyW','l2rLDG','CxvVDgfZ','zMLSzvbYB2PLy3rPB25jza','zw5KC1DPDgG','C3rHDhvZ','C3rHCNrLzef0','C3rHCNrnzxnZywDL','D2f0y2HmzwfZzxm','DgvTCgXHDgvezwXLDgvK','u1vdq0vfreve','zgvSzxrL','Bg9HzfrLBxbSyxrLvMvYC2LVBG','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','BgfZDefJDgL2Axr5qxq','C3rYAw5NAwz5','tK9erq','C25HChnOB3rtzxf1zw5Jzq','DgHLBG','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','CMvZB2X2zwruyxjNzxq','D29YA2jLBMnOu2vXDwvUy2u','AxntywzLsw50zwDLCG','ChjLCgfYzq','y29TCgXLDgLVBG','DhjPBq','AgfZ','se9tvevex0nptLzfuLnbveLptG','B3DUCW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','DxjS','DgLTzxi','y29UDMvYC2f0Aw9U','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','CNvUDgLTzq','BMXPBMS','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','zgvZy3jPChrPB24','B3DUzxjlzxK','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','CNvUu2v0DgXLBwvUDhm','DgvTCgXHDgvjza','yNL0zxnszwfK','D2f0y2HmzwfZzvrPBwvY','ChvIBgLZAeHVC3rLzev2zw50','q09orKXjq1q','DMfSDwvZ','mtyXnJaZnxHhz1nwyW','C3rVCMu','C291CMnLugf0Aa','Ag9ZDfbVBgLJEvzLCNnPB24','DgvTCg9Yyxj5ugf0Aa','y29Kzq','ywn0AxzLuNvUCW','D3jPDgu','yxnZzxj0q2fUq3jLyxrL','Bwf4t3v0Chv0vg9Rzw5Z','revmrvrfra','zw1PDfDHDgnOtgvHC2vfDMvUDa','CMvWBgfJzq','zMLSzurLBgv0zxm','DxnLCKLK','Bwf4','BNvTyMvY','Cgf0Ae1VDw50CW','DxbSB2fKswq','C3rVCMfNzv9RzxK','Ag9TzurPCMvJDg9YEq','BwLU','DMvYC2LVBKLK','CMvHzezPBgu','BM9KzuLK','BgLZDenVBNzLCNnHDgLVBNm','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','CNvUlq','DxbSB2fKCW','D29YA2jLBMnOq29UBMvJDgLVBKLK','uLvoveLnrq','uvvpvefFrvHdruveruq','l3j1BNrPBwu','DxnLzej5DgvZ','yxbWBhLbDxrVBwf0AwnuAxrSzq','CMvTB3zLv2f0y2HmzwfZzq','zMLSzuLK','DxnLCLn0B3jHz2vlzxK','C2XVDfrVA2vU','BwvZC2fNzq','CNvU','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','C29Tzq','AxrLBxm','nZncs2nHtLO','uLvotKLorW','BgvUz3rO','tK9orq','igfUzca','vvbmt0fesu5h','C2vYDMvYtMfTzq','qunusvzf','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','DgvTCgXHDgveAxjLy3rVCNK','l3bYB2m','Agv4','nJe3ntm3nKHIu25lzq','B3v0Chv0q2fWywjPBgL0AwvZ','sfruua','CgLUBMvKqxq','y29UDgv4DfDPBMrVD1rVA2vUCW','ve9px0XbuKDf','B3b0Aw9UCW','BwnWu2vYDMvYCW','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','CMvUzxC','u1LnteLosW','zw1PDfDHDgnOrxzLBNq','y29UzMLNDxjHDgLVBG','vu5srvnuuKLdveve','reLsrunut1jzaa','DxbSB2fKu3rHDhvZ','ywrK','ChvIBgLZAfvWz3jHzgvgywLSDxjL','Bwf4qNL0zxm','DxbKyxrLq29UDMvYC2f0Aw9U','q09orKLhvvjbveLptL9jra','ru5pru5u','vvbmt0fe','y3vYCMvUDfzLCNnPB25jza','CMvJzwL2zwrcExrLCW','yMfZzty0','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','y3jLyxrLq29UDMvYC2f0Aw9U','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','DgL0BgvdAgfUz2vK','CgvUzgLUz0nYzwf0zxm','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','Aw50zxjYDxb0','ywXSB3DLzeLKCW','C3rYAw5N','l3rTCa','DhjHBNnWB3j0','y3jLyxrL','Ag9ZDgvKv2vIu2vHCMnO','CMvHC29UAw5NrwzMB3j0CW','qvvutW','C2v0','zMLSzv9JB3vUDa','Bwf4u3rVCMfNzuj5DgvZ','BMv0D29YA01Vzgu','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','ywnJzxb0zwrxyxrJAa','q09nueXfveve','ChjVDg9JB2W','mtC1oduZn0Lqt3fwuW','Bg9JywXLq29TCgfYzq','zw52AxjVBM1LBNq','CMvXDwLYzuzPBgu','BM90AwzPy2f0Aw9U','zw4Tvvm','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','zNvSBc1Hy2nLC3m','C2L6zq','zw1PDfDVCMTIzw5JAev2zw50','y29UDMvYC2f0Aw9Uswq','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','yM9VBgvHBG','B3v0Chv0rgLYzwn0B3j5','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','qvzbsuXbqKXf','l3DVCMTZCgfJzq','C2vJCMv0tMfTzq','A2LUza','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','CMvHza','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','y29UDgvUDf9OyxnO','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','zhjHzNq','CMf3','DMvYC2LVBG','C2f2zuf1Dg9TyxrPy1rPDgXL','AgLZDg9YEq','l3vZCG','zxHLy3v0ywjSzq','DgL0Bgu','zw50CMLLCW','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','Aw5IB3G','rKLmrq','yxjNCW','yNL0zuXLBMD0Aa','Aw5WDxrdyxbHyMLSAxrPzxm','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','ChjLDMLVDxnwzxjZAw9Uswq','l2XPyJy0','B2zMC2v0','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','A2v5CW','CNvUDgLTzvnJB3bLswq','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','y2fUy2vS','DxbKyxrLtwv0ywrHDge','CMvZCg9UC2vZvhjHBNnWB3j0','qxr0ywnOBwvUDhm6cG','ChjLzMXPz2H0vxbSB2fK','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','zMLUAxnOtwvZC2fNzq','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','C2vZC2LVBLDHDgnOu2XVDhm','BgLTAxq','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','CMvZB2X2zq','ywn0AxzPDgLLCW','AxndB252zxjZyxrPB25jBLvZzq','Cgf0Ahm','y29TCgXLDgvvCgXVywq','Dg90ywXFyNL0zxm','DxbSB2fKC0rPCMvJDg9YEq','DgfYz2v0s2LUza','u1rbuLrjtKC','ywXSB3DLze1VzgvSCW','BgLZDa','ywXS','y2XPzw50uMvXDwvZDeLK','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','y3jLyxrLvxbSB2fK','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','ChjVy2vZC0v4zwn1Dg9Y','zgf0ywjHC2u','D2f0y2Hjza','l2XPyG','yxjNDw1LBNrZ','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','mJmWmdyZn2LSDLHcyq','ywn0AxzLvMvYC2LVBKLK','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','AxngAwXL','zw5HyMXLza','C2vJCMv0rw52AxjVBM1LBNq','n21NCwf5sq','DxbSB2fKC0j5uMvXDwvZDa','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','BwfUAwzLC3qUANnVBG','ndGWogDqzNbLCq','yMfZzvvYBa','BM9KzuDLBMvYyxrPB24','zMLUza','l2jPBG','y3jLyxrLzef0','ywXSu2v0DgXLza','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','zMLSDgvY','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','BgLZDezPBgvZ','l3j1BG','Cgf0AhngB3jnyw5PzMvZDa','y2XVC2u','Cgf0AhngB3jdB252zxjZyxrPB24','zgLYzwn0B3jPzxm','nfnXyvfPBG','C3vIyxjYyxK','C2nOzw1HvMvYC2LVBG','C2vZC2LVBKHHC2G','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','zMLUywXSEq','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','C25HChnOB3q','y3jLyxrLtwvZC2fNzq','u05bufnit1q','CMvXDwLYzunVBNzLCNnHDgLVBG','l3nIAw4','mJbst3LtuLC','v09ss1nqqunf','BwfUAwzLC3rFAgfZAa','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','ChvIBgLZAfj1BNrPBwvfDMvUDa','zgf0yq','y29TBwfUza','BgLUA1rHCMDLDa','y29UDgvUDeHHC2G','Bw9KzwXjza','AM9PBG','uKvbrfK','C2fMzvbHCNnL','uLvox1rfuK1jtKfm','CMvSzwfZzq','CgvUzgLUz01LC3nHz2vZ','y3vYC29Y','DgfYz2v0ugf0Aa','D2f0y2G','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra','BwfW','BwfUAwzLC3q','C291CMnLv29YA3nWywnLugf0Aa','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvhjLyxqGl3DVCMTZCgfJzsbHCYb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','AgvHzgvYCW','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','lsaVD29YA3nWywnLl2LUyM94lW','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','CMvKDwnL','CMvXDwLYzvvWBg9Hza','q1vtve9n','mtm5nJyZohvbtLD6AW','Bw9KzwXZ','zNjVBq','zMLUze1LC3nHz2u','l3DVCMTZCgfJzs9PBMjVEa','C2f2zu1LC3nHz2vby2nLChrHBMnL','CMvNAxn0zxjgAwXL','yxjYyxK','zgvSzxrLrMLSzq','CgvUzgLUz0v2zw50CW','ChvZAa','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','q0foq0vmteve','ChjVBxb0','Bw9KzwXqB2XPy3K','q0foq0vmteLorW','zMXHDe1HCa','B3jPz2LU','BMfTzq','DgfYz2v0vMvYC2LVBKLK','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','Bwf4vxbSB2fKqNL0zxm','C3rHCNrsDw4','CxvVDge','Dg9tDhjPBMC','y2XPzw50twvZC2fNzuLK','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','B2jQzwn0','zgLZCg9Zzq','D3jPDgvvCgXVywrdAhvUAW','zMLUAxnOuNvU','CNvUoG','y3jLyxrLu2vZC2LVBG','B3bLCMf0Aw9UCW','y2f0zwDVCNK','CMvSyxrPDMvqyxrO','AxntEw1IB2XPy0XPBMS','CgLUBMvK','C2vZC2LVBKLK','CgfYC2u','BM93','DgL0BgvtB3vYy2u','l2HVBwuVBwfY','CMvSzwfZzvnLC3nPB24','CMvJB25JAwXLrMLSzxm','CMvQzwn0','y29UDgvUDa','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','DxbKyxrLq29UzMLNDxjHDgLVBG','ChvIBgLZAefJDgL2Axr5','ywXSB3DLze1VzgvSswrZ','zMLSzvbHDgG','zgLNzxn0','C3bSAxq','B3v0Chv0','zMLSzq','ChvIBgLZAfDVCMTIzw5JAev2zw50','BMv4DfDVCMTIzw5JAev2zw50','C3rHCNrZv2L0Aa','rKfjteve','ywXSB2m','DxbKyxrL','CNvUswq','D2f0y2GUzMfPBgvK','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','y2XLyw51CeXVy2TZ','CMvXDwLYzuf0DgfJAg1LBNq','BwnWq29UzMLNsgfZAa','C2HHmJu2','DxbNCMfKzq','yxzHAwXHyMXL'];_0x31c6=function(){return _0x385e76;};return _0x31c6();}function runInterruptionKey(_0xed36b1,_0x59d2ba){return _0xed36b1+'\x00'+_0x59d2ba;}function uploadProjection(_0x16806a){const _0x342baf=_0x15fdad;return{'uploadId':_0x16806a[_0x342baf(0x152)],'conversationId':_0x16806a[_0x342baf(0x1b4)],'name':_0x16806a[_0x342baf(0x255)],'mimeType':_0x16806a[_0x342baf(0x28b)],'receivedBytes':_0x16806a[_0x342baf(0x190)],'size':_0x16806a[_0x342baf(0x1b2)],'status':_0x16806a[_0x342baf(0x115)],..._0x16806a[_0x342baf(0x27b)]===undefined?{}:{'file':_0x16806a[_0x342baf(0x27b)]}};}async function assertRegularFile(_0x41e676,_0x4c04ea){const _0x42230a=_0x15fdad,_0x634d29=await lstat(_0x41e676)[_0x42230a(0x100)](()=>{const _0x15941f=_0x42230a;throw new Error(_0x15941f(0x138));});if(!_0x634d29[_0x42230a(0x200)]()||_0x634d29[_0x42230a(0x267)]()||_0x634d29[_0x42230a(0x134)]!==-0x11a2*0x1+-0xc2a+-0x1*-0x1dcd||_0x634d29[_0x42230a(0x1b2)]!==_0x4c04ea)throw new Error(_0x42230a(0x138));}function _0x105e(_0x912c2d,_0x514059){_0x912c2d=_0x912c2d-(-0x425*0x3+0xce*0x2+0xbcb);const _0xc6b7dd=_0x31c6();let _0x179320=_0xc6b7dd[_0x912c2d];if(_0x105e['sRXAhW']===undefined){var _0x10f8bc=function(_0x1eec8e){const _0x46fbd1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42a89c='',_0x29631a='';for(let _0x5f3312=0x1*0x1472+0x3*0xc51+-0x1*0x3965,_0xa7df8c,_0x55ed0f,_0x30c6d4=-0x7e*0x9+-0x4*-0xb3+0x1a2;_0x55ed0f=_0x1eec8e['charAt'](_0x30c6d4++);~_0x55ed0f&&(_0xa7df8c=_0x5f3312%(-0x2254+0x4d3*-0x4+-0x2*-0x1ad2)?_0xa7df8c*(-0xc*0x192+0x98*0x4+0xd6*0x14)+_0x55ed0f:_0x55ed0f,_0x5f3312++%(0x19c3+0x271+-0x1c30))?_0x42a89c+=String['fromCharCode'](0xa2a+-0x6f1*-0x5+0x60*-0x75&_0xa7df8c>>(-(-0x2213+0x1*0x623+0x1ff*0xe)*_0x5f3312&-0x218*-0x5+-0xb3*-0x25+0x2451*-0x1)):0x1f5d+-0x15c4+-0x999){_0x55ed0f=_0x46fbd1['indexOf'](_0x55ed0f);}for(let _0x146ead=-0x2*-0x12d1+0x1*-0x1a2f+-0xb73,_0xe82b2e=_0x42a89c['length'];_0x146ead<_0xe82b2e;_0x146ead++){_0x29631a+='%'+('00'+_0x42a89c['charCodeAt'](_0x146ead)['toString'](-0x246b*-0x1+-0x27*-0x47+-0x2f2c))['slice'](-(-0x184f+0x13f9+0x458));}return decodeURIComponent(_0x29631a);};_0x105e['kZqyNO']=_0x10f8bc,_0x105e['PoHaNQ']={},_0x105e['sRXAhW']=!![];}const _0x39d11d=_0xc6b7dd[-0x1f3*-0x1+-0x2*0xb5a+0x14c1];_0x105e['KVdAFD']!==_0x39d11d&&(_0x105e['PoHaNQ']={},_0x105e['KVdAFD']=_0x39d11d);const _0x4bea3c=_0x105e['PoHaNQ'][_0x912c2d];return _0x4bea3c===undefined?(_0x179320=_0x105e['kZqyNO'](_0x179320),_0x105e['PoHaNQ'][_0x912c2d]=_0x179320):_0x179320=_0x4bea3c,_0x179320;}async function assertUploadTemporaryFile(_0xcf9aac,_0x3f36cf){const _0x30e8a7=_0x15fdad,_0x4d1d63=await lstat(_0xcf9aac)[_0x30e8a7(0x100)](()=>{const _0x39c0d1=_0x30e8a7;throw new Error(_0x39c0d1(0x273));});if(!_0x4d1d63[_0x30e8a7(0x200)]()||_0x4d1d63[_0x30e8a7(0x267)]()||_0x4d1d63[_0x30e8a7(0x134)]!==-0x89+0x1a4c+-0x19c2||_0x4d1d63[_0x30e8a7(0x1b2)]!==_0x3f36cf)throw new Error(_0x30e8a7(0x273));}function record(_0x2b1d50){const _0x4bd3d6=_0x15fdad;return typeof _0x2b1d50===_0x4bd3d6(0x25e)&&_0x2b1d50!==null&&!Array[_0x4bd3d6(0x298)](_0x2b1d50);}
2
+ const _0x344abe=_0x2565;(function(_0x3b182c,_0x156afc){const _0x475b17=_0x2565,_0x48c0d4=_0x3b182c();while(!![]){try{const _0x18337f=-parseInt(_0x475b17(0xfa))/(-0x1*0xafb+-0x1*-0x6b1+0x44b)+-parseInt(_0x475b17(0x202))/(-0x108b+-0x79*0x1f+0x1f34)+-parseInt(_0x475b17(0x10f))/(-0x24c7+0x4*0x71e+0x852)+-parseInt(_0x475b17(0x1e2))/(-0x167*0xd+0x1*0x58d+-0x659*-0x2)+-parseInt(_0x475b17(0x148))/(-0x1*-0x12b2+0x6e0+-0x198d)+-parseInt(_0x475b17(0x1f2))/(0xc*0x1e9+-0x18c9+0x17*0x15)+parseInt(_0x475b17(0xde))/(-0x1f18+-0x11*0x1e4+0x5*0xca7)*(parseInt(_0x475b17(0x22e))/(-0x504+-0x43*0x7d+0x25c3));if(_0x18337f===_0x156afc)break;else _0x48c0d4['push'](_0x48c0d4['shift']());}catch(_0x466f34){_0x48c0d4['push'](_0x48c0d4['shift']());}}}(_0x4192,0xc8549+0xb*0xb3b0+-0xb*0x959b));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,open,readFile,readlink,readdir,realpath,rename,rm,utimes}from'node:fs/promises';import{isAbsolute,join,relative,resolve,sep}from'node:path';import{conversationTemplateDraftSchema,conversationTemplateSummarySchema,hostedConversationConfigUpdateInputSchema,hostedConversationCreateInputSchema,hostedConversationDeleteResultSchema,hostedConversationFileDeleteInputSchema,hostedConversationFileDeleteResultSchema,hostedConversationFileReadInputSchema,hostedConversationFileReadResultSchema,hostedConversationFilesSchema,hostedConversationIdInputSchema,hostedConversationListInputSchema,hostedConversationListPageSchema,hostedConversationMessageInputSchema,hostedConversationMetadataUpdateInputSchema,hostedConversationSnapshotSchema,hostedConversationSummarySchema,hostedConversationUnwatchInputSchema,hostedConversationUploadChunkInputSchema,hostedConversationUploadControlInputSchema,hostedConversationUploadCreateInputSchema,hostedConversationUploadPreflightInputSchema,hostedConversationUploadPreflightResultSchema,hostedConversationUploadSchema,hostedConversationWatchInputSchema,marAgentRuntimeModelConfigurationSchema,mcpInstallationConfigurationSchema,mcpRuntimeDescriptorSchema}from'@myagentroam/protocol';import{sessionTitleFromFirstMessage}from'../util/node-operation-parsers.js';import{safeErrorCode}from'../util/safe-error.js';import{SessionWatchSlotCoordinator}from'./session-watch-slot-coordinator.js';const HOST_POLICY_VERSION=-0x116c+-0xd11+0x1*0x1e7e,MAX_FILE_READ_BYTES=(0x9d*-0x2+0xe52+0x238*-0x5)*(0x1*-0x12de+0x1*-0x15b5+0x2c93),WATCH_TTL_MS=0x1718*-0xe+-0xb381*-0x1+-0x1*-0x13f97,RUNTIME_LINK_ROOTS=[_0x344abe(0x1e8),_0x344abe(0x245),_0x344abe(0x16e),_0x344abe(0x24f),_0x344abe(0x1c9)],RESERVED_SANDBOX_ROOTS=[_0x344abe(0x240),_0x344abe(0xd8),_0x344abe(0x165),_0x344abe(0x1e8),_0x344abe(0x245),_0x344abe(0x16e),_0x344abe(0x24f),_0x344abe(0x1c9),_0x344abe(0x1ea),_0x344abe(0x1f8),_0x344abe(0x163),_0x344abe(0x186)];export class HostedConversationNodeService{[_0x344abe(0x1fb)];[_0x344abe(0xc1)];['id'];[_0x344abe(0x20a)]=new Map();[_0x344abe(0x1e3)]=new Map();[_0x344abe(0x1ad)]=new Map();[_0x344abe(0x19e)]=new Map();[_0x344abe(0x180)]=new Map();[_0x344abe(0xd9)]=new Set();[_0x344abe(0x171)]=new Map();[_0x344abe(0x222)]=new Map();[_0x344abe(0x118)]=new Set();[_0x344abe(0x1c8)]=new Map();[_0x344abe(0x10b)]=new Set();[_0x344abe(0x24a)];[_0x344abe(0x1f9)]=-0x1802+0x38c+0x1476;[_0x344abe(0x172)]=0xb71+0x25*-0x9d+0xb40;constructor(_0x2604e8){const _0x2fdddc=_0x344abe;this[_0x2fdddc(0x1fb)]=_0x2604e8,this[_0x2fdddc(0xc1)]=_0x2604e8[_0x2fdddc(0xc1)]??Date[_0x2fdddc(0xc1)],this['id']=_0x2604e8['id']??randomUUID,this[_0x2fdddc(0x24a)]=_0x2604e8[_0x2fdddc(0x24a)]??new SessionWatchSlotCoordinator();}[_0x344abe(0x126)](){const _0x3f5a97=_0x344abe;return{'conversation.hosted.list':_0x3daf58=>this[_0x3f5a97(0x184)](_0x3daf58),'conversation.hosted.create':_0x4652e1=>this[_0x3f5a97(0x1d8)](_0x4652e1),'conversation.hosted.get':_0x4192c6=>this[_0x3f5a97(0x1a9)](_0x4192c6),'conversation.hosted.watch':_0x69423c=>this[_0x3f5a97(0x220)](_0x69423c),'conversation.hosted.unwatch':_0xfef441=>this[_0x3f5a97(0x255)](_0xfef441),'conversation.hosted.message':_0x37646f=>this[_0x3f5a97(0xe9)](_0x37646f),'conversation.hosted.interrupt':_0x3b988b=>this[_0x3f5a97(0x18b)](_0x3b988b),'conversation.hosted.config.update':_0x4fe1a3=>this[_0x3f5a97(0x207)](_0x4fe1a3),'conversation.hosted.metadata.update':_0x69861c=>this[_0x3f5a97(0x211)](_0x69861c),'conversation.hosted.files.list':_0x3da8ef=>this[_0x3f5a97(0x14c)](_0x3da8ef),'conversation.hosted.file.read':_0x2454fd=>this[_0x3f5a97(0x154)](_0x2454fd),'conversation.hosted.file.delete':_0x557c5a=>this[_0x3f5a97(0x249)](_0x557c5a),'conversation.hosted.files.upload.preflight':_0x23529d=>this[_0x3f5a97(0x17e)](_0x23529d),'conversation.hosted.files.upload.create':_0x4ea0b7=>this[_0x3f5a97(0xed)](_0x4ea0b7),'conversation.hosted.files.upload.chunk':_0x2f8cad=>this[_0x3f5a97(0x218)](_0x2f8cad),'conversation.hosted.files.upload.status':_0x55d929=>this[_0x3f5a97(0xc4)](_0x55d929),'conversation.hosted.files.upload.complete':_0x2f67a9=>this[_0x3f5a97(0xdc)](_0x2f67a9),'conversation.hosted.files.upload.cancel':_0x4918ad=>this[_0x3f5a97(0x19b)](_0x4918ad),'conversation.hosted.delete':_0x2fca93=>this[_0x3f5a97(0x215)](_0x2fca93)};}[_0x344abe(0x184)](_0x11c92c){const _0x3ac223=_0x344abe,_0x3210ba=hostedRequest(_0x11c92c),_0x257bcb=hostedConversationListInputSchema[_0x3ac223(0xce)](_0x3210ba[_0x3ac223(0x21d)]),_0x208acd=this[_0x3ac223(0x1fb)][_0x3ac223(0x147)][_0x3ac223(0xfe)]({'userId':_0x3210ba[_0x3ac223(0x1e7)],'limit':_0x257bcb[_0x3ac223(0x212)],..._0x257bcb[_0x3ac223(0x129)]===undefined?{}:{'cursor':_0x257bcb[_0x3ac223(0x129)]}});return hostedConversationListPageSchema[_0x3ac223(0xce)]({..._0x208acd,'items':_0x208acd[_0x3ac223(0x25b)][_0x3ac223(0x10c)](_0x259796=>({..._0x259796,'activity':this[_0x3ac223(0x22c)](_0x259796['id'])}))});}[_0x344abe(0x1d8)](_0x591e2d){const _0x47b9da=_0x344abe,_0x67bdd4=hostedRequest(_0x591e2d),_0xc109ff=hostedConversationCreateInputSchema[_0x47b9da(0xce)](_0x67bdd4[_0x47b9da(0x21d)]),_0x2295bb=conversationTemplateSummarySchema[_0x47b9da(0xce)](_0x67bdd4[_0x47b9da(0x226)]),_0x1d4b13=runtimeModels(_0x67bdd4[_0x47b9da(0x1a6)]);if(_0x2295bb['id']!==_0xc109ff[_0x47b9da(0x132)]||_0x2295bb[_0x47b9da(0x210)]!==this[_0x47b9da(0x1fb)][_0x47b9da(0x210)]()||!_0x2295bb[_0x47b9da(0x1b7)]||_0x2295bb[_0x47b9da(0x260)]!==_0x47b9da(0x193)||_0x2295bb[_0x47b9da(0xc6)]===null)throw new Error(_0x47b9da(0x24e));const _0x26ef48=_0x67bdd4[_0x47b9da(0x1e7)]+'\x00'+_0xc109ff[_0x47b9da(0x13d)],_0x10e14e=this[_0x47b9da(0x20a)][_0x47b9da(0x1a9)](_0x26ef48);if(_0x10e14e!==undefined)return _0x10e14e;const _0x156031=this[_0x47b9da(0x1fb)][_0x47b9da(0x147)][_0x47b9da(0x13f)](_0x67bdd4[_0x47b9da(0x1e7)],_0xc109ff[_0x47b9da(0x13d)]);if(_0x156031!==undefined)return this[_0x47b9da(0x18a)](_0x67bdd4[_0x47b9da(0x1e7)],_0x156031['id'],_0x1d4b13);const _0x50c3c8=this[_0x47b9da(0x1c3)](_0x67bdd4[_0x47b9da(0x1e7)],_0xc109ff[_0x47b9da(0x13d)],_0x2295bb,_0x1d4b13,_0x67bdd4[_0x47b9da(0x158)]);return this[_0x47b9da(0x20a)][_0x47b9da(0x11f)](_0x26ef48,_0x50c3c8),void _0x50c3c8[_0x47b9da(0xf3)](()=>this[_0x47b9da(0x20a)][_0x47b9da(0x215)](_0x26ef48))[_0x47b9da(0xee)](()=>undefined),_0x50c3c8;}async[_0x344abe(0x1c3)](_0x4a6e64,_0x2562b0,_0x122b45,_0x5243f1,_0xb41fee){const _0x118f76=_0x344abe;await this[_0x118f76(0x1fb)][_0x118f76(0xda)]?.();const _0x4a1815=await this[_0x118f76(0x13b)](_0x122b45[_0x118f76(0xc6)],_0x122b45['id'],!![]),_0x1c9dbe=selectModel(_0x4a1815,_0x5243f1,_0x4a1815[_0x118f76(0x1aa)][_0x118f76(0x149)]),_0x58cd56=this['id'](),_0x3a5cec=await this[_0x118f76(0x1fb)][_0x118f76(0x147)][_0x118f76(0x1b6)](_0x4a6e64,_0x58cd56),_0x419520=this[_0x118f76(0x23e)](_0x3a5cec[_0x118f76(0x14f)],_0x4a1815),_0x3d840e=this[_0x118f76(0xd5)](_0x3a5cec[_0x118f76(0x14f)],_0x4a1815);let _0x5db5b1;try{const _0x8edc05=await this[_0x118f76(0x1fb)][_0x118f76(0x254)][_0x118f76(0x101)]({'conversationId':_0x58cd56,'homeDirectory':_0x3a5cec[_0x118f76(0x14f)][_0x118f76(0x228)],'workspaceDirectory':_0x4a1815[_0x118f76(0x16d)],'systemInstruction':systemInstruction(_0x4a1815),'defaultModelId':_0x1c9dbe['id'],'models':networkModels(allowedModels(_0x4a1815,_0x5243f1),_0x4a1815[_0x118f76(0x174)][_0x118f76(0x1a1)]),..._0xb41fee===undefined?{}:{'runtimeScopeId':_0xb41fee},'pathMounts':_0x419520,'processExecutor':_0x3d840e});_0x5db5b1=_0x8edc05[_0x118f76(0xe2)];const _0x15e77f=this[_0x118f76(0xc1)](),_0x62871={'id':_0x58cd56,'nodeId':this[_0x118f76(0x1fb)][_0x118f76(0x210)](),'sessionId':_0x5db5b1,'templateId':_0x122b45['id'],'templateName':_0x122b45[_0x118f76(0x25a)],'activeVersionId':_0x4a1815['id'],'title':_0x122b45[_0x118f76(0x25a)],'titleSource':_0x118f76(0x198),'pinnedAt':null,'status':_0x118f76(0x193),'modelId':_0x1c9dbe['id'],'createdAt':_0x15e77f,'updatedAt':_0x15e77f,'lastActivityAt':_0x15e77f,'userStorageKey':_0x3a5cec[_0x118f76(0xdb)],'conversationStorageKey':_0x3a5cec[_0x118f76(0x17c)],'clientRequestId':_0x2562b0,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0x4a1815[_0x118f76(0x174)][_0x118f76(0xc0)][_0x118f76(0x206)]}},_0x1a25b9=await this[_0x118f76(0x1fb)][_0x118f76(0x147)][_0x118f76(0x1c3)](_0x62871);return _0x1a25b9['id']!==_0x58cd56&&(await this[_0x118f76(0x1fb)][_0x118f76(0x254)][_0x118f76(0xe3)]({'conversationId':_0x58cd56,'sessionId':_0x5db5b1,'homeDirectory':_0x3a5cec[_0x118f76(0x14f)][_0x118f76(0x228)]})[_0x118f76(0xee)](()=>undefined),await rm(_0x3a5cec[_0x118f76(0x14f)][_0x118f76(0x23c)],{'recursive':!![],'force':!![]})),this[_0x118f76(0x18a)](_0x4a6e64,_0x1a25b9['id'],_0x5243f1);}catch(_0x10659c){if(_0x5db5b1!==undefined)await this[_0x118f76(0x1fb)][_0x118f76(0x254)][_0x118f76(0xe3)]({'conversationId':_0x58cd56,'sessionId':_0x5db5b1,'homeDirectory':_0x3a5cec[_0x118f76(0x14f)][_0x118f76(0x228)]})[_0x118f76(0xee)](()=>undefined);await rm(_0x3a5cec[_0x118f76(0x14f)][_0x118f76(0x23c)],{'recursive':!![],'force':!![]})[_0x118f76(0xee)](()=>undefined);throw _0x10659c;}}async[_0x344abe(0x1a9)](_0x502193){const _0x327088=_0x344abe,_0x4af39c=hostedRequest(_0x502193),_0x336871=hostedConversationIdInputSchema[_0x327088(0xce)](_0x4af39c[_0x327088(0x21d)]);return this[_0x327088(0x18a)](_0x4af39c[_0x327088(0x1e7)],_0x336871[_0x327088(0x151)],runtimeModels(_0x4af39c[_0x327088(0x1a6)]),_0x4af39c[_0x327088(0x153)]);}async[_0x344abe(0x18a)](_0x33f39a,_0x2b5f60,_0x4ef0df,_0x5f0d21=![]){const _0x15a082=_0x344abe;let _0x29c790=this[_0x15a082(0x1fb)][_0x15a082(0x147)][_0x15a082(0x1bb)](_0x33f39a,_0x2b5f60);if(_0x5f0d21)_0x29c790=await this[_0x15a082(0x1fb)][_0x15a082(0x147)][_0x15a082(0x1d3)](_0x33f39a,_0x2b5f60,this[_0x15a082(0xc1)]());const _0x422b0e=await this[_0x15a082(0x13b)](_0x29c790[_0x15a082(0x233)],_0x29c790[_0x15a082(0x132)]),_0x11b92f=networkModels(allowedModels(_0x422b0e,_0x4ef0df),_0x422b0e[_0x15a082(0x174)][_0x15a082(0x1a1)]),_0x284d6a=this[_0x15a082(0x1fb)][_0x15a082(0x147)][_0x15a082(0x15f)](_0x33f39a,_0x29c790['id']),_0x531afa=await this[_0x15a082(0x1fb)][_0x15a082(0x254)][_0x15a082(0x10a)]({'conversationId':_0x29c790['id'],'sessionId':_0x29c790[_0x15a082(0xe2)],'homeDirectory':_0x284d6a[_0x15a082(0x228)],'modelId':_0x29c790[_0x15a082(0x14e)]});return hostedConversationSnapshotSchema[_0x15a082(0xce)]({'conversation':this[_0x15a082(0x225)](_0x29c790),'template':templateSummary(_0x29c790,_0x422b0e[_0x15a082(0x174)]),'run':this[_0x15a082(0x1ad)][_0x15a082(0x1a9)](_0x29c790['id'])?.[_0x15a082(0x19a)]??null,'turns':_0x531afa,'files':this[_0x15a082(0x1fb)][_0x15a082(0x147)][_0x15a082(0x14c)](_0x33f39a,_0x29c790['id']),'models':_0x11b92f[_0x15a082(0x10c)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0x344abe(0x220)](_0x570977){const _0x52af21=_0x344abe,_0x1dbdf7=hostedRequest(_0x570977),_0x21a3c9=hostedConversationWatchInputSchema[_0x52af21(0xce)](_0x1dbdf7[_0x52af21(0x21d)]),_0xb261d9=this[_0x52af21(0x1fb)][_0x52af21(0x147)][_0x52af21(0x1bb)](_0x1dbdf7[_0x52af21(0x1e7)],_0x21a3c9[_0x52af21(0x151)]);if(this[_0x52af21(0x10b)][_0x52af21(0x1d5)](_0xb261d9['id']))throw new Error(_0x52af21(0x259));const _0x1760ad=requireWatchSessionHash(_0x1dbdf7[_0x52af21(0x1ff)]),_0x36cf98=watchOwnerKey(_0x1760ad,_0x21a3c9[_0x52af21(0x19c)]);if(_0x21a3c9[_0x52af21(0x1bd)]===_0x52af21(0x14b)){const _0x1d7378=this[_0x52af21(0x1c8)][_0x52af21(0x1a9)](_0x36cf98);if(_0x1d7378===undefined||!this[_0x52af21(0x24a)][_0x52af21(0x14d)](_0x36cf98,_0x1d7378[_0x52af21(0x122)])||_0x1d7378[_0x52af21(0x1a3)]!==_0x21a3c9[_0x52af21(0x1a3)]||_0x1d7378[_0x52af21(0x151)]!==_0x21a3c9[_0x52af21(0x151)]||_0x1d7378[_0x52af21(0x1e7)]!==_0x1dbdf7[_0x52af21(0x1e7)]||_0x1d7378[_0x52af21(0x179)]<=Date[_0x52af21(0xc1)]()){this[_0x52af21(0x11b)](_0x36cf98);throw new Error(_0x52af21(0x253));}return _0x1d7378[_0x52af21(0x179)]=Date[_0x52af21(0xc1)]()+WATCH_TTL_MS,clearTimeout(_0x1d7378[_0x52af21(0x1e4)]),_0x1d7378[_0x52af21(0x1e4)]=this[_0x52af21(0x1ac)](_0x36cf98),this[_0x52af21(0x1e0)](_0x1d7378);}const _0x155d06=runtimeModels(_0x1dbdf7[_0x52af21(0x1a6)]),_0x34039b=this[_0x52af21(0x1c8)][_0x52af21(0x1a9)](_0x36cf98);if(_0x34039b!==undefined&&this[_0x52af21(0x24a)][_0x52af21(0x14d)](_0x36cf98,_0x34039b[_0x52af21(0x122)])&&_0x34039b[_0x52af21(0x1a3)]===_0x21a3c9[_0x52af21(0x1a3)]&&_0x34039b[_0x52af21(0x151)]===_0x21a3c9[_0x52af21(0x151)]&&_0x34039b[_0x52af21(0x1e7)]===_0x1dbdf7[_0x52af21(0x1e7)]&&_0x34039b[_0x52af21(0x179)]>Date[_0x52af21(0xc1)]())return _0x34039b[_0x52af21(0x179)]=Date[_0x52af21(0xc1)]()+WATCH_TTL_MS,clearTimeout(_0x34039b[_0x52af21(0x1e4)]),_0x34039b[_0x52af21(0x1e4)]=this[_0x52af21(0x1ac)](_0x36cf98),this[_0x52af21(0x1e0)](_0x34039b);this[_0x52af21(0x11b)](_0x36cf98);const _0xc7f528=this[_0x52af21(0x24a)][_0x52af21(0x1ef)](_0x36cf98,_0x52af21(0x123),()=>this[_0x52af21(0x11b)](_0x36cf98)),_0x314182={'ownerKey':_0x36cf98,'slotToken':_0xc7f528,'sessionHash':_0x1760ad,'workbenchConnectionId':_0x21a3c9[_0x52af21(0x19c)],'watchId':_0x21a3c9[_0x52af21(0x1a3)],'conversationId':_0x21a3c9[_0x52af21(0x151)],'templateId':_0xb261d9[_0x52af21(0x132)],'userId':_0x1dbdf7[_0x52af21(0x1e7)],'models':_0x155d06,'nodeGeneration':this[_0x52af21(0x1fb)][_0x52af21(0x145)]?.()??_0x52af21(0x265),'pendingEvents':[],'expiresAt':Date[_0x52af21(0xc1)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x314182[_0x52af21(0x1e4)]=this[_0x52af21(0x1ac)](_0x36cf98),this[_0x52af21(0x1c8)][_0x52af21(0x11f)](_0x36cf98,_0x314182),void this[_0x52af21(0x224)](_0x314182),this[_0x52af21(0x1e0)](_0x314182);}[_0x344abe(0x255)](_0x4569f0){const _0x7cd157=_0x344abe,_0x39e357=hostedRequest(_0x4569f0),_0x590ce3=hostedConversationUnwatchInputSchema[_0x7cd157(0xce)](_0x39e357[_0x7cd157(0x21d)]);this[_0x7cd157(0x1fb)][_0x7cd157(0x147)][_0x7cd157(0x1bb)](_0x39e357[_0x7cd157(0x1e7)],_0x590ce3[_0x7cd157(0x151)]);const _0x3f8a36=watchOwnerKey(requireWatchSessionHash(_0x39e357[_0x7cd157(0x1ff)]),_0x590ce3[_0x7cd157(0x19c)]),_0x57811b=this[_0x7cd157(0x1c8)][_0x7cd157(0x1a9)](_0x3f8a36);if(_0x57811b?.[_0x7cd157(0x1a3)]===_0x590ce3[_0x7cd157(0x1a3)]&&_0x57811b[_0x7cd157(0x151)]===_0x590ce3[_0x7cd157(0x151)]&&_0x57811b[_0x7cd157(0x1e7)]===_0x39e357[_0x7cd157(0x1e7)])this[_0x7cd157(0x11b)](_0x3f8a36);return{'unwatched':!![]};}[_0x344abe(0x216)](_0x9f960d,_0x70e129){const _0x308a4c=_0x344abe;return this[_0x308a4c(0x20d)](_0x9f960d,{'conversationId':_0x9f960d,'kind':_0x308a4c(0x254),'runtimeEvent':_0x70e129});}[_0x344abe(0x18d)](_0x1d8020){const _0x5cf518=_0x344abe;return this[_0x5cf518(0x10b)][_0x5cf518(0x1d5)](_0x1d8020)||this[_0x5cf518(0x1ad)][_0x5cf518(0x1d5)](_0x1d8020)||this[_0x5cf518(0x19e)][_0x5cf518(0x1d5)](_0x1d8020)||[...this[_0x5cf518(0x1c8)][_0x5cf518(0x24d)]()][_0x5cf518(0xcf)](_0x5c15b9=>_0x5c15b9[_0x5cf518(0x151)]===_0x1d8020)||[...this[_0x5cf518(0x171)][_0x5cf518(0x24d)]()][_0x5cf518(0xcf)](_0x1391e0=>_0x1391e0[_0x5cf518(0x151)]===_0x1d8020&&_0x1391e0[_0x5cf518(0x260)]===_0x5cf518(0x1e5))||[...this[_0x5cf518(0x1e3)][_0x5cf518(0x13c)]()][_0x5cf518(0xcf)](_0x2050d1=>_0x2050d1[_0x5cf518(0x133)](_0x1d8020+'\x00'));}[_0x344abe(0x1d0)](_0x55af91){const _0x462a24=_0x344abe;if(this[_0x462a24(0x18d)](_0x55af91))return undefined;return this[_0x462a24(0x10b)][_0x462a24(0xc2)](_0x55af91),()=>{const _0xeab244=_0x462a24;this[_0xeab244(0x10b)][_0xeab244(0x215)](_0x55af91);};}async[_0x344abe(0x1bf)](_0x32b5a4){const _0x16f82d=_0x344abe,_0x2da201=this[_0x16f82d(0x1fb)][_0x16f82d(0x147)][_0x16f82d(0x1da)](_0x32b5a4);await this[_0x16f82d(0x1fb)][_0x16f82d(0x254)][_0x16f82d(0xe3)]({'conversationId':_0x32b5a4['id'],'sessionId':_0x32b5a4[_0x16f82d(0xe2)],'homeDirectory':_0x2da201[_0x16f82d(0x228)]})[_0x16f82d(0xee)](()=>undefined);}[_0x344abe(0x1e6)](){const _0x845d4f=_0x344abe;for(const [_0x9d326,_0x2eb950]of this[_0x845d4f(0x1ad)]){const _0x3c5716=runInterruptionKey(_0x9d326,_0x2eb950[_0x845d4f(0x19a)]['id']);this[_0x845d4f(0xd9)][_0x845d4f(0xc2)](_0x3c5716);if(!_0x2eb950[_0x845d4f(0x1f4)]())this[_0x845d4f(0xd9)][_0x845d4f(0x215)](_0x3c5716);}for(const _0x2d2662 of[...this[_0x845d4f(0x1c8)][_0x845d4f(0x13c)]()])this[_0x845d4f(0x11b)](_0x2d2662);}[_0x344abe(0xe9)](_0x2cecea){const _0xbd12a1=_0x344abe,_0x246baa=hostedRequest(_0x2cecea),_0x4978b2=hostedConversationMessageInputSchema[_0xbd12a1(0xce)](_0x246baa[_0xbd12a1(0x21d)]),_0x56bbf2=_0x4978b2[_0xbd12a1(0x151)]+'\x00'+_0x4978b2[_0xbd12a1(0x190)],_0x1b6f48=this[_0xbd12a1(0x1e3)][_0xbd12a1(0x1a9)](_0x56bbf2);if(_0x1b6f48!==undefined)return _0x1b6f48;const _0x1d71c3=this[_0xbd12a1(0x1fb)][_0xbd12a1(0x147)][_0xbd12a1(0x160)](_0x246baa[_0xbd12a1(0x1e7)],_0x4978b2[_0xbd12a1(0x151)],_0x4978b2[_0xbd12a1(0x190)]);if(_0x1d71c3!==undefined){const _0x2e9e5e=this[_0xbd12a1(0x1fb)][_0xbd12a1(0x147)][_0xbd12a1(0x1bb)](_0x246baa[_0xbd12a1(0x1e7)],_0x4978b2[_0xbd12a1(0x151)]);return Promise[_0xbd12a1(0x15a)]({'conversation':this[_0xbd12a1(0x225)](_0x2e9e5e),'run':runFromMessage(_0x1d71c3)});}if([...this[_0xbd12a1(0x1e3)][_0xbd12a1(0x13c)]()][_0xbd12a1(0xcf)](_0x5e43ae=>_0x5e43ae[_0xbd12a1(0x133)](_0x4978b2[_0xbd12a1(0x151)]+'\x00')))return Promise[_0xbd12a1(0x183)](new Error(_0xbd12a1(0x1db)));const _0x31536d=this[_0xbd12a1(0x14a)](_0x246baa,_0x4978b2);return this[_0xbd12a1(0x1e3)][_0xbd12a1(0x11f)](_0x56bbf2,_0x31536d),void _0x31536d[_0xbd12a1(0xf3)](()=>this[_0xbd12a1(0x1e3)][_0xbd12a1(0x215)](_0x56bbf2))[_0xbd12a1(0xee)](()=>undefined),_0x31536d;}async[_0x344abe(0x14a)](_0x1d26d8,_0x4fa08d){const _0x31e8aa=_0x344abe;let _0xd8b647=this[_0x31e8aa(0x1fb)][_0x31e8aa(0x147)][_0x31e8aa(0x1bb)](_0x1d26d8[_0x31e8aa(0x1e7)],_0x4fa08d[_0x31e8aa(0x151)]);if(this[_0x31e8aa(0x10b)][_0x31e8aa(0x1d5)](_0xd8b647['id']))throw new Error(_0x31e8aa(0x259));if(_0xd8b647[_0x31e8aa(0x260)]!==_0x31e8aa(0x193))throw new Error(_0x31e8aa(0x259));if(this[_0x31e8aa(0x1ad)][_0x31e8aa(0x1d5)](_0xd8b647['id']))throw new Error(_0x31e8aa(0x1db));const _0xf83030=sessionTitleFromFirstMessage(_0x4fa08d[_0x31e8aa(0x12f)]),_0x39a4d7=_0xf83030[_0x31e8aa(0x162)]>-0x1a82+0x4*0x4ca+0x75a&&!this[_0x31e8aa(0x1fb)][_0x31e8aa(0x147)][_0x31e8aa(0x137)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647['id']),_0x59087d=runtimeModels(_0x1d26d8[_0x31e8aa(0x1a6)]),_0x21b587=this[_0x31e8aa(0x1fb)][_0x31e8aa(0x147)][_0x31e8aa(0x15f)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647['id']);let _0x23e32b,_0x23f42c,_0x32b223,_0x2419e6;const _0x1f7cd5=_0xd8b647[_0x31e8aa(0x153)]?undefined:this[_0x31e8aa(0x114)](_0xd8b647[_0x31e8aa(0x132)]);if(_0x1f7cd5!==undefined&&_0x1f7cd5!==_0xd8b647[_0x31e8aa(0x233)]){const _0x1725f2=_0xd8b647[_0x31e8aa(0x233)],_0x2e0c19=_0x1f7cd5;try{_0x23e32b=await this[_0x31e8aa(0x13b)](_0x2e0c19,_0xd8b647[_0x31e8aa(0x132)],!![]),_0x23f42c=selectModel(_0x23e32b,_0x59087d,_0x4fa08d[_0x31e8aa(0x14e)]??_0x23e32b[_0x31e8aa(0x1aa)][_0x31e8aa(0x149)]),_0x32b223=resolveMcpServers(_0x23e32b,this[_0x31e8aa(0x1fb)][_0x31e8aa(0x247)]??process.env),this[_0x31e8aa(0x23e)](_0x21b587,_0x23e32b),this[_0x31e8aa(0xd5)](_0x21b587,_0x23e32b),_0x2419e6={'previousVersionId':_0x1725f2,'targetVersionId':_0x2e0c19};}catch(_0x34702e){this[_0x31e8aa(0x19d)](_0xd8b647,_0x1725f2,_0x2e0c19,_0x34702e);throw new Error(_0x31e8aa(0x213));}}else _0x23e32b=await this[_0x31e8aa(0x13b)](_0xd8b647[_0x31e8aa(0x233)],_0xd8b647[_0x31e8aa(0x132)],!![]),_0x23f42c=selectModel(_0x23e32b,_0x59087d,_0x4fa08d[_0x31e8aa(0x14e)]??_0xd8b647[_0x31e8aa(0x14e)]);const _0x4272b6=await Promise[_0x31e8aa(0x1dd)](_0x4fa08d[_0x31e8aa(0x17f)][_0x31e8aa(0x10c)](_0x2de4ff=>this[_0x31e8aa(0x1f5)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647['id'],_0x2de4ff))),_0x78bfd8=attachmentPrompt(_0x4fa08d[_0x31e8aa(0x12f)],_0x4272b6),_0x52e7d0=join(_0x21b587[_0x31e8aa(0x1de)],_0x31e8aa(0x187)+randomUUID());await mkdir(_0x52e7d0,{'mode':0x1c0}),this[_0x31e8aa(0x223)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647,_0x31e8aa(0x23d),this[_0x31e8aa(0xc1)]());const _0x1340af=[];let _0x5f028c=![];const _0x331c7c=await this[_0x31e8aa(0x1fb)][_0x31e8aa(0x254)][_0x31e8aa(0x1b8)]({'conversationId':_0xd8b647['id'],'sessionId':_0xd8b647[_0x31e8aa(0xe2)],'clientMessageId':_0x4fa08d[_0x31e8aa(0x190)],'userPrompt':_0x4fa08d[_0x31e8aa(0x12f)],'prompt':_0x78bfd8,'attachmentIds':_0x4fa08d[_0x31e8aa(0x17f)],'access':_0x31e8aa(0x117),'modelId':_0x23f42c['id'],'models':networkModels(allowedModels(_0x23e32b,_0x59087d),_0x23e32b[_0x31e8aa(0x174)][_0x31e8aa(0x1a1)]),..._0x1d26d8[_0x31e8aa(0x158)]===undefined?{}:{'runtimeScopeId':_0x1d26d8[_0x31e8aa(0x158)]},'systemInstruction':systemInstruction(_0x23e32b),'homeDirectory':_0x21b587[_0x31e8aa(0x228)],'workspaceDirectory':_0x23e32b[_0x31e8aa(0x16d)],'temporaryDirectory':_0x52e7d0,'pathMounts':this[_0x31e8aa(0x23e)](_0x21b587,_0x23e32b),'processExecutor':this[_0x31e8aa(0xd5)](_0x21b587,_0x23e32b,_0x52e7d0),'mcpServers':_0x32b223??resolveMcpServers(_0x23e32b,this[_0x31e8aa(0x1fb)][_0x31e8aa(0x247)]??process.env),'webAccess':_0x23e32b[_0x31e8aa(0x174)][_0x31e8aa(0x1a1)]!==_0x31e8aa(0x1d1),'onEvent':_0x5c26a3=>{const _0x2aadc0=_0x31e8aa;if(_0x5f028c)this[_0x2aadc0(0x216)](_0xd8b647['id'],_0x5c26a3);else _0x1340af[_0x2aadc0(0x1b9)](_0x5c26a3);}})[_0x31e8aa(0xee)](async _0x1d9f44=>{const _0x524e6f=_0x31e8aa;this[_0x524e6f(0x223)](_0x1d26d8[_0x524e6f(0x1e7)],_0xd8b647,_0x524e6f(0x10d),this[_0x524e6f(0xc1)]()),await rm(_0x52e7d0,{'recursive':!![],'force':!![]})[_0x524e6f(0xee)](()=>undefined);if(_0x2419e6!==undefined){this[_0x524e6f(0x19d)](_0xd8b647,_0x2419e6[_0x524e6f(0x177)],_0x2419e6[_0x524e6f(0x1cf)],_0x1d9f44);throw new Error(_0x524e6f(0x213));}throw _0x1d9f44;}),_0x14487f=_0x331c7c[_0x31e8aa(0x19a)][_0x31e8aa(0x219)];let _0x41d8db=![],_0x53e450;try{this[_0x31e8aa(0x1fb)][_0x31e8aa(0x147)][_0x31e8aa(0x15c)]({'conversationId':_0xd8b647['id'],'clientMessageId':_0x4fa08d[_0x31e8aa(0x190)],'runId':_0x331c7c[_0x31e8aa(0x19a)]['id'],'userTextPresent':_0xf83030[_0x31e8aa(0x162)]>-0x1778+-0x2545+-0xd5*-0x49,'status':_0x31e8aa(0x1c0),'createdAt':_0x14487f,'updatedAt':_0x14487f}),_0x41d8db=!![];const _0x1a9c48=this[_0x31e8aa(0xc1)]();_0x53e450=await this[_0x31e8aa(0x1fb)][_0x31e8aa(0x147)][_0x31e8aa(0xd0)]({'conversationId':_0xd8b647['id'],'modelId':_0x23f42c['id'],'activityAt':_0x1a9c48,..._0x2419e6===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0x2419e6[_0x31e8aa(0x177)],'activeVersionId':_0x2419e6[_0x31e8aa(0x1cf)],'maxStorageBytes':_0x23e32b[_0x31e8aa(0x174)][_0x31e8aa(0xc0)][_0x31e8aa(0x206)]}},..._0x39a4d7?{'automaticTitle':_0xf83030}:{}});}catch(_0x4eb011){try{_0x331c7c[_0x31e8aa(0x1f4)]();}catch{}const _0x1a4298=await _0x331c7c[_0x31e8aa(0x16c)][_0x31e8aa(0xee)](()=>({'status':_0x31e8aa(0x197),'completedAt':this[_0x31e8aa(0xc1)]()}));if(_0x41d8db)try{this[_0x31e8aa(0x1fb)][_0x31e8aa(0x147)][_0x31e8aa(0xcd)](_0xd8b647['id'],_0x4fa08d[_0x31e8aa(0x190)],_0x1a4298[_0x31e8aa(0x260)],_0x1a4298[_0x31e8aa(0x175)]);}catch{}await rm(_0x52e7d0,{'recursive':!![],'force':!![]})[_0x31e8aa(0xee)](()=>undefined),this[_0x31e8aa(0x223)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647,_0x31e8aa(0x10d),_0x1a4298[_0x31e8aa(0x175)]);if(_0x2419e6!==undefined)this[_0x31e8aa(0x19d)](_0xd8b647,_0x2419e6[_0x31e8aa(0x177)],_0x2419e6[_0x31e8aa(0x1cf)],_0x4eb011);throw _0x4eb011;}_0xd8b647=_0x53e450[_0x31e8aa(0xef)];if(_0x2419e6!==undefined)this[_0x31e8aa(0x20d)](_0xd8b647['id'],{'conversationId':_0xd8b647['id'],'kind':_0x31e8aa(0x1bc),'upgrade':{'status':_0x31e8aa(0x1a8),'previousVersionId':_0x2419e6[_0x31e8aa(0x177)],'targetVersionId':_0x2419e6[_0x31e8aa(0x1cf)],'activeVersionId':_0xd8b647[_0x31e8aa(0x233)],'conversation':this[_0x31e8aa(0x225)](_0xd8b647),'error':null}});this[_0x31e8aa(0x1ad)][_0x31e8aa(0x11f)](_0xd8b647['id'],_0x331c7c),this[_0x31e8aa(0x223)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647,_0x31e8aa(0x1c0),_0x331c7c[_0x31e8aa(0x19a)][_0x31e8aa(0x219)]);if(_0x53e450[_0x31e8aa(0x1e9)])this[_0x31e8aa(0x20d)](_0xd8b647['id'],{'conversationId':_0xd8b647['id'],'kind':_0x31e8aa(0xef),'conversation':this[_0x31e8aa(0x225)](_0xd8b647)});this[_0x31e8aa(0x20d)](_0xd8b647['id'],{'conversationId':_0xd8b647['id'],'kind':_0x31e8aa(0x19a),'run':_0x331c7c[_0x31e8aa(0x19a)]}),_0x5f028c=!![];for(const _0x469eda of _0x1340af)this[_0x31e8aa(0x216)](_0xd8b647['id'],_0x469eda);_0x1340af[_0x31e8aa(0x162)]=0x1f9e+-0x1717+-0x3b*0x25;const _0x55cd50=_0x331c7c[_0x31e8aa(0x16c)][_0x31e8aa(0x150)](_0x228dea=>this[_0x31e8aa(0xf2)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647['id'],_0x4fa08d[_0x31e8aa(0x190)],_0x331c7c[_0x31e8aa(0x19a)],_0x228dea),()=>this[_0x31e8aa(0xf2)](_0x1d26d8[_0x31e8aa(0x1e7)],_0xd8b647['id'],_0x4fa08d[_0x31e8aa(0x190)],_0x331c7c[_0x31e8aa(0x19a)],{'status':_0x31e8aa(0x197),'completedAt':this[_0x31e8aa(0xc1)]()}))[_0x31e8aa(0xee)](()=>undefined)[_0x31e8aa(0xf3)](async()=>{const _0x2aba3b=_0x31e8aa;this[_0x2aba3b(0xd9)][_0x2aba3b(0x215)](runInterruptionKey(_0xd8b647['id'],_0x331c7c[_0x2aba3b(0x19a)]['id']));if(this[_0x2aba3b(0x1ad)][_0x2aba3b(0x1a9)](_0xd8b647['id'])===_0x331c7c)this[_0x2aba3b(0x1ad)][_0x2aba3b(0x215)](_0xd8b647['id']);if(this[_0x2aba3b(0x19e)][_0x2aba3b(0x1a9)](_0xd8b647['id'])===_0x55cd50)this[_0x2aba3b(0x19e)][_0x2aba3b(0x215)](_0xd8b647['id']);await rm(_0x52e7d0,{'recursive':!![],'force':!![]})[_0x2aba3b(0xee)](()=>undefined);});return this[_0x31e8aa(0x19e)][_0x31e8aa(0x11f)](_0xd8b647['id'],_0x55cd50),void _0x55cd50,{'conversation':this[_0x31e8aa(0x225)](_0xd8b647),'run':_0x331c7c[_0x31e8aa(0x19a)]};}async[_0x344abe(0xf2)](_0x34438a,_0x407d45,_0xd9c650,_0x4f0b62,_0x1fa0fb){const _0x1ed586=_0x344abe,_0x456f1a=runInterruptionKey(_0x407d45,_0x4f0b62['id']),_0x11621f=this[_0x1ed586(0xd9)][_0x1ed586(0x1d5)](_0x456f1a);let _0x32d165;try{this[_0x1ed586(0x1fb)][_0x1ed586(0x147)][_0x1ed586(0xcd)](_0x407d45,_0xd9c650,_0x1fa0fb[_0x1ed586(0x260)],_0x1fa0fb[_0x1ed586(0x175)]);try{const _0x4b0385=await this[_0x1ed586(0x1fb)][_0x1ed586(0x147)][_0x1ed586(0x229)](_0x34438a,_0x407d45);this[_0x1ed586(0x20d)](_0x407d45,{'conversationId':_0x407d45,'kind':_0x1ed586(0xdd),'files':_0x4b0385,'error':null});}catch(_0x1e892e){this[_0x1ed586(0x20d)](_0x407d45,{'conversationId':_0x407d45,'kind':_0x1ed586(0xdd),'files':this[_0x1ed586(0x1fb)][_0x1ed586(0x147)][_0x1ed586(0x14c)](_0x34438a,_0x407d45),'error':{'code':safeErrorCode(_0x1e892e,_0x1ed586(0x266)),'message':_0x1ed586(0xe5)}});}await this[_0x1ed586(0x1fb)][_0x1ed586(0x147)][_0x1ed586(0x16f)](_0x407d45,_0x1fa0fb[_0x1ed586(0x175)]),this[_0x1ed586(0x20d)](_0x407d45,{'conversationId':_0x407d45,'kind':_0x1ed586(0x19a),'run':{'id':_0x4f0b62['id'],'status':_0x1fa0fb[_0x1ed586(0x260)],'startedAt':_0x4f0b62[_0x1ed586(0x219)],'completedAt':_0x1fa0fb[_0x1ed586(0x175)]}}),await this[_0x1ed586(0x115)](_0x407d45,_0x1fa0fb[_0x1ed586(0x121)],_0x1fa0fb[_0x1ed586(0x175)])[_0x1ed586(0xee)](()=>undefined),_0x32d165=this[_0x1ed586(0x1fb)][_0x1ed586(0x147)][_0x1ed586(0x1bb)](_0x34438a,_0x407d45);}finally{this[_0x1ed586(0xd9)][_0x1ed586(0x215)](_0x456f1a);if(_0x32d165===undefined)try{_0x32d165=this[_0x1ed586(0x1fb)][_0x1ed586(0x147)][_0x1ed586(0x1bb)](_0x34438a,_0x407d45);}catch{}if(_0x32d165!==undefined)this[_0x1ed586(0x223)](_0x34438a,_0x32d165,_0x1ed586(0x10d),_0x1fa0fb[_0x1ed586(0x175)]);}if(_0x32d165!==undefined&&(_0x1fa0fb[_0x1ed586(0x260)]!==_0x1ed586(0x192)||!_0x11621f))this[_0x1ed586(0x170)](_0x34438a,_0x32d165,_0x4f0b62['id'],_0x1fa0fb);}async[_0x344abe(0x115)](_0xd7e394,_0x5c62bd,_0x4e2b4c){const _0x4e0b4b=_0x344abe,_0x2d2b52=automaticHostedConversationTitle(_0x5c62bd);if(_0x2d2b52===undefined)return;const _0x34f534=await this[_0x4e0b4b(0x1fb)][_0x4e0b4b(0x147)][_0x4e0b4b(0x181)](_0xd7e394,_0x2d2b52,_0x4e2b4c);if(_0x34f534===undefined)return;this[_0x4e0b4b(0x20d)](_0xd7e394,{'conversationId':_0xd7e394,'kind':_0x4e0b4b(0xef),'conversation':this[_0x4e0b4b(0x225)](_0x34f534)});}[_0x344abe(0x18b)](_0x2439d7){const _0x169a5e=_0x344abe,_0x4e8bbd=hostedRequest(_0x2439d7),_0xeeef81=hostedConversationIdInputSchema[_0x169a5e(0xce)](_0x4e8bbd[_0x169a5e(0x21d)]),_0x41bb89=this[_0x169a5e(0x1fb)][_0x169a5e(0x147)][_0x169a5e(0x1bb)](_0x4e8bbd[_0x169a5e(0x1e7)],_0xeeef81[_0x169a5e(0x151)]),_0x589c0a=this[_0x169a5e(0x1ad)][_0x169a5e(0x1a9)](_0xeeef81[_0x169a5e(0x151)]);if(_0x589c0a===undefined)return{'interrupted':![]};const _0x27cd40=runInterruptionKey(_0x41bb89['id'],_0x589c0a[_0x169a5e(0x19a)]['id']);this[_0x169a5e(0xd9)][_0x169a5e(0xc2)](_0x27cd40);try{const _0x178609=_0x589c0a[_0x169a5e(0x1f4)]();if(!_0x178609)return this[_0x169a5e(0xd9)][_0x169a5e(0x215)](_0x27cd40),{'interrupted':![]};return this[_0x169a5e(0x223)](_0x4e8bbd[_0x169a5e(0x1e7)],_0x41bb89,_0x169a5e(0x103),this[_0x169a5e(0xc1)]()),{'interrupted':!![]};}catch(_0x984d6d){this[_0x169a5e(0xd9)][_0x169a5e(0x215)](_0x27cd40);throw _0x984d6d;}}async[_0x344abe(0x207)](_0x4d5995){const _0x2183ab=_0x344abe,_0x50f9da=hostedRequest(_0x4d5995),_0x299237=hostedConversationConfigUpdateInputSchema[_0x2183ab(0xce)](_0x50f9da[_0x2183ab(0x21d)]),_0x52527f=this[_0x2183ab(0x1fb)][_0x2183ab(0x147)][_0x2183ab(0x1bb)](_0x50f9da[_0x2183ab(0x1e7)],_0x299237[_0x2183ab(0x151)]);if(this[_0x2183ab(0x10b)][_0x2183ab(0x1d5)](_0x52527f['id']))throw new Error(_0x2183ab(0x259));const _0x5f47a2=await this[_0x2183ab(0x13b)](_0x52527f[_0x2183ab(0x233)],_0x52527f[_0x2183ab(0x132)]),_0x27b3aa=runtimeModels(_0x50f9da[_0x2183ab(0x1a6)]),_0x29f04a=selectModel(_0x5f47a2,_0x27b3aa,_0x299237[_0x2183ab(0x14e)]??_0x52527f[_0x2183ab(0x14e)]),_0x36aa13=this[_0x2183ab(0xc1)](),_0x25e724=await this[_0x2183ab(0x1fb)][_0x2183ab(0x147)][_0x2183ab(0xc7)](_0x52527f['id'],_0x609bf0=>({..._0x609bf0,'modelId':_0x29f04a['id'],'updatedAt':_0x36aa13,'lastActivityAt':_0x36aa13}));return this[_0x2183ab(0x20d)](_0x52527f['id'],{'conversationId':_0x52527f['id'],'kind':_0x2183ab(0xc9),'conversation':this[_0x2183ab(0x225)](_0x25e724)}),{'conversation':this[_0x2183ab(0x225)](_0x25e724)};}async[_0x344abe(0x211)](_0x29a692){const _0x4fd81d=_0x344abe,_0x53801c=hostedRequest(_0x29a692),_0x5ac48f=hostedConversationMetadataUpdateInputSchema[_0x4fd81d(0xce)](_0x53801c[_0x4fd81d(0x21d)]),_0x34200d=this[_0x4fd81d(0x1fb)][_0x4fd81d(0x147)][_0x4fd81d(0x1bb)](_0x53801c[_0x4fd81d(0x1e7)],_0x5ac48f[_0x4fd81d(0x151)]);if(this[_0x4fd81d(0x10b)][_0x4fd81d(0x1d5)](_0x34200d['id']))throw new Error(_0x4fd81d(0x259));const _0x352407=this[_0x4fd81d(0xc1)](),_0x4842ac=await this[_0x4fd81d(0x1fb)][_0x4fd81d(0x147)][_0x4fd81d(0xc7)](_0x34200d['id'],_0x1a55ee=>({..._0x1a55ee,'title':_0x5ac48f[_0x4fd81d(0x121)]??_0x1a55ee[_0x4fd81d(0x121)],'titleSource':_0x5ac48f[_0x4fd81d(0x121)]===undefined?_0x1a55ee[_0x4fd81d(0x25f)]:_0x4fd81d(0x1f6),'pinnedAt':_0x5ac48f[_0x4fd81d(0x237)]===undefined?_0x1a55ee[_0x4fd81d(0x11d)]:_0x5ac48f[_0x4fd81d(0x237)]?_0x352407:null,'updatedAt':_0x352407,'lastActivityAt':_0x1a55ee[_0x4fd81d(0x108)]}));return this[_0x4fd81d(0x20d)](_0x34200d['id'],{'conversationId':_0x34200d['id'],'kind':_0x4fd81d(0xc9),'conversation':this[_0x4fd81d(0x225)](_0x4842ac)}),{'conversation':this[_0x4fd81d(0x225)](_0x4842ac)};}async[_0x344abe(0x14c)](_0x1b64bd){const _0x29e018=_0x344abe,_0x248d5c=hostedRequest(_0x1b64bd),_0x41e133=hostedConversationIdInputSchema[_0x29e018(0xce)](_0x248d5c[_0x29e018(0x21d)]);return hostedConversationFilesSchema[_0x29e018(0xce)]({'files':this[_0x29e018(0x1fb)][_0x29e018(0x147)][_0x29e018(0x14c)](_0x248d5c[_0x29e018(0x1e7)],_0x41e133[_0x29e018(0x151)])});}async[_0x344abe(0x154)](_0x4f6784){const _0x109c86=_0x344abe,_0x1d8143=hostedRequest(_0x4f6784),_0x56a467=hostedConversationFileReadInputSchema[_0x109c86(0xce)](_0x1d8143[_0x109c86(0x21d)]),_0x2e8d2e=this[_0x109c86(0x1fb)][_0x109c86(0x147)][_0x109c86(0x1d6)](_0x1d8143[_0x109c86(0x1e7)],_0x56a467[_0x109c86(0x151)],_0x56a467[_0x109c86(0xe1)]),_0x59bfc0=this[_0x109c86(0x1fb)][_0x109c86(0x147)][_0x109c86(0x12a)](_0x1d8143[_0x109c86(0x1e7)],_0x2e8d2e);await assertRegularFile(_0x59bfc0,_0x2e8d2e[_0x109c86(0x264)]);const _0x465554=_0x56a467[_0x109c86(0x25c)]??0x1a0f+-0x25b6+0x9d*0x13;if(_0x465554>_0x2e8d2e[_0x109c86(0x264)])throw new Error(_0x109c86(0x1cd));const _0x1116ad=Math[_0x109c86(0x12c)](_0x56a467[_0x109c86(0x212)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x458421=await open(_0x59bfc0,'r');try{const _0x5e4401=Buffer[_0x109c86(0x199)](Math[_0x109c86(0x12c)](_0x1116ad,Math[_0x109c86(0x1a4)](0x815*-0x1+0x1803+0x1*-0xfee,_0x2e8d2e[_0x109c86(0x264)]-_0x465554))),_0x23744b=await _0x458421[_0x109c86(0x232)](_0x5e4401,-0x1*0x1893+-0x863+-0x107b*-0x2,_0x5e4401[_0x109c86(0x162)],_0x465554),_0x55cfe5=_0x465554+_0x23744b[_0x109c86(0x1c2)],_0x5067fb=_0x55cfe5>=_0x2e8d2e[_0x109c86(0x264)];return hostedConversationFileReadResultSchema[_0x109c86(0xce)]({'file':_0x2e8d2e,'encoding':_0x109c86(0x124),'content':_0x5e4401[_0x109c86(0x209)](0x2f*0xa2+0x39*0x4f+0x3*-0xfc7,_0x23744b[_0x109c86(0x1c2)])[_0x109c86(0xff)](_0x109c86(0x124)),'offset':_0x465554,'nextOffset':_0x5067fb?null:_0x55cfe5,'eof':_0x5067fb});}finally{await _0x458421[_0x109c86(0x1fd)]();}}async[_0x344abe(0x249)](_0x4a3ec5){const _0x2e9b55=_0x344abe,_0x126a87=hostedRequest(_0x4a3ec5),_0x37cff2=hostedConversationFileDeleteInputSchema[_0x2e9b55(0xce)](_0x126a87[_0x2e9b55(0x21d)]);this[_0x2e9b55(0x167)](_0x126a87[_0x2e9b55(0x1e7)],_0x37cff2[_0x2e9b55(0x151)]);const _0x4e14f7=_0x37cff2[_0x2e9b55(0x151)]+'\x00'+_0x37cff2[_0x2e9b55(0xe1)];if(this[_0x2e9b55(0x118)][_0x2e9b55(0x1d5)](_0x4e14f7))throw new Error(_0x2e9b55(0xf8));this[_0x2e9b55(0x118)][_0x2e9b55(0xc2)](_0x4e14f7);try{const _0x5f427b=await this[_0x2e9b55(0x1fb)][_0x2e9b55(0x147)][_0x2e9b55(0x249)](_0x126a87[_0x2e9b55(0x1e7)],_0x37cff2[_0x2e9b55(0x151)],_0x37cff2[_0x2e9b55(0xe1)],this[_0x2e9b55(0xc1)]()),_0xb1bc58=hostedConversationFileDeleteResultSchema[_0x2e9b55(0xce)]({'deletedFileId':_0x37cff2[_0x2e9b55(0xe1)],'files':_0x5f427b});return this[_0x2e9b55(0x20d)](_0x37cff2[_0x2e9b55(0x151)],{'conversationId':_0x37cff2[_0x2e9b55(0x151)],'kind':_0x2e9b55(0xdd),'files':_0xb1bc58[_0x2e9b55(0xdd)],'error':null}),_0xb1bc58;}finally{this[_0x2e9b55(0x118)][_0x2e9b55(0x215)](_0x4e14f7);}}async[_0x344abe(0x17e)](_0x32f20d){const _0x52e17c=_0x344abe,_0x8db702=hostedRequest(_0x32f20d),_0x436df5=hostedConversationUploadPreflightInputSchema[_0x52e17c(0xce)](_0x8db702[_0x52e17c(0x21d)]),_0xd60c23=this[_0x52e17c(0x167)](_0x8db702[_0x52e17c(0x1e7)],_0x436df5[_0x52e17c(0x151)]),_0x48ed88=await this[_0x52e17c(0x13b)](_0xd60c23[_0x52e17c(0x233)],_0xd60c23[_0x52e17c(0x132)]),_0x12c695=this[_0x52e17c(0x1fb)][_0x52e17c(0x147)][_0x52e17c(0x15f)](_0x8db702[_0x52e17c(0x1e7)],_0xd60c23['id']),_0x12f2db=await Promise[_0x52e17c(0x1dd)](_0x436df5[_0x52e17c(0xdd)][_0x52e17c(0x10c)](async _0x1c2572=>({'name':_0x1c2572[_0x52e17c(0x25a)],'status':await this[_0x52e17c(0x17a)](_0x12c695,_0xd60c23,_0x48ed88[_0x52e17c(0x174)],_0x1c2572[_0x52e17c(0x25a)],_0x1c2572[_0x52e17c(0x264)])})));return hostedConversationUploadPreflightResultSchema[_0x52e17c(0xce)]({'files':_0x12f2db});}async[_0x344abe(0xed)](_0xcbf0df){const _0x50fdbf=_0x344abe,_0x1d8e8a=hostedRequest(_0xcbf0df),_0x1c2725=hostedConversationUploadCreateInputSchema[_0x50fdbf(0xce)](_0x1d8e8a[_0x50fdbf(0x21d)]),_0x2650d8=this[_0x50fdbf(0x167)](_0x1d8e8a[_0x50fdbf(0x1e7)],_0x1c2725[_0x50fdbf(0x151)]),_0x7f1483=_0x1d8e8a[_0x50fdbf(0x1e7)]+'\x00'+_0x2650d8['id']+'\x00'+_0x1c2725[_0x50fdbf(0x13d)],_0x38b009=this[_0x50fdbf(0x222)][_0x50fdbf(0x1a9)](_0x7f1483);if(_0x38b009!==undefined){const _0x3fdd5a=this[_0x50fdbf(0x171)][_0x50fdbf(0x1a9)](_0x38b009);if(_0x3fdd5a!==undefined)return{'upload':hostedConversationUploadSchema[_0x50fdbf(0xce)](uploadProjection(_0x3fdd5a))};}const _0xd86d59=await this[_0x50fdbf(0x13b)](_0x2650d8[_0x50fdbf(0x233)],_0x2650d8[_0x50fdbf(0x132)]),_0x10c7b7=this[_0x50fdbf(0x1fb)][_0x50fdbf(0x147)][_0x50fdbf(0x15f)](_0x1d8e8a[_0x50fdbf(0x1e7)],_0x2650d8['id']),_0x1eadc9=await this[_0x50fdbf(0x17a)](_0x10c7b7,_0x2650d8,_0xd86d59[_0x50fdbf(0x174)],_0x1c2725[_0x50fdbf(0x25a)],_0x1c2725[_0x50fdbf(0x264)]);if(_0x1eadc9===_0x50fdbf(0x21c)||_0x1eadc9===_0x50fdbf(0x246))throw new Error(_0x50fdbf(0x143));if(_0x1eadc9!==_0x50fdbf(0xf0))throw new Error(_0x50fdbf(0x169));const _0x1f60fa=this['id'](),_0x131afb=join(_0x10c7b7[_0x50fdbf(0x234)],'.'+_0x1f60fa+_0x50fdbf(0x1d7)),_0x3ce130=join(_0x10c7b7[_0x50fdbf(0x234)],_0x1c2725[_0x50fdbf(0x25a)]),_0x1a67b7=await open(_0x131afb,'wx',-0x6*-0x33+-0x1673+-0x16c1*-0x1);await _0x1a67b7[_0x50fdbf(0x1fd)]();const _0x5d988f={'uploadId':_0x1f60fa,'conversationId':_0x2650d8['id'],'userId':_0x1d8e8a[_0x50fdbf(0x1e7)],'clientRequestId':_0x1c2725[_0x50fdbf(0x13d)],'name':_0x1c2725[_0x50fdbf(0x25a)],'mimeType':_0x1c2725[_0x50fdbf(0x16a)],'size':_0x1c2725[_0x50fdbf(0x264)],'temporaryPath':_0x131afb,'targetPath':_0x3ce130,'receivedBytes':0x0,'status':_0x50fdbf(0x1e5)};return this[_0x50fdbf(0x171)][_0x50fdbf(0x11f)](_0x1f60fa,_0x5d988f),this[_0x50fdbf(0x222)][_0x50fdbf(0x11f)](_0x7f1483,_0x1f60fa),{'upload':hostedConversationUploadSchema[_0x50fdbf(0xce)](uploadProjection(_0x5d988f))};}async[_0x344abe(0x218)](_0x14409e){const _0x19a99e=_0x344abe,_0x4c68a7=hostedRequest(_0x14409e),_0x457083=hostedConversationUploadChunkInputSchema[_0x19a99e(0xce)](_0x4c68a7[_0x19a99e(0x21d)]),_0x5c7e83=this[_0x19a99e(0x25e)](_0x4c68a7[_0x19a99e(0x1e7)],_0x457083[_0x19a99e(0x151)],_0x457083[_0x19a99e(0x173)]);if(_0x5c7e83[_0x19a99e(0x260)]!==_0x19a99e(0x1e5))throw new Error(_0x19a99e(0xdf));if(_0x457083[_0x19a99e(0x25c)]!==_0x5c7e83[_0x19a99e(0x208)])throw new Error(_0x19a99e(0x248));const _0x2ea185=Buffer[_0x19a99e(0x242)](_0x457083[_0x19a99e(0x20c)],_0x19a99e(0x124));if(_0x5c7e83[_0x19a99e(0x208)]+_0x2ea185[_0x19a99e(0x250)]>_0x5c7e83[_0x19a99e(0x264)])throw new Error(_0x19a99e(0x127));await assertUploadTemporaryFile(_0x5c7e83[_0x19a99e(0x20f)],_0x5c7e83[_0x19a99e(0x208)]);const _0x555fe7=await open(_0x5c7e83[_0x19a99e(0x20f)],'r+');try{await _0x555fe7[_0x19a99e(0x152)](_0x2ea185,-0x4*0x42a+0x1197+-0xef*0x1,_0x2ea185[_0x19a99e(0x250)],_0x5c7e83[_0x19a99e(0x208)]);}finally{await _0x555fe7[_0x19a99e(0x1fd)]();}return _0x5c7e83[_0x19a99e(0x208)]+=_0x2ea185[_0x19a99e(0x250)],{'upload':hostedConversationUploadSchema[_0x19a99e(0xce)](uploadProjection(_0x5c7e83))};}[_0x344abe(0xc4)](_0x1d14c0){const _0x36452a=_0x344abe,_0x19c350=hostedRequest(_0x1d14c0),_0x5db374=hostedConversationUploadControlInputSchema[_0x36452a(0xce)](_0x19c350[_0x36452a(0x21d)]),_0x37c33e=this[_0x36452a(0x25e)](_0x19c350[_0x36452a(0x1e7)],_0x5db374[_0x36452a(0x151)],_0x5db374[_0x36452a(0x173)]);return{'upload':hostedConversationUploadSchema[_0x36452a(0xce)](uploadProjection(_0x37c33e))};}async[_0x344abe(0xdc)](_0x5663fe){const _0x33b32a=_0x344abe,_0x2f6046=hostedRequest(_0x5663fe),_0x5594a3=hostedConversationUploadControlInputSchema[_0x33b32a(0xce)](_0x2f6046[_0x33b32a(0x21d)]),_0x4b58fa=this[_0x33b32a(0x25e)](_0x2f6046[_0x33b32a(0x1e7)],_0x5594a3[_0x33b32a(0x151)],_0x5594a3[_0x33b32a(0x173)]);if(_0x4b58fa[_0x33b32a(0x260)]===_0x33b32a(0xd4))return{'upload':hostedConversationUploadSchema[_0x33b32a(0xce)](uploadProjection(_0x4b58fa))};if(_0x4b58fa[_0x33b32a(0x260)]!==_0x33b32a(0x1e5)||_0x4b58fa[_0x33b32a(0x208)]!==_0x4b58fa[_0x33b32a(0x264)])throw new Error(_0x33b32a(0x116));const _0x587727=this[_0x33b32a(0x167)](_0x2f6046[_0x33b32a(0x1e7)],_0x4b58fa[_0x33b32a(0x151)]),_0x3d44c7=await this[_0x33b32a(0x13b)](_0x587727[_0x33b32a(0x233)],_0x587727[_0x33b32a(0x132)]);if(_0x4b58fa[_0x33b32a(0x264)]>_0x3d44c7[_0x33b32a(0x174)][_0x33b32a(0xc0)][_0x33b32a(0x112)]||_0x587727[_0x33b32a(0xe8)][_0x33b32a(0x1ce)]+_0x4b58fa[_0x33b32a(0x264)]>_0x587727[_0x33b32a(0xe8)][_0x33b32a(0x15d)])throw new Error(_0x33b32a(0x143));await assertUploadTemporaryFile(_0x4b58fa[_0x33b32a(0x20f)],_0x4b58fa[_0x33b32a(0x264)]);const _0x244ab5=await lstat(_0x4b58fa[_0x33b32a(0x13a)])[_0x33b32a(0xee)](_0x2d6f5e=>{const _0x5c6d1c=_0x33b32a;if(_0x2d6f5e[_0x5c6d1c(0x111)]===_0x5c6d1c(0x105))return undefined;throw _0x2d6f5e;});if(_0x244ab5!==undefined)throw new Error(_0x33b32a(0x169));const _0x508397=await open(_0x4b58fa[_0x33b32a(0x20f)],'r+');try{await _0x508397[_0x33b32a(0x258)]();}finally{await _0x508397[_0x33b32a(0x1fd)]();}await rename(_0x4b58fa[_0x33b32a(0x20f)],_0x4b58fa[_0x33b32a(0x13a)]);const _0x49ab1d=this[_0x33b32a(0xc1)]();try{await utimes(_0x4b58fa[_0x33b32a(0x13a)],new Date(_0x49ab1d),new Date(_0x49ab1d));const _0x4ec148={'id':this[_0x33b32a(0x1fb)][_0x33b32a(0x147)][_0x33b32a(0x1f3)](_0x4b58fa[_0x33b32a(0x151)],_0x33b32a(0x18e),_0x4b58fa[_0x33b32a(0x25a)]),'conversationId':_0x4b58fa[_0x33b32a(0x151)],'category':_0x33b32a(0x18e),'relativePath':_0x4b58fa[_0x33b32a(0x25a)],'displayName':_0x4b58fa[_0x33b32a(0x25a)],'mimeType':_0x4b58fa[_0x33b32a(0x16a)],'size':_0x4b58fa[_0x33b32a(0x264)],'source':_0x33b32a(0x262),'createdAt':_0x49ab1d,'updatedAt':_0x49ab1d};return _0x4b58fa[_0x33b32a(0x230)]=await this[_0x33b32a(0x1fb)][_0x33b32a(0x147)][_0x33b32a(0x1f1)](_0x2f6046[_0x33b32a(0x1e7)],_0x4ec148),_0x4b58fa[_0x33b32a(0x260)]=_0x33b32a(0xd4),this[_0x33b32a(0x20d)](_0x4b58fa[_0x33b32a(0x151)],{'conversationId':_0x4b58fa[_0x33b32a(0x151)],'kind':_0x33b32a(0xdd),'files':this[_0x33b32a(0x1fb)][_0x33b32a(0x147)][_0x33b32a(0x14c)](_0x2f6046[_0x33b32a(0x1e7)],_0x4b58fa[_0x33b32a(0x151)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x33b32a(0xce)](uploadProjection(_0x4b58fa))};}catch(_0x4c578c){await rename(_0x4b58fa[_0x33b32a(0x13a)],_0x4b58fa[_0x33b32a(0x20f)])[_0x33b32a(0xee)](()=>undefined);throw _0x4c578c;}}async[_0x344abe(0x19b)](_0x208f6d){const _0x249172=_0x344abe,_0x29ec77=hostedRequest(_0x208f6d),_0x35e8a6=hostedConversationUploadControlInputSchema[_0x249172(0xce)](_0x29ec77[_0x249172(0x21d)]),_0x261652=this[_0x249172(0x25e)](_0x29ec77[_0x249172(0x1e7)],_0x35e8a6[_0x249172(0x151)],_0x35e8a6[_0x249172(0x173)]);if(_0x261652[_0x249172(0x260)]===_0x249172(0xd4))throw new Error(_0x249172(0xdf));return _0x261652[_0x249172(0x260)]=_0x249172(0x252),await rm(_0x261652[_0x249172(0x20f)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x249172(0xce)](uploadProjection(_0x261652))};}async[_0x344abe(0x215)](_0x228f8f){const _0x550d84=_0x344abe,_0x55873c=hostedRequest(_0x228f8f),_0x5ba217=hostedConversationIdInputSchema[_0x550d84(0xce)](_0x55873c[_0x550d84(0x21d)]),_0x271690=this[_0x550d84(0x1fb)][_0x550d84(0x147)][_0x550d84(0x1bb)](_0x55873c[_0x550d84(0x1e7)],_0x5ba217[_0x550d84(0x151)]);if(this[_0x550d84(0x10b)][_0x550d84(0x1d5)](_0x271690['id']))throw new Error(_0x550d84(0x259));this[_0x550d84(0x10b)][_0x550d84(0xc2)](_0x271690['id']);try{await this[_0x550d84(0x144)](_0x271690['id']);const _0x5e3350=this[_0x550d84(0x1ad)][_0x550d84(0x1a9)](_0x271690['id']);if(_0x5e3350!==undefined){const _0x1b6987=runInterruptionKey(_0x271690['id'],_0x5e3350[_0x550d84(0x19a)]['id']);this[_0x550d84(0xd9)][_0x550d84(0xc2)](_0x1b6987);if(!_0x5e3350[_0x550d84(0x1f4)]())this[_0x550d84(0xd9)][_0x550d84(0x215)](_0x1b6987);}await this[_0x550d84(0x157)](_0x55873c[_0x550d84(0x1e7)],_0x271690['id']);const _0x489502=this[_0x550d84(0x1fb)][_0x550d84(0x147)][_0x550d84(0x15f)](_0x55873c[_0x550d84(0x1e7)],_0x271690['id']);return await this[_0x550d84(0x1fb)][_0x550d84(0x254)][_0x550d84(0xe3)]({'conversationId':_0x271690['id'],'sessionId':_0x271690[_0x550d84(0xe2)],'homeDirectory':_0x489502[_0x550d84(0x228)]})[_0x550d84(0xee)](()=>undefined),await this[_0x550d84(0x19e)][_0x550d84(0x1a9)](_0x271690['id'])?.[_0x550d84(0xee)](()=>undefined),this[_0x550d84(0x12e)](_0x271690['id']),await this[_0x550d84(0x1fb)][_0x550d84(0x147)][_0x550d84(0x176)](_0x271690['id']),this[_0x550d84(0x180)][_0x550d84(0x215)](_0x271690['id']),hostedConversationDeleteResultSchema[_0x550d84(0xce)]({'deletedConversationId':_0x271690['id']});}finally{this[_0x550d84(0x10b)][_0x550d84(0x215)](_0x271690['id']);}}async[_0x344abe(0x144)](_0x497ed4){const _0xbfe591=_0x344abe,_0x4e7c6f=_0x497ed4+'\x00',_0xb4e1c1=[...this[_0xbfe591(0x1e3)][_0xbfe591(0x188)]()][_0xbfe591(0x204)](([_0x5b40d4])=>_0x5b40d4[_0xbfe591(0x133)](_0x4e7c6f))[_0xbfe591(0x10c)](([,_0x44a03a])=>_0x44a03a);await Promise[_0xbfe591(0x1b4)](_0xb4e1c1);}async[_0x344abe(0x224)](_0x26f76f){const _0x4ca308=_0x344abe;try{const _0x4a7f7a=await this[_0x4ca308(0x1a9)]({'conversationId':_0x26f76f[_0x4ca308(0x151)],'__requestUserId':_0x26f76f[_0x4ca308(0x1e7)],'__marAgentModels':_0x26f76f[_0x4ca308(0x1a6)]});if(this[_0x4ca308(0x1c8)][_0x4ca308(0x1a9)](_0x26f76f[_0x4ca308(0x256)])!==_0x26f76f)return;this[_0x4ca308(0x1fb)][_0x4ca308(0x24b)]?.({'type':_0x4ca308(0xd2),'workbenchConnectionId':_0x26f76f[_0x4ca308(0x19c)],'watchId':_0x26f76f[_0x4ca308(0x1a3)],'nodeGeneration':_0x26f76f[_0x4ca308(0x145)],'nodeId':this[_0x4ca308(0x1fb)][_0x4ca308(0x210)](),'templateId':_0x26f76f[_0x4ca308(0x132)],'conversationId':_0x26f76f[_0x4ca308(0x151)],'revision':0x1,'snapshotSequence':++this[_0x4ca308(0x1f9)],'expiresAt':_0x26f76f[_0x4ca308(0x179)],'payload':_0x4a7f7a}),_0x26f76f[_0x4ca308(0x142)]=!![];for(const _0x1a0e2f of _0x26f76f[_0x4ca308(0x106)])this[_0x4ca308(0x1ab)](_0x26f76f,_0x1a0e2f);_0x26f76f[_0x4ca308(0x106)][_0x4ca308(0x162)]=0x33*0x89+-0x1*-0xdf1+-0x293c;}catch(_0x1e4144){if(this[_0x4ca308(0x1c8)][_0x4ca308(0x1a9)](_0x26f76f[_0x4ca308(0x256)])!==_0x26f76f)return;this[_0x4ca308(0x1fb)][_0x4ca308(0x24b)]?.({'type':_0x4ca308(0x178),'workbenchConnectionId':_0x26f76f[_0x4ca308(0x19c)],'watchType':_0x4ca308(0x123),'watchId':_0x26f76f[_0x4ca308(0x1a3)],'nodeGeneration':_0x26f76f[_0x4ca308(0x145)],'nodeId':this[_0x4ca308(0x1fb)][_0x4ca308(0x210)](),'templateId':_0x26f76f[_0x4ca308(0x132)],'conversationId':_0x26f76f[_0x4ca308(0x151)],'code':safeErrorCode(_0x1e4144,_0x4ca308(0x1fa)),'message':_0x4ca308(0x128)}),this[_0x4ca308(0x11b)](_0x26f76f[_0x4ca308(0x256)]);}}[_0x344abe(0x22c)](_0x3a6277){const _0x3abdd8=_0x344abe;return this[_0x3abdd8(0x180)][_0x3abdd8(0x1a9)](_0x3a6277)??{'status':_0x3abdd8(0x10d),'version':0x0,'updatedAt':0x0};}[_0x344abe(0x225)](_0x1ffc80){const _0x43eb92=_0x344abe;return hostedConversationSummary(_0x1ffc80,this[_0x43eb92(0x22c)](_0x1ffc80['id']));}[_0x344abe(0x223)](_0x151997,_0x4a5290,_0x4f9ef9,_0x37c88d){const _0x44582b=_0x344abe,_0x41f0d2=this[_0x44582b(0x22c)](_0x4a5290['id']),_0x2039b2={'status':_0x4f9ef9,'version':_0x41f0d2[_0x44582b(0x11a)]+(-0x670+0x248b+-0x1e1a),'updatedAt':_0x37c88d};this[_0x44582b(0x180)][_0x44582b(0x11f)](_0x4a5290['id'],_0x2039b2),this[_0x44582b(0x21a)]({'kind':_0x44582b(0x22c),'userId':_0x151997,'templateId':_0x4a5290[_0x44582b(0x132)],'conversationId':_0x4a5290['id'],'activity':_0x2039b2});}[_0x344abe(0x170)](_0x212b32,_0x3534eb,_0x56d078,_0x175f98){const _0x2d1fa0=_0x344abe;this[_0x2d1fa0(0x21a)]({'kind':_0x2d1fa0(0xd6),'event':{'runId':_0x56d078,'sequence':0x1,'eventType':_0x2d1fa0(0xd6),'payload':{'targetType':_0x2d1fa0(0x11e),'userId':_0x212b32,'templateId':_0x3534eb[_0x2d1fa0(0x132)],'conversationId':_0x3534eb['id'],'conversationTitle':_0x3534eb[_0x2d1fa0(0x121)],'runId':_0x56d078,'notificationId':_0x2d1fa0(0x1ba)+this[_0x2d1fa0(0x1fb)][_0x2d1fa0(0x210)]()+':'+_0x3534eb['id']+':'+_0x56d078,'kind':_0x2d1fa0(0x17b),'outcome':_0x175f98[_0x2d1fa0(0x260)],'occurredAt':_0x175f98[_0x2d1fa0(0x175)]},'createdAt':_0x175f98[_0x2d1fa0(0x175)]}});}[_0x344abe(0x21a)](_0x4a3b21){const _0x23d903=_0x344abe,_0x4e7066=this[_0x23d903(0x1fb)][_0x23d903(0x131)]?.(_0x4a3b21)??{'sequence':++this[_0x23d903(0x172)],'category':_0x23d903(0x123),'payload':_0x4a3b21};if(_0x4e7066!==undefined)this[_0x23d903(0x1fb)][_0x23d903(0x159)]?.(_0x4e7066);}[_0x344abe(0x19d)](_0x6cfd05,_0xff604,_0x361e97,_0x309f3e){const _0x57e007=_0x344abe;this[_0x57e007(0x20d)](_0x6cfd05['id'],{'conversationId':_0x6cfd05['id'],'kind':_0x57e007(0x1bc),'upgrade':{'status':_0x57e007(0x197),'previousVersionId':_0xff604,'targetVersionId':_0x361e97,'activeVersionId':_0x6cfd05[_0x57e007(0x233)],'conversation':this[_0x57e007(0x225)](_0x6cfd05),'error':{'code':safeErrorCode(_0x309f3e,_0x57e007(0x213)),'message':_0x57e007(0x1a2)}}});}[_0x344abe(0x20d)](_0x2f0f72,_0x22c0ff){const _0x34c8cf=_0x344abe,_0x5b407b=[...this[_0x34c8cf(0x1c8)][_0x34c8cf(0x24d)]()][_0x34c8cf(0x204)](_0x373093=>_0x373093[_0x34c8cf(0x151)]===_0x2f0f72);if(_0x5b407b[_0x34c8cf(0x162)]===-0xf19+0x2ab+0x637*0x2)return![];const _0x2fedd7=this[_0x34c8cf(0x1fb)][_0x34c8cf(0x131)]?.(_0x22c0ff)??{'sequence':++this[_0x34c8cf(0x172)],'category':_0x34c8cf(0x123),'payload':_0x22c0ff};if(_0x2fedd7===undefined)return![];for(const _0x2c76fc of _0x5b407b){if(!_0x2c76fc[_0x34c8cf(0x142)])_0x2c76fc[_0x34c8cf(0x106)][_0x34c8cf(0x1b9)](_0x2fedd7);else this[_0x34c8cf(0x1ab)](_0x2c76fc,_0x2fedd7);}return!![];}[_0x344abe(0x1ab)](_0x46b55a,_0x2c2a1f){const _0x242334=_0x344abe;this[_0x242334(0x1fb)][_0x242334(0x24b)]?.({'type':_0x242334(0xf7),'workbenchConnectionId':_0x46b55a[_0x242334(0x19c)],'watchId':_0x46b55a[_0x242334(0x1a3)],'nodeGeneration':_0x46b55a[_0x242334(0x145)],'nodeId':this[_0x242334(0x1fb)][_0x242334(0x210)](),'templateId':_0x46b55a[_0x242334(0x132)],'conversationId':_0x46b55a[_0x242334(0x151)],'expiresAt':_0x46b55a[_0x242334(0x179)],'event':_0x2c2a1f});}[_0x344abe(0x1e0)](_0x1a3ca3){const _0x891dd1=_0x344abe;return{'accepted':!![],'watchId':_0x1a3ca3[_0x891dd1(0x1a3)],'nodeGeneration':_0x1a3ca3[_0x891dd1(0x145)],'expiresAt':_0x1a3ca3[_0x891dd1(0x179)]};}[_0x344abe(0x12e)](_0x8b1f3c){const _0x41ff47=_0x344abe;for(const _0x2d253b of[...this[_0x41ff47(0x1c8)][_0x41ff47(0x24d)]()])if(_0x2d253b[_0x41ff47(0x151)]===_0x8b1f3c)this[_0x41ff47(0x11b)](_0x2d253b[_0x41ff47(0x256)]);}[_0x344abe(0x11b)](_0x25fa25){const _0x23f70c=_0x344abe,_0x1cca42=this[_0x23f70c(0x1c8)][_0x23f70c(0x1a9)](_0x25fa25);if(_0x1cca42===undefined)return;clearTimeout(_0x1cca42[_0x23f70c(0x1e4)]),this[_0x23f70c(0x1c8)][_0x23f70c(0x215)](_0x25fa25),this[_0x23f70c(0x24a)][_0x23f70c(0x1c7)](_0x25fa25,_0x1cca42[_0x23f70c(0x122)]);}[_0x344abe(0x1ac)](_0x56ff36){const _0x57dc9e=_0x344abe,_0x269016=setTimeout(()=>this[_0x57dc9e(0x11b)](_0x56ff36),WATCH_TTL_MS);return _0x269016[_0x57dc9e(0xe0)](),_0x269016;}[_0x344abe(0x167)](_0x40b60,_0x2517c6){const _0x3c81a7=_0x344abe,_0xab781a=this[_0x3c81a7(0x1fb)][_0x3c81a7(0x147)][_0x3c81a7(0x1bb)](_0x40b60,_0x2517c6);if(this[_0x3c81a7(0x10b)][_0x3c81a7(0x1d5)](_0xab781a['id']))throw new Error(_0x3c81a7(0x259));if(_0xab781a[_0x3c81a7(0x260)]!==_0x3c81a7(0x193))throw new Error(_0x3c81a7(0x259));return _0xab781a;}[_0x344abe(0x25e)](_0x3f4707,_0x30bd20,_0xd37604){const _0x3d423c=_0x344abe;this[_0x3d423c(0x1fb)][_0x3d423c(0x147)][_0x3d423c(0x1bb)](_0x3f4707,_0x30bd20);const _0x72ffd5=this[_0x3d423c(0x171)][_0x3d423c(0x1a9)](_0xd37604);if(_0x72ffd5===undefined||_0x72ffd5[_0x3d423c(0x1e7)]!==_0x3f4707||_0x72ffd5[_0x3d423c(0x151)]!==_0x30bd20)throw new Error(_0x3d423c(0x130));return _0x72ffd5;}async[_0x344abe(0x157)](_0x4ccff3,_0x1b536c){const _0x20cfdb=_0x344abe;for(const _0x4856df of this[_0x20cfdb(0x171)][_0x20cfdb(0x24d)]()){if(_0x4856df[_0x20cfdb(0x1e7)]!==_0x4ccff3||_0x4856df[_0x20cfdb(0x151)]!==_0x1b536c)continue;_0x4856df[_0x20cfdb(0x260)]===_0x20cfdb(0x1e5)&&(_0x4856df[_0x20cfdb(0x260)]=_0x20cfdb(0x252),await rm(_0x4856df[_0x20cfdb(0x20f)],{'force':!![]})[_0x20cfdb(0xee)](()=>undefined));}}async[_0x344abe(0x1f5)](_0x90e245,_0x4b9ec7,_0x426aaf){const _0x52e0c1=_0x344abe,_0x569c4c=this[_0x52e0c1(0x1fb)][_0x52e0c1(0x147)][_0x52e0c1(0x1d6)](_0x90e245,_0x4b9ec7,_0x426aaf);if(_0x569c4c[_0x52e0c1(0x166)]!==_0x52e0c1(0x18e))throw new Error(_0x52e0c1(0xe7));return await assertRegularFile(this[_0x52e0c1(0x1fb)][_0x52e0c1(0x147)][_0x52e0c1(0x12a)](_0x90e245,_0x569c4c),_0x569c4c[_0x52e0c1(0x264)]),_0x569c4c;}async[_0x344abe(0x17a)](_0x3bd5bf,_0x3ad55c,_0x39c90e,_0x425004,_0x234005){const _0x2fcffc=_0x344abe;if(_0x234005>_0x39c90e[_0x2fcffc(0xc0)][_0x2fcffc(0x112)])return _0x2fcffc(0x246);if(_0x3ad55c[_0x2fcffc(0xe8)][_0x2fcffc(0x1ce)]+_0x234005>_0x3ad55c[_0x2fcffc(0xe8)][_0x2fcffc(0x15d)])return _0x2fcffc(0x21c);const _0x2e2b17=await lstat(join(_0x3bd5bf[_0x2fcffc(0x234)],_0x425004))[_0x2fcffc(0xee)](_0x25b027=>{const _0x574f87=_0x2fcffc;if(_0x25b027[_0x574f87(0x111)]===_0x574f87(0x105))return undefined;throw _0x25b027;});return _0x2e2b17===undefined?_0x2fcffc(0xf0):_0x2fcffc(0x196);}[_0x344abe(0x23e)](_0x1b69c0,_0x3a3853){const _0x4aa0c2=_0x344abe,_0x4c13df=[{'logicalPath':_0x4aa0c2(0x240),'physicalPath':_0x3a3853[_0x4aa0c2(0x16d)],'writable':![]},{'logicalPath':_0x4aa0c2(0x19f),'physicalPath':_0x1b69c0[_0x4aa0c2(0x234)],'writable':!![]},{'logicalPath':_0x4aa0c2(0x1eb),'physicalPath':_0x1b69c0[_0x4aa0c2(0x205)],'writable':!![]}];if(_0x3a3853[_0x4aa0c2(0x191)]!==undefined)_0x4c13df[_0x4aa0c2(0x1b9)]({'logicalPath':_0x3a3853[_0x4aa0c2(0x191)],'physicalPath':_0x3a3853[_0x4aa0c2(0x16d)],'writable':![]},{'logicalPath':join(_0x3a3853[_0x4aa0c2(0x191)],_0x4aa0c2(0x1ee)),'physicalPath':_0x1b69c0[_0x4aa0c2(0x234)],'writable':!![]},{'logicalPath':join(_0x3a3853[_0x4aa0c2(0x191)],_0x4aa0c2(0x18f)),'physicalPath':_0x1b69c0[_0x4aa0c2(0x205)],'writable':!![]});return _0x4c13df;}[_0x344abe(0xd5)](_0x175c5f,_0x43ba1d,_0x247ac1=_0x175c5f[_0x344abe(0x1de)]){const _0x29c014=_0x344abe;return this[_0x29c014(0x1fb)][_0x29c014(0x139)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x43ba1d[_0x29c014(0x16d)],..._0x43ba1d[_0x29c014(0x191)]===undefined?{}:{'sourceWorkspacePath':_0x43ba1d[_0x29c014(0x191)]},'inboxDirectory':_0x175c5f[_0x29c014(0x234)],'outputDirectory':_0x175c5f[_0x29c014(0x205)],'temporaryDirectory':_0x247ac1,'networkMode':_0x43ba1d[_0x29c014(0x174)][_0x29c014(0x1a1)]});}[_0x344abe(0x114)](_0x1f7820){const _0x4ed90f=_0x344abe,_0x3bfded=this[_0x4ed90f(0x1fb)][_0x4ed90f(0x261)][_0x4ed90f(0x136)][_0x4ed90f(0x113)](_0x4ed90f(0x155))[_0x4ed90f(0x1a9)](_0x1f7820);if(_0x3bfded===undefined)return undefined;if(typeof _0x3bfded['id']!==_0x4ed90f(0x23b))throw new Error(_0x4ed90f(0xd1));return _0x3bfded['id'];}async[_0x344abe(0x13b)](_0x5b52a9,_0x3c9b92,_0x3e01d5=![]){const _0x3817d1=_0x344abe,_0x259c49=this[_0x3817d1(0x1fb)][_0x3817d1(0x261)][_0x3817d1(0x136)][_0x3817d1(0x113)](_0x3817d1(0xec))[_0x3817d1(0x1a9)](_0x5b52a9,_0x3c9b92);if(_0x259c49===undefined||_0x259c49[_0x3817d1(0x260)]!==_0x3817d1(0x18c)&&_0x259c49[_0x3817d1(0x260)]!==_0x3817d1(0x227)||_0x259c49[_0x3817d1(0x1d4)]!==HOST_POLICY_VERSION||typeof _0x259c49[_0x3817d1(0x1f7)]!==_0x3817d1(0x23b)||typeof _0x259c49[_0x3817d1(0x257)]!==_0x3817d1(0x23b)||typeof _0x259c49[_0x3817d1(0x23a)]!==_0x3817d1(0x23b)||typeof _0x259c49[_0x3817d1(0x15b)]!==_0x3817d1(0x23b)||typeof _0x259c49[_0x3817d1(0x194)]!==_0x3817d1(0x23b))throw new Error(_0x3817d1(0xd1));const _0x168ded=this[_0x3817d1(0x1fb)][_0x3817d1(0x147)][_0x3817d1(0x236)](_0x259c49[_0x3817d1(0x1f7)]),_0x3c7270=join(_0x168ded,_0x3817d1(0x1f0)),_0x56026d=join(_0x168ded,_0x3817d1(0x22b)),_0x391d44=await lstat(_0x3c7270)[_0x3817d1(0xee)](()=>undefined),_0x4ee45b=await lstat(_0x56026d)[_0x3817d1(0xee)](()=>undefined);if(_0x391d44===undefined||!_0x391d44[_0x3817d1(0x238)]()||_0x391d44[_0x3817d1(0x1df)]()||_0x4ee45b===undefined||!_0x4ee45b[_0x3817d1(0x243)]()||_0x4ee45b[_0x3817d1(0x1df)]())throw new Error(_0x3817d1(0xd1));let _0x59dede;try{const _0x33a086=await readFile(_0x3c7270,_0x3817d1(0x21f)),_0x52bd7a=_0x33a086[_0x3817d1(0x140)]('\x0a')?_0x33a086[_0x3817d1(0x1b3)](0xf36+0x873+-0x17a9,-(-0xcd*0xc+-0x14f9+0x1e96)):_0x33a086;if(_0x52bd7a!==_0x259c49[_0x3817d1(0x257)]||createHash(_0x3817d1(0x12b))[_0x3817d1(0x23f)](_0x52bd7a)[_0x3817d1(0xe4)](_0x3817d1(0x16b))!==_0x259c49[_0x3817d1(0x15b)])throw new Error(_0x3817d1(0xd1));_0x59dede=JSON[_0x3817d1(0xce)](_0x52bd7a);}catch{throw new Error(_0x3817d1(0xd1));}if(!record(_0x59dede))throw new Error(_0x3817d1(0xd1));const _0x3cb8bf=publishedTemplateSnapshot(_0x59dede),_0x5eb9c0=publishedTemplateDraft(_0x3cb8bf[_0x3817d1(0xcb)],_0x59dede[_0x3817d1(0x174)]),_0x329a23=_0x5eb9c0[_0x3817d1(0x174)],_0x25d1c4=publishedMcpServers(_0x59dede[_0x3817d1(0x217)]),_0x198d84=publishedTemplateContentHash(_0x3cb8bf[_0x3817d1(0x1a7)],_0x3cb8bf[_0x3817d1(0x188)],_0x3cb8bf[_0x3817d1(0xcb)]),_0x179448=_0x3cb8bf[_0x3817d1(0x188)][_0x3817d1(0x22d)]((_0x235ac3,_0x55549b)=>_0x235ac3+_0x55549b[_0x3817d1(0x264)],-0x1*-0xccf+0x3e7+-0x2c9*0x6);if(_0x59dede[_0x3817d1(0xf4)]!==_0x259c49[_0x3817d1(0x194)]||createHash(_0x3817d1(0x12b))[_0x3817d1(0x23f)](JSON[_0x3817d1(0x244)](_0x25d1c4))[_0x3817d1(0xe4)](_0x3817d1(0x16b))!==_0x259c49[_0x3817d1(0x194)]||_0x59dede[_0x3817d1(0x120)]!==_0x259c49[_0x3817d1(0x23a)]||_0x198d84!==_0x259c49[_0x3817d1(0x23a)]||_0x259c49[_0x3817d1(0x195)]!==_0x3cb8bf[_0x3817d1(0x188)][_0x3817d1(0x162)]||_0x259c49[_0x3817d1(0x203)]!==_0x179448)throw new Error(_0x3817d1(0xd1));if(_0x59dede[_0x3817d1(0x231)]!==_0x5b52a9||_0x59dede[_0x3817d1(0x132)]!==_0x3c9b92||_0x59dede[_0x3817d1(0x20e)]!==HOST_POLICY_VERSION||_0x329a23[_0x3817d1(0x132)]!==_0x3c9b92||_0x329a23[_0x3817d1(0x210)]!==this[_0x3817d1(0x1fb)][_0x3817d1(0x210)]())throw new Error(_0x3817d1(0xd1));if(_0x3e01d5)await verifyPublishedTemplateContent(_0x56026d,_0x3cb8bf[_0x3817d1(0x1a7)],_0x3cb8bf[_0x3817d1(0x188)]);return{'id':_0x5b52a9,'templateId':_0x3c9b92,'storageKey':_0x259c49[_0x3817d1(0x1f7)],'templateDirectory':_0x56026d,..._0x3cb8bf[_0x3817d1(0x191)]===undefined?{}:{'sourceWorkspacePath':_0x3cb8bf[_0x3817d1(0x191)]},'draft':_0x329a23,'modelPolicy':_0x5eb9c0[_0x3817d1(0x1aa)],'mcpServers':_0x25d1c4};}}function hostedRequest(_0x36889f){const _0x9229cb=_0x344abe;if(!record(_0x36889f))throw new Error(_0x9229cb(0x20b));const {__requestUserId:_0x7f6e4f,__template:_0x2d9a9d,__marAgentModel:_0x45c84a,__marAgentModels:_0x4c3e02,__marAgentRuntimeScopeId:_0x506961,__workspaceWatchSessionHash:_0x12bf2d,__templateDeleted:_0x14c72f,..._0x1598f6}=_0x36889f;if(typeof _0x7f6e4f!==_0x9229cb(0xd3)||!Number[_0x9229cb(0x221)](_0x7f6e4f)||_0x7f6e4f<=0x24b6+0x107*-0xd+-0x175b)throw new Error(_0x9229cb(0x20b));if(_0x14c72f!==undefined&&_0x14c72f!==!![])throw new Error(_0x9229cb(0x20b));if(_0x506961!==undefined&&(typeof _0x506961!==_0x9229cb(0x23b)||_0x506961[_0x9229cb(0x162)]===-0x99e+-0x246+0xbe4))throw new Error(_0x9229cb(0x20b));return{'data':_0x1598f6,'userId':_0x7f6e4f,..._0x2d9a9d===undefined?{}:{'template':_0x2d9a9d},..._0x45c84a===undefined?{}:{'model':_0x45c84a},..._0x4c3e02===undefined?{}:{'models':_0x4c3e02},..._0x506961===undefined?{}:{'runtimeScopeId':_0x506961},..._0x12bf2d===undefined?{}:{'sessionHash':_0x12bf2d},..._0x14c72f===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x2e45f8){const _0x355b03=_0x344abe;if(typeof _0x2e45f8!==_0x355b03(0x23b)||_0x2e45f8[_0x355b03(0x162)]===0x7d9+-0x1df9+0x1620)throw new Error(_0x355b03(0x20b));return _0x2e45f8;}function watchOwnerKey(_0x107c8d,_0x5650a9){return _0x107c8d+':'+_0x5650a9;}function runtimeModels(_0x7b3532){const _0x1f3e37=_0x344abe;return marAgentRuntimeModelConfigurationSchema[_0x1f3e37(0x1b0)]()[_0x1f3e37(0xce)](_0x7b3532);}function allowedModels(_0x138238,_0x33caca){const _0x28dbec=_0x344abe,_0x4e6c36=new Set(_0x138238[_0x28dbec(0x1aa)][_0x28dbec(0xbf)]);return _0x33caca[_0x28dbec(0x204)](_0x3e908c=>_0x3e908c[_0x28dbec(0xf9)]&&_0x4e6c36[_0x28dbec(0x1d5)](_0x138238[_0x28dbec(0x1aa)][_0x28dbec(0x1c1)]===_0x28dbec(0x110)?_0x3e908c[_0x28dbec(0x14e)]:_0x3e908c['id']));}function selectModel(_0x2248b2,_0x36e101,_0x9cc22c){const _0x541e1f=_0x344abe,_0x32ddbb=allowedModels(_0x2248b2,_0x36e101),_0x2b5ae5=_0x32ddbb[_0x541e1f(0x235)](_0x2b4bca=>_0x2b4bca['id']===_0x9cc22c);if(_0x2b5ae5!==undefined)return _0x2b5ae5;const _0x567682=_0x32ddbb[_0x541e1f(0x235)](_0x3b0b83=>(_0x2248b2[_0x541e1f(0x1aa)][_0x541e1f(0x1c1)]===_0x541e1f(0x110)?_0x3b0b83[_0x541e1f(0x14e)]:_0x3b0b83['id'])===_0x2248b2[_0x541e1f(0x1aa)][_0x541e1f(0x149)]);if(_0x567682!==undefined)return _0x567682;const _0x35c462=_0x2248b2[_0x541e1f(0x1aa)][_0x541e1f(0xbf)][_0x541e1f(0x10c)](_0x34fa81=>_0x32ddbb[_0x541e1f(0x235)](_0x1a4cc4=>(_0x2248b2[_0x541e1f(0x1aa)][_0x541e1f(0x1c1)]===_0x541e1f(0x110)?_0x1a4cc4[_0x541e1f(0x14e)]:_0x1a4cc4['id'])===_0x34fa81))[_0x541e1f(0x235)](_0x5b6f78=>_0x5b6f78!==undefined);if(_0x35c462===undefined)throw new Error(_0x541e1f(0x119));return _0x35c462;}function publishedTemplateDraft(_0x44990c,_0x4d8a08){const _0x708d33=_0x344abe,_0x46fa67=conversationTemplateDraftSchema[_0x708d33(0x1ec)](_0x4d8a08);if(_0x46fa67[_0x708d33(0x135)]){const {allowedModels:_0x69a9d4,defaultModelId:_0x3cea57,..._0x40f076}=_0x46fa67[_0x708d33(0x21d)];return{'draft':_0x40f076,'modelPolicy':{'identity':_0x708d33(0x110),'allowedIds':_0x69a9d4[_0x708d33(0x10c)](_0x5b2110=>_0x5b2110[_0x708d33(0x14e)]),'defaultId':_0x3cea57}};}if(_0x44990c!==0x7*0x67+0x10ea+-0x3f2*0x5||!record(_0x4d8a08)||_0x708d33(0xfb)in _0x4d8a08||!Array[_0x708d33(0x21e)](_0x4d8a08[_0x708d33(0x182)]))throw new Error(_0x708d33(0xd1));const _0x21294b=_0x4d8a08[_0x708d33(0x182)],_0x2bfab7={..._0x4d8a08};delete _0x2bfab7[_0x708d33(0x182)];const _0x26a6a2=conversationTemplateDraftSchema[_0x708d33(0x1ec)]({..._0x2bfab7,'allowedModels':_0x21294b[_0x708d33(0x10c)](_0x13d665=>({'modelId':_0x13d665,'name':_0x13d665}))});if(!_0x26a6a2[_0x708d33(0x135)])throw new Error(_0x708d33(0xd1));const {allowedModels:_0x565b54,defaultModelId:_0x1d68ff,..._0x40af8e}=_0x26a6a2[_0x708d33(0x21d)];return{'draft':_0x40af8e,'modelPolicy':{'identity':_0x708d33(0xfd),'allowedIds':_0x565b54[_0x708d33(0x10c)](_0x33ac85=>_0x33ac85[_0x708d33(0x14e)]),'defaultId':_0x1d68ff}};}function networkModels(_0x5602fa,_0x3ca477){const _0x2feaf3=_0x344abe;if(_0x3ca477!==_0x2feaf3(0x1d1))return _0x5602fa;return _0x5602fa[_0x2feaf3(0x10c)](_0x3c6142=>_0x3c6142[_0x2feaf3(0xea)]?{..._0x3c6142,'hostedWebSearch':![]}:_0x3c6142);}function publishedMcpServers(_0x41fa73){const _0x3c0214=_0x344abe;if(!Array[_0x3c0214(0x21e)](_0x41fa73))throw new Error(_0x3c0214(0xd1));return _0x41fa73[_0x3c0214(0x10c)](_0x370178=>{const _0x47cf6f=_0x3c0214;if(!record(_0x370178))throw new Error(_0x47cf6f(0xd1));const _0x15bb21=Object[_0x47cf6f(0x13c)](_0x370178)[_0x47cf6f(0x164)]()[_0x47cf6f(0x1b1)](',');if(_0x15bb21!==_0x47cf6f(0x1fe))throw new Error(_0x47cf6f(0xd1));const _0x479429=mcpRuntimeDescriptorSchema[_0x47cf6f(0xce)](_0x370178[_0x47cf6f(0x254)]),_0x2735de=mcpInstallationConfigurationSchema[_0x47cf6f(0xce)](_0x370178[_0x47cf6f(0xc9)]);if(typeof _0x370178['id']!==_0x47cf6f(0x23b)||typeof _0x370178[_0x47cf6f(0xfc)]!==_0x47cf6f(0x23b)||typeof _0x370178[_0x47cf6f(0x1a0)]!==_0x47cf6f(0x23b)||typeof _0x370178[_0x47cf6f(0x11a)]!==_0x47cf6f(0x23b)||_0x370178[_0x47cf6f(0xc8)]!==_0x47cf6f(0x11c)&&_0x370178[_0x47cf6f(0xc8)]!==_0x47cf6f(0xd7)||_0x370178[_0x47cf6f(0x1b5)]!==_0x479429[_0x47cf6f(0x1b5)])throw new Error(_0x47cf6f(0xd1));return{'id':_0x370178['id'],'serverName':_0x370178[_0x47cf6f(0xfc)],'displayName':_0x370178[_0x47cf6f(0x1a0)],'version':_0x370178[_0x47cf6f(0x11a)],'origin':_0x370178[_0x47cf6f(0xc8)],'transport':_0x479429[_0x47cf6f(0x1b5)],'runtime':_0x479429,'configuration':_0x2735de};});}function publishedTemplateSnapshot(_0x3ecd91){const _0x22e75d=_0x344abe;if(_0x3ecd91[_0x22e75d(0xcb)]===-0x9f5*0x2+0x9b*-0x16+-0x7f*-0x43){const _0x660182=publishedTemplateFiles(_0x3ecd91[_0x22e75d(0xdd)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x660182),'entries':_0x660182};}if(_0x3ecd91[_0x22e75d(0xcb)]!==-0x8a8+0x1*-0x422+0xccc||typeof _0x3ecd91[_0x22e75d(0x191)]!==_0x22e75d(0x23b)||!Array[_0x22e75d(0x21e)](_0x3ecd91[_0x22e75d(0x1a7)])||!Array[_0x22e75d(0x21e)](_0x3ecd91[_0x22e75d(0x188)]))throw new Error(_0x22e75d(0xd1));validatePublishedSourceWorkspacePath(_0x3ecd91[_0x22e75d(0x191)]);const _0x3196e2=_0x3ecd91[_0x22e75d(0x1a7)][_0x22e75d(0x10c)](safePublishedTemplateRelativePath);if(new Set(_0x3196e2)[_0x22e75d(0x264)]!==_0x3196e2[_0x22e75d(0x162)]||_0x3196e2[_0x22e75d(0x214)](_0x22e75d(0x1ee))||_0x3196e2[_0x22e75d(0x214)](_0x22e75d(0x18f)))throw new Error(_0x22e75d(0xd1));const _0x52277d=_0x3ecd91[_0x22e75d(0x188)][_0x22e75d(0x10c)](publishedTemplateEntry);if(new Set(_0x52277d[_0x22e75d(0x10c)](_0x44b070=>_0x44b070[_0x22e75d(0x15e)]))[_0x22e75d(0x264)]!==_0x52277d[_0x22e75d(0x162)])throw new Error(_0x22e75d(0xd1));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x3ecd91[_0x22e75d(0x191)],'directories':_0x3196e2,'entries':_0x52277d};}function publishedTemplateEntry(_0x354fd9){const _0x12c475=_0x344abe;if(!record(_0x354fd9))throw new Error(_0x12c475(0xd1));if(_0x354fd9[_0x12c475(0x168)]===_0x12c475(0x22f))return publishedTemplateFile(_0x354fd9,!![]);if(_0x354fd9[_0x12c475(0x168)]!==_0x12c475(0x109)||typeof _0x354fd9[_0x12c475(0x1cc)]!==_0x12c475(0x23b)||_0x354fd9[_0x12c475(0x1cc)][_0x12c475(0x162)]===-0x2*-0x12b7+0x1614+-0x3b82||_0x354fd9[_0x12c475(0x1cc)][_0x12c475(0x214)]('\x00')||_0x354fd9[_0x12c475(0x146)]!==_0x12c475(0x1a5)&&_0x354fd9[_0x12c475(0x146)]!==_0x12c475(0x141)||typeof _0x354fd9[_0x12c475(0xca)]!==_0x12c475(0x23b))throw new Error(_0x12c475(0xd1));const _0x31cd87=safePublishedTemplateRelativePath(_0x354fd9[_0x12c475(0x15e)]),_0x518314=safePublishedTemplateSize(_0x354fd9[_0x12c475(0x264)]),_0x3c3f6e=_0x354fd9[_0x12c475(0x1cc)],_0x36b0ba=_0x354fd9[_0x12c475(0x146)],_0x5311ba=_0x354fd9[_0x12c475(0xca)];if(_0x518314!==Buffer[_0x12c475(0x250)](_0x3c3f6e))throw new Error(_0x12c475(0xd1));if(_0x36b0ba===_0x12c475(0x1a5))safePublishedTemplateRelativePath(_0x5311ba);else{if(!isAbsolute(_0x5311ba)||!RUNTIME_LINK_ROOTS[_0x12c475(0xcf)](_0x500aba=>_0x5311ba===_0x500aba||within(_0x500aba,_0x5311ba)))throw new Error(_0x12c475(0xd1));}return{'kind':_0x12c475(0x109),'relativePath':_0x31cd87,'size':_0x518314,'linkTarget':_0x3c3f6e,'targetKind':_0x36b0ba,'resolvedTarget':_0x5311ba};}function publishedTemplateFiles(_0x249958){const _0x45d497=_0x344abe;if(!Array[_0x45d497(0x21e)](_0x249958))throw new Error(_0x45d497(0xd1));const _0x4b7582=new Set();return _0x249958[_0x45d497(0x10c)](_0xa61932=>{const _0x582ae8=_0x45d497,_0x150193=publishedTemplateFile(_0xa61932);if(_0x4b7582[_0x582ae8(0x1d5)](_0x150193[_0x582ae8(0x15e)]))throw new Error(_0x582ae8(0xd1));return _0x4b7582[_0x582ae8(0xc2)](_0x150193[_0x582ae8(0x15e)]),_0x150193;});}function publishedTemplateFile(_0xecd93f,_0x555669=![]){const _0x110888=_0x344abe;if(!record(_0xecd93f)||_0x555669&&_0xecd93f[_0x110888(0x168)]!==_0x110888(0x22f)||typeof _0xecd93f[_0x110888(0x241)]!==_0x110888(0xf5)||typeof _0xecd93f[_0x110888(0x12b)]!==_0x110888(0x23b)||!/^[a-f0-9]{64}$/u[_0x110888(0x200)](_0xecd93f[_0x110888(0x12b)]))throw new Error(_0x110888(0xd1));return{'kind':_0x110888(0x22f),'relativePath':safePublishedTemplateRelativePath(_0xecd93f[_0x110888(0x15e)]),'size':safePublishedTemplateSize(_0xecd93f[_0x110888(0x264)]),'executable':_0xecd93f[_0x110888(0x241)],'sha256':_0xecd93f[_0x110888(0x12b)]};}function safePublishedTemplateRelativePath(_0x4dd24e){const _0x572162=_0x344abe;if(typeof _0x4dd24e!==_0x572162(0x23b)||_0x4dd24e[_0x572162(0x162)]===-0xd8c+0x235e*0x1+-0x15d2*0x1||_0x4dd24e[_0x572162(0x133)]('/')||_0x4dd24e[_0x572162(0x214)]('\x5c')||_0x4dd24e[_0x572162(0x239)]('/')[_0x572162(0xcf)](_0x7fa40e=>_0x7fa40e[_0x572162(0x162)]===0x1*-0x170b+-0x1*0xdfd+0x28*0xed||_0x7fa40e==='.'||_0x7fa40e==='..'))throw new Error(_0x572162(0xd1));return _0x4dd24e;}function _0x4192(){const _0x4ca058=['DxrMoa','D2f0y2G','AxntywzLsw50zwDLCG','DxbSB2fKC0j5uMvXDwvZDa','ChvIBgLZAefJDgL2Axr5','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','C3vTBwfYEq','DgvTCgXHDgu','uKvuquLoruq','Ag9TzurPCMvJDg9YEq','CMvJB25JAwXLrMLSzxm','Bg9JywXLq29TCgfYzq','y29UDgvUDa','ywn0AxzPDhK','CMvKDwnL','mtzpDgPKAKG','rKLmrq','zMLSzq','DMvYC2LVBKLK','CMvHza','ywn0AxzLvMvYC2LVBKLK','DxbSB2fKC0rPCMvJDg9YEq','zMLUza','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','CgLUBMvK','AxngAwXL','C3bSAxq','y29UDgvUDf9OyxnO','C3rYAw5N','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','u1rbuLrjtKC','Cgf0Ae1VDw50CW','DxbKyxrL','l3DVCMTZCgfJzq','zxHLy3v0ywjSzq','zNjVBq','AxneAxjLy3rVCNK','C3rYAw5NAwz5','l2jPBG','ve9px0XbuKDf','C2vJCMv0rw52AxjVBM1LBNq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','zgvSzxrLrMLSzq','C2vZC2LVBLDHDgnOu2XVDhm','zw1PDfDHDgnOrxzLBNq','vu5srvnuuKLdveve','DMfSDwvZ','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','l2XPyG','yNL0zuXLBMD0Aa','igfUzca','q0foq0vmteve','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','CNvUDgLTzq','Dw53yxrJAa','B3DUzxjlzxK','BwfUAwzLC3q','C3LUyW','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','BMfTzq','AxrLBxm','B2zMC2v0','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','CMvXDwLYzvvWBg9Hza','DgL0BgvtB3vYy2u','C3rHDhvZ','zgf0ywjHC2u','vvnfuG','B2jQzwn0','C2L6zq','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','Bwf4t3v0Chv0vg9Rzw5Z','sfruua','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','ywXSB3DLzeLKCW','CxvVDgfZ','BM93','ywrK','zw4Tvvm','DxbSB2fKu3rHDhvZ','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','y3vYCMvUDfzLCNnPB25jza','DxbKyxrLq29UDMvYC2f0Aw9U','B3jPz2LU','y29UzMLNDxjHDgLVBG','CMvZB2X2zwruyxjNzxq','C2nOzw1HvMvYC2LVBG','ChjVDg9JB2W','zMLUAxnOtwvZC2fNzq','CgfYC2u','C29Tzq','C2f2zu1LC3nHz2vby2nLChrHBMnL','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','BNvTyMvY','q09nueXfveve','ChjVy2vZC0v4zwn1Dg9Y','BM90AwzPy2f0Aw9U','v09ss1nqqunf','l2HVBwuVBwfY','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','yxnZzxj0q2fUq3jLyxrL','DxnLCLn0B3jHz2vlzxK','y29TCgXLDgvvCgXVywq','zMLSzxm','mJmWmZm0mdLpugHVwLO','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','Dw5Yzwy','zMLSzuLK','C2vZC2LVBKLK','CMvSzwfZzvnLC3nPB24','zgLNzxn0','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','yMfZzvvYBa','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','CxvVDge','BwvZC2fNzq','Ag9ZDgvKv2vIu2vHCMnO','zgvZy3jPChrPB24','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','y3jLyxrLvxbSB2fK','y2f0y2G','y29UDMvYC2f0Aw9U','uKvbrfK','lsaVD29YA3nWywnLl2LUyM94lW','zMLUAxnOuNvU','zMLUywXSEq','BwnWq29UzMLNsgfZAa','yM9VBgvHBG','reLsrunut1jzaa','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','zw5HyMXLza','nJeZodu4Bhv5D0vm','ywXSB3DLze1VzgvSCW','C2vYDMvYtMfTzq','q09orKLhvvjbveLptL9jra','BgLZDenVBNzLCNnHDgLVBNm','Dg9tDhjPBMC','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','y3jLyxrLu2vZC2LVBG','AgvHzgvYCW','q0foq0vmteLorW','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','ru5pru5u','CgvUzgLUz0v2zw50CW','zw52AxjVBM1LBNq','BgfZDefJDgL2Axr5qxq','u1LnteLosW','AgLZDg9YEq','y2XLyw51CeXVy2TZ','BwfW','surmrq','CNvUswq','mJyYnde1n0zfu09Jsq','vvbtvfjfqu1Ftu9eruXFsuq','y29Kzq','Bwf4vxbSB2fKqNL0zxm','ChjLCgfYzq','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','yxbWBhLbDxrVBwf0AwnuAxrSzq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','zNvSBc1Hy2nLC3m','zMLSzurLBgv0zxm','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','DMvYC2LVBG','CMvTB3zLv2f0y2HmzwfZzq','tK9erq','CgLUBMvKqxq','se9tvevex0nptLzfuLnbveLptG','C2v0','y29UDgvUDeHHC2G','DgL0Bgu','C2XVDfrVA2vU','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','yMfZzty0','C291CMnLugf0Aa','B3bLCMf0Aw9UCW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','y3vYC29Y','zMLSzvbHDgG','C2HHmJu2','BwLU','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','ChjVBxb0','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','BMv4DfDVCMTIzw5JAev2zw50','DgvTCgXHDgvjza','C3rHCNrZv2L0Aa','CMvHC29UAw5NrwzMB3j0CW','C3vJy2vZCW','CMf3','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','revmrvrfra','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','DgfYz2v0ugf0Aa','Bg9HzfrLBxbSyxrLvMvYC2LVBG','A2v5CW','y2XPzw50uMvXDwvZDeLK','rvHfq1vusu9o','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','zw5KC1DPDgG','uLvoveLnrq','CMvHzhK','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','BM9KzuDLBMvYyxrPB24','DgfYz2v0s2LUza','C3rVCMu','mte3ndyYnwLWCMvNEq','zgvMyxvSDeLK','C3rHCNrnzxnZywDL','CMvUzxC','BgLZDezPBgvZ','B3DUCW','Bw9KzwXjza','Cgf0Ahm','DgHLBG','y29UDMvYC2f0Aw9Uswq','D3jPDgu','DgvTCgXHDgvezwXLDgvK','CMvHzezPBgu','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvhjLyxqGl3DVCMTZCgfJzsbHCYb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','CNvUDgLTzvnJB3bLswq','zw1PDfDVCMTIzw5JAev2zw50','CMvZB2X2zq','BwfUAwzLC3rFAgfZAa','y3jLyxrLtwvZC2fNzq','Bwf4qNL0zxm','CMvSyxrPDMvqyxrO','Cgf0AhngB3jdB252zxjZyxrPB24','zMLUze1LC3nHz2u','DhjPBq','BgvUz3rO','l3j1BG','C29YDa','l3j1BNrPBwu','y2f0zwDVCNK','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','A2LUza','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','BwLTzvr5Cgu','Agv4','y29TCgXLDgLVBG','DgvTCgXHDgveAxjLy3rVCNK','l3nIAw4','ywr2yw5JzuXHC3rby3rPDML0Eq','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','DxbSB2fKCW','D29YA2jLBMnOu2vXDwvUy2u','DxbSB2fKswq','zhjHzNq','y29TCgXLDgvKqxq','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','ChjLDMLVDxnwzxjZAw9Uswq','D2f0y2GUzMfPBgvK','zxHWAxjLC0f0','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','uLvox1rfuK1jtKfm','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','C2vJCMv0tMfTzq','ChjLzMXPz2H0vxbSB2fK','yxr0ywnOBwvUDeLKCW','ywn0AxzPDgLLCW','C2f2zuf1Dg9TyxrPy1rPDgXL','ywXSB3DLze1VzgvSswrZ','CMvQzwn0','BgLZDa','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','l3rTCa','CNvUlq','zw50CMLLCW','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','C25HChnOB3q','Aw50zxjYDxb0','qvzbsuXbqKXf','AxndB252zxjZyxrPB25jBLvZzq','vvbmt0fe','B3v0Chv0','y2XPzw50twvZC2fNzuLK','C291CMnLv29YA3nWywnLugf0Aa','su5urvjsvvburuq','qunusvzf','BwnWx2nVBMzPz19OyxnO','zMLSzv9JB3vUDa','q09orKXjq1q','rKfjteve','qvvutW','ywXSB2m','CNvU','y2fUy2vSvxbSB2fK','D29YA2jLBMnOq29UBMvJDgLVBKLK','ChvIBgLZAfvWz3jHzgvgywLSDxjL','CNvUu2v0DgXLBwvUDhm','l3DVCMTZCgfJzs9PBMjVEa','zgLZCgXHEu5HBwu','BMv0D29YA01Vzgu','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','D2f0y2Hjza','Bwf4','u05bufnit1q','Bw9KzwXZ','zgLYzwn0B3jPzxm','u1vdq0vfreve','z2v0','Bw9KzwXqB2XPy3K','zw1PDfDHDgnOtgvHC2vfDMvUDa','D2f0y2HmzwfZzvrPBwvY','ywn0AxzLuNvUCW','DxjS','yxjNCW','yxjYyxK','AM9PBG','BMXPBMS','C2XPy2u','ywXSu2v0DgXLza','DhjHBNnWB3j0','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','yxzHAwXHyMXL','C3rHCNrsDw4','ChvZAa','CNvUoG','CMvXDwLYzunVBNzLCNnHDgLVBG','DxbNCMfKzq','Bw9Kzq','DxbKyxrLzef0','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','uLvotKLorW','AwrLBNrPDhK','yNL0zxnszwfK','y3jLyxrLq29UDMvYC2f0Aw9U','B3v0Chv0q2fWywjPBgL0AwvZ','CMvZCg9UC2vZvhjHBNnWB3j0','u1resu8','CMvSzwfZzq','D2f0y2HmzwfZzxm','l2XPyJy0','y29UDgv4DfDPBMrVD1rVA2vUCW','y29TBwfUza','BgLUA1rHCMDLDa','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','DxnLzej5DgvZ','DgfYz2v0vMvYC2LVBKLK','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','tK9orq','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','AgfZ','CMvXDwLYzuzPBgu','lNvWBg9Hza','y3jLyxrL','zMXHDe1HCa','Cgf0AhngB3jnyw5PzMvZDa','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','Aw5WDxrdyxbHyMLSAxrPzxm','ywXS','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','AxntEw1IB2XPy0XPBMS','ywnJzxb0zwrxyxrJAa','DgvTCgXHDgvoyw1L','nte1mdG5mLLNrvjWEG','CgvUzgLUz01LC3nHz2vZ','DgLTzxi','vvbmt0fesu5h','zgLZCg9Zzq','DxnLCKLK','l3vZCG','DgL0BgvdAgfUz2vK','l3bYB2m','l3DVCMTZCgfJzs9VDxrWDxq','C2fMzvbHCNnL','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','Aw5IB3G','CMvWBgfJzq','BwfUAwzLC3qUANnVBG','CMvNAxn0zxjgAwXL','odK0ntC2nMTpyMvdtq','zMLSzvbYB2PLy3rPB25jza','y2fUy2vS','CMvXDwLYzuf0DgfJAg1LBNq','q1vtve9n','C3rVCMfNzv9RzxK','l2rLDG','C25HChnOB3rtzxf1zw5Jzq','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','B3b0Aw9UCW','qxr0ywnOBwvUDhm6cG','y2XVC2u','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','C2vZC2LVBKHHC2G','DgvZDa','yxjNDw1LBNrZ','mJm0nZa0og9QtwHpCa','Dg90ywXFyNL0zxm','zMLSDgvY','B3v0Chv0rgLYzwn0B3j5','Bwf4u3rVCMfNzuj5DgvZ','DxbKyxrLq29UzMLNDxjHDgLVBG','CMvJzwL2zwrcExrLCW','C3vIyxjYyxK','CgvUzgLUz0nYzwf0zxm','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra','zgf0yujHC2u2na','ChvIBgLZAeHVC3rLzev2zw50','Ag9ZDfbVBgLJEvzLCNnPB24','DgvTCg9Yyxj5ugf0Aa','BM9KzuLK','DxbKyxrLtwv0ywrHDge','BgLTAxq','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','Aw5JBhvKzxm','zgvSzxrL','ChvIBgLZAfj1BNrPBwvfDMvUDa','BwnWu2vYDMvYCW','D3jPDgvvCgXVywrdAhvUAW','C3rHCNrLzef0','ChvIBgLZAfDVCMTIzw5JAev2zw50','y3jLyxrLzef0','uvvpvefFrvHdruveruq','zgf0yq','AxnbCNjHEq'];_0x4192=function(){return _0x4ca058;};return _0x4192();}function safePublishedTemplateSize(_0x826fbb){const _0x4b6e01=_0x344abe;if(!Number[_0x4b6e01(0x221)](_0x826fbb)||_0x826fbb<0x1*-0x167+0x5a+0x10d*0x1)throw new Error(_0x4b6e01(0xd1));return _0x826fbb;}function legacyPublishedTemplateDirectories(_0x114070){const _0x3d5683=_0x344abe,_0x37e194=new Set();for(const _0x5ee12d of _0x114070){const _0x4d2ed7=_0x5ee12d[_0x3d5683(0x15e)][_0x3d5683(0x239)]('/');for(let _0x13c601=-0x1127+-0xbef+0x1d17;_0x13c601<_0x4d2ed7[_0x3d5683(0x162)];_0x13c601+=-0xd19+-0x1003*0x1+0x1d1d)_0x37e194[_0x3d5683(0xc2)](_0x4d2ed7[_0x3d5683(0x1b3)](-0x5d6*0x3+0x1ff9+-0xe77,_0x13c601)[_0x3d5683(0x1b1)]('/'));}return[..._0x37e194][_0x3d5683(0x164)]((_0x2789d5,_0x1b659f)=>_0x2789d5[_0x3d5683(0x22a)](_0x1b659f,_0x3d5683(0xc3)));}function publishedTemplateContentHash(_0x42b483,_0x49d24d,_0x3f4487){const _0x4a5251=_0x344abe,_0x5d95cd=_0x3f4487===-0x13*0x1cd+0x1bee+0x64a?_0x49d24d[_0x4a5251(0x10c)](_0x772e04=>{const _0xc6aac7=_0x4a5251;if(_0x772e04[_0xc6aac7(0x168)]!==_0xc6aac7(0x22f))throw new Error(_0xc6aac7(0xd1));return _0x772e04[_0xc6aac7(0x15e)]+'\x00'+_0x772e04[_0xc6aac7(0x264)]+'\x00'+_0x772e04[_0xc6aac7(0x12b)];})[_0x4a5251(0x1b1)]('\x0a'):[..._0x42b483[_0x4a5251(0x10c)](_0x330c87=>_0x4a5251(0xf6)+_0x330c87),..._0x49d24d[_0x4a5251(0x10c)](_0x48b1f8=>_0x48b1f8[_0x4a5251(0x168)]===_0x4a5251(0x22f)?_0x48b1f8[_0x4a5251(0x168)]+'\x00'+_0x48b1f8[_0x4a5251(0x15e)]+'\x00'+_0x48b1f8[_0x4a5251(0x264)]+'\x00'+(_0x48b1f8[_0x4a5251(0x241)]?-0xf49+-0x13*0x8b+0x17*0x11d:0x1*-0x525+-0x1cfd*-0x1+-0x2*0xbec)+'\x00'+_0x48b1f8[_0x4a5251(0x12b)]:_0x48b1f8[_0x4a5251(0x168)]+'\x00'+_0x48b1f8[_0x4a5251(0x15e)]+'\x00'+_0x48b1f8[_0x4a5251(0x264)]+'\x00'+_0x48b1f8[_0x4a5251(0x1cc)]+'\x00'+_0x48b1f8[_0x4a5251(0x146)]+'\x00'+_0x48b1f8[_0x4a5251(0xca)])][_0x4a5251(0x1b1)]('\x0a');return createHash(_0x4a5251(0x12b))[_0x4a5251(0x23f)](_0x5d95cd)[_0x4a5251(0xe4)](_0x4a5251(0x16b));}async function verifyPublishedTemplateContent(_0x506077,_0x400252,_0x2d96e6){const _0x164b19=_0x344abe,_0x397f1d=new Map(_0x2d96e6[_0x164b19(0x10c)](_0x5c595d=>[_0x5c595d[_0x164b19(0x15e)],_0x5c595d])),_0xf0009b=new Set([..._0x400252,_0x164b19(0x1ee),_0x164b19(0x18f)]),_0x4d7e77=new Set(),_0x590402=await listPublishedTemplateEntries(_0x506077,_0xf0009b,_0x4d7e77);if(_0x590402[_0x164b19(0x162)]!==_0x397f1d[_0x164b19(0x264)]||_0x4d7e77[_0x164b19(0x264)]!==_0xf0009b[_0x164b19(0x264)])throw new Error(_0x164b19(0xd1));for(const _0x3a65ce of _0x590402){const _0x264107=_0x397f1d[_0x164b19(0x1a9)](_0x3a65ce[_0x164b19(0x15e)]);if(_0x264107===undefined||_0x264107[_0x164b19(0x168)]!==_0x3a65ce[_0x164b19(0x168)])throw new Error(_0x164b19(0xd1));if(_0x264107[_0x164b19(0x168)]===_0x164b19(0x22f)&&_0x3a65ce[_0x164b19(0x168)]===_0x164b19(0x22f)){if(_0x264107[_0x164b19(0x264)]!==_0x3a65ce[_0x164b19(0x264)]||_0x264107[_0x164b19(0x241)]!==_0x3a65ce[_0x164b19(0x241)]||_0x3a65ce[_0x164b19(0x1bd)]!==(_0x264107[_0x164b19(0x241)]?0x9f7*-0x2+-0x1da7+-0x2*-0x1981:-0x3fd+0x145d*-0x1+0x197e)||_0x264107[_0x164b19(0x12b)]!==_0x3a65ce[_0x164b19(0x12b)])throw new Error(_0x164b19(0xd1));continue;}if(_0x264107[_0x164b19(0x168)]!==_0x164b19(0x109)||_0x3a65ce[_0x164b19(0x168)]!==_0x164b19(0x109)||_0x264107[_0x164b19(0x264)]!==_0x3a65ce[_0x164b19(0x264)]||_0x264107[_0x164b19(0x1cc)]!==_0x3a65ce[_0x164b19(0x1cc)])throw new Error(_0x164b19(0xd1));await verifyPublishedSymlinkResolution(_0x506077,_0x264107,_0x3a65ce[_0x164b19(0x125)]);}}async function verifyPublishedSymlinkResolution(_0x18654b,_0x517609,_0x1a059f){const _0x7e7ad5=_0x344abe;let _0x3d398b;try{_0x3d398b=await realpath(_0x1a059f);}catch{throw new Error(_0x7e7ad5(0xd1));}if(_0x517609[_0x7e7ad5(0x146)]===_0x7e7ad5(0x141)){if(_0x3d398b!==_0x517609[_0x7e7ad5(0xca)])throw new Error(_0x7e7ad5(0xd1));return;}let _0xa0499b,_0x275539;try{[_0xa0499b,_0x275539]=await Promise[_0x7e7ad5(0x1dd)]([realpath(join(_0x18654b,..._0x517609[_0x7e7ad5(0xca)][_0x7e7ad5(0x239)]('/'))),realpath(_0x18654b)]);}catch{throw new Error(_0x7e7ad5(0xd1));}if(_0x3d398b!==_0xa0499b||!within(_0x275539,_0x3d398b))throw new Error(_0x7e7ad5(0xd1));}async function listPublishedTemplateEntries(_0x4297f7,_0x4d084f,_0x132840,_0x389d08=''){const _0x26a8b8=_0x344abe,_0x2fc7ff=await lstat(_0x4297f7);if(!_0x2fc7ff[_0x26a8b8(0x243)]()||_0x2fc7ff[_0x26a8b8(0x1df)]()||(_0x2fc7ff[_0x26a8b8(0x1bd)]&0x1e88+-0x1b51+-0x138)!==-0x8a2*-0x1+-0x35b*-0x7+-0x2*0xf59)throw new Error(_0x26a8b8(0xd1));const _0x506198=[];for(const _0x6dea8 of await readdir(_0x4297f7,{'withFileTypes':!![]})){const _0x3463bb=join(_0x4297f7,_0x6dea8[_0x26a8b8(0x25a)]),_0x2035bd=_0x389d08[_0x26a8b8(0x162)]===0x15ee+-0x1c9d+-0x3b*-0x1d?_0x6dea8[_0x26a8b8(0x25a)]:_0x389d08+'/'+_0x6dea8[_0x26a8b8(0x25a)],_0x3ed734=await lstat(_0x3463bb);if(_0x3ed734[_0x26a8b8(0x1df)]()){const _0x52469a=await readlink(_0x3463bb);_0x506198[_0x26a8b8(0x1b9)]({'kind':_0x26a8b8(0x109),'relativePath':_0x2035bd,'size':Buffer[_0x26a8b8(0x250)](_0x52469a),'linkTarget':_0x52469a,'sourcePath':_0x3463bb});continue;}if(_0x3ed734[_0x26a8b8(0x243)]()){if(!_0x4d084f[_0x26a8b8(0x1d5)](_0x2035bd))throw new Error(_0x26a8b8(0xd1));_0x132840[_0x26a8b8(0xc2)](_0x2035bd),_0x506198[_0x26a8b8(0x1b9)](...await listPublishedTemplateEntries(_0x3463bb,_0x4d084f,_0x132840,_0x2035bd));}else{if(!_0x3ed734[_0x26a8b8(0x238)]()||_0x3ed734[_0x26a8b8(0x1b2)]!==0x3*0x3f6+0x4d*-0x4f+0xbe2||!Number[_0x26a8b8(0x221)](_0x3ed734[_0x26a8b8(0x264)]))throw new Error(_0x26a8b8(0xd1));_0x506198[_0x26a8b8(0x1b9)]({'kind':_0x26a8b8(0x22f),'relativePath':_0x2035bd,'size':_0x3ed734[_0x26a8b8(0x264)],'executable':(_0x3ed734[_0x26a8b8(0x1bd)]&-0x1c4c+-0x130c+0x59*0x89)!==-0x65*0xd+-0xa*0x6e+-0x13*-0x7f,'mode':_0x3ed734[_0x26a8b8(0x1bd)]&0x35*-0xb2+-0x1948+0x4021,'sha256':createHash(_0x26a8b8(0x12b))[_0x26a8b8(0x23f)](await readFile(_0x3463bb))[_0x26a8b8(0xe4)](_0x26a8b8(0x16b))});}}return _0x506198;}function validatePublishedSourceWorkspacePath(_0x47d157){const _0x4ba260=_0x344abe;if(!isAbsolute(_0x47d157)||resolve(_0x47d157)!==_0x47d157||_0x47d157==='/'||RESERVED_SANDBOX_ROOTS[_0x4ba260(0xcf)](_0x44e69a=>_0x47d157===_0x44e69a||within(_0x44e69a,_0x47d157)||within(_0x47d157,_0x44e69a)))throw new Error(_0x4ba260(0xd1));}function within(_0x26f6df,_0x47fe75){const _0x2bb44c=_0x344abe,_0x4504f7=relative(_0x26f6df,_0x47fe75);return _0x4504f7[_0x2bb44c(0x162)]>-0x11f6+0xdf*-0x2+0x13b4&&_0x4504f7!=='..'&&!_0x4504f7[_0x2bb44c(0x133)]('..'+sep);}function resolveMcpServers(_0x1e014e,_0x195c9f){const _0x545c8c=_0x344abe,_0xeb6e5f=_0x2415ac=>{const _0x398983=_0x2565,_0x48333f={};for(const [_0x305958,_0x44b721]of Object[_0x398983(0x188)](_0x2415ac??{})){const _0x243b65=_0x195c9f[_0x44b721[_0x398983(0x17d)]];if(_0x243b65===undefined)throw new Error(_0x398983(0x185));_0x48333f[_0x305958]=_0x243b65;}return _0x48333f;};return _0x1e014e[_0x545c8c(0x217)][_0x545c8c(0x1d9)](_0x22f4f6=>{const _0x1c8d01=_0x545c8c;if(_0x22f4f6[_0x1c8d01(0x254)][_0x1c8d01(0x1b5)]===_0x1c8d01(0xbd)){if(_0x1e014e[_0x1c8d01(0x174)][_0x1c8d01(0x1a1)]!==_0x1c8d01(0x24c))return[];return[{'name':_0x22f4f6[_0x1c8d01(0xfc)],'lifecycle':_0x1c8d01(0x13e),'transport':_0x1c8d01(0xbd),'url':_0x22f4f6[_0x1c8d01(0x254)][_0x1c8d01(0x1ae)],'headers':{..._0xeb6e5f(_0x22f4f6[_0x1c8d01(0x254)][_0x1c8d01(0x102)]),..._0xeb6e5f(_0x22f4f6[_0x1c8d01(0xc9)][_0x1c8d01(0x102)])}}];}return[{'name':_0x22f4f6[_0x1c8d01(0xfc)],'lifecycle':_0x1c8d01(0x13e),'transport':_0x1c8d01(0x1c6),'command':_0x22f4f6[_0x1c8d01(0x254)][_0x1c8d01(0x1cb)],'args':[..._0x22f4f6[_0x1c8d01(0x254)][_0x1c8d01(0x1af)],..._0x22f4f6[_0x1c8d01(0xc9)][_0x1c8d01(0x201)]??[]],'environment':{..._0xeb6e5f(_0x22f4f6[_0x1c8d01(0x254)][_0x1c8d01(0x107)]),..._0xeb6e5f(_0x22f4f6[_0x1c8d01(0xc9)][_0x1c8d01(0x107)])}}];});}function hostedConversationSummary(_0x194874,_0x286166){const _0x25fa10=_0x344abe;return hostedConversationSummarySchema[_0x25fa10(0xce)]({'id':_0x194874['id'],'nodeId':_0x194874[_0x25fa10(0x210)],'sessionId':_0x194874[_0x25fa10(0xe2)],'templateId':_0x194874[_0x25fa10(0x132)],'templateName':_0x194874[_0x25fa10(0x1e1)],'activeVersionId':_0x194874[_0x25fa10(0x233)],'title':_0x194874[_0x25fa10(0x121)],'pinnedAt':_0x194874[_0x25fa10(0x11d)],'status':_0x194874[_0x25fa10(0x260)],'modelId':_0x194874[_0x25fa10(0x14e)],'createdAt':_0x194874[_0x25fa10(0x21b)],'updatedAt':_0x194874[_0x25fa10(0x1be)],'lastActivityAt':_0x194874[_0x25fa10(0x108)],..._0x286166===undefined?{}:{'activity':_0x286166}});}function templateSummary(_0x3e79c9,_0x1cc31b){const _0x26cf07=_0x344abe;return conversationTemplateSummarySchema[_0x26cf07(0xce)]({'id':_0x3e79c9[_0x26cf07(0x132)],'nodeId':_0x3e79c9[_0x26cf07(0x210)],'name':_0x3e79c9[_0x26cf07(0x1e1)],'description':_0x1cc31b[_0x26cf07(0xeb)],'status':_0x3e79c9[_0x26cf07(0x153)]?_0x26cf07(0x138):_0x26cf07(0x193),'currentVersionId':_0x3e79c9[_0x26cf07(0x233)],'available':!_0x3e79c9[_0x26cf07(0x153)],'createdAt':_0x3e79c9[_0x26cf07(0x21b)],'updatedAt':_0x1cc31b[_0x26cf07(0x1be)]});}function modelSummary(_0x76cb03,_0x18a472){const _0x2363dc=_0x344abe;return{'id':_0x76cb03['id'],'name':_0x76cb03[_0x2363dc(0x25a)],'protocol':_0x76cb03[_0x2363dc(0xcc)],'baseUrl':_0x76cb03[_0x2363dc(0xe6)],'modelId':_0x76cb03[_0x2363dc(0x14e)],'contextWindowTokens':_0x76cb03[_0x2363dc(0x1ca)],'maxOutputTokens':_0x76cb03[_0x2363dc(0xbc)],'inputCapabilities':_0x76cb03[_0x2363dc(0x1dc)],'outputCapabilities':_0x76cb03[_0x2363dc(0x1c4)],'reasoningEfforts':_0x76cb03[_0x2363dc(0x134)],'hostedWebSearch':_0x76cb03[_0x2363dc(0xea)],..._0x76cb03[_0x2363dc(0x1c5)]===undefined?{}:{'responsesTransport':_0x76cb03[_0x2363dc(0x1c5)]},'responsesPreviousResponseId':_0x76cb03[_0x2363dc(0x1ed)],'enabled':_0x76cb03[_0x2363dc(0xf9)],'sortOrder':_0x18a472,'apiKeyConfigured':!![]};}function systemInstruction(_0x1bed0d){const _0x4cff9d=_0x344abe,_0x17aae5=_0x1bed0d[_0x4cff9d(0x174)],_0x42e984=_0x17aae5[_0x4cff9d(0x1a1)]===_0x4cff9d(0x1d1)?_0x4cff9d(0x25d):_0x4cff9d(0x100);return[_0x4cff9d(0x156),_0x4cff9d(0xc5),_0x4cff9d(0xbe),..._0x1bed0d[_0x4cff9d(0x191)]===undefined?[]:[_0x4cff9d(0x1d2)+_0x1bed0d[_0x4cff9d(0x191)]+_0x4cff9d(0x12d)+join(_0x1bed0d[_0x4cff9d(0x191)],_0x4cff9d(0x1ee))+_0x4cff9d(0x251)+join(_0x1bed0d[_0x4cff9d(0x191)],_0x4cff9d(0x18f))+_0x4cff9d(0x189)],_0x4cff9d(0x104),_0x42e984][_0x4cff9d(0x1b1)]('\x0a');}function attachmentPrompt(_0x8d8bc8,_0x3178e3){const _0xa079e8=_0x344abe;if(_0x3178e3[_0xa079e8(0x162)]===0x203c*0x1+-0x1065+-0xfd7)return _0x8d8bc8;const _0x4995d7=_0x3178e3[_0xa079e8(0x10c)](_0x56098f=>_0xa079e8(0xf1)+_0x56098f[_0xa079e8(0x15e)])[_0xa079e8(0x1b1)]('\x0a');return''+_0x8d8bc8+(_0x8d8bc8[_0xa079e8(0x161)]()[_0xa079e8(0x162)]===-0x192e+-0x7*-0x471+-0x5e9?'':'\x0a\x0a')+_0xa079e8(0x1fc)+_0x4995d7;}function automaticHostedConversationTitle(_0x2e33bd){const _0x1221e5=_0x344abe;if(_0x2e33bd===undefined)return undefined;const _0x3a8192=sessionTitleFromFirstMessage(_0x2e33bd);if(_0x3a8192[_0x1221e5(0x162)]===0x4*-0x815+0x241b+-0x1*0x3c7||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0x1221e5(0x200)](_0x3a8192))return undefined;return _0x3a8192;}function _0x2565(_0x53fcf1,_0x4527cb){_0x53fcf1=_0x53fcf1-(-0x3*-0x304+-0x10a+-0x746);const _0x5050b2=_0x4192();let _0x423195=_0x5050b2[_0x53fcf1];if(_0x2565['OcLXSF']===undefined){var _0x3df5ec=function(_0x39ac13){const _0x31256c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1449bf='',_0x3857ac='';for(let _0x21d0a0=0x65*-0x52+0x2a5+0x1db5,_0x1e37e9,_0x4aecc0,_0x1f2cf=0x2*-0x110+-0xb25+0xd45*0x1;_0x4aecc0=_0x39ac13['charAt'](_0x1f2cf++);~_0x4aecc0&&(_0x1e37e9=_0x21d0a0%(0x6b5*0x3+-0xaf6+-0x925)?_0x1e37e9*(0x1*0x1625+0x84+-0x1669)+_0x4aecc0:_0x4aecc0,_0x21d0a0++%(0x353*0x6+0x2526+-0x4*0xe45))?_0x1449bf+=String['fromCharCode'](-0x1802+0x38c+0x1575&_0x1e37e9>>(-(0xb71+0x25*-0x9d+0xb42)*_0x21d0a0&-0x1a82+0x4*0x4ca+0x760)):-0x1778+-0x2545+-0xd5*-0x49){_0x4aecc0=_0x31256c['indexOf'](_0x4aecc0);}for(let _0x1b5c6b=0x1f9e+-0x1717+-0x3b*0x25,_0x452896=_0x1449bf['length'];_0x1b5c6b<_0x452896;_0x1b5c6b++){_0x3857ac+='%'+('00'+_0x1449bf['charCodeAt'](_0x1b5c6b)['toString'](0x1a0f+-0x25b6+0xbb7*0x1))['slice'](-(0x815*-0x1+0x1803+0x2*-0x7f6));}return decodeURIComponent(_0x3857ac);};_0x2565['tkSIxK']=_0x3df5ec,_0x2565['FCceVn']={},_0x2565['OcLXSF']=!![];}const _0x439718=_0x5050b2[-0x1*0x1893+-0x863+-0x107b*-0x2];_0x2565['oifYpB']!==_0x439718&&(_0x2565['FCceVn']={},_0x2565['oifYpB']=_0x439718);const _0x306359=_0x2565['FCceVn'][_0x53fcf1];return _0x306359===undefined?(_0x423195=_0x2565['tkSIxK'](_0x423195),_0x2565['FCceVn'][_0x53fcf1]=_0x423195):_0x423195=_0x306359,_0x423195;}function runFromMessage(_0x25a3b9){const _0x320825=_0x344abe;return{'id':_0x25a3b9[_0x320825(0x10e)],'status':_0x25a3b9[_0x320825(0x260)],'startedAt':_0x25a3b9[_0x320825(0x21b)],'completedAt':_0x25a3b9[_0x320825(0x260)]===_0x320825(0x1c0)?null:_0x25a3b9[_0x320825(0x1be)]};}function runInterruptionKey(_0x5bbc51,_0x58defe){return _0x5bbc51+'\x00'+_0x58defe;}function uploadProjection(_0x4df1ba){const _0x29fd52=_0x344abe;return{'uploadId':_0x4df1ba[_0x29fd52(0x173)],'conversationId':_0x4df1ba[_0x29fd52(0x151)],'name':_0x4df1ba[_0x29fd52(0x25a)],'mimeType':_0x4df1ba[_0x29fd52(0x16a)],'receivedBytes':_0x4df1ba[_0x29fd52(0x208)],'size':_0x4df1ba[_0x29fd52(0x264)],'status':_0x4df1ba[_0x29fd52(0x260)],..._0x4df1ba[_0x29fd52(0x230)]===undefined?{}:{'file':_0x4df1ba[_0x29fd52(0x230)]}};}async function assertRegularFile(_0x25464a,_0x57ec9b){const _0xa2cb59=_0x344abe,_0x2163d7=await lstat(_0x25464a)[_0xa2cb59(0xee)](()=>{const _0x2778e0=_0xa2cb59;throw new Error(_0x2778e0(0x169));});if(!_0x2163d7[_0xa2cb59(0x238)]()||_0x2163d7[_0xa2cb59(0x1df)]()||_0x2163d7[_0xa2cb59(0x1b2)]!==-0x1ddb*0x1+0xab5+-0x1*-0x1327||_0x2163d7[_0xa2cb59(0x264)]!==_0x57ec9b)throw new Error(_0xa2cb59(0x169));}async function assertUploadTemporaryFile(_0x330445,_0x350f06){const _0x260361=_0x344abe,_0x3515ca=await lstat(_0x330445)[_0x260361(0xee)](()=>{const _0x147df1=_0x260361;throw new Error(_0x147df1(0xdf));});if(!_0x3515ca[_0x260361(0x238)]()||_0x3515ca[_0x260361(0x1df)]()||_0x3515ca[_0x260361(0x1b2)]!==-0x2*-0x6b6+0x6e7+0x132*-0x11||_0x3515ca[_0x260361(0x264)]!==_0x350f06)throw new Error(_0x260361(0xdf));}function record(_0x52e12f){const _0x2eb758=_0x344abe;return typeof _0x52e12f===_0x2eb758(0x263)&&_0x52e12f!==null&&!Array[_0x2eb758(0x21e)](_0x52e12f);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.9.33",
3
+ "version": "0.9.35",
4
4
  "description": "MyAgentRoam Node runtime CLI.",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,8 +25,8 @@
25
25
  "node-pty": "1.1.0",
26
26
  "ws": "^8.21.3",
27
27
  "zod": "4.4.3",
28
- "@myagentroam/agent": "^0.9.33",
29
- "@myagentroam/protocol": "^0.9.33"
28
+ "@myagentroam/agent": "^0.9.35",
29
+ "@myagentroam/protocol": "^0.9.35"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ws": "^8.18.1"