@lovrabet/lovrabet-cli 2.3.1 → 2.3.2-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 (183) hide show
  1. package/README.md +10 -8
  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/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/init.d.ts +1 -2
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/kb/index.js +1 -1
  37. package/lib/commands/logs/index.js +1 -1
  38. package/lib/commands/notification/config-list.js +1 -1
  39. package/lib/commands/notification/index.js +1 -1
  40. package/lib/commands/notification/shared.d.ts +0 -3
  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.d.ts +2 -0
  59. package/lib/commands/role/shared.js +1 -1
  60. package/lib/commands/role/update.js +1 -1
  61. package/lib/commands/role/user-add.js +1 -1
  62. package/lib/commands/role/user-remove.js +1 -1
  63. package/lib/commands/schedule/index.js +1 -1
  64. package/lib/commands/schema.js +1 -1
  65. package/lib/commands/service/dynamic.js +1 -1
  66. package/lib/commands/service/function-name-adapter.js +1 -1
  67. package/lib/commands/service/index.js +1 -1
  68. package/lib/commands/service/registry.js +1 -1
  69. package/lib/commands/skill/commands/create.js +1 -1
  70. package/lib/commands/skill/commands/diagram.js +1 -1
  71. package/lib/commands/skill/commands/install.js +1 -1
  72. package/lib/commands/skill/commands/list.js +1 -1
  73. package/lib/commands/skill/commands/push.js +1 -1
  74. package/lib/commands/skill/commands/validate.js +1 -1
  75. package/lib/commands/skill/diagram.js +1 -1
  76. package/lib/commands/skill/flags.js +1 -1
  77. package/lib/commands/skill/index.js +1 -1
  78. package/lib/commands/skill/manifest-helpers.js +1 -1
  79. package/lib/commands/skill/push-execute.js +1 -1
  80. package/lib/commands/skill/push-flow-helpers.js +1 -1
  81. package/lib/commands/skill/push-retarget.js +1 -1
  82. package/lib/commands/skill/scopes.js +1 -1
  83. package/lib/commands/skill/summary.js +1 -1
  84. package/lib/commands/skill/templates.js +1 -1
  85. package/lib/commands/skill/validate.js +1 -1
  86. package/lib/commands/sql/detail.js +1 -1
  87. package/lib/commands/sql/exec.js +1 -1
  88. package/lib/commands/sql/index.js +1 -1
  89. package/lib/commands/update.js +1 -1
  90. package/lib/commands/user-account/bind.js +1 -1
  91. package/lib/commands/user-account/index.js +1 -1
  92. package/lib/commands/workspace/index.js +1 -1
  93. package/lib/config/domain-config.d.ts +6 -14
  94. package/lib/config/domain-config.js +1 -1
  95. package/lib/config/schema.d.ts +1 -1
  96. package/lib/config/schema.js +1 -1
  97. package/lib/constant/app.js +1 -1
  98. package/lib/constant/auth-mode.js +1 -1
  99. package/lib/constant/cli.js +1 -1
  100. package/lib/constant/defaults.js +1 -1
  101. package/lib/constant/distribution.js +1 -1
  102. package/lib/constant/domain.d.ts +0 -3
  103. package/lib/constant/domain.js +1 -1
  104. package/lib/constant/env.js +1 -1
  105. package/lib/constant/output.js +1 -1
  106. package/lib/constant/product.js +1 -1
  107. package/lib/constant/region.js +1 -1
  108. package/lib/constant/risk.js +1 -1
  109. package/lib/constant/url.js +1 -1
  110. package/lib/context.js +1 -1
  111. package/lib/core/api-client.d.ts +5 -10
  112. package/lib/core/api-client.js +1 -1
  113. package/lib/core/db-resolver.js +1 -1
  114. package/lib/core/kb-search-client.js +1 -1
  115. package/lib/core/sdk-client.js +1 -1
  116. package/lib/errors.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.d.ts +1 -5
  136. package/lib/generated/official-routing.js +1 -1
  137. package/lib/generated/routing-contract.d.ts +3 -7
  138. package/lib/generated/routing-contract.js +1 -1
  139. package/lib/help.js +1 -1
  140. package/lib/postinstall.js +1 -1
  141. package/lib/runtime/confirmation.js +1 -1
  142. package/lib/runtime/event.js +1 -1
  143. package/lib/runtime/index.js +1 -1
  144. package/lib/runtime/queue.js +1 -1
  145. package/lib/runtime/resolve.js +1 -1
  146. package/lib/skills/builtin-skill.js +1 -1
  147. package/lib/skills/npx-skills-add.js +1 -1
  148. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  149. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  150. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  151. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  152. package/lib/skills/runtime-skill-sync/links.js +1 -1
  153. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  154. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  155. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  156. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  157. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  158. package/lib/skills/runtime-skill-sync/push.js +1 -1
  159. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  160. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  161. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  162. package/lib/skills/runtime-skill-sync.js +1 -1
  163. package/lib/skills/skill-presence.js +1 -1
  164. package/lib/utils/access-key-redaction.js +1 -1
  165. package/lib/utils/apply-jq-filter.js +1 -1
  166. package/lib/utils/cli-version-check.js +1 -1
  167. package/lib/utils/cli-version-policy.js +1 -1
  168. package/lib/utils/logger.js +1 -1
  169. package/lib/utils/lossless-json.js +1 -1
  170. package/lib/utils/params.js +1 -1
  171. package/lib/utils/platform.js +1 -1
  172. package/lib/utils/update-notice.js +1 -1
  173. package/lib/utils/version.js +1 -1
  174. package/lib/utils/write-cli-side-channel.js +1 -1
  175. package/package.json +1 -1
  176. package/skills/lovrabet/SKILL.md +4 -4
  177. package/skills/lovrabet/guides/role-and-permission-workflow.md +6 -4
  178. package/skills/lovrabet/references/lovrabet-config-commands.md +7 -11
  179. package/skills/lovrabet/references/lovrabet-config.md +2 -3
  180. package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
  181. package/skills/lovrabet/references/lovrabet-kb-workflow.md +1 -1
  182. package/skills/lovrabet/references/lovrabet-notification-config-list.md +2 -8
  183. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x1d984f,_0x517a60){const _0x1ff5c9=a143_0xae92,_0x4fa4a0=_0x1d984f();while(!![]){try{const _0x4dedf5=-parseInt(_0x1ff5c9(0x114))/0x1+-parseInt(_0x1ff5c9(0x125))/0x2*(-parseInt(_0x1ff5c9(0x138))/0x3)+parseInt(_0x1ff5c9(0x13d))/0x4+-parseInt(_0x1ff5c9(0x119))/0x5*(parseInt(_0x1ff5c9(0x129))/0x6)+parseInt(_0x1ff5c9(0x112))/0x7+-parseInt(_0x1ff5c9(0x135))/0x8+-parseInt(_0x1ff5c9(0x11b))/0x9*(-parseInt(_0x1ff5c9(0x134))/0xa);if(_0x4dedf5===_0x517a60)break;else _0x4fa4a0['push'](_0x4fa4a0['shift']());}catch(_0xc02406){_0x4fa4a0['push'](_0x4fa4a0['shift']());}}}(a143_0x5351,0x39ca7));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(_0xcf43b){const _0x347df5=a143_0xae92;return _0xcf43b['bytes']??Buffer[_0x347df5(0x12e)](_0xcf43b[_0x347df5(0x136)]??'',_0x347df5(0x11e));}export function fileText(_0x35e390){return fileContent(_0x35e390)['toString']('utf8');}export function normalizeLocalFiles(_0x4442a2){const _0x5d9246=a143_0xae92;if(!Array[_0x5d9246(0x115)](_0x4442a2)||_0x4442a2[_0x5d9246(0x127)]===0x0)return[];const _0x1dcd34=new Map();for(const _0x58af7c of _0x4442a2){if(!_0x58af7c||typeof _0x58af7c!==_0x5d9246(0x13c)||typeof _0x58af7c[_0x5d9246(0x124)]!==_0x5d9246(0x11a))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5357a4=normalizeSkillRelativePath(_0x58af7c[_0x5d9246(0x124)]);if(_0x1dcd34[_0x5d9246(0x126)](_0x5357a4))throw CliErrors[_0x5d9246(0x131)](_0x5d9246(0x13a)+_0x5357a4);if(_0x58af7c[_0x5d9246(0x13b)]!==undefined&&!Buffer[_0x5d9246(0x12d)](_0x58af7c[_0x5d9246(0x13b)]))throw CliErrors[_0x5d9246(0x131)](_0x5d9246(0x10e)+_0x5357a4);if(_0x58af7c[_0x5d9246(0x13b)]===undefined&&typeof _0x58af7c[_0x5d9246(0x136)]!==_0x5d9246(0x11a))throw CliErrors['validation'](_0x5d9246(0x128)+_0x5357a4);const _0x6acf51=fileContent(_0x58af7c);_0x1dcd34[_0x5d9246(0x122)](_0x5357a4,{'path':_0x5357a4,'bytes':_0x6acf51});}return Array[_0x5d9246(0x12e)](_0x1dcd34[_0x5d9246(0x12f)]())[_0x5d9246(0x117)](compareSkillFiles);}export function normalizeManifestFiles(_0xc891cf){const _0x14e16c=a143_0xae92;if(!Array[_0x14e16c(0x115)](_0xc891cf)||_0xc891cf[_0x14e16c(0x127)]===0x0)return[];const _0x3ea873=new Map();for(const _0x302d56 of _0xc891cf){if(!_0x302d56||typeof _0x302d56!=='object'||typeof _0x302d56[_0x14e16c(0x124)]!==_0x14e16c(0x11a))throw CliErrors[_0x14e16c(0x131)](_0x14e16c(0x111));const _0x4c0365=normalizeSkillRelativePath(_0x302d56[_0x14e16c(0x124)]);if(_0x3ea873[_0x14e16c(0x126)](_0x4c0365))throw CliErrors[_0x14e16c(0x131)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x4c0365);if(!isSha256Hex(_0x302d56[_0x14e16c(0x13f)]))throw CliErrors['validation'](_0x14e16c(0x130)+_0x4c0365);if(!Number[_0x14e16c(0x139)](_0x302d56[_0x14e16c(0x12a)])||_0x302d56[_0x14e16c(0x12a)]<0x0)throw CliErrors[_0x14e16c(0x131)](_0x14e16c(0x116)+_0x4c0365);_0x3ea873[_0x14e16c(0x122)](_0x4c0365,{'path':_0x4c0365,'sha256':_0x302d56[_0x14e16c(0x13f)][_0x14e16c(0x113)](),'size':_0x302d56[_0x14e16c(0x12a)]});}return Array[_0x14e16c(0x12e)](_0x3ea873[_0x14e16c(0x12f)]())[_0x14e16c(0x117)](compareSkillFiles);}function a143_0x5351(){const _0x3e0155=['Skill\x20file\x20path\x20must\x20be\x20text.','197631DqYivE','toLowerCase','149387wbvyTx','isArray','Skill\x20file\x20size\x20is\x20invalid:\x20','sort','isDirectory','776985Xkvwpx','string','289557nNkeJB','test','includes','utf8','Unsafe\x20Skill\x20file\x20path:\x20','name','add','set','split','path','115468skLcNm','has','length','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','18pYMyKd','size','startsWith','trim','isBuffer','from','values','Skill\x20file\x20sha256\x20is\x20invalid:\x20','validation','compare','localeCompare','110fFjuVo','2152088tzzKWj','content','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','15xNMABi','isSafeInteger','Duplicate\x20Skill\x20file\x20path:\x20','bytes','object','1801976FKhvLj','isFile','sha256','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','push','excludedFilePaths'];a143_0x5351=function(){return _0x3e0155;};return a143_0x5351();}export function scanSkillDirectory(_0x364d2a,_0x397d1d={}){const _0x597992=a143_0xae92,_0x4b1e98=realpathSync(_0x364d2a),_0x594f1a=canonicalExcludedFilePaths(_0x397d1d[_0x597992(0x110)]),_0x3cb2ae=[];function _0x27084f(_0x342e8d){const _0x260485=_0x597992,_0x35e494=readdirSync(_0x342e8d,{'withFileTypes':!![]})[_0x260485(0x117)]((_0x50ab83,_0x47ded2)=>_0x50ab83[_0x260485(0x120)][_0x260485(0x133)](_0x47ded2[_0x260485(0x120)]));for(const _0x36093c of _0x35e494){if(_0x36093c[_0x260485(0x118)]()&&IGNORED_DIR_NAMES[_0x260485(0x126)](_0x36093c['name']))continue;if(IGNORED_FILE_NAMES[_0x260485(0x126)](_0x36093c[_0x260485(0x120)]))continue;const _0x5c538a=resolve(_0x342e8d,_0x36093c[_0x260485(0x120)]);if(isExcludedFilePath(_0x5c538a,_0x594f1a))continue;if(_0x36093c['isSymbolicLink']())throw CliErrors[_0x260485(0x131)](_0x260485(0x137)+_0x5c538a);const _0x365770=toPosixPath(relative(_0x4b1e98,_0x5c538a));if(_0x36093c['isDirectory']()){_0x27084f(_0x5c538a);continue;}if(!_0x36093c[_0x260485(0x13e)]())continue;validateSkillRelativePath(_0x365770);const _0xbcaa77=readFileSync(_0x5c538a);_0x3cb2ae[_0x260485(0x10f)]({'path':_0x365770,'bytes':_0xbcaa77});}}return _0x27084f(_0x4b1e98),normalizeLocalFiles(_0x3cb2ae);}function canonicalExcludedFilePaths(_0x2fb997){const _0xdf9d71=a143_0xae92,_0x3f4062=new Set();for(const _0x794d4c of _0x2fb997??[]){const _0x1ac45e=resolve(_0x794d4c);_0x3f4062[_0xdf9d71(0x121)](_0x1ac45e);try{_0x3f4062[_0xdf9d71(0x121)](realpathSync(_0x1ac45e));}catch{}}return _0x3f4062;}function isExcludedFilePath(_0x3edd13,_0x4410e0){const _0x24fd3a=a143_0xae92;if(_0x4410e0[_0x24fd3a(0x126)](_0x3edd13))return!![];if(_0x4410e0[_0x24fd3a(0x12a)]===0x0)return![];try{return _0x4410e0['has'](realpathSync(_0x3edd13));}catch{return![];}}export function compareSkillFiles(_0x1d26a2,_0x3b0a1b){const _0x3d4996=a143_0xae92;if(_0x1d26a2[_0x3d4996(0x124)]===SKILL_FILE)return _0x3b0a1b[_0x3d4996(0x124)]===SKILL_FILE?0x0:-0x1;if(_0x3b0a1b[_0x3d4996(0x124)]===SKILL_FILE)return 0x1;return Buffer[_0x3d4996(0x132)](Buffer[_0x3d4996(0x12e)](_0x1d26a2[_0x3d4996(0x124)],_0x3d4996(0x11e)),Buffer[_0x3d4996(0x12e)](_0x3b0a1b[_0x3d4996(0x124)],_0x3d4996(0x11e)));}export function normalizeSkillRelativePath(_0x3292cd){const _0x501533=a143_0xae92,_0x5aed15=toPosixPath(_0x3292cd[_0x501533(0x12c)]());return validateSkillRelativePath(_0x5aed15),_0x5aed15;}export function validateSkillRelativePath(_0x8cb3ea){const _0x4ca5de=a143_0xae92;if(!_0x8cb3ea||_0x8cb3ea[_0x4ca5de(0x12b)]('/')||_0x8cb3ea[_0x4ca5de(0x11d)]('//'))throw CliErrors[_0x4ca5de(0x131)](_0x4ca5de(0x11f)+_0x8cb3ea);for(const _0xd73203 of _0x8cb3ea[_0x4ca5de(0x123)]('/')){if(!_0xd73203||_0xd73203==='.'||_0xd73203==='..')throw CliErrors[_0x4ca5de(0x131)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x8cb3ea);}}export function toPosixPath(_0x4faca6){return _0x4faca6['replace'](/\\/g,'/');}function a143_0xae92(_0x373cbc,_0x2c6b57){_0x373cbc=_0x373cbc-0x10e;const _0x535186=a143_0x5351();let _0xae928b=_0x535186[_0x373cbc];return _0xae928b;}export function isSha256Hex(_0x30ff66){const _0xbc078b=a143_0xae92;return typeof _0x30ff66===_0xbc078b(0x11a)&&/^[a-fA-F0-9]{64}$/[_0xbc078b(0x11c)](_0x30ff66);}
1
+ (function(_0x109b59,_0x45ac89){const _0x9e3d2a=a143_0x357d,_0x44b039=_0x109b59();while(!![]){try{const _0x4ac55f=parseInt(_0x9e3d2a(0xb1))/0x1+-parseInt(_0x9e3d2a(0xaa))/0x2+-parseInt(_0x9e3d2a(0xaf))/0x3+-parseInt(_0x9e3d2a(0x9c))/0x4*(-parseInt(_0x9e3d2a(0xad))/0x5)+parseInt(_0x9e3d2a(0x8e))/0x6+parseInt(_0x9e3d2a(0xa9))/0x7*(-parseInt(_0x9e3d2a(0x9b))/0x8)+parseInt(_0x9e3d2a(0x94))/0x9*(parseInt(_0x9e3d2a(0x9e))/0xa);if(_0x4ac55f===_0x45ac89)break;else _0x44b039['push'](_0x44b039['shift']());}catch(_0x4cf605){_0x44b039['push'](_0x44b039['shift']());}}}(a143_0x36d6,0x5b8fa));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(_0x134a12){const _0x240111=a143_0x357d;return _0x134a12[_0x240111(0xa5)]??Buffer[_0x240111(0xb6)](_0x134a12[_0x240111(0x95)]??'','utf8');}function a143_0x357d(_0x4c5be7,_0x459f4b){_0x4c5be7=_0x4c5be7-0x8e;const _0x36d69e=a143_0x36d6();let _0x357d13=_0x36d69e[_0x4c5be7];return _0x357d13;}export function fileText(_0x1f202f){const _0x8ca962=a143_0x357d;return fileContent(_0x1f202f)['toString'](_0x8ca962(0xb4));}export function normalizeLocalFiles(_0x49f626){const _0x1b6b94=a143_0x357d;if(!Array['isArray'](_0x49f626)||_0x49f626[_0x1b6b94(0x9f)]===0x0)return[];const _0xe3556c=new Map();for(const _0x458420 of _0x49f626){if(!_0x458420||typeof _0x458420!==_0x1b6b94(0x90)||typeof _0x458420[_0x1b6b94(0xb3)]!==_0x1b6b94(0xa2))throw CliErrors[_0x1b6b94(0xac)](_0x1b6b94(0x96));const _0x180a1d=normalizeSkillRelativePath(_0x458420[_0x1b6b94(0xb3)]);if(_0xe3556c[_0x1b6b94(0xba)](_0x180a1d))throw CliErrors['validation'](_0x1b6b94(0xb7)+_0x180a1d);if(_0x458420[_0x1b6b94(0xa5)]!==undefined&&!Buffer[_0x1b6b94(0xb2)](_0x458420[_0x1b6b94(0xa5)]))throw CliErrors['validation'](_0x1b6b94(0x8f)+_0x180a1d);if(_0x458420[_0x1b6b94(0xa5)]===undefined&&typeof _0x458420['content']!==_0x1b6b94(0xa2))throw CliErrors[_0x1b6b94(0xac)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x180a1d);const _0x2a806b=fileContent(_0x458420);_0xe3556c[_0x1b6b94(0xb5)](_0x180a1d,{'path':_0x180a1d,'bytes':_0x2a806b});}return Array[_0x1b6b94(0xb6)](_0xe3556c[_0x1b6b94(0xa1)]())[_0x1b6b94(0xb8)](compareSkillFiles);}export function normalizeManifestFiles(_0x44eeb4){const _0x1ea441=a143_0x357d;if(!Array[_0x1ea441(0xa0)](_0x44eeb4)||_0x44eeb4[_0x1ea441(0x9f)]===0x0)return[];const _0xb73ebd=new Map();for(const _0x11aa56 of _0x44eeb4){if(!_0x11aa56||typeof _0x11aa56!==_0x1ea441(0x90)||typeof _0x11aa56[_0x1ea441(0xb3)]!==_0x1ea441(0xa2))throw CliErrors[_0x1ea441(0xac)](_0x1ea441(0x96));const _0x8ae8d9=normalizeSkillRelativePath(_0x11aa56[_0x1ea441(0xb3)]);if(_0xb73ebd[_0x1ea441(0xba)](_0x8ae8d9))throw CliErrors[_0x1ea441(0xac)](_0x1ea441(0xb7)+_0x8ae8d9);if(!isSha256Hex(_0x11aa56[_0x1ea441(0xa4)]))throw CliErrors['validation']('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x8ae8d9);if(!Number[_0x1ea441(0xa8)](_0x11aa56[_0x1ea441(0xb0)])||_0x11aa56[_0x1ea441(0xb0)]<0x0)throw CliErrors[_0x1ea441(0xac)](_0x1ea441(0x9d)+_0x8ae8d9);_0xb73ebd[_0x1ea441(0xb5)](_0x8ae8d9,{'path':_0x8ae8d9,'sha256':_0x11aa56[_0x1ea441(0xa4)][_0x1ea441(0x9a)](),'size':_0x11aa56[_0x1ea441(0xb0)]});}return Array[_0x1ea441(0xb6)](_0xb73ebd['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x187813,_0x19796f={}){const _0xb34ba4=a143_0x357d,_0x123531=realpathSync(_0x187813),_0x51c296=canonicalExcludedFilePaths(_0x19796f[_0xb34ba4(0x91)]),_0x4d99a8=[];function _0x2e517d(_0x4d9fee){const _0x204ebd=_0xb34ba4,_0x2e42f2=readdirSync(_0x4d9fee,{'withFileTypes':!![]})[_0x204ebd(0xb8)]((_0x19ae88,_0x16b752)=>_0x19ae88[_0x204ebd(0xab)]['localeCompare'](_0x16b752[_0x204ebd(0xab)]));for(const _0x1dd2f1 of _0x2e42f2){if(_0x1dd2f1[_0x204ebd(0x97)]()&&IGNORED_DIR_NAMES[_0x204ebd(0xba)](_0x1dd2f1[_0x204ebd(0xab)]))continue;if(IGNORED_FILE_NAMES['has'](_0x1dd2f1[_0x204ebd(0xab)]))continue;const _0x65bc29=resolve(_0x4d9fee,_0x1dd2f1[_0x204ebd(0xab)]);if(isExcludedFilePath(_0x65bc29,_0x51c296))continue;if(_0x1dd2f1[_0x204ebd(0x92)]())throw CliErrors[_0x204ebd(0xac)](_0x204ebd(0xbd)+_0x65bc29);const _0x305dac=toPosixPath(relative(_0x123531,_0x65bc29));if(_0x1dd2f1[_0x204ebd(0x97)]()){_0x2e517d(_0x65bc29);continue;}if(!_0x1dd2f1['isFile']())continue;validateSkillRelativePath(_0x305dac);const _0xf853a3=readFileSync(_0x65bc29);_0x4d99a8[_0x204ebd(0x93)]({'path':_0x305dac,'bytes':_0xf853a3});}}return _0x2e517d(_0x123531),normalizeLocalFiles(_0x4d99a8);}function canonicalExcludedFilePaths(_0x1f7951){const _0x58c12a=a143_0x357d,_0x5328e1=new Set();for(const _0x377de4 of _0x1f7951??[]){const _0x4b2d09=resolve(_0x377de4);_0x5328e1[_0x58c12a(0xae)](_0x4b2d09);try{_0x5328e1[_0x58c12a(0xae)](realpathSync(_0x4b2d09));}catch{}}return _0x5328e1;}function a143_0x36d6(){const _0x155ba6=['sort','Unsafe\x20Skill\x20file\x20path:\x20','has','trim','test','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','2402736DRqavn','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','object','excludedFilePaths','isSymbolicLink','push','18mqwVuE','content','Skill\x20file\x20path\x20must\x20be\x20text.','isDirectory','replace','split','toLowerCase','5617016KKwpyN','4FsPcma','Skill\x20file\x20size\x20is\x20invalid:\x20','6871050YhmOiR','length','isArray','values','string','includes','sha256','bytes','compare','startsWith','isSafeInteger','7hLKQMA','1390370uvUiXV','name','validation','1052820EFIqbf','add','1644039apEMGj','size','335129TxzWTE','isBuffer','path','utf8','set','from','Duplicate\x20Skill\x20file\x20path:\x20'];a143_0x36d6=function(){return _0x155ba6;};return a143_0x36d6();}function isExcludedFilePath(_0x269464,_0x2b0cb9){const _0x213e2a=a143_0x357d;if(_0x2b0cb9[_0x213e2a(0xba)](_0x269464))return!![];if(_0x2b0cb9[_0x213e2a(0xb0)]===0x0)return![];try{return _0x2b0cb9[_0x213e2a(0xba)](realpathSync(_0x269464));}catch{return![];}}export function compareSkillFiles(_0x59d320,_0xb1e0fe){const _0xfa47ed=a143_0x357d;if(_0x59d320[_0xfa47ed(0xb3)]===SKILL_FILE)return _0xb1e0fe[_0xfa47ed(0xb3)]===SKILL_FILE?0x0:-0x1;if(_0xb1e0fe['path']===SKILL_FILE)return 0x1;return Buffer[_0xfa47ed(0xa6)](Buffer['from'](_0x59d320[_0xfa47ed(0xb3)],_0xfa47ed(0xb4)),Buffer[_0xfa47ed(0xb6)](_0xb1e0fe[_0xfa47ed(0xb3)],_0xfa47ed(0xb4)));}export function normalizeSkillRelativePath(_0x34e8b5){const _0xf96bb6=a143_0x357d,_0x1e003d=toPosixPath(_0x34e8b5[_0xf96bb6(0xbb)]());return validateSkillRelativePath(_0x1e003d),_0x1e003d;}export function validateSkillRelativePath(_0x4358d1){const _0x136f69=a143_0x357d;if(!_0x4358d1||_0x4358d1[_0x136f69(0xa7)]('/')||_0x4358d1[_0x136f69(0xa3)]('//'))throw CliErrors[_0x136f69(0xac)](_0x136f69(0xb9)+_0x4358d1);for(const _0x26b0c4 of _0x4358d1[_0x136f69(0x99)]('/')){if(!_0x26b0c4||_0x26b0c4==='.'||_0x26b0c4==='..')throw CliErrors[_0x136f69(0xac)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x4358d1);}}export function toPosixPath(_0x131238){const _0x195817=a143_0x357d;return _0x131238[_0x195817(0x98)](/\\/g,'/');}export function isSha256Hex(_0x2fa398){const _0x59cb5f=a143_0x357d;return typeof _0x2fa398===_0x59cb5f(0xa2)&&/^[a-fA-F0-9]{64}$/[_0x59cb5f(0xbc)](_0x2fa398);}
@@ -1 +1 @@
1
- (function(_0x4c43f0,_0x12ac2c){const _0x8daaeb=a144_0x2c2d,_0xa6e7ec=_0x4c43f0();while(!![]){try{const _0x1b9b8c=parseInt(_0x8daaeb(0x13e))/0x1*(-parseInt(_0x8daaeb(0x150))/0x2)+-parseInt(_0x8daaeb(0x149))/0x3+-parseInt(_0x8daaeb(0x14a))/0x4+parseInt(_0x8daaeb(0x151))/0x5*(-parseInt(_0x8daaeb(0x13a))/0x6)+parseInt(_0x8daaeb(0x122))/0x7*(parseInt(_0x8daaeb(0x125))/0x8)+parseInt(_0x8daaeb(0x126))/0x9*(-parseInt(_0x8daaeb(0x136))/0xa)+parseInt(_0x8daaeb(0x134))/0xb;if(_0x1b9b8c===_0x12ac2c)break;else _0xa6e7ec['push'](_0xa6e7ec['shift']());}catch(_0x3c454e){_0xa6e7ec['push'](_0xa6e7ec['shift']());}}}(a144_0x5a2c,0x63747));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(_0x4bebf6,_0x4a3ed3,_0x2aee2a){const _0x5ad10d=a144_0x2c2d,_0x1063c6=requireSkillCode(_0x4bebf6),_0x27294b=requirePackageBytes(_0x1063c6,_0x2aee2a[_0x5ad10d(0x14d)]),_0x426f6c=extractDownloadedPackage(_0x27294b),_0x5adb52=_0x426f6c[_0x5ad10d(0x14f)](_0x218f24=>_0x218f24[_0x5ad10d(0x144)]===SKILL_FILE);if(!_0x5adb52)throw CliErrors[_0x5ad10d(0x138)](_0x5ad10d(0x124)+SKILL_FILE+':\x20'+_0x1063c6);const _0x493139=withMaterializedSkillFrontmatter(_0x426f6c,_0x4bebf6,_0x1063c6),_0xaae761=_0x493139['find'](_0x1381b0=>_0x1381b0[_0x5ad10d(0x144)]===SKILL_FILE),_0x56ca41=fileText(_0xaae761),_0x25b17f=getRuntimeSkillDir(_0x2aee2a[_0x5ad10d(0x129)],_0x2aee2a[_0x5ad10d(0x118)],_0x2aee2a[_0x5ad10d(0x11d)],_0x4a3ed3,_0x1063c6,_0x2aee2a[_0x5ad10d(0x11b)]),_0x2f80ec=resolve(_0x25b17f,SKILL_FILE),_0x179162=resolve(_0x25b17f,METADATA_FILE),_0x1c1c7b=contentHash(_0x56ca41),_0x5e95be=readMetadataIfPresent(_0x179162)?.[_0x5ad10d(0x12c)];ensurePulledFilesCanBeOverwritten(_0x25b17f,_0x179162,_0x493139,_0x2aee2a[_0x5ad10d(0x133)]===!![]),mkdirSync(_0x25b17f,{'recursive':!![],'mode':0x1c0});const _0x26cc42=existsSync(_0x2f80ec)?readFileSync(_0x2f80ec,_0x5ad10d(0x12e)):undefined;return materializeFiles(_0x25b17f,_0x493139),removeStaleManagedFiles(_0x25b17f,_0x5e95be,_0x493139),writeJsonAtomic(_0x179162,buildMetadata(_0x4bebf6,_0x4a3ed3,_0x2aee2a[_0x5ad10d(0x11d)],_0x1c1c7b,_0x2aee2a['pulledAt'],_0x493139,_0x27294b)),{'skill':_0x4bebf6,'scope':_0x4a3ed3,'dir':_0x25b17f,'skillMdPath':_0x2f80ec,'metadataPath':_0x179162,'contentHash':_0x1c1c7b,'changed':_0x26cc42!==_0x56ca41};}export function reuseMaterializedRuntimeSkill(_0x277d6d,_0x4eb49c,_0x1427ac){const _0x5ee0bc=a144_0x2c2d,_0x3867ad=_0x277d6d[_0x5ee0bc(0x137)]?.[_0x5ee0bc(0x115)]();if(!_0x3867ad)return undefined;const _0x4558fb=requireSkillCode(_0x277d6d),_0xb1e7df=getRuntimeSkillDir(_0x1427ac['env'],_0x1427ac[_0x5ee0bc(0x118)],_0x1427ac[_0x5ee0bc(0x11d)],_0x4eb49c,_0x4558fb,_0x1427ac['paths']),_0x2799b5=resolve(_0xb1e7df,SKILL_FILE),_0x5aca82=resolve(_0xb1e7df,METADATA_FILE),_0x12a785=readMetadataIfPresent(_0x5aca82);if(!_0x12a785||_0x12a785[_0x5ee0bc(0x143)]!==0x2||_0x12a785['appCode']!==_0x1427ac[_0x5ee0bc(0x11d)]||_0x12a785[_0x5ee0bc(0x13f)]!==_0x4eb49c||_0x12a785[_0x5ee0bc(0x11e)]!==_0x4558fb||_0x12a785[_0x5ee0bc(0x137)]!==_0x3867ad||_0x12a785['id']!==_0x277d6d['id']||_0x12a785[_0x5ee0bc(0x142)]!==_0x277d6d[_0x5ee0bc(0x142)]||_0x12a785['description']!==_0x277d6d[_0x5ee0bc(0x147)]||_0x12a785[_0x5ee0bc(0x121)]!==_0x277d6d[_0x5ee0bc(0x121)]||_0x12a785['status']!==_0x277d6d[_0x5ee0bc(0x11a)]||!_0x12a785[_0x5ee0bc(0x131)]||!_0x12a785['fileHashes']||!Object[_0x5ee0bc(0x12b)](_0x12a785['fileHashes'],SKILL_FILE))return undefined;for(const [_0x8ca30a,_0x262e3e]of Object[_0x5ee0bc(0x128)](_0x12a785[_0x5ee0bc(0x12c)])){if(!/^[a-f0-9]{64}$/['test'](_0x262e3e))return undefined;const _0x2d9425=resolveManagedFilePath(_0xb1e7df,_0x8ca30a);if(!existsSync(_0x2d9425)||!lstatSync(_0x2d9425)[_0x5ee0bc(0x11f)]())return undefined;if(bufferSha256(readFileSync(_0x2d9425))!==_0x262e3e)return undefined;}return{'skill':_0x277d6d,'scope':_0x4eb49c,'dir':_0xb1e7df,'skillMdPath':_0x2799b5,'metadataPath':_0x5aca82,'contentHash':_0x12a785[_0x5ee0bc(0x131)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x235e52,_0x62a721,_0x2e28c4){const _0x282203=a144_0x2c2d,_0x541940=skillDisplayName(_0x62a721,_0x2e28c4),_0xb06b6a=_0x62a721[_0x282203(0x147)]?.[_0x282203(0x115)]()||_0x541940||_0x2e28c4;return normalizeLocalFiles(_0x235e52)[_0x282203(0x13b)](_0x457268=>{const _0x58f061=_0x282203,_0x2b4dc2=fileText(_0x457268);if(_0x457268[_0x58f061(0x144)]!==SKILL_FILE)return _0x457268;if(hasYamlFrontmatter(_0x2b4dc2))return{'path':_0x457268[_0x58f061(0x144)],'content':withSyncedDisplayName(_0x2b4dc2,_0x541940)};return{'path':_0x457268['path'],'content':prependSkillFrontmatter(_0x2b4dc2,{'name':_0x2e28c4,'displayName':_0x541940,'description':_0xb06b6a})};});}function a144_0x2c2d(_0x102f33,_0x482157){_0x102f33=_0x102f33-0x115;const _0x5a2ce9=a144_0x5a2c();let _0x2c2d8d=_0x5a2ce9[_0x102f33];return _0x2c2d8d;}function hasYamlFrontmatter(_0xf0541f){const _0x34ebf0=a144_0x2c2d;return/^\uFEFF?---\s*\r?\n/[_0x34ebf0(0x14c)](_0xf0541f);}function prependSkillFrontmatter(_0x5aae5b,_0x366a06){const _0x402b0d=a144_0x2c2d,_0x4ef1c3=_0x5aae5b[_0x402b0d(0x141)](/^\uFEFF/,'');return[_0x402b0d(0x130),_0x402b0d(0x13c)+yamlString(_0x366a06[_0x402b0d(0x12f)]),_0x366a06[_0x402b0d(0x12d)]?'displayName:\x20'+yamlString(_0x366a06[_0x402b0d(0x12d)]):undefined,_0x402b0d(0x148)+yamlString(_0x366a06['description']),_0x402b0d(0x130),'',_0x4ef1c3][_0x402b0d(0x14e)](_0x5b30c2=>_0x5b30c2!==undefined)['join']('\x0a');}function a144_0x5a2c(){const _0xe67ae4=['1119321VctGLH','1340920XqGMcf','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','test','packageBytes','filter','find','620714wOyAkZ','48755rVGLXO','trim','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','errors','accessKey','slice','status','paths','match','appCode','skillCode','isFile','Managed\x20file\x20was\x20removed\x20locally:\x20','example','204253TQKBDG','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','128MoriDv','27qSXyFJ','flow','entries','env','set','hasOwn','fileHashes','displayName','utf8','name','---','contentHash','---\x0a','force','23161325asKElT','keys','2553630jLqirt','version','validation','stringify','234OVMdcZ','map','name:\x20','toString','1KJpOKa','scope','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','replace','skillName','schemaVersion','path','\x0a---\x0a\x0a','length','description','description:\x20'];a144_0x5a2c=function(){return _0xe67ae4;};return a144_0x5a2c();}function yamlString(_0x37e2a4){const _0x50918f=a144_0x2c2d;return JSON[_0x50918f(0x139)](_0x37e2a4[_0x50918f(0x141)](/\r/g,'')[_0x50918f(0x115)]());}function skillDisplayName(_0x2ff49e,_0x59e91b){const _0x34d7d2=a144_0x2c2d,_0x45ec62=_0x2ff49e['skillName']?.[_0x34d7d2(0x115)]();return _0x45ec62||_0x59e91b;}function withSyncedDisplayName(_0x1db2c9,_0x4223a8){const _0x5db6c2=a144_0x2c2d,_0x54e128=_0x1db2c9[_0x5db6c2(0x11c)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x54e128)return _0x1db2c9;const _0x29b739=_0x54e128[0x1]??'',_0x3bbfaa=_0x54e128[0x2]??'',_0x2ee480=parseDocument(_0x3bbfaa);if(_0x2ee480[_0x5db6c2(0x117)][_0x5db6c2(0x146)]>0x0||!isMap(_0x2ee480['contents']))return _0x1db2c9;if(_0x4223a8)_0x2ee480[_0x5db6c2(0x12a)](_0x5db6c2(0x12d),_0x4223a8);else{if(_0x2ee480['has'](_0x5db6c2(0x12d)))_0x2ee480['delete'](_0x5db6c2(0x12d));else return _0x1db2c9;}forceBlockCollections(_0x2ee480['contents']);const _0xad974=_0x2ee480[_0x5db6c2(0x13d)]({'lineWidth':0x0})['trimEnd'](),_0x12125b=_0x1db2c9[_0x5db6c2(0x119)](_0x54e128[0x0][_0x5db6c2(0x146)])[_0x5db6c2(0x141)](/^\r?\n/,'');return _0x29b739+_0x5db6c2(0x132)+_0xad974+_0x5db6c2(0x145)+_0x12125b;}function forceBlockCollections(_0x422b6f){if(!isNode(_0x422b6f))return;visit(_0x422b6f,(_0x229dc9,_0x3ed4c0)=>{const _0x4f454a=a144_0x2c2d;isCollection(_0x3ed4c0)&&(_0x3ed4c0[_0x4f454a(0x127)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x4ad514,_0x524177,_0x5d4559,_0x3241d8){const _0x54e7e7=a144_0x2c2d;if(_0x3241d8||!existsSync(_0x524177))return;const _0x4f2bfd=readMetadataIfPresent(_0x524177);if(!_0x4f2bfd)return;const _0x11be9d=_0x4f2bfd[_0x54e7e7(0x12c)]&&Object[_0x54e7e7(0x135)](_0x4f2bfd['fileHashes'])['length']>0x0?_0x4f2bfd[_0x54e7e7(0x12c)]:undefined;if(_0x11be9d)for(const [_0x23f0a4,_0x280ab5]of Object['entries'](_0x11be9d)){const _0x222437=resolveManagedFilePath(_0x4ad514,_0x23f0a4);if(!existsSync(_0x222437))throw CliErrors[_0x54e7e7(0x138)](_0x54e7e7(0x116)+_0x4ad514,_0x54e7e7(0x120)+_0x23f0a4);const _0x7442ee=lstatSync(_0x222437);if(!_0x7442ee[_0x54e7e7(0x11f)]())throw CliErrors[_0x54e7e7(0x138)](_0x54e7e7(0x116)+_0x4ad514,_0x54e7e7(0x123)+_0x23f0a4);const _0x475b02=bufferSha256(readFileSync(_0x222437));if(_0x475b02!==_0x280ab5)throw CliErrors[_0x54e7e7(0x138)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x4ad514+'.\x20Changed\x20file:\x20'+_0x23f0a4,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x23f0a4);}else{const _0x17831a=resolve(_0x4ad514,SKILL_FILE);if(existsSync(_0x17831a)&&_0x4f2bfd[_0x54e7e7(0x131)]){const _0x521910=contentHash(readFileSync(_0x17831a,_0x54e7e7(0x12e)));if(_0x521910!==_0x4f2bfd[_0x54e7e7(0x131)])throw CliErrors[_0x54e7e7(0x138)](_0x54e7e7(0x14b)+_0x17831a,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x18f6e6 of normalizeLocalFiles(_0x5d4559)){if(_0x11be9d?.[_0x18f6e6[_0x54e7e7(0x144)]])continue;if(!_0x11be9d&&_0x18f6e6[_0x54e7e7(0x144)]===SKILL_FILE)continue;const _0x471b49=resolveManagedFilePath(_0x4ad514,_0x18f6e6[_0x54e7e7(0x144)]);if(!existsSync(_0x471b49))continue;const _0x47519a=lstatSync(_0x471b49);if(!_0x47519a[_0x54e7e7(0x11f)]())throw CliErrors[_0x54e7e7(0x138)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x4ad514,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x18f6e6[_0x54e7e7(0x144)]);const _0xc15738=bufferSha256(readFileSync(_0x471b49));if(_0xc15738!==fileHash(_0x18f6e6))throw CliErrors[_0x54e7e7(0x138)](_0x54e7e7(0x116)+_0x4ad514,_0x54e7e7(0x140)+_0x18f6e6[_0x54e7e7(0x144)]);}}function materializeFiles(_0x282c44,_0x5af415){const _0x14f084=a144_0x2c2d;for(const _0x48cf72 of normalizeLocalFiles(_0x5af415)){const _0x1cda63=resolveManagedFilePath(_0x282c44,_0x48cf72[_0x14f084(0x144)]);mkdirSync(dirname(_0x1cda63),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1cda63,fileContent(_0x48cf72),0x180);}}function removeStaleManagedFiles(_0x338d91,_0x3044f3,_0x324fa6){const _0x397902=a144_0x2c2d;if(!_0x3044f3)return;const _0x2a642a=new Set(normalizeLocalFiles(_0x324fa6)[_0x397902(0x13b)](_0x8f8e3e=>_0x8f8e3e['path']));for(const _0x15d01c of Object[_0x397902(0x135)](_0x3044f3)){if(_0x2a642a['has'](_0x15d01c))continue;const _0x4f9ff3=resolveManagedFilePath(_0x338d91,_0x15d01c);existsSync(_0x4f9ff3)&&lstatSync(_0x4f9ff3)[_0x397902(0x11f)]()&&rmSync(_0x4f9ff3,{'force':!![]});}}
1
+ (function(_0x218faa,_0x5922ec){const _0x451a89=a144_0x9ead,_0x47b33c=_0x218faa();while(!![]){try{const _0x4e33c8=parseInt(_0x451a89(0x11e))/0x1*(parseInt(_0x451a89(0x12d))/0x2)+-parseInt(_0x451a89(0x125))/0x3+-parseInt(_0x451a89(0x152))/0x4*(parseInt(_0x451a89(0x12c))/0x5)+-parseInt(_0x451a89(0x14f))/0x6+-parseInt(_0x451a89(0x141))/0x7+parseInt(_0x451a89(0x130))/0x8*(parseInt(_0x451a89(0x11a))/0x9)+parseInt(_0x451a89(0x131))/0xa;if(_0x4e33c8===_0x5922ec)break;else _0x47b33c['push'](_0x47b33c['shift']());}catch(_0x4dcb69){_0x47b33c['push'](_0x47b33c['shift']());}}}(a144_0x22c4,0x7bdae));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';function a144_0x22c4(){const _0x92d862=['4207791DwNKgT','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','find','validation','skillName','example','name:\x20','trimEnd','packageBytes','schemaVersion','fileHashes','env','utf8','scope','1085508JLTQDz','replace','trim','68PmKjfQ','filter','387VSSrTl','join','force','slice','195OlLpXy','length','map','errors','appCode','match','description:\x20','1531914ERWImT','test','status','paths','flow','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','accessKey','174490eAhdlf','8398aniUIs','description','set','162208BmbloD','7025720BCqQmu','contentHash','has','contents','isFile','---\x0a','displayName:\x20','entries','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','delete','version','---','hasOwn','path','displayName','keys'];a144_0x22c4=function(){return _0x92d862;};return a144_0x22c4();}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(_0xf86f83,_0x1e60c7,_0x1101dc){const _0x25426c=a144_0x9ead,_0x457081=requireSkillCode(_0xf86f83),_0x57d25f=requirePackageBytes(_0x457081,_0x1101dc[_0x25426c(0x149)]),_0x4c8357=extractDownloadedPackage(_0x57d25f),_0x33edc8=_0x4c8357[_0x25426c(0x143)](_0x4dbc95=>_0x4dbc95[_0x25426c(0x13e)]===SKILL_FILE);if(!_0x33edc8)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x457081);const _0x5a26da=withMaterializedSkillFrontmatter(_0x4c8357,_0xf86f83,_0x457081),_0x5214d4=_0x5a26da[_0x25426c(0x143)](_0x541615=>_0x541615[_0x25426c(0x13e)]===SKILL_FILE),_0x110125=fileText(_0x5214d4),_0x415fb1=getRuntimeSkillDir(_0x1101dc['env'],_0x1101dc['accessKey'],_0x1101dc[_0x25426c(0x122)],_0x1e60c7,_0x457081,_0x1101dc[_0x25426c(0x128)]),_0x73f899=resolve(_0x415fb1,SKILL_FILE),_0x241261=resolve(_0x415fb1,METADATA_FILE),_0x27bee2=contentHash(_0x110125),_0x52b9a2=readMetadataIfPresent(_0x241261)?.[_0x25426c(0x14b)];ensurePulledFilesCanBeOverwritten(_0x415fb1,_0x241261,_0x5a26da,_0x1101dc[_0x25426c(0x11c)]===!![]),mkdirSync(_0x415fb1,{'recursive':!![],'mode':0x1c0});const _0x29775b=existsSync(_0x73f899)?readFileSync(_0x73f899,_0x25426c(0x14d)):undefined;return materializeFiles(_0x415fb1,_0x5a26da),removeStaleManagedFiles(_0x415fb1,_0x52b9a2,_0x5a26da),writeJsonAtomic(_0x241261,buildMetadata(_0xf86f83,_0x1e60c7,_0x1101dc[_0x25426c(0x122)],_0x27bee2,_0x1101dc['pulledAt'],_0x5a26da,_0x57d25f)),{'skill':_0xf86f83,'scope':_0x1e60c7,'dir':_0x415fb1,'skillMdPath':_0x73f899,'metadataPath':_0x241261,'contentHash':_0x27bee2,'changed':_0x29775b!==_0x110125};}export function reuseMaterializedRuntimeSkill(_0x42619a,_0x465917,_0x3c71ae){const _0x11161e=a144_0x9ead,_0x3e4063=_0x42619a['version']?.[_0x11161e(0x151)]();if(!_0x3e4063)return undefined;const _0x1be1a9=requireSkillCode(_0x42619a),_0x156157=getRuntimeSkillDir(_0x3c71ae[_0x11161e(0x14c)],_0x3c71ae[_0x11161e(0x12b)],_0x3c71ae[_0x11161e(0x122)],_0x465917,_0x1be1a9,_0x3c71ae[_0x11161e(0x128)]),_0x4d334b=resolve(_0x156157,SKILL_FILE),_0x2365c5=resolve(_0x156157,METADATA_FILE),_0x54b800=readMetadataIfPresent(_0x2365c5);if(!_0x54b800||_0x54b800[_0x11161e(0x14a)]!==0x2||_0x54b800[_0x11161e(0x122)]!==_0x3c71ae[_0x11161e(0x122)]||_0x54b800[_0x11161e(0x14e)]!==_0x465917||_0x54b800['skillCode']!==_0x1be1a9||_0x54b800[_0x11161e(0x13b)]!==_0x3e4063||_0x54b800['id']!==_0x42619a['id']||_0x54b800['skillName']!==_0x42619a[_0x11161e(0x145)]||_0x54b800[_0x11161e(0x12e)]!==_0x42619a[_0x11161e(0x12e)]||_0x54b800['example']!==_0x42619a[_0x11161e(0x146)]||_0x54b800[_0x11161e(0x127)]!==_0x42619a['status']||!_0x54b800[_0x11161e(0x132)]||!_0x54b800['fileHashes']||!Object[_0x11161e(0x13d)](_0x54b800['fileHashes'],SKILL_FILE))return undefined;for(const [_0xe0070,_0x3eb24d]of Object['entries'](_0x54b800[_0x11161e(0x14b)])){if(!/^[a-f0-9]{64}$/[_0x11161e(0x126)](_0x3eb24d))return undefined;const _0x1296e9=resolveManagedFilePath(_0x156157,_0xe0070);if(!existsSync(_0x1296e9)||!lstatSync(_0x1296e9)[_0x11161e(0x135)]())return undefined;if(bufferSha256(readFileSync(_0x1296e9))!==_0x3eb24d)return undefined;}return{'skill':_0x42619a,'scope':_0x465917,'dir':_0x156157,'skillMdPath':_0x4d334b,'metadataPath':_0x2365c5,'contentHash':_0x54b800[_0x11161e(0x132)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x18b2ff,_0x1eba7c,_0x4d920b){const _0x10e3ff=a144_0x9ead,_0x16a860=skillDisplayName(_0x1eba7c,_0x4d920b),_0x58c90e=_0x1eba7c['description']?.[_0x10e3ff(0x151)]()||_0x16a860||_0x4d920b;return normalizeLocalFiles(_0x18b2ff)[_0x10e3ff(0x120)](_0x13ee36=>{const _0x2c45dc=_0x10e3ff,_0xcef726=fileText(_0x13ee36);if(_0x13ee36['path']!==SKILL_FILE)return _0x13ee36;if(hasYamlFrontmatter(_0xcef726))return{'path':_0x13ee36[_0x2c45dc(0x13e)],'content':withSyncedDisplayName(_0xcef726,_0x16a860)};return{'path':_0x13ee36[_0x2c45dc(0x13e)],'content':prependSkillFrontmatter(_0xcef726,{'name':_0x4d920b,'displayName':_0x16a860,'description':_0x58c90e})};});}function hasYamlFrontmatter(_0x42ee47){return/^\uFEFF?---\s*\r?\n/['test'](_0x42ee47);}function a144_0x9ead(_0x14a929,_0x1378ca){_0x14a929=_0x14a929-0x119;const _0x22c495=a144_0x22c4();let _0x9eade1=_0x22c495[_0x14a929];return _0x9eade1;}function prependSkillFrontmatter(_0x4a81af,_0x256916){const _0x1097d0=a144_0x9ead,_0x19fab6=_0x4a81af[_0x1097d0(0x150)](/^\uFEFF/,'');return[_0x1097d0(0x13c),_0x1097d0(0x147)+yamlString(_0x256916['name']),_0x256916[_0x1097d0(0x13f)]?_0x1097d0(0x137)+yamlString(_0x256916[_0x1097d0(0x13f)]):undefined,_0x1097d0(0x124)+yamlString(_0x256916[_0x1097d0(0x12e)]),_0x1097d0(0x13c),'',_0x19fab6][_0x1097d0(0x119)](_0x256ae8=>_0x256ae8!==undefined)[_0x1097d0(0x11b)]('\x0a');}function yamlString(_0x33e6ac){return JSON['stringify'](_0x33e6ac['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x2115f8,_0x1a0ee6){const _0x5e0175=a144_0x9ead,_0x298534=_0x2115f8[_0x5e0175(0x145)]?.['trim']();return _0x298534||_0x1a0ee6;}function withSyncedDisplayName(_0x26f132,_0x490ddc){const _0x272e8b=a144_0x9ead,_0x26880e=_0x26f132[_0x272e8b(0x123)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x26880e)return _0x26f132;const _0x1e1d1a=_0x26880e[0x1]??'',_0x53322f=_0x26880e[0x2]??'',_0x31a131=parseDocument(_0x53322f);if(_0x31a131[_0x272e8b(0x121)][_0x272e8b(0x11f)]>0x0||!isMap(_0x31a131['contents']))return _0x26f132;if(_0x490ddc)_0x31a131[_0x272e8b(0x12f)]('displayName',_0x490ddc);else{if(_0x31a131[_0x272e8b(0x133)](_0x272e8b(0x13f)))_0x31a131[_0x272e8b(0x13a)]('displayName');else return _0x26f132;}forceBlockCollections(_0x31a131[_0x272e8b(0x134)]);const _0x464534=_0x31a131['toString']({'lineWidth':0x0})[_0x272e8b(0x148)](),_0x2e1eb0=_0x26f132[_0x272e8b(0x11d)](_0x26880e[0x0][_0x272e8b(0x11f)])['replace'](/^\r?\n/,'');return _0x1e1d1a+_0x272e8b(0x136)+_0x464534+'\x0a---\x0a\x0a'+_0x2e1eb0;}function forceBlockCollections(_0x1a99c7){if(!isNode(_0x1a99c7))return;visit(_0x1a99c7,(_0x19a802,_0x4a8582)=>{const _0x737ca9=a144_0x9ead;isCollection(_0x4a8582)&&(_0x4a8582[_0x737ca9(0x129)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x56cc02,_0xddb72a,_0x4d0e3e,_0x2b9f5d){const _0x1c4149=a144_0x9ead;if(_0x2b9f5d||!existsSync(_0xddb72a))return;const _0x16e4ab=readMetadataIfPresent(_0xddb72a);if(!_0x16e4ab)return;const _0x3a38da=_0x16e4ab['fileHashes']&&Object[_0x1c4149(0x140)](_0x16e4ab[_0x1c4149(0x14b)])[_0x1c4149(0x11f)]>0x0?_0x16e4ab[_0x1c4149(0x14b)]:undefined;if(_0x3a38da)for(const [_0x1ce750,_0x3a2b3c]of Object[_0x1c4149(0x138)](_0x3a38da)){const _0x2d151c=resolveManagedFilePath(_0x56cc02,_0x1ce750);if(!existsSync(_0x2d151c))throw CliErrors[_0x1c4149(0x144)](_0x1c4149(0x139)+_0x56cc02,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x1ce750);const _0x367a48=lstatSync(_0x2d151c);if(!_0x367a48[_0x1c4149(0x135)]())throw CliErrors['validation'](_0x1c4149(0x139)+_0x56cc02,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x1ce750);const _0x1046bf=bufferSha256(readFileSync(_0x2d151c));if(_0x1046bf!==_0x3a2b3c)throw CliErrors['validation'](_0x1c4149(0x139)+_0x56cc02+'.\x20Changed\x20file:\x20'+_0x1ce750,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x1ce750);}else{const _0x28f311=resolve(_0x56cc02,SKILL_FILE);if(existsSync(_0x28f311)&&_0x16e4ab['contentHash']){const _0xe2bf50=contentHash(readFileSync(_0x28f311,_0x1c4149(0x14d)));if(_0xe2bf50!==_0x16e4ab[_0x1c4149(0x132)])throw CliErrors['validation']('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x28f311,_0x1c4149(0x12a));}}for(const _0x43e6f6 of normalizeLocalFiles(_0x4d0e3e)){if(_0x3a38da?.[_0x43e6f6[_0x1c4149(0x13e)]])continue;if(!_0x3a38da&&_0x43e6f6[_0x1c4149(0x13e)]===SKILL_FILE)continue;const _0x51bb6a=resolveManagedFilePath(_0x56cc02,_0x43e6f6['path']);if(!existsSync(_0x51bb6a))continue;const _0x1d5a81=lstatSync(_0x51bb6a);if(!_0x1d5a81[_0x1c4149(0x135)]())throw CliErrors[_0x1c4149(0x144)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x56cc02,_0x1c4149(0x142)+_0x43e6f6[_0x1c4149(0x13e)]);const _0x4b955a=bufferSha256(readFileSync(_0x51bb6a));if(_0x4b955a!==fileHash(_0x43e6f6))throw CliErrors[_0x1c4149(0x144)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x56cc02,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x43e6f6[_0x1c4149(0x13e)]);}}function materializeFiles(_0xa8f207,_0x50b41a){const _0x15863a=a144_0x9ead;for(const _0x3f4b72 of normalizeLocalFiles(_0x50b41a)){const _0x4afebf=resolveManagedFilePath(_0xa8f207,_0x3f4b72[_0x15863a(0x13e)]);mkdirSync(dirname(_0x4afebf),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4afebf,fileContent(_0x3f4b72),0x180);}}function removeStaleManagedFiles(_0xff33c9,_0x116378,_0x370812){const _0x462381=a144_0x9ead;if(!_0x116378)return;const _0x98288e=new Set(normalizeLocalFiles(_0x370812)[_0x462381(0x120)](_0x363c98=>_0x363c98[_0x462381(0x13e)]));for(const _0x5e3669 of Object[_0x462381(0x140)](_0x116378)){if(_0x98288e[_0x462381(0x133)](_0x5e3669))continue;const _0x42dd2c=resolveManagedFilePath(_0xff33c9,_0x5e3669);existsSync(_0x42dd2c)&&lstatSync(_0x42dd2c)['isFile']()&&rmSync(_0x42dd2c,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0xaa0a03,_0x162072){const _0x444944=a145_0x5043,_0x3c9a7f=_0xaa0a03();while(!![]){try{const _0x12a175=parseInt(_0x444944(0x17a))/0x1*(parseInt(_0x444944(0x186))/0x2)+-parseInt(_0x444944(0x17d))/0x3*(-parseInt(_0x444944(0x17b))/0x4)+-parseInt(_0x444944(0x174))/0x5+parseInt(_0x444944(0x187))/0x6+parseInt(_0x444944(0x17f))/0x7+-parseInt(_0x444944(0x18d))/0x8+-parseInt(_0x444944(0x194))/0x9*(-parseInt(_0x444944(0x18f))/0xa);if(_0x12a175===_0x162072)break;else _0x3c9a7f['push'](_0x3c9a7f['shift']());}catch(_0x592d5c){_0x3c9a7f['push'](_0x3c9a7f['shift']());}}}(a145_0x364b,0xed8e2));function a145_0x364b(){const _0x3242df=['2783526VCvOfL','utf8','hasUpstreamUpdate','manifest','forkedFromSkillId','version','15073776LoByUx','object','291470HvJzPm','parse','personal','description','trim','603zAhHLe','toISOString','ossPath','userId','zipSize','status','isArray','validation','tags','8694290mWHSZg','readonly','fromEntries','zipSha256','forkedFromVersion','path','3EAwMwk','609352luKkQy','map','6BRfvzg','Invalid\x20','1616090SZfMJL','string','skillName','length','example','Runtime\x20Skill\x20is\x20missing\x20skillCode.','skillCode','1095860fKvwTo'];a145_0x364b=function(){return _0x3242df;};return a145_0x364b();}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a145_0x5043(_0x1f2eb4,_0x29beb5){_0x1f2eb4=_0x1f2eb4-0x173;const _0x364b76=a145_0x364b();let _0x504355=_0x364b76[_0x1f2eb4];return _0x504355;}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(_0x522ad8,_0x574edd,_0x34f932,_0xf270da,_0x38692b,_0x1efb38,_0x5df90e){const _0x441cb8=a145_0x5043,_0x287798=_0x1efb38?normalizeLocalFiles(_0x1efb38):[],_0x555212=!_0x5df90e&&_0x287798[_0x441cb8(0x182)]>0x0?buildSkillPackage(_0x287798):undefined,_0x24e9aa=_0x5df90e?bufferSha256(_0x5df90e):_0x555212?.[_0x441cb8(0x18a)][_0x441cb8(0x177)],_0x2c8925=_0x5df90e?.[_0x441cb8(0x182)]??_0x555212?.[_0x441cb8(0x18a)][_0x441cb8(0x198)],_0x5eee97=_0x287798['length']>0x0?Object[_0x441cb8(0x176)](_0x287798['map'](_0x273bdb=>[_0x273bdb[_0x441cb8(0x179)],fileHash(_0x273bdb)])):undefined;return{'schemaVersion':_0x287798[_0x441cb8(0x182)]>0x0?0x2:0x1,'id':_0x522ad8['id'],'appCode':_0x34f932,'skillCode':requireSkillCode(_0x522ad8),'skillName':_0x522ad8[_0x441cb8(0x181)],'description':_0x522ad8[_0x441cb8(0x192)],'example':_0x522ad8[_0x441cb8(0x183)],'scope':_0x574edd,'readonly':_0x574edd!==_0x441cb8(0x191)||_0x522ad8[_0x441cb8(0x175)]===!![],'tenantCode':_0x522ad8['tenantCode'],'userId':_0x522ad8[_0x441cb8(0x197)],'version':_0x522ad8[_0x441cb8(0x18c)],'status':_0x522ad8[_0x441cb8(0x199)],'tags':Array['isArray'](_0x522ad8[_0x441cb8(0x173)])?_0x522ad8[_0x441cb8(0x173)]:[],'hasUpstreamUpdate':_0x522ad8[_0x441cb8(0x189)],'forkedFromSkillId':_0x522ad8[_0x441cb8(0x18b)],'forkedFromVersion':_0x522ad8[_0x441cb8(0x178)],'sourceSessionId':_0x522ad8['sourceSessionId'],'contentHash':_0xf270da,'fileHashes':_0x5eee97,'treeHash':_0x287798[_0x441cb8(0x182)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x287798)):undefined,'ossPath':remoteManifestOssPath(_0x522ad8['files']),'zipSha256':_0x24e9aa,'zipSize':_0x2c8925,'files':_0x287798['length']>0x0?_0x287798[_0x441cb8(0x17c)](_0x61b0a2=>({'path':_0x61b0a2[_0x441cb8(0x179)],'hash':fileHash(_0x61b0a2),'size':fileContent(_0x61b0a2)[_0x441cb8(0x182)]})):undefined,'pulledAt':_0x38692b??new Date()[_0x441cb8(0x195)]()};}export function requireSkillCode(_0x102a8c){const _0xcbf7c9=a145_0x5043,_0x57fe04=_0x102a8c[_0xcbf7c9(0x185)]?.[_0xcbf7c9(0x193)]();if(!_0x57fe04)throw CliErrors[_0xcbf7c9(0x19b)](_0xcbf7c9(0x184));return _0x57fe04;}export function readMetadataIfPresent(_0x21b587){const _0x35b982=a145_0x5043;if(!existsSync(_0x21b587))return undefined;try{const _0x4f96da=JSON[_0x35b982(0x190)](readFileSync(_0x21b587,_0x35b982(0x188)));return _0x4f96da;}catch{throw CliErrors['validation'](_0x35b982(0x17e)+METADATA_FILE+':\x20'+_0x21b587);}}function remoteManifestOssPath(_0x27aaec){const _0x2dee1c=a145_0x5043;if(!_0x27aaec||typeof _0x27aaec!==_0x2dee1c(0x18e)||Array[_0x2dee1c(0x19a)](_0x27aaec))return undefined;const _0x41f9a7=_0x27aaec[_0x2dee1c(0x196)];return typeof _0x41f9a7===_0x2dee1c(0x180)&&_0x41f9a7[_0x2dee1c(0x193)]()?_0x41f9a7['trim']():undefined;}
1
+ function a145_0x3d04(_0x78b928,_0x5ad615){_0x78b928=_0x78b928-0x171;const _0x5ad89f=a145_0x5ad8();let _0x3d0465=_0x5ad89f[_0x78b928];return _0x3d0465;}function a145_0x5ad8(){const _0xea11af=['path','files','6irTsxE','5487480Ypgyar','description','userId','parse','tags','fromEntries','trim','validation','1163533BrMdfU','version','skillCode','2UhOOIS','map','1208200lBTnEk','145164xNKnYQ','forkedFromVersion','57259HXpaaz','length','Invalid\x20','zipSha256','1008160ufHaoD','isArray','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','854668QFwCEY','example','readonly','manifest'];a145_0x5ad8=function(){return _0xea11af;};return a145_0x5ad8();}(function(_0x28a34b,_0x3f6001){const _0x4a6704=a145_0x3d04,_0x4da386=_0x28a34b();while(!![]){try{const _0x56ae75=-parseInt(_0x4a6704(0x18b))/0x1*(parseInt(_0x4a6704(0x186))/0x2)+parseInt(_0x4a6704(0x189))/0x3+parseInt(_0x4a6704(0x174))/0x4+parseInt(_0x4a6704(0x18f))/0x5+-parseInt(_0x4a6704(0x17a))/0x6*(-parseInt(_0x4a6704(0x183))/0x7)+parseInt(_0x4a6704(0x188))/0x8+-parseInt(_0x4a6704(0x17b))/0x9;if(_0x56ae75===_0x3f6001)break;else _0x4da386['push'](_0x4da386['shift']());}catch(_0xdaaf25){_0x4da386['push'](_0x4da386['shift']());}}}(a145_0x5ad8,0x1bd20));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x14c7c1,_0x5684c2,_0x2bb11d,_0x540bc6,_0x1c787d,_0x1d5e4e,_0x8fe5d9){const _0x24a7eb=a145_0x3d04,_0x2acffa=_0x1d5e4e?normalizeLocalFiles(_0x1d5e4e):[],_0x2b92c0=!_0x8fe5d9&&_0x2acffa[_0x24a7eb(0x18c)]>0x0?buildSkillPackage(_0x2acffa):undefined,_0x1e934a=_0x8fe5d9?bufferSha256(_0x8fe5d9):_0x2b92c0?.['manifest'][_0x24a7eb(0x18e)],_0x11df0e=_0x8fe5d9?.['length']??_0x2b92c0?.[_0x24a7eb(0x177)]['zipSize'],_0x73e35=_0x2acffa[_0x24a7eb(0x18c)]>0x0?Object[_0x24a7eb(0x180)](_0x2acffa[_0x24a7eb(0x187)](_0x5daabf=>[_0x5daabf[_0x24a7eb(0x178)],fileHash(_0x5daabf)])):undefined;return{'schemaVersion':_0x2acffa[_0x24a7eb(0x18c)]>0x0?0x2:0x1,'id':_0x14c7c1['id'],'appCode':_0x2bb11d,'skillCode':requireSkillCode(_0x14c7c1),'skillName':_0x14c7c1['skillName'],'description':_0x14c7c1[_0x24a7eb(0x17c)],'example':_0x14c7c1[_0x24a7eb(0x175)],'scope':_0x5684c2,'readonly':_0x5684c2!=='personal'||_0x14c7c1[_0x24a7eb(0x176)]===!![],'tenantCode':_0x14c7c1['tenantCode'],'userId':_0x14c7c1[_0x24a7eb(0x17d)],'version':_0x14c7c1[_0x24a7eb(0x184)],'status':_0x14c7c1['status'],'tags':Array[_0x24a7eb(0x171)](_0x14c7c1[_0x24a7eb(0x17f)])?_0x14c7c1['tags']:[],'hasUpstreamUpdate':_0x14c7c1['hasUpstreamUpdate'],'forkedFromSkillId':_0x14c7c1['forkedFromSkillId'],'forkedFromVersion':_0x14c7c1[_0x24a7eb(0x18a)],'sourceSessionId':_0x14c7c1['sourceSessionId'],'contentHash':_0x540bc6,'fileHashes':_0x73e35,'treeHash':_0x2acffa[_0x24a7eb(0x18c)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2acffa)):undefined,'ossPath':remoteManifestOssPath(_0x14c7c1[_0x24a7eb(0x179)]),'zipSha256':_0x1e934a,'zipSize':_0x11df0e,'files':_0x2acffa[_0x24a7eb(0x18c)]>0x0?_0x2acffa[_0x24a7eb(0x187)](_0x5352fc=>({'path':_0x5352fc[_0x24a7eb(0x178)],'hash':fileHash(_0x5352fc),'size':fileContent(_0x5352fc)[_0x24a7eb(0x18c)]})):undefined,'pulledAt':_0x1c787d??new Date()['toISOString']()};}export function requireSkillCode(_0x316dd8){const _0x5b3943=a145_0x3d04,_0x3bd2d9=_0x316dd8[_0x5b3943(0x185)]?.[_0x5b3943(0x181)]();if(!_0x3bd2d9)throw CliErrors['validation'](_0x5b3943(0x172));return _0x3bd2d9;}export function readMetadataIfPresent(_0xa781ca){const _0x45315c=a145_0x3d04;if(!existsSync(_0xa781ca))return undefined;try{const _0x1c983=JSON[_0x45315c(0x17e)](readFileSync(_0xa781ca,_0x45315c(0x173)));return _0x1c983;}catch{throw CliErrors[_0x45315c(0x182)](_0x45315c(0x18d)+METADATA_FILE+':\x20'+_0xa781ca);}}function remoteManifestOssPath(_0x476e61){const _0x41aab2=a145_0x3d04;if(!_0x476e61||typeof _0x476e61!=='object'||Array[_0x41aab2(0x171)](_0x476e61))return undefined;const _0x1a52be=_0x476e61['ossPath'];return typeof _0x1a52be==='string'&&_0x1a52be[_0x41aab2(0x181)]()?_0x1a52be[_0x41aab2(0x181)]():undefined;}
@@ -1 +1 @@
1
- const a146_0x223c7e=a146_0xb1d4;(function(_0x4f009c,_0x25fb76){const _0x319ee0=a146_0xb1d4,_0x32a925=_0x4f009c();while(!![]){try{const _0x394f87=-parseInt(_0x319ee0(0x18a))/0x1+parseInt(_0x319ee0(0x195))/0x2*(parseInt(_0x319ee0(0x196))/0x3)+parseInt(_0x319ee0(0x184))/0x4*(-parseInt(_0x319ee0(0x186))/0x5)+parseInt(_0x319ee0(0x194))/0x6*(parseInt(_0x319ee0(0x198))/0x7)+parseInt(_0x319ee0(0x17f))/0x8+-parseInt(_0x319ee0(0x189))/0x9+parseInt(_0x319ee0(0x180))/0xa;if(_0x394f87===_0x25fb76)break;else _0x32a925['push'](_0x32a925['shift']());}catch(_0x1bf123){_0x32a925['push'](_0x32a925['shift']());}}}(a146_0x76d5,0x94c4a));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(_0x547c28={}){const _0x507152=a146_0xb1d4,_0x2a6fd4=_0x547c28[_0x507152(0x192)]??homedir(),_0x24f5de=resolve(_0x2a6fd4,PRODUCT_CONFIG[_0x507152(0x187)],'cache'),_0x3f4f04=trimmedEnv('SKILL_ROOT'),_0x4190e9=trimmedEnv(_0x507152(0x18e)),_0xc32920=resolve(_0x2a6fd4,'.workbuddy'),_0x2154a2=_0x547c28[_0x507152(0x18d)]??(existsSync(_0xc32920)?resolve(_0xc32920,_0x507152(0x18f)):undefined);return{'homeDir':_0x2a6fd4,'cacheRoot':_0x24f5de,'managedRoot':resolve(_0x2a6fd4,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x547c28[_0x507152(0x193)]??_0x3f4f04??resolve(_0x2a6fd4,'.agents','skills'),'claudeSkillsDir':_0x547c28[_0x507152(0x191)]??_0x4190e9??resolve(_0x2a6fd4,_0x507152(0x182),_0x507152(0x18f)),'workbuddySkillsDir':_0x2154a2};}export function runtimeAgentSkillRoots(_0x34e1a1){const _0x2aca7c=a146_0xb1d4;return[_0x34e1a1[_0x2aca7c(0x193)],_0x34e1a1[_0x2aca7c(0x191)],_0x34e1a1[_0x2aca7c(0x18d)]]['filter'](_0x36de27=>Boolean(_0x36de27));}export function getRuntimeSkillCacheRoot(_0x5af4c3,_0x402b8f,_0x58cce9={}){const _0x2b4069=a146_0xb1d4,_0x2aa062=resolveSkillSyncPaths(_0x58cce9);return resolve(_0x2aa062[_0x2b4069(0x188)],_0x5af4c3,fingerprintAccessKey(_0x402b8f),_0x2b4069(0x18f));}export function getRuntimeSkillDir(_0x1713df,_0x6171fc,_0x22d20d,_0x55db7c,_0x4217e,_0x4a20a7={}){const _0x1d26d4=a146_0xb1d4;return resolve(getRuntimeSkillCacheRoot(_0x1713df,_0x6171fc,_0x4a20a7),safePathSegment(_0x22d20d,_0x1d26d4(0x183)),_0x55db7c,safePathSegment(_0x4217e,'skillCode'));}function a146_0xb1d4(_0x4149fc,_0x45479a){_0x4149fc=_0x4149fc-0x17f;const _0x76d5a4=a146_0x76d5();let _0xb1d4c3=_0x76d5a4[_0x4149fc];return _0xb1d4c3;}function a146_0x76d5(){const _0x1bf9a1=['7437120dLBrMV','path\x20segment','.claude','appCode','16RBbArr','includes','31015ttsqoJ','homeDirName','cacheRoot','7654887eOZwTI','556235OPzBKk','trim','validation','workbuddySkillsDir','CLAUDE_SKILL_ROOT','skills','Unsafe\x20','claudeSkillsDir','homeDir','agentsSkillsDir','9348HmaFmU','1769558uSEnYp','3CClWUT','\x20for\x20local\x20path:\x20','14zIlOGc','3274696iXhaXf'];a146_0x76d5=function(){return _0x1bf9a1;};return a146_0x76d5();}export function safePathSegment(_0x59f198,_0x18e15d=a146_0x223c7e(0x181)){const _0x110a7e=a146_0x223c7e;if(!_0x59f198||_0x59f198['includes']('/')||_0x59f198['includes']('\x5c')||_0x59f198[_0x110a7e(0x185)]('..'))throw CliErrors[_0x110a7e(0x18c)](_0x110a7e(0x190)+_0x18e15d+_0x110a7e(0x197)+_0x59f198);return _0x59f198;}function trimmedEnv(_0xb40e92){const _0x46eb75=a146_0x223c7e,_0x408585=productEnv(_0xb40e92)?.[_0x46eb75(0x18b)]();return _0x408585?_0x408585:undefined;}
1
+ const a146_0x3eac2e=a146_0x14a6;(function(_0x3e33eb,_0x159827){const _0x4d45a1=a146_0x14a6,_0x968a02=_0x3e33eb();while(!![]){try{const _0x4bb774=-parseInt(_0x4d45a1(0x6f))/0x1+-parseInt(_0x4d45a1(0x74))/0x2*(parseInt(_0x4d45a1(0x6b))/0x3)+parseInt(_0x4d45a1(0x67))/0x4*(-parseInt(_0x4d45a1(0x77))/0x5)+parseInt(_0x4d45a1(0x79))/0x6*(-parseInt(_0x4d45a1(0x7d))/0x7)+parseInt(_0x4d45a1(0x71))/0x8*(parseInt(_0x4d45a1(0x6e))/0x9)+-parseInt(_0x4d45a1(0x6c))/0xa*(-parseInt(_0x4d45a1(0x75))/0xb)+parseInt(_0x4d45a1(0x6d))/0xc;if(_0x4bb774===_0x159827)break;else _0x968a02['push'](_0x968a02['shift']());}catch(_0x3e9bf1){_0x968a02['push'](_0x968a02['shift']());}}}(a146_0x2e24,0x24f42));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(_0x57c9b6={}){const _0x3c1ba7=a146_0x14a6,_0x11c3cf=_0x57c9b6[_0x3c1ba7(0x84)]??homedir(),_0x3e885e=resolve(_0x11c3cf,PRODUCT_CONFIG[_0x3c1ba7(0x7f)],_0x3c1ba7(0x6a)),_0x570ec3=trimmedEnv(_0x3c1ba7(0x69)),_0x426685=trimmedEnv(_0x3c1ba7(0x72)),_0x283b8d=resolve(_0x11c3cf,_0x3c1ba7(0x68)),_0x4be05f=_0x57c9b6[_0x3c1ba7(0x7e)]??(existsSync(_0x283b8d)?resolve(_0x283b8d,_0x3c1ba7(0x78)):undefined);return{'homeDir':_0x11c3cf,'cacheRoot':_0x3e885e,'managedRoot':resolve(_0x11c3cf,PRODUCT_CONFIG[_0x3c1ba7(0x7f)]),'agentsSkillsDir':_0x57c9b6[_0x3c1ba7(0x73)]??_0x570ec3??resolve(_0x11c3cf,_0x3c1ba7(0x7c),_0x3c1ba7(0x78)),'claudeSkillsDir':_0x57c9b6[_0x3c1ba7(0x65)]??_0x426685??resolve(_0x11c3cf,_0x3c1ba7(0x7b),_0x3c1ba7(0x78)),'workbuddySkillsDir':_0x4be05f};}function a146_0x2e24(){const _0x30c21d=['includes','filter','appCode','\x20for\x20local\x20path:\x20','homeDir','cacheRoot','claudeSkillsDir','validation','172weyDwg','.workbuddy','SKILL_ROOT','cache','3rNCiHY','2813410IzOaIc','2348688vlWGxQ','45mYPaBe','286961BRMgSM','trim','446024ssulJN','CLAUDE_SKILL_ROOT','agentsSkillsDir','183574prdqKs','11Rhvabd','path\x20segment','8105roxYvT','skills','534LuqQMK','Unsafe\x20','.claude','.agents','12271Fezngk','workbuddySkillsDir','homeDirName'];a146_0x2e24=function(){return _0x30c21d;};return a146_0x2e24();}export function runtimeAgentSkillRoots(_0x388077){const _0x130bc7=a146_0x14a6;return[_0x388077[_0x130bc7(0x73)],_0x388077[_0x130bc7(0x65)],_0x388077[_0x130bc7(0x7e)]][_0x130bc7(0x81)](_0x207172=>Boolean(_0x207172));}export function getRuntimeSkillCacheRoot(_0x1dd95b,_0x1d1943,_0x529071={}){const _0xa7ba95=a146_0x14a6,_0x16bad7=resolveSkillSyncPaths(_0x529071);return resolve(_0x16bad7[_0xa7ba95(0x64)],_0x1dd95b,fingerprintAccessKey(_0x1d1943),'skills');}export function getRuntimeSkillDir(_0x25ee78,_0x316975,_0x3feed4,_0x46e768,_0x210de6,_0x28ba4d={}){const _0x11264c=a146_0x14a6;return resolve(getRuntimeSkillCacheRoot(_0x25ee78,_0x316975,_0x28ba4d),safePathSegment(_0x3feed4,_0x11264c(0x82)),_0x46e768,safePathSegment(_0x210de6,'skillCode'));}function a146_0x14a6(_0x3d9ce7,_0x38508c){_0x3d9ce7=_0x3d9ce7-0x64;const _0x2e2493=a146_0x2e24();let _0x14a648=_0x2e2493[_0x3d9ce7];return _0x14a648;}export function safePathSegment(_0x289cee,_0x34fa1f=a146_0x3eac2e(0x76)){const _0x1e4a21=a146_0x3eac2e;if(!_0x289cee||_0x289cee[_0x1e4a21(0x80)]('/')||_0x289cee[_0x1e4a21(0x80)]('\x5c')||_0x289cee[_0x1e4a21(0x80)]('..'))throw CliErrors[_0x1e4a21(0x66)](_0x1e4a21(0x7a)+_0x34fa1f+_0x1e4a21(0x83)+_0x289cee);return _0x289cee;}function trimmedEnv(_0x2b2f11){const _0x27c2a1=a146_0x3eac2e,_0x7ebf1e=productEnv(_0x2b2f11)?.[_0x27c2a1(0x70)]();return _0x7ebf1e?_0x7ebf1e:undefined;}
@@ -1 +1 @@
1
- (function(_0x39b207,_0x2e5a5b){const _0x5b1db6=a147_0x4759,_0x5d4a26=_0x39b207();while(!![]){try{const _0x10fd27=-parseInt(_0x5b1db6(0x208))/0x1*(parseInt(_0x5b1db6(0x202))/0x2)+parseInt(_0x5b1db6(0x21f))/0x3+parseInt(_0x5b1db6(0x212))/0x4*(-parseInt(_0x5b1db6(0x1e4))/0x5)+parseInt(_0x5b1db6(0x200))/0x6+parseInt(_0x5b1db6(0x21b))/0x7+parseInt(_0x5b1db6(0x203))/0x8+parseInt(_0x5b1db6(0x1e5))/0x9*(-parseInt(_0x5b1db6(0x1fe))/0xa);if(_0x10fd27===_0x2e5a5b)break;else _0x5d4a26['push'](_0x5d4a26['shift']());}catch(_0x453ec8){_0x5d4a26['push'](_0x5d4a26['shift']());}}}(a147_0x50f4,0x3ff7c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a147_0x199efb}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';function a147_0x50f4(){const _0x26a364=['displayName','path','metadata','dir','description','skillCode','1409646nzGkYG','name','isSymbolicLink','ignoreInvalidMetadata','1248093LwkwzV','tags','filter','Remote\x20Skill\x20','Skill\x20directory\x20not\x20found:\x20','validation','10ANZrvJ','9wAuzcL','match','pushedAt','isArray','number','utf8',',\x20or\x20directory\x20name.','ignoreMetadataAppCodeMismatch','find','\x20has\x20unsupported\x20scope\x20\x22','Skill\x20metadata\x20appCode\x20\x22','appCode','personal','skillName','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Missing\x20','builtin','targetScope','example','isFile','string','\x20has\x20scope=\x22','boolean','files','sourceSessionId','4778890ontgVp','ignoreMetadataForPayload','1280160UPjxlL','refreshedAt','147310fXHUiN','27544MkIVKz','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','trim','scope','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','1UvERZm','isDirectory','manifest','ignoreMetadataSkillCode','object','allowAppCodeRetarget','replace','\x20name\x20for\x20SkillHub\x20slug\x20generation.','excludedFilePaths','ignoreMetadataScope','41312aVdEWs','slice','content'];a147_0x50f4=function(){return _0x26a364;};return a147_0x50f4();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x5f3120,_0x14f8af,_0x35c4d9={}){const _0x3ad7d6=a147_0x4759,_0x4ef7c8=resolvePushDirectoryRoot(_0x5f3120),_0x6bd7fc=readPushMetadataIfPresent(resolve(_0x4ef7c8,METADATA_FILE),{'ignoreInvalidMetadata':_0x35c4d9[_0x3ad7d6(0x21e)]});if(_0x6bd7fc?.['appCode']&&_0x6bd7fc[_0x3ad7d6(0x1f0)]!==_0x14f8af&&!_0x35c4d9[_0x3ad7d6(0x20d)]&&!_0x35c4d9[_0x3ad7d6(0x1ec)])throw CliErrors['validation'](_0x3ad7d6(0x1ef)+_0x6bd7fc[_0x3ad7d6(0x1f0)]+_0x3ad7d6(0x207)+_0x14f8af+'\x22.');const _0x5cad40=resolvePushSkillCode(_0x4ef7c8,_0x14f8af,_0x6bd7fc,_0x35c4d9);if(!_0x5cad40)throw CliErrors[_0x3ad7d6(0x224)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x3ad7d6(0x1eb));return{'dir':_0x4ef7c8,'skillCode':_0x5cad40,'metadata':_0x6bd7fc};}export function readPushDirectory(_0x5ce1fb,_0x316659,_0x2f777d={}){const _0x390a7b=a147_0x4759,_0x4f4999=resolvePushDirectoryIdentity(_0x5ce1fb,_0x316659,_0x2f777d),_0x11b9f0=_0x4f4999[_0x390a7b(0x218)],_0x3fe9fd=resolve(_0x11b9f0,SKILL_FILE);if(!existsSync(_0x3fe9fd)||!lstatSync(_0x3fe9fd)[_0x390a7b(0x1f8)]())throw CliErrors[_0x390a7b(0x224)](_0x390a7b(0x1f4)+SKILL_FILE+':\x20'+_0x3fe9fd);const _0x158fd4=_0x4f4999[_0x390a7b(0x217)],_0x13fd91=_0x2f777d[_0x390a7b(0x1f6)]??_0x390a7b(0x1f1);if(!_0x2f777d[_0x390a7b(0x211)]&&_0x158fd4?.[_0x390a7b(0x206)]===_0x390a7b(0x1f5))throw CliErrors[_0x390a7b(0x224)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x158fd4[_0x390a7b(0x206)]+'\x22.');if(!_0x2f777d[_0x390a7b(0x211)]&&_0x13fd91===_0x390a7b(0x1f1)&&_0x158fd4?.[_0x390a7b(0x206)]&&_0x158fd4[_0x390a7b(0x206)]!==_0x390a7b(0x1f1))throw CliErrors['validation'](_0x390a7b(0x1f3)+METADATA_FILE+_0x390a7b(0x1fa)+_0x158fd4['scope']+'\x22.',_0x390a7b(0x204)+_0x11b9f0+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x4007d4=scanSkillDirectory(_0x11b9f0,{'excludedFilePaths':_0x2f777d[_0x390a7b(0x210)]}),_0x4e3d6f=buildSkillPackage(_0x4007d4),_0x3763c6=readFileSync(_0x3fe9fd,_0x390a7b(0x1ea)),_0x11b8fb=_0x4f4999['skillCode'],_0x3af86e=_0x2f777d[_0x390a7b(0x1ff)]?undefined:_0x158fd4,_0x506db2=readSkillDisplayName(_0x3763c6);return{'skillCode':_0x11b8fb,'metadata':_0x158fd4,'frontmatterDisplayName':_0x506db2,'input':{'skillCode':_0x11b8fb,'skillName':_0x506db2??_0x3af86e?.[_0x390a7b(0x1f2)],'description':_0x3af86e?.[_0x390a7b(0x219)],'content':_0x3763c6,'files':_0x4e3d6f[_0x390a7b(0x20a)],'packageBase64':_0x4e3d6f['packageBase64'],'tags':_0x3af86e?.[_0x390a7b(0x220)],'version':_0x3af86e?.['version'],'sourceSessionId':_0x3af86e?.[_0x390a7b(0x1fd)]}};}export function refreshPushDirectoryMetadataFromRemote(_0xdfce80,_0x4a29b7,_0x3cfce0,_0x1862e2={}){const _0x787928=a147_0x4759,_0x1c433b=resolvePushDirectoryRoot(_0xdfce80),_0x4fd437=readPushMetadataIfPresent(resolve(_0x1c433b,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x13e035=requireRemoteScope(_0x4a29b7),_0x26d46b=readLocalSkillContent(_0x1c433b),_0x211e10={..._0x4a29b7,'appCode':_0x4a29b7[_0x787928(0x1f0)]??_0x3cfce0,'skillName':_0x4a29b7[_0x787928(0x1f2)]??_0x4fd437?.[_0x787928(0x1f2)],'description':_0x4a29b7[_0x787928(0x219)]??_0x4fd437?.[_0x787928(0x219)],'example':_0x4a29b7[_0x787928(0x1f7)]??_0x4fd437?.['example'],'tags':Array[_0x787928(0x1e8)](_0x4a29b7[_0x787928(0x220)])?_0x4a29b7['tags']:_0x4fd437?.[_0x787928(0x220)],'sourceSessionId':_0x4a29b7['sourceSessionId']??_0x4fd437?.[_0x787928(0x1fd)],'content':_0x4a29b7[_0x787928(0x214)]??_0x26d46b},_0x258c97=buildMetadata(_0x211e10,_0x13e035,_0x3cfce0,contentHash(_0x26d46b),_0x1862e2[_0x787928(0x201)]);writeJsonAtomic(resolve(_0x1c433b,METADATA_FILE),_0x258c97);}export function recordPushedRuntimeSkill(_0x1952ce,_0x49ac31,_0xf50b53,_0x555983={}){const _0x4b1ea7=a147_0x4759,_0x44be70=resolvePushDirectoryRoot(_0x1952ce),_0x4bda7e=scanSkillDirectory(_0x44be70),_0x5a1b40=_0x4bda7e[_0x4b1ea7(0x1ed)](_0x6f9adc=>_0x6f9adc[_0x4b1ea7(0x216)]===SKILL_FILE),_0x149d08=_0x5a1b40?fileText(_0x5a1b40):'',_0x568ebf=tryNormalizePackageManifest(_0x49ac31[_0x4b1ea7(0x1fc)]),_0x173bb9={..._0x49ac31,'content':_0x49ac31[_0x4b1ea7(0x214)]??_0x149d08,'files':_0x568ebf},_0x479068=_0x568ebf?normalizeLocalFiles(_0x4bda7e)[_0x4b1ea7(0x221)](_0x4fdb88=>_0x568ebf[_0x4b1ea7(0x1fc)]['some'](_0x3bbc07=>_0x3bbc07['path']===_0x4fdb88['path'])):undefined,_0x14bdc0=buildMetadata(_0x173bb9,_0x555983['scope']??_0x4b1ea7(0x1f1),_0xf50b53,contentHash(_0x173bb9[_0x4b1ea7(0x214)]??''),_0x555983[_0x4b1ea7(0x1e7)],_0x479068);writeJsonAtomic(resolve(_0x44be70,METADATA_FILE),_0x14bdc0);}export function deriveSkillCodeFromDirectory(_0x3ae12c,_0x4ee9e2){const _0x4df175=a147_0x4759,_0x5af5ff=basename(resolve(_0x3ae12c)),_0x196349=_0x4ee9e2+'--';return _0x5af5ff['startsWith'](_0x196349)?_0x5af5ff[_0x4df175(0x213)](_0x196349['length']):_0x5af5ff;}function resolvePushSkillCode(_0x297f23,_0x396c25,_0x446e8a,_0x4971ee){const _0x544f98=a147_0x4759,_0x441eea=deriveSkillCodeFromSkillFile(_0x297f23)||deriveSkillCodeFromDirectory(_0x297f23,_0x396c25);if(_0x4971ee[_0x544f98(0x20b)])return _0x441eea;return _0x446e8a?.[_0x544f98(0x21a)]?.[_0x544f98(0x205)]()||_0x441eea;}function deriveSkillCodeFromSkillFile(_0x393a91){const _0x2cb535=a147_0x4759,_0x5b523e=resolve(_0x393a91,SKILL_FILE);if(!existsSync(_0x5b523e)||!lstatSync(_0x5b523e)[_0x2cb535(0x1f8)]())return undefined;const _0x5892ae=readFileSync(_0x5b523e,_0x2cb535(0x1ea)),_0x3b5fc7=_0x5892ae[_0x2cb535(0x1e6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3b5fc7)return undefined;const _0x1fe0b4=parseFrontmatterObject(_0x3b5fc7[0x1]??''),_0x2b4f10=scalarToString(_0x1fe0b4?.[_0x2cb535(0x21c)]);return _0x2b4f10?slugifySkillName(_0x2b4f10):undefined;}function readSkillDisplayName(_0x5454dd){const _0x14a1ad=a147_0x4759,_0x33a510=_0x5454dd[_0x14a1ad(0x1e6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x33a510)return undefined;const _0xc381a9=parseFrontmatterObject(_0x33a510[0x1]??'');return scalarToString(_0xc381a9?.[_0x14a1ad(0x215)]);}function slugifySkillName(_0x3140e9){const _0x32e7eb=a147_0x4759,_0x3a3b17=_0x3140e9[_0x32e7eb(0x205)]()['toLowerCase']()[_0x32e7eb(0x20e)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x32e7eb(0x20e)](/^-+/,'')[_0x32e7eb(0x20e)](/-+$/,'')[_0x32e7eb(0x20e)](/-{2,}/g,'-');if(!_0x3a3b17)throw CliErrors[_0x32e7eb(0x224)]('Invalid\x20'+SKILL_FILE+_0x32e7eb(0x20f));return _0x3a3b17;}function a147_0x4759(_0x3c60f8,_0x3a92e5){_0x3c60f8=_0x3c60f8-0x1e4;const _0x50f4f8=a147_0x50f4();let _0x4759a9=_0x50f4f8[_0x3c60f8];return _0x4759a9;}function parseFrontmatterObject(_0x1907de){const _0x205c44=a147_0x4759;try{const _0x287417=a147_0x199efb(_0x1907de);return _0x287417&&typeof _0x287417===_0x205c44(0x20c)&&!Array['isArray'](_0x287417)?_0x287417:undefined;}catch{return undefined;}}function scalarToString(_0x25d5e6){const _0x21eb75=a147_0x4759;if(typeof _0x25d5e6===_0x21eb75(0x1f9))return _0x25d5e6[_0x21eb75(0x205)]();if(typeof _0x25d5e6===_0x21eb75(0x1e9)||typeof _0x25d5e6===_0x21eb75(0x1fb))return String(_0x25d5e6);return undefined;}function resolvePushDirectoryRoot(_0x50af47){const _0x3d311e=a147_0x4759,_0x380cb5=resolve(_0x50af47);if(!existsSync(_0x380cb5))throw CliErrors[_0x3d311e(0x224)](_0x3d311e(0x223)+_0x50af47);const _0x202790=lstatSync(_0x380cb5);if(_0x202790[_0x3d311e(0x209)]())return _0x380cb5;if(_0x202790[_0x3d311e(0x21d)]()){const _0x38a19a=realpathSync(_0x380cb5);if(lstatSync(_0x38a19a)[_0x3d311e(0x209)]())return _0x38a19a;}throw CliErrors['validation'](_0x3d311e(0x223)+_0x50af47);}function requireRemoteScope(_0x256eb1){const _0x754ac=a147_0x4759;if(_0x256eb1[_0x754ac(0x206)]===_0x754ac(0x1f1)||_0x256eb1[_0x754ac(0x206)]==='company'||_0x256eb1['scope']===_0x754ac(0x1f5))return _0x256eb1['scope'];throw CliErrors['validation'](_0x754ac(0x222)+(_0x256eb1[_0x754ac(0x21a)]||'(unknown)')+_0x754ac(0x1ee)+(_0x256eb1['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x2c3015){const _0xeb807d=a147_0x4759,_0x199e84=resolve(_0x2c3015,SKILL_FILE);return existsSync(_0x199e84)&&lstatSync(_0x199e84)[_0xeb807d(0x1f8)]()?readFileSync(_0x199e84,_0xeb807d(0x1ea)):'';}function readPushMetadataIfPresent(_0x483410,_0x3c378c={}){try{return readMetadataIfPresent(_0x483410);}catch(_0x23318a){if(_0x3c378c['ignoreInvalidMetadata'])return undefined;throw _0x23318a;}}
1
+ (function(_0x3646a0,_0x56b5f6){const _0x253b33=a147_0x3bb5,_0x29e706=_0x3646a0();while(!![]){try{const _0x592c09=parseInt(_0x253b33(0xe7))/0x1+parseInt(_0x253b33(0xcb))/0x2*(parseInt(_0x253b33(0xbb))/0x3)+parseInt(_0x253b33(0xd6))/0x4+-parseInt(_0x253b33(0xb5))/0x5*(parseInt(_0x253b33(0xd1))/0x6)+-parseInt(_0x253b33(0xe2))/0x7+-parseInt(_0x253b33(0xd2))/0x8*(parseInt(_0x253b33(0xb2))/0x9)+parseInt(_0x253b33(0xcc))/0xa;if(_0x592c09===_0x56b5f6)break;else _0x29e706['push'](_0x29e706['shift']());}catch(_0x3f5db2){_0x29e706['push'](_0x29e706['shift']());}}}(a147_0x536e,0xa1844));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a147_0x536e(){const _0x5f4234=['5382fgZMxq','skillName','manifest','755zpSDrP','find','(unknown)','object','description','trim','376590hKFJXw','ignoreMetadataAppCodeMismatch','sourceSessionId','isSymbolicLink','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','name','isFile','number','displayName','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','allowAppCodeRetarget','path','ignoreMetadataScope','Remote\x20Skill\x20','tags','match','2NFROoA','12136120vWaUHo','replace','validation','refreshedAt','scope','30330KGJFPs','976AiHTmL','Missing\x20','slice','toLowerCase','244400hPjmgP','targetScope','isDirectory','Invalid\x20','content','boolean','utf8','files','ignoreInvalidMetadata',',\x20or\x20directory\x20name.','\x20has\x20scope=\x22','\x20name\x20for\x20SkillHub\x20slug\x20generation.','657832TmPthT','example','builtin','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','some','191567dnQQGi','personal','filter','skillCode','Unable\x20to\x20resolve\x20skillCode\x20from\x20','pushedAt','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','length','appCode','unknown'];a147_0x536e=function(){return _0x5f4234;};return a147_0x536e();}import{parse as a147_0x4c8feb}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(_0x4d8440,_0x532ae5,_0x141ebb={}){const _0x48aa86=a147_0x3bb5,_0x692798=resolvePushDirectoryRoot(_0x4d8440),_0x16f304=readPushMetadataIfPresent(resolve(_0x692798,METADATA_FILE),{'ignoreInvalidMetadata':_0x141ebb[_0x48aa86(0xde)]});if(_0x16f304?.['appCode']&&_0x16f304[_0x48aa86(0xb0)]!==_0x532ae5&&!_0x141ebb[_0x48aa86(0xc5)]&&!_0x141ebb[_0x48aa86(0xbc)])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x16f304[_0x48aa86(0xb0)]+_0x48aa86(0xc4)+_0x532ae5+'\x22.');const _0x4dceb6=resolvePushSkillCode(_0x692798,_0x532ae5,_0x16f304,_0x141ebb);if(!_0x4dceb6)throw CliErrors[_0x48aa86(0xce)](_0x48aa86(0xaa)+SKILL_FILE+',\x20'+METADATA_FILE+_0x48aa86(0xdf));return{'dir':_0x692798,'skillCode':_0x4dceb6,'metadata':_0x16f304};}export function readPushDirectory(_0x3ef825,_0x553f5b,_0x2370de={}){const _0x171793=a147_0x3bb5,_0x2c76da=resolvePushDirectoryIdentity(_0x3ef825,_0x553f5b,_0x2370de),_0x103a76=_0x2c76da['dir'],_0x3f58d6=resolve(_0x103a76,SKILL_FILE);if(!existsSync(_0x3f58d6)||!lstatSync(_0x3f58d6)['isFile']())throw CliErrors[_0x171793(0xce)](_0x171793(0xd3)+SKILL_FILE+':\x20'+_0x3f58d6);const _0xdc6aea=_0x2c76da[_0x171793(0xac)],_0x13febe=_0x2370de[_0x171793(0xd7)]??_0x171793(0xe8);if(!_0x2370de[_0x171793(0xc7)]&&_0xdc6aea?.[_0x171793(0xd0)]===_0x171793(0xe4))throw CliErrors[_0x171793(0xce)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x171793(0xe0)+_0xdc6aea['scope']+'\x22.');if(!_0x2370de[_0x171793(0xc7)]&&_0x13febe===_0x171793(0xe8)&&_0xdc6aea?.[_0x171793(0xd0)]&&_0xdc6aea[_0x171793(0xd0)]!=='personal')throw CliErrors['validation'](_0x171793(0xe5)+METADATA_FILE+_0x171793(0xe0)+_0xdc6aea[_0x171793(0xd0)]+'\x22.',_0x171793(0xad)+_0x103a76+_0x171793(0xbf));const _0x2827ae=scanSkillDirectory(_0x103a76,{'excludedFilePaths':_0x2370de['excludedFilePaths']}),_0x54d1bf=buildSkillPackage(_0x2827ae),_0x1f28af=readFileSync(_0x3f58d6,_0x171793(0xdc)),_0x42e041=_0x2c76da[_0x171793(0xea)],_0x59da92=_0x2370de['ignoreMetadataForPayload']?undefined:_0xdc6aea,_0x3cf13c=readSkillDisplayName(_0x1f28af);return{'skillCode':_0x42e041,'metadata':_0xdc6aea,'frontmatterDisplayName':_0x3cf13c,'input':{'skillCode':_0x42e041,'skillName':_0x3cf13c??_0x59da92?.[_0x171793(0xb3)],'description':_0x59da92?.[_0x171793(0xb9)],'content':_0x1f28af,'files':_0x54d1bf[_0x171793(0xb4)],'packageBase64':_0x54d1bf['packageBase64'],'tags':_0x59da92?.[_0x171793(0xc9)],'version':_0x59da92?.['version'],'sourceSessionId':_0x59da92?.[_0x171793(0xbd)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x58c35f,_0x4f1d86,_0x1e5548,_0x5b5b4f={}){const _0x371a83=a147_0x3bb5,_0x1bdb79=resolvePushDirectoryRoot(_0x58c35f),_0x6d4a4b=readPushMetadataIfPresent(resolve(_0x1bdb79,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x16de1d=requireRemoteScope(_0x4f1d86),_0x1cdc74=readLocalSkillContent(_0x1bdb79),_0x5e80c7={..._0x4f1d86,'appCode':_0x4f1d86[_0x371a83(0xb0)]??_0x1e5548,'skillName':_0x4f1d86[_0x371a83(0xb3)]??_0x6d4a4b?.[_0x371a83(0xb3)],'description':_0x4f1d86[_0x371a83(0xb9)]??_0x6d4a4b?.[_0x371a83(0xb9)],'example':_0x4f1d86[_0x371a83(0xe3)]??_0x6d4a4b?.[_0x371a83(0xe3)],'tags':Array['isArray'](_0x4f1d86[_0x371a83(0xc9)])?_0x4f1d86[_0x371a83(0xc9)]:_0x6d4a4b?.[_0x371a83(0xc9)],'sourceSessionId':_0x4f1d86['sourceSessionId']??_0x6d4a4b?.[_0x371a83(0xbd)],'content':_0x4f1d86[_0x371a83(0xda)]??_0x1cdc74},_0x22b53f=buildMetadata(_0x5e80c7,_0x16de1d,_0x1e5548,contentHash(_0x1cdc74),_0x5b5b4f[_0x371a83(0xcf)]);writeJsonAtomic(resolve(_0x1bdb79,METADATA_FILE),_0x22b53f);}export function recordPushedRuntimeSkill(_0x52f6f6,_0x23f540,_0x34da81,_0x554ed5={}){const _0x584cf4=a147_0x3bb5,_0x1e3f9d=resolvePushDirectoryRoot(_0x52f6f6),_0x15f8e5=scanSkillDirectory(_0x1e3f9d),_0x23329e=_0x15f8e5[_0x584cf4(0xb6)](_0x5bc337=>_0x5bc337['path']===SKILL_FILE),_0x429b81=_0x23329e?fileText(_0x23329e):'',_0x4b6bff=tryNormalizePackageManifest(_0x23f540[_0x584cf4(0xdd)]),_0x35fc9b={..._0x23f540,'content':_0x23f540[_0x584cf4(0xda)]??_0x429b81,'files':_0x4b6bff},_0x37b2e9=_0x4b6bff?normalizeLocalFiles(_0x15f8e5)[_0x584cf4(0xe9)](_0x4aa1cf=>_0x4b6bff[_0x584cf4(0xdd)][_0x584cf4(0xe6)](_0x389f1d=>_0x389f1d[_0x584cf4(0xc6)]===_0x4aa1cf[_0x584cf4(0xc6)])):undefined,_0x51c9fa=buildMetadata(_0x35fc9b,_0x554ed5[_0x584cf4(0xd0)]??_0x584cf4(0xe8),_0x34da81,contentHash(_0x35fc9b['content']??''),_0x554ed5[_0x584cf4(0xab)],_0x37b2e9);writeJsonAtomic(resolve(_0x1e3f9d,METADATA_FILE),_0x51c9fa);}function a147_0x3bb5(_0x2219b1,_0x4a040b){_0x2219b1=_0x2219b1-0xaa;const _0x536e3f=a147_0x536e();let _0x3bb593=_0x536e3f[_0x2219b1];return _0x3bb593;}export function deriveSkillCodeFromDirectory(_0x44ac6c,_0x34da43){const _0x1b4804=a147_0x3bb5,_0x3d27c5=basename(resolve(_0x44ac6c)),_0x8ea4f1=_0x34da43+'--';return _0x3d27c5['startsWith'](_0x8ea4f1)?_0x3d27c5[_0x1b4804(0xd4)](_0x8ea4f1[_0x1b4804(0xaf)]):_0x3d27c5;}function resolvePushSkillCode(_0x36820f,_0x2469b4,_0x527ae8,_0x213b6b){const _0xc07822=a147_0x3bb5,_0x1c0c20=deriveSkillCodeFromSkillFile(_0x36820f)||deriveSkillCodeFromDirectory(_0x36820f,_0x2469b4);if(_0x213b6b['ignoreMetadataSkillCode'])return _0x1c0c20;return _0x527ae8?.[_0xc07822(0xea)]?.[_0xc07822(0xba)]()||_0x1c0c20;}function deriveSkillCodeFromSkillFile(_0x17b968){const _0x23e8ff=a147_0x3bb5,_0x6077b0=resolve(_0x17b968,SKILL_FILE);if(!existsSync(_0x6077b0)||!lstatSync(_0x6077b0)[_0x23e8ff(0xc1)]())return undefined;const _0x473c4a=readFileSync(_0x6077b0,_0x23e8ff(0xdc)),_0x299191=_0x473c4a[_0x23e8ff(0xca)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x299191)return undefined;const _0x372ae6=parseFrontmatterObject(_0x299191[0x1]??''),_0x26f06f=scalarToString(_0x372ae6?.[_0x23e8ff(0xc0)]);return _0x26f06f?slugifySkillName(_0x26f06f):undefined;}function readSkillDisplayName(_0x11e057){const _0xd711bf=a147_0x3bb5,_0x41d545=_0x11e057[_0xd711bf(0xca)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x41d545)return undefined;const _0x216b27=parseFrontmatterObject(_0x41d545[0x1]??'');return scalarToString(_0x216b27?.[_0xd711bf(0xc3)]);}function slugifySkillName(_0xb7eb1a){const _0x2b6d65=a147_0x3bb5,_0x58d4cf=_0xb7eb1a[_0x2b6d65(0xba)]()[_0x2b6d65(0xd5)]()[_0x2b6d65(0xcd)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2b6d65(0xcd)](/^-+/,'')[_0x2b6d65(0xcd)](/-+$/,'')[_0x2b6d65(0xcd)](/-{2,}/g,'-');if(!_0x58d4cf)throw CliErrors[_0x2b6d65(0xce)](_0x2b6d65(0xd9)+SKILL_FILE+_0x2b6d65(0xe1));return _0x58d4cf;}function parseFrontmatterObject(_0x4ff298){const _0x2fab6c=a147_0x3bb5;try{const _0x181d89=a147_0x4c8feb(_0x4ff298);return _0x181d89&&typeof _0x181d89===_0x2fab6c(0xb8)&&!Array['isArray'](_0x181d89)?_0x181d89:undefined;}catch{return undefined;}}function scalarToString(_0x360b56){const _0x51d650=a147_0x3bb5;if(typeof _0x360b56==='string')return _0x360b56[_0x51d650(0xba)]();if(typeof _0x360b56===_0x51d650(0xc2)||typeof _0x360b56===_0x51d650(0xdb))return String(_0x360b56);return undefined;}function resolvePushDirectoryRoot(_0x1ce1b1){const _0x457d06=a147_0x3bb5,_0x24fece=resolve(_0x1ce1b1);if(!existsSync(_0x24fece))throw CliErrors[_0x457d06(0xce)](_0x457d06(0xae)+_0x1ce1b1);const _0x247a7d=lstatSync(_0x24fece);if(_0x247a7d['isDirectory']())return _0x24fece;if(_0x247a7d[_0x457d06(0xbe)]()){const _0x55e24a=realpathSync(_0x24fece);if(lstatSync(_0x55e24a)[_0x457d06(0xd8)]())return _0x55e24a;}throw CliErrors[_0x457d06(0xce)](_0x457d06(0xae)+_0x1ce1b1);}function requireRemoteScope(_0x3e7198){const _0x26ec78=a147_0x3bb5;if(_0x3e7198[_0x26ec78(0xd0)]===_0x26ec78(0xe8)||_0x3e7198['scope']==='company'||_0x3e7198[_0x26ec78(0xd0)]===_0x26ec78(0xe4))return _0x3e7198[_0x26ec78(0xd0)];throw CliErrors['validation'](_0x26ec78(0xc8)+(_0x3e7198[_0x26ec78(0xea)]||_0x26ec78(0xb7))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x3e7198['scope']??_0x26ec78(0xb1))+'\x22.');}function readLocalSkillContent(_0x238f32){const _0x5c34c0=a147_0x3bb5,_0x1733bb=resolve(_0x238f32,SKILL_FILE);return existsSync(_0x1733bb)&&lstatSync(_0x1733bb)[_0x5c34c0(0xc1)]()?readFileSync(_0x1733bb,_0x5c34c0(0xdc)):'';}function readPushMetadataIfPresent(_0x1ad2f0,_0x3213ef={}){const _0x18a168=a147_0x3bb5;try{return readMetadataIfPresent(_0x1ad2f0);}catch(_0x231f6d){if(_0x3213ef[_0x18a168(0xde)])return undefined;throw _0x231f6d;}}
@@ -1 +1 @@
1
- function a148_0x3903(_0x58642b,_0x497850){_0x58642b=_0x58642b-0x110;const _0x2d6e0e=a148_0x2d6e();let _0x39032f=_0x2d6e0e[_0x58642b];return _0x39032f;}function a148_0x2d6e(){const _0x39eccd=['validation','622mTBgPr','length','7134fKWewS','9531009XIAEWd','Unsupported\x20runtime\x20Skill\x20scope:\x20','company','895UqOMgr','39330258aVNjTP','10TDMeJh','19268ZUbPui','builtin','push','includes','120DZFzTF','24283ASRgtf','personal','1423134VbHKKZ','457256dRxIGF'];a148_0x2d6e=function(){return _0x39eccd;};return a148_0x2d6e();}(function(_0x3b18b9,_0x1d5c79){const _0x955e3f=a148_0x3903,_0x25ce0c=_0x3b18b9();while(!![]){try{const _0x19f2d5=-parseInt(_0x955e3f(0x110))/0x1+parseInt(_0x955e3f(0x112))/0x2*(-parseInt(_0x955e3f(0x114))/0x3)+parseInt(_0x955e3f(0x11b))/0x4*(-parseInt(_0x955e3f(0x118))/0x5)+parseInt(_0x955e3f(0x122))/0x6+-parseInt(_0x955e3f(0x120))/0x7*(parseInt(_0x955e3f(0x11f))/0x8)+parseInt(_0x955e3f(0x115))/0x9*(-parseInt(_0x955e3f(0x11a))/0xa)+parseInt(_0x955e3f(0x119))/0xb;if(_0x19f2d5===_0x1d5c79)break;else _0x25ce0c['push'](_0x25ce0c['shift']());}catch(_0x470451){_0x25ce0c['push'](_0x25ce0c['shift']());}}}(a148_0x2d6e,0x9ce0e));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x1bb0b8){const _0x5a7399=a148_0x3903,_0x3f10c4=_0x1bb0b8&&_0x1bb0b8[_0x5a7399(0x113)]>0x0?_0x1bb0b8:[_0x5a7399(0x121),'company',_0x5a7399(0x11c)],_0x1ec22b=[];for(const _0x90011f of _0x3f10c4){if(!isRuntimeSkillScope(_0x90011f))throw CliErrors[_0x5a7399(0x111)](_0x5a7399(0x116)+_0x90011f);!_0x1ec22b[_0x5a7399(0x11e)](_0x90011f)&&_0x1ec22b[_0x5a7399(0x11d)](_0x90011f);}return _0x1ec22b;}export function isRuntimeSkillScope(_0x569788){const _0x28f102=a148_0x3903;return _0x569788===_0x28f102(0x121)||_0x569788===_0x28f102(0x117)||_0x569788===_0x28f102(0x11c);}
1
+ (function(_0x25cfab,_0x446059){const _0x3ebc54=a148_0x5501,_0x45602a=_0x25cfab();while(!![]){try{const _0x1c64d9=-parseInt(_0x3ebc54(0x1eb))/0x1+-parseInt(_0x3ebc54(0x1f2))/0x2+parseInt(_0x3ebc54(0x1f4))/0x3+parseInt(_0x3ebc54(0x1ed))/0x4+-parseInt(_0x3ebc54(0x1f6))/0x5+parseInt(_0x3ebc54(0x1ee))/0x6+parseInt(_0x3ebc54(0x1f5))/0x7*(parseInt(_0x3ebc54(0x1f3))/0x8);if(_0x1c64d9===_0x446059)break;else _0x45602a['push'](_0x45602a['shift']());}catch(_0x835b62){_0x45602a['push'](_0x45602a['shift']());}}}(a148_0x4987,0x5076d));import{CliErrors}from'../../errors.js';function a148_0x5501(_0xdbf7f5,_0x51e0d7){_0xdbf7f5=_0xdbf7f5-0x1ea;const _0x4987a8=a148_0x4987();let _0x5501b2=_0x4987a8[_0xdbf7f5];return _0x5501b2;}export function normalizeRuntimeSkillScopes(_0x4236bb){const _0xf85f46=a148_0x5501,_0x204d37=_0x4236bb&&_0x4236bb[_0xf85f46(0x1ea)]>0x0?_0x4236bb:[_0xf85f46(0x1ec),'company',_0xf85f46(0x1f7)],_0x5e770b=[];for(const _0x54243b of _0x204d37){if(!isRuntimeSkillScope(_0x54243b))throw CliErrors[_0xf85f46(0x1f0)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x54243b);!_0x5e770b[_0xf85f46(0x1ef)](_0x54243b)&&_0x5e770b['push'](_0x54243b);}return _0x5e770b;}export function isRuntimeSkillScope(_0x54494e){const _0x2c010b=a148_0x5501;return _0x54494e===_0x2c010b(0x1ec)||_0x54494e===_0x2c010b(0x1f1)||_0x54494e===_0x2c010b(0x1f7);}function a148_0x4987(){const _0x229f52=['company','963998VaqNNU','7008504iUfnjP','1537812EDPDyp','7JYSuGF','2398955aLaPDP','builtin','length','192167tpYnpR','personal','266676vdBKhC','169212FrsFPb','includes','validation'];a148_0x4987=function(){return _0x229f52;};return a148_0x4987();}
@@ -1 +1 @@
1
- function a150_0x4a7c(){const _0x37191a=['validation_error','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','length','code','map','7659264WHhJHg','name','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1980-01-01T00:00:00.000Z','508tIggKk','validation','1121000VOTlru','7468590tWiohf','5141375rDTDot','1664362UiCSIi','from','3279taAeFM','1432504CgbwaS','sort'];a150_0x4a7c=function(){return _0x37191a;};return a150_0x4a7c();}const a150_0x2ff45b=a150_0x954d;(function(_0x3cf152,_0x201d82){const _0x4d4737=a150_0x954d,_0xb7d275=_0x3cf152();while(!![]){try{const _0x43e4aa=parseInt(_0x4d4737(0x1f9))/0x1+parseInt(_0x4d4737(0x1f3))/0x2+parseInt(_0x4d4737(0x1f8))/0x3*(-parseInt(_0x4d4737(0x1f1))/0x4)+-parseInt(_0x4d4737(0x1f5))/0x5+-parseInt(_0x4d4737(0x1f4))/0x6+parseInt(_0x4d4737(0x1f6))/0x7+parseInt(_0x4d4737(0x1ed))/0x8;if(_0x43e4aa===_0x201d82)break;else _0xb7d275['push'](_0xb7d275['shift']());}catch(_0x51f515){_0xb7d275['push'](_0xb7d275['shift']());}}}(a150_0x4a7c,0xbd887));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a150_0x2ff45b(0x1f0));export function createDeterministicZipPackage(_0x280a6f){const _0x7e0751=a150_0x2ff45b,_0x27d544={};for(const _0x281784 of normalizeLocalFiles(_0x280a6f)){_0x27d544[_0x281784['path']]=fileContent(_0x281784);}return Buffer[_0x7e0751(0x1f7)](zipSync(_0x27d544,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x24f34b){const _0x39ed35=a150_0x2ff45b;if(_0x24f34b[_0x39ed35(0x1ea)]<0x16)throw CliErrors[_0x39ed35(0x1f2)](_0x39ed35(0x1ef));let _0x17aa8a;try{_0x17aa8a=unzipSync(_0x24f34b,{'filter'(_0x41e29e){const _0x166516=_0x39ed35,_0x5e6961=normalizeSkillRelativePath(_0x41e29e[_0x166516(0x1ee)]);if(_0x5e6961['endsWith']('/'))throw CliErrors[_0x166516(0x1f2)](_0x166516(0x1e9)+_0x5e6961);return!![];}});}catch(_0x3c487f){if(isRuntimeSkillValidationError(_0x3c487f))throw _0x3c487f;throw CliErrors['validation'](_0x39ed35(0x1ef));}return Object[_0x39ed35(0x1e8)](_0x17aa8a)[_0x39ed35(0x1ec)](([_0xc7cb47,_0x528416])=>({'path':normalizeSkillRelativePath(_0xc7cb47),'bytes':Buffer[_0x39ed35(0x1f7)](_0x528416)}))[_0x39ed35(0x1e6)](compareSkillFiles);}function a150_0x954d(_0xfda74a,_0x2277a0){_0xfda74a=_0xfda74a-0x1e6;const _0x4a7c9a=a150_0x4a7c();let _0x954dac=_0x4a7c9a[_0xfda74a];return _0x954dac;}function isRuntimeSkillValidationError(_0x551964){const _0x3b1e27=a150_0x2ff45b;return typeof _0x551964==='object'&&_0x551964!==null&&'code'in _0x551964&&_0x551964[_0x3b1e27(0x1eb)]===_0x3b1e27(0x1e7);}
1
+ function a150_0x2b5f(){const _0x4ee920=['1980-01-01T00:00:00.000Z','endsWith','name','4882465TYEjzS','3062316HKWUab','validation_error','4718400KaSXcN','length','528878bwvtUY','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1857522ZPNfHO','validation','from','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1586635HplxdF','79299SlAjcn','6WqtXbs','entries'];a150_0x2b5f=function(){return _0x4ee920;};return a150_0x2b5f();}function a150_0x2908(_0x17d957,_0x29a4fe){_0x17d957=_0x17d957-0xe6;const _0x2b5f3a=a150_0x2b5f();let _0x2908b2=_0x2b5f3a[_0x17d957];return _0x2908b2;}const a150_0x358a71=a150_0x2908;(function(_0x129e3b,_0xb4865f){const _0x1b36b5=a150_0x2908,_0x484366=_0x129e3b();while(!![]){try{const _0x2d88b1=parseInt(_0x1b36b5(0xf1))/0x1+parseInt(_0x1b36b5(0xf3))/0x2+parseInt(_0x1b36b5(0xe6))/0x3+-parseInt(_0x1b36b5(0xed))/0x4+-parseInt(_0x1b36b5(0xf7))/0x5*(parseInt(_0x1b36b5(0xe7))/0x6)+parseInt(_0x1b36b5(0xec))/0x7+-parseInt(_0x1b36b5(0xef))/0x8;if(_0x2d88b1===_0xb4865f)break;else _0x484366['push'](_0x484366['shift']());}catch(_0x46965d){_0x484366['push'](_0x484366['shift']());}}}(a150_0x2b5f,0x7c3bd));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a150_0x358a71(0xe9));export function createDeterministicZipPackage(_0x3b2e59){const _0x336fde=a150_0x358a71,_0x190270={};for(const _0x156988 of normalizeLocalFiles(_0x3b2e59)){_0x190270[_0x156988['path']]=fileContent(_0x156988);}return Buffer[_0x336fde(0xf5)](zipSync(_0x190270,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x363a7c){const _0x1358fd=a150_0x358a71;if(_0x363a7c[_0x1358fd(0xf0)]<0x16)throw CliErrors[_0x1358fd(0xf4)](_0x1358fd(0xf2));let _0x4fadcf;try{_0x4fadcf=unzipSync(_0x363a7c,{'filter'(_0x3058c8){const _0x1d8725=_0x1358fd,_0x150b0c=normalizeSkillRelativePath(_0x3058c8[_0x1d8725(0xeb)]);if(_0x150b0c[_0x1d8725(0xea)]('/'))throw CliErrors[_0x1d8725(0xf4)](_0x1d8725(0xf6)+_0x150b0c);return!![];}});}catch(_0x37f6f4){if(isRuntimeSkillValidationError(_0x37f6f4))throw _0x37f6f4;throw CliErrors[_0x1358fd(0xf4)](_0x1358fd(0xf2));}return Object[_0x1358fd(0xe8)](_0x4fadcf)['map'](([_0x45e948,_0x4840a2])=>({'path':normalizeSkillRelativePath(_0x45e948),'bytes':Buffer[_0x1358fd(0xf5)](_0x4840a2)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x7de3c6){const _0x31681c=a150_0x358a71;return typeof _0x7de3c6==='object'&&_0x7de3c6!==null&&'code'in _0x7de3c6&&_0x7de3c6['code']===_0x31681c(0xee);}
@@ -1 +1 @@
1
- (function(_0x793ec9,_0x2044cd){const _0x5701c9=a151_0x4eb7,_0x471cf3=_0x793ec9();while(!![]){try{const _0x79550b=-parseInt(_0x5701c9(0x136))/0x1+parseInt(_0x5701c9(0x11f))/0x2+-parseInt(_0x5701c9(0x134))/0x3*(parseInt(_0x5701c9(0x12e))/0x4)+-parseInt(_0x5701c9(0x131))/0x5+-parseInt(_0x5701c9(0x123))/0x6*(-parseInt(_0x5701c9(0x13f))/0x7)+-parseInt(_0x5701c9(0x124))/0x8*(parseInt(_0x5701c9(0x116))/0x9)+parseInt(_0x5701c9(0x12c))/0xa;if(_0x79550b===_0x2044cd)break;else _0x471cf3['push'](_0x471cf3['shift']());}catch(_0x1ff423){_0x471cf3['push'](_0x471cf3['shift']());}}}(a151_0x3e31,0x9fd6d));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(_0xaa420c){const _0x312bc7=a151_0x4eb7,_0x2ec61b=normalizeLocalFiles(_0xaa420c);if(!_0x2ec61b[_0x312bc7(0x12d)](_0x479a19=>_0x479a19[_0x312bc7(0x11c)]===SKILL_FILE))throw CliErrors[_0x312bc7(0x120)](_0x312bc7(0x122)+SKILL_FILE+_0x312bc7(0x128));const _0x479d4f=localFilesToManifestFiles(_0x2ec61b),_0x3c8654=createDeterministicZipPackage(_0x2ec61b);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x479d4f),'zipSha256':bufferSha256(_0x3c8654),'zipSize':_0x3c8654['length'],'files':_0x479d4f},'packageBytes':_0x3c8654,'packageBase64':_0x3c8654[_0x312bc7(0x133)](_0x312bc7(0x118))};}export function verifyRuntimeSkillPackage(_0x141cbf,_0x3cb8ca){const _0x2428ea=a151_0x4eb7,_0x4e55d7=normalizePackageManifest(_0x141cbf,{'requireOssPath':![]});if(!_0x4e55d7)throw CliErrors[_0x2428ea(0x120)](_0x2428ea(0x141));return extractAndVerifyPackage(_0x4e55d7,_0x3cb8ca);}export function verifyRuntimeSkillBundle(_0x3ae6f2,_0x4c0d94){const _0x31b3c2=a151_0x4eb7,_0xf147f8=normalizePackageManifest(_0x3ae6f2,{'requireOssPath':![]});if(!_0xf147f8)throw CliErrors[_0x31b3c2(0x120)](_0x31b3c2(0x141));return extractAndVerifyPackageFiles(_0xf147f8,_0x4c0d94);}export function tryNormalizePackageManifest(_0x47327d){return normalizePackageManifest(_0x47327d,{'requireOssPath':![]});}function a151_0x3e31(){const _0x58854c=['treeSha256','length','Runtime\x20Skill\x20package\x20is\x20missing\x20','zipSha256','map','files','schemaVersion','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','7BFjHFi','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','trim','set','toLowerCase','263637femmHK','isArray','base64','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','zipSize','ossPath','path','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','object','2488336nloFwE','validation','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Missing\x20','438054FVpJeR','304BLgqJX','isSafeInteger','sha256','requireOssPath','\x20in\x20Skill\x20file\x20package.','bytes','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','get','20223320QPXaJN','some','2939740jnWQAk','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','size','1318000CqnbGX','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','toString','3sFxNCQ','has','573139DZQeWF'];a151_0x3e31=function(){return _0x58854c;};return a151_0x3e31();}export function requirePackageBytes(_0x4a3f2b,_0x1b9e84){const _0x59b38a=a151_0x4eb7;if(!_0x1b9e84||_0x1b9e84[_0x59b38a(0x138)]===0x0)throw CliErrors[_0x59b38a(0x120)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x4a3f2b);return _0x1b9e84;}export function extractDownloadedPackage(_0x531337){const _0x2c68ed=a151_0x4eb7,_0xc2e397=parseZipPackage(_0x531337)[_0x2c68ed(0x13b)](_0x595cd2=>({'path':_0x595cd2[_0x2c68ed(0x11c)],'bytes':_0x595cd2[_0x2c68ed(0x129)]}));if(!_0xc2e397[_0x2c68ed(0x12d)](_0x68afd7=>_0x68afd7[_0x2c68ed(0x11c)]===SKILL_FILE))throw CliErrors[_0x2c68ed(0x120)](_0x2c68ed(0x139)+SKILL_FILE+'.');return normalizeLocalFiles(_0xc2e397);}export function localFilesToManifestFiles(_0x227ef2){const _0x32a5e0=a151_0x4eb7;return normalizeLocalFiles(_0x227ef2)[_0x32a5e0(0x13b)](_0x59621c=>({'path':_0x59621c[_0x32a5e0(0x11c)],'sha256':fileHash(_0x59621c),'size':fileContent(_0x59621c)[_0x32a5e0(0x138)]}));}function normalizePackageManifest(_0x38a7a6,_0x2705d2){const _0x234c4b=a151_0x4eb7;if(!_0x38a7a6||typeof _0x38a7a6!==_0x234c4b(0x11e)||Array[_0x234c4b(0x117)](_0x38a7a6))return undefined;const _0x77310d=_0x38a7a6,_0x465b6b=typeof _0x77310d[_0x234c4b(0x11b)]==='string'?_0x77310d[_0x234c4b(0x11b)][_0x234c4b(0x142)]():undefined;if(_0x2705d2[_0x234c4b(0x127)]&&!_0x465b6b)return undefined;if(!Array[_0x234c4b(0x117)](_0x77310d['files'])||_0x77310d['files'][_0x234c4b(0x138)]===0x0)return undefined;if(!isSha256Hex(_0x77310d[_0x234c4b(0x137)]))throw CliErrors['validation'](_0x234c4b(0x140));if(!isSha256Hex(_0x77310d['zipSha256']))throw CliErrors['validation'](_0x234c4b(0x119));if(!Number[_0x234c4b(0x125)](_0x77310d[_0x234c4b(0x11a)])||_0x77310d[_0x234c4b(0x11a)]<0x0)throw CliErrors[_0x234c4b(0x120)](_0x234c4b(0x132));const _0x4bc351=normalizeManifestFiles(_0x77310d[_0x234c4b(0x13c)]);if(!_0x4bc351[_0x234c4b(0x12d)](_0x29c2d7=>_0x29c2d7[_0x234c4b(0x11c)]===SKILL_FILE))throw CliErrors[_0x234c4b(0x120)](_0x234c4b(0x12f)+SKILL_FILE+'.');const _0xebe21d=fileTreeHash(_0x4bc351);if(_0xebe21d!==_0x77310d['treeSha256'][_0x234c4b(0x115)]())throw CliErrors['validation'](_0x234c4b(0x13e));return{'schemaVersion':Number[_0x234c4b(0x125)](_0x77310d['schemaVersion'])?_0x77310d[_0x234c4b(0x13d)]:0x2,'ossPath':_0x465b6b,'treeSha256':_0xebe21d,'zipSha256':_0x77310d[_0x234c4b(0x13a)]['toLowerCase'](),'zipSize':_0x77310d[_0x234c4b(0x11a)],'files':_0x4bc351};}function a151_0x4eb7(_0x405217,_0x4ce977){_0x405217=_0x405217-0x115;const _0x3e310a=a151_0x3e31();let _0x4eb765=_0x3e310a[_0x405217];return _0x4eb765;}function extractAndVerifyPackage(_0x48a5da,_0x507120){const _0x5beb48=a151_0x4eb7,_0x801084=normalizePackageManifest(_0x48a5da,{'requireOssPath':![]});if(!_0x801084)throw CliErrors[_0x5beb48(0x120)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x507120[_0x5beb48(0x138)]!==_0x801084[_0x5beb48(0x11a)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x441c0a=bufferSha256(_0x507120);if(_0x441c0a!==_0x801084[_0x5beb48(0x13a)])throw CliErrors['validation'](_0x5beb48(0x121));return extractAndVerifyPackageFiles(_0x801084,_0x507120);}function extractAndVerifyPackageFiles(_0x5959f9,_0x11599c){const _0x49fb88=a151_0x4eb7,_0x1dbf99=parseZipPackage(_0x11599c);if(_0x1dbf99['length']!==_0x5959f9[_0x49fb88(0x13c)][_0x49fb88(0x138)])throw CliErrors[_0x49fb88(0x120)](_0x49fb88(0x11d));const _0x2de272=new Map();for(const _0xc6f8bf of _0x1dbf99){if(_0x2de272[_0x49fb88(0x135)](_0xc6f8bf[_0x49fb88(0x11c)]))throw CliErrors[_0x49fb88(0x120)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0xc6f8bf['path']);_0x2de272[_0x49fb88(0x143)](_0xc6f8bf[_0x49fb88(0x11c)],_0xc6f8bf);}const _0x22b0b0=[];for(const _0x2ba735 of _0x5959f9[_0x49fb88(0x13c)]){const _0x5ad5bb=_0x2de272[_0x49fb88(0x12b)](_0x2ba735['path']);if(!_0x5ad5bb)throw CliErrors[_0x49fb88(0x120)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x2ba735['path']);if(_0x5ad5bb[_0x49fb88(0x129)][_0x49fb88(0x138)]!==_0x2ba735[_0x49fb88(0x130)])throw CliErrors[_0x49fb88(0x120)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x2ba735['path']);const _0xc3d22d=bufferSha256(_0x5ad5bb[_0x49fb88(0x129)]);if(_0xc3d22d!==_0x2ba735[_0x49fb88(0x126)])throw CliErrors[_0x49fb88(0x120)](_0x49fb88(0x12a)+_0x2ba735[_0x49fb88(0x11c)]);_0x22b0b0['push']({'path':_0x2ba735[_0x49fb88(0x11c)],'bytes':_0x5ad5bb[_0x49fb88(0x129)]});}return normalizeLocalFiles(_0x22b0b0);}
1
+ (function(_0x547931,_0x1c7942){const _0x489a4f=a151_0x6b8f,_0x5d39d6=_0x547931();while(!![]){try{const _0x35d7e0=-parseInt(_0x489a4f(0x9a))/0x1+-parseInt(_0x489a4f(0x81))/0x2+-parseInt(_0x489a4f(0x93))/0x3*(-parseInt(_0x489a4f(0x71))/0x4)+-parseInt(_0x489a4f(0x95))/0x5*(-parseInt(_0x489a4f(0x9b))/0x6)+-parseInt(_0x489a4f(0x83))/0x7+-parseInt(_0x489a4f(0x9f))/0x8+parseInt(_0x489a4f(0x80))/0x9*(parseInt(_0x489a4f(0x77))/0xa);if(_0x35d7e0===_0x1c7942)break;else _0x5d39d6['push'](_0x5d39d6['shift']());}catch(_0x394dbb){_0x5d39d6['push'](_0x5d39d6['shift']());}}}(a151_0x2fba,0xcc067));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';function a151_0x6b8f(_0x16b745,_0x2f9059){_0x16b745=_0x16b745-0x6f;const _0x2fbaba=a151_0x2fba();let _0x6b8f98=_0x2fbaba[_0x16b745];return _0x6b8f98;}function a151_0x2fba(){const _0x5c5c6b=['zipSize','isSafeInteger','723328XGbWdL','object','isArray','72LmaoBI','ossPath','string','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','toString','Missing\x20','21143120XusAXo','size','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','toLowerCase','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Duplicate\x20Skill\x20package\x20entry:\x20','push','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','9GTnQHv','3233602BkaRXS','Runtime\x20Skill\x20package\x20is\x20missing\x20','4049871NgeHeP','files','validation','path','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','get','treeSha256','map','trim','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','has','zipSha256','bytes','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','length','set','210495hHehlb','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','6679235PmRYki','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','some','requireOssPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','1591672urOhqT','6dbpfrG','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'];a151_0x2fba=function(){return _0x5c5c6b;};return a151_0x2fba();}import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x167a84){const _0x2e129=a151_0x6b8f,_0x102d25=normalizeLocalFiles(_0x167a84);if(!_0x102d25[_0x2e129(0x97)](_0x2ba3d8=>_0x2ba3d8[_0x2e129(0x86)]===SKILL_FILE))throw CliErrors['validation'](_0x2e129(0x76)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x5b4702=localFilesToManifestFiles(_0x102d25),_0x5175c0=createDeterministicZipPackage(_0x102d25);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5b4702),'zipSha256':bufferSha256(_0x5175c0),'zipSize':_0x5175c0[_0x2e129(0x91)],'files':_0x5b4702},'packageBytes':_0x5175c0,'packageBase64':_0x5175c0[_0x2e129(0x75)]('base64')};}export function verifyRuntimeSkillPackage(_0x433ca0,_0x377f0f){const _0x2f30bc=normalizePackageManifest(_0x433ca0,{'requireOssPath':![]});if(!_0x2f30bc)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x2f30bc,_0x377f0f);}export function verifyRuntimeSkillBundle(_0x4825e9,_0x3f477d){const _0x535686=a151_0x6b8f,_0x5137d1=normalizePackageManifest(_0x4825e9,{'requireOssPath':![]});if(!_0x5137d1)throw CliErrors[_0x535686(0x85)](_0x535686(0x7f));return extractAndVerifyPackageFiles(_0x5137d1,_0x3f477d);}export function tryNormalizePackageManifest(_0x3113bb){return normalizePackageManifest(_0x3113bb,{'requireOssPath':![]});}export function requirePackageBytes(_0x39744d,_0xcc325d){const _0x2e18b6=a151_0x6b8f;if(!_0xcc325d||_0xcc325d[_0x2e18b6(0x91)]===0x0)throw CliErrors['validation'](_0x2e18b6(0x7b)+_0x39744d);return _0xcc325d;}export function extractDownloadedPackage(_0x56466b){const _0x85f784=a151_0x6b8f,_0x545ad2=parseZipPackage(_0x56466b)[_0x85f784(0x8a)](_0x4f4ee7=>({'path':_0x4f4ee7['path'],'bytes':_0x4f4ee7[_0x85f784(0x8f)]}));if(!_0x545ad2[_0x85f784(0x97)](_0x10c57b=>_0x10c57b[_0x85f784(0x86)]===SKILL_FILE))throw CliErrors[_0x85f784(0x85)](_0x85f784(0x82)+SKILL_FILE+'.');return normalizeLocalFiles(_0x545ad2);}export function localFilesToManifestFiles(_0x5f3e82){const _0x42b90b=a151_0x6b8f;return normalizeLocalFiles(_0x5f3e82)[_0x42b90b(0x8a)](_0x333ee1=>({'path':_0x333ee1['path'],'sha256':fileHash(_0x333ee1),'size':fileContent(_0x333ee1)[_0x42b90b(0x91)]}));}function normalizePackageManifest(_0x1688e4,_0x35b2f3){const _0x57e85f=a151_0x6b8f;if(!_0x1688e4||typeof _0x1688e4!==_0x57e85f(0x6f)||Array[_0x57e85f(0x70)](_0x1688e4))return undefined;const _0x47b3a1=_0x1688e4,_0x3939e1=typeof _0x47b3a1[_0x57e85f(0x72)]===_0x57e85f(0x73)?_0x47b3a1['ossPath'][_0x57e85f(0x8b)]():undefined;if(_0x35b2f3[_0x57e85f(0x98)]&&!_0x3939e1)return undefined;if(!Array[_0x57e85f(0x70)](_0x47b3a1[_0x57e85f(0x84)])||_0x47b3a1[_0x57e85f(0x84)][_0x57e85f(0x91)]===0x0)return undefined;if(!isSha256Hex(_0x47b3a1[_0x57e85f(0x89)]))throw CliErrors[_0x57e85f(0x85)](_0x57e85f(0x87));if(!isSha256Hex(_0x47b3a1[_0x57e85f(0x8e)]))throw CliErrors[_0x57e85f(0x85)](_0x57e85f(0x96));if(!Number[_0x57e85f(0x9e)](_0x47b3a1[_0x57e85f(0x9d)])||_0x47b3a1[_0x57e85f(0x9d)]<0x0)throw CliErrors[_0x57e85f(0x85)](_0x57e85f(0x94));const _0x3e8143=normalizeManifestFiles(_0x47b3a1['files']);if(!_0x3e8143[_0x57e85f(0x97)](_0x17af3e=>_0x17af3e[_0x57e85f(0x86)]===SKILL_FILE))throw CliErrors[_0x57e85f(0x85)](_0x57e85f(0x79)+SKILL_FILE+'.');const _0x849e5b=fileTreeHash(_0x3e8143);if(_0x849e5b!==_0x47b3a1[_0x57e85f(0x89)]['toLowerCase']())throw CliErrors[_0x57e85f(0x85)](_0x57e85f(0x99));return{'schemaVersion':Number[_0x57e85f(0x9e)](_0x47b3a1['schemaVersion'])?_0x47b3a1['schemaVersion']:0x2,'ossPath':_0x3939e1,'treeSha256':_0x849e5b,'zipSha256':_0x47b3a1['zipSha256'][_0x57e85f(0x7a)](),'zipSize':_0x47b3a1[_0x57e85f(0x9d)],'files':_0x3e8143};}function extractAndVerifyPackage(_0x3ff052,_0x1c0da8){const _0x5a2fb4=a151_0x6b8f,_0x278237=normalizePackageManifest(_0x3ff052,{'requireOssPath':![]});if(!_0x278237)throw CliErrors[_0x5a2fb4(0x85)](_0x5a2fb4(0x7f));if(_0x1c0da8['length']!==_0x278237[_0x5a2fb4(0x9d)])throw CliErrors[_0x5a2fb4(0x85)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x2f5d24=bufferSha256(_0x1c0da8);if(_0x2f5d24!==_0x278237[_0x5a2fb4(0x8e)])throw CliErrors[_0x5a2fb4(0x85)](_0x5a2fb4(0x90));return extractAndVerifyPackageFiles(_0x278237,_0x1c0da8);}function extractAndVerifyPackageFiles(_0x20b777,_0x527bbe){const _0x417957=a151_0x6b8f,_0xbfd7dc=parseZipPackage(_0x527bbe);if(_0xbfd7dc['length']!==_0x20b777[_0x417957(0x84)][_0x417957(0x91)])throw CliErrors['validation'](_0x417957(0x74));const _0x11995e=new Map();for(const _0x2d3e0a of _0xbfd7dc){if(_0x11995e[_0x417957(0x8d)](_0x2d3e0a[_0x417957(0x86)]))throw CliErrors[_0x417957(0x85)](_0x417957(0x7d)+_0x2d3e0a[_0x417957(0x86)]);_0x11995e[_0x417957(0x92)](_0x2d3e0a[_0x417957(0x86)],_0x2d3e0a);}const _0x294725=[];for(const _0x40cd77 of _0x20b777['files']){const _0x3b5d14=_0x11995e[_0x417957(0x88)](_0x40cd77[_0x417957(0x86)]);if(!_0x3b5d14)throw CliErrors[_0x417957(0x85)](_0x417957(0x9c)+_0x40cd77[_0x417957(0x86)]);if(_0x3b5d14['bytes'][_0x417957(0x91)]!==_0x40cd77[_0x417957(0x78)])throw CliErrors['validation'](_0x417957(0x7c)+_0x40cd77[_0x417957(0x86)]);const _0x2c945f=bufferSha256(_0x3b5d14[_0x417957(0x8f)]);if(_0x2c945f!==_0x40cd77['sha256'])throw CliErrors[_0x417957(0x85)](_0x417957(0x8c)+_0x40cd77[_0x417957(0x86)]);_0x294725[_0x417957(0x7e)]({'path':_0x40cd77['path'],'bytes':_0x3b5d14[_0x417957(0x8f)]});}return normalizeLocalFiles(_0x294725);}
@@ -1 +1 @@
1
- (function(_0x4cda8e,_0x50905e){var _0x555de1=a152_0x1015,_0x371717=_0x4cda8e();while(!![]){try{var _0x17d8d6=parseInt(_0x555de1(0x126))/0x1+-parseInt(_0x555de1(0x129))/0x2*(parseInt(_0x555de1(0x12c))/0x3)+parseInt(_0x555de1(0x12e))/0x4*(parseInt(_0x555de1(0x127))/0x5)+-parseInt(_0x555de1(0x128))/0x6+-parseInt(_0x555de1(0x12b))/0x7+-parseInt(_0x555de1(0x12d))/0x8*(-parseInt(_0x555de1(0x124))/0x9)+-parseInt(_0x555de1(0x12a))/0xa*(parseInt(_0x555de1(0x125))/0xb);if(_0x17d8d6===_0x50905e)break;else _0x371717['push'](_0x371717['shift']());}catch(_0x32266f){_0x371717['push'](_0x371717['shift']());}}}(a152_0x26a6,0x1d634));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,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';function a152_0x1015(_0x5af0eb,_0x1912cc){_0x5af0eb=_0x5af0eb-0x124;var _0x26a661=a152_0x26a6();var _0x101582=_0x26a661[_0x5af0eb];return _0x101582;}export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';function a152_0x26a6(){var _0x1488a0=['7045QQSifm','458100pAYYUj','116hOhaYa','10XFvjpu','1042979JieFzx','5289QTlwgA','26208zRhXik','628DTLPAz','306RNWIYc','62018KizGHk','121014lhPEfn'];a152_0x26a6=function(){return _0x1488a0;};return a152_0x26a6();}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
1
+ function a152_0x10a2(){var _0x467b43=['145YaJWKb','11375859afiFmB','453976mblqjP','5616989yaipkM','304898PmGOae','12ORkWeu','50394WyEEFy','304ZIPbYP','259515ZJkxSL','2814656JzXAiE','10TBdpum'];a152_0x10a2=function(){return _0x467b43;};return a152_0x10a2();}(function(_0x20e9cd,_0x428e3c){var _0x1215d7=a152_0xbe1a,_0x2af3f=_0x20e9cd();while(!![]){try{var _0x278059=-parseInt(_0x1215d7(0x14d))/0x1+-parseInt(_0x1215d7(0x14b))/0x2*(parseInt(_0x1215d7(0x14e))/0x3)+parseInt(_0x1215d7(0x147))/0x4+parseInt(_0x1215d7(0x149))/0x5*(-parseInt(_0x1215d7(0x14f))/0x6)+-parseInt(_0x1215d7(0x14c))/0x7+-parseInt(_0x1215d7(0x150))/0x8*(-parseInt(_0x1215d7(0x146))/0x9)+parseInt(_0x1215d7(0x148))/0xa*(parseInt(_0x1215d7(0x14a))/0xb);if(_0x278059===_0x428e3c)break;else _0x2af3f['push'](_0x2af3f['shift']());}catch(_0x30d6eb){_0x2af3f['push'](_0x2af3f['shift']());}}}(a152_0x10a2,0x8c4fb));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a152_0xbe1a(_0x1cee35,_0x52f0cd){_0x1cee35=_0x1cee35-0x146;var _0x10a210=a152_0x10a2();var _0xbe1a95=_0x10a210[_0x1cee35];return _0xbe1a95;}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- const a153_0x3a3c3b=a153_0x118c;(function(_0x565019,_0x458e67){const _0x57d196=a153_0x118c,_0x59f850=_0x565019();while(!![]){try{const _0x32e296=-parseInt(_0x57d196(0x1a5))/0x1+-parseInt(_0x57d196(0x1a7))/0x2+-parseInt(_0x57d196(0x1c0))/0x3*(-parseInt(_0x57d196(0x1ba))/0x4)+-parseInt(_0x57d196(0x1b5))/0x5*(-parseInt(_0x57d196(0x1b9))/0x6)+parseInt(_0x57d196(0x1b6))/0x7*(parseInt(_0x57d196(0x1c3))/0x8)+parseInt(_0x57d196(0x1aa))/0x9+-parseInt(_0x57d196(0x1a3))/0xa;if(_0x32e296===_0x458e67)break;else _0x59f850['push'](_0x59f850['shift']());}catch(_0x56fa8e){_0x59f850['push'](_0x59f850['shift']());}}}(a153_0xc01d,0xe8994));import{existsSync,readFileSync}from'node:fs';function a153_0xc01d(){const _0x3bf1a8=['.skill-lock.json','7684504GckVib','23756680qjwpTO','\x20records\x20\x22','524306PItBFS','utf8','2184038ZjykSg','\x20is\x20unreadable:\x20','not-recorded','14533947NOzWcE','kind','.agents','reason','unverifiable','version','find','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','parse','includes','unusable','1277585gMokkv','7CDOPRW','map','skills','42RPojDO','1161304PItzvw','SKILL.md','message','present','\x20uses\x20unsupported\x20version\x20','join','6rqfSzB','.claude'];a153_0xc01d=function(){return _0x3bf1a8;};return a153_0xc01d();}import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a153_0x3a3c3b(0x1ac),a153_0x3a3c3b(0x1c2));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a153_0x3a3c3b(0x1b8)),join(a153_0x3a3c3b(0x1c1),a153_0x3a3c3b(0x1b8))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x332505,_0x16f56f){const _0x340aca=a153_0x3a3c3b;if(!existsSync(_0x332505))return{'kind':'not-recorded'};let _0xed8faf;try{_0xed8faf=JSON[_0x340aca(0x1b2)](readFileSync(_0x332505,_0x340aca(0x1a6)));}catch(_0x9f969d){return{'kind':'unusable','reason':_0x332505+_0x340aca(0x1a8)+_0x9f969d[_0x340aca(0x1bc)]};}const _0x52119a=_0xed8faf;if(typeof _0x52119a?.[_0x340aca(0x1af)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x340aca(0x1b3)](_0x52119a['version']))return{'kind':_0x340aca(0x1b4),'reason':_0x332505+_0x340aca(0x1be)+String(_0x52119a?.['version'])};if(!_0x52119a[_0x340aca(0x1b8)]||typeof _0x52119a[_0x340aca(0x1b8)]!=='object')return{'kind':_0x340aca(0x1b4),'reason':_0x332505+'\x20has\x20no\x20skills\x20map'};return _0x52119a['skills'][_0x16f56f]?{'kind':'recorded'}:{'kind':_0x340aca(0x1a9)};}function a153_0x118c(_0x199b09,_0x4178e9){_0x199b09=_0x199b09-0x1a3;const _0xc01d98=a153_0xc01d();let _0x118c4d=_0xc01d98[_0x199b09];return _0x118c4d;}export function resolveInstalledSkill(_0x322a6b,_0x380613){const _0x173240=a153_0x3a3c3b,_0x499454=_0x380613?.['home']??homedir(),_0x2347d5=_0x380613?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x173240(0x1b7)](_0x37827c=>join(_0x499454,_0x37827c)),_0xdfbfb9=_0x380613?.['lockFile']??join(_0x499454,SKILL_LOCK_RELATIVE_PATH),_0x3fda11=_0x2347d5[_0x173240(0x1b7)](_0x56a049=>join(_0x56a049,_0x322a6b,_0x173240(0x1bb))),_0x5223e9=_0x3fda11[_0x173240(0x1b0)](_0x4681ff=>existsSync(_0x4681ff));if(_0x5223e9)return{'state':_0x173240(0x1bd),'path':_0x5223e9};const _0x3678d8=readLockLookup(_0xdfbfb9,_0x322a6b);if(_0x3678d8[_0x173240(0x1ab)]===_0x173240(0x1b4))return{'state':_0x173240(0x1ae),'reason':_0x3678d8[_0x173240(0x1ad)]};if(_0x3678d8[_0x173240(0x1ab)]==='recorded')return{'state':'unverifiable','reason':_0xdfbfb9+_0x173240(0x1a4)+_0x322a6b+_0x173240(0x1b1)+('('+_0x3fda11[_0x173240(0x1bf)](',\x20')+')')};return{'state':'absent','checked':_0x3fda11};}
1
+ const a153_0x33de17=a153_0x351f;function a153_0x168b(){const _0x12509d=['map','home','SKILL.md','90uEoxMe','absent','includes','13835EKgsxc','.skill-lock.json','\x20records\x20\x22','246zdZKgP','1439919hXgyqj','15596BoMgMC','find','\x20has\x20no\x20skills\x20map','.claude','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','104553xUVadm','.agents','1135604QHnBYq','1242JEOZEQ','3734024bWplXb','unverifiable','message','version','3765949AnHLrv','globalSkillsDirs','parse','utf8','kind','number','skills','unusable','40xWgapd','lockFile','not-recorded','\x20uses\x20unsupported\x20version\x20','reason'];a153_0x168b=function(){return _0x12509d;};return a153_0x168b();}function a153_0x351f(_0x3c072b,_0x466c13){_0x3c072b=_0x3c072b-0x6a;const _0x168b07=a153_0x168b();let _0x351fcb=_0x168b07[_0x3c072b];return _0x351fcb;}(function(_0x2f9ad8,_0x20dfbb){const _0x382386=a153_0x351f,_0x309506=_0x2f9ad8();while(!![]){try{const _0x275867=-parseInt(_0x382386(0x6c))/0x1+-parseInt(_0x382386(0x74))/0x2+parseInt(_0x382386(0x6b))/0x3*(-parseInt(_0x382386(0x6d))/0x4)+-parseInt(_0x382386(0x8d))/0x5*(-parseInt(_0x382386(0x75))/0x6)+-parseInt(_0x382386(0x76))/0x7+parseInt(_0x382386(0x82))/0x8*(-parseInt(_0x382386(0x72))/0x9)+-parseInt(_0x382386(0x8a))/0xa*(-parseInt(_0x382386(0x7a))/0xb);if(_0x275867===_0x20dfbb)break;else _0x309506['push'](_0x309506['shift']());}catch(_0x2f24ab){_0x309506['push'](_0x309506['shift']());}}}(a153_0x168b,0xb3744));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a153_0x33de17(0x73),a153_0x33de17(0x8e));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a153_0x33de17(0x73),a153_0x33de17(0x80)),join(a153_0x33de17(0x70),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x53e360,_0x4cb659){const _0x30e68c=a153_0x33de17;if(!existsSync(_0x53e360))return{'kind':'not-recorded'};let _0x3b498e;try{_0x3b498e=JSON[_0x30e68c(0x7c)](readFileSync(_0x53e360,_0x30e68c(0x7d)));}catch(_0x3592b5){return{'kind':'unusable','reason':_0x53e360+'\x20is\x20unreadable:\x20'+_0x3592b5[_0x30e68c(0x78)]};}const _0x1696e1=_0x3b498e;if(typeof _0x1696e1?.[_0x30e68c(0x79)]!==_0x30e68c(0x7f)||!SUPPORTED_LOCK_VERSIONS[_0x30e68c(0x8c)](_0x1696e1['version']))return{'kind':'unusable','reason':_0x53e360+_0x30e68c(0x85)+String(_0x1696e1?.[_0x30e68c(0x79)])};if(!_0x1696e1[_0x30e68c(0x80)]||typeof _0x1696e1[_0x30e68c(0x80)]!=='object')return{'kind':_0x30e68c(0x81),'reason':_0x53e360+_0x30e68c(0x6f)};return _0x1696e1[_0x30e68c(0x80)][_0x4cb659]?{'kind':'recorded'}:{'kind':_0x30e68c(0x84)};}export function resolveInstalledSkill(_0x248bde,_0x17cce5){const _0x4e886c=a153_0x33de17,_0x3afe79=_0x17cce5?.[_0x4e886c(0x88)]??homedir(),_0x106c5e=_0x17cce5?.[_0x4e886c(0x7b)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x4e886c(0x87)](_0x43dbba=>join(_0x3afe79,_0x43dbba)),_0x52549d=_0x17cce5?.[_0x4e886c(0x83)]??join(_0x3afe79,SKILL_LOCK_RELATIVE_PATH),_0x5ab899=_0x106c5e[_0x4e886c(0x87)](_0x3d8790=>join(_0x3d8790,_0x248bde,_0x4e886c(0x89))),_0x3d1fc7=_0x5ab899[_0x4e886c(0x6e)](_0x2ae6b4=>existsSync(_0x2ae6b4));if(_0x3d1fc7)return{'state':'present','path':_0x3d1fc7};const _0x52be63=readLockLookup(_0x52549d,_0x248bde);if(_0x52be63['kind']===_0x4e886c(0x81))return{'state':_0x4e886c(0x77),'reason':_0x52be63[_0x4e886c(0x86)]};if(_0x52be63[_0x4e886c(0x7e)]==='recorded')return{'state':_0x4e886c(0x77),'reason':_0x52549d+_0x4e886c(0x6a)+_0x248bde+_0x4e886c(0x71)+('('+_0x5ab899['join'](',\x20')+')')};return{'state':_0x4e886c(0x8b),'checked':_0x5ab899};}
@@ -1 +1 @@
1
- const a154_0x3a94da=a154_0x5d50;function a154_0x5d50(_0x1a9208,_0x1f2191){_0x1a9208=_0x1a9208-0x159;const _0x4a6b7e=a154_0x4a6b();let _0x5d50d2=_0x4a6b7e[_0x1a9208];return _0x5d50d2;}function a154_0x4a6b(){const _0x4095e6=['accessKey','hasOwnProperty','3067113WAzzQm','apps','test','2729460HfoHpy','entries','length','isArray','prototype','slice','28685592bOKVeU','427568AUBTLD','string','2IIrcWY','object','538605yshMdu','28zwfKnk','<redacted>','call','repeat','2704617yTOBsv','1023455POXOwK'];a154_0x4a6b=function(){return _0x4095e6;};return a154_0x4a6b();}(function(_0x27b49f,_0x52990d){const _0x2ea1ee=a154_0x5d50,_0xc761de=_0x27b49f();while(!![]){try{const _0x15542f=parseInt(_0x2ea1ee(0x15c))/0x1*(-parseInt(_0x2ea1ee(0x16b))/0x2)+-parseInt(_0x2ea1ee(0x15b))/0x3+-parseInt(_0x2ea1ee(0x16e))/0x4*(parseInt(_0x2ea1ee(0x16d))/0x5)+-parseInt(_0x2ea1ee(0x162))/0x6+parseInt(_0x2ea1ee(0x15f))/0x7+parseInt(_0x2ea1ee(0x169))/0x8+parseInt(_0x2ea1ee(0x168))/0x9;if(_0x15542f===_0x52990d)break;else _0xc761de['push'](_0xc761de['shift']());}catch(_0x357ecc){_0xc761de['push'](_0xc761de['shift']());}}}(a154_0x4a6b,0x850ae));const REDACTED_ACCESS_KEY=a154_0x3a94da(0x16f);export function maskCliAccessKey(_0x77d419){const _0x4deaa4=a154_0x3a94da;if(typeof _0x77d419!==_0x4deaa4(0x16a)||_0x77d419[_0x4deaa4(0x164)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x77d419[_0x4deaa4(0x167)](0x0,0x8)+'*'[_0x4deaa4(0x15a)](_0x77d419[_0x4deaa4(0x164)]-0x8);}export function redactCliConfigCredentials(_0x1b1ec0){const _0x5c2f3d=a154_0x3a94da,_0x4c4b37={..._0x1b1ec0};return Object['prototype'][_0x5c2f3d(0x15e)][_0x5c2f3d(0x159)](_0x4c4b37,_0x5c2f3d(0x15d))&&(_0x4c4b37[_0x5c2f3d(0x15d)]=maskCliAccessKey(_0x4c4b37[_0x5c2f3d(0x15d)])),_0x4c4b37[_0x5c2f3d(0x160)]&&typeof _0x4c4b37['apps']===_0x5c2f3d(0x16c)&&!Array[_0x5c2f3d(0x165)](_0x4c4b37[_0x5c2f3d(0x160)])&&(_0x4c4b37[_0x5c2f3d(0x160)]=redactLegacyAppCredentials(_0x4c4b37[_0x5c2f3d(0x160)])),_0x4c4b37;}export function redactCliConfigValue(_0x4cd9e5,_0x38a04d){const _0x42572a=a154_0x3a94da;if(_0x4cd9e5===_0x42572a(0x15d)||/^apps\.[^.]+\.accessKey$/[_0x42572a(0x161)](_0x4cd9e5))return maskCliAccessKey(_0x38a04d);if(_0x4cd9e5===_0x42572a(0x160)&&_0x38a04d&&typeof _0x38a04d==='object'&&!Array[_0x42572a(0x165)](_0x38a04d))return redactLegacyAppCredentials(_0x38a04d);if(/^apps\.[^.]+$/[_0x42572a(0x161)](_0x4cd9e5)&&_0x38a04d&&typeof _0x38a04d==='object'&&!Array[_0x42572a(0x165)](_0x38a04d)){const _0x1b8b9d=_0x38a04d;return Object[_0x42572a(0x166)]['hasOwnProperty'][_0x42572a(0x159)](_0x1b8b9d,'accessKey')?{..._0x1b8b9d,'accessKey':maskCliAccessKey(_0x1b8b9d[_0x42572a(0x15d)])}:_0x38a04d;}return _0x38a04d;}function redactLegacyAppCredentials(_0x43b67c){const _0x9e1c1d=a154_0x3a94da;return Object['fromEntries'](Object[_0x9e1c1d(0x163)](_0x43b67c)['map'](([_0x50f1cb,_0x430ec2])=>{const _0x1198e8=_0x9e1c1d;if(!_0x430ec2||typeof _0x430ec2!==_0x1198e8(0x16c)||Array['isArray'](_0x430ec2))return[_0x50f1cb,_0x430ec2];const _0xa28843={..._0x430ec2};return Object[_0x1198e8(0x166)][_0x1198e8(0x15e)][_0x1198e8(0x159)](_0xa28843,_0x1198e8(0x15d))&&(_0xa28843['accessKey']=maskCliAccessKey(_0xa28843['accessKey'])),[_0x50f1cb,_0xa28843];}));}
1
+ function a154_0x283b(){const _0x2e1137=['string','object','call','131997Dymuhs','985274YnfkyC','2033568NroGPj','length','slice','isArray','9049677NGWKpw','prototype','hasOwnProperty','accessKey','351788sudmGq','test','2524360iHALvi','apps','1297038LkezNs'];a154_0x283b=function(){return _0x2e1137;};return a154_0x283b();}(function(_0x2aaaba,_0x59fb38){const _0x151502=a154_0x326b,_0x4f9464=_0x2aaaba();while(!![]){try{const _0x175878=parseInt(_0x151502(0x1da))/0x1+parseInt(_0x151502(0x1e3))/0x2+-parseInt(_0x151502(0x1e2))/0x3+parseInt(_0x151502(0x1e4))/0x4+parseInt(_0x151502(0x1dc))/0x5+-parseInt(_0x151502(0x1de))/0x6+-parseInt(_0x151502(0x1e8))/0x7;if(_0x175878===_0x59fb38)break;else _0x4f9464['push'](_0x4f9464['shift']());}catch(_0x1c4cbb){_0x4f9464['push'](_0x4f9464['shift']());}}}(a154_0x283b,0x4a642));const REDACTED_ACCESS_KEY='<redacted>';export function maskCliAccessKey(_0x455134){const _0x26f606=a154_0x326b;if(typeof _0x455134!==_0x26f606(0x1df)||_0x455134[_0x26f606(0x1e5)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x455134[_0x26f606(0x1e6)](0x0,0x8)+'*'['repeat'](_0x455134[_0x26f606(0x1e5)]-0x8);}function a154_0x326b(_0x379ccb,_0x37df76){_0x379ccb=_0x379ccb-0x1d9;const _0x283b91=a154_0x283b();let _0x326b28=_0x283b91[_0x379ccb];return _0x326b28;}export function redactCliConfigCredentials(_0x5306b6){const _0x5c013e=a154_0x326b,_0x5744ff={..._0x5306b6};return Object['prototype'][_0x5c013e(0x1ea)][_0x5c013e(0x1e1)](_0x5744ff,_0x5c013e(0x1d9))&&(_0x5744ff['accessKey']=maskCliAccessKey(_0x5744ff[_0x5c013e(0x1d9)])),_0x5744ff[_0x5c013e(0x1dd)]&&typeof _0x5744ff['apps']===_0x5c013e(0x1e0)&&!Array[_0x5c013e(0x1e7)](_0x5744ff['apps'])&&(_0x5744ff[_0x5c013e(0x1dd)]=redactLegacyAppCredentials(_0x5744ff['apps'])),_0x5744ff;}export function redactCliConfigValue(_0x154906,_0x5c0b98){const _0x9a21b7=a154_0x326b;if(_0x154906===_0x9a21b7(0x1d9)||/^apps\.[^.]+\.accessKey$/[_0x9a21b7(0x1db)](_0x154906))return maskCliAccessKey(_0x5c0b98);if(_0x154906===_0x9a21b7(0x1dd)&&_0x5c0b98&&typeof _0x5c0b98==='object'&&!Array[_0x9a21b7(0x1e7)](_0x5c0b98))return redactLegacyAppCredentials(_0x5c0b98);if(/^apps\.[^.]+$/['test'](_0x154906)&&_0x5c0b98&&typeof _0x5c0b98===_0x9a21b7(0x1e0)&&!Array[_0x9a21b7(0x1e7)](_0x5c0b98)){const _0x476d4f=_0x5c0b98;return Object[_0x9a21b7(0x1e9)]['hasOwnProperty'][_0x9a21b7(0x1e1)](_0x476d4f,'accessKey')?{..._0x476d4f,'accessKey':maskCliAccessKey(_0x476d4f[_0x9a21b7(0x1d9)])}:_0x5c0b98;}return _0x5c0b98;}function redactLegacyAppCredentials(_0x1cb1cd){return Object['fromEntries'](Object['entries'](_0x1cb1cd)['map'](([_0x2c037d,_0x4c5a60])=>{const _0x17ee42=a154_0x326b;if(!_0x4c5a60||typeof _0x4c5a60!==_0x17ee42(0x1e0)||Array[_0x17ee42(0x1e7)](_0x4c5a60))return[_0x2c037d,_0x4c5a60];const _0x3615ba={..._0x4c5a60};return Object[_0x17ee42(0x1e9)][_0x17ee42(0x1ea)][_0x17ee42(0x1e1)](_0x3615ba,'accessKey')&&(_0x3615ba[_0x17ee42(0x1d9)]=maskCliAccessKey(_0x3615ba['accessKey'])),[_0x2c037d,_0x3615ba];}));}
@@ -1 +1 @@
1
- function a155_0xe20a(){const _0x595671=['12LJBTZd','7983QTjoXf','17eloHHA','1511477Wamqwo','63RZZcHT','773576alWVhh','1307367YJhaaG','22778dscKLQ','110gyVESE','1898478WyFgAl','1423335KgrKzq'];a155_0xe20a=function(){return _0x595671;};return a155_0xe20a();}(function(_0x60fd47,_0x1748e1){const _0x9426f2=a155_0x4fc9,_0x5d7fee=_0x60fd47();while(!![]){try{const _0x15f7fa=parseInt(_0x9426f2(0x1e2))/0x1*(parseInt(_0x9426f2(0x1e7))/0x2)+parseInt(_0x9426f2(0x1e6))/0x3+parseInt(_0x9426f2(0x1e0))/0x4*(-parseInt(_0x9426f2(0x1df))/0x5)+-parseInt(_0x9426f2(0x1de))/0x6+parseInt(_0x9426f2(0x1e4))/0x7*(parseInt(_0x9426f2(0x1e5))/0x8)+parseInt(_0x9426f2(0x1e1))/0x9*(-parseInt(_0x9426f2(0x1e8))/0xa)+parseInt(_0x9426f2(0x1e3))/0xb;if(_0x15f7fa===_0x1748e1)break;else _0x5d7fee['push'](_0x5d7fee['shift']());}catch(_0x419f26){_0x5d7fee['push'](_0x5d7fee['shift']());}}}(a155_0xe20a,0x6f8cf));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a155_0x4fc9(_0x4ea822,_0x4ce180){_0x4ea822=_0x4ea822-0x1de;const _0xe20a97=a155_0xe20a();let _0x4fc964=_0xe20a97[_0x4ea822];return _0x4fc964;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ function a155_0x46d6(_0x32f482,_0x58389e){_0x32f482=_0x32f482-0x6a;const _0x476aae=a155_0x476a();let _0x46d605=_0x476aae[_0x32f482];return _0x46d605;}(function(_0x510065,_0x4a7ff3){const _0x4eceaf=a155_0x46d6,_0x35c6b6=_0x510065();while(!![]){try{const _0x4010d7=parseInt(_0x4eceaf(0x6c))/0x1+-parseInt(_0x4eceaf(0x72))/0x2+-parseInt(_0x4eceaf(0x71))/0x3*(-parseInt(_0x4eceaf(0x6f))/0x4)+-parseInt(_0x4eceaf(0x6e))/0x5+-parseInt(_0x4eceaf(0x73))/0x6+-parseInt(_0x4eceaf(0x70))/0x7*(parseInt(_0x4eceaf(0x6d))/0x8)+parseInt(_0x4eceaf(0x6b))/0x9*(parseInt(_0x4eceaf(0x6a))/0xa);if(_0x4010d7===_0x4a7ff3)break;else _0x35c6b6['push'](_0x35c6b6['shift']());}catch(_0x5afef6){_0x35c6b6['push'](_0x35c6b6['shift']());}}}(a155_0x476a,0xb85c3));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a155_0x476a(){const _0x9adb2c=['1389788rCOTBz','505158AXlymh','2623350bcIKcc','90SuLFRg','459251zRnhlA','218520LyWqtS','7412480JMYPdO','4IXRkya','161kLoKdz','1687098BQwgrZ'];a155_0x476a=function(){return _0x9adb2c;};return a155_0x476a();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- function a156_0x31f1(){const _0x43c036=['minimumVersion','npm\x20install\x20-g\x20','7508490LkDtJK','Upgrade\x20command:\x20','currentVersion','2570212xcdweI','join','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','belowMinimum','unavailable','upgradeMessage','30216BrNuOF','10cMMcCW','latest','757395pIrpSD','filter','stableVersion','18742194eUzutI','3fYtcIW','valid','35312OCwGvZ','693fpWtxz','Recommended\x20stable:\x20','Current\x20version:\x20','3962225WqtiMS'];a156_0x31f1=function(){return _0x43c036;};return a156_0x31f1();}(function(_0x51c12e,_0x4b164c){const _0x33f1a8=a156_0x7257,_0x4c4ddc=_0x51c12e();while(!![]){try{const _0x402442=-parseInt(_0x33f1a8(0xbe))/0x1+-parseInt(_0x33f1a8(0xbb))/0x2+parseInt(_0x33f1a8(0xc2))/0x3*(-parseInt(_0x33f1a8(0xb5))/0x4)+parseInt(_0x33f1a8(0xaf))/0x5+-parseInt(_0x33f1a8(0xb2))/0x6+parseInt(_0x33f1a8(0xc5))/0x7*(parseInt(_0x33f1a8(0xc4))/0x8)+-parseInt(_0x33f1a8(0xc1))/0x9*(-parseInt(_0x33f1a8(0xbc))/0xa);if(_0x402442===_0x4b164c)break;else _0x4c4ddc['push'](_0x4c4ddc['shift']());}catch(_0x4fa681){_0x4c4ddc['push'](_0x4c4ddc['shift']());}}}(a156_0x31f1,0x9d932));import a156_0xc36a9e 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 a156_0x7257(_0x12deae,_0x38bbb3){_0x12deae=_0x12deae-0xad;const _0x31f11b=a156_0x31f1();let _0x7257d3=_0x31f11b[_0x12deae];return _0x7257d3;}export function evaluateCliVersionPolicy(_0xf4507,_0x49951c){const _0x39fa2d=a156_0x7257,_0x389cc8=a156_0xc36a9e[_0x39fa2d(0xc3)](_0xf4507)===_0xf4507,_0x595719=_0x49951c?.[_0x39fa2d(0xc0)]??null,_0x30d713=_0x49951c?.[_0x39fa2d(0xb0)]??null,_0x4a0603=Boolean(_0x389cc8&&_0x595719&&a156_0xc36a9e['lt'](_0xf4507,_0x595719)),_0xb0bdf1=Boolean(_0x389cc8&&_0x30d713&&a156_0xc36a9e['lt'](_0xf4507,_0x30d713));return{'currentVersion':_0xf4507,'stableVersion':_0x595719,'minimumVersion':_0x30d713,'needsUpgrade':_0x4a0603||_0xb0bdf1,'belowMinimum':_0xb0bdf1,'upgradeMessage':_0x49951c?.[_0x39fa2d(0xba)],'minimumVersionMessage':_0x49951c?.['minimumVersionMessage']};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x5cdd0b){const _0x46f2f7=a156_0x7257;return _0x46f2f7(0xb1)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x5cdd0b[_0x46f2f7(0xc0)]??_0x46f2f7(0xbd));}export function assertCliVersionSupported(_0x4c680c){const _0x16d2ab=a156_0x7257;if(!_0x4c680c[_0x16d2ab(0xb8)])return;const _0x99eefd=[_0x4c680c['minimumVersionMessage'],_0x16d2ab(0xae)+_0x4c680c[_0x16d2ab(0xb4)],'Minimum\x20supported:\x20'+_0x4c680c[_0x16d2ab(0xb0)],_0x16d2ab(0xad)+(_0x4c680c[_0x16d2ab(0xc0)]??_0x16d2ab(0xb9)),_0x16d2ab(0xb3)+getCliUpgradeCommand(_0x4c680c)][_0x16d2ab(0xbf)](Boolean)[_0x16d2ab(0xb6)]('\x0a');throw CliErrors['validation'](_0x16d2ab(0xb7),_0x99eefd);}
1
+ (function(_0x237f3a,_0x2194b3){const _0xa2659c=a156_0x3b59,_0x30d376=_0x237f3a();while(!![]){try{const _0x244376=parseInt(_0xa2659c(0x1cc))/0x1+-parseInt(_0xa2659c(0x1d0))/0x2+parseInt(_0xa2659c(0x1d7))/0x3+parseInt(_0xa2659c(0x1c7))/0x4*(-parseInt(_0xa2659c(0x1cf))/0x5)+parseInt(_0xa2659c(0x1d3))/0x6+parseInt(_0xa2659c(0x1ca))/0x7+parseInt(_0xa2659c(0x1da))/0x8*(-parseInt(_0xa2659c(0x1d9))/0x9);if(_0x244376===_0x2194b3)break;else _0x30d376['push'](_0x30d376['shift']());}catch(_0x4b082a){_0x30d376['push'](_0x30d376['shift']());}}}(a156_0xca76,0xdda1e));function a156_0xca76(){const _0x38c89e=['Upgrade\x20command:\x20','belowMinimum','690285VgTSDw','2520294ZEIpcH','minimumVersionMessage','stableVersion','10458324AlffrR','valid','minimumVersion','upgradeMessage','1815423bcavYi','join','25614HozxYL','4488bEyPHM','Current\x20version:\x20','validation','unavailable','4kMEqpw','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','Recommended\x20stable:\x20','6398665ekgZBt','filter','640326yeKMRI'];a156_0xca76=function(){return _0x38c89e;};return a156_0xca76();}import a156_0x3bf5de from'semver';function a156_0x3b59(_0x288b7c,_0x56727e){_0x288b7c=_0x288b7c-0x1c4;const _0xca761d=a156_0xca76();let _0x3b5944=_0xca761d[_0x288b7c];return _0x3b5944;}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(_0x5a4575,_0x597ea4){const _0x38ea4d=a156_0x3b59,_0x2f5958=a156_0x3bf5de[_0x38ea4d(0x1d4)](_0x5a4575)===_0x5a4575,_0x2ba4b2=_0x597ea4?.[_0x38ea4d(0x1d2)]??null,_0x5729cd=_0x597ea4?.['minimumVersion']??null,_0x5e1305=Boolean(_0x2f5958&&_0x2ba4b2&&a156_0x3bf5de['lt'](_0x5a4575,_0x2ba4b2)),_0x14b41d=Boolean(_0x2f5958&&_0x5729cd&&a156_0x3bf5de['lt'](_0x5a4575,_0x5729cd));return{'currentVersion':_0x5a4575,'stableVersion':_0x2ba4b2,'minimumVersion':_0x5729cd,'needsUpgrade':_0x5e1305||_0x14b41d,'belowMinimum':_0x14b41d,'upgradeMessage':_0x597ea4?.[_0x38ea4d(0x1d6)],'minimumVersionMessage':_0x597ea4?.[_0x38ea4d(0x1d1)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x478452){return'npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x478452['stableVersion']??'latest');}export function assertCliVersionSupported(_0x4f5f97){const _0x315a55=a156_0x3b59;if(!_0x4f5f97[_0x315a55(0x1ce)])return;const _0x386b8c=[_0x4f5f97['minimumVersionMessage'],_0x315a55(0x1c4)+_0x4f5f97['currentVersion'],'Minimum\x20supported:\x20'+_0x4f5f97[_0x315a55(0x1d5)],_0x315a55(0x1c9)+(_0x4f5f97[_0x315a55(0x1d2)]??_0x315a55(0x1c6)),_0x315a55(0x1cd)+getCliUpgradeCommand(_0x4f5f97)][_0x315a55(0x1cb)](Boolean)[_0x315a55(0x1d8)]('\x0a');throw CliErrors[_0x315a55(0x1c5)](_0x315a55(0x1c8),_0x386b8c);}
@@ -1 +1 @@
1
- function a157_0x1ed5(){const _0x38e256=['latestVersion','1424632PSetOX','object','8348SZPKMD','string','2045FPVsXB','6mfYoRE','valid','stableVersion','finally','trim','cli','now','then','3067449bpSHHt','3659080SkoNTn','1059060bJotox','timeout','984130MgpLQH','330eGjDwU','299826IpmtCS','upgradeMessage','minVersion','recommendedVersion'];a157_0x1ed5=function(){return _0x38e256;};return a157_0x1ed5();}(function(_0x48fc08,_0x661b79){const _0x177232=a157_0x3cf4,_0xbfdf52=_0x48fc08();while(!![]){try{const _0x4510d1=-parseInt(_0x177232(0x127))/0x1+-parseInt(_0x177232(0x12e))/0x2+parseInt(_0x177232(0x13d))/0x3+-parseInt(_0x177232(0x130))/0x4*(-parseInt(_0x177232(0x132))/0x5)+-parseInt(_0x177232(0x133))/0x6*(parseInt(_0x177232(0x13b))/0x7)+parseInt(_0x177232(0x13c))/0x8+-parseInt(_0x177232(0x129))/0x9*(-parseInt(_0x177232(0x128))/0xa);if(_0x4510d1===_0x661b79)break;else _0xbfdf52['push'](_0xbfdf52['shift']());}catch(_0x4851f0){_0xbfdf52['push'](_0xbfdf52['shift']());}}}(a157_0x1ed5,0x997d9));import a157_0x20d751 from'semver';function a157_0x3cf4(_0xc406ba,_0x5e3778){_0xc406ba=_0xc406ba-0x126;const _0x1ed54d=a157_0x1ed5();let _0x3cf4f4=_0x1ed54d[_0xc406ba];return _0x3cf4f4;}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(_0x198127){const _0x4f14ea=a157_0x3cf4;return typeof _0x198127===_0x4f14ea(0x131)&&_0x198127['trim']()?_0x198127[_0x4f14ea(0x137)]():null;}function pickStrictSemver(_0x5ea50c){const _0x109bc2=a157_0x3cf4,_0x74f0=pickString(_0x5ea50c);return _0x74f0&&a157_0x20d751[_0x109bc2(0x134)](_0x74f0)===_0x74f0?_0x74f0:null;}export function normalizeCliVersionPolicy(_0x759ddf){const _0x28e771=a157_0x3cf4;if(!_0x759ddf||typeof _0x759ddf!==_0x28e771(0x12f))return null;const _0x570a8b=_0x759ddf,_0x3afbf2=_0x570a8b['cli']&&typeof _0x570a8b[_0x28e771(0x138)]===_0x28e771(0x12f)?_0x570a8b['cli']:_0x570a8b,_0x458b55=pickStrictSemver(_0x3afbf2[_0x28e771(0x135)]??_0x3afbf2[_0x28e771(0x12d)]??_0x3afbf2[_0x28e771(0x12c)]),_0x4d76e0=pickStrictSemver(_0x3afbf2['minimumVersion']??_0x3afbf2[_0x28e771(0x12b)]);if(!_0x458b55&&!_0x4d76e0)return null;if(_0x458b55&&_0x4d76e0&&a157_0x20d751['gt'](_0x4d76e0,_0x458b55))return null;return{'stableVersion':_0x458b55,'minimumVersion':_0x4d76e0,'upgradeMessage':pickString(_0x3afbf2[_0x28e771(0x12a)])??undefined,'minimumVersionMessage':pickString(_0x3afbf2['minimumVersionMessage'])??undefined};}export async function fetchCliVersionPolicy(){const _0x5b6d55=a157_0x3cf4;try{const _0x3af3b4=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':AbortSignal[_0x5b6d55(0x126)](FETCH_TIMEOUT_MS)});if(!_0x3af3b4['ok'])return null;return normalizeCliVersionPolicy(await _0x3af3b4['json']());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x2d9d33=a157_0x3cf4,_0x5c5e8a=Date[_0x2d9d33(0x139)]();if(hasCachedPolicy){const _0x26d8ea=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x5c5e8a-cachedAt<_0x26d8ea)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x2d9d33(0x13a)](_0x5a0f8f=>{const _0x538279=_0x2d9d33;return cachedPolicy=_0x5a0f8f,cachedAt=Date[_0x538279(0x139)](),hasCachedPolicy=!![],_0x5a0f8f;})[_0x2d9d33(0x136)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
1
+ (function(_0x75173,_0x9a8edc){const _0x3c7e58=a157_0x336f,_0x45c5a1=_0x75173();while(!![]){try{const _0x1176f8=parseInt(_0x3c7e58(0x122))/0x1*(parseInt(_0x3c7e58(0x11a))/0x2)+parseInt(_0x3c7e58(0x12c))/0x3*(-parseInt(_0x3c7e58(0x127))/0x4)+parseInt(_0x3c7e58(0x116))/0x5+-parseInt(_0x3c7e58(0x124))/0x6*(parseInt(_0x3c7e58(0x119))/0x7)+parseInt(_0x3c7e58(0x121))/0x8+parseInt(_0x3c7e58(0x125))/0x9*(parseInt(_0x3c7e58(0x115))/0xa)+-parseInt(_0x3c7e58(0x120))/0xb;if(_0x1176f8===_0x9a8edc)break;else _0x45c5a1['push'](_0x45c5a1['shift']());}catch(_0x7cb3e3){_0x45c5a1['push'](_0x45c5a1['shift']());}}}(a157_0xd852,0x9fec8));import a157_0x3a3d2f from'semver';function a157_0xd852(){const _0x1ada61=['recommendedVersion','2243857iYDuja','92NvXukA','application/json','latestVersion','then','upgradeMessage','json','9603836QejBIs','5376544AwrWLV','24995ZEECpG','string','18bAHieW','178758zwmcKk','cli','2541712eESfRI','minimumVersion','object','minimumVersionMessage','trim','6wRtOUs','now','610JBtRBL','3636065pYCEMj','finally'];a157_0xd852=function(){return _0x1ada61;};return a157_0xd852();}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(_0x4f1c56){const _0x1c8fc5=a157_0x336f;return typeof _0x4f1c56===_0x1c8fc5(0x123)&&_0x4f1c56[_0x1c8fc5(0x12b)]()?_0x4f1c56[_0x1c8fc5(0x12b)]():null;}function pickStrictSemver(_0x257306){const _0x379e6b=pickString(_0x257306);return _0x379e6b&&a157_0x3a3d2f['valid'](_0x379e6b)===_0x379e6b?_0x379e6b:null;}export function normalizeCliVersionPolicy(_0x287fbf){const _0x40ed28=a157_0x336f;if(!_0x287fbf||typeof _0x287fbf!=='object')return null;const _0x2d73f8=_0x287fbf,_0x161210=_0x2d73f8[_0x40ed28(0x126)]&&typeof _0x2d73f8[_0x40ed28(0x126)]===_0x40ed28(0x129)?_0x2d73f8['cli']:_0x2d73f8,_0x3deb1e=pickStrictSemver(_0x161210['stableVersion']??_0x161210[_0x40ed28(0x11c)]??_0x161210[_0x40ed28(0x118)]),_0x1a5500=pickStrictSemver(_0x161210[_0x40ed28(0x128)]??_0x161210['minVersion']);if(!_0x3deb1e&&!_0x1a5500)return null;if(_0x3deb1e&&_0x1a5500&&a157_0x3a3d2f['gt'](_0x1a5500,_0x3deb1e))return null;return{'stableVersion':_0x3deb1e,'minimumVersion':_0x1a5500,'upgradeMessage':pickString(_0x161210[_0x40ed28(0x11e)])??undefined,'minimumVersionMessage':pickString(_0x161210[_0x40ed28(0x12a)])??undefined};}export async function fetchCliVersionPolicy(){const _0x179f4b=a157_0x336f;try{const _0x27807e=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x179f4b(0x11b)},'signal':AbortSignal['timeout'](FETCH_TIMEOUT_MS)});if(!_0x27807e['ok'])return null;return normalizeCliVersionPolicy(await _0x27807e[_0x179f4b(0x11f)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;function a157_0x336f(_0x44be37,_0xc760f6){_0x44be37=_0x44be37-0x115;const _0xd85241=a157_0xd852();let _0x336f86=_0xd85241[_0x44be37];return _0x336f86;}export async function getCliVersionPolicy(){const _0x197abe=a157_0x336f,_0x30ae8a=Date[_0x197abe(0x12d)]();if(hasCachedPolicy){const _0x472d79=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x30ae8a-cachedAt<_0x472d79)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x197abe(0x11d)](_0x2e0bcf=>{const _0x273b97=_0x197abe;return cachedPolicy=_0x2e0bcf,cachedAt=Date[_0x273b97(0x12d)](),hasCachedPolicy=!![],_0x2e0bcf;})[_0x197abe(0x117)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
@@ -1 +1 @@
1
- const a158_0x4eada8=a158_0x58ec;(function(_0x1bd971,_0x1bdfcb){const _0xfc5b97=a158_0x58ec,_0x579aab=_0x1bd971();while(!![]){try{const _0x47291d=parseInt(_0xfc5b97(0xaa))/0x1*(-parseInt(_0xfc5b97(0xa2))/0x2)+parseInt(_0xfc5b97(0xa5))/0x3*(-parseInt(_0xfc5b97(0xb2))/0x4)+parseInt(_0xfc5b97(0xb5))/0x5*(parseInt(_0xfc5b97(0x98))/0x6)+parseInt(_0xfc5b97(0xab))/0x7+parseInt(_0xfc5b97(0xb6))/0x8+-parseInt(_0xfc5b97(0xc0))/0x9*(-parseInt(_0xfc5b97(0xba))/0xa)+parseInt(_0xfc5b97(0x9f))/0xb*(-parseInt(_0xfc5b97(0xa3))/0xc);if(_0x47291d===_0x1bdfcb)break;else _0x579aab['push'](_0x579aab['shift']());}catch(_0x3bdffc){_0x579aab['push'](_0x579aab['shift']());}}}(a158_0x448e,0x260d5));function a158_0x58ec(_0x49be7f,_0x1dce54){_0x49be7f=_0x49be7f-0x97;const _0x448eaf=a158_0x448e();let _0x58ecc7=_0x448eaf[_0x49be7f];return _0x58ecc7;}import a158_0x21357f from'winston';import a158_0x1aa233 from'node:fs';import a158_0x2a0364 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a158_0x448e(){const _0x4fb94b=['warn','message','initWinstonLogger','errors','yellow','blue','clear','details','log','green','printf','178932EKlMAF','filter','timestamp','logTask','join','parse','Completed:\x20','11sdnjVi','level','Failed\x20to\x20clear\x20logs:','94880lQprIl','5750952bikcaU','now','336RWmJxH','combine','command','info','transports','1TxEOhB','1497867kLpFxr','File','utf8','Starting:\x20','Failed:\x20','trim','existsSync','4036uAKbsL','unknown','logFilePath','30eokIVm','1532504BJFnnL','readLogs','clearLogs','currentRawCommand','10cQpgwO','readFileSync','duration','addColors','winstonLogger','error','1899711joJdoL','success','format','Failed\x20to\x20read\x20logs:','writeFileSync','mkdirSync','split','logFileName'];a158_0x448e=function(){return _0x4fb94b;};return a158_0x448e();}class Logger{[a158_0x4eada8(0xbe)];[a158_0x4eada8(0xb4)]='';['currentRawCommand']='';constructor(){}['setRawCommand'](_0x1e3a7f){const _0xd3e508=a158_0x4eada8;this[_0xd3e508(0xb9)]=_0x1e3a7f;}['setLogPath'](_0x132232){const _0x16237c=a158_0x4eada8;this[_0x16237c(0xb4)]=a158_0x2a0364[_0x16237c(0x9c)](_0x132232,PRODUCT_CONFIG[_0x16237c(0xc7)]),this[_0x16237c(0xbe)]&&this[_0x16237c(0xbe)][_0x16237c(0xce)](),this[_0x16237c(0xca)]();}[a158_0x4eada8(0xca)](){const _0x3f948a=a158_0x4eada8,_0x46d8e6=a158_0x2a0364['dirname'](this[_0x3f948a(0xb4)]);!a158_0x1aa233[_0x3f948a(0xb1)](_0x46d8e6)&&a158_0x1aa233[_0x3f948a(0xc5)](_0x46d8e6,{'recursive':!![]});const _0x35e07d=a158_0x21357f['format'][_0x3f948a(0xa6)](a158_0x21357f[_0x3f948a(0xc2)][_0x3f948a(0x9a)](),a158_0x21357f[_0x3f948a(0xc2)][_0x3f948a(0xcb)]({'stack':!![]}),a158_0x21357f[_0x3f948a(0xc2)][_0x3f948a(0x97)](_0x290b0d=>{const _0x267319=_0x3f948a,_0x26b0f4={'timestamp':_0x290b0d[_0x267319(0x9a)]||new Date()['toISOString'](),'level':_0x290b0d[_0x267319(0xa0)]||_0x267319(0xa8),'command':_0x290b0d[_0x267319(0xa7)]||_0x267319(0xb3),'rawCommand':_0x290b0d['rawCommand']||this['currentRawCommand']||undefined,'message':_0x290b0d[_0x267319(0xc9)]||'','duration':_0x290b0d[_0x267319(0xbc)]||undefined,'details':_0x290b0d[_0x267319(0xcf)]||undefined};return JSON['stringify'](_0x26b0f4);}));this[_0x3f948a(0xbe)]=a158_0x21357f['createLogger']({'level':'info','format':_0x35e07d,'transports':[new a158_0x21357f[(_0x3f948a(0xa9))][(_0x3f948a(0xac))]({'filename':this[_0x3f948a(0xb4)],'level':_0x3f948a(0xa8)})],'silent':![]}),a158_0x21357f[_0x3f948a(0xbd)]({'success':_0x3f948a(0xd1),'error':'red','warn':_0x3f948a(0xcc),'info':_0x3f948a(0xcd)});}[a158_0x4eada8(0xa8)](_0x29424a,_0x2acc0e,_0x4b301e){const _0x5a6c88=a158_0x4eada8;if(!this['logFilePath']||!this[_0x5a6c88(0xbe)])return;this[_0x5a6c88(0xbe)][_0x5a6c88(0xa8)](_0x2acc0e,{'command':_0x29424a,'details':_0x4b301e});}['success'](_0x171615,_0xd41b59,_0x53a2cb,_0x1530d4){const _0x5bcebd=a158_0x4eada8;if(!this['logFilePath']||!this[_0x5bcebd(0xbe)])return;this['winstonLogger'][_0x5bcebd(0xd0)](_0x5bcebd(0xa8),_0xd41b59,{'level':_0x5bcebd(0xc1),'command':_0x171615,'duration':_0x53a2cb,'details':_0x1530d4});}['error'](_0x4561de,_0x1b6803,_0x42815){const _0xcabae=a158_0x4eada8;if(!this[_0xcabae(0xb4)]||!this[_0xcabae(0xbe)])return;this['winstonLogger'][_0xcabae(0xbf)](_0x1b6803,{'command':_0x4561de,'details':_0x42815});}[a158_0x4eada8(0xc8)](_0x38b278,_0x15e966,_0x51acbc){const _0x26fbe3=a158_0x4eada8;if(!this[_0x26fbe3(0xb4)]||!this[_0x26fbe3(0xbe)])return;this[_0x26fbe3(0xbe)][_0x26fbe3(0xc8)](_0x15e966,{'command':_0x38b278,'details':_0x51acbc});}async[a158_0x4eada8(0x9b)](_0x43e9de,_0x3baca0,_0xbfecb2){const _0x34350f=a158_0x4eada8,_0x379a0d=Date[_0x34350f(0xa4)]();this[_0x34350f(0xa8)](_0x43e9de,_0x34350f(0xae)+_0x3baca0);try{const _0x1d07d3=await _0xbfecb2(),_0x56e854=Date[_0x34350f(0xa4)]()-_0x379a0d;return this[_0x34350f(0xc1)](_0x43e9de,_0x34350f(0x9e)+_0x3baca0,_0x56e854),_0x1d07d3;}catch(_0x3f13ec){const _0x4d1b85=Date['now']()-_0x379a0d;this[_0x34350f(0xbf)](_0x43e9de,_0x34350f(0xaf)+_0x3baca0,{'error':_0x3f13ec instanceof Error?_0x3f13ec['message']:String(_0x3f13ec),'duration':_0x4d1b85});throw _0x3f13ec;}}[a158_0x4eada8(0xb7)](){const _0x15df57=a158_0x4eada8;try{if(!a158_0x1aa233[_0x15df57(0xb1)](this['logFilePath']))return[];const _0x183550=a158_0x1aa233[_0x15df57(0xbb)](this['logFilePath'],_0x15df57(0xad));return _0x183550[_0x15df57(0xc6)](/\r?\n/)[_0x15df57(0x99)](_0x10d3ef=>_0x10d3ef[_0x15df57(0xb0)]())['map'](_0x1cbd56=>JSON[_0x15df57(0x9d)](_0x1cbd56));}catch(_0x2ea0c0){return console['warn'](_0x15df57(0xc3),_0x2ea0c0),[];}}[a158_0x4eada8(0xb8)](){const _0x14edd8=a158_0x4eada8;try{a158_0x1aa233[_0x14edd8(0xb1)](this['logFilePath'])&&a158_0x1aa233[_0x14edd8(0xc4)](this[_0x14edd8(0xb4)],'',_0x14edd8(0xad));}catch(_0x16ef60){console[_0x14edd8(0xc8)](_0x14edd8(0xa1),_0x16ef60);}}['getWinstonInstance'](){const _0x5476fc=a158_0x4eada8;return this[_0x5476fc(0xbe)];}}export const logger=new Logger();
1
+ const a158_0x5948b7=a158_0x53e7;(function(_0xb14418,_0x1ccaf4){const _0x40ad57=a158_0x53e7,_0x46b6bc=_0xb14418();while(!![]){try{const _0x352862=parseInt(_0x40ad57(0x1be))/0x1*(parseInt(_0x40ad57(0x1c8))/0x2)+parseInt(_0x40ad57(0x1de))/0x3+-parseInt(_0x40ad57(0x1ad))/0x4+-parseInt(_0x40ad57(0x1bb))/0x5+parseInt(_0x40ad57(0x1c7))/0x6+parseInt(_0x40ad57(0x1b6))/0x7+parseInt(_0x40ad57(0x1bf))/0x8*(-parseInt(_0x40ad57(0x1d5))/0x9);if(_0x352862===_0x1ccaf4)break;else _0x46b6bc['push'](_0x46b6bc['shift']());}catch(_0x57e203){_0x46b6bc['push'](_0x46b6bc['shift']());}}}(a158_0x5566,0x8b53d));function a158_0x5566(){const _0x4b90f1=['117NLgsGF','success','error','log','initWinstonLogger','parse','currentRawCommand','readFileSync','rawCommand','3157569MgoNdJ','logFileName','combine','errors','readLogs','printf','3514832zlzfhk','existsSync','info','logTask','writeFileSync','Failed:\x20','utf8','getWinstonInstance','red','6529796MgTJmP','details','toISOString','dirname','timestamp','2269980lMyuke','winstonLogger','setRawCommand','1128091CrvLdt','1259288nYLQOX','unknown','filter','warn','green','mkdirSync','File','setLogPath','5017740fgjaDA','2ybjUUH','duration','createLogger','Failed\x20to\x20read\x20logs:','now','logFilePath','Failed\x20to\x20clear\x20logs:','stringify','map','trim','clear','clearLogs','format'];a158_0x5566=function(){return _0x4b90f1;};return a158_0x5566();}import a158_0x22ba27 from'winston';import a158_0x3deed5 from'node:fs';import a158_0x11aa82 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a158_0x5948b7(0x1bc)];['logFilePath']='';[a158_0x5948b7(0x1db)]='';constructor(){}[a158_0x5948b7(0x1bd)](_0x390710){const _0x2f0dce=a158_0x5948b7;this[_0x2f0dce(0x1db)]=_0x390710;}[a158_0x5948b7(0x1c6)](_0x3d6045){const _0x5bb879=a158_0x5948b7;this[_0x5bb879(0x1cd)]=a158_0x11aa82['join'](_0x3d6045,PRODUCT_CONFIG[_0x5bb879(0x1df)]),this['winstonLogger']&&this[_0x5bb879(0x1bc)][_0x5bb879(0x1d2)](),this[_0x5bb879(0x1d9)]();}[a158_0x5948b7(0x1d9)](){const _0x589f34=a158_0x5948b7,_0x4fbf69=a158_0x11aa82[_0x589f34(0x1b9)](this[_0x589f34(0x1cd)]);!a158_0x3deed5['existsSync'](_0x4fbf69)&&a158_0x3deed5[_0x589f34(0x1c4)](_0x4fbf69,{'recursive':!![]});const _0x23887c=a158_0x22ba27[_0x589f34(0x1d4)][_0x589f34(0x1e0)](a158_0x22ba27[_0x589f34(0x1d4)][_0x589f34(0x1ba)](),a158_0x22ba27[_0x589f34(0x1d4)][_0x589f34(0x1aa)]({'stack':!![]}),a158_0x22ba27[_0x589f34(0x1d4)][_0x589f34(0x1ac)](_0x3c9e4a=>{const _0x33f686=_0x589f34,_0x29db59={'timestamp':_0x3c9e4a[_0x33f686(0x1ba)]||new Date()[_0x33f686(0x1b8)](),'level':_0x3c9e4a['level']||'info','command':_0x3c9e4a['command']||_0x33f686(0x1c0),'rawCommand':_0x3c9e4a[_0x33f686(0x1dd)]||this['currentRawCommand']||undefined,'message':_0x3c9e4a['message']||'','duration':_0x3c9e4a[_0x33f686(0x1c9)]||undefined,'details':_0x3c9e4a[_0x33f686(0x1b7)]||undefined};return JSON[_0x33f686(0x1cf)](_0x29db59);}));this[_0x589f34(0x1bc)]=a158_0x22ba27[_0x589f34(0x1ca)]({'level':_0x589f34(0x1af),'format':_0x23887c,'transports':[new a158_0x22ba27['transports'][(_0x589f34(0x1c5))]({'filename':this[_0x589f34(0x1cd)],'level':'info'})],'silent':![]}),a158_0x22ba27['addColors']({'success':_0x589f34(0x1c3),'error':_0x589f34(0x1b5),'warn':'yellow','info':'blue'});}['info'](_0x1c4d63,_0x28204a,_0x5b1766){const _0x42f375=a158_0x5948b7;if(!this['logFilePath']||!this[_0x42f375(0x1bc)])return;this[_0x42f375(0x1bc)][_0x42f375(0x1af)](_0x28204a,{'command':_0x1c4d63,'details':_0x5b1766});}[a158_0x5948b7(0x1d6)](_0x1f004c,_0x14287c,_0x2e2fe1,_0x3d7bc1){const _0x3702c7=a158_0x5948b7;if(!this[_0x3702c7(0x1cd)]||!this['winstonLogger'])return;this[_0x3702c7(0x1bc)][_0x3702c7(0x1d8)](_0x3702c7(0x1af),_0x14287c,{'level':_0x3702c7(0x1d6),'command':_0x1f004c,'duration':_0x2e2fe1,'details':_0x3d7bc1});}[a158_0x5948b7(0x1d7)](_0x4067bc,_0x40573f,_0xbce701){const _0x5f07f4=a158_0x5948b7;if(!this[_0x5f07f4(0x1cd)]||!this['winstonLogger'])return;this['winstonLogger'][_0x5f07f4(0x1d7)](_0x40573f,{'command':_0x4067bc,'details':_0xbce701});}[a158_0x5948b7(0x1c2)](_0x507811,_0x2a3b37,_0x209383){const _0x418525=a158_0x5948b7;if(!this[_0x418525(0x1cd)]||!this['winstonLogger'])return;this[_0x418525(0x1bc)][_0x418525(0x1c2)](_0x2a3b37,{'command':_0x507811,'details':_0x209383});}async[a158_0x5948b7(0x1b0)](_0x21d17c,_0x4a7c70,_0x27bcdb){const _0x4c3e2d=a158_0x5948b7,_0x33ef57=Date[_0x4c3e2d(0x1cc)]();this[_0x4c3e2d(0x1af)](_0x21d17c,'Starting:\x20'+_0x4a7c70);try{const _0x3c818a=await _0x27bcdb(),_0x5ccb4c=Date[_0x4c3e2d(0x1cc)]()-_0x33ef57;return this['success'](_0x21d17c,'Completed:\x20'+_0x4a7c70,_0x5ccb4c),_0x3c818a;}catch(_0x5f51de){const _0x588e84=Date[_0x4c3e2d(0x1cc)]()-_0x33ef57;this['error'](_0x21d17c,_0x4c3e2d(0x1b2)+_0x4a7c70,{'error':_0x5f51de instanceof Error?_0x5f51de['message']:String(_0x5f51de),'duration':_0x588e84});throw _0x5f51de;}}[a158_0x5948b7(0x1ab)](){const _0x5f04bd=a158_0x5948b7;try{if(!a158_0x3deed5['existsSync'](this[_0x5f04bd(0x1cd)]))return[];const _0x1bbaeb=a158_0x3deed5[_0x5f04bd(0x1dc)](this[_0x5f04bd(0x1cd)],_0x5f04bd(0x1b3));return _0x1bbaeb['split'](/\r?\n/)[_0x5f04bd(0x1c1)](_0x47b7fc=>_0x47b7fc[_0x5f04bd(0x1d1)]())[_0x5f04bd(0x1d0)](_0x234a60=>JSON[_0x5f04bd(0x1da)](_0x234a60));}catch(_0x364d58){return console['warn'](_0x5f04bd(0x1cb),_0x364d58),[];}}[a158_0x5948b7(0x1d3)](){const _0x268767=a158_0x5948b7;try{a158_0x3deed5[_0x268767(0x1ae)](this[_0x268767(0x1cd)])&&a158_0x3deed5[_0x268767(0x1b1)](this[_0x268767(0x1cd)],'',_0x268767(0x1b3));}catch(_0x25e035){console[_0x268767(0x1c2)](_0x268767(0x1ce),_0x25e035);}}[a158_0x5948b7(0x1b4)](){const _0x5e6372=a158_0x5948b7;return this[_0x5e6372(0x1bc)];}}function a158_0x53e7(_0x4854a3,_0x1c9794){_0x4854a3=_0x4854a3-0x1aa;const _0x5566ff=a158_0x5566();let _0x53e7a2=_0x5566ff[_0x4854a3];return _0x53e7a2;}export const logger=new Logger();