apt-mcp-agent-setup 3.5.20 → 3.5.22
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 +66 -38
- 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 +165 -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/native-retirement.js +1 -0
- 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/stale-run-release.js +1 -0
- 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 _0x501782=_0x17e7;(function(_0x13129a,_0x19c49d){const _0x390954=_0x17e7,_0x31cb03=_0x13129a();while(!![]){try{const _0x44f465=-parseInt(_0x390954(0x100))/0x1*(-parseInt(_0x390954(0xec))/0x2)+-parseInt(_0x390954(0x14e))/0x3+-parseInt(_0x390954(0xe8))/0x4*(-parseInt(_0x390954(0x16f))/0x5)+parseInt(_0x390954(0x128))/0x6*(-parseInt(_0x390954(0x113))/0x7)+-parseInt(_0x390954(0x119))/0x8*(parseInt(_0x390954(0x130))/0x9)+-parseInt(_0x390954(0x15e))/0xa*(-parseInt(_0x390954(0x13b))/0xb)+parseInt(_0x390954(0x15f))/0xc*(-parseInt(_0x390954(0x15d))/0xd);if(_0x44f465===_0x19c49d)break;else _0x31cb03['push'](_0x31cb03['shift']());}catch(_0x3fadb7){_0x31cb03['push'](_0x31cb03['shift']());}}}(_0x148b,0xc315f));function _0x17e7(_0x3c2bd4,_0x4b5aea){_0x3c2bd4=_0x3c2bd4-0xe8;const _0x148be7=_0x148b();let _0x17e71c=_0x148be7[_0x3c2bd4];if(_0x17e7['Cipjax']===undefined){var _0x474d3e=function(_0x12bd57){const _0x2985aa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x251d0d='',_0x1637a8='';for(let _0x546293=0x0,_0x193230,_0x118b5a,_0x24d0ad=0x0;_0x118b5a=_0x12bd57['charAt'](_0x24d0ad++);~_0x118b5a&&(_0x193230=_0x546293%0x4?_0x193230*0x40+_0x118b5a:_0x118b5a,_0x546293++%0x4)?_0x251d0d+=String['fromCharCode'](0xff&_0x193230>>(-0x2*_0x546293&0x6)):0x0){_0x118b5a=_0x2985aa['indexOf'](_0x118b5a);}for(let _0xf04b4b=0x0,_0x2b81b9=_0x251d0d['length'];_0xf04b4b<_0x2b81b9;_0xf04b4b++){_0x1637a8+='%'+('00'+_0x251d0d['charCodeAt'](_0xf04b4b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1637a8);};_0x17e7['OUscGq']=_0x474d3e,_0x17e7['HbUzbr']={},_0x17e7['Cipjax']=!![];}const _0x3dab65=_0x148be7[0x0],_0x55dffa=_0x3c2bd4+_0x3dab65,_0x21bcff=_0x17e7['HbUzbr'][_0x55dffa];return!_0x21bcff?(_0x17e71c=_0x17e7['OUscGq'](_0x17e71c),_0x17e7['HbUzbr'][_0x55dffa]=_0x17e71c):_0x17e71c=_0x21bcff,_0x17e71c;}function _0x148b(){const _0x58f502=['zxHWAxjLC0f0','uMvXDwLYzwqGzMLLBgq6ia','C2v0','ChjVAMvJDfbHDgG','CMvQzwn0zwq','Dg9vChbLCKnHC2u','ChvZAa','AgfUzgXL','y2f0ywXVzW','q2fSBcb3B3jRC3bHy2vFBgLZDcbVBIb0AgLZignVBM5Ly3rPB24Gyw5KihvZzsbPDhmGy3vYCMvUDcbIAw5KAw5Nvg9Rzw4U','ugfZCYb0AguGC2fTzsbUB25LBxb0EsbZzxnZAw9UswqGDgHYB3vNAg91Dcb0AgLZignOyxqU','y2XVC2u','zw5HyMXLza','CMvXDwvZDeLK','D29YA3nWywnLswq','D29YA3nWywnL','Dg9VBhmVy2fSBa','D29YA3nWywnLugf0Aa','mteZmdqZBgvNzKfn','C2vSzwn0zwq','Dgv4Da','BwnWx2fNzw50x2HLywX0Aa','B25dyxrHBg9Nq2HHBMDLza','DMvYC2LVBG','ndC5ndy0q0foy09n','DhjPBq','yMLUzgLUz1rVA2vU','y29Kzq','CgfYyw1Z','BwfWrxHWB3nLzfrVt3jPz2LUywW','ChjVDg9JB2XwzxjZAw9U','BMf0AxzLswrLBNrPDhK','C2vZC2LVBNm','Dg9VBhm','CMvWBgfJzq','BgvHC2u','v09ss1nqqunfx0jjtKrjtKDFuKvrvuLsruq','q0fuquXpr19tq0HftufFq09orKXjq1q','BwvZC2fNzq','mJiYtxboywjc','v29YA3nWywnLr2f0zxDHEq','yxnZzxj0q3vYCMvUDa','DgfZAW','lI9YB3v0zxi','v09ss1nqqunfx0fnqKLhvu9vuW','Dg9VBhmVBgLZDa','C2vZC2LVBL9IB290C3rYyxa','ndvxDLvusfe','C3rYAw5NAwz5','r0furvDbwv9truXfq1rjt05FuKvrvuLsruq','mI4W','z2v0','DMfSDwu','y29UBMvJDgLVBKLK','yxb0lw1JCc1Hz2vUDa','C2vZC2LVBKLK','DMfSAwrHDgvjzgvUDgL0Eq','ChjVDMvUyw5Jzq','mtqWoeTTzu1tAq','DgvZDa','BwfW','yMfZzty0DxjS','CMvXDwLYzwq','zgvZy3jPChrPB24','Ag9ZDa','DMfSDwvZ','twv0Ag9Kig5VDcbMB3vUza','BMv4Da','Bwf4tgvUz3rO','CNvUDgLTzq','C3rYAw5N','jdfFjdi','lI9WDwjSAwmTy2f0ywXVzW','yxnZAwDU','BMfTzq','zMLUza','Aw5JBhvKzxm','mJi4ntCXog5NzKPqtq','ufjpsKvdvf9ut09mx0rju0fcteve','zgvSzxrL','r0furvDbwv9dte9truq','ywXSu2v0DgXLza','q2fSBcb3B3jRC3bHy2vFBgLZDcWGDgHLBIbZzxnZAw9Ux2jVB3rZDhjHCcb3AxrOihnLC3nPB25jzcbHBMqGD29YA3nWywnLswqU','lI4Vy29Yzs90B29SlwnVBNrYywn0CW','DMvYAwz5u2vSzwn0Aw9U','v09ss1nqqunfx0jjtKrjtKDFq09orKXjq1q','Dw5JB25MAxjTzwq','CMvZB2X2zq','CMvHC29U','CMfUzg9Tvvvjra','yMLUzgLUz1nLBgvJDgLVBNm','mJaYns0WmY0YnG','mte2nZrsqKTYvwS','mti0mdyWrvvLsKzM','mte0mdbbC3bkDw8','r0furvDbwv9srvfvrvnux0zbsuXfra','y2XLyxi','tuLtu0Lor18','CNvUswq','CMvXDwvZDa','Cgf0DgvYBG','C2vSzwn0Aw9U','u0vtu0LptL9jrf9srvfvsvjfra','Dg9VBa','BgLZDenOyw5Nzwq','zgvJB3jHDgvhyxrLD2f5vg9VBa','su5wquXjrf8','BgvUz3rO','mJaYns0WnI0Xoa','ve9ptf9ot1rFqvzbsuXbqKXf','mJqXmZv3vwjJwvi','z2f0zxDHEq','odC2vfzvwLzr','yMLUza','mJaYnc0Xms0Wnq','AxnfCNjVCG','nJy2mtC0CvntBgPv','CMvJB3zLCNK','lI4Vy29Yzs93B3jRC3bHy2uTCgf0Aa','Aw5WDxrty2HLBwe','CNvUDgLTzuzHy3rVCNK','yMfJA2vUza','ChjVzMLSzq','su5wquXjrf9buKDvtuvovfm','BM93','ChjVBwLZzq','ChjVzMLSzxm','Aw5PDgLHBgL6zq','y2fSBgvYlxnLBgvJDgvK','yxjNDw1LBNrZ','C2L6zq','D29YA3nWywnLx2XPC3q','ugfZCYbZzxnZAw9Uswq7ihrOAxmGy29UBMvJDgLVBIbZzxj2zxmGBxvSDgLWBguGChjVAMvJDcbZzxnZAw9UCY4','CMvNAxn0CNK','Bwv0Ag9K','Aw5PDgLHBgL6Aw5N','mMHgywL3qq'];_0x148b=function(){return _0x58f502;};return _0x148b();}const crypto=require('node:crypto'),{WorkspaceRegistry}=require('../installer/workspace-registry'),{gatewayCatalog}=require('./public-catalog'),{sameWorkspace}=require(_0x501782(0xee)),contracts=require(_0x501782(0x154)),fail=(_0x249275,_0x11eff4=_0x249275)=>{const _0x15e2fc=_0x501782,_0x2b1cd4={};_0x2b1cd4['code']=_0x249275;throw Object[_0x15e2fc(0x14a)](new Error(_0x11eff4),_0x2b1cd4);},content=_0x275a2d=>({'content':[{'type':_0x501782(0x115),'text':JSON[_0x501782(0x131)](_0x275a2d)}]});function validateIdentity(_0x4e6aac){const _0x150e92=_0x501782,_0xbb7dd3={};_0xbb7dd3[_0x150e92(0x138)]=contracts[_0x150e92(0x138)],_0xbb7dd3[_0x150e92(0x10e)]=contracts[_0x150e92(0x10e)],_0xbb7dd3[_0x150e92(0x12b)]=contracts['task'],_0xbb7dd3[_0x150e92(0x163)]=contracts[_0x150e92(0x163)];for(const [_0x424af2,_0xd32cc1]of Object['entries'](_0xbb7dd3)){if(_0x4e6aac[_0x424af2]===undefined)continue;const _0xbeb4eb=_0x4e6aac[_0x424af2];if(typeof _0xbeb4eb!==_0x150e92(0x147)||!_0xbeb4eb[_0x150e92(0x11a)]()||_0xbeb4eb[_0x150e92(0x16c)]>_0xd32cc1[_0x150e92(0x145)]||_0xd32cc1[_0x150e92(0x165)]&&!new RegExp(_0xd32cc1[_0x150e92(0x165)])[_0x150e92(0x13c)](_0xbeb4eb))fail(_0x150e92(0x16b)+_0x424af2[_0x150e92(0x123)](/([a-z])([A-Z])/g,_0x150e92(0x148))[_0x150e92(0x106)](),_0xd32cc1[_0x150e92(0x140)]);}}class WorkspaceGateway{constructor(_0x1f1d00={}){const _0x3b67b5=_0x501782;this[_0x3b67b5(0xfd)]=_0x1f1d00[_0x3b67b5(0xfd)]||new WorkspaceRegistry(),this['runtimeFactory']=_0x1f1d00['runtimeFactory'],this['host']=_0x1f1d00[_0x3b67b5(0x141)]||null,this[_0x3b67b5(0x136)]=_0x1f1d00['connectionId']||crypto[_0x3b67b5(0x15a)](),this[_0x3b67b5(0x121)]=new Map(),this[_0x3b67b5(0xff)]=new Map(),this[_0x3b67b5(0x15b)]=new Map(),this[_0x3b67b5(0x109)]=gatewayCatalog(),this['onCatalogChanged']=_0x1f1d00[_0x3b67b5(0x117)]||(()=>{}),this[_0x3b67b5(0xf7)]=null,this['stopped']=![];}async['bind'](_0x287002,_0x4bcb26={}){const _0x2fc2e1=_0x501782;_0x4bcb26[_0x2fc2e1(0x124)]?.[_0x2fc2e1(0x12a)]();if(!_0x287002[_0x2fc2e1(0x138)])fail(_0x2fc2e1(0x167),_0x2fc2e1(0x10b));const _0x1da84e=this['sessions'][_0x2fc2e1(0x134)](_0x287002[_0x2fc2e1(0x138)]);if(_0x1da84e&&!_0x287002[_0x2fc2e1(0x10f)]&&!_0x287002[_0x2fc2e1(0x112)])return _0x1da84e;const _0x343f29=this[_0x2fc2e1(0xff)][_0x2fc2e1(0x134)](_0x287002['sessionId']);if(_0x343f29&&!_0x287002['workspaceId']&&!_0x287002[_0x2fc2e1(0x112)])return _0x343f29[_0x2fc2e1(0xf5)];const _0x4279a4=this['registry'][_0x2fc2e1(0x158)](_0x287002,{'host':this['host']});if(_0x287002[_0x2fc2e1(0x11b)])this[_0x2fc2e1(0x155)](_0x287002[_0x2fc2e1(0x11b)],_0x4279a4['workspaceId']);if(_0x1da84e){if(!sameWorkspace(_0x4279a4[_0x2fc2e1(0x110)],_0x1da84e[_0x2fc2e1(0x110)]))fail('WORKSPACE_BINDING_CONFLICT');return _0x1da84e;}if(this[_0x2fc2e1(0xff)]['has'](_0x287002[_0x2fc2e1(0x138)])){const _0x3e51f8=this['initializing'][_0x2fc2e1(0x134)](_0x287002['sessionId']);if(!sameWorkspace(_0x3e51f8[_0x2fc2e1(0x110)],_0x4279a4['workspace']))fail('WORKSPACE_BINDING_CONFLICT');return _0x3e51f8[_0x2fc2e1(0xf5)];}const _0x3bdb5d={};_0x3bdb5d['connectionId']=this['connectionId'],_0x3bdb5d[_0x2fc2e1(0x138)]=_0x287002['sessionId'],_0x3bdb5d[_0x2fc2e1(0x110)]=_0x4279a4[_0x2fc2e1(0x110)],_0x3bdb5d[_0x2fc2e1(0x10f)]=_0x4279a4['workspaceId'],_0x3bdb5d['registration']=_0x2fc2e1(0x137),_0x3bdb5d[_0x2fc2e1(0x13a)]=_0x2fc2e1(0xf8),_0x3bdb5d[_0x2fc2e1(0x120)]=_0x2fc2e1(0x157);const _0x34576d=_0x3bdb5d,_0x5a8e0a=((async()=>{const _0x3bbce1=_0x2fc2e1;if(typeof this['runtimeFactory']!=='function')fail('GATEWAY_RUNTIME_UNAVAILABLE');const _0x52a2db=_0x4279a4[_0x3bbce1(0xf6)]?.[this['host']]||{},_0x2b5e8c=await this[_0x3bbce1(0xf0)](_0x34576d,this[_0x3bbce1(0xf7)]||{},_0x52a2db);try{if(_0x4bcb26[_0x3bbce1(0x124)])await require('../core/hook-lease')['observeHookCancellation'](_0x4bcb26[_0x3bbce1(0x124)]);}catch(_0x45f3e5){await _0x2b5e8c['close']();throw _0x45f3e5;}this['stopped']&&(await _0x2b5e8c[_0x3bbce1(0x10c)](),fail(_0x3bbce1(0x151)));const _0x5d5821={..._0x34576d};_0x5d5821['runtime']=_0x2b5e8c,_0x5d5821[_0x3bbce1(0xf2)]=_0x52a2db;const _0x266edf=_0x5d5821;return _0x4bcb26['lease']?.['assertCurrent'](),this[_0x3bbce1(0x121)][_0x3bbce1(0x103)](_0x287002[_0x3bbce1(0x138)],_0x266edf),_0x266edf;})()),_0x1c4fbe={};_0x1c4fbe[_0x2fc2e1(0x110)]=_0x4279a4[_0x2fc2e1(0x110)],_0x1c4fbe[_0x2fc2e1(0xf5)]=_0x5a8e0a,this[_0x2fc2e1(0xff)][_0x2fc2e1(0x103)](_0x287002[_0x2fc2e1(0x138)],_0x1c4fbe);try{return await _0x5a8e0a;}finally{this[_0x2fc2e1(0xff)][_0x2fc2e1(0x150)](_0x287002['sessionId']);}}[_0x501782(0x166)](_0x3f1bdc){const _0x3bdd6e=_0x501782;for(const [_0x218c81,_0x3982bf]of this[_0x3bdd6e(0x15b)])if(_0x3982bf[_0x3bdd6e(0x101)]<Date[_0x3bdd6e(0xf4)]())this[_0x3bdd6e(0x15b)][_0x3bdd6e(0x150)](_0x218c81);if(this[_0x3bdd6e(0x15b)][_0x3bdd6e(0xfa)]>=0x1000)fail('GATEWAY_SELECTION_LIMIT');const _0xc86d2f=this['connectionId']+'.'+crypto['randomBytes'](0x20)['toString'](_0x3bdd6e(0x13e));this[_0x3bdd6e(0x15b)][_0x3bdd6e(0x103)](_0xc86d2f,{'workspaceId':_0x3f1bdc[_0x3bdd6e(0x10f)],'expiresAt':Date[_0x3bdd6e(0xf4)]()+0xdbba0});const _0x5decf9={};return _0x5decf9[_0x3bdd6e(0x10f)]=_0x3f1bdc[_0x3bdd6e(0x10f)],_0x5decf9['workspace']=_0x3f1bdc[_0x3bdd6e(0x110)],_0x5decf9[_0x3bdd6e(0x11b)]=_0xc86d2f,_0x5decf9;}['verifySelection'](_0xd30db0,_0x2bcbe1){const _0x1a5f54=_0x501782,_0x3f6074=this['bindingSelections'][_0x1a5f54(0x134)](_0xd30db0);if(!_0x3f6074||_0x3f6074[_0x1a5f54(0x101)]<Date[_0x1a5f54(0xf4)]()||_0x3f6074[_0x1a5f54(0x10f)]!==_0x2bcbe1)fail(_0x1a5f54(0x132),_0x1a5f54(0x10a));return _0x3f6074;}[_0x501782(0x114)](_0x2acb22){const _0x38ad3f=_0x501782;let _0x242819;if(_0x2acb22[_0x38ad3f(0x138)])_0x242819=this[_0x38ad3f(0x121)]['get'](_0x2acb22[_0x38ad3f(0x138)]);else{if(this[_0x38ad3f(0x121)][_0x38ad3f(0xfa)]===0x1)_0x242819=this[_0x38ad3f(0x121)][_0x38ad3f(0x142)]()[_0x38ad3f(0x144)]()[_0x38ad3f(0x135)];else{if(this[_0x38ad3f(0x121)][_0x38ad3f(0xfa)]>0x1)fail(_0x38ad3f(0x12d),_0x38ad3f(0xfc));}}if(!_0x242819)fail(_0x38ad3f(0x125),_0x38ad3f(0x153));if(_0x2acb22[_0x38ad3f(0x10f)]||_0x2acb22['workspacePath']){const _0x5722a4=this[_0x38ad3f(0xfd)][_0x38ad3f(0x158)](_0x2acb22,{'host':this[_0x38ad3f(0x141)]});if(!sameWorkspace(_0x5722a4[_0x38ad3f(0x110)],_0x242819[_0x38ad3f(0x110)]))fail(_0x38ad3f(0x156));}if(_0x2acb22[_0x38ad3f(0x104)]&&!sameWorkspace(_0x2acb22['projectPath'],_0x242819[_0x38ad3f(0x110)]))fail(_0x38ad3f(0x156));return _0x242819;}async[_0x501782(0x108)](_0x27598c){const _0x573cbd=_0x501782;if(this['stopped'])fail('GATEWAY_CLOSED');const {id:_0x25b1aa,method:_0x49f1ad,params:params={}}=_0x27598c,_0x31f85d=_0x3a02eb=>({'jsonrpc':'2.0','id':_0x25b1aa,'result':_0x3a02eb});if(_0x49f1ad===_0x573cbd(0xf7)||_0x49f1ad==='server/discover'){const _0x4ba207=[_0x573cbd(0xea),_0x573cbd(0x15c),_0x573cbd(0x16d),'2025-11-25'],_0x1a9d2b=_0x4ba207[_0x573cbd(0x14d)](params['protocolVersion'])?params[_0x573cbd(0x11f)]:_0x4ba207['at'](-0x1),_0x2fc2ee={...params};_0x2fc2ee[_0x573cbd(0x11f)]=_0x1a9d2b,this[_0x573cbd(0xf7)]=_0x2fc2ee;const _0xf6013f={};_0xf6013f[_0x573cbd(0x169)]=!![];const _0x55e2ac={};return _0x55e2ac[_0x573cbd(0x122)]=_0xf6013f,_0x31f85d({'protocolVersion':_0x1a9d2b,'capabilities':_0x55e2ac,'serverInfo':{'name':_0x573cbd(0x137),'version':require('../../package.json')['version']},'instructions':'One\x20APT\x20gateway\x20serves\x20installed\x20projects.\x20Call\x20workspace_list,\x20then\x20session_bootstrap\x20with\x20your\x20sessionId\x20and\x20the\x20project\x20workspaceId.\x20Always\x20pass\x20that\x20sessionId\x20on\x20subsequent\x20calls.\x20Never\x20bind\x20home\x20or\x20select\x20a\x20project\x20from\x20recency.'});}if(_0x49f1ad===_0x573cbd(0x12e))return _0x31f85d({'tools':structuredClone(this['catalog'])});if(_0x49f1ad==='ping')return _0x31f85d({});if(_0x49f1ad==='notifications/initialized')return null;const _0x18b67a={};_0x18b67a[_0x573cbd(0x11c)]=-0x7f59,_0x18b67a[_0x573cbd(0x127)]=_0x573cbd(0x143);if(_0x49f1ad!==_0x573cbd(0x111))return _0x25b1aa===undefined?null:{'jsonrpc':_0x573cbd(0x133),'id':_0x25b1aa,'error':_0x18b67a};try{const _0x3103b7=params['arguments']||{};if(Array['isArray'](_0x3103b7)||typeof _0x3103b7!=='object')fail(_0x573cbd(0xf3));validateIdentity(_0x3103b7);if(params[_0x573cbd(0x14b)]!==_0x573cbd(0xfb)&¶ms['name']!==_0x573cbd(0x116)&&require('../core/caller-context')['sensitiveTool'](params[_0x573cbd(0x14b)])&&!_0x3103b7['sessionId'])fail(_0x573cbd(0x167),'Mutations\x20require\x20the\x20explicitly\x20bound\x20sessionId.');const _0x308e4a=this[_0x573cbd(0x109)]['find'](_0x149487=>_0x149487[_0x573cbd(0x14b)]===params['name']);if(!_0x308e4a){const _0x1d9fd3=require(_0x573cbd(0x12c))[_0x573cbd(0x11e)](params[_0x573cbd(0x14b)]);if(_0x1d9fd3&&_0x1d9fd3[_0x573cbd(0xf1)]!=='_builtin'){const _0x8f2ae7={};_0x8f2ae7[_0x573cbd(0xf1)]=_0x1d9fd3[_0x573cbd(0xf1)],_0x8f2ae7[_0x573cbd(0x138)]=_0x3103b7[_0x573cbd(0x138)];const _0xc987c2={};_0xc987c2[_0x573cbd(0x168)]='mcp_agent_health',_0xc987c2['arguments']=_0x8f2ae7;const _0x105ec7={};_0x105ec7[_0x573cbd(0x11c)]='BACKEND_CATALOG_DISCOVERY_REQUIRED',_0x105ec7[_0x573cbd(0xed)]=_0xc987c2;const _0x4b04de=Object[_0x573cbd(0x14a)](new Error('This\x20addon\x20needs\x20intentional\x20catalog\x20discovery;\x20call\x20mcp_agent_health\x20with\x20its\x20backend\x20and\x20sessionId.'),_0x105ec7);throw _0x4b04de;}fail(_0x573cbd(0x16e),'This\x20gateway\x20has\x20no\x20verified\x20catalog\x20for\x20that\x20tool.');}if(params[_0x573cbd(0x14b)]===_0x573cbd(0xfb))return _0x31f85d(content({'workspaces':this[_0x573cbd(0xfd)]['list']()['filter'](_0x139acd=>!this['host']||_0x139acd['hosts'][_0x573cbd(0x14d)](this[_0x573cbd(0x141)]))[_0x573cbd(0x13d)](_0x1d5a20=>this['selection'](_0x1d5a20)),'connectionId':this['connectionId']}));if(params['name']===_0x573cbd(0x116)&&!_0x3103b7[_0x573cbd(0x138)]&&!_0x3103b7[_0x573cbd(0xf1)])return _0x31f85d(content({'registration':'apt-mcp-agent','connectionId':this[_0x573cbd(0x136)],'boundSessions':this[_0x573cbd(0x121)][_0x573cbd(0xfa)],'backendsStartedByDiscovery':0x0,'serving':_0x573cbd(0x170),'version':require('../../package.json')[_0x573cbd(0x118)]}));for(const _0x3985c6 of _0x308e4a['inputSchema'][_0x573cbd(0x13f)]||[])if(_0x3103b7[_0x3985c6]===undefined&&_0x3985c6!=='sessionId')fail(_0x573cbd(0x162)+_0x3985c6[_0x573cbd(0x123)](/([a-z])([A-Z])/g,'$1_$2')[_0x573cbd(0x106)](),_0x573cbd(0x102)+_0x3985c6+'.');const _0x4f7df2=params[_0x573cbd(0x14b)]===_0x573cbd(0x12f)?await this[_0x573cbd(0xe9)](_0x3103b7):this[_0x573cbd(0x114)](_0x3103b7);if(_0x4f7df2['profile']?.[_0x573cbd(0x122)]?.[params[_0x573cbd(0x14b)]]?.[_0x573cbd(0x10d)]===![])fail(_0x573cbd(0x14f));const _0x129afb={..._0x3103b7};_0x129afb[_0x573cbd(0x138)]=_0x4f7df2[_0x573cbd(0x138)];const _0x1ccaca=_0x129afb,_0x4e256f={...params};_0x4e256f[_0x573cbd(0xf9)]=_0x1ccaca;const _0x2ad32a={..._0x27598c};_0x2ad32a[_0x573cbd(0x11d)]=_0x4e256f;const _0x1f5d08=await _0x4f7df2['runtime']['request'](_0x2ad32a);if(params[_0x573cbd(0x14b)]===_0x573cbd(0x116)&&_0x3103b7[_0x573cbd(0xf1)]&&!_0x1f5d08[_0x573cbd(0xeb)]){const _0x56a094={};_0x56a094[_0x573cbd(0xfe)]='tools/list',_0x56a094[_0x573cbd(0x11d)]={};const _0x25e629=await _0x4f7df2[_0x573cbd(0x146)][_0x573cbd(0x164)](_0x56a094);let _0x51493a=![];for(const _0x3038d6 of _0x25e629[_0x573cbd(0x122)]||[]){if(require(_0x573cbd(0x12c))[_0x573cbd(0x11e)](_0x3038d6[_0x573cbd(0x14b)])?.[_0x573cbd(0xf1)]!==_0x3103b7['backend'])continue;const _0x7fb5c3=require(_0x573cbd(0x149))[_0x573cbd(0x16a)](structuredClone(_0x3038d6)),_0x4ed93f=this['catalog'][_0x573cbd(0x14c)](_0x37a7fc=>_0x37a7fc[_0x573cbd(0x14b)]===_0x7fb5c3['name']);if(_0x4ed93f&&JSON[_0x573cbd(0x131)](_0x4ed93f[_0x573cbd(0xef)])!==JSON['stringify'](_0x7fb5c3['inputSchema']))fail(_0x573cbd(0x126));!_0x4ed93f&&(this['catalog'][_0x573cbd(0x107)](_0x7fb5c3),_0x51493a=!![]);}if(_0x51493a)this[_0x573cbd(0x117)]();}return _0x31f85d(_0x1f5d08);}catch(_0x1f2601){const _0xd5cc7b={};return _0xd5cc7b[_0x573cbd(0x168)]=_0x573cbd(0xfb),_0xd5cc7b['then']=_0x573cbd(0x12f),_0xd5cc7b['required']=[_0x573cbd(0x138),_0x573cbd(0x10f)],_0x31f85d({...content({'success':![],'code':_0x1f2601[_0x573cbd(0x11c)]||_0x573cbd(0x160),'error':_0x1f2601[_0x573cbd(0x127)],'recovery':_0x1f2601[_0x573cbd(0xed)]||([_0x573cbd(0x125),'WORKSPACE_AMBIGUOUS','WORKSPACE_NOT_REGISTERED'][_0x573cbd(0x14d)](_0x1f2601['code'])?_0xd5cc7b:undefined)}),'isError':!![]});}}async[_0x501782(0x10c)](){const _0x2f41b6=_0x501782;this['stopped']=!![],await Promise[_0x2f41b6(0x152)]([...this[_0x2f41b6(0xff)][_0x2f41b6(0x142)]()][_0x2f41b6(0x13d)](_0x24be6a=>_0x24be6a[_0x2f41b6(0xf5)]));const _0x345814=await Promise[_0x2f41b6(0x152)]([...this['sessions'][_0x2f41b6(0x142)]()]['map'](_0x4dbc16=>_0x4dbc16[_0x2f41b6(0x146)][_0x2f41b6(0x10c)]())),_0x49cad0=_0x345814[_0x2f41b6(0x14c)](_0x2ce02a=>_0x2ce02a['status']===_0x2f41b6(0x105));if(_0x49cad0)throw _0x49cad0[_0x2f41b6(0x159)];this[_0x2f41b6(0x121)][_0x2f41b6(0x161)]();}}const _0x1ffc25={};_0x1ffc25[_0x501782(0x129)]=WorkspaceGateway,_0x1ffc25[_0x501782(0x139)]=validateIdentity,module['exports']=_0x1ffc25;
|
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
|
|