@lovrabet/lovrabet-cli 2.1.3 → 2.1.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/artifact/index.js +1 -1
  10. package/lib/commands/auth/index.js +1 -1
  11. package/lib/commands/auth/prompt.js +1 -1
  12. package/lib/commands/bff/detail.js +1 -1
  13. package/lib/commands/bff/exec.js +1 -1
  14. package/lib/commands/bff/index.js +1 -1
  15. package/lib/commands/cli-skill/index.js +1 -1
  16. package/lib/commands/common/config-policy.js +1 -1
  17. package/lib/commands/common/constraints.js +1 -1
  18. package/lib/commands/common/flags.js +1 -1
  19. package/lib/commands/config/definitions.js +1 -1
  20. package/lib/commands/config/shared.js +1 -1
  21. package/lib/commands/data/index.js +1 -1
  22. package/lib/commands/dataset/detail.js +1 -1
  23. package/lib/commands/dataset/index.js +1 -1
  24. package/lib/commands/dataset/list.js +1 -1
  25. package/lib/commands/dataset/sdk-doc.js +1 -1
  26. package/lib/commands/doctor.js +1 -1
  27. package/lib/commands/init.js +1 -1
  28. package/lib/commands/kb/index.js +1 -1
  29. package/lib/commands/logs/index.js +1 -1
  30. package/lib/commands/personal-bff/index.js +1 -1
  31. package/lib/commands/registry.js +1 -1
  32. package/lib/commands/schema.js +1 -1
  33. package/lib/commands/service/dynamic.js +1 -1
  34. package/lib/commands/service/index.js +1 -1
  35. package/lib/commands/service/registry.js +1 -1
  36. package/lib/commands/skill/commands/create.js +1 -1
  37. package/lib/commands/skill/commands/install.js +1 -1
  38. package/lib/commands/skill/commands/list.js +1 -1
  39. package/lib/commands/skill/commands/push.js +1 -1
  40. package/lib/commands/skill/commands/validate.js +1 -1
  41. package/lib/commands/skill/flags.js +1 -1
  42. package/lib/commands/skill/index.js +1 -1
  43. package/lib/commands/skill/manifest-helpers.js +1 -1
  44. package/lib/commands/skill/scopes.js +1 -1
  45. package/lib/commands/skill/summary.js +1 -1
  46. package/lib/commands/skill/templates.js +1 -1
  47. package/lib/commands/skill/validate.js +1 -1
  48. package/lib/commands/sql/detail.js +1 -1
  49. package/lib/commands/sql/exec.js +1 -1
  50. package/lib/commands/sql/index.js +1 -1
  51. package/lib/commands/update.js +1 -1
  52. package/lib/commands/workspace/index.js +1 -1
  53. package/lib/config/schema.js +1 -1
  54. package/lib/constant/app.js +1 -1
  55. package/lib/constant/auth-mode.js +1 -1
  56. package/lib/constant/cli.js +1 -1
  57. package/lib/constant/defaults.js +1 -1
  58. package/lib/constant/distribution.js +1 -1
  59. package/lib/constant/domain.js +1 -1
  60. package/lib/constant/env.js +1 -1
  61. package/lib/constant/output.js +1 -1
  62. package/lib/constant/product.js +1 -1
  63. package/lib/constant/risk.js +1 -1
  64. package/lib/constant/url.js +1 -1
  65. package/lib/context.js +1 -1
  66. package/lib/core/api-client.js +1 -1
  67. package/lib/core/db-resolver.js +1 -1
  68. package/lib/core/sdk-client.js +1 -1
  69. package/lib/errors.js +1 -1
  70. package/lib/framework/build-all-flags.js +1 -1
  71. package/lib/framework/dryrun.js +1 -1
  72. package/lib/framework/flags.js +1 -1
  73. package/lib/framework/help.js +1 -1
  74. package/lib/framework/index.js +1 -1
  75. package/lib/framework/output.js +1 -1
  76. package/lib/framework/preparse.js +1 -1
  77. package/lib/framework/response.js +1 -1
  78. package/lib/framework/runner-confirmation.js +1 -1
  79. package/lib/framework/runner-error.js +1 -1
  80. package/lib/framework/runner.js +1 -1
  81. package/lib/framework/schema-export.js +1 -1
  82. package/lib/framework/types.js +1 -1
  83. package/lib/generated/build-info.js +1 -1
  84. package/lib/help.js +1 -1
  85. package/lib/skills/npx-skills-add.js +1 -1
  86. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  87. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  88. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  89. package/lib/skills/runtime-skill-sync/links.js +1 -1
  90. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  91. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  92. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  93. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  94. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  95. package/lib/skills/runtime-skill-sync/push.js +1 -1
  96. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  97. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  98. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  99. package/lib/skills/runtime-skill-sync.js +1 -1
  100. package/lib/utils/apply-jq-filter.js +1 -1
  101. package/lib/utils/logger.js +1 -1
  102. package/lib/utils/params.js +1 -1
  103. package/lib/utils/platform.js +1 -1
  104. package/lib/utils/update-notice.js +1 -1
  105. package/lib/utils/version.js +1 -1
  106. package/lib/utils/write-cli-side-channel.js +1 -1
  107. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x12f00f,_0x366e93){const _0x13654a=a77_0x1647,_0xad36ff=_0x12f00f();while(!![]){try{const _0x2827d7=parseInt(_0x13654a(0x145))/0x1+-parseInt(_0x13654a(0x13c))/0x2*(parseInt(_0x13654a(0x14a))/0x3)+-parseInt(_0x13654a(0x143))/0x4+parseInt(_0x13654a(0x130))/0x5+parseInt(_0x13654a(0x13a))/0x6*(parseInt(_0x13654a(0x148))/0x7)+parseInt(_0x13654a(0x13d))/0x8*(parseInt(_0x13654a(0x141))/0x9)+-parseInt(_0x13654a(0x12e))/0xa;if(_0x2827d7===_0x366e93)break;else _0xad36ff['push'](_0xad36ff['shift']());}catch(_0x2810f3){_0xad36ff['push'](_0xad36ff['shift']());}}}(a77_0x66b7,0x9d11a));function a77_0x1647(_0x579586,_0x6f709e){_0x579586=_0x579586-0x12e;const _0x66b78e=a77_0x66b7();let _0x164715=_0x66b78e[_0x579586];return _0x164715;}import{CLI_BIN_NAME}from'../constant/cli.js';function a77_0x66b7(){const _0x27c82c=['description','service','9vaWCzX','id=','4311028FdiSSE','name','793445ebThPo','\x20\x20\x20Continue?\x20[y/N]\x20','command','91kPcBYJ','params','818589eTAqlV','4128970mWCnYC','join','3735750ESgNaE','affectedRecords','params=','code','push','--yes','commandLabel','code=','name=','\x20\x20\x20Affected:\x20','431202yEULKq','⚠\x20\x20High-risk\x20operation:\x20','6oMgXZF','3821848iTNgjx','stringify'];a77_0x66b7=function(){return _0x27c82c;};return a77_0x66b7();}export function buildConfirmationLines(_0x3df83f,_0x59ffdc,_0x40ddbb){const _0x58d919=a77_0x1647,_0x139cac=buildConfirmationContext(_0x3df83f,_0x59ffdc,_0x40ddbb),_0x137187=[_0x58d919(0x13b)+_0x139cac[_0x58d919(0x136)]];return _0x139cac[_0x58d919(0x13f)]&&_0x137187['push']('\x20\x20\x20'+_0x139cac[_0x58d919(0x13f)]),_0x139cac[_0x58d919(0x131)]&&_0x137187[_0x58d919(0x134)](_0x58d919(0x139)+_0x139cac[_0x58d919(0x131)]),_0x137187[_0x58d919(0x134)](_0x58d919(0x146)),_0x137187;}export function reconstructCommandArgv(_0x3d2b00,_0x1daa22){const _0x17ab6e=a77_0x1647,_0x582105=[CLI_BIN_NAME,_0x3d2b00[_0x17ab6e(0x140)],_0x3d2b00[_0x17ab6e(0x147)]];for(const [_0x5e3378,_0x8f6292]of Object['entries'](_0x1daa22)){if(_0x8f6292===!![])_0x582105[_0x17ab6e(0x134)]('--'+_0x5e3378);else _0x8f6292!==![]&&_0x8f6292!==undefined&&_0x8f6292!==''&&_0x582105[_0x17ab6e(0x134)]('--'+_0x5e3378+'\x20'+JSON[_0x17ab6e(0x13e)](_0x8f6292));}return _0x582105[_0x17ab6e(0x134)](_0x17ab6e(0x135)),_0x582105[_0x17ab6e(0x12f)]('\x20');}function buildConfirmationContext(_0x2b3613,_0x26d8a4,_0x117924){const _0x15e1e2=extractAffectedRecords(_0x117924);return{'commandLabel':_0x26d8a4,'description':_0x2b3613['description'],'affectedRecords':_0x15e1e2};}function extractAffectedRecords(_0x11aacb){const _0x4306d9=a77_0x1647,_0x25f807=[];if(_0x11aacb[_0x4306d9(0x133)])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x137)+_0x11aacb[_0x4306d9(0x133)]);if(_0x11aacb['id'])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x142)+_0x11aacb['id']);if(_0x11aacb['name'])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x138)+_0x11aacb[_0x4306d9(0x144)]);if(_0x11aacb[_0x4306d9(0x149)])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x132)+_0x11aacb[_0x4306d9(0x149)]);return _0x25f807['length']>0x0?_0x25f807[_0x4306d9(0x12f)](',\x20'):undefined;}
1
+ (function(_0x53aae0,_0x31d2cf){const _0x4fa54f=a77_0x2979,_0x37d11c=_0x53aae0();while(!![]){try{const _0x35d0cf=-parseInt(_0x4fa54f(0x150))/0x1+parseInt(_0x4fa54f(0x14c))/0x2*(parseInt(_0x4fa54f(0x159))/0x3)+-parseInt(_0x4fa54f(0x149))/0x4+parseInt(_0x4fa54f(0x147))/0x5*(parseInt(_0x4fa54f(0x14e))/0x6)+parseInt(_0x4fa54f(0x15c))/0x7*(parseInt(_0x4fa54f(0x15d))/0x8)+-parseInt(_0x4fa54f(0x148))/0x9+parseInt(_0x4fa54f(0x15a))/0xa*(parseInt(_0x4fa54f(0x151))/0xb);if(_0x35d0cf===_0x31d2cf)break;else _0x37d11c['push'](_0x37d11c['shift']());}catch(_0x27368c){_0x37d11c['push'](_0x37d11c['shift']());}}}(a77_0x2ea7,0x835ee));function a77_0x2ea7(){const _0x79503a=['9631539hhDTLi','1842548aWfAXZ','id=','\x20\x20\x20Affected:\x20','6WjBRrP','code','24YwvYaD','join','915171vtPTQe','1342pahMrk','\x20\x20\x20','commandLabel','params','service','stringify','name','push','155691xrLfna','136020pnfSkb','length','182ltIilN','165656cAzFHI','description','\x20\x20\x20Continue?\x20[y/N]\x20','command','params=','--yes','code=','entries','name=','788195HrxoZv'];a77_0x2ea7=function(){return _0x79503a;};return a77_0x2ea7();}import{CLI_BIN_NAME}from'../constant/cli.js';function a77_0x2979(_0x5f5495,_0x436ad0){_0x5f5495=_0x5f5495-0x142;const _0x2ea788=a77_0x2ea7();let _0x2979f2=_0x2ea788[_0x5f5495];return _0x2979f2;}export function buildConfirmationLines(_0x170651,_0x208323,_0x730a3a){const _0x2aacb8=a77_0x2979,_0x52ffd3=buildConfirmationContext(_0x170651,_0x208323,_0x730a3a),_0xc9c785=['⚠\x20\x20High-risk\x20operation:\x20'+_0x52ffd3[_0x2aacb8(0x153)]];return _0x52ffd3['description']&&_0xc9c785[_0x2aacb8(0x158)](_0x2aacb8(0x152)+_0x52ffd3[_0x2aacb8(0x15e)]),_0x52ffd3['affectedRecords']&&_0xc9c785[_0x2aacb8(0x158)](_0x2aacb8(0x14b)+_0x52ffd3['affectedRecords']),_0xc9c785[_0x2aacb8(0x158)](_0x2aacb8(0x15f)),_0xc9c785;}export function reconstructCommandArgv(_0x3cc6ab,_0x3d739e){const _0x541dc1=a77_0x2979,_0x5d50f3=[CLI_BIN_NAME,_0x3cc6ab[_0x541dc1(0x155)],_0x3cc6ab[_0x541dc1(0x160)]];for(const [_0x20f9dd,_0x16c8fd]of Object[_0x541dc1(0x145)](_0x3d739e)){if(_0x16c8fd===!![])_0x5d50f3[_0x541dc1(0x158)]('--'+_0x20f9dd);else _0x16c8fd!==![]&&_0x16c8fd!==undefined&&_0x16c8fd!==''&&_0x5d50f3[_0x541dc1(0x158)]('--'+_0x20f9dd+'\x20'+JSON[_0x541dc1(0x156)](_0x16c8fd));}return _0x5d50f3[_0x541dc1(0x158)](_0x541dc1(0x143)),_0x5d50f3[_0x541dc1(0x14f)]('\x20');}function buildConfirmationContext(_0x6ed96e,_0x49b3cb,_0x2c6b69){const _0x2361cb=extractAffectedRecords(_0x2c6b69);return{'commandLabel':_0x49b3cb,'description':_0x6ed96e['description'],'affectedRecords':_0x2361cb};}function extractAffectedRecords(_0x5138ea){const _0xa0b822=a77_0x2979,_0x1fda61=[];if(_0x5138ea[_0xa0b822(0x14d)])_0x1fda61[_0xa0b822(0x158)](_0xa0b822(0x144)+_0x5138ea[_0xa0b822(0x14d)]);if(_0x5138ea['id'])_0x1fda61['push'](_0xa0b822(0x14a)+_0x5138ea['id']);if(_0x5138ea[_0xa0b822(0x157)])_0x1fda61[_0xa0b822(0x158)](_0xa0b822(0x146)+_0x5138ea[_0xa0b822(0x157)]);if(_0x5138ea['params'])_0x1fda61['push'](_0xa0b822(0x142)+_0x5138ea[_0xa0b822(0x154)]);return _0x1fda61[_0xa0b822(0x15b)]>0x0?_0x1fda61[_0xa0b822(0x14f)](',\x20'):undefined;}
@@ -1 +1 @@
1
- function a78_0x4229(){const _0x26e1aa=['stringify','validation','7HcGfex','1311048BsxQUZ','932kGuyqz','trim','826398gGHqLw','324492YcLyeN','string','10495DtPNVS','2AYqsMX','21014240YdGmqH','4158064lvLLaW','message','1087323MCOAbS'];a78_0x4229=function(){return _0x26e1aa;};return a78_0x4229();}(function(_0x2a2812,_0x5e36a8){const _0x21e1d5=a78_0x226a,_0x4387f1=_0x2a2812();while(!![]){try{const _0x51edf4=-parseInt(_0x21e1d5(0x117))/0x1+parseInt(_0x21e1d5(0x113))/0x2*(-parseInt(_0x21e1d5(0x10c))/0x3)+parseInt(_0x21e1d5(0x10d))/0x4*(parseInt(_0x21e1d5(0x112))/0x5)+parseInt(_0x21e1d5(0x110))/0x6+parseInt(_0x21e1d5(0x11a))/0x7*(-parseInt(_0x21e1d5(0x115))/0x8)+parseInt(_0x21e1d5(0x10f))/0x9+parseInt(_0x21e1d5(0x114))/0xa;if(_0x51edf4===_0x5e36a8)break;else _0x4387f1['push'](_0x4387f1['shift']());}catch(_0x371d71){_0x4387f1['push'](_0x4387f1['shift']());}}}(a78_0x4229,0xa904a));import{LovrabetError}from'@lovrabet/sdk';function a78_0x226a(_0x8dc00f,_0x2e9d75){_0x8dc00f=_0x8dc00f-0x10c;const _0x422925=a78_0x4229();let _0x226adf=_0x422925[_0x8dc00f];return _0x226adf;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x2b0867){const _0x10ef8f=a78_0x226a;if(_0x2b0867 instanceof LovrabetError)return CliErrors[_0x10ef8f(0x119)](userFacingLovrabetMessage(_0x2b0867));return _0x2b0867;}function userFacingLovrabetMessage(_0x57f17a){const _0xdf29a0=a78_0x226a,_0x35abb2=_0x57f17a['description'];if(_0x35abb2!==undefined&&_0x35abb2!==null){if(typeof _0x35abb2===_0xdf29a0(0x111)&&_0x35abb2[_0xdf29a0(0x10e)]())return _0x35abb2[_0xdf29a0(0x10e)]();try{return JSON[_0xdf29a0(0x118)](_0x35abb2);}catch{}}return _0x57f17a[_0xdf29a0(0x116)];}
1
+ (function(_0x276e8d,_0x328e6f){const _0x312ec6=a78_0x2eb9,_0x23319b=_0x276e8d();while(!![]){try{const _0x53a8e4=-parseInt(_0x312ec6(0x1c9))/0x1+parseInt(_0x312ec6(0x1d0))/0x2*(parseInt(_0x312ec6(0x1ca))/0x3)+-parseInt(_0x312ec6(0x1cb))/0x4+parseInt(_0x312ec6(0x1c7))/0x5*(-parseInt(_0x312ec6(0x1c6))/0x6)+-parseInt(_0x312ec6(0x1d3))/0x7+parseInt(_0x312ec6(0x1cd))/0x8+parseInt(_0x312ec6(0x1cf))/0x9;if(_0x53a8e4===_0x328e6f)break;else _0x23319b['push'](_0x23319b['shift']());}catch(_0x10671f){_0x23319b['push'](_0x23319b['shift']());}}}(a78_0x1b3c,0x4681e));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x512b0f){const _0x21ab5b=a78_0x2eb9;if(_0x512b0f instanceof LovrabetError)return CliErrors[_0x21ab5b(0x1ce)](userFacingLovrabetMessage(_0x512b0f));return _0x512b0f;}function a78_0x2eb9(_0x2179cc,_0x1fead1){_0x2179cc=_0x2179cc-0x1c6;const _0x1b3c16=a78_0x1b3c();let _0x2eb9d0=_0x1b3c16[_0x2179cc];return _0x2eb9d0;}function userFacingLovrabetMessage(_0x4ea734){const _0x1557ab=a78_0x2eb9,_0x2ffe02=_0x4ea734[_0x1557ab(0x1cc)];if(_0x2ffe02!==undefined&&_0x2ffe02!==null){if(typeof _0x2ffe02===_0x1557ab(0x1d2)&&_0x2ffe02[_0x1557ab(0x1c8)]())return _0x2ffe02[_0x1557ab(0x1c8)]();try{return JSON[_0x1557ab(0x1d4)](_0x2ffe02);}catch{}}return _0x4ea734[_0x1557ab(0x1d1)];}function a78_0x1b3c(){const _0x37e940=['42FoLXsp','25455uVgILN','trim','48623CcSXBg','170349BwCxbh','880044WRyYUd','description','399312oXBzRf','validation','5995026ElETXv','8xWzkwB','message','string','2450637uHUFgN','stringify'];a78_0x1b3c=function(){return _0x37e940;};return a78_0x1b3c();}
@@ -1 +1 @@
1
- const a79_0x16ac80=a79_0x1bfb;function a79_0x1bfb(_0x2cbd3d,_0x83489f){_0x2cbd3d=_0x2cbd3d-0x1dd;const _0x269f9c=a79_0x269f();let _0x1bfbbb=_0x269f9c[_0x2cbd3d];return _0x1bfbbb;}function a79_0x269f(){const _0x3e9850=['resolve','../commands/app/remote-source.js','map','newConfigFileName','service','243890PyaiXL','nonInteractive','appcode\x20\x22','trim','requiresAppCode','954420ImIVYl','local-alias','Set\x20accessKey\x20in\x20','568VxBoeU','filter','name','env','../core/sdk-client.js','defaultVerbose','accessKey','verbose','rawFlags','228549QPXvuc','isNonInteractive','update','18hQHFIj','ClientAk','authRequired','Unknown\x20app:\x20','currentApp','catch','string','pretty','defaultPageSize','80985xrbpaO','doctor','object','apiDomain','appCodeSource','has','_notice','cancelled','configMissing','appcode','execute','error','items','3349820MFlZRo','374910ZsLjIe','appCode','../core/api-client.js','production','includes','command','\x20or\x20pass\x20','6OYzUQw','schema','defaultApp','22687HUNolO','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','validation','app','mergedCli'];a79_0x269f=function(){return _0x3e9850;};return a79_0x269f();}(function(_0x3b224f,_0x7e4aef){const _0x1698b7=a79_0x1bfb,_0x1fc42e=_0x3b224f();while(!![]){try{const _0x1dbc5a=-parseInt(_0x1698b7(0x1ea))/0x1+parseInt(_0x1698b7(0x204))/0x2+parseInt(_0x1698b7(0x1f6))/0x3+-parseInt(_0x1698b7(0x1de))/0x4+parseInt(_0x1698b7(0x218))/0x5*(-parseInt(_0x1698b7(0x20b))/0x6)+parseInt(_0x1698b7(0x20e))/0x7*(-parseInt(_0x1698b7(0x1e1))/0x8)+-parseInt(_0x1698b7(0x1ed))/0x9*(-parseInt(_0x1698b7(0x203))/0xa);if(_0x1dbc5a===_0x7e4aef)break;else _0x1fc42e['push'](_0x1fc42e['shift']());}catch(_0x14d1e2){_0x1fc42e['push'](_0x1fc42e['shift']());}}}(a79_0x269f,0x21c83));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x3dd522){const _0x48588b=a79_0x1bfb;return void _0x3dd522,AUTH_MODE[_0x48588b(0x1ee)];}export function createPipelineEnv(_0x5c82fe,_0x3a7e95){const _0x3259ac=a79_0x1bfb,_0x56b68e=typeof _0x3a7e95[_0x3259ac(0x211)]===_0x3259ac(0x1f3)&&_0x3a7e95[_0x3259ac(0x211)][_0x3259ac(0x21b)]();return{'rawFlags':_0x3a7e95,'appCode':_0x5c82fe['appCode']||productEnv('APPCODE')||(_0x56b68e?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5c82fe[_0x3259ac(0x1fa)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3a7e95),'defaultFormat':_0x5c82fe['format'],'defaultPageSize':_0x5c82fe['pageSize'],'defaultVerbose':_0x5c82fe[_0x3259ac(0x1e8)],'riskLevel':_0x5c82fe['riskLevel'],'accessKey':_0x5c82fe['accessKey'],'env':_0x5c82fe['env'],'mergedCli':{'defaultApp':_0x5c82fe['defaultApp'],'currentApp':_0x5c82fe[_0x3259ac(0x1f1)],'appCode':_0x5c82fe[_0x3259ac(0x205)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a79_0x16ac80(0x1e2)](_0x3619e6=>PIPELINE_FLAG_NAMES[a79_0x16ac80(0x1fb)](_0x3619e6[a79_0x16ac80(0x1e3)]))[a79_0x16ac80(0x215)](({name:_0x507646,type:_0x5781cf,description:_0x4c49ef})=>({'name':_0x507646,'type':_0x5781cf,'description':_0x4c49ef})),'formatOutput':formatOutput,'getCommandLabel'(_0x4aae5c){const _0xe1596d=a79_0x16ac80;return CLI_BIN_NAME+'\x20'+_0x4aae5c[_0xe1596d(0x217)]+'\x20'+_0x4aae5c[_0xe1596d(0x209)];},'riskPolicy':{'onViolation'(_0x2685bd){const _0x23379d=a79_0x16ac80;console[_0x23379d(0x201)](_0x2685bd);},'createError'(_0x3b2ee7){const _0x36178b=a79_0x16ac80;return CliErrors[_0x36178b(0x1fd)](_0x3b2ee7);}},async 'prepare'(_0x27c80e,_0x533b60){const _0x520590=a79_0x16ac80,_0x59b09f=resolveAuthMode(_0x533b60);if(_0x27c80e['requiresAuth']!==![]){if(!_0x533b60['accessKey'])throw CliErrors[_0x520590(0x1ef)](_0x520590(0x1e0)+PRODUCT_CONFIG[_0x520590(0x216)]+_0x520590(0x20a)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0xd8d3a7}=await import(_0x520590(0x206));_0xd8d3a7(_0x533b60['accessKey']);}let _0x2a59f5='';if(_0x27c80e[_0x520590(0x1dd)]!==![]){_0x2a59f5=_0x533b60[_0x520590(0x205)]??'',_0x2a59f5=await resolveExplicitAppName(_0x27c80e,_0x533b60,_0x2a59f5);if(!_0x2a59f5){await assertSelectedAppNameIsRuntimeAccessible(_0x27c80e,_0x533b60);throw CliErrors[_0x520590(0x1fe)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x27c80e,_0x533b60,_0x2a59f5);}if(_0x2a59f5){const {initSdkClient:_0x355d42}=await import(_0x520590(0x1e5));_0x355d42({'appCode':_0x2a59f5,'env':_0x533b60[_0x520590(0x1e4)]??_0x520590(0x207),'accessKey':_0x533b60[_0x520590(0x1e7)],'authMode':_0x59b09f});}return{'defaults':{'booleans':{'verbose':_0x533b60[_0x520590(0x1e6)]},'numbers':{'pagesize':_0x533b60[_0x520590(0x1f5)]}},'extras':{'appCode':_0x2a59f5,'cookie':'','apiDomain':_0x533b60[_0x520590(0x1f9)],'apiDir':'','accessKey':_0x533b60[_0x520590(0x1e7)],'envName':_0x533b60['env'],'mergedCli':_0x533b60['mergedCli']}};},async 'confirmHighRisk'({def:_0x511798,env:_0x5c0d43,flags:_0x56a16e,commandLabel:_0xd72564}){const _0x5eee3d=a79_0x16ac80;if(_0x5c0d43[_0x5eee3d(0x1eb)]){const _0x5e1c37=reconstructCommandArgv(_0x511798,_0x56a16e);throw CliErrors[_0x5eee3d(0x210)]('High-risk\x20operation\x20`'+_0xd72564+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+('\x20\x20To\x20proceed:\x20'+_0x5e1c37));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x511798,_0xd72564,_0x56a16e),'createCancelledError':_0x1c3d0b=>CliErrors[_0x5eee3d(0x1fd)](_0x1c3d0b)});},'mapDryRunError'(_0x2b56ba){return mapUserFacingExecuteError(_0x2b56ba);},'mapExecuteError'(_0x3ea5d0){return mapUserFacingExecuteError(_0x3ea5d0);},async 'finalize'(){const _0x79cba4=a79_0x16ac80,{clearActiveAK:_0x143ff5}=await import(_0x79cba4(0x206));_0x143ff5();}};async function resolveExplicitAppName(_0x14e54c,_0x51937a,_0x5274af){const _0x5de196=a79_0x16ac80;if(_0x14e54c[_0x5de196(0x1dd)]===![])return _0x5274af;const _0x9134cd=typeof _0x51937a[_0x5de196(0x1e9)][_0x5de196(0x211)]==='string'?_0x51937a[_0x5de196(0x1e9)][_0x5de196(0x211)][_0x5de196(0x21b)]():'';if(!_0x9134cd)return _0x5274af;const _0x1bb64a=typeof _0x51937a[_0x5de196(0x1e9)][_0x5de196(0x1ff)]===_0x5de196(0x1f3)&&_0x51937a[_0x5de196(0x1e9)]['appcode'][_0x5de196(0x21b)]()||productEnv('APPCODE');if(_0x1bb64a||_0x51937a[_0x5de196(0x1fa)]===_0x5de196(0x1df))return _0x5274af;const {getRemoteAppList:_0x3e1811}=await import('../commands/app/remote-source.js'),_0x15c321=await _0x3e1811({'env':_0x51937a[_0x5de196(0x1e4)]??_0x5de196(0x207),'accessKey':_0x51937a[_0x5de196(0x1e7)]}),_0x33458d=findAppByName(_0x15c321[_0x5de196(0x202)],_0x9134cd);if(_0x33458d&&!isRuntimeAccessibleApp(_0x33458d))throw runtimeInaccessibleAppError(_0x33458d,'\x22'+_0x9134cd+'\x22');const _0x1ad8b4=_0x33458d?.[_0x5de196(0x205)]?.[_0x5de196(0x21b)]();if(_0x1ad8b4)return _0x1ad8b4;throw CliErrors[_0x5de196(0x210)](_0x5de196(0x1f0)+_0x9134cd,'Run\x20`'+CLI_BIN_NAME+_0x5de196(0x20f)+_0x9134cd+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x5de196(0x216)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x2b4843,_0x300c11){const _0x11d0ff=a79_0x16ac80;if(_0x2b4843[_0x11d0ff(0x1dd)]===![]||!_0x300c11[_0x11d0ff(0x1e7)])return;const _0x186798=(typeof _0x300c11[_0x11d0ff(0x1e9)][_0x11d0ff(0x211)]==='string'&&_0x300c11[_0x11d0ff(0x1e9)][_0x11d0ff(0x211)][_0x11d0ff(0x21b)]()?_0x300c11[_0x11d0ff(0x1e9)][_0x11d0ff(0x211)]:_0x300c11[_0x11d0ff(0x212)]?.[_0x11d0ff(0x1f1)]??_0x300c11[_0x11d0ff(0x212)]?.[_0x11d0ff(0x20d)])?.['trim']();if(!_0x186798)return;const {getRemoteAppList:_0x32d26b}=await import(_0x11d0ff(0x214)),_0x2fd7ef=await _0x32d26b({'env':_0x300c11[_0x11d0ff(0x1e4)]??_0x11d0ff(0x207),'accessKey':_0x300c11[_0x11d0ff(0x1e7)]}),_0xc82534=findAppByName(_0x2fd7ef[_0x11d0ff(0x202)],_0x186798);if(_0xc82534&&!isRuntimeAccessibleApp(_0xc82534))throw runtimeInaccessibleAppError(_0xc82534,'\x22'+_0x186798+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x3bf45c,_0x2370a7,_0x1c7994){const _0x8a8cf5=a79_0x16ac80;if(_0x3bf45c[_0x8a8cf5(0x1dd)]===![]||!_0x2370a7[_0x8a8cf5(0x1e7)])return;const {getRemoteAppList:_0x24060b}=await import('../commands/app/remote-source.js'),_0x1a1686=await _0x24060b({'env':_0x2370a7[_0x8a8cf5(0x1e4)]??'production','accessKey':_0x2370a7['accessKey']}),_0x492e2d=findAppByCode(_0x1a1686[_0x8a8cf5(0x202)],_0x1c7994);if(_0x492e2d&&!isRuntimeAccessibleApp(_0x492e2d))throw runtimeInaccessibleAppError(_0x492e2d,_0x8a8cf5(0x21a)+_0x1c7994+'\x22');}export async function runCommand(_0x37c7dc,_0x3f63c7){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x37c7dc)?withUpdateNotice(_0x37c7dc):_0x37c7dc,_0x3f63c7,runnerAdapter);}function shouldAttachUpdateNotice(_0x191225){const _0xbf7f59=a79_0x16ac80;return![_0xbf7f59(0x1ec),_0xbf7f59(0x20c),_0xbf7f59(0x1f7)][_0xbf7f59(0x208)](_0x191225[_0xbf7f59(0x217)]);}function withUpdateNotice(_0x20a3d5){return{..._0x20a3d5,async 'execute'(_0x331f47){const _0x43a956=a79_0x1bfb,_0x4116ec=shouldResolveUpdateNotice(_0x331f47)?resolveLatestUpdateNotice()[_0x43a956(0x1f2)](()=>null):Promise[_0x43a956(0x213)](null),_0xec64d3=await _0x20a3d5[_0x43a956(0x200)](_0x331f47);return attachUpdateNotice(_0xec64d3,await _0x4116ec);}};}function shouldResolveUpdateNotice(_0x3260fd){const _0x4720b0=a79_0x16ac80;return _0x3260fd['format']===_0x4720b0(0x1f4)&&!_0x3260fd[_0x4720b0(0x219)];}function attachUpdateNotice(_0x29e7f5,_0x3ba2b){const _0xb816e7=a79_0x16ac80;if(!_0x3ba2b||!_0x29e7f5||typeof _0x29e7f5!=='object')return _0x29e7f5;const _0x5105ef=_0x29e7f5,_0x599c84=typeof _0x5105ef['_notice']===_0xb816e7(0x1f8)&&_0x5105ef[_0xb816e7(0x1fc)]!==null?_0x5105ef[_0xb816e7(0x1fc)]:{};return{..._0x5105ef,'_notice':{..._0x599c84,'update':_0x3ba2b}};}
1
+ const a79_0x1cc94c=a79_0x5bde;(function(_0x42e174,_0x14b304){const _0x16cade=a79_0x5bde,_0x2f94b9=_0x42e174();while(!![]){try{const _0x15b0d6=-parseInt(_0x16cade(0x110))/0x1*(parseInt(_0x16cade(0x114))/0x2)+-parseInt(_0x16cade(0x11b))/0x3*(-parseInt(_0x16cade(0xfe))/0x4)+-parseInt(_0x16cade(0x11a))/0x5+parseInt(_0x16cade(0x109))/0x6+-parseInt(_0x16cade(0x124))/0x7+parseInt(_0x16cade(0xec))/0x8*(-parseInt(_0x16cade(0x121))/0x9)+parseInt(_0x16cade(0x126))/0xa;if(_0x15b0d6===_0x14b304)break;else _0x2f94b9['push'](_0x2f94b9['shift']());}catch(_0x19c969){_0x2f94b9['push'](_0x2f94b9['shift']());}}}(a79_0x1555,0xe7e7a));function a79_0x5bde(_0x1ede67,_0x2e1f4d){_0x1ede67=_0x1ede67-0xec;const _0x1555cf=a79_0x1555();let _0x5bde5b=_0x1555cf[_0x1ede67];return _0x5bde5b;}import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x5bf197){const _0xf595e6=a79_0x5bde;return void _0x5bf197,AUTH_MODE[_0xf595e6(0x108)];}export function createPipelineEnv(_0x4586b0,_0x30493e){const _0x4652a3=a79_0x5bde,_0x1e0e9c=typeof _0x30493e[_0x4652a3(0x128)]===_0x4652a3(0xf5)&&_0x30493e[_0x4652a3(0x128)][_0x4652a3(0x104)]();return{'rawFlags':_0x30493e,'appCode':_0x4586b0[_0x4652a3(0xf7)]||productEnv(_0x4652a3(0x10d))||(_0x1e0e9c?undefined:readAppCodeFromConfig()),'appCodeSource':_0x4586b0[_0x4652a3(0xef)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x30493e),'defaultFormat':_0x4586b0[_0x4652a3(0xee)],'defaultPageSize':_0x4586b0['pageSize'],'defaultVerbose':_0x4586b0[_0x4652a3(0x10c)],'riskLevel':_0x4586b0[_0x4652a3(0x120)],'accessKey':_0x4586b0[_0x4652a3(0x118)],'env':_0x4586b0[_0x4652a3(0x10a)],'mergedCli':{'defaultApp':_0x4586b0[_0x4652a3(0xf2)],'currentApp':_0x4586b0[_0x4652a3(0xf1)],'appCode':_0x4586b0['appCode']}};}function a79_0x1555(){const _0x2e4cfc=['ACCESS_KEY','cancelled','appcode\x20\x22','accessKey','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','8239230TvUKzg','982815OvTyuz','rawFlags','name','appcode','mergedCli','riskLevel','4998627SCXirB','schema','../core/sdk-client.js','9768780eaLJWt','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','45946190VozraF','High-risk\x20operation\x20`','app','8BYAize','Run\x20`','format','appCodeSource','_notice','currentApp','defaultApp','includes','\x20\x20To\x20proceed:\x20','string','../commands/app/remote-source.js','appCode','isNonInteractive','error','Unknown\x20app:\x20','requiresAppCode','object','.appcode\x20to\x20','20hHeOVf','\x20or\x20pass\x20','service','has','../core/api-client.js','Set\x20accessKey\x20in\x20','trim','newConfigFileName','defaultVerbose','production','ClientAk','75144LvsFqa','env','execute','verbose','APPCODE','authRequired','doctor','565499PFZVdH','requiresAuth','defaultPageSize','resolve','6IXGYNn'];a79_0x1555=function(){return _0x2e4cfc;};return a79_0x1555();}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x23686f=>PIPELINE_FLAG_NAMES[a79_0x1cc94c(0x101)](_0x23686f[a79_0x1cc94c(0x11d)]))['map'](({name:_0x20e7d3,type:_0x878a53,description:_0x13f6d6})=>({'name':_0x20e7d3,'type':_0x878a53,'description':_0x13f6d6})),'formatOutput':formatOutput,'getCommandLabel'(_0x1d6f76){return CLI_BIN_NAME+'\x20'+_0x1d6f76['service']+'\x20'+_0x1d6f76['command'];},'riskPolicy':{'onViolation'(_0x26f6d7){const _0x493dfe=a79_0x1cc94c;console[_0x493dfe(0xf9)](_0x26f6d7);},'createError'(_0x237b1e){const _0x37ef08=a79_0x1cc94c;return CliErrors[_0x37ef08(0x116)](_0x237b1e);}},async 'prepare'(_0x22a313,_0x5c517b){const _0x327613=a79_0x1cc94c,_0x3fa8e7=resolveAuthMode(_0x5c517b);if(_0x22a313[_0x327613(0x111)]!==![]){if(!_0x5c517b[_0x327613(0x118)])throw CliErrors[_0x327613(0x10e)](_0x327613(0x103)+PRODUCT_CONFIG[_0x327613(0x105)]+_0x327613(0xff)+productEnvName(_0x327613(0x115))+'.');const {setActiveAK:_0x491094}=await import(_0x327613(0x102));_0x491094(_0x5c517b[_0x327613(0x118)]);}let _0x26f90b='';if(_0x22a313[_0x327613(0xfb)]!==![]){_0x26f90b=_0x5c517b[_0x327613(0xf7)]??'',_0x26f90b=await resolveExplicitAppName(_0x22a313,_0x5c517b,_0x26f90b);if(!_0x26f90b){await assertSelectedAppNameIsRuntimeAccessible(_0x22a313,_0x5c517b);throw CliErrors['configMissing'](_0x327613(0x125)+PRODUCT_CONFIG[_0x327613(0x105)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x22a313,_0x5c517b,_0x26f90b);}if(_0x26f90b){const {initSdkClient:_0x3b6042}=await import(_0x327613(0x123));_0x3b6042({'appCode':_0x26f90b,'env':_0x5c517b[_0x327613(0x10a)]??_0x327613(0x107),'accessKey':_0x5c517b[_0x327613(0x118)],'authMode':_0x3fa8e7});}return{'defaults':{'booleans':{'verbose':_0x5c517b[_0x327613(0x106)]},'numbers':{'pagesize':_0x5c517b[_0x327613(0x112)]}},'extras':{'appCode':_0x26f90b,'cookie':'','apiDomain':_0x5c517b['apiDomain'],'apiDir':'','accessKey':_0x5c517b['accessKey'],'envName':_0x5c517b[_0x327613(0x10a)],'mergedCli':_0x5c517b[_0x327613(0x11f)]}};},async 'confirmHighRisk'({def:_0x666edb,env:_0x22720f,flags:_0x399399,commandLabel:_0x399571}){const _0x17343e=a79_0x1cc94c;if(_0x22720f[_0x17343e(0xf8)]){const _0x14c86a=reconstructCommandArgv(_0x666edb,_0x399399);throw CliErrors['validation'](_0x17343e(0x127)+_0x399571+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x17343e(0xf4)+_0x14c86a));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x666edb,_0x399571,_0x399399),'createCancelledError':_0x37b1a7=>CliErrors[_0x17343e(0x116)](_0x37b1a7)});},'mapDryRunError'(_0x19b97f){return mapUserFacingExecuteError(_0x19b97f);},'mapExecuteError'(_0xa9ae7f){return mapUserFacingExecuteError(_0xa9ae7f);},async 'finalize'(){const {clearActiveAK:_0x457838}=await import('../core/api-client.js');_0x457838();}};async function resolveExplicitAppName(_0x4b0b8b,_0x289f84,_0x332edf){const _0x135e34=a79_0x1cc94c;if(_0x4b0b8b['requiresAppCode']===![])return _0x332edf;const _0x25668f=typeof _0x289f84['rawFlags'][_0x135e34(0x128)]===_0x135e34(0xf5)?_0x289f84[_0x135e34(0x11c)][_0x135e34(0x128)][_0x135e34(0x104)]():'';if(!_0x25668f)return _0x332edf;const _0x12481e=typeof _0x289f84[_0x135e34(0x11c)]['appcode']==='string'&&_0x289f84[_0x135e34(0x11c)][_0x135e34(0x11e)][_0x135e34(0x104)]()||productEnv(_0x135e34(0x10d));if(_0x12481e||_0x289f84[_0x135e34(0xef)]==='local-alias')return _0x332edf;const {getRemoteAppList:_0x22921a}=await import(_0x135e34(0xf6)),_0x15248f=await _0x22921a({'env':_0x289f84[_0x135e34(0x10a)]??'production','accessKey':_0x289f84[_0x135e34(0x118)]}),_0x12ec74=findAppByName(_0x15248f['items'],_0x25668f);if(_0x12ec74&&!isRuntimeAccessibleApp(_0x12ec74))throw runtimeInaccessibleAppError(_0x12ec74,'\x22'+_0x25668f+'\x22');const _0xc72fa7=_0x12ec74?.[_0x135e34(0xf7)]?.[_0x135e34(0x104)]();if(_0xc72fa7)return _0xc72fa7;throw CliErrors['validation'](_0x135e34(0xfa)+_0x25668f,_0x135e34(0xed)+CLI_BIN_NAME+_0x135e34(0x119)+_0x25668f+_0x135e34(0xfd)+PRODUCT_CONFIG[_0x135e34(0x105)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x434013,_0x45980a){const _0x3e89f5=a79_0x1cc94c;if(_0x434013[_0x3e89f5(0xfb)]===![]||!_0x45980a[_0x3e89f5(0x118)])return;const _0x8cf545=(typeof _0x45980a[_0x3e89f5(0x11c)][_0x3e89f5(0x128)]==='string'&&_0x45980a[_0x3e89f5(0x11c)][_0x3e89f5(0x128)][_0x3e89f5(0x104)]()?_0x45980a['rawFlags'][_0x3e89f5(0x128)]:_0x45980a[_0x3e89f5(0x11f)]?.['currentApp']??_0x45980a[_0x3e89f5(0x11f)]?.[_0x3e89f5(0xf2)])?.[_0x3e89f5(0x104)]();if(!_0x8cf545)return;const {getRemoteAppList:_0xaf0a89}=await import(_0x3e89f5(0xf6)),_0x2cf7fe=await _0xaf0a89({'env':_0x45980a[_0x3e89f5(0x10a)]??_0x3e89f5(0x107),'accessKey':_0x45980a[_0x3e89f5(0x118)]}),_0x2b9b11=findAppByName(_0x2cf7fe['items'],_0x8cf545);if(_0x2b9b11&&!isRuntimeAccessibleApp(_0x2b9b11))throw runtimeInaccessibleAppError(_0x2b9b11,'\x22'+_0x8cf545+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x198b79,_0x2807c5,_0x24e951){const _0x418317=a79_0x1cc94c;if(_0x198b79[_0x418317(0xfb)]===![]||!_0x2807c5[_0x418317(0x118)])return;const {getRemoteAppList:_0x36e002}=await import(_0x418317(0xf6)),_0x28d193=await _0x36e002({'env':_0x2807c5[_0x418317(0x10a)]??_0x418317(0x107),'accessKey':_0x2807c5['accessKey']}),_0x4e2bae=findAppByCode(_0x28d193['items'],_0x24e951);if(_0x4e2bae&&!isRuntimeAccessibleApp(_0x4e2bae))throw runtimeInaccessibleAppError(_0x4e2bae,_0x418317(0x117)+_0x24e951+'\x22');}export async function runCommand(_0x4282f3,_0x182440){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x4282f3)?withUpdateNotice(_0x4282f3):_0x4282f3,_0x182440,runnerAdapter);}function shouldAttachUpdateNotice(_0x19978e){const _0x397d24=a79_0x1cc94c;return!['update',_0x397d24(0x122),_0x397d24(0x10f)][_0x397d24(0xf3)](_0x19978e[_0x397d24(0x100)]);}function withUpdateNotice(_0x590235){return{..._0x590235,async 'execute'(_0x2087ac){const _0x2d2e6b=a79_0x5bde,_0x48a122=shouldResolveUpdateNotice(_0x2087ac)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x2d2e6b(0x113)](null),_0x47efe9=await _0x590235[_0x2d2e6b(0x10b)](_0x2087ac);return attachUpdateNotice(_0x47efe9,await _0x48a122);}};}function shouldResolveUpdateNotice(_0x3278c){const _0x50cf32=a79_0x1cc94c;return _0x3278c[_0x50cf32(0xee)]==='pretty'&&!_0x3278c['nonInteractive'];}function attachUpdateNotice(_0x198c1b,_0x37eb67){const _0x361e3e=a79_0x1cc94c;if(!_0x37eb67||!_0x198c1b||typeof _0x198c1b!==_0x361e3e(0xfc))return _0x198c1b;const _0x571e32=_0x198c1b,_0x5bbe09=typeof _0x571e32[_0x361e3e(0xf0)]===_0x361e3e(0xfc)&&_0x571e32[_0x361e3e(0xf0)]!==null?_0x571e32['_notice']:{};return{..._0x571e32,'_notice':{..._0x5bbe09,'update':_0x37eb67}};}
@@ -1 +1 @@
1
- (function(_0x1c05c9,_0x5392d1){const _0x42da69=a80_0x151d,_0x5ee219=_0x1c05c9();while(!![]){try{const _0x22563f=-parseInt(_0x42da69(0x8d))/0x1+parseInt(_0x42da69(0x95))/0x2+parseInt(_0x42da69(0x88))/0x3*(-parseInt(_0x42da69(0x92))/0x4)+parseInt(_0x42da69(0x8b))/0x5+parseInt(_0x42da69(0x8e))/0x6+parseInt(_0x42da69(0x87))/0x7+parseInt(_0x42da69(0x8f))/0x8*(-parseInt(_0x42da69(0x91))/0x9);if(_0x22563f===_0x5392d1)break;else _0x5ee219['push'](_0x5ee219['shift']());}catch(_0x18f474){_0x5ee219['push'](_0x5ee219['shift']());}}}(a80_0x21e2,0xbdab6));function a80_0x21e2(){const _0x463c75=['1070229YppZmR','commands','../commands/registry.js','3656435YJSPBv','service','1080113yUhBLB','8959830MIQXgX','747096UMBKJC','none','63eCFddH','16abtxEH','required','requiresAuth','888364UPejqg','auth','services','map','8882342yQYJIL'];a80_0x21e2=function(){return _0x463c75;};return a80_0x21e2();}import{buildSchemaPayload as a80_0x341bb5}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a80_0x151d(_0x204d4d,_0x341167){_0x204d4d=_0x204d4d-0x85;const _0x21e298=a80_0x21e2();let _0x151d15=_0x21e298[_0x204d4d];return _0x151d15;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x43206a=a80_0x151d,{serviceRegistry:_0x485dfb,findDefinition:_0x2dc7f1}=await import(_0x43206a(0x8a)),_0x37952c=new Set(_0x485dfb[_0x43206a(0x86)](_0x21e836=>_0x21e836['service'])),_0x12d658=listDynamicServiceEntries()['filter'](_0x33649f=>!_0x37952c['has'](_0x33649f[_0x43206a(0x8c)])),_0x4e023c=a80_0x341bb5({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x485dfb,..._0x12d658],'buildAllFlags':buildAllFlags,'findDefinition':(_0xf17f07,_0x127007)=>_0x2dc7f1(_0xf17f07,_0x127007)??findDynamicServiceDefinition(_0xf17f07,_0x127007)});return normalizeSchemaPayload(_0x4e023c);}function normalizeSchemaPayload(_0x32e821){const _0x4463a1=a80_0x151d;return{..._0x32e821,'schemaVersion':0x2,'services':_0x32e821[_0x4463a1(0x85)]['map'](_0x5874c9=>({..._0x5874c9,'commands':_0x5874c9[_0x4463a1(0x89)][_0x4463a1(0x86)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0xdf86e6){const _0x4e0af7=a80_0x151d,_0x3ab7d7=_0xdf86e6;return{..._0xdf86e6,'auth':_0x3ab7d7[_0x4e0af7(0x96)]??(_0xdf86e6[_0x4e0af7(0x94)]?_0x4e0af7(0x93):_0x4e0af7(0x90))};}
1
+ (function(_0x476a91,_0x56fa22){const _0x5a7a8a=a80_0x5d79,_0x4d0c80=_0x476a91();while(!![]){try{const _0x426e5d=-parseInt(_0x5a7a8a(0x1c7))/0x1*(-parseInt(_0x5a7a8a(0x1c2))/0x2)+parseInt(_0x5a7a8a(0x1c3))/0x3*(-parseInt(_0x5a7a8a(0x1cb))/0x4)+-parseInt(_0x5a7a8a(0x1c9))/0x5+-parseInt(_0x5a7a8a(0x1c6))/0x6*(parseInt(_0x5a7a8a(0x1ce))/0x7)+-parseInt(_0x5a7a8a(0x1cd))/0x8*(-parseInt(_0x5a7a8a(0x1c8))/0x9)+-parseInt(_0x5a7a8a(0x1d0))/0xa*(-parseInt(_0x5a7a8a(0x1c5))/0xb)+parseInt(_0x5a7a8a(0x1ca))/0xc;if(_0x426e5d===_0x56fa22)break;else _0x4d0c80['push'](_0x4d0c80['shift']());}catch(_0x499950){_0x4d0c80['push'](_0x4d0c80['shift']());}}}(a80_0x2458,0xaae65));import{buildSchemaPayload as a80_0x48fb38}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0xc87579=a80_0x5d79,{serviceRegistry:_0x2818f9,findDefinition:_0x2aedb0}=await import(_0xc87579(0x1d5)),_0x4a0241=new Set(_0x2818f9[_0xc87579(0x1d4)](_0x68d095=>_0x68d095[_0xc87579(0x1c4)])),_0xdfe6a9=listDynamicServiceEntries()[_0xc87579(0x1d1)](_0xacb995=>!_0x4a0241[_0xc87579(0x1cf)](_0xacb995['service'])),_0x12103e=a80_0x48fb38({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x2818f9,..._0xdfe6a9],'buildAllFlags':buildAllFlags,'findDefinition':(_0x3c6ae7,_0x5024b1)=>_0x2aedb0(_0x3c6ae7,_0x5024b1)??findDynamicServiceDefinition(_0x3c6ae7,_0x5024b1)});return normalizeSchemaPayload(_0x12103e);}function a80_0x2458(){const _0x202a80=['84244fDWEcu','27426ALxLtl','service','99omRUlT','210618DfkBCv','21bvNWkb','1647918znqZEF','2576700GllveN','3946224tFUbSI','172oHRbFH','none','56FREMKT','182TnIKKc','has','28890RDaMrv','filter','commands','required','map','../commands/registry.js','requiresAuth'];a80_0x2458=function(){return _0x202a80;};return a80_0x2458();}function normalizeSchemaPayload(_0x4d5163){const _0x356d1f=a80_0x5d79;return{..._0x4d5163,'schemaVersion':0x2,'services':_0x4d5163['services'][_0x356d1f(0x1d4)](_0x4e17de=>({..._0x4e17de,'commands':_0x4e17de[_0x356d1f(0x1d2)][_0x356d1f(0x1d4)](normalizeSchemaCommand)}))};}function a80_0x5d79(_0x10b90b,_0x196b19){_0x10b90b=_0x10b90b-0x1c2;const _0x245835=a80_0x2458();let _0x5d79f2=_0x245835[_0x10b90b];return _0x5d79f2;}function normalizeSchemaCommand(_0x4fd727){const _0x23770b=a80_0x5d79,_0x4a5daf=_0x4fd727;return{..._0x4fd727,'auth':_0x4a5daf['auth']??(_0x4fd727[_0x23770b(0x1d6)]?_0x23770b(0x1d3):_0x23770b(0x1cc))};}
@@ -1 +1 @@
1
- function a81_0x5b95(_0x9620f,_0x2751aa){_0x9620f=_0x9620f-0x171;var _0x4d9a00=a81_0x4d9a();var _0x5b95ed=_0x4d9a00[_0x9620f];return _0x5b95ed;}(function(_0x2b7130,_0xabad05){var _0x57f95e=a81_0x5b95,_0xc56ad7=_0x2b7130();while(!![]){try{var _0x6d868b=parseInt(_0x57f95e(0x171))/0x1+parseInt(_0x57f95e(0x179))/0x2*(parseInt(_0x57f95e(0x176))/0x3)+parseInt(_0x57f95e(0x172))/0x4+-parseInt(_0x57f95e(0x177))/0x5+parseInt(_0x57f95e(0x175))/0x6+-parseInt(_0x57f95e(0x173))/0x7+-parseInt(_0x57f95e(0x174))/0x8*(parseInt(_0x57f95e(0x178))/0x9);if(_0x6d868b===_0xabad05)break;else _0xc56ad7['push'](_0xc56ad7['shift']());}catch(_0x31d38c){_0xc56ad7['push'](_0xc56ad7['shift']());}}}(a81_0x4d9a,0xc7939));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a81_0x4d9a(){var _0x4cc934=['1866REwLBI','2182785BYXqKi','9upGjrx','3976mNAuZo','620569vqzugI','4526748UsZstF','2535547aRzrcw','11112232lvGQZo','98880JdRCjc'];a81_0x4d9a=function(){return _0x4cc934;};return a81_0x4d9a();}
1
+ (function(_0x2ff68b,_0x370ef1){var _0x3e11a4=a81_0x1d27,_0x47dba2=_0x2ff68b();while(!![]){try{var _0x77bba7=-parseInt(_0x3e11a4(0xf3))/0x1*(parseInt(_0x3e11a4(0xf0))/0x2)+parseInt(_0x3e11a4(0xfb))/0x3*(parseInt(_0x3e11a4(0xfa))/0x4)+parseInt(_0x3e11a4(0xf9))/0x5+-parseInt(_0x3e11a4(0xf2))/0x6+-parseInt(_0x3e11a4(0xf7))/0x7*(parseInt(_0x3e11a4(0xf6))/0x8)+parseInt(_0x3e11a4(0xf5))/0x9*(-parseInt(_0x3e11a4(0xf4))/0xa)+parseInt(_0x3e11a4(0xf8))/0xb*(parseInt(_0x3e11a4(0xf1))/0xc);if(_0x77bba7===_0x370ef1)break;else _0x47dba2['push'](_0x47dba2['shift']());}catch(_0x34e1e0){_0x47dba2['push'](_0x47dba2['shift']());}}}(a81_0x585a,0x278da));function a81_0x1d27(_0x5b8527,_0x316450){_0x5b8527=_0x5b8527-0xf0;var _0x585ae9=a81_0x585a();var _0x1d2734=_0x585ae9[_0x5b8527];return _0x1d2734;}function a81_0x585a(){var _0xe3b7e9=['1732936XVtbrX','7gkiFnu','1231043sUMvsg','746285XDpFfY','80nIgkNT','32043PrPWMQ','2VkUNPE','48GvqcTb','542376RpMGDy','317201mjhOPd','10JBmggs','218745CbsoWS'];a81_0x585a=function(){return _0xe3b7e9;};return a81_0x585a();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a82_0x12313f=a82_0x1c1f;(function(_0x2ada65,_0x1173f7){const _0x57ca52=a82_0x1c1f,_0x4a373f=_0x2ada65();while(!![]){try{const _0xfb9a8b=-parseInt(_0x57ca52(0x156))/0x1+-parseInt(_0x57ca52(0x153))/0x2*(parseInt(_0x57ca52(0x158))/0x3)+-parseInt(_0x57ca52(0x155))/0x4*(-parseInt(_0x57ca52(0x157))/0x5)+-parseInt(_0x57ca52(0x15a))/0x6+-parseInt(_0x57ca52(0x154))/0x7+-parseInt(_0x57ca52(0x15c))/0x8*(parseInt(_0x57ca52(0x15b))/0x9)+-parseInt(_0x57ca52(0x159))/0xa*(-parseInt(_0x57ca52(0x151))/0xb);if(_0xfb9a8b===_0x1173f7)break;else _0x4a373f['push'](_0x4a373f['shift']());}catch(_0x4184f8){_0x4a373f['push'](_0x4a373f['shift']());}}}(a82_0x333d,0x854fe));export const VERSION='2.1.3';export const GIT_TAG='v2.1.3-beta.1';function a82_0x333d(){const _0xb7a98a=['7337Mprjum','0dfd4b3','1340302YPryfW','5932500Lujohs','2995180NPWlnr','1082318hoWbPr','5bwJGMd','3NOESpk','55420LtnmNw','2810238arhSZU','325143OshMom','184sBfrMJ'];a82_0x333d=function(){return _0xb7a98a;};return a82_0x333d();}export const GIT_COMMIT=a82_0x12313f(0x152);function a82_0x1c1f(_0x46825b,_0x49dbff){_0x46825b=_0x46825b-0x151;const _0x333d70=a82_0x333d();let _0x1c1f82=_0x333d70[_0x46825b];return _0x1c1f82;}export const BUILD_TIME='2026-07-04T02:25:09.955Z';
1
+ function a82_0x2b2d(_0x2204ca,_0x505458){_0x2204ca=_0x2204ca-0x1de;const _0x1359c7=a82_0x1359();let _0x2b2de7=_0x1359c7[_0x2204ca];return _0x2b2de7;}const a82_0x49d7bc=a82_0x2b2d;(function(_0x57c5aa,_0x168caa){const _0x178513=a82_0x2b2d,_0xd6425=_0x57c5aa();while(!![]){try{const _0x4ff686=parseInt(_0x178513(0x1e9))/0x1*(parseInt(_0x178513(0x1e5))/0x2)+parseInt(_0x178513(0x1df))/0x3*(-parseInt(_0x178513(0x1e2))/0x4)+parseInt(_0x178513(0x1e1))/0x5+-parseInt(_0x178513(0x1e8))/0x6+parseInt(_0x178513(0x1e7))/0x7*(parseInt(_0x178513(0x1e6))/0x8)+-parseInt(_0x178513(0x1e0))/0x9+-parseInt(_0x178513(0x1de))/0xa*(-parseInt(_0x178513(0x1e4))/0xb);if(_0x4ff686===_0x168caa)break;else _0xd6425['push'](_0xd6425['shift']());}catch(_0x3e042a){_0xd6425['push'](_0xd6425['shift']());}}}(a82_0x1359,0x7b0cb));export const VERSION='2.1.4-beta.1';export const GIT_TAG='v2.1.4-beta.1';export const GIT_COMMIT=a82_0x49d7bc(0x1e3);export const BUILD_TIME=a82_0x49d7bc(0x1ea);function a82_0x1359(){const _0x5750ae=['1691198XSpBdx','8mSeuji','2360449vomcFs','4352124AoqPTi','1TYMeDA','2026-07-04T07:03:15.065Z','9230uBhVth','262374BXnzGU','3651120rIgdHB','2257865HWfnRZ','28pHZYwp','b4d435b','7304zlssFY'];a82_0x1359=function(){return _0x5750ae;};return a82_0x1359();}
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a83_0x4423(_0x18ce37,_0x12a8d2){_0x18ce37=_0x18ce37-0xee;const _0x3d2034=a83_0x3d20();let _0x442341=_0x3d2034[_0x18ce37];return _0x442341;}(function(_0x42ace5,_0x15213f){const _0x5d8255=a83_0x4423,_0x266616=_0x42ace5();while(!![]){try{const _0x222799=parseInt(_0x5d8255(0xf3))/0x1+parseInt(_0x5d8255(0xf6))/0x2+-parseInt(_0x5d8255(0xf0))/0x3+-parseInt(_0x5d8255(0xf2))/0x4*(-parseInt(_0x5d8255(0xf8))/0x5)+parseInt(_0x5d8255(0xf5))/0x6*(-parseInt(_0x5d8255(0xf1))/0x7)+-parseInt(_0x5d8255(0xef))/0x8+-parseInt(_0x5d8255(0xf7))/0x9;if(_0x222799===_0x15213f)break;else _0x266616['push'](_0x266616['shift']());}catch(_0x79b0c3){_0x266616['push'](_0x266616['shift']());}}}(a83_0x3d20,0x73a16));import{jsx as a83_0x5f0031,jsxs as a83_0x581713}from'react/jsx-runtime';import{useEffect}from'react';function a83_0x3d20(){const _0x1a4875=['10269naewhw','1799996zNINPz','486000QwbTHp','green','2286uDHQPX','1812120pDFEGD','2030193MOtXFo','10SljrwR','\x20\x20Use\x20','5820968owKrbG','918933DHKmbL'];a83_0x3d20=function(){return _0x1a4875;};return a83_0x3d20();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x214872=a83_0x4423,{exit:_0x2ff5cd}=useApp();return useEffect(()=>{_0x2ff5cd();},[_0x2ff5cd]),a83_0x581713(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a83_0x5f0031(Box,{'children':a83_0x5f0031(Text,{'bold':!![],'color':_0x214872(0xf4),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x581713(Box,{'marginTop':0x1,'children':[a83_0x5f0031(Text,{'dimColor':!![],'children':_0x214872(0xee)}),a83_0x5f0031(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+'\x20--help'}),a83_0x5f0031(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x2a7098,_0x3655a6){const _0x249f7d=a83_0x4cc8,_0x24b742=_0x2a7098();while(!![]){try{const _0x48b7fd=parseInt(_0x249f7d(0x144))/0x1*(parseInt(_0x249f7d(0x143))/0x2)+-parseInt(_0x249f7d(0x148))/0x3+parseInt(_0x249f7d(0x149))/0x4*(parseInt(_0x249f7d(0x141))/0x5)+-parseInt(_0x249f7d(0x146))/0x6*(-parseInt(_0x249f7d(0x14b))/0x7)+-parseInt(_0x249f7d(0x140))/0x8*(-parseInt(_0x249f7d(0x13f))/0x9)+-parseInt(_0x249f7d(0x14a))/0xa+parseInt(_0x249f7d(0x142))/0xb;if(_0x48b7fd===_0x3655a6)break;else _0x24b742['push'](_0x24b742['shift']());}catch(_0x67ea62){_0x24b742['push'](_0x24b742['shift']());}}}(a83_0x1dbd,0xd53f7));import{jsx as a83_0x5bc76e,jsxs as a83_0x391873}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a83_0x4cc8(_0x2e169f,_0x258d82){_0x2e169f=_0x2e169f-0x13f;const _0x1dbd7d=a83_0x1dbd();let _0x4cc884=_0x1dbd7d[_0x2e169f];return _0x4cc884;}export function Help(){const _0x1f7c22=a83_0x4cc8,{exit:_0x4e7696}=useApp();return useEffect(()=>{_0x4e7696();},[_0x4e7696]),a83_0x391873(Box,{'flexDirection':_0x1f7c22(0x14c),'marginTop':0x1,'marginBottom':0x1,'children':[a83_0x5bc76e(Box,{'children':a83_0x5bc76e(Text,{'bold':!![],'color':_0x1f7c22(0x145),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x391873(Box,{'marginTop':0x1,'children':[a83_0x5bc76e(Text,{'dimColor':!![],'children':_0x1f7c22(0x147)}),a83_0x5bc76e(Text,{'bold':!![],'color':_0x1f7c22(0x145),'children':CLI_BIN_NAME+_0x1f7c22(0x14e)}),a83_0x5bc76e(Text,{'dimColor':!![],'children':_0x1f7c22(0x14d)})]})]});}function a83_0x1dbd(){const _0x2c1810=['column','\x20to\x20view\x20available\x20commands.','\x20--help','711WoYHot','17640hMxoZx','58625eQGSfL','2945195ZcYYxm','2678394yAHHzL','1NZekAm','green','1146suEcYJ','\x20\x20Use\x20','4309833JYRhye','400GxuboG','8019020hPsuoP','5803XsKoaW'];a83_0x1dbd=function(){return _0x2c1810;};return a83_0x1dbd();}
@@ -1 +1 @@
1
- const a84_0x16e668=a84_0x53ff;(function(_0xc91d9e,_0x57d047){const _0x2e5d08=a84_0x53ff,_0xe484b2=_0xc91d9e();while(!![]){try{const _0x3e0a8f=-parseInt(_0x2e5d08(0x107))/0x1+-parseInt(_0x2e5d08(0x10f))/0x2*(-parseInt(_0x2e5d08(0x116))/0x3)+parseInt(_0x2e5d08(0x10c))/0x4*(-parseInt(_0x2e5d08(0x108))/0x5)+parseInt(_0x2e5d08(0x11b))/0x6*(-parseInt(_0x2e5d08(0x11c))/0x7)+-parseInt(_0x2e5d08(0x110))/0x8+-parseInt(_0x2e5d08(0x117))/0x9+-parseInt(_0x2e5d08(0x10a))/0xa*(-parseInt(_0x2e5d08(0x11a))/0xb);if(_0x3e0a8f===_0x57d047)break;else _0xe484b2['push'](_0xe484b2['shift']());}catch(_0x586444){_0xe484b2['push'](_0xe484b2['shift']());}}}(a84_0x56ef,0xd9721));function a84_0x53ff(_0x14e94e,_0x2719b6){_0x14e94e=_0x14e94e-0x107;const _0x56ef4b=a84_0x56ef();let _0x53ff39=_0x56ef4b[_0x14e94e];return _0x53ff39;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a84_0x1c1d2f}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a84_0x1c1d2f;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a84_0x16e668(0x119)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a84_0x56ef(){const _0x229291=['6052716yWRXuw','toString','skipNpxSkillsEnvSuffix','1001SSKRns','1833576zQZouN','14TCrqmi','1421112rVOVkQ','5gjhPbj','add','383950zvitbJ','unknown','105220olVsmM','join','stderr','2aahtEe','2866672FntQoU','pipe','stdout','trim','status','skills','1458537yDlYXp'];a84_0x56ef=function(){return _0x229291;};return a84_0x56ef();}export function runNpxSkillsAddGlobal(_0x38aeef,_0x3fb50e=LOVRABET_SKILL_SOURCE,_0x2e9d91){const _0x5b82b0=a84_0x16e668;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3567dc=_0x2e9d91?.['stdio']??'inherit',_0x37ea99=resolveNpmBin('npx'),_0x58f98a=[_0x5b82b0(0x115),_0x5b82b0(0x109),_0x3fb50e,'-g','-y'],_0x2f38fd=[_0x37ea99,..._0x58f98a][_0x5b82b0(0x10d)]('\x20');console['log']('*\x20'+_0x2f38fd);const _0x5cd663=spawnSync(_0x37ea99,_0x58f98a,{'cwd':_0x38aeef,'stdio':_0x3567dc,'env':process.env,'shell':![]});if(_0x5cd663['status']===0x0)return{'ok':!![],'status':0x0};let _0x2f2859='exit\x20'+(_0x5cd663[_0x5b82b0(0x114)]??_0x5b82b0(0x10b));if(_0x3567dc===_0x5b82b0(0x111)){const _0x5dde20=_0x5cd663[_0x5b82b0(0x10e)]?_0x5cd663[_0x5b82b0(0x10e)][_0x5b82b0(0x118)]()[_0x5b82b0(0x113)]():'',_0x56387e=_0x5cd663[_0x5b82b0(0x112)]?_0x5cd663[_0x5b82b0(0x112)][_0x5b82b0(0x118)]()['trim']():'';if(_0x5dde20)_0x2f2859=_0x5dde20;else{if(_0x56387e)_0x2f2859=_0x56387e;}}return{'ok':![],'status':_0x5cd663[_0x5b82b0(0x114)]??null,'error':_0x2f2859};}
1
+ const a84_0x2ed700=a84_0x46a6;(function(_0x3c1eeb,_0x472ce6){const _0x20aa74=a84_0x46a6,_0x1cb600=_0x3c1eeb();while(!![]){try{const _0x3d3ac2=-parseInt(_0x20aa74(0x1a8))/0x1+-parseInt(_0x20aa74(0x1a1))/0x2+parseInt(_0x20aa74(0x1a0))/0x3+parseInt(_0x20aa74(0x1a5))/0x4+parseInt(_0x20aa74(0x19e))/0x5*(parseInt(_0x20aa74(0x19c))/0x6)+-parseInt(_0x20aa74(0x19f))/0x7+-parseInt(_0x20aa74(0x1a4))/0x8;if(_0x3d3ac2===_0x472ce6)break;else _0x1cb600['push'](_0x1cb600['shift']());}catch(_0x330781){_0x1cb600['push'](_0x1cb600['shift']());}}}(a84_0x36cf,0xecf56));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a84_0x36cf(){const _0x1aee07=['10FZilbX','3093755EsBSRh','5227248FjydXi','2278248hqtrRt','stdio','unknown','10620480BymhFr','7693848usPYaw','status','stderr','496889MdyWOF','trim','inherit','pipe','skills','toString','skipNpxSkillsEnvSuffix','2130726xOoTxQ','stdout'];a84_0x36cf=function(){return _0x1aee07;};return a84_0x36cf();}import{LOVRABET_SKILL_SOURCE as a84_0x7b944f}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a84_0x7b944f;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a84_0x2ed700(0x19b)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a84_0x46a6(_0x2ddb6a,_0x173b67){_0x2ddb6a=_0x2ddb6a-0x196;const _0x36cf3b=a84_0x36cf();let _0x46a689=_0x36cf3b[_0x2ddb6a];return _0x46a689;}export function runNpxSkillsAddGlobal(_0x5244df,_0x4cdc3a=LOVRABET_SKILL_SOURCE,_0xd6eb44){const _0x2ac1ba=a84_0x2ed700;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x42fbfc=_0xd6eb44?.[_0x2ac1ba(0x1a2)]??_0x2ac1ba(0x197),_0x2748a4=resolveNpmBin('npx'),_0x47abe3=[_0x2ac1ba(0x199),'add',_0x4cdc3a,'-g','-y'],_0x57644d=[_0x2748a4,..._0x47abe3]['join']('\x20');console['log']('*\x20'+_0x57644d);const _0x4f7cb2=spawnSync(_0x2748a4,_0x47abe3,{'cwd':_0x5244df,'stdio':_0x42fbfc,'env':process.env,'shell':![]});if(_0x4f7cb2[_0x2ac1ba(0x1a6)]===0x0)return{'ok':!![],'status':0x0};let _0x1fc61b='exit\x20'+(_0x4f7cb2[_0x2ac1ba(0x1a6)]??_0x2ac1ba(0x1a3));if(_0x42fbfc===_0x2ac1ba(0x198)){const _0x3bc381=_0x4f7cb2['stderr']?_0x4f7cb2[_0x2ac1ba(0x1a7)][_0x2ac1ba(0x19a)]()[_0x2ac1ba(0x196)]():'',_0x1210ed=_0x4f7cb2[_0x2ac1ba(0x19d)]?_0x4f7cb2['stdout'][_0x2ac1ba(0x19a)]()[_0x2ac1ba(0x196)]():'';if(_0x3bc381)_0x1fc61b=_0x3bc381;else{if(_0x1210ed)_0x1fc61b=_0x1210ed;}}return{'ok':![],'status':_0x4f7cb2[_0x2ac1ba(0x1a6)]??null,'error':_0x1fc61b};}
@@ -1 +1 @@
1
- const a85_0x3d5148=a85_0x38e0;(function(_0x3fccdc,_0x2c57cb){const _0x40832f=a85_0x38e0,_0x26d60a=_0x3fccdc();while(!![]){try{const _0x3be17f=-parseInt(_0x40832f(0x73))/0x1*(-parseInt(_0x40832f(0x85))/0x2)+-parseInt(_0x40832f(0x75))/0x3+-parseInt(_0x40832f(0x83))/0x4+parseInt(_0x40832f(0x7d))/0x5*(-parseInt(_0x40832f(0x7f))/0x6)+-parseInt(_0x40832f(0x84))/0x7+parseInt(_0x40832f(0x7a))/0x8*(-parseInt(_0x40832f(0x7b))/0x9)+-parseInt(_0x40832f(0x7c))/0xa*(-parseInt(_0x40832f(0x86))/0xb);if(_0x3be17f===_0x2c57cb)break;else _0x26d60a['push'](_0x26d60a['shift']());}catch(_0x353205){_0x26d60a['push'](_0x26d60a['shift']());}}}(a85_0xcc57,0x5d3f5));export const METADATA_FILE=a85_0x3d5148(0x77);export const SKILL_FILE='SKILL.md';export const MAX_SKILL_FILE_COUNT=0xc8;export const MAX_SKILL_FILE_BYTES=0x100*0x400;export const MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400;export const MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400;export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a85_0x38e0(_0x56567b,_0x2f8a52){_0x56567b=_0x56567b-0x73;const _0xcc5733=a85_0xcc57();let _0x38e0c0=_0xcc5733[_0x56567b];return _0x38e0c0;}function a85_0xcc57(){const _0x5c9c86=['.next','.svn','1116240qcXmIW','4578903oXVqgi','52724LvhDMZ','18822056WCzLUv','1cXdsDj','dist','2168268glmRIn','.git','lovrabet.skill.json','build','.turbo','232RAcqSm','219501ChIgwh','20vcjckj','5seAKjI','.cache','4220322HikVCt','node_modules'];a85_0xcc57=function(){return _0x5c9c86;};return a85_0xcc57();}export const IGNORED_DIR_NAMES=new Set([a85_0x3d5148(0x76),'.hg',a85_0x3d5148(0x82),a85_0x3d5148(0x80),a85_0x3d5148(0x81),a85_0x3d5148(0x74),a85_0x3d5148(0x78),'coverage',a85_0x3d5148(0x79),a85_0x3d5148(0x7e)]);
1
+ const a85_0x41d4a3=a85_0x30d8;(function(_0x24fe8b,_0x1f3ca8){const _0x4fe14d=a85_0x30d8,_0x1c431e=_0x24fe8b();while(!![]){try{const _0x2df41e=parseInt(_0x4fe14d(0xe2))/0x1*(-parseInt(_0x4fe14d(0xe8))/0x2)+parseInt(_0x4fe14d(0xeb))/0x3+-parseInt(_0x4fe14d(0xe1))/0x4*(parseInt(_0x4fe14d(0xdc))/0x5)+-parseInt(_0x4fe14d(0xe0))/0x6+parseInt(_0x4fe14d(0xec))/0x7+parseInt(_0x4fe14d(0xea))/0x8*(parseInt(_0x4fe14d(0xe9))/0x9)+parseInt(_0x4fe14d(0xe6))/0xa;if(_0x2df41e===_0x1f3ca8)break;else _0x1c431e['push'](_0x1c431e['shift']());}catch(_0x400296){_0x1c431e['push'](_0x1c431e['shift']());}}}(a85_0x469b,0xc7c9e));export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a85_0x41d4a3(0xe5);export const MAX_SKILL_FILE_COUNT=0xc8;function a85_0x469b(){const _0x450725=['coverage','SKILL.md','4415980osGKMk','.cache','723092pGsuDj','569349JhLWAM','88ZSYPgC','4374543zYcbXS','10289482JjwNQA','.svn','5VbkDPC','.turbo','build','dist','7686822oDZLFu','6418236hISxgL','1oBYERi','.DS_Store'];a85_0x469b=function(){return _0x450725;};return a85_0x469b();}export const MAX_SKILL_FILE_BYTES=0x100*0x400;export const MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400;function a85_0x30d8(_0x2af96a,_0x3559ff){_0x2af96a=_0x2af96a-0xdb;const _0x469b38=a85_0x469b();let _0x30d8a1=_0x469b38[_0x2af96a];return _0x30d8a1;}export const MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400;export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a85_0x41d4a3(0xe3)]);export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a85_0x41d4a3(0xdb),'node_modules','.next',a85_0x41d4a3(0xdf),a85_0x41d4a3(0xde),a85_0x41d4a3(0xe4),a85_0x41d4a3(0xdd),a85_0x41d4a3(0xe7)]);
@@ -1 +1 @@
1
- (function(_0x20a5ee,_0x1d1b73){const _0xf80eb1=a86_0x244e,_0x2c6a99=_0x20a5ee();while(!![]){try{const _0x2d561f=parseInt(_0xf80eb1(0x98))/0x1+-parseInt(_0xf80eb1(0x92))/0x2*(parseInt(_0xf80eb1(0x9e))/0x3)+-parseInt(_0xf80eb1(0x9b))/0x4+-parseInt(_0xf80eb1(0x93))/0x5*(-parseInt(_0xf80eb1(0xa0))/0x6)+-parseInt(_0xf80eb1(0x9f))/0x7*(parseInt(_0xf80eb1(0x99))/0x8)+-parseInt(_0xf80eb1(0xa3))/0x9*(parseInt(_0xf80eb1(0x97))/0xa)+parseInt(_0xf80eb1(0xa6))/0xb;if(_0x2d561f===_0x1d1b73)break;else _0x2c6a99['push'](_0x2c6a99['shift']());}catch(_0x13a8ee){_0x2c6a99['push'](_0x2c6a99['shift']());}}}(a86_0x5721,0x71064));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';function a86_0x5721(){const _0x1eb3b5=['split','endsWith','64570jFaOeW','352315yLdZYj','8CCkTIG','.tmp','891488RxjQCy','from','utf8','90714mdSKCN','2958347NooKHn','6LiXvEf','isSymbolicLink','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','873YtiEVo','startsWith','Unsafe\x20Skill\x20file\x20path:\x20','22594836cjLYsR','stringify','60YwxCIh','1177595WqeSGX','validation'];a86_0x5721=function(){return _0x1eb3b5;};return a86_0x5721();}import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x2b5c4a,_0x412a05){const _0x36c7ea=a86_0x244e,_0x46a72a=normalizeSkillRelativePath(_0x412a05),_0x77a0a3=realOrResolved(_0x2b5c4a),_0x84eb58=resolve(_0x77a0a3,..._0x46a72a[_0x36c7ea(0x95)]('/'));if(!isPathInside(_0x84eb58,_0x77a0a3))throw CliErrors['validation'](_0x36c7ea(0xa5)+_0x412a05);return ensureNoSymlinkInManagedPath(_0x77a0a3,_0x46a72a),_0x84eb58;}export function ensureNoSymlinkInManagedPath(_0xdaebbb,_0x531d43){const _0x220124=a86_0x244e;let _0x59b9d4=_0xdaebbb;for(const _0x4c427a of _0x531d43['split']('/')){_0x59b9d4=resolve(_0x59b9d4,_0x4c427a);const _0x4d1a83=lstatIfPresent(_0x59b9d4);if(_0x4d1a83?.[_0x220124(0xa1)]())throw CliErrors[_0x220124(0x94)](_0x220124(0xa2)+_0x531d43);}}export function isDanglingSymlink(_0x5871f2){try{return lstatSync(_0x5871f2)['isSymbolicLink']();}catch{return![];}}function a86_0x244e(_0x5f0622,_0x155f51){_0x5f0622=_0x5f0622-0x92;const _0x572119=a86_0x5721();let _0x244ea4=_0x572119[_0x5f0622];return _0x244ea4;}export function resolveSymlinkTarget(_0xbaca3e){const _0x3a5dd2=readlinkSync(_0xbaca3e);return isAbsolute(_0x3a5dd2)?_0x3a5dd2:resolve(dirname(_0xbaca3e),_0x3a5dd2);}export function isPathInside(_0xf405b,_0xd8c2fe){const _0x1fa34d=a86_0x244e,_0x33835d=_0xf405b['endsWith'](sep)?_0xf405b:''+_0xf405b+sep,_0x3d797c=_0xd8c2fe[_0x1fa34d(0x96)](sep)?_0xd8c2fe:''+_0xd8c2fe+sep;return _0xf405b===_0xd8c2fe||_0x33835d[_0x1fa34d(0xa4)](_0x3d797c);}export function realOrResolved(_0x1975e3){try{return realpathSync(_0x1975e3);}catch{return resolve(_0x1975e3);}}export function lstatIfPresent(_0xe7deff){try{return lstatSync(_0xe7deff);}catch{return undefined;}}export function writeTextAtomic(_0x3cebb5,_0x5e0835,_0x5682a1){const _0xa44109=a86_0x244e;writeBytesAtomic(_0x3cebb5,Buffer[_0xa44109(0x9c)](_0x5e0835,_0xa44109(0x9d)),_0x5682a1);}export function writeBytesAtomic(_0xd9527,_0x82d0d1,_0x124017){const _0x558344=a86_0x244e,_0x8df0cb=_0xd9527+_0x558344(0x9a);try{writeFileSync(_0x8df0cb,_0x82d0d1,{'mode':_0x124017}),renameSync(_0x8df0cb,_0xd9527);}catch(_0x5512c4){try{rmSync(_0x8df0cb,{'force':!![]});}catch{}throw _0x5512c4;}}export function writeJsonAtomic(_0x54b616,_0x31ce94){const _0x36ecec=a86_0x244e;writeTextAtomic(_0x54b616,JSON[_0x36ecec(0xa7)](_0x31ce94,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x52d78e,_0x32f5d3){const _0x2eb5a4=a86_0x495a,_0x50e4bb=_0x52d78e();while(!![]){try{const _0x5c3323=parseInt(_0x2eb5a4(0xa3))/0x1*(-parseInt(_0x2eb5a4(0xa7))/0x2)+-parseInt(_0x2eb5a4(0xa9))/0x3*(parseInt(_0x2eb5a4(0xaa))/0x4)+-parseInt(_0x2eb5a4(0xad))/0x5*(-parseInt(_0x2eb5a4(0xae))/0x6)+parseInt(_0x2eb5a4(0xa1))/0x7+-parseInt(_0x2eb5a4(0xa2))/0x8+parseInt(_0x2eb5a4(0xac))/0x9+-parseInt(_0x2eb5a4(0x9d))/0xa*(parseInt(_0x2eb5a4(0xa4))/0xb);if(_0x5c3323===_0x32f5d3)break;else _0x50e4bb['push'](_0x50e4bb['shift']());}catch(_0x3e5223){_0x50e4bb['push'](_0x50e4bb['shift']());}}}(a86_0x56ff,0xd31d5));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(_0x21aad1,_0x5ebccc){const _0x364c8e=a86_0x495a,_0x4bc638=normalizeSkillRelativePath(_0x5ebccc),_0x5d87cb=realOrResolved(_0x21aad1),_0x36ce8b=resolve(_0x5d87cb,..._0x4bc638[_0x364c8e(0xa5)]('/'));if(!isPathInside(_0x36ce8b,_0x5d87cb))throw CliErrors[_0x364c8e(0xab)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x5ebccc);return ensureNoSymlinkInManagedPath(_0x5d87cb,_0x4bc638),_0x36ce8b;}export function ensureNoSymlinkInManagedPath(_0x3108b6,_0x40e381){const _0x226728=a86_0x495a;let _0x58733c=_0x3108b6;for(const _0xafed49 of _0x40e381['split']('/')){_0x58733c=resolve(_0x58733c,_0xafed49);const _0x231a8b=lstatIfPresent(_0x58733c);if(_0x231a8b?.[_0x226728(0x9e)]())throw CliErrors[_0x226728(0xab)](_0x226728(0xaf)+_0x40e381);}}export function isDanglingSymlink(_0x3e9751){try{return lstatSync(_0x3e9751)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x12e415){const _0x2b32dc=readlinkSync(_0x12e415);return isAbsolute(_0x2b32dc)?_0x2b32dc:resolve(dirname(_0x12e415),_0x2b32dc);}export function isPathInside(_0x310ca8,_0x1f6854){const _0xa3dace=a86_0x495a,_0x12d912=_0x310ca8[_0xa3dace(0xa8)](sep)?_0x310ca8:''+_0x310ca8+sep,_0x3a5663=_0x1f6854[_0xa3dace(0xa8)](sep)?_0x1f6854:''+_0x1f6854+sep;return _0x310ca8===_0x1f6854||_0x12d912[_0xa3dace(0xa6)](_0x3a5663);}export function realOrResolved(_0x3eaaf7){try{return realpathSync(_0x3eaaf7);}catch{return resolve(_0x3eaaf7);}}export function lstatIfPresent(_0x54e12e){try{return lstatSync(_0x54e12e);}catch{return undefined;}}export function writeTextAtomic(_0x26d8c9,_0x4292e7,_0x1976d6){const _0xd24b86=a86_0x495a;writeBytesAtomic(_0x26d8c9,Buffer[_0xd24b86(0x9f)](_0x4292e7,'utf8'),_0x1976d6);}export function writeBytesAtomic(_0xfd5870,_0xe5d32f,_0x2d1275){const _0x1e7300=_0xfd5870+'.tmp';try{writeFileSync(_0x1e7300,_0xe5d32f,{'mode':_0x2d1275}),renameSync(_0x1e7300,_0xfd5870);}catch(_0x1f2d19){try{rmSync(_0x1e7300,{'force':!![]});}catch{}throw _0x1f2d19;}}function a86_0x495a(_0x2d3d2e,_0x192c06){_0x2d3d2e=_0x2d3d2e-0x9d;const _0x56ff2b=a86_0x56ff();let _0x495a47=_0x56ff2b[_0x2d3d2e];return _0x495a47;}function a86_0x56ff(){const _0x4590f4=['endsWith','319161ltAkTf','20qlUQUj','validation','11867652uiPEYZ','35bPniuR','921846lGlPmb','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','3642910hPEexv','isSymbolicLink','from','stringify','10320947FsnKHB','1084624HRwANy','7025dCHSXy','33Olznag','split','startsWith','354aPljur'];a86_0x56ff=function(){return _0x4590f4;};return a86_0x56ff();}export function writeJsonAtomic(_0x166b5f,_0x23fab6){const _0x15f137=a86_0x495a;writeTextAtomic(_0x166b5f,JSON[_0x15f137(0xa0)](_0x23fab6,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x13cf77,_0x3db525){const _0x6fbfb3=a87_0x4b6a,_0x5498d6=_0x13cf77();while(!![]){try{const _0x22dad2=-parseInt(_0x6fbfb3(0x13a))/0x1+-parseInt(_0x6fbfb3(0x12f))/0x2+-parseInt(_0x6fbfb3(0x138))/0x3+parseInt(_0x6fbfb3(0x130))/0x4+parseInt(_0x6fbfb3(0x139))/0x5+parseInt(_0x6fbfb3(0x133))/0x6+-parseInt(_0x6fbfb3(0x134))/0x7;if(_0x22dad2===_0x3db525)break;else _0x5498d6['push'](_0x5498d6['shift']());}catch(_0x3c975f){_0x5498d6['push'](_0x5498d6['shift']());}}}(a87_0x3ee8,0x977ac));function a87_0x3ee8(){const _0x1711ce=['update','51366PhiStT','4651625eYMhib','80190DXPbev','digest','447736PxsXOF','216328aHBbPN','hex','size','6326088ApRbEN','7679805rzNKAb','sha256','path'];a87_0x3ee8=function(){return _0x1711ce;};return a87_0x3ee8();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a87_0x4b6a(_0x4b90f9,_0x5832d5){_0x4b90f9=_0x4b90f9-0x12e;const _0x3ee889=a87_0x3ee8();let _0x4b6a05=_0x3ee889[_0x4b90f9];return _0x4b6a05;}export function contentHash(_0x303889){const _0x4af1d4=a87_0x4b6a;return createHash(_0x4af1d4(0x135))[_0x4af1d4(0x137)](_0x303889)[_0x4af1d4(0x12e)](_0x4af1d4(0x131));}export function fileHash(_0x4a7350){return bufferSha256(fileContent(_0x4a7350));}export function bufferSha256(_0x24f198){const _0x5b1167=a87_0x4b6a;return createHash('sha256')[_0x5b1167(0x137)](_0x24f198)[_0x5b1167(0x12e)](_0x5b1167(0x131));}export function fileTreeHash(_0xff313a){const _0x401cb4=a87_0x4b6a,_0x4470a5=createHash('sha256');for(const _0xd26201 of normalizeManifestFiles(_0xff313a)){_0x4470a5[_0x401cb4(0x137)](_0xd26201[_0x401cb4(0x136)]),_0x4470a5['update']('\x00'),_0x4470a5[_0x401cb4(0x137)](_0xd26201[_0x401cb4(0x135)]),_0x4470a5[_0x401cb4(0x137)]('\x00'),_0x4470a5[_0x401cb4(0x137)](String(_0xd26201[_0x401cb4(0x132)])),_0x4470a5['update']('\x00');}return _0x4470a5[_0x401cb4(0x12e)](_0x401cb4(0x131));}
1
+ (function(_0x13c5f5,_0x3f7eb6){const _0x2a94df=a87_0x4c42,_0x42b4f0=_0x13c5f5();while(!![]){try{const _0xac622e=-parseInt(_0x2a94df(0xb1))/0x1+-parseInt(_0x2a94df(0xaa))/0x2*(-parseInt(_0x2a94df(0xa5))/0x3)+parseInt(_0x2a94df(0xad))/0x4+-parseInt(_0x2a94df(0xa8))/0x5*(-parseInt(_0x2a94df(0xb3))/0x6)+parseInt(_0x2a94df(0xa6))/0x7+-parseInt(_0x2a94df(0xa7))/0x8+-parseInt(_0x2a94df(0xa9))/0x9*(parseInt(_0x2a94df(0xaf))/0xa);if(_0xac622e===_0x3f7eb6)break;else _0x42b4f0['push'](_0x42b4f0['shift']());}catch(_0x5241fc){_0x42b4f0['push'](_0x42b4f0['shift']());}}}(a87_0x1d2c,0xc43e1));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x38e64d){const _0x57abce=a87_0x4c42;return createHash('sha256')[_0x57abce(0xab)](_0x38e64d)[_0x57abce(0xb2)](_0x57abce(0xb0));}function a87_0x4c42(_0x28e03f,_0x19c703){_0x28e03f=_0x28e03f-0xa5;const _0x1d2c63=a87_0x1d2c();let _0x4c4287=_0x1d2c63[_0x28e03f];return _0x4c4287;}export function fileHash(_0x1ebd91){return bufferSha256(fileContent(_0x1ebd91));}export function bufferSha256(_0x4a6e58){const _0x5578cb=a87_0x4c42;return createHash(_0x5578cb(0xae))['update'](_0x4a6e58)[_0x5578cb(0xb2)](_0x5578cb(0xb0));}function a87_0x1d2c(){const _0x6b41b7=['10239138DptFIN','12144512dhzakj','6921065EmCkZv','117eQmcdA','2694902rpDAtX','update','size','6291968eJMEXw','sha256','2506690kyQLie','hex','186820GMnHri','digest','6KyQgjx','3TwgrDp'];a87_0x1d2c=function(){return _0x6b41b7;};return a87_0x1d2c();}export function fileTreeHash(_0x35e02a){const _0x3c087b=a87_0x4c42,_0x116b38=createHash('sha256');for(const _0x10e818 of normalizeManifestFiles(_0x35e02a)){_0x116b38['update'](_0x10e818['path']),_0x116b38[_0x3c087b(0xab)]('\x00'),_0x116b38[_0x3c087b(0xab)](_0x10e818[_0x3c087b(0xae)]),_0x116b38['update']('\x00'),_0x116b38[_0x3c087b(0xab)](String(_0x10e818[_0x3c087b(0xac)])),_0x116b38['update']('\x00');}return _0x116b38[_0x3c087b(0xb2)](_0x3c087b(0xb0));}
@@ -1 +1 @@
1
- (function(_0x5a14b9,_0xcd21df){const _0x234f2a=a88_0x27d8,_0x204b47=_0x5a14b9();while(!![]){try{const _0x24b863=parseInt(_0x234f2a(0x90))/0x1*(-parseInt(_0x234f2a(0xa8))/0x2)+parseInt(_0x234f2a(0xb7))/0x3*(-parseInt(_0x234f2a(0x9b))/0x4)+-parseInt(_0x234f2a(0xa1))/0x5+parseInt(_0x234f2a(0x8f))/0x6+-parseInt(_0x234f2a(0x98))/0x7*(parseInt(_0x234f2a(0xaa))/0x8)+-parseInt(_0x234f2a(0xa7))/0x9*(-parseInt(_0x234f2a(0x8a))/0xa)+parseInt(_0x234f2a(0xa2))/0xb*(parseInt(_0x234f2a(0xa3))/0xc);if(_0x24b863===_0xcd21df)break;else _0x204b47['push'](_0x204b47['shift']());}catch(_0x1f4dc1){_0x204b47['push'](_0x204b47['shift']());}}}(a88_0x3dc1,0xbfdc6));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import{copySync,ensureDirSync,removeSync}from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a88_0x27d8(_0x3baccb,_0x4411e6){_0x3baccb=_0x3baccb-0x8a;const _0x3dc1d6=a88_0x3dc1();let _0x27d88e=_0x3dc1d6[_0x3baccb];return _0x27d88e;}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';export function linkEffectiveRuntimeSkills(_0x1507d2,_0x4efa6c,_0x12db20={}){const _0x3a071e=a88_0x27d8,_0x12c89c=new Map();for(const _0x439f22 of _0x1507d2){const _0x236e09=_0x439f22['skill'][_0x3a071e(0x9f)];if(!_0x236e09)continue;const _0x1c0b4f=_0x12c89c[_0x3a071e(0x91)](_0x236e09);(!_0x1c0b4f||_0x439f22[_0x3a071e(0x95)]===_0x3a071e(0x9c))&&_0x12c89c[_0x3a071e(0xb8)](_0x236e09,_0x439f22);}const _0x476de9=[],_0x121e18=resolveSkillSyncPaths(_0x12db20);for(const _0x1e296a of _0x12c89c[_0x3a071e(0xa0)]()){const _0x4abb70=requireSkillCode(_0x1e296a[_0x3a071e(0xa6)]),_0x19bcf5=_0x4efa6c+'--'+_0x4abb70;for(const _0x273f18 of[_0x121e18[_0x3a071e(0x8b)],_0x121e18[_0x3a071e(0xa4)]]){_0x476de9[_0x3a071e(0xb5)](ensureManagedSymlink(resolve(_0x273f18,_0x19bcf5),_0x1e296a['dir'],_0x121e18[_0x3a071e(0xb9)]));}}return _0x476de9;}export function pruneStaleRuntimeSkillLinks(_0x2e75cc,_0x4dc1f6,_0x54b692={},_0x51d774){const _0x7d78a9=a88_0x27d8,_0x1ac309=resolveSkillSyncPaths(_0x54b692),_0x4da470=new Set([..._0x4dc1f6][_0x7d78a9(0x94)](_0x595909=>_0x595909[_0x7d78a9(0xbc)]())[_0x7d78a9(0xbf)](Boolean)),_0x2157bb=_0x51d774?new Set([..._0x51d774]['map'](_0x10d7d6=>_0x10d7d6[_0x7d78a9(0xbc)]())[_0x7d78a9(0xbf)](Boolean)):undefined,_0x693b97=[];for(const _0x77ce9 of[_0x1ac309[_0x7d78a9(0x8b)],_0x1ac309[_0x7d78a9(0xa4)]]){for(const _0x10365b of managedAppSkillLinkPaths(_0x77ce9,_0x2e75cc)){const _0x15c6d6=basename(_0x10365b)['slice']((_0x2e75cc+'--')[_0x7d78a9(0x92)]);if(_0x2157bb&&!_0x2157bb[_0x7d78a9(0x9a)](_0x15c6d6))continue;if(_0x4da470[_0x7d78a9(0x9a)](_0x15c6d6))continue;_0x693b97['push'](removeManagedSkillLink(_0x10365b,_0x1ac309[_0x7d78a9(0xb9)]));}}return _0x693b97;}export function pruneStaleRuntimeSkillCache(_0x1fdc26,_0xd8468a={}){const _0x2691f3=a88_0x27d8,_0x2f70b3=new Set([..._0x1fdc26[_0x2691f3(0xba)]][_0x2691f3(0x94)](_0x2ff5d9=>_0x2ff5d9[_0x2691f3(0xbc)]())[_0x2691f3(0xbf)](Boolean)),_0x3ce148=_0x1fdc26[_0x2691f3(0xac)]?new Set([..._0x1fdc26['pruneSkillCodes']][_0x2691f3(0x94)](_0x41f43c=>_0x41f43c['trim']())[_0x2691f3(0xbf)](Boolean)):undefined,_0x42cc54=_0x1fdc26[_0x2691f3(0x9e)]??[_0x2691f3(0x9c),_0x2691f3(0xad)],_0x275662=resolve(getRuntimeSkillCacheRoot(_0x1fdc26[_0x2691f3(0x8e)],_0x1fdc26[_0x2691f3(0x97)],_0xd8468a),safePathSegment(_0x1fdc26['appCode'],_0x2691f3(0xb4))),_0x263dbc=[];for(const _0x8a7b72 of _0x42cc54){const _0x120639=resolve(_0x275662,_0x8a7b72);if(!existsSync(_0x120639))continue;for(const _0x4e9a06 of readdirSync(_0x120639,{'withFileTypes':!![]})){if(!_0x4e9a06[_0x2691f3(0x93)]())continue;const _0x3008b4=_0x4e9a06[_0x2691f3(0xaf)];if(_0x3ce148&&!_0x3ce148[_0x2691f3(0x9a)](_0x3008b4))continue;if(_0x2f70b3[_0x2691f3(0x9a)](_0x3008b4))continue;const _0x3d0981=resolve(_0x120639,_0x3008b4),_0x338d9f=readMetadataIfPresent(resolve(_0x3d0981,METADATA_FILE));if(_0x338d9f?.[_0x2691f3(0xb4)]!==_0x1fdc26[_0x2691f3(0xb4)]||_0x338d9f[_0x2691f3(0x95)]!==_0x8a7b72||_0x338d9f[_0x2691f3(0x9f)]!==_0x3008b4){_0x263dbc[_0x2691f3(0xb5)]({'path':_0x3d0981,'action':_0x2691f3(0xa9),'reason':_0x2691f3(0xab)});continue;}removeSync(_0x3d0981),_0x263dbc['push']({'path':_0x3d0981,'action':_0x2691f3(0x8d)});}}return _0x263dbc;}function a88_0x3dc1(){const _0x4778ea=['Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','name','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','not-managed-symlink','created','isSymbolicLink','appCode','push','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','6fjCFro','set','managedRoot','activeSkillCodes','unchanged','trim','dir','validation','filter','830AMBcTa','agentsSkillsDir','external-symlink','removed','env','7913976Opfqef','9214saNZRc','get','length','isDirectory','map','scope','startsWith','accessKey','28658BaSfOJ','builtin','has','3012668RAWyJU','personal','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','scopes','skillCode','values','1056270mYxtLu','19686216Xrrxzf','12LkQOxd','claudeSkillsDir','updated','skill','93654qlNShb','142MNFzyr','skipped','1592JYYMOT','metadata-mismatch','pruneSkillCodes','company'];a88_0x3dc1=function(){return _0x4778ea;};return a88_0x3dc1();}export function linkGlobalRuntimeSkills(_0xcbf66c,_0x8261e0={}){const _0x49bc30=a88_0x27d8,_0x2da1ee=resolveSkillSyncPaths(_0x8261e0),_0x5e66cf=[];for(const _0x109438 of _0xcbf66c){if(_0x109438['scope']!==_0x49bc30(0x99))throw CliErrors[_0x49bc30(0xbe)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x109438[_0x49bc30(0x95)]);const _0xdd0a2c=requireSkillCode(_0x109438[_0x49bc30(0xa6)]),_0x250fb1=copyManagedSkillDirectory(_0x109438['dir'],resolve(_0x2da1ee[_0x49bc30(0x8b)],_0xdd0a2c));_0x5e66cf[_0x49bc30(0xb5)]({..._0x250fb1,'contentHash':_0x109438['contentHash']});}return _0x5e66cf;}function ensureManagedSymlink(_0x1ba8eb,_0xfeb477,_0x5cf6a4){const _0x2822d1=a88_0x27d8;mkdirSync(dirname(_0x1ba8eb),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1ba8eb)||isDanglingSymlink(_0x1ba8eb)){const _0x20a680=lstatSync(_0x1ba8eb);if(!_0x20a680[_0x2822d1(0xb3)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x1ba8eb);const _0x148fb4=resolveSymlinkTarget(_0x1ba8eb);if(!isPathInside(realOrResolved(_0x148fb4),realOrResolved(_0x5cf6a4)))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x1ba8eb);if(realOrResolved(_0x148fb4)===realOrResolved(_0xfeb477))return{'path':_0x1ba8eb,'target':_0xfeb477,'action':_0x2822d1(0xbb)};return unlinkSync(_0x1ba8eb),symlinkSync(_0xfeb477,_0x1ba8eb,_0x2822d1(0xbd)),{'path':_0x1ba8eb,'target':_0xfeb477,'action':_0x2822d1(0xa5)};}return symlinkSync(_0xfeb477,_0x1ba8eb,_0x2822d1(0xbd)),{'path':_0x1ba8eb,'target':_0xfeb477,'action':_0x2822d1(0xb2)};}function managedAppSkillLinkPaths(_0x17b28d,_0x5ccb96){const _0x3b98c3=a88_0x27d8;if(!existsSync(_0x17b28d))return[];const _0x3af5fb=_0x5ccb96+'--';return readdirSync(_0x17b28d,{'withFileTypes':!![]})[_0x3b98c3(0xbf)](_0x32b50c=>_0x32b50c[_0x3b98c3(0xaf)][_0x3b98c3(0x96)](_0x3af5fb))['map'](_0x4ccaba=>resolve(_0x17b28d,_0x4ccaba['name']));}function removeManagedSkillLink(_0x44cc52,_0x426732){const _0x33dfce=a88_0x27d8,_0x40fe9f=lstatIfPresent(_0x44cc52);if(!_0x40fe9f?.[_0x33dfce(0xb3)]())return{'path':_0x44cc52,'action':_0x33dfce(0xa9),'reason':_0x33dfce(0xb1)};const _0x398b04=resolveSymlinkTarget(_0x44cc52);if(!isPathInside(realOrResolved(_0x398b04),realOrResolved(_0x426732)))return{'path':_0x44cc52,'action':_0x33dfce(0xa9),'reason':_0x33dfce(0x8c)};return unlinkSync(_0x44cc52),{'path':_0x44cc52,'action':_0x33dfce(0x8d)};}export function copyManagedSkillDirectory(_0xe59877,_0x203c5b){const _0x18cac1=a88_0x27d8,_0x6b446a=resolve(_0x203c5b,METADATA_FILE),_0x43531=existsSync(_0x203c5b);if(_0x43531){const _0x346309=lstatSync(_0x203c5b);if(_0x346309[_0x18cac1(0xb3)]())throw CliErrors['validation'](_0x18cac1(0xb6)+_0x203c5b);if(!_0x346309[_0x18cac1(0x93)]())throw CliErrors[_0x18cac1(0xbe)](_0x18cac1(0xb0)+_0x203c5b);const _0x4f118e=readMetadataIfPresent(_0x6b446a);if(_0x4f118e?.[_0x18cac1(0x95)]!==_0x18cac1(0x99))throw CliErrors[_0x18cac1(0xbe)](_0x18cac1(0xae)+_0x203c5b);}ensureDirSync(dirname(_0x203c5b));const _0x23fa38=_0x43531?readMetadataIfPresent(_0x6b446a)?.['contentHash']:undefined,_0x19faef=readMetadataIfPresent(resolve(_0xe59877,METADATA_FILE))?.['contentHash'];return _0x43531&&removeSync(_0x203c5b),copySkillDirectory(_0xe59877,_0x203c5b),{'path':_0x203c5b,'target':_0xe59877,'action':!_0x43531?_0x18cac1(0xb2):_0x23fa38===_0x19faef?_0x18cac1(0xbb):_0x18cac1(0xa5)};}function copySkillDirectory(_0x218042,_0x18b666){copySync(_0x218042,_0x18b666,{'dereference':![],'overwrite':!![],'filter'(_0x2c26e1){const _0xf55bbc=a88_0x27d8;if(lstatSync(_0x2c26e1)[_0xf55bbc(0xb3)]())throw CliErrors[_0xf55bbc(0xbe)](_0xf55bbc(0x9d)+_0x2c26e1);return!![];}});}
1
+ (function(_0x3bd48a,_0x1a59e4){const _0x3377f3=a88_0xc817,_0x5e908e=_0x3bd48a();while(!![]){try{const _0x494422=parseInt(_0x3377f3(0x118))/0x1+parseInt(_0x3377f3(0x10c))/0x2*(parseInt(_0x3377f3(0x117))/0x3)+-parseInt(_0x3377f3(0x111))/0x4+-parseInt(_0x3377f3(0x128))/0x5+parseInt(_0x3377f3(0x115))/0x6+-parseInt(_0x3377f3(0x108))/0x7*(-parseInt(_0x3377f3(0x12e))/0x8)+parseInt(_0x3377f3(0x10d))/0x9;if(_0x494422===_0x1a59e4)break;else _0x5e908e['push'](_0x5e908e['shift']());}catch(_0x4264ad){_0x5e908e['push'](_0x5e908e['shift']());}}}(a88_0x2f81,0xdcce8));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a88_0x2a8e8a from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a88_0xc817(_0x5a1a57,_0x3333dc){_0x5a1a57=_0x5a1a57-0x108;const _0x2f81ac=a88_0x2f81();let _0xc81772=_0x2f81ac[_0x5a1a57];return _0xc81772;}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a88_0x2a8e8a;export function linkEffectiveRuntimeSkills(_0x266bf2,_0x42c079,_0x2818d5={}){const _0x286f1e=a88_0xc817,_0x2f615b=new Map();for(const _0x355262 of _0x266bf2){const _0x235bfb=_0x355262[_0x286f1e(0x119)][_0x286f1e(0x11c)];if(!_0x235bfb)continue;const _0x11b6e7=_0x2f615b[_0x286f1e(0x109)](_0x235bfb);(!_0x11b6e7||_0x355262['scope']===_0x286f1e(0x130))&&_0x2f615b['set'](_0x235bfb,_0x355262);}const _0x38a7d5=[],_0x5d9eb5=resolveSkillSyncPaths(_0x2818d5);for(const _0x56936a of _0x2f615b['values']()){const _0x222268=requireSkillCode(_0x56936a[_0x286f1e(0x119)]),_0x25482d=_0x42c079+'--'+_0x222268;for(const _0x4e68ae of[_0x5d9eb5[_0x286f1e(0x124)],_0x5d9eb5[_0x286f1e(0x11b)]]){_0x38a7d5['push'](ensureManagedSymlink(resolve(_0x4e68ae,_0x25482d),_0x56936a['dir'],_0x5d9eb5[_0x286f1e(0x133)]));}}return _0x38a7d5;}export function pruneStaleRuntimeSkillLinks(_0x242b43,_0x5b8e79,_0x3e0af6={},_0x1b13f0){const _0x582b4d=a88_0xc817,_0x824554=resolveSkillSyncPaths(_0x3e0af6),_0x5f31f5=new Set([..._0x5b8e79][_0x582b4d(0x12a)](_0x415c0a=>_0x415c0a['trim']())[_0x582b4d(0x10a)](Boolean)),_0xe47149=_0x1b13f0?new Set([..._0x1b13f0][_0x582b4d(0x12a)](_0x1f995f=>_0x1f995f[_0x582b4d(0x11a)]())['filter'](Boolean)):undefined,_0x4c3b5f=[];for(const _0x37af94 of[_0x824554[_0x582b4d(0x124)],_0x824554[_0x582b4d(0x11b)]]){for(const _0x451d34 of managedAppSkillLinkPaths(_0x37af94,_0x242b43)){const _0x17b175=basename(_0x451d34)[_0x582b4d(0x110)]((_0x242b43+'--')['length']);if(_0xe47149&&!_0xe47149[_0x582b4d(0x131)](_0x17b175))continue;if(_0x5f31f5[_0x582b4d(0x131)](_0x17b175))continue;_0x4c3b5f[_0x582b4d(0x123)](removeManagedSkillLink(_0x451d34,_0x824554[_0x582b4d(0x133)]));}}return _0x4c3b5f;}export function pruneStaleRuntimeSkillCache(_0x525a00,_0x206153={}){const _0x1d66f5=a88_0xc817,_0x5b416c=new Set([..._0x525a00['activeSkillCodes']][_0x1d66f5(0x12a)](_0x531d31=>_0x531d31[_0x1d66f5(0x11a)]())[_0x1d66f5(0x10a)](Boolean)),_0x44afe1=_0x525a00[_0x1d66f5(0x135)]?new Set([..._0x525a00['pruneSkillCodes']][_0x1d66f5(0x12a)](_0x4a07cc=>_0x4a07cc['trim']())[_0x1d66f5(0x10a)](Boolean)):undefined,_0x20e07b=_0x525a00[_0x1d66f5(0x11e)]??[_0x1d66f5(0x130),_0x1d66f5(0x126)],_0x2f6737=resolve(getRuntimeSkillCacheRoot(_0x525a00[_0x1d66f5(0x12f)],_0x525a00[_0x1d66f5(0x12b)],_0x206153),safePathSegment(_0x525a00[_0x1d66f5(0x114)],_0x1d66f5(0x114))),_0x4766ae=[];for(const _0x52df4f of _0x20e07b){const _0x4ac728=resolve(_0x2f6737,_0x52df4f);if(!existsSync(_0x4ac728))continue;for(const _0x6324f6 of readdirSync(_0x4ac728,{'withFileTypes':!![]})){if(!_0x6324f6[_0x1d66f5(0x11d)]())continue;const _0x33d709=_0x6324f6[_0x1d66f5(0x121)];if(_0x44afe1&&!_0x44afe1[_0x1d66f5(0x131)](_0x33d709))continue;if(_0x5b416c['has'](_0x33d709))continue;const _0x1973bc=resolve(_0x4ac728,_0x33d709),_0xc97b7d=readMetadataIfPresent(resolve(_0x1973bc,METADATA_FILE));if(_0xc97b7d?.[_0x1d66f5(0x114)]!==_0x525a00[_0x1d66f5(0x114)]||_0xc97b7d[_0x1d66f5(0x116)]!==_0x52df4f||_0xc97b7d[_0x1d66f5(0x11c)]!==_0x33d709){_0x4766ae[_0x1d66f5(0x123)]({'path':_0x1973bc,'action':_0x1d66f5(0x113),'reason':_0x1d66f5(0x127)});continue;}removeSync(_0x1973bc),_0x4766ae['push']({'path':_0x1973bc,'action':'removed'});}}return _0x4766ae;}export function linkGlobalRuntimeSkills(_0x3fad6f,_0x5cd2e6={}){const _0xeff42b=a88_0xc817,_0x247adc=resolveSkillSyncPaths(_0x5cd2e6),_0x14c27a=[];for(const _0x1d4fb1 of _0x3fad6f){if(_0x1d4fb1['scope']!=='builtin')throw CliErrors[_0xeff42b(0x125)](_0xeff42b(0x10e)+_0x1d4fb1[_0xeff42b(0x116)]);const _0x30d7d1=requireSkillCode(_0x1d4fb1[_0xeff42b(0x119)]),_0x3ff1ba=copyManagedSkillDirectory(_0x1d4fb1[_0xeff42b(0x134)],resolve(_0x247adc[_0xeff42b(0x124)],_0x30d7d1));_0x14c27a[_0xeff42b(0x123)]({..._0x3ff1ba,'contentHash':_0x1d4fb1['contentHash']});}return _0x14c27a;}function ensureManagedSymlink(_0x1ca02e,_0x54fcae,_0x5ba448){const _0x12d74f=a88_0xc817;mkdirSync(dirname(_0x1ca02e),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1ca02e)||isDanglingSymlink(_0x1ca02e)){const _0x77dbca=lstatSync(_0x1ca02e);if(!_0x77dbca[_0x12d74f(0x12c)]())throw CliErrors[_0x12d74f(0x125)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x1ca02e);const _0x3fa0b2=resolveSymlinkTarget(_0x1ca02e);if(!isPathInside(realOrResolved(_0x3fa0b2),realOrResolved(_0x5ba448)))throw CliErrors[_0x12d74f(0x125)](_0x12d74f(0x120)+_0x1ca02e);if(realOrResolved(_0x3fa0b2)===realOrResolved(_0x54fcae))return{'path':_0x1ca02e,'target':_0x54fcae,'action':'unchanged'};return unlinkSync(_0x1ca02e),symlinkSync(_0x54fcae,_0x1ca02e,_0x12d74f(0x134)),{'path':_0x1ca02e,'target':_0x54fcae,'action':'updated'};}return symlinkSync(_0x54fcae,_0x1ca02e,_0x12d74f(0x134)),{'path':_0x1ca02e,'target':_0x54fcae,'action':_0x12d74f(0x10b)};}function a88_0x2f81(){const _0xe447a6=['get','filter','created','6zJODyW','6321186BlUCBZ','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','slice','6157460mbotXp','external-symlink','skipped','appCode','4168788oAusDP','scope','178491wHdKsV','1705092oxRbpJ','skill','trim','claudeSkillsDir','skillCode','isDirectory','scopes','updated','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','name','not-managed-symlink','push','agentsSkillsDir','validation','company','metadata-mismatch','7468285DNJbTw','contentHash','map','accessKey','isSymbolicLink','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','88OQhWAh','env','personal','has','startsWith','managedRoot','dir','pruneSkillCodes','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','removed','417907CfmLLp'];a88_0x2f81=function(){return _0xe447a6;};return a88_0x2f81();}function managedAppSkillLinkPaths(_0x4e16a2,_0x3ca35d){const _0x2d75e7=a88_0xc817;if(!existsSync(_0x4e16a2))return[];const _0x106f38=_0x3ca35d+'--';return readdirSync(_0x4e16a2,{'withFileTypes':!![]})[_0x2d75e7(0x10a)](_0x3cfff7=>_0x3cfff7[_0x2d75e7(0x121)][_0x2d75e7(0x132)](_0x106f38))['map'](_0x5283b9=>resolve(_0x4e16a2,_0x5283b9['name']));}function removeManagedSkillLink(_0x2c68ec,_0x5da194){const _0x431474=a88_0xc817,_0xeff0f8=lstatIfPresent(_0x2c68ec);if(!_0xeff0f8?.[_0x431474(0x12c)]())return{'path':_0x2c68ec,'action':_0x431474(0x113),'reason':_0x431474(0x122)};const _0x4c0ff9=resolveSymlinkTarget(_0x2c68ec);if(!isPathInside(realOrResolved(_0x4c0ff9),realOrResolved(_0x5da194)))return{'path':_0x2c68ec,'action':_0x431474(0x113),'reason':_0x431474(0x112)};return unlinkSync(_0x2c68ec),{'path':_0x2c68ec,'action':_0x431474(0x137)};}export function copyManagedSkillDirectory(_0x4ce827,_0x4d41e1){const _0x37cb1a=a88_0xc817,_0x24b60a=resolve(_0x4d41e1,METADATA_FILE),_0x1891ef=existsSync(_0x4d41e1);if(_0x1891ef){const _0x71fec3=lstatSync(_0x4d41e1);if(_0x71fec3['isSymbolicLink']())throw CliErrors[_0x37cb1a(0x125)](_0x37cb1a(0x136)+_0x4d41e1);if(!_0x71fec3[_0x37cb1a(0x11d)]())throw CliErrors[_0x37cb1a(0x125)](_0x37cb1a(0x10f)+_0x4d41e1);const _0x1549a3=readMetadataIfPresent(_0x24b60a);if(_0x1549a3?.[_0x37cb1a(0x116)]!=='builtin')throw CliErrors[_0x37cb1a(0x125)](_0x37cb1a(0x12d)+_0x4d41e1);}ensureDirSync(dirname(_0x4d41e1));const _0xab3b31=_0x1891ef?readMetadataIfPresent(_0x24b60a)?.[_0x37cb1a(0x129)]:undefined,_0xdc1b99=readMetadataIfPresent(resolve(_0x4ce827,METADATA_FILE))?.[_0x37cb1a(0x129)];return _0x1891ef&&removeSync(_0x4d41e1),copySkillDirectory(_0x4ce827,_0x4d41e1),{'path':_0x4d41e1,'target':_0x4ce827,'action':!_0x1891ef?'created':_0xab3b31===_0xdc1b99?'unchanged':_0x37cb1a(0x11f)};}function copySkillDirectory(_0x577ce0,_0x4f553d){copySync(_0x577ce0,_0x4f553d,{'dereference':![],'overwrite':!![],'filter'(_0xdc08ea){const _0x4ae2bf=a88_0xc817;if(lstatSync(_0xdc08ea)['isSymbolicLink']())throw CliErrors[_0x4ae2bf(0x125)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0xdc08ea);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x4511b1,_0x517abf){const _0x84d79a=a89_0x43ff,_0x519f2f=_0x4511b1();while(!![]){try{const _0x20be8f=parseInt(_0x84d79a(0x91))/0x1*(parseInt(_0x84d79a(0x9e))/0x2)+parseInt(_0x84d79a(0x9f))/0x3*(parseInt(_0x84d79a(0x94))/0x4)+parseInt(_0x84d79a(0x7e))/0x5*(parseInt(_0x84d79a(0x9c))/0x6)+parseInt(_0x84d79a(0x96))/0x7+-parseInt(_0x84d79a(0x9a))/0x8+-parseInt(_0x84d79a(0x79))/0x9+parseInt(_0x84d79a(0x98))/0xa;if(_0x20be8f===_0x517abf)break;else _0x519f2f['push'](_0x519f2f['shift']());}catch(_0x1e2400){_0x519f2f['push'](_0x519f2f['shift']());}}}(a89_0x289c,0x51368));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a89_0x289c(){const _0x31307b=['name','map','cache','4bAjRXy','tags','isSymbolicLink','451148LuBctG','scope','372799oNtFaP','values','5873780aZlmOL','claudeSkillsDir','3531712RsEjju','linkedPaths','6102ovZIBr','push','97346yTPHlA','3arydFw','local','get','dir','4412601tvqktH','has','includes','builtin','appCode','1555HsvOCB','scopes','from','accessKey','filter','trim','sort','link','source','skillCode','set','cacheDir','code','localeCompare','linkedPath','env'];a89_0x289c=function(){return _0x31307b;};return a89_0x289c();}function a89_0x43ff(_0x543451,_0x24e855){_0x543451=_0x543451-0x79;const _0x289cd7=a89_0x289c();let _0x43ff73=_0x289cd7[_0x543451];return _0x43ff73;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x321340,_0x14b0c9={}){const _0x24ec99=a89_0x43ff,_0x417275=safePathSegment(_0x321340[_0x24ec99(0x7d)],_0x24ec99(0x7d)),_0x444f9c=normalizeRuntimeSkillScopes(_0x321340[_0x24ec99(0x7f)]),_0x65c349=new Set(_0x444f9c),_0x52778c=_0x321340[_0x24ec99(0x8a)]?.[_0x24ec99(0x83)](),_0x5ed618=new Map(),_0x5f2108=resolve(getRuntimeSkillCacheRoot(_0x321340[_0x24ec99(0x8d)],_0x321340[_0x24ec99(0x81)],_0x14b0c9),_0x417275);for(const _0x38062d of _0x444f9c){for(const _0x5f1264 of localSkillEntryDirs(resolve(_0x5f2108,_0x38062d))){collectLocalRuntimeSkill(_0x5ed618,_0x5f1264,{'appCode':_0x417275,'scopes':_0x65c349,'code':_0x52778c,'source':_0x24ec99(0x90)});}}const _0x569054=resolveSkillSyncPaths(_0x14b0c9);for(const _0x5cc82b of[_0x569054['agentsSkillsDir'],_0x569054[_0x24ec99(0x99)]]){for(const _0x4cc093 of localSkillLinkCandidates(_0x5cc82b,_0x417275,_0x65c349)){collectLocalRuntimeSkill(_0x5ed618,_0x4cc093,{'appCode':_0x417275,'scopes':_0x65c349,'code':_0x52778c,'source':_0x24ec99(0x85),'linkedPath':_0x4cc093});}}return Array[_0x24ec99(0x80)](_0x5ed618[_0x24ec99(0x97)]())[_0x24ec99(0x84)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x20cb65){const _0x3e5333=a89_0x43ff;if(!existsSync(_0x20cb65))return[];return readdirSync(_0x20cb65,{'withFileTypes':!![]})[_0x3e5333(0x82)](_0x167396=>_0x167396['isDirectory']()||_0x167396[_0x3e5333(0x93)]())[_0x3e5333(0x8f)](_0xd8616e=>resolve(_0x20cb65,_0xd8616e[_0x3e5333(0x8e)]));}function localSkillLinkCandidates(_0x4fbbdd,_0x5b73e5,_0x966c5e){const _0x52f520=a89_0x43ff;if(!existsSync(_0x4fbbdd))return[];const _0x363627=_0x5b73e5+'--';return readdirSync(_0x4fbbdd,{'withFileTypes':!![]})[_0x52f520(0x82)](_0x33ff8c=>_0x33ff8c['isDirectory']()||_0x33ff8c[_0x52f520(0x93)]())[_0x52f520(0x82)](_0x4c5ec0=>_0x4c5ec0['name']['startsWith'](_0x363627)||_0x966c5e[_0x52f520(0x7a)](_0x52f520(0x7c)))[_0x52f520(0x8f)](_0x255aa6=>resolve(_0x4fbbdd,_0x255aa6[_0x52f520(0x8e)]));}function collectLocalRuntimeSkill(_0x2ace37,_0x434011,_0x31bba9){const _0x25cc84=a89_0x43ff,_0x66858e=resolve(_0x434011,METADATA_FILE),_0xef8970=readMetadataIfPresent(_0x66858e);if(!_0xef8970)return;if(_0xef8970[_0x25cc84(0x7d)]!==_0x31bba9[_0x25cc84(0x7d)])return;if(!isRuntimeSkillScope(_0xef8970[_0x25cc84(0x95)])||!_0x31bba9[_0x25cc84(0x7f)][_0x25cc84(0x7a)](_0xef8970['scope']))return;const _0x481449=_0xef8970[_0x25cc84(0x87)]?.[_0x25cc84(0x83)]();if(!_0x481449)return;if(_0x31bba9['code']&&_0x481449!==_0x31bba9[_0x25cc84(0x8a)])return;const _0x4a225b=_0xef8970[_0x25cc84(0x95)]+':'+_0x481449,_0x45ddb8=_0x31bba9[_0x25cc84(0x8c)]?[_0x31bba9[_0x25cc84(0x8c)]]:[],_0x13bc95=_0x2ace37[_0x25cc84(0xa1)](_0x4a225b);if(_0x13bc95){_0x31bba9[_0x25cc84(0x86)]===_0x25cc84(0x90)&&(_0x13bc95[_0x25cc84(0xa2)]=_0x434011,_0x13bc95[_0x25cc84(0x89)]=_0x434011,_0x13bc95['skillMdPath']=resolve(_0x434011,SKILL_FILE),_0x13bc95['metadataPath']=_0x66858e);for(const _0x45325d of _0x45ddb8){!_0x13bc95['linkedPaths'][_0x25cc84(0x7b)](_0x45325d)&&_0x13bc95['linkedPaths'][_0x25cc84(0x9d)](_0x45325d);}_0x13bc95[_0x25cc84(0x9b)][_0x25cc84(0x84)]();return;}_0x2ace37[_0x25cc84(0x88)](_0x4a225b,{..._0xef8970,'tags':Array['isArray'](_0xef8970[_0x25cc84(0x92)])?_0xef8970[_0x25cc84(0x92)]:[],'scope':_0xef8970[_0x25cc84(0x95)],'source':_0x25cc84(0xa0),'dir':_0x434011,'cacheDir':_0x31bba9[_0x25cc84(0x86)]===_0x25cc84(0x90)?_0x434011:undefined,'skillMdPath':resolve(_0x434011,SKILL_FILE),'metadataPath':_0x66858e,'linkedPaths':_0x45ddb8});}function compareLocalRuntimeSkills(_0x4d4330,_0x1acbb9){const _0x100c25=a89_0x43ff,_0x39cabb={'personal':0x0,'company':0x1,'builtin':0x2};return _0x39cabb[_0x4d4330[_0x100c25(0x95)]]-_0x39cabb[_0x1acbb9['scope']]||_0x4d4330[_0x100c25(0x87)][_0x100c25(0x8b)](_0x1acbb9[_0x100c25(0x87)])||_0x4d4330['dir'][_0x100c25(0x8b)](_0x1acbb9[_0x100c25(0xa2)]);}
1
+ (function(_0x3b8958,_0x5e9c09){const _0xce16f7=a89_0x2f8e,_0x55870e=_0x3b8958();while(!![]){try{const _0x596859=parseInt(_0xce16f7(0x149))/0x1*(-parseInt(_0xce16f7(0x161))/0x2)+-parseInt(_0xce16f7(0x15a))/0x3*(parseInt(_0xce16f7(0x15b))/0x4)+parseInt(_0xce16f7(0x172))/0x5+parseInt(_0xce16f7(0x156))/0x6*(parseInt(_0xce16f7(0x14d))/0x7)+parseInt(_0xce16f7(0x15c))/0x8+parseInt(_0xce16f7(0x16e))/0x9+parseInt(_0xce16f7(0x166))/0xa*(parseInt(_0xce16f7(0x16a))/0xb);if(_0x596859===_0x5e9c09)break;else _0x55870e['push'](_0x55870e['shift']());}catch(_0xb891c){_0x55870e['push'](_0x55870e['shift']());}}}(a89_0x5aae,0x9fc1a));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a89_0x5aae(){const _0x208d34=['code','filter','localeCompare','998627tFdCvs','scopes','appCode','skillMdPath','has','link','name','isSymbolicLink','linkedPaths','6hrWoCv','scope','dir','metadataPath','579fEwfKY','2944gnbCQZ','7615240VMwZEc','set','skillCode','agentsSkillsDir','tags','2pqMVNH','linkedPath','push','cacheDir','local','30BFLXxr','map','includes','source','185141lHCTvT','cache','values','builtin','1074708KLUbzt','trim','startsWith','sort','1495840CmGkAv','767229ETbqFu'];a89_0x5aae=function(){return _0x208d34;};return a89_0x5aae();}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x310218,_0x12858e={}){const _0x2fd908=a89_0x2f8e,_0x10f459=safePathSegment(_0x310218[_0x2fd908(0x14f)],_0x2fd908(0x14f)),_0x367584=normalizeRuntimeSkillScopes(_0x310218[_0x2fd908(0x14e)]),_0x19ab75=new Set(_0x367584),_0x25412c=_0x310218[_0x2fd908(0x14a)]?.['trim'](),_0x24d07b=new Map(),_0x32bbc9=resolve(getRuntimeSkillCacheRoot(_0x310218['env'],_0x310218['accessKey'],_0x12858e),_0x10f459);for(const _0x2419d1 of _0x367584){for(const _0x4cdbb6 of localSkillEntryDirs(resolve(_0x32bbc9,_0x2419d1))){collectLocalRuntimeSkill(_0x24d07b,_0x4cdbb6,{'appCode':_0x10f459,'scopes':_0x19ab75,'code':_0x25412c,'source':_0x2fd908(0x16b)});}}const _0x4060b6=resolveSkillSyncPaths(_0x12858e);for(const _0x78c7a of[_0x4060b6[_0x2fd908(0x15f)],_0x4060b6['claudeSkillsDir']]){for(const _0x1b5176 of localSkillLinkCandidates(_0x78c7a,_0x10f459,_0x19ab75)){collectLocalRuntimeSkill(_0x24d07b,_0x1b5176,{'appCode':_0x10f459,'scopes':_0x19ab75,'code':_0x25412c,'source':_0x2fd908(0x152),'linkedPath':_0x1b5176});}}return Array['from'](_0x24d07b[_0x2fd908(0x16c)]())[_0x2fd908(0x171)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x541cc9){const _0x241efc=a89_0x2f8e;if(!existsSync(_0x541cc9))return[];return readdirSync(_0x541cc9,{'withFileTypes':!![]})[_0x241efc(0x14b)](_0x1bb0c7=>_0x1bb0c7['isDirectory']()||_0x1bb0c7[_0x241efc(0x154)]())[_0x241efc(0x167)](_0x50a68e=>resolve(_0x541cc9,_0x50a68e[_0x241efc(0x153)]));}function localSkillLinkCandidates(_0x386d4a,_0x22a331,_0xd78bce){const _0x32514d=a89_0x2f8e;if(!existsSync(_0x386d4a))return[];const _0x3352f4=_0x22a331+'--';return readdirSync(_0x386d4a,{'withFileTypes':!![]})[_0x32514d(0x14b)](_0x2ee981=>_0x2ee981['isDirectory']()||_0x2ee981[_0x32514d(0x154)]())[_0x32514d(0x14b)](_0x783595=>_0x783595[_0x32514d(0x153)][_0x32514d(0x170)](_0x3352f4)||_0xd78bce[_0x32514d(0x151)](_0x32514d(0x16d)))['map'](_0x4a0ca0=>resolve(_0x386d4a,_0x4a0ca0[_0x32514d(0x153)]));}function a89_0x2f8e(_0x1390b1,_0x37a161){_0x1390b1=_0x1390b1-0x149;const _0x5aae2c=a89_0x5aae();let _0x2f8eb9=_0x5aae2c[_0x1390b1];return _0x2f8eb9;}function collectLocalRuntimeSkill(_0xfc81e8,_0x5c6b3e,_0x389925){const _0x480ef8=a89_0x2f8e,_0x16198f=resolve(_0x5c6b3e,METADATA_FILE),_0x4e6850=readMetadataIfPresent(_0x16198f);if(!_0x4e6850)return;if(_0x4e6850['appCode']!==_0x389925[_0x480ef8(0x14f)])return;if(!isRuntimeSkillScope(_0x4e6850[_0x480ef8(0x157)])||!_0x389925['scopes']['has'](_0x4e6850[_0x480ef8(0x157)]))return;const _0x23b343=_0x4e6850['skillCode']?.[_0x480ef8(0x16f)]();if(!_0x23b343)return;if(_0x389925['code']&&_0x23b343!==_0x389925[_0x480ef8(0x14a)])return;const _0x28ef6b=_0x4e6850['scope']+':'+_0x23b343,_0x30069b=_0x389925['linkedPath']?[_0x389925[_0x480ef8(0x162)]]:[],_0x181151=_0xfc81e8['get'](_0x28ef6b);if(_0x181151){_0x389925[_0x480ef8(0x169)]===_0x480ef8(0x16b)&&(_0x181151['dir']=_0x5c6b3e,_0x181151[_0x480ef8(0x164)]=_0x5c6b3e,_0x181151[_0x480ef8(0x150)]=resolve(_0x5c6b3e,SKILL_FILE),_0x181151[_0x480ef8(0x159)]=_0x16198f);for(const _0x2f94b8 of _0x30069b){!_0x181151[_0x480ef8(0x155)][_0x480ef8(0x168)](_0x2f94b8)&&_0x181151[_0x480ef8(0x155)][_0x480ef8(0x163)](_0x2f94b8);}_0x181151[_0x480ef8(0x155)][_0x480ef8(0x171)]();return;}_0xfc81e8[_0x480ef8(0x15d)](_0x28ef6b,{..._0x4e6850,'tags':Array['isArray'](_0x4e6850[_0x480ef8(0x160)])?_0x4e6850[_0x480ef8(0x160)]:[],'scope':_0x4e6850[_0x480ef8(0x157)],'source':_0x480ef8(0x165),'dir':_0x5c6b3e,'cacheDir':_0x389925[_0x480ef8(0x169)]===_0x480ef8(0x16b)?_0x5c6b3e:undefined,'skillMdPath':resolve(_0x5c6b3e,SKILL_FILE),'metadataPath':_0x16198f,'linkedPaths':_0x30069b});}function compareLocalRuntimeSkills(_0x44ca35,_0xab4ebc){const _0x58a1d8=a89_0x2f8e,_0x318be2={'personal':0x0,'company':0x1,'builtin':0x2};return _0x318be2[_0x44ca35[_0x58a1d8(0x157)]]-_0x318be2[_0xab4ebc[_0x58a1d8(0x157)]]||_0x44ca35[_0x58a1d8(0x15e)][_0x58a1d8(0x14c)](_0xab4ebc[_0x58a1d8(0x15e)])||_0x44ca35[_0x58a1d8(0x158)]['localeCompare'](_0xab4ebc[_0x58a1d8(0x158)]);}
@@ -1 +1 @@
1
- (function(_0x47a134,_0x2e2fb6){const _0x196031=a90_0x4298,_0x2d06a6=_0x47a134();while(!![]){try{const _0x56c319=parseInt(_0x196031(0x1f1))/0x1*(parseInt(_0x196031(0x203))/0x2)+parseInt(_0x196031(0x1db))/0x3*(-parseInt(_0x196031(0x1e0))/0x4)+-parseInt(_0x196031(0x1f4))/0x5+parseInt(_0x196031(0x201))/0x6+parseInt(_0x196031(0x202))/0x7*(parseInt(_0x196031(0x1ef))/0x8)+parseInt(_0x196031(0x1e2))/0x9+-parseInt(_0x196031(0x1e1))/0xa;if(_0x56c319===_0x2e2fb6)break;else _0x2d06a6['push'](_0x2d06a6['shift']());}catch(_0x234481){_0x2d06a6['push'](_0x2d06a6['shift']());}}}(a90_0xe766,0x83655));function a90_0xe766(){const _0x1f0877=['Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','431775btbqqG','path','push','isBuffer','validation','from','toLowerCase','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','object','values','sort','isArray','size','1752012oznCTy','7jtdnRK','30uiklPq','content','name','isSafeInteger','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','toString','compare','6375nHSrzg','localeCompare','Duplicate\x20Skill\x20file\x20path:\x20','utf8','Unsafe\x20Skill\x20file\x20path:\x20','536WpbksY','6515500HzAACY','3697029BemINc','Skill\x20file\x20exceeds\x20size\x20limit:\x20','has','bytes','replace','isFile','includes','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','Skill\x20file\x20size\x20is\x20invalid:\x20','set','sha256','string','Skill\x20file\x20sha256\x20is\x20invalid:\x20','1389912TutZdA','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','45622BITCmN','isDirectory'];a90_0xe766=function(){return _0x1f0877;};return a90_0xe766();}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,MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_TOTAL_BYTES,SKILL_FILE}from'./constants.js';export function fileContent(_0x36a55e){const _0xe3386e=a90_0x4298;return _0x36a55e[_0xe3386e(0x1e5)]??Buffer[_0xe3386e(0x1f9)](_0x36a55e[_0xe3386e(0x204)]??'',_0xe3386e(0x1de));}function a90_0x4298(_0x287aff,_0x225f2b){_0x287aff=_0x287aff-0x1d8;const _0xe76698=a90_0xe766();let _0x42987e=_0xe76698[_0x287aff];return _0x42987e;}export function fileText(_0x39dd29){const _0x16d6ad=a90_0x4298;return fileContent(_0x39dd29)[_0x16d6ad(0x1d9)](_0x16d6ad(0x1de));}export function normalizeLocalFiles(_0x3c6165){const _0x5f322e=a90_0x4298;if(!Array['isArray'](_0x3c6165)||_0x3c6165[_0x5f322e(0x1d8)]===0x0)return[];if(_0x3c6165[_0x5f322e(0x1d8)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5f322e(0x1f8)](_0x5f322e(0x1e9));const _0xaa98f4=new Map();let _0x4b6fab=0x0;for(const _0x69a236 of _0x3c6165){if(!_0x69a236||typeof _0x69a236!==_0x5f322e(0x1fc)||typeof _0x69a236['path']!==_0x5f322e(0x1ed))throw CliErrors[_0x5f322e(0x1f8)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2299ee=normalizeSkillRelativePath(_0x69a236['path']);if(_0xaa98f4[_0x5f322e(0x1e4)](_0x2299ee))throw CliErrors[_0x5f322e(0x1f8)](_0x5f322e(0x1dd)+_0x2299ee);if(_0x69a236['bytes']!==undefined&&!Buffer[_0x5f322e(0x1f7)](_0x69a236[_0x5f322e(0x1e5)]))throw CliErrors[_0x5f322e(0x1f8)](_0x5f322e(0x1f0)+_0x2299ee);if(_0x69a236[_0x5f322e(0x1e5)]===undefined&&typeof _0x69a236[_0x5f322e(0x204)]!==_0x5f322e(0x1ed))throw CliErrors[_0x5f322e(0x1f8)](_0x5f322e(0x207)+_0x2299ee);const _0x4053e0=fileContent(_0x69a236),_0x9c0648=_0x4053e0['length'];if(_0x9c0648>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x5f322e(0x1e3)+_0x2299ee);_0x4b6fab+=_0x9c0648;if(_0x4b6fab>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation']('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0xaa98f4[_0x5f322e(0x1eb)](_0x2299ee,{'path':_0x2299ee,'bytes':_0x4053e0});}return Array[_0x5f322e(0x1f9)](_0xaa98f4[_0x5f322e(0x1fd)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3b9bd3){const _0x479c31=a90_0x4298;if(!Array[_0x479c31(0x1ff)](_0x3b9bd3)||_0x3b9bd3[_0x479c31(0x1d8)]===0x0)return[];if(_0x3b9bd3['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x479c31(0x1f8)](_0x479c31(0x1e9));const _0x6de7e0=new Map();let _0x2822fb=0x0;for(const _0x35e4b2 of _0x3b9bd3){if(!_0x35e4b2||typeof _0x35e4b2!==_0x479c31(0x1fc)||typeof _0x35e4b2[_0x479c31(0x1f5)]!==_0x479c31(0x1ed))throw CliErrors[_0x479c31(0x1f8)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x3cc710=normalizeSkillRelativePath(_0x35e4b2[_0x479c31(0x1f5)]);if(_0x6de7e0[_0x479c31(0x1e4)](_0x3cc710))throw CliErrors['validation'](_0x479c31(0x1dd)+_0x3cc710);if(!isSha256Hex(_0x35e4b2[_0x479c31(0x1ec)]))throw CliErrors['validation'](_0x479c31(0x1ee)+_0x3cc710);if(!Number[_0x479c31(0x206)](_0x35e4b2['size'])||_0x35e4b2[_0x479c31(0x200)]<0x0)throw CliErrors[_0x479c31(0x1f8)](_0x479c31(0x1ea)+_0x3cc710);if(_0x35e4b2[_0x479c31(0x200)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x479c31(0x1f8)](_0x479c31(0x1e3)+_0x3cc710);_0x2822fb+=_0x35e4b2[_0x479c31(0x200)];if(_0x2822fb>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x479c31(0x1f8)](_0x479c31(0x1fb));_0x6de7e0[_0x479c31(0x1eb)](_0x3cc710,{'path':_0x3cc710,'sha256':_0x35e4b2['sha256'][_0x479c31(0x1fa)](),'size':_0x35e4b2[_0x479c31(0x200)]});}return Array[_0x479c31(0x1f9)](_0x6de7e0[_0x479c31(0x1fd)]())[_0x479c31(0x1fe)](compareSkillFiles);}export function scanSkillDirectory(_0x1c9650){const _0x44a557=realpathSync(_0x1c9650),_0x3bec42=[];let _0x3c0222=0x0;function _0x2e216c(_0x1f2c64){const _0x55d672=a90_0x4298,_0x4bd2a3=readdirSync(_0x1f2c64,{'withFileTypes':!![]})[_0x55d672(0x1fe)]((_0x59081b,_0x51b2e0)=>_0x59081b[_0x55d672(0x205)][_0x55d672(0x1dc)](_0x51b2e0[_0x55d672(0x205)]));for(const _0x15e30b of _0x4bd2a3){if(_0x15e30b['isDirectory']()&&IGNORED_DIR_NAMES[_0x55d672(0x1e4)](_0x15e30b['name']))continue;if(IGNORED_FILE_NAMES[_0x55d672(0x1e4)](_0x15e30b[_0x55d672(0x205)]))continue;const _0x452f08=resolve(_0x1f2c64,_0x15e30b[_0x55d672(0x205)]);if(_0x15e30b['isSymbolicLink']())throw CliErrors[_0x55d672(0x1f8)](_0x55d672(0x1f3)+_0x452f08);const _0x2178db=toPosixPath(relative(_0x44a557,_0x452f08));if(_0x15e30b[_0x55d672(0x1f2)]()){_0x2e216c(_0x452f08);continue;}if(!_0x15e30b[_0x55d672(0x1e7)]())continue;validateSkillRelativePath(_0x2178db);const _0x4d4064=readFileSync(_0x452f08);if(_0x4d4064['length']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x55d672(0x1f8)]('Skill\x20file\x20exceeds\x20size\x20limit:\x20'+_0x2178db);_0x3c0222+=_0x4d4064['length'];if(_0x3c0222>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x55d672(0x1f8)](_0x55d672(0x1fb));_0x3bec42[_0x55d672(0x1f6)]({'path':_0x2178db,'bytes':_0x4d4064});if(_0x3bec42['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x55d672(0x1f8)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');}}return _0x2e216c(_0x44a557),normalizeLocalFiles(_0x3bec42);}export function compareSkillFiles(_0x2ea785,_0x47731d){const _0x31ba2a=a90_0x4298;if(_0x2ea785[_0x31ba2a(0x1f5)]===SKILL_FILE)return _0x47731d[_0x31ba2a(0x1f5)]===SKILL_FILE?0x0:-0x1;if(_0x47731d[_0x31ba2a(0x1f5)]===SKILL_FILE)return 0x1;return Buffer[_0x31ba2a(0x1da)](Buffer['from'](_0x2ea785[_0x31ba2a(0x1f5)],_0x31ba2a(0x1de)),Buffer['from'](_0x47731d[_0x31ba2a(0x1f5)],_0x31ba2a(0x1de)));}export function normalizeSkillRelativePath(_0x284472){const _0x28d3b8=toPosixPath(_0x284472['trim']());return validateSkillRelativePath(_0x28d3b8),_0x28d3b8;}export function validateSkillRelativePath(_0x47d190){const _0x4e3250=a90_0x4298;if(!_0x47d190||_0x47d190['startsWith']('/')||_0x47d190[_0x4e3250(0x1e8)]('//'))throw CliErrors[_0x4e3250(0x1f8)](_0x4e3250(0x1df)+_0x47d190);for(const _0x3e0957 of _0x47d190['split']('/')){if(!_0x3e0957||_0x3e0957==='.'||_0x3e0957==='..')throw CliErrors['validation'](_0x4e3250(0x1df)+_0x47d190);}}export function toPosixPath(_0x2a97bf){const _0x1ed19e=a90_0x4298;return _0x2a97bf[_0x1ed19e(0x1e6)](/\\/g,'/');}export function isSha256Hex(_0x3cefcc){const _0x2b9df5=a90_0x4298;return typeof _0x3cefcc===_0x2b9df5(0x1ed)&&/^[a-fA-F0-9]{64}$/['test'](_0x3cefcc);}
1
+ (function(_0x38a071,_0x4bb6ae){const _0xafcd28=a90_0x3d02,_0x2f7295=_0x38a071();while(!![]){try{const _0x34d65b=parseInt(_0xafcd28(0x1d9))/0x1+parseInt(_0xafcd28(0x1ca))/0x2+-parseInt(_0xafcd28(0x1f4))/0x3*(parseInt(_0xafcd28(0x1e0))/0x4)+-parseInt(_0xafcd28(0x1f8))/0x5*(-parseInt(_0xafcd28(0x1e6))/0x6)+parseInt(_0xafcd28(0x1d0))/0x7+parseInt(_0xafcd28(0x1cd))/0x8*(-parseInt(_0xafcd28(0x1f7))/0x9)+parseInt(_0xafcd28(0x1ce))/0xa*(-parseInt(_0xafcd28(0x1f6))/0xb);if(_0x34d65b===_0x4bb6ae)break;else _0x2f7295['push'](_0x2f7295['shift']());}catch(_0x2f1374){_0x2f7295['push'](_0x2f7295['shift']());}}}(a90_0x5452,0x2e81e));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,MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_TOTAL_BYTES,SKILL_FILE}from'./constants.js';export function fileContent(_0x38f03e){const _0x342606=a90_0x3d02;return _0x38f03e[_0x342606(0x1cc)]??Buffer[_0x342606(0x1f5)](_0x38f03e[_0x342606(0x1dc)]??'',_0x342606(0x1d5));}export function fileText(_0x39a15d){const _0x2e682e=a90_0x3d02;return fileContent(_0x39a15d)[_0x2e682e(0x1d7)](_0x2e682e(0x1d5));}function a90_0x3d02(_0x48b1b5,_0x194a30){_0x48b1b5=_0x48b1b5-0x1c9;const _0x545270=a90_0x5452();let _0x3d02ea=_0x545270[_0x48b1b5];return _0x3d02ea;}export function normalizeLocalFiles(_0x1a6dea){const _0x2b2a01=a90_0x3d02;if(!Array[_0x2b2a01(0x1ee)](_0x1a6dea)||_0x1a6dea[_0x2b2a01(0x1ef)]===0x0)return[];if(_0x1a6dea[_0x2b2a01(0x1ef)]>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0x2b2a01(0x1ed));const _0x23ad32=new Map();let _0x36cda3=0x0;for(const _0x3a6369 of _0x1a6dea){if(!_0x3a6369||typeof _0x3a6369!=='object'||typeof _0x3a6369[_0x2b2a01(0x1e3)]!==_0x2b2a01(0x1ea))throw CliErrors[_0x2b2a01(0x1d8)](_0x2b2a01(0x1d1));const _0x26f24d=normalizeSkillRelativePath(_0x3a6369['path']);if(_0x23ad32[_0x2b2a01(0x1db)](_0x26f24d))throw CliErrors['validation'](_0x2b2a01(0x1d3)+_0x26f24d);if(_0x3a6369[_0x2b2a01(0x1cc)]!==undefined&&!Buffer[_0x2b2a01(0x1ec)](_0x3a6369['bytes']))throw CliErrors[_0x2b2a01(0x1d8)](_0x2b2a01(0x1e7)+_0x26f24d);if(_0x3a6369[_0x2b2a01(0x1cc)]===undefined&&typeof _0x3a6369[_0x2b2a01(0x1dc)]!==_0x2b2a01(0x1ea))throw CliErrors[_0x2b2a01(0x1d8)](_0x2b2a01(0x1cf)+_0x26f24d);const _0x411940=fileContent(_0x3a6369),_0x111317=_0x411940[_0x2b2a01(0x1ef)];if(_0x111317>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x2b2a01(0x1d8)](_0x2b2a01(0x1d4)+_0x26f24d);_0x36cda3+=_0x111317;if(_0x36cda3>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x2b2a01(0x1d8)](_0x2b2a01(0x1f0));_0x23ad32[_0x2b2a01(0x1d2)](_0x26f24d,{'path':_0x26f24d,'bytes':_0x411940});}return Array[_0x2b2a01(0x1f5)](_0x23ad32['values']())[_0x2b2a01(0x1d6)](compareSkillFiles);}export function normalizeManifestFiles(_0x50dffc){const _0x3a2c51=a90_0x3d02;if(!Array[_0x3a2c51(0x1ee)](_0x50dffc)||_0x50dffc[_0x3a2c51(0x1ef)]===0x0)return[];if(_0x50dffc[_0x3a2c51(0x1ef)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x3a2c51(0x1d8)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');const _0x4a01a3=new Map();let _0x4c1906=0x0;for(const _0x44bfc6 of _0x50dffc){if(!_0x44bfc6||typeof _0x44bfc6!==_0x3a2c51(0x1f2)||typeof _0x44bfc6[_0x3a2c51(0x1e3)]!==_0x3a2c51(0x1ea))throw CliErrors[_0x3a2c51(0x1d8)](_0x3a2c51(0x1d1));const _0x225c89=normalizeSkillRelativePath(_0x44bfc6['path']);if(_0x4a01a3['has'](_0x225c89))throw CliErrors[_0x3a2c51(0x1d8)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x225c89);if(!isSha256Hex(_0x44bfc6['sha256']))throw CliErrors['validation'](_0x3a2c51(0x1e8)+_0x225c89);if(!Number['isSafeInteger'](_0x44bfc6['size'])||_0x44bfc6[_0x3a2c51(0x1da)]<0x0)throw CliErrors[_0x3a2c51(0x1d8)](_0x3a2c51(0x1e9)+_0x225c89);if(_0x44bfc6[_0x3a2c51(0x1da)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x3a2c51(0x1d8)](_0x3a2c51(0x1d4)+_0x225c89);_0x4c1906+=_0x44bfc6[_0x3a2c51(0x1da)];if(_0x4c1906>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x3a2c51(0x1d8)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x4a01a3[_0x3a2c51(0x1d2)](_0x225c89,{'path':_0x225c89,'sha256':_0x44bfc6[_0x3a2c51(0x1e4)][_0x3a2c51(0x1e1)](),'size':_0x44bfc6['size']});}return Array[_0x3a2c51(0x1f5)](_0x4a01a3['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x464fb1){const _0x211cb7=realpathSync(_0x464fb1),_0x2036c2=[];let _0x2a3d01=0x0;function _0x49a4c4(_0x54888a){const _0x14b909=a90_0x3d02,_0x2901b0=readdirSync(_0x54888a,{'withFileTypes':!![]})[_0x14b909(0x1d6)]((_0x11a767,_0x1863d7)=>_0x11a767[_0x14b909(0x1dd)]['localeCompare'](_0x1863d7[_0x14b909(0x1dd)]));for(const _0x537000 of _0x2901b0){if(_0x537000[_0x14b909(0x1f1)]()&&IGNORED_DIR_NAMES['has'](_0x537000[_0x14b909(0x1dd)]))continue;if(IGNORED_FILE_NAMES[_0x14b909(0x1db)](_0x537000[_0x14b909(0x1dd)]))continue;const _0x4310cd=resolve(_0x54888a,_0x537000['name']);if(_0x537000[_0x14b909(0x1c9)]())throw CliErrors[_0x14b909(0x1d8)](_0x14b909(0x1de)+_0x4310cd);const _0x54a4a5=toPosixPath(relative(_0x211cb7,_0x4310cd));if(_0x537000['isDirectory']()){_0x49a4c4(_0x4310cd);continue;}if(!_0x537000[_0x14b909(0x1df)]())continue;validateSkillRelativePath(_0x54a4a5);const _0x32a4e8=readFileSync(_0x4310cd);if(_0x32a4e8[_0x14b909(0x1ef)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x14b909(0x1d8)](_0x14b909(0x1d4)+_0x54a4a5);_0x2a3d01+=_0x32a4e8['length'];if(_0x2a3d01>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x14b909(0x1d8)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x2036c2['push']({'path':_0x54a4a5,'bytes':_0x32a4e8});if(_0x2036c2[_0x14b909(0x1ef)]>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0x14b909(0x1ed));}}return _0x49a4c4(_0x211cb7),normalizeLocalFiles(_0x2036c2);}export function compareSkillFiles(_0x30f878,_0xf615b5){const _0x2140dd=a90_0x3d02;if(_0x30f878['path']===SKILL_FILE)return _0xf615b5['path']===SKILL_FILE?0x0:-0x1;if(_0xf615b5[_0x2140dd(0x1e3)]===SKILL_FILE)return 0x1;return Buffer[_0x2140dd(0x1e2)](Buffer[_0x2140dd(0x1f5)](_0x30f878[_0x2140dd(0x1e3)],_0x2140dd(0x1d5)),Buffer[_0x2140dd(0x1f5)](_0xf615b5['path'],_0x2140dd(0x1d5)));}function a90_0x5452(){const _0x43564c=['12344MqGklb','1170hQRoIN','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','692671ldADKS','Skill\x20file\x20path\x20must\x20be\x20text.','set','Duplicate\x20Skill\x20file\x20path:\x20','Skill\x20file\x20exceeds\x20size\x20limit:\x20','utf8','sort','toString','validation','368657YqaqPO','size','has','content','name','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','isFile','180IUYqsS','toLowerCase','compare','path','sha256','Unsafe\x20Skill\x20file\x20path:\x20','66PjiYNm','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','string','trim','isBuffer','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','isArray','length','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','isDirectory','object','replace','16098tGocdg','from','33913VEhHPg','459qzBDdV','155035dxXeWE','isSymbolicLink','125362ncDQeP','test','bytes'];a90_0x5452=function(){return _0x43564c;};return a90_0x5452();}export function normalizeSkillRelativePath(_0x468640){const _0xf00388=a90_0x3d02,_0x603ef1=toPosixPath(_0x468640[_0xf00388(0x1eb)]());return validateSkillRelativePath(_0x603ef1),_0x603ef1;}export function validateSkillRelativePath(_0x1ed3cc){const _0x55a8ac=a90_0x3d02;if(!_0x1ed3cc||_0x1ed3cc['startsWith']('/')||_0x1ed3cc['includes']('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x1ed3cc);for(const _0x32706a of _0x1ed3cc['split']('/')){if(!_0x32706a||_0x32706a==='.'||_0x32706a==='..')throw CliErrors[_0x55a8ac(0x1d8)](_0x55a8ac(0x1e5)+_0x1ed3cc);}}export function toPosixPath(_0x331658){const _0x876f80=a90_0x3d02;return _0x331658[_0x876f80(0x1f3)](/\\/g,'/');}export function isSha256Hex(_0x234119){const _0x35a6a2=a90_0x3d02;return typeof _0x234119===_0x35a6a2(0x1ea)&&/^[a-fA-F0-9]{64}$/[_0x35a6a2(0x1cb)](_0x234119);}
@@ -1 +1 @@
1
- (function(_0x29c4ba,_0x43294a){const _0x2bc844=a91_0x1651,_0x4de718=_0x29c4ba();while(!![]){try{const _0x1ada38=parseInt(_0x2bc844(0x18b))/0x1*(-parseInt(_0x2bc844(0x17f))/0x2)+parseInt(_0x2bc844(0x19a))/0x3*(parseInt(_0x2bc844(0x196))/0x4)+-parseInt(_0x2bc844(0x191))/0x5*(parseInt(_0x2bc844(0x184))/0x6)+-parseInt(_0x2bc844(0x178))/0x7+parseInt(_0x2bc844(0x181))/0x8+parseInt(_0x2bc844(0x17d))/0x9*(parseInt(_0x2bc844(0x193))/0xa)+parseInt(_0x2bc844(0x185))/0xb;if(_0x1ada38===_0x43294a)break;else _0x4de718['push'](_0x4de718['shift']());}catch(_0x1d75f6){_0x4de718['push'](_0x4de718['shift']());}}}(a91_0x4c81,0x31633));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';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';function a91_0x1651(_0x2fc2b0,_0x37a44b){_0x2fc2b0=_0x2fc2b0-0x177;const _0x4c819e=a91_0x4c81();let _0x16519c=_0x4c819e[_0x2fc2b0];return _0x16519c;}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(_0x388e58,_0x4841e2,_0x56bf3f){const _0x509d6e=a91_0x1651,_0x458ff8=requireSkillCode(_0x388e58),_0x4c940b=requirePackageBytes(_0x458ff8,_0x56bf3f[_0x509d6e(0x186)]),_0x3557ef=extractDownloadedPackage(_0x4c940b),_0xc1e0f2=_0x3557ef[_0x509d6e(0x189)](_0x9efdd4=>_0x9efdd4['path']===SKILL_FILE);if(!_0xc1e0f2)throw CliErrors['validation'](_0x509d6e(0x19f)+SKILL_FILE+':\x20'+_0x458ff8);const _0x1f0d36=withMaterializedSkillFrontmatter(_0x3557ef,_0x388e58,_0x458ff8),_0x50639e=_0x1f0d36[_0x509d6e(0x189)](_0x4d0259=>_0x4d0259[_0x509d6e(0x18f)]===SKILL_FILE),_0x26a5ab=fileText(_0x50639e),_0x125537=getRuntimeSkillDir(_0x56bf3f[_0x509d6e(0x18e)],_0x56bf3f[_0x509d6e(0x19c)],_0x56bf3f[_0x509d6e(0x188)],_0x4841e2,_0x458ff8,_0x56bf3f[_0x509d6e(0x187)]),_0x3d83d9=resolve(_0x125537,SKILL_FILE),_0x47aca8=resolve(_0x125537,METADATA_FILE),_0xb5bd76=contentHash(_0x26a5ab),_0x79ae64=readMetadataIfPresent(_0x47aca8)?.[_0x509d6e(0x1a2)];ensurePulledFilesCanBeOverwritten(_0x125537,_0x47aca8,_0x1f0d36,_0x56bf3f[_0x509d6e(0x17c)]===!![]),mkdirSync(_0x125537,{'recursive':!![],'mode':0x1c0});const _0x1557a5=existsSync(_0x3d83d9)?readFileSync(_0x3d83d9,_0x509d6e(0x198)):undefined;return materializeFiles(_0x125537,_0x1f0d36),removeStaleManagedFiles(_0x125537,_0x79ae64,_0x1f0d36),writeJsonAtomic(_0x47aca8,buildMetadata(_0x388e58,_0x4841e2,_0x56bf3f['appCode'],_0xb5bd76,_0x56bf3f[_0x509d6e(0x192)],_0x1f0d36,_0x4c940b)),{'skill':_0x388e58,'scope':_0x4841e2,'dir':_0x125537,'skillMdPath':_0x3d83d9,'metadataPath':_0x47aca8,'contentHash':_0xb5bd76,'changed':_0x1557a5!==_0x26a5ab};}function withMaterializedSkillFrontmatter(_0x1d7afa,_0x43b3ef,_0x38d861){const _0xcaf512=a91_0x1651;return normalizeLocalFiles(_0x1d7afa)[_0xcaf512(0x179)](_0x5e2c29=>{const _0x12c89a=_0xcaf512,_0x2dd4bd=fileText(_0x5e2c29);if(_0x5e2c29['path']!==SKILL_FILE||hasYamlFrontmatter(_0x2dd4bd))return _0x5e2c29;return{'path':_0x5e2c29[_0x12c89a(0x18f)],'content':prependSkillFrontmatter(_0x2dd4bd,{'name':_0x38d861,'description':_0x43b3ef[_0x12c89a(0x17b)]?.[_0x12c89a(0x19d)]()||_0x43b3ef[_0x12c89a(0x18d)]?.[_0x12c89a(0x19d)]()||_0x38d861})};});}function hasYamlFrontmatter(_0x24a603){return/^\uFEFF?---\s*\r?\n/['test'](_0x24a603);}function prependSkillFrontmatter(_0x4284c5,_0x51ac22){const _0x23c098=a91_0x1651,_0x5a9d68=_0x4284c5[_0x23c098(0x1a3)](/^\uFEFF/,'');return['---',_0x23c098(0x19b)+yamlString(_0x51ac22[_0x23c098(0x195)]),'description:\x20'+yamlString(_0x51ac22[_0x23c098(0x17b)]),_0x23c098(0x183),'',_0x5a9d68][_0x23c098(0x190)]('\x0a');}function yamlString(_0x2d4c7c){const _0x2a7626=a91_0x1651;return JSON[_0x2a7626(0x17e)](_0x2d4c7c[_0x2a7626(0x1a3)](/\r/g,'')[_0x2a7626(0x19d)]());}function ensurePulledFilesCanBeOverwritten(_0x519404,_0x457d98,_0x17d689,_0x4949b7){const _0x4d5e62=a91_0x1651;if(_0x4949b7||!existsSync(_0x457d98))return;const _0x1a8d15=readMetadataIfPresent(_0x457d98);if(!_0x1a8d15)return;const _0x55a2df=_0x1a8d15[_0x4d5e62(0x1a2)]&&Object[_0x4d5e62(0x199)](_0x1a8d15[_0x4d5e62(0x1a2)])[_0x4d5e62(0x18a)]>0x0?_0x1a8d15[_0x4d5e62(0x1a2)]:undefined;if(_0x55a2df)for(const [_0x2cb91c,_0x2ecba6]of Object[_0x4d5e62(0x17a)](_0x55a2df)){const _0x2129a9=resolveManagedFilePath(_0x519404,_0x2cb91c);if(!existsSync(_0x2129a9))throw CliErrors[_0x4d5e62(0x180)](_0x4d5e62(0x1a1)+_0x519404,_0x4d5e62(0x1a0)+_0x2cb91c);const _0x5bef56=lstatSync(_0x2129a9);if(!_0x5bef56[_0x4d5e62(0x197)]())throw CliErrors[_0x4d5e62(0x180)](_0x4d5e62(0x1a1)+_0x519404,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x2cb91c);const _0x34a3a2=bufferSha256(readFileSync(_0x2129a9));if(_0x34a3a2!==_0x2ecba6)throw CliErrors[_0x4d5e62(0x180)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x519404+_0x4d5e62(0x1a4)+_0x2cb91c,_0x4d5e62(0x177)+_0x2cb91c);}else{const _0xb0c7ab=resolve(_0x519404,SKILL_FILE);if(existsSync(_0xb0c7ab)&&_0x1a8d15['contentHash']){const _0x2f4686=contentHash(readFileSync(_0xb0c7ab,_0x4d5e62(0x198)));if(_0x2f4686!==_0x1a8d15[_0x4d5e62(0x19e)])throw CliErrors[_0x4d5e62(0x180)](_0x4d5e62(0x182)+_0xb0c7ab,_0x4d5e62(0x18c));}}for(const _0x240aa4 of normalizeLocalFiles(_0x17d689)){if(_0x55a2df?.[_0x240aa4['path']])continue;if(!_0x55a2df&&_0x240aa4[_0x4d5e62(0x18f)]===SKILL_FILE)continue;const _0x2e4c90=resolveManagedFilePath(_0x519404,_0x240aa4[_0x4d5e62(0x18f)]);if(!existsSync(_0x2e4c90))continue;const _0x46343d=lstatSync(_0x2e4c90);if(!_0x46343d['isFile']())throw CliErrors['validation'](_0x4d5e62(0x1a1)+_0x519404,_0x4d5e62(0x194)+_0x240aa4[_0x4d5e62(0x18f)]);const _0x1c5847=bufferSha256(readFileSync(_0x2e4c90));if(_0x1c5847!==fileHash(_0x240aa4))throw CliErrors[_0x4d5e62(0x180)](_0x4d5e62(0x1a1)+_0x519404,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x240aa4[_0x4d5e62(0x18f)]);}}function materializeFiles(_0x531f17,_0x573b9f){const _0x416b62=a91_0x1651;for(const _0x2f24b7 of normalizeLocalFiles(_0x573b9f)){const _0x48bdf2=resolveManagedFilePath(_0x531f17,_0x2f24b7[_0x416b62(0x18f)]);mkdirSync(dirname(_0x48bdf2),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x48bdf2,fileContent(_0x2f24b7),0x180);}}function a91_0x4c81(){const _0x267e95=['utf8','keys','135wUPteu','name:\x20','accessKey','trim','contentHash','Runtime\x20Skill\x20package\x20is\x20missing\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','fileHashes','replace','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','2489767JFxJFt','map','entries','description','force','75996pfStKC','stringify','4410aoNamU','validation','298176sCiShw','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','---','150gRpamB','8474191sLwHlj','packageBytes','paths','appCode','find','length','53xFGxMg','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','skillName','env','path','join','73985QVyNED','pulledAt','110sqTCqP','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','name','12820jsnFyK','isFile'];a91_0x4c81=function(){return _0x267e95;};return a91_0x4c81();}function removeStaleManagedFiles(_0x597e37,_0xebfe36,_0x3d6166){const _0x46787f=a91_0x1651;if(!_0xebfe36)return;const _0x5cdfb1=new Set(normalizeLocalFiles(_0x3d6166)[_0x46787f(0x179)](_0x5640bc=>_0x5640bc[_0x46787f(0x18f)]));for(const _0x36b4e5 of Object[_0x46787f(0x199)](_0xebfe36)){if(_0x5cdfb1['has'](_0x36b4e5))continue;const _0x5c405d=resolveManagedFilePath(_0x597e37,_0x36b4e5);existsSync(_0x5c405d)&&lstatSync(_0x5c405d)[_0x46787f(0x197)]()&&rmSync(_0x5c405d,{'force':!![]});}}
1
+ (function(_0x573316,_0x33a913){const _0xaa4eca=a91_0x4940,_0x2c5483=_0x573316();while(!![]){try{const _0x4ed54c=parseInt(_0xaa4eca(0x101))/0x1*(-parseInt(_0xaa4eca(0x10f))/0x2)+-parseInt(_0xaa4eca(0x112))/0x3*(parseInt(_0xaa4eca(0x110))/0x4)+parseInt(_0xaa4eca(0x10a))/0x5+parseInt(_0xaa4eca(0xf8))/0x6*(-parseInt(_0xaa4eca(0x10d))/0x7)+-parseInt(_0xaa4eca(0x117))/0x8*(parseInt(_0xaa4eca(0xf6))/0x9)+-parseInt(_0xaa4eca(0xf5))/0xa*(parseInt(_0xaa4eca(0x11c))/0xb)+parseInt(_0xaa4eca(0x10e))/0xc;if(_0x4ed54c===_0x33a913)break;else _0x2c5483['push'](_0x2c5483['shift']());}catch(_0x9d0477){_0x2c5483['push'](_0x2c5483['shift']());}}}(a91_0x44c4,0xcbe0b));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';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';function a91_0x44c4(){const _0x34ed2e=['env','trim','validation','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','pulledAt','utf8','join','has','11zJxGun','test','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','keys','packageBytes','description','.\x20Changed\x20file:\x20','find','4659340RIhpsA','isFile','map','4815013iKnbVy','64295244mkskvp','186468aIyzuy','2068796ZCshRc','contentHash','6RRpWmj','accessKey','appCode','skillName','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','14424CrdHng','stringify','path','length','---','11dRPZTN','name','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','fileHashes','replace','8813390ANULfs','5679mzZrVB','paths','12HRKBWW'];a91_0x44c4=function(){return _0x34ed2e;};return a91_0x44c4();}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x5064fa,_0x2079c9,_0x1c3139){const _0x4b98b5=a91_0x4940,_0x2d72ff=requireSkillCode(_0x5064fa),_0x5a9e7d=requirePackageBytes(_0x2d72ff,_0x1c3139[_0x4b98b5(0x106)]),_0xd6299c=extractDownloadedPackage(_0x5a9e7d),_0x1fcb06=_0xd6299c[_0x4b98b5(0x109)](_0x2c92f6=>_0x2c92f6[_0x4b98b5(0x119)]===SKILL_FILE);if(!_0x1fcb06)throw CliErrors[_0x4b98b5(0xfb)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x2d72ff);const _0xec54eb=withMaterializedSkillFrontmatter(_0xd6299c,_0x5064fa,_0x2d72ff),_0xc2ae92=_0xec54eb[_0x4b98b5(0x109)](_0x296180=>_0x296180[_0x4b98b5(0x119)]===SKILL_FILE),_0x5dcac4=fileText(_0xc2ae92),_0x2986de=getRuntimeSkillDir(_0x1c3139[_0x4b98b5(0xf9)],_0x1c3139[_0x4b98b5(0x113)],_0x1c3139[_0x4b98b5(0x114)],_0x2079c9,_0x2d72ff,_0x1c3139[_0x4b98b5(0xf7)]),_0x8e32c4=resolve(_0x2986de,SKILL_FILE),_0x32fa17=resolve(_0x2986de,METADATA_FILE),_0x48eeaa=contentHash(_0x5dcac4),_0x122e22=readMetadataIfPresent(_0x32fa17)?.[_0x4b98b5(0x11f)];ensurePulledFilesCanBeOverwritten(_0x2986de,_0x32fa17,_0xec54eb,_0x1c3139['force']===!![]),mkdirSync(_0x2986de,{'recursive':!![],'mode':0x1c0});const _0xdcd127=existsSync(_0x8e32c4)?readFileSync(_0x8e32c4,_0x4b98b5(0xfe)):undefined;return materializeFiles(_0x2986de,_0xec54eb),removeStaleManagedFiles(_0x2986de,_0x122e22,_0xec54eb),writeJsonAtomic(_0x32fa17,buildMetadata(_0x5064fa,_0x2079c9,_0x1c3139['appCode'],_0x48eeaa,_0x1c3139[_0x4b98b5(0xfd)],_0xec54eb,_0x5a9e7d)),{'skill':_0x5064fa,'scope':_0x2079c9,'dir':_0x2986de,'skillMdPath':_0x8e32c4,'metadataPath':_0x32fa17,'contentHash':_0x48eeaa,'changed':_0xdcd127!==_0x5dcac4};}function withMaterializedSkillFrontmatter(_0x2b15bf,_0x331f32,_0x4f3f3f){const _0x4d765c=a91_0x4940;return normalizeLocalFiles(_0x2b15bf)[_0x4d765c(0x10c)](_0x351bf8=>{const _0x2e6595=_0x4d765c,_0x21b259=fileText(_0x351bf8);if(_0x351bf8['path']!==SKILL_FILE||hasYamlFrontmatter(_0x21b259))return _0x351bf8;return{'path':_0x351bf8[_0x2e6595(0x119)],'content':prependSkillFrontmatter(_0x21b259,{'name':_0x4f3f3f,'description':_0x331f32[_0x2e6595(0x107)]?.['trim']()||_0x331f32[_0x2e6595(0x115)]?.['trim']()||_0x4f3f3f})};});}function hasYamlFrontmatter(_0x30763a){const _0x1c1b43=a91_0x4940;return/^\uFEFF?---\s*\r?\n/[_0x1c1b43(0x102)](_0x30763a);}function prependSkillFrontmatter(_0x2d90ec,_0x4b3335){const _0x4ca5b4=a91_0x4940,_0x3adc7e=_0x2d90ec[_0x4ca5b4(0x120)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x4b3335[_0x4ca5b4(0x11d)]),'description:\x20'+yamlString(_0x4b3335['description']),_0x4ca5b4(0x11b),'',_0x3adc7e][_0x4ca5b4(0xff)]('\x0a');}function yamlString(_0x18c0fb){const _0x16a717=a91_0x4940;return JSON[_0x16a717(0x118)](_0x18c0fb[_0x16a717(0x120)](/\r/g,'')[_0x16a717(0xfa)]());}function ensurePulledFilesCanBeOverwritten(_0x9a49cd,_0x2374d1,_0x229e0c,_0xf26d29){const _0x25600a=a91_0x4940;if(_0xf26d29||!existsSync(_0x2374d1))return;const _0x57abf7=readMetadataIfPresent(_0x2374d1);if(!_0x57abf7)return;const _0x53903f=_0x57abf7[_0x25600a(0x11f)]&&Object[_0x25600a(0x105)](_0x57abf7[_0x25600a(0x11f)])[_0x25600a(0x11a)]>0x0?_0x57abf7[_0x25600a(0x11f)]:undefined;if(_0x53903f)for(const [_0x5c4a95,_0x26646a]of Object['entries'](_0x53903f)){const _0x25de22=resolveManagedFilePath(_0x9a49cd,_0x5c4a95);if(!existsSync(_0x25de22))throw CliErrors[_0x25600a(0xfb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x9a49cd,_0x25600a(0x104)+_0x5c4a95);const _0x907eb=lstatSync(_0x25de22);if(!_0x907eb[_0x25600a(0x10b)]())throw CliErrors['validation'](_0x25600a(0x11e)+_0x9a49cd,_0x25600a(0x103)+_0x5c4a95);const _0x4f13fc=bufferSha256(readFileSync(_0x25de22));if(_0x4f13fc!==_0x26646a)throw CliErrors[_0x25600a(0xfb)](_0x25600a(0x11e)+_0x9a49cd+_0x25600a(0x108)+_0x5c4a95,_0x25600a(0x116)+_0x5c4a95);}else{const _0x1fba4c=resolve(_0x9a49cd,SKILL_FILE);if(existsSync(_0x1fba4c)&&_0x57abf7[_0x25600a(0x111)]){const _0x1f3950=contentHash(readFileSync(_0x1fba4c,_0x25600a(0xfe)));if(_0x1f3950!==_0x57abf7[_0x25600a(0x111)])throw CliErrors[_0x25600a(0xfb)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x1fba4c,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x296dbe of normalizeLocalFiles(_0x229e0c)){if(_0x53903f?.[_0x296dbe[_0x25600a(0x119)]])continue;if(!_0x53903f&&_0x296dbe[_0x25600a(0x119)]===SKILL_FILE)continue;const _0x5a048a=resolveManagedFilePath(_0x9a49cd,_0x296dbe[_0x25600a(0x119)]);if(!existsSync(_0x5a048a))continue;const _0x2ab743=lstatSync(_0x5a048a);if(!_0x2ab743['isFile']())throw CliErrors[_0x25600a(0xfb)](_0x25600a(0x11e)+_0x9a49cd,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x296dbe['path']);const _0x32dd4f=bufferSha256(readFileSync(_0x5a048a));if(_0x32dd4f!==fileHash(_0x296dbe))throw CliErrors[_0x25600a(0xfb)](_0x25600a(0x11e)+_0x9a49cd,_0x25600a(0xfc)+_0x296dbe[_0x25600a(0x119)]);}}function materializeFiles(_0x47fa0a,_0x13e733){const _0x13e54b=a91_0x4940;for(const _0x55a712 of normalizeLocalFiles(_0x13e733)){const _0x3b6d8d=resolveManagedFilePath(_0x47fa0a,_0x55a712[_0x13e54b(0x119)]);mkdirSync(dirname(_0x3b6d8d),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3b6d8d,fileContent(_0x55a712),0x180);}}function a91_0x4940(_0x4a48a0,_0x31ea0e){_0x4a48a0=_0x4a48a0-0xf5;const _0x44c496=a91_0x44c4();let _0x49406f=_0x44c496[_0x4a48a0];return _0x49406f;}function removeStaleManagedFiles(_0x3054c2,_0x3f91d0,_0x328af5){const _0x377d0b=a91_0x4940;if(!_0x3f91d0)return;const _0x8c1025=new Set(normalizeLocalFiles(_0x328af5)['map'](_0x52c844=>_0x52c844[_0x377d0b(0x119)]));for(const _0x2b9e7a of Object[_0x377d0b(0x105)](_0x3f91d0)){if(_0x8c1025[_0x377d0b(0x100)](_0x2b9e7a))continue;const _0x259f5b=resolveManagedFilePath(_0x3054c2,_0x2b9e7a);existsSync(_0x259f5b)&&lstatSync(_0x259f5b)['isFile']()&&rmSync(_0x259f5b,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x492094,_0x57a87d){const _0x33d476=a92_0x15c2,_0x3922db=_0x492094();while(!![]){try{const _0x183159=-parseInt(_0x33d476(0x124))/0x1*(-parseInt(_0x33d476(0x12c))/0x2)+-parseInt(_0x33d476(0x112))/0x3+-parseInt(_0x33d476(0x116))/0x4*(parseInt(_0x33d476(0x11a))/0x5)+-parseInt(_0x33d476(0x121))/0x6+-parseInt(_0x33d476(0x127))/0x7+parseInt(_0x33d476(0x125))/0x8*(parseInt(_0x33d476(0x113))/0x9)+parseInt(_0x33d476(0x119))/0xa;if(_0x183159===_0x57a87d)break;else _0x3922db['push'](_0x3922db['shift']());}catch(_0x2d6cd1){_0x3922db['push'](_0x3922db['shift']());}}}(a92_0x435d,0xbd35e));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a92_0x15c2(_0x369689,_0x3bdd36){_0x369689=_0x369689-0x112;const _0x435d4d=a92_0x435d();let _0x15c2dc=_0x435d4d[_0x369689];return _0x15c2dc;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a92_0x435d(){const _0x180342=['length','string','1101366wctKhc','387ZNthJR','fromEntries','parse','12Liewmy','files','tags','17196720PdoEwj','2140870kRWUrX','toISOString','manifest','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','forkedFromSkillId','map','7961274zryKno','skillName','trim','1099XEQyka','216488rWlZWm','sourceSessionId','1062852WzHfAV','forkedFromVersion','path','status','validation','1860sfxVsm','isArray','personal','userId','object','tenantCode'];a92_0x435d=function(){return _0x180342;};return a92_0x435d();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x42792a,_0xc6a262,_0xab83d3,_0x4c095a,_0x77114c,_0x46a90a,_0x354748){const _0x2ee90c=a92_0x15c2,_0xc30a0a=_0x46a90a?normalizeLocalFiles(_0x46a90a):[],_0x231641=!_0x354748&&_0xc30a0a[_0x2ee90c(0x132)]>0x0?buildSkillPackage(_0xc30a0a):undefined,_0x138d37=_0x354748?bufferSha256(_0x354748):_0x231641?.[_0x2ee90c(0x11c)]['zipSha256'],_0x4d7ad7=_0x354748?.[_0x2ee90c(0x132)]??_0x231641?.[_0x2ee90c(0x11c)]['zipSize'],_0x25a763=_0xc30a0a[_0x2ee90c(0x132)]>0x0?Object[_0x2ee90c(0x114)](_0xc30a0a['map'](_0x3d2d70=>[_0x3d2d70[_0x2ee90c(0x129)],fileHash(_0x3d2d70)])):undefined;return{'schemaVersion':_0xc30a0a[_0x2ee90c(0x132)]>0x0?0x2:0x1,'id':_0x42792a['id'],'appCode':_0xab83d3,'skillCode':requireSkillCode(_0x42792a),'skillName':_0x42792a[_0x2ee90c(0x122)],'description':_0x42792a['description'],'scope':_0xc6a262,'readonly':_0xc6a262!==_0x2ee90c(0x12e)||_0x42792a['readonly']===!![],'tenantCode':_0x42792a[_0x2ee90c(0x131)],'userId':_0x42792a[_0x2ee90c(0x12f)],'version':_0x42792a['version'],'status':_0x42792a[_0x2ee90c(0x12a)],'tags':Array['isArray'](_0x42792a[_0x2ee90c(0x118)])?_0x42792a[_0x2ee90c(0x118)]:[],'hasUpstreamUpdate':_0x42792a['hasUpstreamUpdate'],'forkedFromSkillId':_0x42792a[_0x2ee90c(0x11f)],'forkedFromVersion':_0x42792a[_0x2ee90c(0x128)],'sourceSessionId':_0x42792a[_0x2ee90c(0x126)],'contentHash':_0x4c095a,'fileHashes':_0x25a763,'treeHash':_0xc30a0a[_0x2ee90c(0x132)]>0x0?fileTreeHash(localFilesToManifestFiles(_0xc30a0a)):undefined,'ossPath':remoteManifestOssPath(_0x42792a[_0x2ee90c(0x117)]),'zipSha256':_0x138d37,'zipSize':_0x4d7ad7,'files':_0xc30a0a[_0x2ee90c(0x132)]>0x0?_0xc30a0a[_0x2ee90c(0x120)](_0x3effd0=>({'path':_0x3effd0[_0x2ee90c(0x129)],'hash':fileHash(_0x3effd0),'size':fileContent(_0x3effd0)[_0x2ee90c(0x132)]})):undefined,'pulledAt':_0x77114c??new Date()[_0x2ee90c(0x11b)]()};}export function requireSkillCode(_0x32e95b){const _0x833cb=a92_0x15c2,_0x4138f8=_0x32e95b['skillCode']?.[_0x833cb(0x123)]();if(!_0x4138f8)throw CliErrors[_0x833cb(0x12b)](_0x833cb(0x11d));return _0x4138f8;}export function readMetadataIfPresent(_0x32f23e){const _0x3344c6=a92_0x15c2;if(!existsSync(_0x32f23e))return undefined;try{const _0x524716=JSON[_0x3344c6(0x115)](readFileSync(_0x32f23e,_0x3344c6(0x11e)));return _0x524716;}catch{throw CliErrors[_0x3344c6(0x12b)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x32f23e);}}function remoteManifestOssPath(_0x506c6f){const _0xc3b965=a92_0x15c2;if(!_0x506c6f||typeof _0x506c6f!==_0xc3b965(0x130)||Array[_0xc3b965(0x12d)](_0x506c6f))return undefined;const _0x58aa11=_0x506c6f['ossPath'];return typeof _0x58aa11===_0xc3b965(0x133)&&_0x58aa11['trim']()?_0x58aa11[_0xc3b965(0x123)]():undefined;}
1
+ (function(_0x2c185e,_0x27ffd3){const _0x523641=a92_0x4b98,_0x3e4e7a=_0x2c185e();while(!![]){try{const _0x4b5285=-parseInt(_0x523641(0x178))/0x1*(-parseInt(_0x523641(0x189))/0x2)+parseInt(_0x523641(0x18a))/0x3+-parseInt(_0x523641(0x177))/0x4+parseInt(_0x523641(0x172))/0x5+parseInt(_0x523641(0x171))/0x6*(parseInt(_0x523641(0x184))/0x7)+parseInt(_0x523641(0x17a))/0x8*(parseInt(_0x523641(0x180))/0x9)+-parseInt(_0x523641(0x17c))/0xa;if(_0x4b5285===_0x27ffd3)break;else _0x3e4e7a['push'](_0x3e4e7a['shift']());}catch(_0x4bf0f4){_0x3e4e7a['push'](_0x3e4e7a['shift']());}}}(a92_0x5dc5,0xc3cab));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a92_0x4b98(_0x547c58,_0x384b81){_0x547c58=_0x547c58-0x16f;const _0x5dc5f8=a92_0x5dc5();let _0x4b984e=_0x5dc5f8[_0x547c58];return _0x4b984e;}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a92_0x5dc5(){const _0x7f54ce=['path','map','string','zipSize','object','personal','skillName','36FFEIbh','4128605lkUIGt','files','tenantCode','length','manifest','1270480qSPFfV','38803ZMiJsL','hasUpstreamUpdate','464byuvsG','utf8','37710550WLVCsy','zipSha256','Runtime\x20Skill\x20is\x20missing\x20skillCode.','description','143919rhUPGa','trim','tags','isArray','1782389iSsuTx','userId','forkedFromSkillId','validation','ossPath','34bgFNDI','2850078sLQaBE'];a92_0x5dc5=function(){return _0x7f54ce;};return a92_0x5dc5();}export function buildMetadata(_0x43b483,_0x38bb29,_0x5efb51,_0x434396,_0x1357f1,_0x2c00b2,_0x11ce7c){const _0x13c5aa=a92_0x4b98,_0x25587f=_0x2c00b2?normalizeLocalFiles(_0x2c00b2):[],_0x5848ae=!_0x11ce7c&&_0x25587f[_0x13c5aa(0x175)]>0x0?buildSkillPackage(_0x25587f):undefined,_0x468b78=_0x11ce7c?bufferSha256(_0x11ce7c):_0x5848ae?.[_0x13c5aa(0x176)][_0x13c5aa(0x17d)],_0x3a3f9d=_0x11ce7c?.[_0x13c5aa(0x175)]??_0x5848ae?.[_0x13c5aa(0x176)][_0x13c5aa(0x18e)],_0xf2f6e8=_0x25587f['length']>0x0?Object['fromEntries'](_0x25587f[_0x13c5aa(0x18c)](_0x54fac2=>[_0x54fac2[_0x13c5aa(0x18b)],fileHash(_0x54fac2)])):undefined;return{'schemaVersion':_0x25587f[_0x13c5aa(0x175)]>0x0?0x2:0x1,'id':_0x43b483['id'],'appCode':_0x5efb51,'skillCode':requireSkillCode(_0x43b483),'skillName':_0x43b483[_0x13c5aa(0x170)],'description':_0x43b483[_0x13c5aa(0x17f)],'scope':_0x38bb29,'readonly':_0x38bb29!==_0x13c5aa(0x16f)||_0x43b483['readonly']===!![],'tenantCode':_0x43b483[_0x13c5aa(0x174)],'userId':_0x43b483[_0x13c5aa(0x185)],'version':_0x43b483['version'],'status':_0x43b483['status'],'tags':Array[_0x13c5aa(0x183)](_0x43b483[_0x13c5aa(0x182)])?_0x43b483['tags']:[],'hasUpstreamUpdate':_0x43b483[_0x13c5aa(0x179)],'forkedFromSkillId':_0x43b483[_0x13c5aa(0x186)],'forkedFromVersion':_0x43b483['forkedFromVersion'],'sourceSessionId':_0x43b483['sourceSessionId'],'contentHash':_0x434396,'fileHashes':_0xf2f6e8,'treeHash':_0x25587f[_0x13c5aa(0x175)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x25587f)):undefined,'ossPath':remoteManifestOssPath(_0x43b483[_0x13c5aa(0x173)]),'zipSha256':_0x468b78,'zipSize':_0x3a3f9d,'files':_0x25587f[_0x13c5aa(0x175)]>0x0?_0x25587f[_0x13c5aa(0x18c)](_0x1a743e=>({'path':_0x1a743e[_0x13c5aa(0x18b)],'hash':fileHash(_0x1a743e),'size':fileContent(_0x1a743e)[_0x13c5aa(0x175)]})):undefined,'pulledAt':_0x1357f1??new Date()['toISOString']()};}export function requireSkillCode(_0xa739ce){const _0x26b374=a92_0x4b98,_0x1bd16d=_0xa739ce['skillCode']?.['trim']();if(!_0x1bd16d)throw CliErrors[_0x26b374(0x187)](_0x26b374(0x17e));return _0x1bd16d;}export function readMetadataIfPresent(_0x405524){const _0x21ec48=a92_0x4b98;if(!existsSync(_0x405524))return undefined;try{const _0x25b12a=JSON['parse'](readFileSync(_0x405524,_0x21ec48(0x17b)));return _0x25b12a;}catch{throw CliErrors[_0x21ec48(0x187)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x405524);}}function remoteManifestOssPath(_0x56181c){const _0x16f234=a92_0x4b98;if(!_0x56181c||typeof _0x56181c!==_0x16f234(0x18f)||Array[_0x16f234(0x183)](_0x56181c))return undefined;const _0x5c6579=_0x56181c[_0x16f234(0x188)];return typeof _0x5c6579===_0x16f234(0x18d)&&_0x5c6579['trim']()?_0x5c6579[_0x16f234(0x181)]():undefined;}