@lovrabet/lovrabet-cli 2.2.2 → 2.2.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +3 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/ocr/index.js +1 -1
  37. package/lib/commands/personal-bff/index.js +1 -1
  38. package/lib/commands/registry.js +1 -1
  39. package/lib/commands/schedule/index.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/function-name-adapter.js +1 -1
  43. package/lib/commands/service/index.js +1 -1
  44. package/lib/commands/service/registry.js +1 -1
  45. package/lib/commands/skill/commands/create.js +1 -1
  46. package/lib/commands/skill/commands/diagram.js +1 -1
  47. package/lib/commands/skill/commands/install.js +1 -1
  48. package/lib/commands/skill/commands/list.js +1 -1
  49. package/lib/commands/skill/commands/push.js +1 -1
  50. package/lib/commands/skill/commands/validate.js +1 -1
  51. package/lib/commands/skill/diagram.js +1 -1
  52. package/lib/commands/skill/flags.js +1 -1
  53. package/lib/commands/skill/index.js +1 -1
  54. package/lib/commands/skill/manifest-helpers.js +1 -1
  55. package/lib/commands/skill/push-execute.js +1 -1
  56. package/lib/commands/skill/push-flow-helpers.js +1 -1
  57. package/lib/commands/skill/push-retarget.js +1 -1
  58. package/lib/commands/skill/scopes.js +1 -1
  59. package/lib/commands/skill/summary.js +1 -1
  60. package/lib/commands/skill/templates.js +1 -1
  61. package/lib/commands/skill/validate.js +1 -1
  62. package/lib/commands/sql/detail.js +1 -1
  63. package/lib/commands/sql/exec.js +1 -1
  64. package/lib/commands/sql/index.js +1 -1
  65. package/lib/commands/update.js +1 -1
  66. package/lib/commands/user-account/bind.d.ts +2 -0
  67. package/lib/commands/user-account/bind.js +1 -0
  68. package/lib/commands/user-account/index.d.ts +2 -0
  69. package/lib/commands/user-account/index.js +1 -0
  70. package/lib/commands/workspace/index.js +1 -1
  71. package/lib/config/schema.js +1 -1
  72. package/lib/constant/app.js +1 -1
  73. package/lib/constant/auth-mode.js +1 -1
  74. package/lib/constant/cli.js +1 -1
  75. package/lib/constant/defaults.js +1 -1
  76. package/lib/constant/distribution.js +1 -1
  77. package/lib/constant/domain.js +1 -1
  78. package/lib/constant/env.js +1 -1
  79. package/lib/constant/output.js +1 -1
  80. package/lib/constant/product.js +1 -1
  81. package/lib/constant/risk.js +1 -1
  82. package/lib/constant/url.js +1 -1
  83. package/lib/context.js +1 -1
  84. package/lib/core/api-client.d.ts +2 -0
  85. package/lib/core/api-client.js +1 -1
  86. package/lib/core/db-resolver.js +1 -1
  87. package/lib/core/sdk-client.js +1 -1
  88. package/lib/errors.js +1 -1
  89. package/lib/framework/build-all-flags.js +1 -1
  90. package/lib/framework/dryrun.js +1 -1
  91. package/lib/framework/flags.js +1 -1
  92. package/lib/framework/help.js +1 -1
  93. package/lib/framework/index.js +1 -1
  94. package/lib/framework/output.js +1 -1
  95. package/lib/framework/preparse.js +1 -1
  96. package/lib/framework/rate-limit.js +1 -1
  97. package/lib/framework/raw-flags.js +1 -1
  98. package/lib/framework/response.js +1 -1
  99. package/lib/framework/runner-confirmation.js +1 -1
  100. package/lib/framework/runner-error.js +1 -1
  101. package/lib/framework/runner.js +1 -1
  102. package/lib/framework/schema-export.js +1 -1
  103. package/lib/framework/service-order.js +1 -1
  104. package/lib/framework/types.js +1 -1
  105. package/lib/generated/build-info.d.ts +4 -4
  106. package/lib/generated/build-info.js +1 -1
  107. package/lib/help.js +1 -1
  108. package/lib/postinstall.js +1 -1
  109. package/lib/runtime/confirmation.js +1 -1
  110. package/lib/runtime/event.js +1 -1
  111. package/lib/runtime/index.js +1 -1
  112. package/lib/runtime/queue.js +1 -1
  113. package/lib/runtime/resolve.js +1 -1
  114. package/lib/skills/builtin-skill.js +1 -1
  115. package/lib/skills/npx-skills-add.js +1 -1
  116. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  117. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  118. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  119. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  120. package/lib/skills/runtime-skill-sync/links.js +1 -1
  121. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  122. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  123. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  124. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  125. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  126. package/lib/skills/runtime-skill-sync/push.js +1 -1
  127. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  128. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  129. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  130. package/lib/skills/runtime-skill-sync.js +1 -1
  131. package/lib/skills/skill-presence.js +1 -1
  132. package/lib/utils/apply-jq-filter.js +1 -1
  133. package/lib/utils/logger.js +1 -1
  134. package/lib/utils/lossless-json.js +1 -1
  135. package/lib/utils/params.js +1 -1
  136. package/lib/utils/platform.js +1 -1
  137. package/lib/utils/update-notice.js +1 -1
  138. package/lib/utils/version.js +1 -1
  139. package/lib/utils/write-cli-side-channel.js +1 -1
  140. package/package.json +1 -1
  141. package/skills/lovrabet/SKILL.md +7 -3
  142. package/skills/lovrabet/guides/sql-and-bff-workflow.md +5 -0
  143. package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +1 -1
  144. package/skills/lovrabet/references/lovrabet-service-tree.md +2 -0
  145. package/skills/lovrabet/references/lovrabet-sql-workflow.md +4 -1
  146. package/skills/lovrabet/references/lovrabet-user-account.md +46 -0
  147. package/skills/lovrabet.manifest.json +4 -3
@@ -1 +1 @@
1
- (function(_0xa3c132,_0x2843f1){const _0x2c012b=a114_0xcbe2,_0xf4a540=_0xa3c132();while(!![]){try{const _0x45e0fe=-parseInt(_0x2c012b(0xc3))/0x1+parseInt(_0x2c012b(0xe0))/0x2+parseInt(_0x2c012b(0xd9))/0x3+-parseInt(_0x2c012b(0xbe))/0x4+-parseInt(_0x2c012b(0xdc))/0x5+-parseInt(_0x2c012b(0xd5))/0x6*(-parseInt(_0x2c012b(0xd0))/0x7)+parseInt(_0x2c012b(0xc1))/0x8*(parseInt(_0x2c012b(0xda))/0x9);if(_0x45e0fe===_0x2843f1)break;else _0xf4a540['push'](_0xf4a540['shift']());}catch(_0x50616d){_0xf4a540['push'](_0xf4a540['shift']());}}}(a114_0x3b27,0x95c23));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a114_0x3b27(){const _0x2576a3=['linkedPaths','name','metadataPath','cache','957508sdGKaT','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','project','8ZQSnAr','local','479500xFuzaJ','set','push','localeCompare','code','isSymbolicLink','get','trim','appCode','sort','\x20!=\x20','dir','skillMdPath','411131trfXZJ','linkedPath','filter','env','source','42HKRCZf','validation','scope','tags','2263449NparsS','521793aFbTSV','scopes','4467810CGbfCl','startsWith','skillRoots','map','2004518vCOpRU','isArray','from','skillCode','has','isDirectory'];a114_0x3b27=function(){return _0x2576a3;};return a114_0x3b27();}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x46a938,_0x25d192,_0x20e3a9={}){const _0x49c3ab=a114_0xcbe2,_0x342faf=safePathSegment(_0x46a938['appCode'],'appCode');if(_0x25d192[_0x49c3ab(0xcb)]!==_0x342faf)throw CliErrors[_0x49c3ab(0xd6)](_0x49c3ab(0xbf)+_0x25d192[_0x49c3ab(0xcb)]+_0x49c3ab(0xcd)+_0x342faf);const _0xa47173=normalizeRuntimeSkillScopes(_0x46a938[_0x49c3ab(0xdb)]),_0x56f1ac=new Set(_0xa47173),_0x44acc4=_0x46a938[_0x49c3ab(0xc7)]?.[_0x49c3ab(0xca)](),_0x62ae0d=new Map(),_0x480d03=resolve(getRuntimeSkillCacheRoot(_0x46a938[_0x49c3ab(0xd3)],_0x46a938['accessKey'],_0x20e3a9),_0x342faf);for(const _0x5b8915 of _0xa47173){for(const _0x4c1b9b of localSkillEntryDirs(resolve(_0x480d03,_0x5b8915))){collectLocalRuntimeSkill(_0x62ae0d,_0x4c1b9b,{'appCode':_0x342faf,'scopes':_0x56f1ac,'code':_0x44acc4,'source':_0x49c3ab(0xbd)});}}for(const _0x1d4911 of _0x25d192[_0x49c3ab(0xde)]){for(const _0x877374 of localSkillLinkCandidates(_0x1d4911,_0x25d192,_0x56f1ac)){collectLocalRuntimeSkill(_0x62ae0d,_0x877374,{'appCode':_0x342faf,'scopes':_0x56f1ac,'code':_0x44acc4,'source':'link','linkedPath':_0x877374});}}return Array[_0x49c3ab(0xe2)](_0x62ae0d['values']())[_0x49c3ab(0xcc)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xcc4e4b){const _0x105d64=a114_0xcbe2;if(!existsSync(_0xcc4e4b))return[];return readdirSync(_0xcc4e4b,{'withFileTypes':!![]})[_0x105d64(0xd2)](_0x4c810a=>_0x4c810a['isDirectory']()||_0x4c810a[_0x105d64(0xc8)]())[_0x105d64(0xdf)](_0x2333f3=>resolve(_0xcc4e4b,_0x2333f3[_0x105d64(0xe7)]));}function localSkillLinkCandidates(_0x9e2e8e,_0x2a2bdc,_0x43296b){const _0x504f85=a114_0xcbe2;if(!existsSync(_0x9e2e8e))return[];const _0x3cfb3c=_0x2a2bdc[_0x504f85(0xcb)]+'--';return readdirSync(_0x9e2e8e,{'withFileTypes':!![]})[_0x504f85(0xd2)](_0x4b5c43=>_0x4b5c43[_0x504f85(0xe5)]()||_0x4b5c43['isSymbolicLink']())[_0x504f85(0xd2)](_0x277f0e=>_0x2a2bdc[_0x504f85(0xd7)]===_0x504f85(0xc0)||_0x277f0e[_0x504f85(0xe7)][_0x504f85(0xdd)](_0x3cfb3c)||_0x43296b[_0x504f85(0xe4)]('builtin'))[_0x504f85(0xdf)](_0x4f5dea=>resolve(_0x9e2e8e,_0x4f5dea[_0x504f85(0xe7)]));}function collectLocalRuntimeSkill(_0x1ba83d,_0x4b5395,_0x5881d4){const _0x4c0d85=a114_0xcbe2,_0x455dd4=resolve(_0x4b5395,METADATA_FILE),_0xeb97ed=readMetadataIfPresent(_0x455dd4);if(!_0xeb97ed)return;if(_0xeb97ed[_0x4c0d85(0xcb)]!==_0x5881d4[_0x4c0d85(0xcb)])return;if(!isRuntimeSkillScope(_0xeb97ed['scope'])||!_0x5881d4[_0x4c0d85(0xdb)][_0x4c0d85(0xe4)](_0xeb97ed[_0x4c0d85(0xd7)]))return;const _0xd463de=_0xeb97ed[_0x4c0d85(0xe3)]?.[_0x4c0d85(0xca)]();if(!_0xd463de)return;if(_0x5881d4[_0x4c0d85(0xc7)]&&_0xd463de!==_0x5881d4[_0x4c0d85(0xc7)])return;const _0x2acea5=_0xeb97ed['scope']+':'+_0xd463de,_0x99e11=_0x5881d4[_0x4c0d85(0xd1)]?[_0x5881d4[_0x4c0d85(0xd1)]]:[],_0x132d27=_0x1ba83d[_0x4c0d85(0xc9)](_0x2acea5);if(_0x132d27){_0x5881d4[_0x4c0d85(0xd4)]==='cache'&&(_0x132d27['dir']=_0x4b5395,_0x132d27['cacheDir']=_0x4b5395,_0x132d27[_0x4c0d85(0xcf)]=resolve(_0x4b5395,SKILL_FILE),_0x132d27[_0x4c0d85(0xe8)]=_0x455dd4);for(const _0x1e7d51 of _0x99e11){!_0x132d27[_0x4c0d85(0xe6)]['includes'](_0x1e7d51)&&_0x132d27[_0x4c0d85(0xe6)][_0x4c0d85(0xc5)](_0x1e7d51);}_0x132d27[_0x4c0d85(0xe6)]['sort']();return;}_0x1ba83d[_0x4c0d85(0xc4)](_0x2acea5,{..._0xeb97ed,'tags':Array[_0x4c0d85(0xe1)](_0xeb97ed[_0x4c0d85(0xd8)])?_0xeb97ed['tags']:[],'scope':_0xeb97ed[_0x4c0d85(0xd7)],'source':_0x4c0d85(0xc2),'dir':_0x4b5395,'cacheDir':_0x5881d4[_0x4c0d85(0xd4)]===_0x4c0d85(0xbd)?_0x4b5395:undefined,'skillMdPath':resolve(_0x4b5395,SKILL_FILE),'metadataPath':_0x455dd4,'linkedPaths':_0x99e11});}function a114_0xcbe2(_0x27d63d,_0x33de41){_0x27d63d=_0x27d63d-0xbd;const _0x3b277c=a114_0x3b27();let _0xcbe208=_0x3b277c[_0x27d63d];return _0xcbe208;}function compareLocalRuntimeSkills(_0x169cd1,_0x2e43d3){const _0x4d9e00=a114_0xcbe2,_0x24533a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x24533a[_0x169cd1[_0x4d9e00(0xd7)]]-_0x24533a[_0x2e43d3[_0x4d9e00(0xd7)]]||_0x169cd1[_0x4d9e00(0xe3)][_0x4d9e00(0xc6)](_0x2e43d3[_0x4d9e00(0xe3)])||_0x169cd1[_0x4d9e00(0xce)][_0x4d9e00(0xc6)](_0x2e43d3[_0x4d9e00(0xce)]);}
1
+ (function(_0x54fc8a,_0x493084){const _0x3db538=a116_0x1da5,_0x4d2c2b=_0x54fc8a();while(!![]){try{const _0x17b542=-parseInt(_0x3db538(0xae))/0x1*(-parseInt(_0x3db538(0xa8))/0x2)+parseInt(_0x3db538(0x9e))/0x3+parseInt(_0x3db538(0xb0))/0x4+-parseInt(_0x3db538(0xa2))/0x5*(parseInt(_0x3db538(0xbf))/0x6)+parseInt(_0x3db538(0xba))/0x7*(-parseInt(_0x3db538(0x9f))/0x8)+parseInt(_0x3db538(0xa5))/0x9+-parseInt(_0x3db538(0xc4))/0xa;if(_0x17b542===_0x493084)break;else _0x4d2c2b['push'](_0x4d2c2b['shift']());}catch(_0x348fb1){_0x4d2c2b['push'](_0x4d2c2b['shift']());}}}(a116_0x58be,0x4fe2a));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';function a116_0x1da5(_0x3a2fce,_0x405eab){_0x3a2fce=_0x3a2fce-0x9e;const _0x58be21=a116_0x58be();let _0x1da5b4=_0x58be21[_0x3a2fce];return _0x1da5b4;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x401697,_0x1a5eb2,_0x1bdb43={}){const _0x18c6e6=a116_0x1da5,_0x43ad4e=safePathSegment(_0x401697[_0x18c6e6(0xb4)],_0x18c6e6(0xb4));if(_0x1a5eb2[_0x18c6e6(0xb4)]!==_0x43ad4e)throw CliErrors[_0x18c6e6(0xc7)](_0x18c6e6(0xb1)+_0x1a5eb2[_0x18c6e6(0xb4)]+_0x18c6e6(0xbd)+_0x43ad4e);const _0x431964=normalizeRuntimeSkillScopes(_0x401697[_0x18c6e6(0xb5)]),_0x1550a8=new Set(_0x431964),_0x4361c7=_0x401697[_0x18c6e6(0xac)]?.[_0x18c6e6(0xbb)](),_0x11eaa4=new Map(),_0x4213fb=resolve(getRuntimeSkillCacheRoot(_0x401697[_0x18c6e6(0xaf)],_0x401697['accessKey'],_0x1bdb43),_0x43ad4e);for(const _0x5d5dbc of _0x431964){for(const _0x227fd5 of localSkillEntryDirs(resolve(_0x4213fb,_0x5d5dbc))){collectLocalRuntimeSkill(_0x11eaa4,_0x227fd5,{'appCode':_0x43ad4e,'scopes':_0x1550a8,'code':_0x4361c7,'source':_0x18c6e6(0xa7)});}}for(const _0x2acca3 of _0x1a5eb2[_0x18c6e6(0xa9)]){for(const _0x3ed4a5 of localSkillLinkCandidates(_0x2acca3,_0x1a5eb2,_0x1550a8)){collectLocalRuntimeSkill(_0x11eaa4,_0x3ed4a5,{'appCode':_0x43ad4e,'scopes':_0x1550a8,'code':_0x4361c7,'source':'link','linkedPath':_0x3ed4a5});}}return Array['from'](_0x11eaa4['values']())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x86d3ea){const _0x546d99=a116_0x1da5;if(!existsSync(_0x86d3ea))return[];return readdirSync(_0x86d3ea,{'withFileTypes':!![]})[_0x546d99(0xaa)](_0x14964b=>_0x14964b[_0x546d99(0xa0)]()||_0x14964b[_0x546d99(0xc0)]())['map'](_0xf11138=>resolve(_0x86d3ea,_0xf11138[_0x546d99(0xc6)]));}function localSkillLinkCandidates(_0x12ea11,_0x42937d,_0x5d9269){const _0x30b59a=a116_0x1da5;if(!existsSync(_0x12ea11))return[];const _0x34bfb7=_0x42937d[_0x30b59a(0xb4)]+'--';return readdirSync(_0x12ea11,{'withFileTypes':!![]})['filter'](_0x49d8e9=>_0x49d8e9[_0x30b59a(0xa0)]()||_0x49d8e9[_0x30b59a(0xc0)]())[_0x30b59a(0xaa)](_0x39aa70=>_0x42937d[_0x30b59a(0xa4)]===_0x30b59a(0xc5)||_0x39aa70[_0x30b59a(0xc6)][_0x30b59a(0xb8)](_0x34bfb7)||_0x5d9269[_0x30b59a(0xc8)](_0x30b59a(0xa6)))['map'](_0x441717=>resolve(_0x12ea11,_0x441717[_0x30b59a(0xc6)]));}function a116_0x58be(){const _0x46605b=['636782WuZcem','skillRoots','filter','metadataPath','code','tags','1LZPnmc','env','775028bohbee','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','linkedPaths','skillCode','appCode','scopes','sort','isArray','startsWith','source','7TkQIrx','trim','includes','\x20!=\x20','local','156IaYMfO','isSymbolicLink','get','dir','localeCompare','2414990IdJYmC','project','name','validation','has','479274sfnVUm','907112cDOVTs','isDirectory','push','17745iCHWwQ','linkedPath','scope','922194KFHYMU','builtin','cache'];a116_0x58be=function(){return _0x46605b;};return a116_0x58be();}function collectLocalRuntimeSkill(_0x100d5e,_0x145f07,_0xf29f04){const _0x2702e6=a116_0x1da5,_0x19c207=resolve(_0x145f07,METADATA_FILE),_0xb0325e=readMetadataIfPresent(_0x19c207);if(!_0xb0325e)return;if(_0xb0325e[_0x2702e6(0xb4)]!==_0xf29f04['appCode'])return;if(!isRuntimeSkillScope(_0xb0325e[_0x2702e6(0xa4)])||!_0xf29f04[_0x2702e6(0xb5)][_0x2702e6(0xc8)](_0xb0325e['scope']))return;const _0x4c18be=_0xb0325e[_0x2702e6(0xb3)]?.['trim']();if(!_0x4c18be)return;if(_0xf29f04[_0x2702e6(0xac)]&&_0x4c18be!==_0xf29f04['code'])return;const _0x361def=_0xb0325e[_0x2702e6(0xa4)]+':'+_0x4c18be,_0x1d7550=_0xf29f04[_0x2702e6(0xa3)]?[_0xf29f04[_0x2702e6(0xa3)]]:[],_0x313e74=_0x100d5e[_0x2702e6(0xc1)](_0x361def);if(_0x313e74){_0xf29f04[_0x2702e6(0xb9)]==='cache'&&(_0x313e74[_0x2702e6(0xc2)]=_0x145f07,_0x313e74['cacheDir']=_0x145f07,_0x313e74['skillMdPath']=resolve(_0x145f07,SKILL_FILE),_0x313e74[_0x2702e6(0xab)]=_0x19c207);for(const _0x49844e of _0x1d7550){!_0x313e74[_0x2702e6(0xb2)][_0x2702e6(0xbc)](_0x49844e)&&_0x313e74[_0x2702e6(0xb2)][_0x2702e6(0xa1)](_0x49844e);}_0x313e74[_0x2702e6(0xb2)][_0x2702e6(0xb6)]();return;}_0x100d5e['set'](_0x361def,{..._0xb0325e,'tags':Array[_0x2702e6(0xb7)](_0xb0325e[_0x2702e6(0xad)])?_0xb0325e[_0x2702e6(0xad)]:[],'scope':_0xb0325e[_0x2702e6(0xa4)],'source':_0x2702e6(0xbe),'dir':_0x145f07,'cacheDir':_0xf29f04[_0x2702e6(0xb9)]===_0x2702e6(0xa7)?_0x145f07:undefined,'skillMdPath':resolve(_0x145f07,SKILL_FILE),'metadataPath':_0x19c207,'linkedPaths':_0x1d7550});}function compareLocalRuntimeSkills(_0x534a9e,_0x29227f){const _0x2d2830=a116_0x1da5,_0x1fb354={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1fb354[_0x534a9e[_0x2d2830(0xa4)]]-_0x1fb354[_0x29227f['scope']]||_0x534a9e[_0x2d2830(0xb3)][_0x2d2830(0xc3)](_0x29227f[_0x2d2830(0xb3)])||_0x534a9e[_0x2d2830(0xc2)][_0x2d2830(0xc3)](_0x29227f['dir']);}
@@ -1 +1 @@
1
- (function(_0x444630,_0x3ade40){const _0x455bd5=a115_0x2daf,_0x44f08d=_0x444630();while(!![]){try{const _0x3fd1a9=parseInt(_0x455bd5(0x1e2))/0x1+-parseInt(_0x455bd5(0x1ea))/0x2+-parseInt(_0x455bd5(0x1ff))/0x3+parseInt(_0x455bd5(0x1f7))/0x4+-parseInt(_0x455bd5(0x1f3))/0x5*(parseInt(_0x455bd5(0x1eb))/0x6)+parseInt(_0x455bd5(0x20e))/0x7+-parseInt(_0x455bd5(0x202))/0x8;if(_0x3fd1a9===_0x3ade40)break;else _0x44f08d['push'](_0x44f08d['shift']());}catch(_0x5afadf){_0x44f08d['push'](_0x44f08d['shift']());}}}(a115_0x42cc,0x8e14a));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a115_0x2daf(_0x5c0889,_0x32c973){_0x5c0889=_0x5c0889-0x1e2;const _0x42cc91=a115_0x42cc();let _0x2daf82=_0x42cc91[_0x5c0889];return _0x2daf82;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x335f87){const _0x17cdfe=a115_0x2daf;return _0x335f87[_0x17cdfe(0x1fa)]??Buffer[_0x17cdfe(0x1f4)](_0x335f87[_0x17cdfe(0x1ee)]??'',_0x17cdfe(0x205));}export function fileText(_0x343f4c){const _0x4a71e1=a115_0x2daf;return fileContent(_0x343f4c)[_0x4a71e1(0x1e5)](_0x4a71e1(0x205));}export function normalizeLocalFiles(_0x3ff328){const _0x5c6e35=a115_0x2daf;if(!Array[_0x5c6e35(0x1f8)](_0x3ff328)||_0x3ff328[_0x5c6e35(0x1f0)]===0x0)return[];const _0x3c5620=new Map();for(const _0x116915 of _0x3ff328){if(!_0x116915||typeof _0x116915!=='object'||typeof _0x116915['path']!==_0x5c6e35(0x1ef))throw CliErrors[_0x5c6e35(0x20b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x207718=normalizeSkillRelativePath(_0x116915[_0x5c6e35(0x200)]);if(_0x3c5620[_0x5c6e35(0x1e8)](_0x207718))throw CliErrors['validation'](_0x5c6e35(0x204)+_0x207718);if(_0x116915[_0x5c6e35(0x1fa)]!==undefined&&!Buffer[_0x5c6e35(0x1f1)](_0x116915[_0x5c6e35(0x1fa)]))throw CliErrors[_0x5c6e35(0x20b)](_0x5c6e35(0x203)+_0x207718);if(_0x116915[_0x5c6e35(0x1fa)]===undefined&&typeof _0x116915[_0x5c6e35(0x1ee)]!==_0x5c6e35(0x1ef))throw CliErrors[_0x5c6e35(0x20b)](_0x5c6e35(0x1e6)+_0x207718);const _0x9712bf=fileContent(_0x116915);_0x3c5620[_0x5c6e35(0x20d)](_0x207718,{'path':_0x207718,'bytes':_0x9712bf});}return Array[_0x5c6e35(0x1f4)](_0x3c5620[_0x5c6e35(0x206)]())['sort'](compareSkillFiles);}function a115_0x42cc(){const _0x52323f=['584784GUUXcP','6Ftxmlq','add','isSymbolicLink','content','string','length','isBuffer','object','232550sLJYEb','from','sha256','startsWith','4592752JMVVzf','isArray','compare','bytes','isFile','localeCompare','size','Unsafe\x20Skill\x20file\x20path:\x20','3236940TWyNKD','path','isDirectory','4796376dJScAx','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Duplicate\x20Skill\x20file\x20path:\x20','utf8','values','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','name','replace','Skill\x20file\x20size\x20is\x20invalid:\x20','validation','includes','set','5565245mntOyd','excludedFilePaths','656168PFUKly','toLowerCase','test','toString','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','has','isSafeInteger'];a115_0x42cc=function(){return _0x52323f;};return a115_0x42cc();}export function normalizeManifestFiles(_0x34f44b){const _0xd05023=a115_0x2daf;if(!Array[_0xd05023(0x1f8)](_0x34f44b)||_0x34f44b[_0xd05023(0x1f0)]===0x0)return[];const _0x22b9fe=new Map();for(const _0x20b124 of _0x34f44b){if(!_0x20b124||typeof _0x20b124!==_0xd05023(0x1f2)||typeof _0x20b124[_0xd05023(0x200)]!=='string')throw CliErrors[_0xd05023(0x20b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1e8e70=normalizeSkillRelativePath(_0x20b124[_0xd05023(0x200)]);if(_0x22b9fe[_0xd05023(0x1e8)](_0x1e8e70))throw CliErrors[_0xd05023(0x20b)](_0xd05023(0x204)+_0x1e8e70);if(!isSha256Hex(_0x20b124[_0xd05023(0x1f5)]))throw CliErrors['validation'](_0xd05023(0x1e7)+_0x1e8e70);if(!Number[_0xd05023(0x1e9)](_0x20b124[_0xd05023(0x1fd)])||_0x20b124[_0xd05023(0x1fd)]<0x0)throw CliErrors[_0xd05023(0x20b)](_0xd05023(0x20a)+_0x1e8e70);_0x22b9fe['set'](_0x1e8e70,{'path':_0x1e8e70,'sha256':_0x20b124[_0xd05023(0x1f5)][_0xd05023(0x1e3)](),'size':_0x20b124[_0xd05023(0x1fd)]});}return Array['from'](_0x22b9fe['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x5aa2a7,_0x56c068={}){const _0x4b1afa=a115_0x2daf,_0x310786=realpathSync(_0x5aa2a7),_0x125399=canonicalExcludedFilePaths(_0x56c068[_0x4b1afa(0x20f)]),_0x3f72d1=[];function _0x5057f6(_0x1ed2ce){const _0x5179b4=_0x4b1afa,_0x2d291e=readdirSync(_0x1ed2ce,{'withFileTypes':!![]})['sort']((_0x4944c8,_0x32f1d2)=>_0x4944c8[_0x5179b4(0x208)][_0x5179b4(0x1fc)](_0x32f1d2['name']));for(const _0x2c3459 of _0x2d291e){if(_0x2c3459[_0x5179b4(0x201)]()&&IGNORED_DIR_NAMES['has'](_0x2c3459['name']))continue;if(IGNORED_FILE_NAMES['has'](_0x2c3459[_0x5179b4(0x208)]))continue;const _0x41145a=resolve(_0x1ed2ce,_0x2c3459[_0x5179b4(0x208)]);if(isExcludedFilePath(_0x41145a,_0x125399))continue;if(_0x2c3459[_0x5179b4(0x1ed)]())throw CliErrors[_0x5179b4(0x20b)](_0x5179b4(0x207)+_0x41145a);const _0x404519=toPosixPath(relative(_0x310786,_0x41145a));if(_0x2c3459[_0x5179b4(0x201)]()){_0x5057f6(_0x41145a);continue;}if(!_0x2c3459[_0x5179b4(0x1fb)]())continue;validateSkillRelativePath(_0x404519);const _0x29b635=readFileSync(_0x41145a);_0x3f72d1['push']({'path':_0x404519,'bytes':_0x29b635});}}return _0x5057f6(_0x310786),normalizeLocalFiles(_0x3f72d1);}function canonicalExcludedFilePaths(_0x366ed7){const _0x1d410e=a115_0x2daf,_0x86cba3=new Set();for(const _0x3910e9 of _0x366ed7??[]){const _0x2e15dd=resolve(_0x3910e9);_0x86cba3[_0x1d410e(0x1ec)](_0x2e15dd);try{_0x86cba3['add'](realpathSync(_0x2e15dd));}catch{}}return _0x86cba3;}function isExcludedFilePath(_0x5463a5,_0x45422e){const _0x5f0f49=a115_0x2daf;if(_0x45422e[_0x5f0f49(0x1e8)](_0x5463a5))return!![];if(_0x45422e[_0x5f0f49(0x1fd)]===0x0)return![];try{return _0x45422e['has'](realpathSync(_0x5463a5));}catch{return![];}}export function compareSkillFiles(_0x21b36f,_0x375b27){const _0x182105=a115_0x2daf;if(_0x21b36f[_0x182105(0x200)]===SKILL_FILE)return _0x375b27[_0x182105(0x200)]===SKILL_FILE?0x0:-0x1;if(_0x375b27[_0x182105(0x200)]===SKILL_FILE)return 0x1;return Buffer[_0x182105(0x1f9)](Buffer['from'](_0x21b36f[_0x182105(0x200)],_0x182105(0x205)),Buffer[_0x182105(0x1f4)](_0x375b27[_0x182105(0x200)],_0x182105(0x205)));}export function normalizeSkillRelativePath(_0xd4628c){const _0x7bae99=toPosixPath(_0xd4628c['trim']());return validateSkillRelativePath(_0x7bae99),_0x7bae99;}export function validateSkillRelativePath(_0x3cd839){const _0x9f883a=a115_0x2daf;if(!_0x3cd839||_0x3cd839[_0x9f883a(0x1f6)]('/')||_0x3cd839[_0x9f883a(0x20c)]('//'))throw CliErrors[_0x9f883a(0x20b)](_0x9f883a(0x1fe)+_0x3cd839);for(const _0x59a82a of _0x3cd839['split']('/')){if(!_0x59a82a||_0x59a82a==='.'||_0x59a82a==='..')throw CliErrors[_0x9f883a(0x20b)](_0x9f883a(0x1fe)+_0x3cd839);}}export function toPosixPath(_0x15122e){const _0x5443c5=a115_0x2daf;return _0x15122e[_0x5443c5(0x209)](/\\/g,'/');}export function isSha256Hex(_0x4de136){const _0x434dbc=a115_0x2daf;return typeof _0x4de136===_0x434dbc(0x1ef)&&/^[a-fA-F0-9]{64}$/[_0x434dbc(0x1e4)](_0x4de136);}
1
+ (function(_0x2d3773,_0x5d471e){const _0x43ee08=a117_0x342a,_0x5061aa=_0x2d3773();while(!![]){try{const _0x3dc6f1=-parseInt(_0x43ee08(0xd1))/0x1*(parseInt(_0x43ee08(0xaf))/0x2)+parseInt(_0x43ee08(0xab))/0x3*(-parseInt(_0x43ee08(0xad))/0x4)+-parseInt(_0x43ee08(0xc6))/0x5+-parseInt(_0x43ee08(0xb9))/0x6*(parseInt(_0x43ee08(0xb8))/0x7)+-parseInt(_0x43ee08(0xb1))/0x8+parseInt(_0x43ee08(0xb6))/0x9*(parseInt(_0x43ee08(0xb2))/0xa)+-parseInt(_0x43ee08(0xcb))/0xb*(-parseInt(_0x43ee08(0xbe))/0xc);if(_0x3dc6f1===_0x5d471e)break;else _0x5061aa['push'](_0x5061aa['shift']());}catch(_0x23ff14){_0x5061aa['push'](_0x5061aa['shift']());}}}(a117_0x46c5,0x71487));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(_0x32aadf){const _0x1a8346=a117_0x342a;return _0x32aadf['bytes']??Buffer[_0x1a8346(0xd3)](_0x32aadf[_0x1a8346(0xc1)]??'',_0x1a8346(0xb3));}export function fileText(_0x5cfa84){const _0x4cc310=a117_0x342a;return fileContent(_0x5cfa84)['toString'](_0x4cc310(0xb3));}function a117_0x46c5(){const _0x18e03f=['5151350WmdCkS','utf8','name','localeCompare','9gyhejB','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','44429oemnGx','78ahAPwT','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Unsafe\x20Skill\x20file\x20path:\x20','string','length','129984GbxqjD','size','path','content','includes','startsWith','values','bytes','2626520wktBsE','has','isDirectory','isSafeInteger','object','1496RtEofG','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20file\x20size\x20is\x20invalid:\x20','excludedFilePaths','replace','test','15373PtQtvy','set','from','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','add','sort','sha256','Duplicate\x20Skill\x20file\x20path:\x20','6lduLpC','isArray','515028LgesYH','split','42XXbPsj','validation','2688944CBBQPA'];a117_0x46c5=function(){return _0x18e03f;};return a117_0x46c5();}export function normalizeLocalFiles(_0x19f098){const _0x4933e8=a117_0x342a;if(!Array[_0x4933e8(0xac)](_0x19f098)||_0x19f098['length']===0x0)return[];const _0x540b9e=new Map();for(const _0x4e1067 of _0x19f098){if(!_0x4e1067||typeof _0x4e1067!=='object'||typeof _0x4e1067[_0x4933e8(0xc0)]!==_0x4933e8(0xbc))throw CliErrors[_0x4933e8(0xb0)](_0x4933e8(0xcc));const _0x45a806=normalizeSkillRelativePath(_0x4e1067[_0x4933e8(0xc0)]);if(_0x540b9e[_0x4933e8(0xc7)](_0x45a806))throw CliErrors[_0x4933e8(0xb0)](_0x4933e8(0xaa)+_0x45a806);if(_0x4e1067[_0x4933e8(0xc5)]!==undefined&&!Buffer['isBuffer'](_0x4e1067['bytes']))throw CliErrors[_0x4933e8(0xb0)](_0x4933e8(0xb7)+_0x45a806);if(_0x4e1067[_0x4933e8(0xc5)]===undefined&&typeof _0x4e1067[_0x4933e8(0xc1)]!==_0x4933e8(0xbc))throw CliErrors[_0x4933e8(0xb0)](_0x4933e8(0xba)+_0x45a806);const _0x124a8a=fileContent(_0x4e1067);_0x540b9e['set'](_0x45a806,{'path':_0x45a806,'bytes':_0x124a8a});}return Array[_0x4933e8(0xd3)](_0x540b9e[_0x4933e8(0xc4)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x517815){const _0x1d0d68=a117_0x342a;if(!Array['isArray'](_0x517815)||_0x517815[_0x1d0d68(0xbd)]===0x0)return[];const _0x9d740a=new Map();for(const _0x28a0b8 of _0x517815){if(!_0x28a0b8||typeof _0x28a0b8!==_0x1d0d68(0xca)||typeof _0x28a0b8[_0x1d0d68(0xc0)]!==_0x1d0d68(0xbc))throw CliErrors[_0x1d0d68(0xb0)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x252a14=normalizeSkillRelativePath(_0x28a0b8[_0x1d0d68(0xc0)]);if(_0x9d740a[_0x1d0d68(0xc7)](_0x252a14))throw CliErrors[_0x1d0d68(0xb0)](_0x1d0d68(0xaa)+_0x252a14);if(!isSha256Hex(_0x28a0b8['sha256']))throw CliErrors[_0x1d0d68(0xb0)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x252a14);if(!Number[_0x1d0d68(0xc9)](_0x28a0b8[_0x1d0d68(0xbf)])||_0x28a0b8[_0x1d0d68(0xbf)]<0x0)throw CliErrors[_0x1d0d68(0xb0)](_0x1d0d68(0xcd)+_0x252a14);_0x9d740a[_0x1d0d68(0xd2)](_0x252a14,{'path':_0x252a14,'sha256':_0x28a0b8[_0x1d0d68(0xa9)]['toLowerCase'](),'size':_0x28a0b8[_0x1d0d68(0xbf)]});}return Array['from'](_0x9d740a[_0x1d0d68(0xc4)]())[_0x1d0d68(0xd6)](compareSkillFiles);}export function scanSkillDirectory(_0x2d51e4,_0x22507f={}){const _0x307ddb=a117_0x342a,_0xbbf345=realpathSync(_0x2d51e4),_0x3a1932=canonicalExcludedFilePaths(_0x22507f[_0x307ddb(0xce)]),_0x21f42b=[];function _0x122be1(_0x47ffb9){const _0x230997=_0x307ddb,_0x572914=readdirSync(_0x47ffb9,{'withFileTypes':!![]})[_0x230997(0xd6)]((_0x20b902,_0x246476)=>_0x20b902[_0x230997(0xb4)][_0x230997(0xb5)](_0x246476[_0x230997(0xb4)]));for(const _0x32975b of _0x572914){if(_0x32975b[_0x230997(0xc8)]()&&IGNORED_DIR_NAMES[_0x230997(0xc7)](_0x32975b['name']))continue;if(IGNORED_FILE_NAMES[_0x230997(0xc7)](_0x32975b['name']))continue;const _0x2f5feb=resolve(_0x47ffb9,_0x32975b[_0x230997(0xb4)]);if(isExcludedFilePath(_0x2f5feb,_0x3a1932))continue;if(_0x32975b['isSymbolicLink']())throw CliErrors[_0x230997(0xb0)](_0x230997(0xd4)+_0x2f5feb);const _0x2a86a0=toPosixPath(relative(_0xbbf345,_0x2f5feb));if(_0x32975b[_0x230997(0xc8)]()){_0x122be1(_0x2f5feb);continue;}if(!_0x32975b['isFile']())continue;validateSkillRelativePath(_0x2a86a0);const _0x315e07=readFileSync(_0x2f5feb);_0x21f42b['push']({'path':_0x2a86a0,'bytes':_0x315e07});}}return _0x122be1(_0xbbf345),normalizeLocalFiles(_0x21f42b);}function canonicalExcludedFilePaths(_0x3554ed){const _0x325e7a=a117_0x342a,_0x201f63=new Set();for(const _0x2ecd96 of _0x3554ed??[]){const _0x454046=resolve(_0x2ecd96);_0x201f63['add'](_0x454046);try{_0x201f63[_0x325e7a(0xd5)](realpathSync(_0x454046));}catch{}}return _0x201f63;}function a117_0x342a(_0x3f88cc,_0x5893b6){_0x3f88cc=_0x3f88cc-0xa9;const _0x46c5cf=a117_0x46c5();let _0x342a66=_0x46c5cf[_0x3f88cc];return _0x342a66;}function isExcludedFilePath(_0x525788,_0x184a47){const _0x108c1b=a117_0x342a;if(_0x184a47[_0x108c1b(0xc7)](_0x525788))return!![];if(_0x184a47[_0x108c1b(0xbf)]===0x0)return![];try{return _0x184a47[_0x108c1b(0xc7)](realpathSync(_0x525788));}catch{return![];}}export function compareSkillFiles(_0x21d26a,_0x4212fb){const _0x53f33b=a117_0x342a;if(_0x21d26a[_0x53f33b(0xc0)]===SKILL_FILE)return _0x4212fb[_0x53f33b(0xc0)]===SKILL_FILE?0x0:-0x1;if(_0x4212fb[_0x53f33b(0xc0)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x53f33b(0xd3)](_0x21d26a['path'],_0x53f33b(0xb3)),Buffer['from'](_0x4212fb[_0x53f33b(0xc0)],_0x53f33b(0xb3)));}export function normalizeSkillRelativePath(_0x2091eb){const _0x376316=toPosixPath(_0x2091eb['trim']());return validateSkillRelativePath(_0x376316),_0x376316;}export function validateSkillRelativePath(_0x554a86){const _0x32e718=a117_0x342a;if(!_0x554a86||_0x554a86[_0x32e718(0xc3)]('/')||_0x554a86[_0x32e718(0xc2)]('//'))throw CliErrors[_0x32e718(0xb0)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x554a86);for(const _0x147e90 of _0x554a86[_0x32e718(0xae)]('/')){if(!_0x147e90||_0x147e90==='.'||_0x147e90==='..')throw CliErrors[_0x32e718(0xb0)](_0x32e718(0xbb)+_0x554a86);}}export function toPosixPath(_0x456d6b){const _0x45a6c3=a117_0x342a;return _0x456d6b[_0x45a6c3(0xcf)](/\\/g,'/');}export function isSha256Hex(_0x254b9d){const _0x5c6d59=a117_0x342a;return typeof _0x254b9d===_0x5c6d59(0xbc)&&/^[a-fA-F0-9]{64}$/[_0x5c6d59(0xd0)](_0x254b9d);}
@@ -1 +1 @@
1
- (function(_0x525300,_0x51795f){const _0x50e599=a116_0x2deb,_0x5a05a9=_0x525300();while(!![]){try{const _0x380f7d=parseInt(_0x50e599(0x16b))/0x1+-parseInt(_0x50e599(0x15d))/0x2+-parseInt(_0x50e599(0x156))/0x3*(-parseInt(_0x50e599(0x15c))/0x4)+-parseInt(_0x50e599(0x145))/0x5*(parseInt(_0x50e599(0x143))/0x6)+-parseInt(_0x50e599(0x164))/0x7*(-parseInt(_0x50e599(0x170))/0x8)+parseInt(_0x50e599(0x14a))/0x9+parseInt(_0x50e599(0x144))/0xa*(parseInt(_0x50e599(0x15b))/0xb);if(_0x380f7d===_0x51795f)break;else _0x5a05a9['push'](_0x5a05a9['shift']());}catch(_0x30e6ab){_0x5a05a9['push'](_0x5a05a9['shift']());}}}(a116_0x3ec1,0x1c6f2));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';function a116_0x3ec1(){const _0x6fa15a=['64463ysBJuz','trimEnd','path','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','errors','pulledAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','179866irkfIo','isFile','---','find','contents','24aDpvfc','paths','length','skillName','name','map','accessKey','description','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','25290zVuupe','672460CgyIBj','195PpXWMR','delete','force','utf8','packageBytes','10656vesfcl','match','flow','contentHash','keys','displayName:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','toString','Managed\x20file\x20was\x20removed\x20locally:\x20','fileHashes','validation','entries','229254uemwWo','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','has','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','replace','22prXfyy','4ZnTRaV','277472lgOzcU','trim','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','set','displayName','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','slice'];a116_0x3ec1=function(){return _0x6fa15a;};return a116_0x3ec1();}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a116_0x2deb(_0x227872,_0x396ee1){_0x227872=_0x227872-0x142;const _0x3ec1d1=a116_0x3ec1();let _0x2debd3=_0x3ec1d1[_0x227872];return _0x2debd3;}export function materializeRuntimeSkill(_0x5adf47,_0x599905,_0x25b44d){const _0x5e6e6f=a116_0x2deb,_0x588187=requireSkillCode(_0x5adf47),_0x141bce=requirePackageBytes(_0x588187,_0x25b44d[_0x5e6e6f(0x149)]),_0x31fb4c=extractDownloadedPackage(_0x141bce),_0x5e33de=_0x31fb4c[_0x5e6e6f(0x16e)](_0x5083ea=>_0x5083ea['path']===SKILL_FILE);if(!_0x5e33de)throw CliErrors[_0x5e6e6f(0x154)](_0x5e6e6f(0x150)+SKILL_FILE+':\x20'+_0x588187);const _0xdf4661=withMaterializedSkillFrontmatter(_0x31fb4c,_0x5adf47,_0x588187),_0x43d7c=_0xdf4661[_0x5e6e6f(0x16e)](_0x118aeb=>_0x118aeb[_0x5e6e6f(0x166)]===SKILL_FILE),_0x64330f=fileText(_0x43d7c),_0x58a7cf=getRuntimeSkillDir(_0x25b44d['env'],_0x25b44d[_0x5e6e6f(0x176)],_0x25b44d['appCode'],_0x599905,_0x588187,_0x25b44d[_0x5e6e6f(0x171)]),_0x479ff5=resolve(_0x58a7cf,SKILL_FILE),_0x1adaee=resolve(_0x58a7cf,METADATA_FILE),_0x3e2996=contentHash(_0x64330f),_0x1a4bb2=readMetadataIfPresent(_0x1adaee)?.[_0x5e6e6f(0x153)];ensurePulledFilesCanBeOverwritten(_0x58a7cf,_0x1adaee,_0xdf4661,_0x25b44d[_0x5e6e6f(0x147)]===!![]),mkdirSync(_0x58a7cf,{'recursive':!![],'mode':0x1c0});const _0xf89f0b=existsSync(_0x479ff5)?readFileSync(_0x479ff5,_0x5e6e6f(0x148)):undefined;return materializeFiles(_0x58a7cf,_0xdf4661),removeStaleManagedFiles(_0x58a7cf,_0x1a4bb2,_0xdf4661),writeJsonAtomic(_0x1adaee,buildMetadata(_0x5adf47,_0x599905,_0x25b44d['appCode'],_0x3e2996,_0x25b44d[_0x5e6e6f(0x169)],_0xdf4661,_0x141bce)),{'skill':_0x5adf47,'scope':_0x599905,'dir':_0x58a7cf,'skillMdPath':_0x479ff5,'metadataPath':_0x1adaee,'contentHash':_0x3e2996,'changed':_0xf89f0b!==_0x64330f};}function withMaterializedSkillFrontmatter(_0x4fb2c8,_0x19b6a0,_0x56024d){const _0xd61bcc=a116_0x2deb,_0x5e363e=skillDisplayName(_0x19b6a0,_0x56024d),_0x1bd165=_0x19b6a0[_0xd61bcc(0x177)]?.[_0xd61bcc(0x15e)]()||_0x5e363e||_0x56024d;return normalizeLocalFiles(_0x4fb2c8)[_0xd61bcc(0x175)](_0x5eb640=>{const _0x33394e=_0xd61bcc,_0x2eeeef=fileText(_0x5eb640);if(_0x5eb640[_0x33394e(0x166)]!==SKILL_FILE)return _0x5eb640;if(hasYamlFrontmatter(_0x2eeeef))return{'path':_0x5eb640['path'],'content':withSyncedDisplayName(_0x2eeeef,_0x5e363e)};return{'path':_0x5eb640[_0x33394e(0x166)],'content':prependSkillFrontmatter(_0x2eeeef,{'name':_0x56024d,'displayName':_0x5e363e,'description':_0x1bd165})};});}function hasYamlFrontmatter(_0x3f431d){return/^\uFEFF?---\s*\r?\n/['test'](_0x3f431d);}function prependSkillFrontmatter(_0x5c74de,_0x2f6a3b){const _0x246887=a116_0x2deb,_0xc86b25=_0x5c74de['replace'](/^\uFEFF/,'');return[_0x246887(0x16d),'name:\x20'+yamlString(_0x2f6a3b[_0x246887(0x174)]),_0x2f6a3b[_0x246887(0x161)]?_0x246887(0x14f)+yamlString(_0x2f6a3b['displayName']):undefined,'description:\x20'+yamlString(_0x2f6a3b[_0x246887(0x177)]),_0x246887(0x16d),'',_0xc86b25]['filter'](_0x1766c7=>_0x1766c7!==undefined)['join']('\x0a');}function yamlString(_0x472d92){const _0x4969a4=a116_0x2deb;return JSON['stringify'](_0x472d92[_0x4969a4(0x15a)](/\r/g,'')[_0x4969a4(0x15e)]());}function skillDisplayName(_0x2e288d,_0x311ed4){const _0x201a56=a116_0x2deb,_0x4c5909=_0x2e288d[_0x201a56(0x173)]?.[_0x201a56(0x15e)]();return _0x4c5909||_0x311ed4;}function withSyncedDisplayName(_0xbeee4,_0x570848){const _0x5a0c17=a116_0x2deb,_0x1182e2=_0xbeee4[_0x5a0c17(0x14b)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1182e2)return _0xbeee4;const _0x4033da=_0x1182e2[0x1]??'',_0x3709b0=_0x1182e2[0x2]??'',_0x4de21b=parseDocument(_0x3709b0);if(_0x4de21b[_0x5a0c17(0x168)][_0x5a0c17(0x172)]>0x0||!isMap(_0x4de21b[_0x5a0c17(0x16f)]))return _0xbeee4;if(_0x570848)_0x4de21b[_0x5a0c17(0x160)]('displayName',_0x570848);else{if(_0x4de21b[_0x5a0c17(0x158)](_0x5a0c17(0x161)))_0x4de21b[_0x5a0c17(0x146)](_0x5a0c17(0x161));else return _0xbeee4;}forceBlockCollections(_0x4de21b[_0x5a0c17(0x16f)]);const _0x116bc6=_0x4de21b[_0x5a0c17(0x151)]({'lineWidth':0x0})[_0x5a0c17(0x165)](),_0x1a72c3=_0xbeee4[_0x5a0c17(0x163)](_0x1182e2[0x0][_0x5a0c17(0x172)])[_0x5a0c17(0x15a)](/^\r?\n/,'');return _0x4033da+'---\x0a'+_0x116bc6+'\x0a---\x0a\x0a'+_0x1a72c3;}function forceBlockCollections(_0xc0b197){if(!isNode(_0xc0b197))return;visit(_0xc0b197,(_0x278c18,_0x4b527a)=>{const _0x23d23c=a116_0x2deb;isCollection(_0x4b527a)&&(_0x4b527a[_0x23d23c(0x14c)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x4361c2,_0x5bd9bd,_0x24b42f,_0x1dba93){const _0x14d236=a116_0x2deb;if(_0x1dba93||!existsSync(_0x5bd9bd))return;const _0x3f6320=readMetadataIfPresent(_0x5bd9bd);if(!_0x3f6320)return;const _0x31019f=_0x3f6320[_0x14d236(0x153)]&&Object['keys'](_0x3f6320['fileHashes'])[_0x14d236(0x172)]>0x0?_0x3f6320[_0x14d236(0x153)]:undefined;if(_0x31019f)for(const [_0x1c7bcd,_0x23bf4b]of Object[_0x14d236(0x155)](_0x31019f)){const _0x3c2b7f=resolveManagedFilePath(_0x4361c2,_0x1c7bcd);if(!existsSync(_0x3c2b7f))throw CliErrors['validation'](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x152)+_0x1c7bcd);const _0x2a4a20=lstatSync(_0x3c2b7f);if(!_0x2a4a20['isFile']())throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x15f)+_0x1c7bcd);const _0x272841=bufferSha256(readFileSync(_0x3c2b7f));if(_0x272841!==_0x23bf4b)throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2+'.\x20Changed\x20file:\x20'+_0x1c7bcd,_0x14d236(0x167)+_0x1c7bcd);}else{const _0x556c34=resolve(_0x4361c2,SKILL_FILE);if(existsSync(_0x556c34)&&_0x3f6320[_0x14d236(0x14d)]){const _0x2a52a4=contentHash(readFileSync(_0x556c34,'utf8'));if(_0x2a52a4!==_0x3f6320[_0x14d236(0x14d)])throw CliErrors['validation'](_0x14d236(0x162)+_0x556c34,_0x14d236(0x16a));}}for(const _0x1bc5a2 of normalizeLocalFiles(_0x24b42f)){if(_0x31019f?.[_0x1bc5a2['path']])continue;if(!_0x31019f&&_0x1bc5a2[_0x14d236(0x166)]===SKILL_FILE)continue;const _0x1673d5=resolveManagedFilePath(_0x4361c2,_0x1bc5a2[_0x14d236(0x166)]);if(!existsSync(_0x1673d5))continue;const _0x32a085=lstatSync(_0x1673d5);if(!_0x32a085[_0x14d236(0x16c)]())throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x159)+_0x1bc5a2[_0x14d236(0x166)]);const _0x329fb7=bufferSha256(readFileSync(_0x1673d5));if(_0x329fb7!==fileHash(_0x1bc5a2))throw CliErrors[_0x14d236(0x154)](_0x14d236(0x157)+_0x4361c2,_0x14d236(0x142)+_0x1bc5a2[_0x14d236(0x166)]);}}function materializeFiles(_0x4bc0c3,_0x499e5f){const _0x38aec4=a116_0x2deb;for(const _0x117fa3 of normalizeLocalFiles(_0x499e5f)){const _0x27f1c2=resolveManagedFilePath(_0x4bc0c3,_0x117fa3[_0x38aec4(0x166)]);mkdirSync(dirname(_0x27f1c2),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x27f1c2,fileContent(_0x117fa3),0x180);}}function removeStaleManagedFiles(_0x1cccb6,_0x18fdf0,_0x2c0524){const _0x5af10b=a116_0x2deb;if(!_0x18fdf0)return;const _0x170abc=new Set(normalizeLocalFiles(_0x2c0524)[_0x5af10b(0x175)](_0x1a85f4=>_0x1a85f4[_0x5af10b(0x166)]));for(const _0x13eefe of Object[_0x5af10b(0x14e)](_0x18fdf0)){if(_0x170abc[_0x5af10b(0x158)](_0x13eefe))continue;const _0xa66aef=resolveManagedFilePath(_0x1cccb6,_0x13eefe);existsSync(_0xa66aef)&&lstatSync(_0xa66aef)['isFile']()&&rmSync(_0xa66aef,{'force':!![]});}}
1
+ (function(_0x39d0c,_0x2bbad6){const _0x52aeba=a118_0x3fef,_0x4120fb=_0x39d0c();while(!![]){try{const _0x1568bc=-parseInt(_0x52aeba(0x17f))/0x1+-parseInt(_0x52aeba(0x17a))/0x2*(parseInt(_0x52aeba(0x1a0))/0x3)+parseInt(_0x52aeba(0x191))/0x4+parseInt(_0x52aeba(0x18d))/0x5+parseInt(_0x52aeba(0x1a3))/0x6+parseInt(_0x52aeba(0x172))/0x7*(-parseInt(_0x52aeba(0x17b))/0x8)+-parseInt(_0x52aeba(0x18f))/0x9*(-parseInt(_0x52aeba(0x1a1))/0xa);if(_0x1568bc===_0x2bbad6)break;else _0x4120fb['push'](_0x4120fb['shift']());}catch(_0x1c737b){_0x4120fb['push'](_0x4120fb['shift']());}}}(a118_0x6c33,0xd56f9));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';function a118_0x3fef(_0x58eaef,_0x4cacc3){_0x58eaef=_0x58eaef-0x16d;const _0x6c3393=a118_0x6c33();let _0x3fefeb=_0x6c3393[_0x58eaef];return _0x3fefeb;}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a118_0x6c33(){const _0x3567b3=['Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','replace','---\x0a','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','name:\x20','accessKey','1499414HHBRuo','8bfKjuf','---','filter','fileHashes','1567271ptDexv','slice','toString','has','displayName:\x20','keys','description','join','description:\x20','length','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','name','Runtime\x20Skill\x20package\x20is\x20missing\x20','map','1205535gHPEvn','entries','4248zJhaPG','force','6119228juRXKe','skillName','packageBytes','contents','utf8','trimEnd','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','pulledAt','contentHash','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','appCode','isFile','displayName','flow','trim','3SqVrSv','21290ksjrUq','set','5072298fgCcHB','match','find','path','validation','.\x20Changed\x20file:\x20','3009818WLMSEK'];a118_0x6c33=function(){return _0x3567b3;};return a118_0x6c33();}export function materializeRuntimeSkill(_0x2cfd94,_0xf8cd22,_0xf4ab2){const _0x2c4dec=a118_0x3fef,_0x432eff=requireSkillCode(_0x2cfd94),_0x3022be=requirePackageBytes(_0x432eff,_0xf4ab2[_0x2c4dec(0x193)]),_0x4cf4fa=extractDownloadedPackage(_0x3022be),_0x5b6b22=_0x4cf4fa[_0x2c4dec(0x16e)](_0x7cbee=>_0x7cbee[_0x2c4dec(0x16f)]===SKILL_FILE);if(!_0x5b6b22)throw CliErrors[_0x2c4dec(0x170)](_0x2c4dec(0x18b)+SKILL_FILE+':\x20'+_0x432eff);const _0x5d97a5=withMaterializedSkillFrontmatter(_0x4cf4fa,_0x2cfd94,_0x432eff),_0x1c65b1=_0x5d97a5[_0x2c4dec(0x16e)](_0x296e90=>_0x296e90['path']===SKILL_FILE),_0x2f0de=fileText(_0x1c65b1),_0x5b0f87=getRuntimeSkillDir(_0xf4ab2['env'],_0xf4ab2[_0x2c4dec(0x179)],_0xf4ab2[_0x2c4dec(0x19b)],_0xf8cd22,_0x432eff,_0xf4ab2['paths']),_0x38a06f=resolve(_0x5b0f87,SKILL_FILE),_0x57b504=resolve(_0x5b0f87,METADATA_FILE),_0xd0afc7=contentHash(_0x2f0de),_0x3c648f=readMetadataIfPresent(_0x57b504)?.[_0x2c4dec(0x17e)];ensurePulledFilesCanBeOverwritten(_0x5b0f87,_0x57b504,_0x5d97a5,_0xf4ab2[_0x2c4dec(0x190)]===!![]),mkdirSync(_0x5b0f87,{'recursive':!![],'mode':0x1c0});const _0x1e887a=existsSync(_0x38a06f)?readFileSync(_0x38a06f,_0x2c4dec(0x195)):undefined;return materializeFiles(_0x5b0f87,_0x5d97a5),removeStaleManagedFiles(_0x5b0f87,_0x3c648f,_0x5d97a5),writeJsonAtomic(_0x57b504,buildMetadata(_0x2cfd94,_0xf8cd22,_0xf4ab2['appCode'],_0xd0afc7,_0xf4ab2[_0x2c4dec(0x198)],_0x5d97a5,_0x3022be)),{'skill':_0x2cfd94,'scope':_0xf8cd22,'dir':_0x5b0f87,'skillMdPath':_0x38a06f,'metadataPath':_0x57b504,'contentHash':_0xd0afc7,'changed':_0x1e887a!==_0x2f0de};}function withMaterializedSkillFrontmatter(_0x2a250a,_0x5b7131,_0x636d13){const _0x4bdee6=a118_0x3fef,_0xdff5ad=skillDisplayName(_0x5b7131,_0x636d13),_0x5234b9=_0x5b7131[_0x4bdee6(0x185)]?.[_0x4bdee6(0x19f)]()||_0xdff5ad||_0x636d13;return normalizeLocalFiles(_0x2a250a)[_0x4bdee6(0x18c)](_0x3dae8d=>{const _0x5e497c=_0x4bdee6,_0x2cb9d1=fileText(_0x3dae8d);if(_0x3dae8d[_0x5e497c(0x16f)]!==SKILL_FILE)return _0x3dae8d;if(hasYamlFrontmatter(_0x2cb9d1))return{'path':_0x3dae8d[_0x5e497c(0x16f)],'content':withSyncedDisplayName(_0x2cb9d1,_0xdff5ad)};return{'path':_0x3dae8d['path'],'content':prependSkillFrontmatter(_0x2cb9d1,{'name':_0x636d13,'displayName':_0xdff5ad,'description':_0x5234b9})};});}function hasYamlFrontmatter(_0x16b53b){return/^\uFEFF?---\s*\r?\n/['test'](_0x16b53b);}function prependSkillFrontmatter(_0x49b917,_0x3d508f){const _0xe2ebab=a118_0x3fef,_0x18ae55=_0x49b917[_0xe2ebab(0x174)](/^\uFEFF/,'');return[_0xe2ebab(0x17c),_0xe2ebab(0x178)+yamlString(_0x3d508f[_0xe2ebab(0x18a)]),_0x3d508f[_0xe2ebab(0x19d)]?_0xe2ebab(0x183)+yamlString(_0x3d508f[_0xe2ebab(0x19d)]):undefined,_0xe2ebab(0x187)+yamlString(_0x3d508f[_0xe2ebab(0x185)]),'---','',_0x18ae55][_0xe2ebab(0x17d)](_0x54a173=>_0x54a173!==undefined)[_0xe2ebab(0x186)]('\x0a');}function yamlString(_0x3bfd08){const _0x45d156=a118_0x3fef;return JSON['stringify'](_0x3bfd08[_0x45d156(0x174)](/\r/g,'')[_0x45d156(0x19f)]());}function skillDisplayName(_0x278326,_0x30e562){const _0x17198d=a118_0x3fef,_0x4c6ffd=_0x278326[_0x17198d(0x192)]?.[_0x17198d(0x19f)]();return _0x4c6ffd||_0x30e562;}function withSyncedDisplayName(_0x159992,_0x3bb061){const _0x956f60=a118_0x3fef,_0x3e3404=_0x159992[_0x956f60(0x16d)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3e3404)return _0x159992;const _0x23d604=_0x3e3404[0x1]??'',_0x494abd=_0x3e3404[0x2]??'',_0x3ff73e=parseDocument(_0x494abd);if(_0x3ff73e['errors'][_0x956f60(0x188)]>0x0||!isMap(_0x3ff73e[_0x956f60(0x194)]))return _0x159992;if(_0x3bb061)_0x3ff73e[_0x956f60(0x1a2)]('displayName',_0x3bb061);else{if(_0x3ff73e[_0x956f60(0x182)]('displayName'))_0x3ff73e['delete'](_0x956f60(0x19d));else return _0x159992;}forceBlockCollections(_0x3ff73e['contents']);const _0x2ef031=_0x3ff73e[_0x956f60(0x181)]({'lineWidth':0x0})[_0x956f60(0x196)](),_0x42a941=_0x159992[_0x956f60(0x180)](_0x3e3404[0x0][_0x956f60(0x188)])[_0x956f60(0x174)](/^\r?\n/,'');return _0x23d604+_0x956f60(0x175)+_0x2ef031+'\x0a---\x0a\x0a'+_0x42a941;}function forceBlockCollections(_0x2b9a6d){if(!isNode(_0x2b9a6d))return;visit(_0x2b9a6d,(_0x232631,_0x43b5fa)=>{const _0x9af7e7=a118_0x3fef;isCollection(_0x43b5fa)&&(_0x43b5fa[_0x9af7e7(0x19e)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1d2f93,_0x4a0639,_0x291d8c,_0x2be3b5){const _0x33a30e=a118_0x3fef;if(_0x2be3b5||!existsSync(_0x4a0639))return;const _0x2ab352=readMetadataIfPresent(_0x4a0639);if(!_0x2ab352)return;const _0x439b25=_0x2ab352[_0x33a30e(0x17e)]&&Object['keys'](_0x2ab352[_0x33a30e(0x17e)])[_0x33a30e(0x188)]>0x0?_0x2ab352[_0x33a30e(0x17e)]:undefined;if(_0x439b25)for(const [_0x3aa538,_0x550652]of Object[_0x33a30e(0x18e)](_0x439b25)){const _0x200298=resolveManagedFilePath(_0x1d2f93,_0x3aa538);if(!existsSync(_0x200298))throw CliErrors[_0x33a30e(0x170)](_0x33a30e(0x173)+_0x1d2f93,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x3aa538);const _0x53545f=lstatSync(_0x200298);if(!_0x53545f[_0x33a30e(0x19c)]())throw CliErrors[_0x33a30e(0x170)](_0x33a30e(0x173)+_0x1d2f93,_0x33a30e(0x197)+_0x3aa538);const _0x5cb440=bufferSha256(readFileSync(_0x200298));if(_0x5cb440!==_0x550652)throw CliErrors[_0x33a30e(0x170)](_0x33a30e(0x173)+_0x1d2f93+_0x33a30e(0x171)+_0x3aa538,_0x33a30e(0x177)+_0x3aa538);}else{const _0x2ef8c1=resolve(_0x1d2f93,SKILL_FILE);if(existsSync(_0x2ef8c1)&&_0x2ab352[_0x33a30e(0x199)]){const _0x5d2d2a=contentHash(readFileSync(_0x2ef8c1,'utf8'));if(_0x5d2d2a!==_0x2ab352[_0x33a30e(0x199)])throw CliErrors[_0x33a30e(0x170)](_0x33a30e(0x19a)+_0x2ef8c1,_0x33a30e(0x189));}}for(const _0x4d7ee1 of normalizeLocalFiles(_0x291d8c)){if(_0x439b25?.[_0x4d7ee1[_0x33a30e(0x16f)]])continue;if(!_0x439b25&&_0x4d7ee1[_0x33a30e(0x16f)]===SKILL_FILE)continue;const _0x210b11=resolveManagedFilePath(_0x1d2f93,_0x4d7ee1[_0x33a30e(0x16f)]);if(!existsSync(_0x210b11))continue;const _0x1a32ac=lstatSync(_0x210b11);if(!_0x1a32ac[_0x33a30e(0x19c)]())throw CliErrors[_0x33a30e(0x170)](_0x33a30e(0x173)+_0x1d2f93,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x4d7ee1['path']);const _0x277fd3=bufferSha256(readFileSync(_0x210b11));if(_0x277fd3!==fileHash(_0x4d7ee1))throw CliErrors[_0x33a30e(0x170)](_0x33a30e(0x173)+_0x1d2f93,_0x33a30e(0x176)+_0x4d7ee1[_0x33a30e(0x16f)]);}}function materializeFiles(_0x2864d1,_0xb1d871){const _0x417831=a118_0x3fef;for(const _0x445bdd of normalizeLocalFiles(_0xb1d871)){const _0x5b712a=resolveManagedFilePath(_0x2864d1,_0x445bdd[_0x417831(0x16f)]);mkdirSync(dirname(_0x5b712a),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x5b712a,fileContent(_0x445bdd),0x180);}}function removeStaleManagedFiles(_0x3b4e19,_0x5c3a8d,_0x33494b){const _0x12ace4=a118_0x3fef;if(!_0x5c3a8d)return;const _0x246fb7=new Set(normalizeLocalFiles(_0x33494b)['map'](_0x62566d=>_0x62566d[_0x12ace4(0x16f)]));for(const _0x55b2a3 of Object[_0x12ace4(0x184)](_0x5c3a8d)){if(_0x246fb7[_0x12ace4(0x182)](_0x55b2a3))continue;const _0x416132=resolveManagedFilePath(_0x3b4e19,_0x55b2a3);existsSync(_0x416132)&&lstatSync(_0x416132)[_0x12ace4(0x19c)]()&&rmSync(_0x416132,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x4b9bc0,_0x2763d8){const _0x4d58cc=a117_0x31a5,_0x20cf03=_0x4b9bc0();while(!![]){try{const _0x316840=-parseInt(_0x4d58cc(0xb2))/0x1+parseInt(_0x4d58cc(0xb8))/0x2*(-parseInt(_0x4d58cc(0xcb))/0x3)+-parseInt(_0x4d58cc(0xb9))/0x4*(parseInt(_0x4d58cc(0xc2))/0x5)+parseInt(_0x4d58cc(0xc4))/0x6*(-parseInt(_0x4d58cc(0xcc))/0x7)+parseInt(_0x4d58cc(0xb1))/0x8*(-parseInt(_0x4d58cc(0xca))/0x9)+parseInt(_0x4d58cc(0xb5))/0xa+parseInt(_0x4d58cc(0xc0))/0xb*(parseInt(_0x4d58cc(0xbb))/0xc);if(_0x316840===_0x2763d8)break;else _0x20cf03['push'](_0x20cf03['shift']());}catch(_0x1ae3c6){_0x20cf03['push'](_0x20cf03['shift']());}}}(a117_0x35f6,0xc3389));function a117_0x35f6(){const _0x51d8eb=['644936txydGq','15848PwCBFs','skillCode','35341224gUNBhe','manifest','object','utf8','sourceSessionId','11fWUfHy','forkedFromVersion','175ViBVjd','isArray','6liFeJi','readonly','Runtime\x20Skill\x20is\x20missing\x20skillCode.','ossPath','length','forkedFromSkillId','1446138FGOZQi','12fSmrPF','7404586eEDZlV','zipSize','map','validation','userId','fromEntries','8IdUUfc','949309UrJyzL','toISOString','trim','14508540DhmoKJ','Invalid\x20','status'];a117_0x35f6=function(){return _0x51d8eb;};return a117_0x35f6();}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x15b571,_0x41313c,_0x4f193a,_0x4cfc5a,_0x1b8de6,_0x241a83,_0x408ee8){const _0x226747=a117_0x31a5,_0x2c2efc=_0x241a83?normalizeLocalFiles(_0x241a83):[],_0x3e9ac7=!_0x408ee8&&_0x2c2efc['length']>0x0?buildSkillPackage(_0x2c2efc):undefined,_0xe32f3e=_0x408ee8?bufferSha256(_0x408ee8):_0x3e9ac7?.[_0x226747(0xbc)]['zipSha256'],_0x4ab03c=_0x408ee8?.[_0x226747(0xc8)]??_0x3e9ac7?.['manifest'][_0x226747(0xcd)],_0xa988c2=_0x2c2efc[_0x226747(0xc8)]>0x0?Object[_0x226747(0xb0)](_0x2c2efc[_0x226747(0xce)](_0x4d8ba3=>[_0x4d8ba3['path'],fileHash(_0x4d8ba3)])):undefined;return{'schemaVersion':_0x2c2efc[_0x226747(0xc8)]>0x0?0x2:0x1,'id':_0x15b571['id'],'appCode':_0x4f193a,'skillCode':requireSkillCode(_0x15b571),'skillName':_0x15b571['skillName'],'description':_0x15b571['description'],'scope':_0x41313c,'readonly':_0x41313c!=='personal'||_0x15b571[_0x226747(0xc5)]===!![],'tenantCode':_0x15b571['tenantCode'],'userId':_0x15b571[_0x226747(0xd0)],'version':_0x15b571['version'],'status':_0x15b571[_0x226747(0xb7)],'tags':Array[_0x226747(0xc3)](_0x15b571['tags'])?_0x15b571['tags']:[],'hasUpstreamUpdate':_0x15b571['hasUpstreamUpdate'],'forkedFromSkillId':_0x15b571[_0x226747(0xc9)],'forkedFromVersion':_0x15b571[_0x226747(0xc1)],'sourceSessionId':_0x15b571[_0x226747(0xbf)],'contentHash':_0x4cfc5a,'fileHashes':_0xa988c2,'treeHash':_0x2c2efc[_0x226747(0xc8)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2c2efc)):undefined,'ossPath':remoteManifestOssPath(_0x15b571['files']),'zipSha256':_0xe32f3e,'zipSize':_0x4ab03c,'files':_0x2c2efc[_0x226747(0xc8)]>0x0?_0x2c2efc['map'](_0x37fea8=>({'path':_0x37fea8['path'],'hash':fileHash(_0x37fea8),'size':fileContent(_0x37fea8)[_0x226747(0xc8)]})):undefined,'pulledAt':_0x1b8de6??new Date()[_0x226747(0xb3)]()};}export function requireSkillCode(_0x1e4354){const _0x5b910b=a117_0x31a5,_0x4350db=_0x1e4354[_0x5b910b(0xba)]?.[_0x5b910b(0xb4)]();if(!_0x4350db)throw CliErrors[_0x5b910b(0xcf)](_0x5b910b(0xc6));return _0x4350db;}function a117_0x31a5(_0x5d1645,_0x1f6155){_0x5d1645=_0x5d1645-0xb0;const _0x35f687=a117_0x35f6();let _0x31a5fc=_0x35f687[_0x5d1645];return _0x31a5fc;}export function readMetadataIfPresent(_0x183cda){const _0x33c0ba=a117_0x31a5;if(!existsSync(_0x183cda))return undefined;try{const _0x2c3b5a=JSON['parse'](readFileSync(_0x183cda,_0x33c0ba(0xbe)));return _0x2c3b5a;}catch{throw CliErrors[_0x33c0ba(0xcf)](_0x33c0ba(0xb6)+METADATA_FILE+':\x20'+_0x183cda);}}function remoteManifestOssPath(_0x25725f){const _0x1d80c3=a117_0x31a5;if(!_0x25725f||typeof _0x25725f!==_0x1d80c3(0xbd)||Array['isArray'](_0x25725f))return undefined;const _0x3bbdb0=_0x25725f[_0x1d80c3(0xc7)];return typeof _0x3bbdb0==='string'&&_0x3bbdb0[_0x1d80c3(0xb4)]()?_0x3bbdb0[_0x1d80c3(0xb4)]():undefined;}
1
+ (function(_0x457cbc,_0x2daecd){const _0x184546=a119_0x523d,_0x5b8361=_0x457cbc();while(!![]){try{const _0x327282=-parseInt(_0x184546(0x1fb))/0x1*(parseInt(_0x184546(0x1fa))/0x2)+parseInt(_0x184546(0x209))/0x3*(parseInt(_0x184546(0x1f8))/0x4)+parseInt(_0x184546(0x1ef))/0x5*(parseInt(_0x184546(0x213))/0x6)+parseInt(_0x184546(0x208))/0x7*(parseInt(_0x184546(0x1ff))/0x8)+parseInt(_0x184546(0x20b))/0x9+-parseInt(_0x184546(0x203))/0xa*(parseInt(_0x184546(0x1f4))/0xb)+-parseInt(_0x184546(0x1f7))/0xc;if(_0x327282===_0x2daecd)break;else _0x5b8361['push'](_0x5b8361['shift']());}catch(_0x3ca0e3){_0x5b8361['push'](_0x5b8361['shift']());}}}(a119_0x4619,0x4e78d));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a119_0x523d(_0x50c8af,_0x3f190e){_0x50c8af=_0x50c8af-0x1ee;const _0x461960=a119_0x4619();let _0x523d29=_0x461960[_0x50c8af];return _0x523d29;}export function buildMetadata(_0x895691,_0x3252f0,_0x1e5caf,_0x5ec4dd,_0x23803b,_0x1ce5a2,_0x185dac){const _0xb44d2=a119_0x523d,_0x703b4c=_0x1ce5a2?normalizeLocalFiles(_0x1ce5a2):[],_0x1cc14c=!_0x185dac&&_0x703b4c['length']>0x0?buildSkillPackage(_0x703b4c):undefined,_0x58ad62=_0x185dac?bufferSha256(_0x185dac):_0x1cc14c?.[_0xb44d2(0x201)][_0xb44d2(0x204)],_0xd23db1=_0x185dac?.['length']??_0x1cc14c?.['manifest'][_0xb44d2(0x1f2)],_0x24c3ea=_0x703b4c[_0xb44d2(0x1fe)]>0x0?Object[_0xb44d2(0x1f0)](_0x703b4c['map'](_0x2f3637=>[_0x2f3637[_0xb44d2(0x212)],fileHash(_0x2f3637)])):undefined;return{'schemaVersion':_0x703b4c[_0xb44d2(0x1fe)]>0x0?0x2:0x1,'id':_0x895691['id'],'appCode':_0x1e5caf,'skillCode':requireSkillCode(_0x895691),'skillName':_0x895691[_0xb44d2(0x206)],'description':_0x895691['description'],'scope':_0x3252f0,'readonly':_0x3252f0!==_0xb44d2(0x20d)||_0x895691[_0xb44d2(0x1f9)]===!![],'tenantCode':_0x895691[_0xb44d2(0x202)],'userId':_0x895691[_0xb44d2(0x210)],'version':_0x895691['version'],'status':_0x895691['status'],'tags':Array[_0xb44d2(0x1ee)](_0x895691[_0xb44d2(0x205)])?_0x895691[_0xb44d2(0x205)]:[],'hasUpstreamUpdate':_0x895691[_0xb44d2(0x211)],'forkedFromSkillId':_0x895691[_0xb44d2(0x1f6)],'forkedFromVersion':_0x895691[_0xb44d2(0x20c)],'sourceSessionId':_0x895691['sourceSessionId'],'contentHash':_0x5ec4dd,'fileHashes':_0x24c3ea,'treeHash':_0x703b4c[_0xb44d2(0x1fe)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x703b4c)):undefined,'ossPath':remoteManifestOssPath(_0x895691[_0xb44d2(0x1fd)]),'zipSha256':_0x58ad62,'zipSize':_0xd23db1,'files':_0x703b4c[_0xb44d2(0x1fe)]>0x0?_0x703b4c['map'](_0x1d2efc=>({'path':_0x1d2efc[_0xb44d2(0x212)],'hash':fileHash(_0x1d2efc),'size':fileContent(_0x1d2efc)[_0xb44d2(0x1fe)]})):undefined,'pulledAt':_0x23803b??new Date()[_0xb44d2(0x20a)]()};}export function requireSkillCode(_0x235d48){const _0x5d19d3=a119_0x523d,_0x55267e=_0x235d48['skillCode']?.[_0x5d19d3(0x1f1)]();if(!_0x55267e)throw CliErrors[_0x5d19d3(0x207)](_0x5d19d3(0x20e));return _0x55267e;}export function readMetadataIfPresent(_0x3dd64f){const _0x2edad6=a119_0x523d;if(!existsSync(_0x3dd64f))return undefined;try{const _0x5c91c2=JSON[_0x2edad6(0x200)](readFileSync(_0x3dd64f,'utf8'));return _0x5c91c2;}catch{throw CliErrors[_0x2edad6(0x207)](_0x2edad6(0x1f5)+METADATA_FILE+':\x20'+_0x3dd64f);}}function a119_0x4619(){const _0xc34af5=['object','4935799vaVMgh','Invalid\x20','forkedFromSkillId','901644rEHhmi','2984dyBfPX','readonly','48RDzEuH','17377tsXoXK','ossPath','files','length','56368ufqatv','parse','manifest','tenantCode','10hrjICQ','zipSha256','tags','skillName','validation','91zedPqE','2019pUZlKT','toISOString','2228967eyrGUV','forkedFromVersion','personal','Runtime\x20Skill\x20is\x20missing\x20skillCode.','string','userId','hasUpstreamUpdate','path','420996cBKXmC','isArray','30SltfHW','fromEntries','trim','zipSize'];a119_0x4619=function(){return _0xc34af5;};return a119_0x4619();}function remoteManifestOssPath(_0x3edb95){const _0x17f839=a119_0x523d;if(!_0x3edb95||typeof _0x3edb95!==_0x17f839(0x1f3)||Array['isArray'](_0x3edb95))return undefined;const _0x1dc074=_0x3edb95[_0x17f839(0x1fc)];return typeof _0x1dc074===_0x17f839(0x20f)&&_0x1dc074[_0x17f839(0x1f1)]()?_0x1dc074[_0x17f839(0x1f1)]():undefined;}
@@ -1 +1 @@
1
- function a118_0x503a(_0x39a012,_0x9cc9f5){_0x39a012=_0x39a012-0x13b;const _0x34d35e=a118_0x34d3();let _0x503a68=_0x34d35e[_0x39a012];return _0x503a68;}const a118_0x1034f7=a118_0x503a;(function(_0x3873e6,_0x525280){const _0x4a1d30=a118_0x503a,_0x5b1eb9=_0x3873e6();while(!![]){try{const _0x1447ce=parseInt(_0x4a1d30(0x143))/0x1*(-parseInt(_0x4a1d30(0x14b))/0x2)+-parseInt(_0x4a1d30(0x151))/0x3+parseInt(_0x4a1d30(0x142))/0x4+parseInt(_0x4a1d30(0x14c))/0x5*(-parseInt(_0x4a1d30(0x149))/0x6)+parseInt(_0x4a1d30(0x152))/0x7*(parseInt(_0x4a1d30(0x157))/0x8)+parseInt(_0x4a1d30(0x14f))/0x9+parseInt(_0x4a1d30(0x146))/0xa*(parseInt(_0x4a1d30(0x155))/0xb);if(_0x1447ce===_0x525280)break;else _0x5b1eb9['push'](_0x5b1eb9['shift']());}catch(_0x19e00b){_0x5b1eb9['push'](_0x5b1eb9['shift']());}}}(a118_0x34d3,0x83fe6));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xa603f2={}){const _0x19d338=a118_0x503a,_0x996bfb=_0xa603f2[_0x19d338(0x147)]??homedir(),_0x3715bb=resolve(_0x996bfb,PRODUCT_CONFIG[_0x19d338(0x13b)],_0x19d338(0x13d)),_0x147787=trimmedEnv(_0x19d338(0x144)),_0x2ad578=trimmedEnv(_0x19d338(0x13f)),_0x3f5ef8=resolve(_0x996bfb,'.workbuddy'),_0x500380=_0xa603f2[_0x19d338(0x13e)]??(existsSync(_0x3f5ef8)?resolve(_0x3f5ef8,_0x19d338(0x14d)):undefined);return{'homeDir':_0x996bfb,'cacheRoot':_0x3715bb,'managedRoot':resolve(_0x996bfb,PRODUCT_CONFIG[_0x19d338(0x13b)]),'agentsSkillsDir':_0xa603f2['agentsSkillsDir']??_0x147787??resolve(_0x996bfb,_0x19d338(0x156),'skills'),'claudeSkillsDir':_0xa603f2[_0x19d338(0x154)]??_0x2ad578??resolve(_0x996bfb,_0x19d338(0x14a),_0x19d338(0x14d)),'workbuddySkillsDir':_0x500380};}export function runtimeAgentSkillRoots(_0x20c83e){const _0x51ecc6=a118_0x503a;return[_0x20c83e[_0x51ecc6(0x148)],_0x20c83e['claudeSkillsDir'],_0x20c83e[_0x51ecc6(0x13e)]][_0x51ecc6(0x150)](_0x2665e6=>Boolean(_0x2665e6));}export function getRuntimeSkillCacheRoot(_0x4a545e,_0x2050d6,_0x287623={}){const _0xe47735=a118_0x503a,_0x2160c7=resolveSkillSyncPaths(_0x287623);return resolve(_0x2160c7[_0xe47735(0x145)],_0x4a545e,fingerprintAccessKey(_0x2050d6),_0xe47735(0x14d));}export function getRuntimeSkillDir(_0x4813d9,_0x5c569f,_0x55b28c,_0x1074c9,_0x1128ce,_0x28bb79={}){const _0x4e2914=a118_0x503a;return resolve(getRuntimeSkillCacheRoot(_0x4813d9,_0x5c569f,_0x28bb79),safePathSegment(_0x55b28c,_0x4e2914(0x14e)),_0x1074c9,safePathSegment(_0x1128ce,_0x4e2914(0x153)));}export function safePathSegment(_0x41c72d,_0x4cb9ee=a118_0x1034f7(0x141)){const _0x539b1b=a118_0x1034f7;if(!_0x41c72d||_0x41c72d[_0x539b1b(0x13c)]('/')||_0x41c72d[_0x539b1b(0x13c)]('\x5c')||_0x41c72d[_0x539b1b(0x13c)]('..'))throw CliErrors[_0x539b1b(0x140)]('Unsafe\x20'+_0x4cb9ee+'\x20for\x20local\x20path:\x20'+_0x41c72d);return _0x41c72d;}function a118_0x34d3(){const _0x5c2c14=['322wPoUvc','skillCode','claudeSkillsDir','44UeUIVe','.agents','156368PbApgV','homeDirName','includes','cache','workbuddySkillsDir','CLAUDE_SKILL_ROOT','validation','path\x20segment','3135896zLmaDY','9FjizzF','SKILL_ROOT','cacheRoot','2076200QinwZx','homeDir','agentsSkillsDir','3289542Flkqzq','.claude','194182qIUBzo','5ZNevtK','skills','appCode','1115622GoKwlL','filter','2024418egBAHx'];a118_0x34d3=function(){return _0x5c2c14;};return a118_0x34d3();}function trimmedEnv(_0x27b7c8){const _0x545cff=productEnv(_0x27b7c8)?.['trim']();return _0x545cff?_0x545cff:undefined;}
1
+ (function(_0x106037,_0x24b86b){const _0x298f03=a120_0x9370,_0x5c8d56=_0x106037();while(!![]){try{const _0x3b2c35=-parseInt(_0x298f03(0x1d1))/0x1*(-parseInt(_0x298f03(0x1c9))/0x2)+-parseInt(_0x298f03(0x1e3))/0x3+parseInt(_0x298f03(0x1d4))/0x4*(parseInt(_0x298f03(0x1d8))/0x5)+parseInt(_0x298f03(0x1ca))/0x6*(-parseInt(_0x298f03(0x1de))/0x7)+-parseInt(_0x298f03(0x1d3))/0x8+parseInt(_0x298f03(0x1d5))/0x9*(-parseInt(_0x298f03(0x1db))/0xa)+parseInt(_0x298f03(0x1e1))/0xb;if(_0x3b2c35===_0x24b86b)break;else _0x5c8d56['push'](_0x5c8d56['shift']());}catch(_0x3360f2){_0x5c8d56['push'](_0x5c8d56['shift']());}}}(a120_0x14d7,0x52c93));import{existsSync}from'node:fs';function a120_0x9370(_0x4cfd67,_0x23a435){_0x4cfd67=_0x4cfd67-0x1c9;const _0x14d76e=a120_0x14d7();let _0x93705a=_0x14d76e[_0x4cfd67];return _0x93705a;}import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a120_0x14d7(){const _0x15916a=['skillCode','.claude','cacheRoot','validation','homeDirName','SKILL_ROOT','1294vucDAN','workbuddySkillsDir','786320gJcTCl','120tjjvxq','2367dPDsAk','Unsafe\x20','claudeSkillsDir','72605zTLNhK','skills','agentsSkillsDir','7530RbljLN','includes','trim','287yXsMaB','cache','\x20for\x20local\x20path:\x20','4776112RqbhpA','.workbuddy','832269rfANbL','homeDir','.agents','1010yPmYmk','89334UDsRrf'];a120_0x14d7=function(){return _0x15916a;};return a120_0x14d7();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xd91a3d={}){const _0x2bef1b=a120_0x9370,_0x325905=_0xd91a3d[_0x2bef1b(0x1e4)]??homedir(),_0x15cb24=resolve(_0x325905,PRODUCT_CONFIG['homeDirName'],_0x2bef1b(0x1df)),_0x534cd4=trimmedEnv(_0x2bef1b(0x1d0)),_0x437a9b=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x715317=resolve(_0x325905,_0x2bef1b(0x1e2)),_0x1c3c23=_0xd91a3d[_0x2bef1b(0x1d2)]??(existsSync(_0x715317)?resolve(_0x715317,_0x2bef1b(0x1d9)):undefined);return{'homeDir':_0x325905,'cacheRoot':_0x15cb24,'managedRoot':resolve(_0x325905,PRODUCT_CONFIG[_0x2bef1b(0x1cf)]),'agentsSkillsDir':_0xd91a3d[_0x2bef1b(0x1da)]??_0x534cd4??resolve(_0x325905,_0x2bef1b(0x1e5),_0x2bef1b(0x1d9)),'claudeSkillsDir':_0xd91a3d[_0x2bef1b(0x1d7)]??_0x437a9b??resolve(_0x325905,_0x2bef1b(0x1cc),_0x2bef1b(0x1d9)),'workbuddySkillsDir':_0x1c3c23};}export function runtimeAgentSkillRoots(_0x43cd8e){const _0x19b804=a120_0x9370;return[_0x43cd8e[_0x19b804(0x1da)],_0x43cd8e[_0x19b804(0x1d7)],_0x43cd8e[_0x19b804(0x1d2)]]['filter'](_0x593aaf=>Boolean(_0x593aaf));}export function getRuntimeSkillCacheRoot(_0x370e70,_0x5a3c76,_0x5e466={}){const _0x39a76b=a120_0x9370,_0x57812f=resolveSkillSyncPaths(_0x5e466);return resolve(_0x57812f[_0x39a76b(0x1cd)],_0x370e70,fingerprintAccessKey(_0x5a3c76),_0x39a76b(0x1d9));}export function getRuntimeSkillDir(_0x1c66bc,_0x31604a,_0x15ae49,_0x340484,_0x3c6d73,_0x4cd9fb={}){const _0x6fc7df=a120_0x9370;return resolve(getRuntimeSkillCacheRoot(_0x1c66bc,_0x31604a,_0x4cd9fb),safePathSegment(_0x15ae49,'appCode'),_0x340484,safePathSegment(_0x3c6d73,_0x6fc7df(0x1cb)));}export function safePathSegment(_0x50c3f0,_0x2f668d='path\x20segment'){const _0x2ad1e7=a120_0x9370;if(!_0x50c3f0||_0x50c3f0[_0x2ad1e7(0x1dc)]('/')||_0x50c3f0['includes']('\x5c')||_0x50c3f0['includes']('..'))throw CliErrors[_0x2ad1e7(0x1ce)](_0x2ad1e7(0x1d6)+_0x2f668d+_0x2ad1e7(0x1e0)+_0x50c3f0);return _0x50c3f0;}function trimmedEnv(_0x4cb354){const _0x1e1d16=a120_0x9370,_0x47a7dd=productEnv(_0x4cb354)?.[_0x1e1d16(0x1dd)]();return _0x47a7dd?_0x47a7dd:undefined;}
@@ -1 +1 @@
1
- function a119_0x21dd(_0x595c75,_0x3b1221){_0x595c75=_0x595c75-0x1bc;const _0x1ebd96=a119_0x1ebd();let _0x21dd4d=_0x1ebd96[_0x595c75];return _0x21dd4d;}(function(_0x461610,_0x31cfa4){const _0x463ea2=a119_0x21dd,_0x858824=_0x461610();while(!![]){try{const _0x4d4592=-parseInt(_0x463ea2(0x1d8))/0x1+-parseInt(_0x463ea2(0x1f1))/0x2*(-parseInt(_0x463ea2(0x1de))/0x3)+parseInt(_0x463ea2(0x1c9))/0x4+-parseInt(_0x463ea2(0x1c4))/0x5*(-parseInt(_0x463ea2(0x1d0))/0x6)+parseInt(_0x463ea2(0x1be))/0x7+parseInt(_0x463ea2(0x1e8))/0x8+-parseInt(_0x463ea2(0x1d4))/0x9;if(_0x4d4592===_0x31cfa4)break;else _0x858824['push'](_0x858824['shift']());}catch(_0x171a88){_0x858824['push'](_0x858824['shift']());}}}(a119_0x1ebd,0x9f6ad));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a119_0x1ebd(){const _0x43e2c=['trim','sourceSessionId','\x20has\x20unsupported\x20scope\x20\x22','9391832ZZbjko','appCode','length','Skill\x20directory\x20not\x20found:\x20','Remote\x20Skill\x20','refreshedAt','ignoreInvalidMetadata','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','replace','2PYcxqq','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','skillName','\x20name\x20for\x20SkillHub\x20slug\x20generation.','files','match','skillCode','boolean','Invalid\x20','metadata','string','version','5395376SdYZSZ','utf8','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','scope','allowAppCodeRetarget','Unable\x20to\x20resolve\x20skillCode\x20from\x20','90aJyhIT','isFile','personal','toLowerCase','packageBase64','1620828DQGvJu','isArray','company','displayName','filter','find','Skill\x20metadata\x20appCode\x20\x22','163812chDosI','isDirectory','ignoreMetadataAppCodeMismatch','name','21623724hSJrme','some','ignoreMetadataScope','path','402988gJOQCm','unknown','Missing\x20','tags','\x20has\x20scope=\x22','object','1851621xtLGlO','number','validation','builtin','description','excludedFilePaths','content'];a119_0x1ebd=function(){return _0x43e2c;};return a119_0x1ebd();}import{basename,resolve}from'node:path';import{parse as a119_0x4ffa09}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x1189ee,_0x7cb8fb,_0x13fcac={}){const _0xad27e2=a119_0x21dd,_0x550aef=resolvePushDirectoryRoot(_0x1189ee),_0xde9701=readPushMetadataIfPresent(resolve(_0x550aef,METADATA_FILE),{'ignoreInvalidMetadata':_0x13fcac[_0xad27e2(0x1ee)]});if(_0xde9701?.['appCode']&&_0xde9701['appCode']!==_0x7cb8fb&&!_0x13fcac[_0xad27e2(0x1c2)]&&!_0x13fcac[_0xad27e2(0x1d2)])throw CliErrors['validation'](_0xad27e2(0x1cf)+_0xde9701[_0xad27e2(0x1e9)]+_0xad27e2(0x1f2)+_0x7cb8fb+'\x22.');const _0x2166df=resolvePushSkillCode(_0x550aef,_0x7cb8fb,_0xde9701,_0x13fcac);if(!_0x2166df)throw CliErrors[_0xad27e2(0x1e0)](_0xad27e2(0x1c3)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x550aef,'skillCode':_0x2166df,'metadata':_0xde9701};}export function readPushDirectory(_0x306417,_0xa9ebb9,_0x31b5c3={}){const _0x518950=a119_0x21dd,_0x1da2ba=resolvePushDirectoryIdentity(_0x306417,_0xa9ebb9,_0x31b5c3),_0x790b51=_0x1da2ba['dir'],_0x294e23=resolve(_0x790b51,SKILL_FILE);if(!existsSync(_0x294e23)||!lstatSync(_0x294e23)[_0x518950(0x1c5)]())throw CliErrors[_0x518950(0x1e0)](_0x518950(0x1da)+SKILL_FILE+':\x20'+_0x294e23);const _0x5793b4=_0x1da2ba[_0x518950(0x1fa)],_0x944496=_0x31b5c3['targetScope']??'personal';if(!_0x31b5c3[_0x518950(0x1d6)]&&_0x5793b4?.[_0x518950(0x1c1)]===_0x518950(0x1e1))throw CliErrors[_0x518950(0x1e0)](_0x518950(0x1ef)+METADATA_FILE+_0x518950(0x1dc)+_0x5793b4['scope']+'\x22.');if(!_0x31b5c3[_0x518950(0x1d6)]&&_0x944496===_0x518950(0x1c6)&&_0x5793b4?.[_0x518950(0x1c1)]&&_0x5793b4[_0x518950(0x1c1)]!==_0x518950(0x1c6))throw CliErrors[_0x518950(0x1e0)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x518950(0x1dc)+_0x5793b4[_0x518950(0x1c1)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x790b51+_0x518950(0x1c0));const _0x516366=scanSkillDirectory(_0x790b51,{'excludedFilePaths':_0x31b5c3[_0x518950(0x1e3)]}),_0x23b187=buildSkillPackage(_0x516366),_0x86fd0f=readFileSync(_0x294e23,'utf8'),_0x2f0941=_0x1da2ba[_0x518950(0x1f7)],_0x17e9ba=_0x31b5c3['ignoreMetadataForPayload']?undefined:_0x5793b4,_0x1127b7=readSkillDisplayName(_0x86fd0f);return{'skillCode':_0x2f0941,'metadata':_0x5793b4,'frontmatterDisplayName':_0x1127b7,'input':{'skillCode':_0x2f0941,'skillName':_0x1127b7??_0x17e9ba?.[_0x518950(0x1f3)],'description':_0x17e9ba?.['description'],'content':_0x86fd0f,'files':_0x23b187['manifest'],'packageBase64':_0x23b187[_0x518950(0x1c8)],'tags':_0x17e9ba?.[_0x518950(0x1db)],'version':_0x17e9ba?.[_0x518950(0x1bd)],'sourceSessionId':_0x17e9ba?.[_0x518950(0x1e6)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x312ece,_0x50a81b,_0x25854b,_0x195372={}){const _0x4a5f10=a119_0x21dd,_0x315e70=resolvePushDirectoryRoot(_0x312ece),_0x6d0159=readPushMetadataIfPresent(resolve(_0x315e70,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x311af7=requireRemoteScope(_0x50a81b),_0x110085=readLocalSkillContent(_0x315e70),_0x3236d7={..._0x50a81b,'appCode':_0x50a81b[_0x4a5f10(0x1e9)]??_0x25854b,'skillName':_0x50a81b[_0x4a5f10(0x1f3)]??_0x6d0159?.[_0x4a5f10(0x1f3)],'description':_0x50a81b[_0x4a5f10(0x1e2)]??_0x6d0159?.[_0x4a5f10(0x1e2)],'tags':Array[_0x4a5f10(0x1ca)](_0x50a81b[_0x4a5f10(0x1db)])?_0x50a81b[_0x4a5f10(0x1db)]:_0x6d0159?.[_0x4a5f10(0x1db)],'sourceSessionId':_0x50a81b[_0x4a5f10(0x1e6)]??_0x6d0159?.[_0x4a5f10(0x1e6)],'content':_0x50a81b[_0x4a5f10(0x1e4)]??_0x110085},_0x3ac7ac=buildMetadata(_0x3236d7,_0x311af7,_0x25854b,contentHash(_0x110085),_0x195372[_0x4a5f10(0x1ed)]);writeJsonAtomic(resolve(_0x315e70,METADATA_FILE),_0x3ac7ac);}export function recordPushedRuntimeSkill(_0x5b7321,_0x72e989,_0x2612a5,_0x115efe={}){const _0x486ab1=a119_0x21dd,_0x4c25c0=resolvePushDirectoryRoot(_0x5b7321),_0x15665f=scanSkillDirectory(_0x4c25c0),_0xc9e07d=_0x15665f[_0x486ab1(0x1ce)](_0x587397=>_0x587397[_0x486ab1(0x1d7)]===SKILL_FILE),_0xf85636=_0xc9e07d?fileText(_0xc9e07d):'',_0xb564ce=tryNormalizePackageManifest(_0x72e989[_0x486ab1(0x1f5)]),_0x396460={..._0x72e989,'content':_0x72e989['content']??_0xf85636,'files':_0xb564ce},_0x1cd9ea=_0xb564ce?normalizeLocalFiles(_0x15665f)[_0x486ab1(0x1cd)](_0x539efb=>_0xb564ce[_0x486ab1(0x1f5)][_0x486ab1(0x1d5)](_0x11ae86=>_0x11ae86['path']===_0x539efb['path'])):undefined,_0x240f56=buildMetadata(_0x396460,_0x115efe['scope']??_0x486ab1(0x1c6),_0x2612a5,contentHash(_0x396460[_0x486ab1(0x1e4)]??''),_0x115efe['pushedAt'],_0x1cd9ea);writeJsonAtomic(resolve(_0x4c25c0,METADATA_FILE),_0x240f56);}export function deriveSkillCodeFromDirectory(_0x523b5e,_0x5cdb73){const _0x1d71b1=a119_0x21dd,_0x322ac9=basename(resolve(_0x523b5e)),_0x304fbe=_0x5cdb73+'--';return _0x322ac9['startsWith'](_0x304fbe)?_0x322ac9['slice'](_0x304fbe[_0x1d71b1(0x1ea)]):_0x322ac9;}function resolvePushSkillCode(_0x4be393,_0x5a5712,_0x1d0d62,_0x638500){const _0x433884=a119_0x21dd,_0x7fae24=deriveSkillCodeFromSkillFile(_0x4be393)||deriveSkillCodeFromDirectory(_0x4be393,_0x5a5712);if(_0x638500['ignoreMetadataSkillCode'])return _0x7fae24;return _0x1d0d62?.[_0x433884(0x1f7)]?.[_0x433884(0x1e5)]()||_0x7fae24;}function deriveSkillCodeFromSkillFile(_0x4c3e1f){const _0x2be776=a119_0x21dd,_0x18ae6f=resolve(_0x4c3e1f,SKILL_FILE);if(!existsSync(_0x18ae6f)||!lstatSync(_0x18ae6f)[_0x2be776(0x1c5)]())return undefined;const _0x68db56=readFileSync(_0x18ae6f,_0x2be776(0x1bf)),_0x4b6358=_0x68db56[_0x2be776(0x1f6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4b6358)return undefined;const _0x293253=parseFrontmatterObject(_0x4b6358[0x1]??''),_0x36ba45=scalarToString(_0x293253?.[_0x2be776(0x1d3)]);return _0x36ba45?slugifySkillName(_0x36ba45):undefined;}function readSkillDisplayName(_0x4562e0){const _0x2553ef=a119_0x21dd,_0x53312a=_0x4562e0[_0x2553ef(0x1f6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x53312a)return undefined;const _0x279802=parseFrontmatterObject(_0x53312a[0x1]??'');return scalarToString(_0x279802?.[_0x2553ef(0x1cc)]);}function slugifySkillName(_0x13a70a){const _0x2857db=a119_0x21dd,_0x2afe00=_0x13a70a[_0x2857db(0x1e5)]()[_0x2857db(0x1c7)]()[_0x2857db(0x1f0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2857db(0x1f0)](/^-+/,'')[_0x2857db(0x1f0)](/-+$/,'')[_0x2857db(0x1f0)](/-{2,}/g,'-');if(!_0x2afe00)throw CliErrors[_0x2857db(0x1e0)](_0x2857db(0x1f9)+SKILL_FILE+_0x2857db(0x1f4));return _0x2afe00;}function parseFrontmatterObject(_0x1f1897){const _0xbdd197=a119_0x21dd;try{const _0x18d567=a119_0x4ffa09(_0x1f1897);return _0x18d567&&typeof _0x18d567===_0xbdd197(0x1dd)&&!Array[_0xbdd197(0x1ca)](_0x18d567)?_0x18d567:undefined;}catch{return undefined;}}function scalarToString(_0x410d07){const _0x41bf87=a119_0x21dd;if(typeof _0x410d07===_0x41bf87(0x1bc))return _0x410d07[_0x41bf87(0x1e5)]();if(typeof _0x410d07===_0x41bf87(0x1df)||typeof _0x410d07===_0x41bf87(0x1f8))return String(_0x410d07);return undefined;}function resolvePushDirectoryRoot(_0x2c7541){const _0x305524=a119_0x21dd,_0xaddb3d=resolve(_0x2c7541);if(!existsSync(_0xaddb3d))throw CliErrors[_0x305524(0x1e0)]('Skill\x20directory\x20not\x20found:\x20'+_0x2c7541);const _0x5d7179=lstatSync(_0xaddb3d);if(_0x5d7179[_0x305524(0x1d1)]())return _0xaddb3d;if(_0x5d7179['isSymbolicLink']()){const _0x364726=realpathSync(_0xaddb3d);if(lstatSync(_0x364726)[_0x305524(0x1d1)]())return _0x364726;}throw CliErrors[_0x305524(0x1e0)](_0x305524(0x1eb)+_0x2c7541);}function requireRemoteScope(_0x8b57ed){const _0x40eb79=a119_0x21dd;if(_0x8b57ed[_0x40eb79(0x1c1)]==='personal'||_0x8b57ed[_0x40eb79(0x1c1)]===_0x40eb79(0x1cb)||_0x8b57ed[_0x40eb79(0x1c1)]===_0x40eb79(0x1e1))return _0x8b57ed[_0x40eb79(0x1c1)];throw CliErrors[_0x40eb79(0x1e0)](_0x40eb79(0x1ec)+(_0x8b57ed[_0x40eb79(0x1f7)]||'(unknown)')+_0x40eb79(0x1e7)+(_0x8b57ed[_0x40eb79(0x1c1)]??_0x40eb79(0x1d9))+'\x22.');}function readLocalSkillContent(_0x552f04){const _0x389dc1=a119_0x21dd,_0x87147a=resolve(_0x552f04,SKILL_FILE);return existsSync(_0x87147a)&&lstatSync(_0x87147a)[_0x389dc1(0x1c5)]()?readFileSync(_0x87147a,_0x389dc1(0x1bf)):'';}function readPushMetadataIfPresent(_0x2f2510,_0x294912={}){const _0x2a4e80=a119_0x21dd;try{return readMetadataIfPresent(_0x2f2510);}catch(_0x9484ea){if(_0x294912[_0x2a4e80(0x1ee)])return undefined;throw _0x9484ea;}}
1
+ (function(_0x3aac41,_0x35cbbf){const _0x538714=a121_0x400b,_0x84cba1=_0x3aac41();while(!![]){try{const _0xdb4723=-parseInt(_0x538714(0x1c5))/0x1*(parseInt(_0x538714(0x1c6))/0x2)+-parseInt(_0x538714(0x1ca))/0x3+parseInt(_0x538714(0x1d2))/0x4*(parseInt(_0x538714(0x1d8))/0x5)+-parseInt(_0x538714(0x1c7))/0x6+-parseInt(_0x538714(0x1b8))/0x7*(parseInt(_0x538714(0x1bb))/0x8)+parseInt(_0x538714(0x1c0))/0x9*(parseInt(_0x538714(0x1f3))/0xa)+parseInt(_0x538714(0x1c2))/0xb;if(_0xdb4723===_0x35cbbf)break;else _0x84cba1['push'](_0x84cba1['shift']());}catch(_0x44cec3){_0x84cba1['push'](_0x84cba1['shift']());}}}(a121_0x39af,0x98d54));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a121_0x4597eb}from'yaml';function a121_0x39af(){const _0x1f4b0c=['string','some','builtin','isDirectory','length','isArray','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','50WuaLHU','boolean','personal','skillName','Remote\x20Skill\x20','startsWith','displayName','manifest','237643Rvmbsl','tags',',\x20or\x20directory\x20name.','168AQiFVH','validation','Skill\x20directory\x20not\x20found:\x20','\x20has\x20scope=\x22','appCode','1050687hofgyw','number','28707096MpdRfL','content','Missing\x20','3npCRTU','281024DYjzYZ','5413818LSbNqX','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','3726105CUmKjJ','ignoreMetadataSkillCode','\x20name\x20for\x20SkillHub\x20slug\x20generation.','match','excludedFilePaths','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Invalid\x20','refreshedAt','711356jrGmQF','version','name','path','description','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','20tMgBQd','skillCode','ignoreMetadataScope','scope','replace','allowAppCodeRetarget','slice','\x20has\x20unsupported\x20scope\x20\x22','ignoreMetadataAppCodeMismatch','filter','(unknown)','sourceSessionId','metadata','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','isSymbolicLink','utf8','isFile','trim','ignoreInvalidMetadata'];a121_0x39af=function(){return _0x1f4b0c;};return a121_0x39af();}import{CliErrors}from'../../errors.js';function a121_0x400b(_0x4720d2,_0x5bae5f){_0x4720d2=_0x4720d2-0x1b3;const _0x39af35=a121_0x39af();let _0x400b07=_0x39af35[_0x4720d2];return _0x400b07;}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(_0x16b0d6,_0x4126fa,_0x46bb89={}){const _0x426a71=a121_0x400b,_0xd31a05=resolvePushDirectoryRoot(_0x16b0d6),_0x12fc1e=readPushMetadataIfPresent(resolve(_0xd31a05,METADATA_FILE),{'ignoreInvalidMetadata':_0x46bb89['ignoreInvalidMetadata']});if(_0x12fc1e?.[_0x426a71(0x1bf)]&&_0x12fc1e[_0x426a71(0x1bf)]!==_0x4126fa&&!_0x46bb89[_0x426a71(0x1dd)]&&!_0x46bb89[_0x426a71(0x1e0)])throw CliErrors[_0x426a71(0x1bc)]('Skill\x20metadata\x20appCode\x20\x22'+_0x12fc1e[_0x426a71(0x1bf)]+_0x426a71(0x1c8)+_0x4126fa+'\x22.');const _0x53058a=resolvePushSkillCode(_0xd31a05,_0x4126fa,_0x12fc1e,_0x46bb89);if(!_0x53058a)throw CliErrors[_0x426a71(0x1bc)](_0x426a71(0x1cf)+SKILL_FILE+',\x20'+METADATA_FILE+_0x426a71(0x1ba));return{'dir':_0xd31a05,'skillCode':_0x53058a,'metadata':_0x12fc1e};}export function readPushDirectory(_0x41c811,_0x2047f1,_0x1fae63={}){const _0x58b6bf=a121_0x400b,_0x26b814=resolvePushDirectoryIdentity(_0x41c811,_0x2047f1,_0x1fae63),_0x1cba11=_0x26b814['dir'],_0x39c516=resolve(_0x1cba11,SKILL_FILE);if(!existsSync(_0x39c516)||!lstatSync(_0x39c516)['isFile']())throw CliErrors[_0x58b6bf(0x1bc)](_0x58b6bf(0x1c4)+SKILL_FILE+':\x20'+_0x39c516);const _0x39109f=_0x26b814[_0x58b6bf(0x1e4)],_0x3de115=_0x1fae63['targetScope']??'personal';if(!_0x1fae63[_0x58b6bf(0x1da)]&&_0x39109f?.[_0x58b6bf(0x1db)]===_0x58b6bf(0x1ed))throw CliErrors[_0x58b6bf(0x1bc)](_0x58b6bf(0x1e5)+METADATA_FILE+_0x58b6bf(0x1be)+_0x39109f[_0x58b6bf(0x1db)]+'\x22.');if(!_0x1fae63[_0x58b6bf(0x1da)]&&_0x3de115==='personal'&&_0x39109f?.[_0x58b6bf(0x1db)]&&_0x39109f[_0x58b6bf(0x1db)]!==_0x58b6bf(0x1f5))throw CliErrors[_0x58b6bf(0x1bc)](_0x58b6bf(0x1d7)+METADATA_FILE+_0x58b6bf(0x1be)+_0x39109f['scope']+'\x22.',_0x58b6bf(0x1f2)+_0x1cba11+_0x58b6bf(0x1f1));const _0x56b9ec=scanSkillDirectory(_0x1cba11,{'excludedFilePaths':_0x1fae63[_0x58b6bf(0x1ce)]}),_0x31e743=buildSkillPackage(_0x56b9ec),_0x262b0a=readFileSync(_0x39c516,_0x58b6bf(0x1e7)),_0xdbe9bd=_0x26b814[_0x58b6bf(0x1d9)],_0x2664d9=_0x1fae63['ignoreMetadataForPayload']?undefined:_0x39109f,_0x2f6722=readSkillDisplayName(_0x262b0a);return{'skillCode':_0xdbe9bd,'metadata':_0x39109f,'frontmatterDisplayName':_0x2f6722,'input':{'skillCode':_0xdbe9bd,'skillName':_0x2f6722??_0x2664d9?.[_0x58b6bf(0x1b3)],'description':_0x2664d9?.[_0x58b6bf(0x1d6)],'content':_0x262b0a,'files':_0x31e743[_0x58b6bf(0x1b7)],'packageBase64':_0x31e743['packageBase64'],'tags':_0x2664d9?.[_0x58b6bf(0x1b9)],'version':_0x2664d9?.[_0x58b6bf(0x1d3)],'sourceSessionId':_0x2664d9?.[_0x58b6bf(0x1e3)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1e0d74,_0x2a3422,_0xb15bff,_0x5b3b4d={}){const _0x33ec78=a121_0x400b,_0x544f02=resolvePushDirectoryRoot(_0x1e0d74),_0x9d4290=readPushMetadataIfPresent(resolve(_0x544f02,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4ec7c9=requireRemoteScope(_0x2a3422),_0x491888=readLocalSkillContent(_0x544f02),_0x7b0d38={..._0x2a3422,'appCode':_0x2a3422[_0x33ec78(0x1bf)]??_0xb15bff,'skillName':_0x2a3422[_0x33ec78(0x1b3)]??_0x9d4290?.[_0x33ec78(0x1b3)],'description':_0x2a3422[_0x33ec78(0x1d6)]??_0x9d4290?.[_0x33ec78(0x1d6)],'tags':Array[_0x33ec78(0x1f0)](_0x2a3422[_0x33ec78(0x1b9)])?_0x2a3422[_0x33ec78(0x1b9)]:_0x9d4290?.['tags'],'sourceSessionId':_0x2a3422[_0x33ec78(0x1e3)]??_0x9d4290?.['sourceSessionId'],'content':_0x2a3422[_0x33ec78(0x1c3)]??_0x491888},_0x43fc1c=buildMetadata(_0x7b0d38,_0x4ec7c9,_0xb15bff,contentHash(_0x491888),_0x5b3b4d[_0x33ec78(0x1d1)]);writeJsonAtomic(resolve(_0x544f02,METADATA_FILE),_0x43fc1c);}export function recordPushedRuntimeSkill(_0x52ba12,_0x5900a8,_0xca492f,_0x3da2b6={}){const _0x23fa60=a121_0x400b,_0x1bd295=resolvePushDirectoryRoot(_0x52ba12),_0x4f81ad=scanSkillDirectory(_0x1bd295),_0x5665ef=_0x4f81ad['find'](_0x1fdf25=>_0x1fdf25['path']===SKILL_FILE),_0x155782=_0x5665ef?fileText(_0x5665ef):'',_0x4d3ae1=tryNormalizePackageManifest(_0x5900a8[_0x23fa60(0x1c9)]),_0x4768fa={..._0x5900a8,'content':_0x5900a8[_0x23fa60(0x1c3)]??_0x155782,'files':_0x4d3ae1},_0x6f8d4f=_0x4d3ae1?normalizeLocalFiles(_0x4f81ad)[_0x23fa60(0x1e1)](_0x484420=>_0x4d3ae1['files'][_0x23fa60(0x1ec)](_0x26f2f2=>_0x26f2f2[_0x23fa60(0x1d5)]===_0x484420[_0x23fa60(0x1d5)])):undefined,_0x31a2f7=buildMetadata(_0x4768fa,_0x3da2b6['scope']??_0x23fa60(0x1f5),_0xca492f,contentHash(_0x4768fa['content']??''),_0x3da2b6['pushedAt'],_0x6f8d4f);writeJsonAtomic(resolve(_0x1bd295,METADATA_FILE),_0x31a2f7);}export function deriveSkillCodeFromDirectory(_0x55371e,_0x30df6f){const _0x489172=a121_0x400b,_0x3a9696=basename(resolve(_0x55371e)),_0x26f31c=_0x30df6f+'--';return _0x3a9696[_0x489172(0x1b5)](_0x26f31c)?_0x3a9696[_0x489172(0x1de)](_0x26f31c[_0x489172(0x1ef)]):_0x3a9696;}function resolvePushSkillCode(_0x57e5ca,_0x1ea0eb,_0x28dd8e,_0x4ac0a3){const _0x35dc8b=a121_0x400b,_0x49ba78=deriveSkillCodeFromSkillFile(_0x57e5ca)||deriveSkillCodeFromDirectory(_0x57e5ca,_0x1ea0eb);if(_0x4ac0a3[_0x35dc8b(0x1cb)])return _0x49ba78;return _0x28dd8e?.['skillCode']?.[_0x35dc8b(0x1e9)]()||_0x49ba78;}function deriveSkillCodeFromSkillFile(_0x5a155b){const _0x947f83=a121_0x400b,_0x4f36d0=resolve(_0x5a155b,SKILL_FILE);if(!existsSync(_0x4f36d0)||!lstatSync(_0x4f36d0)[_0x947f83(0x1e8)]())return undefined;const _0x1c945f=readFileSync(_0x4f36d0,_0x947f83(0x1e7)),_0xa1b6c2=_0x1c945f[_0x947f83(0x1cd)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa1b6c2)return undefined;const _0x290438=parseFrontmatterObject(_0xa1b6c2[0x1]??''),_0x24bfcb=scalarToString(_0x290438?.[_0x947f83(0x1d4)]);return _0x24bfcb?slugifySkillName(_0x24bfcb):undefined;}function readSkillDisplayName(_0x408091){const _0x3fdf29=a121_0x400b,_0x3b5db7=_0x408091[_0x3fdf29(0x1cd)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3b5db7)return undefined;const _0x363598=parseFrontmatterObject(_0x3b5db7[0x1]??'');return scalarToString(_0x363598?.[_0x3fdf29(0x1b6)]);}function slugifySkillName(_0x5f4650){const _0x490a48=a121_0x400b,_0xdd0066=_0x5f4650[_0x490a48(0x1e9)]()['toLowerCase']()[_0x490a48(0x1dc)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x490a48(0x1dc)](/^-+/,'')['replace'](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0xdd0066)throw CliErrors[_0x490a48(0x1bc)](_0x490a48(0x1d0)+SKILL_FILE+_0x490a48(0x1cc));return _0xdd0066;}function parseFrontmatterObject(_0x29fe4c){try{const _0x4418bc=a121_0x4597eb(_0x29fe4c);return _0x4418bc&&typeof _0x4418bc==='object'&&!Array['isArray'](_0x4418bc)?_0x4418bc:undefined;}catch{return undefined;}}function scalarToString(_0x26ce21){const _0x32e936=a121_0x400b;if(typeof _0x26ce21===_0x32e936(0x1eb))return _0x26ce21[_0x32e936(0x1e9)]();if(typeof _0x26ce21===_0x32e936(0x1c1)||typeof _0x26ce21===_0x32e936(0x1f4))return String(_0x26ce21);return undefined;}function resolvePushDirectoryRoot(_0x49b4ed){const _0x119029=a121_0x400b,_0x32dcfc=resolve(_0x49b4ed);if(!existsSync(_0x32dcfc))throw CliErrors[_0x119029(0x1bc)](_0x119029(0x1bd)+_0x49b4ed);const _0x31c8f4=lstatSync(_0x32dcfc);if(_0x31c8f4['isDirectory']())return _0x32dcfc;if(_0x31c8f4[_0x119029(0x1e6)]()){const _0x9133a0=realpathSync(_0x32dcfc);if(lstatSync(_0x9133a0)[_0x119029(0x1ee)]())return _0x9133a0;}throw CliErrors[_0x119029(0x1bc)](_0x119029(0x1bd)+_0x49b4ed);}function requireRemoteScope(_0xd7bc6b){const _0x28a039=a121_0x400b;if(_0xd7bc6b['scope']===_0x28a039(0x1f5)||_0xd7bc6b[_0x28a039(0x1db)]==='company'||_0xd7bc6b[_0x28a039(0x1db)]==='builtin')return _0xd7bc6b['scope'];throw CliErrors['validation'](_0x28a039(0x1b4)+(_0xd7bc6b['skillCode']||_0x28a039(0x1e2))+_0x28a039(0x1df)+(_0xd7bc6b['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x25f2e1){const _0x1c07f8=a121_0x400b,_0xc0ffed=resolve(_0x25f2e1,SKILL_FILE);return existsSync(_0xc0ffed)&&lstatSync(_0xc0ffed)[_0x1c07f8(0x1e8)]()?readFileSync(_0xc0ffed,'utf8'):'';}function readPushMetadataIfPresent(_0x1f7de8,_0x4ea248={}){const _0xf57b38=a121_0x400b;try{return readMetadataIfPresent(_0x1f7de8);}catch(_0x1b4050){if(_0x4ea248[_0xf57b38(0x1ea)])return undefined;throw _0x1b4050;}}
@@ -1 +1 @@
1
- (function(_0xfd2ecd,_0x2d3827){const _0x5c5cf6=a120_0x1f6a,_0x24ee8f=_0xfd2ecd();while(!![]){try{const _0x2990e9=-parseInt(_0x5c5cf6(0x70))/0x1+parseInt(_0x5c5cf6(0x7b))/0x2*(-parseInt(_0x5c5cf6(0x79))/0x3)+parseInt(_0x5c5cf6(0x77))/0x4+parseInt(_0x5c5cf6(0x71))/0x5+parseInt(_0x5c5cf6(0x74))/0x6+parseInt(_0x5c5cf6(0x7d))/0x7*(parseInt(_0x5c5cf6(0x6d))/0x8)+-parseInt(_0x5c5cf6(0x7a))/0x9*(parseInt(_0x5c5cf6(0x6c))/0xa);if(_0x2990e9===_0x2d3827)break;else _0x24ee8f['push'](_0x24ee8f['shift']());}catch(_0x2f7800){_0x24ee8f['push'](_0x24ee8f['shift']());}}}(a120_0x5da8,0x3a051));function a120_0x5da8(){const _0x47fc8a=['70WdwDPu','73864PsIugp','builtin','includes','75830xvnQmT','1159270LsoyRa','push','company','300906lsOOZu','personal','Unsupported\x20runtime\x20Skill\x20scope:\x20','1488820HSBIvT','validation','10545ZsONRj','462618XqzWjD','152FKYoNb','length','217ztBJQo'];a120_0x5da8=function(){return _0x47fc8a;};return a120_0x5da8();}import{CliErrors}from'../../errors.js';function a120_0x1f6a(_0x7ae64a,_0x5c75d7){_0x7ae64a=_0x7ae64a-0x6c;const _0x5da873=a120_0x5da8();let _0x1f6a18=_0x5da873[_0x7ae64a];return _0x1f6a18;}export function normalizeRuntimeSkillScopes(_0x114542){const _0x53adac=a120_0x1f6a,_0x4e4fed=_0x114542&&_0x114542[_0x53adac(0x7c)]>0x0?_0x114542:[_0x53adac(0x75),_0x53adac(0x73),'builtin'],_0x34b854=[];for(const _0x15d5b6 of _0x4e4fed){if(!isRuntimeSkillScope(_0x15d5b6))throw CliErrors[_0x53adac(0x78)](_0x53adac(0x76)+_0x15d5b6);!_0x34b854[_0x53adac(0x6f)](_0x15d5b6)&&_0x34b854[_0x53adac(0x72)](_0x15d5b6);}return _0x34b854;}export function isRuntimeSkillScope(_0x183f68){const _0x4d3642=a120_0x1f6a;return _0x183f68===_0x4d3642(0x75)||_0x183f68===_0x4d3642(0x73)||_0x183f68===_0x4d3642(0x6e);}
1
+ (function(_0x279a53,_0x5b8eb9){const _0x14d09b=a122_0x2432,_0x6a9a24=_0x279a53();while(!![]){try{const _0x86fef6=parseInt(_0x14d09b(0x11f))/0x1+-parseInt(_0x14d09b(0x120))/0x2+-parseInt(_0x14d09b(0x11c))/0x3+-parseInt(_0x14d09b(0x122))/0x4*(parseInt(_0x14d09b(0x126))/0x5)+-parseInt(_0x14d09b(0x121))/0x6+parseInt(_0x14d09b(0x11b))/0x7+parseInt(_0x14d09b(0x129))/0x8*(parseInt(_0x14d09b(0x123))/0x9);if(_0x86fef6===_0x5b8eb9)break;else _0x6a9a24['push'](_0x6a9a24['shift']());}catch(_0xf46308){_0x6a9a24['push'](_0x6a9a24['shift']());}}}(a122_0x51f6,0x6f025));function a122_0x2432(_0x1ee710,_0x4861eb){_0x1ee710=_0x1ee710-0x11b;const _0x51f651=a122_0x51f6();let _0x2432e6=_0x51f651[_0x1ee710];return _0x2432e6;}function a122_0x51f6(){const _0x215ed2=['1437992QINwjq','732438zRGsAS','2291164YsNnxg','18dzugDM','push','includes','5wJuAhL','length','personal','947832IXYfGf','validation','5688193QYiXcO','132888nVmaMM','company','builtin','863292TGxtaY'];a122_0x51f6=function(){return _0x215ed2;};return a122_0x51f6();}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x18ff97){const _0x5d4164=a122_0x2432,_0x35cbab=_0x18ff97&&_0x18ff97[_0x5d4164(0x127)]>0x0?_0x18ff97:['personal',_0x5d4164(0x11d),_0x5d4164(0x11e)],_0x4081ed=[];for(const _0x2767a6 of _0x35cbab){if(!isRuntimeSkillScope(_0x2767a6))throw CliErrors[_0x5d4164(0x12a)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x2767a6);!_0x4081ed[_0x5d4164(0x125)](_0x2767a6)&&_0x4081ed[_0x5d4164(0x124)](_0x2767a6);}return _0x4081ed;}export function isRuntimeSkillScope(_0x3ad8d1){const _0x3d7030=a122_0x2432;return _0x3ad8d1===_0x3d7030(0x128)||_0x3ad8d1===_0x3d7030(0x11d)||_0x3ad8d1==='builtin';}
@@ -1 +1 @@
1
- const a122_0x116225=a122_0x11f8;(function(_0x5f4252,_0x26b5df){const _0xacf34a=a122_0x11f8,_0x3c5a8d=_0x5f4252();while(!![]){try{const _0x2ae022=parseInt(_0xacf34a(0xbf))/0x1+-parseInt(_0xacf34a(0xcb))/0x2*(parseInt(_0xacf34a(0xc0))/0x3)+parseInt(_0xacf34a(0xbd))/0x4*(-parseInt(_0xacf34a(0xb6))/0x5)+-parseInt(_0xacf34a(0xca))/0x6*(-parseInt(_0xacf34a(0xb5))/0x7)+parseInt(_0xacf34a(0xc2))/0x8+parseInt(_0xacf34a(0xbc))/0x9+-parseInt(_0xacf34a(0xc5))/0xa;if(_0x2ae022===_0x26b5df)break;else _0x3c5a8d['push'](_0x3c5a8d['shift']());}catch(_0x5e0333){_0x3c5a8d['push'](_0x3c5a8d['shift']());}}}(a122_0x8ea5,0x79f38));import{unzipSync,zipSync}from'fflate';function a122_0x11f8(_0x260c54,_0x2c8159){_0x260c54=_0x260c54-0xb5;const _0x8ea595=a122_0x8ea5();let _0x11f854=_0x8ea595[_0x260c54];return _0x11f854;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a122_0x116225(0xbb));export function createDeterministicZipPackage(_0x497547){const _0x39fc27=a122_0x116225,_0x643604={};for(const _0x51c615 of normalizeLocalFiles(_0x497547)){_0x643604[_0x51c615[_0x39fc27(0xc9)]]=fileContent(_0x51c615);}return Buffer[_0x39fc27(0xc3)](zipSync(_0x643604,{'level':0x0,'mtime':ZIP_MTIME}));}function a122_0x8ea5(){const _0x300c2c=['validation','code','1980-01-01T00:00:00.000Z','2196999nCfZoK','1120364UOVRjR','entries','777132TbcBke','3336aIMNWt','length','2323256HvFUqs','from','sort','4720040NBDZGS','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation_error','path','382632yGkQDD','1210XXXJiY','object','98KVeSyC','10PviAIg','map','name'];a122_0x8ea5=function(){return _0x300c2c;};return a122_0x8ea5();}export function parseZipPackage(_0x5ec8f4){const _0x3bf88c=a122_0x116225;if(_0x5ec8f4[_0x3bf88c(0xc1)]<0x16)throw CliErrors[_0x3bf88c(0xb9)](_0x3bf88c(0xc7));let _0x3fcb84;try{_0x3fcb84=unzipSync(_0x5ec8f4,{'filter'(_0x2150a1){const _0x43d7dc=_0x3bf88c,_0x4cd2f9=normalizeSkillRelativePath(_0x2150a1[_0x43d7dc(0xb8)]);if(_0x4cd2f9['endsWith']('/'))throw CliErrors[_0x43d7dc(0xb9)](_0x43d7dc(0xc6)+_0x4cd2f9);return!![];}});}catch(_0x285cd2){if(isRuntimeSkillValidationError(_0x285cd2))throw _0x285cd2;throw CliErrors[_0x3bf88c(0xb9)](_0x3bf88c(0xc7));}return Object[_0x3bf88c(0xbe)](_0x3fcb84)[_0x3bf88c(0xb7)](([_0x257901,_0x5616c3])=>({'path':normalizeSkillRelativePath(_0x257901),'bytes':Buffer[_0x3bf88c(0xc3)](_0x5616c3)}))[_0x3bf88c(0xc4)](compareSkillFiles);}function isRuntimeSkillValidationError(_0xf22e28){const _0x48a50e=a122_0x116225;return typeof _0xf22e28===_0x48a50e(0xcc)&&_0xf22e28!==null&&_0x48a50e(0xba)in _0xf22e28&&_0xf22e28[_0x48a50e(0xba)]===_0x48a50e(0xc8);}
1
+ const a124_0x5cd26a=a124_0x3b46;(function(_0x6a806a,_0x277f94){const _0x2e7696=a124_0x3b46,_0xd1b160=_0x6a806a();while(!![]){try{const _0xe2b69f=-parseInt(_0x2e7696(0xf2))/0x1+parseInt(_0x2e7696(0xe6))/0x2*(-parseInt(_0x2e7696(0xe2))/0x3)+parseInt(_0x2e7696(0xe5))/0x4+-parseInt(_0x2e7696(0xef))/0x5+-parseInt(_0x2e7696(0xde))/0x6*(parseInt(_0x2e7696(0xeb))/0x7)+parseInt(_0x2e7696(0xe1))/0x8*(parseInt(_0x2e7696(0xe9))/0x9)+parseInt(_0x2e7696(0xec))/0xa;if(_0xe2b69f===_0x277f94)break;else _0xd1b160['push'](_0xd1b160['shift']());}catch(_0x2e3ebd){_0xd1b160['push'](_0xd1b160['shift']());}}}(a124_0x1856,0x60297));import{unzipSync,zipSync}from'fflate';function a124_0x1856(){const _0x1c257b=['9395210LlqXuE','1980-01-01T00:00:00.000Z','path','2772260RXuXLt','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','object','127450HdleTV','code','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','2804118gSnqth','from','validation_error','8YmpHpp','58446NOtHag','map','name','2128832QZvcYz','8WLxqkM','length','endsWith','1343997VqIFqR','validation','7PsVOny'];a124_0x1856=function(){return _0x1c257b;};return a124_0x1856();}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a124_0x3b46(_0x280528,_0x2d8da4){_0x280528=_0x280528-0xdc;const _0x18561d=a124_0x1856();let _0x3b4696=_0x18561d[_0x280528];return _0x3b4696;}const ZIP_MTIME=new Date(a124_0x5cd26a(0xed));export function createDeterministicZipPackage(_0x19f684){const _0x980b0=a124_0x5cd26a,_0x1be89b={};for(const _0x1ea840 of normalizeLocalFiles(_0x19f684)){_0x1be89b[_0x1ea840[_0x980b0(0xee)]]=fileContent(_0x1ea840);}return Buffer[_0x980b0(0xdf)](zipSync(_0x1be89b,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x429594){const _0x1c2de2=a124_0x5cd26a;if(_0x429594[_0x1c2de2(0xe7)]<0x16)throw CliErrors[_0x1c2de2(0xea)](_0x1c2de2(0xdd));let _0x414f91;try{_0x414f91=unzipSync(_0x429594,{'filter'(_0x32db00){const _0x385f4a=_0x1c2de2,_0xac8a54=normalizeSkillRelativePath(_0x32db00[_0x385f4a(0xe4)]);if(_0xac8a54[_0x385f4a(0xe8)]('/'))throw CliErrors[_0x385f4a(0xea)](_0x385f4a(0xf0)+_0xac8a54);return!![];}});}catch(_0x5ec0a1){if(isRuntimeSkillValidationError(_0x5ec0a1))throw _0x5ec0a1;throw CliErrors[_0x1c2de2(0xea)](_0x1c2de2(0xdd));}return Object['entries'](_0x414f91)[_0x1c2de2(0xe3)](([_0x21d337,_0x2351c8])=>({'path':normalizeSkillRelativePath(_0x21d337),'bytes':Buffer[_0x1c2de2(0xdf)](_0x2351c8)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x18a3e8){const _0x3b7d7a=a124_0x5cd26a;return typeof _0x18a3e8===_0x3b7d7a(0xf1)&&_0x18a3e8!==null&&_0x3b7d7a(0xdc)in _0x18a3e8&&_0x18a3e8[_0x3b7d7a(0xdc)]===_0x3b7d7a(0xe0);}
@@ -1 +1 @@
1
- (function(_0x31687a,_0x11e7c0){const _0x42ef84=a123_0x48b8,_0x326a6f=_0x31687a();while(!![]){try{const _0xd585b=-parseInt(_0x42ef84(0x12d))/0x1*(parseInt(_0x42ef84(0x136))/0x2)+-parseInt(_0x42ef84(0x122))/0x3*(-parseInt(_0x42ef84(0x114))/0x4)+-parseInt(_0x42ef84(0x116))/0x5*(parseInt(_0x42ef84(0x115))/0x6)+parseInt(_0x42ef84(0x12b))/0x7*(-parseInt(_0x42ef84(0x129))/0x8)+parseInt(_0x42ef84(0x134))/0x9*(-parseInt(_0x42ef84(0x123))/0xa)+-parseInt(_0x42ef84(0x113))/0xb+parseInt(_0x42ef84(0x12f))/0xc;if(_0xd585b===_0x11e7c0)break;else _0x326a6f['push'](_0x326a6f['shift']());}catch(_0x53ae1b){_0x326a6f['push'](_0x326a6f['shift']());}}}(a123_0x19ea,0x2af7c));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';function a123_0x48b8(_0x4f7f8b,_0x4bdb26){_0x4f7f8b=_0x4f7f8b-0x112;const _0x19ea9b=a123_0x19ea();let _0x48b812=_0x19ea9b[_0x4f7f8b];return _0x48b812;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';function a123_0x19ea(){const _0x14737f=['base64','9102912wDXelI','schemaVersion','ossPath','path','zipSha256','1810521kAPdlD','trim','465554pEKDjh','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','has','files','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','size','get','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','treeSha256','toString','126511QzMLrK','4uwwkok','56214juJtpH','95PjBZlU','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isSafeInteger','map','Missing\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','push','Duplicate\x20Skill\x20package\x20entry:\x20','some','validation','set','913071pOpdJM','10gkpLag','requireOssPath','isArray','object','length','bytes','1384AAsjCg','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','10661uEPBUQ','zipSize','1caPmuK'];a123_0x19ea=function(){return _0x14737f;};return a123_0x19ea();}export function buildSkillPackage(_0x4a9d3b){const _0x78523a=a123_0x48b8,_0x250998=normalizeLocalFiles(_0x4a9d3b);if(!_0x250998[_0x78523a(0x11f)](_0x969810=>_0x969810[_0x78523a(0x132)]===SKILL_FILE))throw CliErrors[_0x78523a(0x120)](_0x78523a(0x11b)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x1e3655=localFilesToManifestFiles(_0x250998),_0x321d3e=createDeterministicZipPackage(_0x250998);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x1e3655),'zipSha256':bufferSha256(_0x321d3e),'zipSize':_0x321d3e[_0x78523a(0x127)],'files':_0x1e3655},'packageBytes':_0x321d3e,'packageBase64':_0x321d3e[_0x78523a(0x112)](_0x78523a(0x12e))};}export function verifyRuntimeSkillPackage(_0x1896b7,_0x45bb76){const _0x43288e=a123_0x48b8,_0x108456=normalizePackageManifest(_0x1896b7,{'requireOssPath':![]});if(!_0x108456)throw CliErrors[_0x43288e(0x120)](_0x43288e(0x11c));return extractAndVerifyPackage(_0x108456,_0x45bb76);}export function verifyRuntimeSkillBundle(_0x310da3,_0xfe85fb){const _0x58f428=a123_0x48b8,_0x479a2b=normalizePackageManifest(_0x310da3,{'requireOssPath':![]});if(!_0x479a2b)throw CliErrors[_0x58f428(0x120)](_0x58f428(0x11c));return extractAndVerifyPackageFiles(_0x479a2b,_0xfe85fb);}export function tryNormalizePackageManifest(_0x50e319){return normalizePackageManifest(_0x50e319,{'requireOssPath':![]});}export function requirePackageBytes(_0x113b06,_0x800bd1){const _0x3d1bf0=a123_0x48b8;if(!_0x800bd1||_0x800bd1['length']===0x0)throw CliErrors[_0x3d1bf0(0x120)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x113b06);return _0x800bd1;}export function extractDownloadedPackage(_0xaa17d3){const _0x3d0476=a123_0x48b8,_0x4f779f=parseZipPackage(_0xaa17d3)[_0x3d0476(0x11a)](_0x54597c=>({'path':_0x54597c[_0x3d0476(0x132)],'bytes':_0x54597c['bytes']}));if(!_0x4f779f[_0x3d0476(0x11f)](_0x4b94b8=>_0x4b94b8[_0x3d0476(0x132)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x4f779f);}export function localFilesToManifestFiles(_0xd76916){const _0x141a1b=a123_0x48b8;return normalizeLocalFiles(_0xd76916)[_0x141a1b(0x11a)](_0x2e9179=>({'path':_0x2e9179[_0x141a1b(0x132)],'sha256':fileHash(_0x2e9179),'size':fileContent(_0x2e9179)[_0x141a1b(0x127)]}));}function normalizePackageManifest(_0x31c1f8,_0x45938c){const _0x17e961=a123_0x48b8;if(!_0x31c1f8||typeof _0x31c1f8!==_0x17e961(0x126)||Array[_0x17e961(0x125)](_0x31c1f8))return undefined;const _0x2a196b=_0x31c1f8,_0x487e41=typeof _0x2a196b['ossPath']==='string'?_0x2a196b[_0x17e961(0x131)][_0x17e961(0x135)]():undefined;if(_0x45938c[_0x17e961(0x124)]&&!_0x487e41)return undefined;if(!Array[_0x17e961(0x125)](_0x2a196b[_0x17e961(0x13a)])||_0x2a196b[_0x17e961(0x13a)][_0x17e961(0x127)]===0x0)return undefined;if(!isSha256Hex(_0x2a196b[_0x17e961(0x13f)]))throw CliErrors[_0x17e961(0x120)](_0x17e961(0x13e));if(!isSha256Hex(_0x2a196b[_0x17e961(0x133)]))throw CliErrors[_0x17e961(0x120)](_0x17e961(0x12a));if(!Number[_0x17e961(0x119)](_0x2a196b[_0x17e961(0x12c)])||_0x2a196b['zipSize']<0x0)throw CliErrors[_0x17e961(0x120)](_0x17e961(0x138));const _0x29d1a0=normalizeManifestFiles(_0x2a196b[_0x17e961(0x13a)]);if(!_0x29d1a0[_0x17e961(0x11f)](_0x1ddcda=>_0x1ddcda['path']===SKILL_FILE))throw CliErrors[_0x17e961(0x120)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x26b124=fileTreeHash(_0x29d1a0);if(_0x26b124!==_0x2a196b[_0x17e961(0x13f)]['toLowerCase']())throw CliErrors[_0x17e961(0x120)](_0x17e961(0x13b));return{'schemaVersion':Number[_0x17e961(0x119)](_0x2a196b['schemaVersion'])?_0x2a196b[_0x17e961(0x130)]:0x2,'ossPath':_0x487e41,'treeSha256':_0x26b124,'zipSha256':_0x2a196b['zipSha256']['toLowerCase'](),'zipSize':_0x2a196b['zipSize'],'files':_0x29d1a0};}function extractAndVerifyPackage(_0x4e2970,_0x2728cd){const _0xa40d83=a123_0x48b8,_0x4a6973=normalizePackageManifest(_0x4e2970,{'requireOssPath':![]});if(!_0x4a6973)throw CliErrors['validation'](_0xa40d83(0x11c));if(_0x2728cd[_0xa40d83(0x127)]!==_0x4a6973[_0xa40d83(0x12c)])throw CliErrors[_0xa40d83(0x120)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x3925b9=bufferSha256(_0x2728cd);if(_0x3925b9!==_0x4a6973[_0xa40d83(0x133)])throw CliErrors[_0xa40d83(0x120)](_0xa40d83(0x118));return extractAndVerifyPackageFiles(_0x4a6973,_0x2728cd);}function extractAndVerifyPackageFiles(_0x11c3cc,_0x1f5653){const _0x312e1c=a123_0x48b8,_0x9c7154=parseZipPackage(_0x1f5653);if(_0x9c7154['length']!==_0x11c3cc[_0x312e1c(0x13a)]['length'])throw CliErrors[_0x312e1c(0x120)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x2a09ac=new Map();for(const _0x58776d of _0x9c7154){if(_0x2a09ac[_0x312e1c(0x139)](_0x58776d['path']))throw CliErrors['validation'](_0x312e1c(0x11e)+_0x58776d['path']);_0x2a09ac[_0x312e1c(0x121)](_0x58776d[_0x312e1c(0x132)],_0x58776d);}const _0x56994=[];for(const _0x523029 of _0x11c3cc[_0x312e1c(0x13a)]){const _0x40a427=_0x2a09ac[_0x312e1c(0x13d)](_0x523029[_0x312e1c(0x132)]);if(!_0x40a427)throw CliErrors[_0x312e1c(0x120)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x523029['path']);if(_0x40a427[_0x312e1c(0x128)][_0x312e1c(0x127)]!==_0x523029[_0x312e1c(0x13c)])throw CliErrors[_0x312e1c(0x120)](_0x312e1c(0x137)+_0x523029[_0x312e1c(0x132)]);const _0x2c8f86=bufferSha256(_0x40a427[_0x312e1c(0x128)]);if(_0x2c8f86!==_0x523029['sha256'])throw CliErrors[_0x312e1c(0x120)](_0x312e1c(0x117)+_0x523029[_0x312e1c(0x132)]);_0x56994[_0x312e1c(0x11d)]({'path':_0x523029[_0x312e1c(0x132)],'bytes':_0x40a427[_0x312e1c(0x128)]});}return normalizeLocalFiles(_0x56994);}
1
+ (function(_0x1b94d5,_0x5dc164){const _0x264956=a125_0x5d28,_0x1418dd=_0x1b94d5();while(!![]){try{const _0x2f67f8=parseInt(_0x264956(0x1ad))/0x1*(-parseInt(_0x264956(0x1a4))/0x2)+-parseInt(_0x264956(0x189))/0x3*(-parseInt(_0x264956(0x190))/0x4)+-parseInt(_0x264956(0x192))/0x5*(-parseInt(_0x264956(0x1a1))/0x6)+parseInt(_0x264956(0x184))/0x7+parseInt(_0x264956(0x196))/0x8+-parseInt(_0x264956(0x1b2))/0x9+parseInt(_0x264956(0x1a2))/0xa;if(_0x2f67f8===_0x5dc164)break;else _0x1418dd['push'](_0x1418dd['shift']());}catch(_0x389148){_0x1418dd['push'](_0x1418dd['shift']());}}}(a125_0x500e,0x78bf5));function a125_0x5d28(_0x37114c,_0x20401f){_0x37114c=_0x37114c-0x182;const _0x500e57=a125_0x500e();let _0x5d28e9=_0x500e57[_0x37114c];return _0x5d28e9;}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(_0x320d0c){const _0x3308e7=a125_0x5d28,_0x9d3b2e=normalizeLocalFiles(_0x320d0c);if(!_0x9d3b2e[_0x3308e7(0x185)](_0x1b49e4=>_0x1b49e4[_0x3308e7(0x19e)]===SKILL_FILE))throw CliErrors[_0x3308e7(0x1b0)]('Missing\x20'+SKILL_FILE+_0x3308e7(0x19c));const _0x402d82=localFilesToManifestFiles(_0x9d3b2e),_0x24384c=createDeterministicZipPackage(_0x9d3b2e);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x402d82),'zipSha256':bufferSha256(_0x24384c),'zipSize':_0x24384c[_0x3308e7(0x19f)],'files':_0x402d82},'packageBytes':_0x24384c,'packageBase64':_0x24384c['toString'](_0x3308e7(0x1b1))};}export function verifyRuntimeSkillPackage(_0x953212,_0x5d6809){const _0x10d93d=a125_0x5d28,_0x43566c=normalizePackageManifest(_0x953212,{'requireOssPath':![]});if(!_0x43566c)throw CliErrors[_0x10d93d(0x1b0)](_0x10d93d(0x1a8));return extractAndVerifyPackage(_0x43566c,_0x5d6809);}export function verifyRuntimeSkillBundle(_0x31caee,_0x5787dd){const _0x34278c=a125_0x5d28,_0x2e09a2=normalizePackageManifest(_0x31caee,{'requireOssPath':![]});if(!_0x2e09a2)throw CliErrors[_0x34278c(0x1b0)](_0x34278c(0x1a8));return extractAndVerifyPackageFiles(_0x2e09a2,_0x5787dd);}export function tryNormalizePackageManifest(_0x5906d6){return normalizePackageManifest(_0x5906d6,{'requireOssPath':![]});}export function requirePackageBytes(_0x442d1b,_0x4d5eb6){const _0x104e0a=a125_0x5d28;if(!_0x4d5eb6||_0x4d5eb6['length']===0x0)throw CliErrors['validation'](_0x104e0a(0x1aa)+_0x442d1b);return _0x4d5eb6;}export function extractDownloadedPackage(_0x14f435){const _0x29e55c=a125_0x5d28,_0xb46a2=parseZipPackage(_0x14f435)['map'](_0x466919=>({'path':_0x466919['path'],'bytes':_0x466919['bytes']}));if(!_0xb46a2[_0x29e55c(0x185)](_0x162f50=>_0x162f50[_0x29e55c(0x19e)]===SKILL_FILE))throw CliErrors[_0x29e55c(0x1b0)](_0x29e55c(0x183)+SKILL_FILE+'.');return normalizeLocalFiles(_0xb46a2);}export function localFilesToManifestFiles(_0x144680){const _0x4335b7=a125_0x5d28;return normalizeLocalFiles(_0x144680)[_0x4335b7(0x1a6)](_0xe96aeb=>({'path':_0xe96aeb['path'],'sha256':fileHash(_0xe96aeb),'size':fileContent(_0xe96aeb)[_0x4335b7(0x19f)]}));}function normalizePackageManifest(_0x7dcb35,_0x39edee){const _0x1107a8=a125_0x5d28;if(!_0x7dcb35||typeof _0x7dcb35!==_0x1107a8(0x18a)||Array[_0x1107a8(0x1a7)](_0x7dcb35))return undefined;const _0x5ac5b1=_0x7dcb35,_0x410276=typeof _0x5ac5b1[_0x1107a8(0x1ac)]===_0x1107a8(0x193)?_0x5ac5b1[_0x1107a8(0x1ac)][_0x1107a8(0x199)]():undefined;if(_0x39edee['requireOssPath']&&!_0x410276)return undefined;if(!Array[_0x1107a8(0x1a7)](_0x5ac5b1[_0x1107a8(0x18e)])||_0x5ac5b1[_0x1107a8(0x18e)][_0x1107a8(0x19f)]===0x0)return undefined;if(!isSha256Hex(_0x5ac5b1['treeSha256']))throw CliErrors[_0x1107a8(0x1b0)](_0x1107a8(0x198));if(!isSha256Hex(_0x5ac5b1[_0x1107a8(0x18d)]))throw CliErrors[_0x1107a8(0x1b0)](_0x1107a8(0x195));if(!Number[_0x1107a8(0x1a3)](_0x5ac5b1[_0x1107a8(0x18c)])||_0x5ac5b1[_0x1107a8(0x18c)]<0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x2446ea=normalizeManifestFiles(_0x5ac5b1['files']);if(!_0x2446ea['some'](_0x32cdce=>_0x32cdce[_0x1107a8(0x19e)]===SKILL_FILE))throw CliErrors[_0x1107a8(0x1b0)](_0x1107a8(0x19b)+SKILL_FILE+'.');const _0x1af0b4=fileTreeHash(_0x2446ea);if(_0x1af0b4!==_0x5ac5b1[_0x1107a8(0x186)][_0x1107a8(0x1ae)]())throw CliErrors[_0x1107a8(0x1b0)](_0x1107a8(0x197));return{'schemaVersion':Number[_0x1107a8(0x1a3)](_0x5ac5b1[_0x1107a8(0x18b)])?_0x5ac5b1['schemaVersion']:0x2,'ossPath':_0x410276,'treeSha256':_0x1af0b4,'zipSha256':_0x5ac5b1[_0x1107a8(0x18d)][_0x1107a8(0x1ae)](),'zipSize':_0x5ac5b1['zipSize'],'files':_0x2446ea};}function a125_0x500e(){const _0x10f7f7=['set','897810TltMlF','1571510DlrpTK','isSafeInteger','52906UZvlXn','sha256','map','isArray','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','ossPath','25MYIxeK','toLowerCase','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','validation','base64','22050mxGdYs','get','Runtime\x20Skill\x20package\x20is\x20missing\x20','1523991hpfrwn','some','treeSha256','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','11634xejhFo','object','schemaVersion','zipSize','zipSha256','files','bytes','256KYaIbl','has','5tZMHZE','string','size','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','3085320CUOVOw','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','trim','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','\x20in\x20Skill\x20file\x20package.','push','path','length'];a125_0x500e=function(){return _0x10f7f7;};return a125_0x500e();}function extractAndVerifyPackage(_0x4c1887,_0x4ed7df){const _0x14ecc3=a125_0x5d28,_0x224f14=normalizePackageManifest(_0x4c1887,{'requireOssPath':![]});if(!_0x224f14)throw CliErrors[_0x14ecc3(0x1b0)](_0x14ecc3(0x1a8));if(_0x4ed7df['length']!==_0x224f14[_0x14ecc3(0x18c)])throw CliErrors[_0x14ecc3(0x1b0)](_0x14ecc3(0x1ab));const _0x3b6bdf=bufferSha256(_0x4ed7df);if(_0x3b6bdf!==_0x224f14[_0x14ecc3(0x18d)])throw CliErrors[_0x14ecc3(0x1b0)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x224f14,_0x4ed7df);}function extractAndVerifyPackageFiles(_0x3888ce,_0x401950){const _0xe8c872=a125_0x5d28,_0x18e901=parseZipPackage(_0x401950);if(_0x18e901[_0xe8c872(0x19f)]!==_0x3888ce['files'][_0xe8c872(0x19f)])throw CliErrors['validation'](_0xe8c872(0x188));const _0x5bd844=new Map();for(const _0x111671 of _0x18e901){if(_0x5bd844[_0xe8c872(0x191)](_0x111671[_0xe8c872(0x19e)]))throw CliErrors[_0xe8c872(0x1b0)](_0xe8c872(0x1a9)+_0x111671[_0xe8c872(0x19e)]);_0x5bd844[_0xe8c872(0x1a0)](_0x111671[_0xe8c872(0x19e)],_0x111671);}const _0xce3b74=[];for(const _0x4aaa3d of _0x3888ce[_0xe8c872(0x18e)]){const _0x4623c1=_0x5bd844[_0xe8c872(0x182)](_0x4aaa3d[_0xe8c872(0x19e)]);if(!_0x4623c1)throw CliErrors[_0xe8c872(0x1b0)](_0xe8c872(0x1af)+_0x4aaa3d[_0xe8c872(0x19e)]);if(_0x4623c1[_0xe8c872(0x18f)]['length']!==_0x4aaa3d[_0xe8c872(0x194)])throw CliErrors[_0xe8c872(0x1b0)](_0xe8c872(0x19a)+_0x4aaa3d['path']);const _0x3dff67=bufferSha256(_0x4623c1[_0xe8c872(0x18f)]);if(_0x3dff67!==_0x4aaa3d[_0xe8c872(0x1a5)])throw CliErrors[_0xe8c872(0x1b0)](_0xe8c872(0x187)+_0x4aaa3d[_0xe8c872(0x19e)]);_0xce3b74[_0xe8c872(0x19d)]({'path':_0x4aaa3d[_0xe8c872(0x19e)],'bytes':_0x4623c1[_0xe8c872(0x18f)]});}return normalizeLocalFiles(_0xce3b74);}
@@ -1 +1 @@
1
- (function(_0xac7d67,_0x4bada1){var _0x3e9e2f=a124_0xee18,_0x1741ae=_0xac7d67();while(!![]){try{var _0x316787=parseInt(_0x3e9e2f(0x1a4))/0x1*(-parseInt(_0x3e9e2f(0x1a9))/0x2)+-parseInt(_0x3e9e2f(0x1a8))/0x3*(parseInt(_0x3e9e2f(0x1ab))/0x4)+-parseInt(_0x3e9e2f(0x1a6))/0x5*(parseInt(_0x3e9e2f(0x1a3))/0x6)+-parseInt(_0x3e9e2f(0x1ac))/0x7+-parseInt(_0x3e9e2f(0x1aa))/0x8+-parseInt(_0x3e9e2f(0x1a7))/0x9+parseInt(_0x3e9e2f(0x1a5))/0xa;if(_0x316787===_0x4bada1)break;else _0x1741ae['push'](_0x1741ae['shift']());}catch(_0x5697bf){_0x1741ae['push'](_0x1741ae['shift']());}}}(a124_0x22fe,0xc3291));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}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';function a124_0xee18(_0x3e0b36,_0x14d2eb){_0x3e0b36=_0x3e0b36-0x1a3;var _0x22fe2a=a124_0x22fe();var _0xee18a0=_0x22fe2a[_0x3e0b36];return _0xee18a0;}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';function a124_0x22fe(){var _0x3c33b8=['14YMgckd','5160056AATGMx','8DqLDJh','1776908eEWFDX','10338NYnysw','216325tXmGgO','45563350pyFSMR','2695VsSACK','659583bsHKyc','512772MzDQfT'];a124_0x22fe=function(){return _0x3c33b8;};return a124_0x22fe();}
1
+ function a126_0x1e59(_0x40a265,_0x1816a4){_0x40a265=_0x40a265-0x113;var _0x1d7f7d=a126_0x1d7f();var _0x1e59c6=_0x1d7f7d[_0x40a265];return _0x1e59c6;}(function(_0x375578,_0x29d493){var _0x54b234=a126_0x1e59,_0x5b4c52=_0x375578();while(!![]){try{var _0x92bddd=-parseInt(_0x54b234(0x116))/0x1+-parseInt(_0x54b234(0x115))/0x2*(parseInt(_0x54b234(0x11b))/0x3)+parseInt(_0x54b234(0x119))/0x4*(parseInt(_0x54b234(0x118))/0x5)+parseInt(_0x54b234(0x11a))/0x6*(-parseInt(_0x54b234(0x113))/0x7)+parseInt(_0x54b234(0x117))/0x8+-parseInt(_0x54b234(0x114))/0x9+parseInt(_0x54b234(0x11c))/0xa;if(_0x92bddd===_0x29d493)break;else _0x5b4c52['push'](_0x5b4c52['shift']());}catch(_0x267468){_0x5b4c52['push'](_0x5b4c52['shift']());}}}(a126_0x1d7f,0xcfc12));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}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';function a126_0x1d7f(){var _0x4502bb=['4KcNLhD','14958ZJMXhy','12ooBpPG','35386330iomeYL','3409fBqHBG','14412627ScvAVf','408458VPNOQU','403569gzRCof','8006520sRyiqW','1737465yjOfzR'];a126_0x1d7f=function(){return _0x4502bb;};return a126_0x1d7f();}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
- function a125_0x4b22(_0x9c2750,_0x25d296){_0x9c2750=_0x9c2750-0x1b0;const _0x24c726=a125_0x24c7();let _0x4b22d1=_0x24c726[_0x9c2750];return _0x4b22d1;}function a125_0x24c7(){const _0x3349e2=['365419NyTgKI','join','6162435FOrMCk','map','.agents','\x20records\x20\x22','124808uHFgyZ','message','unusable','\x20is\x20unreadable:\x20','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2mYIKfo','kind','730902fpfZnn','unverifiable','includes','341724JMKJEX','.skill-lock.json','543810NFRpLz','globalSkillsDirs','home','number','absent','119uQmsHS','SKILL.md','1002774HQXzMX','present','reason','.claude','find','parse','skills'];a125_0x24c7=function(){return _0x3349e2;};return a125_0x24c7();}const a125_0x132e1b=a125_0x4b22;(function(_0x2b8daa,_0x58ee9c){const _0x46d853=a125_0x4b22,_0x27ac74=_0x2b8daa();while(!![]){try{const _0x5174a9=parseInt(_0x46d853(0x1b3))/0x1*(-parseInt(_0x46d853(0x1be))/0x2)+parseInt(_0x46d853(0x1c0))/0x3+-parseInt(_0x46d853(0x1c3))/0x4+-parseInt(_0x46d853(0x1c5))/0x5+parseInt(_0x46d853(0x1cc))/0x6+-parseInt(_0x46d853(0x1ca))/0x7*(parseInt(_0x46d853(0x1b9))/0x8)+parseInt(_0x46d853(0x1b5))/0x9;if(_0x5174a9===_0x58ee9c)break;else _0x27ac74['push'](_0x27ac74['shift']());}catch(_0x451392){_0x27ac74['push'](_0x27ac74['shift']());}}}(a125_0x24c7,0x42139));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a125_0x132e1b(0x1b7),a125_0x132e1b(0x1c4));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a125_0x132e1b(0x1b7),a125_0x132e1b(0x1b2)),join(a125_0x132e1b(0x1cf),a125_0x132e1b(0x1b2))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x4e6722,_0x4f8ae2){const _0x3a28d4=a125_0x132e1b;if(!existsSync(_0x4e6722))return{'kind':'not-recorded'};let _0x31adfe;try{_0x31adfe=JSON[_0x3a28d4(0x1b1)](readFileSync(_0x4e6722,'utf8'));}catch(_0x4ba2b9){return{'kind':_0x3a28d4(0x1bb),'reason':_0x4e6722+_0x3a28d4(0x1bc)+_0x4ba2b9[_0x3a28d4(0x1ba)]};}const _0x2e913a=_0x31adfe;if(typeof _0x2e913a?.['version']!==_0x3a28d4(0x1c8)||!SUPPORTED_LOCK_VERSIONS[_0x3a28d4(0x1c2)](_0x2e913a['version']))return{'kind':_0x3a28d4(0x1bb),'reason':_0x4e6722+'\x20uses\x20unsupported\x20version\x20'+String(_0x2e913a?.['version'])};if(!_0x2e913a[_0x3a28d4(0x1b2)]||typeof _0x2e913a[_0x3a28d4(0x1b2)]!=='object')return{'kind':_0x3a28d4(0x1bb),'reason':_0x4e6722+'\x20has\x20no\x20skills\x20map'};return _0x2e913a[_0x3a28d4(0x1b2)][_0x4f8ae2]?{'kind':'recorded'}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x436b26,_0x19dcfa){const _0x589b54=a125_0x132e1b,_0x59f33e=_0x19dcfa?.[_0x589b54(0x1c7)]??homedir(),_0x302b33=_0x19dcfa?.[_0x589b54(0x1c6)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x589b54(0x1b6)](_0x3874f9=>join(_0x59f33e,_0x3874f9)),_0x1b754d=_0x19dcfa?.['lockFile']??join(_0x59f33e,SKILL_LOCK_RELATIVE_PATH),_0x5aee96=_0x302b33[_0x589b54(0x1b6)](_0x44c811=>join(_0x44c811,_0x436b26,_0x589b54(0x1cb))),_0x22d257=_0x5aee96[_0x589b54(0x1b0)](_0xe56e03=>existsSync(_0xe56e03));if(_0x22d257)return{'state':_0x589b54(0x1cd),'path':_0x22d257};const _0x55640d=readLockLookup(_0x1b754d,_0x436b26);if(_0x55640d[_0x589b54(0x1bf)]===_0x589b54(0x1bb))return{'state':_0x589b54(0x1c1),'reason':_0x55640d[_0x589b54(0x1ce)]};if(_0x55640d[_0x589b54(0x1bf)]==='recorded')return{'state':'unverifiable','reason':_0x1b754d+_0x589b54(0x1b8)+_0x436b26+_0x589b54(0x1bd)+('('+_0x5aee96[_0x589b54(0x1b4)](',\x20')+')')};return{'state':_0x589b54(0x1c9),'checked':_0x5aee96};}
1
+ const a127_0x7cb3be=a127_0x26e2;(function(_0xdfe93d,_0x11c9d8){const _0xdd3f98=a127_0x26e2,_0x177052=_0xdfe93d();while(!![]){try{const _0x576759=-parseInt(_0xdd3f98(0x125))/0x1+parseInt(_0xdd3f98(0x13c))/0x2*(-parseInt(_0xdd3f98(0x12e))/0x3)+-parseInt(_0xdd3f98(0x135))/0x4*(parseInt(_0xdd3f98(0x12a))/0x5)+-parseInt(_0xdd3f98(0x129))/0x6+parseInt(_0xdd3f98(0x13e))/0x7*(parseInt(_0xdd3f98(0x137))/0x8)+-parseInt(_0xdd3f98(0x12b))/0x9+parseInt(_0xdd3f98(0x126))/0xa;if(_0x576759===_0x11c9d8)break;else _0x177052['push'](_0x177052['shift']());}catch(_0x9c136f){_0x177052['push'](_0x177052['shift']());}}}(a127_0x814e,0xc823c));import{existsSync,readFileSync}from'node:fs';function a127_0x26e2(_0x2f2f04,_0x33ed2c){_0x2f2f04=_0x2f2f04-0x122;const _0x814ec9=a127_0x814e();let _0x26e226=_0x814ec9[_0x2f2f04];return _0x26e226;}import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a127_0x7cb3be(0x127),a127_0x7cb3be(0x12f));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a127_0x7cb3be(0x128)),join('.claude',a127_0x7cb3be(0x128))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x46f7f5,_0xa07f48){const _0x145e82=a127_0x7cb3be;if(!existsSync(_0x46f7f5))return{'kind':_0x145e82(0x134)};let _0x2cc1aa;try{_0x2cc1aa=JSON[_0x145e82(0x124)](readFileSync(_0x46f7f5,'utf8'));}catch(_0xab3807){return{'kind':_0x145e82(0x142),'reason':_0x46f7f5+_0x145e82(0x13f)+_0xab3807['message']};}const _0x421a1b=_0x2cc1aa;if(typeof _0x421a1b?.[_0x145e82(0x13d)]!==_0x145e82(0x141)||!SUPPORTED_LOCK_VERSIONS[_0x145e82(0x143)](_0x421a1b[_0x145e82(0x13d)]))return{'kind':_0x145e82(0x142),'reason':_0x46f7f5+_0x145e82(0x13a)+String(_0x421a1b?.[_0x145e82(0x13d)])};if(!_0x421a1b['skills']||typeof _0x421a1b[_0x145e82(0x128)]!==_0x145e82(0x12c))return{'kind':'unusable','reason':_0x46f7f5+_0x145e82(0x122)};return _0x421a1b['skills'][_0xa07f48]?{'kind':_0x145e82(0x136)}:{'kind':_0x145e82(0x134)};}function a127_0x814e(){const _0x309cdd=['join','3Mgnxxn','.skill-lock.json','globalSkillsDirs','home','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','map','not-recorded','116RlJMvV','recorded','81784OuHsaM','absent','\x20records\x20\x22','\x20uses\x20unsupported\x20version\x20','unverifiable','383758jhWkby','version','1099DhGmXR','\x20is\x20unreadable:\x20','reason','number','unusable','includes','\x20has\x20no\x20skills\x20map','SKILL.md','parse','62307NqcrMT','19293000foojfT','.agents','skills','1558806XONbhP','200555LCndYr','9335997hxCsrR','object'];a127_0x814e=function(){return _0x309cdd;};return a127_0x814e();}export function resolveInstalledSkill(_0x170da1,_0x556c4d){const _0x429c8d=a127_0x7cb3be,_0x25063c=_0x556c4d?.[_0x429c8d(0x131)]??homedir(),_0x1ef4b3=_0x556c4d?.[_0x429c8d(0x130)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x429c8d(0x133)](_0x216b5d=>join(_0x25063c,_0x216b5d)),_0x488ad1=_0x556c4d?.['lockFile']??join(_0x25063c,SKILL_LOCK_RELATIVE_PATH),_0x21f44c=_0x1ef4b3[_0x429c8d(0x133)](_0x1f4827=>join(_0x1f4827,_0x170da1,_0x429c8d(0x123))),_0x3ae361=_0x21f44c['find'](_0x424d11=>existsSync(_0x424d11));if(_0x3ae361)return{'state':'present','path':_0x3ae361};const _0x561755=readLockLookup(_0x488ad1,_0x170da1);if(_0x561755['kind']===_0x429c8d(0x142))return{'state':_0x429c8d(0x13b),'reason':_0x561755[_0x429c8d(0x140)]};if(_0x561755['kind']===_0x429c8d(0x136))return{'state':_0x429c8d(0x13b),'reason':_0x488ad1+_0x429c8d(0x139)+_0x170da1+_0x429c8d(0x132)+('('+_0x21f44c[_0x429c8d(0x12d)](',\x20')+')')};return{'state':_0x429c8d(0x138),'checked':_0x21f44c};}
@@ -1 +1 @@
1
- (function(_0x3ed393,_0x4e6777){const _0x3dc48f=a126_0x5c8a,_0x3a23f7=_0x3ed393();while(!![]){try{const _0x5835c4=parseInt(_0x3dc48f(0x1b1))/0x1+parseInt(_0x3dc48f(0x1b8))/0x2*(-parseInt(_0x3dc48f(0x1b9))/0x3)+-parseInt(_0x3dc48f(0x1b5))/0x4+parseInt(_0x3dc48f(0x1b0))/0x5+parseInt(_0x3dc48f(0x1b4))/0x6*(-parseInt(_0x3dc48f(0x1b2))/0x7)+-parseInt(_0x3dc48f(0x1b7))/0x8*(-parseInt(_0x3dc48f(0x1b3))/0x9)+parseInt(_0x3dc48f(0x1b6))/0xa;if(_0x5835c4===_0x4e6777)break;else _0x3a23f7['push'](_0x3a23f7['shift']());}catch(_0x3927ad){_0x3a23f7['push'](_0x3a23f7['shift']());}}}(a126_0x4d30,0x48449));function a126_0x5c8a(_0x213b18,_0xc7774f){_0x213b18=_0x213b18-0x1b0;const _0x4d3036=a126_0x4d30();let _0x5c8a0e=_0x4d3036[_0x213b18];return _0x5c8a0e;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a126_0x4d30(){const _0x5d3de8=['3543kwwtub','63BsXDHL','9xkctUo','145722AtAZCU','2049084TtShRV','4674920bvuOMC','3963464ayAzZJ','52fXOFML','12630QJKxbY','849275BUmKHz'];a126_0x4d30=function(){return _0x5d3de8;};return a126_0x4d30();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x3d6b23,_0x25eadb){const _0x20abaa=a128_0x1b82,_0x3290f4=_0x3d6b23();while(!![]){try{const _0x4619f9=-parseInt(_0x20abaa(0x150))/0x1*(-parseInt(_0x20abaa(0x153))/0x2)+-parseInt(_0x20abaa(0x14c))/0x3+-parseInt(_0x20abaa(0x154))/0x4+-parseInt(_0x20abaa(0x152))/0x5+parseInt(_0x20abaa(0x14f))/0x6*(parseInt(_0x20abaa(0x14d))/0x7)+-parseInt(_0x20abaa(0x14e))/0x8+parseInt(_0x20abaa(0x155))/0x9*(parseInt(_0x20abaa(0x151))/0xa);if(_0x4619f9===_0x25eadb)break;else _0x3290f4['push'](_0x3290f4['shift']());}catch(_0x119c71){_0x3290f4['push'](_0x3290f4['shift']());}}}(a128_0x5670,0x8352c));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a128_0x5670(){const _0x252511=['868ABuTfq','1516480TbdDXs','1230YHUXAl','2zJzIBE','290LZiwQj','434720DeUktf','812798afpyLc','817684HQQVYo','234819kJBfQp','1728096bwQiqn'];a128_0x5670=function(){return _0x252511;};return a128_0x5670();}function a128_0x1b82(_0x50edb9,_0x117427){_0x50edb9=_0x50edb9-0x14c;const _0x5670ef=a128_0x5670();let _0x1b824b=_0x5670ef[_0x50edb9];return _0x1b824b;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- const a127_0x163f03=a127_0x5b8a;(function(_0x16ac1f,_0x13ad69){const _0x4dfa2c=a127_0x5b8a,_0x27f891=_0x16ac1f();while(!![]){try{const _0x20b462=parseInt(_0x4dfa2c(0x91))/0x1*(parseInt(_0x4dfa2c(0x9f))/0x2)+parseInt(_0x4dfa2c(0x71))/0x3*(-parseInt(_0x4dfa2c(0x8f))/0x4)+parseInt(_0x4dfa2c(0x88))/0x5*(parseInt(_0x4dfa2c(0x80))/0x6)+parseInt(_0x4dfa2c(0x79))/0x7*(parseInt(_0x4dfa2c(0x85))/0x8)+-parseInt(_0x4dfa2c(0x78))/0x9+-parseInt(_0x4dfa2c(0x9b))/0xa*(-parseInt(_0x4dfa2c(0x81))/0xb)+-parseInt(_0x4dfa2c(0x95))/0xc;if(_0x20b462===_0x13ad69)break;else _0x27f891['push'](_0x27f891['shift']());}catch(_0x517083){_0x27f891['push'](_0x27f891['shift']());}}}(a127_0x27bb,0x296c6));import a127_0x256ee1 from'winston';import a127_0x3b3b67 from'node:fs';function a127_0x5b8a(_0x23192d,_0xfe1fac){_0x23192d=_0x23192d-0x64;const _0x27bb68=a127_0x27bb();let _0x5b8a15=_0x27bb68[_0x23192d];return _0x5b8a15;}import a127_0x356bdc from'node:path';function a127_0x27bb(){const _0x102b76=['existsSync','transports','currentRawCommand','map','winstonLogger','blue','mkdirSync','Starting:\x20','now','56673pEiOTY','details','error','createLogger','readFileSync','File','dirname','822654QCEvEr','917bzFchd','logFilePath','filter','clearLogs','red','split','level','78GrPFcv','11rxsYvK','timestamp','setLogPath','info','5480rWzvri','parse','format','47340SykRer','utf8','readLogs','combine','logFileName','initWinstonLogger','Failed:\x20','28RwSnuH','getWinstonInstance','4WYPvQT','log','warn','clear','4131672Qqqqqn','success','printf','logTask','writeFileSync','join','2903840KtXMMF','rawCommand','trim','unknown','117208Qagtee','command','message','stringify','setRawCommand','addColors'];a127_0x27bb=function(){return _0x102b76;};return a127_0x27bb();}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a127_0x163f03(0x6c)];[a127_0x163f03(0x7a)]='';[a127_0x163f03(0x6a)]='';constructor(){}[a127_0x163f03(0x66)](_0x3b3d92){const _0x5c5f57=a127_0x163f03;this[_0x5c5f57(0x6a)]=_0x3b3d92;}[a127_0x163f03(0x83)](_0x4dac5d){const _0x3c9bcf=a127_0x163f03;this[_0x3c9bcf(0x7a)]=a127_0x356bdc[_0x3c9bcf(0x9a)](_0x4dac5d,PRODUCT_CONFIG[_0x3c9bcf(0x8c)]),this['winstonLogger']&&this[_0x3c9bcf(0x6c)][_0x3c9bcf(0x94)](),this[_0x3c9bcf(0x8d)]();}[a127_0x163f03(0x8d)](){const _0xea165a=a127_0x163f03,_0xb1fcb6=a127_0x356bdc[_0xea165a(0x77)](this[_0xea165a(0x7a)]);!a127_0x3b3b67[_0xea165a(0x68)](_0xb1fcb6)&&a127_0x3b3b67[_0xea165a(0x6e)](_0xb1fcb6,{'recursive':!![]});const _0x525d50=a127_0x256ee1[_0xea165a(0x87)][_0xea165a(0x8b)](a127_0x256ee1[_0xea165a(0x87)]['timestamp'](),a127_0x256ee1[_0xea165a(0x87)]['errors']({'stack':!![]}),a127_0x256ee1['format'][_0xea165a(0x97)](_0x186278=>{const _0x2bf5c1=_0xea165a,_0x866f01={'timestamp':_0x186278[_0x2bf5c1(0x82)]||new Date()['toISOString'](),'level':_0x186278[_0x2bf5c1(0x7f)]||_0x2bf5c1(0x84),'command':_0x186278[_0x2bf5c1(0xa0)]||_0x2bf5c1(0x9e),'rawCommand':_0x186278[_0x2bf5c1(0x9c)]||this[_0x2bf5c1(0x6a)]||undefined,'message':_0x186278[_0x2bf5c1(0x64)]||'','duration':_0x186278['duration']||undefined,'details':_0x186278[_0x2bf5c1(0x72)]||undefined};return JSON[_0x2bf5c1(0x65)](_0x866f01);}));this[_0xea165a(0x6c)]=a127_0x256ee1[_0xea165a(0x74)]({'level':'info','format':_0x525d50,'transports':[new a127_0x256ee1[(_0xea165a(0x69))][(_0xea165a(0x76))]({'filename':this[_0xea165a(0x7a)],'level':_0xea165a(0x84)})],'silent':![]}),a127_0x256ee1[_0xea165a(0x67)]({'success':'green','error':_0xea165a(0x7d),'warn':'yellow','info':_0xea165a(0x6d)});}['info'](_0x29ce82,_0x148e50,_0x4f3347){const _0x2eb6f4=a127_0x163f03;if(!this[_0x2eb6f4(0x7a)]||!this[_0x2eb6f4(0x6c)])return;this[_0x2eb6f4(0x6c)][_0x2eb6f4(0x84)](_0x148e50,{'command':_0x29ce82,'details':_0x4f3347});}[a127_0x163f03(0x96)](_0x5c8894,_0x39fe91,_0xdeb306,_0x39505a){const _0x43ae75=a127_0x163f03;if(!this['logFilePath']||!this[_0x43ae75(0x6c)])return;this[_0x43ae75(0x6c)][_0x43ae75(0x92)]('info',_0x39fe91,{'level':_0x43ae75(0x96),'command':_0x5c8894,'duration':_0xdeb306,'details':_0x39505a});}[a127_0x163f03(0x73)](_0x124781,_0x20aad1,_0x4552ff){const _0x34c54f=a127_0x163f03;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x34c54f(0x6c)][_0x34c54f(0x73)](_0x20aad1,{'command':_0x124781,'details':_0x4552ff});}[a127_0x163f03(0x93)](_0x5ad876,_0x222fee,_0xe2e6af){const _0x398dcf=a127_0x163f03;if(!this[_0x398dcf(0x7a)]||!this[_0x398dcf(0x6c)])return;this[_0x398dcf(0x6c)]['warn'](_0x222fee,{'command':_0x5ad876,'details':_0xe2e6af});}async[a127_0x163f03(0x98)](_0x432da9,_0x5c6e2a,_0x3e3d80){const _0x3b3e36=a127_0x163f03,_0x5a6e61=Date[_0x3b3e36(0x70)]();this[_0x3b3e36(0x84)](_0x432da9,_0x3b3e36(0x6f)+_0x5c6e2a);try{const _0x210c7e=await _0x3e3d80(),_0x47270a=Date[_0x3b3e36(0x70)]()-_0x5a6e61;return this[_0x3b3e36(0x96)](_0x432da9,'Completed:\x20'+_0x5c6e2a,_0x47270a),_0x210c7e;}catch(_0x160116){const _0x50f3c7=Date[_0x3b3e36(0x70)]()-_0x5a6e61;this[_0x3b3e36(0x73)](_0x432da9,_0x3b3e36(0x8e)+_0x5c6e2a,{'error':_0x160116 instanceof Error?_0x160116['message']:String(_0x160116),'duration':_0x50f3c7});throw _0x160116;}}[a127_0x163f03(0x8a)](){const _0x2dee6a=a127_0x163f03;try{if(!a127_0x3b3b67[_0x2dee6a(0x68)](this[_0x2dee6a(0x7a)]))return[];const _0xa3e575=a127_0x3b3b67[_0x2dee6a(0x75)](this[_0x2dee6a(0x7a)],_0x2dee6a(0x89));return _0xa3e575[_0x2dee6a(0x7e)](/\r?\n/)[_0x2dee6a(0x7b)](_0x54ea85=>_0x54ea85[_0x2dee6a(0x9d)]())[_0x2dee6a(0x6b)](_0x176ffa=>JSON[_0x2dee6a(0x86)](_0x176ffa));}catch(_0x9e84ca){return console[_0x2dee6a(0x93)]('Failed\x20to\x20read\x20logs:',_0x9e84ca),[];}}[a127_0x163f03(0x7c)](){const _0x5f0d39=a127_0x163f03;try{a127_0x3b3b67[_0x5f0d39(0x68)](this[_0x5f0d39(0x7a)])&&a127_0x3b3b67[_0x5f0d39(0x99)](this[_0x5f0d39(0x7a)],'','utf8');}catch(_0x50c055){console[_0x5f0d39(0x93)]('Failed\x20to\x20clear\x20logs:',_0x50c055);}}[a127_0x163f03(0x90)](){const _0x1e4f2f=a127_0x163f03;return this[_0x1e4f2f(0x6c)];}}export const logger=new Logger();
1
+ const a129_0x51e551=a129_0x6657;(function(_0x18a467,_0x294072){const _0x3a32b4=a129_0x6657,_0x3baea5=_0x18a467();while(!![]){try{const _0x78d5fc=-parseInt(_0x3a32b4(0x16e))/0x1+-parseInt(_0x3a32b4(0x16f))/0x2*(parseInt(_0x3a32b4(0x191))/0x3)+parseInt(_0x3a32b4(0x192))/0x4*(-parseInt(_0x3a32b4(0x18d))/0x5)+parseInt(_0x3a32b4(0x174))/0x6+-parseInt(_0x3a32b4(0x168))/0x7*(parseInt(_0x3a32b4(0x198))/0x8)+parseInt(_0x3a32b4(0x186))/0x9*(-parseInt(_0x3a32b4(0x16d))/0xa)+parseInt(_0x3a32b4(0x181))/0xb;if(_0x78d5fc===_0x294072)break;else _0x3baea5['push'](_0x3baea5['shift']());}catch(_0x40da22){_0x3baea5['push'](_0x3baea5['shift']());}}}(a129_0x52f0,0x602e0));function a129_0x52f0(){const _0x5e100e=['mkdirSync','readFileSync','1934640cZeWVh','Failed\x20to\x20clear\x20logs:','warn','existsSync','yellow','error','Starting:\x20','toISOString','red','printf','currentRawCommand','errors','filter','25515897GwWMYD','Completed:\x20','level','logTask','readLogs','117bEuoue','setLogPath','success','rawCommand','getWinstonInstance','File','addColors','41480wFcnjX','message','utf8','map','3063bgnGEC','344deNjXa','stringify','now','blue','createLogger','timestamp','198648iCszRB','clearLogs','format','trim','initWinstonLogger','175zdVxhB','logFileName','winstonLogger','split','logFilePath','222770nyckae','49460CDxSek','1126dNcpgj','setRawCommand','info'];a129_0x52f0=function(){return _0x5e100e;};return a129_0x52f0();}import a129_0x27c42e from'winston';import a129_0x1b6b72 from'node:fs';import a129_0x3444d8 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a129_0x6657(_0x52a165,_0x50379b){_0x52a165=_0x52a165-0x165;const _0x52f04c=a129_0x52f0();let _0x66572c=_0x52f04c[_0x52a165];return _0x66572c;}class Logger{['winstonLogger'];['logFilePath']='';['currentRawCommand']='';constructor(){}[a129_0x51e551(0x170)](_0xe1a6f3){const _0x25388d=a129_0x51e551;this[_0x25388d(0x17e)]=_0xe1a6f3;}[a129_0x51e551(0x187)](_0x19c80e){const _0x92c0e9=a129_0x51e551;this[_0x92c0e9(0x16c)]=a129_0x3444d8['join'](_0x19c80e,PRODUCT_CONFIG[_0x92c0e9(0x169)]),this[_0x92c0e9(0x16a)]&&this[_0x92c0e9(0x16a)]['clear'](),this[_0x92c0e9(0x167)]();}[a129_0x51e551(0x167)](){const _0x10b1fe=a129_0x51e551,_0x2e61f8=a129_0x3444d8['dirname'](this['logFilePath']);!a129_0x1b6b72[_0x10b1fe(0x177)](_0x2e61f8)&&a129_0x1b6b72[_0x10b1fe(0x172)](_0x2e61f8,{'recursive':!![]});const _0x46ef88=a129_0x27c42e['format']['combine'](a129_0x27c42e[_0x10b1fe(0x165)][_0x10b1fe(0x197)](),a129_0x27c42e[_0x10b1fe(0x165)][_0x10b1fe(0x17f)]({'stack':!![]}),a129_0x27c42e[_0x10b1fe(0x165)][_0x10b1fe(0x17d)](_0x1b906e=>{const _0x2e4e7e=_0x10b1fe,_0x4f6e94={'timestamp':_0x1b906e[_0x2e4e7e(0x197)]||new Date()[_0x2e4e7e(0x17b)](),'level':_0x1b906e[_0x2e4e7e(0x183)]||'info','command':_0x1b906e['command']||'unknown','rawCommand':_0x1b906e[_0x2e4e7e(0x189)]||this[_0x2e4e7e(0x17e)]||undefined,'message':_0x1b906e[_0x2e4e7e(0x18e)]||'','duration':_0x1b906e['duration']||undefined,'details':_0x1b906e['details']||undefined};return JSON[_0x2e4e7e(0x193)](_0x4f6e94);}));this[_0x10b1fe(0x16a)]=a129_0x27c42e[_0x10b1fe(0x196)]({'level':_0x10b1fe(0x171),'format':_0x46ef88,'transports':[new a129_0x27c42e['transports'][(_0x10b1fe(0x18b))]({'filename':this[_0x10b1fe(0x16c)],'level':'info'})],'silent':![]}),a129_0x27c42e[_0x10b1fe(0x18c)]({'success':'green','error':_0x10b1fe(0x17c),'warn':_0x10b1fe(0x178),'info':_0x10b1fe(0x195)});}[a129_0x51e551(0x171)](_0x248c97,_0x2cb560,_0x246950){const _0x1e8c9d=a129_0x51e551;if(!this[_0x1e8c9d(0x16c)]||!this['winstonLogger'])return;this[_0x1e8c9d(0x16a)][_0x1e8c9d(0x171)](_0x2cb560,{'command':_0x248c97,'details':_0x246950});}[a129_0x51e551(0x188)](_0x4ac653,_0x3cfe90,_0x4ff788,_0x7c99d8){const _0x576cb8=a129_0x51e551;if(!this[_0x576cb8(0x16c)]||!this['winstonLogger'])return;this['winstonLogger']['log'](_0x576cb8(0x171),_0x3cfe90,{'level':_0x576cb8(0x188),'command':_0x4ac653,'duration':_0x4ff788,'details':_0x7c99d8});}['error'](_0x417262,_0x25444c,_0xe0d1ef){const _0x56ad08=a129_0x51e551;if(!this[_0x56ad08(0x16c)]||!this[_0x56ad08(0x16a)])return;this['winstonLogger'][_0x56ad08(0x179)](_0x25444c,{'command':_0x417262,'details':_0xe0d1ef});}['warn'](_0x1bd201,_0x3c6c88,_0x34ae7e){const _0x3b60e7=a129_0x51e551;if(!this[_0x3b60e7(0x16c)]||!this[_0x3b60e7(0x16a)])return;this['winstonLogger'][_0x3b60e7(0x176)](_0x3c6c88,{'command':_0x1bd201,'details':_0x34ae7e});}async[a129_0x51e551(0x184)](_0x523787,_0x2df8ac,_0x99dff7){const _0x589476=a129_0x51e551,_0x1ffbaf=Date[_0x589476(0x194)]();this[_0x589476(0x171)](_0x523787,_0x589476(0x17a)+_0x2df8ac);try{const _0x39b7ac=await _0x99dff7(),_0x16e402=Date['now']()-_0x1ffbaf;return this[_0x589476(0x188)](_0x523787,_0x589476(0x182)+_0x2df8ac,_0x16e402),_0x39b7ac;}catch(_0x50dff4){const _0x13c8ab=Date[_0x589476(0x194)]()-_0x1ffbaf;this[_0x589476(0x179)](_0x523787,'Failed:\x20'+_0x2df8ac,{'error':_0x50dff4 instanceof Error?_0x50dff4[_0x589476(0x18e)]:String(_0x50dff4),'duration':_0x13c8ab});throw _0x50dff4;}}[a129_0x51e551(0x185)](){const _0x208e89=a129_0x51e551;try{if(!a129_0x1b6b72[_0x208e89(0x177)](this[_0x208e89(0x16c)]))return[];const _0x545f26=a129_0x1b6b72[_0x208e89(0x173)](this[_0x208e89(0x16c)],_0x208e89(0x18f));return _0x545f26[_0x208e89(0x16b)](/\r?\n/)[_0x208e89(0x180)](_0xcdd33a=>_0xcdd33a[_0x208e89(0x166)]())[_0x208e89(0x190)](_0xafd9f2=>JSON['parse'](_0xafd9f2));}catch(_0x4c510b){return console['warn']('Failed\x20to\x20read\x20logs:',_0x4c510b),[];}}[a129_0x51e551(0x199)](){const _0x10f7f5=a129_0x51e551;try{a129_0x1b6b72[_0x10f7f5(0x177)](this[_0x10f7f5(0x16c)])&&a129_0x1b6b72['writeFileSync'](this[_0x10f7f5(0x16c)],'','utf8');}catch(_0x2ade64){console[_0x10f7f5(0x176)](_0x10f7f5(0x175),_0x2ade64);}}[a129_0x51e551(0x18a)](){return this['winstonLogger'];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a128_0x515fa1=a128_0x3b5d;(function(_0x16a5e6,_0x2c5a2f){const _0x443984=a128_0x3b5d,_0x29ee69=_0x16a5e6();while(!![]){try{const _0x4881d1=parseInt(_0x443984(0x1bc))/0x1+-parseInt(_0x443984(0x1c0))/0x2+-parseInt(_0x443984(0x1af))/0x3*(-parseInt(_0x443984(0x1b6))/0x4)+parseInt(_0x443984(0x1b9))/0x5+-parseInt(_0x443984(0x1be))/0x6+-parseInt(_0x443984(0x1b0))/0x7*(parseInt(_0x443984(0x1c1))/0x8)+-parseInt(_0x443984(0x1b7))/0x9*(-parseInt(_0x443984(0x1b1))/0xa);if(_0x4881d1===_0x2c5a2f)break;else _0x29ee69['push'](_0x29ee69['shift']());}catch(_0x232841){_0x29ee69['push'](_0x29ee69['shift']());}}}(a128_0x2167,0x639ea));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a128_0x515fa1(0x1c2)]),MIN_SAFE_INTEGER=BigInt(Number[a128_0x515fa1(0x1ba)]);function a128_0x3b5d(_0x14e584,_0x17099d){_0x14e584=_0x14e584-0x1ae;const _0x2167a3=a128_0x2167();let _0x3b5da1=_0x2167a3[_0x14e584];return _0x3b5da1;}function a128_0x2167(){const _0x520af0=['MAX_SAFE_INTEGER','length','2374707TpRlki','63LVzsmG','1410rbdsnX','getOwnPropertyDescriptor','parse','prototype','undefined','4EtLBlM','23337iQSchg','defineProperty','1601990dqkhDZ','MIN_SAFE_INTEGER','text','412001fuMvvX','includes','3347136AfdmPj','json','1502882wAxiei','153104KbgTSF'];a128_0x2167=function(){return _0x520af0;};return a128_0x2167();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x21ad4f){const _0x5eeb97=a128_0x515fa1;if(_0x21ad4f[_0x5eeb97(0x1bd)]('.')||_0x21ad4f[_0x5eeb97(0x1bd)]('e')||_0x21ad4f[_0x5eeb97(0x1bd)]('E'))return![];const _0x25ed1f=BigInt(_0x21ad4f);return _0x25ed1f>MAX_SAFE_INTEGER||_0x25ed1f<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x30c532){const _0x562860=a128_0x515fa1;let _0x5fef51='',_0x499ab4=![],_0x3fe348=![];for(let _0x1042b2=0x0;_0x1042b2<_0x30c532[_0x562860(0x1ae)];){const _0xf68b59=_0x30c532[_0x1042b2];if(_0x499ab4){_0x5fef51+=_0xf68b59,_0x1042b2+=0x1;if(_0x3fe348)_0x3fe348=![];else{if(_0xf68b59==='\x5c')_0x3fe348=!![];else _0xf68b59==='\x22'&&(_0x499ab4=![]);}continue;}if(_0xf68b59==='\x22'){_0x499ab4=!![],_0x5fef51+=_0xf68b59,_0x1042b2+=0x1;continue;}if(_0xf68b59==='-'||_0xf68b59>='0'&&_0xf68b59<='9'){const _0x263b6f=JSON_NUMBER_PATTERN['exec'](_0x30c532['slice'](_0x1042b2))?.[0x0];if(_0x263b6f){_0x5fef51+=isUnsafeIntegerLiteral(_0x263b6f)?'\x22'+_0x263b6f+'\x22':_0x263b6f,_0x1042b2+=_0x263b6f[_0x562860(0x1ae)];continue;}}_0x5fef51+=_0xf68b59,_0x1042b2+=0x1;}return _0x5fef51;}export function parseLosslessJson(_0x4035b7){const _0x48e226=a128_0x515fa1;return JSON[_0x48e226(0x1b3)](quoteUnsafeIntegerLiterals(_0x4035b7));}export function installLosslessJsonResponseParser(){const _0x2cc157=a128_0x515fa1;if(typeof Response===_0x2cc157(0x1b5))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x2cc157(0x1b4)],originalResponseJsonDescriptor=Object[_0x2cc157(0x1b2)](responseJsonPrototype,'json'),Object[_0x2cc157(0x1b8)](responseJsonPrototype,_0x2cc157(0x1bf),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x19aee3(){const _0x12e95a=_0x2cc157;return parseLosslessJson(await this[_0x12e95a(0x1bb)]());}}),restoreResponseJsonParser=()=>{const _0x11d08f=_0x2cc157;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x11d08f(0x1bf),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x11d08f(0x1bf)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ const a130_0x22d799=a130_0x255c;(function(_0x2c3d39,_0x121469){const _0x5b0cc9=a130_0x255c,_0x5eded0=_0x2c3d39();while(!![]){try{const _0xe61d64=parseInt(_0x5b0cc9(0x143))/0x1+parseInt(_0x5b0cc9(0x14a))/0x2*(-parseInt(_0x5b0cc9(0x13c))/0x3)+-parseInt(_0x5b0cc9(0x147))/0x4*(parseInt(_0x5b0cc9(0x141))/0x5)+parseInt(_0x5b0cc9(0x146))/0x6*(-parseInt(_0x5b0cc9(0x139))/0x7)+parseInt(_0x5b0cc9(0x136))/0x8*(-parseInt(_0x5b0cc9(0x14c))/0x9)+-parseInt(_0x5b0cc9(0x13d))/0xa*(-parseInt(_0x5b0cc9(0x13f))/0xb)+-parseInt(_0x5b0cc9(0x137))/0xc*(-parseInt(_0x5b0cc9(0x148))/0xd);if(_0xe61d64===_0x121469)break;else _0x5eded0['push'](_0x5eded0['shift']());}catch(_0x47d060){_0x5eded0['push'](_0x5eded0['shift']());}}}(a130_0x5c53,0x3d588));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a130_0x22d799(0x13e)]),MIN_SAFE_INTEGER=BigInt(Number[a130_0x22d799(0x149)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a130_0x5c53(){const _0x4dd18c=['defineProperty','undefined','312933vazyEB','4521610zwxSyH','MAX_SAFE_INTEGER','11VRBqaK','slice','765buOEBf','prototype','80280HNBoEa','length','text','6KSoamg','2556iiPPsd','117fFKBit','MIN_SAFE_INTEGER','2ByINpu','json','99RYjxJT','146056jnwIFn','578004BkvtBN','includes','2182369hZsPIH'];a130_0x5c53=function(){return _0x4dd18c;};return a130_0x5c53();}function isUnsafeIntegerLiteral(_0x106cf8){const _0x488de7=a130_0x22d799;if(_0x106cf8[_0x488de7(0x138)]('.')||_0x106cf8[_0x488de7(0x138)]('e')||_0x106cf8[_0x488de7(0x138)]('E'))return![];const _0x41ced8=BigInt(_0x106cf8);return _0x41ced8>MAX_SAFE_INTEGER||_0x41ced8<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x597b95){const _0x3f495f=a130_0x22d799;let _0x92feab='',_0x2d3be9=![],_0x13a020=![];for(let _0x8a9290=0x0;_0x8a9290<_0x597b95['length'];){const _0x3a5216=_0x597b95[_0x8a9290];if(_0x2d3be9){_0x92feab+=_0x3a5216,_0x8a9290+=0x1;if(_0x13a020)_0x13a020=![];else{if(_0x3a5216==='\x5c')_0x13a020=!![];else _0x3a5216==='\x22'&&(_0x2d3be9=![]);}continue;}if(_0x3a5216==='\x22'){_0x2d3be9=!![],_0x92feab+=_0x3a5216,_0x8a9290+=0x1;continue;}if(_0x3a5216==='-'||_0x3a5216>='0'&&_0x3a5216<='9'){const _0xcf026d=JSON_NUMBER_PATTERN['exec'](_0x597b95[_0x3f495f(0x140)](_0x8a9290))?.[0x0];if(_0xcf026d){_0x92feab+=isUnsafeIntegerLiteral(_0xcf026d)?'\x22'+_0xcf026d+'\x22':_0xcf026d,_0x8a9290+=_0xcf026d[_0x3f495f(0x144)];continue;}}_0x92feab+=_0x3a5216,_0x8a9290+=0x1;}return _0x92feab;}export function parseLosslessJson(_0x537551){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x537551));}function a130_0x255c(_0x25e408,_0x3881b7){_0x25e408=_0x25e408-0x136;const _0x5c53f6=a130_0x5c53();let _0x255cd1=_0x5c53f6[_0x25e408];return _0x255cd1;}export function installLosslessJsonResponseParser(){const _0x45708b=a130_0x22d799;if(typeof Response===_0x45708b(0x13b))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x45708b(0x142)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x45708b(0x14b)),Object[_0x45708b(0x13a)](responseJsonPrototype,_0x45708b(0x14b),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x572969(){const _0x4a980c=_0x45708b;return parseLosslessJson(await this[_0x4a980c(0x145)]());}}),restoreResponseJsonParser=()=>{const _0x4252f1=_0x45708b;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x4252f1(0x14b),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x4252f1(0x14b)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}