@lovrabet/lovrabet-cli 2.2.4-beta.3 → 2.2.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) 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/notification/config-list.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.js +1 -1
  102. package/lib/core/db-resolver.js +1 -1
  103. package/lib/core/sdk-client.js +1 -1
  104. package/lib/errors.js +1 -1
  105. package/lib/framework/build-all-flags.js +1 -1
  106. package/lib/framework/dryrun.js +1 -1
  107. package/lib/framework/flags.js +1 -1
  108. package/lib/framework/help.js +1 -1
  109. package/lib/framework/index.js +1 -1
  110. package/lib/framework/output.js +1 -1
  111. package/lib/framework/preparse.js +1 -1
  112. package/lib/framework/rate-limit.js +1 -1
  113. package/lib/framework/raw-flags.js +1 -1
  114. package/lib/framework/response.js +1 -1
  115. package/lib/framework/runner-confirmation.js +1 -1
  116. package/lib/framework/runner-error.js +1 -1
  117. package/lib/framework/runner.js +1 -1
  118. package/lib/framework/schema-export.js +1 -1
  119. package/lib/framework/service-order.js +1 -1
  120. package/lib/framework/types.js +1 -1
  121. package/lib/generated/build-info.d.ts +4 -4
  122. package/lib/generated/build-info.js +1 -1
  123. package/lib/help.js +1 -1
  124. package/lib/postinstall.js +1 -1
  125. package/lib/runtime/confirmation.js +1 -1
  126. package/lib/runtime/event.js +1 -1
  127. package/lib/runtime/index.js +1 -1
  128. package/lib/runtime/queue.js +1 -1
  129. package/lib/runtime/resolve.js +1 -1
  130. package/lib/skills/builtin-skill.js +1 -1
  131. package/lib/skills/npx-skills-add.js +1 -1
  132. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  133. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  134. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  135. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  136. package/lib/skills/runtime-skill-sync/links.js +1 -1
  137. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  138. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  139. package/lib/skills/runtime-skill-sync/materialize.d.ts +7 -0
  140. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  141. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  142. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  143. package/lib/skills/runtime-skill-sync/push.js +1 -1
  144. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  146. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  147. package/lib/skills/runtime-skill-sync.d.ts +1 -1
  148. package/lib/skills/runtime-skill-sync.js +1 -1
  149. package/lib/skills/skill-presence.js +1 -1
  150. package/lib/utils/apply-jq-filter.js +1 -1
  151. package/lib/utils/logger.js +1 -1
  152. package/lib/utils/lossless-json.js +1 -1
  153. package/lib/utils/params.js +1 -1
  154. package/lib/utils/platform.js +1 -1
  155. package/lib/utils/update-notice.js +1 -1
  156. package/lib/utils/version.js +1 -1
  157. package/lib/utils/write-cli-side-channel.js +1 -1
  158. package/package.json +1 -1
  159. package/skills/lovrabet/SKILL.md +1 -1
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a135_0x185014=a135_0x10e6;(function(_0x4ab328,_0x4d6546){const _0x1e4839=a135_0x10e6,_0x4109c1=_0x4ab328();while(!![]){try{const _0x33a6f2=parseInt(_0x1e4839(0x1de))/0x1*(-parseInt(_0x1e4839(0x1b0))/0x2)+parseInt(_0x1e4839(0x1e9))/0x3*(parseInt(_0x1e4839(0x1e2))/0x4)+-parseInt(_0x1e4839(0x1eb))/0x5*(-parseInt(_0x1e4839(0x1c0))/0x6)+-parseInt(_0x1e4839(0x1af))/0x7*(-parseInt(_0x1e4839(0x1b7))/0x8)+parseInt(_0x1e4839(0x1ca))/0x9*(-parseInt(_0x1e4839(0x1c1))/0xa)+-parseInt(_0x1e4839(0x1c5))/0xb+parseInt(_0x1e4839(0x1d1))/0xc;if(_0x33a6f2===_0x4d6546)break;else _0x4109c1['push'](_0x4109c1['shift']());}catch(_0x24de29){_0x4109c1['push'](_0x4109c1['shift']());}}}(a135_0x5192,0xa01c5));function a135_0x10e6(_0x10500d,_0x413e69){_0x10500d=_0x10500d-0x1ad;const _0x5192a0=a135_0x5192();let _0x10e6a1=_0x5192a0[_0x10500d];return _0x10e6a1;}import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x2dc95c 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}=a135_0x2dc95c,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x185014(0x1df),a135_0x185014(0x1d0),a135_0x185014(0x1bf)]);export function linkEffectiveRuntimeSkills(_0x11aad4,_0x2fdb64){const _0x157e1c=a135_0x185014,_0x555db4=new Map();for(const _0x46ba5b of _0x11aad4){const _0x41ff3e=_0x46ba5b[_0x157e1c(0x1b1)][_0x157e1c(0x1dd)];if(!_0x41ff3e)continue;const _0x2a2e4f=_0x555db4[_0x157e1c(0x1b5)](_0x41ff3e);(!_0x2a2e4f||_0x46ba5b['scope']===_0x157e1c(0x1b2))&&_0x555db4[_0x157e1c(0x1d9)](_0x41ff3e,_0x46ba5b);}const _0x2aabde=[];for(const _0x4e7b56 of _0x555db4[_0x157e1c(0x1c7)]()){const _0x57f909=requireSkillCode(_0x4e7b56[_0x157e1c(0x1b1)]),_0x1615c8=readMetadataIfPresent(_0x4e7b56[_0x157e1c(0x1d2)]);if(_0x1615c8?.[_0x157e1c(0x1d4)]!==_0x2fdb64[_0x157e1c(0x1d4)]||_0x1615c8[_0x157e1c(0x1dd)]!==_0x57f909)throw CliErrors[_0x157e1c(0x1d7)](_0x157e1c(0x1e8)+_0x2fdb64['appCode']+':\x20'+_0x4e7b56[_0x157e1c(0x1d2)]);const _0x3fc7b1=runtimeSkillLinkName(_0x2fdb64,_0x57f909);for(const _0x13da73 of _0x2fdb64[_0x157e1c(0x1e4)]){_0x2aabde['push'](ensureManagedSymlink(resolve(_0x13da73,_0x3fc7b1),_0x4e7b56[_0x157e1c(0x1cc)],_0x2fdb64,_0x57f909));}}return _0x2aabde;}export function pruneStaleRuntimeSkillLinks(_0x361d2a,_0x3d02cb,_0x16b3ba){const _0x40c8ca=a135_0x185014,_0x12d249=new Set([..._0x3d02cb][_0x40c8ca(0x1d8)](_0x14dc03=>_0x14dc03[_0x40c8ca(0x1bb)]())[_0x40c8ca(0x1cb)](Boolean)),_0x1a59b2=_0x16b3ba?new Set([..._0x16b3ba][_0x40c8ca(0x1d8)](_0x516db1=>_0x516db1[_0x40c8ca(0x1bb)]())[_0x40c8ca(0x1cb)](Boolean)):undefined,_0x1fcacf=[];for(const _0x220874 of _0x361d2a[_0x40c8ca(0x1e4)]){for(const _0x729c39 of managedTargetSkillLinkPaths(_0x220874,_0x361d2a)){const _0x48ed74=runtimeSkillCodeFromLink(_0x361d2a,_0x729c39);if(_0x1a59b2&&!_0x1a59b2[_0x40c8ca(0x1d3)](_0x48ed74))continue;if(_0x12d249[_0x40c8ca(0x1d3)](_0x48ed74))continue;_0x1fcacf[_0x40c8ca(0x1b6)](removeManagedSkillLink(_0x729c39,_0x361d2a,_0x48ed74));}}return _0x1fcacf;}export function pruneStaleRuntimeSkillCache(_0x4ed3c2,_0x452d5d={}){const _0x297f06=a135_0x185014,_0x230ac1=new Set([..._0x4ed3c2[_0x297f06(0x1c6)]][_0x297f06(0x1d8)](_0x22da64=>_0x22da64['trim']())[_0x297f06(0x1cb)](Boolean)),_0x2864e1=_0x4ed3c2[_0x297f06(0x1ba)]?new Set([..._0x4ed3c2['pruneSkillCodes']][_0x297f06(0x1d8)](_0x1a0460=>_0x1a0460[_0x297f06(0x1bb)]())['filter'](Boolean)):undefined,_0x34ed59=_0x4ed3c2[_0x297f06(0x1ea)]??[_0x297f06(0x1b2),_0x297f06(0x1cd)],_0x4d8b4a=resolve(getRuntimeSkillCacheRoot(_0x4ed3c2[_0x297f06(0x1b4)],_0x4ed3c2[_0x297f06(0x1c2)],_0x452d5d),safePathSegment(_0x4ed3c2[_0x297f06(0x1d4)],_0x297f06(0x1d4))),_0x50b900=[];for(const _0x34d68f of _0x34ed59){const _0x20c9af=resolve(_0x4d8b4a,_0x34d68f);if(!existsSync(_0x20c9af))continue;for(const _0x581173 of readdirSync(_0x20c9af,{'withFileTypes':!![]})){if(!_0x581173[_0x297f06(0x1e0)]())continue;const _0x44ee63=_0x581173[_0x297f06(0x1db)];if(_0x2864e1&&!_0x2864e1[_0x297f06(0x1d3)](_0x44ee63))continue;if(_0x230ac1['has'](_0x44ee63))continue;const _0x4f78ba=resolve(_0x20c9af,_0x44ee63),_0x57a84c=readMetadataIfPresent(resolve(_0x4f78ba,METADATA_FILE));if(_0x57a84c?.[_0x297f06(0x1d4)]!==_0x4ed3c2['appCode']||_0x57a84c[_0x297f06(0x1bc)]!==_0x34d68f||_0x57a84c[_0x297f06(0x1dd)]!==_0x44ee63){_0x50b900['push']({'path':_0x4f78ba,'action':_0x297f06(0x1e5),'reason':_0x297f06(0x1d6)});continue;}if(isLinkedFromAnyRoot(_0x4f78ba,_0x4ed3c2['protectedLinkRoots']??[])){_0x50b900[_0x297f06(0x1b6)]({'path':_0x4f78ba,'action':'skipped','reason':'linked-from-protected-root'});continue;}removeSync(_0x4f78ba),_0x50b900['push']({'path':_0x4f78ba,'action':_0x297f06(0x1e7)});}}return _0x50b900;}export function linkGlobalRuntimeSkills(_0x5064c0,_0x4d40bb={}){const _0x3406f0=a135_0x185014,_0x1dbd51=resolveSkillSyncPaths(_0x4d40bb),_0x5a859d=[];for(const _0x2b4042 of _0x5064c0){if(_0x2b4042['scope']!==_0x3406f0(0x1b3))throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x2b4042[_0x3406f0(0x1bc)]);const _0x24a656=requireSkillCode(_0x2b4042['skill']),_0x30168d=copyManagedSkillDirectory(_0x2b4042[_0x3406f0(0x1cc)],resolve(_0x1dbd51['agentsSkillsDir'],_0x24a656));_0x5a859d[_0x3406f0(0x1b6)]({..._0x30168d,'contentHash':_0x2b4042['contentHash']});}return _0x5a859d;}function ensureManagedSymlink(_0x1ab832,_0x7e34ef,_0xebf09b,_0xcd8889){const _0xb4a1fc=a135_0x185014;mkdirSync(dirname(_0x1ab832),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1ab832)||isDanglingSymlink(_0x1ab832)){const _0x16dab4=lstatSync(_0x1ab832);if(!_0x16dab4['isSymbolicLink']())throw CliErrors[_0xb4a1fc(0x1d7)](_0xb4a1fc(0x1b9)+_0x1ab832);const _0x5e8ea3=resolveSymlinkTarget(_0x1ab832);if(!isPathInside(realOrResolved(_0x5e8ea3),realOrResolved(_0xebf09b['managedRoot'])))throw CliErrors[_0xb4a1fc(0x1d7)](_0xb4a1fc(0x1e1)+_0x1ab832);if(realOrResolved(_0x5e8ea3)===realOrResolved(_0x7e34ef))return{'path':_0x1ab832,'target':_0x7e34ef,'action':_0xb4a1fc(0x1b8)};const _0x3d4fde=readMetadataIfPresent(resolve(_0x5e8ea3,METADATA_FILE));if(_0xebf09b[_0xb4a1fc(0x1bc)]===_0xb4a1fc(0x1c3)&&(_0x3d4fde?.[_0xb4a1fc(0x1d4)]!==_0xebf09b['appCode']||_0x3d4fde['skillCode']!==_0xcd8889))throw CliErrors[_0xb4a1fc(0x1d7)](_0xb4a1fc(0x1bd)+_0x1ab832);return unlinkSync(_0x1ab832),symlinkSync(_0x7e34ef,_0x1ab832,_0xb4a1fc(0x1cc)),{'path':_0x1ab832,'target':_0x7e34ef,'action':_0xb4a1fc(0x1ce)};}return symlinkSync(_0x7e34ef,_0x1ab832,_0xb4a1fc(0x1cc)),{'path':_0x1ab832,'target':_0x7e34ef,'action':'created'};}function managedTargetSkillLinkPaths(_0x14de4e,_0x512857){const _0x2673c6=a135_0x185014;if(!existsSync(_0x14de4e))return[];const _0x4c5979=_0x512857[_0x2673c6(0x1d4)]+'--';return readdirSync(_0x14de4e,{'withFileTypes':!![]})['filter'](_0x193e32=>_0x512857[_0x2673c6(0x1bc)]===_0x2673c6(0x1c3)||_0x193e32[_0x2673c6(0x1db)][_0x2673c6(0x1c9)](_0x4c5979))[_0x2673c6(0x1d8)](_0x5cd0d1=>resolve(_0x14de4e,_0x5cd0d1[_0x2673c6(0x1db)]));}function a135_0x5192(){const _0x77c3eb=['push','168uhHLAS','unchanged','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','pruneSkillCodes','trim','scope','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','isSymbolicLink','secret-retriever','19410bLLUyI','10GkcMOj','accessKey','project','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','3330393FioQrv','activeSkillCodes','values','created','startsWith','6517197LcLYvi','filter','dir','company','updated','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','runtime-observe','14615316OWqNEv','metadataPath','has','appCode','managedRoot','metadata-mismatch','validation','map','set','length','name','contentHash','skillCode','651754HPXQSB','lovrabet','isDirectory','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','28jTKnWo','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','skillRoots','skipped','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','removed','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','368052XdXnsW','scopes','930qsCogt','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','slice','not-managed-symlink','102592MZgGCT','4hlaMVB','skill','personal','builtin','env','get'];a135_0x5192=function(){return _0x77c3eb;};return a135_0x5192();}function removeManagedSkillLink(_0x3ab629,_0x5c5878,_0x36dcc4){const _0x265263=a135_0x185014,_0x44db7d=lstatIfPresent(_0x3ab629);if(!_0x44db7d?.[_0x265263(0x1be)]())return{'path':_0x3ab629,'action':_0x265263(0x1e5),'reason':_0x265263(0x1ae)};const _0x54b505=resolveSymlinkTarget(_0x3ab629);if(!isPathInside(realOrResolved(_0x54b505),realOrResolved(_0x5c5878[_0x265263(0x1d5)])))return{'path':_0x3ab629,'action':'skipped','reason':'external-symlink'};const _0x52a32a=readMetadataIfPresent(resolve(_0x54b505,METADATA_FILE));if(_0x5c5878[_0x265263(0x1bc)]===_0x265263(0x1c3)&&(_0x52a32a?.['appCode']!==_0x5c5878['appCode']||_0x52a32a[_0x265263(0x1dd)]!==_0x36dcc4))return{'path':_0x3ab629,'action':_0x265263(0x1e5),'reason':_0x265263(0x1d6)};return unlinkSync(_0x3ab629),{'path':_0x3ab629,'action':_0x265263(0x1e7)};}function isLinkedFromAnyRoot(_0x30acb8,_0x546508){const _0x26d77a=realOrResolved(_0x30acb8);for(const _0x16bdfe of _0x546508){if(!existsSync(_0x16bdfe))continue;for(const _0x2f7d12 of readdirSync(_0x16bdfe,{'withFileTypes':!![]})){if(!_0x2f7d12['isSymbolicLink']())continue;const _0x512f6d=resolve(_0x16bdfe,_0x2f7d12['name']);if(realOrResolved(resolveSymlinkTarget(_0x512f6d))===_0x26d77a)return!![];}}return![];}function runtimeSkillLinkName(_0x23b302,_0x532e95){const _0x552523=a135_0x185014,_0xc12aad=safePathSegment(_0x532e95,'skillCode');if(_0x23b302['scope']===_0x552523(0x1c3)&&RESERVED_PROJECT_SKILL_CODES[_0x552523(0x1d3)](_0xc12aad))throw CliErrors['validation'](_0x552523(0x1ec)+_0xc12aad);return _0x23b302['scope']===_0x552523(0x1c3)?_0xc12aad:_0x23b302[_0x552523(0x1d4)]+'--'+_0xc12aad;}function runtimeSkillCodeFromLink(_0x3b5383,_0x5659ad){const _0x20d599=a135_0x185014,_0x1cc688=basename(_0x5659ad);return _0x3b5383[_0x20d599(0x1bc)]===_0x20d599(0x1c3)?_0x1cc688:_0x1cc688[_0x20d599(0x1ad)]((_0x3b5383[_0x20d599(0x1d4)]+'--')[_0x20d599(0x1da)]);}export function copyManagedSkillDirectory(_0x3afe82,_0x506bb0){const _0x4ae608=a135_0x185014,_0x5d396c=resolve(_0x506bb0,METADATA_FILE),_0x15c2b4=existsSync(_0x506bb0);if(_0x15c2b4){const _0x1330d2=lstatSync(_0x506bb0);if(_0x1330d2['isSymbolicLink']())throw CliErrors[_0x4ae608(0x1d7)](_0x4ae608(0x1c4)+_0x506bb0);if(!_0x1330d2['isDirectory']())throw CliErrors[_0x4ae608(0x1d7)](_0x4ae608(0x1e6)+_0x506bb0);const _0x4b10f0=readMetadataIfPresent(_0x5d396c);if(_0x4b10f0?.[_0x4ae608(0x1bc)]!==_0x4ae608(0x1b3))throw CliErrors[_0x4ae608(0x1d7)](_0x4ae608(0x1cf)+_0x506bb0);}ensureDirSync(dirname(_0x506bb0));const _0x1c5ea3=_0x15c2b4?readMetadataIfPresent(_0x5d396c)?.[_0x4ae608(0x1dc)]:undefined,_0x2acb23=readMetadataIfPresent(resolve(_0x3afe82,METADATA_FILE))?.['contentHash'];return _0x15c2b4&&removeSync(_0x506bb0),copySkillDirectory(_0x3afe82,_0x506bb0),{'path':_0x506bb0,'target':_0x3afe82,'action':!_0x15c2b4?_0x4ae608(0x1c8):_0x1c5ea3===_0x2acb23?_0x4ae608(0x1b8):_0x4ae608(0x1ce)};}function copySkillDirectory(_0x4f34a4,_0x279388){copySync(_0x4f34a4,_0x279388,{'dereference':![],'overwrite':!![],'filter'(_0x329ca4){const _0xe3af4e=a135_0x10e6;if(lstatSync(_0x329ca4)[_0xe3af4e(0x1be)]())throw CliErrors[_0xe3af4e(0x1d7)](_0xe3af4e(0x1e3)+_0x329ca4);return!![];}});}
1
+ const a135_0x5e7187=a135_0x218e;(function(_0x34bce0,_0x280657){const _0xa9fd6d=a135_0x218e,_0x4b4b03=_0x34bce0();while(!![]){try{const _0x29ee50=parseInt(_0xa9fd6d(0x12a))/0x1+-parseInt(_0xa9fd6d(0x12d))/0x2*(parseInt(_0xa9fd6d(0x145))/0x3)+parseInt(_0xa9fd6d(0x15b))/0x4*(-parseInt(_0xa9fd6d(0x147))/0x5)+parseInt(_0xa9fd6d(0x13d))/0x6*(-parseInt(_0xa9fd6d(0x130))/0x7)+-parseInt(_0xa9fd6d(0x13b))/0x8+parseInt(_0xa9fd6d(0x13f))/0x9+parseInt(_0xa9fd6d(0x13a))/0xa;if(_0x29ee50===_0x280657)break;else _0x4b4b03['push'](_0x4b4b03['shift']());}catch(_0x50495){_0x4b4b03['push'](_0x4b4b03['shift']());}}}(a135_0x1fb0,0x3dd94));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x686360 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}=a135_0x686360,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x5e7187(0x139),a135_0x5e7187(0x129),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x5c197e,_0x13575b){const _0x3c5836=a135_0x5e7187,_0x4648cf=new Map();for(const _0x2b2450 of _0x5c197e){const _0x8750f=_0x2b2450[_0x3c5836(0x134)][_0x3c5836(0x12b)];if(!_0x8750f)continue;const _0x3dd299=_0x4648cf[_0x3c5836(0x156)](_0x8750f);(!_0x3dd299||_0x2b2450[_0x3c5836(0x128)]===_0x3c5836(0x148))&&_0x4648cf[_0x3c5836(0x14b)](_0x8750f,_0x2b2450);}const _0x1451e3=[];for(const _0xe4af5 of _0x4648cf[_0x3c5836(0x14e)]()){const _0x51249a=requireSkillCode(_0xe4af5[_0x3c5836(0x134)]),_0x258428=readMetadataIfPresent(_0xe4af5[_0x3c5836(0x13c)]);if(_0x258428?.[_0x3c5836(0x151)]!==_0x13575b['appCode']||_0x258428[_0x3c5836(0x12b)]!==_0x51249a)throw CliErrors[_0x3c5836(0x144)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x13575b[_0x3c5836(0x151)]+':\x20'+_0xe4af5[_0x3c5836(0x13c)]);const _0x49358c=runtimeSkillLinkName(_0x13575b,_0x51249a);for(const _0xbb02d1 of _0x13575b['skillRoots']){_0x1451e3[_0x3c5836(0x149)](ensureManagedSymlink(resolve(_0xbb02d1,_0x49358c),_0xe4af5[_0x3c5836(0x146)],_0x13575b,_0x51249a));}}return _0x1451e3;}export function pruneStaleRuntimeSkillLinks(_0x386ea6,_0x5b2940,_0x16a6cc){const _0x46cfcd=a135_0x5e7187,_0x454656=new Set([..._0x5b2940][_0x46cfcd(0x15a)](_0x134408=>_0x134408[_0x46cfcd(0x15c)]())[_0x46cfcd(0x154)](Boolean)),_0x587e8b=_0x16a6cc?new Set([..._0x16a6cc][_0x46cfcd(0x15a)](_0x475dff=>_0x475dff['trim']())['filter'](Boolean)):undefined,_0x368336=[];for(const _0x29584e of _0x386ea6[_0x46cfcd(0x14a)]){for(const _0x2d257e of managedTargetSkillLinkPaths(_0x29584e,_0x386ea6)){const _0x4b9eab=runtimeSkillCodeFromLink(_0x386ea6,_0x2d257e);if(_0x587e8b&&!_0x587e8b[_0x46cfcd(0x133)](_0x4b9eab))continue;if(_0x454656['has'](_0x4b9eab))continue;_0x368336[_0x46cfcd(0x149)](removeManagedSkillLink(_0x2d257e,_0x386ea6,_0x4b9eab));}}return _0x368336;}function a135_0x1fb0(){const _0x47efdf=['appCode','skipped','env','filter','isDirectory','get','managedRoot','scopes','updated','map','4QTBJkm','trim','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','linked-from-protected-root','accessKey','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','created','protectedLinkRoots','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','scope','runtime-observe','80149gEefgT','skillCode','startsWith','9242CZQfXS','length','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','14nMvhlp','project','name','has','skill','isSymbolicLink','removed','contentHash','company','lovrabet','6446740fEBpAP','46856kocHkG','metadataPath','854130GTSojc','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','555624XUUgPd','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','validation','9CjpbsQ','dir','1143985wyzDBl','personal','push','skillRoots','set','metadata-mismatch','builtin','values','activeSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'];a135_0x1fb0=function(){return _0x47efdf;};return a135_0x1fb0();}export function pruneStaleRuntimeSkillCache(_0x74a69c,_0x345880={}){const _0x477199=a135_0x5e7187,_0x4da99f=new Set([..._0x74a69c[_0x477199(0x14f)]][_0x477199(0x15a)](_0x535c51=>_0x535c51['trim']())['filter'](Boolean)),_0x525082=_0x74a69c['pruneSkillCodes']?new Set([..._0x74a69c['pruneSkillCodes']][_0x477199(0x15a)](_0x1c25df=>_0x1c25df[_0x477199(0x15c)]())[_0x477199(0x154)](Boolean)):undefined,_0x152bfb=_0x74a69c[_0x477199(0x158)]??['personal',_0x477199(0x138)],_0x1bc035=resolve(getRuntimeSkillCacheRoot(_0x74a69c[_0x477199(0x153)],_0x74a69c[_0x477199(0x15f)],_0x345880),safePathSegment(_0x74a69c[_0x477199(0x151)],_0x477199(0x151))),_0x259c73=[];for(const _0x24d54b of _0x152bfb){const _0x41fcf0=resolve(_0x1bc035,_0x24d54b);if(!existsSync(_0x41fcf0))continue;for(const _0x5286fc of readdirSync(_0x41fcf0,{'withFileTypes':!![]})){if(!_0x5286fc[_0x477199(0x155)]())continue;const _0x26d621=_0x5286fc['name'];if(_0x525082&&!_0x525082[_0x477199(0x133)](_0x26d621))continue;if(_0x4da99f['has'](_0x26d621))continue;const _0x367ea0=resolve(_0x41fcf0,_0x26d621),_0x318763=readMetadataIfPresent(resolve(_0x367ea0,METADATA_FILE));if(_0x318763?.[_0x477199(0x151)]!==_0x74a69c[_0x477199(0x151)]||_0x318763['scope']!==_0x24d54b||_0x318763[_0x477199(0x12b)]!==_0x26d621){_0x259c73[_0x477199(0x149)]({'path':_0x367ea0,'action':'skipped','reason':_0x477199(0x14c)});continue;}if(isLinkedFromAnyRoot(_0x367ea0,_0x74a69c[_0x477199(0x126)]??[])){_0x259c73['push']({'path':_0x367ea0,'action':_0x477199(0x152),'reason':_0x477199(0x15e)});continue;}removeSync(_0x367ea0),_0x259c73[_0x477199(0x149)]({'path':_0x367ea0,'action':'removed'});}}return _0x259c73;}function a135_0x218e(_0x41aaf7,_0x348e51){_0x41aaf7=_0x41aaf7-0x124;const _0x1fb00b=a135_0x1fb0();let _0x218e29=_0x1fb00b[_0x41aaf7];return _0x218e29;}export function linkGlobalRuntimeSkills(_0x49433d,_0x265134={}){const _0xb000d6=a135_0x5e7187,_0x50bfb8=resolveSkillSyncPaths(_0x265134),_0x33c26e=[];for(const _0x14ed78 of _0x49433d){if(_0x14ed78[_0xb000d6(0x128)]!==_0xb000d6(0x14d))throw CliErrors[_0xb000d6(0x144)](_0xb000d6(0x142)+_0x14ed78[_0xb000d6(0x128)]);const _0x36e701=requireSkillCode(_0x14ed78['skill']),_0x3a2d03=copyManagedSkillDirectory(_0x14ed78[_0xb000d6(0x146)],resolve(_0x50bfb8['agentsSkillsDir'],_0x36e701));_0x33c26e[_0xb000d6(0x149)]({..._0x3a2d03,'contentHash':_0x14ed78[_0xb000d6(0x137)]});}return _0x33c26e;}function ensureManagedSymlink(_0x44db1d,_0xc59045,_0x30016b,_0x10174f){const _0x1e9bd7=a135_0x5e7187;mkdirSync(dirname(_0x44db1d),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x44db1d)||isDanglingSymlink(_0x44db1d)){const _0x3f0004=lstatSync(_0x44db1d);if(!_0x3f0004[_0x1e9bd7(0x135)]())throw CliErrors[_0x1e9bd7(0x144)](_0x1e9bd7(0x13e)+_0x44db1d);const _0x32e51b=resolveSymlinkTarget(_0x44db1d);if(!isPathInside(realOrResolved(_0x32e51b),realOrResolved(_0x30016b[_0x1e9bd7(0x157)])))throw CliErrors[_0x1e9bd7(0x144)](_0x1e9bd7(0x12f)+_0x44db1d);if(realOrResolved(_0x32e51b)===realOrResolved(_0xc59045))return{'path':_0x44db1d,'target':_0xc59045,'action':'unchanged'};const _0x5d4340=readMetadataIfPresent(resolve(_0x32e51b,METADATA_FILE));if(_0x30016b[_0x1e9bd7(0x128)]===_0x1e9bd7(0x131)&&(_0x5d4340?.['appCode']!==_0x30016b[_0x1e9bd7(0x151)]||_0x5d4340[_0x1e9bd7(0x12b)]!==_0x10174f))throw CliErrors[_0x1e9bd7(0x144)](_0x1e9bd7(0x15d)+_0x44db1d);return unlinkSync(_0x44db1d),symlinkSync(_0xc59045,_0x44db1d,_0x1e9bd7(0x146)),{'path':_0x44db1d,'target':_0xc59045,'action':_0x1e9bd7(0x159)};}return symlinkSync(_0xc59045,_0x44db1d,_0x1e9bd7(0x146)),{'path':_0x44db1d,'target':_0xc59045,'action':_0x1e9bd7(0x125)};}function managedTargetSkillLinkPaths(_0x5b86f8,_0x3911d4){const _0x2d8679=a135_0x5e7187;if(!existsSync(_0x5b86f8))return[];const _0x3ae699=_0x3911d4[_0x2d8679(0x151)]+'--';return readdirSync(_0x5b86f8,{'withFileTypes':!![]})[_0x2d8679(0x154)](_0x3e5a45=>_0x3911d4[_0x2d8679(0x128)]==='project'||_0x3e5a45[_0x2d8679(0x132)][_0x2d8679(0x12c)](_0x3ae699))[_0x2d8679(0x15a)](_0x5a08f0=>resolve(_0x5b86f8,_0x5a08f0[_0x2d8679(0x132)]));}function removeManagedSkillLink(_0xdb0ac9,_0x4031a5,_0x266d5a){const _0x40e021=a135_0x5e7187,_0x2b41dd=lstatIfPresent(_0xdb0ac9);if(!_0x2b41dd?.[_0x40e021(0x135)]())return{'path':_0xdb0ac9,'action':_0x40e021(0x152),'reason':'not-managed-symlink'};const _0x9ee880=resolveSymlinkTarget(_0xdb0ac9);if(!isPathInside(realOrResolved(_0x9ee880),realOrResolved(_0x4031a5[_0x40e021(0x157)])))return{'path':_0xdb0ac9,'action':_0x40e021(0x152),'reason':'external-symlink'};const _0x4da84d=readMetadataIfPresent(resolve(_0x9ee880,METADATA_FILE));if(_0x4031a5[_0x40e021(0x128)]==='project'&&(_0x4da84d?.[_0x40e021(0x151)]!==_0x4031a5[_0x40e021(0x151)]||_0x4da84d['skillCode']!==_0x266d5a))return{'path':_0xdb0ac9,'action':'skipped','reason':_0x40e021(0x14c)};return unlinkSync(_0xdb0ac9),{'path':_0xdb0ac9,'action':_0x40e021(0x136)};}function isLinkedFromAnyRoot(_0x33cd6b,_0x5bf4a9){const _0x428337=a135_0x5e7187,_0x266505=realOrResolved(_0x33cd6b);for(const _0x297554 of _0x5bf4a9){if(!existsSync(_0x297554))continue;for(const _0x153c84 of readdirSync(_0x297554,{'withFileTypes':!![]})){if(!_0x153c84[_0x428337(0x135)]())continue;const _0x307999=resolve(_0x297554,_0x153c84[_0x428337(0x132)]);if(realOrResolved(resolveSymlinkTarget(_0x307999))===_0x266505)return!![];}}return![];}function runtimeSkillLinkName(_0x49ceea,_0x5990f5){const _0x432404=a135_0x5e7187,_0x2f34ee=safePathSegment(_0x5990f5,_0x432404(0x12b));if(_0x49ceea[_0x432404(0x128)]===_0x432404(0x131)&&RESERVED_PROJECT_SKILL_CODES[_0x432404(0x133)](_0x2f34ee))throw CliErrors[_0x432404(0x144)](_0x432404(0x127)+_0x2f34ee);return _0x49ceea[_0x432404(0x128)]===_0x432404(0x131)?_0x2f34ee:_0x49ceea[_0x432404(0x151)]+'--'+_0x2f34ee;}function runtimeSkillCodeFromLink(_0x57b135,_0x5c8512){const _0xd1546c=a135_0x5e7187,_0x2a0dab=basename(_0x5c8512);return _0x57b135[_0xd1546c(0x128)]===_0xd1546c(0x131)?_0x2a0dab:_0x2a0dab['slice']((_0x57b135[_0xd1546c(0x151)]+'--')[_0xd1546c(0x12e)]);}export function copyManagedSkillDirectory(_0x46cf4a,_0x479854){const _0x50b662=a135_0x5e7187,_0x2a9652=resolve(_0x479854,METADATA_FILE),_0x56612d=existsSync(_0x479854);if(_0x56612d){const _0x38cdc4=lstatSync(_0x479854);if(_0x38cdc4[_0x50b662(0x135)]())throw CliErrors['validation'](_0x50b662(0x124)+_0x479854);if(!_0x38cdc4['isDirectory']())throw CliErrors[_0x50b662(0x144)](_0x50b662(0x141)+_0x479854);const _0x1369e9=readMetadataIfPresent(_0x2a9652);if(_0x1369e9?.[_0x50b662(0x128)]!==_0x50b662(0x14d))throw CliErrors[_0x50b662(0x144)](_0x50b662(0x150)+_0x479854);}ensureDirSync(dirname(_0x479854));const _0x39e0ba=_0x56612d?readMetadataIfPresent(_0x2a9652)?.[_0x50b662(0x137)]:undefined,_0x3c5933=readMetadataIfPresent(resolve(_0x46cf4a,METADATA_FILE))?.[_0x50b662(0x137)];return _0x56612d&&removeSync(_0x479854),copySkillDirectory(_0x46cf4a,_0x479854),{'path':_0x479854,'target':_0x46cf4a,'action':!_0x56612d?_0x50b662(0x125):_0x39e0ba===_0x3c5933?_0x50b662(0x140):_0x50b662(0x159)};}function copySkillDirectory(_0x34cda4,_0x2904a0){copySync(_0x34cda4,_0x2904a0,{'dereference':![],'overwrite':!![],'filter'(_0x547ddb){const _0x5406a6=a135_0x218e;if(lstatSync(_0x547ddb)[_0x5406a6(0x135)]())throw CliErrors[_0x5406a6(0x144)](_0x5406a6(0x143)+_0x547ddb);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x32ee3e,_0x200572){const _0x2d94ca=a136_0xa54b,_0x3b0508=_0x32ee3e();while(!![]){try{const _0x556510=parseInt(_0x2d94ca(0x14a))/0x1*(parseInt(_0x2d94ca(0x141))/0x2)+-parseInt(_0x2d94ca(0x149))/0x3*(-parseInt(_0x2d94ca(0x142))/0x4)+parseInt(_0x2d94ca(0x151))/0x5+parseInt(_0x2d94ca(0x148))/0x6*(-parseInt(_0x2d94ca(0x15a))/0x7)+parseInt(_0x2d94ca(0x131))/0x8*(-parseInt(_0x2d94ca(0x136))/0x9)+parseInt(_0x2d94ca(0x157))/0xa*(parseInt(_0x2d94ca(0x139))/0xb)+-parseInt(_0x2d94ca(0x14e))/0xc;if(_0x556510===_0x200572)break;else _0x3b0508['push'](_0x3b0508['shift']());}catch(_0x945bde){_0x3b0508['push'](_0x3b0508['shift']());}}}(a136_0x1349,0x3e5d6));import{existsSync,readdirSync}from'node:fs';function a136_0xa54b(_0x470c2c,_0x425c63){_0x470c2c=_0x470c2c-0x130;const _0x134997=a136_0x1349();let _0xa54b15=_0x134997[_0x470c2c];return _0xa54b15;}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';function a136_0x1349(){const _0x22b83b=['11pZpmme','local','cacheDir','skillMdPath','validation','sort','env','set','50GWNIbi','4lQstgV','scope','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','isSymbolicLink','linkedPaths','map','107934MrswJy','1344942craVip','9407fUKwAF','accessKey','trim','name','10304724XTBdkf','startsWith','skillRoots','2350370CEreLs','appCode','scopes','from','isArray','code','3521090hIGawq','tags','skillCode','14QWbvNM','push','builtin','linkedPath','2844168tFZZUk','dir','filter','source','localeCompare','9CpWMDB','isDirectory','metadataPath'];a136_0x1349=function(){return _0x22b83b;};return a136_0x1349();}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(_0x55e0b5,_0x4fb46f,_0x55b7d4={}){const _0x513725=a136_0xa54b,_0x400cb4=safePathSegment(_0x55e0b5[_0x513725(0x152)],_0x513725(0x152));if(_0x4fb46f[_0x513725(0x152)]!==_0x400cb4)throw CliErrors[_0x513725(0x13d)](_0x513725(0x144)+_0x4fb46f['appCode']+'\x20!=\x20'+_0x400cb4);const _0x283ce5=normalizeRuntimeSkillScopes(_0x55e0b5[_0x513725(0x153)]),_0x3827a3=new Set(_0x283ce5),_0x2c4102=_0x55e0b5[_0x513725(0x156)]?.[_0x513725(0x14c)](),_0x24c3f6=new Map(),_0x267081=resolve(getRuntimeSkillCacheRoot(_0x55e0b5[_0x513725(0x13f)],_0x55e0b5[_0x513725(0x14b)],_0x55b7d4),_0x400cb4);for(const _0x965d07 of _0x283ce5){for(const _0x13e21b of localSkillEntryDirs(resolve(_0x267081,_0x965d07))){collectLocalRuntimeSkill(_0x24c3f6,_0x13e21b,{'appCode':_0x400cb4,'scopes':_0x3827a3,'code':_0x2c4102,'source':'cache'});}}for(const _0x5141d3 of _0x4fb46f[_0x513725(0x150)]){for(const _0x3c88bb of localSkillLinkCandidates(_0x5141d3,_0x4fb46f,_0x3827a3)){collectLocalRuntimeSkill(_0x24c3f6,_0x3c88bb,{'appCode':_0x400cb4,'scopes':_0x3827a3,'code':_0x2c4102,'source':'link','linkedPath':_0x3c88bb});}}return Array[_0x513725(0x154)](_0x24c3f6['values']())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x22eca3){const _0x5f1568=a136_0xa54b;if(!existsSync(_0x22eca3))return[];return readdirSync(_0x22eca3,{'withFileTypes':!![]})[_0x5f1568(0x133)](_0x19f9c2=>_0x19f9c2[_0x5f1568(0x137)]()||_0x19f9c2[_0x5f1568(0x145)]())[_0x5f1568(0x147)](_0x33d812=>resolve(_0x22eca3,_0x33d812[_0x5f1568(0x14d)]));}function localSkillLinkCandidates(_0x3c83b2,_0x356a3d,_0x12db1e){const _0x65aa05=a136_0xa54b;if(!existsSync(_0x3c83b2))return[];const _0x1f622d=_0x356a3d[_0x65aa05(0x152)]+'--';return readdirSync(_0x3c83b2,{'withFileTypes':!![]})[_0x65aa05(0x133)](_0x5c60b3=>_0x5c60b3[_0x65aa05(0x137)]()||_0x5c60b3[_0x65aa05(0x145)]())['filter'](_0x2d2518=>_0x356a3d['scope']==='project'||_0x2d2518['name'][_0x65aa05(0x14f)](_0x1f622d)||_0x12db1e['has'](_0x65aa05(0x15c)))[_0x65aa05(0x147)](_0x2a38fd=>resolve(_0x3c83b2,_0x2a38fd[_0x65aa05(0x14d)]));}function collectLocalRuntimeSkill(_0x51be16,_0x3bf8a8,_0x286919){const _0x24aa4c=a136_0xa54b,_0x27bbb7=resolve(_0x3bf8a8,METADATA_FILE),_0x32ce36=readMetadataIfPresent(_0x27bbb7);if(!_0x32ce36)return;if(_0x32ce36[_0x24aa4c(0x152)]!==_0x286919[_0x24aa4c(0x152)])return;if(!isRuntimeSkillScope(_0x32ce36[_0x24aa4c(0x143)])||!_0x286919['scopes']['has'](_0x32ce36[_0x24aa4c(0x143)]))return;const _0x39dc99=_0x32ce36[_0x24aa4c(0x159)]?.[_0x24aa4c(0x14c)]();if(!_0x39dc99)return;if(_0x286919[_0x24aa4c(0x156)]&&_0x39dc99!==_0x286919[_0x24aa4c(0x156)])return;const _0x2c9752=_0x32ce36['scope']+':'+_0x39dc99,_0x4253f3=_0x286919[_0x24aa4c(0x130)]?[_0x286919[_0x24aa4c(0x130)]]:[],_0x428a03=_0x51be16['get'](_0x2c9752);if(_0x428a03){_0x286919[_0x24aa4c(0x134)]==='cache'&&(_0x428a03[_0x24aa4c(0x132)]=_0x3bf8a8,_0x428a03[_0x24aa4c(0x13b)]=_0x3bf8a8,_0x428a03[_0x24aa4c(0x13c)]=resolve(_0x3bf8a8,SKILL_FILE),_0x428a03[_0x24aa4c(0x138)]=_0x27bbb7);for(const _0x523fc0 of _0x4253f3){!_0x428a03[_0x24aa4c(0x146)]['includes'](_0x523fc0)&&_0x428a03[_0x24aa4c(0x146)][_0x24aa4c(0x15b)](_0x523fc0);}_0x428a03[_0x24aa4c(0x146)][_0x24aa4c(0x13e)]();return;}_0x51be16[_0x24aa4c(0x140)](_0x2c9752,{..._0x32ce36,'tags':Array[_0x24aa4c(0x155)](_0x32ce36[_0x24aa4c(0x158)])?_0x32ce36[_0x24aa4c(0x158)]:[],'scope':_0x32ce36[_0x24aa4c(0x143)],'source':_0x24aa4c(0x13a),'dir':_0x3bf8a8,'cacheDir':_0x286919[_0x24aa4c(0x134)]==='cache'?_0x3bf8a8:undefined,'skillMdPath':resolve(_0x3bf8a8,SKILL_FILE),'metadataPath':_0x27bbb7,'linkedPaths':_0x4253f3});}function compareLocalRuntimeSkills(_0x1dbee6,_0xc776ad){const _0x4331c2=a136_0xa54b,_0x5499f0={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5499f0[_0x1dbee6[_0x4331c2(0x143)]]-_0x5499f0[_0xc776ad[_0x4331c2(0x143)]]||_0x1dbee6[_0x4331c2(0x159)][_0x4331c2(0x135)](_0xc776ad[_0x4331c2(0x159)])||_0x1dbee6[_0x4331c2(0x132)][_0x4331c2(0x135)](_0xc776ad['dir']);}
1
+ (function(_0x554f80,_0x2b3918){const _0x4842d6=a136_0x5266,_0x317d93=_0x554f80();while(!![]){try{const _0x1adfff=parseInt(_0x4842d6(0xac))/0x1*(parseInt(_0x4842d6(0x93))/0x2)+-parseInt(_0x4842d6(0x9d))/0x3*(-parseInt(_0x4842d6(0xbd))/0x4)+parseInt(_0x4842d6(0xa8))/0x5+parseInt(_0x4842d6(0x94))/0x6+parseInt(_0x4842d6(0xb6))/0x7+-parseInt(_0x4842d6(0xbb))/0x8*(-parseInt(_0x4842d6(0xaa))/0x9)+-parseInt(_0x4842d6(0x95))/0xa;if(_0x1adfff===_0x2b3918)break;else _0x317d93['push'](_0x317d93['shift']());}catch(_0x583f35){_0x317d93['push'](_0x317d93['shift']());}}}(a136_0x8332,0xe9da0));import{existsSync,readdirSync}from'node:fs';function a136_0x5266(_0x1edb91,_0x5d8f68){_0x1edb91=_0x1edb91-0x90;const _0x83321d=a136_0x8332();let _0x5266d1=_0x83321d[_0x1edb91];return _0x5266d1;}import{resolve}from'node:path';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';function a136_0x8332(){const _0x54a869=['push','filter','10906196LfGdbj','has','linkedPaths','isArray','link','2319920yMjrpc','env','528124TemDXQ','validation','includes','tags','map','isDirectory','2846962HFbjyX','7550256MXBtGP','71005240GLUsmg','code','cacheDir','accessKey','trim','\x20!=\x20','startsWith','builtin','27rugLpQ','get','appCode','scopes','set','scope','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','values','name','from','dir','8801230GrfepY','isSymbolicLink','27CJbANQ','cache','1uUPLyH','linkedPath','localeCompare','project','skillCode','source','sort','skillRoots'];a136_0x8332=function(){return _0x54a869;};return a136_0x8332();}export function listLocalRuntimeSkills(_0x42830c,_0x401a41,_0x33124c={}){const _0x50d701=a136_0x5266,_0x556d97=safePathSegment(_0x42830c[_0x50d701(0x9f)],'appCode');if(_0x401a41[_0x50d701(0x9f)]!==_0x556d97)throw CliErrors[_0x50d701(0xbe)](_0x50d701(0xa3)+_0x401a41[_0x50d701(0x9f)]+_0x50d701(0x9a)+_0x556d97);const _0x5c3e2b=normalizeRuntimeSkillScopes(_0x42830c[_0x50d701(0xa0)]),_0x1a66fc=new Set(_0x5c3e2b),_0x3b5e28=_0x42830c[_0x50d701(0x96)]?.[_0x50d701(0x99)](),_0x22678a=new Map(),_0x5a7b39=resolve(getRuntimeSkillCacheRoot(_0x42830c[_0x50d701(0xbc)],_0x42830c[_0x50d701(0x98)],_0x33124c),_0x556d97);for(const _0x50b6ca of _0x5c3e2b){for(const _0x10418d of localSkillEntryDirs(resolve(_0x5a7b39,_0x50b6ca))){collectLocalRuntimeSkill(_0x22678a,_0x10418d,{'appCode':_0x556d97,'scopes':_0x1a66fc,'code':_0x3b5e28,'source':'cache'});}}for(const _0xeea6c5 of _0x401a41[_0x50d701(0xb3)]){for(const _0x42e79b of localSkillLinkCandidates(_0xeea6c5,_0x401a41,_0x1a66fc)){collectLocalRuntimeSkill(_0x22678a,_0x42e79b,{'appCode':_0x556d97,'scopes':_0x1a66fc,'code':_0x3b5e28,'source':_0x50d701(0xba),'linkedPath':_0x42e79b});}}return Array[_0x50d701(0xa6)](_0x22678a[_0x50d701(0xa4)]())[_0x50d701(0xb2)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2a6efd){const _0x48edc2=a136_0x5266;if(!existsSync(_0x2a6efd))return[];return readdirSync(_0x2a6efd,{'withFileTypes':!![]})['filter'](_0x39c493=>_0x39c493[_0x48edc2(0x92)]()||_0x39c493['isSymbolicLink']())[_0x48edc2(0x91)](_0x1f2d87=>resolve(_0x2a6efd,_0x1f2d87[_0x48edc2(0xa5)]));}function localSkillLinkCandidates(_0x13ae17,_0x5610f6,_0x58f135){const _0x2da995=a136_0x5266;if(!existsSync(_0x13ae17))return[];const _0x29dbb5=_0x5610f6[_0x2da995(0x9f)]+'--';return readdirSync(_0x13ae17,{'withFileTypes':!![]})[_0x2da995(0xb5)](_0x263a92=>_0x263a92['isDirectory']()||_0x263a92[_0x2da995(0xa9)]())[_0x2da995(0xb5)](_0x1aca9d=>_0x5610f6[_0x2da995(0xa2)]===_0x2da995(0xaf)||_0x1aca9d['name'][_0x2da995(0x9b)](_0x29dbb5)||_0x58f135[_0x2da995(0xb7)](_0x2da995(0x9c)))[_0x2da995(0x91)](_0x1f16dc=>resolve(_0x13ae17,_0x1f16dc[_0x2da995(0xa5)]));}function collectLocalRuntimeSkill(_0x3c2fc9,_0x5da805,_0x2fd770){const _0x2eb86c=a136_0x5266,_0x3b0f21=resolve(_0x5da805,METADATA_FILE),_0x3394d1=readMetadataIfPresent(_0x3b0f21);if(!_0x3394d1)return;if(_0x3394d1[_0x2eb86c(0x9f)]!==_0x2fd770[_0x2eb86c(0x9f)])return;if(!isRuntimeSkillScope(_0x3394d1[_0x2eb86c(0xa2)])||!_0x2fd770[_0x2eb86c(0xa0)][_0x2eb86c(0xb7)](_0x3394d1[_0x2eb86c(0xa2)]))return;const _0x24e4d5=_0x3394d1['skillCode']?.[_0x2eb86c(0x99)]();if(!_0x24e4d5)return;if(_0x2fd770[_0x2eb86c(0x96)]&&_0x24e4d5!==_0x2fd770[_0x2eb86c(0x96)])return;const _0x59dbd9=_0x3394d1[_0x2eb86c(0xa2)]+':'+_0x24e4d5,_0x2177bc=_0x2fd770[_0x2eb86c(0xad)]?[_0x2fd770['linkedPath']]:[],_0x371f51=_0x3c2fc9[_0x2eb86c(0x9e)](_0x59dbd9);if(_0x371f51){_0x2fd770[_0x2eb86c(0xb1)]===_0x2eb86c(0xab)&&(_0x371f51[_0x2eb86c(0xa7)]=_0x5da805,_0x371f51[_0x2eb86c(0x97)]=_0x5da805,_0x371f51['skillMdPath']=resolve(_0x5da805,SKILL_FILE),_0x371f51['metadataPath']=_0x3b0f21);for(const _0x375628 of _0x2177bc){!_0x371f51[_0x2eb86c(0xb8)][_0x2eb86c(0xbf)](_0x375628)&&_0x371f51[_0x2eb86c(0xb8)][_0x2eb86c(0xb4)](_0x375628);}_0x371f51[_0x2eb86c(0xb8)]['sort']();return;}_0x3c2fc9[_0x2eb86c(0xa1)](_0x59dbd9,{..._0x3394d1,'tags':Array[_0x2eb86c(0xb9)](_0x3394d1['tags'])?_0x3394d1[_0x2eb86c(0x90)]:[],'scope':_0x3394d1['scope'],'source':'local','dir':_0x5da805,'cacheDir':_0x2fd770[_0x2eb86c(0xb1)]==='cache'?_0x5da805:undefined,'skillMdPath':resolve(_0x5da805,SKILL_FILE),'metadataPath':_0x3b0f21,'linkedPaths':_0x2177bc});}function compareLocalRuntimeSkills(_0x31440a,_0x4fbf23){const _0x5a7aa4=a136_0x5266,_0x7e1d95={'personal':0x0,'company':0x1,'builtin':0x2};return _0x7e1d95[_0x31440a[_0x5a7aa4(0xa2)]]-_0x7e1d95[_0x4fbf23[_0x5a7aa4(0xa2)]]||_0x31440a['skillCode'][_0x5a7aa4(0xae)](_0x4fbf23[_0x5a7aa4(0xb0)])||_0x31440a[_0x5a7aa4(0xa7)]['localeCompare'](_0x4fbf23[_0x5a7aa4(0xa7)]);}
@@ -1 +1 @@
1
- (function(_0x373a6a,_0x2d3d49){const _0x5a9f8f=a137_0x10f2,_0x2cea76=_0x373a6a();while(!![]){try{const _0x2d3a2e=-parseInt(_0x5a9f8f(0x1e5))/0x1+parseInt(_0x5a9f8f(0x1d5))/0x2*(parseInt(_0x5a9f8f(0x1ed))/0x3)+parseInt(_0x5a9f8f(0x1e2))/0x4*(-parseInt(_0x5a9f8f(0x1c7))/0x5)+-parseInt(_0x5a9f8f(0x1cc))/0x6*(-parseInt(_0x5a9f8f(0x1c6))/0x7)+-parseInt(_0x5a9f8f(0x1da))/0x8*(parseInt(_0x5a9f8f(0x1c8))/0x9)+parseInt(_0x5a9f8f(0x1e6))/0xa*(parseInt(_0x5a9f8f(0x1cb))/0xb)+-parseInt(_0x5a9f8f(0x1d6))/0xc*(-parseInt(_0x5a9f8f(0x1c1))/0xd);if(_0x2d3a2e===_0x2d3d49)break;else _0x2cea76['push'](_0x2cea76['shift']());}catch(_0x2c4c97){_0x2cea76['push'](_0x2cea76['shift']());}}}(a137_0x3f1c,0x732f5));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a137_0x3f1c(){const _0x14beae=['617411VAXpFb','2430lTHsVr','content','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isSafeInteger','Unsafe\x20Skill\x20file\x20path:\x20','214518FtAytp','string','size','add','Skill\x20file\x20size\x20is\x20invalid:\x20','bytes','excludedFilePaths','78QRiqOG','replace','validation','utf8','sort','287pajERf','522065yCsfzL','45ZnhxvE','isSymbolicLink','localeCompare','27555LVtTpl','14844OFAxCp','isBuffer','has','from','startsWith','isArray','includes','test','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','2zcVkPR','2195232MWkXGb','values','length','push','1097040rFRwdO','path','Duplicate\x20Skill\x20file\x20path:\x20','sha256','set','name','isDirectory','split','4AmyjZq','trim','toString'];a137_0x3f1c=function(){return _0x14beae;};return a137_0x3f1c();}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x3e8a93){const _0xd7a293=a137_0x10f2;return _0x3e8a93['bytes']??Buffer[_0xd7a293(0x1cf)](_0x3e8a93[_0xd7a293(0x1e7)]??'',_0xd7a293(0x1c4));}export function fileText(_0x3e7009){const _0x2ccc8f=a137_0x10f2;return fileContent(_0x3e7009)[_0x2ccc8f(0x1e4)](_0x2ccc8f(0x1c4));}export function normalizeLocalFiles(_0x1d33e8){const _0xd408be=a137_0x10f2;if(!Array['isArray'](_0x1d33e8)||_0x1d33e8['length']===0x0)return[];const _0x259c07=new Map();for(const _0x27f498 of _0x1d33e8){if(!_0x27f498||typeof _0x27f498!=='object'||typeof _0x27f498['path']!==_0xd408be(0x1ee))throw CliErrors[_0xd408be(0x1c3)](_0xd408be(0x1e8));const _0x2734a1=normalizeSkillRelativePath(_0x27f498[_0xd408be(0x1db)]);if(_0x259c07['has'](_0x2734a1))throw CliErrors['validation'](_0xd408be(0x1dc)+_0x2734a1);if(_0x27f498[_0xd408be(0x1bf)]!==undefined&&!Buffer[_0xd408be(0x1cd)](_0x27f498[_0xd408be(0x1bf)]))throw CliErrors['validation'](_0xd408be(0x1ea)+_0x2734a1);if(_0x27f498['bytes']===undefined&&typeof _0x27f498['content']!==_0xd408be(0x1ee))throw CliErrors[_0xd408be(0x1c3)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x2734a1);const _0x1dd5bd=fileContent(_0x27f498);_0x259c07[_0xd408be(0x1de)](_0x2734a1,{'path':_0x2734a1,'bytes':_0x1dd5bd});}return Array['from'](_0x259c07[_0xd408be(0x1d7)]())[_0xd408be(0x1c5)](compareSkillFiles);}export function normalizeManifestFiles(_0x1b1b84){const _0x5c9820=a137_0x10f2;if(!Array[_0x5c9820(0x1d1)](_0x1b1b84)||_0x1b1b84[_0x5c9820(0x1d8)]===0x0)return[];const _0x10bb26=new Map();for(const _0x5804f3 of _0x1b1b84){if(!_0x5804f3||typeof _0x5804f3!=='object'||typeof _0x5804f3[_0x5c9820(0x1db)]!==_0x5c9820(0x1ee))throw CliErrors[_0x5c9820(0x1c3)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5b11f8=normalizeSkillRelativePath(_0x5804f3[_0x5c9820(0x1db)]);if(_0x10bb26[_0x5c9820(0x1ce)](_0x5b11f8))throw CliErrors[_0x5c9820(0x1c3)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x5b11f8);if(!isSha256Hex(_0x5804f3[_0x5c9820(0x1dd)]))throw CliErrors['validation']('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x5b11f8);if(!Number[_0x5c9820(0x1eb)](_0x5804f3[_0x5c9820(0x1ef)])||_0x5804f3[_0x5c9820(0x1ef)]<0x0)throw CliErrors['validation'](_0x5c9820(0x1f1)+_0x5b11f8);_0x10bb26['set'](_0x5b11f8,{'path':_0x5b11f8,'sha256':_0x5804f3[_0x5c9820(0x1dd)]['toLowerCase'](),'size':_0x5804f3[_0x5c9820(0x1ef)]});}return Array['from'](_0x10bb26[_0x5c9820(0x1d7)]())[_0x5c9820(0x1c5)](compareSkillFiles);}export function scanSkillDirectory(_0x3b6b43,_0x1cedb5={}){const _0x3a0b66=a137_0x10f2,_0x4795af=realpathSync(_0x3b6b43),_0x292035=canonicalExcludedFilePaths(_0x1cedb5[_0x3a0b66(0x1c0)]),_0x266f09=[];function _0x4bd7c6(_0x4b775d){const _0x183d10=_0x3a0b66,_0x340984=readdirSync(_0x4b775d,{'withFileTypes':!![]})[_0x183d10(0x1c5)]((_0x2b51f1,_0x395b13)=>_0x2b51f1[_0x183d10(0x1df)][_0x183d10(0x1ca)](_0x395b13[_0x183d10(0x1df)]));for(const _0x2ef560 of _0x340984){if(_0x2ef560['isDirectory']()&&IGNORED_DIR_NAMES[_0x183d10(0x1ce)](_0x2ef560['name']))continue;if(IGNORED_FILE_NAMES[_0x183d10(0x1ce)](_0x2ef560[_0x183d10(0x1df)]))continue;const _0x3d6c5e=resolve(_0x4b775d,_0x2ef560[_0x183d10(0x1df)]);if(isExcludedFilePath(_0x3d6c5e,_0x292035))continue;if(_0x2ef560[_0x183d10(0x1c9)]())throw CliErrors['validation'](_0x183d10(0x1d4)+_0x3d6c5e);const _0x23037c=toPosixPath(relative(_0x4795af,_0x3d6c5e));if(_0x2ef560[_0x183d10(0x1e0)]()){_0x4bd7c6(_0x3d6c5e);continue;}if(!_0x2ef560[_0x183d10(0x1e9)]())continue;validateSkillRelativePath(_0x23037c);const _0x1c5dd2=readFileSync(_0x3d6c5e);_0x266f09[_0x183d10(0x1d9)]({'path':_0x23037c,'bytes':_0x1c5dd2});}}return _0x4bd7c6(_0x4795af),normalizeLocalFiles(_0x266f09);}function canonicalExcludedFilePaths(_0x6ed80c){const _0x3024e2=a137_0x10f2,_0x75a903=new Set();for(const _0x216829 of _0x6ed80c??[]){const _0x1ae880=resolve(_0x216829);_0x75a903[_0x3024e2(0x1f0)](_0x1ae880);try{_0x75a903[_0x3024e2(0x1f0)](realpathSync(_0x1ae880));}catch{}}return _0x75a903;}function a137_0x10f2(_0xd02852,_0x1a30ea){_0xd02852=_0xd02852-0x1bf;const _0x3f1c14=a137_0x3f1c();let _0x10f298=_0x3f1c14[_0xd02852];return _0x10f298;}function isExcludedFilePath(_0x214520,_0x7482dd){const _0xce1250=a137_0x10f2;if(_0x7482dd[_0xce1250(0x1ce)](_0x214520))return!![];if(_0x7482dd[_0xce1250(0x1ef)]===0x0)return![];try{return _0x7482dd[_0xce1250(0x1ce)](realpathSync(_0x214520));}catch{return![];}}export function compareSkillFiles(_0x21c110,_0x1e4833){const _0x545e38=a137_0x10f2;if(_0x21c110['path']===SKILL_FILE)return _0x1e4833[_0x545e38(0x1db)]===SKILL_FILE?0x0:-0x1;if(_0x1e4833[_0x545e38(0x1db)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x545e38(0x1cf)](_0x21c110['path'],_0x545e38(0x1c4)),Buffer['from'](_0x1e4833[_0x545e38(0x1db)],_0x545e38(0x1c4)));}export function normalizeSkillRelativePath(_0x5d2a4a){const _0x39e39c=a137_0x10f2,_0x3652d4=toPosixPath(_0x5d2a4a[_0x39e39c(0x1e3)]());return validateSkillRelativePath(_0x3652d4),_0x3652d4;}export function validateSkillRelativePath(_0x481a7f){const _0x501410=a137_0x10f2;if(!_0x481a7f||_0x481a7f[_0x501410(0x1d0)]('/')||_0x481a7f[_0x501410(0x1d2)]('//'))throw CliErrors['validation'](_0x501410(0x1ec)+_0x481a7f);for(const _0xd0c548 of _0x481a7f[_0x501410(0x1e1)]('/')){if(!_0xd0c548||_0xd0c548==='.'||_0xd0c548==='..')throw CliErrors[_0x501410(0x1c3)](_0x501410(0x1ec)+_0x481a7f);}}export function toPosixPath(_0x3744fe){const _0x2c0546=a137_0x10f2;return _0x3744fe[_0x2c0546(0x1c2)](/\\/g,'/');}export function isSha256Hex(_0xd878d9){const _0x10f001=a137_0x10f2;return typeof _0xd878d9===_0x10f001(0x1ee)&&/^[a-fA-F0-9]{64}$/[_0x10f001(0x1d3)](_0xd878d9);}
1
+ (function(_0x25efcb,_0x586fdc){const _0x4399a0=a137_0x1343,_0x343d65=_0x25efcb();while(!![]){try{const _0x53e7bc=-parseInt(_0x4399a0(0xa2))/0x1+parseInt(_0x4399a0(0xa7))/0x2+-parseInt(_0x4399a0(0x93))/0x3*(parseInt(_0x4399a0(0x9e))/0x4)+-parseInt(_0x4399a0(0x88))/0x5*(parseInt(_0x4399a0(0x85))/0x6)+parseInt(_0x4399a0(0xa0))/0x7+parseInt(_0x4399a0(0x8b))/0x8*(-parseInt(_0x4399a0(0x8d))/0x9)+parseInt(_0x4399a0(0xa5))/0xa;if(_0x53e7bc===_0x586fdc)break;else _0x343d65['push'](_0x343d65['shift']());}catch(_0xaf832b){_0x343d65['push'](_0x343d65['shift']());}}}(a137_0x128c,0xdba8b));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(_0x19f815){const _0x25c4fd=a137_0x1343;return _0x19f815[_0x25c4fd(0xa6)]??Buffer[_0x25c4fd(0x9b)](_0x19f815['content']??'',_0x25c4fd(0x95));}export function fileText(_0x1a8f72){const _0x28ea52=a137_0x1343;return fileContent(_0x1a8f72)[_0x28ea52(0xa4)](_0x28ea52(0x95));}export function normalizeLocalFiles(_0x5170d3){const _0x5adb1d=a137_0x1343;if(!Array[_0x5adb1d(0x9d)](_0x5170d3)||_0x5170d3['length']===0x0)return[];const _0x1e3cd2=new Map();for(const _0x3ed8f2 of _0x5170d3){if(!_0x3ed8f2||typeof _0x3ed8f2!==_0x5adb1d(0x98)||typeof _0x3ed8f2['path']!=='string')throw CliErrors[_0x5adb1d(0x97)](_0x5adb1d(0x94));const _0x4b768f=normalizeSkillRelativePath(_0x3ed8f2[_0x5adb1d(0x7c)]);if(_0x1e3cd2[_0x5adb1d(0x80)](_0x4b768f))throw CliErrors[_0x5adb1d(0x97)](_0x5adb1d(0x7e)+_0x4b768f);if(_0x3ed8f2[_0x5adb1d(0xa6)]!==undefined&&!Buffer[_0x5adb1d(0x8e)](_0x3ed8f2[_0x5adb1d(0xa6)]))throw CliErrors[_0x5adb1d(0x97)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x4b768f);if(_0x3ed8f2['bytes']===undefined&&typeof _0x3ed8f2[_0x5adb1d(0xa9)]!==_0x5adb1d(0x8a))throw CliErrors[_0x5adb1d(0x97)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x4b768f);const _0x658858=fileContent(_0x3ed8f2);_0x1e3cd2[_0x5adb1d(0x92)](_0x4b768f,{'path':_0x4b768f,'bytes':_0x658858});}return Array[_0x5adb1d(0x9b)](_0x1e3cd2[_0x5adb1d(0x9c)]())[_0x5adb1d(0x8f)](compareSkillFiles);}export function normalizeManifestFiles(_0x1956aa){const _0x5977d8=a137_0x1343;if(!Array[_0x5977d8(0x9d)](_0x1956aa)||_0x1956aa[_0x5977d8(0x7d)]===0x0)return[];const _0x51e230=new Map();for(const _0x16790c of _0x1956aa){if(!_0x16790c||typeof _0x16790c!==_0x5977d8(0x98)||typeof _0x16790c[_0x5977d8(0x7c)]!==_0x5977d8(0x8a))throw CliErrors[_0x5977d8(0x97)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x53ce36=normalizeSkillRelativePath(_0x16790c[_0x5977d8(0x7c)]);if(_0x51e230[_0x5977d8(0x80)](_0x53ce36))throw CliErrors[_0x5977d8(0x97)](_0x5977d8(0x7e)+_0x53ce36);if(!isSha256Hex(_0x16790c[_0x5977d8(0xa1)]))throw CliErrors[_0x5977d8(0x97)](_0x5977d8(0xa8)+_0x53ce36);if(!Number[_0x5977d8(0xa3)](_0x16790c[_0x5977d8(0x8c)])||_0x16790c['size']<0x0)throw CliErrors[_0x5977d8(0x97)](_0x5977d8(0x89)+_0x53ce36);_0x51e230['set'](_0x53ce36,{'path':_0x53ce36,'sha256':_0x16790c[_0x5977d8(0xa1)][_0x5977d8(0x87)](),'size':_0x16790c[_0x5977d8(0x8c)]});}return Array['from'](_0x51e230[_0x5977d8(0x9c)]())[_0x5977d8(0x8f)](compareSkillFiles);}export function scanSkillDirectory(_0x45db7d,_0x19fd6a={}){const _0x54749b=a137_0x1343,_0x8b5772=realpathSync(_0x45db7d),_0x31e9ad=canonicalExcludedFilePaths(_0x19fd6a[_0x54749b(0x84)]),_0x595a4a=[];function _0x3b040d(_0x4e4cb0){const _0xe1b38b=_0x54749b,_0x5daeb5=readdirSync(_0x4e4cb0,{'withFileTypes':!![]})[_0xe1b38b(0x8f)]((_0x877a69,_0x71f191)=>_0x877a69[_0xe1b38b(0x86)]['localeCompare'](_0x71f191[_0xe1b38b(0x86)]));for(const _0x2e6130 of _0x5daeb5){if(_0x2e6130[_0xe1b38b(0x7f)]()&&IGNORED_DIR_NAMES[_0xe1b38b(0x80)](_0x2e6130[_0xe1b38b(0x86)]))continue;if(IGNORED_FILE_NAMES[_0xe1b38b(0x80)](_0x2e6130[_0xe1b38b(0x86)]))continue;const _0x302463=resolve(_0x4e4cb0,_0x2e6130['name']);if(isExcludedFilePath(_0x302463,_0x31e9ad))continue;if(_0x2e6130['isSymbolicLink']())throw CliErrors[_0xe1b38b(0x97)](_0xe1b38b(0x9a)+_0x302463);const _0x1498d4=toPosixPath(relative(_0x8b5772,_0x302463));if(_0x2e6130['isDirectory']()){_0x3b040d(_0x302463);continue;}if(!_0x2e6130[_0xe1b38b(0x96)]())continue;validateSkillRelativePath(_0x1498d4);const _0x3717eb=readFileSync(_0x302463);_0x595a4a[_0xe1b38b(0x90)]({'path':_0x1498d4,'bytes':_0x3717eb});}}return _0x3b040d(_0x8b5772),normalizeLocalFiles(_0x595a4a);}function canonicalExcludedFilePaths(_0x2614c0){const _0x478958=a137_0x1343,_0x3d7c92=new Set();for(const _0x2648d3 of _0x2614c0??[]){const _0x45cc04=resolve(_0x2648d3);_0x3d7c92[_0x478958(0x82)](_0x45cc04);try{_0x3d7c92[_0x478958(0x82)](realpathSync(_0x45cc04));}catch{}}return _0x3d7c92;}function a137_0x1343(_0x109053,_0x996349){_0x109053=_0x109053-0x7b;const _0x128c80=a137_0x128c();let _0x13438f=_0x128c80[_0x109053];return _0x13438f;}function isExcludedFilePath(_0x2cbb80,_0x9db0d9){const _0xcff0a3=a137_0x1343;if(_0x9db0d9[_0xcff0a3(0x80)](_0x2cbb80))return!![];if(_0x9db0d9[_0xcff0a3(0x8c)]===0x0)return![];try{return _0x9db0d9[_0xcff0a3(0x80)](realpathSync(_0x2cbb80));}catch{return![];}}export function compareSkillFiles(_0x5a9afc,_0x124ead){const _0x1f07be=a137_0x1343;if(_0x5a9afc['path']===SKILL_FILE)return _0x124ead[_0x1f07be(0x7c)]===SKILL_FILE?0x0:-0x1;if(_0x124ead[_0x1f07be(0x7c)]===SKILL_FILE)return 0x1;return Buffer[_0x1f07be(0x99)](Buffer['from'](_0x5a9afc['path'],'utf8'),Buffer[_0x1f07be(0x9b)](_0x124ead['path'],_0x1f07be(0x95)));}function a137_0x128c(){const _0x514428=['string','1683496UMyOvv','size','9bjilhz','isBuffer','sort','push','Unsafe\x20Skill\x20file\x20path:\x20','set','368931himmJX','Skill\x20file\x20path\x20must\x20be\x20text.','utf8','isFile','validation','object','compare','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','from','values','isArray','24SScpgK','startsWith','3838198kelyWX','sha256','1659449ZxbOlw','isSafeInteger','toString','28149720FXpsNe','bytes','2321422ZaKpRc','Skill\x20file\x20sha256\x20is\x20invalid:\x20','content','replace','path','length','Duplicate\x20Skill\x20file\x20path:\x20','isDirectory','has','includes','add','split','excludedFilePaths','126pbCPLg','name','toLowerCase','242030eakeUH','Skill\x20file\x20size\x20is\x20invalid:\x20'];a137_0x128c=function(){return _0x514428;};return a137_0x128c();}export function normalizeSkillRelativePath(_0x430fec){const _0x31bd02=toPosixPath(_0x430fec['trim']());return validateSkillRelativePath(_0x31bd02),_0x31bd02;}export function validateSkillRelativePath(_0x26eff6){const _0x180502=a137_0x1343;if(!_0x26eff6||_0x26eff6[_0x180502(0x9f)]('/')||_0x26eff6[_0x180502(0x81)]('//'))throw CliErrors[_0x180502(0x97)](_0x180502(0x91)+_0x26eff6);for(const _0x540211 of _0x26eff6[_0x180502(0x83)]('/')){if(!_0x540211||_0x540211==='.'||_0x540211==='..')throw CliErrors[_0x180502(0x97)](_0x180502(0x91)+_0x26eff6);}}export function toPosixPath(_0x3841b7){const _0x56a30c=a137_0x1343;return _0x3841b7[_0x56a30c(0x7b)](/\\/g,'/');}export function isSha256Hex(_0x54b8f0){const _0x4ec534=a137_0x1343;return typeof _0x54b8f0===_0x4ec534(0x8a)&&/^[a-fA-F0-9]{64}$/['test'](_0x54b8f0);}
@@ -9,3 +9,10 @@ export declare function materializeRuntimeSkill(skill: RuntimeSkillItem, scope:
9
9
  force?: boolean;
10
10
  packageBytes?: Buffer;
11
11
  }): MaterializedRuntimeSkill;
12
+ /** Reuses an intact immutable remote version without downloading its package again. */
13
+ export declare function reuseMaterializedRuntimeSkill(skill: RuntimeSkillItem, scope: RuntimeSkillScope, options: {
14
+ env: "production" | "development" | "daily";
15
+ accessKey: string;
16
+ appCode: string;
17
+ paths?: SkillSyncPathsOptions;
18
+ }): MaterializedRuntimeSkill | undefined;
@@ -1 +1 @@
1
- (function(_0x1481af,_0x273e3c){const _0x192621=a138_0x1c50,_0x47d41e=_0x1481af();while(!![]){try{const _0x33d816=-parseInt(_0x192621(0x112))/0x1*(-parseInt(_0x192621(0x13d))/0x2)+-parseInt(_0x192621(0x110))/0x3+parseInt(_0x192621(0x13c))/0x4*(parseInt(_0x192621(0x114))/0x5)+-parseInt(_0x192621(0x11e))/0x6+parseInt(_0x192621(0x12e))/0x7+parseInt(_0x192621(0x117))/0x8+-parseInt(_0x192621(0x11c))/0x9;if(_0x33d816===_0x273e3c)break;else _0x47d41e['push'](_0x47d41e['shift']());}catch(_0x3349cf){_0x47d41e['push'](_0x47d41e['shift']());}}}(a138_0x46b5,0x29a60));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 a138_0x46b5(){const _0x4bb482=['44496tzBUQW','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','trim','isFile','description','path','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','test','Managed\x20file\x20was\x20removed\x20locally:\x20','stringify','\x0a---\x0a\x0a','fileHashes','toString','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','match','552524YcFRhV','paths','name','has','contentHash','flow','find','trimEnd','force','validation','packageBytes','replace','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','join','378232XuKSup','20UPWwms','length','keys','name:\x20','skillName','---\x0a','entries','map','pulledAt','284778PCGuTl','slice','4292ZpMThO','.\x20Changed\x20file:\x20','5HvDEpA','description:\x20','displayName:\x20','2549824CUHnUe','filter','appCode','displayName','contents','2359836eiFAvM','---'];a138_0x46b5=function(){return _0x4bb482;};return a138_0x46b5();}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0xf1ef54,_0x57daf0,_0x28b03f){const _0x517368=a138_0x1c50,_0x4cca2c=requireSkillCode(_0xf1ef54),_0x45a136=requirePackageBytes(_0x4cca2c,_0x28b03f[_0x517368(0x138)]),_0x1b0de1=extractDownloadedPackage(_0x45a136),_0x100a43=_0x1b0de1['find'](_0x4bf290=>_0x4bf290[_0x517368(0x123)]===SKILL_FILE);if(!_0x100a43)throw CliErrors[_0x517368(0x137)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x4cca2c);const _0x5e1ae4=withMaterializedSkillFrontmatter(_0x1b0de1,_0xf1ef54,_0x4cca2c),_0x274565=_0x5e1ae4[_0x517368(0x134)](_0x673a64=>_0x673a64[_0x517368(0x123)]===SKILL_FILE),_0x6a5cb0=fileText(_0x274565),_0x44cc3d=getRuntimeSkillDir(_0x28b03f['env'],_0x28b03f['accessKey'],_0x28b03f[_0x517368(0x119)],_0x57daf0,_0x4cca2c,_0x28b03f[_0x517368(0x12f)]),_0x341415=resolve(_0x44cc3d,SKILL_FILE),_0x3f8cea=resolve(_0x44cc3d,METADATA_FILE),_0x202516=contentHash(_0x6a5cb0),_0x102c79=readMetadataIfPresent(_0x3f8cea)?.[_0x517368(0x12a)];ensurePulledFilesCanBeOverwritten(_0x44cc3d,_0x3f8cea,_0x5e1ae4,_0x28b03f[_0x517368(0x136)]===!![]),mkdirSync(_0x44cc3d,{'recursive':!![],'mode':0x1c0});const _0x2dabc8=existsSync(_0x341415)?readFileSync(_0x341415,'utf8'):undefined;return materializeFiles(_0x44cc3d,_0x5e1ae4),removeStaleManagedFiles(_0x44cc3d,_0x102c79,_0x5e1ae4),writeJsonAtomic(_0x3f8cea,buildMetadata(_0xf1ef54,_0x57daf0,_0x28b03f[_0x517368(0x119)],_0x202516,_0x28b03f[_0x517368(0x10f)],_0x5e1ae4,_0x45a136)),{'skill':_0xf1ef54,'scope':_0x57daf0,'dir':_0x44cc3d,'skillMdPath':_0x341415,'metadataPath':_0x3f8cea,'contentHash':_0x202516,'changed':_0x2dabc8!==_0x6a5cb0};}function withMaterializedSkillFrontmatter(_0x4ab6ca,_0xb7cacb,_0x35551b){const _0x2d271f=a138_0x1c50,_0x507c8c=skillDisplayName(_0xb7cacb,_0x35551b),_0x53732e=_0xb7cacb['description']?.[_0x2d271f(0x120)]()||_0x507c8c||_0x35551b;return normalizeLocalFiles(_0x4ab6ca)[_0x2d271f(0x10e)](_0x484ba6=>{const _0x3d38ba=_0x2d271f,_0x49d181=fileText(_0x484ba6);if(_0x484ba6['path']!==SKILL_FILE)return _0x484ba6;if(hasYamlFrontmatter(_0x49d181))return{'path':_0x484ba6[_0x3d38ba(0x123)],'content':withSyncedDisplayName(_0x49d181,_0x507c8c)};return{'path':_0x484ba6['path'],'content':prependSkillFrontmatter(_0x49d181,{'name':_0x35551b,'displayName':_0x507c8c,'description':_0x53732e})};});}function hasYamlFrontmatter(_0x22c185){const _0x42b686=a138_0x1c50;return/^\uFEFF?---\s*\r?\n/[_0x42b686(0x126)](_0x22c185);}function prependSkillFrontmatter(_0x281b23,_0x498237){const _0xa11455=a138_0x1c50,_0x39883c=_0x281b23[_0xa11455(0x139)](/^\uFEFF/,'');return['---',_0xa11455(0x140)+yamlString(_0x498237[_0xa11455(0x130)]),_0x498237[_0xa11455(0x11a)]?_0xa11455(0x116)+yamlString(_0x498237[_0xa11455(0x11a)]):undefined,_0xa11455(0x115)+yamlString(_0x498237[_0xa11455(0x122)]),_0xa11455(0x11d),'',_0x39883c][_0xa11455(0x118)](_0x3ec00c=>_0x3ec00c!==undefined)[_0xa11455(0x13b)]('\x0a');}function yamlString(_0x4ded89){const _0x17b781=a138_0x1c50;return JSON[_0x17b781(0x128)](_0x4ded89[_0x17b781(0x139)](/\r/g,'')[_0x17b781(0x120)]());}function skillDisplayName(_0x4f70f9,_0x54b21b){const _0x2a3b90=a138_0x1c50,_0x520f86=_0x4f70f9[_0x2a3b90(0x141)]?.['trim']();return _0x520f86||_0x54b21b;}function withSyncedDisplayName(_0x21480a,_0x1b4bfc){const _0x3685fe=a138_0x1c50,_0x2c1531=_0x21480a[_0x3685fe(0x12d)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2c1531)return _0x21480a;const _0x54d21b=_0x2c1531[0x1]??'',_0x28e13e=_0x2c1531[0x2]??'',_0x31d115=parseDocument(_0x28e13e);if(_0x31d115['errors']['length']>0x0||!isMap(_0x31d115[_0x3685fe(0x11b)]))return _0x21480a;if(_0x1b4bfc)_0x31d115['set']('displayName',_0x1b4bfc);else{if(_0x31d115[_0x3685fe(0x131)](_0x3685fe(0x11a)))_0x31d115['delete']('displayName');else return _0x21480a;}forceBlockCollections(_0x31d115[_0x3685fe(0x11b)]);const _0x1f9f19=_0x31d115[_0x3685fe(0x12b)]({'lineWidth':0x0})[_0x3685fe(0x135)](),_0x3a3cff=_0x21480a[_0x3685fe(0x111)](_0x2c1531[0x0][_0x3685fe(0x13e)])[_0x3685fe(0x139)](/^\r?\n/,'');return _0x54d21b+_0x3685fe(0x142)+_0x1f9f19+_0x3685fe(0x129)+_0x3a3cff;}function forceBlockCollections(_0x49ba3e){if(!isNode(_0x49ba3e))return;visit(_0x49ba3e,(_0x47e97c,_0xb65e3d)=>{const _0x59bb67=a138_0x1c50;isCollection(_0xb65e3d)&&(_0xb65e3d[_0x59bb67(0x133)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0xd9a3aa,_0x20e76e,_0x26c278,_0x490a2f){const _0x5624db=a138_0x1c50;if(_0x490a2f||!existsSync(_0x20e76e))return;const _0x326e56=readMetadataIfPresent(_0x20e76e);if(!_0x326e56)return;const _0x3b8c69=_0x326e56['fileHashes']&&Object['keys'](_0x326e56[_0x5624db(0x12a)])['length']>0x0?_0x326e56[_0x5624db(0x12a)]:undefined;if(_0x3b8c69)for(const [_0x33beb8,_0x34b7b8]of Object[_0x5624db(0x10d)](_0x3b8c69)){const _0x2e001b=resolveManagedFilePath(_0xd9a3aa,_0x33beb8);if(!existsSync(_0x2e001b))throw CliErrors[_0x5624db(0x137)](_0x5624db(0x12c)+_0xd9a3aa,_0x5624db(0x127)+_0x33beb8);const _0x1759a0=lstatSync(_0x2e001b);if(!_0x1759a0['isFile']())throw CliErrors['validation'](_0x5624db(0x12c)+_0xd9a3aa,_0x5624db(0x124)+_0x33beb8);const _0x2a6ab8=bufferSha256(readFileSync(_0x2e001b));if(_0x2a6ab8!==_0x34b7b8)throw CliErrors[_0x5624db(0x137)](_0x5624db(0x12c)+_0xd9a3aa+_0x5624db(0x113)+_0x33beb8,_0x5624db(0x11f)+_0x33beb8);}else{const _0x23d7ca=resolve(_0xd9a3aa,SKILL_FILE);if(existsSync(_0x23d7ca)&&_0x326e56[_0x5624db(0x132)]){const _0x1cb89f=contentHash(readFileSync(_0x23d7ca,'utf8'));if(_0x1cb89f!==_0x326e56[_0x5624db(0x132)])throw CliErrors[_0x5624db(0x137)](_0x5624db(0x125)+_0x23d7ca,_0x5624db(0x13a));}}for(const _0x3be789 of normalizeLocalFiles(_0x26c278)){if(_0x3b8c69?.[_0x3be789[_0x5624db(0x123)]])continue;if(!_0x3b8c69&&_0x3be789[_0x5624db(0x123)]===SKILL_FILE)continue;const _0x21b50f=resolveManagedFilePath(_0xd9a3aa,_0x3be789['path']);if(!existsSync(_0x21b50f))continue;const _0x522dcc=lstatSync(_0x21b50f);if(!_0x522dcc['isFile']())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xd9a3aa,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x3be789[_0x5624db(0x123)]);const _0x868635=bufferSha256(readFileSync(_0x21b50f));if(_0x868635!==fileHash(_0x3be789))throw CliErrors['validation'](_0x5624db(0x12c)+_0xd9a3aa,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3be789['path']);}}function a138_0x1c50(_0x5ac1db,_0x5c6dd7){_0x5ac1db=_0x5ac1db-0x10d;const _0x46b5a4=a138_0x46b5();let _0x1c50ee=_0x46b5a4[_0x5ac1db];return _0x1c50ee;}function materializeFiles(_0x441729,_0x40d05b){for(const _0x45c1bb of normalizeLocalFiles(_0x40d05b)){const _0xf843e5=resolveManagedFilePath(_0x441729,_0x45c1bb['path']);mkdirSync(dirname(_0xf843e5),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0xf843e5,fileContent(_0x45c1bb),0x180);}}function removeStaleManagedFiles(_0x4279a3,_0x446754,_0x2d7286){const _0x474fc5=a138_0x1c50;if(!_0x446754)return;const _0x333da4=new Set(normalizeLocalFiles(_0x2d7286)[_0x474fc5(0x10e)](_0x9cb523=>_0x9cb523[_0x474fc5(0x123)]));for(const _0x17ac97 of Object[_0x474fc5(0x13f)](_0x446754)){if(_0x333da4[_0x474fc5(0x131)](_0x17ac97))continue;const _0x262df2=resolveManagedFilePath(_0x4279a3,_0x17ac97);existsSync(_0x262df2)&&lstatSync(_0x262df2)[_0x474fc5(0x121)]()&&rmSync(_0x262df2,{'force':!![]});}}
1
+ (function(_0x36f089,_0x2b523c){const _0x26cb93=a138_0xa0f9,_0x25f06f=_0x36f089();while(!![]){try{const _0x4dda50=parseInt(_0x26cb93(0x9f))/0x1*(-parseInt(_0x26cb93(0x84))/0x2)+parseInt(_0x26cb93(0x8b))/0x3+-parseInt(_0x26cb93(0x8f))/0x4*(parseInt(_0x26cb93(0xb5))/0x5)+parseInt(_0x26cb93(0x7e))/0x6*(parseInt(_0x26cb93(0x8e))/0x7)+parseInt(_0x26cb93(0x9e))/0x8+-parseInt(_0x26cb93(0x82))/0x9*(-parseInt(_0x26cb93(0xb3))/0xa)+-parseInt(_0x26cb93(0x8c))/0xb;if(_0x4dda50===_0x2b523c)break;else _0x25f06f['push'](_0x25f06f['shift']());}catch(_0x470dd6){_0x25f06f['push'](_0x25f06f['shift']());}}}(a138_0x44cb,0x812db));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a138_0x44cb(){const _0x1c84c2=['---\x0a','length','name','2436048IyPFNc','3hXFYfU','---','pulledAt','test','path','displayName','stringify','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','name:\x20','validation','find','utf8','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','\x0a---\x0a\x0a','.\x20Changed\x20file:\x20','example','skillName','map','fileHashes','packageBytes','640DiYPxl','delete','117295wCGTWz','replace','trim','version','scope','6PyHPxW','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description','Runtime\x20Skill\x20package\x20is\x20missing\x20','100413yeqKXd','appCode','51406fkrAlY','slice','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','flow','skillCode','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','2705763IYqOpG','22654885PxQEBH','status','6038053pJUOQC','20tFacjW','isFile','has','displayName:\x20','contentHash','env','filter','keys','entries','join','errors','contents'];a138_0x44cb=function(){return _0x1c84c2;};return a138_0x44cb();}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(_0x433778,_0x430bf6,_0x3e7ef9){const _0x53b913=a138_0xa0f9,_0x33ef28=requireSkillCode(_0x433778),_0x51e11d=requirePackageBytes(_0x33ef28,_0x3e7ef9[_0x53b913(0xb2)]),_0x2bd6f6=extractDownloadedPackage(_0x51e11d),_0xd7c580=_0x2bd6f6[_0x53b913(0xa9)](_0x129a5=>_0x129a5[_0x53b913(0xa3)]===SKILL_FILE);if(!_0xd7c580)throw CliErrors['validation'](_0x53b913(0x81)+SKILL_FILE+':\x20'+_0x33ef28);const _0x229387=withMaterializedSkillFrontmatter(_0x2bd6f6,_0x433778,_0x33ef28),_0x14c972=_0x229387[_0x53b913(0xa9)](_0x53dabf=>_0x53dabf[_0x53b913(0xa3)]===SKILL_FILE),_0x39c824=fileText(_0x14c972),_0x34be8e=getRuntimeSkillDir(_0x3e7ef9[_0x53b913(0x94)],_0x3e7ef9['accessKey'],_0x3e7ef9[_0x53b913(0x83)],_0x430bf6,_0x33ef28,_0x3e7ef9['paths']),_0x50ff5f=resolve(_0x34be8e,SKILL_FILE),_0x144a6c=resolve(_0x34be8e,METADATA_FILE),_0x56c3a0=contentHash(_0x39c824),_0x867032=readMetadataIfPresent(_0x144a6c)?.[_0x53b913(0xb1)];ensurePulledFilesCanBeOverwritten(_0x34be8e,_0x144a6c,_0x229387,_0x3e7ef9['force']===!![]),mkdirSync(_0x34be8e,{'recursive':!![],'mode':0x1c0});const _0x3113cf=existsSync(_0x50ff5f)?readFileSync(_0x50ff5f,'utf8'):undefined;return materializeFiles(_0x34be8e,_0x229387),removeStaleManagedFiles(_0x34be8e,_0x867032,_0x229387),writeJsonAtomic(_0x144a6c,buildMetadata(_0x433778,_0x430bf6,_0x3e7ef9[_0x53b913(0x83)],_0x56c3a0,_0x3e7ef9[_0x53b913(0xa1)],_0x229387,_0x51e11d)),{'skill':_0x433778,'scope':_0x430bf6,'dir':_0x34be8e,'skillMdPath':_0x50ff5f,'metadataPath':_0x144a6c,'contentHash':_0x56c3a0,'changed':_0x3113cf!==_0x39c824};}export function reuseMaterializedRuntimeSkill(_0x257427,_0x349a49,_0x543b6b){const _0xe07244=a138_0xa0f9,_0x470d14=_0x257427[_0xe07244(0x7c)]?.[_0xe07244(0xb7)]();if(!_0x470d14)return undefined;const _0x3f6205=requireSkillCode(_0x257427),_0x5255f4=getRuntimeSkillDir(_0x543b6b['env'],_0x543b6b['accessKey'],_0x543b6b[_0xe07244(0x83)],_0x349a49,_0x3f6205,_0x543b6b['paths']),_0x450985=resolve(_0x5255f4,SKILL_FILE),_0x222bfd=resolve(_0x5255f4,METADATA_FILE),_0x3872f7=readMetadataIfPresent(_0x222bfd);if(!_0x3872f7||_0x3872f7['schemaVersion']!==0x2||_0x3872f7[_0xe07244(0x83)]!==_0x543b6b['appCode']||_0x3872f7[_0xe07244(0x7d)]!==_0x349a49||_0x3872f7[_0xe07244(0x89)]!==_0x3f6205||_0x3872f7['version']!==_0x470d14||_0x3872f7['id']!==_0x257427['id']||_0x3872f7[_0xe07244(0xaf)]!==_0x257427[_0xe07244(0xaf)]||_0x3872f7[_0xe07244(0x80)]!==_0x257427[_0xe07244(0x80)]||_0x3872f7[_0xe07244(0xae)]!==_0x257427['example']||_0x3872f7[_0xe07244(0x8d)]!==_0x257427[_0xe07244(0x8d)]||!_0x3872f7['contentHash']||!_0x3872f7[_0xe07244(0xb1)]||!Object['hasOwn'](_0x3872f7[_0xe07244(0xb1)],SKILL_FILE))return undefined;for(const [_0x1e142d,_0x11e144]of Object['entries'](_0x3872f7[_0xe07244(0xb1)])){if(!/^[a-f0-9]{64}$/[_0xe07244(0xa2)](_0x11e144))return undefined;const _0x3d9d05=resolveManagedFilePath(_0x5255f4,_0x1e142d);if(!existsSync(_0x3d9d05)||!lstatSync(_0x3d9d05)['isFile']())return undefined;if(bufferSha256(readFileSync(_0x3d9d05))!==_0x11e144)return undefined;}return{'skill':_0x257427,'scope':_0x349a49,'dir':_0x5255f4,'skillMdPath':_0x450985,'metadataPath':_0x222bfd,'contentHash':_0x3872f7[_0xe07244(0x93)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x16add1,_0x17dd0b,_0x4d4aa0){const _0x4d3d78=a138_0xa0f9,_0x5c0958=skillDisplayName(_0x17dd0b,_0x4d4aa0),_0x4e253c=_0x17dd0b['description']?.['trim']()||_0x5c0958||_0x4d4aa0;return normalizeLocalFiles(_0x16add1)[_0x4d3d78(0xb0)](_0x5a83dc=>{const _0x2d0459=_0x4d3d78,_0x38cc81=fileText(_0x5a83dc);if(_0x5a83dc[_0x2d0459(0xa3)]!==SKILL_FILE)return _0x5a83dc;if(hasYamlFrontmatter(_0x38cc81))return{'path':_0x5a83dc['path'],'content':withSyncedDisplayName(_0x38cc81,_0x5c0958)};return{'path':_0x5a83dc[_0x2d0459(0xa3)],'content':prependSkillFrontmatter(_0x38cc81,{'name':_0x4d4aa0,'displayName':_0x5c0958,'description':_0x4e253c})};});}function hasYamlFrontmatter(_0x264ddd){const _0x302f51=a138_0xa0f9;return/^\uFEFF?---\s*\r?\n/[_0x302f51(0xa2)](_0x264ddd);}function prependSkillFrontmatter(_0x140fd6,_0x24902d){const _0x11c2f9=a138_0xa0f9,_0x19a154=_0x140fd6[_0x11c2f9(0xb6)](/^\uFEFF/,'');return[_0x11c2f9(0xa0),_0x11c2f9(0xa7)+yamlString(_0x24902d[_0x11c2f9(0x9d)]),_0x24902d[_0x11c2f9(0xa4)]?_0x11c2f9(0x92)+yamlString(_0x24902d['displayName']):undefined,'description:\x20'+yamlString(_0x24902d[_0x11c2f9(0x80)]),'---','',_0x19a154][_0x11c2f9(0x95)](_0x54d0ee=>_0x54d0ee!==undefined)[_0x11c2f9(0x98)]('\x0a');}function yamlString(_0x695202){const _0x2665c4=a138_0xa0f9;return JSON[_0x2665c4(0xa5)](_0x695202[_0x2665c4(0xb6)](/\r/g,'')[_0x2665c4(0xb7)]());}function a138_0xa0f9(_0x21c318,_0x50e49f){_0x21c318=_0x21c318-0x7c;const _0x44cb84=a138_0x44cb();let _0xa0f94b=_0x44cb84[_0x21c318];return _0xa0f94b;}function skillDisplayName(_0xbc1db3,_0x40a6c5){const _0x3b993e=a138_0xa0f9,_0x43f1d1=_0xbc1db3[_0x3b993e(0xaf)]?.[_0x3b993e(0xb7)]();return _0x43f1d1||_0x40a6c5;}function withSyncedDisplayName(_0x4c5021,_0x5cfe7c){const _0x1a13b0=a138_0xa0f9,_0x651f20=_0x4c5021['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x651f20)return _0x4c5021;const _0x4bd9c3=_0x651f20[0x1]??'',_0x2cf9fc=_0x651f20[0x2]??'',_0x3d32a7=parseDocument(_0x2cf9fc);if(_0x3d32a7[_0x1a13b0(0x99)][_0x1a13b0(0x9c)]>0x0||!isMap(_0x3d32a7['contents']))return _0x4c5021;if(_0x5cfe7c)_0x3d32a7['set'](_0x1a13b0(0xa4),_0x5cfe7c);else{if(_0x3d32a7['has'](_0x1a13b0(0xa4)))_0x3d32a7[_0x1a13b0(0xb4)](_0x1a13b0(0xa4));else return _0x4c5021;}forceBlockCollections(_0x3d32a7[_0x1a13b0(0x9a)]);const _0x2f156e=_0x3d32a7['toString']({'lineWidth':0x0})['trimEnd'](),_0x1f3f58=_0x4c5021[_0x1a13b0(0x85)](_0x651f20[0x0][_0x1a13b0(0x9c)])['replace'](/^\r?\n/,'');return _0x4bd9c3+_0x1a13b0(0x9b)+_0x2f156e+_0x1a13b0(0xac)+_0x1f3f58;}function forceBlockCollections(_0xce7e3d){if(!isNode(_0xce7e3d))return;visit(_0xce7e3d,(_0x23e153,_0x5d5a39)=>{const _0x4bcf15=a138_0xa0f9;isCollection(_0x5d5a39)&&(_0x5d5a39[_0x4bcf15(0x88)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2fd1ac,_0x139512,_0x143289,_0x5dc10a){const _0x16fc4b=a138_0xa0f9;if(_0x5dc10a||!existsSync(_0x139512))return;const _0x34577e=readMetadataIfPresent(_0x139512);if(!_0x34577e)return;const _0x3c515a=_0x34577e[_0x16fc4b(0xb1)]&&Object[_0x16fc4b(0x96)](_0x34577e[_0x16fc4b(0xb1)])[_0x16fc4b(0x9c)]>0x0?_0x34577e['fileHashes']:undefined;if(_0x3c515a)for(const [_0x72e35f,_0x360702]of Object[_0x16fc4b(0x97)](_0x3c515a)){const _0x45e840=resolveManagedFilePath(_0x2fd1ac,_0x72e35f);if(!existsSync(_0x45e840))throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0xab)+_0x2fd1ac,_0x16fc4b(0x87)+_0x72e35f);const _0x236e54=lstatSync(_0x45e840);if(!_0x236e54[_0x16fc4b(0x90)]())throw CliErrors['validation'](_0x16fc4b(0xab)+_0x2fd1ac,_0x16fc4b(0x7f)+_0x72e35f);const _0x23417f=bufferSha256(readFileSync(_0x45e840));if(_0x23417f!==_0x360702)throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0xab)+_0x2fd1ac+_0x16fc4b(0xad)+_0x72e35f,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x72e35f);}else{const _0x7c6d77=resolve(_0x2fd1ac,SKILL_FILE);if(existsSync(_0x7c6d77)&&_0x34577e[_0x16fc4b(0x93)]){const _0x35edc3=contentHash(readFileSync(_0x7c6d77,_0x16fc4b(0xaa)));if(_0x35edc3!==_0x34577e[_0x16fc4b(0x93)])throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0x8a)+_0x7c6d77,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x46f351 of normalizeLocalFiles(_0x143289)){if(_0x3c515a?.[_0x46f351[_0x16fc4b(0xa3)]])continue;if(!_0x3c515a&&_0x46f351[_0x16fc4b(0xa3)]===SKILL_FILE)continue;const _0x3bacf1=resolveManagedFilePath(_0x2fd1ac,_0x46f351[_0x16fc4b(0xa3)]);if(!existsSync(_0x3bacf1))continue;const _0x1d262d=lstatSync(_0x3bacf1);if(!_0x1d262d['isFile']())throw CliErrors[_0x16fc4b(0xa8)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2fd1ac,_0x16fc4b(0xa6)+_0x46f351[_0x16fc4b(0xa3)]);const _0x31582e=bufferSha256(readFileSync(_0x3bacf1));if(_0x31582e!==fileHash(_0x46f351))throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0xab)+_0x2fd1ac,_0x16fc4b(0x86)+_0x46f351[_0x16fc4b(0xa3)]);}}function materializeFiles(_0xb73f0d,_0x455c98){const _0x5b6bb0=a138_0xa0f9;for(const _0x3caa20 of normalizeLocalFiles(_0x455c98)){const _0x171685=resolveManagedFilePath(_0xb73f0d,_0x3caa20[_0x5b6bb0(0xa3)]);mkdirSync(dirname(_0x171685),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x171685,fileContent(_0x3caa20),0x180);}}function removeStaleManagedFiles(_0x4472f2,_0x6b8354,_0x454305){const _0x59fe41=a138_0xa0f9;if(!_0x6b8354)return;const _0x5e70aa=new Set(normalizeLocalFiles(_0x454305)['map'](_0x3abc86=>_0x3abc86[_0x59fe41(0xa3)]));for(const _0x255f9c of Object['keys'](_0x6b8354)){if(_0x5e70aa[_0x59fe41(0x91)](_0x255f9c))continue;const _0x12003d=resolveManagedFilePath(_0x4472f2,_0x255f9c);existsSync(_0x12003d)&&lstatSync(_0x12003d)[_0x59fe41(0x90)]()&&rmSync(_0x12003d,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x1658b2,_0x4e32c7){const _0x5e518a=a139_0x3f82,_0x2e3b8d=_0x1658b2();while(!![]){try{const _0x244b18=-parseInt(_0x5e518a(0x193))/0x1+-parseInt(_0x5e518a(0x188))/0x2+parseInt(_0x5e518a(0x1a5))/0x3*(parseInt(_0x5e518a(0x1a6))/0x4)+parseInt(_0x5e518a(0x194))/0x5*(parseInt(_0x5e518a(0x1ae))/0x6)+parseInt(_0x5e518a(0x1ac))/0x7*(-parseInt(_0x5e518a(0x1a8))/0x8)+parseInt(_0x5e518a(0x18b))/0x9*(-parseInt(_0x5e518a(0x187))/0xa)+-parseInt(_0x5e518a(0x198))/0xb*(-parseInt(_0x5e518a(0x191))/0xc);if(_0x244b18===_0x4e32c7)break;else _0x2e3b8d['push'](_0x2e3b8d['shift']());}catch(_0xbc5f32){_0x2e3b8d['push'](_0x2e3b8d['shift']());}}}(a139_0x1d39,0xa59a9));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a139_0x1d39(){const _0x1649f4=['readonly','1098150owxMjq','2112104iZiyBE','map','fromEntries','18iBbUEd','example','zipSize','trim','length','skillCode','41730912ZahAPi','userId','1299086lDhjkw','1682570BbuJPU','ossPath','personal','skillName','11CNrBDy','zipSha256','Invalid\x20','forkedFromSkillId','tenantCode','path','validation','version','parse','toISOString','manifest','string','isArray','3fhPqHA','2408556BrjyeI','status','20496cseJZq','object','files','hasUpstreamUpdate','3178OZyqyZ','tags','6ZBRjxl','Runtime\x20Skill\x20is\x20missing\x20skillCode.','description'];a139_0x1d39=function(){return _0x1649f4;};return a139_0x1d39();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3fe982,_0x4c79fb,_0x28d9f2,_0xb01848,_0x12d3ea,_0x553361,_0x1e9253){const _0x2acff4=a139_0x3f82,_0x4eee41=_0x553361?normalizeLocalFiles(_0x553361):[],_0x12981a=!_0x1e9253&&_0x4eee41[_0x2acff4(0x18f)]>0x0?buildSkillPackage(_0x4eee41):undefined,_0x4e4c63=_0x1e9253?bufferSha256(_0x1e9253):_0x12981a?.[_0x2acff4(0x1a2)][_0x2acff4(0x199)],_0x1377df=_0x1e9253?.['length']??_0x12981a?.['manifest'][_0x2acff4(0x18d)],_0x3e5a31=_0x4eee41[_0x2acff4(0x18f)]>0x0?Object[_0x2acff4(0x18a)](_0x4eee41[_0x2acff4(0x189)](_0x5c003d=>[_0x5c003d[_0x2acff4(0x19d)],fileHash(_0x5c003d)])):undefined;return{'schemaVersion':_0x4eee41['length']>0x0?0x2:0x1,'id':_0x3fe982['id'],'appCode':_0x28d9f2,'skillCode':requireSkillCode(_0x3fe982),'skillName':_0x3fe982[_0x2acff4(0x197)],'description':_0x3fe982[_0x2acff4(0x1b0)],'example':_0x3fe982[_0x2acff4(0x18c)],'scope':_0x4c79fb,'readonly':_0x4c79fb!==_0x2acff4(0x196)||_0x3fe982[_0x2acff4(0x1b1)]===!![],'tenantCode':_0x3fe982[_0x2acff4(0x19c)],'userId':_0x3fe982[_0x2acff4(0x192)],'version':_0x3fe982[_0x2acff4(0x19f)],'status':_0x3fe982[_0x2acff4(0x1a7)],'tags':Array[_0x2acff4(0x1a4)](_0x3fe982['tags'])?_0x3fe982[_0x2acff4(0x1ad)]:[],'hasUpstreamUpdate':_0x3fe982[_0x2acff4(0x1ab)],'forkedFromSkillId':_0x3fe982[_0x2acff4(0x19b)],'forkedFromVersion':_0x3fe982['forkedFromVersion'],'sourceSessionId':_0x3fe982['sourceSessionId'],'contentHash':_0xb01848,'fileHashes':_0x3e5a31,'treeHash':_0x4eee41[_0x2acff4(0x18f)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x4eee41)):undefined,'ossPath':remoteManifestOssPath(_0x3fe982[_0x2acff4(0x1aa)]),'zipSha256':_0x4e4c63,'zipSize':_0x1377df,'files':_0x4eee41['length']>0x0?_0x4eee41[_0x2acff4(0x189)](_0x1daa67=>({'path':_0x1daa67[_0x2acff4(0x19d)],'hash':fileHash(_0x1daa67),'size':fileContent(_0x1daa67)[_0x2acff4(0x18f)]})):undefined,'pulledAt':_0x12d3ea??new Date()[_0x2acff4(0x1a1)]()};}export function requireSkillCode(_0x5ef3bb){const _0x5b34bb=a139_0x3f82,_0x263c59=_0x5ef3bb[_0x5b34bb(0x190)]?.[_0x5b34bb(0x18e)]();if(!_0x263c59)throw CliErrors[_0x5b34bb(0x19e)](_0x5b34bb(0x1af));return _0x263c59;}function a139_0x3f82(_0x34f6e4,_0x14a874){_0x34f6e4=_0x34f6e4-0x187;const _0x1d3964=a139_0x1d39();let _0x3f8204=_0x1d3964[_0x34f6e4];return _0x3f8204;}export function readMetadataIfPresent(_0x458f1d){const _0x83885a=a139_0x3f82;if(!existsSync(_0x458f1d))return undefined;try{const _0x1d6477=JSON[_0x83885a(0x1a0)](readFileSync(_0x458f1d,'utf8'));return _0x1d6477;}catch{throw CliErrors['validation'](_0x83885a(0x19a)+METADATA_FILE+':\x20'+_0x458f1d);}}function remoteManifestOssPath(_0x4fcd38){const _0x241940=a139_0x3f82;if(!_0x4fcd38||typeof _0x4fcd38!==_0x241940(0x1a9)||Array[_0x241940(0x1a4)](_0x4fcd38))return undefined;const _0x53e4bd=_0x4fcd38[_0x241940(0x195)];return typeof _0x53e4bd===_0x241940(0x1a3)&&_0x53e4bd[_0x241940(0x18e)]()?_0x53e4bd[_0x241940(0x18e)]():undefined;}
1
+ (function(_0x42ee0e,_0x558851){const _0x51630a=a139_0x5d96,_0x2b732a=_0x42ee0e();while(!![]){try{const _0x5e043f=parseInt(_0x51630a(0x14b))/0x1*(parseInt(_0x51630a(0x167))/0x2)+-parseInt(_0x51630a(0x166))/0x3+-parseInt(_0x51630a(0x15a))/0x4+parseInt(_0x51630a(0x140))/0x5*(parseInt(_0x51630a(0x161))/0x6)+parseInt(_0x51630a(0x14a))/0x7*(-parseInt(_0x51630a(0x15e))/0x8)+-parseInt(_0x51630a(0x146))/0x9*(parseInt(_0x51630a(0x15c))/0xa)+parseInt(_0x51630a(0x149))/0xb*(parseInt(_0x51630a(0x163))/0xc);if(_0x5e043f===_0x558851)break;else _0x2b732a['push'](_0x2b732a['shift']());}catch(_0x39d30a){_0x2b732a['push'](_0x2b732a['shift']());}}}(a139_0x4df9,0xb5aac));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(_0x35f3e2,_0x1f91bc,_0x3e76b9,_0x1838e2,_0x46af67,_0x482d3d,_0x1d7371){const _0xd3b0ac=a139_0x5d96,_0xae5264=_0x482d3d?normalizeLocalFiles(_0x482d3d):[],_0x429901=!_0x1d7371&&_0xae5264['length']>0x0?buildSkillPackage(_0xae5264):undefined,_0x3ba8ab=_0x1d7371?bufferSha256(_0x1d7371):_0x429901?.[_0xd3b0ac(0x141)][_0xd3b0ac(0x154)],_0xcf5ed1=_0x1d7371?.[_0xd3b0ac(0x165)]??_0x429901?.[_0xd3b0ac(0x141)][_0xd3b0ac(0x152)],_0x53a43b=_0xae5264[_0xd3b0ac(0x165)]>0x0?Object[_0xd3b0ac(0x151)](_0xae5264[_0xd3b0ac(0x142)](_0x270a02=>[_0x270a02[_0xd3b0ac(0x144)],fileHash(_0x270a02)])):undefined;return{'schemaVersion':_0xae5264[_0xd3b0ac(0x165)]>0x0?0x2:0x1,'id':_0x35f3e2['id'],'appCode':_0x3e76b9,'skillCode':requireSkillCode(_0x35f3e2),'skillName':_0x35f3e2[_0xd3b0ac(0x159)],'description':_0x35f3e2[_0xd3b0ac(0x168)],'example':_0x35f3e2[_0xd3b0ac(0x158)],'scope':_0x1f91bc,'readonly':_0x1f91bc!==_0xd3b0ac(0x14d)||_0x35f3e2[_0xd3b0ac(0x148)]===!![],'tenantCode':_0x35f3e2[_0xd3b0ac(0x153)],'userId':_0x35f3e2[_0xd3b0ac(0x145)],'version':_0x35f3e2[_0xd3b0ac(0x15d)],'status':_0x35f3e2[_0xd3b0ac(0x14c)],'tags':Array[_0xd3b0ac(0x143)](_0x35f3e2[_0xd3b0ac(0x15b)])?_0x35f3e2[_0xd3b0ac(0x15b)]:[],'hasUpstreamUpdate':_0x35f3e2['hasUpstreamUpdate'],'forkedFromSkillId':_0x35f3e2[_0xd3b0ac(0x14f)],'forkedFromVersion':_0x35f3e2['forkedFromVersion'],'sourceSessionId':_0x35f3e2[_0xd3b0ac(0x169)],'contentHash':_0x1838e2,'fileHashes':_0x53a43b,'treeHash':_0xae5264[_0xd3b0ac(0x165)]>0x0?fileTreeHash(localFilesToManifestFiles(_0xae5264)):undefined,'ossPath':remoteManifestOssPath(_0x35f3e2[_0xd3b0ac(0x16a)]),'zipSha256':_0x3ba8ab,'zipSize':_0xcf5ed1,'files':_0xae5264[_0xd3b0ac(0x165)]>0x0?_0xae5264['map'](_0x15c2d4=>({'path':_0x15c2d4['path'],'hash':fileHash(_0x15c2d4),'size':fileContent(_0x15c2d4)[_0xd3b0ac(0x165)]})):undefined,'pulledAt':_0x46af67??new Date()['toISOString']()};}export function requireSkillCode(_0x4e5a4a){const _0x59c44c=a139_0x5d96,_0x491614=_0x4e5a4a[_0x59c44c(0x15f)]?.[_0x59c44c(0x156)]();if(!_0x491614)throw CliErrors[_0x59c44c(0x157)](_0x59c44c(0x160));return _0x491614;}function a139_0x4df9(){const _0x425e87=['files','10jyJhNa','manifest','map','isArray','path','userId','9944298cDlcKS','ossPath','readonly','213037olllBZ','52633OfKLTP','2nndVih','status','personal','object','forkedFromSkillId','parse','fromEntries','zipSize','tenantCode','zipSha256','Invalid\x20','trim','validation','example','skillName','2495288QZXuwm','tags','10SlBdPk','version','952QpSVDH','skillCode','Runtime\x20Skill\x20is\x20missing\x20skillCode.','521544kwSXcG','utf8','1788PeuDPD','string','length','2552892tupfTH','1159046VZPzUY','description','sourceSessionId'];a139_0x4df9=function(){return _0x425e87;};return a139_0x4df9();}function a139_0x5d96(_0x52ab79,_0x720b29){_0x52ab79=_0x52ab79-0x140;const _0x4df9af=a139_0x4df9();let _0x5d96b9=_0x4df9af[_0x52ab79];return _0x5d96b9;}export function readMetadataIfPresent(_0x5e235d){const _0xa07f0e=a139_0x5d96;if(!existsSync(_0x5e235d))return undefined;try{const _0x5509f6=JSON[_0xa07f0e(0x150)](readFileSync(_0x5e235d,_0xa07f0e(0x162)));return _0x5509f6;}catch{throw CliErrors[_0xa07f0e(0x157)](_0xa07f0e(0x155)+METADATA_FILE+':\x20'+_0x5e235d);}}function remoteManifestOssPath(_0x50b952){const _0x375e74=a139_0x5d96;if(!_0x50b952||typeof _0x50b952!==_0x375e74(0x14e)||Array[_0x375e74(0x143)](_0x50b952))return undefined;const _0x35420c=_0x50b952[_0x375e74(0x147)];return typeof _0x35420c===_0x375e74(0x164)&&_0x35420c[_0x375e74(0x156)]()?_0x35420c[_0x375e74(0x156)]():undefined;}
@@ -1 +1 @@
1
- const a140_0x57fdbd=a140_0x1615;(function(_0x383a21,_0x49a420){const _0x658f83=a140_0x1615,_0x15da62=_0x383a21();while(!![]){try{const _0xcf64cb=-parseInt(_0x658f83(0x16e))/0x1*(parseInt(_0x658f83(0x16f))/0x2)+parseInt(_0x658f83(0x173))/0x3*(-parseInt(_0x658f83(0x16b))/0x4)+-parseInt(_0x658f83(0x178))/0x5+-parseInt(_0x658f83(0x16c))/0x6+parseInt(_0x658f83(0x174))/0x7+parseInt(_0x658f83(0x170))/0x8+parseInt(_0x658f83(0x16d))/0x9;if(_0xcf64cb===_0x49a420)break;else _0x15da62['push'](_0x15da62['shift']());}catch(_0x11a19e){_0x15da62['push'](_0x15da62['shift']());}}}(a140_0x3a2a,0xe5752));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(_0x2ca353={}){const _0x53b13e=a140_0x1615,_0x168821=_0x2ca353['homeDir']??homedir(),_0x41b685=resolve(_0x168821,PRODUCT_CONFIG[_0x53b13e(0x17c)],_0x53b13e(0x17a)),_0x1516bc=trimmedEnv(_0x53b13e(0x179)),_0x18a8ff=trimmedEnv(_0x53b13e(0x172)),_0x200bf6=resolve(_0x168821,_0x53b13e(0x182)),_0x312721=_0x2ca353[_0x53b13e(0x183)]??(existsSync(_0x200bf6)?resolve(_0x200bf6,_0x53b13e(0x177)):undefined);return{'homeDir':_0x168821,'cacheRoot':_0x41b685,'managedRoot':resolve(_0x168821,PRODUCT_CONFIG[_0x53b13e(0x17c)]),'agentsSkillsDir':_0x2ca353[_0x53b13e(0x17e)]??_0x1516bc??resolve(_0x168821,_0x53b13e(0x17f),_0x53b13e(0x177)),'claudeSkillsDir':_0x2ca353[_0x53b13e(0x184)]??_0x18a8ff??resolve(_0x168821,_0x53b13e(0x181),_0x53b13e(0x177)),'workbuddySkillsDir':_0x312721};}function a140_0x1615(_0x5d2d14,_0x32d340){_0x5d2d14=_0x5d2d14-0x16b;const _0x3a2afe=a140_0x3a2a();let _0x161544=_0x3a2afe[_0x5d2d14];return _0x161544;}export function runtimeAgentSkillRoots(_0x584947){const _0x3ee559=a140_0x1615;return[_0x584947[_0x3ee559(0x17e)],_0x584947[_0x3ee559(0x184)],_0x584947[_0x3ee559(0x183)]][_0x3ee559(0x186)](_0xfa287a=>Boolean(_0xfa287a));}export function getRuntimeSkillCacheRoot(_0x193098,_0x47fa16,_0x11cef2={}){const _0x1bc08d=a140_0x1615,_0x8f2e22=resolveSkillSyncPaths(_0x11cef2);return resolve(_0x8f2e22[_0x1bc08d(0x171)],_0x193098,fingerprintAccessKey(_0x47fa16),'skills');}export function getRuntimeSkillDir(_0x29fcc1,_0x51d22e,_0x45bb15,_0x4e1a82,_0x56b15a,_0x4c65b8={}){const _0x493732=a140_0x1615;return resolve(getRuntimeSkillCacheRoot(_0x29fcc1,_0x51d22e,_0x4c65b8),safePathSegment(_0x45bb15,_0x493732(0x185)),_0x4e1a82,safePathSegment(_0x56b15a,'skillCode'));}function a140_0x3a2a(){const _0x3a2f0f=['workbuddySkillsDir','claudeSkillsDir','appCode','filter','5887636vBYbxT','5730048ehpIHC','29646909xCWKhC','9WqUAiL','33614WISMDJ','7134728jhMoVJ','cacheRoot','CLAUDE_SKILL_ROOT','3TgpPgQ','2854894oDqMuQ','includes','trim','skills','5378730DcxZWu','SKILL_ROOT','cache','\x20for\x20local\x20path:\x20','homeDirName','path\x20segment','agentsSkillsDir','.agents','Unsafe\x20','.claude','.workbuddy'];a140_0x3a2a=function(){return _0x3a2f0f;};return a140_0x3a2a();}export function safePathSegment(_0x11a23e,_0x2599bb=a140_0x57fdbd(0x17d)){const _0x21f8c0=a140_0x57fdbd;if(!_0x11a23e||_0x11a23e[_0x21f8c0(0x175)]('/')||_0x11a23e[_0x21f8c0(0x175)]('\x5c')||_0x11a23e[_0x21f8c0(0x175)]('..'))throw CliErrors['validation'](_0x21f8c0(0x180)+_0x2599bb+_0x21f8c0(0x17b)+_0x11a23e);return _0x11a23e;}function trimmedEnv(_0x308e69){const _0x98db67=a140_0x57fdbd,_0x533237=productEnv(_0x308e69)?.[_0x98db67(0x176)]();return _0x533237?_0x533237:undefined;}
1
+ const a140_0x438480=a140_0x599f;(function(_0x8ec66,_0x3b9bf1){const _0x46da64=a140_0x599f,_0x16a877=_0x8ec66();while(!![]){try{const _0x1762a2=-parseInt(_0x46da64(0x1ad))/0x1+-parseInt(_0x46da64(0x1a5))/0x2*(-parseInt(_0x46da64(0x1b6))/0x3)+-parseInt(_0x46da64(0x1ab))/0x4+parseInt(_0x46da64(0x1a7))/0x5*(parseInt(_0x46da64(0x19e))/0x6)+parseInt(_0x46da64(0x1b2))/0x7*(parseInt(_0x46da64(0x1a6))/0x8)+-parseInt(_0x46da64(0x1a1))/0x9*(-parseInt(_0x46da64(0x1a3))/0xa)+-parseInt(_0x46da64(0x1ae))/0xb;if(_0x1762a2===_0x3b9bf1)break;else _0x16a877['push'](_0x16a877['shift']());}catch(_0x492353){_0x16a877['push'](_0x16a877['shift']());}}}(a140_0x1643,0x53ced));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(_0x59ccf8={}){const _0x461f3a=a140_0x599f,_0x30c0be=_0x59ccf8[_0x461f3a(0x19b)]??homedir(),_0x4fbad9=resolve(_0x30c0be,PRODUCT_CONFIG[_0x461f3a(0x1ac)],_0x461f3a(0x1b9)),_0x82a3e7=trimmedEnv(_0x461f3a(0x1a9)),_0x28a7b4=trimmedEnv(_0x461f3a(0x1b1)),_0x16ee2d=resolve(_0x30c0be,_0x461f3a(0x1b5)),_0x494e2c=_0x59ccf8['workbuddySkillsDir']??(existsSync(_0x16ee2d)?resolve(_0x16ee2d,_0x461f3a(0x19c)):undefined);return{'homeDir':_0x30c0be,'cacheRoot':_0x4fbad9,'managedRoot':resolve(_0x30c0be,PRODUCT_CONFIG[_0x461f3a(0x1ac)]),'agentsSkillsDir':_0x59ccf8[_0x461f3a(0x1b3)]??_0x82a3e7??resolve(_0x30c0be,'.agents',_0x461f3a(0x19c)),'claudeSkillsDir':_0x59ccf8[_0x461f3a(0x19f)]??_0x28a7b4??resolve(_0x30c0be,_0x461f3a(0x1a0),_0x461f3a(0x19c)),'workbuddySkillsDir':_0x494e2c};}export function runtimeAgentSkillRoots(_0x579802){const _0x1cc8ec=a140_0x599f;return[_0x579802['agentsSkillsDir'],_0x579802[_0x1cc8ec(0x19f)],_0x579802[_0x1cc8ec(0x1b4)]][_0x1cc8ec(0x1b7)](_0x348c41=>Boolean(_0x348c41));}export function getRuntimeSkillCacheRoot(_0x3feb00,_0x2f93e2,_0x4e3832={}){const _0x1e1208=a140_0x599f,_0x541ca8=resolveSkillSyncPaths(_0x4e3832);return resolve(_0x541ca8[_0x1e1208(0x1af)],_0x3feb00,fingerprintAccessKey(_0x2f93e2),_0x1e1208(0x19c));}export function getRuntimeSkillDir(_0x3cf054,_0x515883,_0x2d630f,_0x556995,_0x550e78,_0x4dccb9={}){const _0xe572b3=a140_0x599f;return resolve(getRuntimeSkillCacheRoot(_0x3cf054,_0x515883,_0x4dccb9),safePathSegment(_0x2d630f,_0xe572b3(0x1aa)),_0x556995,safePathSegment(_0x550e78,_0xe572b3(0x19d)));}export function safePathSegment(_0x50398b,_0x1d003e=a140_0x438480(0x19a)){const _0x26a6e1=a140_0x438480;if(!_0x50398b||_0x50398b[_0x26a6e1(0x1a2)]('/')||_0x50398b[_0x26a6e1(0x1a2)]('\x5c')||_0x50398b[_0x26a6e1(0x1a2)]('..'))throw CliErrors[_0x26a6e1(0x1a8)](_0x26a6e1(0x1b0)+_0x1d003e+_0x26a6e1(0x1a4)+_0x50398b);return _0x50398b;}function a140_0x599f(_0x5df4b8,_0x35095e){_0x5df4b8=_0x5df4b8-0x19a;const _0x164339=a140_0x1643();let _0x599fc3=_0x164339[_0x5df4b8];return _0x599fc3;}function a140_0x1643(){const _0x27c43d=['homeDirName','610931iIsKBs','6810727ANHsug','cacheRoot','Unsafe\x20','CLAUDE_SKILL_ROOT','3577UxPbAh','agentsSkillsDir','workbuddySkillsDir','.workbuddy','66TxboJu','filter','trim','cache','path\x20segment','homeDir','skills','skillCode','6HJIoej','claudeSkillsDir','.claude','12501HmzBAJ','includes','4030vuFGkg','\x20for\x20local\x20path:\x20','28218ikckVi','9584JaXdeg','1578545lDBbhP','validation','SKILL_ROOT','appCode','898748SAkxAE'];a140_0x1643=function(){return _0x27c43d;};return a140_0x1643();}function trimmedEnv(_0x35a319){const _0x14f52=a140_0x438480,_0x3aeb05=productEnv(_0x35a319)?.[_0x14f52(0x1b8)]();return _0x3aeb05?_0x3aeb05:undefined;}
@@ -1 +1 @@
1
- (function(_0x4c01ec,_0x5dc9fe){const _0x4a5d3a=a141_0x3dd8,_0x5488b6=_0x4c01ec();while(!![]){try{const _0xa58bcc=-parseInt(_0x4a5d3a(0x80))/0x1+parseInt(_0x4a5d3a(0x84))/0x2*(parseInt(_0x4a5d3a(0xb0))/0x3)+parseInt(_0x4a5d3a(0x8b))/0x4*(parseInt(_0x4a5d3a(0xa1))/0x5)+parseInt(_0x4a5d3a(0x7a))/0x6+-parseInt(_0x4a5d3a(0x7f))/0x7*(-parseInt(_0x4a5d3a(0xae))/0x8)+parseInt(_0x4a5d3a(0x98))/0x9*(-parseInt(_0x4a5d3a(0x73))/0xa)+-parseInt(_0x4a5d3a(0xb2))/0xb;if(_0xa58bcc===_0x5dc9fe)break;else _0x5488b6['push'](_0x5488b6['shift']());}catch(_0x526c60){_0x5488b6['push'](_0x5488b6['shift']());}}}(a141_0x1dc5,0x7a185));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x52f8c1}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(_0x2a6ba2,_0x24ac61,_0x275e3={}){const _0x4a953d=a141_0x3dd8,_0x3244df=resolvePushDirectoryRoot(_0x2a6ba2),_0x21a8f4=readPushMetadataIfPresent(resolve(_0x3244df,METADATA_FILE),{'ignoreInvalidMetadata':_0x275e3[_0x4a953d(0xaf)]});if(_0x21a8f4?.[_0x4a953d(0x71)]&&_0x21a8f4['appCode']!==_0x24ac61&&!_0x275e3[_0x4a953d(0x87)]&&!_0x275e3[_0x4a953d(0x7c)])throw CliErrors[_0x4a953d(0xa8)](_0x4a953d(0xa0)+_0x21a8f4[_0x4a953d(0x71)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x24ac61+'\x22.');const _0x4d3c2d=resolvePushSkillCode(_0x3244df,_0x24ac61,_0x21a8f4,_0x275e3);if(!_0x4d3c2d)throw CliErrors[_0x4a953d(0xa8)](_0x4a953d(0x8a)+SKILL_FILE+',\x20'+METADATA_FILE+_0x4a953d(0x76));return{'dir':_0x3244df,'skillCode':_0x4d3c2d,'metadata':_0x21a8f4};}export function readPushDirectory(_0xa78a5c,_0x4de453,_0x1cb0a7={}){const _0x288bc0=a141_0x3dd8,_0x38c136=resolvePushDirectoryIdentity(_0xa78a5c,_0x4de453,_0x1cb0a7),_0x2db833=_0x38c136[_0x288bc0(0x91)],_0x5dee9d=resolve(_0x2db833,SKILL_FILE);if(!existsSync(_0x5dee9d)||!lstatSync(_0x5dee9d)[_0x288bc0(0x8d)]())throw CliErrors[_0x288bc0(0xa8)](_0x288bc0(0x82)+SKILL_FILE+':\x20'+_0x5dee9d);const _0x18b2f2=_0x38c136['metadata'],_0x4d5ac1=_0x1cb0a7['targetScope']??'personal';if(!_0x1cb0a7[_0x288bc0(0xa5)]&&_0x18b2f2?.[_0x288bc0(0x72)]===_0x288bc0(0x9c))throw CliErrors[_0x288bc0(0xa8)](_0x288bc0(0x7d)+METADATA_FILE+_0x288bc0(0xa7)+_0x18b2f2[_0x288bc0(0x72)]+'\x22.');if(!_0x1cb0a7[_0x288bc0(0xa5)]&&_0x4d5ac1===_0x288bc0(0x95)&&_0x18b2f2?.['scope']&&_0x18b2f2[_0x288bc0(0x72)]!=='personal')throw CliErrors[_0x288bc0(0xa8)](_0x288bc0(0x86)+METADATA_FILE+_0x288bc0(0xa7)+_0x18b2f2['scope']+'\x22.',_0x288bc0(0xa3)+_0x2db833+_0x288bc0(0xb3));const _0x234ca0=scanSkillDirectory(_0x2db833,{'excludedFilePaths':_0x1cb0a7[_0x288bc0(0xa6)]}),_0x249112=buildSkillPackage(_0x234ca0),_0x3b26e5=readFileSync(_0x5dee9d,_0x288bc0(0x8f)),_0x7bc740=_0x38c136[_0x288bc0(0xa2)],_0x47a450=_0x1cb0a7[_0x288bc0(0x8e)]?undefined:_0x18b2f2,_0x236902=readSkillDisplayName(_0x3b26e5);return{'skillCode':_0x7bc740,'metadata':_0x18b2f2,'frontmatterDisplayName':_0x236902,'input':{'skillCode':_0x7bc740,'skillName':_0x236902??_0x47a450?.[_0x288bc0(0x94)],'description':_0x47a450?.[_0x288bc0(0x92)],'content':_0x3b26e5,'files':_0x249112[_0x288bc0(0x79)],'packageBase64':_0x249112[_0x288bc0(0x78)],'tags':_0x47a450?.['tags'],'version':_0x47a450?.['version'],'sourceSessionId':_0x47a450?.[_0x288bc0(0x93)]}};}function a141_0x1dc5(){const _0x3b1e19=['2342418TTNqHr','object','ignoreMetadataAppCodeMismatch','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','777uQfssX','54854GoLDai','name','Missing\x20','trim','2KMDhRs','boolean','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','allowAppCodeRetarget','toLowerCase','tags','Unable\x20to\x20resolve\x20skillCode\x20from\x20','248XoeFZl','match','isFile','ignoreMetadataForPayload','utf8','find','dir','description','sourceSessionId','skillName','personal','Skill\x20directory\x20not\x20found:\x20','(unknown)','63uilTGQ','Remote\x20Skill\x20','isDirectory','files','builtin','ignoreMetadataSkillCode','replace','pushedAt','Skill\x20metadata\x20appCode\x20\x22','72495SIEfRG','skillCode','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','filter','ignoreMetadataScope','excludedFilePaths','\x20has\x20scope=\x22','validation','example','path','isArray','content','Invalid\x20','41864QMehOw','ignoreInvalidMetadata','2684547jBuslx','slice','21239779AphPxq','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','unknown','displayName','appCode','scope','398870AncLKk','some','startsWith',',\x20or\x20directory\x20name.','refreshedAt','packageBase64','manifest'];a141_0x1dc5=function(){return _0x3b1e19;};return a141_0x1dc5();}export function refreshPushDirectoryMetadataFromRemote(_0x592eda,_0xa17429,_0x1ad25f,_0x215a75={}){const _0xaa7d8=a141_0x3dd8,_0x3f2b94=resolvePushDirectoryRoot(_0x592eda),_0xb7b55=readPushMetadataIfPresent(resolve(_0x3f2b94,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x26fb68=requireRemoteScope(_0xa17429),_0x1c00b6=readLocalSkillContent(_0x3f2b94),_0x46a35a={..._0xa17429,'appCode':_0xa17429[_0xaa7d8(0x71)]??_0x1ad25f,'skillName':_0xa17429[_0xaa7d8(0x94)]??_0xb7b55?.[_0xaa7d8(0x94)],'description':_0xa17429[_0xaa7d8(0x92)]??_0xb7b55?.['description'],'example':_0xa17429[_0xaa7d8(0xa9)]??_0xb7b55?.[_0xaa7d8(0xa9)],'tags':Array[_0xaa7d8(0xab)](_0xa17429[_0xaa7d8(0x89)])?_0xa17429[_0xaa7d8(0x89)]:_0xb7b55?.[_0xaa7d8(0x89)],'sourceSessionId':_0xa17429[_0xaa7d8(0x93)]??_0xb7b55?.[_0xaa7d8(0x93)],'content':_0xa17429[_0xaa7d8(0xac)]??_0x1c00b6},_0xd3d7e3=buildMetadata(_0x46a35a,_0x26fb68,_0x1ad25f,contentHash(_0x1c00b6),_0x215a75[_0xaa7d8(0x77)]);writeJsonAtomic(resolve(_0x3f2b94,METADATA_FILE),_0xd3d7e3);}function a141_0x3dd8(_0xc998d,_0x4e0577){_0xc998d=_0xc998d-0x6f;const _0x1dc565=a141_0x1dc5();let _0x3dd82e=_0x1dc565[_0xc998d];return _0x3dd82e;}export function recordPushedRuntimeSkill(_0x25b829,_0x373a5d,_0xe82f65,_0x5049ba={}){const _0xdcb319=a141_0x3dd8,_0x355fd2=resolvePushDirectoryRoot(_0x25b829),_0x30cd00=scanSkillDirectory(_0x355fd2),_0x4d6894=_0x30cd00[_0xdcb319(0x90)](_0x213d1d=>_0x213d1d[_0xdcb319(0xaa)]===SKILL_FILE),_0x5b4fc6=_0x4d6894?fileText(_0x4d6894):'',_0x4d097d=tryNormalizePackageManifest(_0x373a5d[_0xdcb319(0x9b)]),_0x2be020={..._0x373a5d,'content':_0x373a5d['content']??_0x5b4fc6,'files':_0x4d097d},_0x273ad3=_0x4d097d?normalizeLocalFiles(_0x30cd00)[_0xdcb319(0xa4)](_0x524743=>_0x4d097d['files'][_0xdcb319(0x74)](_0x14fabe=>_0x14fabe[_0xdcb319(0xaa)]===_0x524743['path'])):undefined,_0x188d96=buildMetadata(_0x2be020,_0x5049ba[_0xdcb319(0x72)]??_0xdcb319(0x95),_0xe82f65,contentHash(_0x2be020['content']??''),_0x5049ba[_0xdcb319(0x9f)],_0x273ad3);writeJsonAtomic(resolve(_0x355fd2,METADATA_FILE),_0x188d96);}export function deriveSkillCodeFromDirectory(_0x4e309f,_0x202c9f){const _0x41afb2=a141_0x3dd8,_0x5b2e25=basename(resolve(_0x4e309f)),_0x3a356c=_0x202c9f+'--';return _0x5b2e25[_0x41afb2(0x75)](_0x3a356c)?_0x5b2e25[_0x41afb2(0xb1)](_0x3a356c['length']):_0x5b2e25;}function resolvePushSkillCode(_0x12067f,_0x1bf49c,_0x387ba5,_0xbf5b7){const _0xe05878=a141_0x3dd8,_0x5d3c7e=deriveSkillCodeFromSkillFile(_0x12067f)||deriveSkillCodeFromDirectory(_0x12067f,_0x1bf49c);if(_0xbf5b7[_0xe05878(0x9d)])return _0x5d3c7e;return _0x387ba5?.[_0xe05878(0xa2)]?.[_0xe05878(0x83)]()||_0x5d3c7e;}function deriveSkillCodeFromSkillFile(_0x6af4fb){const _0x20c292=a141_0x3dd8,_0x18a2ce=resolve(_0x6af4fb,SKILL_FILE);if(!existsSync(_0x18a2ce)||!lstatSync(_0x18a2ce)[_0x20c292(0x8d)]())return undefined;const _0x18d80c=readFileSync(_0x18a2ce,_0x20c292(0x8f)),_0x59a83f=_0x18d80c[_0x20c292(0x8c)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x59a83f)return undefined;const _0x2b0e3e=parseFrontmatterObject(_0x59a83f[0x1]??''),_0x298ab6=scalarToString(_0x2b0e3e?.[_0x20c292(0x81)]);return _0x298ab6?slugifySkillName(_0x298ab6):undefined;}function readSkillDisplayName(_0x58bf66){const _0x141984=a141_0x3dd8,_0x16f62c=_0x58bf66['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x16f62c)return undefined;const _0x45205d=parseFrontmatterObject(_0x16f62c[0x1]??'');return scalarToString(_0x45205d?.[_0x141984(0x70)]);}function slugifySkillName(_0x2b85f7){const _0x3cd30d=a141_0x3dd8,_0x295ff3=_0x2b85f7[_0x3cd30d(0x83)]()[_0x3cd30d(0x88)]()[_0x3cd30d(0x9e)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3cd30d(0x9e)](/^-+/,'')[_0x3cd30d(0x9e)](/-+$/,'')[_0x3cd30d(0x9e)](/-{2,}/g,'-');if(!_0x295ff3)throw CliErrors[_0x3cd30d(0xa8)](_0x3cd30d(0xad)+SKILL_FILE+_0x3cd30d(0x7e));return _0x295ff3;}function parseFrontmatterObject(_0x1ed0dc){const _0x30b9b7=a141_0x3dd8;try{const _0x26aaf4=a141_0x52f8c1(_0x1ed0dc);return _0x26aaf4&&typeof _0x26aaf4===_0x30b9b7(0x7b)&&!Array[_0x30b9b7(0xab)](_0x26aaf4)?_0x26aaf4:undefined;}catch{return undefined;}}function scalarToString(_0x445bd8){const _0x498d6d=a141_0x3dd8;if(typeof _0x445bd8==='string')return _0x445bd8[_0x498d6d(0x83)]();if(typeof _0x445bd8==='number'||typeof _0x445bd8===_0x498d6d(0x85))return String(_0x445bd8);return undefined;}function resolvePushDirectoryRoot(_0x3429d3){const _0x37034d=a141_0x3dd8,_0x1a5106=resolve(_0x3429d3);if(!existsSync(_0x1a5106))throw CliErrors[_0x37034d(0xa8)](_0x37034d(0x96)+_0x3429d3);const _0x38d19e=lstatSync(_0x1a5106);if(_0x38d19e[_0x37034d(0x9a)]())return _0x1a5106;if(_0x38d19e['isSymbolicLink']()){const _0x5b176c=realpathSync(_0x1a5106);if(lstatSync(_0x5b176c)[_0x37034d(0x9a)]())return _0x5b176c;}throw CliErrors[_0x37034d(0xa8)](_0x37034d(0x96)+_0x3429d3);}function requireRemoteScope(_0x5dee15){const _0x395568=a141_0x3dd8;if(_0x5dee15[_0x395568(0x72)]===_0x395568(0x95)||_0x5dee15['scope']==='company'||_0x5dee15[_0x395568(0x72)]===_0x395568(0x9c))return _0x5dee15[_0x395568(0x72)];throw CliErrors[_0x395568(0xa8)](_0x395568(0x99)+(_0x5dee15[_0x395568(0xa2)]||_0x395568(0x97))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x5dee15['scope']??_0x395568(0x6f))+'\x22.');}function readLocalSkillContent(_0x47d523){const _0x140b3b=a141_0x3dd8,_0x29f993=resolve(_0x47d523,SKILL_FILE);return existsSync(_0x29f993)&&lstatSync(_0x29f993)[_0x140b3b(0x8d)]()?readFileSync(_0x29f993,_0x140b3b(0x8f)):'';}function readPushMetadataIfPresent(_0x23ad49,_0x316f05={}){try{return readMetadataIfPresent(_0x23ad49);}catch(_0x2d8c1d){if(_0x316f05['ignoreInvalidMetadata'])return undefined;throw _0x2d8c1d;}}
1
+ (function(_0x4a716c,_0x9ab9cf){const _0x39e47a=a141_0x37e7,_0x134051=_0x4a716c();while(!![]){try{const _0x219ff1=-parseInt(_0x39e47a(0x17f))/0x1*(parseInt(_0x39e47a(0x155))/0x2)+-parseInt(_0x39e47a(0x142))/0x3+parseInt(_0x39e47a(0x169))/0x4*(parseInt(_0x39e47a(0x151))/0x5)+parseInt(_0x39e47a(0x167))/0x6*(-parseInt(_0x39e47a(0x172))/0x7)+parseInt(_0x39e47a(0x183))/0x8*(parseInt(_0x39e47a(0x178))/0x9)+-parseInt(_0x39e47a(0x154))/0xa*(-parseInt(_0x39e47a(0x15b))/0xb)+parseInt(_0x39e47a(0x14b))/0xc;if(_0x219ff1===_0x9ab9cf)break;else _0x134051['push'](_0x134051['shift']());}catch(_0x22f5ec){_0x134051['push'](_0x134051['shift']());}}}(a141_0xcd98,0x4f328));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x35be4c}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(_0x28ff47,_0x50f1fa,_0x38ee66={}){const _0x1a2038=a141_0x37e7,_0x225db1=resolvePushDirectoryRoot(_0x28ff47),_0x29c18e=readPushMetadataIfPresent(resolve(_0x225db1,METADATA_FILE),{'ignoreInvalidMetadata':_0x38ee66[_0x1a2038(0x145)]});if(_0x29c18e?.['appCode']&&_0x29c18e[_0x1a2038(0x14f)]!==_0x50f1fa&&!_0x38ee66[_0x1a2038(0x141)]&&!_0x38ee66[_0x1a2038(0x143)])throw CliErrors[_0x1a2038(0x16c)](_0x1a2038(0x15f)+_0x29c18e['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x50f1fa+'\x22.');const _0x55ca11=resolvePushSkillCode(_0x225db1,_0x50f1fa,_0x29c18e,_0x38ee66);if(!_0x55ca11)throw CliErrors[_0x1a2038(0x16c)](_0x1a2038(0x165)+SKILL_FILE+',\x20'+METADATA_FILE+_0x1a2038(0x171));return{'dir':_0x225db1,'skillCode':_0x55ca11,'metadata':_0x29c18e};}export function readPushDirectory(_0x1994f9,_0x7fc433,_0x11e770={}){const _0x4c2b05=a141_0x37e7,_0x5178d5=resolvePushDirectoryIdentity(_0x1994f9,_0x7fc433,_0x11e770),_0x1e17f7=_0x5178d5[_0x4c2b05(0x166)],_0x3a89b7=resolve(_0x1e17f7,SKILL_FILE);if(!existsSync(_0x3a89b7)||!lstatSync(_0x3a89b7)[_0x4c2b05(0x14d)]())throw CliErrors[_0x4c2b05(0x16c)](_0x4c2b05(0x149)+SKILL_FILE+':\x20'+_0x3a89b7);const _0x45307b=_0x5178d5[_0x4c2b05(0x17d)],_0x11bfe8=_0x11e770[_0x4c2b05(0x13d)]??_0x4c2b05(0x17e);if(!_0x11e770['ignoreMetadataScope']&&_0x45307b?.[_0x4c2b05(0x181)]===_0x4c2b05(0x174))throw CliErrors[_0x4c2b05(0x16c)](_0x4c2b05(0x159)+METADATA_FILE+_0x4c2b05(0x17c)+_0x45307b[_0x4c2b05(0x181)]+'\x22.');if(!_0x11e770[_0x4c2b05(0x152)]&&_0x11bfe8==='personal'&&_0x45307b?.['scope']&&_0x45307b[_0x4c2b05(0x181)]!=='personal')throw CliErrors[_0x4c2b05(0x16c)](_0x4c2b05(0x176)+METADATA_FILE+_0x4c2b05(0x17c)+_0x45307b[_0x4c2b05(0x181)]+'\x22.',_0x4c2b05(0x160)+_0x1e17f7+_0x4c2b05(0x156));const _0x16faa6=scanSkillDirectory(_0x1e17f7,{'excludedFilePaths':_0x11e770[_0x4c2b05(0x16a)]}),_0x2879d0=buildSkillPackage(_0x16faa6),_0x540b2d=readFileSync(_0x3a89b7,_0x4c2b05(0x13e)),_0x3fe839=_0x5178d5[_0x4c2b05(0x182)],_0x324bf1=_0x11e770[_0x4c2b05(0x153)]?undefined:_0x45307b,_0x23ac48=readSkillDisplayName(_0x540b2d);return{'skillCode':_0x3fe839,'metadata':_0x45307b,'frontmatterDisplayName':_0x23ac48,'input':{'skillCode':_0x3fe839,'skillName':_0x23ac48??_0x324bf1?.[_0x4c2b05(0x16d)],'description':_0x324bf1?.[_0x4c2b05(0x15e)],'content':_0x540b2d,'files':_0x2879d0[_0x4c2b05(0x16e)],'packageBase64':_0x2879d0['packageBase64'],'tags':_0x324bf1?.[_0x4c2b05(0x179)],'version':_0x324bf1?.[_0x4c2b05(0x175)],'sourceSessionId':_0x324bf1?.[_0x4c2b05(0x147)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1d0542,_0x273001,_0x43408b,_0x31c720={}){const _0x10f753=a141_0x37e7,_0x4fc1c8=resolvePushDirectoryRoot(_0x1d0542),_0x5355a9=readPushMetadataIfPresent(resolve(_0x4fc1c8,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5ab6a6=requireRemoteScope(_0x273001),_0x49a6c3=readLocalSkillContent(_0x4fc1c8),_0x5efafd={..._0x273001,'appCode':_0x273001['appCode']??_0x43408b,'skillName':_0x273001['skillName']??_0x5355a9?.[_0x10f753(0x16d)],'description':_0x273001[_0x10f753(0x15e)]??_0x5355a9?.['description'],'example':_0x273001[_0x10f753(0x148)]??_0x5355a9?.[_0x10f753(0x148)],'tags':Array[_0x10f753(0x14e)](_0x273001[_0x10f753(0x179)])?_0x273001[_0x10f753(0x179)]:_0x5355a9?.[_0x10f753(0x179)],'sourceSessionId':_0x273001[_0x10f753(0x147)]??_0x5355a9?.[_0x10f753(0x147)],'content':_0x273001[_0x10f753(0x177)]??_0x49a6c3},_0x32cfe5=buildMetadata(_0x5efafd,_0x5ab6a6,_0x43408b,contentHash(_0x49a6c3),_0x31c720[_0x10f753(0x15d)]);writeJsonAtomic(resolve(_0x4fc1c8,METADATA_FILE),_0x32cfe5);}export function recordPushedRuntimeSkill(_0x273270,_0x1205b2,_0x3e7546,_0xb7a059={}){const _0x9ef5a4=a141_0x37e7,_0x4983e3=resolvePushDirectoryRoot(_0x273270),_0x3e5773=scanSkillDirectory(_0x4983e3),_0x5726b3=_0x3e5773[_0x9ef5a4(0x14c)](_0x172b70=>_0x172b70[_0x9ef5a4(0x157)]===SKILL_FILE),_0x492bc7=_0x5726b3?fileText(_0x5726b3):'',_0x64ac5a=tryNormalizePackageManifest(_0x1205b2[_0x9ef5a4(0x17b)]),_0x3b7676={..._0x1205b2,'content':_0x1205b2[_0x9ef5a4(0x177)]??_0x492bc7,'files':_0x64ac5a},_0x3cfb2e=_0x64ac5a?normalizeLocalFiles(_0x3e5773)[_0x9ef5a4(0x158)](_0x5eda69=>_0x64ac5a[_0x9ef5a4(0x17b)][_0x9ef5a4(0x163)](_0x2b4ee0=>_0x2b4ee0[_0x9ef5a4(0x157)]===_0x5eda69[_0x9ef5a4(0x157)])):undefined,_0x37af5a=buildMetadata(_0x3b7676,_0xb7a059[_0x9ef5a4(0x181)]??_0x9ef5a4(0x17e),_0x3e7546,contentHash(_0x3b7676[_0x9ef5a4(0x177)]??''),_0xb7a059[_0x9ef5a4(0x14a)],_0x3cfb2e);writeJsonAtomic(resolve(_0x4983e3,METADATA_FILE),_0x37af5a);}export function deriveSkillCodeFromDirectory(_0xa6e6bd,_0x8391a1){const _0x260f14=a141_0x37e7,_0x9af089=basename(resolve(_0xa6e6bd)),_0x27bd4f=_0x8391a1+'--';return _0x9af089[_0x260f14(0x140)](_0x27bd4f)?_0x9af089['slice'](_0x27bd4f[_0x260f14(0x13f)]):_0x9af089;}function a141_0x37e7(_0x4b5525,_0x580a61){_0x4b5525=_0x4b5525-0x13c;const _0xcd9834=a141_0xcd98();let _0x37e708=_0xcd9834[_0x4b5525];return _0x37e708;}function resolvePushSkillCode(_0x35c82f,_0x436593,_0x3b4258,_0x2d01ce){const _0x54ede2=a141_0x37e7,_0x1ee439=deriveSkillCodeFromSkillFile(_0x35c82f)||deriveSkillCodeFromDirectory(_0x35c82f,_0x436593);if(_0x2d01ce[_0x54ede2(0x16f)])return _0x1ee439;return _0x3b4258?.[_0x54ede2(0x182)]?.[_0x54ede2(0x173)]()||_0x1ee439;}function deriveSkillCodeFromSkillFile(_0xac5e58){const _0x2318d6=a141_0x37e7,_0x3c7441=resolve(_0xac5e58,SKILL_FILE);if(!existsSync(_0x3c7441)||!lstatSync(_0x3c7441)[_0x2318d6(0x14d)]())return undefined;const _0x39e157=readFileSync(_0x3c7441,_0x2318d6(0x13e)),_0x474b9f=_0x39e157['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x474b9f)return undefined;const _0x1d1c3f=parseFrontmatterObject(_0x474b9f[0x1]??''),_0x42e8ca=scalarToString(_0x1d1c3f?.[_0x2318d6(0x164)]);return _0x42e8ca?slugifySkillName(_0x42e8ca):undefined;}function readSkillDisplayName(_0x106d67){const _0x427549=a141_0x37e7,_0x292566=_0x106d67[_0x427549(0x15a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x292566)return undefined;const _0x3f153b=parseFrontmatterObject(_0x292566[0x1]??'');return scalarToString(_0x3f153b?.[_0x427549(0x13c)]);}function slugifySkillName(_0x26919e){const _0x519c80=a141_0x37e7,_0x55bb42=_0x26919e['trim']()[_0x519c80(0x168)]()[_0x519c80(0x144)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')['replace'](/-+$/,'')[_0x519c80(0x144)](/-{2,}/g,'-');if(!_0x55bb42)throw CliErrors[_0x519c80(0x16c)](_0x519c80(0x161)+SKILL_FILE+_0x519c80(0x180));return _0x55bb42;}function parseFrontmatterObject(_0x42bcc5){const _0x306a1d=a141_0x37e7;try{const _0x456f41=a141_0x35be4c(_0x42bcc5);return _0x456f41&&typeof _0x456f41==='object'&&!Array[_0x306a1d(0x14e)](_0x456f41)?_0x456f41:undefined;}catch{return undefined;}}function scalarToString(_0x429fa9){const _0x46e0d6=a141_0x37e7;if(typeof _0x429fa9===_0x46e0d6(0x15c))return _0x429fa9[_0x46e0d6(0x173)]();if(typeof _0x429fa9===_0x46e0d6(0x16b)||typeof _0x429fa9==='boolean')return String(_0x429fa9);return undefined;}function resolvePushDirectoryRoot(_0x12e3e2){const _0x2e8c85=a141_0x37e7,_0xcd6727=resolve(_0x12e3e2);if(!existsSync(_0xcd6727))throw CliErrors[_0x2e8c85(0x16c)](_0x2e8c85(0x170)+_0x12e3e2);const _0x5e7f8b=lstatSync(_0xcd6727);if(_0x5e7f8b[_0x2e8c85(0x17a)]())return _0xcd6727;if(_0x5e7f8b[_0x2e8c85(0x146)]()){const _0x360696=realpathSync(_0xcd6727);if(lstatSync(_0x360696)[_0x2e8c85(0x17a)]())return _0x360696;}throw CliErrors['validation'](_0x2e8c85(0x170)+_0x12e3e2);}function a141_0xcd98(){const _0x4b96ef=['ignoreMetadataAppCodeMismatch','replace','ignoreInvalidMetadata','isSymbolicLink','sourceSessionId','example','Missing\x20','pushedAt','4117308XutFSJ','find','isFile','isArray','appCode','(unknown)','37815PldNmt','ignoreMetadataScope','ignoreMetadataForPayload','1510100ndJdei','454mGjUmi','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','path','filter','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','match','22rEEADW','string','refreshedAt','description','Skill\x20metadata\x20appCode\x20\x22','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Invalid\x20','company','some','name','Unable\x20to\x20resolve\x20skillCode\x20from\x20','dir','19176byrwyf','toLowerCase','12CUqegm','excludedFilePaths','number','validation','skillName','manifest','ignoreMetadataSkillCode','Skill\x20directory\x20not\x20found:\x20',',\x20or\x20directory\x20name.','819Pwgwiw','trim','builtin','version','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','content','1746gGHKEa','tags','isDirectory','files','\x20has\x20scope=\x22','metadata','personal','569yaOKyH','\x20name\x20for\x20SkillHub\x20slug\x20generation.','scope','skillCode','13816KKviAZ','displayName','targetScope','utf8','length','startsWith','allowAppCodeRetarget','526107MXMYCs'];a141_0xcd98=function(){return _0x4b96ef;};return a141_0xcd98();}function requireRemoteScope(_0x78c8bd){const _0x4b0cae=a141_0x37e7;if(_0x78c8bd[_0x4b0cae(0x181)]===_0x4b0cae(0x17e)||_0x78c8bd[_0x4b0cae(0x181)]===_0x4b0cae(0x162)||_0x78c8bd[_0x4b0cae(0x181)]===_0x4b0cae(0x174))return _0x78c8bd[_0x4b0cae(0x181)];throw CliErrors[_0x4b0cae(0x16c)]('Remote\x20Skill\x20'+(_0x78c8bd[_0x4b0cae(0x182)]||_0x4b0cae(0x150))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x78c8bd[_0x4b0cae(0x181)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x17c4cd){const _0x13f061=resolve(_0x17c4cd,SKILL_FILE);return existsSync(_0x13f061)&&lstatSync(_0x13f061)['isFile']()?readFileSync(_0x13f061,'utf8'):'';}function readPushMetadataIfPresent(_0x504382,_0x4894a6={}){const _0x20011b=a141_0x37e7;try{return readMetadataIfPresent(_0x504382);}catch(_0x2715b3){if(_0x4894a6[_0x20011b(0x145)])return undefined;throw _0x2715b3;}}
@@ -1 +1 @@
1
- (function(_0x5d3584,_0x4ddd51){const _0x37a1bb=a142_0x3163,_0x333b23=_0x5d3584();while(!![]){try{const _0x35ae90=parseInt(_0x37a1bb(0xb0))/0x1+parseInt(_0x37a1bb(0xad))/0x2+parseInt(_0x37a1bb(0xb6))/0x3*(parseInt(_0x37a1bb(0xac))/0x4)+parseInt(_0x37a1bb(0xb1))/0x5+parseInt(_0x37a1bb(0xb2))/0x6+parseInt(_0x37a1bb(0xae))/0x7+parseInt(_0x37a1bb(0xb5))/0x8*(-parseInt(_0x37a1bb(0xb7))/0x9);if(_0x35ae90===_0x4ddd51)break;else _0x333b23['push'](_0x333b23['shift']());}catch(_0x3f1903){_0x333b23['push'](_0x333b23['shift']());}}}(a142_0x16e1,0x4afe9));function a142_0x3163(_0x4a7d27,_0x813736){_0x4a7d27=_0x4a7d27-0xac;const _0x16e176=a142_0x16e1();let _0x31630c=_0x16e176[_0x4a7d27];return _0x31630c;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x4108c8){const _0x5b0991=a142_0x3163,_0x3a050a=_0x4108c8&&_0x4108c8[_0x5b0991(0xb3)]>0x0?_0x4108c8:['personal',_0x5b0991(0xb4),_0x5b0991(0xaf)],_0x4b8ad2=[];for(const _0x3039fc of _0x3a050a){if(!isRuntimeSkillScope(_0x3039fc))throw CliErrors['validation']('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x3039fc);!_0x4b8ad2['includes'](_0x3039fc)&&_0x4b8ad2['push'](_0x3039fc);}return _0x4b8ad2;}export function isRuntimeSkillScope(_0x48976b){const _0x41da08=a142_0x3163;return _0x48976b==='personal'||_0x48976b===_0x41da08(0xb4)||_0x48976b===_0x41da08(0xaf);}function a142_0x16e1(){const _0x262eb2=['4JDHSpx','1108856wqJkrf','2378873MwykXh','builtin','526061NAdZGz','2390360kanLVp','511734HwPlSw','length','company','24424jagDfY','1619898JbyZJE','6534FOuXHJ'];a142_0x16e1=function(){return _0x262eb2;};return a142_0x16e1();}
1
+ (function(_0x9cd136,_0x192a87){const _0x5d490=a142_0x2102,_0x3af058=_0x9cd136();while(!![]){try{const _0x200035=parseInt(_0x5d490(0x8f))/0x1*(-parseInt(_0x5d490(0x8a))/0x2)+-parseInt(_0x5d490(0x8c))/0x3*(parseInt(_0x5d490(0x8b))/0x4)+-parseInt(_0x5d490(0x86))/0x5*(parseInt(_0x5d490(0x88))/0x6)+-parseInt(_0x5d490(0x8e))/0x7+-parseInt(_0x5d490(0x92))/0x8*(-parseInt(_0x5d490(0x84))/0x9)+parseInt(_0x5d490(0x89))/0xa+parseInt(_0x5d490(0x90))/0xb;if(_0x200035===_0x192a87)break;else _0x3af058['push'](_0x3af058['shift']());}catch(_0x49ff51){_0x3af058['push'](_0x3af058['shift']());}}}(a142_0xe448,0x840f3));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x1d1d16){const _0x2dd543=a142_0x2102,_0x21a0b9=_0x1d1d16&&_0x1d1d16[_0x2dd543(0x85)]>0x0?_0x1d1d16:['personal',_0x2dd543(0x91),_0x2dd543(0x83)],_0xe9d8c8=[];for(const _0x584903 of _0x21a0b9){if(!isRuntimeSkillScope(_0x584903))throw CliErrors[_0x2dd543(0x8d)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x584903);!_0xe9d8c8[_0x2dd543(0x93)](_0x584903)&&_0xe9d8c8['push'](_0x584903);}return _0xe9d8c8;}function a142_0x2102(_0x3738e6,_0x41a7f1){_0x3738e6=_0x3738e6-0x83;const _0xe44864=a142_0xe448();let _0x210207=_0xe44864[_0x3738e6];return _0x210207;}function a142_0xe448(){const _0x4a4869=['validation','6364001OuNTQm','16EmbzYY','9111751bKOAjY','company','8nKvDZw','includes','builtin','6882669yoJGym','length','5YHeGEG','personal','36606MsHygk','8218890nwfAwe','26330gBCfGd','2992688KSwhjH','3vxagtc'];a142_0xe448=function(){return _0x4a4869;};return a142_0xe448();}export function isRuntimeSkillScope(_0x3c388b){const _0x19edad=a142_0x2102;return _0x3c388b===_0x19edad(0x87)||_0x3c388b===_0x19edad(0x91)||_0x3c388b===_0x19edad(0x83);}
@@ -1 +1 @@
1
- const a144_0x325c6d=a144_0x3b3c;(function(_0x351b51,_0x3c8f36){const _0xbe983e=a144_0x3b3c,_0x4dd59e=_0x351b51();while(!![]){try{const _0x3aa484=parseInt(_0xbe983e(0x8e))/0x1*(-parseInt(_0xbe983e(0x82))/0x2)+-parseInt(_0xbe983e(0x7c))/0x3*(-parseInt(_0xbe983e(0x8b))/0x4)+-parseInt(_0xbe983e(0x80))/0x5*(-parseInt(_0xbe983e(0x8d))/0x6)+parseInt(_0xbe983e(0x7d))/0x7*(parseInt(_0xbe983e(0x85))/0x8)+-parseInt(_0xbe983e(0x81))/0x9+-parseInt(_0xbe983e(0x8f))/0xa+-parseInt(_0xbe983e(0x91))/0xb;if(_0x3aa484===_0x3c8f36)break;else _0x4dd59e['push'](_0x4dd59e['shift']());}catch(_0x40cad3){_0x4dd59e['push'](_0x4dd59e['shift']());}}}(a144_0x3032,0x90e55));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a144_0x325c6d(0x8a));function a144_0x3032(){const _0x11d8fc=['4705407GtgpUI','1762026fzWwKC','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','endsWith','4997368FCKhLM','map','validation_error','code','sort','1980-01-01T00:00:00.000Z','12252DYCsVY','path','246aFofTN','1NDNfHx','2393030hgMWOJ','validation','3114353XbbdOA','name','927IbWLKG','7AXUnmN','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','from','115685caDBDr'];a144_0x3032=function(){return _0x11d8fc;};return a144_0x3032();}export function createDeterministicZipPackage(_0x301704){const _0x457717=a144_0x325c6d,_0x23c1e0={};for(const _0x26f6f1 of normalizeLocalFiles(_0x301704)){_0x23c1e0[_0x26f6f1[_0x457717(0x8c)]]=fileContent(_0x26f6f1);}return Buffer[_0x457717(0x7f)](zipSync(_0x23c1e0,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x3b0687){const _0x15f852=a144_0x325c6d;if(_0x3b0687['length']<0x16)throw CliErrors[_0x15f852(0x90)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x5d9ae9;try{_0x5d9ae9=unzipSync(_0x3b0687,{'filter'(_0x92b5d4){const _0x5b0483=_0x15f852,_0x1b0252=normalizeSkillRelativePath(_0x92b5d4[_0x5b0483(0x7b)]);if(_0x1b0252[_0x5b0483(0x84)]('/'))throw CliErrors[_0x5b0483(0x90)](_0x5b0483(0x7e)+_0x1b0252);return!![];}});}catch(_0xcb414e){if(isRuntimeSkillValidationError(_0xcb414e))throw _0xcb414e;throw CliErrors[_0x15f852(0x90)](_0x15f852(0x83));}return Object['entries'](_0x5d9ae9)[_0x15f852(0x86)](([_0x5dfc5d,_0x4cb290])=>({'path':normalizeSkillRelativePath(_0x5dfc5d),'bytes':Buffer['from'](_0x4cb290)}))[_0x15f852(0x89)](compareSkillFiles);}function a144_0x3b3c(_0x12b705,_0x1a33e9){_0x12b705=_0x12b705-0x7b;const _0x3032fa=a144_0x3032();let _0x3b3c96=_0x3032fa[_0x12b705];return _0x3b3c96;}function isRuntimeSkillValidationError(_0x3c529d){const _0x440d5d=a144_0x325c6d;return typeof _0x3c529d==='object'&&_0x3c529d!==null&&_0x440d5d(0x88)in _0x3c529d&&_0x3c529d['code']===_0x440d5d(0x87);}
1
+ const a144_0x3b9c39=a144_0x2d9e;(function(_0x3f37cf,_0x422d66){const _0x343afc=a144_0x2d9e,_0x1e4e27=_0x3f37cf();while(!![]){try{const _0x4245f5=parseInt(_0x343afc(0x146))/0x1*(-parseInt(_0x343afc(0x145))/0x2)+parseInt(_0x343afc(0x147))/0x3+-parseInt(_0x343afc(0x14b))/0x4+parseInt(_0x343afc(0x13c))/0x5+-parseInt(_0x343afc(0x149))/0x6+parseInt(_0x343afc(0x13a))/0x7+parseInt(_0x343afc(0x13b))/0x8*(-parseInt(_0x343afc(0x14c))/0x9);if(_0x4245f5===_0x422d66)break;else _0x1e4e27['push'](_0x1e4e27['shift']());}catch(_0x8c867d){_0x1e4e27['push'](_0x1e4e27['shift']());}}}(a144_0x1fbf,0x47e62));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a144_0x3b9c39(0x144));function a144_0x1fbf(){const _0x4ccee1=['validation','code','path','validation_error','entries','1980-01-01T00:00:00.000Z','762VyprOK','503dxoXIn','1699851WzauTX','endsWith','1199220RvHliG','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','764136UtuJRC','147006Vzwhda','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','971159CUAWpb','8HXJYVT','940125OqUzRa','name','map'];a144_0x1fbf=function(){return _0x4ccee1;};return a144_0x1fbf();}function a144_0x2d9e(_0x3ce646,_0x5c578a){_0x3ce646=_0x3ce646-0x138;const _0x1fbfa1=a144_0x1fbf();let _0x2d9e95=_0x1fbfa1[_0x3ce646];return _0x2d9e95;}export function createDeterministicZipPackage(_0x3dffb2){const _0x2f0c6a=a144_0x3b9c39,_0x29dadf={};for(const _0x1d7b1d of normalizeLocalFiles(_0x3dffb2)){_0x29dadf[_0x1d7b1d[_0x2f0c6a(0x141)]]=fileContent(_0x1d7b1d);}return Buffer['from'](zipSync(_0x29dadf,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x15a33d){const _0x47f3b9=a144_0x3b9c39;if(_0x15a33d[_0x47f3b9(0x139)]<0x16)throw CliErrors[_0x47f3b9(0x13f)](_0x47f3b9(0x138));let _0xe02065;try{_0xe02065=unzipSync(_0x15a33d,{'filter'(_0x2b147f){const _0x196a89=_0x47f3b9,_0x7f8e6f=normalizeSkillRelativePath(_0x2b147f[_0x196a89(0x13d)]);if(_0x7f8e6f[_0x196a89(0x148)]('/'))throw CliErrors[_0x196a89(0x13f)](_0x196a89(0x14a)+_0x7f8e6f);return!![];}});}catch(_0x1c22fb){if(isRuntimeSkillValidationError(_0x1c22fb))throw _0x1c22fb;throw CliErrors[_0x47f3b9(0x13f)](_0x47f3b9(0x138));}return Object[_0x47f3b9(0x143)](_0xe02065)[_0x47f3b9(0x13e)](([_0xf467d1,_0x4d42d8])=>({'path':normalizeSkillRelativePath(_0xf467d1),'bytes':Buffer['from'](_0x4d42d8)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x3f812a){const _0x54cc18=a144_0x3b9c39;return typeof _0x3f812a==='object'&&_0x3f812a!==null&&'code'in _0x3f812a&&_0x3f812a[_0x54cc18(0x140)]===_0x54cc18(0x142);}
@@ -1 +1 @@
1
- (function(_0x5311b3,_0x12cb38){const _0x44f4bc=a145_0x19ca,_0x2c237e=_0x5311b3();while(!![]){try{const _0x1993f1=parseInt(_0x44f4bc(0xed))/0x1*(-parseInt(_0x44f4bc(0xfc))/0x2)+parseInt(_0x44f4bc(0xe0))/0x3+parseInt(_0x44f4bc(0xfd))/0x4*(parseInt(_0x44f4bc(0xff))/0x5)+-parseInt(_0x44f4bc(0xf5))/0x6*(parseInt(_0x44f4bc(0xfe))/0x7)+parseInt(_0x44f4bc(0xf8))/0x8+-parseInt(_0x44f4bc(0xea))/0x9*(-parseInt(_0x44f4bc(0x103))/0xa)+parseInt(_0x44f4bc(0x105))/0xb;if(_0x1993f1===_0x12cb38)break;else _0x2c237e['push'](_0x2c237e['shift']());}catch(_0x19277a){_0x2c237e['push'](_0x2c237e['shift']());}}}(a145_0x1ba5,0x5cc34));function a145_0x1ba5(){const _0x831db3=['toString','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isArray','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','zipSize','some','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','1518PkHtWZ','validation','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','3305784RqrbOQ','sha256','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','6JuEexR','111236cFhTNF','17773mVWKvG','105jYkTgp','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','map','Duplicate\x20Skill\x20package\x20entry:\x20','95500mCbult','bytes','1288859aKFPyj','trim','has','set','size','get','files','Runtime\x20Skill\x20package\x20size\x20mismatch.','zipSha256','treeSha256','260547SkISNV','isSafeInteger','length','requireOssPath','schemaVersion','toLowerCase','string','\x20in\x20Skill\x20file\x20package.','path','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','63FPPltb','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','81919IpXEWZ'];a145_0x1ba5=function(){return _0x831db3;};return a145_0x1ba5();}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';function a145_0x19ca(_0x5c0adc,_0x26aed2){_0x5c0adc=_0x5c0adc-0xdb;const _0x1ba535=a145_0x1ba5();let _0x19ca7e=_0x1ba535[_0x5c0adc];return _0x19ca7e;}import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x51d153){const _0xa4170c=a145_0x19ca,_0xf6d0c7=normalizeLocalFiles(_0x51d153);if(!_0xf6d0c7[_0xa4170c(0xf3)](_0x236ff4=>_0x236ff4['path']===SKILL_FILE))throw CliErrors[_0xa4170c(0xf6)]('Missing\x20'+SKILL_FILE+_0xa4170c(0xe7));const _0x17fbcb=localFilesToManifestFiles(_0xf6d0c7),_0x198ee3=createDeterministicZipPackage(_0xf6d0c7);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x17fbcb),'zipSha256':bufferSha256(_0x198ee3),'zipSize':_0x198ee3[_0xa4170c(0xe2)],'files':_0x17fbcb},'packageBytes':_0x198ee3,'packageBase64':_0x198ee3[_0xa4170c(0xee)]('base64')};}export function verifyRuntimeSkillPackage(_0x156a0b,_0x242d71){const _0x29a364=a145_0x19ca,_0x193cc8=normalizePackageManifest(_0x156a0b,{'requireOssPath':![]});if(!_0x193cc8)throw CliErrors[_0x29a364(0xf6)](_0x29a364(0xfb));return extractAndVerifyPackage(_0x193cc8,_0x242d71);}export function verifyRuntimeSkillBundle(_0x7643f1,_0x147ac3){const _0x48d37c=a145_0x19ca,_0x3ede72=normalizePackageManifest(_0x7643f1,{'requireOssPath':![]});if(!_0x3ede72)throw CliErrors[_0x48d37c(0xf6)](_0x48d37c(0xfb));return extractAndVerifyPackageFiles(_0x3ede72,_0x147ac3);}export function tryNormalizePackageManifest(_0x41badb){return normalizePackageManifest(_0x41badb,{'requireOssPath':![]});}export function requirePackageBytes(_0x5cc621,_0x183afd){const _0x38a4b7=a145_0x19ca;if(!_0x183afd||_0x183afd[_0x38a4b7(0xe2)]===0x0)throw CliErrors[_0x38a4b7(0xf6)](_0x38a4b7(0xec)+_0x5cc621);return _0x183afd;}export function extractDownloadedPackage(_0x527cd1){const _0x339db3=a145_0x19ca,_0x7bd762=parseZipPackage(_0x527cd1)['map'](_0x58595a=>({'path':_0x58595a['path'],'bytes':_0x58595a[_0x339db3(0x104)]}));if(!_0x7bd762['some'](_0x375e4a=>_0x375e4a[_0x339db3(0xe8)]===SKILL_FILE))throw CliErrors[_0x339db3(0xf6)](_0x339db3(0xeb)+SKILL_FILE+'.');return normalizeLocalFiles(_0x7bd762);}export function localFilesToManifestFiles(_0x520912){const _0x1a00e7=a145_0x19ca;return normalizeLocalFiles(_0x520912)[_0x1a00e7(0x101)](_0x5b3ab7=>({'path':_0x5b3ab7[_0x1a00e7(0xe8)],'sha256':fileHash(_0x5b3ab7),'size':fileContent(_0x5b3ab7)[_0x1a00e7(0xe2)]}));}function normalizePackageManifest(_0x83e67f,_0x39f398){const _0x243411=a145_0x19ca;if(!_0x83e67f||typeof _0x83e67f!=='object'||Array[_0x243411(0xf0)](_0x83e67f))return undefined;const _0x38cf56=_0x83e67f,_0x48f2a1=typeof _0x38cf56['ossPath']===_0x243411(0xe6)?_0x38cf56['ossPath'][_0x243411(0x106)]():undefined;if(_0x39f398[_0x243411(0xe3)]&&!_0x48f2a1)return undefined;if(!Array[_0x243411(0xf0)](_0x38cf56['files'])||_0x38cf56[_0x243411(0xdc)][_0x243411(0xe2)]===0x0)return undefined;if(!isSha256Hex(_0x38cf56['treeSha256']))throw CliErrors['validation'](_0x243411(0xfa));if(!isSha256Hex(_0x38cf56[_0x243411(0xde)]))throw CliErrors[_0x243411(0xf6)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number['isSafeInteger'](_0x38cf56['zipSize'])||_0x38cf56[_0x243411(0xf2)]<0x0)throw CliErrors[_0x243411(0xf6)](_0x243411(0xf7));const _0x26afd6=normalizeManifestFiles(_0x38cf56[_0x243411(0xdc)]);if(!_0x26afd6[_0x243411(0xf3)](_0x39a49e=>_0x39a49e[_0x243411(0xe8)]===SKILL_FILE))throw CliErrors[_0x243411(0xf6)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x114824=fileTreeHash(_0x26afd6);if(_0x114824!==_0x38cf56[_0x243411(0xdf)]['toLowerCase']())throw CliErrors[_0x243411(0xf6)](_0x243411(0xf4));return{'schemaVersion':Number[_0x243411(0xe1)](_0x38cf56[_0x243411(0xe4)])?_0x38cf56[_0x243411(0xe4)]:0x2,'ossPath':_0x48f2a1,'treeSha256':_0x114824,'zipSha256':_0x38cf56[_0x243411(0xde)][_0x243411(0xe5)](),'zipSize':_0x38cf56['zipSize'],'files':_0x26afd6};}function extractAndVerifyPackage(_0x490e49,_0x5575c1){const _0x3c241c=a145_0x19ca,_0x191051=normalizePackageManifest(_0x490e49,{'requireOssPath':![]});if(!_0x191051)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x5575c1['length']!==_0x191051[_0x3c241c(0xf2)])throw CliErrors['validation'](_0x3c241c(0xdd));const _0xcf8a9c=bufferSha256(_0x5575c1);if(_0xcf8a9c!==_0x191051[_0x3c241c(0xde)])throw CliErrors[_0x3c241c(0xf6)](_0x3c241c(0xef));return extractAndVerifyPackageFiles(_0x191051,_0x5575c1);}function extractAndVerifyPackageFiles(_0x49999c,_0x43a82a){const _0x23a3bb=a145_0x19ca,_0x5d3cb5=parseZipPackage(_0x43a82a);if(_0x5d3cb5[_0x23a3bb(0xe2)]!==_0x49999c[_0x23a3bb(0xdc)][_0x23a3bb(0xe2)])throw CliErrors[_0x23a3bb(0xf6)](_0x23a3bb(0xf1));const _0x19606a=new Map();for(const _0x8bf96d of _0x5d3cb5){if(_0x19606a[_0x23a3bb(0x107)](_0x8bf96d[_0x23a3bb(0xe8)]))throw CliErrors['validation'](_0x23a3bb(0x102)+_0x8bf96d[_0x23a3bb(0xe8)]);_0x19606a[_0x23a3bb(0x108)](_0x8bf96d[_0x23a3bb(0xe8)],_0x8bf96d);}const _0x4c2437=[];for(const _0x4b1d9a of _0x49999c[_0x23a3bb(0xdc)]){const _0x3e3604=_0x19606a[_0x23a3bb(0xdb)](_0x4b1d9a['path']);if(!_0x3e3604)throw CliErrors[_0x23a3bb(0xf6)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x4b1d9a[_0x23a3bb(0xe8)]);if(_0x3e3604[_0x23a3bb(0x104)]['length']!==_0x4b1d9a[_0x23a3bb(0x109)])throw CliErrors[_0x23a3bb(0xf6)](_0x23a3bb(0x100)+_0x4b1d9a[_0x23a3bb(0xe8)]);const _0x52af7f=bufferSha256(_0x3e3604[_0x23a3bb(0x104)]);if(_0x52af7f!==_0x4b1d9a[_0x23a3bb(0xf9)])throw CliErrors['validation'](_0x23a3bb(0xe9)+_0x4b1d9a[_0x23a3bb(0xe8)]);_0x4c2437['push']({'path':_0x4b1d9a[_0x23a3bb(0xe8)],'bytes':_0x3e3604[_0x23a3bb(0x104)]});}return normalizeLocalFiles(_0x4c2437);}
1
+ (function(_0x96461,_0x1cd938){const _0x1e1255=a145_0x49ae,_0xaca62=_0x96461();while(!![]){try{const _0x5cd4a7=parseInt(_0x1e1255(0xc0))/0x1+parseInt(_0x1e1255(0xc3))/0x2+-parseInt(_0x1e1255(0xbe))/0x3*(-parseInt(_0x1e1255(0xe5))/0x4)+parseInt(_0x1e1255(0xd4))/0x5+parseInt(_0x1e1255(0xd0))/0x6*(parseInt(_0x1e1255(0xe1))/0x7)+-parseInt(_0x1e1255(0xdb))/0x8*(parseInt(_0x1e1255(0xc5))/0x9)+-parseInt(_0x1e1255(0xc1))/0xa*(parseInt(_0x1e1255(0xd5))/0xb);if(_0x5cd4a7===_0x1cd938)break;else _0xaca62['push'](_0xaca62['shift']());}catch(_0x11cf17){_0xaca62['push'](_0xaca62['shift']());}}}(a145_0x3c9f,0x5e560));function a145_0x3c9f(){const _0x8ae8f=['228774ZKvYkb','80740XrOcte','toString','440970nToxWI','Duplicate\x20Skill\x20package\x20entry:\x20','576SNVaZD','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','files','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','trim','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','base64','ossPath','validation','Runtime\x20Skill\x20package\x20size\x20mismatch.','8286mrCnvS','treeSha256','set','get','93250ReqcwO','913RmJlpq','zipSize','sha256','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','path','object','71512yfYHaJ','string','\x20in\x20Skill\x20file\x20package.','bytes','toLowerCase','some','3437UuktLH','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','isArray','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','18744xElARf','map','isSafeInteger','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','size','length','309egIWop','zipSha256'];a145_0x3c9f=function(){return _0x8ae8f;};return a145_0x3c9f();}import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a145_0x49ae(_0x8e1756,_0x3f703c){_0x8e1756=_0x8e1756-0xbd;const _0x3c9fc8=a145_0x3c9f();let _0x49ae77=_0x3c9fc8[_0x8e1756];return _0x49ae77;}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x357cb7){const _0x5b2423=a145_0x49ae,_0x5701b8=normalizeLocalFiles(_0x357cb7);if(!_0x5701b8[_0x5b2423(0xe0)](_0x2ce01a=>_0x2ce01a[_0x5b2423(0xd9)]===SKILL_FILE))throw CliErrors[_0x5b2423(0xce)]('Missing\x20'+SKILL_FILE+_0x5b2423(0xdd));const _0x2cc091=localFilesToManifestFiles(_0x5701b8),_0x3d05e5=createDeterministicZipPackage(_0x5701b8);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x2cc091),'zipSha256':bufferSha256(_0x3d05e5),'zipSize':_0x3d05e5[_0x5b2423(0xbd)],'files':_0x2cc091},'packageBytes':_0x3d05e5,'packageBase64':_0x3d05e5[_0x5b2423(0xc2)](_0x5b2423(0xcc))};}export function verifyRuntimeSkillPackage(_0x459b93,_0x272fab){const _0x416fc0=a145_0x49ae,_0x55fbed=normalizePackageManifest(_0x459b93,{'requireOssPath':![]});if(!_0x55fbed)throw CliErrors[_0x416fc0(0xce)](_0x416fc0(0xc9));return extractAndVerifyPackage(_0x55fbed,_0x272fab);}export function verifyRuntimeSkillBundle(_0x454921,_0x4c8178){const _0x174808=a145_0x49ae,_0x2ae55f=normalizePackageManifest(_0x454921,{'requireOssPath':![]});if(!_0x2ae55f)throw CliErrors[_0x174808(0xce)](_0x174808(0xc9));return extractAndVerifyPackageFiles(_0x2ae55f,_0x4c8178);}export function tryNormalizePackageManifest(_0x4ea602){return normalizePackageManifest(_0x4ea602,{'requireOssPath':![]});}export function requirePackageBytes(_0x9f5b83,_0x2d7bb9){const _0x17087e=a145_0x49ae;if(!_0x2d7bb9||_0x2d7bb9['length']===0x0)throw CliErrors[_0x17087e(0xce)](_0x17087e(0xc8)+_0x9f5b83);return _0x2d7bb9;}export function extractDownloadedPackage(_0x232685){const _0x2d8d0a=a145_0x49ae,_0x682e35=parseZipPackage(_0x232685)[_0x2d8d0a(0xe6)](_0x560088=>({'path':_0x560088[_0x2d8d0a(0xd9)],'bytes':_0x560088[_0x2d8d0a(0xde)]}));if(!_0x682e35[_0x2d8d0a(0xe0)](_0x5dab63=>_0x5dab63['path']===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x682e35);}export function localFilesToManifestFiles(_0xde2166){const _0x4dfb7c=a145_0x49ae;return normalizeLocalFiles(_0xde2166)[_0x4dfb7c(0xe6)](_0x16ef4e=>({'path':_0x16ef4e[_0x4dfb7c(0xd9)],'sha256':fileHash(_0x16ef4e),'size':fileContent(_0x16ef4e)[_0x4dfb7c(0xbd)]}));}function normalizePackageManifest(_0x157227,_0x5456d9){const _0x16bdbd=a145_0x49ae;if(!_0x157227||typeof _0x157227!==_0x16bdbd(0xda)||Array[_0x16bdbd(0xe3)](_0x157227))return undefined;const _0x48285a=_0x157227,_0x23cb5b=typeof _0x48285a[_0x16bdbd(0xcd)]===_0x16bdbd(0xdc)?_0x48285a[_0x16bdbd(0xcd)][_0x16bdbd(0xca)]():undefined;if(_0x5456d9['requireOssPath']&&!_0x23cb5b)return undefined;if(!Array[_0x16bdbd(0xe3)](_0x48285a[_0x16bdbd(0xc7)])||_0x48285a[_0x16bdbd(0xc7)][_0x16bdbd(0xbd)]===0x0)return undefined;if(!isSha256Hex(_0x48285a['treeSha256']))throw CliErrors[_0x16bdbd(0xce)](_0x16bdbd(0xe4));if(!isSha256Hex(_0x48285a['zipSha256']))throw CliErrors[_0x16bdbd(0xce)](_0x16bdbd(0xcb));if(!Number['isSafeInteger'](_0x48285a['zipSize'])||_0x48285a['zipSize']<0x0)throw CliErrors[_0x16bdbd(0xce)](_0x16bdbd(0xc6));const _0x51c72a=normalizeManifestFiles(_0x48285a[_0x16bdbd(0xc7)]);if(!_0x51c72a['some'](_0x28a862=>_0x28a862['path']===SKILL_FILE))throw CliErrors[_0x16bdbd(0xce)](_0x16bdbd(0xe8)+SKILL_FILE+'.');const _0x2d900a=fileTreeHash(_0x51c72a);if(_0x2d900a!==_0x48285a[_0x16bdbd(0xd1)][_0x16bdbd(0xdf)]())throw CliErrors[_0x16bdbd(0xce)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x16bdbd(0xe7)](_0x48285a['schemaVersion'])?_0x48285a['schemaVersion']:0x2,'ossPath':_0x23cb5b,'treeSha256':_0x2d900a,'zipSha256':_0x48285a[_0x16bdbd(0xbf)][_0x16bdbd(0xdf)](),'zipSize':_0x48285a[_0x16bdbd(0xd6)],'files':_0x51c72a};}function extractAndVerifyPackage(_0x114033,_0x162148){const _0x6b8293=a145_0x49ae,_0x292cb1=normalizePackageManifest(_0x114033,{'requireOssPath':![]});if(!_0x292cb1)throw CliErrors[_0x6b8293(0xce)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x162148['length']!==_0x292cb1[_0x6b8293(0xd6)])throw CliErrors[_0x6b8293(0xce)](_0x6b8293(0xcf));const _0x284552=bufferSha256(_0x162148);if(_0x284552!==_0x292cb1[_0x6b8293(0xbf)])throw CliErrors[_0x6b8293(0xce)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x292cb1,_0x162148);}function extractAndVerifyPackageFiles(_0x280bac,_0x37ece3){const _0x1cca68=a145_0x49ae,_0x24b0ec=parseZipPackage(_0x37ece3);if(_0x24b0ec[_0x1cca68(0xbd)]!==_0x280bac[_0x1cca68(0xc7)][_0x1cca68(0xbd)])throw CliErrors[_0x1cca68(0xce)](_0x1cca68(0xd8));const _0xdd61a6=new Map();for(const _0x8e5df2 of _0x24b0ec){if(_0xdd61a6['has'](_0x8e5df2[_0x1cca68(0xd9)]))throw CliErrors[_0x1cca68(0xce)](_0x1cca68(0xc4)+_0x8e5df2[_0x1cca68(0xd9)]);_0xdd61a6[_0x1cca68(0xd2)](_0x8e5df2[_0x1cca68(0xd9)],_0x8e5df2);}const _0x418d27=[];for(const _0x58be33 of _0x280bac[_0x1cca68(0xc7)]){const _0x428161=_0xdd61a6[_0x1cca68(0xd3)](_0x58be33[_0x1cca68(0xd9)]);if(!_0x428161)throw CliErrors[_0x1cca68(0xce)](_0x1cca68(0xe2)+_0x58be33[_0x1cca68(0xd9)]);if(_0x428161[_0x1cca68(0xde)][_0x1cca68(0xbd)]!==_0x58be33[_0x1cca68(0xea)])throw CliErrors[_0x1cca68(0xce)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x58be33[_0x1cca68(0xd9)]);const _0x18f441=bufferSha256(_0x428161[_0x1cca68(0xde)]);if(_0x18f441!==_0x58be33[_0x1cca68(0xd7)])throw CliErrors['validation'](_0x1cca68(0xe9)+_0x58be33['path']);_0x418d27['push']({'path':_0x58be33[_0x1cca68(0xd9)],'bytes':_0x428161[_0x1cca68(0xde)]});}return normalizeLocalFiles(_0x418d27);}
@@ -8,7 +8,7 @@ export { contentHash, fileTreeHash, } from "./runtime-skill-sync/hashing.js";
8
8
  export { linkEffectiveRuntimeSkills, linkGlobalRuntimeSkills, pruneStaleRuntimeSkillCache, pruneStaleRuntimeSkillLinks, } from "./runtime-skill-sync/links.js";
9
9
  export { resolveRuntimeSkillInstallTarget } from "./runtime-skill-sync/install-target.js";
10
10
  export { listLocalRuntimeSkills } from "./runtime-skill-sync/list-local.js";
11
- export { materializeRuntimeSkill } from "./runtime-skill-sync/materialize.js";
11
+ export { materializeRuntimeSkill, reuseMaterializedRuntimeSkill, } from "./runtime-skill-sync/materialize.js";
12
12
  export { readMetadataIfPresent } from "./runtime-skill-sync/metadata.js";
13
13
  export { getRuntimeSkillCacheRoot, getRuntimeSkillDir, resolveSkillSyncPaths, runtimeAgentSkillRoots, } from "./runtime-skill-sync/paths.js";
14
14
  export { deriveSkillCodeFromDirectory, readPushDirectory, refreshPushDirectoryMetadataFromRemote, recordPushedRuntimeSkill, resolvePushDirectoryIdentity, } from "./runtime-skill-sync/push.js";
@@ -1 +1 @@
1
- (function(_0x1c0388,_0x501fbd){var _0x3fd960=a146_0x54cf,_0x578f7e=_0x1c0388();while(!![]){try{var _0x20e5d4=-parseInt(_0x3fd960(0xbf))/0x1+parseInt(_0x3fd960(0xc5))/0x2*(-parseInt(_0x3fd960(0xc2))/0x3)+-parseInt(_0x3fd960(0xc1))/0x4+parseInt(_0x3fd960(0xc0))/0x5+parseInt(_0x3fd960(0xc4))/0x6*(parseInt(_0x3fd960(0xbe))/0x7)+parseInt(_0x3fd960(0xc3))/0x8+parseInt(_0x3fd960(0xbd))/0x9;if(_0x20e5d4===_0x501fbd)break;else _0x578f7e['push'](_0x578f7e['shift']());}catch(_0xdca598){_0x578f7e['push'](_0x578f7e['shift']());}}}(a146_0x31b7,0xdc038));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';function a146_0x54cf(_0x3b8571,_0x39197c){_0x3b8571=_0x3b8571-0xbd;var _0x31b74c=a146_0x31b7();var _0x54cfbe=_0x31b74c[_0x3b8571];return _0x54cfbe;}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a146_0x31b7(){var _0x5ed21a=['2654928BdvqJE','6fgaLDc','1568992mHCJTL','11938131YrUCTS','6392554BJEaMz','1524013nPqUgg','4817560FDUdDN','1301496nNXOkx','3HBskut'];a146_0x31b7=function(){return _0x5ed21a;};return a146_0x31b7();}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(_0x1d7d9d,_0xa8bca4){var _0x44899c=a146_0x261a,_0x2520c9=_0x1d7d9d();while(!![]){try{var _0x57cfa1=-parseInt(_0x44899c(0x1dd))/0x1*(parseInt(_0x44899c(0x1e1))/0x2)+parseInt(_0x44899c(0x1de))/0x3+parseInt(_0x44899c(0x1df))/0x4+-parseInt(_0x44899c(0x1e3))/0x5*(parseInt(_0x44899c(0x1e6))/0x6)+-parseInt(_0x44899c(0x1e5))/0x7+-parseInt(_0x44899c(0x1e2))/0x8*(parseInt(_0x44899c(0x1e0))/0x9)+parseInt(_0x44899c(0x1e4))/0xa;if(_0x57cfa1===_0xa8bca4)break;else _0x2520c9['push'](_0x2520c9['shift']());}catch(_0x4148da){_0x2520c9['push'](_0x2520c9['shift']());}}}(a146_0x2d1b,0xa38ea));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a146_0x261a(_0x28ff2b,_0x5104){_0x28ff2b=_0x28ff2b-0x1dd;var _0x2d1bc4=a146_0x2d1b();var _0x261a46=_0x2d1bc4[_0x28ff2b];return _0x261a46;}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a146_0x2d1b(){var _0x429238=['200439sWmJsP','2877207BEMADs','1375600gYNPQH','45oDzujF','12LeVPZi','1457992loNfxO','711885XqbEOY','30779330zPZzyw','6196456yPYVvb','30aVJiME'];a146_0x2d1b=function(){return _0x429238;};return a146_0x2d1b();}export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}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 +1 @@
1
- const a147_0x4b5ff2=a147_0x31e1;(function(_0x5ad8b4,_0x2732cd){const _0x4d3690=a147_0x31e1,_0x2f0e34=_0x5ad8b4();while(!![]){try{const _0x3b1d2c=parseInt(_0x4d3690(0x201))/0x1+-parseInt(_0x4d3690(0x1ff))/0x2+-parseInt(_0x4d3690(0x1fb))/0x3*(-parseInt(_0x4d3690(0x1e0))/0x4)+-parseInt(_0x4d3690(0x1f6))/0x5*(parseInt(_0x4d3690(0x1e3))/0x6)+-parseInt(_0x4d3690(0x1e6))/0x7*(-parseInt(_0x4d3690(0x1ec))/0x8)+parseInt(_0x4d3690(0x1f2))/0x9+-parseInt(_0x4d3690(0x1fa))/0xa*(parseInt(_0x4d3690(0x1ea))/0xb);if(_0x3b1d2c===_0x2732cd)break;else _0x2f0e34['push'](_0x2f0e34['shift']());}catch(_0x1ce450){_0x2f0e34['push'](_0x2f0e34['shift']());}}}(a147_0x1040,0xa4551));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a147_0x4b5ff2(0x1e9),a147_0x4b5ff2(0x1f3));function a147_0x1040(){const _0x4d39cf=['\x20has\x20no\x20skills\x20map','567066ImxUII','.claude','1240967whlJep','absent','148792nRCnhl','present','utf8','171186cKBWdT','not-recorded','number','63cKMihc','parse','home','.agents','87142Ukkztn','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','854256nGBhay','\x20records\x20\x22','lockFile','version','unusable','includes','2023848fjewbj','.skill-lock.json','SKILL.md','skills','165qkHaCe','message','unverifiable','map','1090sTFafD','27JULnnh','\x20uses\x20unsupported\x20version\x20','recorded'];a147_0x1040=function(){return _0x4d39cf;};return a147_0x1040();}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a147_0x4b5ff2(0x1f5)),join(a147_0x4b5ff2(0x200),a147_0x4b5ff2(0x1f5))];function a147_0x31e1(_0x31bb24,_0x56e9b3){_0x31bb24=_0x31bb24-0x1df;const _0x1040fb=a147_0x1040();let _0x31e188=_0x1040fb[_0x31bb24];return _0x31e188;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x3d9c8c,_0x33758e){const _0x1e3ce3=a147_0x4b5ff2;if(!existsSync(_0x3d9c8c))return{'kind':_0x1e3ce3(0x1e4)};let _0x497097;try{_0x497097=JSON[_0x1e3ce3(0x1e7)](readFileSync(_0x3d9c8c,_0x1e3ce3(0x1e2)));}catch(_0x39af2c){return{'kind':_0x1e3ce3(0x1f0),'reason':_0x3d9c8c+'\x20is\x20unreadable:\x20'+_0x39af2c[_0x1e3ce3(0x1f7)]};}const _0x7e1cb5=_0x497097;if(typeof _0x7e1cb5?.[_0x1e3ce3(0x1ef)]!==_0x1e3ce3(0x1e5)||!SUPPORTED_LOCK_VERSIONS[_0x1e3ce3(0x1f1)](_0x7e1cb5[_0x1e3ce3(0x1ef)]))return{'kind':_0x1e3ce3(0x1f0),'reason':_0x3d9c8c+_0x1e3ce3(0x1fc)+String(_0x7e1cb5?.[_0x1e3ce3(0x1ef)])};if(!_0x7e1cb5[_0x1e3ce3(0x1f5)]||typeof _0x7e1cb5['skills']!=='object')return{'kind':_0x1e3ce3(0x1f0),'reason':_0x3d9c8c+_0x1e3ce3(0x1fe)};return _0x7e1cb5[_0x1e3ce3(0x1f5)][_0x33758e]?{'kind':_0x1e3ce3(0x1fd)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x3688f6,_0x3bc04d){const _0x4abdb1=a147_0x4b5ff2,_0x4ad65f=_0x3bc04d?.[_0x4abdb1(0x1e8)]??homedir(),_0x5de9bb=_0x3bc04d?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x4abdb1(0x1f9)](_0x594fa=>join(_0x4ad65f,_0x594fa)),_0x14ca81=_0x3bc04d?.[_0x4abdb1(0x1ee)]??join(_0x4ad65f,SKILL_LOCK_RELATIVE_PATH),_0x1ed8bc=_0x5de9bb['map'](_0xfdb176=>join(_0xfdb176,_0x3688f6,_0x4abdb1(0x1f4))),_0x1e955f=_0x1ed8bc['find'](_0x594b60=>existsSync(_0x594b60));if(_0x1e955f)return{'state':_0x4abdb1(0x1e1),'path':_0x1e955f};const _0x1b2332=readLockLookup(_0x14ca81,_0x3688f6);if(_0x1b2332['kind']===_0x4abdb1(0x1f0))return{'state':_0x4abdb1(0x1f8),'reason':_0x1b2332['reason']};if(_0x1b2332['kind']===_0x4abdb1(0x1fd))return{'state':_0x4abdb1(0x1f8),'reason':_0x14ca81+_0x4abdb1(0x1ed)+_0x3688f6+_0x4abdb1(0x1eb)+('('+_0x1ed8bc['join'](',\x20')+')')};return{'state':_0x4abdb1(0x1df),'checked':_0x1ed8bc};}
1
+ const a147_0x4f3210=a147_0x5395;(function(_0xf46760,_0x93aab0){const _0x4de9a2=a147_0x5395,_0x5c0304=_0xf46760();while(!![]){try{const _0x2efb2c=parseInt(_0x4de9a2(0x1e5))/0x1+-parseInt(_0x4de9a2(0x1ea))/0x2+-parseInt(_0x4de9a2(0x1e0))/0x3*(parseInt(_0x4de9a2(0x1e4))/0x4)+parseInt(_0x4de9a2(0x1e9))/0x5*(-parseInt(_0x4de9a2(0x1d8))/0x6)+parseInt(_0x4de9a2(0x1e6))/0x7+parseInt(_0x4de9a2(0x1d6))/0x8*(-parseInt(_0x4de9a2(0x1e2))/0x9)+parseInt(_0x4de9a2(0x1db))/0xa;if(_0x2efb2c===_0x93aab0)break;else _0x5c0304['push'](_0x5c0304['shift']());}catch(_0xe5def4){_0x5c0304['push'](_0x5c0304['shift']());}}}(a147_0x31f7,0x22c65));import{existsSync,readFileSync}from'node:fs';function a147_0x5395(_0x4a3b32,_0x420204){_0x4a3b32=_0x4a3b32-0x1d6;const _0x31f7cc=a147_0x31f7();let _0x539586=_0x31f7cc[_0x4a3b32];return _0x539586;}import{homedir}from'node:os';function a147_0x31f7(){const _0x39c758=['785526qGpTOC','skills','kind','115XNoSDD','217878iEeyzP','unverifiable','recorded','.agents','includes','unusable','utf8','object','join','map','number','\x20is\x20unreadable:\x20','version','\x20uses\x20unsupported\x20version\x20','280792HKzNPf','\x20records\x20\x22','1494cljQhY','.skill-lock.json','home','3413290fiwNLC','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','globalSkillsDirs','not-recorded','parse','735hWuoed','lockFile','36vSVsIe','absent','4408SpfJmG','213942DcRXCN'];a147_0x31f7=function(){return _0x39c758;};return a147_0x31f7();}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a147_0x4f3210(0x1ed),a147_0x4f3210(0x1d9));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a147_0x4f3210(0x1ed),a147_0x4f3210(0x1e7)),join('.claude',a147_0x4f3210(0x1e7))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x129038,_0x1a1c4d){const _0x1a3f3a=a147_0x4f3210;if(!existsSync(_0x129038))return{'kind':_0x1a3f3a(0x1de)};let _0x1508a2;try{_0x1508a2=JSON[_0x1a3f3a(0x1df)](readFileSync(_0x129038,_0x1a3f3a(0x1f0)));}catch(_0x165360){return{'kind':_0x1a3f3a(0x1ef),'reason':_0x129038+_0x1a3f3a(0x1f5)+_0x165360['message']};}const _0xe4e8d7=_0x1508a2;if(typeof _0xe4e8d7?.[_0x1a3f3a(0x1f6)]!==_0x1a3f3a(0x1f4)||!SUPPORTED_LOCK_VERSIONS[_0x1a3f3a(0x1ee)](_0xe4e8d7[_0x1a3f3a(0x1f6)]))return{'kind':_0x1a3f3a(0x1ef),'reason':_0x129038+_0x1a3f3a(0x1f7)+String(_0xe4e8d7?.[_0x1a3f3a(0x1f6)])};if(!_0xe4e8d7[_0x1a3f3a(0x1e7)]||typeof _0xe4e8d7['skills']!==_0x1a3f3a(0x1f1))return{'kind':_0x1a3f3a(0x1ef),'reason':_0x129038+'\x20has\x20no\x20skills\x20map'};return _0xe4e8d7[_0x1a3f3a(0x1e7)][_0x1a1c4d]?{'kind':_0x1a3f3a(0x1ec)}:{'kind':_0x1a3f3a(0x1de)};}export function resolveInstalledSkill(_0x4a1bc3,_0x3783c3){const _0x52e48d=a147_0x4f3210,_0x318e92=_0x3783c3?.[_0x52e48d(0x1da)]??homedir(),_0x56e167=_0x3783c3?.[_0x52e48d(0x1dd)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x52e48d(0x1f3)](_0x55d82a=>join(_0x318e92,_0x55d82a)),_0x56c7df=_0x3783c3?.[_0x52e48d(0x1e1)]??join(_0x318e92,SKILL_LOCK_RELATIVE_PATH),_0x4fbeeb=_0x56e167[_0x52e48d(0x1f3)](_0x4068ce=>join(_0x4068ce,_0x4a1bc3,'SKILL.md')),_0xca2b6=_0x4fbeeb['find'](_0x44ec83=>existsSync(_0x44ec83));if(_0xca2b6)return{'state':'present','path':_0xca2b6};const _0xe220f=readLockLookup(_0x56c7df,_0x4a1bc3);if(_0xe220f[_0x52e48d(0x1e8)]==='unusable')return{'state':'unverifiable','reason':_0xe220f['reason']};if(_0xe220f[_0x52e48d(0x1e8)]===_0x52e48d(0x1ec))return{'state':_0x52e48d(0x1eb),'reason':_0x56c7df+_0x52e48d(0x1d7)+_0x4a1bc3+_0x52e48d(0x1dc)+('('+_0x4fbeeb[_0x52e48d(0x1f2)](',\x20')+')')};return{'state':_0x52e48d(0x1e3),'checked':_0x4fbeeb};}
@@ -1 +1 @@
1
- function a148_0x5322(){const _0x313c51=['30779sOeZBr','7370HYZiZi','901989BZjosF','582ZffKko','4lkIaql','572934qYYJMz','9262008RgIpLM','7039824gimLwR','448tzKrxR','17230jzBpiw','32060psqkea'];a148_0x5322=function(){return _0x313c51;};return a148_0x5322();}(function(_0x491910,_0x1e8575){const _0x11d46d=a148_0x14dc,_0x55f634=_0x491910();while(!![]){try{const _0x517de7=parseInt(_0x11d46d(0x13d))/0x1*(-parseInt(_0x11d46d(0x13c))/0x2)+-parseInt(_0x11d46d(0x13a))/0x3+-parseInt(_0x11d46d(0x140))/0x4*(-parseInt(_0x11d46d(0x141))/0x5)+parseInt(_0x11d46d(0x13b))/0x6*(-parseInt(_0x11d46d(0x138))/0x7)+-parseInt(_0x11d46d(0x13f))/0x8+parseInt(_0x11d46d(0x13e))/0x9+parseInt(_0x11d46d(0x142))/0xa*(parseInt(_0x11d46d(0x139))/0xb);if(_0x517de7===_0x1e8575)break;else _0x55f634['push'](_0x55f634['shift']());}catch(_0x1a6ced){_0x55f634['push'](_0x55f634['shift']());}}}(a148_0x5322,0xc5c52));function a148_0x14dc(_0x82a54c,_0xc56877){_0x82a54c=_0x82a54c-0x138;const _0x532232=a148_0x5322();let _0x14dceb=_0x532232[_0x82a54c];return _0x14dceb;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x71df3c,_0x242a0a){const _0x304e22=a148_0x2395,_0x283ff1=_0x71df3c();while(!![]){try{const _0x4aef63=-parseInt(_0x304e22(0xdf))/0x1*(-parseInt(_0x304e22(0xe3))/0x2)+parseInt(_0x304e22(0xdc))/0x3+-parseInt(_0x304e22(0xde))/0x4+-parseInt(_0x304e22(0xe1))/0x5*(-parseInt(_0x304e22(0xe2))/0x6)+-parseInt(_0x304e22(0xe4))/0x7+-parseInt(_0x304e22(0xdd))/0x8+parseInt(_0x304e22(0xe0))/0x9;if(_0x4aef63===_0x242a0a)break;else _0x283ff1['push'](_0x283ff1['shift']());}catch(_0x273fa8){_0x283ff1['push'](_0x283ff1['shift']());}}}(a148_0x1804,0xf359a));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a148_0x2395(_0x3688f4,_0x2beb30){_0x3688f4=_0x3688f4-0xdc;const _0x18040e=a148_0x1804();let _0x239501=_0x18040e[_0x3688f4];return _0x239501;}function a148_0x1804(){const _0x3b2ebf=['7931456lahgqq','5741xcCucb','20104506keeTHE','5RzylgK','8042442suhtoK','506UJjusP','3454493PQFYoM','759780waVTMI','14454792SckuGi'];a148_0x1804=function(){return _0x3b2ebf;};return a148_0x1804();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});