@lovrabet/lovrabet-cli 2.3.6-beta.3 → 2.3.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/README.md +15 -11
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/approval/index.js +1 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/kb/index.js +1 -1
  38. package/lib/commands/logs/index.js +1 -1
  39. package/lib/commands/notification/config-list.js +1 -1
  40. package/lib/commands/notification/index.js +1 -1
  41. package/lib/commands/notification/shared.js +1 -1
  42. package/lib/commands/ocr/index.js +1 -1
  43. package/lib/commands/permit/dataset-get.js +1 -1
  44. package/lib/commands/permit/dataset-set.js +1 -1
  45. package/lib/commands/permit/index.js +1 -1
  46. package/lib/commands/permit/page-get.js +1 -1
  47. package/lib/commands/permit/page-set.js +1 -1
  48. package/lib/commands/permit/role-menus-set.js +1 -1
  49. package/lib/commands/permit/role-menus.js +1 -1
  50. package/lib/commands/permit/shared.js +1 -1
  51. package/lib/commands/personal-bff/index.js +1 -1
  52. package/lib/commands/registry.js +1 -1
  53. package/lib/commands/role/create.js +1 -1
  54. package/lib/commands/role/delete.js +1 -1
  55. package/lib/commands/role/detail.js +1 -1
  56. package/lib/commands/role/index.js +1 -1
  57. package/lib/commands/role/list.js +1 -1
  58. package/lib/commands/role/shared.js +1 -1
  59. package/lib/commands/role/update.js +1 -1
  60. package/lib/commands/role/user-add.js +1 -1
  61. package/lib/commands/role/user-remove.js +1 -1
  62. package/lib/commands/schedule/index.js +1 -1
  63. package/lib/commands/schema.js +1 -1
  64. package/lib/commands/service/dynamic.js +1 -1
  65. package/lib/commands/service/function-name-adapter.js +1 -1
  66. package/lib/commands/service/index.js +1 -1
  67. package/lib/commands/service/registry.js +1 -1
  68. package/lib/commands/skill/commands/create.js +1 -1
  69. package/lib/commands/skill/commands/diagram.js +1 -1
  70. package/lib/commands/skill/commands/install.js +1 -1
  71. package/lib/commands/skill/commands/list.js +1 -1
  72. package/lib/commands/skill/commands/push.js +1 -1
  73. package/lib/commands/skill/commands/validate.js +1 -1
  74. package/lib/commands/skill/diagram.js +1 -1
  75. package/lib/commands/skill/flags.js +1 -1
  76. package/lib/commands/skill/index.js +1 -1
  77. package/lib/commands/skill/manifest-helpers.js +1 -1
  78. package/lib/commands/skill/push-execute.js +1 -1
  79. package/lib/commands/skill/push-flow-helpers.js +1 -1
  80. package/lib/commands/skill/push-retarget.js +1 -1
  81. package/lib/commands/skill/scopes.js +1 -1
  82. package/lib/commands/skill/summary.js +1 -1
  83. package/lib/commands/skill/templates.js +1 -1
  84. package/lib/commands/skill/validate.js +1 -1
  85. package/lib/commands/sql/detail.js +1 -1
  86. package/lib/commands/sql/exec.js +1 -1
  87. package/lib/commands/sql/index.js +1 -1
  88. package/lib/commands/update.js +1 -1
  89. package/lib/commands/user-account/bind.js +1 -1
  90. package/lib/commands/user-account/index.js +1 -1
  91. package/lib/commands/workspace/index.js +1 -1
  92. package/lib/config/domain-config.js +1 -1
  93. package/lib/config/schema.js +1 -1
  94. package/lib/constant/app.js +1 -1
  95. package/lib/constant/auth-mode.js +1 -1
  96. package/lib/constant/cli.js +1 -1
  97. package/lib/constant/defaults.js +1 -1
  98. package/lib/constant/distribution.js +1 -1
  99. package/lib/constant/domain.js +1 -1
  100. package/lib/constant/env.js +1 -1
  101. package/lib/constant/output.js +1 -1
  102. package/lib/constant/product.js +1 -1
  103. package/lib/constant/region.js +1 -1
  104. package/lib/constant/risk.js +1 -1
  105. package/lib/constant/url.js +1 -1
  106. package/lib/context.js +1 -1
  107. package/lib/core/api-client.d.ts +6 -6
  108. package/lib/core/api-client.js +1 -1
  109. package/lib/core/db-resolver.js +1 -1
  110. package/lib/core/kb-management-client.d.ts +5 -3
  111. package/lib/core/kb-management-client.js +1 -1
  112. package/lib/core/kb-search-client.d.ts +6 -1
  113. package/lib/core/kb-search-client.js +1 -1
  114. package/lib/core/sdk-client.js +1 -1
  115. package/lib/errors.js +1 -1
  116. package/lib/framework/access-error.js +1 -1
  117. package/lib/framework/build-all-flags.js +1 -1
  118. package/lib/framework/dryrun.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/preparse.js +1 -1
  124. package/lib/framework/rate-limit.js +1 -1
  125. package/lib/framework/raw-flags.js +1 -1
  126. package/lib/framework/response.js +1 -1
  127. package/lib/framework/runner-confirmation.js +1 -1
  128. package/lib/framework/runner-error.js +1 -1
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/service-order.js +1 -1
  132. package/lib/framework/types.js +1 -1
  133. package/lib/generated/build-info.d.ts +4 -4
  134. package/lib/generated/build-info.js +1 -1
  135. package/lib/generated/official-routing.js +1 -1
  136. package/lib/generated/routing-contract.js +1 -1
  137. package/lib/help.js +1 -1
  138. package/lib/postinstall.js +1 -1
  139. package/lib/runtime/confirmation.js +1 -1
  140. package/lib/runtime/event.js +1 -1
  141. package/lib/runtime/index.js +1 -1
  142. package/lib/runtime/queue.js +1 -1
  143. package/lib/runtime/resolve.js +1 -1
  144. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  145. package/lib/services/dataset-import/excel-reader.js +1 -1
  146. package/lib/services/dataset-import/image-bytes.js +1 -1
  147. package/lib/services/dataset-import/image-ooxml.js +1 -1
  148. package/lib/services/dataset-import/image-runner.js +1 -1
  149. package/lib/services/dataset-import/metadata.js +1 -1
  150. package/lib/services/dataset-import/preview.js +1 -1
  151. package/lib/services/dataset-import/runner.js +1 -1
  152. package/lib/skills/builtin-skill.js +1 -1
  153. package/lib/skills/npx-skills-add.js +1 -1
  154. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  155. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  156. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  157. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  158. package/lib/skills/runtime-skill-sync/links.js +1 -1
  159. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  160. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  161. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  162. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  163. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  164. package/lib/skills/runtime-skill-sync/push.js +1 -1
  165. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  166. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  167. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  168. package/lib/skills/runtime-skill-sync.js +1 -1
  169. package/lib/skills/skill-presence.js +1 -1
  170. package/lib/utils/access-key-redaction.js +1 -1
  171. package/lib/utils/apply-jq-filter.js +1 -1
  172. package/lib/utils/cli-version-check.js +1 -1
  173. package/lib/utils/cli-version-policy.js +1 -1
  174. package/lib/utils/logger.js +1 -1
  175. package/lib/utils/lossless-json.js +1 -1
  176. package/lib/utils/params.js +1 -1
  177. package/lib/utils/positive-safe-integer.js +1 -1
  178. package/lib/utils/redaction.js +1 -1
  179. package/lib/utils/update-notice.js +1 -1
  180. package/lib/utils/version.js +1 -1
  181. package/lib/utils/write-cli-side-channel.js +1 -1
  182. package/package.json +1 -1
  183. package/skills/lovrabet/SKILL.md +2 -2
  184. package/skills/lovrabet/references/lovrabet-kb-workflow.md +9 -5
  185. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- function a156_0x5b04(){const _0x3881e1=['add','92thOjOe','Duplicate\x20Skill\x20file\x20path:\x20','44355yEEKta','values','has','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','path','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','utf8','Skill\x20file\x20size\x20is\x20invalid:\x20','91666IvInxT','string','21790PREVUB','validation','startsWith','isDirectory','isFile','test','Unsafe\x20Skill\x20file\x20path:\x20','split','content','size','toLowerCase','22QCHNJv','4525002bxwQEW','trim','bytes','6602776vrurZe','localeCompare','4107510RhArCP','compare','isSafeInteger','replace','push','set','Skill\x20file\x20sha256\x20is\x20invalid:\x20','isSymbolicLink','sha256','length','12JMwRxG','20284kdsdaI','isArray','from','2156315klerAM','object','sort','name'];a156_0x5b04=function(){return _0x3881e1;};return a156_0x5b04();}(function(_0x15208c,_0xacaef){const _0x3b1bc6=a156_0x2e26,_0x3a84e0=_0x15208c();while(!![]){try{const _0x22ca14=parseInt(_0x3b1bc6(0x1b9))/0x1*(-parseInt(_0x3b1bc6(0x1ac))/0x2)+-parseInt(_0x3b1bc6(0x1d4))/0x3*(-parseInt(_0x3b1bc6(0x1d2))/0x4)+-parseInt(_0x3b1bc6(0x1bf))/0x5+parseInt(_0x3b1bc6(0x1c9))/0x6*(-parseInt(_0x3b1bc6(0x1cd))/0x7)+-parseInt(_0x3b1bc6(0x1bd))/0x8+-parseInt(_0x3b1bc6(0x1ba))/0x9+-parseInt(_0x3b1bc6(0x1ae))/0xa*(-parseInt(_0x3b1bc6(0x1ca))/0xb);if(_0x22ca14===_0xacaef)break;else _0x3a84e0['push'](_0x3a84e0['shift']());}catch(_0x500e3c){_0x3a84e0['push'](_0x3a84e0['shift']());}}}(a156_0x5b04,0x8e998));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(_0x23b4d6){const _0x42de7a=a156_0x2e26;return _0x23b4d6[_0x42de7a(0x1bc)]??Buffer[_0x42de7a(0x1cc)](_0x23b4d6[_0x42de7a(0x1b6)]??'',_0x42de7a(0x1aa));}export function fileText(_0x2d9561){const _0x421549=a156_0x2e26;return fileContent(_0x2d9561)['toString'](_0x421549(0x1aa));}export function normalizeLocalFiles(_0x3f0903){const _0x465f01=a156_0x2e26;if(!Array[_0x465f01(0x1cb)](_0x3f0903)||_0x3f0903['length']===0x0)return[];const _0x5c566c=new Map();for(const _0x3072b7 of _0x3f0903){if(!_0x3072b7||typeof _0x3072b7!==_0x465f01(0x1ce)||typeof _0x3072b7[_0x465f01(0x1a8)]!==_0x465f01(0x1ad))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x3600ab=normalizeSkillRelativePath(_0x3072b7[_0x465f01(0x1a8)]);if(_0x5c566c[_0x465f01(0x1a5)](_0x3600ab))throw CliErrors['validation'](_0x465f01(0x1d3)+_0x3600ab);if(_0x3072b7[_0x465f01(0x1bc)]!==undefined&&!Buffer['isBuffer'](_0x3072b7[_0x465f01(0x1bc)]))throw CliErrors[_0x465f01(0x1af)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x3600ab);if(_0x3072b7[_0x465f01(0x1bc)]===undefined&&typeof _0x3072b7[_0x465f01(0x1b6)]!==_0x465f01(0x1ad))throw CliErrors['validation'](_0x465f01(0x1a9)+_0x3600ab);const _0x31d17a=fileContent(_0x3072b7);_0x5c566c[_0x465f01(0x1c4)](_0x3600ab,{'path':_0x3600ab,'bytes':_0x31d17a});}return Array[_0x465f01(0x1cc)](_0x5c566c[_0x465f01(0x1d5)]())[_0x465f01(0x1cf)](compareSkillFiles);}export function normalizeManifestFiles(_0x11d0fa){const _0x1d4c97=a156_0x2e26;if(!Array[_0x1d4c97(0x1cb)](_0x11d0fa)||_0x11d0fa[_0x1d4c97(0x1c8)]===0x0)return[];const _0x392c13=new Map();for(const _0xec5c89 of _0x11d0fa){if(!_0xec5c89||typeof _0xec5c89!==_0x1d4c97(0x1ce)||typeof _0xec5c89['path']!==_0x1d4c97(0x1ad))throw CliErrors['validation'](_0x1d4c97(0x1a6));const _0x11eba1=normalizeSkillRelativePath(_0xec5c89[_0x1d4c97(0x1a8)]);if(_0x392c13[_0x1d4c97(0x1a5)](_0x11eba1))throw CliErrors['validation'](_0x1d4c97(0x1d3)+_0x11eba1);if(!isSha256Hex(_0xec5c89[_0x1d4c97(0x1c7)]))throw CliErrors[_0x1d4c97(0x1af)](_0x1d4c97(0x1c5)+_0x11eba1);if(!Number[_0x1d4c97(0x1c1)](_0xec5c89[_0x1d4c97(0x1b7)])||_0xec5c89[_0x1d4c97(0x1b7)]<0x0)throw CliErrors['validation'](_0x1d4c97(0x1ab)+_0x11eba1);_0x392c13[_0x1d4c97(0x1c4)](_0x11eba1,{'path':_0x11eba1,'sha256':_0xec5c89['sha256'][_0x1d4c97(0x1b8)](),'size':_0xec5c89[_0x1d4c97(0x1b7)]});}return Array[_0x1d4c97(0x1cc)](_0x392c13[_0x1d4c97(0x1d5)]())[_0x1d4c97(0x1cf)](compareSkillFiles);}export function scanSkillDirectory(_0x166bd2,_0x1b0a8b={}){const _0x5c9a09=realpathSync(_0x166bd2),_0x24ce19=canonicalExcludedFilePaths(_0x1b0a8b['excludedFilePaths']),_0x3903ca=[];function _0x47e955(_0x194967){const _0x1376e8=a156_0x2e26,_0x3bce59=readdirSync(_0x194967,{'withFileTypes':!![]})[_0x1376e8(0x1cf)]((_0x56eec6,_0x51b64b)=>_0x56eec6[_0x1376e8(0x1d0)][_0x1376e8(0x1be)](_0x51b64b[_0x1376e8(0x1d0)]));for(const _0x958a96 of _0x3bce59){if(_0x958a96[_0x1376e8(0x1b1)]()&&IGNORED_DIR_NAMES[_0x1376e8(0x1a5)](_0x958a96[_0x1376e8(0x1d0)]))continue;if(IGNORED_FILE_NAMES['has'](_0x958a96[_0x1376e8(0x1d0)]))continue;const _0x5ea343=resolve(_0x194967,_0x958a96[_0x1376e8(0x1d0)]);if(isExcludedFilePath(_0x5ea343,_0x24ce19))continue;if(_0x958a96[_0x1376e8(0x1c6)]())throw CliErrors[_0x1376e8(0x1af)](_0x1376e8(0x1a7)+_0x5ea343);const _0x562d27=toPosixPath(relative(_0x5c9a09,_0x5ea343));if(_0x958a96[_0x1376e8(0x1b1)]()){_0x47e955(_0x5ea343);continue;}if(!_0x958a96[_0x1376e8(0x1b2)]())continue;validateSkillRelativePath(_0x562d27);const _0xa4b735=readFileSync(_0x5ea343);_0x3903ca[_0x1376e8(0x1c3)]({'path':_0x562d27,'bytes':_0xa4b735});}}return _0x47e955(_0x5c9a09),normalizeLocalFiles(_0x3903ca);}function canonicalExcludedFilePaths(_0x9f7057){const _0x52b9d4=a156_0x2e26,_0x4820f5=new Set();for(const _0x4fae0c of _0x9f7057??[]){const _0x5e934b=resolve(_0x4fae0c);_0x4820f5[_0x52b9d4(0x1d1)](_0x5e934b);try{_0x4820f5['add'](realpathSync(_0x5e934b));}catch{}}return _0x4820f5;}function isExcludedFilePath(_0x187417,_0x1aedf5){const _0x567122=a156_0x2e26;if(_0x1aedf5[_0x567122(0x1a5)](_0x187417))return!![];if(_0x1aedf5[_0x567122(0x1b7)]===0x0)return![];try{return _0x1aedf5[_0x567122(0x1a5)](realpathSync(_0x187417));}catch{return![];}}function a156_0x2e26(_0x5e495d,_0x2cd941){_0x5e495d=_0x5e495d-0x1a5;const _0x5b041f=a156_0x5b04();let _0x2e2683=_0x5b041f[_0x5e495d];return _0x2e2683;}export function compareSkillFiles(_0x3eda97,_0x3d5008){const _0x48f2be=a156_0x2e26;if(_0x3eda97[_0x48f2be(0x1a8)]===SKILL_FILE)return _0x3d5008['path']===SKILL_FILE?0x0:-0x1;if(_0x3d5008[_0x48f2be(0x1a8)]===SKILL_FILE)return 0x1;return Buffer[_0x48f2be(0x1c0)](Buffer['from'](_0x3eda97[_0x48f2be(0x1a8)],_0x48f2be(0x1aa)),Buffer[_0x48f2be(0x1cc)](_0x3d5008['path'],'utf8'));}export function normalizeSkillRelativePath(_0x11af39){const _0xbd7ee4=a156_0x2e26,_0x42054b=toPosixPath(_0x11af39[_0xbd7ee4(0x1bb)]());return validateSkillRelativePath(_0x42054b),_0x42054b;}export function validateSkillRelativePath(_0x2de128){const _0x1577cc=a156_0x2e26;if(!_0x2de128||_0x2de128[_0x1577cc(0x1b0)]('/')||_0x2de128['includes']('//'))throw CliErrors[_0x1577cc(0x1af)](_0x1577cc(0x1b4)+_0x2de128);for(const _0x57edb0 of _0x2de128[_0x1577cc(0x1b5)]('/')){if(!_0x57edb0||_0x57edb0==='.'||_0x57edb0==='..')throw CliErrors['validation'](_0x1577cc(0x1b4)+_0x2de128);}}export function toPosixPath(_0x2e7966){const _0x1e55d1=a156_0x2e26;return _0x2e7966[_0x1e55d1(0x1c2)](/\\/g,'/');}export function isSha256Hex(_0x731ff3){const _0x1a9ce3=a156_0x2e26;return typeof _0x731ff3===_0x1a9ce3(0x1ad)&&/^[a-fA-F0-9]{64}$/[_0x1a9ce3(0x1b3)](_0x731ff3);}
1
+ (function(_0x250f40,_0x4c1b53){const _0x170db7=a156_0x2b7d,_0x55aaca=_0x250f40();while(!![]){try{const _0x363785=-parseInt(_0x170db7(0xc7))/0x1*(parseInt(_0x170db7(0xa0))/0x2)+parseInt(_0x170db7(0xb4))/0x3+-parseInt(_0x170db7(0xaa))/0x4*(-parseInt(_0x170db7(0xb9))/0x5)+parseInt(_0x170db7(0xb7))/0x6+parseInt(_0x170db7(0xba))/0x7*(parseInt(_0x170db7(0x9d))/0x8)+-parseInt(_0x170db7(0xbb))/0x9*(-parseInt(_0x170db7(0xc0))/0xa)+-parseInt(_0x170db7(0x9e))/0xb;if(_0x363785===_0x4c1b53)break;else _0x55aaca['push'](_0x55aaca['shift']());}catch(_0x2ab8aa){_0x55aaca['push'](_0x55aaca['shift']());}}}(a156_0x1e70,0x85efa));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(_0xfa2674){const _0x12760c=a156_0x2b7d;return _0xfa2674[_0x12760c(0xc6)]??Buffer[_0x12760c(0xa2)](_0xfa2674['content']??'',_0x12760c(0xc2));}function a156_0x2b7d(_0x2bac7,_0x3e88cd){_0x2bac7=_0x2bac7-0x9d;const _0x1e704a=a156_0x1e70();let _0x2b7d3e=_0x1e704a[_0x2bac7];return _0x2b7d3e;}export function fileText(_0x84ea72){const _0x2c3808=a156_0x2b7d;return fileContent(_0x84ea72)[_0x2c3808(0xa8)](_0x2c3808(0xc2));}export function normalizeLocalFiles(_0xce59b4){const _0x4bc3d4=a156_0x2b7d;if(!Array[_0x4bc3d4(0xad)](_0xce59b4)||_0xce59b4['length']===0x0)return[];const _0x50ec68=new Map();for(const _0x995d46 of _0xce59b4){if(!_0x995d46||typeof _0x995d46!==_0x4bc3d4(0xbe)||typeof _0x995d46['path']!==_0x4bc3d4(0xc3))throw CliErrors[_0x4bc3d4(0xbf)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2ffbac=normalizeSkillRelativePath(_0x995d46[_0x4bc3d4(0xb2)]);if(_0x50ec68['has'](_0x2ffbac))throw CliErrors['validation'](_0x4bc3d4(0xc8)+_0x2ffbac);if(_0x995d46['bytes']!==undefined&&!Buffer[_0x4bc3d4(0xb3)](_0x995d46['bytes']))throw CliErrors[_0x4bc3d4(0xbf)](_0x4bc3d4(0xc5)+_0x2ffbac);if(_0x995d46[_0x4bc3d4(0xc6)]===undefined&&typeof _0x995d46[_0x4bc3d4(0xb1)]!==_0x4bc3d4(0xc3))throw CliErrors['validation'](_0x4bc3d4(0xae)+_0x2ffbac);const _0x395dbd=fileContent(_0x995d46);_0x50ec68[_0x4bc3d4(0xa4)](_0x2ffbac,{'path':_0x2ffbac,'bytes':_0x395dbd});}return Array[_0x4bc3d4(0xa2)](_0x50ec68[_0x4bc3d4(0x9f)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x30d313){const _0x4060a0=a156_0x2b7d;if(!Array['isArray'](_0x30d313)||_0x30d313[_0x4060a0(0xa5)]===0x0)return[];const _0x36efaa=new Map();for(const _0x227ee4 of _0x30d313){if(!_0x227ee4||typeof _0x227ee4!=='object'||typeof _0x227ee4[_0x4060a0(0xb2)]!==_0x4060a0(0xc3))throw CliErrors[_0x4060a0(0xbf)](_0x4060a0(0xa7));const _0x7224b4=normalizeSkillRelativePath(_0x227ee4[_0x4060a0(0xb2)]);if(_0x36efaa[_0x4060a0(0xb8)](_0x7224b4))throw CliErrors[_0x4060a0(0xbf)](_0x4060a0(0xc8)+_0x7224b4);if(!isSha256Hex(_0x227ee4[_0x4060a0(0xbc)]))throw CliErrors[_0x4060a0(0xbf)](_0x4060a0(0xc1)+_0x7224b4);if(!Number['isSafeInteger'](_0x227ee4[_0x4060a0(0xa1)])||_0x227ee4['size']<0x0)throw CliErrors[_0x4060a0(0xbf)](_0x4060a0(0xc4)+_0x7224b4);_0x36efaa[_0x4060a0(0xa4)](_0x7224b4,{'path':_0x7224b4,'sha256':_0x227ee4[_0x4060a0(0xbc)][_0x4060a0(0xb6)](),'size':_0x227ee4[_0x4060a0(0xa1)]});}return Array[_0x4060a0(0xa2)](_0x36efaa['values']())['sort'](compareSkillFiles);}function a156_0x1e70(){const _0x261823=['Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','localeCompare','add','content','path','isBuffer','2287059diEDHq','Unsafe\x20Skill\x20file\x20path:\x20','toLowerCase','670872zfDbsS','has','785gNSEKr','7LOzVUQ','9855qismgB','sha256','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','object','validation','3430EetXJE','Skill\x20file\x20sha256\x20is\x20invalid:\x20','utf8','string','Skill\x20file\x20size\x20is\x20invalid:\x20','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','bytes','7379PZzAWD','Duplicate\x20Skill\x20file\x20path:\x20','excludedFilePaths','test','push','845464XIBTzR','12736713COztBh','values','118aXYRfK','size','from','isDirectory','set','length','startsWith','Skill\x20file\x20path\x20must\x20be\x20text.','toString','replace','20036epJHyd','trim','name','isArray'];a156_0x1e70=function(){return _0x261823;};return a156_0x1e70();}export function scanSkillDirectory(_0x4522b5,_0x50f138={}){const _0x29edc9=a156_0x2b7d,_0xe165c3=realpathSync(_0x4522b5),_0x19ffc5=canonicalExcludedFilePaths(_0x50f138[_0x29edc9(0xc9)]),_0x30083d=[];function _0x59bb6f(_0x23f71f){const _0x10b2f8=_0x29edc9,_0x24b369=readdirSync(_0x23f71f,{'withFileTypes':!![]})['sort']((_0x2cd67b,_0x540379)=>_0x2cd67b[_0x10b2f8(0xac)][_0x10b2f8(0xaf)](_0x540379['name']));for(const _0x1853b7 of _0x24b369){if(_0x1853b7['isDirectory']()&&IGNORED_DIR_NAMES['has'](_0x1853b7[_0x10b2f8(0xac)]))continue;if(IGNORED_FILE_NAMES[_0x10b2f8(0xb8)](_0x1853b7[_0x10b2f8(0xac)]))continue;const _0x13dafd=resolve(_0x23f71f,_0x1853b7[_0x10b2f8(0xac)]);if(isExcludedFilePath(_0x13dafd,_0x19ffc5))continue;if(_0x1853b7['isSymbolicLink']())throw CliErrors[_0x10b2f8(0xbf)](_0x10b2f8(0xbd)+_0x13dafd);const _0x1879f0=toPosixPath(relative(_0xe165c3,_0x13dafd));if(_0x1853b7[_0x10b2f8(0xa3)]()){_0x59bb6f(_0x13dafd);continue;}if(!_0x1853b7['isFile']())continue;validateSkillRelativePath(_0x1879f0);const _0x56e5e0=readFileSync(_0x13dafd);_0x30083d[_0x10b2f8(0xcb)]({'path':_0x1879f0,'bytes':_0x56e5e0});}}return _0x59bb6f(_0xe165c3),normalizeLocalFiles(_0x30083d);}function canonicalExcludedFilePaths(_0x1e8690){const _0x16987d=a156_0x2b7d,_0x1ab695=new Set();for(const _0x2c48d7 of _0x1e8690??[]){const _0x2e0091=resolve(_0x2c48d7);_0x1ab695[_0x16987d(0xb0)](_0x2e0091);try{_0x1ab695[_0x16987d(0xb0)](realpathSync(_0x2e0091));}catch{}}return _0x1ab695;}function isExcludedFilePath(_0xa6e8ff,_0x26b6ad){const _0x4d7497=a156_0x2b7d;if(_0x26b6ad[_0x4d7497(0xb8)](_0xa6e8ff))return!![];if(_0x26b6ad[_0x4d7497(0xa1)]===0x0)return![];try{return _0x26b6ad[_0x4d7497(0xb8)](realpathSync(_0xa6e8ff));}catch{return![];}}export function compareSkillFiles(_0x14ede1,_0x4a0701){const _0x361dfe=a156_0x2b7d;if(_0x14ede1[_0x361dfe(0xb2)]===SKILL_FILE)return _0x4a0701['path']===SKILL_FILE?0x0:-0x1;if(_0x4a0701[_0x361dfe(0xb2)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x361dfe(0xa2)](_0x14ede1[_0x361dfe(0xb2)],_0x361dfe(0xc2)),Buffer['from'](_0x4a0701[_0x361dfe(0xb2)],'utf8'));}export function normalizeSkillRelativePath(_0x66f87c){const _0x5eddae=a156_0x2b7d,_0x3a9609=toPosixPath(_0x66f87c[_0x5eddae(0xab)]());return validateSkillRelativePath(_0x3a9609),_0x3a9609;}export function validateSkillRelativePath(_0x3ca81b){const _0x2608ff=a156_0x2b7d;if(!_0x3ca81b||_0x3ca81b[_0x2608ff(0xa6)]('/')||_0x3ca81b['includes']('//'))throw CliErrors[_0x2608ff(0xbf)](_0x2608ff(0xb5)+_0x3ca81b);for(const _0x375e85 of _0x3ca81b['split']('/')){if(!_0x375e85||_0x375e85==='.'||_0x375e85==='..')throw CliErrors['validation'](_0x2608ff(0xb5)+_0x3ca81b);}}export function toPosixPath(_0x1516f){const _0x4ea3c2=a156_0x2b7d;return _0x1516f[_0x4ea3c2(0xa9)](/\\/g,'/');}export function isSha256Hex(_0x3329eb){const _0x3ff863=a156_0x2b7d;return typeof _0x3329eb===_0x3ff863(0xc3)&&/^[a-fA-F0-9]{64}$/[_0x3ff863(0xca)](_0x3329eb);}
@@ -1 +1 @@
1
- (function(_0x13fe32,_0x464234){const _0xfced55=a157_0x482f,_0x19818b=_0x13fe32();while(!![]){try{const _0x2b2c27=-parseInt(_0xfced55(0x97))/0x1+parseInt(_0xfced55(0xa0))/0x2+-parseInt(_0xfced55(0x79))/0x3+parseInt(_0xfced55(0x7f))/0x4+parseInt(_0xfced55(0x8e))/0x5*(parseInt(_0xfced55(0x88))/0x6)+parseInt(_0xfced55(0xa7))/0x7*(-parseInt(_0xfced55(0xa2))/0x8)+parseInt(_0xfced55(0x8a))/0x9*(parseInt(_0xfced55(0x96))/0xa);if(_0x2b2c27===_0x464234)break;else _0x19818b['push'](_0x19818b['shift']());}catch(_0xfbe954){_0x19818b['push'](_0x19818b['shift']());}}}(a157_0x29bd,0x57eba));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';function a157_0x482f(_0x5abea9,_0x3ac3c3){_0x5abea9=_0x5abea9-0x72;const _0x29bdf1=a157_0x29bd();let _0x482fde=_0x29bdf1[_0x5abea9];return _0x482fde;}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';function a157_0x29bd(){const _0x23ac5c=['displayName','936XvTPcz','map','trim','displayName:\x20','schemaVersion','28007woEAkX','has','flow','.\x20Changed\x20file:\x20','skillCode','paths','validation','description','hasOwn','trimEnd','contents','path','1781907sSIetc','set','toString','appCode','length','name','2488640BdSHOb','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','description:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','delete','contentHash','isFile','utf8','1051692LxapkI','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','9fvWggq','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','\x0a---\x0a\x0a','skillName','5EzkUqS','env','errors','keys','packageBytes','filter','find','join','6266710hPRxyL','585215iKmRHI','version','example','pulledAt','scope','fileHashes','status','entries','---','1166620ASBMPI'];a157_0x29bd=function(){return _0x23ac5c;};return a157_0x29bd();}export function materializeRuntimeSkill(_0x580078,_0x816b62,_0x45a53c){const _0x3f9d80=a157_0x482f,_0x417c72=requireSkillCode(_0x580078),_0x26515e=requirePackageBytes(_0x417c72,_0x45a53c[_0x3f9d80(0x92)]),_0x400325=extractDownloadedPackage(_0x26515e),_0x1f8f60=_0x400325[_0x3f9d80(0x94)](_0x270160=>_0x270160[_0x3f9d80(0x78)]===SKILL_FILE);if(!_0x1f8f60)throw CliErrors[_0x3f9d80(0x73)](_0x3f9d80(0x83)+SKILL_FILE+':\x20'+_0x417c72);const _0x7eb0e=withMaterializedSkillFrontmatter(_0x400325,_0x580078,_0x417c72),_0x20aace=_0x7eb0e['find'](_0x467889=>_0x467889[_0x3f9d80(0x78)]===SKILL_FILE),_0x385682=fileText(_0x20aace),_0x10a959=getRuntimeSkillDir(_0x45a53c[_0x3f9d80(0x8f)],_0x45a53c['accessKey'],_0x45a53c['appCode'],_0x816b62,_0x417c72,_0x45a53c['paths']),_0x43f324=resolve(_0x10a959,SKILL_FILE),_0x56a550=resolve(_0x10a959,METADATA_FILE),_0xfd98e6=contentHash(_0x385682),_0x32f1e7=readMetadataIfPresent(_0x56a550)?.[_0x3f9d80(0x9c)];ensurePulledFilesCanBeOverwritten(_0x10a959,_0x56a550,_0x7eb0e,_0x45a53c['force']===!![]),mkdirSync(_0x10a959,{'recursive':!![],'mode':0x1c0});const _0x3f10c=existsSync(_0x43f324)?readFileSync(_0x43f324,_0x3f9d80(0x87)):undefined;return materializeFiles(_0x10a959,_0x7eb0e),removeStaleManagedFiles(_0x10a959,_0x32f1e7,_0x7eb0e),writeJsonAtomic(_0x56a550,buildMetadata(_0x580078,_0x816b62,_0x45a53c[_0x3f9d80(0x7c)],_0xfd98e6,_0x45a53c[_0x3f9d80(0x9a)],_0x7eb0e,_0x26515e)),{'skill':_0x580078,'scope':_0x816b62,'dir':_0x10a959,'skillMdPath':_0x43f324,'metadataPath':_0x56a550,'contentHash':_0xfd98e6,'changed':_0x3f10c!==_0x385682};}export function reuseMaterializedRuntimeSkill(_0x2635d2,_0x383221,_0x5561b6){const _0x1ed846=a157_0x482f,_0x1dbc8d=_0x2635d2[_0x1ed846(0x98)]?.[_0x1ed846(0xa4)]();if(!_0x1dbc8d)return undefined;const _0x24c9f0=requireSkillCode(_0x2635d2),_0x8c3e37=getRuntimeSkillDir(_0x5561b6[_0x1ed846(0x8f)],_0x5561b6['accessKey'],_0x5561b6[_0x1ed846(0x7c)],_0x383221,_0x24c9f0,_0x5561b6[_0x1ed846(0x72)]),_0x57b02e=resolve(_0x8c3e37,SKILL_FILE),_0xb99b17=resolve(_0x8c3e37,METADATA_FILE),_0x1713f6=readMetadataIfPresent(_0xb99b17);if(!_0x1713f6||_0x1713f6[_0x1ed846(0xa6)]!==0x2||_0x1713f6[_0x1ed846(0x7c)]!==_0x5561b6['appCode']||_0x1713f6[_0x1ed846(0x9b)]!==_0x383221||_0x1713f6[_0x1ed846(0xab)]!==_0x24c9f0||_0x1713f6[_0x1ed846(0x98)]!==_0x1dbc8d||_0x1713f6['id']!==_0x2635d2['id']||_0x1713f6[_0x1ed846(0x8d)]!==_0x2635d2['skillName']||_0x1713f6[_0x1ed846(0x74)]!==_0x2635d2['description']||_0x1713f6[_0x1ed846(0x99)]!==_0x2635d2[_0x1ed846(0x99)]||_0x1713f6[_0x1ed846(0x9d)]!==_0x2635d2['status']||!_0x1713f6[_0x1ed846(0x85)]||!_0x1713f6[_0x1ed846(0x9c)]||!Object[_0x1ed846(0x75)](_0x1713f6['fileHashes'],SKILL_FILE))return undefined;for(const [_0x169369,_0xbf5757]of Object['entries'](_0x1713f6[_0x1ed846(0x9c)])){if(!/^[a-f0-9]{64}$/['test'](_0xbf5757))return undefined;const _0x483864=resolveManagedFilePath(_0x8c3e37,_0x169369);if(!existsSync(_0x483864)||!lstatSync(_0x483864)[_0x1ed846(0x86)]())return undefined;if(bufferSha256(readFileSync(_0x483864))!==_0xbf5757)return undefined;}return{'skill':_0x2635d2,'scope':_0x383221,'dir':_0x8c3e37,'skillMdPath':_0x57b02e,'metadataPath':_0xb99b17,'contentHash':_0x1713f6['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x4307fe,_0x489535,_0x4acc06){const _0xa477ac=a157_0x482f,_0x5e99db=skillDisplayName(_0x489535,_0x4acc06),_0x4061f7=_0x489535[_0xa477ac(0x74)]?.['trim']()||_0x5e99db||_0x4acc06;return normalizeLocalFiles(_0x4307fe)['map'](_0x30f86f=>{const _0x848609=_0xa477ac,_0x20dc34=fileText(_0x30f86f);if(_0x30f86f['path']!==SKILL_FILE)return _0x30f86f;if(hasYamlFrontmatter(_0x20dc34))return{'path':_0x30f86f[_0x848609(0x78)],'content':withSyncedDisplayName(_0x20dc34,_0x5e99db)};return{'path':_0x30f86f[_0x848609(0x78)],'content':prependSkillFrontmatter(_0x20dc34,{'name':_0x4acc06,'displayName':_0x5e99db,'description':_0x4061f7})};});}function hasYamlFrontmatter(_0x3061b2){return/^\uFEFF?---\s*\r?\n/['test'](_0x3061b2);}function prependSkillFrontmatter(_0x1a2fee,_0x2a221d){const _0x3d131d=a157_0x482f,_0x13e24f=_0x1a2fee['replace'](/^\uFEFF/,'');return[_0x3d131d(0x9f),'name:\x20'+yamlString(_0x2a221d[_0x3d131d(0x7e)]),_0x2a221d[_0x3d131d(0xa1)]?_0x3d131d(0xa5)+yamlString(_0x2a221d[_0x3d131d(0xa1)]):undefined,_0x3d131d(0x82)+yamlString(_0x2a221d[_0x3d131d(0x74)]),'---','',_0x13e24f][_0x3d131d(0x93)](_0x9709c5=>_0x9709c5!==undefined)[_0x3d131d(0x95)]('\x0a');}function yamlString(_0x495d71){return JSON['stringify'](_0x495d71['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x28dd60,_0x8a8e3d){const _0x2ca564=_0x28dd60['skillName']?.['trim']();return _0x2ca564||_0x8a8e3d;}function withSyncedDisplayName(_0x1f27c3,_0x1ca207){const _0x260e38=a157_0x482f,_0x184c9f=_0x1f27c3['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x184c9f)return _0x1f27c3;const _0x2341a0=_0x184c9f[0x1]??'',_0x5ccef0=_0x184c9f[0x2]??'',_0x192574=parseDocument(_0x5ccef0);if(_0x192574[_0x260e38(0x90)][_0x260e38(0x7d)]>0x0||!isMap(_0x192574[_0x260e38(0x77)]))return _0x1f27c3;if(_0x1ca207)_0x192574[_0x260e38(0x7a)](_0x260e38(0xa1),_0x1ca207);else{if(_0x192574[_0x260e38(0xa8)](_0x260e38(0xa1)))_0x192574[_0x260e38(0x84)]('displayName');else return _0x1f27c3;}forceBlockCollections(_0x192574['contents']);const _0x4612a7=_0x192574[_0x260e38(0x7b)]({'lineWidth':0x0})[_0x260e38(0x76)](),_0x56b0e8=_0x1f27c3['slice'](_0x184c9f[0x0][_0x260e38(0x7d)])['replace'](/^\r?\n/,'');return _0x2341a0+'---\x0a'+_0x4612a7+_0x260e38(0x8c)+_0x56b0e8;}function forceBlockCollections(_0x381ee6){if(!isNode(_0x381ee6))return;visit(_0x381ee6,(_0x1d30ef,_0x2c137a)=>{const _0x3ebdb7=a157_0x482f;isCollection(_0x2c137a)&&(_0x2c137a[_0x3ebdb7(0xa9)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x14afde,_0x344aeb,_0x4305da,_0x2976f8){const _0x44344b=a157_0x482f;if(_0x2976f8||!existsSync(_0x344aeb))return;const _0x42e39d=readMetadataIfPresent(_0x344aeb);if(!_0x42e39d)return;const _0x20f56d=_0x42e39d[_0x44344b(0x9c)]&&Object[_0x44344b(0x91)](_0x42e39d['fileHashes'])['length']>0x0?_0x42e39d[_0x44344b(0x9c)]:undefined;if(_0x20f56d)for(const [_0x23657f,_0x483ee9]of Object[_0x44344b(0x9e)](_0x20f56d)){const _0x20de67=resolveManagedFilePath(_0x14afde,_0x23657f);if(!existsSync(_0x20de67))throw CliErrors[_0x44344b(0x73)](_0x44344b(0x8b)+_0x14afde,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x23657f);const _0x4c5bdc=lstatSync(_0x20de67);if(!_0x4c5bdc[_0x44344b(0x86)]())throw CliErrors[_0x44344b(0x73)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x14afde,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x23657f);const _0x546364=bufferSha256(readFileSync(_0x20de67));if(_0x546364!==_0x483ee9)throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x14afde+_0x44344b(0xaa)+_0x23657f,_0x44344b(0x81)+_0x23657f);}else{const _0x5a3ec1=resolve(_0x14afde,SKILL_FILE);if(existsSync(_0x5a3ec1)&&_0x42e39d[_0x44344b(0x85)]){const _0x575a40=contentHash(readFileSync(_0x5a3ec1,_0x44344b(0x87)));if(_0x575a40!==_0x42e39d[_0x44344b(0x85)])throw CliErrors[_0x44344b(0x73)](_0x44344b(0x80)+_0x5a3ec1,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x30c093 of normalizeLocalFiles(_0x4305da)){if(_0x20f56d?.[_0x30c093[_0x44344b(0x78)]])continue;if(!_0x20f56d&&_0x30c093[_0x44344b(0x78)]===SKILL_FILE)continue;const _0x4fec02=resolveManagedFilePath(_0x14afde,_0x30c093[_0x44344b(0x78)]);if(!existsSync(_0x4fec02))continue;const _0x6a64a0=lstatSync(_0x4fec02);if(!_0x6a64a0['isFile']())throw CliErrors['validation'](_0x44344b(0x8b)+_0x14afde,_0x44344b(0x89)+_0x30c093[_0x44344b(0x78)]);const _0x1050ee=bufferSha256(readFileSync(_0x4fec02));if(_0x1050ee!==fileHash(_0x30c093))throw CliErrors[_0x44344b(0x73)](_0x44344b(0x8b)+_0x14afde,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x30c093[_0x44344b(0x78)]);}}function materializeFiles(_0x206afa,_0x4cc908){const _0x44be1d=a157_0x482f;for(const _0x341df5 of normalizeLocalFiles(_0x4cc908)){const _0x567631=resolveManagedFilePath(_0x206afa,_0x341df5[_0x44be1d(0x78)]);mkdirSync(dirname(_0x567631),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x567631,fileContent(_0x341df5),0x180);}}function removeStaleManagedFiles(_0x184027,_0x3175e4,_0xdee6e9){const _0x5e0080=a157_0x482f;if(!_0x3175e4)return;const _0x3f631a=new Set(normalizeLocalFiles(_0xdee6e9)[_0x5e0080(0xa3)](_0x3dab6d=>_0x3dab6d[_0x5e0080(0x78)]));for(const _0xd0a7ff of Object['keys'](_0x3175e4)){if(_0x3f631a['has'](_0xd0a7ff))continue;const _0x9fa248=resolveManagedFilePath(_0x184027,_0xd0a7ff);existsSync(_0x9fa248)&&lstatSync(_0x9fa248)['isFile']()&&rmSync(_0x9fa248,{'force':!![]});}}
1
+ (function(_0x29e779,_0x2b7616){const _0x5e7bf2=a157_0x26d0,_0x5c3b1c=_0x29e779();while(!![]){try{const _0x2357b1=parseInt(_0x5e7bf2(0x84))/0x1+parseInt(_0x5e7bf2(0x83))/0x2+-parseInt(_0x5e7bf2(0x9a))/0x3*(parseInt(_0x5e7bf2(0x7c))/0x4)+parseInt(_0x5e7bf2(0x6e))/0x5*(-parseInt(_0x5e7bf2(0xa6))/0x6)+-parseInt(_0x5e7bf2(0x72))/0x7*(parseInt(_0x5e7bf2(0x8d))/0x8)+-parseInt(_0x5e7bf2(0xa7))/0x9+parseInt(_0x5e7bf2(0x87))/0xa*(parseInt(_0x5e7bf2(0x7a))/0xb);if(_0x2357b1===_0x2b7616)break;else _0x5c3b1c['push'](_0x5c3b1c['shift']());}catch(_0x1b5a8a){_0x5c3b1c['push'](_0x5c3b1c['shift']());}}}(a157_0x427d,0xa5058));function a157_0x26d0(_0x1b17e0,_0x1de80b){_0x1b17e0=_0x1b17e0-0x6c;const _0x427d2a=a157_0x427d();let _0x26d02b=_0x427d2a[_0x1b17e0];return _0x26d02b;}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(_0x3e90f5,_0x3bc6e7,_0x3547a2){const _0x1c716d=a157_0x26d0,_0x133b42=requireSkillCode(_0x3e90f5),_0xd4bec1=requirePackageBytes(_0x133b42,_0x3547a2[_0x1c716d(0x88)]),_0xc90479=extractDownloadedPackage(_0xd4bec1),_0x42dd78=_0xc90479['find'](_0x148e36=>_0x148e36[_0x1c716d(0x98)]===SKILL_FILE);if(!_0x42dd78)throw CliErrors[_0x1c716d(0x92)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x133b42);const _0x3cc11a=withMaterializedSkillFrontmatter(_0xc90479,_0x3e90f5,_0x133b42),_0x2cc7df=_0x3cc11a[_0x1c716d(0xaa)](_0x58e9eb=>_0x58e9eb[_0x1c716d(0x98)]===SKILL_FILE),_0x3303d4=fileText(_0x2cc7df),_0x3a2b8e=getRuntimeSkillDir(_0x3547a2[_0x1c716d(0x9f)],_0x3547a2[_0x1c716d(0x95)],_0x3547a2[_0x1c716d(0xa1)],_0x3bc6e7,_0x133b42,_0x3547a2[_0x1c716d(0x7d)]),_0x833da2=resolve(_0x3a2b8e,SKILL_FILE),_0x59a2ce=resolve(_0x3a2b8e,METADATA_FILE),_0x3065f8=contentHash(_0x3303d4),_0x20ca18=readMetadataIfPresent(_0x59a2ce)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x3a2b8e,_0x59a2ce,_0x3cc11a,_0x3547a2[_0x1c716d(0x6d)]===!![]),mkdirSync(_0x3a2b8e,{'recursive':!![],'mode':0x1c0});const _0x483eed=existsSync(_0x833da2)?readFileSync(_0x833da2,_0x1c716d(0x76)):undefined;return materializeFiles(_0x3a2b8e,_0x3cc11a),removeStaleManagedFiles(_0x3a2b8e,_0x20ca18,_0x3cc11a),writeJsonAtomic(_0x59a2ce,buildMetadata(_0x3e90f5,_0x3bc6e7,_0x3547a2[_0x1c716d(0xa1)],_0x3065f8,_0x3547a2[_0x1c716d(0x93)],_0x3cc11a,_0xd4bec1)),{'skill':_0x3e90f5,'scope':_0x3bc6e7,'dir':_0x3a2b8e,'skillMdPath':_0x833da2,'metadataPath':_0x59a2ce,'contentHash':_0x3065f8,'changed':_0x483eed!==_0x3303d4};}export function reuseMaterializedRuntimeSkill(_0x9dd935,_0x323adc,_0x42c08d){const _0x3fb132=a157_0x26d0,_0x2643fd=_0x9dd935['version']?.[_0x3fb132(0xa9)]();if(!_0x2643fd)return undefined;const _0x28418b=requireSkillCode(_0x9dd935),_0x263efd=getRuntimeSkillDir(_0x42c08d['env'],_0x42c08d[_0x3fb132(0x95)],_0x42c08d[_0x3fb132(0xa1)],_0x323adc,_0x28418b,_0x42c08d['paths']),_0x56c664=resolve(_0x263efd,SKILL_FILE),_0x539b2e=resolve(_0x263efd,METADATA_FILE),_0x4aa1ae=readMetadataIfPresent(_0x539b2e);if(!_0x4aa1ae||_0x4aa1ae[_0x3fb132(0x7e)]!==0x2||_0x4aa1ae[_0x3fb132(0xa1)]!==_0x42c08d[_0x3fb132(0xa1)]||_0x4aa1ae[_0x3fb132(0x78)]!==_0x323adc||_0x4aa1ae[_0x3fb132(0x9c)]!==_0x28418b||_0x4aa1ae[_0x3fb132(0x8a)]!==_0x2643fd||_0x4aa1ae['id']!==_0x9dd935['id']||_0x4aa1ae[_0x3fb132(0x77)]!==_0x9dd935['skillName']||_0x4aa1ae['description']!==_0x9dd935['description']||_0x4aa1ae[_0x3fb132(0xa0)]!==_0x9dd935[_0x3fb132(0xa0)]||_0x4aa1ae[_0x3fb132(0xa8)]!==_0x9dd935['status']||!_0x4aa1ae['contentHash']||!_0x4aa1ae['fileHashes']||!Object[_0x3fb132(0x86)](_0x4aa1ae['fileHashes'],SKILL_FILE))return undefined;for(const [_0x3be0c5,_0x3ffa7a]of Object[_0x3fb132(0x8f)](_0x4aa1ae[_0x3fb132(0x9b)])){if(!/^[a-f0-9]{64}$/[_0x3fb132(0x6c)](_0x3ffa7a))return undefined;const _0x5a559e=resolveManagedFilePath(_0x263efd,_0x3be0c5);if(!existsSync(_0x5a559e)||!lstatSync(_0x5a559e)[_0x3fb132(0x9d)]())return undefined;if(bufferSha256(readFileSync(_0x5a559e))!==_0x3ffa7a)return undefined;}return{'skill':_0x9dd935,'scope':_0x323adc,'dir':_0x263efd,'skillMdPath':_0x56c664,'metadataPath':_0x539b2e,'contentHash':_0x4aa1ae['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x1f9b0f,_0x176ac0,_0xa95b25){const _0x42609f=a157_0x26d0,_0x4ced70=skillDisplayName(_0x176ac0,_0xa95b25),_0x5a5daf=_0x176ac0[_0x42609f(0x71)]?.[_0x42609f(0xa9)]()||_0x4ced70||_0xa95b25;return normalizeLocalFiles(_0x1f9b0f)[_0x42609f(0x80)](_0x4863d3=>{const _0x1bf566=_0x42609f,_0x4bc82c=fileText(_0x4863d3);if(_0x4863d3['path']!==SKILL_FILE)return _0x4863d3;if(hasYamlFrontmatter(_0x4bc82c))return{'path':_0x4863d3[_0x1bf566(0x98)],'content':withSyncedDisplayName(_0x4bc82c,_0x4ced70)};return{'path':_0x4863d3[_0x1bf566(0x98)],'content':prependSkillFrontmatter(_0x4bc82c,{'name':_0xa95b25,'displayName':_0x4ced70,'description':_0x5a5daf})};});}function hasYamlFrontmatter(_0x1dfd66){const _0x26103f=a157_0x26d0;return/^\uFEFF?---\s*\r?\n/[_0x26103f(0x6c)](_0x1dfd66);}function prependSkillFrontmatter(_0x1164aa,_0x1880e4){const _0x1a9f96=a157_0x26d0,_0x505fef=_0x1164aa['replace'](/^\uFEFF/,'');return['---',_0x1a9f96(0xa2)+yamlString(_0x1880e4[_0x1a9f96(0x8c)]),_0x1880e4['displayName']?_0x1a9f96(0x94)+yamlString(_0x1880e4[_0x1a9f96(0x7b)]):undefined,'description:\x20'+yamlString(_0x1880e4[_0x1a9f96(0x71)]),'---','',_0x505fef]['filter'](_0x17eb76=>_0x17eb76!==undefined)[_0x1a9f96(0x85)]('\x0a');}function yamlString(_0x5736c5){const _0x5ea58f=a157_0x26d0;return JSON[_0x5ea58f(0xa5)](_0x5736c5[_0x5ea58f(0xa3)](/\r/g,'')[_0x5ea58f(0xa9)]());}function skillDisplayName(_0x165bdc,_0x168b6a){const _0x290246=a157_0x26d0,_0x4e1a0d=_0x165bdc[_0x290246(0x77)]?.[_0x290246(0xa9)]();return _0x4e1a0d||_0x168b6a;}function a157_0x427d(){const _0x138fdf=['scope','flow','11bpztjj','displayName','8zdwRtk','paths','schemaVersion','slice','map','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','2577016RLrcWd','257337rhHayh','join','hasOwn','23336170fDNJfO','packageBytes','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','version','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','name','57736qpfoYi','match','entries','length','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','validation','pulledAt','displayName:\x20','accessKey','delete','has','path','---\x0a','1702803xlCxqE','fileHashes','skillCode','isFile','\x0a---\x0a\x0a','env','example','appCode','name:\x20','replace','trimEnd','stringify','6iNtmmw','7721568AGWZFq','status','trim','find','test','force','2551655maQrgd','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','description','679mkgnOi','contentHash','keys','toString','utf8','skillName'];a157_0x427d=function(){return _0x138fdf;};return a157_0x427d();}function withSyncedDisplayName(_0x563a15,_0x4a5361){const _0x3f87dc=a157_0x26d0,_0x5c727c=_0x563a15[_0x3f87dc(0x8e)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5c727c)return _0x563a15;const _0x4cad3c=_0x5c727c[0x1]??'',_0x51f16c=_0x5c727c[0x2]??'',_0x16c314=parseDocument(_0x51f16c);if(_0x16c314['errors'][_0x3f87dc(0x90)]>0x0||!isMap(_0x16c314['contents']))return _0x563a15;if(_0x4a5361)_0x16c314['set'](_0x3f87dc(0x7b),_0x4a5361);else{if(_0x16c314[_0x3f87dc(0x97)]('displayName'))_0x16c314[_0x3f87dc(0x96)]('displayName');else return _0x563a15;}forceBlockCollections(_0x16c314['contents']);const _0x3e7bc0=_0x16c314[_0x3f87dc(0x75)]({'lineWidth':0x0})[_0x3f87dc(0xa4)](),_0x225c45=_0x563a15[_0x3f87dc(0x7f)](_0x5c727c[0x0][_0x3f87dc(0x90)])['replace'](/^\r?\n/,'');return _0x4cad3c+_0x3f87dc(0x99)+_0x3e7bc0+_0x3f87dc(0x9e)+_0x225c45;}function forceBlockCollections(_0x15a499){if(!isNode(_0x15a499))return;visit(_0x15a499,(_0x41f0ce,_0x5911a6)=>{const _0x3e5500=a157_0x26d0;isCollection(_0x5911a6)&&(_0x5911a6[_0x3e5500(0x79)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x48b04b,_0x45692b,_0x3fd56a,_0x52246c){const _0x39741e=a157_0x26d0;if(_0x52246c||!existsSync(_0x45692b))return;const _0x4f73af=readMetadataIfPresent(_0x45692b);if(!_0x4f73af)return;const _0x13753a=_0x4f73af['fileHashes']&&Object[_0x39741e(0x74)](_0x4f73af[_0x39741e(0x9b)])[_0x39741e(0x90)]>0x0?_0x4f73af[_0x39741e(0x9b)]:undefined;if(_0x13753a)for(const [_0x1a07b8,_0x3093b2]of Object[_0x39741e(0x8f)](_0x13753a)){const _0x6b1c72=resolveManagedFilePath(_0x48b04b,_0x1a07b8);if(!existsSync(_0x6b1c72))throw CliErrors[_0x39741e(0x92)](_0x39741e(0x82)+_0x48b04b,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x1a07b8);const _0x104a0f=lstatSync(_0x6b1c72);if(!_0x104a0f['isFile']())throw CliErrors[_0x39741e(0x92)](_0x39741e(0x82)+_0x48b04b,_0x39741e(0x6f)+_0x1a07b8);const _0x359146=bufferSha256(readFileSync(_0x6b1c72));if(_0x359146!==_0x3093b2)throw CliErrors[_0x39741e(0x92)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x48b04b+'.\x20Changed\x20file:\x20'+_0x1a07b8,_0x39741e(0x8b)+_0x1a07b8);}else{const _0x2c487f=resolve(_0x48b04b,SKILL_FILE);if(existsSync(_0x2c487f)&&_0x4f73af[_0x39741e(0x73)]){const _0x2f843a=contentHash(readFileSync(_0x2c487f,'utf8'));if(_0x2f843a!==_0x4f73af[_0x39741e(0x73)])throw CliErrors['validation'](_0x39741e(0x70)+_0x2c487f,_0x39741e(0x81));}}for(const _0x3fff29 of normalizeLocalFiles(_0x3fd56a)){if(_0x13753a?.[_0x3fff29[_0x39741e(0x98)]])continue;if(!_0x13753a&&_0x3fff29[_0x39741e(0x98)]===SKILL_FILE)continue;const _0x2dcfb3=resolveManagedFilePath(_0x48b04b,_0x3fff29[_0x39741e(0x98)]);if(!existsSync(_0x2dcfb3))continue;const _0xaceb59=lstatSync(_0x2dcfb3);if(!_0xaceb59[_0x39741e(0x9d)]())throw CliErrors[_0x39741e(0x92)](_0x39741e(0x82)+_0x48b04b,_0x39741e(0x91)+_0x3fff29[_0x39741e(0x98)]);const _0x30c512=bufferSha256(readFileSync(_0x2dcfb3));if(_0x30c512!==fileHash(_0x3fff29))throw CliErrors['validation'](_0x39741e(0x82)+_0x48b04b,_0x39741e(0x89)+_0x3fff29[_0x39741e(0x98)]);}}function materializeFiles(_0x3aca18,_0x478073){const _0x29fd0c=a157_0x26d0;for(const _0x1d9edb of normalizeLocalFiles(_0x478073)){const _0x337dd3=resolveManagedFilePath(_0x3aca18,_0x1d9edb[_0x29fd0c(0x98)]);mkdirSync(dirname(_0x337dd3),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x337dd3,fileContent(_0x1d9edb),0x180);}}function removeStaleManagedFiles(_0x22dbb0,_0x3a189d,_0x17e07a){const _0x112b30=a157_0x26d0;if(!_0x3a189d)return;const _0x276f4a=new Set(normalizeLocalFiles(_0x17e07a)[_0x112b30(0x80)](_0x44cd92=>_0x44cd92[_0x112b30(0x98)]));for(const _0x33e121 of Object[_0x112b30(0x74)](_0x3a189d)){if(_0x276f4a[_0x112b30(0x97)](_0x33e121))continue;const _0x2347ae=resolveManagedFilePath(_0x22dbb0,_0x33e121);existsSync(_0x2347ae)&&lstatSync(_0x2347ae)['isFile']()&&rmSync(_0x2347ae,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x3ffa4f,_0x49baba){const _0x554152=a158_0xbbc2,_0xb22440=_0x3ffa4f();while(!![]){try{const _0x489778=-parseInt(_0x554152(0x131))/0x1+parseInt(_0x554152(0x11a))/0x2*(-parseInt(_0x554152(0x125))/0x3)+parseInt(_0x554152(0x12f))/0x4+-parseInt(_0x554152(0x129))/0x5+-parseInt(_0x554152(0x122))/0x6+parseInt(_0x554152(0x12c))/0x7+parseInt(_0x554152(0x116))/0x8;if(_0x489778===_0x49baba)break;else _0xb22440['push'](_0xb22440['shift']());}catch(_0x1bec13){_0xb22440['push'](_0xb22440['shift']());}}}(a158_0x4cd6,0xc4076));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a158_0xbbc2(_0x2b9bb3,_0x363073){_0x2b9bb3=_0x2b9bb3-0x116;const _0x4cd65b=a158_0x4cd6();let _0xbbc26b=_0x4cd65b[_0x2b9bb3];return _0xbbc26b;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x1b65c7,_0x2aa448,_0x12d63a,_0x5760f7,_0x3058d4,_0x347ab5,_0x18aa00){const _0x778e6a=a158_0xbbc2,_0x536c6a=_0x347ab5?normalizeLocalFiles(_0x347ab5):[],_0xc6a67e=!_0x18aa00&&_0x536c6a[_0x778e6a(0x132)]>0x0?buildSkillPackage(_0x536c6a):undefined,_0x3a7385=_0x18aa00?bufferSha256(_0x18aa00):_0xc6a67e?.[_0x778e6a(0x11d)][_0x778e6a(0x119)],_0x37180f=_0x18aa00?.[_0x778e6a(0x132)]??_0xc6a67e?.['manifest']['zipSize'],_0x4b4040=_0x536c6a[_0x778e6a(0x132)]>0x0?Object['fromEntries'](_0x536c6a[_0x778e6a(0x12e)](_0x163ab9=>[_0x163ab9['path'],fileHash(_0x163ab9)])):undefined;return{'schemaVersion':_0x536c6a[_0x778e6a(0x132)]>0x0?0x2:0x1,'id':_0x1b65c7['id'],'appCode':_0x12d63a,'skillCode':requireSkillCode(_0x1b65c7),'skillName':_0x1b65c7['skillName'],'description':_0x1b65c7['description'],'example':_0x1b65c7[_0x778e6a(0x11b)],'scope':_0x2aa448,'readonly':_0x2aa448!=='personal'||_0x1b65c7[_0x778e6a(0x126)]===!![],'tenantCode':_0x1b65c7[_0x778e6a(0x117)],'userId':_0x1b65c7[_0x778e6a(0x11f)],'version':_0x1b65c7['version'],'status':_0x1b65c7['status'],'tags':Array[_0x778e6a(0x133)](_0x1b65c7[_0x778e6a(0x12a)])?_0x1b65c7['tags']:[],'hasUpstreamUpdate':_0x1b65c7[_0x778e6a(0x123)],'forkedFromSkillId':_0x1b65c7['forkedFromSkillId'],'forkedFromVersion':_0x1b65c7[_0x778e6a(0x118)],'sourceSessionId':_0x1b65c7[_0x778e6a(0x11e)],'contentHash':_0x5760f7,'fileHashes':_0x4b4040,'treeHash':_0x536c6a[_0x778e6a(0x132)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x536c6a)):undefined,'ossPath':remoteManifestOssPath(_0x1b65c7['files']),'zipSha256':_0x3a7385,'zipSize':_0x37180f,'files':_0x536c6a[_0x778e6a(0x132)]>0x0?_0x536c6a[_0x778e6a(0x12e)](_0x1f500f=>({'path':_0x1f500f[_0x778e6a(0x121)],'hash':fileHash(_0x1f500f),'size':fileContent(_0x1f500f)['length']})):undefined,'pulledAt':_0x3058d4??new Date()[_0x778e6a(0x130)]()};}export function requireSkillCode(_0x168e02){const _0x417d51=a158_0xbbc2,_0xdef41d=_0x168e02[_0x417d51(0x11c)]?.[_0x417d51(0x135)]();if(!_0xdef41d)throw CliErrors[_0x417d51(0x124)](_0x417d51(0x134));return _0xdef41d;}function a158_0x4cd6(){const _0x1a8dc9=['ossPath','path','5266308xfMxJF','hasUpstreamUpdate','validation','3TgFoeK','readonly','utf8','object','5471350JJOsBH','tags','parse','1474977RQuFpA','string','map','4946252LrKJka','toISOString','623280WpDDxP','length','isArray','Runtime\x20Skill\x20is\x20missing\x20skillCode.','trim','16624088LxXWAS','tenantCode','forkedFromVersion','zipSha256','254166NsQWRr','example','skillCode','manifest','sourceSessionId','userId'];a158_0x4cd6=function(){return _0x1a8dc9;};return a158_0x4cd6();}export function readMetadataIfPresent(_0x1581b0){const _0x4111dc=a158_0xbbc2;if(!existsSync(_0x1581b0))return undefined;try{const _0xeb4bb9=JSON[_0x4111dc(0x12b)](readFileSync(_0x1581b0,_0x4111dc(0x127)));return _0xeb4bb9;}catch{throw CliErrors[_0x4111dc(0x124)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x1581b0);}}function remoteManifestOssPath(_0x77b9fc){const _0x2bd6bf=a158_0xbbc2;if(!_0x77b9fc||typeof _0x77b9fc!==_0x2bd6bf(0x128)||Array['isArray'](_0x77b9fc))return undefined;const _0x1d1389=_0x77b9fc[_0x2bd6bf(0x120)];return typeof _0x1d1389===_0x2bd6bf(0x12d)&&_0x1d1389[_0x2bd6bf(0x135)]()?_0x1d1389[_0x2bd6bf(0x135)]():undefined;}
1
+ (function(_0x171cd4,_0x394258){const _0x5b8562=a158_0x251d,_0x2f9178=_0x171cd4();while(!![]){try{const _0x34c53c=parseInt(_0x5b8562(0x20e))/0x1*(-parseInt(_0x5b8562(0x1f7))/0x2)+-parseInt(_0x5b8562(0x1f9))/0x3*(-parseInt(_0x5b8562(0x1fc))/0x4)+-parseInt(_0x5b8562(0x20a))/0x5*(parseInt(_0x5b8562(0x213))/0x6)+-parseInt(_0x5b8562(0x212))/0x7*(parseInt(_0x5b8562(0x1f1))/0x8)+-parseInt(_0x5b8562(0x1ff))/0x9+-parseInt(_0x5b8562(0x207))/0xa+-parseInt(_0x5b8562(0x211))/0xb*(-parseInt(_0x5b8562(0x1f8))/0xc);if(_0x34c53c===_0x394258)break;else _0x2f9178['push'](_0x2f9178['shift']());}catch(_0x148593){_0x2f9178['push'](_0x2f9178['shift']());}}}(a158_0x4e4f,0x93997));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 a158_0x251d(_0x1da522,_0x4c06d4){_0x1da522=_0x1da522-0x1f1;const _0x4e4f72=a158_0x4e4f();let _0x251dd8=_0x4e4f72[_0x1da522];return _0x251dd8;}function a158_0x4e4f(){const _0x234405=['zipSize','skillName','Runtime\x20Skill\x20is\x20missing\x20skillCode.','map','parse','string','path','3325900PfgUqI','trim','toISOString','217510ErTdwr','object','length','files','11rCscVr','isArray','fromEntries','154TDjpWC','7CUunug','132WFFBNu','example','hasUpstreamUpdate','readonly','skillCode','8464528tClWLk','sourceSessionId','manifest','validation','ossPath','tags','29884MmQBAZ','3640404BQPDYB','981nMPwBl','forkedFromSkillId','userId','12Jvmhgb','zipSha256','status','10183410vkxXir'];a158_0x4e4f=function(){return _0x234405;};return a158_0x4e4f();}export function buildMetadata(_0x297d54,_0xba1172,_0x449bc5,_0x5b003,_0x3b3057,_0x210d33,_0x34ce3c){const _0x43812e=a158_0x251d,_0x5fd9de=_0x210d33?normalizeLocalFiles(_0x210d33):[],_0x21ca50=!_0x34ce3c&&_0x5fd9de[_0x43812e(0x20c)]>0x0?buildSkillPackage(_0x5fd9de):undefined,_0xbdaf1f=_0x34ce3c?bufferSha256(_0x34ce3c):_0x21ca50?.[_0x43812e(0x1f3)][_0x43812e(0x1fd)],_0x471980=_0x34ce3c?.['length']??_0x21ca50?.[_0x43812e(0x1f3)][_0x43812e(0x200)],_0x5e47e4=_0x5fd9de[_0x43812e(0x20c)]>0x0?Object[_0x43812e(0x210)](_0x5fd9de[_0x43812e(0x203)](_0x2d6ff4=>[_0x2d6ff4[_0x43812e(0x206)],fileHash(_0x2d6ff4)])):undefined;return{'schemaVersion':_0x5fd9de[_0x43812e(0x20c)]>0x0?0x2:0x1,'id':_0x297d54['id'],'appCode':_0x449bc5,'skillCode':requireSkillCode(_0x297d54),'skillName':_0x297d54[_0x43812e(0x201)],'description':_0x297d54['description'],'example':_0x297d54[_0x43812e(0x214)],'scope':_0xba1172,'readonly':_0xba1172!=='personal'||_0x297d54[_0x43812e(0x216)]===!![],'tenantCode':_0x297d54['tenantCode'],'userId':_0x297d54[_0x43812e(0x1fb)],'version':_0x297d54['version'],'status':_0x297d54[_0x43812e(0x1fe)],'tags':Array[_0x43812e(0x20f)](_0x297d54['tags'])?_0x297d54[_0x43812e(0x1f6)]:[],'hasUpstreamUpdate':_0x297d54[_0x43812e(0x215)],'forkedFromSkillId':_0x297d54[_0x43812e(0x1fa)],'forkedFromVersion':_0x297d54['forkedFromVersion'],'sourceSessionId':_0x297d54[_0x43812e(0x1f2)],'contentHash':_0x5b003,'fileHashes':_0x5e47e4,'treeHash':_0x5fd9de[_0x43812e(0x20c)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5fd9de)):undefined,'ossPath':remoteManifestOssPath(_0x297d54[_0x43812e(0x20d)]),'zipSha256':_0xbdaf1f,'zipSize':_0x471980,'files':_0x5fd9de[_0x43812e(0x20c)]>0x0?_0x5fd9de[_0x43812e(0x203)](_0xc0df94=>({'path':_0xc0df94['path'],'hash':fileHash(_0xc0df94),'size':fileContent(_0xc0df94)[_0x43812e(0x20c)]})):undefined,'pulledAt':_0x3b3057??new Date()[_0x43812e(0x209)]()};}export function requireSkillCode(_0x29a1eb){const _0x56b0cc=a158_0x251d,_0x3feea3=_0x29a1eb[_0x56b0cc(0x217)]?.[_0x56b0cc(0x208)]();if(!_0x3feea3)throw CliErrors[_0x56b0cc(0x1f4)](_0x56b0cc(0x202));return _0x3feea3;}export function readMetadataIfPresent(_0x1add28){const _0x43cb75=a158_0x251d;if(!existsSync(_0x1add28))return undefined;try{const _0x4d23e1=JSON[_0x43cb75(0x204)](readFileSync(_0x1add28,'utf8'));return _0x4d23e1;}catch{throw CliErrors[_0x43cb75(0x1f4)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x1add28);}}function remoteManifestOssPath(_0x32a5a3){const _0x5d0235=a158_0x251d;if(!_0x32a5a3||typeof _0x32a5a3!==_0x5d0235(0x20b)||Array['isArray'](_0x32a5a3))return undefined;const _0x523a8b=_0x32a5a3[_0x5d0235(0x1f5)];return typeof _0x523a8b===_0x5d0235(0x205)&&_0x523a8b['trim']()?_0x523a8b[_0x5d0235(0x208)]():undefined;}
@@ -1 +1 @@
1
- const a159_0x2aa850=a159_0x3d32;(function(_0x40572d,_0x34bcda){const _0x290a89=a159_0x3d32,_0x4007b1=_0x40572d();while(!![]){try{const _0x4c8bf4=parseInt(_0x290a89(0x184))/0x1*(-parseInt(_0x290a89(0x18d))/0x2)+parseInt(_0x290a89(0x189))/0x3+-parseInt(_0x290a89(0x186))/0x4+parseInt(_0x290a89(0x195))/0x5+parseInt(_0x290a89(0x192))/0x6+-parseInt(_0x290a89(0x18e))/0x7+parseInt(_0x290a89(0x19b))/0x8*(parseInt(_0x290a89(0x191))/0x9);if(_0x4c8bf4===_0x34bcda)break;else _0x4007b1['push'](_0x4007b1['shift']());}catch(_0x2f0c98){_0x4007b1['push'](_0x4007b1['shift']());}}}(a159_0x2024,0xade2b));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x313724={}){const _0xd23c70=a159_0x3d32,_0x42030d=_0x313724[_0xd23c70(0x199)]??homedir(),_0x3e7d83=resolve(_0x42030d,PRODUCT_CONFIG[_0xd23c70(0x193)],_0xd23c70(0x185)),_0xaff057=trimmedEnv(_0xd23c70(0x18c)),_0x24b84c=trimmedEnv(_0xd23c70(0x18b)),_0x26423b=resolve(_0x42030d,_0xd23c70(0x198)),_0x2aebf2=_0x313724[_0xd23c70(0x18a)]??(existsSync(_0x26423b)?resolve(_0x26423b,'skills'):undefined);return{'homeDir':_0x42030d,'cacheRoot':_0x3e7d83,'managedRoot':resolve(_0x42030d,PRODUCT_CONFIG[_0xd23c70(0x193)]),'agentsSkillsDir':_0x313724[_0xd23c70(0x19d)]??_0xaff057??resolve(_0x42030d,_0xd23c70(0x190),'skills'),'claudeSkillsDir':_0x313724[_0xd23c70(0x187)]??_0x24b84c??resolve(_0x42030d,_0xd23c70(0x194),_0xd23c70(0x18f)),'workbuddySkillsDir':_0x2aebf2};}function a159_0x2024(){const _0x1c9837=['filter','3171270OjsamD','workbuddySkillsDir','CLAUDE_SKILL_ROOT','SKILL_ROOT','2DEpQHM','8360884GkDhZv','skills','.agents','5328ejIENA','3716766EcNjmS','homeDirName','.claude','1404550tAwgyH','\x20for\x20local\x20path:\x20','skillCode','.workbuddy','homeDir','Unsafe\x20','13096RZVojR','path\x20segment','agentsSkillsDir','validation','927683RtFpWR','cache','368940LkvHss','claudeSkillsDir'];a159_0x2024=function(){return _0x1c9837;};return a159_0x2024();}function a159_0x3d32(_0x1f3a93,_0x329bef){_0x1f3a93=_0x1f3a93-0x183;const _0x202454=a159_0x2024();let _0x3d3249=_0x202454[_0x1f3a93];return _0x3d3249;}export function runtimeAgentSkillRoots(_0x21a6eb){const _0x144372=a159_0x3d32;return[_0x21a6eb[_0x144372(0x19d)],_0x21a6eb[_0x144372(0x187)],_0x21a6eb['workbuddySkillsDir']][_0x144372(0x188)](_0x28cffd=>Boolean(_0x28cffd));}export function getRuntimeSkillCacheRoot(_0xdb480c,_0x42083c,_0x13ab36={}){const _0x563783=a159_0x3d32,_0x1334ef=resolveSkillSyncPaths(_0x13ab36);return resolve(_0x1334ef['cacheRoot'],_0xdb480c,fingerprintAccessKey(_0x42083c),_0x563783(0x18f));}export function getRuntimeSkillDir(_0x37b15f,_0x5bb966,_0xf31ece,_0xa2bf71,_0x257ad6,_0x586e84={}){const _0x500547=a159_0x3d32;return resolve(getRuntimeSkillCacheRoot(_0x37b15f,_0x5bb966,_0x586e84),safePathSegment(_0xf31ece,'appCode'),_0xa2bf71,safePathSegment(_0x257ad6,_0x500547(0x197)));}export function safePathSegment(_0x377688,_0x45a052=a159_0x2aa850(0x19c)){const _0x536baf=a159_0x2aa850;if(!_0x377688||_0x377688['includes']('/')||_0x377688['includes']('\x5c')||_0x377688['includes']('..'))throw CliErrors[_0x536baf(0x183)](_0x536baf(0x19a)+_0x45a052+_0x536baf(0x196)+_0x377688);return _0x377688;}function trimmedEnv(_0x1ad7cc){const _0x416880=productEnv(_0x1ad7cc)?.['trim']();return _0x416880?_0x416880:undefined;}
1
+ const a159_0x23bbb2=a159_0x428f;(function(_0x18fb87,_0x3db6ae){const _0x36d697=a159_0x428f,_0x3ba087=_0x18fb87();while(!![]){try{const _0x14548d=parseInt(_0x36d697(0x10d))/0x1+parseInt(_0x36d697(0x108))/0x2*(-parseInt(_0x36d697(0x11c))/0x3)+-parseInt(_0x36d697(0x118))/0x4+parseInt(_0x36d697(0x11b))/0x5+-parseInt(_0x36d697(0x115))/0x6+-parseInt(_0x36d697(0x10b))/0x7+parseInt(_0x36d697(0x10a))/0x8;if(_0x14548d===_0x3db6ae)break;else _0x3ba087['push'](_0x3ba087['shift']());}catch(_0x141315){_0x3ba087['push'](_0x3ba087['shift']());}}}(a159_0x4551,0x4a875));function a159_0x4551(){const _0x5c123b=['Unsafe\x20','homeDir','homeDirName','filter','396852AYPWuW','skills','workbuddySkillsDir','1371636GceguU','.claude','includes','2731595FPDgoK','6YYlCkO','claudeSkillsDir','cacheRoot','path\x20segment','\x20for\x20local\x20path:\x20','519484uXoImB','skillCode','4480120vxLTke','3359118GiDnWo','.workbuddy','607344MHrOoy','agentsSkillsDir','SKILL_ROOT','.agents'];a159_0x4551=function(){return _0x5c123b;};return a159_0x4551();}import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x4bde97={}){const _0x5ac1bd=a159_0x428f,_0x284469=_0x4bde97[_0x5ac1bd(0x112)]??homedir(),_0x38b4e3=resolve(_0x284469,PRODUCT_CONFIG['homeDirName'],'cache'),_0x307b03=trimmedEnv(_0x5ac1bd(0x10f)),_0x17f374=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x5123e1=resolve(_0x284469,_0x5ac1bd(0x10c)),_0x40ce44=_0x4bde97[_0x5ac1bd(0x117)]??(existsSync(_0x5123e1)?resolve(_0x5123e1,'skills'):undefined);return{'homeDir':_0x284469,'cacheRoot':_0x38b4e3,'managedRoot':resolve(_0x284469,PRODUCT_CONFIG[_0x5ac1bd(0x113)]),'agentsSkillsDir':_0x4bde97[_0x5ac1bd(0x10e)]??_0x307b03??resolve(_0x284469,_0x5ac1bd(0x110),'skills'),'claudeSkillsDir':_0x4bde97[_0x5ac1bd(0x11d)]??_0x17f374??resolve(_0x284469,_0x5ac1bd(0x119),_0x5ac1bd(0x116)),'workbuddySkillsDir':_0x40ce44};}export function runtimeAgentSkillRoots(_0x25f545){const _0xf8fb8c=a159_0x428f;return[_0x25f545[_0xf8fb8c(0x10e)],_0x25f545[_0xf8fb8c(0x11d)],_0x25f545[_0xf8fb8c(0x117)]][_0xf8fb8c(0x114)](_0x35d22f=>Boolean(_0x35d22f));}export function getRuntimeSkillCacheRoot(_0x42bf50,_0xe0836e,_0x27d9c5={}){const _0x2c160c=a159_0x428f,_0x180818=resolveSkillSyncPaths(_0x27d9c5);return resolve(_0x180818[_0x2c160c(0x11e)],_0x42bf50,fingerprintAccessKey(_0xe0836e),_0x2c160c(0x116));}function a159_0x428f(_0x459299,_0x157a31){_0x459299=_0x459299-0x106;const _0x455189=a159_0x4551();let _0x428f44=_0x455189[_0x459299];return _0x428f44;}export function getRuntimeSkillDir(_0x163b39,_0x31b905,_0x172e74,_0x51e230,_0xbedbfb,_0x442436={}){const _0x21d7b4=a159_0x428f;return resolve(getRuntimeSkillCacheRoot(_0x163b39,_0x31b905,_0x442436),safePathSegment(_0x172e74,'appCode'),_0x51e230,safePathSegment(_0xbedbfb,_0x21d7b4(0x109)));}export function safePathSegment(_0x1069ed,_0x456d74=a159_0x23bbb2(0x106)){const _0x2b3c07=a159_0x23bbb2;if(!_0x1069ed||_0x1069ed[_0x2b3c07(0x11a)]('/')||_0x1069ed[_0x2b3c07(0x11a)]('\x5c')||_0x1069ed[_0x2b3c07(0x11a)]('..'))throw CliErrors['validation'](_0x2b3c07(0x111)+_0x456d74+_0x2b3c07(0x107)+_0x1069ed);return _0x1069ed;}function trimmedEnv(_0x2ada8c){const _0x46d5de=productEnv(_0x2ada8c)?.['trim']();return _0x46d5de?_0x46d5de:undefined;}
@@ -1 +1 @@
1
- (function(_0x519097,_0x3128e4){const _0x4618dd=a160_0x5b09,_0x136c30=_0x519097();while(!![]){try{const _0x5aafbd=-parseInt(_0x4618dd(0x1cb))/0x1*(parseInt(_0x4618dd(0x1f0))/0x2)+parseInt(_0x4618dd(0x1e3))/0x3*(parseInt(_0x4618dd(0x1c8))/0x4)+parseInt(_0x4618dd(0x1db))/0x5+-parseInt(_0x4618dd(0x1bd))/0x6+parseInt(_0x4618dd(0x1f9))/0x7+parseInt(_0x4618dd(0x1eb))/0x8+parseInt(_0x4618dd(0x1ed))/0x9;if(_0x5aafbd===_0x3128e4)break;else _0x136c30['push'](_0x136c30['shift']());}catch(_0x20377b){_0x136c30['push'](_0x136c30['shift']());}}}(a160_0x5cda,0x93727));function a160_0x5b09(_0x1fe1d7,_0x704082){_0x1fe1d7=_0x1fe1d7-0x1bd;const _0x5cda91=a160_0x5cda();let _0x5b09db=_0x5cda91[_0x1fe1d7];return _0x5b09db;}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x4bfce9}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a160_0x5cda(){const _0x2eedf3=['string','targetScope','name','1267288oAzLKt','number','3143286xHMBVw','ignoreInvalidMetadata','builtin','46ZDzDZX','sourceSessionId','ignoreMetadataForPayload','personal','skillName','path','example','pushedAt','\x20name\x20for\x20SkillHub\x20slug\x20generation.','2607801zZAWZl','toLowerCase','boolean','5108718PZXBTZ','some','isFile','validation','packageBase64','ignoreMetadataScope','dir','replace','object','ignoreMetadataSkillCode','(unknown)','4SmuBrG','isSymbolicLink','utf8','39646KbnNJk','Remote\x20Skill\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20directory\x20not\x20found:\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','displayName','ignoreMetadataAppCodeMismatch','match','description','isDirectory','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Missing\x20','find','\x20has\x20unsupported\x20scope\x20\x22','scope','trim','3259295NClCHP','tags','slice','length','isArray','skillCode','unknown',',\x20or\x20directory\x20name.','2505561tKwYRy','startsWith','appCode','content','files'];a160_0x5cda=function(){return _0x2eedf3;};return a160_0x5cda();}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(_0x71e2fe,_0x5d9aae,_0x5d4568={}){const _0x5b4630=a160_0x5b09,_0x5263a7=resolvePushDirectoryRoot(_0x71e2fe),_0x3c499f=readPushMetadataIfPresent(resolve(_0x5263a7,METADATA_FILE),{'ignoreInvalidMetadata':_0x5d4568[_0x5b4630(0x1ee)]});if(_0x3c499f?.[_0x5b4630(0x1e5)]&&_0x3c499f[_0x5b4630(0x1e5)]!==_0x5d9aae&&!_0x5d4568['allowAppCodeRetarget']&&!_0x5d4568[_0x5b4630(0x1d1)])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x3c499f['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x5d9aae+'\x22.');const _0x36ef46=resolvePushSkillCode(_0x5263a7,_0x5d9aae,_0x3c499f,_0x5d4568);if(!_0x36ef46)throw CliErrors['validation'](_0x5b4630(0x1d5)+SKILL_FILE+',\x20'+METADATA_FILE+_0x5b4630(0x1e2));return{'dir':_0x5263a7,'skillCode':_0x36ef46,'metadata':_0x3c499f};}export function readPushDirectory(_0x52d0d8,_0x55db40,_0x30b84f={}){const _0x252771=a160_0x5b09,_0x2968a5=resolvePushDirectoryIdentity(_0x52d0d8,_0x55db40,_0x30b84f),_0x488571=_0x2968a5[_0x252771(0x1c3)],_0x1dcc72=resolve(_0x488571,SKILL_FILE);if(!existsSync(_0x1dcc72)||!lstatSync(_0x1dcc72)[_0x252771(0x1bf)]())throw CliErrors[_0x252771(0x1c0)](_0x252771(0x1d6)+SKILL_FILE+':\x20'+_0x1dcc72);const _0xdc79bc=_0x2968a5['metadata'],_0x120df0=_0x30b84f[_0x252771(0x1e9)]??_0x252771(0x1f3);if(!_0x30b84f[_0x252771(0x1c2)]&&_0xdc79bc?.['scope']===_0x252771(0x1ef))throw CliErrors[_0x252771(0x1c0)](_0x252771(0x1cf)+METADATA_FILE+'\x20has\x20scope=\x22'+_0xdc79bc[_0x252771(0x1d9)]+'\x22.');if(!_0x30b84f[_0x252771(0x1c2)]&&_0x120df0===_0x252771(0x1f3)&&_0xdc79bc?.['scope']&&_0xdc79bc[_0x252771(0x1d9)]!==_0x252771(0x1f3))throw CliErrors[_0x252771(0x1c0)](_0x252771(0x1cd)+METADATA_FILE+'\x20has\x20scope=\x22'+_0xdc79bc['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x488571+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x3a8df3=scanSkillDirectory(_0x488571,{'excludedFilePaths':_0x30b84f['excludedFilePaths']}),_0x2e8c49=buildSkillPackage(_0x3a8df3),_0xd49a49=readFileSync(_0x1dcc72,'utf8'),_0x1cc794=_0x2968a5[_0x252771(0x1e0)],_0xd5d2f6=_0x30b84f[_0x252771(0x1f2)]?undefined:_0xdc79bc,_0x509f60=readSkillDisplayName(_0xd49a49);return{'skillCode':_0x1cc794,'metadata':_0xdc79bc,'frontmatterDisplayName':_0x509f60,'input':{'skillCode':_0x1cc794,'skillName':_0x509f60??_0xd5d2f6?.['skillName'],'description':_0xd5d2f6?.[_0x252771(0x1d3)],'content':_0xd49a49,'files':_0x2e8c49['manifest'],'packageBase64':_0x2e8c49[_0x252771(0x1c1)],'tags':_0xd5d2f6?.['tags'],'version':_0xd5d2f6?.['version'],'sourceSessionId':_0xd5d2f6?.[_0x252771(0x1f1)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5a620d,_0x5f4160,_0x2f21b2,_0x183c92={}){const _0x598f06=a160_0x5b09,_0x7a9b61=resolvePushDirectoryRoot(_0x5a620d),_0x296ffa=readPushMetadataIfPresent(resolve(_0x7a9b61,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x119803=requireRemoteScope(_0x5f4160),_0x44f5e1=readLocalSkillContent(_0x7a9b61),_0x98b50a={..._0x5f4160,'appCode':_0x5f4160['appCode']??_0x2f21b2,'skillName':_0x5f4160[_0x598f06(0x1f4)]??_0x296ffa?.[_0x598f06(0x1f4)],'description':_0x5f4160[_0x598f06(0x1d3)]??_0x296ffa?.[_0x598f06(0x1d3)],'example':_0x5f4160['example']??_0x296ffa?.[_0x598f06(0x1f6)],'tags':Array[_0x598f06(0x1df)](_0x5f4160[_0x598f06(0x1dc)])?_0x5f4160[_0x598f06(0x1dc)]:_0x296ffa?.['tags'],'sourceSessionId':_0x5f4160['sourceSessionId']??_0x296ffa?.[_0x598f06(0x1f1)],'content':_0x5f4160[_0x598f06(0x1e6)]??_0x44f5e1},_0x3a39a1=buildMetadata(_0x98b50a,_0x119803,_0x2f21b2,contentHash(_0x44f5e1),_0x183c92['refreshedAt']);writeJsonAtomic(resolve(_0x7a9b61,METADATA_FILE),_0x3a39a1);}export function recordPushedRuntimeSkill(_0x793179,_0x566e44,_0x5d093e,_0x15fd8d={}){const _0x909a62=a160_0x5b09,_0x18020e=resolvePushDirectoryRoot(_0x793179),_0xc6067f=scanSkillDirectory(_0x18020e),_0x3a9ce0=_0xc6067f[_0x909a62(0x1d7)](_0x5f109f=>_0x5f109f[_0x909a62(0x1f5)]===SKILL_FILE),_0xea6a8a=_0x3a9ce0?fileText(_0x3a9ce0):'',_0x2f97d3=tryNormalizePackageManifest(_0x566e44[_0x909a62(0x1e7)]),_0xd8e5e9={..._0x566e44,'content':_0x566e44[_0x909a62(0x1e6)]??_0xea6a8a,'files':_0x2f97d3},_0x52ed02=_0x2f97d3?normalizeLocalFiles(_0xc6067f)['filter'](_0x26d9ae=>_0x2f97d3[_0x909a62(0x1e7)][_0x909a62(0x1be)](_0x431697=>_0x431697['path']===_0x26d9ae['path'])):undefined,_0x3fe55f=buildMetadata(_0xd8e5e9,_0x15fd8d[_0x909a62(0x1d9)]??'personal',_0x5d093e,contentHash(_0xd8e5e9['content']??''),_0x15fd8d[_0x909a62(0x1f7)],_0x52ed02);writeJsonAtomic(resolve(_0x18020e,METADATA_FILE),_0x3fe55f);}export function deriveSkillCodeFromDirectory(_0x461f51,_0xd0a6ef){const _0x4d4f3f=a160_0x5b09,_0x189731=basename(resolve(_0x461f51)),_0x437180=_0xd0a6ef+'--';return _0x189731[_0x4d4f3f(0x1e4)](_0x437180)?_0x189731[_0x4d4f3f(0x1dd)](_0x437180[_0x4d4f3f(0x1de)]):_0x189731;}function resolvePushSkillCode(_0x47c8e6,_0x1d85c2,_0x3127be,_0x2d170d){const _0x50d038=a160_0x5b09,_0xbb28bd=deriveSkillCodeFromSkillFile(_0x47c8e6)||deriveSkillCodeFromDirectory(_0x47c8e6,_0x1d85c2);if(_0x2d170d[_0x50d038(0x1c6)])return _0xbb28bd;return _0x3127be?.['skillCode']?.[_0x50d038(0x1da)]()||_0xbb28bd;}function deriveSkillCodeFromSkillFile(_0x2c3cd4){const _0x2bc3e6=a160_0x5b09,_0x44aea7=resolve(_0x2c3cd4,SKILL_FILE);if(!existsSync(_0x44aea7)||!lstatSync(_0x44aea7)[_0x2bc3e6(0x1bf)]())return undefined;const _0x261c87=readFileSync(_0x44aea7,_0x2bc3e6(0x1ca)),_0x31d26a=_0x261c87[_0x2bc3e6(0x1d2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x31d26a)return undefined;const _0x574f0a=parseFrontmatterObject(_0x31d26a[0x1]??''),_0x477a21=scalarToString(_0x574f0a?.[_0x2bc3e6(0x1ea)]);return _0x477a21?slugifySkillName(_0x477a21):undefined;}function readSkillDisplayName(_0x4ad7cd){const _0x4ea083=a160_0x5b09,_0x10f8d8=_0x4ad7cd[_0x4ea083(0x1d2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x10f8d8)return undefined;const _0x1e20bf=parseFrontmatterObject(_0x10f8d8[0x1]??'');return scalarToString(_0x1e20bf?.[_0x4ea083(0x1d0)]);}function slugifySkillName(_0x343f13){const _0x3f368d=a160_0x5b09,_0x5ee0e3=_0x343f13[_0x3f368d(0x1da)]()[_0x3f368d(0x1fa)]()[_0x3f368d(0x1c4)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3f368d(0x1c4)](/^-+/,'')['replace'](/-+$/,'')[_0x3f368d(0x1c4)](/-{2,}/g,'-');if(!_0x5ee0e3)throw CliErrors[_0x3f368d(0x1c0)]('Invalid\x20'+SKILL_FILE+_0x3f368d(0x1f8));return _0x5ee0e3;}function parseFrontmatterObject(_0x4b507a){const _0x3e0440=a160_0x5b09;try{const _0x33dd27=a160_0x4bfce9(_0x4b507a);return _0x33dd27&&typeof _0x33dd27===_0x3e0440(0x1c5)&&!Array[_0x3e0440(0x1df)](_0x33dd27)?_0x33dd27:undefined;}catch{return undefined;}}function scalarToString(_0x390be1){const _0x5b7039=a160_0x5b09;if(typeof _0x390be1===_0x5b7039(0x1e8))return _0x390be1[_0x5b7039(0x1da)]();if(typeof _0x390be1===_0x5b7039(0x1ec)||typeof _0x390be1===_0x5b7039(0x1fb))return String(_0x390be1);return undefined;}function resolvePushDirectoryRoot(_0x2aec4c){const _0x208ca5=a160_0x5b09,_0x48b9fa=resolve(_0x2aec4c);if(!existsSync(_0x48b9fa))throw CliErrors['validation'](_0x208ca5(0x1ce)+_0x2aec4c);const _0x5eac01=lstatSync(_0x48b9fa);if(_0x5eac01[_0x208ca5(0x1d4)]())return _0x48b9fa;if(_0x5eac01[_0x208ca5(0x1c9)]()){const _0x177dda=realpathSync(_0x48b9fa);if(lstatSync(_0x177dda)[_0x208ca5(0x1d4)]())return _0x177dda;}throw CliErrors[_0x208ca5(0x1c0)]('Skill\x20directory\x20not\x20found:\x20'+_0x2aec4c);}function requireRemoteScope(_0x3ba88c){const _0x13213b=a160_0x5b09;if(_0x3ba88c[_0x13213b(0x1d9)]==='personal'||_0x3ba88c[_0x13213b(0x1d9)]==='company'||_0x3ba88c[_0x13213b(0x1d9)]==='builtin')return _0x3ba88c[_0x13213b(0x1d9)];throw CliErrors[_0x13213b(0x1c0)](_0x13213b(0x1cc)+(_0x3ba88c[_0x13213b(0x1e0)]||_0x13213b(0x1c7))+_0x13213b(0x1d8)+(_0x3ba88c['scope']??_0x13213b(0x1e1))+'\x22.');}function readLocalSkillContent(_0x4f2901){const _0x10db26=a160_0x5b09,_0x7996f6=resolve(_0x4f2901,SKILL_FILE);return existsSync(_0x7996f6)&&lstatSync(_0x7996f6)['isFile']()?readFileSync(_0x7996f6,_0x10db26(0x1ca)):'';}function readPushMetadataIfPresent(_0x2da55e,_0xc6c4ab={}){try{return readMetadataIfPresent(_0x2da55e);}catch(_0x137b09){if(_0xc6c4ab['ignoreInvalidMetadata'])return undefined;throw _0x137b09;}}
1
+ (function(_0x44ff6f,_0x3b2fbf){const _0x40657d=a160_0x3050,_0x366f4e=_0x44ff6f();while(!![]){try{const _0x34ebda=parseInt(_0x40657d(0x19c))/0x1*(-parseInt(_0x40657d(0x1a2))/0x2)+parseInt(_0x40657d(0x1c0))/0x3*(parseInt(_0x40657d(0x1a8))/0x4)+parseInt(_0x40657d(0x199))/0x5+parseInt(_0x40657d(0x1ae))/0x6+parseInt(_0x40657d(0x19b))/0x7*(-parseInt(_0x40657d(0x1a7))/0x8)+parseInt(_0x40657d(0x1b2))/0x9+-parseInt(_0x40657d(0x1b4))/0xa;if(_0x34ebda===_0x3b2fbf)break;else _0x366f4e['push'](_0x366f4e['shift']());}catch(_0x2a8f29){_0x366f4e['push'](_0x366f4e['shift']());}}}(a160_0x3034,0x4ca71));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x38aa99}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(_0x342585,_0x153e47,_0x21225b={}){const _0x8f7979=a160_0x3050,_0x1a33ae=resolvePushDirectoryRoot(_0x342585),_0x5d0990=readPushMetadataIfPresent(resolve(_0x1a33ae,METADATA_FILE),{'ignoreInvalidMetadata':_0x21225b['ignoreInvalidMetadata']});if(_0x5d0990?.[_0x8f7979(0x189)]&&_0x5d0990[_0x8f7979(0x189)]!==_0x153e47&&!_0x21225b['allowAppCodeRetarget']&&!_0x21225b[_0x8f7979(0x194)])throw CliErrors[_0x8f7979(0x18f)](_0x8f7979(0x1a3)+_0x5d0990[_0x8f7979(0x189)]+_0x8f7979(0x1c1)+_0x153e47+'\x22.');const _0x30a091=resolvePushSkillCode(_0x1a33ae,_0x153e47,_0x5d0990,_0x21225b);if(!_0x30a091)throw CliErrors[_0x8f7979(0x18f)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x8f7979(0x1b6));return{'dir':_0x1a33ae,'skillCode':_0x30a091,'metadata':_0x5d0990};}export function readPushDirectory(_0x1aae01,_0x138d91,_0x289972={}){const _0x2e200b=a160_0x3050,_0x4032a8=resolvePushDirectoryIdentity(_0x1aae01,_0x138d91,_0x289972),_0x4724b2=_0x4032a8[_0x2e200b(0x195)],_0x2ffd2a=resolve(_0x4724b2,SKILL_FILE);if(!existsSync(_0x2ffd2a)||!lstatSync(_0x2ffd2a)[_0x2e200b(0x1a9)]())throw CliErrors[_0x2e200b(0x18f)](_0x2e200b(0x18c)+SKILL_FILE+':\x20'+_0x2ffd2a);const _0xf3a548=_0x4032a8['metadata'],_0xbb6214=_0x289972[_0x2e200b(0x186)]??_0x2e200b(0x18b);if(!_0x289972[_0x2e200b(0x191)]&&_0xf3a548?.['scope']===_0x2e200b(0x1b1))throw CliErrors[_0x2e200b(0x18f)](_0x2e200b(0x1ba)+METADATA_FILE+_0x2e200b(0x1a0)+_0xf3a548[_0x2e200b(0x1b5)]+'\x22.');if(!_0x289972[_0x2e200b(0x191)]&&_0xbb6214===_0x2e200b(0x18b)&&_0xf3a548?.[_0x2e200b(0x1b5)]&&_0xf3a548['scope']!==_0x2e200b(0x18b))throw CliErrors[_0x2e200b(0x18f)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x2e200b(0x1a0)+_0xf3a548[_0x2e200b(0x1b5)]+'\x22.',_0x2e200b(0x193)+_0x4724b2+_0x2e200b(0x1bc));const _0x562109=scanSkillDirectory(_0x4724b2,{'excludedFilePaths':_0x289972[_0x2e200b(0x1b3)]}),_0x21e932=buildSkillPackage(_0x562109),_0x3e53b1=readFileSync(_0x2ffd2a,'utf8'),_0x52eac1=_0x4032a8[_0x2e200b(0x190)],_0x3a20d1=_0x289972['ignoreMetadataForPayload']?undefined:_0xf3a548,_0x194f7c=readSkillDisplayName(_0x3e53b1);return{'skillCode':_0x52eac1,'metadata':_0xf3a548,'frontmatterDisplayName':_0x194f7c,'input':{'skillCode':_0x52eac1,'skillName':_0x194f7c??_0x3a20d1?.['skillName'],'description':_0x3a20d1?.[_0x2e200b(0x1bb)],'content':_0x3e53b1,'files':_0x21e932[_0x2e200b(0x198)],'packageBase64':_0x21e932[_0x2e200b(0x18a)],'tags':_0x3a20d1?.[_0x2e200b(0x1c2)],'version':_0x3a20d1?.[_0x2e200b(0x188)],'sourceSessionId':_0x3a20d1?.[_0x2e200b(0x187)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x28bdae,_0x555785,_0x191d84,_0x5dec4b={}){const _0x32c3e4=a160_0x3050,_0x275cc6=resolvePushDirectoryRoot(_0x28bdae),_0x4a4281=readPushMetadataIfPresent(resolve(_0x275cc6,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x18a707=requireRemoteScope(_0x555785),_0x423b6d=readLocalSkillContent(_0x275cc6),_0x45d332={..._0x555785,'appCode':_0x555785['appCode']??_0x191d84,'skillName':_0x555785[_0x32c3e4(0x1a4)]??_0x4a4281?.[_0x32c3e4(0x1a4)],'description':_0x555785[_0x32c3e4(0x1bb)]??_0x4a4281?.[_0x32c3e4(0x1bb)],'example':_0x555785[_0x32c3e4(0x1aa)]??_0x4a4281?.[_0x32c3e4(0x1aa)],'tags':Array['isArray'](_0x555785[_0x32c3e4(0x1c2)])?_0x555785[_0x32c3e4(0x1c2)]:_0x4a4281?.[_0x32c3e4(0x1c2)],'sourceSessionId':_0x555785[_0x32c3e4(0x187)]??_0x4a4281?.[_0x32c3e4(0x187)],'content':_0x555785[_0x32c3e4(0x19d)]??_0x423b6d},_0x4949f8=buildMetadata(_0x45d332,_0x18a707,_0x191d84,contentHash(_0x423b6d),_0x5dec4b['refreshedAt']);writeJsonAtomic(resolve(_0x275cc6,METADATA_FILE),_0x4949f8);}export function recordPushedRuntimeSkill(_0x1832ac,_0x344590,_0x425305,_0x1109a8={}){const _0x2a8413=a160_0x3050,_0x5c131c=resolvePushDirectoryRoot(_0x1832ac),_0x23ab95=scanSkillDirectory(_0x5c131c),_0xa21e97=_0x23ab95[_0x2a8413(0x1b9)](_0x527ad6=>_0x527ad6[_0x2a8413(0x185)]===SKILL_FILE),_0xdb8d65=_0xa21e97?fileText(_0xa21e97):'',_0x3306b0=tryNormalizePackageManifest(_0x344590[_0x2a8413(0x1ad)]),_0x144f3f={..._0x344590,'content':_0x344590[_0x2a8413(0x19d)]??_0xdb8d65,'files':_0x3306b0},_0x329634=_0x3306b0?normalizeLocalFiles(_0x23ab95)['filter'](_0x1a14f3=>_0x3306b0[_0x2a8413(0x1ad)][_0x2a8413(0x1af)](_0x2442d8=>_0x2442d8[_0x2a8413(0x185)]===_0x1a14f3[_0x2a8413(0x185)])):undefined,_0x572c64=buildMetadata(_0x144f3f,_0x1109a8[_0x2a8413(0x1b5)]??'personal',_0x425305,contentHash(_0x144f3f[_0x2a8413(0x19d)]??''),_0x1109a8[_0x2a8413(0x1b7)],_0x329634);writeJsonAtomic(resolve(_0x5c131c,METADATA_FILE),_0x572c64);}export function deriveSkillCodeFromDirectory(_0x5079cc,_0x174035){const _0x19453c=a160_0x3050,_0x374bc3=basename(resolve(_0x5079cc)),_0x58117e=_0x174035+'--';return _0x374bc3['startsWith'](_0x58117e)?_0x374bc3['slice'](_0x58117e[_0x19453c(0x1ab)]):_0x374bc3;}function resolvePushSkillCode(_0x5c5cd8,_0x2656b3,_0x16f5cc,_0x5adde0){const _0xa7904c=a160_0x3050,_0x41f195=deriveSkillCodeFromSkillFile(_0x5c5cd8)||deriveSkillCodeFromDirectory(_0x5c5cd8,_0x2656b3);if(_0x5adde0[_0xa7904c(0x19f)])return _0x41f195;return _0x16f5cc?.[_0xa7904c(0x190)]?.[_0xa7904c(0x18d)]()||_0x41f195;}function deriveSkillCodeFromSkillFile(_0x349128){const _0x350a93=a160_0x3050,_0x4ff056=resolve(_0x349128,SKILL_FILE);if(!existsSync(_0x4ff056)||!lstatSync(_0x4ff056)[_0x350a93(0x1a9)]())return undefined;const _0x3fdcb5=readFileSync(_0x4ff056,'utf8'),_0x339b20=_0x3fdcb5[_0x350a93(0x196)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x339b20)return undefined;const _0x3b6d1e=parseFrontmatterObject(_0x339b20[0x1]??''),_0x2e05e0=scalarToString(_0x3b6d1e?.[_0x350a93(0x1bd)]);return _0x2e05e0?slugifySkillName(_0x2e05e0):undefined;}function readSkillDisplayName(_0x1c67b7){const _0x4ee292=a160_0x3050,_0x38d835=_0x1c67b7[_0x4ee292(0x196)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x38d835)return undefined;const _0x128493=parseFrontmatterObject(_0x38d835[0x1]??'');return scalarToString(_0x128493?.[_0x4ee292(0x197)]);}function slugifySkillName(_0x2051f2){const _0x21e2b6=a160_0x3050,_0x1d7554=_0x2051f2[_0x21e2b6(0x18d)]()[_0x21e2b6(0x1b0)]()[_0x21e2b6(0x1b8)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x21e2b6(0x1b8)](/-+$/,'')[_0x21e2b6(0x1b8)](/-{2,}/g,'-');if(!_0x1d7554)throw CliErrors['validation'](_0x21e2b6(0x1c3)+SKILL_FILE+_0x21e2b6(0x19a));return _0x1d7554;}function parseFrontmatterObject(_0x21289a){const _0x5211a9=a160_0x3050;try{const _0x4e9516=a160_0x38aa99(_0x21289a);return _0x4e9516&&typeof _0x4e9516===_0x5211a9(0x1bf)&&!Array[_0x5211a9(0x18e)](_0x4e9516)?_0x4e9516:undefined;}catch{return undefined;}}function scalarToString(_0x423809){const _0x4e9972=a160_0x3050;if(typeof _0x423809==='string')return _0x423809[_0x4e9972(0x18d)]();if(typeof _0x423809===_0x4e9972(0x192)||typeof _0x423809==='boolean')return String(_0x423809);return undefined;}function a160_0x3034(){const _0x338cdf=['isFile','example','length','company','files','2085528HeWLOJ','some','toLowerCase','builtin','991620eEPMtn','excludedFilePaths','4232370UGUbHs','scope',',\x20or\x20directory\x20name.','pushedAt','replace','find','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','description','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','name','(unknown)','object','141BGAisH','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','tags','Invalid\x20','Remote\x20Skill\x20','path','targetScope','sourceSessionId','version','appCode','packageBase64','personal','Missing\x20','trim','isArray','validation','skillCode','ignoreMetadataScope','number','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','ignoreMetadataAppCodeMismatch','dir','match','displayName','manifest','979980CCWlhN','\x20name\x20for\x20SkillHub\x20slug\x20generation.','7mddhlF','2330HmzxAZ','content','Skill\x20directory\x20not\x20found:\x20','ignoreMetadataSkillCode','\x20has\x20scope=\x22','isDirectory','32nqEFUj','Skill\x20metadata\x20appCode\x20\x22','skillName','ignoreInvalidMetadata','utf8','3485688fVaaIJ','47356pfEVxZ'];a160_0x3034=function(){return _0x338cdf;};return a160_0x3034();}function a160_0x3050(_0x514a6c,_0x4f234e){_0x514a6c=_0x514a6c-0x185;const _0x30348e=a160_0x3034();let _0x3050ae=_0x30348e[_0x514a6c];return _0x3050ae;}function resolvePushDirectoryRoot(_0x471463){const _0x2db54e=a160_0x3050,_0x55bc27=resolve(_0x471463);if(!existsSync(_0x55bc27))throw CliErrors[_0x2db54e(0x18f)](_0x2db54e(0x19e)+_0x471463);const _0x3708cb=lstatSync(_0x55bc27);if(_0x3708cb[_0x2db54e(0x1a1)]())return _0x55bc27;if(_0x3708cb['isSymbolicLink']()){const _0x1558fa=realpathSync(_0x55bc27);if(lstatSync(_0x1558fa)['isDirectory']())return _0x1558fa;}throw CliErrors[_0x2db54e(0x18f)]('Skill\x20directory\x20not\x20found:\x20'+_0x471463);}function requireRemoteScope(_0x242333){const _0x21daa2=a160_0x3050;if(_0x242333[_0x21daa2(0x1b5)]===_0x21daa2(0x18b)||_0x242333[_0x21daa2(0x1b5)]===_0x21daa2(0x1ac)||_0x242333[_0x21daa2(0x1b5)]==='builtin')return _0x242333[_0x21daa2(0x1b5)];throw CliErrors[_0x21daa2(0x18f)](_0x21daa2(0x1c4)+(_0x242333['skillCode']||_0x21daa2(0x1be))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x242333[_0x21daa2(0x1b5)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x28e7b9){const _0x31cc1b=a160_0x3050,_0x444849=resolve(_0x28e7b9,SKILL_FILE);return existsSync(_0x444849)&&lstatSync(_0x444849)[_0x31cc1b(0x1a9)]()?readFileSync(_0x444849,_0x31cc1b(0x1a6)):'';}function readPushMetadataIfPresent(_0x1095ef,_0x216b37={}){const _0x5f2a14=a160_0x3050;try{return readMetadataIfPresent(_0x1095ef);}catch(_0x45699d){if(_0x216b37[_0x5f2a14(0x1a5)])return undefined;throw _0x45699d;}}
@@ -1 +1 @@
1
- function a161_0x3d27(){const _0x13c160=['552008PBCQgY','validation','3wPBIEm','27CZxVrX','personal','Unsupported\x20runtime\x20Skill\x20scope:\x20','2382335YcgJjK','includes','1duQeeM','306355oJIREw','3577892KbHFIG','4165554XxSuaX','12898336ICFUBN','push','477290TyyHXd','company','length'];a161_0x3d27=function(){return _0x13c160;};return a161_0x3d27();}(function(_0x3ed027,_0x59ead8){const _0x3a3b3a=a161_0x38f1,_0x1efc31=_0x3ed027();while(!![]){try{const _0x34f945=-parseInt(_0x3a3b3a(0x158))/0x1*(-parseInt(_0x3a3b3a(0x150))/0x2)+-parseInt(_0x3a3b3a(0x152))/0x3*(-parseInt(_0x3a3b3a(0x15a))/0x4)+parseInt(_0x3a3b3a(0x156))/0x5+parseInt(_0x3a3b3a(0x14a))/0x6+-parseInt(_0x3a3b3a(0x159))/0x7+-parseInt(_0x3a3b3a(0x14b))/0x8+parseInt(_0x3a3b3a(0x153))/0x9*(parseInt(_0x3a3b3a(0x14d))/0xa);if(_0x34f945===_0x59ead8)break;else _0x1efc31['push'](_0x1efc31['shift']());}catch(_0x253788){_0x1efc31['push'](_0x1efc31['shift']());}}}(a161_0x3d27,0xca3ad));import{CliErrors}from'../../errors.js';function a161_0x38f1(_0x431307,_0x296084){_0x431307=_0x431307-0x14a;const _0x3d2739=a161_0x3d27();let _0x38f1a9=_0x3d2739[_0x431307];return _0x38f1a9;}export function normalizeRuntimeSkillScopes(_0x4dff04){const _0x4bef6d=a161_0x38f1,_0x206a3c=_0x4dff04&&_0x4dff04[_0x4bef6d(0x14f)]>0x0?_0x4dff04:[_0x4bef6d(0x154),_0x4bef6d(0x14e),'builtin'],_0x1a5a39=[];for(const _0x3765eb of _0x206a3c){if(!isRuntimeSkillScope(_0x3765eb))throw CliErrors[_0x4bef6d(0x151)](_0x4bef6d(0x155)+_0x3765eb);!_0x1a5a39[_0x4bef6d(0x157)](_0x3765eb)&&_0x1a5a39[_0x4bef6d(0x14c)](_0x3765eb);}return _0x1a5a39;}export function isRuntimeSkillScope(_0x4dae91){const _0x33b9b2=a161_0x38f1;return _0x4dae91==='personal'||_0x4dae91===_0x33b9b2(0x14e)||_0x4dae91==='builtin';}
1
+ (function(_0x1ca1cd,_0x226d19){const _0xb81c27=a161_0xe1f2,_0x34ee56=_0x1ca1cd();while(!![]){try{const _0x29091a=parseInt(_0xb81c27(0xdb))/0x1*(-parseInt(_0xb81c27(0xdf))/0x2)+parseInt(_0xb81c27(0xda))/0x3+parseInt(_0xb81c27(0xd6))/0x4+parseInt(_0xb81c27(0xe4))/0x5*(-parseInt(_0xb81c27(0xe0))/0x6)+parseInt(_0xb81c27(0xde))/0x7+-parseInt(_0xb81c27(0xdc))/0x8+-parseInt(_0xb81c27(0xd7))/0x9;if(_0x29091a===_0x226d19)break;else _0x34ee56['push'](_0x34ee56['shift']());}catch(_0x2d4fea){_0x34ee56['push'](_0x34ee56['shift']());}}}(a161_0x1f62,0x72d0b));function a161_0xe1f2(_0x2d517f,_0x53193d){_0x2d517f=_0x2d517f-0xd6;const _0x1f6260=a161_0x1f62();let _0xe1f27f=_0x1f6260[_0x2d517f];return _0xe1f27f;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x1a478c){const _0x291c65=a161_0xe1f2,_0x523fae=_0x1a478c&&_0x1a478c[_0x291c65(0xe5)]>0x0?_0x1a478c:[_0x291c65(0xe6),_0x291c65(0xe1),_0x291c65(0xd8)],_0x520560=[];for(const _0x233900 of _0x523fae){if(!isRuntimeSkillScope(_0x233900))throw CliErrors[_0x291c65(0xdd)](_0x291c65(0xe2)+_0x233900);!_0x520560[_0x291c65(0xd9)](_0x233900)&&_0x520560[_0x291c65(0xe3)](_0x233900);}return _0x520560;}function a161_0x1f62(){const _0x3fe68e=['builtin','includes','2316597XnFEZD','5395SIHcUt','1643592cZaNWZ','validation','3635520GlsTkM','290JYeTCJ','12VhXrtT','company','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','1618720tuNsXi','length','personal','3478212ZTXnWH','500553Eljmgt'];a161_0x1f62=function(){return _0x3fe68e;};return a161_0x1f62();}export function isRuntimeSkillScope(_0x12d0f8){const _0x46c093=a161_0xe1f2;return _0x12d0f8===_0x46c093(0xe6)||_0x12d0f8===_0x46c093(0xe1)||_0x12d0f8===_0x46c093(0xd8);}
@@ -1 +1 @@
1
- const a163_0x5415cb=a163_0x324c;(function(_0x159b96,_0xf2945f){const _0x4d7c1d=a163_0x324c,_0x5babd8=_0x159b96();while(!![]){try{const _0x4084c2=-parseInt(_0x4d7c1d(0x10e))/0x1+-parseInt(_0x4d7c1d(0x104))/0x2*(-parseInt(_0x4d7c1d(0x10b))/0x3)+-parseInt(_0x4d7c1d(0xf8))/0x4+parseInt(_0x4d7c1d(0x102))/0x5*(-parseInt(_0x4d7c1d(0xf9))/0x6)+-parseInt(_0x4d7c1d(0x105))/0x7+-parseInt(_0x4d7c1d(0x101))/0x8*(parseInt(_0x4d7c1d(0x107))/0x9)+parseInt(_0x4d7c1d(0xfa))/0xa*(parseInt(_0x4d7c1d(0x106))/0xb);if(_0x4084c2===_0xf2945f)break;else _0x5babd8['push'](_0x5babd8['shift']());}catch(_0x55a033){_0x5babd8['push'](_0x5babd8['shift']());}}}(a163_0x4d6a,0x283c7));import{unzipSync,zipSync}from'fflate';function a163_0x4d6a(){const _0x3d3553=['object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1240528gpQQPY','6780xIamDr','validation','262osQurD','631204SKoiKC','1760KYcZgD','9NglYDs','sort','validation_error','1980-01-01T00:00:00.000Z','6681ALqZFT','name','path','304254RjrZOd','entries','1019624McBhMT','162PvjGZV','44630PCPewt','length','from'];a163_0x4d6a=function(){return _0x3d3553;};return a163_0x4d6a();}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a163_0x5415cb(0x10a));export function createDeterministicZipPackage(_0x23dba4){const _0x44e5cc=a163_0x5415cb,_0x27d32e={};for(const _0x20755b of normalizeLocalFiles(_0x23dba4)){_0x27d32e[_0x20755b[_0x44e5cc(0x10d)]]=fileContent(_0x20755b);}return Buffer['from'](zipSync(_0x27d32e,{'level':0x0,'mtime':ZIP_MTIME}));}function a163_0x324c(_0x15aff5,_0x17ac32){_0x15aff5=_0x15aff5-0xf7;const _0x4d6a24=a163_0x4d6a();let _0x324c94=_0x4d6a24[_0x15aff5];return _0x324c94;}export function parseZipPackage(_0x471c2b){const _0x56119a=a163_0x5415cb;if(_0x471c2b[_0x56119a(0xfb)]<0x16)throw CliErrors[_0x56119a(0x103)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x999578;try{_0x999578=unzipSync(_0x471c2b,{'filter'(_0x582ad3){const _0x5c4716=_0x56119a,_0x3b469b=normalizeSkillRelativePath(_0x582ad3[_0x5c4716(0x10c)]);if(_0x3b469b[_0x5c4716(0xff)]('/'))throw CliErrors[_0x5c4716(0x103)](_0x5c4716(0xfe)+_0x3b469b);return!![];}});}catch(_0x2c532b){if(isRuntimeSkillValidationError(_0x2c532b))throw _0x2c532b;throw CliErrors[_0x56119a(0x103)](_0x56119a(0x100));}return Object[_0x56119a(0xf7)](_0x999578)['map'](([_0x59f77d,_0x32e00a])=>({'path':normalizeSkillRelativePath(_0x59f77d),'bytes':Buffer[_0x56119a(0xfc)](_0x32e00a)}))[_0x56119a(0x108)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x3c57c4){const _0x563073=a163_0x5415cb;return typeof _0x3c57c4===_0x563073(0xfd)&&_0x3c57c4!==null&&'code'in _0x3c57c4&&_0x3c57c4['code']===_0x563073(0x109);}
1
+ const a163_0x340efa=a163_0x5009;(function(_0x4ce2f0,_0x5b7696){const _0x57503b=a163_0x5009,_0x41ead0=_0x4ce2f0();while(!![]){try{const _0x205ad3=-parseInt(_0x57503b(0x15c))/0x1+-parseInt(_0x57503b(0x152))/0x2+parseInt(_0x57503b(0x160))/0x3+parseInt(_0x57503b(0x162))/0x4*(parseInt(_0x57503b(0x14e))/0x5)+-parseInt(_0x57503b(0x161))/0x6*(parseInt(_0x57503b(0x155))/0x7)+-parseInt(_0x57503b(0x154))/0x8+parseInt(_0x57503b(0x15e))/0x9*(parseInt(_0x57503b(0x164))/0xa);if(_0x205ad3===_0x5b7696)break;else _0x41ead0['push'](_0x41ead0['shift']());}catch(_0x1c3272){_0x41ead0['push'](_0x41ead0['shift']());}}}(a163_0x241e,0xe92ea));import{unzipSync,zipSync}from'fflate';function a163_0x5009(_0x3898e4,_0x42cb32){_0x3898e4=_0x3898e4-0x14e;const _0x241e4b=a163_0x241e();let _0x500982=_0x241e4b[_0x3898e4];return _0x500982;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a163_0x241e(){const _0x2ab62c=['object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','validation_error','code','validation','1494643OsXXIa','entries','36jwyFcV','map','36141YZJULc','12bpilMX','164HXdWvr','sort','10339870UMrNxs','84305XTIdbf','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','1504902zJVVhd','name','6353360meJMrf','2950213OSBxiq','1980-01-01T00:00:00.000Z'];a163_0x241e=function(){return _0x2ab62c;};return a163_0x241e();}const ZIP_MTIME=new Date(a163_0x340efa(0x156));export function createDeterministicZipPackage(_0x3d56d0){const _0x1715e6={};for(const _0x55f2ea of normalizeLocalFiles(_0x3d56d0)){_0x1715e6[_0x55f2ea['path']]=fileContent(_0x55f2ea);}return Buffer['from'](zipSync(_0x1715e6,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x16c56f){const _0x42f6b2=a163_0x340efa;if(_0x16c56f[_0x42f6b2(0x151)]<0x16)throw CliErrors[_0x42f6b2(0x15b)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x487a1b;try{_0x487a1b=unzipSync(_0x16c56f,{'filter'(_0x3e9dd3){const _0x1d8b54=_0x42f6b2,_0x34904f=normalizeSkillRelativePath(_0x3e9dd3[_0x1d8b54(0x153)]);if(_0x34904f[_0x1d8b54(0x14f)]('/'))throw CliErrors[_0x1d8b54(0x15b)](_0x1d8b54(0x158)+_0x34904f);return!![];}});}catch(_0x32a931){if(isRuntimeSkillValidationError(_0x32a931))throw _0x32a931;throw CliErrors['validation'](_0x42f6b2(0x150));}return Object[_0x42f6b2(0x15d)](_0x487a1b)[_0x42f6b2(0x15f)](([_0x4fdd48,_0x269938])=>({'path':normalizeSkillRelativePath(_0x4fdd48),'bytes':Buffer['from'](_0x269938)}))[_0x42f6b2(0x163)](compareSkillFiles);}function isRuntimeSkillValidationError(_0xcaf36b){const _0x511f57=a163_0x340efa;return typeof _0xcaf36b===_0x511f57(0x157)&&_0xcaf36b!==null&&_0x511f57(0x15a)in _0xcaf36b&&_0xcaf36b['code']===_0x511f57(0x159);}
@@ -1 +1 @@
1
- (function(_0x428fec,_0x371fc0){const _0x4cccea=a164_0x643a,_0xb670a4=_0x428fec();while(!![]){try{const _0x3f5555=parseInt(_0x4cccea(0xd4))/0x1*(parseInt(_0x4cccea(0xbb))/0x2)+-parseInt(_0x4cccea(0xcb))/0x3+parseInt(_0x4cccea(0xe9))/0x4*(-parseInt(_0x4cccea(0xe0))/0x5)+parseInt(_0x4cccea(0xec))/0x6*(-parseInt(_0x4cccea(0xe2))/0x7)+-parseInt(_0x4cccea(0xca))/0x8*(-parseInt(_0x4cccea(0xd8))/0x9)+parseInt(_0x4cccea(0xd5))/0xa*(-parseInt(_0x4cccea(0xdd))/0xb)+parseInt(_0x4cccea(0xe7))/0xc;if(_0x3f5555===_0x371fc0)break;else _0xb670a4['push'](_0xb670a4['shift']());}catch(_0xac42e0){_0xb670a4['push'](_0xb670a4['shift']());}}}(a164_0x36cc,0xb8005));import{CliErrors}from'../../errors.js';function a164_0x36cc(){const _0x4cd80f=['\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20size\x20mismatch.','path','has','422536DGgawc','546426evMRJE','size','toLowerCase','sha256','zipSha256','files','Missing\x20','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','get','50961afEMzU','20lhcYxQ','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','requireOssPath','18evwyki','some','treeSha256','toString','object','4860196bTsRMF','validation','ossPath','65AECLDM','length','1874320CxOcBa','push','base64','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','schemaVersion','28007508moxhux','isSafeInteger','41708ejSccO','string','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','12IzYstf','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','2DiuPhU','map','trim','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','zipSize','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isArray','Runtime\x20Skill\x20package\x20is\x20missing\x20','bytes','set'];a164_0x36cc=function(){return _0x4cd80f;};return a164_0x36cc();}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(_0xed422b){const _0x5e0872=a164_0x643a,_0x2abb97=normalizeLocalFiles(_0xed422b);if(!_0x2abb97[_0x5e0872(0xd9)](_0xb73e8d=>_0xb73e8d[_0x5e0872(0xc8)]===SKILL_FILE))throw CliErrors[_0x5e0872(0xde)](_0x5e0872(0xd1)+SKILL_FILE+_0x5e0872(0xc5));const _0x45ad94=localFilesToManifestFiles(_0x2abb97),_0x52903e=createDeterministicZipPackage(_0x2abb97);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x45ad94),'zipSha256':bufferSha256(_0x52903e),'zipSize':_0x52903e['length'],'files':_0x45ad94},'packageBytes':_0x52903e,'packageBase64':_0x52903e[_0x5e0872(0xdb)](_0x5e0872(0xe4))};}export function verifyRuntimeSkillPackage(_0x30b26d,_0x17eac0){const _0x3905a6=a164_0x643a,_0x5c1a48=normalizePackageManifest(_0x30b26d,{'requireOssPath':![]});if(!_0x5c1a48)throw CliErrors[_0x3905a6(0xde)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x5c1a48,_0x17eac0);}function a164_0x643a(_0x4de038,_0x955b20){_0x4de038=_0x4de038-0xbb;const _0x36cc85=a164_0x36cc();let _0x643a28=_0x36cc85[_0x4de038];return _0x643a28;}export function verifyRuntimeSkillBundle(_0x2f59bb,_0x3627ed){const _0x537bab=a164_0x643a,_0x1a2186=normalizePackageManifest(_0x2f59bb,{'requireOssPath':![]});if(!_0x1a2186)throw CliErrors['validation'](_0x537bab(0xbe));return extractAndVerifyPackageFiles(_0x1a2186,_0x3627ed);}export function tryNormalizePackageManifest(_0x53eba6){return normalizePackageManifest(_0x53eba6,{'requireOssPath':![]});}export function requirePackageBytes(_0x29ad6b,_0x155e06){const _0x157dea=a164_0x643a;if(!_0x155e06||_0x155e06[_0x157dea(0xe1)]===0x0)throw CliErrors[_0x157dea(0xde)](_0x157dea(0xc0)+_0x29ad6b);return _0x155e06;}export function extractDownloadedPackage(_0x192022){const _0x230551=a164_0x643a,_0x4019ad=parseZipPackage(_0x192022)[_0x230551(0xbc)](_0x3b3c6f=>({'path':_0x3b3c6f[_0x230551(0xc8)],'bytes':_0x3b3c6f[_0x230551(0xc3)]}));if(!_0x4019ad['some'](_0x2cc40e=>_0x2cc40e[_0x230551(0xc8)]===SKILL_FILE))throw CliErrors[_0x230551(0xde)](_0x230551(0xc2)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4019ad);}export function localFilesToManifestFiles(_0x2f4a23){const _0x58c000=a164_0x643a;return normalizeLocalFiles(_0x2f4a23)[_0x58c000(0xbc)](_0x430173=>({'path':_0x430173['path'],'sha256':fileHash(_0x430173),'size':fileContent(_0x430173)[_0x58c000(0xe1)]}));}function normalizePackageManifest(_0x38ec01,_0x36631c){const _0x521e5f=a164_0x643a;if(!_0x38ec01||typeof _0x38ec01!==_0x521e5f(0xdc)||Array['isArray'](_0x38ec01))return undefined;const _0x569372=_0x38ec01,_0x3125a1=typeof _0x569372[_0x521e5f(0xdf)]===_0x521e5f(0xea)?_0x569372[_0x521e5f(0xdf)][_0x521e5f(0xbd)]():undefined;if(_0x36631c[_0x521e5f(0xd7)]&&!_0x3125a1)return undefined;if(!Array[_0x521e5f(0xc1)](_0x569372[_0x521e5f(0xd0)])||_0x569372['files'][_0x521e5f(0xe1)]===0x0)return undefined;if(!isSha256Hex(_0x569372[_0x521e5f(0xda)]))throw CliErrors[_0x521e5f(0xde)](_0x521e5f(0xc6));if(!isSha256Hex(_0x569372['zipSha256']))throw CliErrors[_0x521e5f(0xde)](_0x521e5f(0xe5));if(!Number[_0x521e5f(0xe8)](_0x569372[_0x521e5f(0xbf)])||_0x569372[_0x521e5f(0xbf)]<0x0)throw CliErrors[_0x521e5f(0xde)](_0x521e5f(0xed));const _0x3752f0=normalizeManifestFiles(_0x569372[_0x521e5f(0xd0)]);if(!_0x3752f0[_0x521e5f(0xd9)](_0x396903=>_0x396903['path']===SKILL_FILE))throw CliErrors[_0x521e5f(0xde)](_0x521e5f(0xd2)+SKILL_FILE+'.');const _0x21543d=fileTreeHash(_0x3752f0);if(_0x21543d!==_0x569372['treeSha256'][_0x521e5f(0xcd)]())throw CliErrors[_0x521e5f(0xde)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x521e5f(0xe8)](_0x569372[_0x521e5f(0xe6)])?_0x569372[_0x521e5f(0xe6)]:0x2,'ossPath':_0x3125a1,'treeSha256':_0x21543d,'zipSha256':_0x569372['zipSha256']['toLowerCase'](),'zipSize':_0x569372[_0x521e5f(0xbf)],'files':_0x3752f0};}function extractAndVerifyPackage(_0x386682,_0xaf86ab){const _0x5337d1=a164_0x643a,_0x4c70c9=normalizePackageManifest(_0x386682,{'requireOssPath':![]});if(!_0x4c70c9)throw CliErrors[_0x5337d1(0xde)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0xaf86ab[_0x5337d1(0xe1)]!==_0x4c70c9[_0x5337d1(0xbf)])throw CliErrors[_0x5337d1(0xde)](_0x5337d1(0xc7));const _0x5b17d8=bufferSha256(_0xaf86ab);if(_0x5b17d8!==_0x4c70c9[_0x5337d1(0xcf)])throw CliErrors[_0x5337d1(0xde)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x4c70c9,_0xaf86ab);}function extractAndVerifyPackageFiles(_0x503066,_0x4de958){const _0x546a24=a164_0x643a,_0x256160=parseZipPackage(_0x4de958);if(_0x256160['length']!==_0x503066[_0x546a24(0xd0)][_0x546a24(0xe1)])throw CliErrors['validation'](_0x546a24(0xd6));const _0x40dccb=new Map();for(const _0x5d39e1 of _0x256160){if(_0x40dccb[_0x546a24(0xc9)](_0x5d39e1[_0x546a24(0xc8)]))throw CliErrors[_0x546a24(0xde)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x5d39e1[_0x546a24(0xc8)]);_0x40dccb[_0x546a24(0xc4)](_0x5d39e1[_0x546a24(0xc8)],_0x5d39e1);}const _0x370f5c=[];for(const _0x344bc7 of _0x503066[_0x546a24(0xd0)]){const _0x303e90=_0x40dccb[_0x546a24(0xd3)](_0x344bc7['path']);if(!_0x303e90)throw CliErrors[_0x546a24(0xde)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x344bc7['path']);if(_0x303e90[_0x546a24(0xc3)][_0x546a24(0xe1)]!==_0x344bc7[_0x546a24(0xcc)])throw CliErrors[_0x546a24(0xde)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x344bc7['path']);const _0x8853eb=bufferSha256(_0x303e90['bytes']);if(_0x8853eb!==_0x344bc7[_0x546a24(0xce)])throw CliErrors[_0x546a24(0xde)](_0x546a24(0xeb)+_0x344bc7[_0x546a24(0xc8)]);_0x370f5c[_0x546a24(0xe3)]({'path':_0x344bc7['path'],'bytes':_0x303e90[_0x546a24(0xc3)]});}return normalizeLocalFiles(_0x370f5c);}
1
+ (function(_0x1087c,_0x5080b8){const _0x4093ea=a164_0x58dc,_0x19e3f8=_0x1087c();while(!![]){try{const _0x3e3f44=parseInt(_0x4093ea(0x12b))/0x1+parseInt(_0x4093ea(0x115))/0x2+parseInt(_0x4093ea(0x12a))/0x3*(-parseInt(_0x4093ea(0x104))/0x4)+parseInt(_0x4093ea(0x12f))/0x5*(parseInt(_0x4093ea(0x11d))/0x6)+-parseInt(_0x4093ea(0x113))/0x7*(parseInt(_0x4093ea(0x11e))/0x8)+parseInt(_0x4093ea(0x109))/0x9*(parseInt(_0x4093ea(0x107))/0xa)+-parseInt(_0x4093ea(0x12d))/0xb*(-parseInt(_0x4093ea(0x111))/0xc);if(_0x3e3f44===_0x5080b8)break;else _0x19e3f8['push'](_0x19e3f8['shift']());}catch(_0x5a04c6){_0x19e3f8['push'](_0x19e3f8['shift']());}}}(a164_0xdcd9,0x96edd));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(_0x12160b){const _0x2854d8=a164_0x58dc,_0x10d65c=normalizeLocalFiles(_0x12160b);if(!_0x10d65c[_0x2854d8(0x127)](_0x31d915=>_0x31d915[_0x2854d8(0x12c)]===SKILL_FILE))throw CliErrors[_0x2854d8(0x10d)](_0x2854d8(0x126)+SKILL_FILE+_0x2854d8(0x122));const _0x3faf50=localFilesToManifestFiles(_0x10d65c),_0x50687b=createDeterministicZipPackage(_0x10d65c);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x3faf50),'zipSha256':bufferSha256(_0x50687b),'zipSize':_0x50687b[_0x2854d8(0x116)],'files':_0x3faf50},'packageBytes':_0x50687b,'packageBase64':_0x50687b['toString']('base64')};}export function verifyRuntimeSkillPackage(_0x32bf4a,_0x2dce42){const _0x373c23=normalizePackageManifest(_0x32bf4a,{'requireOssPath':![]});if(!_0x373c23)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x373c23,_0x2dce42);}function a164_0xdcd9(){const _0x3d6807=['object','has','Duplicate\x20Skill\x20package\x20entry:\x20','11922KHBLpc','8klqQZs','files','bytes','isArray','\x20in\x20Skill\x20file\x20package.','size','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Missing\x20','some','Runtime\x20Skill\x20package\x20is\x20missing\x20','isSafeInteger','6oKCpuA','1067527IjaTut','path','11NePndm','zipSize','1230DppCrr','ossPath','1898596UufpiX','zipSha256','requireOssPath','10sLGvFe','get','886122eONeAC','set','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','push','validation','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','toLowerCase','5519964debsis','map','7219891FTEdEw','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','968264flMlUl','length','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','sha256'];a164_0xdcd9=function(){return _0x3d6807;};return a164_0xdcd9();}export function verifyRuntimeSkillBundle(_0x5f50d6,_0x2e3cc3){const _0x337f3c=normalizePackageManifest(_0x5f50d6,{'requireOssPath':![]});if(!_0x337f3c)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x337f3c,_0x2e3cc3);}export function tryNormalizePackageManifest(_0x4dc872){return normalizePackageManifest(_0x4dc872,{'requireOssPath':![]});}export function requirePackageBytes(_0x2fec20,_0x3af09e){const _0x43fc38=a164_0x58dc;if(!_0x3af09e||_0x3af09e[_0x43fc38(0x116)]===0x0)throw CliErrors[_0x43fc38(0x10d)](_0x43fc38(0x10e)+_0x2fec20);return _0x3af09e;}export function extractDownloadedPackage(_0x5a196d){const _0x3148f9=a164_0x58dc,_0x1c774c=parseZipPackage(_0x5a196d)[_0x3148f9(0x112)](_0x46448b=>({'path':_0x46448b[_0x3148f9(0x12c)],'bytes':_0x46448b[_0x3148f9(0x120)]}));if(!_0x1c774c['some'](_0x771ceb=>_0x771ceb[_0x3148f9(0x12c)]===SKILL_FILE))throw CliErrors[_0x3148f9(0x10d)](_0x3148f9(0x128)+SKILL_FILE+'.');return normalizeLocalFiles(_0x1c774c);}export function localFilesToManifestFiles(_0x4aba09){const _0x5bf624=a164_0x58dc;return normalizeLocalFiles(_0x4aba09)[_0x5bf624(0x112)](_0x253745=>({'path':_0x253745[_0x5bf624(0x12c)],'sha256':fileHash(_0x253745),'size':fileContent(_0x253745)[_0x5bf624(0x116)]}));}function normalizePackageManifest(_0x2cb406,_0x5f537b){const _0x23f053=a164_0x58dc;if(!_0x2cb406||typeof _0x2cb406!==_0x23f053(0x11a)||Array[_0x23f053(0x121)](_0x2cb406))return undefined;const _0x3450dc=_0x2cb406,_0x22cf3f=typeof _0x3450dc['ossPath']==='string'?_0x3450dc[_0x23f053(0x103)]['trim']():undefined;if(_0x5f537b[_0x23f053(0x106)]&&!_0x22cf3f)return undefined;if(!Array[_0x23f053(0x121)](_0x3450dc[_0x23f053(0x11f)])||_0x3450dc[_0x23f053(0x11f)][_0x23f053(0x116)]===0x0)return undefined;if(!isSha256Hex(_0x3450dc['treeSha256']))throw CliErrors[_0x23f053(0x10d)](_0x23f053(0x117));if(!isSha256Hex(_0x3450dc['zipSha256']))throw CliErrors[_0x23f053(0x10d)](_0x23f053(0x10b));if(!Number['isSafeInteger'](_0x3450dc[_0x23f053(0x12e)])||_0x3450dc['zipSize']<0x0)throw CliErrors['validation'](_0x23f053(0x125));const _0x5e1125=normalizeManifestFiles(_0x3450dc[_0x23f053(0x11f)]);if(!_0x5e1125[_0x23f053(0x127)](_0x4184b1=>_0x4184b1[_0x23f053(0x12c)]===SKILL_FILE))throw CliErrors[_0x23f053(0x10d)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x2cdabd=fileTreeHash(_0x5e1125);if(_0x2cdabd!==_0x3450dc['treeSha256'][_0x23f053(0x110)]())throw CliErrors[_0x23f053(0x10d)](_0x23f053(0x118));return{'schemaVersion':Number[_0x23f053(0x129)](_0x3450dc['schemaVersion'])?_0x3450dc['schemaVersion']:0x2,'ossPath':_0x22cf3f,'treeSha256':_0x2cdabd,'zipSha256':_0x3450dc['zipSha256']['toLowerCase'](),'zipSize':_0x3450dc[_0x23f053(0x12e)],'files':_0x5e1125};}function a164_0x58dc(_0x201eab,_0x1a1d2f){_0x201eab=_0x201eab-0x103;const _0xdcd91b=a164_0xdcd9();let _0x58dcde=_0xdcd91b[_0x201eab];return _0x58dcde;}function extractAndVerifyPackage(_0x3edef0,_0x564369){const _0x12b816=a164_0x58dc,_0x592c4a=normalizePackageManifest(_0x3edef0,{'requireOssPath':![]});if(!_0x592c4a)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x564369[_0x12b816(0x116)]!==_0x592c4a[_0x12b816(0x12e)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x5c41a3=bufferSha256(_0x564369);if(_0x5c41a3!==_0x592c4a[_0x12b816(0x105)])throw CliErrors[_0x12b816(0x10d)](_0x12b816(0x114));return extractAndVerifyPackageFiles(_0x592c4a,_0x564369);}function extractAndVerifyPackageFiles(_0x92eef5,_0x22925a){const _0x41392c=a164_0x58dc,_0x34b338=parseZipPackage(_0x22925a);if(_0x34b338[_0x41392c(0x116)]!==_0x92eef5[_0x41392c(0x11f)][_0x41392c(0x116)])throw CliErrors[_0x41392c(0x10d)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x4fcace=new Map();for(const _0xa709b7 of _0x34b338){if(_0x4fcace[_0x41392c(0x11b)](_0xa709b7['path']))throw CliErrors[_0x41392c(0x10d)](_0x41392c(0x11c)+_0xa709b7['path']);_0x4fcace[_0x41392c(0x10a)](_0xa709b7[_0x41392c(0x12c)],_0xa709b7);}const _0x425b32=[];for(const _0x295ef3 of _0x92eef5[_0x41392c(0x11f)]){const _0x5d00b2=_0x4fcace[_0x41392c(0x108)](_0x295ef3[_0x41392c(0x12c)]);if(!_0x5d00b2)throw CliErrors[_0x41392c(0x10d)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x295ef3[_0x41392c(0x12c)]);if(_0x5d00b2[_0x41392c(0x120)]['length']!==_0x295ef3[_0x41392c(0x123)])throw CliErrors['validation'](_0x41392c(0x124)+_0x295ef3[_0x41392c(0x12c)]);const _0x2fa388=bufferSha256(_0x5d00b2[_0x41392c(0x120)]);if(_0x2fa388!==_0x295ef3[_0x41392c(0x119)])throw CliErrors[_0x41392c(0x10d)](_0x41392c(0x10f)+_0x295ef3[_0x41392c(0x12c)]);_0x425b32[_0x41392c(0x10c)]({'path':_0x295ef3[_0x41392c(0x12c)],'bytes':_0x5d00b2['bytes']});}return normalizeLocalFiles(_0x425b32);}
@@ -1 +1 @@
1
- (function(_0x28b267,_0x173b07){var _0x67f9c9=a165_0x876f,_0x3240f0=_0x28b267();while(!![]){try{var _0x97bda3=parseInt(_0x67f9c9(0xbe))/0x1*(-parseInt(_0x67f9c9(0xbc))/0x2)+parseInt(_0x67f9c9(0xc7))/0x3*(-parseInt(_0x67f9c9(0xc2))/0x4)+-parseInt(_0x67f9c9(0xc0))/0x5*(parseInt(_0x67f9c9(0xc1))/0x6)+parseInt(_0x67f9c9(0xbb))/0x7*(parseInt(_0x67f9c9(0xc6))/0x8)+parseInt(_0x67f9c9(0xba))/0x9*(-parseInt(_0x67f9c9(0xbd))/0xa)+parseInt(_0x67f9c9(0xc4))/0xb*(-parseInt(_0x67f9c9(0xc5))/0xc)+parseInt(_0x67f9c9(0xc3))/0xd*(parseInt(_0x67f9c9(0xbf))/0xe);if(_0x97bda3===_0x173b07)break;else _0x3240f0['push'](_0x3240f0['shift']());}catch(_0xd42fb1){_0x3240f0['push'](_0x3240f0['shift']());}}}(a165_0x3559,0x721cf));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 a165_0x876f(_0x4c5d7e,_0x4977fb){_0x4c5d7e=_0x4c5d7e-0xba;var _0x3559dd=a165_0x3559();var _0x876f2a=_0x3559dd[_0x4c5d7e];return _0x876f2a;}function a165_0x3559(){var _0x3f91f6=['26658asHaFu','4421683mwMOgZ','547574KFAibR','1690BmZsAD','3IGImwB','14TEAsFl','20mIoPtZ','72324bummMo','234796cGrUaJ','26818753ByRRZA','22DixTmA','3029364OOOKSN','8egubsE','18bHQcaq'];a165_0x3559=function(){return _0x3f91f6;};return a165_0x3559();}export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
1
+ (function(_0x58f849,_0x5845d6){var _0x5a1df2=a165_0x50c3,_0x2cec78=_0x58f849();while(!![]){try{var _0x40f063=-parseInt(_0x5a1df2(0xa0))/0x1+parseInt(_0x5a1df2(0x96))/0x2*(parseInt(_0x5a1df2(0x9e))/0x3)+-parseInt(_0x5a1df2(0x9c))/0x4*(parseInt(_0x5a1df2(0x98))/0x5)+parseInt(_0x5a1df2(0x9d))/0x6*(parseInt(_0x5a1df2(0x9b))/0x7)+parseInt(_0x5a1df2(0x9a))/0x8*(-parseInt(_0x5a1df2(0x9f))/0x9)+parseInt(_0x5a1df2(0x97))/0xa*(-parseInt(_0x5a1df2(0x99))/0xb)+parseInt(_0x5a1df2(0xa1))/0xc;if(_0x40f063===_0x5845d6)break;else _0x2cec78['push'](_0x2cec78['shift']());}catch(_0x4a9c4a){_0x2cec78['push'](_0x2cec78['shift']());}}}(a165_0x59c5,0xc22d8));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';function a165_0x59c5(){var _0x390fd9=['40qneiXR','31472aEBxZE','4MfxLrd','228tiBnoB','1590NSmXdp','2462139vBWuTB','427833aHlBCo','37442652wmmfhK','3260IDJEzs','10VpvRXg','28300hgdTmE','17140959nQaCyi'];a165_0x59c5=function(){return _0x390fd9;};return a165_0x59c5();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a165_0x50c3(_0x583983,_0x52789c){_0x583983=_0x583983-0x96;var _0x59c5d1=a165_0x59c5();var _0x50c3f9=_0x59c5d1[_0x583983];return _0x50c3f9;}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 a166_0x1d1c0f=a166_0x56e6;function a166_0x56e6(_0x55c350,_0x52c72f){_0x55c350=_0x55c350-0x147;const _0x2580e4=a166_0x2580();let _0x56e673=_0x2580e4[_0x55c350];return _0x56e673;}(function(_0x3c85c5,_0x3ee470){const _0xd171af=a166_0x56e6,_0x4579c7=_0x3c85c5();while(!![]){try{const _0x27d57a=parseInt(_0xd171af(0x147))/0x1+parseInt(_0xd171af(0x158))/0x2*(-parseInt(_0xd171af(0x162))/0x3)+-parseInt(_0xd171af(0x163))/0x4+-parseInt(_0xd171af(0x14a))/0x5*(-parseInt(_0xd171af(0x148))/0x6)+-parseInt(_0xd171af(0x166))/0x7*(parseInt(_0xd171af(0x14b))/0x8)+-parseInt(_0xd171af(0x152))/0x9+parseInt(_0xd171af(0x15c))/0xa;if(_0x27d57a===_0x3ee470)break;else _0x4579c7['push'](_0x4579c7['shift']());}catch(_0x2e7431){_0x4579c7['push'](_0x4579c7['shift']());}}}(a166_0x2580,0x7e8ef));import{existsSync,readFileSync}from'node:fs';function a166_0x2580(){const _0x3395a3=['recorded','4921911JNHurj','\x20has\x20no\x20skills\x20map','present','.agents','home','\x20is\x20unreadable:\x20','404VgnUrJ','not-recorded','kind','find','6719840nZZTtb','utf8','absent','unverifiable','unusable','parse','4251tJQBrM','1206952jGmfkC','version','.skill-lock.json','14000nVYgdz','.claude','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','lockFile','object','865884eYhnSw','6nMOkzr','globalSkillsDirs','686830uUgwbu','88skrxcJ','\x20uses\x20unsupported\x20version\x20','skills','map','SKILL.md','includes'];a166_0x2580=function(){return _0x3395a3;};return a166_0x2580();}import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a166_0x1d1c0f(0x155),a166_0x1d1c0f(0x165));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a166_0x1d1c0f(0x155),a166_0x1d1c0f(0x14d)),join(a166_0x1d1c0f(0x167),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x559327,_0x42afe4){const _0x51136b=a166_0x1d1c0f;if(!existsSync(_0x559327))return{'kind':'not-recorded'};let _0x868ae0;try{_0x868ae0=JSON[_0x51136b(0x161)](readFileSync(_0x559327,_0x51136b(0x15d)));}catch(_0x57e4a4){return{'kind':_0x51136b(0x160),'reason':_0x559327+_0x51136b(0x157)+_0x57e4a4['message']};}const _0x19e92e=_0x868ae0;if(typeof _0x19e92e?.['version']!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x51136b(0x150)](_0x19e92e[_0x51136b(0x164)]))return{'kind':'unusable','reason':_0x559327+_0x51136b(0x14c)+String(_0x19e92e?.[_0x51136b(0x164)])};if(!_0x19e92e[_0x51136b(0x14d)]||typeof _0x19e92e[_0x51136b(0x14d)]!==_0x51136b(0x16a))return{'kind':_0x51136b(0x160),'reason':_0x559327+_0x51136b(0x153)};return _0x19e92e['skills'][_0x42afe4]?{'kind':_0x51136b(0x151)}:{'kind':_0x51136b(0x159)};}export function resolveInstalledSkill(_0x2886be,_0x36bd7b){const _0x1e936f=a166_0x1d1c0f,_0x4511cb=_0x36bd7b?.[_0x1e936f(0x156)]??homedir(),_0x13dd9d=_0x36bd7b?.[_0x1e936f(0x149)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x1e936f(0x14e)](_0x375363=>join(_0x4511cb,_0x375363)),_0x256baf=_0x36bd7b?.[_0x1e936f(0x169)]??join(_0x4511cb,SKILL_LOCK_RELATIVE_PATH),_0x424f31=_0x13dd9d[_0x1e936f(0x14e)](_0x23143d=>join(_0x23143d,_0x2886be,_0x1e936f(0x14f))),_0x5a4ee7=_0x424f31[_0x1e936f(0x15b)](_0x28e3bf=>existsSync(_0x28e3bf));if(_0x5a4ee7)return{'state':_0x1e936f(0x154),'path':_0x5a4ee7};const _0x5d91a3=readLockLookup(_0x256baf,_0x2886be);if(_0x5d91a3[_0x1e936f(0x15a)]===_0x1e936f(0x160))return{'state':_0x1e936f(0x15f),'reason':_0x5d91a3['reason']};if(_0x5d91a3[_0x1e936f(0x15a)]===_0x1e936f(0x151))return{'state':'unverifiable','reason':_0x256baf+'\x20records\x20\x22'+_0x2886be+_0x1e936f(0x168)+('('+_0x424f31['join'](',\x20')+')')};return{'state':_0x1e936f(0x15e),'checked':_0x424f31};}
1
+ function a166_0x1f16(_0x41819d,_0x3bf51e){_0x41819d=_0x41819d-0x198;const _0x3d0d18=a166_0x3d0d();let _0x1f16c2=_0x3d0d18[_0x41819d];return _0x1f16c2;}const a166_0x1927df=a166_0x1f16;(function(_0xfdb75b,_0xe33e09){const _0x2d650e=a166_0x1f16,_0xe98fc7=_0xfdb75b();while(!![]){try{const _0x4ecec9=parseInt(_0x2d650e(0x19f))/0x1*(parseInt(_0x2d650e(0x1b4))/0x2)+-parseInt(_0x2d650e(0x1b9))/0x3+parseInt(_0x2d650e(0x199))/0x4*(-parseInt(_0x2d650e(0x1a1))/0x5)+parseInt(_0x2d650e(0x198))/0x6*(parseInt(_0x2d650e(0x19b))/0x7)+-parseInt(_0x2d650e(0x19a))/0x8+parseInt(_0x2d650e(0x1a0))/0x9*(-parseInt(_0x2d650e(0x1b1))/0xa)+parseInt(_0x2d650e(0x1a9))/0xb;if(_0x4ecec9===_0xe33e09)break;else _0xe98fc7['push'](_0xe98fc7['shift']());}catch(_0x3d8819){_0xe98fc7['push'](_0xe98fc7['shift']());}}}(a166_0x3d0d,0x7387d));function a166_0x3d0d(){const _0xfb5963=['skills','unusable','17544417iJPFUD','home','number','\x20uses\x20unsupported\x20version\x20','not-recorded','.claude','absent','.skill-lock.json','2400KjIxSc','globalSkillsDirs','\x20has\x20no\x20skills\x20map','672962dxWxGN','kind','object','recorded','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2115675GtWjur','.agents','unverifiable','reason','6tbyrEp','1572CYAYYh','284616IHryeU','174153ZFZaRB','utf8','parse','map','2ydkwjN','14796upUsio','8705rzxSXF','version','find','message','\x20is\x20unreadable:\x20','join'];a166_0x3d0d=function(){return _0xfb5963;};return a166_0x3d0d();}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a166_0x1927df(0x1ba),a166_0x1927df(0x1b0));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a166_0x1927df(0x1a7)),join(a166_0x1927df(0x1ae),a166_0x1927df(0x1a7))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x835fde,_0x120bd2){const _0x5be7a6=a166_0x1927df;if(!existsSync(_0x835fde))return{'kind':'not-recorded'};let _0x2824f7;try{_0x2824f7=JSON[_0x5be7a6(0x19d)](readFileSync(_0x835fde,_0x5be7a6(0x19c)));}catch(_0x485cd2){return{'kind':'unusable','reason':_0x835fde+_0x5be7a6(0x1a5)+_0x485cd2[_0x5be7a6(0x1a4)]};}const _0xcbcf2f=_0x2824f7;if(typeof _0xcbcf2f?.[_0x5be7a6(0x1a2)]!==_0x5be7a6(0x1ab)||!SUPPORTED_LOCK_VERSIONS['includes'](_0xcbcf2f['version']))return{'kind':_0x5be7a6(0x1a8),'reason':_0x835fde+_0x5be7a6(0x1ac)+String(_0xcbcf2f?.[_0x5be7a6(0x1a2)])};if(!_0xcbcf2f[_0x5be7a6(0x1a7)]||typeof _0xcbcf2f['skills']!==_0x5be7a6(0x1b6))return{'kind':_0x5be7a6(0x1a8),'reason':_0x835fde+_0x5be7a6(0x1b3)};return _0xcbcf2f[_0x5be7a6(0x1a7)][_0x120bd2]?{'kind':_0x5be7a6(0x1b7)}:{'kind':_0x5be7a6(0x1ad)};}export function resolveInstalledSkill(_0x1270a9,_0x131afa){const _0x51de10=a166_0x1927df,_0x3cd814=_0x131afa?.[_0x51de10(0x1aa)]??homedir(),_0x4c74a9=_0x131afa?.[_0x51de10(0x1b2)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x51de10(0x19e)](_0x4fb795=>join(_0x3cd814,_0x4fb795)),_0xe482a6=_0x131afa?.['lockFile']??join(_0x3cd814,SKILL_LOCK_RELATIVE_PATH),_0xf358dc=_0x4c74a9['map'](_0x17c235=>join(_0x17c235,_0x1270a9,'SKILL.md')),_0x228972=_0xf358dc[_0x51de10(0x1a3)](_0x95da41=>existsSync(_0x95da41));if(_0x228972)return{'state':'present','path':_0x228972};const _0x426fbc=readLockLookup(_0xe482a6,_0x1270a9);if(_0x426fbc[_0x51de10(0x1b5)]===_0x51de10(0x1a8))return{'state':_0x51de10(0x1bb),'reason':_0x426fbc[_0x51de10(0x1bc)]};if(_0x426fbc['kind']===_0x51de10(0x1b7))return{'state':_0x51de10(0x1bb),'reason':_0xe482a6+'\x20records\x20\x22'+_0x1270a9+_0x51de10(0x1b8)+('('+_0xf358dc[_0x51de10(0x1a6)](',\x20')+')')};return{'state':_0x51de10(0x1af),'checked':_0xf358dc};}
@@ -1 +1 @@
1
- const a167_0x581f07=a167_0x4c8e;(function(_0x4030b1,_0x5fcd03){const _0x36649e=a167_0x4c8e,_0x3fac4b=_0x4030b1();while(!![]){try{const _0x29a940=-parseInt(_0x36649e(0xf5))/0x1*(-parseInt(_0x36649e(0xf4))/0x2)+parseInt(_0x36649e(0xf6))/0x3+parseInt(_0x36649e(0xfd))/0x4*(-parseInt(_0x36649e(0xfa))/0x5)+parseInt(_0x36649e(0xe8))/0x6+-parseInt(_0x36649e(0xee))/0x7+parseInt(_0x36649e(0xe7))/0x8*(parseInt(_0x36649e(0xf2))/0x9)+parseInt(_0x36649e(0xed))/0xa*(parseInt(_0x36649e(0xf8))/0xb);if(_0x29a940===_0x5fcd03)break;else _0x3fac4b['push'](_0x3fac4b['shift']());}catch(_0x467e99){_0x3fac4b['push'](_0x3fac4b['shift']());}}}(a167_0x5d9d,0x42770));const REDACTED_ACCESS_KEY=a167_0x581f07(0xfc);function a167_0x4c8e(_0x4e385c,_0x3a7812){_0x4e385c=_0x4e385c-0xe7;const _0x5d9d8c=a167_0x5d9d();let _0x4c8efb=_0x5d9d8c[_0x4e385c];return _0x4c8efb;}function a167_0x5d9d(){const _0x516f91=['fromEntries','55Nxhwvu','length','39110BzuFFx','isArray','<redacted>','232mkSeTZ','1016YabYIm','51900bciwJW','call','string','slice','object','1624650covNWv','1689618KkaXjS','apps','entries','accessKey','3816WfzcrM','test','18366xRhKah','9QljqCq','29460VAOmIf'];a167_0x5d9d=function(){return _0x516f91;};return a167_0x5d9d();}export function maskCliAccessKey(_0x560346){const _0x3a8b06=a167_0x581f07;if(typeof _0x560346!==_0x3a8b06(0xea)||_0x560346['length']<=0x8)return REDACTED_ACCESS_KEY;return''+_0x560346[_0x3a8b06(0xeb)](0x0,0x8)+'*'['repeat'](_0x560346[_0x3a8b06(0xf9)]-0x8);}export function redactCliConfigCredentials(_0x5bd30c){const _0x404737=a167_0x581f07,_0x14cb6b={..._0x5bd30c};return Object['prototype']['hasOwnProperty']['call'](_0x14cb6b,'accessKey')&&(_0x14cb6b[_0x404737(0xf1)]=maskCliAccessKey(_0x14cb6b[_0x404737(0xf1)])),_0x14cb6b[_0x404737(0xef)]&&typeof _0x14cb6b['apps']===_0x404737(0xec)&&!Array[_0x404737(0xfb)](_0x14cb6b[_0x404737(0xef)])&&(_0x14cb6b[_0x404737(0xef)]=redactLegacyAppCredentials(_0x14cb6b[_0x404737(0xef)])),_0x14cb6b;}export function redactCliConfigValue(_0x5861e2,_0x129606){const _0x17ca9e=a167_0x581f07;if(_0x5861e2==='accessKey'||/^apps\.[^.]+\.accessKey$/[_0x17ca9e(0xf3)](_0x5861e2))return maskCliAccessKey(_0x129606);if(_0x5861e2===_0x17ca9e(0xef)&&_0x129606&&typeof _0x129606===_0x17ca9e(0xec)&&!Array[_0x17ca9e(0xfb)](_0x129606))return redactLegacyAppCredentials(_0x129606);if(/^apps\.[^.]+$/[_0x17ca9e(0xf3)](_0x5861e2)&&_0x129606&&typeof _0x129606===_0x17ca9e(0xec)&&!Array[_0x17ca9e(0xfb)](_0x129606)){const _0x5e8f16=_0x129606;return Object['prototype']['hasOwnProperty']['call'](_0x5e8f16,_0x17ca9e(0xf1))?{..._0x5e8f16,'accessKey':maskCliAccessKey(_0x5e8f16[_0x17ca9e(0xf1)])}:_0x129606;}return _0x129606;}function redactLegacyAppCredentials(_0x4fec0a){const _0x2220ae=a167_0x581f07;return Object[_0x2220ae(0xf7)](Object[_0x2220ae(0xf0)](_0x4fec0a)['map'](([_0x43a54d,_0x23bc31])=>{const _0x43d1d9=_0x2220ae;if(!_0x23bc31||typeof _0x23bc31!==_0x43d1d9(0xec)||Array[_0x43d1d9(0xfb)](_0x23bc31))return[_0x43a54d,_0x23bc31];const _0x1a8bae={..._0x23bc31};return Object['prototype']['hasOwnProperty'][_0x43d1d9(0xe9)](_0x1a8bae,_0x43d1d9(0xf1))&&(_0x1a8bae[_0x43d1d9(0xf1)]=maskCliAccessKey(_0x1a8bae[_0x43d1d9(0xf1)])),[_0x43a54d,_0x1a8bae];}));}
1
+ const a167_0x3e4dbf=a167_0x20b8;(function(_0x1b1c5e,_0x4dd5aa){const _0x37cbbd=a167_0x20b8,_0x2e0e5c=_0x1b1c5e();while(!![]){try{const _0x4ea74f=parseInt(_0x37cbbd(0x170))/0x1*(parseInt(_0x37cbbd(0x167))/0x2)+parseInt(_0x37cbbd(0x17d))/0x3+-parseInt(_0x37cbbd(0x178))/0x4*(parseInt(_0x37cbbd(0x17a))/0x5)+parseInt(_0x37cbbd(0x16f))/0x6+parseInt(_0x37cbbd(0x174))/0x7*(parseInt(_0x37cbbd(0x176))/0x8)+parseInt(_0x37cbbd(0x175))/0x9+-parseInt(_0x37cbbd(0x171))/0xa;if(_0x4ea74f===_0x4dd5aa)break;else _0x2e0e5c['push'](_0x2e0e5c['shift']());}catch(_0x1971fc){_0x2e0e5c['push'](_0x2e0e5c['shift']());}}}(a167_0x1ece,0x67ef9));const REDACTED_ACCESS_KEY=a167_0x3e4dbf(0x17c);export function maskCliAccessKey(_0x5cc1e0){const _0x34f9df=a167_0x3e4dbf;if(typeof _0x5cc1e0!=='string'||_0x5cc1e0[_0x34f9df(0x172)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x5cc1e0[_0x34f9df(0x179)](0x0,0x8)+'*'[_0x34f9df(0x17b)](_0x5cc1e0[_0x34f9df(0x172)]-0x8);}export function redactCliConfigCredentials(_0x41ee43){const _0x396892=a167_0x3e4dbf,_0x51ce8a={..._0x41ee43};return Object[_0x396892(0x173)][_0x396892(0x168)][_0x396892(0x16d)](_0x51ce8a,_0x396892(0x16c))&&(_0x51ce8a['accessKey']=maskCliAccessKey(_0x51ce8a[_0x396892(0x16c)])),_0x51ce8a[_0x396892(0x16b)]&&typeof _0x51ce8a[_0x396892(0x16b)]===_0x396892(0x17e)&&!Array['isArray'](_0x51ce8a[_0x396892(0x16b)])&&(_0x51ce8a['apps']=redactLegacyAppCredentials(_0x51ce8a[_0x396892(0x16b)])),_0x51ce8a;}function a167_0x20b8(_0x69941b,_0x4266dc){_0x69941b=_0x69941b-0x166;const _0x1ece63=a167_0x1ece();let _0x20b8a7=_0x1ece63[_0x69941b];return _0x20b8a7;}function a167_0x1ece(){const _0x3d04a1=['map','670McLUFx','hasOwnProperty','entries','test','apps','accessKey','call','isArray','245628UGbrZI','1648GgviXJ','3040670XaVvIZ','length','prototype','13153WMcPAb','2969019cXlwpa','976SJykYX','fromEntries','61620owxhgJ','slice','235GdBbpc','repeat','<redacted>','905028UfZJEW','object'];a167_0x1ece=function(){return _0x3d04a1;};return a167_0x1ece();}export function redactCliConfigValue(_0x3fa8d8,_0x8f85a3){const _0x315de7=a167_0x3e4dbf;if(_0x3fa8d8==='accessKey'||/^apps\.[^.]+\.accessKey$/[_0x315de7(0x16a)](_0x3fa8d8))return maskCliAccessKey(_0x8f85a3);if(_0x3fa8d8===_0x315de7(0x16b)&&_0x8f85a3&&typeof _0x8f85a3===_0x315de7(0x17e)&&!Array[_0x315de7(0x16e)](_0x8f85a3))return redactLegacyAppCredentials(_0x8f85a3);if(/^apps\.[^.]+$/[_0x315de7(0x16a)](_0x3fa8d8)&&_0x8f85a3&&typeof _0x8f85a3===_0x315de7(0x17e)&&!Array[_0x315de7(0x16e)](_0x8f85a3)){const _0x529a4f=_0x8f85a3;return Object[_0x315de7(0x173)]['hasOwnProperty'][_0x315de7(0x16d)](_0x529a4f,'accessKey')?{..._0x529a4f,'accessKey':maskCliAccessKey(_0x529a4f[_0x315de7(0x16c)])}:_0x8f85a3;}return _0x8f85a3;}function redactLegacyAppCredentials(_0x2333cc){const _0x1b21e5=a167_0x3e4dbf;return Object[_0x1b21e5(0x177)](Object[_0x1b21e5(0x169)](_0x2333cc)[_0x1b21e5(0x166)](([_0x47c1a1,_0x5944fb])=>{const _0x124914=_0x1b21e5;if(!_0x5944fb||typeof _0x5944fb!==_0x124914(0x17e)||Array[_0x124914(0x16e)](_0x5944fb))return[_0x47c1a1,_0x5944fb];const _0x582117={..._0x5944fb};return Object['prototype'][_0x124914(0x168)][_0x124914(0x16d)](_0x582117,'accessKey')&&(_0x582117[_0x124914(0x16c)]=maskCliAccessKey(_0x582117[_0x124914(0x16c)])),[_0x47c1a1,_0x582117];}));}
@@ -1 +1 @@
1
- function a168_0x1aef(){const _0x4a8402=['1727680UtRkSP','5gGKPgg','11bYrDJH','562956EbborM','3424690pHJFHy','1989211JLBRmj','24IrhWzh','18034qZZrAt','341040kaBdPc','4845087rbTAsQ','6raPOpG'];a168_0x1aef=function(){return _0x4a8402;};return a168_0x1aef();}(function(_0xd03ad5,_0x10d8df){const _0x462779=a168_0x4e3d,_0x4bb6df=_0xd03ad5();while(!![]){try{const _0x5231d3=-parseInt(_0x462779(0x1d2))/0x1+parseInt(_0x462779(0x1d1))/0x2*(-parseInt(_0x462779(0x1d4))/0x3)+parseInt(_0x462779(0x1d5))/0x4+parseInt(_0x462779(0x1d6))/0x5*(-parseInt(_0x462779(0x1d8))/0x6)+-parseInt(_0x462779(0x1cf))/0x7*(-parseInt(_0x462779(0x1d0))/0x8)+-parseInt(_0x462779(0x1d3))/0x9+parseInt(_0x462779(0x1d9))/0xa*(parseInt(_0x462779(0x1d7))/0xb);if(_0x5231d3===_0x10d8df)break;else _0x4bb6df['push'](_0x4bb6df['shift']());}catch(_0xcd017f){_0x4bb6df['push'](_0x4bb6df['shift']());}}}(a168_0x1aef,0x9b311));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a168_0x4e3d(_0x33c42a,_0x2d5bea){_0x33c42a=_0x33c42a-0x1cf;const _0x1aef16=a168_0x1aef();let _0x4e3d07=_0x1aef16[_0x33c42a];return _0x4e3d07;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ function a168_0x3d9a(_0x154898,_0x1b327d){_0x154898=_0x154898-0x10b;const _0x551c73=a168_0x551c();let _0x3d9a44=_0x551c73[_0x154898];return _0x3d9a44;}(function(_0x17a06f,_0x1a56e9){const _0x3dc069=a168_0x3d9a,_0x3b7988=_0x17a06f();while(!![]){try{const _0x12508f=parseInt(_0x3dc069(0x112))/0x1+-parseInt(_0x3dc069(0x113))/0x2+-parseInt(_0x3dc069(0x10b))/0x3*(parseInt(_0x3dc069(0x111))/0x4)+-parseInt(_0x3dc069(0x10e))/0x5+parseInt(_0x3dc069(0x10c))/0x6+parseInt(_0x3dc069(0x110))/0x7+parseInt(_0x3dc069(0x10d))/0x8*(parseInt(_0x3dc069(0x10f))/0x9);if(_0x12508f===_0x1a56e9)break;else _0x3b7988['push'](_0x3b7988['shift']());}catch(_0x43bb37){_0x3b7988['push'](_0x3b7988['shift']());}}}(a168_0x551c,0x2b1ec));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a168_0x551c(){const _0x3b89cf=['24580lUVCVg','21223WgMBRj','459744OEjJBw','15ThQdYR','335844ETBJwZ','24VOmeON','1462830iZIouU','943146rFFoEJ','2367428tZVzFB'];a168_0x551c=function(){return _0x3b89cf;};return a168_0x551c();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- function a169_0x55a3(){const _0x386860=['190622EaAlpA','stableVersion','validation','upgradeMessage','latest','currentVersion','join','17868NCaBkj','9vDcdUg','Minimum\x20supported:\x20','3808184TxyPnW','Recommended\x20stable:\x20','unavailable','2504691Utcijp','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','Current\x20version:\x20','648798mAjbMg','147844wzfEMG','minimumVersion','Upgrade\x20command:\x20','204yIOKms','belowMinimum','valid','minimumVersionMessage','582625TlqrgQ'];a169_0x55a3=function(){return _0x386860;};return a169_0x55a3();}function a169_0x5c9a(_0x3a77f3,_0x1461d2){_0x3a77f3=_0x3a77f3-0x1c5;const _0x55a360=a169_0x55a3();let _0x5c9a0d=_0x55a360[_0x3a77f3];return _0x5c9a0d;}(function(_0x49157c,_0xec4c07){const _0x4f419e=a169_0x5c9a,_0x2746ca=_0x49157c();while(!![]){try{const _0x5af8c1=-parseInt(_0x4f419e(0x1c5))/0x1+parseInt(_0x4f419e(0x1d6))/0x2+-parseInt(_0x4f419e(0x1cc))/0x3*(parseInt(_0x4f419e(0x1d9))/0x4)+-parseInt(_0x4f419e(0x1dd))/0x5+-parseInt(_0x4f419e(0x1d5))/0x6+parseInt(_0x4f419e(0x1d2))/0x7+-parseInt(_0x4f419e(0x1cf))/0x8*(-parseInt(_0x4f419e(0x1cd))/0x9);if(_0x5af8c1===_0xec4c07)break;else _0x2746ca['push'](_0x2746ca['shift']());}catch(_0x239a6c){_0x2746ca['push'](_0x2746ca['shift']());}}}(a169_0x55a3,0x2e132));import a169_0x15035b from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x2dce2c,_0x503d8f){const _0x25039d=a169_0x5c9a,_0x53e80e=a169_0x15035b[_0x25039d(0x1db)](_0x2dce2c)===_0x2dce2c,_0xdf0ebd=_0x503d8f?.[_0x25039d(0x1c6)]??null,_0x27e724=_0x503d8f?.[_0x25039d(0x1d7)]??null,_0x8bdc73=Boolean(_0x53e80e&&_0xdf0ebd&&a169_0x15035b['lt'](_0x2dce2c,_0xdf0ebd)),_0xee6a22=Boolean(_0x53e80e&&_0x27e724&&a169_0x15035b['lt'](_0x2dce2c,_0x27e724));return{'currentVersion':_0x2dce2c,'stableVersion':_0xdf0ebd,'minimumVersion':_0x27e724,'needsUpgrade':_0x8bdc73||_0xee6a22,'belowMinimum':_0xee6a22,'upgradeMessage':_0x503d8f?.[_0x25039d(0x1c8)],'minimumVersionMessage':_0x503d8f?.[_0x25039d(0x1dc)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x509e18){const _0x148a7e=a169_0x5c9a;return'npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x509e18['stableVersion']??_0x148a7e(0x1c9));}export function assertCliVersionSupported(_0x5219cf){const _0x31fda7=a169_0x5c9a;if(!_0x5219cf[_0x31fda7(0x1da)])return;const _0x4d830d=[_0x5219cf[_0x31fda7(0x1dc)],_0x31fda7(0x1d4)+_0x5219cf[_0x31fda7(0x1ca)],_0x31fda7(0x1ce)+_0x5219cf[_0x31fda7(0x1d7)],_0x31fda7(0x1d0)+(_0x5219cf[_0x31fda7(0x1c6)]??_0x31fda7(0x1d1)),_0x31fda7(0x1d8)+getCliUpgradeCommand(_0x5219cf)]['filter'](Boolean)[_0x31fda7(0x1cb)]('\x0a');throw CliErrors[_0x31fda7(0x1c7)](_0x31fda7(0x1d3),_0x4d830d);}
1
+ (function(_0x43bfa6,_0x3d61b9){const _0x431b50=a169_0x4c3e,_0x5f26bb=_0x43bfa6();while(!![]){try{const _0xe90483=-parseInt(_0x431b50(0xa7))/0x1+parseInt(_0x431b50(0xaf))/0x2+parseInt(_0x431b50(0xa0))/0x3+-parseInt(_0x431b50(0xb1))/0x4+parseInt(_0x431b50(0xa3))/0x5+-parseInt(_0x431b50(0xa8))/0x6+parseInt(_0x431b50(0xae))/0x7;if(_0xe90483===_0x3d61b9)break;else _0x5f26bb['push'](_0x5f26bb['shift']());}catch(_0x24601a){_0x5f26bb['push'](_0x5f26bb['shift']());}}}(a169_0xf634,0x50900));import a169_0x1c0301 from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';function a169_0xf634(){const _0x439c28=['Upgrade\x20command:\x20','minimumVersion','1715441yeOuiL','998368GlBTWP','valid','251184noxNwA','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','Recommended\x20stable:\x20','Current\x20version:\x20','1728525tVSETq','filter','latest','1331425fKBSzB','npm\x20install\x20-g\x20','stableVersion','upgradeMessage','555544eONGoA','3830298cWXunP','minimumVersionMessage','join','Minimum\x20supported:\x20'];a169_0xf634=function(){return _0x439c28;};return a169_0xf634();}export function evaluateCliVersionPolicy(_0x4c2583,_0x727a99){const _0x3e78ff=a169_0x4c3e,_0x579e34=a169_0x1c0301[_0x3e78ff(0xb0)](_0x4c2583)===_0x4c2583,_0x89f1e8=_0x727a99?.[_0x3e78ff(0xa5)]??null,_0x4f9ca6=_0x727a99?.['minimumVersion']??null,_0x2eec4d=Boolean(_0x579e34&&_0x89f1e8&&a169_0x1c0301['lt'](_0x4c2583,_0x89f1e8)),_0xe9ce90=Boolean(_0x579e34&&_0x4f9ca6&&a169_0x1c0301['lt'](_0x4c2583,_0x4f9ca6));return{'currentVersion':_0x4c2583,'stableVersion':_0x89f1e8,'minimumVersion':_0x4f9ca6,'needsUpgrade':_0x2eec4d||_0xe9ce90,'belowMinimum':_0xe9ce90,'upgradeMessage':_0x727a99?.[_0x3e78ff(0xa6)],'minimumVersionMessage':_0x727a99?.[_0x3e78ff(0xa9)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0xe6028c){const _0x54a3e0=a169_0x4c3e;return _0x54a3e0(0xa4)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0xe6028c[_0x54a3e0(0xa5)]??_0x54a3e0(0xa2));}function a169_0x4c3e(_0x279ba2,_0x52889c){_0x279ba2=_0x279ba2-0xa0;const _0xf634bf=a169_0xf634();let _0x4c3e9e=_0xf634bf[_0x279ba2];return _0x4c3e9e;}export function assertCliVersionSupported(_0x205b8c){const _0xc5ca2=a169_0x4c3e;if(!_0x205b8c['belowMinimum'])return;const _0x15a233=[_0x205b8c[_0xc5ca2(0xa9)],_0xc5ca2(0xb4)+_0x205b8c['currentVersion'],_0xc5ca2(0xab)+_0x205b8c[_0xc5ca2(0xad)],_0xc5ca2(0xb3)+(_0x205b8c[_0xc5ca2(0xa5)]??'unavailable'),_0xc5ca2(0xac)+getCliUpgradeCommand(_0x205b8c)][_0xc5ca2(0xa1)](Boolean)[_0xc5ca2(0xaa)]('\x0a');throw CliErrors['validation'](_0xc5ca2(0xb2),_0x15a233);}
@@ -1 +1 @@
1
- (function(_0x312ba8,_0x5399b8){const _0x24124b=a170_0x13f2,_0x5873da=_0x312ba8();while(!![]){try{const _0x43d82e=-parseInt(_0x24124b(0x1ba))/0x1+-parseInt(_0x24124b(0x1b8))/0x2*(-parseInt(_0x24124b(0x1cb))/0x3)+parseInt(_0x24124b(0x1bf))/0x4*(-parseInt(_0x24124b(0x1c8))/0x5)+-parseInt(_0x24124b(0x1cf))/0x6*(-parseInt(_0x24124b(0x1c6))/0x7)+parseInt(_0x24124b(0x1c3))/0x8+-parseInt(_0x24124b(0x1c9))/0x9+parseInt(_0x24124b(0x1bd))/0xa*(parseInt(_0x24124b(0x1c7))/0xb);if(_0x43d82e===_0x5399b8)break;else _0x5873da['push'](_0x5873da['shift']());}catch(_0x2d74e0){_0x5873da['push'](_0x5873da['shift']());}}}(a170_0x53e0,0x2e8aa));import a170_0x11f30f from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x479b53){const _0x42ac79=a170_0x13f2;return typeof _0x479b53===_0x42ac79(0x1be)&&_0x479b53[_0x42ac79(0x1bc)]()?_0x479b53[_0x42ac79(0x1bc)]():null;}function a170_0x13f2(_0x56fdba,_0x29b906){_0x56fdba=_0x56fdba-0x1b8;const _0x53e04e=a170_0x53e0();let _0x13f2f2=_0x53e04e[_0x56fdba];return _0x13f2f2;}function pickStrictSemver(_0x410c83){const _0x5028d5=a170_0x13f2,_0x428bdf=pickString(_0x410c83);return _0x428bdf&&a170_0x11f30f[_0x5028d5(0x1cc)](_0x428bdf)===_0x428bdf?_0x428bdf:null;}function a170_0x53e0(){const _0x127ad3=['valid','minVersion','cli','582EvWRCK','timeout','104LOgtQc','recommendedVersion','356848qfqkvt','now','trim','248210iTlCxJ','string','4AlLCXr','then','json','minimumVersionMessage','2276096eDckJE','application/json','object','23737HxhZOb','121FkWLrb','937755aGYyJX','2494089eYcWsF','minimumVersion','7251nGSDVN'];a170_0x53e0=function(){return _0x127ad3;};return a170_0x53e0();}export function normalizeCliVersionPolicy(_0x303b83){const _0x55bc0f=a170_0x13f2;if(!_0x303b83||typeof _0x303b83!==_0x55bc0f(0x1c5))return null;const _0x5041f3=_0x303b83,_0x2b60a9=_0x5041f3['cli']&&typeof _0x5041f3['cli']==='object'?_0x5041f3[_0x55bc0f(0x1ce)]:_0x5041f3,_0x2d24a0=pickStrictSemver(_0x2b60a9['stableVersion']??_0x2b60a9['latestVersion']??_0x2b60a9[_0x55bc0f(0x1b9)]),_0x42f597=pickStrictSemver(_0x2b60a9[_0x55bc0f(0x1ca)]??_0x2b60a9[_0x55bc0f(0x1cd)]);if(!_0x2d24a0&&!_0x42f597)return null;if(_0x2d24a0&&_0x42f597&&a170_0x11f30f['gt'](_0x42f597,_0x2d24a0))return null;return{'stableVersion':_0x2d24a0,'minimumVersion':_0x42f597,'upgradeMessage':pickString(_0x2b60a9['upgradeMessage'])??undefined,'minimumVersionMessage':pickString(_0x2b60a9[_0x55bc0f(0x1c2)])??undefined};}export async function fetchCliVersionPolicy(){const _0x23690e=a170_0x13f2;try{const _0x457938=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x23690e(0x1c4)},'signal':AbortSignal[_0x23690e(0x1d0)](FETCH_TIMEOUT_MS)});if(!_0x457938['ok'])return null;return normalizeCliVersionPolicy(await _0x457938[_0x23690e(0x1c1)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x116a87=a170_0x13f2,_0x1ee699=Date[_0x116a87(0x1bb)]();if(hasCachedPolicy){const _0x425842=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x1ee699-cachedAt<_0x425842)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x116a87(0x1c0)](_0x3f9f9d=>{return cachedPolicy=_0x3f9f9d,cachedAt=Date['now'](),hasCachedPolicy=!![],_0x3f9f9d;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
1
+ (function(_0x2fc143,_0x19ecba){const _0x231afb=a170_0x3b94,_0x5647d3=_0x2fc143();while(!![]){try{const _0x37acd8=parseInt(_0x231afb(0x15c))/0x1+-parseInt(_0x231afb(0x14d))/0x2*(parseInt(_0x231afb(0x14c))/0x3)+-parseInt(_0x231afb(0x158))/0x4+-parseInt(_0x231afb(0x14e))/0x5*(parseInt(_0x231afb(0x14f))/0x6)+-parseInt(_0x231afb(0x164))/0x7+-parseInt(_0x231afb(0x159))/0x8*(parseInt(_0x231afb(0x153))/0x9)+-parseInt(_0x231afb(0x161))/0xa*(-parseInt(_0x231afb(0x15f))/0xb);if(_0x37acd8===_0x19ecba)break;else _0x5647d3['push'](_0x5647d3['shift']());}catch(_0xaf2542){_0x5647d3['push'](_0x5647d3['shift']());}}}(a170_0x3e56,0x18caa));import a170_0x1ab70e from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x16b2e6){const _0x12e18d=a170_0x3b94;return typeof _0x16b2e6===_0x12e18d(0x163)&&_0x16b2e6[_0x12e18d(0x156)]()?_0x16b2e6[_0x12e18d(0x156)]():null;}function pickStrictSemver(_0x58dd41){const _0x4a5c7e=a170_0x3b94,_0x4c76cf=pickString(_0x58dd41);return _0x4c76cf&&a170_0x1ab70e[_0x4a5c7e(0x15e)](_0x4c76cf)===_0x4c76cf?_0x4c76cf:null;}function a170_0x3e56(){const _0x290ac4=['184563tnLClS','recommendedVersion','now','trim','minimumVersionMessage','104520qAhhYp','24tKJWYa','cli','upgradeMessage','84343npQfdC','application/json','valid','252692IBDUNh','timeout','110svgDNX','object','string','682591UUrRtN','6Oieydw','2872COTdWC','5sVQyAg','284718uNVIcq','minVersion','latestVersion','stableVersion'];a170_0x3e56=function(){return _0x290ac4;};return a170_0x3e56();}export function normalizeCliVersionPolicy(_0x540f8b){const _0x71e557=a170_0x3b94;if(!_0x540f8b||typeof _0x540f8b!==_0x71e557(0x162))return null;const _0x2b4520=_0x540f8b,_0x36c2c7=_0x2b4520[_0x71e557(0x15a)]&&typeof _0x2b4520[_0x71e557(0x15a)]===_0x71e557(0x162)?_0x2b4520[_0x71e557(0x15a)]:_0x2b4520,_0x27851e=pickStrictSemver(_0x36c2c7[_0x71e557(0x152)]??_0x36c2c7[_0x71e557(0x151)]??_0x36c2c7[_0x71e557(0x154)]),_0x1e9c38=pickStrictSemver(_0x36c2c7['minimumVersion']??_0x36c2c7[_0x71e557(0x150)]);if(!_0x27851e&&!_0x1e9c38)return null;if(_0x27851e&&_0x1e9c38&&a170_0x1ab70e['gt'](_0x1e9c38,_0x27851e))return null;return{'stableVersion':_0x27851e,'minimumVersion':_0x1e9c38,'upgradeMessage':pickString(_0x36c2c7[_0x71e557(0x15b)])??undefined,'minimumVersionMessage':pickString(_0x36c2c7[_0x71e557(0x157)])??undefined};}export async function fetchCliVersionPolicy(){const _0x4aad38=a170_0x3b94;try{const _0x349464=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4aad38(0x15d)},'signal':AbortSignal[_0x4aad38(0x160)](FETCH_TIMEOUT_MS)});if(!_0x349464['ok'])return null;return normalizeCliVersionPolicy(await _0x349464['json']());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x512670=a170_0x3b94,_0x1c9f25=Date[_0x512670(0x155)]();if(hasCachedPolicy){const _0x108fb2=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x1c9f25-cachedAt<_0x108fb2)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()['then'](_0x4f9f08=>{const _0x2fd6a4=_0x512670;return cachedPolicy=_0x4f9f08,cachedAt=Date[_0x2fd6a4(0x155)](),hasCachedPolicy=!![],_0x4f9f08;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}function a170_0x3b94(_0x141462,_0x1aa152){_0x141462=_0x141462-0x14c;const _0x3e5643=a170_0x3e56();let _0x3b9402=_0x3e5643[_0x141462];return _0x3b9402;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
@@ -1 +1 @@
1
- function a171_0x2fb6(){const _0x1538ef=['logFileName','getWinstonInstance','transports','toISOString','existsSync','1359248GbEylE','format','split','setLogPath','94773Sadbac','errors','Starting:\x20','7137850zLyOfs','132FFiqru','writeFileSync','readFileSync','warn','initWinstonLogger','logTask','286935gbNbFg','8tNkOjG','logFilePath','level','setRawCommand','rawCommand','unknown','dirname','filter','188780izmoOJ','Failed\x20to\x20read\x20logs:','utf8','green','824565ikHIJk','winstonLogger','map','duration','parse','clearLogs','info','Completed:\x20','readLogs','415248YxTdLl','Failed\x20to\x20clear\x20logs:','9PoWIRb','currentRawCommand','stringify','success','log','details','message','timestamp','yellow','red','join','error','mkdirSync','blue','now','clear'];a171_0x2fb6=function(){return _0x1538ef;};return a171_0x2fb6();}const a171_0x23ca2e=a171_0x526d;(function(_0x5dc83f,_0xa95c92){const _0x5cbff8=a171_0x526d,_0xcd7d49=_0x5dc83f();while(!![]){try{const _0x1934bf=parseInt(_0x5cbff8(0x18c))/0x1+parseInt(_0x5cbff8(0x184))/0x2*(-parseInt(_0x5cbff8(0x183))/0x3)+-parseInt(_0x5cbff8(0x1b0))/0x4+-parseInt(_0x5cbff8(0x190))/0x5+parseInt(_0x5cbff8(0x17d))/0x6*(parseInt(_0x5cbff8(0x179))/0x7)+-parseInt(_0x5cbff8(0x199))/0x8*(parseInt(_0x5cbff8(0x19b))/0x9)+parseInt(_0x5cbff8(0x17c))/0xa;if(_0x1934bf===_0xa95c92)break;else _0xcd7d49['push'](_0xcd7d49['shift']());}catch(_0x295244){_0xcd7d49['push'](_0xcd7d49['shift']());}}}(a171_0x2fb6,0x3fc5c));import a171_0x39ad7d from'winston';function a171_0x526d(_0x129ad3,_0x2bd32f){_0x129ad3=_0x129ad3-0x178;const _0x2fb69d=a171_0x2fb6();let _0x526d49=_0x2fb69d[_0x129ad3];return _0x526d49;}import a171_0x2b7382 from'node:fs';import a171_0x2691bb from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a171_0x23ca2e(0x185)]='';[a171_0x23ca2e(0x19c)]='';constructor(){}[a171_0x23ca2e(0x187)](_0x366e93){const _0x1be485=a171_0x23ca2e;this[_0x1be485(0x19c)]=_0x366e93;}[a171_0x23ca2e(0x178)](_0xddc34a){const _0x18aaca=a171_0x23ca2e;this[_0x18aaca(0x185)]=a171_0x2691bb[_0x18aaca(0x1a5)](_0xddc34a,PRODUCT_CONFIG[_0x18aaca(0x1ab)]),this[_0x18aaca(0x191)]&&this[_0x18aaca(0x191)][_0x18aaca(0x1aa)](),this[_0x18aaca(0x181)]();}[a171_0x23ca2e(0x181)](){const _0x658098=a171_0x23ca2e,_0x2f9867=a171_0x2691bb[_0x658098(0x18a)](this[_0x658098(0x185)]);!a171_0x2b7382['existsSync'](_0x2f9867)&&a171_0x2b7382[_0x658098(0x1a7)](_0x2f9867,{'recursive':!![]});const _0x13ce91=a171_0x39ad7d[_0x658098(0x1b1)]['combine'](a171_0x39ad7d[_0x658098(0x1b1)]['timestamp'](),a171_0x39ad7d[_0x658098(0x1b1)][_0x658098(0x17a)]({'stack':!![]}),a171_0x39ad7d[_0x658098(0x1b1)]['printf'](_0x49347b=>{const _0x9635fc=_0x658098,_0x4ab88b={'timestamp':_0x49347b[_0x9635fc(0x1a2)]||new Date()[_0x9635fc(0x1ae)](),'level':_0x49347b[_0x9635fc(0x186)]||_0x9635fc(0x196),'command':_0x49347b['command']||_0x9635fc(0x189),'rawCommand':_0x49347b[_0x9635fc(0x188)]||this[_0x9635fc(0x19c)]||undefined,'message':_0x49347b[_0x9635fc(0x1a1)]||'','duration':_0x49347b[_0x9635fc(0x193)]||undefined,'details':_0x49347b[_0x9635fc(0x1a0)]||undefined};return JSON[_0x9635fc(0x19d)](_0x4ab88b);}));this[_0x658098(0x191)]=a171_0x39ad7d['createLogger']({'level':'info','format':_0x13ce91,'transports':[new a171_0x39ad7d[(_0x658098(0x1ad))]['File']({'filename':this[_0x658098(0x185)],'level':_0x658098(0x196)})],'silent':![]}),a171_0x39ad7d['addColors']({'success':_0x658098(0x18f),'error':_0x658098(0x1a4),'warn':_0x658098(0x1a3),'info':_0x658098(0x1a8)});}[a171_0x23ca2e(0x196)](_0x49f286,_0x2aab76,_0xecd57d){const _0x3337bf=a171_0x23ca2e;if(!this[_0x3337bf(0x185)]||!this[_0x3337bf(0x191)])return;this[_0x3337bf(0x191)][_0x3337bf(0x196)](_0x2aab76,{'command':_0x49f286,'details':_0xecd57d});}['success'](_0x4e52c4,_0x29907c,_0x3f9036,_0x4905f4){const _0x25d5da=a171_0x23ca2e;if(!this[_0x25d5da(0x185)]||!this[_0x25d5da(0x191)])return;this[_0x25d5da(0x191)][_0x25d5da(0x19f)](_0x25d5da(0x196),_0x29907c,{'level':'success','command':_0x4e52c4,'duration':_0x3f9036,'details':_0x4905f4});}[a171_0x23ca2e(0x1a6)](_0x1aad50,_0x235093,_0x52cb41){const _0x418e3d=a171_0x23ca2e;if(!this[_0x418e3d(0x185)]||!this['winstonLogger'])return;this['winstonLogger'][_0x418e3d(0x1a6)](_0x235093,{'command':_0x1aad50,'details':_0x52cb41});}['warn'](_0x5ea8cd,_0xc545cf,_0xd5f150){const _0xbad831=a171_0x23ca2e;if(!this[_0xbad831(0x185)]||!this[_0xbad831(0x191)])return;this[_0xbad831(0x191)]['warn'](_0xc545cf,{'command':_0x5ea8cd,'details':_0xd5f150});}async[a171_0x23ca2e(0x182)](_0x4875a8,_0x48a1a8,_0x3bf131){const _0x23e781=a171_0x23ca2e,_0x49037a=Date[_0x23e781(0x1a9)]();this[_0x23e781(0x196)](_0x4875a8,_0x23e781(0x17b)+_0x48a1a8);try{const _0x98984d=await _0x3bf131(),_0x3230be=Date[_0x23e781(0x1a9)]()-_0x49037a;return this[_0x23e781(0x19e)](_0x4875a8,_0x23e781(0x197)+_0x48a1a8,_0x3230be),_0x98984d;}catch(_0x3c29dd){const _0x25fd36=Date['now']()-_0x49037a;this[_0x23e781(0x1a6)](_0x4875a8,'Failed:\x20'+_0x48a1a8,{'error':_0x3c29dd instanceof Error?_0x3c29dd[_0x23e781(0x1a1)]:String(_0x3c29dd),'duration':_0x25fd36});throw _0x3c29dd;}}[a171_0x23ca2e(0x198)](){const _0x273f62=a171_0x23ca2e;try{if(!a171_0x2b7382[_0x273f62(0x1af)](this[_0x273f62(0x185)]))return[];const _0x46933e=a171_0x2b7382[_0x273f62(0x17f)](this[_0x273f62(0x185)],_0x273f62(0x18e));return _0x46933e[_0x273f62(0x1b2)](/\r?\n/)[_0x273f62(0x18b)](_0x497040=>_0x497040['trim']())[_0x273f62(0x192)](_0x10c457=>JSON[_0x273f62(0x194)](_0x10c457));}catch(_0x351693){return console['warn'](_0x273f62(0x18d),_0x351693),[];}}[a171_0x23ca2e(0x195)](){const _0x4a398b=a171_0x23ca2e;try{a171_0x2b7382[_0x4a398b(0x1af)](this[_0x4a398b(0x185)])&&a171_0x2b7382[_0x4a398b(0x17e)](this[_0x4a398b(0x185)],'',_0x4a398b(0x18e));}catch(_0x50324b){console[_0x4a398b(0x180)](_0x4a398b(0x19a),_0x50324b);}}[a171_0x23ca2e(0x1ac)](){const _0x36786a=a171_0x23ca2e;return this[_0x36786a(0x191)];}}export const logger=new Logger();
1
+ function a171_0x3c7b(){const _0xc15474=['trim','logFileName','Failed\x20to\x20read\x20logs:','now','688695NMMVtX','writeFileSync','Failed:\x20','rawCommand','map','initWinstonLogger','4465764VLxaSb','2455565eNtTgm','1154936fghrOF','52ohnNzJ','toISOString','Failed\x20to\x20clear\x20logs:','level','8986850qOLiwM','success','combine','10NoGdNl','command','Completed:\x20','error','mkdirSync','logTask','winstonLogger','message','info','Starting:\x20','warn','format','File','unknown','existsSync','green','logFilePath','log','details','189009MUFjTF','getWinstonInstance','clear','readLogs','utf8','createLogger','duration','transports','split','dirname','blue','9BSFNDX','63995vdvWSE','currentRawCommand','timestamp','errors','setRawCommand','yellow'];a171_0x3c7b=function(){return _0xc15474;};return a171_0x3c7b();}const a171_0x4fe3eb=a171_0x288c;(function(_0x39a597,_0x73f579){const _0x3fbe0e=a171_0x288c,_0x1d6230=_0x39a597();while(!![]){try{const _0x1da67a=-parseInt(_0x3fbe0e(0xb6))/0x1+parseInt(_0x3fbe0e(0xc6))/0x2*(parseInt(_0x3fbe0e(0xd9))/0x3)+-parseInt(_0x3fbe0e(0xbf))/0x4*(-parseInt(_0x3fbe0e(0xe5))/0x5)+-parseInt(_0x3fbe0e(0xbc))/0x6+parseInt(_0x3fbe0e(0xbd))/0x7+parseInt(_0x3fbe0e(0xbe))/0x8+parseInt(_0x3fbe0e(0xe4))/0x9*(parseInt(_0x3fbe0e(0xc3))/0xa);if(_0x1da67a===_0x73f579)break;else _0x1d6230['push'](_0x1d6230['shift']());}catch(_0x4541fa){_0x1d6230['push'](_0x1d6230['shift']());}}}(a171_0x3c7b,0x6bf94));import a171_0x2cee21 from'winston';import a171_0x499352 from'node:fs';import a171_0x7609b1 from'node:path';function a171_0x288c(_0xb9598f,_0x3622d8){_0xb9598f=_0xb9598f-0xad;const _0x3c7b59=a171_0x3c7b();let _0x288c62=_0x3c7b59[_0xb9598f];return _0x288c62;}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a171_0x4fe3eb(0xcc)];[a171_0x4fe3eb(0xd6)]='';[a171_0x4fe3eb(0xad)]='';constructor(){}[a171_0x4fe3eb(0xb0)](_0x385e56){this['currentRawCommand']=_0x385e56;}['setLogPath'](_0x55dbc6){const _0x15f86a=a171_0x4fe3eb;this[_0x15f86a(0xd6)]=a171_0x7609b1['join'](_0x55dbc6,PRODUCT_CONFIG[_0x15f86a(0xb3)]),this[_0x15f86a(0xcc)]&&this['winstonLogger'][_0x15f86a(0xdb)](),this[_0x15f86a(0xbb)]();}['initWinstonLogger'](){const _0x4bbe8e=a171_0x4fe3eb,_0x2d1b3a=a171_0x7609b1[_0x4bbe8e(0xe2)](this[_0x4bbe8e(0xd6)]);!a171_0x499352['existsSync'](_0x2d1b3a)&&a171_0x499352[_0x4bbe8e(0xca)](_0x2d1b3a,{'recursive':!![]});const _0x319d55=a171_0x2cee21[_0x4bbe8e(0xd1)][_0x4bbe8e(0xc5)](a171_0x2cee21[_0x4bbe8e(0xd1)][_0x4bbe8e(0xae)](),a171_0x2cee21[_0x4bbe8e(0xd1)][_0x4bbe8e(0xaf)]({'stack':!![]}),a171_0x2cee21[_0x4bbe8e(0xd1)]['printf'](_0x5941d3=>{const _0x470a69=_0x4bbe8e,_0x117dcd={'timestamp':_0x5941d3[_0x470a69(0xae)]||new Date()[_0x470a69(0xc0)](),'level':_0x5941d3[_0x470a69(0xc2)]||_0x470a69(0xce),'command':_0x5941d3[_0x470a69(0xc7)]||_0x470a69(0xd3),'rawCommand':_0x5941d3[_0x470a69(0xb9)]||this[_0x470a69(0xad)]||undefined,'message':_0x5941d3[_0x470a69(0xcd)]||'','duration':_0x5941d3[_0x470a69(0xdf)]||undefined,'details':_0x5941d3[_0x470a69(0xd8)]||undefined};return JSON['stringify'](_0x117dcd);}));this['winstonLogger']=a171_0x2cee21[_0x4bbe8e(0xde)]({'level':_0x4bbe8e(0xce),'format':_0x319d55,'transports':[new a171_0x2cee21[(_0x4bbe8e(0xe0))][(_0x4bbe8e(0xd2))]({'filename':this[_0x4bbe8e(0xd6)],'level':_0x4bbe8e(0xce)})],'silent':![]}),a171_0x2cee21['addColors']({'success':_0x4bbe8e(0xd5),'error':'red','warn':_0x4bbe8e(0xb1),'info':_0x4bbe8e(0xe3)});}[a171_0x4fe3eb(0xce)](_0x5b0be1,_0x1cbdbd,_0x68d622){const _0x4b8ca9=a171_0x4fe3eb;if(!this[_0x4b8ca9(0xd6)]||!this[_0x4b8ca9(0xcc)])return;this['winstonLogger'][_0x4b8ca9(0xce)](_0x1cbdbd,{'command':_0x5b0be1,'details':_0x68d622});}[a171_0x4fe3eb(0xc4)](_0x560b6b,_0x415163,_0x144ee1,_0x4aaec7){const _0x465a86=a171_0x4fe3eb;if(!this[_0x465a86(0xd6)]||!this[_0x465a86(0xcc)])return;this[_0x465a86(0xcc)][_0x465a86(0xd7)](_0x465a86(0xce),_0x415163,{'level':_0x465a86(0xc4),'command':_0x560b6b,'duration':_0x144ee1,'details':_0x4aaec7});}[a171_0x4fe3eb(0xc9)](_0x15a755,_0x3f5c4c,_0x3e0b61){const _0x460f5e=a171_0x4fe3eb;if(!this[_0x460f5e(0xd6)]||!this[_0x460f5e(0xcc)])return;this[_0x460f5e(0xcc)][_0x460f5e(0xc9)](_0x3f5c4c,{'command':_0x15a755,'details':_0x3e0b61});}['warn'](_0x83e1a6,_0x346d48,_0x561fb6){const _0x5b5e94=a171_0x4fe3eb;if(!this[_0x5b5e94(0xd6)]||!this['winstonLogger'])return;this[_0x5b5e94(0xcc)][_0x5b5e94(0xd0)](_0x346d48,{'command':_0x83e1a6,'details':_0x561fb6});}async[a171_0x4fe3eb(0xcb)](_0x30d0ef,_0xe68cd1,_0x282c91){const _0x3495d8=a171_0x4fe3eb,_0x40c514=Date[_0x3495d8(0xb5)]();this[_0x3495d8(0xce)](_0x30d0ef,_0x3495d8(0xcf)+_0xe68cd1);try{const _0x4af55b=await _0x282c91(),_0x1fb001=Date['now']()-_0x40c514;return this[_0x3495d8(0xc4)](_0x30d0ef,_0x3495d8(0xc8)+_0xe68cd1,_0x1fb001),_0x4af55b;}catch(_0x5a7b8f){const _0x362a12=Date['now']()-_0x40c514;this['error'](_0x30d0ef,_0x3495d8(0xb8)+_0xe68cd1,{'error':_0x5a7b8f instanceof Error?_0x5a7b8f[_0x3495d8(0xcd)]:String(_0x5a7b8f),'duration':_0x362a12});throw _0x5a7b8f;}}[a171_0x4fe3eb(0xdc)](){const _0x47c27c=a171_0x4fe3eb;try{if(!a171_0x499352[_0x47c27c(0xd4)](this[_0x47c27c(0xd6)]))return[];const _0x3fdfc8=a171_0x499352['readFileSync'](this[_0x47c27c(0xd6)],_0x47c27c(0xdd));return _0x3fdfc8[_0x47c27c(0xe1)](/\r?\n/)['filter'](_0x26c973=>_0x26c973[_0x47c27c(0xb2)]())[_0x47c27c(0xba)](_0x17d59f=>JSON['parse'](_0x17d59f));}catch(_0x11b361){return console[_0x47c27c(0xd0)](_0x47c27c(0xb4),_0x11b361),[];}}['clearLogs'](){const _0xd4de1d=a171_0x4fe3eb;try{a171_0x499352[_0xd4de1d(0xd4)](this[_0xd4de1d(0xd6)])&&a171_0x499352[_0xd4de1d(0xb7)](this[_0xd4de1d(0xd6)],'',_0xd4de1d(0xdd));}catch(_0x3d0609){console['warn'](_0xd4de1d(0xc1),_0x3d0609);}}[a171_0x4fe3eb(0xda)](){return this['winstonLogger'];}}export const logger=new Logger();