@lovrabet/lovrabet-cli 2.3.8-beta.1 → 2.3.8-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/approval/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 -1
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/import-excel.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/kb/index.js +1 -1
  38. package/lib/commands/logs/index.js +1 -1
  39. package/lib/commands/notification/config-list.js +1 -1
  40. package/lib/commands/notification/index.js +1 -1
  41. package/lib/commands/notification/shared.js +1 -1
  42. package/lib/commands/ocr/index.js +1 -1
  43. package/lib/commands/permit/dataset-get.js +1 -1
  44. package/lib/commands/permit/dataset-set.js +1 -1
  45. package/lib/commands/permit/index.js +1 -1
  46. package/lib/commands/permit/page-get.js +1 -1
  47. package/lib/commands/permit/page-set.js +1 -1
  48. package/lib/commands/permit/role-menus-set.js +1 -1
  49. package/lib/commands/permit/role-menus.js +1 -1
  50. package/lib/commands/permit/shared.js +1 -1
  51. package/lib/commands/personal-bff/index.js +1 -1
  52. package/lib/commands/registry.js +1 -1
  53. package/lib/commands/role/create.js +1 -1
  54. package/lib/commands/role/delete.js +1 -1
  55. package/lib/commands/role/detail.js +1 -1
  56. package/lib/commands/role/index.js +1 -1
  57. package/lib/commands/role/list.js +1 -1
  58. package/lib/commands/role/shared.d.ts +32 -6
  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.d.ts +2 -4
  88. package/lib/commands/sql/exec.js +1 -1
  89. package/lib/commands/sql/index.js +1 -1
  90. package/lib/commands/update.js +1 -1
  91. package/lib/commands/user-account/bind.js +1 -1
  92. package/lib/commands/user-account/index.js +1 -1
  93. package/lib/commands/workspace/index.js +1 -1
  94. package/lib/config/domain-config.js +1 -1
  95. package/lib/config/schema.js +1 -1
  96. package/lib/constant/app.js +1 -1
  97. package/lib/constant/auth-mode.js +1 -1
  98. package/lib/constant/cli.js +1 -1
  99. package/lib/constant/defaults.js +1 -1
  100. package/lib/constant/distribution.js +1 -1
  101. package/lib/constant/domain.js +1 -1
  102. package/lib/constant/env.js +1 -1
  103. package/lib/constant/output.js +1 -1
  104. package/lib/constant/product.js +1 -1
  105. package/lib/constant/region.js +1 -1
  106. package/lib/constant/risk.js +1 -1
  107. package/lib/constant/url.js +1 -1
  108. package/lib/context.js +1 -1
  109. package/lib/core/api-client.d.ts +26 -358
  110. package/lib/core/api-client.js +1 -1
  111. package/lib/core/db-resolver.js +1 -1
  112. package/lib/core/kb-management-client.js +1 -1
  113. package/lib/core/kb-search-client.js +1 -1
  114. package/lib/core/sdk-client.d.ts +9 -10
  115. package/lib/core/sdk-client.js +1 -1
  116. package/lib/errors.js +1 -1
  117. package/lib/framework/access-error.js +1 -1
  118. package/lib/framework/build-all-flags.js +1 -1
  119. package/lib/framework/dryrun.js +1 -1
  120. package/lib/framework/flags.js +1 -1
  121. package/lib/framework/help.js +1 -1
  122. package/lib/framework/index.js +1 -1
  123. package/lib/framework/output.js +1 -1
  124. package/lib/framework/preparse.js +1 -1
  125. package/lib/framework/rate-limit.js +1 -1
  126. package/lib/framework/raw-flags.js +1 -1
  127. package/lib/framework/response.js +1 -1
  128. package/lib/framework/runner-confirmation.js +1 -1
  129. package/lib/framework/runner-error.js +1 -1
  130. package/lib/framework/runner.js +1 -1
  131. package/lib/framework/schema-export.js +1 -1
  132. package/lib/framework/service-order.js +1 -1
  133. package/lib/framework/types.js +1 -1
  134. package/lib/generated/build-info.d.ts +4 -4
  135. package/lib/generated/build-info.js +1 -1
  136. package/lib/generated/official-routing.js +1 -1
  137. package/lib/generated/routing-contract.js +1 -1
  138. package/lib/help.js +1 -1
  139. package/lib/postinstall.js +1 -1
  140. package/lib/runtime/confirmation.js +1 -1
  141. package/lib/runtime/event.js +1 -1
  142. package/lib/runtime/index.js +1 -1
  143. package/lib/runtime/queue.js +1 -1
  144. package/lib/runtime/resolve.js +1 -1
  145. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  146. package/lib/services/dataset-import/excel-reader.js +1 -1
  147. package/lib/services/dataset-import/image-bytes.js +1 -1
  148. package/lib/services/dataset-import/image-ooxml.js +1 -1
  149. package/lib/services/dataset-import/image-runner.js +1 -1
  150. package/lib/services/dataset-import/metadata.js +1 -1
  151. package/lib/services/dataset-import/preview.js +1 -1
  152. package/lib/services/dataset-import/runner.js +1 -1
  153. package/lib/skills/builtin-skill.js +1 -1
  154. package/lib/skills/npx-skills-add.js +1 -1
  155. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  156. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  157. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  158. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  159. package/lib/skills/runtime-skill-sync/links.js +1 -1
  160. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  161. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  162. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  163. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  164. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  165. package/lib/skills/runtime-skill-sync/push.js +1 -1
  166. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  167. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  168. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  169. package/lib/skills/runtime-skill-sync.js +1 -1
  170. package/lib/skills/skill-presence.js +1 -1
  171. package/lib/utils/access-key-redaction.js +1 -1
  172. package/lib/utils/apply-jq-filter.js +1 -1
  173. package/lib/utils/cli-version-check.js +1 -1
  174. package/lib/utils/cli-version-policy.js +1 -1
  175. package/lib/utils/logger.js +1 -1
  176. package/lib/utils/lossless-json.js +1 -1
  177. package/lib/utils/params.js +1 -1
  178. package/lib/utils/positive-safe-integer.js +1 -1
  179. package/lib/utils/redaction.js +1 -1
  180. package/lib/utils/runtime-user-id.d.ts +2 -0
  181. package/lib/utils/runtime-user-id.js +1 -0
  182. package/lib/utils/update-notice.js +1 -1
  183. package/lib/utils/version.js +1 -1
  184. package/lib/utils/write-cli-side-channel.js +1 -1
  185. package/package.json +2 -2
  186. package/skills/lovrabet/SKILL.md +1 -1
  187. package/skills/lovrabet/guides/role-and-permission-workflow.md +3 -2
  188. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x4673d9,_0x243a11){const _0x3d3c0e=a156_0x3a38,_0x5f336e=_0x4673d9();while(!![]){try{const _0x4f61ba=-parseInt(_0x3d3c0e(0x15c))/0x1+parseInt(_0x3d3c0e(0x154))/0x2+-parseInt(_0x3d3c0e(0x169))/0x3*(parseInt(_0x3d3c0e(0x146))/0x4)+-parseInt(_0x3d3c0e(0x148))/0x5*(-parseInt(_0x3d3c0e(0x16e))/0x6)+parseInt(_0x3d3c0e(0x155))/0x7+parseInt(_0x3d3c0e(0x150))/0x8*(parseInt(_0x3d3c0e(0x15f))/0x9)+-parseInt(_0x3d3c0e(0x15b))/0xa;if(_0x4f61ba===_0x243a11)break;else _0x5f336e['push'](_0x5f336e['shift']());}catch(_0x479ac3){_0x5f336e['push'](_0x5f336e['shift']());}}}(a156_0x47af,0xedbea));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(_0x1b7090){const _0xbdd0c8=a156_0x3a38;return _0x1b7090[_0xbdd0c8(0x168)]??Buffer[_0xbdd0c8(0x14b)](_0x1b7090[_0xbdd0c8(0x151)]??'','utf8');}export function fileText(_0x5e4d44){const _0x52d437=a156_0x3a38;return fileContent(_0x5e4d44)[_0x52d437(0x163)](_0x52d437(0x16b));}export function normalizeLocalFiles(_0x4a01b0){const _0x55ca15=a156_0x3a38;if(!Array['isArray'](_0x4a01b0)||_0x4a01b0[_0x55ca15(0x14e)]===0x0)return[];const _0x45859a=new Map();for(const _0x51cb8c of _0x4a01b0){if(!_0x51cb8c||typeof _0x51cb8c!==_0x55ca15(0x16c)||typeof _0x51cb8c[_0x55ca15(0x16a)]!=='string')throw CliErrors['validation'](_0x55ca15(0x14d));const _0x335cb4=normalizeSkillRelativePath(_0x51cb8c[_0x55ca15(0x16a)]);if(_0x45859a['has'](_0x335cb4))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x335cb4);if(_0x51cb8c[_0x55ca15(0x168)]!==undefined&&!Buffer[_0x55ca15(0x15d)](_0x51cb8c['bytes']))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x335cb4);if(_0x51cb8c[_0x55ca15(0x168)]===undefined&&typeof _0x51cb8c[_0x55ca15(0x151)]!==_0x55ca15(0x167))throw CliErrors[_0x55ca15(0x16d)](_0x55ca15(0x156)+_0x335cb4);const _0x4976e0=fileContent(_0x51cb8c);_0x45859a[_0x55ca15(0x14a)](_0x335cb4,{'path':_0x335cb4,'bytes':_0x4976e0});}return Array[_0x55ca15(0x14b)](_0x45859a[_0x55ca15(0x143)]())[_0x55ca15(0x147)](compareSkillFiles);}export function normalizeManifestFiles(_0x4841ad){const _0x5b8abc=a156_0x3a38;if(!Array['isArray'](_0x4841ad)||_0x4841ad[_0x5b8abc(0x14e)]===0x0)return[];const _0x278746=new Map();for(const _0x3397f8 of _0x4841ad){if(!_0x3397f8||typeof _0x3397f8!==_0x5b8abc(0x16c)||typeof _0x3397f8[_0x5b8abc(0x16a)]!=='string')throw CliErrors[_0x5b8abc(0x16d)](_0x5b8abc(0x14d));const _0x414395=normalizeSkillRelativePath(_0x3397f8[_0x5b8abc(0x16a)]);if(_0x278746[_0x5b8abc(0x152)](_0x414395))throw CliErrors[_0x5b8abc(0x16d)](_0x5b8abc(0x149)+_0x414395);if(!isSha256Hex(_0x3397f8[_0x5b8abc(0x153)]))throw CliErrors['validation'](_0x5b8abc(0x15a)+_0x414395);if(!Number[_0x5b8abc(0x145)](_0x3397f8[_0x5b8abc(0x159)])||_0x3397f8[_0x5b8abc(0x159)]<0x0)throw CliErrors['validation'](_0x5b8abc(0x161)+_0x414395);_0x278746[_0x5b8abc(0x14a)](_0x414395,{'path':_0x414395,'sha256':_0x3397f8['sha256']['toLowerCase'](),'size':_0x3397f8['size']});}return Array[_0x5b8abc(0x14b)](_0x278746['values']())[_0x5b8abc(0x147)](compareSkillFiles);}export function scanSkillDirectory(_0x51564e,_0x268ead={}){const _0x36bd41=realpathSync(_0x51564e),_0x2cf27e=canonicalExcludedFilePaths(_0x268ead['excludedFilePaths']),_0xdf5cdb=[];function _0x2e1046(_0x56b7e0){const _0x22f921=a156_0x3a38,_0x3da09e=readdirSync(_0x56b7e0,{'withFileTypes':!![]})['sort']((_0x30ccb5,_0x49f03c)=>_0x30ccb5[_0x22f921(0x166)]['localeCompare'](_0x49f03c[_0x22f921(0x166)]));for(const _0x47cec1 of _0x3da09e){if(_0x47cec1[_0x22f921(0x162)]()&&IGNORED_DIR_NAMES[_0x22f921(0x152)](_0x47cec1['name']))continue;if(IGNORED_FILE_NAMES[_0x22f921(0x152)](_0x47cec1[_0x22f921(0x166)]))continue;const _0x44afd1=resolve(_0x56b7e0,_0x47cec1['name']);if(isExcludedFilePath(_0x44afd1,_0x2cf27e))continue;if(_0x47cec1[_0x22f921(0x144)]())throw CliErrors[_0x22f921(0x16d)](_0x22f921(0x158)+_0x44afd1);const _0x21e737=toPosixPath(relative(_0x36bd41,_0x44afd1));if(_0x47cec1[_0x22f921(0x162)]()){_0x2e1046(_0x44afd1);continue;}if(!_0x47cec1[_0x22f921(0x160)]())continue;validateSkillRelativePath(_0x21e737);const _0x2eb096=readFileSync(_0x44afd1);_0xdf5cdb['push']({'path':_0x21e737,'bytes':_0x2eb096});}}return _0x2e1046(_0x36bd41),normalizeLocalFiles(_0xdf5cdb);}function canonicalExcludedFilePaths(_0x471393){const _0x4b37ff=a156_0x3a38,_0x5ecc09=new Set();for(const _0x376b89 of _0x471393??[]){const _0x44b567=resolve(_0x376b89);_0x5ecc09[_0x4b37ff(0x14c)](_0x44b567);try{_0x5ecc09[_0x4b37ff(0x14c)](realpathSync(_0x44b567));}catch{}}return _0x5ecc09;}function isExcludedFilePath(_0x5e9ece,_0x555d9d){const _0xa36ea8=a156_0x3a38;if(_0x555d9d[_0xa36ea8(0x152)](_0x5e9ece))return!![];if(_0x555d9d['size']===0x0)return![];try{return _0x555d9d[_0xa36ea8(0x152)](realpathSync(_0x5e9ece));}catch{return![];}}function a156_0x3a38(_0xbd0549,_0x175fa2){_0xbd0549=_0xbd0549-0x143;const _0x47af9f=a156_0x47af();let _0x3a3805=_0x47af9f[_0xbd0549];return _0x3a3805;}export function compareSkillFiles(_0x49cee4,_0x5c34b9){const _0x19ea20=a156_0x3a38;if(_0x49cee4[_0x19ea20(0x16a)]===SKILL_FILE)return _0x5c34b9[_0x19ea20(0x16a)]===SKILL_FILE?0x0:-0x1;if(_0x5c34b9['path']===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x19ea20(0x14b)](_0x49cee4[_0x19ea20(0x16a)],'utf8'),Buffer[_0x19ea20(0x14b)](_0x5c34b9[_0x19ea20(0x16a)],_0x19ea20(0x16b)));}export function normalizeSkillRelativePath(_0x5268ef){const _0x1f6eaa=a156_0x3a38,_0x3b26f7=toPosixPath(_0x5268ef[_0x1f6eaa(0x16f)]());return validateSkillRelativePath(_0x3b26f7),_0x3b26f7;}function a156_0x47af(){const _0x3f1824=['884730FPHGjB','isBuffer','replace','45ubYIfn','isFile','Skill\x20file\x20size\x20is\x20invalid:\x20','isDirectory','toString','includes','split','name','string','bytes','787002OHOila','path','utf8','object','validation','18LVrXrl','trim','values','isSymbolicLink','isSafeInteger','28CmlJup','sort','2977885RtQqQg','Duplicate\x20Skill\x20file\x20path:\x20','set','from','add','Skill\x20file\x20path\x20must\x20be\x20text.','length','Unsafe\x20Skill\x20file\x20path:\x20','526616lddzIT','content','has','sha256','2328544cwjaJH','11183473BLYlaH','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','test','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','size','Skill\x20file\x20sha256\x20is\x20invalid:\x20','11829070vCQttB'];a156_0x47af=function(){return _0x3f1824;};return a156_0x47af();}export function validateSkillRelativePath(_0x584f1b){const _0x512351=a156_0x3a38;if(!_0x584f1b||_0x584f1b['startsWith']('/')||_0x584f1b[_0x512351(0x164)]('//'))throw CliErrors[_0x512351(0x16d)](_0x512351(0x14f)+_0x584f1b);for(const _0x3ce79a of _0x584f1b[_0x512351(0x165)]('/')){if(!_0x3ce79a||_0x3ce79a==='.'||_0x3ce79a==='..')throw CliErrors[_0x512351(0x16d)](_0x512351(0x14f)+_0x584f1b);}}export function toPosixPath(_0x313df8){const _0x3a1204=a156_0x3a38;return _0x313df8[_0x3a1204(0x15e)](/\\/g,'/');}export function isSha256Hex(_0x34f6ad){const _0x458dff=a156_0x3a38;return typeof _0x34f6ad===_0x458dff(0x167)&&/^[a-fA-F0-9]{64}$/[_0x458dff(0x157)](_0x34f6ad);}
1
+ (function(_0x3a3083,_0x19486b){const _0x3f7510=a156_0x1548,_0x375b37=_0x3a3083();while(!![]){try{const _0x1679cd=-parseInt(_0x3f7510(0xf0))/0x1+-parseInt(_0x3f7510(0xf9))/0x2*(-parseInt(_0x3f7510(0x10a))/0x3)+parseInt(_0x3f7510(0x112))/0x4*(parseInt(_0x3f7510(0x118))/0x5)+-parseInt(_0x3f7510(0xf3))/0x6*(-parseInt(_0x3f7510(0xf1))/0x7)+-parseInt(_0x3f7510(0x101))/0x8+-parseInt(_0x3f7510(0x103))/0x9+-parseInt(_0x3f7510(0x111))/0xa*(-parseInt(_0x3f7510(0x11b))/0xb);if(_0x1679cd===_0x19486b)break;else _0x375b37['push'](_0x375b37['shift']());}catch(_0x3dd949){_0x375b37['push'](_0x375b37['shift']());}}}(a156_0x8b31,0x2b87a));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';function a156_0x1548(_0x4dfdc1,_0x58ce7c){_0x4dfdc1=_0x4dfdc1-0xee;const _0x8b316a=a156_0x8b31();let _0x1548f5=_0x8b316a[_0x4dfdc1];return _0x1548f5;}import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';function a156_0x8b31(){const _0x4b12cf=['utf8','sort','isSymbolicLink','sha256','100063HfolUD','11774wsOIFR','bytes','654olIwPz','localeCompare','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','path','length','startsWith','2WZnEQV','Skill\x20file\x20sha256\x20is\x20invalid:\x20','compare','object','from','Skill\x20file\x20path\x20must\x20be\x20text.','has','toLowerCase','1262472ytpEvV','isArray','2012787whFnQJ','name','add','string','isDirectory','set','toString','359439LSaUxR','values','Duplicate\x20Skill\x20file\x20path:\x20','test','includes','Unsafe\x20Skill\x20file\x20path:\x20','trim','21850mvGzVf','4CRUXDA','size','Skill\x20file\x20size\x20is\x20invalid:\x20','isSafeInteger','excludedFilePaths','content','395835DgMVKe','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','replace','1397JHvNsg','isFile','validation'];a156_0x8b31=function(){return _0x4b12cf;};return a156_0x8b31();}export function fileContent(_0x2c1314){const _0x2fead5=a156_0x1548;return _0x2c1314[_0x2fead5(0xf2)]??Buffer['from'](_0x2c1314[_0x2fead5(0x117)]??'',_0x2fead5(0x11e));}export function fileText(_0x3d979e){const _0x50e648=a156_0x1548;return fileContent(_0x3d979e)[_0x50e648(0x109)](_0x50e648(0x11e));}export function normalizeLocalFiles(_0x3add99){const _0x548205=a156_0x1548;if(!Array[_0x548205(0x102)](_0x3add99)||_0x3add99[_0x548205(0xf7)]===0x0)return[];const _0x23e077=new Map();for(const _0x10c666 of _0x3add99){if(!_0x10c666||typeof _0x10c666!=='object'||typeof _0x10c666['path']!==_0x548205(0x106))throw CliErrors[_0x548205(0x11d)](_0x548205(0xfe));const _0x17a96e=normalizeSkillRelativePath(_0x10c666[_0x548205(0xf6)]);if(_0x23e077[_0x548205(0xff)](_0x17a96e))throw CliErrors[_0x548205(0x11d)](_0x548205(0x10c)+_0x17a96e);if(_0x10c666[_0x548205(0xf2)]!==undefined&&!Buffer['isBuffer'](_0x10c666[_0x548205(0xf2)]))throw CliErrors['validation'](_0x548205(0x119)+_0x17a96e);if(_0x10c666[_0x548205(0xf2)]===undefined&&typeof _0x10c666[_0x548205(0x117)]!==_0x548205(0x106))throw CliErrors[_0x548205(0x11d)](_0x548205(0xf5)+_0x17a96e);const _0x45d3c3=fileContent(_0x10c666);_0x23e077['set'](_0x17a96e,{'path':_0x17a96e,'bytes':_0x45d3c3});}return Array['from'](_0x23e077['values']())[_0x548205(0x11f)](compareSkillFiles);}export function normalizeManifestFiles(_0x514fc2){const _0x4cb1ce=a156_0x1548;if(!Array[_0x4cb1ce(0x102)](_0x514fc2)||_0x514fc2[_0x4cb1ce(0xf7)]===0x0)return[];const _0x1e997b=new Map();for(const _0x428795 of _0x514fc2){if(!_0x428795||typeof _0x428795!==_0x4cb1ce(0xfc)||typeof _0x428795['path']!==_0x4cb1ce(0x106))throw CliErrors[_0x4cb1ce(0x11d)](_0x4cb1ce(0xfe));const _0x5286a3=normalizeSkillRelativePath(_0x428795[_0x4cb1ce(0xf6)]);if(_0x1e997b[_0x4cb1ce(0xff)](_0x5286a3))throw CliErrors[_0x4cb1ce(0x11d)](_0x4cb1ce(0x10c)+_0x5286a3);if(!isSha256Hex(_0x428795[_0x4cb1ce(0xef)]))throw CliErrors[_0x4cb1ce(0x11d)](_0x4cb1ce(0xfa)+_0x5286a3);if(!Number[_0x4cb1ce(0x115)](_0x428795[_0x4cb1ce(0x113)])||_0x428795[_0x4cb1ce(0x113)]<0x0)throw CliErrors[_0x4cb1ce(0x11d)](_0x4cb1ce(0x114)+_0x5286a3);_0x1e997b[_0x4cb1ce(0x108)](_0x5286a3,{'path':_0x5286a3,'sha256':_0x428795['sha256'][_0x4cb1ce(0x100)](),'size':_0x428795[_0x4cb1ce(0x113)]});}return Array[_0x4cb1ce(0xfd)](_0x1e997b[_0x4cb1ce(0x10b)]())[_0x4cb1ce(0x11f)](compareSkillFiles);}export function scanSkillDirectory(_0x22d580,_0x4f5fe2={}){const _0x529109=a156_0x1548,_0x279a98=realpathSync(_0x22d580),_0x1ef65f=canonicalExcludedFilePaths(_0x4f5fe2[_0x529109(0x116)]),_0x31f363=[];function _0x16f19b(_0x5c1e26){const _0x2c5d68=_0x529109,_0x36a20f=readdirSync(_0x5c1e26,{'withFileTypes':!![]})[_0x2c5d68(0x11f)]((_0x21ea97,_0x350321)=>_0x21ea97[_0x2c5d68(0x104)][_0x2c5d68(0xf4)](_0x350321[_0x2c5d68(0x104)]));for(const _0x356e5b of _0x36a20f){if(_0x356e5b[_0x2c5d68(0x107)]()&&IGNORED_DIR_NAMES[_0x2c5d68(0xff)](_0x356e5b[_0x2c5d68(0x104)]))continue;if(IGNORED_FILE_NAMES['has'](_0x356e5b['name']))continue;const _0x1bd458=resolve(_0x5c1e26,_0x356e5b[_0x2c5d68(0x104)]);if(isExcludedFilePath(_0x1bd458,_0x1ef65f))continue;if(_0x356e5b[_0x2c5d68(0xee)]())throw CliErrors['validation']('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x1bd458);const _0x1b7f88=toPosixPath(relative(_0x279a98,_0x1bd458));if(_0x356e5b[_0x2c5d68(0x107)]()){_0x16f19b(_0x1bd458);continue;}if(!_0x356e5b[_0x2c5d68(0x11c)]())continue;validateSkillRelativePath(_0x1b7f88);const _0x19d363=readFileSync(_0x1bd458);_0x31f363['push']({'path':_0x1b7f88,'bytes':_0x19d363});}}return _0x16f19b(_0x279a98),normalizeLocalFiles(_0x31f363);}function canonicalExcludedFilePaths(_0x4c2605){const _0x291258=a156_0x1548,_0xc91a17=new Set();for(const _0x56b0a5 of _0x4c2605??[]){const _0x5eda67=resolve(_0x56b0a5);_0xc91a17[_0x291258(0x105)](_0x5eda67);try{_0xc91a17[_0x291258(0x105)](realpathSync(_0x5eda67));}catch{}}return _0xc91a17;}function isExcludedFilePath(_0x53d5a4,_0x2f7ee3){const _0x327da7=a156_0x1548;if(_0x2f7ee3['has'](_0x53d5a4))return!![];if(_0x2f7ee3[_0x327da7(0x113)]===0x0)return![];try{return _0x2f7ee3['has'](realpathSync(_0x53d5a4));}catch{return![];}}export function compareSkillFiles(_0x3a1c42,_0x4908b3){const _0x1aad01=a156_0x1548;if(_0x3a1c42['path']===SKILL_FILE)return _0x4908b3[_0x1aad01(0xf6)]===SKILL_FILE?0x0:-0x1;if(_0x4908b3[_0x1aad01(0xf6)]===SKILL_FILE)return 0x1;return Buffer[_0x1aad01(0xfb)](Buffer[_0x1aad01(0xfd)](_0x3a1c42[_0x1aad01(0xf6)],_0x1aad01(0x11e)),Buffer[_0x1aad01(0xfd)](_0x4908b3[_0x1aad01(0xf6)],'utf8'));}export function normalizeSkillRelativePath(_0x372a66){const _0x2c6605=a156_0x1548,_0xf3246=toPosixPath(_0x372a66[_0x2c6605(0x110)]());return validateSkillRelativePath(_0xf3246),_0xf3246;}export function validateSkillRelativePath(_0xe00dab){const _0x143846=a156_0x1548;if(!_0xe00dab||_0xe00dab[_0x143846(0xf8)]('/')||_0xe00dab[_0x143846(0x10e)]('//'))throw CliErrors['validation'](_0x143846(0x10f)+_0xe00dab);for(const _0x1a1cdd of _0xe00dab['split']('/')){if(!_0x1a1cdd||_0x1a1cdd==='.'||_0x1a1cdd==='..')throw CliErrors[_0x143846(0x11d)](_0x143846(0x10f)+_0xe00dab);}}export function toPosixPath(_0x5dd3d2){const _0x5a3acd=a156_0x1548;return _0x5dd3d2[_0x5a3acd(0x11a)](/\\/g,'/');}export function isSha256Hex(_0x12c886){const _0x1ab233=a156_0x1548;return typeof _0x12c886===_0x1ab233(0x106)&&/^[a-fA-F0-9]{64}$/[_0x1ab233(0x10d)](_0x12c886);}
@@ -1 +1 @@
1
- (function(_0x35379f,_0x4bda64){const _0x5e39bb=a157_0xa0bc,_0x1e309c=_0x35379f();while(!![]){try{const _0x45bf60=parseInt(_0x5e39bb(0x1ea))/0x1+parseInt(_0x5e39bb(0x20c))/0x2+-parseInt(_0x5e39bb(0x1e0))/0x3*(parseInt(_0x5e39bb(0x1e7))/0x4)+parseInt(_0x5e39bb(0x20f))/0x5*(parseInt(_0x5e39bb(0x1e6))/0x6)+parseInt(_0x5e39bb(0x201))/0x7+parseInt(_0x5e39bb(0x1da))/0x8+-parseInt(_0x5e39bb(0x1d6))/0x9*(parseInt(_0x5e39bb(0x1e8))/0xa);if(_0x45bf60===_0x4bda64)break;else _0x1e309c['push'](_0x1e309c['shift']());}catch(_0x3debc0){_0x1e309c['push'](_0x1e309c['shift']());}}}(a157_0x5463,0x40410));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';function a157_0x5463(){const _0x3c5357=['676917JaWqke','trim','hasOwn','join','1967600GhronW','trimEnd','replace','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','scope','displayName','909mnxlHQ','Runtime\x20Skill\x20package\x20is\x20missing\x20','contentHash','map','pulledAt','Managed\x20file\x20was\x20removed\x20locally:\x20','474vcgNLn','4208ahNdUD','50votLGD','contents','170653mxihAu','delete','schemaVersion','.\x20Changed\x20file:\x20','entries','name:\x20','displayName:\x20','find','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','accessKey','stringify','force','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','paths','toString','utf8','skillName','version','test','description','keys','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','status','268163BOPzxB','description:\x20','filter','appCode','fileHashes','\x0a---\x0a\x0a','validation','flow','path','has','example','172736LcqDmg','errors','length','26375QRYtjZ','---','slice','isFile'];a157_0x5463=function(){return _0x3c5357;};return a157_0x5463();}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(_0x2fa795,_0x4c2cbe,_0x3d6f75){const _0x2012b8=a157_0xa0bc,_0x4da5e1=requireSkillCode(_0x2fa795),_0x507528=requirePackageBytes(_0x4da5e1,_0x3d6f75['packageBytes']),_0x5d42d2=extractDownloadedPackage(_0x507528),_0x1eb811=_0x5d42d2['find'](_0x1a6f59=>_0x1a6f59['path']===SKILL_FILE);if(!_0x1eb811)throw CliErrors[_0x2012b8(0x207)](_0x2012b8(0x1e1)+SKILL_FILE+':\x20'+_0x4da5e1);const _0x7c42ff=withMaterializedSkillFrontmatter(_0x5d42d2,_0x2fa795,_0x4da5e1),_0x124bdd=_0x7c42ff[_0x2012b8(0x1f1)](_0x2f98fe=>_0x2f98fe[_0x2012b8(0x209)]===SKILL_FILE),_0xe69967=fileText(_0x124bdd),_0x4abd67=getRuntimeSkillDir(_0x3d6f75['env'],_0x3d6f75['accessKey'],_0x3d6f75['appCode'],_0x4c2cbe,_0x4da5e1,_0x3d6f75[_0x2012b8(0x1f7)]),_0x484a87=resolve(_0x4abd67,SKILL_FILE),_0x192ccf=resolve(_0x4abd67,METADATA_FILE),_0x1470f4=contentHash(_0xe69967),_0x1142f8=readMetadataIfPresent(_0x192ccf)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x4abd67,_0x192ccf,_0x7c42ff,_0x3d6f75[_0x2012b8(0x1f5)]===!![]),mkdirSync(_0x4abd67,{'recursive':!![],'mode':0x1c0});const _0x27670a=existsSync(_0x484a87)?readFileSync(_0x484a87,_0x2012b8(0x1f9)):undefined;return materializeFiles(_0x4abd67,_0x7c42ff),removeStaleManagedFiles(_0x4abd67,_0x1142f8,_0x7c42ff),writeJsonAtomic(_0x192ccf,buildMetadata(_0x2fa795,_0x4c2cbe,_0x3d6f75[_0x2012b8(0x204)],_0x1470f4,_0x3d6f75[_0x2012b8(0x1e4)],_0x7c42ff,_0x507528)),{'skill':_0x2fa795,'scope':_0x4c2cbe,'dir':_0x4abd67,'skillMdPath':_0x484a87,'metadataPath':_0x192ccf,'contentHash':_0x1470f4,'changed':_0x27670a!==_0xe69967};}export function reuseMaterializedRuntimeSkill(_0x21521f,_0x155240,_0x36294b){const _0x33dc18=a157_0xa0bc,_0x3e9468=_0x21521f[_0x33dc18(0x1fb)]?.['trim']();if(!_0x3e9468)return undefined;const _0x5541c0=requireSkillCode(_0x21521f),_0x2fbee0=getRuntimeSkillDir(_0x36294b['env'],_0x36294b[_0x33dc18(0x1f3)],_0x36294b[_0x33dc18(0x204)],_0x155240,_0x5541c0,_0x36294b[_0x33dc18(0x1f7)]),_0x3b5063=resolve(_0x2fbee0,SKILL_FILE),_0x3c428d=resolve(_0x2fbee0,METADATA_FILE),_0x53a1bf=readMetadataIfPresent(_0x3c428d);if(!_0x53a1bf||_0x53a1bf[_0x33dc18(0x1ec)]!==0x2||_0x53a1bf[_0x33dc18(0x204)]!==_0x36294b[_0x33dc18(0x204)]||_0x53a1bf[_0x33dc18(0x1de)]!==_0x155240||_0x53a1bf['skillCode']!==_0x5541c0||_0x53a1bf[_0x33dc18(0x1fb)]!==_0x3e9468||_0x53a1bf['id']!==_0x21521f['id']||_0x53a1bf[_0x33dc18(0x1fa)]!==_0x21521f[_0x33dc18(0x1fa)]||_0x53a1bf[_0x33dc18(0x1fd)]!==_0x21521f[_0x33dc18(0x1fd)]||_0x53a1bf[_0x33dc18(0x20b)]!==_0x21521f['example']||_0x53a1bf[_0x33dc18(0x200)]!==_0x21521f['status']||!_0x53a1bf[_0x33dc18(0x1e2)]||!_0x53a1bf[_0x33dc18(0x205)]||!Object[_0x33dc18(0x1d8)](_0x53a1bf[_0x33dc18(0x205)],SKILL_FILE))return undefined;for(const [_0x5c9d46,_0x5eb727]of Object[_0x33dc18(0x1ee)](_0x53a1bf[_0x33dc18(0x205)])){if(!/^[a-f0-9]{64}$/['test'](_0x5eb727))return undefined;const _0x38cf62=resolveManagedFilePath(_0x2fbee0,_0x5c9d46);if(!existsSync(_0x38cf62)||!lstatSync(_0x38cf62)[_0x33dc18(0x1d5)]())return undefined;if(bufferSha256(readFileSync(_0x38cf62))!==_0x5eb727)return undefined;}return{'skill':_0x21521f,'scope':_0x155240,'dir':_0x2fbee0,'skillMdPath':_0x3b5063,'metadataPath':_0x3c428d,'contentHash':_0x53a1bf[_0x33dc18(0x1e2)],'changed':![]};}function withMaterializedSkillFrontmatter(_0xbaf9ea,_0x20213a,_0x1a623b){const _0x2ea1e8=a157_0xa0bc,_0x1f61ba=skillDisplayName(_0x20213a,_0x1a623b),_0x42be03=_0x20213a[_0x2ea1e8(0x1fd)]?.[_0x2ea1e8(0x1d7)]()||_0x1f61ba||_0x1a623b;return normalizeLocalFiles(_0xbaf9ea)[_0x2ea1e8(0x1e3)](_0x15e4b6=>{const _0x1c7027=_0x2ea1e8,_0x1b53df=fileText(_0x15e4b6);if(_0x15e4b6['path']!==SKILL_FILE)return _0x15e4b6;if(hasYamlFrontmatter(_0x1b53df))return{'path':_0x15e4b6[_0x1c7027(0x209)],'content':withSyncedDisplayName(_0x1b53df,_0x1f61ba)};return{'path':_0x15e4b6['path'],'content':prependSkillFrontmatter(_0x1b53df,{'name':_0x1a623b,'displayName':_0x1f61ba,'description':_0x42be03})};});}function hasYamlFrontmatter(_0x386937){const _0x2f7ebd=a157_0xa0bc;return/^\uFEFF?---\s*\r?\n/[_0x2f7ebd(0x1fc)](_0x386937);}function a157_0xa0bc(_0x26f928,_0x3b9563){_0x26f928=_0x26f928-0x1d3;const _0x5463a6=a157_0x5463();let _0xa0bcb5=_0x5463a6[_0x26f928];return _0xa0bcb5;}function prependSkillFrontmatter(_0x590ad8,_0x281367){const _0x3526e0=a157_0xa0bc,_0x45ce9a=_0x590ad8[_0x3526e0(0x1dc)](/^\uFEFF/,'');return[_0x3526e0(0x1d3),_0x3526e0(0x1ef)+yamlString(_0x281367['name']),_0x281367[_0x3526e0(0x1df)]?_0x3526e0(0x1f0)+yamlString(_0x281367[_0x3526e0(0x1df)]):undefined,_0x3526e0(0x202)+yamlString(_0x281367[_0x3526e0(0x1fd)]),_0x3526e0(0x1d3),'',_0x45ce9a][_0x3526e0(0x203)](_0x4007b6=>_0x4007b6!==undefined)[_0x3526e0(0x1d9)]('\x0a');}function yamlString(_0x3e5131){const _0xbf542a=a157_0xa0bc;return JSON[_0xbf542a(0x1f4)](_0x3e5131[_0xbf542a(0x1dc)](/\r/g,'')['trim']());}function skillDisplayName(_0x26194a,_0x860106){const _0x4a50b2=a157_0xa0bc,_0x54bcd2=_0x26194a['skillName']?.[_0x4a50b2(0x1d7)]();return _0x54bcd2||_0x860106;}function withSyncedDisplayName(_0x103d28,_0x527030){const _0x190ffe=a157_0xa0bc,_0x4a7701=_0x103d28['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4a7701)return _0x103d28;const _0x330194=_0x4a7701[0x1]??'',_0x4f9786=_0x4a7701[0x2]??'',_0x79db05=parseDocument(_0x4f9786);if(_0x79db05[_0x190ffe(0x20d)][_0x190ffe(0x20e)]>0x0||!isMap(_0x79db05[_0x190ffe(0x1e9)]))return _0x103d28;if(_0x527030)_0x79db05['set']('displayName',_0x527030);else{if(_0x79db05[_0x190ffe(0x20a)](_0x190ffe(0x1df)))_0x79db05[_0x190ffe(0x1eb)]('displayName');else return _0x103d28;}forceBlockCollections(_0x79db05[_0x190ffe(0x1e9)]);const _0x5f04c4=_0x79db05[_0x190ffe(0x1f8)]({'lineWidth':0x0})[_0x190ffe(0x1db)](),_0xa0fedb=_0x103d28[_0x190ffe(0x1d4)](_0x4a7701[0x0]['length'])[_0x190ffe(0x1dc)](/^\r?\n/,'');return _0x330194+'---\x0a'+_0x5f04c4+_0x190ffe(0x206)+_0xa0fedb;}function forceBlockCollections(_0x5b502d){if(!isNode(_0x5b502d))return;visit(_0x5b502d,(_0x17586f,_0x24f7c3)=>{const _0x3a0f83=a157_0xa0bc;isCollection(_0x24f7c3)&&(_0x24f7c3[_0x3a0f83(0x208)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x487d77,_0x228e2d,_0x21e651,_0x677f0b){const _0x42e64c=a157_0xa0bc;if(_0x677f0b||!existsSync(_0x228e2d))return;const _0x43b92e=readMetadataIfPresent(_0x228e2d);if(!_0x43b92e)return;const _0x535b8f=_0x43b92e[_0x42e64c(0x205)]&&Object[_0x42e64c(0x1fe)](_0x43b92e['fileHashes'])[_0x42e64c(0x20e)]>0x0?_0x43b92e[_0x42e64c(0x205)]:undefined;if(_0x535b8f)for(const [_0x360fc0,_0x55f865]of Object['entries'](_0x535b8f)){const _0x58ad27=resolveManagedFilePath(_0x487d77,_0x360fc0);if(!existsSync(_0x58ad27))throw CliErrors[_0x42e64c(0x207)](_0x42e64c(0x1f2)+_0x487d77,_0x42e64c(0x1e5)+_0x360fc0);const _0x392daf=lstatSync(_0x58ad27);if(!_0x392daf[_0x42e64c(0x1d5)]())throw CliErrors[_0x42e64c(0x207)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x487d77,_0x42e64c(0x1dd)+_0x360fc0);const _0x434b27=bufferSha256(readFileSync(_0x58ad27));if(_0x434b27!==_0x55f865)throw CliErrors['validation'](_0x42e64c(0x1f2)+_0x487d77+_0x42e64c(0x1ed)+_0x360fc0,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x360fc0);}else{const _0x4629f4=resolve(_0x487d77,SKILL_FILE);if(existsSync(_0x4629f4)&&_0x43b92e[_0x42e64c(0x1e2)]){const _0x54d6f8=contentHash(readFileSync(_0x4629f4,_0x42e64c(0x1f9)));if(_0x54d6f8!==_0x43b92e[_0x42e64c(0x1e2)])throw CliErrors[_0x42e64c(0x207)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x4629f4,_0x42e64c(0x1f6));}}for(const _0x4f8b1d of normalizeLocalFiles(_0x21e651)){if(_0x535b8f?.[_0x4f8b1d[_0x42e64c(0x209)]])continue;if(!_0x535b8f&&_0x4f8b1d[_0x42e64c(0x209)]===SKILL_FILE)continue;const _0x318198=resolveManagedFilePath(_0x487d77,_0x4f8b1d[_0x42e64c(0x209)]);if(!existsSync(_0x318198))continue;const _0x17e3f8=lstatSync(_0x318198);if(!_0x17e3f8[_0x42e64c(0x1d5)]())throw CliErrors[_0x42e64c(0x207)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x487d77,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x4f8b1d['path']);const _0xc81044=bufferSha256(readFileSync(_0x318198));if(_0xc81044!==fileHash(_0x4f8b1d))throw CliErrors[_0x42e64c(0x207)](_0x42e64c(0x1f2)+_0x487d77,_0x42e64c(0x1ff)+_0x4f8b1d[_0x42e64c(0x209)]);}}function materializeFiles(_0x4c3f7b,_0x59d95a){const _0x405972=a157_0xa0bc;for(const _0x1a4229 of normalizeLocalFiles(_0x59d95a)){const _0x34a707=resolveManagedFilePath(_0x4c3f7b,_0x1a4229[_0x405972(0x209)]);mkdirSync(dirname(_0x34a707),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x34a707,fileContent(_0x1a4229),0x180);}}function removeStaleManagedFiles(_0xb79844,_0x442ab3,_0x5020c8){const _0x352567=a157_0xa0bc;if(!_0x442ab3)return;const _0xa68cf=new Set(normalizeLocalFiles(_0x5020c8)['map'](_0x32764b=>_0x32764b[_0x352567(0x209)]));for(const _0x1c5228 of Object[_0x352567(0x1fe)](_0x442ab3)){if(_0xa68cf['has'](_0x1c5228))continue;const _0x256b9d=resolveManagedFilePath(_0xb79844,_0x1c5228);existsSync(_0x256b9d)&&lstatSync(_0x256b9d)[_0x352567(0x1d5)]()&&rmSync(_0x256b9d,{'force':!![]});}}
1
+ (function(_0x261ab9,_0x58c1d7){const _0x2ca746=a157_0x43b6,_0x2b4f0a=_0x261ab9();while(!![]){try{const _0x2488d6=parseInt(_0x2ca746(0x105))/0x1+parseInt(_0x2ca746(0xfe))/0x2*(-parseInt(_0x2ca746(0x11c))/0x3)+parseInt(_0x2ca746(0xff))/0x4*(-parseInt(_0x2ca746(0xea))/0x5)+-parseInt(_0x2ca746(0x108))/0x6*(-parseInt(_0x2ca746(0x122))/0x7)+parseInt(_0x2ca746(0x107))/0x8*(-parseInt(_0x2ca746(0xfd))/0x9)+-parseInt(_0x2ca746(0x112))/0xa*(-parseInt(_0x2ca746(0x101))/0xb)+parseInt(_0x2ca746(0x11f))/0xc*(parseInt(_0x2ca746(0x104))/0xd);if(_0x2488d6===_0x58c1d7)break;else _0x2b4f0a['push'](_0x2b4f0a['shift']());}catch(_0x300083){_0x2b4f0a['push'](_0x2b4f0a['shift']());}}}(a157_0x1922,0x5ba2d));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';function a157_0x1922(){const _0x52e4e6=['12LTLZKs','force','path','293636AmCFoM','skillName','version','set','contents','displayName:\x20','64265WmDijr','example','paths','errors','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','entries','appCode','validation','name:\x20','toString','packageBytes','description:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','delete','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','status','contentHash','trimEnd','find','18ezCsBy','26gGouCf','116KRqdGU','length','9823lhGBet','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','16024541JxBEWb','41835rHwtJV','test','2395736AMcwOy','12fTqFJb','accessKey','description','map','replace','keys','schemaVersion','env','skillCode','scope','4910qsQBuy','has','filter','isFile','fileHashes','trim','hasOwn','displayName','---','utf8','103809cTSNSR','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','flow'];a157_0x1922=function(){return _0x52e4e6;};return a157_0x1922();}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(_0x501c21,_0xec3987,_0x21a6af){const _0x399dde=a157_0x43b6,_0x3d59c3=requireSkillCode(_0x501c21),_0x5bdd94=requirePackageBytes(_0x3d59c3,_0x21a6af[_0x399dde(0xf4)]),_0x44a11b=extractDownloadedPackage(_0x5bdd94),_0x3544fd=_0x44a11b[_0x399dde(0xfc)](_0x3ece27=>_0x3ece27[_0x399dde(0x121)]===SKILL_FILE);if(!_0x3544fd)throw CliErrors[_0x399dde(0xf1)](_0x399dde(0xf6)+SKILL_FILE+':\x20'+_0x3d59c3);const _0x209e2a=withMaterializedSkillFrontmatter(_0x44a11b,_0x501c21,_0x3d59c3),_0x6f0fe4=_0x209e2a['find'](_0x229006=>_0x229006[_0x399dde(0x121)]===SKILL_FILE),_0x20cca8=fileText(_0x6f0fe4),_0x48d0bc=getRuntimeSkillDir(_0x21a6af[_0x399dde(0x10f)],_0x21a6af[_0x399dde(0x109)],_0x21a6af[_0x399dde(0xf0)],_0xec3987,_0x3d59c3,_0x21a6af[_0x399dde(0xec)]),_0x197cc7=resolve(_0x48d0bc,SKILL_FILE),_0x7c4813=resolve(_0x48d0bc,METADATA_FILE),_0x3d5c75=contentHash(_0x20cca8),_0x13f6e6=readMetadataIfPresent(_0x7c4813)?.[_0x399dde(0x116)];ensurePulledFilesCanBeOverwritten(_0x48d0bc,_0x7c4813,_0x209e2a,_0x21a6af[_0x399dde(0x120)]===!![]),mkdirSync(_0x48d0bc,{'recursive':!![],'mode':0x1c0});const _0x134b30=existsSync(_0x197cc7)?readFileSync(_0x197cc7,'utf8'):undefined;return materializeFiles(_0x48d0bc,_0x209e2a),removeStaleManagedFiles(_0x48d0bc,_0x13f6e6,_0x209e2a),writeJsonAtomic(_0x7c4813,buildMetadata(_0x501c21,_0xec3987,_0x21a6af['appCode'],_0x3d5c75,_0x21a6af['pulledAt'],_0x209e2a,_0x5bdd94)),{'skill':_0x501c21,'scope':_0xec3987,'dir':_0x48d0bc,'skillMdPath':_0x197cc7,'metadataPath':_0x7c4813,'contentHash':_0x3d5c75,'changed':_0x134b30!==_0x20cca8};}export function reuseMaterializedRuntimeSkill(_0x36a8b0,_0x694d97,_0x288333){const _0x312363=a157_0x43b6,_0x2608c4=_0x36a8b0[_0x312363(0x124)]?.[_0x312363(0x117)]();if(!_0x2608c4)return undefined;const _0x39aa7e=requireSkillCode(_0x36a8b0),_0x598b9b=getRuntimeSkillDir(_0x288333[_0x312363(0x10f)],_0x288333[_0x312363(0x109)],_0x288333[_0x312363(0xf0)],_0x694d97,_0x39aa7e,_0x288333[_0x312363(0xec)]),_0x15d1b9=resolve(_0x598b9b,SKILL_FILE),_0x2a1df8=resolve(_0x598b9b,METADATA_FILE),_0x1735b3=readMetadataIfPresent(_0x2a1df8);if(!_0x1735b3||_0x1735b3[_0x312363(0x10e)]!==0x2||_0x1735b3[_0x312363(0xf0)]!==_0x288333[_0x312363(0xf0)]||_0x1735b3[_0x312363(0x111)]!==_0x694d97||_0x1735b3[_0x312363(0x110)]!==_0x39aa7e||_0x1735b3[_0x312363(0x124)]!==_0x2608c4||_0x1735b3['id']!==_0x36a8b0['id']||_0x1735b3[_0x312363(0x123)]!==_0x36a8b0[_0x312363(0x123)]||_0x1735b3['description']!==_0x36a8b0['description']||_0x1735b3[_0x312363(0xeb)]!==_0x36a8b0[_0x312363(0xeb)]||_0x1735b3[_0x312363(0xf9)]!==_0x36a8b0['status']||!_0x1735b3[_0x312363(0xfa)]||!_0x1735b3[_0x312363(0x116)]||!Object[_0x312363(0x118)](_0x1735b3[_0x312363(0x116)],SKILL_FILE))return undefined;for(const [_0x4189d0,_0x3c45b1]of Object[_0x312363(0xef)](_0x1735b3[_0x312363(0x116)])){if(!/^[a-f0-9]{64}$/[_0x312363(0x106)](_0x3c45b1))return undefined;const _0x5236cd=resolveManagedFilePath(_0x598b9b,_0x4189d0);if(!existsSync(_0x5236cd)||!lstatSync(_0x5236cd)['isFile']())return undefined;if(bufferSha256(readFileSync(_0x5236cd))!==_0x3c45b1)return undefined;}return{'skill':_0x36a8b0,'scope':_0x694d97,'dir':_0x598b9b,'skillMdPath':_0x15d1b9,'metadataPath':_0x2a1df8,'contentHash':_0x1735b3[_0x312363(0xfa)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x16c226,_0x8a8930,_0x103efc){const _0x3e6129=a157_0x43b6,_0x206d4c=skillDisplayName(_0x8a8930,_0x103efc),_0x3413bc=_0x8a8930['description']?.[_0x3e6129(0x117)]()||_0x206d4c||_0x103efc;return normalizeLocalFiles(_0x16c226)[_0x3e6129(0x10b)](_0x23ead4=>{const _0x1da699=_0x3e6129,_0x1b85a0=fileText(_0x23ead4);if(_0x23ead4[_0x1da699(0x121)]!==SKILL_FILE)return _0x23ead4;if(hasYamlFrontmatter(_0x1b85a0))return{'path':_0x23ead4[_0x1da699(0x121)],'content':withSyncedDisplayName(_0x1b85a0,_0x206d4c)};return{'path':_0x23ead4['path'],'content':prependSkillFrontmatter(_0x1b85a0,{'name':_0x103efc,'displayName':_0x206d4c,'description':_0x3413bc})};});}function a157_0x43b6(_0x2c6dea,_0x3c396f){_0x2c6dea=_0x2c6dea-0xe8;const _0x192295=a157_0x1922();let _0x43b66f=_0x192295[_0x2c6dea];return _0x43b66f;}function hasYamlFrontmatter(_0x4c1df0){const _0x2480e3=a157_0x43b6;return/^\uFEFF?---\s*\r?\n/[_0x2480e3(0x106)](_0x4c1df0);}function prependSkillFrontmatter(_0x5bf6ce,_0x53c297){const _0x336a2f=a157_0x43b6,_0x4a57dc=_0x5bf6ce['replace'](/^\uFEFF/,'');return[_0x336a2f(0x11a),_0x336a2f(0xf2)+yamlString(_0x53c297['name']),_0x53c297['displayName']?_0x336a2f(0xe9)+yamlString(_0x53c297[_0x336a2f(0x119)]):undefined,_0x336a2f(0xf5)+yamlString(_0x53c297[_0x336a2f(0x10a)]),_0x336a2f(0x11a),'',_0x4a57dc][_0x336a2f(0x114)](_0x40d8de=>_0x40d8de!==undefined)['join']('\x0a');}function yamlString(_0x3fab05){const _0x5e9dd1=a157_0x43b6;return JSON['stringify'](_0x3fab05['replace'](/\r/g,'')[_0x5e9dd1(0x117)]());}function skillDisplayName(_0x4a6083,_0x5dfe9c){const _0x53a5d7=a157_0x43b6,_0x5986cc=_0x4a6083[_0x53a5d7(0x123)]?.['trim']();return _0x5986cc||_0x5dfe9c;}function withSyncedDisplayName(_0x51033a,_0x499a8f){const _0x10f98a=a157_0x43b6,_0x3da97f=_0x51033a['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3da97f)return _0x51033a;const _0x401aa1=_0x3da97f[0x1]??'',_0x138daa=_0x3da97f[0x2]??'',_0x10ab7e=parseDocument(_0x138daa);if(_0x10ab7e[_0x10f98a(0xed)][_0x10f98a(0x100)]>0x0||!isMap(_0x10ab7e[_0x10f98a(0xe8)]))return _0x51033a;if(_0x499a8f)_0x10ab7e[_0x10f98a(0x125)]('displayName',_0x499a8f);else{if(_0x10ab7e['has']('displayName'))_0x10ab7e[_0x10f98a(0xf7)](_0x10f98a(0x119));else return _0x51033a;}forceBlockCollections(_0x10ab7e['contents']);const _0x305a03=_0x10ab7e[_0x10f98a(0xf3)]({'lineWidth':0x0})[_0x10f98a(0xfb)](),_0x2bbf06=_0x51033a['slice'](_0x3da97f[0x0][_0x10f98a(0x100)])[_0x10f98a(0x10c)](/^\r?\n/,'');return _0x401aa1+_0x10f98a(0x103)+_0x305a03+'\x0a---\x0a\x0a'+_0x2bbf06;}function forceBlockCollections(_0x17ad5d){if(!isNode(_0x17ad5d))return;visit(_0x17ad5d,(_0x2a0702,_0x3d4edc)=>{const _0x2fd5bf=a157_0x43b6;isCollection(_0x3d4edc)&&(_0x3d4edc[_0x2fd5bf(0x11e)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x25e86d,_0x2c82a6,_0x4523b4,_0x3e8b29){const _0x30403e=a157_0x43b6;if(_0x3e8b29||!existsSync(_0x2c82a6))return;const _0x904009=readMetadataIfPresent(_0x2c82a6);if(!_0x904009)return;const _0x58b4f7=_0x904009['fileHashes']&&Object[_0x30403e(0x10d)](_0x904009[_0x30403e(0x116)])['length']>0x0?_0x904009['fileHashes']:undefined;if(_0x58b4f7)for(const [_0x944b4b,_0x499e8e]of Object['entries'](_0x58b4f7)){const _0x239b83=resolveManagedFilePath(_0x25e86d,_0x944b4b);if(!existsSync(_0x239b83))throw CliErrors[_0x30403e(0xf1)](_0x30403e(0x102)+_0x25e86d,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x944b4b);const _0x2256a5=lstatSync(_0x239b83);if(!_0x2256a5[_0x30403e(0x115)]())throw CliErrors[_0x30403e(0xf1)](_0x30403e(0x102)+_0x25e86d,_0x30403e(0x11d)+_0x944b4b);const _0x3e0ab5=bufferSha256(readFileSync(_0x239b83));if(_0x3e0ab5!==_0x499e8e)throw CliErrors[_0x30403e(0xf1)](_0x30403e(0x102)+_0x25e86d+'.\x20Changed\x20file:\x20'+_0x944b4b,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x944b4b);}else{const _0xfe3095=resolve(_0x25e86d,SKILL_FILE);if(existsSync(_0xfe3095)&&_0x904009[_0x30403e(0xfa)]){const _0x382e13=contentHash(readFileSync(_0xfe3095,_0x30403e(0x11b)));if(_0x382e13!==_0x904009[_0x30403e(0xfa)])throw CliErrors['validation'](_0x30403e(0xf8)+_0xfe3095,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x222424 of normalizeLocalFiles(_0x4523b4)){if(_0x58b4f7?.[_0x222424[_0x30403e(0x121)]])continue;if(!_0x58b4f7&&_0x222424[_0x30403e(0x121)]===SKILL_FILE)continue;const _0x1e8fa3=resolveManagedFilePath(_0x25e86d,_0x222424[_0x30403e(0x121)]);if(!existsSync(_0x1e8fa3))continue;const _0x51d9d4=lstatSync(_0x1e8fa3);if(!_0x51d9d4[_0x30403e(0x115)]())throw CliErrors['validation'](_0x30403e(0x102)+_0x25e86d,_0x30403e(0xee)+_0x222424['path']);const _0x99b7c3=bufferSha256(readFileSync(_0x1e8fa3));if(_0x99b7c3!==fileHash(_0x222424))throw CliErrors[_0x30403e(0xf1)](_0x30403e(0x102)+_0x25e86d,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x222424[_0x30403e(0x121)]);}}function materializeFiles(_0x3a843d,_0x3a0f74){const _0x22a828=a157_0x43b6;for(const _0x379a63 of normalizeLocalFiles(_0x3a0f74)){const _0x346c10=resolveManagedFilePath(_0x3a843d,_0x379a63[_0x22a828(0x121)]);mkdirSync(dirname(_0x346c10),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x346c10,fileContent(_0x379a63),0x180);}}function removeStaleManagedFiles(_0x2fcc1c,_0x4e9308,_0x524ff1){const _0x2a9a68=a157_0x43b6;if(!_0x4e9308)return;const _0x4a73f4=new Set(normalizeLocalFiles(_0x524ff1)[_0x2a9a68(0x10b)](_0x2bc74=>_0x2bc74[_0x2a9a68(0x121)]));for(const _0x4e85c5 of Object[_0x2a9a68(0x10d)](_0x4e9308)){if(_0x4a73f4[_0x2a9a68(0x113)](_0x4e85c5))continue;const _0x492633=resolveManagedFilePath(_0x2fcc1c,_0x4e85c5);existsSync(_0x492633)&&lstatSync(_0x492633)[_0x2a9a68(0x115)]()&&rmSync(_0x492633,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x252ec4,_0xedeac7){const _0x3d27c4=a158_0x27a0,_0x111ebf=_0x252ec4();while(!![]){try{const _0x329858=-parseInt(_0x3d27c4(0x13a))/0x1*(-parseInt(_0x3d27c4(0x130))/0x2)+-parseInt(_0x3d27c4(0x13f))/0x3+parseInt(_0x3d27c4(0x13d))/0x4*(-parseInt(_0x3d27c4(0x13c))/0x5)+-parseInt(_0x3d27c4(0x126))/0x6+parseInt(_0x3d27c4(0x133))/0x7+parseInt(_0x3d27c4(0x142))/0x8+-parseInt(_0x3d27c4(0x12b))/0x9;if(_0x329858===_0xedeac7)break;else _0x111ebf['push'](_0x111ebf['shift']());}catch(_0x4b80ae){_0x111ebf['push'](_0x111ebf['shift']());}}}(a158_0x5f26,0x73aaa));function a158_0x27a0(_0x1c01e1,_0x2769bb){_0x1c01e1=_0x1c01e1-0x122;const _0x5f26b8=a158_0x5f26();let _0x27a0e4=_0x5f26b8[_0x1c01e1];return _0x27a0e4;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a158_0x5f26(){const _0x5d0e05=['hasUpstreamUpdate','2697328niPpir','Invalid\x20','version','Runtime\x20Skill\x20is\x20missing\x20skillCode.','toISOString','isArray','files','fromEntries','723984yfxzcB','utf8','personal','userId','trim','1680201YTYBtI','zipSize','manifest','path','skillCode','88886CZfhze','length','description','6538644PKYiNN','object','map','skillName','string','tags','zipSha256','13yVsWmq','forkedFromVersion','70Eubrqw','101672exMrhC','validation','2136126BuCoOM','ossPath'];a158_0x5f26=function(){return _0x5d0e05;};return a158_0x5f26();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x24f3f3,_0x2ca3e7,_0x275e61,_0x3d45e5,_0x57d644,_0x395fd4,_0x2bbd7c){const _0x24d581=a158_0x27a0,_0x2ec8b7=_0x395fd4?normalizeLocalFiles(_0x395fd4):[],_0x5f55b7=!_0x2bbd7c&&_0x2ec8b7[_0x24d581(0x131)]>0x0?buildSkillPackage(_0x2ec8b7):undefined,_0x35ddd5=_0x2bbd7c?bufferSha256(_0x2bbd7c):_0x5f55b7?.[_0x24d581(0x12d)][_0x24d581(0x139)],_0x7bd8cd=_0x2bbd7c?.[_0x24d581(0x131)]??_0x5f55b7?.['manifest'][_0x24d581(0x12c)],_0x363b70=_0x2ec8b7[_0x24d581(0x131)]>0x0?Object[_0x24d581(0x125)](_0x2ec8b7[_0x24d581(0x135)](_0x428878=>[_0x428878[_0x24d581(0x12e)],fileHash(_0x428878)])):undefined;return{'schemaVersion':_0x2ec8b7['length']>0x0?0x2:0x1,'id':_0x24f3f3['id'],'appCode':_0x275e61,'skillCode':requireSkillCode(_0x24f3f3),'skillName':_0x24f3f3[_0x24d581(0x136)],'description':_0x24f3f3[_0x24d581(0x132)],'example':_0x24f3f3['example'],'scope':_0x2ca3e7,'readonly':_0x2ca3e7!==_0x24d581(0x128)||_0x24f3f3['readonly']===!![],'tenantCode':_0x24f3f3['tenantCode'],'userId':_0x24f3f3[_0x24d581(0x129)],'version':_0x24f3f3[_0x24d581(0x144)],'status':_0x24f3f3['status'],'tags':Array[_0x24d581(0x123)](_0x24f3f3[_0x24d581(0x138)])?_0x24f3f3[_0x24d581(0x138)]:[],'hasUpstreamUpdate':_0x24f3f3[_0x24d581(0x141)],'forkedFromSkillId':_0x24f3f3['forkedFromSkillId'],'forkedFromVersion':_0x24f3f3[_0x24d581(0x13b)],'sourceSessionId':_0x24f3f3['sourceSessionId'],'contentHash':_0x3d45e5,'fileHashes':_0x363b70,'treeHash':_0x2ec8b7[_0x24d581(0x131)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2ec8b7)):undefined,'ossPath':remoteManifestOssPath(_0x24f3f3[_0x24d581(0x124)]),'zipSha256':_0x35ddd5,'zipSize':_0x7bd8cd,'files':_0x2ec8b7[_0x24d581(0x131)]>0x0?_0x2ec8b7['map'](_0x3a7c69=>({'path':_0x3a7c69[_0x24d581(0x12e)],'hash':fileHash(_0x3a7c69),'size':fileContent(_0x3a7c69)[_0x24d581(0x131)]})):undefined,'pulledAt':_0x57d644??new Date()[_0x24d581(0x122)]()};}export function requireSkillCode(_0xd95950){const _0x1e2f00=a158_0x27a0,_0x341db5=_0xd95950[_0x1e2f00(0x12f)]?.[_0x1e2f00(0x12a)]();if(!_0x341db5)throw CliErrors[_0x1e2f00(0x13e)](_0x1e2f00(0x145));return _0x341db5;}export function readMetadataIfPresent(_0x3e4b1f){const _0x5ba7b2=a158_0x27a0;if(!existsSync(_0x3e4b1f))return undefined;try{const _0x93ff99=JSON['parse'](readFileSync(_0x3e4b1f,_0x5ba7b2(0x127)));return _0x93ff99;}catch{throw CliErrors[_0x5ba7b2(0x13e)](_0x5ba7b2(0x143)+METADATA_FILE+':\x20'+_0x3e4b1f);}}function remoteManifestOssPath(_0x5c9ef7){const _0x351a26=a158_0x27a0;if(!_0x5c9ef7||typeof _0x5c9ef7!==_0x351a26(0x134)||Array[_0x351a26(0x123)](_0x5c9ef7))return undefined;const _0x2b7ba1=_0x5c9ef7[_0x351a26(0x140)];return typeof _0x2b7ba1===_0x351a26(0x137)&&_0x2b7ba1['trim']()?_0x2b7ba1[_0x351a26(0x12a)]():undefined;}
1
+ (function(_0x483d4f,_0x3e92ba){const _0x5569e5=a158_0x51c5,_0x3cb548=_0x483d4f();while(!![]){try{const _0x5cd66a=-parseInt(_0x5569e5(0x1b5))/0x1+parseInt(_0x5569e5(0x1b1))/0x2*(parseInt(_0x5569e5(0x1a7))/0x3)+parseInt(_0x5569e5(0x19d))/0x4+parseInt(_0x5569e5(0x199))/0x5+-parseInt(_0x5569e5(0x196))/0x6+parseInt(_0x5569e5(0x1a5))/0x7*(parseInt(_0x5569e5(0x1b7))/0x8)+-parseInt(_0x5569e5(0x1a0))/0x9;if(_0x5cd66a===_0x3e92ba)break;else _0x3cb548['push'](_0x3cb548['shift']());}catch(_0x37a819){_0x3cb548['push'](_0x3cb548['shift']());}}}(a158_0x58ce,0x21d24));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a158_0x58ce(){const _0xad2129=['userId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','fromEntries','forkedFromVersion','description','36PvWOpf','hasUpstreamUpdate','utf8','status','164085eddOVs','trim','554056pWPXFD','zipSha256','string','personal','object','664512SiFfmr','manifest','ossPath','1260635gByaIx','length','tenantCode','validation','178572NFloNz','zipSize','readonly','1473696nxLgcj','tags','path','isArray','skillCode','7uXLSqf','skillName','35181xNvyWI','parse','toISOString','files','version'];a158_0x58ce=function(){return _0xad2129;};return a158_0x58ce();}import{fileContent,normalizeLocalFiles}from'./local-files.js';function a158_0x51c5(_0x5ea6ef,_0x34bcd2){_0x5ea6ef=_0x5ea6ef-0x194;const _0x58ce9d=a158_0x58ce();let _0x51c53e=_0x58ce9d[_0x5ea6ef];return _0x51c53e;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x241d26,_0x31ae06,_0x315b1f,_0x5d735a,_0x258174,_0x2d52a1,_0x509b35){const _0x312a31=a158_0x51c5,_0x6cd6ff=_0x2d52a1?normalizeLocalFiles(_0x2d52a1):[],_0x484a4e=!_0x509b35&&_0x6cd6ff[_0x312a31(0x19a)]>0x0?buildSkillPackage(_0x6cd6ff):undefined,_0x314a00=_0x509b35?bufferSha256(_0x509b35):_0x484a4e?.[_0x312a31(0x197)][_0x312a31(0x1b8)],_0x254d05=_0x509b35?.['length']??_0x484a4e?.[_0x312a31(0x197)][_0x312a31(0x19e)],_0xe5370c=_0x6cd6ff[_0x312a31(0x19a)]>0x0?Object[_0x312a31(0x1ae)](_0x6cd6ff['map'](_0x525422=>[_0x525422[_0x312a31(0x1a2)],fileHash(_0x525422)])):undefined;return{'schemaVersion':_0x6cd6ff[_0x312a31(0x19a)]>0x0?0x2:0x1,'id':_0x241d26['id'],'appCode':_0x315b1f,'skillCode':requireSkillCode(_0x241d26),'skillName':_0x241d26[_0x312a31(0x1a6)],'description':_0x241d26[_0x312a31(0x1b0)],'example':_0x241d26['example'],'scope':_0x31ae06,'readonly':_0x31ae06!==_0x312a31(0x194)||_0x241d26[_0x312a31(0x19f)]===!![],'tenantCode':_0x241d26[_0x312a31(0x19b)],'userId':_0x241d26[_0x312a31(0x1ac)],'version':_0x241d26[_0x312a31(0x1ab)],'status':_0x241d26[_0x312a31(0x1b4)],'tags':Array[_0x312a31(0x1a3)](_0x241d26[_0x312a31(0x1a1)])?_0x241d26['tags']:[],'hasUpstreamUpdate':_0x241d26[_0x312a31(0x1b2)],'forkedFromSkillId':_0x241d26['forkedFromSkillId'],'forkedFromVersion':_0x241d26[_0x312a31(0x1af)],'sourceSessionId':_0x241d26['sourceSessionId'],'contentHash':_0x5d735a,'fileHashes':_0xe5370c,'treeHash':_0x6cd6ff[_0x312a31(0x19a)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x6cd6ff)):undefined,'ossPath':remoteManifestOssPath(_0x241d26[_0x312a31(0x1aa)]),'zipSha256':_0x314a00,'zipSize':_0x254d05,'files':_0x6cd6ff[_0x312a31(0x19a)]>0x0?_0x6cd6ff['map'](_0x1f1263=>({'path':_0x1f1263[_0x312a31(0x1a2)],'hash':fileHash(_0x1f1263),'size':fileContent(_0x1f1263)[_0x312a31(0x19a)]})):undefined,'pulledAt':_0x258174??new Date()[_0x312a31(0x1a9)]()};}export function requireSkillCode(_0x171d03){const _0x467bf2=a158_0x51c5,_0x4cabff=_0x171d03[_0x467bf2(0x1a4)]?.[_0x467bf2(0x1b6)]();if(!_0x4cabff)throw CliErrors[_0x467bf2(0x19c)](_0x467bf2(0x1ad));return _0x4cabff;}export function readMetadataIfPresent(_0x44f4a8){const _0x18e0d9=a158_0x51c5;if(!existsSync(_0x44f4a8))return undefined;try{const _0x1d275b=JSON[_0x18e0d9(0x1a8)](readFileSync(_0x44f4a8,_0x18e0d9(0x1b3)));return _0x1d275b;}catch{throw CliErrors[_0x18e0d9(0x19c)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x44f4a8);}}function remoteManifestOssPath(_0x408eaa){const _0x86d395=a158_0x51c5;if(!_0x408eaa||typeof _0x408eaa!==_0x86d395(0x195)||Array[_0x86d395(0x1a3)](_0x408eaa))return undefined;const _0x4a0164=_0x408eaa[_0x86d395(0x198)];return typeof _0x4a0164===_0x86d395(0x1b9)&&_0x4a0164['trim']()?_0x4a0164[_0x86d395(0x1b6)]():undefined;}
@@ -1 +1 @@
1
- const a159_0x39df7f=a159_0x207c;(function(_0x1d678a,_0x2f4cf4){const _0x50d293=a159_0x207c,_0x166a77=_0x1d678a();while(!![]){try{const _0x401dd4=parseInt(_0x50d293(0xaa))/0x1+parseInt(_0x50d293(0xad))/0x2*(parseInt(_0x50d293(0xac))/0x3)+-parseInt(_0x50d293(0xaf))/0x4*(parseInt(_0x50d293(0x97))/0x5)+-parseInt(_0x50d293(0x9f))/0x6+-parseInt(_0x50d293(0xa4))/0x7+-parseInt(_0x50d293(0x9e))/0x8+-parseInt(_0x50d293(0xa9))/0x9*(-parseInt(_0x50d293(0x99))/0xa);if(_0x401dd4===_0x2f4cf4)break;else _0x166a77['push'](_0x166a77['shift']());}catch(_0x32e5a0){_0x166a77['push'](_0x166a77['shift']());}}}(a159_0x3ae8,0xa7329));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a159_0x3ae8(){const _0x4ee78b=['28KsCrtg','Unsafe\x20','116015zcVTqQ','homeDirName','90JNBgAS','\x20for\x20local\x20path:\x20','agentsSkillsDir','claudeSkillsDir','skillCode','8103856Gpsbxv','5035110rXrWHQ','path\x20segment','SKILL_ROOT','homeDir','.agents','8996526gXFIqA','includes','skills','workbuddySkillsDir','.claude','2629764IEUZjv','167078CwZGMD','trim','3563415FArguj','2zeHCZc','CLAUDE_SKILL_ROOT'];a159_0x3ae8=function(){return _0x4ee78b;};return a159_0x3ae8();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3852d5={}){const _0x2cd2aa=a159_0x207c,_0x3c1f1d=_0x3852d5[_0x2cd2aa(0xa2)]??homedir(),_0x1f691c=resolve(_0x3c1f1d,PRODUCT_CONFIG[_0x2cd2aa(0x98)],'cache'),_0x114223=trimmedEnv(_0x2cd2aa(0xa1)),_0xe54826=trimmedEnv(_0x2cd2aa(0xae)),_0x50232d=resolve(_0x3c1f1d,'.workbuddy'),_0x34d85d=_0x3852d5[_0x2cd2aa(0xa7)]??(existsSync(_0x50232d)?resolve(_0x50232d,_0x2cd2aa(0xa6)):undefined);return{'homeDir':_0x3c1f1d,'cacheRoot':_0x1f691c,'managedRoot':resolve(_0x3c1f1d,PRODUCT_CONFIG[_0x2cd2aa(0x98)]),'agentsSkillsDir':_0x3852d5['agentsSkillsDir']??_0x114223??resolve(_0x3c1f1d,_0x2cd2aa(0xa3),'skills'),'claudeSkillsDir':_0x3852d5[_0x2cd2aa(0x9c)]??_0xe54826??resolve(_0x3c1f1d,_0x2cd2aa(0xa8),_0x2cd2aa(0xa6)),'workbuddySkillsDir':_0x34d85d};}export function runtimeAgentSkillRoots(_0x21a70b){const _0x4e8a3d=a159_0x207c;return[_0x21a70b[_0x4e8a3d(0x9b)],_0x21a70b[_0x4e8a3d(0x9c)],_0x21a70b[_0x4e8a3d(0xa7)]]['filter'](_0x261e58=>Boolean(_0x261e58));}export function getRuntimeSkillCacheRoot(_0x514210,_0x5f2ce7,_0xce6fe4={}){const _0xa1495d=resolveSkillSyncPaths(_0xce6fe4);return resolve(_0xa1495d['cacheRoot'],_0x514210,fingerprintAccessKey(_0x5f2ce7),'skills');}export function getRuntimeSkillDir(_0x55b803,_0x47132c,_0x80938e,_0x5ac3cf,_0x281bc3,_0x2fbdea={}){const _0x3e15f9=a159_0x207c;return resolve(getRuntimeSkillCacheRoot(_0x55b803,_0x47132c,_0x2fbdea),safePathSegment(_0x80938e,'appCode'),_0x5ac3cf,safePathSegment(_0x281bc3,_0x3e15f9(0x9d)));}export function safePathSegment(_0x50a8a2,_0x20ac05=a159_0x39df7f(0xa0)){const _0x2b65a6=a159_0x39df7f;if(!_0x50a8a2||_0x50a8a2['includes']('/')||_0x50a8a2[_0x2b65a6(0xa5)]('\x5c')||_0x50a8a2[_0x2b65a6(0xa5)]('..'))throw CliErrors['validation'](_0x2b65a6(0x96)+_0x20ac05+_0x2b65a6(0x9a)+_0x50a8a2);return _0x50a8a2;}function a159_0x207c(_0x1bd29f,_0x100a20){_0x1bd29f=_0x1bd29f-0x96;const _0x3ae80c=a159_0x3ae8();let _0x207c71=_0x3ae80c[_0x1bd29f];return _0x207c71;}function trimmedEnv(_0x4e8485){const _0x56d2d2=a159_0x39df7f,_0x5b553d=productEnv(_0x4e8485)?.[_0x56d2d2(0xab)]();return _0x5b553d?_0x5b553d:undefined;}
1
+ (function(_0x545efb,_0x3cb482){const _0x3571f6=a159_0x359a,_0x5f0a67=_0x545efb();while(!![]){try{const _0x1a0118=parseInt(_0x3571f6(0x134))/0x1*(-parseInt(_0x3571f6(0x135))/0x2)+-parseInt(_0x3571f6(0x11d))/0x3+parseInt(_0x3571f6(0x11e))/0x4*(-parseInt(_0x3571f6(0x119))/0x5)+-parseInt(_0x3571f6(0x12d))/0x6*(-parseInt(_0x3571f6(0x122))/0x7)+-parseInt(_0x3571f6(0x124))/0x8*(parseInt(_0x3571f6(0x128))/0x9)+-parseInt(_0x3571f6(0x123))/0xa*(-parseInt(_0x3571f6(0x12c))/0xb)+-parseInt(_0x3571f6(0x125))/0xc*(-parseInt(_0x3571f6(0x130))/0xd);if(_0x1a0118===_0x3cb482)break;else _0x5f0a67['push'](_0x5f0a67['shift']());}catch(_0x5182a8){_0x5f0a67['push'](_0x5f0a67['shift']());}}}(a159_0x3b9e,0x440a3));import{existsSync}from'node:fs';function a159_0x3b9e(){const _0x465a2c=['SKILL_ROOT','filter','skills','11iastPB','201384vxZxrJ','homeDir','homeDirName','13cffAAu','validation','CLAUDE_SKILL_ROOT','claudeSkillsDir','214wfUmyp','2252GUxIkm','289415bLrxcm','trim','Unsafe\x20','includes','1459122SJPTau','8rAbkgY','skillCode','.workbuddy','agentsSkillsDir','112Umnuwz','1353960NnuxoC','22576XRUZpo','8609580YAktpq','workbuddySkillsDir','cacheRoot','855HiEDDL'];a159_0x3b9e=function(){return _0x465a2c;};return a159_0x3b9e();}import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a159_0x359a(_0x3c4728,_0x8baf0a){_0x3c4728=_0x3c4728-0x119;const _0x3b9e61=a159_0x3b9e();let _0x359ac5=_0x3b9e61[_0x3c4728];return _0x359ac5;}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x23b53b={}){const _0x402f12=a159_0x359a,_0x215b52=_0x23b53b[_0x402f12(0x12e)]??homedir(),_0x330295=resolve(_0x215b52,PRODUCT_CONFIG['homeDirName'],'cache'),_0x229218=trimmedEnv(_0x402f12(0x129)),_0xb578a5=trimmedEnv(_0x402f12(0x132)),_0x240fb2=resolve(_0x215b52,_0x402f12(0x120)),_0x4007bd=_0x23b53b[_0x402f12(0x126)]??(existsSync(_0x240fb2)?resolve(_0x240fb2,_0x402f12(0x12b)):undefined);return{'homeDir':_0x215b52,'cacheRoot':_0x330295,'managedRoot':resolve(_0x215b52,PRODUCT_CONFIG[_0x402f12(0x12f)]),'agentsSkillsDir':_0x23b53b[_0x402f12(0x121)]??_0x229218??resolve(_0x215b52,'.agents',_0x402f12(0x12b)),'claudeSkillsDir':_0x23b53b['claudeSkillsDir']??_0xb578a5??resolve(_0x215b52,'.claude',_0x402f12(0x12b)),'workbuddySkillsDir':_0x4007bd};}export function runtimeAgentSkillRoots(_0x5045a5){const _0x3b29fc=a159_0x359a;return[_0x5045a5[_0x3b29fc(0x121)],_0x5045a5[_0x3b29fc(0x133)],_0x5045a5[_0x3b29fc(0x126)]][_0x3b29fc(0x12a)](_0x150d12=>Boolean(_0x150d12));}export function getRuntimeSkillCacheRoot(_0x250457,_0x43ca67,_0x1e6a07={}){const _0x229a4a=a159_0x359a,_0x47d3c6=resolveSkillSyncPaths(_0x1e6a07);return resolve(_0x47d3c6[_0x229a4a(0x127)],_0x250457,fingerprintAccessKey(_0x43ca67),_0x229a4a(0x12b));}export function getRuntimeSkillDir(_0x98970e,_0x43ab10,_0x3961fe,_0x3230c5,_0x415f15,_0x40a261={}){const _0x38460d=a159_0x359a;return resolve(getRuntimeSkillCacheRoot(_0x98970e,_0x43ab10,_0x40a261),safePathSegment(_0x3961fe,'appCode'),_0x3230c5,safePathSegment(_0x415f15,_0x38460d(0x11f)));}export function safePathSegment(_0x58012a,_0x2ae131='path\x20segment'){const _0x29af8d=a159_0x359a;if(!_0x58012a||_0x58012a[_0x29af8d(0x11c)]('/')||_0x58012a[_0x29af8d(0x11c)]('\x5c')||_0x58012a[_0x29af8d(0x11c)]('..'))throw CliErrors[_0x29af8d(0x131)](_0x29af8d(0x11b)+_0x2ae131+'\x20for\x20local\x20path:\x20'+_0x58012a);return _0x58012a;}function trimmedEnv(_0x48bf4e){const _0x4f5401=a159_0x359a,_0x329baf=productEnv(_0x48bf4e)?.[_0x4f5401(0x11a)]();return _0x329baf?_0x329baf:undefined;}
@@ -1 +1 @@
1
- function a160_0x477f(_0x234720,_0xbb1967){_0x234720=_0x234720-0xaa;const _0x25a98e=a160_0x25a9();let _0x477f47=_0x25a98e[_0x234720];return _0x477f47;}(function(_0x16a041,_0x122a9c){const _0x265732=a160_0x477f,_0x38953f=_0x16a041();while(!![]){try{const _0x507992=parseInt(_0x265732(0xda))/0x1+parseInt(_0x265732(0xbc))/0x2*(parseInt(_0x265732(0xd0))/0x3)+-parseInt(_0x265732(0xc5))/0x4+-parseInt(_0x265732(0xd7))/0x5*(parseInt(_0x265732(0xd1))/0x6)+parseInt(_0x265732(0xce))/0x7+-parseInt(_0x265732(0xab))/0x8+-parseInt(_0x265732(0xca))/0x9*(-parseInt(_0x265732(0xcf))/0xa);if(_0x507992===_0x122a9c)break;else _0x38953f['push'](_0x38953f['shift']());}catch(_0x239724){_0x38953f['push'](_0x38953f['shift']());}}}(a160_0x25a9,0xdb02c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x1c0ec0}from'yaml';function a160_0x25a9(){const _0x325d9b=['path','3486406ROzJea','5958780KvpIJm','918726mxqyti','2884776DOjzJx','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','filter','skillName','appCode','utf8','5SYkGnd','description','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','841846uAiwXV','ignoreMetadataScope','allowAppCodeRetarget','length','isFile','content','startsWith','builtin','sourceSessionId','ignoreMetadataAppCodeMismatch','metadata','pushedAt','number','displayName','isArray','refreshedAt','dir','validation','Missing\x20','13929552cwDwPu','name','Skill\x20directory\x20not\x20found:\x20','manifest','skillCode','trim','Remote\x20Skill\x20','find','Invalid\x20','slice','some','isSymbolicLink','example','Unable\x20to\x20resolve\x20skillCode\x20from\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','scope','unknown','4tzRjXd','ignoreInvalidMetadata','match','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','packageBase64','excludedFilePaths','company','\x20has\x20scope=\x22','2483856aJyVmS','replace','personal','isDirectory','tags','27rXcSvq','\x20to\x20submit\x20company\x20Skills\x20for\x20review.',',\x20or\x20directory\x20name.'];a160_0x25a9=function(){return _0x325d9b;};return a160_0x25a9();}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(_0x4a6c0b,_0x4522fa,_0x562d04={}){const _0xb643ea=a160_0x477f,_0x463df7=resolvePushDirectoryRoot(_0x4a6c0b),_0x4ceb9a=readPushMetadataIfPresent(resolve(_0x463df7,METADATA_FILE),{'ignoreInvalidMetadata':_0x562d04[_0xb643ea(0xbd)]});if(_0x4ceb9a?.[_0xb643ea(0xd5)]&&_0x4ceb9a[_0xb643ea(0xd5)]!==_0x4522fa&&!_0x562d04[_0xb643ea(0xdc)]&&!_0x562d04[_0xb643ea(0xe3)])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x4ceb9a[_0xb643ea(0xd5)]+_0xb643ea(0xbf)+_0x4522fa+'\x22.');const _0x57c8b1=resolvePushSkillCode(_0x463df7,_0x4522fa,_0x4ceb9a,_0x562d04);if(!_0x57c8b1)throw CliErrors['validation'](_0xb643ea(0xb8)+SKILL_FILE+',\x20'+METADATA_FILE+_0xb643ea(0xcc));return{'dir':_0x463df7,'skillCode':_0x57c8b1,'metadata':_0x4ceb9a};}export function readPushDirectory(_0x383b5c,_0x4b170f,_0x4c22ce={}){const _0x112868=a160_0x477f,_0x19e752=resolvePushDirectoryIdentity(_0x383b5c,_0x4b170f,_0x4c22ce),_0x31fe8c=_0x19e752[_0x112868(0xea)],_0x426965=resolve(_0x31fe8c,SKILL_FILE);if(!existsSync(_0x426965)||!lstatSync(_0x426965)[_0x112868(0xde)]())throw CliErrors['validation'](_0x112868(0xaa)+SKILL_FILE+':\x20'+_0x426965);const _0x1158a9=_0x19e752[_0x112868(0xe4)],_0x25d74b=_0x4c22ce['targetScope']??_0x112868(0xc7);if(!_0x4c22ce[_0x112868(0xdb)]&&_0x1158a9?.[_0x112868(0xba)]===_0x112868(0xe1))throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x112868(0xc4)+_0x1158a9[_0x112868(0xba)]+'\x22.');if(!_0x4c22ce[_0x112868(0xdb)]&&_0x25d74b===_0x112868(0xc7)&&_0x1158a9?.[_0x112868(0xba)]&&_0x1158a9[_0x112868(0xba)]!=='personal')throw CliErrors['validation'](_0x112868(0xd9)+METADATA_FILE+_0x112868(0xc4)+_0x1158a9[_0x112868(0xba)]+'\x22.',_0x112868(0xd2)+_0x31fe8c+_0x112868(0xcb));const _0x43b95c=scanSkillDirectory(_0x31fe8c,{'excludedFilePaths':_0x4c22ce[_0x112868(0xc2)]}),_0x44e9a7=buildSkillPackage(_0x43b95c),_0xa0bb1c=readFileSync(_0x426965,_0x112868(0xd6)),_0x56c9b5=_0x19e752[_0x112868(0xaf)],_0x2f87e4=_0x4c22ce['ignoreMetadataForPayload']?undefined:_0x1158a9,_0x1fc202=readSkillDisplayName(_0xa0bb1c);return{'skillCode':_0x56c9b5,'metadata':_0x1158a9,'frontmatterDisplayName':_0x1fc202,'input':{'skillCode':_0x56c9b5,'skillName':_0x1fc202??_0x2f87e4?.['skillName'],'description':_0x2f87e4?.['description'],'content':_0xa0bb1c,'files':_0x44e9a7[_0x112868(0xae)],'packageBase64':_0x44e9a7[_0x112868(0xc1)],'tags':_0x2f87e4?.[_0x112868(0xc9)],'version':_0x2f87e4?.['version'],'sourceSessionId':_0x2f87e4?.[_0x112868(0xe2)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1a726f,_0xaa727a,_0x28d999,_0x369ec2={}){const _0x1c47da=a160_0x477f,_0x532b53=resolvePushDirectoryRoot(_0x1a726f),_0x4f184c=readPushMetadataIfPresent(resolve(_0x532b53,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2eba4c=requireRemoteScope(_0xaa727a),_0x4e3c85=readLocalSkillContent(_0x532b53),_0x133fb3={..._0xaa727a,'appCode':_0xaa727a[_0x1c47da(0xd5)]??_0x28d999,'skillName':_0xaa727a[_0x1c47da(0xd4)]??_0x4f184c?.['skillName'],'description':_0xaa727a[_0x1c47da(0xd8)]??_0x4f184c?.['description'],'example':_0xaa727a[_0x1c47da(0xb7)]??_0x4f184c?.[_0x1c47da(0xb7)],'tags':Array[_0x1c47da(0xe8)](_0xaa727a[_0x1c47da(0xc9)])?_0xaa727a['tags']:_0x4f184c?.[_0x1c47da(0xc9)],'sourceSessionId':_0xaa727a[_0x1c47da(0xe2)]??_0x4f184c?.[_0x1c47da(0xe2)],'content':_0xaa727a[_0x1c47da(0xdf)]??_0x4e3c85},_0xc1e0fb=buildMetadata(_0x133fb3,_0x2eba4c,_0x28d999,contentHash(_0x4e3c85),_0x369ec2[_0x1c47da(0xe9)]);writeJsonAtomic(resolve(_0x532b53,METADATA_FILE),_0xc1e0fb);}export function recordPushedRuntimeSkill(_0x211128,_0x325c39,_0x307faf,_0x311653={}){const _0x1a568b=a160_0x477f,_0x19ded9=resolvePushDirectoryRoot(_0x211128),_0x13c4a4=scanSkillDirectory(_0x19ded9),_0x56d5c7=_0x13c4a4[_0x1a568b(0xb2)](_0x2837b0=>_0x2837b0['path']===SKILL_FILE),_0x20786b=_0x56d5c7?fileText(_0x56d5c7):'',_0x59e6f3=tryNormalizePackageManifest(_0x325c39[_0x1a568b(0xc0)]),_0x1c1ce2={..._0x325c39,'content':_0x325c39[_0x1a568b(0xdf)]??_0x20786b,'files':_0x59e6f3},_0x47da1c=_0x59e6f3?normalizeLocalFiles(_0x13c4a4)[_0x1a568b(0xd3)](_0x4a0d2a=>_0x59e6f3[_0x1a568b(0xc0)][_0x1a568b(0xb5)](_0x2bcdf0=>_0x2bcdf0[_0x1a568b(0xcd)]===_0x4a0d2a[_0x1a568b(0xcd)])):undefined,_0x23b01c=buildMetadata(_0x1c1ce2,_0x311653[_0x1a568b(0xba)]??_0x1a568b(0xc7),_0x307faf,contentHash(_0x1c1ce2[_0x1a568b(0xdf)]??''),_0x311653[_0x1a568b(0xe5)],_0x47da1c);writeJsonAtomic(resolve(_0x19ded9,METADATA_FILE),_0x23b01c);}export function deriveSkillCodeFromDirectory(_0x21bb99,_0x509d11){const _0x10d0fa=a160_0x477f,_0x58d545=basename(resolve(_0x21bb99)),_0x4a68b4=_0x509d11+'--';return _0x58d545[_0x10d0fa(0xe0)](_0x4a68b4)?_0x58d545[_0x10d0fa(0xb4)](_0x4a68b4[_0x10d0fa(0xdd)]):_0x58d545;}function resolvePushSkillCode(_0x42245b,_0x327069,_0x24be39,_0x33c847){const _0x516eac=a160_0x477f,_0x4d2519=deriveSkillCodeFromSkillFile(_0x42245b)||deriveSkillCodeFromDirectory(_0x42245b,_0x327069);if(_0x33c847['ignoreMetadataSkillCode'])return _0x4d2519;return _0x24be39?.[_0x516eac(0xaf)]?.[_0x516eac(0xb0)]()||_0x4d2519;}function deriveSkillCodeFromSkillFile(_0x50fe41){const _0xdda977=a160_0x477f,_0x286be8=resolve(_0x50fe41,SKILL_FILE);if(!existsSync(_0x286be8)||!lstatSync(_0x286be8)['isFile']())return undefined;const _0xffebe8=readFileSync(_0x286be8,_0xdda977(0xd6)),_0x1a9e31=_0xffebe8[_0xdda977(0xbe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1a9e31)return undefined;const _0x2729fd=parseFrontmatterObject(_0x1a9e31[0x1]??''),_0x201e1a=scalarToString(_0x2729fd?.[_0xdda977(0xac)]);return _0x201e1a?slugifySkillName(_0x201e1a):undefined;}function readSkillDisplayName(_0x284804){const _0x2cc717=a160_0x477f,_0x4776cd=_0x284804['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4776cd)return undefined;const _0x43c000=parseFrontmatterObject(_0x4776cd[0x1]??'');return scalarToString(_0x43c000?.[_0x2cc717(0xe7)]);}function slugifySkillName(_0x5dcae9){const _0x48fc54=a160_0x477f,_0x377171=_0x5dcae9[_0x48fc54(0xb0)]()['toLowerCase']()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x48fc54(0xc6)](/^-+/,'')[_0x48fc54(0xc6)](/-+$/,'')[_0x48fc54(0xc6)](/-{2,}/g,'-');if(!_0x377171)throw CliErrors['validation'](_0x48fc54(0xb3)+SKILL_FILE+_0x48fc54(0xb9));return _0x377171;}function parseFrontmatterObject(_0x216387){const _0x2ea911=a160_0x477f;try{const _0x26c824=a160_0x1c0ec0(_0x216387);return _0x26c824&&typeof _0x26c824==='object'&&!Array[_0x2ea911(0xe8)](_0x26c824)?_0x26c824:undefined;}catch{return undefined;}}function scalarToString(_0x5a39b2){const _0x3bdaf4=a160_0x477f;if(typeof _0x5a39b2==='string')return _0x5a39b2[_0x3bdaf4(0xb0)]();if(typeof _0x5a39b2===_0x3bdaf4(0xe6)||typeof _0x5a39b2==='boolean')return String(_0x5a39b2);return undefined;}function resolvePushDirectoryRoot(_0x581074){const _0x9868e4=a160_0x477f,_0x12e72=resolve(_0x581074);if(!existsSync(_0x12e72))throw CliErrors[_0x9868e4(0xeb)](_0x9868e4(0xad)+_0x581074);const _0x50393f=lstatSync(_0x12e72);if(_0x50393f['isDirectory']())return _0x12e72;if(_0x50393f[_0x9868e4(0xb6)]()){const _0x39e8a0=realpathSync(_0x12e72);if(lstatSync(_0x39e8a0)[_0x9868e4(0xc8)]())return _0x39e8a0;}throw CliErrors['validation'](_0x9868e4(0xad)+_0x581074);}function requireRemoteScope(_0x137eda){const _0x5ae9f3=a160_0x477f;if(_0x137eda['scope']==='personal'||_0x137eda['scope']===_0x5ae9f3(0xc3)||_0x137eda[_0x5ae9f3(0xba)]===_0x5ae9f3(0xe1))return _0x137eda[_0x5ae9f3(0xba)];throw CliErrors['validation'](_0x5ae9f3(0xb1)+(_0x137eda[_0x5ae9f3(0xaf)]||'(unknown)')+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x137eda[_0x5ae9f3(0xba)]??_0x5ae9f3(0xbb))+'\x22.');}function readLocalSkillContent(_0x190d8c){const _0xcba404=a160_0x477f,_0x59a817=resolve(_0x190d8c,SKILL_FILE);return existsSync(_0x59a817)&&lstatSync(_0x59a817)['isFile']()?readFileSync(_0x59a817,_0xcba404(0xd6)):'';}function readPushMetadataIfPresent(_0x4ad920,_0x115035={}){const _0xa2ee09=a160_0x477f;try{return readMetadataIfPresent(_0x4ad920);}catch(_0x59e97f){if(_0x115035[_0xa2ee09(0xbd)])return undefined;throw _0x59e97f;}}
1
+ (function(_0x1b8dca,_0x357736){const _0x4ddaff=a160_0x2c98,_0x103e21=_0x1b8dca();while(!![]){try{const _0x4d624d=-parseInt(_0x4ddaff(0x1d1))/0x1*(-parseInt(_0x4ddaff(0x1b1))/0x2)+parseInt(_0x4ddaff(0x1c0))/0x3*(parseInt(_0x4ddaff(0x1a4))/0x4)+parseInt(_0x4ddaff(0x1af))/0x5*(parseInt(_0x4ddaff(0x1d4))/0x6)+-parseInt(_0x4ddaff(0x1c7))/0x7+parseInt(_0x4ddaff(0x1a5))/0x8+parseInt(_0x4ddaff(0x1d6))/0x9+parseInt(_0x4ddaff(0x1b2))/0xa*(-parseInt(_0x4ddaff(0x1ba))/0xb);if(_0x4d624d===_0x357736)break;else _0x103e21['push'](_0x103e21['shift']());}catch(_0x1866dd){_0x103e21['push'](_0x103e21['shift']());}}}(a160_0x2449,0x9979c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x97acaf}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 a160_0x2c98(_0x237e21,_0x550e69){_0x237e21=_0x237e21-0x196;const _0x244926=a160_0x2449();let _0x2c98d8=_0x244926[_0x237e21];return _0x2c98d8;}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x11a4d8,_0x14475e,_0x279a71={}){const _0x5a8a95=a160_0x2c98,_0x4320ec=resolvePushDirectoryRoot(_0x11a4d8),_0x240213=readPushMetadataIfPresent(resolve(_0x4320ec,METADATA_FILE),{'ignoreInvalidMetadata':_0x279a71['ignoreInvalidMetadata']});if(_0x240213?.[_0x5a8a95(0x1ac)]&&_0x240213[_0x5a8a95(0x1ac)]!==_0x14475e&&!_0x279a71['allowAppCodeRetarget']&&!_0x279a71['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x5a8a95(0x1a6)](_0x5a8a95(0x1ce)+_0x240213['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x14475e+'\x22.');const _0x11be59=resolvePushSkillCode(_0x4320ec,_0x14475e,_0x240213,_0x279a71);if(!_0x11be59)throw CliErrors[_0x5a8a95(0x1a6)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x5a8a95(0x1b0));return{'dir':_0x4320ec,'skillCode':_0x11be59,'metadata':_0x240213};}function a160_0x2449(){const _0x2770bd=['refreshedAt','Skill\x20directory\x20not\x20found:\x20','dir','(unknown)','files','Skill\x20metadata\x20appCode\x20\x22','toLowerCase','isFile','248377GwlFVE','ignoreInvalidMetadata','string','6rCCXUC','company','1566261JGqCFL','name','object','\x20has\x20scope=\x22','isArray','trim','tags','scope','description','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','number','\x20name\x20for\x20SkillHub\x20slug\x20generation.','slice','version','skillName','example','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','isSymbolicLink','displayName','61844OReggC','4436424plZXWl','validation','skillCode','isDirectory','match','replace','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','appCode','length','excludedFilePaths','3535355yaAaUG',',\x20or\x20directory\x20name.','4uuxEaU','1120SPGAxc','Remote\x20Skill\x20','manifest','utf8','Invalid\x20','metadata','unknown','content','62106UasNai','find','some','personal','path','boolean','57CPhKQP','ignoreMetadataForPayload','ignoreMetadataScope','startsWith','targetScope','ignoreMetadataSkillCode','builtin','6756246ZCzQTP','sourceSessionId'];a160_0x2449=function(){return _0x2770bd;};return a160_0x2449();}export function readPushDirectory(_0x187e92,_0x362f31,_0x17dde3={}){const _0x22fa78=a160_0x2c98,_0x2c2a51=resolvePushDirectoryIdentity(_0x187e92,_0x362f31,_0x17dde3),_0x180963=_0x2c2a51[_0x22fa78(0x1cb)],_0x3bf74f=resolve(_0x180963,SKILL_FILE);if(!existsSync(_0x3bf74f)||!lstatSync(_0x3bf74f)[_0x22fa78(0x1d0)]())throw CliErrors[_0x22fa78(0x1a6)]('Missing\x20'+SKILL_FILE+':\x20'+_0x3bf74f);const _0x5bc166=_0x2c2a51[_0x22fa78(0x1b7)],_0x5b2bb1=_0x17dde3[_0x22fa78(0x1c4)]??_0x22fa78(0x1bd);if(!_0x17dde3['ignoreMetadataScope']&&_0x5bc166?.[_0x22fa78(0x198)]==='builtin')throw CliErrors[_0x22fa78(0x1a6)](_0x22fa78(0x19a)+METADATA_FILE+_0x22fa78(0x1d9)+_0x5bc166['scope']+'\x22.');if(!_0x17dde3[_0x22fa78(0x1c2)]&&_0x5b2bb1==='personal'&&_0x5bc166?.['scope']&&_0x5bc166['scope']!==_0x22fa78(0x1bd))throw CliErrors[_0x22fa78(0x1a6)](_0x22fa78(0x1a1)+METADATA_FILE+_0x22fa78(0x1d9)+_0x5bc166[_0x22fa78(0x198)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x180963+_0x22fa78(0x1ab));const _0xef562b=scanSkillDirectory(_0x180963,{'excludedFilePaths':_0x17dde3[_0x22fa78(0x1ae)]}),_0x2a6fea=buildSkillPackage(_0xef562b),_0x211cec=readFileSync(_0x3bf74f,_0x22fa78(0x1b5)),_0x1d93fd=_0x2c2a51[_0x22fa78(0x1a7)],_0x30f4cb=_0x17dde3[_0x22fa78(0x1c1)]?undefined:_0x5bc166,_0x2a570f=readSkillDisplayName(_0x211cec);return{'skillCode':_0x1d93fd,'metadata':_0x5bc166,'frontmatterDisplayName':_0x2a570f,'input':{'skillCode':_0x1d93fd,'skillName':_0x2a570f??_0x30f4cb?.[_0x22fa78(0x19f)],'description':_0x30f4cb?.['description'],'content':_0x211cec,'files':_0x2a6fea[_0x22fa78(0x1b4)],'packageBase64':_0x2a6fea['packageBase64'],'tags':_0x30f4cb?.[_0x22fa78(0x197)],'version':_0x30f4cb?.[_0x22fa78(0x19e)],'sourceSessionId':_0x30f4cb?.[_0x22fa78(0x1c8)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x571f32,_0x24e4b3,_0x5fe483,_0x207e49={}){const _0x476744=a160_0x2c98,_0x1a62ec=resolvePushDirectoryRoot(_0x571f32),_0x1002c4=readPushMetadataIfPresent(resolve(_0x1a62ec,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x3a42c0=requireRemoteScope(_0x24e4b3),_0xbb02c6=readLocalSkillContent(_0x1a62ec),_0xd3cddf={..._0x24e4b3,'appCode':_0x24e4b3[_0x476744(0x1ac)]??_0x5fe483,'skillName':_0x24e4b3['skillName']??_0x1002c4?.['skillName'],'description':_0x24e4b3['description']??_0x1002c4?.[_0x476744(0x199)],'example':_0x24e4b3['example']??_0x1002c4?.[_0x476744(0x1a0)],'tags':Array[_0x476744(0x1da)](_0x24e4b3[_0x476744(0x197)])?_0x24e4b3[_0x476744(0x197)]:_0x1002c4?.[_0x476744(0x197)],'sourceSessionId':_0x24e4b3[_0x476744(0x1c8)]??_0x1002c4?.[_0x476744(0x1c8)],'content':_0x24e4b3[_0x476744(0x1b9)]??_0xbb02c6},_0x1df278=buildMetadata(_0xd3cddf,_0x3a42c0,_0x5fe483,contentHash(_0xbb02c6),_0x207e49[_0x476744(0x1c9)]);writeJsonAtomic(resolve(_0x1a62ec,METADATA_FILE),_0x1df278);}export function recordPushedRuntimeSkill(_0x2e6395,_0x3d65ed,_0x425047,_0x4e20e4={}){const _0xffbf60=a160_0x2c98,_0x5b164b=resolvePushDirectoryRoot(_0x2e6395),_0x5dc820=scanSkillDirectory(_0x5b164b),_0x2a3ab9=_0x5dc820[_0xffbf60(0x1bb)](_0x20f70f=>_0x20f70f['path']===SKILL_FILE),_0x7b9662=_0x2a3ab9?fileText(_0x2a3ab9):'',_0x3e71df=tryNormalizePackageManifest(_0x3d65ed['files']),_0x503ccb={..._0x3d65ed,'content':_0x3d65ed[_0xffbf60(0x1b9)]??_0x7b9662,'files':_0x3e71df},_0xedb044=_0x3e71df?normalizeLocalFiles(_0x5dc820)['filter'](_0xfcb2e6=>_0x3e71df[_0xffbf60(0x1cd)][_0xffbf60(0x1bc)](_0x457168=>_0x457168['path']===_0xfcb2e6[_0xffbf60(0x1be)])):undefined,_0x5f0129=buildMetadata(_0x503ccb,_0x4e20e4[_0xffbf60(0x198)]??_0xffbf60(0x1bd),_0x425047,contentHash(_0x503ccb['content']??''),_0x4e20e4['pushedAt'],_0xedb044);writeJsonAtomic(resolve(_0x5b164b,METADATA_FILE),_0x5f0129);}export function deriveSkillCodeFromDirectory(_0x491500,_0x2e7062){const _0x3cc67f=a160_0x2c98,_0x2f0f86=basename(resolve(_0x491500)),_0x1ac9f8=_0x2e7062+'--';return _0x2f0f86[_0x3cc67f(0x1c3)](_0x1ac9f8)?_0x2f0f86[_0x3cc67f(0x19d)](_0x1ac9f8[_0x3cc67f(0x1ad)]):_0x2f0f86;}function resolvePushSkillCode(_0x3a3de3,_0x5b5465,_0x49edac,_0x47c099){const _0x11fec5=a160_0x2c98,_0x55338c=deriveSkillCodeFromSkillFile(_0x3a3de3)||deriveSkillCodeFromDirectory(_0x3a3de3,_0x5b5465);if(_0x47c099[_0x11fec5(0x1c5)])return _0x55338c;return _0x49edac?.[_0x11fec5(0x1a7)]?.['trim']()||_0x55338c;}function deriveSkillCodeFromSkillFile(_0xde76a6){const _0x504294=a160_0x2c98,_0x4ecfde=resolve(_0xde76a6,SKILL_FILE);if(!existsSync(_0x4ecfde)||!lstatSync(_0x4ecfde)[_0x504294(0x1d0)]())return undefined;const _0x43443d=readFileSync(_0x4ecfde,_0x504294(0x1b5)),_0x5a171b=_0x43443d[_0x504294(0x1a9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5a171b)return undefined;const _0x133c3d=parseFrontmatterObject(_0x5a171b[0x1]??''),_0xe36a2f=scalarToString(_0x133c3d?.[_0x504294(0x1d7)]);return _0xe36a2f?slugifySkillName(_0xe36a2f):undefined;}function readSkillDisplayName(_0x16c3c5){const _0x2aa6f6=a160_0x2c98,_0x2e0218=_0x16c3c5['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2e0218)return undefined;const _0x99c0d8=parseFrontmatterObject(_0x2e0218[0x1]??'');return scalarToString(_0x99c0d8?.[_0x2aa6f6(0x1a3)]);}function slugifySkillName(_0x3dfef5){const _0x17953b=a160_0x2c98,_0x48b025=_0x3dfef5[_0x17953b(0x196)]()[_0x17953b(0x1cf)]()[_0x17953b(0x1aa)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')['replace'](/-+$/,'')[_0x17953b(0x1aa)](/-{2,}/g,'-');if(!_0x48b025)throw CliErrors[_0x17953b(0x1a6)](_0x17953b(0x1b6)+SKILL_FILE+_0x17953b(0x19c));return _0x48b025;}function parseFrontmatterObject(_0x2938c6){const _0x12c65c=a160_0x2c98;try{const _0x2739da=a160_0x97acaf(_0x2938c6);return _0x2739da&&typeof _0x2739da===_0x12c65c(0x1d8)&&!Array[_0x12c65c(0x1da)](_0x2739da)?_0x2739da:undefined;}catch{return undefined;}}function scalarToString(_0x57152b){const _0x184ddf=a160_0x2c98;if(typeof _0x57152b===_0x184ddf(0x1d3))return _0x57152b[_0x184ddf(0x196)]();if(typeof _0x57152b===_0x184ddf(0x19b)||typeof _0x57152b===_0x184ddf(0x1bf))return String(_0x57152b);return undefined;}function resolvePushDirectoryRoot(_0x10fb19){const _0x17e99a=a160_0x2c98,_0x169b55=resolve(_0x10fb19);if(!existsSync(_0x169b55))throw CliErrors[_0x17e99a(0x1a6)](_0x17e99a(0x1ca)+_0x10fb19);const _0x472fdd=lstatSync(_0x169b55);if(_0x472fdd['isDirectory']())return _0x169b55;if(_0x472fdd[_0x17e99a(0x1a2)]()){const _0x12c928=realpathSync(_0x169b55);if(lstatSync(_0x12c928)[_0x17e99a(0x1a8)]())return _0x12c928;}throw CliErrors['validation'](_0x17e99a(0x1ca)+_0x10fb19);}function requireRemoteScope(_0x10bce6){const _0x5c0deb=a160_0x2c98;if(_0x10bce6['scope']===_0x5c0deb(0x1bd)||_0x10bce6[_0x5c0deb(0x198)]===_0x5c0deb(0x1d5)||_0x10bce6[_0x5c0deb(0x198)]===_0x5c0deb(0x1c6))return _0x10bce6[_0x5c0deb(0x198)];throw CliErrors[_0x5c0deb(0x1a6)](_0x5c0deb(0x1b3)+(_0x10bce6[_0x5c0deb(0x1a7)]||_0x5c0deb(0x1cc))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x10bce6['scope']??_0x5c0deb(0x1b8))+'\x22.');}function readLocalSkillContent(_0x1cbe07){const _0xb9a23a=a160_0x2c98,_0x1065e4=resolve(_0x1cbe07,SKILL_FILE);return existsSync(_0x1065e4)&&lstatSync(_0x1065e4)[_0xb9a23a(0x1d0)]()?readFileSync(_0x1065e4,'utf8'):'';}function readPushMetadataIfPresent(_0x13db10,_0x5421f8={}){const _0x61a28b=a160_0x2c98;try{return readMetadataIfPresent(_0x13db10);}catch(_0x128564){if(_0x5421f8[_0x61a28b(0x1d2)])return undefined;throw _0x128564;}}
@@ -1 +1 @@
1
- (function(_0x19597f,_0x9c6d43){const _0x5a6820=a161_0x5a13,_0xeee222=_0x19597f();while(!![]){try{const _0x392f39=-parseInt(_0x5a6820(0x109))/0x1*(-parseInt(_0x5a6820(0x10d))/0x2)+-parseInt(_0x5a6820(0x10b))/0x3*(-parseInt(_0x5a6820(0x108))/0x4)+-parseInt(_0x5a6820(0x106))/0x5+-parseInt(_0x5a6820(0x10a))/0x6+parseInt(_0x5a6820(0x10c))/0x7+-parseInt(_0x5a6820(0x101))/0x8*(-parseInt(_0x5a6820(0x105))/0x9)+-parseInt(_0x5a6820(0x100))/0xa;if(_0x392f39===_0x9c6d43)break;else _0xeee222['push'](_0xeee222['shift']());}catch(_0x9e3a72){_0xeee222['push'](_0xeee222['shift']());}}}(a161_0x2d81,0x52414));import{CliErrors}from'../../errors.js';function a161_0x5a13(_0x422221,_0x5cb00c){_0x422221=_0x422221-0x100;const _0x2d8154=a161_0x2d81();let _0x5a1384=_0x2d8154[_0x422221];return _0x5a1384;}function a161_0x2d81(){const _0x502e82=['validation','includes','10109440yPETlX','80XCgFfA','length','personal','company','520110iWUhKE','347045kjwiPV','builtin','12MbIUvs','227BNlssA','2246166lKVaNV','534708CdNhaq','4332069YbvGPL','530dLqDvU'];a161_0x2d81=function(){return _0x502e82;};return a161_0x2d81();}export function normalizeRuntimeSkillScopes(_0x48e2bd){const _0x195b80=a161_0x5a13,_0x1f4174=_0x48e2bd&&_0x48e2bd[_0x195b80(0x102)]>0x0?_0x48e2bd:[_0x195b80(0x103),_0x195b80(0x104),_0x195b80(0x107)],_0x31aab5=[];for(const _0x15860d of _0x1f4174){if(!isRuntimeSkillScope(_0x15860d))throw CliErrors[_0x195b80(0x10e)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x15860d);!_0x31aab5[_0x195b80(0x10f)](_0x15860d)&&_0x31aab5['push'](_0x15860d);}return _0x31aab5;}export function isRuntimeSkillScope(_0x202d07){const _0x128110=a161_0x5a13;return _0x202d07===_0x128110(0x103)||_0x202d07==='company'||_0x202d07===_0x128110(0x107);}
1
+ function a161_0x2f8d(_0x540e73,_0x4c6107){_0x540e73=_0x540e73-0x1d8;const _0x18b5de=a161_0x18b5();let _0x2f8d73=_0x18b5de[_0x540e73];return _0x2f8d73;}function a161_0x18b5(){const _0x53e84d=['171877dKEufr','4531736Rpvurg','validation','1093890mahoOQ','company','6esThmR','length','135246VscWAN','55WFavlp','33039vRsISP','builtin','2410490DSZucC','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','2528NgZBmi','6112827REBfXz','personal'];a161_0x18b5=function(){return _0x53e84d;};return a161_0x18b5();}(function(_0x12cd1c,_0x29abb2){const _0xf28b4c=a161_0x2f8d,_0x540156=_0x12cd1c();while(!![]){try{const _0x436d51=-parseInt(_0xf28b4c(0x1d8))/0x1*(parseInt(_0xf28b4c(0x1dd))/0x2)+parseInt(_0xf28b4c(0x1db))/0x3+parseInt(_0xf28b4c(0x1d9))/0x4+-parseInt(_0xf28b4c(0x1e0))/0x5*(parseInt(_0xf28b4c(0x1df))/0x6)+-parseInt(_0xf28b4c(0x1e7))/0x7+parseInt(_0xf28b4c(0x1e6))/0x8*(parseInt(_0xf28b4c(0x1e1))/0x9)+-parseInt(_0xf28b4c(0x1e3))/0xa;if(_0x436d51===_0x29abb2)break;else _0x540156['push'](_0x540156['shift']());}catch(_0x5ee69e){_0x540156['push'](_0x540156['shift']());}}}(a161_0x18b5,0xbe5bc));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0xc8056f){const _0x65b008=a161_0x2f8d,_0xf2467c=_0xc8056f&&_0xc8056f[_0x65b008(0x1de)]>0x0?_0xc8056f:[_0x65b008(0x1e8),'company',_0x65b008(0x1e2)],_0x1ea740=[];for(const _0x379164 of _0xf2467c){if(!isRuntimeSkillScope(_0x379164))throw CliErrors[_0x65b008(0x1da)](_0x65b008(0x1e4)+_0x379164);!_0x1ea740['includes'](_0x379164)&&_0x1ea740[_0x65b008(0x1e5)](_0x379164);}return _0x1ea740;}export function isRuntimeSkillScope(_0x6ccbcd){const _0xdecbc0=a161_0x2f8d;return _0x6ccbcd===_0xdecbc0(0x1e8)||_0x6ccbcd===_0xdecbc0(0x1dc)||_0x6ccbcd===_0xdecbc0(0x1e2);}
@@ -1 +1 @@
1
- function a163_0x1980(_0xf6f81b,_0x52e16f){_0xf6f81b=_0xf6f81b-0x15c;const _0xd8ca0e=a163_0xd8ca();let _0x1980cd=_0xd8ca0e[_0xf6f81b];return _0x1980cd;}const a163_0x103653=a163_0x1980;(function(_0x3a6000,_0x305fe5){const _0x2ee665=a163_0x1980,_0x53af65=_0x3a6000();while(!![]){try{const _0xd365c2=parseInt(_0x2ee665(0x15d))/0x1*(-parseInt(_0x2ee665(0x169))/0x2)+parseInt(_0x2ee665(0x16f))/0x3+parseInt(_0x2ee665(0x172))/0x4*(-parseInt(_0x2ee665(0x165))/0x5)+parseInt(_0x2ee665(0x16c))/0x6*(-parseInt(_0x2ee665(0x168))/0x7)+-parseInt(_0x2ee665(0x166))/0x8*(-parseInt(_0x2ee665(0x161))/0x9)+-parseInt(_0x2ee665(0x160))/0xa+parseInt(_0x2ee665(0x167))/0xb;if(_0xd365c2===_0x305fe5)break;else _0x53af65['push'](_0x53af65['shift']());}catch(_0x464d88){_0x53af65['push'](_0x53af65['shift']());}}}(a163_0xd8ca,0x5a5c5));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a163_0x103653(0x170));function a163_0xd8ca(){const _0x4cc825=['43085tMsXwI','8KSwPcq','12895498irLYJX','30499GdeHVL','33452aRlKKE','endsWith','code','588WkPaLw','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','from','384747kpggnv','1980-01-01T00:00:00.000Z','validation_error','308FtAGmD','name','entries','map','1dBdHkN','object','validation','3878380CTsUxi','5081481aloeZg','length','sort','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a163_0xd8ca=function(){return _0x4cc825;};return a163_0xd8ca();}export function createDeterministicZipPackage(_0x315ac9){const _0x36867e=a163_0x103653,_0x278535={};for(const _0x387342 of normalizeLocalFiles(_0x315ac9)){_0x278535[_0x387342['path']]=fileContent(_0x387342);}return Buffer[_0x36867e(0x16e)](zipSync(_0x278535,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x214e77){const _0x56d21f=a163_0x103653;if(_0x214e77[_0x56d21f(0x162)]<0x16)throw CliErrors['validation'](_0x56d21f(0x16d));let _0x559efc;try{_0x559efc=unzipSync(_0x214e77,{'filter'(_0x4e29e0){const _0x19ca23=_0x56d21f,_0x3f7e59=normalizeSkillRelativePath(_0x4e29e0[_0x19ca23(0x173)]);if(_0x3f7e59[_0x19ca23(0x16a)]('/'))throw CliErrors['validation'](_0x19ca23(0x164)+_0x3f7e59);return!![];}});}catch(_0x3940cf){if(isRuntimeSkillValidationError(_0x3940cf))throw _0x3940cf;throw CliErrors[_0x56d21f(0x15f)](_0x56d21f(0x16d));}return Object[_0x56d21f(0x174)](_0x559efc)[_0x56d21f(0x15c)](([_0x5ba932,_0x25460e])=>({'path':normalizeSkillRelativePath(_0x5ba932),'bytes':Buffer[_0x56d21f(0x16e)](_0x25460e)}))[_0x56d21f(0x163)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x188ef0){const _0x3e8bcc=a163_0x103653;return typeof _0x188ef0===_0x3e8bcc(0x15e)&&_0x188ef0!==null&&_0x3e8bcc(0x16b)in _0x188ef0&&_0x188ef0['code']===_0x3e8bcc(0x171);}
1
+ function a163_0x1701(){const _0x3e9480=['name','92oIwjGD','124faoZrx','63426IrSASS','188919wzeNoW','map','1333354kCtPfG','2107856szSeoZ','125UPdBkw','validation_error','sort','code','24933zsyfyZ','entries','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1980-01-01T00:00:00.000Z','12uIMqen','object','from','3986OKdrVL','770805mXEDEa','endsWith','validation','130sPltGQ','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a163_0x1701=function(){return _0x3e9480;};return a163_0x1701();}function a163_0x4f2c(_0x137373,_0x3d76a5){_0x137373=_0x137373-0xd2;const _0x170104=a163_0x1701();let _0x4f2ce2=_0x170104[_0x137373];return _0x4f2ce2;}const a163_0x2943d7=a163_0x4f2c;(function(_0x4710d7,_0x415298){const _0x33f058=a163_0x4f2c,_0x199bae=_0x4710d7();while(!![]){try{const _0x5d109e=parseInt(_0x33f058(0xe3))/0x1*(parseInt(_0x33f058(0xdb))/0x2)+parseInt(_0x33f058(0xd4))/0x3*(parseInt(_0x33f058(0xe2))/0x4)+parseInt(_0x33f058(0xe9))/0x5*(parseInt(_0x33f058(0xe4))/0x6)+parseInt(_0x33f058(0xdc))/0x7+-parseInt(_0x33f058(0xe8))/0x8+parseInt(_0x33f058(0xe5))/0x9*(-parseInt(_0x33f058(0xdf))/0xa)+-parseInt(_0x33f058(0xe7))/0xb*(parseInt(_0x33f058(0xd8))/0xc);if(_0x5d109e===_0x415298)break;else _0x199bae['push'](_0x199bae['shift']());}catch(_0x5c15ea){_0x199bae['push'](_0x199bae['shift']());}}}(a163_0x1701,0x25dd8));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a163_0x2943d7(0xd7));export function createDeterministicZipPackage(_0x259118){const _0x175f06={};for(const _0x5b1339 of normalizeLocalFiles(_0x259118)){_0x175f06[_0x5b1339['path']]=fileContent(_0x5b1339);}return Buffer['from'](zipSync(_0x175f06,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x5d21fd){const _0x99492=a163_0x2943d7;if(_0x5d21fd['length']<0x16)throw CliErrors[_0x99492(0xde)](_0x99492(0xd6));let _0x4a71be;try{_0x4a71be=unzipSync(_0x5d21fd,{'filter'(_0xd5defc){const _0x7812a8=_0x99492,_0x405c99=normalizeSkillRelativePath(_0xd5defc[_0x7812a8(0xe1)]);if(_0x405c99[_0x7812a8(0xdd)]('/'))throw CliErrors[_0x7812a8(0xde)](_0x7812a8(0xe0)+_0x405c99);return!![];}});}catch(_0x38372c){if(isRuntimeSkillValidationError(_0x38372c))throw _0x38372c;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x99492(0xd5)](_0x4a71be)[_0x99492(0xe6)](([_0x443112,_0x221b53])=>({'path':normalizeSkillRelativePath(_0x443112),'bytes':Buffer[_0x99492(0xda)](_0x221b53)}))[_0x99492(0xd2)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x597eb3){const _0x390bc6=a163_0x2943d7;return typeof _0x597eb3===_0x390bc6(0xd9)&&_0x597eb3!==null&&_0x390bc6(0xd3)in _0x597eb3&&_0x597eb3[_0x390bc6(0xd3)]===_0x390bc6(0xea);}
@@ -1 +1 @@
1
- (function(_0x5ab386,_0x98646e){const _0x290c3b=a164_0x4564,_0x2a0f55=_0x5ab386();while(!![]){try{const _0x34568c=parseInt(_0x290c3b(0xa6))/0x1*(-parseInt(_0x290c3b(0xb5))/0x2)+parseInt(_0x290c3b(0xac))/0x3+-parseInt(_0x290c3b(0xa1))/0x4+-parseInt(_0x290c3b(0xc9))/0x5+-parseInt(_0x290c3b(0x9f))/0x6+parseInt(_0x290c3b(0xb9))/0x7+parseInt(_0x290c3b(0xc2))/0x8;if(_0x34568c===_0x98646e)break;else _0x2a0f55['push'](_0x2a0f55['shift']());}catch(_0x2cd60f){_0x2a0f55['push'](_0x2a0f55['shift']());}}}(a164_0x581d,0xd8907));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';function a164_0x4564(_0x47007e,_0x3c177d){_0x47007e=_0x47007e-0x9c;const _0x581d1a=a164_0x581d();let _0x456487=_0x581d1a[_0x47007e];return _0x456487;}export function buildSkillPackage(_0xe86694){const _0x243223=a164_0x4564,_0x3bc5ef=normalizeLocalFiles(_0xe86694);if(!_0x3bc5ef[_0x243223(0xb6)](_0x58c8a4=>_0x58c8a4[_0x243223(0xbb)]===SKILL_FILE))throw CliErrors['validation'](_0x243223(0xa5)+SKILL_FILE+_0x243223(0xb1));const _0x2b2e4e=localFilesToManifestFiles(_0x3bc5ef),_0x141282=createDeterministicZipPackage(_0x3bc5ef);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x2b2e4e),'zipSha256':bufferSha256(_0x141282),'zipSize':_0x141282[_0x243223(0xc4)],'files':_0x2b2e4e},'packageBytes':_0x141282,'packageBase64':_0x141282['toString'](_0x243223(0xaa))};}export function verifyRuntimeSkillPackage(_0x317cbf,_0xaf8e88){const _0x5d14fb=a164_0x4564,_0x44884d=normalizePackageManifest(_0x317cbf,{'requireOssPath':![]});if(!_0x44884d)throw CliErrors[_0x5d14fb(0xa4)](_0x5d14fb(0xc7));return extractAndVerifyPackage(_0x44884d,_0xaf8e88);}export function verifyRuntimeSkillBundle(_0x1e28ee,_0x4257c1){const _0x5bffb9=a164_0x4564,_0x1ce639=normalizePackageManifest(_0x1e28ee,{'requireOssPath':![]});if(!_0x1ce639)throw CliErrors['validation'](_0x5bffb9(0xc7));return extractAndVerifyPackageFiles(_0x1ce639,_0x4257c1);}export function tryNormalizePackageManifest(_0x2d75d2){return normalizePackageManifest(_0x2d75d2,{'requireOssPath':![]});}export function requirePackageBytes(_0x4a6169,_0x47b12b){const _0x33588=a164_0x4564;if(!_0x47b12b||_0x47b12b[_0x33588(0xc4)]===0x0)throw CliErrors[_0x33588(0xa4)](_0x33588(0x9c)+_0x4a6169);return _0x47b12b;}export function extractDownloadedPackage(_0x5f4386){const _0xd202fc=a164_0x4564,_0x1af52e=parseZipPackage(_0x5f4386)[_0xd202fc(0xa3)](_0x60f491=>({'path':_0x60f491[_0xd202fc(0xbb)],'bytes':_0x60f491[_0xd202fc(0xca)]}));if(!_0x1af52e[_0xd202fc(0xb6)](_0x479e84=>_0x479e84[_0xd202fc(0xbb)]===SKILL_FILE))throw CliErrors[_0xd202fc(0xa4)](_0xd202fc(0xbc)+SKILL_FILE+'.');return normalizeLocalFiles(_0x1af52e);}export function localFilesToManifestFiles(_0x254ee7){const _0x38f3c8=a164_0x4564;return normalizeLocalFiles(_0x254ee7)['map'](_0x2d4927=>({'path':_0x2d4927['path'],'sha256':fileHash(_0x2d4927),'size':fileContent(_0x2d4927)[_0x38f3c8(0xc4)]}));}function normalizePackageManifest(_0x3c632b,_0x431096){const _0x3fcae2=a164_0x4564;if(!_0x3c632b||typeof _0x3c632b!==_0x3fcae2(0xae)||Array[_0x3fcae2(0xad)](_0x3c632b))return undefined;const _0x345904=_0x3c632b,_0x525f81=typeof _0x345904[_0x3fcae2(0xa9)]===_0x3fcae2(0xa8)?_0x345904[_0x3fcae2(0xa9)][_0x3fcae2(0xb3)]():undefined;if(_0x431096[_0x3fcae2(0xaf)]&&!_0x525f81)return undefined;if(!Array['isArray'](_0x345904[_0x3fcae2(0xc6)])||_0x345904['files'][_0x3fcae2(0xc4)]===0x0)return undefined;if(!isSha256Hex(_0x345904[_0x3fcae2(0xab)]))throw CliErrors['validation'](_0x3fcae2(0xb2));if(!isSha256Hex(_0x345904['zipSha256']))throw CliErrors['validation'](_0x3fcae2(0xc5));if(!Number['isSafeInteger'](_0x345904[_0x3fcae2(0xa2)])||_0x345904[_0x3fcae2(0xa2)]<0x0)throw CliErrors[_0x3fcae2(0xa4)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x11796e=normalizeManifestFiles(_0x345904[_0x3fcae2(0xc6)]);if(!_0x11796e[_0x3fcae2(0xb6)](_0x2f0878=>_0x2f0878[_0x3fcae2(0xbb)]===SKILL_FILE))throw CliErrors[_0x3fcae2(0xa4)](_0x3fcae2(0xb7)+SKILL_FILE+'.');const _0xdca4ed=fileTreeHash(_0x11796e);if(_0xdca4ed!==_0x345904[_0x3fcae2(0xab)][_0x3fcae2(0x9e)]())throw CliErrors['validation'](_0x3fcae2(0xcc));return{'schemaVersion':Number[_0x3fcae2(0xa7)](_0x345904[_0x3fcae2(0xba)])?_0x345904['schemaVersion']:0x2,'ossPath':_0x525f81,'treeSha256':_0xdca4ed,'zipSha256':_0x345904['zipSha256'][_0x3fcae2(0x9e)](),'zipSize':_0x345904[_0x3fcae2(0xa2)],'files':_0x11796e};}function extractAndVerifyPackage(_0xf48973,_0x205a98){const _0x469450=a164_0x4564,_0x4b98af=normalizePackageManifest(_0xf48973,{'requireOssPath':![]});if(!_0x4b98af)throw CliErrors[_0x469450(0xa4)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x205a98[_0x469450(0xc4)]!==_0x4b98af[_0x469450(0xa2)])throw CliErrors[_0x469450(0xa4)](_0x469450(0x9d));const _0x2ba538=bufferSha256(_0x205a98);if(_0x2ba538!==_0x4b98af[_0x469450(0xbf)])throw CliErrors[_0x469450(0xa4)](_0x469450(0xc1));return extractAndVerifyPackageFiles(_0x4b98af,_0x205a98);}function extractAndVerifyPackageFiles(_0x56157c,_0x1cad49){const _0x3f15ce=a164_0x4564,_0x1414ef=parseZipPackage(_0x1cad49);if(_0x1414ef[_0x3f15ce(0xc4)]!==_0x56157c['files']['length'])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x2c764c=new Map();for(const _0x1237d5 of _0x1414ef){if(_0x2c764c[_0x3f15ce(0xc3)](_0x1237d5['path']))throw CliErrors[_0x3f15ce(0xa4)](_0x3f15ce(0xc0)+_0x1237d5[_0x3f15ce(0xbb)]);_0x2c764c[_0x3f15ce(0xb8)](_0x1237d5[_0x3f15ce(0xbb)],_0x1237d5);}const _0x4ee50c=[];for(const _0x47fb12 of _0x56157c['files']){const _0x16e026=_0x2c764c[_0x3f15ce(0xa0)](_0x47fb12['path']);if(!_0x16e026)throw CliErrors[_0x3f15ce(0xa4)](_0x3f15ce(0xbd)+_0x47fb12[_0x3f15ce(0xbb)]);if(_0x16e026[_0x3f15ce(0xca)][_0x3f15ce(0xc4)]!==_0x47fb12[_0x3f15ce(0xb4)])throw CliErrors['validation'](_0x3f15ce(0xb0)+_0x47fb12['path']);const _0x4e8192=bufferSha256(_0x16e026[_0x3f15ce(0xca)]);if(_0x4e8192!==_0x47fb12[_0x3f15ce(0xcb)])throw CliErrors['validation'](_0x3f15ce(0xc8)+_0x47fb12['path']);_0x4ee50c[_0x3f15ce(0xbe)]({'path':_0x47fb12[_0x3f15ce(0xbb)],'bytes':_0x16e026['bytes']});}return normalizeLocalFiles(_0x4ee50c);}function a164_0x581d(){const _0x5d7e49=['map','validation','Missing\x20','2WhkzwA','isSafeInteger','string','ossPath','base64','treeSha256','392892AgFcsP','isArray','object','requireOssPath','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','trim','size','1334966UegGfE','some','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','set','6066417omNXpE','schemaVersion','path','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','push','zipSha256','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','20804008RAEvsk','has','length','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','files','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','1926850yDlQvv','bytes','sha256','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','toLowerCase','2069508Lxkaqf','get','2583180AoWwNw','zipSize'];a164_0x581d=function(){return _0x5d7e49;};return a164_0x581d();}
1
+ (function(_0x5078a4,_0x14a7a2){const _0x167d09=a164_0x3848,_0x250283=_0x5078a4();while(!![]){try{const _0x266f3b=parseInt(_0x167d09(0xa1))/0x1+parseInt(_0x167d09(0xae))/0x2+-parseInt(_0x167d09(0xbb))/0x3*(parseInt(_0x167d09(0xbf))/0x4)+parseInt(_0x167d09(0xa9))/0x5+parseInt(_0x167d09(0xb9))/0x6*(-parseInt(_0x167d09(0xb8))/0x7)+-parseInt(_0x167d09(0xa0))/0x8+-parseInt(_0x167d09(0xbe))/0x9*(-parseInt(_0x167d09(0x94))/0xa);if(_0x266f3b===_0x14a7a2)break;else _0x250283['push'](_0x250283['shift']());}catch(_0x104551){_0x250283['push'](_0x250283['shift']());}}}(a164_0x5b89,0x45df0));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(_0x464c98){const _0x207975=a164_0x3848,_0x409855=normalizeLocalFiles(_0x464c98);if(!_0x409855[_0x207975(0xb5)](_0x1d037b=>_0x1d037b[_0x207975(0x91)]===SKILL_FILE))throw CliErrors[_0x207975(0xa5)]('Missing\x20'+SKILL_FILE+_0x207975(0xaf));const _0x1558d1=localFilesToManifestFiles(_0x409855),_0x47a9af=createDeterministicZipPackage(_0x409855);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x1558d1),'zipSha256':bufferSha256(_0x47a9af),'zipSize':_0x47a9af[_0x207975(0xa6)],'files':_0x1558d1},'packageBytes':_0x47a9af,'packageBase64':_0x47a9af['toString'](_0x207975(0x99))};}export function verifyRuntimeSkillPackage(_0x543bb0,_0x4a02a7){const _0xdd87d2=a164_0x3848,_0x1e5a69=normalizePackageManifest(_0x543bb0,{'requireOssPath':![]});if(!_0x1e5a69)throw CliErrors[_0xdd87d2(0xa5)](_0xdd87d2(0xb2));return extractAndVerifyPackage(_0x1e5a69,_0x4a02a7);}export function verifyRuntimeSkillBundle(_0x30f058,_0x3f9f67){const _0x5ecd20=a164_0x3848,_0x5ee8a8=normalizePackageManifest(_0x30f058,{'requireOssPath':![]});if(!_0x5ee8a8)throw CliErrors[_0x5ecd20(0xa5)](_0x5ecd20(0xb2));return extractAndVerifyPackageFiles(_0x5ee8a8,_0x3f9f67);}export function tryNormalizePackageManifest(_0xa415b9){return normalizePackageManifest(_0xa415b9,{'requireOssPath':![]});}function a164_0x5b89(){const _0x982f89=['Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','751910HMYFUj','zipSha256','schemaVersion','trim','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','53400SZnPVI','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','files','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','some','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','3017xEcnrA','6078yUzcxG','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','14142NSDeYh','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','has','10715076RbBBAL','444GgPEQr','isSafeInteger','push','path','get','map','10TjpykZ','object','set','isArray','zipSize','base64','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','requireOssPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','size','string','bytes','1036528CYDPIq','7969eOzTMr','treeSha256','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','toLowerCase','validation','length','ossPath'];a164_0x5b89=function(){return _0x982f89;};return a164_0x5b89();}export function requirePackageBytes(_0x3bc928,_0x511eac){const _0x4b15b4=a164_0x3848;if(!_0x511eac||_0x511eac[_0x4b15b4(0xa6)]===0x0)throw CliErrors[_0x4b15b4(0xa5)](_0x4b15b4(0xb0)+_0x3bc928);return _0x511eac;}export function extractDownloadedPackage(_0x47dcf7){const _0x3ff346=a164_0x3848,_0x2acbbe=parseZipPackage(_0x47dcf7)[_0x3ff346(0x93)](_0x56c72c=>({'path':_0x56c72c[_0x3ff346(0x91)],'bytes':_0x56c72c['bytes']}));if(!_0x2acbbe[_0x3ff346(0xb5)](_0x1abee8=>_0x1abee8[_0x3ff346(0x91)]===SKILL_FILE))throw CliErrors[_0x3ff346(0xa5)](_0x3ff346(0xb3)+SKILL_FILE+'.');return normalizeLocalFiles(_0x2acbbe);}export function localFilesToManifestFiles(_0x44b853){const _0xc50f52=a164_0x3848;return normalizeLocalFiles(_0x44b853)[_0xc50f52(0x93)](_0x1f705a=>({'path':_0x1f705a[_0xc50f52(0x91)],'sha256':fileHash(_0x1f705a),'size':fileContent(_0x1f705a)['length']}));}function a164_0x3848(_0x8d6957,_0x12c90a){_0x8d6957=_0x8d6957-0x90;const _0x5b897a=a164_0x5b89();let _0x38487e=_0x5b897a[_0x8d6957];return _0x38487e;}function normalizePackageManifest(_0x26e53d,_0x1d49cc){const _0x337a39=a164_0x3848;if(!_0x26e53d||typeof _0x26e53d!==_0x337a39(0x95)||Array[_0x337a39(0x97)](_0x26e53d))return undefined;const _0x2b77b6=_0x26e53d,_0x49c858=typeof _0x2b77b6['ossPath']===_0x337a39(0x9e)?_0x2b77b6[_0x337a39(0xa7)][_0x337a39(0xac)]():undefined;if(_0x1d49cc[_0x337a39(0x9b)]&&!_0x49c858)return undefined;if(!Array[_0x337a39(0x97)](_0x2b77b6[_0x337a39(0xb1)])||_0x2b77b6['files'][_0x337a39(0xa6)]===0x0)return undefined;if(!isSha256Hex(_0x2b77b6[_0x337a39(0xa2)]))throw CliErrors[_0x337a39(0xa5)](_0x337a39(0x9c));if(!isSha256Hex(_0x2b77b6[_0x337a39(0xaa)]))throw CliErrors[_0x337a39(0xa5)](_0x337a39(0xa3));if(!Number[_0x337a39(0xc0)](_0x2b77b6[_0x337a39(0x98)])||_0x2b77b6[_0x337a39(0x98)]<0x0)throw CliErrors[_0x337a39(0xa5)](_0x337a39(0xb6));const _0x2704ec=normalizeManifestFiles(_0x2b77b6[_0x337a39(0xb1)]);if(!_0x2704ec[_0x337a39(0xb5)](_0x32f58f=>_0x32f58f[_0x337a39(0x91)]===SKILL_FILE))throw CliErrors['validation'](_0x337a39(0xb4)+SKILL_FILE+'.');const _0x488739=fileTreeHash(_0x2704ec);if(_0x488739!==_0x2b77b6[_0x337a39(0xa2)][_0x337a39(0xa4)]())throw CliErrors[_0x337a39(0xa5)](_0x337a39(0xa8));return{'schemaVersion':Number[_0x337a39(0xc0)](_0x2b77b6[_0x337a39(0xab)])?_0x2b77b6[_0x337a39(0xab)]:0x2,'ossPath':_0x49c858,'treeSha256':_0x488739,'zipSha256':_0x2b77b6[_0x337a39(0xaa)]['toLowerCase'](),'zipSize':_0x2b77b6[_0x337a39(0x98)],'files':_0x2704ec};}function extractAndVerifyPackage(_0x333f43,_0x10c74d){const _0x263046=a164_0x3848,_0x9aba2c=normalizePackageManifest(_0x333f43,{'requireOssPath':![]});if(!_0x9aba2c)throw CliErrors[_0x263046(0xa5)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x10c74d[_0x263046(0xa6)]!==_0x9aba2c['zipSize'])throw CliErrors[_0x263046(0xa5)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x409749=bufferSha256(_0x10c74d);if(_0x409749!==_0x9aba2c[_0x263046(0xaa)])throw CliErrors[_0x263046(0xa5)](_0x263046(0xba));return extractAndVerifyPackageFiles(_0x9aba2c,_0x10c74d);}function extractAndVerifyPackageFiles(_0x573e00,_0x490306){const _0x4902df=a164_0x3848,_0x4f0feb=parseZipPackage(_0x490306);if(_0x4f0feb['length']!==_0x573e00[_0x4902df(0xb1)][_0x4902df(0xa6)])throw CliErrors[_0x4902df(0xa5)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x4d72e4=new Map();for(const _0x2200c0 of _0x4f0feb){if(_0x4d72e4[_0x4902df(0xbd)](_0x2200c0[_0x4902df(0x91)]))throw CliErrors[_0x4902df(0xa5)](_0x4902df(0xb7)+_0x2200c0[_0x4902df(0x91)]);_0x4d72e4[_0x4902df(0x96)](_0x2200c0[_0x4902df(0x91)],_0x2200c0);}const _0x47b084=[];for(const _0x3d562e of _0x573e00[_0x4902df(0xb1)]){const _0x2a7f0d=_0x4d72e4[_0x4902df(0x92)](_0x3d562e[_0x4902df(0x91)]);if(!_0x2a7f0d)throw CliErrors[_0x4902df(0xa5)](_0x4902df(0x9a)+_0x3d562e[_0x4902df(0x91)]);if(_0x2a7f0d[_0x4902df(0x9f)]['length']!==_0x3d562e[_0x4902df(0x9d)])throw CliErrors[_0x4902df(0xa5)](_0x4902df(0xad)+_0x3d562e[_0x4902df(0x91)]);const _0x4a43d3=bufferSha256(_0x2a7f0d[_0x4902df(0x9f)]);if(_0x4a43d3!==_0x3d562e['sha256'])throw CliErrors['validation'](_0x4902df(0xbc)+_0x3d562e[_0x4902df(0x91)]);_0x47b084[_0x4902df(0x90)]({'path':_0x3d562e[_0x4902df(0x91)],'bytes':_0x2a7f0d[_0x4902df(0x9f)]});}return normalizeLocalFiles(_0x47b084);}
@@ -1 +1 @@
1
- function a165_0x1560(_0x3a1092,_0x337c6b){_0x3a1092=_0x3a1092-0xb4;var _0x50f946=a165_0x50f9();var _0x156058=_0x50f946[_0x3a1092];return _0x156058;}(function(_0x3ac275,_0x2b9312){var _0x5e1eba=a165_0x1560,_0x44b81f=_0x3ac275();while(!![]){try{var _0x3ba1e4=parseInt(_0x5e1eba(0xb9))/0x1+parseInt(_0x5e1eba(0xbb))/0x2+-parseInt(_0x5e1eba(0xb6))/0x3+parseInt(_0x5e1eba(0xb4))/0x4*(parseInt(_0x5e1eba(0xbd))/0x5)+parseInt(_0x5e1eba(0xb5))/0x6*(-parseInt(_0x5e1eba(0xbe))/0x7)+parseInt(_0x5e1eba(0xb7))/0x8*(parseInt(_0x5e1eba(0xba))/0x9)+-parseInt(_0x5e1eba(0xbc))/0xa*(-parseInt(_0x5e1eba(0xb8))/0xb);if(_0x3ba1e4===_0x2b9312)break;else _0x44b81f['push'](_0x44b81f['shift']());}catch(_0x1fe9a8){_0x44b81f['push'](_0x44b81f['shift']());}}}(a165_0x50f9,0x77e57));function a165_0x50f9(){var _0x24c94f=['8536790Kpzdmz','3630GRagbU','42441vtqkwL','1348kemwXA','942UeLmNG','2397249GCXsps','8tJfKmG','11CzfyGO','698255OcIryz','3930165KZxHfw','17576sFTLPj'];a165_0x50f9=function(){return _0x24c94f;};return a165_0x50f9();}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';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
1
+ function a165_0x17fb(){var _0x51c697=['9368dVnlSr','115997YNNYmF','2HHoKKS','253956iPJaUB','588556NrQAnZ','170928xhZRMF','5mtEzCG','662249yWHPEC','423FjBRYX','623310HoqyQx'];a165_0x17fb=function(){return _0x51c697;};return a165_0x17fb();}(function(_0x3c0786,_0x589814){var _0x340612=a165_0x4513,_0x4249ac=_0x3c0786();while(!![]){try{var _0x4fbe86=-parseInt(_0x340612(0x1bd))/0x1+parseInt(_0x340612(0x1be))/0x2*(parseInt(_0x340612(0x1b5))/0x3)+-parseInt(_0x340612(0x1b6))/0x4*(-parseInt(_0x340612(0x1b8))/0x5)+parseInt(_0x340612(0x1b7))/0x6+parseInt(_0x340612(0x1b9))/0x7+-parseInt(_0x340612(0x1bc))/0x8*(parseInt(_0x340612(0x1ba))/0x9)+-parseInt(_0x340612(0x1bb))/0xa;if(_0x4fbe86===_0x589814)break;else _0x4249ac['push'](_0x4249ac['shift']());}catch(_0x2bcc12){_0x4249ac['push'](_0x4249ac['shift']());}}}(a165_0x17fb,0x1dab1));function a165_0x4513(_0x57a2e8,_0x14404e){_0x57a2e8=_0x57a2e8-0x1b5;var _0x17fbb6=a165_0x17fb();var _0x4513c1=_0x17fbb6[_0x57a2e8];return _0x4513c1;}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';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- const a166_0x3e5a1f=a166_0x54f4;(function(_0xd4a47c,_0x4f9e2e){const _0x167db1=a166_0x54f4,_0x2b88ed=_0xd4a47c();while(!![]){try{const _0x40e42b=-parseInt(_0x167db1(0x7c))/0x1+-parseInt(_0x167db1(0x89))/0x2+parseInt(_0x167db1(0x7a))/0x3*(-parseInt(_0x167db1(0x86))/0x4)+-parseInt(_0x167db1(0x80))/0x5*(-parseInt(_0x167db1(0x8c))/0x6)+-parseInt(_0x167db1(0x8d))/0x7*(-parseInt(_0x167db1(0x8e))/0x8)+-parseInt(_0x167db1(0x8f))/0x9*(-parseInt(_0x167db1(0x7d))/0xa)+parseInt(_0x167db1(0x85))/0xb;if(_0x40e42b===_0x4f9e2e)break;else _0x2b88ed['push'](_0x2b88ed['shift']());}catch(_0x3efeb9){_0x2b88ed['push'](_0x2b88ed['shift']());}}}(a166_0xaad7,0x57d45));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a166_0xaad7(){const _0x47275f=['.claude','.agents','\x20has\x20no\x20skills\x20map','11877CookqS','skills','611465QaCoWM','2690kthaxz','\x20is\x20unreadable:\x20','utf8','427115eVGOLg','find','object','includes','kind','5336870YFbILd','524VeuztM','\x20records\x20\x22','not-recorded','1189424cUszYy','\x20uses\x20unsupported\x20version\x20','reason','42ceYceC','11879ymcHUO','2120bVClIU','18459YBEVwJ','home','globalSkillsDirs','unusable','SKILL.md','version','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','recorded','map','lockFile','unverifiable'];a166_0xaad7=function(){return _0x47275f;};return a166_0xaad7();}export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');function a166_0x54f4(_0x43014c,_0x56ddd3){_0x43014c=_0x43014c-0x6f;const _0xaad7bc=a166_0xaad7();let _0x54f45=_0xaad7bc[_0x43014c];return _0x54f45;}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a166_0x3e5a1f(0x78),'skills'),join(a166_0x3e5a1f(0x77),a166_0x3e5a1f(0x7b))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x4c0fae,_0x14732e){const _0x5a6727=a166_0x3e5a1f;if(!existsSync(_0x4c0fae))return{'kind':_0x5a6727(0x88)};let _0x58c552;try{_0x58c552=JSON['parse'](readFileSync(_0x4c0fae,_0x5a6727(0x7f)));}catch(_0x286d3d){return{'kind':_0x5a6727(0x6f),'reason':_0x4c0fae+_0x5a6727(0x7e)+_0x286d3d['message']};}const _0x524bdd=_0x58c552;if(typeof _0x524bdd?.[_0x5a6727(0x71)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x5a6727(0x83)](_0x524bdd['version']))return{'kind':_0x5a6727(0x6f),'reason':_0x4c0fae+_0x5a6727(0x8a)+String(_0x524bdd?.[_0x5a6727(0x71)])};if(!_0x524bdd[_0x5a6727(0x7b)]||typeof _0x524bdd[_0x5a6727(0x7b)]!==_0x5a6727(0x82))return{'kind':_0x5a6727(0x6f),'reason':_0x4c0fae+_0x5a6727(0x79)};return _0x524bdd[_0x5a6727(0x7b)][_0x14732e]?{'kind':_0x5a6727(0x73)}:{'kind':_0x5a6727(0x88)};}export function resolveInstalledSkill(_0x311679,_0x1ddb10){const _0x395ec7=a166_0x3e5a1f,_0x1f1fa7=_0x1ddb10?.[_0x395ec7(0x90)]??homedir(),_0x4fd4dc=_0x1ddb10?.[_0x395ec7(0x91)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x395ec7(0x74)](_0x1dbae7=>join(_0x1f1fa7,_0x1dbae7)),_0x1bf4b0=_0x1ddb10?.[_0x395ec7(0x75)]??join(_0x1f1fa7,SKILL_LOCK_RELATIVE_PATH),_0x1beff4=_0x4fd4dc[_0x395ec7(0x74)](_0x4bc12e=>join(_0x4bc12e,_0x311679,_0x395ec7(0x70))),_0x27bbff=_0x1beff4[_0x395ec7(0x81)](_0x74a133=>existsSync(_0x74a133));if(_0x27bbff)return{'state':'present','path':_0x27bbff};const _0x458a2b=readLockLookup(_0x1bf4b0,_0x311679);if(_0x458a2b[_0x395ec7(0x84)]===_0x395ec7(0x6f))return{'state':_0x395ec7(0x76),'reason':_0x458a2b[_0x395ec7(0x8b)]};if(_0x458a2b[_0x395ec7(0x84)]==='recorded')return{'state':_0x395ec7(0x76),'reason':_0x1bf4b0+_0x395ec7(0x87)+_0x311679+_0x395ec7(0x72)+('('+_0x1beff4['join'](',\x20')+')')};return{'state':'absent','checked':_0x1beff4};}
1
+ const a166_0x281028=a166_0x42e6;(function(_0x124dd4,_0xdb8cdf){const _0x114007=a166_0x42e6,_0x2f6551=_0x124dd4();while(!![]){try{const _0x37cc59=-parseInt(_0x114007(0x10e))/0x1*(-parseInt(_0x114007(0x12b))/0x2)+-parseInt(_0x114007(0x124))/0x3+-parseInt(_0x114007(0x11b))/0x4+parseInt(_0x114007(0x116))/0x5+-parseInt(_0x114007(0x10f))/0x6+parseInt(_0x114007(0x118))/0x7*(parseInt(_0x114007(0x10c))/0x8)+-parseInt(_0x114007(0x120))/0x9;if(_0x37cc59===_0xdb8cdf)break;else _0x2f6551['push'](_0x2f6551['shift']());}catch(_0x3a3567){_0x2f6551['push'](_0x2f6551['shift']());}}}(a166_0x565f,0xd8446));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a166_0x281028(0x125),a166_0x281028(0x11c));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a166_0x281028(0x125),a166_0x281028(0x112)),join(a166_0x281028(0x113),a166_0x281028(0x112))];function a166_0x565f(){const _0x2bdbaf=['reason','220704qsoZAI','.agents','parse','includes','utf8','unusable','map','2044946LanEkC','SKILL.md','unverifiable','lockFile','\x20uses\x20unsupported\x20version\x20','3967496DMXleZ','\x20has\x20no\x20skills\x20map','1LXINCs','8478426boFfqv','number','present','skills','.claude','globalSkillsDirs','not-recorded','5315415VVghTH','kind','21aUzZwV','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','version','1698400TmESzV','.skill-lock.json','recorded','\x20records\x20\x22','find','6986682fKraPU','\x20is\x20unreadable:\x20','join'];a166_0x565f=function(){return _0x2bdbaf;};return a166_0x565f();}const SUPPORTED_LOCK_VERSIONS=[0x3];function a166_0x42e6(_0x122f96,_0x3b51e8){_0x122f96=_0x122f96-0x10a;const _0x565fae=a166_0x565f();let _0x42e621=_0x565fae[_0x122f96];return _0x42e621;}function readLockLookup(_0xc4c1b4,_0x2671ab){const _0x1cce7b=a166_0x281028;if(!existsSync(_0xc4c1b4))return{'kind':_0x1cce7b(0x115)};let _0x1a730d;try{_0x1a730d=JSON[_0x1cce7b(0x126)](readFileSync(_0xc4c1b4,_0x1cce7b(0x128)));}catch(_0x2ac594){return{'kind':_0x1cce7b(0x129),'reason':_0xc4c1b4+_0x1cce7b(0x121)+_0x2ac594['message']};}const _0x1cc7e1=_0x1a730d;if(typeof _0x1cc7e1?.[_0x1cce7b(0x11a)]!==_0x1cce7b(0x110)||!SUPPORTED_LOCK_VERSIONS[_0x1cce7b(0x127)](_0x1cc7e1[_0x1cce7b(0x11a)]))return{'kind':_0x1cce7b(0x129),'reason':_0xc4c1b4+_0x1cce7b(0x10b)+String(_0x1cc7e1?.[_0x1cce7b(0x11a)])};if(!_0x1cc7e1['skills']||typeof _0x1cc7e1[_0x1cce7b(0x112)]!=='object')return{'kind':_0x1cce7b(0x129),'reason':_0xc4c1b4+_0x1cce7b(0x10d)};return _0x1cc7e1[_0x1cce7b(0x112)][_0x2671ab]?{'kind':_0x1cce7b(0x11d)}:{'kind':_0x1cce7b(0x115)};}export function resolveInstalledSkill(_0x574115,_0x5e9bf4){const _0x3e7f14=a166_0x281028,_0x483f8e=_0x5e9bf4?.['home']??homedir(),_0x5ae654=_0x5e9bf4?.[_0x3e7f14(0x114)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x3e7f14(0x12a)](_0x201903=>join(_0x483f8e,_0x201903)),_0x3b629e=_0x5e9bf4?.[_0x3e7f14(0x10a)]??join(_0x483f8e,SKILL_LOCK_RELATIVE_PATH),_0x1d0773=_0x5ae654[_0x3e7f14(0x12a)](_0x157ae5=>join(_0x157ae5,_0x574115,_0x3e7f14(0x12c))),_0x10cd90=_0x1d0773[_0x3e7f14(0x11f)](_0x461a47=>existsSync(_0x461a47));if(_0x10cd90)return{'state':_0x3e7f14(0x111),'path':_0x10cd90};const _0x466336=readLockLookup(_0x3b629e,_0x574115);if(_0x466336[_0x3e7f14(0x117)]===_0x3e7f14(0x129))return{'state':_0x3e7f14(0x12d),'reason':_0x466336[_0x3e7f14(0x123)]};if(_0x466336[_0x3e7f14(0x117)]===_0x3e7f14(0x11d))return{'state':'unverifiable','reason':_0x3b629e+_0x3e7f14(0x11e)+_0x574115+_0x3e7f14(0x119)+('('+_0x1d0773[_0x3e7f14(0x122)](',\x20')+')')};return{'state':'absent','checked':_0x1d0773};}
@@ -1 +1 @@
1
- const a167_0x3caa63=a167_0x3351;(function(_0x362a12,_0x341805){const _0x4bfd18=a167_0x3351,_0x32c88b=_0x362a12();while(!![]){try{const _0x2fb26e=parseInt(_0x4bfd18(0x1db))/0x1+-parseInt(_0x4bfd18(0x1e9))/0x2+parseInt(_0x4bfd18(0x1de))/0x3*(-parseInt(_0x4bfd18(0x1dd))/0x4)+parseInt(_0x4bfd18(0x1e6))/0x5*(-parseInt(_0x4bfd18(0x1e7))/0x6)+-parseInt(_0x4bfd18(0x1df))/0x7+-parseInt(_0x4bfd18(0x1d7))/0x8*(parseInt(_0x4bfd18(0x1ec))/0x9)+parseInt(_0x4bfd18(0x1d6))/0xa;if(_0x2fb26e===_0x341805)break;else _0x32c88b['push'](_0x32c88b['shift']());}catch(_0x2abd33){_0x32c88b['push'](_0x32c88b['shift']());}}}(a167_0x189b,0x89a2e));const REDACTED_ACCESS_KEY=a167_0x3caa63(0x1ea);function a167_0x189b(){const _0x4a2147=['isArray','repeat','451865axZtRs','42fGtrTf','prototype','122452oXTTZj','<redacted>','accessKey','450ssNElR','test','string','29944850MGuBQU','10720YPUJAw','length','entries','call','200717gwShuJ','slice','64pguGGv','139647rvSVSs','7880761nUVOor','apps','fromEntries','hasOwnProperty','object'];a167_0x189b=function(){return _0x4a2147;};return a167_0x189b();}export function maskCliAccessKey(_0x15cbda){const _0x17069c=a167_0x3caa63;if(typeof _0x15cbda!==_0x17069c(0x1d5)||_0x15cbda[_0x17069c(0x1d8)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x15cbda[_0x17069c(0x1dc)](0x0,0x8)+'*'[_0x17069c(0x1e5)](_0x15cbda[_0x17069c(0x1d8)]-0x8);}export function redactCliConfigCredentials(_0x447501){const _0x53cfae=a167_0x3caa63,_0xb46612={..._0x447501};return Object['prototype'][_0x53cfae(0x1e2)][_0x53cfae(0x1da)](_0xb46612,_0x53cfae(0x1eb))&&(_0xb46612['accessKey']=maskCliAccessKey(_0xb46612['accessKey'])),_0xb46612[_0x53cfae(0x1e0)]&&typeof _0xb46612['apps']===_0x53cfae(0x1e3)&&!Array['isArray'](_0xb46612[_0x53cfae(0x1e0)])&&(_0xb46612[_0x53cfae(0x1e0)]=redactLegacyAppCredentials(_0xb46612['apps'])),_0xb46612;}function a167_0x3351(_0x3fbca6,_0x622828){_0x3fbca6=_0x3fbca6-0x1d5;const _0x189b8a=a167_0x189b();let _0x335139=_0x189b8a[_0x3fbca6];return _0x335139;}export function redactCliConfigValue(_0x58f0c6,_0x201929){const _0x4bcf0f=a167_0x3caa63;if(_0x58f0c6===_0x4bcf0f(0x1eb)||/^apps\.[^.]+\.accessKey$/[_0x4bcf0f(0x1ed)](_0x58f0c6))return maskCliAccessKey(_0x201929);if(_0x58f0c6===_0x4bcf0f(0x1e0)&&_0x201929&&typeof _0x201929===_0x4bcf0f(0x1e3)&&!Array['isArray'](_0x201929))return redactLegacyAppCredentials(_0x201929);if(/^apps\.[^.]+$/[_0x4bcf0f(0x1ed)](_0x58f0c6)&&_0x201929&&typeof _0x201929==='object'&&!Array[_0x4bcf0f(0x1e4)](_0x201929)){const _0x4d485b=_0x201929;return Object['prototype']['hasOwnProperty']['call'](_0x4d485b,_0x4bcf0f(0x1eb))?{..._0x4d485b,'accessKey':maskCliAccessKey(_0x4d485b[_0x4bcf0f(0x1eb)])}:_0x201929;}return _0x201929;}function redactLegacyAppCredentials(_0x2a6953){const _0xc66ef=a167_0x3caa63;return Object[_0xc66ef(0x1e1)](Object[_0xc66ef(0x1d9)](_0x2a6953)['map'](([_0x3480da,_0x380d11])=>{const _0x36f6c2=_0xc66ef;if(!_0x380d11||typeof _0x380d11!=='object'||Array[_0x36f6c2(0x1e4)](_0x380d11))return[_0x3480da,_0x380d11];const _0x5d6744={..._0x380d11};return Object[_0x36f6c2(0x1e8)][_0x36f6c2(0x1e2)][_0x36f6c2(0x1da)](_0x5d6744,_0x36f6c2(0x1eb))&&(_0x5d6744[_0x36f6c2(0x1eb)]=maskCliAccessKey(_0x5d6744[_0x36f6c2(0x1eb)])),[_0x3480da,_0x5d6744];}));}
1
+ const a167_0x7337e=a167_0x55bd;(function(_0x55dc15,_0xda907f){const _0x13b15e=a167_0x55bd,_0x5a4eb5=_0x55dc15();while(!![]){try{const _0x50920c=parseInt(_0x13b15e(0x1e8))/0x1*(parseInt(_0x13b15e(0x1f0))/0x2)+-parseInt(_0x13b15e(0x1f3))/0x3*(-parseInt(_0x13b15e(0x1f6))/0x4)+parseInt(_0x13b15e(0x1fc))/0x5+parseInt(_0x13b15e(0x1f7))/0x6+parseInt(_0x13b15e(0x1fb))/0x7+parseInt(_0x13b15e(0x1f4))/0x8+-parseInt(_0x13b15e(0x1f8))/0x9;if(_0x50920c===_0xda907f)break;else _0x5a4eb5['push'](_0x5a4eb5['shift']());}catch(_0x41253b){_0x5a4eb5['push'](_0x5a4eb5['shift']());}}}(a167_0x19b5,0xd79aa));const REDACTED_ACCESS_KEY=a167_0x7337e(0x1ef);function a167_0x19b5(){const _0x212075=['hasOwnProperty','apps','9617251AcYRNA','6410505jFbGZf','test','fromEntries','284489GWJetD','slice','string','accessKey','prototype','isArray','map','<redacted>','2krgLBJ','object','length','447897TCjPWp','9756368MlTsah','call','16ieeUEV','4983372aCpEsx','42342057INZOoe'];a167_0x19b5=function(){return _0x212075;};return a167_0x19b5();}export function maskCliAccessKey(_0x41ce9a){const _0x7a13f3=a167_0x7337e;if(typeof _0x41ce9a!==_0x7a13f3(0x1ea)||_0x41ce9a['length']<=0x8)return REDACTED_ACCESS_KEY;return''+_0x41ce9a[_0x7a13f3(0x1e9)](0x0,0x8)+'*'['repeat'](_0x41ce9a[_0x7a13f3(0x1f2)]-0x8);}export function redactCliConfigCredentials(_0x5409f1){const _0x3f199f=a167_0x7337e,_0x26ee66={..._0x5409f1};return Object['prototype'][_0x3f199f(0x1f9)][_0x3f199f(0x1f5)](_0x26ee66,_0x3f199f(0x1eb))&&(_0x26ee66['accessKey']=maskCliAccessKey(_0x26ee66[_0x3f199f(0x1eb)])),_0x26ee66[_0x3f199f(0x1fa)]&&typeof _0x26ee66[_0x3f199f(0x1fa)]===_0x3f199f(0x1f1)&&!Array[_0x3f199f(0x1ed)](_0x26ee66[_0x3f199f(0x1fa)])&&(_0x26ee66[_0x3f199f(0x1fa)]=redactLegacyAppCredentials(_0x26ee66[_0x3f199f(0x1fa)])),_0x26ee66;}function a167_0x55bd(_0x35beda,_0x6b964e){_0x35beda=_0x35beda-0x1e8;const _0x19b581=a167_0x19b5();let _0x55bdb0=_0x19b581[_0x35beda];return _0x55bdb0;}export function redactCliConfigValue(_0x130fb9,_0x46fb79){const _0x5e5ec7=a167_0x7337e;if(_0x130fb9==='accessKey'||/^apps\.[^.]+\.accessKey$/[_0x5e5ec7(0x1fd)](_0x130fb9))return maskCliAccessKey(_0x46fb79);if(_0x130fb9===_0x5e5ec7(0x1fa)&&_0x46fb79&&typeof _0x46fb79===_0x5e5ec7(0x1f1)&&!Array[_0x5e5ec7(0x1ed)](_0x46fb79))return redactLegacyAppCredentials(_0x46fb79);if(/^apps\.[^.]+$/[_0x5e5ec7(0x1fd)](_0x130fb9)&&_0x46fb79&&typeof _0x46fb79===_0x5e5ec7(0x1f1)&&!Array[_0x5e5ec7(0x1ed)](_0x46fb79)){const _0x25d528=_0x46fb79;return Object[_0x5e5ec7(0x1ec)]['hasOwnProperty'][_0x5e5ec7(0x1f5)](_0x25d528,'accessKey')?{..._0x25d528,'accessKey':maskCliAccessKey(_0x25d528['accessKey'])}:_0x46fb79;}return _0x46fb79;}function redactLegacyAppCredentials(_0x555f6b){const _0x48af31=a167_0x7337e;return Object[_0x48af31(0x1fe)](Object['entries'](_0x555f6b)[_0x48af31(0x1ee)](([_0x398f3b,_0x5d9181])=>{const _0x455076=_0x48af31;if(!_0x5d9181||typeof _0x5d9181!==_0x455076(0x1f1)||Array[_0x455076(0x1ed)](_0x5d9181))return[_0x398f3b,_0x5d9181];const _0x33f5fc={..._0x5d9181};return Object[_0x455076(0x1ec)]['hasOwnProperty']['call'](_0x33f5fc,'accessKey')&&(_0x33f5fc[_0x455076(0x1eb)]=maskCliAccessKey(_0x33f5fc[_0x455076(0x1eb)])),[_0x398f3b,_0x33f5fc];}));}
@@ -1 +1 @@
1
- function a168_0x321a(){const _0x19d6a8=['2491115TCiQAF','1771332enOaPJ','9925576SnySXf','5211144jtoalH','1569914JAvghw','1748370dimnBA','377328jhCulL','7MaMApv'];a168_0x321a=function(){return _0x19d6a8;};return a168_0x321a();}function a168_0x4f63(_0x510aa8,_0x5642e5){_0x510aa8=_0x510aa8-0x1ad;const _0x321a59=a168_0x321a();let _0x4f6338=_0x321a59[_0x510aa8];return _0x4f6338;}(function(_0xb4c570,_0x21c2b7){const _0x2fe9fb=a168_0x4f63,_0x50b1ed=_0xb4c570();while(!![]){try{const _0x352d68=parseInt(_0x2fe9fb(0x1b4))/0x1+-parseInt(_0x2fe9fb(0x1b2))/0x2+parseInt(_0x2fe9fb(0x1b3))/0x3+parseInt(_0x2fe9fb(0x1af))/0x4+-parseInt(_0x2fe9fb(0x1ae))/0x5+-parseInt(_0x2fe9fb(0x1b1))/0x6+-parseInt(_0x2fe9fb(0x1ad))/0x7*(-parseInt(_0x2fe9fb(0x1b0))/0x8);if(_0x352d68===_0x21c2b7)break;else _0x50b1ed['push'](_0x50b1ed['shift']());}catch(_0x3f3d65){_0x50b1ed['push'](_0x50b1ed['shift']());}}}(a168_0x321a,0x781a8));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x238f9c,_0x3b0802){const _0x28d967=a168_0x53d4,_0x292e99=_0x238f9c();while(!![]){try{const _0xeee7f9=parseInt(_0x28d967(0x1c2))/0x1*(parseInt(_0x28d967(0x1c4))/0x2)+parseInt(_0x28d967(0x1c5))/0x3*(-parseInt(_0x28d967(0x1bc))/0x4)+parseInt(_0x28d967(0x1bf))/0x5+parseInt(_0x28d967(0x1c1))/0x6+-parseInt(_0x28d967(0x1c3))/0x7+-parseInt(_0x28d967(0x1c0))/0x8*(-parseInt(_0x28d967(0x1c6))/0x9)+parseInt(_0x28d967(0x1bd))/0xa*(-parseInt(_0x28d967(0x1be))/0xb);if(_0xeee7f9===_0x3b0802)break;else _0x292e99['push'](_0x292e99['shift']());}catch(_0x1029bf){_0x292e99['push'](_0x292e99['shift']());}}}(a168_0xef1e,0xd44fd));function a168_0x53d4(_0x5c292c,_0x5dae8f){_0x5c292c=_0x5c292c-0x1bc;const _0xef1ebb=a168_0xef1e();let _0x53d4d9=_0xef1ebb[_0x5c292c];return _0x53d4d9;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a168_0xef1e(){const _0x5257d5=['6370140ThiHOM','2CdJiuX','2273152ASnQQb','317530QvhXiK','410217bgRwWm','27SSgEAZ','32AilKuI','670dbyAhB','136532uEtLzi','8419475ScLbqU','151376MqZgNQ'];a168_0xef1e=function(){return _0x5257d5;};return a168_0xef1e();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- (function(_0x7cf387,_0x3f19fa){const _0x3b9c12=a169_0x47b3,_0x27012a=_0x7cf387();while(!![]){try{const _0x53d5a4=parseInt(_0x3b9c12(0xfc))/0x1*(-parseInt(_0x3b9c12(0xee))/0x2)+parseInt(_0x3b9c12(0xf5))/0x3*(-parseInt(_0x3b9c12(0xf1))/0x4)+parseInt(_0x3b9c12(0xfe))/0x5*(-parseInt(_0x3b9c12(0x100))/0x6)+parseInt(_0x3b9c12(0xf2))/0x7*(-parseInt(_0x3b9c12(0xf0))/0x8)+parseInt(_0x3b9c12(0xf3))/0x9+-parseInt(_0x3b9c12(0x102))/0xa+parseInt(_0x3b9c12(0xef))/0xb*(parseInt(_0x3b9c12(0xf6))/0xc);if(_0x53d5a4===_0x3f19fa)break;else _0x27012a['push'](_0x27012a['shift']());}catch(_0x2fcdd7){_0x27012a['push'](_0x27012a['shift']());}}}(a169_0x4ec6,0x4ba13));import a169_0x5baf11 from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0xbaf32,_0x2bcb5c){const _0x292a8d=a169_0x47b3,_0x11bf35=a169_0x5baf11[_0x292a8d(0xfa)](_0xbaf32)===_0xbaf32,_0x1695f2=_0x2bcb5c?.[_0x292a8d(0x103)]??null,_0x4da68a=_0x2bcb5c?.['minimumVersion']??null,_0x38966b=Boolean(_0x11bf35&&_0x1695f2&&a169_0x5baf11['lt'](_0xbaf32,_0x1695f2)),_0x5bcbab=Boolean(_0x11bf35&&_0x4da68a&&a169_0x5baf11['lt'](_0xbaf32,_0x4da68a));return{'currentVersion':_0xbaf32,'stableVersion':_0x1695f2,'minimumVersion':_0x4da68a,'needsUpgrade':_0x38966b||_0x5bcbab,'belowMinimum':_0x5bcbab,'upgradeMessage':_0x2bcb5c?.[_0x292a8d(0xf4)],'minimumVersionMessage':_0x2bcb5c?.[_0x292a8d(0xf8)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}function a169_0x47b3(_0x42f67d,_0x571ba8){_0x42f67d=_0x42f67d-0xed;const _0x4ec631=a169_0x4ec6();let _0x47b3ff=_0x4ec631[_0x42f67d];return _0x47b3ff;}export function getCliUpgradeCommand(_0x57d11b){const _0x1b141a=a169_0x47b3;return _0x1b141a(0xf7)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x57d11b[_0x1b141a(0x103)]??_0x1b141a(0x101));}export function assertCliVersionSupported(_0x386269){const _0xa548a8=a169_0x47b3;if(!_0x386269['belowMinimum'])return;const _0x4afdef=[_0x386269[_0xa548a8(0xf8)],_0xa548a8(0xfb)+_0x386269[_0xa548a8(0xf9)],'Minimum\x20supported:\x20'+_0x386269['minimumVersion'],'Recommended\x20stable:\x20'+(_0x386269[_0xa548a8(0x103)]??_0xa548a8(0xed)),_0xa548a8(0xfd)+getCliUpgradeCommand(_0x386269)]['filter'](Boolean)['join']('\x0a');throw CliErrors[_0xa548a8(0xff)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x4afdef);}function a169_0x4ec6(){const _0x2dbdb0=['Upgrade\x20command:\x20','5365uuMOVL','validation','1212YefbtH','latest','2239830YcNmxk','stableVersion','unavailable','10zrzqMh','110JKgHTL','685736DqgpEZ','12ApxVYJ','7zueOkm','948582uLNtXu','upgradeMessage','277998vYEePc','1554684wGaDLA','npm\x20install\x20-g\x20','minimumVersionMessage','currentVersion','valid','Current\x20version:\x20','57349LOmyTb'];a169_0x4ec6=function(){return _0x2dbdb0;};return a169_0x4ec6();}
1
+ function a169_0x18b7(_0x3e7374,_0x5407e0){_0x3e7374=_0x3e7374-0xb0;const _0x16c768=a169_0x16c7();let _0x18b760=_0x16c768[_0x3e7374];return _0x18b760;}(function(_0x1c255d,_0x571da7){const _0x5f36f2=a169_0x18b7,_0x2cca15=_0x1c255d();while(!![]){try{const _0x3eff82=-parseInt(_0x5f36f2(0xc5))/0x1+-parseInt(_0x5f36f2(0xbd))/0x2*(parseInt(_0x5f36f2(0xb8))/0x3)+-parseInt(_0x5f36f2(0xc2))/0x4*(parseInt(_0x5f36f2(0xb0))/0x5)+-parseInt(_0x5f36f2(0xc1))/0x6*(parseInt(_0x5f36f2(0xb7))/0x7)+parseInt(_0x5f36f2(0xb2))/0x8+-parseInt(_0x5f36f2(0xc0))/0x9+-parseInt(_0x5f36f2(0xb1))/0xa*(-parseInt(_0x5f36f2(0xbf))/0xb);if(_0x3eff82===_0x571da7)break;else _0x2cca15['push'](_0x2cca15['shift']());}catch(_0x525dad){_0x2cca15['push'](_0x2cca15['shift']());}}}(a169_0x16c7,0x69907));import a169_0x2d283e from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a169_0x16c7(){const _0x1a5722=['currentVersion','minimumVersion','259KRhUld','4026YGnyWl','belowMinimum','upgradeMessage','npm\x20install\x20-g\x20','stableVersion','44IClFUl','latest','11mBKQMB','5297850forQaQ','85818IKUfbY','32MDlQtI','join','Current\x20version:\x20','417157sRNrLV','minimumVersionMessage','validation','252620YosgVU','23690210bfXCyw','256832utNWza','Upgrade\x20command:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.'];a169_0x16c7=function(){return _0x1a5722;};return a169_0x16c7();}import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x4f6cc9,_0x2dc5d1){const _0x108f72=a169_0x18b7,_0xc09568=a169_0x2d283e['valid'](_0x4f6cc9)===_0x4f6cc9,_0x5918f1=_0x2dc5d1?.[_0x108f72(0xbc)]??null,_0x11ee9f=_0x2dc5d1?.['minimumVersion']??null,_0x49d009=Boolean(_0xc09568&&_0x5918f1&&a169_0x2d283e['lt'](_0x4f6cc9,_0x5918f1)),_0x58248f=Boolean(_0xc09568&&_0x11ee9f&&a169_0x2d283e['lt'](_0x4f6cc9,_0x11ee9f));return{'currentVersion':_0x4f6cc9,'stableVersion':_0x5918f1,'minimumVersion':_0x11ee9f,'needsUpgrade':_0x49d009||_0x58248f,'belowMinimum':_0x58248f,'upgradeMessage':_0x2dc5d1?.[_0x108f72(0xba)],'minimumVersionMessage':_0x2dc5d1?.[_0x108f72(0xc6)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x40f073){const _0x1f8a4e=a169_0x18b7;return _0x1f8a4e(0xbb)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x40f073[_0x1f8a4e(0xbc)]??_0x1f8a4e(0xbe));}export function assertCliVersionSupported(_0x3e61c8){const _0x5aa584=a169_0x18b7;if(!_0x3e61c8[_0x5aa584(0xb9)])return;const _0x532b4d=[_0x3e61c8[_0x5aa584(0xc6)],_0x5aa584(0xc4)+_0x3e61c8[_0x5aa584(0xb5)],'Minimum\x20supported:\x20'+_0x3e61c8[_0x5aa584(0xb6)],'Recommended\x20stable:\x20'+(_0x3e61c8[_0x5aa584(0xbc)]??'unavailable'),_0x5aa584(0xb3)+getCliUpgradeCommand(_0x3e61c8)]['filter'](Boolean)[_0x5aa584(0xc3)]('\x0a');throw CliErrors[_0x5aa584(0xc7)](_0x5aa584(0xb4),_0x532b4d);}
@@ -1 +1 @@
1
- (function(_0x37b966,_0x2aeda4){const _0x3994b9=a170_0x35ab,_0x14758b=_0x37b966();while(!![]){try{const _0x812cb=parseInt(_0x3994b9(0xc0))/0x1*(-parseInt(_0x3994b9(0xc6))/0x2)+parseInt(_0x3994b9(0xb1))/0x3*(parseInt(_0x3994b9(0xbc))/0x4)+-parseInt(_0x3994b9(0xc5))/0x5+parseInt(_0x3994b9(0xb4))/0x6*(parseInt(_0x3994b9(0xc3))/0x7)+parseInt(_0x3994b9(0xc7))/0x8*(parseInt(_0x3994b9(0xb8))/0x9)+-parseInt(_0x3994b9(0xbb))/0xa+-parseInt(_0x3994b9(0xb6))/0xb*(parseInt(_0x3994b9(0xc1))/0xc);if(_0x812cb===_0x2aeda4)break;else _0x14758b['push'](_0x14758b['shift']());}catch(_0x10149b){_0x14758b['push'](_0x14758b['shift']());}}}(a170_0x54d8,0x2964f));import a170_0x46281c from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x53f00d){const _0x4ace65=a170_0x35ab;return typeof _0x53f00d==='string'&&_0x53f00d[_0x4ace65(0xb7)]()?_0x53f00d[_0x4ace65(0xb7)]():null;}function pickStrictSemver(_0x4cb13d){const _0x441804=a170_0x35ab,_0x31bfc5=pickString(_0x4cb13d);return _0x31bfc5&&a170_0x46281c[_0x441804(0xb2)](_0x31bfc5)===_0x31bfc5?_0x31bfc5:null;}export function normalizeCliVersionPolicy(_0x1a99c5){const _0x406a25=a170_0x35ab;if(!_0x1a99c5||typeof _0x1a99c5!==_0x406a25(0xc4))return null;const _0x3275b3=_0x1a99c5,_0xa30e24=_0x3275b3['cli']&&typeof _0x3275b3[_0x406a25(0xbd)]===_0x406a25(0xc4)?_0x3275b3[_0x406a25(0xbd)]:_0x3275b3,_0x2b66ae=pickStrictSemver(_0xa30e24[_0x406a25(0xbe)]??_0xa30e24['latestVersion']??_0xa30e24[_0x406a25(0xb0)]),_0x3ebad2=pickStrictSemver(_0xa30e24[_0x406a25(0xc2)]??_0xa30e24[_0x406a25(0xbf)]);if(!_0x2b66ae&&!_0x3ebad2)return null;if(_0x2b66ae&&_0x3ebad2&&a170_0x46281c['gt'](_0x3ebad2,_0x2b66ae))return null;return{'stableVersion':_0x2b66ae,'minimumVersion':_0x3ebad2,'upgradeMessage':pickString(_0xa30e24['upgradeMessage'])??undefined,'minimumVersionMessage':pickString(_0xa30e24['minimumVersionMessage'])??undefined};}export async function fetchCliVersionPolicy(){const _0x4ca75b=a170_0x35ab;try{const _0x261c6f=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4ca75b(0xb5)},'signal':AbortSignal[_0x4ca75b(0xb3)](FETCH_TIMEOUT_MS)});if(!_0x261c6f['ok'])return null;return normalizeCliVersionPolicy(await _0x261c6f[_0x4ca75b(0xaf)]());}catch{return null;}}function a170_0x35ab(_0x307e0e,_0x6266be){_0x307e0e=_0x307e0e-0xaf;const _0x54d8fe=a170_0x54d8();let _0x35ab90=_0x54d8fe[_0x307e0e];return _0x35ab90;}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x18dc3a=a170_0x35ab,_0x115ca2=Date[_0x18dc3a(0xba)]();if(hasCachedPolicy){const _0x590b22=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x115ca2-cachedAt<_0x590b22)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x18dc3a(0xb9)](_0x1f92dc=>{const _0x387539=_0x18dc3a;return cachedPolicy=_0x1f92dc,cachedAt=Date[_0x387539(0xba)](),hasCachedPolicy=!![],_0x1f92dc;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}function a170_0x54d8(){const _0x5ad18f=['trim','1060830RabmuD','then','now','544980BWGXGW','446412XJbdOf','cli','stableVersion','minVersion','496xqyFoS','325344LkmajD','minimumVersion','21IdAWaS','object','1124295akyimQ','454VRXinP','16BJSrQA','json','recommendedVersion','6vWFmWT','valid','timeout','422004umUMmu','application/json','44SyNWkf'];a170_0x54d8=function(){return _0x5ad18f;};return a170_0x54d8();}
1
+ function a170_0x125a(){const _0xce2661=['minVersion','24YlEuXX','recommendedVersion','597474PFKBrR','6634nnfRSm','finally','386916rOZznn','315603AbDZgP','then','now','upgradeMessage','json','application/json','4gTKSiL','object','trim','4638990fsLMCU','valid','981946PiNtnz','string','stableVersion','timeout','minimumVersion','minimumVersionMessage','cli','latestVersion','906865RqpTlC','124xYAiTc'];a170_0x125a=function(){return _0xce2661;};return a170_0x125a();}(function(_0x4cfd91,_0x3a3428){const _0x126476=a170_0x1dc7,_0x5a6e69=_0x4cfd91();while(!![]){try{const _0x4b91ee=-parseInt(_0x126476(0x92))/0x1*(parseInt(_0x126476(0x8d))/0x2)+parseInt(_0x126476(0x91))/0x3+-parseInt(_0x126476(0x9b))/0x4*(parseInt(_0x126476(0x8c))/0x5)+-parseInt(_0x126476(0x94))/0x6+parseInt(_0x126476(0xa0))/0x7+parseInt(_0x126476(0x8f))/0x8*(parseInt(_0x126476(0x95))/0x9)+parseInt(_0x126476(0x9e))/0xa;if(_0x4b91ee===_0x3a3428)break;else _0x5a6e69['push'](_0x5a6e69['shift']());}catch(_0x527b4f){_0x5a6e69['push'](_0x5a6e69['shift']());}}}(a170_0x125a,0x3d5e9));function a170_0x1dc7(_0x1b7ed9,_0x555d1c){_0x1b7ed9=_0x1b7ed9-0x87;const _0x125a71=a170_0x125a();let _0x1dc7ce=_0x125a71[_0x1b7ed9];return _0x1dc7ce;}import a170_0x5d6f3f from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x5a158f){const _0x4649c9=a170_0x1dc7;return typeof _0x5a158f===_0x4649c9(0xa1)&&_0x5a158f[_0x4649c9(0x9d)]()?_0x5a158f[_0x4649c9(0x9d)]():null;}function pickStrictSemver(_0x30f707){const _0x267fdb=a170_0x1dc7,_0x3edf5a=pickString(_0x30f707);return _0x3edf5a&&a170_0x5d6f3f[_0x267fdb(0x9f)](_0x3edf5a)===_0x3edf5a?_0x3edf5a:null;}export function normalizeCliVersionPolicy(_0x4c0975){const _0x116b80=a170_0x1dc7;if(!_0x4c0975||typeof _0x4c0975!==_0x116b80(0x9c))return null;const _0x4ab7d5=_0x4c0975,_0x3775aa=_0x4ab7d5[_0x116b80(0x8a)]&&typeof _0x4ab7d5[_0x116b80(0x8a)]===_0x116b80(0x9c)?_0x4ab7d5[_0x116b80(0x8a)]:_0x4ab7d5,_0x1d6606=pickStrictSemver(_0x3775aa[_0x116b80(0xa2)]??_0x3775aa[_0x116b80(0x8b)]??_0x3775aa[_0x116b80(0x90)]),_0x2c6b42=pickStrictSemver(_0x3775aa[_0x116b80(0x88)]??_0x3775aa[_0x116b80(0x8e)]);if(!_0x1d6606&&!_0x2c6b42)return null;if(_0x1d6606&&_0x2c6b42&&a170_0x5d6f3f['gt'](_0x2c6b42,_0x1d6606))return null;return{'stableVersion':_0x1d6606,'minimumVersion':_0x2c6b42,'upgradeMessage':pickString(_0x3775aa[_0x116b80(0x98)])??undefined,'minimumVersionMessage':pickString(_0x3775aa[_0x116b80(0x89)])??undefined};}export async function fetchCliVersionPolicy(){const _0x2a6023=a170_0x1dc7;try{const _0xbe672a=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x2a6023(0x9a)},'signal':AbortSignal[_0x2a6023(0x87)](FETCH_TIMEOUT_MS)});if(!_0xbe672a['ok'])return null;return normalizeCliVersionPolicy(await _0xbe672a[_0x2a6023(0x99)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x1ceef2=a170_0x1dc7,_0x59b905=Date[_0x1ceef2(0x97)]();if(hasCachedPolicy){const _0x153582=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x59b905-cachedAt<_0x153582)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x1ceef2(0x96)](_0x2073e2=>{return cachedPolicy=_0x2073e2,cachedAt=Date['now'](),hasCachedPolicy=!![],_0x2073e2;})[_0x1ceef2(0x93)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
@@ -1 +1 @@
1
- const a171_0x3b1aef=a171_0x50bf;(function(_0x2cd2b7,_0x59b632){const _0x28b269=a171_0x50bf,_0x4dbd0e=_0x2cd2b7();while(!![]){try{const _0x346b04=-parseInt(_0x28b269(0x1f4))/0x1+-parseInt(_0x28b269(0x1e2))/0x2+parseInt(_0x28b269(0x1df))/0x3+parseInt(_0x28b269(0x1fb))/0x4*(parseInt(_0x28b269(0x1f2))/0x5)+parseInt(_0x28b269(0x1ec))/0x6*(-parseInt(_0x28b269(0x1f9))/0x7)+-parseInt(_0x28b269(0x201))/0x8*(parseInt(_0x28b269(0x203))/0x9)+parseInt(_0x28b269(0x206))/0xa*(parseInt(_0x28b269(0x207))/0xb);if(_0x346b04===_0x59b632)break;else _0x4dbd0e['push'](_0x4dbd0e['shift']());}catch(_0x3f2d87){_0x4dbd0e['push'](_0x4dbd0e['shift']());}}}(a171_0x17e1,0x9a102));import a171_0x285263 from'winston';import a171_0x31f244 from'node:fs';function a171_0x17e1(){const _0x349507=['setRawCommand','dirname','toISOString','logTask','readFileSync','transports','initWinstonLogger','logFilePath','553854qcRNvu','mkdirSync','currentRawCommand','231410nYXptO','format','parse','stringify','getWinstonInstance','message','green','join','blue','createLogger','762MVzYVM','success','winstonLogger','now','writeFileSync','printf','5KRBuJt','log','692670CMGPdY','Failed:\x20','rawCommand','addColors','utf8','62573vvFyGk','existsSync','2872732lULGDb','combine','error','info','Failed\x20to\x20read\x20logs:','errors','190360HgbbdF','split','333QqJMDn','clear','yellow','911530OMhNpF','308AatVTp','Starting:\x20','timestamp','command','warn'];a171_0x17e1=function(){return _0x349507;};return a171_0x17e1();}import a171_0x3e340c from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a171_0x50bf(_0xe7f365,_0x33254f){_0xe7f365=_0xe7f365-0x1d7;const _0x17e1e4=a171_0x17e1();let _0x50bf6=_0x17e1e4[_0xe7f365];return _0x50bf6;}class Logger{[a171_0x3b1aef(0x1ee)];[a171_0x3b1aef(0x1de)]='';['currentRawCommand']='';constructor(){}[a171_0x3b1aef(0x1d7)](_0x1e6aa9){const _0x8f9e80=a171_0x3b1aef;this[_0x8f9e80(0x1e1)]=_0x1e6aa9;}['setLogPath'](_0x389700){const _0x5b3ef1=a171_0x3b1aef;this[_0x5b3ef1(0x1de)]=a171_0x3e340c[_0x5b3ef1(0x1e9)](_0x389700,PRODUCT_CONFIG['logFileName']),this['winstonLogger']&&this[_0x5b3ef1(0x1ee)][_0x5b3ef1(0x204)](),this[_0x5b3ef1(0x1dd)]();}[a171_0x3b1aef(0x1dd)](){const _0x5c9e50=a171_0x3b1aef,_0x69d72d=a171_0x3e340c[_0x5c9e50(0x1d8)](this[_0x5c9e50(0x1de)]);!a171_0x31f244[_0x5c9e50(0x1fa)](_0x69d72d)&&a171_0x31f244[_0x5c9e50(0x1e0)](_0x69d72d,{'recursive':!![]});const _0x14bbbe=a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x1fc)](a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x209)](),a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x200)]({'stack':!![]}),a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x1f1)](_0xc93aa1=>{const _0x298992=_0x5c9e50,_0xdda907={'timestamp':_0xc93aa1[_0x298992(0x209)]||new Date()[_0x298992(0x1d9)](),'level':_0xc93aa1['level']||_0x298992(0x1fe),'command':_0xc93aa1[_0x298992(0x20a)]||'unknown','rawCommand':_0xc93aa1[_0x298992(0x1f6)]||this[_0x298992(0x1e1)]||undefined,'message':_0xc93aa1[_0x298992(0x1e7)]||'','duration':_0xc93aa1['duration']||undefined,'details':_0xc93aa1['details']||undefined};return JSON[_0x298992(0x1e5)](_0xdda907);}));this[_0x5c9e50(0x1ee)]=a171_0x285263[_0x5c9e50(0x1eb)]({'level':_0x5c9e50(0x1fe),'format':_0x14bbbe,'transports':[new a171_0x285263[(_0x5c9e50(0x1dc))]['File']({'filename':this[_0x5c9e50(0x1de)],'level':_0x5c9e50(0x1fe)})],'silent':![]}),a171_0x285263[_0x5c9e50(0x1f7)]({'success':_0x5c9e50(0x1e8),'error':'red','warn':_0x5c9e50(0x205),'info':_0x5c9e50(0x1ea)});}['info'](_0x146b16,_0x27243d,_0x1f4482){const _0x1beff1=a171_0x3b1aef;if(!this[_0x1beff1(0x1de)]||!this[_0x1beff1(0x1ee)])return;this['winstonLogger'][_0x1beff1(0x1fe)](_0x27243d,{'command':_0x146b16,'details':_0x1f4482});}[a171_0x3b1aef(0x1ed)](_0xf88c9b,_0x42b386,_0x2ea515,_0x3e218e){const _0x31b699=a171_0x3b1aef;if(!this[_0x31b699(0x1de)]||!this[_0x31b699(0x1ee)])return;this['winstonLogger'][_0x31b699(0x1f3)]('info',_0x42b386,{'level':_0x31b699(0x1ed),'command':_0xf88c9b,'duration':_0x2ea515,'details':_0x3e218e});}[a171_0x3b1aef(0x1fd)](_0x521636,_0x32660d,_0xe46cc7){const _0x4d9ac7=a171_0x3b1aef;if(!this['logFilePath']||!this[_0x4d9ac7(0x1ee)])return;this[_0x4d9ac7(0x1ee)][_0x4d9ac7(0x1fd)](_0x32660d,{'command':_0x521636,'details':_0xe46cc7});}[a171_0x3b1aef(0x20b)](_0xe45b32,_0x4ccffc,_0x5eef70){const _0x5c7fa8=a171_0x3b1aef;if(!this['logFilePath']||!this[_0x5c7fa8(0x1ee)])return;this[_0x5c7fa8(0x1ee)][_0x5c7fa8(0x20b)](_0x4ccffc,{'command':_0xe45b32,'details':_0x5eef70});}async[a171_0x3b1aef(0x1da)](_0x330e43,_0xcd2fca,_0x252c95){const _0x26f05b=a171_0x3b1aef,_0x5d2189=Date[_0x26f05b(0x1ef)]();this['info'](_0x330e43,_0x26f05b(0x208)+_0xcd2fca);try{const _0x255177=await _0x252c95(),_0x548365=Date[_0x26f05b(0x1ef)]()-_0x5d2189;return this['success'](_0x330e43,'Completed:\x20'+_0xcd2fca,_0x548365),_0x255177;}catch(_0x2f60e1){const _0x2fcd6f=Date[_0x26f05b(0x1ef)]()-_0x5d2189;this[_0x26f05b(0x1fd)](_0x330e43,_0x26f05b(0x1f5)+_0xcd2fca,{'error':_0x2f60e1 instanceof Error?_0x2f60e1['message']:String(_0x2f60e1),'duration':_0x2fcd6f});throw _0x2f60e1;}}['readLogs'](){const _0xebdd30=a171_0x3b1aef;try{if(!a171_0x31f244[_0xebdd30(0x1fa)](this['logFilePath']))return[];const _0x24e6d8=a171_0x31f244[_0xebdd30(0x1db)](this[_0xebdd30(0x1de)],_0xebdd30(0x1f8));return _0x24e6d8[_0xebdd30(0x202)](/\r?\n/)['filter'](_0x4a1e3c=>_0x4a1e3c['trim']())['map'](_0x51829d=>JSON[_0xebdd30(0x1e4)](_0x51829d));}catch(_0xab3e03){return console[_0xebdd30(0x20b)](_0xebdd30(0x1ff),_0xab3e03),[];}}['clearLogs'](){const _0x134c1a=a171_0x3b1aef;try{a171_0x31f244[_0x134c1a(0x1fa)](this[_0x134c1a(0x1de)])&&a171_0x31f244[_0x134c1a(0x1f0)](this[_0x134c1a(0x1de)],'',_0x134c1a(0x1f8));}catch(_0x5dad63){console[_0x134c1a(0x20b)]('Failed\x20to\x20clear\x20logs:',_0x5dad63);}}[a171_0x3b1aef(0x1e6)](){const _0x3f9c31=a171_0x3b1aef;return this[_0x3f9c31(0x1ee)];}}export const logger=new Logger();
1
+ const a171_0x1f2e3b=a171_0x2a62;(function(_0x4c12ea,_0x2cec6e){const _0x20a949=a171_0x2a62,_0x53fb7e=_0x4c12ea();while(!![]){try{const _0x452c4b=parseInt(_0x20a949(0x1a3))/0x1+-parseInt(_0x20a949(0x1aa))/0x2*(parseInt(_0x20a949(0x1a8))/0x3)+parseInt(_0x20a949(0x19b))/0x4+parseInt(_0x20a949(0x1b7))/0x5*(-parseInt(_0x20a949(0x195))/0x6)+-parseInt(_0x20a949(0x198))/0x7+-parseInt(_0x20a949(0x199))/0x8+parseInt(_0x20a949(0x191))/0x9*(parseInt(_0x20a949(0x188))/0xa);if(_0x452c4b===_0x2cec6e)break;else _0x53fb7e['push'](_0x53fb7e['shift']());}catch(_0x27fac1){_0x53fb7e['push'](_0x53fb7e['shift']());}}}(a171_0x3d61,0x36a15));import a171_0x259ffa from'winston';import a171_0xee642f from'node:fs';import a171_0x5bd019 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a171_0x1f2e3b(0x193)];[a171_0x1f2e3b(0x186)]='';['currentRawCommand']='';constructor(){}[a171_0x1f2e3b(0x19a)](_0x264715){const _0x2bf6e1=a171_0x1f2e3b;this[_0x2bf6e1(0x1a2)]=_0x264715;}[a171_0x1f2e3b(0x194)](_0x256e1d){const _0x55de17=a171_0x1f2e3b;this[_0x55de17(0x186)]=a171_0x5bd019['join'](_0x256e1d,PRODUCT_CONFIG[_0x55de17(0x1b5)]),this[_0x55de17(0x193)]&&this[_0x55de17(0x193)][_0x55de17(0x1a7)](),this['initWinstonLogger']();}[a171_0x1f2e3b(0x1ae)](){const _0x46478e=a171_0x1f2e3b,_0x281c24=a171_0x5bd019['dirname'](this['logFilePath']);!a171_0xee642f['existsSync'](_0x281c24)&&a171_0xee642f[_0x46478e(0x189)](_0x281c24,{'recursive':!![]});const _0x3b6b29=a171_0x259ffa[_0x46478e(0x1a4)][_0x46478e(0x1ad)](a171_0x259ffa[_0x46478e(0x1a4)][_0x46478e(0x19d)](),a171_0x259ffa[_0x46478e(0x1a4)][_0x46478e(0x180)]({'stack':!![]}),a171_0x259ffa['format'][_0x46478e(0x18b)](_0x27f904=>{const _0x1e96b9=_0x46478e,_0x374b1b={'timestamp':_0x27f904[_0x1e96b9(0x19d)]||new Date()[_0x1e96b9(0x181)](),'level':_0x27f904[_0x1e96b9(0x19f)]||_0x1e96b9(0x1ac),'command':_0x27f904[_0x1e96b9(0x197)]||'unknown','rawCommand':_0x27f904['rawCommand']||this[_0x1e96b9(0x1a2)]||undefined,'message':_0x27f904['message']||'','duration':_0x27f904['duration']||undefined,'details':_0x27f904[_0x1e96b9(0x183)]||undefined};return JSON[_0x1e96b9(0x1a0)](_0x374b1b);}));this['winstonLogger']=a171_0x259ffa[_0x46478e(0x18c)]({'level':_0x46478e(0x1ac),'format':_0x3b6b29,'transports':[new a171_0x259ffa[(_0x46478e(0x1a5))][(_0x46478e(0x192))]({'filename':this[_0x46478e(0x186)],'level':_0x46478e(0x1ac)})],'silent':![]}),a171_0x259ffa[_0x46478e(0x19c)]({'success':'green','error':_0x46478e(0x1b1),'warn':_0x46478e(0x1b8),'info':'blue'});}[a171_0x1f2e3b(0x1ac)](_0xfba346,_0x47ebb6,_0x538e1d){const _0x5dae41=a171_0x1f2e3b;if(!this[_0x5dae41(0x186)]||!this[_0x5dae41(0x193)])return;this[_0x5dae41(0x193)][_0x5dae41(0x1ac)](_0x47ebb6,{'command':_0xfba346,'details':_0x538e1d});}[a171_0x1f2e3b(0x18e)](_0x5bb9a6,_0x4750f9,_0x429155,_0x1839a3){const _0x5e98b5=a171_0x1f2e3b;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger'][_0x5e98b5(0x1b2)]('info',_0x4750f9,{'level':_0x5e98b5(0x18e),'command':_0x5bb9a6,'duration':_0x429155,'details':_0x1839a3});}[a171_0x1f2e3b(0x1b3)](_0x17f785,_0x587a2c,_0x30876c){const _0xe1f1c3=a171_0x1f2e3b;if(!this[_0xe1f1c3(0x186)]||!this['winstonLogger'])return;this[_0xe1f1c3(0x193)]['error'](_0x587a2c,{'command':_0x17f785,'details':_0x30876c});}[a171_0x1f2e3b(0x17e)](_0x4d30d5,_0x4398de,_0x58d468){const _0x541a0f=a171_0x1f2e3b;if(!this[_0x541a0f(0x186)]||!this[_0x541a0f(0x193)])return;this['winstonLogger'][_0x541a0f(0x17e)](_0x4398de,{'command':_0x4d30d5,'details':_0x58d468});}async[a171_0x1f2e3b(0x187)](_0x2836fe,_0x570bd3,_0x167ab6){const _0xf92ed8=a171_0x1f2e3b,_0x2366ff=Date[_0xf92ed8(0x18f)]();this[_0xf92ed8(0x1ac)](_0x2836fe,_0xf92ed8(0x17f)+_0x570bd3);try{const _0x1f358b=await _0x167ab6(),_0xae14b=Date[_0xf92ed8(0x18f)]()-_0x2366ff;return this[_0xf92ed8(0x18e)](_0x2836fe,_0xf92ed8(0x18d)+_0x570bd3,_0xae14b),_0x1f358b;}catch(_0x4de9c6){const _0x15b956=Date[_0xf92ed8(0x18f)]()-_0x2366ff;this[_0xf92ed8(0x1b3)](_0x2836fe,_0xf92ed8(0x18a)+_0x570bd3,{'error':_0x4de9c6 instanceof Error?_0x4de9c6[_0xf92ed8(0x184)]:String(_0x4de9c6),'duration':_0x15b956});throw _0x4de9c6;}}[a171_0x1f2e3b(0x182)](){const _0x4201cb=a171_0x1f2e3b;try{if(!a171_0xee642f[_0x4201cb(0x185)](this[_0x4201cb(0x186)]))return[];const _0x480b9d=a171_0xee642f[_0x4201cb(0x190)](this[_0x4201cb(0x186)],_0x4201cb(0x1a1));return _0x480b9d[_0x4201cb(0x1b0)](/\r?\n/)[_0x4201cb(0x196)](_0x463925=>_0x463925[_0x4201cb(0x19e)]())[_0x4201cb(0x1ab)](_0x611850=>JSON[_0x4201cb(0x1af)](_0x611850));}catch(_0xdcd95e){return console[_0x4201cb(0x17e)](_0x4201cb(0x1a9),_0xdcd95e),[];}}[a171_0x1f2e3b(0x1b6)](){const _0x309e6c=a171_0x1f2e3b;try{a171_0xee642f[_0x309e6c(0x185)](this[_0x309e6c(0x186)])&&a171_0xee642f['writeFileSync'](this['logFilePath'],'',_0x309e6c(0x1a1));}catch(_0x3185d8){console[_0x309e6c(0x17e)](_0x309e6c(0x1a6),_0x3185d8);}}[a171_0x1f2e3b(0x1b4)](){const _0x5c9540=a171_0x1f2e3b;return this[_0x5c9540(0x193)];}}function a171_0x2a62(_0x4342ea,_0x190431){_0x4342ea=_0x4342ea-0x17e;const _0x3d6184=a171_0x3d61();let _0x2a6256=_0x3d6184[_0x4342ea];return _0x2a6256;}export const logger=new Logger();function a171_0x3d61(){const _0xfb7144=['1685324CTeymO','addColors','timestamp','trim','level','stringify','utf8','currentRawCommand','194387euJecY','format','transports','Failed\x20to\x20clear\x20logs:','clear','39WUVmlN','Failed\x20to\x20read\x20logs:','32878qhmuhN','map','info','combine','initWinstonLogger','parse','split','red','log','error','getWinstonInstance','logFileName','clearLogs','20lqCXhm','yellow','warn','Starting:\x20','errors','toISOString','readLogs','details','message','existsSync','logFilePath','logTask','20WwRoJx','mkdirSync','Failed:\x20','printf','createLogger','Completed:\x20','success','now','readFileSync','1564884RtNmmP','File','winstonLogger','setLogPath','227442YIpjsE','filter','command','1529640ipJUUm','1246800GqVKIK','setRawCommand'];a171_0x3d61=function(){return _0xfb7144;};return a171_0x3d61();}