@lovrabet/lovrabet-cli 2.2.2-beta.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/raw-flags.js +1 -1
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.js +1 -1
  99. package/lib/generated/build-info.d.ts +4 -4
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/postinstall.js +1 -1
  103. package/lib/runtime/confirmation.js +1 -1
  104. package/lib/runtime/event.js +1 -1
  105. package/lib/runtime/index.js +1 -1
  106. package/lib/runtime/queue.js +1 -1
  107. package/lib/runtime/resolve.js +1 -1
  108. package/lib/skills/builtin-skill.js +1 -1
  109. package/lib/skills/npx-skills-add.js +1 -1
  110. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  111. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  112. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  113. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  114. package/lib/skills/runtime-skill-sync/links.js +1 -1
  115. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  116. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  117. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  118. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  119. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  120. package/lib/skills/runtime-skill-sync/push.js +1 -1
  121. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  122. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  123. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  124. package/lib/skills/runtime-skill-sync.js +1 -1
  125. package/lib/skills/skill-presence.js +1 -1
  126. package/lib/utils/apply-jq-filter.js +1 -1
  127. package/lib/utils/logger.js +1 -1
  128. package/lib/utils/lossless-json.js +1 -1
  129. package/lib/utils/params.js +1 -1
  130. package/lib/utils/platform.js +1 -1
  131. package/lib/utils/update-notice.js +1 -1
  132. package/lib/utils/version.js +1 -1
  133. package/lib/utils/write-cli-side-channel.js +1 -1
  134. package/package.json +1 -1
  135. package/skills/lovrabet/SKILL.md +1 -1
  136. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a113_0x156759=a113_0x3ddf;(function(_0xfbe5d9,_0x14ed81){const _0x2ee251=a113_0x3ddf,_0x1ec904=_0xfbe5d9();while(!![]){try{const _0x4369f2=-parseInt(_0x2ee251(0x177))/0x1*(parseInt(_0x2ee251(0x17a))/0x2)+-parseInt(_0x2ee251(0x157))/0x3*(parseInt(_0x2ee251(0x153))/0x4)+-parseInt(_0x2ee251(0x15c))/0x5+-parseInt(_0x2ee251(0x18d))/0x6*(-parseInt(_0x2ee251(0x160))/0x7)+parseInt(_0x2ee251(0x188))/0x8*(parseInt(_0x2ee251(0x181))/0x9)+parseInt(_0x2ee251(0x16c))/0xa*(-parseInt(_0x2ee251(0x186))/0xb)+parseInt(_0x2ee251(0x159))/0xc;if(_0x4369f2===_0x14ed81)break;else _0x1ec904['push'](_0x1ec904['shift']());}catch(_0x7017a5){_0x1ec904['push'](_0x1ec904['shift']());}}}(a113_0x3f31,0x2bad4));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a113_0x16516e 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}=a113_0x16516e,RESERVED_PROJECT_SKILL_CODES=new Set([a113_0x156759(0x166),a113_0x156759(0x18e),'secret-retriever']);function a113_0x3ddf(_0xd7afdc,_0x419a38){_0xd7afdc=_0xd7afdc-0x153;const _0x3f31ef=a113_0x3f31();let _0x3ddfff=_0x3f31ef[_0xd7afdc];return _0x3ddfff;}export function linkEffectiveRuntimeSkills(_0x4fca2f,_0x176788){const _0xf9f166=a113_0x156759,_0x4bde84=new Map();for(const _0x152a19 of _0x4fca2f){const _0x4d6dbe=_0x152a19[_0xf9f166(0x17c)][_0xf9f166(0x172)];if(!_0x4d6dbe)continue;const _0x48b277=_0x4bde84['get'](_0x4d6dbe);(!_0x48b277||_0x152a19[_0xf9f166(0x16e)]===_0xf9f166(0x183))&&_0x4bde84['set'](_0x4d6dbe,_0x152a19);}const _0x38f72b=[];for(const _0x38ce3d of _0x4bde84['values']()){const _0x117366=requireSkillCode(_0x38ce3d[_0xf9f166(0x17c)]),_0x3286cf=readMetadataIfPresent(_0x38ce3d[_0xf9f166(0x18f)]);if(_0x3286cf?.[_0xf9f166(0x16f)]!==_0x176788[_0xf9f166(0x16f)]||_0x3286cf['skillCode']!==_0x117366)throw CliErrors[_0xf9f166(0x18b)](_0xf9f166(0x15f)+_0x176788['appCode']+':\x20'+_0x38ce3d[_0xf9f166(0x18f)]);const _0x1f71e1=runtimeSkillLinkName(_0x176788,_0x117366);for(const _0x1b3c78 of _0x176788[_0xf9f166(0x18c)]){_0x38f72b[_0xf9f166(0x17e)](ensureManagedSymlink(resolve(_0x1b3c78,_0x1f71e1),_0x38ce3d[_0xf9f166(0x15e)],_0x176788,_0x117366));}}return _0x38f72b;}export function pruneStaleRuntimeSkillLinks(_0x4d7a1c,_0x3051a0,_0x5d8951){const _0x257a14=a113_0x156759,_0x49716d=new Set([..._0x3051a0][_0x257a14(0x155)](_0x332bec=>_0x332bec[_0x257a14(0x164)]())[_0x257a14(0x176)](Boolean)),_0xc221e3=_0x5d8951?new Set([..._0x5d8951][_0x257a14(0x155)](_0x263718=>_0x263718[_0x257a14(0x164)]())[_0x257a14(0x176)](Boolean)):undefined,_0x1acbc2=[];for(const _0x3b6c69 of _0x4d7a1c[_0x257a14(0x18c)]){for(const _0x20b39b of managedTargetSkillLinkPaths(_0x3b6c69,_0x4d7a1c)){const _0x2eabf1=runtimeSkillCodeFromLink(_0x4d7a1c,_0x20b39b);if(_0xc221e3&&!_0xc221e3[_0x257a14(0x171)](_0x2eabf1))continue;if(_0x49716d[_0x257a14(0x171)](_0x2eabf1))continue;_0x1acbc2[_0x257a14(0x17e)](removeManagedSkillLink(_0x20b39b,_0x4d7a1c,_0x2eabf1));}}return _0x1acbc2;}export function pruneStaleRuntimeSkillCache(_0x47ca00,_0x19cf01={}){const _0x2953d4=a113_0x156759,_0x3ee2ec=new Set([..._0x47ca00[_0x2953d4(0x173)]]['map'](_0x1bb410=>_0x1bb410[_0x2953d4(0x164)]())[_0x2953d4(0x176)](Boolean)),_0x337ac2=_0x47ca00['pruneSkillCodes']?new Set([..._0x47ca00[_0x2953d4(0x16d)]][_0x2953d4(0x155)](_0xbd041c=>_0xbd041c[_0x2953d4(0x164)]())[_0x2953d4(0x176)](Boolean)):undefined,_0x4468c1=_0x47ca00[_0x2953d4(0x15d)]??[_0x2953d4(0x183),_0x2953d4(0x184)],_0x1845d3=resolve(getRuntimeSkillCacheRoot(_0x47ca00['env'],_0x47ca00[_0x2953d4(0x16b)],_0x19cf01),safePathSegment(_0x47ca00[_0x2953d4(0x16f)],_0x2953d4(0x16f))),_0x449462=[];for(const _0x433634 of _0x4468c1){const _0xb0458=resolve(_0x1845d3,_0x433634);if(!existsSync(_0xb0458))continue;for(const _0x4a1ac7 of readdirSync(_0xb0458,{'withFileTypes':!![]})){if(!_0x4a1ac7[_0x2953d4(0x15a)]())continue;const _0x3afddc=_0x4a1ac7[_0x2953d4(0x189)];if(_0x337ac2&&!_0x337ac2[_0x2953d4(0x171)](_0x3afddc))continue;if(_0x3ee2ec[_0x2953d4(0x171)](_0x3afddc))continue;const _0x231aab=resolve(_0xb0458,_0x3afddc),_0xbb942c=readMetadataIfPresent(resolve(_0x231aab,METADATA_FILE));if(_0xbb942c?.[_0x2953d4(0x16f)]!==_0x47ca00['appCode']||_0xbb942c['scope']!==_0x433634||_0xbb942c[_0x2953d4(0x172)]!==_0x3afddc){_0x449462[_0x2953d4(0x17e)]({'path':_0x231aab,'action':_0x2953d4(0x167),'reason':_0x2953d4(0x174)});continue;}if(isLinkedFromAnyRoot(_0x231aab,_0x47ca00[_0x2953d4(0x15b)]??[])){_0x449462['push']({'path':_0x231aab,'action':_0x2953d4(0x167),'reason':_0x2953d4(0x182)});continue;}removeSync(_0x231aab),_0x449462[_0x2953d4(0x17e)]({'path':_0x231aab,'action':_0x2953d4(0x178)});}}return _0x449462;}export function linkGlobalRuntimeSkills(_0x39988d,_0x76203={}){const _0x1aa68f=a113_0x156759,_0x4a4d0d=resolveSkillSyncPaths(_0x76203),_0x49c298=[];for(const _0xfb642c of _0x39988d){if(_0xfb642c[_0x1aa68f(0x16e)]!==_0x1aa68f(0x156))throw CliErrors[_0x1aa68f(0x18b)](_0x1aa68f(0x170)+_0xfb642c['scope']);const _0x484201=requireSkillCode(_0xfb642c[_0x1aa68f(0x17c)]),_0x46ff24=copyManagedSkillDirectory(_0xfb642c[_0x1aa68f(0x15e)],resolve(_0x4a4d0d[_0x1aa68f(0x179)],_0x484201));_0x49c298[_0x1aa68f(0x17e)]({..._0x46ff24,'contentHash':_0xfb642c[_0x1aa68f(0x161)]});}return _0x49c298;}function ensureManagedSymlink(_0x3ca521,_0x338f64,_0xd9803e,_0x5a3d7b){const _0x490b22=a113_0x156759;mkdirSync(dirname(_0x3ca521),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3ca521)||isDanglingSymlink(_0x3ca521)){const _0x480058=lstatSync(_0x3ca521);if(!_0x480058[_0x490b22(0x16a)]())throw CliErrors[_0x490b22(0x18b)](_0x490b22(0x162)+_0x3ca521);const _0x3a38a8=resolveSymlinkTarget(_0x3ca521);if(!isPathInside(realOrResolved(_0x3a38a8),realOrResolved(_0xd9803e[_0x490b22(0x158)])))throw CliErrors[_0x490b22(0x18b)](_0x490b22(0x17d)+_0x3ca521);if(realOrResolved(_0x3a38a8)===realOrResolved(_0x338f64))return{'path':_0x3ca521,'target':_0x338f64,'action':_0x490b22(0x180)};const _0x27f128=readMetadataIfPresent(resolve(_0x3a38a8,METADATA_FILE));if(_0xd9803e['scope']===_0x490b22(0x168)&&(_0x27f128?.['appCode']!==_0xd9803e[_0x490b22(0x16f)]||_0x27f128[_0x490b22(0x172)]!==_0x5a3d7b))throw CliErrors['validation'](_0x490b22(0x17f)+_0x3ca521);return unlinkSync(_0x3ca521),symlinkSync(_0x338f64,_0x3ca521,_0x490b22(0x15e)),{'path':_0x3ca521,'target':_0x338f64,'action':_0x490b22(0x175)};}return symlinkSync(_0x338f64,_0x3ca521,_0x490b22(0x15e)),{'path':_0x3ca521,'target':_0x338f64,'action':_0x490b22(0x165)};}function managedTargetSkillLinkPaths(_0x3d4fe6,_0x5789f6){const _0x57f016=a113_0x156759;if(!existsSync(_0x3d4fe6))return[];const _0xa811d6=_0x5789f6[_0x57f016(0x16f)]+'--';return readdirSync(_0x3d4fe6,{'withFileTypes':!![]})['filter'](_0x151481=>_0x5789f6[_0x57f016(0x16e)]===_0x57f016(0x168)||_0x151481[_0x57f016(0x189)][_0x57f016(0x18a)](_0xa811d6))[_0x57f016(0x155)](_0x242499=>resolve(_0x3d4fe6,_0x242499[_0x57f016(0x189)]));}function removeManagedSkillLink(_0x316ad2,_0x1dc371,_0x221ac4){const _0x3d29ab=a113_0x156759,_0x58f489=lstatIfPresent(_0x316ad2);if(!_0x58f489?.['isSymbolicLink']())return{'path':_0x316ad2,'action':'skipped','reason':_0x3d29ab(0x187)};const _0xf2ca90=resolveSymlinkTarget(_0x316ad2);if(!isPathInside(realOrResolved(_0xf2ca90),realOrResolved(_0x1dc371[_0x3d29ab(0x158)])))return{'path':_0x316ad2,'action':_0x3d29ab(0x167),'reason':'external-symlink'};const _0x3b5928=readMetadataIfPresent(resolve(_0xf2ca90,METADATA_FILE));if(_0x1dc371['scope']===_0x3d29ab(0x168)&&(_0x3b5928?.[_0x3d29ab(0x16f)]!==_0x1dc371[_0x3d29ab(0x16f)]||_0x3b5928[_0x3d29ab(0x172)]!==_0x221ac4))return{'path':_0x316ad2,'action':_0x3d29ab(0x167),'reason':_0x3d29ab(0x174)};return unlinkSync(_0x316ad2),{'path':_0x316ad2,'action':_0x3d29ab(0x178)};}function isLinkedFromAnyRoot(_0x33ecef,_0x46a021){const _0x1fded8=a113_0x156759,_0x20939e=realOrResolved(_0x33ecef);for(const _0x57d543 of _0x46a021){if(!existsSync(_0x57d543))continue;for(const _0x384373 of readdirSync(_0x57d543,{'withFileTypes':!![]})){if(!_0x384373[_0x1fded8(0x16a)]())continue;const _0x33bbb3=resolve(_0x57d543,_0x384373[_0x1fded8(0x189)]);if(realOrResolved(resolveSymlinkTarget(_0x33bbb3))===_0x20939e)return!![];}}return![];}function runtimeSkillLinkName(_0xe29e26,_0x2ff960){const _0x51ad21=a113_0x156759,_0x323e24=safePathSegment(_0x2ff960,_0x51ad21(0x172));if(_0xe29e26[_0x51ad21(0x16e)]===_0x51ad21(0x168)&&RESERVED_PROJECT_SKILL_CODES[_0x51ad21(0x171)](_0x323e24))throw CliErrors[_0x51ad21(0x18b)](_0x51ad21(0x154)+_0x323e24);return _0xe29e26[_0x51ad21(0x16e)]===_0x51ad21(0x168)?_0x323e24:_0xe29e26[_0x51ad21(0x16f)]+'--'+_0x323e24;}function a113_0x3f31(){const _0x232d85=['scopes','dir','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','33593tyfBNi','contentHash','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','slice','trim','created','lovrabet','skipped','project','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','isSymbolicLink','accessKey','517660bKPFXM','pruneSkillCodes','scope','appCode','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','has','skillCode','activeSkillCodes','metadata-mismatch','updated','filter','37261PSkaHf','removed','agentsSkillsDir','14MWyfIR','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skill','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','push','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','unchanged','1593jmByLX','linked-from-protected-root','personal','company','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','22DBhrKI','not-managed-symlink','7256mdLDPr','name','startsWith','validation','skillRoots','192JoTeWO','runtime-observe','metadataPath','176HQIMYS','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','map','builtin','9123yBjqVI','managedRoot','5181144BRZLmM','isDirectory','protectedLinkRoots','344030wkPmEr'];a113_0x3f31=function(){return _0x232d85;};return a113_0x3f31();}function runtimeSkillCodeFromLink(_0x36c452,_0x579141){const _0x3e8c59=a113_0x156759,_0x1fb817=basename(_0x579141);return _0x36c452['scope']==='project'?_0x1fb817:_0x1fb817[_0x3e8c59(0x163)]((_0x36c452[_0x3e8c59(0x16f)]+'--')['length']);}export function copyManagedSkillDirectory(_0x1faec1,_0x3f295e){const _0x19732c=a113_0x156759,_0x44be20=resolve(_0x3f295e,METADATA_FILE),_0x10f5e5=existsSync(_0x3f295e);if(_0x10f5e5){const _0x2b0d26=lstatSync(_0x3f295e);if(_0x2b0d26['isSymbolicLink']())throw CliErrors[_0x19732c(0x18b)](_0x19732c(0x169)+_0x3f295e);if(!_0x2b0d26[_0x19732c(0x15a)]())throw CliErrors[_0x19732c(0x18b)](_0x19732c(0x17b)+_0x3f295e);const _0x2505d3=readMetadataIfPresent(_0x44be20);if(_0x2505d3?.[_0x19732c(0x16e)]!==_0x19732c(0x156))throw CliErrors[_0x19732c(0x18b)](_0x19732c(0x185)+_0x3f295e);}ensureDirSync(dirname(_0x3f295e));const _0x18331a=_0x10f5e5?readMetadataIfPresent(_0x44be20)?.[_0x19732c(0x161)]:undefined,_0xb7320a=readMetadataIfPresent(resolve(_0x1faec1,METADATA_FILE))?.[_0x19732c(0x161)];return _0x10f5e5&&removeSync(_0x3f295e),copySkillDirectory(_0x1faec1,_0x3f295e),{'path':_0x3f295e,'target':_0x1faec1,'action':!_0x10f5e5?_0x19732c(0x165):_0x18331a===_0xb7320a?_0x19732c(0x180):_0x19732c(0x175)};}function copySkillDirectory(_0x1b0aff,_0x5cca2c){copySync(_0x1b0aff,_0x5cca2c,{'dereference':![],'overwrite':!![],'filter'(_0x12299a){const _0x186341=a113_0x3ddf;if(lstatSync(_0x12299a)[_0x186341(0x16a)]())throw CliErrors[_0x186341(0x18b)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x12299a);return!![];}});}
1
+ const a113_0x4ede75=a113_0x5736;(function(_0x245037,_0x155165){const _0x4f9290=a113_0x5736,_0x5b66e3=_0x245037();while(!![]){try{const _0x65fdd4=-parseInt(_0x4f9290(0x17a))/0x1*(-parseInt(_0x4f9290(0x153))/0x2)+-parseInt(_0x4f9290(0x17e))/0x3+parseInt(_0x4f9290(0x160))/0x4+-parseInt(_0x4f9290(0x16d))/0x5*(parseInt(_0x4f9290(0x183))/0x6)+-parseInt(_0x4f9290(0x154))/0x7*(-parseInt(_0x4f9290(0x162))/0x8)+parseInt(_0x4f9290(0x181))/0x9+-parseInt(_0x4f9290(0x165))/0xa*(parseInt(_0x4f9290(0x159))/0xb);if(_0x65fdd4===_0x155165)break;else _0x5b66e3['push'](_0x5b66e3['shift']());}catch(_0x37f3ed){_0x5b66e3['push'](_0x5b66e3['shift']());}}}(a113_0x1916,0xab733));function a113_0x5736(_0x4c6460,_0x4489f1){_0x4c6460=_0x4c6460-0x14d;const _0x1916d3=a113_0x1916();let _0x57364f=_0x1916d3[_0x4c6460];return _0x57364f;}import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a113_0x1e5bbf 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}=a113_0x1e5bbf,RESERVED_PROJECT_SKILL_CODES=new Set([a113_0x4ede75(0x16e),a113_0x4ede75(0x14f),a113_0x4ede75(0x155)]);export function linkEffectiveRuntimeSkills(_0x35b46e,_0xefccf0){const _0x1b79c7=a113_0x4ede75,_0x50d474=new Map();for(const _0x477869 of _0x35b46e){const _0x48f8dc=_0x477869[_0x1b79c7(0x158)][_0x1b79c7(0x187)];if(!_0x48f8dc)continue;const _0x37beee=_0x50d474[_0x1b79c7(0x166)](_0x48f8dc);(!_0x37beee||_0x477869[_0x1b79c7(0x189)]===_0x1b79c7(0x167))&&_0x50d474[_0x1b79c7(0x180)](_0x48f8dc,_0x477869);}const _0x3e35b5=[];for(const _0xa7c20c of _0x50d474[_0x1b79c7(0x14d)]()){const _0x10deb2=requireSkillCode(_0xa7c20c['skill']),_0x473231=readMetadataIfPresent(_0xa7c20c[_0x1b79c7(0x15b)]);if(_0x473231?.[_0x1b79c7(0x186)]!==_0xefccf0['appCode']||_0x473231[_0x1b79c7(0x187)]!==_0x10deb2)throw CliErrors[_0x1b79c7(0x17c)](_0x1b79c7(0x178)+_0xefccf0[_0x1b79c7(0x186)]+':\x20'+_0xa7c20c[_0x1b79c7(0x15b)]);const _0x53659f=runtimeSkillLinkName(_0xefccf0,_0x10deb2);for(const _0x4509c6 of _0xefccf0[_0x1b79c7(0x161)]){_0x3e35b5['push'](ensureManagedSymlink(resolve(_0x4509c6,_0x53659f),_0xa7c20c[_0x1b79c7(0x14e)],_0xefccf0,_0x10deb2));}}return _0x3e35b5;}export function pruneStaleRuntimeSkillLinks(_0x55fc72,_0x4e6fcf,_0x3d1441){const _0xf85bcc=a113_0x4ede75,_0x2666d0=new Set([..._0x4e6fcf][_0xf85bcc(0x15c)](_0x5e0663=>_0x5e0663[_0xf85bcc(0x176)]())[_0xf85bcc(0x172)](Boolean)),_0x5021c3=_0x3d1441?new Set([..._0x3d1441]['map'](_0x1cd6f1=>_0x1cd6f1[_0xf85bcc(0x176)]())[_0xf85bcc(0x172)](Boolean)):undefined,_0x463a93=[];for(const _0x47cf27 of _0x55fc72[_0xf85bcc(0x161)]){for(const _0x49b49c of managedTargetSkillLinkPaths(_0x47cf27,_0x55fc72)){const _0x5bfa70=runtimeSkillCodeFromLink(_0x55fc72,_0x49b49c);if(_0x5021c3&&!_0x5021c3[_0xf85bcc(0x16b)](_0x5bfa70))continue;if(_0x2666d0[_0xf85bcc(0x16b)](_0x5bfa70))continue;_0x463a93['push'](removeManagedSkillLink(_0x49b49c,_0x55fc72,_0x5bfa70));}}return _0x463a93;}export function pruneStaleRuntimeSkillCache(_0x20b8d6,_0x5bcbb6={}){const _0x45d14d=a113_0x4ede75,_0x6a7d64=new Set([..._0x20b8d6['activeSkillCodes']][_0x45d14d(0x15c)](_0x4409fd=>_0x4409fd['trim']())['filter'](Boolean)),_0x5cb74c=_0x20b8d6[_0x45d14d(0x157)]?new Set([..._0x20b8d6['pruneSkillCodes']]['map'](_0x1be368=>_0x1be368[_0x45d14d(0x176)]())[_0x45d14d(0x172)](Boolean)):undefined,_0x25e229=_0x20b8d6['scopes']??[_0x45d14d(0x167),_0x45d14d(0x17d)],_0x49ba71=resolve(getRuntimeSkillCacheRoot(_0x20b8d6[_0x45d14d(0x184)],_0x20b8d6['accessKey'],_0x5bcbb6),safePathSegment(_0x20b8d6[_0x45d14d(0x186)],_0x45d14d(0x186))),_0x192cb3=[];for(const _0x5484e9 of _0x25e229){const _0x20d584=resolve(_0x49ba71,_0x5484e9);if(!existsSync(_0x20d584))continue;for(const _0x515057 of readdirSync(_0x20d584,{'withFileTypes':!![]})){if(!_0x515057[_0x45d14d(0x156)]())continue;const _0x26a46f=_0x515057[_0x45d14d(0x175)];if(_0x5cb74c&&!_0x5cb74c['has'](_0x26a46f))continue;if(_0x6a7d64[_0x45d14d(0x16b)](_0x26a46f))continue;const _0x10cfa2=resolve(_0x20d584,_0x26a46f),_0xf98831=readMetadataIfPresent(resolve(_0x10cfa2,METADATA_FILE));if(_0xf98831?.['appCode']!==_0x20b8d6[_0x45d14d(0x186)]||_0xf98831['scope']!==_0x5484e9||_0xf98831[_0x45d14d(0x187)]!==_0x26a46f){_0x192cb3[_0x45d14d(0x16a)]({'path':_0x10cfa2,'action':_0x45d14d(0x182),'reason':_0x45d14d(0x151)});continue;}if(isLinkedFromAnyRoot(_0x10cfa2,_0x20b8d6[_0x45d14d(0x15f)]??[])){_0x192cb3[_0x45d14d(0x16a)]({'path':_0x10cfa2,'action':_0x45d14d(0x182),'reason':_0x45d14d(0x16f)});continue;}removeSync(_0x10cfa2),_0x192cb3['push']({'path':_0x10cfa2,'action':_0x45d14d(0x150)});}}return _0x192cb3;}export function linkGlobalRuntimeSkills(_0x251d18,_0x1b9eda={}){const _0x428c55=a113_0x4ede75,_0x2e669b=resolveSkillSyncPaths(_0x1b9eda),_0x2e1d57=[];for(const _0x4a0a8a of _0x251d18){if(_0x4a0a8a[_0x428c55(0x189)]!=='builtin')throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x4a0a8a['scope']);const _0x46bbf2=requireSkillCode(_0x4a0a8a[_0x428c55(0x158)]),_0x3772db=copyManagedSkillDirectory(_0x4a0a8a[_0x428c55(0x14e)],resolve(_0x2e669b[_0x428c55(0x169)],_0x46bbf2));_0x2e1d57[_0x428c55(0x16a)]({..._0x3772db,'contentHash':_0x4a0a8a[_0x428c55(0x177)]});}return _0x2e1d57;}function ensureManagedSymlink(_0x51ac1c,_0x117e09,_0x312ba8,_0x20c03f){const _0x2a28f6=a113_0x4ede75;mkdirSync(dirname(_0x51ac1c),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x51ac1c)||isDanglingSymlink(_0x51ac1c)){const _0x4efcbe=lstatSync(_0x51ac1c);if(!_0x4efcbe[_0x2a28f6(0x170)]())throw CliErrors[_0x2a28f6(0x17c)](_0x2a28f6(0x15a)+_0x51ac1c);const _0x3ca47b=resolveSymlinkTarget(_0x51ac1c);if(!isPathInside(realOrResolved(_0x3ca47b),realOrResolved(_0x312ba8[_0x2a28f6(0x16c)])))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x51ac1c);if(realOrResolved(_0x3ca47b)===realOrResolved(_0x117e09))return{'path':_0x51ac1c,'target':_0x117e09,'action':'unchanged'};const _0x9db739=readMetadataIfPresent(resolve(_0x3ca47b,METADATA_FILE));if(_0x312ba8['scope']===_0x2a28f6(0x171)&&(_0x9db739?.['appCode']!==_0x312ba8[_0x2a28f6(0x186)]||_0x9db739['skillCode']!==_0x20c03f))throw CliErrors['validation'](_0x2a28f6(0x17f)+_0x51ac1c);return unlinkSync(_0x51ac1c),symlinkSync(_0x117e09,_0x51ac1c,_0x2a28f6(0x14e)),{'path':_0x51ac1c,'target':_0x117e09,'action':_0x2a28f6(0x185)};}return symlinkSync(_0x117e09,_0x51ac1c,'dir'),{'path':_0x51ac1c,'target':_0x117e09,'action':_0x2a28f6(0x168)};}function managedTargetSkillLinkPaths(_0x14a6a6,_0x16b97f){const _0x573d67=a113_0x4ede75;if(!existsSync(_0x14a6a6))return[];const _0x9dccb=_0x16b97f[_0x573d67(0x186)]+'--';return readdirSync(_0x14a6a6,{'withFileTypes':!![]})['filter'](_0x1d458f=>_0x16b97f['scope']===_0x573d67(0x171)||_0x1d458f[_0x573d67(0x175)][_0x573d67(0x17b)](_0x9dccb))['map'](_0x38f0a1=>resolve(_0x14a6a6,_0x38f0a1[_0x573d67(0x175)]));}function removeManagedSkillLink(_0x11e8a9,_0x26ad1f,_0x4b4dc0){const _0x18b1ec=a113_0x4ede75,_0x24c393=lstatIfPresent(_0x11e8a9);if(!_0x24c393?.[_0x18b1ec(0x170)]())return{'path':_0x11e8a9,'action':_0x18b1ec(0x182),'reason':_0x18b1ec(0x179)};const _0x3f5936=resolveSymlinkTarget(_0x11e8a9);if(!isPathInside(realOrResolved(_0x3f5936),realOrResolved(_0x26ad1f[_0x18b1ec(0x16c)])))return{'path':_0x11e8a9,'action':'skipped','reason':_0x18b1ec(0x174)};const _0x1386a6=readMetadataIfPresent(resolve(_0x3f5936,METADATA_FILE));if(_0x26ad1f[_0x18b1ec(0x189)]===_0x18b1ec(0x171)&&(_0x1386a6?.['appCode']!==_0x26ad1f[_0x18b1ec(0x186)]||_0x1386a6[_0x18b1ec(0x187)]!==_0x4b4dc0))return{'path':_0x11e8a9,'action':'skipped','reason':'metadata-mismatch'};return unlinkSync(_0x11e8a9),{'path':_0x11e8a9,'action':_0x18b1ec(0x150)};}function isLinkedFromAnyRoot(_0x2dd4ac,_0x241743){const _0x275b8a=a113_0x4ede75,_0x3f57a6=realOrResolved(_0x2dd4ac);for(const _0x28e153 of _0x241743){if(!existsSync(_0x28e153))continue;for(const _0x382caf of readdirSync(_0x28e153,{'withFileTypes':!![]})){if(!_0x382caf[_0x275b8a(0x170)]())continue;const _0x49bc98=resolve(_0x28e153,_0x382caf[_0x275b8a(0x175)]);if(realOrResolved(resolveSymlinkTarget(_0x49bc98))===_0x3f57a6)return!![];}}return![];}function runtimeSkillLinkName(_0x54981c,_0x55c490){const _0xea6d1c=a113_0x4ede75,_0x4806de=safePathSegment(_0x55c490,_0xea6d1c(0x187));if(_0x54981c[_0xea6d1c(0x189)]===_0xea6d1c(0x171)&&RESERVED_PROJECT_SKILL_CODES[_0xea6d1c(0x16b)](_0x4806de))throw CliErrors[_0xea6d1c(0x17c)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x4806de);return _0x54981c[_0xea6d1c(0x189)]===_0xea6d1c(0x171)?_0x4806de:_0x54981c[_0xea6d1c(0x186)]+'--'+_0x4806de;}function a113_0x1916(){const _0x17fabb=['trim','contentHash','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','not-managed-symlink','2748OfGzqQ','startsWith','validation','company','917844dsrdwN','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','set','6088068AOiaxl','skipped','933360zYpPTT','env','updated','appCode','skillCode','builtin','scope','values','dir','runtime-observe','removed','metadata-mismatch','length','8XgTlyd','7632653thtnRR','secret-retriever','isDirectory','pruneSkillCodes','skill','109021fsjOEP','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','metadataPath','map','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','protectedLinkRoots','5143360mMNDid','skillRoots','8AAFSFu','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','1760BGYYZk','get','personal','created','agentsSkillsDir','push','has','managedRoot','10eaGiBj','lovrabet','linked-from-protected-root','isSymbolicLink','project','filter','unchanged','external-symlink','name'];a113_0x1916=function(){return _0x17fabb;};return a113_0x1916();}function runtimeSkillCodeFromLink(_0x269888,_0x45e296){const _0x3bf1fa=a113_0x4ede75,_0xac2d87=basename(_0x45e296);return _0x269888[_0x3bf1fa(0x189)]===_0x3bf1fa(0x171)?_0xac2d87:_0xac2d87['slice']((_0x269888[_0x3bf1fa(0x186)]+'--')[_0x3bf1fa(0x152)]);}export function copyManagedSkillDirectory(_0x47b31d,_0x1c8e9a){const _0x37b5c7=a113_0x4ede75,_0x29e7cd=resolve(_0x1c8e9a,METADATA_FILE),_0x270cdb=existsSync(_0x1c8e9a);if(_0x270cdb){const _0x32d059=lstatSync(_0x1c8e9a);if(_0x32d059['isSymbolicLink']())throw CliErrors[_0x37b5c7(0x17c)](_0x37b5c7(0x15d)+_0x1c8e9a);if(!_0x32d059[_0x37b5c7(0x156)]())throw CliErrors[_0x37b5c7(0x17c)](_0x37b5c7(0x15e)+_0x1c8e9a);const _0x1f123b=readMetadataIfPresent(_0x29e7cd);if(_0x1f123b?.[_0x37b5c7(0x189)]!==_0x37b5c7(0x188))throw CliErrors[_0x37b5c7(0x17c)](_0x37b5c7(0x164)+_0x1c8e9a);}ensureDirSync(dirname(_0x1c8e9a));const _0x12768f=_0x270cdb?readMetadataIfPresent(_0x29e7cd)?.[_0x37b5c7(0x177)]:undefined,_0xb19c52=readMetadataIfPresent(resolve(_0x47b31d,METADATA_FILE))?.[_0x37b5c7(0x177)];return _0x270cdb&&removeSync(_0x1c8e9a),copySkillDirectory(_0x47b31d,_0x1c8e9a),{'path':_0x1c8e9a,'target':_0x47b31d,'action':!_0x270cdb?_0x37b5c7(0x168):_0x12768f===_0xb19c52?_0x37b5c7(0x173):_0x37b5c7(0x185)};}function copySkillDirectory(_0x2b5cb7,_0x473872){copySync(_0x2b5cb7,_0x473872,{'dereference':![],'overwrite':!![],'filter'(_0x20d8be){const _0x2e3102=a113_0x5736;if(lstatSync(_0x20d8be)['isSymbolicLink']())throw CliErrors[_0x2e3102(0x17c)](_0x2e3102(0x163)+_0x20d8be);return!![];}});}
@@ -1 +1 @@
1
- function a114_0x2e10(_0x1832af,_0x2b49fa){_0x1832af=_0x1832af-0xcb;const _0x5bb42c=a114_0x5bb4();let _0x2e10c1=_0x5bb42c[_0x1832af];return _0x2e10c1;}(function(_0x1fe05c,_0x56af50){const _0x22fd6e=a114_0x2e10,_0x54141c=_0x1fe05c();while(!![]){try{const _0x3899b4=parseInt(_0x22fd6e(0xe3))/0x1+parseInt(_0x22fd6e(0xe8))/0x2+-parseInt(_0x22fd6e(0xcb))/0x3+parseInt(_0x22fd6e(0xdc))/0x4*(parseInt(_0x22fd6e(0xda))/0x5)+parseInt(_0x22fd6e(0xe0))/0x6+-parseInt(_0x22fd6e(0xd5))/0x7+parseInt(_0x22fd6e(0xd8))/0x8;if(_0x3899b4===_0x56af50)break;else _0x54141c['push'](_0x54141c['shift']());}catch(_0x350416){_0x54141c['push'](_0x54141c['shift']());}}}(a114_0x5bb4,0x95899));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 a114_0x5bb4(){const _0x53bf20=['filter','sort','scope','project','map','code','push','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','8148714HdvlzL','skillRoots','cache','3929744XxzSYY','localeCompare','765365TBlZQf','scopes','16UkosIj','cacheDir','includes','isSymbolicLink','1215258hvrmsH','from','name','1217034OvHuHS','linkedPath','builtin','trim','tags','585066qJHUkL','skillCode','linkedPaths','appCode','dir','local','isArray','source','isDirectory','3117039jKtiCH','has'];a114_0x5bb4=function(){return _0x53bf20;};return a114_0x5bb4();}import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x41860c,_0x25ae52,_0x1f2905={}){const _0x1cba38=a114_0x2e10,_0x25db32=safePathSegment(_0x41860c[_0x1cba38(0xeb)],_0x1cba38(0xeb));if(_0x25ae52[_0x1cba38(0xeb)]!==_0x25db32)throw CliErrors['validation'](_0x1cba38(0xd4)+_0x25ae52['appCode']+'\x20!=\x20'+_0x25db32);const _0x572801=normalizeRuntimeSkillScopes(_0x41860c[_0x1cba38(0xdb)]),_0x452b8a=new Set(_0x572801),_0x1bc00d=_0x41860c[_0x1cba38(0xd2)]?.['trim'](),_0x51e6ba=new Map(),_0x58a99b=resolve(getRuntimeSkillCacheRoot(_0x41860c['env'],_0x41860c['accessKey'],_0x1f2905),_0x25db32);for(const _0x33b561 of _0x572801){for(const _0x103074 of localSkillEntryDirs(resolve(_0x58a99b,_0x33b561))){collectLocalRuntimeSkill(_0x51e6ba,_0x103074,{'appCode':_0x25db32,'scopes':_0x452b8a,'code':_0x1bc00d,'source':'cache'});}}for(const _0xba60c1 of _0x25ae52[_0x1cba38(0xd6)]){for(const _0x245ca1 of localSkillLinkCandidates(_0xba60c1,_0x25ae52,_0x452b8a)){collectLocalRuntimeSkill(_0x51e6ba,_0x245ca1,{'appCode':_0x25db32,'scopes':_0x452b8a,'code':_0x1bc00d,'source':'link','linkedPath':_0x245ca1});}}return Array[_0x1cba38(0xe1)](_0x51e6ba['values']())[_0x1cba38(0xce)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x1c0553){const _0x18e60a=a114_0x2e10;if(!existsSync(_0x1c0553))return[];return readdirSync(_0x1c0553,{'withFileTypes':!![]})['filter'](_0x4f138c=>_0x4f138c[_0x18e60a(0xf0)]()||_0x4f138c[_0x18e60a(0xdf)]())[_0x18e60a(0xd1)](_0x28bdb3=>resolve(_0x1c0553,_0x28bdb3['name']));}function localSkillLinkCandidates(_0x31f8ce,_0x81f222,_0xaa111a){const _0x99ccb7=a114_0x2e10;if(!existsSync(_0x31f8ce))return[];const _0x1c85f3=_0x81f222['appCode']+'--';return readdirSync(_0x31f8ce,{'withFileTypes':!![]})['filter'](_0x3848eb=>_0x3848eb[_0x99ccb7(0xf0)]()||_0x3848eb[_0x99ccb7(0xdf)]())[_0x99ccb7(0xcd)](_0x4f08b3=>_0x81f222[_0x99ccb7(0xcf)]===_0x99ccb7(0xd0)||_0x4f08b3[_0x99ccb7(0xe2)]['startsWith'](_0x1c85f3)||_0xaa111a[_0x99ccb7(0xcc)](_0x99ccb7(0xe5)))[_0x99ccb7(0xd1)](_0x40454c=>resolve(_0x31f8ce,_0x40454c[_0x99ccb7(0xe2)]));}function collectLocalRuntimeSkill(_0x59b30c,_0x838ed3,_0x39bd35){const _0x74a795=a114_0x2e10,_0x52ded3=resolve(_0x838ed3,METADATA_FILE),_0x24afc1=readMetadataIfPresent(_0x52ded3);if(!_0x24afc1)return;if(_0x24afc1[_0x74a795(0xeb)]!==_0x39bd35['appCode'])return;if(!isRuntimeSkillScope(_0x24afc1['scope'])||!_0x39bd35[_0x74a795(0xdb)][_0x74a795(0xcc)](_0x24afc1[_0x74a795(0xcf)]))return;const _0x1a7011=_0x24afc1[_0x74a795(0xe9)]?.[_0x74a795(0xe6)]();if(!_0x1a7011)return;if(_0x39bd35[_0x74a795(0xd2)]&&_0x1a7011!==_0x39bd35[_0x74a795(0xd2)])return;const _0x2f4a32=_0x24afc1[_0x74a795(0xcf)]+':'+_0x1a7011,_0x29bd3a=_0x39bd35[_0x74a795(0xe4)]?[_0x39bd35[_0x74a795(0xe4)]]:[],_0x20b0d4=_0x59b30c['get'](_0x2f4a32);if(_0x20b0d4){_0x39bd35[_0x74a795(0xef)]===_0x74a795(0xd7)&&(_0x20b0d4[_0x74a795(0xec)]=_0x838ed3,_0x20b0d4[_0x74a795(0xdd)]=_0x838ed3,_0x20b0d4['skillMdPath']=resolve(_0x838ed3,SKILL_FILE),_0x20b0d4['metadataPath']=_0x52ded3);for(const _0x41a79a of _0x29bd3a){!_0x20b0d4[_0x74a795(0xea)][_0x74a795(0xde)](_0x41a79a)&&_0x20b0d4[_0x74a795(0xea)][_0x74a795(0xd3)](_0x41a79a);}_0x20b0d4[_0x74a795(0xea)][_0x74a795(0xce)]();return;}_0x59b30c['set'](_0x2f4a32,{..._0x24afc1,'tags':Array[_0x74a795(0xee)](_0x24afc1[_0x74a795(0xe7)])?_0x24afc1['tags']:[],'scope':_0x24afc1['scope'],'source':_0x74a795(0xed),'dir':_0x838ed3,'cacheDir':_0x39bd35[_0x74a795(0xef)]==='cache'?_0x838ed3:undefined,'skillMdPath':resolve(_0x838ed3,SKILL_FILE),'metadataPath':_0x52ded3,'linkedPaths':_0x29bd3a});}function compareLocalRuntimeSkills(_0x34e4ff,_0x559ef7){const _0x604f49=a114_0x2e10,_0x1f244a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1f244a[_0x34e4ff[_0x604f49(0xcf)]]-_0x1f244a[_0x559ef7['scope']]||_0x34e4ff[_0x604f49(0xe9)][_0x604f49(0xd9)](_0x559ef7[_0x604f49(0xe9)])||_0x34e4ff['dir'][_0x604f49(0xd9)](_0x559ef7[_0x604f49(0xec)]);}
1
+ (function(_0xa3c132,_0x2843f1){const _0x2c012b=a114_0xcbe2,_0xf4a540=_0xa3c132();while(!![]){try{const _0x45e0fe=-parseInt(_0x2c012b(0xc3))/0x1+parseInt(_0x2c012b(0xe0))/0x2+parseInt(_0x2c012b(0xd9))/0x3+-parseInt(_0x2c012b(0xbe))/0x4+-parseInt(_0x2c012b(0xdc))/0x5+-parseInt(_0x2c012b(0xd5))/0x6*(-parseInt(_0x2c012b(0xd0))/0x7)+parseInt(_0x2c012b(0xc1))/0x8*(parseInt(_0x2c012b(0xda))/0x9);if(_0x45e0fe===_0x2843f1)break;else _0xf4a540['push'](_0xf4a540['shift']());}catch(_0x50616d){_0xf4a540['push'](_0xf4a540['shift']());}}}(a114_0x3b27,0x95c23));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a114_0x3b27(){const _0x2576a3=['linkedPaths','name','metadataPath','cache','957508sdGKaT','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','project','8ZQSnAr','local','479500xFuzaJ','set','push','localeCompare','code','isSymbolicLink','get','trim','appCode','sort','\x20!=\x20','dir','skillMdPath','411131trfXZJ','linkedPath','filter','env','source','42HKRCZf','validation','scope','tags','2263449NparsS','521793aFbTSV','scopes','4467810CGbfCl','startsWith','skillRoots','map','2004518vCOpRU','isArray','from','skillCode','has','isDirectory'];a114_0x3b27=function(){return _0x2576a3;};return a114_0x3b27();}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x46a938,_0x25d192,_0x20e3a9={}){const _0x49c3ab=a114_0xcbe2,_0x342faf=safePathSegment(_0x46a938['appCode'],'appCode');if(_0x25d192[_0x49c3ab(0xcb)]!==_0x342faf)throw CliErrors[_0x49c3ab(0xd6)](_0x49c3ab(0xbf)+_0x25d192[_0x49c3ab(0xcb)]+_0x49c3ab(0xcd)+_0x342faf);const _0xa47173=normalizeRuntimeSkillScopes(_0x46a938[_0x49c3ab(0xdb)]),_0x56f1ac=new Set(_0xa47173),_0x44acc4=_0x46a938[_0x49c3ab(0xc7)]?.[_0x49c3ab(0xca)](),_0x62ae0d=new Map(),_0x480d03=resolve(getRuntimeSkillCacheRoot(_0x46a938[_0x49c3ab(0xd3)],_0x46a938['accessKey'],_0x20e3a9),_0x342faf);for(const _0x5b8915 of _0xa47173){for(const _0x4c1b9b of localSkillEntryDirs(resolve(_0x480d03,_0x5b8915))){collectLocalRuntimeSkill(_0x62ae0d,_0x4c1b9b,{'appCode':_0x342faf,'scopes':_0x56f1ac,'code':_0x44acc4,'source':_0x49c3ab(0xbd)});}}for(const _0x1d4911 of _0x25d192[_0x49c3ab(0xde)]){for(const _0x877374 of localSkillLinkCandidates(_0x1d4911,_0x25d192,_0x56f1ac)){collectLocalRuntimeSkill(_0x62ae0d,_0x877374,{'appCode':_0x342faf,'scopes':_0x56f1ac,'code':_0x44acc4,'source':'link','linkedPath':_0x877374});}}return Array[_0x49c3ab(0xe2)](_0x62ae0d['values']())[_0x49c3ab(0xcc)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xcc4e4b){const _0x105d64=a114_0xcbe2;if(!existsSync(_0xcc4e4b))return[];return readdirSync(_0xcc4e4b,{'withFileTypes':!![]})[_0x105d64(0xd2)](_0x4c810a=>_0x4c810a['isDirectory']()||_0x4c810a[_0x105d64(0xc8)]())[_0x105d64(0xdf)](_0x2333f3=>resolve(_0xcc4e4b,_0x2333f3[_0x105d64(0xe7)]));}function localSkillLinkCandidates(_0x9e2e8e,_0x2a2bdc,_0x43296b){const _0x504f85=a114_0xcbe2;if(!existsSync(_0x9e2e8e))return[];const _0x3cfb3c=_0x2a2bdc[_0x504f85(0xcb)]+'--';return readdirSync(_0x9e2e8e,{'withFileTypes':!![]})[_0x504f85(0xd2)](_0x4b5c43=>_0x4b5c43[_0x504f85(0xe5)]()||_0x4b5c43['isSymbolicLink']())[_0x504f85(0xd2)](_0x277f0e=>_0x2a2bdc[_0x504f85(0xd7)]===_0x504f85(0xc0)||_0x277f0e[_0x504f85(0xe7)][_0x504f85(0xdd)](_0x3cfb3c)||_0x43296b[_0x504f85(0xe4)]('builtin'))[_0x504f85(0xdf)](_0x4f5dea=>resolve(_0x9e2e8e,_0x4f5dea[_0x504f85(0xe7)]));}function collectLocalRuntimeSkill(_0x1ba83d,_0x4b5395,_0x5881d4){const _0x4c0d85=a114_0xcbe2,_0x455dd4=resolve(_0x4b5395,METADATA_FILE),_0xeb97ed=readMetadataIfPresent(_0x455dd4);if(!_0xeb97ed)return;if(_0xeb97ed[_0x4c0d85(0xcb)]!==_0x5881d4[_0x4c0d85(0xcb)])return;if(!isRuntimeSkillScope(_0xeb97ed['scope'])||!_0x5881d4[_0x4c0d85(0xdb)][_0x4c0d85(0xe4)](_0xeb97ed[_0x4c0d85(0xd7)]))return;const _0xd463de=_0xeb97ed[_0x4c0d85(0xe3)]?.[_0x4c0d85(0xca)]();if(!_0xd463de)return;if(_0x5881d4[_0x4c0d85(0xc7)]&&_0xd463de!==_0x5881d4[_0x4c0d85(0xc7)])return;const _0x2acea5=_0xeb97ed['scope']+':'+_0xd463de,_0x99e11=_0x5881d4[_0x4c0d85(0xd1)]?[_0x5881d4[_0x4c0d85(0xd1)]]:[],_0x132d27=_0x1ba83d[_0x4c0d85(0xc9)](_0x2acea5);if(_0x132d27){_0x5881d4[_0x4c0d85(0xd4)]==='cache'&&(_0x132d27['dir']=_0x4b5395,_0x132d27['cacheDir']=_0x4b5395,_0x132d27[_0x4c0d85(0xcf)]=resolve(_0x4b5395,SKILL_FILE),_0x132d27[_0x4c0d85(0xe8)]=_0x455dd4);for(const _0x1e7d51 of _0x99e11){!_0x132d27[_0x4c0d85(0xe6)]['includes'](_0x1e7d51)&&_0x132d27[_0x4c0d85(0xe6)][_0x4c0d85(0xc5)](_0x1e7d51);}_0x132d27[_0x4c0d85(0xe6)]['sort']();return;}_0x1ba83d[_0x4c0d85(0xc4)](_0x2acea5,{..._0xeb97ed,'tags':Array[_0x4c0d85(0xe1)](_0xeb97ed[_0x4c0d85(0xd8)])?_0xeb97ed['tags']:[],'scope':_0xeb97ed[_0x4c0d85(0xd7)],'source':_0x4c0d85(0xc2),'dir':_0x4b5395,'cacheDir':_0x5881d4[_0x4c0d85(0xd4)]===_0x4c0d85(0xbd)?_0x4b5395:undefined,'skillMdPath':resolve(_0x4b5395,SKILL_FILE),'metadataPath':_0x455dd4,'linkedPaths':_0x99e11});}function a114_0xcbe2(_0x27d63d,_0x33de41){_0x27d63d=_0x27d63d-0xbd;const _0x3b277c=a114_0x3b27();let _0xcbe208=_0x3b277c[_0x27d63d];return _0xcbe208;}function compareLocalRuntimeSkills(_0x169cd1,_0x2e43d3){const _0x4d9e00=a114_0xcbe2,_0x24533a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x24533a[_0x169cd1[_0x4d9e00(0xd7)]]-_0x24533a[_0x2e43d3[_0x4d9e00(0xd7)]]||_0x169cd1[_0x4d9e00(0xe3)][_0x4d9e00(0xc6)](_0x2e43d3[_0x4d9e00(0xe3)])||_0x169cd1[_0x4d9e00(0xce)][_0x4d9e00(0xc6)](_0x2e43d3[_0x4d9e00(0xce)]);}
@@ -1 +1 @@
1
- (function(_0x3645d8,_0x6b2d41){const _0x441243=a115_0x3034,_0x46468b=_0x3645d8();while(!![]){try{const _0x21dc91=-parseInt(_0x441243(0x17c))/0x1*(parseInt(_0x441243(0x153))/0x2)+parseInt(_0x441243(0x158))/0x3+-parseInt(_0x441243(0x17e))/0x4*(-parseInt(_0x441243(0x16b))/0x5)+parseInt(_0x441243(0x160))/0x6+-parseInt(_0x441243(0x175))/0x7+-parseInt(_0x441243(0x156))/0x8*(parseInt(_0x441243(0x166))/0x9)+-parseInt(_0x441243(0x15e))/0xa;if(_0x21dc91===_0x6b2d41)break;else _0x46468b['push'](_0x46468b['shift']());}catch(_0x3d4cca){_0x46468b['push'](_0x46468b['shift']());}}}(a115_0x2596,0x47b69));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(_0x2ebba4){const _0x1b1554=a115_0x3034;return _0x2ebba4[_0x1b1554(0x157)]??Buffer[_0x1b1554(0x16d)](_0x2ebba4['content']??'',_0x1b1554(0x14c));}export function fileText(_0x22ecff){const _0x5bd399=a115_0x3034;return fileContent(_0x22ecff)[_0x5bd399(0x162)](_0x5bd399(0x14c));}export function normalizeLocalFiles(_0x556fe4){const _0x2aaf99=a115_0x3034;if(!Array[_0x2aaf99(0x15c)](_0x556fe4)||_0x556fe4[_0x2aaf99(0x15d)]===0x0)return[];const _0x53d06b=new Map();for(const _0x2be096 of _0x556fe4){if(!_0x2be096||typeof _0x2be096!==_0x2aaf99(0x151)||typeof _0x2be096[_0x2aaf99(0x17d)]!==_0x2aaf99(0x16f))throw CliErrors[_0x2aaf99(0x165)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2ad12b=normalizeSkillRelativePath(_0x2be096['path']);if(_0x53d06b[_0x2aaf99(0x167)](_0x2ad12b))throw CliErrors[_0x2aaf99(0x165)](_0x2aaf99(0x15f)+_0x2ad12b);if(_0x2be096[_0x2aaf99(0x157)]!==undefined&&!Buffer[_0x2aaf99(0x14f)](_0x2be096[_0x2aaf99(0x157)]))throw CliErrors['validation'](_0x2aaf99(0x14e)+_0x2ad12b);if(_0x2be096['bytes']===undefined&&typeof _0x2be096[_0x2aaf99(0x173)]!==_0x2aaf99(0x16f))throw CliErrors['validation'](_0x2aaf99(0x176)+_0x2ad12b);const _0x54e091=fileContent(_0x2be096);_0x53d06b['set'](_0x2ad12b,{'path':_0x2ad12b,'bytes':_0x54e091});}return Array['from'](_0x53d06b[_0x2aaf99(0x159)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3e0895){const _0x507e78=a115_0x3034;if(!Array[_0x507e78(0x15c)](_0x3e0895)||_0x3e0895[_0x507e78(0x15d)]===0x0)return[];const _0x135d42=new Map();for(const _0x35bac0 of _0x3e0895){if(!_0x35bac0||typeof _0x35bac0!==_0x507e78(0x151)||typeof _0x35bac0[_0x507e78(0x17d)]!==_0x507e78(0x16f))throw CliErrors[_0x507e78(0x165)](_0x507e78(0x161));const _0x599c0d=normalizeSkillRelativePath(_0x35bac0[_0x507e78(0x17d)]);if(_0x135d42['has'](_0x599c0d))throw CliErrors[_0x507e78(0x165)](_0x507e78(0x15f)+_0x599c0d);if(!isSha256Hex(_0x35bac0[_0x507e78(0x17b)]))throw CliErrors['validation'](_0x507e78(0x171)+_0x599c0d);if(!Number[_0x507e78(0x16c)](_0x35bac0[_0x507e78(0x177)])||_0x35bac0[_0x507e78(0x177)]<0x0)throw CliErrors['validation'](_0x507e78(0x172)+_0x599c0d);_0x135d42[_0x507e78(0x174)](_0x599c0d,{'path':_0x599c0d,'sha256':_0x35bac0[_0x507e78(0x17b)][_0x507e78(0x16e)](),'size':_0x35bac0['size']});}return Array[_0x507e78(0x16d)](_0x135d42[_0x507e78(0x159)]())[_0x507e78(0x15b)](compareSkillFiles);}export function scanSkillDirectory(_0x3bb83b,_0x3715a8={}){const _0x48c3d6=a115_0x3034,_0x48b0ce=realpathSync(_0x3bb83b),_0x5c8bec=canonicalExcludedFilePaths(_0x3715a8[_0x48c3d6(0x170)]),_0x555065=[];function _0x2df4a1(_0x3b19dd){const _0x4edf33=_0x48c3d6,_0x488383=readdirSync(_0x3b19dd,{'withFileTypes':!![]})[_0x4edf33(0x15b)]((_0x534fc2,_0x27566d)=>_0x534fc2[_0x4edf33(0x169)][_0x4edf33(0x17f)](_0x27566d['name']));for(const _0x2a9633 of _0x488383){if(_0x2a9633[_0x4edf33(0x178)]()&&IGNORED_DIR_NAMES[_0x4edf33(0x167)](_0x2a9633[_0x4edf33(0x169)]))continue;if(IGNORED_FILE_NAMES['has'](_0x2a9633['name']))continue;const _0x27c6e2=resolve(_0x3b19dd,_0x2a9633['name']);if(isExcludedFilePath(_0x27c6e2,_0x5c8bec))continue;if(_0x2a9633[_0x4edf33(0x14d)]())throw CliErrors['validation'](_0x4edf33(0x17a)+_0x27c6e2);const _0x590fcb=toPosixPath(relative(_0x48b0ce,_0x27c6e2));if(_0x2a9633[_0x4edf33(0x178)]()){_0x2df4a1(_0x27c6e2);continue;}if(!_0x2a9633[_0x4edf33(0x168)]())continue;validateSkillRelativePath(_0x590fcb);const _0x49f498=readFileSync(_0x27c6e2);_0x555065[_0x4edf33(0x154)]({'path':_0x590fcb,'bytes':_0x49f498});}}return _0x2df4a1(_0x48b0ce),normalizeLocalFiles(_0x555065);}function canonicalExcludedFilePaths(_0x2fb2ff){const _0x4f9361=a115_0x3034,_0x5945a9=new Set();for(const _0x2993c4 of _0x2fb2ff??[]){const _0x1600a5=resolve(_0x2993c4);_0x5945a9[_0x4f9361(0x180)](_0x1600a5);try{_0x5945a9[_0x4f9361(0x180)](realpathSync(_0x1600a5));}catch{}}return _0x5945a9;}function isExcludedFilePath(_0x6644f6,_0x5b74f5){if(_0x5b74f5['has'](_0x6644f6))return!![];if(_0x5b74f5['size']===0x0)return![];try{return _0x5b74f5['has'](realpathSync(_0x6644f6));}catch{return![];}}export function compareSkillFiles(_0x3b2b37,_0x4303a1){const _0x4115ea=a115_0x3034;if(_0x3b2b37[_0x4115ea(0x17d)]===SKILL_FILE)return _0x4303a1[_0x4115ea(0x17d)]===SKILL_FILE?0x0:-0x1;if(_0x4303a1[_0x4115ea(0x17d)]===SKILL_FILE)return 0x1;return Buffer[_0x4115ea(0x163)](Buffer['from'](_0x3b2b37['path'],_0x4115ea(0x14c)),Buffer[_0x4115ea(0x16d)](_0x4303a1[_0x4115ea(0x17d)],_0x4115ea(0x14c)));}export function normalizeSkillRelativePath(_0x1be748){const _0x23f16d=a115_0x3034,_0x5dfa2f=toPosixPath(_0x1be748[_0x23f16d(0x155)]());return validateSkillRelativePath(_0x5dfa2f),_0x5dfa2f;}export function validateSkillRelativePath(_0x466ea7){const _0x445801=a115_0x3034;if(!_0x466ea7||_0x466ea7[_0x445801(0x16a)]('/')||_0x466ea7[_0x445801(0x152)]('//'))throw CliErrors['validation'](_0x445801(0x179)+_0x466ea7);for(const _0x5da871 of _0x466ea7[_0x445801(0x150)]('/')){if(!_0x5da871||_0x5da871==='.'||_0x5da871==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x466ea7);}}export function toPosixPath(_0x273ff5){const _0x46ae4d=a115_0x3034;return _0x273ff5[_0x46ae4d(0x15a)](/\\/g,'/');}function a115_0x2596(){const _0x260346=['2jOJztw','push','trim','117256ZzAbpA','bytes','937611snZEIm','values','replace','sort','isArray','length','41200wAtTFD','Duplicate\x20Skill\x20file\x20path:\x20','2769396pdqtoG','Skill\x20file\x20path\x20must\x20be\x20text.','toString','compare','test','validation','333euaJaN','has','isFile','name','startsWith','1416400MNpoAw','isSafeInteger','from','toLowerCase','string','excludedFilePaths','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','content','set','1362228OnXqOd','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','size','isDirectory','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','sha256','22613rRyppw','path','4kuUAWs','localeCompare','add','utf8','isSymbolicLink','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isBuffer','split','object','includes'];a115_0x2596=function(){return _0x260346;};return a115_0x2596();}function a115_0x3034(_0x3bb5ac,_0xa5fedc){_0x3bb5ac=_0x3bb5ac-0x14c;const _0x259648=a115_0x2596();let _0x30349b=_0x259648[_0x3bb5ac];return _0x30349b;}export function isSha256Hex(_0x516231){const _0x1b529e=a115_0x3034;return typeof _0x516231===_0x1b529e(0x16f)&&/^[a-fA-F0-9]{64}$/[_0x1b529e(0x164)](_0x516231);}
1
+ (function(_0x444630,_0x3ade40){const _0x455bd5=a115_0x2daf,_0x44f08d=_0x444630();while(!![]){try{const _0x3fd1a9=parseInt(_0x455bd5(0x1e2))/0x1+-parseInt(_0x455bd5(0x1ea))/0x2+-parseInt(_0x455bd5(0x1ff))/0x3+parseInt(_0x455bd5(0x1f7))/0x4+-parseInt(_0x455bd5(0x1f3))/0x5*(parseInt(_0x455bd5(0x1eb))/0x6)+parseInt(_0x455bd5(0x20e))/0x7+-parseInt(_0x455bd5(0x202))/0x8;if(_0x3fd1a9===_0x3ade40)break;else _0x44f08d['push'](_0x44f08d['shift']());}catch(_0x5afadf){_0x44f08d['push'](_0x44f08d['shift']());}}}(a115_0x42cc,0x8e14a));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a115_0x2daf(_0x5c0889,_0x32c973){_0x5c0889=_0x5c0889-0x1e2;const _0x42cc91=a115_0x42cc();let _0x2daf82=_0x42cc91[_0x5c0889];return _0x2daf82;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x335f87){const _0x17cdfe=a115_0x2daf;return _0x335f87[_0x17cdfe(0x1fa)]??Buffer[_0x17cdfe(0x1f4)](_0x335f87[_0x17cdfe(0x1ee)]??'',_0x17cdfe(0x205));}export function fileText(_0x343f4c){const _0x4a71e1=a115_0x2daf;return fileContent(_0x343f4c)[_0x4a71e1(0x1e5)](_0x4a71e1(0x205));}export function normalizeLocalFiles(_0x3ff328){const _0x5c6e35=a115_0x2daf;if(!Array[_0x5c6e35(0x1f8)](_0x3ff328)||_0x3ff328[_0x5c6e35(0x1f0)]===0x0)return[];const _0x3c5620=new Map();for(const _0x116915 of _0x3ff328){if(!_0x116915||typeof _0x116915!=='object'||typeof _0x116915['path']!==_0x5c6e35(0x1ef))throw CliErrors[_0x5c6e35(0x20b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x207718=normalizeSkillRelativePath(_0x116915[_0x5c6e35(0x200)]);if(_0x3c5620[_0x5c6e35(0x1e8)](_0x207718))throw CliErrors['validation'](_0x5c6e35(0x204)+_0x207718);if(_0x116915[_0x5c6e35(0x1fa)]!==undefined&&!Buffer[_0x5c6e35(0x1f1)](_0x116915[_0x5c6e35(0x1fa)]))throw CliErrors[_0x5c6e35(0x20b)](_0x5c6e35(0x203)+_0x207718);if(_0x116915[_0x5c6e35(0x1fa)]===undefined&&typeof _0x116915[_0x5c6e35(0x1ee)]!==_0x5c6e35(0x1ef))throw CliErrors[_0x5c6e35(0x20b)](_0x5c6e35(0x1e6)+_0x207718);const _0x9712bf=fileContent(_0x116915);_0x3c5620[_0x5c6e35(0x20d)](_0x207718,{'path':_0x207718,'bytes':_0x9712bf});}return Array[_0x5c6e35(0x1f4)](_0x3c5620[_0x5c6e35(0x206)]())['sort'](compareSkillFiles);}function a115_0x42cc(){const _0x52323f=['584784GUUXcP','6Ftxmlq','add','isSymbolicLink','content','string','length','isBuffer','object','232550sLJYEb','from','sha256','startsWith','4592752JMVVzf','isArray','compare','bytes','isFile','localeCompare','size','Unsafe\x20Skill\x20file\x20path:\x20','3236940TWyNKD','path','isDirectory','4796376dJScAx','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Duplicate\x20Skill\x20file\x20path:\x20','utf8','values','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','name','replace','Skill\x20file\x20size\x20is\x20invalid:\x20','validation','includes','set','5565245mntOyd','excludedFilePaths','656168PFUKly','toLowerCase','test','toString','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','has','isSafeInteger'];a115_0x42cc=function(){return _0x52323f;};return a115_0x42cc();}export function normalizeManifestFiles(_0x34f44b){const _0xd05023=a115_0x2daf;if(!Array[_0xd05023(0x1f8)](_0x34f44b)||_0x34f44b[_0xd05023(0x1f0)]===0x0)return[];const _0x22b9fe=new Map();for(const _0x20b124 of _0x34f44b){if(!_0x20b124||typeof _0x20b124!==_0xd05023(0x1f2)||typeof _0x20b124[_0xd05023(0x200)]!=='string')throw CliErrors[_0xd05023(0x20b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1e8e70=normalizeSkillRelativePath(_0x20b124[_0xd05023(0x200)]);if(_0x22b9fe[_0xd05023(0x1e8)](_0x1e8e70))throw CliErrors[_0xd05023(0x20b)](_0xd05023(0x204)+_0x1e8e70);if(!isSha256Hex(_0x20b124[_0xd05023(0x1f5)]))throw CliErrors['validation'](_0xd05023(0x1e7)+_0x1e8e70);if(!Number[_0xd05023(0x1e9)](_0x20b124[_0xd05023(0x1fd)])||_0x20b124[_0xd05023(0x1fd)]<0x0)throw CliErrors[_0xd05023(0x20b)](_0xd05023(0x20a)+_0x1e8e70);_0x22b9fe['set'](_0x1e8e70,{'path':_0x1e8e70,'sha256':_0x20b124[_0xd05023(0x1f5)][_0xd05023(0x1e3)](),'size':_0x20b124[_0xd05023(0x1fd)]});}return Array['from'](_0x22b9fe['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x5aa2a7,_0x56c068={}){const _0x4b1afa=a115_0x2daf,_0x310786=realpathSync(_0x5aa2a7),_0x125399=canonicalExcludedFilePaths(_0x56c068[_0x4b1afa(0x20f)]),_0x3f72d1=[];function _0x5057f6(_0x1ed2ce){const _0x5179b4=_0x4b1afa,_0x2d291e=readdirSync(_0x1ed2ce,{'withFileTypes':!![]})['sort']((_0x4944c8,_0x32f1d2)=>_0x4944c8[_0x5179b4(0x208)][_0x5179b4(0x1fc)](_0x32f1d2['name']));for(const _0x2c3459 of _0x2d291e){if(_0x2c3459[_0x5179b4(0x201)]()&&IGNORED_DIR_NAMES['has'](_0x2c3459['name']))continue;if(IGNORED_FILE_NAMES['has'](_0x2c3459[_0x5179b4(0x208)]))continue;const _0x41145a=resolve(_0x1ed2ce,_0x2c3459[_0x5179b4(0x208)]);if(isExcludedFilePath(_0x41145a,_0x125399))continue;if(_0x2c3459[_0x5179b4(0x1ed)]())throw CliErrors[_0x5179b4(0x20b)](_0x5179b4(0x207)+_0x41145a);const _0x404519=toPosixPath(relative(_0x310786,_0x41145a));if(_0x2c3459[_0x5179b4(0x201)]()){_0x5057f6(_0x41145a);continue;}if(!_0x2c3459[_0x5179b4(0x1fb)]())continue;validateSkillRelativePath(_0x404519);const _0x29b635=readFileSync(_0x41145a);_0x3f72d1['push']({'path':_0x404519,'bytes':_0x29b635});}}return _0x5057f6(_0x310786),normalizeLocalFiles(_0x3f72d1);}function canonicalExcludedFilePaths(_0x366ed7){const _0x1d410e=a115_0x2daf,_0x86cba3=new Set();for(const _0x3910e9 of _0x366ed7??[]){const _0x2e15dd=resolve(_0x3910e9);_0x86cba3[_0x1d410e(0x1ec)](_0x2e15dd);try{_0x86cba3['add'](realpathSync(_0x2e15dd));}catch{}}return _0x86cba3;}function isExcludedFilePath(_0x5463a5,_0x45422e){const _0x5f0f49=a115_0x2daf;if(_0x45422e[_0x5f0f49(0x1e8)](_0x5463a5))return!![];if(_0x45422e[_0x5f0f49(0x1fd)]===0x0)return![];try{return _0x45422e['has'](realpathSync(_0x5463a5));}catch{return![];}}export function compareSkillFiles(_0x21b36f,_0x375b27){const _0x182105=a115_0x2daf;if(_0x21b36f[_0x182105(0x200)]===SKILL_FILE)return _0x375b27[_0x182105(0x200)]===SKILL_FILE?0x0:-0x1;if(_0x375b27[_0x182105(0x200)]===SKILL_FILE)return 0x1;return Buffer[_0x182105(0x1f9)](Buffer['from'](_0x21b36f[_0x182105(0x200)],_0x182105(0x205)),Buffer[_0x182105(0x1f4)](_0x375b27[_0x182105(0x200)],_0x182105(0x205)));}export function normalizeSkillRelativePath(_0xd4628c){const _0x7bae99=toPosixPath(_0xd4628c['trim']());return validateSkillRelativePath(_0x7bae99),_0x7bae99;}export function validateSkillRelativePath(_0x3cd839){const _0x9f883a=a115_0x2daf;if(!_0x3cd839||_0x3cd839[_0x9f883a(0x1f6)]('/')||_0x3cd839[_0x9f883a(0x20c)]('//'))throw CliErrors[_0x9f883a(0x20b)](_0x9f883a(0x1fe)+_0x3cd839);for(const _0x59a82a of _0x3cd839['split']('/')){if(!_0x59a82a||_0x59a82a==='.'||_0x59a82a==='..')throw CliErrors[_0x9f883a(0x20b)](_0x9f883a(0x1fe)+_0x3cd839);}}export function toPosixPath(_0x15122e){const _0x5443c5=a115_0x2daf;return _0x15122e[_0x5443c5(0x209)](/\\/g,'/');}export function isSha256Hex(_0x4de136){const _0x434dbc=a115_0x2daf;return typeof _0x4de136===_0x434dbc(0x1ef)&&/^[a-fA-F0-9]{64}$/[_0x434dbc(0x1e4)](_0x4de136);}
@@ -1 +1 @@
1
- (function(_0xefa25,_0x5c1b5f){const _0xc0eb5c=a116_0x2d22,_0x272c72=_0xefa25();while(!![]){try{const _0x43e03d=-parseInt(_0xc0eb5c(0x187))/0x1*(parseInt(_0xc0eb5c(0x199))/0x2)+-parseInt(_0xc0eb5c(0x180))/0x3+parseInt(_0xc0eb5c(0x190))/0x4+parseInt(_0xc0eb5c(0x19c))/0x5+parseInt(_0xc0eb5c(0x174))/0x6+-parseInt(_0xc0eb5c(0x19e))/0x7*(parseInt(_0xc0eb5c(0x186))/0x8)+-parseInt(_0xc0eb5c(0x196))/0x9*(-parseInt(_0xc0eb5c(0x18d))/0xa);if(_0x43e03d===_0x5c1b5f)break;else _0x272c72['push'](_0x272c72['shift']());}catch(_0x11ff68){_0x272c72['push'](_0x272c72['shift']());}}}(a116_0x5597,0x27518));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';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(_0x833c72,_0x50e852,_0x35fe79){const _0x30060a=a116_0x2d22,_0x2e0144=requireSkillCode(_0x833c72),_0x113d91=requirePackageBytes(_0x2e0144,_0x35fe79[_0x30060a(0x197)]),_0x537f7a=extractDownloadedPackage(_0x113d91),_0x574520=_0x537f7a[_0x30060a(0x17e)](_0x5b0112=>_0x5b0112[_0x30060a(0x184)]===SKILL_FILE);if(!_0x574520)throw CliErrors[_0x30060a(0x19a)](_0x30060a(0x19b)+SKILL_FILE+':\x20'+_0x2e0144);const _0x2754fb=withMaterializedSkillFrontmatter(_0x537f7a,_0x833c72,_0x2e0144),_0x316961=_0x2754fb[_0x30060a(0x17e)](_0x2ba8b7=>_0x2ba8b7[_0x30060a(0x184)]===SKILL_FILE),_0x1243f5=fileText(_0x316961),_0x2c4851=getRuntimeSkillDir(_0x35fe79[_0x30060a(0x189)],_0x35fe79['accessKey'],_0x35fe79[_0x30060a(0x193)],_0x50e852,_0x2e0144,_0x35fe79[_0x30060a(0x176)]),_0x3e609b=resolve(_0x2c4851,SKILL_FILE),_0x335b11=resolve(_0x2c4851,METADATA_FILE),_0x3e16a4=contentHash(_0x1243f5),_0x4dac9d=readMetadataIfPresent(_0x335b11)?.[_0x30060a(0x18b)];ensurePulledFilesCanBeOverwritten(_0x2c4851,_0x335b11,_0x2754fb,_0x35fe79[_0x30060a(0x1a3)]===!![]),mkdirSync(_0x2c4851,{'recursive':!![],'mode':0x1c0});const _0x598f89=existsSync(_0x3e609b)?readFileSync(_0x3e609b,'utf8'):undefined;return materializeFiles(_0x2c4851,_0x2754fb),removeStaleManagedFiles(_0x2c4851,_0x4dac9d,_0x2754fb),writeJsonAtomic(_0x335b11,buildMetadata(_0x833c72,_0x50e852,_0x35fe79[_0x30060a(0x193)],_0x3e16a4,_0x35fe79[_0x30060a(0x18e)],_0x2754fb,_0x113d91)),{'skill':_0x833c72,'scope':_0x50e852,'dir':_0x2c4851,'skillMdPath':_0x3e609b,'metadataPath':_0x335b11,'contentHash':_0x3e16a4,'changed':_0x598f89!==_0x1243f5};}function a116_0x2d22(_0x4f900c,_0x3883dd){_0x4f900c=_0x4f900c-0x172;const _0x559790=a116_0x5597();let _0x2d2229=_0x559790[_0x4f900c];return _0x2d2229;}function withMaterializedSkillFrontmatter(_0x1dcf7c,_0x53fa14,_0x1ceca4){const _0x2adf02=a116_0x2d22,_0x268608=skillDisplayName(_0x53fa14,_0x1ceca4),_0x33e6b4=_0x53fa14['description']?.[_0x2adf02(0x178)]()||_0x268608||_0x1ceca4;return normalizeLocalFiles(_0x1dcf7c)['map'](_0x584bf0=>{const _0x373c66=_0x2adf02,_0x2df6e7=fileText(_0x584bf0);if(_0x584bf0[_0x373c66(0x184)]!==SKILL_FILE)return _0x584bf0;if(hasYamlFrontmatter(_0x2df6e7))return{'path':_0x584bf0[_0x373c66(0x184)],'content':withSyncedDisplayName(_0x2df6e7,_0x268608)};return{'path':_0x584bf0[_0x373c66(0x184)],'content':prependSkillFrontmatter(_0x2df6e7,{'name':_0x1ceca4,'displayName':_0x268608,'description':_0x33e6b4})};});}function hasYamlFrontmatter(_0x2017a6){const _0x44c1b8=a116_0x2d22;return/^\uFEFF?---\s*\r?\n/[_0x44c1b8(0x17c)](_0x2017a6);}function prependSkillFrontmatter(_0x52d687,_0x1df0ec){const _0x21796f=a116_0x2d22,_0x597f8c=_0x52d687[_0x21796f(0x1a1)](/^\uFEFF/,'');return[_0x21796f(0x183),'name:\x20'+yamlString(_0x1df0ec[_0x21796f(0x17b)]),_0x1df0ec[_0x21796f(0x1a2)]?'displayName:\x20'+yamlString(_0x1df0ec[_0x21796f(0x1a2)]):undefined,_0x21796f(0x17f)+yamlString(_0x1df0ec[_0x21796f(0x188)]),'---','',_0x597f8c][_0x21796f(0x177)](_0x2ccd0a=>_0x2ccd0a!==undefined)['join']('\x0a');}function yamlString(_0x23de3e){const _0x9c4a98=a116_0x2d22;return JSON[_0x9c4a98(0x18a)](_0x23de3e['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x2b53f5,_0x5df4bb){const _0x457f71=a116_0x2d22,_0x34f5dd=_0x2b53f5[_0x457f71(0x172)]?.[_0x457f71(0x178)]();return _0x34f5dd||_0x5df4bb;}function withSyncedDisplayName(_0x496e6c,_0x40b29c){const _0x489d67=a116_0x2d22,_0xb2a1f4=_0x496e6c['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xb2a1f4)return _0x496e6c;const _0x21ece8=_0xb2a1f4[0x1]??'',_0x4d155a=_0xb2a1f4[0x2]??'',_0x2bb0a0=parseDocument(_0x4d155a);if(_0x2bb0a0[_0x489d67(0x198)][_0x489d67(0x191)]>0x0||!isMap(_0x2bb0a0[_0x489d67(0x19d)]))return _0x496e6c;if(_0x40b29c)_0x2bb0a0['set'](_0x489d67(0x1a2),_0x40b29c);else{if(_0x2bb0a0[_0x489d67(0x17a)](_0x489d67(0x1a2)))_0x2bb0a0[_0x489d67(0x17d)]('displayName');else return _0x496e6c;}forceBlockCollections(_0x2bb0a0['contents']);const _0xbde8d2=_0x2bb0a0['toString']({'lineWidth':0x0})[_0x489d67(0x195)](),_0x2cf199=_0x496e6c['slice'](_0xb2a1f4[0x0][_0x489d67(0x191)])[_0x489d67(0x1a1)](/^\r?\n/,'');return _0x21ece8+_0x489d67(0x18f)+_0xbde8d2+_0x489d67(0x1a5)+_0x2cf199;}function forceBlockCollections(_0x269ca0){if(!isNode(_0x269ca0))return;visit(_0x269ca0,(_0x5ecc49,_0x39dbc4)=>{isCollection(_0x39dbc4)&&(_0x39dbc4['flow']=![]);});}function a116_0x5597(){const _0x1df205=['113465CWdMvO','contents','696346AnheKK','keys','Managed\x20file\x20was\x20removed\x20locally:\x20','replace','displayName','force','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','\x0a---\x0a\x0a','skillName','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','1869774pgybfk','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','paths','filter','trim','entries','has','name','test','delete','find','description:\x20','43440Svfvwg','contentHash','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---','path','isFile','8LLiiTd','1191NfPNvo','description','env','stringify','fileHashes','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','10sFGGAo','pulledAt','---\x0a','812912vHLpYv','length','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','appCode','map','trimEnd','391887TMLtXP','packageBytes','errors','514jkPqcL','validation','Runtime\x20Skill\x20package\x20is\x20missing\x20'];a116_0x5597=function(){return _0x1df205;};return a116_0x5597();}function ensurePulledFilesCanBeOverwritten(_0xe55267,_0x163e3c,_0xd07140,_0x5022cd){const _0x51fc2a=a116_0x2d22;if(_0x5022cd||!existsSync(_0x163e3c))return;const _0x4433ae=readMetadataIfPresent(_0x163e3c);if(!_0x4433ae)return;const _0x5a7c46=_0x4433ae[_0x51fc2a(0x18b)]&&Object[_0x51fc2a(0x19f)](_0x4433ae[_0x51fc2a(0x18b)])[_0x51fc2a(0x191)]>0x0?_0x4433ae[_0x51fc2a(0x18b)]:undefined;if(_0x5a7c46)for(const [_0x53c5d2,_0x4fcf16]of Object[_0x51fc2a(0x179)](_0x5a7c46)){const _0x1c1b7c=resolveManagedFilePath(_0xe55267,_0x53c5d2);if(!existsSync(_0x1c1b7c))throw CliErrors['validation'](_0x51fc2a(0x182)+_0xe55267,_0x51fc2a(0x1a0)+_0x53c5d2);const _0x2fb1b7=lstatSync(_0x1c1b7c);if(!_0x2fb1b7['isFile']())throw CliErrors[_0x51fc2a(0x19a)](_0x51fc2a(0x182)+_0xe55267,_0x51fc2a(0x1a4)+_0x53c5d2);const _0x1b6d74=bufferSha256(readFileSync(_0x1c1b7c));if(_0x1b6d74!==_0x4fcf16)throw CliErrors['validation'](_0x51fc2a(0x182)+_0xe55267+'.\x20Changed\x20file:\x20'+_0x53c5d2,_0x51fc2a(0x175)+_0x53c5d2);}else{const _0x446fbd=resolve(_0xe55267,SKILL_FILE);if(existsSync(_0x446fbd)&&_0x4433ae[_0x51fc2a(0x181)]){const _0x1f2a0a=contentHash(readFileSync(_0x446fbd,'utf8'));if(_0x1f2a0a!==_0x4433ae[_0x51fc2a(0x181)])throw CliErrors[_0x51fc2a(0x19a)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x446fbd,_0x51fc2a(0x173));}}for(const _0x4b9e08 of normalizeLocalFiles(_0xd07140)){if(_0x5a7c46?.[_0x4b9e08[_0x51fc2a(0x184)]])continue;if(!_0x5a7c46&&_0x4b9e08['path']===SKILL_FILE)continue;const _0x4603fd=resolveManagedFilePath(_0xe55267,_0x4b9e08[_0x51fc2a(0x184)]);if(!existsSync(_0x4603fd))continue;const _0x102d7f=lstatSync(_0x4603fd);if(!_0x102d7f[_0x51fc2a(0x185)]())throw CliErrors[_0x51fc2a(0x19a)](_0x51fc2a(0x182)+_0xe55267,_0x51fc2a(0x18c)+_0x4b9e08[_0x51fc2a(0x184)]);const _0x500039=bufferSha256(readFileSync(_0x4603fd));if(_0x500039!==fileHash(_0x4b9e08))throw CliErrors[_0x51fc2a(0x19a)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xe55267,_0x51fc2a(0x192)+_0x4b9e08['path']);}}function materializeFiles(_0x1f35d5,_0x18b5f6){const _0x4a32af=a116_0x2d22;for(const _0x5293f4 of normalizeLocalFiles(_0x18b5f6)){const _0x52170a=resolveManagedFilePath(_0x1f35d5,_0x5293f4[_0x4a32af(0x184)]);mkdirSync(dirname(_0x52170a),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x52170a,fileContent(_0x5293f4),0x180);}}function removeStaleManagedFiles(_0x2eb4fe,_0x84083,_0x5c1c11){const _0x4e0859=a116_0x2d22;if(!_0x84083)return;const _0x5ae568=new Set(normalizeLocalFiles(_0x5c1c11)[_0x4e0859(0x194)](_0x300339=>_0x300339[_0x4e0859(0x184)]));for(const _0x2059ab of Object[_0x4e0859(0x19f)](_0x84083)){if(_0x5ae568[_0x4e0859(0x17a)](_0x2059ab))continue;const _0x21bc83=resolveManagedFilePath(_0x2eb4fe,_0x2059ab);existsSync(_0x21bc83)&&lstatSync(_0x21bc83)['isFile']()&&rmSync(_0x21bc83,{'force':!![]});}}
1
+ (function(_0x525300,_0x51795f){const _0x50e599=a116_0x2deb,_0x5a05a9=_0x525300();while(!![]){try{const _0x380f7d=parseInt(_0x50e599(0x16b))/0x1+-parseInt(_0x50e599(0x15d))/0x2+-parseInt(_0x50e599(0x156))/0x3*(-parseInt(_0x50e599(0x15c))/0x4)+-parseInt(_0x50e599(0x145))/0x5*(parseInt(_0x50e599(0x143))/0x6)+-parseInt(_0x50e599(0x164))/0x7*(-parseInt(_0x50e599(0x170))/0x8)+parseInt(_0x50e599(0x14a))/0x9+parseInt(_0x50e599(0x144))/0xa*(parseInt(_0x50e599(0x15b))/0xb);if(_0x380f7d===_0x51795f)break;else _0x5a05a9['push'](_0x5a05a9['shift']());}catch(_0x30e6ab){_0x5a05a9['push'](_0x5a05a9['shift']());}}}(a116_0x3ec1,0x1c6f2));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';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';function a116_0x3ec1(){const _0x6fa15a=['64463ysBJuz','trimEnd','path','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','errors','pulledAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','179866irkfIo','isFile','---','find','contents','24aDpvfc','paths','length','skillName','name','map','accessKey','description','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','25290zVuupe','672460CgyIBj','195PpXWMR','delete','force','utf8','packageBytes','10656vesfcl','match','flow','contentHash','keys','displayName:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','toString','Managed\x20file\x20was\x20removed\x20locally:\x20','fileHashes','validation','entries','229254uemwWo','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','has','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','replace','22prXfyy','4ZnTRaV','277472lgOzcU','trim','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','set','displayName','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','slice'];a116_0x3ec1=function(){return _0x6fa15a;};return a116_0x3ec1();}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a116_0x2deb(_0x227872,_0x396ee1){_0x227872=_0x227872-0x142;const _0x3ec1d1=a116_0x3ec1();let _0x2debd3=_0x3ec1d1[_0x227872];return _0x2debd3;}export function materializeRuntimeSkill(_0x5adf47,_0x599905,_0x25b44d){const _0x5e6e6f=a116_0x2deb,_0x588187=requireSkillCode(_0x5adf47),_0x141bce=requirePackageBytes(_0x588187,_0x25b44d[_0x5e6e6f(0x149)]),_0x31fb4c=extractDownloadedPackage(_0x141bce),_0x5e33de=_0x31fb4c[_0x5e6e6f(0x16e)](_0x5083ea=>_0x5083ea['path']===SKILL_FILE);if(!_0x5e33de)throw CliErrors[_0x5e6e6f(0x154)](_0x5e6e6f(0x150)+SKILL_FILE+':\x20'+_0x588187);const _0xdf4661=withMaterializedSkillFrontmatter(_0x31fb4c,_0x5adf47,_0x588187),_0x43d7c=_0xdf4661[_0x5e6e6f(0x16e)](_0x118aeb=>_0x118aeb[_0x5e6e6f(0x166)]===SKILL_FILE),_0x64330f=fileText(_0x43d7c),_0x58a7cf=getRuntimeSkillDir(_0x25b44d['env'],_0x25b44d[_0x5e6e6f(0x176)],_0x25b44d['appCode'],_0x599905,_0x588187,_0x25b44d[_0x5e6e6f(0x171)]),_0x479ff5=resolve(_0x58a7cf,SKILL_FILE),_0x1adaee=resolve(_0x58a7cf,METADATA_FILE),_0x3e2996=contentHash(_0x64330f),_0x1a4bb2=readMetadataIfPresent(_0x1adaee)?.[_0x5e6e6f(0x153)];ensurePulledFilesCanBeOverwritten(_0x58a7cf,_0x1adaee,_0xdf4661,_0x25b44d[_0x5e6e6f(0x147)]===!![]),mkdirSync(_0x58a7cf,{'recursive':!![],'mode':0x1c0});const _0xf89f0b=existsSync(_0x479ff5)?readFileSync(_0x479ff5,_0x5e6e6f(0x148)):undefined;return materializeFiles(_0x58a7cf,_0xdf4661),removeStaleManagedFiles(_0x58a7cf,_0x1a4bb2,_0xdf4661),writeJsonAtomic(_0x1adaee,buildMetadata(_0x5adf47,_0x599905,_0x25b44d['appCode'],_0x3e2996,_0x25b44d[_0x5e6e6f(0x169)],_0xdf4661,_0x141bce)),{'skill':_0x5adf47,'scope':_0x599905,'dir':_0x58a7cf,'skillMdPath':_0x479ff5,'metadataPath':_0x1adaee,'contentHash':_0x3e2996,'changed':_0xf89f0b!==_0x64330f};}function withMaterializedSkillFrontmatter(_0x4fb2c8,_0x19b6a0,_0x56024d){const _0xd61bcc=a116_0x2deb,_0x5e363e=skillDisplayName(_0x19b6a0,_0x56024d),_0x1bd165=_0x19b6a0[_0xd61bcc(0x177)]?.[_0xd61bcc(0x15e)]()||_0x5e363e||_0x56024d;return normalizeLocalFiles(_0x4fb2c8)[_0xd61bcc(0x175)](_0x5eb640=>{const _0x33394e=_0xd61bcc,_0x2eeeef=fileText(_0x5eb640);if(_0x5eb640[_0x33394e(0x166)]!==SKILL_FILE)return _0x5eb640;if(hasYamlFrontmatter(_0x2eeeef))return{'path':_0x5eb640['path'],'content':withSyncedDisplayName(_0x2eeeef,_0x5e363e)};return{'path':_0x5eb640[_0x33394e(0x166)],'content':prependSkillFrontmatter(_0x2eeeef,{'name':_0x56024d,'displayName':_0x5e363e,'description':_0x1bd165})};});}function hasYamlFrontmatter(_0x3f431d){return/^\uFEFF?---\s*\r?\n/['test'](_0x3f431d);}function prependSkillFrontmatter(_0x5c74de,_0x2f6a3b){const _0x246887=a116_0x2deb,_0xc86b25=_0x5c74de['replace'](/^\uFEFF/,'');return[_0x246887(0x16d),'name:\x20'+yamlString(_0x2f6a3b[_0x246887(0x174)]),_0x2f6a3b[_0x246887(0x161)]?_0x246887(0x14f)+yamlString(_0x2f6a3b['displayName']):undefined,'description:\x20'+yamlString(_0x2f6a3b[_0x246887(0x177)]),_0x246887(0x16d),'',_0xc86b25]['filter'](_0x1766c7=>_0x1766c7!==undefined)['join']('\x0a');}function yamlString(_0x472d92){const _0x4969a4=a116_0x2deb;return JSON['stringify'](_0x472d92[_0x4969a4(0x15a)](/\r/g,'')[_0x4969a4(0x15e)]());}function skillDisplayName(_0x2e288d,_0x311ed4){const _0x201a56=a116_0x2deb,_0x4c5909=_0x2e288d[_0x201a56(0x173)]?.[_0x201a56(0x15e)]();return _0x4c5909||_0x311ed4;}function withSyncedDisplayName(_0xbeee4,_0x570848){const _0x5a0c17=a116_0x2deb,_0x1182e2=_0xbeee4[_0x5a0c17(0x14b)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1182e2)return _0xbeee4;const _0x4033da=_0x1182e2[0x1]??'',_0x3709b0=_0x1182e2[0x2]??'',_0x4de21b=parseDocument(_0x3709b0);if(_0x4de21b[_0x5a0c17(0x168)][_0x5a0c17(0x172)]>0x0||!isMap(_0x4de21b[_0x5a0c17(0x16f)]))return _0xbeee4;if(_0x570848)_0x4de21b[_0x5a0c17(0x160)]('displayName',_0x570848);else{if(_0x4de21b[_0x5a0c17(0x158)](_0x5a0c17(0x161)))_0x4de21b[_0x5a0c17(0x146)](_0x5a0c17(0x161));else return _0xbeee4;}forceBlockCollections(_0x4de21b[_0x5a0c17(0x16f)]);const _0x116bc6=_0x4de21b[_0x5a0c17(0x151)]({'lineWidth':0x0})[_0x5a0c17(0x165)](),_0x1a72c3=_0xbeee4[_0x5a0c17(0x163)](_0x1182e2[0x0][_0x5a0c17(0x172)])[_0x5a0c17(0x15a)](/^\r?\n/,'');return _0x4033da+'---\x0a'+_0x116bc6+'\x0a---\x0a\x0a'+_0x1a72c3;}function forceBlockCollections(_0xc0b197){if(!isNode(_0xc0b197))return;visit(_0xc0b197,(_0x278c18,_0x4b527a)=>{const _0x23d23c=a116_0x2deb;isCollection(_0x4b527a)&&(_0x4b527a[_0x23d23c(0x14c)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x4361c2,_0x5bd9bd,_0x24b42f,_0x1dba93){const _0x14d236=a116_0x2deb;if(_0x1dba93||!existsSync(_0x5bd9bd))return;const _0x3f6320=readMetadataIfPresent(_0x5bd9bd);if(!_0x3f6320)return;const _0x31019f=_0x3f6320[_0x14d236(0x153)]&&Object['keys'](_0x3f6320['fileHashes'])[_0x14d236(0x172)]>0x0?_0x3f6320[_0x14d236(0x153)]:undefined;if(_0x31019f)for(const [_0x1c7bcd,_0x23bf4b]of Object[_0x14d236(0x155)](_0x31019f)){const _0x3c2b7f=resolveManagedFilePath(_0x4361c2,_0x1c7bcd);if(!existsSync(_0x3c2b7f))throw CliErrors['validation'](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x152)+_0x1c7bcd);const _0x2a4a20=lstatSync(_0x3c2b7f);if(!_0x2a4a20['isFile']())throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x15f)+_0x1c7bcd);const _0x272841=bufferSha256(readFileSync(_0x3c2b7f));if(_0x272841!==_0x23bf4b)throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2+'.\x20Changed\x20file:\x20'+_0x1c7bcd,_0x14d236(0x167)+_0x1c7bcd);}else{const _0x556c34=resolve(_0x4361c2,SKILL_FILE);if(existsSync(_0x556c34)&&_0x3f6320[_0x14d236(0x14d)]){const _0x2a52a4=contentHash(readFileSync(_0x556c34,'utf8'));if(_0x2a52a4!==_0x3f6320[_0x14d236(0x14d)])throw CliErrors['validation'](_0x14d236(0x162)+_0x556c34,_0x14d236(0x16a));}}for(const _0x1bc5a2 of normalizeLocalFiles(_0x24b42f)){if(_0x31019f?.[_0x1bc5a2['path']])continue;if(!_0x31019f&&_0x1bc5a2[_0x14d236(0x166)]===SKILL_FILE)continue;const _0x1673d5=resolveManagedFilePath(_0x4361c2,_0x1bc5a2[_0x14d236(0x166)]);if(!existsSync(_0x1673d5))continue;const _0x32a085=lstatSync(_0x1673d5);if(!_0x32a085[_0x14d236(0x16c)]())throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x159)+_0x1bc5a2[_0x14d236(0x166)]);const _0x329fb7=bufferSha256(readFileSync(_0x1673d5));if(_0x329fb7!==fileHash(_0x1bc5a2))throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x142)+_0x1bc5a2[_0x14d236(0x166)]);}}function materializeFiles(_0x4bc0c3,_0x499e5f){const _0x38aec4=a116_0x2deb;for(const _0x117fa3 of normalizeLocalFiles(_0x499e5f)){const _0x27f1c2=resolveManagedFilePath(_0x4bc0c3,_0x117fa3[_0x38aec4(0x166)]);mkdirSync(dirname(_0x27f1c2),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x27f1c2,fileContent(_0x117fa3),0x180);}}function removeStaleManagedFiles(_0x1cccb6,_0x18fdf0,_0x2c0524){const _0x5af10b=a116_0x2deb;if(!_0x18fdf0)return;const _0x170abc=new Set(normalizeLocalFiles(_0x2c0524)[_0x5af10b(0x175)](_0x1a85f4=>_0x1a85f4[_0x5af10b(0x166)]));for(const _0x13eefe of Object[_0x5af10b(0x14e)](_0x18fdf0)){if(_0x170abc[_0x5af10b(0x158)](_0x13eefe))continue;const _0xa66aef=resolveManagedFilePath(_0x1cccb6,_0x13eefe);existsSync(_0xa66aef)&&lstatSync(_0xa66aef)['isFile']()&&rmSync(_0xa66aef,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x18218f,_0x2248ea){const _0x25e95c=a117_0x5e45,_0x17de68=_0x18218f();while(!![]){try{const _0x55ee2a=parseInt(_0x25e95c(0x151))/0x1+-parseInt(_0x25e95c(0x156))/0x2+parseInt(_0x25e95c(0x14b))/0x3*(parseInt(_0x25e95c(0x15f))/0x4)+-parseInt(_0x25e95c(0x14f))/0x5*(-parseInt(_0x25e95c(0x15e))/0x6)+-parseInt(_0x25e95c(0x14d))/0x7*(-parseInt(_0x25e95c(0x142))/0x8)+parseInt(_0x25e95c(0x15b))/0x9+-parseInt(_0x25e95c(0x158))/0xa;if(_0x55ee2a===_0x2248ea)break;else _0x17de68['push'](_0x17de68['shift']());}catch(_0x11f530){_0x17de68['push'](_0x17de68['shift']());}}}(a117_0x4957,0x3ea23));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a117_0x5e45(_0x2cf96e,_0x9c2fd7){_0x2cf96e=_0x2cf96e-0x140;const _0x49578e=a117_0x4957();let _0x5e4552=_0x49578e[_0x2cf96e];return _0x5e4552;}function a117_0x4957(){const _0x1c4ecc=['zipSize','sourceSessionId','isArray','readonly','personal','Invalid\x20','string','tenantCode','209968LwdJgk','ossPath','validation','tags','skillName','path','zipSha256','object','files','77538hwaLWp','userId','42yWehYj','fromEntries','44335LOwlfx','parse','377689NlwtOD','forkedFromVersion','length','forkedFromSkillId','description','634256mgudiA','Runtime\x20Skill\x20is\x20missing\x20skillCode.','10273470APCSyI','trim','version','4600836pNjSYK','manifest','map','78gCujen','68vYSVPO'];a117_0x4957=function(){return _0x1c4ecc;};return a117_0x4957();}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(_0x4da2bb,_0x35b7fe,_0x3e1d2a,_0x4e2ff2,_0x571d17,_0x27c2d4,_0x39dae7){const _0xf4a869=a117_0x5e45,_0x32512e=_0x27c2d4?normalizeLocalFiles(_0x27c2d4):[],_0x2b2e96=!_0x39dae7&&_0x32512e['length']>0x0?buildSkillPackage(_0x32512e):undefined,_0x34b78d=_0x39dae7?bufferSha256(_0x39dae7):_0x2b2e96?.[_0xf4a869(0x15c)][_0xf4a869(0x148)],_0x542800=_0x39dae7?.[_0xf4a869(0x153)]??_0x2b2e96?.['manifest'][_0xf4a869(0x160)],_0x3a807b=_0x32512e[_0xf4a869(0x153)]>0x0?Object[_0xf4a869(0x14e)](_0x32512e[_0xf4a869(0x15d)](_0x143efc=>[_0x143efc['path'],fileHash(_0x143efc)])):undefined;return{'schemaVersion':_0x32512e['length']>0x0?0x2:0x1,'id':_0x4da2bb['id'],'appCode':_0x3e1d2a,'skillCode':requireSkillCode(_0x4da2bb),'skillName':_0x4da2bb[_0xf4a869(0x146)],'description':_0x4da2bb[_0xf4a869(0x155)],'scope':_0x35b7fe,'readonly':_0x35b7fe!==_0xf4a869(0x164)||_0x4da2bb[_0xf4a869(0x163)]===!![],'tenantCode':_0x4da2bb[_0xf4a869(0x141)],'userId':_0x4da2bb[_0xf4a869(0x14c)],'version':_0x4da2bb[_0xf4a869(0x15a)],'status':_0x4da2bb['status'],'tags':Array[_0xf4a869(0x162)](_0x4da2bb[_0xf4a869(0x145)])?_0x4da2bb[_0xf4a869(0x145)]:[],'hasUpstreamUpdate':_0x4da2bb['hasUpstreamUpdate'],'forkedFromSkillId':_0x4da2bb[_0xf4a869(0x154)],'forkedFromVersion':_0x4da2bb[_0xf4a869(0x152)],'sourceSessionId':_0x4da2bb[_0xf4a869(0x161)],'contentHash':_0x4e2ff2,'fileHashes':_0x3a807b,'treeHash':_0x32512e['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x32512e)):undefined,'ossPath':remoteManifestOssPath(_0x4da2bb[_0xf4a869(0x14a)]),'zipSha256':_0x34b78d,'zipSize':_0x542800,'files':_0x32512e['length']>0x0?_0x32512e['map'](_0x4b5ccd=>({'path':_0x4b5ccd[_0xf4a869(0x147)],'hash':fileHash(_0x4b5ccd),'size':fileContent(_0x4b5ccd)[_0xf4a869(0x153)]})):undefined,'pulledAt':_0x571d17??new Date()['toISOString']()};}export function requireSkillCode(_0x1404e0){const _0x471f6b=a117_0x5e45,_0x7d6aa1=_0x1404e0['skillCode']?.[_0x471f6b(0x159)]();if(!_0x7d6aa1)throw CliErrors[_0x471f6b(0x144)](_0x471f6b(0x157));return _0x7d6aa1;}export function readMetadataIfPresent(_0x400ebc){const _0x363b1f=a117_0x5e45;if(!existsSync(_0x400ebc))return undefined;try{const _0x3488e4=JSON[_0x363b1f(0x150)](readFileSync(_0x400ebc,'utf8'));return _0x3488e4;}catch{throw CliErrors[_0x363b1f(0x144)](_0x363b1f(0x165)+METADATA_FILE+':\x20'+_0x400ebc);}}function remoteManifestOssPath(_0x49b073){const _0x47324a=a117_0x5e45;if(!_0x49b073||typeof _0x49b073!==_0x47324a(0x149)||Array[_0x47324a(0x162)](_0x49b073))return undefined;const _0x11cb14=_0x49b073[_0x47324a(0x143)];return typeof _0x11cb14===_0x47324a(0x140)&&_0x11cb14[_0x47324a(0x159)]()?_0x11cb14[_0x47324a(0x159)]():undefined;}
1
+ (function(_0x4b9bc0,_0x2763d8){const _0x4d58cc=a117_0x31a5,_0x20cf03=_0x4b9bc0();while(!![]){try{const _0x316840=-parseInt(_0x4d58cc(0xb2))/0x1+parseInt(_0x4d58cc(0xb8))/0x2*(-parseInt(_0x4d58cc(0xcb))/0x3)+-parseInt(_0x4d58cc(0xb9))/0x4*(parseInt(_0x4d58cc(0xc2))/0x5)+parseInt(_0x4d58cc(0xc4))/0x6*(-parseInt(_0x4d58cc(0xcc))/0x7)+parseInt(_0x4d58cc(0xb1))/0x8*(-parseInt(_0x4d58cc(0xca))/0x9)+parseInt(_0x4d58cc(0xb5))/0xa+parseInt(_0x4d58cc(0xc0))/0xb*(parseInt(_0x4d58cc(0xbb))/0xc);if(_0x316840===_0x2763d8)break;else _0x20cf03['push'](_0x20cf03['shift']());}catch(_0x1ae3c6){_0x20cf03['push'](_0x20cf03['shift']());}}}(a117_0x35f6,0xc3389));function a117_0x35f6(){const _0x51d8eb=['644936txydGq','15848PwCBFs','skillCode','35341224gUNBhe','manifest','object','utf8','sourceSessionId','11fWUfHy','forkedFromVersion','175ViBVjd','isArray','6liFeJi','readonly','Runtime\x20Skill\x20is\x20missing\x20skillCode.','ossPath','length','forkedFromSkillId','1446138FGOZQi','12fSmrPF','7404586eEDZlV','zipSize','map','validation','userId','fromEntries','8IdUUfc','949309UrJyzL','toISOString','trim','14508540DhmoKJ','Invalid\x20','status'];a117_0x35f6=function(){return _0x51d8eb;};return a117_0x35f6();}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(_0x15b571,_0x41313c,_0x4f193a,_0x4cfc5a,_0x1b8de6,_0x241a83,_0x408ee8){const _0x226747=a117_0x31a5,_0x2c2efc=_0x241a83?normalizeLocalFiles(_0x241a83):[],_0x3e9ac7=!_0x408ee8&&_0x2c2efc['length']>0x0?buildSkillPackage(_0x2c2efc):undefined,_0xe32f3e=_0x408ee8?bufferSha256(_0x408ee8):_0x3e9ac7?.[_0x226747(0xbc)]['zipSha256'],_0x4ab03c=_0x408ee8?.[_0x226747(0xc8)]??_0x3e9ac7?.['manifest'][_0x226747(0xcd)],_0xa988c2=_0x2c2efc[_0x226747(0xc8)]>0x0?Object[_0x226747(0xb0)](_0x2c2efc[_0x226747(0xce)](_0x4d8ba3=>[_0x4d8ba3['path'],fileHash(_0x4d8ba3)])):undefined;return{'schemaVersion':_0x2c2efc[_0x226747(0xc8)]>0x0?0x2:0x1,'id':_0x15b571['id'],'appCode':_0x4f193a,'skillCode':requireSkillCode(_0x15b571),'skillName':_0x15b571['skillName'],'description':_0x15b571['description'],'scope':_0x41313c,'readonly':_0x41313c!=='personal'||_0x15b571[_0x226747(0xc5)]===!![],'tenantCode':_0x15b571['tenantCode'],'userId':_0x15b571[_0x226747(0xd0)],'version':_0x15b571['version'],'status':_0x15b571[_0x226747(0xb7)],'tags':Array[_0x226747(0xc3)](_0x15b571['tags'])?_0x15b571['tags']:[],'hasUpstreamUpdate':_0x15b571['hasUpstreamUpdate'],'forkedFromSkillId':_0x15b571[_0x226747(0xc9)],'forkedFromVersion':_0x15b571[_0x226747(0xc1)],'sourceSessionId':_0x15b571[_0x226747(0xbf)],'contentHash':_0x4cfc5a,'fileHashes':_0xa988c2,'treeHash':_0x2c2efc[_0x226747(0xc8)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2c2efc)):undefined,'ossPath':remoteManifestOssPath(_0x15b571['files']),'zipSha256':_0xe32f3e,'zipSize':_0x4ab03c,'files':_0x2c2efc[_0x226747(0xc8)]>0x0?_0x2c2efc['map'](_0x37fea8=>({'path':_0x37fea8['path'],'hash':fileHash(_0x37fea8),'size':fileContent(_0x37fea8)[_0x226747(0xc8)]})):undefined,'pulledAt':_0x1b8de6??new Date()[_0x226747(0xb3)]()};}export function requireSkillCode(_0x1e4354){const _0x5b910b=a117_0x31a5,_0x4350db=_0x1e4354[_0x5b910b(0xba)]?.[_0x5b910b(0xb4)]();if(!_0x4350db)throw CliErrors[_0x5b910b(0xcf)](_0x5b910b(0xc6));return _0x4350db;}function a117_0x31a5(_0x5d1645,_0x1f6155){_0x5d1645=_0x5d1645-0xb0;const _0x35f687=a117_0x35f6();let _0x31a5fc=_0x35f687[_0x5d1645];return _0x31a5fc;}export function readMetadataIfPresent(_0x183cda){const _0x33c0ba=a117_0x31a5;if(!existsSync(_0x183cda))return undefined;try{const _0x2c3b5a=JSON['parse'](readFileSync(_0x183cda,_0x33c0ba(0xbe)));return _0x2c3b5a;}catch{throw CliErrors[_0x33c0ba(0xcf)](_0x33c0ba(0xb6)+METADATA_FILE+':\x20'+_0x183cda);}}function remoteManifestOssPath(_0x25725f){const _0x1d80c3=a117_0x31a5;if(!_0x25725f||typeof _0x25725f!==_0x1d80c3(0xbd)||Array['isArray'](_0x25725f))return undefined;const _0x3bbdb0=_0x25725f[_0x1d80c3(0xc7)];return typeof _0x3bbdb0==='string'&&_0x3bbdb0[_0x1d80c3(0xb4)]()?_0x3bbdb0[_0x1d80c3(0xb4)]():undefined;}
@@ -1 +1 @@
1
- const a118_0x1385ed=a118_0x4c6c;(function(_0x3a715a,_0x3b191e){const _0x1961f1=a118_0x4c6c,_0x230231=_0x3a715a();while(!![]){try{const _0x5cffc5=parseInt(_0x1961f1(0x204))/0x1*(parseInt(_0x1961f1(0x208))/0x2)+parseInt(_0x1961f1(0x1fd))/0x3+parseInt(_0x1961f1(0x1f7))/0x4*(parseInt(_0x1961f1(0x1f2))/0x5)+parseInt(_0x1961f1(0x202))/0x6+parseInt(_0x1961f1(0x1fc))/0x7*(-parseInt(_0x1961f1(0x1ef))/0x8)+parseInt(_0x1961f1(0x1ed))/0x9+parseInt(_0x1961f1(0x1f8))/0xa*(-parseInt(_0x1961f1(0x200))/0xb);if(_0x5cffc5===_0x3b191e)break;else _0x230231['push'](_0x230231['shift']());}catch(_0x1ff493){_0x230231['push'](_0x230231['shift']());}}}(a118_0x523b,0x76e9f));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';function a118_0x523b(){const _0x3619fd=['26816WyRdwP','Unsafe\x20','.workbuddy','1138925liqRoJ','CLAUDE_SKILL_ROOT','filter','path\x20segment','\x20for\x20local\x20path:\x20','12dEcIAG','10YHMEfH','includes','.agents','SKILL_ROOT','1246PLMhfU','2157417JnJxhc','appCode','claudeSkillsDir','23085667GvFEYi','cacheRoot','5536524ewLQsu','homeDirName','3697qkjDkd','.claude','validation','homeDir','26sYKbIs','skills','workbuddySkillsDir','7282035LXROHk','agentsSkillsDir'];a118_0x523b=function(){return _0x3619fd;};return a118_0x523b();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x2c8a73={}){const _0x209308=a118_0x4c6c,_0x3cd995=_0x2c8a73[_0x209308(0x207)]??homedir(),_0x260261=resolve(_0x3cd995,PRODUCT_CONFIG['homeDirName'],'cache'),_0x26ac3a=trimmedEnv(_0x209308(0x1fb)),_0x251b89=trimmedEnv(_0x209308(0x1f3)),_0x245037=resolve(_0x3cd995,_0x209308(0x1f1)),_0x11d68a=_0x2c8a73[_0x209308(0x1ec)]??(existsSync(_0x245037)?resolve(_0x245037,'skills'):undefined);return{'homeDir':_0x3cd995,'cacheRoot':_0x260261,'managedRoot':resolve(_0x3cd995,PRODUCT_CONFIG[_0x209308(0x203)]),'agentsSkillsDir':_0x2c8a73['agentsSkillsDir']??_0x26ac3a??resolve(_0x3cd995,_0x209308(0x1fa),_0x209308(0x209)),'claudeSkillsDir':_0x2c8a73[_0x209308(0x1ff)]??_0x251b89??resolve(_0x3cd995,_0x209308(0x205),_0x209308(0x209)),'workbuddySkillsDir':_0x11d68a};}export function runtimeAgentSkillRoots(_0x2bd930){const _0x16c276=a118_0x4c6c;return[_0x2bd930[_0x16c276(0x1ee)],_0x2bd930[_0x16c276(0x1ff)],_0x2bd930[_0x16c276(0x1ec)]][_0x16c276(0x1f4)](_0x5ba305=>Boolean(_0x5ba305));}export function getRuntimeSkillCacheRoot(_0x4175b3,_0x61c3ca,_0x2d36a0={}){const _0x2d8789=a118_0x4c6c,_0x1f01ae=resolveSkillSyncPaths(_0x2d36a0);return resolve(_0x1f01ae[_0x2d8789(0x201)],_0x4175b3,fingerprintAccessKey(_0x61c3ca),_0x2d8789(0x209));}function a118_0x4c6c(_0xce5e51,_0x44e258){_0xce5e51=_0xce5e51-0x1ec;const _0x523b51=a118_0x523b();let _0x4c6c7b=_0x523b51[_0xce5e51];return _0x4c6c7b;}export function getRuntimeSkillDir(_0x84c9a2,_0x1c4cdd,_0x57bdfc,_0x143748,_0x561e13,_0x4b2951={}){const _0x2073e2=a118_0x4c6c;return resolve(getRuntimeSkillCacheRoot(_0x84c9a2,_0x1c4cdd,_0x4b2951),safePathSegment(_0x57bdfc,_0x2073e2(0x1fe)),_0x143748,safePathSegment(_0x561e13,'skillCode'));}export function safePathSegment(_0x4ab762,_0x90d51d=a118_0x1385ed(0x1f5)){const _0x53d180=a118_0x1385ed;if(!_0x4ab762||_0x4ab762[_0x53d180(0x1f9)]('/')||_0x4ab762[_0x53d180(0x1f9)]('\x5c')||_0x4ab762['includes']('..'))throw CliErrors[_0x53d180(0x206)](_0x53d180(0x1f0)+_0x90d51d+_0x53d180(0x1f6)+_0x4ab762);return _0x4ab762;}function trimmedEnv(_0x46d730){const _0x40909f=productEnv(_0x46d730)?.['trim']();return _0x40909f?_0x40909f:undefined;}
1
+ function a118_0x503a(_0x39a012,_0x9cc9f5){_0x39a012=_0x39a012-0x13b;const _0x34d35e=a118_0x34d3();let _0x503a68=_0x34d35e[_0x39a012];return _0x503a68;}const a118_0x1034f7=a118_0x503a;(function(_0x3873e6,_0x525280){const _0x4a1d30=a118_0x503a,_0x5b1eb9=_0x3873e6();while(!![]){try{const _0x1447ce=parseInt(_0x4a1d30(0x143))/0x1*(-parseInt(_0x4a1d30(0x14b))/0x2)+-parseInt(_0x4a1d30(0x151))/0x3+parseInt(_0x4a1d30(0x142))/0x4+parseInt(_0x4a1d30(0x14c))/0x5*(-parseInt(_0x4a1d30(0x149))/0x6)+parseInt(_0x4a1d30(0x152))/0x7*(parseInt(_0x4a1d30(0x157))/0x8)+parseInt(_0x4a1d30(0x14f))/0x9+parseInt(_0x4a1d30(0x146))/0xa*(parseInt(_0x4a1d30(0x155))/0xb);if(_0x1447ce===_0x525280)break;else _0x5b1eb9['push'](_0x5b1eb9['shift']());}catch(_0x19e00b){_0x5b1eb9['push'](_0x5b1eb9['shift']());}}}(a118_0x34d3,0x83fe6));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(_0xa603f2={}){const _0x19d338=a118_0x503a,_0x996bfb=_0xa603f2[_0x19d338(0x147)]??homedir(),_0x3715bb=resolve(_0x996bfb,PRODUCT_CONFIG[_0x19d338(0x13b)],_0x19d338(0x13d)),_0x147787=trimmedEnv(_0x19d338(0x144)),_0x2ad578=trimmedEnv(_0x19d338(0x13f)),_0x3f5ef8=resolve(_0x996bfb,'.workbuddy'),_0x500380=_0xa603f2[_0x19d338(0x13e)]??(existsSync(_0x3f5ef8)?resolve(_0x3f5ef8,_0x19d338(0x14d)):undefined);return{'homeDir':_0x996bfb,'cacheRoot':_0x3715bb,'managedRoot':resolve(_0x996bfb,PRODUCT_CONFIG[_0x19d338(0x13b)]),'agentsSkillsDir':_0xa603f2['agentsSkillsDir']??_0x147787??resolve(_0x996bfb,_0x19d338(0x156),'skills'),'claudeSkillsDir':_0xa603f2[_0x19d338(0x154)]??_0x2ad578??resolve(_0x996bfb,_0x19d338(0x14a),_0x19d338(0x14d)),'workbuddySkillsDir':_0x500380};}export function runtimeAgentSkillRoots(_0x20c83e){const _0x51ecc6=a118_0x503a;return[_0x20c83e[_0x51ecc6(0x148)],_0x20c83e['claudeSkillsDir'],_0x20c83e[_0x51ecc6(0x13e)]][_0x51ecc6(0x150)](_0x2665e6=>Boolean(_0x2665e6));}export function getRuntimeSkillCacheRoot(_0x4a545e,_0x2050d6,_0x287623={}){const _0xe47735=a118_0x503a,_0x2160c7=resolveSkillSyncPaths(_0x287623);return resolve(_0x2160c7[_0xe47735(0x145)],_0x4a545e,fingerprintAccessKey(_0x2050d6),_0xe47735(0x14d));}export function getRuntimeSkillDir(_0x4813d9,_0x5c569f,_0x55b28c,_0x1074c9,_0x1128ce,_0x28bb79={}){const _0x4e2914=a118_0x503a;return resolve(getRuntimeSkillCacheRoot(_0x4813d9,_0x5c569f,_0x28bb79),safePathSegment(_0x55b28c,_0x4e2914(0x14e)),_0x1074c9,safePathSegment(_0x1128ce,_0x4e2914(0x153)));}export function safePathSegment(_0x41c72d,_0x4cb9ee=a118_0x1034f7(0x141)){const _0x539b1b=a118_0x1034f7;if(!_0x41c72d||_0x41c72d[_0x539b1b(0x13c)]('/')||_0x41c72d[_0x539b1b(0x13c)]('\x5c')||_0x41c72d[_0x539b1b(0x13c)]('..'))throw CliErrors[_0x539b1b(0x140)]('Unsafe\x20'+_0x4cb9ee+'\x20for\x20local\x20path:\x20'+_0x41c72d);return _0x41c72d;}function a118_0x34d3(){const _0x5c2c14=['322wPoUvc','skillCode','claudeSkillsDir','44UeUIVe','.agents','156368PbApgV','homeDirName','includes','cache','workbuddySkillsDir','CLAUDE_SKILL_ROOT','validation','path\x20segment','3135896zLmaDY','9FjizzF','SKILL_ROOT','cacheRoot','2076200QinwZx','homeDir','agentsSkillsDir','3289542Flkqzq','.claude','194182qIUBzo','5ZNevtK','skills','appCode','1115622GoKwlL','filter','2024418egBAHx'];a118_0x34d3=function(){return _0x5c2c14;};return a118_0x34d3();}function trimmedEnv(_0x27b7c8){const _0x545cff=productEnv(_0x27b7c8)?.['trim']();return _0x545cff?_0x545cff:undefined;}
@@ -1 +1 @@
1
- (function(_0x1899be,_0x4144d1){const _0x5dda7d=a119_0x1306,_0x36b34b=_0x1899be();while(!![]){try{const _0x1c9642=-parseInt(_0x5dda7d(0x1b4))/0x1+parseInt(_0x5dda7d(0x1ad))/0x2*(parseInt(_0x5dda7d(0x1cc))/0x3)+parseInt(_0x5dda7d(0x1d6))/0x4*(parseInt(_0x5dda7d(0x1af))/0x5)+-parseInt(_0x5dda7d(0x1c1))/0x6*(-parseInt(_0x5dda7d(0x1d1))/0x7)+parseInt(_0x5dda7d(0x1be))/0x8+-parseInt(_0x5dda7d(0x1cb))/0x9*(-parseInt(_0x5dda7d(0x1b7))/0xa)+parseInt(_0x5dda7d(0x1d7))/0xb*(-parseInt(_0x5dda7d(0x1ca))/0xc);if(_0x1c9642===_0x4144d1)break;else _0x36b34b['push'](_0x36b34b['shift']());}catch(_0xe1d221){_0x36b34b['push'](_0x36b34b['shift']());}}}(a119_0x2061,0xb2d96));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a119_0x27d64b}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a119_0x2061(){const _0x311673=['697092zVFYWQ','218471wydVTn','trim','version','replace','appCode','files','description','object','toLowerCase','scope','allowAppCodeRetarget','isFile','slice','manifest','name','some','find','pushedAt','ignoreMetadataSkillCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','string','metadata','(unknown)','10OLPeXS','skillCode','10eDydgz','\x20has\x20scope=\x22','ignoreMetadataScope','Skill\x20metadata\x20appCode\x20\x22','isArray','1317670IHFovt','ignoreInvalidMetadata','isDirectory','20rEFBys','builtin','utf8','packageBase64','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','personal','tags','4282040gGnvNd','dir','content','47880TrxMoh','sourceSessionId','skillName',',\x20or\x20directory\x20name.','validation','ignoreMetadataForPayload','refreshedAt','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','828IGZFrj','1766223QbzZCq','793446FleuYl','excludedFilePaths','path','filter','targetScope','721nJWedz','\x20name\x20for\x20SkillHub\x20slug\x20generation.','Remote\x20Skill\x20','unknown','Unable\x20to\x20resolve\x20skillCode\x20from\x20'];a119_0x2061=function(){return _0x311673;};return a119_0x2061();}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x186889,_0x544f90,_0x408006={}){const _0x350276=a119_0x1306,_0x1f9199=resolvePushDirectoryRoot(_0x186889),_0x2ca345=readPushMetadataIfPresent(resolve(_0x1f9199,METADATA_FILE),{'ignoreInvalidMetadata':_0x408006[_0x350276(0x1b5)]});if(_0x2ca345?.[_0x350276(0x1db)]&&_0x2ca345[_0x350276(0x1db)]!==_0x544f90&&!_0x408006[_0x350276(0x1e1)]&&!_0x408006['ignoreMetadataAppCodeMismatch'])throw CliErrors['validation'](_0x350276(0x1b2)+_0x2ca345['appCode']+_0x350276(0x1c9)+_0x544f90+'\x22.');const _0x43abc3=resolvePushSkillCode(_0x1f9199,_0x544f90,_0x2ca345,_0x408006);if(!_0x43abc3)throw CliErrors[_0x350276(0x1c5)](_0x350276(0x1d5)+SKILL_FILE+',\x20'+METADATA_FILE+_0x350276(0x1c4));return{'dir':_0x1f9199,'skillCode':_0x43abc3,'metadata':_0x2ca345};}export function readPushDirectory(_0x5910af,_0x34806f,_0x46f259={}){const _0x5bd87d=a119_0x1306,_0x1af94a=resolvePushDirectoryIdentity(_0x5910af,_0x34806f,_0x46f259),_0x131fcc=_0x1af94a[_0x5bd87d(0x1bf)],_0x5e15c8=resolve(_0x131fcc,SKILL_FILE);if(!existsSync(_0x5e15c8)||!lstatSync(_0x5e15c8)[_0x5bd87d(0x1e2)]())throw CliErrors[_0x5bd87d(0x1c5)]('Missing\x20'+SKILL_FILE+':\x20'+_0x5e15c8);const _0x4724dc=_0x1af94a[_0x5bd87d(0x1ab)],_0x207f13=_0x46f259[_0x5bd87d(0x1d0)]??_0x5bd87d(0x1bc);if(!_0x46f259[_0x5bd87d(0x1b1)]&&_0x4724dc?.[_0x5bd87d(0x1e0)]===_0x5bd87d(0x1b8))throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x5bd87d(0x1b0)+_0x4724dc[_0x5bd87d(0x1e0)]+'\x22.');if(!_0x46f259[_0x5bd87d(0x1b1)]&&_0x207f13==='personal'&&_0x4724dc?.[_0x5bd87d(0x1e0)]&&_0x4724dc['scope']!==_0x5bd87d(0x1bc))throw CliErrors[_0x5bd87d(0x1c5)](_0x5bd87d(0x1a9)+METADATA_FILE+_0x5bd87d(0x1b0)+_0x4724dc[_0x5bd87d(0x1e0)]+'\x22.',_0x5bd87d(0x1bb)+_0x131fcc+_0x5bd87d(0x1c8));const _0x3f79b9=scanSkillDirectory(_0x131fcc,{'excludedFilePaths':_0x46f259[_0x5bd87d(0x1cd)]}),_0x2237df=buildSkillPackage(_0x3f79b9),_0x3dd76d=readFileSync(_0x5e15c8,_0x5bd87d(0x1b9)),_0x5a405e=_0x1af94a[_0x5bd87d(0x1ae)],_0xc31f88=_0x46f259[_0x5bd87d(0x1c6)]?undefined:_0x4724dc,_0x5deba9=readSkillDisplayName(_0x3dd76d);return{'skillCode':_0x5a405e,'metadata':_0x4724dc,'frontmatterDisplayName':_0x5deba9,'input':{'skillCode':_0x5a405e,'skillName':_0x5deba9??_0xc31f88?.[_0x5bd87d(0x1c3)],'description':_0xc31f88?.['description'],'content':_0x3dd76d,'files':_0x2237df[_0x5bd87d(0x1e4)],'packageBase64':_0x2237df[_0x5bd87d(0x1ba)],'tags':_0xc31f88?.[_0x5bd87d(0x1bd)],'version':_0xc31f88?.[_0x5bd87d(0x1d9)],'sourceSessionId':_0xc31f88?.[_0x5bd87d(0x1c2)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5c7a4,_0x104c67,_0x564f3f,_0x3fb83d={}){const _0x1a759c=a119_0x1306,_0x84c1e2=resolvePushDirectoryRoot(_0x5c7a4),_0xcf7952=readPushMetadataIfPresent(resolve(_0x84c1e2,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x488a2e=requireRemoteScope(_0x104c67),_0x587eac=readLocalSkillContent(_0x84c1e2),_0x32ba6f={..._0x104c67,'appCode':_0x104c67['appCode']??_0x564f3f,'skillName':_0x104c67[_0x1a759c(0x1c3)]??_0xcf7952?.['skillName'],'description':_0x104c67[_0x1a759c(0x1dd)]??_0xcf7952?.['description'],'tags':Array[_0x1a759c(0x1b3)](_0x104c67[_0x1a759c(0x1bd)])?_0x104c67['tags']:_0xcf7952?.['tags'],'sourceSessionId':_0x104c67[_0x1a759c(0x1c2)]??_0xcf7952?.['sourceSessionId'],'content':_0x104c67['content']??_0x587eac},_0x9a2a72=buildMetadata(_0x32ba6f,_0x488a2e,_0x564f3f,contentHash(_0x587eac),_0x3fb83d[_0x1a759c(0x1c7)]);writeJsonAtomic(resolve(_0x84c1e2,METADATA_FILE),_0x9a2a72);}export function recordPushedRuntimeSkill(_0x40caf1,_0x59cce0,_0x2efd52,_0x29462a={}){const _0x28eebb=a119_0x1306,_0x252bda=resolvePushDirectoryRoot(_0x40caf1),_0x23b3bd=scanSkillDirectory(_0x252bda),_0x164003=_0x23b3bd[_0x28eebb(0x1e7)](_0x2b9907=>_0x2b9907['path']===SKILL_FILE),_0x1cb26b=_0x164003?fileText(_0x164003):'',_0x144c88=tryNormalizePackageManifest(_0x59cce0[_0x28eebb(0x1dc)]),_0x2b2893={..._0x59cce0,'content':_0x59cce0[_0x28eebb(0x1c0)]??_0x1cb26b,'files':_0x144c88},_0x59fb80=_0x144c88?normalizeLocalFiles(_0x23b3bd)[_0x28eebb(0x1cf)](_0x388716=>_0x144c88[_0x28eebb(0x1dc)][_0x28eebb(0x1e6)](_0x2e41f3=>_0x2e41f3[_0x28eebb(0x1ce)]===_0x388716[_0x28eebb(0x1ce)])):undefined,_0x3b80a2=buildMetadata(_0x2b2893,_0x29462a[_0x28eebb(0x1e0)]??_0x28eebb(0x1bc),_0x2efd52,contentHash(_0x2b2893['content']??''),_0x29462a[_0x28eebb(0x1a7)],_0x59fb80);writeJsonAtomic(resolve(_0x252bda,METADATA_FILE),_0x3b80a2);}export function deriveSkillCodeFromDirectory(_0xde269e,_0x28774c){const _0xa08083=a119_0x1306,_0xa058c9=basename(resolve(_0xde269e)),_0x189869=_0x28774c+'--';return _0xa058c9['startsWith'](_0x189869)?_0xa058c9[_0xa08083(0x1e3)](_0x189869['length']):_0xa058c9;}function a119_0x1306(_0x2f99b1,_0x4f896f){_0x2f99b1=_0x2f99b1-0x1a7;const _0x2061b6=a119_0x2061();let _0x13061=_0x2061b6[_0x2f99b1];return _0x13061;}function resolvePushSkillCode(_0x22092c,_0x374029,_0x24cb40,_0x5ddeb1){const _0x2763c3=a119_0x1306,_0xf41d3e=deriveSkillCodeFromSkillFile(_0x22092c)||deriveSkillCodeFromDirectory(_0x22092c,_0x374029);if(_0x5ddeb1[_0x2763c3(0x1a8)])return _0xf41d3e;return _0x24cb40?.['skillCode']?.['trim']()||_0xf41d3e;}function deriveSkillCodeFromSkillFile(_0x51091a){const _0x136afd=a119_0x1306,_0x80814b=resolve(_0x51091a,SKILL_FILE);if(!existsSync(_0x80814b)||!lstatSync(_0x80814b)[_0x136afd(0x1e2)]())return undefined;const _0x3be4c2=readFileSync(_0x80814b,_0x136afd(0x1b9)),_0xa8772b=_0x3be4c2['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa8772b)return undefined;const _0x38c0c0=parseFrontmatterObject(_0xa8772b[0x1]??''),_0x3b2866=scalarToString(_0x38c0c0?.[_0x136afd(0x1e5)]);return _0x3b2866?slugifySkillName(_0x3b2866):undefined;}function readSkillDisplayName(_0x4f90ac){const _0x1fdd78=_0x4f90ac['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1fdd78)return undefined;const _0x16ac39=parseFrontmatterObject(_0x1fdd78[0x1]??'');return scalarToString(_0x16ac39?.['displayName']);}function slugifySkillName(_0x27b80c){const _0x5aaffd=a119_0x1306,_0x276c40=_0x27b80c[_0x5aaffd(0x1d8)]()[_0x5aaffd(0x1df)]()[_0x5aaffd(0x1da)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x5aaffd(0x1da)](/^-+/,'')[_0x5aaffd(0x1da)](/-+$/,'')[_0x5aaffd(0x1da)](/-{2,}/g,'-');if(!_0x276c40)throw CliErrors[_0x5aaffd(0x1c5)]('Invalid\x20'+SKILL_FILE+_0x5aaffd(0x1d2));return _0x276c40;}function parseFrontmatterObject(_0x1b1f34){const _0x4fb491=a119_0x1306;try{const _0x243c22=a119_0x27d64b(_0x1b1f34);return _0x243c22&&typeof _0x243c22===_0x4fb491(0x1de)&&!Array['isArray'](_0x243c22)?_0x243c22:undefined;}catch{return undefined;}}function scalarToString(_0x4b10be){const _0x10a24f=a119_0x1306;if(typeof _0x4b10be===_0x10a24f(0x1aa))return _0x4b10be[_0x10a24f(0x1d8)]();if(typeof _0x4b10be==='number'||typeof _0x4b10be==='boolean')return String(_0x4b10be);return undefined;}function resolvePushDirectoryRoot(_0x4dee2a){const _0x375bcf=a119_0x1306,_0x34cb96=resolve(_0x4dee2a);if(!existsSync(_0x34cb96))throw CliErrors[_0x375bcf(0x1c5)]('Skill\x20directory\x20not\x20found:\x20'+_0x4dee2a);const _0x2ebebf=lstatSync(_0x34cb96);if(_0x2ebebf['isDirectory']())return _0x34cb96;if(_0x2ebebf['isSymbolicLink']()){const _0x44df21=realpathSync(_0x34cb96);if(lstatSync(_0x44df21)[_0x375bcf(0x1b6)]())return _0x44df21;}throw CliErrors[_0x375bcf(0x1c5)]('Skill\x20directory\x20not\x20found:\x20'+_0x4dee2a);}function requireRemoteScope(_0x5d4aaf){const _0x132ec0=a119_0x1306;if(_0x5d4aaf[_0x132ec0(0x1e0)]===_0x132ec0(0x1bc)||_0x5d4aaf[_0x132ec0(0x1e0)]==='company'||_0x5d4aaf[_0x132ec0(0x1e0)]===_0x132ec0(0x1b8))return _0x5d4aaf['scope'];throw CliErrors[_0x132ec0(0x1c5)](_0x132ec0(0x1d3)+(_0x5d4aaf[_0x132ec0(0x1ae)]||_0x132ec0(0x1ac))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x5d4aaf['scope']??_0x132ec0(0x1d4))+'\x22.');}function readLocalSkillContent(_0x47411e){const _0x149dbe=a119_0x1306,_0x9e3e9=resolve(_0x47411e,SKILL_FILE);return existsSync(_0x9e3e9)&&lstatSync(_0x9e3e9)[_0x149dbe(0x1e2)]()?readFileSync(_0x9e3e9,_0x149dbe(0x1b9)):'';}function readPushMetadataIfPresent(_0x5e14a0,_0x4c3126={}){const _0x3e2195=a119_0x1306;try{return readMetadataIfPresent(_0x5e14a0);}catch(_0x5c6785){if(_0x4c3126[_0x3e2195(0x1b5)])return undefined;throw _0x5c6785;}}
1
+ function a119_0x21dd(_0x595c75,_0x3b1221){_0x595c75=_0x595c75-0x1bc;const _0x1ebd96=a119_0x1ebd();let _0x21dd4d=_0x1ebd96[_0x595c75];return _0x21dd4d;}(function(_0x461610,_0x31cfa4){const _0x463ea2=a119_0x21dd,_0x858824=_0x461610();while(!![]){try{const _0x4d4592=-parseInt(_0x463ea2(0x1d8))/0x1+-parseInt(_0x463ea2(0x1f1))/0x2*(-parseInt(_0x463ea2(0x1de))/0x3)+parseInt(_0x463ea2(0x1c9))/0x4+-parseInt(_0x463ea2(0x1c4))/0x5*(-parseInt(_0x463ea2(0x1d0))/0x6)+parseInt(_0x463ea2(0x1be))/0x7+parseInt(_0x463ea2(0x1e8))/0x8+-parseInt(_0x463ea2(0x1d4))/0x9;if(_0x4d4592===_0x31cfa4)break;else _0x858824['push'](_0x858824['shift']());}catch(_0x171a88){_0x858824['push'](_0x858824['shift']());}}}(a119_0x1ebd,0x9f6ad));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a119_0x1ebd(){const _0x43e2c=['trim','sourceSessionId','\x20has\x20unsupported\x20scope\x20\x22','9391832ZZbjko','appCode','length','Skill\x20directory\x20not\x20found:\x20','Remote\x20Skill\x20','refreshedAt','ignoreInvalidMetadata','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','replace','2PYcxqq','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','skillName','\x20name\x20for\x20SkillHub\x20slug\x20generation.','files','match','skillCode','boolean','Invalid\x20','metadata','string','version','5395376SdYZSZ','utf8','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','scope','allowAppCodeRetarget','Unable\x20to\x20resolve\x20skillCode\x20from\x20','90aJyhIT','isFile','personal','toLowerCase','packageBase64','1620828DQGvJu','isArray','company','displayName','filter','find','Skill\x20metadata\x20appCode\x20\x22','163812chDosI','isDirectory','ignoreMetadataAppCodeMismatch','name','21623724hSJrme','some','ignoreMetadataScope','path','402988gJOQCm','unknown','Missing\x20','tags','\x20has\x20scope=\x22','object','1851621xtLGlO','number','validation','builtin','description','excludedFilePaths','content'];a119_0x1ebd=function(){return _0x43e2c;};return a119_0x1ebd();}import{basename,resolve}from'node:path';import{parse as a119_0x4ffa09}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x1189ee,_0x7cb8fb,_0x13fcac={}){const _0xad27e2=a119_0x21dd,_0x550aef=resolvePushDirectoryRoot(_0x1189ee),_0xde9701=readPushMetadataIfPresent(resolve(_0x550aef,METADATA_FILE),{'ignoreInvalidMetadata':_0x13fcac[_0xad27e2(0x1ee)]});if(_0xde9701?.['appCode']&&_0xde9701['appCode']!==_0x7cb8fb&&!_0x13fcac[_0xad27e2(0x1c2)]&&!_0x13fcac[_0xad27e2(0x1d2)])throw CliErrors['validation'](_0xad27e2(0x1cf)+_0xde9701[_0xad27e2(0x1e9)]+_0xad27e2(0x1f2)+_0x7cb8fb+'\x22.');const _0x2166df=resolvePushSkillCode(_0x550aef,_0x7cb8fb,_0xde9701,_0x13fcac);if(!_0x2166df)throw CliErrors[_0xad27e2(0x1e0)](_0xad27e2(0x1c3)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x550aef,'skillCode':_0x2166df,'metadata':_0xde9701};}export function readPushDirectory(_0x306417,_0xa9ebb9,_0x31b5c3={}){const _0x518950=a119_0x21dd,_0x1da2ba=resolvePushDirectoryIdentity(_0x306417,_0xa9ebb9,_0x31b5c3),_0x790b51=_0x1da2ba['dir'],_0x294e23=resolve(_0x790b51,SKILL_FILE);if(!existsSync(_0x294e23)||!lstatSync(_0x294e23)[_0x518950(0x1c5)]())throw CliErrors[_0x518950(0x1e0)](_0x518950(0x1da)+SKILL_FILE+':\x20'+_0x294e23);const _0x5793b4=_0x1da2ba[_0x518950(0x1fa)],_0x944496=_0x31b5c3['targetScope']??'personal';if(!_0x31b5c3[_0x518950(0x1d6)]&&_0x5793b4?.[_0x518950(0x1c1)]===_0x518950(0x1e1))throw CliErrors[_0x518950(0x1e0)](_0x518950(0x1ef)+METADATA_FILE+_0x518950(0x1dc)+_0x5793b4['scope']+'\x22.');if(!_0x31b5c3[_0x518950(0x1d6)]&&_0x944496===_0x518950(0x1c6)&&_0x5793b4?.[_0x518950(0x1c1)]&&_0x5793b4[_0x518950(0x1c1)]!==_0x518950(0x1c6))throw CliErrors[_0x518950(0x1e0)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x518950(0x1dc)+_0x5793b4[_0x518950(0x1c1)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x790b51+_0x518950(0x1c0));const _0x516366=scanSkillDirectory(_0x790b51,{'excludedFilePaths':_0x31b5c3[_0x518950(0x1e3)]}),_0x23b187=buildSkillPackage(_0x516366),_0x86fd0f=readFileSync(_0x294e23,'utf8'),_0x2f0941=_0x1da2ba[_0x518950(0x1f7)],_0x17e9ba=_0x31b5c3['ignoreMetadataForPayload']?undefined:_0x5793b4,_0x1127b7=readSkillDisplayName(_0x86fd0f);return{'skillCode':_0x2f0941,'metadata':_0x5793b4,'frontmatterDisplayName':_0x1127b7,'input':{'skillCode':_0x2f0941,'skillName':_0x1127b7??_0x17e9ba?.[_0x518950(0x1f3)],'description':_0x17e9ba?.['description'],'content':_0x86fd0f,'files':_0x23b187['manifest'],'packageBase64':_0x23b187[_0x518950(0x1c8)],'tags':_0x17e9ba?.[_0x518950(0x1db)],'version':_0x17e9ba?.[_0x518950(0x1bd)],'sourceSessionId':_0x17e9ba?.[_0x518950(0x1e6)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x312ece,_0x50a81b,_0x25854b,_0x195372={}){const _0x4a5f10=a119_0x21dd,_0x315e70=resolvePushDirectoryRoot(_0x312ece),_0x6d0159=readPushMetadataIfPresent(resolve(_0x315e70,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x311af7=requireRemoteScope(_0x50a81b),_0x110085=readLocalSkillContent(_0x315e70),_0x3236d7={..._0x50a81b,'appCode':_0x50a81b[_0x4a5f10(0x1e9)]??_0x25854b,'skillName':_0x50a81b[_0x4a5f10(0x1f3)]??_0x6d0159?.[_0x4a5f10(0x1f3)],'description':_0x50a81b[_0x4a5f10(0x1e2)]??_0x6d0159?.[_0x4a5f10(0x1e2)],'tags':Array[_0x4a5f10(0x1ca)](_0x50a81b[_0x4a5f10(0x1db)])?_0x50a81b[_0x4a5f10(0x1db)]:_0x6d0159?.[_0x4a5f10(0x1db)],'sourceSessionId':_0x50a81b[_0x4a5f10(0x1e6)]??_0x6d0159?.[_0x4a5f10(0x1e6)],'content':_0x50a81b[_0x4a5f10(0x1e4)]??_0x110085},_0x3ac7ac=buildMetadata(_0x3236d7,_0x311af7,_0x25854b,contentHash(_0x110085),_0x195372[_0x4a5f10(0x1ed)]);writeJsonAtomic(resolve(_0x315e70,METADATA_FILE),_0x3ac7ac);}export function recordPushedRuntimeSkill(_0x5b7321,_0x72e989,_0x2612a5,_0x115efe={}){const _0x486ab1=a119_0x21dd,_0x4c25c0=resolvePushDirectoryRoot(_0x5b7321),_0x15665f=scanSkillDirectory(_0x4c25c0),_0xc9e07d=_0x15665f[_0x486ab1(0x1ce)](_0x587397=>_0x587397[_0x486ab1(0x1d7)]===SKILL_FILE),_0xf85636=_0xc9e07d?fileText(_0xc9e07d):'',_0xb564ce=tryNormalizePackageManifest(_0x72e989[_0x486ab1(0x1f5)]),_0x396460={..._0x72e989,'content':_0x72e989['content']??_0xf85636,'files':_0xb564ce},_0x1cd9ea=_0xb564ce?normalizeLocalFiles(_0x15665f)[_0x486ab1(0x1cd)](_0x539efb=>_0xb564ce[_0x486ab1(0x1f5)][_0x486ab1(0x1d5)](_0x11ae86=>_0x11ae86['path']===_0x539efb['path'])):undefined,_0x240f56=buildMetadata(_0x396460,_0x115efe['scope']??_0x486ab1(0x1c6),_0x2612a5,contentHash(_0x396460[_0x486ab1(0x1e4)]??''),_0x115efe['pushedAt'],_0x1cd9ea);writeJsonAtomic(resolve(_0x4c25c0,METADATA_FILE),_0x240f56);}export function deriveSkillCodeFromDirectory(_0x523b5e,_0x5cdb73){const _0x1d71b1=a119_0x21dd,_0x322ac9=basename(resolve(_0x523b5e)),_0x304fbe=_0x5cdb73+'--';return _0x322ac9['startsWith'](_0x304fbe)?_0x322ac9['slice'](_0x304fbe[_0x1d71b1(0x1ea)]):_0x322ac9;}function resolvePushSkillCode(_0x4be393,_0x5a5712,_0x1d0d62,_0x638500){const _0x433884=a119_0x21dd,_0x7fae24=deriveSkillCodeFromSkillFile(_0x4be393)||deriveSkillCodeFromDirectory(_0x4be393,_0x5a5712);if(_0x638500['ignoreMetadataSkillCode'])return _0x7fae24;return _0x1d0d62?.[_0x433884(0x1f7)]?.[_0x433884(0x1e5)]()||_0x7fae24;}function deriveSkillCodeFromSkillFile(_0x4c3e1f){const _0x2be776=a119_0x21dd,_0x18ae6f=resolve(_0x4c3e1f,SKILL_FILE);if(!existsSync(_0x18ae6f)||!lstatSync(_0x18ae6f)[_0x2be776(0x1c5)]())return undefined;const _0x68db56=readFileSync(_0x18ae6f,_0x2be776(0x1bf)),_0x4b6358=_0x68db56[_0x2be776(0x1f6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4b6358)return undefined;const _0x293253=parseFrontmatterObject(_0x4b6358[0x1]??''),_0x36ba45=scalarToString(_0x293253?.[_0x2be776(0x1d3)]);return _0x36ba45?slugifySkillName(_0x36ba45):undefined;}function readSkillDisplayName(_0x4562e0){const _0x2553ef=a119_0x21dd,_0x53312a=_0x4562e0[_0x2553ef(0x1f6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x53312a)return undefined;const _0x279802=parseFrontmatterObject(_0x53312a[0x1]??'');return scalarToString(_0x279802?.[_0x2553ef(0x1cc)]);}function slugifySkillName(_0x13a70a){const _0x2857db=a119_0x21dd,_0x2afe00=_0x13a70a[_0x2857db(0x1e5)]()[_0x2857db(0x1c7)]()[_0x2857db(0x1f0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2857db(0x1f0)](/^-+/,'')[_0x2857db(0x1f0)](/-+$/,'')[_0x2857db(0x1f0)](/-{2,}/g,'-');if(!_0x2afe00)throw CliErrors[_0x2857db(0x1e0)](_0x2857db(0x1f9)+SKILL_FILE+_0x2857db(0x1f4));return _0x2afe00;}function parseFrontmatterObject(_0x1f1897){const _0xbdd197=a119_0x21dd;try{const _0x18d567=a119_0x4ffa09(_0x1f1897);return _0x18d567&&typeof _0x18d567===_0xbdd197(0x1dd)&&!Array[_0xbdd197(0x1ca)](_0x18d567)?_0x18d567:undefined;}catch{return undefined;}}function scalarToString(_0x410d07){const _0x41bf87=a119_0x21dd;if(typeof _0x410d07===_0x41bf87(0x1bc))return _0x410d07[_0x41bf87(0x1e5)]();if(typeof _0x410d07===_0x41bf87(0x1df)||typeof _0x410d07===_0x41bf87(0x1f8))return String(_0x410d07);return undefined;}function resolvePushDirectoryRoot(_0x2c7541){const _0x305524=a119_0x21dd,_0xaddb3d=resolve(_0x2c7541);if(!existsSync(_0xaddb3d))throw CliErrors[_0x305524(0x1e0)]('Skill\x20directory\x20not\x20found:\x20'+_0x2c7541);const _0x5d7179=lstatSync(_0xaddb3d);if(_0x5d7179[_0x305524(0x1d1)]())return _0xaddb3d;if(_0x5d7179['isSymbolicLink']()){const _0x364726=realpathSync(_0xaddb3d);if(lstatSync(_0x364726)[_0x305524(0x1d1)]())return _0x364726;}throw CliErrors[_0x305524(0x1e0)](_0x305524(0x1eb)+_0x2c7541);}function requireRemoteScope(_0x8b57ed){const _0x40eb79=a119_0x21dd;if(_0x8b57ed[_0x40eb79(0x1c1)]==='personal'||_0x8b57ed[_0x40eb79(0x1c1)]===_0x40eb79(0x1cb)||_0x8b57ed[_0x40eb79(0x1c1)]===_0x40eb79(0x1e1))return _0x8b57ed[_0x40eb79(0x1c1)];throw CliErrors[_0x40eb79(0x1e0)](_0x40eb79(0x1ec)+(_0x8b57ed[_0x40eb79(0x1f7)]||'(unknown)')+_0x40eb79(0x1e7)+(_0x8b57ed[_0x40eb79(0x1c1)]??_0x40eb79(0x1d9))+'\x22.');}function readLocalSkillContent(_0x552f04){const _0x389dc1=a119_0x21dd,_0x87147a=resolve(_0x552f04,SKILL_FILE);return existsSync(_0x87147a)&&lstatSync(_0x87147a)[_0x389dc1(0x1c5)]()?readFileSync(_0x87147a,_0x389dc1(0x1bf)):'';}function readPushMetadataIfPresent(_0x2f2510,_0x294912={}){const _0x2a4e80=a119_0x21dd;try{return readMetadataIfPresent(_0x2f2510);}catch(_0x9484ea){if(_0x294912[_0x2a4e80(0x1ee)])return undefined;throw _0x9484ea;}}
@@ -1 +1 @@
1
- function a120_0x4b05(){const _0x41d14a=['length','1763328VPmQrF','personal','push','578355KIsnsn','1561PYCydZ','6Reaxcq','validation','2406627iSPiXg','builtin','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','77907BipPfi','17848EPHjVk','1700964UIiqov','2855208gFceNM','company'];a120_0x4b05=function(){return _0x41d14a;};return a120_0x4b05();}(function(_0x4290fb,_0x59ea80){const _0xf0b22e=a120_0x1869,_0x2f4008=_0x4290fb();while(!![]){try{const _0x39d0b9=parseInt(_0xf0b22e(0x9d))/0x1*(parseInt(_0xf0b22e(0x97))/0x2)+parseInt(_0xf0b22e(0xa3))/0x3+parseInt(_0xf0b22e(0x9f))/0x4+-parseInt(_0xf0b22e(0x95))/0x5+-parseInt(_0xf0b22e(0xa0))/0x6+parseInt(_0xf0b22e(0x96))/0x7*(-parseInt(_0xf0b22e(0x9e))/0x8)+parseInt(_0xf0b22e(0x99))/0x9;if(_0x39d0b9===_0x59ea80)break;else _0x2f4008['push'](_0x2f4008['shift']());}catch(_0x149201){_0x2f4008['push'](_0x2f4008['shift']());}}}(a120_0x4b05,0x67c81));import{CliErrors}from'../../errors.js';function a120_0x1869(_0x151480,_0x23477b){_0x151480=_0x151480-0x94;const _0x4b0538=a120_0x4b05();let _0x186925=_0x4b0538[_0x151480];return _0x186925;}export function normalizeRuntimeSkillScopes(_0x155d9c){const _0x37ce0a=a120_0x1869,_0x42be13=_0x155d9c&&_0x155d9c[_0x37ce0a(0xa2)]>0x0?_0x155d9c:['personal',_0x37ce0a(0xa1),_0x37ce0a(0x9a)],_0x3d5831=[];for(const _0x1566db of _0x42be13){if(!isRuntimeSkillScope(_0x1566db))throw CliErrors[_0x37ce0a(0x98)](_0x37ce0a(0x9c)+_0x1566db);!_0x3d5831[_0x37ce0a(0x9b)](_0x1566db)&&_0x3d5831[_0x37ce0a(0x94)](_0x1566db);}return _0x3d5831;}export function isRuntimeSkillScope(_0x1fe381){const _0x2c3b2f=a120_0x1869;return _0x1fe381===_0x2c3b2f(0xa4)||_0x1fe381==='company'||_0x1fe381==='builtin';}
1
+ (function(_0xfd2ecd,_0x2d3827){const _0x5c5cf6=a120_0x1f6a,_0x24ee8f=_0xfd2ecd();while(!![]){try{const _0x2990e9=-parseInt(_0x5c5cf6(0x70))/0x1+parseInt(_0x5c5cf6(0x7b))/0x2*(-parseInt(_0x5c5cf6(0x79))/0x3)+parseInt(_0x5c5cf6(0x77))/0x4+parseInt(_0x5c5cf6(0x71))/0x5+parseInt(_0x5c5cf6(0x74))/0x6+parseInt(_0x5c5cf6(0x7d))/0x7*(parseInt(_0x5c5cf6(0x6d))/0x8)+-parseInt(_0x5c5cf6(0x7a))/0x9*(parseInt(_0x5c5cf6(0x6c))/0xa);if(_0x2990e9===_0x2d3827)break;else _0x24ee8f['push'](_0x24ee8f['shift']());}catch(_0x2f7800){_0x24ee8f['push'](_0x24ee8f['shift']());}}}(a120_0x5da8,0x3a051));function a120_0x5da8(){const _0x47fc8a=['70WdwDPu','73864PsIugp','builtin','includes','75830xvnQmT','1159270LsoyRa','push','company','300906lsOOZu','personal','Unsupported\x20runtime\x20Skill\x20scope:\x20','1488820HSBIvT','validation','10545ZsONRj','462618XqzWjD','152FKYoNb','length','217ztBJQo'];a120_0x5da8=function(){return _0x47fc8a;};return a120_0x5da8();}import{CliErrors}from'../../errors.js';function a120_0x1f6a(_0x7ae64a,_0x5c75d7){_0x7ae64a=_0x7ae64a-0x6c;const _0x5da873=a120_0x5da8();let _0x1f6a18=_0x5da873[_0x7ae64a];return _0x1f6a18;}export function normalizeRuntimeSkillScopes(_0x114542){const _0x53adac=a120_0x1f6a,_0x4e4fed=_0x114542&&_0x114542[_0x53adac(0x7c)]>0x0?_0x114542:[_0x53adac(0x75),_0x53adac(0x73),'builtin'],_0x34b854=[];for(const _0x15d5b6 of _0x4e4fed){if(!isRuntimeSkillScope(_0x15d5b6))throw CliErrors[_0x53adac(0x78)](_0x53adac(0x76)+_0x15d5b6);!_0x34b854[_0x53adac(0x6f)](_0x15d5b6)&&_0x34b854[_0x53adac(0x72)](_0x15d5b6);}return _0x34b854;}export function isRuntimeSkillScope(_0x183f68){const _0x4d3642=a120_0x1f6a;return _0x183f68===_0x4d3642(0x75)||_0x183f68===_0x4d3642(0x73)||_0x183f68===_0x4d3642(0x6e);}
@@ -1 +1 @@
1
- (function(_0x556f9b,_0x2a9b11){const _0x25a13e=a122_0x4c34,_0xc7b7e=_0x556f9b();while(!![]){try{const _0x1a490d=parseInt(_0x25a13e(0x162))/0x1+-parseInt(_0x25a13e(0x160))/0x2+-parseInt(_0x25a13e(0x164))/0x3+-parseInt(_0x25a13e(0x161))/0x4*(-parseInt(_0x25a13e(0x16c))/0x5)+parseInt(_0x25a13e(0x15f))/0x6*(-parseInt(_0x25a13e(0x16e))/0x7)+-parseInt(_0x25a13e(0x15d))/0x8+parseInt(_0x25a13e(0x165))/0x9;if(_0x1a490d===_0x2a9b11)break;else _0xc7b7e['push'](_0xc7b7e['shift']());}catch(_0x3a0143){_0xc7b7e['push'](_0xc7b7e['shift']());}}}(a122_0x4d88,0x4c26a));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x408d7a){const _0x852d69=a122_0x4c34,_0x185251={};for(const _0x29039d of normalizeLocalFiles(_0x408d7a)){_0x185251[_0x29039d[_0x852d69(0x16d)]]=fileContent(_0x29039d);}return Buffer[_0x852d69(0x168)](zipSync(_0x185251,{'level':0x0,'mtime':ZIP_MTIME}));}function a122_0x4c34(_0x13e090,_0x5710bc){_0x13e090=_0x13e090-0x15c;const _0x4d88a9=a122_0x4d88();let _0x4c3466=_0x4d88a9[_0x13e090];return _0x4c3466;}function a122_0x4d88(){const _0x1e9805=['Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','12KonHeB','443588xWkZee','865684nKcPeW','288922qzKWxH','object','1669389XVAsjI','10823004qZyIYm','validation','map','from','code','validation_error','entries','5KhYRUT','path','273595ZrSbdd','length','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','4316464dyRuAP'];a122_0x4d88=function(){return _0x1e9805;};return a122_0x4d88();}export function parseZipPackage(_0x58c004){const _0x5d3212=a122_0x4c34;if(_0x58c004[_0x5d3212(0x16f)]<0x16)throw CliErrors[_0x5d3212(0x166)](_0x5d3212(0x15e));let _0x212fe8;try{_0x212fe8=unzipSync(_0x58c004,{'filter'(_0x24f76e){const _0x301b51=_0x5d3212,_0xb9196d=normalizeSkillRelativePath(_0x24f76e['name']);if(_0xb9196d['endsWith']('/'))throw CliErrors['validation'](_0x301b51(0x15c)+_0xb9196d);return!![];}});}catch(_0xf4b974){if(isRuntimeSkillValidationError(_0xf4b974))throw _0xf4b974;throw CliErrors[_0x5d3212(0x166)](_0x5d3212(0x15e));}return Object[_0x5d3212(0x16b)](_0x212fe8)[_0x5d3212(0x167)](([_0x240133,_0x19b637])=>({'path':normalizeSkillRelativePath(_0x240133),'bytes':Buffer[_0x5d3212(0x168)](_0x19b637)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x19257a){const _0x559b1f=a122_0x4c34;return typeof _0x19257a===_0x559b1f(0x163)&&_0x19257a!==null&&_0x559b1f(0x169)in _0x19257a&&_0x19257a[_0x559b1f(0x169)]===_0x559b1f(0x16a);}
1
+ const a122_0x116225=a122_0x11f8;(function(_0x5f4252,_0x26b5df){const _0xacf34a=a122_0x11f8,_0x3c5a8d=_0x5f4252();while(!![]){try{const _0x2ae022=parseInt(_0xacf34a(0xbf))/0x1+-parseInt(_0xacf34a(0xcb))/0x2*(parseInt(_0xacf34a(0xc0))/0x3)+parseInt(_0xacf34a(0xbd))/0x4*(-parseInt(_0xacf34a(0xb6))/0x5)+-parseInt(_0xacf34a(0xca))/0x6*(-parseInt(_0xacf34a(0xb5))/0x7)+parseInt(_0xacf34a(0xc2))/0x8+parseInt(_0xacf34a(0xbc))/0x9+-parseInt(_0xacf34a(0xc5))/0xa;if(_0x2ae022===_0x26b5df)break;else _0x3c5a8d['push'](_0x3c5a8d['shift']());}catch(_0x5e0333){_0x3c5a8d['push'](_0x3c5a8d['shift']());}}}(a122_0x8ea5,0x79f38));import{unzipSync,zipSync}from'fflate';function a122_0x11f8(_0x260c54,_0x2c8159){_0x260c54=_0x260c54-0xb5;const _0x8ea595=a122_0x8ea5();let _0x11f854=_0x8ea595[_0x260c54];return _0x11f854;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a122_0x116225(0xbb));export function createDeterministicZipPackage(_0x497547){const _0x39fc27=a122_0x116225,_0x643604={};for(const _0x51c615 of normalizeLocalFiles(_0x497547)){_0x643604[_0x51c615[_0x39fc27(0xc9)]]=fileContent(_0x51c615);}return Buffer[_0x39fc27(0xc3)](zipSync(_0x643604,{'level':0x0,'mtime':ZIP_MTIME}));}function a122_0x8ea5(){const _0x300c2c=['validation','code','1980-01-01T00:00:00.000Z','2196999nCfZoK','1120364UOVRjR','entries','777132TbcBke','3336aIMNWt','length','2323256HvFUqs','from','sort','4720040NBDZGS','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation_error','path','382632yGkQDD','1210XXXJiY','object','98KVeSyC','10PviAIg','map','name'];a122_0x8ea5=function(){return _0x300c2c;};return a122_0x8ea5();}export function parseZipPackage(_0x5ec8f4){const _0x3bf88c=a122_0x116225;if(_0x5ec8f4[_0x3bf88c(0xc1)]<0x16)throw CliErrors[_0x3bf88c(0xb9)](_0x3bf88c(0xc7));let _0x3fcb84;try{_0x3fcb84=unzipSync(_0x5ec8f4,{'filter'(_0x2150a1){const _0x43d7dc=_0x3bf88c,_0x4cd2f9=normalizeSkillRelativePath(_0x2150a1[_0x43d7dc(0xb8)]);if(_0x4cd2f9['endsWith']('/'))throw CliErrors[_0x43d7dc(0xb9)](_0x43d7dc(0xc6)+_0x4cd2f9);return!![];}});}catch(_0x285cd2){if(isRuntimeSkillValidationError(_0x285cd2))throw _0x285cd2;throw CliErrors[_0x3bf88c(0xb9)](_0x3bf88c(0xc7));}return Object[_0x3bf88c(0xbe)](_0x3fcb84)[_0x3bf88c(0xb7)](([_0x257901,_0x5616c3])=>({'path':normalizeSkillRelativePath(_0x257901),'bytes':Buffer[_0x3bf88c(0xc3)](_0x5616c3)}))[_0x3bf88c(0xc4)](compareSkillFiles);}function isRuntimeSkillValidationError(_0xf22e28){const _0x48a50e=a122_0x116225;return typeof _0xf22e28===_0x48a50e(0xcc)&&_0xf22e28!==null&&_0x48a50e(0xba)in _0xf22e28&&_0xf22e28[_0x48a50e(0xba)]===_0x48a50e(0xc8);}
@@ -1 +1 @@
1
- function a123_0x4826(_0x14e165,_0x262444){_0x14e165=_0x14e165-0x1bc;const _0x56bae8=a123_0x56ba();let _0x482693=_0x56bae8[_0x14e165];return _0x482693;}(function(_0x56cc3b,_0x1764c3){const _0x276ff7=a123_0x4826,_0x5d4a18=_0x56cc3b();while(!![]){try{const _0x234ac3=parseInt(_0x276ff7(0x1d5))/0x1+-parseInt(_0x276ff7(0x1c7))/0x2+-parseInt(_0x276ff7(0x1e4))/0x3*(-parseInt(_0x276ff7(0x1de))/0x4)+parseInt(_0x276ff7(0x1ca))/0x5+parseInt(_0x276ff7(0x1e7))/0x6*(-parseInt(_0x276ff7(0x1bd))/0x7)+parseInt(_0x276ff7(0x1c4))/0x8*(parseInt(_0x276ff7(0x1d0))/0x9)+-parseInt(_0x276ff7(0x1d8))/0xa;if(_0x234ac3===_0x1764c3)break;else _0x5d4a18['push'](_0x5d4a18['shift']());}catch(_0x141ff5){_0x5d4a18['push'](_0x5d4a18['shift']());}}}(a123_0x56ba,0x90247));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x520000){const _0x111b56=a123_0x4826,_0x54d99f=normalizeLocalFiles(_0x520000);if(!_0x54d99f['some'](_0x3e3a11=>_0x3e3a11['path']===SKILL_FILE))throw CliErrors[_0x111b56(0x1cf)](_0x111b56(0x1e9)+SKILL_FILE+_0x111b56(0x1d9));const _0x381c12=localFilesToManifestFiles(_0x54d99f),_0x24f3f8=createDeterministicZipPackage(_0x54d99f);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x381c12),'zipSha256':bufferSha256(_0x24f3f8),'zipSize':_0x24f3f8[_0x111b56(0x1db)],'files':_0x381c12},'packageBytes':_0x24f3f8,'packageBase64':_0x24f3f8['toString'](_0x111b56(0x1cb))};}export function verifyRuntimeSkillPackage(_0x218c40,_0x1425f1){const _0x665ab1=normalizePackageManifest(_0x218c40,{'requireOssPath':![]});if(!_0x665ab1)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x665ab1,_0x1425f1);}export function verifyRuntimeSkillBundle(_0x1898e1,_0x5abf4d){const _0x45c7e7=a123_0x4826,_0x17236b=normalizePackageManifest(_0x1898e1,{'requireOssPath':![]});if(!_0x17236b)throw CliErrors[_0x45c7e7(0x1cf)](_0x45c7e7(0x1d1));return extractAndVerifyPackageFiles(_0x17236b,_0x5abf4d);}export function tryNormalizePackageManifest(_0x162a8c){return normalizePackageManifest(_0x162a8c,{'requireOssPath':![]});}export function requirePackageBytes(_0x15fcaa,_0x59b8c2){const _0x3f624d=a123_0x4826;if(!_0x59b8c2||_0x59b8c2['length']===0x0)throw CliErrors[_0x3f624d(0x1cf)](_0x3f624d(0x1be)+_0x15fcaa);return _0x59b8c2;}export function extractDownloadedPackage(_0x1d78c7){const _0x3c3933=a123_0x4826,_0x9594aa=parseZipPackage(_0x1d78c7)[_0x3c3933(0x1cc)](_0x16e135=>({'path':_0x16e135[_0x3c3933(0x1eb)],'bytes':_0x16e135[_0x3c3933(0x1da)]}));if(!_0x9594aa[_0x3c3933(0x1c1)](_0x1e5ddd=>_0x1e5ddd[_0x3c3933(0x1eb)]===SKILL_FILE))throw CliErrors[_0x3c3933(0x1cf)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x9594aa);}export function localFilesToManifestFiles(_0x131094){const _0x45f2a2=a123_0x4826;return normalizeLocalFiles(_0x131094)['map'](_0x279b5f=>({'path':_0x279b5f[_0x45f2a2(0x1eb)],'sha256':fileHash(_0x279b5f),'size':fileContent(_0x279b5f)[_0x45f2a2(0x1db)]}));}function normalizePackageManifest(_0x38d4e,_0x40bb57){const _0x122a5b=a123_0x4826;if(!_0x38d4e||typeof _0x38d4e!==_0x122a5b(0x1c8)||Array['isArray'](_0x38d4e))return undefined;const _0x37d285=_0x38d4e,_0x2f7b35=typeof _0x37d285[_0x122a5b(0x1dc)]===_0x122a5b(0x1e3)?_0x37d285[_0x122a5b(0x1dc)][_0x122a5b(0x1e8)]():undefined;if(_0x40bb57[_0x122a5b(0x1d2)]&&!_0x2f7b35)return undefined;if(!Array[_0x122a5b(0x1e0)](_0x37d285[_0x122a5b(0x1d6)])||_0x37d285[_0x122a5b(0x1d6)]['length']===0x0)return undefined;if(!isSha256Hex(_0x37d285[_0x122a5b(0x1cd)]))throw CliErrors[_0x122a5b(0x1cf)](_0x122a5b(0x1dd));if(!isSha256Hex(_0x37d285[_0x122a5b(0x1ce)]))throw CliErrors[_0x122a5b(0x1cf)](_0x122a5b(0x1c2));if(!Number[_0x122a5b(0x1c6)](_0x37d285[_0x122a5b(0x1c9)])||_0x37d285[_0x122a5b(0x1c9)]<0x0)throw CliErrors[_0x122a5b(0x1cf)](_0x122a5b(0x1bf));const _0x3f2877=normalizeManifestFiles(_0x37d285[_0x122a5b(0x1d6)]);if(!_0x3f2877[_0x122a5b(0x1c1)](_0x3e0eb5=>_0x3e0eb5['path']===SKILL_FILE))throw CliErrors[_0x122a5b(0x1cf)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x11ef8c=fileTreeHash(_0x3f2877);if(_0x11ef8c!==_0x37d285[_0x122a5b(0x1cd)]['toLowerCase']())throw CliErrors[_0x122a5b(0x1cf)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number['isSafeInteger'](_0x37d285[_0x122a5b(0x1ea)])?_0x37d285[_0x122a5b(0x1ea)]:0x2,'ossPath':_0x2f7b35,'treeSha256':_0x11ef8c,'zipSha256':_0x37d285['zipSha256'][_0x122a5b(0x1e1)](),'zipSize':_0x37d285[_0x122a5b(0x1c9)],'files':_0x3f2877};}function a123_0x56ba(){const _0x50ae5e=['bytes','length','ossPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','173268FkvtDF','set','isArray','toLowerCase','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','string','69MvwDlB','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','has','964992zJEcUT','trim','Missing\x20','schemaVersion','path','size','28lWRYSi','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','some','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','8pmSmdy','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','isSafeInteger','591062AEOCpR','object','zipSize','3731870VQLvlh','base64','map','treeSha256','zipSha256','validation','1322559huQaqB','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','requireOssPath','Duplicate\x20Skill\x20package\x20entry:\x20','push','981842JnuBjz','files','sha256','13421920kgjRNw','\x20in\x20Skill\x20file\x20package.'];a123_0x56ba=function(){return _0x50ae5e;};return a123_0x56ba();}function extractAndVerifyPackage(_0x31049a,_0x50411f){const _0x124c78=a123_0x4826,_0x5ae50f=normalizePackageManifest(_0x31049a,{'requireOssPath':![]});if(!_0x5ae50f)throw CliErrors[_0x124c78(0x1cf)](_0x124c78(0x1d1));if(_0x50411f[_0x124c78(0x1db)]!==_0x5ae50f['zipSize'])throw CliErrors[_0x124c78(0x1cf)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x128d00=bufferSha256(_0x50411f);if(_0x128d00!==_0x5ae50f['zipSha256'])throw CliErrors[_0x124c78(0x1cf)](_0x124c78(0x1c3));return extractAndVerifyPackageFiles(_0x5ae50f,_0x50411f);}function extractAndVerifyPackageFiles(_0x1a07a1,_0x213d98){const _0x195eb5=a123_0x4826,_0x42fff1=parseZipPackage(_0x213d98);if(_0x42fff1['length']!==_0x1a07a1[_0x195eb5(0x1d6)][_0x195eb5(0x1db)])throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1e5));const _0x39c231=new Map();for(const _0x3d9453 of _0x42fff1){if(_0x39c231[_0x195eb5(0x1e6)](_0x3d9453[_0x195eb5(0x1eb)]))throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1d3)+_0x3d9453[_0x195eb5(0x1eb)]);_0x39c231[_0x195eb5(0x1df)](_0x3d9453[_0x195eb5(0x1eb)],_0x3d9453);}const _0x394027=[];for(const _0xc7eb37 of _0x1a07a1['files']){const _0x4babb5=_0x39c231['get'](_0xc7eb37[_0x195eb5(0x1eb)]);if(!_0x4babb5)throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1c0)+_0xc7eb37[_0x195eb5(0x1eb)]);if(_0x4babb5[_0x195eb5(0x1da)][_0x195eb5(0x1db)]!==_0xc7eb37[_0x195eb5(0x1bc)])throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1c5)+_0xc7eb37[_0x195eb5(0x1eb)]);const _0x1e4690=bufferSha256(_0x4babb5[_0x195eb5(0x1da)]);if(_0x1e4690!==_0xc7eb37[_0x195eb5(0x1d7)])throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1e2)+_0xc7eb37[_0x195eb5(0x1eb)]);_0x394027[_0x195eb5(0x1d4)]({'path':_0xc7eb37['path'],'bytes':_0x4babb5[_0x195eb5(0x1da)]});}return normalizeLocalFiles(_0x394027);}
1
+ (function(_0x31687a,_0x11e7c0){const _0x42ef84=a123_0x48b8,_0x326a6f=_0x31687a();while(!![]){try{const _0xd585b=-parseInt(_0x42ef84(0x12d))/0x1*(parseInt(_0x42ef84(0x136))/0x2)+-parseInt(_0x42ef84(0x122))/0x3*(-parseInt(_0x42ef84(0x114))/0x4)+-parseInt(_0x42ef84(0x116))/0x5*(parseInt(_0x42ef84(0x115))/0x6)+parseInt(_0x42ef84(0x12b))/0x7*(-parseInt(_0x42ef84(0x129))/0x8)+parseInt(_0x42ef84(0x134))/0x9*(-parseInt(_0x42ef84(0x123))/0xa)+-parseInt(_0x42ef84(0x113))/0xb+parseInt(_0x42ef84(0x12f))/0xc;if(_0xd585b===_0x11e7c0)break;else _0x326a6f['push'](_0x326a6f['shift']());}catch(_0x53ae1b){_0x326a6f['push'](_0x326a6f['shift']());}}}(a123_0x19ea,0x2af7c));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';function a123_0x48b8(_0x4f7f8b,_0x4bdb26){_0x4f7f8b=_0x4f7f8b-0x112;const _0x19ea9b=a123_0x19ea();let _0x48b812=_0x19ea9b[_0x4f7f8b];return _0x48b812;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';function a123_0x19ea(){const _0x14737f=['base64','9102912wDXelI','schemaVersion','ossPath','path','zipSha256','1810521kAPdlD','trim','465554pEKDjh','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','has','files','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','size','get','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','treeSha256','toString','126511QzMLrK','4uwwkok','56214juJtpH','95PjBZlU','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isSafeInteger','map','Missing\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','push','Duplicate\x20Skill\x20package\x20entry:\x20','some','validation','set','913071pOpdJM','10gkpLag','requireOssPath','isArray','object','length','bytes','1384AAsjCg','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','10661uEPBUQ','zipSize','1caPmuK'];a123_0x19ea=function(){return _0x14737f;};return a123_0x19ea();}export function buildSkillPackage(_0x4a9d3b){const _0x78523a=a123_0x48b8,_0x250998=normalizeLocalFiles(_0x4a9d3b);if(!_0x250998[_0x78523a(0x11f)](_0x969810=>_0x969810[_0x78523a(0x132)]===SKILL_FILE))throw CliErrors[_0x78523a(0x120)](_0x78523a(0x11b)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x1e3655=localFilesToManifestFiles(_0x250998),_0x321d3e=createDeterministicZipPackage(_0x250998);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x1e3655),'zipSha256':bufferSha256(_0x321d3e),'zipSize':_0x321d3e[_0x78523a(0x127)],'files':_0x1e3655},'packageBytes':_0x321d3e,'packageBase64':_0x321d3e[_0x78523a(0x112)](_0x78523a(0x12e))};}export function verifyRuntimeSkillPackage(_0x1896b7,_0x45bb76){const _0x43288e=a123_0x48b8,_0x108456=normalizePackageManifest(_0x1896b7,{'requireOssPath':![]});if(!_0x108456)throw CliErrors[_0x43288e(0x120)](_0x43288e(0x11c));return extractAndVerifyPackage(_0x108456,_0x45bb76);}export function verifyRuntimeSkillBundle(_0x310da3,_0xfe85fb){const _0x58f428=a123_0x48b8,_0x479a2b=normalizePackageManifest(_0x310da3,{'requireOssPath':![]});if(!_0x479a2b)throw CliErrors[_0x58f428(0x120)](_0x58f428(0x11c));return extractAndVerifyPackageFiles(_0x479a2b,_0xfe85fb);}export function tryNormalizePackageManifest(_0x50e319){return normalizePackageManifest(_0x50e319,{'requireOssPath':![]});}export function requirePackageBytes(_0x113b06,_0x800bd1){const _0x3d1bf0=a123_0x48b8;if(!_0x800bd1||_0x800bd1['length']===0x0)throw CliErrors[_0x3d1bf0(0x120)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x113b06);return _0x800bd1;}export function extractDownloadedPackage(_0xaa17d3){const _0x3d0476=a123_0x48b8,_0x4f779f=parseZipPackage(_0xaa17d3)[_0x3d0476(0x11a)](_0x54597c=>({'path':_0x54597c[_0x3d0476(0x132)],'bytes':_0x54597c['bytes']}));if(!_0x4f779f[_0x3d0476(0x11f)](_0x4b94b8=>_0x4b94b8[_0x3d0476(0x132)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x4f779f);}export function localFilesToManifestFiles(_0xd76916){const _0x141a1b=a123_0x48b8;return normalizeLocalFiles(_0xd76916)[_0x141a1b(0x11a)](_0x2e9179=>({'path':_0x2e9179[_0x141a1b(0x132)],'sha256':fileHash(_0x2e9179),'size':fileContent(_0x2e9179)[_0x141a1b(0x127)]}));}function normalizePackageManifest(_0x31c1f8,_0x45938c){const _0x17e961=a123_0x48b8;if(!_0x31c1f8||typeof _0x31c1f8!==_0x17e961(0x126)||Array[_0x17e961(0x125)](_0x31c1f8))return undefined;const _0x2a196b=_0x31c1f8,_0x487e41=typeof _0x2a196b['ossPath']==='string'?_0x2a196b[_0x17e961(0x131)][_0x17e961(0x135)]():undefined;if(_0x45938c[_0x17e961(0x124)]&&!_0x487e41)return undefined;if(!Array[_0x17e961(0x125)](_0x2a196b[_0x17e961(0x13a)])||_0x2a196b[_0x17e961(0x13a)][_0x17e961(0x127)]===0x0)return undefined;if(!isSha256Hex(_0x2a196b[_0x17e961(0x13f)]))throw CliErrors[_0x17e961(0x120)](_0x17e961(0x13e));if(!isSha256Hex(_0x2a196b[_0x17e961(0x133)]))throw CliErrors[_0x17e961(0x120)](_0x17e961(0x12a));if(!Number[_0x17e961(0x119)](_0x2a196b[_0x17e961(0x12c)])||_0x2a196b['zipSize']<0x0)throw CliErrors[_0x17e961(0x120)](_0x17e961(0x138));const _0x29d1a0=normalizeManifestFiles(_0x2a196b[_0x17e961(0x13a)]);if(!_0x29d1a0[_0x17e961(0x11f)](_0x1ddcda=>_0x1ddcda['path']===SKILL_FILE))throw CliErrors[_0x17e961(0x120)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x26b124=fileTreeHash(_0x29d1a0);if(_0x26b124!==_0x2a196b[_0x17e961(0x13f)]['toLowerCase']())throw CliErrors[_0x17e961(0x120)](_0x17e961(0x13b));return{'schemaVersion':Number[_0x17e961(0x119)](_0x2a196b['schemaVersion'])?_0x2a196b[_0x17e961(0x130)]:0x2,'ossPath':_0x487e41,'treeSha256':_0x26b124,'zipSha256':_0x2a196b['zipSha256']['toLowerCase'](),'zipSize':_0x2a196b['zipSize'],'files':_0x29d1a0};}function extractAndVerifyPackage(_0x4e2970,_0x2728cd){const _0xa40d83=a123_0x48b8,_0x4a6973=normalizePackageManifest(_0x4e2970,{'requireOssPath':![]});if(!_0x4a6973)throw CliErrors['validation'](_0xa40d83(0x11c));if(_0x2728cd[_0xa40d83(0x127)]!==_0x4a6973[_0xa40d83(0x12c)])throw CliErrors[_0xa40d83(0x120)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x3925b9=bufferSha256(_0x2728cd);if(_0x3925b9!==_0x4a6973[_0xa40d83(0x133)])throw CliErrors[_0xa40d83(0x120)](_0xa40d83(0x118));return extractAndVerifyPackageFiles(_0x4a6973,_0x2728cd);}function extractAndVerifyPackageFiles(_0x11c3cc,_0x1f5653){const _0x312e1c=a123_0x48b8,_0x9c7154=parseZipPackage(_0x1f5653);if(_0x9c7154['length']!==_0x11c3cc[_0x312e1c(0x13a)]['length'])throw CliErrors[_0x312e1c(0x120)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x2a09ac=new Map();for(const _0x58776d of _0x9c7154){if(_0x2a09ac[_0x312e1c(0x139)](_0x58776d['path']))throw CliErrors['validation'](_0x312e1c(0x11e)+_0x58776d['path']);_0x2a09ac[_0x312e1c(0x121)](_0x58776d[_0x312e1c(0x132)],_0x58776d);}const _0x56994=[];for(const _0x523029 of _0x11c3cc[_0x312e1c(0x13a)]){const _0x40a427=_0x2a09ac[_0x312e1c(0x13d)](_0x523029[_0x312e1c(0x132)]);if(!_0x40a427)throw CliErrors[_0x312e1c(0x120)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x523029['path']);if(_0x40a427[_0x312e1c(0x128)][_0x312e1c(0x127)]!==_0x523029[_0x312e1c(0x13c)])throw CliErrors[_0x312e1c(0x120)](_0x312e1c(0x137)+_0x523029[_0x312e1c(0x132)]);const _0x2c8f86=bufferSha256(_0x40a427[_0x312e1c(0x128)]);if(_0x2c8f86!==_0x523029['sha256'])throw CliErrors[_0x312e1c(0x120)](_0x312e1c(0x117)+_0x523029[_0x312e1c(0x132)]);_0x56994[_0x312e1c(0x11d)]({'path':_0x523029[_0x312e1c(0x132)],'bytes':_0x40a427[_0x312e1c(0x128)]});}return normalizeLocalFiles(_0x56994);}
@@ -1 +1 @@
1
- (function(_0x3e8e81,_0x26ee24){var _0x31eaa0=a124_0x4781,_0xe6e3aa=_0x3e8e81();while(!![]){try{var _0x11121b=-parseInt(_0x31eaa0(0x164))/0x1*(parseInt(_0x31eaa0(0x167))/0x2)+parseInt(_0x31eaa0(0x163))/0x3*(parseInt(_0x31eaa0(0x16c))/0x4)+parseInt(_0x31eaa0(0x166))/0x5*(parseInt(_0x31eaa0(0x169))/0x6)+-parseInt(_0x31eaa0(0x16d))/0x7+parseInt(_0x31eaa0(0x16b))/0x8+parseInt(_0x31eaa0(0x168))/0x9*(-parseInt(_0x31eaa0(0x165))/0xa)+-parseInt(_0x31eaa0(0x16a))/0xb*(parseInt(_0x31eaa0(0x16e))/0xc);if(_0x11121b===_0x26ee24)break;else _0xe6e3aa['push'](_0xe6e3aa['shift']());}catch(_0x140faa){_0xe6e3aa['push'](_0xe6e3aa['shift']());}}}(a124_0x2474,0xe8052));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';function a124_0x2474(){var _0x3c29c9=['723730gbLotE','182784wDPxRg','617307ylAnrG','685xwjPhH','850juikQt','105fwcXbi','3872SuUDsP','108729Tjqlzv','388416bFkswE','561uwogoz','7777952sGmylU','36ewSkXo'];a124_0x2474=function(){return _0x3c29c9;};return a124_0x2474();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a124_0x4781(_0x5fe373,_0x5ec242){_0x5fe373=_0x5fe373-0x163;var _0x2474a8=a124_0x2474();var _0x478155=_0x2474a8[_0x5fe373];return _0x478155;}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
1
+ (function(_0xac7d67,_0x4bada1){var _0x3e9e2f=a124_0xee18,_0x1741ae=_0xac7d67();while(!![]){try{var _0x316787=parseInt(_0x3e9e2f(0x1a4))/0x1*(-parseInt(_0x3e9e2f(0x1a9))/0x2)+-parseInt(_0x3e9e2f(0x1a8))/0x3*(parseInt(_0x3e9e2f(0x1ab))/0x4)+-parseInt(_0x3e9e2f(0x1a6))/0x5*(parseInt(_0x3e9e2f(0x1a3))/0x6)+-parseInt(_0x3e9e2f(0x1ac))/0x7+-parseInt(_0x3e9e2f(0x1aa))/0x8+-parseInt(_0x3e9e2f(0x1a7))/0x9+parseInt(_0x3e9e2f(0x1a5))/0xa;if(_0x316787===_0x4bada1)break;else _0x1741ae['push'](_0x1741ae['shift']());}catch(_0x5697bf){_0x1741ae['push'](_0x1741ae['shift']());}}}(a124_0x22fe,0xc3291));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';function a124_0xee18(_0x3e0b36,_0x14d2eb){_0x3e0b36=_0x3e0b36-0x1a3;var _0x22fe2a=a124_0x22fe();var _0xee18a0=_0x22fe2a[_0x3e0b36];return _0xee18a0;}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';function a124_0x22fe(){var _0x3c33b8=['14YMgckd','5160056AATGMx','8DqLDJh','1776908eEWFDX','10338NYnysw','216325tXmGgO','45563350pyFSMR','2695VsSACK','659583bsHKyc','512772MzDQfT'];a124_0x22fe=function(){return _0x3c33b8;};return a124_0x22fe();}
@@ -1 +1 @@
1
- const a125_0x4bf45d=a125_0x781c;function a125_0x781c(_0x3f0cb3,_0x3bf1ca){_0x3f0cb3=_0x3f0cb3-0x67;const _0x2f92f3=a125_0x2f92();let _0x781c26=_0x2f92f3[_0x3f0cb3];return _0x781c26;}(function(_0x38d315,_0xda0b25){const _0x24f255=a125_0x781c,_0x1bda5c=_0x38d315();while(!![]){try{const _0x50e059=parseInt(_0x24f255(0x86))/0x1*(parseInt(_0x24f255(0x67))/0x2)+parseInt(_0x24f255(0x77))/0x3+parseInt(_0x24f255(0x76))/0x4*(-parseInt(_0x24f255(0x81))/0x5)+parseInt(_0x24f255(0x80))/0x6*(parseInt(_0x24f255(0x6c))/0x7)+parseInt(_0x24f255(0x7f))/0x8+-parseInt(_0x24f255(0x8b))/0x9*(parseInt(_0x24f255(0x82))/0xa)+parseInt(_0x24f255(0x6f))/0xb*(-parseInt(_0x24f255(0x89))/0xc);if(_0x50e059===_0xda0b25)break;else _0x1bda5c['push'](_0x1bda5c['shift']());}catch(_0x412a59){_0x1bda5c['push'](_0x1bda5c['shift']());}}}(a125_0x2f92,0x19266));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a125_0x4bf45d(0x74));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a125_0x4bf45d(0x7b),a125_0x4bf45d(0x8a)),join('.claude',a125_0x4bf45d(0x8a))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x2bf544,_0x553369){const _0x45f4d8=a125_0x4bf45d;if(!existsSync(_0x2bf544))return{'kind':_0x45f4d8(0x7c)};let _0x219fdc;try{_0x219fdc=JSON['parse'](readFileSync(_0x2bf544,_0x45f4d8(0x88)));}catch(_0x11178c){return{'kind':_0x45f4d8(0x7d),'reason':_0x2bf544+_0x45f4d8(0x73)+_0x11178c['message']};}const _0x319295=_0x219fdc;if(typeof _0x319295?.[_0x45f4d8(0x84)]!==_0x45f4d8(0x7e)||!SUPPORTED_LOCK_VERSIONS[_0x45f4d8(0x68)](_0x319295['version']))return{'kind':_0x45f4d8(0x7d),'reason':_0x2bf544+_0x45f4d8(0x71)+String(_0x319295?.[_0x45f4d8(0x84)])};if(!_0x319295[_0x45f4d8(0x8a)]||typeof _0x319295[_0x45f4d8(0x8a)]!==_0x45f4d8(0x79))return{'kind':_0x45f4d8(0x7d),'reason':_0x2bf544+_0x45f4d8(0x7a)};return _0x319295[_0x45f4d8(0x8a)][_0x553369]?{'kind':_0x45f4d8(0x85)}:{'kind':_0x45f4d8(0x7c)};}export function resolveInstalledSkill(_0x24f19b,_0x1eaeee){const _0x39b1e8=a125_0x4bf45d,_0x55bf64=_0x1eaeee?.[_0x39b1e8(0x6a)]??homedir(),_0x2722cd=_0x1eaeee?.[_0x39b1e8(0x8d)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x39b1e8(0x75)](_0x6bf6a5=>join(_0x55bf64,_0x6bf6a5)),_0x2f6f2f=_0x1eaeee?.[_0x39b1e8(0x83)]??join(_0x55bf64,SKILL_LOCK_RELATIVE_PATH),_0x4007ff=_0x2722cd[_0x39b1e8(0x75)](_0x3517bd=>join(_0x3517bd,_0x24f19b,_0x39b1e8(0x6e))),_0x22b9d8=_0x4007ff[_0x39b1e8(0x78)](_0x3bcd99=>existsSync(_0x3bcd99));if(_0x22b9d8)return{'state':_0x39b1e8(0x70),'path':_0x22b9d8};const _0x108d46=readLockLookup(_0x2f6f2f,_0x24f19b);if(_0x108d46[_0x39b1e8(0x69)]===_0x39b1e8(0x7d))return{'state':_0x39b1e8(0x6b),'reason':_0x108d46[_0x39b1e8(0x8c)]};if(_0x108d46[_0x39b1e8(0x69)]===_0x39b1e8(0x85))return{'state':_0x39b1e8(0x6b),'reason':_0x2f6f2f+_0x39b1e8(0x72)+_0x24f19b+_0x39b1e8(0x6d)+('('+_0x4007ff[_0x39b1e8(0x87)](',\x20')+')')};return{'state':'absent','checked':_0x4007ff};}function a125_0x2f92(){const _0x4d272e=['314565HBoQbR','find','object','\x20has\x20no\x20skills\x20map','.agents','not-recorded','unusable','number','1185656dNtKlc','6HjqZOw','169485mKGIOV','10zvcSvS','lockFile','version','recorded','153ExYjcF','join','utf8','360vciFhO','skills','326421Azinqe','reason','globalSkillsDirs','1566wjYwxU','includes','kind','home','unverifiable','857171mtmRxd','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','SKILL.md','93258HbueeK','present','\x20uses\x20unsupported\x20version\x20','\x20records\x20\x22','\x20is\x20unreadable:\x20','.skill-lock.json','map','12GMnSKF'];a125_0x2f92=function(){return _0x4d272e;};return a125_0x2f92();}
1
+ function a125_0x4b22(_0x9c2750,_0x25d296){_0x9c2750=_0x9c2750-0x1b0;const _0x24c726=a125_0x24c7();let _0x4b22d1=_0x24c726[_0x9c2750];return _0x4b22d1;}function a125_0x24c7(){const _0x3349e2=['365419NyTgKI','join','6162435FOrMCk','map','.agents','\x20records\x20\x22','124808uHFgyZ','message','unusable','\x20is\x20unreadable:\x20','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2mYIKfo','kind','730902fpfZnn','unverifiable','includes','341724JMKJEX','.skill-lock.json','543810NFRpLz','globalSkillsDirs','home','number','absent','119uQmsHS','SKILL.md','1002774HQXzMX','present','reason','.claude','find','parse','skills'];a125_0x24c7=function(){return _0x3349e2;};return a125_0x24c7();}const a125_0x132e1b=a125_0x4b22;(function(_0x2b8daa,_0x58ee9c){const _0x46d853=a125_0x4b22,_0x27ac74=_0x2b8daa();while(!![]){try{const _0x5174a9=parseInt(_0x46d853(0x1b3))/0x1*(-parseInt(_0x46d853(0x1be))/0x2)+parseInt(_0x46d853(0x1c0))/0x3+-parseInt(_0x46d853(0x1c3))/0x4+-parseInt(_0x46d853(0x1c5))/0x5+parseInt(_0x46d853(0x1cc))/0x6+-parseInt(_0x46d853(0x1ca))/0x7*(parseInt(_0x46d853(0x1b9))/0x8)+parseInt(_0x46d853(0x1b5))/0x9;if(_0x5174a9===_0x58ee9c)break;else _0x27ac74['push'](_0x27ac74['shift']());}catch(_0x451392){_0x27ac74['push'](_0x27ac74['shift']());}}}(a125_0x24c7,0x42139));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a125_0x132e1b(0x1b7),a125_0x132e1b(0x1c4));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a125_0x132e1b(0x1b7),a125_0x132e1b(0x1b2)),join(a125_0x132e1b(0x1cf),a125_0x132e1b(0x1b2))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x4e6722,_0x4f8ae2){const _0x3a28d4=a125_0x132e1b;if(!existsSync(_0x4e6722))return{'kind':'not-recorded'};let _0x31adfe;try{_0x31adfe=JSON[_0x3a28d4(0x1b1)](readFileSync(_0x4e6722,'utf8'));}catch(_0x4ba2b9){return{'kind':_0x3a28d4(0x1bb),'reason':_0x4e6722+_0x3a28d4(0x1bc)+_0x4ba2b9[_0x3a28d4(0x1ba)]};}const _0x2e913a=_0x31adfe;if(typeof _0x2e913a?.['version']!==_0x3a28d4(0x1c8)||!SUPPORTED_LOCK_VERSIONS[_0x3a28d4(0x1c2)](_0x2e913a['version']))return{'kind':_0x3a28d4(0x1bb),'reason':_0x4e6722+'\x20uses\x20unsupported\x20version\x20'+String(_0x2e913a?.['version'])};if(!_0x2e913a[_0x3a28d4(0x1b2)]||typeof _0x2e913a[_0x3a28d4(0x1b2)]!=='object')return{'kind':_0x3a28d4(0x1bb),'reason':_0x4e6722+'\x20has\x20no\x20skills\x20map'};return _0x2e913a[_0x3a28d4(0x1b2)][_0x4f8ae2]?{'kind':'recorded'}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x436b26,_0x19dcfa){const _0x589b54=a125_0x132e1b,_0x59f33e=_0x19dcfa?.[_0x589b54(0x1c7)]??homedir(),_0x302b33=_0x19dcfa?.[_0x589b54(0x1c6)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x589b54(0x1b6)](_0x3874f9=>join(_0x59f33e,_0x3874f9)),_0x1b754d=_0x19dcfa?.['lockFile']??join(_0x59f33e,SKILL_LOCK_RELATIVE_PATH),_0x5aee96=_0x302b33[_0x589b54(0x1b6)](_0x44c811=>join(_0x44c811,_0x436b26,_0x589b54(0x1cb))),_0x22d257=_0x5aee96[_0x589b54(0x1b0)](_0xe56e03=>existsSync(_0xe56e03));if(_0x22d257)return{'state':_0x589b54(0x1cd),'path':_0x22d257};const _0x55640d=readLockLookup(_0x1b754d,_0x436b26);if(_0x55640d[_0x589b54(0x1bf)]===_0x589b54(0x1bb))return{'state':_0x589b54(0x1c1),'reason':_0x55640d[_0x589b54(0x1ce)]};if(_0x55640d[_0x589b54(0x1bf)]==='recorded')return{'state':'unverifiable','reason':_0x1b754d+_0x589b54(0x1b8)+_0x436b26+_0x589b54(0x1bd)+('('+_0x5aee96[_0x589b54(0x1b4)](',\x20')+')')};return{'state':_0x589b54(0x1c9),'checked':_0x5aee96};}
@@ -1 +1 @@
1
- (function(_0x1fb507,_0x50d2fa){const _0x531b2e=a126_0x4e73,_0x568f8a=_0x1fb507();while(!![]){try{const _0x5887a6=parseInt(_0x531b2e(0x13d))/0x1+parseInt(_0x531b2e(0x13c))/0x2+-parseInt(_0x531b2e(0x13b))/0x3*(-parseInt(_0x531b2e(0x13a))/0x4)+-parseInt(_0x531b2e(0x138))/0x5+parseInt(_0x531b2e(0x139))/0x6+parseInt(_0x531b2e(0x13e))/0x7+-parseInt(_0x531b2e(0x137))/0x8;if(_0x5887a6===_0x50d2fa)break;else _0x568f8a['push'](_0x568f8a['shift']());}catch(_0x5d2a2e){_0x568f8a['push'](_0x568f8a['shift']());}}}(a126_0x1402,0xb6c92));function a126_0x1402(){const _0x1461e5=['7831692PMyzas','8RNErND','1778223UbWTLs','1164062qRBprC','83427oVxFxc','7285852IHiUwb','18715584Sldgbi','5544600DfbjrR'];a126_0x1402=function(){return _0x1461e5;};return a126_0x1402();}function a126_0x4e73(_0x501d93,_0x90beb1){_0x501d93=_0x501d93-0x137;const _0x14027d=a126_0x1402();let _0x4e7388=_0x14027d[_0x501d93];return _0x4e7388;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x3ed393,_0x4e6777){const _0x3dc48f=a126_0x5c8a,_0x3a23f7=_0x3ed393();while(!![]){try{const _0x5835c4=parseInt(_0x3dc48f(0x1b1))/0x1+parseInt(_0x3dc48f(0x1b8))/0x2*(-parseInt(_0x3dc48f(0x1b9))/0x3)+-parseInt(_0x3dc48f(0x1b5))/0x4+parseInt(_0x3dc48f(0x1b0))/0x5+parseInt(_0x3dc48f(0x1b4))/0x6*(-parseInt(_0x3dc48f(0x1b2))/0x7)+-parseInt(_0x3dc48f(0x1b7))/0x8*(-parseInt(_0x3dc48f(0x1b3))/0x9)+parseInt(_0x3dc48f(0x1b6))/0xa;if(_0x5835c4===_0x4e6777)break;else _0x3a23f7['push'](_0x3a23f7['shift']());}catch(_0x3927ad){_0x3a23f7['push'](_0x3a23f7['shift']());}}}(a126_0x4d30,0x48449));function a126_0x5c8a(_0x213b18,_0xc7774f){_0x213b18=_0x213b18-0x1b0;const _0x4d3036=a126_0x4d30();let _0x5c8a0e=_0x4d3036[_0x213b18];return _0x5c8a0e;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a126_0x4d30(){const _0x5d3de8=['3543kwwtub','63BsXDHL','9xkctUo','145722AtAZCU','2049084TtShRV','4674920bvuOMC','3963464ayAzZJ','52fXOFML','12630QJKxbY','849275BUmKHz'];a126_0x4d30=function(){return _0x5d3de8;};return a126_0x4d30();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});