apt-mcp-agent-setup 3.5.18 → 3.5.21

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 (165) hide show
  1. package/README.md +33 -31
  2. package/bin/cli.js +1 -1
  3. package/build-input.json +93 -66
  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 -1
  17. package/integrity-manifest.json +165 -161
  18. package/package.json +1 -1
  19. package/src/backends/browser-tools.js +1 -1
  20. package/src/backends/index-cache-authority.js +1 -1
  21. package/src/backends/index-command.js +1 -1
  22. package/src/backends/index-maintenance.js +1 -1
  23. package/src/backends/index-store.js +1 -1
  24. package/src/backends/profiles.js +1 -1
  25. package/src/backends/source-discovery.js +1 -1
  26. package/src/core/admission-fence.js +1 -1
  27. package/src/core/aso-import.js +1 -1
  28. package/src/core/backend-lease-recovery.js +1 -1
  29. package/src/core/boot-evidence.js +1 -1
  30. package/src/core/caller-context.js +1 -1
  31. package/src/core/catalog.js +1 -1
  32. package/src/core/claude-caller-authority.js +1 -1
  33. package/src/core/claude-invocation.js +1 -1
  34. package/src/core/claude-launch-recovery.js +1 -0
  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 -1
  49. package/src/core/hook-lease.js +1 -1
  50. package/src/core/host-adapters.js +1 -1
  51. package/src/core/interrupted-boot-transport-proof.js +1 -1
  52. package/src/core/interrupted-natural-closure-proof.js +1 -1
  53. package/src/core/interrupted-operation-audit.js +1 -1
  54. package/src/core/interrupted-transport-proof.js +1 -1
  55. package/src/core/ipc-envelope.js +1 -1
  56. package/src/core/legacy-retirement-proof.js +1 -1
  57. package/src/core/memory-scope.js +1 -1
  58. package/src/core/memory-store.js +1 -1
  59. package/src/core/model-inventory.js +1 -1
  60. package/src/core/model-routing.js +1 -1
  61. package/src/core/native-dispatch.js +1 -1
  62. package/src/core/native-receipt.js +1 -1
  63. package/src/core/node-version.js +1 -1
  64. package/src/core/npm-cli.js +1 -1
  65. package/src/core/owned-command-child.js +1 -1
  66. package/src/core/owned-command.js +1 -1
  67. package/src/core/owned-lock.js +1 -1
  68. package/src/core/owned-process.js +1 -1
  69. package/src/core/pipeline-journal.js +1 -1
  70. package/src/core/presentations.js +1 -1
  71. package/src/core/quality-artifacts.js +1 -1
  72. package/src/core/quality.js +1 -1
  73. package/src/core/read-command.js +1 -1
  74. package/src/core/readonly-skill.js +1 -1
  75. package/src/core/recovery-archive.js +1 -1
  76. package/src/core/recovery-proof.js +1 -1
  77. package/src/core/resource-transaction.js +1 -1
  78. package/src/core/run-checkpoint.js +1 -1
  79. package/src/core/run-compatibility.js +1 -1
  80. package/src/core/run-state-codec.js +1 -1
  81. package/src/core/runtime-authority.js +1 -1
  82. package/src/core/runtime-info.js +1 -1
  83. package/src/core/runtime-ownership.js +1 -1
  84. package/src/core/session.js +1 -1
  85. package/src/core/skill-companions.js +1 -1
  86. package/src/core/skill-names.js +1 -1
  87. package/src/core/storage-retry.js +1 -1
  88. package/src/core/tool-contracts.js +1 -1
  89. package/src/core/transport-pending-boot-contract.json +12 -0
  90. package/src/core/update-control.js +1 -1
  91. package/src/core/upgrade-runs.js +1 -1
  92. package/src/core/upgrade-stop.js +1 -1
  93. package/src/core/windows-job.js +1 -1
  94. package/src/core/workflow-policy.js +1 -1
  95. package/src/core/workspace-generation.js +1 -1
  96. package/src/core/workspace-path.js +1 -1
  97. package/src/installer/bounded-command.js +1 -1
  98. package/src/installer/candidate-preflight.js +1 -1
  99. package/src/installer/claude-commands.js +1 -0
  100. package/src/installer/connection-activation.js +1 -1
  101. package/src/installer/connection-supervisor.js +1 -1
  102. package/src/installer/deployment-draft.js +1 -1
  103. package/src/installer/gateway-context.js +1 -1
  104. package/src/installer/gateway-migration.js +1 -1
  105. package/src/installer/gateway-runtime.js +1 -1
  106. package/src/installer/global-setup.js +1 -1
  107. package/src/installer/hook-context-client.js +1 -1
  108. package/src/installer/hook-dispatcher.js +82 -65
  109. package/src/installer/host-hooks.js +1 -1
  110. package/src/installer/index-interruption-recovery.js +1 -1
  111. package/src/installer/index-recovery.js +1 -1
  112. package/src/installer/install-intent.js +1 -0
  113. package/src/installer/interrupted-operation-recovery.js +1 -1
  114. package/src/installer/legacy-prepared-plan.js +1 -1
  115. package/src/installer/legacy-registration.js +1 -1
  116. package/src/installer/managed-config.js +1 -1
  117. package/src/installer/migration-scope.js +1 -1
  118. package/src/installer/platform-config.js +1 -1
  119. package/src/installer/prerequisites.js +1 -1
  120. package/src/installer/presentations.js +1 -1
  121. package/src/installer/project-outcome.js +1 -1
  122. package/src/installer/project-setup.js +1 -1
  123. package/src/installer/registration-closure.js +1 -1
  124. package/src/installer/registration-plan.js +1 -1
  125. package/src/installer/registration-receipt.js +1 -1
  126. package/src/installer/registrations.js +1 -1
  127. package/src/installer/runtime-activation.js +1 -1
  128. package/src/installer/runtime-child.js +1 -1
  129. package/src/installer/runtime-cleanup.js +1 -1
  130. package/src/installer/runtime-lock.js +1 -1
  131. package/src/installer/runtime-store.js +1 -1
  132. package/src/installer/runtime-supervisor.js +1 -1
  133. package/src/installer/setup-wizard.js +1 -1
  134. package/src/installer/update-addons.js +1 -1
  135. package/src/installer/update-cleanup.js +1 -1
  136. package/src/installer/update-executor.js +1 -1
  137. package/src/installer/update-history.js +1 -1
  138. package/src/installer/update-registration.js +1 -1
  139. package/src/installer/update-request.js +1 -1
  140. package/src/installer/update-scope.js +1 -1
  141. package/src/installer/workspace-registry.js +1 -1
  142. package/src/installer/workspace-transaction.js +1 -1
  143. package/src/installer/workspace-update.js +1 -1
  144. package/src/license/crypto.js +1 -1
  145. package/src/license/fingerprint.js +1 -1
  146. package/src/license/terms.js +1 -1
  147. package/src/license/verify.js +1 -1
  148. package/src/presets/index.js +1 -1
  149. package/src/proxy/backends.js +1 -1
  150. package/src/proxy/browser-sessions.js +1 -1
  151. package/src/proxy/core-tools.js +1 -1
  152. package/src/proxy/pipeline.js +1 -1
  153. package/src/proxy/public-catalog.js +1 -1
  154. package/src/proxy/router.config.js +1 -1
  155. package/src/proxy/router.js +1 -1
  156. package/src/proxy/server.js +1 -1
  157. package/src/proxy/workspace-gateway.js +1 -1
  158. package/src/templates/AGENTS.md +1 -1
  159. package/src/templates/CLAUDE.md +1 -1
  160. package/src/templates/GEMINI.md +1 -1
  161. package/src/templates/apt-runtime.md +3 -1
  162. package/src/templates/copilot-instructions.md +1 -1
  163. package/src/templates/cursorrules.mdc +1 -1
  164. package/src/templates/mcp-tools.md +1 -1
  165. package/src/templates/windsurfrules.md +1 -1
@@ -1 +1 @@
1
- 'use strict';function _0x18f7(_0x19c970,_0x535ba2){_0x19c970=_0x19c970-0xb0;const _0x12900c=_0x1290();let _0x18f763=_0x12900c[_0x19c970];if(_0x18f7['iRhcSf']===undefined){var _0xcd27f6=function(_0x420d9d){const _0x3f7350='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x374104='',_0x34d361='';for(let _0x3f9daf=0x0,_0x261b84,_0x4bc477,_0x4f8529=0x0;_0x4bc477=_0x420d9d['charAt'](_0x4f8529++);~_0x4bc477&&(_0x261b84=_0x3f9daf%0x4?_0x261b84*0x40+_0x4bc477:_0x4bc477,_0x3f9daf++%0x4)?_0x374104+=String['fromCharCode'](0xff&_0x261b84>>(-0x2*_0x3f9daf&0x6)):0x0){_0x4bc477=_0x3f7350['indexOf'](_0x4bc477);}for(let _0x52f7e7=0x0,_0x36c899=_0x374104['length'];_0x52f7e7<_0x36c899;_0x52f7e7++){_0x34d361+='%'+('00'+_0x374104['charCodeAt'](_0x52f7e7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x34d361);};_0x18f7['MltgTD']=_0xcd27f6,_0x18f7['FxWWdT']={},_0x18f7['iRhcSf']=!![];}const _0x5e2f7e=_0x12900c[0x0],_0x4a46db=_0x19c970+_0x5e2f7e,_0x5c6a4f=_0x18f7['FxWWdT'][_0x4a46db];return!_0x5c6a4f?(_0x18f763=_0x18f7['MltgTD'](_0x18f763),_0x18f7['FxWWdT'][_0x4a46db]=_0x18f763):_0x18f763=_0x5c6a4f,_0x18f763;}function _0x1290(){const _0x1e62b6=['C2vUC2L0AxzLvg9VBa','CMfUzg9TqNL0zxm','CMvXDwLYzwq','ChjVzMLSzq','q0fuquXpr19tq0HftufFq09orKXjq1q','ywXSu2v0DgXLza','DMfSDwu','BgvUz3rO','AxnbCNjHEq','zNvUy3rPB24','lI4Vy29Yzs9OB29RlwXLyxnL','BwfW','Dw5JB25MAxjTzwq','C2vZC2LVBKLK','Aw5PDgLHBgL6Aw5N','Aw5PDgLHBgL6zq','DMfSDwvZ','Dg9tDhjPBMC','Bwv0Ag9K','txv0yxrPB25ZihjLCxvPCMuGDgHLigv4CgXPy2L0BhKGyM91BMqGC2vZC2LVBKLKlG','BMv4Da','CMvWBgfJzq','q2fSBcb3B3jRC3bHy2vFBgLZDcWGDgHLBIbZzxnZAw9Ux2jVB3rZDhjHCcb3AxrOihnLC3nPB25jzcbHBMqGD29YA3nWywnLswqU','CNvUswq','yxjNDw1LBNrZ','nZe0vNHev1rN','yxnZAwDU','CNvUDgLTzq','C2vYDMvYl2rPC2nVDMvY','x2j1AwX0Aw4','DMvYAwz5u2vSzwn0Aw9U','Cgf0DgvYBG','CMvJB3zLCNK','BwfWrxHWB3nLzfrVt3jPz2LUywW','nJmZmZC1wgfktMrd','q2fSBcb3B3jRC3bHy2vFBgLZDcbVBIb0AgLZignVBM5Ly3rPB24Gyw5KihvZzsbPDhmGy3vYCMvUDcbIAw5KAw5Nvg9Rzw4U','C3rVChbLza','mZGWntq2ng1MA1zXAq','yMfJA2vUza','t25LiefqvcbNyxrLD2f5ihnLCNzLCYbPBNn0ywXSzwqGChjVAMvJDhmUienHBgWGD29YA3nWywnLx2XPC3qSihrOzw4GC2vZC2LVBL9IB290C3rYyxaGD2L0Acb5B3vYihnLC3nPB25jzcbHBMqGDgHLihbYB2PLy3qGD29YA3nWywnLswqUiefSD2f5CYbWyxnZihrOyxqGC2vZC2LVBKLKig9Uihn1yNnLCxvLBNqGy2fSBhmUie5LDMvYigjPBMqGAg9TzsbVCIbZzwXLy3qGysbWCM9Qzwn0igzYB20GCMvJzw5JEs4','ugfZCYbZzxnZAw9Uswq7ihrOAxmGy29UBMvJDgLVBIbZzxj2zxmGBxvSDgLWBguGChjVAMvJDcbZzxnZAw9UCY4','ChjVzMLSzxm','vgHPCYbNyxrLD2f5igHHCYbUBYb2zxjPzMLLzcbJyxrHBg9NigzVCIb0Agf0ihrVB2WU','lI9YB3v0zxi','r0furvDbwv9dte9truq','CMvZB2X2zq','zMLSDgvY','C2vSzwn0zwq','uMvXDwLYzwqGzMLLBgq6ia','jdfFjdi','ChvZAa','CgfYyw1Z','zgvSzxrL','mtiZmJuWme5Tr2DYsG','r0furvDbwv9truXfq1rjt05FuKvrvuLsruq','lI4VlI4VCgfJA2fNzs5QC29U','AgfZ','lI9WDwjSAwmTy2f0ywXVzW','tuLtu0Lor18','BgvHC2u','zMLUza','mtq4nJiWnvPkyMn0zq','C2L6zq','mtq2ogvlz251CW','lI4Vy29Yzs90B29SlwnVBNrYywn0CW','z2v0','Dg9VBa','zgvJB3jHDgvhyxrLD2f5vg9VBa','Aw5WDxrty2HLBwe','C2vZC2LVBL9IB290C3rYyxa','Dg9VBhm','C2v0','BMfTzq','CMfUzg9Tvvvjra','DMfSAwrHDgvjzgvUDgL0Eq','y29UBMvJDgLVBKLK','Dg9vChbLCKnHC2u','BgLZDenOyw5Nzwq','Dg9VBhmVBgLZDa','Aw5JBhvKzxm','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','yMfZzty0DxjS','BM93','v09ss1nqqunfx05pvf9sruDju1rfuKve','D29YA3nWywnLswq','DgvZDa','DMvYC2LVBG','CMvNAxn0CNK','su5wquXjrf8','y2XVC2u','CNvUDgLTzuzHy3rVCNK','CMvXDwvZDeLK','v09ss1nqqunfx0jjtKrjtKDFq09orKXjq1q','mti0mdjZwvPVBw8','lI4Vy29Yzs9JywXSzxiTy29UDgv4Da','mtm5mhP0tLjsAG','BMf0AxzLswrLBNrPDhK','D29YA3nWywnL','ve9ptf9ot1rFqvzbsuXbqKXf','CMvNAxn0CMf0Aw9U','AgfUzgXL','Ag9ZDhm','y2fSBgvYlxnLBgvJDgvK','u0vtu0LptL9jrf9srvfvsvjfra','yMLUzgLUz1rVA2vU','v09ss1nqqunfx0fnqKLhvu9vuW','mJaYns0WnI0Xoa','BgLZDa','yxb0lw1JCc1Hz2vUDa','twv0Ag9Kig5VDcbMB3vUza','ChjVBwLZzq','mJaYnc0Xms0Wnq','yxnZzxj0q3vYCMvUDa','BwnWx2fNzw50x2HLywX0Aa','yMLUza','B2jQzwn0','yMLUzgLUz1nLBgvJDgLVBNm','D29YA3nWywnLugf0Aa','C3rHDhvZ','zxHWB3j0CW','DgfZAW','BM9KztPJCNLWDg8','zgvZy3jPChrPB24','z2f0zxDHEq','v09ss1nqqunfx0jjtKrjtKDFuKvrvuLsruq','y2XLyxi','lI4VAw5ZDgfSBgvYl3DVCMTZCgfJzs1YzwDPC3rYEq','Ag9ZDa','C2vZC2LVBNm','ChjVAMvJDfbHDgG','ChjVDg9JB2XwzxjZAw9U','C3rYAw5NAwz5','D29YA3nWywnLx2XPC3q','CMvXDwvZDa','nZeYy011rw56','ugfZCYb0AguGC2fTzsbUB25LBxb0EsbZzxnZAw9UswqGDgHYB3vNAg91Dcb0AgLZignOyxqU','B25dyxrHBg9Nq2HHBMDLza','v29YA3nWywnLr2f0zxDHEq','y2f0ywXVzW','mZuWmZrxv1blDNq','ChjVDMvUyw5Jzq','r0furvDbwv9srvfvrvnux0zbsuXfra','y29Kzq','CMvQzwn0zwq','zxHWAxjLC0f0','mI4W'];_0x1290=function(){return _0x1e62b6;};return _0x1290();}const _0x2ea557=_0x18f7;(function(_0x53b371,_0x44d7f0){const _0x29303d=_0x18f7,_0x9fa5a8=_0x53b371();while(!![]){try{const _0x5f2afa=parseInt(_0x29303d(0xb6))/0x1*(-parseInt(_0x29303d(0xfd))/0x2)+parseInt(_0x29303d(0x12b))/0x3+-parseInt(_0x29303d(0x13e))/0x4+-parseInt(_0x29303d(0xb4))/0x5+-parseInt(_0x29303d(0x102))/0x6*(-parseInt(_0x29303d(0x122))/0x7)+parseInt(_0x29303d(0x12e))/0x8+-parseInt(_0x29303d(0xd4))/0x9*(-parseInt(_0x29303d(0xd6))/0xa);if(_0x5f2afa===_0x44d7f0)break;else _0x9fa5a8['push'](_0x9fa5a8['shift']());}catch(_0x2577ca){_0x9fa5a8['push'](_0x9fa5a8['shift']());}}}(_0x1290,0x54762));const crypto=require(_0x2ea557(0xf0)),{WorkspaceRegistry}=require(_0x2ea557(0xf5)),{gatewayCatalog}=require('./public-catalog'),{sameWorkspace}=require(_0x2ea557(0xc7)),contracts=require(_0x2ea557(0xb7)),fail=(_0x27ac3b,_0x34a141=_0x27ac3b)=>{const _0x566287=_0x2ea557,_0x4bccc1={};_0x4bccc1[_0x566287(0x105)]=_0x27ac3b;throw Object[_0x566287(0x123)](new Error(_0x34a141),_0x4bccc1);},content=_0x5a74fd=>({'content':[{'type':'text','text':JSON[_0x2ea557(0xfa)](_0x5a74fd)}]});function validateIdentity(_0x8023c7){const _0x3fe663=_0x2ea557,_0x54fe36={};_0x54fe36[_0x3fe663(0x116)]=contracts['sessionId'],_0x54fe36['requestId']=contracts[_0x3fe663(0xd2)],_0x54fe36[_0x3fe663(0xef)]=contracts[_0x3fe663(0xef)],_0x54fe36[_0x3fe663(0x120)]=contracts['runId'];for(const [_0x5560c1,_0x3d3924]of Object['entries'](_0x54fe36)){if(_0x8023c7[_0x5560c1]===undefined)continue;const _0x376663=_0x8023c7[_0x5560c1];if(typeof _0x376663!=='string'||!_0x376663['trim']()||_0x376663[_0x3fe663(0x110)]>_0x3d3924['maxLength']||_0x3d3924[_0x3fe663(0x128)]&&!new RegExp(_0x3d3924['pattern'])[_0x3fe663(0xcc)](_0x376663))fail(_0x3fe663(0xcf)+_0x5560c1[_0x3fe663(0x11e)](/([a-z])([A-Z])/g,_0x3fe663(0x13a))[_0x3fe663(0xc3)](),_0x3d3924[_0x3fe663(0xf1)]);}}class WorkspaceGateway{constructor(_0x2db245={}){const _0x1e51ed=_0x2ea557;this[_0x1e51ed(0xce)]=_0x2db245[_0x1e51ed(0xce)]||new WorkspaceRegistry(),this[_0x1e51ed(0xd1)]=_0x2db245[_0x1e51ed(0xd1)],this[_0x1e51ed(0xf6)]=_0x2db245['host']||null,this[_0x1e51ed(0xc2)]=_0x2db245[_0x1e51ed(0xc2)]||crypto[_0x1e51ed(0xc0)](),this[_0x1e51ed(0xf7)]=new Map(),this[_0x1e51ed(0x117)]=new Map(),this[_0x1e51ed(0xeb)]=new Map(),this['catalog']=gatewayCatalog(),this['onCatalogChanged']=_0x2db245[_0x1e51ed(0xff)]||(()=>{}),this[_0x1e51ed(0x118)]=null,this[_0x1e51ed(0x12d)]=![];}async[_0x2ea557(0xe9)](_0x1c34ff,_0x516df9={}){const _0x54d269=_0x2ea557;_0x516df9[_0x54d269(0xb2)]?.[_0x54d269(0xe7)]();if(!_0x1c34ff[_0x54d269(0x116)])fail(_0x54d269(0xde),_0x54d269(0xfe));const _0x1576f8=this[_0x54d269(0xf7)]['get'](_0x1c34ff[_0x54d269(0x116)]);if(_0x1576f8&&!_0x1c34ff['workspaceId']&&!_0x1c34ff['workspacePath'])return _0x1576f8;const _0xa9ba0=this['initializing'][_0x54d269(0xb8)](_0x1c34ff[_0x54d269(0x116)]);if(_0xa9ba0&&!_0x1c34ff[_0x54d269(0xcb)]&&!_0x1c34ff[_0x54d269(0xec)])return _0xa9ba0[_0x54d269(0xe5)];const _0x5308c7=this[_0x54d269(0xce)][_0x54d269(0x136)](_0x1c34ff,{'host':this['host']});if(_0x1c34ff[_0x54d269(0xdf)])this[_0x54d269(0x127)](_0x1c34ff[_0x54d269(0xdf)],_0x5308c7[_0x54d269(0xcb)]);if(_0x1576f8){if(!sameWorkspace(_0x5308c7[_0x54d269(0xd8)],_0x1576f8[_0x54d269(0xd8)]))fail('WORKSPACE_BINDING_CONFLICT');return _0x1576f8;}if(this[_0x54d269(0x117)][_0x54d269(0x141)](_0x1c34ff[_0x54d269(0x116)])){const _0x5f40b5=this[_0x54d269(0x117)][_0x54d269(0xb8)](_0x1c34ff[_0x54d269(0x116)]);if(!sameWorkspace(_0x5f40b5[_0x54d269(0xd8)],_0x5308c7['workspace']))fail(_0x54d269(0xd3));return _0x5f40b5[_0x54d269(0xe5)];}const _0x17cbbf={};_0x17cbbf['connectionId']=this[_0x54d269(0xc2)],_0x17cbbf[_0x54d269(0x116)]=_0x1c34ff[_0x54d269(0x116)],_0x17cbbf['workspace']=_0x5308c7[_0x54d269(0xd8)],_0x17cbbf[_0x54d269(0xcb)]=_0x5308c7[_0x54d269(0xcb)],_0x17cbbf[_0x54d269(0xda)]=_0x54d269(0xe3),_0x17cbbf[_0x54d269(0x103)]=_0x54d269(0xdd),_0x17cbbf[_0x54d269(0xd7)]=_0x54d269(0x115);const _0x3622a5=_0x17cbbf,_0x10cf02=((async()=>{const _0x3d6605=_0x54d269;if(typeof this[_0x3d6605(0xd1)]!==_0x3d6605(0x112))fail('GATEWAY_RUNTIME_UNAVAILABLE');const _0x311102=_0x5308c7[_0x3d6605(0x132)]?.[this[_0x3d6605(0xf6)]]||{},_0x2059a5=await this['runtimeFactory'](_0x3622a5,this['initialize']||{},_0x311102);try{if(_0x516df9['lease'])await require(_0x3d6605(0x113))['observeHookCancellation'](_0x516df9['lease']);}catch(_0x35c298){await _0x2059a5[_0x3d6605(0xd0)]();throw _0x35c298;}this[_0x3d6605(0x12d)]&&(await _0x2059a5[_0x3d6605(0xd0)](),fail(_0x3d6605(0x135)));const _0x29d864={..._0x3622a5};_0x29d864[_0x3d6605(0x124)]=_0x2059a5,_0x29d864['profile']=_0x311102;const _0x473fb3=_0x29d864;return _0x516df9[_0x3d6605(0xb2)]?.[_0x3d6605(0xe7)](),this[_0x3d6605(0xf7)][_0x3d6605(0xbe)](_0x1c34ff[_0x3d6605(0x116)],_0x473fb3),_0x473fb3;})()),_0x31cb21={};_0x31cb21[_0x54d269(0xd8)]=_0x5308c7[_0x54d269(0xd8)],_0x31cb21['promise']=_0x10cf02,this[_0x54d269(0x117)][_0x54d269(0xbe)](_0x1c34ff[_0x54d269(0x116)],_0x31cb21);try{return await _0x10cf02;}finally{this[_0x54d269(0x117)][_0x54d269(0x13d)](_0x1c34ff[_0x54d269(0x116)]);}}['selection'](_0x329848){const _0x28af9a=_0x2ea557;for(const [_0x38c582,_0x4fac89]of this['bindingSelections'])if(_0x4fac89[_0x28af9a(0x107)]<Date[_0x28af9a(0xc9)]())this[_0x28af9a(0xeb)][_0x28af9a(0x13d)](_0x38c582);if(this[_0x28af9a(0xeb)][_0x28af9a(0xb5)]>=0x1000)fail('GATEWAY_SELECTION_LIMIT');const _0x3d5527=this['connectionId']+'.'+crypto[_0x28af9a(0x10a)](0x20)[_0x28af9a(0x11a)](_0x28af9a(0xc8));this[_0x28af9a(0xeb)][_0x28af9a(0xbe)](_0x3d5527,{'workspaceId':_0x329848[_0x28af9a(0xcb)],'expiresAt':Date[_0x28af9a(0xc9)]()+0xdbba0});const _0x314d56={};return _0x314d56[_0x28af9a(0xcb)]=_0x329848[_0x28af9a(0xcb)],_0x314d56[_0x28af9a(0xd8)]=_0x329848[_0x28af9a(0xd8)],_0x314d56[_0x28af9a(0xdf)]=_0x3d5527,_0x314d56;}['verifySelection'](_0x3e3236,_0x187f6b){const _0x53ea7b=_0x2ea557,_0x53497f=this[_0x53ea7b(0xeb)][_0x53ea7b(0xb8)](_0x3e3236);if(!_0x53497f||_0x53497f[_0x53ea7b(0x107)]<Date['now']()||_0x53497f['workspaceId']!==_0x187f6b)fail(_0x53ea7b(0x13f),_0x53ea7b(0x12c));return _0x53497f;}[_0x2ea557(0x138)](_0x1b4510){const _0x281a0a=_0x2ea557;let _0x598f74;if(_0x1b4510[_0x281a0a(0x116)])_0x598f74=this[_0x281a0a(0xf7)]['get'](_0x1b4510[_0x281a0a(0x116)]);else{if(this[_0x281a0a(0xf7)][_0x281a0a(0xb5)]===0x1)_0x598f74=this[_0x281a0a(0xf7)][_0x281a0a(0x119)]()[_0x281a0a(0x11d)]()[_0x281a0a(0x10f)];else{if(this[_0x281a0a(0xf7)]['size']>0x1)fail(_0x281a0a(0xe0),_0x281a0a(0x131));}}if(!_0x598f74)fail(_0x281a0a(0xf3),_0x281a0a(0x11f));if(_0x1b4510[_0x281a0a(0xcb)]||_0x1b4510[_0x281a0a(0xec)]){const _0x54bbe4=this[_0x281a0a(0xce)][_0x281a0a(0x136)](_0x1b4510,{'host':this[_0x281a0a(0xf6)]});if(!sameWorkspace(_0x54bbe4[_0x281a0a(0xd8)],_0x598f74[_0x281a0a(0xd8)]))fail(_0x281a0a(0xd3));}if(_0x1b4510[_0x281a0a(0xf8)]&&!sameWorkspace(_0x1b4510[_0x281a0a(0xf8)],_0x598f74[_0x281a0a(0xd8)]))fail(_0x281a0a(0xd3));return _0x598f74;}async[_0x2ea557(0xdb)](_0xa6a83e){const _0x1904a5=_0x2ea557;if(this['stopped'])fail(_0x1904a5(0x135));const {id:_0x22682d,method:_0x56c623,params:params={}}=_0xa6a83e,_0x59162c=_0x16583b=>({'jsonrpc':_0x1904a5(0x108),'id':_0x22682d,'result':_0x16583b});if(_0x56c623===_0x1904a5(0x118)||_0x56c623===_0x1904a5(0x125)){const _0x1cdd82=[_0x1904a5(0xe6),'2025-03-26',_0x1904a5(0xe1),'2025-11-25'],_0x3898ed=_0x1cdd82['includes'](params[_0x1904a5(0xf9)])?params[_0x1904a5(0xf9)]:_0x1cdd82['at'](-0x1),_0x516040={...params};_0x516040[_0x1904a5(0xf9)]=_0x3898ed,this[_0x1904a5(0x118)]=_0x516040;const _0x37a71b={};_0x37a71b[_0x1904a5(0xc4)]=!![];const _0xf9e83={};return _0xf9e83[_0x1904a5(0xbd)]=_0x37a71b,_0x59162c({'protocolVersion':_0x3898ed,'capabilities':_0xf9e83,'serverInfo':{'name':_0x1904a5(0xe3),'version':require('../../package.json')[_0x1904a5(0xcd)]},'instructions':_0x1904a5(0x130)});}if(_0x56c623===_0x1904a5(0xc5))return _0x59162c({'tools':structuredClone(this['catalog'])});if(_0x56c623==='ping')return _0x59162c({});if(_0x56c623==='notifications/initialized')return null;const _0xadb6d1={};_0xadb6d1[_0x1904a5(0x105)]=-0x7f59,_0xadb6d1['message']=_0x1904a5(0xe4);if(_0x56c623!=='tools/call')return _0x22682d===undefined?null:{'jsonrpc':'2.0','id':_0x22682d,'error':_0xadb6d1};try{const _0x4317a5=params[_0x1904a5(0x121)]||{};if(Array[_0x1904a5(0x111)](_0x4317a5)||typeof _0x4317a5!==_0x1904a5(0xea))fail('INVALID_ARGUMENTS');validateIdentity(_0x4317a5);if(params['name']!==_0x1904a5(0xfb)&&params[_0x1904a5(0xbf)]!==_0x1904a5(0xe8)&&require(_0x1904a5(0xd5))[_0x1904a5(0x109)](params[_0x1904a5(0xbf)])&&!_0x4317a5[_0x1904a5(0x116)])fail(_0x1904a5(0xde),_0x1904a5(0x11c));const _0x4f03bd=this[_0x1904a5(0x101)][_0x1904a5(0xb3)](_0x58b257=>_0x58b257['name']===params[_0x1904a5(0xbf)]);if(!_0x4f03bd){const _0x4f57b6=require(_0x1904a5(0x134))['mapExposedToOriginal'](params[_0x1904a5(0xbf)]);if(_0x4f57b6&&_0x4f57b6[_0x1904a5(0x12f)]!==_0x1904a5(0x126)){const _0x30deff={};_0x30deff[_0x1904a5(0x12f)]=_0x4f57b6[_0x1904a5(0x12f)],_0x30deff[_0x1904a5(0x116)]=_0x4317a5[_0x1904a5(0x116)];const _0x28d905={};_0x28d905[_0x1904a5(0xb9)]=_0x1904a5(0xe8),_0x28d905[_0x1904a5(0x121)]=_0x30deff;const _0x1bfd86={};_0x1bfd86[_0x1904a5(0x105)]='BACKEND_CATALOG_DISCOVERY_REQUIRED',_0x1bfd86[_0x1904a5(0x129)]=_0x28d905;const _0x30a566=Object[_0x1904a5(0x123)](new Error('This\x20addon\x20needs\x20intentional\x20catalog\x20discovery;\x20call\x20mcp_agent_health\x20with\x20its\x20backend\x20and\x20sessionId.'),_0x1bfd86);throw _0x30a566;}fail(_0x1904a5(0xd9),_0x1904a5(0x133));}if(params[_0x1904a5(0xbf)]===_0x1904a5(0xfb))return _0x59162c(content({'workspaces':this[_0x1904a5(0xce)][_0x1904a5(0xe2)]()[_0x1904a5(0x137)](_0x219296=>!this[_0x1904a5(0xf6)]||_0x219296[_0x1904a5(0xdc)][_0x1904a5(0xc6)](this[_0x1904a5(0xf6)]))[_0x1904a5(0x114)](_0x4ff9e3=>this['selection'](_0x4ff9e3)),'connectionId':this[_0x1904a5(0xc2)]}));if(params[_0x1904a5(0xbf)]===_0x1904a5(0xe8)&&!_0x4317a5['sessionId']&&!_0x4317a5[_0x1904a5(0x12f)])return _0x59162c(content({'registration':_0x1904a5(0xe3),'connectionId':this[_0x1904a5(0xc2)],'boundSessions':this['sessions'][_0x1904a5(0xb5)],'backendsStartedByDiscovery':0x0,'serving':_0x1904a5(0xf2),'version':require(_0x1904a5(0x140))[_0x1904a5(0xcd)]}));for(const _0x1cf951 of _0x4f03bd[_0x1904a5(0xbb)][_0x1904a5(0x10b)]||[])if(_0x4317a5[_0x1cf951]===undefined&&_0x1cf951!=='sessionId')fail(_0x1904a5(0xb1)+_0x1cf951['replace'](/([a-z])([A-Z])/g,_0x1904a5(0x13a))[_0x1904a5(0xc3)](),_0x1904a5(0x139)+_0x1cf951+'.');const _0x514157=params[_0x1904a5(0xbf)]===_0x1904a5(0xbc)?await this[_0x1904a5(0xe9)](_0x4317a5):this[_0x1904a5(0x138)](_0x4317a5);if(_0x514157[_0x1904a5(0x10c)]?.['tools']?.[params['name']]?.['enabled']===![])fail('PROJECT_TOOL_DISABLED');const _0x489267={..._0x4317a5};_0x489267[_0x1904a5(0x116)]=_0x514157[_0x1904a5(0x116)];const _0xb92f88=_0x489267,_0x4572c5={...params};_0x4572c5[_0x1904a5(0x121)]=_0xb92f88;const _0x3abf8e={..._0xa6a83e};_0x3abf8e[_0x1904a5(0x13c)]=_0x4572c5;const _0x5b40ea=await _0x514157[_0x1904a5(0x124)][_0x1904a5(0xfc)](_0x3abf8e);if(params['name']==='mcp_agent_health'&&_0x4317a5['backend']&&!_0x5b40ea['isError']){const _0x337317={};_0x337317[_0x1904a5(0x11b)]='tools/list',_0x337317[_0x1904a5(0x13c)]={};const _0x57f416=await _0x514157['runtime'][_0x1904a5(0xfc)](_0x337317);let _0x12e7f8=![];for(const _0x4599a2 of _0x57f416['tools']||[]){if(require('./router')[_0x1904a5(0x12a)](_0x4599a2[_0x1904a5(0xbf)])?.[_0x1904a5(0x12f)]!==_0x4317a5['backend'])continue;const _0x44feef=require(_0x1904a5(0xb0))[_0x1904a5(0xba)](structuredClone(_0x4599a2)),_0x36a1e1=this[_0x1904a5(0x101)][_0x1904a5(0xb3)](_0x42fac7=>_0x42fac7['name']===_0x44feef[_0x1904a5(0xbf)]);if(_0x36a1e1&&JSON['stringify'](_0x36a1e1[_0x1904a5(0xbb)])!==JSON[_0x1904a5(0xfa)](_0x44feef['inputSchema']))fail(_0x1904a5(0x10d));!_0x36a1e1&&(this[_0x1904a5(0x101)][_0x1904a5(0x13b)](_0x44feef),_0x12e7f8=!![]);}if(_0x12e7f8)this[_0x1904a5(0xff)]();}return _0x59162c(_0x5b40ea);}catch(_0x5631a2){const _0x15eae5={};return _0x15eae5['tool']=_0x1904a5(0xfb),_0x15eae5['then']=_0x1904a5(0xbc),_0x15eae5[_0x1904a5(0x10b)]=[_0x1904a5(0x116),_0x1904a5(0xcb)],_0x59162c({...content({'success':![],'code':_0x5631a2[_0x1904a5(0x105)]||_0x1904a5(0x104),'error':_0x5631a2['message'],'recovery':_0x5631a2[_0x1904a5(0x129)]||(['WORKSPACE_BINDING_REQUIRED','WORKSPACE_AMBIGUOUS',_0x1904a5(0xca)][_0x1904a5(0xc6)](_0x5631a2[_0x1904a5(0x105)])?_0x15eae5:undefined)}),'isError':!![]});}}async[_0x2ea557(0xd0)](){const _0x290c9f=_0x2ea557;this['stopped']=!![],await Promise[_0x290c9f(0x10e)]([...this[_0x290c9f(0x117)][_0x290c9f(0x119)]()][_0x290c9f(0x114)](_0x31c866=>_0x31c866[_0x290c9f(0xe5)]));const _0x25e63c=await Promise[_0x290c9f(0x10e)]([...this[_0x290c9f(0xf7)][_0x290c9f(0x119)]()][_0x290c9f(0x114)](_0x14a333=>_0x14a333[_0x290c9f(0x124)][_0x290c9f(0xd0)]())),_0x34f73d=_0x25e63c[_0x290c9f(0xb3)](_0x380ee5=>_0x380ee5[_0x290c9f(0xed)]===_0x290c9f(0x106));if(_0x34f73d)throw _0x34f73d['reason'];this[_0x290c9f(0xf7)][_0x290c9f(0xf4)]();}}const _0x1198b1={};_0x1198b1[_0x2ea557(0x100)]=WorkspaceGateway,_0x1198b1[_0x2ea557(0xc1)]=validateIdentity,module[_0x2ea557(0xee)]=_0x1198b1;
1
+ 'use strict';const _0x2c9c65=_0x2c2d;(function(_0x2f4794,_0x4282f4){const _0x4c93ad=_0x2c2d,_0x33485e=_0x2f4794();while(!![]){try{const _0x56b0e1=parseInt(_0x4c93ad(0x266))/0x1+-parseInt(_0x4c93ad(0x20e))/0x2*(parseInt(_0x4c93ad(0x241))/0x3)+-parseInt(_0x4c93ad(0x20f))/0x4+-parseInt(_0x4c93ad(0x1d4))/0x5*(-parseInt(_0x4c93ad(0x24b))/0x6)+-parseInt(_0x4c93ad(0x1e1))/0x7*(parseInt(_0x4c93ad(0x237))/0x8)+-parseInt(_0x4c93ad(0x239))/0x9*(-parseInt(_0x4c93ad(0x1d9))/0xa)+-parseInt(_0x4c93ad(0x213))/0xb;if(_0x56b0e1===_0x4282f4)break;else _0x33485e['push'](_0x33485e['shift']());}catch(_0x343db6){_0x33485e['push'](_0x33485e['shift']());}}}(_0x18cf,0x593a0));const crypto=require(_0x2c9c65(0x225)),{WorkspaceRegistry}=require(_0x2c9c65(0x22f)),{gatewayCatalog}=require(_0x2c9c65(0x232)),{sameWorkspace}=require(_0x2c9c65(0x1d6)),contracts=require('../core/tool-contracts'),fail=(_0x11aa48,_0x480de2=_0x11aa48)=>{const _0x24a147=_0x2c9c65,_0x3368e7={};_0x3368e7[_0x24a147(0x22c)]=_0x11aa48;throw Object['assign'](new Error(_0x480de2),_0x3368e7);},content=_0x462361=>({'content':[{'type':_0x2c9c65(0x251),'text':JSON[_0x2c9c65(0x265)](_0x462361)}]});function validateIdentity(_0x4970f4){const _0x524202=_0x2c9c65,_0x95f359={};_0x95f359[_0x524202(0x25d)]=contracts[_0x524202(0x25d)],_0x95f359['requestId']=contracts['requestId'],_0x95f359[_0x524202(0x1ee)]=contracts['task'],_0x95f359[_0x524202(0x254)]=contracts[_0x524202(0x254)];for(const [_0x577d8b,_0x226389]of Object[_0x524202(0x224)](_0x95f359)){if(_0x4970f4[_0x577d8b]===undefined)continue;const _0x5ef085=_0x4970f4[_0x577d8b];if(typeof _0x5ef085!==_0x524202(0x203)||!_0x5ef085['trim']()||_0x5ef085['length']>_0x226389[_0x524202(0x226)]||_0x226389[_0x524202(0x1f5)]&&!new RegExp(_0x226389[_0x524202(0x1f5)])[_0x524202(0x235)](_0x5ef085))fail('INVALID_'+_0x577d8b[_0x524202(0x1d8)](/([a-z])([A-Z])/g,_0x524202(0x250))['toUpperCase'](),_0x226389[_0x524202(0x238)]);}}function _0x2c2d(_0x5338e8,_0x45c566){_0x5338e8=_0x5338e8-0x1d3;const _0x18cf62=_0x18cf();let _0x2c2d71=_0x18cf62[_0x5338e8];if(_0x2c2d['nKeQDQ']===undefined){var _0x3273a3=function(_0x4e4fd8){const _0x4ae15f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x586093='',_0x5ca906='';for(let _0xc6ea17=0x0,_0x3b3470,_0x147313,_0x1c6270=0x0;_0x147313=_0x4e4fd8['charAt'](_0x1c6270++);~_0x147313&&(_0x3b3470=_0xc6ea17%0x4?_0x3b3470*0x40+_0x147313:_0x147313,_0xc6ea17++%0x4)?_0x586093+=String['fromCharCode'](0xff&_0x3b3470>>(-0x2*_0xc6ea17&0x6)):0x0){_0x147313=_0x4ae15f['indexOf'](_0x147313);}for(let _0x46e744=0x0,_0x529ded=_0x586093['length'];_0x46e744<_0x529ded;_0x46e744++){_0x5ca906+='%'+('00'+_0x586093['charCodeAt'](_0x46e744)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ca906);};_0x2c2d['kACaHg']=_0x3273a3,_0x2c2d['MifvZj']={},_0x2c2d['nKeQDQ']=!![];}const _0x2b9215=_0x18cf62[0x0],_0x5a591d=_0x5338e8+_0x2b9215,_0x405f42=_0x2c2d['MifvZj'][_0x5a591d];return!_0x405f42?(_0x2c2d71=_0x2c2d['kACaHg'](_0x2c2d71),_0x2c2d['MifvZj'][_0x5a591d]=_0x2c2d71):_0x2c2d71=_0x405f42,_0x2c2d71;}class WorkspaceGateway{constructor(_0x4f3631={}){const _0xc9ce3e=_0x2c9c65;this[_0xc9ce3e(0x1e5)]=_0x4f3631['registry']||new WorkspaceRegistry(),this[_0xc9ce3e(0x1dc)]=_0x4f3631[_0xc9ce3e(0x1dc)],this[_0xc9ce3e(0x222)]=_0x4f3631[_0xc9ce3e(0x222)]||null,this[_0xc9ce3e(0x20a)]=_0x4f3631[_0xc9ce3e(0x20a)]||crypto[_0xc9ce3e(0x255)](),this[_0xc9ce3e(0x1f4)]=new Map(),this[_0xc9ce3e(0x201)]=new Map(),this[_0xc9ce3e(0x208)]=new Map(),this['catalog']=gatewayCatalog(),this['onCatalogChanged']=_0x4f3631[_0xc9ce3e(0x20d)]||(()=>{}),this[_0xc9ce3e(0x1da)]=null,this['stopped']=![];}async[_0x2c9c65(0x210)](_0x551b3d,_0x176e3b={}){const _0xfabd4c=_0x2c9c65;_0x176e3b['lease']?.['assertCurrent']();if(!_0x551b3d[_0xfabd4c(0x25d)])fail('SESSION_ID_REQUIRED',_0xfabd4c(0x220));const _0x260af1=this['sessions'][_0xfabd4c(0x1e8)](_0x551b3d[_0xfabd4c(0x25d)]);if(_0x260af1&&!_0x551b3d['workspaceId']&&!_0x551b3d[_0xfabd4c(0x227)])return _0x260af1;const _0x4b9b90=this[_0xfabd4c(0x201)][_0xfabd4c(0x1e8)](_0x551b3d[_0xfabd4c(0x25d)]);if(_0x4b9b90&&!_0x551b3d[_0xfabd4c(0x25f)]&&!_0x551b3d[_0xfabd4c(0x227)])return _0x4b9b90[_0xfabd4c(0x23f)];const _0x2481a7=this[_0xfabd4c(0x1e5)]['resolve'](_0x551b3d,{'host':this['host']});if(_0x551b3d[_0xfabd4c(0x219)])this['verifySelection'](_0x551b3d[_0xfabd4c(0x219)],_0x2481a7[_0xfabd4c(0x25f)]);if(_0x260af1){if(!sameWorkspace(_0x2481a7['workspace'],_0x260af1['workspace']))fail(_0xfabd4c(0x23c));return _0x260af1;}if(this[_0xfabd4c(0x201)][_0xfabd4c(0x207)](_0x551b3d[_0xfabd4c(0x25d)])){const _0x477921=this[_0xfabd4c(0x201)][_0xfabd4c(0x1e8)](_0x551b3d['sessionId']);if(!sameWorkspace(_0x477921[_0xfabd4c(0x228)],_0x2481a7[_0xfabd4c(0x228)]))fail(_0xfabd4c(0x23c));return _0x477921[_0xfabd4c(0x23f)];}const _0x16e7a8={};_0x16e7a8[_0xfabd4c(0x20a)]=this[_0xfabd4c(0x20a)],_0x16e7a8[_0xfabd4c(0x25d)]=_0x551b3d[_0xfabd4c(0x25d)],_0x16e7a8['workspace']=_0x2481a7[_0xfabd4c(0x228)],_0x16e7a8['workspaceId']=_0x2481a7[_0xfabd4c(0x25f)],_0x16e7a8[_0xfabd4c(0x260)]='apt-mcp-agent',_0x16e7a8[_0xfabd4c(0x223)]=_0xfabd4c(0x1ef),_0x16e7a8[_0xfabd4c(0x1ec)]=_0xfabd4c(0x205);const _0x5e71e1=_0x16e7a8,_0x2c42e7=((async()=>{const _0x41137f=_0xfabd4c;if(typeof this[_0x41137f(0x1dc)]!==_0x41137f(0x1e2))fail(_0x41137f(0x1f3));const _0x456562=_0x2481a7[_0x41137f(0x22e)]?.[this['host']]||{},_0xad1694=await this[_0x41137f(0x1dc)](_0x5e71e1,this[_0x41137f(0x1da)]||{},_0x456562);try{if(_0x176e3b[_0x41137f(0x258)])await require(_0x41137f(0x246))[_0x41137f(0x233)](_0x176e3b[_0x41137f(0x258)]);}catch(_0x426257){await _0xad1694[_0x41137f(0x263)]();throw _0x426257;}this['stopped']&&(await _0xad1694[_0x41137f(0x263)](),fail(_0x41137f(0x247)));const _0xcf135={..._0x5e71e1};_0xcf135[_0x41137f(0x249)]=_0xad1694,_0xcf135[_0x41137f(0x217)]=_0x456562;const _0x3acbd7=_0xcf135;return _0x176e3b[_0x41137f(0x258)]?.[_0x41137f(0x244)](),this[_0x41137f(0x1f4)][_0x41137f(0x25c)](_0x551b3d[_0x41137f(0x25d)],_0x3acbd7),_0x3acbd7;})()),_0x82b1f3={};_0x82b1f3['workspace']=_0x2481a7[_0xfabd4c(0x228)],_0x82b1f3[_0xfabd4c(0x23f)]=_0x2c42e7,this[_0xfabd4c(0x201)][_0xfabd4c(0x25c)](_0x551b3d['sessionId'],_0x82b1f3);try{return await _0x2c42e7;}finally{this[_0xfabd4c(0x201)][_0xfabd4c(0x1f2)](_0x551b3d[_0xfabd4c(0x25d)]);}}[_0x2c9c65(0x1d7)](_0x396756){const _0x46dccd=_0x2c9c65;for(const [_0x1fcce4,_0x19b614]of this['bindingSelections'])if(_0x19b614[_0x46dccd(0x21e)]<Date[_0x46dccd(0x230)]())this[_0x46dccd(0x208)][_0x46dccd(0x1f2)](_0x1fcce4);if(this[_0x46dccd(0x208)][_0x46dccd(0x202)]>=0x1000)fail(_0x46dccd(0x1e9));const _0x38c6b6=this[_0x46dccd(0x20a)]+'.'+crypto[_0x46dccd(0x21b)](0x20)[_0x46dccd(0x1d3)]('base64url');this[_0x46dccd(0x208)]['set'](_0x38c6b6,{'workspaceId':_0x396756['workspaceId'],'expiresAt':Date[_0x46dccd(0x230)]()+0xdbba0});const _0x4fa40a={};return _0x4fa40a[_0x46dccd(0x25f)]=_0x396756[_0x46dccd(0x25f)],_0x4fa40a[_0x46dccd(0x228)]=_0x396756[_0x46dccd(0x228)],_0x4fa40a[_0x46dccd(0x219)]=_0x38c6b6,_0x4fa40a;}[_0x2c9c65(0x23e)](_0x1fd843,_0x2b60bf){const _0x1c9421=_0x2c9c65,_0x7b23fb=this[_0x1c9421(0x208)][_0x1c9421(0x1e8)](_0x1fd843);if(!_0x7b23fb||_0x7b23fb[_0x1c9421(0x21e)]<Date[_0x1c9421(0x230)]()||_0x7b23fb[_0x1c9421(0x25f)]!==_0x2b60bf)fail('GATEWAY_SELECTION_REQUIRED',_0x1c9421(0x256));return _0x7b23fb;}[_0x2c9c65(0x25b)](_0x5799e8){const _0x12db87=_0x2c9c65;let _0x5e1c13;if(_0x5799e8['sessionId'])_0x5e1c13=this[_0x12db87(0x1f4)][_0x12db87(0x1e8)](_0x5799e8[_0x12db87(0x25d)]);else{if(this[_0x12db87(0x1f4)][_0x12db87(0x202)]===0x1)_0x5e1c13=this[_0x12db87(0x1f4)][_0x12db87(0x204)]()[_0x12db87(0x1db)]()[_0x12db87(0x206)];else{if(this['sessions'][_0x12db87(0x202)]>0x1)fail('WORKSPACE_AMBIGUOUS','Pass\x20sessionId;\x20this\x20connection\x20serves\x20multiple\x20project\x20sessions.');}}if(!_0x5e1c13)fail(_0x12db87(0x24c),_0x12db87(0x23a));if(_0x5799e8[_0x12db87(0x25f)]||_0x5799e8[_0x12db87(0x227)]){const _0x48749a=this[_0x12db87(0x1e5)][_0x12db87(0x22a)](_0x5799e8,{'host':this[_0x12db87(0x222)]});if(!sameWorkspace(_0x48749a[_0x12db87(0x228)],_0x5e1c13['workspace']))fail(_0x12db87(0x23c));}if(_0x5799e8['projectPath']&&!sameWorkspace(_0x5799e8[_0x12db87(0x1f1)],_0x5e1c13['workspace']))fail(_0x12db87(0x23c));return _0x5e1c13;}async[_0x2c9c65(0x1e7)](_0x19e2e){const _0x535c59=_0x2c9c65;if(this[_0x535c59(0x1f7)])fail('GATEWAY_CLOSED');const {id:_0x51d22b,method:_0x25ab9f,params:params={}}=_0x19e2e,_0x590b3a=_0x59216a=>({'jsonrpc':'2.0','id':_0x51d22b,'result':_0x59216a});if(_0x25ab9f==='initialize'||_0x25ab9f===_0x535c59(0x21f)){const _0x4e561f=[_0x535c59(0x218),_0x535c59(0x22b),_0x535c59(0x1f6),_0x535c59(0x200)],_0x1f66c6=_0x4e561f[_0x535c59(0x1fa)](params['protocolVersion'])?params['protocolVersion']:_0x4e561f['at'](-0x1),_0xd41220={...params};_0xd41220[_0x535c59(0x20c)]=_0x1f66c6,this[_0x535c59(0x1da)]=_0xd41220;const _0x1f59a5={};_0x1f59a5[_0x535c59(0x245)]=!![];const _0x41ab20={};return _0x41ab20['tools']=_0x1f59a5,_0x590b3a({'protocolVersion':_0x1f66c6,'capabilities':_0x41ab20,'serverInfo':{'name':_0x535c59(0x1fc),'version':require('../../package.json')[_0x535c59(0x229)]},'instructions':_0x535c59(0x1eb)});}if(_0x25ab9f===_0x535c59(0x1ea))return _0x590b3a({'tools':structuredClone(this[_0x535c59(0x234)])});if(_0x25ab9f===_0x535c59(0x261))return _0x590b3a({});if(_0x25ab9f==='notifications/initialized')return null;const _0x540883={};_0x540883['code']=-0x7f59,_0x540883['message']=_0x535c59(0x209);if(_0x25ab9f!==_0x535c59(0x24f))return _0x51d22b===undefined?null:{'jsonrpc':_0x535c59(0x212),'id':_0x51d22b,'error':_0x540883};try{const _0x3b1a3a=params[_0x535c59(0x257)]||{};if(Array[_0x535c59(0x243)](_0x3b1a3a)||typeof _0x3b1a3a!==_0x535c59(0x242))fail(_0x535c59(0x24a));validateIdentity(_0x3b1a3a);if(params[_0x535c59(0x25a)]!==_0x535c59(0x252)&&params[_0x535c59(0x25a)]!==_0x535c59(0x215)&&require(_0x535c59(0x1e0))[_0x535c59(0x1ff)](params[_0x535c59(0x25a)])&&!_0x3b1a3a[_0x535c59(0x25d)])fail(_0x535c59(0x1fb),'Mutations\x20require\x20the\x20explicitly\x20bound\x20sessionId.');const _0x4bf5f6=this['catalog']['find'](_0x136636=>_0x136636[_0x535c59(0x25a)]===params['name']);if(!_0x4bf5f6){const _0x362c51=require(_0x535c59(0x24d))[_0x535c59(0x1f8)](params[_0x535c59(0x25a)]);if(_0x362c51&&_0x362c51['backend']!==_0x535c59(0x231)){const _0x2775e9={};_0x2775e9[_0x535c59(0x23d)]=_0x362c51[_0x535c59(0x23d)],_0x2775e9[_0x535c59(0x25d)]=_0x3b1a3a[_0x535c59(0x25d)];const _0xccf778={};_0xccf778[_0x535c59(0x248)]=_0x535c59(0x215),_0xccf778['arguments']=_0x2775e9;const _0x53f687={};_0x53f687['code']='BACKEND_CATALOG_DISCOVERY_REQUIRED',_0x53f687[_0x535c59(0x1ed)]=_0xccf778;const _0x48805f=Object[_0x535c59(0x1e3)](new Error('This\x20addon\x20needs\x20intentional\x20catalog\x20discovery;\x20call\x20mcp_agent_health\x20with\x20its\x20backend\x20and\x20sessionId.'),_0x53f687);throw _0x48805f;}fail(_0x535c59(0x21a),_0x535c59(0x253));}if(params['name']===_0x535c59(0x252))return _0x590b3a(content({'workspaces':this[_0x535c59(0x1e5)][_0x535c59(0x1de)]()[_0x535c59(0x1f0)](_0x5f027c=>!this[_0x535c59(0x222)]||_0x5f027c[_0x535c59(0x1dd)][_0x535c59(0x1fa)](this[_0x535c59(0x222)]))[_0x535c59(0x24e)](_0x184211=>this[_0x535c59(0x1d7)](_0x184211)),'connectionId':this[_0x535c59(0x20a)]}));if(params[_0x535c59(0x25a)]===_0x535c59(0x215)&&!_0x3b1a3a[_0x535c59(0x25d)]&&!_0x3b1a3a[_0x535c59(0x23d)])return _0x590b3a(content({'registration':'apt-mcp-agent','connectionId':this['connectionId'],'boundSessions':this[_0x535c59(0x1f4)][_0x535c59(0x202)],'backendsStartedByDiscovery':0x0,'serving':'gateway','version':require(_0x535c59(0x216))[_0x535c59(0x229)]}));for(const _0x5be9aa of _0x4bf5f6[_0x535c59(0x1e4)]['required']||[])if(_0x3b1a3a[_0x5be9aa]===undefined&&_0x5be9aa!==_0x535c59(0x25d))fail(_0x535c59(0x236)+_0x5be9aa['replace'](/([a-z])([A-Z])/g,_0x535c59(0x250))[_0x535c59(0x214)](),'Required\x20field:\x20'+_0x5be9aa+'.');const _0x1b0426=params['name']===_0x535c59(0x1fd)?await this[_0x535c59(0x210)](_0x3b1a3a):this[_0x535c59(0x25b)](_0x3b1a3a);if(_0x1b0426[_0x535c59(0x217)]?.[_0x535c59(0x22d)]?.[params['name']]?.[_0x535c59(0x25e)]===![])fail('PROJECT_TOOL_DISABLED');const _0x334e09={..._0x3b1a3a};_0x334e09[_0x535c59(0x25d)]=_0x1b0426[_0x535c59(0x25d)];const _0x385153=_0x334e09,_0x1a34b9={...params};_0x1a34b9[_0x535c59(0x257)]=_0x385153;const _0x25a35c={..._0x19e2e};_0x25a35c[_0x535c59(0x264)]=_0x1a34b9;const _0x185651=await _0x1b0426[_0x535c59(0x249)][_0x535c59(0x21c)](_0x25a35c);if(params['name']===_0x535c59(0x215)&&_0x3b1a3a[_0x535c59(0x23d)]&&!_0x185651[_0x535c59(0x20b)]){const _0x579ae2={};_0x579ae2[_0x535c59(0x23b)]='tools/list',_0x579ae2[_0x535c59(0x264)]={};const _0x5985a=await _0x1b0426[_0x535c59(0x249)][_0x535c59(0x21c)](_0x579ae2);let _0x3f8a81=![];for(const _0x4f5009 of _0x5985a['tools']||[]){if(require(_0x535c59(0x24d))[_0x535c59(0x1f8)](_0x4f5009[_0x535c59(0x25a)])?.[_0x535c59(0x23d)]!==_0x3b1a3a[_0x535c59(0x23d)])continue;const _0xe47d6c=require(_0x535c59(0x232))['decorateGatewayTool'](structuredClone(_0x4f5009)),_0x535f6a=this[_0x535c59(0x234)]['find'](_0x4e31dd=>_0x4e31dd['name']===_0xe47d6c[_0x535c59(0x25a)]);if(_0x535f6a&&JSON['stringify'](_0x535f6a[_0x535c59(0x1e4)])!==JSON[_0x535c59(0x265)](_0xe47d6c['inputSchema']))fail(_0x535c59(0x221));!_0x535f6a&&(this[_0x535c59(0x234)][_0x535c59(0x1d5)](_0xe47d6c),_0x3f8a81=!![]);}if(_0x3f8a81)this[_0x535c59(0x20d)]();}return _0x590b3a(_0x185651);}catch(_0x26b44f){const _0x29f4fd={};return _0x29f4fd[_0x535c59(0x248)]='workspace_list',_0x29f4fd[_0x535c59(0x262)]='session_bootstrap',_0x29f4fd[_0x535c59(0x1e6)]=['sessionId',_0x535c59(0x25f)],_0x590b3a({...content({'success':![],'code':_0x26b44f['code']||_0x535c59(0x1f9),'error':_0x26b44f[_0x535c59(0x1df)],'recovery':_0x26b44f[_0x535c59(0x1ed)]||([_0x535c59(0x24c),_0x535c59(0x1fe),'WORKSPACE_NOT_REGISTERED'][_0x535c59(0x1fa)](_0x26b44f['code'])?_0x29f4fd:undefined)}),'isError':!![]});}}async[_0x2c9c65(0x263)](){const _0x4b20eb=_0x2c9c65;this[_0x4b20eb(0x1f7)]=!![],await Promise['allSettled']([...this[_0x4b20eb(0x201)][_0x4b20eb(0x204)]()][_0x4b20eb(0x24e)](_0x46bc76=>_0x46bc76['promise']));const _0x106528=await Promise['allSettled']([...this[_0x4b20eb(0x1f4)][_0x4b20eb(0x204)]()][_0x4b20eb(0x24e)](_0x24df89=>_0x24df89[_0x4b20eb(0x249)][_0x4b20eb(0x263)]())),_0x1662d1=_0x106528[_0x4b20eb(0x240)](_0x42a6c2=>_0x42a6c2[_0x4b20eb(0x21d)]==='rejected');if(_0x1662d1)throw _0x1662d1[_0x4b20eb(0x259)];this['sessions']['clear']();}}const _0xe2a8ca={};function _0x18cf(){const _0x103d9c=['u0vtu0LptL9jrf9srvfvsvjfra','yxb0lw1JCc1Hz2vUDa','C2vZC2LVBL9IB290C3rYyxa','v09ss1nqqunfx0fnqKLhvu9vuW','C2vUC2L0AxzLvg9VBa','mJaYns0Xms0Ynq','Aw5PDgLHBgL6Aw5N','C2L6zq','C3rYAw5N','DMfSDwvZ','Dw5JB25MAxjTzwq','DMfSDwu','AgfZ','yMLUzgLUz1nLBgvJDgLVBNm','twv0Ag9Kig5VDcbMB3vUza','y29UBMvJDgLVBKLK','AxnfCNjVCG','ChjVDg9JB2XwzxjZAw9U','B25dyxrHBg9Nq2HHBMDLza','nJyYChrtse5Z','oti3nZzPBNHjB00','yMLUza','v29YA3nWywnLr2f0zxDHEq','mI4W','mZm5ntC0nfbfAeLwrq','Dg9vChbLCKnHC2u','BwnWx2fNzw50x2HLywX0Aa','lI4VlI4VCgfJA2fNzs5QC29U','ChjVzMLSzq','mJaYnc0Xms0Wnq','yMLUzgLUz1rVA2vU','ve9ptf9ot1rFqvzbsuXbqKXf','CMfUzg9TqNL0zxm','CMvXDwvZDa','C3rHDhvZ','zxHWAxjLC0f0','C2vYDMvYl2rPC2nVDMvY','ugfZCYb0AguGC2fTzsbUB25LBxb0EsbZzxnZAw9UswqGDgHYB3vNAg91Dcb0AgLZignOyxqU','q0fuquXpr19tq0HftufFq09orKXjq1q','Ag9ZDa','ChjVDMvUyw5Jzq','zw50CMLLCW','BM9KztPJCNLWDg8','Bwf4tgvUz3rO','D29YA3nWywnLugf0Aa','D29YA3nWywnL','DMvYC2LVBG','CMvZB2X2zq','mJaYns0WmY0YnG','y29Kzq','Dg9VBhm','ChjVzMLSzxm','lI4VAw5ZDgfSBgvYl3DVCMTZCgfJzs1YzwDPC3rYEq','BM93','x2j1AwX0Aw4','lI9WDwjSAwmTy2f0ywXVzW','B2jZzxj2zuHVB2Tdyw5JzwXSyxrPB24','y2f0ywXVzW','DgvZDa','tuLtu0Lor18','ohDyDg1AsW','zgvZy3jPChrPB24','ouvhC3HIwq','q2fSBcb3B3jRC3bHy2vFBgLZDcWGDgHLBIbZzxnZAw9Ux2jVB3rZDhjHCcb3AxrOihnLC3nPB25jzcbHBMqGD29YA3nWywnLswqU','Bwv0Ag9K','v09ss1nqqunfx0jjtKrjtKDFq09orKXjq1q','yMfJA2vUza','DMvYAwz5u2vSzwn0Aw9U','ChjVBwLZzq','zMLUza','oda0uxjcugvW','B2jQzwn0','AxnbCNjHEq','yxnZzxj0q3vYCMvUDa','BgLZDenOyw5Nzwq','lI4Vy29Yzs9OB29RlwXLyxnL','r0furvDbwv9dte9truq','Dg9VBa','CNvUDgLTzq','su5wquXjrf9buKDvtuvovfm','nZe0mZqYEgPWywPO','v09ss1nqqunfx0jjtKrjtKDFuKvrvuLsruq','lI9YB3v0zxi','BwfW','Dg9VBhmVy2fSBa','jdfFjdi','Dgv4Da','D29YA3nWywnLx2XPC3q','vgHPCYbNyxrLD2f5igHHCYbUBYb2zxjPzMLLzcbJyxrHBg9NigzVCIb0Agf0ihrVB2WU','CNvUswq','CMfUzg9Tvvvjra','q2fSBcb3B3jRC3bHy2vFBgLZDcbVBIb0AgLZignVBM5Ly3rPB24Gyw5KihvZzsbPDhmGy3vYCMvUDcbIAw5KAw5Nvg9Rzw4U','yxjNDw1LBNrZ','BgvHC2u','CMvHC29U','BMfTzq','C2vSzwn0zwq','C2v0','C2vZC2LVBKLK','zw5HyMXLza','D29YA3nWywnLswq','CMvNAxn0CMf0Aw9U','CgLUzW','DgHLBG','y2XVC2u','CgfYyw1Z','C3rYAw5NAwz5','ndCYmdu4t0LpANHk','Dg9tDhjPBMC','mtvcu0nqwfG','ChvZAa','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','C2vSzwn0Aw9U','CMvWBgfJzq','mJiZnJG0mfrtB0PKBa','Aw5PDgLHBgL6zq','BMv4Da','CNvUDgLTzuzHy3rVCNK','Ag9ZDhm','BgLZDa','BwvZC2fNzq','lI4Vy29Yzs9JywXSzxiTy29UDgv4Da','mtG2nZG0nwjXv2DTqq','zNvUy3rPB24','yxnZAwDU','Aw5WDxrty2HLBwe','CMvNAxn0CNK','CMvXDwLYzwq','AgfUzgXL','z2v0','r0furvDbwv9truXfq1rjt05FteLnsvq','Dg9VBhmVBgLZDa','t25LiefqvcbNyxrLD2f5ihnLCNzLCYbPBNn0ywXSzwqGChjVAMvJDhmUienHBgWGD29YA3nWywnLx2XPC3qSihrOzw4GC2vZC2LVBL9IB290C3rYyxaGD2L0Acb5B3vYihnLC3nPB25jzcbHBMqGDgHLihbYB2PLy3qGD29YA3nWywnLswqUiefSD2f5CYbWyxnZihrOyxqGC2vZC2LVBKLKig9Uihn1yNnLCxvLBNqGy2fSBhmUie5LDMvYigjPBMqGAg9TzsbVCIbZzwXLy3qGysbWCM9Qzwn0igzYB20GCMvJzw5JEs4','BMf0AxzLswrLBNrPDhK','CMvJB3zLCNK','DgfZAW','y2fSBgvYlxnLBgvJDgvK','zMLSDgvY','ChjVAMvJDfbHDgG','zgvSzxrL','r0furvDbwv9svu5usu1fx1voqvzbsuXbqKXf','C2vZC2LVBNm','Cgf0DgvYBG','mJaYns0WnI0Xoa','C3rVChbLza','BwfWrxHWB3nLzfrVt3jPz2LUywW','r0furvDbwv9srvfvrvnux0zbsuXfra','Aw5JBhvKzxm'];_0x18cf=function(){return _0x103d9c;};return _0x18cf();}_0xe2a8ca[_0x2c9c65(0x211)]=WorkspaceGateway,_0xe2a8ca['validateIdentity']=validateIdentity,module['exports']=_0xe2a8ca;
@@ -6,7 +6,7 @@ For new or changed intent, call `route_request` with the target, stack and expli
6
6
 
7
7
  Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
8
 
9
- Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
9
+ Use at most four actors including the coordinator. One writer per workspace, except on parallel work items with disjoint scopes. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
10
 
11
11
  Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
12
 
@@ -6,7 +6,7 @@ For new or changed intent, call `route_request` with the target, stack and expli
6
6
 
7
7
  Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
8
 
9
- Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
9
+ Use at most four actors including the coordinator. One writer per workspace, except on parallel work items with disjoint scopes. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
10
 
11
11
  Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
12
 
@@ -6,7 +6,7 @@ For new or changed intent, call `route_request` with the target, stack and expli
6
6
 
7
7
  Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
8
 
9
- Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
9
+ Use at most four actors including the coordinator. One writer per workspace, except on parallel work items with disjoint scopes. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
10
 
11
11
  Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
12
 
@@ -4,7 +4,7 @@
4
4
  2. Call `route_request` for a new request or changed intent, including target package/stack and explicit skills. Load the selected specialist and companion skills with `skill_load`. Do not read the complete trigger catalog into the model context.
5
5
  3. Read-only questions, reviews and running existing tests do not require a code-change pipeline. Before executable changes, inspect `pipeline_status` and bind `pipeline_start` or `pipeline_use` with canonical task/run identity and an explicit workspace.
6
6
  4. Small changes use scope, fix/check and review. Features use clarification only where needed, a plan with acceptance criteria, implementation, verification, review and acceptance. Bug fixes start with diagnosis and regression coverage. Do not require three questions, a PRD or external issues when the task is already clear.
7
- 5. Use `pipeline_next` to reserve work before dispatch. Use its pinned `nativeDispatch` fields only where the native tool supports them. Codex model overrides use a fresh brief with `fork_turns:"none"` and the exact `nativeTaskName`; a follow-up cannot change an existing worker's model. Include APT attempt, actor and session markers in the brief. Delegate useful independent research and reviews to native host subagents, with at most four active actors including the coordinator. Only one writer per workspace. Workers must not start/reset/rebind the parent pipeline.
7
+ 5. Use `pipeline_next` to reserve work before dispatch. Use its pinned `nativeDispatch` fields only where the native tool supports them. Codex model overrides use a fresh brief with `fork_turns:"none"` and the exact `nativeTaskName`; a follow-up cannot change an existing worker's model. Include APT attempt, actor and session markers in the brief. Delegate useful independent research and reviews to native host subagents, with at most four active actors including the coordinator. Report `capabilities.subagents` and `capabilities.maxAgents` at bootstrap to reserve more than one worker. A writer is exclusive in its workspace unless it is confined. To write in parallel, mark work items `parallel: true` with disjoint `scope` path prefixes at the plan checkpoint, then reserve one writer per item with `pipeline_next(workItemId, actorId, role:"writer")`. The host hook denies a confined writer's file edits outside its scope; shell commands are not path-checked, so keep them inside it. Each writer ends with `action="report"`. Consume the reports and run `pipeline_verify` after every parallel writer has reported. `parallelWrite:false` reserves a parallel item exclusively when its scope proves too narrow. Workers must not start/reset/rebind the parent pipeline.
8
8
  6. Pin a quality plan for new executable runs: stable criteria, expected outcomes, concrete check IDs, target platforms and required review roles. Use `pipeline_verify` with a supported test report and named assertions, then `pipeline_checkpoint` with the current evidence IDs. Exit code, build, screenshot or a free-form summary cannot prove functional acceptance. Missing required checks keep the run unaccepted.
9
9
  7. Record separate technical and Product/UX review verdicts when the work affects a user flow. Review staged, unstaged and relevant untracked changes. Keep finding IDs open across reviews until a current fix or reasoned dismissal is confirmed by a reviewer. The native reviewer records its own structured verdict with `pipeline_checkpoint(action="review")`; nested work items use `spec`/`quality`, while run-level review uses `technical`/`product`. High-risk work needs host proof of the reviewer and verdict authorship; actor names, worker receipts alone and self-reported models do not prove it. Rerun checks after affected changes. Review-only requests produce findings, not unsolicited edits or MR comments.
10
10
  8. `pipeline_verify(kind="review")` cannot satisfy a review gate and is rejected before command execution. Use the `requiredReview` returned by `pipeline_next`, then record a structured review on the reserved attempt. Stop after ten repair/check attempts per work item or three repeated outcomes without progress. Preserve budgets and blocked/paused states across resume. User interruption always wins over continuation hooks.
@@ -21,4 +21,6 @@ phases continuously. Do not use Codex fields or write a verdict for the child.
21
21
  An async launch or report is not native completion. Refresh receipts before
22
22
  releasing a known native worker; missing stop evidence remains a blocker.
23
23
 
24
+ In Claude Code, `/apt-<skill>`, `/apt-flow-<workflow>` and `/apt-agent-<agent>` load the same deployed content on request; they are user-invocable only.
25
+
24
26
  Read `docs/agents/mcp-tools.md` for interfaces. Run `npx apt-mcp-agent-setup doctor` to inspect configuration. A registered MCP server or installed hook is not proof of successful activation. Health must show successful initialization and functional probes, not only a running process.
@@ -6,7 +6,7 @@ For new or changed intent, call `route_request` with the target, stack and expli
6
6
 
7
7
  Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
8
 
9
- Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
9
+ Use at most four actors including the coordinator. One writer per workspace, except on parallel work items with disjoint scopes. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
10
 
11
11
  Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
12
 
@@ -11,7 +11,7 @@ For new or changed intent, call `route_request` with the target, stack and expli
11
11
 
12
12
  Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
13
13
 
14
- Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
14
+ Use at most four actors including the coordinator. One writer per workspace, except on parallel work items with disjoint scopes. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
15
15
 
16
16
  Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
17
17
 
@@ -8,7 +8,7 @@ For Figma and Stitch tool names and authentication, read `docs/agents/design-con
8
8
  - Route: `route_request(sessionId, requestId, prompt, target, stack, explicitSkills)` returns the workflow, specialist, review roles, platform verification requirements and phase-specific skills. Load current-step skills with `skill_load` and agent/workflow content with `context_load` for each new worker or context epoch.
9
9
  - Models: `model_list(sessionId, offset, limit, query)` reports advertised, requestable and eligible models with source, account scope and coverage. CLI and Codex local cache entries are reference only. Use the pinned `nativeDispatch` from `pipeline_next`; compare its selector with the actual spawn arguments, then keep the host-reported worker model separate. An `inherit` selector or a model chosen in the IDE does not confirm a child model.
10
10
  - Start: `pipeline_start(pipeline, task, workspace, acceptanceCriteria, scope, qualityPlan, productImpact, sessionId)` creates a versioned run. Bootstrap the session in the intended workspace first. `workspace` is a schema-valid object, such as `{mode:"current",confirmed:true}`; a string or an unbound global server cannot create a run. Use the canonical `apt-mcp-agent` gateway, selecting a registered project with `workspace_list` then `session_bootstrap(sessionId, workspaceId, bindingToken)` first. Preserve that session ID on later calls. Legacy connections keep their reported alias until migration. New executable runs require at least one acceptance criterion string that exactly matches `qualityPlan.criteria[].expectedOutcome`. The plan uses `criteria: [{id, expectedOutcome, source, checkIds}]`, `checks: [{id, criterionIds, format, testIds, required}]`, and `reviews: [{id, required}]`. A recent user-facing web or mobile route requires its platform check and Product review. Use `pipeline_use(task, runId)` to resume the same run.
11
- - Execute: `pipeline_next(task, runId, sessionId, role, requestId)` reserves an attempt. Pass its exact `nativeTaskName`, model/tier, reasoning effort and fork mode to the native tool where that tool supports them. Codex model overrides require `fork_turns:"none"`; put `APT_ATTEMPT_ID`, `APT_ACTOR_ID` and `APT_SESSION_ID` in the fresh worker brief. A `followup_task` keeps the existing worker's model; dispatch a new worker when a new model is required. The coordinator controls transitions. Resource and quota waits remain resumable.
11
+ - Execute: `pipeline_next(task, runId, sessionId, role, requestId)` reserves an attempt. Pass its exact `nativeTaskName`, model/tier, reasoning effort and fork mode to the native tool where that tool supports them. Codex model overrides require `fork_turns:"none"`; put `APT_ATTEMPT_ID`, `APT_ACTOR_ID` and `APT_SESSION_ID` in the fresh worker brief. A `followup_task` keeps the existing worker's model; dispatch a new worker when a new model is required. The coordinator controls transitions. Resource and quota waits remain resumable. Writers are exclusive by default. Work items planned with `parallel: true` and disjoint `scope` prefixes reserve confined writers that run at the same time, one per item and at most four actors in total; `parallelWrite:true` confines a writer on an unmarked scoped item and `parallelWrite:false` reserves a marked item exclusively. A confined writer cannot edit files outside its scope and reports with `action="report"`; verification runs after all parallel writers have reported.
12
12
  - Verify: `pipeline_verify` records authorized argv execution under the run workspace. For functional acceptance, pass `checkId`, supported `reportFormat` and named test IDs in the pinned plan. Zero, skipped or unreadable tests and unrelated successful commands remain unverified. `pipeline_verify(kind="review")` is rejected before running a command. Read `pipeline_next.requiredReview`: nested work items require `spec`/`quality`, while run-level gates require `technical`/`product`. The reserved reviewer records its own structured verdict with `pipeline_checkpoint(action="review")`; resolution of a persistent finding needs current evidence and later reviewer confirmation. A direct start without a bound route needs Technical `impactAssessment` before acceptance. User-flow impact requires Product review and platform checks. Missing required platform checks leave the run unaccepted.
13
13
  - Inspect: `pipeline_status` reports current criterion/check status, open findings, reviewer provenance and pending creation intents without binding sessions. `pipeline_reset(task, runId, sessionId, confirm:true, target:"creation")` abandons a matching unfinished intent while preserving its file. The default `target:"run"` cancels a run without deleting history. `pipeline_prepare_merge` only prepares a report.
14
14
  - Read-only questions, review and existing test execution do not require a mutation pipeline. Scope-limited changes use the short pipeline; increased risk adds required checks.
@@ -6,7 +6,7 @@ For new or changed intent, call `route_request` with the target, stack and expli
6
6
 
7
7
  Before code changes, bind `pipeline_status` and `pipeline_start` or `pipeline_use` to an explicit task, runId and workspace. Reserve with `pipeline_next`; verify and checkpoint current code before completion. Read-only questions, review and existing tests need no code-change pipeline. Clarify only unresolved decisions.
8
8
 
9
- Use at most four actors including the coordinator and one writer per workspace. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
9
+ Use at most four actors including the coordinator. One writer per workspace, except on parallel work items with disjoint scopes. Respect host permissions, Plan Mode and user stops. Never claim independent review or native enforcement without observed capability. Keep attempts and evidence across resume; do not reset exhausted budgets.
10
10
 
11
11
  Preserve custom files. Write concise code and prose, run suitable checks, and review staged, unstaged and relevant new files. Publishing, merging and external messages require authorization. Strong caveman style is opt-in.
12
12