apt-mcp-agent-setup 3.5.20 → 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.
- package/README.md +33 -31
- package/bin/cli.js +1 -1
- package/build-input.json +57 -36
- package/bundle/NOTICES.md +0 -0
- package/bundle/core.enc +0 -0
- package/bundle/mcp-rules.enc +0 -0
- package/bundle/skills-aso.enc +0 -0
- package/bundle/skills-ba.enc +0 -0
- package/bundle/skills-base.enc +0 -0
- package/bundle/skills-be.enc +0 -0
- package/bundle/skills-design.enc +0 -0
- package/bundle/skills-fe.enc +0 -0
- package/bundle/skills-marketing.enc +0 -0
- package/bundle/skills-mobile.enc +0 -0
- package/bundle/skills-pm.enc +0 -0
- package/integrity-manifest.json +163 -161
- package/package.json +1 -1
- package/src/backends/browser-tools.js +1 -1
- package/src/backends/index-cache-authority.js +1 -1
- package/src/backends/index-command.js +1 -1
- package/src/backends/index-maintenance.js +1 -1
- package/src/backends/index-store.js +1 -1
- package/src/backends/profiles.js +1 -1
- package/src/backends/source-discovery.js +1 -1
- package/src/core/admission-fence.js +1 -1
- package/src/core/aso-import.js +1 -1
- package/src/core/backend-lease-recovery.js +1 -1
- package/src/core/boot-evidence.js +1 -1
- package/src/core/caller-context.js +1 -1
- package/src/core/catalog.js +1 -1
- package/src/core/claude-caller-authority.js +1 -1
- package/src/core/claude-invocation.js +1 -1
- package/src/core/claude-launch-recovery.js +1 -0
- package/src/core/claude-native.js +1 -1
- package/src/core/claude-plan.js +1 -1
- package/src/core/claude-transcript-scan.js +1 -1
- package/src/core/claude-worker-transcript.js +1 -1
- package/src/core/codex-host-metadata.js +1 -1
- package/src/core/codex-transcript-receipt.js +1 -1
- package/src/core/connection-inspector.js +1 -1
- package/src/core/context-metrics.js +1 -1
- package/src/core/doctor.js +1 -1
- package/src/core/draining-completion.js +1 -1
- package/src/core/execution.js +1 -1
- package/src/core/git-context.js +1 -1
- package/src/core/hook-bridge.js +1 -1
- package/src/core/hook-diagnostics.js +1 -1
- package/src/core/hook-lease.js +1 -1
- package/src/core/host-adapters.js +1 -1
- package/src/core/interrupted-boot-transport-proof.js +1 -1
- package/src/core/interrupted-natural-closure-proof.js +1 -1
- package/src/core/interrupted-operation-audit.js +1 -1
- package/src/core/interrupted-transport-proof.js +1 -1
- package/src/core/ipc-envelope.js +1 -1
- package/src/core/legacy-retirement-proof.js +1 -1
- package/src/core/memory-scope.js +1 -1
- package/src/core/memory-store.js +1 -1
- package/src/core/model-inventory.js +1 -1
- package/src/core/model-routing.js +1 -1
- package/src/core/native-dispatch.js +1 -1
- package/src/core/native-receipt.js +1 -1
- package/src/core/node-version.js +1 -1
- package/src/core/npm-cli.js +1 -1
- package/src/core/owned-command-child.js +1 -1
- package/src/core/owned-command.js +1 -1
- package/src/core/owned-lock.js +1 -1
- package/src/core/owned-process.js +1 -1
- package/src/core/pipeline-journal.js +1 -1
- package/src/core/presentations.js +1 -1
- package/src/core/quality-artifacts.js +1 -1
- package/src/core/quality.js +1 -1
- package/src/core/read-command.js +1 -1
- package/src/core/readonly-skill.js +1 -1
- package/src/core/recovery-archive.js +1 -1
- package/src/core/recovery-proof.js +1 -1
- package/src/core/resource-transaction.js +1 -1
- package/src/core/run-checkpoint.js +1 -1
- package/src/core/run-compatibility.js +1 -1
- package/src/core/run-state-codec.js +1 -1
- package/src/core/runtime-authority.js +1 -1
- package/src/core/runtime-info.js +1 -1
- package/src/core/runtime-ownership.js +1 -1
- package/src/core/session.js +1 -1
- package/src/core/skill-companions.js +1 -1
- package/src/core/skill-names.js +1 -1
- package/src/core/storage-retry.js +1 -1
- package/src/core/tool-contracts.js +1 -1
- package/src/core/update-control.js +1 -1
- package/src/core/upgrade-runs.js +1 -1
- package/src/core/upgrade-stop.js +1 -1
- package/src/core/windows-job.js +1 -1
- package/src/core/workflow-policy.js +1 -1
- package/src/core/workspace-generation.js +1 -1
- package/src/core/workspace-path.js +1 -1
- package/src/installer/bounded-command.js +1 -1
- package/src/installer/candidate-preflight.js +1 -1
- package/src/installer/claude-commands.js +1 -0
- package/src/installer/connection-activation.js +1 -1
- package/src/installer/connection-supervisor.js +1 -1
- package/src/installer/deployment-draft.js +1 -1
- package/src/installer/gateway-context.js +1 -1
- package/src/installer/gateway-migration.js +1 -1
- package/src/installer/gateway-runtime.js +1 -1
- package/src/installer/global-setup.js +1 -1
- package/src/installer/hook-context-client.js +1 -1
- package/src/installer/hook-dispatcher.js +82 -65
- package/src/installer/host-hooks.js +1 -1
- package/src/installer/index-interruption-recovery.js +1 -1
- package/src/installer/index-recovery.js +1 -1
- package/src/installer/install-intent.js +1 -1
- package/src/installer/interrupted-operation-recovery.js +1 -1
- package/src/installer/legacy-prepared-plan.js +1 -1
- package/src/installer/legacy-registration.js +1 -1
- package/src/installer/managed-config.js +1 -1
- package/src/installer/migration-scope.js +1 -1
- package/src/installer/platform-config.js +1 -1
- package/src/installer/prerequisites.js +1 -1
- package/src/installer/presentations.js +1 -1
- package/src/installer/project-outcome.js +1 -1
- package/src/installer/project-setup.js +1 -1
- package/src/installer/registration-closure.js +1 -1
- package/src/installer/registration-plan.js +1 -1
- package/src/installer/registration-receipt.js +1 -1
- package/src/installer/registrations.js +1 -1
- package/src/installer/runtime-activation.js +1 -1
- package/src/installer/runtime-child.js +1 -1
- package/src/installer/runtime-cleanup.js +1 -1
- package/src/installer/runtime-lock.js +1 -1
- package/src/installer/runtime-store.js +1 -1
- package/src/installer/runtime-supervisor.js +1 -1
- package/src/installer/setup-wizard.js +1 -1
- package/src/installer/update-addons.js +1 -1
- package/src/installer/update-cleanup.js +1 -1
- package/src/installer/update-executor.js +1 -1
- package/src/installer/update-history.js +1 -1
- package/src/installer/update-registration.js +1 -1
- package/src/installer/update-request.js +1 -1
- package/src/installer/update-scope.js +1 -1
- package/src/installer/workspace-registry.js +1 -1
- package/src/installer/workspace-transaction.js +1 -1
- package/src/installer/workspace-update.js +1 -1
- package/src/license/crypto.js +1 -1
- package/src/license/fingerprint.js +1 -1
- package/src/license/terms.js +1 -1
- package/src/license/verify.js +1 -1
- package/src/presets/index.js +1 -1
- package/src/proxy/backends.js +1 -1
- package/src/proxy/browser-sessions.js +1 -1
- package/src/proxy/core-tools.js +1 -1
- package/src/proxy/pipeline.js +1 -1
- package/src/proxy/public-catalog.js +1 -1
- package/src/proxy/router.config.js +1 -1
- package/src/proxy/router.js +1 -1
- package/src/proxy/server.js +1 -1
- package/src/proxy/workspace-gateway.js +1 -1
- package/src/templates/AGENTS.md +1 -1
- package/src/templates/CLAUDE.md +1 -1
- package/src/templates/GEMINI.md +1 -1
- package/src/templates/apt-runtime.md +3 -1
- package/src/templates/copilot-instructions.md +1 -1
- package/src/templates/cursorrules.mdc +1 -1
- package/src/templates/mcp-tools.md +1 -1
- package/src/templates/windsurfrules.md +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4dadc0=_0x30f7;function _0x30f7(_0x2686ff,_0x366453){_0x2686ff=_0x2686ff-0x77;const _0x4a4367=_0x4a43();let _0x30f7d0=_0x4a4367[_0x2686ff];if(_0x30f7['jFWHXN']===undefined){var _0x2ba286=function(_0x9db52a){const _0x4ec286='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25044c='',_0x17e967='';for(let _0x556053=0x0,_0x21effe,_0x290650,_0x38b035=0x0;_0x290650=_0x9db52a['charAt'](_0x38b035++);~_0x290650&&(_0x21effe=_0x556053%0x4?_0x21effe*0x40+_0x290650:_0x290650,_0x556053++%0x4)?_0x25044c+=String['fromCharCode'](0xff&_0x21effe>>(-0x2*_0x556053&0x6)):0x0){_0x290650=_0x4ec286['indexOf'](_0x290650);}for(let _0x3b5e90=0x0,_0x2dfdbf=_0x25044c['length'];_0x3b5e90<_0x2dfdbf;_0x3b5e90++){_0x17e967+='%'+('00'+_0x25044c['charCodeAt'](_0x3b5e90)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x17e967);};_0x30f7['WZZtoj']=_0x2ba286,_0x30f7['ZCXncd']={},_0x30f7['jFWHXN']=!![];}const _0x489baf=_0x4a4367[0x0],_0x17c6ee=_0x2686ff+_0x489baf,_0x4ffb95=_0x30f7['ZCXncd'][_0x17c6ee];return!_0x4ffb95?(_0x30f7d0=_0x30f7['WZZtoj'](_0x30f7d0),_0x30f7['ZCXncd'][_0x17c6ee]=_0x30f7d0):_0x30f7d0=_0x4ffb95,_0x30f7d0;}(function(_0x3cf21e,_0x2a1536){const _0x583edb=_0x30f7,_0x70f8b7=_0x3cf21e();while(!![]){try{const _0x25cf16=-parseInt(_0x583edb(0xd8))/0x1*(-parseInt(_0x583edb(0x106))/0x2)+-parseInt(_0x583edb(0xab))/0x3+-parseInt(_0x583edb(0xd7))/0x4*(parseInt(_0x583edb(0x9f))/0x5)+-parseInt(_0x583edb(0xe4))/0x6+-parseInt(_0x583edb(0xee))/0x7+parseInt(_0x583edb(0x77))/0x8+parseInt(_0x583edb(0x7c))/0x9;if(_0x25cf16===_0x2a1536)break;else _0x70f8b7['push'](_0x70f8b7['shift']());}catch(_0x4d237a){_0x70f8b7['push'](_0x70f8b7['shift']());}}}(_0x4a43,0xc2994));const crypto=require(_0x4dadc0(0xe8)),{WorkspaceRegistry}=require(_0x4dadc0(0x9d)),{gatewayCatalog}=require(_0x4dadc0(0xbf)),{sameWorkspace}=require(_0x4dadc0(0xbb)),contracts=require(_0x4dadc0(0xd6)),fail=(_0x31bcdc,_0x5ecc31=_0x31bcdc)=>{const _0xa41280={};_0xa41280['code']=_0x31bcdc;throw Object['assign'](new Error(_0x5ecc31),_0xa41280);},content=_0x68fcba=>({'content':[{'type':_0x4dadc0(0xef),'text':JSON[_0x4dadc0(0xca)](_0x68fcba)}]});function validateIdentity(_0x74f922){const _0x20e4a3=_0x4dadc0,_0x57e4b5={};_0x57e4b5[_0x20e4a3(0x86)]=contracts[_0x20e4a3(0x86)],_0x57e4b5[_0x20e4a3(0xf6)]=contracts[_0x20e4a3(0xf6)],_0x57e4b5[_0x20e4a3(0xb9)]=contracts[_0x20e4a3(0xb9)],_0x57e4b5[_0x20e4a3(0xaa)]=contracts[_0x20e4a3(0xaa)];for(const [_0x2f9380,_0x2d3c5c]of Object[_0x20e4a3(0xf3)](_0x57e4b5)){if(_0x74f922[_0x2f9380]===undefined)continue;const _0x249a6e=_0x74f922[_0x2f9380];if(typeof _0x249a6e!==_0x20e4a3(0x108)||!_0x249a6e[_0x20e4a3(0x104)]()||_0x249a6e[_0x20e4a3(0xcd)]>_0x2d3c5c[_0x20e4a3(0xdf)]||_0x2d3c5c[_0x20e4a3(0xdd)]&&!new RegExp(_0x2d3c5c[_0x20e4a3(0xdd)])[_0x20e4a3(0xc6)](_0x249a6e))fail('INVALID_'+_0x2f9380[_0x20e4a3(0x10b)](/([a-z])([A-Z])/g,_0x20e4a3(0x89))[_0x20e4a3(0xbc)](),_0x2d3c5c[_0x20e4a3(0xb8)]);}}class WorkspaceGateway{constructor(_0x369975={}){const _0x4c37a0=_0x4dadc0;this['registry']=_0x369975[_0x4c37a0(0xc0)]||new WorkspaceRegistry(),this['runtimeFactory']=_0x369975[_0x4c37a0(0xd9)],this['host']=_0x369975['host']||null,this['connectionId']=_0x369975[_0x4c37a0(0x92)]||crypto[_0x4c37a0(0xce)](),this[_0x4c37a0(0xa1)]=new Map(),this[_0x4c37a0(0xe0)]=new Map(),this['bindingSelections']=new Map(),this['catalog']=gatewayCatalog(),this[_0x4c37a0(0xc8)]=_0x369975[_0x4c37a0(0xc8)]||(()=>{}),this[_0x4c37a0(0xa4)]=null,this[_0x4c37a0(0x109)]=![];}async[_0x4dadc0(0x100)](_0x45db34,_0x2a3df6={}){const _0xf4971a=_0x4dadc0;_0x2a3df6['lease']?.['assertCurrent']();if(!_0x45db34[_0xf4971a(0x86)])fail(_0xf4971a(0xfb),_0xf4971a(0xe1));const _0x3c26f3=this[_0xf4971a(0xa1)][_0xf4971a(0xc7)](_0x45db34[_0xf4971a(0x86)]);if(_0x3c26f3&&!_0x45db34[_0xf4971a(0x7e)]&&!_0x45db34[_0xf4971a(0xd5)])return _0x3c26f3;const _0x151748=this[_0xf4971a(0xe0)][_0xf4971a(0xc7)](_0x45db34[_0xf4971a(0x86)]);if(_0x151748&&!_0x45db34[_0xf4971a(0x7e)]&&!_0x45db34[_0xf4971a(0xd5)])return _0x151748['promise'];const _0x4e3df3=this[_0xf4971a(0xc0)][_0xf4971a(0x78)](_0x45db34,{'host':this['host']});if(_0x45db34[_0xf4971a(0x9e)])this[_0xf4971a(0xf2)](_0x45db34[_0xf4971a(0x9e)],_0x4e3df3[_0xf4971a(0x7e)]);if(_0x3c26f3){if(!sameWorkspace(_0x4e3df3[_0xf4971a(0x103)],_0x3c26f3[_0xf4971a(0x103)]))fail('WORKSPACE_BINDING_CONFLICT');return _0x3c26f3;}if(this[_0xf4971a(0xe0)][_0xf4971a(0xe2)](_0x45db34[_0xf4971a(0x86)])){const _0x5ca6fa=this['initializing']['get'](_0x45db34[_0xf4971a(0x86)]);if(!sameWorkspace(_0x5ca6fa[_0xf4971a(0x103)],_0x4e3df3[_0xf4971a(0x103)]))fail(_0xf4971a(0xa6));return _0x5ca6fa[_0xf4971a(0x9c)];}const _0x3b67b9={};_0x3b67b9['connectionId']=this[_0xf4971a(0x92)],_0x3b67b9[_0xf4971a(0x86)]=_0x45db34[_0xf4971a(0x86)],_0x3b67b9[_0xf4971a(0x103)]=_0x4e3df3[_0xf4971a(0x103)],_0x3b67b9[_0xf4971a(0x7e)]=_0x4e3df3[_0xf4971a(0x7e)],_0x3b67b9[_0xf4971a(0xc4)]='apt-mcp-agent',_0x3b67b9[_0xf4971a(0x95)]=_0xf4971a(0xd1),_0x3b67b9[_0xf4971a(0xe6)]='unconfirmed';const _0x39d187=_0x3b67b9,_0x38a49b=((async()=>{const _0x318438=_0xf4971a;if(typeof this[_0x318438(0xd9)]!==_0x318438(0xb3))fail(_0x318438(0xb6));const _0x23b79d=_0x4e3df3[_0x318438(0xc2)]?.[this[_0x318438(0xae)]]||{},_0x5958f9=await this['runtimeFactory'](_0x39d187,this[_0x318438(0xa4)]||{},_0x23b79d);try{if(_0x2a3df6['lease'])await require('../core/hook-lease')[_0x318438(0xad)](_0x2a3df6[_0x318438(0xf0)]);}catch(_0x3bdbf0){await _0x5958f9[_0x318438(0xec)]();throw _0x3bdbf0;}this[_0x318438(0x109)]&&(await _0x5958f9[_0x318438(0xec)](),fail(_0x318438(0x90)));const _0x3199e4={..._0x39d187};_0x3199e4[_0x318438(0xc9)]=_0x5958f9,_0x3199e4[_0x318438(0xdc)]=_0x23b79d;const _0x263834=_0x3199e4;return _0x2a3df6[_0x318438(0xf0)]?.[_0x318438(0xcc)](),this[_0x318438(0xa1)][_0x318438(0x79)](_0x45db34[_0x318438(0x86)],_0x263834),_0x263834;})()),_0x4fedeb={};_0x4fedeb[_0xf4971a(0x103)]=_0x4e3df3[_0xf4971a(0x103)],_0x4fedeb[_0xf4971a(0x9c)]=_0x38a49b,this['initializing'][_0xf4971a(0x79)](_0x45db34[_0xf4971a(0x86)],_0x4fedeb);try{return await _0x38a49b;}finally{this[_0xf4971a(0xe0)][_0xf4971a(0xa3)](_0x45db34[_0xf4971a(0x86)]);}}['selection'](_0x457e9c){const _0x5d2aae=_0x4dadc0;for(const [_0x218937,_0x5d54b7]of this[_0x5d2aae(0x9b)])if(_0x5d54b7[_0x5d2aae(0x93)]<Date[_0x5d2aae(0xf1)]())this[_0x5d2aae(0x9b)][_0x5d2aae(0xa3)](_0x218937);if(this['bindingSelections'][_0x5d2aae(0xb5)]>=0x1000)fail(_0x5d2aae(0x7b));const _0x3f0b2e=this[_0x5d2aae(0x92)]+'.'+crypto[_0x5d2aae(0xc5)](0x20)['toString'](_0x5d2aae(0x9a));this[_0x5d2aae(0x9b)]['set'](_0x3f0b2e,{'workspaceId':_0x457e9c[_0x5d2aae(0x7e)],'expiresAt':Date[_0x5d2aae(0xf1)]()+0xdbba0});const _0x43deaf={};return _0x43deaf[_0x5d2aae(0x7e)]=_0x457e9c[_0x5d2aae(0x7e)],_0x43deaf[_0x5d2aae(0x103)]=_0x457e9c[_0x5d2aae(0x103)],_0x43deaf['bindingToken']=_0x3f0b2e,_0x43deaf;}['verifySelection'](_0x4883ee,_0x407099){const _0x3b96d5=_0x4dadc0,_0x5f3ebe=this[_0x3b96d5(0x9b)][_0x3b96d5(0xc7)](_0x4883ee);if(!_0x5f3ebe||_0x5f3ebe[_0x3b96d5(0x93)]<Date[_0x3b96d5(0xf1)]()||_0x5f3ebe['workspaceId']!==_0x407099)fail('GATEWAY_SELECTION_REQUIRED','Call\x20workspace_list\x20on\x20this\x20connection\x20and\x20use\x20its\x20current\x20bindingToken.');return _0x5f3ebe;}[_0x4dadc0(0xba)](_0x11c5e8){const _0x2c520e=_0x4dadc0;let _0x92ad85;if(_0x11c5e8[_0x2c520e(0x86)])_0x92ad85=this[_0x2c520e(0xa1)][_0x2c520e(0xc7)](_0x11c5e8['sessionId']);else{if(this[_0x2c520e(0xa1)][_0x2c520e(0xb5)]===0x1)_0x92ad85=this[_0x2c520e(0xa1)][_0x2c520e(0xde)]()['next']()[_0x2c520e(0xcf)];else{if(this[_0x2c520e(0xa1)][_0x2c520e(0xb5)]>0x1)fail('WORKSPACE_AMBIGUOUS',_0x2c520e(0xc3));}}if(!_0x92ad85)fail(_0x2c520e(0xe7),_0x2c520e(0xbe));if(_0x11c5e8[_0x2c520e(0x7e)]||_0x11c5e8[_0x2c520e(0xd5)]){const _0x2cba8c=this[_0x2c520e(0xc0)][_0x2c520e(0x78)](_0x11c5e8,{'host':this['host']});if(!sameWorkspace(_0x2cba8c[_0x2c520e(0x103)],_0x92ad85[_0x2c520e(0x103)]))fail('WORKSPACE_BINDING_CONFLICT');}if(_0x11c5e8[_0x2c520e(0x81)]&&!sameWorkspace(_0x11c5e8[_0x2c520e(0x81)],_0x92ad85[_0x2c520e(0x103)]))fail('WORKSPACE_BINDING_CONFLICT');return _0x92ad85;}async[_0x4dadc0(0x88)](_0x116a82){const _0x3dcc40=_0x4dadc0;if(this[_0x3dcc40(0x109)])fail(_0x3dcc40(0x90));const {id:_0x4beca6,method:_0x45989f,params:params={}}=_0x116a82,_0x2eee67=_0x5190ea=>({'jsonrpc':_0x3dcc40(0x7f),'id':_0x4beca6,'result':_0x5190ea});if(_0x45989f===_0x3dcc40(0xa4)||_0x45989f===_0x3dcc40(0xa2)){const _0x5780b7=[_0x3dcc40(0xa8),_0x3dcc40(0x8c),'2025-06-18',_0x3dcc40(0x7a)],_0x348995=_0x5780b7['includes'](params[_0x3dcc40(0x96)])?params['protocolVersion']:_0x5780b7['at'](-0x1),_0x3ed13a={...params};_0x3ed13a['protocolVersion']=_0x348995,this[_0x3dcc40(0xa4)]=_0x3ed13a;const _0x1a08ee={};_0x1a08ee[_0x3dcc40(0xf7)]=!![];const _0xa8e2f1={};return _0xa8e2f1['tools']=_0x1a08ee,_0x2eee67({'protocolVersion':_0x348995,'capabilities':_0xa8e2f1,'serverInfo':{'name':_0x3dcc40(0x82),'version':require(_0x3dcc40(0x84))[_0x3dcc40(0xf8)]},'instructions':_0x3dcc40(0x98)});}if(_0x45989f===_0x3dcc40(0x85))return _0x2eee67({'tools':structuredClone(this['catalog'])});if(_0x45989f===_0x3dcc40(0xbd))return _0x2eee67({});if(_0x45989f===_0x3dcc40(0xdb))return null;const _0x37e6bb={};_0x37e6bb[_0x3dcc40(0xe3)]=-0x7f59,_0x37e6bb['message']=_0x3dcc40(0xea);if(_0x45989f!==_0x3dcc40(0xcb))return _0x4beca6===undefined?null:{'jsonrpc':'2.0','id':_0x4beca6,'error':_0x37e6bb};try{const _0x9aaf0f=params[_0x3dcc40(0x10c)]||{};if(Array[_0x3dcc40(0xac)](_0x9aaf0f)||typeof _0x9aaf0f!==_0x3dcc40(0x99))fail(_0x3dcc40(0xe9));validateIdentity(_0x9aaf0f);if(params[_0x3dcc40(0xb4)]!==_0x3dcc40(0xe5)&¶ms['name']!==_0x3dcc40(0xf5)&&require('../core/caller-context')[_0x3dcc40(0xd2)](params[_0x3dcc40(0xb4)])&&!_0x9aaf0f[_0x3dcc40(0x86)])fail(_0x3dcc40(0xfb),_0x3dcc40(0x10d));const _0x4427d9=this[_0x3dcc40(0x8f)][_0x3dcc40(0xfd)](_0x4afc04=>_0x4afc04[_0x3dcc40(0xb4)]===params[_0x3dcc40(0xb4)]);if(!_0x4427d9){const _0xd4bd31=require(_0x3dcc40(0xb7))[_0x3dcc40(0xb1)](params[_0x3dcc40(0xb4)]);if(_0xd4bd31&&_0xd4bd31['backend']!==_0x3dcc40(0x7d)){const _0x1cdced={};_0x1cdced[_0x3dcc40(0xa9)]=_0xd4bd31[_0x3dcc40(0xa9)],_0x1cdced[_0x3dcc40(0x86)]=_0x9aaf0f[_0x3dcc40(0x86)];const _0x4fb282={};_0x4fb282['tool']='mcp_agent_health',_0x4fb282[_0x3dcc40(0x10c)]=_0x1cdced;const _0x1364ce={};_0x1364ce[_0x3dcc40(0xe3)]=_0x3dcc40(0x8b),_0x1364ce['recovery']=_0x4fb282;const _0x150c5b=Object[_0x3dcc40(0xaf)](new Error(_0x3dcc40(0xb0)),_0x1364ce);throw _0x150c5b;}fail(_0x3dcc40(0xfa),_0x3dcc40(0x102));}if(params[_0x3dcc40(0xb4)]===_0x3dcc40(0xe5))return _0x2eee67(content({'workspaces':this[_0x3dcc40(0xc0)]['list']()[_0x3dcc40(0x80)](_0x5d9bab=>!this[_0x3dcc40(0xae)]||_0x5d9bab[_0x3dcc40(0xfc)][_0x3dcc40(0x107)](this[_0x3dcc40(0xae)]))[_0x3dcc40(0x10a)](_0x4314dd=>this[_0x3dcc40(0x8e)](_0x4314dd)),'connectionId':this[_0x3dcc40(0x92)]}));if(params[_0x3dcc40(0xb4)]===_0x3dcc40(0xf5)&&!_0x9aaf0f[_0x3dcc40(0x86)]&&!_0x9aaf0f[_0x3dcc40(0xa9)])return _0x2eee67(content({'registration':'apt-mcp-agent','connectionId':this[_0x3dcc40(0x92)],'boundSessions':this[_0x3dcc40(0xa1)][_0x3dcc40(0xb5)],'backendsStartedByDiscovery':0x0,'serving':_0x3dcc40(0xb2),'version':require('../../package.json')[_0x3dcc40(0xf8)]}));for(const _0x2e8141 of _0x4427d9[_0x3dcc40(0x87)][_0x3dcc40(0xa5)]||[])if(_0x9aaf0f[_0x2e8141]===undefined&&_0x2e8141!=='sessionId')fail(_0x3dcc40(0x94)+_0x2e8141[_0x3dcc40(0x10b)](/([a-z])([A-Z])/g,_0x3dcc40(0x89))[_0x3dcc40(0xbc)](),'Required\x20field:\x20'+_0x2e8141+'.');const _0x4f05c4=params['name']===_0x3dcc40(0x8a)?await this[_0x3dcc40(0x100)](_0x9aaf0f):this[_0x3dcc40(0xba)](_0x9aaf0f);if(_0x4f05c4[_0x3dcc40(0xdc)]?.[_0x3dcc40(0xfe)]?.[params[_0x3dcc40(0xb4)]]?.[_0x3dcc40(0xc1)]===![])fail('PROJECT_TOOL_DISABLED');const _0x20673a={..._0x9aaf0f};_0x20673a[_0x3dcc40(0x86)]=_0x4f05c4['sessionId'];const _0x339e0b=_0x20673a,_0x1a943f={...params};_0x1a943f['arguments']=_0x339e0b;const _0x5d9dc1={..._0x116a82};_0x5d9dc1[_0x3dcc40(0xf4)]=_0x1a943f;const _0x250312=await _0x4f05c4[_0x3dcc40(0xc9)][_0x3dcc40(0xd3)](_0x5d9dc1);if(params[_0x3dcc40(0xb4)]===_0x3dcc40(0xf5)&&_0x9aaf0f[_0x3dcc40(0xa9)]&&!_0x250312[_0x3dcc40(0xed)]){const _0x1ac39e={};_0x1ac39e[_0x3dcc40(0xda)]=_0x3dcc40(0x85),_0x1ac39e['params']={};const _0x12ce50=await _0x4f05c4['runtime']['request'](_0x1ac39e);let _0x1a8ee9=![];for(const _0x8ddaa2 of _0x12ce50[_0x3dcc40(0xfe)]||[]){if(require(_0x3dcc40(0xb7))[_0x3dcc40(0xb1)](_0x8ddaa2[_0x3dcc40(0xb4)])?.['backend']!==_0x9aaf0f['backend'])continue;const _0x3fbb02=require(_0x3dcc40(0xbf))[_0x3dcc40(0xa7)](structuredClone(_0x8ddaa2)),_0x13f8d3=this[_0x3dcc40(0x8f)][_0x3dcc40(0xfd)](_0x416012=>_0x416012[_0x3dcc40(0xb4)]===_0x3fbb02[_0x3dcc40(0xb4)]);if(_0x13f8d3&&JSON[_0x3dcc40(0xca)](_0x13f8d3[_0x3dcc40(0x87)])!==JSON['stringify'](_0x3fbb02[_0x3dcc40(0x87)]))fail(_0x3dcc40(0x97));!_0x13f8d3&&(this[_0x3dcc40(0x8f)][_0x3dcc40(0x101)](_0x3fbb02),_0x1a8ee9=!![]);}if(_0x1a8ee9)this[_0x3dcc40(0xc8)]();}return _0x2eee67(_0x250312);}catch(_0x4a802e){const _0x34281a={};return _0x34281a[_0x3dcc40(0xd4)]=_0x3dcc40(0xe5),_0x34281a['then']='session_bootstrap',_0x34281a['required']=['sessionId','workspaceId'],_0x2eee67({...content({'success':![],'code':_0x4a802e[_0x3dcc40(0xe3)]||_0x3dcc40(0xff),'error':_0x4a802e[_0x3dcc40(0x91)],'recovery':_0x4a802e['recovery']||([_0x3dcc40(0xe7),_0x3dcc40(0xd0),_0x3dcc40(0xeb)][_0x3dcc40(0x107)](_0x4a802e[_0x3dcc40(0xe3)])?_0x34281a:undefined)}),'isError':!![]});}}async['close'](){const _0x419581=_0x4dadc0;this['stopped']=!![],await Promise['allSettled']([...this[_0x419581(0xe0)][_0x419581(0xde)]()][_0x419581(0x10a)](_0x39595a=>_0x39595a[_0x419581(0x9c)]));const _0x2df961=await Promise[_0x419581(0x105)]([...this[_0x419581(0xa1)][_0x419581(0xde)]()]['map'](_0x5eb97c=>_0x5eb97c[_0x419581(0xc9)][_0x419581(0xec)]())),_0x49c424=_0x2df961[_0x419581(0xfd)](_0xacb089=>_0xacb089['status']==='rejected');if(_0x49c424)throw _0x49c424[_0x419581(0x8d)];this[_0x419581(0xa1)][_0x419581(0x83)]();}}const _0x1f3cb5={};function _0x4a43(){const _0x2520f5=['su5wquXjrf9buKDvtuvovfm','twv0Ag9Kig5VDcbMB3vUza','v09ss1nqqunfx05pvf9sruDju1rfuKve','y2XVC2u','AxnfCNjVCG','mtaWmtq5zeTJDMzP','Dgv4Da','BgvHC2u','BM93','DMvYAwz5u2vSzwn0Aw9U','zw50CMLLCW','CgfYyw1Z','BwnWx2fNzw50x2HLywX0Aa','CMvXDwvZDeLK','BgLZDenOyw5Nzwq','DMvYC2LVBG','v29YA3nWywnLr2f0zxDHEq','ve9ptf9ot1rFqvzbsuXbqKXf','u0vtu0LptL9jrf9srvfvsvjfra','Ag9ZDhm','zMLUza','Dg9VBhm','r0furvDbwv9srvfvrvnux0zbsuXfra','yMLUza','ChvZAa','vgHPCYbNyxrLD2f5igHHCYbUBYb2zxjPzMLLzcbJyxrHBg9NigzVCIb0Agf0ihrVB2WU','D29YA3nWywnL','DhjPBq','ywXSu2v0DgXLza','mte2rgHzBNnM','Aw5JBhvKzxm','C3rYAw5N','C3rVChbLza','BwfW','CMvWBgfJzq','yxjNDw1LBNrZ','txv0yxrPB25ZihjLCxvPCMuGDgHLigv4CgXPy2L0BhKGyM91BMqGC2vZC2LVBKLKlG','odiXmZaWmhzJte9qBG','CMvZB2X2zq','C2v0','mJaYns0Xms0Ynq','r0furvDbwv9truXfq1rjt05FteLnsvq','mty2ndGWmdjds3nyA3y','x2j1AwX0Aw4','D29YA3nWywnLswq','mI4W','zMLSDgvY','ChjVAMvJDfbHDgG','yxb0lw1JCc1Hz2vUDa','y2XLyxi','lI4VlI4VCgfJA2fNzs5QC29U','Dg9VBhmVBgLZDa','C2vZC2LVBKLK','Aw5WDxrty2HLBwe','AgfUzgXL','jdfFjdi','C2vZC2LVBL9IB290C3rYyxa','qKfds0vorf9dqvrbte9hx0rju0npvKvswv9srvfvsvjfra','mJaYns0WmY0YnG','CMvHC29U','C2vSzwn0Aw9U','y2f0ywXVzW','r0furvDbwv9dte9truq','BwvZC2fNzq','y29UBMvJDgLVBKLK','zxHWAxjLC0f0','tuLtu0Lor18','ChjVDMvUyw5Jzq','ChjVDg9JB2XwzxjZAw9U','q0fuquXpr19tq0HftufFq09orKXjq1q','t25LiefqvcbNyxrLD2f5ihnLCNzLCYbPBNn0ywXSzwqGChjVAMvJDhmUienHBgWGD29YA3nWywnLx2XPC3qSihrOzw4GC2vZC2LVBL9IB290C3rYyxaGD2L0Acb5B3vYihnLC3nPB25jzcbHBMqGDgHLihbYB2PLy3qGD29YA3nWywnLswqUiefSD2f5CYbWyxnZihrOyxqGC2vZC2LVBKLKig9Uihn1yNnLCxvLBNqGy2fSBhmUie5LDMvYigjPBMqGAg9TzsbVCIbZzwXLy3qGysbWCM9Qzwn0igzYB20GCMvJzw5JEs4','B2jQzwn0','yMfZzty0DxjS','yMLUzgLUz1nLBgvJDgLVBNm','ChjVBwLZzq','lI4VAw5ZDgfSBgvYl3DVCMTZCgfJzs1YzwDPC3rYEq','yMLUzgLUz1rVA2vU','ndu1nu93swjorq','zxHWB3j0CW','C2vZC2LVBNm','C2vYDMvYl2rPC2nVDMvY','zgvSzxrL','Aw5PDgLHBgL6zq','CMvXDwLYzwq','v09ss1nqqunfx0jjtKrjtKDFq09orKXjq1q','zgvJB3jHDgvhyxrLD2f5vg9VBa','mJaYnc0Xms0Wnq','yMfJA2vUza','CNvUswq','mZCWndq4n3jIvMzVuq','AxnbCNjHEq','B2jZzxj2zuHVB2Tdyw5JzwXSyxrPB24','Ag9ZDa','yxnZAwDU','vgHPCYbHzgrVBIbUzwvKCYbPBNrLBNrPB25HBcbJyxrHBg9NigrPC2nVDMvYEtSGy2fSBcbTy3bFywDLBNrFAgvHBhrOihDPDgGGAxrZigjHy2TLBMqGyw5KihnLC3nPB25jzc4','BwfWrxHWB3nLzfrVt3jPz2LUywW','z2f0zxDHEq','zNvUy3rPB24','BMfTzq','C2L6zq','r0furvDbwv9svu5usu1fx1voqvzbsuXbqKXf','lI9YB3v0zxi','zgvZy3jPChrPB24','DgfZAW','C2vSzwn0zwq','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','Dg9vChbLCKnHC2u','CgLUzW','q2fSBcb3B3jRC3bHy2vFBgLZDcWGDgHLBIbZzxnZAw9Ux2jVB3rZDhjHCcb3AxrOihnLC3nPB25jzcbHBMqGD29YA3nWywnLswqU','lI9WDwjSAwmTy2f0ywXVzW','CMvNAxn0CNK','zw5HyMXLza','ChjVzMLSzxm','ugfZCYbZzxnZAw9Uswq7ihrOAxmGy29UBMvJDgLVBIbZzxj2zxmGBxvSDgLWBguGChjVAMvJDcbZzxnZAw9UCY4','CMvNAxn0CMf0Aw9U','CMfUzg9TqNL0zxm','DgvZDa','z2v0','B25dyxrHBg9Nq2HHBMDLza','CNvUDgLTzq','C3rYAw5NAwz5','Dg9VBhmVy2fSBa','yxnZzxj0q3vYCMvUDa','BgvUz3rO','CMfUzg9Tvvvjra','DMfSDwu','v09ss1nqqunfx0fnqKLhvu9vuW','y2fSBgvYlxnLBgvJDgvK','C2vUC2L0AxzLvg9VBa','CMvXDwvZDa','Dg9VBa','D29YA3nWywnLugf0Aa','lI4Vy29Yzs90B29SlwnVBNrYywn0CW','mJu3mKvnse5tCa','mtm5mZbgtgX5wxG','CNvUDgLTzuzHy3rVCNK','Bwv0Ag9K','BM90AwzPy2f0Aw9UCY9PBML0AwfSAxPLza','ChjVzMLSzq','Cgf0DgvYBG','DMfSDwvZ','Bwf4tgvUz3rO','Aw5PDgLHBgL6Aw5N','ugfZCYb0AguGC2fTzsbUB25LBxb0EsbZzxnZAw9UswqGDgHYB3vNAg91Dcb0AgLZignOyxqU','AgfZ','y29Kzq','nJmXnde0ohPTD25Ayq','D29YA3nWywnLx2XPC3q','BMf0AxzLswrLBNrPDhK','v09ss1nqqunfx0jjtKrjtKDFuKvrvuLsruq','BM9KztPJCNLWDg8'];_0x4a43=function(){return _0x2520f5;};return _0x4a43();}_0x1f3cb5[_0x4dadc0(0xf9)]=WorkspaceGateway,_0x1f3cb5['validateIdentity']=validateIdentity,module[_0x4dadc0(0xa0)]=_0x1f3cb5;
|
|
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)&¶ms[_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;
|
package/src/templates/AGENTS.md
CHANGED
|
@@ -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
|
|
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
|
|
package/src/templates/CLAUDE.md
CHANGED
|
@@ -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
|
|
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
|
|
package/src/templates/GEMINI.md
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|