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

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(_0x49213c,_0x32e553){const _0x466ff1=a116_0x5bfe,_0x138f09=_0x49213c();while(!![]){try{const _0x16f669=parseInt(_0x466ff1(0x194))/0x1+-parseInt(_0x466ff1(0x19c))/0x2*(-parseInt(_0x466ff1(0x193))/0x3)+-parseInt(_0x466ff1(0x192))/0x4+parseInt(_0x466ff1(0x1a3))/0x5+parseInt(_0x466ff1(0x1ab))/0x6*(parseInt(_0x466ff1(0x195))/0x7)+-parseInt(_0x466ff1(0x196))/0x8+parseInt(_0x466ff1(0x197))/0x9*(-parseInt(_0x466ff1(0x184))/0xa);if(_0x16f669===_0x32e553)break;else _0x138f09['push'](_0x138f09['shift']());}catch(_0x125545){_0x138f09['push'](_0x138f09['shift']());}}}(a116_0x4d6b,0x6a2a8));import{existsSync,readdirSync}from'node:fs';function a116_0x5bfe(_0x173725,_0x5c17ac){_0x173725=_0x173725-0x182;const _0x4d6bf9=a116_0x4d6b();let _0x5bfe70=_0x4d6bf9[_0x173725];return _0x5bfe70;}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x28b26f,_0x283dcf,_0x3e4f76={}){const _0x2c3db7=a116_0x5bfe,_0x1c06c8=safePathSegment(_0x28b26f[_0x2c3db7(0x1a4)],_0x2c3db7(0x1a4));if(_0x283dcf[_0x2c3db7(0x1a4)]!==_0x1c06c8)throw CliErrors['validation']('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x283dcf['appCode']+_0x2c3db7(0x19d)+_0x1c06c8);const _0x5c5c2e=normalizeRuntimeSkillScopes(_0x28b26f[_0x2c3db7(0x18f)]),_0x4ab192=new Set(_0x5c5c2e),_0x20ea5f=_0x28b26f[_0x2c3db7(0x190)]?.[_0x2c3db7(0x199)](),_0xceaba0=new Map(),_0x1112c6=resolve(getRuntimeSkillCacheRoot(_0x28b26f[_0x2c3db7(0x187)],_0x28b26f[_0x2c3db7(0x1a7)],_0x3e4f76),_0x1c06c8);for(const _0x5d1066 of _0x5c5c2e){for(const _0x2ba8e1 of localSkillEntryDirs(resolve(_0x1112c6,_0x5d1066))){collectLocalRuntimeSkill(_0xceaba0,_0x2ba8e1,{'appCode':_0x1c06c8,'scopes':_0x4ab192,'code':_0x20ea5f,'source':_0x2c3db7(0x198)});}}for(const _0x501356 of _0x283dcf[_0x2c3db7(0x18a)]){for(const _0x22c1f7 of localSkillLinkCandidates(_0x501356,_0x283dcf,_0x4ab192)){collectLocalRuntimeSkill(_0xceaba0,_0x22c1f7,{'appCode':_0x1c06c8,'scopes':_0x4ab192,'code':_0x20ea5f,'source':'link','linkedPath':_0x22c1f7});}}return Array[_0x2c3db7(0x182)](_0xceaba0[_0x2c3db7(0x189)]())[_0x2c3db7(0x19b)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2ac469){const _0x3314ba=a116_0x5bfe;if(!existsSync(_0x2ac469))return[];return readdirSync(_0x2ac469,{'withFileTypes':!![]})[_0x3314ba(0x183)](_0x28de6d=>_0x28de6d[_0x3314ba(0x1a0)]()||_0x28de6d['isSymbolicLink']())[_0x3314ba(0x1a1)](_0x26662e=>resolve(_0x2ac469,_0x26662e[_0x3314ba(0x1a5)]));}function localSkillLinkCandidates(_0x55a566,_0x23ca2d,_0x468686){const _0x4fd48b=a116_0x5bfe;if(!existsSync(_0x55a566))return[];const _0x134733=_0x23ca2d[_0x4fd48b(0x1a4)]+'--';return readdirSync(_0x55a566,{'withFileTypes':!![]})['filter'](_0x6cc611=>_0x6cc611['isDirectory']()||_0x6cc611[_0x4fd48b(0x18e)]())[_0x4fd48b(0x183)](_0x4835c4=>_0x23ca2d[_0x4fd48b(0x19f)]==='project'||_0x4835c4[_0x4fd48b(0x1a5)][_0x4fd48b(0x19a)](_0x134733)||_0x468686[_0x4fd48b(0x18d)](_0x4fd48b(0x1a6)))[_0x4fd48b(0x1a1)](_0x5ed2fa=>resolve(_0x55a566,_0x5ed2fa['name']));}function a116_0x4d6b(){const _0x414f5d=['startsWith','sort','627244ojukZa','\x20!=\x20','linkedPaths','scope','isDirectory','map','linkedPath','297500Tqsose','appCode','name','builtin','accessKey','includes','skillCode','metadataPath','71088LgIJLm','from','filter','53140FKeGQh','localeCompare','dir','env','set','values','skillRoots','tags','source','has','isSymbolicLink','scopes','code','get','621000MwcOXY','3IWYRyG','283491FzERRO','378oqcPdB','1739288cDgfBH','828fSDBHH','cache','trim'];a116_0x4d6b=function(){return _0x414f5d;};return a116_0x4d6b();}function collectLocalRuntimeSkill(_0x2e6ce9,_0x24da2d,_0x452dde){const _0x305dae=a116_0x5bfe,_0x56a472=resolve(_0x24da2d,METADATA_FILE),_0x5ed095=readMetadataIfPresent(_0x56a472);if(!_0x5ed095)return;if(_0x5ed095[_0x305dae(0x1a4)]!==_0x452dde[_0x305dae(0x1a4)])return;if(!isRuntimeSkillScope(_0x5ed095[_0x305dae(0x19f)])||!_0x452dde[_0x305dae(0x18f)][_0x305dae(0x18d)](_0x5ed095['scope']))return;const _0x2281ab=_0x5ed095[_0x305dae(0x1a9)]?.[_0x305dae(0x199)]();if(!_0x2281ab)return;if(_0x452dde[_0x305dae(0x190)]&&_0x2281ab!==_0x452dde[_0x305dae(0x190)])return;const _0x5cf14b=_0x5ed095[_0x305dae(0x19f)]+':'+_0x2281ab,_0x14c4f6=_0x452dde[_0x305dae(0x1a2)]?[_0x452dde[_0x305dae(0x1a2)]]:[],_0x4667b4=_0x2e6ce9[_0x305dae(0x191)](_0x5cf14b);if(_0x4667b4){_0x452dde[_0x305dae(0x18c)]===_0x305dae(0x198)&&(_0x4667b4[_0x305dae(0x186)]=_0x24da2d,_0x4667b4['cacheDir']=_0x24da2d,_0x4667b4['skillMdPath']=resolve(_0x24da2d,SKILL_FILE),_0x4667b4[_0x305dae(0x1aa)]=_0x56a472);for(const _0x20318e of _0x14c4f6){!_0x4667b4['linkedPaths'][_0x305dae(0x1a8)](_0x20318e)&&_0x4667b4[_0x305dae(0x19e)]['push'](_0x20318e);}_0x4667b4[_0x305dae(0x19e)][_0x305dae(0x19b)]();return;}_0x2e6ce9[_0x305dae(0x188)](_0x5cf14b,{..._0x5ed095,'tags':Array['isArray'](_0x5ed095[_0x305dae(0x18b)])?_0x5ed095[_0x305dae(0x18b)]:[],'scope':_0x5ed095[_0x305dae(0x19f)],'source':'local','dir':_0x24da2d,'cacheDir':_0x452dde[_0x305dae(0x18c)]==='cache'?_0x24da2d:undefined,'skillMdPath':resolve(_0x24da2d,SKILL_FILE),'metadataPath':_0x56a472,'linkedPaths':_0x14c4f6});}function compareLocalRuntimeSkills(_0x3137c3,_0x204216){const _0xb838d7=a116_0x5bfe,_0x5a8e15={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5a8e15[_0x3137c3['scope']]-_0x5a8e15[_0x204216[_0xb838d7(0x19f)]]||_0x3137c3[_0xb838d7(0x1a9)][_0xb838d7(0x185)](_0x204216[_0xb838d7(0x1a9)])||_0x3137c3[_0xb838d7(0x186)][_0xb838d7(0x185)](_0x204216[_0xb838d7(0x186)]);}
@@ -1 +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(_0x247886,_0x26363b){const _0x3aea77=a117_0x851b,_0x2c2725=_0x247886();while(!![]){try{const _0xcb319a=-parseInt(_0x3aea77(0x11c))/0x1*(-parseInt(_0x3aea77(0x114))/0x2)+parseInt(_0x3aea77(0x138))/0x3+parseInt(_0x3aea77(0x12d))/0x4+parseInt(_0x3aea77(0x13a))/0x5+parseInt(_0x3aea77(0x11f))/0x6+-parseInt(_0x3aea77(0x130))/0x7+-parseInt(_0x3aea77(0x139))/0x8;if(_0xcb319a===_0x26363b)break;else _0x2c2725['push'](_0x2c2725['shift']());}catch(_0x5b0960){_0x2c2725['push'](_0x2c2725['shift']());}}}(a117_0x1a85,0x3ace9));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x2dc873){const _0x2dacf5=a117_0x851b;return _0x2dc873['bytes']??Buffer['from'](_0x2dc873[_0x2dacf5(0x12e)]??'','utf8');}export function fileText(_0x4da8bd){const _0x1fe6a1=a117_0x851b;return fileContent(_0x4da8bd)[_0x1fe6a1(0x128)](_0x1fe6a1(0x127));}export function normalizeLocalFiles(_0x4d4711){const _0x453007=a117_0x851b;if(!Array[_0x453007(0x11a)](_0x4d4711)||_0x4d4711[_0x453007(0x137)]===0x0)return[];const _0x59f124=new Map();for(const _0x54110a of _0x4d4711){if(!_0x54110a||typeof _0x54110a!==_0x453007(0x12f)||typeof _0x54110a[_0x453007(0x12b)]!==_0x453007(0x134))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2bafad=normalizeSkillRelativePath(_0x54110a[_0x453007(0x12b)]);if(_0x59f124[_0x453007(0x125)](_0x2bafad))throw CliErrors[_0x453007(0x119)](_0x453007(0x115)+_0x2bafad);if(_0x54110a['bytes']!==undefined&&!Buffer['isBuffer'](_0x54110a['bytes']))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x2bafad);if(_0x54110a[_0x453007(0x133)]===undefined&&typeof _0x54110a[_0x453007(0x12e)]!==_0x453007(0x134))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x2bafad);const _0x2cb502=fileContent(_0x54110a);_0x59f124[_0x453007(0x123)](_0x2bafad,{'path':_0x2bafad,'bytes':_0x2cb502});}return Array[_0x453007(0x122)](_0x59f124[_0x453007(0x11e)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3fca0c){const _0x34cdb6=a117_0x851b;if(!Array[_0x34cdb6(0x11a)](_0x3fca0c)||_0x3fca0c[_0x34cdb6(0x137)]===0x0)return[];const _0x3082da=new Map();for(const _0x42b1f1 of _0x3fca0c){if(!_0x42b1f1||typeof _0x42b1f1!=='object'||typeof _0x42b1f1[_0x34cdb6(0x12b)]!==_0x34cdb6(0x134))throw CliErrors[_0x34cdb6(0x119)](_0x34cdb6(0x117));const _0x4de87c=normalizeSkillRelativePath(_0x42b1f1[_0x34cdb6(0x12b)]);if(_0x3082da[_0x34cdb6(0x125)](_0x4de87c))throw CliErrors[_0x34cdb6(0x119)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x4de87c);if(!isSha256Hex(_0x42b1f1[_0x34cdb6(0x13b)]))throw CliErrors[_0x34cdb6(0x119)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x4de87c);if(!Number['isSafeInteger'](_0x42b1f1[_0x34cdb6(0x132)])||_0x42b1f1[_0x34cdb6(0x132)]<0x0)throw CliErrors['validation']('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x4de87c);_0x3082da['set'](_0x4de87c,{'path':_0x4de87c,'sha256':_0x42b1f1[_0x34cdb6(0x13b)][_0x34cdb6(0x118)](),'size':_0x42b1f1[_0x34cdb6(0x132)]});}return Array['from'](_0x3082da['values']())[_0x34cdb6(0x136)](compareSkillFiles);}export function scanSkillDirectory(_0x4d3ea2,_0xa7f9a4={}){const _0x4e681d=a117_0x851b,_0x38a5a4=realpathSync(_0x4d3ea2),_0x2e3d6f=canonicalExcludedFilePaths(_0xa7f9a4[_0x4e681d(0x116)]),_0x2cfa0d=[];function _0x53d416(_0x52612d){const _0x3d8f7b=_0x4e681d,_0x40e88c=readdirSync(_0x52612d,{'withFileTypes':!![]})['sort']((_0xd68e34,_0x646bfd)=>_0xd68e34['name'][_0x3d8f7b(0x129)](_0x646bfd[_0x3d8f7b(0x120)]));for(const _0x53507c of _0x40e88c){if(_0x53507c[_0x3d8f7b(0x113)]()&&IGNORED_DIR_NAMES[_0x3d8f7b(0x125)](_0x53507c[_0x3d8f7b(0x120)]))continue;if(IGNORED_FILE_NAMES[_0x3d8f7b(0x125)](_0x53507c[_0x3d8f7b(0x120)]))continue;const _0x2e715d=resolve(_0x52612d,_0x53507c[_0x3d8f7b(0x120)]);if(isExcludedFilePath(_0x2e715d,_0x2e3d6f))continue;if(_0x53507c[_0x3d8f7b(0x12a)]())throw CliErrors[_0x3d8f7b(0x119)](_0x3d8f7b(0x124)+_0x2e715d);const _0x5b386e=toPosixPath(relative(_0x38a5a4,_0x2e715d));if(_0x53507c[_0x3d8f7b(0x113)]()){_0x53d416(_0x2e715d);continue;}if(!_0x53507c['isFile']())continue;validateSkillRelativePath(_0x5b386e);const _0x4b81d4=readFileSync(_0x2e715d);_0x2cfa0d[_0x3d8f7b(0x11d)]({'path':_0x5b386e,'bytes':_0x4b81d4});}}return _0x53d416(_0x38a5a4),normalizeLocalFiles(_0x2cfa0d);}function a117_0x1a85(){const _0x37b38e=['isDirectory','286tXNmGx','Duplicate\x20Skill\x20file\x20path:\x20','excludedFilePaths','Skill\x20file\x20path\x20must\x20be\x20text.','toLowerCase','validation','isArray','Unsafe\x20Skill\x20file\x20path:\x20','1941OTjErl','push','values','1723692NTKtci','name','startsWith','from','set','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','has','includes','utf8','toString','localeCompare','isSymbolicLink','path','test','895816XewCPA','content','object','3158099FwRPxS','trim','size','bytes','string','compare','sort','length','78429FPnXbU','4746144qqQRrq','2351780XbSAEo','sha256','add'];a117_0x1a85=function(){return _0x37b38e;};return a117_0x1a85();}function canonicalExcludedFilePaths(_0x48511f){const _0xaac9e3=a117_0x851b,_0x56658a=new Set();for(const _0x56773d of _0x48511f??[]){const _0x16ea4b=resolve(_0x56773d);_0x56658a['add'](_0x16ea4b);try{_0x56658a[_0xaac9e3(0x112)](realpathSync(_0x16ea4b));}catch{}}return _0x56658a;}function isExcludedFilePath(_0x2b3d23,_0x5e15b1){const _0xda1d4f=a117_0x851b;if(_0x5e15b1[_0xda1d4f(0x125)](_0x2b3d23))return!![];if(_0x5e15b1[_0xda1d4f(0x132)]===0x0)return![];try{return _0x5e15b1['has'](realpathSync(_0x2b3d23));}catch{return![];}}export function compareSkillFiles(_0x1cffe1,_0x538d4f){const _0x3bbf1d=a117_0x851b;if(_0x1cffe1[_0x3bbf1d(0x12b)]===SKILL_FILE)return _0x538d4f['path']===SKILL_FILE?0x0:-0x1;if(_0x538d4f[_0x3bbf1d(0x12b)]===SKILL_FILE)return 0x1;return Buffer[_0x3bbf1d(0x135)](Buffer[_0x3bbf1d(0x122)](_0x1cffe1[_0x3bbf1d(0x12b)],'utf8'),Buffer['from'](_0x538d4f[_0x3bbf1d(0x12b)],_0x3bbf1d(0x127)));}export function normalizeSkillRelativePath(_0x1b8758){const _0x209131=a117_0x851b,_0x59254e=toPosixPath(_0x1b8758[_0x209131(0x131)]());return validateSkillRelativePath(_0x59254e),_0x59254e;}export function validateSkillRelativePath(_0x3dc2a3){const _0x34ca70=a117_0x851b;if(!_0x3dc2a3||_0x3dc2a3[_0x34ca70(0x121)]('/')||_0x3dc2a3[_0x34ca70(0x126)]('//'))throw CliErrors[_0x34ca70(0x119)](_0x34ca70(0x11b)+_0x3dc2a3);for(const _0x1b48f1 of _0x3dc2a3['split']('/')){if(!_0x1b48f1||_0x1b48f1==='.'||_0x1b48f1==='..')throw CliErrors[_0x34ca70(0x119)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x3dc2a3);}}function a117_0x851b(_0x33d937,_0x403d7f){_0x33d937=_0x33d937-0x112;const _0x1a85f9=a117_0x1a85();let _0x851b75=_0x1a85f9[_0x33d937];return _0x851b75;}export function toPosixPath(_0x1eead9){return _0x1eead9['replace'](/\\/g,'/');}export function isSha256Hex(_0x5b3543){const _0x3440db=a117_0x851b;return typeof _0x5b3543===_0x3440db(0x134)&&/^[a-fA-F0-9]{64}$/[_0x3440db(0x12c)](_0x5b3543);}
@@ -1 +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(_0x59c53c,_0x1d685b){const _0x3bc9ba=a118_0x2c54,_0x2a2fa5=_0x59c53c();while(!![]){try{const _0x3a2a93=-parseInt(_0x3bc9ba(0xef))/0x1+-parseInt(_0x3bc9ba(0x115))/0x2+parseInt(_0x3bc9ba(0xf0))/0x3*(parseInt(_0x3bc9ba(0xf8))/0x4)+parseInt(_0x3bc9ba(0xf5))/0x5*(-parseInt(_0x3bc9ba(0xe5))/0x6)+parseInt(_0x3bc9ba(0xfe))/0x7+-parseInt(_0x3bc9ba(0xee))/0x8+parseInt(_0x3bc9ba(0xed))/0x9*(parseInt(_0x3bc9ba(0xff))/0xa);if(_0x3a2a93===_0x1d685b)break;else _0x2a2fa5['push'](_0x2a2fa5['shift']());}catch(_0x3f9fa9){_0x2a2fa5['push'](_0x2a2fa5['shift']());}}}(a118_0x3227,0xba021));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x19a30e,_0x4d4873,_0x25b3ac){const _0x315ccc=a118_0x2c54,_0x4cdd76=requireSkillCode(_0x19a30e),_0x424dcc=requirePackageBytes(_0x4cdd76,_0x25b3ac[_0x315ccc(0xe4)]),_0xd06cad=extractDownloadedPackage(_0x424dcc),_0x305ae8=_0xd06cad[_0x315ccc(0x109)](_0x2d4254=>_0x2d4254['path']===SKILL_FILE);if(!_0x305ae8)throw CliErrors[_0x315ccc(0xeb)](_0x315ccc(0x110)+SKILL_FILE+':\x20'+_0x4cdd76);const _0x2ae81b=withMaterializedSkillFrontmatter(_0xd06cad,_0x19a30e,_0x4cdd76),_0x22b9c3=_0x2ae81b['find'](_0x1b5248=>_0x1b5248['path']===SKILL_FILE),_0x1cd86d=fileText(_0x22b9c3),_0x35174b=getRuntimeSkillDir(_0x25b3ac[_0x315ccc(0x113)],_0x25b3ac[_0x315ccc(0x104)],_0x25b3ac[_0x315ccc(0xfc)],_0x4d4873,_0x4cdd76,_0x25b3ac[_0x315ccc(0xfd)]),_0x37508a=resolve(_0x35174b,SKILL_FILE),_0xc2318b=resolve(_0x35174b,METADATA_FILE),_0x49e724=contentHash(_0x1cd86d),_0x2eaede=readMetadataIfPresent(_0xc2318b)?.[_0x315ccc(0xf1)];ensurePulledFilesCanBeOverwritten(_0x35174b,_0xc2318b,_0x2ae81b,_0x25b3ac[_0x315ccc(0xe6)]===!![]),mkdirSync(_0x35174b,{'recursive':!![],'mode':0x1c0});const _0x1dd87f=existsSync(_0x37508a)?readFileSync(_0x37508a,_0x315ccc(0x103)):undefined;return materializeFiles(_0x35174b,_0x2ae81b),removeStaleManagedFiles(_0x35174b,_0x2eaede,_0x2ae81b),writeJsonAtomic(_0xc2318b,buildMetadata(_0x19a30e,_0x4d4873,_0x25b3ac[_0x315ccc(0xfc)],_0x49e724,_0x25b3ac[_0x315ccc(0x105)],_0x2ae81b,_0x424dcc)),{'skill':_0x19a30e,'scope':_0x4d4873,'dir':_0x35174b,'skillMdPath':_0x37508a,'metadataPath':_0xc2318b,'contentHash':_0x49e724,'changed':_0x1dd87f!==_0x1cd86d};}function withMaterializedSkillFrontmatter(_0x4ae217,_0x564277,_0x1a9511){const _0x2968c4=a118_0x2c54,_0x2a45e0=skillDisplayName(_0x564277,_0x1a9511),_0x13429a=_0x564277['description']?.[_0x2968c4(0x10c)]()||_0x2a45e0||_0x1a9511;return normalizeLocalFiles(_0x4ae217)[_0x2968c4(0xe8)](_0x212030=>{const _0x301480=fileText(_0x212030);if(_0x212030['path']!==SKILL_FILE)return _0x212030;if(hasYamlFrontmatter(_0x301480))return{'path':_0x212030['path'],'content':withSyncedDisplayName(_0x301480,_0x2a45e0)};return{'path':_0x212030['path'],'content':prependSkillFrontmatter(_0x301480,{'name':_0x1a9511,'displayName':_0x2a45e0,'description':_0x13429a})};});}function hasYamlFrontmatter(_0x3a32be){const _0x3de6e7=a118_0x2c54;return/^\uFEFF?---\s*\r?\n/[_0x3de6e7(0x118)](_0x3a32be);}function prependSkillFrontmatter(_0x2527a6,_0x227f05){const _0x3beb78=a118_0x2c54,_0x171870=_0x2527a6['replace'](/^\uFEFF/,'');return['---',_0x3beb78(0x107)+yamlString(_0x227f05[_0x3beb78(0xf4)]),_0x227f05[_0x3beb78(0x112)]?'displayName:\x20'+yamlString(_0x227f05['displayName']):undefined,_0x3beb78(0xe7)+yamlString(_0x227f05['description']),_0x3beb78(0x108),'',_0x171870]['filter'](_0x3f3490=>_0x3f3490!==undefined)['join']('\x0a');}function yamlString(_0x234fd0){const _0x573132=a118_0x2c54;return JSON[_0x573132(0xe9)](_0x234fd0[_0x573132(0x10b)](/\r/g,'')[_0x573132(0x10c)]());}function skillDisplayName(_0x1f90de,_0x4512f7){const _0x183018=a118_0x2c54,_0x2a6558=_0x1f90de[_0x183018(0xea)]?.['trim']();return _0x2a6558||_0x4512f7;}function withSyncedDisplayName(_0x20a5c7,_0x5d2437){const _0x451892=a118_0x2c54,_0x5641c1=_0x20a5c7[_0x451892(0xfa)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5641c1)return _0x20a5c7;const _0x569fdc=_0x5641c1[0x1]??'',_0x1ff457=_0x5641c1[0x2]??'',_0x2deb52=parseDocument(_0x1ff457);if(_0x2deb52[_0x451892(0xf7)][_0x451892(0x116)]>0x0||!isMap(_0x2deb52['contents']))return _0x20a5c7;if(_0x5d2437)_0x2deb52['set'](_0x451892(0x112),_0x5d2437);else{if(_0x2deb52[_0x451892(0xec)](_0x451892(0x112)))_0x2deb52[_0x451892(0xf2)](_0x451892(0x112));else return _0x20a5c7;}forceBlockCollections(_0x2deb52['contents']);const _0x860ab1=_0x2deb52['toString']({'lineWidth':0x0})[_0x451892(0x10d)](),_0x474be1=_0x20a5c7[_0x451892(0xfb)](_0x5641c1[0x0][_0x451892(0x116)])[_0x451892(0x10b)](/^\r?\n/,'');return _0x569fdc+_0x451892(0x10e)+_0x860ab1+_0x451892(0xf3)+_0x474be1;}function a118_0x3227(){const _0x511610=['2202102tBcDjY','11444056MrfmbB','813603uWnNZq','3bvUNCv','fileHashes','delete','\x0a---\x0a\x0a','name','254455iYlMAK','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','errors','5175908nywydJ','keys','match','slice','appCode','paths','10084662WHcDjo','70QxFcsy','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','utf8','accessKey','pulledAt','contentHash','name:\x20','---','find','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','replace','trim','trimEnd','---\x0a','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','path','displayName','env','isFile','1457832AKzyLZ','length','Managed\x20file\x20was\x20removed\x20locally:\x20','test','packageBytes','84ySZOLC','force','description:\x20','map','stringify','skillName','validation','has'];a118_0x3227=function(){return _0x511610;};return a118_0x3227();}function a118_0x2c54(_0x28bbd0,_0x349f0e){_0x28bbd0=_0x28bbd0-0xe4;const _0x322745=a118_0x3227();let _0x2c5497=_0x322745[_0x28bbd0];return _0x2c5497;}function forceBlockCollections(_0x2d2c91){if(!isNode(_0x2d2c91))return;visit(_0x2d2c91,(_0xf59e26,_0x9645a0)=>{isCollection(_0x9645a0)&&(_0x9645a0['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2c0557,_0x11f79e,_0x190a49,_0x4350bb){const _0x1c5678=a118_0x2c54;if(_0x4350bb||!existsSync(_0x11f79e))return;const _0x1fe286=readMetadataIfPresent(_0x11f79e);if(!_0x1fe286)return;const _0xc82402=_0x1fe286[_0x1c5678(0xf1)]&&Object[_0x1c5678(0xf9)](_0x1fe286['fileHashes'])[_0x1c5678(0x116)]>0x0?_0x1fe286[_0x1c5678(0xf1)]:undefined;if(_0xc82402)for(const [_0x234ed5,_0x4459cb]of Object['entries'](_0xc82402)){const _0x341d87=resolveManagedFilePath(_0x2c0557,_0x234ed5);if(!existsSync(_0x341d87))throw CliErrors['validation'](_0x1c5678(0x10a)+_0x2c0557,_0x1c5678(0x117)+_0x234ed5);const _0x4bcbff=lstatSync(_0x341d87);if(!_0x4bcbff[_0x1c5678(0x114)]())throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10a)+_0x2c0557,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x234ed5);const _0x3610e2=bufferSha256(readFileSync(_0x341d87));if(_0x3610e2!==_0x4459cb)throw CliErrors['validation'](_0x1c5678(0x10a)+_0x2c0557+_0x1c5678(0x101)+_0x234ed5,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x234ed5);}else{const _0x539d81=resolve(_0x2c0557,SKILL_FILE);if(existsSync(_0x539d81)&&_0x1fe286[_0x1c5678(0x106)]){const _0x373c76=contentHash(readFileSync(_0x539d81,'utf8'));if(_0x373c76!==_0x1fe286[_0x1c5678(0x106)])throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10f)+_0x539d81,_0x1c5678(0x102));}}for(const _0x1d9c9f of normalizeLocalFiles(_0x190a49)){if(_0xc82402?.[_0x1d9c9f[_0x1c5678(0x111)]])continue;if(!_0xc82402&&_0x1d9c9f['path']===SKILL_FILE)continue;const _0x4ba829=resolveManagedFilePath(_0x2c0557,_0x1d9c9f[_0x1c5678(0x111)]);if(!existsSync(_0x4ba829))continue;const _0x1f7c4e=lstatSync(_0x4ba829);if(!_0x1f7c4e[_0x1c5678(0x114)]())throw CliErrors[_0x1c5678(0xeb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2c0557,_0x1c5678(0x100)+_0x1d9c9f[_0x1c5678(0x111)]);const _0x4b4ede=bufferSha256(readFileSync(_0x4ba829));if(_0x4b4ede!==fileHash(_0x1d9c9f))throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10a)+_0x2c0557,_0x1c5678(0xf6)+_0x1d9c9f[_0x1c5678(0x111)]);}}function materializeFiles(_0x311756,_0x2d8319){const _0x41a48a=a118_0x2c54;for(const _0x5ea83a of normalizeLocalFiles(_0x2d8319)){const _0x3ba8ac=resolveManagedFilePath(_0x311756,_0x5ea83a[_0x41a48a(0x111)]);mkdirSync(dirname(_0x3ba8ac),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3ba8ac,fileContent(_0x5ea83a),0x180);}}function removeStaleManagedFiles(_0x2c2d58,_0xe25c78,_0xa20fa4){const _0x55f9f7=a118_0x2c54;if(!_0xe25c78)return;const _0x14693c=new Set(normalizeLocalFiles(_0xa20fa4)[_0x55f9f7(0xe8)](_0x39b94d=>_0x39b94d[_0x55f9f7(0x111)]));for(const _0x4815bd of Object[_0x55f9f7(0xf9)](_0xe25c78)){if(_0x14693c[_0x55f9f7(0xec)](_0x4815bd))continue;const _0x456c8c=resolveManagedFilePath(_0x2c2d58,_0x4815bd);existsSync(_0x456c8c)&&lstatSync(_0x456c8c)[_0x55f9f7(0x114)]()&&rmSync(_0x456c8c,{'force':!![]});}}
@@ -1 +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(_0x382cef,_0x449b25){const _0x58326e=a119_0x50d0,_0x55c829=_0x382cef();while(!![]){try{const _0x1d467a=-parseInt(_0x58326e(0x150))/0x1*(-parseInt(_0x58326e(0x155))/0x2)+parseInt(_0x58326e(0x152))/0x3*(parseInt(_0x58326e(0x143))/0x4)+parseInt(_0x58326e(0x134))/0x5+parseInt(_0x58326e(0x140))/0x6*(parseInt(_0x58326e(0x157))/0x7)+parseInt(_0x58326e(0x154))/0x8*(-parseInt(_0x58326e(0x151))/0x9)+parseInt(_0x58326e(0x148))/0xa*(-parseInt(_0x58326e(0x13d))/0xb)+parseInt(_0x58326e(0x158))/0xc;if(_0x1d467a===_0x449b25)break;else _0x55c829['push'](_0x55c829['shift']());}catch(_0xbe26d3){_0x55c829['push'](_0x55c829['shift']());}}}(a119_0x132f,0x99ed6));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a119_0x50d0(_0x57cbbf,_0xc2c5c9){_0x57cbbf=_0x57cbbf-0x134;const _0x132f61=a119_0x132f();let _0x50d072=_0x132f61[_0x57cbbf];return _0x50d072;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4f27a8,_0x359120,_0x1fe473,_0x1504bb,_0x1cbae0,_0xb0daec,_0xe2c20c){const _0x427028=a119_0x50d0,_0x5032b4=_0xb0daec?normalizeLocalFiles(_0xb0daec):[],_0x478f19=!_0xe2c20c&&_0x5032b4['length']>0x0?buildSkillPackage(_0x5032b4):undefined,_0x3c0c4b=_0xe2c20c?bufferSha256(_0xe2c20c):_0x478f19?.[_0x427028(0x147)][_0x427028(0x13f)],_0xf680fe=_0xe2c20c?.['length']??_0x478f19?.['manifest'][_0x427028(0x156)],_0x55c762=_0x5032b4[_0x427028(0x149)]>0x0?Object[_0x427028(0x14b)](_0x5032b4[_0x427028(0x136)](_0xcaecc3=>[_0xcaecc3[_0x427028(0x14a)],fileHash(_0xcaecc3)])):undefined;return{'schemaVersion':_0x5032b4[_0x427028(0x149)]>0x0?0x2:0x1,'id':_0x4f27a8['id'],'appCode':_0x1fe473,'skillCode':requireSkillCode(_0x4f27a8),'skillName':_0x4f27a8['skillName'],'description':_0x4f27a8[_0x427028(0x13c)],'scope':_0x359120,'readonly':_0x359120!==_0x427028(0x14e)||_0x4f27a8[_0x427028(0x14d)]===!![],'tenantCode':_0x4f27a8['tenantCode'],'userId':_0x4f27a8['userId'],'version':_0x4f27a8[_0x427028(0x14f)],'status':_0x4f27a8['status'],'tags':Array['isArray'](_0x4f27a8[_0x427028(0x141)])?_0x4f27a8[_0x427028(0x141)]:[],'hasUpstreamUpdate':_0x4f27a8[_0x427028(0x13a)],'forkedFromSkillId':_0x4f27a8[_0x427028(0x14c)],'forkedFromVersion':_0x4f27a8[_0x427028(0x138)],'sourceSessionId':_0x4f27a8[_0x427028(0x159)],'contentHash':_0x1504bb,'fileHashes':_0x55c762,'treeHash':_0x5032b4[_0x427028(0x149)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5032b4)):undefined,'ossPath':remoteManifestOssPath(_0x4f27a8['files']),'zipSha256':_0x3c0c4b,'zipSize':_0xf680fe,'files':_0x5032b4['length']>0x0?_0x5032b4[_0x427028(0x136)](_0x70e11=>({'path':_0x70e11['path'],'hash':fileHash(_0x70e11),'size':fileContent(_0x70e11)[_0x427028(0x149)]})):undefined,'pulledAt':_0x1cbae0??new Date()['toISOString']()};}export function requireSkillCode(_0x524db5){const _0x1077ea=a119_0x50d0,_0x2ba564=_0x524db5[_0x1077ea(0x142)]?.[_0x1077ea(0x13e)]();if(!_0x2ba564)throw CliErrors[_0x1077ea(0x139)](_0x1077ea(0x145));return _0x2ba564;}export function readMetadataIfPresent(_0x4a8150){const _0x17f88e=a119_0x50d0;if(!existsSync(_0x4a8150))return undefined;try{const _0x37fc1f=JSON[_0x17f88e(0x135)](readFileSync(_0x4a8150,'utf8'));return _0x37fc1f;}catch{throw CliErrors[_0x17f88e(0x139)](_0x17f88e(0x137)+METADATA_FILE+':\x20'+_0x4a8150);}}function remoteManifestOssPath(_0x1ddb40){const _0x549727=a119_0x50d0;if(!_0x1ddb40||typeof _0x1ddb40!==_0x549727(0x144)||Array[_0x549727(0x13b)](_0x1ddb40))return undefined;const _0x5477af=_0x1ddb40[_0x549727(0x153)];return typeof _0x5477af===_0x549727(0x146)&&_0x5477af[_0x549727(0x13e)]()?_0x5477af[_0x549727(0x13e)]():undefined;}function a119_0x132f(){const _0xb7f3c5=['map','Invalid\x20','forkedFromVersion','validation','hasUpstreamUpdate','isArray','description','102223HsDzUp','trim','zipSha256','48bapqFc','tags','skillCode','1578108UzQxvg','object','Runtime\x20Skill\x20is\x20missing\x20skillCode.','string','manifest','1020ybizlP','length','path','fromEntries','forkedFromSkillId','readonly','personal','version','5MkRqhf','108VLHPQc','3Kmnbsy','ossPath','660392mzmTSM','314026WMWIRZ','zipSize','256529ayycSW','241380IRpdWw','sourceSessionId','5380385cqurbu','parse'];a119_0x132f=function(){return _0xb7f3c5;};return a119_0x132f();}
@@ -1 +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
+ const a120_0x4db6d5=a120_0x204d;function a120_0x204d(_0x178625,_0x363853){_0x178625=_0x178625-0x1e4;const _0x1e66d5=a120_0x1e66();let _0x204d6e=_0x1e66d5[_0x178625];return _0x204d6e;}(function(_0x5d0c66,_0x108a1c){const _0x5dd9cb=a120_0x204d,_0x45f74e=_0x5d0c66();while(!![]){try{const _0x436252=parseInt(_0x5dd9cb(0x1f6))/0x1*(parseInt(_0x5dd9cb(0x1fd))/0x2)+-parseInt(_0x5dd9cb(0x1ff))/0x3*(-parseInt(_0x5dd9cb(0x1f5))/0x4)+parseInt(_0x5dd9cb(0x1e6))/0x5+parseInt(_0x5dd9cb(0x1f0))/0x6*(parseInt(_0x5dd9cb(0x1ef))/0x7)+parseInt(_0x5dd9cb(0x1ee))/0x8+-parseInt(_0x5dd9cb(0x1ec))/0x9*(parseInt(_0x5dd9cb(0x1f8))/0xa)+parseInt(_0x5dd9cb(0x1eb))/0xb*(-parseInt(_0x5dd9cb(0x1e5))/0xc);if(_0x436252===_0x108a1c)break;else _0x45f74e['push'](_0x45f74e['shift']());}catch(_0x2d3630){_0x45f74e['push'](_0x45f74e['shift']());}}}(a120_0x1e66,0x3c097));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';function a120_0x1e66(){const _0x3b675b=['path\x20segment','validation','62380ikUfgW','21674KlSqKc','.workbuddy','350GQjEQP','skillCode','appCode','.claude','SKILL_ROOT','30VkDJCe','agentsSkillsDir','15IuYupj','homeDirName','12TNDKzN','33820vPZDkY','claudeSkillsDir','CLAUDE_SKILL_ROOT','includes','skills','1109647Ppicly','125604OAplit','cache','2358968KwOvDl','913696ZfAcbv','6tvUzfj','Unsafe\x20','workbuddySkillsDir'];a120_0x1e66=function(){return _0x3b675b;};return a120_0x1e66();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3791cd={}){const _0x5da975=a120_0x204d,_0x503de3=_0x3791cd['homeDir']??homedir(),_0x51c7c1=resolve(_0x503de3,PRODUCT_CONFIG[_0x5da975(0x1e4)],_0x5da975(0x1ed)),_0x521283=trimmedEnv(_0x5da975(0x1fc)),_0x4b9750=trimmedEnv(_0x5da975(0x1e8)),_0x5a44ec=resolve(_0x503de3,_0x5da975(0x1f7)),_0xa4781a=_0x3791cd[_0x5da975(0x1f2)]??(existsSync(_0x5a44ec)?resolve(_0x5a44ec,_0x5da975(0x1ea)):undefined);return{'homeDir':_0x503de3,'cacheRoot':_0x51c7c1,'managedRoot':resolve(_0x503de3,PRODUCT_CONFIG[_0x5da975(0x1e4)]),'agentsSkillsDir':_0x3791cd['agentsSkillsDir']??_0x521283??resolve(_0x503de3,'.agents',_0x5da975(0x1ea)),'claudeSkillsDir':_0x3791cd['claudeSkillsDir']??_0x4b9750??resolve(_0x503de3,_0x5da975(0x1fb),_0x5da975(0x1ea)),'workbuddySkillsDir':_0xa4781a};}export function runtimeAgentSkillRoots(_0x31f485){const _0x187a7f=a120_0x204d;return[_0x31f485[_0x187a7f(0x1fe)],_0x31f485[_0x187a7f(0x1e7)],_0x31f485['workbuddySkillsDir']]['filter'](_0x1b913e=>Boolean(_0x1b913e));}export function getRuntimeSkillCacheRoot(_0x430a7f,_0x50e31e,_0x7f763f={}){const _0x3b9455=a120_0x204d,_0x36ab15=resolveSkillSyncPaths(_0x7f763f);return resolve(_0x36ab15['cacheRoot'],_0x430a7f,fingerprintAccessKey(_0x50e31e),_0x3b9455(0x1ea));}export function getRuntimeSkillDir(_0x44a98f,_0x23af11,_0x487847,_0x17cdbc,_0x246974,_0x181d0b={}){const _0x4e608b=a120_0x204d;return resolve(getRuntimeSkillCacheRoot(_0x44a98f,_0x23af11,_0x181d0b),safePathSegment(_0x487847,_0x4e608b(0x1fa)),_0x17cdbc,safePathSegment(_0x246974,_0x4e608b(0x1f9)));}export function safePathSegment(_0x393965,_0x31f037=a120_0x4db6d5(0x1f3)){const _0x227ad1=a120_0x4db6d5;if(!_0x393965||_0x393965[_0x227ad1(0x1e9)]('/')||_0x393965[_0x227ad1(0x1e9)]('\x5c')||_0x393965['includes']('..'))throw CliErrors[_0x227ad1(0x1f4)](_0x227ad1(0x1f1)+_0x31f037+'\x20for\x20local\x20path:\x20'+_0x393965);return _0x393965;}function trimmedEnv(_0x1982a6){const _0x5810c6=productEnv(_0x1982a6)?.['trim']();return _0x5810c6?_0x5810c6:undefined;}
@@ -1 +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 a121_0xed93(){const _0x403098=['74CyJaiN','\x20has\x20scope=\x22','12517DtOXNx','boolean','1500336YcaBHb','6XzXMqs','company','skillCode','trim','refreshedAt','isDirectory','files','validation','4225711btwmyn','string','version','path','(unknown)','ignoreMetadataScope','30rNixsm','sourceSessionId','excludedFilePaths','2470641GvLopY','slice','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataAppCodeMismatch','pushedAt','scope','ignoreInvalidMetadata','filter','tags','320cYrahE','301212QcZVfq','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','packageBase64','Skill\x20metadata\x20appCode\x20\x22','dir','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','number',',\x20or\x20directory\x20name.','isSymbolicLink','builtin','ignoreMetadataForPayload','description','utf8','skillName','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','targetScope','Invalid\x20','ignoreMetadataSkillCode','unknown','85812xFmMGQ','appCode','personal','startsWith','1782kaqOLC','\x20has\x20unsupported\x20scope\x20\x22','some','match','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','isFile','content','87993FVAuwp','displayName','Missing\x20','replace','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'];a121_0xed93=function(){return _0x403098;};return a121_0xed93();}(function(_0x2026ff,_0x2e7730){const _0x5c45ea=a121_0x156a,_0x3c30b9=_0x2026ff();while(!![]){try{const _0x4da3c9=parseInt(_0x5c45ea(0x1f0))/0x1*(-parseInt(_0x5c45ea(0x1ee))/0x2)+parseInt(_0x5c45ea(0x204))/0x3+parseInt(_0x5c45ea(0x20e))/0x4*(-parseInt(_0x5c45ea(0x201))/0x5)+-parseInt(_0x5c45ea(0x1f3))/0x6*(parseInt(_0x5c45ea(0x1fb))/0x7)+-parseInt(_0x5c45ea(0x1f2))/0x8+parseInt(_0x5c45ea(0x22f))/0x9*(parseInt(_0x5c45ea(0x20d))/0xa)+parseInt(_0x5c45ea(0x227))/0xb*(parseInt(_0x5c45ea(0x223))/0xc);if(_0x4da3c9===_0x2e7730)break;else _0x3c30b9['push'](_0x3c30b9['shift']());}catch(_0x3ee0c6){_0x3c30b9['push'](_0x3c30b9['shift']());}}}(a121_0xed93,0x8fba7));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a121_0x156a(_0x556e89,_0x5ad688){_0x556e89=_0x556e89-0x1eb;const _0xed93a8=a121_0xed93();let _0x156ad3=_0xed93a8[_0x556e89];return _0x156ad3;}import{parse as a121_0x3787fb}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x2cb5ef,_0x18e017,_0x311a97={}){const _0x460369=a121_0x156a,_0x457311=resolvePushDirectoryRoot(_0x2cb5ef),_0x35fe6d=readPushMetadataIfPresent(resolve(_0x457311,METADATA_FILE),{'ignoreInvalidMetadata':_0x311a97[_0x460369(0x20a)]});if(_0x35fe6d?.[_0x460369(0x224)]&&_0x35fe6d[_0x460369(0x224)]!==_0x18e017&&!_0x311a97['allowAppCodeRetarget']&&!_0x311a97[_0x460369(0x207)])throw CliErrors[_0x460369(0x1fa)](_0x460369(0x213)+_0x35fe6d[_0x460369(0x224)]+_0x460369(0x1ed)+_0x18e017+'\x22.');const _0x4affb4=resolvePushSkillCode(_0x457311,_0x18e017,_0x35fe6d,_0x311a97);if(!_0x4affb4)throw CliErrors[_0x460369(0x1fa)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x460369(0x217));return{'dir':_0x457311,'skillCode':_0x4affb4,'metadata':_0x35fe6d};}export function readPushDirectory(_0x3de778,_0x40df0a,_0x3774a4={}){const _0x1f8a5e=a121_0x156a,_0x16c46c=resolvePushDirectoryIdentity(_0x3de778,_0x40df0a,_0x3774a4),_0x53d773=_0x16c46c[_0x1f8a5e(0x214)],_0x12e14a=resolve(_0x53d773,SKILL_FILE);if(!existsSync(_0x12e14a)||!lstatSync(_0x12e14a)[_0x1f8a5e(0x22d)]())throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x1eb)+SKILL_FILE+':\x20'+_0x12e14a);const _0x58c9a9=_0x16c46c[_0x1f8a5e(0x20f)],_0x5b7d03=_0x3774a4[_0x1f8a5e(0x21f)]??'personal';if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x58c9a9?.[_0x1f8a5e(0x209)]===_0x1f8a5e(0x219))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x21e)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.');if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x5b7d03==='personal'&&_0x58c9a9?.['scope']&&_0x58c9a9[_0x1f8a5e(0x209)]!==_0x1f8a5e(0x225))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x206)+METADATA_FILE+_0x1f8a5e(0x1ef)+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.',_0x1f8a5e(0x210)+_0x53d773+_0x1f8a5e(0x215));const _0x2188de=scanSkillDirectory(_0x53d773,{'excludedFilePaths':_0x3774a4[_0x1f8a5e(0x203)]}),_0x380782=buildSkillPackage(_0x2188de),_0x4a9f23=readFileSync(_0x12e14a,_0x1f8a5e(0x21c)),_0x4837ae=_0x16c46c[_0x1f8a5e(0x1f5)],_0xfbce48=_0x3774a4[_0x1f8a5e(0x21a)]?undefined:_0x58c9a9,_0xf4be22=readSkillDisplayName(_0x4a9f23);return{'skillCode':_0x4837ae,'metadata':_0x58c9a9,'frontmatterDisplayName':_0xf4be22,'input':{'skillCode':_0x4837ae,'skillName':_0xf4be22??_0xfbce48?.[_0x1f8a5e(0x21d)],'description':_0xfbce48?.['description'],'content':_0x4a9f23,'files':_0x380782['manifest'],'packageBase64':_0x380782[_0x1f8a5e(0x212)],'tags':_0xfbce48?.['tags'],'version':_0xfbce48?.[_0x1f8a5e(0x1fd)],'sourceSessionId':_0xfbce48?.[_0x1f8a5e(0x202)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x31ea02,_0x437211,_0x5bc826,_0x3c6bc0={}){const _0x5ddab6=a121_0x156a,_0x27687e=resolvePushDirectoryRoot(_0x31ea02),_0x3d9813=readPushMetadataIfPresent(resolve(_0x27687e,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x118fc7=requireRemoteScope(_0x437211),_0x57d8d0=readLocalSkillContent(_0x27687e),_0x5e52b2={..._0x437211,'appCode':_0x437211[_0x5ddab6(0x224)]??_0x5bc826,'skillName':_0x437211['skillName']??_0x3d9813?.[_0x5ddab6(0x21d)],'description':_0x437211[_0x5ddab6(0x21b)]??_0x3d9813?.[_0x5ddab6(0x21b)],'tags':Array['isArray'](_0x437211['tags'])?_0x437211[_0x5ddab6(0x20c)]:_0x3d9813?.[_0x5ddab6(0x20c)],'sourceSessionId':_0x437211['sourceSessionId']??_0x3d9813?.[_0x5ddab6(0x202)],'content':_0x437211[_0x5ddab6(0x22e)]??_0x57d8d0},_0x5aaaa2=buildMetadata(_0x5e52b2,_0x118fc7,_0x5bc826,contentHash(_0x57d8d0),_0x3c6bc0[_0x5ddab6(0x1f7)]);writeJsonAtomic(resolve(_0x27687e,METADATA_FILE),_0x5aaaa2);}export function recordPushedRuntimeSkill(_0x1327ac,_0x1b31c7,_0x5208ac,_0x31bb4e={}){const _0x1b32c2=a121_0x156a,_0x204314=resolvePushDirectoryRoot(_0x1327ac),_0x488181=scanSkillDirectory(_0x204314),_0x5eb356=_0x488181[_0x1b32c2(0x22c)](_0x5eaeaa=>_0x5eaeaa[_0x1b32c2(0x1fe)]===SKILL_FILE),_0x4f06cb=_0x5eb356?fileText(_0x5eb356):'',_0x22ad32=tryNormalizePackageManifest(_0x1b31c7[_0x1b32c2(0x1f9)]),_0x3ee57b={..._0x1b31c7,'content':_0x1b31c7[_0x1b32c2(0x22e)]??_0x4f06cb,'files':_0x22ad32},_0x1af49c=_0x22ad32?normalizeLocalFiles(_0x488181)[_0x1b32c2(0x20b)](_0x6d98c5=>_0x22ad32[_0x1b32c2(0x1f9)][_0x1b32c2(0x229)](_0x2bed88=>_0x2bed88['path']===_0x6d98c5['path'])):undefined,_0x157656=buildMetadata(_0x3ee57b,_0x31bb4e[_0x1b32c2(0x209)]??_0x1b32c2(0x225),_0x5208ac,contentHash(_0x3ee57b[_0x1b32c2(0x22e)]??''),_0x31bb4e[_0x1b32c2(0x208)],_0x1af49c);writeJsonAtomic(resolve(_0x204314,METADATA_FILE),_0x157656);}export function deriveSkillCodeFromDirectory(_0x45446a,_0x5d7d69){const _0x13cf92=a121_0x156a,_0x21f1d8=basename(resolve(_0x45446a)),_0x169a57=_0x5d7d69+'--';return _0x21f1d8[_0x13cf92(0x226)](_0x169a57)?_0x21f1d8[_0x13cf92(0x205)](_0x169a57['length']):_0x21f1d8;}function resolvePushSkillCode(_0x3c5ffa,_0x4a4374,_0x1ffea1,_0x340bfe){const _0x3ae33a=a121_0x156a,_0x4367e1=deriveSkillCodeFromSkillFile(_0x3c5ffa)||deriveSkillCodeFromDirectory(_0x3c5ffa,_0x4a4374);if(_0x340bfe[_0x3ae33a(0x221)])return _0x4367e1;return _0x1ffea1?.[_0x3ae33a(0x1f5)]?.[_0x3ae33a(0x1f6)]()||_0x4367e1;}function deriveSkillCodeFromSkillFile(_0x44a707){const _0x3f6db8=a121_0x156a,_0x4c269d=resolve(_0x44a707,SKILL_FILE);if(!existsSync(_0x4c269d)||!lstatSync(_0x4c269d)[_0x3f6db8(0x22d)]())return undefined;const _0x132402=readFileSync(_0x4c269d,_0x3f6db8(0x21c)),_0x202bb9=_0x132402['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x202bb9)return undefined;const _0x593e25=parseFrontmatterObject(_0x202bb9[0x1]??''),_0x43977a=scalarToString(_0x593e25?.['name']);return _0x43977a?slugifySkillName(_0x43977a):undefined;}function readSkillDisplayName(_0xe7a35d){const _0x781057=a121_0x156a,_0x52ce46=_0xe7a35d[_0x781057(0x22a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52ce46)return undefined;const _0x2342ed=parseFrontmatterObject(_0x52ce46[0x1]??'');return scalarToString(_0x2342ed?.[_0x781057(0x230)]);}function slugifySkillName(_0x44e5ab){const _0x54f732=a121_0x156a,_0x28f727=_0x44e5ab['trim']()['toLowerCase']()[_0x54f732(0x1ec)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x54f732(0x1ec)](/^-+/,'')[_0x54f732(0x1ec)](/-+$/,'')[_0x54f732(0x1ec)](/-{2,}/g,'-');if(!_0x28f727)throw CliErrors['validation'](_0x54f732(0x220)+SKILL_FILE+_0x54f732(0x22b));return _0x28f727;}function parseFrontmatterObject(_0x7d91de){try{const _0x257f56=a121_0x3787fb(_0x7d91de);return _0x257f56&&typeof _0x257f56==='object'&&!Array['isArray'](_0x257f56)?_0x257f56:undefined;}catch{return undefined;}}function scalarToString(_0x1d6dc6){const _0x5efdb5=a121_0x156a;if(typeof _0x1d6dc6===_0x5efdb5(0x1fc))return _0x1d6dc6['trim']();if(typeof _0x1d6dc6===_0x5efdb5(0x216)||typeof _0x1d6dc6===_0x5efdb5(0x1f1))return String(_0x1d6dc6);return undefined;}function resolvePushDirectoryRoot(_0x46a79a){const _0x18790f=a121_0x156a,_0x1b1e9d=resolve(_0x46a79a);if(!existsSync(_0x1b1e9d))throw CliErrors['validation'](_0x18790f(0x211)+_0x46a79a);const _0x5de6c8=lstatSync(_0x1b1e9d);if(_0x5de6c8['isDirectory']())return _0x1b1e9d;if(_0x5de6c8[_0x18790f(0x218)]()){const _0x1fdd28=realpathSync(_0x1b1e9d);if(lstatSync(_0x1fdd28)[_0x18790f(0x1f8)]())return _0x1fdd28;}throw CliErrors[_0x18790f(0x1fa)]('Skill\x20directory\x20not\x20found:\x20'+_0x46a79a);}function requireRemoteScope(_0x435bfd){const _0x4bb9d8=a121_0x156a;if(_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x225)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x1f4)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x219))return _0x435bfd[_0x4bb9d8(0x209)];throw CliErrors[_0x4bb9d8(0x1fa)]('Remote\x20Skill\x20'+(_0x435bfd[_0x4bb9d8(0x1f5)]||_0x4bb9d8(0x1ff))+_0x4bb9d8(0x228)+(_0x435bfd[_0x4bb9d8(0x209)]??_0x4bb9d8(0x222))+'\x22.');}function readLocalSkillContent(_0x5cc9b0){const _0x3dc91f=a121_0x156a,_0x4f3959=resolve(_0x5cc9b0,SKILL_FILE);return existsSync(_0x4f3959)&&lstatSync(_0x4f3959)[_0x3dc91f(0x22d)]()?readFileSync(_0x4f3959,_0x3dc91f(0x21c)):'';}function readPushMetadataIfPresent(_0x2ef8a3,_0x113e87={}){const _0x3a02f3=a121_0x156a;try{return readMetadataIfPresent(_0x2ef8a3);}catch(_0x5aaac7){if(_0x113e87[_0x3a02f3(0x20a)])return undefined;throw _0x5aaac7;}}
@@ -1 +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 a122_0x5873(){const _0x3ad7d4=['2aYtPcu','personal','validation','10539KUqsKk','2630dwUCnr','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','builtin','company','2763125AnHBUn','7oQttpz','2279864hxvapJ','497680INYJqK','push','1321176snXlHr','671163ECZncP','1166061EJRFzw'];a122_0x5873=function(){return _0x3ad7d4;};return a122_0x5873();}(function(_0x55d0c5,_0x48a626){const _0x532154=a122_0x47d0,_0x3e5280=_0x55d0c5();while(!![]){try{const _0x35a308=-parseInt(_0x532154(0xa6))/0x1*(-parseInt(_0x532154(0x97))/0x2)+-parseInt(_0x532154(0xa7))/0x3+-parseInt(_0x532154(0xa3))/0x4+parseInt(_0x532154(0xa0))/0x5+-parseInt(_0x532154(0xa5))/0x6+parseInt(_0x532154(0xa1))/0x7*(-parseInt(_0x532154(0xa2))/0x8)+-parseInt(_0x532154(0x9a))/0x9*(-parseInt(_0x532154(0x9b))/0xa);if(_0x35a308===_0x48a626)break;else _0x3e5280['push'](_0x3e5280['shift']());}catch(_0x1ed206){_0x3e5280['push'](_0x3e5280['shift']());}}}(a122_0x5873,0x7d5c3));import{CliErrors}from'../../errors.js';function a122_0x47d0(_0x439bb8,_0x48abe0){_0x439bb8=_0x439bb8-0x97;const _0x58730f=a122_0x5873();let _0x47d0ca=_0x58730f[_0x439bb8];return _0x47d0ca;}export function normalizeRuntimeSkillScopes(_0x334df4){const _0x188787=a122_0x47d0,_0xb4ce61=_0x334df4&&_0x334df4['length']>0x0?_0x334df4:[_0x188787(0x98),'company',_0x188787(0x9e)],_0x1c1cab=[];for(const _0x1ce1a5 of _0xb4ce61){if(!isRuntimeSkillScope(_0x1ce1a5))throw CliErrors[_0x188787(0x99)](_0x188787(0x9d)+_0x1ce1a5);!_0x1c1cab[_0x188787(0x9c)](_0x1ce1a5)&&_0x1c1cab[_0x188787(0xa4)](_0x1ce1a5);}return _0x1c1cab;}export function isRuntimeSkillScope(_0x326213){const _0x8af606=a122_0x47d0;return _0x326213==='personal'||_0x326213===_0x8af606(0x9f)||_0x326213===_0x8af606(0x9e);}
@@ -1 +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
+ function a124_0x3679(_0x2f42fa,_0x247b3d){_0x2f42fa=_0x2f42fa-0xb7;const _0x4d3bb9=a124_0x4d3b();let _0x3679b2=_0x4d3bb9[_0x2f42fa];return _0x3679b2;}const a124_0x24d4f0=a124_0x3679;(function(_0x556be1,_0x2ba382){const _0x391c0b=a124_0x3679,_0x3bb842=_0x556be1();while(!![]){try{const _0x15af42=-parseInt(_0x391c0b(0xbc))/0x1+-parseInt(_0x391c0b(0xbb))/0x2*(-parseInt(_0x391c0b(0xba))/0x3)+-parseInt(_0x391c0b(0xca))/0x4*(-parseInt(_0x391c0b(0xc2))/0x5)+-parseInt(_0x391c0b(0xc5))/0x6*(-parseInt(_0x391c0b(0xc1))/0x7)+parseInt(_0x391c0b(0xb8))/0x8+parseInt(_0x391c0b(0xc3))/0x9+parseInt(_0x391c0b(0xc7))/0xa*(-parseInt(_0x391c0b(0xc6))/0xb);if(_0x15af42===_0x2ba382)break;else _0x3bb842['push'](_0x3bb842['shift']());}catch(_0x494f3b){_0x3bb842['push'](_0x3bb842['shift']());}}}(a124_0x4d3b,0x7594a));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a124_0x4d3b(){const _0x2c9fa7=['path','from','664peWMhr','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','map','endsWith','code','2119880vDrktx','length','15YibFeA','285666apxfAn','261112pihpcC','object','validation_error','validation','sort','45451pQRCYP','4105YwbpCO','8391717bbKTmK','1980-01-01T00:00:00.000Z','162HniBzW','22tsZxAO','7402190Vgwnlf'];a124_0x4d3b=function(){return _0x2c9fa7;};return a124_0x4d3b();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a124_0x24d4f0(0xc4));export function createDeterministicZipPackage(_0x181cab){const _0x512b1b=a124_0x24d4f0,_0x2380ce={};for(const _0x17c11f of normalizeLocalFiles(_0x181cab)){_0x2380ce[_0x17c11f[_0x512b1b(0xc8)]]=fileContent(_0x17c11f);}return Buffer[_0x512b1b(0xc9)](zipSync(_0x2380ce,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x1392d2){const _0x5384c4=a124_0x24d4f0;if(_0x1392d2[_0x5384c4(0xb9)]<0x16)throw CliErrors['validation'](_0x5384c4(0xcb));let _0x4e8d8b;try{_0x4e8d8b=unzipSync(_0x1392d2,{'filter'(_0x24a79d){const _0x321ef8=_0x5384c4,_0x294d4f=normalizeSkillRelativePath(_0x24a79d['name']);if(_0x294d4f[_0x321ef8(0xcf)]('/'))throw CliErrors['validation'](_0x321ef8(0xcd)+_0x294d4f);return!![];}});}catch(_0x342208){if(isRuntimeSkillValidationError(_0x342208))throw _0x342208;throw CliErrors[_0x5384c4(0xbf)](_0x5384c4(0xcb));}return Object[_0x5384c4(0xcc)](_0x4e8d8b)[_0x5384c4(0xce)](([_0x2d22dd,_0xea3d80])=>({'path':normalizeSkillRelativePath(_0x2d22dd),'bytes':Buffer[_0x5384c4(0xc9)](_0xea3d80)}))[_0x5384c4(0xc0)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x10e8f0){const _0x537c57=a124_0x24d4f0;return typeof _0x10e8f0===_0x537c57(0xbd)&&_0x10e8f0!==null&&_0x537c57(0xb7)in _0x10e8f0&&_0x10e8f0[_0x537c57(0xb7)]===_0x537c57(0xbe);}
@@ -1 +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(_0x20c84b,_0x4dbd07){const _0x4d7063=a125_0x4fa4,_0x12dd43=_0x20c84b();while(!![]){try{const _0x1e885f=parseInt(_0x4d7063(0xb0))/0x1*(parseInt(_0x4d7063(0xba))/0x2)+-parseInt(_0x4d7063(0xc8))/0x3+parseInt(_0x4d7063(0xb7))/0x4*(-parseInt(_0x4d7063(0xc2))/0x5)+-parseInt(_0x4d7063(0xce))/0x6+parseInt(_0x4d7063(0xcc))/0x7*(parseInt(_0x4d7063(0xb4))/0x8)+parseInt(_0x4d7063(0xbd))/0x9+-parseInt(_0x4d7063(0xb5))/0xa*(-parseInt(_0x4d7063(0xb1))/0xb);if(_0x1e885f===_0x4dbd07)break;else _0x12dd43['push'](_0x12dd43['shift']());}catch(_0x4e1e33){_0x12dd43['push'](_0x12dd43['shift']());}}}(a125_0x37ac,0x2518e));import{CliErrors}from'../../errors.js';function a125_0x37ac(){const _0x5bff5c=['Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isArray','zipSize','844945emwcGH','size','toString','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','treeSha256','isSafeInteger','506241sUSJiI','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','ossPath','594265mqtRdr','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','490836zyJaGU','set','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','map','some','requireOssPath','toLowerCase','has','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','bytes','string','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','validation','path','files','get','Missing\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','1714viSsip','11QKkKGQ','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','16GcABAA','1403680QVhZRW','length','4mqudYW','Duplicate\x20Skill\x20package\x20entry:\x20','zipSha256','100LhFpdG','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','sha256','1580706TFezJU','object'];a125_0x37ac=function(){return _0x5bff5c;};return a125_0x37ac();}import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x4897e3){const _0x55ca09=a125_0x4fa4,_0x499cf6=normalizeLocalFiles(_0x4897e3);if(!_0x499cf6[_0x55ca09(0xa2)](_0x35ffd3=>_0x35ffd3['path']===SKILL_FILE))throw CliErrors['validation'](_0x55ca09(0xae)+SKILL_FILE+_0x55ca09(0xb2));const _0x2c815c=localFilesToManifestFiles(_0x499cf6),_0x389060=createDeterministicZipPackage(_0x499cf6);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x2c815c),'zipSha256':bufferSha256(_0x389060),'zipSize':_0x389060[_0x55ca09(0xb6)],'files':_0x2c815c},'packageBytes':_0x389060,'packageBase64':_0x389060[_0x55ca09(0xc4)]('base64')};}export function verifyRuntimeSkillPackage(_0x3f259e,_0x3a6e2f){const _0x346c9a=normalizePackageManifest(_0x3f259e,{'requireOssPath':![]});if(!_0x346c9a)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x346c9a,_0x3a6e2f);}export function verifyRuntimeSkillBundle(_0x309a4c,_0xe6a98e){const _0x56614b=a125_0x4fa4,_0x17d898=normalizePackageManifest(_0x309a4c,{'requireOssPath':![]});if(!_0x17d898)throw CliErrors[_0x56614b(0xaa)](_0x56614b(0xc5));return extractAndVerifyPackageFiles(_0x17d898,_0xe6a98e);}export function tryNormalizePackageManifest(_0x26ef7c){return normalizePackageManifest(_0x26ef7c,{'requireOssPath':![]});}export function requirePackageBytes(_0x399294,_0x26558f){const _0x255158=a125_0x4fa4;if(!_0x26558f||_0x26558f[_0x255158(0xb6)]===0x0)throw CliErrors[_0x255158(0xaa)](_0x255158(0xbf)+_0x399294);return _0x26558f;}export function extractDownloadedPackage(_0x40e622){const _0xf1e79e=a125_0x4fa4,_0x4d5117=parseZipPackage(_0x40e622)['map'](_0x284414=>({'path':_0x284414[_0xf1e79e(0xab)],'bytes':_0x284414[_0xf1e79e(0xa7)]}));if(!_0x4d5117[_0xf1e79e(0xa2)](_0x4a8551=>_0x4a8551['path']===SKILL_FILE))throw CliErrors[_0xf1e79e(0xaa)](_0xf1e79e(0xc9)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4d5117);}function a125_0x4fa4(_0x44a20b,_0x44a405){_0x44a20b=_0x44a20b-0xa2;const _0x37acfa=a125_0x37ac();let _0x4fa468=_0x37acfa[_0x44a20b];return _0x4fa468;}export function localFilesToManifestFiles(_0x5f417f){const _0x16bd06=a125_0x4fa4;return normalizeLocalFiles(_0x5f417f)[_0x16bd06(0xd2)](_0x4fff40=>({'path':_0x4fff40[_0x16bd06(0xab)],'sha256':fileHash(_0x4fff40),'size':fileContent(_0x4fff40)['length']}));}function normalizePackageManifest(_0xdc0944,_0xfdacea){const _0x536b0d=a125_0x4fa4;if(!_0xdc0944||typeof _0xdc0944!==_0x536b0d(0xbe)||Array['isArray'](_0xdc0944))return undefined;const _0x351860=_0xdc0944,_0xc51318=typeof _0x351860[_0x536b0d(0xcb)]===_0x536b0d(0xa8)?_0x351860['ossPath']['trim']():undefined;if(_0xfdacea[_0x536b0d(0xa3)]&&!_0xc51318)return undefined;if(!Array[_0x536b0d(0xc0)](_0x351860['files'])||_0x351860[_0x536b0d(0xac)][_0x536b0d(0xb6)]===0x0)return undefined;if(!isSha256Hex(_0x351860[_0x536b0d(0xc6)]))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xcd));if(!isSha256Hex(_0x351860['zipSha256']))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xb3));if(!Number['isSafeInteger'](_0x351860['zipSize'])||_0x351860['zipSize']<0x0)throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xa6));const _0xbeceae=normalizeManifestFiles(_0x351860[_0x536b0d(0xac)]);if(!_0xbeceae['some'](_0x55c89e=>_0x55c89e[_0x536b0d(0xab)]===SKILL_FILE))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xbb)+SKILL_FILE+'.');const _0x3355d0=fileTreeHash(_0xbeceae);if(_0x3355d0!==_0x351860[_0x536b0d(0xc6)][_0x536b0d(0xa4)]())throw CliErrors[_0x536b0d(0xaa)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x536b0d(0xc7)](_0x351860['schemaVersion'])?_0x351860[_0x536b0d(0xd0)]:0x2,'ossPath':_0xc51318,'treeSha256':_0x3355d0,'zipSha256':_0x351860[_0x536b0d(0xb9)][_0x536b0d(0xa4)](),'zipSize':_0x351860[_0x536b0d(0xc1)],'files':_0xbeceae};}function extractAndVerifyPackage(_0x135777,_0x55fd31){const _0xf34247=a125_0x4fa4,_0x10e9c1=normalizePackageManifest(_0x135777,{'requireOssPath':![]});if(!_0x10e9c1)throw CliErrors[_0xf34247(0xaa)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x55fd31[_0xf34247(0xb6)]!==_0x10e9c1[_0xf34247(0xc1)])throw CliErrors[_0xf34247(0xaa)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x398620=bufferSha256(_0x55fd31);if(_0x398620!==_0x10e9c1[_0xf34247(0xb9)])throw CliErrors[_0xf34247(0xaa)](_0xf34247(0xca));return extractAndVerifyPackageFiles(_0x10e9c1,_0x55fd31);}function extractAndVerifyPackageFiles(_0x5721d,_0x41655a){const _0x555595=a125_0x4fa4,_0x5dfeed=parseZipPackage(_0x41655a);if(_0x5dfeed[_0x555595(0xb6)]!==_0x5721d[_0x555595(0xac)][_0x555595(0xb6)])throw CliErrors[_0x555595(0xaa)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x27444b=new Map();for(const _0x1ae74e of _0x5dfeed){if(_0x27444b[_0x555595(0xa5)](_0x1ae74e[_0x555595(0xab)]))throw CliErrors[_0x555595(0xaa)](_0x555595(0xb8)+_0x1ae74e[_0x555595(0xab)]);_0x27444b[_0x555595(0xcf)](_0x1ae74e[_0x555595(0xab)],_0x1ae74e);}const _0x55fcf0=[];for(const _0x34245b of _0x5721d[_0x555595(0xac)]){const _0x5b51e0=_0x27444b[_0x555595(0xad)](_0x34245b['path']);if(!_0x5b51e0)throw CliErrors['validation'](_0x555595(0xd1)+_0x34245b['path']);if(_0x5b51e0[_0x555595(0xa7)][_0x555595(0xb6)]!==_0x34245b[_0x555595(0xc3)])throw CliErrors[_0x555595(0xaa)](_0x555595(0xaf)+_0x34245b[_0x555595(0xab)]);const _0x3edc45=bufferSha256(_0x5b51e0['bytes']);if(_0x3edc45!==_0x34245b[_0x555595(0xbc)])throw CliErrors[_0x555595(0xaa)](_0x555595(0xa9)+_0x34245b['path']);_0x55fcf0['push']({'path':_0x34245b[_0x555595(0xab)],'bytes':_0x5b51e0['bytes']});}return normalizeLocalFiles(_0x55fcf0);}
@@ -1 +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(_0x175e4f,_0x3dbdaf){var _0x576dfa=a126_0x5217,_0x2322be=_0x175e4f();while(!![]){try{var _0x3243cb=parseInt(_0x576dfa(0x1c5))/0x1*(parseInt(_0x576dfa(0x1c9))/0x2)+-parseInt(_0x576dfa(0x1cc))/0x3+parseInt(_0x576dfa(0x1c8))/0x4+-parseInt(_0x576dfa(0x1c6))/0x5+-parseInt(_0x576dfa(0x1cb))/0x6*(-parseInt(_0x576dfa(0x1c7))/0x7)+-parseInt(_0x576dfa(0x1ce))/0x8*(-parseInt(_0x576dfa(0x1cd))/0x9)+parseInt(_0x576dfa(0x1cf))/0xa*(-parseInt(_0x576dfa(0x1ca))/0xb);if(_0x3243cb===_0x3dbdaf)break;else _0x2322be['push'](_0x2322be['shift']());}catch(_0x3140c9){_0x2322be['push'](_0x2322be['shift']());}}}(a126_0x7406,0x642cb));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a126_0x5217(_0x2fb9de,_0x56d412){_0x2fb9de=_0x2fb9de-0x1c5;var _0x7406c5=a126_0x7406();var _0x521743=_0x7406c5[_0x2fb9de];return _0x521743;}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';function a126_0x7406(){var _0x3a0ecc=['3211760utUGWL','180CelrnH','467qGNNAN','176220gYnkEe','972741yvuhLG','770092jWbxrv','3390ZhUdhS','563629kdcdVi','6oiaxqG','469980jvKMXc','9rsCCos'];a126_0x7406=function(){return _0x3a0ecc;};return a126_0x7406();}
@@ -1 +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_0x438f27=a127_0x2a83;(function(_0x51318c,_0x19660d){const _0x46b165=a127_0x2a83,_0x1f08e7=_0x51318c();while(!![]){try{const _0x3d4993=-parseInt(_0x46b165(0x1ba))/0x1+-parseInt(_0x46b165(0x1b4))/0x2+-parseInt(_0x46b165(0x1c0))/0x3*(-parseInt(_0x46b165(0x1b7))/0x4)+parseInt(_0x46b165(0x1c3))/0x5+parseInt(_0x46b165(0x1c9))/0x6+-parseInt(_0x46b165(0x1b9))/0x7+parseInt(_0x46b165(0x1ad))/0x8;if(_0x3d4993===_0x19660d)break;else _0x1f08e7['push'](_0x1f08e7['shift']());}catch(_0x395acb){_0x1f08e7['push'](_0x1f08e7['shift']());}}}(a127_0x1e49,0xb8b4c));function a127_0x2a83(_0xb32bf7,_0xc738ab){_0xb32bf7=_0xb32bf7-0x1a9;const _0x1e49cf=a127_0x1e49();let _0x2a8367=_0x1e49cf[_0xb32bf7];return _0x2a8367;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a127_0x438f27(0x1c1),a127_0x438f27(0x1bc));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a127_0x438f27(0x1c1),a127_0x438f27(0x1ab)),join('.claude',a127_0x438f27(0x1ab))];const SUPPORTED_LOCK_VERSIONS=[0x3];function a127_0x1e49(){const _0x754374=['.agents','absent','6974365bghlZo','unusable','\x20records\x20\x22','globalSkillsDirs','object','unverifiable','5070936OgCvbF','recorded','find','skills','version','8097648faUvhE','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','\x20has\x20no\x20skills\x20map','message','reason','map','parse','864820MCHTrW','join','home','292bdezwz','utf8','7526267uuzjGu','1449375ItUgOG','not-recorded','.skill-lock.json','lockFile','kind','SKILL.md','18957uzYehg'];a127_0x1e49=function(){return _0x754374;};return a127_0x1e49();}function readLockLookup(_0x20bc55,_0x5310af){const _0x58f167=a127_0x438f27;if(!existsSync(_0x20bc55))return{'kind':_0x58f167(0x1bb)};let _0x3df3b2;try{_0x3df3b2=JSON[_0x58f167(0x1b3)](readFileSync(_0x20bc55,_0x58f167(0x1b8)));}catch(_0x57b2d9){return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+'\x20is\x20unreadable:\x20'+_0x57b2d9[_0x58f167(0x1b0)]};}const _0x3a2fe2=_0x3df3b2;if(typeof _0x3a2fe2?.[_0x58f167(0x1ac)]!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x3a2fe2[_0x58f167(0x1ac)]))return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+'\x20uses\x20unsupported\x20version\x20'+String(_0x3a2fe2?.['version'])};if(!_0x3a2fe2[_0x58f167(0x1ab)]||typeof _0x3a2fe2[_0x58f167(0x1ab)]!==_0x58f167(0x1c7))return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+_0x58f167(0x1af)};return _0x3a2fe2[_0x58f167(0x1ab)][_0x5310af]?{'kind':_0x58f167(0x1a9)}:{'kind':_0x58f167(0x1bb)};}export function resolveInstalledSkill(_0x105b12,_0xf11c67){const _0x23ba55=a127_0x438f27,_0x578d88=_0xf11c67?.[_0x23ba55(0x1b6)]??homedir(),_0x10e07d=_0xf11c67?.[_0x23ba55(0x1c6)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x412bc0=>join(_0x578d88,_0x412bc0)),_0x1a0648=_0xf11c67?.[_0x23ba55(0x1bd)]??join(_0x578d88,SKILL_LOCK_RELATIVE_PATH),_0x92cab0=_0x10e07d[_0x23ba55(0x1b2)](_0xd6d809=>join(_0xd6d809,_0x105b12,_0x23ba55(0x1bf))),_0x351826=_0x92cab0[_0x23ba55(0x1aa)](_0x28725a=>existsSync(_0x28725a));if(_0x351826)return{'state':'present','path':_0x351826};const _0x26bbeb=readLockLookup(_0x1a0648,_0x105b12);if(_0x26bbeb[_0x23ba55(0x1be)]===_0x23ba55(0x1c4))return{'state':_0x23ba55(0x1c8),'reason':_0x26bbeb[_0x23ba55(0x1b1)]};if(_0x26bbeb[_0x23ba55(0x1be)]===_0x23ba55(0x1a9))return{'state':'unverifiable','reason':_0x1a0648+_0x23ba55(0x1c5)+_0x105b12+_0x23ba55(0x1ae)+('('+_0x92cab0[_0x23ba55(0x1b5)](',\x20')+')')};return{'state':_0x23ba55(0x1c2),'checked':_0x92cab0};}
@@ -1 +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(_0x2b50e7,_0x58a973){const _0x3b73c1=a128_0x114c,_0x56c193=_0x2b50e7();while(!![]){try{const _0x12f868=parseInt(_0x3b73c1(0x18a))/0x1*(parseInt(_0x3b73c1(0x192))/0x2)+parseInt(_0x3b73c1(0x189))/0x3+-parseInt(_0x3b73c1(0x18b))/0x4*(parseInt(_0x3b73c1(0x193))/0x5)+-parseInt(_0x3b73c1(0x18f))/0x6+parseInt(_0x3b73c1(0x18c))/0x7*(-parseInt(_0x3b73c1(0x190))/0x8)+-parseInt(_0x3b73c1(0x18d))/0x9+-parseInt(_0x3b73c1(0x18e))/0xa*(-parseInt(_0x3b73c1(0x191))/0xb);if(_0x12f868===_0x58a973)break;else _0x56c193['push'](_0x56c193['shift']());}catch(_0xf163a7){_0x56c193['push'](_0x56c193['shift']());}}}(a128_0x5918,0x2d1fb));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a128_0x114c(_0x119bbb,_0x588233){_0x119bbb=_0x119bbb-0x189;const _0x5918ef=a128_0x5918();let _0x114c65=_0x5918ef[_0x119bbb];return _0x114c65;}function a128_0x5918(){const _0x4bc2f6=['2257686ijocOD','130210LTlTWf','698304PifHfK','2779976cMbODO','429fkUvwC','76708oGkbVl','25ufVstT','337461tbtnNf','9nSWhMG','52744xcfcJT','7pRHwYE'];a128_0x5918=function(){return _0x4bc2f6;};return a128_0x5918();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +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_0x457552=a129_0x2b36;(function(_0x51c1d7,_0x3a1188){const _0x2f7434=a129_0x2b36,_0x1c5c0a=_0x51c1d7();while(!![]){try{const _0x18efed=-parseInt(_0x2f7434(0x19c))/0x1*(-parseInt(_0x2f7434(0x1af))/0x2)+-parseInt(_0x2f7434(0x1ac))/0x3+-parseInt(_0x2f7434(0x18b))/0x4+parseInt(_0x2f7434(0x1a9))/0x5+-parseInt(_0x2f7434(0x18d))/0x6+parseInt(_0x2f7434(0x1a8))/0x7*(parseInt(_0x2f7434(0x1a2))/0x8)+parseInt(_0x2f7434(0x1ad))/0x9;if(_0x18efed===_0x3a1188)break;else _0x1c5c0a['push'](_0x1c5c0a['shift']());}catch(_0x5075b2){_0x1c5c0a['push'](_0x1c5c0a['shift']());}}}(a129_0x561f,0xdb27d));function a129_0x561f(){const _0x2a2360=['duration','split','winstonLogger','utf8','createLogger','initWinstonLogger','1744644hIEHsX','blue','5610168ZAsCfd','now','Failed:\x20','parse','combine','clearLogs','warn','error','trim','filter','readLogs','clear','join','existsSync','logFilePath','221PzbkxW','Failed\x20to\x20read\x20logs:','mkdirSync','timestamp','Completed:\x20','log','464bKHCHB','format','success','writeFileSync','info','currentRawCommand','181265Bzcqoo','8749775JFqRTH','command','setLogPath','5307894pHPNhr','6358518xBqRVo','red','722ecvwSh','getWinstonInstance','readFileSync','File'];a129_0x561f=function(){return _0x2a2360;};return a129_0x561f();}function a129_0x2b36(_0xe29b1f,_0x3a7580){_0xe29b1f=_0xe29b1f-0x184;const _0x561f0c=a129_0x561f();let _0x2b3678=_0x561f0c[_0xe29b1f];return _0x2b3678;}import a129_0x7254f2 from'winston';import a129_0x2400ae from'node:fs';import a129_0x3abc98 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];['logFilePath']='';[a129_0x457552(0x1a7)]='';constructor(){}['setRawCommand'](_0x2b60b7){this['currentRawCommand']=_0x2b60b7;}[a129_0x457552(0x1ab)](_0x58c6ba){const _0x1726e1=a129_0x457552;this[_0x1726e1(0x19b)]=a129_0x3abc98[_0x1726e1(0x199)](_0x58c6ba,PRODUCT_CONFIG['logFileName']),this[_0x1726e1(0x187)]&&this[_0x1726e1(0x187)][_0x1726e1(0x198)](),this[_0x1726e1(0x18a)]();}[a129_0x457552(0x18a)](){const _0x392249=a129_0x457552,_0x1ddb77=a129_0x3abc98['dirname'](this[_0x392249(0x19b)]);!a129_0x2400ae[_0x392249(0x19a)](_0x1ddb77)&&a129_0x2400ae[_0x392249(0x19e)](_0x1ddb77,{'recursive':!![]});const _0x26f221=a129_0x7254f2[_0x392249(0x1a3)][_0x392249(0x191)](a129_0x7254f2[_0x392249(0x1a3)]['timestamp'](),a129_0x7254f2[_0x392249(0x1a3)]['errors']({'stack':!![]}),a129_0x7254f2[_0x392249(0x1a3)]['printf'](_0x40a8fa=>{const _0x37632f=_0x392249,_0x343923={'timestamp':_0x40a8fa[_0x37632f(0x19f)]||new Date()['toISOString'](),'level':_0x40a8fa['level']||_0x37632f(0x1a6),'command':_0x40a8fa[_0x37632f(0x1aa)]||'unknown','rawCommand':_0x40a8fa['rawCommand']||this[_0x37632f(0x1a7)]||undefined,'message':_0x40a8fa['message']||'','duration':_0x40a8fa[_0x37632f(0x185)]||undefined,'details':_0x40a8fa['details']||undefined};return JSON['stringify'](_0x343923);}));this[_0x392249(0x187)]=a129_0x7254f2[_0x392249(0x189)]({'level':_0x392249(0x1a6),'format':_0x26f221,'transports':[new a129_0x7254f2['transports'][(_0x392249(0x184))]({'filename':this['logFilePath'],'level':_0x392249(0x1a6)})],'silent':![]}),a129_0x7254f2['addColors']({'success':'green','error':_0x392249(0x1ae),'warn':'yellow','info':_0x392249(0x18c)});}[a129_0x457552(0x1a6)](_0xa5fb57,_0x43a797,_0x462796){const _0x11a63f=a129_0x457552;if(!this['logFilePath']||!this[_0x11a63f(0x187)])return;this['winstonLogger'][_0x11a63f(0x1a6)](_0x43a797,{'command':_0xa5fb57,'details':_0x462796});}['success'](_0x236054,_0x59e1b2,_0x4ba6c8,_0x2e7d90){const _0x1dc50d=a129_0x457552;if(!this[_0x1dc50d(0x19b)]||!this[_0x1dc50d(0x187)])return;this['winstonLogger'][_0x1dc50d(0x1a1)](_0x1dc50d(0x1a6),_0x59e1b2,{'level':_0x1dc50d(0x1a4),'command':_0x236054,'duration':_0x4ba6c8,'details':_0x2e7d90});}[a129_0x457552(0x194)](_0x5b3555,_0x3e9c37,_0x20cbc3){const _0x3194ad=a129_0x457552;if(!this[_0x3194ad(0x19b)]||!this['winstonLogger'])return;this[_0x3194ad(0x187)][_0x3194ad(0x194)](_0x3e9c37,{'command':_0x5b3555,'details':_0x20cbc3});}[a129_0x457552(0x193)](_0x3628cf,_0x1802bf,_0x53c12e){const _0x59ea0e=a129_0x457552;if(!this['logFilePath']||!this[_0x59ea0e(0x187)])return;this['winstonLogger'][_0x59ea0e(0x193)](_0x1802bf,{'command':_0x3628cf,'details':_0x53c12e});}async['logTask'](_0x5af2d7,_0x2866b6,_0x327ea2){const _0x12a694=a129_0x457552,_0x56e2fe=Date[_0x12a694(0x18e)]();this[_0x12a694(0x1a6)](_0x5af2d7,'Starting:\x20'+_0x2866b6);try{const _0x1b9a72=await _0x327ea2(),_0x18819e=Date[_0x12a694(0x18e)]()-_0x56e2fe;return this['success'](_0x5af2d7,_0x12a694(0x1a0)+_0x2866b6,_0x18819e),_0x1b9a72;}catch(_0x344924){const _0x2508fd=Date[_0x12a694(0x18e)]()-_0x56e2fe;this[_0x12a694(0x194)](_0x5af2d7,_0x12a694(0x18f)+_0x2866b6,{'error':_0x344924 instanceof Error?_0x344924['message']:String(_0x344924),'duration':_0x2508fd});throw _0x344924;}}[a129_0x457552(0x197)](){const _0x456768=a129_0x457552;try{if(!a129_0x2400ae['existsSync'](this[_0x456768(0x19b)]))return[];const _0xe760fd=a129_0x2400ae[_0x456768(0x1b1)](this['logFilePath'],_0x456768(0x188));return _0xe760fd[_0x456768(0x186)](/\r?\n/)[_0x456768(0x196)](_0x4856df=>_0x4856df[_0x456768(0x195)]())['map'](_0x11ee16=>JSON[_0x456768(0x190)](_0x11ee16));}catch(_0x59f28b){return console['warn'](_0x456768(0x19d),_0x59f28b),[];}}[a129_0x457552(0x192)](){const _0x193933=a129_0x457552;try{a129_0x2400ae['existsSync'](this[_0x193933(0x19b)])&&a129_0x2400ae[_0x193933(0x1a5)](this[_0x193933(0x19b)],'',_0x193933(0x188));}catch(_0x396832){console['warn']('Failed\x20to\x20clear\x20logs:',_0x396832);}}[a129_0x457552(0x1b0)](){const _0x1f7a6a=a129_0x457552;return this[_0x1f7a6a(0x187)];}}export const logger=new Logger();
@@ -1 +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_0x261968=a130_0x22dc;function a130_0x22dc(_0x1d4b8d,_0x3266ed){_0x1d4b8d=_0x1d4b8d-0x17a;const _0x10fe90=a130_0x10fe();let _0x22dc47=_0x10fe90[_0x1d4b8d];return _0x22dc47;}(function(_0x303f93,_0xdd544f){const _0x1e63ed=a130_0x22dc,_0xaf2337=_0x303f93();while(!![]){try{const _0x199931=parseInt(_0x1e63ed(0x18f))/0x1*(-parseInt(_0x1e63ed(0x18a))/0x2)+-parseInt(_0x1e63ed(0x18d))/0x3*(-parseInt(_0x1e63ed(0x18e))/0x4)+parseInt(_0x1e63ed(0x189))/0x5*(-parseInt(_0x1e63ed(0x188))/0x6)+-parseInt(_0x1e63ed(0x183))/0x7*(-parseInt(_0x1e63ed(0x17d))/0x8)+parseInt(_0x1e63ed(0x17e))/0x9+parseInt(_0x1e63ed(0x187))/0xa*(parseInt(_0x1e63ed(0x182))/0xb)+-parseInt(_0x1e63ed(0x181))/0xc;if(_0x199931===_0xdd544f)break;else _0xaf2337['push'](_0xaf2337['shift']());}catch(_0x441eed){_0xaf2337['push'](_0xaf2337['shift']());}}}(a130_0x10fe,0x24ded));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x185)]),MIN_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x17f)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a130_0x10fe(){const _0xd39949=['includes','parse','227547brVtfb','12rmmiEf','5834laRlDK','exec','length','undefined','defineProperty','24kCplmQ','2504403AfCsJD','MIN_SAFE_INTEGER','json','4920660moKYiQ','1302598avDVlh','529473NkXwVx','prototype','MAX_SAFE_INTEGER','slice','10JPVKmQ','6wPhzZs','1421195vbAKKn','2AuqGAb'];a130_0x10fe=function(){return _0xd39949;};return a130_0x10fe();}function isUnsafeIntegerLiteral(_0x1b6914){const _0x1c022f=a130_0x261968;if(_0x1b6914[_0x1c022f(0x18b)]('.')||_0x1b6914[_0x1c022f(0x18b)]('e')||_0x1b6914[_0x1c022f(0x18b)]('E'))return![];const _0x2022ba=BigInt(_0x1b6914);return _0x2022ba>MAX_SAFE_INTEGER||_0x2022ba<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x43884a){const _0x4ae850=a130_0x261968;let _0x16a36a='',_0x2cde78=![],_0x44a00d=![];for(let _0x3eb7c8=0x0;_0x3eb7c8<_0x43884a[_0x4ae850(0x17a)];){const _0x488a2f=_0x43884a[_0x3eb7c8];if(_0x2cde78){_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;if(_0x44a00d)_0x44a00d=![];else{if(_0x488a2f==='\x5c')_0x44a00d=!![];else _0x488a2f==='\x22'&&(_0x2cde78=![]);}continue;}if(_0x488a2f==='\x22'){_0x2cde78=!![],_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;continue;}if(_0x488a2f==='-'||_0x488a2f>='0'&&_0x488a2f<='9'){const _0x133850=JSON_NUMBER_PATTERN[_0x4ae850(0x190)](_0x43884a[_0x4ae850(0x186)](_0x3eb7c8))?.[0x0];if(_0x133850){_0x16a36a+=isUnsafeIntegerLiteral(_0x133850)?'\x22'+_0x133850+'\x22':_0x133850,_0x3eb7c8+=_0x133850[_0x4ae850(0x17a)];continue;}}_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;}return _0x16a36a;}export function parseLosslessJson(_0x2ec0f8){const _0x599ab8=a130_0x261968;return JSON[_0x599ab8(0x18c)](quoteUnsafeIntegerLiterals(_0x2ec0f8));}export function installLosslessJsonResponseParser(){const _0x321e4f=a130_0x261968;if(typeof Response===_0x321e4f(0x17b))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x321e4f(0x184)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,'json'),Object[_0x321e4f(0x17c)](responseJsonPrototype,_0x321e4f(0x180),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x574d46(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x56cd00=_0x321e4f;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x56cd00(0x180),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}