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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/NOTICE +5 -0
  2. package/README.md +156 -0
  3. package/lib/cli.js +1 -1
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.js +1 -1
  6. package/lib/commands/app/definitions.js +1 -1
  7. package/lib/commands/app/eligibility.js +1 -1
  8. package/lib/commands/app/mock-loader.js +1 -1
  9. package/lib/commands/app/remote-source.js +1 -1
  10. package/lib/commands/app/shared.js +1 -1
  11. package/lib/commands/app-config/get.js +1 -1
  12. package/lib/commands/app-config/index.js +1 -1
  13. package/lib/commands/app-config/shared.js +1 -1
  14. package/lib/commands/artifact/index.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/index.js +1 -1
  28. package/lib/commands/dataset/detail.js +1 -1
  29. package/lib/commands/dataset/index.js +1 -1
  30. package/lib/commands/dataset/list.js +1 -1
  31. package/lib/commands/dataset/sdk-doc.js +1 -1
  32. package/lib/commands/doctor.js +1 -1
  33. package/lib/commands/file/index.js +1 -1
  34. package/lib/commands/init.js +1 -1
  35. package/lib/commands/kb/index.js +1 -1
  36. package/lib/commands/logs/index.js +1 -1
  37. package/lib/commands/ocr/index.js +1 -1
  38. package/lib/commands/personal-bff/index.js +1 -1
  39. package/lib/commands/registry.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.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/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +18 -2
@@ -1 +1 @@
1
- function a86_0x2f45(_0x5f19c2,_0x2003ac){_0x5f19c2=_0x5f19c2-0x18f;const _0x4930c3=a86_0x4930();let _0x2f45b5=_0x4930c3[_0x5f19c2];return _0x2f45b5;}(function(_0x1cfd92,_0x55e925){const _0x3d159c=a86_0x2f45,_0xd7c87a=_0x1cfd92();while(!![]){try{const _0x4c22fb=-parseInt(_0x3d159c(0x1a0))/0x1*(parseInt(_0x3d159c(0x19f))/0x2)+parseInt(_0x3d159c(0x1a8))/0x3*(-parseInt(_0x3d159c(0x1a6))/0x4)+parseInt(_0x3d159c(0x192))/0x5+-parseInt(_0x3d159c(0x190))/0x6*(parseInt(_0x3d159c(0x1ab))/0x7)+-parseInt(_0x3d159c(0x19a))/0x8*(parseInt(_0x3d159c(0x1a5))/0x9)+parseInt(_0x3d159c(0x1a9))/0xa*(-parseInt(_0x3d159c(0x1a4))/0xb)+parseInt(_0x3d159c(0x1aa))/0xc;if(_0x4c22fb===_0x55e925)break;else _0xd7c87a['push'](_0xd7c87a['shift']());}catch(_0x422c61){_0xd7c87a['push'](_0xd7c87a['shift']());}}}(a86_0x4930,0x75206));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x45ae8a,_0x2cfd02,_0x4bfa59){const _0x320af8=a86_0x2f45,_0x257eb9=buildConfirmationContext(_0x45ae8a,_0x2cfd02,_0x4bfa59),_0x77b45d=[_0x320af8(0x1a3)+_0x257eb9[_0x320af8(0x196)]];return _0x257eb9[_0x320af8(0x197)]&&_0x77b45d[_0x320af8(0x1a1)](_0x320af8(0x1a2)+_0x257eb9[_0x320af8(0x197)]),_0x257eb9[_0x320af8(0x194)]&&_0x77b45d[_0x320af8(0x1a1)](_0x320af8(0x198)+_0x257eb9[_0x320af8(0x194)]),_0x77b45d[_0x320af8(0x1a1)](_0x320af8(0x1a7)),_0x77b45d;}export function reconstructCommandArgv(_0x106af1,_0x4ec2f9){const _0x51dcd7=a86_0x2f45,_0x54f451=[CLI_BIN_NAME,_0x106af1[_0x51dcd7(0x193)],_0x106af1[_0x51dcd7(0x199)]];for(const [_0x52ba66,_0x22feba]of Object[_0x51dcd7(0x19d)](_0x4ec2f9)){if(_0x22feba===!![])_0x54f451[_0x51dcd7(0x1a1)]('--'+_0x52ba66);else _0x22feba!==![]&&_0x22feba!==undefined&&_0x22feba!==''&&_0x54f451[_0x51dcd7(0x1a1)]('--'+_0x52ba66+'\x20'+JSON[_0x51dcd7(0x1ac)](_0x22feba));}return _0x54f451[_0x51dcd7(0x1a1)]('--yes'),_0x54f451[_0x51dcd7(0x191)]('\x20');}function buildConfirmationContext(_0x422196,_0x4850d0,_0x1b7048){const _0x1c88f2=a86_0x2f45,_0x397684=extractAffectedRecords(_0x1b7048);return{'commandLabel':_0x4850d0,'description':_0x422196[_0x1c88f2(0x197)],'affectedRecords':_0x397684};}function a86_0x4930(){const _0x141025=['\x20\x20\x20','⚠\x20\x20High-risk\x20operation:\x20','241758cZtuLv','31932uWLmZN','2213976QLeOcN','\x20\x20\x20Continue?\x20[y/N]\x20','3PYeIUE','140cVBGKu','26338308ViOjSA','610554lqpyUV','stringify','length','12onwnah','join','3321355OiLBqP','service','affectedRecords','code=','commandLabel','description','\x20\x20\x20Affected:\x20','command','1336tWboYM','id=','name','entries','code','4TnzlCX','375617hixZQN','push'];a86_0x4930=function(){return _0x141025;};return a86_0x4930();}function extractAffectedRecords(_0x32df5b){const _0x476af1=a86_0x2f45,_0x3c1701=[];if(_0x32df5b['code'])_0x3c1701[_0x476af1(0x1a1)](_0x476af1(0x195)+_0x32df5b[_0x476af1(0x19e)]);if(_0x32df5b['id'])_0x3c1701[_0x476af1(0x1a1)](_0x476af1(0x19b)+_0x32df5b['id']);if(_0x32df5b[_0x476af1(0x19c)])_0x3c1701[_0x476af1(0x1a1)]('name='+_0x32df5b[_0x476af1(0x19c)]);if(_0x32df5b['params'])_0x3c1701[_0x476af1(0x1a1)]('params='+_0x32df5b['params']);return _0x3c1701[_0x476af1(0x18f)]>0x0?_0x3c1701[_0x476af1(0x191)](',\x20'):undefined;}
1
+ (function(_0x2c9766,_0x579b81){const _0x181e16=a86_0x2858,_0x1b931c=_0x2c9766();while(!![]){try{const _0x10e1ee=parseInt(_0x181e16(0x1f4))/0x1*(parseInt(_0x181e16(0x1fd))/0x2)+-parseInt(_0x181e16(0x1ea))/0x3*(parseInt(_0x181e16(0x1f7))/0x4)+parseInt(_0x181e16(0x1e9))/0x5+-parseInt(_0x181e16(0x1f2))/0x6*(-parseInt(_0x181e16(0x1fe))/0x7)+parseInt(_0x181e16(0x1fc))/0x8*(parseInt(_0x181e16(0x1ed))/0x9)+parseInt(_0x181e16(0x1ef))/0xa*(-parseInt(_0x181e16(0x1ff))/0xb)+-parseInt(_0x181e16(0x1ec))/0xc;if(_0x10e1ee===_0x579b81)break;else _0x1b931c['push'](_0x1b931c['shift']());}catch(_0x31eed9){_0x1b931c['push'](_0x1b931c['shift']());}}}(a86_0x4c8d,0x4e6e6));function a86_0x2858(_0x335649,_0x2fa656){_0x335649=_0x335649-0x1e4;const _0x4c8dab=a86_0x4c8d();let _0x2858ac=_0x4c8dab[_0x335649];return _0x2858ac;}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x15b5c3,_0x3eaad9,_0x15c1f3){const _0x4854b6=a86_0x2858,_0x2e199f=buildConfirmationContext(_0x15b5c3,_0x3eaad9,_0x15c1f3),_0xd2fb5a=[_0x4854b6(0x1eb)+_0x2e199f['commandLabel']];return _0x2e199f[_0x4854b6(0x1ee)]&&_0xd2fb5a['push'](_0x4854b6(0x1f1)+_0x2e199f['description']),_0x2e199f[_0x4854b6(0x1e5)]&&_0xd2fb5a[_0x4854b6(0x1e6)]('\x20\x20\x20Affected:\x20'+_0x2e199f[_0x4854b6(0x1e5)]),_0xd2fb5a[_0x4854b6(0x1e6)](_0x4854b6(0x1f5)),_0xd2fb5a;}export function reconstructCommandArgv(_0x276089,_0x41317b){const _0x4f9710=a86_0x2858,_0x4c79d2=[CLI_BIN_NAME,_0x276089[_0x4f9710(0x1f8)],_0x276089[_0x4f9710(0x1fb)]];for(const [_0x457f4c,_0x3e1049]of Object[_0x4f9710(0x1e7)](_0x41317b)){if(_0x3e1049===!![])_0x4c79d2[_0x4f9710(0x1e6)]('--'+_0x457f4c);else _0x3e1049!==![]&&_0x3e1049!==undefined&&_0x3e1049!==''&&_0x4c79d2[_0x4f9710(0x1e6)]('--'+_0x457f4c+'\x20'+JSON[_0x4f9710(0x1fa)](_0x3e1049));}return _0x4c79d2[_0x4f9710(0x1e6)]('--yes'),_0x4c79d2['join']('\x20');}function a86_0x4c8d(){const _0x301347=['id=','5Tdbscv','\x20\x20\x20Continue?\x20[y/N]\x20','length','4gIhPMu','service','code','stringify','command','392vVTsJZ','256134hszUaE','26887TDDuhq','2794ZvalDK','name','join','affectedRecords','push','entries','code=','634500jpHzdK','571707MbUwaS','⚠\x20\x20High-risk\x20operation:\x20','8726304ihSMkd','88569lHaCKZ','description','22640GXgOHP','params','\x20\x20\x20','882pybhxm'];a86_0x4c8d=function(){return _0x301347;};return a86_0x4c8d();}function buildConfirmationContext(_0xb2d550,_0x2d54a7,_0x4808dc){const _0x498289=extractAffectedRecords(_0x4808dc);return{'commandLabel':_0x2d54a7,'description':_0xb2d550['description'],'affectedRecords':_0x498289};}function extractAffectedRecords(_0x5c9044){const _0x1d822c=a86_0x2858,_0x4ed64b=[];if(_0x5c9044[_0x1d822c(0x1f9)])_0x4ed64b[_0x1d822c(0x1e6)](_0x1d822c(0x1e8)+_0x5c9044[_0x1d822c(0x1f9)]);if(_0x5c9044['id'])_0x4ed64b[_0x1d822c(0x1e6)](_0x1d822c(0x1f3)+_0x5c9044['id']);if(_0x5c9044[_0x1d822c(0x200)])_0x4ed64b['push']('name='+_0x5c9044['name']);if(_0x5c9044['params'])_0x4ed64b[_0x1d822c(0x1e6)]('params='+_0x5c9044[_0x1d822c(0x1f0)]);return _0x4ed64b[_0x1d822c(0x1f6)]>0x0?_0x4ed64b[_0x1d822c(0x1e4)](',\x20'):undefined;}
@@ -1 +1 @@
1
- function a87_0x11d3(_0x263fe2,_0x126385){_0x263fe2=_0x263fe2-0x124;const _0x5595bf=a87_0x5595();let _0x11d37e=_0x5595bf[_0x263fe2];return _0x11d37e;}(function(_0x2efca7,_0x2e0444){const _0x384b3c=a87_0x11d3,_0x40ee46=_0x2efca7();while(!![]){try{const _0x347c97=parseInt(_0x384b3c(0x133))/0x1+-parseInt(_0x384b3c(0x12b))/0x2*(-parseInt(_0x384b3c(0x12e))/0x3)+-parseInt(_0x384b3c(0x134))/0x4+-parseInt(_0x384b3c(0x125))/0x5*(-parseInt(_0x384b3c(0x132))/0x6)+-parseInt(_0x384b3c(0x130))/0x7*(-parseInt(_0x384b3c(0x127))/0x8)+parseInt(_0x384b3c(0x12a))/0x9*(-parseInt(_0x384b3c(0x131))/0xa)+-parseInt(_0x384b3c(0x124))/0xb;if(_0x347c97===_0x2e0444)break;else _0x40ee46['push'](_0x40ee46['shift']());}catch(_0x150739){_0x40ee46['push'](_0x40ee46['shift']());}}}(a87_0x5595,0x2211b));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x1d0f08){const _0x277530=a87_0x11d3;if(_0x1d0f08 instanceof LovrabetError)return CliErrors[_0x277530(0x129)](userFacingLovrabetMessage(_0x1d0f08));return _0x1d0f08;}function a87_0x5595(){const _0x11dbf5=['150biPGAl','214460mvDGXs','287856gDwGbg','2576112vilDCt','230RHUxXg','trim','664zZErcR','string','validation','45xfyzeh','36818lnIRgX','message','stringify','12feSQGE','description','19348TFbdxh','145910KxqKXh'];a87_0x5595=function(){return _0x11dbf5;};return a87_0x5595();}function userFacingLovrabetMessage(_0x3814fc){const _0x1215ac=a87_0x11d3,_0x34265e=_0x3814fc[_0x1215ac(0x12f)];if(_0x34265e!==undefined&&_0x34265e!==null){if(typeof _0x34265e===_0x1215ac(0x128)&&_0x34265e[_0x1215ac(0x126)]())return _0x34265e[_0x1215ac(0x126)]();try{return JSON[_0x1215ac(0x12d)](_0x34265e);}catch{}}return _0x3814fc[_0x1215ac(0x12c)];}
1
+ (function(_0xaad3a,_0x554bfb){const _0x19088d=a87_0x13c9,_0x5c2e4d=_0xaad3a();while(!![]){try{const _0x166ad0=parseInt(_0x19088d(0x128))/0x1*(parseInt(_0x19088d(0x12f))/0x2)+-parseInt(_0x19088d(0x12d))/0x3*(parseInt(_0x19088d(0x12e))/0x4)+-parseInt(_0x19088d(0x12b))/0x5+-parseInt(_0x19088d(0x125))/0x6*(-parseInt(_0x19088d(0x127))/0x7)+-parseInt(_0x19088d(0x131))/0x8+parseInt(_0x19088d(0x124))/0x9+parseInt(_0x19088d(0x12c))/0xa;if(_0x166ad0===_0x554bfb)break;else _0x5c2e4d['push'](_0x5c2e4d['shift']());}catch(_0x231629){_0x5c2e4d['push'](_0x5c2e4d['shift']());}}}(a87_0x4135,0x8b639));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0xc9fa58){const _0x3e8750=a87_0x13c9;if(_0xc9fa58 instanceof LovrabetError)return CliErrors[_0x3e8750(0x130)](userFacingLovrabetMessage(_0xc9fa58));return _0xc9fa58;}function userFacingLovrabetMessage(_0x751a08){const _0x368839=a87_0x13c9,_0x226c51=_0x751a08['description'];if(_0x226c51!==undefined&&_0x226c51!==null){if(typeof _0x226c51==='string'&&_0x226c51[_0x368839(0x129)]())return _0x226c51[_0x368839(0x129)]();try{return JSON[_0x368839(0x126)](_0x226c51);}catch{}}return _0x751a08[_0x368839(0x12a)];}function a87_0x13c9(_0x4feefa,_0x5f1217){_0x4feefa=_0x4feefa-0x124;const _0x41358c=a87_0x4135();let _0x13c906=_0x41358c[_0x4feefa];return _0x13c906;}function a87_0x4135(){const _0x1ca264=['trim','message','2378590qbfvuW','16919890AAUFrB','1662927xrUGtB','8xbyVVF','8bSLFSI','validation','7886272ojtszw','4200390DDUMFs','1384356pBWiqf','stringify','7dSiKky','187908NfSazF'];a87_0x4135=function(){return _0x1ca264;};return a87_0x4135();}
@@ -1 +1 @@
1
- const a88_0x492026=a88_0x4c65;(function(_0x69df70,_0x14f573){const _0x4090f5=a88_0x4c65,_0x381311=_0x69df70();while(!![]){try{const _0x1f3c16=parseInt(_0x4090f5(0x13e))/0x1*(-parseInt(_0x4090f5(0x16a))/0x2)+parseInt(_0x4090f5(0x15b))/0x3*(parseInt(_0x4090f5(0x13b))/0x4)+-parseInt(_0x4090f5(0x151))/0x5+-parseInt(_0x4090f5(0x152))/0x6+-parseInt(_0x4090f5(0x131))/0x7*(parseInt(_0x4090f5(0x130))/0x8)+parseInt(_0x4090f5(0x170))/0x9+-parseInt(_0x4090f5(0x149))/0xa*(-parseInt(_0x4090f5(0x15d))/0xb);if(_0x1f3c16===_0x14f573)break;else _0x381311['push'](_0x381311['shift']());}catch(_0x4f32aa){_0x381311['push'](_0x381311['shift']());}}}(a88_0x55bc,0x5e9a0));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';function a88_0x55bc(){const _0x2ea959=['doctor','currentApp','ClientAk','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','requiresAppCode','90365LzKWHs','564414kmhseh','error','appcode','trim','items','newConfigFileName','Set\x20accessKey\x20in\x20','format','High-risk\x20operation\x20`','3zvGJUW','string','67001gGkprT','../commands/app/remote-source.js','Unknown\x20app:\x20','schema','local-alias','../core/sdk-client.js','APPCODE','service','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','defaultPageSize','object','.appcode\x20to\x20','nonInteractive','2PTeANj','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','env','defaultApp','_notice','has','6965676gSiPxa','appcode\x20\x22','161464zZdBFx','119lmSXqx','name','ACCESS_KEY','app','mergedCli','production','map','requiresAuth','pageSize','../core/api-client.js','216540zAjhdH','catch','cancelled','3631uNIzbn','apiDomain','rawFlags','appCode','update','configMissing','validation','Run\x20`','accessKey','defaultVerbose','appCodeSource','30ynVfgK','\x20\x20To\x20proceed:\x20','\x20or\x20pass\x20'];a88_0x55bc=function(){return _0x2ea959;};return a88_0x55bc();}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';function a88_0x4c65(_0x55205,_0x2c87b5){_0x55205=_0x55205-0x12f;const _0x55bc10=a88_0x55bc();let _0x4c655a=_0x55bc10[_0x55205];return _0x4c655a;}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(_0x650826){const _0x219d8b=a88_0x4c65;return void _0x650826,AUTH_MODE[_0x219d8b(0x14e)];}export function createPipelineEnv(_0x18e33e,_0x87a6bc){const _0x3805e3=a88_0x4c65,_0x43e0ed=typeof _0x87a6bc['app']==='string'&&_0x87a6bc[_0x3805e3(0x134)]['trim']();return{'rawFlags':_0x87a6bc,'appCode':_0x18e33e[_0x3805e3(0x141)]||productEnv('APPCODE')||(_0x43e0ed?undefined:readAppCodeFromConfig()),'appCodeSource':_0x18e33e[_0x3805e3(0x148)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x87a6bc),'defaultFormat':_0x18e33e[_0x3805e3(0x159)],'defaultPageSize':_0x18e33e[_0x3805e3(0x139)],'defaultVerbose':_0x18e33e['verbose'],'riskLevel':_0x18e33e['riskLevel'],'accessKey':_0x18e33e[_0x3805e3(0x146)],'env':_0x18e33e[_0x3805e3(0x16c)],'mergedCli':{'defaultApp':_0x18e33e['defaultApp'],'currentApp':_0x18e33e[_0x3805e3(0x14d)],'appCode':_0x18e33e[_0x3805e3(0x141)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1ef777=>PIPELINE_FLAG_NAMES[a88_0x492026(0x16f)](_0x1ef777[a88_0x492026(0x132)]))[a88_0x492026(0x137)](({name:_0x500535,type:_0x202c3a,description:_0x376bf6})=>({'name':_0x500535,'type':_0x202c3a,'description':_0x376bf6})),'formatOutput':formatOutput,'getCommandLabel'(_0x3b1f04){const _0x11aa7e=a88_0x492026;return CLI_BIN_NAME+'\x20'+_0x3b1f04[_0x11aa7e(0x164)]+'\x20'+_0x3b1f04['command'];},'riskPolicy':{'onViolation'(_0x46f2c9){const _0x5c2c4e=a88_0x492026;console[_0x5c2c4e(0x153)](_0x46f2c9);},'createError'(_0x1a5fde){const _0x4b4acc=a88_0x492026;return CliErrors[_0x4b4acc(0x13d)](_0x1a5fde);}},async 'prepare'(_0x3b493c,_0x1f2d6e){const _0x14e202=a88_0x492026,_0x336ab6=resolveAuthMode(_0x1f2d6e);if(_0x3b493c[_0x14e202(0x138)]!==![]){if(!_0x1f2d6e['accessKey'])throw CliErrors['authRequired'](_0x14e202(0x158)+PRODUCT_CONFIG[_0x14e202(0x157)]+_0x14e202(0x14b)+productEnvName(_0x14e202(0x133))+'.');const {setActiveAK:_0x4a59a6}=await import(_0x14e202(0x13a));_0x4a59a6(_0x1f2d6e[_0x14e202(0x146)]);}let _0x123dbf='';if(_0x3b493c[_0x14e202(0x150)]!==![]){_0x123dbf=_0x1f2d6e[_0x14e202(0x141)]??'',_0x123dbf=await resolveExplicitAppName(_0x3b493c,_0x1f2d6e,_0x123dbf);if(!_0x123dbf){await assertSelectedAppNameIsRuntimeAccessible(_0x3b493c,_0x1f2d6e);throw CliErrors[_0x14e202(0x143)](_0x14e202(0x14f)+PRODUCT_CONFIG[_0x14e202(0x157)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3b493c,_0x1f2d6e,_0x123dbf);}if(_0x123dbf){const {initSdkClient:_0x268fd5}=await import(_0x14e202(0x162));_0x268fd5({'appCode':_0x123dbf,'env':_0x1f2d6e['env']??_0x14e202(0x136),'accessKey':_0x1f2d6e['accessKey'],'authMode':_0x336ab6});}return{'defaults':{'booleans':{'verbose':_0x1f2d6e[_0x14e202(0x147)]},'numbers':{'pagesize':_0x1f2d6e[_0x14e202(0x166)]}},'extras':{'appCode':_0x123dbf,'cookie':'','apiDomain':_0x1f2d6e[_0x14e202(0x13f)],'apiDir':'','accessKey':_0x1f2d6e['accessKey'],'envName':_0x1f2d6e[_0x14e202(0x16c)],'mergedCli':_0x1f2d6e[_0x14e202(0x135)]}};},async 'confirmHighRisk'({def:_0x54d9f8,env:_0x2de1f1,flags:_0xf2c46e,commandLabel:_0xc7f7a1}){const _0x143e7a=a88_0x492026;if(_0x2de1f1['isNonInteractive']){const _0x4f9162=reconstructCommandArgv(_0x54d9f8,_0xf2c46e);throw CliErrors['validation'](_0x143e7a(0x15a)+_0xc7f7a1+_0x143e7a(0x16b)+(_0x143e7a(0x14a)+_0x4f9162));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x54d9f8,_0xc7f7a1,_0xf2c46e),'createCancelledError':_0x91ae82=>CliErrors['cancelled'](_0x91ae82)});},'mapDryRunError'(_0x3269f9){return mapUserFacingExecuteError(_0x3269f9);},'mapExecuteError'(_0x44d9b4){return mapUserFacingExecuteError(_0x44d9b4);},async 'finalize'(){const {clearActiveAK:_0x5b9f13}=await import('../core/api-client.js');_0x5b9f13();}};async function resolveExplicitAppName(_0x41219a,_0xe06cd,_0x575ded){const _0x4a168d=a88_0x492026;if(_0x41219a[_0x4a168d(0x150)]===![])return _0x575ded;const _0x1e180b=typeof _0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x134)]==='string'?_0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x134)][_0x4a168d(0x155)]():'';if(!_0x1e180b)return _0x575ded;const _0x28ce6f=typeof _0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x154)]===_0x4a168d(0x15c)&&_0xe06cd[_0x4a168d(0x140)]['appcode'][_0x4a168d(0x155)]()||productEnv(_0x4a168d(0x163));if(_0x28ce6f||_0xe06cd[_0x4a168d(0x148)]===_0x4a168d(0x161))return _0x575ded;const {getRemoteAppList:_0x1f0a93}=await import(_0x4a168d(0x15e)),_0x5c8fc7=await _0x1f0a93({'env':_0xe06cd['env']??'production','accessKey':_0xe06cd['accessKey']}),_0x359ebc=findAppByName(_0x5c8fc7['items'],_0x1e180b);if(_0x359ebc&&!isRuntimeAccessibleApp(_0x359ebc))throw runtimeInaccessibleAppError(_0x359ebc,'\x22'+_0x1e180b+'\x22');const _0x2a1efd=_0x359ebc?.[_0x4a168d(0x141)]?.[_0x4a168d(0x155)]();if(_0x2a1efd)return _0x2a1efd;throw CliErrors[_0x4a168d(0x144)](_0x4a168d(0x15f)+_0x1e180b,_0x4a168d(0x145)+CLI_BIN_NAME+_0x4a168d(0x165)+_0x1e180b+_0x4a168d(0x168)+PRODUCT_CONFIG[_0x4a168d(0x157)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xc8dd1f,_0x38cebe){const _0x558c12=a88_0x492026;if(_0xc8dd1f[_0x558c12(0x150)]===![]||!_0x38cebe['accessKey'])return;const _0x4a27e1=(typeof _0x38cebe['rawFlags']['app']===_0x558c12(0x15c)&&_0x38cebe[_0x558c12(0x140)][_0x558c12(0x134)][_0x558c12(0x155)]()?_0x38cebe[_0x558c12(0x140)][_0x558c12(0x134)]:_0x38cebe[_0x558c12(0x135)]?.[_0x558c12(0x14d)]??_0x38cebe[_0x558c12(0x135)]?.[_0x558c12(0x16d)])?.['trim']();if(!_0x4a27e1)return;const {getRemoteAppList:_0x4ec1ca}=await import(_0x558c12(0x15e)),_0x42c8b7=await _0x4ec1ca({'env':_0x38cebe[_0x558c12(0x16c)]??'production','accessKey':_0x38cebe[_0x558c12(0x146)]}),_0x45fc52=findAppByName(_0x42c8b7[_0x558c12(0x156)],_0x4a27e1);if(_0x45fc52&&!isRuntimeAccessibleApp(_0x45fc52))throw runtimeInaccessibleAppError(_0x45fc52,'\x22'+_0x4a27e1+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x11bc04,_0x3bc1a0,_0x75a17){const _0x5387a1=a88_0x492026;if(_0x11bc04[_0x5387a1(0x150)]===![]||!_0x3bc1a0[_0x5387a1(0x146)])return;const {getRemoteAppList:_0x4f8282}=await import(_0x5387a1(0x15e)),_0x459f3e=await _0x4f8282({'env':_0x3bc1a0[_0x5387a1(0x16c)]??_0x5387a1(0x136),'accessKey':_0x3bc1a0[_0x5387a1(0x146)]}),_0x122c1b=findAppByCode(_0x459f3e['items'],_0x75a17);if(_0x122c1b&&!isRuntimeAccessibleApp(_0x122c1b))throw runtimeInaccessibleAppError(_0x122c1b,_0x5387a1(0x12f)+_0x75a17+'\x22');}export async function runCommand(_0x21466f,_0x693ad7){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x21466f)?withUpdateNotice(_0x21466f):_0x21466f,_0x693ad7,runnerAdapter);}function shouldAttachUpdateNotice(_0x309504){const _0x33e237=a88_0x492026;return![_0x33e237(0x142),_0x33e237(0x160),_0x33e237(0x14c)]['includes'](_0x309504[_0x33e237(0x164)]);}function withUpdateNotice(_0x417dc6){return{..._0x417dc6,async 'execute'(_0x21bd0a){const _0x3e8d1a=a88_0x4c65,_0x41fafb=shouldResolveUpdateNotice(_0x21bd0a)?resolveLatestUpdateNotice()[_0x3e8d1a(0x13c)](()=>null):Promise['resolve'](null),_0x16ab77=await _0x417dc6['execute'](_0x21bd0a);return attachUpdateNotice(_0x16ab77,await _0x41fafb);}};}function shouldResolveUpdateNotice(_0x27cf9d){const _0x38d0f9=a88_0x492026;return _0x27cf9d[_0x38d0f9(0x159)]==='pretty'&&!_0x27cf9d[_0x38d0f9(0x169)];}function attachUpdateNotice(_0x3a3d3a,_0x16b490){const _0x210201=a88_0x492026;if(!_0x16b490||!_0x3a3d3a||typeof _0x3a3d3a!=='object')return _0x3a3d3a;const _0x303fc0=_0x3a3d3a,_0x3552b1=typeof _0x303fc0[_0x210201(0x16e)]===_0x210201(0x167)&&_0x303fc0['_notice']!==null?_0x303fc0[_0x210201(0x16e)]:{};return{..._0x303fc0,'_notice':{..._0x3552b1,'update':_0x16b490}};}
1
+ const a88_0x2865a2=a88_0x5921;(function(_0x12fb7b,_0x512217){const _0x2f0fb0=a88_0x5921,_0x48a677=_0x12fb7b();while(!![]){try{const _0x529344=-parseInt(_0x2f0fb0(0xc4))/0x1+parseInt(_0x2f0fb0(0x87))/0x2*(-parseInt(_0x2f0fb0(0x89))/0x3)+parseInt(_0x2f0fb0(0xa2))/0x4*(parseInt(_0x2f0fb0(0x9d))/0x5)+-parseInt(_0x2f0fb0(0xaf))/0x6+-parseInt(_0x2f0fb0(0x97))/0x7+parseInt(_0x2f0fb0(0x88))/0x8+-parseInt(_0x2f0fb0(0xc1))/0x9*(-parseInt(_0x2f0fb0(0xc0))/0xa);if(_0x529344===_0x512217)break;else _0x48a677['push'](_0x48a677['shift']());}catch(_0x179a3c){_0x48a677['push'](_0x48a677['shift']());}}}(a88_0x2c41,0x2d552));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';function a88_0x5921(_0x3fc31f,_0x56c11d){_0x3fc31f=_0x3fc31f-0x82;const _0x2c418f=a88_0x2c41();let _0x5921f2=_0x2c418f[_0x3fc31f];return _0x5921f2;}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a88_0x2c41(){const _0x1e06ab=['update','local-alias','.appcode\x20to\x20','pretty','items','name','accessKey','1945454sKsIOi','production','trim','service','High-risk\x20operation\x20`','app','5bvwLhv','object','apiDomain','env','mergedCli','751616LCqQnR','validation','\x20or\x20pass\x20','ACCESS_KEY','riskLevel','appCodeSource','filter','Unknown\x20app:\x20','has','catch','requiresAuth','map','verbose','1931190SpDITG','\x20\x20To\x20proceed:\x20','currentApp','newConfigFileName','../core/api-client.js','../commands/app/remote-source.js','includes','resolve','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','_notice','appCode','appcode\x20\x22','ClientAk','execute','string','Set\x20accessKey\x20in\x20','150EISbYo','293463wbemxE','authRequired','Run\x20`','7927teguLp','appcode','rawFlags','defaultVerbose','format','APPCODE','cancelled','24252rGzrZv','2483224VJHbZN','48tvdBNX','pageSize','doctor','defaultPageSize','command','../core/sdk-client.js','requiresAppCode'];a88_0x2c41=function(){return _0x1e06ab;};return a88_0x2c41();}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(_0x433770){const _0x10f7b3=a88_0x5921;return void _0x433770,AUTH_MODE[_0x10f7b3(0xbc)];}export function createPipelineEnv(_0xdad50a,_0x5b3663){const _0x37ceb8=a88_0x5921,_0x4e7621=typeof _0x5b3663[_0x37ceb8(0x9c)]===_0x37ceb8(0xbe)&&_0x5b3663[_0x37ceb8(0x9c)]['trim']();return{'rawFlags':_0x5b3663,'appCode':_0xdad50a[_0x37ceb8(0xba)]||productEnv(_0x37ceb8(0x85))||(_0x4e7621?undefined:readAppCodeFromConfig()),'appCodeSource':_0xdad50a[_0x37ceb8(0xa7)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5b3663),'defaultFormat':_0xdad50a[_0x37ceb8(0x84)],'defaultPageSize':_0xdad50a[_0x37ceb8(0x8a)],'defaultVerbose':_0xdad50a[_0x37ceb8(0xae)],'riskLevel':_0xdad50a[_0x37ceb8(0xa6)],'accessKey':_0xdad50a[_0x37ceb8(0x96)],'env':_0xdad50a[_0x37ceb8(0xa0)],'mergedCli':{'defaultApp':_0xdad50a['defaultApp'],'currentApp':_0xdad50a[_0x37ceb8(0xb1)],'appCode':_0xdad50a[_0x37ceb8(0xba)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x2865a2(0xa8)](_0x2eb9f8=>PIPELINE_FLAG_NAMES[a88_0x2865a2(0xaa)](_0x2eb9f8[a88_0x2865a2(0x95)]))[a88_0x2865a2(0xad)](({name:_0x443c12,type:_0xed44c3,description:_0x32ea49})=>({'name':_0x443c12,'type':_0xed44c3,'description':_0x32ea49})),'formatOutput':formatOutput,'getCommandLabel'(_0x2bd8ae){const _0xb77cc0=a88_0x2865a2;return CLI_BIN_NAME+'\x20'+_0x2bd8ae[_0xb77cc0(0x9a)]+'\x20'+_0x2bd8ae[_0xb77cc0(0x8d)];},'riskPolicy':{'onViolation'(_0x4fc0f8){console['error'](_0x4fc0f8);},'createError'(_0x476cd4){const _0x1c0706=a88_0x2865a2;return CliErrors[_0x1c0706(0x86)](_0x476cd4);}},async 'prepare'(_0x3f0d5f,_0x1cc66e){const _0x24b156=a88_0x2865a2,_0x58c47d=resolveAuthMode(_0x1cc66e);if(_0x3f0d5f[_0x24b156(0xac)]!==![]){if(!_0x1cc66e[_0x24b156(0x96)])throw CliErrors[_0x24b156(0xc2)](_0x24b156(0xbf)+PRODUCT_CONFIG[_0x24b156(0xb2)]+_0x24b156(0xa4)+productEnvName(_0x24b156(0xa5))+'.');const {setActiveAK:_0x115347}=await import(_0x24b156(0xb3));_0x115347(_0x1cc66e[_0x24b156(0x96)]);}let _0x14fde6='';if(_0x3f0d5f['requiresAppCode']!==![]){_0x14fde6=_0x1cc66e[_0x24b156(0xba)]??'',_0x14fde6=await resolveExplicitAppName(_0x3f0d5f,_0x1cc66e,_0x14fde6);if(!_0x14fde6){await assertSelectedAppNameIsRuntimeAccessible(_0x3f0d5f,_0x1cc66e);throw CliErrors['configMissing'](_0x24b156(0xb8)+PRODUCT_CONFIG[_0x24b156(0xb2)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3f0d5f,_0x1cc66e,_0x14fde6);}if(_0x14fde6){const {initSdkClient:_0x3afadf}=await import(_0x24b156(0x8e));_0x3afadf({'appCode':_0x14fde6,'env':_0x1cc66e[_0x24b156(0xa0)]??'production','accessKey':_0x1cc66e[_0x24b156(0x96)],'authMode':_0x58c47d});}return{'defaults':{'booleans':{'verbose':_0x1cc66e[_0x24b156(0x83)]},'numbers':{'pagesize':_0x1cc66e[_0x24b156(0x8c)]}},'extras':{'appCode':_0x14fde6,'cookie':'','apiDomain':_0x1cc66e[_0x24b156(0x9f)],'apiDir':'','accessKey':_0x1cc66e[_0x24b156(0x96)],'envName':_0x1cc66e['env'],'mergedCli':_0x1cc66e[_0x24b156(0xa1)]}};},async 'confirmHighRisk'({def:_0x11afe1,env:_0x3ad868,flags:_0x4ceee0,commandLabel:_0x2175cc}){const _0x1bea87=a88_0x2865a2;if(_0x3ad868['isNonInteractive']){const _0x457635=reconstructCommandArgv(_0x11afe1,_0x4ceee0);throw CliErrors['validation'](_0x1bea87(0x9b)+_0x2175cc+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x1bea87(0xb0)+_0x457635));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x11afe1,_0x2175cc,_0x4ceee0),'createCancelledError':_0x51502b=>CliErrors[_0x1bea87(0x86)](_0x51502b)});},'mapDryRunError'(_0x18d286){return mapUserFacingExecuteError(_0x18d286);},'mapExecuteError'(_0x4f2200){return mapUserFacingExecuteError(_0x4f2200);},async 'finalize'(){const _0x52016e=a88_0x2865a2,{clearActiveAK:_0x5d5b8a}=await import(_0x52016e(0xb3));_0x5d5b8a();}};async function resolveExplicitAppName(_0x42716d,_0x1c8e7d,_0x2efef2){const _0x201bf0=a88_0x2865a2;if(_0x42716d[_0x201bf0(0x8f)]===![])return _0x2efef2;const _0x107ab7=typeof _0x1c8e7d[_0x201bf0(0x82)][_0x201bf0(0x9c)]==='string'?_0x1c8e7d['rawFlags']['app'][_0x201bf0(0x99)]():'';if(!_0x107ab7)return _0x2efef2;const _0x3c609f=typeof _0x1c8e7d['rawFlags'][_0x201bf0(0xc5)]===_0x201bf0(0xbe)&&_0x1c8e7d[_0x201bf0(0x82)][_0x201bf0(0xc5)][_0x201bf0(0x99)]()||productEnv('APPCODE');if(_0x3c609f||_0x1c8e7d[_0x201bf0(0xa7)]===_0x201bf0(0x91))return _0x2efef2;const {getRemoteAppList:_0x11d79d}=await import('../commands/app/remote-source.js'),_0x304f65=await _0x11d79d({'env':_0x1c8e7d[_0x201bf0(0xa0)]??_0x201bf0(0x98),'accessKey':_0x1c8e7d[_0x201bf0(0x96)]}),_0x4b1dde=findAppByName(_0x304f65[_0x201bf0(0x94)],_0x107ab7);if(_0x4b1dde&&!isRuntimeAccessibleApp(_0x4b1dde))throw runtimeInaccessibleAppError(_0x4b1dde,'\x22'+_0x107ab7+'\x22');const _0x1ad2cb=_0x4b1dde?.[_0x201bf0(0xba)]?.[_0x201bf0(0x99)]();if(_0x1ad2cb)return _0x1ad2cb;throw CliErrors[_0x201bf0(0xa3)](_0x201bf0(0xa9)+_0x107ab7,_0x201bf0(0xc3)+CLI_BIN_NAME+_0x201bf0(0xb7)+_0x107ab7+_0x201bf0(0x92)+PRODUCT_CONFIG[_0x201bf0(0xb2)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x80dd84,_0x3a1d1c){const _0x2e77df=a88_0x2865a2;if(_0x80dd84[_0x2e77df(0x8f)]===![]||!_0x3a1d1c['accessKey'])return;const _0x3c62b6=(typeof _0x3a1d1c[_0x2e77df(0x82)][_0x2e77df(0x9c)]==='string'&&_0x3a1d1c[_0x2e77df(0x82)][_0x2e77df(0x9c)]['trim']()?_0x3a1d1c['rawFlags']['app']:_0x3a1d1c[_0x2e77df(0xa1)]?.[_0x2e77df(0xb1)]??_0x3a1d1c[_0x2e77df(0xa1)]?.['defaultApp'])?.['trim']();if(!_0x3c62b6)return;const {getRemoteAppList:_0x16dbb5}=await import(_0x2e77df(0xb4)),_0x30933b=await _0x16dbb5({'env':_0x3a1d1c[_0x2e77df(0xa0)]??_0x2e77df(0x98),'accessKey':_0x3a1d1c[_0x2e77df(0x96)]}),_0x697d51=findAppByName(_0x30933b[_0x2e77df(0x94)],_0x3c62b6);if(_0x697d51&&!isRuntimeAccessibleApp(_0x697d51))throw runtimeInaccessibleAppError(_0x697d51,'\x22'+_0x3c62b6+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x71de0b,_0x173e33,_0x254f8b){const _0xe94f51=a88_0x2865a2;if(_0x71de0b[_0xe94f51(0x8f)]===![]||!_0x173e33[_0xe94f51(0x96)])return;const {getRemoteAppList:_0xac09b7}=await import(_0xe94f51(0xb4)),_0x1575a2=await _0xac09b7({'env':_0x173e33[_0xe94f51(0xa0)]??_0xe94f51(0x98),'accessKey':_0x173e33['accessKey']}),_0x4aa1b3=findAppByCode(_0x1575a2[_0xe94f51(0x94)],_0x254f8b);if(_0x4aa1b3&&!isRuntimeAccessibleApp(_0x4aa1b3))throw runtimeInaccessibleAppError(_0x4aa1b3,_0xe94f51(0xbb)+_0x254f8b+'\x22');}export async function runCommand(_0x388827,_0x2f6cdc){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x388827)?withUpdateNotice(_0x388827):_0x388827,_0x2f6cdc,runnerAdapter);}function shouldAttachUpdateNotice(_0x3fa7cc){const _0x3249b1=a88_0x2865a2;return![_0x3249b1(0x90),'schema',_0x3249b1(0x8b)][_0x3249b1(0xb5)](_0x3fa7cc['service']);}function withUpdateNotice(_0x3aae9d){return{..._0x3aae9d,async 'execute'(_0x541ac3){const _0x52fab0=a88_0x5921,_0x54e6b2=shouldResolveUpdateNotice(_0x541ac3)?resolveLatestUpdateNotice()[_0x52fab0(0xab)](()=>null):Promise[_0x52fab0(0xb6)](null),_0x462ef5=await _0x3aae9d[_0x52fab0(0xbd)](_0x541ac3);return attachUpdateNotice(_0x462ef5,await _0x54e6b2);}};}function shouldResolveUpdateNotice(_0x41f77d){const _0x55e9d6=a88_0x2865a2;return _0x41f77d[_0x55e9d6(0x84)]===_0x55e9d6(0x93)&&!_0x41f77d['nonInteractive'];}function attachUpdateNotice(_0x3c9f05,_0x5012c1){const _0x40820e=a88_0x2865a2;if(!_0x5012c1||!_0x3c9f05||typeof _0x3c9f05!==_0x40820e(0x9e))return _0x3c9f05;const _0x15f8bd=_0x3c9f05,_0x68540c=typeof _0x15f8bd[_0x40820e(0xb9)]===_0x40820e(0x9e)&&_0x15f8bd[_0x40820e(0xb9)]!==null?_0x15f8bd['_notice']:{};return{..._0x15f8bd,'_notice':{..._0x68540c,'update':_0x5012c1}};}
@@ -1 +1 @@
1
- (function(_0x2dd5d1,_0x794c0f){const _0x19b4a1=a89_0x59a0,_0x48aa43=_0x2dd5d1();while(!![]){try{const _0x309bee=parseInt(_0x19b4a1(0x130))/0x1*(parseInt(_0x19b4a1(0x12a))/0x2)+parseInt(_0x19b4a1(0x12c))/0x3*(-parseInt(_0x19b4a1(0x134))/0x4)+parseInt(_0x19b4a1(0x136))/0x5+-parseInt(_0x19b4a1(0x126))/0x6+-parseInt(_0x19b4a1(0x127))/0x7*(-parseInt(_0x19b4a1(0x129))/0x8)+-parseInt(_0x19b4a1(0x132))/0x9+-parseInt(_0x19b4a1(0x139))/0xa*(-parseInt(_0x19b4a1(0x137))/0xb);if(_0x309bee===_0x794c0f)break;else _0x48aa43['push'](_0x48aa43['shift']());}catch(_0x2d18d0){_0x48aa43['push'](_0x48aa43['shift']());}}}(a89_0x1187,0x36715));import{buildSchemaPayload as a89_0x3bfac}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 a89_0x1187(){const _0x3f86e1=['7381319TSMaND','requiresAuth','10FtNmRs','auth','2215140SSgChr','294uGsfCH','has','61624cvNwHn','2YuCdpW','services','1187997FlxSzF','none','service','filter','5437wqQmGs','../commands/registry.js','3540411UEdSyj','commands','4McRDoB','map','1907865NIjzxj'];a89_0x1187=function(){return _0x3f86e1;};return a89_0x1187();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x5c0b5f=a89_0x59a0,{serviceRegistry:_0x2e7a95,findDefinition:_0x2a941}=await import(_0x5c0b5f(0x131)),_0x4b11a0=new Set(_0x2e7a95[_0x5c0b5f(0x135)](_0x4c7813=>_0x4c7813[_0x5c0b5f(0x12e)])),_0x370264=listDynamicServiceEntries()[_0x5c0b5f(0x12f)](_0x4fb9e5=>!_0x4b11a0[_0x5c0b5f(0x128)](_0x4fb9e5[_0x5c0b5f(0x12e)])),_0xf1df55=a89_0x3bfac({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x2e7a95,_0x370264),'buildAllFlags':buildAllFlags,'findDefinition':(_0x54ce28,_0x217724)=>_0x2a941(_0x54ce28,_0x217724)??findDynamicServiceDefinition(_0x54ce28,_0x217724)});return normalizeSchemaPayload(_0xf1df55);}function a89_0x59a0(_0x1c27b8,_0x4ea21f){_0x1c27b8=_0x1c27b8-0x126;const _0x1187c3=a89_0x1187();let _0x59a0b9=_0x1187c3[_0x1c27b8];return _0x59a0b9;}function normalizeSchemaPayload(_0x412316){const _0x5844a8=a89_0x59a0;return{..._0x412316,'schemaVersion':0x2,'services':_0x412316[_0x5844a8(0x12b)][_0x5844a8(0x135)](_0x13fe2d=>({..._0x13fe2d,'commands':_0x13fe2d[_0x5844a8(0x133)][_0x5844a8(0x135)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x411838){const _0x267733=a89_0x59a0,_0x134349=_0x411838;return{..._0x411838,'auth':_0x134349[_0x267733(0x13a)]??(_0x411838[_0x267733(0x138)]?'required':_0x267733(0x12d))};}
1
+ (function(_0x3080bb,_0x1166d5){const _0x444479=a89_0x5563,_0x393adf=_0x3080bb();while(!![]){try{const _0x3ac6cd=-parseInt(_0x444479(0x188))/0x1*(-parseInt(_0x444479(0x18b))/0x2)+-parseInt(_0x444479(0x17f))/0x3+-parseInt(_0x444479(0x18a))/0x4+parseInt(_0x444479(0x17e))/0x5+-parseInt(_0x444479(0x18d))/0x6+-parseInt(_0x444479(0x183))/0x7+parseInt(_0x444479(0x182))/0x8;if(_0x3ac6cd===_0x1166d5)break;else _0x393adf['push'](_0x393adf['shift']());}catch(_0x116976){_0x393adf['push'](_0x393adf['shift']());}}}(a89_0x5bc5,0x39980));import{buildSchemaPayload as a89_0xfff44}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';function a89_0x5bc5(){const _0x32a05c=['has','map','../commands/registry.js','2571ajGYMG','filter','219484zgceHT','2kjfRyj','services','1555680EHwlgL','service','829790xruYie','506799MIGLVI','none','commands','7395904ClloYf','2618203iqxJcW','auth'];a89_0x5bc5=function(){return _0x32a05c;};return a89_0x5bc5();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a89_0x5563(_0x332022,_0x53d97e){_0x332022=_0x332022-0x17e;const _0x5bc57a=a89_0x5bc5();let _0x556395=_0x5bc57a[_0x332022];return _0x556395;}export async function buildSchemaPayload(){const _0xe27a4d=a89_0x5563,{serviceRegistry:_0x508e19,findDefinition:_0x2203bf}=await import(_0xe27a4d(0x187)),_0x174d29=new Set(_0x508e19[_0xe27a4d(0x186)](_0x2e5f1e=>_0x2e5f1e[_0xe27a4d(0x18e)])),_0x143a88=listDynamicServiceEntries()[_0xe27a4d(0x189)](_0x2e3450=>!_0x174d29[_0xe27a4d(0x185)](_0x2e3450['service'])),_0xfc7db5=a89_0xfff44({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x508e19,_0x143a88),'buildAllFlags':buildAllFlags,'findDefinition':(_0x447228,_0xcf4083)=>_0x2203bf(_0x447228,_0xcf4083)??findDynamicServiceDefinition(_0x447228,_0xcf4083)});return normalizeSchemaPayload(_0xfc7db5);}function normalizeSchemaPayload(_0x224f3c){const _0x3ede58=a89_0x5563;return{..._0x224f3c,'schemaVersion':0x2,'services':_0x224f3c[_0x3ede58(0x18c)][_0x3ede58(0x186)](_0xf8d6b7=>({..._0xf8d6b7,'commands':_0xf8d6b7[_0x3ede58(0x181)]['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x4dd5dc){const _0x4131d0=a89_0x5563,_0x213a8f=_0x4dd5dc;return{..._0x4dd5dc,'auth':_0x213a8f[_0x4131d0(0x184)]??(_0x4dd5dc['requiresAuth']?'required':_0x4131d0(0x180))};}
@@ -1 +1 @@
1
- function a90_0x40ae(_0x59aa2d,_0x33c50f){_0x59aa2d=_0x59aa2d-0x195;const _0x186d98=a90_0x186d();let _0x40ae1a=_0x186d98[_0x59aa2d];return _0x40ae1a;}(function(_0x309912,_0x53b733){const _0x55c286=a90_0x40ae,_0x59c831=_0x309912();while(!![]){try{const _0x43695a=parseInt(_0x55c286(0x19d))/0x1*(parseInt(_0x55c286(0x19c))/0x2)+-parseInt(_0x55c286(0x197))/0x3+parseInt(_0x55c286(0x1a0))/0x4+-parseInt(_0x55c286(0x1a1))/0x5+-parseInt(_0x55c286(0x19a))/0x6*(-parseInt(_0x55c286(0x19f))/0x7)+-parseInt(_0x55c286(0x195))/0x8*(parseInt(_0x55c286(0x198))/0x9)+parseInt(_0x55c286(0x19e))/0xa;if(_0x43695a===_0x53b733)break;else _0x59c831['push'](_0x59c831['shift']());}catch(_0xb66123){_0x59c831['push'](_0x59c831['shift']());}}}(a90_0x186d,0x5b624));function a90_0x186d(){const _0x3a2b73=['2675280ZjeyEw','14VkOhzv','2641944bWWYwK','3705830fudSPR','8BcflWN','service','840492VqmbXb','1783647VHmJjt','slice','425622gkJOso','length','358wcMQrY','2927TDbWUj'];a90_0x186d=function(){return _0x3a2b73;};return a90_0x186d();}export function insertDynamicServicesAfterServiceTree(_0x3b3c27,_0x56d36b){const _0x393923=a90_0x40ae;if(_0x56d36b[_0x393923(0x19b)]===0x0)return[..._0x3b3c27];const _0x5d362e=_0x3b3c27['findIndex'](_0x2143a0=>_0x2143a0[_0x393923(0x196)]===_0x393923(0x196));if(_0x5d362e<0x0)return[..._0x3b3c27,..._0x56d36b];return[..._0x3b3c27['slice'](0x0,_0x5d362e+0x1),..._0x56d36b,..._0x3b3c27[_0x393923(0x199)](_0x5d362e+0x1)];}
1
+ function a90_0x50d5(_0x32816f,_0x45cbcf){_0x32816f=_0x32816f-0x15d;const _0x16bcd6=a90_0x16bc();let _0x50d511=_0x16bcd6[_0x32816f];return _0x50d511;}(function(_0x720036,_0xe1e7f4){const _0x10f39b=a90_0x50d5,_0x511ecb=_0x720036();while(!![]){try{const _0x10dbee=-parseInt(_0x10f39b(0x164))/0x1+parseInt(_0x10f39b(0x15d))/0x2+parseInt(_0x10f39b(0x160))/0x3*(parseInt(_0x10f39b(0x165))/0x4)+-parseInt(_0x10f39b(0x161))/0x5+-parseInt(_0x10f39b(0x15f))/0x6*(parseInt(_0x10f39b(0x166))/0x7)+parseInt(_0x10f39b(0x15e))/0x8+parseInt(_0x10f39b(0x163))/0x9*(parseInt(_0x10f39b(0x162))/0xa);if(_0x10dbee===_0xe1e7f4)break;else _0x511ecb['push'](_0x511ecb['shift']());}catch(_0x50bbe9){_0x511ecb['push'](_0x511ecb['shift']());}}}(a90_0x16bc,0x26f7d));function a90_0x16bc(){const _0x28fb19=['19430OdbUUQ','393630gtqSEq','108IvrBMA','240431bhqYvp','16788aOwKea','5075XvkaNb','slice','length','44912HQloZN','502336kbsClp','2418exKHSo','99WIxKzY'];a90_0x16bc=function(){return _0x28fb19;};return a90_0x16bc();}export function insertDynamicServicesAfterServiceTree(_0x26a3b8,_0x4c532e){const _0x20b834=a90_0x50d5;if(_0x4c532e[_0x20b834(0x168)]===0x0)return[..._0x26a3b8];const _0xb8246b=_0x26a3b8['findIndex'](_0x20a377=>_0x20a377['service']==='service');if(_0xb8246b<0x0)return[..._0x26a3b8,..._0x4c532e];return[..._0x26a3b8[_0x20b834(0x167)](0x0,_0xb8246b+0x1),..._0x4c532e,..._0x26a3b8[_0x20b834(0x167)](_0xb8246b+0x1)];}
@@ -1 +1 @@
1
- (function(_0x1755d4,_0x53333f){var _0x52aec3=a91_0x49be,_0x51cf86=_0x1755d4();while(!![]){try{var _0x3f845b=-parseInt(_0x52aec3(0x90))/0x1+parseInt(_0x52aec3(0x96))/0x2+-parseInt(_0x52aec3(0x95))/0x3*(-parseInt(_0x52aec3(0x8f))/0x4)+parseInt(_0x52aec3(0x8d))/0x5*(-parseInt(_0x52aec3(0x93))/0x6)+parseInt(_0x52aec3(0x8c))/0x7+-parseInt(_0x52aec3(0x92))/0x8*(parseInt(_0x52aec3(0x94))/0x9)+parseInt(_0x52aec3(0x8e))/0xa*(parseInt(_0x52aec3(0x91))/0xb);if(_0x3f845b===_0x53333f)break;else _0x51cf86['push'](_0x51cf86['shift']());}catch(_0x117322){_0x51cf86['push'](_0x51cf86['shift']());}}}(a91_0x40cb,0xea85f));function a91_0x40cb(){var _0x214f06=['2300935kabEqv','5WXYuUv','2870mhsvRU','16ScGuuC','1598989GHkmSt','90541rNJmey','88CgeFxx','7762254xpNrcd','191979Ktugqi','669078FvuEiy','1009680PUEaHa'];a91_0x40cb=function(){return _0x214f06;};return a91_0x40cb();}function a91_0x49be(_0xa26ab3,_0x4459dd){_0xa26ab3=_0xa26ab3-0x8c;var _0x40cbfe=a91_0x40cb();var _0x49bed3=_0x40cbfe[_0xa26ab3];return _0x49bed3;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a91_0x4a40(_0x8dfc5f,_0x3dd356){_0x8dfc5f=_0x8dfc5f-0xb6;var _0x124819=a91_0x1248();var _0x4a40fb=_0x124819[_0x8dfc5f];return _0x4a40fb;}(function(_0x2dca7f,_0x3ac79d){var _0x1ac3e1=a91_0x4a40,_0x2618e3=_0x2dca7f();while(!![]){try{var _0x5dd2d1=-parseInt(_0x1ac3e1(0xbe))/0x1*(parseInt(_0x1ac3e1(0xbd))/0x2)+parseInt(_0x1ac3e1(0xb9))/0x3*(-parseInt(_0x1ac3e1(0xc2))/0x4)+parseInt(_0x1ac3e1(0xb7))/0x5*(-parseInt(_0x1ac3e1(0xb6))/0x6)+-parseInt(_0x1ac3e1(0xba))/0x7*(parseInt(_0x1ac3e1(0xbf))/0x8)+parseInt(_0x1ac3e1(0xb8))/0x9+-parseInt(_0x1ac3e1(0xc1))/0xa*(-parseInt(_0x1ac3e1(0xbb))/0xb)+-parseInt(_0x1ac3e1(0xc0))/0xc*(-parseInt(_0x1ac3e1(0xbc))/0xd);if(_0x5dd2d1===_0x3ac79d)break;else _0x2618e3['push'](_0x2618e3['shift']());}catch(_0x31f596){_0x2618e3['push'](_0x2618e3['shift']());}}}(a91_0x1248,0x82668));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a91_0x1248(){var _0x23afc7=['13CeQxeN','25136HFzLYU','66mzioZh','55464eiBegI','24933228uGSHzW','36230qvcjxU','32lbtRxH','1792452ePPljw','15DVkLeA','5827338UaaHtc','142473onHXSC','924gLFWVE','2519womRQb'];a91_0x1248=function(){return _0x23afc7;};return a91_0x1248();}
@@ -1 +1 @@
1
- const a92_0x51dbf0=a92_0x1783;function a92_0x3be4(){const _0x27f7df=['2VHjFfJ','70awVAIE','12843qyQtvm','2026-07-08T08:37:40.551Z','952065hloLRq','v2.1.9-beta.2','479568pkaWOy','7vQOALR','289068PpBxxH','32URJDUA','232420XpjVYf','2.1.9-beta.2','370a45a','352432HcvfwY','679855hehTlP'];a92_0x3be4=function(){return _0x27f7df;};return a92_0x3be4();}function a92_0x1783(_0x1e6bc5,_0x163835){_0x1e6bc5=_0x1e6bc5-0x100;const _0x3be47d=a92_0x3be4();let _0x178396=_0x3be47d[_0x1e6bc5];return _0x178396;}(function(_0x23877b,_0x717714){const _0x3e17af=a92_0x1783,_0x45241e=_0x23877b();while(!![]){try{const _0x411bc1=parseInt(_0x3e17af(0x10a))/0x1+parseInt(_0x3e17af(0x108))/0x2*(parseInt(_0x3e17af(0x101))/0x3)+parseInt(_0x3e17af(0x102))/0x4*(-parseInt(_0x3e17af(0x103))/0x5)+parseInt(_0x3e17af(0x10e))/0x6+parseInt(_0x3e17af(0x100))/0x7*(parseInt(_0x3e17af(0x106))/0x8)+-parseInt(_0x3e17af(0x10c))/0x9+parseInt(_0x3e17af(0x109))/0xa*(parseInt(_0x3e17af(0x107))/0xb);if(_0x411bc1===_0x717714)break;else _0x45241e['push'](_0x45241e['shift']());}catch(_0x57d3cf){_0x45241e['push'](_0x45241e['shift']());}}}(a92_0x3be4,0x2deff));export const VERSION=a92_0x51dbf0(0x104);export const GIT_TAG=a92_0x51dbf0(0x10d);export const GIT_COMMIT=a92_0x51dbf0(0x105);export const BUILD_TIME=a92_0x51dbf0(0x10b);
1
+ function a92_0x2821(_0x39f105,_0x5dbbbc){_0x39f105=_0x39f105-0xfa;const _0x302674=a92_0x3026();let _0x282184=_0x302674[_0x39f105];return _0x282184;}const a92_0x44e97c=a92_0x2821;(function(_0x445f15,_0x11eef4){const _0x4ae306=a92_0x2821,_0x2250e4=_0x445f15();while(!![]){try{const _0x849faa=parseInt(_0x4ae306(0xfe))/0x1+parseInt(_0x4ae306(0x100))/0x2*(parseInt(_0x4ae306(0xfb))/0x3)+parseInt(_0x4ae306(0xff))/0x4+-parseInt(_0x4ae306(0x102))/0x5+-parseInt(_0x4ae306(0xfa))/0x6+parseInt(_0x4ae306(0xfc))/0x7+-parseInt(_0x4ae306(0x104))/0x8*(parseInt(_0x4ae306(0x101))/0x9);if(_0x849faa===_0x11eef4)break;else _0x2250e4['push'](_0x2250e4['shift']());}catch(_0x19a2f0){_0x2250e4['push'](_0x2250e4['shift']());}}}(a92_0x3026,0x1acaf));export const VERSION=a92_0x44e97c(0x103);export const GIT_TAG=a92_0x44e97c(0x105);export const GIT_COMMIT=a92_0x44e97c(0xfd);function a92_0x3026(){const _0x6f3396=['v2.1.9-beta.3','873186srUEfH','642216KdpGEQ','595679bOWDjx','195d260','129535SnGKmh','97380HPJjlz','2jxRpuI','64917ijagAk','808550dqmDco','2.1.9-beta.3','40iXfsqd'];a92_0x3026=function(){return _0x6f3396;};return a92_0x3026();}export const BUILD_TIME='2026-07-08T14:53:24.942Z';
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x24ee6e,_0x371999){const _0x5dcad4=a93_0x4b76,_0x3c5a3c=_0x24ee6e();while(!![]){try{const _0xce818c=-parseInt(_0x5dcad4(0x18c))/0x1+-parseInt(_0x5dcad4(0x18a))/0x2+-parseInt(_0x5dcad4(0x180))/0x3*(-parseInt(_0x5dcad4(0x185))/0x4)+-parseInt(_0x5dcad4(0x188))/0x5*(parseInt(_0x5dcad4(0x17f))/0x6)+-parseInt(_0x5dcad4(0x187))/0x7+-parseInt(_0x5dcad4(0x189))/0x8+-parseInt(_0x5dcad4(0x182))/0x9*(-parseInt(_0x5dcad4(0x183))/0xa);if(_0xce818c===_0x371999)break;else _0x3c5a3c['push'](_0x3c5a3c['shift']());}catch(_0x3738e0){_0x3c5a3c['push'](_0x3c5a3c['shift']());}}}(a93_0x50b9,0xaaf31));import{jsx as a93_0x413fac,jsxs as a93_0x33d83a}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x4b76(_0x253cea,_0x2c803a){_0x253cea=_0x253cea-0x17f;const _0x50b98c=a93_0x50b9();let _0x4b76c0=_0x50b98c[_0x253cea];return _0x4b76c0;}function a93_0x50b9(){const _0xace8b0=['4056148IRSejw','column','7059451WCseUY','10rnUzps','8246440HDTyLo','1410386igPzKK','\x20--help','260401zkCShf','677874QVKPAy','3CPxTML','green','26253198CIZWSq','10WIiHla','\x20\x20Use\x20'];a93_0x50b9=function(){return _0xace8b0;};return a93_0x50b9();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x51c281=a93_0x4b76,{exit:_0x39e9c3}=useApp();return useEffect(()=>{_0x39e9c3();},[_0x39e9c3]),a93_0x33d83a(Box,{'flexDirection':_0x51c281(0x186),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x413fac(Box,{'children':a93_0x413fac(Text,{'bold':!![],'color':_0x51c281(0x181),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x33d83a(Box,{'marginTop':0x1,'children':[a93_0x413fac(Text,{'dimColor':!![],'children':_0x51c281(0x184)}),a93_0x413fac(Text,{'bold':!![],'color':_0x51c281(0x181),'children':CLI_BIN_NAME+_0x51c281(0x18b)}),a93_0x413fac(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x3c3afa,_0x5485b7){const _0x4fbbe1=a93_0x4900,_0x65b02d=_0x3c3afa();while(!![]){try{const _0x143cc2=-parseInt(_0x4fbbe1(0xe2))/0x1+-parseInt(_0x4fbbe1(0xe3))/0x2+-parseInt(_0x4fbbe1(0xe1))/0x3*(-parseInt(_0x4fbbe1(0xdf))/0x4)+parseInt(_0x4fbbe1(0xe8))/0x5*(parseInt(_0x4fbbe1(0xe6))/0x6)+parseInt(_0x4fbbe1(0xe7))/0x7+parseInt(_0x4fbbe1(0xe4))/0x8+-parseInt(_0x4fbbe1(0xe9))/0x9;if(_0x143cc2===_0x5485b7)break;else _0x65b02d['push'](_0x65b02d['shift']());}catch(_0xefdb67){_0x65b02d['push'](_0x65b02d['shift']());}}}(a93_0x96ae,0x67532));import{jsx as a93_0x4b7c61,jsxs as a93_0x427ea1}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x4900(_0x2ca859,_0x339d31){_0x2ca859=_0x2ca859-0xdd;const _0x96ae9e=a93_0x96ae();let _0x490055=_0x96ae9e[_0x2ca859];return _0x490055;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x503bff=a93_0x4900,{exit:_0x4c2ad4}=useApp();return useEffect(()=>{_0x4c2ad4();},[_0x4c2ad4]),a93_0x427ea1(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a93_0x4b7c61(Box,{'children':a93_0x4b7c61(Text,{'bold':!![],'color':_0x503bff(0xe5),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x427ea1(Box,{'marginTop':0x1,'children':[a93_0x4b7c61(Text,{'dimColor':!![],'children':_0x503bff(0xde)}),a93_0x4b7c61(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x503bff(0xdd)}),a93_0x4b7c61(Text,{'dimColor':!![],'children':_0x503bff(0xe0)})]})]});}function a93_0x96ae(){const _0x4349cd=['green','778074FrzJNu','1986691hTBrjo','5hFNdkL','1157895VPxTSY','\x20--help','\x20\x20Use\x20','169144arAJNQ','\x20to\x20view\x20available\x20commands.','48qBiNNa','517151gVQgHC','64390GqENnP','89208YMfwxh'];a93_0x96ae=function(){return _0x4349cd;};return a93_0x96ae();}
@@ -1 +1 @@
1
- const a94_0x569b3b=a94_0x2abf;(function(_0x53c16a,_0x1bae33){const _0x99ee15=a94_0x2abf,_0x16b17d=_0x53c16a();while(!![]){try{const _0x5eb8c9=-parseInt(_0x99ee15(0x155))/0x1+-parseInt(_0x99ee15(0x151))/0x2+parseInt(_0x99ee15(0x154))/0x3+parseInt(_0x99ee15(0x141))/0x4*(parseInt(_0x99ee15(0x142))/0x5)+-parseInt(_0x99ee15(0x157))/0x6*(parseInt(_0x99ee15(0x14f))/0x7)+parseInt(_0x99ee15(0x152))/0x8*(parseInt(_0x99ee15(0x15a))/0x9)+-parseInt(_0x99ee15(0x145))/0xa*(-parseInt(_0x99ee15(0x158))/0xb);if(_0x5eb8c9===_0x1bae33)break;else _0x16b17d['push'](_0x16b17d['shift']());}catch(_0x4d3750){_0x16b17d['push'](_0x16b17d['shift']());}}}(a94_0x5c64,0x6630d));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x47d02c}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x47d02c;function a94_0x2abf(_0xa14ed3,_0x4491e6){_0xa14ed3=_0xa14ed3-0x141;const _0x5c6483=a94_0x5c64();let _0x2abf07=_0x5c6483[_0xa14ed3];return _0x2abf07;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x569b3b(0x143)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x5c64(){const _0x4fc78c=['status','136380skiOGx','npx','add','stdio','trim','exit\x20','stdout','toString','stderr','skills','28QrfpCV','log','538166pTmfwO','64kwnRvs','inherit','2098551ANXoMg','579863BpnNgu','join','322386zRUCvZ','22KNoqiM','pipe','203157JBijMF','56104CsilsF','205McGROJ','skipNpxSkillsEnvSuffix'];a94_0x5c64=function(){return _0x4fc78c;};return a94_0x5c64();}export function runNpxSkillsAddGlobal(_0x24a924,_0x2ff690=LOVRABET_SKILL_SOURCE,_0x3fa8f7){const _0x17f5ca=a94_0x569b3b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5e86b9=_0x3fa8f7?.[_0x17f5ca(0x148)]??_0x17f5ca(0x153),_0x120ea5=resolveNpmBin(_0x17f5ca(0x146)),_0x30d485=[_0x17f5ca(0x14e),_0x17f5ca(0x147),_0x2ff690,'-g','-y'],_0x3b50c5=[_0x120ea5,..._0x30d485][_0x17f5ca(0x156)]('\x20');console[_0x17f5ca(0x150)]('*\x20'+_0x3b50c5);const _0x2f7227=spawnSync(_0x120ea5,_0x30d485,{'cwd':_0x24a924,'stdio':_0x5e86b9,'env':process.env,'shell':![]});if(_0x2f7227[_0x17f5ca(0x144)]===0x0)return{'ok':!![],'status':0x0};let _0x3a8479=_0x17f5ca(0x14a)+(_0x2f7227[_0x17f5ca(0x144)]??'unknown');if(_0x5e86b9===_0x17f5ca(0x159)){const _0x4a1af4=_0x2f7227[_0x17f5ca(0x14d)]?_0x2f7227['stderr']['toString']()[_0x17f5ca(0x149)]():'',_0x5f4b79=_0x2f7227[_0x17f5ca(0x14b)]?_0x2f7227[_0x17f5ca(0x14b)][_0x17f5ca(0x14c)]()['trim']():'';if(_0x4a1af4)_0x3a8479=_0x4a1af4;else{if(_0x5f4b79)_0x3a8479=_0x5f4b79;}}return{'ok':![],'status':_0x2f7227[_0x17f5ca(0x144)]??null,'error':_0x3a8479};}
1
+ const a94_0x57ca12=a94_0x4643;(function(_0x594971,_0x5ea182){const _0x2ebeea=a94_0x4643,_0x18b0f8=_0x594971();while(!![]){try{const _0x34c4c9=parseInt(_0x2ebeea(0x170))/0x1+parseInt(_0x2ebeea(0x165))/0x2+-parseInt(_0x2ebeea(0x172))/0x3+parseInt(_0x2ebeea(0x160))/0x4*(-parseInt(_0x2ebeea(0x168))/0x5)+parseInt(_0x2ebeea(0x173))/0x6*(parseInt(_0x2ebeea(0x16e))/0x7)+-parseInt(_0x2ebeea(0x16d))/0x8*(-parseInt(_0x2ebeea(0x163))/0x9)+-parseInt(_0x2ebeea(0x16f))/0xa;if(_0x34c4c9===_0x5ea182)break;else _0x18b0f8['push'](_0x18b0f8['shift']());}catch(_0x24dd08){_0x18b0f8['push'](_0x18b0f8['shift']());}}}(a94_0x27a7,0x71695));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x5705a6}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x27a7(){const _0x3c8fe6=['1001702rJeUeX','stdout','skills','2797790VQvnwM','npx','skipNpxSkillsEnvSuffix','toString','inherit','14776zlCkju','61278tifTnv','10475780sUOklX','181126mUSecT','stdio','613785dsKOpE','618TxcmJJ','pipe','add','stderr','unknown','4QTtUwQ','join','status','3375qMyfmo','log'];a94_0x27a7=function(){return _0x3c8fe6;};return a94_0x27a7();}export const LOVRABET_SKILL_SOURCE=a94_0x5705a6;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x57ca12(0x16a)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x4643(_0x1be532,_0x5147ce){_0x1be532=_0x1be532-0x15e;const _0x27a7dc=a94_0x27a7();let _0x46438d=_0x27a7dc[_0x1be532];return _0x46438d;}export function runNpxSkillsAddGlobal(_0x4fdce3,_0x4945aa=LOVRABET_SKILL_SOURCE,_0x22eb92){const _0x51a1ed=a94_0x57ca12;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x30015a=_0x22eb92?.[_0x51a1ed(0x171)]??_0x51a1ed(0x16c),_0x2f9506=resolveNpmBin(_0x51a1ed(0x169)),_0x2a9a11=[_0x51a1ed(0x167),_0x51a1ed(0x175),_0x4945aa,'-g','-y'],_0x333961=[_0x2f9506,..._0x2a9a11][_0x51a1ed(0x161)]('\x20');console[_0x51a1ed(0x164)]('*\x20'+_0x333961);const _0x4142ce=spawnSync(_0x2f9506,_0x2a9a11,{'cwd':_0x4fdce3,'stdio':_0x30015a,'env':process.env,'shell':![]});if(_0x4142ce[_0x51a1ed(0x162)]===0x0)return{'ok':!![],'status':0x0};let _0x1275c6='exit\x20'+(_0x4142ce[_0x51a1ed(0x162)]??_0x51a1ed(0x15f));if(_0x30015a===_0x51a1ed(0x174)){const _0x5b526c=_0x4142ce[_0x51a1ed(0x15e)]?_0x4142ce['stderr'][_0x51a1ed(0x16b)]()['trim']():'',_0x5536c5=_0x4142ce['stdout']?_0x4142ce[_0x51a1ed(0x166)]['toString']()['trim']():'';if(_0x5b526c)_0x1275c6=_0x5b526c;else{if(_0x5536c5)_0x1275c6=_0x5536c5;}}return{'ok':![],'status':_0x4142ce[_0x51a1ed(0x162)]??null,'error':_0x1275c6};}
@@ -1 +1 @@
1
- function a95_0x2d43(){const _0x57fa0d=['.hg','88OrgfJc','build','coverage','.next','7827183RgBHqW','10jdUkmp','10060xeNxac','dist','8ACwxxj','6mkGHZP','node_modules','SKILL.md','.git','76993EcUZIN','.cache','8481ngyAfh','.svn','660624lpXjtH','1178436hLxzei','.DS_Store','.turbo','5946672yxQmfF','lovrabet.skill.json','13422vzMHmU'];a95_0x2d43=function(){return _0x57fa0d;};return a95_0x2d43();}const a95_0x212497=a95_0x2bdd;(function(_0x4170a9,_0x8788e4){const _0x475a94=a95_0x2bdd,_0x11fb38=_0x4170a9();while(!![]){try{const _0x5f3054=-parseInt(_0x475a94(0x90))/0x1*(-parseInt(_0x475a94(0x85))/0x2)+-parseInt(_0x475a94(0x7f))/0x3*(parseInt(_0x475a94(0x8f))/0x4)+parseInt(_0x475a94(0x8c))/0x5*(parseInt(_0x475a94(0x80))/0x6)+-parseInt(_0x475a94(0x7b))/0x7*(parseInt(_0x475a94(0x87))/0x8)+parseInt(_0x475a94(0x8b))/0x9+parseInt(_0x475a94(0x8d))/0xa*(-parseInt(_0x475a94(0x7d))/0xb)+parseInt(_0x475a94(0x83))/0xc;if(_0x5f3054===_0x8788e4)break;else _0x11fb38['push'](_0x11fb38['shift']());}catch(_0x521b1d){_0x11fb38['push'](_0x11fb38['shift']());}}}(a95_0x2d43,0x709ea));function a95_0x2bdd(_0x4dd300,_0x5e3766){_0x4dd300=_0x4dd300-0x7a;const _0x2d4300=a95_0x2d43();let _0x2bdd6a=_0x2d4300[_0x4dd300];return _0x2bdd6a;}export const METADATA_FILE=a95_0x212497(0x84);export const SKILL_FILE=a95_0x212497(0x92);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x212497(0x81)]);export const IGNORED_DIR_NAMES=new Set([a95_0x212497(0x7a),a95_0x212497(0x86),a95_0x212497(0x7e),a95_0x212497(0x91),a95_0x212497(0x8a),a95_0x212497(0x8e),a95_0x212497(0x88),a95_0x212497(0x89),a95_0x212497(0x82),a95_0x212497(0x7c)]);
1
+ const a95_0x27defb=a95_0x27ba;function a95_0x27ba(_0x152880,_0x568f2a){_0x152880=_0x152880-0xaa;const _0x2ab7b0=a95_0x2ab7();let _0x27bad5=_0x2ab7b0[_0x152880];return _0x27bad5;}(function(_0x14bffa,_0x28b08e){const _0x430ad2=a95_0x27ba,_0x4a5725=_0x14bffa();while(!![]){try{const _0x9b88db=parseInt(_0x430ad2(0xb6))/0x1+parseInt(_0x430ad2(0xbd))/0x2*(parseInt(_0x430ad2(0xbc))/0x3)+-parseInt(_0x430ad2(0xad))/0x4*(parseInt(_0x430ad2(0xbb))/0x5)+parseInt(_0x430ad2(0xb9))/0x6+parseInt(_0x430ad2(0xaf))/0x7*(-parseInt(_0x430ad2(0xb5))/0x8)+parseInt(_0x430ad2(0xb2))/0x9+parseInt(_0x430ad2(0xac))/0xa*(-parseInt(_0x430ad2(0xaa))/0xb);if(_0x9b88db===_0x28b08e)break;else _0x4a5725['push'](_0x4a5725['shift']());}catch(_0x35635b){_0x4a5725['push'](_0x4a5725['shift']());}}}(a95_0x2ab7,0x8776f));export const METADATA_FILE=a95_0x27defb(0xba);export const SKILL_FILE=a95_0x27defb(0xb8);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set(['.git',a95_0x27defb(0xae),a95_0x27defb(0xb4),a95_0x27defb(0xb7),a95_0x27defb(0xb0),a95_0x27defb(0xab),'build',a95_0x27defb(0xb3),'.turbo',a95_0x27defb(0xb1)]);function a95_0x2ab7(){const _0x1186fc=['lovrabet.skill.json','5FopSkg','33294MLTtMg','174cJVXTQ','46409nCrBWe','dist','3310hxCGvm','673760gAdOlN','.hg','28AEdRTi','.next','.cache','4744485bIOpAp','coverage','.svn','348256HlkzUo','488946OhTVpy','node_modules','SKILL.md','1873698CBIWRe'];a95_0x2ab7=function(){return _0x1186fc;};return a95_0x2ab7();}
@@ -1 +1 @@
1
- (function(_0x4893bd,_0x2096c5){const _0x1aa94e=a96_0x5f1e,_0x168a22=_0x4893bd();while(!![]){try{const _0x5d07fd=parseInt(_0x1aa94e(0x16d))/0x1*(parseInt(_0x1aa94e(0x167))/0x2)+-parseInt(_0x1aa94e(0x168))/0x3+-parseInt(_0x1aa94e(0x164))/0x4+parseInt(_0x1aa94e(0x163))/0x5+parseInt(_0x1aa94e(0x165))/0x6+-parseInt(_0x1aa94e(0x162))/0x7+parseInt(_0x1aa94e(0x16a))/0x8*(-parseInt(_0x1aa94e(0x161))/0x9);if(_0x5d07fd===_0x2096c5)break;else _0x168a22['push'](_0x168a22['shift']());}catch(_0x8f6ea7){_0x168a22['push'](_0x168a22['shift']());}}}(a96_0x24b4,0xd6531));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(_0x73d299,_0x48d49c){const _0x8f5ddc=a96_0x5f1e,_0x1f8aa7=normalizeSkillRelativePath(_0x48d49c),_0xe31a65=realOrResolved(_0x73d299),_0x447bd9=resolve(_0xe31a65,..._0x1f8aa7['split']('/'));if(!isPathInside(_0x447bd9,_0xe31a65))throw CliErrors['validation'](_0x8f5ddc(0x16e)+_0x48d49c);return ensureNoSymlinkInManagedPath(_0xe31a65,_0x1f8aa7),_0x447bd9;}export function ensureNoSymlinkInManagedPath(_0x24caf8,_0x510769){const _0x5acad1=a96_0x5f1e;let _0x27a87b=_0x24caf8;for(const _0x1046cb of _0x510769[_0x5acad1(0x16c)]('/')){_0x27a87b=resolve(_0x27a87b,_0x1046cb);const _0x244c75=lstatIfPresent(_0x27a87b);if(_0x244c75?.[_0x5acad1(0x166)]())throw CliErrors['validation'](_0x5acad1(0x15f)+_0x510769);}}export function isDanglingSymlink(_0x347d7a){const _0x71dd58=a96_0x5f1e;try{return lstatSync(_0x347d7a)[_0x71dd58(0x166)]();}catch{return![];}}function a96_0x5f1e(_0x11d69b,_0x101412){_0x11d69b=_0x11d69b-0x15e;const _0x24b4ca=a96_0x24b4();let _0x5f1e00=_0x24b4ca[_0x11d69b];return _0x5f1e00;}export function resolveSymlinkTarget(_0x4180a8){const _0x173a7f=readlinkSync(_0x4180a8);return isAbsolute(_0x173a7f)?_0x173a7f:resolve(dirname(_0x4180a8),_0x173a7f);}export function isPathInside(_0x409455,_0x5a2cf3){const _0x328e29=a96_0x5f1e,_0x502e3b=_0x409455['endsWith'](sep)?_0x409455:''+_0x409455+sep,_0x543965=_0x5a2cf3['endsWith'](sep)?_0x5a2cf3:''+_0x5a2cf3+sep;return _0x409455===_0x5a2cf3||_0x502e3b[_0x328e29(0x169)](_0x543965);}export function realOrResolved(_0xdd9f13){try{return realpathSync(_0xdd9f13);}catch{return resolve(_0xdd9f13);}}export function lstatIfPresent(_0x139421){try{return lstatSync(_0x139421);}catch{return undefined;}}export function writeTextAtomic(_0xc7a174,_0x23d2ec,_0x3946cd){const _0x2bd1f4=a96_0x5f1e;writeBytesAtomic(_0xc7a174,Buffer['from'](_0x23d2ec,_0x2bd1f4(0x160)),_0x3946cd);}export function writeBytesAtomic(_0x28e6a2,_0x4df269,_0x205b38){const _0x281d91=a96_0x5f1e,_0x289262=_0x28e6a2+_0x281d91(0x15e);try{writeFileSync(_0x289262,_0x4df269,{'mode':_0x205b38}),renameSync(_0x289262,_0x28e6a2);}catch(_0x176857){try{rmSync(_0x289262,{'force':!![]});}catch{}throw _0x176857;}}export function writeJsonAtomic(_0xfc23f2,_0x3906af){const _0x36336e=a96_0x5f1e;writeTextAtomic(_0xfc23f2,JSON[_0x36336e(0x16b)](_0x3906af,null,0x2)+'\x0a',0x180);}function a96_0x24b4(){const _0x41c985=['3594246SuyCrm','isSymbolicLink','1506aUCNVz','795855ZZrcIG','startsWith','6808KWwQLi','stringify','split','653ZaGHnl','Unsafe\x20Skill\x20file\x20path:\x20','.tmp','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','utf8','4473YyvSNc','2679999cCecsz','8522715zhWONX','3385324LQSDps'];a96_0x24b4=function(){return _0x41c985;};return a96_0x24b4();}
1
+ (function(_0xcb11a,_0x39dfce){const _0x250bb9=a96_0x1e41,_0x55d788=_0xcb11a();while(!![]){try{const _0x2b37ba=-parseInt(_0x250bb9(0xbf))/0x1*(parseInt(_0x250bb9(0xba))/0x2)+-parseInt(_0x250bb9(0xab))/0x3+parseInt(_0x250bb9(0xae))/0x4*(-parseInt(_0x250bb9(0xbd))/0x5)+parseInt(_0x250bb9(0xb7))/0x6*(-parseInt(_0x250bb9(0xb9))/0x7)+parseInt(_0x250bb9(0xaf))/0x8+parseInt(_0x250bb9(0xb3))/0x9+parseInt(_0x250bb9(0xb8))/0xa;if(_0x2b37ba===_0x39dfce)break;else _0x55d788['push'](_0x55d788['shift']());}catch(_0x1a240d){_0x55d788['push'](_0x55d788['shift']());}}}(a96_0x5767,0x738ba));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a96_0x5767(){const _0x3d9714=['endsWith','from','2929914XpLdEx','split','startsWith','.tmp','180IjryfU','16251900COnOft','40082IPgtFp','149062vygOHX','Unsafe\x20Skill\x20file\x20path:\x20','validation','235VDSpnT','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','9hFNaFx','2750499ilTBLJ','utf8','isSymbolicLink','14180REpwSA','3588360zpzQgb','stringify'];a96_0x5767=function(){return _0x3d9714;};return a96_0x5767();}import{normalizeSkillRelativePath}from'./local-files.js';function a96_0x1e41(_0x11dc8c,_0x16d02f){_0x11dc8c=_0x11dc8c-0xab;const _0x57676b=a96_0x5767();let _0x1e4145=_0x57676b[_0x11dc8c];return _0x1e4145;}export function resolveManagedFilePath(_0x436b92,_0x45e27e){const _0x316a03=a96_0x1e41,_0x2b5af2=normalizeSkillRelativePath(_0x45e27e),_0x372238=realOrResolved(_0x436b92),_0xd6d6eb=resolve(_0x372238,..._0x2b5af2[_0x316a03(0xb4)]('/'));if(!isPathInside(_0xd6d6eb,_0x372238))throw CliErrors[_0x316a03(0xbc)](_0x316a03(0xbb)+_0x45e27e);return ensureNoSymlinkInManagedPath(_0x372238,_0x2b5af2),_0xd6d6eb;}export function ensureNoSymlinkInManagedPath(_0x1a3e36,_0xb35d4e){const _0x3a2fba=a96_0x1e41;let _0x44a965=_0x1a3e36;for(const _0x26d7bb of _0xb35d4e[_0x3a2fba(0xb4)]('/')){_0x44a965=resolve(_0x44a965,_0x26d7bb);const _0x46ac83=lstatIfPresent(_0x44a965);if(_0x46ac83?.[_0x3a2fba(0xad)]())throw CliErrors[_0x3a2fba(0xbc)](_0x3a2fba(0xbe)+_0xb35d4e);}}export function isDanglingSymlink(_0x332071){const _0x4d66b8=a96_0x1e41;try{return lstatSync(_0x332071)[_0x4d66b8(0xad)]();}catch{return![];}}export function resolveSymlinkTarget(_0x2c6e85){const _0x4e03a8=readlinkSync(_0x2c6e85);return isAbsolute(_0x4e03a8)?_0x4e03a8:resolve(dirname(_0x2c6e85),_0x4e03a8);}export function isPathInside(_0x408683,_0x1c90c4){const _0x4bec14=a96_0x1e41,_0x385685=_0x408683[_0x4bec14(0xb1)](sep)?_0x408683:''+_0x408683+sep,_0x370bdb=_0x1c90c4['endsWith'](sep)?_0x1c90c4:''+_0x1c90c4+sep;return _0x408683===_0x1c90c4||_0x385685[_0x4bec14(0xb5)](_0x370bdb);}export function realOrResolved(_0x3b970e){try{return realpathSync(_0x3b970e);}catch{return resolve(_0x3b970e);}}export function lstatIfPresent(_0x25c989){try{return lstatSync(_0x25c989);}catch{return undefined;}}export function writeTextAtomic(_0x26cb00,_0x150108,_0x13d830){const _0x363169=a96_0x1e41;writeBytesAtomic(_0x26cb00,Buffer[_0x363169(0xb2)](_0x150108,_0x363169(0xac)),_0x13d830);}export function writeBytesAtomic(_0x145773,_0x22b9d6,_0x585b3e){const _0x489b35=a96_0x1e41,_0x61249e=_0x145773+_0x489b35(0xb6);try{writeFileSync(_0x61249e,_0x22b9d6,{'mode':_0x585b3e}),renameSync(_0x61249e,_0x145773);}catch(_0x48ce8b){try{rmSync(_0x61249e,{'force':!![]});}catch{}throw _0x48ce8b;}}export function writeJsonAtomic(_0x530bd9,_0x23de41){const _0x32d1ae=a96_0x1e41;writeTextAtomic(_0x530bd9,JSON[_0x32d1ae(0xb0)](_0x23de41,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x282ceb,_0x245767){const _0x293ff6=a97_0x3bab,_0x28fbc0=_0x282ceb();while(!![]){try{const _0x1f1ca5=-parseInt(_0x293ff6(0x158))/0x1+parseInt(_0x293ff6(0x160))/0x2*(parseInt(_0x293ff6(0x15b))/0x3)+parseInt(_0x293ff6(0x163))/0x4*(-parseInt(_0x293ff6(0x15f))/0x5)+-parseInt(_0x293ff6(0x161))/0x6+parseInt(_0x293ff6(0x157))/0x7+-parseInt(_0x293ff6(0x15e))/0x8+-parseInt(_0x293ff6(0x15c))/0x9*(-parseInt(_0x293ff6(0x15d))/0xa);if(_0x1f1ca5===_0x245767)break;else _0x28fbc0['push'](_0x28fbc0['shift']());}catch(_0xc1acdf){_0x28fbc0['push'](_0x28fbc0['shift']());}}}(a97_0x155b,0x6bea1));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x22043c){const _0x40a4c4=a97_0x3bab;return createHash(_0x40a4c4(0x165))[_0x40a4c4(0x162)](_0x22043c)[_0x40a4c4(0x164)](_0x40a4c4(0x15a));}function a97_0x155b(){const _0xfe8549=['path','hex','6hxsrEm','2277NJDvGW','30700fKJMPG','6338968zbVuSe','280zHvwzq','639862OJobav','2323494IwdPZt','update','9068nmvwKN','digest','sha256','4923289dsqzPz','371310bqqcMo'];a97_0x155b=function(){return _0xfe8549;};return a97_0x155b();}export function fileHash(_0x2f1dc0){return bufferSha256(fileContent(_0x2f1dc0));}export function bufferSha256(_0x347a52){const _0x8172cf=a97_0x3bab;return createHash('sha256')[_0x8172cf(0x162)](_0x347a52)[_0x8172cf(0x164)](_0x8172cf(0x15a));}function a97_0x3bab(_0x3a5560,_0x243471){_0x3a5560=_0x3a5560-0x157;const _0x155bec=a97_0x155b();let _0x3babc0=_0x155bec[_0x3a5560];return _0x3babc0;}export function fileTreeHash(_0x12d96a){const _0x28d0ce=a97_0x3bab,_0x2dacd8=createHash(_0x28d0ce(0x165));for(const _0x94eff1 of normalizeManifestFiles(_0x12d96a)){_0x2dacd8[_0x28d0ce(0x162)](_0x94eff1[_0x28d0ce(0x159)]),_0x2dacd8[_0x28d0ce(0x162)]('\x00'),_0x2dacd8[_0x28d0ce(0x162)](_0x94eff1[_0x28d0ce(0x165)]),_0x2dacd8[_0x28d0ce(0x162)]('\x00'),_0x2dacd8[_0x28d0ce(0x162)](String(_0x94eff1['size'])),_0x2dacd8[_0x28d0ce(0x162)]('\x00');}return _0x2dacd8[_0x28d0ce(0x164)](_0x28d0ce(0x15a));}
1
+ (function(_0x10b4ab,_0x19c08c){const _0x2e1750=a97_0x38c6,_0x3a3aaf=_0x10b4ab();while(!![]){try{const _0xaabe52=-parseInt(_0x2e1750(0x135))/0x1+-parseInt(_0x2e1750(0x134))/0x2+-parseInt(_0x2e1750(0x132))/0x3+-parseInt(_0x2e1750(0x12e))/0x4+-parseInt(_0x2e1750(0x13a))/0x5+parseInt(_0x2e1750(0x136))/0x6+-parseInt(_0x2e1750(0x139))/0x7*(-parseInt(_0x2e1750(0x12d))/0x8);if(_0xaabe52===_0x19c08c)break;else _0x3a3aaf['push'](_0x3a3aaf['shift']());}catch(_0x327de6){_0x3a3aaf['push'](_0x3a3aaf['shift']());}}}(a97_0x49ed,0x336d5));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x36f79a){const _0x150928=a97_0x38c6;return createHash(_0x150928(0x130))['update'](_0x36f79a)['digest'](_0x150928(0x133));}function a97_0x38c6(_0x296edc,_0x15c378){_0x296edc=_0x296edc-0x12d;const _0x49ed5c=a97_0x49ed();let _0x38c686=_0x49ed5c[_0x296edc];return _0x38c686;}export function fileHash(_0x305f19){return bufferSha256(fileContent(_0x305f19));}function a97_0x49ed(){const _0x16a343=['349482lZQLPA','path','digest','7509089SMsEBq','534130DcRLUz','8qNojYg','1296384uXFqiW','size','sha256','update','257298wZENza','hex','328170ZXEvvJ','239556SHjrsj'];a97_0x49ed=function(){return _0x16a343;};return a97_0x49ed();}export function bufferSha256(_0x24d26c){const _0x5da2dd=a97_0x38c6;return createHash(_0x5da2dd(0x130))[_0x5da2dd(0x131)](_0x24d26c)[_0x5da2dd(0x138)]('hex');}export function fileTreeHash(_0xb3df91){const _0x47007=a97_0x38c6,_0x2579b5=createHash(_0x47007(0x130));for(const _0x231a3f of normalizeManifestFiles(_0xb3df91)){_0x2579b5[_0x47007(0x131)](_0x231a3f[_0x47007(0x137)]),_0x2579b5['update']('\x00'),_0x2579b5['update'](_0x231a3f[_0x47007(0x130)]),_0x2579b5['update']('\x00'),_0x2579b5['update'](String(_0x231a3f[_0x47007(0x12f)])),_0x2579b5['update']('\x00');}return _0x2579b5['digest']('hex');}
@@ -1 +1 @@
1
- (function(_0x52869b,_0x4dea0d){const _0x4bf357=a98_0x1c6d,_0xc2dfd8=_0x52869b();while(!![]){try{const _0x279f14=-parseInt(_0x4bf357(0x1aa))/0x1*(parseInt(_0x4bf357(0x1a6))/0x2)+parseInt(_0x4bf357(0x187))/0x3+-parseInt(_0x4bf357(0x17b))/0x4+-parseInt(_0x4bf357(0x18e))/0x5*(parseInt(_0x4bf357(0x17a))/0x6)+-parseInt(_0x4bf357(0x182))/0x7*(-parseInt(_0x4bf357(0x195))/0x8)+parseInt(_0x4bf357(0x19c))/0x9*(parseInt(_0x4bf357(0x19d))/0xa)+-parseInt(_0x4bf357(0x185))/0xb;if(_0x279f14===_0x4dea0d)break;else _0xc2dfd8['push'](_0xc2dfd8['shift']());}catch(_0xc3c20a){_0xc2dfd8['push'](_0xc2dfd8['shift']());}}}(a98_0x396e,0x603f2));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a98_0x396e(){const _0x530ad5=['Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','agentsSkillsDir','skipped','values','not-managed-symlink','182874PykgAD','43888DvWaBR','contentHash','scope','has','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','startsWith','pruneSkillCodes','623903oSuRMs','env','unchanged','6823047DWscIe','metadata-mismatch','1069641aVBZdB','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','name','activeSkillCodes','scopes','map','5YgwioE','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','validation','skill','get','skillCode','16FkKGpz','push','isSymbolicLink','length','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','isDirectory','builtin','27wfFFRn','1757590MuTJcB','accessKey','slice','removed','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','dir','external-symlink','trim','appCode','3064afFiKO','managedRoot','company','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','4KQMkwq'];a98_0x396e=function(){return _0x530ad5;};return a98_0x396e();}import{basename,dirname,resolve}from'node:path';import a98_0x2ea2c2 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}=a98_0x2ea2c2;export function linkEffectiveRuntimeSkills(_0x5684ea,_0x3de5d0,_0x34740c={}){const _0x48d671=a98_0x1c6d,_0x4d712d=new Map();for(const _0x4cc6ad of _0x5684ea){const _0x4fb5ce=_0x4cc6ad['skill'][_0x48d671(0x194)];if(!_0x4fb5ce)continue;const _0x53fe47=_0x4d712d[_0x48d671(0x193)](_0x4fb5ce);(!_0x53fe47||_0x4cc6ad[_0x48d671(0x17d)]===_0x48d671(0x189))&&_0x4d712d['set'](_0x4fb5ce,_0x4cc6ad);}const _0x176b6a=[],_0x106f0d=resolveSkillSyncPaths(_0x34740c);for(const _0xf03fbe of _0x4d712d[_0x48d671(0x178)]()){const _0x4fb952=requireSkillCode(_0xf03fbe[_0x48d671(0x192)]),_0x490a46=_0x3de5d0+'--'+_0x4fb952;for(const _0x33c545 of runtimeAgentSkillRoots(_0x106f0d)){_0x176b6a[_0x48d671(0x196)](ensureManagedSymlink(resolve(_0x33c545,_0x490a46),_0xf03fbe[_0x48d671(0x1a2)],_0x106f0d[_0x48d671(0x1a7)]));}}return _0x176b6a;}export function pruneStaleRuntimeSkillLinks(_0x5b835d,_0x293280,_0x538fb2={},_0x204ab0){const _0x58e892=a98_0x1c6d,_0x54e4ea=resolveSkillSyncPaths(_0x538fb2),_0x4dded9=new Set([..._0x293280][_0x58e892(0x18d)](_0x298250=>_0x298250[_0x58e892(0x1a4)]())[_0x58e892(0x190)](Boolean)),_0x5596d6=_0x204ab0?new Set([..._0x204ab0][_0x58e892(0x18d)](_0x4630e9=>_0x4630e9[_0x58e892(0x1a4)]())[_0x58e892(0x190)](Boolean)):undefined,_0x583a78=[];for(const _0x1651ad of runtimeAgentSkillRoots(_0x54e4ea)){for(const _0x376974 of managedAppSkillLinkPaths(_0x1651ad,_0x5b835d)){const _0x500db4=basename(_0x376974)[_0x58e892(0x19f)]((_0x5b835d+'--')[_0x58e892(0x198)]);if(_0x5596d6&&!_0x5596d6['has'](_0x500db4))continue;if(_0x4dded9['has'](_0x500db4))continue;_0x583a78[_0x58e892(0x196)](removeManagedSkillLink(_0x376974,_0x54e4ea[_0x58e892(0x1a7)]));}}return _0x583a78;}export function pruneStaleRuntimeSkillCache(_0x490815,_0x2b82ce={}){const _0x4465d7=a98_0x1c6d,_0x294d16=new Set([..._0x490815[_0x4465d7(0x18b)]][_0x4465d7(0x18d)](_0x14c69e=>_0x14c69e[_0x4465d7(0x1a4)]())[_0x4465d7(0x190)](Boolean)),_0x51dcd3=_0x490815['pruneSkillCodes']?new Set([..._0x490815[_0x4465d7(0x181)]][_0x4465d7(0x18d)](_0x5a6dc5=>_0x5a6dc5[_0x4465d7(0x1a4)]())[_0x4465d7(0x190)](Boolean)):undefined,_0x1e0f03=_0x490815[_0x4465d7(0x18c)]??[_0x4465d7(0x189),_0x4465d7(0x1a8)],_0x25a383=resolve(getRuntimeSkillCacheRoot(_0x490815[_0x4465d7(0x183)],_0x490815[_0x4465d7(0x19e)],_0x2b82ce),safePathSegment(_0x490815[_0x4465d7(0x1a5)],_0x4465d7(0x1a5))),_0x9cec3d=[];for(const _0x29fe93 of _0x1e0f03){const _0x7dad80=resolve(_0x25a383,_0x29fe93);if(!existsSync(_0x7dad80))continue;for(const _0x31b523 of readdirSync(_0x7dad80,{'withFileTypes':!![]})){if(!_0x31b523['isDirectory']())continue;const _0x24da21=_0x31b523['name'];if(_0x51dcd3&&!_0x51dcd3[_0x4465d7(0x17e)](_0x24da21))continue;if(_0x294d16['has'](_0x24da21))continue;const _0x1cddf5=resolve(_0x7dad80,_0x24da21),_0x4f3858=readMetadataIfPresent(resolve(_0x1cddf5,METADATA_FILE));if(_0x4f3858?.[_0x4465d7(0x1a5)]!==_0x490815['appCode']||_0x4f3858[_0x4465d7(0x17d)]!==_0x29fe93||_0x4f3858[_0x4465d7(0x194)]!==_0x24da21){_0x9cec3d['push']({'path':_0x1cddf5,'action':_0x4465d7(0x177),'reason':_0x4465d7(0x186)});continue;}removeSync(_0x1cddf5),_0x9cec3d[_0x4465d7(0x196)]({'path':_0x1cddf5,'action':'removed'});}}return _0x9cec3d;}export function linkGlobalRuntimeSkills(_0x597de7,_0x49f2e0={}){const _0x30c560=a98_0x1c6d,_0x435e97=resolveSkillSyncPaths(_0x49f2e0),_0x2d5c42=[];for(const _0x37acef of _0x597de7){if(_0x37acef[_0x30c560(0x17d)]!=='builtin')throw CliErrors[_0x30c560(0x191)](_0x30c560(0x1ab)+_0x37acef[_0x30c560(0x17d)]);const _0x4093c1=requireSkillCode(_0x37acef[_0x30c560(0x192)]),_0x4a6c2c=copyManagedSkillDirectory(_0x37acef[_0x30c560(0x1a2)],resolve(_0x435e97[_0x30c560(0x176)],_0x4093c1));_0x2d5c42['push']({..._0x4a6c2c,'contentHash':_0x37acef[_0x30c560(0x17c)]});}return _0x2d5c42;}function ensureManagedSymlink(_0x3bd8e3,_0x6e8270,_0x4df998){const _0xfd4a2b=a98_0x1c6d;mkdirSync(dirname(_0x3bd8e3),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3bd8e3)||isDanglingSymlink(_0x3bd8e3)){const _0x32e5ea=lstatSync(_0x3bd8e3);if(!_0x32e5ea[_0xfd4a2b(0x197)]())throw CliErrors['validation'](_0xfd4a2b(0x1a1)+_0x3bd8e3);const _0x3ff606=resolveSymlinkTarget(_0x3bd8e3);if(!isPathInside(realOrResolved(_0x3ff606),realOrResolved(_0x4df998)))throw CliErrors[_0xfd4a2b(0x191)](_0xfd4a2b(0x1a9)+_0x3bd8e3);if(realOrResolved(_0x3ff606)===realOrResolved(_0x6e8270))return{'path':_0x3bd8e3,'target':_0x6e8270,'action':'unchanged'};return unlinkSync(_0x3bd8e3),symlinkSync(_0x6e8270,_0x3bd8e3,_0xfd4a2b(0x1a2)),{'path':_0x3bd8e3,'target':_0x6e8270,'action':'updated'};}return symlinkSync(_0x6e8270,_0x3bd8e3,'dir'),{'path':_0x3bd8e3,'target':_0x6e8270,'action':'created'};}function managedAppSkillLinkPaths(_0x12ff17,_0x19314f){const _0x15b252=a98_0x1c6d;if(!existsSync(_0x12ff17))return[];const _0x4fff3b=_0x19314f+'--';return readdirSync(_0x12ff17,{'withFileTypes':!![]})[_0x15b252(0x190)](_0x111a33=>_0x111a33[_0x15b252(0x18a)][_0x15b252(0x180)](_0x4fff3b))[_0x15b252(0x18d)](_0x27389e=>resolve(_0x12ff17,_0x27389e[_0x15b252(0x18a)]));}function removeManagedSkillLink(_0x529d36,_0x358c88){const _0x583ab5=a98_0x1c6d,_0x50410a=lstatIfPresent(_0x529d36);if(!_0x50410a?.[_0x583ab5(0x197)]())return{'path':_0x529d36,'action':'skipped','reason':_0x583ab5(0x179)};const _0x54a263=resolveSymlinkTarget(_0x529d36);if(!isPathInside(realOrResolved(_0x54a263),realOrResolved(_0x358c88)))return{'path':_0x529d36,'action':_0x583ab5(0x177),'reason':_0x583ab5(0x1a3)};return unlinkSync(_0x529d36),{'path':_0x529d36,'action':_0x583ab5(0x1a0)};}function a98_0x1c6d(_0x4587dc,_0x1262b1){_0x4587dc=_0x4587dc-0x176;const _0x396e3d=a98_0x396e();let _0x1c6d1e=_0x396e3d[_0x4587dc];return _0x1c6d1e;}export function copyManagedSkillDirectory(_0x4a0db8,_0x4826b0){const _0x5bc075=a98_0x1c6d,_0x1d1e70=resolve(_0x4826b0,METADATA_FILE),_0x41908d=existsSync(_0x4826b0);if(_0x41908d){const _0x184faf=lstatSync(_0x4826b0);if(_0x184faf['isSymbolicLink']())throw CliErrors[_0x5bc075(0x191)](_0x5bc075(0x17f)+_0x4826b0);if(!_0x184faf[_0x5bc075(0x19a)]())throw CliErrors[_0x5bc075(0x191)](_0x5bc075(0x188)+_0x4826b0);const _0x139a25=readMetadataIfPresent(_0x1d1e70);if(_0x139a25?.[_0x5bc075(0x17d)]!==_0x5bc075(0x19b))throw CliErrors['validation'](_0x5bc075(0x199)+_0x4826b0);}ensureDirSync(dirname(_0x4826b0));const _0x2e8e15=_0x41908d?readMetadataIfPresent(_0x1d1e70)?.['contentHash']:undefined,_0x241912=readMetadataIfPresent(resolve(_0x4a0db8,METADATA_FILE))?.[_0x5bc075(0x17c)];return _0x41908d&&removeSync(_0x4826b0),copySkillDirectory(_0x4a0db8,_0x4826b0),{'path':_0x4826b0,'target':_0x4a0db8,'action':!_0x41908d?'created':_0x2e8e15===_0x241912?_0x5bc075(0x184):'updated'};}function copySkillDirectory(_0x3bfcbe,_0x28c659){copySync(_0x3bfcbe,_0x28c659,{'dereference':![],'overwrite':!![],'filter'(_0x527c15){const _0x46a2c2=a98_0x1c6d;if(lstatSync(_0x527c15)[_0x46a2c2(0x197)]())throw CliErrors[_0x46a2c2(0x191)](_0x46a2c2(0x18f)+_0x527c15);return!![];}});}
1
+ (function(_0x37db6b,_0x57e0ed){const _0xec7cef=a98_0x2e6b,_0x8a0df3=_0x37db6b();while(!![]){try{const _0x4cdc5a=-parseInt(_0xec7cef(0x1f0))/0x1*(-parseInt(_0xec7cef(0x1ee))/0x2)+-parseInt(_0xec7cef(0x1e0))/0x3+parseInt(_0xec7cef(0x1f7))/0x4*(parseInt(_0xec7cef(0x206))/0x5)+-parseInt(_0xec7cef(0x1ec))/0x6*(-parseInt(_0xec7cef(0x1f9))/0x7)+parseInt(_0xec7cef(0x1e6))/0x8+-parseInt(_0xec7cef(0x1f4))/0x9+-parseInt(_0xec7cef(0x1ed))/0xa;if(_0x4cdc5a===_0x57e0ed)break;else _0x8a0df3['push'](_0x8a0df3['shift']());}catch(_0x130235){_0x8a0df3['push'](_0x8a0df3['shift']());}}}(a98_0x512a,0x9e866));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a98_0x512a(){const _0x59676b=['external-symlink','isSymbolicLink','env','4991310SgzfPa','trim','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','4HitplZ','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','1211fZKyyn','skipped','slice','has','map','managedRoot','personal','scope','length','removed','pruneSkillCodes','skill','set','4705555jvHWnH','created','contentHash','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','skillCode','validation','filter','updated','2591916SESzll','push','dir','startsWith','not-managed-symlink','name','3767680MTnOTz','company','get','scopes','isDirectory','unchanged','8034lrIWHN','3478690ZKaGHb','1544062yLKkBQ','appCode','1BfVtmZ'];a98_0x512a=function(){return _0x59676b;};return a98_0x512a();}import{basename,dirname,resolve}from'node:path';import a98_0x3e65ef from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a98_0x2e6b(_0x434384,_0x52e4d1){_0x434384=_0x434384-0x1dd;const _0x512a97=a98_0x512a();let _0x2e6b9e=_0x512a97[_0x434384];return _0x2e6b9e;}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}=a98_0x3e65ef;export function linkEffectiveRuntimeSkills(_0x138778,_0x4e08e7,_0x2b7d6c={}){const _0x5ea9ef=a98_0x2e6b,_0x1a86b4=new Map();for(const _0x3cbae5 of _0x138778){const _0x9dee4e=_0x3cbae5[_0x5ea9ef(0x204)][_0x5ea9ef(0x20a)];if(!_0x9dee4e)continue;const _0x2d5237=_0x1a86b4[_0x5ea9ef(0x1e8)](_0x9dee4e);(!_0x2d5237||_0x3cbae5['scope']===_0x5ea9ef(0x1ff))&&_0x1a86b4[_0x5ea9ef(0x205)](_0x9dee4e,_0x3cbae5);}const _0x59f5f5=[],_0x5885cf=resolveSkillSyncPaths(_0x2b7d6c);for(const _0x1136a1 of _0x1a86b4['values']()){const _0x1d5cd4=requireSkillCode(_0x1136a1[_0x5ea9ef(0x204)]),_0x557b68=_0x4e08e7+'--'+_0x1d5cd4;for(const _0x5356ee of runtimeAgentSkillRoots(_0x5885cf)){_0x59f5f5[_0x5ea9ef(0x1e1)](ensureManagedSymlink(resolve(_0x5356ee,_0x557b68),_0x1136a1[_0x5ea9ef(0x1e2)],_0x5885cf[_0x5ea9ef(0x1fe)]));}}return _0x59f5f5;}export function pruneStaleRuntimeSkillLinks(_0x30fa07,_0x2c3d79,_0x450a45={},_0x4744f5){const _0x5b8652=a98_0x2e6b,_0x4083e5=resolveSkillSyncPaths(_0x450a45),_0xc9b6e3=new Set([..._0x2c3d79][_0x5b8652(0x1fd)](_0x151f37=>_0x151f37[_0x5b8652(0x1f5)]())[_0x5b8652(0x1de)](Boolean)),_0x14496d=_0x4744f5?new Set([..._0x4744f5]['map'](_0x4f7dc6=>_0x4f7dc6[_0x5b8652(0x1f5)]())[_0x5b8652(0x1de)](Boolean)):undefined,_0x339d3c=[];for(const _0x559def of runtimeAgentSkillRoots(_0x4083e5)){for(const _0x5a6b61 of managedAppSkillLinkPaths(_0x559def,_0x30fa07)){const _0x193f01=basename(_0x5a6b61)[_0x5b8652(0x1fb)]((_0x30fa07+'--')[_0x5b8652(0x201)]);if(_0x14496d&&!_0x14496d[_0x5b8652(0x1fc)](_0x193f01))continue;if(_0xc9b6e3[_0x5b8652(0x1fc)](_0x193f01))continue;_0x339d3c['push'](removeManagedSkillLink(_0x5a6b61,_0x4083e5[_0x5b8652(0x1fe)]));}}return _0x339d3c;}export function pruneStaleRuntimeSkillCache(_0x2a320d,_0x31caa5={}){const _0x21085c=a98_0x2e6b,_0x2c51bf=new Set([..._0x2a320d['activeSkillCodes']][_0x21085c(0x1fd)](_0x45af21=>_0x45af21[_0x21085c(0x1f5)]())[_0x21085c(0x1de)](Boolean)),_0x3304ba=_0x2a320d[_0x21085c(0x203)]?new Set([..._0x2a320d[_0x21085c(0x203)]][_0x21085c(0x1fd)](_0x50dcbf=>_0x50dcbf[_0x21085c(0x1f5)]())[_0x21085c(0x1de)](Boolean)):undefined,_0x8a142e=_0x2a320d[_0x21085c(0x1e9)]??[_0x21085c(0x1ff),_0x21085c(0x1e7)],_0x160373=resolve(getRuntimeSkillCacheRoot(_0x2a320d[_0x21085c(0x1f3)],_0x2a320d['accessKey'],_0x31caa5),safePathSegment(_0x2a320d[_0x21085c(0x1ef)],_0x21085c(0x1ef))),_0x35c2a3=[];for(const _0x3ef34e of _0x8a142e){const _0xb41694=resolve(_0x160373,_0x3ef34e);if(!existsSync(_0xb41694))continue;for(const _0x549dd2 of readdirSync(_0xb41694,{'withFileTypes':!![]})){if(!_0x549dd2[_0x21085c(0x1ea)]())continue;const _0x4d0e01=_0x549dd2['name'];if(_0x3304ba&&!_0x3304ba['has'](_0x4d0e01))continue;if(_0x2c51bf['has'](_0x4d0e01))continue;const _0x43dc73=resolve(_0xb41694,_0x4d0e01),_0x3e3252=readMetadataIfPresent(resolve(_0x43dc73,METADATA_FILE));if(_0x3e3252?.[_0x21085c(0x1ef)]!==_0x2a320d[_0x21085c(0x1ef)]||_0x3e3252[_0x21085c(0x200)]!==_0x3ef34e||_0x3e3252[_0x21085c(0x20a)]!==_0x4d0e01){_0x35c2a3[_0x21085c(0x1e1)]({'path':_0x43dc73,'action':_0x21085c(0x1fa),'reason':'metadata-mismatch'});continue;}removeSync(_0x43dc73),_0x35c2a3['push']({'path':_0x43dc73,'action':_0x21085c(0x202)});}}return _0x35c2a3;}export function linkGlobalRuntimeSkills(_0x12c5dc,_0x13326b={}){const _0x103cb5=a98_0x2e6b,_0x104878=resolveSkillSyncPaths(_0x13326b),_0x28302f=[];for(const _0x3a6cb4 of _0x12c5dc){if(_0x3a6cb4[_0x103cb5(0x200)]!=='builtin')throw CliErrors[_0x103cb5(0x1dd)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x3a6cb4[_0x103cb5(0x200)]);const _0x1e9d0f=requireSkillCode(_0x3a6cb4[_0x103cb5(0x204)]),_0x379a62=copyManagedSkillDirectory(_0x3a6cb4[_0x103cb5(0x1e2)],resolve(_0x104878['agentsSkillsDir'],_0x1e9d0f));_0x28302f['push']({..._0x379a62,'contentHash':_0x3a6cb4[_0x103cb5(0x208)]});}return _0x28302f;}function ensureManagedSymlink(_0xaeabb1,_0x255c6a,_0x6a2105){const _0x45181e=a98_0x2e6b;mkdirSync(dirname(_0xaeabb1),{'recursive':!![],'mode':0x1c0});if(existsSync(_0xaeabb1)||isDanglingSymlink(_0xaeabb1)){const _0x3ba224=lstatSync(_0xaeabb1);if(!_0x3ba224['isSymbolicLink']())throw CliErrors[_0x45181e(0x1dd)](_0x45181e(0x1f6)+_0xaeabb1);const _0x5ed71a=resolveSymlinkTarget(_0xaeabb1);if(!isPathInside(realOrResolved(_0x5ed71a),realOrResolved(_0x6a2105)))throw CliErrors[_0x45181e(0x1dd)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0xaeabb1);if(realOrResolved(_0x5ed71a)===realOrResolved(_0x255c6a))return{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x1eb)};return unlinkSync(_0xaeabb1),symlinkSync(_0x255c6a,_0xaeabb1,'dir'),{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x1df)};}return symlinkSync(_0x255c6a,_0xaeabb1,_0x45181e(0x1e2)),{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x207)};}function managedAppSkillLinkPaths(_0x28788a,_0x28a124){const _0x4fca0f=a98_0x2e6b;if(!existsSync(_0x28788a))return[];const _0x439788=_0x28a124+'--';return readdirSync(_0x28788a,{'withFileTypes':!![]})[_0x4fca0f(0x1de)](_0x1e09d9=>_0x1e09d9[_0x4fca0f(0x1e5)][_0x4fca0f(0x1e3)](_0x439788))[_0x4fca0f(0x1fd)](_0x11f171=>resolve(_0x28788a,_0x11f171[_0x4fca0f(0x1e5)]));}function removeManagedSkillLink(_0xba8051,_0x5b4bf2){const _0x3d17a6=a98_0x2e6b,_0x2b11fd=lstatIfPresent(_0xba8051);if(!_0x2b11fd?.['isSymbolicLink']())return{'path':_0xba8051,'action':_0x3d17a6(0x1fa),'reason':_0x3d17a6(0x1e4)};const _0x552481=resolveSymlinkTarget(_0xba8051);if(!isPathInside(realOrResolved(_0x552481),realOrResolved(_0x5b4bf2)))return{'path':_0xba8051,'action':_0x3d17a6(0x1fa),'reason':_0x3d17a6(0x1f1)};return unlinkSync(_0xba8051),{'path':_0xba8051,'action':_0x3d17a6(0x202)};}export function copyManagedSkillDirectory(_0x3a17a5,_0x56c871){const _0x415434=a98_0x2e6b,_0x52da29=resolve(_0x56c871,METADATA_FILE),_0x115449=existsSync(_0x56c871);if(_0x115449){const _0x319821=lstatSync(_0x56c871);if(_0x319821[_0x415434(0x1f2)]())throw CliErrors[_0x415434(0x1dd)](_0x415434(0x1f8)+_0x56c871);if(!_0x319821[_0x415434(0x1ea)]())throw CliErrors[_0x415434(0x1dd)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x56c871);const _0x17b9f5=readMetadataIfPresent(_0x52da29);if(_0x17b9f5?.[_0x415434(0x200)]!=='builtin')throw CliErrors[_0x415434(0x1dd)](_0x415434(0x209)+_0x56c871);}ensureDirSync(dirname(_0x56c871));const _0x20f713=_0x115449?readMetadataIfPresent(_0x52da29)?.[_0x415434(0x208)]:undefined,_0x4186cb=readMetadataIfPresent(resolve(_0x3a17a5,METADATA_FILE))?.['contentHash'];return _0x115449&&removeSync(_0x56c871),copySkillDirectory(_0x3a17a5,_0x56c871),{'path':_0x56c871,'target':_0x3a17a5,'action':!_0x115449?_0x415434(0x207):_0x20f713===_0x4186cb?_0x415434(0x1eb):_0x415434(0x1df)};}function copySkillDirectory(_0xbba6f,_0xcf575d){copySync(_0xbba6f,_0xcf575d,{'dereference':![],'overwrite':!![],'filter'(_0x3353d7){const _0x2a73f3=a98_0x2e6b;if(lstatSync(_0x3353d7)[_0x2a73f3(0x1f2)]())throw CliErrors[_0x2a73f3(0x1dd)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x3353d7);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x4a6921,_0x50bc0e){const _0xcd023=a99_0x4d80,_0x6cce86=_0x4a6921();while(!![]){try{const _0x574950=-parseInt(_0xcd023(0x1ba))/0x1*(-parseInt(_0xcd023(0x1d9))/0x2)+-parseInt(_0xcd023(0x1c5))/0x3+parseInt(_0xcd023(0x1da))/0x4+parseInt(_0xcd023(0x1cd))/0x5+-parseInt(_0xcd023(0x1bd))/0x6+-parseInt(_0xcd023(0x1c3))/0x7*(parseInt(_0xcd023(0x1d7))/0x8)+-parseInt(_0xcd023(0x1d8))/0x9*(-parseInt(_0xcd023(0x1c7))/0xa);if(_0x574950===_0x50bc0e)break;else _0x6cce86['push'](_0x6cce86['shift']());}catch(_0x3e8867){_0x6cce86['push'](_0x6cce86['shift']());}}}(a99_0x3a01,0x354de));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x4d80(_0x515473,_0x15ab1a){_0x515473=_0x515473-0x1b0;const _0x3a0156=a99_0x3a01();let _0x4d8019=_0x3a0156[_0x515473];return _0x4d8019;}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';export function listLocalRuntimeSkills(_0x34b213,_0x23baed={}){const _0x9df0dd=a99_0x4d80,_0x45ff72=safePathSegment(_0x34b213[_0x9df0dd(0x1b6)],_0x9df0dd(0x1b6)),_0x2a0200=normalizeRuntimeSkillScopes(_0x34b213[_0x9df0dd(0x1d6)]),_0x22a4fd=new Set(_0x2a0200),_0x1952fa=_0x34b213[_0x9df0dd(0x1b0)]?.[_0x9df0dd(0x1bf)](),_0x57292f=new Map(),_0x4d99fb=resolve(getRuntimeSkillCacheRoot(_0x34b213[_0x9df0dd(0x1c2)],_0x34b213['accessKey'],_0x23baed),_0x45ff72);for(const _0x56d3d7 of _0x2a0200){for(const _0xda4456 of localSkillEntryDirs(resolve(_0x4d99fb,_0x56d3d7))){collectLocalRuntimeSkill(_0x57292f,_0xda4456,{'appCode':_0x45ff72,'scopes':_0x22a4fd,'code':_0x1952fa,'source':_0x9df0dd(0x1cb)});}}const _0x266322=resolveSkillSyncPaths(_0x23baed);for(const _0xce76da of runtimeAgentSkillRoots(_0x266322)){for(const _0x50dee4 of localSkillLinkCandidates(_0xce76da,_0x45ff72,_0x22a4fd)){collectLocalRuntimeSkill(_0x57292f,_0x50dee4,{'appCode':_0x45ff72,'scopes':_0x22a4fd,'code':_0x1952fa,'source':_0x9df0dd(0x1d0),'linkedPath':_0x50dee4});}}return Array[_0x9df0dd(0x1b7)](_0x57292f['values']())[_0x9df0dd(0x1d1)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x49e623){const _0x39d16b=a99_0x4d80;if(!existsSync(_0x49e623))return[];return readdirSync(_0x49e623,{'withFileTypes':!![]})['filter'](_0x1316bd=>_0x1316bd['isDirectory']()||_0x1316bd[_0x39d16b(0x1cf)]())[_0x39d16b(0x1d5)](_0x205ef0=>resolve(_0x49e623,_0x205ef0[_0x39d16b(0x1d3)]));}function localSkillLinkCandidates(_0x41bdea,_0x56790d,_0x21fcf7){const _0x2f2924=a99_0x4d80;if(!existsSync(_0x41bdea))return[];const _0xc9693f=_0x56790d+'--';return readdirSync(_0x41bdea,{'withFileTypes':!![]})[_0x2f2924(0x1b5)](_0x134cdd=>_0x134cdd[_0x2f2924(0x1d2)]()||_0x134cdd[_0x2f2924(0x1cf)]())['filter'](_0x306db7=>_0x306db7[_0x2f2924(0x1d3)][_0x2f2924(0x1b2)](_0xc9693f)||_0x21fcf7[_0x2f2924(0x1ce)](_0x2f2924(0x1b3)))[_0x2f2924(0x1d5)](_0x4afa1b=>resolve(_0x41bdea,_0x4afa1b['name']));}function collectLocalRuntimeSkill(_0x2cdec6,_0x3f5db6,_0x137bb3){const _0x359bd8=a99_0x4d80,_0x41165d=resolve(_0x3f5db6,METADATA_FILE),_0x1662e3=readMetadataIfPresent(_0x41165d);if(!_0x1662e3)return;if(_0x1662e3[_0x359bd8(0x1b6)]!==_0x137bb3[_0x359bd8(0x1b6)])return;if(!isRuntimeSkillScope(_0x1662e3[_0x359bd8(0x1b8)])||!_0x137bb3[_0x359bd8(0x1d6)]['has'](_0x1662e3['scope']))return;const _0xa59fa4=_0x1662e3[_0x359bd8(0x1bc)]?.['trim']();if(!_0xa59fa4)return;if(_0x137bb3[_0x359bd8(0x1b0)]&&_0xa59fa4!==_0x137bb3['code'])return;const _0x153b25=_0x1662e3[_0x359bd8(0x1b8)]+':'+_0xa59fa4,_0x5bdccf=_0x137bb3['linkedPath']?[_0x137bb3[_0x359bd8(0x1c9)]]:[],_0x53490b=_0x2cdec6[_0x359bd8(0x1c1)](_0x153b25);if(_0x53490b){_0x137bb3[_0x359bd8(0x1ca)]===_0x359bd8(0x1cb)&&(_0x53490b[_0x359bd8(0x1c0)]=_0x3f5db6,_0x53490b[_0x359bd8(0x1cc)]=_0x3f5db6,_0x53490b[_0x359bd8(0x1be)]=resolve(_0x3f5db6,SKILL_FILE),_0x53490b['metadataPath']=_0x41165d);for(const _0x488030 of _0x5bdccf){!_0x53490b[_0x359bd8(0x1c8)][_0x359bd8(0x1c4)](_0x488030)&&_0x53490b['linkedPaths'][_0x359bd8(0x1d4)](_0x488030);}_0x53490b[_0x359bd8(0x1c8)]['sort']();return;}_0x2cdec6[_0x359bd8(0x1c6)](_0x153b25,{..._0x1662e3,'tags':Array[_0x359bd8(0x1b9)](_0x1662e3[_0x359bd8(0x1b1)])?_0x1662e3[_0x359bd8(0x1b1)]:[],'scope':_0x1662e3[_0x359bd8(0x1b8)],'source':_0x359bd8(0x1b4),'dir':_0x3f5db6,'cacheDir':_0x137bb3[_0x359bd8(0x1ca)]==='cache'?_0x3f5db6:undefined,'skillMdPath':resolve(_0x3f5db6,SKILL_FILE),'metadataPath':_0x41165d,'linkedPaths':_0x5bdccf});}function a99_0x3a01(){const _0x34a124=['local','filter','appCode','from','scope','isArray','208309RtPOYa','localeCompare','skillCode','1033890MZKZix','skillMdPath','trim','dir','get','env','21UKsVgl','includes','644325agsTZt','set','10MmzePs','linkedPaths','linkedPath','source','cache','cacheDir','770440MDivNj','has','isSymbolicLink','link','sort','isDirectory','name','push','map','scopes','929176TqHTAc','1778049GNjoZj','2WtMZBN','1575628eXpyVh','code','tags','startsWith','builtin'];a99_0x3a01=function(){return _0x34a124;};return a99_0x3a01();}function compareLocalRuntimeSkills(_0x48075b,_0x5591f5){const _0x26604d=a99_0x4d80,_0x5cf6be={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5cf6be[_0x48075b[_0x26604d(0x1b8)]]-_0x5cf6be[_0x5591f5['scope']]||_0x48075b[_0x26604d(0x1bc)][_0x26604d(0x1bb)](_0x5591f5[_0x26604d(0x1bc)])||_0x48075b[_0x26604d(0x1c0)][_0x26604d(0x1bb)](_0x5591f5['dir']);}
1
+ (function(_0xe8de08,_0x296f35){const _0x421a2b=a99_0x5b07,_0x50ecc6=_0xe8de08();while(!![]){try{const _0x3963ee=-parseInt(_0x421a2b(0x177))/0x1+-parseInt(_0x421a2b(0x171))/0x2+-parseInt(_0x421a2b(0x174))/0x3*(-parseInt(_0x421a2b(0x16a))/0x4)+parseInt(_0x421a2b(0x16e))/0x5*(parseInt(_0x421a2b(0x16b))/0x6)+parseInt(_0x421a2b(0x178))/0x7+-parseInt(_0x421a2b(0x184))/0x8+parseInt(_0x421a2b(0x175))/0x9;if(_0x3963ee===_0x296f35)break;else _0x50ecc6['push'](_0x50ecc6['shift']());}catch(_0x28c106){_0x50ecc6['push'](_0x50ecc6['shift']());}}}(a99_0xb6e6,0xb9856));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';export function listLocalRuntimeSkills(_0x524c3b,_0x531438={}){const _0x5eb2fc=a99_0x5b07,_0x50da4b=safePathSegment(_0x524c3b[_0x5eb2fc(0x188)],_0x5eb2fc(0x188)),_0x5e5d93=normalizeRuntimeSkillScopes(_0x524c3b[_0x5eb2fc(0x18a)]),_0x481842=new Set(_0x5e5d93),_0x356453=_0x524c3b[_0x5eb2fc(0x170)]?.['trim'](),_0x1d9823=new Map(),_0x58b419=resolve(getRuntimeSkillCacheRoot(_0x524c3b[_0x5eb2fc(0x180)],_0x524c3b['accessKey'],_0x531438),_0x50da4b);for(const _0x5932e4 of _0x5e5d93){for(const _0x16e865 of localSkillEntryDirs(resolve(_0x58b419,_0x5932e4))){collectLocalRuntimeSkill(_0x1d9823,_0x16e865,{'appCode':_0x50da4b,'scopes':_0x481842,'code':_0x356453,'source':_0x5eb2fc(0x167)});}}const _0x454671=resolveSkillSyncPaths(_0x531438);for(const _0x55af58 of runtimeAgentSkillRoots(_0x454671)){for(const _0x40a6d6 of localSkillLinkCandidates(_0x55af58,_0x50da4b,_0x481842)){collectLocalRuntimeSkill(_0x1d9823,_0x40a6d6,{'appCode':_0x50da4b,'scopes':_0x481842,'code':_0x356453,'source':_0x5eb2fc(0x18c),'linkedPath':_0x40a6d6});}}return Array[_0x5eb2fc(0x189)](_0x1d9823[_0x5eb2fc(0x17b)]())[_0x5eb2fc(0x18e)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x54cc9){const _0x35fbf9=a99_0x5b07;if(!existsSync(_0x54cc9))return[];return readdirSync(_0x54cc9,{'withFileTypes':!![]})[_0x35fbf9(0x186)](_0x9ec2ca=>_0x9ec2ca['isDirectory']()||_0x9ec2ca[_0x35fbf9(0x185)]())[_0x35fbf9(0x179)](_0x4450a4=>resolve(_0x54cc9,_0x4450a4[_0x35fbf9(0x181)]));}function localSkillLinkCandidates(_0x4fb756,_0x283e28,_0x332658){const _0x4b3f4d=a99_0x5b07;if(!existsSync(_0x4fb756))return[];const _0x5365bd=_0x283e28+'--';return readdirSync(_0x4fb756,{'withFileTypes':!![]})['filter'](_0x16d765=>_0x16d765[_0x4b3f4d(0x18d)]()||_0x16d765[_0x4b3f4d(0x185)]())['filter'](_0x26e541=>_0x26e541[_0x4b3f4d(0x181)]['startsWith'](_0x5365bd)||_0x332658[_0x4b3f4d(0x168)](_0x4b3f4d(0x187)))['map'](_0x4c728e=>resolve(_0x4fb756,_0x4c728e['name']));}function a99_0x5b07(_0x4094b3,_0x9d2696){_0x4094b3=_0x4094b3-0x166;const _0xb6e68=a99_0xb6e6();let _0x5b07a5=_0xb6e68[_0x4094b3];return _0x5b07a5;}function collectLocalRuntimeSkill(_0x170a7b,_0x1a5efd,_0x59cd05){const _0xbc60b8=a99_0x5b07,_0x5d6407=resolve(_0x1a5efd,METADATA_FILE),_0x40c774=readMetadataIfPresent(_0x5d6407);if(!_0x40c774)return;if(_0x40c774['appCode']!==_0x59cd05[_0xbc60b8(0x188)])return;if(!isRuntimeSkillScope(_0x40c774['scope'])||!_0x59cd05[_0xbc60b8(0x18a)][_0xbc60b8(0x168)](_0x40c774[_0xbc60b8(0x17a)]))return;const _0x3c1754=_0x40c774[_0xbc60b8(0x166)]?.['trim']();if(!_0x3c1754)return;if(_0x59cd05[_0xbc60b8(0x170)]&&_0x3c1754!==_0x59cd05[_0xbc60b8(0x170)])return;const _0x3c00aa=_0x40c774['scope']+':'+_0x3c1754,_0x5c3d26=_0x59cd05['linkedPath']?[_0x59cd05[_0xbc60b8(0x16d)]]:[],_0x52f158=_0x170a7b[_0xbc60b8(0x182)](_0x3c00aa);if(_0x52f158){_0x59cd05[_0xbc60b8(0x17c)]==='cache'&&(_0x52f158[_0xbc60b8(0x18b)]=_0x1a5efd,_0x52f158[_0xbc60b8(0x183)]=_0x1a5efd,_0x52f158[_0xbc60b8(0x17f)]=resolve(_0x1a5efd,SKILL_FILE),_0x52f158[_0xbc60b8(0x172)]=_0x5d6407);for(const _0x4e6201 of _0x5c3d26){!_0x52f158[_0xbc60b8(0x16f)][_0xbc60b8(0x17e)](_0x4e6201)&&_0x52f158['linkedPaths']['push'](_0x4e6201);}_0x52f158['linkedPaths'][_0xbc60b8(0x18e)]();return;}_0x170a7b[_0xbc60b8(0x16c)](_0x3c00aa,{..._0x40c774,'tags':Array[_0xbc60b8(0x176)](_0x40c774[_0xbc60b8(0x17d)])?_0x40c774[_0xbc60b8(0x17d)]:[],'scope':_0x40c774[_0xbc60b8(0x17a)],'source':_0xbc60b8(0x173),'dir':_0x1a5efd,'cacheDir':_0x59cd05[_0xbc60b8(0x17c)]===_0xbc60b8(0x167)?_0x1a5efd:undefined,'skillMdPath':resolve(_0x1a5efd,SKILL_FILE),'metadataPath':_0x5d6407,'linkedPaths':_0x5c3d26});}function compareLocalRuntimeSkills(_0x3bc73a,_0x1d8562){const _0x57f42c=a99_0x5b07,_0x2af3bb={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2af3bb[_0x3bc73a[_0x57f42c(0x17a)]]-_0x2af3bb[_0x1d8562['scope']]||_0x3bc73a[_0x57f42c(0x166)][_0x57f42c(0x169)](_0x1d8562[_0x57f42c(0x166)])||_0x3bc73a[_0x57f42c(0x18b)][_0x57f42c(0x169)](_0x1d8562['dir']);}function a99_0xb6e6(){const _0x37d655=['local','2010117XjgNOh','6375888QuoZhy','isArray','182940smujSI','5067972LsbyZq','map','scope','values','source','tags','includes','skillMdPath','env','name','get','cacheDir','6445544Ckxejq','isSymbolicLink','filter','builtin','appCode','from','scopes','dir','link','isDirectory','sort','skillCode','cache','has','localeCompare','8EcJdGY','30tFDDYp','set','linkedPath','217395LJByyU','linkedPaths','code','2482748NIFkzq','metadataPath'];a99_0xb6e6=function(){return _0x37d655;};return a99_0xb6e6();}
@@ -1 +1 @@
1
- (function(_0x36be81,_0x134e51){const _0x471461=a100_0x5f18,_0x484342=_0x36be81();while(!![]){try{const _0x128a7a=parseInt(_0x471461(0xd4))/0x1+parseInt(_0x471461(0xf6))/0x2+-parseInt(_0x471461(0xeb))/0x3+-parseInt(_0x471461(0xe4))/0x4+-parseInt(_0x471461(0xf3))/0x5+parseInt(_0x471461(0xe2))/0x6*(-parseInt(_0x471461(0xda))/0x7)+parseInt(_0x471461(0xe6))/0x8*(parseInt(_0x471461(0xe1))/0x9);if(_0x128a7a===_0x134e51)break;else _0x484342['push'](_0x484342['shift']());}catch(_0x186913){_0x484342['push'](_0x484342['shift']());}}}(a100_0x4b18,0xf0a35));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x238e12){const _0x3ecee3=a100_0x5f18;return _0x238e12[_0x3ecee3(0xf4)]??Buffer[_0x3ecee3(0xf8)](_0x238e12[_0x3ecee3(0xee)]??'',_0x3ecee3(0xfe));}export function fileText(_0x15b479){const _0x3edb1f=a100_0x5f18;return fileContent(_0x15b479)[_0x3edb1f(0xd7)]('utf8');}export function normalizeLocalFiles(_0x336578){const _0x128ab9=a100_0x5f18;if(!Array[_0x128ab9(0xe8)](_0x336578)||_0x336578['length']===0x0)return[];const _0x137c11=new Map();for(const _0x3e3d90 of _0x336578){if(!_0x3e3d90||typeof _0x3e3d90!==_0x128ab9(0xd9)||typeof _0x3e3d90[_0x128ab9(0xe5)]!==_0x128ab9(0xf0))throw CliErrors['validation'](_0x128ab9(0xdc));const _0x480013=normalizeSkillRelativePath(_0x3e3d90[_0x128ab9(0xe5)]);if(_0x137c11[_0x128ab9(0xfa)](_0x480013))throw CliErrors[_0x128ab9(0xec)](_0x128ab9(0xde)+_0x480013);if(_0x3e3d90['bytes']!==undefined&&!Buffer['isBuffer'](_0x3e3d90[_0x128ab9(0xf4)]))throw CliErrors['validation'](_0x128ab9(0xd5)+_0x480013);if(_0x3e3d90[_0x128ab9(0xf4)]===undefined&&typeof _0x3e3d90[_0x128ab9(0xee)]!==_0x128ab9(0xf0))throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x480013);const _0x43a564=fileContent(_0x3e3d90);_0x137c11[_0x128ab9(0xf5)](_0x480013,{'path':_0x480013,'bytes':_0x43a564});}return Array[_0x128ab9(0xf8)](_0x137c11[_0x128ab9(0xd3)]())[_0x128ab9(0xf9)](compareSkillFiles);}export function normalizeManifestFiles(_0x727453){const _0x5204ab=a100_0x5f18;if(!Array['isArray'](_0x727453)||_0x727453[_0x5204ab(0xef)]===0x0)return[];const _0x1494d9=new Map();for(const _0xf61b4d of _0x727453){if(!_0xf61b4d||typeof _0xf61b4d!=='object'||typeof _0xf61b4d['path']!==_0x5204ab(0xf0))throw CliErrors[_0x5204ab(0xec)](_0x5204ab(0xdc));const _0x3feb71=normalizeSkillRelativePath(_0xf61b4d[_0x5204ab(0xe5)]);if(_0x1494d9['has'](_0x3feb71))throw CliErrors[_0x5204ab(0xec)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x3feb71);if(!isSha256Hex(_0xf61b4d['sha256']))throw CliErrors[_0x5204ab(0xec)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x3feb71);if(!Number[_0x5204ab(0xfc)](_0xf61b4d[_0x5204ab(0xdf)])||_0xf61b4d['size']<0x0)throw CliErrors[_0x5204ab(0xec)](_0x5204ab(0xed)+_0x3feb71);_0x1494d9[_0x5204ab(0xf5)](_0x3feb71,{'path':_0x3feb71,'sha256':_0xf61b4d[_0x5204ab(0xe3)][_0x5204ab(0xd6)](),'size':_0xf61b4d[_0x5204ab(0xdf)]});}return Array[_0x5204ab(0xf8)](_0x1494d9[_0x5204ab(0xd3)]())[_0x5204ab(0xf9)](compareSkillFiles);}export function scanSkillDirectory(_0x1b2acd){const _0x453c5b=realpathSync(_0x1b2acd),_0x118c0f=[];function _0x4fe350(_0x36cf6f){const _0x2ce979=a100_0x5f18,_0x166212=readdirSync(_0x36cf6f,{'withFileTypes':!![]})[_0x2ce979(0xf9)]((_0x3dc2c0,_0x5df6fb)=>_0x3dc2c0[_0x2ce979(0xe7)][_0x2ce979(0xea)](_0x5df6fb[_0x2ce979(0xe7)]));for(const _0x27e5de of _0x166212){if(_0x27e5de[_0x2ce979(0xe0)]()&&IGNORED_DIR_NAMES[_0x2ce979(0xfa)](_0x27e5de[_0x2ce979(0xe7)]))continue;if(IGNORED_FILE_NAMES[_0x2ce979(0xfa)](_0x27e5de[_0x2ce979(0xe7)]))continue;const _0x34ffa9=resolve(_0x36cf6f,_0x27e5de[_0x2ce979(0xe7)]);if(_0x27e5de[_0x2ce979(0xf7)]())throw CliErrors[_0x2ce979(0xec)](_0x2ce979(0xdb)+_0x34ffa9);const _0x1e788a=toPosixPath(relative(_0x453c5b,_0x34ffa9));if(_0x27e5de[_0x2ce979(0xe0)]()){_0x4fe350(_0x34ffa9);continue;}if(!_0x27e5de['isFile']())continue;validateSkillRelativePath(_0x1e788a);const _0x3d8638=readFileSync(_0x34ffa9);_0x118c0f[_0x2ce979(0xf2)]({'path':_0x1e788a,'bytes':_0x3d8638});}}return _0x4fe350(_0x453c5b),normalizeLocalFiles(_0x118c0f);}export function compareSkillFiles(_0x58c6a2,_0x510d69){const _0x30c5c5=a100_0x5f18;if(_0x58c6a2['path']===SKILL_FILE)return _0x510d69[_0x30c5c5(0xe5)]===SKILL_FILE?0x0:-0x1;if(_0x510d69[_0x30c5c5(0xe5)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x58c6a2[_0x30c5c5(0xe5)],_0x30c5c5(0xfe)),Buffer['from'](_0x510d69['path'],_0x30c5c5(0xfe)));}export function normalizeSkillRelativePath(_0xf5be73){const _0x2c11be=a100_0x5f18,_0x3fe725=toPosixPath(_0xf5be73[_0x2c11be(0xfd)]());return validateSkillRelativePath(_0x3fe725),_0x3fe725;}function a100_0x5f18(_0x41a82d,_0x4e7eb3){_0x41a82d=_0x41a82d-0xd3;const _0x4b18d2=a100_0x4b18();let _0x5f1838=_0x4b18d2[_0x41a82d];return _0x5f1838;}export function validateSkillRelativePath(_0x1da67b){const _0x3a9963=a100_0x5f18;if(!_0x1da67b||_0x1da67b[_0x3a9963(0xfb)]('/')||_0x1da67b[_0x3a9963(0xdd)]('//'))throw CliErrors[_0x3a9963(0xec)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x1da67b);for(const _0x5b407b of _0x1da67b['split']('/')){if(!_0x5b407b||_0x5b407b==='.'||_0x5b407b==='..')throw CliErrors['validation'](_0x3a9963(0xd8)+_0x1da67b);}}function a100_0x4b18(){const _0x32b107=['string','replace','push','2568355MZqGvO','bytes','set','1256042xNyseJ','isSymbolicLink','from','sort','has','startsWith','isSafeInteger','trim','utf8','values','1048951dlwZBd','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','toLowerCase','toString','Unsafe\x20Skill\x20file\x20path:\x20','object','63FmuVxi','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','Skill\x20file\x20path\x20must\x20be\x20text.','includes','Duplicate\x20Skill\x20file\x20path:\x20','size','isDirectory','59589xLYhYE','850194ImrXEr','sha256','6254828HbZOEK','path','4336NYCEEu','name','isArray','test','localeCompare','2781696dqVsLJ','validation','Skill\x20file\x20size\x20is\x20invalid:\x20','content','length'];a100_0x4b18=function(){return _0x32b107;};return a100_0x4b18();}export function toPosixPath(_0x589947){const _0x5e12d7=a100_0x5f18;return _0x589947[_0x5e12d7(0xf1)](/\\/g,'/');}export function isSha256Hex(_0x4670e0){const _0x58a02c=a100_0x5f18;return typeof _0x4670e0==='string'&&/^[a-fA-F0-9]{64}$/[_0x58a02c(0xe9)](_0x4670e0);}
1
+ (function(_0x25cc53,_0x3bac47){const _0x2c2a09=a100_0x270d,_0x589e3b=_0x25cc53();while(!![]){try{const _0x3b3f80=parseInt(_0x2c2a09(0x174))/0x1*(-parseInt(_0x2c2a09(0x181))/0x2)+parseInt(_0x2c2a09(0x186))/0x3+parseInt(_0x2c2a09(0x17d))/0x4*(parseInt(_0x2c2a09(0x17b))/0x5)+parseInt(_0x2c2a09(0x18c))/0x6+-parseInt(_0x2c2a09(0x190))/0x7*(-parseInt(_0x2c2a09(0x173))/0x8)+-parseInt(_0x2c2a09(0x16e))/0x9+-parseInt(_0x2c2a09(0x17a))/0xa;if(_0x3b3f80===_0x3bac47)break;else _0x589e3b['push'](_0x589e3b['shift']());}catch(_0x39e827){_0x589e3b['push'](_0x589e3b['shift']());}}}(a100_0x17fe,0xa75dc));function a100_0x17fe(){const _0x30ebbf=['Duplicate\x20Skill\x20file\x20path:\x20','localeCompare','size','length','11487930ZUCSEO','3175000Aglqla','Unsafe\x20Skill\x20file\x20path:\x20','8xODNID','content','isSafeInteger','sha256','6ngvNuO','name','split','Skill\x20file\x20size\x20is\x20invalid:\x20','isDirectory','2495520ezimzK','Skill\x20file\x20sha256\x20is\x20invalid:\x20','path','push','includes','sort','4881516zonfuO','isBuffer','test','Skill\x20file\x20path\x20must\x20be\x20text.','21DRUMWj','bytes','validation','utf8','values','object','toLowerCase','has','compare','replace','11116629waGxeX','trim','set','from','string','2520776diZUJc','263737OUajrM','isArray'];a100_0x17fe=function(){return _0x30ebbf;};return a100_0x17fe();}import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a100_0x270d(_0x4701c0,_0x28cafe){_0x4701c0=_0x4701c0-0x168;const _0x17fee5=a100_0x17fe();let _0x270d20=_0x17fee5[_0x4701c0];return _0x270d20;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x275a75){const _0x4e4474=a100_0x270d;return _0x275a75[_0x4e4474(0x191)]??Buffer['from'](_0x275a75[_0x4e4474(0x17e)]??'','utf8');}export function fileText(_0x532ed3){const _0x45ffc4=a100_0x270d;return fileContent(_0x532ed3)['toString'](_0x45ffc4(0x193));}export function normalizeLocalFiles(_0x56cd46){const _0x20bc22=a100_0x270d;if(!Array['isArray'](_0x56cd46)||_0x56cd46['length']===0x0)return[];const _0x5e48d8=new Map();for(const _0x5e3010 of _0x56cd46){if(!_0x5e3010||typeof _0x5e3010!=='object'||typeof _0x5e3010['path']!==_0x20bc22(0x172))throw CliErrors[_0x20bc22(0x192)](_0x20bc22(0x18f));const _0x45e197=normalizeSkillRelativePath(_0x5e3010[_0x20bc22(0x188)]);if(_0x5e48d8[_0x20bc22(0x16b)](_0x45e197))throw CliErrors[_0x20bc22(0x192)](_0x20bc22(0x176)+_0x45e197);if(_0x5e3010[_0x20bc22(0x191)]!==undefined&&!Buffer[_0x20bc22(0x18d)](_0x5e3010[_0x20bc22(0x191)]))throw CliErrors[_0x20bc22(0x192)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x45e197);if(_0x5e3010['bytes']===undefined&&typeof _0x5e3010[_0x20bc22(0x17e)]!==_0x20bc22(0x172))throw CliErrors[_0x20bc22(0x192)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x45e197);const _0x8a33e3=fileContent(_0x5e3010);_0x5e48d8[_0x20bc22(0x170)](_0x45e197,{'path':_0x45e197,'bytes':_0x8a33e3});}return Array[_0x20bc22(0x171)](_0x5e48d8[_0x20bc22(0x168)]())[_0x20bc22(0x18b)](compareSkillFiles);}export function normalizeManifestFiles(_0x4047b7){const _0x1607d1=a100_0x270d;if(!Array[_0x1607d1(0x175)](_0x4047b7)||_0x4047b7[_0x1607d1(0x179)]===0x0)return[];const _0x3a434e=new Map();for(const _0x24c6bc of _0x4047b7){if(!_0x24c6bc||typeof _0x24c6bc!==_0x1607d1(0x169)||typeof _0x24c6bc[_0x1607d1(0x188)]!==_0x1607d1(0x172))throw CliErrors['validation'](_0x1607d1(0x18f));const _0x19a8ee=normalizeSkillRelativePath(_0x24c6bc[_0x1607d1(0x188)]);if(_0x3a434e[_0x1607d1(0x16b)](_0x19a8ee))throw CliErrors[_0x1607d1(0x192)](_0x1607d1(0x176)+_0x19a8ee);if(!isSha256Hex(_0x24c6bc[_0x1607d1(0x180)]))throw CliErrors[_0x1607d1(0x192)](_0x1607d1(0x187)+_0x19a8ee);if(!Number[_0x1607d1(0x17f)](_0x24c6bc['size'])||_0x24c6bc[_0x1607d1(0x178)]<0x0)throw CliErrors['validation'](_0x1607d1(0x184)+_0x19a8ee);_0x3a434e[_0x1607d1(0x170)](_0x19a8ee,{'path':_0x19a8ee,'sha256':_0x24c6bc[_0x1607d1(0x180)][_0x1607d1(0x16a)](),'size':_0x24c6bc[_0x1607d1(0x178)]});}return Array[_0x1607d1(0x171)](_0x3a434e[_0x1607d1(0x168)]())[_0x1607d1(0x18b)](compareSkillFiles);}export function scanSkillDirectory(_0x4e9029){const _0x423b12=realpathSync(_0x4e9029),_0x242ef1=[];function _0x132d00(_0x1d38cc){const _0x4bf93e=a100_0x270d,_0x5f2372=readdirSync(_0x1d38cc,{'withFileTypes':!![]})[_0x4bf93e(0x18b)]((_0x3535d8,_0x5d5682)=>_0x3535d8['name'][_0x4bf93e(0x177)](_0x5d5682[_0x4bf93e(0x182)]));for(const _0x5d4080 of _0x5f2372){if(_0x5d4080[_0x4bf93e(0x185)]()&&IGNORED_DIR_NAMES[_0x4bf93e(0x16b)](_0x5d4080['name']))continue;if(IGNORED_FILE_NAMES[_0x4bf93e(0x16b)](_0x5d4080[_0x4bf93e(0x182)]))continue;const _0x2d636d=resolve(_0x1d38cc,_0x5d4080['name']);if(_0x5d4080['isSymbolicLink']())throw CliErrors[_0x4bf93e(0x192)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x2d636d);const _0x152401=toPosixPath(relative(_0x423b12,_0x2d636d));if(_0x5d4080['isDirectory']()){_0x132d00(_0x2d636d);continue;}if(!_0x5d4080['isFile']())continue;validateSkillRelativePath(_0x152401);const _0x41f707=readFileSync(_0x2d636d);_0x242ef1[_0x4bf93e(0x189)]({'path':_0x152401,'bytes':_0x41f707});}}return _0x132d00(_0x423b12),normalizeLocalFiles(_0x242ef1);}export function compareSkillFiles(_0x3c3662,_0x4b7888){const _0x4f55b2=a100_0x270d;if(_0x3c3662[_0x4f55b2(0x188)]===SKILL_FILE)return _0x4b7888[_0x4f55b2(0x188)]===SKILL_FILE?0x0:-0x1;if(_0x4b7888['path']===SKILL_FILE)return 0x1;return Buffer[_0x4f55b2(0x16c)](Buffer[_0x4f55b2(0x171)](_0x3c3662[_0x4f55b2(0x188)],_0x4f55b2(0x193)),Buffer[_0x4f55b2(0x171)](_0x4b7888[_0x4f55b2(0x188)],_0x4f55b2(0x193)));}export function normalizeSkillRelativePath(_0x4c6294){const _0x4e9b38=a100_0x270d,_0x5dbd11=toPosixPath(_0x4c6294[_0x4e9b38(0x16f)]());return validateSkillRelativePath(_0x5dbd11),_0x5dbd11;}export function validateSkillRelativePath(_0x431961){const _0x2242b3=a100_0x270d;if(!_0x431961||_0x431961['startsWith']('/')||_0x431961[_0x2242b3(0x18a)]('//'))throw CliErrors[_0x2242b3(0x192)](_0x2242b3(0x17c)+_0x431961);for(const _0x287ed7 of _0x431961[_0x2242b3(0x183)]('/')){if(!_0x287ed7||_0x287ed7==='.'||_0x287ed7==='..')throw CliErrors[_0x2242b3(0x192)](_0x2242b3(0x17c)+_0x431961);}}export function toPosixPath(_0x39b063){const _0x5510cc=a100_0x270d;return _0x39b063[_0x5510cc(0x16d)](/\\/g,'/');}export function isSha256Hex(_0x4bcd66){const _0x325e12=a100_0x270d;return typeof _0x4bcd66===_0x325e12(0x172)&&/^[a-fA-F0-9]{64}$/[_0x325e12(0x18e)](_0x4bcd66);}
@@ -1 +1 @@
1
- (function(_0x135b4c,_0x26f528){const _0x4982bd=a101_0x4c2b,_0x306812=_0x135b4c();while(!![]){try{const _0x19ddcb=-parseInt(_0x4982bd(0xb4))/0x1+-parseInt(_0x4982bd(0xd3))/0x2+parseInt(_0x4982bd(0xbe))/0x3*(-parseInt(_0x4982bd(0xcc))/0x4)+parseInt(_0x4982bd(0xc5))/0x5*(-parseInt(_0x4982bd(0xb1))/0x6)+-parseInt(_0x4982bd(0xd5))/0x7+parseInt(_0x4982bd(0xd7))/0x8+parseInt(_0x4982bd(0xd6))/0x9;if(_0x19ddcb===_0x26f528)break;else _0x306812['push'](_0x306812['shift']());}catch(_0x5a7ac7){_0x306812['push'](_0x306812['shift']());}}}(a101_0x1fde,0xdd90d));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a101_0x4c2b(_0x1ece85,_0x44dbd2){_0x1ece85=_0x1ece85-0xac;const _0x1fde93=a101_0x1fde();let _0x4c2b24=_0x1fde93[_0x1ece85];return _0x4c2b24;}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(_0xf9e72e,_0x330c44,_0x9c4bd8){const _0x1712c9=a101_0x4c2b,_0x1b52b5=requireSkillCode(_0xf9e72e),_0x5481a9=requirePackageBytes(_0x1b52b5,_0x9c4bd8[_0x1712c9(0xe4)]),_0x42a0aa=extractDownloadedPackage(_0x5481a9),_0x2b1ffc=_0x42a0aa[_0x1712c9(0xc0)](_0x2d84b0=>_0x2d84b0['path']===SKILL_FILE);if(!_0x2b1ffc)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x1b52b5);const _0x1e7591=withMaterializedSkillFrontmatter(_0x42a0aa,_0xf9e72e,_0x1b52b5),_0xdf1136=_0x1e7591[_0x1712c9(0xc0)](_0x5e6df9=>_0x5e6df9[_0x1712c9(0xaf)]===SKILL_FILE),_0x48f59c=fileText(_0xdf1136),_0x203d94=getRuntimeSkillDir(_0x9c4bd8[_0x1712c9(0xc9)],_0x9c4bd8[_0x1712c9(0xca)],_0x9c4bd8[_0x1712c9(0xc3)],_0x330c44,_0x1b52b5,_0x9c4bd8[_0x1712c9(0xcf)]),_0x3017df=resolve(_0x203d94,SKILL_FILE),_0x29fccc=resolve(_0x203d94,METADATA_FILE),_0xd40ac2=contentHash(_0x48f59c),_0x1e69b4=readMetadataIfPresent(_0x29fccc)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x203d94,_0x29fccc,_0x1e7591,_0x9c4bd8['force']===!![]),mkdirSync(_0x203d94,{'recursive':!![],'mode':0x1c0});const _0x30ae18=existsSync(_0x3017df)?readFileSync(_0x3017df,_0x1712c9(0xd9)):undefined;return materializeFiles(_0x203d94,_0x1e7591),removeStaleManagedFiles(_0x203d94,_0x1e69b4,_0x1e7591),writeJsonAtomic(_0x29fccc,buildMetadata(_0xf9e72e,_0x330c44,_0x9c4bd8[_0x1712c9(0xc3)],_0xd40ac2,_0x9c4bd8[_0x1712c9(0xe5)],_0x1e7591,_0x5481a9)),{'skill':_0xf9e72e,'scope':_0x330c44,'dir':_0x203d94,'skillMdPath':_0x3017df,'metadataPath':_0x29fccc,'contentHash':_0xd40ac2,'changed':_0x30ae18!==_0x48f59c};}function withMaterializedSkillFrontmatter(_0x463411,_0x57b54f,_0x28c42f){const _0x5ed103=a101_0x4c2b,_0x24c6f4=skillDisplayName(_0x57b54f,_0x28c42f),_0x5ba529=_0x57b54f['description']?.[_0x5ed103(0xb0)]()||_0x24c6f4||_0x28c42f;return normalizeLocalFiles(_0x463411)[_0x5ed103(0xd8)](_0x36d488=>{const _0x40040e=_0x5ed103,_0x129a41=fileText(_0x36d488);if(_0x36d488[_0x40040e(0xaf)]!==SKILL_FILE)return _0x36d488;if(hasYamlFrontmatter(_0x129a41))return{'path':_0x36d488[_0x40040e(0xaf)],'content':withSyncedDisplayName(_0x129a41,_0x24c6f4)};return{'path':_0x36d488['path'],'content':prependSkillFrontmatter(_0x129a41,{'name':_0x28c42f,'displayName':_0x24c6f4,'description':_0x5ba529})};});}function hasYamlFrontmatter(_0x56e002){const _0x1f881c=a101_0x4c2b;return/^\uFEFF?---\s*\r?\n/[_0x1f881c(0xac)](_0x56e002);}function prependSkillFrontmatter(_0x16881b,_0x110b41){const _0x427b35=a101_0x4c2b,_0x3c55ae=_0x16881b[_0x427b35(0xc8)](/^\uFEFF/,'');return['---',_0x427b35(0xd1)+yamlString(_0x110b41[_0x427b35(0xcb)]),_0x110b41['displayName']?_0x427b35(0xb9)+yamlString(_0x110b41['displayName']):undefined,_0x427b35(0xdf)+yamlString(_0x110b41[_0x427b35(0xad)]),_0x427b35(0xd4),'',_0x3c55ae][_0x427b35(0xdb)](_0x4d2b41=>_0x4d2b41!==undefined)[_0x427b35(0xbb)]('\x0a');}function yamlString(_0x5ce85e){const _0x5c72df=a101_0x4c2b;return JSON[_0x5c72df(0xae)](_0x5ce85e['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x31edf7,_0x1c1868){const _0xd7326=a101_0x4c2b,_0x5c1a77=_0x31edf7[_0xd7326(0xe1)]?.['trim']();return _0x5c1a77||_0x1c1868;}function withSyncedDisplayName(_0x57bd76,_0x2f87da){const _0x4704ec=a101_0x4c2b,_0x4e3a4e=_0x57bd76['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4e3a4e)return _0x57bd76;const _0x458f9f=_0x4e3a4e[0x1]??'',_0x3e8508=_0x4e3a4e[0x2]??'',_0x548241=parseDocument(_0x3e8508);if(_0x548241['errors'][_0x4704ec(0xc7)]>0x0||!isMap(_0x548241[_0x4704ec(0xb6)]))return _0x57bd76;if(_0x2f87da)_0x548241[_0x4704ec(0xba)](_0x4704ec(0xda),_0x2f87da);else{if(_0x548241[_0x4704ec(0xe3)](_0x4704ec(0xda)))_0x548241[_0x4704ec(0xb2)](_0x4704ec(0xda));else return _0x57bd76;}_0x548241[_0x4704ec(0xb6)][_0x4704ec(0xe2)]=![];const _0x8b59a5=_0x548241[_0x4704ec(0xce)]({'lineWidth':0x0})['trimEnd'](),_0x4c68bb=_0x57bd76[_0x4704ec(0xbc)](_0x4e3a4e[0x0][_0x4704ec(0xc7)])[_0x4704ec(0xc8)](/^\r?\n/,'');return _0x458f9f+_0x4704ec(0xd2)+_0x8b59a5+_0x4704ec(0xb7)+_0x4c68bb;}function ensurePulledFilesCanBeOverwritten(_0x755f37,_0x4e206d,_0x29a17c,_0x5aed0c){const _0x44c2bb=a101_0x4c2b;if(_0x5aed0c||!existsSync(_0x4e206d))return;const _0x322043=readMetadataIfPresent(_0x4e206d);if(!_0x322043)return;const _0x27f619=_0x322043[_0x44c2bb(0xb3)]&&Object[_0x44c2bb(0xbd)](_0x322043[_0x44c2bb(0xb3)])[_0x44c2bb(0xc7)]>0x0?_0x322043[_0x44c2bb(0xb3)]:undefined;if(_0x27f619)for(const [_0x5d2562,_0x513734]of Object[_0x44c2bb(0xde)](_0x27f619)){const _0x351724=resolveManagedFilePath(_0x755f37,_0x5d2562);if(!existsSync(_0x351724))throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xdd)+_0x5d2562);const _0x8930d1=lstatSync(_0x351724);if(!_0x8930d1['isFile']())throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xdc)+_0x5d2562);const _0x436392=bufferSha256(readFileSync(_0x351724));if(_0x436392!==_0x513734)throw CliErrors[_0x44c2bb(0xbf)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x755f37+_0x44c2bb(0xcd)+_0x5d2562,_0x44c2bb(0xe0)+_0x5d2562);}else{const _0x2ef45a=resolve(_0x755f37,SKILL_FILE);if(existsSync(_0x2ef45a)&&_0x322043[_0x44c2bb(0xb5)]){const _0x56dff4=contentHash(readFileSync(_0x2ef45a,_0x44c2bb(0xd9)));if(_0x56dff4!==_0x322043[_0x44c2bb(0xb5)])throw CliErrors['validation'](_0x44c2bb(0xc1)+_0x2ef45a,_0x44c2bb(0xd0));}}for(const _0x37b0ac of normalizeLocalFiles(_0x29a17c)){if(_0x27f619?.[_0x37b0ac['path']])continue;if(!_0x27f619&&_0x37b0ac['path']===SKILL_FILE)continue;const _0x3d29ce=resolveManagedFilePath(_0x755f37,_0x37b0ac[_0x44c2bb(0xaf)]);if(!existsSync(_0x3d29ce))continue;const _0x187715=lstatSync(_0x3d29ce);if(!_0x187715[_0x44c2bb(0xc6)]())throw CliErrors['validation'](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xb8)+_0x37b0ac[_0x44c2bb(0xaf)]);const _0x2aff19=bufferSha256(readFileSync(_0x3d29ce));if(_0x2aff19!==fileHash(_0x37b0ac))throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xc4)+_0x37b0ac[_0x44c2bb(0xaf)]);}}function materializeFiles(_0x2d33f7,_0x1b5090){const _0x2e0fb7=a101_0x4c2b;for(const _0x50e9b1 of normalizeLocalFiles(_0x1b5090)){const _0x103b7f=resolveManagedFilePath(_0x2d33f7,_0x50e9b1[_0x2e0fb7(0xaf)]);mkdirSync(dirname(_0x103b7f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x103b7f,fileContent(_0x50e9b1),0x180);}}function removeStaleManagedFiles(_0x2f41fe,_0x332abe,_0x3bbcff){const _0x12c63c=a101_0x4c2b;if(!_0x332abe)return;const _0x4cd09a=new Set(normalizeLocalFiles(_0x3bbcff)[_0x12c63c(0xd8)](_0x31d2f5=>_0x31d2f5[_0x12c63c(0xaf)]));for(const _0x177c6b of Object['keys'](_0x332abe)){if(_0x4cd09a[_0x12c63c(0xe3)](_0x177c6b))continue;const _0x5e350d=resolveManagedFilePath(_0x2f41fe,_0x177c6b);existsSync(_0x5e350d)&&lstatSync(_0x5e350d)['isFile']()&&rmSync(_0x5e350d,{'force':!![]});}}function a101_0x1fde(){const _0x209430=['flow','has','packageBytes','pulledAt','test','description','stringify','path','trim','1450746JEgiqk','delete','fileHashes','269369NoLPuk','contentHash','contents','\x0a---\x0a\x0a','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','displayName:\x20','set','join','slice','keys','117rYmQPE','validation','find','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','appCode','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','35BVoubw','isFile','length','replace','env','accessKey','name','36412vcbJrR','.\x20Changed\x20file:\x20','toString','paths','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','name:\x20','---\x0a','1375632KDgEnn','---','12163193emWRrc','40272894aqjXDd','9400840cELwuj','map','utf8','displayName','filter','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','entries','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','skillName'];a101_0x1fde=function(){return _0x209430;};return a101_0x1fde();}
1
+ (function(_0x35394a,_0x1df660){const _0x29021b=a101_0x5461,_0x2d3b5f=_0x35394a();while(!![]){try{const _0x2c1b31=parseInt(_0x29021b(0xdd))/0x1+-parseInt(_0x29021b(0xe8))/0x2+parseInt(_0x29021b(0xfc))/0x3+-parseInt(_0x29021b(0x10a))/0x4*(parseInt(_0x29021b(0xf0))/0x5)+-parseInt(_0x29021b(0x10c))/0x6*(-parseInt(_0x29021b(0xe5))/0x7)+-parseInt(_0x29021b(0xf5))/0x8+parseInt(_0x29021b(0xe3))/0x9;if(_0x2c1b31===_0x1df660)break;else _0x2d3b5f['push'](_0x2d3b5f['shift']());}catch(_0x15679a){_0x2d3b5f['push'](_0x2d3b5f['shift']());}}}(a101_0xa4ea,0x4e3dc));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(_0x4d42d0,_0x43faf9,_0x52b2fc){const _0x55cb06=a101_0x5461,_0x4df7fb=requireSkillCode(_0x4d42d0),_0x4bbe5f=requirePackageBytes(_0x4df7fb,_0x52b2fc[_0x55cb06(0xee)]),_0xf3df22=extractDownloadedPackage(_0x4bbe5f),_0x13e3df=_0xf3df22[_0x55cb06(0x100)](_0x5ae08f=>_0x5ae08f[_0x55cb06(0x102)]===SKILL_FILE);if(!_0x13e3df)throw CliErrors[_0x55cb06(0xf6)](_0x55cb06(0xf2)+SKILL_FILE+':\x20'+_0x4df7fb);const _0x2dcf56=withMaterializedSkillFrontmatter(_0xf3df22,_0x4d42d0,_0x4df7fb),_0x157a60=_0x2dcf56[_0x55cb06(0x100)](_0x10de23=>_0x10de23[_0x55cb06(0x102)]===SKILL_FILE),_0x324cb1=fileText(_0x157a60),_0x5145bf=getRuntimeSkillDir(_0x52b2fc[_0x55cb06(0xf7)],_0x52b2fc[_0x55cb06(0xef)],_0x52b2fc[_0x55cb06(0xf8)],_0x43faf9,_0x4df7fb,_0x52b2fc['paths']),_0x2a7f48=resolve(_0x5145bf,SKILL_FILE),_0x1b831a=resolve(_0x5145bf,METADATA_FILE),_0x4e50d6=contentHash(_0x324cb1),_0x2ce560=readMetadataIfPresent(_0x1b831a)?.[_0x55cb06(0xe0)];ensurePulledFilesCanBeOverwritten(_0x5145bf,_0x1b831a,_0x2dcf56,_0x52b2fc['force']===!![]),mkdirSync(_0x5145bf,{'recursive':!![],'mode':0x1c0});const _0x5871e0=existsSync(_0x2a7f48)?readFileSync(_0x2a7f48,'utf8'):undefined;return materializeFiles(_0x5145bf,_0x2dcf56),removeStaleManagedFiles(_0x5145bf,_0x2ce560,_0x2dcf56),writeJsonAtomic(_0x1b831a,buildMetadata(_0x4d42d0,_0x43faf9,_0x52b2fc[_0x55cb06(0xf8)],_0x4e50d6,_0x52b2fc['pulledAt'],_0x2dcf56,_0x4bbe5f)),{'skill':_0x4d42d0,'scope':_0x43faf9,'dir':_0x5145bf,'skillMdPath':_0x2a7f48,'metadataPath':_0x1b831a,'contentHash':_0x4e50d6,'changed':_0x5871e0!==_0x324cb1};}function withMaterializedSkillFrontmatter(_0x4a0d51,_0x181153,_0x235086){const _0x203dcf=a101_0x5461,_0x5cb34d=skillDisplayName(_0x181153,_0x235086),_0x4ede13=_0x181153[_0x203dcf(0xdf)]?.['trim']()||_0x5cb34d||_0x235086;return normalizeLocalFiles(_0x4a0d51)[_0x203dcf(0x110)](_0x1937dc=>{const _0xf49b20=_0x203dcf,_0x3c1a75=fileText(_0x1937dc);if(_0x1937dc['path']!==SKILL_FILE)return _0x1937dc;if(hasYamlFrontmatter(_0x3c1a75))return{'path':_0x1937dc['path'],'content':withSyncedDisplayName(_0x3c1a75,_0x5cb34d)};return{'path':_0x1937dc[_0xf49b20(0x102)],'content':prependSkillFrontmatter(_0x3c1a75,{'name':_0x235086,'displayName':_0x5cb34d,'description':_0x4ede13})};});}function hasYamlFrontmatter(_0x1a62f6){return/^\uFEFF?---\s*\r?\n/['test'](_0x1a62f6);}function prependSkillFrontmatter(_0x41dc9b,_0x37cd4a){const _0x6643bb=a101_0x5461,_0x48754b=_0x41dc9b[_0x6643bb(0xfb)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x37cd4a[_0x6643bb(0x104)]),_0x37cd4a[_0x6643bb(0xfd)]?'displayName:\x20'+yamlString(_0x37cd4a[_0x6643bb(0xfd)]):undefined,'description:\x20'+yamlString(_0x37cd4a[_0x6643bb(0xdf)]),_0x6643bb(0xec),'',_0x48754b][_0x6643bb(0x10d)](_0x4b5a2f=>_0x4b5a2f!==undefined)[_0x6643bb(0xe7)]('\x0a');}function yamlString(_0x591c7d){const _0x2af12e=a101_0x5461;return JSON['stringify'](_0x591c7d[_0x2af12e(0xfb)](/\r/g,'')[_0x2af12e(0x101)]());}function skillDisplayName(_0x226da9,_0x186654){const _0x2210bb=a101_0x5461,_0x3391bb=_0x226da9[_0x2210bb(0xfe)]?.[_0x2210bb(0x101)]();return _0x3391bb||_0x186654;}function a101_0xa4ea(){const _0x7cf4bc=['214332owBnni','filter','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','match','map','276317dKKJRz','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description','fileHashes','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','utf8','2284830Uuqeez','entries','105ZJHUvz','---\x0a','join','267902aBTIbI','contentHash','contents','isFile','---','.\x20Changed\x20file:\x20','packageBytes','accessKey','145705dcyPfC','toString','Runtime\x20Skill\x20package\x20is\x20missing\x20','errors','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','4974112nHLteW','validation','env','appCode','length','delete','replace','992175asKkSp','displayName','skillName','has','find','trim','path','keys','name','slice','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','set','flow','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','44zhYeTh','Managed\x20file\x20was\x20removed\x20locally:\x20'];a101_0xa4ea=function(){return _0x7cf4bc;};return a101_0xa4ea();}function withSyncedDisplayName(_0x178881,_0x5106b1){const _0x10bf8a=a101_0x5461,_0x7b6edc=_0x178881[_0x10bf8a(0x10f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x7b6edc)return _0x178881;const _0x4456da=_0x7b6edc[0x1]??'',_0x5e0854=_0x7b6edc[0x2]??'',_0x5e6fc7=parseDocument(_0x5e0854);if(_0x5e6fc7[_0x10bf8a(0xf3)][_0x10bf8a(0xf9)]>0x0||!isMap(_0x5e6fc7[_0x10bf8a(0xea)]))return _0x178881;if(_0x5106b1)_0x5e6fc7[_0x10bf8a(0x107)]('displayName',_0x5106b1);else{if(_0x5e6fc7[_0x10bf8a(0xff)](_0x10bf8a(0xfd)))_0x5e6fc7[_0x10bf8a(0xfa)](_0x10bf8a(0xfd));else return _0x178881;}forceBlockCollections(_0x5e6fc7['contents']);const _0x36a365=_0x5e6fc7[_0x10bf8a(0xf1)]({'lineWidth':0x0})['trimEnd'](),_0x63de61=_0x178881[_0x10bf8a(0x105)](_0x7b6edc[0x0][_0x10bf8a(0xf9)])[_0x10bf8a(0xfb)](/^\r?\n/,'');return _0x4456da+_0x10bf8a(0xe6)+_0x36a365+'\x0a---\x0a\x0a'+_0x63de61;}function forceBlockCollections(_0xbd1b28){if(!isNode(_0xbd1b28))return;visit(_0xbd1b28,(_0x580841,_0x1df83b)=>{const _0x5221f5=a101_0x5461;isCollection(_0x1df83b)&&(_0x1df83b[_0x5221f5(0x108)]=![]);});}function a101_0x5461(_0x35a1ef,_0x36cd76){_0x35a1ef=_0x35a1ef-0xdd;const _0xa4ea22=a101_0xa4ea();let _0x546155=_0xa4ea22[_0x35a1ef];return _0x546155;}function ensurePulledFilesCanBeOverwritten(_0x2bfde8,_0x473b48,_0x1caf12,_0x4e0ec8){const _0x51b015=a101_0x5461;if(_0x4e0ec8||!existsSync(_0x473b48))return;const _0x31e361=readMetadataIfPresent(_0x473b48);if(!_0x31e361)return;const _0x9e78af=_0x31e361[_0x51b015(0xe0)]&&Object[_0x51b015(0x103)](_0x31e361[_0x51b015(0xe0)])['length']>0x0?_0x31e361[_0x51b015(0xe0)]:undefined;if(_0x9e78af)for(const [_0x2db06b,_0x1126b3]of Object[_0x51b015(0xe4)](_0x9e78af)){const _0x28d7e2=resolveManagedFilePath(_0x2bfde8,_0x2db06b);if(!existsSync(_0x28d7e2))throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8,_0x51b015(0x10b)+_0x2db06b);const _0x27624f=lstatSync(_0x28d7e2);if(!_0x27624f[_0x51b015(0xeb)]())throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8,_0x51b015(0xde)+_0x2db06b);const _0x4a281c=bufferSha256(readFileSync(_0x28d7e2));if(_0x4a281c!==_0x1126b3)throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8+_0x51b015(0xed)+_0x2db06b,_0x51b015(0x109)+_0x2db06b);}else{const _0x123832=resolve(_0x2bfde8,SKILL_FILE);if(existsSync(_0x123832)&&_0x31e361[_0x51b015(0xe9)]){const _0x3d648b=contentHash(readFileSync(_0x123832,_0x51b015(0xe2)));if(_0x3d648b!==_0x31e361[_0x51b015(0xe9)])throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x10e)+_0x123832,_0x51b015(0xe1));}}for(const _0x3cdc77 of normalizeLocalFiles(_0x1caf12)){if(_0x9e78af?.[_0x3cdc77[_0x51b015(0x102)]])continue;if(!_0x9e78af&&_0x3cdc77['path']===SKILL_FILE)continue;const _0x52c5e3=resolveManagedFilePath(_0x2bfde8,_0x3cdc77['path']);if(!existsSync(_0x52c5e3))continue;const _0x5dc0a0=lstatSync(_0x52c5e3);if(!_0x5dc0a0[_0x51b015(0xeb)]())throw CliErrors[_0x51b015(0xf6)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2bfde8,_0x51b015(0xf4)+_0x3cdc77[_0x51b015(0x102)]);const _0x5f00d7=bufferSha256(readFileSync(_0x52c5e3));if(_0x5f00d7!==fileHash(_0x3cdc77))throw CliErrors['validation'](_0x51b015(0x106)+_0x2bfde8,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3cdc77[_0x51b015(0x102)]);}}function materializeFiles(_0x48b7f5,_0x3ba0e3){for(const _0x15504f of normalizeLocalFiles(_0x3ba0e3)){const _0x2d823e=resolveManagedFilePath(_0x48b7f5,_0x15504f['path']);mkdirSync(dirname(_0x2d823e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2d823e,fileContent(_0x15504f),0x180);}}function removeStaleManagedFiles(_0x39bef4,_0x426944,_0x4422f6){const _0x2925b1=a101_0x5461;if(!_0x426944)return;const _0x108064=new Set(normalizeLocalFiles(_0x4422f6)[_0x2925b1(0x110)](_0x2b44c9=>_0x2b44c9['path']));for(const _0x3056c5 of Object['keys'](_0x426944)){if(_0x108064['has'](_0x3056c5))continue;const _0x275c68=resolveManagedFilePath(_0x39bef4,_0x3056c5);existsSync(_0x275c68)&&lstatSync(_0x275c68)[_0x2925b1(0xeb)]()&&rmSync(_0x275c68,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x164432,_0x549f62){const _0x1b4709=a102_0x213f,_0x1c7120=_0x164432();while(!![]){try{const _0x1198f8=parseInt(_0x1b4709(0xca))/0x1+parseInt(_0x1b4709(0xd8))/0x2+-parseInt(_0x1b4709(0xdc))/0x3*(parseInt(_0x1b4709(0xdb))/0x4)+parseInt(_0x1b4709(0xc7))/0x5*(-parseInt(_0x1b4709(0xe1))/0x6)+parseInt(_0x1b4709(0xd3))/0x7*(parseInt(_0x1b4709(0xc8))/0x8)+parseInt(_0x1b4709(0xe6))/0x9*(-parseInt(_0x1b4709(0xcc))/0xa)+parseInt(_0x1b4709(0xd1))/0xb;if(_0x1198f8===_0x549f62)break;else _0x1c7120['push'](_0x1c7120['shift']());}catch(_0x40b75a){_0x1c7120['push'](_0x1c7120['shift']());}}}(a102_0x1d69,0x87141));function a102_0x213f(_0x20f521,_0x3de763){_0x20f521=_0x20f521-0xc1;const _0x1d693e=a102_0x1d69();let _0x213f09=_0x1d693e[_0x20f521];return _0x213f09;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a102_0x1d69(){const _0x3cebd4=['tenantCode','readonly','88746UyLGiR','status','zipSize','ossPath','forkedFromVersion','8283663PoSFGh','files','object','isArray','Invalid\x20','hasUpstreamUpdate','personal','tags','skillCode','105NGVPlS','24648vPLxmH','userId','198546PtvdCs','zipSha256','10TgkZck','toISOString','trim','description','validation','20246941TCrpps','utf8','735Rjtclo','map','version','skillName','forkedFromSkillId','891280AuHwtN','string','length','195052NsdzsP','63dqUzMt','parse','manifest'];a102_0x1d69=function(){return _0x3cebd4;};return a102_0x1d69();}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4dffe2,_0x3d5b7a,_0x5aedc6,_0x540b34,_0x2a2a88,_0x19cf9a,_0x2f0688){const _0xf1f019=a102_0x213f,_0x5c42dd=_0x19cf9a?normalizeLocalFiles(_0x19cf9a):[],_0x1ee12a=!_0x2f0688&&_0x5c42dd[_0xf1f019(0xda)]>0x0?buildSkillPackage(_0x5c42dd):undefined,_0x1e0866=_0x2f0688?bufferSha256(_0x2f0688):_0x1ee12a?.[_0xf1f019(0xde)][_0xf1f019(0xcb)],_0x145998=_0x2f0688?.[_0xf1f019(0xda)]??_0x1ee12a?.[_0xf1f019(0xde)][_0xf1f019(0xe3)],_0x68f1ba=_0x5c42dd['length']>0x0?Object['fromEntries'](_0x5c42dd[_0xf1f019(0xd4)](_0x117717=>[_0x117717['path'],fileHash(_0x117717)])):undefined;return{'schemaVersion':_0x5c42dd[_0xf1f019(0xda)]>0x0?0x2:0x1,'id':_0x4dffe2['id'],'appCode':_0x5aedc6,'skillCode':requireSkillCode(_0x4dffe2),'skillName':_0x4dffe2[_0xf1f019(0xd6)],'description':_0x4dffe2[_0xf1f019(0xcf)],'scope':_0x3d5b7a,'readonly':_0x3d5b7a!==_0xf1f019(0xc4)||_0x4dffe2[_0xf1f019(0xe0)]===!![],'tenantCode':_0x4dffe2[_0xf1f019(0xdf)],'userId':_0x4dffe2[_0xf1f019(0xc9)],'version':_0x4dffe2[_0xf1f019(0xd5)],'status':_0x4dffe2[_0xf1f019(0xe2)],'tags':Array[_0xf1f019(0xc1)](_0x4dffe2[_0xf1f019(0xc5)])?_0x4dffe2[_0xf1f019(0xc5)]:[],'hasUpstreamUpdate':_0x4dffe2[_0xf1f019(0xc3)],'forkedFromSkillId':_0x4dffe2[_0xf1f019(0xd7)],'forkedFromVersion':_0x4dffe2[_0xf1f019(0xe5)],'sourceSessionId':_0x4dffe2['sourceSessionId'],'contentHash':_0x540b34,'fileHashes':_0x68f1ba,'treeHash':_0x5c42dd[_0xf1f019(0xda)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5c42dd)):undefined,'ossPath':remoteManifestOssPath(_0x4dffe2[_0xf1f019(0xe7)]),'zipSha256':_0x1e0866,'zipSize':_0x145998,'files':_0x5c42dd[_0xf1f019(0xda)]>0x0?_0x5c42dd[_0xf1f019(0xd4)](_0x58eb87=>({'path':_0x58eb87['path'],'hash':fileHash(_0x58eb87),'size':fileContent(_0x58eb87)[_0xf1f019(0xda)]})):undefined,'pulledAt':_0x2a2a88??new Date()[_0xf1f019(0xcd)]()};}export function requireSkillCode(_0x304ccf){const _0x42edee=a102_0x213f,_0x2b7a15=_0x304ccf[_0x42edee(0xc6)]?.['trim']();if(!_0x2b7a15)throw CliErrors[_0x42edee(0xd0)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x2b7a15;}export function readMetadataIfPresent(_0x4035ff){const _0x25afbd=a102_0x213f;if(!existsSync(_0x4035ff))return undefined;try{const _0x26c404=JSON[_0x25afbd(0xdd)](readFileSync(_0x4035ff,_0x25afbd(0xd2)));return _0x26c404;}catch{throw CliErrors[_0x25afbd(0xd0)](_0x25afbd(0xc2)+METADATA_FILE+':\x20'+_0x4035ff);}}function remoteManifestOssPath(_0x33f21d){const _0x46920e=a102_0x213f;if(!_0x33f21d||typeof _0x33f21d!==_0x46920e(0xe8)||Array[_0x46920e(0xc1)](_0x33f21d))return undefined;const _0x1d3574=_0x33f21d[_0x46920e(0xe4)];return typeof _0x1d3574===_0x46920e(0xd9)&&_0x1d3574[_0x46920e(0xce)]()?_0x1d3574['trim']():undefined;}
1
+ (function(_0x5f2e67,_0x3d5188){const _0x17c9fa=a102_0x5a59,_0x3c3a50=_0x5f2e67();while(!![]){try{const _0x357a43=parseInt(_0x17c9fa(0xb2))/0x1*(-parseInt(_0x17c9fa(0xce))/0x2)+-parseInt(_0x17c9fa(0xcd))/0x3*(parseInt(_0x17c9fa(0xc4))/0x4)+parseInt(_0x17c9fa(0xd1))/0x5*(parseInt(_0x17c9fa(0xd7))/0x6)+parseInt(_0x17c9fa(0xc6))/0x7+parseInt(_0x17c9fa(0xbb))/0x8*(-parseInt(_0x17c9fa(0xc0))/0x9)+-parseInt(_0x17c9fa(0xd6))/0xa*(parseInt(_0x17c9fa(0xbe))/0xb)+-parseInt(_0x17c9fa(0xb3))/0xc*(-parseInt(_0x17c9fa(0xbf))/0xd);if(_0x357a43===_0x3d5188)break;else _0x3c3a50['push'](_0x3c3a50['shift']());}catch(_0x1c6ad9){_0x3c3a50['push'](_0x3c3a50['shift']());}}}(a102_0x1b46,0xb2a76));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x21e725,_0x480828,_0xa2bd5f,_0x150cbf,_0x301fd9,_0x4d9095,_0xc1e662){const _0x200088=a102_0x5a59,_0x311fef=_0x4d9095?normalizeLocalFiles(_0x4d9095):[],_0x94106d=!_0xc1e662&&_0x311fef[_0x200088(0xaf)]>0x0?buildSkillPackage(_0x311fef):undefined,_0x54093d=_0xc1e662?bufferSha256(_0xc1e662):_0x94106d?.['manifest'][_0x200088(0xc3)],_0x49d8ad=_0xc1e662?.[_0x200088(0xaf)]??_0x94106d?.[_0x200088(0xae)][_0x200088(0xb8)],_0x2a2c2b=_0x311fef['length']>0x0?Object[_0x200088(0xb1)](_0x311fef['map'](_0x4c9706=>[_0x4c9706[_0x200088(0xc2)],fileHash(_0x4c9706)])):undefined;return{'schemaVersion':_0x311fef[_0x200088(0xaf)]>0x0?0x2:0x1,'id':_0x21e725['id'],'appCode':_0xa2bd5f,'skillCode':requireSkillCode(_0x21e725),'skillName':_0x21e725[_0x200088(0xb0)],'description':_0x21e725[_0x200088(0xd5)],'scope':_0x480828,'readonly':_0x480828!==_0x200088(0xc1)||_0x21e725[_0x200088(0xc9)]===!![],'tenantCode':_0x21e725[_0x200088(0xac)],'userId':_0x21e725[_0x200088(0xad)],'version':_0x21e725[_0x200088(0xb4)],'status':_0x21e725[_0x200088(0xcc)],'tags':Array[_0x200088(0xd3)](_0x21e725[_0x200088(0xbc)])?_0x21e725['tags']:[],'hasUpstreamUpdate':_0x21e725[_0x200088(0xb9)],'forkedFromSkillId':_0x21e725['forkedFromSkillId'],'forkedFromVersion':_0x21e725[_0x200088(0xd2)],'sourceSessionId':_0x21e725[_0x200088(0xcf)],'contentHash':_0x150cbf,'fileHashes':_0x2a2c2b,'treeHash':_0x311fef[_0x200088(0xaf)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x311fef)):undefined,'ossPath':remoteManifestOssPath(_0x21e725[_0x200088(0xb7)]),'zipSha256':_0x54093d,'zipSize':_0x49d8ad,'files':_0x311fef[_0x200088(0xaf)]>0x0?_0x311fef[_0x200088(0xb6)](_0x34cd2e=>({'path':_0x34cd2e['path'],'hash':fileHash(_0x34cd2e),'size':fileContent(_0x34cd2e)[_0x200088(0xaf)]})):undefined,'pulledAt':_0x301fd9??new Date()[_0x200088(0xbd)]()};}export function requireSkillCode(_0x18c96c){const _0x434cec=a102_0x5a59,_0x2e9478=_0x18c96c[_0x434cec(0xca)]?.[_0x434cec(0xc5)]();if(!_0x2e9478)throw CliErrors[_0x434cec(0xc8)](_0x434cec(0xc7));return _0x2e9478;}function a102_0x5a59(_0x1d6463,_0x2d5fb1){_0x1d6463=_0x1d6463-0xac;const _0x1b46eb=a102_0x1b46();let _0x5a596d=_0x1b46eb[_0x1d6463];return _0x5a596d;}function a102_0x1b46(){const _0x5c5514=['821691TWyIFV','4102155hIpGMl','personal','path','zipSha256','58100ZmVUPu','trim','616490nCkFfX','Runtime\x20Skill\x20is\x20missing\x20skillCode.','validation','readonly','skillCode','utf8','status','21huUIWZ','862uurWRT','sourceSessionId','parse','235XfJhlH','forkedFromVersion','isArray','string','description','10iziaSI','9354lPCSfh','tenantCode','userId','manifest','length','skillName','fromEntries','2717rigwte','708kicdCZ','version','ossPath','map','files','zipSize','hasUpstreamUpdate','Invalid\x20','8YzoJWQ','tags','toISOString','15733223kHWIGe'];a102_0x1b46=function(){return _0x5c5514;};return a102_0x1b46();}export function readMetadataIfPresent(_0x3494e8){const _0x521fe3=a102_0x5a59;if(!existsSync(_0x3494e8))return undefined;try{const _0x1d3493=JSON[_0x521fe3(0xd0)](readFileSync(_0x3494e8,_0x521fe3(0xcb)));return _0x1d3493;}catch{throw CliErrors[_0x521fe3(0xc8)](_0x521fe3(0xba)+METADATA_FILE+':\x20'+_0x3494e8);}}function remoteManifestOssPath(_0x8ed8e5){const _0x2c67e9=a102_0x5a59;if(!_0x8ed8e5||typeof _0x8ed8e5!=='object'||Array[_0x2c67e9(0xd3)](_0x8ed8e5))return undefined;const _0x28aeeb=_0x8ed8e5[_0x2c67e9(0xb5)];return typeof _0x28aeeb===_0x2c67e9(0xd4)&&_0x28aeeb[_0x2c67e9(0xc5)]()?_0x28aeeb[_0x2c67e9(0xc5)]():undefined;}