@lovrabet/lovrabet-cli 2.1.16-beta.2 → 2.1.16

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 (120) 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/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/function-name-adapter.js +1 -1
  41. package/lib/commands/service/index.js +1 -1
  42. package/lib/commands/service/registry.js +1 -1
  43. package/lib/commands/skill/commands/create.js +1 -1
  44. package/lib/commands/skill/commands/install.js +1 -1
  45. package/lib/commands/skill/commands/list.js +1 -1
  46. package/lib/commands/skill/commands/push.js +1 -1
  47. package/lib/commands/skill/commands/validate.js +1 -1
  48. package/lib/commands/skill/flags.js +1 -1
  49. package/lib/commands/skill/index.js +1 -1
  50. package/lib/commands/skill/manifest-helpers.js +1 -1
  51. package/lib/commands/skill/push-execute.js +1 -1
  52. package/lib/commands/skill/push-flow-helpers.js +1 -1
  53. package/lib/commands/skill/push-retarget.js +1 -1
  54. package/lib/commands/skill/scopes.js +1 -1
  55. package/lib/commands/skill/summary.js +1 -1
  56. package/lib/commands/skill/templates.js +1 -1
  57. package/lib/commands/skill/validate.js +1 -1
  58. package/lib/commands/sql/detail.js +1 -1
  59. package/lib/commands/sql/exec.js +1 -1
  60. package/lib/commands/sql/index.js +1 -1
  61. package/lib/commands/update.js +1 -1
  62. package/lib/commands/workspace/index.js +1 -1
  63. package/lib/config/schema.js +1 -1
  64. package/lib/constant/app.js +1 -1
  65. package/lib/constant/auth-mode.js +1 -1
  66. package/lib/constant/cli.js +1 -1
  67. package/lib/constant/defaults.js +1 -1
  68. package/lib/constant/distribution.js +1 -1
  69. package/lib/constant/domain.js +1 -1
  70. package/lib/constant/env.js +1 -1
  71. package/lib/constant/output.js +1 -1
  72. package/lib/constant/product.js +1 -1
  73. package/lib/constant/risk.js +1 -1
  74. package/lib/constant/url.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/api-client.js +1 -1
  77. package/lib/core/db-resolver.js +1 -1
  78. package/lib/core/sdk-client.js +1 -1
  79. package/lib/errors.js +1 -1
  80. package/lib/framework/build-all-flags.js +1 -1
  81. package/lib/framework/dryrun.js +1 -1
  82. package/lib/framework/flags.js +1 -1
  83. package/lib/framework/help.js +1 -1
  84. package/lib/framework/index.js +1 -1
  85. package/lib/framework/output.js +1 -1
  86. package/lib/framework/preparse.js +1 -1
  87. package/lib/framework/rate-limit.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/lossless-json.js +1 -1
  115. package/lib/utils/params.js +1 -1
  116. package/lib/utils/platform.js +1 -1
  117. package/lib/utils/update-notice.js +1 -1
  118. package/lib/utils/version.js +1 -1
  119. package/lib/utils/write-cli-side-channel.js +1 -1
  120. package/package.json +1 -1
@@ -1 +1 @@
1
- function a87_0x480c(_0x787252,_0x238328){_0x787252=_0x787252-0xe1;var _0x30df0a=a87_0x30df();var _0x480cb9=_0x30df0a[_0x787252];return _0x480cb9;}function a87_0x30df(){var _0x1a726a=['54057QXQuyr','940076GvZNtC','912150zqlvLU','18vQKlrO','791996pqHoeu','107659hWBQLh','7180864ynycsh','1974196hUwhLA'];a87_0x30df=function(){return _0x1a726a;};return a87_0x30df();}(function(_0x5d2d6e,_0x35029d){var _0x2e290a=a87_0x480c,_0x87b16a=_0x5d2d6e();while(!![]){try{var _0x89c8f=-parseInt(_0x2e290a(0xe6))/0x1+-parseInt(_0x2e290a(0xe2))/0x2+-parseInt(_0x2e290a(0xe1))/0x3+-parseInt(_0x2e290a(0xe5))/0x4+parseInt(_0x2e290a(0xe3))/0x5*(parseInt(_0x2e290a(0xe4))/0x6)+-parseInt(_0x2e290a(0xe8))/0x7+parseInt(_0x2e290a(0xe7))/0x8;if(_0x89c8f===_0x35029d)break;else _0x87b16a['push'](_0x87b16a['shift']());}catch(_0xeb0da3){_0x87b16a['push'](_0x87b16a['shift']());}}}(a87_0x30df,0x5a203));export{extractList,extractPaging}from'@lovrabet/cli-framework';
1
+ function a87_0x3e35(){var _0x311dc6=['1213032vwCvwE','774297aqkxXi','605255GEgwoP','16yCCPgE','216025AtYWDZ','511KWOQuZ','39714lukDtv','579258cOyGuK','267770OeqHnP'];a87_0x3e35=function(){return _0x311dc6;};return a87_0x3e35();}function a87_0x4244(_0x33a3d4,_0x584990){_0x33a3d4=_0x33a3d4-0x10e;var _0x3e35eb=a87_0x3e35();var _0x424466=_0x3e35eb[_0x33a3d4];return _0x424466;}(function(_0x16fdb0,_0x5a0c2f){var _0x35addb=a87_0x4244,_0x2004e1=_0x16fdb0();while(!![]){try{var _0x252215=parseInt(_0x35addb(0x110))/0x1+-parseInt(_0x35addb(0x114))/0x2+parseInt(_0x35addb(0x116))/0x3+parseInt(_0x35addb(0x10f))/0x4*(parseInt(_0x35addb(0x10e))/0x5)+-parseInt(_0x35addb(0x112))/0x6*(parseInt(_0x35addb(0x111))/0x7)+-parseInt(_0x35addb(0x115))/0x8+parseInt(_0x35addb(0x113))/0x9;if(_0x252215===_0x5a0c2f)break;else _0x2004e1['push'](_0x2004e1['shift']());}catch(_0x2d4d6a){_0x2004e1['push'](_0x2004e1['shift']());}}}(a87_0x3e35,0x3e025));export{extractList,extractPaging}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- (function(_0x3a0323,_0x2d3a3c){const _0x200116=a88_0x3880,_0x592502=_0x3a0323();while(!![]){try{const _0x5d4e65=-parseInt(_0x200116(0x7f))/0x1+-parseInt(_0x200116(0x77))/0x2*(-parseInt(_0x200116(0x6f))/0x3)+-parseInt(_0x200116(0x6a))/0x4*(parseInt(_0x200116(0x7c))/0x5)+-parseInt(_0x200116(0x6b))/0x6+-parseInt(_0x200116(0x69))/0x7+parseInt(_0x200116(0x7d))/0x8+parseInt(_0x200116(0x67))/0x9;if(_0x5d4e65===_0x2d3a3c)break;else _0x592502['push'](_0x592502['shift']());}catch(_0x1d3075){_0x592502['push'](_0x592502['shift']());}}}(a88_0x1f98,0x5156a));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x3aab50,_0x2d3431,_0x2b15f8){const _0x1a62a4=a88_0x3880,_0x2225b4=buildConfirmationContext(_0x3aab50,_0x2d3431,_0x2b15f8),_0x17680d=[_0x1a62a4(0x81)+_0x2225b4[_0x1a62a4(0x7a)]];return _0x2225b4['description']&&_0x17680d[_0x1a62a4(0x76)](_0x1a62a4(0x72)+_0x2225b4['description']),_0x2225b4[_0x1a62a4(0x73)]&&_0x17680d[_0x1a62a4(0x76)](_0x1a62a4(0x7e)+_0x2225b4['affectedRecords']),_0x17680d[_0x1a62a4(0x76)](_0x1a62a4(0x6c)),_0x17680d;}export function reconstructCommandArgv(_0x49a83c,_0xf10a77){const _0x242f21=a88_0x3880,_0x16f93d=[CLI_BIN_NAME,_0x49a83c[_0x242f21(0x71)],_0x49a83c['command']];for(const [_0x119fd7,_0x1b0795]of Object[_0x242f21(0x80)](_0xf10a77)){if(_0x1b0795===!![])_0x16f93d[_0x242f21(0x76)]('--'+_0x119fd7);else _0x1b0795!==![]&&_0x1b0795!==undefined&&_0x1b0795!==''&&_0x16f93d[_0x242f21(0x76)]('--'+_0x119fd7+'\x20'+JSON['stringify'](_0x1b0795));}return _0x16f93d['push'](_0x242f21(0x70)),_0x16f93d[_0x242f21(0x79)]('\x20');}function a88_0x3880(_0x5de5ee,_0x49f3f1){_0x5de5ee=_0x5de5ee-0x67;const _0x1f98a1=a88_0x1f98();let _0x388099=_0x1f98a1[_0x5de5ee];return _0x388099;}function buildConfirmationContext(_0x15b288,_0x59da20,_0x3b2176){const _0x488457=a88_0x3880,_0x342ffc=extractAffectedRecords(_0x3b2176);return{'commandLabel':_0x59da20,'description':_0x15b288[_0x488457(0x74)],'affectedRecords':_0x342ffc};}function a88_0x1f98(){const _0xf79832=['3265VCGsSw','3481736EPmqIB','\x20\x20\x20Affected:\x20','429169rbkmQW','entries','⚠\x20\x20High-risk\x20operation:\x20','4920084meQvLe','id=','1785714AzLvZm','356LvvKhA','363378TGrugk','\x20\x20\x20Continue?\x20[y/N]\x20','params=','code','21030LMXFOG','--yes','service','\x20\x20\x20','affectedRecords','description','length','push','44CvUWlb','code=','join','commandLabel','params'];a88_0x1f98=function(){return _0xf79832;};return a88_0x1f98();}function extractAffectedRecords(_0x3be265){const _0x152382=a88_0x3880,_0x4b9e98=[];if(_0x3be265[_0x152382(0x6e)])_0x4b9e98['push'](_0x152382(0x78)+_0x3be265[_0x152382(0x6e)]);if(_0x3be265['id'])_0x4b9e98[_0x152382(0x76)](_0x152382(0x68)+_0x3be265['id']);if(_0x3be265['name'])_0x4b9e98[_0x152382(0x76)]('name='+_0x3be265['name']);if(_0x3be265[_0x152382(0x7b)])_0x4b9e98[_0x152382(0x76)](_0x152382(0x6d)+_0x3be265[_0x152382(0x7b)]);return _0x4b9e98[_0x152382(0x75)]>0x0?_0x4b9e98['join'](',\x20'):undefined;}
1
+ (function(_0x3358e7,_0x8a5f2c){const _0x1a4395=a88_0x48e9,_0x2b091c=_0x3358e7();while(!![]){try{const _0x5525e6=parseInt(_0x1a4395(0x104))/0x1*(parseInt(_0x1a4395(0xf6))/0x2)+parseInt(_0x1a4395(0xfe))/0x3+parseInt(_0x1a4395(0xfc))/0x4*(parseInt(_0x1a4395(0xf5))/0x5)+parseInt(_0x1a4395(0xf1))/0x6+-parseInt(_0x1a4395(0xfd))/0x7*(parseInt(_0x1a4395(0xf2))/0x8)+-parseInt(_0x1a4395(0xf0))/0x9+-parseInt(_0x1a4395(0x105))/0xa*(parseInt(_0x1a4395(0xf9))/0xb);if(_0x5525e6===_0x8a5f2c)break;else _0x2b091c['push'](_0x2b091c['shift']());}catch(_0x458db4){_0x2b091c['push'](_0x2b091c['shift']());}}}(a88_0x412d,0x2cb5f));function a88_0x48e9(_0x3295ee,_0x1c8d0b){_0x3295ee=_0x3295ee-0xee;const _0x412d88=a88_0x412d();let _0x48e984=_0x412d88[_0x3295ee];return _0x48e984;}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x6a86b,_0x10a97b,_0x20134f){const _0x3f445f=a88_0x48e9,_0x46bdf4=buildConfirmationContext(_0x6a86b,_0x10a97b,_0x20134f),_0x27b871=[_0x3f445f(0xfa)+_0x46bdf4['commandLabel']];return _0x46bdf4[_0x3f445f(0xfb)]&&_0x27b871['push']('\x20\x20\x20'+_0x46bdf4['description']),_0x46bdf4['affectedRecords']&&_0x27b871[_0x3f445f(0xef)](_0x3f445f(0x107)+_0x46bdf4[_0x3f445f(0x100)]),_0x27b871[_0x3f445f(0xef)]('\x20\x20\x20Continue?\x20[y/N]\x20'),_0x27b871;}function a88_0x412d(){const _0x568099=['join','\x20\x20\x20Affected:\x20','code','push','3148425jlRXvM','1262286VVJYfu','8VfnsSQ','--yes','id=','25415eErwPG','329306pfYSEy','name=','service','22RBvEnD','⚠\x20\x20High-risk\x20operation:\x20','description','36ulWgPj','427931foHMnZ','276291YcDVRZ','entries','affectedRecords','name','command','params=','2eYxqFG','417190KNWrgt'];a88_0x412d=function(){return _0x568099;};return a88_0x412d();}export function reconstructCommandArgv(_0x8f4d12,_0x181b82){const _0x1d222e=a88_0x48e9,_0x352de5=[CLI_BIN_NAME,_0x8f4d12[_0x1d222e(0xf8)],_0x8f4d12[_0x1d222e(0x102)]];for(const [_0xf94279,_0x2e996f]of Object[_0x1d222e(0xff)](_0x181b82)){if(_0x2e996f===!![])_0x352de5['push']('--'+_0xf94279);else _0x2e996f!==![]&&_0x2e996f!==undefined&&_0x2e996f!==''&&_0x352de5[_0x1d222e(0xef)]('--'+_0xf94279+'\x20'+JSON['stringify'](_0x2e996f));}return _0x352de5[_0x1d222e(0xef)](_0x1d222e(0xf3)),_0x352de5['join']('\x20');}function buildConfirmationContext(_0x8f0589,_0x560591,_0x56774a){const _0x9c1d26=a88_0x48e9,_0x5cf85d=extractAffectedRecords(_0x56774a);return{'commandLabel':_0x560591,'description':_0x8f0589[_0x9c1d26(0xfb)],'affectedRecords':_0x5cf85d};}function extractAffectedRecords(_0x516bae){const _0xdcc810=a88_0x48e9,_0xe8790c=[];if(_0x516bae[_0xdcc810(0xee)])_0xe8790c[_0xdcc810(0xef)]('code='+_0x516bae['code']);if(_0x516bae['id'])_0xe8790c['push'](_0xdcc810(0xf4)+_0x516bae['id']);if(_0x516bae[_0xdcc810(0x101)])_0xe8790c['push'](_0xdcc810(0xf7)+_0x516bae['name']);if(_0x516bae['params'])_0xe8790c[_0xdcc810(0xef)](_0xdcc810(0x103)+_0x516bae['params']);return _0xe8790c['length']>0x0?_0xe8790c[_0xdcc810(0x106)](',\x20'):undefined;}
@@ -1 +1 @@
1
- (function(_0x54e21d,_0x4f0df0){const _0x4e0b50=a89_0x5659,_0x539294=_0x54e21d();while(!![]){try{const _0x26d263=-parseInt(_0x4e0b50(0xa9))/0x1*(-parseInt(_0x4e0b50(0xb4))/0x2)+-parseInt(_0x4e0b50(0xad))/0x3+parseInt(_0x4e0b50(0xb5))/0x4*(-parseInt(_0x4e0b50(0xb2))/0x5)+-parseInt(_0x4e0b50(0xa4))/0x6+-parseInt(_0x4e0b50(0xb6))/0x7*(-parseInt(_0x4e0b50(0xb1))/0x8)+parseInt(_0x4e0b50(0xa7))/0x9+parseInt(_0x4e0b50(0xaa))/0xa;if(_0x26d263===_0x4f0df0)break;else _0x539294['push'](_0x539294['shift']());}catch(_0x1d997f){_0x539294['push'](_0x539294['shift']());}}}(a89_0x22a6,0x7eedd));function a89_0x5659(_0x58c723,_0x37be53){_0x58c723=_0x58c723-0xa4;const _0x22a6f8=a89_0x22a6();let _0x5659ec=_0x22a6f8[_0x58c723];return _0x5659ec;}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a89_0x22a6(){const _0x233487=['status','trim','3483216UMgPDr','4582475UQltiZ','message','118kClcQf','4FdmpzX','7mmPyac','1138086zquMTA','response','stringify','2373912pMgDTz','description','2636HFHoVH','12403440PKBUPG','code','string','1406883ZwaIoC','validation'];a89_0x22a6=function(){return _0x233487;};return a89_0x22a6();}export function mapUserFacingExecuteError(_0x3c16dc){const _0x29afcb=a89_0x5659;if(_0x3c16dc instanceof LovrabetError){const _0xd3a02f=userFacingLovrabetMessage(_0x3c16dc),_0x50495c=_0x3c16dc,_0x57998a=createRateLimitError({'status':_0x50495c[_0x29afcb(0xaf)],'errorCode':_0x50495c[_0x29afcb(0xab)],'message':_0xd3a02f,'retryAfter':readRetryAfter(_0x50495c[_0x29afcb(0xa5)]?.['headers'])??readRetryAfterSeconds(_0x50495c[_0x29afcb(0xa5)])});return _0x57998a??CliErrors[_0x29afcb(0xae)](_0xd3a02f);}return _0x3c16dc;}function userFacingLovrabetMessage(_0xaf44f1){const _0x1bfd93=a89_0x5659,_0x1af396=_0xaf44f1[_0x1bfd93(0xa8)];if(_0x1af396!==undefined&&_0x1af396!==null){if(typeof _0x1af396===_0x1bfd93(0xac)&&_0x1af396[_0x1bfd93(0xb0)]())return _0x1af396[_0x1bfd93(0xb0)]();try{return JSON[_0x1bfd93(0xa6)](_0x1af396);}catch{}}return _0xaf44f1[_0x1bfd93(0xb3)];}
1
+ (function(_0x5c41ba,_0x117aa8){const _0x197a86=a89_0x4a71,_0x553a5f=_0x5c41ba();while(!![]){try{const _0x57dc03=-parseInt(_0x197a86(0x176))/0x1+parseInt(_0x197a86(0x167))/0x2*(parseInt(_0x197a86(0x16d))/0x3)+parseInt(_0x197a86(0x16a))/0x4*(-parseInt(_0x197a86(0x171))/0x5)+parseInt(_0x197a86(0x174))/0x6+-parseInt(_0x197a86(0x16f))/0x7+parseInt(_0x197a86(0x16c))/0x8+parseInt(_0x197a86(0x172))/0x9;if(_0x57dc03===_0x117aa8)break;else _0x553a5f['push'](_0x553a5f['shift']());}catch(_0x5df323){_0x553a5f['push'](_0x553a5f['shift']());}}}(a89_0x1c56,0xec5c6));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a89_0x1c56(){const _0x2877da=['5656014RylFKq','string','1263894tOgeMj','trim','10NPyXJz','message','validation','4724pGfBiY','response','7667824fceVBH','885723xKNNQS','status','12909120nTdzRw','stringify','3915MrSTso','14612031UiJhqu','description'];a89_0x1c56=function(){return _0x2877da;};return a89_0x1c56();}export function mapUserFacingExecuteError(_0x436a51){const _0x2a2e47=a89_0x4a71;if(_0x436a51 instanceof LovrabetError){const _0x36e999=userFacingLovrabetMessage(_0x436a51),_0xcf0327=_0x436a51,_0x1abd20=createRateLimitError({'status':_0xcf0327[_0x2a2e47(0x16e)],'errorCode':_0xcf0327['code'],'message':_0x36e999,'retryAfter':readRetryAfter(_0xcf0327[_0x2a2e47(0x16b)]?.['headers'])??readRetryAfterSeconds(_0xcf0327[_0x2a2e47(0x16b)])});return _0x1abd20??CliErrors[_0x2a2e47(0x169)](_0x36e999);}return _0x436a51;}function a89_0x4a71(_0x5dd2f9,_0xe3f19e){_0x5dd2f9=_0x5dd2f9-0x166;const _0x1c562e=a89_0x1c56();let _0x4a7133=_0x1c562e[_0x5dd2f9];return _0x4a7133;}function userFacingLovrabetMessage(_0x5550cb){const _0x48c880=a89_0x4a71,_0xda1f3d=_0x5550cb[_0x48c880(0x173)];if(_0xda1f3d!==undefined&&_0xda1f3d!==null){if(typeof _0xda1f3d===_0x48c880(0x175)&&_0xda1f3d['trim']())return _0xda1f3d[_0x48c880(0x166)]();try{return JSON[_0x48c880(0x170)](_0xda1f3d);}catch{}}return _0x5550cb[_0x48c880(0x168)];}
@@ -1 +1 @@
1
- const a90_0x15d0f2=a90_0x4d7c;(function(_0x599efa,_0x4898de){const _0x5d269c=a90_0x4d7c,_0x547973=_0x599efa();while(!![]){try{const _0x437658=parseInt(_0x5d269c(0x19c))/0x1*(-parseInt(_0x5d269c(0x1c1))/0x2)+parseInt(_0x5d269c(0x1aa))/0x3*(parseInt(_0x5d269c(0x1b8))/0x4)+-parseInt(_0x5d269c(0x19b))/0x5+parseInt(_0x5d269c(0x1bf))/0x6+-parseInt(_0x5d269c(0x1b3))/0x7+-parseInt(_0x5d269c(0x192))/0x8+parseInt(_0x5d269c(0x1b4))/0x9;if(_0x437658===_0x4898de)break;else _0x547973['push'](_0x547973['shift']());}catch(_0x3739a9){_0x547973['push'](_0x547973['shift']());}}}(a90_0x4b19,0x34773));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x3647d3){const _0x4fa8fb=a90_0x4d7c;return void _0x3647d3,AUTH_MODE[_0x4fa8fb(0x1b9)];}let sdkClientInitialized=![];function a90_0x4d7c(_0x21334c,_0x1f89cf){_0x21334c=_0x21334c-0x18a;const _0x4b19a7=a90_0x4b19();let _0x4d7cb6=_0x4b19a7[_0x21334c];return _0x4d7cb6;}export function createPipelineEnv(_0x2228e1,_0xd12d96){const _0x4c620b=a90_0x4d7c,_0x5bb03f=typeof _0xd12d96[_0x4c620b(0x1b7)]===_0x4c620b(0x1ba)&&_0xd12d96[_0x4c620b(0x1b7)][_0x4c620b(0x19d)]();return{'rawFlags':_0xd12d96,'appCode':_0x2228e1[_0x4c620b(0x1ae)]||productEnv('APPCODE')||(_0x5bb03f?undefined:readAppCodeFromConfig()),'appCodeSource':_0x2228e1['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0xd12d96),'defaultFormat':_0x2228e1[_0x4c620b(0x1a8)],'defaultPageSize':_0x2228e1['pageSize'],'defaultVerbose':_0x2228e1[_0x4c620b(0x198)],'riskLevel':_0x2228e1['riskLevel'],'accessKey':_0x2228e1['accessKey'],'env':_0x2228e1[_0x4c620b(0x1af)],'mergedCli':{'defaultApp':_0x2228e1[_0x4c620b(0x1be)],'currentApp':_0x2228e1[_0x4c620b(0x1b1)],'appCode':_0x2228e1[_0x4c620b(0x1ae)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x15d0f2(0x1c6)](_0x2e1f45=>PIPELINE_FLAG_NAMES[a90_0x15d0f2(0x193)](_0x2e1f45[a90_0x15d0f2(0x1a2)]))[a90_0x15d0f2(0x18e)](({name:_0x262f01,type:_0x4c560c,description:_0x45e180})=>({'name':_0x262f01,'type':_0x4c560c,'description':_0x45e180})),'formatOutput':formatOutput,'getCommandLabel'(_0x304a03){const _0x3ebc7f=a90_0x15d0f2;return CLI_BIN_NAME+'\x20'+_0x304a03['service']+'\x20'+_0x304a03[_0x3ebc7f(0x1bb)];},'riskPolicy':{'onViolation'(_0x43fcb8){const _0x5e5e19=a90_0x15d0f2;console[_0x5e5e19(0x1ad)](_0x43fcb8);},'createError'(_0x298304){const _0x4292b9=a90_0x15d0f2;return CliErrors[_0x4292b9(0x1b5)](_0x298304);}},async 'prepare'(_0xe24764,_0x2c9a50){const _0x54716d=a90_0x15d0f2,_0x588b20=resolveAuthMode(_0x2c9a50);if(_0xe24764['requiresAuth']!==![]){if(!_0x2c9a50[_0x54716d(0x1b2)])throw CliErrors['authRequired'](_0x54716d(0x1bc)+PRODUCT_CONFIG[_0x54716d(0x1b6)]+_0x54716d(0x18b)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0xc27d1f}=await import(_0x54716d(0x191));_0xc27d1f(_0x2c9a50[_0x54716d(0x1b2)]);}let _0x4080ac='';if(_0xe24764[_0x54716d(0x19e)]!==![]){_0x4080ac=_0x2c9a50['appCode']??'',_0x4080ac=await resolveExplicitAppName(_0xe24764,_0x2c9a50,_0x4080ac);if(!_0x4080ac){await assertSelectedAppNameIsRuntimeAccessible(_0xe24764,_0x2c9a50);throw CliErrors[_0x54716d(0x18c)](_0x54716d(0x1c5)+PRODUCT_CONFIG[_0x54716d(0x1b6)]+'.');}await assertAppCodeIsRuntimeAccessible(_0xe24764,_0x2c9a50,_0x4080ac);}if(_0x4080ac){const {initSdkClient:_0x39bbcd}=await import(_0x54716d(0x1a3));_0x39bbcd({'appCode':_0x4080ac,'env':_0x2c9a50[_0x54716d(0x1af)]??'production','accessKey':_0x2c9a50[_0x54716d(0x1b2)],'authMode':_0x588b20}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2c9a50['defaultVerbose']},'numbers':{'pagesize':_0x2c9a50[_0x54716d(0x18f)]}},'extras':{'appCode':_0x4080ac,'cookie':'','apiDomain':_0x2c9a50[_0x54716d(0x1a0)],'apiDir':'','accessKey':_0x2c9a50[_0x54716d(0x1b2)],'envName':_0x2c9a50[_0x54716d(0x1af)],'mergedCli':_0x2c9a50[_0x54716d(0x19a)]}};},async 'confirmHighRisk'({def:_0x3a83b5,env:_0x2c1189,flags:_0x32fbac,commandLabel:_0x9d9bcc}){const _0x137525=a90_0x15d0f2;if(_0x2c1189[_0x137525(0x190)]){const _0x593bc2=reconstructCommandArgv(_0x3a83b5,_0x32fbac);throw CliErrors[_0x137525(0x194)](_0x137525(0x1b0)+_0x9d9bcc+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x137525(0x1bd)+_0x593bc2));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3a83b5,_0x9d9bcc,_0x32fbac),'createCancelledError':_0x54a166=>CliErrors['cancelled'](_0x54a166)});},'mapDryRunError'(_0x14ceb7){return mapUserFacingExecuteError(_0x14ceb7);},'mapExecuteError'(_0x3e294f){return mapUserFacingExecuteError(_0x3e294f);},async 'finalize'(){const _0x5d42cd=a90_0x15d0f2;try{if(sdkClientInitialized){const {clearSdkClient:_0x195b4e}=await import('../core/sdk-client.js');_0x195b4e();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x110f22}=await import(_0x5d42cd(0x191));_0x110f22();}}};async function resolveExplicitAppName(_0x2167e4,_0x3e1bf7,_0x59ae6c){const _0x499c3e=a90_0x15d0f2;if(_0x2167e4['requiresAppCode']===![])return _0x59ae6c;const _0x8eda78=typeof _0x3e1bf7[_0x499c3e(0x1c0)][_0x499c3e(0x1b7)]===_0x499c3e(0x1ba)?_0x3e1bf7['rawFlags'][_0x499c3e(0x1b7)][_0x499c3e(0x19d)]():'';if(!_0x8eda78)return _0x59ae6c;const _0x5cd88c=typeof _0x3e1bf7['rawFlags']['appcode']===_0x499c3e(0x1ba)&&_0x3e1bf7[_0x499c3e(0x1c0)][_0x499c3e(0x1a5)][_0x499c3e(0x19d)]()||productEnv('APPCODE');if(_0x5cd88c||_0x3e1bf7[_0x499c3e(0x18d)]===_0x499c3e(0x1a1))return _0x59ae6c;const {getRemoteAppList:_0xd1c622}=await import(_0x499c3e(0x197)),_0x279675=await _0xd1c622({'env':_0x3e1bf7[_0x499c3e(0x1af)]??_0x499c3e(0x199),'accessKey':_0x3e1bf7['accessKey']}),_0x3aa8b5=findAppByName(_0x279675[_0x499c3e(0x1c4)],_0x8eda78);if(_0x3aa8b5&&!isRuntimeAccessibleApp(_0x3aa8b5))throw runtimeInaccessibleAppError(_0x3aa8b5,'\x22'+_0x8eda78+'\x22');const _0x21d5d2=_0x3aa8b5?.[_0x499c3e(0x1ae)]?.['trim']();if(_0x21d5d2)return _0x21d5d2;throw CliErrors[_0x499c3e(0x194)]('Unknown\x20app:\x20'+_0x8eda78,_0x499c3e(0x1ac)+CLI_BIN_NAME+_0x499c3e(0x196)+_0x8eda78+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x499c3e(0x1b6)]+'.');}function a90_0x4b19(){const _0xe17522=['doctor','75828vnccZx','resolve','Run\x20`','error','appCode','env','High-risk\x20operation\x20`','currentApp','accessKey','1433873gRPprl','8678385WUYOTk','cancelled','newConfigFileName','app','4EIZYgr','ClientAk','string','command','Set\x20accessKey\x20in\x20','\x20\x20To\x20proceed:\x20','defaultApp','26916wyEqxe','rawFlags','2TUFNAz','execute','_notice','items','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','filter','update','service','\x20or\x20pass\x20','configMissing','appCodeSource','map','defaultPageSize','isNonInteractive','../core/api-client.js','1291008WOMESv','has','validation','pretty','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../commands/app/remote-source.js','verbose','production','mergedCli','495355AVmubG','313842OIqdhR','trim','requiresAppCode','catch','apiDomain','local-alias','name','../core/sdk-client.js','includes','appcode','object','appcode\x20\x22','format'];a90_0x4b19=function(){return _0xe17522;};return a90_0x4b19();}async function assertSelectedAppNameIsRuntimeAccessible(_0x1670b8,_0x5384c8){const _0x3493e8=a90_0x15d0f2;if(_0x1670b8[_0x3493e8(0x19e)]===![]||!_0x5384c8[_0x3493e8(0x1b2)])return;const _0x4fe4bc=(typeof _0x5384c8[_0x3493e8(0x1c0)][_0x3493e8(0x1b7)]===_0x3493e8(0x1ba)&&_0x5384c8[_0x3493e8(0x1c0)][_0x3493e8(0x1b7)]['trim']()?_0x5384c8[_0x3493e8(0x1c0)][_0x3493e8(0x1b7)]:_0x5384c8['mergedCli']?.['currentApp']??_0x5384c8['mergedCli']?.[_0x3493e8(0x1be)])?.[_0x3493e8(0x19d)]();if(!_0x4fe4bc)return;const {getRemoteAppList:_0x1fbbca}=await import(_0x3493e8(0x197)),_0x29aca7=await _0x1fbbca({'env':_0x5384c8[_0x3493e8(0x1af)]??_0x3493e8(0x199),'accessKey':_0x5384c8[_0x3493e8(0x1b2)]}),_0x3405bf=findAppByName(_0x29aca7[_0x3493e8(0x1c4)],_0x4fe4bc);if(_0x3405bf&&!isRuntimeAccessibleApp(_0x3405bf))throw runtimeInaccessibleAppError(_0x3405bf,'\x22'+_0x4fe4bc+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xd22b2e,_0x4f2213,_0x351192){const _0x47d35c=a90_0x15d0f2;if(_0xd22b2e[_0x47d35c(0x19e)]===![]||!_0x4f2213['accessKey'])return;const {getRemoteAppList:_0x293ab2}=await import('../commands/app/remote-source.js'),_0x3b8c30=await _0x293ab2({'env':_0x4f2213[_0x47d35c(0x1af)]??_0x47d35c(0x199),'accessKey':_0x4f2213[_0x47d35c(0x1b2)]}),_0x320925=findAppByCode(_0x3b8c30[_0x47d35c(0x1c4)],_0x351192);if(_0x320925&&!isRuntimeAccessibleApp(_0x320925))throw runtimeInaccessibleAppError(_0x320925,_0x47d35c(0x1a7)+_0x351192+'\x22');}export async function runCommand(_0x216fe4,_0x4406b0){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x216fe4)?withUpdateNotice(_0x216fe4):_0x216fe4,_0x4406b0,runnerAdapter);}function shouldAttachUpdateNotice(_0x1b360f){const _0x5b2425=a90_0x15d0f2;return![_0x5b2425(0x1c7),'schema',_0x5b2425(0x1a9)][_0x5b2425(0x1a4)](_0x1b360f[_0x5b2425(0x18a)]);}function withUpdateNotice(_0x5177a9){return{..._0x5177a9,async 'execute'(_0x4a5cd4){const _0x56a820=a90_0x4d7c,_0x17588f=shouldResolveUpdateNotice(_0x4a5cd4)?resolveLatestUpdateNotice()[_0x56a820(0x19f)](()=>null):Promise[_0x56a820(0x1ab)](null),_0x565859=await _0x5177a9[_0x56a820(0x1c2)](_0x4a5cd4);return attachUpdateNotice(_0x565859,await _0x17588f);}};}function shouldResolveUpdateNotice(_0x119817){const _0x49901e=a90_0x15d0f2;return _0x119817[_0x49901e(0x1a8)]===_0x49901e(0x195)&&!_0x119817['nonInteractive'];}function attachUpdateNotice(_0x1510cb,_0x38ab61){const _0xbac0a0=a90_0x15d0f2;if(!_0x38ab61||!_0x1510cb||typeof _0x1510cb!=='object')return _0x1510cb;const _0x6ea783=_0x1510cb,_0x3e3327=typeof _0x6ea783[_0xbac0a0(0x1c3)]===_0xbac0a0(0x1a6)&&_0x6ea783[_0xbac0a0(0x1c3)]!==null?_0x6ea783[_0xbac0a0(0x1c3)]:{};return{..._0x6ea783,'_notice':{..._0x3e3327,'update':_0x38ab61}};}
1
+ const a90_0x1c15c6=a90_0x1df7;(function(_0x1fa9eb,_0x5ee893){const _0x5889a4=a90_0x1df7,_0x32ba40=_0x1fa9eb();while(!![]){try{const _0x153235=parseInt(_0x5889a4(0xa2))/0x1+-parseInt(_0x5889a4(0xab))/0x2+-parseInt(_0x5889a4(0xa1))/0x3*(parseInt(_0x5889a4(0xb4))/0x4)+-parseInt(_0x5889a4(0xc1))/0x5*(parseInt(_0x5889a4(0x8a))/0x6)+-parseInt(_0x5889a4(0xa5))/0x7*(-parseInt(_0x5889a4(0xaf))/0x8)+parseInt(_0x5889a4(0x91))/0x9+parseInt(_0x5889a4(0x9d))/0xa;if(_0x153235===_0x5ee893)break;else _0x32ba40['push'](_0x32ba40['shift']());}catch(_0x184846){_0x32ba40['push'](_0x32ba40['shift']());}}}(a90_0x5f0e,0xac281));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0xbb3c8f){return void _0xbb3c8f,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x2af7cb,_0x55ca3e){const _0x35286b=a90_0x1df7,_0x1c96ea=typeof _0x55ca3e['app']===_0x35286b(0xc0)&&_0x55ca3e[_0x35286b(0xad)][_0x35286b(0x95)]();return{'rawFlags':_0x55ca3e,'appCode':_0x2af7cb['appCode']||productEnv('APPCODE')||(_0x1c96ea?undefined:readAppCodeFromConfig()),'appCodeSource':_0x2af7cb[_0x35286b(0xc2)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x55ca3e),'defaultFormat':_0x2af7cb['format'],'defaultPageSize':_0x2af7cb[_0x35286b(0xb2)],'defaultVerbose':_0x2af7cb['verbose'],'riskLevel':_0x2af7cb[_0x35286b(0xc5)],'accessKey':_0x2af7cb[_0x35286b(0x9e)],'env':_0x2af7cb[_0x35286b(0x94)],'mergedCli':{'defaultApp':_0x2af7cb[_0x35286b(0xa3)],'currentApp':_0x2af7cb[_0x35286b(0x9a)],'appCode':_0x2af7cb[_0x35286b(0xbf)]}};}function a90_0x1df7(_0x3b8e87,_0x434a2f){_0x3b8e87=_0x3b8e87-0x89;const _0x5f0e73=a90_0x5f0e();let _0x1df73f=_0x5f0e73[_0x3b8e87];return _0x1df73f;}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x35422c=>PIPELINE_FLAG_NAMES[a90_0x1c15c6(0xa6)](_0x35422c[a90_0x1c15c6(0xbb)]))[a90_0x1c15c6(0xa0)](({name:_0x357c49,type:_0x407544,description:_0xe110bb})=>({'name':_0x357c49,'type':_0x407544,'description':_0xe110bb})),'formatOutput':formatOutput,'getCommandLabel'(_0x475884){const _0x38aa8e=a90_0x1c15c6;return CLI_BIN_NAME+'\x20'+_0x475884[_0x38aa8e(0x89)]+'\x20'+_0x475884[_0x38aa8e(0x8f)];},'riskPolicy':{'onViolation'(_0x38aa1b){const _0x49ff41=a90_0x1c15c6;console[_0x49ff41(0xb9)](_0x38aa1b);},'createError'(_0x57b719){const _0x34f230=a90_0x1c15c6;return CliErrors[_0x34f230(0xbe)](_0x57b719);}},async 'prepare'(_0x5e4315,_0x1cd08c){const _0x28cfa5=a90_0x1c15c6,_0xdc001=resolveAuthMode(_0x1cd08c);if(_0x5e4315['requiresAuth']!==![]){if(!_0x1cd08c[_0x28cfa5(0x9e)])throw CliErrors['authRequired'](_0x28cfa5(0xac)+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x28cfa5(0x8c))+'.');const {setActiveAK:_0x10309d}=await import(_0x28cfa5(0xa9));_0x10309d(_0x1cd08c[_0x28cfa5(0x9e)]);}let _0x142229='';if(_0x5e4315['requiresAppCode']!==![]){_0x142229=_0x1cd08c['appCode']??'',_0x142229=await resolveExplicitAppName(_0x5e4315,_0x1cd08c,_0x142229);if(!_0x142229){await assertSelectedAppNameIsRuntimeAccessible(_0x5e4315,_0x1cd08c);throw CliErrors[_0x28cfa5(0xaa)](_0x28cfa5(0x9c)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x5e4315,_0x1cd08c,_0x142229);}if(_0x142229){const {initSdkClient:_0x4d41f1}=await import(_0x28cfa5(0xb8));_0x4d41f1({'appCode':_0x142229,'env':_0x1cd08c[_0x28cfa5(0x94)]??'production','accessKey':_0x1cd08c['accessKey'],'authMode':_0xdc001}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x1cd08c[_0x28cfa5(0x8b)]},'numbers':{'pagesize':_0x1cd08c[_0x28cfa5(0x98)]}},'extras':{'appCode':_0x142229,'cookie':'','apiDomain':_0x1cd08c[_0x28cfa5(0x90)],'apiDir':'','accessKey':_0x1cd08c['accessKey'],'envName':_0x1cd08c[_0x28cfa5(0x94)],'mergedCli':_0x1cd08c[_0x28cfa5(0x96)]}};},async 'confirmHighRisk'({def:_0x3554ef,env:_0x449235,flags:_0x3a74fc,commandLabel:_0x152b28}){const _0x4e0256=a90_0x1c15c6;if(_0x449235[_0x4e0256(0xc4)]){const _0x555059=reconstructCommandArgv(_0x3554ef,_0x3a74fc);throw CliErrors[_0x4e0256(0xb3)](_0x4e0256(0xb6)+_0x152b28+_0x4e0256(0xb1)+('\x20\x20To\x20proceed:\x20'+_0x555059));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3554ef,_0x152b28,_0x3a74fc),'createCancelledError':_0x39b344=>CliErrors[_0x4e0256(0xbe)](_0x39b344)});},'mapDryRunError'(_0x537800){return mapUserFacingExecuteError(_0x537800);},'mapExecuteError'(_0x2b1bbe){return mapUserFacingExecuteError(_0x2b1bbe);},async 'finalize'(){const _0x4f2fa0=a90_0x1c15c6;try{if(sdkClientInitialized){const {clearSdkClient:_0x5ca80f}=await import(_0x4f2fa0(0xb8));_0x5ca80f();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x5af8a5}=await import('../core/api-client.js');_0x5af8a5();}}};async function resolveExplicitAppName(_0x5996ac,_0x1a22b1,_0x2006ce){const _0x2e0451=a90_0x1c15c6;if(_0x5996ac[_0x2e0451(0x8d)]===![])return _0x2006ce;const _0x24ea8d=typeof _0x1a22b1[_0x2e0451(0xa8)][_0x2e0451(0xad)]===_0x2e0451(0xc0)?_0x1a22b1[_0x2e0451(0xa8)]['app'][_0x2e0451(0x95)]():'';if(!_0x24ea8d)return _0x2006ce;const _0xf95f67=typeof _0x1a22b1[_0x2e0451(0xa8)]['appcode']===_0x2e0451(0xc0)&&_0x1a22b1[_0x2e0451(0xa8)][_0x2e0451(0xb5)][_0x2e0451(0x95)]()||productEnv(_0x2e0451(0x93));if(_0xf95f67||_0x1a22b1[_0x2e0451(0xc2)]===_0x2e0451(0x92))return _0x2006ce;const {getRemoteAppList:_0x4731cc}=await import(_0x2e0451(0xc3)),_0x3b2b15=await _0x4731cc({'env':_0x1a22b1['env']??_0x2e0451(0x97),'accessKey':_0x1a22b1['accessKey']}),_0x1121a3=findAppByName(_0x3b2b15[_0x2e0451(0x99)],_0x24ea8d);if(_0x1121a3&&!isRuntimeAccessibleApp(_0x1121a3))throw runtimeInaccessibleAppError(_0x1121a3,'\x22'+_0x24ea8d+'\x22');const _0x301ee5=_0x1121a3?.[_0x2e0451(0xbf)]?.[_0x2e0451(0x95)]();if(_0x301ee5)return _0x301ee5;throw CliErrors[_0x2e0451(0xb3)](_0x2e0451(0xb0)+_0x24ea8d,_0x2e0451(0xba)+CLI_BIN_NAME+_0x2e0451(0x9f)+_0x24ea8d+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x2e0451(0x8e)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x5e6ef4,_0x2e98af){const _0x363c68=a90_0x1c15c6;if(_0x5e6ef4[_0x363c68(0x8d)]===![]||!_0x2e98af[_0x363c68(0x9e)])return;const _0x47eaf8=(typeof _0x2e98af[_0x363c68(0xa8)][_0x363c68(0xad)]==='string'&&_0x2e98af['rawFlags'][_0x363c68(0xad)][_0x363c68(0x95)]()?_0x2e98af['rawFlags'][_0x363c68(0xad)]:_0x2e98af[_0x363c68(0x96)]?.[_0x363c68(0x9a)]??_0x2e98af[_0x363c68(0x96)]?.[_0x363c68(0xa3)])?.[_0x363c68(0x95)]();if(!_0x47eaf8)return;const {getRemoteAppList:_0x121b52}=await import('../commands/app/remote-source.js'),_0x2672b3=await _0x121b52({'env':_0x2e98af['env']??'production','accessKey':_0x2e98af['accessKey']}),_0x3a2452=findAppByName(_0x2672b3[_0x363c68(0x99)],_0x47eaf8);if(_0x3a2452&&!isRuntimeAccessibleApp(_0x3a2452))throw runtimeInaccessibleAppError(_0x3a2452,'\x22'+_0x47eaf8+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xf47976,_0x17d6bd,_0x36094f){const _0x10440a=a90_0x1c15c6;if(_0xf47976[_0x10440a(0x8d)]===![]||!_0x17d6bd[_0x10440a(0x9e)])return;const {getRemoteAppList:_0x718b3d}=await import(_0x10440a(0xc3)),_0x3db41e=await _0x718b3d({'env':_0x17d6bd[_0x10440a(0x94)]??_0x10440a(0x97),'accessKey':_0x17d6bd[_0x10440a(0x9e)]}),_0x3d3bd7=findAppByCode(_0x3db41e[_0x10440a(0x99)],_0x36094f);if(_0x3d3bd7&&!isRuntimeAccessibleApp(_0x3d3bd7))throw runtimeInaccessibleAppError(_0x3d3bd7,_0x10440a(0xbd)+_0x36094f+'\x22');}export async function runCommand(_0x282d28,_0x56770b){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x282d28)?withUpdateNotice(_0x282d28):_0x282d28,_0x56770b,runnerAdapter);}function a90_0x5f0e(){const _0x2d5f16=['newConfigFileName','command','apiDomain','9336735gKFuIR','local-alias','APPCODE','env','trim','mergedCli','production','defaultPageSize','items','currentApp','update','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','15214650jSSUhg','accessKey','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','map','3fReuzd','105679cOHYRT','defaultApp','_notice','3566206geiszS','has','execute','rawFlags','../core/api-client.js','configMissing','2280890RVZsKG','Set\x20accessKey\x20in\x20','app','includes','8TACJlK','Unknown\x20app:\x20','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','pageSize','validation','4263572lQCXsi','appcode','High-risk\x20operation\x20`','nonInteractive','../core/sdk-client.js','error','Run\x20`','name','format','appcode\x20\x22','cancelled','appCode','string','5BLOAoS','appCodeSource','../commands/app/remote-source.js','isNonInteractive','riskLevel','service','1575156eeffUe','defaultVerbose','ACCESS_KEY','requiresAppCode'];a90_0x5f0e=function(){return _0x2d5f16;};return a90_0x5f0e();}function shouldAttachUpdateNotice(_0x1c6bc6){const _0x232b5c=a90_0x1c15c6;return![_0x232b5c(0x9b),'schema','doctor'][_0x232b5c(0xae)](_0x1c6bc6[_0x232b5c(0x89)]);}function withUpdateNotice(_0x3f5246){return{..._0x3f5246,async 'execute'(_0x640048){const _0x346083=a90_0x1df7,_0x20794=shouldResolveUpdateNotice(_0x640048)?resolveLatestUpdateNotice()['catch'](()=>null):Promise['resolve'](null),_0x1f808f=await _0x3f5246[_0x346083(0xa7)](_0x640048);return attachUpdateNotice(_0x1f808f,await _0x20794);}};}function shouldResolveUpdateNotice(_0x5b325f){const _0x3f625e=a90_0x1c15c6;return _0x5b325f[_0x3f625e(0xbc)]==='pretty'&&!_0x5b325f[_0x3f625e(0xb7)];}function attachUpdateNotice(_0x29e9ce,_0x4bd55f){const _0x5a0da6=a90_0x1c15c6;if(!_0x4bd55f||!_0x29e9ce||typeof _0x29e9ce!=='object')return _0x29e9ce;const _0x244b6c=_0x29e9ce,_0x5a238f=typeof _0x244b6c[_0x5a0da6(0xa4)]==='object'&&_0x244b6c['_notice']!==null?_0x244b6c[_0x5a0da6(0xa4)]:{};return{..._0x244b6c,'_notice':{..._0x5a238f,'update':_0x4bd55f}};}
@@ -1 +1 @@
1
- (function(_0x1c699f,_0x2392c8){const _0x10bc0b=a91_0x4eb8,_0x38a339=_0x1c699f();while(!![]){try{const _0x3ebed8=-parseInt(_0x10bc0b(0x179))/0x1*(parseInt(_0x10bc0b(0x16a))/0x2)+parseInt(_0x10bc0b(0x173))/0x3*(-parseInt(_0x10bc0b(0x172))/0x4)+-parseInt(_0x10bc0b(0x16e))/0x5*(-parseInt(_0x10bc0b(0x17a))/0x6)+parseInt(_0x10bc0b(0x178))/0x7+-parseInt(_0x10bc0b(0x170))/0x8+-parseInt(_0x10bc0b(0x16b))/0x9*(-parseInt(_0x10bc0b(0x16f))/0xa)+-parseInt(_0x10bc0b(0x168))/0xb*(-parseInt(_0x10bc0b(0x176))/0xc);if(_0x3ebed8===_0x2392c8)break;else _0x38a339['push'](_0x38a339['shift']());}catch(_0x522756){_0x38a339['push'](_0x38a339['shift']());}}}(a91_0x4cce,0x2242e));import{buildSchemaPayload as a91_0x37ca09}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a91_0x4eb8(_0x4ac661,_0x530f0d){_0x4ac661=_0x4ac661-0x167;const _0x4cce91=a91_0x4cce();let _0x4eb859=_0x4cce91[_0x4ac661];return _0x4eb859;}function a91_0x4cce(){const _0x2d99ca=['171NXRAyw','required','none','5MqPgzw','108890rBvSgi','1607104LRQhhQ','auth','2164zmoaXk','9RcRAyh','../commands/registry.js','service','96XAyzIY','has','708673aReqCg','283wPrWUp','931926noRxEs','map','214731iOvkGk','commands','1956ioCgUZ'];a91_0x4cce=function(){return _0x2d99ca;};return a91_0x4cce();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x562fca=a91_0x4eb8,{serviceRegistry:_0x43e838,findDefinition:_0xb33933}=await import(_0x562fca(0x174)),_0x4382fe=new Set(_0x43e838[_0x562fca(0x167)](_0xea0f38=>_0xea0f38[_0x562fca(0x175)])),_0x32e5cf=listDynamicServiceEntries()['filter'](_0x2f8c7a=>!_0x4382fe[_0x562fca(0x177)](_0x2f8c7a[_0x562fca(0x175)])),_0x1aff7e=a91_0x37ca09({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x43e838,_0x32e5cf),'buildAllFlags':buildAllFlags,'findDefinition':(_0x131e86,_0x3d9e09)=>_0xb33933(_0x131e86,_0x3d9e09)??findDynamicServiceDefinition(_0x131e86,_0x3d9e09)});return normalizeSchemaPayload(_0x1aff7e);}function normalizeSchemaPayload(_0x5cec7a){const _0x55d81f=a91_0x4eb8;return{..._0x5cec7a,'schemaVersion':0x2,'services':_0x5cec7a['services'][_0x55d81f(0x167)](_0xb39152=>({..._0xb39152,'commands':_0xb39152[_0x55d81f(0x169)][_0x55d81f(0x167)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x36b327){const _0x495809=a91_0x4eb8,_0x542fe0=_0x36b327;return{..._0x36b327,'auth':_0x542fe0[_0x495809(0x171)]??(_0x36b327['requiresAuth']?_0x495809(0x16c):_0x495809(0x16d))};}
1
+ (function(_0x118589,_0x25e63f){const _0x553a73=a91_0x39c9,_0x33beff=_0x118589();while(!![]){try{const _0x54858c=parseInt(_0x553a73(0x99))/0x1+-parseInt(_0x553a73(0xa3))/0x2+parseInt(_0x553a73(0x9b))/0x3+-parseInt(_0x553a73(0xa2))/0x4*(parseInt(_0x553a73(0x98))/0x5)+parseInt(_0x553a73(0xa9))/0x6+parseInt(_0x553a73(0x9d))/0x7*(parseInt(_0x553a73(0xa0))/0x8)+-parseInt(_0x553a73(0x9c))/0x9*(parseInt(_0x553a73(0xa6))/0xa);if(_0x54858c===_0x25e63f)break;else _0x33beff['push'](_0x33beff['shift']());}catch(_0x19c0c9){_0x33beff['push'](_0x33beff['shift']());}}}(a91_0x5f1f,0x1f665));function a91_0x39c9(_0x3acca6,_0x28189d){_0x3acca6=_0x3acca6-0x96;const _0x5f1f35=a91_0x5f1f();let _0x39c94b=_0x5f1f35[_0x3acca6];return _0x39c94b;}import{buildSchemaPayload as a91_0x257609}from'@lovrabet/cli-framework';function a91_0x5f1f(){const _0x3ee0af=['service','required','162325cilHDH','239701zTHBsN','../commands/registry.js','679134EZCdmb','30249gVotBj','504567vgSORP','has','commands','16CatOsQ','auth','20tiFXtw','58248wJYccm','map','requiresAuth','1330QUVszA','services','filter','941004bSoojX'];a91_0x5f1f=function(){return _0x3ee0af;};return a91_0x5f1f();}import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x266bed=a91_0x39c9,{serviceRegistry:_0x7a17aa,findDefinition:_0x56627d}=await import(_0x266bed(0x9a)),_0x4f8033=new Set(_0x7a17aa[_0x266bed(0xa4)](_0x25be40=>_0x25be40[_0x266bed(0x96)])),_0x2fed09=listDynamicServiceEntries()[_0x266bed(0xa8)](_0x589ac2=>!_0x4f8033[_0x266bed(0x9e)](_0x589ac2['service'])),_0x577f34=a91_0x257609({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x7a17aa,_0x2fed09),'buildAllFlags':buildAllFlags,'findDefinition':(_0x45c1f3,_0x575243)=>_0x56627d(_0x45c1f3,_0x575243)??findDynamicServiceDefinition(_0x45c1f3,_0x575243)});return normalizeSchemaPayload(_0x577f34);}function normalizeSchemaPayload(_0x47eb5d){const _0x2684c2=a91_0x39c9;return{..._0x47eb5d,'schemaVersion':0x2,'services':_0x47eb5d[_0x2684c2(0xa7)]['map'](_0x4b3592=>({..._0x4b3592,'commands':_0x4b3592[_0x2684c2(0x9f)]['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x24fd9d){const _0x5bc242=a91_0x39c9,_0x2f816e=_0x24fd9d;return{..._0x24fd9d,'auth':_0x2f816e[_0x5bc242(0xa1)]??(_0x24fd9d[_0x5bc242(0xa5)]?_0x5bc242(0x97):'none')};}
@@ -1 +1 @@
1
- function a92_0x32c6(){const _0x1b3553=['length','service','slice','1069898gwOyuE','439320kaWcXl','3244844bmpefY','6535728WwbBqY','1688940KebzYx','1giDYib','findIndex','3648430hRCRRJ','2031953sPIeFk','6ydWUHo'];a92_0x32c6=function(){return _0x1b3553;};return a92_0x32c6();}(function(_0x428a68,_0x504deb){const _0x2a01a7=a92_0x1e51,_0x486c54=_0x428a68();while(!![]){try{const _0x3d2a92=parseInt(_0x2a01a7(0x1b9))/0x1*(-parseInt(_0x2a01a7(0x1b4))/0x2)+parseInt(_0x2a01a7(0x1b8))/0x3+parseInt(_0x2a01a7(0x1b6))/0x4+parseInt(_0x2a01a7(0x1ae))/0x5*(-parseInt(_0x2a01a7(0x1b0))/0x6)+-parseInt(_0x2a01a7(0x1af))/0x7+parseInt(_0x2a01a7(0x1b5))/0x8+parseInt(_0x2a01a7(0x1b7))/0x9;if(_0x3d2a92===_0x504deb)break;else _0x486c54['push'](_0x486c54['shift']());}catch(_0x5de2c9){_0x486c54['push'](_0x486c54['shift']());}}}(a92_0x32c6,0x92940));function a92_0x1e51(_0x595248,_0x36d258){_0x595248=_0x595248-0x1ae;const _0x32c6a8=a92_0x32c6();let _0x1e51cf=_0x32c6a8[_0x595248];return _0x1e51cf;}export function insertDynamicServicesAfterServiceTree(_0x32504d,_0x2e34bb){const _0x2331e5=a92_0x1e51;if(_0x2e34bb[_0x2331e5(0x1b1)]===0x0)return[..._0x32504d];const _0x4743ca=_0x32504d[_0x2331e5(0x1ba)](_0x2bf7d0=>_0x2bf7d0[_0x2331e5(0x1b2)]===_0x2331e5(0x1b2));if(_0x4743ca<0x0)return[..._0x32504d,..._0x2e34bb];return[..._0x32504d[_0x2331e5(0x1b3)](0x0,_0x4743ca+0x1),..._0x2e34bb,..._0x32504d[_0x2331e5(0x1b3)](_0x4743ca+0x1)];}
1
+ (function(_0x377345,_0x4a1771){const _0x33aa1e=a92_0x49c5,_0x29ad65=_0x377345();while(!![]){try{const _0x32749b=-parseInt(_0x33aa1e(0x112))/0x1*(-parseInt(_0x33aa1e(0x111))/0x2)+-parseInt(_0x33aa1e(0x10a))/0x3+parseInt(_0x33aa1e(0x10f))/0x4+parseInt(_0x33aa1e(0x110))/0x5+-parseInt(_0x33aa1e(0x10b))/0x6*(parseInt(_0x33aa1e(0x108))/0x7)+parseInt(_0x33aa1e(0x10c))/0x8+parseInt(_0x33aa1e(0x115))/0x9*(-parseInt(_0x33aa1e(0x113))/0xa);if(_0x32749b===_0x4a1771)break;else _0x29ad65['push'](_0x29ad65['shift']());}catch(_0x2f0991){_0x29ad65['push'](_0x29ad65['shift']());}}}(a92_0x9589,0x44e65));function a92_0x49c5(_0x10226d,_0x3c5bbc){_0x10226d=_0x10226d-0x108;const _0x9589b9=a92_0x9589();let _0x49c57=_0x9589b9[_0x10226d];return _0x49c57;}export function insertDynamicServicesAfterServiceTree(_0x3ae07e,_0x4c9767){const _0x1b6c04=a92_0x49c5;if(_0x4c9767[_0x1b6c04(0x109)]===0x0)return[..._0x3ae07e];const _0x424a2f=_0x3ae07e[_0x1b6c04(0x114)](_0x528d13=>_0x528d13[_0x1b6c04(0x10e)]===_0x1b6c04(0x10e));if(_0x424a2f<0x0)return[..._0x3ae07e,..._0x4c9767];return[..._0x3ae07e['slice'](0x0,_0x424a2f+0x1),..._0x4c9767,..._0x3ae07e[_0x1b6c04(0x10d)](_0x424a2f+0x1)];}function a92_0x9589(){const _0x31ceb0=['128vAXewq','4565toRDeR','48310TmmrQK','findIndex','333DhaTYt','8484zmYSwK','length','981126oBCpLu','2202OwhvEz','3267008WKThlK','slice','service','624328ZMSLbF','1880940NHvqlk'];a92_0x9589=function(){return _0x31ceb0;};return a92_0x9589();}
@@ -1 +1 @@
1
- function a93_0x3b1d(_0xc74b52,_0x11c69f){_0xc74b52=_0xc74b52-0x1e9;var _0x4f739f=a93_0x4f73();var _0x3b1dcc=_0x4f739f[_0xc74b52];return _0x3b1dcc;}function a93_0x4f73(){var _0xb03a28=['3828916RbYVKi','520630TXOjKK','1124388FhfULa','6169254nNkGXr','1600545JvnFja','738912MLIPlb','1448485gQMOKN'];a93_0x4f73=function(){return _0xb03a28;};return a93_0x4f73();}(function(_0x4cdf2e,_0xfa1800){var _0x284a0d=a93_0x3b1d,_0x41db23=_0x4cdf2e();while(!![]){try{var _0x26b886=parseInt(_0x284a0d(0x1ed))/0x1+-parseInt(_0x284a0d(0x1ea))/0x2+parseInt(_0x284a0d(0x1e9))/0x3+-parseInt(_0x284a0d(0x1ee))/0x4+-parseInt(_0x284a0d(0x1eb))/0x5+parseInt(_0x284a0d(0x1ef))/0x6+-parseInt(_0x284a0d(0x1ec))/0x7;if(_0x26b886===_0xfa1800)break;else _0x41db23['push'](_0x41db23['shift']());}catch(_0x5cc1f1){_0x41db23['push'](_0x41db23['shift']());}}}(a93_0x4f73,0x914ac));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ (function(_0x1b48c0,_0x40c3b4){var _0x105463=a93_0x1982,_0x4e3d96=_0x1b48c0();while(!![]){try{var _0x329e8e=parseInt(_0x105463(0xb0))/0x1+parseInt(_0x105463(0xb7))/0x2+-parseInt(_0x105463(0xb6))/0x3+parseInt(_0x105463(0xb8))/0x4*(parseInt(_0x105463(0xb3))/0x5)+-parseInt(_0x105463(0xb1))/0x6*(parseInt(_0x105463(0xb2))/0x7)+-parseInt(_0x105463(0xb5))/0x8+parseInt(_0x105463(0xb4))/0x9;if(_0x329e8e===_0x40c3b4)break;else _0x4e3d96['push'](_0x4e3d96['shift']());}catch(_0x151036){_0x4e3d96['push'](_0x4e3d96['shift']());}}}(a93_0x13a7,0x41a2d));function a93_0x1982(_0x9aab0b,_0x1af11f){_0x9aab0b=_0x9aab0b-0xb0;var _0x13a795=a93_0x13a7();var _0x198256=_0x13a795[_0x9aab0b];return _0x198256;}function a93_0x13a7(){var _0x32ad45=['7481115niKiVF','1736912sZFxce','1158219YMxTCu','348954wKqjns','4ZnKxXp','57603nBnyuB','6eegFQH','1479982OXHbzk','100715TNSPAK'];a93_0x13a7=function(){return _0x32ad45;};return a93_0x13a7();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a94_0xecebf=a94_0x3f4a;function a94_0x5cee(){const _0x45578e=['310KEoMyL','388665qFEPPt','v2.1.16-beta.2','8223520zSvcFl','400669lIdAQg','28VCiTnI','11320177qpOTeP','1090747XlMzvV','331735ulsQkt','6cErbNk','2.1.16-beta.2','2026-07-18T09:23:20.944Z','12HjpNwo','1156383sPXYum'];a94_0x5cee=function(){return _0x45578e;};return a94_0x5cee();}function a94_0x3f4a(_0x56ee8d,_0x589d9e){_0x56ee8d=_0x56ee8d-0x15e;const _0x5ceec3=a94_0x5cee();let _0x3f4aef=_0x5ceec3[_0x56ee8d];return _0x3f4aef;}(function(_0x29da04,_0x3d57b0){const _0x4127eb=a94_0x3f4a,_0x47c9c5=_0x29da04();while(!![]){try{const _0x16dc2a=-parseInt(_0x4127eb(0x167))/0x1+-parseInt(_0x4127eb(0x15e))/0x2*(-parseInt(_0x4127eb(0x162))/0x3)+-parseInt(_0x4127eb(0x168))/0x4*(parseInt(_0x4127eb(0x16b))/0x5)+-parseInt(_0x4127eb(0x161))/0x6*(parseInt(_0x4127eb(0x16a))/0x7)+parseInt(_0x4127eb(0x166))/0x8+parseInt(_0x4127eb(0x164))/0x9*(-parseInt(_0x4127eb(0x163))/0xa)+parseInt(_0x4127eb(0x169))/0xb;if(_0x16dc2a===_0x3d57b0)break;else _0x47c9c5['push'](_0x47c9c5['shift']());}catch(_0xcbfed7){_0x47c9c5['push'](_0x47c9c5['shift']());}}}(a94_0x5cee,0xaa663));export const VERSION=a94_0xecebf(0x15f);export const GIT_TAG=a94_0xecebf(0x165);export const GIT_COMMIT='b478d0e';export const BUILD_TIME=a94_0xecebf(0x160);
1
+ const a94_0x46482d=a94_0x4a87;function a94_0x40ef(){const _0x2a893c=['b478d0e','12oBnfnX','7772030wXqjeL','4kijlux','3752992RVSpov','3076zzcJXn','1491264TkiEhC','1570ufkgzR','892727ZjSKAG','1350474wrQgLu','1126867cSFAwc'];a94_0x40ef=function(){return _0x2a893c;};return a94_0x40ef();}(function(_0x27a492,_0x4d862e){const _0xa08066=a94_0x4a87,_0x154713=_0x27a492();while(!![]){try{const _0xeab8fc=parseInt(_0xa08066(0x72))/0x1+parseInt(_0xa08066(0x6d))/0x2*(-parseInt(_0xa08066(0x73))/0x3)+parseInt(_0xa08066(0x6f))/0x4*(-parseInt(_0xa08066(0x71))/0x5)+-parseInt(_0xa08066(0x76))/0x6*(parseInt(_0xa08066(0x74))/0x7)+parseInt(_0xa08066(0x6e))/0x8+-parseInt(_0xa08066(0x70))/0x9+parseInt(_0xa08066(0x6c))/0xa;if(_0xeab8fc===_0x4d862e)break;else _0x154713['push'](_0x154713['shift']());}catch(_0x460ed2){_0x154713['push'](_0x154713['shift']());}}}(a94_0x40ef,0x7c6ae));export const VERSION='2.1.16';function a94_0x4a87(_0x357f29,_0x5019c1){_0x357f29=_0x357f29-0x6c;const _0x40ef79=a94_0x40ef();let _0x4a87de=_0x40ef79[_0x357f29];return _0x4a87de;}export const GIT_TAG='v2.1.16-beta.2';export const GIT_COMMIT=a94_0x46482d(0x75);export const BUILD_TIME='2026-07-18T09:31:55.079Z';
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x12766e,_0x5b46a6){const _0x1ce5b6=a95_0x3595,_0x5ac6d4=_0x12766e();while(!![]){try{const _0x1cf4c9=parseInt(_0x1ce5b6(0x16c))/0x1+-parseInt(_0x1ce5b6(0x171))/0x2+parseInt(_0x1ce5b6(0x167))/0x3*(-parseInt(_0x1ce5b6(0x172))/0x4)+parseInt(_0x1ce5b6(0x16f))/0x5*(-parseInt(_0x1ce5b6(0x16e))/0x6)+-parseInt(_0x1ce5b6(0x16a))/0x7+-parseInt(_0x1ce5b6(0x16b))/0x8+parseInt(_0x1ce5b6(0x170))/0x9;if(_0x1cf4c9===_0x5b46a6)break;else _0x5ac6d4['push'](_0x5ac6d4['shift']());}catch(_0xcd584){_0x5ac6d4['push'](_0x5ac6d4['shift']());}}}(a95_0x165e,0x212b0));function a95_0x3595(_0x327e72,_0x34eca3){_0x327e72=_0x327e72-0x167;const _0x165e9b=a95_0x165e();let _0x3595c3=_0x165e9b[_0x327e72];return _0x3595c3;}function a95_0x165e(){const _0x268386=['green','3702npdxVw','1055QKKzUe','4193730bVeiWC','119372ogxUMB','236GqQrqq','\x20--help','5091vAUhsR','\x20\x20Use\x20','column','193865BoKpJZ','1177832LqszRw','134806vqTAfn'];a95_0x165e=function(){return _0x268386;};return a95_0x165e();}import{jsx as a95_0x1e2407,jsxs as a95_0x2f86c3}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4f735c=a95_0x3595,{exit:_0xc7bb65}=useApp();return useEffect(()=>{_0xc7bb65();},[_0xc7bb65]),a95_0x2f86c3(Box,{'flexDirection':_0x4f735c(0x169),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0x1e2407(Box,{'children':a95_0x1e2407(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x2f86c3(Box,{'marginTop':0x1,'children':[a95_0x1e2407(Text,{'dimColor':!![],'children':_0x4f735c(0x168)}),a95_0x1e2407(Text,{'bold':!![],'color':_0x4f735c(0x16d),'children':CLI_BIN_NAME+_0x4f735c(0x173)}),a95_0x1e2407(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x319035,_0x24fcd7){const _0x4df953=a95_0x1aa0,_0x2ecfee=_0x319035();while(!![]){try{const _0x17d6d7=-parseInt(_0x4df953(0xb0))/0x1*(parseInt(_0x4df953(0xb6))/0x2)+parseInt(_0x4df953(0xa7))/0x3*(parseInt(_0x4df953(0xb2))/0x4)+parseInt(_0x4df953(0xb1))/0x5+-parseInt(_0x4df953(0xaa))/0x6*(-parseInt(_0x4df953(0xb4))/0x7)+-parseInt(_0x4df953(0xb5))/0x8+-parseInt(_0x4df953(0xa9))/0x9*(parseInt(_0x4df953(0xab))/0xa)+-parseInt(_0x4df953(0xb3))/0xb*(-parseInt(_0x4df953(0xac))/0xc);if(_0x17d6d7===_0x24fcd7)break;else _0x2ecfee['push'](_0x2ecfee['shift']());}catch(_0x50eaac){_0x2ecfee['push'](_0x2ecfee['shift']());}}}(a95_0x3104,0x3342f));import{jsx as a95_0x1d53f3,jsxs as a95_0x166706}from'react/jsx-runtime';import{useEffect}from'react';function a95_0x3104(){const _0x4cb901=['14658HjSyCr','648710bKkIGO','4659684lSHHDO','\x20--help','\x20\x20Use\x20','\x20to\x20view\x20available\x20commands.','1ZEjLhF','1694435YEfGbf','8kSZPEb','11tNYsCU','455iLQBPD','2514952qOfuSy','824008gmcAPI','562059fevSfa','green','45vLnGSF'];a95_0x3104=function(){return _0x4cb901;};return a95_0x3104();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a95_0x1aa0(_0x886780,_0x11064f){_0x886780=_0x886780-0xa7;const _0x310472=a95_0x3104();let _0x1aa086=_0x310472[_0x886780];return _0x1aa086;}export function Help(){const _0x516b75=a95_0x1aa0,{exit:_0x47771d}=useApp();return useEffect(()=>{_0x47771d();},[_0x47771d]),a95_0x166706(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a95_0x1d53f3(Box,{'children':a95_0x1d53f3(Text,{'bold':!![],'color':_0x516b75(0xa8),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x166706(Box,{'marginTop':0x1,'children':[a95_0x1d53f3(Text,{'dimColor':!![],'children':_0x516b75(0xae)}),a95_0x1d53f3(Text,{'bold':!![],'color':_0x516b75(0xa8),'children':CLI_BIN_NAME+_0x516b75(0xad)}),a95_0x1d53f3(Text,{'dimColor':!![],'children':_0x516b75(0xaf)})]})]});}
@@ -1 +1 @@
1
- (function(_0x18bd11,_0x23440d){const _0x1f1eed=a96_0x4144,_0x17fc5c=_0x18bd11();while(!![]){try{const _0x17d8dc=-parseInt(_0x1f1eed(0x1c4))/0x1+parseInt(_0x1f1eed(0x1bd))/0x2*(-parseInt(_0x1f1eed(0x1bc))/0x3)+parseInt(_0x1f1eed(0x1c6))/0x4*(-parseInt(_0x1f1eed(0x1cf))/0x5)+parseInt(_0x1f1eed(0x1be))/0x6*(parseInt(_0x1f1eed(0x1c7))/0x7)+-parseInt(_0x1f1eed(0x1c0))/0x8+-parseInt(_0x1f1eed(0x1c8))/0x9+parseInt(_0x1f1eed(0x1ca))/0xa*(parseInt(_0x1f1eed(0x1cb))/0xb);if(_0x17d8dc===_0x23440d)break;else _0x17fc5c['push'](_0x17fc5c['shift']());}catch(_0x23ffb1){_0x17fc5c['push'](_0x17fc5c['shift']());}}}(a96_0x5ddd,0x24d13));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x1d5b88}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a96_0x4144(_0x3964c0,_0x3c3d13){_0x3964c0=_0x3964c0-0x1bc;const _0x5dddd9=a96_0x5ddd();let _0x4144d5=_0x5dddd9[_0x3964c0];return _0x4144d5;}export const LOVRABET_SKILL_SOURCE=a96_0x1d5b88;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a96_0x5ddd(){const _0x384512=['1017558IKMBbr','join','10mvNAKS','8363069DiiGBU','pipe','skills','toString','42350isgfME','stdout','inherit','npx','status','138MQXFOw','2446ISpWJT','6JAHXbf','trim','1358104QWZAwY','exit\x20','stderr','unknown','267256HJBIOQ','add','100jQRClZ','1460291XMEuNh'];a96_0x5ddd=function(){return _0x384512;};return a96_0x5ddd();}export function runNpxSkillsAddGlobal(_0x2350db,_0x2e71a9=LOVRABET_SKILL_SOURCE,_0x43e1a3){const _0x209500=a96_0x4144;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5567c9=_0x43e1a3?.['stdio']??_0x209500(0x1d1),_0x14bf28=resolveNpmBin(_0x209500(0x1d2)),_0x3f8dee=[_0x209500(0x1cd),_0x209500(0x1c5),_0x2e71a9,'-g','-y'],_0x54b395=[_0x14bf28,..._0x3f8dee][_0x209500(0x1c9)]('\x20');console['log']('*\x20'+_0x54b395);const _0x128f07=spawnSync(_0x14bf28,_0x3f8dee,{'cwd':_0x2350db,'stdio':_0x5567c9,'env':process.env,'shell':![]});if(_0x128f07[_0x209500(0x1d3)]===0x0)return{'ok':!![],'status':0x0};let _0x3a2093=_0x209500(0x1c1)+(_0x128f07[_0x209500(0x1d3)]??_0x209500(0x1c3));if(_0x5567c9===_0x209500(0x1cc)){const _0x703c23=_0x128f07[_0x209500(0x1c2)]?_0x128f07[_0x209500(0x1c2)][_0x209500(0x1ce)]()['trim']():'',_0x44e038=_0x128f07[_0x209500(0x1d0)]?_0x128f07[_0x209500(0x1d0)][_0x209500(0x1ce)]()[_0x209500(0x1bf)]():'';if(_0x703c23)_0x3a2093=_0x703c23;else{if(_0x44e038)_0x3a2093=_0x44e038;}}return{'ok':![],'status':_0x128f07[_0x209500(0x1d3)]??null,'error':_0x3a2093};}
1
+ const a96_0x1a362c=a96_0x4326;(function(_0xb608ef,_0x42276f){const _0x102b84=a96_0x4326,_0x5a6ef7=_0xb608ef();while(!![]){try{const _0x247f43=-parseInt(_0x102b84(0x75))/0x1*(-parseInt(_0x102b84(0x86))/0x2)+parseInt(_0x102b84(0x81))/0x3+-parseInt(_0x102b84(0x76))/0x4+parseInt(_0x102b84(0x7e))/0x5*(parseInt(_0x102b84(0x73))/0x6)+-parseInt(_0x102b84(0x84))/0x7+parseInt(_0x102b84(0x7c))/0x8*(parseInt(_0x102b84(0x71))/0x9)+-parseInt(_0x102b84(0x78))/0xa;if(_0x247f43===_0x42276f)break;else _0x5a6ef7['push'](_0x5a6ef7['shift']());}catch(_0x2c3624){_0x5a6ef7['push'](_0x5a6ef7['shift']());}}}(a96_0x5774,0x6b559));function a96_0x4326(_0x54d804,_0x4ff15c){_0x54d804=_0x54d804-0x70;const _0x5774ca=a96_0x5774();let _0x432685=_0x5774ca[_0x54d804];return _0x432685;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x59d4e8}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x59d4e8;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a96_0x1a362c(0x7a)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x3434df,_0x2faced=LOVRABET_SKILL_SOURCE,_0x4667a0){const _0x442b18=a96_0x1a362c;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x446b99=_0x4667a0?.[_0x442b18(0x82)]??_0x442b18(0x7b),_0x2a935b=resolveNpmBin(_0x442b18(0x83)),_0xdd46d2=['skills',_0x442b18(0x70),_0x2faced,'-g','-y'],_0x55433a=[_0x2a935b,..._0xdd46d2][_0x442b18(0x7f)]('\x20');console[_0x442b18(0x80)]('*\x20'+_0x55433a);const _0x4afed4=spawnSync(_0x2a935b,_0xdd46d2,{'cwd':_0x3434df,'stdio':_0x446b99,'env':process.env,'shell':![]});if(_0x4afed4['status']===0x0)return{'ok':!![],'status':0x0};let _0x574919=_0x442b18(0x77)+(_0x4afed4[_0x442b18(0x85)]??_0x442b18(0x7d));if(_0x446b99===_0x442b18(0x72)){const _0x5a2563=_0x4afed4[_0x442b18(0x74)]?_0x4afed4['stderr']['toString']()['trim']():'',_0x23fd30=_0x4afed4[_0x442b18(0x79)]?_0x4afed4[_0x442b18(0x79)][_0x442b18(0x87)]()['trim']():'';if(_0x5a2563)_0x574919=_0x5a2563;else{if(_0x23fd30)_0x574919=_0x23fd30;}}return{'ok':![],'status':_0x4afed4[_0x442b18(0x85)]??null,'error':_0x574919};}function a96_0x5774(){const _0x2c94fb=['exit\x20','17820860HgeVMB','stdout','skipNpxSkillsEnvSuffix','inherit','5176HyqQnC','unknown','3075730dkDTft','join','log','2165877sVmhBk','stdio','npx','1410878xUaCMP','status','4RLhnrY','toString','add','10503GGCoHZ','pipe','6LTyvWk','stderr','212999qncrjR','379484rgWVpU'];a96_0x5774=function(){return _0x2c94fb;};return a96_0x5774();}
@@ -1 +1 @@
1
- function a97_0x11c2(){const _0x57d3e8=['dist','.next','.cache','259193gbRRwn','build','21DCLZxU','86134FJPjVg','2797686khUzbu','8733165ZeHyLw','5382400cLzRDi','1070ytkyHC','.hg','8Grngsr','569956yufznf','coverage','.svn','node_modules','7pKUGAG','.DS_Store','.git','4480821PuLnPC'];a97_0x11c2=function(){return _0x57d3e8;};return a97_0x11c2();}function a97_0x9430(_0x2f2e47,_0x119ea0){_0x2f2e47=_0x2f2e47-0x14b;const _0x11c2e5=a97_0x11c2();let _0x9430c5=_0x11c2e5[_0x2f2e47];return _0x9430c5;}const a97_0x5c9dc1=a97_0x9430;(function(_0x3a767f,_0x5a36ab){const _0x321c7b=a97_0x9430,_0x6d4ad6=_0x3a767f();while(!![]){try{const _0x5454e5=parseInt(_0x321c7b(0x14d))/0x1*(-parseInt(_0x321c7b(0x157))/0x2)+parseInt(_0x321c7b(0x156))/0x3*(parseInt(_0x321c7b(0x15e))/0x4)+-parseInt(_0x321c7b(0x15a))/0x5+parseInt(_0x321c7b(0x158))/0x6+-parseInt(_0x321c7b(0x159))/0x7+-parseInt(_0x321c7b(0x15d))/0x8*(parseInt(_0x321c7b(0x150))/0x9)+-parseInt(_0x321c7b(0x15b))/0xa*(-parseInt(_0x321c7b(0x154))/0xb);if(_0x5454e5===_0x5a36ab)break;else _0x6d4ad6['push'](_0x6d4ad6['shift']());}catch(_0x2b60af){_0x6d4ad6['push'](_0x6d4ad6['shift']());}}}(a97_0x11c2,0xd255c));export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x5c9dc1(0x14e)]);export const IGNORED_DIR_NAMES=new Set([a97_0x5c9dc1(0x14f),a97_0x5c9dc1(0x15c),a97_0x5c9dc1(0x14b),a97_0x5c9dc1(0x14c),a97_0x5c9dc1(0x152),a97_0x5c9dc1(0x151),a97_0x5c9dc1(0x155),a97_0x5c9dc1(0x15f),'.turbo',a97_0x5c9dc1(0x153)]);
1
+ const a97_0x580b7b=a97_0x5c22;(function(_0x2e3336,_0x40089e){const _0x2dd832=a97_0x5c22,_0x46526a=_0x2e3336();while(!![]){try{const _0x4fec4c=parseInt(_0x2dd832(0x18b))/0x1+parseInt(_0x2dd832(0x193))/0x2+parseInt(_0x2dd832(0x18a))/0x3+-parseInt(_0x2dd832(0x18f))/0x4*(-parseInt(_0x2dd832(0x194))/0x5)+-parseInt(_0x2dd832(0x199))/0x6*(-parseInt(_0x2dd832(0x187))/0x7)+-parseInt(_0x2dd832(0x18c))/0x8*(-parseInt(_0x2dd832(0x19a))/0x9)+-parseInt(_0x2dd832(0x195))/0xa;if(_0x4fec4c===_0x40089e)break;else _0x46526a['push'](_0x46526a['shift']());}catch(_0x29e307){_0x46526a['push'](_0x46526a['shift']());}}}(a97_0x1ae1,0x720c8));export const METADATA_FILE=a97_0x580b7b(0x18e);function a97_0x5c22(_0x535795,_0xe56d07){_0x535795=_0x535795-0x186;const _0x1ae18b=a97_0x1ae1();let _0x5c2214=_0x1ae18b[_0x535795];return _0x5c2214;}function a97_0x1ae1(){const _0x53db9e=['.hg','lovrabet.skill.json','52IuimMz','.DS_Store','node_modules','SKILL.md','96148lYHybm','113185aeGldd','12658780GUXBLy','dist','.cache','coverage','1225404ykbgRI','1521NxlhRa','.git','.svn','14oNAOXP','.next','build','931614fhVtPp','133734fQnJbF','25464hylBDe'];a97_0x1ae1=function(){return _0x53db9e;};return a97_0x1ae1();}export const SKILL_FILE=a97_0x580b7b(0x192);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x580b7b(0x190)]);export const IGNORED_DIR_NAMES=new Set([a97_0x580b7b(0x19b),a97_0x580b7b(0x18d),a97_0x580b7b(0x186),a97_0x580b7b(0x191),a97_0x580b7b(0x188),a97_0x580b7b(0x196),a97_0x580b7b(0x189),a97_0x580b7b(0x198),'.turbo',a97_0x580b7b(0x197)]);
@@ -1 +1 @@
1
- (function(_0x182ae1,_0x3f2acc){const _0x1e6006=a98_0x4403,_0x4bcaa7=_0x182ae1();while(!![]){try{const _0xc4571=-parseInt(_0x1e6006(0x92))/0x1*(parseInt(_0x1e6006(0x95))/0x2)+parseInt(_0x1e6006(0x8d))/0x3+-parseInt(_0x1e6006(0x8e))/0x4*(parseInt(_0x1e6006(0x8c))/0x5)+-parseInt(_0x1e6006(0x99))/0x6+parseInt(_0x1e6006(0x94))/0x7+parseInt(_0x1e6006(0x93))/0x8+parseInt(_0x1e6006(0x90))/0x9;if(_0xc4571===_0x3f2acc)break;else _0x4bcaa7['push'](_0x4bcaa7['shift']());}catch(_0x764914){_0x4bcaa7['push'](_0x4bcaa7['shift']());}}}(a98_0x46a9,0xdfe9b));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(_0x6a6b2,_0x213c60){const _0x279a4c=a98_0x4403,_0x19a223=normalizeSkillRelativePath(_0x213c60),_0x114518=realOrResolved(_0x6a6b2),_0x5e8676=resolve(_0x114518,..._0x19a223[_0x279a4c(0x8b)]('/'));if(!isPathInside(_0x5e8676,_0x114518))throw CliErrors[_0x279a4c(0x9c)](_0x279a4c(0x96)+_0x213c60);return ensureNoSymlinkInManagedPath(_0x114518,_0x19a223),_0x5e8676;}export function ensureNoSymlinkInManagedPath(_0x4afd2e,_0x50ae08){const _0x5a2e8b=a98_0x4403;let _0x28e46a=_0x4afd2e;for(const _0x7b2e60 of _0x50ae08[_0x5a2e8b(0x8b)]('/')){_0x28e46a=resolve(_0x28e46a,_0x7b2e60);const _0x216062=lstatIfPresent(_0x28e46a);if(_0x216062?.[_0x5a2e8b(0x91)]())throw CliErrors[_0x5a2e8b(0x9c)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x50ae08);}}export function isDanglingSymlink(_0x55d02e){const _0x97cde9=a98_0x4403;try{return lstatSync(_0x55d02e)[_0x97cde9(0x91)]();}catch{return![];}}export function resolveSymlinkTarget(_0x6d97da){const _0x14ec65=readlinkSync(_0x6d97da);return isAbsolute(_0x14ec65)?_0x14ec65:resolve(dirname(_0x6d97da),_0x14ec65);}export function isPathInside(_0x14170e,_0x4db3d8){const _0x2aa494=a98_0x4403,_0x36e9be=_0x14170e[_0x2aa494(0x9a)](sep)?_0x14170e:''+_0x14170e+sep,_0x46362c=_0x4db3d8[_0x2aa494(0x9a)](sep)?_0x4db3d8:''+_0x4db3d8+sep;return _0x14170e===_0x4db3d8||_0x36e9be[_0x2aa494(0x97)](_0x46362c);}export function realOrResolved(_0x31191e){try{return realpathSync(_0x31191e);}catch{return resolve(_0x31191e);}}export function lstatIfPresent(_0x44dde8){try{return lstatSync(_0x44dde8);}catch{return undefined;}}function a98_0x4403(_0x2d0372,_0x315e88){_0x2d0372=_0x2d0372-0x8b;const _0x46a951=a98_0x46a9();let _0x44038d=_0x46a951[_0x2d0372];return _0x44038d;}export function writeTextAtomic(_0x4903f,_0x48df06,_0x4d0c2d){const _0x4dfdec=a98_0x4403;writeBytesAtomic(_0x4903f,Buffer[_0x4dfdec(0x8f)](_0x48df06,_0x4dfdec(0x9b)),_0x4d0c2d);}function a98_0x46a9(){const _0x242125=['from','17797761xiUCDP','isSymbolicLink','1422972SoiAqJ','9443160dcMXQL','4646663esMSvS','2QRmJnP','Unsafe\x20Skill\x20file\x20path:\x20','startsWith','.tmp','6388104vwFZrs','endsWith','utf8','validation','split','1061425xxRYEU','1933485gaJKss','20DCOsIv'];a98_0x46a9=function(){return _0x242125;};return a98_0x46a9();}export function writeBytesAtomic(_0x5b05e3,_0x4d421b,_0x4e15ec){const _0x2f92f1=a98_0x4403,_0x4143ea=_0x5b05e3+_0x2f92f1(0x98);try{writeFileSync(_0x4143ea,_0x4d421b,{'mode':_0x4e15ec}),renameSync(_0x4143ea,_0x5b05e3);}catch(_0x73a104){try{rmSync(_0x4143ea,{'force':!![]});}catch{}throw _0x73a104;}}export function writeJsonAtomic(_0x1d376e,_0xe049e0){writeTextAtomic(_0x1d376e,JSON['stringify'](_0xe049e0,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x4fdc31,_0x1111db){const _0x37b373=a98_0x51b4,_0x2953f0=_0x4fdc31();while(!![]){try{const _0x5cbcc2=-parseInt(_0x37b373(0x91))/0x1+parseInt(_0x37b373(0x90))/0x2*(-parseInt(_0x37b373(0x94))/0x3)+parseInt(_0x37b373(0x93))/0x4*(parseInt(_0x37b373(0xa0))/0x5)+-parseInt(_0x37b373(0x9d))/0x6+-parseInt(_0x37b373(0x92))/0x7*(parseInt(_0x37b373(0x99))/0x8)+-parseInt(_0x37b373(0x8f))/0x9+-parseInt(_0x37b373(0x9a))/0xa*(-parseInt(_0x37b373(0x96))/0xb);if(_0x5cbcc2===_0x1111db)break;else _0x2953f0['push'](_0x2953f0['shift']());}catch(_0x4507b4){_0x2953f0['push'](_0x2953f0['shift']());}}}(a98_0x444b,0x18f31));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(_0xf866ce,_0x43ddb0){const _0x302f1f=a98_0x51b4,_0x59ad54=normalizeSkillRelativePath(_0x43ddb0),_0x4301af=realOrResolved(_0xf866ce),_0x4ce982=resolve(_0x4301af,..._0x59ad54['split']('/'));if(!isPathInside(_0x4ce982,_0x4301af))throw CliErrors[_0x302f1f(0x97)](_0x302f1f(0x9e)+_0x43ddb0);return ensureNoSymlinkInManagedPath(_0x4301af,_0x59ad54),_0x4ce982;}export function ensureNoSymlinkInManagedPath(_0x228336,_0xa28e1f){const _0x15b4c1=a98_0x51b4;let _0x30e764=_0x228336;for(const _0x2b86ea of _0xa28e1f[_0x15b4c1(0x9c)]('/')){_0x30e764=resolve(_0x30e764,_0x2b86ea);const _0x566add=lstatIfPresent(_0x30e764);if(_0x566add?.['isSymbolicLink']())throw CliErrors[_0x15b4c1(0x97)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0xa28e1f);}}export function isDanglingSymlink(_0x2ccb67){const _0x458789=a98_0x51b4;try{return lstatSync(_0x2ccb67)[_0x458789(0xa1)]();}catch{return![];}}export function resolveSymlinkTarget(_0x48ac61){const _0x3e7b87=readlinkSync(_0x48ac61);return isAbsolute(_0x3e7b87)?_0x3e7b87:resolve(dirname(_0x48ac61),_0x3e7b87);}export function isPathInside(_0x2a11fb,_0x290bad){const _0x3fea8a=a98_0x51b4,_0x307b24=_0x2a11fb['endsWith'](sep)?_0x2a11fb:''+_0x2a11fb+sep,_0x5cd4da=_0x290bad[_0x3fea8a(0x9b)](sep)?_0x290bad:''+_0x290bad+sep;return _0x2a11fb===_0x290bad||_0x307b24['startsWith'](_0x5cd4da);}function a98_0x51b4(_0x1b5661,_0x326fa2){_0x1b5661=_0x1b5661-0x8f;const _0x444b73=a98_0x444b();let _0x51b4b4=_0x444b73[_0x1b5661];return _0x51b4b4;}export function realOrResolved(_0x44d53f){try{return realpathSync(_0x44d53f);}catch{return resolve(_0x44d53f);}}export function lstatIfPresent(_0x3e1a01){try{return lstatSync(_0x3e1a01);}catch{return undefined;}}export function writeTextAtomic(_0x417199,_0x4460d2,_0x2a6dfe){const _0x22a6f9=a98_0x51b4;writeBytesAtomic(_0x417199,Buffer[_0x22a6f9(0x95)](_0x4460d2,_0x22a6f9(0x98)),_0x2a6dfe);}export function writeBytesAtomic(_0x2c471e,_0x5bf4f1,_0x224cbd){const _0x35e4a5=_0x2c471e+'.tmp';try{writeFileSync(_0x35e4a5,_0x5bf4f1,{'mode':_0x224cbd}),renameSync(_0x35e4a5,_0x2c471e);}catch(_0x22224b){try{rmSync(_0x35e4a5,{'force':!![]});}catch{}throw _0x22224b;}}export function writeJsonAtomic(_0x3c6e0e,_0x2b0a7a){const _0x4c15ce=a98_0x51b4;writeTextAtomic(_0x3c6e0e,JSON[_0x4c15ce(0x9f)](_0x2b0a7a,null,0x2)+'\x0a',0x180);}function a98_0x444b(){const _0x522273=['469XHbbps','1836LDVqhh','702fCwZQG','from','22KCQvJS','validation','utf8','11304IaKfTn','2805830CAjnjb','endsWith','split','593478KhqtWC','Unsafe\x20Skill\x20file\x20path:\x20','stringify','1565sbQRfA','isSymbolicLink','1225188FiAITc','716MYsKpI','189152tpgXnp'];a98_0x444b=function(){return _0x522273;};return a98_0x444b();}
@@ -1 +1 @@
1
- (function(_0x5e038b,_0x340109){const _0x2b842c=a99_0x31d1,_0x58ed63=_0x5e038b();while(!![]){try{const _0x3d9f68=-parseInt(_0x2b842c(0x178))/0x1+parseInt(_0x2b842c(0x181))/0x2+parseInt(_0x2b842c(0x184))/0x3*(parseInt(_0x2b842c(0x17c))/0x4)+-parseInt(_0x2b842c(0x17b))/0x5*(-parseInt(_0x2b842c(0x17d))/0x6)+-parseInt(_0x2b842c(0x176))/0x7+parseInt(_0x2b842c(0x182))/0x8+-parseInt(_0x2b842c(0x183))/0x9*(parseInt(_0x2b842c(0x179))/0xa);if(_0x3d9f68===_0x340109)break;else _0x58ed63['push'](_0x58ed63['shift']());}catch(_0x3452a6){_0x58ed63['push'](_0x58ed63['shift']());}}}(a99_0x45a6,0x20596));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a99_0x45a6(){const _0x4f8f81=['3QLwHZj','hex','171024EgNLCh','digest','181522ZkEaEb','10GjFOae','update','5sJtalh','489544MUAuFN','756906gzyETT','sha256','path','size','228990gxqDCA','1054584tNMBzP','1407591aVTBpZ'];a99_0x45a6=function(){return _0x4f8f81;};return a99_0x45a6();}function a99_0x31d1(_0x336d75,_0x35248b){_0x336d75=_0x336d75-0x175;const _0x45a61b=a99_0x45a6();let _0x31d1c9=_0x45a61b[_0x336d75];return _0x31d1c9;}export function contentHash(_0x18d6ca){const _0x5def39=a99_0x31d1;return createHash('sha256')[_0x5def39(0x17a)](_0x18d6ca)[_0x5def39(0x177)](_0x5def39(0x175));}export function fileHash(_0x1fac65){return bufferSha256(fileContent(_0x1fac65));}export function bufferSha256(_0x3ca245){const _0x7eeb9d=a99_0x31d1;return createHash('sha256')[_0x7eeb9d(0x17a)](_0x3ca245)['digest'](_0x7eeb9d(0x175));}export function fileTreeHash(_0x4aa96d){const _0x19ccf3=a99_0x31d1,_0x3b5f6c=createHash(_0x19ccf3(0x17e));for(const _0x45a93f of normalizeManifestFiles(_0x4aa96d)){_0x3b5f6c[_0x19ccf3(0x17a)](_0x45a93f[_0x19ccf3(0x17f)]),_0x3b5f6c[_0x19ccf3(0x17a)]('\x00'),_0x3b5f6c[_0x19ccf3(0x17a)](_0x45a93f[_0x19ccf3(0x17e)]),_0x3b5f6c['update']('\x00'),_0x3b5f6c[_0x19ccf3(0x17a)](String(_0x45a93f[_0x19ccf3(0x180)])),_0x3b5f6c[_0x19ccf3(0x17a)]('\x00');}return _0x3b5f6c[_0x19ccf3(0x177)](_0x19ccf3(0x175));}
1
+ (function(_0x4daa5d,_0x4cba79){const _0x111376=a99_0x4a15,_0x15f40c=_0x4daa5d();while(!![]){try{const _0x5e5ac1=-parseInt(_0x111376(0x9f))/0x1*(-parseInt(_0x111376(0xa3))/0x2)+parseInt(_0x111376(0x9c))/0x3*(parseInt(_0x111376(0xaa))/0x4)+parseInt(_0x111376(0xa9))/0x5+-parseInt(_0x111376(0xa4))/0x6+parseInt(_0x111376(0xa5))/0x7+parseInt(_0x111376(0xa8))/0x8+-parseInt(_0x111376(0x9b))/0x9*(parseInt(_0x111376(0xa6))/0xa);if(_0x5e5ac1===_0x4cba79)break;else _0x15f40c['push'](_0x15f40c['shift']());}catch(_0x2d132e){_0x15f40c['push'](_0x15f40c['shift']());}}}(a99_0x3b2e,0x34ca4));function a99_0x4a15(_0xd44727,_0x108016){_0xd44727=_0xd44727-0x9b;const _0x3b2eef=a99_0x3b2e();let _0x4a151e=_0x3b2eef[_0xd44727];return _0x4a151e;}import{createHash}from'node:crypto';function a99_0x3b2e(){const _0x4b6053=['4BKYYPi','315rKAuaQ','263931BKFJzs','size','update','158ISGNgz','sha256','hex','digest','178dVxahF','114618esDoHQ','716926PsHqBt','160960zaNPho','path','1790344ESCObP','1852205zItQLp'];a99_0x3b2e=function(){return _0x4b6053;};return a99_0x3b2e();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x4a5b13){const _0x581c03=a99_0x4a15;return createHash(_0x581c03(0xa0))[_0x581c03(0x9e)](_0x4a5b13)['digest'](_0x581c03(0xa1));}export function fileHash(_0x37849a){return bufferSha256(fileContent(_0x37849a));}export function bufferSha256(_0x102af9){const _0x20b420=a99_0x4a15;return createHash(_0x20b420(0xa0))[_0x20b420(0x9e)](_0x102af9)[_0x20b420(0xa2)](_0x20b420(0xa1));}export function fileTreeHash(_0x29d479){const _0x331bc8=a99_0x4a15,_0x3500a2=createHash(_0x331bc8(0xa0));for(const _0xd650a8 of normalizeManifestFiles(_0x29d479)){_0x3500a2[_0x331bc8(0x9e)](_0xd650a8[_0x331bc8(0xa7)]),_0x3500a2[_0x331bc8(0x9e)]('\x00'),_0x3500a2[_0x331bc8(0x9e)](_0xd650a8[_0x331bc8(0xa0)]),_0x3500a2[_0x331bc8(0x9e)]('\x00'),_0x3500a2['update'](String(_0xd650a8[_0x331bc8(0x9d)])),_0x3500a2[_0x331bc8(0x9e)]('\x00');}return _0x3500a2[_0x331bc8(0xa2)]('hex');}
@@ -1 +1 @@
1
- (function(_0x332d0e,_0x2ba8ff){const _0x14dac6=a100_0x2147,_0x20ad44=_0x332d0e();while(!![]){try{const _0x4626e5=-parseInt(_0x14dac6(0x196))/0x1+parseInt(_0x14dac6(0x195))/0x2+parseInt(_0x14dac6(0x198))/0x3*(-parseInt(_0x14dac6(0x18b))/0x4)+-parseInt(_0x14dac6(0x190))/0x5*(parseInt(_0x14dac6(0x1b0))/0x6)+parseInt(_0x14dac6(0x184))/0x7*(parseInt(_0x14dac6(0x182))/0x8)+-parseInt(_0x14dac6(0x193))/0x9*(-parseInt(_0x14dac6(0x180))/0xa)+-parseInt(_0x14dac6(0x1ab))/0xb*(-parseInt(_0x14dac6(0x186))/0xc);if(_0x4626e5===_0x2ba8ff)break;else _0x20ad44['push'](_0x20ad44['shift']());}catch(_0x29f629){_0x20ad44['push'](_0x20ad44['shift']());}}}(a100_0x25ef,0x5574d));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a100_0x2147(_0x4b83c6,_0x92e823){_0x4b83c6=_0x4b83c6-0x17e;const _0x25efac=a100_0x25ef();let _0x2147e0=_0x25efac[_0x4b83c6];return _0x2147e0;}import{basename,dirname,resolve}from'node:path';function a100_0x25ef(){const _0x2302cd=['Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','managedRoot','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','removed','trim','filter','external-symlink','metadata-mismatch','map','2850342VMLfTV','company','skipped','validation','slice','138yrOeqE','push','agentsSkillsDir','contentHash','60iBpJYx','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','4000904nLNBVz','dir','7LYTQfe','name','12FBdvJH','pruneSkillCodes','unchanged','skillCode','values','833104aZQysd','scope','updated','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','not-managed-symlink','49390agHaND','isSymbolicLink','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','494694ZQHhzR','accessKey','1215708HUyOJk','494834CvsJCu','has','9PtoTro','personal','created','appCode','builtin','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','get','env','skill','length'];a100_0x25ef=function(){return _0x2302cd;};return a100_0x25ef();}import a100_0x175501 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';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x175501;export function linkEffectiveRuntimeSkills(_0x43cfdb,_0x1da7ef,_0x525898={}){const _0x504d35=a100_0x2147,_0x575eba=new Map();for(const _0x440370 of _0x43cfdb){const _0x5010f0=_0x440370[_0x504d35(0x1a0)][_0x504d35(0x189)];if(!_0x5010f0)continue;const _0x38020f=_0x575eba[_0x504d35(0x19e)](_0x5010f0);(!_0x38020f||_0x440370['scope']===_0x504d35(0x199))&&_0x575eba['set'](_0x5010f0,_0x440370);}const _0x530fd6=[],_0x405b96=resolveSkillSyncPaths(_0x525898);for(const _0x5af725 of _0x575eba[_0x504d35(0x18a)]()){const _0x5282a8=requireSkillCode(_0x5af725[_0x504d35(0x1a0)]),_0x344a8f=_0x1da7ef+'--'+_0x5282a8;for(const _0x23e91c of runtimeAgentSkillRoots(_0x405b96)){_0x530fd6['push'](ensureManagedSymlink(resolve(_0x23e91c,_0x344a8f),_0x5af725['dir'],_0x405b96[_0x504d35(0x1a3)]));}}return _0x530fd6;}export function pruneStaleRuntimeSkillLinks(_0x2324d5,_0x17ec2e,_0x54f732={},_0x501e6c){const _0x400a02=a100_0x2147,_0x33edd0=resolveSkillSyncPaths(_0x54f732),_0x5120ee=new Set([..._0x17ec2e][_0x400a02(0x1aa)](_0x818ee8=>_0x818ee8[_0x400a02(0x1a6)]())['filter'](Boolean)),_0x5a8d9d=_0x501e6c?new Set([..._0x501e6c][_0x400a02(0x1aa)](_0x1d38fb=>_0x1d38fb[_0x400a02(0x1a6)]())[_0x400a02(0x1a7)](Boolean)):undefined,_0x4356a5=[];for(const _0x12ef4c of runtimeAgentSkillRoots(_0x33edd0)){for(const _0x2ee12f of managedAppSkillLinkPaths(_0x12ef4c,_0x2324d5)){const _0x9bec46=basename(_0x2ee12f)[_0x400a02(0x1af)]((_0x2324d5+'--')[_0x400a02(0x1a1)]);if(_0x5a8d9d&&!_0x5a8d9d[_0x400a02(0x197)](_0x9bec46))continue;if(_0x5120ee['has'](_0x9bec46))continue;_0x4356a5[_0x400a02(0x1b1)](removeManagedSkillLink(_0x2ee12f,_0x33edd0[_0x400a02(0x1a3)]));}}return _0x4356a5;}export function pruneStaleRuntimeSkillCache(_0x4b4e5e,_0x1b3060={}){const _0xf67faf=a100_0x2147,_0xcd5eda=new Set([..._0x4b4e5e['activeSkillCodes']][_0xf67faf(0x1aa)](_0x564047=>_0x564047[_0xf67faf(0x1a6)]())[_0xf67faf(0x1a7)](Boolean)),_0x4973c7=_0x4b4e5e[_0xf67faf(0x187)]?new Set([..._0x4b4e5e[_0xf67faf(0x187)]][_0xf67faf(0x1aa)](_0x5b2176=>_0x5b2176[_0xf67faf(0x1a6)]())[_0xf67faf(0x1a7)](Boolean)):undefined,_0x2e2bcf=_0x4b4e5e['scopes']??[_0xf67faf(0x199),_0xf67faf(0x1ac)],_0x4aa8ea=resolve(getRuntimeSkillCacheRoot(_0x4b4e5e[_0xf67faf(0x19f)],_0x4b4e5e[_0xf67faf(0x194)],_0x1b3060),safePathSegment(_0x4b4e5e[_0xf67faf(0x19b)],_0xf67faf(0x19b))),_0x4f25b9=[];for(const _0x4f440c of _0x2e2bcf){const _0x9fd21d=resolve(_0x4aa8ea,_0x4f440c);if(!existsSync(_0x9fd21d))continue;for(const _0x277a72 of readdirSync(_0x9fd21d,{'withFileTypes':!![]})){if(!_0x277a72['isDirectory']())continue;const _0x3352c6=_0x277a72[_0xf67faf(0x185)];if(_0x4973c7&&!_0x4973c7['has'](_0x3352c6))continue;if(_0xcd5eda[_0xf67faf(0x197)](_0x3352c6))continue;const _0x4f3911=resolve(_0x9fd21d,_0x3352c6),_0x1ea97d=readMetadataIfPresent(resolve(_0x4f3911,METADATA_FILE));if(_0x1ea97d?.[_0xf67faf(0x19b)]!==_0x4b4e5e[_0xf67faf(0x19b)]||_0x1ea97d[_0xf67faf(0x18c)]!==_0x4f440c||_0x1ea97d['skillCode']!==_0x3352c6){_0x4f25b9[_0xf67faf(0x1b1)]({'path':_0x4f3911,'action':_0xf67faf(0x1ad),'reason':_0xf67faf(0x1a9)});continue;}removeSync(_0x4f3911),_0x4f25b9[_0xf67faf(0x1b1)]({'path':_0x4f3911,'action':_0xf67faf(0x1a5)});}}return _0x4f25b9;}export function linkGlobalRuntimeSkills(_0x3f9dac,_0x2e3acb={}){const _0x57236b=a100_0x2147,_0x43753e=resolveSkillSyncPaths(_0x2e3acb),_0x5d32e5=[];for(const _0xcd3f5d of _0x3f9dac){if(_0xcd3f5d[_0x57236b(0x18c)]!=='builtin')throw CliErrors['validation'](_0x57236b(0x1a4)+_0xcd3f5d[_0x57236b(0x18c)]);const _0xbc8b90=requireSkillCode(_0xcd3f5d[_0x57236b(0x1a0)]),_0x4309cb=copyManagedSkillDirectory(_0xcd3f5d[_0x57236b(0x183)],resolve(_0x43753e[_0x57236b(0x17e)],_0xbc8b90));_0x5d32e5[_0x57236b(0x1b1)]({..._0x4309cb,'contentHash':_0xcd3f5d['contentHash']});}return _0x5d32e5;}function ensureManagedSymlink(_0x82e8de,_0x32f681,_0x382db0){const _0x1eb4d3=a100_0x2147;mkdirSync(dirname(_0x82e8de),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x82e8de)||isDanglingSymlink(_0x82e8de)){const _0x1a1598=lstatSync(_0x82e8de);if(!_0x1a1598[_0x1eb4d3(0x191)]())throw CliErrors[_0x1eb4d3(0x1ae)](_0x1eb4d3(0x181)+_0x82e8de);const _0x41b63c=resolveSymlinkTarget(_0x82e8de);if(!isPathInside(realOrResolved(_0x41b63c),realOrResolved(_0x382db0)))throw CliErrors[_0x1eb4d3(0x1ae)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x82e8de);if(realOrResolved(_0x41b63c)===realOrResolved(_0x32f681))return{'path':_0x82e8de,'target':_0x32f681,'action':_0x1eb4d3(0x188)};return unlinkSync(_0x82e8de),symlinkSync(_0x32f681,_0x82e8de,_0x1eb4d3(0x183)),{'path':_0x82e8de,'target':_0x32f681,'action':_0x1eb4d3(0x18d)};}return symlinkSync(_0x32f681,_0x82e8de,_0x1eb4d3(0x183)),{'path':_0x82e8de,'target':_0x32f681,'action':'created'};}function managedAppSkillLinkPaths(_0x15fd0f,_0xc9bd2a){const _0x5509fd=a100_0x2147;if(!existsSync(_0x15fd0f))return[];const _0x3eebf7=_0xc9bd2a+'--';return readdirSync(_0x15fd0f,{'withFileTypes':!![]})[_0x5509fd(0x1a7)](_0x39b530=>_0x39b530['name']['startsWith'](_0x3eebf7))['map'](_0x2996f1=>resolve(_0x15fd0f,_0x2996f1[_0x5509fd(0x185)]));}function removeManagedSkillLink(_0x5a6774,_0x4186cc){const _0x30067f=a100_0x2147,_0x40f93c=lstatIfPresent(_0x5a6774);if(!_0x40f93c?.[_0x30067f(0x191)]())return{'path':_0x5a6774,'action':_0x30067f(0x1ad),'reason':_0x30067f(0x18f)};const _0xb21cec=resolveSymlinkTarget(_0x5a6774);if(!isPathInside(realOrResolved(_0xb21cec),realOrResolved(_0x4186cc)))return{'path':_0x5a6774,'action':_0x30067f(0x1ad),'reason':_0x30067f(0x1a8)};return unlinkSync(_0x5a6774),{'path':_0x5a6774,'action':_0x30067f(0x1a5)};}export function copyManagedSkillDirectory(_0x439efd,_0x51da58){const _0x598277=a100_0x2147,_0x4c7aca=resolve(_0x51da58,METADATA_FILE),_0x646284=existsSync(_0x51da58);if(_0x646284){const _0x2ecbb4=lstatSync(_0x51da58);if(_0x2ecbb4[_0x598277(0x191)]())throw CliErrors[_0x598277(0x1ae)](_0x598277(0x18e)+_0x51da58);if(!_0x2ecbb4['isDirectory']())throw CliErrors[_0x598277(0x1ae)](_0x598277(0x192)+_0x51da58);const _0x46aabc=readMetadataIfPresent(_0x4c7aca);if(_0x46aabc?.[_0x598277(0x18c)]!==_0x598277(0x19c))throw CliErrors[_0x598277(0x1ae)](_0x598277(0x19d)+_0x51da58);}ensureDirSync(dirname(_0x51da58));const _0x1e2eb7=_0x646284?readMetadataIfPresent(_0x4c7aca)?.['contentHash']:undefined,_0xa8579d=readMetadataIfPresent(resolve(_0x439efd,METADATA_FILE))?.[_0x598277(0x17f)];return _0x646284&&removeSync(_0x51da58),copySkillDirectory(_0x439efd,_0x51da58),{'path':_0x51da58,'target':_0x439efd,'action':!_0x646284?_0x598277(0x19a):_0x1e2eb7===_0xa8579d?'unchanged':'updated'};}function copySkillDirectory(_0xabbcec,_0x428d0b){copySync(_0xabbcec,_0x428d0b,{'dereference':![],'overwrite':!![],'filter'(_0x3288f5){const _0x314ba2=a100_0x2147;if(lstatSync(_0x3288f5)[_0x314ba2(0x191)]())throw CliErrors[_0x314ba2(0x1ae)](_0x314ba2(0x1a2)+_0x3288f5);return!![];}});}
1
+ (function(_0x11cf92,_0x105c76){const _0x59c2a6=a100_0x2998,_0x2255d7=_0x11cf92();while(!![]){try{const _0xa287eb=-parseInt(_0x59c2a6(0xe6))/0x1*(parseInt(_0x59c2a6(0xf2))/0x2)+parseInt(_0x59c2a6(0x11a))/0x3*(-parseInt(_0x59c2a6(0x100))/0x4)+-parseInt(_0x59c2a6(0x10a))/0x5*(parseInt(_0x59c2a6(0x107))/0x6)+parseInt(_0x59c2a6(0xf4))/0x7*(-parseInt(_0x59c2a6(0x106))/0x8)+-parseInt(_0x59c2a6(0xe4))/0x9*(parseInt(_0x59c2a6(0x119))/0xa)+parseInt(_0x59c2a6(0xf0))/0xb*(parseInt(_0x59c2a6(0x108))/0xc)+-parseInt(_0x59c2a6(0xe5))/0xd*(-parseInt(_0x59c2a6(0xea))/0xe);if(_0xa287eb===_0x105c76)break;else _0x2255d7['push'](_0x2255d7['shift']());}catch(_0xd25bb5){_0x2255d7['push'](_0x2255d7['shift']());}}}(a100_0x521d,0x59bc7));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a100_0x2998(_0x19524e,_0x58a1ce){_0x19524e=_0x19524e-0xe1;const _0x521dcd=a100_0x521d();let _0x29984d=_0x521dcd[_0x19524e];return _0x29984d;}import{basename,dirname,resolve}from'node:path';import a100_0x533b85 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';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x533b85;export function linkEffectiveRuntimeSkills(_0x209b04,_0x2fc3e2,_0x3c8ecc={}){const _0x12a7e4=a100_0x2998,_0x39174b=new Map();for(const _0x29b969 of _0x209b04){const _0x26210d=_0x29b969[_0x12a7e4(0x10f)]['skillCode'];if(!_0x26210d)continue;const _0x21c5f9=_0x39174b[_0x12a7e4(0xf8)](_0x26210d);(!_0x21c5f9||_0x29b969[_0x12a7e4(0x116)]===_0x12a7e4(0x101))&&_0x39174b[_0x12a7e4(0x104)](_0x26210d,_0x29b969);}const _0x121f3b=[],_0x1780e4=resolveSkillSyncPaths(_0x3c8ecc);for(const _0x42dbfc of _0x39174b[_0x12a7e4(0xfb)]()){const _0xd42e47=requireSkillCode(_0x42dbfc['skill']),_0x5da869=_0x2fc3e2+'--'+_0xd42e47;for(const _0x35d999 of runtimeAgentSkillRoots(_0x1780e4)){_0x121f3b[_0x12a7e4(0xff)](ensureManagedSymlink(resolve(_0x35d999,_0x5da869),_0x42dbfc['dir'],_0x1780e4[_0x12a7e4(0x109)]));}}return _0x121f3b;}export function pruneStaleRuntimeSkillLinks(_0x2e0dd4,_0x3e7bc5,_0x466f01={},_0x5b41c6){const _0x47e331=a100_0x2998,_0x38798a=resolveSkillSyncPaths(_0x466f01),_0x57a699=new Set([..._0x3e7bc5][_0x47e331(0x114)](_0x5de4b7=>_0x5de4b7[_0x47e331(0xf6)]())['filter'](Boolean)),_0x1d3e70=_0x5b41c6?new Set([..._0x5b41c6]['map'](_0x18215f=>_0x18215f['trim']())[_0x47e331(0xf5)](Boolean)):undefined,_0x5c537d=[];for(const _0x17dce3 of runtimeAgentSkillRoots(_0x38798a)){for(const _0x497b45 of managedAppSkillLinkPaths(_0x17dce3,_0x2e0dd4)){const _0x3ba8b9=basename(_0x497b45)[_0x47e331(0x10e)]((_0x2e0dd4+'--')[_0x47e331(0xfd)]);if(_0x1d3e70&&!_0x1d3e70[_0x47e331(0x111)](_0x3ba8b9))continue;if(_0x57a699[_0x47e331(0x111)](_0x3ba8b9))continue;_0x5c537d[_0x47e331(0xff)](removeManagedSkillLink(_0x497b45,_0x38798a[_0x47e331(0x109)]));}}return _0x5c537d;}export function pruneStaleRuntimeSkillCache(_0x3f837e,_0x2a3788={}){const _0x49a0ac=a100_0x2998,_0x343f39=new Set([..._0x3f837e[_0x49a0ac(0xf1)]][_0x49a0ac(0x114)](_0x5f1d87=>_0x5f1d87[_0x49a0ac(0xf6)]())['filter'](Boolean)),_0x3b4519=_0x3f837e[_0x49a0ac(0xe2)]?new Set([..._0x3f837e['pruneSkillCodes']][_0x49a0ac(0x114)](_0x1c8ed0=>_0x1c8ed0['trim']())[_0x49a0ac(0xf5)](Boolean)):undefined,_0x1aa8aa=_0x3f837e[_0x49a0ac(0xec)]??[_0x49a0ac(0x101),_0x49a0ac(0x118)],_0x61d520=resolve(getRuntimeSkillCacheRoot(_0x3f837e[_0x49a0ac(0xe9)],_0x3f837e[_0x49a0ac(0xed)],_0x2a3788),safePathSegment(_0x3f837e[_0x49a0ac(0xf7)],'appCode')),_0x51394f=[];for(const _0x5bdcb4 of _0x1aa8aa){const _0x5ab20a=resolve(_0x61d520,_0x5bdcb4);if(!existsSync(_0x5ab20a))continue;for(const _0x57e058 of readdirSync(_0x5ab20a,{'withFileTypes':!![]})){if(!_0x57e058[_0x49a0ac(0xef)]())continue;const _0x215aa6=_0x57e058[_0x49a0ac(0xfc)];if(_0x3b4519&&!_0x3b4519[_0x49a0ac(0x111)](_0x215aa6))continue;if(_0x343f39[_0x49a0ac(0x111)](_0x215aa6))continue;const _0x6a3500=resolve(_0x5ab20a,_0x215aa6),_0x54b61b=readMetadataIfPresent(resolve(_0x6a3500,METADATA_FILE));if(_0x54b61b?.[_0x49a0ac(0xf7)]!==_0x3f837e['appCode']||_0x54b61b[_0x49a0ac(0x116)]!==_0x5bdcb4||_0x54b61b[_0x49a0ac(0xf3)]!==_0x215aa6){_0x51394f[_0x49a0ac(0xff)]({'path':_0x6a3500,'action':_0x49a0ac(0x105),'reason':_0x49a0ac(0xfe)});continue;}removeSync(_0x6a3500),_0x51394f[_0x49a0ac(0xff)]({'path':_0x6a3500,'action':'removed'});}}return _0x51394f;}export function linkGlobalRuntimeSkills(_0x555229,_0x4d74f0={}){const _0x3061cf=a100_0x2998,_0x20e98a=resolveSkillSyncPaths(_0x4d74f0),_0x2191ef=[];for(const _0x497ffc of _0x555229){if(_0x497ffc[_0x3061cf(0x116)]!==_0x3061cf(0x110))throw CliErrors['validation'](_0x3061cf(0xee)+_0x497ffc['scope']);const _0x57d469=requireSkillCode(_0x497ffc[_0x3061cf(0x10f)]),_0x390d27=copyManagedSkillDirectory(_0x497ffc[_0x3061cf(0x113)],resolve(_0x20e98a[_0x3061cf(0xe7)],_0x57d469));_0x2191ef[_0x3061cf(0xff)]({..._0x390d27,'contentHash':_0x497ffc[_0x3061cf(0x115)]});}return _0x2191ef;}function ensureManagedSymlink(_0xf4c6fa,_0x4497a5,_0x419a16){const _0x4de790=a100_0x2998;mkdirSync(dirname(_0xf4c6fa),{'recursive':!![],'mode':0x1c0});if(existsSync(_0xf4c6fa)||isDanglingSymlink(_0xf4c6fa)){const _0x1da108=lstatSync(_0xf4c6fa);if(!_0x1da108[_0x4de790(0x112)]())throw CliErrors[_0x4de790(0x10c)](_0x4de790(0x117)+_0xf4c6fa);const _0x48efa8=resolveSymlinkTarget(_0xf4c6fa);if(!isPathInside(realOrResolved(_0x48efa8),realOrResolved(_0x419a16)))throw CliErrors[_0x4de790(0x10c)](_0x4de790(0x10d)+_0xf4c6fa);if(realOrResolved(_0x48efa8)===realOrResolved(_0x4497a5))return{'path':_0xf4c6fa,'target':_0x4497a5,'action':'unchanged'};return unlinkSync(_0xf4c6fa),symlinkSync(_0x4497a5,_0xf4c6fa,_0x4de790(0x113)),{'path':_0xf4c6fa,'target':_0x4497a5,'action':_0x4de790(0x102)};}return symlinkSync(_0x4497a5,_0xf4c6fa,_0x4de790(0x113)),{'path':_0xf4c6fa,'target':_0x4497a5,'action':_0x4de790(0xe8)};}function managedAppSkillLinkPaths(_0x1af754,_0x22498f){const _0x256708=a100_0x2998;if(!existsSync(_0x1af754))return[];const _0x4d9a1c=_0x22498f+'--';return readdirSync(_0x1af754,{'withFileTypes':!![]})[_0x256708(0xf5)](_0x28ee9a=>_0x28ee9a[_0x256708(0xfc)][_0x256708(0x10b)](_0x4d9a1c))['map'](_0x4ddab6=>resolve(_0x1af754,_0x4ddab6[_0x256708(0xfc)]));}function a100_0x521d(){const _0x428ae2=['6800690pPRbUp','321NJlPdM','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','pruneSkillCodes','unchanged','9zRdGhG','26AbMYey','100981iYHTix','agentsSkillsDir','created','env','16837352DmRChL','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','scopes','accessKey','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isDirectory','278674BOlFYu','activeSkillCodes','10YvkVVx','skillCode','7jcEajk','filter','trim','appCode','get','external-symlink','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','values','name','length','metadata-mismatch','push','21680KWKVgk','personal','updated','not-managed-symlink','set','skipped','896136CCCRkL','245094toSEzr','156nOaCny','managedRoot','60gGmEli','startsWith','validation','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','slice','skill','builtin','has','isSymbolicLink','dir','map','contentHash','scope','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','company'];a100_0x521d=function(){return _0x428ae2;};return a100_0x521d();}function removeManagedSkillLink(_0x2e2a8a,_0x3fa70e){const _0x78d6e1=a100_0x2998,_0x1f3d29=lstatIfPresent(_0x2e2a8a);if(!_0x1f3d29?.[_0x78d6e1(0x112)]())return{'path':_0x2e2a8a,'action':_0x78d6e1(0x105),'reason':_0x78d6e1(0x103)};const _0x98cbd7=resolveSymlinkTarget(_0x2e2a8a);if(!isPathInside(realOrResolved(_0x98cbd7),realOrResolved(_0x3fa70e)))return{'path':_0x2e2a8a,'action':_0x78d6e1(0x105),'reason':_0x78d6e1(0xf9)};return unlinkSync(_0x2e2a8a),{'path':_0x2e2a8a,'action':'removed'};}export function copyManagedSkillDirectory(_0x6705f9,_0x506696){const _0x10a152=a100_0x2998,_0x1ce785=resolve(_0x506696,METADATA_FILE),_0x563a42=existsSync(_0x506696);if(_0x563a42){const _0xc6794c=lstatSync(_0x506696);if(_0xc6794c[_0x10a152(0x112)]())throw CliErrors[_0x10a152(0x10c)](_0x10a152(0xeb)+_0x506696);if(!_0xc6794c[_0x10a152(0xef)]())throw CliErrors[_0x10a152(0x10c)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x506696);const _0x53775c=readMetadataIfPresent(_0x1ce785);if(_0x53775c?.[_0x10a152(0x116)]!==_0x10a152(0x110))throw CliErrors['validation'](_0x10a152(0xfa)+_0x506696);}ensureDirSync(dirname(_0x506696));const _0x1aa60a=_0x563a42?readMetadataIfPresent(_0x1ce785)?.[_0x10a152(0x115)]:undefined,_0x5af28e=readMetadataIfPresent(resolve(_0x6705f9,METADATA_FILE))?.[_0x10a152(0x115)];return _0x563a42&&removeSync(_0x506696),copySkillDirectory(_0x6705f9,_0x506696),{'path':_0x506696,'target':_0x6705f9,'action':!_0x563a42?'created':_0x1aa60a===_0x5af28e?_0x10a152(0xe3):_0x10a152(0x102)};}function copySkillDirectory(_0x19824a,_0x4e9343){copySync(_0x19824a,_0x4e9343,{'dereference':![],'overwrite':!![],'filter'(_0x1041f8){const _0x8acb38=a100_0x2998;if(lstatSync(_0x1041f8)[_0x8acb38(0x112)]())throw CliErrors[_0x8acb38(0x10c)](_0x8acb38(0xe1)+_0x1041f8);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x2635cd,_0x39cfa7){const _0x227d6d=a101_0x1444,_0x254902=_0x2635cd();while(!![]){try{const _0xbcf672=parseInt(_0x227d6d(0x1b3))/0x1+-parseInt(_0x227d6d(0x1be))/0x2+parseInt(_0x227d6d(0x1bc))/0x3+parseInt(_0x227d6d(0x1b4))/0x4*(parseInt(_0x227d6d(0x1c8))/0x5)+-parseInt(_0x227d6d(0x1bd))/0x6*(-parseInt(_0x227d6d(0x1d5))/0x7)+-parseInt(_0x227d6d(0x1ac))/0x8+-parseInt(_0x227d6d(0x1cd))/0x9;if(_0xbcf672===_0x39cfa7)break;else _0x254902['push'](_0x254902['shift']());}catch(_0x56cd86){_0x254902['push'](_0x254902['shift']());}}}(a101_0x2b37,0x3d06e));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a101_0x2b37(){const _0x435036=['values','link','sort','449585UgDEmX','99508qhBxQY','local','tags','skillMdPath','map','trim','env','cache','573378lPIsdu','1660674svFkRc','721494ChqfJj','includes','code','isDirectory','skillCode','filter','dir','accessKey','push','isArray','5JoZjFb','isSymbolicLink','set','scopes','get','500517pdmgfU','appCode','metadataPath','linkedPath','localeCompare','source','linkedPaths','has','7MlbOYU','2208328EjTwXu','name','builtin','scope'];a101_0x2b37=function(){return _0x435036;};return a101_0x2b37();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a101_0x1444(_0x4ce043,_0x23369f){_0x4ce043=_0x4ce043-0x1ac;const _0x2b37bf=a101_0x2b37();let _0x14447b=_0x2b37bf[_0x4ce043];return _0x14447b;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x2ad00b,_0x1e1e0b={}){const _0x4a4479=a101_0x1444,_0x2987f0=safePathSegment(_0x2ad00b[_0x4a4479(0x1ce)],'appCode'),_0x3b453f=normalizeRuntimeSkillScopes(_0x2ad00b[_0x4a4479(0x1cb)]),_0x5e532d=new Set(_0x3b453f),_0x5744f4=_0x2ad00b[_0x4a4479(0x1c0)]?.[_0x4a4479(0x1b9)](),_0x213bd3=new Map(),_0x4c412b=resolve(getRuntimeSkillCacheRoot(_0x2ad00b[_0x4a4479(0x1ba)],_0x2ad00b[_0x4a4479(0x1c5)],_0x1e1e0b),_0x2987f0);for(const _0x582f85 of _0x3b453f){for(const _0x39af4b of localSkillEntryDirs(resolve(_0x4c412b,_0x582f85))){collectLocalRuntimeSkill(_0x213bd3,_0x39af4b,{'appCode':_0x2987f0,'scopes':_0x5e532d,'code':_0x5744f4,'source':_0x4a4479(0x1bb)});}}const _0x3d2a35=resolveSkillSyncPaths(_0x1e1e0b);for(const _0x1b13bb of runtimeAgentSkillRoots(_0x3d2a35)){for(const _0x52e156 of localSkillLinkCandidates(_0x1b13bb,_0x2987f0,_0x5e532d)){collectLocalRuntimeSkill(_0x213bd3,_0x52e156,{'appCode':_0x2987f0,'scopes':_0x5e532d,'code':_0x5744f4,'source':_0x4a4479(0x1b1),'linkedPath':_0x52e156});}}return Array['from'](_0x213bd3[_0x4a4479(0x1b0)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x594722){const _0x20b76b=a101_0x1444;if(!existsSync(_0x594722))return[];return readdirSync(_0x594722,{'withFileTypes':!![]})['filter'](_0x14788b=>_0x14788b[_0x20b76b(0x1c1)]()||_0x14788b['isSymbolicLink']())['map'](_0x4bf373=>resolve(_0x594722,_0x4bf373[_0x20b76b(0x1ad)]));}function localSkillLinkCandidates(_0x37b16f,_0x3b4a01,_0x9f797e){const _0x1e57b9=a101_0x1444;if(!existsSync(_0x37b16f))return[];const _0x45542a=_0x3b4a01+'--';return readdirSync(_0x37b16f,{'withFileTypes':!![]})[_0x1e57b9(0x1c3)](_0xda9f85=>_0xda9f85['isDirectory']()||_0xda9f85[_0x1e57b9(0x1c9)]())['filter'](_0x2dd3fc=>_0x2dd3fc['name']['startsWith'](_0x45542a)||_0x9f797e[_0x1e57b9(0x1d4)](_0x1e57b9(0x1ae)))[_0x1e57b9(0x1b8)](_0x2bbc9a=>resolve(_0x37b16f,_0x2bbc9a['name']));}function collectLocalRuntimeSkill(_0x1fa8ec,_0x4aa8f8,_0x1dc46c){const _0x102a85=a101_0x1444,_0x145f7e=resolve(_0x4aa8f8,METADATA_FILE),_0x13dcc2=readMetadataIfPresent(_0x145f7e);if(!_0x13dcc2)return;if(_0x13dcc2[_0x102a85(0x1ce)]!==_0x1dc46c['appCode'])return;if(!isRuntimeSkillScope(_0x13dcc2['scope'])||!_0x1dc46c[_0x102a85(0x1cb)][_0x102a85(0x1d4)](_0x13dcc2[_0x102a85(0x1af)]))return;const _0x4c936d=_0x13dcc2[_0x102a85(0x1c2)]?.[_0x102a85(0x1b9)]();if(!_0x4c936d)return;if(_0x1dc46c[_0x102a85(0x1c0)]&&_0x4c936d!==_0x1dc46c[_0x102a85(0x1c0)])return;const _0x8d5403=_0x13dcc2[_0x102a85(0x1af)]+':'+_0x4c936d,_0x59b3b9=_0x1dc46c[_0x102a85(0x1d0)]?[_0x1dc46c[_0x102a85(0x1d0)]]:[],_0x171199=_0x1fa8ec[_0x102a85(0x1cc)](_0x8d5403);if(_0x171199){_0x1dc46c[_0x102a85(0x1d2)]===_0x102a85(0x1bb)&&(_0x171199[_0x102a85(0x1c4)]=_0x4aa8f8,_0x171199['cacheDir']=_0x4aa8f8,_0x171199[_0x102a85(0x1b7)]=resolve(_0x4aa8f8,SKILL_FILE),_0x171199[_0x102a85(0x1cf)]=_0x145f7e);for(const _0x47f4ff of _0x59b3b9){!_0x171199['linkedPaths'][_0x102a85(0x1bf)](_0x47f4ff)&&_0x171199['linkedPaths'][_0x102a85(0x1c6)](_0x47f4ff);}_0x171199[_0x102a85(0x1d3)][_0x102a85(0x1b2)]();return;}_0x1fa8ec[_0x102a85(0x1ca)](_0x8d5403,{..._0x13dcc2,'tags':Array[_0x102a85(0x1c7)](_0x13dcc2[_0x102a85(0x1b6)])?_0x13dcc2[_0x102a85(0x1b6)]:[],'scope':_0x13dcc2[_0x102a85(0x1af)],'source':_0x102a85(0x1b5),'dir':_0x4aa8f8,'cacheDir':_0x1dc46c[_0x102a85(0x1d2)]===_0x102a85(0x1bb)?_0x4aa8f8:undefined,'skillMdPath':resolve(_0x4aa8f8,SKILL_FILE),'metadataPath':_0x145f7e,'linkedPaths':_0x59b3b9});}function compareLocalRuntimeSkills(_0x5be142,_0x1fbd3d){const _0x4eb93d=a101_0x1444,_0x5b030c={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5b030c[_0x5be142[_0x4eb93d(0x1af)]]-_0x5b030c[_0x1fbd3d['scope']]||_0x5be142[_0x4eb93d(0x1c2)][_0x4eb93d(0x1d1)](_0x1fbd3d[_0x4eb93d(0x1c2)])||_0x5be142['dir']['localeCompare'](_0x1fbd3d[_0x4eb93d(0x1c4)]);}
1
+ (function(_0x4dc915,_0x54d4b0){const _0x5c7358=a101_0x1e5b,_0x23b141=_0x4dc915();while(!![]){try{const _0x40e0d5=-parseInt(_0x5c7358(0x187))/0x1+-parseInt(_0x5c7358(0x176))/0x2+-parseInt(_0x5c7358(0x185))/0x3*(parseInt(_0x5c7358(0x16d))/0x4)+parseInt(_0x5c7358(0x18a))/0x5*(parseInt(_0x5c7358(0x174))/0x6)+-parseInt(_0x5c7358(0x184))/0x7+-parseInt(_0x5c7358(0x167))/0x8*(-parseInt(_0x5c7358(0x179))/0x9)+parseInt(_0x5c7358(0x183))/0xa*(parseInt(_0x5c7358(0x16c))/0xb);if(_0x40e0d5===_0x54d4b0)break;else _0x23b141['push'](_0x23b141['shift']());}catch(_0x4c7551){_0x23b141['push'](_0x23b141['shift']());}}}(a101_0x319c,0x7d1a6));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a101_0x1e5b(_0x1fda20,_0x47c6ad){_0x1fda20=_0x1fda20-0x163;const _0x319c6b=a101_0x319c();let _0x1e5bb0=_0x319c6b[_0x1fda20];return _0x1e5bb0;}export function listLocalRuntimeSkills(_0x2cbae5,_0x48acb8={}){const _0x31e200=a101_0x1e5b,_0x501b04=safePathSegment(_0x2cbae5[_0x31e200(0x18b)],_0x31e200(0x18b)),_0x10a4a8=normalizeRuntimeSkillScopes(_0x2cbae5['scopes']),_0x414b13=new Set(_0x10a4a8),_0x283d1d=_0x2cbae5[_0x31e200(0x178)]?.['trim'](),_0x31f596=new Map(),_0x56f581=resolve(getRuntimeSkillCacheRoot(_0x2cbae5['env'],_0x2cbae5[_0x31e200(0x168)],_0x48acb8),_0x501b04);for(const _0x39bee4 of _0x10a4a8){for(const _0x11e0db of localSkillEntryDirs(resolve(_0x56f581,_0x39bee4))){collectLocalRuntimeSkill(_0x31f596,_0x11e0db,{'appCode':_0x501b04,'scopes':_0x414b13,'code':_0x283d1d,'source':'cache'});}}const _0x35dc5a=resolveSkillSyncPaths(_0x48acb8);for(const _0x11148e of runtimeAgentSkillRoots(_0x35dc5a)){for(const _0x51d59a of localSkillLinkCandidates(_0x11148e,_0x501b04,_0x414b13)){collectLocalRuntimeSkill(_0x31f596,_0x51d59a,{'appCode':_0x501b04,'scopes':_0x414b13,'code':_0x283d1d,'source':_0x31e200(0x17e),'linkedPath':_0x51d59a});}}return Array[_0x31e200(0x189)](_0x31f596[_0x31e200(0x17d)]())[_0x31e200(0x164)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2f3c87){const _0x11ec83=a101_0x1e5b;if(!existsSync(_0x2f3c87))return[];return readdirSync(_0x2f3c87,{'withFileTypes':!![]})[_0x11ec83(0x173)](_0x309330=>_0x309330['isDirectory']()||_0x309330[_0x11ec83(0x182)]())[_0x11ec83(0x175)](_0x43f595=>resolve(_0x2f3c87,_0x43f595[_0x11ec83(0x16b)]));}function localSkillLinkCandidates(_0x8b475a,_0x40b120,_0x40d435){const _0x1e8e6e=a101_0x1e5b;if(!existsSync(_0x8b475a))return[];const _0x2284d6=_0x40b120+'--';return readdirSync(_0x8b475a,{'withFileTypes':!![]})[_0x1e8e6e(0x173)](_0x5f1aad=>_0x5f1aad[_0x1e8e6e(0x180)]()||_0x5f1aad['isSymbolicLink']())[_0x1e8e6e(0x173)](_0x446563=>_0x446563[_0x1e8e6e(0x16b)][_0x1e8e6e(0x16f)](_0x2284d6)||_0x40d435[_0x1e8e6e(0x177)](_0x1e8e6e(0x181)))[_0x1e8e6e(0x175)](_0x134c3a=>resolve(_0x8b475a,_0x134c3a['name']));}function collectLocalRuntimeSkill(_0xdc095c,_0x4406fe,_0x3089ae){const _0x4a69de=a101_0x1e5b,_0x344b5a=resolve(_0x4406fe,METADATA_FILE),_0x5193b6=readMetadataIfPresent(_0x344b5a);if(!_0x5193b6)return;if(_0x5193b6[_0x4a69de(0x18b)]!==_0x3089ae['appCode'])return;if(!isRuntimeSkillScope(_0x5193b6[_0x4a69de(0x170)])||!_0x3089ae['scopes']['has'](_0x5193b6[_0x4a69de(0x170)]))return;const _0xc0e46b=_0x5193b6[_0x4a69de(0x16a)]?.['trim']();if(!_0xc0e46b)return;if(_0x3089ae['code']&&_0xc0e46b!==_0x3089ae[_0x4a69de(0x178)])return;const _0x5d2236=_0x5193b6[_0x4a69de(0x170)]+':'+_0xc0e46b,_0x2d3447=_0x3089ae[_0x4a69de(0x17b)]?[_0x3089ae[_0x4a69de(0x17b)]]:[],_0x18a10c=_0xdc095c[_0x4a69de(0x165)](_0x5d2236);if(_0x18a10c){_0x3089ae[_0x4a69de(0x166)]===_0x4a69de(0x172)&&(_0x18a10c[_0x4a69de(0x171)]=_0x4406fe,_0x18a10c[_0x4a69de(0x17c)]=_0x4406fe,_0x18a10c[_0x4a69de(0x163)]=resolve(_0x4406fe,SKILL_FILE),_0x18a10c['metadataPath']=_0x344b5a);for(const _0x5d8872 of _0x2d3447){!_0x18a10c[_0x4a69de(0x186)][_0x4a69de(0x169)](_0x5d8872)&&_0x18a10c[_0x4a69de(0x186)][_0x4a69de(0x17a)](_0x5d8872);}_0x18a10c[_0x4a69de(0x186)][_0x4a69de(0x164)]();return;}_0xdc095c['set'](_0x5d2236,{..._0x5193b6,'tags':Array[_0x4a69de(0x16e)](_0x5193b6['tags'])?_0x5193b6[_0x4a69de(0x188)]:[],'scope':_0x5193b6['scope'],'source':'local','dir':_0x4406fe,'cacheDir':_0x3089ae[_0x4a69de(0x166)]===_0x4a69de(0x172)?_0x4406fe:undefined,'skillMdPath':resolve(_0x4406fe,SKILL_FILE),'metadataPath':_0x344b5a,'linkedPaths':_0x2d3447});}function a101_0x319c(){const _0x172bc6=['1883916HfYiYm','linkedPaths','787865fcSzUA','tags','from','845YCchEh','appCode','skillMdPath','sort','get','source','4128JeOquP','accessKey','includes','skillCode','name','10450iZFjZU','4QVloKX','isArray','startsWith','scope','dir','cache','filter','7956VwVGzj','map','174166TLHkBW','has','code','9981zlSGRE','push','linkedPath','cacheDir','values','link','localeCompare','isDirectory','builtin','isSymbolicLink','19980ACQzaq','4753672aKTHNM'];a101_0x319c=function(){return _0x172bc6;};return a101_0x319c();}function compareLocalRuntimeSkills(_0x52b7ef,_0xde3672){const _0x54d04c=a101_0x1e5b,_0xcd8ff8={'personal':0x0,'company':0x1,'builtin':0x2};return _0xcd8ff8[_0x52b7ef[_0x54d04c(0x170)]]-_0xcd8ff8[_0xde3672['scope']]||_0x52b7ef[_0x54d04c(0x16a)][_0x54d04c(0x17f)](_0xde3672[_0x54d04c(0x16a)])||_0x52b7ef['dir']['localeCompare'](_0xde3672[_0x54d04c(0x171)]);}
@@ -1 +1 @@
1
- function a102_0x1a13(){const _0x1e1e44=['size','compare','startsWith','Skill\x20file\x20sha256\x20is\x20invalid:\x20','string','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','toLowerCase','test','isArray','286279WAYPPj','1657878fYDAYF','length','Skill\x20file\x20size\x20is\x20invalid:\x20','has','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','sort','validation','bytes','object','from','content','1013367fQDUgq','Unsafe\x20Skill\x20file\x20path:\x20','localeCompare','isBuffer','path','isFile','10984932TbwNBQ','2772735HNqIYu','values','toString','includes','sha256','457012PncGTB','split','name','replace','606392ZANpMc','Duplicate\x20Skill\x20file\x20path:\x20','isSafeInteger','216BrtgTI','utf8','15hdDPel','trim'];a102_0x1a13=function(){return _0x1e1e44;};return a102_0x1a13();}(function(_0xc5e025,_0x5d6996){const _0x32a6c7=a102_0x3212,_0x3b292b=_0xc5e025();while(!![]){try{const _0x30638c=parseInt(_0x32a6c7(0x12d))/0x1+parseInt(_0x32a6c7(0x139))/0x2*(-parseInt(_0x32a6c7(0x115))/0x3)+-parseInt(_0x32a6c7(0x110))/0x4+parseInt(_0x32a6c7(0x134))/0x5+parseInt(_0x32a6c7(0x122))/0x6+parseInt(_0x32a6c7(0x121))/0x7*(-parseInt(_0x32a6c7(0x113))/0x8)+parseInt(_0x32a6c7(0x133))/0x9;if(_0x30638c===_0x5d6996)break;else _0x3b292b['push'](_0x3b292b['shift']());}catch(_0x2765cd){_0x3b292b['push'](_0x3b292b['shift']());}}}(a102_0x1a13,0xa2b3c));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a102_0x3212(_0xe67b68,_0x2e2129){_0xe67b68=_0xe67b68-0x110;const _0x1a13e9=a102_0x1a13();let _0x321208=_0x1a13e9[_0xe67b68];return _0x321208;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x4bb254){const _0x4e8a38=a102_0x3212;return _0x4bb254['bytes']??Buffer[_0x4e8a38(0x12b)](_0x4bb254[_0x4e8a38(0x12c)]??'',_0x4e8a38(0x114));}export function fileText(_0x5c103b){const _0x22cf72=a102_0x3212;return fileContent(_0x5c103b)[_0x22cf72(0x136)](_0x22cf72(0x114));}export function normalizeLocalFiles(_0x16c01a){const _0x2a5059=a102_0x3212;if(!Array[_0x2a5059(0x120)](_0x16c01a)||_0x16c01a[_0x2a5059(0x123)]===0x0)return[];const _0x3fa5df=new Map();for(const _0x4b634e of _0x16c01a){if(!_0x4b634e||typeof _0x4b634e!==_0x2a5059(0x12a)||typeof _0x4b634e[_0x2a5059(0x131)]!==_0x2a5059(0x11b))throw CliErrors['validation'](_0x2a5059(0x11c));const _0xb42714=normalizeSkillRelativePath(_0x4b634e[_0x2a5059(0x131)]);if(_0x3fa5df[_0x2a5059(0x125)](_0xb42714))throw CliErrors[_0x2a5059(0x128)](_0x2a5059(0x111)+_0xb42714);if(_0x4b634e[_0x2a5059(0x129)]!==undefined&&!Buffer[_0x2a5059(0x130)](_0x4b634e['bytes']))throw CliErrors[_0x2a5059(0x128)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0xb42714);if(_0x4b634e[_0x2a5059(0x129)]===undefined&&typeof _0x4b634e['content']!==_0x2a5059(0x11b))throw CliErrors[_0x2a5059(0x128)](_0x2a5059(0x126)+_0xb42714);const _0x2fd44b=fileContent(_0x4b634e);_0x3fa5df['set'](_0xb42714,{'path':_0xb42714,'bytes':_0x2fd44b});}return Array[_0x2a5059(0x12b)](_0x3fa5df[_0x2a5059(0x135)]())[_0x2a5059(0x127)](compareSkillFiles);}export function normalizeManifestFiles(_0x21575d){const _0x5b161b=a102_0x3212;if(!Array['isArray'](_0x21575d)||_0x21575d[_0x5b161b(0x123)]===0x0)return[];const _0x33befd=new Map();for(const _0x571492 of _0x21575d){if(!_0x571492||typeof _0x571492!==_0x5b161b(0x12a)||typeof _0x571492[_0x5b161b(0x131)]!==_0x5b161b(0x11b))throw CliErrors['validation'](_0x5b161b(0x11c));const _0x3fe55f=normalizeSkillRelativePath(_0x571492[_0x5b161b(0x131)]);if(_0x33befd[_0x5b161b(0x125)](_0x3fe55f))throw CliErrors[_0x5b161b(0x128)](_0x5b161b(0x111)+_0x3fe55f);if(!isSha256Hex(_0x571492[_0x5b161b(0x138)]))throw CliErrors[_0x5b161b(0x128)](_0x5b161b(0x11a)+_0x3fe55f);if(!Number[_0x5b161b(0x112)](_0x571492['size'])||_0x571492[_0x5b161b(0x117)]<0x0)throw CliErrors['validation'](_0x5b161b(0x124)+_0x3fe55f);_0x33befd['set'](_0x3fe55f,{'path':_0x3fe55f,'sha256':_0x571492['sha256'][_0x5b161b(0x11e)](),'size':_0x571492['size']});}return Array[_0x5b161b(0x12b)](_0x33befd['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x37ee64){const _0x5c650c=realpathSync(_0x37ee64),_0xb3d045=[];function _0x516cda(_0xa91c09){const _0x20d9ad=a102_0x3212,_0x4de279=readdirSync(_0xa91c09,{'withFileTypes':!![]})[_0x20d9ad(0x127)]((_0x1b3bea,_0x3595a3)=>_0x1b3bea[_0x20d9ad(0x13b)][_0x20d9ad(0x12f)](_0x3595a3['name']));for(const _0x1dfacd of _0x4de279){if(_0x1dfacd['isDirectory']()&&IGNORED_DIR_NAMES[_0x20d9ad(0x125)](_0x1dfacd[_0x20d9ad(0x13b)]))continue;if(IGNORED_FILE_NAMES[_0x20d9ad(0x125)](_0x1dfacd[_0x20d9ad(0x13b)]))continue;const _0x300a63=resolve(_0xa91c09,_0x1dfacd[_0x20d9ad(0x13b)]);if(_0x1dfacd['isSymbolicLink']())throw CliErrors[_0x20d9ad(0x128)](_0x20d9ad(0x11d)+_0x300a63);const _0x1a8643=toPosixPath(relative(_0x5c650c,_0x300a63));if(_0x1dfacd['isDirectory']()){_0x516cda(_0x300a63);continue;}if(!_0x1dfacd[_0x20d9ad(0x132)]())continue;validateSkillRelativePath(_0x1a8643);const _0xa41d8c=readFileSync(_0x300a63);_0xb3d045['push']({'path':_0x1a8643,'bytes':_0xa41d8c});}}return _0x516cda(_0x5c650c),normalizeLocalFiles(_0xb3d045);}export function compareSkillFiles(_0x28497d,_0xe23159){const _0x3b5224=a102_0x3212;if(_0x28497d[_0x3b5224(0x131)]===SKILL_FILE)return _0xe23159[_0x3b5224(0x131)]===SKILL_FILE?0x0:-0x1;if(_0xe23159[_0x3b5224(0x131)]===SKILL_FILE)return 0x1;return Buffer[_0x3b5224(0x118)](Buffer[_0x3b5224(0x12b)](_0x28497d[_0x3b5224(0x131)],'utf8'),Buffer['from'](_0xe23159[_0x3b5224(0x131)],'utf8'));}export function normalizeSkillRelativePath(_0x2713a4){const _0x45c6cb=a102_0x3212,_0x4c2270=toPosixPath(_0x2713a4[_0x45c6cb(0x116)]());return validateSkillRelativePath(_0x4c2270),_0x4c2270;}export function validateSkillRelativePath(_0x19f760){const _0x3307e4=a102_0x3212;if(!_0x19f760||_0x19f760[_0x3307e4(0x119)]('/')||_0x19f760[_0x3307e4(0x137)]('//'))throw CliErrors[_0x3307e4(0x128)](_0x3307e4(0x12e)+_0x19f760);for(const _0x13d525 of _0x19f760[_0x3307e4(0x13a)]('/')){if(!_0x13d525||_0x13d525==='.'||_0x13d525==='..')throw CliErrors[_0x3307e4(0x128)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x19f760);}}export function toPosixPath(_0x57b8e8){const _0x52e5fc=a102_0x3212;return _0x57b8e8[_0x52e5fc(0x13c)](/\\/g,'/');}export function isSha256Hex(_0x398cc6){const _0x24bcc1=a102_0x3212;return typeof _0x398cc6===_0x24bcc1(0x11b)&&/^[a-fA-F0-9]{64}$/[_0x24bcc1(0x11f)](_0x398cc6);}
1
+ (function(_0x403bce,_0x3a68ae){const _0x555cc6=a102_0x1e06,_0x5d521d=_0x403bce();while(!![]){try{const _0x58a0c3=parseInt(_0x555cc6(0xe9))/0x1*(parseInt(_0x555cc6(0xdd))/0x2)+-parseInt(_0x555cc6(0xe4))/0x3+-parseInt(_0x555cc6(0xca))/0x4*(parseInt(_0x555cc6(0xce))/0x5)+parseInt(_0x555cc6(0xf0))/0x6*(parseInt(_0x555cc6(0xd0))/0x7)+parseInt(_0x555cc6(0xec))/0x8*(parseInt(_0x555cc6(0xd8))/0x9)+-parseInt(_0x555cc6(0xcc))/0xa+-parseInt(_0x555cc6(0xdc))/0xb*(-parseInt(_0x555cc6(0xed))/0xc);if(_0x58a0c3===_0x3a68ae)break;else _0x5d521d['push'](_0x5d521d['shift']());}catch(_0xfcb664){_0x5d521d['push'](_0x5d521d['shift']());}}}(a102_0xb736,0x76521));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';function a102_0x1e06(_0x57ee63,_0x26bf63){_0x57ee63=_0x57ee63-0xc6;const _0xb73695=a102_0xb736();let _0x1e0656=_0xb73695[_0x57ee63];return _0x1e0656;}export function fileContent(_0xefd80c){const _0x2fdd90=a102_0x1e06;return _0xefd80c[_0x2fdd90(0xe6)]??Buffer[_0x2fdd90(0xc6)](_0xefd80c[_0x2fdd90(0xe3)]??'',_0x2fdd90(0xc8));}export function fileText(_0x1ae713){const _0x42ab27=a102_0x1e06;return fileContent(_0x1ae713)['toString'](_0x42ab27(0xc8));}export function normalizeLocalFiles(_0x59e9ab){const _0x494c89=a102_0x1e06;if(!Array['isArray'](_0x59e9ab)||_0x59e9ab[_0x494c89(0xd5)]===0x0)return[];const _0x4721a4=new Map();for(const _0x4e9089 of _0x59e9ab){if(!_0x4e9089||typeof _0x4e9089!==_0x494c89(0xcb)||typeof _0x4e9089['path']!=='string')throw CliErrors[_0x494c89(0xda)](_0x494c89(0xe8));const _0x5325b3=normalizeSkillRelativePath(_0x4e9089[_0x494c89(0xeb)]);if(_0x4721a4[_0x494c89(0xe0)](_0x5325b3))throw CliErrors[_0x494c89(0xda)](_0x494c89(0xd7)+_0x5325b3);if(_0x4e9089[_0x494c89(0xe6)]!==undefined&&!Buffer[_0x494c89(0xd2)](_0x4e9089['bytes']))throw CliErrors[_0x494c89(0xda)](_0x494c89(0xdf)+_0x5325b3);if(_0x4e9089[_0x494c89(0xe6)]===undefined&&typeof _0x4e9089['content']!=='string')throw CliErrors['validation'](_0x494c89(0xe1)+_0x5325b3);const _0x425e84=fileContent(_0x4e9089);_0x4721a4[_0x494c89(0xee)](_0x5325b3,{'path':_0x5325b3,'bytes':_0x425e84});}return Array[_0x494c89(0xc6)](_0x4721a4[_0x494c89(0xea)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x5d1aa4){const _0x3efdf3=a102_0x1e06;if(!Array['isArray'](_0x5d1aa4)||_0x5d1aa4[_0x3efdf3(0xd5)]===0x0)return[];const _0x535126=new Map();for(const _0x3a1004 of _0x5d1aa4){if(!_0x3a1004||typeof _0x3a1004!==_0x3efdf3(0xcb)||typeof _0x3a1004['path']!==_0x3efdf3(0xc7))throw CliErrors['validation'](_0x3efdf3(0xe8));const _0x821854=normalizeSkillRelativePath(_0x3a1004[_0x3efdf3(0xeb)]);if(_0x535126[_0x3efdf3(0xe0)](_0x821854))throw CliErrors[_0x3efdf3(0xda)](_0x3efdf3(0xd7)+_0x821854);if(!isSha256Hex(_0x3a1004[_0x3efdf3(0xef)]))throw CliErrors[_0x3efdf3(0xda)](_0x3efdf3(0xdb)+_0x821854);if(!Number[_0x3efdf3(0xf1)](_0x3a1004[_0x3efdf3(0xd4)])||_0x3a1004[_0x3efdf3(0xd4)]<0x0)throw CliErrors['validation'](_0x3efdf3(0xc9)+_0x821854);_0x535126[_0x3efdf3(0xee)](_0x821854,{'path':_0x821854,'sha256':_0x3a1004[_0x3efdf3(0xef)][_0x3efdf3(0xf2)](),'size':_0x3a1004[_0x3efdf3(0xd4)]});}return Array[_0x3efdf3(0xc6)](_0x535126[_0x3efdf3(0xea)]())[_0x3efdf3(0xe5)](compareSkillFiles);}export function scanSkillDirectory(_0x3f0f8c){const _0x3d71c9=realpathSync(_0x3f0f8c),_0x2881f8=[];function _0x4b3284(_0x3a4777){const _0x5c0801=a102_0x1e06,_0x394cd1=readdirSync(_0x3a4777,{'withFileTypes':!![]})[_0x5c0801(0xe5)]((_0x41b970,_0x5b9d80)=>_0x41b970[_0x5c0801(0xcd)]['localeCompare'](_0x5b9d80[_0x5c0801(0xcd)]));for(const _0x86f3cd of _0x394cd1){if(_0x86f3cd[_0x5c0801(0xe7)]()&&IGNORED_DIR_NAMES[_0x5c0801(0xe0)](_0x86f3cd[_0x5c0801(0xcd)]))continue;if(IGNORED_FILE_NAMES[_0x5c0801(0xe0)](_0x86f3cd[_0x5c0801(0xcd)]))continue;const _0x5190da=resolve(_0x3a4777,_0x86f3cd[_0x5c0801(0xcd)]);if(_0x86f3cd[_0x5c0801(0xe2)]())throw CliErrors['validation'](_0x5c0801(0xd9)+_0x5190da);const _0x5bf3a0=toPosixPath(relative(_0x3d71c9,_0x5190da));if(_0x86f3cd['isDirectory']()){_0x4b3284(_0x5190da);continue;}if(!_0x86f3cd[_0x5c0801(0xd3)]())continue;validateSkillRelativePath(_0x5bf3a0);const _0x58c63f=readFileSync(_0x5190da);_0x2881f8[_0x5c0801(0xd6)]({'path':_0x5bf3a0,'bytes':_0x58c63f});}}return _0x4b3284(_0x3d71c9),normalizeLocalFiles(_0x2881f8);}function a102_0xb736(){const _0x380544=['Unsafe\x20Skill\x20file\x20path:\x20','isBuffer','isFile','size','length','push','Duplicate\x20Skill\x20file\x20path:\x20','27XUfjOW','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','validation','Skill\x20file\x20sha256\x20is\x20invalid:\x20','3002791vtudkR','86296zzIeBW','startsWith','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','has','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isSymbolicLink','content','2705190mydtzY','sort','bytes','isDirectory','Skill\x20file\x20path\x20must\x20be\x20text.','19llguVM','values','path','1172200bkgbND','12dSnndn','set','sha256','6yDvSql','isSafeInteger','toLowerCase','from','string','utf8','Skill\x20file\x20size\x20is\x20invalid:\x20','1296188mFOyJO','object','6664660DYkTIs','name','5NgJWQz','test','5911612yOFxbW'];a102_0xb736=function(){return _0x380544;};return a102_0xb736();}export function compareSkillFiles(_0x3458d1,_0x107132){const _0x3d9742=a102_0x1e06;if(_0x3458d1[_0x3d9742(0xeb)]===SKILL_FILE)return _0x107132['path']===SKILL_FILE?0x0:-0x1;if(_0x107132[_0x3d9742(0xeb)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x3d9742(0xc6)](_0x3458d1[_0x3d9742(0xeb)],_0x3d9742(0xc8)),Buffer[_0x3d9742(0xc6)](_0x107132[_0x3d9742(0xeb)],'utf8'));}export function normalizeSkillRelativePath(_0x538112){const _0x400cdf=toPosixPath(_0x538112['trim']());return validateSkillRelativePath(_0x400cdf),_0x400cdf;}export function validateSkillRelativePath(_0x51f05d){const _0x3461b5=a102_0x1e06;if(!_0x51f05d||_0x51f05d[_0x3461b5(0xde)]('/')||_0x51f05d['includes']('//'))throw CliErrors['validation'](_0x3461b5(0xd1)+_0x51f05d);for(const _0x5d8832 of _0x51f05d['split']('/')){if(!_0x5d8832||_0x5d8832==='.'||_0x5d8832==='..')throw CliErrors[_0x3461b5(0xda)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x51f05d);}}export function toPosixPath(_0x49e051){return _0x49e051['replace'](/\\/g,'/');}export function isSha256Hex(_0x1bdf37){const _0x35066b=a102_0x1e06;return typeof _0x1bdf37===_0x35066b(0xc7)&&/^[a-fA-F0-9]{64}$/[_0x35066b(0xcf)](_0x1bdf37);}
@@ -1 +1 @@
1
- (function(_0x3ac73c,_0x2cdf02){const _0x3b7b5e=a103_0x2f7f,_0x19d792=_0x3ac73c();while(!![]){try{const _0x13f5d8=parseInt(_0x3b7b5e(0x1db))/0x1+-parseInt(_0x3b7b5e(0x1df))/0x2*(-parseInt(_0x3b7b5e(0x1bc))/0x3)+parseInt(_0x3b7b5e(0x1e0))/0x4+-parseInt(_0x3b7b5e(0x1ae))/0x5+-parseInt(_0x3b7b5e(0x1c2))/0x6*(parseInt(_0x3b7b5e(0x1cb))/0x7)+-parseInt(_0x3b7b5e(0x1d3))/0x8*(parseInt(_0x3b7b5e(0x1d1))/0x9)+parseInt(_0x3b7b5e(0x1a6))/0xa*(-parseInt(_0x3b7b5e(0x1aa))/0xb);if(_0x13f5d8===_0x2cdf02)break;else _0x19d792['push'](_0x19d792['shift']());}catch(_0x103f65){_0x19d792['push'](_0x19d792['shift']());}}}(a103_0x47ad,0xa3c0f));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x5f09b4,_0x5b0c7b,_0x2cf32e){const _0x366e39=a103_0x2f7f,_0x54e129=requireSkillCode(_0x5f09b4),_0x158b9e=requirePackageBytes(_0x54e129,_0x2cf32e[_0x366e39(0x1b9)]),_0xd896a=extractDownloadedPackage(_0x158b9e),_0x58b28c=_0xd896a[_0x366e39(0x1c5)](_0x566168=>_0x566168['path']===SKILL_FILE);if(!_0x58b28c)throw CliErrors[_0x366e39(0x1ca)](_0x366e39(0x1d2)+SKILL_FILE+':\x20'+_0x54e129);const _0x38b346=withMaterializedSkillFrontmatter(_0xd896a,_0x5f09b4,_0x54e129),_0x133a01=_0x38b346['find'](_0x1e98b7=>_0x1e98b7['path']===SKILL_FILE),_0x3672cb=fileText(_0x133a01),_0x1aac86=getRuntimeSkillDir(_0x2cf32e[_0x366e39(0x1a7)],_0x2cf32e[_0x366e39(0x1bb)],_0x2cf32e[_0x366e39(0x1c4)],_0x5b0c7b,_0x54e129,_0x2cf32e[_0x366e39(0x1c0)]),_0x2ef52a=resolve(_0x1aac86,SKILL_FILE),_0x3eeb7c=resolve(_0x1aac86,METADATA_FILE),_0x4d4504=contentHash(_0x3672cb),_0x2952aa=readMetadataIfPresent(_0x3eeb7c)?.[_0x366e39(0x1d0)];ensurePulledFilesCanBeOverwritten(_0x1aac86,_0x3eeb7c,_0x38b346,_0x2cf32e[_0x366e39(0x1c9)]===!![]),mkdirSync(_0x1aac86,{'recursive':!![],'mode':0x1c0});const _0x414047=existsSync(_0x2ef52a)?readFileSync(_0x2ef52a,_0x366e39(0x1a8)):undefined;return materializeFiles(_0x1aac86,_0x38b346),removeStaleManagedFiles(_0x1aac86,_0x2952aa,_0x38b346),writeJsonAtomic(_0x3eeb7c,buildMetadata(_0x5f09b4,_0x5b0c7b,_0x2cf32e[_0x366e39(0x1c4)],_0x4d4504,_0x2cf32e[_0x366e39(0x1dd)],_0x38b346,_0x158b9e)),{'skill':_0x5f09b4,'scope':_0x5b0c7b,'dir':_0x1aac86,'skillMdPath':_0x2ef52a,'metadataPath':_0x3eeb7c,'contentHash':_0x4d4504,'changed':_0x414047!==_0x3672cb};}function a103_0x2f7f(_0xc1cc4b,_0x12f1a6){_0xc1cc4b=_0xc1cc4b-0x1a5;const _0x47ad7f=a103_0x47ad();let _0x2f7f2c=_0x47ad7f[_0xc1cc4b];return _0x2f7f2c;}function a103_0x47ad(){const _0x41139e=['412297uEOeFo','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','pulledAt','test','2NgAxIJ','4633768EiCvSV','has','entries','filter','toString','10CheXTP','env','utf8','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','10242122KQlqxK','match','skillName','replace','591785vzElgJ','trim','description:\x20','trimEnd','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','contents','keys','displayName','name:\x20','length','packageBytes','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','accessKey','3398634PCcmwM','contentHash','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','paths','name','36pjTOYk','isFile','appCode','find','join','description','---','force','validation','1007363OcXVTs','path','slice','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','errors','fileHashes','1079721lBtQsj','Runtime\x20Skill\x20package\x20is\x20missing\x20','8Ltlhub','Managed\x20file\x20was\x20removed\x20locally:\x20','map','displayName:\x20','set','delete','flow','\x0a---\x0a\x0a'];a103_0x47ad=function(){return _0x41139e;};return a103_0x47ad();}function withMaterializedSkillFrontmatter(_0x43e540,_0x142e5c,_0x2534be){const _0x555f41=a103_0x2f7f,_0x4448cd=skillDisplayName(_0x142e5c,_0x2534be),_0x209ca2=_0x142e5c[_0x555f41(0x1c7)]?.[_0x555f41(0x1af)]()||_0x4448cd||_0x2534be;return normalizeLocalFiles(_0x43e540)[_0x555f41(0x1d5)](_0x22ba6f=>{const _0x541e79=_0x555f41,_0x5da8eb=fileText(_0x22ba6f);if(_0x22ba6f[_0x541e79(0x1cc)]!==SKILL_FILE)return _0x22ba6f;if(hasYamlFrontmatter(_0x5da8eb))return{'path':_0x22ba6f[_0x541e79(0x1cc)],'content':withSyncedDisplayName(_0x5da8eb,_0x4448cd)};return{'path':_0x22ba6f[_0x541e79(0x1cc)],'content':prependSkillFrontmatter(_0x5da8eb,{'name':_0x2534be,'displayName':_0x4448cd,'description':_0x209ca2})};});}function hasYamlFrontmatter(_0x137c92){const _0x19b51f=a103_0x2f7f;return/^\uFEFF?---\s*\r?\n/[_0x19b51f(0x1de)](_0x137c92);}function prependSkillFrontmatter(_0x3d61ff,_0x27cd0f){const _0x423776=a103_0x2f7f,_0x3b5ced=_0x3d61ff[_0x423776(0x1ad)](/^\uFEFF/,'');return[_0x423776(0x1c8),_0x423776(0x1b7)+yamlString(_0x27cd0f[_0x423776(0x1c1)]),_0x27cd0f[_0x423776(0x1b6)]?_0x423776(0x1d6)+yamlString(_0x27cd0f[_0x423776(0x1b6)]):undefined,_0x423776(0x1b0)+yamlString(_0x27cd0f[_0x423776(0x1c7)]),'---','',_0x3b5ced][_0x423776(0x1e3)](_0x289a84=>_0x289a84!==undefined)[_0x423776(0x1c6)]('\x0a');}function yamlString(_0x2fc160){const _0x1ae98d=a103_0x2f7f;return JSON['stringify'](_0x2fc160[_0x1ae98d(0x1ad)](/\r/g,'')[_0x1ae98d(0x1af)]());}function skillDisplayName(_0x424a36,_0x1f9277){const _0x1c2736=a103_0x2f7f,_0x27452c=_0x424a36[_0x1c2736(0x1ac)]?.[_0x1c2736(0x1af)]();return _0x27452c||_0x1f9277;}function withSyncedDisplayName(_0x5eb579,_0x2296d1){const _0x3422ba=a103_0x2f7f,_0x243881=_0x5eb579[_0x3422ba(0x1ab)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x243881)return _0x5eb579;const _0x1b9411=_0x243881[0x1]??'',_0x502c97=_0x243881[0x2]??'',_0x46f681=parseDocument(_0x502c97);if(_0x46f681[_0x3422ba(0x1cf)][_0x3422ba(0x1b8)]>0x0||!isMap(_0x46f681[_0x3422ba(0x1b4)]))return _0x5eb579;if(_0x2296d1)_0x46f681[_0x3422ba(0x1d7)]('displayName',_0x2296d1);else{if(_0x46f681[_0x3422ba(0x1e1)](_0x3422ba(0x1b6)))_0x46f681[_0x3422ba(0x1d8)](_0x3422ba(0x1b6));else return _0x5eb579;}forceBlockCollections(_0x46f681[_0x3422ba(0x1b4)]);const _0x1b67e2=_0x46f681[_0x3422ba(0x1a5)]({'lineWidth':0x0})[_0x3422ba(0x1b1)](),_0x9227=_0x5eb579[_0x3422ba(0x1cd)](_0x243881[0x0][_0x3422ba(0x1b8)])[_0x3422ba(0x1ad)](/^\r?\n/,'');return _0x1b9411+_0x3422ba(0x1bf)+_0x1b67e2+_0x3422ba(0x1da)+_0x9227;}function forceBlockCollections(_0x3cdf5c){if(!isNode(_0x3cdf5c))return;visit(_0x3cdf5c,(_0x54d4dd,_0x30bfcb)=>{const _0x2b4e06=a103_0x2f7f;isCollection(_0x30bfcb)&&(_0x30bfcb[_0x2b4e06(0x1d9)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1f06f3,_0x418d88,_0x48e836,_0x44fd6b){const _0x71c0ea=a103_0x2f7f;if(_0x44fd6b||!existsSync(_0x418d88))return;const _0x19abaa=readMetadataIfPresent(_0x418d88);if(!_0x19abaa)return;const _0x1945e7=_0x19abaa[_0x71c0ea(0x1d0)]&&Object[_0x71c0ea(0x1b5)](_0x19abaa[_0x71c0ea(0x1d0)])[_0x71c0ea(0x1b8)]>0x0?_0x19abaa[_0x71c0ea(0x1d0)]:undefined;if(_0x1945e7)for(const [_0x6642f3,_0x17ef03]of Object[_0x71c0ea(0x1e2)](_0x1945e7)){const _0x5cd57b=resolveManagedFilePath(_0x1f06f3,_0x6642f3);if(!existsSync(_0x5cd57b))throw CliErrors[_0x71c0ea(0x1ca)](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1d4)+_0x6642f3);const _0x2a1d62=lstatSync(_0x5cd57b);if(!_0x2a1d62['isFile']())throw CliErrors['validation'](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1dc)+_0x6642f3);const _0x4a36d5=bufferSha256(readFileSync(_0x5cd57b));if(_0x4a36d5!==_0x17ef03)throw CliErrors['validation'](_0x71c0ea(0x1be)+_0x1f06f3+_0x71c0ea(0x1b2)+_0x6642f3,_0x71c0ea(0x1b3)+_0x6642f3);}else{const _0x4e2ff9=resolve(_0x1f06f3,SKILL_FILE);if(existsSync(_0x4e2ff9)&&_0x19abaa['contentHash']){const _0xac3fd1=contentHash(readFileSync(_0x4e2ff9,_0x71c0ea(0x1a8)));if(_0xac3fd1!==_0x19abaa[_0x71c0ea(0x1bd)])throw CliErrors[_0x71c0ea(0x1ca)](_0x71c0ea(0x1ce)+_0x4e2ff9,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x1ae74b of normalizeLocalFiles(_0x48e836)){if(_0x1945e7?.[_0x1ae74b[_0x71c0ea(0x1cc)]])continue;if(!_0x1945e7&&_0x1ae74b[_0x71c0ea(0x1cc)]===SKILL_FILE)continue;const _0x4483f4=resolveManagedFilePath(_0x1f06f3,_0x1ae74b['path']);if(!existsSync(_0x4483f4))continue;const _0x273def=lstatSync(_0x4483f4);if(!_0x273def['isFile']())throw CliErrors['validation'](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1a9)+_0x1ae74b['path']);const _0x8b4613=bufferSha256(readFileSync(_0x4483f4));if(_0x8b4613!==fileHash(_0x1ae74b))throw CliErrors[_0x71c0ea(0x1ca)](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1ba)+_0x1ae74b['path']);}}function materializeFiles(_0x446e01,_0xdea142){const _0x3b59d3=a103_0x2f7f;for(const _0x26436a of normalizeLocalFiles(_0xdea142)){const _0xd65fbd=resolveManagedFilePath(_0x446e01,_0x26436a[_0x3b59d3(0x1cc)]);mkdirSync(dirname(_0xd65fbd),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0xd65fbd,fileContent(_0x26436a),0x180);}}function removeStaleManagedFiles(_0x4496e2,_0x14ff56,_0x180a19){const _0x17cecb=a103_0x2f7f;if(!_0x14ff56)return;const _0x4d2c0a=new Set(normalizeLocalFiles(_0x180a19)[_0x17cecb(0x1d5)](_0x356822=>_0x356822['path']));for(const _0x4d5acd of Object[_0x17cecb(0x1b5)](_0x14ff56)){if(_0x4d2c0a[_0x17cecb(0x1e1)](_0x4d5acd))continue;const _0x519f93=resolveManagedFilePath(_0x4496e2,_0x4d5acd);existsSync(_0x519f93)&&lstatSync(_0x519f93)[_0x17cecb(0x1c3)]()&&rmSync(_0x519f93,{'force':!![]});}}
1
+ (function(_0x3aa6b1,_0x122d2d){const _0x265907=a103_0x528b,_0x199c58=_0x3aa6b1();while(!![]){try{const _0x46391a=-parseInt(_0x265907(0x19e))/0x1*(parseInt(_0x265907(0x1ac))/0x2)+parseInt(_0x265907(0x1a8))/0x3+parseInt(_0x265907(0x1ae))/0x4*(-parseInt(_0x265907(0x1cd))/0x5)+-parseInt(_0x265907(0x19b))/0x6+parseInt(_0x265907(0x1b7))/0x7*(parseInt(_0x265907(0x1d0))/0x8)+parseInt(_0x265907(0x1c5))/0x9*(-parseInt(_0x265907(0x1bb))/0xa)+-parseInt(_0x265907(0x1c4))/0xb*(-parseInt(_0x265907(0x1c2))/0xc);if(_0x46391a===_0x122d2d)break;else _0x199c58['push'](_0x199c58['shift']());}catch(_0xa67086){_0x199c58['push'](_0x199c58['shift']());}}}(a103_0x36c8,0x745fd));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a103_0x528b(_0x47f0e2,_0xb727e9){_0x47f0e2=_0x47f0e2-0x193;const _0x36c8d0=a103_0x36c8();let _0x528ba9=_0x36c8d0[_0x47f0e2];return _0x528ba9;}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x495bf9,_0xf7903f,_0x13a149){const _0xa1eb8b=a103_0x528b,_0x1602e7=requireSkillCode(_0x495bf9),_0x125299=requirePackageBytes(_0x1602e7,_0x13a149[_0xa1eb8b(0x1c8)]),_0x4c5c2b=extractDownloadedPackage(_0x125299),_0x2da136=_0x4c5c2b[_0xa1eb8b(0x1a5)](_0x33a7be=>_0x33a7be['path']===SKILL_FILE);if(!_0x2da136)throw CliErrors[_0xa1eb8b(0x198)](_0xa1eb8b(0x1a3)+SKILL_FILE+':\x20'+_0x1602e7);const _0x32a3c7=withMaterializedSkillFrontmatter(_0x4c5c2b,_0x495bf9,_0x1602e7),_0x35dbf1=_0x32a3c7['find'](_0x167b6b=>_0x167b6b['path']===SKILL_FILE),_0x8f167e=fileText(_0x35dbf1),_0xdbf45c=getRuntimeSkillDir(_0x13a149[_0xa1eb8b(0x1bf)],_0x13a149[_0xa1eb8b(0x199)],_0x13a149[_0xa1eb8b(0x19f)],_0xf7903f,_0x1602e7,_0x13a149[_0xa1eb8b(0x1c9)]),_0x3172fe=resolve(_0xdbf45c,SKILL_FILE),_0x527619=resolve(_0xdbf45c,METADATA_FILE),_0x158555=contentHash(_0x8f167e),_0x1c69bb=readMetadataIfPresent(_0x527619)?.[_0xa1eb8b(0x194)];ensurePulledFilesCanBeOverwritten(_0xdbf45c,_0x527619,_0x32a3c7,_0x13a149[_0xa1eb8b(0x1b4)]===!![]),mkdirSync(_0xdbf45c,{'recursive':!![],'mode':0x1c0});const _0x506052=existsSync(_0x3172fe)?readFileSync(_0x3172fe,'utf8'):undefined;return materializeFiles(_0xdbf45c,_0x32a3c7),removeStaleManagedFiles(_0xdbf45c,_0x1c69bb,_0x32a3c7),writeJsonAtomic(_0x527619,buildMetadata(_0x495bf9,_0xf7903f,_0x13a149[_0xa1eb8b(0x19f)],_0x158555,_0x13a149[_0xa1eb8b(0x1cc)],_0x32a3c7,_0x125299)),{'skill':_0x495bf9,'scope':_0xf7903f,'dir':_0xdbf45c,'skillMdPath':_0x3172fe,'metadataPath':_0x527619,'contentHash':_0x158555,'changed':_0x506052!==_0x8f167e};}function withMaterializedSkillFrontmatter(_0x34a4bd,_0x1e9ed9,_0x5409cc){const _0x2518fe=a103_0x528b,_0x2bbfcd=skillDisplayName(_0x1e9ed9,_0x5409cc),_0x56cfb3=_0x1e9ed9[_0x2518fe(0x1a6)]?.['trim']()||_0x2bbfcd||_0x5409cc;return normalizeLocalFiles(_0x34a4bd)['map'](_0x57320b=>{const _0x5a573a=_0x2518fe,_0x132566=fileText(_0x57320b);if(_0x57320b[_0x5a573a(0x1cb)]!==SKILL_FILE)return _0x57320b;if(hasYamlFrontmatter(_0x132566))return{'path':_0x57320b[_0x5a573a(0x1cb)],'content':withSyncedDisplayName(_0x132566,_0x2bbfcd)};return{'path':_0x57320b['path'],'content':prependSkillFrontmatter(_0x132566,{'name':_0x5409cc,'displayName':_0x2bbfcd,'description':_0x56cfb3})};});}function a103_0x36c8(){const _0x4f13fa=['279zEdGXV','match','length','packageBytes','paths','flow','path','pulledAt','25vcbZwR','skillName','has','200FFePZT','name:\x20','fileHashes','map','set','toString','validation','accessKey','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','3255642MAgZwH','utf8','displayName:\x20','1410YqftYZ','appCode','contentHash','contents','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','find','description','delete','2778354Wotlrh','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','test','Managed\x20file\x20was\x20removed\x20locally:\x20','1176nbBurB','description:\x20','40052wdmbYo','.\x20Changed\x20file:\x20','replace','join','\x0a---\x0a\x0a','keys','force','entries','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','177590iBBJDy','errors','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','displayName','141140fdsliJ','---','---\x0a','isFile','env','slice','trim','3102348VcGrFg','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','33lkDpfB'];a103_0x36c8=function(){return _0x4f13fa;};return a103_0x36c8();}function hasYamlFrontmatter(_0x4a9ae6){const _0x146b88=a103_0x528b;return/^\uFEFF?---\s*\r?\n/[_0x146b88(0x1aa)](_0x4a9ae6);}function prependSkillFrontmatter(_0xbd3fe0,_0x3599c3){const _0x187481=a103_0x528b,_0x21b034=_0xbd3fe0[_0x187481(0x1b0)](/^\uFEFF/,'');return[_0x187481(0x1bc),_0x187481(0x193)+yamlString(_0x3599c3['name']),_0x3599c3[_0x187481(0x1ba)]?_0x187481(0x19d)+yamlString(_0x3599c3['displayName']):undefined,_0x187481(0x1ad)+yamlString(_0x3599c3[_0x187481(0x1a6)]),_0x187481(0x1bc),'',_0x21b034]['filter'](_0x63c02c=>_0x63c02c!==undefined)[_0x187481(0x1b1)]('\x0a');}function yamlString(_0xa32e2){const _0x4612f4=a103_0x528b;return JSON['stringify'](_0xa32e2[_0x4612f4(0x1b0)](/\r/g,'')[_0x4612f4(0x1c1)]());}function skillDisplayName(_0x58669f,_0x2a80eb){const _0x33b252=a103_0x528b,_0x1dde42=_0x58669f[_0x33b252(0x1ce)]?.[_0x33b252(0x1c1)]();return _0x1dde42||_0x2a80eb;}function withSyncedDisplayName(_0x4ddd7d,_0x5c74f4){const _0x258389=a103_0x528b,_0x264d3c=_0x4ddd7d[_0x258389(0x1c6)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x264d3c)return _0x4ddd7d;const _0x39d7ba=_0x264d3c[0x1]??'',_0x52d79b=_0x264d3c[0x2]??'',_0x528000=parseDocument(_0x52d79b);if(_0x528000[_0x258389(0x1b8)][_0x258389(0x1c7)]>0x0||!isMap(_0x528000[_0x258389(0x1a1)]))return _0x4ddd7d;if(_0x5c74f4)_0x528000[_0x258389(0x196)](_0x258389(0x1ba),_0x5c74f4);else{if(_0x528000[_0x258389(0x1cf)]('displayName'))_0x528000[_0x258389(0x1a7)](_0x258389(0x1ba));else return _0x4ddd7d;}forceBlockCollections(_0x528000[_0x258389(0x1a1)]);const _0x5a341c=_0x528000[_0x258389(0x197)]({'lineWidth':0x0})['trimEnd'](),_0x38c8b0=_0x4ddd7d[_0x258389(0x1c0)](_0x264d3c[0x0][_0x258389(0x1c7)])[_0x258389(0x1b0)](/^\r?\n/,'');return _0x39d7ba+_0x258389(0x1bd)+_0x5a341c+_0x258389(0x1b2)+_0x38c8b0;}function forceBlockCollections(_0x44b94f){if(!isNode(_0x44b94f))return;visit(_0x44b94f,(_0x129209,_0x38b68c)=>{const _0x4c9251=a103_0x528b;isCollection(_0x38b68c)&&(_0x38b68c[_0x4c9251(0x1ca)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2353c5,_0x3ded13,_0x6bac66,_0x3a80dc){const _0x11cfe9=a103_0x528b;if(_0x3a80dc||!existsSync(_0x3ded13))return;const _0x5bd05c=readMetadataIfPresent(_0x3ded13);if(!_0x5bd05c)return;const _0x10d180=_0x5bd05c[_0x11cfe9(0x194)]&&Object['keys'](_0x5bd05c[_0x11cfe9(0x194)])[_0x11cfe9(0x1c7)]>0x0?_0x5bd05c['fileHashes']:undefined;if(_0x10d180)for(const [_0x19f932,_0x2f56e3]of Object[_0x11cfe9(0x1b5)](_0x10d180)){const _0x497fbf=resolveManagedFilePath(_0x2353c5,_0x19f932);if(!existsSync(_0x497fbf))throw CliErrors[_0x11cfe9(0x198)](_0x11cfe9(0x1a9)+_0x2353c5,_0x11cfe9(0x1ab)+_0x19f932);const _0x57bb70=lstatSync(_0x497fbf);if(!_0x57bb70[_0x11cfe9(0x1be)]())throw CliErrors[_0x11cfe9(0x198)](_0x11cfe9(0x1a9)+_0x2353c5,_0x11cfe9(0x1c3)+_0x19f932);const _0x58468e=bufferSha256(readFileSync(_0x497fbf));if(_0x58468e!==_0x2f56e3)throw CliErrors[_0x11cfe9(0x198)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2353c5+_0x11cfe9(0x1af)+_0x19f932,_0x11cfe9(0x19a)+_0x19f932);}else{const _0x1b9916=resolve(_0x2353c5,SKILL_FILE);if(existsSync(_0x1b9916)&&_0x5bd05c['contentHash']){const _0x4a4705=contentHash(readFileSync(_0x1b9916,_0x11cfe9(0x19c)));if(_0x4a4705!==_0x5bd05c[_0x11cfe9(0x1a0)])throw CliErrors['validation'](_0x11cfe9(0x1b9)+_0x1b9916,_0x11cfe9(0x1a4));}}for(const _0x3dabd4 of normalizeLocalFiles(_0x6bac66)){if(_0x10d180?.[_0x3dabd4[_0x11cfe9(0x1cb)]])continue;if(!_0x10d180&&_0x3dabd4['path']===SKILL_FILE)continue;const _0x5ab0d9=resolveManagedFilePath(_0x2353c5,_0x3dabd4[_0x11cfe9(0x1cb)]);if(!existsSync(_0x5ab0d9))continue;const _0x582d50=lstatSync(_0x5ab0d9);if(!_0x582d50[_0x11cfe9(0x1be)]())throw CliErrors[_0x11cfe9(0x198)](_0x11cfe9(0x1a9)+_0x2353c5,_0x11cfe9(0x1a2)+_0x3dabd4[_0x11cfe9(0x1cb)]);const _0x32fc50=bufferSha256(readFileSync(_0x5ab0d9));if(_0x32fc50!==fileHash(_0x3dabd4))throw CliErrors[_0x11cfe9(0x198)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2353c5,_0x11cfe9(0x1b6)+_0x3dabd4[_0x11cfe9(0x1cb)]);}}function materializeFiles(_0x48de71,_0x2cece0){for(const _0x39ec3d of normalizeLocalFiles(_0x2cece0)){const _0x2f12e5=resolveManagedFilePath(_0x48de71,_0x39ec3d['path']);mkdirSync(dirname(_0x2f12e5),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2f12e5,fileContent(_0x39ec3d),0x180);}}function removeStaleManagedFiles(_0x697e93,_0x2ceb78,_0x18dd00){const _0x2832cd=a103_0x528b;if(!_0x2ceb78)return;const _0x1dc2e6=new Set(normalizeLocalFiles(_0x18dd00)[_0x2832cd(0x195)](_0x27c8c9=>_0x27c8c9[_0x2832cd(0x1cb)]));for(const _0x2c4268 of Object[_0x2832cd(0x1b3)](_0x2ceb78)){if(_0x1dc2e6['has'](_0x2c4268))continue;const _0x257adc=resolveManagedFilePath(_0x697e93,_0x2c4268);existsSync(_0x257adc)&&lstatSync(_0x257adc)['isFile']()&&rmSync(_0x257adc,{'force':!![]});}}