@lovrabet/lovrabet-cli 2.3.3-beta.1 → 2.3.4-beta.1
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 +11 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +4 -2
- package/skills/lovrabet/references/lovrabet-config-commands.md +1 -1
- package/skills/lovrabet/references/lovrabet-config.md +2 -2
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +16 -6
- package/skills/lovrabet/references/lovrabet-service-tree.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a136_0x4721(){const _0x319fcf=['flatMap','startsWith','20826GwNacV','path','1460352QbLyMg','digest','4293070EgLTnQ','message','current','VERIFY_FAILED','present','utf8','length','every','version','includes','skills@latest\x20exited\x20','skillVersion','version_mismatch','skills','unknown','installedPath','packageVersion','SKILL.md','match','state','content_mismatch','14483iGhhsP','root',':\x5cs*(.+)$','isSymbolicLink','INSTALL_FAILED','reason','lovrabet','Installed\x20Skill\x20state\x20is\x20','Unsupported\x20Skill\x20entry:\x20','absent','468181cgGjwu','sha256','parse','unverifiable','missing','Symbolic\x20link\x20is\x20not\x20allowed:\x20','hex','join','files','error','packageRoot','update','9dKIcPn','status','home','schemaVersion','name','136CxFKIv','manifest','pipe','16qFvUAV','split','85200QzRyVX','package.json','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','15860OiBPIE'];a136_0x4721=function(){return _0x319fcf;};return a136_0x4721();}const a136_0x46a372=a136_0x5e52;(function(_0x6dfcc8,_0x836ce5){const _0x15cbbc=a136_0x5e52,_0x10710e=_0x6dfcc8();while(!![]){try{const _0x478703=parseInt(_0x15cbbc(0x122))/0x1+-parseInt(_0x15cbbc(0x13b))/0x2+parseInt(_0x15cbbc(0x13e))/0x3*(-parseInt(_0x15cbbc(0x136))/0x4)+-parseInt(_0x15cbbc(0x138))/0x5+parseInt(_0x15cbbc(0x140))/0x6+-parseInt(_0x15cbbc(0x118))/0x7*(-parseInt(_0x15cbbc(0x133))/0x8)+parseInt(_0x15cbbc(0x12e))/0x9*(-parseInt(_0x15cbbc(0x142))/0xa);if(_0x478703===_0x836ce5)break;else _0x10710e['push'](_0x10710e['shift']());}catch(_0xe812c0){_0x10710e['push'](_0x10710e['shift']());}}}(a136_0x4721,0x409fd));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND='lovrabet\x20cli-skill\x20install',SKILL_NAME=a136_0x46a372(0x11e);function frontmatterValue(_0x2c53cc,_0x3a7ee4){const _0x3094db=a136_0x46a372;return _0x2c53cc[_0x3094db(0x115)](new RegExp('^'+_0x3a7ee4+_0x3094db(0x11a),'m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x5606ff,_0xa11f09=_0x5606ff){const _0x4d38a3=a136_0x46a372;return readdirSync(_0xa11f09,{'withFileTypes':!![]})[_0x4d38a3(0x13c)](_0x1e11fd=>{const _0x8385a0=_0x4d38a3,_0x3828a8=join(_0xa11f09,_0x1e11fd['name']),_0x13d924=lstatSync(_0x3828a8);if(_0x13d924[_0x8385a0(0x11b)]())throw new Error(_0x8385a0(0x127)+_0x3828a8);if(_0x13d924['isDirectory']())return listFiles(_0x5606ff,_0x3828a8);if(!_0x13d924['isFile']())throw new Error(_0x8385a0(0x120)+_0x3828a8);return[relative(_0x5606ff,_0x3828a8)[_0x8385a0(0x137)](sep)[_0x8385a0(0x129)]('/')];})['sort']((_0x14fd6a,_0x2b9f39)=>_0x14fd6a<_0x2b9f39?-0x1:_0x14fd6a>_0x2b9f39?0x1:0x0);}function digestFiles(_0x4266c1,_0x1da61b){const _0x182a6f=a136_0x46a372,_0x2264b6=createHash(_0x182a6f(0x123));for(const _0x435cef of _0x1da61b){if(_0x435cef[_0x182a6f(0x13d)]('/')||_0x435cef['split']('/')[_0x182a6f(0x14b)]('..')||_0x435cef[_0x182a6f(0x14b)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x435cef);_0x2264b6['update'](_0x435cef),_0x2264b6[_0x182a6f(0x12d)]('\x00'),_0x2264b6['update'](readFileSync(join(_0x4266c1,..._0x435cef['split']('/')))),_0x2264b6[_0x182a6f(0x12d)]('\x00');}return _0x2264b6[_0x182a6f(0x141)](_0x182a6f(0x128));}function sameFiles(_0x2fcf37,_0x45e641){const _0x38b577=a136_0x46a372;return _0x2fcf37['length']===_0x45e641[_0x38b577(0x148)]&&_0x2fcf37[_0x38b577(0x149)]((_0x146858,_0x1d35d1)=>_0x146858===_0x45e641[_0x1d35d1]);}function readSource(_0x26ce66){const _0x3ed253=a136_0x46a372,_0x546ba9=JSON['parse'](readFileSync(join(_0x26ce66,_0x3ed253(0x139)),_0x3ed253(0x147))),_0xab99fe=JSON[_0x3ed253(0x124)](readFileSync(join(_0x26ce66,_0x3ed253(0x14f),'lovrabet.manifest.json'),_0x3ed253(0x147))),_0x4ebcf2=join(_0x26ce66,_0x3ed253(0x14f),SKILL_NAME),_0x5f4be8=frontmatterValue(readFileSync(join(_0x4ebcf2,_0x3ed253(0x114)),_0x3ed253(0x147)),_0x3ed253(0x14a)),_0x46411f=listFiles(_0x4ebcf2);if(_0xab99fe[_0x3ed253(0x131)]!==0x1||_0xab99fe[_0x3ed253(0x132)]!==SKILL_NAME||!_0x546ba9['version']||_0xab99fe[_0x3ed253(0x113)]!==_0x546ba9[_0x3ed253(0x14a)]||_0xab99fe[_0x3ed253(0x14d)]!==_0x546ba9[_0x3ed253(0x14a)]||_0x5f4be8!==_0x546ba9['version']||!sameFiles(_0x46411f,_0xab99fe[_0x3ed253(0x12a)])||digestFiles(_0x4ebcf2,_0x46411f)!==_0xab99fe[_0x3ed253(0x141)])throw new Error(_0x3ed253(0x13a));return{'packageVersion':_0x546ba9['version'],'skillVersion':_0x5f4be8,'root':_0x4ebcf2,'manifest':_0xab99fe};}function installedSkillPath(_0x2936d4){const _0x1adea9=a136_0x46a372,_0x45fff3=resolveInstalledSkill(SKILL_NAME,{'home':_0x2936d4});if(_0x45fff3['state']===_0x1adea9(0x146))return{'state':_0x1adea9(0x146),'path':dirname(_0x45fff3['path'])};if(_0x45fff3[_0x1adea9(0x116)]===_0x1adea9(0x121))return{'state':_0x1adea9(0x126)};return{'state':_0x1adea9(0x125),'reason':_0x45fff3[_0x1adea9(0x11d)]};}function a136_0x5e52(_0xe56e30,_0x7fc7d){_0xe56e30=_0xe56e30-0x111;const _0x4721aa=a136_0x4721();let _0x5e52bf=_0x4721aa[_0xe56e30];return _0x5e52bf;}export function inspectInstalledBuiltinSkillVersion(_0x1ef990,_0x1b0008={}){const _0x42a7ac=a136_0x46a372,_0x34b630=installedSkillPath(_0x1b0008['home']??homedir());if(_0x34b630['state']===_0x42a7ac(0x126))return{'state':_0x42a7ac(0x126),'expectedVersion':_0x1ef990,'repairCommand':REPAIR_COMMAND};if(_0x34b630['state']===_0x42a7ac(0x125))return{'state':'unverifiable','expectedVersion':_0x1ef990,'reason':_0x34b630[_0x42a7ac(0x11d)],'repairCommand':REPAIR_COMMAND};try{const _0x3abd4a=frontmatterValue(readFileSync(join(_0x34b630[_0x42a7ac(0x13f)],_0x42a7ac(0x114)),_0x42a7ac(0x147)),_0x42a7ac(0x14a));return{'state':_0x3abd4a===_0x1ef990?'current':_0x42a7ac(0x14e),'expectedVersion':_0x1ef990,'skillVersion':_0x3abd4a,'installedPath':_0x34b630[_0x42a7ac(0x13f)],'repairCommand':REPAIR_COMMAND};}catch(_0x1bbfe6){return{'state':_0x42a7ac(0x125),'expectedVersion':_0x1ef990,'installedPath':_0x34b630[_0x42a7ac(0x13f)],'reason':_0x1bbfe6 instanceof Error?_0x1bbfe6[_0x42a7ac(0x143)]:String(_0x1bbfe6),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x3bebc1={}){const _0x41c217=a136_0x46a372,_0x33ef43=_0x3bebc1['packageRoot']??DEFAULT_PACKAGE_ROOT;let _0x4c833d;try{_0x4c833d=readSource(_0x33ef43);}catch(_0x4d33e0){return{'state':_0x41c217(0x125),'packageVersion':_0x41c217(0x111),'reason':_0x4d33e0 instanceof Error?_0x4d33e0[_0x41c217(0x143)]:String(_0x4d33e0),'repairCommand':REPAIR_COMMAND};}const _0x1f2a7e=installedSkillPath(_0x3bebc1['home']??homedir());if(_0x1f2a7e['state']===_0x41c217(0x126))return{'state':_0x41c217(0x126),'packageVersion':_0x4c833d[_0x41c217(0x113)],'repairCommand':REPAIR_COMMAND};if(_0x1f2a7e[_0x41c217(0x116)]==='unverifiable')return{'state':_0x41c217(0x125),'packageVersion':_0x4c833d[_0x41c217(0x113)],'reason':_0x1f2a7e['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x17833b=frontmatterValue(readFileSync(join(_0x1f2a7e[_0x41c217(0x13f)],_0x41c217(0x114)),_0x41c217(0x147)),_0x41c217(0x14a));if(_0x17833b!==_0x4c833d[_0x41c217(0x14d)])return{'state':_0x41c217(0x14e),'packageVersion':_0x4c833d['packageVersion'],'skillVersion':_0x17833b,'installedPath':_0x1f2a7e[_0x41c217(0x13f)],'repairCommand':REPAIR_COMMAND};const _0x48b704=listFiles(_0x1f2a7e[_0x41c217(0x13f)]),_0x34855f=digestFiles(_0x1f2a7e[_0x41c217(0x13f)],_0x48b704);return{'state':sameFiles(_0x48b704,_0x4c833d['manifest'][_0x41c217(0x12a)])&&_0x34855f===_0x4c833d[_0x41c217(0x134)][_0x41c217(0x141)]?_0x41c217(0x144):_0x41c217(0x117),'packageVersion':_0x4c833d[_0x41c217(0x113)],'skillVersion':_0x17833b,'installedPath':_0x1f2a7e[_0x41c217(0x13f)],'digest':_0x34855f,'repairCommand':REPAIR_COMMAND};}catch(_0x220cc5){return{'state':_0x41c217(0x125),'packageVersion':_0x4c833d[_0x41c217(0x113)],'installedPath':_0x1f2a7e[_0x41c217(0x13f)],'reason':_0x220cc5 instanceof Error?_0x220cc5[_0x41c217(0x143)]:String(_0x220cc5),'repairCommand':REPAIR_COMMAND};}}function failure(_0x264c12,_0x3dd2a9,_0x44eafd,_0x503444){const _0xb79be=a136_0x46a372;return{'ok':![],'code':_0x264c12,'packageVersion':_0x3dd2a9[_0xb79be(0x113)],'skillVersion':_0x3dd2a9['skillVersion'],'installedPath':_0x503444,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x44eafd instanceof Error?_0x44eafd['message']:String(_0x44eafd)};}export function installBuiltinSkill(_0x20a79c={}){const _0xa1fd94=a136_0x46a372,_0x32c07c=_0x20a79c[_0xa1fd94(0x12c)]??DEFAULT_PACKAGE_ROOT,_0x2d4e25=_0x20a79c[_0xa1fd94(0x130)]??homedir();let _0x5bbb8a;try{_0x5bbb8a=readSource(_0x32c07c);}catch(_0x196343){return failure('SOURCE_INVALID',{'packageVersion':_0xa1fd94(0x111),'skillVersion':_0xa1fd94(0x111)},_0x196343);}const _0x1cf0ba=inspectBuiltinSkill({'packageRoot':_0x32c07c,'home':_0x2d4e25}),_0xf9b5a3=runNpxSkillsAddGlobal(_0x32c07c,_0x5bbb8a[_0xa1fd94(0x119)],{'stdio':_0x20a79c['stdio']??_0xa1fd94(0x135),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x2d4e25}});if(_0xf9b5a3['skipped'])return{'ok':!![],'packageVersion':_0x5bbb8a['packageVersion'],'skillVersion':_0x5bbb8a[_0xa1fd94(0x14d)],'installedPath':_0x1cf0ba['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0xf9b5a3['ok'])return failure(_0xa1fd94(0x11c),_0x5bbb8a,_0xf9b5a3[_0xa1fd94(0x12b)]??_0xa1fd94(0x14c)+_0xf9b5a3[_0xa1fd94(0x12f)]);const _0x273931=inspectBuiltinSkill({'packageRoot':_0x32c07c,'home':_0x2d4e25});if(_0x273931[_0xa1fd94(0x116)]!==_0xa1fd94(0x144))return failure(_0xa1fd94(0x145),_0x5bbb8a,_0x273931['reason']??_0xa1fd94(0x11f)+_0x273931[_0xa1fd94(0x116)],_0x273931[_0xa1fd94(0x112)]);return{'ok':!![],'packageVersion':_0x5bbb8a[_0xa1fd94(0x113)],'skillVersion':_0x5bbb8a['skillVersion'],'installedPath':_0x273931['installedPath'],'changed':_0x1cf0ba[_0xa1fd94(0x116)]!==_0xa1fd94(0x144),'repairCommand':REPAIR_COMMAND};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a137_0x94ac(){const _0x33c117=['message','CHILD_EXIT_NONZERO','shortMessage','stdout','SPAWN_FAILED','336750ViJFjX','SKILL_NOT_INSTALLED','54666TxvfgY','stdio','INSTALL_PARTIAL','Skill\x20\x22','246yVsjJT','failed','warn','pipe','npx','absent','state','949616xvntJl','add','skipNpxSkillsEnvSuffix','PERMISSION_DENIED','158747qHigQA','npx\x20terminated\x20by\x20signal\x20','code','\x22\x20install\x20state:\x20','ENOENT','stderr','Installer\x20reported\x20','EPERM','exitCode','filter','signal','25735bDTZPp','1060NqsKhy','8UHAvnD','join','174600MbeCdx','checked','!\x20Could\x20not\x20verify\x20\x22','260302OqzEUv','match','reason','unknown','NPX_NOT_FOUND','log','presence','trim','npx\x20failed\x20to\x20start','globalSkillName','NPM_CONFIG_GLOBAL','internalSkillSource'];a137_0x94ac=function(){return _0x33c117;};return a137_0x94ac();}const a137_0x54e360=a137_0xd9b7;(function(_0x16aa8d,_0x40bc3e){const _0x2ec239=a137_0xd9b7,_0x58345e=_0x16aa8d();while(!![]){try{const _0x3d7245=parseInt(_0x2ec239(0x17c))/0x1+-parseInt(_0x2ec239(0x16b))/0x2+parseInt(_0x2ec239(0x18b))/0x3*(-parseInt(_0x2ec239(0x189))/0x4)+parseInt(_0x2ec239(0x187))/0x5*(-parseInt(_0x2ec239(0x171))/0x6)+-parseInt(_0x2ec239(0x18e))/0x7+-parseInt(_0x2ec239(0x178))/0x8+-parseInt(_0x2ec239(0x16d))/0x9*(-parseInt(_0x2ec239(0x188))/0xa);if(_0x3d7245===_0x40bc3e)break;else _0x58345e['push'](_0x58345e['shift']());}catch(_0x8a300b){_0x58345e['push'](_0x58345e['shift']());}}}(a137_0x94ac,0x24d75));import{execaSync}from'execa';import{LOVRABET_SKILL_SOURCE as a137_0x35977b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a137_0x35977b;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a137_0x54e360(0x199)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a137_0x54e360(0x197)];function a137_0xd9b7(_0x2df32d,_0x3c37ad){_0x2df32d=_0x2df32d-0x16a;const _0x94aca9=a137_0x94ac();let _0xd9b76c=_0x94aca9[_0x2df32d];return _0xd9b76c;}export function resolveGlobalSkillName(_0x3933a0){const _0x3ecd7e=a137_0x54e360;switch(_0x3933a0[_0x3ecd7e(0x195)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a137_0x54e360(0x17a)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x26200d,_0xfa70d2,_0x403761){return{'ok':![],'status':_0xfa70d2,'code':_0x26200d,'error':'['+_0x26200d+']\x20'+_0x403761};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x57cbd3,_0x2894da=LOVRABET_SKILL_SOURCE,_0x2178e2){const _0x246bbf=a137_0x54e360;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5d6f60=['-y','skills@latest',_0x246bbf(0x179),_0x2894da,'-g','-y'],_0x2cc200=[_0x246bbf(0x175),..._0x5d6f60][_0x246bbf(0x18a)]('\x20');console[_0x246bbf(0x193)]('*\x20'+_0x2cc200);const _0xcdf548={...process.env};delete _0xcdf548['npm_config_global'],delete _0xcdf548[_0x246bbf(0x198)];const _0x477a43=execaSync(_0x246bbf(0x175),_0x5d6f60,{'cwd':_0x57cbd3,'stdio':'pipe','env':_0xcdf548,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x5123ac=[_0x477a43['stdout']?String(_0x477a43[_0x246bbf(0x19d)]):'',_0x477a43['stderr']?String(_0x477a43[_0x246bbf(0x181)]):''][_0x246bbf(0x185)](Boolean)['join']('\x0a')[_0x246bbf(0x195)](),_0x37c363=_0x477a43[_0x246bbf(0x184)]??null;_0x2178e2?.[_0x246bbf(0x16e)]!==_0x246bbf(0x174)&&_0x5123ac&&console[_0x246bbf(0x193)](_0x5123ac);if(_0x477a43[_0x246bbf(0x17e)]){const _0x1fb433=_0x477a43['code']===_0x246bbf(0x180)?_0x246bbf(0x192):_0x477a43[_0x246bbf(0x17e)]===_0x246bbf(0x183)||_0x477a43['code']==='EACCES'?_0x246bbf(0x17b):_0x246bbf(0x16a);return failure(_0x1fb433,_0x37c363,_0x477a43[_0x246bbf(0x19c)]??_0x477a43[_0x246bbf(0x19a)]??_0x477a43[_0x246bbf(0x17e)]);}if(_0x477a43[_0x246bbf(0x186)])return failure('CHILD_TERMINATED',_0x37c363,_0x246bbf(0x17d)+_0x477a43[_0x246bbf(0x186)]);if(_0x477a43[_0x246bbf(0x172)]&&_0x37c363===null)return failure(_0x246bbf(0x16a),_0x37c363,_0x477a43['shortMessage']??_0x477a43[_0x246bbf(0x19a)]??_0x246bbf(0x196));if(_0x37c363!==0x0)return failure(_0x246bbf(0x19b),_0x37c363,_0x5123ac||_0x477a43['shortMessage']||'exit\x20'+(_0x37c363??_0x246bbf(0x191)));const _0x5859f1=_0x2178e2?.['expectedSkillName']??resolveGlobalSkillName(_0x2894da),_0x450b40=_0x5859f1?resolveInstalledSkill(_0x5859f1,_0x2178e2?.[_0x246bbf(0x194)]):undefined,_0x15a063=_0x5123ac[_0x246bbf(0x18f)](/Failed to install\s+(\d+)/i);if(_0x15a063&&Number(_0x15a063[0x1])>0x0){const _0xc34dee=_0x246bbf(0x182)+_0x15a063[0x1]+'\x20failed\x20target(s)'+(_0x5123ac?':\x0a'+_0x5123ac:'');if(_0x450b40?.[_0x246bbf(0x177)]==='present')return console[_0x246bbf(0x173)]('!\x20'+_0xc34dee),{'ok':!![],'status':0x0};return failure(_0x246bbf(0x16f),0x0,_0xc34dee);}if(_0x5859f1&&_0x450b40){if(_0x450b40[_0x246bbf(0x177)]===_0x246bbf(0x176))return failure(_0x246bbf(0x16c),0x0,_0x246bbf(0x170)+_0x5859f1+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x450b40[_0x246bbf(0x18c)][_0x246bbf(0x18a)](',\x20')+')');_0x450b40[_0x246bbf(0x177)]==='unverifiable'&&console[_0x246bbf(0x173)](_0x246bbf(0x18d)+_0x5859f1+_0x246bbf(0x17f)+_0x450b40[_0x246bbf(0x190)]);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a138_0x2c3d8c=a138_0x5720;(function(_0x2e7a82,_0x50f3bb){const _0x3cafe7=a138_0x5720,_0x2730f6=_0x2e7a82();while(!![]){try{const _0x38e8c4=-parseInt(_0x3cafe7(0xf3))/0x1*(parseInt(_0x3cafe7(0xf6))/0x2)+parseInt(_0x3cafe7(0xed))/0x3+parseInt(_0x3cafe7(0xf7))/0x4+-parseInt(_0x3cafe7(0xfa))/0x5+-parseInt(_0x3cafe7(0xf9))/0x6+parseInt(_0x3cafe7(0xf4))/0x7+-parseInt(_0x3cafe7(0xec))/0x8*(-parseInt(_0x3cafe7(0xeb))/0x9);if(_0x38e8c4===_0x50f3bb)break;else _0x2730f6['push'](_0x2730f6['shift']());}catch(_0x2a2f00){_0x2730f6['push'](_0x2730f6['shift']());}}}(a138_0x16ba,0xcfb57));function a138_0x16ba(){const _0xe27681=['node_modules','.svn','.DS_Store','.hg','.git','16429lbzboR','9119215PQIPfr','build','162AqAbCd','6394248Cndnbh','.cache','3551064ESbovX','7286365jJUmFk','SKILL.md','594tiLaLh','36488ZiRknj','3084924eusqTq'];a138_0x16ba=function(){return _0xe27681;};return a138_0x16ba();}export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a138_0x2c3d8c(0xfb);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a138_0x2c3d8c(0xf0)]);function a138_0x5720(_0xb03182,_0x5db023){_0xb03182=_0xb03182-0xeb;const _0x16ba13=a138_0x16ba();let _0x5720bf=_0x16ba13[_0xb03182];return _0x5720bf;}export const IGNORED_DIR_NAMES=new Set([a138_0x2c3d8c(0xf2),a138_0x2c3d8c(0xf1),a138_0x2c3d8c(0xef),a138_0x2c3d8c(0xee),'.next','dist',a138_0x2c3d8c(0xf5),'coverage','.turbo',a138_0x2c3d8c(0xf8)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25c221,_0x5b5fd6){const _0x5d4852=a139_0x77ee,_0x238a57=_0x25c221();while(!![]){try{const _0x39b539=-parseInt(_0x5d4852(0x13c))/0x1*(-parseInt(_0x5d4852(0x146))/0x2)+parseInt(_0x5d4852(0x144))/0x3+-parseInt(_0x5d4852(0x140))/0x4+parseInt(_0x5d4852(0x14a))/0x5+-parseInt(_0x5d4852(0x143))/0x6*(-parseInt(_0x5d4852(0x13f))/0x7)+parseInt(_0x5d4852(0x149))/0x8+-parseInt(_0x5d4852(0x145))/0x9;if(_0x39b539===_0x5b5fd6)break;else _0x238a57['push'](_0x238a57['shift']());}catch(_0xefe3ed){_0x238a57['push'](_0x238a57['shift']());}}}(a139_0x3193,0x1a873));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';function a139_0x77ee(_0x6af751,_0x58608e){_0x6af751=_0x6af751-0x13a;const _0x3193a6=a139_0x3193();let _0x77ee94=_0x3193a6[_0x6af751];return _0x77ee94;}import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';function a139_0x3193(){const _0x421367=['142816TqvgMs','305880ybbyns','validation','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','Unsafe\x20Skill\x20file\x20path:\x20','3oyUTGn','endsWith','from','28GXICmr','286656ngUqcK','startsWith','split','117408ZiKpZf','176739zpFDEP','2074365OSyQCu','129730kTwMyy','.tmp','isSymbolicLink'];a139_0x3193=function(){return _0x421367;};return a139_0x3193();}export function resolveManagedFilePath(_0x22edf5,_0x3984a3){const _0x33bec3=a139_0x77ee,_0x219487=normalizeSkillRelativePath(_0x3984a3),_0x3d2224=realOrResolved(_0x22edf5),_0x2716e1=resolve(_0x3d2224,..._0x219487[_0x33bec3(0x142)]('/'));if(!isPathInside(_0x2716e1,_0x3d2224))throw CliErrors[_0x33bec3(0x14b)](_0x33bec3(0x13b)+_0x3984a3);return ensureNoSymlinkInManagedPath(_0x3d2224,_0x219487),_0x2716e1;}export function ensureNoSymlinkInManagedPath(_0x571812,_0x54a55b){const _0x56d79c=a139_0x77ee;let _0x2eb6a6=_0x571812;for(const _0x30cbea of _0x54a55b[_0x56d79c(0x142)]('/')){_0x2eb6a6=resolve(_0x2eb6a6,_0x30cbea);const _0x40fdda=lstatIfPresent(_0x2eb6a6);if(_0x40fdda?.[_0x56d79c(0x148)]())throw CliErrors[_0x56d79c(0x14b)](_0x56d79c(0x13a)+_0x54a55b);}}export function isDanglingSymlink(_0x306977){const _0x119656=a139_0x77ee;try{return lstatSync(_0x306977)[_0x119656(0x148)]();}catch{return![];}}export function resolveSymlinkTarget(_0x489c74){const _0x25c332=readlinkSync(_0x489c74);return isAbsolute(_0x25c332)?_0x25c332:resolve(dirname(_0x489c74),_0x25c332);}export function isPathInside(_0x4d8a0c,_0x2456d5){const _0x491e80=a139_0x77ee,_0x428275=_0x4d8a0c[_0x491e80(0x13d)](sep)?_0x4d8a0c:''+_0x4d8a0c+sep,_0x42f617=_0x2456d5[_0x491e80(0x13d)](sep)?_0x2456d5:''+_0x2456d5+sep;return _0x4d8a0c===_0x2456d5||_0x428275[_0x491e80(0x141)](_0x42f617);}export function realOrResolved(_0x50355f){try{return realpathSync(_0x50355f);}catch{return resolve(_0x50355f);}}export function lstatIfPresent(_0x3809d5){try{return lstatSync(_0x3809d5);}catch{return undefined;}}export function writeTextAtomic(_0x5e0b50,_0x5bbe98,_0x176477){const _0x2ad33e=a139_0x77ee;writeBytesAtomic(_0x5e0b50,Buffer[_0x2ad33e(0x13e)](_0x5bbe98,'utf8'),_0x176477);}export function writeBytesAtomic(_0x300374,_0x4d8b3d,_0x23002f){const _0x3bf53b=a139_0x77ee,_0x1e9435=_0x300374+_0x3bf53b(0x147);try{writeFileSync(_0x1e9435,_0x4d8b3d,{'mode':_0x23002f}),renameSync(_0x1e9435,_0x300374);}catch(_0x1e771e){try{rmSync(_0x1e9435,{'force':!![]});}catch{}throw _0x1e771e;}}export function writeJsonAtomic(_0xc6fa51,_0x495b6c){writeTextAtomic(_0xc6fa51,JSON['stringify'](_0x495b6c,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a140_0x58fd(_0x48a158,_0x1848cb){_0x48a158=_0x48a158-0x1e1;const _0x2f8587=a140_0x2f85();let _0x58fd1e=_0x2f8587[_0x48a158];return _0x58fd1e;}(function(_0x208f5b,_0x1ff84c){const _0x595ec4=a140_0x58fd,_0xb94f02=_0x208f5b();while(!![]){try{const _0xbf45da=-parseInt(_0x595ec4(0x1e5))/0x1+-parseInt(_0x595ec4(0x1ec))/0x2*(parseInt(_0x595ec4(0x1e9))/0x3)+-parseInt(_0x595ec4(0x1e7))/0x4*(parseInt(_0x595ec4(0x1f0))/0x5)+-parseInt(_0x595ec4(0x1e8))/0x6*(parseInt(_0x595ec4(0x1ea))/0x7)+-parseInt(_0x595ec4(0x1ed))/0x8+parseInt(_0x595ec4(0x1ef))/0x9+parseInt(_0x595ec4(0x1e2))/0xa;if(_0xbf45da===_0x1ff84c)break;else _0xb94f02['push'](_0xb94f02['shift']());}catch(_0x17a42e){_0xb94f02['push'](_0xb94f02['shift']());}}}(a140_0x2f85,0x87442));import{createHash}from'node:crypto';function a140_0x2f85(){const _0x44ae11=['update','60QwFlnj','12jMXErU','1374VRSTbb','332633JrAQsm','path','116LPEnjC','3440056WdSJjs','hex','5877441OfwQXP','72895lcFMOy','size','17041410FQIoxv','digest','sha256','1032846zmDVvP'];a140_0x2f85=function(){return _0x44ae11;};return a140_0x2f85();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x510db3){const _0x439abf=a140_0x58fd;return createHash(_0x439abf(0x1e4))[_0x439abf(0x1e6)](_0x510db3)[_0x439abf(0x1e3)]('hex');}export function fileHash(_0x2703e9){return bufferSha256(fileContent(_0x2703e9));}export function bufferSha256(_0x1a087c){const _0x285717=a140_0x58fd;return createHash(_0x285717(0x1e4))[_0x285717(0x1e6)](_0x1a087c)[_0x285717(0x1e3)](_0x285717(0x1ee));}export function fileTreeHash(_0x518e99){const _0x5d3640=a140_0x58fd,_0x4a209c=createHash(_0x5d3640(0x1e4));for(const _0x36f95d of normalizeManifestFiles(_0x518e99)){_0x4a209c[_0x5d3640(0x1e6)](_0x36f95d[_0x5d3640(0x1eb)]),_0x4a209c[_0x5d3640(0x1e6)]('\x00'),_0x4a209c[_0x5d3640(0x1e6)](_0x36f95d['sha256']),_0x4a209c['update']('\x00'),_0x4a209c[_0x5d3640(0x1e6)](String(_0x36f95d[_0x5d3640(0x1e1)])),_0x4a209c[_0x5d3640(0x1e6)]('\x00');}return _0x4a209c['digest'](_0x5d3640(0x1ee));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a141_0x2aba(_0x1d5459,_0x20d8a0){_0x1d5459=_0x1d5459-0x93;const _0x40ce5b=a141_0x40ce();let _0x2abac0=_0x40ce5b[_0x1d5459];return _0x2abac0;}const a141_0x5b2882=a141_0x2aba;(function(_0x14d88f,_0x2fcd79){const _0x3364a4=a141_0x2aba,_0x53571e=_0x14d88f();while(!![]){try{const _0x3d52ef=-parseInt(_0x3364a4(0x99))/0x1*(parseInt(_0x3364a4(0x9f))/0x2)+parseInt(_0x3364a4(0x9d))/0x3+parseInt(_0x3364a4(0x95))/0x4*(parseInt(_0x3364a4(0x9b))/0x5)+parseInt(_0x3364a4(0xa2))/0x6*(-parseInt(_0x3364a4(0x96))/0x7)+parseInt(_0x3364a4(0x94))/0x8+parseInt(_0x3364a4(0xa4))/0x9+-parseInt(_0x3364a4(0x98))/0xa*(-parseInt(_0x3364a4(0x97))/0xb);if(_0x3d52ef===_0x2fcd79)break;else _0x53571e['push'](_0x53571e['shift']());}catch(_0x289f12){_0x53571e['push'](_0x53571e['shift']());}}}(a141_0x40ce,0xc0e57));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x3e5729,_0x1a65fd=a141_0x5b2882(0x9a),_0x319213={}){const _0x2c6523=a141_0x5b2882,_0x10565d=resolveSkillSyncPaths(_0x319213),_0x1eacf1=safePathSegment(_0x3e5729,_0x2c6523(0xa1)),_0x398a22=_0x1a65fd===_0x2c6523(0xa0)?[resolve(_0x319213[_0x2c6523(0x93)]??process[_0x2c6523(0x93)](),_0x2c6523(0x9c),'skills')]:runtimeAgentSkillRoots(_0x10565d);return Object[_0x2c6523(0xa3)]({'scope':_0x1a65fd,'appCode':_0x1eacf1,'skillRoots':Object[_0x2c6523(0xa3)](_0x398a22),'managedRoot':_0x10565d[_0x2c6523(0x9e)]});}function a141_0x40ce(){const _0x3c9f7b=['948970yotoHC','project','appCode','4880994owewIi','freeze','6118488IfaJQl','cwd','2669896ePTVoh','8DTaMwL','7WBrhkf','11IBBMom','2859820VYISAC','2XeyIlZ','global','2352770laLhHU','.agents','935739BPVsvj','managedRoot'];a141_0x40ce=function(){return _0x3c9f7b;};return a141_0x40ce();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a142_0x706cd3=a142_0x3a61;(function(_0x18b933,_0xcf2d0e){const _0x1527b7=a142_0x3a61,_0x173529=_0x18b933();while(!![]){try{const _0xf041b=-parseInt(_0x1527b7(0x1de))/0x1*(parseInt(_0x1527b7(0x1da))/0x2)+parseInt(_0x1527b7(0x1ed))/0x3*(-parseInt(_0x1527b7(0x1ba))/0x4)+parseInt(_0x1527b7(0x1c5))/0x5*(-parseInt(_0x1527b7(0x1d0))/0x6)+-parseInt(_0x1527b7(0x1b3))/0x7*(-parseInt(_0x1527b7(0x1eb))/0x8)+-parseInt(_0x1527b7(0x1b2))/0x9+parseInt(_0x1527b7(0x1db))/0xa*(-parseInt(_0x1527b7(0x1dd))/0xb)+parseInt(_0x1527b7(0x1cc))/0xc*(parseInt(_0x1527b7(0x1df))/0xd);if(_0xf041b===_0xcf2d0e)break;else _0x173529['push'](_0x173529['shift']());}catch(_0x18edc4){_0x173529['push'](_0x173529['shift']());}}}(a142_0xfb12,0xa9478));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a142_0x3797da from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a142_0x3a61(_0x1abe55,_0x4149b8){_0x1abe55=_0x1abe55-0x1af;const _0xfb12e=a142_0xfb12();let _0x3a615b=_0xfb12e[_0x1abe55];return _0x3a615b;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a142_0x3797da,RESERVED_PROJECT_SKILL_CODES=new Set([a142_0x706cd3(0x1be),a142_0x706cd3(0x1e1),a142_0x706cd3(0x1e5)]);export function linkEffectiveRuntimeSkills(_0x4267a7,_0x357078){const _0x7ee390=a142_0x706cd3,_0x19a8b7=new Map();for(const _0x55f9f4 of _0x4267a7){const _0x1ca302=_0x55f9f4['skill'][_0x7ee390(0x1ef)];if(!_0x1ca302)continue;const _0x12c602=_0x19a8b7['get'](_0x1ca302);(!_0x12c602||_0x55f9f4[_0x7ee390(0x1ca)]===_0x7ee390(0x1d3))&&_0x19a8b7[_0x7ee390(0x1c9)](_0x1ca302,_0x55f9f4);}const _0x1657a1=[];for(const _0x54644f of _0x19a8b7[_0x7ee390(0x1d5)]()){const _0x568854=requireSkillCode(_0x54644f[_0x7ee390(0x1b4)]),_0xcad3a4=readMetadataIfPresent(_0x54644f['metadataPath']);if(_0xcad3a4?.[_0x7ee390(0x1b7)]!==_0x357078[_0x7ee390(0x1b7)]||_0xcad3a4[_0x7ee390(0x1ef)]!==_0x568854)throw CliErrors['validation'](_0x7ee390(0x1c7)+_0x357078[_0x7ee390(0x1b7)]+':\x20'+_0x54644f[_0x7ee390(0x1d7)]);const _0x3e8557=runtimeSkillLinkName(_0x357078,_0x568854);for(const _0x4212a1 of _0x357078[_0x7ee390(0x1b6)]){_0x1657a1['push'](ensureManagedSymlink(resolve(_0x4212a1,_0x3e8557),_0x54644f[_0x7ee390(0x1c3)],_0x357078,_0x568854));}}return _0x1657a1;}export function pruneStaleRuntimeSkillLinks(_0x2565c1,_0x35b00e,_0x2a6a41){const _0x30d6bf=a142_0x706cd3,_0x4c86af=new Set([..._0x35b00e][_0x30d6bf(0x1c8)](_0xff60e7=>_0xff60e7[_0x30d6bf(0x1cb)]())[_0x30d6bf(0x1e9)](Boolean)),_0x9f66=_0x2a6a41?new Set([..._0x2a6a41][_0x30d6bf(0x1c8)](_0x2ac16f=>_0x2ac16f[_0x30d6bf(0x1cb)]())['filter'](Boolean)):undefined,_0xed203d=[];for(const _0x417627 of _0x2565c1[_0x30d6bf(0x1b6)]){for(const _0x57e312 of managedTargetSkillLinkPaths(_0x417627,_0x2565c1)){const _0x4e33c6=runtimeSkillCodeFromLink(_0x2565c1,_0x57e312);if(_0x9f66&&!_0x9f66['has'](_0x4e33c6))continue;if(_0x4c86af[_0x30d6bf(0x1bb)](_0x4e33c6))continue;_0xed203d[_0x30d6bf(0x1c0)](removeManagedSkillLink(_0x57e312,_0x2565c1,_0x4e33c6));}}return _0xed203d;}export function pruneStaleRuntimeSkillCache(_0x145774,_0x1b0d7e={}){const _0x266a81=a142_0x706cd3,_0x2471b8=new Set([..._0x145774[_0x266a81(0x1d6)]][_0x266a81(0x1c8)](_0x576c00=>_0x576c00['trim']())['filter'](Boolean)),_0x5a9328=_0x145774[_0x266a81(0x1bc)]?new Set([..._0x145774[_0x266a81(0x1bc)]][_0x266a81(0x1c8)](_0x3c40b4=>_0x3c40b4[_0x266a81(0x1cb)]())[_0x266a81(0x1e9)](Boolean)):undefined,_0x40d6e7=_0x145774[_0x266a81(0x1d4)]??[_0x266a81(0x1d3),'company'],_0x1d9f76=resolve(getRuntimeSkillCacheRoot(_0x145774[_0x266a81(0x1b8)],_0x145774[_0x266a81(0x1e7)],_0x1b0d7e),safePathSegment(_0x145774[_0x266a81(0x1b7)],'appCode')),_0x2cdb71=[];for(const _0x5ba93f of _0x40d6e7){const _0xd643ce=resolve(_0x1d9f76,_0x5ba93f);if(!existsSync(_0xd643ce))continue;for(const _0x3bc09b of readdirSync(_0xd643ce,{'withFileTypes':!![]})){if(!_0x3bc09b['isDirectory']())continue;const _0x28e3aa=_0x3bc09b['name'];if(_0x5a9328&&!_0x5a9328[_0x266a81(0x1bb)](_0x28e3aa))continue;if(_0x2471b8[_0x266a81(0x1bb)](_0x28e3aa))continue;const _0x939447=resolve(_0xd643ce,_0x28e3aa),_0x53b74d=readMetadataIfPresent(resolve(_0x939447,METADATA_FILE));if(_0x53b74d?.['appCode']!==_0x145774[_0x266a81(0x1b7)]||_0x53b74d[_0x266a81(0x1ca)]!==_0x5ba93f||_0x53b74d[_0x266a81(0x1ef)]!==_0x28e3aa){_0x2cdb71[_0x266a81(0x1c0)]({'path':_0x939447,'action':_0x266a81(0x1ec),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x939447,_0x145774[_0x266a81(0x1c6)]??[])){_0x2cdb71['push']({'path':_0x939447,'action':_0x266a81(0x1ec),'reason':_0x266a81(0x1d1)});continue;}removeSync(_0x939447),_0x2cdb71['push']({'path':_0x939447,'action':_0x266a81(0x1c1)});}}return _0x2cdb71;}function a142_0xfb12(){const _0x391b50=['Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','lovrabet','project','push','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','1390SxDsau','protectedLinkRoots','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','map','set','scope','trim','12MGLhbw','agentsSkillsDir','managedRoot','slice','11292brXCsH','linked-from-protected-root','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','personal','scopes','values','activeSkillCodes','metadataPath','not-managed-symlink','isDirectory','4764EWleMQ','40RHKwsn','startsWith','2459820mgklyD','120PjbYHb','33683299qLWNQS','builtin','runtime-observe','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','created','contentHash','secret-retriever','isSymbolicLink','accessKey','external-symlink','filter','name','9986216UdNbvU','skipped','21378aimmZJ','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','skillCode','length','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','validation','12083868mjFGBv','7HtWgla','skill','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skillRoots','appCode','env','unchanged','56TMAtvI','has','pruneSkillCodes'];a142_0xfb12=function(){return _0x391b50;};return a142_0xfb12();}export function linkGlobalRuntimeSkills(_0x1ff66f,_0x22bec2={}){const _0x228a08=a142_0x706cd3,_0x533fa4=resolveSkillSyncPaths(_0x22bec2),_0x5c773f=[];for(const _0x3bcdbb of _0x1ff66f){if(_0x3bcdbb[_0x228a08(0x1ca)]!==_0x228a08(0x1e0))throw CliErrors[_0x228a08(0x1b1)](_0x228a08(0x1e2)+_0x3bcdbb[_0x228a08(0x1ca)]);const _0x24d44c=requireSkillCode(_0x3bcdbb[_0x228a08(0x1b4)]),_0x1628a0=copyManagedSkillDirectory(_0x3bcdbb[_0x228a08(0x1c3)],resolve(_0x533fa4[_0x228a08(0x1cd)],_0x24d44c));_0x5c773f[_0x228a08(0x1c0)]({..._0x1628a0,'contentHash':_0x3bcdbb[_0x228a08(0x1e4)]});}return _0x5c773f;}function ensureManagedSymlink(_0x417d43,_0x23f025,_0x2ef464,_0x49fdb1){const _0xe3889e=a142_0x706cd3;mkdirSync(dirname(_0x417d43),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x417d43)||isDanglingSymlink(_0x417d43)){const _0x4bebc5=lstatSync(_0x417d43);if(!_0x4bebc5[_0xe3889e(0x1e6)]())throw CliErrors[_0xe3889e(0x1b1)](_0xe3889e(0x1bd)+_0x417d43);const _0xc55d06=resolveSymlinkTarget(_0x417d43);if(!isPathInside(realOrResolved(_0xc55d06),realOrResolved(_0x2ef464[_0xe3889e(0x1ce)])))throw CliErrors[_0xe3889e(0x1b1)](_0xe3889e(0x1c4)+_0x417d43);if(realOrResolved(_0xc55d06)===realOrResolved(_0x23f025))return{'path':_0x417d43,'target':_0x23f025,'action':_0xe3889e(0x1b9)};const _0x553925=readMetadataIfPresent(resolve(_0xc55d06,METADATA_FILE));if(_0x2ef464[_0xe3889e(0x1ca)]===_0xe3889e(0x1bf)&&(_0x553925?.[_0xe3889e(0x1b7)]!==_0x2ef464[_0xe3889e(0x1b7)]||_0x553925['skillCode']!==_0x49fdb1))throw CliErrors[_0xe3889e(0x1b1)](_0xe3889e(0x1af)+_0x417d43);return unlinkSync(_0x417d43),symlinkSync(_0x23f025,_0x417d43,_0xe3889e(0x1c3)),{'path':_0x417d43,'target':_0x23f025,'action':'updated'};}return symlinkSync(_0x23f025,_0x417d43,_0xe3889e(0x1c3)),{'path':_0x417d43,'target':_0x23f025,'action':_0xe3889e(0x1e3)};}function managedTargetSkillLinkPaths(_0xa448e3,_0x5e2d2a){const _0x316dc6=a142_0x706cd3;if(!existsSync(_0xa448e3))return[];const _0x571e81=_0x5e2d2a[_0x316dc6(0x1b7)]+'--';return readdirSync(_0xa448e3,{'withFileTypes':!![]})['filter'](_0x2869c6=>_0x5e2d2a[_0x316dc6(0x1ca)]===_0x316dc6(0x1bf)||_0x2869c6['name'][_0x316dc6(0x1dc)](_0x571e81))[_0x316dc6(0x1c8)](_0x55d242=>resolve(_0xa448e3,_0x55d242[_0x316dc6(0x1ea)]));}function removeManagedSkillLink(_0x5e26b3,_0x561b10,_0x52a578){const _0x4676b8=a142_0x706cd3,_0x34842e=lstatIfPresent(_0x5e26b3);if(!_0x34842e?.[_0x4676b8(0x1e6)]())return{'path':_0x5e26b3,'action':'skipped','reason':_0x4676b8(0x1d8)};const _0x2fb399=resolveSymlinkTarget(_0x5e26b3);if(!isPathInside(realOrResolved(_0x2fb399),realOrResolved(_0x561b10['managedRoot'])))return{'path':_0x5e26b3,'action':_0x4676b8(0x1ec),'reason':_0x4676b8(0x1e8)};const _0x2726eb=readMetadataIfPresent(resolve(_0x2fb399,METADATA_FILE));if(_0x561b10[_0x4676b8(0x1ca)]===_0x4676b8(0x1bf)&&(_0x2726eb?.[_0x4676b8(0x1b7)]!==_0x561b10[_0x4676b8(0x1b7)]||_0x2726eb[_0x4676b8(0x1ef)]!==_0x52a578))return{'path':_0x5e26b3,'action':_0x4676b8(0x1ec),'reason':'metadata-mismatch'};return unlinkSync(_0x5e26b3),{'path':_0x5e26b3,'action':_0x4676b8(0x1c1)};}function isLinkedFromAnyRoot(_0x4f3de4,_0x542f8b){const _0x1dfea2=a142_0x706cd3,_0x268615=realOrResolved(_0x4f3de4);for(const _0x50259c of _0x542f8b){if(!existsSync(_0x50259c))continue;for(const _0x5b72b7 of readdirSync(_0x50259c,{'withFileTypes':!![]})){if(!_0x5b72b7[_0x1dfea2(0x1e6)]())continue;const _0xfc4f5a=resolve(_0x50259c,_0x5b72b7[_0x1dfea2(0x1ea)]);if(realOrResolved(resolveSymlinkTarget(_0xfc4f5a))===_0x268615)return!![];}}return![];}function runtimeSkillLinkName(_0x2f777a,_0x2f7172){const _0x26bcc8=a142_0x706cd3,_0x24b0fc=safePathSegment(_0x2f7172,_0x26bcc8(0x1ef));if(_0x2f777a[_0x26bcc8(0x1ca)]==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x26bcc8(0x1bb)](_0x24b0fc))throw CliErrors[_0x26bcc8(0x1b1)](_0x26bcc8(0x1d2)+_0x24b0fc);return _0x2f777a[_0x26bcc8(0x1ca)]===_0x26bcc8(0x1bf)?_0x24b0fc:_0x2f777a[_0x26bcc8(0x1b7)]+'--'+_0x24b0fc;}function runtimeSkillCodeFromLink(_0x1a7235,_0x474082){const _0x5d4299=a142_0x706cd3,_0x26e283=basename(_0x474082);return _0x1a7235['scope']===_0x5d4299(0x1bf)?_0x26e283:_0x26e283[_0x5d4299(0x1cf)]((_0x1a7235['appCode']+'--')[_0x5d4299(0x1f0)]);}export function copyManagedSkillDirectory(_0xfdd47,_0x8fe6d){const _0x42941b=a142_0x706cd3,_0x3fcc32=resolve(_0x8fe6d,METADATA_FILE),_0x38e5a8=existsSync(_0x8fe6d);if(_0x38e5a8){const _0x12a897=lstatSync(_0x8fe6d);if(_0x12a897['isSymbolicLink']())throw CliErrors[_0x42941b(0x1b1)](_0x42941b(0x1c2)+_0x8fe6d);if(!_0x12a897[_0x42941b(0x1d9)]())throw CliErrors['validation'](_0x42941b(0x1b5)+_0x8fe6d);const _0x1c8ac7=readMetadataIfPresent(_0x3fcc32);if(_0x1c8ac7?.[_0x42941b(0x1ca)]!=='builtin')throw CliErrors['validation'](_0x42941b(0x1b0)+_0x8fe6d);}ensureDirSync(dirname(_0x8fe6d));const _0x2676d9=_0x38e5a8?readMetadataIfPresent(_0x3fcc32)?.['contentHash']:undefined,_0x2665c1=readMetadataIfPresent(resolve(_0xfdd47,METADATA_FILE))?.[_0x42941b(0x1e4)];return _0x38e5a8&&removeSync(_0x8fe6d),copySkillDirectory(_0xfdd47,_0x8fe6d),{'path':_0x8fe6d,'target':_0xfdd47,'action':!_0x38e5a8?_0x42941b(0x1e3):_0x2676d9===_0x2665c1?_0x42941b(0x1b9):'updated'};}function copySkillDirectory(_0x5f59ae,_0x1ac000){copySync(_0x5f59ae,_0x1ac000,{'dereference':![],'overwrite':!![],'filter'(_0x202ac0){const _0x1bd405=a142_0x3a61;if(lstatSync(_0x202ac0)[_0x1bd405(0x1e6)]())throw CliErrors[_0x1bd405(0x1b1)](_0x1bd405(0x1ee)+_0x202ac0);return!![];}});}
|
|
1
|
+
const a142_0x581b36=a142_0x3852;(function(_0x959768,_0x317602){const _0x53e541=a142_0x3852,_0x4b7fa1=_0x959768();while(!![]){try{const _0x155d27=parseInt(_0x53e541(0x16f))/0x1*(-parseInt(_0x53e541(0x169))/0x2)+parseInt(_0x53e541(0x16a))/0x3+-parseInt(_0x53e541(0x17a))/0x4+parseInt(_0x53e541(0x18f))/0x5+-parseInt(_0x53e541(0x18e))/0x6+-parseInt(_0x53e541(0x18a))/0x7*(parseInt(_0x53e541(0x18b))/0x8)+-parseInt(_0x53e541(0x171))/0x9*(-parseInt(_0x53e541(0x16c))/0xa);if(_0x155d27===_0x317602)break;else _0x4b7fa1['push'](_0x4b7fa1['shift']());}catch(_0x6cab92){_0x4b7fa1['push'](_0x4b7fa1['shift']());}}}(a142_0x229f,0x2ee9c));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a142_0xf9ae13 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a142_0xf9ae13,RESERVED_PROJECT_SKILL_CODES=new Set([a142_0x581b36(0x199),a142_0x581b36(0x19d),a142_0x581b36(0x187)]);export function linkEffectiveRuntimeSkills(_0x19b406,_0x1ece1d){const _0x85844f=a142_0x581b36,_0x57b057=new Map();for(const _0x54b441 of _0x19b406){const _0xbe8768=_0x54b441[_0x85844f(0x177)][_0x85844f(0x190)];if(!_0xbe8768)continue;const _0x279125=_0x57b057[_0x85844f(0x19a)](_0xbe8768);(!_0x279125||_0x54b441[_0x85844f(0x195)]===_0x85844f(0x180))&&_0x57b057[_0x85844f(0x162)](_0xbe8768,_0x54b441);}const _0x850747=[];for(const _0x2df78a of _0x57b057['values']()){const _0x2a4c37=requireSkillCode(_0x2df78a[_0x85844f(0x177)]),_0x32ef80=readMetadataIfPresent(_0x2df78a[_0x85844f(0x186)]);if(_0x32ef80?.['appCode']!==_0x1ece1d['appCode']||_0x32ef80['skillCode']!==_0x2a4c37)throw CliErrors['validation'](_0x85844f(0x194)+_0x1ece1d[_0x85844f(0x18c)]+':\x20'+_0x2df78a['metadataPath']);const _0x197b44=runtimeSkillLinkName(_0x1ece1d,_0x2a4c37);for(const _0x49cb9e of _0x1ece1d[_0x85844f(0x175)]){_0x850747[_0x85844f(0x182)](ensureManagedSymlink(resolve(_0x49cb9e,_0x197b44),_0x2df78a['dir'],_0x1ece1d,_0x2a4c37));}}return _0x850747;}export function pruneStaleRuntimeSkillLinks(_0x49a8c2,_0x299c78,_0x43d8e0){const _0x41d90a=a142_0x581b36,_0x614281=new Set([..._0x299c78]['map'](_0x461418=>_0x461418[_0x41d90a(0x166)]())[_0x41d90a(0x188)](Boolean)),_0xf8721=_0x43d8e0?new Set([..._0x43d8e0]['map'](_0x435930=>_0x435930[_0x41d90a(0x166)]())[_0x41d90a(0x188)](Boolean)):undefined,_0xd331d2=[];for(const _0x4e8c9a of _0x49a8c2['skillRoots']){for(const _0x4523a0 of managedTargetSkillLinkPaths(_0x4e8c9a,_0x49a8c2)){const _0x12b2d6=runtimeSkillCodeFromLink(_0x49a8c2,_0x4523a0);if(_0xf8721&&!_0xf8721[_0x41d90a(0x168)](_0x12b2d6))continue;if(_0x614281[_0x41d90a(0x168)](_0x12b2d6))continue;_0xd331d2['push'](removeManagedSkillLink(_0x4523a0,_0x49a8c2,_0x12b2d6));}}return _0xd331d2;}export function pruneStaleRuntimeSkillCache(_0xc415d,_0x3cc3b1={}){const _0x463975=a142_0x581b36,_0x507480=new Set([..._0xc415d[_0x463975(0x173)]][_0x463975(0x165)](_0x4dc5e9=>_0x4dc5e9[_0x463975(0x166)]())['filter'](Boolean)),_0x3b08e4=_0xc415d['pruneSkillCodes']?new Set([..._0xc415d[_0x463975(0x196)]][_0x463975(0x165)](_0x511bfe=>_0x511bfe[_0x463975(0x166)]())['filter'](Boolean)):undefined,_0x563427=_0xc415d[_0x463975(0x197)]??[_0x463975(0x180),_0x463975(0x172)],_0x17d4b1=resolve(getRuntimeSkillCacheRoot(_0xc415d[_0x463975(0x17d)],_0xc415d[_0x463975(0x19b)],_0x3cc3b1),safePathSegment(_0xc415d['appCode'],'appCode')),_0x31a818=[];for(const _0x45e668 of _0x563427){const _0x137f0e=resolve(_0x17d4b1,_0x45e668);if(!existsSync(_0x137f0e))continue;for(const _0x52b7bb of readdirSync(_0x137f0e,{'withFileTypes':!![]})){if(!_0x52b7bb[_0x463975(0x179)]())continue;const _0x18c050=_0x52b7bb['name'];if(_0x3b08e4&&!_0x3b08e4[_0x463975(0x168)](_0x18c050))continue;if(_0x507480[_0x463975(0x168)](_0x18c050))continue;const _0x277668=resolve(_0x137f0e,_0x18c050),_0x1e0f2c=readMetadataIfPresent(resolve(_0x277668,METADATA_FILE));if(_0x1e0f2c?.[_0x463975(0x18c)]!==_0xc415d['appCode']||_0x1e0f2c[_0x463975(0x195)]!==_0x45e668||_0x1e0f2c[_0x463975(0x190)]!==_0x18c050){_0x31a818[_0x463975(0x182)]({'path':_0x277668,'action':_0x463975(0x191),'reason':_0x463975(0x181)});continue;}if(isLinkedFromAnyRoot(_0x277668,_0xc415d['protectedLinkRoots']??[])){_0x31a818[_0x463975(0x182)]({'path':_0x277668,'action':_0x463975(0x191),'reason':_0x463975(0x16d)});continue;}removeSync(_0x277668),_0x31a818['push']({'path':_0x277668,'action':'removed'});}}return _0x31a818;}export function linkGlobalRuntimeSkills(_0xde5f0f,_0x1b4ba3={}){const _0x52d86b=a142_0x581b36,_0x3f9b84=resolveSkillSyncPaths(_0x1b4ba3),_0x1568a3=[];for(const _0x1aa955 of _0xde5f0f){if(_0x1aa955[_0x52d86b(0x195)]!==_0x52d86b(0x164))throw CliErrors[_0x52d86b(0x163)](_0x52d86b(0x185)+_0x1aa955[_0x52d86b(0x195)]);const _0x2154d2=requireSkillCode(_0x1aa955[_0x52d86b(0x177)]),_0x162030=copyManagedSkillDirectory(_0x1aa955[_0x52d86b(0x18d)],resolve(_0x3f9b84[_0x52d86b(0x184)],_0x2154d2));_0x1568a3['push']({..._0x162030,'contentHash':_0x1aa955[_0x52d86b(0x16b)]});}return _0x1568a3;}function ensureManagedSymlink(_0x3bc33b,_0x5af908,_0x12e2fc,_0x4472dc){const _0x54b026=a142_0x581b36;mkdirSync(dirname(_0x3bc33b),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3bc33b)||isDanglingSymlink(_0x3bc33b)){const _0x581719=lstatSync(_0x3bc33b);if(!_0x581719[_0x54b026(0x167)]())throw CliErrors[_0x54b026(0x163)](_0x54b026(0x174)+_0x3bc33b);const _0x3136b9=resolveSymlinkTarget(_0x3bc33b);if(!isPathInside(realOrResolved(_0x3136b9),realOrResolved(_0x12e2fc[_0x54b026(0x178)])))throw CliErrors[_0x54b026(0x163)](_0x54b026(0x17e)+_0x3bc33b);if(realOrResolved(_0x3136b9)===realOrResolved(_0x5af908))return{'path':_0x3bc33b,'target':_0x5af908,'action':_0x54b026(0x183)};const _0xe4571a=readMetadataIfPresent(resolve(_0x3136b9,METADATA_FILE));if(_0x12e2fc[_0x54b026(0x195)]==='project'&&(_0xe4571a?.[_0x54b026(0x18c)]!==_0x12e2fc['appCode']||_0xe4571a['skillCode']!==_0x4472dc))throw CliErrors['validation'](_0x54b026(0x17c)+_0x3bc33b);return unlinkSync(_0x3bc33b),symlinkSync(_0x5af908,_0x3bc33b,'dir'),{'path':_0x3bc33b,'target':_0x5af908,'action':'updated'};}return symlinkSync(_0x5af908,_0x3bc33b,_0x54b026(0x18d)),{'path':_0x3bc33b,'target':_0x5af908,'action':_0x54b026(0x192)};}function a142_0x229f(){const _0x54569f=['356552GqIjoj','appCode','dir','902286CJvPTe','510560nkRQmC','skillCode','skipped','created','removed','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','scope','pruneSkillCodes','scopes','startsWith','lovrabet','get','accessKey','not-managed-symlink','runtime-observe','set','validation','builtin','map','trim','isSymbolicLink','has','2yqHzNN','726873kzGpUo','contentHash','100CeXPsi','linked-from-protected-root','external-symlink','80947ANGkXV','slice','455571CLdXdI','company','activeSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','skillRoots','project','skill','managedRoot','isDirectory','460504frYAHw','name','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','env','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','metadata-mismatch','push','unchanged','agentsSkillsDir','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','metadataPath','secret-retriever','filter','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','49vXqMZx'];a142_0x229f=function(){return _0x54569f;};return a142_0x229f();}function managedTargetSkillLinkPaths(_0x2da9c9,_0x3a8f02){const _0x3486c8=a142_0x581b36;if(!existsSync(_0x2da9c9))return[];const _0x544249=_0x3a8f02['appCode']+'--';return readdirSync(_0x2da9c9,{'withFileTypes':!![]})[_0x3486c8(0x188)](_0x577938=>_0x3a8f02[_0x3486c8(0x195)]===_0x3486c8(0x176)||_0x577938[_0x3486c8(0x17b)][_0x3486c8(0x198)](_0x544249))[_0x3486c8(0x165)](_0x1c188b=>resolve(_0x2da9c9,_0x1c188b[_0x3486c8(0x17b)]));}function removeManagedSkillLink(_0x5cbffe,_0x433c35,_0x3f7fe3){const _0x3e9309=a142_0x581b36,_0x3e4e94=lstatIfPresent(_0x5cbffe);if(!_0x3e4e94?.[_0x3e9309(0x167)]())return{'path':_0x5cbffe,'action':'skipped','reason':_0x3e9309(0x19c)};const _0xc8022c=resolveSymlinkTarget(_0x5cbffe);if(!isPathInside(realOrResolved(_0xc8022c),realOrResolved(_0x433c35[_0x3e9309(0x178)])))return{'path':_0x5cbffe,'action':_0x3e9309(0x191),'reason':_0x3e9309(0x16e)};const _0x1253c3=readMetadataIfPresent(resolve(_0xc8022c,METADATA_FILE));if(_0x433c35['scope']==='project'&&(_0x1253c3?.[_0x3e9309(0x18c)]!==_0x433c35[_0x3e9309(0x18c)]||_0x1253c3['skillCode']!==_0x3f7fe3))return{'path':_0x5cbffe,'action':_0x3e9309(0x191),'reason':'metadata-mismatch'};return unlinkSync(_0x5cbffe),{'path':_0x5cbffe,'action':_0x3e9309(0x193)};}function isLinkedFromAnyRoot(_0xdba4ec,_0xedc0ce){const _0x1b1154=a142_0x581b36,_0x141fc8=realOrResolved(_0xdba4ec);for(const _0x10bb28 of _0xedc0ce){if(!existsSync(_0x10bb28))continue;for(const _0x3c7f1b of readdirSync(_0x10bb28,{'withFileTypes':!![]})){if(!_0x3c7f1b[_0x1b1154(0x167)]())continue;const _0x7781bb=resolve(_0x10bb28,_0x3c7f1b[_0x1b1154(0x17b)]);if(realOrResolved(resolveSymlinkTarget(_0x7781bb))===_0x141fc8)return!![];}}return![];}function runtimeSkillLinkName(_0x3daacb,_0x1d3b94){const _0x12e1f7=a142_0x581b36,_0x3c79f6=safePathSegment(_0x1d3b94,'skillCode');if(_0x3daacb[_0x12e1f7(0x195)]===_0x12e1f7(0x176)&&RESERVED_PROJECT_SKILL_CODES[_0x12e1f7(0x168)](_0x3c79f6))throw CliErrors[_0x12e1f7(0x163)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x3c79f6);return _0x3daacb[_0x12e1f7(0x195)]===_0x12e1f7(0x176)?_0x3c79f6:_0x3daacb[_0x12e1f7(0x18c)]+'--'+_0x3c79f6;}function a142_0x3852(_0x310f71,_0x3bd54e){_0x310f71=_0x310f71-0x162;const _0x229ffa=a142_0x229f();let _0x3852a7=_0x229ffa[_0x310f71];return _0x3852a7;}function runtimeSkillCodeFromLink(_0x53ab57,_0x136f5b){const _0x4366b3=a142_0x581b36,_0x1d01fa=basename(_0x136f5b);return _0x53ab57[_0x4366b3(0x195)]===_0x4366b3(0x176)?_0x1d01fa:_0x1d01fa[_0x4366b3(0x170)]((_0x53ab57[_0x4366b3(0x18c)]+'--')['length']);}export function copyManagedSkillDirectory(_0x2acfa0,_0x42f730){const _0x39d1d1=a142_0x581b36,_0x1eed2f=resolve(_0x42f730,METADATA_FILE),_0x3b2bc9=existsSync(_0x42f730);if(_0x3b2bc9){const _0x51c00e=lstatSync(_0x42f730);if(_0x51c00e[_0x39d1d1(0x167)]())throw CliErrors[_0x39d1d1(0x163)](_0x39d1d1(0x189)+_0x42f730);if(!_0x51c00e['isDirectory']())throw CliErrors[_0x39d1d1(0x163)](_0x39d1d1(0x17f)+_0x42f730);const _0x48c651=readMetadataIfPresent(_0x1eed2f);if(_0x48c651?.[_0x39d1d1(0x195)]!==_0x39d1d1(0x164))throw CliErrors[_0x39d1d1(0x163)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x42f730);}ensureDirSync(dirname(_0x42f730));const _0x272969=_0x3b2bc9?readMetadataIfPresent(_0x1eed2f)?.[_0x39d1d1(0x16b)]:undefined,_0x2224e2=readMetadataIfPresent(resolve(_0x2acfa0,METADATA_FILE))?.[_0x39d1d1(0x16b)];return _0x3b2bc9&&removeSync(_0x42f730),copySkillDirectory(_0x2acfa0,_0x42f730),{'path':_0x42f730,'target':_0x2acfa0,'action':!_0x3b2bc9?_0x39d1d1(0x192):_0x272969===_0x2224e2?_0x39d1d1(0x183):'updated'};}function copySkillDirectory(_0x4c3c05,_0x7108c9){copySync(_0x4c3c05,_0x7108c9,{'dereference':![],'overwrite':!![],'filter'(_0x4291c5){const _0x2d11fd=a142_0x3852;if(lstatSync(_0x4291c5)[_0x2d11fd(0x167)]())throw CliErrors[_0x2d11fd(0x163)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x4291c5);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4127c8,_0x56613e){const _0xf0bcd9=a143_0x1f51,_0x2651b2=_0x4127c8();while(!![]){try{const _0xe5198c=parseInt(_0xf0bcd9(0x17c))/0x1*(parseInt(_0xf0bcd9(0x191))/0x2)+-parseInt(_0xf0bcd9(0x18f))/0x3*(-parseInt(_0xf0bcd9(0x17f))/0x4)+-parseInt(_0xf0bcd9(0x184))/0x5*(parseInt(_0xf0bcd9(0x16f))/0x6)+parseInt(_0xf0bcd9(0x195))/0x7*(-parseInt(_0xf0bcd9(0x178))/0x8)+-parseInt(_0xf0bcd9(0x181))/0x9+parseInt(_0xf0bcd9(0x16b))/0xa*(-parseInt(_0xf0bcd9(0x192))/0xb)+-parseInt(_0xf0bcd9(0x177))/0xc*(-parseInt(_0xf0bcd9(0x179))/0xd);if(_0xe5198c===_0x56613e)break;else _0x2651b2['push'](_0x2651b2['shift']());}catch(_0x48a76a){_0x2651b2['push'](_0x2651b2['shift']());}}}(a143_0x5579,0x6b193));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a143_0x1f51(_0x319570,_0x965fae){_0x319570=_0x319570-0x168;const _0x5579fe=a143_0x5579();let _0x1f51cf=_0x5579fe[_0x319570];return _0x1f51cf;}import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x3dc9d2,_0x1ff3a7,_0x3da10f={}){const _0x2a4856=a143_0x1f51,_0x422e29=safePathSegment(_0x3dc9d2['appCode'],_0x2a4856(0x168));if(_0x1ff3a7[_0x2a4856(0x168)]!==_0x422e29)throw CliErrors[_0x2a4856(0x182)](_0x2a4856(0x173)+_0x1ff3a7[_0x2a4856(0x168)]+'\x20!=\x20'+_0x422e29);const _0x504b11=normalizeRuntimeSkillScopes(_0x3dc9d2[_0x2a4856(0x189)]),_0x1284ed=new Set(_0x504b11),_0x261008=_0x3dc9d2[_0x2a4856(0x196)]?.[_0x2a4856(0x16c)](),_0x5df708=new Map(),_0x2e843c=resolve(getRuntimeSkillCacheRoot(_0x3dc9d2[_0x2a4856(0x17a)],_0x3dc9d2[_0x2a4856(0x16e)],_0x3da10f),_0x422e29);for(const _0x12bc2d of _0x504b11){for(const _0x3816ce of localSkillEntryDirs(resolve(_0x2e843c,_0x12bc2d))){collectLocalRuntimeSkill(_0x5df708,_0x3816ce,{'appCode':_0x422e29,'scopes':_0x1284ed,'code':_0x261008,'source':_0x2a4856(0x197)});}}for(const _0x35b3b4 of _0x1ff3a7[_0x2a4856(0x180)]){for(const _0x5a047c of localSkillLinkCandidates(_0x35b3b4,_0x1ff3a7,_0x1284ed)){collectLocalRuntimeSkill(_0x5df708,_0x5a047c,{'appCode':_0x422e29,'scopes':_0x1284ed,'code':_0x261008,'source':_0x2a4856(0x174),'linkedPath':_0x5a047c});}}return Array[_0x2a4856(0x17b)](_0x5df708['values']())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x46ab7c){const _0x55f7c3=a143_0x1f51;if(!existsSync(_0x46ab7c))return[];return readdirSync(_0x46ab7c,{'withFileTypes':!![]})[_0x55f7c3(0x186)](_0x42ab1b=>_0x42ab1b['isDirectory']()||_0x42ab1b[_0x55f7c3(0x187)]())[_0x55f7c3(0x16a)](_0x41c409=>resolve(_0x46ab7c,_0x41c409[_0x55f7c3(0x17d)]));}function localSkillLinkCandidates(_0x2ee27b,_0x18c2f2,_0x47a982){const _0x5acc90=a143_0x1f51;if(!existsSync(_0x2ee27b))return[];const _0xae57fb=_0x18c2f2['appCode']+'--';return readdirSync(_0x2ee27b,{'withFileTypes':!![]})[_0x5acc90(0x186)](_0x2a2587=>_0x2a2587[_0x5acc90(0x18c)]()||_0x2a2587[_0x5acc90(0x187)]())[_0x5acc90(0x186)](_0x190e1e=>_0x18c2f2[_0x5acc90(0x198)]==='project'||_0x190e1e['name'][_0x5acc90(0x18e)](_0xae57fb)||_0x47a982[_0x5acc90(0x193)](_0x5acc90(0x18d)))[_0x5acc90(0x16a)](_0x1b9732=>resolve(_0x2ee27b,_0x1b9732[_0x5acc90(0x17d)]));}function collectLocalRuntimeSkill(_0x310093,_0x1db6c0,_0x560f8a){const _0x528130=a143_0x1f51,_0xd9f622=resolve(_0x1db6c0,METADATA_FILE),_0x3ec752=readMetadataIfPresent(_0xd9f622);if(!_0x3ec752)return;if(_0x3ec752['appCode']!==_0x560f8a[_0x528130(0x168)])return;if(!isRuntimeSkillScope(_0x3ec752[_0x528130(0x198)])||!_0x560f8a[_0x528130(0x189)][_0x528130(0x193)](_0x3ec752[_0x528130(0x198)]))return;const _0x2571cc=_0x3ec752[_0x528130(0x175)]?.[_0x528130(0x16c)]();if(!_0x2571cc)return;if(_0x560f8a[_0x528130(0x196)]&&_0x2571cc!==_0x560f8a[_0x528130(0x196)])return;const _0x4d7c54=_0x3ec752[_0x528130(0x198)]+':'+_0x2571cc,_0x1f834b=_0x560f8a['linkedPath']?[_0x560f8a['linkedPath']]:[],_0x2230ab=_0x310093[_0x528130(0x183)](_0x4d7c54);if(_0x2230ab){_0x560f8a[_0x528130(0x188)]===_0x528130(0x197)&&(_0x2230ab['dir']=_0x1db6c0,_0x2230ab[_0x528130(0x17e)]=_0x1db6c0,_0x2230ab['skillMdPath']=resolve(_0x1db6c0,SKILL_FILE),_0x2230ab[_0x528130(0x190)]=_0xd9f622);for(const _0x2d23f4 of _0x1f834b){!_0x2230ab[_0x528130(0x16d)][_0x528130(0x176)](_0x2d23f4)&&_0x2230ab[_0x528130(0x16d)][_0x528130(0x18a)](_0x2d23f4);}_0x2230ab['linkedPaths'][_0x528130(0x169)]();return;}_0x310093[_0x528130(0x172)](_0x4d7c54,{..._0x3ec752,'tags':Array[_0x528130(0x170)](_0x3ec752[_0x528130(0x194)])?_0x3ec752[_0x528130(0x194)]:[],'scope':_0x3ec752[_0x528130(0x198)],'source':_0x528130(0x18b),'dir':_0x1db6c0,'cacheDir':_0x560f8a[_0x528130(0x188)]===_0x528130(0x197)?_0x1db6c0:undefined,'skillMdPath':resolve(_0x1db6c0,SKILL_FILE),'metadataPath':_0xd9f622,'linkedPaths':_0x1f834b});}function a143_0x5579(){const _0x21964d=['dir','set','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','link','skillCode','includes','24918192CLynAv','1320KwZGwB','13ibzbzd','env','from','22SaesNE','name','cacheDir','28cZFCMt','skillRoots','2327589LzoEWS','validation','get','5IXEvIW','localeCompare','filter','isSymbolicLink','source','scopes','push','local','isDirectory','builtin','startsWith','122637RhyvFY','metadataPath','32860kAGuxm','8392065XhVokL','has','tags','18949HcFVwn','code','cache','scope','appCode','sort','map','10ufZtGn','trim','linkedPaths','accessKey','4903578urCqWQ','isArray'];a143_0x5579=function(){return _0x21964d;};return a143_0x5579();}function compareLocalRuntimeSkills(_0x4ec76d,_0x508120){const _0x362cd5=a143_0x1f51,_0x3a2153={'personal':0x0,'company':0x1,'builtin':0x2};return _0x3a2153[_0x4ec76d[_0x362cd5(0x198)]]-_0x3a2153[_0x508120['scope']]||_0x4ec76d[_0x362cd5(0x175)][_0x362cd5(0x185)](_0x508120[_0x362cd5(0x175)])||_0x4ec76d[_0x362cd5(0x171)][_0x362cd5(0x185)](_0x508120[_0x362cd5(0x171)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa65b,_0xf1a507){const _0x270b35=a144_0x273f,_0x3663d9=_0xa65b();while(!![]){try{const _0x102608=-parseInt(_0x270b35(0xd9))/0x1*(parseInt(_0x270b35(0xd6))/0x2)+parseInt(_0x270b35(0xce))/0x3*(parseInt(_0x270b35(0xd5))/0x4)+parseInt(_0x270b35(0xe8))/0x5*(parseInt(_0x270b35(0xe9))/0x6)+parseInt(_0x270b35(0xc2))/0x7*(parseInt(_0x270b35(0xd3))/0x8)+-parseInt(_0x270b35(0xd0))/0x9*(parseInt(_0x270b35(0xd8))/0xa)+-parseInt(_0x270b35(0xb9))/0xb+parseInt(_0x270b35(0xcb))/0xc*(parseInt(_0x270b35(0xda))/0xd);if(_0x102608===_0xf1a507)break;else _0x3663d9['push'](_0x3663d9['shift']());}catch(_0x4959e3){_0x3663d9['push'](_0x3663d9['shift']());}}}(a144_0x42ed,0x73844));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x2d4256){const _0x5d756e=a144_0x273f;return _0x2d4256[_0x5d756e(0xdf)]??Buffer[_0x5d756e(0xd1)](_0x2d4256[_0x5d756e(0xcd)]??'','utf8');}export function fileText(_0xa463c2){const _0x36a33a=a144_0x273f;return fileContent(_0xa463c2)[_0x36a33a(0xc8)](_0x36a33a(0xeb));}export function normalizeLocalFiles(_0x18a311){const _0x4ca1d2=a144_0x273f;if(!Array[_0x4ca1d2(0xca)](_0x18a311)||_0x18a311['length']===0x0)return[];const _0x455477=new Map();for(const _0x5736a6 of _0x18a311){if(!_0x5736a6||typeof _0x5736a6!==_0x4ca1d2(0xc4)||typeof _0x5736a6[_0x4ca1d2(0xd7)]!==_0x4ca1d2(0xbf))throw CliErrors[_0x4ca1d2(0xbe)](_0x4ca1d2(0xde));const _0x19b7c0=normalizeSkillRelativePath(_0x5736a6[_0x4ca1d2(0xd7)]);if(_0x455477['has'](_0x19b7c0))throw CliErrors[_0x4ca1d2(0xbe)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x19b7c0);if(_0x5736a6[_0x4ca1d2(0xdf)]!==undefined&&!Buffer[_0x4ca1d2(0xe6)](_0x5736a6[_0x4ca1d2(0xdf)]))throw CliErrors[_0x4ca1d2(0xbe)](_0x4ca1d2(0xbb)+_0x19b7c0);if(_0x5736a6['bytes']===undefined&&typeof _0x5736a6['content']!=='string')throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x19b7c0);const _0x387ad9=fileContent(_0x5736a6);_0x455477[_0x4ca1d2(0xc7)](_0x19b7c0,{'path':_0x19b7c0,'bytes':_0x387ad9});}return Array[_0x4ca1d2(0xd1)](_0x455477['values']())[_0x4ca1d2(0xe3)](compareSkillFiles);}export function normalizeManifestFiles(_0x2331bf){const _0x5bd3a8=a144_0x273f;if(!Array[_0x5bd3a8(0xca)](_0x2331bf)||_0x2331bf[_0x5bd3a8(0xe2)]===0x0)return[];const _0x206700=new Map();for(const _0x25110d of _0x2331bf){if(!_0x25110d||typeof _0x25110d!==_0x5bd3a8(0xc4)||typeof _0x25110d['path']!==_0x5bd3a8(0xbf))throw CliErrors[_0x5bd3a8(0xbe)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5992f6=normalizeSkillRelativePath(_0x25110d['path']);if(_0x206700['has'](_0x5992f6))throw CliErrors['validation'](_0x5bd3a8(0xc1)+_0x5992f6);if(!isSha256Hex(_0x25110d[_0x5bd3a8(0xc5)]))throw CliErrors[_0x5bd3a8(0xbe)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x5992f6);if(!Number[_0x5bd3a8(0xe0)](_0x25110d[_0x5bd3a8(0xdb)])||_0x25110d[_0x5bd3a8(0xdb)]<0x0)throw CliErrors[_0x5bd3a8(0xbe)](_0x5bd3a8(0xc3)+_0x5992f6);_0x206700[_0x5bd3a8(0xc7)](_0x5992f6,{'path':_0x5992f6,'sha256':_0x25110d[_0x5bd3a8(0xc5)][_0x5bd3a8(0xe5)](),'size':_0x25110d[_0x5bd3a8(0xdb)]});}return Array[_0x5bd3a8(0xd1)](_0x206700['values']())['sort'](compareSkillFiles);}function a144_0x273f(_0x127cbb,_0x16dd07){_0x127cbb=_0x127cbb-0xb9;const _0x42ed5f=a144_0x42ed();let _0x273f72=_0x42ed5f[_0x127cbb];return _0x273f72;}export function scanSkillDirectory(_0x5e0d69,_0x1409d6={}){const _0x3949df=a144_0x273f,_0x34eb2e=realpathSync(_0x5e0d69),_0x4c9883=canonicalExcludedFilePaths(_0x1409d6[_0x3949df(0xd4)]),_0x5b7913=[];function _0x9c3d07(_0x5bb08c){const _0x372447=_0x3949df,_0x20269e=readdirSync(_0x5bb08c,{'withFileTypes':!![]})[_0x372447(0xe3)]((_0x4b6777,_0x340ebf)=>_0x4b6777['name'][_0x372447(0xe1)](_0x340ebf[_0x372447(0xba)]));for(const _0x130bbb of _0x20269e){if(_0x130bbb[_0x372447(0xc9)]()&&IGNORED_DIR_NAMES[_0x372447(0xea)](_0x130bbb[_0x372447(0xba)]))continue;if(IGNORED_FILE_NAMES['has'](_0x130bbb[_0x372447(0xba)]))continue;const _0x1945d3=resolve(_0x5bb08c,_0x130bbb[_0x372447(0xba)]);if(isExcludedFilePath(_0x1945d3,_0x4c9883))continue;if(_0x130bbb['isSymbolicLink']())throw CliErrors[_0x372447(0xbe)](_0x372447(0xcf)+_0x1945d3);const _0x550e13=toPosixPath(relative(_0x34eb2e,_0x1945d3));if(_0x130bbb[_0x372447(0xc9)]()){_0x9c3d07(_0x1945d3);continue;}if(!_0x130bbb[_0x372447(0xbd)]())continue;validateSkillRelativePath(_0x550e13);const _0x52d0a7=readFileSync(_0x1945d3);_0x5b7913[_0x372447(0xc0)]({'path':_0x550e13,'bytes':_0x52d0a7});}}return _0x9c3d07(_0x34eb2e),normalizeLocalFiles(_0x5b7913);}function canonicalExcludedFilePaths(_0x1b47c2){const _0x32c012=a144_0x273f,_0x5382f8=new Set();for(const _0x53de8f of _0x1b47c2??[]){const _0x5f39b5=resolve(_0x53de8f);_0x5382f8[_0x32c012(0xdd)](_0x5f39b5);try{_0x5382f8[_0x32c012(0xdd)](realpathSync(_0x5f39b5));}catch{}}return _0x5382f8;}function isExcludedFilePath(_0x1dc59e,_0x6c2f68){const _0x8ed818=a144_0x273f;if(_0x6c2f68['has'](_0x1dc59e))return!![];if(_0x6c2f68['size']===0x0)return![];try{return _0x6c2f68[_0x8ed818(0xea)](realpathSync(_0x1dc59e));}catch{return![];}}export function compareSkillFiles(_0x22a749,_0x2d86e8){const _0x348a0d=a144_0x273f;if(_0x22a749['path']===SKILL_FILE)return _0x2d86e8['path']===SKILL_FILE?0x0:-0x1;if(_0x2d86e8[_0x348a0d(0xd7)]===SKILL_FILE)return 0x1;return Buffer[_0x348a0d(0xcc)](Buffer[_0x348a0d(0xd1)](_0x22a749[_0x348a0d(0xd7)],_0x348a0d(0xeb)),Buffer[_0x348a0d(0xd1)](_0x2d86e8[_0x348a0d(0xd7)],_0x348a0d(0xeb)));}export function normalizeSkillRelativePath(_0x68a158){const _0x10b551=toPosixPath(_0x68a158['trim']());return validateSkillRelativePath(_0x10b551),_0x10b551;}export function validateSkillRelativePath(_0x312265){const _0x292ba8=a144_0x273f;if(!_0x312265||_0x312265[_0x292ba8(0xe7)]('/')||_0x312265[_0x292ba8(0xbc)]('//'))throw CliErrors[_0x292ba8(0xbe)](_0x292ba8(0xdc)+_0x312265);for(const _0x309224 of _0x312265[_0x292ba8(0xd2)]('/')){if(!_0x309224||_0x309224==='.'||_0x309224==='..')throw CliErrors['validation'](_0x292ba8(0xdc)+_0x312265);}}export function toPosixPath(_0x40dfb2){const _0x2d2d70=a144_0x273f;return _0x40dfb2[_0x2d2d70(0xc6)](/\\/g,'/');}function a144_0x42ed(){const _0x8f8431=['validation','string','push','Duplicate\x20Skill\x20file\x20path:\x20','381647wiWTrN','Skill\x20file\x20size\x20is\x20invalid:\x20','object','sha256','replace','set','toString','isDirectory','isArray','9468408OnucWD','compare','content','146154iTINxv','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','6882237AhlGqK','from','split','32OyZpdn','excludedFilePaths','68dbUnWI','68mnCweK','path','10qJaZGA','10975DQPdIj','13rNQnZt','size','Unsafe\x20Skill\x20file\x20path:\x20','add','Skill\x20file\x20path\x20must\x20be\x20text.','bytes','isSafeInteger','localeCompare','length','sort','test','toLowerCase','isBuffer','startsWith','335IxRtqS','3912bjVLXN','has','utf8','2948099HoMPww','name','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','includes','isFile'];a144_0x42ed=function(){return _0x8f8431;};return a144_0x42ed();}export function isSha256Hex(_0x11881b){const _0x43c456=a144_0x273f;return typeof _0x11881b===_0x43c456(0xbf)&&/^[a-fA-F0-9]{64}$/[_0x43c456(0xe4)](_0x11881b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2b1849,_0x3818a6){const _0x35ddfc=a145_0x5b6c,_0x52240a=_0x2b1849();while(!![]){try{const _0xe73f0e=-parseInt(_0x35ddfc(0xcb))/0x1+-parseInt(_0x35ddfc(0xcd))/0x2+parseInt(_0x35ddfc(0xcf))/0x3+parseInt(_0x35ddfc(0xc1))/0x4+parseInt(_0x35ddfc(0xd9))/0x5+-parseInt(_0x35ddfc(0xd5))/0x6+parseInt(_0x35ddfc(0xd1))/0x7*(-parseInt(_0x35ddfc(0xec))/0x8);if(_0xe73f0e===_0x3818a6)break;else _0x52240a['push'](_0x52240a['shift']());}catch(_0x100eb0){_0x52240a['push'](_0x52240a['shift']());}}}(a145_0x1202,0x904a2));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a145_0x5b6c(_0xd86a9,_0x434f26){_0xd86a9=_0xd86a9-0xbe;const _0x120292=a145_0x1202();let _0x5b6cf2=_0x120292[_0xd86a9];return _0x5b6cf2;}import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0xf59359,_0x1c24c2,_0x119cbc){const _0x43996b=a145_0x5b6c,_0x10d714=requireSkillCode(_0xf59359),_0x5e3f9d=requirePackageBytes(_0x10d714,_0x119cbc[_0x43996b(0xd7)]),_0x16b330=extractDownloadedPackage(_0x5e3f9d),_0x438285=_0x16b330[_0x43996b(0xbf)](_0x4f44b9=>_0x4f44b9[_0x43996b(0xc0)]===SKILL_FILE);if(!_0x438285)throw CliErrors[_0x43996b(0xf7)](_0x43996b(0xf8)+SKILL_FILE+':\x20'+_0x10d714);const _0x5c8328=withMaterializedSkillFrontmatter(_0x16b330,_0xf59359,_0x10d714),_0x494d98=_0x5c8328[_0x43996b(0xbf)](_0x44064c=>_0x44064c['path']===SKILL_FILE),_0x2739e3=fileText(_0x494d98),_0x11cdf3=getRuntimeSkillDir(_0x119cbc[_0x43996b(0xf5)],_0x119cbc['accessKey'],_0x119cbc['appCode'],_0x1c24c2,_0x10d714,_0x119cbc[_0x43996b(0xf1)]),_0x19ab5f=resolve(_0x11cdf3,SKILL_FILE),_0x2e1378=resolve(_0x11cdf3,METADATA_FILE),_0x1ba34d=contentHash(_0x2739e3),_0x3a1dff=readMetadataIfPresent(_0x2e1378)?.[_0x43996b(0xee)];ensurePulledFilesCanBeOverwritten(_0x11cdf3,_0x2e1378,_0x5c8328,_0x119cbc['force']===!![]),mkdirSync(_0x11cdf3,{'recursive':!![],'mode':0x1c0});const _0x389b26=existsSync(_0x19ab5f)?readFileSync(_0x19ab5f,'utf8'):undefined;return materializeFiles(_0x11cdf3,_0x5c8328),removeStaleManagedFiles(_0x11cdf3,_0x3a1dff,_0x5c8328),writeJsonAtomic(_0x2e1378,buildMetadata(_0xf59359,_0x1c24c2,_0x119cbc[_0x43996b(0xc9)],_0x1ba34d,_0x119cbc[_0x43996b(0xe5)],_0x5c8328,_0x5e3f9d)),{'skill':_0xf59359,'scope':_0x1c24c2,'dir':_0x11cdf3,'skillMdPath':_0x19ab5f,'metadataPath':_0x2e1378,'contentHash':_0x1ba34d,'changed':_0x389b26!==_0x2739e3};}export function reuseMaterializedRuntimeSkill(_0x346ac5,_0x586d28,_0x49515c){const _0x4bfb4f=a145_0x5b6c,_0x322ede=_0x346ac5[_0x4bfb4f(0xc3)]?.[_0x4bfb4f(0xdb)]();if(!_0x322ede)return undefined;const _0x18877d=requireSkillCode(_0x346ac5),_0x150698=getRuntimeSkillDir(_0x49515c[_0x4bfb4f(0xf5)],_0x49515c['accessKey'],_0x49515c[_0x4bfb4f(0xc9)],_0x586d28,_0x18877d,_0x49515c[_0x4bfb4f(0xf1)]),_0x210120=resolve(_0x150698,SKILL_FILE),_0x192d40=resolve(_0x150698,METADATA_FILE),_0x25dc86=readMetadataIfPresent(_0x192d40);if(!_0x25dc86||_0x25dc86[_0x4bfb4f(0xeb)]!==0x2||_0x25dc86['appCode']!==_0x49515c[_0x4bfb4f(0xc9)]||_0x25dc86[_0x4bfb4f(0xe6)]!==_0x586d28||_0x25dc86['skillCode']!==_0x18877d||_0x25dc86['version']!==_0x322ede||_0x25dc86['id']!==_0x346ac5['id']||_0x25dc86[_0x4bfb4f(0xe8)]!==_0x346ac5['skillName']||_0x25dc86[_0x4bfb4f(0xf4)]!==_0x346ac5['description']||_0x25dc86[_0x4bfb4f(0xe3)]!==_0x346ac5['example']||_0x25dc86[_0x4bfb4f(0xdf)]!==_0x346ac5[_0x4bfb4f(0xdf)]||!_0x25dc86[_0x4bfb4f(0xd8)]||!_0x25dc86[_0x4bfb4f(0xee)]||!Object[_0x4bfb4f(0xc5)](_0x25dc86[_0x4bfb4f(0xee)],SKILL_FILE))return undefined;for(const [_0x3c92d5,_0x4624c6]of Object[_0x4bfb4f(0xe7)](_0x25dc86['fileHashes'])){if(!/^[a-f0-9]{64}$/[_0x4bfb4f(0xf0)](_0x4624c6))return undefined;const _0x16148c=resolveManagedFilePath(_0x150698,_0x3c92d5);if(!existsSync(_0x16148c)||!lstatSync(_0x16148c)[_0x4bfb4f(0xe9)]())return undefined;if(bufferSha256(readFileSync(_0x16148c))!==_0x4624c6)return undefined;}return{'skill':_0x346ac5,'scope':_0x586d28,'dir':_0x150698,'skillMdPath':_0x210120,'metadataPath':_0x192d40,'contentHash':_0x25dc86[_0x4bfb4f(0xd8)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x4553f5,_0x1a3ae6,_0x1515ed){const _0x310751=a145_0x5b6c,_0xf6da6a=skillDisplayName(_0x1a3ae6,_0x1515ed),_0x19a3a4=_0x1a3ae6[_0x310751(0xf4)]?.[_0x310751(0xdb)]()||_0xf6da6a||_0x1515ed;return normalizeLocalFiles(_0x4553f5)[_0x310751(0xdd)](_0x2abd46=>{const _0x2ad73c=_0x310751,_0x5323b3=fileText(_0x2abd46);if(_0x2abd46['path']!==SKILL_FILE)return _0x2abd46;if(hasYamlFrontmatter(_0x5323b3))return{'path':_0x2abd46[_0x2ad73c(0xc0)],'content':withSyncedDisplayName(_0x5323b3,_0xf6da6a)};return{'path':_0x2abd46[_0x2ad73c(0xc0)],'content':prependSkillFrontmatter(_0x5323b3,{'name':_0x1515ed,'displayName':_0xf6da6a,'description':_0x19a3a4})};});}function hasYamlFrontmatter(_0x2d6700){return/^\uFEFF?---\s*\r?\n/['test'](_0x2d6700);}function prependSkillFrontmatter(_0x4a6367,_0x5ab98e){const _0x1f6c6a=a145_0x5b6c,_0x2c0f33=_0x4a6367[_0x1f6c6a(0xd6)](/^\uFEFF/,'');return[_0x1f6c6a(0xea),_0x1f6c6a(0xbe)+yamlString(_0x5ab98e['name']),_0x5ab98e[_0x1f6c6a(0xce)]?_0x1f6c6a(0xda)+yamlString(_0x5ab98e[_0x1f6c6a(0xce)]):undefined,_0x1f6c6a(0xdc)+yamlString(_0x5ab98e[_0x1f6c6a(0xf4)]),_0x1f6c6a(0xea),'',_0x2c0f33][_0x1f6c6a(0xc6)](_0x2ba8c7=>_0x2ba8c7!==undefined)[_0x1f6c6a(0xd3)]('\x0a');}function yamlString(_0x45f66f){const _0x4a29d8=a145_0x5b6c;return JSON[_0x4a29d8(0xf6)](_0x45f66f[_0x4a29d8(0xd6)](/\r/g,'')[_0x4a29d8(0xdb)]());}function skillDisplayName(_0x489338,_0x300612){const _0x9cdec6=a145_0x5b6c,_0x2c1e0a=_0x489338['skillName']?.[_0x9cdec6(0xdb)]();return _0x2c1e0a||_0x300612;}function withSyncedDisplayName(_0x862b63,_0x3b5b30){const _0x587328=a145_0x5b6c,_0x2fae13=_0x862b63[_0x587328(0xe0)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2fae13)return _0x862b63;const _0x5dc375=_0x2fae13[0x1]??'',_0x1aa7ef=_0x2fae13[0x2]??'',_0xe0ad91=parseDocument(_0x1aa7ef);if(_0xe0ad91['errors']['length']>0x0||!isMap(_0xe0ad91['contents']))return _0x862b63;if(_0x3b5b30)_0xe0ad91[_0x587328(0xca)]('displayName',_0x3b5b30);else{if(_0xe0ad91[_0x587328(0xed)]('displayName'))_0xe0ad91[_0x587328(0xc4)](_0x587328(0xce));else return _0x862b63;}forceBlockCollections(_0xe0ad91[_0x587328(0xef)]);const _0x1f9cc1=_0xe0ad91['toString']({'lineWidth':0x0})[_0x587328(0xde)](),_0x503cfb=_0x862b63[_0x587328(0xe1)](_0x2fae13[0x0][_0x587328(0xd4)])[_0x587328(0xd6)](/^\r?\n/,'');return _0x5dc375+'---\x0a'+_0x1f9cc1+_0x587328(0xe2)+_0x503cfb;}function forceBlockCollections(_0x5df788){if(!isNode(_0x5df788))return;visit(_0x5df788,(_0xa3ad0b,_0xb99adb)=>{isCollection(_0xb99adb)&&(_0xb99adb['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x430eb8,_0x5e76c9,_0x4e8e56,_0x2f314c){const _0x2d3235=a145_0x5b6c;if(_0x2f314c||!existsSync(_0x5e76c9))return;const _0x69ce24=readMetadataIfPresent(_0x5e76c9);if(!_0x69ce24)return;const _0x5bed25=_0x69ce24[_0x2d3235(0xee)]&&Object[_0x2d3235(0xd0)](_0x69ce24[_0x2d3235(0xee)])['length']>0x0?_0x69ce24['fileHashes']:undefined;if(_0x5bed25)for(const [_0x2b65fe,_0x39c014]of Object['entries'](_0x5bed25)){const _0x364559=resolveManagedFilePath(_0x430eb8,_0x2b65fe);if(!existsSync(_0x364559))throw CliErrors[_0x2d3235(0xf7)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x430eb8,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x2b65fe);const _0x40e6cd=lstatSync(_0x364559);if(!_0x40e6cd[_0x2d3235(0xe9)]())throw CliErrors[_0x2d3235(0xf7)](_0x2d3235(0xc8)+_0x430eb8,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x2b65fe);const _0x360f81=bufferSha256(readFileSync(_0x364559));if(_0x360f81!==_0x39c014)throw CliErrors[_0x2d3235(0xf7)](_0x2d3235(0xc8)+_0x430eb8+_0x2d3235(0xd2)+_0x2b65fe,_0x2d3235(0xf3)+_0x2b65fe);}else{const _0x2cfc11=resolve(_0x430eb8,SKILL_FILE);if(existsSync(_0x2cfc11)&&_0x69ce24[_0x2d3235(0xd8)]){const _0x17530d=contentHash(readFileSync(_0x2cfc11,_0x2d3235(0xc2)));if(_0x17530d!==_0x69ce24['contentHash'])throw CliErrors['validation'](_0x2d3235(0xe4)+_0x2cfc11,_0x2d3235(0xc7));}}for(const _0x12addc of normalizeLocalFiles(_0x4e8e56)){if(_0x5bed25?.[_0x12addc[_0x2d3235(0xc0)]])continue;if(!_0x5bed25&&_0x12addc['path']===SKILL_FILE)continue;const _0x2c91d2=resolveManagedFilePath(_0x430eb8,_0x12addc['path']);if(!existsSync(_0x2c91d2))continue;const _0x1b50df=lstatSync(_0x2c91d2);if(!_0x1b50df[_0x2d3235(0xe9)]())throw CliErrors[_0x2d3235(0xf7)](_0x2d3235(0xc8)+_0x430eb8,_0x2d3235(0xcc)+_0x12addc[_0x2d3235(0xc0)]);const _0x38393e=bufferSha256(readFileSync(_0x2c91d2));if(_0x38393e!==fileHash(_0x12addc))throw CliErrors[_0x2d3235(0xf7)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x430eb8,_0x2d3235(0xf2)+_0x12addc[_0x2d3235(0xc0)]);}}function materializeFiles(_0x3bce04,_0x1fd692){for(const _0x6c731e of normalizeLocalFiles(_0x1fd692)){const _0x64aec4=resolveManagedFilePath(_0x3bce04,_0x6c731e['path']);mkdirSync(dirname(_0x64aec4),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x64aec4,fileContent(_0x6c731e),0x180);}}function a145_0x1202(){const _0x212a4b=['2089575VWbEYc','keys','3198307hMsLYr','.\x20Changed\x20file:\x20','join','length','3233874HLzATQ','replace','packageBytes','contentHash','4267690isfUVu','displayName:\x20','trim','description:\x20','map','trimEnd','status','match','slice','\x0a---\x0a\x0a','example','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','pulledAt','scope','entries','skillName','isFile','---','schemaVersion','8oNYTbA','has','fileHashes','contents','test','paths','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','description','env','stringify','validation','Runtime\x20Skill\x20package\x20is\x20missing\x20','name:\x20','find','path','3027424DzuSfi','utf8','version','delete','hasOwn','filter','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','appCode','set','160239wYCaef','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1119580ZvCKNi','displayName'];a145_0x1202=function(){return _0x212a4b;};return a145_0x1202();}function removeStaleManagedFiles(_0x164e03,_0x246312,_0x2b8b55){const _0x4b6a8c=a145_0x5b6c;if(!_0x246312)return;const _0xc0d7af=new Set(normalizeLocalFiles(_0x2b8b55)[_0x4b6a8c(0xdd)](_0x1b7082=>_0x1b7082['path']));for(const _0x25f1e5 of Object['keys'](_0x246312)){if(_0xc0d7af[_0x4b6a8c(0xed)](_0x25f1e5))continue;const _0x119287=resolveManagedFilePath(_0x164e03,_0x25f1e5);existsSync(_0x119287)&&lstatSync(_0x119287)[_0x4b6a8c(0xe9)]()&&rmSync(_0x119287,{'force':!![]});}}
|
|
1
|
+
(function(_0x4e38a6,_0x139c88){const _0x3682de=a145_0x56c5,_0x3da7d4=_0x4e38a6();while(!![]){try{const _0x442a02=-parseInt(_0x3682de(0x18e))/0x1+-parseInt(_0x3682de(0x1a5))/0x2+parseInt(_0x3682de(0x1a7))/0x3+-parseInt(_0x3682de(0x19e))/0x4*(parseInt(_0x3682de(0x192))/0x5)+parseInt(_0x3682de(0x1a1))/0x6+-parseInt(_0x3682de(0x1a8))/0x7+parseInt(_0x3682de(0x1a3))/0x8;if(_0x442a02===_0x139c88)break;else _0x3da7d4['push'](_0x3da7d4['shift']());}catch(_0x39d805){_0x3da7d4['push'](_0x3da7d4['shift']());}}}(a145_0x57ce,0xad02e));function a145_0x57ce(){const _0x1be525=['contents','example','version','validation','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','name:\x20','353924YeArwY','.\x20Changed\x20file:\x20','env','5031540Oofqcr','hasOwn','27113760FgMxtd','appCode','2698920OQJyHK','status','679377avaOyr','1314054LKdIhp','force','keys','skillCode','errors','accessKey','Managed\x20file\x20was\x20removed\x20locally:\x20','utf8','toString','---\x0a','test','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','has','find','skillName','displayName:\x20','description','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','slice','isFile','stringify','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','trimEnd','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','paths','scope','contentHash','trim','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','path','name','delete','flow','1323623fWUEVQ','length','entries','---','50ocMIET','replace','match','fileHashes','pulledAt','displayName'];a145_0x57ce=function(){return _0x1be525;};return a145_0x57ce();}import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a145_0x56c5(_0x398523,_0x49b446){_0x398523=_0x398523-0x17a;const _0x57ce75=a145_0x57ce();let _0x56c5e6=_0x57ce75[_0x398523];return _0x56c5e6;}import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x577ac9,_0x42fc04,_0x3ed19b){const _0x174670=a145_0x56c5,_0x4e4034=requireSkillCode(_0x577ac9),_0x339094=requirePackageBytes(_0x4e4034,_0x3ed19b['packageBytes']),_0x23d8fa=extractDownloadedPackage(_0x339094),_0x13a2bb=_0x23d8fa[_0x174670(0x17a)](_0x517bee=>_0x517bee[_0x174670(0x18a)]===SKILL_FILE);if(!_0x13a2bb)throw CliErrors[_0x174670(0x19b)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x4e4034);const _0x59da50=withMaterializedSkillFrontmatter(_0x23d8fa,_0x577ac9,_0x4e4034),_0x263d61=_0x59da50['find'](_0x39f06a=>_0x39f06a[_0x174670(0x18a)]===SKILL_FILE),_0x2507a7=fileText(_0x263d61),_0x8d0ae=getRuntimeSkillDir(_0x3ed19b[_0x174670(0x1a0)],_0x3ed19b[_0x174670(0x1ad)],_0x3ed19b['appCode'],_0x42fc04,_0x4e4034,_0x3ed19b[_0x174670(0x185)]),_0x25d2f0=resolve(_0x8d0ae,SKILL_FILE),_0xe83d9f=resolve(_0x8d0ae,METADATA_FILE),_0x544741=contentHash(_0x2507a7),_0x39c7ec=readMetadataIfPresent(_0xe83d9f)?.[_0x174670(0x195)];ensurePulledFilesCanBeOverwritten(_0x8d0ae,_0xe83d9f,_0x59da50,_0x3ed19b[_0x174670(0x1a9)]===!![]),mkdirSync(_0x8d0ae,{'recursive':!![],'mode':0x1c0});const _0x5b3390=existsSync(_0x25d2f0)?readFileSync(_0x25d2f0,_0x174670(0x1af)):undefined;return materializeFiles(_0x8d0ae,_0x59da50),removeStaleManagedFiles(_0x8d0ae,_0x39c7ec,_0x59da50),writeJsonAtomic(_0xe83d9f,buildMetadata(_0x577ac9,_0x42fc04,_0x3ed19b[_0x174670(0x1a4)],_0x544741,_0x3ed19b[_0x174670(0x196)],_0x59da50,_0x339094)),{'skill':_0x577ac9,'scope':_0x42fc04,'dir':_0x8d0ae,'skillMdPath':_0x25d2f0,'metadataPath':_0xe83d9f,'contentHash':_0x544741,'changed':_0x5b3390!==_0x2507a7};}export function reuseMaterializedRuntimeSkill(_0x307747,_0x595097,_0x3981bd){const _0x3f48a4=a145_0x56c5,_0x15e25c=_0x307747[_0x3f48a4(0x19a)]?.[_0x3f48a4(0x188)]();if(!_0x15e25c)return undefined;const _0x3a8575=requireSkillCode(_0x307747),_0x58dd43=getRuntimeSkillDir(_0x3981bd[_0x3f48a4(0x1a0)],_0x3981bd[_0x3f48a4(0x1ad)],_0x3981bd[_0x3f48a4(0x1a4)],_0x595097,_0x3a8575,_0x3981bd[_0x3f48a4(0x185)]),_0x47cfd0=resolve(_0x58dd43,SKILL_FILE),_0x3ae9a3=resolve(_0x58dd43,METADATA_FILE),_0x274a72=readMetadataIfPresent(_0x3ae9a3);if(!_0x274a72||_0x274a72['schemaVersion']!==0x2||_0x274a72['appCode']!==_0x3981bd[_0x3f48a4(0x1a4)]||_0x274a72[_0x3f48a4(0x186)]!==_0x595097||_0x274a72[_0x3f48a4(0x1ab)]!==_0x3a8575||_0x274a72['version']!==_0x15e25c||_0x274a72['id']!==_0x307747['id']||_0x274a72[_0x3f48a4(0x17b)]!==_0x307747[_0x3f48a4(0x17b)]||_0x274a72['description']!==_0x307747[_0x3f48a4(0x17d)]||_0x274a72[_0x3f48a4(0x199)]!==_0x307747['example']||_0x274a72[_0x3f48a4(0x1a6)]!==_0x307747['status']||!_0x274a72[_0x3f48a4(0x187)]||!_0x274a72[_0x3f48a4(0x195)]||!Object[_0x3f48a4(0x1a2)](_0x274a72[_0x3f48a4(0x195)],SKILL_FILE))return undefined;for(const [_0x2bcc6d,_0x2fa846]of Object[_0x3f48a4(0x190)](_0x274a72[_0x3f48a4(0x195)])){if(!/^[a-f0-9]{64}$/['test'](_0x2fa846))return undefined;const _0x84c2bf=resolveManagedFilePath(_0x58dd43,_0x2bcc6d);if(!existsSync(_0x84c2bf)||!lstatSync(_0x84c2bf)[_0x3f48a4(0x180)]())return undefined;if(bufferSha256(readFileSync(_0x84c2bf))!==_0x2fa846)return undefined;}return{'skill':_0x307747,'scope':_0x595097,'dir':_0x58dd43,'skillMdPath':_0x47cfd0,'metadataPath':_0x3ae9a3,'contentHash':_0x274a72[_0x3f48a4(0x187)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x16728d,_0x3f21d3,_0x4b90e8){const _0x355a92=a145_0x56c5,_0x2c8601=skillDisplayName(_0x3f21d3,_0x4b90e8),_0x5aaf10=_0x3f21d3[_0x355a92(0x17d)]?.[_0x355a92(0x188)]()||_0x2c8601||_0x4b90e8;return normalizeLocalFiles(_0x16728d)['map'](_0x811543=>{const _0xf249a7=_0x355a92,_0x43c785=fileText(_0x811543);if(_0x811543['path']!==SKILL_FILE)return _0x811543;if(hasYamlFrontmatter(_0x43c785))return{'path':_0x811543[_0xf249a7(0x18a)],'content':withSyncedDisplayName(_0x43c785,_0x2c8601)};return{'path':_0x811543[_0xf249a7(0x18a)],'content':prependSkillFrontmatter(_0x43c785,{'name':_0x4b90e8,'displayName':_0x2c8601,'description':_0x5aaf10})};});}function hasYamlFrontmatter(_0x5f15e0){const _0x48a7ed=a145_0x56c5;return/^\uFEFF?---\s*\r?\n/[_0x48a7ed(0x1b2)](_0x5f15e0);}function prependSkillFrontmatter(_0x338d2c,_0x17529d){const _0x3f65c=a145_0x56c5,_0x741f34=_0x338d2c[_0x3f65c(0x193)](/^\uFEFF/,'');return[_0x3f65c(0x191),_0x3f65c(0x19d)+yamlString(_0x17529d[_0x3f65c(0x18b)]),_0x17529d['displayName']?_0x3f65c(0x17c)+yamlString(_0x17529d['displayName']):undefined,'description:\x20'+yamlString(_0x17529d[_0x3f65c(0x17d)]),_0x3f65c(0x191),'',_0x741f34]['filter'](_0x3efdbb=>_0x3efdbb!==undefined)['join']('\x0a');}function yamlString(_0x3d88ed){const _0xb159ec=a145_0x56c5;return JSON[_0xb159ec(0x181)](_0x3d88ed['replace'](/\r/g,'')[_0xb159ec(0x188)]());}function skillDisplayName(_0x4ef448,_0x3b0723){const _0x2452dc=a145_0x56c5,_0x5168e2=_0x4ef448[_0x2452dc(0x17b)]?.[_0x2452dc(0x188)]();return _0x5168e2||_0x3b0723;}function withSyncedDisplayName(_0x5adec1,_0x4d6a27){const _0x293d40=a145_0x56c5,_0x8ff034=_0x5adec1[_0x293d40(0x194)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x8ff034)return _0x5adec1;const _0x59b148=_0x8ff034[0x1]??'',_0xf85c8a=_0x8ff034[0x2]??'',_0x3c06be=parseDocument(_0xf85c8a);if(_0x3c06be[_0x293d40(0x1ac)][_0x293d40(0x18f)]>0x0||!isMap(_0x3c06be[_0x293d40(0x198)]))return _0x5adec1;if(_0x4d6a27)_0x3c06be['set'](_0x293d40(0x197),_0x4d6a27);else{if(_0x3c06be[_0x293d40(0x1b4)]('displayName'))_0x3c06be[_0x293d40(0x18c)](_0x293d40(0x197));else return _0x5adec1;}forceBlockCollections(_0x3c06be[_0x293d40(0x198)]);const _0x506b89=_0x3c06be[_0x293d40(0x1b0)]({'lineWidth':0x0})[_0x293d40(0x183)](),_0x3b25dd=_0x5adec1[_0x293d40(0x17f)](_0x8ff034[0x0][_0x293d40(0x18f)])['replace'](/^\r?\n/,'');return _0x59b148+_0x293d40(0x1b1)+_0x506b89+'\x0a---\x0a\x0a'+_0x3b25dd;}function forceBlockCollections(_0x57dbbf){if(!isNode(_0x57dbbf))return;visit(_0x57dbbf,(_0x5c347f,_0xaa246c)=>{const _0x12a8d8=a145_0x56c5;isCollection(_0xaa246c)&&(_0xaa246c[_0x12a8d8(0x18d)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1a6d4e,_0x127378,_0x22897e,_0x3a2ae6){const _0x23375b=a145_0x56c5;if(_0x3a2ae6||!existsSync(_0x127378))return;const _0x248af5=readMetadataIfPresent(_0x127378);if(!_0x248af5)return;const _0x20adcd=_0x248af5[_0x23375b(0x195)]&&Object[_0x23375b(0x1aa)](_0x248af5[_0x23375b(0x195)])[_0x23375b(0x18f)]>0x0?_0x248af5['fileHashes']:undefined;if(_0x20adcd)for(const [_0x49f163,_0x16a3b7]of Object[_0x23375b(0x190)](_0x20adcd)){const _0x1047f4=resolveManagedFilePath(_0x1a6d4e,_0x49f163);if(!existsSync(_0x1047f4))throw CliErrors[_0x23375b(0x19b)](_0x23375b(0x184)+_0x1a6d4e,_0x23375b(0x1ae)+_0x49f163);const _0x245d23=lstatSync(_0x1047f4);if(!_0x245d23[_0x23375b(0x180)]())throw CliErrors[_0x23375b(0x19b)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1a6d4e,_0x23375b(0x189)+_0x49f163);const _0x1e1773=bufferSha256(readFileSync(_0x1047f4));if(_0x1e1773!==_0x16a3b7)throw CliErrors['validation'](_0x23375b(0x184)+_0x1a6d4e+_0x23375b(0x19f)+_0x49f163,_0x23375b(0x1b3)+_0x49f163);}else{const _0x5d9610=resolve(_0x1a6d4e,SKILL_FILE);if(existsSync(_0x5d9610)&&_0x248af5[_0x23375b(0x187)]){const _0xe88e9e=contentHash(readFileSync(_0x5d9610,_0x23375b(0x1af)));if(_0xe88e9e!==_0x248af5['contentHash'])throw CliErrors[_0x23375b(0x19b)](_0x23375b(0x17e)+_0x5d9610,_0x23375b(0x19c));}}for(const _0x3863a7 of normalizeLocalFiles(_0x22897e)){if(_0x20adcd?.[_0x3863a7['path']])continue;if(!_0x20adcd&&_0x3863a7[_0x23375b(0x18a)]===SKILL_FILE)continue;const _0x274962=resolveManagedFilePath(_0x1a6d4e,_0x3863a7[_0x23375b(0x18a)]);if(!existsSync(_0x274962))continue;const _0x419145=lstatSync(_0x274962);if(!_0x419145['isFile']())throw CliErrors[_0x23375b(0x19b)](_0x23375b(0x184)+_0x1a6d4e,_0x23375b(0x182)+_0x3863a7[_0x23375b(0x18a)]);const _0x5a6d38=bufferSha256(readFileSync(_0x274962));if(_0x5a6d38!==fileHash(_0x3863a7))throw CliErrors[_0x23375b(0x19b)](_0x23375b(0x184)+_0x1a6d4e,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3863a7[_0x23375b(0x18a)]);}}function materializeFiles(_0x2d7434,_0x16143e){const _0x393c06=a145_0x56c5;for(const _0x438517 of normalizeLocalFiles(_0x16143e)){const _0x200e25=resolveManagedFilePath(_0x2d7434,_0x438517[_0x393c06(0x18a)]);mkdirSync(dirname(_0x200e25),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x200e25,fileContent(_0x438517),0x180);}}function removeStaleManagedFiles(_0x4d5390,_0x4150c0,_0x1e337c){const _0x1d4b12=a145_0x56c5;if(!_0x4150c0)return;const _0x4a8e84=new Set(normalizeLocalFiles(_0x1e337c)['map'](_0x33b518=>_0x33b518['path']));for(const _0x17883d of Object[_0x1d4b12(0x1aa)](_0x4150c0)){if(_0x4a8e84[_0x1d4b12(0x1b4)](_0x17883d))continue;const _0x362695=resolveManagedFilePath(_0x4d5390,_0x17883d);existsSync(_0x362695)&&lstatSync(_0x362695)[_0x1d4b12(0x180)]()&&rmSync(_0x362695,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a146_0xf439(_0x1e5a43,_0x23990d){_0x1e5a43=_0x1e5a43-0x106;const _0x478ad4=a146_0x478a();let _0xf4399a=_0x478ad4[_0x1e5a43];return _0xf4399a;}(function(_0x253ca5,_0x4aebad){const _0x10f6a2=a146_0xf439,_0x1bbca9=_0x253ca5();while(!![]){try{const _0x166ff7=-parseInt(_0x10f6a2(0x109))/0x1+-parseInt(_0x10f6a2(0x120))/0x2+-parseInt(_0x10f6a2(0x11a))/0x3*(parseInt(_0x10f6a2(0x10f))/0x4)+-parseInt(_0x10f6a2(0x11c))/0x5+parseInt(_0x10f6a2(0x11d))/0x6+parseInt(_0x10f6a2(0x10c))/0x7+parseInt(_0x10f6a2(0x108))/0x8;if(_0x166ff7===_0x4aebad)break;else _0x1bbca9['push'](_0x1bbca9['shift']());}catch(_0x46361c){_0x1bbca9['push'](_0x1bbca9['shift']());}}}(a146_0x478a,0xb76c7));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x58c43a,_0x40342b,_0x5c763d,_0x118a81,_0x3fbf55,_0x511409,_0xfd1cde){const _0x266ec3=a146_0xf439,_0x282a4f=_0x511409?normalizeLocalFiles(_0x511409):[],_0x2a2f72=!_0xfd1cde&&_0x282a4f[_0x266ec3(0x121)]>0x0?buildSkillPackage(_0x282a4f):undefined,_0x2947f6=_0xfd1cde?bufferSha256(_0xfd1cde):_0x2a2f72?.[_0x266ec3(0x11b)][_0x266ec3(0x111)],_0x3a18ae=_0xfd1cde?.['length']??_0x2a2f72?.[_0x266ec3(0x11b)][_0x266ec3(0x11e)],_0x126762=_0x282a4f['length']>0x0?Object[_0x266ec3(0x112)](_0x282a4f[_0x266ec3(0x10e)](_0x1160f9=>[_0x1160f9[_0x266ec3(0x115)],fileHash(_0x1160f9)])):undefined;return{'schemaVersion':_0x282a4f[_0x266ec3(0x121)]>0x0?0x2:0x1,'id':_0x58c43a['id'],'appCode':_0x5c763d,'skillCode':requireSkillCode(_0x58c43a),'skillName':_0x58c43a['skillName'],'description':_0x58c43a['description'],'example':_0x58c43a['example'],'scope':_0x40342b,'readonly':_0x40342b!==_0x266ec3(0x110)||_0x58c43a[_0x266ec3(0x122)]===!![],'tenantCode':_0x58c43a[_0x266ec3(0x116)],'userId':_0x58c43a[_0x266ec3(0x125)],'version':_0x58c43a[_0x266ec3(0x106)],'status':_0x58c43a['status'],'tags':Array[_0x266ec3(0x119)](_0x58c43a[_0x266ec3(0x114)])?_0x58c43a[_0x266ec3(0x114)]:[],'hasUpstreamUpdate':_0x58c43a['hasUpstreamUpdate'],'forkedFromSkillId':_0x58c43a['forkedFromSkillId'],'forkedFromVersion':_0x58c43a[_0x266ec3(0x118)],'sourceSessionId':_0x58c43a['sourceSessionId'],'contentHash':_0x118a81,'fileHashes':_0x126762,'treeHash':_0x282a4f[_0x266ec3(0x121)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x282a4f)):undefined,'ossPath':remoteManifestOssPath(_0x58c43a[_0x266ec3(0x10b)]),'zipSha256':_0x2947f6,'zipSize':_0x3a18ae,'files':_0x282a4f[_0x266ec3(0x121)]>0x0?_0x282a4f[_0x266ec3(0x10e)](_0x25bec4=>({'path':_0x25bec4[_0x266ec3(0x115)],'hash':fileHash(_0x25bec4),'size':fileContent(_0x25bec4)[_0x266ec3(0x121)]})):undefined,'pulledAt':_0x3fbf55??new Date()['toISOString']()};}export function requireSkillCode(_0x531d71){const _0x468e68=a146_0xf439,_0xa25071=_0x531d71[_0x468e68(0x123)]?.[_0x468e68(0x107)]();if(!_0xa25071)throw CliErrors[_0x468e68(0x113)](_0x468e68(0x10a));return _0xa25071;}export function readMetadataIfPresent(_0x3266b7){const _0x503a4a=a146_0xf439;if(!existsSync(_0x3266b7))return undefined;try{const _0x5cd3db=JSON[_0x503a4a(0x10d)](readFileSync(_0x3266b7,_0x503a4a(0x117)));return _0x5cd3db;}catch{throw CliErrors[_0x503a4a(0x113)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x3266b7);}}function remoteManifestOssPath(_0x601ac5){const _0x28d3e1=a146_0xf439;if(!_0x601ac5||typeof _0x601ac5!==_0x28d3e1(0x124)||Array[_0x28d3e1(0x119)](_0x601ac5))return undefined;const _0x19c517=_0x601ac5['ossPath'];return typeof _0x19c517===_0x28d3e1(0x11f)&&_0x19c517['trim']()?_0x19c517[_0x28d3e1(0x107)]():undefined;}function a146_0x478a(){const _0x1bef64=['tags','path','tenantCode','utf8','forkedFromVersion','isArray','3eqOMVJ','manifest','5245215KASaPn','8906154QIMYRq','zipSize','string','241478OtcpuD','length','readonly','skillCode','object','userId','version','trim','16120504juQnqC','1238106tsVCjQ','Runtime\x20Skill\x20is\x20missing\x20skillCode.','files','4005064UhjXiT','parse','map','3649532Ivvdhd','personal','zipSha256','fromEntries','validation'];a146_0x478a=function(){return _0x1bef64;};return a146_0x478a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x3972b4=a147_0x2569;(function(_0x533924,_0x4686d3){const _0x18d2bf=a147_0x2569,_0x49c90f=_0x533924();while(!![]){try{const _0x5b376b=-parseInt(_0x18d2bf(0x149))/0x1*(-parseInt(_0x18d2bf(0x13e))/0x2)+-parseInt(_0x18d2bf(0x135))/0x3*(parseInt(_0x18d2bf(0x14a))/0x4)+parseInt(_0x18d2bf(0x12f))/0x5+-parseInt(_0x18d2bf(0x12d))/0x6*(parseInt(_0x18d2bf(0x142))/0x7)+parseInt(_0x18d2bf(0x130))/0x8*(-parseInt(_0x18d2bf(0x132))/0x9)+parseInt(_0x18d2bf(0x13d))/0xa+-parseInt(_0x18d2bf(0x134))/0xb*(-parseInt(_0x18d2bf(0x13c))/0xc);if(_0x5b376b===_0x4686d3)break;else _0x49c90f['push'](_0x49c90f['shift']());}catch(_0x356027){_0x49c90f['push'](_0x49c90f['shift']());}}}(a147_0x11aa,0x4ad7b));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x28ee46={}){const _0x49bc98=a147_0x2569,_0x51bce4=_0x28ee46[_0x49bc98(0x144)]??homedir(),_0x547b86=resolve(_0x51bce4,PRODUCT_CONFIG[_0x49bc98(0x143)],_0x49bc98(0x146)),_0x4b786e=trimmedEnv('SKILL_ROOT'),_0x1b0b69=trimmedEnv(_0x49bc98(0x140)),_0xcd3326=resolve(_0x51bce4,'.workbuddy'),_0x12d2c6=_0x28ee46[_0x49bc98(0x145)]??(existsSync(_0xcd3326)?resolve(_0xcd3326,_0x49bc98(0x13a)):undefined);return{'homeDir':_0x51bce4,'cacheRoot':_0x547b86,'managedRoot':resolve(_0x51bce4,PRODUCT_CONFIG[_0x49bc98(0x143)]),'agentsSkillsDir':_0x28ee46['agentsSkillsDir']??_0x4b786e??resolve(_0x51bce4,_0x49bc98(0x13f),_0x49bc98(0x13a)),'claudeSkillsDir':_0x28ee46[_0x49bc98(0x138)]??_0x1b0b69??resolve(_0x51bce4,_0x49bc98(0x13b),_0x49bc98(0x13a)),'workbuddySkillsDir':_0x12d2c6};}export function runtimeAgentSkillRoots(_0x5da661){const _0x1c914d=a147_0x2569;return[_0x5da661[_0x1c914d(0x12e)],_0x5da661['claudeSkillsDir'],_0x5da661['workbuddySkillsDir']][_0x1c914d(0x147)](_0x4b4f46=>Boolean(_0x4b4f46));}export function getRuntimeSkillCacheRoot(_0x3cc709,_0x47c6cc,_0x4a41fc={}){const _0x34212e=a147_0x2569,_0x2bc7f4=resolveSkillSyncPaths(_0x4a41fc);return resolve(_0x2bc7f4['cacheRoot'],_0x3cc709,fingerprintAccessKey(_0x47c6cc),_0x34212e(0x13a));}export function getRuntimeSkillDir(_0x269c06,_0x5b7360,_0x21b355,_0x3e1cca,_0xe5e254,_0x2d7889={}){const _0x268fa6=a147_0x2569;return resolve(getRuntimeSkillCacheRoot(_0x269c06,_0x5b7360,_0x2d7889),safePathSegment(_0x21b355,_0x268fa6(0x137)),_0x3e1cca,safePathSegment(_0xe5e254,_0x268fa6(0x141)));}export function safePathSegment(_0x335cb8,_0x156ca4=a147_0x3972b4(0x136)){const _0x1fdf41=a147_0x3972b4;if(!_0x335cb8||_0x335cb8[_0x1fdf41(0x14b)]('/')||_0x335cb8['includes']('\x5c')||_0x335cb8[_0x1fdf41(0x14b)]('..'))throw CliErrors[_0x1fdf41(0x133)](_0x1fdf41(0x139)+_0x156ca4+_0x1fdf41(0x131)+_0x335cb8);return _0x335cb8;}function a147_0x11aa(){const _0x4247bc=['579400JIuWlT','1335736vsFhtp','\x20for\x20local\x20path:\x20','27yPRfHt','validation','671429YIdziy','833133sijGwq','path\x20segment','appCode','claudeSkillsDir','Unsafe\x20','skills','.claude','264noERrf','2911100sBVeDb','42mXFWeN','.agents','CLAUDE_SKILL_ROOT','skillCode','21zRAtQl','homeDirName','homeDir','workbuddySkillsDir','cache','filter','trim','599rvYiAC','8QjBKBq','includes','799098ovYdzq','agentsSkillsDir'];a147_0x11aa=function(){return _0x4247bc;};return a147_0x11aa();}function a147_0x2569(_0x16893c,_0x39ea9f){_0x16893c=_0x16893c-0x12d;const _0x11aad7=a147_0x11aa();let _0x25699b=_0x11aad7[_0x16893c];return _0x25699b;}function trimmedEnv(_0xaaaf6a){const _0x597ba2=a147_0x3972b4,_0x1478fa=productEnv(_0xaaaf6a)?.[_0x597ba2(0x148)]();return _0x1478fa?_0x1478fa:undefined;}
|