@myagentroam/node 0.9.36 → 0.9.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connector.js +1 -1
- package/dist/native-session-history.js +1 -1
- package/dist/runner/claude/managed-run-controller.js +1 -1
- package/dist/runner/codex/conversation-parser.js +1 -1
- package/dist/runner/codex/managed-run-controller.js +1 -1
- package/dist/runner/mar-agent/conversation-normalizer.js +1 -1
- package/dist/runner/mar-agent/managed-run-controller.js +1 -1
- package/dist/runner/opencode/managed-run-controller.js +1 -1
- package/dist/runtime-state.js +1 -1
- package/dist/service/conversation-hosting-enablement-service.js +1 -1
- package/dist/service/hosted-conversation-node-service.js +1 -1
- package/dist/service/run-workbench-service.js +1 -1
- package/dist/service/session-command-service.js +1 -1
- package/dist/service/session-lifecycle-service.js +1 -1
- package/dist/service/session-message-service.js +1 -1
- package/dist/service/workspace-queue-workbench-service.js +1 -1
- package/dist/util/runner-native-session-parsers.js +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
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);}
|
|
2
|
+
const _0x241074=_0x3fd3;(function(_0xd89b2d,_0x563bc5){const _0x1a2552=_0x3fd3,_0x24309f=_0xd89b2d();while(!![]){try{const _0x50e2bd=-parseInt(_0x1a2552(0x235))/(0x1766+-0x5b6+-0x11af)*(parseInt(_0x1a2552(0x263))/(-0x22a0+-0x1e1f+-0x1*-0x40c1))+-parseInt(_0x1a2552(0x2f2))/(-0xa*0x35b+0x25ae+0x41d*-0x1)+-parseInt(_0x1a2552(0x22b))/(0x1*0x1d89+0x14e4+-0x3269)+-parseInt(_0x1a2552(0x26a))/(0x1f72+-0x13d*-0x2+-0x21*0x107)*(parseInt(_0x1a2552(0x261))/(0x19e8*-0x1+0x1*-0xfba+0x29a8))+-parseInt(_0x1a2552(0x2b1))/(0x249b*0x1+0x1ba+-0x264e)*(parseInt(_0x1a2552(0x2fe))/(0x2e6+0xf9*0x13+-0x1559*0x1))+-parseInt(_0x1a2552(0x34e))/(0xd07+-0x1cd6+-0x1a*-0x9c)+parseInt(_0x1a2552(0x227))/(-0x2608+-0x86*-0x1f+-0x15d8*-0x1);if(_0x50e2bd===_0x563bc5)break;else _0x24309f['push'](_0x24309f['shift']());}catch(_0x33d083){_0x24309f['push'](_0x24309f['shift']());}}}(_0x22ba,0x4e0a9+0x37f60+-0x58b09*-0x1));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=-0x1*0x59f+-0x26f6+0x2c96,MAX_FILE_READ_BYTES=(0x4*-0x863+0x1*-0x164e+0x39da)*(-0x4bf*0x3+-0x1ed2+-0x13*-0x295),WATCH_TTL_MS=0x4*-0x2ef+-0x8a59+-0x12b*-0x117,RUNTIME_LINK_ROOTS=[_0x241074(0x33a),_0x241074(0x24d),_0x241074(0x253),_0x241074(0x35a),_0x241074(0x22e)],RESERVED_SANDBOX_ROOTS=[_0x241074(0x31e),_0x241074(0x248),_0x241074(0x2d2),_0x241074(0x33a),_0x241074(0x24d),_0x241074(0x253),_0x241074(0x35a),_0x241074(0x22e),_0x241074(0x318),_0x241074(0x309),_0x241074(0x24a),_0x241074(0x330)];export class HostedConversationNodeService{[_0x241074(0x239)];[_0x241074(0x34c)];['id'];[_0x241074(0x24f)]=new Map();[_0x241074(0x256)]=new Map();[_0x241074(0x2b5)]=new Map();[_0x241074(0x362)]=new Map();[_0x241074(0x29a)]=new Map();[_0x241074(0x33d)]=new Set();[_0x241074(0x2b3)]=new Map();[_0x241074(0x380)]=new Map();[_0x241074(0x374)]=new Set();[_0x241074(0x311)]=new Map();[_0x241074(0x233)]=new Set();[_0x241074(0x23e)];[_0x241074(0x345)]=![];[_0x241074(0x2ff)]=0x1*-0x1916+-0x1*0x1a69+0x337f;[_0x241074(0x21c)]=-0x957+-0x1785+0x20dc;constructor(_0x45f3a0){const _0xff20ac=_0x241074;this[_0xff20ac(0x239)]=_0x45f3a0,this[_0xff20ac(0x34c)]=_0x45f3a0[_0xff20ac(0x34c)]??Date[_0xff20ac(0x34c)],this['id']=_0x45f3a0['id']??randomUUID,this[_0xff20ac(0x23e)]=_0x45f3a0[_0xff20ac(0x23e)]??new SessionWatchSlotCoordinator();}[_0x241074(0x30a)](){const _0x1a382b=_0x241074;return{'conversation.hosted.list':_0x16d8d4=>this[_0x1a382b(0x32c)](_0x16d8d4),'conversation.hosted.create':_0x5ea73a=>this[_0x1a382b(0x232)](_0x5ea73a),'conversation.hosted.get':_0x5639aa=>this[_0x1a382b(0x364)](_0x5639aa),'conversation.hosted.watch':_0x1ff0de=>this[_0x1a382b(0x203)](_0x1ff0de),'conversation.hosted.unwatch':_0xce3663=>this[_0x1a382b(0x275)](_0xce3663),'conversation.hosted.message':_0x8f6ab7=>this[_0x1a382b(0x39f)](_0x8f6ab7),'conversation.hosted.interrupt':_0x450388=>this[_0x1a382b(0x2ae)](_0x450388),'conversation.hosted.config.update':_0x3d2908=>this[_0x1a382b(0x2e6)](_0x3d2908),'conversation.hosted.metadata.update':_0x1c941d=>this[_0x1a382b(0x21e)](_0x1c941d),'conversation.hosted.files.list':_0x55fee0=>this[_0x1a382b(0x250)](_0x55fee0),'conversation.hosted.file.read':_0x3eba40=>this[_0x1a382b(0x369)](_0x3eba40),'conversation.hosted.file.delete':_0x40fc2f=>this[_0x1a382b(0x1fe)](_0x40fc2f),'conversation.hosted.files.upload.preflight':_0x4c2320=>this[_0x1a382b(0x319)](_0x4c2320),'conversation.hosted.files.upload.create':_0x19d7b7=>this[_0x1a382b(0x247)](_0x19d7b7),'conversation.hosted.files.upload.chunk':_0x29d1f6=>this[_0x1a382b(0x25d)](_0x29d1f6),'conversation.hosted.files.upload.status':_0x29a1e0=>this[_0x1a382b(0x368)](_0x29a1e0),'conversation.hosted.files.upload.complete':_0x161c17=>this[_0x1a382b(0x2bd)](_0x161c17),'conversation.hosted.files.upload.cancel':_0x4a79c8=>this[_0x1a382b(0x31b)](_0x4a79c8),'conversation.hosted.delete':_0x9e513c=>this[_0x1a382b(0x38c)](_0x9e513c)};}[_0x241074(0x334)](){const _0x588bcb=_0x241074;if(this[_0x588bcb(0x345)]||this[_0x588bcb(0x256)][_0x588bcb(0x393)]>0x104+-0x6bb*0x3+0x132d*0x1||this[_0x588bcb(0x2b5)][_0x588bcb(0x393)]>-0x7*-0x3be+0x1d6+-0x1c08||this[_0x588bcb(0x362)][_0x588bcb(0x393)]>0xd*-0x135+-0x578+-0x1*-0x1529)return undefined;return this[_0x588bcb(0x345)]=!![],()=>{const _0x20e5a4=_0x588bcb;this[_0x20e5a4(0x345)]=![];};}[_0x241074(0x32c)](_0x2eb05a){const _0x13a232=_0x241074,_0x44938c=hostedRequest(_0x2eb05a),_0x2a7dfe=hostedConversationListInputSchema[_0x13a232(0x36a)](_0x44938c[_0x13a232(0x30e)]),_0x21d8f6=this[_0x13a232(0x239)][_0x13a232(0x286)][_0x13a232(0x300)]({'userId':_0x44938c[_0x13a232(0x324)],'limit':_0x2a7dfe[_0x13a232(0x312)],..._0x2a7dfe[_0x13a232(0x331)]===undefined?{}:{'cursor':_0x2a7dfe[_0x13a232(0x331)]}});return hostedConversationListPageSchema[_0x13a232(0x36a)]({..._0x21d8f6,'items':_0x21d8f6[_0x13a232(0x27b)][_0x13a232(0x2f7)](_0x6d2457=>({..._0x6d2457,'activity':this[_0x13a232(0x323)](_0x6d2457['id'])}))});}[_0x241074(0x232)](_0x3bcf3c){const _0x565a05=_0x241074;if(this[_0x565a05(0x345)])return Promise[_0x565a05(0x1f8)](new Error(_0x565a05(0x381)));const _0x27af45=hostedRequest(_0x3bcf3c),_0x21c04b=hostedConversationCreateInputSchema[_0x565a05(0x36a)](_0x27af45[_0x565a05(0x30e)]),_0x3973c4=conversationTemplateSummarySchema[_0x565a05(0x36a)](_0x27af45[_0x565a05(0x2cd)]),_0x37d28c=runtimeModels(_0x27af45[_0x565a05(0x2f4)]);if(_0x3973c4['id']!==_0x21c04b[_0x565a05(0x38b)]||_0x3973c4[_0x565a05(0x36d)]!==this[_0x565a05(0x239)][_0x565a05(0x36d)]()||!_0x3973c4[_0x565a05(0x2a0)]||_0x3973c4[_0x565a05(0x23c)]!==_0x565a05(0x2fd)||_0x3973c4[_0x565a05(0x21d)]===null)throw new Error(_0x565a05(0x316));const _0x191d9d=_0x27af45[_0x565a05(0x324)]+'\x00'+_0x21c04b[_0x565a05(0x36e)],_0x3c6362=this[_0x565a05(0x24f)][_0x565a05(0x364)](_0x191d9d);if(_0x3c6362!==undefined)return _0x3c6362;const _0x5349d1=this[_0x565a05(0x239)][_0x565a05(0x286)][_0x565a05(0x372)](_0x27af45[_0x565a05(0x324)],_0x21c04b[_0x565a05(0x36e)]);if(_0x5349d1!==undefined)return this[_0x565a05(0x25c)](_0x27af45[_0x565a05(0x324)],_0x5349d1['id'],_0x37d28c);const _0x2b6d20=this[_0x565a05(0x35c)](_0x27af45[_0x565a05(0x324)],_0x21c04b[_0x565a05(0x36e)],_0x3973c4,_0x37d28c,_0x27af45[_0x565a05(0x31d)]);return this[_0x565a05(0x24f)][_0x565a05(0x38e)](_0x191d9d,_0x2b6d20),void _0x2b6d20[_0x565a05(0x2a2)](()=>this[_0x565a05(0x24f)][_0x565a05(0x38c)](_0x191d9d))[_0x565a05(0x373)](()=>undefined),_0x2b6d20;}async[_0x241074(0x35c)](_0x258602,_0x5caac5,_0x5b325b,_0xb6868c,_0xc3ecd0){const _0x5d0997=_0x241074;await this[_0x5d0997(0x239)][_0x5d0997(0x2e2)]?.();const _0x3d22c2=await this[_0x5d0997(0x231)](_0x5b325b[_0x5d0997(0x21d)],_0x5b325b['id'],!![]),_0x5024ce=selectModel(_0x3d22c2,_0xb6868c,_0x3d22c2[_0x5d0997(0x332)][_0x5d0997(0x3a1)]),_0x5ce241=this['id'](),_0x38bfea=await this[_0x5d0997(0x239)][_0x5d0997(0x286)][_0x5d0997(0x370)](_0x258602,_0x5ce241),_0x111b8d=this[_0x5d0997(0x399)](_0x38bfea[_0x5d0997(0x32e)],_0x3d22c2),_0x5842c1=this[_0x5d0997(0x284)](_0x38bfea[_0x5d0997(0x32e)],_0x3d22c2);let _0xbb0f77;try{const _0x5deda5=await this[_0x5d0997(0x239)][_0x5d0997(0x266)][_0x5d0997(0x27f)]({'conversationId':_0x5ce241,'homeDirectory':_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2dc)],'workspaceDirectory':_0x3d22c2[_0x5d0997(0x397)],'systemInstruction':systemInstruction(_0x3d22c2),'defaultModelId':_0x5024ce['id'],'models':networkModels(allowedModels(_0x3d22c2,_0xb6868c),_0x3d22c2[_0x5d0997(0x270)][_0x5d0997(0x2e8)]),..._0xc3ecd0===undefined?{}:{'runtimeScopeId':_0xc3ecd0},'pathMounts':_0x111b8d,'processExecutor':_0x5842c1});_0xbb0f77=_0x5deda5[_0x5d0997(0x265)];const _0x1e796b=this[_0x5d0997(0x34c)](),_0x4adff5={'id':_0x5ce241,'nodeId':this[_0x5d0997(0x239)][_0x5d0997(0x36d)](),'sessionId':_0xbb0f77,'templateId':_0x5b325b['id'],'templateName':_0x5b325b[_0x5d0997(0x2e3)],'activeVersionId':_0x3d22c2['id'],'title':_0x5b325b[_0x5d0997(0x2e3)],'titleSource':_0x5d0997(0x314),'pinnedAt':null,'status':_0x5d0997(0x2fd),'modelId':_0x5024ce['id'],'createdAt':_0x1e796b,'updatedAt':_0x1e796b,'lastActivityAt':_0x1e796b,'userStorageKey':_0x38bfea[_0x5d0997(0x356)],'conversationStorageKey':_0x38bfea[_0x5d0997(0x2f9)],'clientRequestId':_0x5caac5,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0x3d22c2[_0x5d0997(0x270)][_0x5d0997(0x296)][_0x5d0997(0x20e)]}},_0x408257=await this[_0x5d0997(0x239)][_0x5d0997(0x286)][_0x5d0997(0x35c)](_0x4adff5);return _0x408257['id']!==_0x5ce241&&(await this[_0x5d0997(0x239)][_0x5d0997(0x266)][_0x5d0997(0x245)]({'conversationId':_0x5ce241,'sessionId':_0xbb0f77,'homeDirectory':_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2dc)]})[_0x5d0997(0x373)](()=>undefined),await rm(_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2ec)],{'recursive':!![],'force':!![]})),this[_0x5d0997(0x25c)](_0x258602,_0x408257['id'],_0xb6868c);}catch(_0x1042f3){if(_0xbb0f77!==undefined)await this[_0x5d0997(0x239)][_0x5d0997(0x266)][_0x5d0997(0x245)]({'conversationId':_0x5ce241,'sessionId':_0xbb0f77,'homeDirectory':_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2dc)]})[_0x5d0997(0x373)](()=>undefined);await rm(_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2ec)],{'recursive':!![],'force':!![]})[_0x5d0997(0x373)](()=>undefined);throw _0x1042f3;}}async[_0x241074(0x364)](_0x2091b9){const _0x325d2b=_0x241074,_0xc4df7c=hostedRequest(_0x2091b9),_0x1d4483=hostedConversationIdInputSchema[_0x325d2b(0x36a)](_0xc4df7c[_0x325d2b(0x30e)]);return this[_0x325d2b(0x25c)](_0xc4df7c[_0x325d2b(0x324)],_0x1d4483[_0x325d2b(0x351)],runtimeModels(_0xc4df7c[_0x325d2b(0x2f4)]),_0xc4df7c[_0x325d2b(0x2b6)]);}async[_0x241074(0x25c)](_0x256219,_0x57c267,_0x20d313,_0x3bab81=![]){const _0xcb5452=_0x241074;let _0x58daf6=this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x2c9)](_0x256219,_0x57c267);if(_0x3bab81)_0x58daf6=await this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x387)](_0x256219,_0x57c267,this[_0xcb5452(0x34c)]());const _0x540f94=await this[_0xcb5452(0x231)](_0x58daf6[_0xcb5452(0x347)],_0x58daf6[_0xcb5452(0x38b)]),_0x34acec=networkModels(allowedModels(_0x540f94,_0x20d313),_0x540f94[_0xcb5452(0x270)][_0xcb5452(0x2e8)]),_0x4151a4=this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x2be)](_0x256219,_0x58daf6['id']),_0x54eb42=await this[_0xcb5452(0x239)][_0xcb5452(0x266)][_0xcb5452(0x2d6)]({'conversationId':_0x58daf6['id'],'sessionId':_0x58daf6[_0xcb5452(0x265)],'homeDirectory':_0x4151a4[_0xcb5452(0x2dc)],'modelId':_0x58daf6[_0xcb5452(0x2d1)]});return hostedConversationSnapshotSchema[_0xcb5452(0x36a)]({'conversation':this[_0xcb5452(0x326)](_0x58daf6),'template':templateSummary(_0x58daf6,_0x540f94[_0xcb5452(0x270)]),'run':this[_0xcb5452(0x2b5)][_0xcb5452(0x364)](_0x58daf6['id'])?.[_0xcb5452(0x201)]??null,'turns':_0x54eb42,'files':this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x250)](_0x256219,_0x58daf6['id']),'models':_0x34acec[_0xcb5452(0x2f7)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0x241074(0x203)](_0x17a893){const _0x47ddb4=_0x241074,_0xe1c744=hostedRequest(_0x17a893),_0x219248=hostedConversationWatchInputSchema[_0x47ddb4(0x36a)](_0xe1c744[_0x47ddb4(0x30e)]),_0x2fa171=this[_0x47ddb4(0x239)][_0x47ddb4(0x286)][_0x47ddb4(0x2c9)](_0xe1c744[_0x47ddb4(0x324)],_0x219248[_0x47ddb4(0x351)]);if(this[_0x47ddb4(0x233)][_0x47ddb4(0x382)](_0x2fa171['id']))throw new Error(_0x47ddb4(0x365));const _0x2913f6=requireWatchSessionHash(_0xe1c744[_0x47ddb4(0x336)]),_0x1dfb50=watchOwnerKey(_0x2913f6,_0x219248[_0x47ddb4(0x35d)]);if(_0x219248[_0x47ddb4(0x22a)]===_0x47ddb4(0x32d)){const _0x28f44c=this[_0x47ddb4(0x311)][_0x47ddb4(0x364)](_0x1dfb50);if(_0x28f44c===undefined||!this[_0x47ddb4(0x23e)][_0x47ddb4(0x2a5)](_0x1dfb50,_0x28f44c[_0x47ddb4(0x218)])||_0x28f44c[_0x47ddb4(0x2d4)]!==_0x219248[_0x47ddb4(0x2d4)]||_0x28f44c[_0x47ddb4(0x351)]!==_0x219248[_0x47ddb4(0x351)]||_0x28f44c[_0x47ddb4(0x324)]!==_0xe1c744[_0x47ddb4(0x324)]||_0x28f44c[_0x47ddb4(0x277)]<=Date[_0x47ddb4(0x34c)]()){this[_0x47ddb4(0x36b)](_0x1dfb50);throw new Error(_0x47ddb4(0x2e1));}return _0x28f44c[_0x47ddb4(0x277)]=Date[_0x47ddb4(0x34c)]()+WATCH_TTL_MS,clearTimeout(_0x28f44c[_0x47ddb4(0x33e)]),_0x28f44c[_0x47ddb4(0x33e)]=this[_0x47ddb4(0x346)](_0x1dfb50),this[_0x47ddb4(0x379)](_0x28f44c);}const _0x634604=runtimeModels(_0xe1c744[_0x47ddb4(0x2f4)]),_0x315b8e=this[_0x47ddb4(0x311)][_0x47ddb4(0x364)](_0x1dfb50);if(_0x315b8e!==undefined&&this[_0x47ddb4(0x23e)][_0x47ddb4(0x2a5)](_0x1dfb50,_0x315b8e[_0x47ddb4(0x218)])&&_0x315b8e[_0x47ddb4(0x2d4)]===_0x219248[_0x47ddb4(0x2d4)]&&_0x315b8e[_0x47ddb4(0x351)]===_0x219248[_0x47ddb4(0x351)]&&_0x315b8e[_0x47ddb4(0x324)]===_0xe1c744[_0x47ddb4(0x324)]&&_0x315b8e[_0x47ddb4(0x277)]>Date[_0x47ddb4(0x34c)]())return _0x315b8e[_0x47ddb4(0x277)]=Date[_0x47ddb4(0x34c)]()+WATCH_TTL_MS,clearTimeout(_0x315b8e[_0x47ddb4(0x33e)]),_0x315b8e[_0x47ddb4(0x33e)]=this[_0x47ddb4(0x346)](_0x1dfb50),this[_0x47ddb4(0x379)](_0x315b8e);this[_0x47ddb4(0x36b)](_0x1dfb50);const _0x5338e7=this[_0x47ddb4(0x23e)][_0x47ddb4(0x279)](_0x1dfb50,_0x47ddb4(0x355),()=>this[_0x47ddb4(0x36b)](_0x1dfb50)),_0x23d4c5={'ownerKey':_0x1dfb50,'slotToken':_0x5338e7,'sessionHash':_0x2913f6,'workbenchConnectionId':_0x219248[_0x47ddb4(0x35d)],'watchId':_0x219248[_0x47ddb4(0x2d4)],'conversationId':_0x219248[_0x47ddb4(0x351)],'templateId':_0x2fa171[_0x47ddb4(0x38b)],'userId':_0xe1c744[_0x47ddb4(0x324)],'models':_0x634604,'nodeGeneration':this[_0x47ddb4(0x239)][_0x47ddb4(0x1fc)]?.()??_0x47ddb4(0x339),'pendingEvents':[],'expiresAt':Date[_0x47ddb4(0x34c)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x23d4c5[_0x47ddb4(0x33e)]=this[_0x47ddb4(0x346)](_0x1dfb50),this[_0x47ddb4(0x311)][_0x47ddb4(0x38e)](_0x1dfb50,_0x23d4c5),void this[_0x47ddb4(0x26f)](_0x23d4c5),this[_0x47ddb4(0x379)](_0x23d4c5);}[_0x241074(0x275)](_0x2ffadd){const _0x4f9420=_0x241074,_0x3e63ac=hostedRequest(_0x2ffadd),_0x3bac8d=hostedConversationUnwatchInputSchema[_0x4f9420(0x36a)](_0x3e63ac[_0x4f9420(0x30e)]);this[_0x4f9420(0x239)][_0x4f9420(0x286)][_0x4f9420(0x2c9)](_0x3e63ac[_0x4f9420(0x324)],_0x3bac8d[_0x4f9420(0x351)]);const _0x129360=watchOwnerKey(requireWatchSessionHash(_0x3e63ac[_0x4f9420(0x336)]),_0x3bac8d[_0x4f9420(0x35d)]),_0x220d18=this[_0x4f9420(0x311)][_0x4f9420(0x364)](_0x129360);if(_0x220d18?.[_0x4f9420(0x2d4)]===_0x3bac8d[_0x4f9420(0x2d4)]&&_0x220d18[_0x4f9420(0x351)]===_0x3bac8d[_0x4f9420(0x351)]&&_0x220d18[_0x4f9420(0x324)]===_0x3e63ac[_0x4f9420(0x324)])this[_0x4f9420(0x36b)](_0x129360);return{'unwatched':!![]};}[_0x241074(0x208)](_0x39a30e,_0x5bde9f){const _0x326813=_0x241074;return this[_0x326813(0x206)](_0x39a30e,{'conversationId':_0x39a30e,'kind':_0x326813(0x266),'runtimeEvent':_0x5bde9f});}[_0x241074(0x396)](_0x3771d1){const _0x30afbb=_0x241074;return this[_0x30afbb(0x233)][_0x30afbb(0x382)](_0x3771d1)||this[_0x30afbb(0x2b5)][_0x30afbb(0x382)](_0x3771d1)||this[_0x30afbb(0x362)][_0x30afbb(0x382)](_0x3771d1)||[...this[_0x30afbb(0x311)][_0x30afbb(0x2cf)]()][_0x30afbb(0x343)](_0x112147=>_0x112147[_0x30afbb(0x351)]===_0x3771d1)||[...this[_0x30afbb(0x2b3)][_0x30afbb(0x2cf)]()][_0x30afbb(0x343)](_0x32b5fc=>_0x32b5fc[_0x30afbb(0x351)]===_0x3771d1&&_0x32b5fc[_0x30afbb(0x23c)]===_0x30afbb(0x24c))||[...this[_0x30afbb(0x256)][_0x30afbb(0x29b)]()][_0x30afbb(0x343)](_0x1a5565=>_0x1a5565[_0x30afbb(0x28f)](_0x3771d1+'\x00'));}[_0x241074(0x22f)](_0x17414c){const _0x443d5c=_0x241074;if(this[_0x443d5c(0x396)](_0x17414c))return undefined;return this[_0x443d5c(0x233)][_0x443d5c(0x333)](_0x17414c),()=>{const _0xdb450=_0x443d5c;this[_0xdb450(0x233)][_0xdb450(0x38c)](_0x17414c);};}async[_0x241074(0x30f)](_0x272ea4){const _0x50b5be=_0x241074,_0x323628=this[_0x50b5be(0x239)][_0x50b5be(0x286)][_0x50b5be(0x2ea)](_0x272ea4);await this[_0x50b5be(0x239)][_0x50b5be(0x266)][_0x50b5be(0x245)]({'conversationId':_0x272ea4['id'],'sessionId':_0x272ea4[_0x50b5be(0x265)],'homeDirectory':_0x323628[_0x50b5be(0x2dc)]})[_0x50b5be(0x373)](()=>undefined);}[_0x241074(0x243)](){const _0x109186=_0x241074;for(const [_0x565e46,_0x3ae693]of this[_0x109186(0x2b5)]){const _0x40524a=runInterruptionKey(_0x565e46,_0x3ae693[_0x109186(0x201)]['id']);this[_0x109186(0x33d)][_0x109186(0x333)](_0x40524a);if(!_0x3ae693[_0x109186(0x353)]())this[_0x109186(0x33d)][_0x109186(0x38c)](_0x40524a);}for(const _0x5a9a3b of[...this[_0x109186(0x311)][_0x109186(0x29b)]()])this[_0x109186(0x36b)](_0x5a9a3b);}[_0x241074(0x39f)](_0x2ac759){const _0x833956=_0x241074;if(this[_0x833956(0x345)])return Promise[_0x833956(0x1f8)](new Error(_0x833956(0x381)));const _0x3ec4c9=hostedRequest(_0x2ac759),_0x355e3b=hostedConversationMessageInputSchema[_0x833956(0x36a)](_0x3ec4c9[_0x833956(0x30e)]),_0x25f3b4=_0x355e3b[_0x833956(0x351)]+'\x00'+_0x355e3b[_0x833956(0x344)],_0x3fb563=this[_0x833956(0x256)][_0x833956(0x364)](_0x25f3b4);if(_0x3fb563!==undefined)return _0x3fb563;const _0x463b49=this[_0x833956(0x239)][_0x833956(0x286)][_0x833956(0x251)](_0x3ec4c9[_0x833956(0x324)],_0x355e3b[_0x833956(0x351)],_0x355e3b[_0x833956(0x344)]);if(_0x463b49!==undefined){const _0x7f9ed4=this[_0x833956(0x239)][_0x833956(0x286)][_0x833956(0x2c9)](_0x3ec4c9[_0x833956(0x324)],_0x355e3b[_0x833956(0x351)]);return Promise[_0x833956(0x2bb)]({'conversation':this[_0x833956(0x326)](_0x7f9ed4),'run':runFromMessage(_0x463b49)});}if([...this[_0x833956(0x256)][_0x833956(0x29b)]()][_0x833956(0x343)](_0x1f131a=>_0x1f131a[_0x833956(0x28f)](_0x355e3b[_0x833956(0x351)]+'\x00')))return Promise[_0x833956(0x1f8)](new Error(_0x833956(0x2d3)));const _0x263748=this[_0x833956(0x272)](_0x3ec4c9,_0x355e3b);return this[_0x833956(0x256)][_0x833956(0x38e)](_0x25f3b4,_0x263748),void _0x263748[_0x833956(0x2a2)](()=>this[_0x833956(0x256)][_0x833956(0x38c)](_0x25f3b4))[_0x833956(0x373)](()=>undefined),_0x263748;}async[_0x241074(0x272)](_0x54c95e,_0x558e78){const _0x2ac5d8=_0x241074;let _0x529447=this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x2c9)](_0x54c95e[_0x2ac5d8(0x324)],_0x558e78[_0x2ac5d8(0x351)]);if(this[_0x2ac5d8(0x233)][_0x2ac5d8(0x382)](_0x529447['id']))throw new Error(_0x2ac5d8(0x365));if(_0x529447[_0x2ac5d8(0x23c)]!==_0x2ac5d8(0x2fd))throw new Error(_0x2ac5d8(0x365));if(this[_0x2ac5d8(0x2b5)][_0x2ac5d8(0x382)](_0x529447['id']))throw new Error(_0x2ac5d8(0x2d3));const _0xcd21f3=sessionTitleFromFirstMessage(_0x558e78[_0x2ac5d8(0x2c4)]),_0x1ec4ea=_0xcd21f3[_0x2ac5d8(0x315)]>0xaed+-0x43+-0xaaa&&!this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x2c7)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id']),_0x4cc58c=runtimeModels(_0x54c95e[_0x2ac5d8(0x2f4)]),_0x4c27fd=this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x2be)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id']);let _0x3c14bd,_0x131e95,_0x1f7264,_0xfbfb8c;const _0x46ee90=_0x529447[_0x2ac5d8(0x2b6)]?undefined:this[_0x2ac5d8(0x29e)](_0x529447[_0x2ac5d8(0x38b)]);if(_0x46ee90!==undefined&&_0x46ee90!==_0x529447[_0x2ac5d8(0x347)]){const _0x351f28=_0x529447[_0x2ac5d8(0x347)],_0x240538=_0x46ee90;try{_0x3c14bd=await this[_0x2ac5d8(0x231)](_0x240538,_0x529447[_0x2ac5d8(0x38b)],!![]),_0x131e95=selectModel(_0x3c14bd,_0x4cc58c,_0x558e78[_0x2ac5d8(0x2d1)]??_0x3c14bd[_0x2ac5d8(0x332)][_0x2ac5d8(0x3a1)]),_0x1f7264=resolveMcpServers(_0x3c14bd,this[_0x2ac5d8(0x239)][_0x2ac5d8(0x254)]??process.env),this[_0x2ac5d8(0x399)](_0x4c27fd,_0x3c14bd),this[_0x2ac5d8(0x284)](_0x4c27fd,_0x3c14bd),_0xfbfb8c={'previousVersionId':_0x351f28,'targetVersionId':_0x240538};}catch(_0x11f9bc){this[_0x2ac5d8(0x260)](_0x529447,_0x351f28,_0x240538,_0x11f9bc);throw new Error(_0x2ac5d8(0x1f9));}}else _0x3c14bd=await this[_0x2ac5d8(0x231)](_0x529447[_0x2ac5d8(0x347)],_0x529447[_0x2ac5d8(0x38b)],!![]),_0x131e95=selectModel(_0x3c14bd,_0x4cc58c,_0x558e78[_0x2ac5d8(0x2d1)]??_0x529447[_0x2ac5d8(0x2d1)]);const _0x44887a=await Promise[_0x2ac5d8(0x32b)](_0x558e78[_0x2ac5d8(0x388)][_0x2ac5d8(0x2f7)](_0x763e65=>this[_0x2ac5d8(0x225)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id'],_0x763e65))),_0x518e77=attachmentPrompt(_0x558e78[_0x2ac5d8(0x2c4)],_0x44887a),_0x4847ce=join(_0x4c27fd[_0x2ac5d8(0x252)],_0x2ac5d8(0x322)+randomUUID());await mkdir(_0x4847ce,{'mode':0x1c0}),this[_0x2ac5d8(0x1f5)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447,_0x2ac5d8(0x34a),this[_0x2ac5d8(0x34c)]());const _0x50efa9=[];let _0x4b0615=![];const _0x40777b=await this[_0x2ac5d8(0x239)][_0x2ac5d8(0x266)][_0x2ac5d8(0x299)]({'conversationId':_0x529447['id'],'sessionId':_0x529447[_0x2ac5d8(0x265)],'clientMessageId':_0x558e78[_0x2ac5d8(0x344)],'userPrompt':_0x558e78[_0x2ac5d8(0x2c4)],'prompt':_0x518e77,'attachmentIds':_0x558e78[_0x2ac5d8(0x388)],'access':_0x2ac5d8(0x32f),'modelId':_0x131e95['id'],'models':networkModels(allowedModels(_0x3c14bd,_0x4cc58c),_0x3c14bd[_0x2ac5d8(0x270)][_0x2ac5d8(0x2e8)]),..._0x54c95e[_0x2ac5d8(0x31d)]===undefined?{}:{'runtimeScopeId':_0x54c95e[_0x2ac5d8(0x31d)]},'systemInstruction':systemInstruction(_0x3c14bd),'homeDirectory':_0x4c27fd[_0x2ac5d8(0x2dc)],'workspaceDirectory':_0x3c14bd[_0x2ac5d8(0x397)],'temporaryDirectory':_0x4847ce,'pathMounts':this[_0x2ac5d8(0x399)](_0x4c27fd,_0x3c14bd),'processExecutor':this[_0x2ac5d8(0x284)](_0x4c27fd,_0x3c14bd,_0x4847ce),'mcpServers':_0x1f7264??resolveMcpServers(_0x3c14bd,this[_0x2ac5d8(0x239)][_0x2ac5d8(0x254)]??process.env),'webAccess':_0x3c14bd[_0x2ac5d8(0x270)][_0x2ac5d8(0x2e8)]!==_0x2ac5d8(0x34f),'onEvent':_0x515810=>{const _0x325bd1=_0x2ac5d8;if(_0x4b0615)this[_0x325bd1(0x208)](_0x529447['id'],_0x515810);else _0x50efa9[_0x325bd1(0x281)](_0x515810);}})[_0x2ac5d8(0x373)](async _0x2db936=>{const _0x554a8d=_0x2ac5d8;this[_0x554a8d(0x1f5)](_0x54c95e[_0x554a8d(0x324)],_0x529447,_0x554a8d(0x28e),this[_0x554a8d(0x34c)]()),await rm(_0x4847ce,{'recursive':!![],'force':!![]})[_0x554a8d(0x373)](()=>undefined);if(_0xfbfb8c!==undefined){this[_0x554a8d(0x260)](_0x529447,_0xfbfb8c[_0x554a8d(0x395)],_0xfbfb8c[_0x554a8d(0x38f)],_0x2db936);throw new Error(_0x554a8d(0x1f9));}throw _0x2db936;}),_0x359f51=_0x40777b[_0x2ac5d8(0x201)][_0x2ac5d8(0x305)];let _0x3870de=![],_0x4db001;try{this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x37f)]({'conversationId':_0x529447['id'],'clientMessageId':_0x558e78[_0x2ac5d8(0x344)],'runId':_0x40777b[_0x2ac5d8(0x201)]['id'],'userTextPresent':_0xcd21f3[_0x2ac5d8(0x315)]>-0x85d*-0x1+-0x1052+0x7f5,'status':_0x2ac5d8(0x288),'createdAt':_0x359f51,'updatedAt':_0x359f51}),_0x3870de=!![];const _0x53ed7b=this[_0x2ac5d8(0x34c)]();_0x4db001=await this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x378)]({'conversationId':_0x529447['id'],'modelId':_0x131e95['id'],'activityAt':_0x53ed7b,..._0xfbfb8c===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0xfbfb8c[_0x2ac5d8(0x395)],'activeVersionId':_0xfbfb8c[_0x2ac5d8(0x38f)],'maxStorageBytes':_0x3c14bd[_0x2ac5d8(0x270)][_0x2ac5d8(0x296)][_0x2ac5d8(0x20e)]}},..._0x1ec4ea?{'automaticTitle':_0xcd21f3}:{}});}catch(_0x47f011){try{_0x40777b[_0x2ac5d8(0x353)]();}catch{}const _0x2a4838=await _0x40777b[_0x2ac5d8(0x2d9)][_0x2ac5d8(0x373)](()=>({'status':_0x2ac5d8(0x292),'completedAt':this[_0x2ac5d8(0x34c)]()}));if(_0x3870de)try{this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x268)](_0x529447['id'],_0x558e78[_0x2ac5d8(0x344)],_0x2a4838[_0x2ac5d8(0x23c)],_0x2a4838[_0x2ac5d8(0x2cb)]);}catch{}await rm(_0x4847ce,{'recursive':!![],'force':!![]})[_0x2ac5d8(0x373)](()=>undefined),this[_0x2ac5d8(0x1f5)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447,_0x2ac5d8(0x28e),_0x2a4838[_0x2ac5d8(0x2cb)]);if(_0xfbfb8c!==undefined)this[_0x2ac5d8(0x260)](_0x529447,_0xfbfb8c[_0x2ac5d8(0x395)],_0xfbfb8c[_0x2ac5d8(0x38f)],_0x47f011);throw _0x47f011;}_0x529447=_0x4db001[_0x2ac5d8(0x360)];if(_0xfbfb8c!==undefined)this[_0x2ac5d8(0x206)](_0x529447['id'],{'conversationId':_0x529447['id'],'kind':_0x2ac5d8(0x27d),'upgrade':{'status':_0x2ac5d8(0x39b),'previousVersionId':_0xfbfb8c[_0x2ac5d8(0x395)],'targetVersionId':_0xfbfb8c[_0x2ac5d8(0x38f)],'activeVersionId':_0x529447[_0x2ac5d8(0x347)],'conversation':this[_0x2ac5d8(0x326)](_0x529447),'error':null}});this[_0x2ac5d8(0x2b5)][_0x2ac5d8(0x38e)](_0x529447['id'],_0x40777b),this[_0x2ac5d8(0x1f5)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447,_0x2ac5d8(0x288),_0x40777b[_0x2ac5d8(0x201)][_0x2ac5d8(0x305)]);if(_0x4db001[_0x2ac5d8(0x27c)])this[_0x2ac5d8(0x206)](_0x529447['id'],{'conversationId':_0x529447['id'],'kind':_0x2ac5d8(0x360),'conversation':this[_0x2ac5d8(0x326)](_0x529447)});this[_0x2ac5d8(0x206)](_0x529447['id'],{'conversationId':_0x529447['id'],'kind':_0x2ac5d8(0x201),'run':_0x40777b[_0x2ac5d8(0x201)]}),_0x4b0615=!![];for(const _0x41bfb5 of _0x50efa9)this[_0x2ac5d8(0x208)](_0x529447['id'],_0x41bfb5);_0x50efa9[_0x2ac5d8(0x315)]=0x14ab+0x1*-0x23c5+0xf1a;const _0x52f9a2=_0x40777b[_0x2ac5d8(0x2d9)][_0x2ac5d8(0x28b)](_0x5ac452=>this[_0x2ac5d8(0x2c6)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id'],_0x558e78[_0x2ac5d8(0x344)],_0x40777b[_0x2ac5d8(0x201)],_0x5ac452),()=>this[_0x2ac5d8(0x2c6)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id'],_0x558e78[_0x2ac5d8(0x344)],_0x40777b[_0x2ac5d8(0x201)],{'status':_0x2ac5d8(0x292),'completedAt':this[_0x2ac5d8(0x34c)]()}))[_0x2ac5d8(0x373)](()=>undefined)[_0x2ac5d8(0x2a2)](async()=>{const _0x26a09a=_0x2ac5d8;this[_0x26a09a(0x33d)][_0x26a09a(0x38c)](runInterruptionKey(_0x529447['id'],_0x40777b[_0x26a09a(0x201)]['id']));if(this[_0x26a09a(0x2b5)][_0x26a09a(0x364)](_0x529447['id'])===_0x40777b)this[_0x26a09a(0x2b5)][_0x26a09a(0x38c)](_0x529447['id']);if(this[_0x26a09a(0x362)][_0x26a09a(0x364)](_0x529447['id'])===_0x52f9a2)this[_0x26a09a(0x362)][_0x26a09a(0x38c)](_0x529447['id']);await rm(_0x4847ce,{'recursive':!![],'force':!![]})[_0x26a09a(0x373)](()=>undefined);});return this[_0x2ac5d8(0x362)][_0x2ac5d8(0x38e)](_0x529447['id'],_0x52f9a2),void _0x52f9a2,{'conversation':this[_0x2ac5d8(0x326)](_0x529447),'run':_0x40777b[_0x2ac5d8(0x201)]};}async[_0x241074(0x2c6)](_0x23aebe,_0xe1b157,_0x44a9cc,_0x4d23b1,_0x18a3ea){const _0x233522=_0x241074,_0x3466e6=runInterruptionKey(_0xe1b157,_0x4d23b1['id']),_0x5701f0=this[_0x233522(0x33d)][_0x233522(0x382)](_0x3466e6);let _0xc9f21d;try{this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x268)](_0xe1b157,_0x44a9cc,_0x18a3ea[_0x233522(0x23c)],_0x18a3ea[_0x233522(0x2cb)]);try{const _0x2f9b16=await this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x2d7)](_0x23aebe,_0xe1b157);this[_0x233522(0x206)](_0xe1b157,{'conversationId':_0xe1b157,'kind':_0x233522(0x386),'files':_0x2f9b16,'error':null});}catch(_0x4b12e1){this[_0x233522(0x206)](_0xe1b157,{'conversationId':_0xe1b157,'kind':_0x233522(0x386),'files':this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x250)](_0x23aebe,_0xe1b157),'error':{'code':safeErrorCode(_0x4b12e1,_0x233522(0x290)),'message':_0x233522(0x29c)}});}await this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x337)](_0xe1b157,_0x18a3ea[_0x233522(0x2cb)]),this[_0x233522(0x206)](_0xe1b157,{'conversationId':_0xe1b157,'kind':_0x233522(0x201),'run':{'id':_0x4d23b1['id'],'status':_0x18a3ea[_0x233522(0x23c)],'startedAt':_0x4d23b1[_0x233522(0x305)],'completedAt':_0x18a3ea[_0x233522(0x2cb)]}}),await this[_0x233522(0x321)](_0xe1b157,_0x18a3ea[_0x233522(0x21f)],_0x18a3ea[_0x233522(0x2cb)])[_0x233522(0x373)](()=>undefined),_0xc9f21d=this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x2c9)](_0x23aebe,_0xe1b157);}finally{this[_0x233522(0x33d)][_0x233522(0x38c)](_0x3466e6);if(_0xc9f21d===undefined)try{_0xc9f21d=this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x2c9)](_0x23aebe,_0xe1b157);}catch{}if(_0xc9f21d!==undefined)this[_0x233522(0x1f5)](_0x23aebe,_0xc9f21d,_0x233522(0x28e),_0x18a3ea[_0x233522(0x2cb)]);}if(_0xc9f21d!==undefined&&(_0x18a3ea[_0x233522(0x23c)]!==_0x233522(0x2d8)||!_0x5701f0))this[_0x233522(0x23a)](_0x23aebe,_0xc9f21d,_0x4d23b1['id'],_0x18a3ea);}async[_0x241074(0x321)](_0x116e4a,_0x100314,_0x49cecd){const _0x58593d=_0x241074,_0x21f624=automaticHostedConversationTitle(_0x100314);if(_0x21f624===undefined)return;const _0x52b079=await this[_0x58593d(0x239)][_0x58593d(0x286)][_0x58593d(0x2bf)](_0x116e4a,_0x21f624,_0x49cecd);if(_0x52b079===undefined)return;this[_0x58593d(0x206)](_0x116e4a,{'conversationId':_0x116e4a,'kind':_0x58593d(0x360),'conversation':this[_0x58593d(0x326)](_0x52b079)});}[_0x241074(0x2ae)](_0x32571f){const _0x169fa2=_0x241074,_0x2a8bdf=hostedRequest(_0x32571f),_0x556ecc=hostedConversationIdInputSchema[_0x169fa2(0x36a)](_0x2a8bdf[_0x169fa2(0x30e)]),_0x32a6c4=this[_0x169fa2(0x239)][_0x169fa2(0x286)][_0x169fa2(0x2c9)](_0x2a8bdf[_0x169fa2(0x324)],_0x556ecc[_0x169fa2(0x351)]),_0x3c538c=this[_0x169fa2(0x2b5)][_0x169fa2(0x364)](_0x556ecc[_0x169fa2(0x351)]);if(_0x3c538c===undefined)return{'interrupted':![]};const _0x585b82=runInterruptionKey(_0x32a6c4['id'],_0x3c538c[_0x169fa2(0x201)]['id']);this[_0x169fa2(0x33d)][_0x169fa2(0x333)](_0x585b82);try{const _0xabbd27=_0x3c538c[_0x169fa2(0x353)]();if(!_0xabbd27)return this[_0x169fa2(0x33d)][_0x169fa2(0x38c)](_0x585b82),{'interrupted':![]};return this[_0x169fa2(0x1f5)](_0x2a8bdf[_0x169fa2(0x324)],_0x32a6c4,_0x169fa2(0x371),this[_0x169fa2(0x34c)]()),{'interrupted':!![]};}catch(_0x25258d){this[_0x169fa2(0x33d)][_0x169fa2(0x38c)](_0x585b82);throw _0x25258d;}}async[_0x241074(0x2e6)](_0x398be9){const _0x52d692=_0x241074,_0x68354d=hostedRequest(_0x398be9),_0x3cc798=hostedConversationConfigUpdateInputSchema[_0x52d692(0x36a)](_0x68354d[_0x52d692(0x30e)]),_0x559a5a=this[_0x52d692(0x239)][_0x52d692(0x286)][_0x52d692(0x2c9)](_0x68354d[_0x52d692(0x324)],_0x3cc798[_0x52d692(0x351)]);if(this[_0x52d692(0x233)][_0x52d692(0x382)](_0x559a5a['id']))throw new Error(_0x52d692(0x365));const _0x5824bf=await this[_0x52d692(0x231)](_0x559a5a[_0x52d692(0x347)],_0x559a5a[_0x52d692(0x38b)]),_0x40cb14=runtimeModels(_0x68354d[_0x52d692(0x2f4)]),_0xe71706=selectModel(_0x5824bf,_0x40cb14,_0x3cc798[_0x52d692(0x2d1)]??_0x559a5a[_0x52d692(0x2d1)]),_0x3306a1=this[_0x52d692(0x34c)](),_0x8566fd=await this[_0x52d692(0x239)][_0x52d692(0x286)][_0x52d692(0x205)](_0x559a5a['id'],_0x1acba0=>({..._0x1acba0,'modelId':_0xe71706['id'],'updatedAt':_0x3306a1,'lastActivityAt':_0x3306a1}));return this[_0x52d692(0x206)](_0x559a5a['id'],{'conversationId':_0x559a5a['id'],'kind':_0x52d692(0x27e),'conversation':this[_0x52d692(0x326)](_0x8566fd)}),{'conversation':this[_0x52d692(0x326)](_0x8566fd)};}async[_0x241074(0x21e)](_0x47954b){const _0x1db2a=_0x241074,_0x4eb18e=hostedRequest(_0x47954b),_0x51a17f=hostedConversationMetadataUpdateInputSchema[_0x1db2a(0x36a)](_0x4eb18e[_0x1db2a(0x30e)]),_0x4733ad=this[_0x1db2a(0x239)][_0x1db2a(0x286)][_0x1db2a(0x2c9)](_0x4eb18e[_0x1db2a(0x324)],_0x51a17f[_0x1db2a(0x351)]);if(this[_0x1db2a(0x233)][_0x1db2a(0x382)](_0x4733ad['id']))throw new Error(_0x1db2a(0x365));const _0x5ec985=this[_0x1db2a(0x34c)](),_0x58f530=await this[_0x1db2a(0x239)][_0x1db2a(0x286)][_0x1db2a(0x205)](_0x4733ad['id'],_0x18972a=>({..._0x18972a,'title':_0x51a17f[_0x1db2a(0x21f)]??_0x18972a[_0x1db2a(0x21f)],'titleSource':_0x51a17f[_0x1db2a(0x21f)]===undefined?_0x18972a[_0x1db2a(0x241)]:_0x1db2a(0x258),'pinnedAt':_0x51a17f[_0x1db2a(0x273)]===undefined?_0x18972a[_0x1db2a(0x359)]:_0x51a17f[_0x1db2a(0x273)]?_0x5ec985:null,'updatedAt':_0x5ec985,'lastActivityAt':_0x18972a[_0x1db2a(0x2b8)]}));return this[_0x1db2a(0x206)](_0x4733ad['id'],{'conversationId':_0x4733ad['id'],'kind':_0x1db2a(0x27e),'conversation':this[_0x1db2a(0x326)](_0x58f530)}),{'conversation':this[_0x1db2a(0x326)](_0x58f530)};}async[_0x241074(0x250)](_0x3fc497){const _0x22f1f7=_0x241074,_0x4ca7ec=hostedRequest(_0x3fc497),_0x5668c5=hostedConversationIdInputSchema[_0x22f1f7(0x36a)](_0x4ca7ec[_0x22f1f7(0x30e)]);return hostedConversationFilesSchema[_0x22f1f7(0x36a)]({'files':this[_0x22f1f7(0x239)][_0x22f1f7(0x286)][_0x22f1f7(0x250)](_0x4ca7ec[_0x22f1f7(0x324)],_0x5668c5[_0x22f1f7(0x351)])});}async[_0x241074(0x369)](_0x3cfd35){const _0x2f5413=_0x241074,_0x2f406c=hostedRequest(_0x3cfd35),_0xd48d2=hostedConversationFileReadInputSchema[_0x2f5413(0x36a)](_0x2f406c[_0x2f5413(0x30e)]),_0x301ba2=this[_0x2f5413(0x239)][_0x2f5413(0x286)][_0x2f5413(0x31f)](_0x2f406c[_0x2f5413(0x324)],_0xd48d2[_0x2f5413(0x351)],_0xd48d2[_0x2f5413(0x383)]),_0x53fd67=this[_0x2f5413(0x239)][_0x2f5413(0x286)][_0x2f5413(0x39a)](_0x2f406c[_0x2f5413(0x324)],_0x301ba2);await assertRegularFile(_0x53fd67,_0x301ba2[_0x2f5413(0x393)]);const _0x5ec4a0=_0xd48d2[_0x2f5413(0x2d5)]??-0x1*0x2ad+-0x27d+0x52a*0x1;if(_0x5ec4a0>_0x301ba2[_0x2f5413(0x393)])throw new Error(_0x2f5413(0x35b));const _0xefc1be=Math[_0x2f5413(0x301)](_0xd48d2[_0x2f5413(0x312)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x315e56=await open(_0x53fd67,'r');try{const _0x20c3b0=Buffer[_0x2f5413(0x2a9)](Math[_0x2f5413(0x301)](_0xefc1be,Math[_0x2f5413(0x27a)](0x1380+0x1*-0x2303+0xf83,_0x301ba2[_0x2f5413(0x393)]-_0x5ec4a0))),_0x10c21=await _0x315e56[_0x2f5413(0x25f)](_0x20c3b0,0x1fd3+0x653+-0x2626,_0x20c3b0[_0x2f5413(0x315)],_0x5ec4a0),_0x3c50ed=_0x5ec4a0+_0x10c21[_0x2f5413(0x25b)],_0x3a2876=_0x3c50ed>=_0x301ba2[_0x2f5413(0x393)];return hostedConversationFileReadResultSchema[_0x2f5413(0x36a)]({'file':_0x301ba2,'encoding':_0x2f5413(0x37d),'content':_0x20c3b0[_0x2f5413(0x202)](0x1*-0xfaa+0x11cd+-0x223,_0x10c21[_0x2f5413(0x25b)])[_0x2f5413(0x2f5)](_0x2f5413(0x37d)),'offset':_0x5ec4a0,'nextOffset':_0x3a2876?null:_0x3c50ed,'eof':_0x3a2876});}finally{await _0x315e56[_0x2f5413(0x366)]();}}async[_0x241074(0x1fe)](_0x1f7e5e){const _0x4c5a07=_0x241074,_0x531669=hostedRequest(_0x1f7e5e),_0x361478=hostedConversationFileDeleteInputSchema[_0x4c5a07(0x36a)](_0x531669[_0x4c5a07(0x30e)]);this[_0x4c5a07(0x2c2)](_0x531669[_0x4c5a07(0x324)],_0x361478[_0x4c5a07(0x351)]);const _0x125aed=_0x361478[_0x4c5a07(0x351)]+'\x00'+_0x361478[_0x4c5a07(0x383)];if(this[_0x4c5a07(0x374)][_0x4c5a07(0x382)](_0x125aed))throw new Error(_0x4c5a07(0x34b));this[_0x4c5a07(0x374)][_0x4c5a07(0x333)](_0x125aed);try{const _0x129fe8=await this[_0x4c5a07(0x239)][_0x4c5a07(0x286)][_0x4c5a07(0x1fe)](_0x531669[_0x4c5a07(0x324)],_0x361478[_0x4c5a07(0x351)],_0x361478[_0x4c5a07(0x383)],this[_0x4c5a07(0x34c)]()),_0x1437f1=hostedConversationFileDeleteResultSchema[_0x4c5a07(0x36a)]({'deletedFileId':_0x361478[_0x4c5a07(0x383)],'files':_0x129fe8});return this[_0x4c5a07(0x206)](_0x361478[_0x4c5a07(0x351)],{'conversationId':_0x361478[_0x4c5a07(0x351)],'kind':_0x4c5a07(0x386),'files':_0x1437f1[_0x4c5a07(0x386)],'error':null}),_0x1437f1;}finally{this[_0x4c5a07(0x374)][_0x4c5a07(0x38c)](_0x125aed);}}async[_0x241074(0x319)](_0x474165){const _0x3057e4=_0x241074,_0x1d6bcc=hostedRequest(_0x474165),_0x21c209=hostedConversationUploadPreflightInputSchema[_0x3057e4(0x36a)](_0x1d6bcc[_0x3057e4(0x30e)]),_0x2d041c=this[_0x3057e4(0x2c2)](_0x1d6bcc[_0x3057e4(0x324)],_0x21c209[_0x3057e4(0x351)]),_0x561d3d=await this[_0x3057e4(0x231)](_0x2d041c[_0x3057e4(0x347)],_0x2d041c[_0x3057e4(0x38b)]),_0x258bdd=this[_0x3057e4(0x239)][_0x3057e4(0x286)][_0x3057e4(0x2be)](_0x1d6bcc[_0x3057e4(0x324)],_0x2d041c['id']),_0x3851ac=await Promise[_0x3057e4(0x32b)](_0x21c209[_0x3057e4(0x386)][_0x3057e4(0x2f7)](async _0x4213b4=>({'name':_0x4213b4[_0x3057e4(0x2e3)],'status':await this[_0x3057e4(0x204)](_0x258bdd,_0x2d041c,_0x561d3d[_0x3057e4(0x270)],_0x4213b4[_0x3057e4(0x2e3)],_0x4213b4[_0x3057e4(0x393)])})));return hostedConversationUploadPreflightResultSchema[_0x3057e4(0x36a)]({'files':_0x3851ac});}async[_0x241074(0x247)](_0x1b360b){const _0xc2b789=_0x241074,_0xd96237=hostedRequest(_0x1b360b),_0x10a40d=hostedConversationUploadCreateInputSchema[_0xc2b789(0x36a)](_0xd96237[_0xc2b789(0x30e)]),_0x2cabdc=this[_0xc2b789(0x2c2)](_0xd96237[_0xc2b789(0x324)],_0x10a40d[_0xc2b789(0x351)]),_0x5d37ca=_0xd96237[_0xc2b789(0x324)]+'\x00'+_0x2cabdc['id']+'\x00'+_0x10a40d[_0xc2b789(0x36e)],_0x251889=this[_0xc2b789(0x380)][_0xc2b789(0x364)](_0x5d37ca);if(_0x251889!==undefined){const _0x112792=this[_0xc2b789(0x2b3)][_0xc2b789(0x364)](_0x251889);if(_0x112792!==undefined)return{'upload':hostedConversationUploadSchema[_0xc2b789(0x36a)](uploadProjection(_0x112792))};}const _0x101543=await this[_0xc2b789(0x231)](_0x2cabdc[_0xc2b789(0x347)],_0x2cabdc[_0xc2b789(0x38b)]),_0x60ed72=this[_0xc2b789(0x239)][_0xc2b789(0x286)][_0xc2b789(0x2be)](_0xd96237[_0xc2b789(0x324)],_0x2cabdc['id']),_0x5045d6=await this[_0xc2b789(0x204)](_0x60ed72,_0x2cabdc,_0x101543[_0xc2b789(0x270)],_0x10a40d[_0xc2b789(0x2e3)],_0x10a40d[_0xc2b789(0x393)]);if(_0x5045d6===_0xc2b789(0x310)||_0x5045d6===_0xc2b789(0x1ff))throw new Error(_0xc2b789(0x39d));if(_0x5045d6!==_0xc2b789(0x255))throw new Error(_0xc2b789(0x303));const _0x51ec55=this['id'](),_0x3d6ef4=join(_0x60ed72[_0xc2b789(0x26c)],'.'+_0x51ec55+_0xc2b789(0x367)),_0x3a69c5=join(_0x60ed72[_0xc2b789(0x26c)],_0x10a40d[_0xc2b789(0x2e3)]),_0x4d7fef=await open(_0x3d6ef4,'wx',-0x196f+0x1*-0x1527+-0xa*-0x4cf);await _0x4d7fef[_0xc2b789(0x366)]();const _0x157714={'uploadId':_0x51ec55,'conversationId':_0x2cabdc['id'],'userId':_0xd96237[_0xc2b789(0x324)],'clientRequestId':_0x10a40d[_0xc2b789(0x36e)],'name':_0x10a40d[_0xc2b789(0x2e3)],'mimeType':_0x10a40d[_0xc2b789(0x212)],'size':_0x10a40d[_0xc2b789(0x393)],'temporaryPath':_0x3d6ef4,'targetPath':_0x3a69c5,'receivedBytes':0x0,'status':_0xc2b789(0x24c)};return this[_0xc2b789(0x2b3)][_0xc2b789(0x38e)](_0x51ec55,_0x157714),this[_0xc2b789(0x380)][_0xc2b789(0x38e)](_0x5d37ca,_0x51ec55),{'upload':hostedConversationUploadSchema[_0xc2b789(0x36a)](uploadProjection(_0x157714))};}async[_0x241074(0x25d)](_0x258b13){const _0xda4dce=_0x241074,_0x3b40f5=hostedRequest(_0x258b13),_0x257171=hostedConversationUploadChunkInputSchema[_0xda4dce(0x36a)](_0x3b40f5[_0xda4dce(0x30e)]),_0x22f4eb=this[_0xda4dce(0x348)](_0x3b40f5[_0xda4dce(0x324)],_0x257171[_0xda4dce(0x351)],_0x257171[_0xda4dce(0x342)]);if(_0x22f4eb[_0xda4dce(0x23c)]!==_0xda4dce(0x24c))throw new Error(_0xda4dce(0x317));if(_0x257171[_0xda4dce(0x2d5)]!==_0x22f4eb[_0xda4dce(0x358)])throw new Error(_0xda4dce(0x264));const _0x5593b3=Buffer[_0xda4dce(0x304)](_0x257171[_0xda4dce(0x2b4)],_0xda4dce(0x37d));if(_0x22f4eb[_0xda4dce(0x358)]+_0x5593b3[_0xda4dce(0x228)]>_0x22f4eb[_0xda4dce(0x393)])throw new Error(_0xda4dce(0x2ab));await assertUploadTemporaryFile(_0x22f4eb[_0xda4dce(0x20d)],_0x22f4eb[_0xda4dce(0x358)]);const _0x28ef19=await open(_0x22f4eb[_0xda4dce(0x20d)],'r+');try{await _0x28ef19[_0xda4dce(0x222)](_0x5593b3,-0x2f*-0xcd+0x1*-0x10fc+0x1*-0x14a7,_0x5593b3[_0xda4dce(0x228)],_0x22f4eb[_0xda4dce(0x358)]);}finally{await _0x28ef19[_0xda4dce(0x366)]();}return _0x22f4eb[_0xda4dce(0x358)]+=_0x5593b3[_0xda4dce(0x228)],{'upload':hostedConversationUploadSchema[_0xda4dce(0x36a)](uploadProjection(_0x22f4eb))};}[_0x241074(0x368)](_0x16461b){const _0xf47cda=_0x241074,_0x64e5dc=hostedRequest(_0x16461b),_0xa1fec0=hostedConversationUploadControlInputSchema[_0xf47cda(0x36a)](_0x64e5dc[_0xf47cda(0x30e)]),_0xd00f77=this[_0xf47cda(0x348)](_0x64e5dc[_0xf47cda(0x324)],_0xa1fec0[_0xf47cda(0x351)],_0xa1fec0[_0xf47cda(0x342)]);return{'upload':hostedConversationUploadSchema[_0xf47cda(0x36a)](uploadProjection(_0xd00f77))};}async[_0x241074(0x2bd)](_0x3cb234){const _0x3f52a3=_0x241074,_0x1ec18e=hostedRequest(_0x3cb234),_0x3b2118=hostedConversationUploadControlInputSchema[_0x3f52a3(0x36a)](_0x1ec18e[_0x3f52a3(0x30e)]),_0x182ef9=this[_0x3f52a3(0x348)](_0x1ec18e[_0x3f52a3(0x324)],_0x3b2118[_0x3f52a3(0x351)],_0x3b2118[_0x3f52a3(0x342)]);if(_0x182ef9[_0x3f52a3(0x23c)]===_0x3f52a3(0x354))return{'upload':hostedConversationUploadSchema[_0x3f52a3(0x36a)](uploadProjection(_0x182ef9))};if(_0x182ef9[_0x3f52a3(0x23c)]!==_0x3f52a3(0x24c)||_0x182ef9[_0x3f52a3(0x358)]!==_0x182ef9[_0x3f52a3(0x393)])throw new Error(_0x3f52a3(0x2bc));const _0x3cd628=this[_0x3f52a3(0x2c2)](_0x1ec18e[_0x3f52a3(0x324)],_0x182ef9[_0x3f52a3(0x351)]),_0x368df2=await this[_0x3f52a3(0x231)](_0x3cd628[_0x3f52a3(0x347)],_0x3cd628[_0x3f52a3(0x38b)]);if(_0x182ef9[_0x3f52a3(0x393)]>_0x368df2[_0x3f52a3(0x270)][_0x3f52a3(0x296)][_0x3f52a3(0x285)]||_0x3cd628[_0x3f52a3(0x394)][_0x3f52a3(0x2ed)]+_0x182ef9[_0x3f52a3(0x393)]>_0x3cd628[_0x3f52a3(0x394)][_0x3f52a3(0x240)])throw new Error(_0x3f52a3(0x39d));await assertUploadTemporaryFile(_0x182ef9[_0x3f52a3(0x20d)],_0x182ef9[_0x3f52a3(0x393)]);const _0x1f8e51=await lstat(_0x182ef9[_0x3f52a3(0x2df)])[_0x3f52a3(0x373)](_0x52538c=>{const _0x3d236f=_0x3f52a3;if(_0x52538c[_0x3d236f(0x33b)]===_0x3d236f(0x223))return undefined;throw _0x52538c;});if(_0x1f8e51!==undefined)throw new Error(_0x3f52a3(0x303));const _0x146d41=await open(_0x182ef9[_0x3f52a3(0x20d)],'r+');try{await _0x146d41[_0x3f52a3(0x207)]();}finally{await _0x146d41[_0x3f52a3(0x366)]();}await rename(_0x182ef9[_0x3f52a3(0x20d)],_0x182ef9[_0x3f52a3(0x2df)]);const _0xb894fb=this[_0x3f52a3(0x34c)]();try{await utimes(_0x182ef9[_0x3f52a3(0x2df)],new Date(_0xb894fb),new Date(_0xb894fb));const _0x2c232f={'id':this[_0x3f52a3(0x239)][_0x3f52a3(0x286)][_0x3f52a3(0x338)](_0x182ef9[_0x3f52a3(0x351)],_0x3f52a3(0x2c0),_0x182ef9[_0x3f52a3(0x2e3)]),'conversationId':_0x182ef9[_0x3f52a3(0x351)],'category':_0x3f52a3(0x2c0),'relativePath':_0x182ef9[_0x3f52a3(0x2e3)],'displayName':_0x182ef9[_0x3f52a3(0x2e3)],'mimeType':_0x182ef9[_0x3f52a3(0x212)],'size':_0x182ef9[_0x3f52a3(0x393)],'source':_0x3f52a3(0x1fa),'createdAt':_0xb894fb,'updatedAt':_0xb894fb};return _0x182ef9[_0x3f52a3(0x28d)]=await this[_0x3f52a3(0x239)][_0x3f52a3(0x286)][_0x3f52a3(0x294)](_0x1ec18e[_0x3f52a3(0x324)],_0x2c232f),_0x182ef9[_0x3f52a3(0x23c)]=_0x3f52a3(0x354),this[_0x3f52a3(0x206)](_0x182ef9[_0x3f52a3(0x351)],{'conversationId':_0x182ef9[_0x3f52a3(0x351)],'kind':_0x3f52a3(0x386),'files':this[_0x3f52a3(0x239)][_0x3f52a3(0x286)][_0x3f52a3(0x250)](_0x1ec18e[_0x3f52a3(0x324)],_0x182ef9[_0x3f52a3(0x351)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x3f52a3(0x36a)](uploadProjection(_0x182ef9))};}catch(_0x3c5f19){await rename(_0x182ef9[_0x3f52a3(0x2df)],_0x182ef9[_0x3f52a3(0x20d)])[_0x3f52a3(0x373)](()=>undefined);throw _0x3c5f19;}}async[_0x241074(0x31b)](_0x37a68a){const _0x263b9f=_0x241074,_0x1c4e0c=hostedRequest(_0x37a68a),_0x58c066=hostedConversationUploadControlInputSchema[_0x263b9f(0x36a)](_0x1c4e0c[_0x263b9f(0x30e)]),_0x492ab4=this[_0x263b9f(0x348)](_0x1c4e0c[_0x263b9f(0x324)],_0x58c066[_0x263b9f(0x351)],_0x58c066[_0x263b9f(0x342)]);if(_0x492ab4[_0x263b9f(0x23c)]===_0x263b9f(0x354))throw new Error(_0x263b9f(0x317));return _0x492ab4[_0x263b9f(0x23c)]=_0x263b9f(0x325),await rm(_0x492ab4[_0x263b9f(0x20d)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x263b9f(0x36a)](uploadProjection(_0x492ab4))};}async[_0x241074(0x38c)](_0x1d09c3){const _0x19279c=_0x241074,_0x1a421d=hostedRequest(_0x1d09c3),_0x37526f=hostedConversationIdInputSchema[_0x19279c(0x36a)](_0x1a421d[_0x19279c(0x30e)]),_0x90624f=this[_0x19279c(0x239)][_0x19279c(0x286)][_0x19279c(0x2c9)](_0x1a421d[_0x19279c(0x324)],_0x37526f[_0x19279c(0x351)]);if(this[_0x19279c(0x233)][_0x19279c(0x382)](_0x90624f['id']))throw new Error(_0x19279c(0x365));this[_0x19279c(0x233)][_0x19279c(0x333)](_0x90624f['id']);try{await this[_0x19279c(0x1f3)](_0x90624f['id']);const _0x3e2081=this[_0x19279c(0x2b5)][_0x19279c(0x364)](_0x90624f['id']);if(_0x3e2081!==undefined){const _0x5e4db5=runInterruptionKey(_0x90624f['id'],_0x3e2081[_0x19279c(0x201)]['id']);this[_0x19279c(0x33d)][_0x19279c(0x333)](_0x5e4db5);if(!_0x3e2081[_0x19279c(0x353)]())this[_0x19279c(0x33d)][_0x19279c(0x38c)](_0x5e4db5);}await this[_0x19279c(0x363)](_0x1a421d[_0x19279c(0x324)],_0x90624f['id']);const _0x331b5b=this[_0x19279c(0x239)][_0x19279c(0x286)][_0x19279c(0x2be)](_0x1a421d[_0x19279c(0x324)],_0x90624f['id']);return await this[_0x19279c(0x239)][_0x19279c(0x266)][_0x19279c(0x245)]({'conversationId':_0x90624f['id'],'sessionId':_0x90624f[_0x19279c(0x265)],'homeDirectory':_0x331b5b[_0x19279c(0x2dc)]})[_0x19279c(0x373)](()=>undefined),await this[_0x19279c(0x362)][_0x19279c(0x364)](_0x90624f['id'])?.[_0x19279c(0x373)](()=>undefined),this[_0x19279c(0x22d)](_0x90624f['id']),await this[_0x19279c(0x239)][_0x19279c(0x286)][_0x19279c(0x267)](_0x90624f['id']),this[_0x19279c(0x29a)][_0x19279c(0x38c)](_0x90624f['id']),hostedConversationDeleteResultSchema[_0x19279c(0x36a)]({'deletedConversationId':_0x90624f['id']});}finally{this[_0x19279c(0x233)][_0x19279c(0x38c)](_0x90624f['id']);}}async[_0x241074(0x1f3)](_0x3b00c1){const _0xda3c3=_0x241074,_0x50111d=_0x3b00c1+'\x00',_0x14776b=[...this[_0xda3c3(0x256)][_0xda3c3(0x1f2)]()][_0xda3c3(0x3a0)](([_0x156254])=>_0x156254[_0xda3c3(0x28f)](_0x50111d))[_0xda3c3(0x2f7)](([,_0x286871])=>_0x286871);await Promise[_0xda3c3(0x375)](_0x14776b);}async[_0x241074(0x26f)](_0x3f434c){const _0x2aa3a2=_0x241074;try{const _0x2c0e51=await this[_0x2aa3a2(0x364)]({'conversationId':_0x3f434c[_0x2aa3a2(0x351)],'__requestUserId':_0x3f434c[_0x2aa3a2(0x324)],'__marAgentModels':_0x3f434c[_0x2aa3a2(0x2f4)]});if(this[_0x2aa3a2(0x311)][_0x2aa3a2(0x364)](_0x3f434c[_0x2aa3a2(0x39e)])!==_0x3f434c)return;this[_0x2aa3a2(0x239)][_0x2aa3a2(0x21a)]?.({'type':_0x2aa3a2(0x1f4),'workbenchConnectionId':_0x3f434c[_0x2aa3a2(0x35d)],'watchId':_0x3f434c[_0x2aa3a2(0x2d4)],'nodeGeneration':_0x3f434c[_0x2aa3a2(0x1fc)],'nodeId':this[_0x2aa3a2(0x239)][_0x2aa3a2(0x36d)](),'templateId':_0x3f434c[_0x2aa3a2(0x38b)],'conversationId':_0x3f434c[_0x2aa3a2(0x351)],'revision':0x1,'snapshotSequence':++this[_0x2aa3a2(0x2ff)],'expiresAt':_0x3f434c[_0x2aa3a2(0x277)],'payload':_0x2c0e51}),_0x3f434c[_0x2aa3a2(0x293)]=!![];for(const _0x399c19 of _0x3f434c[_0x2aa3a2(0x276)])this[_0x2aa3a2(0x2ef)](_0x3f434c,_0x399c19);_0x3f434c[_0x2aa3a2(0x276)][_0x2aa3a2(0x315)]=0x7a2+0x173*0x3+-0xbfb;}catch(_0x32718c){if(this[_0x2aa3a2(0x311)][_0x2aa3a2(0x364)](_0x3f434c[_0x2aa3a2(0x39e)])!==_0x3f434c)return;this[_0x2aa3a2(0x239)][_0x2aa3a2(0x21a)]?.({'type':_0x2aa3a2(0x236),'workbenchConnectionId':_0x3f434c[_0x2aa3a2(0x35d)],'watchType':_0x2aa3a2(0x355),'watchId':_0x3f434c[_0x2aa3a2(0x2d4)],'nodeGeneration':_0x3f434c[_0x2aa3a2(0x1fc)],'nodeId':this[_0x2aa3a2(0x239)][_0x2aa3a2(0x36d)](),'templateId':_0x3f434c[_0x2aa3a2(0x38b)],'conversationId':_0x3f434c[_0x2aa3a2(0x351)],'code':safeErrorCode(_0x32718c,_0x2aa3a2(0x213)),'message':_0x2aa3a2(0x2a6)}),this[_0x2aa3a2(0x36b)](_0x3f434c[_0x2aa3a2(0x39e)]);}}[_0x241074(0x323)](_0x26ccdc){const _0x4e8e52=_0x241074;return this[_0x4e8e52(0x29a)][_0x4e8e52(0x364)](_0x26ccdc)??{'status':_0x4e8e52(0x28e),'version':0x0,'updatedAt':0x0};}[_0x241074(0x326)](_0x4e06b2){const _0x4424a2=_0x241074;return hostedConversationSummary(_0x4e06b2,this[_0x4424a2(0x323)](_0x4e06b2['id']));}[_0x241074(0x1f5)](_0x34f1a9,_0x4be3b8,_0x231d74,_0x13db69){const _0x577048=_0x241074,_0x463c59=this[_0x577048(0x323)](_0x4be3b8['id']),_0x401d10={'status':_0x231d74,'version':_0x463c59[_0x577048(0x216)]+(-0x252e*-0x1+0xb81+-0x2*0x1857),'updatedAt':_0x13db69};this[_0x577048(0x29a)][_0x577048(0x38e)](_0x4be3b8['id'],_0x401d10),this[_0x577048(0x259)]({'kind':_0x577048(0x323),'userId':_0x34f1a9,'templateId':_0x4be3b8[_0x577048(0x38b)],'conversationId':_0x4be3b8['id'],'activity':_0x401d10});}[_0x241074(0x23a)](_0x27b454,_0x139385,_0x4d3e9d,_0x209f04){const _0x197855=_0x241074;this[_0x197855(0x259)]({'kind':_0x197855(0x2f1),'event':{'runId':_0x4d3e9d,'sequence':0x1,'eventType':_0x197855(0x2f1),'payload':{'targetType':_0x197855(0x210),'userId':_0x27b454,'templateId':_0x139385[_0x197855(0x38b)],'conversationId':_0x139385['id'],'conversationTitle':_0x139385[_0x197855(0x21f)],'runId':_0x4d3e9d,'notificationId':_0x197855(0x2b0)+this[_0x197855(0x239)][_0x197855(0x36d)]()+':'+_0x139385['id']+':'+_0x4d3e9d,'kind':_0x197855(0x1f6),'outcome':_0x209f04[_0x197855(0x23c)],'occurredAt':_0x209f04[_0x197855(0x2cb)]},'createdAt':_0x209f04[_0x197855(0x2cb)]}});}[_0x241074(0x259)](_0x22ab98){const _0x25678d=_0x241074,_0x5a6533=this[_0x25678d(0x239)][_0x25678d(0x29d)]?.(_0x22ab98)??{'sequence':++this[_0x25678d(0x21c)],'category':_0x25678d(0x355),'payload':_0x22ab98};if(_0x5a6533!==undefined)this[_0x25678d(0x239)][_0x25678d(0x24e)]?.(_0x5a6533);}[_0x241074(0x260)](_0x5068a2,_0x2694dd,_0x5ab400,_0x25c4c7){const _0x3369f6=_0x241074;this[_0x3369f6(0x206)](_0x5068a2['id'],{'conversationId':_0x5068a2['id'],'kind':_0x3369f6(0x27d),'upgrade':{'status':_0x3369f6(0x292),'previousVersionId':_0x2694dd,'targetVersionId':_0x5ab400,'activeVersionId':_0x5068a2[_0x3369f6(0x347)],'conversation':this[_0x3369f6(0x326)](_0x5068a2),'error':{'code':safeErrorCode(_0x25c4c7,_0x3369f6(0x1f9)),'message':_0x3369f6(0x32a)}}});}[_0x241074(0x206)](_0x351471,_0x4751cf){const _0x5958aa=_0x241074,_0x4e9fed=[...this[_0x5958aa(0x311)][_0x5958aa(0x2cf)]()][_0x5958aa(0x3a0)](_0x43c0cd=>_0x43c0cd[_0x5958aa(0x351)]===_0x351471);if(_0x4e9fed[_0x5958aa(0x315)]===0x680+0x4fc+0x1c*-0x69)return![];const _0x2edb8c=this[_0x5958aa(0x239)][_0x5958aa(0x29d)]?.(_0x4751cf)??{'sequence':++this[_0x5958aa(0x21c)],'category':_0x5958aa(0x355),'payload':_0x4751cf};if(_0x2edb8c===undefined)return![];for(const _0x13fd28 of _0x4e9fed){if(!_0x13fd28[_0x5958aa(0x293)])_0x13fd28[_0x5958aa(0x276)][_0x5958aa(0x281)](_0x2edb8c);else this[_0x5958aa(0x2ef)](_0x13fd28,_0x2edb8c);}return!![];}[_0x241074(0x2ef)](_0x1dcac6,_0x19598e){const _0x32a502=_0x241074;this[_0x32a502(0x239)][_0x32a502(0x21a)]?.({'type':_0x32a502(0x390),'workbenchConnectionId':_0x1dcac6[_0x32a502(0x35d)],'watchId':_0x1dcac6[_0x32a502(0x2d4)],'nodeGeneration':_0x1dcac6[_0x32a502(0x1fc)],'nodeId':this[_0x32a502(0x239)][_0x32a502(0x36d)](),'templateId':_0x1dcac6[_0x32a502(0x38b)],'conversationId':_0x1dcac6[_0x32a502(0x351)],'expiresAt':_0x1dcac6[_0x32a502(0x277)],'event':_0x19598e});}[_0x241074(0x379)](_0x3fd015){const _0x43bb1b=_0x241074;return{'accepted':!![],'watchId':_0x3fd015[_0x43bb1b(0x2d4)],'nodeGeneration':_0x3fd015[_0x43bb1b(0x1fc)],'expiresAt':_0x3fd015[_0x43bb1b(0x277)]};}[_0x241074(0x22d)](_0x2d991b){const _0x5dc168=_0x241074;for(const _0x5625ed of[...this[_0x5dc168(0x311)][_0x5dc168(0x2cf)]()])if(_0x5625ed[_0x5dc168(0x351)]===_0x2d991b)this[_0x5dc168(0x36b)](_0x5625ed[_0x5dc168(0x39e)]);}[_0x241074(0x36b)](_0x1d96d5){const _0x100a38=_0x241074,_0x58ac66=this[_0x100a38(0x311)][_0x100a38(0x364)](_0x1d96d5);if(_0x58ac66===undefined)return;clearTimeout(_0x58ac66[_0x100a38(0x33e)]),this[_0x100a38(0x311)][_0x100a38(0x38c)](_0x1d96d5),this[_0x100a38(0x23e)][_0x100a38(0x2a8)](_0x1d96d5,_0x58ac66[_0x100a38(0x218)]);}[_0x241074(0x346)](_0x3b4d6e){const _0x1847c1=_0x241074,_0x5695c5=setTimeout(()=>this[_0x1847c1(0x36b)](_0x3b4d6e),WATCH_TTL_MS);return _0x5695c5[_0x1847c1(0x249)](),_0x5695c5;}[_0x241074(0x2c2)](_0x10929e,_0x3f2045){const _0x2620b2=_0x241074,_0x2c6e09=this[_0x2620b2(0x239)][_0x2620b2(0x286)][_0x2620b2(0x2c9)](_0x10929e,_0x3f2045);if(this[_0x2620b2(0x233)][_0x2620b2(0x382)](_0x2c6e09['id']))throw new Error(_0x2620b2(0x365));if(_0x2c6e09[_0x2620b2(0x23c)]!==_0x2620b2(0x2fd))throw new Error(_0x2620b2(0x365));return _0x2c6e09;}[_0x241074(0x348)](_0x39a0c2,_0x1f28bc,_0x404ff2){const _0x46a702=_0x241074;this[_0x46a702(0x239)][_0x46a702(0x286)][_0x46a702(0x2c9)](_0x39a0c2,_0x1f28bc);const _0x19b611=this[_0x46a702(0x2b3)][_0x46a702(0x364)](_0x404ff2);if(_0x19b611===undefined||_0x19b611[_0x46a702(0x324)]!==_0x39a0c2||_0x19b611[_0x46a702(0x351)]!==_0x1f28bc)throw new Error(_0x46a702(0x36f));return _0x19b611;}async[_0x241074(0x363)](_0x57886,_0x1e0f64){const _0x258be8=_0x241074;for(const _0xe2d265 of this[_0x258be8(0x2b3)][_0x258be8(0x2cf)]()){if(_0xe2d265[_0x258be8(0x324)]!==_0x57886||_0xe2d265[_0x258be8(0x351)]!==_0x1e0f64)continue;_0xe2d265[_0x258be8(0x23c)]===_0x258be8(0x24c)&&(_0xe2d265[_0x258be8(0x23c)]=_0x258be8(0x325),await rm(_0xe2d265[_0x258be8(0x20d)],{'force':!![]})[_0x258be8(0x373)](()=>undefined));}}async[_0x241074(0x225)](_0x564c78,_0x6ad197,_0xadf65){const _0x3d972d=_0x241074,_0x182085=this[_0x3d972d(0x239)][_0x3d972d(0x286)][_0x3d972d(0x31f)](_0x564c78,_0x6ad197,_0xadf65);if(_0x182085[_0x3d972d(0x2c8)]!==_0x3d972d(0x2c0))throw new Error(_0x3d972d(0x26e));return await assertRegularFile(this[_0x3d972d(0x239)][_0x3d972d(0x286)][_0x3d972d(0x39a)](_0x564c78,_0x182085),_0x182085[_0x3d972d(0x393)]),_0x182085;}async[_0x241074(0x204)](_0x3fbccd,_0x20fb19,_0x247c7d,_0x297a83,_0x2b9a7b){const _0x3dd245=_0x241074;if(_0x2b9a7b>_0x247c7d[_0x3dd245(0x296)][_0x3dd245(0x285)])return _0x3dd245(0x1ff);if(_0x20fb19[_0x3dd245(0x394)][_0x3dd245(0x2ed)]+_0x2b9a7b>_0x20fb19[_0x3dd245(0x394)][_0x3dd245(0x240)])return _0x3dd245(0x310);const _0x549db6=await lstat(join(_0x3fbccd[_0x3dd245(0x26c)],_0x297a83))[_0x3dd245(0x373)](_0x3f4363=>{const _0x4d1832=_0x3dd245;if(_0x3f4363[_0x4d1832(0x33b)]===_0x4d1832(0x223))return undefined;throw _0x3f4363;});return _0x549db6===undefined?_0x3dd245(0x255):_0x3dd245(0x39c);}[_0x241074(0x399)](_0x485527,_0x55b03c){const _0x45cc1a=_0x241074,_0x5b262d=[{'logicalPath':_0x45cc1a(0x31e),'physicalPath':_0x55b03c[_0x45cc1a(0x397)],'writable':![]},{'logicalPath':_0x45cc1a(0x238),'physicalPath':_0x485527[_0x45cc1a(0x26c)],'writable':!![]},{'logicalPath':_0x45cc1a(0x291),'physicalPath':_0x485527[_0x45cc1a(0x38d)],'writable':!![]}];if(_0x55b03c[_0x45cc1a(0x31c)]!==undefined)_0x5b262d[_0x45cc1a(0x281)]({'logicalPath':_0x55b03c[_0x45cc1a(0x31c)],'physicalPath':_0x55b03c[_0x45cc1a(0x397)],'writable':![]},{'logicalPath':join(_0x55b03c[_0x45cc1a(0x31c)],_0x45cc1a(0x2e5)),'physicalPath':_0x485527[_0x45cc1a(0x26c)],'writable':!![]},{'logicalPath':join(_0x55b03c[_0x45cc1a(0x31c)],_0x45cc1a(0x36c)),'physicalPath':_0x485527[_0x45cc1a(0x38d)],'writable':!![]});return _0x5b262d;}[_0x241074(0x284)](_0x402f24,_0x4e77d3,_0x291e69=_0x402f24[_0x241074(0x252)]){const _0x34a8b5=_0x241074;return this[_0x34a8b5(0x239)][_0x34a8b5(0x25e)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x4e77d3[_0x34a8b5(0x397)],..._0x4e77d3[_0x34a8b5(0x31c)]===undefined?{}:{'sourceWorkspacePath':_0x4e77d3[_0x34a8b5(0x31c)]},'inboxDirectory':_0x402f24[_0x34a8b5(0x26c)],'outputDirectory':_0x402f24[_0x34a8b5(0x38d)],'temporaryDirectory':_0x291e69,'networkMode':_0x4e77d3[_0x34a8b5(0x270)][_0x34a8b5(0x2e8)]});}[_0x241074(0x29e)](_0x5a5538){const _0x15fcda=_0x241074,_0x49568e=this[_0x15fcda(0x239)][_0x15fcda(0x22c)][_0x15fcda(0x2cc)][_0x15fcda(0x28c)](_0x15fcda(0x35e))[_0x15fcda(0x364)](_0x5a5538);if(_0x49568e===undefined)return undefined;if(typeof _0x49568e['id']!==_0x15fcda(0x2eb))throw new Error(_0x15fcda(0x2a3));return _0x49568e['id'];}async[_0x241074(0x231)](_0x2230ee,_0x475303,_0x3b3b1b=![]){const _0x4d4809=_0x241074,_0x30349c=this[_0x4d4809(0x239)][_0x4d4809(0x22c)][_0x4d4809(0x2cc)][_0x4d4809(0x28c)](_0x4d4809(0x2fa))[_0x4d4809(0x364)](_0x2230ee,_0x475303);if(_0x30349c===undefined||_0x30349c[_0x4d4809(0x23c)]!==_0x4d4809(0x2e0)&&_0x30349c[_0x4d4809(0x23c)]!==_0x4d4809(0x2c1)||_0x30349c[_0x4d4809(0x37c)]!==HOST_POLICY_VERSION||typeof _0x30349c[_0x4d4809(0x384)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x33c)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x211)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x242)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x34d)]!==_0x4d4809(0x2eb))throw new Error(_0x4d4809(0x2a3));const _0xca6b18=this[_0x4d4809(0x239)][_0x4d4809(0x286)][_0x4d4809(0x37e)](_0x30349c[_0x4d4809(0x384)]),_0x47f59a=join(_0xca6b18,_0x4d4809(0x271)),_0x408415=join(_0xca6b18,_0x4d4809(0x25a)),_0x1fe74d=await lstat(_0x47f59a)[_0x4d4809(0x373)](()=>undefined),_0x47104d=await lstat(_0x408415)[_0x4d4809(0x373)](()=>undefined);if(_0x1fe74d===undefined||!_0x1fe74d[_0x4d4809(0x1fd)]()||_0x1fe74d[_0x4d4809(0x280)]()||_0x47104d===undefined||!_0x47104d[_0x4d4809(0x37b)]()||_0x47104d[_0x4d4809(0x280)]())throw new Error(_0x4d4809(0x2a3));let _0x17ea8;try{const _0x1d35cf=await readFile(_0x47f59a,_0x4d4809(0x2f6)),_0x1c049a=_0x1d35cf[_0x4d4809(0x2ad)]('\x0a')?_0x1d35cf[_0x4d4809(0x221)](-0xd4f+-0x1*0x511+-0x188*-0xc,-(0x156d+-0x1166+-0x406)):_0x1d35cf;if(_0x1c049a!==_0x30349c[_0x4d4809(0x33c)]||createHash(_0x4d4809(0x269))[_0x4d4809(0x2fb)](_0x1c049a)[_0x4d4809(0x361)](_0x4d4809(0x385))!==_0x30349c[_0x4d4809(0x242)])throw new Error(_0x4d4809(0x2a3));_0x17ea8=JSON[_0x4d4809(0x36a)](_0x1c049a);}catch{throw new Error(_0x4d4809(0x2a3));}if(!record(_0x17ea8))throw new Error(_0x4d4809(0x2a3));const _0x417ab6=publishedTemplateSnapshot(_0x17ea8),_0x4970b6=publishedTemplateDraft(_0x417ab6[_0x4d4809(0x2aa)],_0x17ea8[_0x4d4809(0x270)]),_0x4fbefb=_0x4970b6[_0x4d4809(0x270)],_0x1f2f0f=publishedMcpServers(_0x17ea8[_0x4d4809(0x217)]),_0x4a9ae7=publishedTemplateContentHash(_0x417ab6[_0x4d4809(0x391)],_0x417ab6[_0x4d4809(0x1f2)],_0x417ab6[_0x4d4809(0x2aa)]),_0x1c7952=_0x417ab6[_0x4d4809(0x1f2)][_0x4d4809(0x329)]((_0x250019,_0x2b28d2)=>_0x250019+_0x2b28d2[_0x4d4809(0x393)],0xa7*0x28+0x201e+-0x3a36*0x1);if(_0x17ea8[_0x4d4809(0x377)]!==_0x30349c[_0x4d4809(0x34d)]||createHash(_0x4d4809(0x269))[_0x4d4809(0x2fb)](JSON[_0x4d4809(0x282)](_0x1f2f0f))[_0x4d4809(0x361)](_0x4d4809(0x385))!==_0x30349c[_0x4d4809(0x34d)]||_0x17ea8[_0x4d4809(0x2a4)]!==_0x30349c[_0x4d4809(0x211)]||_0x4a9ae7!==_0x30349c[_0x4d4809(0x211)]||_0x30349c[_0x4d4809(0x341)]!==_0x417ab6[_0x4d4809(0x1f2)][_0x4d4809(0x315)]||_0x30349c[_0x4d4809(0x289)]!==_0x1c7952)throw new Error(_0x4d4809(0x2a3));if(_0x17ea8[_0x4d4809(0x302)]!==_0x2230ee||_0x17ea8[_0x4d4809(0x38b)]!==_0x475303||_0x17ea8[_0x4d4809(0x20a)]!==HOST_POLICY_VERSION||_0x4fbefb[_0x4d4809(0x38b)]!==_0x475303||_0x4fbefb[_0x4d4809(0x36d)]!==this[_0x4d4809(0x239)][_0x4d4809(0x36d)]())throw new Error(_0x4d4809(0x2a3));if(_0x3b3b1b)await verifyPublishedTemplateContent(_0x408415,_0x417ab6[_0x4d4809(0x391)],_0x417ab6[_0x4d4809(0x1f2)]);return{'id':_0x2230ee,'templateId':_0x475303,'storageKey':_0x30349c[_0x4d4809(0x384)],'templateDirectory':_0x408415,..._0x417ab6[_0x4d4809(0x31c)]===undefined?{}:{'sourceWorkspacePath':_0x417ab6[_0x4d4809(0x31c)]},'draft':_0x4fbefb,'modelPolicy':_0x4970b6[_0x4d4809(0x332)],'mcpServers':_0x1f2f0f};}}function hostedRequest(_0x2b298b){const _0xe02777=_0x241074;if(!record(_0x2b298b))throw new Error(_0xe02777(0x37a));const {__requestUserId:_0x5e6f63,__template:_0x169a1b,__marAgentModel:_0x4cbcdb,__marAgentModels:_0x6f0e48,__marAgentRuntimeScopeId:_0x98fc84,__workspaceWatchSessionHash:_0x59698b,__templateDeleted:_0x2dd8d5,..._0x1747c8}=_0x2b298b;if(typeof _0x5e6f63!==_0xe02777(0x230)||!Number[_0xe02777(0x26d)](_0x5e6f63)||_0x5e6f63<=-0x661+0x108b+0x515*-0x2)throw new Error(_0xe02777(0x37a));if(_0x2dd8d5!==undefined&&_0x2dd8d5!==!![])throw new Error(_0xe02777(0x37a));if(_0x98fc84!==undefined&&(typeof _0x98fc84!==_0xe02777(0x2eb)||_0x98fc84[_0xe02777(0x315)]===-0x1a5d*0x1+0x2d3*-0x7+-0x1*-0x2e22))throw new Error(_0xe02777(0x37a));return{'data':_0x1747c8,'userId':_0x5e6f63,..._0x169a1b===undefined?{}:{'template':_0x169a1b},..._0x4cbcdb===undefined?{}:{'model':_0x4cbcdb},..._0x6f0e48===undefined?{}:{'models':_0x6f0e48},..._0x98fc84===undefined?{}:{'runtimeScopeId':_0x98fc84},..._0x59698b===undefined?{}:{'sessionHash':_0x59698b},..._0x2dd8d5===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x30db73){const _0x511a98=_0x241074;if(typeof _0x30db73!==_0x511a98(0x2eb)||_0x30db73[_0x511a98(0x315)]===-0x207f+-0x3*-0xc3d+0x14*-0x36)throw new Error(_0x511a98(0x37a));return _0x30db73;}function watchOwnerKey(_0x2208fd,_0x5a7765){return _0x2208fd+':'+_0x5a7765;}function runtimeModels(_0x10edb2){const _0x3c22fa=_0x241074;return marAgentRuntimeModelConfigurationSchema[_0x3c22fa(0x229)]()[_0x3c22fa(0x36a)](_0x10edb2);}function allowedModels(_0xd0b417,_0x4de426){const _0x725279=_0x241074,_0x4ac748=new Set(_0xd0b417[_0x725279(0x332)][_0x725279(0x35f)]);return _0x4de426[_0x725279(0x3a0)](_0x2d7e17=>_0x2d7e17[_0x725279(0x1f7)]&&_0x4ac748[_0x725279(0x382)](_0xd0b417[_0x725279(0x332)][_0x725279(0x33f)]===_0x725279(0x244)?_0x2d7e17[_0x725279(0x2d1)]:_0x2d7e17['id']));}function selectModel(_0x37bfc2,_0x2728bd,_0x59a1ae){const _0x105f92=_0x241074,_0xbb01b8=allowedModels(_0x37bfc2,_0x2728bd),_0x2977a7=_0xbb01b8[_0x105f92(0x2e9)](_0xa261a4=>_0xa261a4['id']===_0x59a1ae);if(_0x2977a7!==undefined)return _0x2977a7;const _0x38e98f=_0xbb01b8[_0x105f92(0x2e9)](_0x55a231=>(_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x33f)]===_0x105f92(0x244)?_0x55a231[_0x105f92(0x2d1)]:_0x55a231['id'])===_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x3a1)]);if(_0x38e98f!==undefined)return _0x38e98f;const _0x2c86e0=_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x35f)][_0x105f92(0x2f7)](_0x5c1ab6=>_0xbb01b8[_0x105f92(0x2e9)](_0x2c5b40=>(_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x33f)]===_0x105f92(0x244)?_0x2c5b40[_0x105f92(0x2d1)]:_0x2c5b40['id'])===_0x5c1ab6))[_0x105f92(0x2e9)](_0x3fdd0d=>_0x3fdd0d!==undefined);if(_0x2c86e0===undefined)throw new Error(_0x105f92(0x2e7));return _0x2c86e0;}function publishedTemplateDraft(_0xb79aa9,_0x368587){const _0x3f5e48=_0x241074,_0x40031f=conversationTemplateDraftSchema[_0x3f5e48(0x21b)](_0x368587);if(_0x40031f[_0x3f5e48(0x2ee)]){const {allowedModels:_0x42ce4d,defaultModelId:_0xa877d2,..._0x5bfa80}=_0x40031f[_0x3f5e48(0x30e)];return{'draft':_0x5bfa80,'modelPolicy':{'identity':_0x3f5e48(0x244),'allowedIds':_0x42ce4d[_0x3f5e48(0x2f7)](_0x5de4c7=>_0x5de4c7[_0x3f5e48(0x2d1)]),'defaultId':_0xa877d2}};}if(_0xb79aa9!==0x7*0x286+0x205d+-0x3206||!record(_0x368587)||_0x3f5e48(0x2da)in _0x368587||!Array[_0x3f5e48(0x298)](_0x368587[_0x3f5e48(0x2c3)]))throw new Error(_0x3f5e48(0x2a3));const _0x20bb0d=_0x368587[_0x3f5e48(0x2c3)],_0x1d8b36={..._0x368587};delete _0x1d8b36[_0x3f5e48(0x2c3)];const _0x50f1fc=conversationTemplateDraftSchema[_0x3f5e48(0x21b)]({..._0x1d8b36,'allowedModels':_0x20bb0d[_0x3f5e48(0x2f7)](_0x363fa6=>({'modelId':_0x363fa6,'name':_0x363fa6}))});if(!_0x50f1fc[_0x3f5e48(0x2ee)])throw new Error(_0x3f5e48(0x2a3));const {allowedModels:_0x3a29ff,defaultModelId:_0x6d2911,..._0x587c90}=_0x50f1fc[_0x3f5e48(0x30e)];return{'draft':_0x587c90,'modelPolicy':{'identity':_0x3f5e48(0x357),'allowedIds':_0x3a29ff[_0x3f5e48(0x2f7)](_0x1195a0=>_0x1195a0[_0x3f5e48(0x2d1)]),'defaultId':_0x6d2911}};}function networkModels(_0x19c0da,_0x4fcc8e){const _0x1e0693=_0x241074;if(_0x4fcc8e!==_0x1e0693(0x34f))return _0x19c0da;return _0x19c0da[_0x1e0693(0x2f7)](_0x44e34a=>_0x44e34a[_0x1e0693(0x283)]?{..._0x44e34a,'hostedWebSearch':![]}:_0x44e34a);}function publishedMcpServers(_0x235b85){const _0x2f59e3=_0x241074;if(!Array[_0x2f59e3(0x298)](_0x235b85))throw new Error(_0x2f59e3(0x2a3));return _0x235b85[_0x2f59e3(0x2f7)](_0xed66fc=>{const _0x3a2def=_0x2f59e3;if(!record(_0xed66fc))throw new Error(_0x3a2def(0x2a3));const _0x3d4eae=Object[_0x3a2def(0x29b)](_0xed66fc)[_0x3a2def(0x2c5)]()[_0x3a2def(0x349)](',');if(_0x3d4eae!==_0x3a2def(0x26b))throw new Error(_0x3a2def(0x2a3));const _0x25c60e=mcpRuntimeDescriptorSchema[_0x3a2def(0x36a)](_0xed66fc[_0x3a2def(0x266)]),_0x5170e9=mcpInstallationConfigurationSchema[_0x3a2def(0x36a)](_0xed66fc[_0x3a2def(0x27e)]);if(typeof _0xed66fc['id']!==_0x3a2def(0x2eb)||typeof _0xed66fc[_0x3a2def(0x327)]!==_0x3a2def(0x2eb)||typeof _0xed66fc[_0x3a2def(0x28a)]!==_0x3a2def(0x2eb)||typeof _0xed66fc[_0x3a2def(0x216)]!==_0x3a2def(0x2eb)||_0xed66fc[_0x3a2def(0x2e4)]!==_0x3a2def(0x335)&&_0xed66fc[_0x3a2def(0x2e4)]!==_0x3a2def(0x2b9)||_0xed66fc[_0x3a2def(0x350)]!==_0x25c60e[_0x3a2def(0x350)])throw new Error(_0x3a2def(0x2a3));return{'id':_0xed66fc['id'],'serverName':_0xed66fc[_0x3a2def(0x327)],'displayName':_0xed66fc[_0x3a2def(0x28a)],'version':_0xed66fc[_0x3a2def(0x216)],'origin':_0xed66fc[_0x3a2def(0x2e4)],'transport':_0x25c60e[_0x3a2def(0x350)],'runtime':_0x25c60e,'configuration':_0x5170e9};});}function publishedTemplateSnapshot(_0x9bc1fb){const _0x4be924=_0x241074;if(_0x9bc1fb[_0x4be924(0x2aa)]===0xa72+-0x19ea+0xf79){const _0x1b73f7=publishedTemplateFiles(_0x9bc1fb[_0x4be924(0x386)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x1b73f7),'entries':_0x1b73f7};}if(_0x9bc1fb[_0x4be924(0x2aa)]!==0x73+-0x3*-0x3d1+0x5f2*-0x2||typeof _0x9bc1fb[_0x4be924(0x31c)]!==_0x4be924(0x2eb)||!Array[_0x4be924(0x298)](_0x9bc1fb[_0x4be924(0x391)])||!Array[_0x4be924(0x298)](_0x9bc1fb[_0x4be924(0x1f2)]))throw new Error(_0x4be924(0x2a3));validatePublishedSourceWorkspacePath(_0x9bc1fb[_0x4be924(0x31c)]);const _0x405ceb=_0x9bc1fb[_0x4be924(0x391)][_0x4be924(0x2f7)](safePublishedTemplateRelativePath);if(new Set(_0x405ceb)[_0x4be924(0x393)]!==_0x405ceb[_0x4be924(0x315)]||_0x405ceb[_0x4be924(0x295)](_0x4be924(0x2e5))||_0x405ceb[_0x4be924(0x295)](_0x4be924(0x36c)))throw new Error(_0x4be924(0x2a3));const _0x3abe4a=_0x9bc1fb[_0x4be924(0x1f2)][_0x4be924(0x2f7)](publishedTemplateEntry);if(new Set(_0x3abe4a[_0x4be924(0x2f7)](_0x33cb23=>_0x33cb23[_0x4be924(0x297)]))[_0x4be924(0x393)]!==_0x3abe4a[_0x4be924(0x315)])throw new Error(_0x4be924(0x2a3));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x9bc1fb[_0x4be924(0x31c)],'directories':_0x405ceb,'entries':_0x3abe4a};}function publishedTemplateEntry(_0x283e63){const _0x1cee2a=_0x241074;if(!record(_0x283e63))throw new Error(_0x1cee2a(0x2a3));if(_0x283e63[_0x1cee2a(0x30d)]===_0x1cee2a(0x352))return publishedTemplateFile(_0x283e63,!![]);if(_0x283e63[_0x1cee2a(0x30d)]!==_0x1cee2a(0x234)||typeof _0x283e63[_0x1cee2a(0x278)]!==_0x1cee2a(0x2eb)||_0x283e63[_0x1cee2a(0x278)][_0x1cee2a(0x315)]===0x2f*0x7c+-0xae5+-0xbdf||_0x283e63[_0x1cee2a(0x278)][_0x1cee2a(0x295)]('\x00')||_0x283e63[_0x1cee2a(0x246)]!==_0x1cee2a(0x257)&&_0x283e63[_0x1cee2a(0x246)]!==_0x1cee2a(0x398)||typeof _0x283e63[_0x1cee2a(0x2ac)]!==_0x1cee2a(0x2eb))throw new Error(_0x1cee2a(0x2a3));const _0x24ce17=safePublishedTemplateRelativePath(_0x283e63[_0x1cee2a(0x297)]),_0x1d1497=safePublishedTemplateSize(_0x283e63[_0x1cee2a(0x393)]),_0x33293c=_0x283e63[_0x1cee2a(0x278)],_0x173a77=_0x283e63[_0x1cee2a(0x246)],_0x817c28=_0x283e63[_0x1cee2a(0x2ac)];if(_0x1d1497!==Buffer[_0x1cee2a(0x228)](_0x33293c))throw new Error(_0x1cee2a(0x2a3));if(_0x173a77===_0x1cee2a(0x257))safePublishedTemplateRelativePath(_0x817c28);else{if(!isAbsolute(_0x817c28)||!RUNTIME_LINK_ROOTS[_0x1cee2a(0x343)](_0x582c93=>_0x817c28===_0x582c93||within(_0x582c93,_0x817c28)))throw new Error(_0x1cee2a(0x2a3));}return{'kind':_0x1cee2a(0x234),'relativePath':_0x24ce17,'size':_0x1d1497,'linkTarget':_0x33293c,'targetKind':_0x173a77,'resolvedTarget':_0x817c28};}function publishedTemplateFiles(_0x5d5988){const _0x45e0be=_0x241074;if(!Array[_0x45e0be(0x298)](_0x5d5988))throw new Error(_0x45e0be(0x2a3));const _0x392f10=new Set();return _0x5d5988[_0x45e0be(0x2f7)](_0x4ada14=>{const _0x538baf=_0x45e0be,_0x370966=publishedTemplateFile(_0x4ada14);if(_0x392f10[_0x538baf(0x382)](_0x370966[_0x538baf(0x297)]))throw new Error(_0x538baf(0x2a3));return _0x392f10[_0x538baf(0x333)](_0x370966[_0x538baf(0x297)]),_0x370966;});}function publishedTemplateFile(_0x1f835e,_0x30e0d9=![]){const _0x59799a=_0x241074;if(!record(_0x1f835e)||_0x30e0d9&&_0x1f835e[_0x59799a(0x30d)]!==_0x59799a(0x352)||typeof _0x1f835e[_0x59799a(0x2b2)]!==_0x59799a(0x20b)||typeof _0x1f835e[_0x59799a(0x269)]!==_0x59799a(0x2eb)||!/^[a-f0-9]{64}$/u[_0x59799a(0x20c)](_0x1f835e[_0x59799a(0x269)]))throw new Error(_0x59799a(0x2a3));return{'kind':_0x59799a(0x352),'relativePath':safePublishedTemplateRelativePath(_0x1f835e[_0x59799a(0x297)]),'size':safePublishedTemplateSize(_0x1f835e[_0x59799a(0x393)]),'executable':_0x1f835e[_0x59799a(0x2b2)],'sha256':_0x1f835e[_0x59799a(0x269)]};}function safePublishedTemplateRelativePath(_0x90f21a){const _0xd0bcea=_0x241074;if(typeof _0x90f21a!==_0xd0bcea(0x2eb)||_0x90f21a[_0xd0bcea(0x315)]===-0x184f+-0x1f5f+0x37ae*0x1||_0x90f21a[_0xd0bcea(0x28f)]('/')||_0x90f21a[_0xd0bcea(0x295)]('\x5c')||_0x90f21a[_0xd0bcea(0x307)]('/')[_0xd0bcea(0x343)](_0x38ef2e=>_0x38ef2e[_0xd0bcea(0x315)]===0x1*0x775+0x4*0x7bb+-0x2661*0x1||_0x38ef2e==='.'||_0x38ef2e==='..'))throw new Error(_0xd0bcea(0x2a3));return _0x90f21a;}function safePublishedTemplateSize(_0x51c11c){const _0x53d07f=_0x241074;if(!Number[_0x53d07f(0x26d)](_0x51c11c)||_0x51c11c<-0xaf9+0x18a8+-0x71*0x1f)throw new Error(_0x53d07f(0x2a3));return _0x51c11c;}function legacyPublishedTemplateDirectories(_0x301603){const _0x26f761=_0x241074,_0x17f2a0=new Set();for(const _0x29b3dc of _0x301603){const _0x21f280=_0x29b3dc[_0x26f761(0x297)][_0x26f761(0x307)]('/');for(let _0x2b95c4=-0x3*-0x656+0x13a9+-0x31*0xca;_0x2b95c4<_0x21f280[_0x26f761(0x315)];_0x2b95c4+=-0x371*-0x6+0x205a+0x1*-0x34ff)_0x17f2a0[_0x26f761(0x333)](_0x21f280[_0x26f761(0x221)](0x1492+0xdac+0x12*-0x1e7,_0x2b95c4)[_0x26f761(0x349)]('/'));}return[..._0x17f2a0][_0x26f761(0x2c5)]((_0x4f5f06,_0x40bb16)=>_0x4f5f06[_0x26f761(0x20f)](_0x40bb16,_0x26f761(0x2f8)));}function publishedTemplateContentHash(_0x181cef,_0x38f1d3,_0x2ebb02){const _0x140b4b=_0x241074,_0x21f100=_0x2ebb02===-0x1976+-0x98e+-0x701*-0x5?_0x38f1d3[_0x140b4b(0x2f7)](_0x2dfc57=>{const _0x6b0d7d=_0x140b4b;if(_0x2dfc57[_0x6b0d7d(0x30d)]!==_0x6b0d7d(0x352))throw new Error(_0x6b0d7d(0x2a3));return _0x2dfc57[_0x6b0d7d(0x297)]+'\x00'+_0x2dfc57[_0x6b0d7d(0x393)]+'\x00'+_0x2dfc57[_0x6b0d7d(0x269)];})[_0x140b4b(0x349)]('\x0a'):[..._0x181cef[_0x140b4b(0x2f7)](_0x306a2e=>_0x140b4b(0x313)+_0x306a2e),..._0x38f1d3[_0x140b4b(0x2f7)](_0x1dca09=>_0x1dca09[_0x140b4b(0x30d)]===_0x140b4b(0x352)?_0x1dca09[_0x140b4b(0x30d)]+'\x00'+_0x1dca09[_0x140b4b(0x297)]+'\x00'+_0x1dca09[_0x140b4b(0x393)]+'\x00'+(_0x1dca09[_0x140b4b(0x2b2)]?0x1*0xed5+-0x2c2+-0xc12:-0x224b+0x563*-0x5+0x3d3a)+'\x00'+_0x1dca09[_0x140b4b(0x269)]:_0x1dca09[_0x140b4b(0x30d)]+'\x00'+_0x1dca09[_0x140b4b(0x297)]+'\x00'+_0x1dca09[_0x140b4b(0x393)]+'\x00'+_0x1dca09[_0x140b4b(0x278)]+'\x00'+_0x1dca09[_0x140b4b(0x246)]+'\x00'+_0x1dca09[_0x140b4b(0x2ac)])][_0x140b4b(0x349)]('\x0a');return createHash(_0x140b4b(0x269))[_0x140b4b(0x2fb)](_0x21f100)[_0x140b4b(0x361)](_0x140b4b(0x385));}async function verifyPublishedTemplateContent(_0x5782ef,_0x2be3f5,_0x385969){const _0x564081=_0x241074,_0x32fac2=new Map(_0x385969[_0x564081(0x2f7)](_0x35c59f=>[_0x35c59f[_0x564081(0x297)],_0x35c59f])),_0x429581=new Set([..._0x2be3f5,_0x564081(0x2e5),_0x564081(0x36c)]),_0x1f34b5=new Set(),_0x200eb1=await listPublishedTemplateEntries(_0x5782ef,_0x429581,_0x1f34b5);if(_0x200eb1[_0x564081(0x315)]!==_0x32fac2[_0x564081(0x393)]||_0x1f34b5[_0x564081(0x393)]!==_0x429581[_0x564081(0x393)])throw new Error(_0x564081(0x2a3));for(const _0xa8f3ab of _0x200eb1){const _0x44a458=_0x32fac2[_0x564081(0x364)](_0xa8f3ab[_0x564081(0x297)]);if(_0x44a458===undefined||_0x44a458[_0x564081(0x30d)]!==_0xa8f3ab[_0x564081(0x30d)])throw new Error(_0x564081(0x2a3));if(_0x44a458[_0x564081(0x30d)]===_0x564081(0x352)&&_0xa8f3ab[_0x564081(0x30d)]===_0x564081(0x352)){if(_0x44a458[_0x564081(0x393)]!==_0xa8f3ab[_0x564081(0x393)]||_0x44a458[_0x564081(0x2b2)]!==_0xa8f3ab[_0x564081(0x2b2)]||_0xa8f3ab[_0x564081(0x22a)]!==(_0x44a458[_0x564081(0x2b2)]?-0xe7c+-0x205*-0x5+-0x1*-0x5d0:0x5*-0x329+0x3*0x25a+0x9e3)||_0x44a458[_0x564081(0x269)]!==_0xa8f3ab[_0x564081(0x269)])throw new Error(_0x564081(0x2a3));continue;}if(_0x44a458[_0x564081(0x30d)]!==_0x564081(0x234)||_0xa8f3ab[_0x564081(0x30d)]!==_0x564081(0x234)||_0x44a458[_0x564081(0x393)]!==_0xa8f3ab[_0x564081(0x393)]||_0x44a458[_0x564081(0x278)]!==_0xa8f3ab[_0x564081(0x278)])throw new Error(_0x564081(0x2a3));await verifyPublishedSymlinkResolution(_0x5782ef,_0x44a458,_0xa8f3ab[_0x564081(0x2f0)]);}}async function verifyPublishedSymlinkResolution(_0x246686,_0x2c26f7,_0x276982){const _0x91d3af=_0x241074;let _0x3459eb;try{_0x3459eb=await realpath(_0x276982);}catch{throw new Error(_0x91d3af(0x2a3));}if(_0x2c26f7[_0x91d3af(0x246)]===_0x91d3af(0x398)){if(_0x3459eb!==_0x2c26f7[_0x91d3af(0x2ac)])throw new Error(_0x91d3af(0x2a3));return;}let _0x22f94a,_0x4824e5;try{[_0x22f94a,_0x4824e5]=await Promise[_0x91d3af(0x32b)]([realpath(join(_0x246686,..._0x2c26f7[_0x91d3af(0x2ac)][_0x91d3af(0x307)]('/'))),realpath(_0x246686)]);}catch{throw new Error(_0x91d3af(0x2a3));}if(_0x3459eb!==_0x22f94a||!within(_0x4824e5,_0x3459eb))throw new Error(_0x91d3af(0x2a3));}function _0x3fd3(_0x2c6c40,_0x2ca74c){_0x2c6c40=_0x2c6c40-(0x1556+0x1*0x1588+-0x28ec);const _0x359b65=_0x22ba();let _0x2b24e3=_0x359b65[_0x2c6c40];if(_0x3fd3['dmMbed']===undefined){var _0x16b487=function(_0x477c85){const _0x4f50b1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x227f1b='',_0x50bc08='';for(let _0x3bf42f=0x17b6+-0x10b7+-0x6ff,_0x13b960,_0x56885b,_0x3768c4=-0x26f6+0x38b+0x236b;_0x56885b=_0x477c85['charAt'](_0x3768c4++);~_0x56885b&&(_0x13b960=_0x3bf42f%(0x4*-0x863+0x1*-0x164e+0x37de)?_0x13b960*(-0x4bf*0x3+-0x1ed2+-0x7*-0x679)+_0x56885b:_0x56885b,_0x3bf42f++%(0x2*-0xa7+-0xf5f+-0x10b1*-0x1))?_0x227f1b+=String['fromCharCode'](0x1*-0x1916+-0x1*0x1a69+0x347e&_0x13b960>>(-(-0x957+-0x1785+0x20de)*_0x3bf42f&0x104+-0x6bb*0x3+0x1333*0x1)):-0x7*-0x3be+0x1d6+-0x1c08){_0x56885b=_0x4f50b1['indexOf'](_0x56885b);}for(let _0xc00053=0xd*-0x135+-0x578+-0x1*-0x1529,_0x34dc7f=_0x227f1b['length'];_0xc00053<_0x34dc7f;_0xc00053++){_0x50bc08+='%'+('00'+_0x227f1b['charCodeAt'](_0xc00053)['toString'](0xaed+-0x43+-0xa9a))['slice'](-(-0x85d*-0x1+-0x1052+0x7f7));}return decodeURIComponent(_0x50bc08);};_0x3fd3['pWSyQk']=_0x16b487,_0x3fd3['nFGvkD']={},_0x3fd3['dmMbed']=!![];}const _0x5dd6c6=_0x359b65[0x14ab+0x1*-0x23c5+0xf1a];_0x3fd3['JEBqeQ']!==_0x5dd6c6&&(_0x3fd3['nFGvkD']={},_0x3fd3['JEBqeQ']=_0x5dd6c6);const _0x5a1b0d=_0x3fd3['nFGvkD'][_0x2c6c40];return _0x5a1b0d===undefined?(_0x2b24e3=_0x3fd3['pWSyQk'](_0x2b24e3),_0x3fd3['nFGvkD'][_0x2c6c40]=_0x2b24e3):_0x2b24e3=_0x5a1b0d,_0x2b24e3;}async function listPublishedTemplateEntries(_0x7ca5d5,_0x3f515a,_0x245212,_0x378de2=''){const _0x2f4041=_0x241074,_0x51d4e0=await lstat(_0x7ca5d5);if(!_0x51d4e0[_0x2f4041(0x37b)]()||_0x51d4e0[_0x2f4041(0x280)]()||(_0x51d4e0[_0x2f4041(0x22a)]&-0x3*0x2c3+0x1*0xc1b+-0x1d3)!==-0x88+-0x269b+0x2890*0x1)throw new Error(_0x2f4041(0x2a3));const _0x2c456e=[];for(const _0x450b29 of await readdir(_0x7ca5d5,{'withFileTypes':!![]})){const _0x3f297f=join(_0x7ca5d5,_0x450b29[_0x2f4041(0x2e3)]),_0x5d87e1=_0x378de2[_0x2f4041(0x315)]===-0x676+-0x24ad+0x9*0x4cb?_0x450b29[_0x2f4041(0x2e3)]:_0x378de2+'/'+_0x450b29[_0x2f4041(0x2e3)],_0x3dd86f=await lstat(_0x3f297f);if(_0x3dd86f[_0x2f4041(0x280)]()){const _0x591501=await readlink(_0x3f297f);_0x2c456e[_0x2f4041(0x281)]({'kind':_0x2f4041(0x234),'relativePath':_0x5d87e1,'size':Buffer[_0x2f4041(0x228)](_0x591501),'linkTarget':_0x591501,'sourcePath':_0x3f297f});continue;}if(_0x3dd86f[_0x2f4041(0x37b)]()){if(!_0x3f515a[_0x2f4041(0x382)](_0x5d87e1))throw new Error(_0x2f4041(0x2a3));_0x245212[_0x2f4041(0x333)](_0x5d87e1),_0x2c456e[_0x2f4041(0x281)](...await listPublishedTemplateEntries(_0x3f297f,_0x3f515a,_0x245212,_0x5d87e1));}else{if(!_0x3dd86f[_0x2f4041(0x1fd)]()||_0x3dd86f[_0x2f4041(0x2af)]!==0x8*-0x42a+-0x12e*0x5+0x1*0x2737||!Number[_0x2f4041(0x26d)](_0x3dd86f[_0x2f4041(0x393)]))throw new Error(_0x2f4041(0x2a3));_0x2c456e[_0x2f4041(0x281)]({'kind':_0x2f4041(0x352),'relativePath':_0x5d87e1,'size':_0x3dd86f[_0x2f4041(0x393)],'executable':(_0x3dd86f[_0x2f4041(0x22a)]&-0x1b5*-0x14+-0x100d+-0x2*0x8e7)!==-0xd2d+-0x3c*-0xc+0xa5d,'mode':_0x3dd86f[_0x2f4041(0x22a)]&-0x184a+0x264e+-0xc05,'sha256':createHash(_0x2f4041(0x269))[_0x2f4041(0x2fb)](await readFile(_0x3f297f))[_0x2f4041(0x361)](_0x2f4041(0x385))});}}return _0x2c456e;}function validatePublishedSourceWorkspacePath(_0x2052bd){const _0x4c3ff1=_0x241074;if(!isAbsolute(_0x2052bd)||resolve(_0x2052bd)!==_0x2052bd||_0x2052bd==='/'||RESERVED_SANDBOX_ROOTS[_0x4c3ff1(0x343)](_0x338d40=>_0x2052bd===_0x338d40||within(_0x338d40,_0x2052bd)||within(_0x2052bd,_0x338d40)))throw new Error(_0x4c3ff1(0x2a3));}function within(_0x3d2018,_0x26a2eb){const _0x48dd7d=_0x241074,_0x17a745=relative(_0x3d2018,_0x26a2eb);return _0x17a745[_0x48dd7d(0x315)]>0x1*0xf2f+0x85*0xf+-0x16fa&&_0x17a745!=='..'&&!_0x17a745[_0x48dd7d(0x28f)]('..'+sep);}function resolveMcpServers(_0xba1038,_0x3c42e1){const _0x31fa32=_0x241074,_0x33c07d=_0x329451=>{const _0x32229f=_0x3fd3,_0x4c7e56={};for(const [_0x5c7d8c,_0xfa47a6]of Object[_0x32229f(0x1f2)](_0x329451??{})){const _0x1aaee1=_0x3c42e1[_0xfa47a6[_0x32229f(0x23d)]];if(_0x1aaee1===undefined)throw new Error(_0x32229f(0x220));_0x4c7e56[_0x5c7d8c]=_0x1aaee1;}return _0x4c7e56;};return _0xba1038[_0x31fa32(0x217)][_0x31fa32(0x209)](_0x4cd9c3=>{const _0x24c50f=_0x31fa32;if(_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x350)]===_0x24c50f(0x2ce)){if(_0xba1038[_0x24c50f(0x270)][_0x24c50f(0x2e8)]!==_0x24c50f(0x1fb))return[];return[{'name':_0x4cd9c3[_0x24c50f(0x327)],'lifecycle':_0x24c50f(0x376),'transport':_0x24c50f(0x2ce),'url':_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x30b)],'headers':{..._0x33c07d(_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x38a)]),..._0x33c07d(_0x4cd9c3[_0x24c50f(0x27e)][_0x24c50f(0x38a)])}}];}return[{'name':_0x4cd9c3[_0x24c50f(0x327)],'lifecycle':_0x24c50f(0x376),'transport':_0x24c50f(0x2de),'command':_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x2ca)],'args':[..._0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x287)],..._0x4cd9c3[_0x24c50f(0x27e)][_0x24c50f(0x2dd)]??[]],'environment':{..._0x33c07d(_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x224)]),..._0x33c07d(_0x4cd9c3[_0x24c50f(0x27e)][_0x24c50f(0x224)])}}];});}function hostedConversationSummary(_0x284975,_0x60fd1f){const _0x40db3f=_0x241074;return hostedConversationSummarySchema[_0x40db3f(0x36a)]({'id':_0x284975['id'],'nodeId':_0x284975[_0x40db3f(0x36d)],'sessionId':_0x284975[_0x40db3f(0x265)],'templateId':_0x284975[_0x40db3f(0x38b)],'templateName':_0x284975[_0x40db3f(0x306)],'activeVersionId':_0x284975[_0x40db3f(0x347)],'title':_0x284975[_0x40db3f(0x21f)],'pinnedAt':_0x284975[_0x40db3f(0x359)],'status':_0x284975[_0x40db3f(0x23c)],'modelId':_0x284975[_0x40db3f(0x2d1)],'createdAt':_0x284975[_0x40db3f(0x30c)],'updatedAt':_0x284975[_0x40db3f(0x274)],'lastActivityAt':_0x284975[_0x40db3f(0x2b8)],..._0x60fd1f===undefined?{}:{'activity':_0x60fd1f}});}function templateSummary(_0x575a36,_0x26128b){const _0x3b9ec4=_0x241074;return conversationTemplateSummarySchema[_0x3b9ec4(0x36a)]({'id':_0x575a36[_0x3b9ec4(0x38b)],'nodeId':_0x575a36[_0x3b9ec4(0x36d)],'name':_0x575a36[_0x3b9ec4(0x306)],'description':_0x26128b[_0x3b9ec4(0x29f)],'status':_0x575a36[_0x3b9ec4(0x2b6)]?_0x3b9ec4(0x2a1):_0x3b9ec4(0x2fd),'currentVersionId':_0x575a36[_0x3b9ec4(0x347)],'available':!_0x575a36[_0x3b9ec4(0x2b6)],'createdAt':_0x575a36[_0x3b9ec4(0x30c)],'updatedAt':_0x26128b[_0x3b9ec4(0x274)]});}function modelSummary(_0xe328eb,_0x2de89c){const _0x23dd37=_0x241074;return{'id':_0xe328eb['id'],'name':_0xe328eb[_0x23dd37(0x2e3)],'protocol':_0xe328eb[_0x23dd37(0x237)],'baseUrl':_0xe328eb[_0x23dd37(0x219)],'modelId':_0xe328eb[_0x23dd37(0x2d1)],'contextWindowTokens':_0xe328eb[_0x23dd37(0x2b7)],'maxOutputTokens':_0xe328eb[_0x23dd37(0x340)],'inputCapabilities':_0xe328eb[_0x23dd37(0x226)],'outputCapabilities':_0xe328eb[_0x23dd37(0x2f3)],'reasoningEfforts':_0xe328eb[_0x23dd37(0x215)],'hostedWebSearch':_0xe328eb[_0x23dd37(0x283)],..._0xe328eb[_0x23dd37(0x2ba)]===undefined?{}:{'responsesTransport':_0xe328eb[_0x23dd37(0x2ba)]},'responsesPreviousResponseId':_0xe328eb[_0x23dd37(0x200)],'enabled':_0xe328eb[_0x23dd37(0x1f7)],'sortOrder':_0x2de89c,'apiKeyConfigured':!![]};}function systemInstruction(_0x1c7c16){const _0x2dda52=_0x241074,_0x46ca6c=_0x1c7c16[_0x2dda52(0x270)],_0x2ce66e=_0x46ca6c[_0x2dda52(0x2e8)]===_0x2dda52(0x34f)?_0x2dda52(0x328):_0x2dda52(0x2db);return[_0x2dda52(0x31a),_0x2dda52(0x23f),_0x2dda52(0x308),..._0x1c7c16[_0x2dda52(0x31c)]===undefined?[]:[_0x2dda52(0x2fc)+_0x1c7c16[_0x2dda52(0x31c)]+_0x2dda52(0x214)+join(_0x1c7c16[_0x2dda52(0x31c)],_0x2dda52(0x2e5))+_0x2dda52(0x389)+join(_0x1c7c16[_0x2dda52(0x31c)],_0x2dda52(0x36c))+_0x2dda52(0x392)],_0x2dda52(0x23b),_0x2ce66e][_0x2dda52(0x349)]('\x0a');}function attachmentPrompt(_0x1ba395,_0x46a0eb){const _0x14b7f4=_0x241074;if(_0x46a0eb[_0x14b7f4(0x315)]===0x1*0x2041+-0x5*-0x119+-0x25be)return _0x1ba395;const _0x35b05f=_0x46a0eb[_0x14b7f4(0x2f7)](_0x1b0bdd=>_0x14b7f4(0x2a7)+_0x1b0bdd[_0x14b7f4(0x297)])[_0x14b7f4(0x349)]('\x0a');return''+_0x1ba395+(_0x1ba395[_0x14b7f4(0x262)]()[_0x14b7f4(0x315)]===0xd*0x3d+0x1*-0x176f+0x1456?'':'\x0a\x0a')+_0x14b7f4(0x320)+_0x35b05f;}function automaticHostedConversationTitle(_0xcb4184){const _0xca4135=_0x241074;if(_0xcb4184===undefined)return undefined;const _0x1426d6=sessionTitleFromFirstMessage(_0xcb4184);if(_0x1426d6[_0xca4135(0x315)]===0x22cb+0x1ee2+-0x41ad||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0xca4135(0x20c)](_0x1426d6))return undefined;return _0x1426d6;}function runFromMessage(_0x138222){const _0x3c9d9b=_0x241074;return{'id':_0x138222[_0x3c9d9b(0x24b)],'status':_0x138222[_0x3c9d9b(0x23c)],'startedAt':_0x138222[_0x3c9d9b(0x30c)],'completedAt':_0x138222[_0x3c9d9b(0x23c)]===_0x3c9d9b(0x288)?null:_0x138222[_0x3c9d9b(0x274)]};}function _0x22ba(){const _0x1f93c9=['AxneAxjLy3rVCNK','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','yMfZzty0','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','y3jLyxrLtwvZC2fNzq','DxbSB2fKC0j5uMvXDwvZDa','q09ovKvsu0fusu9ox0Hpu1rjtKDFvu5bvKfjtefcteu','AgfZ','zMLSzuLK','C3rVCMfNzv9RzxK','Agv4','zMLSzxm','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','yxr0ywnOBwvUDeLKCW','igfUzca','AgvHzgvYCW','DgvTCgXHDgvjza','zgvSzxrL','B3v0Chv0rgLYzwn0B3j5','C2v0','DgfYz2v0vMvYC2LVBKLK','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','zgLYzwn0B3jPzxm','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','C2L6zq','CxvVDge','ChjLDMLVDxnwzxjZAw9Uswq','AxndB252zxjZyxrPB25jBLvZzq','DgvTCgXHDgveAxjLy3rVCNK','uLvoveLnrq','Cgf0Ae1VDw50CW','zMLSzvbHDgG','u1vdq0vfreve','q09orKXjq1q','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','B3DUzxjlzxK','BwvZC2fNzq','zMLSDgvY','zgvMyxvSDeLK','zw50CMLLCW','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','ChvIBgLZAefJDgL2Axr5','uLvox1rfuK1jtKfm','zw5HyMXLza','CMvQzwn0','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','vvnfuG','vu5srvnuuKLdveve','BM9KzuDLBMvYyxrPB24','AxngAwXL','zgvSzxrLrMLSzq','ve9px0XbuKDf','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','CNvU','C3vIyxjYyxK','D2f0y2G','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','DxbKyxrLq29UDMvYC2f0Aw9U','ChvIBgLZAeHVC3rLzev2zw50','C3LUyW','ChvIBgLZAfj1BNrPBwvfDMvUDa','zMXHDe1HCa','Ag9ZDfbVBgLJEvzLCNnPB24','yM9VBgvHBG','DgvZDa','DgvTCg9Yyxj5ugf0Aa','Bwf4u3rVCMfNzuj5DgvZ','Bg9JywXLq29TCgfYzq','se9tvevex0nptLzfuLnbveLptG','y29UDgvUDf9OyxnO','BwLTzvr5Cgu','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','CMvHC29UAw5NrwzMB3j0CW','DMvYC2LVBG','BwnWu2vYDMvYCW','C2XVDfrVA2vU','yMfZzvvYBa','zw1PDfDHDgnOrxzLBNq','C2fMzvbHCNnL','D29YA2jLBMnOu2vXDwvUy2u','y3vYCMvUDfzLCNnPB25jza','DxbKyxrLtwv0ywrHDge','DgL0Bgu','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','C2XPy2u','D3jPDgu','ru5pru5u','zw52AxjVBM1LBNq','CMvXDwLYzuf0DgfJAg1LBNq','Aw5WDxrdyxbHyMLSAxrPzxm','nteXndq2nJbMyNPetha','yNL0zuXLBMD0Aa','yxjYyxK','Bw9Kzq','mtG2mtm2C0PyAKLK','zgf0ywjHC2u','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','l2XPyJy0','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','BNvTyMvY','Bg9HzfrLBxbSyxrLvMvYC2LVBG','y3jLyxrL','y2XLyw51CeXVy2TZ','u1LnteLosW','ndu2mvnkzfz2Da','D2f0y2GUzMfPBgvK','ChjVDg9JB2W','l3DVCMTZCgfJzs9PBMjVEa','B3b0Aw9UCW','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','C3rHDhvZ','C2vJCMv0tMfTzq','C2vZC2LVBLDHDgnOu2XVDhm','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','Bwf4qNL0zxm','DgL0BgvtB3vYy2u','BwfUAwzLC3rFAgfZAa','zgLZCg9Zzq','vvbtvfjfqu1Ftu9eruXFsuq','CMvSzwfZzvnLC3nPB24','DgfYz2v0s2LUza','y3jLyxrLvxbSB2fK','l2HVBwuVBwfY','Dw5Yzwy','l3j1BG','CNvUswq','vvbmt0fesu5h','l2jPBG','zw1PDfDVCMTIzw5JAev2zw50','CgvUzgLUz0nYzwf0zxm','BgLZDezPBgvZ','zMLUze1LC3nHz2u','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','l3nIAw4','C2vJCMv0rw52AxjVBM1LBNq','uKvbrfK','CgvUzgLUz01LC3nHz2vZ','u05bufnit1q','q1vtve9n','ChvIBgLZAfDVCMTIzw5JAev2zw50','y29UDgvUDa','yNL0zxnszwfK','C25HChnOB3q','D3jPDgvvCgXVywrdAhvUAW','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','CMvHza','ChvIBgLZAfvWz3jHzgvgywLSDxjL','mZC4nJzMy2nZELG','DhjPBq','nJqYvMnctK1j','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','C2vZC2LVBKLK','CNvUDgLTzq','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','zMLUAxnOtwvZC2fNzq','C2HHmJu2','ode1txv5A2zS','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','DxbSB2fKC0rPCMvJDg9YEq','AxntywzLsw50zwDLCG','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','zhjHzNq','BwfUAwzLC3qUANnVBG','C3rHCNrnzxnZywDL','CgLUBMvK','DxbKyxrLzef0','Dw53yxrJAa','CgvUzgLUz0v2zw50CW','zxHWAxjLC0f0','BgLUA1rHCMDLDa','CMvWBgfJzq','Bwf4','AxrLBxm','DgL0BgvdAgfUz2vK','DxbNCMfKzq','y29UzMLNDxjHDgLVBG','y3jLyxrLu2vZC2LVBG','AxntEw1IB2XPy0XPBMS','ChvZAa','C3rYAw5NAwz5','Ag9ZDgvKv2vIu2vHCMnO','ChjVy2vZC0v4zwn1Dg9Y','Bwf4vxbSB2fKqNL0zxm','C3rVCMu','yxjNCW','uLvotKLorW','Dg90ywXFyNL0zxm','zgLZCgXHEu5HBwu','DgHLBG','ChjLCgfYzq','zMLSzq','surmrq','C3rHCNrZv2L0Aa','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','l3DVCMTZCgfJzs9VDxrWDxq','rKfjteve','CMvHzhK','CMvNAxn0zxjgAwXL','Aw5JBhvKzxm','CxvVDgfZ','CMvSyxrPDMvqyxrO','AxnbCNjHEq','C3rHCNrsDw4','ywn0AxzPDgLLCW','A2v5CW','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','BMv4DfDVCMTIzw5JAev2zw50','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','zgvZy3jPChrPB24','yxzHAwXHyMXL','revmrvrfra','zMLUywXSEq','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','y29UDgvUDeHHC2G','B3DUCW','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','lsaVD29YA3nWywnLl2LUyM94lW','CMvSzwfZzq','ywXSB2m','C2nOzw1HvMvYC2LVBG','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','CMvZB2X2zwruyxjNzxq','zw5KC1DPDgG','Aw50zxjYDxb0','BMXPBMS','CNvUoG','ndm2mZa5m2zfAuD5zG','zxHLy3v0ywjSzq','DxbSB2fKCW','zgf0yujHC2u2na','ywn0AxzLuNvUCW','DgvTCgXHDgvezwXLDgvK','y29UDgv4DfDPBMrVD1rVA2vUCW','BgfZDefJDgL2Axr5qxq','v09ss1nqqunf','CMvZCg9UC2vZvhjHBNnWB3j0','CMvZB2X2zq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','y29TCgXLDgvvCgXVywq','Cgf0AhngB3jdB252zxjZyxrPB24','C2f2zuf1Dg9TyxrPy1rPDgXL','vvbmt0fe','uKvuquLoruq','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','ywXSB3DLze1VzgvSswrZ','ChjVBxb0','C29YDa','zMLUAxnOuNvU','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','y2f0zwDVCNK','CMvXDwLYzunVBNzLCNnHDgLVBG','y29TBwfUza','y29TCgXLDgvKqxq','CMf3','DgvTCgXHDgu','sfruua','DMfSDwvZ','B2jQzwn0','Bw9KzwXjza','l3j1BNrPBwu','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','D2f0y2Hjza','B2zMC2v0','AgLZDg9YEq','CMvJB25JAwXLrMLSzxm','su5urvjsvvburuq','y29TCgXLDgLVBG','ywXSB3DLze1VzgvSCW','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','Ag9TzurPCMvJDg9YEq','yxjNDw1LBNrZ','u1resu8','DgfYz2v0ugf0Aa','qvzbsuXbqKXf','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','yxnZzxj0q2fUq3jLyxrL','BMfTzq','B3jPz2LU','Aw5IB3G','DxbKyxrLq29UzMLNDxjHDgLVBG','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','BMv0D29YA01Vzgu','zMLUza','Cgf0AhngB3jnyw5PzMvZDa','C3rYAw5N','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','DxnLzej5DgvZ','C3vJy2vZCW','zw1PDfDHDgnOtgvHC2vfDMvUDa','C291CMnLugf0Aa','BM90AwzPy2f0Aw9U','mZaZmZG3zKnczMnc','B3v0Chv0q2fWywjPBgL0AwvZ','Bw9KzwXZ','Dg9tDhjPBMC','DxrMoa','BwfW','zw4Tvvm','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','DxbKyxrL','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','qunusvzf','ohjVCvvSva','C25HChnOB3rtzxf1zw5Jzq','BgLZDenVBNzLCNnHDgLVBNm','BwLU','DMvYC2LVBKLK','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','zNjVBq','C3rHCNrLzef0','DgvTCgXHDgvoyw1L','C3bSAxq','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','l2rLDG','B3bLCMf0Aw9UCW','DxjS','y3jLyxrLzef0','A2LUza','zgf0yq','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','uvvpvefFrvHdruveruq','D2f0y2HmzwfZzxm','BgLTAxq','reLsrunut1jzaa','qvvutW','BgvUz3rO','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','l3bYB2m','ChjLzMXPz2H0vxbSB2fK','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvhjLyxqGl3DVCMTZCgfJzsbHCYb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','y2fUy2vSvxbSB2fK','C291CMnLv29YA3nWywnLugf0Aa','CNvUDgLTzvnJB3bLswq','l3DVCMTZCgfJzq','CMvXDwLYzuzPBgu','qxr0ywnOBwvUDhm6cG','yxbWBhLbDxrVBwf0AwnuAxrSzq','CNvUlq','ywn0AxzPDhK','DxnLCKLK','q0foq0vmteve','C3vTBwfYEq','C2vYDMvYtMfTzq','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','CMvKDwnL','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','ywXS','BgLZDa','CMvUzxC','Cgf0Ahm','zNvSBc1Hy2nLC3m','l3rTCa','y3vYC29Y','Bw9KzwXqB2XPy3K','ywrK','ChjLCgfYzuzVCKrPC2fIBgu','tK9erq','C2vZC2LVBKHHC2G','ywr2yw5JzuXHC3rby3rPDML0Eq','zMLSzvbYB2PLy3rPB25jza','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','l3vZCG','y29Kzq','BwfUAwzLC3q','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','DgLTzxi','AwrLBNrPDhK','Bwf4t3v0Chv0vg9Rzw5Z','zMLSzv9JB3vUDa','DxbSB2fKswq','C29Tzq','y2XPzw50twvZC2fNzuLK','zgLZywjSzvbYzxbHCMvK','D2f0y2HmzwfZzvrPBwvY','ywn0AxzLvMvYC2LVBKLK','CMvXDwLYzvvWBg9Hza','AM9PBG','u1rbuLrjtKC','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','BM93','BwnWx2nVBMzPz19OyxnO','odq0nZi1nK5ADvrxEG','tK9orq','DhjHBNnWB3j0','y29UDMvYC2f0Aw9Uswq','rKLmrq','y2fUy2vS','q09nueXfveve','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','DxnLCLn0B3jHz2vlzxK','q09orKLhvvjbveLptL9jra','CMvJzwL2zwrcExrLCW','CgLUBMvKqxq','l2XPyG','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','y3jLyxrLq29UDMvYC2f0Aw9U','D29YA2jLBMnOq29UBMvJDgLVBKLK','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','ywXSB3DLzeLKCW','y29UDMvYC2f0Aw9U','zgLNzxn0','CNvUu2v0DgXLBwvUDhm','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','z2v0','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','y2XVC2u','lNvWBg9Hza','DxbSB2fKu3rHDhvZ','CMvHzezPBgu','CgfYC2u','CMvTB3zLv2f0y2HmzwfZzq','B3v0Chv0','BM9KzuLK','y2XPzw50uMvXDwvZDeLK','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','q0foq0vmteLorW','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','y2f0y2G','zMLSzurLBgv0zxm','ywXSu2v0DgXLza','rvHfq1vusu9o','BwnWq29UzMLNsgfZAa','C2f2zu1LC3nHz2vby2nLChrHBMnL','ywnJzxb0zwrxyxrJAa','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra'];_0x22ba=function(){return _0x1f93c9;};return _0x22ba();}function runInterruptionKey(_0x48126b,_0x1aff44){return _0x48126b+'\x00'+_0x1aff44;}function uploadProjection(_0x5a47b5){const _0x380c2b=_0x241074;return{'uploadId':_0x5a47b5[_0x380c2b(0x342)],'conversationId':_0x5a47b5[_0x380c2b(0x351)],'name':_0x5a47b5[_0x380c2b(0x2e3)],'mimeType':_0x5a47b5[_0x380c2b(0x212)],'receivedBytes':_0x5a47b5[_0x380c2b(0x358)],'size':_0x5a47b5[_0x380c2b(0x393)],'status':_0x5a47b5[_0x380c2b(0x23c)],..._0x5a47b5[_0x380c2b(0x28d)]===undefined?{}:{'file':_0x5a47b5[_0x380c2b(0x28d)]}};}async function assertRegularFile(_0x5b462c,_0x216422){const _0x5c43dc=_0x241074,_0x142f86=await lstat(_0x5b462c)[_0x5c43dc(0x373)](()=>{const _0x5a135f=_0x5c43dc;throw new Error(_0x5a135f(0x303));});if(!_0x142f86[_0x5c43dc(0x1fd)]()||_0x142f86[_0x5c43dc(0x280)]()||_0x142f86[_0x5c43dc(0x2af)]!==-0x2031+-0x1863+0x3895||_0x142f86[_0x5c43dc(0x393)]!==_0x216422)throw new Error(_0x5c43dc(0x303));}async function assertUploadTemporaryFile(_0x229aaf,_0x3e68e4){const _0x4a4a1a=_0x241074,_0x3726fc=await lstat(_0x229aaf)[_0x4a4a1a(0x373)](()=>{const _0x4dfc9b=_0x4a4a1a;throw new Error(_0x4dfc9b(0x317));});if(!_0x3726fc[_0x4a4a1a(0x1fd)]()||_0x3726fc[_0x4a4a1a(0x280)]()||_0x3726fc[_0x4a4a1a(0x2af)]!==-0x940+-0x2*0x10d0+-0x3*-0xe4b||_0x3726fc[_0x4a4a1a(0x393)]!==_0x3e68e4)throw new Error(_0x4a4a1a(0x317));}function record(_0x80024e){const _0x33852a=_0x241074;return typeof _0x80024e===_0x33852a(0x2d0)&&_0x80024e!==null&&!Array[_0x33852a(0x298)](_0x80024e);}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const
|
|
2
|
+
const _0x5ca5e6=_0x1f08;(function(_0x315a08,_0x38920b){const _0x12a35f=_0x1f08,_0x11ddd9=_0x315a08();while(!![]){try{const _0x2eb91e=-parseInt(_0x12a35f(0x1dc))/(-0xff5+-0x23f7+0x76b*0x7)+parseInt(_0x12a35f(0x1f5))/(0x1*-0x126e+0x8c4+-0x4*-0x26b)*(parseInt(_0x12a35f(0x1cd))/(0x1e7*-0x5+-0x1c98+-0x572*-0x7))+-parseInt(_0x12a35f(0x1d7))/(0xde4+-0x42+-0xd9e)*(-parseInt(_0x12a35f(0x1ba))/(-0x9*0x42d+0x1*-0xaa9+-0x3043*-0x1))+parseInt(_0x12a35f(0x1c8))/(0x2fa+-0x1229+0xf35)*(parseInt(_0x12a35f(0x1d4))/(-0x24a3*0x1+0x182b+-0x1c9*-0x7))+parseInt(_0x12a35f(0x1bf))/(-0x2*0x551+0x30a+-0x2*-0x3d0)*(parseInt(_0x12a35f(0x1f4))/(-0x20*0x43+0x1*0xc8+0x28b*0x3))+parseInt(_0x12a35f(0x1eb))/(-0x1*0x6b+0xe*0x4f+-0x1*0x3dd)*(-parseInt(_0x12a35f(0x1ca))/(0x11*0xe+0x1*0x26b3+0x12*-0x233))+parseInt(_0x12a35f(0x1df))/(0x1a32+-0xf9d+0x1d*-0x5d)*(-parseInt(_0x12a35f(0x1ea))/(0xf*-0xe5+0x455*-0x4+0x1ecc));if(_0x2eb91e===_0x38920b)break;else _0x11ddd9['push'](_0x11ddd9['shift']());}catch(_0x2c0e20){_0x11ddd9['push'](_0x11ddd9['shift']());}}}(_0x73aa,0x46595+0x8da0c+0xd731));import{isTerminalRunStatus}from'../util/node-operation-parsers.js';function _0x1f08(_0x91d19e,_0x36c696){_0x91d19e=_0x91d19e-(-0xdf9+-0x603+0x15b0);const _0x231244=_0x73aa();let _0x4f2773=_0x231244[_0x91d19e];if(_0x1f08['wKxNbm']===undefined){var _0xdf5767=function(_0x4b1b29){const _0x11a695='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30888f='',_0x56436c='';for(let _0x50817f=-0x3*-0xbd9+0xb29+-0x2eb4,_0x28a887,_0x291cab,_0x56d9d2=-0x26ff*0x1+-0x61*0x27+0x35c6;_0x291cab=_0x4b1b29['charAt'](_0x56d9d2++);~_0x291cab&&(_0x28a887=_0x50817f%(0xe4e+-0x2504+0x1*0x16ba)?_0x28a887*(-0x23b2*-0x1+-0x1229+-0x375*0x5)+_0x291cab:_0x291cab,_0x50817f++%(0x1*-0xdb2+0x249+0x19*0x75))?_0x30888f+=String['fromCharCode'](-0x17*-0x2+-0x6c5*-0x5+-0x2108&_0x28a887>>(-(-0xc31*0x3+-0x196+0x262b)*_0x50817f&-0x1d6c+0x2069*0x1+0x21*-0x17)):0x1*-0x2185+-0x1*0x20e7+0x589*0xc){_0x291cab=_0x11a695['indexOf'](_0x291cab);}for(let _0x5c075e=0x47*0x4c+0x9d*0x10+0xf72*-0x2,_0x41a6df=_0x30888f['length'];_0x5c075e<_0x41a6df;_0x5c075e++){_0x56436c+='%'+('00'+_0x30888f['charCodeAt'](_0x5c075e)['toString'](-0x1367*0x1+0x18e*-0x1+0x1505*0x1))['slice'](-(-0x16cd+-0xaf6+-0x13*-0x1c7));}return decodeURIComponent(_0x56436c);};_0x1f08['FyEQWl']=_0xdf5767,_0x1f08['QqvfqC']={},_0x1f08['wKxNbm']=!![];}const _0x336d3b=_0x231244[-0x2*0xc96+-0x6ae+-0x54f*-0x6];_0x1f08['KvheAx']!==_0x336d3b&&(_0x1f08['QqvfqC']={},_0x1f08['KvheAx']=_0x336d3b);const _0x3342ab=_0x1f08['QqvfqC'][_0x91d19e];return _0x3342ab===undefined?(_0x4f2773=_0x1f08['FyEQWl'](_0x4f2773),_0x1f08['QqvfqC'][_0x91d19e]=_0x4f2773):_0x4f2773=_0x3342ab,_0x4f2773;}import{isPlainRecord}from'../runner/codex/conversation-parser.js';function _0x73aa(){const _0x4c8b24=['mJmWode2ngLICNjryG','CNvUlMLUDgvYCNvWDa','CMvZCg9Uza','y2fUB25Py2fSuNvUswq','zw1PDfj1BG','z2v0qxbWCM92ywW','CMvHzeLTywDL','uKvkrunuruq','DxnLCKL0zw1jza','CNvUswq','z2v0','mtqZrhbYDgr0','mJqZmeHite5vDa','CMvZCg9UzfvZzxjjBNb1Da','vvnfuL9jtLrfuLjvufrfra','y3vYCMvUDev4zwn1DgLVBKLK','qvbquK9wquXFtK9ux0zpvu5e','CNvUlMnHBMnLBa','zgvJAxnPB24','qvbquK9wruq','Aw50zxjYDxb0u2vZC2LVBG','nte1nJCYmxvKyvjvwG','nKfzsfvRCW','y2fUy2vSt3jjBNrLCNj1Chq','qvbquK9wquXFrevdsvnjt05Fsu5wquXjra','C3rYAw5N','uLvox05pvf9gt1vora','zgvJAwrLqxbWCM92ywW','uLvox0LnquDfx0LovKfmsuq','x19Yzxf1zxn0vxnLCKLK','z2v0qwDLBNrtzxnZAw9U','BwfYA0LUDgvYCNvWDgvK','mZK2otveyLjOq0i','C2vZC2LVBKLK','y29UDMvYC2f0Aw9UvhvYBKzVCLj1BG','q0foq0vmteLorW','CNvUlMfWChjVDMfSlMrLy2LZAw9U','mtz5tMTQuxK','su5urvjsvvburuq','y29UDhjVBa','CMvXDwLYzu93BMvKuNvU','B3bLCMf0Aw9UCW','yxbWCM92ywXjza','yxbWCM92ywWUzgvJAwrLza','BNvTyMvY','C3rHDhvZ','mtK3nZC4y2PbvLj3','CMvXDwLYzvj1BG','nZe3mZfZtfvosu4','uLvox0LnquDfx05pvf9gt1vora','vvnfuL9jtLbvvf9jtLzbteLe','odC5mduXz3fsCMP2','AxnjBNrLz2vY','B3b0Aw9UCW','z2v0uNvU','Cgf1C2vrDwv1zq','yxnZzxj0uNvUt3DUzxi','CNvUDgLTzq','mJG3yMnKsKfx','ywn0AxzLu2vZC2LVBLj1BG','Aw1Hz2vjBMrLEa','nZC2sxHMt2zL','yw5ZD2vYCW','Aw1Hz2u','DhjHBNnPDgLVBLj1BG','u0vtu0LptL9ot1rFrK9vtKq','mJKYodCYsLDUEuzJ','CMvXDwvZDeLK','CNvUlMLUDgvYCNvWDgvK'];_0x73aa=function(){return _0x4c8b24;};return _0x73aa();}import{assertRunOwner}from'./run-ownership-policy.js';export class RunWorkbenchService{[_0x5ca5e6(0x1cf)];constructor(_0x954b46){const _0x1ae707=_0x5ca5e6;this[_0x1ae707(0x1cf)]=_0x954b46;}[_0x5ca5e6(0x1c3)](){const _0x1a28ec=_0x5ca5e6;return{'run.get':_0x412565=>this[_0x1a28ec(0x1e9)](record(_0x412565)),'run.image.read':_0x282cc3=>this[_0x1a28ec(0x1d9)](record(_0x282cc3)),'run.user-input.respond':_0x1d2a2c=>this[_0x1a28ec(0x1e1)](record(_0x1d2a2c)),'session.interrupt':_0x2799ba=>this[_0x1a28ec(0x1f3)](record(_0x2799ba)),'run.cancel':_0x5b81be=>this[_0x1a28ec(0x1f6)](_0x1a28ec(0x1f0),record(_0x5b81be)),'run.interrupt':_0x3299d8=>this[_0x1a28ec(0x1f6)](_0x1a28ec(0x1e0),record(_0x3299d8)),'run.approval.decide':_0x5b419b=>this[_0x1a28ec(0x1b5)](record(_0x5b419b))};}[_0x5ca5e6(0x1e9)](_0x19864c){const _0x171a5d=_0x5ca5e6;return{'run':this[_0x171a5d(0x1c9)](_0x19864c[_0x171a5d(0x1e8)])};}async[_0x5ca5e6(0x1d9)](_0x3363ec){const _0x54cb0d=_0x5ca5e6;if(typeof _0x3363ec[_0x54cb0d(0x1e8)]!==_0x54cb0d(0x1f8)||typeof _0x3363ec[_0x54cb0d(0x1d6)]!==_0x54cb0d(0x1c6)||!Number[_0x54cb0d(0x1ce)](_0x3363ec[_0x54cb0d(0x1d6)])||_0x3363ec[_0x54cb0d(0x1d6)]<-0x1d1+-0x26ff*0x1+-0x51a*-0x8)throw new Error(_0x54cb0d(0x1b6));const _0x58281f=await this[_0x54cb0d(0x1cf)][_0x54cb0d(0x1e5)](_0x3363ec[_0x54cb0d(0x1e8)],_0x3363ec[_0x54cb0d(0x1d6)]);if(_0x58281f===undefined)throw new Error(_0x54cb0d(0x1cb));return{'image':_0x58281f};}[_0x5ca5e6(0x1e1)](_0xf1f90f){const _0x3d4b8f=_0x5ca5e6;if(typeof _0xf1f90f[_0x3d4b8f(0x1e8)]!==_0x3d4b8f(0x1f8)||typeof _0xf1f90f[_0x3d4b8f(0x1dd)]!==_0x3d4b8f(0x1f8)||!isPlainRecord(_0xf1f90f[_0x3d4b8f(0x1d8)]))throw new Error(_0x3d4b8f(0x1cc));const _0x538282=this[_0x3d4b8f(0x1c2)](_0xf1f90f[_0x3d4b8f(0x1e8)],_0xf1f90f[_0x3d4b8f(0x1b7)]),_0xac069d=this[_0x3d4b8f(0x1cf)][_0x3d4b8f(0x1d3)][_0x3d4b8f(0x1ee)](_0x538282['id'])??_0x538282['id'];return this[_0x3d4b8f(0x1cf)][_0x3d4b8f(0x1ec)](_0xac069d,_0xf1f90f[_0x3d4b8f(0x1dd)],_0xf1f90f[_0x3d4b8f(0x1d8)]),{'accepted':!![]};}[_0x5ca5e6(0x1f3)](_0x1ef91d){const _0x560bfb=_0x5ca5e6;if(typeof _0x1ef91d[_0x560bfb(0x1bb)]!==_0x560bfb(0x1f8))throw new Error(_0x560bfb(0x1db));const _0x327a3b=this[_0x560bfb(0x1cf)][_0x560bfb(0x1d3)][_0x560bfb(0x1b8)](_0x1ef91d[_0x560bfb(0x1bb)]);if(_0x327a3b===undefined)throw new Error(_0x560bfb(0x1db));const _0x540587=this[_0x560bfb(0x1cf)][_0x560bfb(0x1d3)][_0x560bfb(0x1d5)](_0x327a3b['id']);if(_0x540587===undefined||isTerminalRunStatus(_0x540587[_0x560bfb(0x1c7)]))throw new Error(_0x560bfb(0x1b4));return this[_0x560bfb(0x1f6)](_0x560bfb(0x1e0),{'runId':_0x540587['id'],'__requestUserId':_0x1ef91d[_0x560bfb(0x1b7)]});}[_0x5ca5e6(0x1f6)](_0x357750,_0xe370c2){const _0x2bf655=_0x5ca5e6,_0x529d9e=this[_0x2bf655(0x1c2)](_0xe370c2[_0x2bf655(0x1e8)],_0xe370c2[_0x2bf655(0x1b7)]),_0x3fd837=this[_0x2bf655(0x1cf)][_0x2bf655(0x1d3)][_0x2bf655(0x1da)](_0x529d9e['id'],_0x2bf655(0x1bd)),_0x2fe7d5=this[_0x2bf655(0x1cf)][_0x2bf655(0x1d3)][_0x2bf655(0x1ee)](_0x529d9e['id']),_0x58ff99=this[_0x2bf655(0x1cf)][_0x2bf655(0x1d3)][_0x2bf655(0x1bc)](_0x529d9e['id']),_0x3cef28=_0x2fe7d5??(_0x58ff99===undefined||_0x58ff99[_0x2bf655(0x1e7)]===null?_0x529d9e['id']:undefined);return this[_0x2bf655(0x1cf)][_0x2bf655(0x1d1)](_0x529d9e[_0x2bf655(0x1bb)]),_0x3cef28===undefined?(this[_0x2bf655(0x1cf)][_0x2bf655(0x1b9)](_0x529d9e['id']),this[_0x2bf655(0x1cf)][_0x2bf655(0x1e3)](_0x529d9e['id'],_0x2bf655(0x1de),{'code':_0x2bf655(0x1ed)},_0x2bf655(0x1c0))):(this[_0x2bf655(0x1cf)][_0x2bf655(0x1b9)](_0x3cef28),this[_0x2bf655(0x1cf)][_0x2bf655(0x1c1)](_0x357750,{'runId':_0x3cef28})),{'run':_0x3fd837};}[_0x5ca5e6(0x1b5)](_0x16c3a4){const _0x1ef35a=_0x5ca5e6;if(typeof _0x16c3a4[_0x1ef35a(0x1e8)]!==_0x1ef35a(0x1f8)||typeof _0x16c3a4[_0x1ef35a(0x1c4)]!==_0x1ef35a(0x1f8)||_0x16c3a4[_0x1ef35a(0x1f1)]!==_0x1ef35a(0x1f2)&&_0x16c3a4[_0x1ef35a(0x1f1)]!==_0x1ef35a(0x1e6))throw new Error(_0x1ef35a(0x1f7));const _0x4a66e4=this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1d3)][_0x1ef35a(0x1e4)](_0x16c3a4[_0x1ef35a(0x1c4)]);if(_0x4a66e4===undefined||this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1d3)][_0x1ef35a(0x1e2)](_0x4a66e4[_0x1ef35a(0x1e8)])!==_0x16c3a4[_0x1ef35a(0x1e8)])throw new Error(_0x1ef35a(0x1ef));this[_0x1ef35a(0x1d2)](_0x4a66e4[_0x1ef35a(0x1e8)],_0x16c3a4[_0x1ef35a(0x1b7)]);const _0x10e014=this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1d3)][_0x1ef35a(0x1b5)](_0x16c3a4[_0x1ef35a(0x1c4)],_0x16c3a4[_0x1ef35a(0x1f1)]);return this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1e3)](_0x10e014[_0x1ef35a(0x1e8)],_0x1ef35a(0x1c5),{'approvalId':_0x10e014['id'],'decision':_0x16c3a4[_0x1ef35a(0x1f1)]}),this[_0x1ef35a(0x1cf)][_0x1ef35a(0x1c1)](_0x1ef35a(0x1be),{'runId':_0x10e014[_0x1ef35a(0x1e8)],'approvalId':_0x10e014['id'],'decision':_0x16c3a4[_0x1ef35a(0x1f1)]}),{'approval':_0x10e014};}[_0x5ca5e6(0x1c9)](_0x2b9d57){const _0x1e8b49=_0x5ca5e6;if(typeof _0x2b9d57!==_0x1e8b49(0x1f8))throw new Error(_0x1e8b49(0x1b4));const _0x30d1cc=this[_0x1e8b49(0x1cf)][_0x1e8b49(0x1d3)][_0x1e8b49(0x1d0)](_0x2b9d57);if(_0x30d1cc===undefined)throw new Error(_0x1e8b49(0x1b4));return _0x30d1cc;}[_0x5ca5e6(0x1c2)](_0x2dc04b,_0x549099){const _0x4c911e=_0x5ca5e6,_0x15b071=this[_0x4c911e(0x1c9)](_0x2dc04b);return assertRunOwner(_0x15b071,_0x549099),_0x15b071;}[_0x5ca5e6(0x1d2)](_0x2bc496,_0x128b7f){const _0x21b050=_0x5ca5e6;assertRunOwner(this[_0x21b050(0x1c9)](_0x2bc496),_0x128b7f);}}function record(_0xbc6b82){return isPlainRecord(_0xbc6b82)?_0xbc6b82:{};}
|