@lovrabet/lovrabet-cli 2.2.3-beta.2 → 2.2.3

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 (138) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/user-account/bind.js +1 -1
  66. package/lib/commands/user-account/index.js +1 -1
  67. package/lib/commands/workspace/index.js +1 -1
  68. package/lib/config/schema.js +1 -1
  69. package/lib/constant/app.js +1 -1
  70. package/lib/constant/auth-mode.js +1 -1
  71. package/lib/constant/cli.js +1 -1
  72. package/lib/constant/defaults.js +1 -1
  73. package/lib/constant/distribution.js +1 -1
  74. package/lib/constant/domain.js +1 -1
  75. package/lib/constant/env.js +1 -1
  76. package/lib/constant/output.js +1 -1
  77. package/lib/constant/product.js +1 -1
  78. package/lib/constant/risk.js +1 -1
  79. package/lib/constant/url.js +1 -1
  80. package/lib/context.js +1 -1
  81. package/lib/core/api-client.js +1 -1
  82. package/lib/core/db-resolver.js +1 -1
  83. package/lib/core/sdk-client.js +1 -1
  84. package/lib/errors.js +1 -1
  85. package/lib/framework/build-all-flags.js +1 -1
  86. package/lib/framework/dryrun.js +1 -1
  87. package/lib/framework/flags.js +1 -1
  88. package/lib/framework/help.js +1 -1
  89. package/lib/framework/index.js +1 -1
  90. package/lib/framework/output.js +1 -1
  91. package/lib/framework/preparse.js +1 -1
  92. package/lib/framework/rate-limit.js +1 -1
  93. package/lib/framework/raw-flags.js +1 -1
  94. package/lib/framework/response.js +1 -1
  95. package/lib/framework/runner-confirmation.js +1 -1
  96. package/lib/framework/runner-error.js +1 -1
  97. package/lib/framework/runner.js +1 -1
  98. package/lib/framework/schema-export.js +1 -1
  99. package/lib/framework/service-order.js +1 -1
  100. package/lib/framework/types.js +1 -1
  101. package/lib/generated/build-info.d.ts +4 -4
  102. package/lib/generated/build-info.js +1 -1
  103. package/lib/help.js +1 -1
  104. package/lib/postinstall.js +1 -1
  105. package/lib/runtime/confirmation.js +1 -1
  106. package/lib/runtime/event.js +1 -1
  107. package/lib/runtime/index.js +1 -1
  108. package/lib/runtime/queue.js +1 -1
  109. package/lib/runtime/resolve.js +1 -1
  110. package/lib/skills/builtin-skill.js +1 -1
  111. package/lib/skills/npx-skills-add.js +1 -1
  112. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  113. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  114. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  115. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  116. package/lib/skills/runtime-skill-sync/links.js +1 -1
  117. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  118. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  119. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  120. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  121. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  122. package/lib/skills/runtime-skill-sync/push.js +1 -1
  123. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  124. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  125. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  126. package/lib/skills/runtime-skill-sync.js +1 -1
  127. package/lib/skills/skill-presence.js +1 -1
  128. package/lib/utils/apply-jq-filter.js +1 -1
  129. package/lib/utils/logger.js +1 -1
  130. package/lib/utils/lossless-json.js +1 -1
  131. package/lib/utils/params.js +1 -1
  132. package/lib/utils/platform.js +1 -1
  133. package/lib/utils/update-notice.js +1 -1
  134. package/lib/utils/version.js +1 -1
  135. package/lib/utils/write-cli-side-channel.js +1 -1
  136. package/package.json +1 -1
  137. package/skills/lovrabet/SKILL.md +1 -1
  138. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x49213c,_0x32e553){const _0x466ff1=a116_0x5bfe,_0x138f09=_0x49213c();while(!![]){try{const _0x16f669=parseInt(_0x466ff1(0x194))/0x1+-parseInt(_0x466ff1(0x19c))/0x2*(-parseInt(_0x466ff1(0x193))/0x3)+-parseInt(_0x466ff1(0x192))/0x4+parseInt(_0x466ff1(0x1a3))/0x5+parseInt(_0x466ff1(0x1ab))/0x6*(parseInt(_0x466ff1(0x195))/0x7)+-parseInt(_0x466ff1(0x196))/0x8+parseInt(_0x466ff1(0x197))/0x9*(-parseInt(_0x466ff1(0x184))/0xa);if(_0x16f669===_0x32e553)break;else _0x138f09['push'](_0x138f09['shift']());}catch(_0x125545){_0x138f09['push'](_0x138f09['shift']());}}}(a116_0x4d6b,0x6a2a8));import{existsSync,readdirSync}from'node:fs';function a116_0x5bfe(_0x173725,_0x5c17ac){_0x173725=_0x173725-0x182;const _0x4d6bf9=a116_0x4d6b();let _0x5bfe70=_0x4d6bf9[_0x173725];return _0x5bfe70;}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';export function listLocalRuntimeSkills(_0x28b26f,_0x283dcf,_0x3e4f76={}){const _0x2c3db7=a116_0x5bfe,_0x1c06c8=safePathSegment(_0x28b26f[_0x2c3db7(0x1a4)],_0x2c3db7(0x1a4));if(_0x283dcf[_0x2c3db7(0x1a4)]!==_0x1c06c8)throw CliErrors['validation']('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x283dcf['appCode']+_0x2c3db7(0x19d)+_0x1c06c8);const _0x5c5c2e=normalizeRuntimeSkillScopes(_0x28b26f[_0x2c3db7(0x18f)]),_0x4ab192=new Set(_0x5c5c2e),_0x20ea5f=_0x28b26f[_0x2c3db7(0x190)]?.[_0x2c3db7(0x199)](),_0xceaba0=new Map(),_0x1112c6=resolve(getRuntimeSkillCacheRoot(_0x28b26f[_0x2c3db7(0x187)],_0x28b26f[_0x2c3db7(0x1a7)],_0x3e4f76),_0x1c06c8);for(const _0x5d1066 of _0x5c5c2e){for(const _0x2ba8e1 of localSkillEntryDirs(resolve(_0x1112c6,_0x5d1066))){collectLocalRuntimeSkill(_0xceaba0,_0x2ba8e1,{'appCode':_0x1c06c8,'scopes':_0x4ab192,'code':_0x20ea5f,'source':_0x2c3db7(0x198)});}}for(const _0x501356 of _0x283dcf[_0x2c3db7(0x18a)]){for(const _0x22c1f7 of localSkillLinkCandidates(_0x501356,_0x283dcf,_0x4ab192)){collectLocalRuntimeSkill(_0xceaba0,_0x22c1f7,{'appCode':_0x1c06c8,'scopes':_0x4ab192,'code':_0x20ea5f,'source':'link','linkedPath':_0x22c1f7});}}return Array[_0x2c3db7(0x182)](_0xceaba0[_0x2c3db7(0x189)]())[_0x2c3db7(0x19b)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2ac469){const _0x3314ba=a116_0x5bfe;if(!existsSync(_0x2ac469))return[];return readdirSync(_0x2ac469,{'withFileTypes':!![]})[_0x3314ba(0x183)](_0x28de6d=>_0x28de6d[_0x3314ba(0x1a0)]()||_0x28de6d['isSymbolicLink']())[_0x3314ba(0x1a1)](_0x26662e=>resolve(_0x2ac469,_0x26662e[_0x3314ba(0x1a5)]));}function localSkillLinkCandidates(_0x55a566,_0x23ca2d,_0x468686){const _0x4fd48b=a116_0x5bfe;if(!existsSync(_0x55a566))return[];const _0x134733=_0x23ca2d[_0x4fd48b(0x1a4)]+'--';return readdirSync(_0x55a566,{'withFileTypes':!![]})['filter'](_0x6cc611=>_0x6cc611['isDirectory']()||_0x6cc611[_0x4fd48b(0x18e)]())[_0x4fd48b(0x183)](_0x4835c4=>_0x23ca2d[_0x4fd48b(0x19f)]==='project'||_0x4835c4[_0x4fd48b(0x1a5)][_0x4fd48b(0x19a)](_0x134733)||_0x468686[_0x4fd48b(0x18d)](_0x4fd48b(0x1a6)))[_0x4fd48b(0x1a1)](_0x5ed2fa=>resolve(_0x55a566,_0x5ed2fa['name']));}function a116_0x4d6b(){const _0x414f5d=['startsWith','sort','627244ojukZa','\x20!=\x20','linkedPaths','scope','isDirectory','map','linkedPath','297500Tqsose','appCode','name','builtin','accessKey','includes','skillCode','metadataPath','71088LgIJLm','from','filter','53140FKeGQh','localeCompare','dir','env','set','values','skillRoots','tags','source','has','isSymbolicLink','scopes','code','get','621000MwcOXY','3IWYRyG','283491FzERRO','378oqcPdB','1739288cDgfBH','828fSDBHH','cache','trim'];a116_0x4d6b=function(){return _0x414f5d;};return a116_0x4d6b();}function collectLocalRuntimeSkill(_0x2e6ce9,_0x24da2d,_0x452dde){const _0x305dae=a116_0x5bfe,_0x56a472=resolve(_0x24da2d,METADATA_FILE),_0x5ed095=readMetadataIfPresent(_0x56a472);if(!_0x5ed095)return;if(_0x5ed095[_0x305dae(0x1a4)]!==_0x452dde[_0x305dae(0x1a4)])return;if(!isRuntimeSkillScope(_0x5ed095[_0x305dae(0x19f)])||!_0x452dde[_0x305dae(0x18f)][_0x305dae(0x18d)](_0x5ed095['scope']))return;const _0x2281ab=_0x5ed095[_0x305dae(0x1a9)]?.[_0x305dae(0x199)]();if(!_0x2281ab)return;if(_0x452dde[_0x305dae(0x190)]&&_0x2281ab!==_0x452dde[_0x305dae(0x190)])return;const _0x5cf14b=_0x5ed095[_0x305dae(0x19f)]+':'+_0x2281ab,_0x14c4f6=_0x452dde[_0x305dae(0x1a2)]?[_0x452dde[_0x305dae(0x1a2)]]:[],_0x4667b4=_0x2e6ce9[_0x305dae(0x191)](_0x5cf14b);if(_0x4667b4){_0x452dde[_0x305dae(0x18c)]===_0x305dae(0x198)&&(_0x4667b4[_0x305dae(0x186)]=_0x24da2d,_0x4667b4['cacheDir']=_0x24da2d,_0x4667b4['skillMdPath']=resolve(_0x24da2d,SKILL_FILE),_0x4667b4[_0x305dae(0x1aa)]=_0x56a472);for(const _0x20318e of _0x14c4f6){!_0x4667b4['linkedPaths'][_0x305dae(0x1a8)](_0x20318e)&&_0x4667b4[_0x305dae(0x19e)]['push'](_0x20318e);}_0x4667b4[_0x305dae(0x19e)][_0x305dae(0x19b)]();return;}_0x2e6ce9[_0x305dae(0x188)](_0x5cf14b,{..._0x5ed095,'tags':Array['isArray'](_0x5ed095[_0x305dae(0x18b)])?_0x5ed095[_0x305dae(0x18b)]:[],'scope':_0x5ed095[_0x305dae(0x19f)],'source':'local','dir':_0x24da2d,'cacheDir':_0x452dde[_0x305dae(0x18c)]==='cache'?_0x24da2d:undefined,'skillMdPath':resolve(_0x24da2d,SKILL_FILE),'metadataPath':_0x56a472,'linkedPaths':_0x14c4f6});}function compareLocalRuntimeSkills(_0x3137c3,_0x204216){const _0xb838d7=a116_0x5bfe,_0x5a8e15={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5a8e15[_0x3137c3['scope']]-_0x5a8e15[_0x204216[_0xb838d7(0x19f)]]||_0x3137c3[_0xb838d7(0x1a9)][_0xb838d7(0x185)](_0x204216[_0xb838d7(0x1a9)])||_0x3137c3[_0xb838d7(0x186)][_0xb838d7(0x185)](_0x204216[_0xb838d7(0x186)]);}
1
+ (function(_0x3da454,_0x368081){const _0x5ea129=a116_0x54a5,_0x2186b6=_0x3da454();while(!![]){try{const _0x47d4cd=-parseInt(_0x5ea129(0x12a))/0x1+parseInt(_0x5ea129(0x130))/0x2+parseInt(_0x5ea129(0x116))/0x3*(parseInt(_0x5ea129(0x12b))/0x4)+parseInt(_0x5ea129(0x136))/0x5*(-parseInt(_0x5ea129(0x131))/0x6)+-parseInt(_0x5ea129(0x120))/0x7*(-parseInt(_0x5ea129(0x11c))/0x8)+parseInt(_0x5ea129(0x115))/0x9*(-parseInt(_0x5ea129(0x119))/0xa)+-parseInt(_0x5ea129(0x124))/0xb*(parseInt(_0x5ea129(0x10f))/0xc);if(_0x47d4cd===_0x368081)break;else _0x2186b6['push'](_0x2186b6['shift']());}catch(_0x1d29eb){_0x2186b6['push'](_0x2186b6['shift']());}}}(a116_0x57de,0xbaff3));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a116_0x57de(){const _0x29fbc9=['isArray','code','180VyiqSq','isDirectory','appCode','4376FqqDKB','tags','skillRoots','from','12187KGWKPY','get','linkedPath','sort','7462081mtMYQB','cache','values','cacheDir','builtin','env','109622pffzsj','56VDkYpr','scope','source','metadataPath','trim','2105320HMayRH','77208FSxkbY','validation','isSymbolicLink','project','dir','115DbUiUw','skillMdPath','accessKey','localeCompare','name','map','24SLvNhZ','skillCode','local','linkedPaths','set','push','454131VAZtBp','306759FFrLgb'];a116_0x57de=function(){return _0x29fbc9;};return a116_0x57de();}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x3e09b5,_0x4d7a66,_0x5471b9={}){const _0x179722=a116_0x54a5,_0x24f8cd=safePathSegment(_0x3e09b5['appCode'],_0x179722(0x11b));if(_0x4d7a66[_0x179722(0x11b)]!==_0x24f8cd)throw CliErrors[_0x179722(0x132)]('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x4d7a66[_0x179722(0x11b)]+'\x20!=\x20'+_0x24f8cd);const _0x92e18d=normalizeRuntimeSkillScopes(_0x3e09b5['scopes']),_0x57d829=new Set(_0x92e18d),_0x4c0aa=_0x3e09b5[_0x179722(0x118)]?.[_0x179722(0x12f)](),_0x1d911=new Map(),_0x5d821b=resolve(getRuntimeSkillCacheRoot(_0x3e09b5[_0x179722(0x129)],_0x3e09b5[_0x179722(0x138)],_0x5471b9),_0x24f8cd);for(const _0x135df0 of _0x92e18d){for(const _0x2540f7 of localSkillEntryDirs(resolve(_0x5d821b,_0x135df0))){collectLocalRuntimeSkill(_0x1d911,_0x2540f7,{'appCode':_0x24f8cd,'scopes':_0x57d829,'code':_0x4c0aa,'source':_0x179722(0x125)});}}for(const _0x269735 of _0x4d7a66[_0x179722(0x11e)]){for(const _0x2d89a5 of localSkillLinkCandidates(_0x269735,_0x4d7a66,_0x57d829)){collectLocalRuntimeSkill(_0x1d911,_0x2d89a5,{'appCode':_0x24f8cd,'scopes':_0x57d829,'code':_0x4c0aa,'source':'link','linkedPath':_0x2d89a5});}}return Array[_0x179722(0x11f)](_0x1d911[_0x179722(0x126)]())[_0x179722(0x123)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x114be0){const _0x3f039f=a116_0x54a5;if(!existsSync(_0x114be0))return[];return readdirSync(_0x114be0,{'withFileTypes':!![]})['filter'](_0x91a33=>_0x91a33[_0x3f039f(0x11a)]()||_0x91a33[_0x3f039f(0x133)]())[_0x3f039f(0x10e)](_0x13d723=>resolve(_0x114be0,_0x13d723[_0x3f039f(0x10d)]));}function localSkillLinkCandidates(_0x31705c,_0x3ef009,_0x3adbe9){const _0x21af29=a116_0x54a5;if(!existsSync(_0x31705c))return[];const _0x149ef4=_0x3ef009[_0x21af29(0x11b)]+'--';return readdirSync(_0x31705c,{'withFileTypes':!![]})['filter'](_0x399832=>_0x399832['isDirectory']()||_0x399832[_0x21af29(0x133)]())['filter'](_0x456d9b=>_0x3ef009[_0x21af29(0x12c)]===_0x21af29(0x134)||_0x456d9b[_0x21af29(0x10d)]['startsWith'](_0x149ef4)||_0x3adbe9['has'](_0x21af29(0x128)))['map'](_0x39abe3=>resolve(_0x31705c,_0x39abe3[_0x21af29(0x10d)]));}function collectLocalRuntimeSkill(_0x26da28,_0x518eb3,_0x3f2cd8){const _0x4c1a1a=a116_0x54a5,_0xfa9795=resolve(_0x518eb3,METADATA_FILE),_0x350724=readMetadataIfPresent(_0xfa9795);if(!_0x350724)return;if(_0x350724[_0x4c1a1a(0x11b)]!==_0x3f2cd8[_0x4c1a1a(0x11b)])return;if(!isRuntimeSkillScope(_0x350724[_0x4c1a1a(0x12c)])||!_0x3f2cd8['scopes']['has'](_0x350724[_0x4c1a1a(0x12c)]))return;const _0xf95cab=_0x350724[_0x4c1a1a(0x110)]?.[_0x4c1a1a(0x12f)]();if(!_0xf95cab)return;if(_0x3f2cd8[_0x4c1a1a(0x118)]&&_0xf95cab!==_0x3f2cd8[_0x4c1a1a(0x118)])return;const _0x8b2caa=_0x350724['scope']+':'+_0xf95cab,_0x565a7a=_0x3f2cd8[_0x4c1a1a(0x122)]?[_0x3f2cd8['linkedPath']]:[],_0x4869a7=_0x26da28[_0x4c1a1a(0x121)](_0x8b2caa);if(_0x4869a7){_0x3f2cd8[_0x4c1a1a(0x12d)]===_0x4c1a1a(0x125)&&(_0x4869a7['dir']=_0x518eb3,_0x4869a7[_0x4c1a1a(0x127)]=_0x518eb3,_0x4869a7[_0x4c1a1a(0x137)]=resolve(_0x518eb3,SKILL_FILE),_0x4869a7[_0x4c1a1a(0x12e)]=_0xfa9795);for(const _0x3c5bab of _0x565a7a){!_0x4869a7[_0x4c1a1a(0x112)]['includes'](_0x3c5bab)&&_0x4869a7[_0x4c1a1a(0x112)][_0x4c1a1a(0x114)](_0x3c5bab);}_0x4869a7[_0x4c1a1a(0x112)][_0x4c1a1a(0x123)]();return;}_0x26da28[_0x4c1a1a(0x113)](_0x8b2caa,{..._0x350724,'tags':Array[_0x4c1a1a(0x117)](_0x350724[_0x4c1a1a(0x11d)])?_0x350724[_0x4c1a1a(0x11d)]:[],'scope':_0x350724[_0x4c1a1a(0x12c)],'source':_0x4c1a1a(0x111),'dir':_0x518eb3,'cacheDir':_0x3f2cd8['source']===_0x4c1a1a(0x125)?_0x518eb3:undefined,'skillMdPath':resolve(_0x518eb3,SKILL_FILE),'metadataPath':_0xfa9795,'linkedPaths':_0x565a7a});}function a116_0x54a5(_0x494748,_0x485789){_0x494748=_0x494748-0x10c;const _0x57def1=a116_0x57de();let _0x54a569=_0x57def1[_0x494748];return _0x54a569;}function compareLocalRuntimeSkills(_0x5146ef,_0x34aac8){const _0x3aa1fb=a116_0x54a5,_0x1a93f3={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1a93f3[_0x5146ef[_0x3aa1fb(0x12c)]]-_0x1a93f3[_0x34aac8['scope']]||_0x5146ef[_0x3aa1fb(0x110)]['localeCompare'](_0x34aac8[_0x3aa1fb(0x110)])||_0x5146ef[_0x3aa1fb(0x135)][_0x3aa1fb(0x10c)](_0x34aac8[_0x3aa1fb(0x135)]);}
@@ -1 +1 @@
1
- (function(_0x247886,_0x26363b){const _0x3aea77=a117_0x851b,_0x2c2725=_0x247886();while(!![]){try{const _0xcb319a=-parseInt(_0x3aea77(0x11c))/0x1*(-parseInt(_0x3aea77(0x114))/0x2)+parseInt(_0x3aea77(0x138))/0x3+parseInt(_0x3aea77(0x12d))/0x4+parseInt(_0x3aea77(0x13a))/0x5+parseInt(_0x3aea77(0x11f))/0x6+-parseInt(_0x3aea77(0x130))/0x7+-parseInt(_0x3aea77(0x139))/0x8;if(_0xcb319a===_0x26363b)break;else _0x2c2725['push'](_0x2c2725['shift']());}catch(_0x5b0960){_0x2c2725['push'](_0x2c2725['shift']());}}}(a117_0x1a85,0x3ace9));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(_0x2dc873){const _0x2dacf5=a117_0x851b;return _0x2dc873['bytes']??Buffer['from'](_0x2dc873[_0x2dacf5(0x12e)]??'','utf8');}export function fileText(_0x4da8bd){const _0x1fe6a1=a117_0x851b;return fileContent(_0x4da8bd)[_0x1fe6a1(0x128)](_0x1fe6a1(0x127));}export function normalizeLocalFiles(_0x4d4711){const _0x453007=a117_0x851b;if(!Array[_0x453007(0x11a)](_0x4d4711)||_0x4d4711[_0x453007(0x137)]===0x0)return[];const _0x59f124=new Map();for(const _0x54110a of _0x4d4711){if(!_0x54110a||typeof _0x54110a!==_0x453007(0x12f)||typeof _0x54110a[_0x453007(0x12b)]!==_0x453007(0x134))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2bafad=normalizeSkillRelativePath(_0x54110a[_0x453007(0x12b)]);if(_0x59f124[_0x453007(0x125)](_0x2bafad))throw CliErrors[_0x453007(0x119)](_0x453007(0x115)+_0x2bafad);if(_0x54110a['bytes']!==undefined&&!Buffer['isBuffer'](_0x54110a['bytes']))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x2bafad);if(_0x54110a[_0x453007(0x133)]===undefined&&typeof _0x54110a[_0x453007(0x12e)]!==_0x453007(0x134))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x2bafad);const _0x2cb502=fileContent(_0x54110a);_0x59f124[_0x453007(0x123)](_0x2bafad,{'path':_0x2bafad,'bytes':_0x2cb502});}return Array[_0x453007(0x122)](_0x59f124[_0x453007(0x11e)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3fca0c){const _0x34cdb6=a117_0x851b;if(!Array[_0x34cdb6(0x11a)](_0x3fca0c)||_0x3fca0c[_0x34cdb6(0x137)]===0x0)return[];const _0x3082da=new Map();for(const _0x42b1f1 of _0x3fca0c){if(!_0x42b1f1||typeof _0x42b1f1!=='object'||typeof _0x42b1f1[_0x34cdb6(0x12b)]!==_0x34cdb6(0x134))throw CliErrors[_0x34cdb6(0x119)](_0x34cdb6(0x117));const _0x4de87c=normalizeSkillRelativePath(_0x42b1f1[_0x34cdb6(0x12b)]);if(_0x3082da[_0x34cdb6(0x125)](_0x4de87c))throw CliErrors[_0x34cdb6(0x119)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x4de87c);if(!isSha256Hex(_0x42b1f1[_0x34cdb6(0x13b)]))throw CliErrors[_0x34cdb6(0x119)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x4de87c);if(!Number['isSafeInteger'](_0x42b1f1[_0x34cdb6(0x132)])||_0x42b1f1[_0x34cdb6(0x132)]<0x0)throw CliErrors['validation']('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x4de87c);_0x3082da['set'](_0x4de87c,{'path':_0x4de87c,'sha256':_0x42b1f1[_0x34cdb6(0x13b)][_0x34cdb6(0x118)](),'size':_0x42b1f1[_0x34cdb6(0x132)]});}return Array['from'](_0x3082da['values']())[_0x34cdb6(0x136)](compareSkillFiles);}export function scanSkillDirectory(_0x4d3ea2,_0xa7f9a4={}){const _0x4e681d=a117_0x851b,_0x38a5a4=realpathSync(_0x4d3ea2),_0x2e3d6f=canonicalExcludedFilePaths(_0xa7f9a4[_0x4e681d(0x116)]),_0x2cfa0d=[];function _0x53d416(_0x52612d){const _0x3d8f7b=_0x4e681d,_0x40e88c=readdirSync(_0x52612d,{'withFileTypes':!![]})['sort']((_0xd68e34,_0x646bfd)=>_0xd68e34['name'][_0x3d8f7b(0x129)](_0x646bfd[_0x3d8f7b(0x120)]));for(const _0x53507c of _0x40e88c){if(_0x53507c[_0x3d8f7b(0x113)]()&&IGNORED_DIR_NAMES[_0x3d8f7b(0x125)](_0x53507c[_0x3d8f7b(0x120)]))continue;if(IGNORED_FILE_NAMES[_0x3d8f7b(0x125)](_0x53507c[_0x3d8f7b(0x120)]))continue;const _0x2e715d=resolve(_0x52612d,_0x53507c[_0x3d8f7b(0x120)]);if(isExcludedFilePath(_0x2e715d,_0x2e3d6f))continue;if(_0x53507c[_0x3d8f7b(0x12a)]())throw CliErrors[_0x3d8f7b(0x119)](_0x3d8f7b(0x124)+_0x2e715d);const _0x5b386e=toPosixPath(relative(_0x38a5a4,_0x2e715d));if(_0x53507c[_0x3d8f7b(0x113)]()){_0x53d416(_0x2e715d);continue;}if(!_0x53507c['isFile']())continue;validateSkillRelativePath(_0x5b386e);const _0x4b81d4=readFileSync(_0x2e715d);_0x2cfa0d[_0x3d8f7b(0x11d)]({'path':_0x5b386e,'bytes':_0x4b81d4});}}return _0x53d416(_0x38a5a4),normalizeLocalFiles(_0x2cfa0d);}function a117_0x1a85(){const _0x37b38e=['isDirectory','286tXNmGx','Duplicate\x20Skill\x20file\x20path:\x20','excludedFilePaths','Skill\x20file\x20path\x20must\x20be\x20text.','toLowerCase','validation','isArray','Unsafe\x20Skill\x20file\x20path:\x20','1941OTjErl','push','values','1723692NTKtci','name','startsWith','from','set','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','has','includes','utf8','toString','localeCompare','isSymbolicLink','path','test','895816XewCPA','content','object','3158099FwRPxS','trim','size','bytes','string','compare','sort','length','78429FPnXbU','4746144qqQRrq','2351780XbSAEo','sha256','add'];a117_0x1a85=function(){return _0x37b38e;};return a117_0x1a85();}function canonicalExcludedFilePaths(_0x48511f){const _0xaac9e3=a117_0x851b,_0x56658a=new Set();for(const _0x56773d of _0x48511f??[]){const _0x16ea4b=resolve(_0x56773d);_0x56658a['add'](_0x16ea4b);try{_0x56658a[_0xaac9e3(0x112)](realpathSync(_0x16ea4b));}catch{}}return _0x56658a;}function isExcludedFilePath(_0x2b3d23,_0x5e15b1){const _0xda1d4f=a117_0x851b;if(_0x5e15b1[_0xda1d4f(0x125)](_0x2b3d23))return!![];if(_0x5e15b1[_0xda1d4f(0x132)]===0x0)return![];try{return _0x5e15b1['has'](realpathSync(_0x2b3d23));}catch{return![];}}export function compareSkillFiles(_0x1cffe1,_0x538d4f){const _0x3bbf1d=a117_0x851b;if(_0x1cffe1[_0x3bbf1d(0x12b)]===SKILL_FILE)return _0x538d4f['path']===SKILL_FILE?0x0:-0x1;if(_0x538d4f[_0x3bbf1d(0x12b)]===SKILL_FILE)return 0x1;return Buffer[_0x3bbf1d(0x135)](Buffer[_0x3bbf1d(0x122)](_0x1cffe1[_0x3bbf1d(0x12b)],'utf8'),Buffer['from'](_0x538d4f[_0x3bbf1d(0x12b)],_0x3bbf1d(0x127)));}export function normalizeSkillRelativePath(_0x1b8758){const _0x209131=a117_0x851b,_0x59254e=toPosixPath(_0x1b8758[_0x209131(0x131)]());return validateSkillRelativePath(_0x59254e),_0x59254e;}export function validateSkillRelativePath(_0x3dc2a3){const _0x34ca70=a117_0x851b;if(!_0x3dc2a3||_0x3dc2a3[_0x34ca70(0x121)]('/')||_0x3dc2a3[_0x34ca70(0x126)]('//'))throw CliErrors[_0x34ca70(0x119)](_0x34ca70(0x11b)+_0x3dc2a3);for(const _0x1b48f1 of _0x3dc2a3['split']('/')){if(!_0x1b48f1||_0x1b48f1==='.'||_0x1b48f1==='..')throw CliErrors[_0x34ca70(0x119)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x3dc2a3);}}function a117_0x851b(_0x33d937,_0x403d7f){_0x33d937=_0x33d937-0x112;const _0x1a85f9=a117_0x1a85();let _0x851b75=_0x1a85f9[_0x33d937];return _0x851b75;}export function toPosixPath(_0x1eead9){return _0x1eead9['replace'](/\\/g,'/');}export function isSha256Hex(_0x5b3543){const _0x3440db=a117_0x851b;return typeof _0x5b3543===_0x3440db(0x134)&&/^[a-fA-F0-9]{64}$/[_0x3440db(0x12c)](_0x5b3543);}
1
+ (function(_0x440e2a,_0x4a9513){const _0x4db76f=a117_0x1a9d,_0x28a747=_0x440e2a();while(!![]){try{const _0x3242f9=parseInt(_0x4db76f(0x165))/0x1+-parseInt(_0x4db76f(0x174))/0x2*(parseInt(_0x4db76f(0x16e))/0x3)+-parseInt(_0x4db76f(0x161))/0x4+parseInt(_0x4db76f(0x150))/0x5+-parseInt(_0x4db76f(0x157))/0x6+-parseInt(_0x4db76f(0x167))/0x7*(parseInt(_0x4db76f(0x160))/0x8)+parseInt(_0x4db76f(0x153))/0x9*(parseInt(_0x4db76f(0x14d))/0xa);if(_0x3242f9===_0x4a9513)break;else _0x28a747['push'](_0x28a747['shift']());}catch(_0x1843bd){_0x28a747['push'](_0x28a747['shift']());}}}(a117_0x5073,0xbf140));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(_0x5e1cfe){const _0x3bd1cc=a117_0x1a9d;return _0x5e1cfe[_0x3bd1cc(0x164)]??Buffer[_0x3bd1cc(0x16f)](_0x5e1cfe[_0x3bd1cc(0x168)]??'','utf8');}export function fileText(_0x4ee0de){const _0xb0003=a117_0x1a9d;return fileContent(_0x4ee0de)[_0xb0003(0x15c)](_0xb0003(0x156));}export function normalizeLocalFiles(_0x101a30){const _0x1aa80e=a117_0x1a9d;if(!Array[_0x1aa80e(0x14f)](_0x101a30)||_0x101a30[_0x1aa80e(0x172)]===0x0)return[];const _0x10aec1=new Map();for(const _0x451120 of _0x101a30){if(!_0x451120||typeof _0x451120!=='object'||typeof _0x451120[_0x1aa80e(0x173)]!==_0x1aa80e(0x151))throw CliErrors[_0x1aa80e(0x162)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x4ce23f=normalizeSkillRelativePath(_0x451120[_0x1aa80e(0x173)]);if(_0x10aec1[_0x1aa80e(0x178)](_0x4ce23f))throw CliErrors[_0x1aa80e(0x162)](_0x1aa80e(0x16c)+_0x4ce23f);if(_0x451120[_0x1aa80e(0x164)]!==undefined&&!Buffer[_0x1aa80e(0x16a)](_0x451120[_0x1aa80e(0x164)]))throw CliErrors[_0x1aa80e(0x162)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x4ce23f);if(_0x451120[_0x1aa80e(0x164)]===undefined&&typeof _0x451120['content']!==_0x1aa80e(0x151))throw CliErrors[_0x1aa80e(0x162)](_0x1aa80e(0x171)+_0x4ce23f);const _0x5352c7=fileContent(_0x451120);_0x10aec1['set'](_0x4ce23f,{'path':_0x4ce23f,'bytes':_0x5352c7});}return Array[_0x1aa80e(0x16f)](_0x10aec1[_0x1aa80e(0x158)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x1fb0a3){const _0x2a3e78=a117_0x1a9d;if(!Array['isArray'](_0x1fb0a3)||_0x1fb0a3[_0x2a3e78(0x172)]===0x0)return[];const _0x108b2f=new Map();for(const _0x47aab7 of _0x1fb0a3){if(!_0x47aab7||typeof _0x47aab7!==_0x2a3e78(0x14b)||typeof _0x47aab7[_0x2a3e78(0x173)]!==_0x2a3e78(0x151))throw CliErrors[_0x2a3e78(0x162)](_0x2a3e78(0x166));const _0x375220=normalizeSkillRelativePath(_0x47aab7[_0x2a3e78(0x173)]);if(_0x108b2f[_0x2a3e78(0x178)](_0x375220))throw CliErrors['validation'](_0x2a3e78(0x16c)+_0x375220);if(!isSha256Hex(_0x47aab7[_0x2a3e78(0x163)]))throw CliErrors[_0x2a3e78(0x162)](_0x2a3e78(0x15a)+_0x375220);if(!Number[_0x2a3e78(0x15d)](_0x47aab7[_0x2a3e78(0x176)])||_0x47aab7['size']<0x0)throw CliErrors[_0x2a3e78(0x162)](_0x2a3e78(0x177)+_0x375220);_0x108b2f['set'](_0x375220,{'path':_0x375220,'sha256':_0x47aab7['sha256']['toLowerCase'](),'size':_0x47aab7[_0x2a3e78(0x176)]});}return Array[_0x2a3e78(0x16f)](_0x108b2f['values']())[_0x2a3e78(0x15b)](compareSkillFiles);}function a117_0x5073(){const _0x564f8a=['toString','isSafeInteger','includes','split','80VTiFxK','377580MJXvwI','validation','sha256','bytes','129032OtgLXN','Skill\x20file\x20path\x20must\x20be\x20text.','375571tuPbMl','content','replace','isBuffer','test','Duplicate\x20Skill\x20file\x20path:\x20','add','1075461NrzCSW','from','startsWith','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','path','4xxIlFX','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','size','Skill\x20file\x20size\x20is\x20invalid:\x20','has','isFile','object','Unsafe\x20Skill\x20file\x20path:\x20','1712110mWmIZq','push','isArray','4125185FznaSB','string','excludedFilePaths','126kXbftL','localeCompare','isDirectory','utf8','7322808mRLMJg','values','name','Skill\x20file\x20sha256\x20is\x20invalid:\x20','sort'];a117_0x5073=function(){return _0x564f8a;};return a117_0x5073();}export function scanSkillDirectory(_0x534ed9,_0xbfdaca={}){const _0xc112fa=a117_0x1a9d,_0xad3d4d=realpathSync(_0x534ed9),_0x3e35e4=canonicalExcludedFilePaths(_0xbfdaca[_0xc112fa(0x152)]),_0x360ae7=[];function _0x5b9eba(_0x7c9fe){const _0x45b557=_0xc112fa,_0x2a34ab=readdirSync(_0x7c9fe,{'withFileTypes':!![]})[_0x45b557(0x15b)]((_0x9f0e66,_0x2a3b6b)=>_0x9f0e66[_0x45b557(0x159)][_0x45b557(0x154)](_0x2a3b6b[_0x45b557(0x159)]));for(const _0x4d387e of _0x2a34ab){if(_0x4d387e[_0x45b557(0x155)]()&&IGNORED_DIR_NAMES['has'](_0x4d387e['name']))continue;if(IGNORED_FILE_NAMES['has'](_0x4d387e[_0x45b557(0x159)]))continue;const _0x3376fc=resolve(_0x7c9fe,_0x4d387e[_0x45b557(0x159)]);if(isExcludedFilePath(_0x3376fc,_0x3e35e4))continue;if(_0x4d387e['isSymbolicLink']())throw CliErrors[_0x45b557(0x162)](_0x45b557(0x175)+_0x3376fc);const _0x2dd9b2=toPosixPath(relative(_0xad3d4d,_0x3376fc));if(_0x4d387e[_0x45b557(0x155)]()){_0x5b9eba(_0x3376fc);continue;}if(!_0x4d387e[_0x45b557(0x179)]())continue;validateSkillRelativePath(_0x2dd9b2);const _0x5cf690=readFileSync(_0x3376fc);_0x360ae7[_0x45b557(0x14e)]({'path':_0x2dd9b2,'bytes':_0x5cf690});}}return _0x5b9eba(_0xad3d4d),normalizeLocalFiles(_0x360ae7);}function canonicalExcludedFilePaths(_0x121a59){const _0x5d803f=a117_0x1a9d,_0x6dc818=new Set();for(const _0x3bbdc8 of _0x121a59??[]){const _0x34472a=resolve(_0x3bbdc8);_0x6dc818[_0x5d803f(0x16d)](_0x34472a);try{_0x6dc818[_0x5d803f(0x16d)](realpathSync(_0x34472a));}catch{}}return _0x6dc818;}function isExcludedFilePath(_0x29eac9,_0x179590){const _0x573068=a117_0x1a9d;if(_0x179590['has'](_0x29eac9))return!![];if(_0x179590[_0x573068(0x176)]===0x0)return![];try{return _0x179590[_0x573068(0x178)](realpathSync(_0x29eac9));}catch{return![];}}export function compareSkillFiles(_0x52e914,_0x4431d4){const _0x4ad293=a117_0x1a9d;if(_0x52e914[_0x4ad293(0x173)]===SKILL_FILE)return _0x4431d4[_0x4ad293(0x173)]===SKILL_FILE?0x0:-0x1;if(_0x4431d4[_0x4ad293(0x173)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x4ad293(0x16f)](_0x52e914[_0x4ad293(0x173)],_0x4ad293(0x156)),Buffer[_0x4ad293(0x16f)](_0x4431d4[_0x4ad293(0x173)],_0x4ad293(0x156)));}export function normalizeSkillRelativePath(_0x49ad39){const _0x338bdd=toPosixPath(_0x49ad39['trim']());return validateSkillRelativePath(_0x338bdd),_0x338bdd;}export function validateSkillRelativePath(_0x46e817){const _0x2f18d1=a117_0x1a9d;if(!_0x46e817||_0x46e817[_0x2f18d1(0x170)]('/')||_0x46e817[_0x2f18d1(0x15e)]('//'))throw CliErrors[_0x2f18d1(0x162)](_0x2f18d1(0x14c)+_0x46e817);for(const _0x449e0f of _0x46e817[_0x2f18d1(0x15f)]('/')){if(!_0x449e0f||_0x449e0f==='.'||_0x449e0f==='..')throw CliErrors['validation'](_0x2f18d1(0x14c)+_0x46e817);}}function a117_0x1a9d(_0x565ed2,_0x5edc98){_0x565ed2=_0x565ed2-0x14b;const _0x50738d=a117_0x5073();let _0x1a9d6b=_0x50738d[_0x565ed2];return _0x1a9d6b;}export function toPosixPath(_0x2f0c0e){const _0x21a7a5=a117_0x1a9d;return _0x2f0c0e[_0x21a7a5(0x169)](/\\/g,'/');}export function isSha256Hex(_0x17afb4){const _0x5781ed=a117_0x1a9d;return typeof _0x17afb4===_0x5781ed(0x151)&&/^[a-fA-F0-9]{64}$/[_0x5781ed(0x16b)](_0x17afb4);}
@@ -1 +1 @@
1
- (function(_0x59c53c,_0x1d685b){const _0x3bc9ba=a118_0x2c54,_0x2a2fa5=_0x59c53c();while(!![]){try{const _0x3a2a93=-parseInt(_0x3bc9ba(0xef))/0x1+-parseInt(_0x3bc9ba(0x115))/0x2+parseInt(_0x3bc9ba(0xf0))/0x3*(parseInt(_0x3bc9ba(0xf8))/0x4)+parseInt(_0x3bc9ba(0xf5))/0x5*(-parseInt(_0x3bc9ba(0xe5))/0x6)+parseInt(_0x3bc9ba(0xfe))/0x7+-parseInt(_0x3bc9ba(0xee))/0x8+parseInt(_0x3bc9ba(0xed))/0x9*(parseInt(_0x3bc9ba(0xff))/0xa);if(_0x3a2a93===_0x1d685b)break;else _0x2a2fa5['push'](_0x2a2fa5['shift']());}catch(_0x3f9fa9){_0x2a2fa5['push'](_0x2a2fa5['shift']());}}}(a118_0x3227,0xba021));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x19a30e,_0x4d4873,_0x25b3ac){const _0x315ccc=a118_0x2c54,_0x4cdd76=requireSkillCode(_0x19a30e),_0x424dcc=requirePackageBytes(_0x4cdd76,_0x25b3ac[_0x315ccc(0xe4)]),_0xd06cad=extractDownloadedPackage(_0x424dcc),_0x305ae8=_0xd06cad[_0x315ccc(0x109)](_0x2d4254=>_0x2d4254['path']===SKILL_FILE);if(!_0x305ae8)throw CliErrors[_0x315ccc(0xeb)](_0x315ccc(0x110)+SKILL_FILE+':\x20'+_0x4cdd76);const _0x2ae81b=withMaterializedSkillFrontmatter(_0xd06cad,_0x19a30e,_0x4cdd76),_0x22b9c3=_0x2ae81b['find'](_0x1b5248=>_0x1b5248['path']===SKILL_FILE),_0x1cd86d=fileText(_0x22b9c3),_0x35174b=getRuntimeSkillDir(_0x25b3ac[_0x315ccc(0x113)],_0x25b3ac[_0x315ccc(0x104)],_0x25b3ac[_0x315ccc(0xfc)],_0x4d4873,_0x4cdd76,_0x25b3ac[_0x315ccc(0xfd)]),_0x37508a=resolve(_0x35174b,SKILL_FILE),_0xc2318b=resolve(_0x35174b,METADATA_FILE),_0x49e724=contentHash(_0x1cd86d),_0x2eaede=readMetadataIfPresent(_0xc2318b)?.[_0x315ccc(0xf1)];ensurePulledFilesCanBeOverwritten(_0x35174b,_0xc2318b,_0x2ae81b,_0x25b3ac[_0x315ccc(0xe6)]===!![]),mkdirSync(_0x35174b,{'recursive':!![],'mode':0x1c0});const _0x1dd87f=existsSync(_0x37508a)?readFileSync(_0x37508a,_0x315ccc(0x103)):undefined;return materializeFiles(_0x35174b,_0x2ae81b),removeStaleManagedFiles(_0x35174b,_0x2eaede,_0x2ae81b),writeJsonAtomic(_0xc2318b,buildMetadata(_0x19a30e,_0x4d4873,_0x25b3ac[_0x315ccc(0xfc)],_0x49e724,_0x25b3ac[_0x315ccc(0x105)],_0x2ae81b,_0x424dcc)),{'skill':_0x19a30e,'scope':_0x4d4873,'dir':_0x35174b,'skillMdPath':_0x37508a,'metadataPath':_0xc2318b,'contentHash':_0x49e724,'changed':_0x1dd87f!==_0x1cd86d};}function withMaterializedSkillFrontmatter(_0x4ae217,_0x564277,_0x1a9511){const _0x2968c4=a118_0x2c54,_0x2a45e0=skillDisplayName(_0x564277,_0x1a9511),_0x13429a=_0x564277['description']?.[_0x2968c4(0x10c)]()||_0x2a45e0||_0x1a9511;return normalizeLocalFiles(_0x4ae217)[_0x2968c4(0xe8)](_0x212030=>{const _0x301480=fileText(_0x212030);if(_0x212030['path']!==SKILL_FILE)return _0x212030;if(hasYamlFrontmatter(_0x301480))return{'path':_0x212030['path'],'content':withSyncedDisplayName(_0x301480,_0x2a45e0)};return{'path':_0x212030['path'],'content':prependSkillFrontmatter(_0x301480,{'name':_0x1a9511,'displayName':_0x2a45e0,'description':_0x13429a})};});}function hasYamlFrontmatter(_0x3a32be){const _0x3de6e7=a118_0x2c54;return/^\uFEFF?---\s*\r?\n/[_0x3de6e7(0x118)](_0x3a32be);}function prependSkillFrontmatter(_0x2527a6,_0x227f05){const _0x3beb78=a118_0x2c54,_0x171870=_0x2527a6['replace'](/^\uFEFF/,'');return['---',_0x3beb78(0x107)+yamlString(_0x227f05[_0x3beb78(0xf4)]),_0x227f05[_0x3beb78(0x112)]?'displayName:\x20'+yamlString(_0x227f05['displayName']):undefined,_0x3beb78(0xe7)+yamlString(_0x227f05['description']),_0x3beb78(0x108),'',_0x171870]['filter'](_0x3f3490=>_0x3f3490!==undefined)['join']('\x0a');}function yamlString(_0x234fd0){const _0x573132=a118_0x2c54;return JSON[_0x573132(0xe9)](_0x234fd0[_0x573132(0x10b)](/\r/g,'')[_0x573132(0x10c)]());}function skillDisplayName(_0x1f90de,_0x4512f7){const _0x183018=a118_0x2c54,_0x2a6558=_0x1f90de[_0x183018(0xea)]?.['trim']();return _0x2a6558||_0x4512f7;}function withSyncedDisplayName(_0x20a5c7,_0x5d2437){const _0x451892=a118_0x2c54,_0x5641c1=_0x20a5c7[_0x451892(0xfa)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5641c1)return _0x20a5c7;const _0x569fdc=_0x5641c1[0x1]??'',_0x1ff457=_0x5641c1[0x2]??'',_0x2deb52=parseDocument(_0x1ff457);if(_0x2deb52[_0x451892(0xf7)][_0x451892(0x116)]>0x0||!isMap(_0x2deb52['contents']))return _0x20a5c7;if(_0x5d2437)_0x2deb52['set'](_0x451892(0x112),_0x5d2437);else{if(_0x2deb52[_0x451892(0xec)](_0x451892(0x112)))_0x2deb52[_0x451892(0xf2)](_0x451892(0x112));else return _0x20a5c7;}forceBlockCollections(_0x2deb52['contents']);const _0x860ab1=_0x2deb52['toString']({'lineWidth':0x0})[_0x451892(0x10d)](),_0x474be1=_0x20a5c7[_0x451892(0xfb)](_0x5641c1[0x0][_0x451892(0x116)])[_0x451892(0x10b)](/^\r?\n/,'');return _0x569fdc+_0x451892(0x10e)+_0x860ab1+_0x451892(0xf3)+_0x474be1;}function a118_0x3227(){const _0x511610=['2202102tBcDjY','11444056MrfmbB','813603uWnNZq','3bvUNCv','fileHashes','delete','\x0a---\x0a\x0a','name','254455iYlMAK','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','errors','5175908nywydJ','keys','match','slice','appCode','paths','10084662WHcDjo','70QxFcsy','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','utf8','accessKey','pulledAt','contentHash','name:\x20','---','find','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','replace','trim','trimEnd','---\x0a','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','path','displayName','env','isFile','1457832AKzyLZ','length','Managed\x20file\x20was\x20removed\x20locally:\x20','test','packageBytes','84ySZOLC','force','description:\x20','map','stringify','skillName','validation','has'];a118_0x3227=function(){return _0x511610;};return a118_0x3227();}function a118_0x2c54(_0x28bbd0,_0x349f0e){_0x28bbd0=_0x28bbd0-0xe4;const _0x322745=a118_0x3227();let _0x2c5497=_0x322745[_0x28bbd0];return _0x2c5497;}function forceBlockCollections(_0x2d2c91){if(!isNode(_0x2d2c91))return;visit(_0x2d2c91,(_0xf59e26,_0x9645a0)=>{isCollection(_0x9645a0)&&(_0x9645a0['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2c0557,_0x11f79e,_0x190a49,_0x4350bb){const _0x1c5678=a118_0x2c54;if(_0x4350bb||!existsSync(_0x11f79e))return;const _0x1fe286=readMetadataIfPresent(_0x11f79e);if(!_0x1fe286)return;const _0xc82402=_0x1fe286[_0x1c5678(0xf1)]&&Object[_0x1c5678(0xf9)](_0x1fe286['fileHashes'])[_0x1c5678(0x116)]>0x0?_0x1fe286[_0x1c5678(0xf1)]:undefined;if(_0xc82402)for(const [_0x234ed5,_0x4459cb]of Object['entries'](_0xc82402)){const _0x341d87=resolveManagedFilePath(_0x2c0557,_0x234ed5);if(!existsSync(_0x341d87))throw CliErrors['validation'](_0x1c5678(0x10a)+_0x2c0557,_0x1c5678(0x117)+_0x234ed5);const _0x4bcbff=lstatSync(_0x341d87);if(!_0x4bcbff[_0x1c5678(0x114)]())throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10a)+_0x2c0557,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x234ed5);const _0x3610e2=bufferSha256(readFileSync(_0x341d87));if(_0x3610e2!==_0x4459cb)throw CliErrors['validation'](_0x1c5678(0x10a)+_0x2c0557+_0x1c5678(0x101)+_0x234ed5,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x234ed5);}else{const _0x539d81=resolve(_0x2c0557,SKILL_FILE);if(existsSync(_0x539d81)&&_0x1fe286[_0x1c5678(0x106)]){const _0x373c76=contentHash(readFileSync(_0x539d81,'utf8'));if(_0x373c76!==_0x1fe286[_0x1c5678(0x106)])throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10f)+_0x539d81,_0x1c5678(0x102));}}for(const _0x1d9c9f of normalizeLocalFiles(_0x190a49)){if(_0xc82402?.[_0x1d9c9f[_0x1c5678(0x111)]])continue;if(!_0xc82402&&_0x1d9c9f['path']===SKILL_FILE)continue;const _0x4ba829=resolveManagedFilePath(_0x2c0557,_0x1d9c9f[_0x1c5678(0x111)]);if(!existsSync(_0x4ba829))continue;const _0x1f7c4e=lstatSync(_0x4ba829);if(!_0x1f7c4e[_0x1c5678(0x114)]())throw CliErrors[_0x1c5678(0xeb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2c0557,_0x1c5678(0x100)+_0x1d9c9f[_0x1c5678(0x111)]);const _0x4b4ede=bufferSha256(readFileSync(_0x4ba829));if(_0x4b4ede!==fileHash(_0x1d9c9f))throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10a)+_0x2c0557,_0x1c5678(0xf6)+_0x1d9c9f[_0x1c5678(0x111)]);}}function materializeFiles(_0x311756,_0x2d8319){const _0x41a48a=a118_0x2c54;for(const _0x5ea83a of normalizeLocalFiles(_0x2d8319)){const _0x3ba8ac=resolveManagedFilePath(_0x311756,_0x5ea83a[_0x41a48a(0x111)]);mkdirSync(dirname(_0x3ba8ac),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3ba8ac,fileContent(_0x5ea83a),0x180);}}function removeStaleManagedFiles(_0x2c2d58,_0xe25c78,_0xa20fa4){const _0x55f9f7=a118_0x2c54;if(!_0xe25c78)return;const _0x14693c=new Set(normalizeLocalFiles(_0xa20fa4)[_0x55f9f7(0xe8)](_0x39b94d=>_0x39b94d[_0x55f9f7(0x111)]));for(const _0x4815bd of Object[_0x55f9f7(0xf9)](_0xe25c78)){if(_0x14693c[_0x55f9f7(0xec)](_0x4815bd))continue;const _0x456c8c=resolveManagedFilePath(_0x2c2d58,_0x4815bd);existsSync(_0x456c8c)&&lstatSync(_0x456c8c)[_0x55f9f7(0x114)]()&&rmSync(_0x456c8c,{'force':!![]});}}
1
+ (function(_0x5ff302,_0x5bbc41){const _0x3fc1c7=a118_0x5ae3,_0xca63e8=_0x5ff302();while(!![]){try{const _0x85b120=parseInt(_0x3fc1c7(0xa2))/0x1+parseInt(_0x3fc1c7(0xb1))/0x2+-parseInt(_0x3fc1c7(0xad))/0x3*(parseInt(_0x3fc1c7(0xa7))/0x4)+-parseInt(_0x3fc1c7(0x7c))/0x5*(-parseInt(_0x3fc1c7(0xac))/0x6)+-parseInt(_0x3fc1c7(0x85))/0x7*(parseInt(_0x3fc1c7(0x93))/0x8)+parseInt(_0x3fc1c7(0x86))/0x9*(parseInt(_0x3fc1c7(0x8b))/0xa)+-parseInt(_0x3fc1c7(0x8a))/0xb;if(_0x85b120===_0x5bbc41)break;else _0xca63e8['push'](_0xca63e8['shift']());}catch(_0x555b0f){_0xca63e8['push'](_0xca63e8['shift']());}}}(a118_0x1386,0x9ae9c));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x46a402,_0x144c9b,_0x3c25c7){const _0x12cb0d=a118_0x5ae3,_0x567c1c=requireSkillCode(_0x46a402),_0x33c62d=requirePackageBytes(_0x567c1c,_0x3c25c7[_0x12cb0d(0x7d)]),_0x1d6544=extractDownloadedPackage(_0x33c62d),_0x2fd24a=_0x1d6544[_0x12cb0d(0x83)](_0x393442=>_0x393442['path']===SKILL_FILE);if(!_0x2fd24a)throw CliErrors[_0x12cb0d(0x8c)](_0x12cb0d(0x9f)+SKILL_FILE+':\x20'+_0x567c1c);const _0x288ad7=withMaterializedSkillFrontmatter(_0x1d6544,_0x46a402,_0x567c1c),_0x9c7b54=_0x288ad7['find'](_0x11e7d1=>_0x11e7d1[_0x12cb0d(0x88)]===SKILL_FILE),_0x22b3bb=fileText(_0x9c7b54),_0x114713=getRuntimeSkillDir(_0x3c25c7[_0x12cb0d(0x94)],_0x3c25c7[_0x12cb0d(0x7b)],_0x3c25c7[_0x12cb0d(0xa3)],_0x144c9b,_0x567c1c,_0x3c25c7[_0x12cb0d(0x91)]),_0x19df0d=resolve(_0x114713,SKILL_FILE),_0x1f31b4=resolve(_0x114713,METADATA_FILE),_0x407280=contentHash(_0x22b3bb),_0x95bd26=readMetadataIfPresent(_0x1f31b4)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x114713,_0x1f31b4,_0x288ad7,_0x3c25c7[_0x12cb0d(0x96)]===!![]),mkdirSync(_0x114713,{'recursive':!![],'mode':0x1c0});const _0x4ee84f=existsSync(_0x19df0d)?readFileSync(_0x19df0d,_0x12cb0d(0xa4)):undefined;return materializeFiles(_0x114713,_0x288ad7),removeStaleManagedFiles(_0x114713,_0x95bd26,_0x288ad7),writeJsonAtomic(_0x1f31b4,buildMetadata(_0x46a402,_0x144c9b,_0x3c25c7['appCode'],_0x407280,_0x3c25c7[_0x12cb0d(0xa5)],_0x288ad7,_0x33c62d)),{'skill':_0x46a402,'scope':_0x144c9b,'dir':_0x114713,'skillMdPath':_0x19df0d,'metadataPath':_0x1f31b4,'contentHash':_0x407280,'changed':_0x4ee84f!==_0x22b3bb};}function withMaterializedSkillFrontmatter(_0x2a66c5,_0x1d5932,_0x3b3a0e){const _0x31c109=a118_0x5ae3,_0x233cae=skillDisplayName(_0x1d5932,_0x3b3a0e),_0x20300e=_0x1d5932[_0x31c109(0x95)]?.[_0x31c109(0x84)]()||_0x233cae||_0x3b3a0e;return normalizeLocalFiles(_0x2a66c5)[_0x31c109(0xa8)](_0x177eac=>{const _0x2c158d=_0x31c109,_0x4580b9=fileText(_0x177eac);if(_0x177eac[_0x2c158d(0x88)]!==SKILL_FILE)return _0x177eac;if(hasYamlFrontmatter(_0x4580b9))return{'path':_0x177eac['path'],'content':withSyncedDisplayName(_0x4580b9,_0x233cae)};return{'path':_0x177eac[_0x2c158d(0x88)],'content':prependSkillFrontmatter(_0x4580b9,{'name':_0x3b3a0e,'displayName':_0x233cae,'description':_0x20300e})};});}function hasYamlFrontmatter(_0xefc987){const _0x57374c=a118_0x5ae3;return/^\uFEFF?---\s*\r?\n/[_0x57374c(0x9e)](_0xefc987);}function a118_0x1386(){const _0x334492=['Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','28CtFSXI','map','has','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','6617154CUgRTr','381279PDLmvB','displayName','contentHash','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1088886dJVJBE','accessKey','5bSEdzU','packageBytes','displayName:\x20','keys','isFile','contents','name','find','trim','28cHaFmr','7391673gBCjXj','slice','path','fileHashes','11194788mRPYFw','10EoeOWW','validation','filter','flow','---\x0a','replace','paths','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','765552JCuKfL','env','description','force','match','join','---','length','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','trimEnd','entries','test','Runtime\x20Skill\x20package\x20is\x20missing\x20','toString','errors','456060fqDTxb','appCode','utf8','pulledAt'];a118_0x1386=function(){return _0x334492;};return a118_0x1386();}function prependSkillFrontmatter(_0x283e9c,_0x537511){const _0x459dee=a118_0x5ae3,_0x500053=_0x283e9c['replace'](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x537511[_0x459dee(0x82)]),_0x537511['displayName']?_0x459dee(0x7e)+yamlString(_0x537511[_0x459dee(0xae)]):undefined,_0x459dee(0xaa)+yamlString(_0x537511[_0x459dee(0x95)]),_0x459dee(0x99),'',_0x500053][_0x459dee(0x8d)](_0x56d312=>_0x56d312!==undefined)[_0x459dee(0x98)]('\x0a');}function yamlString(_0x4d007a){const _0xcde279=a118_0x5ae3;return JSON['stringify'](_0x4d007a[_0xcde279(0x90)](/\r/g,'')['trim']());}function skillDisplayName(_0x230a5b,_0xbfafb9){const _0x2a9984=a118_0x5ae3,_0x19ab4f=_0x230a5b['skillName']?.[_0x2a9984(0x84)]();return _0x19ab4f||_0xbfafb9;}function withSyncedDisplayName(_0x34c30e,_0xb04fdc){const _0x1b6d63=a118_0x5ae3,_0x11960f=_0x34c30e[_0x1b6d63(0x97)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x11960f)return _0x34c30e;const _0x3b44d7=_0x11960f[0x1]??'',_0x2a0461=_0x11960f[0x2]??'',_0x1c6957=parseDocument(_0x2a0461);if(_0x1c6957[_0x1b6d63(0xa1)][_0x1b6d63(0x9a)]>0x0||!isMap(_0x1c6957[_0x1b6d63(0x81)]))return _0x34c30e;if(_0xb04fdc)_0x1c6957['set'](_0x1b6d63(0xae),_0xb04fdc);else{if(_0x1c6957[_0x1b6d63(0xa9)](_0x1b6d63(0xae)))_0x1c6957['delete']('displayName');else return _0x34c30e;}forceBlockCollections(_0x1c6957[_0x1b6d63(0x81)]);const _0x5b47c2=_0x1c6957[_0x1b6d63(0xa0)]({'lineWidth':0x0})[_0x1b6d63(0x9c)](),_0x21e9d6=_0x34c30e[_0x1b6d63(0x87)](_0x11960f[0x0][_0x1b6d63(0x9a)])[_0x1b6d63(0x90)](/^\r?\n/,'');return _0x3b44d7+_0x1b6d63(0x8f)+_0x5b47c2+'\x0a---\x0a\x0a'+_0x21e9d6;}function a118_0x5ae3(_0x368113,_0x4c75af){_0x368113=_0x368113-0x7b;const _0x13863f=a118_0x1386();let _0x5ae31b=_0x13863f[_0x368113];return _0x5ae31b;}function forceBlockCollections(_0xfc9f07){if(!isNode(_0xfc9f07))return;visit(_0xfc9f07,(_0x1e0446,_0x23ed4a)=>{const _0x10dfdd=a118_0x5ae3;isCollection(_0x23ed4a)&&(_0x23ed4a[_0x10dfdd(0x8e)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x18c09d,_0x22beef,_0x392ec2,_0x27cee8){const _0x27ba56=a118_0x5ae3;if(_0x27cee8||!existsSync(_0x22beef))return;const _0x53cbc7=readMetadataIfPresent(_0x22beef);if(!_0x53cbc7)return;const _0x2cc91f=_0x53cbc7['fileHashes']&&Object['keys'](_0x53cbc7[_0x27ba56(0x89)])['length']>0x0?_0x53cbc7[_0x27ba56(0x89)]:undefined;if(_0x2cc91f)for(const [_0x48ea5b,_0x107176]of Object[_0x27ba56(0x9d)](_0x2cc91f)){const _0x50bf90=resolveManagedFilePath(_0x18c09d,_0x48ea5b);if(!existsSync(_0x50bf90))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x18c09d,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x48ea5b);const _0x1848a9=lstatSync(_0x50bf90);if(!_0x1848a9[_0x27ba56(0x80)]())throw CliErrors[_0x27ba56(0x8c)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x18c09d,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x48ea5b);const _0x40e7f2=bufferSha256(readFileSync(_0x50bf90));if(_0x40e7f2!==_0x107176)throw CliErrors['validation'](_0x27ba56(0x9b)+_0x18c09d+'.\x20Changed\x20file:\x20'+_0x48ea5b,_0x27ba56(0xa6)+_0x48ea5b);}else{const _0x5e06df=resolve(_0x18c09d,SKILL_FILE);if(existsSync(_0x5e06df)&&_0x53cbc7[_0x27ba56(0xaf)]){const _0x5b4641=contentHash(readFileSync(_0x5e06df,_0x27ba56(0xa4)));if(_0x5b4641!==_0x53cbc7[_0x27ba56(0xaf)])throw CliErrors[_0x27ba56(0x8c)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x5e06df,_0x27ba56(0xab));}}for(const _0x1a5f4d of normalizeLocalFiles(_0x392ec2)){if(_0x2cc91f?.[_0x1a5f4d[_0x27ba56(0x88)]])continue;if(!_0x2cc91f&&_0x1a5f4d['path']===SKILL_FILE)continue;const _0x24b44a=resolveManagedFilePath(_0x18c09d,_0x1a5f4d['path']);if(!existsSync(_0x24b44a))continue;const _0x272af9=lstatSync(_0x24b44a);if(!_0x272af9[_0x27ba56(0x80)]())throw CliErrors[_0x27ba56(0x8c)](_0x27ba56(0x9b)+_0x18c09d,_0x27ba56(0xb0)+_0x1a5f4d[_0x27ba56(0x88)]);const _0x204b22=bufferSha256(readFileSync(_0x24b44a));if(_0x204b22!==fileHash(_0x1a5f4d))throw CliErrors[_0x27ba56(0x8c)](_0x27ba56(0x9b)+_0x18c09d,_0x27ba56(0x92)+_0x1a5f4d[_0x27ba56(0x88)]);}}function materializeFiles(_0x369e12,_0xda518b){const _0x387b68=a118_0x5ae3;for(const _0x4da3a5 of normalizeLocalFiles(_0xda518b)){const _0x3ebe45=resolveManagedFilePath(_0x369e12,_0x4da3a5[_0x387b68(0x88)]);mkdirSync(dirname(_0x3ebe45),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3ebe45,fileContent(_0x4da3a5),0x180);}}function removeStaleManagedFiles(_0x2abdf4,_0x231ef9,_0x2462fe){const _0x958f28=a118_0x5ae3;if(!_0x231ef9)return;const _0x8348ef=new Set(normalizeLocalFiles(_0x2462fe)[_0x958f28(0xa8)](_0xa49b40=>_0xa49b40[_0x958f28(0x88)]));for(const _0x4effe4 of Object[_0x958f28(0x7f)](_0x231ef9)){if(_0x8348ef[_0x958f28(0xa9)](_0x4effe4))continue;const _0x3bf51e=resolveManagedFilePath(_0x2abdf4,_0x4effe4);existsSync(_0x3bf51e)&&lstatSync(_0x3bf51e)[_0x958f28(0x80)]()&&rmSync(_0x3bf51e,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x382cef,_0x449b25){const _0x58326e=a119_0x50d0,_0x55c829=_0x382cef();while(!![]){try{const _0x1d467a=-parseInt(_0x58326e(0x150))/0x1*(-parseInt(_0x58326e(0x155))/0x2)+parseInt(_0x58326e(0x152))/0x3*(parseInt(_0x58326e(0x143))/0x4)+parseInt(_0x58326e(0x134))/0x5+parseInt(_0x58326e(0x140))/0x6*(parseInt(_0x58326e(0x157))/0x7)+parseInt(_0x58326e(0x154))/0x8*(-parseInt(_0x58326e(0x151))/0x9)+parseInt(_0x58326e(0x148))/0xa*(-parseInt(_0x58326e(0x13d))/0xb)+parseInt(_0x58326e(0x158))/0xc;if(_0x1d467a===_0x449b25)break;else _0x55c829['push'](_0x55c829['shift']());}catch(_0xbe26d3){_0x55c829['push'](_0x55c829['shift']());}}}(a119_0x132f,0x99ed6));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a119_0x50d0(_0x57cbbf,_0xc2c5c9){_0x57cbbf=_0x57cbbf-0x134;const _0x132f61=a119_0x132f();let _0x50d072=_0x132f61[_0x57cbbf];return _0x50d072;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4f27a8,_0x359120,_0x1fe473,_0x1504bb,_0x1cbae0,_0xb0daec,_0xe2c20c){const _0x427028=a119_0x50d0,_0x5032b4=_0xb0daec?normalizeLocalFiles(_0xb0daec):[],_0x478f19=!_0xe2c20c&&_0x5032b4['length']>0x0?buildSkillPackage(_0x5032b4):undefined,_0x3c0c4b=_0xe2c20c?bufferSha256(_0xe2c20c):_0x478f19?.[_0x427028(0x147)][_0x427028(0x13f)],_0xf680fe=_0xe2c20c?.['length']??_0x478f19?.['manifest'][_0x427028(0x156)],_0x55c762=_0x5032b4[_0x427028(0x149)]>0x0?Object[_0x427028(0x14b)](_0x5032b4[_0x427028(0x136)](_0xcaecc3=>[_0xcaecc3[_0x427028(0x14a)],fileHash(_0xcaecc3)])):undefined;return{'schemaVersion':_0x5032b4[_0x427028(0x149)]>0x0?0x2:0x1,'id':_0x4f27a8['id'],'appCode':_0x1fe473,'skillCode':requireSkillCode(_0x4f27a8),'skillName':_0x4f27a8['skillName'],'description':_0x4f27a8[_0x427028(0x13c)],'scope':_0x359120,'readonly':_0x359120!==_0x427028(0x14e)||_0x4f27a8[_0x427028(0x14d)]===!![],'tenantCode':_0x4f27a8['tenantCode'],'userId':_0x4f27a8['userId'],'version':_0x4f27a8[_0x427028(0x14f)],'status':_0x4f27a8['status'],'tags':Array['isArray'](_0x4f27a8[_0x427028(0x141)])?_0x4f27a8[_0x427028(0x141)]:[],'hasUpstreamUpdate':_0x4f27a8[_0x427028(0x13a)],'forkedFromSkillId':_0x4f27a8[_0x427028(0x14c)],'forkedFromVersion':_0x4f27a8[_0x427028(0x138)],'sourceSessionId':_0x4f27a8[_0x427028(0x159)],'contentHash':_0x1504bb,'fileHashes':_0x55c762,'treeHash':_0x5032b4[_0x427028(0x149)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5032b4)):undefined,'ossPath':remoteManifestOssPath(_0x4f27a8['files']),'zipSha256':_0x3c0c4b,'zipSize':_0xf680fe,'files':_0x5032b4['length']>0x0?_0x5032b4[_0x427028(0x136)](_0x70e11=>({'path':_0x70e11['path'],'hash':fileHash(_0x70e11),'size':fileContent(_0x70e11)[_0x427028(0x149)]})):undefined,'pulledAt':_0x1cbae0??new Date()['toISOString']()};}export function requireSkillCode(_0x524db5){const _0x1077ea=a119_0x50d0,_0x2ba564=_0x524db5[_0x1077ea(0x142)]?.[_0x1077ea(0x13e)]();if(!_0x2ba564)throw CliErrors[_0x1077ea(0x139)](_0x1077ea(0x145));return _0x2ba564;}export function readMetadataIfPresent(_0x4a8150){const _0x17f88e=a119_0x50d0;if(!existsSync(_0x4a8150))return undefined;try{const _0x37fc1f=JSON[_0x17f88e(0x135)](readFileSync(_0x4a8150,'utf8'));return _0x37fc1f;}catch{throw CliErrors[_0x17f88e(0x139)](_0x17f88e(0x137)+METADATA_FILE+':\x20'+_0x4a8150);}}function remoteManifestOssPath(_0x1ddb40){const _0x549727=a119_0x50d0;if(!_0x1ddb40||typeof _0x1ddb40!==_0x549727(0x144)||Array[_0x549727(0x13b)](_0x1ddb40))return undefined;const _0x5477af=_0x1ddb40[_0x549727(0x153)];return typeof _0x5477af===_0x549727(0x146)&&_0x5477af[_0x549727(0x13e)]()?_0x5477af[_0x549727(0x13e)]():undefined;}function a119_0x132f(){const _0xb7f3c5=['map','Invalid\x20','forkedFromVersion','validation','hasUpstreamUpdate','isArray','description','102223HsDzUp','trim','zipSha256','48bapqFc','tags','skillCode','1578108UzQxvg','object','Runtime\x20Skill\x20is\x20missing\x20skillCode.','string','manifest','1020ybizlP','length','path','fromEntries','forkedFromSkillId','readonly','personal','version','5MkRqhf','108VLHPQc','3Kmnbsy','ossPath','660392mzmTSM','314026WMWIRZ','zipSize','256529ayycSW','241380IRpdWw','sourceSessionId','5380385cqurbu','parse'];a119_0x132f=function(){return _0xb7f3c5;};return a119_0x132f();}
1
+ (function(_0x4fbe8c,_0x217d62){const _0x42d080=a119_0x55fb,_0x5c6316=_0x4fbe8c();while(!![]){try{const _0x35e982=-parseInt(_0x42d080(0x1f6))/0x1*(-parseInt(_0x42d080(0x1ee))/0x2)+-parseInt(_0x42d080(0x210))/0x3+-parseInt(_0x42d080(0x1fb))/0x4*(-parseInt(_0x42d080(0x1ef))/0x5)+-parseInt(_0x42d080(0x202))/0x6*(parseInt(_0x42d080(0x20c))/0x7)+parseInt(_0x42d080(0x207))/0x8*(-parseInt(_0x42d080(0x1fa))/0x9)+parseInt(_0x42d080(0x206))/0xa*(parseInt(_0x42d080(0x1fc))/0xb)+parseInt(_0x42d080(0x1f1))/0xc*(-parseInt(_0x42d080(0x1fd))/0xd);if(_0x35e982===_0x217d62)break;else _0x5c6316['push'](_0x5c6316['shift']());}catch(_0x51cdc6){_0x5c6316['push'](_0x5c6316['shift']());}}}(a119_0x459b,0x4b68b));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';function a119_0x55fb(_0x25d42f,_0x53016c){_0x25d42f=_0x25d42f-0x1eb;const _0x459b4e=a119_0x459b();let _0x55fbed=_0x459b4e[_0x25d42f];return _0x55fbed;}export function buildMetadata(_0x21b01a,_0x5bc281,_0x3671c4,_0x2188a2,_0x88100b,_0xc0ac32,_0x39e54f){const _0x44192c=a119_0x55fb,_0x5d3696=_0xc0ac32?normalizeLocalFiles(_0xc0ac32):[],_0x213725=!_0x39e54f&&_0x5d3696['length']>0x0?buildSkillPackage(_0x5d3696):undefined,_0x1d1a11=_0x39e54f?bufferSha256(_0x39e54f):_0x213725?.[_0x44192c(0x20d)][_0x44192c(0x1fe)],_0x5c9250=_0x39e54f?.[_0x44192c(0x1f7)]??_0x213725?.[_0x44192c(0x20d)]['zipSize'],_0x2e65b2=_0x5d3696[_0x44192c(0x1f7)]>0x0?Object[_0x44192c(0x1f9)](_0x5d3696[_0x44192c(0x1f2)](_0xe91236=>[_0xe91236[_0x44192c(0x1ed)],fileHash(_0xe91236)])):undefined;return{'schemaVersion':_0x5d3696[_0x44192c(0x1f7)]>0x0?0x2:0x1,'id':_0x21b01a['id'],'appCode':_0x3671c4,'skillCode':requireSkillCode(_0x21b01a),'skillName':_0x21b01a['skillName'],'description':_0x21b01a[_0x44192c(0x201)],'scope':_0x5bc281,'readonly':_0x5bc281!==_0x44192c(0x212)||_0x21b01a[_0x44192c(0x1f4)]===!![],'tenantCode':_0x21b01a[_0x44192c(0x1ff)],'userId':_0x21b01a[_0x44192c(0x211)],'version':_0x21b01a['version'],'status':_0x21b01a[_0x44192c(0x1f3)],'tags':Array[_0x44192c(0x205)](_0x21b01a[_0x44192c(0x200)])?_0x21b01a[_0x44192c(0x200)]:[],'hasUpstreamUpdate':_0x21b01a[_0x44192c(0x1f5)],'forkedFromSkillId':_0x21b01a[_0x44192c(0x209)],'forkedFromVersion':_0x21b01a[_0x44192c(0x20f)],'sourceSessionId':_0x21b01a['sourceSessionId'],'contentHash':_0x2188a2,'fileHashes':_0x2e65b2,'treeHash':_0x5d3696[_0x44192c(0x1f7)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5d3696)):undefined,'ossPath':remoteManifestOssPath(_0x21b01a[_0x44192c(0x208)]),'zipSha256':_0x1d1a11,'zipSize':_0x5c9250,'files':_0x5d3696[_0x44192c(0x1f7)]>0x0?_0x5d3696[_0x44192c(0x1f2)](_0x4c98a0=>({'path':_0x4c98a0[_0x44192c(0x1ed)],'hash':fileHash(_0x4c98a0),'size':fileContent(_0x4c98a0)[_0x44192c(0x1f7)]})):undefined,'pulledAt':_0x88100b??new Date()[_0x44192c(0x204)]()};}export function requireSkillCode(_0x2b6b78){const _0x55ba96=a119_0x55fb,_0x5355b7=_0x2b6b78['skillCode']?.[_0x55ba96(0x203)]();if(!_0x5355b7)throw CliErrors[_0x55ba96(0x1ec)](_0x55ba96(0x20b));return _0x5355b7;}function a119_0x459b(){const _0x1f0ed1=['145reSPne','parse','14592JpxvHU','map','status','readonly','hasUpstreamUpdate','159789fmJbpA','length','utf8','fromEntries','748755xtMPlu','29716pHqNrH','77957KrVnec','2353DXAknc','zipSha256','tenantCode','tags','description','6YKdwpu','trim','toISOString','isArray','570HQzVsh','16zRxaPM','files','forkedFromSkillId','string','Runtime\x20Skill\x20is\x20missing\x20skillCode.','2473233oUqxiK','manifest','object','forkedFromVersion','150261OiWwwU','userId','personal','ossPath','Invalid\x20','validation','path','6LPgybo'];a119_0x459b=function(){return _0x1f0ed1;};return a119_0x459b();}export function readMetadataIfPresent(_0x265425){const _0x329d1f=a119_0x55fb;if(!existsSync(_0x265425))return undefined;try{const _0x18a4b=JSON[_0x329d1f(0x1f0)](readFileSync(_0x265425,_0x329d1f(0x1f8)));return _0x18a4b;}catch{throw CliErrors[_0x329d1f(0x1ec)](_0x329d1f(0x1eb)+METADATA_FILE+':\x20'+_0x265425);}}function remoteManifestOssPath(_0x1d8c59){const _0x3efb04=a119_0x55fb;if(!_0x1d8c59||typeof _0x1d8c59!==_0x3efb04(0x20e)||Array['isArray'](_0x1d8c59))return undefined;const _0x29e052=_0x1d8c59[_0x3efb04(0x213)];return typeof _0x29e052===_0x3efb04(0x20a)&&_0x29e052['trim']()?_0x29e052['trim']():undefined;}
@@ -1 +1 @@
1
- const a120_0x4db6d5=a120_0x204d;function a120_0x204d(_0x178625,_0x363853){_0x178625=_0x178625-0x1e4;const _0x1e66d5=a120_0x1e66();let _0x204d6e=_0x1e66d5[_0x178625];return _0x204d6e;}(function(_0x5d0c66,_0x108a1c){const _0x5dd9cb=a120_0x204d,_0x45f74e=_0x5d0c66();while(!![]){try{const _0x436252=parseInt(_0x5dd9cb(0x1f6))/0x1*(parseInt(_0x5dd9cb(0x1fd))/0x2)+-parseInt(_0x5dd9cb(0x1ff))/0x3*(-parseInt(_0x5dd9cb(0x1f5))/0x4)+parseInt(_0x5dd9cb(0x1e6))/0x5+parseInt(_0x5dd9cb(0x1f0))/0x6*(parseInt(_0x5dd9cb(0x1ef))/0x7)+parseInt(_0x5dd9cb(0x1ee))/0x8+-parseInt(_0x5dd9cb(0x1ec))/0x9*(parseInt(_0x5dd9cb(0x1f8))/0xa)+parseInt(_0x5dd9cb(0x1eb))/0xb*(-parseInt(_0x5dd9cb(0x1e5))/0xc);if(_0x436252===_0x108a1c)break;else _0x45f74e['push'](_0x45f74e['shift']());}catch(_0x2d3630){_0x45f74e['push'](_0x45f74e['shift']());}}}(a120_0x1e66,0x3c097));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';function a120_0x1e66(){const _0x3b675b=['path\x20segment','validation','62380ikUfgW','21674KlSqKc','.workbuddy','350GQjEQP','skillCode','appCode','.claude','SKILL_ROOT','30VkDJCe','agentsSkillsDir','15IuYupj','homeDirName','12TNDKzN','33820vPZDkY','claudeSkillsDir','CLAUDE_SKILL_ROOT','includes','skills','1109647Ppicly','125604OAplit','cache','2358968KwOvDl','913696ZfAcbv','6tvUzfj','Unsafe\x20','workbuddySkillsDir'];a120_0x1e66=function(){return _0x3b675b;};return a120_0x1e66();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3791cd={}){const _0x5da975=a120_0x204d,_0x503de3=_0x3791cd['homeDir']??homedir(),_0x51c7c1=resolve(_0x503de3,PRODUCT_CONFIG[_0x5da975(0x1e4)],_0x5da975(0x1ed)),_0x521283=trimmedEnv(_0x5da975(0x1fc)),_0x4b9750=trimmedEnv(_0x5da975(0x1e8)),_0x5a44ec=resolve(_0x503de3,_0x5da975(0x1f7)),_0xa4781a=_0x3791cd[_0x5da975(0x1f2)]??(existsSync(_0x5a44ec)?resolve(_0x5a44ec,_0x5da975(0x1ea)):undefined);return{'homeDir':_0x503de3,'cacheRoot':_0x51c7c1,'managedRoot':resolve(_0x503de3,PRODUCT_CONFIG[_0x5da975(0x1e4)]),'agentsSkillsDir':_0x3791cd['agentsSkillsDir']??_0x521283??resolve(_0x503de3,'.agents',_0x5da975(0x1ea)),'claudeSkillsDir':_0x3791cd['claudeSkillsDir']??_0x4b9750??resolve(_0x503de3,_0x5da975(0x1fb),_0x5da975(0x1ea)),'workbuddySkillsDir':_0xa4781a};}export function runtimeAgentSkillRoots(_0x31f485){const _0x187a7f=a120_0x204d;return[_0x31f485[_0x187a7f(0x1fe)],_0x31f485[_0x187a7f(0x1e7)],_0x31f485['workbuddySkillsDir']]['filter'](_0x1b913e=>Boolean(_0x1b913e));}export function getRuntimeSkillCacheRoot(_0x430a7f,_0x50e31e,_0x7f763f={}){const _0x3b9455=a120_0x204d,_0x36ab15=resolveSkillSyncPaths(_0x7f763f);return resolve(_0x36ab15['cacheRoot'],_0x430a7f,fingerprintAccessKey(_0x50e31e),_0x3b9455(0x1ea));}export function getRuntimeSkillDir(_0x44a98f,_0x23af11,_0x487847,_0x17cdbc,_0x246974,_0x181d0b={}){const _0x4e608b=a120_0x204d;return resolve(getRuntimeSkillCacheRoot(_0x44a98f,_0x23af11,_0x181d0b),safePathSegment(_0x487847,_0x4e608b(0x1fa)),_0x17cdbc,safePathSegment(_0x246974,_0x4e608b(0x1f9)));}export function safePathSegment(_0x393965,_0x31f037=a120_0x4db6d5(0x1f3)){const _0x227ad1=a120_0x4db6d5;if(!_0x393965||_0x393965[_0x227ad1(0x1e9)]('/')||_0x393965[_0x227ad1(0x1e9)]('\x5c')||_0x393965['includes']('..'))throw CliErrors[_0x227ad1(0x1f4)](_0x227ad1(0x1f1)+_0x31f037+'\x20for\x20local\x20path:\x20'+_0x393965);return _0x393965;}function trimmedEnv(_0x1982a6){const _0x5810c6=productEnv(_0x1982a6)?.['trim']();return _0x5810c6?_0x5810c6:undefined;}
1
+ const a120_0x30cf72=a120_0x5631;(function(_0x332c12,_0x245a0a){const _0x1f163e=a120_0x5631,_0x592098=_0x332c12();while(!![]){try{const _0x4c1eb1=parseInt(_0x1f163e(0x1b0))/0x1+-parseInt(_0x1f163e(0x1b2))/0x2*(-parseInt(_0x1f163e(0x1bb))/0x3)+-parseInt(_0x1f163e(0x1ad))/0x4*(parseInt(_0x1f163e(0x1ac))/0x5)+parseInt(_0x1f163e(0x1b5))/0x6+-parseInt(_0x1f163e(0x1ba))/0x7*(parseInt(_0x1f163e(0x1a2))/0x8)+-parseInt(_0x1f163e(0x1bd))/0x9*(-parseInt(_0x1f163e(0x1a9))/0xa)+parseInt(_0x1f163e(0x1b7))/0xb*(-parseInt(_0x1f163e(0x1b8))/0xc);if(_0x4c1eb1===_0x245a0a)break;else _0x592098['push'](_0x592098['shift']());}catch(_0x41e9a1){_0x592098['push'](_0x592098['shift']());}}}(a120_0x3f10,0x6f601));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';function a120_0x5631(_0x19b9f9,_0x58e67c){_0x19b9f9=_0x19b9f9-0x1a0;const _0x3f10a1=a120_0x3f10();let _0x56315e=_0x3f10a1[_0x19b9f9];return _0x56315e;}export function resolveSkillSyncPaths(_0x42a016={}){const _0x17668b=a120_0x5631,_0x226a45=_0x42a016[_0x17668b(0x1a8)]??homedir(),_0x59476e=resolve(_0x226a45,PRODUCT_CONFIG[_0x17668b(0x1b4)],_0x17668b(0x1af)),_0x16bc7d=trimmedEnv(_0x17668b(0x1a3)),_0x5dbb63=trimmedEnv(_0x17668b(0x1a7)),_0x2acc9b=resolve(_0x226a45,_0x17668b(0x1a5)),_0x5178f9=_0x42a016[_0x17668b(0x1b6)]??(existsSync(_0x2acc9b)?resolve(_0x2acc9b,_0x17668b(0x1a0)):undefined);return{'homeDir':_0x226a45,'cacheRoot':_0x59476e,'managedRoot':resolve(_0x226a45,PRODUCT_CONFIG[_0x17668b(0x1b4)]),'agentsSkillsDir':_0x42a016[_0x17668b(0x1aa)]??_0x16bc7d??resolve(_0x226a45,_0x17668b(0x1b1),_0x17668b(0x1a0)),'claudeSkillsDir':_0x42a016[_0x17668b(0x1ab)]??_0x5dbb63??resolve(_0x226a45,_0x17668b(0x1b9),_0x17668b(0x1a0)),'workbuddySkillsDir':_0x5178f9};}export function runtimeAgentSkillRoots(_0x13e598){const _0x201efb=a120_0x5631;return[_0x13e598[_0x201efb(0x1aa)],_0x13e598[_0x201efb(0x1ab)],_0x13e598[_0x201efb(0x1b6)]][_0x201efb(0x1a6)](_0x2a809e=>Boolean(_0x2a809e));}export function getRuntimeSkillCacheRoot(_0x483826,_0x503f60,_0x447eb5={}){const _0x29f46a=a120_0x5631,_0x285579=resolveSkillSyncPaths(_0x447eb5);return resolve(_0x285579['cacheRoot'],_0x483826,fingerprintAccessKey(_0x503f60),_0x29f46a(0x1a0));}export function getRuntimeSkillDir(_0x39ca63,_0x55ad36,_0x5c46f9,_0x1b4c02,_0x3b9b0e,_0x15713a={}){const _0x39cde3=a120_0x5631;return resolve(getRuntimeSkillCacheRoot(_0x39ca63,_0x55ad36,_0x15713a),safePathSegment(_0x5c46f9,_0x39cde3(0x1a4)),_0x1b4c02,safePathSegment(_0x3b9b0e,'skillCode'));}export function safePathSegment(_0x2741ec,_0x484665=a120_0x30cf72(0x1b3)){const _0x2b4c53=a120_0x30cf72;if(!_0x2741ec||_0x2741ec['includes']('/')||_0x2741ec['includes']('\x5c')||_0x2741ec[_0x2b4c53(0x1a1)]('..'))throw CliErrors[_0x2b4c53(0x1bc)](_0x2b4c53(0x1be)+_0x484665+_0x2b4c53(0x1ae)+_0x2741ec);return _0x2741ec;}function trimmedEnv(_0x111f1a){const _0x3897dd=productEnv(_0x111f1a)?.['trim']();return _0x3897dd?_0x3897dd:undefined;}function a120_0x3f10(){const _0x27d6bd=['path\x20segment','homeDirName','3088002wULaAB','workbuddySkillsDir','110ctMcEv','78240ampFPj','.claude','56QhKvyy','39JENAxp','validation','176679uhjjBk','Unsafe\x20','skills','includes','842696lymqNU','SKILL_ROOT','appCode','.workbuddy','filter','CLAUDE_SKILL_ROOT','homeDir','90WLaNsj','agentsSkillsDir','claudeSkillsDir','398165ChvSzd','4bWNZpx','\x20for\x20local\x20path:\x20','cache','455586maeOye','.agents','45660NLzqdf'];a120_0x3f10=function(){return _0x27d6bd;};return a120_0x3f10();}
@@ -1 +1 @@
1
- function a121_0xed93(){const _0x403098=['74CyJaiN','\x20has\x20scope=\x22','12517DtOXNx','boolean','1500336YcaBHb','6XzXMqs','company','skillCode','trim','refreshedAt','isDirectory','files','validation','4225711btwmyn','string','version','path','(unknown)','ignoreMetadataScope','30rNixsm','sourceSessionId','excludedFilePaths','2470641GvLopY','slice','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataAppCodeMismatch','pushedAt','scope','ignoreInvalidMetadata','filter','tags','320cYrahE','301212QcZVfq','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','packageBase64','Skill\x20metadata\x20appCode\x20\x22','dir','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','number',',\x20or\x20directory\x20name.','isSymbolicLink','builtin','ignoreMetadataForPayload','description','utf8','skillName','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','targetScope','Invalid\x20','ignoreMetadataSkillCode','unknown','85812xFmMGQ','appCode','personal','startsWith','1782kaqOLC','\x20has\x20unsupported\x20scope\x20\x22','some','match','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','isFile','content','87993FVAuwp','displayName','Missing\x20','replace','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'];a121_0xed93=function(){return _0x403098;};return a121_0xed93();}(function(_0x2026ff,_0x2e7730){const _0x5c45ea=a121_0x156a,_0x3c30b9=_0x2026ff();while(!![]){try{const _0x4da3c9=parseInt(_0x5c45ea(0x1f0))/0x1*(-parseInt(_0x5c45ea(0x1ee))/0x2)+parseInt(_0x5c45ea(0x204))/0x3+parseInt(_0x5c45ea(0x20e))/0x4*(-parseInt(_0x5c45ea(0x201))/0x5)+-parseInt(_0x5c45ea(0x1f3))/0x6*(parseInt(_0x5c45ea(0x1fb))/0x7)+-parseInt(_0x5c45ea(0x1f2))/0x8+parseInt(_0x5c45ea(0x22f))/0x9*(parseInt(_0x5c45ea(0x20d))/0xa)+parseInt(_0x5c45ea(0x227))/0xb*(parseInt(_0x5c45ea(0x223))/0xc);if(_0x4da3c9===_0x2e7730)break;else _0x3c30b9['push'](_0x3c30b9['shift']());}catch(_0x3ee0c6){_0x3c30b9['push'](_0x3c30b9['shift']());}}}(a121_0xed93,0x8fba7));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a121_0x156a(_0x556e89,_0x5ad688){_0x556e89=_0x556e89-0x1eb;const _0xed93a8=a121_0xed93();let _0x156ad3=_0xed93a8[_0x556e89];return _0x156ad3;}import{parse as a121_0x3787fb}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(_0x2cb5ef,_0x18e017,_0x311a97={}){const _0x460369=a121_0x156a,_0x457311=resolvePushDirectoryRoot(_0x2cb5ef),_0x35fe6d=readPushMetadataIfPresent(resolve(_0x457311,METADATA_FILE),{'ignoreInvalidMetadata':_0x311a97[_0x460369(0x20a)]});if(_0x35fe6d?.[_0x460369(0x224)]&&_0x35fe6d[_0x460369(0x224)]!==_0x18e017&&!_0x311a97['allowAppCodeRetarget']&&!_0x311a97[_0x460369(0x207)])throw CliErrors[_0x460369(0x1fa)](_0x460369(0x213)+_0x35fe6d[_0x460369(0x224)]+_0x460369(0x1ed)+_0x18e017+'\x22.');const _0x4affb4=resolvePushSkillCode(_0x457311,_0x18e017,_0x35fe6d,_0x311a97);if(!_0x4affb4)throw CliErrors[_0x460369(0x1fa)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x460369(0x217));return{'dir':_0x457311,'skillCode':_0x4affb4,'metadata':_0x35fe6d};}export function readPushDirectory(_0x3de778,_0x40df0a,_0x3774a4={}){const _0x1f8a5e=a121_0x156a,_0x16c46c=resolvePushDirectoryIdentity(_0x3de778,_0x40df0a,_0x3774a4),_0x53d773=_0x16c46c[_0x1f8a5e(0x214)],_0x12e14a=resolve(_0x53d773,SKILL_FILE);if(!existsSync(_0x12e14a)||!lstatSync(_0x12e14a)[_0x1f8a5e(0x22d)]())throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x1eb)+SKILL_FILE+':\x20'+_0x12e14a);const _0x58c9a9=_0x16c46c[_0x1f8a5e(0x20f)],_0x5b7d03=_0x3774a4[_0x1f8a5e(0x21f)]??'personal';if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x58c9a9?.[_0x1f8a5e(0x209)]===_0x1f8a5e(0x219))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x21e)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.');if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x5b7d03==='personal'&&_0x58c9a9?.['scope']&&_0x58c9a9[_0x1f8a5e(0x209)]!==_0x1f8a5e(0x225))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x206)+METADATA_FILE+_0x1f8a5e(0x1ef)+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.',_0x1f8a5e(0x210)+_0x53d773+_0x1f8a5e(0x215));const _0x2188de=scanSkillDirectory(_0x53d773,{'excludedFilePaths':_0x3774a4[_0x1f8a5e(0x203)]}),_0x380782=buildSkillPackage(_0x2188de),_0x4a9f23=readFileSync(_0x12e14a,_0x1f8a5e(0x21c)),_0x4837ae=_0x16c46c[_0x1f8a5e(0x1f5)],_0xfbce48=_0x3774a4[_0x1f8a5e(0x21a)]?undefined:_0x58c9a9,_0xf4be22=readSkillDisplayName(_0x4a9f23);return{'skillCode':_0x4837ae,'metadata':_0x58c9a9,'frontmatterDisplayName':_0xf4be22,'input':{'skillCode':_0x4837ae,'skillName':_0xf4be22??_0xfbce48?.[_0x1f8a5e(0x21d)],'description':_0xfbce48?.['description'],'content':_0x4a9f23,'files':_0x380782['manifest'],'packageBase64':_0x380782[_0x1f8a5e(0x212)],'tags':_0xfbce48?.['tags'],'version':_0xfbce48?.[_0x1f8a5e(0x1fd)],'sourceSessionId':_0xfbce48?.[_0x1f8a5e(0x202)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x31ea02,_0x437211,_0x5bc826,_0x3c6bc0={}){const _0x5ddab6=a121_0x156a,_0x27687e=resolvePushDirectoryRoot(_0x31ea02),_0x3d9813=readPushMetadataIfPresent(resolve(_0x27687e,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x118fc7=requireRemoteScope(_0x437211),_0x57d8d0=readLocalSkillContent(_0x27687e),_0x5e52b2={..._0x437211,'appCode':_0x437211[_0x5ddab6(0x224)]??_0x5bc826,'skillName':_0x437211['skillName']??_0x3d9813?.[_0x5ddab6(0x21d)],'description':_0x437211[_0x5ddab6(0x21b)]??_0x3d9813?.[_0x5ddab6(0x21b)],'tags':Array['isArray'](_0x437211['tags'])?_0x437211[_0x5ddab6(0x20c)]:_0x3d9813?.[_0x5ddab6(0x20c)],'sourceSessionId':_0x437211['sourceSessionId']??_0x3d9813?.[_0x5ddab6(0x202)],'content':_0x437211[_0x5ddab6(0x22e)]??_0x57d8d0},_0x5aaaa2=buildMetadata(_0x5e52b2,_0x118fc7,_0x5bc826,contentHash(_0x57d8d0),_0x3c6bc0[_0x5ddab6(0x1f7)]);writeJsonAtomic(resolve(_0x27687e,METADATA_FILE),_0x5aaaa2);}export function recordPushedRuntimeSkill(_0x1327ac,_0x1b31c7,_0x5208ac,_0x31bb4e={}){const _0x1b32c2=a121_0x156a,_0x204314=resolvePushDirectoryRoot(_0x1327ac),_0x488181=scanSkillDirectory(_0x204314),_0x5eb356=_0x488181[_0x1b32c2(0x22c)](_0x5eaeaa=>_0x5eaeaa[_0x1b32c2(0x1fe)]===SKILL_FILE),_0x4f06cb=_0x5eb356?fileText(_0x5eb356):'',_0x22ad32=tryNormalizePackageManifest(_0x1b31c7[_0x1b32c2(0x1f9)]),_0x3ee57b={..._0x1b31c7,'content':_0x1b31c7[_0x1b32c2(0x22e)]??_0x4f06cb,'files':_0x22ad32},_0x1af49c=_0x22ad32?normalizeLocalFiles(_0x488181)[_0x1b32c2(0x20b)](_0x6d98c5=>_0x22ad32[_0x1b32c2(0x1f9)][_0x1b32c2(0x229)](_0x2bed88=>_0x2bed88['path']===_0x6d98c5['path'])):undefined,_0x157656=buildMetadata(_0x3ee57b,_0x31bb4e[_0x1b32c2(0x209)]??_0x1b32c2(0x225),_0x5208ac,contentHash(_0x3ee57b[_0x1b32c2(0x22e)]??''),_0x31bb4e[_0x1b32c2(0x208)],_0x1af49c);writeJsonAtomic(resolve(_0x204314,METADATA_FILE),_0x157656);}export function deriveSkillCodeFromDirectory(_0x45446a,_0x5d7d69){const _0x13cf92=a121_0x156a,_0x21f1d8=basename(resolve(_0x45446a)),_0x169a57=_0x5d7d69+'--';return _0x21f1d8[_0x13cf92(0x226)](_0x169a57)?_0x21f1d8[_0x13cf92(0x205)](_0x169a57['length']):_0x21f1d8;}function resolvePushSkillCode(_0x3c5ffa,_0x4a4374,_0x1ffea1,_0x340bfe){const _0x3ae33a=a121_0x156a,_0x4367e1=deriveSkillCodeFromSkillFile(_0x3c5ffa)||deriveSkillCodeFromDirectory(_0x3c5ffa,_0x4a4374);if(_0x340bfe[_0x3ae33a(0x221)])return _0x4367e1;return _0x1ffea1?.[_0x3ae33a(0x1f5)]?.[_0x3ae33a(0x1f6)]()||_0x4367e1;}function deriveSkillCodeFromSkillFile(_0x44a707){const _0x3f6db8=a121_0x156a,_0x4c269d=resolve(_0x44a707,SKILL_FILE);if(!existsSync(_0x4c269d)||!lstatSync(_0x4c269d)[_0x3f6db8(0x22d)]())return undefined;const _0x132402=readFileSync(_0x4c269d,_0x3f6db8(0x21c)),_0x202bb9=_0x132402['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x202bb9)return undefined;const _0x593e25=parseFrontmatterObject(_0x202bb9[0x1]??''),_0x43977a=scalarToString(_0x593e25?.['name']);return _0x43977a?slugifySkillName(_0x43977a):undefined;}function readSkillDisplayName(_0xe7a35d){const _0x781057=a121_0x156a,_0x52ce46=_0xe7a35d[_0x781057(0x22a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52ce46)return undefined;const _0x2342ed=parseFrontmatterObject(_0x52ce46[0x1]??'');return scalarToString(_0x2342ed?.[_0x781057(0x230)]);}function slugifySkillName(_0x44e5ab){const _0x54f732=a121_0x156a,_0x28f727=_0x44e5ab['trim']()['toLowerCase']()[_0x54f732(0x1ec)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x54f732(0x1ec)](/^-+/,'')[_0x54f732(0x1ec)](/-+$/,'')[_0x54f732(0x1ec)](/-{2,}/g,'-');if(!_0x28f727)throw CliErrors['validation'](_0x54f732(0x220)+SKILL_FILE+_0x54f732(0x22b));return _0x28f727;}function parseFrontmatterObject(_0x7d91de){try{const _0x257f56=a121_0x3787fb(_0x7d91de);return _0x257f56&&typeof _0x257f56==='object'&&!Array['isArray'](_0x257f56)?_0x257f56:undefined;}catch{return undefined;}}function scalarToString(_0x1d6dc6){const _0x5efdb5=a121_0x156a;if(typeof _0x1d6dc6===_0x5efdb5(0x1fc))return _0x1d6dc6['trim']();if(typeof _0x1d6dc6===_0x5efdb5(0x216)||typeof _0x1d6dc6===_0x5efdb5(0x1f1))return String(_0x1d6dc6);return undefined;}function resolvePushDirectoryRoot(_0x46a79a){const _0x18790f=a121_0x156a,_0x1b1e9d=resolve(_0x46a79a);if(!existsSync(_0x1b1e9d))throw CliErrors['validation'](_0x18790f(0x211)+_0x46a79a);const _0x5de6c8=lstatSync(_0x1b1e9d);if(_0x5de6c8['isDirectory']())return _0x1b1e9d;if(_0x5de6c8[_0x18790f(0x218)]()){const _0x1fdd28=realpathSync(_0x1b1e9d);if(lstatSync(_0x1fdd28)[_0x18790f(0x1f8)]())return _0x1fdd28;}throw CliErrors[_0x18790f(0x1fa)]('Skill\x20directory\x20not\x20found:\x20'+_0x46a79a);}function requireRemoteScope(_0x435bfd){const _0x4bb9d8=a121_0x156a;if(_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x225)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x1f4)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x219))return _0x435bfd[_0x4bb9d8(0x209)];throw CliErrors[_0x4bb9d8(0x1fa)]('Remote\x20Skill\x20'+(_0x435bfd[_0x4bb9d8(0x1f5)]||_0x4bb9d8(0x1ff))+_0x4bb9d8(0x228)+(_0x435bfd[_0x4bb9d8(0x209)]??_0x4bb9d8(0x222))+'\x22.');}function readLocalSkillContent(_0x5cc9b0){const _0x3dc91f=a121_0x156a,_0x4f3959=resolve(_0x5cc9b0,SKILL_FILE);return existsSync(_0x4f3959)&&lstatSync(_0x4f3959)[_0x3dc91f(0x22d)]()?readFileSync(_0x4f3959,_0x3dc91f(0x21c)):'';}function readPushMetadataIfPresent(_0x2ef8a3,_0x113e87={}){const _0x3a02f3=a121_0x156a;try{return readMetadataIfPresent(_0x2ef8a3);}catch(_0x5aaac7){if(_0x113e87[_0x3a02f3(0x20a)])return undefined;throw _0x5aaac7;}}
1
+ (function(_0x429535,_0x21dfaf){const _0x2a0534=a121_0x5289,_0x300c23=_0x429535();while(!![]){try{const _0x1d4ec4=-parseInt(_0x2a0534(0x1f4))/0x1+-parseInt(_0x2a0534(0x1f8))/0x2*(-parseInt(_0x2a0534(0x1db))/0x3)+-parseInt(_0x2a0534(0x20f))/0x4+parseInt(_0x2a0534(0x1f0))/0x5+-parseInt(_0x2a0534(0x1f2))/0x6+parseInt(_0x2a0534(0x1df))/0x7*(-parseInt(_0x2a0534(0x1e8))/0x8)+parseInt(_0x2a0534(0x1e9))/0x9*(parseInt(_0x2a0534(0x207))/0xa);if(_0x1d4ec4===_0x21dfaf)break;else _0x300c23['push'](_0x300c23['shift']());}catch(_0xbf4f6a){_0x300c23['push'](_0x300c23['shift']());}}}(a121_0x5ab5,0xeb0df));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a121_0x2b21b7}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(_0xd1835e,_0x55d9f2,_0x5a468a={}){const _0x4509ef=a121_0x5289,_0x18a819=resolvePushDirectoryRoot(_0xd1835e),_0x4e696c=readPushMetadataIfPresent(resolve(_0x18a819,METADATA_FILE),{'ignoreInvalidMetadata':_0x5a468a['ignoreInvalidMetadata']});if(_0x4e696c?.[_0x4509ef(0x1ef)]&&_0x4e696c[_0x4509ef(0x1ef)]!==_0x55d9f2&&!_0x5a468a[_0x4509ef(0x20b)]&&!_0x5a468a[_0x4509ef(0x1fa)])throw CliErrors['validation'](_0x4509ef(0x20a)+_0x4e696c[_0x4509ef(0x1ef)]+_0x4509ef(0x20c)+_0x55d9f2+'\x22.');const _0x46df3d=resolvePushSkillCode(_0x18a819,_0x55d9f2,_0x4e696c,_0x5a468a);if(!_0x46df3d)throw CliErrors[_0x4509ef(0x1f6)](_0x4509ef(0x212)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x18a819,'skillCode':_0x46df3d,'metadata':_0x4e696c};}export function readPushDirectory(_0x23375b,_0xab8f43,_0x5514f2={}){const _0xe1c03d=a121_0x5289,_0x137b15=resolvePushDirectoryIdentity(_0x23375b,_0xab8f43,_0x5514f2),_0x4d6fe8=_0x137b15[_0xe1c03d(0x21a)],_0x4d750b=resolve(_0x4d6fe8,SKILL_FILE);if(!existsSync(_0x4d750b)||!lstatSync(_0x4d750b)[_0xe1c03d(0x204)]())throw CliErrors[_0xe1c03d(0x1f6)]('Missing\x20'+SKILL_FILE+':\x20'+_0x4d750b);const _0x501623=_0x137b15[_0xe1c03d(0x1e7)],_0x210e34=_0x5514f2[_0xe1c03d(0x1ea)]??_0xe1c03d(0x1f3);if(!_0x5514f2[_0xe1c03d(0x202)]&&_0x501623?.[_0xe1c03d(0x1fb)]===_0xe1c03d(0x1f9))throw CliErrors[_0xe1c03d(0x1f6)](_0xe1c03d(0x20d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x501623[_0xe1c03d(0x1fb)]+'\x22.');if(!_0x5514f2[_0xe1c03d(0x202)]&&_0x210e34===_0xe1c03d(0x1f3)&&_0x501623?.[_0xe1c03d(0x1fb)]&&_0x501623['scope']!=='personal')throw CliErrors[_0xe1c03d(0x1f6)](_0xe1c03d(0x1f5)+METADATA_FILE+_0xe1c03d(0x21b)+_0x501623[_0xe1c03d(0x1fb)]+'\x22.',_0xe1c03d(0x1eb)+_0x4d6fe8+_0xe1c03d(0x215));const _0x59e064=scanSkillDirectory(_0x4d6fe8,{'excludedFilePaths':_0x5514f2[_0xe1c03d(0x214)]}),_0x7a7ac6=buildSkillPackage(_0x59e064),_0x330934=readFileSync(_0x4d750b,_0xe1c03d(0x216)),_0x2cfe3a=_0x137b15[_0xe1c03d(0x200)],_0x534223=_0x5514f2[_0xe1c03d(0x1fd)]?undefined:_0x501623,_0x100679=readSkillDisplayName(_0x330934);return{'skillCode':_0x2cfe3a,'metadata':_0x501623,'frontmatterDisplayName':_0x100679,'input':{'skillCode':_0x2cfe3a,'skillName':_0x100679??_0x534223?.[_0xe1c03d(0x1ee)],'description':_0x534223?.[_0xe1c03d(0x201)],'content':_0x330934,'files':_0x7a7ac6[_0xe1c03d(0x1e2)],'packageBase64':_0x7a7ac6[_0xe1c03d(0x1ff)],'tags':_0x534223?.[_0xe1c03d(0x1d9)],'version':_0x534223?.[_0xe1c03d(0x1ed)],'sourceSessionId':_0x534223?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x3b7cf0,_0x5c5db5,_0x2807c0,_0x4efb66={}){const _0x32bb15=a121_0x5289,_0x558d5a=resolvePushDirectoryRoot(_0x3b7cf0),_0x25c615=readPushMetadataIfPresent(resolve(_0x558d5a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x1ff005=requireRemoteScope(_0x5c5db5),_0x516edd=readLocalSkillContent(_0x558d5a),_0x34e848={..._0x5c5db5,'appCode':_0x5c5db5[_0x32bb15(0x1ef)]??_0x2807c0,'skillName':_0x5c5db5[_0x32bb15(0x1ee)]??_0x25c615?.[_0x32bb15(0x1ee)],'description':_0x5c5db5[_0x32bb15(0x201)]??_0x25c615?.[_0x32bb15(0x201)],'tags':Array[_0x32bb15(0x1de)](_0x5c5db5['tags'])?_0x5c5db5['tags']:_0x25c615?.[_0x32bb15(0x1d9)],'sourceSessionId':_0x5c5db5[_0x32bb15(0x219)]??_0x25c615?.[_0x32bb15(0x219)],'content':_0x5c5db5[_0x32bb15(0x20e)]??_0x516edd},_0x236b44=buildMetadata(_0x34e848,_0x1ff005,_0x2807c0,contentHash(_0x516edd),_0x4efb66[_0x32bb15(0x1e4)]);writeJsonAtomic(resolve(_0x558d5a,METADATA_FILE),_0x236b44);}function a121_0x5ab5(){const _0x51e1e0=['Skill\x20metadata\x20appCode\x20\x22','allowAppCodeRetarget','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','content','1034816lAkMpW','toLowerCase','string','Unable\x20to\x20resolve\x20skillCode\x20from\x20','pushedAt','excludedFilePaths','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','utf8','path','displayName','sourceSessionId','dir','\x20has\x20scope=\x22','tags','ignoreMetadataSkillCode','51vkKTWu','find','trim','isArray','185878IMdrJQ','replace','boolean','manifest','Invalid\x20','refreshedAt','\x20has\x20unsupported\x20scope\x20\x22','\x20name\x20for\x20SkillHub\x20slug\x20generation.','metadata','248GaMopv','801TpZqYD','targetScope','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','version','skillName','appCode','6065545PpvZdo','ignoreInvalidMetadata','10277064PeZNMv','personal','83419scRzPB','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','validation','name','95984vTpIdS','builtin','ignoreMetadataAppCodeMismatch','scope','length','ignoreMetadataForPayload','match','packageBase64','skillCode','description','ignoreMetadataScope','number','isFile','Remote\x20Skill\x20','files','203590tvsvCz','filter','isDirectory'];a121_0x5ab5=function(){return _0x51e1e0;};return a121_0x5ab5();}export function recordPushedRuntimeSkill(_0x3ce4c3,_0x309136,_0x4a7ff3,_0x11e0ba={}){const _0x7d66e2=a121_0x5289,_0xfe1df2=resolvePushDirectoryRoot(_0x3ce4c3),_0x291881=scanSkillDirectory(_0xfe1df2),_0x272ddd=_0x291881[_0x7d66e2(0x1dc)](_0x33aed0=>_0x33aed0['path']===SKILL_FILE),_0x5ed0ca=_0x272ddd?fileText(_0x272ddd):'',_0x413140=tryNormalizePackageManifest(_0x309136['files']),_0x2dc4a0={..._0x309136,'content':_0x309136[_0x7d66e2(0x20e)]??_0x5ed0ca,'files':_0x413140},_0x374f3d=_0x413140?normalizeLocalFiles(_0x291881)[_0x7d66e2(0x208)](_0x18e0cd=>_0x413140[_0x7d66e2(0x206)]['some'](_0x3904b2=>_0x3904b2[_0x7d66e2(0x217)]===_0x18e0cd[_0x7d66e2(0x217)])):undefined,_0x4d2c3f=buildMetadata(_0x2dc4a0,_0x11e0ba[_0x7d66e2(0x1fb)]??_0x7d66e2(0x1f3),_0x4a7ff3,contentHash(_0x2dc4a0[_0x7d66e2(0x20e)]??''),_0x11e0ba[_0x7d66e2(0x213)],_0x374f3d);writeJsonAtomic(resolve(_0xfe1df2,METADATA_FILE),_0x4d2c3f);}export function deriveSkillCodeFromDirectory(_0x123b0d,_0x100152){const _0x3fa93c=a121_0x5289,_0x130829=basename(resolve(_0x123b0d)),_0x35e477=_0x100152+'--';return _0x130829['startsWith'](_0x35e477)?_0x130829['slice'](_0x35e477[_0x3fa93c(0x1fc)]):_0x130829;}function resolvePushSkillCode(_0x53d48c,_0x1abb03,_0x5e8b8c,_0x2b4ef2){const _0x2013b9=a121_0x5289,_0x5cc111=deriveSkillCodeFromSkillFile(_0x53d48c)||deriveSkillCodeFromDirectory(_0x53d48c,_0x1abb03);if(_0x2b4ef2[_0x2013b9(0x1da)])return _0x5cc111;return _0x5e8b8c?.[_0x2013b9(0x200)]?.[_0x2013b9(0x1dd)]()||_0x5cc111;}function deriveSkillCodeFromSkillFile(_0x494482){const _0x192ae8=a121_0x5289,_0x31bdeb=resolve(_0x494482,SKILL_FILE);if(!existsSync(_0x31bdeb)||!lstatSync(_0x31bdeb)[_0x192ae8(0x204)]())return undefined;const _0x2e3b99=readFileSync(_0x31bdeb,_0x192ae8(0x216)),_0x30e798=_0x2e3b99[_0x192ae8(0x1fe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x30e798)return undefined;const _0x593fb4=parseFrontmatterObject(_0x30e798[0x1]??''),_0x36fd1e=scalarToString(_0x593fb4?.[_0x192ae8(0x1f7)]);return _0x36fd1e?slugifySkillName(_0x36fd1e):undefined;}function readSkillDisplayName(_0x4bf35e){const _0x5f3aa9=a121_0x5289,_0xc36a6=_0x4bf35e[_0x5f3aa9(0x1fe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xc36a6)return undefined;const _0x4eec57=parseFrontmatterObject(_0xc36a6[0x1]??'');return scalarToString(_0x4eec57?.[_0x5f3aa9(0x218)]);}function a121_0x5289(_0x3888d6,_0x5f540c){_0x3888d6=_0x3888d6-0x1d9;const _0x5ab58d=a121_0x5ab5();let _0x528954=_0x5ab58d[_0x3888d6];return _0x528954;}function slugifySkillName(_0x219661){const _0x121219=a121_0x5289,_0x13e199=_0x219661[_0x121219(0x1dd)]()[_0x121219(0x210)]()[_0x121219(0x1e0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x121219(0x1e0)](/^-+/,'')[_0x121219(0x1e0)](/-+$/,'')[_0x121219(0x1e0)](/-{2,}/g,'-');if(!_0x13e199)throw CliErrors['validation'](_0x121219(0x1e3)+SKILL_FILE+_0x121219(0x1e6));return _0x13e199;}function parseFrontmatterObject(_0x5809eb){try{const _0x5f2a8e=a121_0x2b21b7(_0x5809eb);return _0x5f2a8e&&typeof _0x5f2a8e==='object'&&!Array['isArray'](_0x5f2a8e)?_0x5f2a8e:undefined;}catch{return undefined;}}function scalarToString(_0x4846f7){const _0x5ce38d=a121_0x5289;if(typeof _0x4846f7===_0x5ce38d(0x211))return _0x4846f7['trim']();if(typeof _0x4846f7===_0x5ce38d(0x203)||typeof _0x4846f7===_0x5ce38d(0x1e1))return String(_0x4846f7);return undefined;}function resolvePushDirectoryRoot(_0x4e5e5e){const _0x58a056=a121_0x5289,_0x268b11=resolve(_0x4e5e5e);if(!existsSync(_0x268b11))throw CliErrors[_0x58a056(0x1f6)](_0x58a056(0x1ec)+_0x4e5e5e);const _0x56c360=lstatSync(_0x268b11);if(_0x56c360[_0x58a056(0x209)]())return _0x268b11;if(_0x56c360['isSymbolicLink']()){const _0x1a7ef0=realpathSync(_0x268b11);if(lstatSync(_0x1a7ef0)['isDirectory']())return _0x1a7ef0;}throw CliErrors[_0x58a056(0x1f6)](_0x58a056(0x1ec)+_0x4e5e5e);}function requireRemoteScope(_0x37bffa){const _0x549ee1=a121_0x5289;if(_0x37bffa['scope']===_0x549ee1(0x1f3)||_0x37bffa[_0x549ee1(0x1fb)]==='company'||_0x37bffa['scope']===_0x549ee1(0x1f9))return _0x37bffa[_0x549ee1(0x1fb)];throw CliErrors['validation'](_0x549ee1(0x205)+(_0x37bffa['skillCode']||'(unknown)')+_0x549ee1(0x1e5)+(_0x37bffa[_0x549ee1(0x1fb)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x35ed95){const _0x138ffa=a121_0x5289,_0x248175=resolve(_0x35ed95,SKILL_FILE);return existsSync(_0x248175)&&lstatSync(_0x248175)['isFile']()?readFileSync(_0x248175,_0x138ffa(0x216)):'';}function readPushMetadataIfPresent(_0x62ed0d,_0x405405={}){const _0x37d512=a121_0x5289;try{return readMetadataIfPresent(_0x62ed0d);}catch(_0x115401){if(_0x405405[_0x37d512(0x1f1)])return undefined;throw _0x115401;}}
@@ -1 +1 @@
1
- function a122_0x5873(){const _0x3ad7d4=['2aYtPcu','personal','validation','10539KUqsKk','2630dwUCnr','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','builtin','company','2763125AnHBUn','7oQttpz','2279864hxvapJ','497680INYJqK','push','1321176snXlHr','671163ECZncP','1166061EJRFzw'];a122_0x5873=function(){return _0x3ad7d4;};return a122_0x5873();}(function(_0x55d0c5,_0x48a626){const _0x532154=a122_0x47d0,_0x3e5280=_0x55d0c5();while(!![]){try{const _0x35a308=-parseInt(_0x532154(0xa6))/0x1*(-parseInt(_0x532154(0x97))/0x2)+-parseInt(_0x532154(0xa7))/0x3+-parseInt(_0x532154(0xa3))/0x4+parseInt(_0x532154(0xa0))/0x5+-parseInt(_0x532154(0xa5))/0x6+parseInt(_0x532154(0xa1))/0x7*(-parseInt(_0x532154(0xa2))/0x8)+-parseInt(_0x532154(0x9a))/0x9*(-parseInt(_0x532154(0x9b))/0xa);if(_0x35a308===_0x48a626)break;else _0x3e5280['push'](_0x3e5280['shift']());}catch(_0x1ed206){_0x3e5280['push'](_0x3e5280['shift']());}}}(a122_0x5873,0x7d5c3));import{CliErrors}from'../../errors.js';function a122_0x47d0(_0x439bb8,_0x48abe0){_0x439bb8=_0x439bb8-0x97;const _0x58730f=a122_0x5873();let _0x47d0ca=_0x58730f[_0x439bb8];return _0x47d0ca;}export function normalizeRuntimeSkillScopes(_0x334df4){const _0x188787=a122_0x47d0,_0xb4ce61=_0x334df4&&_0x334df4['length']>0x0?_0x334df4:[_0x188787(0x98),'company',_0x188787(0x9e)],_0x1c1cab=[];for(const _0x1ce1a5 of _0xb4ce61){if(!isRuntimeSkillScope(_0x1ce1a5))throw CliErrors[_0x188787(0x99)](_0x188787(0x9d)+_0x1ce1a5);!_0x1c1cab[_0x188787(0x9c)](_0x1ce1a5)&&_0x1c1cab[_0x188787(0xa4)](_0x1ce1a5);}return _0x1c1cab;}export function isRuntimeSkillScope(_0x326213){const _0x8af606=a122_0x47d0;return _0x326213==='personal'||_0x326213===_0x8af606(0x9f)||_0x326213===_0x8af606(0x9e);}
1
+ function a122_0x27fc(){const _0x14fc83=['validation','Unsupported\x20runtime\x20Skill\x20scope:\x20','builtin','186028qVmacV','1pQkjCK','2857866QoBLZc','332582CvDIIN','personal','854352vuFgCr','includes','2399747CCXheC','push','13738599GjklKl','2482225JEpFZH','39xyGcft'];a122_0x27fc=function(){return _0x14fc83;};return a122_0x27fc();}(function(_0x3ea0b9,_0x13ce6c){const _0x3551bb=a122_0x223b,_0x253e5f=_0x3ea0b9();while(!![]){try{const _0x19f8de=-parseInt(_0x3551bb(0x1e7))/0x1*(parseInt(_0x3551bb(0x1e9))/0x2)+parseInt(_0x3551bb(0x1f1))/0x3*(-parseInt(_0x3551bb(0x1e6))/0x4)+parseInt(_0x3551bb(0x1f0))/0x5+-parseInt(_0x3551bb(0x1e8))/0x6+-parseInt(_0x3551bb(0x1ed))/0x7+-parseInt(_0x3551bb(0x1eb))/0x8+parseInt(_0x3551bb(0x1ef))/0x9;if(_0x19f8de===_0x13ce6c)break;else _0x253e5f['push'](_0x253e5f['shift']());}catch(_0xff9687){_0x253e5f['push'](_0x253e5f['shift']());}}}(a122_0x27fc,0x4fa04));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x77c388){const _0x18d9d5=a122_0x223b,_0x446550=_0x77c388&&_0x77c388['length']>0x0?_0x77c388:[_0x18d9d5(0x1ea),'company',_0x18d9d5(0x1f4)],_0x21d83f=[];for(const _0x40e65b of _0x446550){if(!isRuntimeSkillScope(_0x40e65b))throw CliErrors[_0x18d9d5(0x1f2)](_0x18d9d5(0x1f3)+_0x40e65b);!_0x21d83f[_0x18d9d5(0x1ec)](_0x40e65b)&&_0x21d83f[_0x18d9d5(0x1ee)](_0x40e65b);}return _0x21d83f;}function a122_0x223b(_0x11871c,_0x5baa1a){_0x11871c=_0x11871c-0x1e6;const _0x27fcc7=a122_0x27fc();let _0x223b64=_0x27fcc7[_0x11871c];return _0x223b64;}export function isRuntimeSkillScope(_0x3f60f0){const _0x471bcd=a122_0x223b;return _0x3f60f0==='personal'||_0x3f60f0==='company'||_0x3f60f0===_0x471bcd(0x1f4);}
@@ -1 +1 @@
1
- function a124_0x3679(_0x2f42fa,_0x247b3d){_0x2f42fa=_0x2f42fa-0xb7;const _0x4d3bb9=a124_0x4d3b();let _0x3679b2=_0x4d3bb9[_0x2f42fa];return _0x3679b2;}const a124_0x24d4f0=a124_0x3679;(function(_0x556be1,_0x2ba382){const _0x391c0b=a124_0x3679,_0x3bb842=_0x556be1();while(!![]){try{const _0x15af42=-parseInt(_0x391c0b(0xbc))/0x1+-parseInt(_0x391c0b(0xbb))/0x2*(-parseInt(_0x391c0b(0xba))/0x3)+-parseInt(_0x391c0b(0xca))/0x4*(-parseInt(_0x391c0b(0xc2))/0x5)+-parseInt(_0x391c0b(0xc5))/0x6*(-parseInt(_0x391c0b(0xc1))/0x7)+parseInt(_0x391c0b(0xb8))/0x8+parseInt(_0x391c0b(0xc3))/0x9+parseInt(_0x391c0b(0xc7))/0xa*(-parseInt(_0x391c0b(0xc6))/0xb);if(_0x15af42===_0x2ba382)break;else _0x3bb842['push'](_0x3bb842['shift']());}catch(_0x494f3b){_0x3bb842['push'](_0x3bb842['shift']());}}}(a124_0x4d3b,0x7594a));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a124_0x4d3b(){const _0x2c9fa7=['path','from','664peWMhr','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','map','endsWith','code','2119880vDrktx','length','15YibFeA','285666apxfAn','261112pihpcC','object','validation_error','validation','sort','45451pQRCYP','4105YwbpCO','8391717bbKTmK','1980-01-01T00:00:00.000Z','162HniBzW','22tsZxAO','7402190Vgwnlf'];a124_0x4d3b=function(){return _0x2c9fa7;};return a124_0x4d3b();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a124_0x24d4f0(0xc4));export function createDeterministicZipPackage(_0x181cab){const _0x512b1b=a124_0x24d4f0,_0x2380ce={};for(const _0x17c11f of normalizeLocalFiles(_0x181cab)){_0x2380ce[_0x17c11f[_0x512b1b(0xc8)]]=fileContent(_0x17c11f);}return Buffer[_0x512b1b(0xc9)](zipSync(_0x2380ce,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x1392d2){const _0x5384c4=a124_0x24d4f0;if(_0x1392d2[_0x5384c4(0xb9)]<0x16)throw CliErrors['validation'](_0x5384c4(0xcb));let _0x4e8d8b;try{_0x4e8d8b=unzipSync(_0x1392d2,{'filter'(_0x24a79d){const _0x321ef8=_0x5384c4,_0x294d4f=normalizeSkillRelativePath(_0x24a79d['name']);if(_0x294d4f[_0x321ef8(0xcf)]('/'))throw CliErrors['validation'](_0x321ef8(0xcd)+_0x294d4f);return!![];}});}catch(_0x342208){if(isRuntimeSkillValidationError(_0x342208))throw _0x342208;throw CliErrors[_0x5384c4(0xbf)](_0x5384c4(0xcb));}return Object[_0x5384c4(0xcc)](_0x4e8d8b)[_0x5384c4(0xce)](([_0x2d22dd,_0xea3d80])=>({'path':normalizeSkillRelativePath(_0x2d22dd),'bytes':Buffer[_0x5384c4(0xc9)](_0xea3d80)}))[_0x5384c4(0xc0)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x10e8f0){const _0x537c57=a124_0x24d4f0;return typeof _0x10e8f0===_0x537c57(0xbd)&&_0x10e8f0!==null&&_0x537c57(0xb7)in _0x10e8f0&&_0x10e8f0[_0x537c57(0xb7)]===_0x537c57(0xbe);}
1
+ (function(_0x158ce9,_0x3c0b84){const _0x3526fb=a124_0x431b,_0x19cb37=_0x158ce9();while(!![]){try{const _0x6c7b44=-parseInt(_0x3526fb(0x115))/0x1+-parseInt(_0x3526fb(0x116))/0x2+parseInt(_0x3526fb(0x11e))/0x3+-parseInt(_0x3526fb(0x112))/0x4+-parseInt(_0x3526fb(0x124))/0x5*(-parseInt(_0x3526fb(0x122))/0x6)+parseInt(_0x3526fb(0x11a))/0x7+parseInt(_0x3526fb(0x119))/0x8;if(_0x6c7b44===_0x3c0b84)break;else _0x19cb37['push'](_0x19cb37['shift']());}catch(_0x439da0){_0x19cb37['push'](_0x19cb37['shift']());}}}(a124_0x84de,0x6fc3c));function a124_0x431b(_0x410569,_0x21751a){_0x410569=_0x410569-0x112;const _0x84de42=a124_0x84de();let _0x431bfd=_0x84de42[_0x410569];return _0x431bfd;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a124_0x84de(){const _0x300cff=['223592fPIcRz','validation','sort','1719272yAzHeL','1060059mfLqhW','name','entries','endsWith','1503321CFjTQO','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','length','code','6SdTgAs','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','4298200VImKxf','2785240fusWnU','from','validation_error','461199FLceCq'];a124_0x84de=function(){return _0x300cff;};return a124_0x84de();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x5bfb93){const _0x35069e=a124_0x431b,_0x3012fe={};for(const _0x21d7ac of normalizeLocalFiles(_0x5bfb93)){_0x3012fe[_0x21d7ac['path']]=fileContent(_0x21d7ac);}return Buffer[_0x35069e(0x113)](zipSync(_0x3012fe,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x4a0e08){const _0x29d617=a124_0x431b;if(_0x4a0e08[_0x29d617(0x120)]<0x16)throw CliErrors[_0x29d617(0x117)](_0x29d617(0x123));let _0x266ecf;try{_0x266ecf=unzipSync(_0x4a0e08,{'filter'(_0x5aebc0){const _0x3a93fd=_0x29d617,_0x50bd3a=normalizeSkillRelativePath(_0x5aebc0[_0x3a93fd(0x11b)]);if(_0x50bd3a[_0x3a93fd(0x11d)]('/'))throw CliErrors[_0x3a93fd(0x117)](_0x3a93fd(0x11f)+_0x50bd3a);return!![];}});}catch(_0x4b69c7){if(isRuntimeSkillValidationError(_0x4b69c7))throw _0x4b69c7;throw CliErrors[_0x29d617(0x117)](_0x29d617(0x123));}return Object[_0x29d617(0x11c)](_0x266ecf)['map'](([_0x45cfa8,_0x58894b])=>({'path':normalizeSkillRelativePath(_0x45cfa8),'bytes':Buffer['from'](_0x58894b)}))[_0x29d617(0x118)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x237fcf){const _0x54a173=a124_0x431b;return typeof _0x237fcf==='object'&&_0x237fcf!==null&&_0x54a173(0x121)in _0x237fcf&&_0x237fcf['code']===_0x54a173(0x114);}
@@ -1 +1 @@
1
- (function(_0x20c84b,_0x4dbd07){const _0x4d7063=a125_0x4fa4,_0x12dd43=_0x20c84b();while(!![]){try{const _0x1e885f=parseInt(_0x4d7063(0xb0))/0x1*(parseInt(_0x4d7063(0xba))/0x2)+-parseInt(_0x4d7063(0xc8))/0x3+parseInt(_0x4d7063(0xb7))/0x4*(-parseInt(_0x4d7063(0xc2))/0x5)+-parseInt(_0x4d7063(0xce))/0x6+parseInt(_0x4d7063(0xcc))/0x7*(parseInt(_0x4d7063(0xb4))/0x8)+parseInt(_0x4d7063(0xbd))/0x9+-parseInt(_0x4d7063(0xb5))/0xa*(-parseInt(_0x4d7063(0xb1))/0xb);if(_0x1e885f===_0x4dbd07)break;else _0x12dd43['push'](_0x12dd43['shift']());}catch(_0x4e1e33){_0x12dd43['push'](_0x12dd43['shift']());}}}(a125_0x37ac,0x2518e));import{CliErrors}from'../../errors.js';function a125_0x37ac(){const _0x5bff5c=['Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isArray','zipSize','844945emwcGH','size','toString','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','treeSha256','isSafeInteger','506241sUSJiI','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','ossPath','594265mqtRdr','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','490836zyJaGU','set','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','map','some','requireOssPath','toLowerCase','has','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','bytes','string','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','validation','path','files','get','Missing\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','1714viSsip','11QKkKGQ','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','16GcABAA','1403680QVhZRW','length','4mqudYW','Duplicate\x20Skill\x20package\x20entry:\x20','zipSha256','100LhFpdG','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','sha256','1580706TFezJU','object'];a125_0x37ac=function(){return _0x5bff5c;};return a125_0x37ac();}import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x4897e3){const _0x55ca09=a125_0x4fa4,_0x499cf6=normalizeLocalFiles(_0x4897e3);if(!_0x499cf6[_0x55ca09(0xa2)](_0x35ffd3=>_0x35ffd3['path']===SKILL_FILE))throw CliErrors['validation'](_0x55ca09(0xae)+SKILL_FILE+_0x55ca09(0xb2));const _0x2c815c=localFilesToManifestFiles(_0x499cf6),_0x389060=createDeterministicZipPackage(_0x499cf6);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x2c815c),'zipSha256':bufferSha256(_0x389060),'zipSize':_0x389060[_0x55ca09(0xb6)],'files':_0x2c815c},'packageBytes':_0x389060,'packageBase64':_0x389060[_0x55ca09(0xc4)]('base64')};}export function verifyRuntimeSkillPackage(_0x3f259e,_0x3a6e2f){const _0x346c9a=normalizePackageManifest(_0x3f259e,{'requireOssPath':![]});if(!_0x346c9a)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x346c9a,_0x3a6e2f);}export function verifyRuntimeSkillBundle(_0x309a4c,_0xe6a98e){const _0x56614b=a125_0x4fa4,_0x17d898=normalizePackageManifest(_0x309a4c,{'requireOssPath':![]});if(!_0x17d898)throw CliErrors[_0x56614b(0xaa)](_0x56614b(0xc5));return extractAndVerifyPackageFiles(_0x17d898,_0xe6a98e);}export function tryNormalizePackageManifest(_0x26ef7c){return normalizePackageManifest(_0x26ef7c,{'requireOssPath':![]});}export function requirePackageBytes(_0x399294,_0x26558f){const _0x255158=a125_0x4fa4;if(!_0x26558f||_0x26558f[_0x255158(0xb6)]===0x0)throw CliErrors[_0x255158(0xaa)](_0x255158(0xbf)+_0x399294);return _0x26558f;}export function extractDownloadedPackage(_0x40e622){const _0xf1e79e=a125_0x4fa4,_0x4d5117=parseZipPackage(_0x40e622)['map'](_0x284414=>({'path':_0x284414[_0xf1e79e(0xab)],'bytes':_0x284414[_0xf1e79e(0xa7)]}));if(!_0x4d5117[_0xf1e79e(0xa2)](_0x4a8551=>_0x4a8551['path']===SKILL_FILE))throw CliErrors[_0xf1e79e(0xaa)](_0xf1e79e(0xc9)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4d5117);}function a125_0x4fa4(_0x44a20b,_0x44a405){_0x44a20b=_0x44a20b-0xa2;const _0x37acfa=a125_0x37ac();let _0x4fa468=_0x37acfa[_0x44a20b];return _0x4fa468;}export function localFilesToManifestFiles(_0x5f417f){const _0x16bd06=a125_0x4fa4;return normalizeLocalFiles(_0x5f417f)[_0x16bd06(0xd2)](_0x4fff40=>({'path':_0x4fff40[_0x16bd06(0xab)],'sha256':fileHash(_0x4fff40),'size':fileContent(_0x4fff40)['length']}));}function normalizePackageManifest(_0xdc0944,_0xfdacea){const _0x536b0d=a125_0x4fa4;if(!_0xdc0944||typeof _0xdc0944!==_0x536b0d(0xbe)||Array['isArray'](_0xdc0944))return undefined;const _0x351860=_0xdc0944,_0xc51318=typeof _0x351860[_0x536b0d(0xcb)]===_0x536b0d(0xa8)?_0x351860['ossPath']['trim']():undefined;if(_0xfdacea[_0x536b0d(0xa3)]&&!_0xc51318)return undefined;if(!Array[_0x536b0d(0xc0)](_0x351860['files'])||_0x351860[_0x536b0d(0xac)][_0x536b0d(0xb6)]===0x0)return undefined;if(!isSha256Hex(_0x351860[_0x536b0d(0xc6)]))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xcd));if(!isSha256Hex(_0x351860['zipSha256']))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xb3));if(!Number['isSafeInteger'](_0x351860['zipSize'])||_0x351860['zipSize']<0x0)throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xa6));const _0xbeceae=normalizeManifestFiles(_0x351860[_0x536b0d(0xac)]);if(!_0xbeceae['some'](_0x55c89e=>_0x55c89e[_0x536b0d(0xab)]===SKILL_FILE))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xbb)+SKILL_FILE+'.');const _0x3355d0=fileTreeHash(_0xbeceae);if(_0x3355d0!==_0x351860[_0x536b0d(0xc6)][_0x536b0d(0xa4)]())throw CliErrors[_0x536b0d(0xaa)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x536b0d(0xc7)](_0x351860['schemaVersion'])?_0x351860[_0x536b0d(0xd0)]:0x2,'ossPath':_0xc51318,'treeSha256':_0x3355d0,'zipSha256':_0x351860[_0x536b0d(0xb9)][_0x536b0d(0xa4)](),'zipSize':_0x351860[_0x536b0d(0xc1)],'files':_0xbeceae};}function extractAndVerifyPackage(_0x135777,_0x55fd31){const _0xf34247=a125_0x4fa4,_0x10e9c1=normalizePackageManifest(_0x135777,{'requireOssPath':![]});if(!_0x10e9c1)throw CliErrors[_0xf34247(0xaa)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x55fd31[_0xf34247(0xb6)]!==_0x10e9c1[_0xf34247(0xc1)])throw CliErrors[_0xf34247(0xaa)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x398620=bufferSha256(_0x55fd31);if(_0x398620!==_0x10e9c1[_0xf34247(0xb9)])throw CliErrors[_0xf34247(0xaa)](_0xf34247(0xca));return extractAndVerifyPackageFiles(_0x10e9c1,_0x55fd31);}function extractAndVerifyPackageFiles(_0x5721d,_0x41655a){const _0x555595=a125_0x4fa4,_0x5dfeed=parseZipPackage(_0x41655a);if(_0x5dfeed[_0x555595(0xb6)]!==_0x5721d[_0x555595(0xac)][_0x555595(0xb6)])throw CliErrors[_0x555595(0xaa)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x27444b=new Map();for(const _0x1ae74e of _0x5dfeed){if(_0x27444b[_0x555595(0xa5)](_0x1ae74e[_0x555595(0xab)]))throw CliErrors[_0x555595(0xaa)](_0x555595(0xb8)+_0x1ae74e[_0x555595(0xab)]);_0x27444b[_0x555595(0xcf)](_0x1ae74e[_0x555595(0xab)],_0x1ae74e);}const _0x55fcf0=[];for(const _0x34245b of _0x5721d[_0x555595(0xac)]){const _0x5b51e0=_0x27444b[_0x555595(0xad)](_0x34245b['path']);if(!_0x5b51e0)throw CliErrors['validation'](_0x555595(0xd1)+_0x34245b['path']);if(_0x5b51e0[_0x555595(0xa7)][_0x555595(0xb6)]!==_0x34245b[_0x555595(0xc3)])throw CliErrors[_0x555595(0xaa)](_0x555595(0xaf)+_0x34245b[_0x555595(0xab)]);const _0x3edc45=bufferSha256(_0x5b51e0['bytes']);if(_0x3edc45!==_0x34245b[_0x555595(0xbc)])throw CliErrors[_0x555595(0xaa)](_0x555595(0xa9)+_0x34245b['path']);_0x55fcf0['push']({'path':_0x34245b[_0x555595(0xab)],'bytes':_0x5b51e0['bytes']});}return normalizeLocalFiles(_0x55fcf0);}
1
+ (function(_0xf0a75a,_0x5715fc){const _0x7aa151=a125_0xa8dd,_0x40d787=_0xf0a75a();while(!![]){try{const _0x10e966=-parseInt(_0x7aa151(0x195))/0x1+-parseInt(_0x7aa151(0x197))/0x2+parseInt(_0x7aa151(0x18a))/0x3*(parseInt(_0x7aa151(0x1a5))/0x4)+-parseInt(_0x7aa151(0x19c))/0x5*(-parseInt(_0x7aa151(0x196))/0x6)+-parseInt(_0x7aa151(0x1b4))/0x7*(parseInt(_0x7aa151(0x199))/0x8)+-parseInt(_0x7aa151(0x1ad))/0x9+-parseInt(_0x7aa151(0x194))/0xa*(-parseInt(_0x7aa151(0x19d))/0xb);if(_0x10e966===_0x5715fc)break;else _0x40d787['push'](_0x40d787['shift']());}catch(_0x2bd72f){_0x40d787['push'](_0x40d787['shift']());}}}(a125_0x3c17,0x36caf));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x2e0c9d){const _0x2c01e0=a125_0xa8dd,_0x35c1e8=normalizeLocalFiles(_0x2e0c9d);if(!_0x35c1e8[_0x2c01e0(0x19a)](_0x5be077=>_0x5be077[_0x2c01e0(0x190)]===SKILL_FILE))throw CliErrors[_0x2c01e0(0x1af)](_0x2c01e0(0x18f)+SKILL_FILE+_0x2c01e0(0x192));const _0x5c9106=localFilesToManifestFiles(_0x35c1e8),_0x24ebd4=createDeterministicZipPackage(_0x35c1e8);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5c9106),'zipSha256':bufferSha256(_0x24ebd4),'zipSize':_0x24ebd4[_0x2c01e0(0x1aa)],'files':_0x5c9106},'packageBytes':_0x24ebd4,'packageBase64':_0x24ebd4[_0x2c01e0(0x1ac)](_0x2c01e0(0x1ab))};}export function verifyRuntimeSkillPackage(_0x4c22e8,_0x5f441f){const _0x3e7b46=a125_0xa8dd,_0x1e88a6=normalizePackageManifest(_0x4c22e8,{'requireOssPath':![]});if(!_0x1e88a6)throw CliErrors[_0x3e7b46(0x1af)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x1e88a6,_0x5f441f);}export function verifyRuntimeSkillBundle(_0x2d32ec,_0x3d3943){const _0x1af549=a125_0xa8dd,_0x2ce04f=normalizePackageManifest(_0x2d32ec,{'requireOssPath':![]});if(!_0x2ce04f)throw CliErrors[_0x1af549(0x1af)](_0x1af549(0x19e));return extractAndVerifyPackageFiles(_0x2ce04f,_0x3d3943);}export function tryNormalizePackageManifest(_0x8015d0){return normalizePackageManifest(_0x8015d0,{'requireOssPath':![]});}function a125_0xa8dd(_0xb6d8f1,_0xd46170){_0xb6d8f1=_0xb6d8f1-0x188;const _0x3c17eb=a125_0x3c17();let _0xa8dd07=_0x3c17eb[_0xb6d8f1];return _0xa8dd07;}export function requirePackageBytes(_0x24dae9,_0x3385d6){const _0x38047e=a125_0xa8dd;if(!_0x3385d6||_0x3385d6['length']===0x0)throw CliErrors[_0x38047e(0x1af)](_0x38047e(0x1a2)+_0x24dae9);return _0x3385d6;}export function extractDownloadedPackage(_0x57ddd2){const _0x582923=a125_0xa8dd,_0x3cd692=parseZipPackage(_0x57ddd2)['map'](_0x39ddd7=>({'path':_0x39ddd7[_0x582923(0x190)],'bytes':_0x39ddd7['bytes']}));if(!_0x3cd692[_0x582923(0x19a)](_0x27a57c=>_0x27a57c['path']===SKILL_FILE))throw CliErrors['validation'](_0x582923(0x1a4)+SKILL_FILE+'.');return normalizeLocalFiles(_0x3cd692);}export function localFilesToManifestFiles(_0x2e2f0c){const _0x1a13b7=a125_0xa8dd;return normalizeLocalFiles(_0x2e2f0c)['map'](_0x4dcfbd=>({'path':_0x4dcfbd[_0x1a13b7(0x190)],'sha256':fileHash(_0x4dcfbd),'size':fileContent(_0x4dcfbd)[_0x1a13b7(0x1aa)]}));}function normalizePackageManifest(_0x289819,_0x56ca9){const _0x4b8898=a125_0xa8dd;if(!_0x289819||typeof _0x289819!==_0x4b8898(0x189)||Array[_0x4b8898(0x18e)](_0x289819))return undefined;const _0x120375=_0x289819,_0x48e6aa=typeof _0x120375[_0x4b8898(0x19f)]==='string'?_0x120375[_0x4b8898(0x19f)]['trim']():undefined;if(_0x56ca9['requireOssPath']&&!_0x48e6aa)return undefined;if(!Array[_0x4b8898(0x18e)](_0x120375[_0x4b8898(0x1a0)])||_0x120375['files'][_0x4b8898(0x1aa)]===0x0)return undefined;if(!isSha256Hex(_0x120375['treeSha256']))throw CliErrors[_0x4b8898(0x1af)](_0x4b8898(0x1b3));if(!isSha256Hex(_0x120375['zipSha256']))throw CliErrors['validation'](_0x4b8898(0x191));if(!Number[_0x4b8898(0x1b2)](_0x120375[_0x4b8898(0x18c)])||_0x120375[_0x4b8898(0x18c)]<0x0)throw CliErrors[_0x4b8898(0x1af)](_0x4b8898(0x188));const _0xd6d8c2=normalizeManifestFiles(_0x120375[_0x4b8898(0x1a0)]);if(!_0xd6d8c2['some'](_0x395817=>_0x395817[_0x4b8898(0x190)]===SKILL_FILE))throw CliErrors[_0x4b8898(0x1af)](_0x4b8898(0x1b0)+SKILL_FILE+'.');const _0x564957=fileTreeHash(_0xd6d8c2);if(_0x564957!==_0x120375[_0x4b8898(0x18d)][_0x4b8898(0x1a8)]())throw CliErrors['validation'](_0x4b8898(0x18b));return{'schemaVersion':Number[_0x4b8898(0x1b2)](_0x120375[_0x4b8898(0x1a3)])?_0x120375[_0x4b8898(0x1a3)]:0x2,'ossPath':_0x48e6aa,'treeSha256':_0x564957,'zipSha256':_0x120375[_0x4b8898(0x193)][_0x4b8898(0x1a8)](),'zipSize':_0x120375[_0x4b8898(0x18c)],'files':_0xd6d8c2};}function a125_0x3c17(){const _0x3a08ab=['files','has','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20','30428ShCoXE','bytes','set','toLowerCase','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','length','base64','toString','3280788AgohiW','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','validation','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isSafeInteger','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','224pZYLxv','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','object','177Dcleav','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','zipSize','treeSha256','isArray','Missing\x20','path','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','\x20in\x20Skill\x20file\x20package.','zipSha256','80wLYYSj','377758EMerXa','1770906yiCdSL','449814WztIjb','get','23704FHMDBD','some','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','5ZaqMFw','745910nXDUta','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','ossPath'];a125_0x3c17=function(){return _0x3a08ab;};return a125_0x3c17();}function extractAndVerifyPackage(_0x3dd79c,_0xfc1118){const _0x3b89c8=a125_0xa8dd,_0x3a35c0=normalizePackageManifest(_0x3dd79c,{'requireOssPath':![]});if(!_0x3a35c0)throw CliErrors[_0x3b89c8(0x1af)](_0x3b89c8(0x19e));if(_0xfc1118[_0x3b89c8(0x1aa)]!==_0x3a35c0[_0x3b89c8(0x18c)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0xd93619=bufferSha256(_0xfc1118);if(_0xd93619!==_0x3a35c0['zipSha256'])throw CliErrors[_0x3b89c8(0x1af)](_0x3b89c8(0x1b1));return extractAndVerifyPackageFiles(_0x3a35c0,_0xfc1118);}function extractAndVerifyPackageFiles(_0x4fed3b,_0x5ba4a0){const _0x35c65c=a125_0xa8dd,_0xf8eaab=parseZipPackage(_0x5ba4a0);if(_0xf8eaab['length']!==_0x4fed3b[_0x35c65c(0x1a0)][_0x35c65c(0x1aa)])throw CliErrors['validation'](_0x35c65c(0x19b));const _0x4d7a6f=new Map();for(const _0x22207f of _0xf8eaab){if(_0x4d7a6f[_0x35c65c(0x1a1)](_0x22207f[_0x35c65c(0x190)]))throw CliErrors['validation']('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x22207f[_0x35c65c(0x190)]);_0x4d7a6f[_0x35c65c(0x1a7)](_0x22207f[_0x35c65c(0x190)],_0x22207f);}const _0x1f2fae=[];for(const _0x2206e8 of _0x4fed3b[_0x35c65c(0x1a0)]){const _0x1ff4de=_0x4d7a6f[_0x35c65c(0x198)](_0x2206e8[_0x35c65c(0x190)]);if(!_0x1ff4de)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x2206e8[_0x35c65c(0x190)]);if(_0x1ff4de['bytes'][_0x35c65c(0x1aa)]!==_0x2206e8['size'])throw CliErrors[_0x35c65c(0x1af)](_0x35c65c(0x1ae)+_0x2206e8[_0x35c65c(0x190)]);const _0x46bae8=bufferSha256(_0x1ff4de[_0x35c65c(0x1a6)]);if(_0x46bae8!==_0x2206e8['sha256'])throw CliErrors[_0x35c65c(0x1af)](_0x35c65c(0x1a9)+_0x2206e8['path']);_0x1f2fae['push']({'path':_0x2206e8[_0x35c65c(0x190)],'bytes':_0x1ff4de[_0x35c65c(0x1a6)]});}return normalizeLocalFiles(_0x1f2fae);}
@@ -1 +1 @@
1
- (function(_0x175e4f,_0x3dbdaf){var _0x576dfa=a126_0x5217,_0x2322be=_0x175e4f();while(!![]){try{var _0x3243cb=parseInt(_0x576dfa(0x1c5))/0x1*(parseInt(_0x576dfa(0x1c9))/0x2)+-parseInt(_0x576dfa(0x1cc))/0x3+parseInt(_0x576dfa(0x1c8))/0x4+-parseInt(_0x576dfa(0x1c6))/0x5+-parseInt(_0x576dfa(0x1cb))/0x6*(-parseInt(_0x576dfa(0x1c7))/0x7)+-parseInt(_0x576dfa(0x1ce))/0x8*(-parseInt(_0x576dfa(0x1cd))/0x9)+parseInt(_0x576dfa(0x1cf))/0xa*(-parseInt(_0x576dfa(0x1ca))/0xb);if(_0x3243cb===_0x3dbdaf)break;else _0x2322be['push'](_0x2322be['shift']());}catch(_0x3140c9){_0x2322be['push'](_0x2322be['shift']());}}}(a126_0x7406,0x642cb));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 a126_0x5217(_0x2fb9de,_0x56d412){_0x2fb9de=_0x2fb9de-0x1c5;var _0x7406c5=a126_0x7406();var _0x521743=_0x7406c5[_0x2fb9de];return _0x521743;}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';function a126_0x7406(){var _0x3a0ecc=['3211760utUGWL','180CelrnH','467qGNNAN','176220gYnkEe','972741yvuhLG','770092jWbxrv','3390ZhUdhS','563629kdcdVi','6oiaxqG','469980jvKMXc','9rsCCos'];a126_0x7406=function(){return _0x3a0ecc;};return a126_0x7406();}
1
+ (function(_0x2696fb,_0x2b6139){var _0x22cfb3=a126_0x4e26,_0x245398=_0x2696fb();while(!![]){try{var _0x1a58c0=parseInt(_0x22cfb3(0xad))/0x1*(-parseInt(_0x22cfb3(0xb9))/0x2)+parseInt(_0x22cfb3(0xae))/0x3*(parseInt(_0x22cfb3(0xb1))/0x4)+-parseInt(_0x22cfb3(0xb5))/0x5+parseInt(_0x22cfb3(0xaf))/0x6*(parseInt(_0x22cfb3(0xb7))/0x7)+parseInt(_0x22cfb3(0xb0))/0x8*(parseInt(_0x22cfb3(0xb8))/0x9)+-parseInt(_0x22cfb3(0xb6))/0xa*(-parseInt(_0x22cfb3(0xb3))/0xb)+parseInt(_0x22cfb3(0xb2))/0xc*(-parseInt(_0x22cfb3(0xb4))/0xd);if(_0x1a58c0===_0x2b6139)break;else _0x245398['push'](_0x245398['shift']());}catch(_0x1c3fa0){_0x245398['push'](_0x245398['shift']());}}}(a126_0x3335,0xc7f8c));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a126_0x3335(){var _0x5b6a13=['4yQfEDy','88611BGtDCQ','3ucORgG','9111786exHjLZ','8yXEfch','950956DpHuIc','72veohbp','12098383tkyUUa','3590717rpChKP','3838075wPCNYR','10jPFvre','7jXDddz','5084568yKpuPu'];a126_0x3335=function(){return _0x5b6a13;};return a126_0x3335();}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a126_0x4e26(_0x1e6855,_0x15101f){_0x1e6855=_0x1e6855-0xad;var _0x333591=a126_0x3335();var _0x4e260f=_0x333591[_0x1e6855];return _0x4e260f;}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- const a127_0x438f27=a127_0x2a83;(function(_0x51318c,_0x19660d){const _0x46b165=a127_0x2a83,_0x1f08e7=_0x51318c();while(!![]){try{const _0x3d4993=-parseInt(_0x46b165(0x1ba))/0x1+-parseInt(_0x46b165(0x1b4))/0x2+-parseInt(_0x46b165(0x1c0))/0x3*(-parseInt(_0x46b165(0x1b7))/0x4)+parseInt(_0x46b165(0x1c3))/0x5+parseInt(_0x46b165(0x1c9))/0x6+-parseInt(_0x46b165(0x1b9))/0x7+parseInt(_0x46b165(0x1ad))/0x8;if(_0x3d4993===_0x19660d)break;else _0x1f08e7['push'](_0x1f08e7['shift']());}catch(_0x395acb){_0x1f08e7['push'](_0x1f08e7['shift']());}}}(a127_0x1e49,0xb8b4c));function a127_0x2a83(_0xb32bf7,_0xc738ab){_0xb32bf7=_0xb32bf7-0x1a9;const _0x1e49cf=a127_0x1e49();let _0x2a8367=_0x1e49cf[_0xb32bf7];return _0x2a8367;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a127_0x438f27(0x1c1),a127_0x438f27(0x1bc));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a127_0x438f27(0x1c1),a127_0x438f27(0x1ab)),join('.claude',a127_0x438f27(0x1ab))];const SUPPORTED_LOCK_VERSIONS=[0x3];function a127_0x1e49(){const _0x754374=['.agents','absent','6974365bghlZo','unusable','\x20records\x20\x22','globalSkillsDirs','object','unverifiable','5070936OgCvbF','recorded','find','skills','version','8097648faUvhE','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','\x20has\x20no\x20skills\x20map','message','reason','map','parse','864820MCHTrW','join','home','292bdezwz','utf8','7526267uuzjGu','1449375ItUgOG','not-recorded','.skill-lock.json','lockFile','kind','SKILL.md','18957uzYehg'];a127_0x1e49=function(){return _0x754374;};return a127_0x1e49();}function readLockLookup(_0x20bc55,_0x5310af){const _0x58f167=a127_0x438f27;if(!existsSync(_0x20bc55))return{'kind':_0x58f167(0x1bb)};let _0x3df3b2;try{_0x3df3b2=JSON[_0x58f167(0x1b3)](readFileSync(_0x20bc55,_0x58f167(0x1b8)));}catch(_0x57b2d9){return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+'\x20is\x20unreadable:\x20'+_0x57b2d9[_0x58f167(0x1b0)]};}const _0x3a2fe2=_0x3df3b2;if(typeof _0x3a2fe2?.[_0x58f167(0x1ac)]!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x3a2fe2[_0x58f167(0x1ac)]))return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+'\x20uses\x20unsupported\x20version\x20'+String(_0x3a2fe2?.['version'])};if(!_0x3a2fe2[_0x58f167(0x1ab)]||typeof _0x3a2fe2[_0x58f167(0x1ab)]!==_0x58f167(0x1c7))return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+_0x58f167(0x1af)};return _0x3a2fe2[_0x58f167(0x1ab)][_0x5310af]?{'kind':_0x58f167(0x1a9)}:{'kind':_0x58f167(0x1bb)};}export function resolveInstalledSkill(_0x105b12,_0xf11c67){const _0x23ba55=a127_0x438f27,_0x578d88=_0xf11c67?.[_0x23ba55(0x1b6)]??homedir(),_0x10e07d=_0xf11c67?.[_0x23ba55(0x1c6)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x412bc0=>join(_0x578d88,_0x412bc0)),_0x1a0648=_0xf11c67?.[_0x23ba55(0x1bd)]??join(_0x578d88,SKILL_LOCK_RELATIVE_PATH),_0x92cab0=_0x10e07d[_0x23ba55(0x1b2)](_0xd6d809=>join(_0xd6d809,_0x105b12,_0x23ba55(0x1bf))),_0x351826=_0x92cab0[_0x23ba55(0x1aa)](_0x28725a=>existsSync(_0x28725a));if(_0x351826)return{'state':'present','path':_0x351826};const _0x26bbeb=readLockLookup(_0x1a0648,_0x105b12);if(_0x26bbeb[_0x23ba55(0x1be)]===_0x23ba55(0x1c4))return{'state':_0x23ba55(0x1c8),'reason':_0x26bbeb[_0x23ba55(0x1b1)]};if(_0x26bbeb[_0x23ba55(0x1be)]===_0x23ba55(0x1a9))return{'state':'unverifiable','reason':_0x1a0648+_0x23ba55(0x1c5)+_0x105b12+_0x23ba55(0x1ae)+('('+_0x92cab0[_0x23ba55(0x1b5)](',\x20')+')')};return{'state':_0x23ba55(0x1c2),'checked':_0x92cab0};}
1
+ const a127_0x466e70=a127_0x7dee;(function(_0x356880,_0x2e0abe){const _0x26e22c=a127_0x7dee,_0x4a8509=_0x356880();while(!![]){try{const _0x5923d7=-parseInt(_0x26e22c(0x18b))/0x1+-parseInt(_0x26e22c(0x187))/0x2*(parseInt(_0x26e22c(0x17a))/0x3)+-parseInt(_0x26e22c(0x17c))/0x4*(-parseInt(_0x26e22c(0x189))/0x5)+parseInt(_0x26e22c(0x192))/0x6*(-parseInt(_0x26e22c(0x18a))/0x7)+parseInt(_0x26e22c(0x193))/0x8*(parseInt(_0x26e22c(0x17d))/0x9)+-parseInt(_0x26e22c(0x191))/0xa+parseInt(_0x26e22c(0x17e))/0xb;if(_0x5923d7===_0x2e0abe)break;else _0x4a8509['push'](_0x4a8509['shift']());}catch(_0x880533){_0x4a8509['push'](_0x4a8509['shift']());}}}(a127_0x2dda,0xdcbc7));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a127_0x2dda(){const _0x3a520e=['utf8','\x20has\x20no\x20skills\x20map','SKILL.md','254986xmqoDy','home','5667695tFsZVM','4193pKyCkD','665574sTIRyj','includes','\x20is\x20unreadable:\x20','\x20records\x20\x22','globalSkillsDirs','skills','6147300tQssAd','5946XiBFth','232UIGesX','recorded','unverifiable','kind','lockFile','unusable','join','.agents','15wSIKiY','map','4VgeYxg','41859eJxyjQ','23618045SrJPeF','.skill-lock.json','number','parse','.claude','version'];a127_0x2dda=function(){return _0x3a520e;};return a127_0x2dda();}function a127_0x7dee(_0x5d2ff7,_0x20bb42){_0x5d2ff7=_0x5d2ff7-0x17a;const _0x2ddafc=a127_0x2dda();let _0x7dee77=_0x2ddafc[_0x5d2ff7];return _0x7dee77;}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a127_0x466e70(0x19a),a127_0x466e70(0x17f));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a127_0x466e70(0x19a),a127_0x466e70(0x190)),join(a127_0x466e70(0x182),a127_0x466e70(0x190))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0xff3d55,_0x1b82df){const _0x4b6bdc=a127_0x466e70;if(!existsSync(_0xff3d55))return{'kind':'not-recorded'};let _0x330e57;try{_0x330e57=JSON[_0x4b6bdc(0x181)](readFileSync(_0xff3d55,_0x4b6bdc(0x184)));}catch(_0x28c9af){return{'kind':_0x4b6bdc(0x198),'reason':_0xff3d55+_0x4b6bdc(0x18d)+_0x28c9af['message']};}const _0x121345=_0x330e57;if(typeof _0x121345?.[_0x4b6bdc(0x183)]!==_0x4b6bdc(0x180)||!SUPPORTED_LOCK_VERSIONS[_0x4b6bdc(0x18c)](_0x121345[_0x4b6bdc(0x183)]))return{'kind':_0x4b6bdc(0x198),'reason':_0xff3d55+'\x20uses\x20unsupported\x20version\x20'+String(_0x121345?.['version'])};if(!_0x121345[_0x4b6bdc(0x190)]||typeof _0x121345[_0x4b6bdc(0x190)]!=='object')return{'kind':_0x4b6bdc(0x198),'reason':_0xff3d55+_0x4b6bdc(0x185)};return _0x121345[_0x4b6bdc(0x190)][_0x1b82df]?{'kind':_0x4b6bdc(0x194)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x2d84a1,_0x183681){const _0x44276b=a127_0x466e70,_0x4861d1=_0x183681?.[_0x44276b(0x188)]??homedir(),_0x2bbaaa=_0x183681?.[_0x44276b(0x18f)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x44276b(0x17b)](_0x2a28d2=>join(_0x4861d1,_0x2a28d2)),_0x9d1feb=_0x183681?.[_0x44276b(0x197)]??join(_0x4861d1,SKILL_LOCK_RELATIVE_PATH),_0x126364=_0x2bbaaa[_0x44276b(0x17b)](_0x3c7edb=>join(_0x3c7edb,_0x2d84a1,_0x44276b(0x186))),_0x45b278=_0x126364['find'](_0x3724ff=>existsSync(_0x3724ff));if(_0x45b278)return{'state':'present','path':_0x45b278};const _0xb7ad2=readLockLookup(_0x9d1feb,_0x2d84a1);if(_0xb7ad2[_0x44276b(0x196)]===_0x44276b(0x198))return{'state':_0x44276b(0x195),'reason':_0xb7ad2['reason']};if(_0xb7ad2[_0x44276b(0x196)]===_0x44276b(0x194))return{'state':_0x44276b(0x195),'reason':_0x9d1feb+_0x44276b(0x18e)+_0x2d84a1+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x126364[_0x44276b(0x199)](',\x20')+')')};return{'state':'absent','checked':_0x126364};}
@@ -1 +1 @@
1
- (function(_0x2b50e7,_0x58a973){const _0x3b73c1=a128_0x114c,_0x56c193=_0x2b50e7();while(!![]){try{const _0x12f868=parseInt(_0x3b73c1(0x18a))/0x1*(parseInt(_0x3b73c1(0x192))/0x2)+parseInt(_0x3b73c1(0x189))/0x3+-parseInt(_0x3b73c1(0x18b))/0x4*(parseInt(_0x3b73c1(0x193))/0x5)+-parseInt(_0x3b73c1(0x18f))/0x6+parseInt(_0x3b73c1(0x18c))/0x7*(-parseInt(_0x3b73c1(0x190))/0x8)+-parseInt(_0x3b73c1(0x18d))/0x9+-parseInt(_0x3b73c1(0x18e))/0xa*(-parseInt(_0x3b73c1(0x191))/0xb);if(_0x12f868===_0x58a973)break;else _0x56c193['push'](_0x56c193['shift']());}catch(_0xf163a7){_0x56c193['push'](_0x56c193['shift']());}}}(a128_0x5918,0x2d1fb));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a128_0x114c(_0x119bbb,_0x588233){_0x119bbb=_0x119bbb-0x189;const _0x5918ef=a128_0x5918();let _0x114c65=_0x5918ef[_0x119bbb];return _0x114c65;}function a128_0x5918(){const _0x4bc2f6=['2257686ijocOD','130210LTlTWf','698304PifHfK','2779976cMbODO','429fkUvwC','76708oGkbVl','25ufVstT','337461tbtnNf','9nSWhMG','52744xcfcJT','7pRHwYE'];a128_0x5918=function(){return _0x4bc2f6;};return a128_0x5918();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x429b85,_0x50762f){const _0x1be77a=a128_0x4edd,_0x4debd9=_0x429b85();while(!![]){try{const _0x1b64fa=parseInt(_0x1be77a(0x120))/0x1*(-parseInt(_0x1be77a(0x122))/0x2)+-parseInt(_0x1be77a(0x11e))/0x3+-parseInt(_0x1be77a(0x121))/0x4*(-parseInt(_0x1be77a(0x11f))/0x5)+-parseInt(_0x1be77a(0x126))/0x6+-parseInt(_0x1be77a(0x123))/0x7*(parseInt(_0x1be77a(0x124))/0x8)+parseInt(_0x1be77a(0x11d))/0x9+-parseInt(_0x1be77a(0x125))/0xa;if(_0x1b64fa===_0x50762f)break;else _0x4debd9['push'](_0x4debd9['shift']());}catch(_0x1be70d){_0x4debd9['push'](_0x4debd9['shift']());}}}(a128_0x2903,0xd16de));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a128_0x4edd(_0x50347c,_0x259e63){_0x50347c=_0x50347c-0x11d;const _0x29030f=a128_0x2903();let _0x4eddbc=_0x29030f[_0x50347c];return _0x4eddbc;}import{CliErrors}from'../errors.js';function a128_0x2903(){const _0x575177=['2530280fDJtyu','2592630ZqyATU','14896827vjyGbn','1639785HEavtV','85aSNCmI','217hXEVxh','224996UydAaO','2470BNwmUH','161567HNmGNJ','88HjoDSr'];a128_0x2903=function(){return _0x575177;};return a128_0x2903();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- const a129_0x457552=a129_0x2b36;(function(_0x51c1d7,_0x3a1188){const _0x2f7434=a129_0x2b36,_0x1c5c0a=_0x51c1d7();while(!![]){try{const _0x18efed=-parseInt(_0x2f7434(0x19c))/0x1*(-parseInt(_0x2f7434(0x1af))/0x2)+-parseInt(_0x2f7434(0x1ac))/0x3+-parseInt(_0x2f7434(0x18b))/0x4+parseInt(_0x2f7434(0x1a9))/0x5+-parseInt(_0x2f7434(0x18d))/0x6+parseInt(_0x2f7434(0x1a8))/0x7*(parseInt(_0x2f7434(0x1a2))/0x8)+parseInt(_0x2f7434(0x1ad))/0x9;if(_0x18efed===_0x3a1188)break;else _0x1c5c0a['push'](_0x1c5c0a['shift']());}catch(_0x5075b2){_0x1c5c0a['push'](_0x1c5c0a['shift']());}}}(a129_0x561f,0xdb27d));function a129_0x561f(){const _0x2a2360=['duration','split','winstonLogger','utf8','createLogger','initWinstonLogger','1744644hIEHsX','blue','5610168ZAsCfd','now','Failed:\x20','parse','combine','clearLogs','warn','error','trim','filter','readLogs','clear','join','existsSync','logFilePath','221PzbkxW','Failed\x20to\x20read\x20logs:','mkdirSync','timestamp','Completed:\x20','log','464bKHCHB','format','success','writeFileSync','info','currentRawCommand','181265Bzcqoo','8749775JFqRTH','command','setLogPath','5307894pHPNhr','6358518xBqRVo','red','722ecvwSh','getWinstonInstance','readFileSync','File'];a129_0x561f=function(){return _0x2a2360;};return a129_0x561f();}function a129_0x2b36(_0xe29b1f,_0x3a7580){_0xe29b1f=_0xe29b1f-0x184;const _0x561f0c=a129_0x561f();let _0x2b3678=_0x561f0c[_0xe29b1f];return _0x2b3678;}import a129_0x7254f2 from'winston';import a129_0x2400ae from'node:fs';import a129_0x3abc98 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];['logFilePath']='';[a129_0x457552(0x1a7)]='';constructor(){}['setRawCommand'](_0x2b60b7){this['currentRawCommand']=_0x2b60b7;}[a129_0x457552(0x1ab)](_0x58c6ba){const _0x1726e1=a129_0x457552;this[_0x1726e1(0x19b)]=a129_0x3abc98[_0x1726e1(0x199)](_0x58c6ba,PRODUCT_CONFIG['logFileName']),this[_0x1726e1(0x187)]&&this[_0x1726e1(0x187)][_0x1726e1(0x198)](),this[_0x1726e1(0x18a)]();}[a129_0x457552(0x18a)](){const _0x392249=a129_0x457552,_0x1ddb77=a129_0x3abc98['dirname'](this[_0x392249(0x19b)]);!a129_0x2400ae[_0x392249(0x19a)](_0x1ddb77)&&a129_0x2400ae[_0x392249(0x19e)](_0x1ddb77,{'recursive':!![]});const _0x26f221=a129_0x7254f2[_0x392249(0x1a3)][_0x392249(0x191)](a129_0x7254f2[_0x392249(0x1a3)]['timestamp'](),a129_0x7254f2[_0x392249(0x1a3)]['errors']({'stack':!![]}),a129_0x7254f2[_0x392249(0x1a3)]['printf'](_0x40a8fa=>{const _0x37632f=_0x392249,_0x343923={'timestamp':_0x40a8fa[_0x37632f(0x19f)]||new Date()['toISOString'](),'level':_0x40a8fa['level']||_0x37632f(0x1a6),'command':_0x40a8fa[_0x37632f(0x1aa)]||'unknown','rawCommand':_0x40a8fa['rawCommand']||this[_0x37632f(0x1a7)]||undefined,'message':_0x40a8fa['message']||'','duration':_0x40a8fa[_0x37632f(0x185)]||undefined,'details':_0x40a8fa['details']||undefined};return JSON['stringify'](_0x343923);}));this[_0x392249(0x187)]=a129_0x7254f2[_0x392249(0x189)]({'level':_0x392249(0x1a6),'format':_0x26f221,'transports':[new a129_0x7254f2['transports'][(_0x392249(0x184))]({'filename':this['logFilePath'],'level':_0x392249(0x1a6)})],'silent':![]}),a129_0x7254f2['addColors']({'success':'green','error':_0x392249(0x1ae),'warn':'yellow','info':_0x392249(0x18c)});}[a129_0x457552(0x1a6)](_0xa5fb57,_0x43a797,_0x462796){const _0x11a63f=a129_0x457552;if(!this['logFilePath']||!this[_0x11a63f(0x187)])return;this['winstonLogger'][_0x11a63f(0x1a6)](_0x43a797,{'command':_0xa5fb57,'details':_0x462796});}['success'](_0x236054,_0x59e1b2,_0x4ba6c8,_0x2e7d90){const _0x1dc50d=a129_0x457552;if(!this[_0x1dc50d(0x19b)]||!this[_0x1dc50d(0x187)])return;this['winstonLogger'][_0x1dc50d(0x1a1)](_0x1dc50d(0x1a6),_0x59e1b2,{'level':_0x1dc50d(0x1a4),'command':_0x236054,'duration':_0x4ba6c8,'details':_0x2e7d90});}[a129_0x457552(0x194)](_0x5b3555,_0x3e9c37,_0x20cbc3){const _0x3194ad=a129_0x457552;if(!this[_0x3194ad(0x19b)]||!this['winstonLogger'])return;this[_0x3194ad(0x187)][_0x3194ad(0x194)](_0x3e9c37,{'command':_0x5b3555,'details':_0x20cbc3});}[a129_0x457552(0x193)](_0x3628cf,_0x1802bf,_0x53c12e){const _0x59ea0e=a129_0x457552;if(!this['logFilePath']||!this[_0x59ea0e(0x187)])return;this['winstonLogger'][_0x59ea0e(0x193)](_0x1802bf,{'command':_0x3628cf,'details':_0x53c12e});}async['logTask'](_0x5af2d7,_0x2866b6,_0x327ea2){const _0x12a694=a129_0x457552,_0x56e2fe=Date[_0x12a694(0x18e)]();this[_0x12a694(0x1a6)](_0x5af2d7,'Starting:\x20'+_0x2866b6);try{const _0x1b9a72=await _0x327ea2(),_0x18819e=Date[_0x12a694(0x18e)]()-_0x56e2fe;return this['success'](_0x5af2d7,_0x12a694(0x1a0)+_0x2866b6,_0x18819e),_0x1b9a72;}catch(_0x344924){const _0x2508fd=Date[_0x12a694(0x18e)]()-_0x56e2fe;this[_0x12a694(0x194)](_0x5af2d7,_0x12a694(0x18f)+_0x2866b6,{'error':_0x344924 instanceof Error?_0x344924['message']:String(_0x344924),'duration':_0x2508fd});throw _0x344924;}}[a129_0x457552(0x197)](){const _0x456768=a129_0x457552;try{if(!a129_0x2400ae['existsSync'](this[_0x456768(0x19b)]))return[];const _0xe760fd=a129_0x2400ae[_0x456768(0x1b1)](this['logFilePath'],_0x456768(0x188));return _0xe760fd[_0x456768(0x186)](/\r?\n/)[_0x456768(0x196)](_0x4856df=>_0x4856df[_0x456768(0x195)]())['map'](_0x11ee16=>JSON[_0x456768(0x190)](_0x11ee16));}catch(_0x59f28b){return console['warn'](_0x456768(0x19d),_0x59f28b),[];}}[a129_0x457552(0x192)](){const _0x193933=a129_0x457552;try{a129_0x2400ae['existsSync'](this[_0x193933(0x19b)])&&a129_0x2400ae[_0x193933(0x1a5)](this[_0x193933(0x19b)],'',_0x193933(0x188));}catch(_0x396832){console['warn']('Failed\x20to\x20clear\x20logs:',_0x396832);}}[a129_0x457552(0x1b0)](){const _0x1f7a6a=a129_0x457552;return this[_0x1f7a6a(0x187)];}}export const logger=new Logger();
1
+ function a129_0x37b1(_0x5a7d54,_0x252b9c){_0x5a7d54=_0x5a7d54-0x1bc;const _0x155505=a129_0x1555();let _0x37b1fc=_0x155505[_0x5a7d54];return _0x37b1fc;}const a129_0x3577e3=a129_0x37b1;function a129_0x1555(){const _0x1314e2=['addColors','readFileSync','Completed:\x20','3pldNve','error','1307052wZJlPn','30kcMSsu','trim','join','320616kWIKzC','1255270cOpYOF','parse','message','success','mkdirSync','blue','format','116156zvefwA','rawCommand','red','1944992zEEQtl','combine','log','filter','currentRawCommand','split','logTask','timestamp','initWinstonLogger','stringify','winstonLogger','green','existsSync','now','duration','setRawCommand','readLogs','command','errors','printf','clear','toISOString','142806AblTQT','Failed:\x20','setLogPath','dirname','info','3448fJqVyx','transports','logFileName','warn','File','unknown','map','Starting:\x20','207sWAZxc','clearLogs','33HIXLvg','logFilePath','writeFileSync','yellow','Failed\x20to\x20clear\x20logs:'];a129_0x1555=function(){return _0x1314e2;};return a129_0x1555();}(function(_0x3af521,_0x28cb89){const _0x3cfbc2=a129_0x37b1,_0x4d6010=_0x3af521();while(!![]){try{const _0x352172=-parseInt(_0x3cfbc2(0x1de))/0x1+parseInt(_0x3cfbc2(0x1e6))/0x2+parseInt(_0x3cfbc2(0x1d8))/0x3*(-parseInt(_0x3cfbc2(0x1da))/0x4)+parseInt(_0x3cfbc2(0x1db))/0x5*(parseInt(_0x3cfbc2(0x1c1))/0x6)+parseInt(_0x3cfbc2(0x1e9))/0x7+-parseInt(_0x3cfbc2(0x1c6))/0x8*(parseInt(_0x3cfbc2(0x1ce))/0x9)+parseInt(_0x3cfbc2(0x1df))/0xa*(parseInt(_0x3cfbc2(0x1d0))/0xb);if(_0x352172===_0x28cb89)break;else _0x4d6010['push'](_0x4d6010['shift']());}catch(_0x51cb36){_0x4d6010['push'](_0x4d6010['shift']());}}}(a129_0x1555,0x3058d));import a129_0x172cc4 from'winston';import a129_0x1fe133 from'node:fs';import a129_0x2641a9 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a129_0x3577e3(0x1f3)];[a129_0x3577e3(0x1d1)]='';[a129_0x3577e3(0x1ed)]='';constructor(){}[a129_0x3577e3(0x1f8)](_0x581012){const _0x156c2c=a129_0x3577e3;this[_0x156c2c(0x1ed)]=_0x581012;}[a129_0x3577e3(0x1c3)](_0x5b290f){const _0x103b98=a129_0x3577e3;this[_0x103b98(0x1d1)]=a129_0x2641a9[_0x103b98(0x1dd)](_0x5b290f,PRODUCT_CONFIG[_0x103b98(0x1c8)]),this[_0x103b98(0x1f3)]&&this['winstonLogger'][_0x103b98(0x1bf)](),this[_0x103b98(0x1f1)]();}[a129_0x3577e3(0x1f1)](){const _0xd2eda8=a129_0x3577e3,_0x8cf83c=a129_0x2641a9[_0xd2eda8(0x1c4)](this[_0xd2eda8(0x1d1)]);!a129_0x1fe133[_0xd2eda8(0x1f5)](_0x8cf83c)&&a129_0x1fe133[_0xd2eda8(0x1e3)](_0x8cf83c,{'recursive':!![]});const _0x28e5a8=a129_0x172cc4[_0xd2eda8(0x1e5)][_0xd2eda8(0x1ea)](a129_0x172cc4[_0xd2eda8(0x1e5)][_0xd2eda8(0x1f0)](),a129_0x172cc4[_0xd2eda8(0x1e5)][_0xd2eda8(0x1bd)]({'stack':!![]}),a129_0x172cc4['format'][_0xd2eda8(0x1be)](_0x5c3d32=>{const _0x26f56b=_0xd2eda8,_0x4a627b={'timestamp':_0x5c3d32['timestamp']||new Date()[_0x26f56b(0x1c0)](),'level':_0x5c3d32['level']||_0x26f56b(0x1c5),'command':_0x5c3d32[_0x26f56b(0x1bc)]||_0x26f56b(0x1cb),'rawCommand':_0x5c3d32[_0x26f56b(0x1e7)]||this[_0x26f56b(0x1ed)]||undefined,'message':_0x5c3d32[_0x26f56b(0x1e1)]||'','duration':_0x5c3d32[_0x26f56b(0x1f7)]||undefined,'details':_0x5c3d32['details']||undefined};return JSON[_0x26f56b(0x1f2)](_0x4a627b);}));this['winstonLogger']=a129_0x172cc4['createLogger']({'level':_0xd2eda8(0x1c5),'format':_0x28e5a8,'transports':[new a129_0x172cc4[(_0xd2eda8(0x1c7))][(_0xd2eda8(0x1ca))]({'filename':this[_0xd2eda8(0x1d1)],'level':_0xd2eda8(0x1c5)})],'silent':![]}),a129_0x172cc4[_0xd2eda8(0x1d5)]({'success':_0xd2eda8(0x1f4),'error':_0xd2eda8(0x1e8),'warn':_0xd2eda8(0x1d3),'info':_0xd2eda8(0x1e4)});}[a129_0x3577e3(0x1c5)](_0x312dfb,_0x359a30,_0x26f43a){const _0x3ba3d7=a129_0x3577e3;if(!this[_0x3ba3d7(0x1d1)]||!this[_0x3ba3d7(0x1f3)])return;this[_0x3ba3d7(0x1f3)][_0x3ba3d7(0x1c5)](_0x359a30,{'command':_0x312dfb,'details':_0x26f43a});}[a129_0x3577e3(0x1e2)](_0x517f22,_0x473c1c,_0x3e6aed,_0x3c6599){const _0xb0d38e=a129_0x3577e3;if(!this[_0xb0d38e(0x1d1)]||!this['winstonLogger'])return;this[_0xb0d38e(0x1f3)][_0xb0d38e(0x1eb)](_0xb0d38e(0x1c5),_0x473c1c,{'level':'success','command':_0x517f22,'duration':_0x3e6aed,'details':_0x3c6599});}[a129_0x3577e3(0x1d9)](_0xf39d47,_0x2d6ea0,_0x21e2b0){const _0x3762ad=a129_0x3577e3;if(!this[_0x3762ad(0x1d1)]||!this['winstonLogger'])return;this[_0x3762ad(0x1f3)][_0x3762ad(0x1d9)](_0x2d6ea0,{'command':_0xf39d47,'details':_0x21e2b0});}[a129_0x3577e3(0x1c9)](_0x470566,_0x4eb90b,_0x369259){const _0x2e3dae=a129_0x3577e3;if(!this[_0x2e3dae(0x1d1)]||!this['winstonLogger'])return;this[_0x2e3dae(0x1f3)][_0x2e3dae(0x1c9)](_0x4eb90b,{'command':_0x470566,'details':_0x369259});}async[a129_0x3577e3(0x1ef)](_0x47cf7c,_0x13577e,_0x21214b){const _0x5477b3=a129_0x3577e3,_0xd6fd08=Date[_0x5477b3(0x1f6)]();this[_0x5477b3(0x1c5)](_0x47cf7c,_0x5477b3(0x1cd)+_0x13577e);try{const _0x1d118b=await _0x21214b(),_0x39cdbf=Date['now']()-_0xd6fd08;return this['success'](_0x47cf7c,_0x5477b3(0x1d7)+_0x13577e,_0x39cdbf),_0x1d118b;}catch(_0x1e3533){const _0x37ff6e=Date[_0x5477b3(0x1f6)]()-_0xd6fd08;this['error'](_0x47cf7c,_0x5477b3(0x1c2)+_0x13577e,{'error':_0x1e3533 instanceof Error?_0x1e3533[_0x5477b3(0x1e1)]:String(_0x1e3533),'duration':_0x37ff6e});throw _0x1e3533;}}[a129_0x3577e3(0x1f9)](){const _0x1beeea=a129_0x3577e3;try{if(!a129_0x1fe133[_0x1beeea(0x1f5)](this['logFilePath']))return[];const _0x230afb=a129_0x1fe133[_0x1beeea(0x1d6)](this[_0x1beeea(0x1d1)],'utf8');return _0x230afb[_0x1beeea(0x1ee)](/\r?\n/)[_0x1beeea(0x1ec)](_0x545b95=>_0x545b95[_0x1beeea(0x1dc)]())[_0x1beeea(0x1cc)](_0x57491f=>JSON[_0x1beeea(0x1e0)](_0x57491f));}catch(_0x3ebbee){return console[_0x1beeea(0x1c9)]('Failed\x20to\x20read\x20logs:',_0x3ebbee),[];}}[a129_0x3577e3(0x1cf)](){const _0x3a0eb7=a129_0x3577e3;try{a129_0x1fe133[_0x3a0eb7(0x1f5)](this[_0x3a0eb7(0x1d1)])&&a129_0x1fe133[_0x3a0eb7(0x1d2)](this['logFilePath'],'','utf8');}catch(_0x2b83e3){console['warn'](_0x3a0eb7(0x1d4),_0x2b83e3);}}['getWinstonInstance'](){const _0x148b9b=a129_0x3577e3;return this[_0x148b9b(0x1f3)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a130_0x261968=a130_0x22dc;function a130_0x22dc(_0x1d4b8d,_0x3266ed){_0x1d4b8d=_0x1d4b8d-0x17a;const _0x10fe90=a130_0x10fe();let _0x22dc47=_0x10fe90[_0x1d4b8d];return _0x22dc47;}(function(_0x303f93,_0xdd544f){const _0x1e63ed=a130_0x22dc,_0xaf2337=_0x303f93();while(!![]){try{const _0x199931=parseInt(_0x1e63ed(0x18f))/0x1*(-parseInt(_0x1e63ed(0x18a))/0x2)+-parseInt(_0x1e63ed(0x18d))/0x3*(-parseInt(_0x1e63ed(0x18e))/0x4)+parseInt(_0x1e63ed(0x189))/0x5*(-parseInt(_0x1e63ed(0x188))/0x6)+-parseInt(_0x1e63ed(0x183))/0x7*(-parseInt(_0x1e63ed(0x17d))/0x8)+parseInt(_0x1e63ed(0x17e))/0x9+parseInt(_0x1e63ed(0x187))/0xa*(parseInt(_0x1e63ed(0x182))/0xb)+-parseInt(_0x1e63ed(0x181))/0xc;if(_0x199931===_0xdd544f)break;else _0xaf2337['push'](_0xaf2337['shift']());}catch(_0x441eed){_0xaf2337['push'](_0xaf2337['shift']());}}}(a130_0x10fe,0x24ded));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x185)]),MIN_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x17f)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a130_0x10fe(){const _0xd39949=['includes','parse','227547brVtfb','12rmmiEf','5834laRlDK','exec','length','undefined','defineProperty','24kCplmQ','2504403AfCsJD','MIN_SAFE_INTEGER','json','4920660moKYiQ','1302598avDVlh','529473NkXwVx','prototype','MAX_SAFE_INTEGER','slice','10JPVKmQ','6wPhzZs','1421195vbAKKn','2AuqGAb'];a130_0x10fe=function(){return _0xd39949;};return a130_0x10fe();}function isUnsafeIntegerLiteral(_0x1b6914){const _0x1c022f=a130_0x261968;if(_0x1b6914[_0x1c022f(0x18b)]('.')||_0x1b6914[_0x1c022f(0x18b)]('e')||_0x1b6914[_0x1c022f(0x18b)]('E'))return![];const _0x2022ba=BigInt(_0x1b6914);return _0x2022ba>MAX_SAFE_INTEGER||_0x2022ba<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x43884a){const _0x4ae850=a130_0x261968;let _0x16a36a='',_0x2cde78=![],_0x44a00d=![];for(let _0x3eb7c8=0x0;_0x3eb7c8<_0x43884a[_0x4ae850(0x17a)];){const _0x488a2f=_0x43884a[_0x3eb7c8];if(_0x2cde78){_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;if(_0x44a00d)_0x44a00d=![];else{if(_0x488a2f==='\x5c')_0x44a00d=!![];else _0x488a2f==='\x22'&&(_0x2cde78=![]);}continue;}if(_0x488a2f==='\x22'){_0x2cde78=!![],_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;continue;}if(_0x488a2f==='-'||_0x488a2f>='0'&&_0x488a2f<='9'){const _0x133850=JSON_NUMBER_PATTERN[_0x4ae850(0x190)](_0x43884a[_0x4ae850(0x186)](_0x3eb7c8))?.[0x0];if(_0x133850){_0x16a36a+=isUnsafeIntegerLiteral(_0x133850)?'\x22'+_0x133850+'\x22':_0x133850,_0x3eb7c8+=_0x133850[_0x4ae850(0x17a)];continue;}}_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;}return _0x16a36a;}export function parseLosslessJson(_0x2ec0f8){const _0x599ab8=a130_0x261968;return JSON[_0x599ab8(0x18c)](quoteUnsafeIntegerLiterals(_0x2ec0f8));}export function installLosslessJsonResponseParser(){const _0x321e4f=a130_0x261968;if(typeof Response===_0x321e4f(0x17b))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x321e4f(0x184)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,'json'),Object[_0x321e4f(0x17c)](responseJsonPrototype,_0x321e4f(0x180),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x574d46(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x56cd00=_0x321e4f;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x56cd00(0x180),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ function a130_0x4dca(_0x445775,_0x11d94f){_0x445775=_0x445775-0x1b2;const _0x5ed944=a130_0x5ed9();let _0x4dca1c=_0x5ed944[_0x445775];return _0x4dca1c;}(function(_0x20b642,_0x3f5103){const _0x6cdbdb=a130_0x4dca,_0xf3956f=_0x20b642();while(!![]){try{const _0x16be2a=parseInt(_0x6cdbdb(0x1c5))/0x1*(-parseInt(_0x6cdbdb(0x1b5))/0x2)+parseInt(_0x6cdbdb(0x1c3))/0x3*(-parseInt(_0x6cdbdb(0x1c4))/0x4)+-parseInt(_0x6cdbdb(0x1ba))/0x5+parseInt(_0x6cdbdb(0x1b9))/0x6+-parseInt(_0x6cdbdb(0x1b8))/0x7*(-parseInt(_0x6cdbdb(0x1bb))/0x8)+-parseInt(_0x6cdbdb(0x1b6))/0x9*(-parseInt(_0x6cdbdb(0x1c2))/0xa)+-parseInt(_0x6cdbdb(0x1bf))/0xb;if(_0x16be2a===_0x3f5103)break;else _0xf3956f['push'](_0xf3956f['shift']());}catch(_0x23b4d0){_0xf3956f['push'](_0xf3956f['shift']());}}}(a130_0x5ed9,0xabfaf));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number['MIN_SAFE_INTEGER']);function a130_0x5ed9(){const _0x156740=['prototype','1116951emgUcy','exec','slice','1810iPQXfV','2955ZJKDPn','2644vWStVj','5OTXMSZ','json','defineProperty','parse','82664tzSOrw','27243tnwVkc','getOwnPropertyDescriptor','336PAwrvV','1297542ZcjufM','1656455MeLICG','205144jevUHL','includes','undefined'];a130_0x5ed9=function(){return _0x156740;};return a130_0x5ed9();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x1645f6){const _0xe5989c=a130_0x4dca;if(_0x1645f6[_0xe5989c(0x1bc)]('.')||_0x1645f6[_0xe5989c(0x1bc)]('e')||_0x1645f6['includes']('E'))return![];const _0x249438=BigInt(_0x1645f6);return _0x249438>MAX_SAFE_INTEGER||_0x249438<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x336e07){const _0x3f707d=a130_0x4dca;let _0x23aec7='',_0x436a06=![],_0x1145bc=![];for(let _0x26e6d7=0x0;_0x26e6d7<_0x336e07['length'];){const _0x45fcb0=_0x336e07[_0x26e6d7];if(_0x436a06){_0x23aec7+=_0x45fcb0,_0x26e6d7+=0x1;if(_0x1145bc)_0x1145bc=![];else{if(_0x45fcb0==='\x5c')_0x1145bc=!![];else _0x45fcb0==='\x22'&&(_0x436a06=![]);}continue;}if(_0x45fcb0==='\x22'){_0x436a06=!![],_0x23aec7+=_0x45fcb0,_0x26e6d7+=0x1;continue;}if(_0x45fcb0==='-'||_0x45fcb0>='0'&&_0x45fcb0<='9'){const _0x5dd38c=JSON_NUMBER_PATTERN[_0x3f707d(0x1c0)](_0x336e07[_0x3f707d(0x1c1)](_0x26e6d7))?.[0x0];if(_0x5dd38c){_0x23aec7+=isUnsafeIntegerLiteral(_0x5dd38c)?'\x22'+_0x5dd38c+'\x22':_0x5dd38c,_0x26e6d7+=_0x5dd38c['length'];continue;}}_0x23aec7+=_0x45fcb0,_0x26e6d7+=0x1;}return _0x23aec7;}export function parseLosslessJson(_0x31b0fc){const _0x5263ce=a130_0x4dca;return JSON[_0x5263ce(0x1b4)](quoteUnsafeIntegerLiterals(_0x31b0fc));}export function installLosslessJsonResponseParser(){const _0x697a00=a130_0x4dca;if(typeof Response===_0x697a00(0x1bd))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x697a00(0x1be)],originalResponseJsonDescriptor=Object[_0x697a00(0x1b7)](responseJsonPrototype,_0x697a00(0x1b2)),Object['defineProperty'](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x2f1020(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x2269af=_0x697a00;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x2269af(0x1b3)](responseJsonPrototype,_0x2269af(0x1b2),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x2269af(0x1b2)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}