@lovrabet/lovrabet-cli 2.1.22-beta.2 → 2.1.22-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/raw-flags.js +1 -1
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.js +1 -1
  99. package/lib/generated/build-info.d.ts +4 -4
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/runtime/event.js +1 -1
  103. package/lib/runtime/index.js +1 -1
  104. package/lib/runtime/queue.js +1 -1
  105. package/lib/runtime/resolve.js +1 -1
  106. package/lib/skills/npx-skills-add.js +1 -1
  107. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  108. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  109. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  110. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  111. package/lib/skills/runtime-skill-sync/links.js +1 -1
  112. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  113. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  114. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  115. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  116. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  117. package/lib/skills/runtime-skill-sync/push.js +1 -1
  118. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  119. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  120. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  121. package/lib/skills/runtime-skill-sync.js +1 -1
  122. package/lib/utils/apply-jq-filter.js +1 -1
  123. package/lib/utils/logger.js +1 -1
  124. package/lib/utils/lossless-json.js +1 -1
  125. package/lib/utils/params.js +1 -1
  126. package/lib/utils/platform.js +1 -1
  127. package/lib/utils/update-notice.js +1 -1
  128. package/lib/utils/version.js +1 -1
  129. package/lib/utils/write-cli-side-channel.js +1 -1
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x30dd90,_0x87af1){const _0x37bcb9=a103_0x6e3e,_0x5e0d48=_0x30dd90();while(!![]){try{const _0x4b6cb0=-parseInt(_0x37bcb9(0x19d))/0x1+-parseInt(_0x37bcb9(0x192))/0x2+-parseInt(_0x37bcb9(0x191))/0x3+-parseInt(_0x37bcb9(0x196))/0x4+parseInt(_0x37bcb9(0x195))/0x5+parseInt(_0x37bcb9(0x19e))/0x6+parseInt(_0x37bcb9(0x19a))/0x7;if(_0x4b6cb0===_0x87af1)break;else _0x5e0d48['push'](_0x5e0d48['shift']());}catch(_0xb3b69f){_0x5e0d48['push'](_0x5e0d48['shift']());}}}(a103_0x4c42,0x6ac59));import a103_0x37f8fd from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a103_0x4c42(){const _0x489709=['../commands/registry.js','878920mjmIsR','2127528KNOHdI','definition','flags','args','13459369pufejv','unknownCommand','validation','530958BMdOiw','2707446aXeZbT','defaultCommand','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','join','flatMap','1725882RIvAwa','948642vOFJdV','slice'];a103_0x4c42=function(){return _0x489709;};return a103_0x4c42();}import{buildMeowFlags}from'../constant/cli.js';function a103_0x6e3e(_0x5cb80d,_0x3e6d5d){_0x5cb80d=_0x5cb80d-0x18d;const _0x4c4250=a103_0x4c42();let _0x6e3eae=_0x4c4250[_0x5cb80d];return _0x6e3eae;}import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x1b8184){const _0x19afd4=a103_0x6e3e,_0x1c6aa2=a103_0x37f8fd('',{'importMeta':import.meta,'argv':_0x1b8184,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x1bc603=[..._0x1c6aa2['input']],_0x148367=_0x1c6aa2[_0x19afd4(0x198)];await correctFlags(_0x148367);const _0x1fdafc=_0x1bc603[0x0];if(!_0x1fdafc)throw CliErrors['validation']('Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');if(!isKnownService(_0x1fdafc)){const _0x300d19=resolveDynamicServiceCommand(_0x1bc603,_0x148367);if(!_0x300d19)throw CliErrors[_0x19afd4(0x19b)](_0x1bc603[_0x19afd4(0x18f)]('\x20'));return Object['assign'](_0x148367,_0x300d19[_0x19afd4(0x198)]),{'definition':_0x300d19[_0x19afd4(0x197)],'rawFlags':_0x148367,'args':_0x300d19[_0x19afd4(0x199)]};}const _0x3d00c3=getServiceEntry(_0x1fdafc),_0x2b71bf=_0x1bc603[0x1]||_0x3d00c3[_0x19afd4(0x18d)];if(!_0x2b71bf)throw CliErrors[_0x19afd4(0x19c)](_0x19afd4(0x18e)+_0x1fdafc+'\x22.');const _0x47067f=findDefinition(_0x1fdafc,_0x2b71bf);if(!_0x47067f)throw CliErrors[_0x19afd4(0x19b)](_0x1fdafc+'\x20'+_0x2b71bf);return{'definition':_0x47067f,'rawFlags':_0x148367,'args':_0x1bc603[_0x19afd4(0x193)](0x2)};}async function correctFlags(_0x2f0482){const _0x6bf252=a103_0x6e3e;try{const {correctFlags:_0x54a4d8}=await import('../framework/preparse.js'),{getAllDefinitions:_0x4ae29b}=await import(_0x6bf252(0x194)),_0x38bb66=_0x4ae29b()[_0x6bf252(0x190)](_0x40c945=>_0x40c945['flags']??[]),_0x3d097f=_0x54a4d8(_0x2f0482,_0x38bb66);Object['assign'](_0x2f0482,_0x3d097f[_0x6bf252(0x198)]);}catch{}}
1
+ (function(_0x366c14,_0x34bb56){const _0x396f90=a103_0x3e34,_0x1c6d93=_0x366c14();while(!![]){try{const _0x2e0db0=-parseInt(_0x396f90(0x192))/0x1*(parseInt(_0x396f90(0x18a))/0x2)+parseInt(_0x396f90(0x185))/0x3+parseInt(_0x396f90(0x18e))/0x4*(parseInt(_0x396f90(0x17e))/0x5)+parseInt(_0x396f90(0x189))/0x6*(-parseInt(_0x396f90(0x182))/0x7)+parseInt(_0x396f90(0x191))/0x8*(-parseInt(_0x396f90(0x183))/0x9)+parseInt(_0x396f90(0x187))/0xa*(parseInt(_0x396f90(0x186))/0xb)+parseInt(_0x396f90(0x188))/0xc;if(_0x2e0db0===_0x34bb56)break;else _0x1c6d93['push'](_0x1c6d93['shift']());}catch(_0x2ea061){_0x1c6d93['push'](_0x1c6d93['shift']());}}}(a103_0x2e85,0x7f1d0));import a103_0x28461f from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';function a103_0x2e85(){const _0x2cda87=['2196xRrVVa','95486wVKyzV','slice','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','defaultCommand','1532760VyaDtW','validation','definition','6707368kybZdD','18EdHEHh','unknownCommand','join','flatMap','10Rmxkxu','assign','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','../commands/registry.js','18991AOGniT','9IgKQOS','flags','1913697rOSMWN','121bgcjmU','128220rzRHtn','19993056Vlbmyt'];a103_0x2e85=function(){return _0x2cda87;};return a103_0x2e85();}import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a103_0x3e34(_0x1eb872,_0x1dc031){_0x1eb872=_0x1eb872-0x17d;const _0x2e85c7=a103_0x2e85();let _0x3e3435=_0x2e85c7[_0x1eb872];return _0x3e3435;}import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x313213){const _0x1e35c9=a103_0x3e34,_0x213f09=a103_0x28461f('',{'importMeta':import.meta,'argv':_0x313213,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x59d34c=[..._0x213f09['input']],_0x425af6=_0x213f09[_0x1e35c9(0x184)];await correctFlags(_0x425af6);const _0x29e40f=_0x59d34c[0x0];if(!_0x29e40f)throw CliErrors[_0x1e35c9(0x18f)](_0x1e35c9(0x18c));if(!isKnownService(_0x29e40f)){const _0x5cb803=resolveDynamicServiceCommand(_0x59d34c,_0x425af6);if(!_0x5cb803)throw CliErrors['unknownCommand'](_0x59d34c[_0x1e35c9(0x194)]('\x20'));return Object[_0x1e35c9(0x17f)](_0x425af6,_0x5cb803[_0x1e35c9(0x184)]),{'definition':_0x5cb803[_0x1e35c9(0x190)],'rawFlags':_0x425af6,'args':_0x5cb803['args']};}const _0x27d057=getServiceEntry(_0x29e40f),_0x184c6e=_0x59d34c[0x1]||_0x27d057[_0x1e35c9(0x18d)];if(!_0x184c6e)throw CliErrors[_0x1e35c9(0x18f)](_0x1e35c9(0x180)+_0x29e40f+'\x22.');const _0x41507f=findDefinition(_0x29e40f,_0x184c6e);if(!_0x41507f)throw CliErrors[_0x1e35c9(0x193)](_0x29e40f+'\x20'+_0x184c6e);return{'definition':_0x41507f,'rawFlags':_0x425af6,'args':_0x59d34c[_0x1e35c9(0x18b)](0x2)};}async function correctFlags(_0x429732){const _0x1538ba=a103_0x3e34;try{const {correctFlags:_0xeddf06}=await import('../framework/preparse.js'),{getAllDefinitions:_0x46ed40}=await import(_0x1538ba(0x181)),_0x413d02=_0x46ed40()[_0x1538ba(0x17d)](_0x357629=>_0x357629['flags']??[]),_0x545e23=_0xeddf06(_0x429732,_0x413d02);Object['assign'](_0x429732,_0x545e23['flags']);}catch{}}
@@ -1 +1 @@
1
- const a105_0x50e626=a105_0x3ce6;(function(_0x445315,_0x2bf905){const _0x37e8a5=a105_0x3ce6,_0x19f72d=_0x445315();while(!![]){try{const _0x2dfd42=-parseInt(_0x37e8a5(0x120))/0x1*(-parseInt(_0x37e8a5(0x12b))/0x2)+-parseInt(_0x37e8a5(0x11a))/0x3*(parseInt(_0x37e8a5(0x121))/0x4)+-parseInt(_0x37e8a5(0x127))/0x5*(parseInt(_0x37e8a5(0x128))/0x6)+parseInt(_0x37e8a5(0x132))/0x7*(-parseInt(_0x37e8a5(0x119))/0x8)+-parseInt(_0x37e8a5(0x11e))/0x9*(-parseInt(_0x37e8a5(0x12c))/0xa)+-parseInt(_0x37e8a5(0x126))/0xb*(-parseInt(_0x37e8a5(0x12f))/0xc)+parseInt(_0x37e8a5(0x12d))/0xd*(parseInt(_0x37e8a5(0x130))/0xe);if(_0x2dfd42===_0x2bf905)break;else _0x19f72d['push'](_0x19f72d['shift']());}catch(_0xb22d20){_0x19f72d['push'](_0x19f72d['shift']());}}}(a105_0x20f1,0x54b7e));function a105_0x3ce6(_0x266839,_0x3114c2){_0x266839=_0x266839-0x119;const _0x20f1ab=a105_0x20f1();let _0x3ce6f8=_0x20f1ab[_0x266839];return _0x3ce6f8;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a105_0x5427fa}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a105_0x5427fa;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a105_0x50e626(0x124)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a105_0x20f1(){const _0x17c732=['pipe','exit\x20','log','285003lEuqXW','status','373918TnIRHM','62092USXFjC','stderr','inherit','skipNpxSkillsEnvSuffix','trim','1922085dAEECB','146705AkfUPd','6HkNRxB','toString','join','2ydNSBg','10BjqXmr','13zooWjL','skills','36zxwMYd','4269874yOCUOa','stdout','7HjGpqP','4880528eadesb','48eTGEHJ'];a105_0x20f1=function(){return _0x17c732;};return a105_0x20f1();}export function runNpxSkillsAddGlobal(_0x1801b2,_0x4d1cd1=LOVRABET_SKILL_SOURCE,_0x1f44ba){const _0x1cc845=a105_0x50e626;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x22f532=_0x1f44ba?.['stdio']??_0x1cc845(0x123),_0x23bee1=resolveNpmBin('npx'),_0x132fd6=[_0x1cc845(0x12e),'add',_0x4d1cd1,'-g','-y'],_0x4f0f9f=[_0x23bee1,..._0x132fd6][_0x1cc845(0x12a)]('\x20');console[_0x1cc845(0x11d)]('*\x20'+_0x4f0f9f);const _0x42f767=spawnSync(_0x23bee1,_0x132fd6,{'cwd':_0x1801b2,'stdio':_0x22f532,'env':process.env,'shell':![]});if(_0x42f767[_0x1cc845(0x11f)]===0x0)return{'ok':!![],'status':0x0};let _0x278c31=_0x1cc845(0x11c)+(_0x42f767[_0x1cc845(0x11f)]??'unknown');if(_0x22f532===_0x1cc845(0x11b)){const _0x1e87aa=_0x42f767[_0x1cc845(0x122)]?_0x42f767[_0x1cc845(0x122)][_0x1cc845(0x129)]()[_0x1cc845(0x125)]():'',_0x28a4b7=_0x42f767[_0x1cc845(0x131)]?_0x42f767[_0x1cc845(0x131)][_0x1cc845(0x129)]()[_0x1cc845(0x125)]():'';if(_0x1e87aa)_0x278c31=_0x1e87aa;else{if(_0x28a4b7)_0x278c31=_0x28a4b7;}}return{'ok':![],'status':_0x42f767['status']??null,'error':_0x278c31};}
1
+ const a105_0x2ebf44=a105_0x2a11;function a105_0x2a11(_0x3ca540,_0x50812e){_0x3ca540=_0x3ca540-0x123;const _0x8c2337=a105_0x8c23();let _0x2a11c8=_0x8c2337[_0x3ca540];return _0x2a11c8;}(function(_0x4e3326,_0x54234b){const _0x2623d4=a105_0x2a11,_0x106777=_0x4e3326();while(!![]){try{const _0x36fea3=-parseInt(_0x2623d4(0x135))/0x1*(-parseInt(_0x2623d4(0x13c))/0x2)+parseInt(_0x2623d4(0x12f))/0x3+-parseInt(_0x2623d4(0x125))/0x4*(-parseInt(_0x2623d4(0x131))/0x5)+parseInt(_0x2623d4(0x12a))/0x6+-parseInt(_0x2623d4(0x13a))/0x7+-parseInt(_0x2623d4(0x12b))/0x8*(parseInt(_0x2623d4(0x124))/0x9)+-parseInt(_0x2623d4(0x128))/0xa*(parseInt(_0x2623d4(0x12d))/0xb);if(_0x36fea3===_0x54234b)break;else _0x106777['push'](_0x106777['shift']());}catch(_0x2798b7){_0x106777['push'](_0x106777['shift']());}}}(a105_0x8c23,0x5bdc2));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a105_0x39170d}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a105_0x39170d;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a105_0x2ebf44(0x137)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x3c5e28,_0x17659c=LOVRABET_SKILL_SOURCE,_0xe1ffc6){const _0x36eb99=a105_0x2ebf44;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x51b316=_0xe1ffc6?.[_0x36eb99(0x132)]??_0x36eb99(0x129),_0x146994=resolveNpmBin(_0x36eb99(0x138)),_0x4f5576=[_0x36eb99(0x136),_0x36eb99(0x13b),_0x17659c,'-g','-y'],_0x497b02=[_0x146994,..._0x4f5576][_0x36eb99(0x126)]('\x20');console[_0x36eb99(0x139)]('*\x20'+_0x497b02);const _0x41212e=spawnSync(_0x146994,_0x4f5576,{'cwd':_0x3c5e28,'stdio':_0x51b316,'env':process.env,'shell':![]});if(_0x41212e[_0x36eb99(0x12c)]===0x0)return{'ok':!![],'status':0x0};let _0x37c9a6=_0x36eb99(0x134)+(_0x41212e[_0x36eb99(0x12c)]??'unknown');if(_0x51b316===_0x36eb99(0x133)){const _0x2980f6=_0x41212e[_0x36eb99(0x12e)]?_0x41212e[_0x36eb99(0x12e)]['toString']()[_0x36eb99(0x127)]():'',_0x99830c=_0x41212e[_0x36eb99(0x123)]?_0x41212e[_0x36eb99(0x123)][_0x36eb99(0x130)]()[_0x36eb99(0x127)]():'';if(_0x2980f6)_0x37c9a6=_0x2980f6;else{if(_0x99830c)_0x37c9a6=_0x99830c;}}return{'ok':![],'status':_0x41212e[_0x36eb99(0x12c)]??null,'error':_0x37c9a6};}function a105_0x8c23(){const _0x16ad45=['1TMQOpZ','skills','skipNpxSkillsEnvSuffix','npx','log','3925194uQumPF','add','863354BzPdsn','stdout','1701GVSdsG','36iMqRbl','join','trim','1167360hDswwM','inherit','3835710RgWRAY','25728Lpoyfb','status','22Crqrdl','stderr','912564Rwabzd','toString','223970unjlDj','stdio','pipe','exit\x20'];a105_0x8c23=function(){return _0x16ad45;};return a105_0x8c23();}
@@ -1 +1 @@
1
- const a106_0x11c773=a106_0x3c2a;(function(_0x5dc078,_0x13907c){const _0x5e6d41=a106_0x3c2a,_0x2661f5=_0x5dc078();while(!![]){try{const _0x17f935=-parseInt(_0x5e6d41(0x128))/0x1*(parseInt(_0x5e6d41(0x126))/0x2)+parseInt(_0x5e6d41(0x124))/0x3*(-parseInt(_0x5e6d41(0x11d))/0x4)+-parseInt(_0x5e6d41(0x11f))/0x5*(parseInt(_0x5e6d41(0x11a))/0x6)+parseInt(_0x5e6d41(0x11e))/0x7+-parseInt(_0x5e6d41(0x12c))/0x8+parseInt(_0x5e6d41(0x119))/0x9+parseInt(_0x5e6d41(0x123))/0xa*(parseInt(_0x5e6d41(0x121))/0xb);if(_0x17f935===_0x13907c)break;else _0x2661f5['push'](_0x2661f5['shift']());}catch(_0x43f04a){_0x2661f5['push'](_0x2661f5['shift']());}}}(a106_0x5798,0xc972c));export const METADATA_FILE=a106_0x11c773(0x11b);export const SKILL_FILE=a106_0x11c773(0x120);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a106_0x11c773(0x12a)]);function a106_0x5798(){const _0x4e8d28=['node_modules','29084cMggXH','10809134YXogHi','6737805XQvpsi','SKILL.md','1921249xBlynU','dist','30ZzyVec','69BIvVPG','.cache','22226SVXPMz','build','5dBPxIu','.svn','.DS_Store','.hg','6228760jyNJFW','.turbo','.next','9953523wtsEvh','6JfvVPT','lovrabet.skill.json'];a106_0x5798=function(){return _0x4e8d28;};return a106_0x5798();}function a106_0x3c2a(_0x4d1467,_0x34e984){_0x4d1467=_0x4d1467-0x119;const _0x579885=a106_0x5798();let _0x3c2aed=_0x579885[_0x4d1467];return _0x3c2aed;}export const IGNORED_DIR_NAMES=new Set(['.git',a106_0x11c773(0x12b),a106_0x11c773(0x129),a106_0x11c773(0x11c),a106_0x11c773(0x12e),a106_0x11c773(0x122),a106_0x11c773(0x127),'coverage',a106_0x11c773(0x12d),a106_0x11c773(0x125)]);
1
+ const a106_0x40885f=a106_0x2e96;function a106_0x2e96(_0x5f054d,_0x5ab9b1){_0x5f054d=_0x5f054d-0x7b;const _0x31e38c=a106_0x31e3();let _0x2e965b=_0x31e38c[_0x5f054d];return _0x2e965b;}(function(_0x4f7ccb,_0x21748d){const _0x1e8f36=a106_0x2e96,_0x1c38ea=_0x4f7ccb();while(!![]){try{const _0x3ca744=-parseInt(_0x1e8f36(0x8b))/0x1*(-parseInt(_0x1e8f36(0x89))/0x2)+parseInt(_0x1e8f36(0x8d))/0x3+parseInt(_0x1e8f36(0x7b))/0x4+parseInt(_0x1e8f36(0x81))/0x5+-parseInt(_0x1e8f36(0x85))/0x6+parseInt(_0x1e8f36(0x87))/0x7+-parseInt(_0x1e8f36(0x7d))/0x8*(parseInt(_0x1e8f36(0x8a))/0x9);if(_0x3ca744===_0x21748d)break;else _0x1c38ea['push'](_0x1c38ea['shift']());}catch(_0x3c74a4){_0x1c38ea['push'](_0x1c38ea['shift']());}}}(a106_0x31e3,0x1b0ae));export const METADATA_FILE=a106_0x40885f(0x7c);export const SKILL_FILE=a106_0x40885f(0x82);function a106_0x31e3(){const _0x52b051=['.cache','522387OFojcc','305504drNYlP','lovrabet.skill.json','25496huBgQm','build','.turbo','.DS_Store','468545dBWzGf','SKILL.md','dist','.next','508590bUkKpm','.git','631407LTIhaI','node_modules','39076UqaiuG','1116dUbkwl','8EnbKio'];a106_0x31e3=function(){return _0x52b051;};return a106_0x31e3();}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a106_0x40885f(0x80)]);export const IGNORED_DIR_NAMES=new Set([a106_0x40885f(0x86),'.hg','.svn',a106_0x40885f(0x88),a106_0x40885f(0x84),a106_0x40885f(0x83),a106_0x40885f(0x7e),'coverage',a106_0x40885f(0x7f),a106_0x40885f(0x8c)]);
@@ -1 +1 @@
1
- (function(_0x5f2491,_0x1c60ec){const _0x3b47f3=a107_0x2c0c,_0x1eb488=_0x5f2491();while(!![]){try{const _0x3508d4=parseInt(_0x3b47f3(0x1d8))/0x1*(parseInt(_0x3b47f3(0x1d1))/0x2)+parseInt(_0x3b47f3(0x1d2))/0x3+parseInt(_0x3b47f3(0x1d4))/0x4+-parseInt(_0x3b47f3(0x1d3))/0x5+parseInt(_0x3b47f3(0x1cd))/0x6*(-parseInt(_0x3b47f3(0x1d5))/0x7)+-parseInt(_0x3b47f3(0x1d9))/0x8+-parseInt(_0x3b47f3(0x1d7))/0x9*(parseInt(_0x3b47f3(0x1cb))/0xa);if(_0x3508d4===_0x1c60ec)break;else _0x1eb488['push'](_0x1eb488['shift']());}catch(_0x288360){_0x1eb488['push'](_0x1eb488['shift']());}}}(a107_0x5774,0x8c2da));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x413811,_0x2ee123){const _0x5b60c2=a107_0x2c0c,_0x14d542=normalizeSkillRelativePath(_0x2ee123),_0x4c5b2d=realOrResolved(_0x413811),_0x1620de=resolve(_0x4c5b2d,..._0x14d542['split']('/'));if(!isPathInside(_0x1620de,_0x4c5b2d))throw CliErrors[_0x5b60c2(0x1d0)](_0x5b60c2(0x1cf)+_0x2ee123);return ensureNoSymlinkInManagedPath(_0x4c5b2d,_0x14d542),_0x1620de;}export function ensureNoSymlinkInManagedPath(_0x4bf8ff,_0x472fb6){const _0x3a0328=a107_0x2c0c;let _0xc4787f=_0x4bf8ff;for(const _0x4d123a of _0x472fb6[_0x3a0328(0x1ca)]('/')){_0xc4787f=resolve(_0xc4787f,_0x4d123a);const _0x1deecf=lstatIfPresent(_0xc4787f);if(_0x1deecf?.[_0x3a0328(0x1d6)]())throw CliErrors[_0x3a0328(0x1d0)](_0x3a0328(0x1da)+_0x472fb6);}}function a107_0x5774(){const _0x4c2fe8=['36747tstTQu','43NPTPeC','1733888jpHrJj','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','split','2830SzceOr','from','18iJoMoU','utf8','Unsafe\x20Skill\x20file\x20path:\x20','validation','50628dDugOo','1580613uEoHQy','71450xoTzEZ','1635204oXRAEZ','148141WJHaUp','isSymbolicLink'];a107_0x5774=function(){return _0x4c2fe8;};return a107_0x5774();}function a107_0x2c0c(_0x107791,_0x2f106c){_0x107791=_0x107791-0x1ca;const _0x57749c=a107_0x5774();let _0x2c0cf6=_0x57749c[_0x107791];return _0x2c0cf6;}export function isDanglingSymlink(_0x55c99e){const _0x102bff=a107_0x2c0c;try{return lstatSync(_0x55c99e)[_0x102bff(0x1d6)]();}catch{return![];}}export function resolveSymlinkTarget(_0x617b80){const _0x3a023b=readlinkSync(_0x617b80);return isAbsolute(_0x3a023b)?_0x3a023b:resolve(dirname(_0x617b80),_0x3a023b);}export function isPathInside(_0x598ef7,_0x3d2cbd){const _0x3364f5=_0x598ef7['endsWith'](sep)?_0x598ef7:''+_0x598ef7+sep,_0xdffed4=_0x3d2cbd['endsWith'](sep)?_0x3d2cbd:''+_0x3d2cbd+sep;return _0x598ef7===_0x3d2cbd||_0x3364f5['startsWith'](_0xdffed4);}export function realOrResolved(_0x507d1c){try{return realpathSync(_0x507d1c);}catch{return resolve(_0x507d1c);}}export function lstatIfPresent(_0x332c34){try{return lstatSync(_0x332c34);}catch{return undefined;}}export function writeTextAtomic(_0x35e812,_0x19c5ac,_0x5a8e87){const _0x28194b=a107_0x2c0c;writeBytesAtomic(_0x35e812,Buffer[_0x28194b(0x1cc)](_0x19c5ac,_0x28194b(0x1ce)),_0x5a8e87);}export function writeBytesAtomic(_0x24df1a,_0xf738f8,_0x39599e){const _0x940400=_0x24df1a+'.tmp';try{writeFileSync(_0x940400,_0xf738f8,{'mode':_0x39599e}),renameSync(_0x940400,_0x24df1a);}catch(_0xb55115){try{rmSync(_0x940400,{'force':!![]});}catch{}throw _0xb55115;}}export function writeJsonAtomic(_0x135b33,_0x3ede7c){writeTextAtomic(_0x135b33,JSON['stringify'](_0x3ede7c,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x37c8c9,_0x5c141e){const _0x1662d2=a107_0x3cf0,_0x121a3e=_0x37c8c9();while(!![]){try{const _0x1e6987=parseInt(_0x1662d2(0xef))/0x1+parseInt(_0x1662d2(0xe8))/0x2*(-parseInt(_0x1662d2(0xe7))/0x3)+parseInt(_0x1662d2(0xf6))/0x4*(-parseInt(_0x1662d2(0xea))/0x5)+parseInt(_0x1662d2(0xec))/0x6*(-parseInt(_0x1662d2(0xf2))/0x7)+parseInt(_0x1662d2(0xe9))/0x8+-parseInt(_0x1662d2(0xf7))/0x9*(parseInt(_0x1662d2(0xf3))/0xa)+parseInt(_0x1662d2(0xf8))/0xb;if(_0x1e6987===_0x5c141e)break;else _0x121a3e['push'](_0x121a3e['shift']());}catch(_0x27c595){_0x121a3e['push'](_0x121a3e['shift']());}}}(a107_0x1c0c,0x71245));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x3f9036,_0x226899){const _0x5d2c87=a107_0x3cf0,_0x240a30=normalizeSkillRelativePath(_0x226899),_0x4594e2=realOrResolved(_0x3f9036),_0x3fa0e0=resolve(_0x4594e2,..._0x240a30[_0x5d2c87(0xf0)]('/'));if(!isPathInside(_0x3fa0e0,_0x4594e2))throw CliErrors[_0x5d2c87(0xf4)](_0x5d2c87(0xf5)+_0x226899);return ensureNoSymlinkInManagedPath(_0x4594e2,_0x240a30),_0x3fa0e0;}export function ensureNoSymlinkInManagedPath(_0x23fa3f,_0x146a39){const _0x347b4b=a107_0x3cf0;let _0x3129f8=_0x23fa3f;for(const _0x35629d of _0x146a39['split']('/')){_0x3129f8=resolve(_0x3129f8,_0x35629d);const _0x194a1f=lstatIfPresent(_0x3129f8);if(_0x194a1f?.[_0x347b4b(0xee)]())throw CliErrors[_0x347b4b(0xf4)](_0x347b4b(0xfb)+_0x146a39);}}export function isDanglingSymlink(_0x33e07a){const _0x40a707=a107_0x3cf0;try{return lstatSync(_0x33e07a)[_0x40a707(0xee)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4ab877){const _0x5087a1=readlinkSync(_0x4ab877);return isAbsolute(_0x5087a1)?_0x5087a1:resolve(dirname(_0x4ab877),_0x5087a1);}export function isPathInside(_0x133cdc,_0x2b56a8){const _0x55608d=a107_0x3cf0,_0x5109c3=_0x133cdc[_0x55608d(0xf9)](sep)?_0x133cdc:''+_0x133cdc+sep,_0x5ea913=_0x2b56a8[_0x55608d(0xf9)](sep)?_0x2b56a8:''+_0x2b56a8+sep;return _0x133cdc===_0x2b56a8||_0x5109c3['startsWith'](_0x5ea913);}export function realOrResolved(_0x4850fc){try{return realpathSync(_0x4850fc);}catch{return resolve(_0x4850fc);}}export function lstatIfPresent(_0xabe706){try{return lstatSync(_0xabe706);}catch{return undefined;}}function a107_0x1c0c(){const _0x1a6fb2=['1614oBRrKW','.tmp','isSymbolicLink','761669vNJdDL','split','utf8','19691wEQjyp','260LNRoMP','validation','Unsafe\x20Skill\x20file\x20path:\x20','2522396DEhUZK','219609sBuPmW','24475759QPREeL','endsWith','from','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','6qSALoW','528648QkMslB','216488nkaBAY','5ZRQUxq','stringify'];a107_0x1c0c=function(){return _0x1a6fb2;};return a107_0x1c0c();}export function writeTextAtomic(_0x560cc0,_0x3f8f8d,_0x1529eb){const _0x38d2fa=a107_0x3cf0;writeBytesAtomic(_0x560cc0,Buffer[_0x38d2fa(0xfa)](_0x3f8f8d,_0x38d2fa(0xf1)),_0x1529eb);}export function writeBytesAtomic(_0x15bf0b,_0x436d85,_0x282efa){const _0x5e9997=a107_0x3cf0,_0x1ae588=_0x15bf0b+_0x5e9997(0xed);try{writeFileSync(_0x1ae588,_0x436d85,{'mode':_0x282efa}),renameSync(_0x1ae588,_0x15bf0b);}catch(_0x529c40){try{rmSync(_0x1ae588,{'force':!![]});}catch{}throw _0x529c40;}}function a107_0x3cf0(_0x3f1d93,_0x4bbc0f){_0x3f1d93=_0x3f1d93-0xe7;const _0x1c0c70=a107_0x1c0c();let _0x3cf0d5=_0x1c0c70[_0x3f1d93];return _0x3cf0d5;}export function writeJsonAtomic(_0x6a359f,_0x1e06da){const _0x40bf48=a107_0x3cf0;writeTextAtomic(_0x6a359f,JSON[_0x40bf48(0xeb)](_0x1e06da,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x568790,_0x300158){const _0x273e2b=a108_0x51ba,_0x2c5058=_0x568790();while(!![]){try{const _0x47a916=-parseInt(_0x273e2b(0xa0))/0x1+parseInt(_0x273e2b(0x9d))/0x2+-parseInt(_0x273e2b(0x9c))/0x3+-parseInt(_0x273e2b(0xa7))/0x4+parseInt(_0x273e2b(0xa5))/0x5*(parseInt(_0x273e2b(0xa8))/0x6)+parseInt(_0x273e2b(0xa4))/0x7*(-parseInt(_0x273e2b(0x99))/0x8)+parseInt(_0x273e2b(0xa3))/0x9*(parseInt(_0x273e2b(0xa2))/0xa);if(_0x47a916===_0x300158)break;else _0x2c5058['push'](_0x2c5058['shift']());}catch(_0x37ac58){_0x2c5058['push'](_0x2c5058['shift']());}}}(a108_0x1cf0,0xcabd0));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x3b2105){const _0x2d6e88=a108_0x51ba;return createHash(_0x2d6e88(0x9b))[_0x2d6e88(0x9f)](_0x3b2105)[_0x2d6e88(0xa1)]('hex');}function a108_0x51ba(_0x2c1f58,_0x21cbb8){_0x2c1f58=_0x2c1f58-0x99;const _0x1cf0b4=a108_0x1cf0();let _0x51ba9b=_0x1cf0b4[_0x2c1f58];return _0x51ba9b;}export function fileHash(_0x3171c8){return bufferSha256(fileContent(_0x3171c8));}export function bufferSha256(_0x55c8b0){const _0xed589f=a108_0x51ba;return createHash(_0xed589f(0x9b))[_0xed589f(0x9f)](_0x55c8b0)[_0xed589f(0xa1)](_0xed589f(0xa6));}export function fileTreeHash(_0x5f37df){const _0x2f6333=a108_0x51ba,_0x11a216=createHash('sha256');for(const _0x52b073 of normalizeManifestFiles(_0x5f37df)){_0x11a216[_0x2f6333(0x9f)](_0x52b073[_0x2f6333(0x9e)]),_0x11a216[_0x2f6333(0x9f)]('\x00'),_0x11a216[_0x2f6333(0x9f)](_0x52b073[_0x2f6333(0x9b)]),_0x11a216[_0x2f6333(0x9f)]('\x00'),_0x11a216[_0x2f6333(0x9f)](String(_0x52b073[_0x2f6333(0x9a)])),_0x11a216['update']('\x00');}return _0x11a216[_0x2f6333(0xa1)](_0x2f6333(0xa6));}function a108_0x1cf0(){const _0x22f249=['sha256','4044624lLoXLG','2936206xKfxDz','path','update','1147894lNkvey','digest','20558410dMHADL','9rknIvp','7FNmvMo','20gkTPoR','hex','1556248GdjYtb','1379682OoPrtp','5825216bcKoyC','size'];a108_0x1cf0=function(){return _0x22f249;};return a108_0x1cf0();}
1
+ (function(_0x150575,_0x5cc371){const _0x2d2a93=a108_0x107f,_0x12b283=_0x150575();while(!![]){try{const _0xfd3308=-parseInt(_0x2d2a93(0x7a))/0x1*(parseInt(_0x2d2a93(0x73))/0x2)+parseInt(_0x2d2a93(0x75))/0x3*(-parseInt(_0x2d2a93(0x74))/0x4)+parseInt(_0x2d2a93(0x71))/0x5*(parseInt(_0x2d2a93(0x6f))/0x6)+parseInt(_0x2d2a93(0x6b))/0x7*(-parseInt(_0x2d2a93(0x6c))/0x8)+parseInt(_0x2d2a93(0x6a))/0x9+-parseInt(_0x2d2a93(0x78))/0xa+-parseInt(_0x2d2a93(0x6e))/0xb*(-parseInt(_0x2d2a93(0x70))/0xc);if(_0xfd3308===_0x5cc371)break;else _0x12b283['push'](_0x12b283['shift']());}catch(_0x31cd41){_0x12b283['push'](_0x12b283['shift']());}}}(a108_0x4af7,0xd9a71));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0xa44ffd){const _0x48986d=a108_0x107f;return createHash(_0x48986d(0x76))[_0x48986d(0x72)](_0xa44ffd)[_0x48986d(0x79)](_0x48986d(0x6d));}function a108_0x107f(_0x5a1a42,_0x42fdea){_0x5a1a42=_0x5a1a42-0x6a;const _0x4af7a7=a108_0x4af7();let _0x107ff3=_0x4af7a7[_0x5a1a42];return _0x107ff3;}function a108_0x4af7(){const _0x333dfc=['path','17687740PZpNbO','digest','1GMQErD','size','13356747cMzocv','7kQQKNA','4694552NNlftL','hex','34056djYpTC','24618rnyeax','11292HvMXTh','780MLfETp','update','271186XDLUAy','3309592BlTQad','6qQHCkm','sha256'];a108_0x4af7=function(){return _0x333dfc;};return a108_0x4af7();}export function fileHash(_0x44a005){return bufferSha256(fileContent(_0x44a005));}export function bufferSha256(_0x2f5495){const _0x100af2=a108_0x107f;return createHash('sha256')[_0x100af2(0x72)](_0x2f5495)[_0x100af2(0x79)]('hex');}export function fileTreeHash(_0x19f213){const _0x4ca64e=a108_0x107f,_0x22fb6b=createHash(_0x4ca64e(0x76));for(const _0x21ca3c of normalizeManifestFiles(_0x19f213)){_0x22fb6b['update'](_0x21ca3c[_0x4ca64e(0x77)]),_0x22fb6b['update']('\x00'),_0x22fb6b[_0x4ca64e(0x72)](_0x21ca3c[_0x4ca64e(0x76)]),_0x22fb6b[_0x4ca64e(0x72)]('\x00'),_0x22fb6b[_0x4ca64e(0x72)](String(_0x21ca3c[_0x4ca64e(0x7b)])),_0x22fb6b[_0x4ca64e(0x72)]('\x00');}return _0x22fb6b[_0x4ca64e(0x79)](_0x4ca64e(0x6d));}
@@ -1 +1 @@
1
- function a109_0x27fc(_0x3f346b,_0x3cbb94){_0x3f346b=_0x3f346b-0x120;const _0x84f067=a109_0x84f0();let _0x27fc0a=_0x84f067[_0x3f346b];return _0x27fc0a;}function a109_0x84f0(){const _0x292d6f=['project','12RnXIYM','managedRoot','39582lTkmlC','skills','.agents','8631416MwFQGR','8840676dsPNNv','85868GIGFTB','7RRGDnm','39305JvNsdg','116FSomkb','3229110fCMRfd','cwd','11oLTdGN','6762684xtDNUn','730PYyhji'];a109_0x84f0=function(){return _0x292d6f;};return a109_0x84f0();}(function(_0x5ca8f6,_0x573d5c){const _0x83e66b=a109_0x27fc,_0x38940d=_0x5ca8f6();while(!![]){try{const _0x46a581=-parseInt(_0x83e66b(0x120))/0x1*(parseInt(_0x83e66b(0x127))/0x2)+-parseInt(_0x83e66b(0x12b))/0x3+-parseInt(_0x83e66b(0x12a))/0x4*(parseInt(_0x83e66b(0x129))/0x5)+parseInt(_0x83e66b(0x126))/0x6+parseInt(_0x83e66b(0x128))/0x7*(parseInt(_0x83e66b(0x125))/0x8)+-parseInt(_0x83e66b(0x122))/0x9*(parseInt(_0x83e66b(0x12f))/0xa)+parseInt(_0x83e66b(0x12d))/0xb*(parseInt(_0x83e66b(0x12e))/0xc);if(_0x46a581===_0x573d5c)break;else _0x38940d['push'](_0x38940d['shift']());}catch(_0x178e82){_0x38940d['push'](_0x38940d['shift']());}}}(a109_0x84f0,0xee1e1));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x39b116,_0x572f23='global',_0x5a9844={}){const _0x5874d6=a109_0x27fc,_0xd04817=resolveSkillSyncPaths(_0x5a9844),_0x5bdf1b=safePathSegment(_0x39b116,'appCode'),_0x3a5b4e=_0x572f23===_0x5874d6(0x130)?[resolve(_0x5a9844[_0x5874d6(0x12c)]??process[_0x5874d6(0x12c)](),_0x5874d6(0x124),_0x5874d6(0x123))]:runtimeAgentSkillRoots(_0xd04817);return Object['freeze']({'scope':_0x572f23,'appCode':_0x5bdf1b,'skillRoots':Object['freeze'](_0x3a5b4e),'managedRoot':_0xd04817[_0x5874d6(0x121)]});}
1
+ (function(_0x58317b,_0x5ad293){const _0x211424=a109_0x48c7,_0x832fe4=_0x58317b();while(!![]){try{const _0x5c349a=parseInt(_0x211424(0xff))/0x1+-parseInt(_0x211424(0x105))/0x2+-parseInt(_0x211424(0x101))/0x3*(parseInt(_0x211424(0xfb))/0x4)+parseInt(_0x211424(0x108))/0x5*(-parseInt(_0x211424(0xfd))/0x6)+-parseInt(_0x211424(0x109))/0x7*(parseInt(_0x211424(0x104))/0x8)+parseInt(_0x211424(0xfe))/0x9+parseInt(_0x211424(0xfc))/0xa;if(_0x5c349a===_0x5ad293)break;else _0x832fe4['push'](_0x832fe4['shift']());}catch(_0x43c297){_0x832fe4['push'](_0x832fe4['shift']());}}}(a109_0x38e1,0xec7a1));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a109_0x48c7(_0x1b257d,_0x3face7){_0x1b257d=_0x1b257d-0xfb;const _0x38e15e=a109_0x38e1();let _0x48c724=_0x38e15e[_0x1b257d];return _0x48c724;}function a109_0x38e1(){const _0x2be499=['87zBRvku','freeze','skills','6119632wDNjGo','2415072YFyHZQ','appCode','cwd','755fTSqCH','7TvROoa','managedRoot','6092KLZyOX','16966240PELNYf','8850QRzRlR','6807600kxMZIi','754967leqLoP','.agents'];a109_0x38e1=function(){return _0x2be499;};return a109_0x38e1();}export function resolveRuntimeSkillInstallTarget(_0x3bfede,_0x138e06='global',_0x480313={}){const _0x836d65=a109_0x48c7,_0x4c706a=resolveSkillSyncPaths(_0x480313),_0x50b796=safePathSegment(_0x3bfede,_0x836d65(0x106)),_0x273fba=_0x138e06==='project'?[resolve(_0x480313[_0x836d65(0x107)]??process['cwd'](),_0x836d65(0x100),_0x836d65(0x103))]:runtimeAgentSkillRoots(_0x4c706a);return Object[_0x836d65(0x102)]({'scope':_0x138e06,'appCode':_0x50b796,'skillRoots':Object[_0x836d65(0x102)](_0x273fba),'managedRoot':_0x4c706a[_0x836d65(0x10a)]});}
@@ -1 +1 @@
1
- const a110_0x25f8f5=a110_0x5089;(function(_0x5556ea,_0x16727d){const _0xc2c7a6=a110_0x5089,_0xe1b40d=_0x5556ea();while(!![]){try{const _0x48e69a=parseInt(_0xc2c7a6(0x150))/0x1*(-parseInt(_0xc2c7a6(0x172))/0x2)+-parseInt(_0xc2c7a6(0x173))/0x3+parseInt(_0xc2c7a6(0x156))/0x4+-parseInt(_0xc2c7a6(0x164))/0x5+-parseInt(_0xc2c7a6(0x15b))/0x6+parseInt(_0xc2c7a6(0x17f))/0x7*(-parseInt(_0xc2c7a6(0x177))/0x8)+parseInt(_0xc2c7a6(0x16b))/0x9;if(_0x48e69a===_0x16727d)break;else _0xe1b40d['push'](_0xe1b40d['shift']());}catch(_0x523f61){_0xe1b40d['push'](_0xe1b40d['shift']());}}}(a110_0x54ba,0xb02fc));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a110_0x42ca26 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a110_0x54ba(){const _0x32922f=['Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','1543dfhqQv','project','metadataPath','length','set','contentHash','1466512xxyDwU','values','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','startsWith','7214688jZnVQW','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','map','env','skillRoots','accessKey','runtime-observe','push','not-managed-symlink','2652985xuzFCF','pruneSkillCodes','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','appCode','personal','scope','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','37747521uUlaZt','isDirectory','external-symlink','builtin','validation','created','unchanged','344ZjMomJ','2618337pjIWdr','metadata-mismatch','dir','company','24tDdYWp','lovrabet','isSymbolicLink','scopes','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','linked-from-protected-root','skillCode','2258473CXkGAC','get','filter','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','removed','protectedLinkRoots','agentsSkillsDir','has','trim','activeSkillCodes','managedRoot','skill','name','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'];a110_0x54ba=function(){return _0x32922f;};return a110_0x54ba();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a110_0x42ca26,RESERVED_PROJECT_SKILL_CODES=new Set([a110_0x25f8f5(0x178),a110_0x25f8f5(0x161),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x67485f,_0x240dae){const _0x5655dd=a110_0x25f8f5,_0x141d1d=new Map();for(const _0x521847 of _0x67485f){const _0x21d596=_0x521847['skill'][_0x5655dd(0x17e)];if(!_0x21d596)continue;const _0x53143a=_0x141d1d[_0x5655dd(0x180)](_0x21d596);(!_0x53143a||_0x521847[_0x5655dd(0x169)]===_0x5655dd(0x168))&&_0x141d1d[_0x5655dd(0x154)](_0x21d596,_0x521847);}const _0x264174=[];for(const _0x2a8374 of _0x141d1d[_0x5655dd(0x157)]()){const _0x30c33b=requireSkillCode(_0x2a8374['skill']),_0x354faf=readMetadataIfPresent(_0x2a8374['metadataPath']);if(_0x354faf?.['appCode']!==_0x240dae[_0x5655dd(0x167)]||_0x354faf[_0x5655dd(0x17e)]!==_0x30c33b)throw CliErrors[_0x5655dd(0x16f)](_0x5655dd(0x15c)+_0x240dae[_0x5655dd(0x167)]+':\x20'+_0x2a8374[_0x5655dd(0x152)]);const _0x18d715=runtimeSkillLinkName(_0x240dae,_0x30c33b);for(const _0x447c4b of _0x240dae[_0x5655dd(0x15f)]){_0x264174[_0x5655dd(0x162)](ensureManagedSymlink(resolve(_0x447c4b,_0x18d715),_0x2a8374['dir'],_0x240dae,_0x30c33b));}}return _0x264174;}export function pruneStaleRuntimeSkillLinks(_0xcfb6,_0x487c9b,_0x57ebdf){const _0x260bd4=a110_0x25f8f5,_0x5d5fb2=new Set([..._0x487c9b][_0x260bd4(0x15d)](_0x8434c5=>_0x8434c5[_0x260bd4(0x148)]())[_0x260bd4(0x181)](Boolean)),_0xc75592=_0x57ebdf?new Set([..._0x57ebdf][_0x260bd4(0x15d)](_0x9cf2a4=>_0x9cf2a4[_0x260bd4(0x148)]())[_0x260bd4(0x181)](Boolean)):undefined,_0x2f383f=[];for(const _0x2cc253 of _0xcfb6[_0x260bd4(0x15f)]){for(const _0x2e5fdd of managedTargetSkillLinkPaths(_0x2cc253,_0xcfb6)){const _0x4c998c=runtimeSkillCodeFromLink(_0xcfb6,_0x2e5fdd);if(_0xc75592&&!_0xc75592[_0x260bd4(0x147)](_0x4c998c))continue;if(_0x5d5fb2[_0x260bd4(0x147)](_0x4c998c))continue;_0x2f383f[_0x260bd4(0x162)](removeManagedSkillLink(_0x2e5fdd,_0xcfb6,_0x4c998c));}}return _0x2f383f;}export function pruneStaleRuntimeSkillCache(_0xbd4f51,_0x35280a={}){const _0x4ecce2=a110_0x25f8f5,_0x14a944=new Set([..._0xbd4f51[_0x4ecce2(0x149)]][_0x4ecce2(0x15d)](_0x3ce3ba=>_0x3ce3ba[_0x4ecce2(0x148)]())[_0x4ecce2(0x181)](Boolean)),_0x27f3db=_0xbd4f51[_0x4ecce2(0x165)]?new Set([..._0xbd4f51[_0x4ecce2(0x165)]][_0x4ecce2(0x15d)](_0x3fa05d=>_0x3fa05d[_0x4ecce2(0x148)]())[_0x4ecce2(0x181)](Boolean)):undefined,_0x91c51a=_0xbd4f51[_0x4ecce2(0x17a)]??['personal',_0x4ecce2(0x176)],_0x4088e7=resolve(getRuntimeSkillCacheRoot(_0xbd4f51[_0x4ecce2(0x15e)],_0xbd4f51[_0x4ecce2(0x160)],_0x35280a),safePathSegment(_0xbd4f51[_0x4ecce2(0x167)],_0x4ecce2(0x167))),_0xfd1e02=[];for(const _0x1dff2f of _0x91c51a){const _0x750b5c=resolve(_0x4088e7,_0x1dff2f);if(!existsSync(_0x750b5c))continue;for(const _0x52e607 of readdirSync(_0x750b5c,{'withFileTypes':!![]})){if(!_0x52e607[_0x4ecce2(0x16c)]())continue;const _0x24da32=_0x52e607[_0x4ecce2(0x14c)];if(_0x27f3db&&!_0x27f3db[_0x4ecce2(0x147)](_0x24da32))continue;if(_0x14a944[_0x4ecce2(0x147)](_0x24da32))continue;const _0x110416=resolve(_0x750b5c,_0x24da32),_0x233430=readMetadataIfPresent(resolve(_0x110416,METADATA_FILE));if(_0x233430?.[_0x4ecce2(0x167)]!==_0xbd4f51['appCode']||_0x233430[_0x4ecce2(0x169)]!==_0x1dff2f||_0x233430[_0x4ecce2(0x17e)]!==_0x24da32){_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':_0x4ecce2(0x17b),'reason':_0x4ecce2(0x174)});continue;}if(isLinkedFromAnyRoot(_0x110416,_0xbd4f51[_0x4ecce2(0x145)]??[])){_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':'skipped','reason':_0x4ecce2(0x17d)});continue;}removeSync(_0x110416),_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':_0x4ecce2(0x183)});}}return _0xfd1e02;}export function linkGlobalRuntimeSkills(_0x3004fd,_0x1cca58={}){const _0x2e4238=a110_0x25f8f5,_0x500be2=resolveSkillSyncPaths(_0x1cca58),_0x17ee46=[];for(const _0x27b662 of _0x3004fd){if(_0x27b662[_0x2e4238(0x169)]!==_0x2e4238(0x16e))throw CliErrors[_0x2e4238(0x16f)](_0x2e4238(0x158)+_0x27b662[_0x2e4238(0x169)]);const _0x508120=requireSkillCode(_0x27b662[_0x2e4238(0x14b)]),_0x4c54c2=copyManagedSkillDirectory(_0x27b662['dir'],resolve(_0x500be2[_0x2e4238(0x146)],_0x508120));_0x17ee46[_0x2e4238(0x162)]({..._0x4c54c2,'contentHash':_0x27b662[_0x2e4238(0x155)]});}return _0x17ee46;}function ensureManagedSymlink(_0x1811cc,_0x1fb20f,_0x15aa40,_0x352070){const _0x163725=a110_0x25f8f5;mkdirSync(dirname(_0x1811cc),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1811cc)||isDanglingSymlink(_0x1811cc)){const _0x5a71dc=lstatSync(_0x1811cc);if(!_0x5a71dc['isSymbolicLink']())throw CliErrors[_0x163725(0x16f)](_0x163725(0x159)+_0x1811cc);const _0x46bab8=resolveSymlinkTarget(_0x1811cc);if(!isPathInside(realOrResolved(_0x46bab8),realOrResolved(_0x15aa40['managedRoot'])))throw CliErrors[_0x163725(0x16f)](_0x163725(0x16a)+_0x1811cc);if(realOrResolved(_0x46bab8)===realOrResolved(_0x1fb20f))return{'path':_0x1811cc,'target':_0x1fb20f,'action':_0x163725(0x171)};const _0x1cf819=readMetadataIfPresent(resolve(_0x46bab8,METADATA_FILE));if(_0x15aa40[_0x163725(0x169)]===_0x163725(0x151)&&(_0x1cf819?.[_0x163725(0x167)]!==_0x15aa40['appCode']||_0x1cf819['skillCode']!==_0x352070))throw CliErrors[_0x163725(0x16f)](_0x163725(0x166)+_0x1811cc);return unlinkSync(_0x1811cc),symlinkSync(_0x1fb20f,_0x1811cc,_0x163725(0x175)),{'path':_0x1811cc,'target':_0x1fb20f,'action':'updated'};}return symlinkSync(_0x1fb20f,_0x1811cc,_0x163725(0x175)),{'path':_0x1811cc,'target':_0x1fb20f,'action':_0x163725(0x170)};}function managedTargetSkillLinkPaths(_0x39166d,_0xd52d){const _0x132381=a110_0x25f8f5;if(!existsSync(_0x39166d))return[];const _0x3a1380=_0xd52d['appCode']+'--';return readdirSync(_0x39166d,{'withFileTypes':!![]})[_0x132381(0x181)](_0x321dc0=>_0xd52d[_0x132381(0x169)]===_0x132381(0x151)||_0x321dc0[_0x132381(0x14c)][_0x132381(0x15a)](_0x3a1380))[_0x132381(0x15d)](_0x2cfe14=>resolve(_0x39166d,_0x2cfe14['name']));}function removeManagedSkillLink(_0x4a8228,_0x10c11e,_0x1a405e){const _0x4d5fd7=a110_0x25f8f5,_0x2bb4f3=lstatIfPresent(_0x4a8228);if(!_0x2bb4f3?.[_0x4d5fd7(0x179)]())return{'path':_0x4a8228,'action':'skipped','reason':_0x4d5fd7(0x163)};const _0x1b4118=resolveSymlinkTarget(_0x4a8228);if(!isPathInside(realOrResolved(_0x1b4118),realOrResolved(_0x10c11e[_0x4d5fd7(0x14a)])))return{'path':_0x4a8228,'action':'skipped','reason':_0x4d5fd7(0x16d)};const _0x260af3=readMetadataIfPresent(resolve(_0x1b4118,METADATA_FILE));if(_0x10c11e[_0x4d5fd7(0x169)]===_0x4d5fd7(0x151)&&(_0x260af3?.['appCode']!==_0x10c11e[_0x4d5fd7(0x167)]||_0x260af3['skillCode']!==_0x1a405e))return{'path':_0x4a8228,'action':_0x4d5fd7(0x17b),'reason':_0x4d5fd7(0x174)};return unlinkSync(_0x4a8228),{'path':_0x4a8228,'action':_0x4d5fd7(0x183)};}function a110_0x5089(_0x39c620,_0x190933){_0x39c620=_0x39c620-0x145;const _0x54bae8=a110_0x54ba();let _0x508963=_0x54bae8[_0x39c620];return _0x508963;}function isLinkedFromAnyRoot(_0x311d64,_0x1cb995){const _0x465880=a110_0x25f8f5,_0x41e7a2=realOrResolved(_0x311d64);for(const _0x373363 of _0x1cb995){if(!existsSync(_0x373363))continue;for(const _0x5bb266 of readdirSync(_0x373363,{'withFileTypes':!![]})){if(!_0x5bb266[_0x465880(0x179)]())continue;const _0xa2468f=resolve(_0x373363,_0x5bb266[_0x465880(0x14c)]);if(realOrResolved(resolveSymlinkTarget(_0xa2468f))===_0x41e7a2)return!![];}}return![];}function runtimeSkillLinkName(_0x2d1dd0,_0x58992e){const _0x4db7fc=a110_0x25f8f5,_0x4045db=safePathSegment(_0x58992e,'skillCode');if(_0x2d1dd0[_0x4db7fc(0x169)]===_0x4db7fc(0x151)&&RESERVED_PROJECT_SKILL_CODES[_0x4db7fc(0x147)](_0x4045db))throw CliErrors['validation'](_0x4db7fc(0x14e)+_0x4045db);return _0x2d1dd0[_0x4db7fc(0x169)]==='project'?_0x4045db:_0x2d1dd0[_0x4db7fc(0x167)]+'--'+_0x4045db;}function runtimeSkillCodeFromLink(_0xb44c5b,_0x33c5e4){const _0x2c7a15=a110_0x25f8f5,_0x20c0c4=basename(_0x33c5e4);return _0xb44c5b[_0x2c7a15(0x169)]===_0x2c7a15(0x151)?_0x20c0c4:_0x20c0c4['slice']((_0xb44c5b[_0x2c7a15(0x167)]+'--')[_0x2c7a15(0x153)]);}export function copyManagedSkillDirectory(_0x188501,_0x1d56bd){const _0x153738=a110_0x25f8f5,_0x5a1efd=resolve(_0x1d56bd,METADATA_FILE),_0x7cfcbf=existsSync(_0x1d56bd);if(_0x7cfcbf){const _0x327e61=lstatSync(_0x1d56bd);if(_0x327e61[_0x153738(0x179)]())throw CliErrors[_0x153738(0x16f)](_0x153738(0x14d)+_0x1d56bd);if(!_0x327e61[_0x153738(0x16c)]())throw CliErrors[_0x153738(0x16f)](_0x153738(0x182)+_0x1d56bd);const _0x489412=readMetadataIfPresent(_0x5a1efd);if(_0x489412?.['scope']!==_0x153738(0x16e))throw CliErrors[_0x153738(0x16f)](_0x153738(0x17c)+_0x1d56bd);}ensureDirSync(dirname(_0x1d56bd));const _0x4f3427=_0x7cfcbf?readMetadataIfPresent(_0x5a1efd)?.[_0x153738(0x155)]:undefined,_0x12e166=readMetadataIfPresent(resolve(_0x188501,METADATA_FILE))?.[_0x153738(0x155)];return _0x7cfcbf&&removeSync(_0x1d56bd),copySkillDirectory(_0x188501,_0x1d56bd),{'path':_0x1d56bd,'target':_0x188501,'action':!_0x7cfcbf?_0x153738(0x170):_0x4f3427===_0x12e166?'unchanged':'updated'};}function copySkillDirectory(_0x381bfc,_0xee2b93){copySync(_0x381bfc,_0xee2b93,{'dereference':![],'overwrite':!![],'filter'(_0x5da4d1){const _0x3c3c45=a110_0x5089;if(lstatSync(_0x5da4d1)[_0x3c3c45(0x179)]())throw CliErrors[_0x3c3c45(0x16f)](_0x3c3c45(0x14f)+_0x5da4d1);return!![];}});}
1
+ const a110_0x1f2130=a110_0x9036;(function(_0x51c0cf,_0x1e48ad){const _0x623675=a110_0x9036,_0x3bf3a5=_0x51c0cf();while(!![]){try{const _0x1d2635=-parseInt(_0x623675(0x1b7))/0x1+parseInt(_0x623675(0x1a8))/0x2*(parseInt(_0x623675(0x1b1))/0x3)+-parseInt(_0x623675(0x1b6))/0x4*(parseInt(_0x623675(0x1dc))/0x5)+-parseInt(_0x623675(0x1c2))/0x6+-parseInt(_0x623675(0x1d5))/0x7*(parseInt(_0x623675(0x1ba))/0x8)+parseInt(_0x623675(0x1c6))/0x9*(-parseInt(_0x623675(0x1a5))/0xa)+parseInt(_0x623675(0x1c1))/0xb;if(_0x1d2635===_0x1e48ad)break;else _0x3bf3a5['push'](_0x3bf3a5['shift']());}catch(_0x453273){_0x3bf3a5['push'](_0x3bf3a5['shift']());}}}(a110_0xf9fa,0x81ed7));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a110_0x4e6c91 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a110_0x9036(_0x1939a4,_0x1ebfc4){_0x1939a4=_0x1939a4-0x1a4;const _0xf9faa8=a110_0xf9fa();let _0x90362f=_0xf9faa8[_0x1939a4];return _0x90362f;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a110_0x4e6c91,RESERVED_PROJECT_SKILL_CODES=new Set(['lovrabet',a110_0x1f2130(0x1a7),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x4c461c,_0x369298){const _0x176c01=a110_0x1f2130,_0x32ae85=new Map();for(const _0x526f24 of _0x4c461c){const _0x4f4e8a=_0x526f24['skill'][_0x176c01(0x1c5)];if(!_0x4f4e8a)continue;const _0x5d9447=_0x32ae85[_0x176c01(0x1a6)](_0x4f4e8a);(!_0x5d9447||_0x526f24[_0x176c01(0x1d7)]===_0x176c01(0x1a9))&&_0x32ae85['set'](_0x4f4e8a,_0x526f24);}const _0x18acf5=[];for(const _0x4175d7 of _0x32ae85[_0x176c01(0x1a4)]()){const _0x298105=requireSkillCode(_0x4175d7['skill']),_0x4fe5b2=readMetadataIfPresent(_0x4175d7[_0x176c01(0x1b3)]);if(_0x4fe5b2?.[_0x176c01(0x1c8)]!==_0x369298[_0x176c01(0x1c8)]||_0x4fe5b2[_0x176c01(0x1c5)]!==_0x298105)throw CliErrors[_0x176c01(0x1aa)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x369298[_0x176c01(0x1c8)]+':\x20'+_0x4175d7[_0x176c01(0x1b3)]);const _0x4bef61=runtimeSkillLinkName(_0x369298,_0x298105);for(const _0x41cbda of _0x369298[_0x176c01(0x1bc)]){_0x18acf5[_0x176c01(0x1ac)](ensureManagedSymlink(resolve(_0x41cbda,_0x4bef61),_0x4175d7[_0x176c01(0x1b0)],_0x369298,_0x298105));}}return _0x18acf5;}function a110_0xf9fa(){const _0x29ab18=['32837431LTfAyr','1612818oMeDWk','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','company','skillCode','9CVtyAL','name','appCode','filter','protectedLinkRoots','managedRoot','removed','contentHash','slice','map','unchanged','project','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','startsWith','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','729253DwGPtw','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','scope','isSymbolicLink','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','metadata-mismatch','created','495ybkskn','activeSkillCodes','external-symlink','values','9662330XkUEYT','get','runtime-observe','2FJFGcN','personal','validation','agentsSkillsDir','push','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','trim','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','dir','361359pUqbym','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','metadataPath','skipped','updated','13488RBFEUC','796269rtSsOP','length','not-managed-symlink','16wvcaNP','has','skillRoots','isDirectory','pruneSkillCodes','linked-from-protected-root','builtin'];a110_0xf9fa=function(){return _0x29ab18;};return a110_0xf9fa();}export function pruneStaleRuntimeSkillLinks(_0x11f6ef,_0x1f2156,_0x2c08db){const _0x2b0bd8=a110_0x1f2130,_0x4b8c6d=new Set([..._0x1f2156][_0x2b0bd8(0x1cf)](_0x1af763=>_0x1af763[_0x2b0bd8(0x1ae)]())[_0x2b0bd8(0x1c9)](Boolean)),_0x50e77f=_0x2c08db?new Set([..._0x2c08db][_0x2b0bd8(0x1cf)](_0x51fdd8=>_0x51fdd8[_0x2b0bd8(0x1ae)]())[_0x2b0bd8(0x1c9)](Boolean)):undefined,_0x44e11c=[];for(const _0x93b4d4 of _0x11f6ef[_0x2b0bd8(0x1bc)]){for(const _0x5855dc of managedTargetSkillLinkPaths(_0x93b4d4,_0x11f6ef)){const _0x10e7ba=runtimeSkillCodeFromLink(_0x11f6ef,_0x5855dc);if(_0x50e77f&&!_0x50e77f[_0x2b0bd8(0x1bb)](_0x10e7ba))continue;if(_0x4b8c6d[_0x2b0bd8(0x1bb)](_0x10e7ba))continue;_0x44e11c['push'](removeManagedSkillLink(_0x5855dc,_0x11f6ef,_0x10e7ba));}}return _0x44e11c;}export function pruneStaleRuntimeSkillCache(_0x17b3bd,_0x24921e={}){const _0x44f54c=a110_0x1f2130,_0x4940fa=new Set([..._0x17b3bd[_0x44f54c(0x1dd)]][_0x44f54c(0x1cf)](_0x118a34=>_0x118a34[_0x44f54c(0x1ae)]())['filter'](Boolean)),_0x33b375=_0x17b3bd[_0x44f54c(0x1be)]?new Set([..._0x17b3bd['pruneSkillCodes']][_0x44f54c(0x1cf)](_0x5bd8c2=>_0x5bd8c2['trim']())[_0x44f54c(0x1c9)](Boolean)):undefined,_0x5ad8d2=_0x17b3bd['scopes']??[_0x44f54c(0x1a9),_0x44f54c(0x1c4)],_0x125ae3=resolve(getRuntimeSkillCacheRoot(_0x17b3bd['env'],_0x17b3bd['accessKey'],_0x24921e),safePathSegment(_0x17b3bd[_0x44f54c(0x1c8)],_0x44f54c(0x1c8))),_0x28b680=[];for(const _0x2296c1 of _0x5ad8d2){const _0x129a74=resolve(_0x125ae3,_0x2296c1);if(!existsSync(_0x129a74))continue;for(const _0x50b394 of readdirSync(_0x129a74,{'withFileTypes':!![]})){if(!_0x50b394[_0x44f54c(0x1bd)]())continue;const _0x3bbee4=_0x50b394[_0x44f54c(0x1c7)];if(_0x33b375&&!_0x33b375[_0x44f54c(0x1bb)](_0x3bbee4))continue;if(_0x4940fa[_0x44f54c(0x1bb)](_0x3bbee4))continue;const _0x436d27=resolve(_0x129a74,_0x3bbee4),_0xac3532=readMetadataIfPresent(resolve(_0x436d27,METADATA_FILE));if(_0xac3532?.[_0x44f54c(0x1c8)]!==_0x17b3bd[_0x44f54c(0x1c8)]||_0xac3532[_0x44f54c(0x1d7)]!==_0x2296c1||_0xac3532[_0x44f54c(0x1c5)]!==_0x3bbee4){_0x28b680[_0x44f54c(0x1ac)]({'path':_0x436d27,'action':_0x44f54c(0x1b4),'reason':_0x44f54c(0x1da)});continue;}if(isLinkedFromAnyRoot(_0x436d27,_0x17b3bd[_0x44f54c(0x1ca)]??[])){_0x28b680[_0x44f54c(0x1ac)]({'path':_0x436d27,'action':'skipped','reason':_0x44f54c(0x1bf)});continue;}removeSync(_0x436d27),_0x28b680[_0x44f54c(0x1ac)]({'path':_0x436d27,'action':'removed'});}}return _0x28b680;}export function linkGlobalRuntimeSkills(_0x431ce4,_0x3f2c58={}){const _0x1d44ae=a110_0x1f2130,_0x3273ce=resolveSkillSyncPaths(_0x3f2c58),_0x1b1fec=[];for(const _0x30c986 of _0x431ce4){if(_0x30c986[_0x1d44ae(0x1d7)]!==_0x1d44ae(0x1c0))throw CliErrors[_0x1d44ae(0x1aa)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x30c986['scope']);const _0x435604=requireSkillCode(_0x30c986['skill']),_0x65a058=copyManagedSkillDirectory(_0x30c986[_0x1d44ae(0x1b0)],resolve(_0x3273ce[_0x1d44ae(0x1ab)],_0x435604));_0x1b1fec[_0x1d44ae(0x1ac)]({..._0x65a058,'contentHash':_0x30c986[_0x1d44ae(0x1cd)]});}return _0x1b1fec;}function ensureManagedSymlink(_0x365933,_0x3df7fa,_0x4c30af,_0x57b3ec){const _0x5774be=a110_0x1f2130;mkdirSync(dirname(_0x365933),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x365933)||isDanglingSymlink(_0x365933)){const _0x32518d=lstatSync(_0x365933);if(!_0x32518d[_0x5774be(0x1d8)]())throw CliErrors[_0x5774be(0x1aa)](_0x5774be(0x1d9)+_0x365933);const _0x3d5616=resolveSymlinkTarget(_0x365933);if(!isPathInside(realOrResolved(_0x3d5616),realOrResolved(_0x4c30af[_0x5774be(0x1cb)])))throw CliErrors['validation'](_0x5774be(0x1ad)+_0x365933);if(realOrResolved(_0x3d5616)===realOrResolved(_0x3df7fa))return{'path':_0x365933,'target':_0x3df7fa,'action':_0x5774be(0x1d0)};const _0x53b153=readMetadataIfPresent(resolve(_0x3d5616,METADATA_FILE));if(_0x4c30af['scope']===_0x5774be(0x1d1)&&(_0x53b153?.['appCode']!==_0x4c30af[_0x5774be(0x1c8)]||_0x53b153[_0x5774be(0x1c5)]!==_0x57b3ec))throw CliErrors[_0x5774be(0x1aa)](_0x5774be(0x1d4)+_0x365933);return unlinkSync(_0x365933),symlinkSync(_0x3df7fa,_0x365933,'dir'),{'path':_0x365933,'target':_0x3df7fa,'action':_0x5774be(0x1b5)};}return symlinkSync(_0x3df7fa,_0x365933,'dir'),{'path':_0x365933,'target':_0x3df7fa,'action':_0x5774be(0x1db)};}function managedTargetSkillLinkPaths(_0x6d9fa7,_0x392e11){const _0x12c4cf=a110_0x1f2130;if(!existsSync(_0x6d9fa7))return[];const _0x3d6323=_0x392e11['appCode']+'--';return readdirSync(_0x6d9fa7,{'withFileTypes':!![]})['filter'](_0x5159be=>_0x392e11[_0x12c4cf(0x1d7)]===_0x12c4cf(0x1d1)||_0x5159be[_0x12c4cf(0x1c7)][_0x12c4cf(0x1d3)](_0x3d6323))['map'](_0x1724af=>resolve(_0x6d9fa7,_0x1724af[_0x12c4cf(0x1c7)]));}function removeManagedSkillLink(_0x453593,_0x5536fc,_0x460e0b){const _0x5862ee=a110_0x1f2130,_0xcf75e4=lstatIfPresent(_0x453593);if(!_0xcf75e4?.['isSymbolicLink']())return{'path':_0x453593,'action':_0x5862ee(0x1b4),'reason':_0x5862ee(0x1b9)};const _0x510a89=resolveSymlinkTarget(_0x453593);if(!isPathInside(realOrResolved(_0x510a89),realOrResolved(_0x5536fc['managedRoot'])))return{'path':_0x453593,'action':'skipped','reason':_0x5862ee(0x1de)};const _0xce2d48=readMetadataIfPresent(resolve(_0x510a89,METADATA_FILE));if(_0x5536fc['scope']===_0x5862ee(0x1d1)&&(_0xce2d48?.['appCode']!==_0x5536fc[_0x5862ee(0x1c8)]||_0xce2d48[_0x5862ee(0x1c5)]!==_0x460e0b))return{'path':_0x453593,'action':_0x5862ee(0x1b4),'reason':_0x5862ee(0x1da)};return unlinkSync(_0x453593),{'path':_0x453593,'action':_0x5862ee(0x1cc)};}function isLinkedFromAnyRoot(_0x15426d,_0x5744e0){const _0x413a0c=realOrResolved(_0x15426d);for(const _0x21b460 of _0x5744e0){if(!existsSync(_0x21b460))continue;for(const _0x47f226 of readdirSync(_0x21b460,{'withFileTypes':!![]})){if(!_0x47f226['isSymbolicLink']())continue;const _0x339eec=resolve(_0x21b460,_0x47f226['name']);if(realOrResolved(resolveSymlinkTarget(_0x339eec))===_0x413a0c)return!![];}}return![];}function runtimeSkillLinkName(_0x20bfe4,_0x23a2da){const _0x4c7842=a110_0x1f2130,_0x577dfb=safePathSegment(_0x23a2da,_0x4c7842(0x1c5));if(_0x20bfe4[_0x4c7842(0x1d7)]===_0x4c7842(0x1d1)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x577dfb))throw CliErrors[_0x4c7842(0x1aa)](_0x4c7842(0x1d6)+_0x577dfb);return _0x20bfe4[_0x4c7842(0x1d7)]===_0x4c7842(0x1d1)?_0x577dfb:_0x20bfe4[_0x4c7842(0x1c8)]+'--'+_0x577dfb;}function runtimeSkillCodeFromLink(_0x5358c5,_0x222470){const _0x5202ec=a110_0x1f2130,_0x42e2cb=basename(_0x222470);return _0x5358c5['scope']===_0x5202ec(0x1d1)?_0x42e2cb:_0x42e2cb[_0x5202ec(0x1ce)]((_0x5358c5[_0x5202ec(0x1c8)]+'--')[_0x5202ec(0x1b8)]);}export function copyManagedSkillDirectory(_0x201dac,_0x1c1428){const _0x220a72=a110_0x1f2130,_0x6c0462=resolve(_0x1c1428,METADATA_FILE),_0x16947c=existsSync(_0x1c1428);if(_0x16947c){const _0x5bf6dc=lstatSync(_0x1c1428);if(_0x5bf6dc['isSymbolicLink']())throw CliErrors[_0x220a72(0x1aa)](_0x220a72(0x1b2)+_0x1c1428);if(!_0x5bf6dc[_0x220a72(0x1bd)]())throw CliErrors[_0x220a72(0x1aa)](_0x220a72(0x1af)+_0x1c1428);const _0x49074a=readMetadataIfPresent(_0x6c0462);if(_0x49074a?.['scope']!=='builtin')throw CliErrors[_0x220a72(0x1aa)](_0x220a72(0x1d2)+_0x1c1428);}ensureDirSync(dirname(_0x1c1428));const _0x107bd8=_0x16947c?readMetadataIfPresent(_0x6c0462)?.[_0x220a72(0x1cd)]:undefined,_0x304b08=readMetadataIfPresent(resolve(_0x201dac,METADATA_FILE))?.[_0x220a72(0x1cd)];return _0x16947c&&removeSync(_0x1c1428),copySkillDirectory(_0x201dac,_0x1c1428),{'path':_0x1c1428,'target':_0x201dac,'action':!_0x16947c?_0x220a72(0x1db):_0x107bd8===_0x304b08?_0x220a72(0x1d0):_0x220a72(0x1b5)};}function copySkillDirectory(_0x12b3bc,_0x7a7e33){copySync(_0x12b3bc,_0x7a7e33,{'dereference':![],'overwrite':!![],'filter'(_0x34f44b){const _0x111b3f=a110_0x9036;if(lstatSync(_0x34f44b)[_0x111b3f(0x1d8)]())throw CliErrors['validation'](_0x111b3f(0x1c3)+_0x34f44b);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x6dda9a,_0x55be22){const _0x21c441=a111_0xb8f7,_0x34ac88=_0x6dda9a();while(!![]){try{const _0x3cad29=-parseInt(_0x21c441(0x155))/0x1*(parseInt(_0x21c441(0x15f))/0x2)+parseInt(_0x21c441(0x14c))/0x3*(-parseInt(_0x21c441(0x14d))/0x4)+parseInt(_0x21c441(0x135))/0x5*(-parseInt(_0x21c441(0x147))/0x6)+parseInt(_0x21c441(0x13b))/0x7*(-parseInt(_0x21c441(0x141))/0x8)+-parseInt(_0x21c441(0x158))/0x9*(parseInt(_0x21c441(0x13d))/0xa)+-parseInt(_0x21c441(0x14b))/0xb*(-parseInt(_0x21c441(0x152))/0xc)+parseInt(_0x21c441(0x140))/0xd;if(_0x3cad29===_0x55be22)break;else _0x34ac88['push'](_0x34ac88['shift']());}catch(_0x4e560f){_0x34ac88['push'](_0x34ac88['shift']());}}}(a111_0xe4d3,0xe227b));function a111_0xe4d3(){const _0x5d4f41=['4488ShAhHM','startsWith','name','cacheDir','scope','\x20!=\x20','2586pcwuwF','from','has','trim','11ylFUcN','107886YEKhmo','204xAuPsb','source','isSymbolicLink','scopes','linkedPaths','11643612DFGBbs','set','skillCode','2sKNNHA','skillRoots','filter','333rioEpY','cache','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','includes','map','linkedPath','localeCompare','1405158oPmOYw','metadataPath','env','appCode','10950MDAJtz','sort','push','accessKey','isDirectory','get','18949xoSRwu','dir','454340fGnast','tags','isArray','95404725pKyACX'];a111_0xe4d3=function(){return _0x5d4f41;};return a111_0xe4d3();}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a111_0xb8f7(_0x4940e5,_0x7a2530){_0x4940e5=_0x4940e5-0x135;const _0xe4d3ab=a111_0xe4d3();let _0xb8f73a=_0xe4d3ab[_0x4940e5];return _0xb8f73a;}export function listLocalRuntimeSkills(_0x488a2b,_0x21d893,_0x492cde={}){const _0x18c37b=a111_0xb8f7,_0x2c9a83=safePathSegment(_0x488a2b[_0x18c37b(0x162)],_0x18c37b(0x162));if(_0x21d893['appCode']!==_0x2c9a83)throw CliErrors['validation'](_0x18c37b(0x15a)+_0x21d893[_0x18c37b(0x162)]+_0x18c37b(0x146)+_0x2c9a83);const _0x57585a=normalizeRuntimeSkillScopes(_0x488a2b[_0x18c37b(0x150)]),_0x448840=new Set(_0x57585a),_0x30fe77=_0x488a2b['code']?.[_0x18c37b(0x14a)](),_0x44e86c=new Map(),_0x27d546=resolve(getRuntimeSkillCacheRoot(_0x488a2b[_0x18c37b(0x161)],_0x488a2b[_0x18c37b(0x138)],_0x492cde),_0x2c9a83);for(const _0x576c05 of _0x57585a){for(const _0x183eae of localSkillEntryDirs(resolve(_0x27d546,_0x576c05))){collectLocalRuntimeSkill(_0x44e86c,_0x183eae,{'appCode':_0x2c9a83,'scopes':_0x448840,'code':_0x30fe77,'source':_0x18c37b(0x159)});}}for(const _0x4f5c73 of _0x21d893[_0x18c37b(0x156)]){for(const _0x2d9a6c of localSkillLinkCandidates(_0x4f5c73,_0x21d893,_0x448840)){collectLocalRuntimeSkill(_0x44e86c,_0x2d9a6c,{'appCode':_0x2c9a83,'scopes':_0x448840,'code':_0x30fe77,'source':'link','linkedPath':_0x2d9a6c});}}return Array[_0x18c37b(0x148)](_0x44e86c['values']())[_0x18c37b(0x136)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xcb19c3){const _0x451457=a111_0xb8f7;if(!existsSync(_0xcb19c3))return[];return readdirSync(_0xcb19c3,{'withFileTypes':!![]})['filter'](_0x505a1c=>_0x505a1c[_0x451457(0x139)]()||_0x505a1c[_0x451457(0x14f)]())[_0x451457(0x15c)](_0x41a7bd=>resolve(_0xcb19c3,_0x41a7bd['name']));}function localSkillLinkCandidates(_0x1a54e2,_0x2a0732,_0x42faa5){const _0x193812=a111_0xb8f7;if(!existsSync(_0x1a54e2))return[];const _0x31e8af=_0x2a0732[_0x193812(0x162)]+'--';return readdirSync(_0x1a54e2,{'withFileTypes':!![]})[_0x193812(0x157)](_0xaf9866=>_0xaf9866[_0x193812(0x139)]()||_0xaf9866[_0x193812(0x14f)]())[_0x193812(0x157)](_0x15964f=>_0x2a0732['scope']==='project'||_0x15964f[_0x193812(0x143)][_0x193812(0x142)](_0x31e8af)||_0x42faa5[_0x193812(0x149)]('builtin'))[_0x193812(0x15c)](_0x2e5d28=>resolve(_0x1a54e2,_0x2e5d28[_0x193812(0x143)]));}function collectLocalRuntimeSkill(_0x5ecf59,_0x5f04fe,_0x6c24a2){const _0x18af25=a111_0xb8f7,_0x438ddf=resolve(_0x5f04fe,METADATA_FILE),_0x52a190=readMetadataIfPresent(_0x438ddf);if(!_0x52a190)return;if(_0x52a190[_0x18af25(0x162)]!==_0x6c24a2[_0x18af25(0x162)])return;if(!isRuntimeSkillScope(_0x52a190[_0x18af25(0x145)])||!_0x6c24a2['scopes']['has'](_0x52a190[_0x18af25(0x145)]))return;const _0x564292=_0x52a190['skillCode']?.[_0x18af25(0x14a)]();if(!_0x564292)return;if(_0x6c24a2['code']&&_0x564292!==_0x6c24a2['code'])return;const _0x1b8876=_0x52a190[_0x18af25(0x145)]+':'+_0x564292,_0x3aef49=_0x6c24a2['linkedPath']?[_0x6c24a2[_0x18af25(0x15d)]]:[],_0xfae0f7=_0x5ecf59[_0x18af25(0x13a)](_0x1b8876);if(_0xfae0f7){_0x6c24a2[_0x18af25(0x14e)]===_0x18af25(0x159)&&(_0xfae0f7[_0x18af25(0x13c)]=_0x5f04fe,_0xfae0f7[_0x18af25(0x144)]=_0x5f04fe,_0xfae0f7['skillMdPath']=resolve(_0x5f04fe,SKILL_FILE),_0xfae0f7[_0x18af25(0x160)]=_0x438ddf);for(const _0x4f2584 of _0x3aef49){!_0xfae0f7[_0x18af25(0x151)][_0x18af25(0x15b)](_0x4f2584)&&_0xfae0f7['linkedPaths'][_0x18af25(0x137)](_0x4f2584);}_0xfae0f7[_0x18af25(0x151)]['sort']();return;}_0x5ecf59[_0x18af25(0x153)](_0x1b8876,{..._0x52a190,'tags':Array[_0x18af25(0x13f)](_0x52a190[_0x18af25(0x13e)])?_0x52a190['tags']:[],'scope':_0x52a190[_0x18af25(0x145)],'source':'local','dir':_0x5f04fe,'cacheDir':_0x6c24a2[_0x18af25(0x14e)]===_0x18af25(0x159)?_0x5f04fe:undefined,'skillMdPath':resolve(_0x5f04fe,SKILL_FILE),'metadataPath':_0x438ddf,'linkedPaths':_0x3aef49});}function compareLocalRuntimeSkills(_0x5109bb,_0x38e9d7){const _0x324e18=a111_0xb8f7,_0x520138={'personal':0x0,'company':0x1,'builtin':0x2};return _0x520138[_0x5109bb[_0x324e18(0x145)]]-_0x520138[_0x38e9d7['scope']]||_0x5109bb['skillCode'][_0x324e18(0x15e)](_0x38e9d7[_0x324e18(0x154)])||_0x5109bb[_0x324e18(0x13c)][_0x324e18(0x15e)](_0x38e9d7['dir']);}
1
+ (function(_0x1727e8,_0x1f07bd){const _0x473111=a111_0x5b95,_0x53119c=_0x1727e8();while(!![]){try{const _0x4e3638=parseInt(_0x473111(0xf8))/0x1*(parseInt(_0x473111(0xe2))/0x2)+-parseInt(_0x473111(0x107))/0x3*(-parseInt(_0x473111(0xf3))/0x4)+-parseInt(_0x473111(0xf6))/0x5*(-parseInt(_0x473111(0xf1))/0x6)+parseInt(_0x473111(0x100))/0x7+parseInt(_0x473111(0xfe))/0x8+-parseInt(_0x473111(0x109))/0x9*(parseInt(_0x473111(0xec))/0xa)+-parseInt(_0x473111(0xf0))/0xb*(parseInt(_0x473111(0xea))/0xc);if(_0x4e3638===_0x1f07bd)break;else _0x53119c['push'](_0x53119c['shift']());}catch(_0x564268){_0x53119c['push'](_0x53119c['shift']());}}}(a111_0x183c,0xda647));function a111_0x183c(){const _0x21be91=['linkedPaths','3395436OoMfOo','appCode','11512840sPMaen','trim','\x20!=\x20','map','165sMGYmr','6kXGlPi','scopes','688YckbAm','code','skillMdPath','8471620xdJPAw','includes','7022CByiHm','filter','local','accessKey','name','dir','4577000UOqnSe','validation','11870705huHZaQ','tags','scope','has','startsWith','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','set','11820crZFVD','metadataPath','9bFarmv','builtin','linkedPath','isDirectory','isSymbolicLink','cacheDir','project','470RWzrcC','sort','source','link','skillCode','cache','values'];a111_0x183c=function(){return _0x21be91;};return a111_0x183c();}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0xb06614,_0x3a4814,_0x1c07a8={}){const _0x856959=a111_0x5b95,_0x100756=safePathSegment(_0xb06614[_0x856959(0xeb)],_0x856959(0xeb));if(_0x3a4814[_0x856959(0xeb)]!==_0x100756)throw CliErrors[_0x856959(0xff)](_0x856959(0x105)+_0x3a4814[_0x856959(0xeb)]+_0x856959(0xee)+_0x100756);const _0x380e07=normalizeRuntimeSkillScopes(_0xb06614['scopes']),_0x278b3f=new Set(_0x380e07),_0x1f47bd=_0xb06614[_0x856959(0xf4)]?.[_0x856959(0xed)](),_0x170b99=new Map(),_0xd68350=resolve(getRuntimeSkillCacheRoot(_0xb06614['env'],_0xb06614[_0x856959(0xfb)],_0x1c07a8),_0x100756);for(const _0x39b99e of _0x380e07){for(const _0x153980 of localSkillEntryDirs(resolve(_0xd68350,_0x39b99e))){collectLocalRuntimeSkill(_0x170b99,_0x153980,{'appCode':_0x100756,'scopes':_0x278b3f,'code':_0x1f47bd,'source':_0x856959(0xe7)});}}for(const _0x4a0bc2 of _0x3a4814['skillRoots']){for(const _0x137cee of localSkillLinkCandidates(_0x4a0bc2,_0x3a4814,_0x278b3f)){collectLocalRuntimeSkill(_0x170b99,_0x137cee,{'appCode':_0x100756,'scopes':_0x278b3f,'code':_0x1f47bd,'source':_0x856959(0xe5),'linkedPath':_0x137cee});}}return Array['from'](_0x170b99[_0x856959(0xe8)]())[_0x856959(0xe3)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x33f96c){const _0x2360ed=a111_0x5b95;if(!existsSync(_0x33f96c))return[];return readdirSync(_0x33f96c,{'withFileTypes':!![]})[_0x2360ed(0xf9)](_0x2aebe9=>_0x2aebe9[_0x2360ed(0xde)]()||_0x2aebe9[_0x2360ed(0xdf)]())[_0x2360ed(0xef)](_0x3d7a0b=>resolve(_0x33f96c,_0x3d7a0b['name']));}function localSkillLinkCandidates(_0x2b277e,_0x513446,_0x5518dc){const _0x40bb46=a111_0x5b95;if(!existsSync(_0x2b277e))return[];const _0x4fd76e=_0x513446[_0x40bb46(0xeb)]+'--';return readdirSync(_0x2b277e,{'withFileTypes':!![]})['filter'](_0x52498b=>_0x52498b['isDirectory']()||_0x52498b[_0x40bb46(0xdf)]())[_0x40bb46(0xf9)](_0x42aa4b=>_0x513446[_0x40bb46(0x102)]===_0x40bb46(0xe1)||_0x42aa4b[_0x40bb46(0xfc)][_0x40bb46(0x104)](_0x4fd76e)||_0x5518dc[_0x40bb46(0x103)](_0x40bb46(0xdc)))[_0x40bb46(0xef)](_0x57b8e1=>resolve(_0x2b277e,_0x57b8e1['name']));}function a111_0x5b95(_0x40e3e5,_0x31497a){_0x40e3e5=_0x40e3e5-0xdc;const _0x183c9d=a111_0x183c();let _0x5b9580=_0x183c9d[_0x40e3e5];return _0x5b9580;}function collectLocalRuntimeSkill(_0x2b7b2d,_0x17cb64,_0x3abf5c){const _0x9d31f0=a111_0x5b95,_0x4a47df=resolve(_0x17cb64,METADATA_FILE),_0x2d43e7=readMetadataIfPresent(_0x4a47df);if(!_0x2d43e7)return;if(_0x2d43e7['appCode']!==_0x3abf5c['appCode'])return;if(!isRuntimeSkillScope(_0x2d43e7[_0x9d31f0(0x102)])||!_0x3abf5c[_0x9d31f0(0xf2)][_0x9d31f0(0x103)](_0x2d43e7[_0x9d31f0(0x102)]))return;const _0x45825e=_0x2d43e7[_0x9d31f0(0xe6)]?.[_0x9d31f0(0xed)]();if(!_0x45825e)return;if(_0x3abf5c['code']&&_0x45825e!==_0x3abf5c['code'])return;const _0x1c51f4=_0x2d43e7[_0x9d31f0(0x102)]+':'+_0x45825e,_0x5d7ef7=_0x3abf5c['linkedPath']?[_0x3abf5c[_0x9d31f0(0xdd)]]:[],_0x4293f8=_0x2b7b2d['get'](_0x1c51f4);if(_0x4293f8){_0x3abf5c[_0x9d31f0(0xe4)]===_0x9d31f0(0xe7)&&(_0x4293f8['dir']=_0x17cb64,_0x4293f8[_0x9d31f0(0xe0)]=_0x17cb64,_0x4293f8[_0x9d31f0(0xf5)]=resolve(_0x17cb64,SKILL_FILE),_0x4293f8[_0x9d31f0(0x108)]=_0x4a47df);for(const _0x583a08 of _0x5d7ef7){!_0x4293f8[_0x9d31f0(0xe9)][_0x9d31f0(0xf7)](_0x583a08)&&_0x4293f8['linkedPaths']['push'](_0x583a08);}_0x4293f8['linkedPaths'][_0x9d31f0(0xe3)]();return;}_0x2b7b2d[_0x9d31f0(0x106)](_0x1c51f4,{..._0x2d43e7,'tags':Array['isArray'](_0x2d43e7[_0x9d31f0(0x101)])?_0x2d43e7[_0x9d31f0(0x101)]:[],'scope':_0x2d43e7[_0x9d31f0(0x102)],'source':_0x9d31f0(0xfa),'dir':_0x17cb64,'cacheDir':_0x3abf5c[_0x9d31f0(0xe4)]==='cache'?_0x17cb64:undefined,'skillMdPath':resolve(_0x17cb64,SKILL_FILE),'metadataPath':_0x4a47df,'linkedPaths':_0x5d7ef7});}function compareLocalRuntimeSkills(_0x1b2898,_0x36fa9f){const _0x49e4b7=a111_0x5b95,_0x19dad0={'personal':0x0,'company':0x1,'builtin':0x2};return _0x19dad0[_0x1b2898[_0x49e4b7(0x102)]]-_0x19dad0[_0x36fa9f['scope']]||_0x1b2898[_0x49e4b7(0xe6)]['localeCompare'](_0x36fa9f[_0x49e4b7(0xe6)])||_0x1b2898[_0x49e4b7(0xfd)]['localeCompare'](_0x36fa9f[_0x49e4b7(0xfd)]);}
@@ -1 +1 @@
1
- (function(_0x14d53a,_0x11ac20){const _0x298bcb=a112_0x123c,_0xf5cd83=_0x14d53a();while(!![]){try{const _0x52437b=-parseInt(_0x298bcb(0x1e7))/0x1*(parseInt(_0x298bcb(0x208))/0x2)+parseInt(_0x298bcb(0x20c))/0x3+-parseInt(_0x298bcb(0x1fd))/0x4*(parseInt(_0x298bcb(0x206))/0x5)+-parseInt(_0x298bcb(0x1fb))/0x6+-parseInt(_0x298bcb(0x202))/0x7+-parseInt(_0x298bcb(0x1e4))/0x8+parseInt(_0x298bcb(0x1fc))/0x9;if(_0x52437b===_0x11ac20)break;else _0xf5cd83['push'](_0xf5cd83['shift']());}catch(_0xf94074){_0xf5cd83['push'](_0xf5cd83['shift']());}}}(a112_0x9c33,0xbf8a6));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(_0x5ba42b){const _0x83fdd=a112_0x123c;return _0x5ba42b['bytes']??Buffer['from'](_0x5ba42b[_0x83fdd(0x1ed)]??'',_0x83fdd(0x1f5));}export function fileText(_0x33fdd1){const _0x311d3c=a112_0x123c;return fileContent(_0x33fdd1)['toString'](_0x311d3c(0x1f5));}function a112_0x123c(_0x391343,_0x1a0349){_0x391343=_0x391343-0x1df;const _0x9c33aa=a112_0x9c33();let _0x123c8b=_0x9c33aa[_0x391343];return _0x123c8b;}export function normalizeLocalFiles(_0x4316d7){const _0x3fe388=a112_0x123c;if(!Array[_0x3fe388(0x209)](_0x4316d7)||_0x4316d7[_0x3fe388(0x205)]===0x0)return[];const _0x2813c1=new Map();for(const _0x4dfad5 of _0x4316d7){if(!_0x4dfad5||typeof _0x4dfad5!=='object'||typeof _0x4dfad5[_0x3fe388(0x1f0)]!==_0x3fe388(0x1ec))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1f2));const _0x3a3367=normalizeSkillRelativePath(_0x4dfad5[_0x3fe388(0x1f0)]);if(_0x2813c1[_0x3fe388(0x1e1)](_0x3a3367))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1ff)+_0x3a3367);if(_0x4dfad5[_0x3fe388(0x1e0)]!==undefined&&!Buffer['isBuffer'](_0x4dfad5[_0x3fe388(0x1e0)]))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1e3)+_0x3a3367);if(_0x4dfad5[_0x3fe388(0x1e0)]===undefined&&typeof _0x4dfad5[_0x3fe388(0x1ed)]!==_0x3fe388(0x1ec))throw CliErrors['validation'](_0x3fe388(0x204)+_0x3a3367);const _0xb5d699=fileContent(_0x4dfad5);_0x2813c1['set'](_0x3a3367,{'path':_0x3a3367,'bytes':_0xb5d699});}return Array['from'](_0x2813c1['values']())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x755bc8){const _0x4820d7=a112_0x123c;if(!Array[_0x4820d7(0x209)](_0x755bc8)||_0x755bc8['length']===0x0)return[];const _0x233eab=new Map();for(const _0x2240dd of _0x755bc8){if(!_0x2240dd||typeof _0x2240dd!==_0x4820d7(0x207)||typeof _0x2240dd['path']!==_0x4820d7(0x1ec))throw CliErrors[_0x4820d7(0x1f1)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x467cd2=normalizeSkillRelativePath(_0x2240dd[_0x4820d7(0x1f0)]);if(_0x233eab[_0x4820d7(0x1e1)](_0x467cd2))throw CliErrors['validation'](_0x4820d7(0x1ff)+_0x467cd2);if(!isSha256Hex(_0x2240dd[_0x4820d7(0x1f7)]))throw CliErrors[_0x4820d7(0x1f1)](_0x4820d7(0x1e9)+_0x467cd2);if(!Number[_0x4820d7(0x1fe)](_0x2240dd['size'])||_0x2240dd[_0x4820d7(0x1f4)]<0x0)throw CliErrors[_0x4820d7(0x1f1)](_0x4820d7(0x1ef)+_0x467cd2);_0x233eab[_0x4820d7(0x1ee)](_0x467cd2,{'path':_0x467cd2,'sha256':_0x2240dd[_0x4820d7(0x1f7)][_0x4820d7(0x1f8)](),'size':_0x2240dd[_0x4820d7(0x1f4)]});}return Array[_0x4820d7(0x1f6)](_0x233eab[_0x4820d7(0x201)]())[_0x4820d7(0x1fa)](compareSkillFiles);}export function scanSkillDirectory(_0x15874d){const _0x2d3512=realpathSync(_0x15874d),_0x5cff50=[];function _0x54d7cd(_0x15cc84){const _0x4072ff=a112_0x123c,_0x3a518c=readdirSync(_0x15cc84,{'withFileTypes':!![]})['sort']((_0x121a33,_0x167b19)=>_0x121a33[_0x4072ff(0x20b)][_0x4072ff(0x1e5)](_0x167b19[_0x4072ff(0x20b)]));for(const _0xc55731 of _0x3a518c){if(_0xc55731[_0x4072ff(0x1f9)]()&&IGNORED_DIR_NAMES['has'](_0xc55731[_0x4072ff(0x20b)]))continue;if(IGNORED_FILE_NAMES[_0x4072ff(0x1e1)](_0xc55731[_0x4072ff(0x20b)]))continue;const _0x2abf58=resolve(_0x15cc84,_0xc55731[_0x4072ff(0x20b)]);if(_0xc55731[_0x4072ff(0x1e2)]())throw CliErrors['validation'](_0x4072ff(0x1ea)+_0x2abf58);const _0x2a3a44=toPosixPath(relative(_0x2d3512,_0x2abf58));if(_0xc55731['isDirectory']()){_0x54d7cd(_0x2abf58);continue;}if(!_0xc55731[_0x4072ff(0x1f3)]())continue;validateSkillRelativePath(_0x2a3a44);const _0xc33f1a=readFileSync(_0x2abf58);_0x5cff50[_0x4072ff(0x203)]({'path':_0x2a3a44,'bytes':_0xc33f1a});}}return _0x54d7cd(_0x2d3512),normalizeLocalFiles(_0x5cff50);}function a112_0x9c33(){const _0x8ecdf7=['486807TnFoxf','replace','bytes','has','isSymbolicLink','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','9211736uMwLac','localeCompare','trim','127PdYKnI','includes','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','string','content','set','Skill\x20file\x20size\x20is\x20invalid:\x20','path','validation','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','size','utf8','from','sha256','toLowerCase','isDirectory','sort','217608CMqncb','29205873pQNHwx','8CPJJYU','isSafeInteger','Duplicate\x20Skill\x20file\x20path:\x20','split','values','1519868DJLblh','push','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','1765050TDChhr','object','8062VnoPLj','isArray','test','name'];a112_0x9c33=function(){return _0x8ecdf7;};return a112_0x9c33();}export function compareSkillFiles(_0x291d5d,_0x3641ce){const _0x50fa0d=a112_0x123c;if(_0x291d5d[_0x50fa0d(0x1f0)]===SKILL_FILE)return _0x3641ce['path']===SKILL_FILE?0x0:-0x1;if(_0x3641ce[_0x50fa0d(0x1f0)]===SKILL_FILE)return 0x1;return Buffer[_0x50fa0d(0x1eb)](Buffer[_0x50fa0d(0x1f6)](_0x291d5d[_0x50fa0d(0x1f0)],_0x50fa0d(0x1f5)),Buffer[_0x50fa0d(0x1f6)](_0x3641ce[_0x50fa0d(0x1f0)],_0x50fa0d(0x1f5)));}export function normalizeSkillRelativePath(_0x2605bd){const _0x479050=a112_0x123c,_0x23af04=toPosixPath(_0x2605bd[_0x479050(0x1e6)]());return validateSkillRelativePath(_0x23af04),_0x23af04;}export function validateSkillRelativePath(_0x262979){const _0x3f1bdb=a112_0x123c;if(!_0x262979||_0x262979['startsWith']('/')||_0x262979[_0x3f1bdb(0x1e8)]('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x262979);for(const _0x2b8e4d of _0x262979[_0x3f1bdb(0x200)]('/')){if(!_0x2b8e4d||_0x2b8e4d==='.'||_0x2b8e4d==='..')throw CliErrors[_0x3f1bdb(0x1f1)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x262979);}}export function toPosixPath(_0x2f2b82){const _0xcae7ce=a112_0x123c;return _0x2f2b82[_0xcae7ce(0x1df)](/\\/g,'/');}export function isSha256Hex(_0x5116b6){const _0x56bfe8=a112_0x123c;return typeof _0x5116b6===_0x56bfe8(0x1ec)&&/^[a-fA-F0-9]{64}$/[_0x56bfe8(0x20a)](_0x5116b6);}
1
+ (function(_0x3b3a7e,_0x38d55f){const _0x3bb3b9=a112_0x5b25,_0x138698=_0x3b3a7e();while(!![]){try{const _0x345d61=-parseInt(_0x3bb3b9(0x127))/0x1*(parseInt(_0x3bb3b9(0x13b))/0x2)+parseInt(_0x3bb3b9(0x138))/0x3*(parseInt(_0x3bb3b9(0x134))/0x4)+-parseInt(_0x3bb3b9(0x140))/0x5+-parseInt(_0x3bb3b9(0x136))/0x6*(parseInt(_0x3bb3b9(0x12a))/0x7)+parseInt(_0x3bb3b9(0x12f))/0x8*(parseInt(_0x3bb3b9(0x125))/0x9)+-parseInt(_0x3bb3b9(0x144))/0xa*(-parseInt(_0x3bb3b9(0x128))/0xb)+parseInt(_0x3bb3b9(0x126))/0xc;if(_0x345d61===_0x38d55f)break;else _0x138698['push'](_0x138698['shift']());}catch(_0x2762fb){_0x138698['push'](_0x138698['shift']());}}}(a112_0x104b,0x43707));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(_0x23734d){const _0x4d2926=a112_0x5b25;return _0x23734d['bytes']??Buffer[_0x4d2926(0x11c)](_0x23734d[_0x4d2926(0x118)]??'',_0x4d2926(0x11b));}function a112_0x104b(){const _0x2f539c=['utf8','from','values','has','toString','isArray','push','Skill\x20file\x20size\x20is\x20invalid:\x20','validation','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','36lXDFlP','5582172GBOxZR','1UXWIJJ','11693XIFAhc','length','7oAQESt','startsWith','Unsafe\x20Skill\x20file\x20path:\x20','Duplicate\x20Skill\x20file\x20path:\x20','sort','293464YOWDzg','string','name','Skill\x20file\x20sha256\x20is\x20invalid:\x20','object','616300hFNpAw','size','1736424OxrCVz','isSymbolicLink','6TlspJS','isFile','split','519704DeVZmj','bytes','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','set','toLowerCase','1376430VgUMcb','path','compare','sha256','1700jWOBQc','isSafeInteger','isBuffer','replace','content','isDirectory','Skill\x20file\x20path\x20must\x20be\x20text.'];a112_0x104b=function(){return _0x2f539c;};return a112_0x104b();}export function fileText(_0x45d565){const _0x3aa535=a112_0x5b25;return fileContent(_0x45d565)[_0x3aa535(0x11f)](_0x3aa535(0x11b));}export function normalizeLocalFiles(_0x1894da){const _0x511850=a112_0x5b25;if(!Array[_0x511850(0x120)](_0x1894da)||_0x1894da[_0x511850(0x129)]===0x0)return[];const _0x4f9b74=new Map();for(const _0x40139c of _0x1894da){if(!_0x40139c||typeof _0x40139c!==_0x511850(0x133)||typeof _0x40139c[_0x511850(0x141)]!==_0x511850(0x130))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x41158b=normalizeSkillRelativePath(_0x40139c[_0x511850(0x141)]);if(_0x4f9b74['has'](_0x41158b))throw CliErrors[_0x511850(0x123)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x41158b);if(_0x40139c[_0x511850(0x13c)]!==undefined&&!Buffer[_0x511850(0x116)](_0x40139c[_0x511850(0x13c)]))throw CliErrors[_0x511850(0x123)](_0x511850(0x13d)+_0x41158b);if(_0x40139c[_0x511850(0x13c)]===undefined&&typeof _0x40139c[_0x511850(0x118)]!==_0x511850(0x130))throw CliErrors[_0x511850(0x123)](_0x511850(0x124)+_0x41158b);const _0xb8dddb=fileContent(_0x40139c);_0x4f9b74[_0x511850(0x13e)](_0x41158b,{'path':_0x41158b,'bytes':_0xb8dddb});}return Array[_0x511850(0x11c)](_0x4f9b74[_0x511850(0x11d)]())[_0x511850(0x12e)](compareSkillFiles);}export function normalizeManifestFiles(_0x325b3f){const _0xe28165=a112_0x5b25;if(!Array[_0xe28165(0x120)](_0x325b3f)||_0x325b3f[_0xe28165(0x129)]===0x0)return[];const _0x22fa82=new Map();for(const _0xc562b7 of _0x325b3f){if(!_0xc562b7||typeof _0xc562b7!==_0xe28165(0x133)||typeof _0xc562b7[_0xe28165(0x141)]!==_0xe28165(0x130))throw CliErrors[_0xe28165(0x123)](_0xe28165(0x11a));const _0xcd9d2e=normalizeSkillRelativePath(_0xc562b7[_0xe28165(0x141)]);if(_0x22fa82[_0xe28165(0x11e)](_0xcd9d2e))throw CliErrors['validation'](_0xe28165(0x12d)+_0xcd9d2e);if(!isSha256Hex(_0xc562b7[_0xe28165(0x143)]))throw CliErrors[_0xe28165(0x123)](_0xe28165(0x132)+_0xcd9d2e);if(!Number[_0xe28165(0x115)](_0xc562b7[_0xe28165(0x135)])||_0xc562b7[_0xe28165(0x135)]<0x0)throw CliErrors[_0xe28165(0x123)](_0xe28165(0x122)+_0xcd9d2e);_0x22fa82[_0xe28165(0x13e)](_0xcd9d2e,{'path':_0xcd9d2e,'sha256':_0xc562b7[_0xe28165(0x143)][_0xe28165(0x13f)](),'size':_0xc562b7[_0xe28165(0x135)]});}return Array[_0xe28165(0x11c)](_0x22fa82['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x184f9c){const _0x512add=realpathSync(_0x184f9c),_0x39e2d1=[];function _0x34cb2e(_0x3a5734){const _0x386cf1=a112_0x5b25,_0x58f1b6=readdirSync(_0x3a5734,{'withFileTypes':!![]})['sort']((_0x4a6020,_0x43f00a)=>_0x4a6020[_0x386cf1(0x131)]['localeCompare'](_0x43f00a[_0x386cf1(0x131)]));for(const _0x449ece of _0x58f1b6){if(_0x449ece[_0x386cf1(0x119)]()&&IGNORED_DIR_NAMES[_0x386cf1(0x11e)](_0x449ece[_0x386cf1(0x131)]))continue;if(IGNORED_FILE_NAMES[_0x386cf1(0x11e)](_0x449ece['name']))continue;const _0x413ead=resolve(_0x3a5734,_0x449ece['name']);if(_0x449ece[_0x386cf1(0x137)]())throw CliErrors[_0x386cf1(0x123)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x413ead);const _0x4539b4=toPosixPath(relative(_0x512add,_0x413ead));if(_0x449ece[_0x386cf1(0x119)]()){_0x34cb2e(_0x413ead);continue;}if(!_0x449ece[_0x386cf1(0x139)]())continue;validateSkillRelativePath(_0x4539b4);const _0x1e9212=readFileSync(_0x413ead);_0x39e2d1[_0x386cf1(0x121)]({'path':_0x4539b4,'bytes':_0x1e9212});}}return _0x34cb2e(_0x512add),normalizeLocalFiles(_0x39e2d1);}function a112_0x5b25(_0x311897,_0x3b5026){_0x311897=_0x311897-0x115;const _0x104bd1=a112_0x104b();let _0x5b2518=_0x104bd1[_0x311897];return _0x5b2518;}export function compareSkillFiles(_0x555fb4,_0x4c2136){const _0x14048c=a112_0x5b25;if(_0x555fb4[_0x14048c(0x141)]===SKILL_FILE)return _0x4c2136[_0x14048c(0x141)]===SKILL_FILE?0x0:-0x1;if(_0x4c2136[_0x14048c(0x141)]===SKILL_FILE)return 0x1;return Buffer[_0x14048c(0x142)](Buffer[_0x14048c(0x11c)](_0x555fb4[_0x14048c(0x141)],_0x14048c(0x11b)),Buffer[_0x14048c(0x11c)](_0x4c2136['path'],_0x14048c(0x11b)));}export function normalizeSkillRelativePath(_0x1eb1f3){const _0x53a885=toPosixPath(_0x1eb1f3['trim']());return validateSkillRelativePath(_0x53a885),_0x53a885;}export function validateSkillRelativePath(_0x309e04){const _0x8d8466=a112_0x5b25;if(!_0x309e04||_0x309e04[_0x8d8466(0x12b)]('/')||_0x309e04['includes']('//'))throw CliErrors[_0x8d8466(0x123)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x309e04);for(const _0x5ba5d2 of _0x309e04[_0x8d8466(0x13a)]('/')){if(!_0x5ba5d2||_0x5ba5d2==='.'||_0x5ba5d2==='..')throw CliErrors[_0x8d8466(0x123)](_0x8d8466(0x12c)+_0x309e04);}}export function toPosixPath(_0x4340cb){const _0xc15296=a112_0x5b25;return _0x4340cb[_0xc15296(0x117)](/\\/g,'/');}export function isSha256Hex(_0x13aa9c){const _0x100332=a112_0x5b25;return typeof _0x13aa9c===_0x100332(0x130)&&/^[a-fA-F0-9]{64}$/['test'](_0x13aa9c);}
@@ -1 +1 @@
1
- (function(_0x2c3647,_0x59e059){const _0x2ca3a5=a113_0x17f8,_0xe93b2f=_0x2c3647();while(!![]){try{const _0x3e28ba=-parseInt(_0x2ca3a5(0x159))/0x1+parseInt(_0x2ca3a5(0x147))/0x2+-parseInt(_0x2ca3a5(0x16d))/0x3+parseInt(_0x2ca3a5(0x148))/0x4+parseInt(_0x2ca3a5(0x168))/0x5+-parseInt(_0x2ca3a5(0x141))/0x6*(parseInt(_0x2ca3a5(0x153))/0x7)+parseInt(_0x2ca3a5(0x169))/0x8;if(_0x3e28ba===_0x59e059)break;else _0xe93b2f['push'](_0xe93b2f['shift']());}catch(_0x11a4df){_0xe93b2f['push'](_0xe93b2f['shift']());}}}(a113_0x1e01,0x258b4));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a113_0x1e01(){const _0x3c2b4f=['299513dRYvaV','replace','contentHash','validation','map','appCode','entries','match','join','displayName:\x20','isFile','---','.\x20Changed\x20file:\x20','stringify','trimEnd','252825naxCPl','1860736IcCsAF','find','filter','paths','623979eCHJnH','name:\x20','---\x0a','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','length','displayName','fileHashes','174QGARVl','trim','env','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','pulledAt','contents','321100uhoIqt','881800qjsGYf','description','utf8','keys','slice','skillName','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','has','path','packageBytes','name','693vSwTTa','description:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','delete','force','toString'];a113_0x1e01=function(){return _0x3c2b4f;};return a113_0x1e01();}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(_0x377de6,_0xf255d7,_0x419817){const _0x57479b=a113_0x17f8,_0x543ee4=requireSkillCode(_0x377de6),_0x51de95=requirePackageBytes(_0x543ee4,_0x419817[_0x57479b(0x151)]),_0x2a6531=extractDownloadedPackage(_0x51de95),_0x13b0c7=_0x2a6531['find'](_0x315bfa=>_0x315bfa[_0x57479b(0x150)]===SKILL_FILE);if(!_0x13b0c7)throw CliErrors[_0x57479b(0x15c)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x543ee4);const _0x29c291=withMaterializedSkillFrontmatter(_0x2a6531,_0x377de6,_0x543ee4),_0x4d3b3b=_0x29c291[_0x57479b(0x16a)](_0x457e01=>_0x457e01[_0x57479b(0x150)]===SKILL_FILE),_0x363347=fileText(_0x4d3b3b),_0x137d7f=getRuntimeSkillDir(_0x419817[_0x57479b(0x143)],_0x419817['accessKey'],_0x419817[_0x57479b(0x15e)],_0xf255d7,_0x543ee4,_0x419817[_0x57479b(0x16c)]),_0x184965=resolve(_0x137d7f,SKILL_FILE),_0x5618c1=resolve(_0x137d7f,METADATA_FILE),_0x58dcfa=contentHash(_0x363347),_0x919fd9=readMetadataIfPresent(_0x5618c1)?.[_0x57479b(0x140)];ensurePulledFilesCanBeOverwritten(_0x137d7f,_0x5618c1,_0x29c291,_0x419817[_0x57479b(0x157)]===!![]),mkdirSync(_0x137d7f,{'recursive':!![],'mode':0x1c0});const _0x1fbfb8=existsSync(_0x184965)?readFileSync(_0x184965,_0x57479b(0x14a)):undefined;return materializeFiles(_0x137d7f,_0x29c291),removeStaleManagedFiles(_0x137d7f,_0x919fd9,_0x29c291),writeJsonAtomic(_0x5618c1,buildMetadata(_0x377de6,_0xf255d7,_0x419817[_0x57479b(0x15e)],_0x58dcfa,_0x419817[_0x57479b(0x145)],_0x29c291,_0x51de95)),{'skill':_0x377de6,'scope':_0xf255d7,'dir':_0x137d7f,'skillMdPath':_0x184965,'metadataPath':_0x5618c1,'contentHash':_0x58dcfa,'changed':_0x1fbfb8!==_0x363347};}function withMaterializedSkillFrontmatter(_0x49974a,_0x4ab443,_0x6694b5){const _0x40f0f2=a113_0x17f8,_0x21df8e=skillDisplayName(_0x4ab443,_0x6694b5),_0x3b15f4=_0x4ab443['description']?.['trim']()||_0x21df8e||_0x6694b5;return normalizeLocalFiles(_0x49974a)[_0x40f0f2(0x15d)](_0x550535=>{const _0x5041fa=_0x40f0f2,_0x36cd8a=fileText(_0x550535);if(_0x550535['path']!==SKILL_FILE)return _0x550535;if(hasYamlFrontmatter(_0x36cd8a))return{'path':_0x550535[_0x5041fa(0x150)],'content':withSyncedDisplayName(_0x36cd8a,_0x21df8e)};return{'path':_0x550535[_0x5041fa(0x150)],'content':prependSkillFrontmatter(_0x36cd8a,{'name':_0x6694b5,'displayName':_0x21df8e,'description':_0x3b15f4})};});}function hasYamlFrontmatter(_0x39e494){return/^\uFEFF?---\s*\r?\n/['test'](_0x39e494);}function prependSkillFrontmatter(_0x3a3aa5,_0x16d549){const _0x174513=a113_0x17f8,_0x4527c3=_0x3a3aa5[_0x174513(0x15a)](/^\uFEFF/,'');return[_0x174513(0x164),_0x174513(0x16e)+yamlString(_0x16d549[_0x174513(0x152)]),_0x16d549[_0x174513(0x13f)]?_0x174513(0x162)+yamlString(_0x16d549[_0x174513(0x13f)]):undefined,_0x174513(0x154)+yamlString(_0x16d549[_0x174513(0x149)]),_0x174513(0x164),'',_0x4527c3][_0x174513(0x16b)](_0x49a38b=>_0x49a38b!==undefined)[_0x174513(0x161)]('\x0a');}function yamlString(_0x152b36){const _0x40edce=a113_0x17f8;return JSON[_0x40edce(0x166)](_0x152b36['replace'](/\r/g,'')[_0x40edce(0x142)]());}function skillDisplayName(_0x10987a,_0x2f7672){const _0xbb12e1=a113_0x17f8,_0x23a30f=_0x10987a[_0xbb12e1(0x14d)]?.[_0xbb12e1(0x142)]();return _0x23a30f||_0x2f7672;}function withSyncedDisplayName(_0x16a981,_0x4e0516){const _0x511e1f=a113_0x17f8,_0xff5d7e=_0x16a981[_0x511e1f(0x160)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xff5d7e)return _0x16a981;const _0x2476ad=_0xff5d7e[0x1]??'',_0x14097c=_0xff5d7e[0x2]??'',_0x3ed6db=parseDocument(_0x14097c);if(_0x3ed6db['errors'][_0x511e1f(0x13e)]>0x0||!isMap(_0x3ed6db[_0x511e1f(0x146)]))return _0x16a981;if(_0x4e0516)_0x3ed6db['set'](_0x511e1f(0x13f),_0x4e0516);else{if(_0x3ed6db[_0x511e1f(0x14f)](_0x511e1f(0x13f)))_0x3ed6db[_0x511e1f(0x156)](_0x511e1f(0x13f));else return _0x16a981;}forceBlockCollections(_0x3ed6db['contents']);const _0x1d1a85=_0x3ed6db[_0x511e1f(0x158)]({'lineWidth':0x0})[_0x511e1f(0x167)](),_0x17c366=_0x16a981[_0x511e1f(0x14c)](_0xff5d7e[0x0][_0x511e1f(0x13e)])[_0x511e1f(0x15a)](/^\r?\n/,'');return _0x2476ad+_0x511e1f(0x13b)+_0x1d1a85+'\x0a---\x0a\x0a'+_0x17c366;}function forceBlockCollections(_0x4d1809){if(!isNode(_0x4d1809))return;visit(_0x4d1809,(_0x16ac6d,_0x3c3c3e)=>{isCollection(_0x3c3c3e)&&(_0x3c3c3e['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x197c09,_0x37f511,_0x3059d8,_0x2c4e9c){const _0x496a93=a113_0x17f8;if(_0x2c4e9c||!existsSync(_0x37f511))return;const _0x485994=readMetadataIfPresent(_0x37f511);if(!_0x485994)return;const _0x56682a=_0x485994['fileHashes']&&Object[_0x496a93(0x14b)](_0x485994[_0x496a93(0x140)])[_0x496a93(0x13e)]>0x0?_0x485994[_0x496a93(0x140)]:undefined;if(_0x56682a)for(const [_0x155c9e,_0x58c3d6]of Object[_0x496a93(0x15f)](_0x56682a)){const _0x1796d3=resolveManagedFilePath(_0x197c09,_0x155c9e);if(!existsSync(_0x1796d3))throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x13c)+_0x197c09,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x155c9e);const _0x31b924=lstatSync(_0x1796d3);if(!_0x31b924[_0x496a93(0x163)]())throw CliErrors['validation'](_0x496a93(0x13c)+_0x197c09,_0x496a93(0x144)+_0x155c9e);const _0x23fce5=bufferSha256(readFileSync(_0x1796d3));if(_0x23fce5!==_0x58c3d6)throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x13c)+_0x197c09+_0x496a93(0x165)+_0x155c9e,_0x496a93(0x13d)+_0x155c9e);}else{const _0xb3ab7e=resolve(_0x197c09,SKILL_FILE);if(existsSync(_0xb3ab7e)&&_0x485994[_0x496a93(0x15b)]){const _0x1d7271=contentHash(readFileSync(_0xb3ab7e,_0x496a93(0x14a)));if(_0x1d7271!==_0x485994[_0x496a93(0x15b)])throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x155)+_0xb3ab7e,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x599a93 of normalizeLocalFiles(_0x3059d8)){if(_0x56682a?.[_0x599a93['path']])continue;if(!_0x56682a&&_0x599a93[_0x496a93(0x150)]===SKILL_FILE)continue;const _0x443af5=resolveManagedFilePath(_0x197c09,_0x599a93[_0x496a93(0x150)]);if(!existsSync(_0x443af5))continue;const _0x2d92cb=lstatSync(_0x443af5);if(!_0x2d92cb['isFile']())throw CliErrors[_0x496a93(0x15c)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x197c09,_0x496a93(0x14e)+_0x599a93[_0x496a93(0x150)]);const _0x153679=bufferSha256(readFileSync(_0x443af5));if(_0x153679!==fileHash(_0x599a93))throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x13c)+_0x197c09,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x599a93['path']);}}function materializeFiles(_0x3bc2d9,_0x5bc167){const _0x25cf6d=a113_0x17f8;for(const _0x34da3a of normalizeLocalFiles(_0x5bc167)){const _0x560e63=resolveManagedFilePath(_0x3bc2d9,_0x34da3a[_0x25cf6d(0x150)]);mkdirSync(dirname(_0x560e63),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x560e63,fileContent(_0x34da3a),0x180);}}function a113_0x17f8(_0x3c31e1,_0x45a66c){_0x3c31e1=_0x3c31e1-0x13b;const _0x1e015a=a113_0x1e01();let _0x17f8c6=_0x1e015a[_0x3c31e1];return _0x17f8c6;}function removeStaleManagedFiles(_0x5ed84b,_0x1f91c6,_0x1e5ace){const _0xb535fb=a113_0x17f8;if(!_0x1f91c6)return;const _0x26cc36=new Set(normalizeLocalFiles(_0x1e5ace)[_0xb535fb(0x15d)](_0x2df52b=>_0x2df52b[_0xb535fb(0x150)]));for(const _0x5c3505 of Object[_0xb535fb(0x14b)](_0x1f91c6)){if(_0x26cc36[_0xb535fb(0x14f)](_0x5c3505))continue;const _0x350037=resolveManagedFilePath(_0x5ed84b,_0x5c3505);existsSync(_0x350037)&&lstatSync(_0x350037)[_0xb535fb(0x163)]()&&rmSync(_0x350037,{'force':!![]});}}
1
+ (function(_0x4bbdc6,_0x142551){const _0x85d600=a113_0x5deb,_0x47bbaa=_0x4bbdc6();while(!![]){try{const _0x178ee4=parseInt(_0x85d600(0x1ef))/0x1*(-parseInt(_0x85d600(0x1c2))/0x2)+-parseInt(_0x85d600(0x1d8))/0x3*(-parseInt(_0x85d600(0x1e6))/0x4)+parseInt(_0x85d600(0x1e5))/0x5*(-parseInt(_0x85d600(0x1cd))/0x6)+-parseInt(_0x85d600(0x1f5))/0x7+parseInt(_0x85d600(0x1f3))/0x8*(parseInt(_0x85d600(0x1c0))/0x9)+-parseInt(_0x85d600(0x1de))/0xa+-parseInt(_0x85d600(0x1dc))/0xb*(-parseInt(_0x85d600(0x1d0))/0xc);if(_0x178ee4===_0x142551)break;else _0x47bbaa['push'](_0x47bbaa['shift']());}catch(_0x5054c8){_0x47bbaa['push'](_0x47bbaa['shift']());}}}(a113_0x5e85,0x8e575));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a113_0x5deb(_0xcc2b6b,_0x4a587f){_0xcc2b6b=_0xcc2b6b-0x1c0;const _0x5e851e=a113_0x5e85();let _0x5debaa=_0x5e851e[_0xcc2b6b];return _0x5debaa;}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(_0x37ca68,_0x2c1b75,_0x32c3bd){const _0x27c0ef=a113_0x5deb,_0x1af73b=requireSkillCode(_0x37ca68),_0x5afae6=requirePackageBytes(_0x1af73b,_0x32c3bd['packageBytes']),_0x5caf86=extractDownloadedPackage(_0x5afae6),_0x2a48ff=_0x5caf86[_0x27c0ef(0x1d3)](_0x59b14d=>_0x59b14d['path']===SKILL_FILE);if(!_0x2a48ff)throw CliErrors[_0x27c0ef(0x1dd)](_0x27c0ef(0x1d2)+SKILL_FILE+':\x20'+_0x1af73b);const _0x8a9f67=withMaterializedSkillFrontmatter(_0x5caf86,_0x37ca68,_0x1af73b),_0x47d6cb=_0x8a9f67[_0x27c0ef(0x1d3)](_0x4cecad=>_0x4cecad[_0x27c0ef(0x1ed)]===SKILL_FILE),_0x201040=fileText(_0x47d6cb),_0x14eaa2=getRuntimeSkillDir(_0x32c3bd[_0x27c0ef(0x1f2)],_0x32c3bd[_0x27c0ef(0x1cf)],_0x32c3bd[_0x27c0ef(0x1ea)],_0x2c1b75,_0x1af73b,_0x32c3bd[_0x27c0ef(0x1d1)]),_0x148c1b=resolve(_0x14eaa2,SKILL_FILE),_0x3b18ce=resolve(_0x14eaa2,METADATA_FILE),_0x7b40ab=contentHash(_0x201040),_0x32f10a=readMetadataIfPresent(_0x3b18ce)?.[_0x27c0ef(0x1e2)];ensurePulledFilesCanBeOverwritten(_0x14eaa2,_0x3b18ce,_0x8a9f67,_0x32c3bd[_0x27c0ef(0x1e7)]===!![]),mkdirSync(_0x14eaa2,{'recursive':!![],'mode':0x1c0});const _0x276067=existsSync(_0x148c1b)?readFileSync(_0x148c1b,'utf8'):undefined;return materializeFiles(_0x14eaa2,_0x8a9f67),removeStaleManagedFiles(_0x14eaa2,_0x32f10a,_0x8a9f67),writeJsonAtomic(_0x3b18ce,buildMetadata(_0x37ca68,_0x2c1b75,_0x32c3bd[_0x27c0ef(0x1ea)],_0x7b40ab,_0x32c3bd[_0x27c0ef(0x1e9)],_0x8a9f67,_0x5afae6)),{'skill':_0x37ca68,'scope':_0x2c1b75,'dir':_0x14eaa2,'skillMdPath':_0x148c1b,'metadataPath':_0x3b18ce,'contentHash':_0x7b40ab,'changed':_0x276067!==_0x201040};}function withMaterializedSkillFrontmatter(_0x2ee35a,_0x4603b4,_0x49bd24){const _0xd3f775=a113_0x5deb,_0x59fd97=skillDisplayName(_0x4603b4,_0x49bd24),_0x2acd5c=_0x4603b4[_0xd3f775(0x1ca)]?.[_0xd3f775(0x1c5)]()||_0x59fd97||_0x49bd24;return normalizeLocalFiles(_0x2ee35a)[_0xd3f775(0x1c8)](_0x8892bf=>{const _0x485481=_0xd3f775,_0x17fd4c=fileText(_0x8892bf);if(_0x8892bf[_0x485481(0x1ed)]!==SKILL_FILE)return _0x8892bf;if(hasYamlFrontmatter(_0x17fd4c))return{'path':_0x8892bf['path'],'content':withSyncedDisplayName(_0x17fd4c,_0x59fd97)};return{'path':_0x8892bf[_0x485481(0x1ed)],'content':prependSkillFrontmatter(_0x17fd4c,{'name':_0x49bd24,'displayName':_0x59fd97,'description':_0x2acd5c})};});}function hasYamlFrontmatter(_0x584ca4){const _0x5809f9=a113_0x5deb;return/^\uFEFF?---\s*\r?\n/[_0x5809f9(0x1d7)](_0x584ca4);}function prependSkillFrontmatter(_0x2a0663,_0xbb6f56){const _0xc3eeb4=a113_0x5deb,_0x272c00=_0x2a0663[_0xc3eeb4(0x1e0)](/^\uFEFF/,'');return['---',_0xc3eeb4(0x1df)+yamlString(_0xbb6f56[_0xc3eeb4(0x1fa)]),_0xbb6f56[_0xc3eeb4(0x1c7)]?_0xc3eeb4(0x1f0)+yamlString(_0xbb6f56[_0xc3eeb4(0x1c7)]):undefined,_0xc3eeb4(0x1f6)+yamlString(_0xbb6f56[_0xc3eeb4(0x1ca)]),_0xc3eeb4(0x1d4),'',_0x272c00][_0xc3eeb4(0x1e4)](_0x50fbe6=>_0x50fbe6!==undefined)[_0xc3eeb4(0x1ec)]('\x0a');}function yamlString(_0x12ebdf){const _0x3ed4e0=a113_0x5deb;return JSON[_0x3ed4e0(0x1ce)](_0x12ebdf['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x1331cf,_0x40bbf0){const _0x2b065a=a113_0x5deb,_0xf6f8e5=_0x1331cf[_0x2b065a(0x1f7)]?.[_0x2b065a(0x1c5)]();return _0xf6f8e5||_0x40bbf0;}function withSyncedDisplayName(_0x45b74e,_0x4ddb0b){const _0x560152=a113_0x5deb,_0x3f3bc4=_0x45b74e['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3f3bc4)return _0x45b74e;const _0x176369=_0x3f3bc4[0x1]??'',_0x100a70=_0x3f3bc4[0x2]??'',_0x10752f=parseDocument(_0x100a70);if(_0x10752f[_0x560152(0x1db)][_0x560152(0x1fb)]>0x0||!isMap(_0x10752f[_0x560152(0x1e3)]))return _0x45b74e;if(_0x4ddb0b)_0x10752f[_0x560152(0x1ee)]('displayName',_0x4ddb0b);else{if(_0x10752f[_0x560152(0x1c3)]('displayName'))_0x10752f[_0x560152(0x1c9)](_0x560152(0x1c7));else return _0x45b74e;}forceBlockCollections(_0x10752f[_0x560152(0x1e3)]);const _0x3e091c=_0x10752f[_0x560152(0x1f1)]({'lineWidth':0x0})[_0x560152(0x1f9)](),_0x252261=_0x45b74e[_0x560152(0x1d5)](_0x3f3bc4[0x0][_0x560152(0x1fb)])[_0x560152(0x1e0)](/^\r?\n/,'');return _0x176369+_0x560152(0x1c4)+_0x3e091c+'\x0a---\x0a\x0a'+_0x252261;}function forceBlockCollections(_0x51b678){if(!isNode(_0x51b678))return;visit(_0x51b678,(_0x48e043,_0x361f89)=>{const _0x5ad0ed=a113_0x5deb;isCollection(_0x361f89)&&(_0x361f89[_0x5ad0ed(0x1f8)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1bd490,_0x3a1f1f,_0x1f11d8,_0x2fded6){const _0x460188=a113_0x5deb;if(_0x2fded6||!existsSync(_0x3a1f1f))return;const _0x10dfb1=readMetadataIfPresent(_0x3a1f1f);if(!_0x10dfb1)return;const _0x358713=_0x10dfb1['fileHashes']&&Object[_0x460188(0x1c6)](_0x10dfb1['fileHashes'])[_0x460188(0x1fb)]>0x0?_0x10dfb1['fileHashes']:undefined;if(_0x358713)for(const [_0x184b2,_0x2ff708]of Object[_0x460188(0x1e8)](_0x358713)){const _0x5a19f6=resolveManagedFilePath(_0x1bd490,_0x184b2);if(!existsSync(_0x5a19f6))throw CliErrors['validation'](_0x460188(0x1cb)+_0x1bd490,_0x460188(0x1eb)+_0x184b2);const _0x373943=lstatSync(_0x5a19f6);if(!_0x373943[_0x460188(0x1e1)]())throw CliErrors[_0x460188(0x1dd)](_0x460188(0x1cb)+_0x1bd490,_0x460188(0x1f4)+_0x184b2);const _0x22174c=bufferSha256(readFileSync(_0x5a19f6));if(_0x22174c!==_0x2ff708)throw CliErrors['validation'](_0x460188(0x1cb)+_0x1bd490+'.\x20Changed\x20file:\x20'+_0x184b2,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x184b2);}else{const _0x71cfd8=resolve(_0x1bd490,SKILL_FILE);if(existsSync(_0x71cfd8)&&_0x10dfb1[_0x460188(0x1d9)]){const _0x1da350=contentHash(readFileSync(_0x71cfd8,'utf8'));if(_0x1da350!==_0x10dfb1[_0x460188(0x1d9)])throw CliErrors['validation'](_0x460188(0x1d6)+_0x71cfd8,_0x460188(0x1da));}}for(const _0x53fd23 of normalizeLocalFiles(_0x1f11d8)){if(_0x358713?.[_0x53fd23[_0x460188(0x1ed)]])continue;if(!_0x358713&&_0x53fd23['path']===SKILL_FILE)continue;const _0x2becce=resolveManagedFilePath(_0x1bd490,_0x53fd23[_0x460188(0x1ed)]);if(!existsSync(_0x2becce))continue;const _0x32fb94=lstatSync(_0x2becce);if(!_0x32fb94[_0x460188(0x1e1)]())throw CliErrors['validation'](_0x460188(0x1cb)+_0x1bd490,_0x460188(0x1c1)+_0x53fd23[_0x460188(0x1ed)]);const _0x14dd64=bufferSha256(readFileSync(_0x2becce));if(_0x14dd64!==fileHash(_0x53fd23))throw CliErrors[_0x460188(0x1dd)](_0x460188(0x1cb)+_0x1bd490,_0x460188(0x1cc)+_0x53fd23[_0x460188(0x1ed)]);}}function materializeFiles(_0x3c84ef,_0x210df2){const _0x556751=a113_0x5deb;for(const _0x20f57c of normalizeLocalFiles(_0x210df2)){const _0x4dcd2d=resolveManagedFilePath(_0x3c84ef,_0x20f57c[_0x556751(0x1ed)]);mkdirSync(dirname(_0x4dcd2d),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4dcd2d,fileContent(_0x20f57c),0x180);}}function removeStaleManagedFiles(_0x32f07b,_0x401662,_0x5adc3b){const _0x4ffb0e=a113_0x5deb;if(!_0x401662)return;const _0x215e93=new Set(normalizeLocalFiles(_0x5adc3b)[_0x4ffb0e(0x1c8)](_0x2c9677=>_0x2c9677['path']));for(const _0x202adb of Object[_0x4ffb0e(0x1c6)](_0x401662)){if(_0x215e93[_0x4ffb0e(0x1c3)](_0x202adb))continue;const _0x4f5ebe=resolveManagedFilePath(_0x32f07b,_0x202adb);existsSync(_0x4f5ebe)&&lstatSync(_0x4f5ebe)[_0x4ffb0e(0x1e1)]()&&rmSync(_0x4f5ebe,{'force':!![]});}}function a113_0x5e85(){const _0x3c5407=['568572rYHjTW','stringify','accessKey','79260EPoVZZ','paths','Runtime\x20Skill\x20package\x20is\x20missing\x20','find','---','slice','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','test','6417xHVLPP','contentHash','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','errors','2222EMjBuq','validation','606870PDVRoH','name:\x20','replace','isFile','fileHashes','contents','filter','30FtMRkz','872FQFyPz','force','entries','pulledAt','appCode','Managed\x20file\x20was\x20removed\x20locally:\x20','join','path','set','942QXBosn','displayName:\x20','toString','env','61192kJDvlU','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','4956035mbJmcm','description:\x20','skillName','flow','trimEnd','name','length','837Qzjonk','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1256wSWkfR','has','---\x0a','trim','keys','displayName','map','delete','description','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'];a113_0x5e85=function(){return _0x3c5407;};return a113_0x5e85();}
@@ -1 +1 @@
1
- (function(_0x39fa66,_0x9567e2){const _0x3b330c=a114_0x1b71,_0x814edb=_0x39fa66();while(!![]){try{const _0xa35753=parseInt(_0x3b330c(0x1ba))/0x1*(parseInt(_0x3b330c(0x1d7))/0x2)+-parseInt(_0x3b330c(0x1bf))/0x3*(parseInt(_0x3b330c(0x1c4))/0x4)+-parseInt(_0x3b330c(0x1c2))/0x5+-parseInt(_0x3b330c(0x1da))/0x6*(-parseInt(_0x3b330c(0x1c8))/0x7)+-parseInt(_0x3b330c(0x1b6))/0x8+parseInt(_0x3b330c(0x1d3))/0x9*(-parseInt(_0x3b330c(0x1d4))/0xa)+parseInt(_0x3b330c(0x1cd))/0xb;if(_0xa35753===_0x9567e2)break;else _0x814edb['push'](_0x814edb['shift']());}catch(_0x2103b6){_0x814edb['push'](_0x814edb['shift']());}}}(a114_0xfd4c,0xb967e));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a114_0xfd4c(){const _0x1336e1=['readonly','399pvPkpE','version','isArray','sourceSessionId','personal','10275969MjUCOD','tags','manifest','Invalid\x20','userId','parse','13113aytyuS','8210iZXHAD','trim','Runtime\x20Skill\x20is\x20missing\x20skillCode.','50IYUslz','files','map','140442BpyRnM','string','tenantCode','3045376BQkaYL','zipSha256','length','object','46895DssnUt','description','path','validation','zipSize','21135BKyVoy','utf8','status','2563410CqSHJW','ossPath','336HCrUcZ','fromEntries','skillName'];a114_0xfd4c=function(){return _0x1336e1;};return a114_0xfd4c();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x45a49c,_0x5b3aab,_0x4b0d27,_0x36dcc4,_0x51145b,_0x1b9ff0,_0x37b277){const _0x25e942=a114_0x1b71,_0x496c13=_0x1b9ff0?normalizeLocalFiles(_0x1b9ff0):[],_0x502b83=!_0x37b277&&_0x496c13[_0x25e942(0x1b8)]>0x0?buildSkillPackage(_0x496c13):undefined,_0xf6e9eb=_0x37b277?bufferSha256(_0x37b277):_0x502b83?.[_0x25e942(0x1cf)][_0x25e942(0x1b7)],_0x5e3e0c=_0x37b277?.[_0x25e942(0x1b8)]??_0x502b83?.[_0x25e942(0x1cf)][_0x25e942(0x1be)],_0x32020e=_0x496c13['length']>0x0?Object[_0x25e942(0x1c5)](_0x496c13[_0x25e942(0x1d9)](_0x4cb28a=>[_0x4cb28a[_0x25e942(0x1bc)],fileHash(_0x4cb28a)])):undefined;return{'schemaVersion':_0x496c13[_0x25e942(0x1b8)]>0x0?0x2:0x1,'id':_0x45a49c['id'],'appCode':_0x4b0d27,'skillCode':requireSkillCode(_0x45a49c),'skillName':_0x45a49c[_0x25e942(0x1c6)],'description':_0x45a49c[_0x25e942(0x1bb)],'scope':_0x5b3aab,'readonly':_0x5b3aab!==_0x25e942(0x1cc)||_0x45a49c[_0x25e942(0x1c7)]===!![],'tenantCode':_0x45a49c[_0x25e942(0x1b5)],'userId':_0x45a49c[_0x25e942(0x1d1)],'version':_0x45a49c[_0x25e942(0x1c9)],'status':_0x45a49c[_0x25e942(0x1c1)],'tags':Array[_0x25e942(0x1ca)](_0x45a49c['tags'])?_0x45a49c[_0x25e942(0x1ce)]:[],'hasUpstreamUpdate':_0x45a49c['hasUpstreamUpdate'],'forkedFromSkillId':_0x45a49c['forkedFromSkillId'],'forkedFromVersion':_0x45a49c['forkedFromVersion'],'sourceSessionId':_0x45a49c[_0x25e942(0x1cb)],'contentHash':_0x36dcc4,'fileHashes':_0x32020e,'treeHash':_0x496c13[_0x25e942(0x1b8)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x496c13)):undefined,'ossPath':remoteManifestOssPath(_0x45a49c[_0x25e942(0x1d8)]),'zipSha256':_0xf6e9eb,'zipSize':_0x5e3e0c,'files':_0x496c13[_0x25e942(0x1b8)]>0x0?_0x496c13[_0x25e942(0x1d9)](_0x45f2a2=>({'path':_0x45f2a2[_0x25e942(0x1bc)],'hash':fileHash(_0x45f2a2),'size':fileContent(_0x45f2a2)['length']})):undefined,'pulledAt':_0x51145b??new Date()['toISOString']()};}function a114_0x1b71(_0x27e848,_0xef7cc8){_0x27e848=_0x27e848-0x1b5;const _0xfd4cf9=a114_0xfd4c();let _0x1b7119=_0xfd4cf9[_0x27e848];return _0x1b7119;}export function requireSkillCode(_0x2b5a16){const _0x267106=a114_0x1b71,_0x4c06c1=_0x2b5a16['skillCode']?.[_0x267106(0x1d5)]();if(!_0x4c06c1)throw CliErrors[_0x267106(0x1bd)](_0x267106(0x1d6));return _0x4c06c1;}export function readMetadataIfPresent(_0x119b58){const _0x157d49=a114_0x1b71;if(!existsSync(_0x119b58))return undefined;try{const _0x637479=JSON[_0x157d49(0x1d2)](readFileSync(_0x119b58,_0x157d49(0x1c0)));return _0x637479;}catch{throw CliErrors[_0x157d49(0x1bd)](_0x157d49(0x1d0)+METADATA_FILE+':\x20'+_0x119b58);}}function remoteManifestOssPath(_0xba573e){const _0x44025e=a114_0x1b71;if(!_0xba573e||typeof _0xba573e!==_0x44025e(0x1b9)||Array[_0x44025e(0x1ca)](_0xba573e))return undefined;const _0xb4b09d=_0xba573e[_0x44025e(0x1c3)];return typeof _0xb4b09d===_0x44025e(0x1db)&&_0xb4b09d['trim']()?_0xb4b09d[_0x44025e(0x1d5)]():undefined;}
1
+ (function(_0xa4a6f8,_0xc4e201){const _0x3e2d1b=a114_0x18ae,_0x4539a6=_0xa4a6f8();while(!![]){try{const _0x98a29d=-parseInt(_0x3e2d1b(0x147))/0x1+-parseInt(_0x3e2d1b(0x14d))/0x2*(-parseInt(_0x3e2d1b(0x148))/0x3)+parseInt(_0x3e2d1b(0x159))/0x4*(-parseInt(_0x3e2d1b(0x155))/0x5)+parseInt(_0x3e2d1b(0x151))/0x6*(parseInt(_0x3e2d1b(0x161))/0x7)+-parseInt(_0x3e2d1b(0x15c))/0x8+-parseInt(_0x3e2d1b(0x14e))/0x9*(parseInt(_0x3e2d1b(0x15a))/0xa)+parseInt(_0x3e2d1b(0x14a))/0xb;if(_0x98a29d===_0xc4e201)break;else _0x4539a6['push'](_0x4539a6['shift']());}catch(_0x2b45d2){_0x4539a6['push'](_0x4539a6['shift']());}}}(a114_0x4cf9,0x86c77));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a114_0x4cf9(){const _0x38efc0=['validation','toISOString','hasUpstreamUpdate','length','zipSha256','object','isArray','skillCode','zipSize','version','forkedFromVersion','path','439050aWYFdC','11469YkLAzq','personal','18970017xGAdgY','string','tenantCode','98ZpVXQb','18YyUpsT','fromEntries','map','6XZnEaF','Invalid\x20','description','Runtime\x20Skill\x20is\x20missing\x20skillCode.','5EoXHdp','readonly','skillName','trim','3989904gahXJe','2335010JveoAQ','userId','1701552soOOap','tags','status','utf8','manifest','5294821uFTKvm'];a114_0x4cf9=function(){return _0x38efc0;};return a114_0x4cf9();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a114_0x18ae(_0x1260f1,_0x1947a8){_0x1260f1=_0x1260f1-0x13e;const _0x4cf9d0=a114_0x4cf9();let _0x18ae36=_0x4cf9d0[_0x1260f1];return _0x18ae36;}export function buildMetadata(_0x4d9954,_0xc00183,_0x3de236,_0x38449a,_0x5005bb,_0x23e0c1,_0x1e9ba4){const _0xdbe70d=a114_0x18ae,_0x21fb88=_0x23e0c1?normalizeLocalFiles(_0x23e0c1):[],_0x39fbee=!_0x1e9ba4&&_0x21fb88[_0xdbe70d(0x13e)]>0x0?buildSkillPackage(_0x21fb88):undefined,_0x4f05f4=_0x1e9ba4?bufferSha256(_0x1e9ba4):_0x39fbee?.[_0xdbe70d(0x160)][_0xdbe70d(0x13f)],_0x11f4e8=_0x1e9ba4?.[_0xdbe70d(0x13e)]??_0x39fbee?.[_0xdbe70d(0x160)][_0xdbe70d(0x143)],_0x5b8cbf=_0x21fb88[_0xdbe70d(0x13e)]>0x0?Object[_0xdbe70d(0x14f)](_0x21fb88['map'](_0xd8a9e6=>[_0xd8a9e6['path'],fileHash(_0xd8a9e6)])):undefined;return{'schemaVersion':_0x21fb88[_0xdbe70d(0x13e)]>0x0?0x2:0x1,'id':_0x4d9954['id'],'appCode':_0x3de236,'skillCode':requireSkillCode(_0x4d9954),'skillName':_0x4d9954[_0xdbe70d(0x157)],'description':_0x4d9954[_0xdbe70d(0x153)],'scope':_0xc00183,'readonly':_0xc00183!==_0xdbe70d(0x149)||_0x4d9954[_0xdbe70d(0x156)]===!![],'tenantCode':_0x4d9954[_0xdbe70d(0x14c)],'userId':_0x4d9954[_0xdbe70d(0x15b)],'version':_0x4d9954[_0xdbe70d(0x144)],'status':_0x4d9954[_0xdbe70d(0x15e)],'tags':Array[_0xdbe70d(0x141)](_0x4d9954['tags'])?_0x4d9954[_0xdbe70d(0x15d)]:[],'hasUpstreamUpdate':_0x4d9954[_0xdbe70d(0x164)],'forkedFromSkillId':_0x4d9954['forkedFromSkillId'],'forkedFromVersion':_0x4d9954[_0xdbe70d(0x145)],'sourceSessionId':_0x4d9954['sourceSessionId'],'contentHash':_0x38449a,'fileHashes':_0x5b8cbf,'treeHash':_0x21fb88[_0xdbe70d(0x13e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x21fb88)):undefined,'ossPath':remoteManifestOssPath(_0x4d9954['files']),'zipSha256':_0x4f05f4,'zipSize':_0x11f4e8,'files':_0x21fb88['length']>0x0?_0x21fb88[_0xdbe70d(0x150)](_0x429d55=>({'path':_0x429d55[_0xdbe70d(0x146)],'hash':fileHash(_0x429d55),'size':fileContent(_0x429d55)[_0xdbe70d(0x13e)]})):undefined,'pulledAt':_0x5005bb??new Date()[_0xdbe70d(0x163)]()};}export function requireSkillCode(_0x3bfae6){const _0x23c0fa=a114_0x18ae,_0xc9af2f=_0x3bfae6[_0x23c0fa(0x142)]?.[_0x23c0fa(0x158)]();if(!_0xc9af2f)throw CliErrors[_0x23c0fa(0x162)](_0x23c0fa(0x154));return _0xc9af2f;}export function readMetadataIfPresent(_0xdf9adf){const _0x5a99e3=a114_0x18ae;if(!existsSync(_0xdf9adf))return undefined;try{const _0x24186c=JSON['parse'](readFileSync(_0xdf9adf,_0x5a99e3(0x15f)));return _0x24186c;}catch{throw CliErrors[_0x5a99e3(0x162)](_0x5a99e3(0x152)+METADATA_FILE+':\x20'+_0xdf9adf);}}function remoteManifestOssPath(_0x2cb195){const _0x40dfe0=a114_0x18ae;if(!_0x2cb195||typeof _0x2cb195!==_0x40dfe0(0x140)||Array[_0x40dfe0(0x141)](_0x2cb195))return undefined;const _0x4629b9=_0x2cb195['ossPath'];return typeof _0x4629b9===_0x40dfe0(0x14b)&&_0x4629b9[_0x40dfe0(0x158)]()?_0x4629b9[_0x40dfe0(0x158)]():undefined;}
@@ -1 +1 @@
1
- const a115_0xa2ce94=a115_0x4a8f;(function(_0x2ac975,_0x2388fa){const _0xcedf7c=a115_0x4a8f,_0x5c4591=_0x2ac975();while(!![]){try{const _0x2d97ba=-parseInt(_0xcedf7c(0x11f))/0x1*(-parseInt(_0xcedf7c(0x128))/0x2)+parseInt(_0xcedf7c(0x123))/0x3+-parseInt(_0xcedf7c(0x11c))/0x4*(parseInt(_0xcedf7c(0x11d))/0x5)+-parseInt(_0xcedf7c(0x125))/0x6+parseInt(_0xcedf7c(0x115))/0x7*(-parseInt(_0xcedf7c(0x12b))/0x8)+-parseInt(_0xcedf7c(0x110))/0x9+parseInt(_0xcedf7c(0x11b))/0xa*(parseInt(_0xcedf7c(0x127))/0xb);if(_0x2d97ba===_0x2388fa)break;else _0x5c4591['push'](_0x5c4591['shift']());}catch(_0x185581){_0x5c4591['push'](_0x5c4591['shift']());}}}(a115_0xd24f,0x5f3ba));function a115_0x4a8f(_0x3d3c0e,_0x567474){_0x3d3c0e=_0x3d3c0e-0x110;const _0xd24ffd=a115_0xd24f();let _0x4a8f4c=_0xd24ffd[_0x3d3c0e];return _0x4a8f4c;}import{existsSync}from'node:fs';import{homedir}from'node:os';function a115_0xd24f(){const _0x5eed51=['cache','319hBkAoy','29468dwMohQ','agentsSkillsDir','appCode','4048ohgrvG','1463940buuaWX','trim','SKILL_ROOT','Unsafe\x20','homeDirName','8218yqbXmO','skillCode','claudeSkillsDir','skills','cacheRoot','includes','298840oUYcJK','930996FidLGb','5cEUEkE','CLAUDE_SKILL_ROOT','43JeiBmy','path\x20segment','workbuddySkillsDir','validation','52590xqPNWF','filter','829206RlrNSQ'];a115_0xd24f=function(){return _0x5eed51;};return a115_0xd24f();}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(_0x5de525={}){const _0x1d0387=a115_0x4a8f,_0x5f45cd=_0x5de525['homeDir']??homedir(),_0x2e0654=resolve(_0x5f45cd,PRODUCT_CONFIG[_0x1d0387(0x114)],_0x1d0387(0x126)),_0x46ce44=trimmedEnv(_0x1d0387(0x112)),_0xb631a0=trimmedEnv(_0x1d0387(0x11e)),_0x3f1c17=resolve(_0x5f45cd,'.workbuddy'),_0x34bd3c=_0x5de525[_0x1d0387(0x121)]??(existsSync(_0x3f1c17)?resolve(_0x3f1c17,_0x1d0387(0x118)):undefined);return{'homeDir':_0x5f45cd,'cacheRoot':_0x2e0654,'managedRoot':resolve(_0x5f45cd,PRODUCT_CONFIG[_0x1d0387(0x114)]),'agentsSkillsDir':_0x5de525['agentsSkillsDir']??_0x46ce44??resolve(_0x5f45cd,'.agents','skills'),'claudeSkillsDir':_0x5de525[_0x1d0387(0x117)]??_0xb631a0??resolve(_0x5f45cd,'.claude','skills'),'workbuddySkillsDir':_0x34bd3c};}export function runtimeAgentSkillRoots(_0x4e0631){const _0x38d470=a115_0x4a8f;return[_0x4e0631[_0x38d470(0x129)],_0x4e0631[_0x38d470(0x117)],_0x4e0631[_0x38d470(0x121)]][_0x38d470(0x124)](_0x35b189=>Boolean(_0x35b189));}export function getRuntimeSkillCacheRoot(_0x13cfff,_0x29a037,_0x28b659={}){const _0x5af3d2=a115_0x4a8f,_0x3dcdca=resolveSkillSyncPaths(_0x28b659);return resolve(_0x3dcdca[_0x5af3d2(0x119)],_0x13cfff,fingerprintAccessKey(_0x29a037),_0x5af3d2(0x118));}export function getRuntimeSkillDir(_0x242b3c,_0x314c2d,_0x119ea0,_0x258cbd,_0x98be0e,_0x11e48f={}){const _0x270866=a115_0x4a8f;return resolve(getRuntimeSkillCacheRoot(_0x242b3c,_0x314c2d,_0x11e48f),safePathSegment(_0x119ea0,_0x270866(0x12a)),_0x258cbd,safePathSegment(_0x98be0e,_0x270866(0x116)));}export function safePathSegment(_0x3e66a4,_0x2face3=a115_0xa2ce94(0x120)){const _0x224bb7=a115_0xa2ce94;if(!_0x3e66a4||_0x3e66a4[_0x224bb7(0x11a)]('/')||_0x3e66a4[_0x224bb7(0x11a)]('\x5c')||_0x3e66a4[_0x224bb7(0x11a)]('..'))throw CliErrors[_0x224bb7(0x122)](_0x224bb7(0x113)+_0x2face3+'\x20for\x20local\x20path:\x20'+_0x3e66a4);return _0x3e66a4;}function trimmedEnv(_0x391638){const _0x1eb96b=a115_0xa2ce94,_0x3bd19e=productEnv(_0x391638)?.[_0x1eb96b(0x111)]();return _0x3bd19e?_0x3bd19e:undefined;}
1
+ const a115_0x1058a7=a115_0x4cf4;(function(_0x3c729e,_0xaed8aa){const _0xbb02c2=a115_0x4cf4,_0x4c5c7b=_0x3c729e();while(!![]){try{const _0x42a0d=-parseInt(_0xbb02c2(0x159))/0x1*(parseInt(_0xbb02c2(0x15f))/0x2)+parseInt(_0xbb02c2(0x164))/0x3*(parseInt(_0xbb02c2(0x14c))/0x4)+-parseInt(_0xbb02c2(0x158))/0x5+-parseInt(_0xbb02c2(0x152))/0x6+-parseInt(_0xbb02c2(0x15c))/0x7+-parseInt(_0xbb02c2(0x15d))/0x8+-parseInt(_0xbb02c2(0x15e))/0x9*(-parseInt(_0xbb02c2(0x15a))/0xa);if(_0x42a0d===_0xaed8aa)break;else _0x4c5c7b['push'](_0x4c5c7b['shift']());}catch(_0xc8b7e9){_0x4c5c7b['push'](_0x4c5c7b['shift']());}}}(a115_0x52a0,0x25549));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';function a115_0x4cf4(_0x12fe3f,_0x442290){_0x12fe3f=_0x12fe3f-0x148;const _0x52a032=a115_0x52a0();let _0x4cf41e=_0x52a032[_0x12fe3f];return _0x4cf41e;}import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x210dc2={}){const _0x4b4bcf=a115_0x4cf4,_0x2a095c=_0x210dc2[_0x4b4bcf(0x162)]??homedir(),_0x54923c=resolve(_0x2a095c,PRODUCT_CONFIG[_0x4b4bcf(0x14f)],_0x4b4bcf(0x148)),_0x430765=trimmedEnv(_0x4b4bcf(0x161)),_0x439254=trimmedEnv(_0x4b4bcf(0x14a)),_0x5f4f21=resolve(_0x2a095c,_0x4b4bcf(0x15b)),_0x33ca62=_0x210dc2[_0x4b4bcf(0x151)]??(existsSync(_0x5f4f21)?resolve(_0x5f4f21,'skills'):undefined);return{'homeDir':_0x2a095c,'cacheRoot':_0x54923c,'managedRoot':resolve(_0x2a095c,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x210dc2[_0x4b4bcf(0x149)]??_0x430765??resolve(_0x2a095c,_0x4b4bcf(0x14e),_0x4b4bcf(0x157)),'claudeSkillsDir':_0x210dc2[_0x4b4bcf(0x150)]??_0x439254??resolve(_0x2a095c,'.claude',_0x4b4bcf(0x157)),'workbuddySkillsDir':_0x33ca62};}export function runtimeAgentSkillRoots(_0x5cf11a){const _0xc7b4b4=a115_0x4cf4;return[_0x5cf11a['agentsSkillsDir'],_0x5cf11a[_0xc7b4b4(0x150)],_0x5cf11a['workbuddySkillsDir']][_0xc7b4b4(0x163)](_0x3915c5=>Boolean(_0x3915c5));}export function getRuntimeSkillCacheRoot(_0x4cf3be,_0x2f8bb6,_0x25f9df={}){const _0x11e107=a115_0x4cf4,_0x30adba=resolveSkillSyncPaths(_0x25f9df);return resolve(_0x30adba['cacheRoot'],_0x4cf3be,fingerprintAccessKey(_0x2f8bb6),_0x11e107(0x157));}export function getRuntimeSkillDir(_0x1421df,_0x3a7f34,_0x3df8d1,_0x110465,_0x36c6dc,_0x1a1287={}){const _0x54cdd1=a115_0x4cf4;return resolve(getRuntimeSkillCacheRoot(_0x1421df,_0x3a7f34,_0x1a1287),safePathSegment(_0x3df8d1,_0x54cdd1(0x156)),_0x110465,safePathSegment(_0x36c6dc,_0x54cdd1(0x153)));}function a115_0x52a0(){const _0x8f654b=['workbuddySkillsDir','704868lEDJjc','skillCode','Unsafe\x20','path\x20segment','appCode','skills','1146940EIOpDH','47478sQFZCp','830lCthWC','.workbuddy','1160327xneUPH','2009680JqcWGX','91593ODTMeo','2nabPfi','validation','SKILL_ROOT','homeDir','filter','358587xehhSh','cache','agentsSkillsDir','CLAUDE_SKILL_ROOT','\x20for\x20local\x20path:\x20','4nvZrzH','includes','.agents','homeDirName','claudeSkillsDir'];a115_0x52a0=function(){return _0x8f654b;};return a115_0x52a0();}export function safePathSegment(_0x27b8c0,_0x5c3c29=a115_0x1058a7(0x155)){const _0x4db3f6=a115_0x1058a7;if(!_0x27b8c0||_0x27b8c0[_0x4db3f6(0x14d)]('/')||_0x27b8c0['includes']('\x5c')||_0x27b8c0[_0x4db3f6(0x14d)]('..'))throw CliErrors[_0x4db3f6(0x160)](_0x4db3f6(0x154)+_0x5c3c29+_0x4db3f6(0x14b)+_0x27b8c0);return _0x27b8c0;}function trimmedEnv(_0x1195db){const _0x3f4cbc=productEnv(_0x1195db)?.['trim']();return _0x3f4cbc?_0x3f4cbc:undefined;}
@@ -1 +1 @@
1
- (function(_0x5d94cd,_0x3209d7){const _0x38ece2=a116_0x4ef1,_0xfb8de0=_0x5d94cd();while(!![]){try{const _0x81d5ef=-parseInt(_0x38ece2(0x186))/0x1*(parseInt(_0x38ece2(0x1af))/0x2)+parseInt(_0x38ece2(0x1a3))/0x3*(parseInt(_0x38ece2(0x1a6))/0x4)+-parseInt(_0x38ece2(0x1ad))/0x5+-parseInt(_0x38ece2(0x19c))/0x6+-parseInt(_0x38ece2(0x1b0))/0x7+parseInt(_0x38ece2(0x190))/0x8+parseInt(_0x38ece2(0x18d))/0x9;if(_0x81d5ef===_0x3209d7)break;else _0xfb8de0['push'](_0xfb8de0['shift']());}catch(_0x2d94f3){_0xfb8de0['push'](_0xfb8de0['shift']());}}}(a116_0x5eb8,0xa615c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a116_0x3ee954}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(_0x4a10a2,_0x178ffa,_0x4a6d10={}){const _0x3f3e8d=a116_0x4ef1,_0x2670d0=resolvePushDirectoryRoot(_0x4a10a2),_0x3fffa4=readPushMetadataIfPresent(resolve(_0x2670d0,METADATA_FILE),{'ignoreInvalidMetadata':_0x4a6d10[_0x3f3e8d(0x1b1)]});if(_0x3fffa4?.[_0x3f3e8d(0x185)]&&_0x3fffa4[_0x3f3e8d(0x185)]!==_0x178ffa&&!_0x4a6d10[_0x3f3e8d(0x180)]&&!_0x4a6d10['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x3f3e8d(0x1b5)](_0x3f3e8d(0x1a7)+_0x3fffa4[_0x3f3e8d(0x185)]+_0x3f3e8d(0x1a5)+_0x178ffa+'\x22.');const _0x2fba72=resolvePushSkillCode(_0x2670d0,_0x178ffa,_0x3fffa4,_0x4a6d10);if(!_0x2fba72)throw CliErrors[_0x3f3e8d(0x1b5)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x3f3e8d(0x177));return{'dir':_0x2670d0,'skillCode':_0x2fba72,'metadata':_0x3fffa4};}export function readPushDirectory(_0x5940cc,_0x4251f3,_0xf946a1={}){const _0x52cefe=a116_0x4ef1,_0x4c924b=resolvePushDirectoryIdentity(_0x5940cc,_0x4251f3,_0xf946a1),_0x19f399=_0x4c924b[_0x52cefe(0x198)],_0xad5cee=resolve(_0x19f399,SKILL_FILE);if(!existsSync(_0xad5cee)||!lstatSync(_0xad5cee)[_0x52cefe(0x18e)]())throw CliErrors[_0x52cefe(0x1b5)](_0x52cefe(0x179)+SKILL_FILE+':\x20'+_0xad5cee);const _0x5a87c7=_0x4c924b[_0x52cefe(0x1a2)],_0x130144=_0xf946a1[_0x52cefe(0x1b2)]??'personal';if(!_0xf946a1['ignoreMetadataScope']&&_0x5a87c7?.['scope']===_0x52cefe(0x192))throw CliErrors[_0x52cefe(0x1b5)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5a87c7[_0x52cefe(0x176)]+'\x22.');if(!_0xf946a1[_0x52cefe(0x187)]&&_0x130144===_0x52cefe(0x188)&&_0x5a87c7?.[_0x52cefe(0x176)]&&_0x5a87c7[_0x52cefe(0x176)]!==_0x52cefe(0x188))throw CliErrors['validation'](_0x52cefe(0x19e)+METADATA_FILE+_0x52cefe(0x1aa)+_0x5a87c7[_0x52cefe(0x176)]+'\x22.',_0x52cefe(0x178)+_0x19f399+_0x52cefe(0x19d));const _0x2ca268=scanSkillDirectory(_0x19f399),_0x586fea=buildSkillPackage(_0x2ca268),_0x54afe8=readFileSync(_0xad5cee,_0x52cefe(0x1a8)),_0x53da84=_0x4c924b[_0x52cefe(0x18b)],_0x720293=_0xf946a1['ignoreMetadataForPayload']?undefined:_0x5a87c7,_0x5749a6=readSkillDisplayName(_0x54afe8);return{'skillCode':_0x53da84,'metadata':_0x5a87c7,'frontmatterDisplayName':_0x5749a6,'input':{'skillCode':_0x53da84,'skillName':_0x5749a6??_0x720293?.[_0x52cefe(0x17b)],'description':_0x720293?.['description'],'content':_0x54afe8,'files':_0x586fea[_0x52cefe(0x1b3)],'packageBase64':_0x586fea[_0x52cefe(0x195)],'tags':_0x720293?.[_0x52cefe(0x1ab)],'version':_0x720293?.['version'],'sourceSessionId':_0x720293?.[_0x52cefe(0x191)]}};}function a116_0x4ef1(_0x3ca8fe,_0x22c49e){_0x3ca8fe=_0x3ca8fe-0x175;const _0x5eb8ed=a116_0x5eb8();let _0x4ef117=_0x5eb8ed[_0x3ca8fe];return _0x4ef117;}export function refreshPushDirectoryMetadataFromRemote(_0x3acb95,_0x3e76ce,_0x3bbd66,_0x49893c={}){const _0xde5bba=a116_0x4ef1,_0x51223a=resolvePushDirectoryRoot(_0x3acb95),_0x3674cf=readPushMetadataIfPresent(resolve(_0x51223a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x48d59f=requireRemoteScope(_0x3e76ce),_0x5bb728=readLocalSkillContent(_0x51223a),_0x4a519f={..._0x3e76ce,'appCode':_0x3e76ce['appCode']??_0x3bbd66,'skillName':_0x3e76ce[_0xde5bba(0x17b)]??_0x3674cf?.[_0xde5bba(0x17b)],'description':_0x3e76ce['description']??_0x3674cf?.[_0xde5bba(0x196)],'tags':Array[_0xde5bba(0x175)](_0x3e76ce[_0xde5bba(0x1ab)])?_0x3e76ce[_0xde5bba(0x1ab)]:_0x3674cf?.[_0xde5bba(0x1ab)],'sourceSessionId':_0x3e76ce['sourceSessionId']??_0x3674cf?.[_0xde5bba(0x191)],'content':_0x3e76ce[_0xde5bba(0x181)]??_0x5bb728},_0xb424d9=buildMetadata(_0x4a519f,_0x48d59f,_0x3bbd66,contentHash(_0x5bb728),_0x49893c[_0xde5bba(0x197)]);writeJsonAtomic(resolve(_0x51223a,METADATA_FILE),_0xb424d9);}export function recordPushedRuntimeSkill(_0x593767,_0x22afd1,_0x1a9d2c,_0x432e2b={}){const _0x2e5082=a116_0x4ef1,_0x5aca0f=resolvePushDirectoryRoot(_0x593767),_0x3a2641=scanSkillDirectory(_0x5aca0f),_0x162f3=_0x3a2641[_0x2e5082(0x18a)](_0x1c6a6e=>_0x1c6a6e[_0x2e5082(0x1ac)]===SKILL_FILE),_0x464624=_0x162f3?fileText(_0x162f3):'',_0x1f8e8b=tryNormalizePackageManifest(_0x22afd1[_0x2e5082(0x18f)]),_0x57ed0a={..._0x22afd1,'content':_0x22afd1[_0x2e5082(0x181)]??_0x464624,'files':_0x1f8e8b},_0x46579d=_0x1f8e8b?normalizeLocalFiles(_0x3a2641)[_0x2e5082(0x194)](_0x12c15f=>_0x1f8e8b[_0x2e5082(0x18f)][_0x2e5082(0x17e)](_0x391984=>_0x391984[_0x2e5082(0x1ac)]===_0x12c15f['path'])):undefined,_0x4a6a65=buildMetadata(_0x57ed0a,_0x432e2b[_0x2e5082(0x176)]??_0x2e5082(0x188),_0x1a9d2c,contentHash(_0x57ed0a[_0x2e5082(0x181)]??''),_0x432e2b[_0x2e5082(0x17c)],_0x46579d);writeJsonAtomic(resolve(_0x5aca0f,METADATA_FILE),_0x4a6a65);}export function deriveSkillCodeFromDirectory(_0x56c14f,_0x544879){const _0x4d4d73=a116_0x4ef1,_0xe87b02=basename(resolve(_0x56c14f)),_0x24dbd3=_0x544879+'--';return _0xe87b02[_0x4d4d73(0x19f)](_0x24dbd3)?_0xe87b02[_0x4d4d73(0x193)](_0x24dbd3[_0x4d4d73(0x19b)]):_0xe87b02;}function a116_0x5eb8(){const _0x432e86=['utf8','ignoreMetadataSkillCode','\x20has\x20scope=\x22','tags','path','1724575KoLRkr','object','1233330LmOgHD','341138khFVRo','ignoreInvalidMetadata','targetScope','manifest','company','validation','isArray','scope',',\x20or\x20directory\x20name.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Missing\x20','match','skillName','pushedAt','isDirectory','some','Skill\x20directory\x20not\x20found:\x20','allowAppCodeRetarget','content','isSymbolicLink','name','\x20has\x20unsupported\x20scope\x20\x22','appCode','1vcpSZl','ignoreMetadataScope','personal','replace','find','skillCode','displayName','4196592dDoFif','isFile','files','2408088dFUptA','sourceSessionId','builtin','slice','filter','packageBase64','description','refreshedAt','dir','(unknown)','unknown','length','1876488YshQDZ','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','startsWith','trim','toLowerCase','metadata','3057hIenFd','Invalid\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','4852DHCTHK','Skill\x20metadata\x20appCode\x20\x22'];a116_0x5eb8=function(){return _0x432e86;};return a116_0x5eb8();}function resolvePushSkillCode(_0x2b2cc9,_0xaa8a6,_0x5ad974,_0x521521){const _0xe67d43=a116_0x4ef1,_0x4f233b=deriveSkillCodeFromSkillFile(_0x2b2cc9)||deriveSkillCodeFromDirectory(_0x2b2cc9,_0xaa8a6);if(_0x521521[_0xe67d43(0x1a9)])return _0x4f233b;return _0x5ad974?.[_0xe67d43(0x18b)]?.[_0xe67d43(0x1a0)]()||_0x4f233b;}function deriveSkillCodeFromSkillFile(_0x21fef1){const _0x1eb0fe=a116_0x4ef1,_0xeca6ac=resolve(_0x21fef1,SKILL_FILE);if(!existsSync(_0xeca6ac)||!lstatSync(_0xeca6ac)[_0x1eb0fe(0x18e)]())return undefined;const _0x3f856b=readFileSync(_0xeca6ac,_0x1eb0fe(0x1a8)),_0x19fad2=_0x3f856b[_0x1eb0fe(0x17a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x19fad2)return undefined;const _0x419199=parseFrontmatterObject(_0x19fad2[0x1]??''),_0x257779=scalarToString(_0x419199?.[_0x1eb0fe(0x183)]);return _0x257779?slugifySkillName(_0x257779):undefined;}function readSkillDisplayName(_0x1e7eb1){const _0x497447=a116_0x4ef1,_0x530bd4=_0x1e7eb1[_0x497447(0x17a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x530bd4)return undefined;const _0x43c283=parseFrontmatterObject(_0x530bd4[0x1]??'');return scalarToString(_0x43c283?.[_0x497447(0x18c)]);}function slugifySkillName(_0x4b672a){const _0xae025=a116_0x4ef1,_0x114df0=_0x4b672a['trim']()[_0xae025(0x1a1)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0xae025(0x189)](/-+$/,'')[_0xae025(0x189)](/-{2,}/g,'-');if(!_0x114df0)throw CliErrors[_0xae025(0x1b5)](_0xae025(0x1a4)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x114df0;}function parseFrontmatterObject(_0x5c01a6){const _0x295380=a116_0x4ef1;try{const _0x18db07=a116_0x3ee954(_0x5c01a6);return _0x18db07&&typeof _0x18db07===_0x295380(0x1ae)&&!Array[_0x295380(0x175)](_0x18db07)?_0x18db07:undefined;}catch{return undefined;}}function scalarToString(_0x9f9b41){const _0x89544b=a116_0x4ef1;if(typeof _0x9f9b41==='string')return _0x9f9b41[_0x89544b(0x1a0)]();if(typeof _0x9f9b41==='number'||typeof _0x9f9b41==='boolean')return String(_0x9f9b41);return undefined;}function resolvePushDirectoryRoot(_0x588502){const _0x4a9f80=a116_0x4ef1,_0x350c69=resolve(_0x588502);if(!existsSync(_0x350c69))throw CliErrors[_0x4a9f80(0x1b5)](_0x4a9f80(0x17f)+_0x588502);const _0x22e78c=lstatSync(_0x350c69);if(_0x22e78c[_0x4a9f80(0x17d)]())return _0x350c69;if(_0x22e78c[_0x4a9f80(0x182)]()){const _0x4c7586=realpathSync(_0x350c69);if(lstatSync(_0x4c7586)['isDirectory']())return _0x4c7586;}throw CliErrors[_0x4a9f80(0x1b5)](_0x4a9f80(0x17f)+_0x588502);}function requireRemoteScope(_0xdfc5f7){const _0x45ebc1=a116_0x4ef1;if(_0xdfc5f7[_0x45ebc1(0x176)]===_0x45ebc1(0x188)||_0xdfc5f7[_0x45ebc1(0x176)]===_0x45ebc1(0x1b4)||_0xdfc5f7['scope']===_0x45ebc1(0x192))return _0xdfc5f7[_0x45ebc1(0x176)];throw CliErrors[_0x45ebc1(0x1b5)]('Remote\x20Skill\x20'+(_0xdfc5f7['skillCode']||_0x45ebc1(0x199))+_0x45ebc1(0x184)+(_0xdfc5f7[_0x45ebc1(0x176)]??_0x45ebc1(0x19a))+'\x22.');}function readLocalSkillContent(_0xdfabc){const _0x344dd1=a116_0x4ef1,_0x4834e9=resolve(_0xdfabc,SKILL_FILE);return existsSync(_0x4834e9)&&lstatSync(_0x4834e9)[_0x344dd1(0x18e)]()?readFileSync(_0x4834e9,_0x344dd1(0x1a8)):'';}function readPushMetadataIfPresent(_0x4a01fe,_0x9271fd={}){const _0x5151d3=a116_0x4ef1;try{return readMetadataIfPresent(_0x4a01fe);}catch(_0x382b90){if(_0x9271fd[_0x5151d3(0x1b1)])return undefined;throw _0x382b90;}}
1
+ (function(_0x1d2f6b,_0x5968c4){const _0x4be13b=a116_0x4336,_0x3a5351=_0x1d2f6b();while(!![]){try{const _0xce684f=parseInt(_0x4be13b(0x1b5))/0x1+parseInt(_0x4be13b(0x1cb))/0x2+parseInt(_0x4be13b(0x1ac))/0x3+-parseInt(_0x4be13b(0x1c4))/0x4*(-parseInt(_0x4be13b(0x1cf))/0x5)+parseInt(_0x4be13b(0x1ce))/0x6+parseInt(_0x4be13b(0x1da))/0x7+-parseInt(_0x4be13b(0x1a4))/0x8*(parseInt(_0x4be13b(0x1ae))/0x9);if(_0xce684f===_0x5968c4)break;else _0x3a5351['push'](_0x3a5351['shift']());}catch(_0x127ba9){_0x3a5351['push'](_0x3a5351['shift']());}}}(a116_0x299c,0x33ea4));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a116_0x457c7d}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(_0x2080d6,_0x271172,_0x1174bb={}){const _0x12b8e0=a116_0x4336,_0x181346=resolvePushDirectoryRoot(_0x2080d6),_0x39ce3c=readPushMetadataIfPresent(resolve(_0x181346,METADATA_FILE),{'ignoreInvalidMetadata':_0x1174bb['ignoreInvalidMetadata']});if(_0x39ce3c?.[_0x12b8e0(0x1c6)]&&_0x39ce3c[_0x12b8e0(0x1c6)]!==_0x271172&&!_0x1174bb['allowAppCodeRetarget']&&!_0x1174bb[_0x12b8e0(0x1c3)])throw CliErrors[_0x12b8e0(0x1c2)](_0x12b8e0(0x1d0)+_0x39ce3c[_0x12b8e0(0x1c6)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x271172+'\x22.');const _0x114c71=resolvePushSkillCode(_0x181346,_0x271172,_0x39ce3c,_0x1174bb);if(!_0x114c71)throw CliErrors[_0x12b8e0(0x1c2)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x12b8e0(0x1db));return{'dir':_0x181346,'skillCode':_0x114c71,'metadata':_0x39ce3c};}function a116_0x299c(){const _0x56f37a=['isFile','ignoreMetadataScope','isArray','Skill\x20directory\x20not\x20found:\x20','utf8','filter','105630HYTKGC',',\x20or\x20directory\x20name.','toLowerCase','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','pushedAt','3203192QFQwUZ','skillName','isDirectory','ignoreMetadataSkillCode','\x20has\x20unsupported\x20scope\x20\x22','company','trim','name','607884dXxvdP','boolean','9yHtiAr','startsWith','\x20has\x20scope=\x22','Invalid\x20','targetScope','refreshedAt','length','7601XOwCoc','builtin','personal','files','scope','tags','skillCode','metadata','version','slice','\x20name\x20for\x20SkillHub\x20slug\x20generation.','match','Missing\x20','validation','ignoreMetadataAppCodeMismatch','38908IuLfpx','content','appCode','object','(unknown)','number','sourceSessionId','55066KcYUUK','replace','description','1344078UHifMV','70QUdPoF','Skill\x20metadata\x20appCode\x20\x22','dir','ignoreInvalidMetadata','string'];a116_0x299c=function(){return _0x56f37a;};return a116_0x299c();}function a116_0x4336(_0x234d3d,_0x12a12c){_0x234d3d=_0x234d3d-0x1a4;const _0x299c3d=a116_0x299c();let _0x4336a2=_0x299c3d[_0x234d3d];return _0x4336a2;}export function readPushDirectory(_0xc55c8e,_0x28d93a,_0x18152b={}){const _0x46a2f3=a116_0x4336,_0x5ceccd=resolvePushDirectoryIdentity(_0xc55c8e,_0x28d93a,_0x18152b),_0x276e17=_0x5ceccd[_0x46a2f3(0x1d1)],_0x5b4686=resolve(_0x276e17,SKILL_FILE);if(!existsSync(_0x5b4686)||!lstatSync(_0x5b4686)[_0x46a2f3(0x1d4)]())throw CliErrors[_0x46a2f3(0x1c2)](_0x46a2f3(0x1c1)+SKILL_FILE+':\x20'+_0x5b4686);const _0x5afcef=_0x5ceccd[_0x46a2f3(0x1bc)],_0x5ae260=_0x18152b[_0x46a2f3(0x1b2)]??'personal';if(!_0x18152b[_0x46a2f3(0x1d5)]&&_0x5afcef?.[_0x46a2f3(0x1b9)]===_0x46a2f3(0x1b6))throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x46a2f3(0x1b0)+_0x5afcef[_0x46a2f3(0x1b9)]+'\x22.');if(!_0x18152b[_0x46a2f3(0x1d5)]&&_0x5ae260===_0x46a2f3(0x1b7)&&_0x5afcef?.['scope']&&_0x5afcef[_0x46a2f3(0x1b9)]!==_0x46a2f3(0x1b7))throw CliErrors[_0x46a2f3(0x1c2)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x46a2f3(0x1b0)+_0x5afcef[_0x46a2f3(0x1b9)]+'\x22.',_0x46a2f3(0x1dd)+_0x276e17+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x1287a6=scanSkillDirectory(_0x276e17),_0x298978=buildSkillPackage(_0x1287a6),_0x30352d=readFileSync(_0x5b4686,'utf8'),_0x39cca8=_0x5ceccd[_0x46a2f3(0x1bb)],_0x3a0efe=_0x18152b['ignoreMetadataForPayload']?undefined:_0x5afcef,_0x4087d9=readSkillDisplayName(_0x30352d);return{'skillCode':_0x39cca8,'metadata':_0x5afcef,'frontmatterDisplayName':_0x4087d9,'input':{'skillCode':_0x39cca8,'skillName':_0x4087d9??_0x3a0efe?.[_0x46a2f3(0x1a5)],'description':_0x3a0efe?.[_0x46a2f3(0x1cd)],'content':_0x30352d,'files':_0x298978['manifest'],'packageBase64':_0x298978['packageBase64'],'tags':_0x3a0efe?.[_0x46a2f3(0x1ba)],'version':_0x3a0efe?.[_0x46a2f3(0x1bd)],'sourceSessionId':_0x3a0efe?.[_0x46a2f3(0x1ca)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x4e8157,_0x28c534,_0x1ba07e,_0x305e58={}){const _0x259a8d=a116_0x4336,_0x3d9c9a=resolvePushDirectoryRoot(_0x4e8157),_0x178d97=readPushMetadataIfPresent(resolve(_0x3d9c9a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x31bd46=requireRemoteScope(_0x28c534),_0x100c6d=readLocalSkillContent(_0x3d9c9a),_0x69438e={..._0x28c534,'appCode':_0x28c534[_0x259a8d(0x1c6)]??_0x1ba07e,'skillName':_0x28c534['skillName']??_0x178d97?.['skillName'],'description':_0x28c534['description']??_0x178d97?.[_0x259a8d(0x1cd)],'tags':Array[_0x259a8d(0x1d6)](_0x28c534['tags'])?_0x28c534[_0x259a8d(0x1ba)]:_0x178d97?.[_0x259a8d(0x1ba)],'sourceSessionId':_0x28c534[_0x259a8d(0x1ca)]??_0x178d97?.['sourceSessionId'],'content':_0x28c534[_0x259a8d(0x1c5)]??_0x100c6d},_0x117077=buildMetadata(_0x69438e,_0x31bd46,_0x1ba07e,contentHash(_0x100c6d),_0x305e58[_0x259a8d(0x1b3)]);writeJsonAtomic(resolve(_0x3d9c9a,METADATA_FILE),_0x117077);}export function recordPushedRuntimeSkill(_0x2ff4ca,_0x4056a5,_0x38966a,_0xe636ea={}){const _0x4c4643=a116_0x4336,_0x1b1f46=resolvePushDirectoryRoot(_0x2ff4ca),_0x25993a=scanSkillDirectory(_0x1b1f46),_0x3219d6=_0x25993a['find'](_0x416afe=>_0x416afe['path']===SKILL_FILE),_0x559a9a=_0x3219d6?fileText(_0x3219d6):'',_0x544beb=tryNormalizePackageManifest(_0x4056a5['files']),_0x5791d6={..._0x4056a5,'content':_0x4056a5[_0x4c4643(0x1c5)]??_0x559a9a,'files':_0x544beb},_0x5a3b24=_0x544beb?normalizeLocalFiles(_0x25993a)[_0x4c4643(0x1d9)](_0x5059c0=>_0x544beb[_0x4c4643(0x1b8)]['some'](_0x3b8a43=>_0x3b8a43['path']===_0x5059c0['path'])):undefined,_0x4bf771=buildMetadata(_0x5791d6,_0xe636ea[_0x4c4643(0x1b9)]??_0x4c4643(0x1b7),_0x38966a,contentHash(_0x5791d6[_0x4c4643(0x1c5)]??''),_0xe636ea[_0x4c4643(0x1de)],_0x5a3b24);writeJsonAtomic(resolve(_0x1b1f46,METADATA_FILE),_0x4bf771);}export function deriveSkillCodeFromDirectory(_0x3a55fb,_0x5b63cb){const _0x461701=a116_0x4336,_0x3b5f02=basename(resolve(_0x3a55fb)),_0x2a7b31=_0x5b63cb+'--';return _0x3b5f02[_0x461701(0x1af)](_0x2a7b31)?_0x3b5f02[_0x461701(0x1be)](_0x2a7b31[_0x461701(0x1b4)]):_0x3b5f02;}function resolvePushSkillCode(_0x2a4d11,_0x1b7f69,_0x2f30b4,_0x1efc0b){const _0x2cbcd0=a116_0x4336,_0x7c150d=deriveSkillCodeFromSkillFile(_0x2a4d11)||deriveSkillCodeFromDirectory(_0x2a4d11,_0x1b7f69);if(_0x1efc0b[_0x2cbcd0(0x1a7)])return _0x7c150d;return _0x2f30b4?.[_0x2cbcd0(0x1bb)]?.[_0x2cbcd0(0x1aa)]()||_0x7c150d;}function deriveSkillCodeFromSkillFile(_0x529d73){const _0xe4f993=a116_0x4336,_0x407172=resolve(_0x529d73,SKILL_FILE);if(!existsSync(_0x407172)||!lstatSync(_0x407172)[_0xe4f993(0x1d4)]())return undefined;const _0x17d38f=readFileSync(_0x407172,_0xe4f993(0x1d8)),_0x43fa7b=_0x17d38f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x43fa7b)return undefined;const _0x3e53b4=parseFrontmatterObject(_0x43fa7b[0x1]??''),_0x15955a=scalarToString(_0x3e53b4?.[_0xe4f993(0x1ab)]);return _0x15955a?slugifySkillName(_0x15955a):undefined;}function readSkillDisplayName(_0x383d1e){const _0xd13e05=a116_0x4336,_0x2cb0e9=_0x383d1e[_0xd13e05(0x1c0)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2cb0e9)return undefined;const _0x39d72=parseFrontmatterObject(_0x2cb0e9[0x1]??'');return scalarToString(_0x39d72?.['displayName']);}function slugifySkillName(_0x30165a){const _0x26c649=a116_0x4336,_0x4832e7=_0x30165a[_0x26c649(0x1aa)]()[_0x26c649(0x1dc)]()[_0x26c649(0x1cc)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x26c649(0x1cc)](/^-+/,'')[_0x26c649(0x1cc)](/-+$/,'')[_0x26c649(0x1cc)](/-{2,}/g,'-');if(!_0x4832e7)throw CliErrors[_0x26c649(0x1c2)](_0x26c649(0x1b1)+SKILL_FILE+_0x26c649(0x1bf));return _0x4832e7;}function parseFrontmatterObject(_0x204071){const _0x27c39e=a116_0x4336;try{const _0x371e19=a116_0x457c7d(_0x204071);return _0x371e19&&typeof _0x371e19===_0x27c39e(0x1c7)&&!Array['isArray'](_0x371e19)?_0x371e19:undefined;}catch{return undefined;}}function scalarToString(_0x3da9a5){const _0x2b8f6d=a116_0x4336;if(typeof _0x3da9a5===_0x2b8f6d(0x1d3))return _0x3da9a5[_0x2b8f6d(0x1aa)]();if(typeof _0x3da9a5===_0x2b8f6d(0x1c9)||typeof _0x3da9a5===_0x2b8f6d(0x1ad))return String(_0x3da9a5);return undefined;}function resolvePushDirectoryRoot(_0x720e4b){const _0x1810e0=a116_0x4336,_0x4baf23=resolve(_0x720e4b);if(!existsSync(_0x4baf23))throw CliErrors[_0x1810e0(0x1c2)]('Skill\x20directory\x20not\x20found:\x20'+_0x720e4b);const _0x1764ae=lstatSync(_0x4baf23);if(_0x1764ae[_0x1810e0(0x1a6)]())return _0x4baf23;if(_0x1764ae['isSymbolicLink']()){const _0x313959=realpathSync(_0x4baf23);if(lstatSync(_0x313959)[_0x1810e0(0x1a6)]())return _0x313959;}throw CliErrors[_0x1810e0(0x1c2)](_0x1810e0(0x1d7)+_0x720e4b);}function requireRemoteScope(_0x302c3a){const _0x2868de=a116_0x4336;if(_0x302c3a[_0x2868de(0x1b9)]===_0x2868de(0x1b7)||_0x302c3a['scope']===_0x2868de(0x1a9)||_0x302c3a['scope']===_0x2868de(0x1b6))return _0x302c3a['scope'];throw CliErrors[_0x2868de(0x1c2)]('Remote\x20Skill\x20'+(_0x302c3a[_0x2868de(0x1bb)]||_0x2868de(0x1c8))+_0x2868de(0x1a8)+(_0x302c3a[_0x2868de(0x1b9)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x213a6a){const _0x38ec59=a116_0x4336,_0x42987b=resolve(_0x213a6a,SKILL_FILE);return existsSync(_0x42987b)&&lstatSync(_0x42987b)[_0x38ec59(0x1d4)]()?readFileSync(_0x42987b,_0x38ec59(0x1d8)):'';}function readPushMetadataIfPresent(_0x2c316c,_0x111509={}){const _0x54610a=a116_0x4336;try{return readMetadataIfPresent(_0x2c316c);}catch(_0x393ea3){if(_0x111509[_0x54610a(0x1d2)])return undefined;throw _0x393ea3;}}
@@ -1 +1 @@
1
- function a117_0x4fc7(){const _0x50bdfd=['5twDzSx','validation','company','includes','18046070ZzewBY','910806NrejzX','4733484nqTPPj','personal','builtin','push','2634264CIFOaj','Unsupported\x20runtime\x20Skill\x20scope:\x20','2494896nOAANS','4ZheqSC','7CaJiws','length','707944hyYvUK','987123kCJGuJ'];a117_0x4fc7=function(){return _0x50bdfd;};return a117_0x4fc7();}(function(_0x220663,_0x6d566b){const _0xb7d9de=a117_0x4b30,_0xc1e07e=_0x220663();while(!![]){try{const _0x4ecc1e=-parseInt(_0xb7d9de(0x100))/0x1+-parseInt(_0xb7d9de(0x108))/0x2*(parseInt(_0xb7d9de(0xfa))/0x3)+parseInt(_0xb7d9de(0xf9))/0x4*(parseInt(_0xb7d9de(0xfb))/0x5)+parseInt(_0xb7d9de(0x101))/0x6+-parseInt(_0xb7d9de(0xf7))/0x7*(parseInt(_0xb7d9de(0x107))/0x8)+-parseInt(_0xb7d9de(0x105))/0x9+parseInt(_0xb7d9de(0xff))/0xa;if(_0x4ecc1e===_0x6d566b)break;else _0xc1e07e['push'](_0xc1e07e['shift']());}catch(_0x4f479b){_0xc1e07e['push'](_0xc1e07e['shift']());}}}(a117_0x4fc7,0x91c45));import{CliErrors}from'../../errors.js';function a117_0x4b30(_0x34e0c0,_0x4af482){_0x34e0c0=_0x34e0c0-0xf7;const _0x4fc7b0=a117_0x4fc7();let _0x4b30c0=_0x4fc7b0[_0x34e0c0];return _0x4b30c0;}export function normalizeRuntimeSkillScopes(_0x3e152f){const _0x36e501=a117_0x4b30,_0x17238b=_0x3e152f&&_0x3e152f[_0x36e501(0xf8)]>0x0?_0x3e152f:[_0x36e501(0x102),_0x36e501(0xfd),_0x36e501(0x103)],_0x55e322=[];for(const _0x45ae2c of _0x17238b){if(!isRuntimeSkillScope(_0x45ae2c))throw CliErrors[_0x36e501(0xfc)](_0x36e501(0x106)+_0x45ae2c);!_0x55e322[_0x36e501(0xfe)](_0x45ae2c)&&_0x55e322[_0x36e501(0x104)](_0x45ae2c);}return _0x55e322;}export function isRuntimeSkillScope(_0x5627a5){const _0x40974c=a117_0x4b30;return _0x5627a5===_0x40974c(0x102)||_0x5627a5===_0x40974c(0xfd)||_0x5627a5==='builtin';}
1
+ (function(_0x5022e3,_0x31523a){const _0x1a10e4=a117_0x4f31,_0x228d3f=_0x5022e3();while(!![]){try{const _0x2b837c=parseInt(_0x1a10e4(0x95))/0x1+parseInt(_0x1a10e4(0x94))/0x2+parseInt(_0x1a10e4(0x93))/0x3*(-parseInt(_0x1a10e4(0xa0))/0x4)+-parseInt(_0x1a10e4(0x9c))/0x5+parseInt(_0x1a10e4(0x9b))/0x6+-parseInt(_0x1a10e4(0x9f))/0x7*(-parseInt(_0x1a10e4(0x98))/0x8)+-parseInt(_0x1a10e4(0xa3))/0x9*(-parseInt(_0x1a10e4(0x9d))/0xa);if(_0x2b837c===_0x31523a)break;else _0x228d3f['push'](_0x228d3f['shift']());}catch(_0x185096){_0x228d3f['push'](_0x228d3f['shift']());}}}(a117_0x524d,0x713b7));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x21f7d7){const _0x477a1a=a117_0x4f31,_0x1c185e=_0x21f7d7&&_0x21f7d7[_0x477a1a(0x9e)]>0x0?_0x21f7d7:[_0x477a1a(0x99),_0x477a1a(0xa4),_0x477a1a(0x9a)],_0x5116ed=[];for(const _0x5605de of _0x1c185e){if(!isRuntimeSkillScope(_0x5605de))throw CliErrors[_0x477a1a(0x97)](_0x477a1a(0xa2)+_0x5605de);!_0x5116ed[_0x477a1a(0xa1)](_0x5605de)&&_0x5116ed[_0x477a1a(0x96)](_0x5605de);}return _0x5116ed;}export function isRuntimeSkillScope(_0x447a4a){const _0x695d7=a117_0x4f31;return _0x447a4a===_0x695d7(0x99)||_0x447a4a===_0x695d7(0xa4)||_0x447a4a===_0x695d7(0x9a);}function a117_0x4f31(_0x3fc956,_0x460ea0){_0x3fc956=_0x3fc956-0x93;const _0x524dba=a117_0x524d();let _0x4f31f8=_0x524dba[_0x3fc956];return _0x4f31f8;}function a117_0x524d(){const _0x4531f8=['26272gwmsYb','personal','builtin','1042140qYcMys','2550865oTuMyC','1713110nAnuLz','length','315yWdKfQ','20CCUjBm','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','27NLpmnf','company','344565rIeMPm','1139372scACDJ','143158YPEEKu','push','validation'];a117_0x524d=function(){return _0x4531f8;};return a117_0x524d();}
@@ -1 +1 @@
1
- const a119_0x373b2d=a119_0x6768;(function(_0x52a75c,_0x5693d7){const _0x4098bc=a119_0x6768,_0xf72922=_0x52a75c();while(!![]){try{const _0x5b99c1=-parseInt(_0x4098bc(0xab))/0x1*(-parseInt(_0x4098bc(0xa8))/0x2)+parseInt(_0x4098bc(0xa1))/0x3+parseInt(_0x4098bc(0x9b))/0x4*(parseInt(_0x4098bc(0xa2))/0x5)+parseInt(_0x4098bc(0x9d))/0x6*(parseInt(_0x4098bc(0x9f))/0x7)+-parseInt(_0x4098bc(0x9a))/0x8*(-parseInt(_0x4098bc(0xa3))/0x9)+-parseInt(_0x4098bc(0xaa))/0xa*(parseInt(_0x4098bc(0x9e))/0xb)+-parseInt(_0x4098bc(0x9c))/0xc*(parseInt(_0x4098bc(0xa6))/0xd);if(_0x5b99c1===_0x5693d7)break;else _0xf72922['push'](_0xf72922['shift']());}catch(_0x2ed7e0){_0xf72922['push'](_0xf72922['shift']());}}}(a119_0x26bf,0xa326c));import{unzipSync,zipSync}from'fflate';function a119_0x6768(_0x4b63bd,_0x144e4e){_0x4b63bd=_0x4b63bd-0x99;const _0x26bf4d=a119_0x26bf();let _0x67685d=_0x26bf4d[_0x4b63bd];return _0x67685d;}import{CliErrors}from'../../errors.js';function a119_0x26bf(){const _0x1846df=['from','validation','code','path','validation_error','endsWith','object','8LxhsPW','692088LWShpg','12780Vusrpr','234AIAsSw','46574YXfQQK','147329LWamiA','map','1620198fflgcm','15vVCsLN','786537KMFVaw','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1980-01-01T00:00:00.000Z','10114UzdPov','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','363578NGhhLo','name','1970HFHstH','2oMqGTx'];a119_0x26bf=function(){return _0x1846df;};return a119_0x26bf();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a119_0x373b2d(0xa5));export function createDeterministicZipPackage(_0x31a608){const _0x10b003=a119_0x373b2d,_0x51f91e={};for(const _0x180a08 of normalizeLocalFiles(_0x31a608)){_0x51f91e[_0x180a08[_0x10b003(0xaf)]]=fileContent(_0x180a08);}return Buffer['from'](zipSync(_0x51f91e,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x300d99){const _0x5b2987=a119_0x373b2d;if(_0x300d99['length']<0x16)throw CliErrors[_0x5b2987(0xad)](_0x5b2987(0xa7));let _0x174274;try{_0x174274=unzipSync(_0x300d99,{'filter'(_0x56133e){const _0x3b2c4a=_0x5b2987,_0x36e307=normalizeSkillRelativePath(_0x56133e[_0x3b2c4a(0xa9)]);if(_0x36e307[_0x3b2c4a(0xb1)]('/'))throw CliErrors[_0x3b2c4a(0xad)](_0x3b2c4a(0xa4)+_0x36e307);return!![];}});}catch(_0x424948){if(isRuntimeSkillValidationError(_0x424948))throw _0x424948;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x174274)[_0x5b2987(0xa0)](([_0x2a19f4,_0x5e330e])=>({'path':normalizeSkillRelativePath(_0x2a19f4),'bytes':Buffer[_0x5b2987(0xac)](_0x5e330e)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x34ac98){const _0x5631c1=a119_0x373b2d;return typeof _0x34ac98===_0x5631c1(0x99)&&_0x34ac98!==null&&_0x5631c1(0xae)in _0x34ac98&&_0x34ac98[_0x5631c1(0xae)]===_0x5631c1(0xb0);}
1
+ const a119_0x1e959f=a119_0x5a60;(function(_0x8be4da,_0x28758c){const _0x59c874=a119_0x5a60,_0x391800=_0x8be4da();while(!![]){try{const _0x12b46a=parseInt(_0x59c874(0xcc))/0x1*(-parseInt(_0x59c874(0xce))/0x2)+parseInt(_0x59c874(0xc5))/0x3+-parseInt(_0x59c874(0xd8))/0x4*(parseInt(_0x59c874(0xc6))/0x5)+-parseInt(_0x59c874(0xcd))/0x6+parseInt(_0x59c874(0xc7))/0x7*(-parseInt(_0x59c874(0xd0))/0x8)+-parseInt(_0x59c874(0xd2))/0x9*(parseInt(_0x59c874(0xc8))/0xa)+parseInt(_0x59c874(0xcf))/0xb*(parseInt(_0x59c874(0xd4))/0xc);if(_0x12b46a===_0x28758c)break;else _0x391800['push'](_0x391800['shift']());}catch(_0x2c9c31){_0x391800['push'](_0x391800['shift']());}}}(a119_0x4d0b,0x65c34));function a119_0x5a60(_0xaa908c,_0x1854cf){_0xaa908c=_0xaa908c-0xc3;const _0x4d0bcd=a119_0x4d0b();let _0x5a60ba=_0x4d0bcd[_0xaa908c];return _0x5a60ba;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a119_0x4d0b(){const _0x4e0447=['map','3iYKdaP','3450696uTioPi','442322xBeUgX','11tIhUhg','928zGeDAt','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','144sfrojf','validation_error','28133088TsGCMt','validation','length','code','3172rFticU','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','name','from','1321344bmqbNn','4765eEAPkj','10297NAgKBo','126930wTQYJU','path','1980-01-01T00:00:00.000Z'];a119_0x4d0b=function(){return _0x4e0447;};return a119_0x4d0b();}const ZIP_MTIME=new Date(a119_0x1e959f(0xca));export function createDeterministicZipPackage(_0x65f6c5){const _0x10b147=a119_0x1e959f,_0x266dc8={};for(const _0x2afe8f of normalizeLocalFiles(_0x65f6c5)){_0x266dc8[_0x2afe8f[_0x10b147(0xc9)]]=fileContent(_0x2afe8f);}return Buffer[_0x10b147(0xc4)](zipSync(_0x266dc8,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x204714){const _0x45e07f=a119_0x1e959f;if(_0x204714[_0x45e07f(0xd6)]<0x16)throw CliErrors['validation'](_0x45e07f(0xd9));let _0x2fd1ca;try{_0x2fd1ca=unzipSync(_0x204714,{'filter'(_0x1d61ec){const _0x364f26=_0x45e07f,_0x3747b9=normalizeSkillRelativePath(_0x1d61ec[_0x364f26(0xc3)]);if(_0x3747b9['endsWith']('/'))throw CliErrors[_0x364f26(0xd5)](_0x364f26(0xd1)+_0x3747b9);return!![];}});}catch(_0x41cba4){if(isRuntimeSkillValidationError(_0x41cba4))throw _0x41cba4;throw CliErrors[_0x45e07f(0xd5)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x2fd1ca)[_0x45e07f(0xcb)](([_0x2f6bfa,_0x17545f])=>({'path':normalizeSkillRelativePath(_0x2f6bfa),'bytes':Buffer[_0x45e07f(0xc4)](_0x17545f)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x6a8b4c){const _0x206cf0=a119_0x1e959f;return typeof _0x6a8b4c==='object'&&_0x6a8b4c!==null&&_0x206cf0(0xd7)in _0x6a8b4c&&_0x6a8b4c['code']===_0x206cf0(0xd3);}