apt-mcp-agent-setup 3.5.14 → 3.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +12 -12
  2. package/bin/cli.js +1 -1
  3. package/build-input.json +66 -53
  4. package/bundle/NOTICES.md +0 -0
  5. package/bundle/core.enc +0 -0
  6. package/bundle/mcp-rules.enc +0 -0
  7. package/bundle/skills-aso.enc +0 -0
  8. package/bundle/skills-ba.enc +0 -0
  9. package/bundle/skills-base.enc +0 -0
  10. package/bundle/skills-be.enc +0 -0
  11. package/bundle/skills-design.enc +0 -0
  12. package/bundle/skills-fe.enc +0 -0
  13. package/bundle/skills-marketing.enc +0 -0
  14. package/bundle/skills-mobile.enc +0 -0
  15. package/bundle/skills-pm.enc +0 -0
  16. package/docs/technical-sources.md +3 -3
  17. package/integrity-manifest.json +148 -143
  18. package/package.json +1 -1
  19. package/release-check.js +11 -5
  20. package/src/backends/browser-tools.js +1 -1
  21. package/src/backends/index-cache-authority.js +1 -1
  22. package/src/backends/index-command.js +1 -1
  23. package/src/backends/index-maintenance.js +1 -1
  24. package/src/backends/index-store.js +1 -1
  25. package/src/backends/profiles.js +1 -1
  26. package/src/backends/review_graph.py +150 -6
  27. package/src/backends/source-discovery.js +1 -0
  28. package/src/core/admission-fence.js +1 -1
  29. package/src/core/aso-import.js +1 -1
  30. package/src/core/backend-lease-recovery.js +1 -1
  31. package/src/core/caller-context.js +1 -1
  32. package/src/core/catalog.js +1 -1
  33. package/src/core/claude-caller-authority.js +1 -1
  34. package/src/core/claude-invocation.js +1 -1
  35. package/src/core/claude-native.js +1 -1
  36. package/src/core/claude-plan.js +1 -1
  37. package/src/core/claude-transcript-scan.js +1 -1
  38. package/src/core/claude-worker-transcript.js +1 -1
  39. package/src/core/codex-host-metadata.js +1 -1
  40. package/src/core/codex-transcript-receipt.js +1 -1
  41. package/src/core/connection-inspector.js +1 -1
  42. package/src/core/context-metrics.js +1 -1
  43. package/src/core/doctor.js +1 -1
  44. package/src/core/draining-completion.js +1 -1
  45. package/src/core/execution.js +1 -1
  46. package/src/core/git-context.js +1 -1
  47. package/src/core/hook-bridge.js +1 -1
  48. package/src/core/hook-diagnostics.js +1 -0
  49. package/src/core/hook-lease.js +1 -0
  50. package/src/core/host-adapters.js +1 -1
  51. package/src/core/interrupted-operation-audit.js +1 -1
  52. package/src/core/ipc-envelope.js +1 -1
  53. package/src/core/legacy-retirement-proof.js +1 -1
  54. package/src/core/memory-scope.js +1 -1
  55. package/src/core/memory-store.js +1 -1
  56. package/src/core/model-inventory.js +1 -1
  57. package/src/core/model-routing.js +1 -1
  58. package/src/core/native-dispatch.js +1 -1
  59. package/src/core/native-receipt.js +1 -1
  60. package/src/core/node-version.js +1 -1
  61. package/src/core/npm-cli.js +1 -1
  62. package/src/core/owned-command-child.js +1 -1
  63. package/src/core/owned-command.js +1 -1
  64. package/src/core/owned-lock.js +1 -1
  65. package/src/core/owned-process.js +1 -1
  66. package/src/core/pipeline-journal.js +1 -1
  67. package/src/core/presentations.js +1 -1
  68. package/src/core/quality-artifacts.js +1 -1
  69. package/src/core/quality.js +1 -1
  70. package/src/core/read-command.js +1 -1
  71. package/src/core/readonly-skill.js +1 -1
  72. package/src/core/recovery-archive.js +1 -1
  73. package/src/core/resource-transaction.js +1 -1
  74. package/src/core/run-checkpoint.js +1 -1
  75. package/src/core/run-compatibility.js +1 -1
  76. package/src/core/run-state-codec.js +1 -0
  77. package/src/core/runtime-authority.js +1 -1
  78. package/src/core/runtime-info.js +1 -1
  79. package/src/core/runtime-ownership.js +1 -1
  80. package/src/core/session.js +1 -1
  81. package/src/core/skill-companions.js +1 -1
  82. package/src/core/skill-names.js +1 -1
  83. package/src/core/storage-retry.js +1 -1
  84. package/src/core/tool-contracts.js +1 -1
  85. package/src/core/update-control.js +1 -1
  86. package/src/core/upgrade-runs.js +1 -1
  87. package/src/core/upgrade-stop.js +1 -1
  88. package/src/core/windows-job.js +1 -1
  89. package/src/core/workflow-policy.js +1 -0
  90. package/src/core/workspace-generation.js +1 -1
  91. package/src/core/workspace-path.js +1 -1
  92. package/src/installer/bounded-command.js +1 -1
  93. package/src/installer/candidate-preflight.js +1 -1
  94. package/src/installer/connection-activation.js +1 -1
  95. package/src/installer/connection-supervisor.js +1 -1
  96. package/src/installer/deployment-draft.js +1 -1
  97. package/src/installer/gateway-context.js +1 -1
  98. package/src/installer/gateway-migration.js +1 -1
  99. package/src/installer/gateway-runtime.js +1 -1
  100. package/src/installer/global-setup.js +1 -1
  101. package/src/installer/hook-context-client.js +1 -1
  102. package/src/installer/hook-dispatcher.js +76 -24
  103. package/src/installer/host-hooks.js +1 -1
  104. package/src/installer/index-recovery.js +1 -1
  105. package/src/installer/interrupted-operation-recovery.js +1 -1
  106. package/src/installer/legacy-registration.js +1 -1
  107. package/src/installer/managed-config.js +1 -1
  108. package/src/installer/migration-scope.js +1 -1
  109. package/src/installer/platform-config.js +1 -1
  110. package/src/installer/prerequisites.js +1 -1
  111. package/src/installer/presentations.js +1 -1
  112. package/src/installer/project-outcome.js +1 -1
  113. package/src/installer/project-setup.js +1 -1
  114. package/src/installer/registration-closure.js +1 -1
  115. package/src/installer/registration-plan.js +1 -1
  116. package/src/installer/registration-receipt.js +1 -1
  117. package/src/installer/registrations.js +1 -1
  118. package/src/installer/runtime-activation.js +1 -1
  119. package/src/installer/runtime-child.js +1 -1
  120. package/src/installer/runtime-cleanup.js +1 -1
  121. package/src/installer/runtime-lock.js +1 -1
  122. package/src/installer/runtime-store.js +1 -1
  123. package/src/installer/runtime-supervisor.js +1 -1
  124. package/src/installer/setup-wizard.js +1 -1
  125. package/src/installer/update-addons.js +1 -1
  126. package/src/installer/update-cleanup.js +1 -1
  127. package/src/installer/update-executor.js +1 -1
  128. package/src/installer/update-history.js +1 -1
  129. package/src/installer/update-registration.js +1 -1
  130. package/src/installer/update-request.js +1 -1
  131. package/src/installer/update-scope.js +1 -1
  132. package/src/installer/workspace-registry.js +1 -1
  133. package/src/installer/workspace-transaction.js +1 -1
  134. package/src/installer/workspace-update.js +1 -1
  135. package/src/license/crypto.js +1 -1
  136. package/src/license/fingerprint.js +1 -1
  137. package/src/license/terms.js +1 -1
  138. package/src/license/verify.js +1 -1
  139. package/src/presets/index.js +1 -1
  140. package/src/proxy/backends.js +1 -1
  141. package/src/proxy/browser-sessions.js +1 -1
  142. package/src/proxy/core-tools.js +1 -1
  143. package/src/proxy/pipeline.js +1 -1
  144. package/src/proxy/public-catalog.js +1 -1
  145. package/src/proxy/router.config.js +1 -1
  146. package/src/proxy/router.js +1 -1
  147. package/src/proxy/server.js +1 -1
  148. package/src/proxy/workspace-gateway.js +1 -1
@@ -1 +1 @@
1
- 'use strict';const _0x2e8fc6=_0x153a;(function(_0x5f322e,_0x5163b9){const _0x36efcb=_0x153a,_0x1b6efd=_0x5f322e();while(!![]){try{const _0x1edb01=parseInt(_0x36efcb(0x1a0))/0x1+-parseInt(_0x36efcb(0x205))/0x2+parseInt(_0x36efcb(0x189))/0x3+parseInt(_0x36efcb(0x1e0))/0x4+parseInt(_0x36efcb(0x1da))/0x5*(parseInt(_0x36efcb(0x1ff))/0x6)+-parseInt(_0x36efcb(0x1a1))/0x7*(-parseInt(_0x36efcb(0x172))/0x8)+-parseInt(_0x36efcb(0x196))/0x9*(parseInt(_0x36efcb(0x1b9))/0xa);if(_0x1edb01===_0x5163b9)break;else _0x1b6efd['push'](_0x1b6efd['shift']());}catch(_0x1d729b){_0x1b6efd['push'](_0x1b6efd['shift']());}}}(_0x53a9,0x85008));function _0x53a9(){const _0x130462=['BwLNCMf0Aw9Ulq','BgvUz3rO','yw50AwDYyxzPDhK','q09otKvdveLptL9pv05fuLnisvbFuKvrvuLsruq','CMvHBhbHDgHtEw5J','BM9KztPMCW','A2LUza','lI93B3jRC3bHy2uTCMvNAxn0CNK','BwfW','y29TBwL0DgvK','uKvhsvnuuKfusu9ox0nptKzjr19dt05gteLdva','C2nVCgu','C2vZC2LVBL9IB290C3rYyxa','AxngAwXL','Dg9TBa','z2XVyMfS','tuLhuKfusu9ox0PpvvjoquXFsu5wquXjra','yxbWBhLPBMC','ndeWtuzuzgjO','Dg9VBhm','A2v5CW','CMvHzezPBgvtEw5J','Ag9ZDhm','DhjHBNnHy3rPB25jza','lI4Vy29Yzs9Hzg1PC3nPB24TzMvUy2u','BgvNywn5lw93BMvYC2HPCc11BNzLCMLMAwvK','D29YA3nWywnLt3DUzxjZAgLW','CMvZB2X2zq','y29Kzq','C3bSAxq','zw50CNLiyxnO','CMvJB3jKCW','AM91CM5HBa','D29YA3nWywnL','B3bLBLn5BMm','Dw5SAw5Ru3LUyW','CMvTB3zLq29UzMLNqxrVBwLJ','DMvYAwzPzwq','Ag9ZDa','zMLSDgvY','zMvUy2u','lI4Vy29Yzs9YDw4Ty29TCgf0AwjPBgL0Eq','zM9YBwf0','BwvTyMvYCW','C2XPy2u','B2XKsgfZAa','yxbWBgLLza','CMv2Awv3lxjLCxvPCMvK','ChjVAMvJDenVBMzPzW','lI9WBgf0zM9YBs1JB25MAwC','y2fUB25Py2fSlxbYB2PLy3qTBgf1BMnOzxi','ndCZnJG5mhrjAgfqvW','DhjPBq','B3bLBG','BwLNCMf0Aw9UlMXVy2S','AgfZ','lNjLCgXHy2vTzw50','mtm1mJu4mgDUv2ThAW','CMvHzhKTBMv4Dc1JB25Uzwn0Aw9U','B3DUzxjZAgLW','cGPBBwnWx3nLCNzLCNmUyxb0lw1JCc1Hz2vUDf0ky29TBwfUzca9icjUB2rLiGPHCMDZid0G','zNjLzxPLrMvUy2u','tuLhuKfusu9ox1bst0zjtevFvu5tvvbqt1juruq','CMv2zxjZzq','CMv2Awv3','ls1NyxrLD2f5','zw5HyMXLza','Ag9TzwrPCG','ywXPyxnLCW','B3DUzwqTCMvNAxn0CMf0Aw9Ulw1Pz3jHDgLVBG','CgvUzgLUzY1ZywzLlwjVDw5Kyxj5','zw50CNK','Aw5JBhvKzvjLz2LZDgvYzwrqCM9Qzwn0CW','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','zNjVEMvU','tuLhuKfusu9ox05fvvrsquXFufjprKLmrv9vtLnvufbpuLrfra','zw52','Dg9tDhjPBMC','Bgf1BMnOzxi','ChjVB2y','zxbVy2G','BwTKAxjtEw5J','ChjVzMLSzuzVCG','DMvYAwz5q2XVC3vYzq','tM8GywrTAxr0zwqGD29YA2vYig9Yig9WzxjHDgLVBG','qurnsvntsu9ox0nptKzmsunu','AM91CM5HBc5QC29U','zw50CMLLCW','nKTfzwnvBq','y29TBwfUza','tuLhuKfusu9ox0Lox1bst0Dsrvnt','CM9VDa','ChvZAa','tuLhuKfusu9ox0zbsuXfra','mtqZodGZmK5pzu5ZEa','y2XVC2vK','C3rYAw5NAwz5','tuLhuKfusu9ox1nuquDfx0nptKzmsunu','yMXVy2TLCNm','Bwf0y2G','yxb0lxj1BNrPBwu','DxbKyxrL','BwnWu2vYDMvYCW','ywnXDwLYzvj1BNrPBwvmB2nR','lNrTCa','Dg9Wtgv2zwXlzxK','zhjHAw5PBMC','zMLUza','C2vYDMLUz0nVBMzPCM1Lza','DxrMoa','BMv3sgfZAa','y29UzMLNC0nOyw5Nzwq','y29TBwL0DgLUzW','su5wquXjrf9dt05gsuC','tuLhuKfusu9ox1bmqu5Fq0HbtKDfra','C3rHDhvZ','ChjVDMvUyw5Jzq','ru5pru5u','ls1OB3n0','Dg9vChbLCKnHC2u','v09ss1nqqunfx0jjtKrjtKDFuKvrvuLsruq','DMfSDwvZ','BM9KztPVCW','C3rKAw8','Aw5JBhvKzuDSB2jHBa','Agv4','Aw5JBhvKzxm','z2XVyMfSq29UzMLN','CMvUyw1Lu3LUyW','yxbWBhKTAw50zw50','tuLhuKfusu9ox1bst0zjtevFq09orKXjq1q','twf0y2HPBMCGB3DUzxjZAgLWihjLy2vPChrZ','BM9KztPWyxrO','DMvYC2LVBG','zgLYBMfTzq','lI9Tyw5Hz2vKlwnVBMzPzW','Dw5RBM93BG','AxnbyNnVBhv0zq','tuLhuKfusu9ox1bmqu5Fsu5wquXjra','BM9KztP1DgLS','DgvZDa','lI4Vy29Yzs9VD25Lzc1SB2nR','y3jLyxrLsgfZAa','uKvhsvnuuKfusu9ox09xtKvsu0Hjuf9srvfvsvjfra','yMXVy2TLzc1WCM9Qzwn0lxn5BMm','zMLSzq','BM9Kzq','ChjVzMLSzxm','CMv3CML0zvjLCxvPCMvK','ANnVBMm','ChjVAMvJDhnfBNjVBgXLza','ywrK','AxnezwvWu3rYAwn0rxf1ywW','vu5tvvbqt1jururFse9tva','CMvJzwLWDc1JB25MAxjTzwq','lMfUAgrO','zw5YB2XS','ChjLCgfYzwq','yxnZAwDU','Bgf1BMnOzxiUANm','ywrVChrLza','B3jPz2LUywW','BgLZDa','AxntEw1IB2XPy0XPBMS','ChjVAMvJDhm','y29UzMLNDxjLqw50AwDYyxzPDhLeAxnJB3zLCNK','zxHWB3j0CW','CMvWBgfJzufSBa','zwfNzxi','mZi1mJGWofrWyuDswG','ls1WyxrO','Bhn0yxrtEw5J','B3bLCMf0Aw9UCW','D3jPDgvgAwXLu3LUyW','CM9SBgvKlwjHy2S','lI4Vy29Yzs9YDw50Aw1Llw93BMvYC2HPCa','Bwf0y2HbBgW','tuLhuKfusu9ox1bbveHFrvndqvbf','y29UzMLNCW','y29UzMLNugf0Aa','C3rHDgu','lM9YAwDPBMfS','yM9VBgvHBG','zxHPC3rZu3LUyW','CMvHzezLBMnL','DhLWzq','y2HHBMDLrMvUy2u','zgLNzxn0','yxjNCW','zMLUzeLUzgv4','D2LUmZi','lI9JB25Uzwn0Aw9UlwfJDgL2yxrPB24','mtCZmdC3nxjvz25nAa','yxb0lw1JCc1Hz2vUDa','BwLNCMf0zuDLBMvYyxrLzezPzwXKCW','y2XHDwrL','DhjPBuvUza','ChjVAMvJDfbHDgHZ','CMvJB3zLCNK','AxnbCNjHEq','zNn5BMntEw5J','C2LUz2XLlwDHDgv3yxK','B2jQzwn0','CMvJDxjZAxzL','lI9YzwDPC3rYyxrPB24TCMvJzwLWDa','ndGXntq1DvrRvvzy','tevhqunzx0nmt1nvuKvFvu5wrvjjrKLfra','ChjVAMvJDa','ChjVzMLSzq','AM9PBG','Bw9KzwXFBgLZDa','CMvJB25Uzwn0lxjLCxvPCMvK','CMvWBgfJzw1LBNq','C2fTzvDVCMTZCgfJzq','C29Tzq','nZGYmJq3t0Tqv3Hw','mtrXugXiCuy','Dg9ju09tDhjPBMC','ywXPyxm','CMvNAxn0CMf0Aw9UsgfZAa','DxbKyxrLzef0','BgLZDfDVCMTZCgfJzvjLy2vPChrZ'];_0x53a9=function(){return _0x130462;};return _0x53a9();}function _0x153a(_0x4a8d2d,_0x2390bf){_0x4a8d2d=_0x4a8d2d-0x15d;const _0x53a966=_0x53a9();let _0x153ac1=_0x53a966[_0x4a8d2d];if(_0x153a['BlEGhK']===undefined){var _0x2c1a46=function(_0x1d0904){const _0x2e32af='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x35d39c='',_0x30f560='';for(let _0x10efaa=0x0,_0x2afb23,_0x98a110,_0x2bb8a8=0x0;_0x98a110=_0x1d0904['charAt'](_0x2bb8a8++);~_0x98a110&&(_0x2afb23=_0x10efaa%0x4?_0x2afb23*0x40+_0x98a110:_0x98a110,_0x10efaa++%0x4)?_0x35d39c+=String['fromCharCode'](0xff&_0x2afb23>>(-0x2*_0x10efaa&0x6)):0x0){_0x98a110=_0x2e32af['indexOf'](_0x98a110);}for(let _0x1814e4=0x0,_0x426c8a=_0x35d39c['length'];_0x1814e4<_0x426c8a;_0x1814e4++){_0x30f560+='%'+('00'+_0x35d39c['charCodeAt'](_0x1814e4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x30f560);};_0x153a['cRhudS']=_0x2c1a46,_0x153a['ZNxeKZ']={},_0x153a['BlEGhK']=!![];}const _0x4cb155=_0x53a966[0x0],_0x482a62=_0x4a8d2d+_0x4cb155,_0x320863=_0x153a['ZNxeKZ'][_0x482a62];return!_0x320863?(_0x153ac1=_0x153a['cRhudS'](_0x153ac1),_0x153a['ZNxeKZ'][_0x482a62]=_0x153ac1):_0x153ac1=_0x320863,_0x153ac1;}const fs=require(_0x2e8fc6(0x1ac)),path=require(_0x2e8fc6(0x22b)),os=require(_0x2e8fc6(0x221)),crypto=require('node:crypto'),{IDE_REGISTRY}=require(_0x2e8fc6(0x1d8)),{configEntry}=require('./registration-plan'),{parseJson,writeConfigAtomic}=require(_0x2e8fc6(0x22e)),{matchingReceipt,registeredProjects,entryHash,recordRegistration}=require(_0x2e8fc6(0x195)),{WorkspaceRegistry}=require(_0x2e8fc6(0x1ae)),hash=_0x171e66=>crypto[_0x2e8fc6(0x235)]('sha256')[_0x2e8fc6(0x20c)](_0x171e66)[_0x2e8fc6(0x184)](_0x2e8fc6(0x224)),isApt=_0x26625b=>_0x26625b===_0x2e8fc6(0x18a)||/^apt-mcp-agent-w[a-z0-9]+$/i['test'](_0x26625b),fail=_0x2b5ac3=>{const _0x438c8f=_0x2e8fc6;throw Object[_0x438c8f(0x167)](new Error(_0x2b5ac3),{'code':_0x2b5ac3});},rootFor=_0x743419=>_0x743419[_0x2e8fc6(0x202)]||process.env.APT_MIGRATION_ROOT||path[_0x2e8fc6(0x19a)](os['homedir'](),_0x2e8fc6(0x164),_0x2e8fc6(0x20b),'registration-migrations'),read=_0x4c79c6=>{const _0x3a18bf=_0x2e8fc6;try{return fs[_0x3a18bf(0x1bc)](_0x4c79c6);}catch(_0x3d4308){if(_0x3d4308[_0x3a18bf(0x1c3)]===_0x3a18bf(0x21c))return null;throw _0x3d4308;}};function durable(_0x969a5f,_0x54d17e){const _0x17f115=_0x2e8fc6,_0xb86d8e={};_0xb86d8e[_0x17f115(0x194)]=!![],fs[_0x17f115(0x1f8)](path[_0x17f115(0x22d)](_0x969a5f),_0xb86d8e);const _0x19532=_0x969a5f+'.'+crypto['randomUUID']()+_0x17f115(0x20f),_0x439e5e=fs[_0x17f115(0x1c9)](_0x19532,'wx',0x180);try{fs[_0x17f115(0x176)](_0x439e5e,_0x54d17e),fs[_0x17f115(0x191)](_0x439e5e);}finally{fs['closeSync'](_0x439e5e);}try{fs[_0x17f115(0x227)](_0x19532,_0x969a5f);}finally{try{fs[_0x17f115(0x1ca)](_0x19532);}catch{}}}function removeToml(_0x5c272c,_0x31153e){const _0x2132cf=_0x2e8fc6;return _0x5c272c[_0x2132cf(0x1c4)](/(?=^\[)/m)[_0x2132cf(0x1ce)](_0x4c653b=>{const _0x382e4c=_0x2132cf,_0x4c4e53=_0x4c653b[_0x382e4c(0x20a)](/^\[mcp_servers\.(?:"([^"]+)"|'([^']+)'|([^\.\]\r\n]+))(?:\.[^\]]+)?\]/)?.[_0x382e4c(0x1d3)](0x1)[_0x382e4c(0x212)](Boolean);return!_0x31153e['includes'](_0x4c4e53);})[_0x2132cf(0x19a)]('');}function profileFor(_0x27f1cb,_0x59a020){const _0x37b469=_0x2e8fc6;if(_0x59a020['toml']){if(_0x59a020[_0x37b469(0x1b5)][_0x37b469(0x1c4)](/\r?\n/)[_0x37b469(0x19f)](_0x39bb4b=>_0x39bb4b[_0x37b469(0x1db)]()&&!_0x39bb4b[_0x37b469(0x1db)]()['startsWith']('#')&&!/^\[mcp_servers\.[^\]]+\]$|^\s*(command|args)\s*=/['test'](_0x39bb4b)))fail('MIGRATION_PROFILE_UNSUPPORTED');const _0x1979f7={};return _0x1979f7[_0x37b469(0x1f3)]={},_0x1979f7['tools']={},_0x1979f7;}const _0x5db52e=structuredClone(_0x59a020);require(_0x37b469(0x1d8))[_0x37b469(0x18b)](_0x27f1cb,_0x5db52e);if(_0x5db52e['type']!==undefined){if(_0x5db52e[_0x37b469(0x182)]!==_0x37b469(0x222))fail(_0x37b469(0x1e5));delete _0x5db52e[_0x37b469(0x182)];}for(const _0x35f5de of Object[_0x37b469(0x1bb)](_0x5db52e))if(![_0x37b469(0x200),'args',_0x37b469(0x1f3),_0x37b469(0x1ba)]['includes'](_0x35f5de))fail('MIGRATION_PROFILE_UNSUPPORTED');const _0x5aa8b3=_0x5db52e[_0x37b469(0x1f3)]||{};if(Array['isArray'](_0x5aa8b3)||typeof _0x5aa8b3!==_0x37b469(0x193)||Object[_0x37b469(0x1fe)](_0x5aa8b3)[_0x37b469(0x19f)](([_0x429652,_0x5a913b])=>typeof _0x5a913b!=='string'||/^(APT_|MCP_SKIP_|NODE_OPTIONS$|NODE_PATH$)/i[_0x37b469(0x233)](_0x429652))||new Set(Object[_0x37b469(0x1bb)](_0x5aa8b3)[_0x37b469(0x1af)](_0x43636a=>_0x43636a[_0x37b469(0x21e)]()))['size']!==Object[_0x37b469(0x1bb)](_0x5aa8b3)[_0x37b469(0x1a8)])fail(_0x37b469(0x1e5));const _0x3b2ad0=_0x5db52e[_0x37b469(0x1ba)]||{};if(Array[_0x37b469(0x190)](_0x3b2ad0)||typeof _0x3b2ad0!==_0x37b469(0x193)||Object['values'](_0x3b2ad0)[_0x37b469(0x19f)](_0x3043a6=>!_0x3043a6||typeof _0x3043a6!==_0x37b469(0x193)||Array['isArray'](_0x3043a6)||Object[_0x37b469(0x1bb)](_0x3043a6)[_0x37b469(0x19f)](_0x29ffec=>!['eager',_0x37b469(0x1e9)][_0x37b469(0x225)](_0x29ffec))||Object[_0x37b469(0x220)](_0x3043a6)[_0x37b469(0x19f)](_0x5680f3=>typeof _0x5680f3!==_0x37b469(0x17f))))fail(_0x37b469(0x1e5));const _0x4dcbcd={};return _0x4dcbcd[_0x37b469(0x1f3)]=_0x5aa8b3,_0x4dcbcd[_0x37b469(0x1ba)]=_0x3b2ad0,_0x4dcbcd;}function serverMap(_0x22c741,_0x2defe8){const _0x30f949=_0x2e8fc6,_0x17e173=IDE_REGISTRY[_0x2defe8],_0x3c0e2f=parseJson(_0x22c741,{'jsonc':_0x17e173[_0x30f949(0x15e)]}),_0x24a1f0=_0x3c0e2f[_0x17e173['topLevelKey']]||{};if(Array[_0x30f949(0x190)](_0x24a1f0)||typeof _0x24a1f0!=='object')fail('INVALID_CONFIG');if(_0x2defe8===_0x30f949(0x18c)&&Object['values'](_0x3c0e2f[_0x30f949(0x16d)]||{})[_0x30f949(0x19f)](_0x28d09f=>Object[_0x30f949(0x1bb)](_0x28d09f?.[_0x30f949(0x20d)]||{})[_0x30f949(0x19f)](isApt)))fail('MCP_NESTED_REGISTRATION_UNSUPPORTED');return _0x24a1f0;}const _0x2afb23={};_0x2afb23[_0x2e8fc6(0x1c6)]=[];function replacementFor(_0x212f60,_0x497c34,_0x112e5c,_0x2c0b10=_0x2afb23){const _0x41c42e=_0x2e8fc6,_0x47a802=IDE_REGISTRY[_0x212f60[_0x41c42e(0x1cd)]],_0x3f5c01=_0x497c34?.[_0x41c42e(0x1f4)]()||'',_0x3eec84=[_0x112e5c['replaceAll']('\x5c','/'),_0x41c42e(0x1e8),_0x41c42e(0x21d),_0x212f60[_0x41c42e(0x1cd)]];if(_0x212f60[_0x41c42e(0x1b2)]===_0x41c42e(0x198)){if(!_0x497c34)return _0x3f5c01;if(_0x47a802[_0x41c42e(0x1d1)]===_0x41c42e(0x1b5))return _0x3f5c01;const _0x31e05e={};_0x31e05e[_0x41c42e(0x15e)]=_0x47a802[_0x41c42e(0x15e)];const _0x4b277f=parseJson(_0x3f5c01,_0x31e05e);_0x4b277f[_0x47a802[_0x41c42e(0x210)]]||={};const _0x29b607=_0x2c0b10[_0x41c42e(0x1c6)]['filter'](_0x1ea55a=>_0x1ea55a['configPath']===_0x212f60[_0x41c42e(0x17c)]&&_0x1ea55a[_0x41c42e(0x15d)]);for(const _0x16170b of _0x29b607){const _0x539355=_0x4b277f[_0x47a802[_0x41c42e(0x210)]][_0x16170b[_0x41c42e(0x1a3)]];if(!_0x539355)continue;delete _0x4b277f[_0x47a802[_0x41c42e(0x210)]][_0x16170b['alias']];const _0x3d381d=[_0x112e5c[_0x41c42e(0x170)]('\x5c','/'),'--path',_0x212f60[_0x41c42e(0x1c8)][_0x41c42e(0x170)]('\x5c','/')],_0x2fb18d={..._0x539355};_0x2fb18d[_0x41c42e(0x200)]='node',_0x2fb18d[_0x41c42e(0x185)]=_0x3d381d,_0x4b277f[_0x47a802[_0x41c42e(0x210)]][_0x41c42e(0x18a)]=_0x2fb18d;}return JSON[_0x41c42e(0x207)](_0x4b277f,null,0x2);}if(_0x47a802['format']==='toml'){const _0x25f42b=removeToml(_0x3f5c01,_0x212f60[_0x41c42e(0x1eb)]);return _0x212f60[_0x41c42e(0x1b2)]===_0x41c42e(0x1b6)?_0x25f42b[_0x41c42e(0x18d)]()+_0x41c42e(0x1e3)+JSON[_0x41c42e(0x207)](_0x3eec84)+'\x0a':_0x25f42b;}serverMap(_0x3f5c01||'{}',_0x212f60['host']);const _0x46cd09={};_0x46cd09[_0x41c42e(0x15e)]=_0x47a802[_0x41c42e(0x15e)];const _0x2db532=parseJson(_0x3f5c01||'{}',_0x46cd09);_0x2db532[_0x47a802[_0x41c42e(0x210)]]||={};for(const _0x158e91 of _0x212f60[_0x41c42e(0x1eb)])delete _0x2db532[_0x47a802[_0x41c42e(0x210)]][_0x158e91];if(_0x212f60[_0x41c42e(0x1b2)]===_0x41c42e(0x1b6)){const _0x554496={};_0x554496[_0x41c42e(0x200)]='node',_0x554496[_0x41c42e(0x185)]=_0x3eec84;const _0x14d8f1=_0x554496;if(_0x212f60['host']===_0x41c42e(0x1a9))require(_0x41c42e(0x1d8))[_0x41c42e(0x16e)](_0x14d8f1);_0x2db532[_0x47a802[_0x41c42e(0x210)]][_0x41c42e(0x18a)]=_0x14d8f1;}return JSON[_0x41c42e(0x207)](_0x2db532,null,0x2);}function validateJournal(_0x4868d1,_0x1bc2d4,_0x385e04,_0x55a3b9){const _0x5f3cf0=_0x2e8fc6;if(![_0x5f3cf0(0x166),_0x5f3cf0(0x1b8),_0x5f3cf0(0x217),_0x5f3cf0(0x1b0),_0x5f3cf0(0x177)][_0x5f3cf0(0x225)](_0x4868d1[_0x5f3cf0(0x21a)])||_0x4868d1['operations'][_0x5f3cf0(0x1a8)]!==_0x1bc2d4['configs'][_0x5f3cf0(0x1a8)])fail(_0x5f3cf0(0x1b7));const _0x496353=[];for(const [_0x3c5662,_0x555675]of _0x1bc2d4['configs'][_0x5f3cf0(0x1fe)]()){const _0xd9a65d=_0x4868d1[_0x5f3cf0(0x175)][_0x3c5662];for(const _0x48db8d of[_0x5f3cf0(0x1cd),_0x5f3cf0(0x1b2),'configPath','oldHash',_0x5f3cf0(0x1eb)])if(!require(_0x5f3cf0(0x232))[_0x5f3cf0(0x161)](_0xd9a65d[_0x48db8d],_0x555675[_0x48db8d]))fail(_0x5f3cf0(0x1b7));approvedPath(_0x555675,_0x1bc2d4);const _0xd2d75c=_0x555675[_0x5f3cf0(0x1d4)]?staged(_0x385e04,_0x3c5662,_0x5f3cf0(0x16a),_0x555675['oldHash']):null,_0x35c41e=replacementFor(_0x555675,_0xd2d75c,_0x55a3b9,_0x1bc2d4);if(hash(_0x35c41e)!==_0xd9a65d['newHash'])fail(_0x5f3cf0(0x1b7));staged(_0x385e04,_0x3c5662,_0x5f3cf0(0x19d),_0xd9a65d[_0x5f3cf0(0x215)]);for(const _0x4ad6b4 of _0x1bc2d4[_0x5f3cf0(0x1c6)][_0x5f3cf0(0x1ce)](_0x5b11ff=>_0x5b11ff['configPath']===_0x555675[_0x5f3cf0(0x17c)])){if(!_0x555675['aliases']['includes'](_0x4ad6b4[_0x5f3cf0(0x1a3)])||_0x4ad6b4['host']!==_0x555675['host']||_0x4ad6b4['scope']!==_0x555675[_0x5f3cf0(0x1b2)]||_0x4ad6b4[_0x5f3cf0(0x1e2)]!==_0x5f3cf0(0x163))fail(_0x5f3cf0(0x1b7));const _0x43d2b6=configEntry(_0xd2d75c?.[_0x5f3cf0(0x1f4)]()||'',_0x555675[_0x5f3cf0(0x1cd)],_0x4ad6b4[_0x5f3cf0(0x1a3)]);if(!_0x43d2b6||entryHash(_0x43d2b6)!==_0x4ad6b4[_0x5f3cf0(0x1c5)])fail(_0x5f3cf0(0x1b7));const _0x3e3b7e=profileFor(_0x555675[_0x5f3cf0(0x1cd)],_0x43d2b6);if(!_0x4ad6b4[_0x5f3cf0(0x1c8)]){if(Object[_0x5f3cf0(0x1bb)](_0x3e3b7e['env']||{})[_0x5f3cf0(0x1a8)]||Object[_0x5f3cf0(0x1bb)](_0x3e3b7e['tools']||{})[_0x5f3cf0(0x19f)](_0xe7ea2f=>![_0x5f3cf0(0x1b3),_0x5f3cf0(0x19b)]['includes'](_0xe7ea2f)||Object[_0x5f3cf0(0x1bb)](_0x3e3b7e['tools'][_0xe7ea2f])[_0x5f3cf0(0x19f)](_0x16edf4=>_0x16edf4!==_0x5f3cf0(0x171))))fail(_0x5f3cf0(0x1f2));continue;}const _0x1d9524=fs['realpathSync'](_0x4ad6b4[_0x5f3cf0(0x1c8)]);if(!_0x1bc2d4[_0x5f3cf0(0x16d)][_0x5f3cf0(0x19f)](_0x3991f1=>require(_0x5f3cf0(0x1f0))[_0x5f3cf0(0x19e)](_0x3991f1,_0x1d9524)))fail(_0x5f3cf0(0x1b7));const _0x1b0fd5=_0x496353['find'](_0x165b4c=>_0x165b4c[_0x5f3cf0(0x1cd)]===_0x4ad6b4[_0x5f3cf0(0x1cd)]&&require(_0x5f3cf0(0x1f0))[_0x5f3cf0(0x19e)](_0x165b4c[_0x5f3cf0(0x1c8)],_0x1d9524));if(_0x1b0fd5&&!require('node:util')[_0x5f3cf0(0x161)](_0x1b0fd5['profile'],_0x3e3b7e))fail(_0x5f3cf0(0x229));const _0x2bd4e4={};_0x2bd4e4[_0x5f3cf0(0x1c8)]=_0x1d9524,_0x2bd4e4[_0x5f3cf0(0x1cd)]=_0x4ad6b4[_0x5f3cf0(0x1cd)],_0x2bd4e4['profile']=_0x3e3b7e;if(!_0x1b0fd5)_0x496353[_0x5f3cf0(0x203)](_0x2bd4e4);}}if(!require(_0x5f3cf0(0x232))[_0x5f3cf0(0x161)](_0x496353,_0x4868d1[_0x5f3cf0(0x23a)]))fail(_0x5f3cf0(0x1b7));}function migrationPlan(_0x2755e2={}){const _0x343645=_0x2e8fc6,_0x447f6e=Array['isArray'](_0x2755e2['projectPaths'])&&_0x2755e2['projectPaths'][_0x343645(0x1a8)]>0x0,_0x2f939c=_0x447f6e&&_0x2755e2[_0x343645(0x1ef)]!==!![]?_0x2755e2[_0x343645(0x18e)]:[..._0x2755e2['projectPaths']||[],...registeredProjects(_0x2755e2)],_0x45c05b=[...new Set(_0x2f939c)][_0x343645(0x1ce)](_0x37a5de=>fs[_0x343645(0x180)](_0x37a5de))[_0x343645(0x1af)](_0x5c340f=>fs['realpathSync'](_0x5c340f)),_0x212c0f=[],_0x4b0085=[],_0x46d4b5=[];for(const _0x3693c9 of _0x2755e2[_0x343645(0x1bd)]||Object[_0x343645(0x1bb)](IDE_REGISTRY)){const _0x10cf55=IDE_REGISTRY[_0x3693c9];if(!_0x10cf55)fail(_0x343645(0x162));const _0x359a61=[..._0x2755e2['includeGlobal']===![]?[]:[{'scope':_0x343645(0x1b6),'file':_0x10cf55['globalConfig']?.(),'workspace':null}],..._0x45c05b[_0x343645(0x1af)](_0x24e31d=>({'scope':_0x343645(0x198),'file':_0x10cf55[_0x343645(0x1d7)]?.(_0x24e31d),'workspace':_0x24e31d}))],_0x5c2c25=new Set();for(const _0x410373 of _0x359a61){if(!_0x410373[_0x343645(0x238)]||_0x5c2c25[_0x343645(0x1de)](path[_0x343645(0x1c2)](_0x410373[_0x343645(0x238)])))continue;_0x5c2c25[_0x343645(0x160)](path['resolve'](_0x410373[_0x343645(0x238)]));const _0x30e81e=path[_0x343645(0x1c2)](_0x410373['file']),_0x295279=read(_0x30e81e);if(!_0x295279&&_0x410373[_0x343645(0x1b2)]!==_0x343645(0x1b6))continue;let _0x2dd707;try{_0x2dd707=_0x10cf55[_0x343645(0x1d1)]===_0x343645(0x1b5)?[...(_0x295279?.[_0x343645(0x1f4)]()||'')[_0x343645(0x179)](/^\[mcp_servers\.(?:"([^"]+)"|'([^']+)'|([^\.\]\r\n]+))(?:\.[^\]]+)?\]/gm)][_0x343645(0x1af)](_0x490670=>_0x490670[_0x343645(0x1d3)](0x1)[_0x343645(0x212)](Boolean))[_0x343645(0x1ce)](isApt):Object[_0x343645(0x1bb)](serverMap(_0x295279?.['toString']()||'{}',_0x3693c9))[_0x343645(0x1ce)](isApt);}catch(_0x1c05ae){const _0x5e290b={};_0x5e290b[_0x343645(0x1c3)]=_0x1c05ae[_0x343645(0x1c3)]||_0x343645(0x218),_0x5e290b[_0x343645(0x1cd)]=_0x3693c9,_0x5e290b[_0x343645(0x17c)]=_0x30e81e,_0x46d4b5[_0x343645(0x203)](_0x5e290b);continue;}_0x2dd707=[...new Set(_0x2dd707)];if(!_0x2dd707['length']&&_0x410373[_0x343645(0x1b2)]!==_0x343645(0x1b6))continue;const _0x271677={'host':_0x3693c9,'scope':_0x410373[_0x343645(0x1b2)],'workspace':_0x410373[_0x343645(0x1c8)]||null,'configPath':_0x30e81e,'oldHash':_0x295279?hash(_0x295279):null,'aliases':_0x2dd707};_0x212c0f[_0x343645(0x203)](_0x271677);for(const _0x412d19 of _0x2dd707){const _0x4d47e2=configEntry(_0x295279['toString'](),_0x3693c9,_0x412d19),_0x4c19d3={};_0x4c19d3[_0x343645(0x1cd)]=_0x3693c9,_0x4c19d3['scope']=_0x410373[_0x343645(0x1b2)],_0x4c19d3[_0x343645(0x17c)]=_0x30e81e,_0x4c19d3['alias']=_0x412d19,_0x4c19d3[_0x343645(0x1ee)]=_0x4d47e2,_0x4c19d3[_0x343645(0x1c8)]=_0x410373[_0x343645(0x1b2)]==='project'?_0x410373[_0x343645(0x1c8)]:undefined;const _0x2e609d=matchingReceipt(_0x4c19d3,_0x2755e2),_0x277b62=_0x410373[_0x343645(0x1b2)]===_0x343645(0x198)&&_0x2755e2[_0x343645(0x1f5)]&&_0x4d47e2?.['command']===_0x343645(0x239)&&Array['isArray'](_0x4d47e2[_0x343645(0x185)])&&_0x4d47e2['args'][_0x343645(0x1a8)]===0x3&&_0x4d47e2[_0x343645(0x185)][0x0]&&path[_0x343645(0x1c2)](_0x4d47e2[_0x343645(0x185)][0x0])===path[_0x343645(0x1c2)](_0x2755e2['launcher'])&&_0x4d47e2[_0x343645(0x185)][0x1]===_0x343645(0x173)&&((()=>{const _0x2c26b1=_0x343645;try{return sameWorkspace(_0x4d47e2[_0x2c26b1(0x185)][0x2],_0x410373[_0x2c26b1(0x1c8)]);}catch{return![];}})()),_0x22844e=!_0x277b62,_0x98d127={'host':_0x3693c9,'scope':_0x410373[_0x343645(0x1b2)],'configPath':_0x30e81e,'alias':_0x412d19,'entryHash':entryHash(_0x4d47e2),'ownership':_0x2e609d?'receipt-confirmed':_0x277b62?'adoptable':_0x343645(0x22f),'workspace':_0x2e609d?.[_0x343645(0x1c8)]||_0x410373[_0x343645(0x1c8)],'rewriteRequired':_0x22844e};_0x4b0085[_0x343645(0x203)](_0x98d127);const _0x339360={};_0x339360[_0x343645(0x1c3)]=_0x343645(0x236),_0x339360[_0x343645(0x1cd)]=_0x3693c9,_0x339360[_0x343645(0x17c)]=_0x30e81e,_0x339360['alias']=_0x412d19;if(!_0x2e609d&&_0x22844e)_0x46d4b5[_0x343645(0x203)](_0x339360);else{if(!_0x98d127[_0x343645(0x1c8)]&&!(_0x412d19==='apt-mcp-agent'&&(_0x4d47e2[_0x343645(0x185)]||[])['includes'](_0x343645(0x1e8))||_0x4d47e2[_0x343645(0x1b5)]?.[_0x343645(0x225)]('\x22--gateway\x22')))_0x46d4b5[_0x343645(0x203)]({'code':_0x343645(0x21f),'host':_0x3693c9,'configPath':_0x30e81e,'alias':_0x412d19});}try{profileFor(_0x3693c9,_0x4d47e2);}catch(_0x5f1661){const _0x40c207={};_0x40c207[_0x343645(0x1c3)]=_0x5f1661[_0x343645(0x1c3)],_0x40c207['host']=_0x3693c9,_0x40c207[_0x343645(0x17c)]=_0x30e81e,_0x40c207['alias']=_0x412d19,_0x46d4b5[_0x343645(0x203)](_0x40c207);}}}}const _0x813843=_0x4b0085[_0x343645(0x19f)](_0x500547=>_0x500547['rewriteRequired']);return{'version':0x1,'kind':_0x343645(0x192),'projects':_0x45c05b,'hosts':_0x2755e2['hosts']||Object[_0x343645(0x1bb)](IDE_REGISTRY),'includeGlobal':_0x2755e2[_0x343645(0x223)]!==![],'includeRegisteredProjects':_0x2755e2[_0x343645(0x1ef)]===!![],'launcher':_0x2755e2[_0x343645(0x1f5)]||null,'configs':_0x212c0f,'records':_0x4b0085,'operationsRequired':_0x813843,'blockers':_0x46d4b5,'status':_0x46d4b5['length']?'blocked':_0x343645(0x1d6),'requirements':[_0x343645(0x22a),_0x343645(0x1fb),'Legacy\x20connections\x20reconnected\x20or\x20closed']};}function approvedPath(_0x150e02,_0x2c984b){const _0xcfb0f3=_0x2e8fc6,_0x35f9a3=IDE_REGISTRY[_0x150e02['host']];if(!_0x35f9a3||![_0xcfb0f3(0x1b6),_0xcfb0f3(0x198)][_0xcfb0f3(0x225)](_0x150e02[_0xcfb0f3(0x1b2)]))fail('MIGRATION_PATH_ESCAPE');const _0x28dad1=_0x150e02[_0xcfb0f3(0x1b2)]==='global'?[_0x35f9a3[_0xcfb0f3(0x226)]?.()]:_0x2c984b[_0xcfb0f3(0x16d)][_0xcfb0f3(0x1af)](_0x10ad0b=>_0x35f9a3['projectConfig']?.(_0x10ad0b)),_0x344e64=_0x15a486=>process['platform']===_0xcfb0f3(0x187)?path[_0xcfb0f3(0x1c2)](_0x15a486)['toLowerCase']():path[_0xcfb0f3(0x1c2)](_0x15a486);if(!_0x28dad1[_0xcfb0f3(0x1ce)](Boolean)[_0xcfb0f3(0x19f)](_0x3c9262=>_0x344e64(_0x3c9262)===_0x344e64(_0x150e02['configPath'])))fail(_0xcfb0f3(0x17a));let _0x5787bc=_0x150e02[_0xcfb0f3(0x17c)];while(!fs[_0xcfb0f3(0x180)](_0x5787bc)&&path['dirname'](_0x5787bc)!==_0x5787bc)_0x5787bc=path[_0xcfb0f3(0x22d)](_0x5787bc);if(_0x344e64(_0x5787bc)!==_0x344e64(fs[_0xcfb0f3(0x1ab)](_0x5787bc))||fs[_0xcfb0f3(0x180)](_0x150e02[_0xcfb0f3(0x17c)])&&(!fs['lstatSync'](_0x150e02[_0xcfb0f3(0x17c)])[_0xcfb0f3(0x1b4)]()||fs['lstatSync'](_0x150e02[_0xcfb0f3(0x17c)])['isSymbolicLink']()))fail(_0xcfb0f3(0x17a));}function staged(_0x20bfe8,_0x2dcfb6,_0x16b65d,_0x183684){const _0x1f18f4=_0x2e8fc6,_0x863423=path[_0x1f18f4(0x19a)](_0x20bfe8,_0x2dcfb6+'.'+_0x16b65d);if(!fs[_0x1f18f4(0x174)](_0x863423)[_0x1f18f4(0x1b4)]()||fs[_0x1f18f4(0x174)](_0x863423)[_0x1f18f4(0x16c)]()||!require(_0x1f18f4(0x1f0))['containsWorkspace'](_0x20bfe8,fs[_0x1f18f4(0x1ab)](_0x863423)))fail(_0x1f18f4(0x208));const _0x4934ca=fs[_0x1f18f4(0x1bc)](_0x863423);if(hash(_0x4934ca)!==_0x183684)fail(_0x1f18f4(0x208));return _0x4934ca;}async function applyMigration(_0x56defd,_0x1683d7={}){const _0x3b9341=_0x2e8fc6;if(_0x56defd?.[_0x3b9341(0x22c)]!==0x1||_0x56defd['kind']!==_0x3b9341(0x192)||!Array[_0x3b9341(0x190)](_0x56defd[_0x3b9341(0x1bd)])||!Array[_0x3b9341(0x190)](_0x56defd[_0x3b9341(0x16d)])||!Array[_0x3b9341(0x190)](_0x56defd[_0x3b9341(0x17b)])||!Array[_0x3b9341(0x190)](_0x56defd['records']))fail(_0x3b9341(0x231));const _0xbe87f8=hash(JSON[_0x3b9341(0x207)](_0x56defd)),_0x4c3da0=rootFor(_0x1683d7),_0x4f7c65=path[_0x3b9341(0x19a)](_0x4c3da0,_0xbe87f8),_0x50d50c=path['join'](_0x4f7c65,_0x3b9341(0x1fd)),_0x74f365=_0x1683d7['registry']||new WorkspaceRegistry(),_0x485cdb=_0x1683d7[_0x3b9341(0x1f5)]||path['join'](os[_0x3b9341(0x1ea)](),_0x3b9341(0x164),'apt-runtime',_0x3b9341(0x168));let _0x4d403c;try{if(fs['lstatSync'](_0x50d50c)['isSymbolicLink']())fail(_0x3b9341(0x17a));_0x4d403c=JSON['parse'](fs[_0x3b9341(0x1bc)](_0x50d50c));if(_0x4d403c[_0x3b9341(0x22c)]!==0x1||_0x4d403c['id']!==_0xbe87f8||hash(JSON[_0x3b9341(0x207)](_0x4d403c[_0x3b9341(0x1e7)]))!==_0xbe87f8||!Array[_0x3b9341(0x190)](_0x4d403c[_0x3b9341(0x175)])||!Array[_0x3b9341(0x190)](_0x4d403c['profiles']))fail(_0x3b9341(0x1b7));}catch(_0x48b734){if(_0x48b734[_0x3b9341(0x1c3)]!==_0x3b9341(0x21c))throw _0x48b734;}if(!_0x4d403c||_0x4d403c[_0x3b9341(0x21a)]===_0x3b9341(0x177)){const _0x1e5390={..._0x1683d7};_0x1e5390[_0x3b9341(0x18e)]=_0x56defd[_0x3b9341(0x16d)],_0x1e5390['hosts']=_0x56defd[_0x3b9341(0x1bd)],_0x1e5390[_0x3b9341(0x223)]=_0x56defd[_0x3b9341(0x223)],_0x1e5390['includeRegisteredProjects']=_0x56defd[_0x3b9341(0x1ef)],_0x1e5390[_0x3b9341(0x1f5)]=_0x56defd[_0x3b9341(0x1f5)]||_0x485cdb;const _0x5c199d=migrationPlan(_0x1e5390);if(hash(JSON[_0x3b9341(0x207)](_0x5c199d))!==_0xbe87f8)fail(_0x3b9341(0x219));if(_0x5c199d[_0x3b9341(0x209)][_0x3b9341(0x1a8)])return{'status':_0x3b9341(0x237),'blockers':_0x5c199d[_0x3b9341(0x209)]};_0x4d403c=null;}if(!path[_0x3b9341(0x230)](_0x485cdb)||!fs[_0x3b9341(0x180)](_0x485cdb))fail('GATEWAY_LAUNCHER_REQUIRED');const _0x108fa9={};_0x108fa9[_0x3b9341(0x194)]=!![],fs[_0x3b9341(0x1f8)](_0x4c3da0,_0x108fa9);if(fs[_0x3b9341(0x1ab)](_0x4c3da0)!==path[_0x3b9341(0x1c2)](_0x4c3da0))fail(_0x3b9341(0x17a));const _0x51da7c=require(_0x3b9341(0x234))[_0x3b9341(0x20e)](path[_0x3b9341(0x19a)](_0x4c3da0,_0x3b9341(0x1dd))),_0x3a4f1a={};_0x3a4f1a[_0x3b9341(0x1c3)]=_0x3b9341(0x201);const _0x1826c8={};_0x1826c8[_0x3b9341(0x21a)]='pending-safe-boundary',_0x1826c8['blockers']=[_0x3a4f1a];if(!_0x51da7c)return _0x1826c8;const _0x333ab3=require(_0x3b9341(0x1bf)),_0xfb49fa=[];let _0x3f00a1=!_0x4d403c,_0xa50a69=![];const _0x3161aa=_0x45bd04=>{const _0x47e017=_0x3b9341;_0x4d403c['status']=_0x45bd04,_0x4d403c[_0x47e017(0x1a5)]=new Date()[_0x47e017(0x1a2)](),durable(_0x50d50c,JSON[_0x47e017(0x207)](_0x4d403c));},_0x5b3cc8=_0x16470a=>{const _0x17569c=_0x3b9341;if(!_0x4d403c)return _0x1683d7;validateJournal(_0x4d403c,_0x56defd,_0x4f7c65,_0x485cdb);const _0x9f7c1b=_0x4d403c['operations'][_0x17569c(0x186)](_0x3aa197=>_0x3aa197[_0x17569c(0x17c)]===_0x16470a[_0x17569c(0x17c)]);if(_0x9f7c1b<0x0)fail(_0x17569c(0x1b7));const _0x2d4afe=_0x4d403c[_0x17569c(0x175)][_0x9f7c1b],_0x4ae6f1=read(_0x2d4afe[_0x17569c(0x17c)]),_0x1f9f56=_0x4ae6f1?hash(_0x4ae6f1):null;if(![_0x2d4afe[_0x17569c(0x1d4)],_0x2d4afe[_0x17569c(0x215)]][_0x17569c(0x225)](_0x1f9f56))fail(_0x17569c(0x1b1));return{..._0x1683d7,'originalConfig':staged(_0x4f7c65,_0x9f7c1b,_0x17569c(0x16a),_0x2d4afe[_0x17569c(0x1d4)])['toString']()};};try{if(_0x56defd['operationsRequired']===![]){const _0x248823={};return _0x248823[_0x3b9341(0x21a)]=_0x3b9341(0x1e1),_0x248823[_0x3b9341(0x1be)]=_0xbe87f8,_0x248823[_0x3b9341(0x216)]=0x0,_0x248823[_0x3b9341(0x15f)]=0x0,_0x248823[_0x3b9341(0x213)]=![],_0x248823[_0x3b9341(0x169)]=!![],_0x248823;}for(const _0x151709 of _0x56defd[_0x3b9341(0x16d)]){const _0x4df76f=_0x333ab3[_0x3b9341(0x181)](_0x151709),_0x2ea497=_0x3b9341(0x1a7)+_0xbe87f8,_0x974abf={};_0x974abf['code']='APT_UPDATE_PENDING',_0x974abf[_0x3b9341(0x1c8)]=_0x151709;const _0x2fc7c1={};_0x2fc7c1[_0x3b9341(0x21a)]=_0x3b9341(0x1ed),_0x2fc7c1[_0x3b9341(0x209)]=[_0x974abf];if(_0x4df76f['state']!==_0x3b9341(0x1dc)&&_0x4df76f[_0x3b9341(0x1be)]!==_0x2ea497)return _0x2fc7c1;const _0x4828d8={};_0x4828d8[_0x3b9341(0x17d)]=_0x3b9341(0x211),_0x4828d8[_0x3b9341(0x1be)]=_0x2ea497;const _0x466ade=_0x4df76f[_0x3b9341(0x17d)]===_0x3b9341(0x1dc)?_0x333ab3['changeFence'](_0x151709,_0x4df76f['epoch'],_0x4828d8):_0x4df76f,_0x3205d0={};_0x3205d0[_0x3b9341(0x1c8)]=_0x151709,_0x3205d0['fence']=_0x466ade,_0xfb49fa[_0x3b9341(0x203)](_0x3205d0);const _0x173ab2=require(_0x3b9341(0x1d0))['workspaceRunRoots'](_0x151709),_0x7e01e=require(_0x3b9341(0x178))[_0x3b9341(0x1c1)](_0x151709,_0x466ade,_0x173ab2,{'rebuildCheckpoints':!![],'budgetMs':Number(process.env.APT_RUN_INSPECTION_TIMEOUT_MS||0x1d4c0)});if(_0x7e01e['length'])return{'status':'pending-safe-boundary','blockers':_0x7e01e[_0x3b9341(0x1af)](_0x2418f5=>({'code':'OWNERSHIP_IN_FLIGHT','workspace':_0x151709,'kind':_0x2418f5['kind']}))};const _0x4844ab=require(_0x3b9341(0x188))[_0x3b9341(0x1a6)](_0x151709),_0x1cf220={};_0x1cf220[_0x3b9341(0x1c3)]=_0x3b9341(0x1aa),_0x1cf220[_0x3b9341(0x1c8)]=_0x151709;const _0xdcaf9={};_0xdcaf9[_0x3b9341(0x21a)]=_0x3b9341(0x19c),_0xdcaf9[_0x3b9341(0x209)]=[_0x1cf220];if(_0x4844ab[_0x3b9341(0x1a8)]||Object[_0x3b9341(0x220)](_0x466ade[_0x3b9341(0x1d2)]||{})[_0x3b9341(0x19f)](_0x1c4232=>_0x1c4232[_0x3b9341(0x17d)]!==_0x3b9341(0x206)))return _0xdcaf9;}for(const _0x3a2869 of _0x56defd[_0x3b9341(0x1c6)][_0x3b9341(0x1ce)](_0x2ab1c0=>_0x2ab1c0[_0x3b9341(0x1c8)])){const _0x267ff9=await _0x1683d7[_0x3b9341(0x1fa)]?.(_0x3a2869,_0x5b3cc8(_0x3a2869));if(_0x267ff9?.['status']!==_0x3b9341(0x1cc)||_0x267ff9[_0x3b9341(0x1a4)]!==_0x3a2869[_0x3b9341(0x1c5)])return{'status':_0x3b9341(0x1c0),'blockers':[{'code':_0x3b9341(0x197),'host':_0x3a2869['host'],'alias':_0x3a2869[_0x3b9341(0x1a3)]}]};}if(!_0x4d403c){const _0x2ec2d9=[],_0x5284d6=[];for(const _0x193b6f of _0x56defd['configs']){approvedPath(_0x193b6f,_0x56defd);const _0x4e8e62=read(_0x193b6f['configPath']);if((_0x4e8e62?hash(_0x4e8e62):null)!==_0x193b6f[_0x3b9341(0x1d4)])fail(_0x3b9341(0x219));const _0x386d4c=IDE_REGISTRY[_0x193b6f['host']];for(const _0xd8cccd of _0x56defd[_0x3b9341(0x1c6)][_0x3b9341(0x1ce)](_0x53238b=>_0x53238b[_0x3b9341(0x17c)]===_0x193b6f['configPath'])){const _0x59ea31=configEntry(_0x4e8e62[_0x3b9341(0x1f4)](),_0x193b6f[_0x3b9341(0x1cd)],_0xd8cccd[_0x3b9341(0x1a3)]),_0x55ec62=profileFor(_0x193b6f[_0x3b9341(0x1cd)],_0x59ea31),_0x3061bf={};_0x3061bf['host']=_0xd8cccd[_0x3b9341(0x1cd)],_0x3061bf['scope']=_0xd8cccd[_0x3b9341(0x1b2)],_0x3061bf[_0x3b9341(0x17c)]=_0xd8cccd['configPath'],_0x3061bf[_0x3b9341(0x1a3)]=_0xd8cccd[_0x3b9341(0x1a3)],_0x3061bf[_0x3b9341(0x1ee)]=_0x59ea31,_0x3061bf[_0x3b9341(0x1c8)]=_0xd8cccd[_0x3b9341(0x1b2)]===_0x3b9341(0x198)?_0xd8cccd[_0x3b9341(0x1c8)]:undefined;if(!matchingReceipt(_0x3061bf,_0x1683d7))fail(_0x3b9341(0x236));if(!_0xd8cccd[_0x3b9341(0x1c8)]){if(Object[_0x3b9341(0x1bb)](_0x55ec62['env']||{})['length']||Object['keys'](_0x55ec62[_0x3b9341(0x1ba)]||{})[_0x3b9341(0x19f)](_0x27b2ce=>![_0x3b9341(0x1b3),_0x3b9341(0x19b)][_0x3b9341(0x225)](_0x27b2ce)||Object[_0x3b9341(0x1bb)](_0x55ec62[_0x3b9341(0x1ba)][_0x27b2ce])[_0x3b9341(0x19f)](_0x5425db=>_0x5425db!==_0x3b9341(0x171))))fail('MIGRATION_NEUTRAL_PROFILE_UNSUPPORTED');continue;}const _0x3fcf88=fs[_0x3b9341(0x1ab)](_0xd8cccd[_0x3b9341(0x1c8)]),_0x30489b=_0x2ec2d9[_0x3b9341(0x212)](_0xb50e16=>_0xb50e16[_0x3b9341(0x1cd)]===_0xd8cccd[_0x3b9341(0x1cd)]&&require(_0x3b9341(0x1f0))[_0x3b9341(0x19e)](_0xb50e16[_0x3b9341(0x1c8)],_0x3fcf88));if(_0x30489b&&JSON[_0x3b9341(0x207)](_0x30489b[_0x3b9341(0x199)])!==JSON['stringify'](_0x55ec62))fail(_0x3b9341(0x229));const _0x23940c={};_0x23940c[_0x3b9341(0x1c8)]=_0x3fcf88,_0x23940c['host']=_0xd8cccd[_0x3b9341(0x1cd)],_0x23940c[_0x3b9341(0x199)]=_0x55ec62;if(!_0x30489b)_0x2ec2d9[_0x3b9341(0x203)](_0x23940c);}const _0x2069b8=replacementFor(_0x193b6f,_0x4e8e62,_0x485cdb,_0x56defd),_0x5d6ef8={..._0x193b6f};_0x5d6ef8[_0x3b9341(0x16a)]=_0x4e8e62,_0x5d6ef8[_0x3b9341(0x19d)]=_0x2069b8,_0x5284d6['push'](_0x5d6ef8);}for(const _0x3d5a30 of _0x56defd[_0x3b9341(0x223)]===![]?[]:_0x56defd[_0x3b9341(0x1bd)]){const _0x2b9496=IDE_REGISTRY[_0x3d5a30]?.[_0x3b9341(0x226)]?.();if(!_0x2b9496)continue;let _0xa6f28e=_0x5284d6[_0x3b9341(0x212)](_0x1ef264=>_0x1ef264[_0x3b9341(0x17c)]===path['resolve'](_0x2b9496));if(!_0xa6f28e){const _0x46c235=read(_0x2b9496);_0xa6f28e={'host':_0x3d5a30,'scope':'global','configPath':path[_0x3b9341(0x1c2)](_0x2b9496),'oldHash':_0x46c235?hash(_0x46c235):null,'original':_0x46c235,'replacement':_0x46c235?.[_0x3b9341(0x1f4)]()||'','aliases':[]},_0x5284d6[_0x3b9341(0x203)](_0xa6f28e);}approvedPath(_0xa6f28e,_0x56defd);const _0x5c87fb=[_0x485cdb['replaceAll']('\x5c','/'),_0x3b9341(0x1e8),_0x3b9341(0x21d),_0x3d5a30];if(IDE_REGISTRY[_0x3d5a30][_0x3b9341(0x1d1)]==='toml')_0xa6f28e[_0x3b9341(0x19d)]=_0xa6f28e['replacement'][_0x3b9341(0x18d)]()+_0x3b9341(0x1e3)+JSON[_0x3b9341(0x207)](_0x5c87fb)+'\x0a';else{const _0x59bfc1={};_0x59bfc1['jsonc']=IDE_REGISTRY[_0x3d5a30][_0x3b9341(0x15e)];const _0x1e3c2e=parseJson(_0xa6f28e[_0x3b9341(0x19d)]||'{}',_0x59bfc1);_0x1e3c2e[IDE_REGISTRY[_0x3d5a30]['topLevelKey']]||={};const _0x939af5={};_0x939af5[_0x3b9341(0x200)]=_0x3b9341(0x239),_0x939af5[_0x3b9341(0x185)]=_0x5c87fb;const _0x18d20c=_0x939af5;if(_0x3d5a30===_0x3b9341(0x1a9))require(_0x3b9341(0x1d8))[_0x3b9341(0x16e)](_0x18d20c);_0x1e3c2e[IDE_REGISTRY[_0x3d5a30][_0x3b9341(0x210)]]['apt-mcp-agent']=_0x18d20c,_0xa6f28e[_0x3b9341(0x19d)]=JSON[_0x3b9341(0x207)](_0x1e3c2e,null,0x2);}}for(const [_0x5543dc,_0x2407a8]of _0x5284d6[_0x3b9341(0x1fe)]()){_0x2407a8[_0x3b9341(0x215)]=hash(_0x2407a8['replacement']);if(_0x2407a8[_0x3b9341(0x16a)])durable(path['join'](_0x4f7c65,_0x5543dc+_0x3b9341(0x17e)),_0x2407a8[_0x3b9341(0x16a)]);durable(path[_0x3b9341(0x19a)](_0x4f7c65,_0x5543dc+_0x3b9341(0x1df)),_0x2407a8[_0x3b9341(0x19d)]),delete _0x2407a8[_0x3b9341(0x16a)],delete _0x2407a8[_0x3b9341(0x19d)];}const _0x20e83d={};_0x20e83d[_0x3b9341(0x22c)]=0x1,_0x20e83d['id']=_0xbe87f8,_0x20e83d['review']=_0x56defd,_0x20e83d[_0x3b9341(0x175)]=_0x5284d6,_0x20e83d[_0x3b9341(0x23a)]=_0x2ec2d9,_0x20e83d[_0x3b9341(0x21a)]=_0x3b9341(0x166),_0x4d403c=_0x20e83d,_0x3161aa('prepared');}validateJournal(_0x4d403c,_0x56defd,_0x4f7c65,_0x485cdb),_0xa50a69=!![];for(const [_0x51f23a,_0x6bc5d9]of _0x4d403c[_0x3b9341(0x175)][_0x3b9341(0x1fe)]()){approvedPath(_0x6bc5d9,_0x56defd),staged(_0x4f7c65,_0x51f23a,_0x3b9341(0x19d),_0x6bc5d9['newHash']);if(_0x6bc5d9[_0x3b9341(0x1d4)])staged(_0x4f7c65,_0x51f23a,'original',_0x6bc5d9[_0x3b9341(0x1d4)]);const _0x1547a3=read(_0x6bc5d9['configPath']),_0x243552=_0x1547a3?hash(_0x1547a3):null;if(![_0x6bc5d9[_0x3b9341(0x1d4)],_0x6bc5d9['newHash']][_0x3b9341(0x225)](_0x243552))fail(_0x3b9341(0x1b1));}for(const _0x52d15c of _0x4d403c[_0x3b9341(0x23a)]){if(!_0x56defd[_0x3b9341(0x16d)]['some'](_0x4c1df8=>require(_0x3b9341(0x1f0))[_0x3b9341(0x19e)](_0x4c1df8,_0x52d15c[_0x3b9341(0x1c8)]))||!_0x56defd[_0x3b9341(0x1bd)]['includes'](_0x52d15c['host']))fail('MIGRATION_JOURNAL_INVALID');const _0x142662=_0x74f365[_0x3b9341(0x16b)]()[_0x3b9341(0x212)](_0x149642=>require(_0x3b9341(0x1f0))['sameWorkspace'](_0x149642[_0x3b9341(0x1c8)],_0x52d15c[_0x3b9341(0x1c8)]));if(_0x142662?.[_0x3b9341(0x23a)]?.[_0x52d15c[_0x3b9341(0x1cd)]]&&!require(_0x3b9341(0x232))[_0x3b9341(0x161)](_0x142662[_0x3b9341(0x23a)][_0x52d15c[_0x3b9341(0x1cd)]],_0x52d15c[_0x3b9341(0x199)]))fail(_0x3b9341(0x229));}for(const _0x47ef29 of _0x4d403c[_0x3b9341(0x23a)]){const _0x2df4ea={..._0x47ef29};_0x2df4ea['provenance']=_0x3b9341(0x1ec),_0x74f365[_0x3b9341(0x165)](_0x2df4ea);}for(const _0x491b0a of _0xfb49fa){const _0x553d70=_0x333ab3[_0x3b9341(0x181)](_0x491b0a[_0x3b9341(0x1c8)]);if(_0x553d70[_0x3b9341(0x17d)]===_0x3b9341(0x211))_0x491b0a[_0x3b9341(0x1cf)]=_0x333ab3[_0x3b9341(0x1e4)](_0x491b0a[_0x3b9341(0x1c8)],_0x553d70[_0x3b9341(0x1f7)],{'transactionId':_0x553d70[_0x3b9341(0x1be)]},_0x1de337=>!Object[_0x3b9341(0x220)](_0x1de337[_0x3b9341(0x1d2)]||{})['some'](_0x22f756=>_0x22f756['state']!==_0x3b9341(0x206))&&require(_0x3b9341(0x178))[_0x3b9341(0x1c1)](_0x491b0a['workspace'],_0x1de337,require(_0x3b9341(0x1d0))['workspaceRunRoots'](_0x491b0a[_0x3b9341(0x1c8)]),{'rebuildCheckpoints':!![],'budgetMs':Number(process.env.APT_RUN_INSPECTION_TIMEOUT_MS||0x1d4c0)})[_0x3b9341(0x1a8)]===0x0);else{if(_0x553d70[_0x3b9341(0x17d)]!=='frozen')fail(_0x3b9341(0x1fc));}}_0x3f00a1=![];for(const _0x554a2f of _0x56defd['records']['filter'](_0x2a932e=>_0x2a932e['workspace'])){const _0x13c3b4=await _0x1683d7[_0x3b9341(0x1fa)]?.(_0x554a2f,_0x5b3cc8(_0x554a2f));if(_0x13c3b4?.[_0x3b9341(0x21a)]!=='verified'||_0x13c3b4['registrationHash']!==_0x554a2f[_0x3b9341(0x1c5)])fail(_0x3b9341(0x197));}const _0x5990d4=[_0x3b9341(0x217),_0x3b9341(0x1b0)][_0x3b9341(0x225)](_0x4d403c[_0x3b9341(0x21a)]);for(const [_0x52ceb7,_0x84edfa]of _0x4d403c['operations'][_0x3b9341(0x1fe)]()){const _0x3e2e2c=read(_0x84edfa[_0x3b9341(0x17c)]),_0x313b88=_0x3e2e2c?hash(_0x3e2e2c):null;_0x313b88!==_0x84edfa['newHash']&&(_0x84edfa['status']=_0x3b9341(0x228),_0x3161aa(_0x5990d4?_0x3b9341(0x217):_0x3b9341(0x1b8)),writeConfigAtomic(_0x84edfa[_0x3b9341(0x17c)],staged(_0x4f7c65,_0x52ceb7,_0x3b9341(0x19d),_0x84edfa[_0x3b9341(0x215)])[_0x3b9341(0x1f4)](),{'expectedHash':_0x84edfa[_0x3b9341(0x1d4)]||hash(Buffer['alloc'](0x0))})),_0x84edfa[_0x3b9341(0x21a)]=_0x3b9341(0x1d5),_0x3161aa(_0x5990d4?'committing':'applying');}_0x3161aa(_0x3b9341(0x217));for(const _0x462ff7 of _0x4d403c[_0x3b9341(0x175)])if((read(_0x462ff7[_0x3b9341(0x17c)])?hash(read(_0x462ff7[_0x3b9341(0x17c)])):null)!==_0x462ff7[_0x3b9341(0x215)])fail('REGISTRATION_CONFIG_CONFLICT');for(const _0x22d8d2 of _0x4d403c[_0x3b9341(0x175)]['filter'](_0x289858=>_0x289858[_0x3b9341(0x1b2)]===_0x3b9341(0x1b6))){if(hash(read(_0x22d8d2[_0x3b9341(0x17c)])||'')!==_0x22d8d2[_0x3b9341(0x215)])fail('REGISTRATION_CONFIG_CONFLICT');const _0x4f846c=configEntry(fs[_0x3b9341(0x1bc)](_0x22d8d2['configPath'],_0x3b9341(0x214)),_0x22d8d2[_0x3b9341(0x1cd)],_0x3b9341(0x18a)),_0x526e61={};_0x526e61['host']=_0x22d8d2['host'],_0x526e61[_0x3b9341(0x1b2)]=_0x3b9341(0x1b6),_0x526e61[_0x3b9341(0x17c)]=_0x22d8d2[_0x3b9341(0x17c)],_0x526e61[_0x3b9341(0x1a3)]=_0x3b9341(0x18a),_0x526e61[_0x3b9341(0x1c8)]=null,_0x526e61[_0x3b9341(0x1ee)]=_0x4f846c,recordRegistration(_0x526e61,_0x1683d7);}for(const _0x2ad5eb of _0x4d403c[_0x3b9341(0x175)][_0x3b9341(0x1ce)](_0x2af387=>_0x2af387[_0x3b9341(0x1b2)]===_0x3b9341(0x198))){const _0x4f195e=configEntry(fs[_0x3b9341(0x1bc)](_0x2ad5eb[_0x3b9341(0x17c)],'utf8'),_0x2ad5eb['host'],_0x3b9341(0x18a));if(!_0x4f195e)fail(_0x3b9341(0x1b1));const _0x51e908={};_0x51e908[_0x3b9341(0x1cd)]=_0x2ad5eb['host'],_0x51e908['scope']=_0x3b9341(0x198),_0x51e908[_0x3b9341(0x17c)]=_0x2ad5eb[_0x3b9341(0x17c)],_0x51e908[_0x3b9341(0x1a3)]=_0x3b9341(0x18a),_0x51e908['workspace']=_0x2ad5eb[_0x3b9341(0x1c8)],_0x51e908[_0x3b9341(0x1ee)]=_0x4f195e,_0x51e908[_0x3b9341(0x21b)]='gateway-migration',_0x51e908[_0x3b9341(0x1f6)]={},_0x51e908[_0x3b9341(0x1f6)][_0x3b9341(0x1ad)]=_0x3b9341(0x1d9),_0x51e908[_0x3b9341(0x1f6)]['workspace']=_0x2ad5eb[_0x3b9341(0x1c8)],recordRegistration(_0x51e908,_0x1683d7);}_0x3161aa('committed'),_0x3f00a1=!![];const _0x1edfd3={};return _0x1edfd3['status']='ready-next-connection',_0x1edfd3[_0x3b9341(0x1be)]=_0xbe87f8,_0x1edfd3[_0x3b9341(0x216)]=_0x4d403c['operations']['length'],_0x1edfd3[_0x3b9341(0x15f)]=_0x4d403c[_0x3b9341(0x23a)][_0x3b9341(0x1a8)],_0x1edfd3[_0x3b9341(0x213)]=![],_0x1edfd3;}catch(_0x126cae){if(_0x4d403c&&_0xa50a69&&![_0x3b9341(0x217),_0x3b9341(0x1b0)][_0x3b9341(0x225)](_0x4d403c['status']))try{for(let _0x489e5e=_0x4d403c[_0x3b9341(0x175)]['length']-0x1;_0x489e5e>=0x0;_0x489e5e--){const _0x138343=_0x4d403c[_0x3b9341(0x175)][_0x489e5e];approvedPath(_0x138343,_0x56defd);const _0x7b83ea=read(_0x138343[_0x3b9341(0x17c)]),_0x38fa64=_0x7b83ea?hash(_0x7b83ea):null;if(_0x38fa64===_0x138343[_0x3b9341(0x1d4)])continue;if(_0x38fa64!==_0x138343['newHash'])fail(_0x3b9341(0x1b1));if(_0x138343[_0x3b9341(0x1d4)])writeConfigAtomic(_0x138343['configPath'],staged(_0x4f7c65,_0x489e5e,_0x3b9341(0x16a),_0x138343[_0x3b9341(0x1d4)])[_0x3b9341(0x1f4)](),{'expectedHash':_0x138343[_0x3b9341(0x215)]});else require(_0x3b9341(0x22e))[_0x3b9341(0x1cb)](_0x138343[_0x3b9341(0x17c)],_0x138343[_0x3b9341(0x215)]);}_0x3161aa('rolled-back'),_0x3f00a1=!![];}catch(_0x2400bd){_0x3f00a1=![],_0x126cae=_0x2400bd;}else{if(_0x4d403c)_0x3f00a1=![];}const _0x406d15={};_0x406d15[_0x3b9341(0x1c3)]=_0x126cae['code']||_0x3b9341(0x204);const _0x1373fa={};return _0x1373fa[_0x3b9341(0x21a)]='failed',_0x1373fa[_0x3b9341(0x1be)]=_0xbe87f8,_0x1373fa[_0x3b9341(0x1c7)]=_0x50d50c,_0x1373fa[_0x3b9341(0x18f)]=_0x3f00a1?'rolled-back':'recovery-required',_0x1373fa[_0x3b9341(0x209)]=[_0x406d15],_0x1373fa;}finally{if(_0x3f00a1)for(const {workspace:_0x5454a4,fence:_0x3bccf4}of _0xfb49fa[_0x3b9341(0x1e6)]()){const _0x42b817=_0x333ab3[_0x3b9341(0x181)](_0x5454a4);if(_0x42b817['transactionId']===_0x3bccf4[_0x3b9341(0x1be)]&&['draining',_0x3b9341(0x1f1)][_0x3b9341(0x225)](_0x42b817[_0x3b9341(0x17d)]))_0x333ab3[_0x3b9341(0x183)](_0x5454a4,_0x42b817[_0x3b9341(0x1f7)],{'state':_0x3b9341(0x1dc),'transactionId':_0x42b817[_0x3b9341(0x1be)]});}_0x51da7c();}}const _0x53af9e={};_0x53af9e['migrationPlan']=migrationPlan,_0x53af9e['applyMigration']=applyMigration,_0x53af9e[_0x2e8fc6(0x1f9)]=profileFor,module[_0x2e8fc6(0x16f)]=_0x53af9e;
1
+ 'use strict';const _0xa5ab4a=_0x641a;(function(_0x8da696,_0x2aade1){const _0x57f710=_0x641a,_0x5a6c35=_0x8da696();while(!![]){try{const _0x19726b=-parseInt(_0x57f710(0x242))/0x1+-parseInt(_0x57f710(0x239))/0x2*(parseInt(_0x57f710(0x22d))/0x3)+-parseInt(_0x57f710(0x240))/0x4+-parseInt(_0x57f710(0x1d6))/0x5+-parseInt(_0x57f710(0x1cc))/0x6*(parseInt(_0x57f710(0x1ad))/0x7)+-parseInt(_0x57f710(0x22e))/0x8*(-parseInt(_0x57f710(0x1da))/0x9)+-parseInt(_0x57f710(0x1d9))/0xa*(-parseInt(_0x57f710(0x259))/0xb);if(_0x19726b===_0x2aade1)break;else _0x5a6c35['push'](_0x5a6c35['shift']());}catch(_0x4cbc3a){_0x5a6c35['push'](_0x5a6c35['shift']());}}}(_0x46e4,0xa3112));const fs=require(_0xa5ab4a(0x1bd)),path=require(_0xa5ab4a(0x232)),os=require('node:os'),crypto=require(_0xa5ab4a(0x27f)),{IDE_REGISTRY}=require(_0xa5ab4a(0x224)),{configEntry}=require('./registration-plan'),{parseJson,writeConfigAtomic}=require('./managed-config'),{matchingReceipt,registeredProjects,entryHash,recordRegistration}=require(_0xa5ab4a(0x22a)),{WorkspaceRegistry}=require(_0xa5ab4a(0x219)),hash=_0x5756f2=>crypto[_0xa5ab4a(0x271)]('sha256')[_0xa5ab4a(0x268)](_0x5756f2)[_0xa5ab4a(0x23c)]('hex'),isApt=_0x322bf9=>_0x322bf9===_0xa5ab4a(0x1b3)||/^apt-mcp-agent-w[a-z0-9]+$/i['test'](_0x322bf9),fail=_0x2a817d=>{const _0x452450=_0xa5ab4a;throw Object[_0x452450(0x1e9)](new Error(_0x2a817d),{'code':_0x2a817d});},rootFor=_0x42db20=>_0x42db20['root']||process.env.APT_MIGRATION_ROOT||path[_0xa5ab4a(0x238)](os['homedir'](),_0xa5ab4a(0x1b7),'apt-runtime',_0xa5ab4a(0x27d)),read=_0x1cc222=>{const _0x49e0f8=_0xa5ab4a;try{return fs[_0x49e0f8(0x20e)](_0x1cc222);}catch(_0x5f4548){if(_0x5f4548[_0x49e0f8(0x206)]===_0x49e0f8(0x1ec))return null;throw _0x5f4548;}};function durable(_0x452ae1,_0x198a38){const _0x2e4c6a=_0xa5ab4a,_0xd6c633={};_0xd6c633[_0x2e4c6a(0x24a)]=!![],fs[_0x2e4c6a(0x1a4)](path[_0x2e4c6a(0x213)](_0x452ae1),_0xd6c633);const _0x501403=_0x452ae1+'.'+crypto[_0x2e4c6a(0x1cb)]()+_0x2e4c6a(0x241),_0x294cf0=fs[_0x2e4c6a(0x265)](_0x501403,'wx',0x180);try{fs[_0x2e4c6a(0x211)](_0x294cf0,_0x198a38),fs[_0x2e4c6a(0x1ba)](_0x294cf0);}finally{fs[_0x2e4c6a(0x248)](_0x294cf0);}try{fs[_0x2e4c6a(0x1c3)](_0x501403,_0x452ae1);}finally{try{fs[_0x2e4c6a(0x225)](_0x501403);}catch{}}}function removeToml(_0x1cdd6d,_0x4f0db8){const _0x5cd6f9=_0xa5ab4a;return _0x1cdd6d[_0x5cd6f9(0x1ed)](/(?=^\[)/m)[_0x5cd6f9(0x230)](_0xab3b70=>{const _0x3659a1=_0x5cd6f9,_0x1ab82e=_0xab3b70[_0x3659a1(0x233)](/^\[mcp_servers\.(?:"([^"]+)"|'([^']+)'|([^\.\]\r\n]+))(?:\.[^\]]+)?\]/)?.[_0x3659a1(0x1d8)](0x1)[_0x3659a1(0x23b)](Boolean);return!_0x4f0db8[_0x3659a1(0x200)](_0x1ab82e);})[_0x5cd6f9(0x238)]('');}function _0x641a(_0x5ab8b1,_0x31a6a8){_0x5ab8b1=_0x5ab8b1-0x19c;const _0x46e46d=_0x46e4();let _0x641a50=_0x46e46d[_0x5ab8b1];if(_0x641a['xZRpZs']===undefined){var _0x46d2d1=function(_0xfb3302){const _0x2914dc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1fe82d='',_0x32a592='';for(let _0x37509c=0x0,_0x4b2278,_0x41a7a1,_0x42354e=0x0;_0x41a7a1=_0xfb3302['charAt'](_0x42354e++);~_0x41a7a1&&(_0x4b2278=_0x37509c%0x4?_0x4b2278*0x40+_0x41a7a1:_0x41a7a1,_0x37509c++%0x4)?_0x1fe82d+=String['fromCharCode'](0xff&_0x4b2278>>(-0x2*_0x37509c&0x6)):0x0){_0x41a7a1=_0x2914dc['indexOf'](_0x41a7a1);}for(let _0x5d16d7=0x0,_0x7bb9db=_0x1fe82d['length'];_0x5d16d7<_0x7bb9db;_0x5d16d7++){_0x32a592+='%'+('00'+_0x1fe82d['charCodeAt'](_0x5d16d7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x32a592);};_0x641a['KBDtzm']=_0x46d2d1,_0x641a['EJUpFD']={},_0x641a['xZRpZs']=!![];}const _0xf954c1=_0x46e46d[0x0],_0x5bef84=_0x5ab8b1+_0xf954c1,_0xe36298=_0x641a['EJUpFD'][_0x5bef84];return!_0xe36298?(_0x641a50=_0x641a['KBDtzm'](_0x641a50),_0x641a['EJUpFD'][_0x5bef84]=_0x641a50):_0x641a50=_0xe36298,_0x641a50;}function profileFor(_0x55642d,_0x307aca){const _0x334dd0=_0xa5ab4a;if(_0x307aca[_0x334dd0(0x1ea)]){if(_0x307aca['toml'][_0x334dd0(0x1ed)](/\r?\n/)[_0x334dd0(0x24d)](_0x29372b=>_0x29372b['trim']()&&!_0x29372b[_0x334dd0(0x24b)]()[_0x334dd0(0x1d2)]('#')&&!/^\[mcp_servers\.[^\]]+\]$|^\s*(command|args)\s*=/['test'](_0x29372b)))fail(_0x334dd0(0x253));const _0x34357e={};return _0x34357e[_0x334dd0(0x252)]={},_0x34357e[_0x334dd0(0x1f1)]={},_0x34357e;}const _0x3f07b3=structuredClone(_0x307aca);require(_0x334dd0(0x224))[_0x334dd0(0x26f)](_0x55642d,_0x3f07b3);if(_0x3f07b3['type']!==undefined){if(_0x3f07b3['type']!==_0x334dd0(0x236))fail(_0x334dd0(0x253));delete _0x3f07b3['type'];}for(const _0x454e25 of Object[_0x334dd0(0x23e)](_0x3f07b3))if(![_0x334dd0(0x1ca),_0x334dd0(0x1b0),_0x334dd0(0x252),_0x334dd0(0x1f1)][_0x334dd0(0x200)](_0x454e25))fail('MIGRATION_PROFILE_UNSUPPORTED');const _0x30ecb7=_0x3f07b3[_0x334dd0(0x252)]||{};if(Array[_0x334dd0(0x227)](_0x30ecb7)||typeof _0x30ecb7!=='object'||Object[_0x334dd0(0x21f)](_0x30ecb7)[_0x334dd0(0x24d)](([_0x2eaea5,_0x3ef1b6])=>typeof _0x3ef1b6!=='string'||/^(APT_|MCP_SKIP_|NODE_OPTIONS$|NODE_PATH$)/i[_0x334dd0(0x234)](_0x2eaea5))||new Set(Object['keys'](_0x30ecb7)[_0x334dd0(0x1b4)](_0x30b0f2=>_0x30b0f2[_0x334dd0(0x215)]()))[_0x334dd0(0x1c8)]!==Object[_0x334dd0(0x23e)](_0x30ecb7)[_0x334dd0(0x205)])fail(_0x334dd0(0x253));const _0x517816=_0x3f07b3['tools']||{};if(Array[_0x334dd0(0x227)](_0x517816)||typeof _0x517816!==_0x334dd0(0x27c)||Object['values'](_0x517816)['some'](_0x3df736=>!_0x3df736||typeof _0x3df736!==_0x334dd0(0x27c)||Array['isArray'](_0x3df736)||Object[_0x334dd0(0x23e)](_0x3df736)[_0x334dd0(0x24d)](_0x432acf=>!['eager','enabled'][_0x334dd0(0x200)](_0x432acf))||Object[_0x334dd0(0x258)](_0x3df736)[_0x334dd0(0x24d)](_0x5aa4cc=>typeof _0x5aa4cc!==_0x334dd0(0x247))))fail('MIGRATION_PROFILE_UNSUPPORTED');const _0x87ff1c={};return _0x87ff1c[_0x334dd0(0x252)]=_0x30ecb7,_0x87ff1c[_0x334dd0(0x1f1)]=_0x517816,_0x87ff1c;}function serverMap(_0x2080ec,_0x495356){const _0x4906c9=_0xa5ab4a,_0x2839d6=IDE_REGISTRY[_0x495356],_0x5e0afe=parseJson(_0x2080ec,{'jsonc':_0x2839d6['jsonc']}),_0x4c6889=_0x5e0afe[_0x2839d6[_0x4906c9(0x1fa)]]||{};if(Array[_0x4906c9(0x227)](_0x4c6889)||typeof _0x4c6889!==_0x4906c9(0x27c))fail('INVALID_CONFIG');if(_0x495356===_0x4906c9(0x226)&&Object[_0x4906c9(0x258)](_0x5e0afe[_0x4906c9(0x24e)]||{})[_0x4906c9(0x24d)](_0xe7c0d8=>Object[_0x4906c9(0x23e)](_0xe7c0d8?.[_0x4906c9(0x1fd)]||{})[_0x4906c9(0x24d)](isApt)))fail(_0x4906c9(0x26c));return _0x4c6889;}const _0x4b2278={};_0x4b2278[_0xa5ab4a(0x25a)]=[];function replacementFor(_0x13cbed,_0x7b4e66,_0x5d70a3,_0x5de61e=_0x4b2278){const _0x261812=_0xa5ab4a,_0x1f973d=IDE_REGISTRY[_0x13cbed[_0x261812(0x1c4)]],_0x5a08a0=_0x7b4e66?.[_0x261812(0x1bb)]()||'',_0x106356=[_0x5d70a3[_0x261812(0x255)]('\x5c','/'),'--gateway',_0x261812(0x1de),_0x13cbed[_0x261812(0x1c4)]];if(_0x13cbed[_0x261812(0x1f9)]===_0x261812(0x1d3)){if(!_0x7b4e66)return _0x5a08a0;if(_0x1f973d[_0x261812(0x1fe)]===_0x261812(0x1ea))return _0x5a08a0;const _0xc108e6={};_0xc108e6[_0x261812(0x263)]=_0x1f973d[_0x261812(0x263)];const _0x2021b5=parseJson(_0x5a08a0,_0xc108e6);_0x2021b5[_0x1f973d['topLevelKey']]||={};const _0xa8e790=_0x5de61e[_0x261812(0x25a)][_0x261812(0x230)](_0x571df9=>_0x571df9[_0x261812(0x25d)]===_0x13cbed[_0x261812(0x25d)]&&_0x571df9[_0x261812(0x1aa)]);for(const _0x5f647d of _0xa8e790){const _0x20aedd=_0x2021b5[_0x1f973d['topLevelKey']][_0x5f647d['alias']];if(!_0x20aedd)continue;delete _0x2021b5[_0x1f973d[_0x261812(0x1fa)]][_0x5f647d['alias']];const _0x4adf36=[_0x5d70a3[_0x261812(0x255)]('\x5c','/'),_0x261812(0x270),_0x13cbed[_0x261812(0x20a)][_0x261812(0x255)]('\x5c','/')],_0x1e8f65={..._0x20aedd};_0x1e8f65['command']=_0x261812(0x1af),_0x1e8f65[_0x261812(0x1b0)]=_0x4adf36,_0x2021b5[_0x1f973d[_0x261812(0x1fa)]][_0x261812(0x1b3)]=_0x1e8f65;}return JSON[_0x261812(0x24f)](_0x2021b5,null,0x2);}if(_0x1f973d[_0x261812(0x1fe)]===_0x261812(0x1ea)){const _0x34aec8=removeToml(_0x5a08a0,_0x13cbed[_0x261812(0x1ce)]);return _0x13cbed[_0x261812(0x1f9)]===_0x261812(0x19f)?_0x34aec8[_0x261812(0x1cd)]()+'\x0a\x0a[mcp_servers.apt-mcp-agent]\x0acommand\x20=\x20\x22node\x22\x0aargs\x20=\x20'+JSON[_0x261812(0x24f)](_0x106356)+'\x0a':_0x34aec8;}serverMap(_0x5a08a0||'{}',_0x13cbed[_0x261812(0x1c4)]);const _0x5cd2bd={};_0x5cd2bd['jsonc']=_0x1f973d[_0x261812(0x263)];const _0x3c08c6=parseJson(_0x5a08a0||'{}',_0x5cd2bd);_0x3c08c6[_0x1f973d['topLevelKey']]||={};for(const _0x321ea9 of _0x13cbed['aliases'])delete _0x3c08c6[_0x1f973d['topLevelKey']][_0x321ea9];if(_0x13cbed[_0x261812(0x1f9)]===_0x261812(0x19f)){const _0xdc410c={};_0xdc410c[_0x261812(0x1ca)]=_0x261812(0x1af),_0xdc410c[_0x261812(0x1b0)]=_0x106356;const _0x461d53=_0xdc410c;if(_0x13cbed[_0x261812(0x1c4)]===_0x261812(0x1f0))require('./platform-config')[_0x261812(0x1f5)](_0x461d53);_0x3c08c6[_0x1f973d[_0x261812(0x1fa)]][_0x261812(0x1b3)]=_0x461d53;}return JSON[_0x261812(0x24f)](_0x3c08c6,null,0x2);}function validateJournal(_0x1a5bb8,_0x49409c,_0x4b1057,_0x4a327b){const _0x5b96d6=_0xa5ab4a;if(![_0x5b96d6(0x19c),_0x5b96d6(0x19e),_0x5b96d6(0x220),_0x5b96d6(0x203),_0x5b96d6(0x1c0)][_0x5b96d6(0x200)](_0x1a5bb8[_0x5b96d6(0x26d)])||_0x1a5bb8[_0x5b96d6(0x231)][_0x5b96d6(0x205)]!==_0x49409c[_0x5b96d6(0x261)][_0x5b96d6(0x205)])fail(_0x5b96d6(0x1e6));const _0x174cda=[];for(const [_0x4d6a23,_0x1c3c95]of _0x49409c['configs'][_0x5b96d6(0x21f)]()){const _0x182d81=_0x1a5bb8[_0x5b96d6(0x231)][_0x4d6a23];for(const _0x5e8b99 of['host',_0x5b96d6(0x1f9),_0x5b96d6(0x25d),_0x5b96d6(0x25c),_0x5b96d6(0x1ce)])if(!require(_0x5b96d6(0x254))[_0x5b96d6(0x1f4)](_0x182d81[_0x5e8b99],_0x1c3c95[_0x5e8b99]))fail(_0x5b96d6(0x1e6));approvedPath(_0x1c3c95,_0x49409c);const _0x2f3156=_0x1c3c95[_0x5b96d6(0x25c)]?staged(_0x4b1057,_0x4d6a23,_0x5b96d6(0x207),_0x1c3c95[_0x5b96d6(0x25c)]):null,_0x576f10=replacementFor(_0x1c3c95,_0x2f3156,_0x4a327b,_0x49409c);if(hash(_0x576f10)!==_0x182d81[_0x5b96d6(0x266)])fail(_0x5b96d6(0x1e6));staged(_0x4b1057,_0x4d6a23,_0x5b96d6(0x228),_0x182d81[_0x5b96d6(0x266)]);for(const _0x2d68f0 of _0x49409c[_0x5b96d6(0x25a)]['filter'](_0x2c0787=>_0x2c0787[_0x5b96d6(0x25d)]===_0x1c3c95[_0x5b96d6(0x25d)])){if(!_0x1c3c95[_0x5b96d6(0x1ce)][_0x5b96d6(0x200)](_0x2d68f0[_0x5b96d6(0x251)])||_0x2d68f0['host']!==_0x1c3c95[_0x5b96d6(0x1c4)]||_0x2d68f0[_0x5b96d6(0x1f9)]!==_0x1c3c95['scope']||_0x2d68f0['ownership']!==_0x5b96d6(0x1a5))fail(_0x5b96d6(0x1e6));const _0x5aa94e=configEntry(_0x2f3156?.[_0x5b96d6(0x1bb)]()||'',_0x1c3c95['host'],_0x2d68f0[_0x5b96d6(0x251)]);if(!_0x5aa94e||entryHash(_0x5aa94e)!==_0x2d68f0[_0x5b96d6(0x1c5)])fail('MIGRATION_JOURNAL_INVALID');const _0x3793a1=profileFor(_0x1c3c95[_0x5b96d6(0x1c4)],_0x5aa94e);if(!_0x2d68f0[_0x5b96d6(0x20a)]){if(Object[_0x5b96d6(0x23e)](_0x3793a1[_0x5b96d6(0x252)]||{})[_0x5b96d6(0x205)]||Object[_0x5b96d6(0x23e)](_0x3793a1[_0x5b96d6(0x1f1)]||{})['some'](_0x3cec3c=>![_0x5b96d6(0x1b1),_0x5b96d6(0x276)][_0x5b96d6(0x200)](_0x3cec3c)||Object[_0x5b96d6(0x23e)](_0x3793a1[_0x5b96d6(0x1f1)][_0x3cec3c])[_0x5b96d6(0x24d)](_0xc3d346=>_0xc3d346!==_0x5b96d6(0x21d))))fail(_0x5b96d6(0x218));continue;}const _0x489588=fs[_0x5b96d6(0x1b9)](_0x2d68f0['workspace']);if(!_0x49409c[_0x5b96d6(0x24e)]['some'](_0x51a890=>require('../core/workspace-path')[_0x5b96d6(0x272)](_0x51a890,_0x489588)))fail(_0x5b96d6(0x1e6));const _0x36167b=_0x174cda['find'](_0x49ee6a=>_0x49ee6a['host']===_0x2d68f0['host']&&require('../core/workspace-path')[_0x5b96d6(0x272)](_0x49ee6a[_0x5b96d6(0x20a)],_0x489588));if(_0x36167b&&!require(_0x5b96d6(0x254))['isDeepStrictEqual'](_0x36167b['profile'],_0x3793a1))fail(_0x5b96d6(0x1b5));const _0xbd9d53={};_0xbd9d53[_0x5b96d6(0x20a)]=_0x489588,_0xbd9d53['host']=_0x2d68f0[_0x5b96d6(0x1c4)],_0xbd9d53[_0x5b96d6(0x20b)]=_0x3793a1;if(!_0x36167b)_0x174cda[_0x5b96d6(0x201)](_0xbd9d53);}}if(!require('node:util')[_0x5b96d6(0x1f4)](_0x174cda,_0x1a5bb8['profiles']))fail(_0x5b96d6(0x1e6));}function migrationPlan(_0x45ad40={}){const _0x371d82=_0xa5ab4a,_0x1dfbbd=Array[_0x371d82(0x227)](_0x45ad40[_0x371d82(0x21b)])&&_0x45ad40['projectPaths']['length']>0x0,_0x45481a=_0x1dfbbd&&_0x45ad40['includeRegisteredProjects']!==!![]?_0x45ad40[_0x371d82(0x21b)]:[..._0x45ad40[_0x371d82(0x21b)]||[],...registeredProjects(_0x45ad40)],_0x1bf1f0=[...new Set(_0x45481a)][_0x371d82(0x230)](_0x30254a=>fs['existsSync'](_0x30254a))[_0x371d82(0x1b4)](_0x4f05bd=>fs['realpathSync'](_0x4f05bd)),_0x5d7080=[],_0x57595f=[],_0x54128b=[];for(const _0x4e8aaa of _0x45ad40[_0x371d82(0x22f)]||Object[_0x371d82(0x23e)](IDE_REGISTRY)){const _0x238d8b=IDE_REGISTRY[_0x4e8aaa];if(!_0x238d8b)fail('UNSUPPORTED_HOST');const _0x16ca28=[..._0x45ad40[_0x371d82(0x24c)]===![]?[]:[{'scope':_0x371d82(0x19f),'file':_0x238d8b[_0x371d82(0x21a)]?.(),'workspace':null}],..._0x1bf1f0[_0x371d82(0x1b4)](_0x5c9c6e=>({'scope':_0x371d82(0x1d3),'file':_0x238d8b['projectConfig']?.(_0x5c9c6e),'workspace':_0x5c9c6e}))],_0x5db9fa=new Set();for(const _0x592f58 of _0x16ca28){if(!_0x592f58[_0x371d82(0x1c6)]||_0x5db9fa[_0x371d82(0x274)](path['resolve'](_0x592f58[_0x371d82(0x1c6)])))continue;_0x5db9fa['add'](path[_0x371d82(0x250)](_0x592f58['file']));const _0x58eac8=path[_0x371d82(0x250)](_0x592f58['file']),_0x26777d=read(_0x58eac8);if(!_0x26777d&&_0x592f58['scope']!==_0x371d82(0x19f))continue;let _0x1465d4;try{_0x1465d4=_0x238d8b['format']===_0x371d82(0x1ea)?[...(_0x26777d?.[_0x371d82(0x1bb)]()||'')[_0x371d82(0x1ff)](/^\[mcp_servers\.(?:"([^"]+)"|'([^']+)'|([^\.\]\r\n]+))(?:\.[^\]]+)?\]/gm)][_0x371d82(0x1b4)](_0x155697=>_0x155697['slice'](0x1)[_0x371d82(0x23b)](Boolean))[_0x371d82(0x230)](isApt):Object[_0x371d82(0x23e)](serverMap(_0x26777d?.[_0x371d82(0x1bb)]()||'{}',_0x4e8aaa))['filter'](isApt);}catch(_0x596493){const _0x486c0d={};_0x486c0d[_0x371d82(0x206)]=_0x596493['code']||_0x371d82(0x202),_0x486c0d[_0x371d82(0x1c4)]=_0x4e8aaa,_0x486c0d[_0x371d82(0x25d)]=_0x58eac8,_0x54128b[_0x371d82(0x201)](_0x486c0d);continue;}_0x1465d4=[...new Set(_0x1465d4)];if(!_0x1465d4[_0x371d82(0x205)]&&_0x592f58[_0x371d82(0x1f9)]!==_0x371d82(0x19f))continue;const _0x506b10={'host':_0x4e8aaa,'scope':_0x592f58[_0x371d82(0x1f9)],'workspace':_0x592f58[_0x371d82(0x20a)]||null,'configPath':_0x58eac8,'oldHash':_0x26777d?hash(_0x26777d):null,'aliases':_0x1465d4};_0x5d7080[_0x371d82(0x201)](_0x506b10);for(const _0x256d0b of _0x1465d4){const _0x11f20d=configEntry(_0x26777d[_0x371d82(0x1bb)](),_0x4e8aaa,_0x256d0b),_0x1d19eb={};_0x1d19eb[_0x371d82(0x1c4)]=_0x4e8aaa,_0x1d19eb['scope']=_0x592f58['scope'],_0x1d19eb[_0x371d82(0x25d)]=_0x58eac8,_0x1d19eb['alias']=_0x256d0b,_0x1d19eb['entry']=_0x11f20d,_0x1d19eb[_0x371d82(0x20a)]=_0x592f58[_0x371d82(0x1f9)]===_0x371d82(0x1d3)?_0x592f58[_0x371d82(0x20a)]:undefined;const _0x23c75a=matchingReceipt(_0x1d19eb,_0x45ad40),_0x29577e=_0x592f58[_0x371d82(0x1f9)]==='project'&&_0x45ad40[_0x371d82(0x26a)]&&_0x11f20d?.['command']===_0x371d82(0x1af)&&Array[_0x371d82(0x227)](_0x11f20d['args'])&&_0x11f20d[_0x371d82(0x1b0)][_0x371d82(0x205)]===0x3&&_0x11f20d[_0x371d82(0x1b0)][0x0]&&path[_0x371d82(0x250)](_0x11f20d['args'][0x0])===path['resolve'](_0x45ad40['launcher'])&&_0x11f20d['args'][0x1]===_0x371d82(0x270)&&((()=>{const _0x11956b=_0x371d82;try{return sameWorkspace(_0x11f20d['args'][0x2],_0x592f58[_0x11956b(0x20a)]);}catch{return![];}})()),_0x1e4eae=!_0x29577e,_0x438a7b={'host':_0x4e8aaa,'scope':_0x592f58['scope'],'configPath':_0x58eac8,'alias':_0x256d0b,'entryHash':entryHash(_0x11f20d),'ownership':_0x23c75a?_0x371d82(0x1a5):_0x29577e?'adoptable':_0x371d82(0x1bf),'workspace':_0x23c75a?.[_0x371d82(0x20a)]||_0x592f58[_0x371d82(0x20a)],'rewriteRequired':_0x1e4eae};_0x57595f[_0x371d82(0x201)](_0x438a7b);const _0x5e9c25={};_0x5e9c25['code']=_0x371d82(0x1d7),_0x5e9c25[_0x371d82(0x1c4)]=_0x4e8aaa,_0x5e9c25[_0x371d82(0x25d)]=_0x58eac8,_0x5e9c25[_0x371d82(0x251)]=_0x256d0b;if(!_0x23c75a&&_0x1e4eae)_0x54128b[_0x371d82(0x201)](_0x5e9c25);else{if(!_0x438a7b[_0x371d82(0x20a)]&&!(_0x256d0b===_0x371d82(0x1b3)&&(_0x11f20d[_0x371d82(0x1b0)]||[])['includes']('--gateway')||_0x11f20d['toml']?.[_0x371d82(0x200)](_0x371d82(0x243))))_0x54128b[_0x371d82(0x201)]({'code':_0x371d82(0x26b),'host':_0x4e8aaa,'configPath':_0x58eac8,'alias':_0x256d0b});}try{profileFor(_0x4e8aaa,_0x11f20d);}catch(_0x1158a1){const _0x1e03bc={};_0x1e03bc[_0x371d82(0x206)]=_0x1158a1[_0x371d82(0x206)],_0x1e03bc['host']=_0x4e8aaa,_0x1e03bc[_0x371d82(0x25d)]=_0x58eac8,_0x1e03bc[_0x371d82(0x251)]=_0x256d0b,_0x54128b[_0x371d82(0x201)](_0x1e03bc);}}}}const _0x153127=_0x57595f['some'](_0x2a3630=>_0x2a3630[_0x371d82(0x1aa)]);return{'version':0x1,'kind':_0x371d82(0x257),'projects':_0x1bf1f0,'hosts':_0x45ad40[_0x371d82(0x22f)]||Object[_0x371d82(0x23e)](IDE_REGISTRY),'includeGlobal':_0x45ad40[_0x371d82(0x24c)]!==![],'includeRegisteredProjects':_0x45ad40[_0x371d82(0x1e3)]===!![],'launcher':_0x45ad40[_0x371d82(0x26a)]||null,'configs':_0x5d7080,'records':_0x57595f,'operationsRequired':_0x153127,'blockers':_0x54128b,'status':_0x54128b['length']?_0x371d82(0x25e):_0x371d82(0x1db),'requirements':[_0x371d82(0x245),'No\x20admitted\x20worker\x20or\x20operation','Legacy\x20connections\x20reconnected\x20or\x20closed']};}function approvedPath(_0x1dcc2b,_0x3959c8){const _0x9dde31=_0xa5ab4a,_0x47ed80=IDE_REGISTRY[_0x1dcc2b['host']];if(!_0x47ed80||!['global','project'][_0x9dde31(0x200)](_0x1dcc2b[_0x9dde31(0x1f9)]))fail('MIGRATION_PATH_ESCAPE');const _0x4141c6=_0x1dcc2b[_0x9dde31(0x1f9)]==='global'?[_0x47ed80[_0x9dde31(0x21a)]?.()]:_0x3959c8['projects'][_0x9dde31(0x1b4)](_0x320638=>_0x47ed80['projectConfig']?.(_0x320638)),_0x3295fd=_0x44a81a=>process[_0x9dde31(0x1e4)]===_0x9dde31(0x27e)?path[_0x9dde31(0x250)](_0x44a81a)[_0x9dde31(0x20c)]():path[_0x9dde31(0x250)](_0x44a81a);if(!_0x4141c6['filter'](Boolean)[_0x9dde31(0x24d)](_0x4bdbc6=>_0x3295fd(_0x4bdbc6)===_0x3295fd(_0x1dcc2b[_0x9dde31(0x25d)])))fail(_0x9dde31(0x275));let _0x28e480=_0x1dcc2b[_0x9dde31(0x25d)];while(!fs[_0x9dde31(0x1a1)](_0x28e480)&&path['dirname'](_0x28e480)!==_0x28e480)_0x28e480=path[_0x9dde31(0x213)](_0x28e480);if(_0x3295fd(_0x28e480)!==_0x3295fd(fs['realpathSync'](_0x28e480))||fs[_0x9dde31(0x1a1)](_0x1dcc2b[_0x9dde31(0x25d)])&&(!fs[_0x9dde31(0x1d1)](_0x1dcc2b[_0x9dde31(0x25d)])[_0x9dde31(0x1d0)]()||fs[_0x9dde31(0x1d1)](_0x1dcc2b['configPath'])[_0x9dde31(0x1e5)]()))fail(_0x9dde31(0x275));}function staged(_0x27a75f,_0x1b2822,_0x5d23a1,_0x18c12c){const _0x2a9022=_0xa5ab4a,_0x114c25=path[_0x2a9022(0x238)](_0x27a75f,_0x1b2822+'.'+_0x5d23a1);if(!fs[_0x2a9022(0x1d1)](_0x114c25)[_0x2a9022(0x1d0)]()||fs[_0x2a9022(0x1d1)](_0x114c25)[_0x2a9022(0x1e5)]()||!require(_0x2a9022(0x1a7))[_0x2a9022(0x21e)](_0x27a75f,fs['realpathSync'](_0x114c25)))fail(_0x2a9022(0x1c2));const _0x1d191d=fs[_0x2a9022(0x20e)](_0x114c25);if(hash(_0x1d191d)!==_0x18c12c)fail(_0x2a9022(0x1c2));return _0x1d191d;}function _0x46e4(){const _0x3bb505=['zgLYBMfTzq','BwLNCMf0Aw9UlMXVy2S','Dg9vChbLCKnHC2u','tuLhuKfusu9ox1bmqu5Fsu5wquXjra','tuLhuKfusu9ox1bmqu5Fq0HbtKDfra','tuLhuKfusu9ox05fvvrsquXFufjprKLmrv9vtLnvufbpuLrfra','lI93B3jRC3bHy2uTCMvNAxn0CNK','z2XVyMfSq29UzMLN','ChjVAMvJDfbHDgHZ','lNjLCgXHy2vTzw50','zwfNzxi','y29UDgfPBNnxB3jRC3bHy2u','zw50CMLLCW','y29TBwL0DgLUzW','zMLUzeLUzgv4','DMvYAwzPzwq','DxbKyxrLzef0','lI9WBgf0zM9YBs1JB25MAwC','Dw5SAw5Ru3LUyW','y2XHDwrL','AxnbCNjHEq','CMvWBgfJzw1LBNq','ChjVzMLSzuzVCG','lI9YzwDPC3rYyxrPB24TCMvJzwLWDa','BgLZDa','CMvJB3zLCNK','odK1ndq5AhfKzvHA','mtaYotm1mNHNBLDAuW','Ag9ZDhm','zMLSDgvY','B3bLCMf0Aw9UCW','BM9KztPWyxrO','Bwf0y2G','DgvZDa','CMvHzezLBMnL','C3rKAw8','tuLhuKfusu9ox0Lox1bst0Dsrvnt','AM9PBG','nKnMq0zQua','CgvUzgLUzY1ZywzLlwjVDw5Kyxj5','zMLUza','zgLNzxn0','BgLZDfDVCMTZCgfJzvjLy2vPChrZ','A2v5CW','lI9JB25Uzwn0Aw9UlwfJDgL2yxrPB24','ndG4mdC4oe1SrMPMqq','lNrTCa','nJGZmdCXsNbvwe1s','iI0Tz2f0zxDHEsi','AM91CM5HBc5QC29U','twf0y2HPBMCGB3DUzxjZAgLWihjLy2vPChrZ','yxb0lxj1BNrPBwu','yM9VBgvHBG','y2XVC2vtEw5J','uKvhsvnuuKfusu9ox0nptKzjr19dt05gteLdva','CMvJDxjZAxzL','DhjPBq','Aw5JBhvKzuDSB2jHBa','C29Tzq','ChjVAMvJDhm','C3rYAw5NAwz5','CMvZB2X2zq','ywXPyxm','zw52','tuLhuKfusu9ox1bst0zjtevFvu5tvvbqt1juruq','BM9KztP1DgLS','CMvWBgfJzufSBa','t1DorvjtseLqx0Lox0zmsuDiva','C2LUz2XLlwDHDgv3yxK','DMfSDwvZ','mZyYoti0mZjlAxHjC0i','CMvJB3jKCW','D29YA3nWywnLuNvUuM9VDhm','B2XKsgfZAa','y29UzMLNugf0Aa','yMXVy2TLza','Ag9TzwrPCG','BgvNywn5lw93BMvYC2HPCc11BNzLCMLMAwvK','y29UzMLNCW','y2HHBMDLrMvUy2u','ANnVBMm','B3bLBG','B3bLBLn5BMm','BMv3sgfZAa','zxbVy2G','DxbKyxrL','BwvTyMvYCW','Bgf1BMnOzxi','v09ss1nqqunfx0jjtKrjtKDFuKvrvuLsruq','tunqx05fu1rfrf9sruDju1rsqvrjt05Fvu5tvvbqt1juruq','C3rHDhvZ','ywrVChrLza','BwLNCMf0zuDLBMvYyxrLzezPzwXKCW','ls1WyxrO','y3jLyxrLsgfZAa','C2fTzvDVCMTZCgfJzq','CMvHzhKTBMv4Dc1JB25Uzwn0Aw9U','AgfZ','tuLhuKfusu9ox1bbveHFrvndqvbf','Bw9KzwXFBgLZDa','qvbux1vqrefurv9qru5esu5h','B3bLCMf0Aw9UC1jLCxvPCMvK','y2fUB25Py2fSlxbYB2PLy3qTBgf1BMnOzxi','AM91CM5HBa','ChjVDMvUyw5Jzq','B2jQzwn0','CMvNAxn0CMf0Aw9Ulw1Pz3jHDgLVBNm','D2LUmZi','BM9KztPJCNLWDg8','ChjLCgfYzwq','ChjVzMLSzxm','yxbWBhLPBMC','z2XVyMfS','lI4Vy29Yzs9VD25Lzc1SB2nR','zxHPC3rZu3LUyW','lI4Vy29Yzs9YDw50Aw1Llw93BMvYC2HPCa','DMvYAwz5q2XVC3vYzq','BwTKAxjtEw5J','CMvJzwLWDc1JB25MAxjTzwq','DMvYC2LVBG','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','zw5YB2XS','zw50CNK','CMv3CML0zvjLCxvPCMvK','BwLNCMf0Aw9UugXHBG','lM9YAwDPBMfS','mJGYmZHzyNrYzeO','tevhqunzx0nmt1nvuKvFvu5wrvjjrKLfra','BM9Kzq','yxjNCW','C2vZC2LVBL9IB290C3rYyxa','yxbWBgLLza','yxb0lw1JCc1Hz2vUDa','BwfW','tuLhuKfusu9ox1bst0zjtevFq09orKXjq1q','y29UzMLNC0nOyw5Nzwq','lMfUAgrO','A2LUza','CMvHBhbHDgHtEw5J','zNn5BMntEw5J','Dg9tDhjPBMC','zMvUy2u','BM9KztPMCW','yxbWBhKTAw50zw50','Dw5RBM93BG','CM9SBgvKlwjHy2S','ChjVB2y','tuLhuKfusu9ox1nuquDfx0nptKzmsunu','CMvUyw1Lu3LUyW','Ag9ZDa','zw50CNLiyxnO','zMLSzq','CMv2zxjZzq','C2L6zq','DhjHBNnHy3rPB25jza','y29TBwfUza','CMfUzg9Tvvvjra','ntrtC21Pr3q','DhjPBuvUza','ywXPyxnLCW','CMvTB3zLq29UzMLNqxrVBwLJ','AxngAwXL','Bhn0yxrtEw5J','C3rHCNrZv2L0Aa','ChjVAMvJDa','D29YA3nWywnLt3DUzxjZAgLW','CMvJB25Uzwn0lxjLCxvPCMvK','mZq4nti1mgr4v0nADa','uKvhsvnuuKfusu9ox09xtKvsu0Hjuf9srvfvsvjfra','C2XPy2u','mtbArfzvtxq','nJnoqxjhs1u','CMv2Awv3lxjLCxvPCMvK','zNjLzxPLrMvUy2u','q09otKvdveLptL9pv05fuLnisvbFuKvrvuLsruq','ls1OB3n0','ChjVAMvJDhnfBNjVBgXLza','CgfYC2u','yMXVy2TLzc1WCM9Qzwn0lxn5BMm','CMvNAxn0CNK','Aw5JBhvKzvjLz2LZDgvYzwrqCM9Qzwn0CW','CgXHDgzVCM0','AxntEw1IB2XPy0XPBMS','tuLhuKfusu9ox0PpvvjoquXFsu5wquXjra','Bgf1BMnOzxiUANm','tuLhuKfusu9ox0zbsuXfra','yxnZAwDU','Dg9TBa','CMv2Awv3','ru5pru5u','C3bSAxq','BwLNCMf0Aw9Ulq','lI4Vy29Yzs9YDw4Ty29TCgf0AwjPBgL0Eq','yw50AwDYyxzPDhK','Dg9VBhm','zMfPBgvK','C3rHDgu','AxnezwvWu3rYAwn0rxf1ywW','y29UzMLNDxjLqw50AwDYyxzPDhLeAxnJB3zLCNK','lI4Vy29Yzs9Hzg1PC3nPB24TzMvUy2u','y2XVC2vK','DxrMoa','C2nVCgu','Dg9Wtgv2zwXlzxK','Dg9ju09tDhjPBMC','z2f0zxDHEs1TAwDYyxrPB24','BwnWu2vYDMvYCW','zM9YBwf0','Bwf0y2HbBgW','Aw5JBhvKzxm','ChvZAa','su5wquXjrf9dt05gsuC','y29TBwL0DgvK','CMvJB3zLCNKTCMvXDwLYzwq','BgvUz3rO','y29Kzq','B3jPz2LUywW','yMXVy2TLCNm','r0furvDbwv9mqvvoq0HfuL9srvfvsvjfra','D29YA3nWywnL','ChjVzMLSzq','Dg9mB3DLCKnHC2u','qurnsvntsu9ox0nptKzmsunu','CMvHzezPBgvtEw5J','yxbWBhLnAwDYyxrPB24','zNjVEMvU','D3jPDgvgAwXLu3LUyW','CMvNAxn0CMf0Aw9UsgfZAa'];_0x46e4=function(){return _0x3bb505;};return _0x46e4();}async function applyMigration(_0x2837a6,_0x4c0d3b={}){const _0x51f307=_0xa5ab4a;if(_0x2837a6?.[_0x51f307(0x1a6)]!==0x1||_0x2837a6['kind']!==_0x51f307(0x257)||!Array[_0x51f307(0x227)](_0x2837a6['hosts'])||!Array[_0x51f307(0x227)](_0x2837a6[_0x51f307(0x24e)])||!Array[_0x51f307(0x227)](_0x2837a6[_0x51f307(0x261)])||!Array[_0x51f307(0x227)](_0x2837a6[_0x51f307(0x25a)]))fail(_0x51f307(0x216));const _0x1d3571=hash(JSON[_0x51f307(0x24f)](_0x2837a6)),_0x1c0c11=rootFor(_0x4c0d3b),_0x32482b=path[_0x51f307(0x238)](_0x1c0c11,_0x1d3571),_0x264c6c=path['join'](_0x32482b,_0x51f307(0x244)),_0x33ee64=_0x4c0d3b[_0x51f307(0x1e2)]||new WorkspaceRegistry(),_0x1083e1=_0x4c0d3b[_0x51f307(0x26a)]||path[_0x51f307(0x238)](os[_0x51f307(0x25f)](),_0x51f307(0x1b7),_0x51f307(0x246),_0x51f307(0x1e7));let _0x417f2f;try{if(fs[_0x51f307(0x1d1)](_0x264c6c)['isSymbolicLink']())fail(_0x51f307(0x275));_0x417f2f=JSON[_0x51f307(0x1e0)](fs[_0x51f307(0x20e)](_0x264c6c));if(_0x417f2f['version']!==0x1||_0x417f2f['id']!==_0x1d3571||hash(JSON[_0x51f307(0x24f)](_0x417f2f['review']))!==_0x1d3571||!Array[_0x51f307(0x227)](_0x417f2f['operations'])||!Array[_0x51f307(0x227)](_0x417f2f[_0x51f307(0x19d)]))fail(_0x51f307(0x1e6));}catch(_0x297f9b){if(_0x297f9b[_0x51f307(0x206)]!=='ENOENT')throw _0x297f9b;}if(!_0x417f2f||_0x417f2f[_0x51f307(0x26d)]==='rolled-back'){const _0x4c8148={..._0x4c0d3b};_0x4c8148[_0x51f307(0x21b)]=_0x2837a6[_0x51f307(0x24e)],_0x4c8148['hosts']=_0x2837a6[_0x51f307(0x22f)],_0x4c8148[_0x51f307(0x24c)]=_0x2837a6['includeGlobal'],_0x4c8148[_0x51f307(0x1e3)]=_0x2837a6[_0x51f307(0x1e3)],_0x4c8148[_0x51f307(0x26a)]=_0x2837a6[_0x51f307(0x26a)]||_0x1083e1;const _0x35a1d2=migrationPlan(_0x4c8148);if(hash(JSON[_0x51f307(0x24f)](_0x35a1d2))!==_0x1d3571)fail(_0x51f307(0x217));if(_0x35a1d2[_0x51f307(0x208)][_0x51f307(0x205)])return{'status':_0x51f307(0x1e1),'blockers':_0x35a1d2[_0x51f307(0x208)]};_0x417f2f=null;}if(!path['isAbsolute'](_0x1083e1)||!fs['existsSync'](_0x1083e1))fail(_0x51f307(0x209));const _0x547103={};_0x547103[_0x51f307(0x24a)]=!![],fs[_0x51f307(0x1a4)](_0x1c0c11,_0x547103);if(fs['realpathSync'](_0x1c0c11)!==path['resolve'](_0x1c0c11))fail('MIGRATION_PATH_ESCAPE');const _0x5a1107=require(_0x51f307(0x1a0))['acquireRuntimeLock'](path['join'](_0x1c0c11,_0x51f307(0x214))),_0x410786={};_0x410786[_0x51f307(0x206)]=_0x51f307(0x237);const _0x360a68={};_0x360a68[_0x51f307(0x26d)]='pending-safe-boundary',_0x360a68[_0x51f307(0x208)]=[_0x410786];if(!_0x5a1107)return _0x360a68;const _0x3112ca=require(_0x51f307(0x1f6)),_0x3abe80=[];let _0x14f321=!_0x417f2f,_0x46fa48=![];const _0x288e4e=_0x9c7909=>{const _0x3fe5b6=_0x51f307;_0x417f2f[_0x3fe5b6(0x26d)]=_0x9c7909,_0x417f2f[_0x3fe5b6(0x223)]=new Date()[_0x3fe5b6(0x1fb)](),durable(_0x264c6c,JSON['stringify'](_0x417f2f));},_0x5f177d=_0x3baa14=>{const _0x8e026e=_0x51f307;if(!_0x417f2f)return _0x4c0d3b;validateJournal(_0x417f2f,_0x2837a6,_0x32482b,_0x1083e1);const _0x496393=_0x417f2f['operations'][_0x8e026e(0x221)](_0x247e95=>_0x247e95[_0x8e026e(0x25d)]===_0x3baa14[_0x8e026e(0x25d)]);if(_0x496393<0x0)fail('MIGRATION_JOURNAL_INVALID');const _0x4bc5d8=_0x417f2f['operations'][_0x496393],_0x3b7cdc=read(_0x4bc5d8['configPath']),_0x4b6854=_0x3b7cdc?hash(_0x3b7cdc):null;if(![_0x4bc5d8[_0x8e026e(0x25c)],_0x4bc5d8[_0x8e026e(0x266)]][_0x8e026e(0x200)](_0x4b6854))fail(_0x8e026e(0x249));return{..._0x4c0d3b,'originalConfig':staged(_0x32482b,_0x496393,'original',_0x4bc5d8['oldHash'])[_0x8e026e(0x1bb)]()};};try{if(_0x2837a6[_0x51f307(0x278)]===![]){const _0x243ba6={};return _0x243ba6[_0x51f307(0x26d)]=_0x51f307(0x273),_0x243ba6[_0x51f307(0x1c9)]=_0x1d3571,_0x243ba6[_0x51f307(0x1b6)]=0x0,_0x243ba6[_0x51f307(0x1df)]=0x0,_0x243ba6['servingConfirmed']=![],_0x243ba6[_0x51f307(0x26e)]=!![],_0x243ba6;}for(const _0x57b925 of _0x2837a6[_0x51f307(0x24e)]){const _0x3602c2=_0x3112ca[_0x51f307(0x235)](_0x57b925),_0x17200a=_0x51f307(0x1ee)+_0x1d3571,_0x5e9906={};_0x5e9906['code']=_0x51f307(0x277),_0x5e9906['workspace']=_0x57b925;const _0x57c64b={};_0x57c64b[_0x51f307(0x26d)]='pending-safe-boundary',_0x57c64b['blockers']=[_0x5e9906];if(_0x3602c2['state']!=='open'&&_0x3602c2[_0x51f307(0x1c9)]!==_0x17200a)return _0x57c64b;const _0x1fc779={};_0x1fc779[_0x51f307(0x1f3)]='draining',_0x1fc779[_0x51f307(0x1c9)]=_0x17200a;const _0x5021df=_0x3602c2[_0x51f307(0x1f3)]===_0x51f307(0x264)?_0x3112ca[_0x51f307(0x262)](_0x57b925,_0x3602c2[_0x51f307(0x267)],_0x1fc779):_0x3602c2,_0x3be775={};_0x3be775[_0x51f307(0x20a)]=_0x57b925,_0x3be775[_0x51f307(0x1bc)]=_0x5021df,_0x3abe80['push'](_0x3be775);const _0x3f0ba4=require(_0x51f307(0x1ef))[_0x51f307(0x25b)](_0x57b925),_0x80f602=require(_0x51f307(0x1a2))['workspaceOwnership'](_0x57b925,_0x5021df,_0x3f0ba4,{'rebuildCheckpoints':!![],'budgetMs':Number(process.env.APT_RUN_INSPECTION_TIMEOUT_MS||0x1d4c0)});if(_0x80f602[_0x51f307(0x205)])return{'status':_0x51f307(0x23a),'blockers':_0x80f602[_0x51f307(0x1b4)](_0x3e9608=>({'code':_0x51f307(0x256),'workspace':_0x57b925,'kind':_0x3e9608['kind']}))};const _0x1a2c77=require(_0x51f307(0x23f))[_0x51f307(0x23d)](_0x57b925),_0x49c201={};_0x49c201[_0x51f307(0x206)]=_0x51f307(0x1dd),_0x49c201[_0x51f307(0x20a)]=_0x57b925;const _0x2c2a9f={};_0x2c2a9f[_0x51f307(0x26d)]=_0x51f307(0x1d5),_0x2c2a9f[_0x51f307(0x208)]=[_0x49c201];if(_0x1a2c77[_0x51f307(0x205)]||Object[_0x51f307(0x258)](_0x5021df[_0x51f307(0x269)]||{})[_0x51f307(0x24d)](_0x3f45e7=>_0x3f45e7[_0x51f307(0x1f3)]!=='closed'))return _0x2c2a9f;}for(const _0x31507b of _0x2837a6[_0x51f307(0x25a)][_0x51f307(0x230)](_0x944e32=>_0x944e32[_0x51f307(0x20a)])){const _0x495f6d=await _0x4c0d3b['verifyClosure']?.(_0x31507b,_0x5f177d(_0x31507b));if(_0x495f6d?.['status']!==_0x51f307(0x222)||_0x495f6d[_0x51f307(0x212)]!==_0x31507b['entryHash'])return{'status':_0x51f307(0x260),'blockers':[{'code':_0x51f307(0x1ae),'host':_0x31507b['host'],'alias':_0x31507b[_0x51f307(0x251)]}]};}if(!_0x417f2f){const _0x47167d=[],_0x55b54b=[];for(const _0x218112 of _0x2837a6['configs']){approvedPath(_0x218112,_0x2837a6);const _0x1e50d1=read(_0x218112[_0x51f307(0x25d)]);if((_0x1e50d1?hash(_0x1e50d1):null)!==_0x218112[_0x51f307(0x25c)])fail(_0x51f307(0x217));const _0x49b8ea=IDE_REGISTRY[_0x218112[_0x51f307(0x1c4)]];for(const _0x2eea4d of _0x2837a6[_0x51f307(0x25a)][_0x51f307(0x230)](_0x20678e=>_0x20678e['configPath']===_0x218112[_0x51f307(0x25d)])){const _0x22d147=configEntry(_0x1e50d1[_0x51f307(0x1bb)](),_0x218112[_0x51f307(0x1c4)],_0x2eea4d['alias']),_0x507aa0=profileFor(_0x218112[_0x51f307(0x1c4)],_0x22d147),_0xfa80ab={};_0xfa80ab[_0x51f307(0x1c4)]=_0x2eea4d[_0x51f307(0x1c4)],_0xfa80ab[_0x51f307(0x1f9)]=_0x2eea4d[_0x51f307(0x1f9)],_0xfa80ab[_0x51f307(0x25d)]=_0x2eea4d[_0x51f307(0x25d)],_0xfa80ab[_0x51f307(0x251)]=_0x2eea4d[_0x51f307(0x251)],_0xfa80ab[_0x51f307(0x1a9)]=_0x22d147,_0xfa80ab['workspace']=_0x2eea4d[_0x51f307(0x1f9)]===_0x51f307(0x1d3)?_0x2eea4d[_0x51f307(0x20a)]:undefined;if(!matchingReceipt(_0xfa80ab,_0x4c0d3b))fail(_0x51f307(0x1d7));if(!_0x2eea4d['workspace']){if(Object[_0x51f307(0x23e)](_0x507aa0[_0x51f307(0x252)]||{})[_0x51f307(0x205)]||Object[_0x51f307(0x23e)](_0x507aa0[_0x51f307(0x1f1)]||{})[_0x51f307(0x24d)](_0x167107=>!['session_bootstrap',_0x51f307(0x276)][_0x51f307(0x200)](_0x167107)||Object[_0x51f307(0x23e)](_0x507aa0['tools'][_0x167107])[_0x51f307(0x24d)](_0x45412f=>_0x45412f!==_0x51f307(0x21d))))fail(_0x51f307(0x218));continue;}const _0x37bc90=fs['realpathSync'](_0x2eea4d['workspace']),_0xfa10d7=_0x47167d[_0x51f307(0x23b)](_0x5a063d=>_0x5a063d[_0x51f307(0x1c4)]===_0x2eea4d['host']&&require(_0x51f307(0x1a7))[_0x51f307(0x272)](_0x5a063d[_0x51f307(0x20a)],_0x37bc90));if(_0xfa10d7&&JSON[_0x51f307(0x24f)](_0xfa10d7[_0x51f307(0x20b)])!==JSON[_0x51f307(0x24f)](_0x507aa0))fail(_0x51f307(0x1b5));const _0x496427={};_0x496427[_0x51f307(0x20a)]=_0x37bc90,_0x496427[_0x51f307(0x1c4)]=_0x2eea4d['host'],_0x496427['profile']=_0x507aa0;if(!_0xfa10d7)_0x47167d['push'](_0x496427);}const _0x41c111=replacementFor(_0x218112,_0x1e50d1,_0x1083e1,_0x2837a6),_0x489de6={..._0x218112};_0x489de6[_0x51f307(0x207)]=_0x1e50d1,_0x489de6[_0x51f307(0x228)]=_0x41c111,_0x55b54b[_0x51f307(0x201)](_0x489de6);}for(const _0x41d114 of _0x2837a6['includeGlobal']===![]?[]:_0x2837a6[_0x51f307(0x22f)]){const _0x271479=IDE_REGISTRY[_0x41d114]?.['globalConfig']?.();if(!_0x271479)continue;let _0x8bf8d1=_0x55b54b[_0x51f307(0x23b)](_0x393ebc=>_0x393ebc['configPath']===path[_0x51f307(0x250)](_0x271479));if(!_0x8bf8d1){const _0x3f3cae=read(_0x271479);_0x8bf8d1={'host':_0x41d114,'scope':_0x51f307(0x19f),'configPath':path[_0x51f307(0x250)](_0x271479),'oldHash':_0x3f3cae?hash(_0x3f3cae):null,'original':_0x3f3cae,'replacement':_0x3f3cae?.[_0x51f307(0x1bb)]()||'','aliases':[]},_0x55b54b['push'](_0x8bf8d1);}approvedPath(_0x8bf8d1,_0x2837a6);const _0x32191e=[_0x1083e1[_0x51f307(0x255)]('\x5c','/'),'--gateway','--host',_0x41d114];if(IDE_REGISTRY[_0x41d114][_0x51f307(0x1fe)]==='toml')_0x8bf8d1[_0x51f307(0x228)]=_0x8bf8d1['replacement'][_0x51f307(0x1cd)]()+'\x0a\x0a[mcp_servers.apt-mcp-agent]\x0acommand\x20=\x20\x22node\x22\x0aargs\x20=\x20'+JSON['stringify'](_0x32191e)+'\x0a';else{const _0x1761a2={};_0x1761a2[_0x51f307(0x263)]=IDE_REGISTRY[_0x41d114][_0x51f307(0x263)];const _0x3b253d=parseJson(_0x8bf8d1['replacement']||'{}',_0x1761a2);_0x3b253d[IDE_REGISTRY[_0x41d114][_0x51f307(0x1fa)]]||={};const _0x4e0df1={};_0x4e0df1[_0x51f307(0x1ca)]=_0x51f307(0x1af),_0x4e0df1[_0x51f307(0x1b0)]=_0x32191e;const _0x2e3f15=_0x4e0df1;if(_0x41d114===_0x51f307(0x1f0))require(_0x51f307(0x224))[_0x51f307(0x1f5)](_0x2e3f15);_0x3b253d[IDE_REGISTRY[_0x41d114][_0x51f307(0x1fa)]]['apt-mcp-agent']=_0x2e3f15,_0x8bf8d1[_0x51f307(0x228)]=JSON['stringify'](_0x3b253d,null,0x2);}}for(const [_0x2fa100,_0x1a2d81]of _0x55b54b[_0x51f307(0x21f)]()){_0x1a2d81[_0x51f307(0x266)]=hash(_0x1a2d81[_0x51f307(0x228)]);if(_0x1a2d81[_0x51f307(0x207)])durable(path[_0x51f307(0x238)](_0x32482b,_0x2fa100+_0x51f307(0x1ac)),_0x1a2d81[_0x51f307(0x207)]);durable(path[_0x51f307(0x238)](_0x32482b,_0x2fa100+_0x51f307(0x21c)),_0x1a2d81['replacement']),delete _0x1a2d81[_0x51f307(0x207)],delete _0x1a2d81[_0x51f307(0x228)];}const _0x190a69={};_0x190a69['version']=0x1,_0x190a69['id']=_0x1d3571,_0x190a69[_0x51f307(0x1eb)]=_0x2837a6,_0x190a69[_0x51f307(0x231)]=_0x55b54b,_0x190a69[_0x51f307(0x19d)]=_0x47167d,_0x190a69['status']='prepared',_0x417f2f=_0x190a69,_0x288e4e(_0x51f307(0x19c));}validateJournal(_0x417f2f,_0x2837a6,_0x32482b,_0x1083e1),_0x46fa48=!![];for(const [_0x8e70d7,_0x2c5078]of _0x417f2f[_0x51f307(0x231)]['entries']()){approvedPath(_0x2c5078,_0x2837a6),staged(_0x32482b,_0x8e70d7,_0x51f307(0x228),_0x2c5078[_0x51f307(0x266)]);if(_0x2c5078['oldHash'])staged(_0x32482b,_0x8e70d7,_0x51f307(0x207),_0x2c5078[_0x51f307(0x25c)]);const _0x1a95d7=read(_0x2c5078['configPath']),_0x592531=_0x1a95d7?hash(_0x1a95d7):null;if(![_0x2c5078[_0x51f307(0x25c)],_0x2c5078['newHash']][_0x51f307(0x200)](_0x592531))fail('REGISTRATION_CONFIG_CONFLICT');}for(const _0xf7c198 of _0x417f2f[_0x51f307(0x19d)]){if(!_0x2837a6['projects']['some'](_0x124c54=>require(_0x51f307(0x1a7))[_0x51f307(0x272)](_0x124c54,_0xf7c198['workspace']))||!_0x2837a6['hosts']['includes'](_0xf7c198[_0x51f307(0x1c4)]))fail(_0x51f307(0x1e6));const _0xd449c2=_0x33ee64[_0x51f307(0x22b)]()['find'](_0x2e736d=>require(_0x51f307(0x1a7))[_0x51f307(0x272)](_0x2e736d[_0x51f307(0x20a)],_0xf7c198[_0x51f307(0x20a)]));if(_0xd449c2?.['profiles']?.[_0xf7c198[_0x51f307(0x1c4)]]&&!require('node:util')[_0x51f307(0x1f4)](_0xd449c2[_0x51f307(0x19d)][_0xf7c198[_0x51f307(0x1c4)]],_0xf7c198[_0x51f307(0x20b)]))fail(_0x51f307(0x1b5));}for(const _0x5ca0d3 of _0x417f2f[_0x51f307(0x19d)]){const _0x2950b8={..._0x5ca0d3};_0x2950b8[_0x51f307(0x27b)]='owned-registration-migration',_0x33ee64[_0x51f307(0x1a8)](_0x2950b8);}for(const _0x657339 of _0x3abe80){const _0x12110b=_0x3112ca[_0x51f307(0x235)](_0x657339[_0x51f307(0x20a)]);if(_0x12110b[_0x51f307(0x1f3)]==='draining')_0x657339[_0x51f307(0x1bc)]=_0x3112ca[_0x51f307(0x1dc)](_0x657339['workspace'],_0x12110b['epoch'],{'transactionId':_0x12110b['transactionId']},_0x4e7571=>!Object[_0x51f307(0x258)](_0x4e7571[_0x51f307(0x269)]||{})['some'](_0x5ba76d=>_0x5ba76d[_0x51f307(0x1f3)]!==_0x51f307(0x1f7))&&require(_0x51f307(0x1a2))[_0x51f307(0x1d4)](_0x657339[_0x51f307(0x20a)],_0x4e7571,require('../core/run-compatibility')[_0x51f307(0x25b)](_0x657339[_0x51f307(0x20a)]),{'rebuildCheckpoints':!![],'budgetMs':Number(process.env.APT_RUN_INSPECTION_TIMEOUT_MS||0x1d4c0)})[_0x51f307(0x205)]===0x0);else{if(_0x12110b[_0x51f307(0x1f3)]!==_0x51f307(0x210))fail(_0x51f307(0x20d));}}_0x14f321=![];for(const _0x8f2232 of _0x2837a6[_0x51f307(0x25a)]['filter'](_0xa4965a=>_0xa4965a['workspace'])){const _0x241773=await _0x4c0d3b[_0x51f307(0x1a3)]?.(_0x8f2232,_0x5f177d(_0x8f2232));if(_0x241773?.[_0x51f307(0x26d)]!==_0x51f307(0x222)||_0x241773['registrationHash']!==_0x8f2232['entryHash'])fail('LEGACY_CLOSURE_UNVERIFIED');}const _0x5335d2=[_0x51f307(0x220),'committed'][_0x51f307(0x200)](_0x417f2f[_0x51f307(0x26d)]);for(const [_0x1ebb7f,_0x2e3aa6]of _0x417f2f[_0x51f307(0x231)]['entries']()){const _0x15898d=read(_0x2e3aa6[_0x51f307(0x25d)]),_0x431a2b=_0x15898d?hash(_0x15898d):null;_0x431a2b!==_0x2e3aa6['newHash']&&(_0x2e3aa6[_0x51f307(0x26d)]=_0x51f307(0x1be),_0x288e4e(_0x5335d2?_0x51f307(0x220):_0x51f307(0x19e)),writeConfigAtomic(_0x2e3aa6['configPath'],staged(_0x32482b,_0x1ebb7f,_0x51f307(0x228),_0x2e3aa6['newHash'])[_0x51f307(0x1bb)](),{'expectedHash':_0x2e3aa6[_0x51f307(0x25c)]||hash(Buffer['alloc'](0x0))})),_0x2e3aa6[_0x51f307(0x26d)]=_0x51f307(0x1b2),_0x288e4e(_0x5335d2?'committing':_0x51f307(0x19e));}_0x288e4e(_0x51f307(0x220));for(const _0x4ecf9f of _0x417f2f[_0x51f307(0x231)])if((read(_0x4ecf9f[_0x51f307(0x25d)])?hash(read(_0x4ecf9f[_0x51f307(0x25d)])):null)!==_0x4ecf9f[_0x51f307(0x266)])fail(_0x51f307(0x249));for(const _0x5bce7a of _0x417f2f[_0x51f307(0x231)]['filter'](_0x523ede=>_0x523ede['scope']===_0x51f307(0x19f))){if(hash(read(_0x5bce7a[_0x51f307(0x25d)])||'')!==_0x5bce7a[_0x51f307(0x266)])fail(_0x51f307(0x249));const _0x50423f=configEntry(fs[_0x51f307(0x20e)](_0x5bce7a[_0x51f307(0x25d)],_0x51f307(0x1f8)),_0x5bce7a[_0x51f307(0x1c4)],_0x51f307(0x1b3)),_0x1c694d={};_0x1c694d['host']=_0x5bce7a['host'],_0x1c694d[_0x51f307(0x1f9)]=_0x51f307(0x19f),_0x1c694d[_0x51f307(0x25d)]=_0x5bce7a[_0x51f307(0x25d)],_0x1c694d[_0x51f307(0x251)]=_0x51f307(0x1b3),_0x1c694d[_0x51f307(0x20a)]=null,_0x1c694d[_0x51f307(0x1a9)]=_0x50423f,recordRegistration(_0x1c694d,_0x4c0d3b);}for(const _0x4623d8 of _0x417f2f['operations']['filter'](_0xf96a6a=>_0xf96a6a[_0x51f307(0x1f9)]===_0x51f307(0x1d3))){const _0x349675=configEntry(fs[_0x51f307(0x20e)](_0x4623d8[_0x51f307(0x25d)],'utf8'),_0x4623d8['host'],_0x51f307(0x1b3));if(!_0x349675)fail(_0x51f307(0x249));const _0x51a26c={};_0x51a26c[_0x51f307(0x1c4)]=_0x4623d8[_0x51f307(0x1c4)],_0x51a26c['scope']=_0x51f307(0x1d3),_0x51a26c['configPath']=_0x4623d8['configPath'],_0x51a26c[_0x51f307(0x251)]='apt-mcp-agent',_0x51a26c[_0x51f307(0x20a)]=_0x4623d8['workspace'],_0x51a26c[_0x51f307(0x1a9)]=_0x349675,_0x51a26c['provenance']=_0x51f307(0x1fc),_0x51a26c[_0x51f307(0x1c1)]={},_0x51a26c[_0x51f307(0x1c1)][_0x51f307(0x1b8)]=_0x51f307(0x279),_0x51a26c[_0x51f307(0x1c1)][_0x51f307(0x20a)]=_0x4623d8[_0x51f307(0x20a)],recordRegistration(_0x51a26c,_0x4c0d3b);}_0x288e4e(_0x51f307(0x203)),_0x14f321=!![];const _0x260eed={};return _0x260eed[_0x51f307(0x26d)]='ready-next-connection',_0x260eed[_0x51f307(0x1c9)]=_0x1d3571,_0x260eed[_0x51f307(0x1b6)]=_0x417f2f[_0x51f307(0x231)][_0x51f307(0x205)],_0x260eed['projectsEnrolled']=_0x417f2f[_0x51f307(0x19d)][_0x51f307(0x205)],_0x260eed['servingConfirmed']=![],_0x260eed;}catch(_0x566008){if(_0x417f2f&&_0x46fa48&&![_0x51f307(0x220),_0x51f307(0x203)]['includes'](_0x417f2f[_0x51f307(0x26d)]))try{for(let _0x264aa4=_0x417f2f['operations'][_0x51f307(0x205)]-0x1;_0x264aa4>=0x0;_0x264aa4--){const _0x4d4517=_0x417f2f[_0x51f307(0x231)][_0x264aa4];approvedPath(_0x4d4517,_0x2837a6);const _0x4fbb55=read(_0x4d4517[_0x51f307(0x25d)]),_0x257246=_0x4fbb55?hash(_0x4fbb55):null;if(_0x257246===_0x4d4517['oldHash'])continue;if(_0x257246!==_0x4d4517[_0x51f307(0x266)])fail(_0x51f307(0x249));if(_0x4d4517['oldHash'])writeConfigAtomic(_0x4d4517[_0x51f307(0x25d)],staged(_0x32482b,_0x264aa4,_0x51f307(0x207),_0x4d4517[_0x51f307(0x25c)])[_0x51f307(0x1bb)](),{'expectedHash':_0x4d4517[_0x51f307(0x266)]});else require('./managed-config')[_0x51f307(0x1cf)](_0x4d4517['configPath'],_0x4d4517['newHash']);}_0x288e4e(_0x51f307(0x1c0)),_0x14f321=!![];}catch(_0x580177){_0x14f321=![],_0x566008=_0x580177;}else{if(_0x417f2f)_0x14f321=![];}const _0x184240={};_0x184240['code']=_0x566008[_0x51f307(0x206)]||_0x51f307(0x1e8);const _0x3492ed={};return _0x3492ed['status']=_0x51f307(0x1f2),_0x3492ed[_0x51f307(0x1c9)]=_0x1d3571,_0x3492ed[_0x51f307(0x27a)]=_0x264c6c,_0x3492ed[_0x51f307(0x22c)]=_0x14f321?_0x51f307(0x1c0):_0x51f307(0x204),_0x3492ed['blockers']=[_0x184240],_0x3492ed;}finally{if(_0x14f321)for(const {workspace:_0x1970a7,fence:_0x101f16}of _0x3abe80[_0x51f307(0x1c7)]()){const _0x2dcbea=_0x3112ca[_0x51f307(0x235)](_0x1970a7);if(_0x2dcbea[_0x51f307(0x1c9)]===_0x101f16[_0x51f307(0x1c9)]&&['draining',_0x51f307(0x210)]['includes'](_0x2dcbea[_0x51f307(0x1f3)]))_0x3112ca[_0x51f307(0x262)](_0x1970a7,_0x2dcbea['epoch'],{'state':'open','transactionId':_0x2dcbea['transactionId']});}_0x5a1107();}}const _0x21c654={};_0x21c654[_0xa5ab4a(0x1ab)]=migrationPlan,_0x21c654[_0xa5ab4a(0x20f)]=applyMigration,_0x21c654[_0xa5ab4a(0x229)]=profileFor,module['exports']=_0x21c654;
@@ -1 +1 @@
1
- 'use strict';const _0x4a5ff3=_0x55bc;function _0x1a3e(){const _0x473cf2=['ntq0tgXyzMPH','yxnZAwDU','CMvZB2X2zq','uLvoveLnrv9suenFrvjst1i','mJu1nte1otjHAuT1v1O','BM9KztPZDhjPBMDFzgvJB2rLCG','D29YA3nWywnL','z2v0','Cgf1C2u','zgvJB2rLCG','CMvJB3zLCKjLzM9Yzvn0yxj0Dxa','w0fqvf0Gr2f0zxDHEsbZAhv0zg93BIb1BMnVBMzPCM1LzdO','yNvMzMvY','zhjHAw4','BM90AwzPy2f0Aw9UCY9PBML0AwfSAxPLza','mtbcrgj6vK0','C3rHCNrhyxrLD2f5','CgfYC2u','y2HPBgrfBNzPCM9UBwvUDa','CMvXDwvZDa','mJCZnJq4nLfur1jgCW','r0furvDbwv9pvvrqvvrFteLnsvq','CMvJzwL2zq','y29UDgv4De9WDgLVBNm','y2f0ywXVzW','B3v0Chv0','ugfYC2uGzxjYB3i','B2jQzwn0','nJi5ntm1z2L4B1nW','zxHWB3j0CW','C2vXDwvUy2u','B25nzxnZywDL','y2f0ywXVz0HHC2G','uMvXDwvZDcbVDxrJB21LigLZihvUA25VD24Gywz0zxiGy29UBMvJDgLVBIbJBg9Zzwq','r2f0zxDHEunVBNrLEhq','yMLUza','z2f0zxDHEs1ZzxnZAw9UlwnSB3nLza','lI9NyxrLD2f5lwnVBNrLEhq','r2f0zxDHEvnLC3nPB24','zw52','ywrK','lI4VChjVEhKVD29YA3nWywnLlwDHDgv3yxK','uKvrvuvtvf9jrf9dt05gteLdva','nJqWtffvrhD4','C3rHCNq','ota2EKfVzNfA','sw52ywXPzcbszxf1zxn0','mtK1mdvirMLUsxG','zgf0yq','B3b0Aw9UCW','DxrMoa','nJyYovPAzxfbra','y2XVC2u','y2f0y2G','AxnbCNjHEq','y2XLyxi','BM9KztPJCNLWDg8','C3rKB3v0','r0furvDbwv9dqvrbte9hx1voqvzbsuXbqKXf','Agv4','C2XPy2u','B25Jzq','C2HHmJu2','C3rYAw5NAwz5','Ag9ZDeLK','CMfUzg9Tvvvjra','ANnVBNjWyW','AgfZ','BM9KztPZDhjLyw0','CMvXDwvZDeLK','zgLNzxn0','Dg9VBhm','z2f0zxDHEtO','r0furvDbwv9gquLmruq','lI91CgrHDguTCMvXDwvZDa','zxjYB3i','y2fUy2vS','CgfYyw1Z','C3rKAw4','mZe0nZq4AvftwKTu','yNL0zuXLBMD0Aa','C2v0','tvvuqvrjt05Ft1vuq09nrv9vtKTot1Do','uNvUDgLTzsbJyxrHBg9NihvUyxzHAwXHyMXL','mI4W','zgvSzxrL','CgvUzgLUzW','CMvZDw1L','y3jLyxrLsgfZAa','DMfSDwvZ','lI9JB25Uzwn0Aw9Ulxn1CgvYDMLZB3i','mta3otDKA3vYCxi','yMLUzgLUzW','D3jPDgu','BM90AwzPy2f0Aw9UCY9Jyw5JzwXSzwq','Aw5WDxq','C3rYAw5N','zgvZDhjVEq','q2HPBgqGB3v0Chv0igv4y2vLzhmGBgLTAxq','CMvQzwn0','DxbKyxrL','C3vWzxj2AxnVCG','Dg9VBhmVBgLZDa','y29Kzq','BwvZC2fNzq','BM90AwzPy2f0Aw9UCY90B29SCY9SAxn0x2nOyw5Nzwq','Bwv0Ag9K'];_0x1a3e=function(){return _0x473cf2;};return _0x1a3e();}(function(_0x105631,_0x35cb68){const _0x3cde00=_0x55bc,_0x247c75=_0x105631();while(!![]){try{const _0x4d2acf=-parseInt(_0x3cde00(0x188))/0x1+parseInt(_0x3cde00(0x150))/0x2+parseInt(_0x3cde00(0x15c))/0x3*(-parseInt(_0x3cde00(0x12c))/0x4)+parseInt(_0x3cde00(0x130))/0x5*(-parseInt(_0x3cde00(0x12e))/0x6)+-parseInt(_0x3cde00(0x134))/0x7*(parseInt(_0x3cde00(0x16c))/0x8)+-parseInt(_0x3cde00(0x180))/0x9+parseInt(_0x3cde00(0x17b))/0xa*(parseInt(_0x3cde00(0x170))/0xb);if(_0x4d2acf===_0x35cb68)break;else _0x247c75['push'](_0x247c75['shift']());}catch(_0x3cc5be){_0x247c75['push'](_0x247c75['shift']());}}}(_0x1a3e,0x4d7ba));function _0x55bc(_0x4cf060,_0x24b7cd){_0x4cf060=_0x4cf060-0x120;const _0x1a3e5c=_0x1a3e();let _0x55bc01=_0x1a3e5c[_0x4cf060];if(_0x55bc['UEEKpG']===undefined){var _0x3b826e=function(_0x33e89b){const _0x4039af='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1eed91='',_0x4e0fce='';for(let _0x4c232c=0x0,_0x586c57,_0x1d556e,_0x2fb849=0x0;_0x1d556e=_0x33e89b['charAt'](_0x2fb849++);~_0x1d556e&&(_0x586c57=_0x4c232c%0x4?_0x586c57*0x40+_0x1d556e:_0x1d556e,_0x4c232c++%0x4)?_0x1eed91+=String['fromCharCode'](0xff&_0x586c57>>(-0x2*_0x4c232c&0x6)):0x0){_0x1d556e=_0x4039af['indexOf'](_0x1d556e);}for(let _0x524965=0x0,_0xb5a3da=_0x1eed91['length'];_0x524965<_0xb5a3da;_0x524965++){_0x4e0fce+='%'+('00'+_0x1eed91['charCodeAt'](_0x524965)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4e0fce);};_0x55bc['kQMFFW']=_0x3b826e,_0x55bc['bylhJd']={},_0x55bc['UEEKpG']=!![];}const _0x3b31a3=_0x1a3e5c[0x0],_0x372d01=_0x4cf060+_0x3b31a3,_0x33a373=_0x55bc['bylhJd'][_0x372d01];return!_0x33a373?(_0x55bc01=_0x55bc['kQMFFW'](_0x55bc01),_0x55bc['bylhJd'][_0x372d01]=_0x55bc01):_0x55bc01=_0x33a373,_0x55bc01;}const {PassThrough}=require(_0x4a5ff3(0x145)),{StringDecoder}=require(_0x4a5ff3(0x171)),crypto=require(_0x4a5ff3(0x139)),{WorkspaceGateway}=require(_0x4a5ff3(0x12a));class GatewaySession{constructor(_0x2d91e8,_0x220e8d){const _0x518b46=_0x4a5ff3;this[_0x518b46(0x15d)]=_0x2d91e8,this[_0x518b46(0x132)]=_0x220e8d,this['input']=new PassThrough(),this[_0x518b46(0x185)]=new PassThrough(),this[_0x518b46(0x157)]=new Map(),this[_0x518b46(0x18a)]=0x0,this['buffer']='',this[_0x518b46(0x175)]=new StringDecoder(_0x518b46(0x133));const _0x59c65e=_0x220e8d['Supervisor']||require(_0x518b46(0x15b))['ConnectionSupervisor'];this[_0x518b46(0x166)]=new _0x59c65e({..._0x220e8d,'workspace':_0x2d91e8['workspace'],'explicitWorkspace':!![],'connectionId':crypto[_0x518b46(0x142)](),'gatewayBinding':_0x2d91e8,'stdin':this[_0x518b46(0x160)],'stdout':this[_0x518b46(0x185)]}),this['output']['on'](_0x518b46(0x131),_0xdc1835=>this[_0x518b46(0x182)](_0xdc1835));}async['start'](_0x32032f){const _0x3b4519=_0x4a5ff3;await require(_0x3b4519(0x14b))[_0x3b4519(0x176)](this['binding'][_0x3b4519(0x172)],this['options']['publicKey']),await this[_0x3b4519(0x166)][_0x3b4519(0x12d)]();const _0x44f35c=await this['request']({'method':'initialize','params':{..._0x32032f,'capabilities':{},'rootPath':this[_0x3b4519(0x15d)]['workspace'],'rootUri':undefined,'workspaceFolders':[{'path':this[_0x3b4519(0x15d)][_0x3b4519(0x172)]}]}}),_0x2f0908={};_0x2f0908[_0x3b4519(0x143)]=_0x3b4519(0x155),_0x2f0908[_0x3b4519(0x16b)]=_0x3b4519(0x17a),this[_0x3b4519(0x160)][_0x3b4519(0x15e)](JSON[_0x3b4519(0x140)](_0x2f0908)+'\x0a');const _0x39bd5f={};_0x39bd5f['method']=_0x3b4519(0x167),_0x39bd5f[_0x3b4519(0x14e)]={};const _0x1e7e1d=await this[_0x3b4519(0x17f)](_0x39bd5f),_0xc850c={};_0xc850c['code']=_0x3b4519(0x13b);if(!Array[_0x3b4519(0x137)](_0x1e7e1d[_0x3b4519(0x148)]))throw Object[_0x3b4519(0x16d)](new Error(_0x3b4519(0x154)),_0xc850c);return this[_0x3b4519(0x184)]=_0x1e7e1d[_0x3b4519(0x148)],this[_0x3b4519(0x121)]=crypto[_0x3b4519(0x159)](_0x3b4519(0x13f))[_0x3b4519(0x165)](JSON[_0x3b4519(0x140)](_0x1e7e1d['tools']))[_0x3b4519(0x147)](_0x3b4519(0x13c)),this;}[_0x4a5ff3(0x17f)](_0x376d48){const _0xa31c5e=_0x4a5ff3,_0x1332f8=_0xa31c5e(0x149)+this[_0xa31c5e(0x166)]['connectionId']+':'+ ++this['sequence'];return new Promise((_0x4e322b,_0x5f348e)=>{const _0x10513c=_0xa31c5e,_0x4e4072={};_0x4e4072[_0x10513c(0x16e)]=_0x4e322b,_0x4e4072[_0x10513c(0x164)]=_0x5f348e,_0x4e4072[_0x10513c(0x141)]=_0x376d48['id'],this[_0x10513c(0x157)][_0x10513c(0x152)](_0x1332f8,_0x4e4072);const _0x356123={..._0x376d48};_0x356123[_0x10513c(0x143)]=_0x10513c(0x155),_0x356123['id']=_0x1332f8;const _0x27c9bd=JSON[_0x10513c(0x140)](_0x356123)+'\x0a';this[_0x10513c(0x160)]['write'](_0x27c9bd,_0x263b70=>{const _0x195099=_0x10513c;_0x263b70&&(this['pending'][_0x195099(0x156)](_0x1332f8),_0x5f348e(_0x263b70));});});}[_0x4a5ff3(0x14d)](_0x46a832){const _0x292f66=_0x4a5ff3;for(const [_0x557ae0,_0x2aec9b]of this[_0x292f66(0x157)])if(_0x2aec9b[_0x292f66(0x141)]===_0x46a832)this[_0x292f66(0x160)]['write'](JSON['stringify']({'jsonrpc':_0x292f66(0x155),'method':_0x292f66(0x15f),'params':{'requestId':_0x557ae0}})+'\x0a');}[_0x4a5ff3(0x182)](_0x4af8ab){const _0x369032=_0x4a5ff3;this[_0x369032(0x178)]+=this[_0x369032(0x175)]['write'](_0x4af8ab);if(Buffer[_0x369032(0x151)](this[_0x369032(0x178)])>0x8*0x400*0x400){for(const _0x590890 of this[_0x369032(0x157)][_0x369032(0x15a)]())_0x590890['reject'](Object[_0x369032(0x16d)](new Error(_0x369032(0x163)),{'code':_0x369032(0x181)}));this[_0x369032(0x157)][_0x369032(0x138)](),void this[_0x369032(0x135)]()[_0x369032(0x136)](()=>{});return;}let _0x58e796;while((_0x58e796=this[_0x369032(0x178)]['indexOf']('\x0a'))>=0x0){const _0x30da78=this[_0x369032(0x178)][_0x369032(0x13d)](0x0,_0x58e796);this[_0x369032(0x178)]=this[_0x369032(0x178)][_0x369032(0x13d)](_0x58e796+0x1);if(!_0x30da78['trim']())continue;let _0xb5c116;try{_0xb5c116=JSON[_0x369032(0x17d)](_0x30da78);}catch{continue;}const _0x25b0b4=this['pending'][_0x369032(0x173)](_0xb5c116['id']);if(_0x25b0b4&&!_0xb5c116[_0x369032(0x16b)]){this['pending'][_0x369032(0x156)](_0xb5c116['id']);if(_0xb5c116['error'])_0x25b0b4[_0x369032(0x164)](Object[_0x369032(0x16d)](new Error(_0xb5c116['error'][_0x369032(0x169)]),{'code':_0x369032(0x16f),'rpcError':_0xb5c116['error']}));else _0x25b0b4[_0x369032(0x16e)](_0xb5c116['result']);continue;}if(_0xb5c116[_0x369032(0x16b)]&&_0xb5c116['id']!==undefined){const _0x4faf6f={};_0x4faf6f[_0x369032(0x168)]=-0x7f59,_0x4faf6f[_0x369032(0x169)]='APT_HOST_REQUEST_UNSUPPORTED';const _0x5e00d1={};_0x5e00d1['jsonrpc']=_0x369032(0x155),_0x5e00d1['id']=_0xb5c116['id'],_0x5e00d1['error']=_0x4faf6f,this[_0x369032(0x160)][_0x369032(0x15e)](JSON[_0x369032(0x140)](_0x5e00d1)+'\x0a');}else _0xb5c116[_0x369032(0x16b)]&&_0xb5c116[_0x369032(0x16b)]!==_0x369032(0x16a)&&this[_0x369032(0x132)]['onMessage']?.(_0xb5c116,this);}}async['close'](){const _0x16bd7b=_0x4a5ff3;try{await this[_0x16bd7b(0x166)][_0x16bd7b(0x135)](_0x16bd7b(0x125));}finally{for(const _0x1d1b82 of this[_0x16bd7b(0x157)]['values']())_0x1d1b82[_0x16bd7b(0x164)](Object[_0x16bd7b(0x16d)](new Error(_0x16bd7b(0x122)),{'code':_0x16bd7b(0x153)}));this[_0x16bd7b(0x157)][_0x16bd7b(0x138)](),this['input'][_0x16bd7b(0x162)](),this[_0x16bd7b(0x185)][_0x16bd7b(0x162)]();}}}async function startGateway(_0x5f10ee){const _0x5e83e8=_0x4a5ff3,_0x13333b=_0x5f10ee[_0x5e83e8(0x14f)]||process['stdin'],_0x25c39e=_0x5f10ee[_0x5e83e8(0x13a)]||process[_0x5e83e8(0x13a)],_0x5988b3=new Set(),_0x526799=new Map(),_0x948556=_0x4b3748=>{const _0xa1a2cf=_0x5e83e8;if(!_0x4b3748)return;!_0x25c39e[_0xa1a2cf(0x15e)](JSON[_0xa1a2cf(0x140)](_0x4b3748)+'\x0a')&&(_0x13333b[_0xa1a2cf(0x174)](),_0x25c39e[_0xa1a2cf(0x13e)](_0xa1a2cf(0x179),()=>_0x13333b[_0xa1a2cf(0x158)]()));},_0x2a9b57={};_0x2a9b57[_0x5e83e8(0x143)]=_0x5e83e8(0x155),_0x2a9b57['method']=_0x5e83e8(0x16a);const _0x3d069f=new WorkspaceGateway({..._0x5f10ee,'onCatalogChanged':()=>_0x948556(_0x2a9b57),'runtimeFactory':async(_0x3ca5d1,_0x4965c1,_0x471b04)=>{const _0x559a64=_0x5e83e8,_0x2ec47e={..._0x5f10ee};_0x2ec47e[_0x559a64(0x17e)]=_0x471b04[_0x559a64(0x128)]||{},_0x2ec47e[_0x559a64(0x120)]=_0x948556;const _0x29f231=new GatewaySession(_0x3ca5d1,_0x2ec47e);try{return await _0x29f231[_0x559a64(0x12d)](_0x4965c1),_0x5988b3[_0x559a64(0x129)](_0x29f231),_0x29f231;}catch(_0x3b50f1){await _0x29f231[_0x559a64(0x135)]()[_0x559a64(0x136)](()=>{});throw _0x3b50f1;}}}),_0x7240f3=new(require(_0x5e83e8(0x126)))[(_0x5e83e8(0x123))](_0x3d069f,_0x5f10ee[_0x5e83e8(0x183)]);await _0x7240f3[_0x5e83e8(0x12d)]();const _0x15bd95=_0x3d069f['close'][_0x5e83e8(0x124)](_0x3d069f);_0x3d069f[_0x5e83e8(0x135)]=async()=>{const _0xce278c=_0x5e83e8;try{await _0x15bd95();}finally{await _0x7240f3[_0xce278c(0x135)]();}};let _0x3caef3='',_0x2f0f7f=new StringDecoder(_0x5e83e8(0x133));return _0x13333b['on'](_0x5e83e8(0x131),_0x449329=>{const _0x165675=_0x5e83e8;_0x3caef3+=_0x2f0f7f[_0x165675(0x15e)](_0x449329);if(Buffer['byteLength'](_0x3caef3)>0x8*0x400*0x400)return void _0x3d069f[_0x165675(0x135)]()['catch'](_0x183508=>console[_0x165675(0x14c)](_0x183508[_0x165675(0x168)]));let _0xbd7ad8;while((_0xbd7ad8=_0x3caef3['indexOf']('\x0a'))>=0x0){const _0x243575=_0x3caef3[_0x165675(0x13d)](0x0,_0xbd7ad8);_0x3caef3=_0x3caef3[_0x165675(0x13d)](_0xbd7ad8+0x1);if(!_0x243575['trim']())continue;let _0xb5358c;try{_0xb5358c=JSON[_0x165675(0x17d)](_0x243575);}catch{const _0x116f08={};_0x116f08[_0x165675(0x168)]=-0x7fbc,_0x116f08['message']=_0x165675(0x186);const _0x42d9a0={};_0x42d9a0[_0x165675(0x143)]=_0x165675(0x155),_0x42d9a0['id']=null,_0x42d9a0[_0x165675(0x14c)]=_0x116f08,_0x948556(_0x42d9a0);continue;}if(!_0xb5358c||typeof _0xb5358c!==_0x165675(0x187)||Array[_0x165675(0x137)](_0xb5358c)||_0xb5358c[_0x165675(0x143)]!=='2.0'||_0xb5358c[_0x165675(0x16b)]!==undefined&&typeof _0xb5358c['method']!==_0x165675(0x161)){const _0x5b1453={};_0x5b1453['code']=-0x7f58,_0x5b1453[_0x165675(0x169)]=_0x165675(0x12f);const _0x1cf594={};_0x1cf594[_0x165675(0x143)]=_0x165675(0x155),_0x1cf594['id']=null,_0x1cf594['error']=_0x5b1453,_0x948556(_0x1cf594);continue;}if(!_0xb5358c[_0x165675(0x16b)])continue;if(_0xb5358c['method']===_0x165675(0x15f)){for(const _0x4b78f7 of _0x5988b3)_0x4b78f7[_0x165675(0x14d)](_0xb5358c[_0x165675(0x14e)]?.[_0x165675(0x146)]);continue;}const _0x8a3a37=JSON['stringify'](_0xb5358c['id']);if(_0xb5358c['id']!==undefined&&_0x526799[_0x165675(0x144)](_0x8a3a37)){const _0x5b43b4={};_0x5b43b4['code']=-0x7f58,_0x5b43b4[_0x165675(0x169)]=_0x165675(0x12b);const _0x19db3a={};_0x19db3a[_0x165675(0x143)]=_0x165675(0x155),_0x19db3a['id']=_0xb5358c['id'],_0x19db3a[_0x165675(0x14c)]=_0x5b43b4,_0x948556(_0x19db3a);continue;}const _0x2951de=_0x3d069f['handle'](_0xb5358c)['then'](_0x948556)[_0x165675(0x136)](_0x515792=>{const _0x251557=_0x165675,_0x4acc99={};_0x4acc99[_0x251557(0x168)]=-0x7f5b,_0x4acc99[_0x251557(0x169)]=_0x515792['code']||_0x251557(0x14a);if(_0xb5358c['id']!==undefined)_0x948556({'jsonrpc':_0x251557(0x155),'id':_0xb5358c['id'],'error':_0x4acc99});})['finally'](()=>_0x526799[_0x165675(0x156)](_0x8a3a37));if(_0xb5358c['id']!==undefined)_0x526799['set'](_0x8a3a37,_0x2951de);}}),_0x13333b['on']('end',()=>void _0x3d069f['close']()[_0x5e83e8(0x136)](_0x2bb224=>console['error']('[APT]\x20Gateway\x20shutdown\x20unconfirmed:',_0x2bb224['code']))),_0x13333b['on']('error',()=>void _0x3d069f['close']()[_0x5e83e8(0x136)](_0xc4143e=>console[_0x5e83e8(0x14c)](_0x5e83e8(0x177),_0xc4143e[_0x5e83e8(0x168)]))),_0x3d069f;}const _0x49b865={};_0x49b865[_0x4a5ff3(0x127)]=GatewaySession,_0x49b865[_0x4a5ff3(0x17c)]=startGateway,module[_0x4a5ff3(0x189)]=_0x49b865;
1
+ 'use strict';const _0x295976=_0x56c3;(function(_0x65d1a4,_0x4c067b){const _0xabb685=_0x56c3,_0x10279a=_0x65d1a4();while(!![]){try{const _0x1c6710=-parseInt(_0xabb685(0x209))/0x1*(parseInt(_0xabb685(0x1f5))/0x2)+-parseInt(_0xabb685(0x20d))/0x3*(-parseInt(_0xabb685(0x1ef))/0x4)+parseInt(_0xabb685(0x1c2))/0x5*(parseInt(_0xabb685(0x1cd))/0x6)+-parseInt(_0xabb685(0x1e4))/0x7+parseInt(_0xabb685(0x220))/0x8*(parseInt(_0xabb685(0x1e8))/0x9)+-parseInt(_0xabb685(0x1d2))/0xa+-parseInt(_0xabb685(0x21d))/0xb;if(_0x1c6710===_0x4c067b)break;else _0x10279a['push'](_0x10279a['shift']());}catch(_0x5f8b04){_0x10279a['push'](_0x10279a['shift']());}}}(_0x5240,0x75532));const {PassThrough}=require(_0x295976(0x20a)),{StringDecoder}=require(_0x295976(0x1cb)),crypto=require(_0x295976(0x1e6)),{WorkspaceGateway}=require(_0x295976(0x1f4));function _0x5240(){const _0x21abb3=['ywrK','BwvZC2fNzq','CgfYC2u','odGYntGWzwjWy0Lc','C3rYAw5NAwz5','BM90AwzPy2f0Aw9UCY9PBML0AwfSAxPLza','qvbux0Hpu1rFuKvrvuvtvf9vtLnvufbpuLrfra','zgvZDhjVEq','CMvZDw1L','Cgf1C2u','sw52ywXPzcbszxf1zxn0','C3rKAw4','BM9KztPZDhjPBMDFzgvJB2rLCG','AgfZ','nNjsu0PMAa','B3b0Aw9UCW','CMvXDwvZDa','Agv4','D29YA3nWywnL','mtq5ntG2mgH2B0XNEq','w0fqvf0Gr2f0zxDHEsbZAhv0zg93BIb1BMnVBMzPCM1LzdO','zxjYB3i','uMvXDwvZDcbVDxrJB21LigLZihvUA25VD24Gywz0zxiGy29UBMvJDgLVBIbJBg9Zzwq','DxrMoa','B25nzxnZywDL','B2jQzwn0','Dg9VBhmVBgLZDa','yNvMzMvY','Dg9VBhm','C2HHmJu2','B25Jzq','r2f0zxDHEvnLC3nPB24','zhjHAw4','CMvJzwL2zq','CgfYyw1Z','Aw5KzxHpzG','AgfUzgXL','nte1mJq5Dw9LCxjM','r0furvDbwv9pvvrqvvrFteLnsvq','BM9KztPJCNLWDg8','C3rHCNq','mtGXodLZvfnAvwG','uNvUDgLTzsbJyxrHBg9NihvUyxzHAwXHyMXL','ChvIBgLJs2v5','y2XVC2u','Ag9ZDeLK','DhjPBq','C3rKB3v0','mtC1mZeXmKvpqvrxra','CMvQzwn0','zgf0yq','y29Kzq','yMLUza','lI4VChjVEhKVD29YA3nWywnLlwDHDgv3yxK','mMHqufHnyq','BM90AwzPy2f0Aw9UCY90B29SCY9SAxn0x2nOyw5Nzwq','r2f0zxDHEunVBNrLEhq','D3jPDgu','y2HPBgrfBNzPCM9UBwvUDa','C2XPy2u','CMfUzg9Tvvvjra','CMvZDwX0','CMvZB2X2zq','Aw5WDxq','yMLUzgLUzW','r0furvDbwv9dqvrbte9hx1voqvzbsuXbqKXf','lI91CgrHDguTCMvXDwvZDa','y2f0ywXVzW','CMvXDwvZDeLK','C3rHCNrhyxrLD2f5','u3vWzxj2AxnVCG','CMvJB3zLCKjLzM9Yzvn0yxj0Dxa','C2v0','zgLNzxn0','mJq5mZnOqLrSvxO','BM9KztPZDhjLyw0','yNL0zuXLBMD0Aa','z2f0zxDHEtO','nMvftuvRBq','yxnZAwDU','AxnbCNjHEq','B3v0Chv0','y2f0y2G','zxHWB3j0CW','q29UBMvJDgLVBLn1CgvYDMLZB3i','q2HPBgqGB3v0Chv0igv4y2vLzhmGBgLTAxq','Bwv0Ag9K','r0furvDbwv9gquLmruq','C3rYAw5N','DgHLBG','ANnVBNjWyW','lI9JB25Uzwn0Aw9Ulxn1CgvYDMLZB3i','y2XLyxi','BM90AwzPy2f0Aw9UCY9Jyw5JzwXSzwq','mte3mJCWmdfLDeT6txm','DxbKyxrL','mI4W','mJKZnMfrt2zYyW','zgvSzxrL','y2f0ywXVz0HHC2G','C3vWzxj2AxnVCG','zgvJB2rLCG','uKvrvuvtvf9jrf9dt05gteLdva','C2vXDwvUy2u','tvvuqvrjt05Ft1vuq09nrv9vtKTot1Do','y3jLyxrLsgfZAa','y2fUy2vS','CgvUzgLUzW','lI9NyxrLD2f5lwnVBNrLEhq'];_0x5240=function(){return _0x21abb3;};return _0x5240();}class GatewaySession{constructor(_0x58241f,_0x2874ac){const _0x446ef2=_0x295976;this['binding']=_0x58241f,this['options']=_0x2874ac,this[_0x446ef2(0x1fe)]=new PassThrough(),this[_0x446ef2(0x210)]=new PassThrough(),this['pending']=new Map(),this[_0x446ef2(0x226)]=0x0,this['buffer']='',this[_0x446ef2(0x224)]=new StringDecoder(_0x446ef2(0x1d6));const _0x4a30a2=_0x2874ac[_0x446ef2(0x205)]||require(_0x446ef2(0x21a))[_0x446ef2(0x213)];this['supervisor']=new _0x4a30a2({..._0x2874ac,'workspace':_0x58241f[_0x446ef2(0x1d1)],'explicitWorkspace':!![],'connectionId':crypto[_0x446ef2(0x1fb)](),'gatewayBinding':_0x58241f,'stdin':this['input'],'stdout':this['output']}),this[_0x446ef2(0x210)]['on'](_0x446ef2(0x1f1),_0x47fe9d=>this[_0x446ef2(0x1e0)](_0x47fe9d));}async[_0x295976(0x1e7)](_0x1a2bbf){const _0x24fa49=_0x295976;await require(_0x24fa49(0x201))[_0x24fa49(0x206)](this[_0x24fa49(0x1ff)][_0x24fa49(0x1d1)],this[_0x24fa49(0x1ce)][_0x24fa49(0x1ea)]),await this[_0x24fa49(0x223)][_0x24fa49(0x1e7)]();const _0xab927d=await this[_0x24fa49(0x1cf)]({'method':'initialize','params':{..._0x1a2bbf,'capabilities':{},'rootPath':this[_0x24fa49(0x1ff)][_0x24fa49(0x1d1)],'rootUri':undefined,'workspaceFolders':[{'path':this[_0x24fa49(0x1ff)][_0x24fa49(0x1d1)]}]}}),_0x246b56={};_0x246b56[_0x24fa49(0x219)]=_0x24fa49(0x21f),_0x246b56[_0x24fa49(0x215)]=_0x24fa49(0x1c4),this['input'][_0x24fa49(0x1f8)](JSON[_0x24fa49(0x1c3)](_0x246b56)+'\x0a');const _0x236afd={};_0x236afd['method']=_0x24fa49(0x1d9),_0x236afd[_0x24fa49(0x1e1)]={};const _0x569711=await this[_0x24fa49(0x1cf)](_0x236afd),_0x1eba4e={};_0x1eba4e[_0x24fa49(0x1f2)]=_0x24fa49(0x200);if(!Array['isArray'](_0x569711[_0x24fa49(0x1db)]))throw Object['assign'](new Error(_0x24fa49(0x1e9)),_0x1eba4e);return this[_0x24fa49(0x202)]=_0x569711[_0x24fa49(0x1db)],this[_0x24fa49(0x222)]=crypto[_0x24fa49(0x1bb)](_0x24fa49(0x1dc))[_0x24fa49(0x21e)](JSON['stringify'](_0x569711['tools']))[_0x24fa49(0x208)](_0x24fa49(0x1d0)),this;}['request'](_0x555c47){const _0x2f411e=_0x295976,_0x20e997=_0x2f411e(0x20c)+this[_0x2f411e(0x223)]['connectionId']+':'+ ++this[_0x2f411e(0x226)];return new Promise((_0x2ede53,_0x550f5d)=>{const _0xe570a0=_0x2f411e,_0x4abfb9={};_0x4abfb9[_0xe570a0(0x1fd)]=_0x2ede53,_0x4abfb9['reject']=_0x550f5d,_0x4abfb9['hostId']=_0x555c47['id'],this[_0xe570a0(0x1bd)][_0xe570a0(0x207)](_0x20e997,_0x4abfb9);const _0x211833={..._0x555c47};_0x211833['jsonrpc']=_0xe570a0(0x21f),_0x211833['id']=_0x20e997;const _0x43c5fa=JSON[_0xe570a0(0x1c3)](_0x211833)+'\x0a';this[_0xe570a0(0x1fe)][_0xe570a0(0x1f8)](_0x43c5fa,_0x4abf0f=>{const _0x2532df=_0xe570a0;_0x4abf0f&&(this[_0x2532df(0x1bd)]['delete'](_0x20e997),_0x550f5d(_0x4abf0f));});});}['cancel'](_0x4baf68){const _0x29039c=_0x295976;for(const [_0x53a368,_0x9aa210]of this[_0x29039c(0x1bd)])if(_0x9aa210[_0x29039c(0x1ec)]===_0x4baf68)this[_0x29039c(0x1fe)][_0x29039c(0x1f8)](JSON[_0x29039c(0x1c3)]({'jsonrpc':_0x29039c(0x21f),'method':'notifications/cancelled','params':{'requestId':_0x53a368}})+'\x0a');}[_0x295976(0x1e0)](_0x211583){const _0x3d4c38=_0x295976;this[_0x3d4c38(0x1da)]+=this[_0x3d4c38(0x224)][_0x3d4c38(0x1f8)](_0x211583);if(Buffer[_0x3d4c38(0x20b)](this[_0x3d4c38(0x1da)])>0x8*0x400*0x400){for(const _0x3f643b of this[_0x3d4c38(0x1bd)]['values']())_0x3f643b[_0x3d4c38(0x1f0)](Object[_0x3d4c38(0x20e)](new Error(_0x3d4c38(0x214)),{'code':_0x3d4c38(0x1e5)}));this[_0x3d4c38(0x1bd)][_0x3d4c38(0x21b)](),void this[_0x3d4c38(0x1eb)]()[_0x3d4c38(0x211)](()=>{});return;}let _0x2da515;while((_0x2da515=this[_0x3d4c38(0x1da)][_0x3d4c38(0x1e2)]('\x0a'))>=0x0){const _0x1db292=this[_0x3d4c38(0x1da)][_0x3d4c38(0x1fa)](0x0,_0x2da515);this[_0x3d4c38(0x1da)]=this['buffer']['slice'](_0x2da515+0x1);if(!_0x1db292[_0x3d4c38(0x1ed)]())continue;let _0x6e506b;try{_0x6e506b=JSON['parse'](_0x1db292);}catch{continue;}const _0x1b11d2=this[_0x3d4c38(0x1bd)]['get'](_0x6e506b['id']);if(_0x1b11d2&&!_0x6e506b[_0x3d4c38(0x215)]){this[_0x3d4c38(0x1bd)][_0x3d4c38(0x221)](_0x6e506b['id']);if(_0x6e506b['error'])_0x1b11d2[_0x3d4c38(0x1f0)](Object[_0x3d4c38(0x20e)](new Error(_0x6e506b[_0x3d4c38(0x1d4)][_0x3d4c38(0x1c0)]),{'code':'RUNTIME_RPC_ERROR','rpcError':_0x6e506b['error']}));else _0x1b11d2[_0x3d4c38(0x1fd)](_0x6e506b[_0x3d4c38(0x1fc)]);continue;}if(_0x6e506b[_0x3d4c38(0x215)]&&_0x6e506b['id']!==undefined){const _0x49e3b0={};_0x49e3b0[_0x3d4c38(0x1f2)]=-0x7f59,_0x49e3b0[_0x3d4c38(0x1c0)]=_0x3d4c38(0x1c5);const _0x31bc8f={};_0x31bc8f[_0x3d4c38(0x219)]=_0x3d4c38(0x21f),_0x31bc8f['id']=_0x6e506b['id'],_0x31bc8f[_0x3d4c38(0x1d4)]=_0x49e3b0,this[_0x3d4c38(0x1fe)][_0x3d4c38(0x1f8)](JSON[_0x3d4c38(0x1c3)](_0x31bc8f)+'\x0a');}else _0x6e506b[_0x3d4c38(0x215)]&&_0x6e506b[_0x3d4c38(0x215)]!==_0x3d4c38(0x1f6)&&this[_0x3d4c38(0x1ce)]['onMessage']?.(_0x6e506b,this);}}async[_0x295976(0x1eb)](){const _0x4394df=_0x295976;try{await this[_0x4394df(0x223)]['close']('gateway-session-closed');}finally{for(const _0x2d242a of this[_0x4394df(0x1bd)]['values']())_0x2d242a[_0x4394df(0x1f0)](Object[_0x4394df(0x20e)](new Error(_0x4394df(0x1d5)),{'code':_0x4394df(0x1ba)}));this['pending'][_0x4394df(0x21b)](),this['input'][_0x4394df(0x1c6)](),this[_0x4394df(0x210)][_0x4394df(0x1c6)]();}}}function _0x56c3(_0x5d3505,_0xeacf24){_0x5d3505=_0x5d3505-0x1ba;const _0x524006=_0x5240();let _0x56c362=_0x524006[_0x5d3505];if(_0x56c3['GTHDMB']===undefined){var _0x4ca5c5=function(_0x429254){const _0x20dec2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x87e26c='',_0x1f288c='';for(let _0x5c23b8=0x0,_0x4127f6,_0x587a04,_0x43829c=0x0;_0x587a04=_0x429254['charAt'](_0x43829c++);~_0x587a04&&(_0x4127f6=_0x5c23b8%0x4?_0x4127f6*0x40+_0x587a04:_0x587a04,_0x5c23b8++%0x4)?_0x87e26c+=String['fromCharCode'](0xff&_0x4127f6>>(-0x2*_0x5c23b8&0x6)):0x0){_0x587a04=_0x20dec2['indexOf'](_0x587a04);}for(let _0x2a7e38=0x0,_0x4cbc73=_0x87e26c['length'];_0x2a7e38<_0x4cbc73;_0x2a7e38++){_0x1f288c+='%'+('00'+_0x87e26c['charCodeAt'](_0x2a7e38)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f288c);};_0x56c3['KOBnVt']=_0x4ca5c5,_0x56c3['yugXrI']={},_0x56c3['GTHDMB']=!![];}const _0x33ca70=_0x524006[0x0],_0x398c8a=_0x5d3505+_0x33ca70,_0x501acf=_0x56c3['yugXrI'][_0x398c8a];return!_0x501acf?(_0x56c362=_0x56c3['KOBnVt'](_0x56c362),_0x56c3['yugXrI'][_0x398c8a]=_0x56c362):_0x56c362=_0x501acf,_0x56c362;}async function startGateway(_0xe5c3c0){const _0x49b9f5=_0x295976,_0x43609a=_0xe5c3c0['stdin']||process[_0x49b9f5(0x1ca)],_0x1e34b=_0xe5c3c0['stdout']||process[_0x49b9f5(0x1ee)],_0x4115d2=new Set(),_0x133f09=new Map(),_0x5d0f2d=_0x562812=>{const _0x27d458=_0x49b9f5;if(!_0x562812)return;!_0x1e34b['write'](JSON[_0x27d458(0x1c3)](_0x562812)+'\x0a')&&(_0x43609a[_0x27d458(0x1c8)](),_0x1e34b[_0x27d458(0x1dd)](_0x27d458(0x1df),()=>_0x43609a[_0x27d458(0x1c7)]()));},_0x38a0f0={};_0x38a0f0[_0x49b9f5(0x219)]=_0x49b9f5(0x21f),_0x38a0f0[_0x49b9f5(0x215)]='notifications/tools/list_changed';const _0xfef945=new WorkspaceGateway({..._0xe5c3c0,'onCatalogChanged':()=>_0x5d0f2d(_0x38a0f0),'runtimeFactory':async(_0x4156d2,_0x216d61,_0x1b4c22)=>{const _0x1fc78e=_0x49b9f5,_0x53a88f={..._0xe5c3c0};_0x53a88f[_0x1fc78e(0x1f9)]=_0x1b4c22['env']||{},_0x53a88f[_0x1fc78e(0x1d7)]=_0x5d0f2d;const _0x4f2b4e=new GatewaySession(_0x4156d2,_0x53a88f);try{return await _0x4f2b4e[_0x1fc78e(0x1e7)](_0x216d61),_0x4115d2[_0x1fc78e(0x1bf)](_0x4f2b4e),_0x4f2b4e;}catch(_0x14fb0d){await _0x4f2b4e[_0x1fc78e(0x1eb)]()['catch'](()=>{});throw _0x14fb0d;}}}),_0x11d98d=new(require(_0x49b9f5(0x1be)))[(_0x49b9f5(0x1f7))](_0xfef945,_0xe5c3c0['contextOptions']);await _0x11d98d['start']();const _0x38bceb=_0xfef945[_0x49b9f5(0x1eb)][_0x49b9f5(0x1f3)](_0xfef945);_0xfef945[_0x49b9f5(0x1eb)]=async()=>{try{await _0x38bceb();}finally{await _0x11d98d['close']();}};let _0x1ae7dd='',_0x4cc350=new StringDecoder(_0x49b9f5(0x1d6));return _0x43609a['on'](_0x49b9f5(0x1f1),_0x4367af=>{const _0x1c7ecb=_0x49b9f5;_0x1ae7dd+=_0x4cc350[_0x1c7ecb(0x1f8)](_0x4367af);if(Buffer[_0x1c7ecb(0x20b)](_0x1ae7dd)>0x8*0x400*0x400)return void _0xfef945['close']()[_0x1c7ecb(0x211)](_0x4661e3=>console[_0x1c7ecb(0x1d4)](_0x4661e3[_0x1c7ecb(0x1f2)]));let _0x4bc265;while((_0x4bc265=_0x1ae7dd[_0x1c7ecb(0x1e2)]('\x0a'))>=0x0){const _0x2f3847=_0x1ae7dd[_0x1c7ecb(0x1fa)](0x0,_0x4bc265);_0x1ae7dd=_0x1ae7dd[_0x1c7ecb(0x1fa)](_0x4bc265+0x1);if(!_0x2f3847['trim']())continue;let _0x2c7645;try{_0x2c7645=JSON[_0x1c7ecb(0x1c1)](_0x2f3847);}catch{const _0x205a38={};_0x205a38[_0x1c7ecb(0x1f2)]=-0x7fbc,_0x205a38[_0x1c7ecb(0x1c0)]='Parse\x20error';const _0xe7a1e2={};_0xe7a1e2[_0x1c7ecb(0x219)]=_0x1c7ecb(0x21f),_0xe7a1e2['id']=null,_0xe7a1e2[_0x1c7ecb(0x1d4)]=_0x205a38,_0x5d0f2d(_0xe7a1e2);continue;}if(!_0x2c7645||typeof _0x2c7645!==_0x1c7ecb(0x1d8)||Array[_0x1c7ecb(0x20f)](_0x2c7645)||_0x2c7645[_0x1c7ecb(0x219)]!==_0x1c7ecb(0x21f)||_0x2c7645[_0x1c7ecb(0x215)]!==undefined&&typeof _0x2c7645[_0x1c7ecb(0x215)]!==_0x1c7ecb(0x217)){const _0x1a64f8={};_0x1a64f8[_0x1c7ecb(0x1f2)]=-0x7f58,_0x1a64f8[_0x1c7ecb(0x1c0)]=_0x1c7ecb(0x1c9);const _0x408162={};_0x408162[_0x1c7ecb(0x219)]=_0x1c7ecb(0x21f),_0x408162['id']=null,_0x408162[_0x1c7ecb(0x1d4)]=_0x1a64f8,_0x5d0f2d(_0x408162);continue;}if(!_0x2c7645['method'])continue;if(_0x2c7645[_0x1c7ecb(0x215)]===_0x1c7ecb(0x21c)){for(const _0x151fe0 of _0x4115d2)_0x151fe0[_0x1c7ecb(0x1bc)](_0x2c7645['params']?.[_0x1c7ecb(0x203)]);continue;}const _0x3a99da=JSON['stringify'](_0x2c7645['id']);if(_0x2c7645['id']!==undefined&&_0x133f09[_0x1c7ecb(0x1cc)](_0x3a99da)){const _0x64da1f={};_0x64da1f[_0x1c7ecb(0x1f2)]=-0x7f58,_0x64da1f[_0x1c7ecb(0x1c0)]=_0x1c7ecb(0x225);const _0x15020a={};_0x15020a[_0x1c7ecb(0x219)]=_0x1c7ecb(0x21f),_0x15020a['id']=_0x2c7645['id'],_0x15020a[_0x1c7ecb(0x1d4)]=_0x64da1f,_0x5d0f2d(_0x15020a);continue;}const _0x4dbf16=_0xfef945[_0x1c7ecb(0x1e3)](_0x2c7645)[_0x1c7ecb(0x218)](_0x5d0f2d)[_0x1c7ecb(0x211)](_0x1a81c9=>{const _0x5c4078=_0x1c7ecb,_0x5e4b11={};_0x5e4b11['code']=-0x7f5b,_0x5e4b11['message']=_0x1a81c9[_0x5c4078(0x1f2)]||_0x5c4078(0x216);if(_0x2c7645['id']!==undefined)_0x5d0f2d({'jsonrpc':_0x5c4078(0x21f),'id':_0x2c7645['id'],'error':_0x5e4b11});})['finally'](()=>_0x133f09['delete'](_0x3a99da));if(_0x2c7645['id']!==undefined)_0x133f09['set'](_0x3a99da,_0x4dbf16);}}),_0x43609a['on']('end',()=>void _0xfef945[_0x49b9f5(0x1eb)]()['catch'](_0xa1450e=>console[_0x49b9f5(0x1d4)](_0x49b9f5(0x1d3),_0xa1450e[_0x49b9f5(0x1f2)]))),_0x43609a['on'](_0x49b9f5(0x1d4),()=>void _0xfef945[_0x49b9f5(0x1eb)]()[_0x49b9f5(0x211)](_0x36b245=>console[_0x49b9f5(0x1d4)](_0x49b9f5(0x1d3),_0x36b245[_0x49b9f5(0x1f2)]))),_0xfef945;}const _0x452223={};_0x452223[_0x295976(0x1de)]=GatewaySession,_0x452223[_0x295976(0x204)]=startGateway,module[_0x295976(0x212)]=_0x452223;
@@ -1 +1 @@
1
- const _0x13541d=_0x5a93;(function(_0x36007e,_0x189fbe){const _0x2ebc4d=_0x5a93,_0x509be6=_0x36007e();while(!![]){try{const _0x49046a=parseInt(_0x2ebc4d(0x16a))/0x1*(-parseInt(_0x2ebc4d(0x16f))/0x2)+-parseInt(_0x2ebc4d(0x17a))/0x3*(-parseInt(_0x2ebc4d(0x17c))/0x4)+parseInt(_0x2ebc4d(0x1ac))/0x5+-parseInt(_0x2ebc4d(0x189))/0x6+parseInt(_0x2ebc4d(0x1a3))/0x7*(-parseInt(_0x2ebc4d(0x18f))/0x8)+-parseInt(_0x2ebc4d(0x1ab))/0x9+parseInt(_0x2ebc4d(0x1a2))/0xa*(parseInt(_0x2ebc4d(0x180))/0xb);if(_0x49046a===_0x189fbe)break;else _0x509be6['push'](_0x509be6['shift']());}catch(_0x533ebd){_0x509be6['push'](_0x509be6['shift']());}}}(_0x1d03,0xcd0cc));const fs=require('fs'),path=require(_0x13541d(0x191)),os=require('os'),child_process=require(_0x13541d(0x182));function sanitizeErrorMessage(_0x5b14db){const _0x17d0fe=_0x13541d;if(!_0x5b14db)return _0x5b14db;return _0x5b14db['replace'](/@colbymchenry\/codegraph/g,'code\x20intelligence\x20engine')[_0x17d0fe(0x169)](/code-review-graph/g,_0x17d0fe(0x1a7))[_0x17d0fe(0x169)](/code_review_graph/g,_0x17d0fe(0x1a7))[_0x17d0fe(0x169)](/@modelcontextprotocol\/server-memory/g,_0x17d0fe(0x179));}function _0x1d03(){const _0x4b32be=['mta4mhbLuvrlyq','zMLSDgvY','Cgf0Aa','lI4U','zgLYBMfTzq','icaXlIbsDw5UAw5NihrOzsbZzxr1CcbJB21Tyw5KihDPDgGGC3vKBZO','ic1TihbPCa','CgLWzq','CgLWmW','Aw5JBhvKzxm','lMDSB2jHBc1PBNn0ywXSzwq','zxHPC3rZu3LUyW','CgvYBwLZC2LVBG','yMfJA2vUzfbYB2zPBgu','Bg9N','DxrMoa','zxzLCNK','ChL0Ag9UmW','Aw5ZDgfSBa','mJbbuwTZC0q','ntG4mJfQyvvkExC','yNjVD3nLCI1SB2nHBa','cVcFKQeGvgLWoIbuAgLZigXVB2TZigXPA2uGysbWzxjTAxnZAw9UigLZC3vLlIbqBgvHC2uGDhj5igvPDgHLCJO','C2TPChbLza','z3jHCgGGyw5HBhLZAxmGzw5NAw5L','zxHLy1n5BMm','lsblBM93BgvKz2uGCgvYC2LZDgvUy2uGBgf5zxiGChjVDMLZAw9UzwqGAw4GDgHLiefqvcbIywnRzw5KihbYB2zPBguU','BwTKAxjtEw5J','mJu2nJqWngLzu0rAqq','nJqYmduWnvDSAufrCW','ms4WlJa','Dg9ju09tDhjPBMC','lMfUAgrO','Aw5ZCgvJDa','C3rKAw8','AwDUB3jL','lI4VyMfJA2vUzhmVChjVzMLSzxm','CgfJA2fNzvzLCNnPB24','C3vJy2vZCW','CgfYC2u','CMvWBgfJzq','oeDowNrpyW','Ag9TzwrPCG','z2v0rgvMyxvSDe1HCMTLCLbHDgG','Aw5ZDgfSBeDSB2jHBfrVB2XZ','ufjprKLmrq','mJGWmdHYBu9RDxq','AM9PBG','Dg9tDhjPBMC','rxjYB3iGzhvYAw5NigDSB2jHBcbKzxbLBMrLBMnPzxmGAw5ZDgfSBgf0Aw9UoG','BwvZC2fNzq','CgvYBq','ihrVia','CMvJDxjZAxzL','D3jPDgvgAwXLu3LUyW','rufdq0vt','A25VD2XLzgDLihbLCNnPC3rLBMnLigXHEwvY','nZK0mtmZreH0BxD3','lI4VlI4VCgfJA2fNzs5QC29U','nhjbqKXAtG','zxjYB3i','sw5ZDgfSBgLUzYbNBg9IywWGtunqiefNzw50igrLCgvUzgvUy2LLCY4UlG','DhjPBq','mte0nJy4mJLpy2fit2q','ic0TDMvYC2LVBG','y2HPBgrFChjVy2vZCW','C3rYAw5NAwz5','DMvYC2LVBG','CMvHzezPBgvtEw5J','icaYlIbpCIbMAxHPBMCGEw91CIbUCg0Gz2XVyMfSigrPCMvJDg9YEsbWzxjTAxnZAw9UCYaOAhr0Chm6lY9KB2nZlM5WBwPZlMnVBs9YzxnVBhzPBMCTzwfJy2vZlxbLCM1PC3nPB25ZlwvYCM9YCY13AgvUlwLUC3rHBgXPBMCTCgfJA2fNzxmTz2XVyMfSBhKPcG','Dg9mB3DLCKnHC2u','C3rKzxjY','nZu3mZi3ohnszK9IvG','ms4YlJm1','CgLW','vxbNCMfKAw5NigDSB2jHBcbnq1aGqwDLBNqGzgvWzw5Kzw5JAwvZigzYB20GDMvYC2LVBIa','rMfPBgvKihrVigLUC3rHBgWGz2XVyMfSie1ducb0B29SCZOG','ChL0Ag9U'];_0x1d03=function(){return _0x4b32be;};return _0x1d03();}function getDefaultMarkerPath(){const _0x1fc7fe=_0x13541d;return path['join'](os[_0x1fc7fe(0x16b)](),_0x1fc7fe(0x1af),_0x1fc7fe(0x199));}function resolvePip(){const _0x9bf2bf=_0x13541d,_0x539329=require(_0x9bf2bf(0x182));let _0x83dfe1=_0x9bf2bf(0x18e);for(const _0x260d8b of['python3','python','py']){try{const _0x24b532={};_0x24b532[_0x9bf2bf(0x1b1)]=[_0x9bf2bf(0x196),_0x9bf2bf(0x196),'ignore'],_0x539329[_0x9bf2bf(0x1a8)](_0x260d8b+_0x9bf2bf(0x181),_0x24b532),_0x83dfe1=_0x260d8b;break;}catch(_0x1cfeb0){}}for(const _0x40f5f2 of[_0x9bf2bf(0x197),'pip',_0x83dfe1+_0x9bf2bf(0x195)]){try{const _0x2e7ac={};_0x2e7ac[_0x9bf2bf(0x1b1)]=['pipe','pipe',_0x9bf2bf(0x1b2)];const _0x136736=_0x539329[_0x9bf2bf(0x1a8)](_0x40f5f2+_0x9bf2bf(0x181),_0x2e7ac)['toString']()[_0x9bf2bf(0x17f)]();if(_0x136736[_0x9bf2bf(0x187)]()['includes']('pip'))return _0x40f5f2;}catch(_0x5813e1){}}return _0x9bf2bf(0x18b);}function resolvePython(){const _0x12be77=_0x13541d,_0x931cba=require(_0x12be77(0x182));for(const _0x21d529 of[_0x12be77(0x1a0),'python','py']){try{const _0x345c8c={};return _0x345c8c['stdio']=[_0x12be77(0x196),_0x12be77(0x196),'ignore'],_0x931cba[_0x12be77(0x1a8)](_0x21d529+_0x12be77(0x181),_0x345c8c),_0x21d529;}catch(_0x3f153a){}}return _0x12be77(0x18e);}function _0x5a93(_0x2323da,_0x3466df){_0x2323da=_0x2323da-0x167;const _0x1d032d=_0x1d03();let _0x5a93d3=_0x1d032d[_0x2323da];if(_0x5a93['nhAYMN']===undefined){var _0x511df2=function(_0x5abc73){const _0x2656f0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1be08b='',_0x473664='';for(let _0x2937aa=0x0,_0x171f36,_0x2ccec4,_0x40f00f=0x0;_0x2ccec4=_0x5abc73['charAt'](_0x40f00f++);~_0x2ccec4&&(_0x171f36=_0x2937aa%0x4?_0x171f36*0x40+_0x2ccec4:_0x2ccec4,_0x2937aa++%0x4)?_0x1be08b+=String['fromCharCode'](0xff&_0x171f36>>(-0x2*_0x2937aa&0x6)):0x0){_0x2ccec4=_0x2656f0['indexOf'](_0x2ccec4);}for(let _0x20bb91=0x0,_0x1a7168=_0x1be08b['length'];_0x20bb91<_0x1a7168;_0x20bb91++){_0x473664+='%'+('00'+_0x1be08b['charCodeAt'](_0x20bb91)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x473664);};_0x5a93['qmdRyw']=_0x511df2,_0x5a93['ueLBYR']={},_0x5a93['nhAYMN']=!![];}const _0x570876=_0x1d032d[0x0],_0x548f1f=_0x2323da+_0x570876,_0x96abf1=_0x5a93['ueLBYR'][_0x548f1f];return!_0x96abf1?(_0x5a93d3=_0x5a93['qmdRyw'](_0x5a93d3),_0x5a93['ueLBYR'][_0x548f1f]=_0x5a93d3):_0x5a93d3=_0x96abf1,_0x5a93d3;}function installGlobalTools(_0xfb242c=getDefaultMarkerPath()){const _0x33a5f6=_0x13541d,_0xe8a46c=path[_0x33a5f6(0x170)](__dirname,_0x33a5f6(0x17b)),_0x5d2f85={};_0x5d2f85['version']=_0x33a5f6(0x18a);let _0x584fed=_0x5d2f85;try{_0x584fed=JSON[_0x33a5f6(0x168)](fs['readFileSync'](_0xe8a46c,_0x33a5f6(0x19e)));}catch(_0x465e2f){}if(fs[_0x33a5f6(0x19a)](_0xfb242c))try{const _0x371c7a=JSON[_0x33a5f6(0x168)](fs[_0x33a5f6(0x185)](_0xfb242c,_0x33a5f6(0x19e)));if(_0x371c7a[_0x33a5f6(0x1b4)]===_0x584fed[_0x33a5f6(0x184)]&&_0x371c7a[_0x33a5f6(0x19c)]===require(_0x33a5f6(0x1b3))[_0x33a5f6(0x16e)]&&Object['entries'](require(_0x33a5f6(0x1b3))[_0x33a5f6(0x1b0)]())[_0x33a5f6(0x190)](([_0x5bb239])=>_0x5bb239!==_0x33a5f6(0x1a4))[_0x33a5f6(0x19f)](([,_0x444076])=>_0x444076['configured'])){const _0x15fee1={};return _0x15fee1[_0x33a5f6(0x167)]=!![],_0x15fee1[_0x33a5f6(0x1a6)]=!![],_0x15fee1;}console[_0x33a5f6(0x19d)](_0x33a5f6(0x18c)+(_0x371c7a[_0x33a5f6(0x1b4)]||_0x33a5f6(0x1ad))+_0x33a5f6(0x175)+_0x584fed[_0x33a5f6(0x184)]+_0x33a5f6(0x192));}catch(_0xf63a6){}console[_0x33a5f6(0x19d)](_0x33a5f6(0x17e));try{require('../backends/profiles')[_0x33a5f6(0x1a1)](),console[_0x33a5f6(0x19d)](_0x33a5f6(0x1a9));const _0x201371=path[_0x33a5f6(0x193)](_0xfb242c);if(!fs['existsSync'](_0x201371)){const _0x16abe1={};_0x16abe1[_0x33a5f6(0x176)]=!![],fs[_0x33a5f6(0x1aa)](_0x201371,_0x16abe1);}fs[_0x33a5f6(0x177)](_0xfb242c,JSON[_0x33a5f6(0x183)]({'packageVersion':_0x584fed[_0x33a5f6(0x184)],'backendProfile':require('../backends/profiles')['PROFILE'],'installedAt':new Date()[_0x33a5f6(0x1ae)](),'status':_0x33a5f6(0x167)}),_0x33a5f6(0x19e)),console['log']('Global\x20MCP\x20Agent\x20dependencies\x20installed\x20successfully.');const _0x371f80={};return _0x371f80[_0x33a5f6(0x167)]=!![],_0x371f80[_0x33a5f6(0x1a6)]=![],_0x371f80;}catch(_0xf7622){const _0x4f636f=_0xf7622[_0x33a5f6(0x188)]?_0xf7622[_0x33a5f6(0x188)][_0x33a5f6(0x171)](_0x33a5f6(0x19e)):'',_0x278709=sanitizeErrorMessage(_0xf7622[_0x33a5f6(0x173)]),_0x153d3a=sanitizeErrorMessage(_0x4f636f);console['error'](_0x33a5f6(0x172),_0x278709);_0x153d3a&&console[_0x33a5f6(0x17d)]('Command\x20stderr\x20output:\x0a'+_0x153d3a);(_0x278709[_0x33a5f6(0x198)](_0x33a5f6(0x178))||_0x153d3a[_0x33a5f6(0x198)](_0x33a5f6(0x178))||_0x278709['includes'](_0x33a5f6(0x19b))||_0x153d3a['includes']('permission')||_0x278709[_0x33a5f6(0x198)](_0x33a5f6(0x174))||_0x153d3a[_0x33a5f6(0x198)]('perm'))&&(console[_0x33a5f6(0x17d)](_0x33a5f6(0x1a5)),console[_0x33a5f6(0x17d)](_0x33a5f6(0x194)),console[_0x33a5f6(0x17d)]('\x20\x20\x20\x20\x20sudo\x20npx\x20apt-mcp-agent-setup\x20install\x20--key\x20<KEY>'),console[_0x33a5f6(0x17d)](_0x33a5f6(0x186)));throw new Error(_0x33a5f6(0x18d)+_0x278709);}}const _0x1a7168={};_0x1a7168[_0x13541d(0x16c)]=getDefaultMarkerPath,_0x1a7168[_0x13541d(0x16d)]=installGlobalTools,module['exports']=_0x1a7168;
1
+ const _0x1666c1=_0x4fef;(function(_0x1b23fd,_0x2e0f9a){const _0x197a93=_0x4fef,_0x281a55=_0x1b23fd();while(!![]){try{const _0x4fe047=-parseInt(_0x197a93(0x1ed))/0x1+-parseInt(_0x197a93(0x205))/0x2*(parseInt(_0x197a93(0x210))/0x3)+parseInt(_0x197a93(0x1f4))/0x4+-parseInt(_0x197a93(0x21d))/0x5*(parseInt(_0x197a93(0x219))/0x6)+-parseInt(_0x197a93(0x1ee))/0x7*(parseInt(_0x197a93(0x228))/0x8)+-parseInt(_0x197a93(0x222))/0x9*(parseInt(_0x197a93(0x201))/0xa)+parseInt(_0x197a93(0x229))/0xb;if(_0x4fe047===_0x2e0f9a)break;else _0x281a55['push'](_0x281a55['shift']());}catch(_0x1ab00f){_0x281a55['push'](_0x281a55['shift']());}}}(_0x3de3,0xbde5d));const fs=require('fs'),path=require(_0x1666c1(0x22e)),os=require('os'),child_process=require('child_process');function _0x4fef(_0x3d0878,_0x22cb53){_0x3d0878=_0x3d0878-0x1e8;const _0x3de376=_0x3de3();let _0x4fef17=_0x3de376[_0x3d0878];if(_0x4fef['MkEpvh']===undefined){var _0x10e40d=function(_0x5782b0){const _0x47d15b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x53e93e='',_0xc311f2='';for(let _0x40bf9b=0x0,_0x33a643,_0x471779,_0x3207d4=0x0;_0x471779=_0x5782b0['charAt'](_0x3207d4++);~_0x471779&&(_0x33a643=_0x40bf9b%0x4?_0x33a643*0x40+_0x471779:_0x471779,_0x40bf9b++%0x4)?_0x53e93e+=String['fromCharCode'](0xff&_0x33a643>>(-0x2*_0x40bf9b&0x6)):0x0){_0x471779=_0x47d15b['indexOf'](_0x471779);}for(let _0x1c318e=0x0,_0x127664=_0x53e93e['length'];_0x1c318e<_0x127664;_0x1c318e++){_0xc311f2+='%'+('00'+_0x53e93e['charCodeAt'](_0x1c318e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc311f2);};_0x4fef['WHWiNT']=_0x10e40d,_0x4fef['TcUTcR']={},_0x4fef['MkEpvh']=!![];}const _0x56664d=_0x3de376[0x0],_0x3a6ef0=_0x3d0878+_0x56664d,_0x1f978a=_0x4fef['TcUTcR'][_0x3a6ef0];return!_0x1f978a?(_0x4fef17=_0x4fef['WHWiNT'](_0x4fef17),_0x4fef['TcUTcR'][_0x3a6ef0]=_0x4fef17):_0x4fef17=_0x1f978a,_0x4fef17;}function sanitizeErrorMessage(_0x341e97){const _0x9d3f0=_0x1666c1;if(!_0x341e97)return _0x341e97;return _0x341e97[_0x9d3f0(0x200)](/@colbymchenry\/codegraph/g,'code\x20intelligence\x20engine')[_0x9d3f0(0x200)](/code-review-graph/g,'graph\x20analysis\x20engine')[_0x9d3f0(0x200)](/code_review_graph/g,_0x9d3f0(0x212))[_0x9d3f0(0x200)](/@modelcontextprotocol\/server-memory/g,_0x9d3f0(0x21c));}function getDefaultMarkerPath(){const _0x2c8b7c=_0x1666c1;return path[_0x2c8b7c(0x20a)](os['homedir'](),_0x2c8b7c(0x231),_0x2c8b7c(0x22b));}function resolvePip(){const _0x516675=_0x1666c1,_0xc3d3a6=require('child_process');let _0x36ae72=_0x516675(0x224);for(const _0x1521d7 of[_0x516675(0x20e),_0x516675(0x224),'py']){try{const _0x4ab497={};_0x4ab497[_0x516675(0x21f)]=['pipe',_0x516675(0x1f3),'ignore'],_0xc3d3a6['execSync'](_0x1521d7+_0x516675(0x227),_0x4ab497),_0x36ae72=_0x1521d7;break;}catch(_0x1d96e4){}}for(const _0x51494b of[_0x516675(0x1e9),_0x516675(0x1ef),_0x36ae72+_0x516675(0x1fa)]){try{const _0x44a1aa={};_0x44a1aa[_0x516675(0x21f)]=[_0x516675(0x1f3),_0x516675(0x1f3),_0x516675(0x21e)];const _0x3491a8=_0xc3d3a6[_0x516675(0x203)](_0x51494b+'\x20--version',_0x44a1aa)[_0x516675(0x216)]()[_0x516675(0x214)]();if(_0x3491a8[_0x516675(0x20f)]()[_0x516675(0x1fc)](_0x516675(0x1ef)))return _0x51494b;}catch(_0x1cf521){}}return'pip';}function _0x3de3(){const _0x515223=['ic1TihbPCa','BwTKAxjtEw5J','Aw5JBhvKzxm','ufjprKLmrq','q29TBwfUzcbZDgrLCNiGB3v0Chv0oGO','Bg9N','CMvWBgfJzq','ntuWodeXmejAzLHQuW','lI4VlI4VCgfJA2fNzs5QC29U','zxHLy1n5BMm','BwvZC2fNzq','mJq2CuHMwvvb','ms4YlJm1','CgfYC2u','CgvYBwLZC2LVBG','y2HPBgrFChjVy2vZCW','AM9PBG','Dg9ju09tDhjPBMC','C3vJy2vZCW','C3rYAw5NAwz5','ChL0Ag9UmW','Dg9mB3DLCKnHC2u','mty1ndHeC1jgsLu','C3rKzxjY','z3jHCgGGyw5HBhLZAxmGzw5NAw5L','icaXlIbsDw5UAw5NihrOzsbZzxr1CcbJB21Tyw5KihDPDgGGC3vKBZO','DhjPBq','z2v0rgvMyxvSDe1HCMTLCLbHDgG','Dg9tDhjPBMC','lI4VyMfJA2vUzhmVChjVzMLSzxm','CgvYBq','ndyZotHhvujdsfu','Aw5ZCgvJDa','lI4U','A25VD2XLzgDLihbLCNnPC3rLBMnLigXHEwvY','mtm1uMDzthjI','AwDUB3jL','C3rKAw8','vxbNCMfKAw5NigDSB2jHBcbnq1aGqwDLBNqGzgvWzw5Kzw5JAwvZigzYB20GDMvYC2LVBIa','lsblBM93BgvKz2uGCgvYC2LZDgvUy2uGBgf5zxiGChjVDMLZAw9UzwqGAw4GDgHLiefqvcbIywnRzw5KihbYB2zPBguU','ovr0Eg5XCW','CMvHzezPBgvtEw5J','ChL0Ag9U','zxjYB3i','rufdq0vt','ic0TDMvYC2LVBG','nZjUBer2CeO','ndyXnZK0odvqvKvjsgm','Aw5ZDgfSBa','lMDSB2jHBc1PBNn0ywXSzwq','rMfPBgvKihrVigLUC3rHBgWGz2XVyMfSie1ducb0B29SCZOG','yNjVD3nLCI1SB2nHBa','Cgf0Aa','CgfJA2fNzvzLCNnPB24','ihrVia','lMfUAgrO','icaYlIbpCIbMAxHPBMCGEw91CIbUCg0Gz2XVyMfSigrPCMvJDg9YEsbWzxjTAxnZAw9UCYaOAhr0Chm6lY9KB2nZlM5WBwPZlMnVBs9YzxnVBhzPBMCTzwfJy2vZlxbLCM1PC3nPB25ZlwvYCM9YCY13AgvUlwLUC3rHBgXPBMCTCgfJA2fNzxmTz2XVyMfSBhKPcG','CgLWmW','CMvJDxjZAxzL','zxHPC3rZu3LUyW','zxHWB3j0CW','nZGXnZK0ugn0y0zV','mta1ntCXouj6v1DiEa','CgLW','r2XVyMfSie1ducbbz2vUDcbKzxbLBMrLBMnPzxmGAw5ZDgfSBgvKihn1y2nLC3nMDwXSEs4','ms4WlJa','C2TPChbLza','CgLWzq','nJi3nJeYEuT5CuvP','zxzLCNK','zw50CMLLCW','DxrMoa','DMvYC2LVBG','zMLSDgvY'];_0x3de3=function(){return _0x515223;};return _0x3de3();}function resolvePython(){const _0x2d3c64=_0x1666c1,_0x1b3e90=require(_0x2d3c64(0x209));for(const _0x2c576d of['python3',_0x2d3c64(0x224),'py']){try{const _0x2f2f9a={};return _0x2f2f9a[_0x2d3c64(0x21f)]=[_0x2d3c64(0x1f3),_0x2d3c64(0x1f3),_0x2d3c64(0x21e)],_0x1b3e90[_0x2d3c64(0x203)](_0x2c576d+_0x2d3c64(0x227),_0x2f2f9a),_0x2c576d;}catch(_0x53a50b){}}return'python';}function installGlobalTools(_0x141e86=getDefaultMarkerPath()){const _0x4d64f8=_0x1666c1,_0x112da4=path['join'](__dirname,_0x4d64f8(0x202)),_0x436bbe={};_0x436bbe['version']=_0x4d64f8(0x206);let _0x26df95=_0x436bbe;try{_0x26df95=JSON[_0x4d64f8(0x207)](fs[_0x4d64f8(0x223)](_0x112da4,'utf8'));}catch(_0x216c60){}if(fs[_0x4d64f8(0x1eb)](_0x141e86))try{const _0xa30eab=JSON[_0x4d64f8(0x207)](fs[_0x4d64f8(0x223)](_0x141e86,'utf8'));if(_0xa30eab[_0x4d64f8(0x22f)]===_0x26df95[_0x4d64f8(0x1f8)]&&_0xa30eab['backendProfile']===require(_0x4d64f8(0x217))[_0x4d64f8(0x1fd)]&&Object[_0x4d64f8(0x1f6)](require(_0x4d64f8(0x217))[_0x4d64f8(0x21a)]())[_0x4d64f8(0x1f9)](([_0x55b351])=>_0x55b351!==_0x4d64f8(0x22d))[_0x4d64f8(0x1f5)](([,_0x1d93a8])=>_0x1d93a8['configured'])){const _0x50ee6f={};return _0x50ee6f[_0x4d64f8(0x20c)]=!![],_0x50ee6f['skipped']=!![],_0x50ee6f;}console[_0x4d64f8(0x1ff)](_0x4d64f8(0x220)+(_0xa30eab[_0x4d64f8(0x22f)]||_0x4d64f8(0x1f1))+_0x4d64f8(0x230)+_0x26df95[_0x4d64f8(0x1f8)]+_0x4d64f8(0x21b));}catch(_0x51b80d){}console[_0x4d64f8(0x1ff)]('Installing\x20global\x20MCP\x20Agent\x20dependencies...');try{require(_0x4d64f8(0x217))[_0x4d64f8(0x22a)](),console[_0x4d64f8(0x1ff)](_0x4d64f8(0x221));const _0x42554f=path['dirname'](_0x141e86);if(!fs['existsSync'](_0x42554f)){const _0x2f1edf={};_0x2f1edf[_0x4d64f8(0x1ea)]=!![],fs[_0x4d64f8(0x1fb)](_0x42554f,_0x2f1edf);}fs['writeFileSync'](_0x141e86,JSON[_0x4d64f8(0x20d)]({'packageVersion':_0x26df95[_0x4d64f8(0x1f8)],'backendProfile':require(_0x4d64f8(0x217))[_0x4d64f8(0x1fd)],'installedAt':new Date()[_0x4d64f8(0x20b)](),'status':'success'}),_0x4d64f8(0x1f7)),console[_0x4d64f8(0x1ff)](_0x4d64f8(0x1f0));const _0x58e020={};return _0x58e020[_0x4d64f8(0x20c)]=!![],_0x58e020[_0x4d64f8(0x1f2)]=![],_0x58e020;}catch(_0x27b175){const _0x13b5a6=_0x27b175[_0x4d64f8(0x211)]?_0x27b175['stderr']['toString'](_0x4d64f8(0x1f7)):'',_0x36a01e=sanitizeErrorMessage(_0x27b175[_0x4d64f8(0x204)]),_0x49b8b5=sanitizeErrorMessage(_0x13b5a6);console['error']('Error\x20during\x20global\x20dependencies\x20installation:',_0x36a01e);_0x49b8b5&&console[_0x4d64f8(0x225)](_0x4d64f8(0x1fe)+_0x49b8b5);(_0x36a01e['includes'](_0x4d64f8(0x226))||_0x49b8b5[_0x4d64f8(0x1fc)]('EACCES')||_0x36a01e[_0x4d64f8(0x1fc)](_0x4d64f8(0x208))||_0x49b8b5['includes']('permission')||_0x36a01e['includes']('perm')||_0x49b8b5[_0x4d64f8(0x1fc)](_0x4d64f8(0x218)))&&(console[_0x4d64f8(0x225)]('\x0a💡\x20Tip:\x20This\x20looks\x20like\x20a\x20permission\x20issue.\x20Please\x20try\x20either:'),console[_0x4d64f8(0x225)](_0x4d64f8(0x213)),console[_0x4d64f8(0x225)]('\x20\x20\x20\x20\x20sudo\x20npx\x20apt-mcp-agent-setup\x20install\x20--key\x20<KEY>'),console['error'](_0x4d64f8(0x1e8)));throw new Error(_0x4d64f8(0x22c)+_0x36a01e);}}const _0x127664={};_0x127664[_0x1666c1(0x215)]=getDefaultMarkerPath,_0x127664['installGlobalTools']=installGlobalTools,module[_0x1666c1(0x1ec)]=_0x127664;
@@ -1 +1 @@
1
- 'use strict';const _0x5776c0=_0x3a46;(function(_0x5c9ed4,_0xfb2afc){const _0x2a3192=_0x3a46,_0x2dc169=_0x5c9ed4();while(!![]){try{const _0x34dbef=-parseInt(_0x2a3192(0x8c))/0x1*(parseInt(_0x2a3192(0x8e))/0x2)+parseInt(_0x2a3192(0xb5))/0x3*(parseInt(_0x2a3192(0xa8))/0x4)+parseInt(_0x2a3192(0x9e))/0x5+parseInt(_0x2a3192(0x79))/0x6*(-parseInt(_0x2a3192(0xa2))/0x7)+parseInt(_0x2a3192(0x96))/0x8*(-parseInt(_0x2a3192(0x76))/0x9)+parseInt(_0x2a3192(0x97))/0xa+parseInt(_0x2a3192(0xb0))/0xb*(parseInt(_0x2a3192(0x8f))/0xc);if(_0x34dbef===_0xfb2afc)break;else _0x2dc169['push'](_0x2dc169['shift']());}catch(_0x4fd0f5){_0x2dc169['push'](_0x2dc169['shift']());}}}(_0x196d,0xccc66));const crypto=require(_0x5776c0(0x89)),connectionActivation=require(_0x5776c0(0xa9));function hookContextClient(_0x31f89a,_0x331ccf){return{async 'issue'(_0x398311){const _0x494eee=_0x3a46,_0x4a44f8=crypto[_0x494eee(0x93)](0x20)[_0x494eee(0x99)](_0x494eee(0x9b)),_0x2f495b={};_0x2f495b[_0x494eee(0x87)]=_0x398311['tool'],_0x2f495b[_0x494eee(0x7e)]=_0x398311['toolUseId'],_0x2f495b['arguments']=_0x398311[_0x494eee(0x90)],_0x2f495b[_0x494eee(0x95)]=_0x398311[_0x494eee(0x95)],_0x2f495b[_0x494eee(0x8a)]=_0x331ccf[_0x494eee(0x86)]||null,_0x2f495b[_0x494eee(0x82)]=_0x331ccf[_0x494eee(0xb6)],_0x2f495b['requestedToken']=_0x4a44f8;const _0x524c2c=_0x2f495b;if(_0x398311[_0x494eee(0x87)]===_0x494eee(0xa5)&&!_0x524c2c['nativeChild'])await require('./gateway-context')[_0x494eee(0xb2)](_0x31f89a,_0x524c2c);const _0x328991=connectionActivation['listWorkspaceReceipts'](_0x31f89a)[_0x494eee(0xa7)](_0x300db9=>_0x300db9['supervisorProtocol']===0x2),_0x3ad476={};_0x3ad476[_0x494eee(0x83)]=_0x494eee(0x7c);if(!_0x328991[_0x494eee(0x94)])throw Object[_0x494eee(0x92)](new Error(_0x494eee(0x9a)),_0x3ad476);let _0x44cfb9=0x0,_0x462ce=_0x494eee(0x7c),_0x2939a8=-0x1;const _0x3aeb72=[],_0x35e332={};_0x35e332[_0x494eee(0xa1)]=_0x524c2c,_0x35e332[_0x494eee(0xaf)]=0x1388;const _0x2d398a=await Promise['allSettled'](_0x328991['map'](_0x3745da=>connectionActivation['controlConnection'](_0x3745da,_0x494eee(0x9f),_0x35e332)));for(const [_0x25795a,_0x2c01bf]of _0x2d398a[_0x494eee(0x85)]()){const _0x5bef70={};_0x5bef70['code']=_0x494eee(0x7c);const _0x15f88c=_0x2c01bf[_0x494eee(0xaa)]===_0x494eee(0x7b)?_0x2c01bf[_0x494eee(0x88)]:_0x5bef70,_0x1f005b=_0x15f88c[_0x494eee(0xb1)]===_0x494eee(0x91),_0x5278f5={};_0x5278f5['connectionId']=_0x328991[_0x25795a][_0x494eee(0x78)],_0x5278f5[_0x494eee(0xaa)]=_0x15f88c[_0x494eee(0xaa)]||'failed',_0x5278f5[_0x494eee(0x83)]=_0x15f88c[_0x494eee(0x83)]||null,_0x5278f5[_0x494eee(0xb4)]=_0x1f005b,_0x3aeb72[_0x494eee(0x9c)](_0x5278f5);if(_0x15f88c[_0x494eee(0xb1)]===_0x494eee(0x91)&&_0x15f88c[_0x494eee(0xaa)]===_0x494eee(0xad)&&_0x15f88c[_0x494eee(0xae)]===_0x4a44f8)_0x44cfb9++;else{const _0x30f0dc=_0x1f005b?_0x15f88c[_0x494eee(0x83)]?.[_0x494eee(0x8d)](_0x494eee(0xb3))?0x3:0x2:0x0;_0x30f0dc>_0x2939a8&&(_0x462ce=_0x15f88c['code']||'CALLER_CONTEXT_UNAVAILABLE',_0x2939a8=_0x30f0dc);}}if(!_0x44cfb9)throw Object[_0x494eee(0x92)](new Error(_0x462ce),{'code':_0x462ce,'diagnostics':_0x3aeb72});return _0x4a44f8;}};}async function verifyGatewayBinding(_0x485cf2,_0x11dad0){const _0x2c66eb=_0x5776c0;if(!_0x11dad0)return![];const _0x5a2a3e=connectionActivation[_0x2c66eb(0x98)](_0x485cf2)[_0x2c66eb(0xa7)](_0x381130=>_0x381130[_0x2c66eb(0x8b)]===0x2),_0x51fb08={};_0x51fb08[_0x2c66eb(0xaf)]=0x1388;const _0x554d3f=await Promise[_0x2c66eb(0x80)](_0x5a2a3e[_0x2c66eb(0x7f)](_0x401c93=>connectionActivation[_0x2c66eb(0x84)](_0x401c93,_0x2c66eb(0x9d),_0x51fb08)));return _0x554d3f[_0x2c66eb(0x75)](_0x3ec3bf=>_0x3ec3bf[_0x2c66eb(0xaa)]==='fulfilled'&&_0x3ec3bf['value'][_0x2c66eb(0xb1)]==='authenticated-live-process'&&_0x3ec3bf[_0x2c66eb(0x88)][_0x2c66eb(0xaa)]===_0x2c66eb(0xa4)&&_0x3ec3bf[_0x2c66eb(0x88)][_0x2c66eb(0xa3)]===!![]&&_0x3ec3bf[_0x2c66eb(0x88)][_0x2c66eb(0xa6)]?.['registration']===_0x2c66eb(0x77)&&_0x3ec3bf['value'][_0x2c66eb(0xa6)][_0x2c66eb(0x7a)]===_0x11dad0&&require(_0x2c66eb(0x81))[_0x2c66eb(0x74)](_0x3ec3bf[_0x2c66eb(0x88)]['binding'][_0x2c66eb(0xa0)],_0x485cf2));}const _0x9a20c3={};_0x9a20c3[_0x5776c0(0x7d)]=hookContextClient,_0x9a20c3[_0x5776c0(0xab)]=verifyGatewayBinding,module[_0x5776c0(0xac)]=_0x9a20c3;function _0x3a46(_0x58fc70,_0x32c4a8){_0x58fc70=_0x58fc70-0x74;const _0x196dfd=_0x196d();let _0x3a4629=_0x196dfd[_0x58fc70];if(_0x3a46['cheALR']===undefined){var _0x102a0f=function(_0x464943){const _0x1d793d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x228035='',_0x45dd54='';for(let _0x145712=0x0,_0x8a11bf,_0x43f19e,_0x39fa6d=0x0;_0x43f19e=_0x464943['charAt'](_0x39fa6d++);~_0x43f19e&&(_0x8a11bf=_0x145712%0x4?_0x8a11bf*0x40+_0x43f19e:_0x43f19e,_0x145712++%0x4)?_0x228035+=String['fromCharCode'](0xff&_0x8a11bf>>(-0x2*_0x145712&0x6)):0x0){_0x43f19e=_0x1d793d['indexOf'](_0x43f19e);}for(let _0x9a20c3=0x0,_0x31f89a=_0x228035['length'];_0x9a20c3<_0x31f89a;_0x9a20c3++){_0x45dd54+='%'+('00'+_0x228035['charCodeAt'](_0x9a20c3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x45dd54);};_0x3a46['NBTIJE']=_0x102a0f,_0x3a46['EQPhcJ']={},_0x3a46['cheALR']=!![];}const _0x2e72dc=_0x196dfd[0x0],_0xbadb85=_0x58fc70+_0x2e72dc,_0x13929e=_0x3a46['EQPhcJ'][_0xbadb85];return!_0x13929e?(_0x3a4629=_0x3a46['NBTIJE'](_0x3a4629),_0x3a46['EQPhcJ'][_0xbadb85]=_0x3a4629):_0x3a4629=_0x13929e,_0x3a4629;}function _0x196d(){const _0x3705aa=['zxzPzgvUy2u','ChjLCgfYzuHVB2TcAw5KAw5N','tKfusvzfxW','yxv0AgvUDgLJyxrLza','mtHUB3jUvwO','Dg9VBf9Uyw1L','C2fTzvDVCMTZCgfJzq','C29Tzq','mtmXnhj6CKHIzG','yxb0lw1JCc1Hz2vUDa','y29UBMvJDgLVBKLK','mteYmNrJBwLdrG','C2vZC2LVBKLK','zNvSzMLSBgvK','q0fmtevsx0nptLrfwfrFvu5bvKfjtefcteu','Ag9VA0nVBNrLEhrdBgLLBNq','Dg9VBfvZzuLK','BwfW','ywXSu2v0DgXLza','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','BMf0AxzLvg9VBe5HBwu','y29Kzq','y29UDhjVBenVBM5Ly3rPB24','zw50CMLLCW','ywDLBNrFAwq','Dg9VBa','DMfSDwu','BM9KztPJCNLWDg8','BMf0AxzLq2HPBgq','C3vWzxj2AxnVCLbYB3rVy29S','mtmWmdCWmgXPt09Ptq','C3rHCNrZv2L0Aa','mMfrD0Dbqq','ntK2nZm0ofHkqu5Oqq','yxjNDw1LBNrZ','yxv0AgvUDgLJyxrLzc1SAxzLlxbYB2nLC3m','yxnZAwDU','CMfUzg9TqNL0zxm','BgvUz3rO','BMf0AxzLugfYzw50','odC2ntzotfjYBve','mti4ndi5mJbjv3PMA1q','BgLZDfDVCMTZCgfJzvjLy2vPChrZ','Dg9tDhjPBMC','uMvJB25Uzwn0ihrOCM91z2GGysbJywXSzxiTy29UDgv4DcbJyxbHyMXLihn1CgvYDMLZB3i','yMfZzty0DxjS','ChvZAa','z2f0zxDHEs1IAw5KAw5N','nZe2nJm5nxz2suzqwq','Ag9VAY1JB250zxH0','D29YA3nWywnL','BMf0AxzLq2fSBgvY','mZG4mZzJBLvtuwe','C2vYDMLUzW','yM91BMq','C2vZC2LVBL9IB290C3rYyxa','yMLUzgLUzW','zMLSDgvY','mta0mtiWnhDIBNbZva','lI9JB25Uzwn0Aw9UlwfJDgL2yxrPB24','C3rHDhvZ','DMvYAwz5r2f0zxDHEujPBMrPBMC','zxHWB3j0CW','AxnZDwvK','z3jHBNq','DgLTzw91De1Z','mtfovKP1wK4'];_0x196d=function(){return _0x3705aa;};return _0x196d();}
1
+ 'use strict';function _0x4bb1(_0x15d675,_0xc867ff){_0x15d675=_0x15d675-0xec;const _0x54ff35=_0x54ff();let _0x4bb126=_0x54ff35[_0x15d675];if(_0x4bb1['hkTlTk']===undefined){var _0x4a9531=function(_0xc34961){const _0x5714ef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d0970='',_0x1105d3='';for(let _0x213d82=0x0,_0x463be2,_0x5792a0,_0x8b4b57=0x0;_0x5792a0=_0xc34961['charAt'](_0x8b4b57++);~_0x5792a0&&(_0x463be2=_0x213d82%0x4?_0x463be2*0x40+_0x5792a0:_0x5792a0,_0x213d82++%0x4)?_0x5d0970+=String['fromCharCode'](0xff&_0x463be2>>(-0x2*_0x213d82&0x6)):0x0){_0x5792a0=_0x5714ef['indexOf'](_0x5792a0);}for(let _0x6790a8=0x0,_0x1d6669=_0x5d0970['length'];_0x6790a8<_0x1d6669;_0x6790a8++){_0x1105d3+='%'+('00'+_0x5d0970['charCodeAt'](_0x6790a8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1105d3);};_0x4bb1['BGjgqC']=_0x4a9531,_0x4bb1['Vihqyg']={},_0x4bb1['hkTlTk']=!![];}const _0x2f3e50=_0x54ff35[0x0],_0x414059=_0x15d675+_0x2f3e50,_0x28c13e=_0x4bb1['Vihqyg'][_0x414059];return!_0x28c13e?(_0x4bb126=_0x4bb1['BGjgqC'](_0x4bb126),_0x4bb1['Vihqyg'][_0x414059]=_0x4bb126):_0x4bb126=_0x28c13e,_0x4bb126;}const _0x38492e=_0x4bb1;(function(_0x24b6da,_0x57d52a){const _0x478b66=_0x4bb1,_0x2dff46=_0x24b6da();while(!![]){try{const _0x1ae503=-parseInt(_0x478b66(0x119))/0x1+-parseInt(_0x478b66(0x108))/0x2+parseInt(_0x478b66(0xff))/0x3+-parseInt(_0x478b66(0x127))/0x4+parseInt(_0x478b66(0x103))/0x5*(-parseInt(_0x478b66(0xfe))/0x6)+-parseInt(_0x478b66(0x130))/0x7+parseInt(_0x478b66(0x116))/0x8*(parseInt(_0x478b66(0xf4))/0x9);if(_0x1ae503===_0x57d52a)break;else _0x2dff46['push'](_0x2dff46['shift']());}catch(_0x255dff){_0x2dff46['push'](_0x2dff46['shift']());}}}(_0x54ff,0x82030));const crypto=require(_0x38492e(0x12a)),connectionActivation=require(_0x38492e(0xed));function hookContextClient(_0x1d6669,_0x513909,_0x51838b={}){return{async 'issue'(_0x3504f8){const _0x57c6f1=_0x4bb1,_0x4b0697=_0x51838b['lease']||require(_0x57c6f1(0x132))['acceptHookLease']();_0x4b0697[_0x57c6f1(0x11c)]();const _0x4b82c7=crypto[_0x57c6f1(0xfd)](0x20)['toString'](_0x57c6f1(0x105)),_0x207377={};_0x207377[_0x57c6f1(0xee)]=_0x3504f8['tool'],_0x207377[_0x57c6f1(0x109)]=_0x3504f8[_0x57c6f1(0x109)],_0x207377['arguments']=_0x3504f8['arguments'],_0x207377[_0x57c6f1(0x100)]=_0x3504f8[_0x57c6f1(0x100)],_0x207377[_0x57c6f1(0x10d)]=_0x513909['agent_id']||null,_0x207377[_0x57c6f1(0xfa)]=_0x513909[_0x57c6f1(0x101)],_0x207377[_0x57c6f1(0x107)]=_0x513909['transcript_path'],_0x207377[_0x57c6f1(0x112)]=_0x4b0697[_0x57c6f1(0x11f)],_0x207377[_0x57c6f1(0x11b)]=_0x4b82c7;const _0x28398c=_0x207377,_0x358985={};_0x358985[_0x57c6f1(0x118)]=_0x4b0697;if(_0x3504f8[_0x57c6f1(0xee)]===_0x57c6f1(0x128)&&!_0x28398c[_0x57c6f1(0x10d)])await require(_0x57c6f1(0x12e))[_0x57c6f1(0x111)](_0x1d6669,_0x28398c,_0x358985);_0x4b0697[_0x57c6f1(0x11c)]();const _0x3e8b7=connectionActivation['listWorkspaceReceipts'](_0x1d6669)[_0x57c6f1(0xf0)](_0x365a79=>_0x365a79[_0x57c6f1(0x12c)]===0x2),_0x397f0a={};_0x397f0a[_0x57c6f1(0x124)]=_0x57c6f1(0x12b);if(!_0x3e8b7[_0x57c6f1(0x125)])throw Object[_0x57c6f1(0xf5)](new Error(_0x57c6f1(0x110)),_0x397f0a);let _0x7e4f81=0x0,_0x1fe182=_0x57c6f1(0x12b),_0x3d2eee=-0x1;const _0x594b99=[],_0x34a4b6=require(_0x57c6f1(0xf9))[_0x57c6f1(0xf8)](_0x1d6669),_0x5e0e7e=await Promise['allSettled'](_0x3e8b7[_0x57c6f1(0x12d)](_0x3a2537=>connectionActivation[_0x57c6f1(0x120)](_0x3a2537,_0x57c6f1(0x123),{'nativeCaller':_0x28398c,'timeoutMs':Math[_0x57c6f1(0xf7)](0x1,Math['min'](0x1388,_0x4b0697[_0x57c6f1(0x11a)]()))})));_0x4b0697[_0x57c6f1(0x11c)]();for(const [_0x15ab4b,_0x4865d]of _0x5e0e7e[_0x57c6f1(0x10b)]()){const _0x3d33f2={};_0x3d33f2[_0x57c6f1(0x124)]='CALLER_CONTEXT_UNAVAILABLE';const _0x38fd78=_0x4865d[_0x57c6f1(0x115)]===_0x57c6f1(0x104)?_0x4865d[_0x57c6f1(0x11e)]:_0x3d33f2,_0x33478a=_0x38fd78[_0x57c6f1(0x10a)]==='authenticated-live-process',_0x2e8c8c={};_0x2e8c8c[_0x57c6f1(0xf3)]=_0x3e8b7[_0x15ab4b][_0x57c6f1(0xf3)],_0x2e8c8c[_0x57c6f1(0x115)]=_0x38fd78['status']||'failed',_0x2e8c8c['code']=_0x38fd78['code']||null,_0x2e8c8c['authenticated']=_0x33478a,_0x594b99[_0x57c6f1(0x117)](_0x2e8c8c),_0x34a4b6({'event':_0x57c6f1(0xec),'connectionId':_0x3e8b7[_0x15ab4b][_0x57c6f1(0xf3)],'childPid':_0x38fd78[_0x57c6f1(0x129)],'generation':_0x38fd78[_0x57c6f1(0x11d)],'invocationId':_0x3504f8['toolUseId'],'correlation':require(_0x57c6f1(0xf6))[_0x57c6f1(0xfb)](_0x4b82c7),'reason':_0x38fd78[_0x57c6f1(0x124)]||_0x38fd78[_0x57c6f1(0x115)]||_0x57c6f1(0x121)});if(_0x38fd78[_0x57c6f1(0x10a)]===_0x57c6f1(0x131)&&_0x38fd78[_0x57c6f1(0x115)]==='issued'&&_0x38fd78[_0x57c6f1(0x122)]===_0x4b82c7)_0x7e4f81++;else{const _0x33226e=_0x33478a?_0x38fd78[_0x57c6f1(0x124)]?.[_0x57c6f1(0x114)]('NATIVE_')?0x3:0x2:0x0;_0x33226e>_0x3d2eee&&(_0x1fe182=_0x38fd78[_0x57c6f1(0x124)]||_0x57c6f1(0x12b),_0x3d2eee=_0x33226e);}}if(!_0x7e4f81)throw Object[_0x57c6f1(0xf5)](new Error(_0x1fe182),{'code':_0x1fe182,'diagnostics':_0x594b99});return _0x4b0697[_0x57c6f1(0x11c)](),_0x4b82c7;}};}async function verifyGatewayBinding(_0x1fa507,_0x43843c){const _0x562d5e=_0x38492e;if(!_0x43843c)return![];const _0x4e7c4c=connectionActivation[_0x562d5e(0x133)](_0x1fa507)[_0x562d5e(0xf0)](_0x4ad58c=>_0x4ad58c[_0x562d5e(0x12c)]===0x2),_0x34c62f={};_0x34c62f[_0x562d5e(0x102)]=0x1388;const _0x2148d1=await Promise['allSettled'](_0x4e7c4c[_0x562d5e(0x12d)](_0xd89f7b=>connectionActivation[_0x562d5e(0x120)](_0xd89f7b,_0x562d5e(0xef),_0x34c62f)));return _0x2148d1[_0x562d5e(0x10f)](_0x2a25da=>_0x2a25da[_0x562d5e(0x115)]===_0x562d5e(0x104)&&_0x2a25da[_0x562d5e(0x11e)][_0x562d5e(0x10a)]===_0x562d5e(0x131)&&_0x2a25da[_0x562d5e(0x11e)][_0x562d5e(0x115)]===_0x562d5e(0x113)&&_0x2a25da['value'][_0x562d5e(0xf2)]===!![]&&_0x2a25da[_0x562d5e(0x11e)][_0x562d5e(0x10c)]?.[_0x562d5e(0xfc)]===_0x562d5e(0x12f)&&_0x2a25da[_0x562d5e(0x11e)][_0x562d5e(0x10c)][_0x562d5e(0x10e)]===_0x43843c&&require(_0x562d5e(0x126))['sameWorkspace'](_0x2a25da[_0x562d5e(0x11e)][_0x562d5e(0x10c)]['workspace'],_0x1fa507));}function _0x54ff(){const _0xc062f7=['C29Tzq','uMvJB25Uzwn0ihrOCM91z2GGysbJywXSzxiTy29UDgv4DcbJyxbHyMXLihn1CgvYDMLZB3i','ChjLCgfYzuHVB2TcAw5KAw5N','Ag9VA0XLyxnL','yM91BMq','C3rHCNrZv2L0Aa','C3rHDhvZ','mZmWmtm2A21vyvnS','ChvZAa','BgvHC2u','ode1ndu4vMr0su51','CMvTywLUAw5Ntxm','CMvXDwvZDgvKvg9Rzw4','yxnZzxj0q3vYCMvUDa','z2vUzxjHDgLVBG','DMfSDwu','D2LYzq','y29UDhjVBenVBM5Ly3rPB24','zMfPBgvK','z3jHBNq','Ag9VAY1JB250zxH0','y29Kzq','BgvUz3rO','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','mtu2nJG0ngfPyxLTEq','C2vZC2LVBL9IB290C3rYyxa','y2HPBgrqAwq','BM9KztPJCNLWDg8','q0fmtevsx0nptLrfwfrFvu5bvKfjtefcteu','C3vWzxj2AxnVCLbYB3rVy29S','BwfW','lI9NyxrLD2f5lwnVBNrLEhq','yxb0lw1JCc1Hz2vUDa','nJe3nde4mNblsg9LtW','yxv0AgvUDgLJyxrLzc1SAxzLlxbYB2nLC3m','lI4Vy29Yzs9OB29RlwXLyxnL','BgLZDfDVCMTZCgfJzvjLy2vPChrZ','z3jHBNqTAxnZDwfUy2uTywnR','lI9JB25Uzwn0Aw9UlwfJDgL2yxrPB24','Dg9VBa','z2f0zxDHEs1IAw5KAw5N','zMLSDgvY','Ag9VA0nVBNrLEhrdBgLLBNq','C2vYDMLUzW','y29UBMvJDgLVBKLK','odm3zMzXCu1L','yxnZAwDU','lI4Vy29Yzs9JBgf1zguTBMf0AxzL','Bwf4','Ag9VA0rPywDUB3n0AwnZ','lI4Vy29Yzs9OB29RlwrPywDUB3n0AwnZ','BMf0AxzLvg9VBe5HBwu','zMLUz2vYChjPBNq','CMvNAxn0CMf0Aw9U','CMfUzg9TqNL0zxm','mtHSwhDorgq','mtm5mtm0me5zDMPNtG','BMf0AxzLugfYzw50','Dg9VBf9Uyw1L','DgLTzw91De1Z','mtyXntq1mgj3z2XSAa','zNvSzMLSBgvK','yMfZzty0DxjS','DMvYAwz5r2f0zxDHEujPBMrPBMC','BMf0AxzLvhjHBNnJCMLWDfbHDgG','mtqYmtiZnNzlrvz6CW','Dg9VBfvZzuLK','zxzPzgvUy2u','zw50CMLLCW','yMLUzgLUzW','BMf0AxzLq2HPBgq','C2vZC2LVBKLK'];_0x54ff=function(){return _0xc062f7;};return _0x54ff();}const _0x6790a8={};_0x6790a8[_0x38492e(0xf1)]=hookContextClient,_0x6790a8[_0x38492e(0x106)]=verifyGatewayBinding,module['exports']=_0x6790a8;
@@ -3,14 +3,14 @@
3
3
  // Embedded with a trusted installation key. Only built-in modules may be used
4
4
  // until the committed release has been verified.
5
5
  function hookDispatcher(root, publicKey) {
6
- return { runCLI(host, event, projectPath) {
7
- const fs = require('node:fs'), path = require('node:path'), crypto = require('node:crypto');
8
- // Host adapters pass the workspace as base64 so hook command shells never
9
- // reinterpret path data. Keep absolute raw paths usable for internal calls.
10
- const inputPath = String(projectPath);
11
- const decodedProjectPath = Buffer.from(inputPath, 'base64').toString('utf8');
12
- const workspaceInput = path.isAbsolute(inputPath) || !fs.existsSync(decodedProjectPath) ? inputPath : decodedProjectPath;
13
- const workspace = fs.realpathSync(workspaceInput);
6
+ return { runCLI(host, event, projectPath, executionOptions = {}) {
7
+ const fs = require('node:fs'), path = require('node:path'), crypto = require('node:crypto');
8
+ // Host adapters pass the workspace as base64 so hook command shells never
9
+ // reinterpret path data. Keep absolute raw paths usable for internal calls.
10
+ const inputPath = String(projectPath);
11
+ const decodedProjectPath = Buffer.from(inputPath, 'base64').toString('utf8');
12
+ const workspaceInput = path.isAbsolute(inputPath) || !fs.existsSync(decodedProjectPath) ? inputPath : decodedProjectPath;
13
+ const workspace = fs.realpathSync(workspaceInput);
14
14
  const canonical = process.platform === 'win32' ? workspace.toLowerCase() : workspace;
15
15
  const authorityFile = path.join(workspace, '.agents', 'runtime', 'generation.json');
16
16
  let selected;
@@ -32,7 +32,7 @@ function hookDispatcher(root, publicKey) {
32
32
  if (crypto.createHash('sha256').update(JSON.stringify(manifest)).digest('hex') !== selected.digest ||
33
33
  !crypto.verify(null, Buffer.from(JSON.stringify(manifest.files)), publicKey, Buffer.from(manifest.signature, 'base64url')))
34
34
  throw Error('HOOK_RUNTIME_SIGNATURE_INVALID');
35
- for (const required of ['src/core/hook-bridge.js'])
35
+ for (const required of ['src/core/hook-bridge.js'])
36
36
  if (!manifest.files[required]) throw Error('HOOK_RUNTIME_RECONNECT_REQUIRED');
37
37
  for (const [file, digest] of Object.entries(manifest.files)) {
38
38
  if (path.isAbsolute(file) || file.includes('\\') || file.split('/').some(part => !part || part === '..' || part === '.'))
@@ -46,27 +46,79 @@ function hookDispatcher(root, publicKey) {
46
46
  throw Error('HOOK_RUNTIME_INTEGRITY_INVALID');
47
47
  }
48
48
  return require(path.join(release, 'src/core/hook-bridge.js')).runCLI(host, event,
49
- Buffer.from(workspace, 'utf8').toString('base64'));
49
+ Buffer.from(workspace, 'utf8').toString('base64'), executionOptions);
50
50
  } };
51
51
  }
52
52
 
53
- function renderDispatcher(runtimeRoot, publicKey) {
53
+ // The parent only uses built-ins. Synchronous hashing/locks in the signed
54
+ // worker cannot prevent the parent from producing a blocking decision.
55
+ function superviseHook(root, publicKey, dispatcherSource, args, timeoutMs) {
56
+ const cp = require('node:child_process'), crypto = require('node:crypto');
57
+ const lease = { id: crypto.randomUUID(), notAfter: Date.now() + timeoutMs, maxDurationMs: timeoutMs };
58
+ const program = `const dispatcher = (${dispatcherSource})(${JSON.stringify(root)}, ${JSON.stringify(publicKey)});
59
+ process.once('message', async message => {
60
+ try { await dispatcher.runCLI(...message.args, { hookLease: message.lease }); }
61
+ catch (error) { process.stderr.write('APT hook: ' + (error.message || String(error)) + '\\n'); process.exitCode = 2; }
62
+ finally { if (process.connected) process.disconnect(); }
63
+ });`;
64
+ return new Promise((resolve, reject) => {
65
+ let settled = false, output = '', errors = '', inputBytes = 0;
66
+ const child = cp.spawn(process.execPath, ['-e', program], { windowsHide: true, stdio: ['pipe', 'pipe', 'pipe', 'ipc'] });
67
+ const detach = () => {
68
+ clearTimeout(timer); process.stdin.unpipe(child.stdin); process.stdin.removeListener('data', countInput);
69
+ child.stdin.destroy();
70
+ };
71
+ const fail = code => {
72
+ if (settled) return;
73
+ settled = true; detach();
74
+ if (child.connected) child.disconnect();
75
+ child.kill(); child.stdout.destroy(); child.stderr.destroy(); child.unref();
76
+ reject(new Error(code));
77
+ };
78
+ const countInput = chunk => { inputBytes += chunk.length; if (inputBytes > 2 * 1024 * 1024) fail('HOOK_INPUT_LIMIT'); };
79
+ const timer = setTimeout(() => fail('HOOK_DEADLINE_EXCEEDED'), timeoutMs);
80
+ child.on('error', () => fail('HOOK_WORKER_UNAVAILABLE'));
81
+ child.stdin.on('error', () => {});
82
+ child.stdout.on('data', chunk => { output += chunk.toString(); if (Buffer.byteLength(output) > 2 * 1024 * 1024) fail('HOOK_OUTPUT_LIMIT'); });
83
+ child.stderr.on('data', chunk => { errors += chunk.toString(); if (Buffer.byteLength(errors) > 64 * 1024) fail('HOOK_OUTPUT_LIMIT'); });
84
+ child.on('close', code => {
85
+ if (settled) return;
86
+ if (Date.now() >= lease.notAfter) return fail('HOOK_DEADLINE_EXCEEDED');
87
+ settled = true; detach();
88
+ if (code === 0) { if (output) process.stdout.write(output); }
89
+ if (errors) process.stderr.write(errors);
90
+ process.exitCode = code === 0 ? 0 : 2;
91
+ resolve();
92
+ });
93
+ process.stdin.on('data', countInput); process.stdin.pipe(child.stdin);
94
+ child.send({ args, lease }, error => { if (error) fail('HOOK_WORKER_UNAVAILABLE'); });
95
+ });
96
+ }
97
+
98
+ function renderDispatcher(runtimeRoot, publicKey, options = {}) {
99
+ const timeoutMs = options.timeoutMs === undefined ? 10000 : options.timeoutMs;
100
+ if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 100 || timeoutMs > 10000) throw new Error('HOOK_DEADLINE_INVALID');
54
101
  return `'use strict';
55
102
  const dispatcher = (${hookDispatcher.toString()})(${JSON.stringify(runtimeRoot)}, ${JSON.stringify(publicKey.toString())});
56
- function reportFailure(error) {
57
- process.stderr.write('APT hook: ' + (error && error.message ? error.message : String(error)) + '\\n');
58
- process.exitCode = 2;
59
- }
103
+ function reportFailure(error) {
104
+ process.stderr.write('APT hook: ' + (error && error.message ? error.message : String(error)) + '\\n');
105
+ process.exitCode = 2;
106
+ }
60
107
  module.exports = { runCLI(...args) {
61
108
  try {
62
- const result = dispatcher.runCLI(...args);
63
- if (result && typeof result.then === 'function') result.catch(reportFailure);
64
- return result;
65
- } catch (error) {
66
- reportFailure(error);
67
- }
68
- } };
69
- `;
70
- }
109
+ // Generated host commands use node --eval. Direct verifier consumers keep
110
+ // the synchronous interface; host execution always has an outer watchdog.
111
+ const hostCLI = process.argv.length === 1 && process.execArgv.some(arg => arg === '-e' || arg === '--eval');
112
+ const result = hostCLI
113
+ ? (${superviseHook.toString()})(${JSON.stringify(runtimeRoot)}, ${JSON.stringify(publicKey.toString())}, ${JSON.stringify(hookDispatcher.toString())}, args, ${timeoutMs})
114
+ : dispatcher.runCLI(...args);
115
+ if (result && typeof result.then === 'function') result.catch(reportFailure);
116
+ return result;
117
+ } catch (error) {
118
+ reportFailure(error);
119
+ }
120
+ } };
121
+ `;
122
+ }
71
123
 
72
124
  module.exports = { hookDispatcher, renderDispatcher };