@lovrabet/lovrabet-cli 2.1.3 → 2.1.4

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(_0x54a478,_0x264087){const _0x45face=a77_0x2149,_0x181208=_0x54a478();while(!![]){try{const _0x51c30c=-parseInt(_0x45face(0x14d))/0x1+-parseInt(_0x45face(0x14b))/0x2+-parseInt(_0x45face(0x157))/0x3+-parseInt(_0x45face(0x158))/0x4+-parseInt(_0x45face(0x143))/0x5+-parseInt(_0x45face(0x148))/0x6+-parseInt(_0x45face(0x14f))/0x7*(-parseInt(_0x45face(0x150))/0x8);if(_0x51c30c===_0x264087)break;else _0x181208['push'](_0x181208['shift']());}catch(_0x104392){_0x181208['push'](_0x181208['shift']());}}}(a77_0x402a,0x5ad6b));import{CLI_BIN_NAME}from'../constant/cli.js';function a77_0x2149(_0x24816f,_0x22f1e2){_0x24816f=_0x24816f-0x143;const _0x402adb=a77_0x402a();let _0x2149aa=_0x402adb[_0x24816f];return _0x2149aa;}export function buildConfirmationLines(_0x5e11be,_0x41aaaf,_0x4dc69b){const _0x201f75=a77_0x2149,_0x111d0b=buildConfirmationContext(_0x5e11be,_0x41aaaf,_0x4dc69b),_0x4868a8=[_0x201f75(0x14c)+_0x111d0b[_0x201f75(0x15c)]];return _0x111d0b[_0x201f75(0x14e)]&&_0x4868a8[_0x201f75(0x156)](_0x201f75(0x145)+_0x111d0b[_0x201f75(0x14e)]),_0x111d0b[_0x201f75(0x153)]&&_0x4868a8[_0x201f75(0x156)]('\x20\x20\x20Affected:\x20'+_0x111d0b[_0x201f75(0x153)]),_0x4868a8[_0x201f75(0x156)]('\x20\x20\x20Continue?\x20[y/N]\x20'),_0x4868a8;}export function reconstructCommandArgv(_0x22f2c7,_0x35ab20){const _0x14340d=a77_0x2149,_0x1a3527=[CLI_BIN_NAME,_0x22f2c7[_0x14340d(0x146)],_0x22f2c7[_0x14340d(0x14a)]];for(const [_0x402663,_0x2ba1f4]of Object[_0x14340d(0x15a)](_0x35ab20)){if(_0x2ba1f4===!![])_0x1a3527[_0x14340d(0x156)]('--'+_0x402663);else _0x2ba1f4!==![]&&_0x2ba1f4!==undefined&&_0x2ba1f4!==''&&_0x1a3527[_0x14340d(0x156)]('--'+_0x402663+'\x20'+JSON[_0x14340d(0x154)](_0x2ba1f4));}return _0x1a3527[_0x14340d(0x156)](_0x14340d(0x15b)),_0x1a3527[_0x14340d(0x155)]('\x20');}function buildConfirmationContext(_0x13f2ec,_0x4cba1f,_0x213a30){const _0x3aeb5d=a77_0x2149,_0x481203=extractAffectedRecords(_0x213a30);return{'commandLabel':_0x4cba1f,'description':_0x13f2ec[_0x3aeb5d(0x14e)],'affectedRecords':_0x481203};}function extractAffectedRecords(_0x5b6f57){const _0x294bce=a77_0x2149,_0x2cd3b3=[];if(_0x5b6f57[_0x294bce(0x152)])_0x2cd3b3[_0x294bce(0x156)](_0x294bce(0x144)+_0x5b6f57[_0x294bce(0x152)]);if(_0x5b6f57['id'])_0x2cd3b3[_0x294bce(0x156)](_0x294bce(0x151)+_0x5b6f57['id']);if(_0x5b6f57[_0x294bce(0x15d)])_0x2cd3b3[_0x294bce(0x156)](_0x294bce(0x159)+_0x5b6f57[_0x294bce(0x15d)]);if(_0x5b6f57[_0x294bce(0x149)])_0x2cd3b3[_0x294bce(0x156)]('params='+_0x5b6f57['params']);return _0x2cd3b3[_0x294bce(0x147)]>0x0?_0x2cd3b3[_0x294bce(0x155)](',\x20'):undefined;}function a77_0x402a(){const _0x3ae2e0=['stringify','join','push','1527111vexfjR','2841372ZKOxdY','name=','entries','--yes','commandLabel','name','1303160FoHoKi','code=','\x20\x20\x20','service','length','4438404iBrkws','params','command','227524tWPibC','⚠\x20\x20High-risk\x20operation:\x20','15188JDWlWU','description','7paaIdD','21766168WsIgkT','id=','code','affectedRecords'];a77_0x402a=function(){return _0x3ae2e0;};return a77_0x402a();}
@@ -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(_0x2b7239,_0x3d436a){const _0x28ccc2=a78_0x1c1c,_0x5d92b3=_0x2b7239();while(!![]){try{const _0xef535c=parseInt(_0x28ccc2(0xb7))/0x1*(-parseInt(_0x28ccc2(0xb5))/0x2)+-parseInt(_0x28ccc2(0xb9))/0x3*(-parseInt(_0x28ccc2(0xb0))/0x4)+parseInt(_0x28ccc2(0xb8))/0x5*(parseInt(_0x28ccc2(0xa9))/0x6)+parseInt(_0x28ccc2(0xb6))/0x7*(parseInt(_0x28ccc2(0xb2))/0x8)+-parseInt(_0x28ccc2(0xab))/0x9+parseInt(_0x28ccc2(0xad))/0xa*(-parseInt(_0x28ccc2(0xaa))/0xb)+parseInt(_0x28ccc2(0xac))/0xc*(parseInt(_0x28ccc2(0xae))/0xd);if(_0xef535c===_0x3d436a)break;else _0x5d92b3['push'](_0x5d92b3['shift']());}catch(_0x4d0d94){_0x5d92b3['push'](_0x5d92b3['shift']());}}}(a78_0x210c,0x1adbf));function a78_0x1c1c(_0x29c464,_0x425d2d){_0x29c464=_0x29c464-0xa9;const _0x210c30=a78_0x210c();let _0x1c1ccb=_0x210c30[_0x29c464];return _0x1c1ccb;}import{LovrabetError}from'@lovrabet/sdk';function a78_0x210c(){const _0x53ac45=['message','176sBZyZM','stringify','trim','2856FmNZYx','51702dKJYER','6vLSHfs','264485VwOMAA','5268kdiuHn','validation','6QbeuGA','578270wmAbEo','1533474SNBkID','4728uJRAcU','40ZRtYMB','9308PxpszW','description','4wrnrGN'];a78_0x210c=function(){return _0x53ac45;};return a78_0x210c();}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x934c25){const _0x37fa79=a78_0x1c1c;if(_0x934c25 instanceof LovrabetError)return CliErrors[_0x37fa79(0xba)](userFacingLovrabetMessage(_0x934c25));return _0x934c25;}function userFacingLovrabetMessage(_0x5209e1){const _0x10bd09=a78_0x1c1c,_0x2ce0b2=_0x5209e1[_0x10bd09(0xaf)];if(_0x2ce0b2!==undefined&&_0x2ce0b2!==null){if(typeof _0x2ce0b2==='string'&&_0x2ce0b2[_0x10bd09(0xb4)]())return _0x2ce0b2[_0x10bd09(0xb4)]();try{return JSON[_0x10bd09(0xb3)](_0x2ce0b2);}catch{}}return _0x5209e1[_0x10bd09(0xb1)];}
@@ -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_0xb0580a=a79_0x382c;(function(_0x4bdb80,_0x2ff58f){const _0x3dd831=a79_0x382c,_0x222b19=_0x4bdb80();while(!![]){try{const _0x143e9b=-parseInt(_0x3dd831(0xf0))/0x1*(-parseInt(_0x3dd831(0xda))/0x2)+parseInt(_0x3dd831(0x108))/0x3*(-parseInt(_0x3dd831(0x10d))/0x4)+-parseInt(_0x3dd831(0xec))/0x5+-parseInt(_0x3dd831(0xd9))/0x6*(parseInt(_0x3dd831(0xd6))/0x7)+parseInt(_0x3dd831(0xe8))/0x8+parseInt(_0x3dd831(0xeb))/0x9+parseInt(_0x3dd831(0xfa))/0xa*(parseInt(_0x3dd831(0xee))/0xb);if(_0x143e9b===_0x2ff58f)break;else _0x222b19['push'](_0x222b19['shift']());}catch(_0x51391d){_0x222b19['push'](_0x222b19['shift']());}}}(a79_0x281e,0xde241));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';function a79_0x281e(){const _0x308736=['defaultApp','local-alias','string','schema','catch','newConfigFileName','38860oVnUaj','Unknown\x20app:\x20','../commands/app/remote-source.js','error','rawFlags','pretty','doctor','nonInteractive','ACCESS_KEY','requiresAppCode','Set\x20accessKey\x20in\x20','apiDomain','validation','APPCODE','901917MLuthm','app','items','authRequired','requiresAuth','12iQFGle','verbose','7622741AJLIAy','\x20\x20To\x20proceed:\x20','riskLevel','6fnuBDN','124QQCUBD','_notice','defaultPageSize','service','appcode','isNonInteractive','pageSize','production','execute','currentApp','mergedCli','trim','High-risk\x20operation\x20`','update','4984160YpikfO','appCode','format','1568853SUDXSk','754130cKDSrj','appCodeSource','2387BTfRDc','has','22758bVmdAP','accessKey','env','cancelled'];a79_0x281e=function(){return _0x308736;};return a79_0x281e();}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(_0x1c159d){return void _0x1c159d,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x5d23e4,_0x5f09e2){const _0x42469e=a79_0x382c,_0x5a67a5=typeof _0x5f09e2[_0x42469e(0x109)]===_0x42469e(0xf6)&&_0x5f09e2[_0x42469e(0x109)]['trim']();return{'rawFlags':_0x5f09e2,'appCode':_0x5d23e4[_0x42469e(0xe9)]||productEnv(_0x42469e(0x107))||(_0x5a67a5?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5d23e4[_0x42469e(0xed)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5f09e2),'defaultFormat':_0x5d23e4[_0x42469e(0xea)],'defaultPageSize':_0x5d23e4[_0x42469e(0xe0)],'defaultVerbose':_0x5d23e4[_0x42469e(0xd5)],'riskLevel':_0x5d23e4[_0x42469e(0xd8)],'accessKey':_0x5d23e4[_0x42469e(0xf1)],'env':_0x5d23e4['env'],'mergedCli':{'defaultApp':_0x5d23e4[_0x42469e(0xf4)],'currentApp':_0x5d23e4['currentApp'],'appCode':_0x5d23e4['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x431250=>PIPELINE_FLAG_NAMES[a79_0xb0580a(0xef)](_0x431250['name']))['map'](({name:_0x12ef8d,type:_0x147f2c,description:_0x3278a6})=>({'name':_0x12ef8d,'type':_0x147f2c,'description':_0x3278a6})),'formatOutput':formatOutput,'getCommandLabel'(_0x224744){const _0xe257f6=a79_0xb0580a;return CLI_BIN_NAME+'\x20'+_0x224744[_0xe257f6(0xdd)]+'\x20'+_0x224744['command'];},'riskPolicy':{'onViolation'(_0x12cf2f){const _0x5df0f9=a79_0xb0580a;console[_0x5df0f9(0xfd)](_0x12cf2f);},'createError'(_0x2c2d1a){const _0x542777=a79_0xb0580a;return CliErrors[_0x542777(0xf3)](_0x2c2d1a);}},async 'prepare'(_0x57669a,_0x319937){const _0x1f046b=a79_0xb0580a,_0x26455c=resolveAuthMode(_0x319937);if(_0x57669a[_0x1f046b(0x10c)]!==![]){if(!_0x319937[_0x1f046b(0xf1)])throw CliErrors[_0x1f046b(0x10b)](_0x1f046b(0x104)+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x1f046b(0x102))+'.');const {setActiveAK:_0x168248}=await import('../core/api-client.js');_0x168248(_0x319937[_0x1f046b(0xf1)]);}let _0x44867a='';if(_0x57669a[_0x1f046b(0x103)]!==![]){_0x44867a=_0x319937[_0x1f046b(0xe9)]??'',_0x44867a=await resolveExplicitAppName(_0x57669a,_0x319937,_0x44867a);if(!_0x44867a){await assertSelectedAppNameIsRuntimeAccessible(_0x57669a,_0x319937);throw CliErrors['configMissing']('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x1f046b(0xf9)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x57669a,_0x319937,_0x44867a);}if(_0x44867a){const {initSdkClient:_0x2d5c27}=await import('../core/sdk-client.js');_0x2d5c27({'appCode':_0x44867a,'env':_0x319937['env']??_0x1f046b(0xe1),'accessKey':_0x319937['accessKey'],'authMode':_0x26455c});}return{'defaults':{'booleans':{'verbose':_0x319937['defaultVerbose']},'numbers':{'pagesize':_0x319937[_0x1f046b(0xdc)]}},'extras':{'appCode':_0x44867a,'cookie':'','apiDomain':_0x319937[_0x1f046b(0x105)],'apiDir':'','accessKey':_0x319937[_0x1f046b(0xf1)],'envName':_0x319937[_0x1f046b(0xf2)],'mergedCli':_0x319937[_0x1f046b(0xe4)]}};},async 'confirmHighRisk'({def:_0x42e10d,env:_0x10ed1a,flags:_0x165728,commandLabel:_0x400056}){const _0x3f44fc=a79_0xb0580a;if(_0x10ed1a[_0x3f44fc(0xdf)]){const _0x136ca1=reconstructCommandArgv(_0x42e10d,_0x165728);throw CliErrors[_0x3f44fc(0x106)](_0x3f44fc(0xe6)+_0x400056+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x3f44fc(0xd7)+_0x136ca1));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x42e10d,_0x400056,_0x165728),'createCancelledError':_0x26bd74=>CliErrors['cancelled'](_0x26bd74)});},'mapDryRunError'(_0x2c9a45){return mapUserFacingExecuteError(_0x2c9a45);},'mapExecuteError'(_0xa0fccb){return mapUserFacingExecuteError(_0xa0fccb);},async 'finalize'(){const {clearActiveAK:_0x554468}=await import('../core/api-client.js');_0x554468();}};async function resolveExplicitAppName(_0x6c03f6,_0x315daf,_0x262905){const _0x5e653f=a79_0xb0580a;if(_0x6c03f6[_0x5e653f(0x103)]===![])return _0x262905;const _0x37cb15=typeof _0x315daf[_0x5e653f(0xfe)][_0x5e653f(0x109)]===_0x5e653f(0xf6)?_0x315daf[_0x5e653f(0xfe)][_0x5e653f(0x109)]['trim']():'';if(!_0x37cb15)return _0x262905;const _0x2cf1d3=typeof _0x315daf[_0x5e653f(0xfe)][_0x5e653f(0xde)]===_0x5e653f(0xf6)&&_0x315daf[_0x5e653f(0xfe)][_0x5e653f(0xde)][_0x5e653f(0xe5)]()||productEnv('APPCODE');if(_0x2cf1d3||_0x315daf[_0x5e653f(0xed)]===_0x5e653f(0xf5))return _0x262905;const {getRemoteAppList:_0x297870}=await import(_0x5e653f(0xfc)),_0x1d94a9=await _0x297870({'env':_0x315daf['env']??_0x5e653f(0xe1),'accessKey':_0x315daf[_0x5e653f(0xf1)]}),_0x362718=findAppByName(_0x1d94a9[_0x5e653f(0x10a)],_0x37cb15);if(_0x362718&&!isRuntimeAccessibleApp(_0x362718))throw runtimeInaccessibleAppError(_0x362718,'\x22'+_0x37cb15+'\x22');const _0x240977=_0x362718?.[_0x5e653f(0xe9)]?.[_0x5e653f(0xe5)]();if(_0x240977)return _0x240977;throw CliErrors[_0x5e653f(0x106)](_0x5e653f(0xfb)+_0x37cb15,'Run\x20`'+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x37cb15+'.appcode\x20to\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x184a54,_0x3bb937){const _0x36ec85=a79_0xb0580a;if(_0x184a54[_0x36ec85(0x103)]===![]||!_0x3bb937['accessKey'])return;const _0xbd0c06=(typeof _0x3bb937[_0x36ec85(0xfe)][_0x36ec85(0x109)]===_0x36ec85(0xf6)&&_0x3bb937[_0x36ec85(0xfe)][_0x36ec85(0x109)][_0x36ec85(0xe5)]()?_0x3bb937['rawFlags'][_0x36ec85(0x109)]:_0x3bb937['mergedCli']?.[_0x36ec85(0xe3)]??_0x3bb937[_0x36ec85(0xe4)]?.[_0x36ec85(0xf4)])?.[_0x36ec85(0xe5)]();if(!_0xbd0c06)return;const {getRemoteAppList:_0xd10aa0}=await import(_0x36ec85(0xfc)),_0x1b6f36=await _0xd10aa0({'env':_0x3bb937[_0x36ec85(0xf2)]??_0x36ec85(0xe1),'accessKey':_0x3bb937[_0x36ec85(0xf1)]}),_0x26a528=findAppByName(_0x1b6f36['items'],_0xbd0c06);if(_0x26a528&&!isRuntimeAccessibleApp(_0x26a528))throw runtimeInaccessibleAppError(_0x26a528,'\x22'+_0xbd0c06+'\x22');}function a79_0x382c(_0x41f411,_0x9a7a04){_0x41f411=_0x41f411-0xd5;const _0x281e05=a79_0x281e();let _0x382c98=_0x281e05[_0x41f411];return _0x382c98;}async function assertAppCodeIsRuntimeAccessible(_0x798864,_0x4e0a1e,_0x2b53f9){const _0x896dd=a79_0xb0580a;if(_0x798864[_0x896dd(0x103)]===![]||!_0x4e0a1e[_0x896dd(0xf1)])return;const {getRemoteAppList:_0x42ce80}=await import('../commands/app/remote-source.js'),_0x47e2c1=await _0x42ce80({'env':_0x4e0a1e[_0x896dd(0xf2)]??'production','accessKey':_0x4e0a1e[_0x896dd(0xf1)]}),_0x196585=findAppByCode(_0x47e2c1[_0x896dd(0x10a)],_0x2b53f9);if(_0x196585&&!isRuntimeAccessibleApp(_0x196585))throw runtimeInaccessibleAppError(_0x196585,'appcode\x20\x22'+_0x2b53f9+'\x22');}export async function runCommand(_0x53d4e2,_0x4290ed){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x53d4e2)?withUpdateNotice(_0x53d4e2):_0x53d4e2,_0x4290ed,runnerAdapter);}function shouldAttachUpdateNotice(_0x278c6e){const _0x2b98df=a79_0xb0580a;return![_0x2b98df(0xe7),_0x2b98df(0xf7),_0x2b98df(0x100)]['includes'](_0x278c6e[_0x2b98df(0xdd)]);}function withUpdateNotice(_0x41833b){return{..._0x41833b,async 'execute'(_0x1dcb5f){const _0x5b54ea=a79_0x382c,_0x540415=shouldResolveUpdateNotice(_0x1dcb5f)?resolveLatestUpdateNotice()[_0x5b54ea(0xf8)](()=>null):Promise['resolve'](null),_0x4512ef=await _0x41833b[_0x5b54ea(0xe2)](_0x1dcb5f);return attachUpdateNotice(_0x4512ef,await _0x540415);}};}function shouldResolveUpdateNotice(_0x761845){const _0x49a9d1=a79_0xb0580a;return _0x761845[_0x49a9d1(0xea)]===_0x49a9d1(0xff)&&!_0x761845[_0x49a9d1(0x101)];}function attachUpdateNotice(_0x2cab87,_0x2c4164){const _0x42db7e=a79_0xb0580a;if(!_0x2c4164||!_0x2cab87||typeof _0x2cab87!=='object')return _0x2cab87;const _0x3e265c=_0x2cab87,_0x22295b=typeof _0x3e265c[_0x42db7e(0xdb)]==='object'&&_0x3e265c[_0x42db7e(0xdb)]!==null?_0x3e265c[_0x42db7e(0xdb)]:{};return{..._0x3e265c,'_notice':{..._0x22295b,'update':_0x2c4164}};}
@@ -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 a80_0x31d0(_0x971cc3,_0x18270a){_0x971cc3=_0x971cc3-0x97;const _0x13c778=a80_0x13c7();let _0x31d096=_0x13c778[_0x971cc3];return _0x31d096;}(function(_0x2818b7,_0x4972a2){const _0x24cee0=a80_0x31d0,_0x57f528=_0x2818b7();while(!![]){try{const _0x53fca5=-parseInt(_0x24cee0(0x9d))/0x1+-parseInt(_0x24cee0(0xa7))/0x2+parseInt(_0x24cee0(0xa1))/0x3+-parseInt(_0x24cee0(0x9c))/0x4*(parseInt(_0x24cee0(0x99))/0x5)+parseInt(_0x24cee0(0x97))/0x6*(-parseInt(_0x24cee0(0xa0))/0x7)+-parseInt(_0x24cee0(0xa6))/0x8*(parseInt(_0x24cee0(0xa2))/0x9)+parseInt(_0x24cee0(0xa4))/0xa*(parseInt(_0x24cee0(0x9f))/0xb);if(_0x53fca5===_0x4972a2)break;else _0x57f528['push'](_0x57f528['shift']());}catch(_0x445f80){_0x57f528['push'](_0x57f528['shift']());}}}(a80_0x13c7,0x520c8));import{buildSchemaPayload as a80_0x2809f0}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';function a80_0x13c7(){const _0x59abda=['auth','35272zjXaOb','1029532KpVKUN','38412vTuHaF','filter','1686355XJMzbP','none','map','4YMgqwA','380826RxHmUT','commands','8851227FYPPwR','63ANOcDz','316257IRGsOW','180UpdTFq','../commands/registry.js','20IFKRlp'];a80_0x13c7=function(){return _0x59abda;};return a80_0x13c7();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x447696=a80_0x31d0,{serviceRegistry:_0x57b637,findDefinition:_0x3ddff1}=await import(_0x447696(0xa3)),_0x23b36a=new Set(_0x57b637[_0x447696(0x9b)](_0x1ff311=>_0x1ff311['service'])),_0x43ee77=listDynamicServiceEntries()[_0x447696(0x98)](_0x54a560=>!_0x23b36a['has'](_0x54a560['service'])),_0x39091e=a80_0x2809f0({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x57b637,..._0x43ee77],'buildAllFlags':buildAllFlags,'findDefinition':(_0x48d917,_0x32c83a)=>_0x3ddff1(_0x48d917,_0x32c83a)??findDynamicServiceDefinition(_0x48d917,_0x32c83a)});return normalizeSchemaPayload(_0x39091e);}function normalizeSchemaPayload(_0x3a0524){const _0x38e062=a80_0x31d0;return{..._0x3a0524,'schemaVersion':0x2,'services':_0x3a0524['services']['map'](_0x4748e1=>({..._0x4748e1,'commands':_0x4748e1[_0x38e062(0x9e)][_0x38e062(0x9b)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x50048e){const _0x11ced2=a80_0x31d0,_0x1a251d=_0x50048e;return{..._0x50048e,'auth':_0x1a251d[_0x11ced2(0xa5)]??(_0x50048e['requiresAuth']?'required':_0x11ced2(0x9a))};}
@@ -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 a81_0x47cc(_0x124f34,_0x36f2f5){_0x124f34=_0x124f34-0xd8;var _0x170e28=a81_0x170e();var _0x47ccbe=_0x170e28[_0x124f34];return _0x47ccbe;}(function(_0x4f318a,_0x3b0f70){var _0x2953bc=a81_0x47cc,_0x703819=_0x4f318a();while(!![]){try{var _0x4bec6b=-parseInt(_0x2953bc(0xd9))/0x1+parseInt(_0x2953bc(0xd8))/0x2*(-parseInt(_0x2953bc(0xdd))/0x3)+parseInt(_0x2953bc(0xdf))/0x4+parseInt(_0x2953bc(0xde))/0x5+parseInt(_0x2953bc(0xe1))/0x6*(parseInt(_0x2953bc(0xe0))/0x7)+parseInt(_0x2953bc(0xdc))/0x8+parseInt(_0x2953bc(0xda))/0x9*(parseInt(_0x2953bc(0xdb))/0xa);if(_0x4bec6b===_0x3b0f70)break;else _0x703819['push'](_0x703819['shift']());}catch(_0x17ab66){_0x703819['push'](_0x703819['shift']());}}}(a81_0x170e,0x2b619));function a81_0x170e(){var _0x36d002=['303868KPDndI','73548fyCciM','130hzWpuJ','179176asSram','39vAFAAr','913605dwzahW','1403388gdhumi','22575xtgSFA','102paPrnn','36226XClwxv'];a81_0x170e=function(){return _0x36d002;};return a81_0x170e();}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
+ const a82_0x26d0d6=a82_0x4c38;(function(_0x25f0ee,_0x2b8fe8){const _0x180140=a82_0x4c38,_0x27c70a=_0x25f0ee();while(!![]){try{const _0x1e6ff5=parseInt(_0x180140(0x108))/0x1*(parseInt(_0x180140(0x101))/0x2)+parseInt(_0x180140(0x104))/0x3*(parseInt(_0x180140(0xff))/0x4)+-parseInt(_0x180140(0x107))/0x5*(-parseInt(_0x180140(0x106))/0x6)+parseInt(_0x180140(0x105))/0x7*(-parseInt(_0x180140(0xfe))/0x8)+parseInt(_0x180140(0x102))/0x9+-parseInt(_0x180140(0x100))/0xa*(parseInt(_0x180140(0x10a))/0xb)+parseInt(_0x180140(0x10c))/0xc*(-parseInt(_0x180140(0x10d))/0xd);if(_0x1e6ff5===_0x2b8fe8)break;else _0x27c70a['push'](_0x27c70a['shift']());}catch(_0x14d8ad){_0x27c70a['push'](_0x27c70a['shift']());}}}(a82_0x490d,0x757e8));export const VERSION=a82_0x26d0d6(0x103);function a82_0x490d(){const _0x1782a1=['72ifAUzH','4bUcfbk','10lIyBlH','1596yJBVad','8604594qcOXvu','2.1.4','449271lDpvUT','442883NYeHxg','6nxLaWj','3937435qjOjJu','682pjombO','2026-07-04T07:04:25.154Z','9325701imvDCA','v2.1.4-beta.1','6468936KJcDTF','13wvqdAR'];a82_0x490d=function(){return _0x1782a1;};return a82_0x490d();}function a82_0x4c38(_0x5f11fb,_0x64b4e4){_0x5f11fb=_0x5f11fb-0xfe;const _0x490d1a=a82_0x490d();let _0x4c38d1=_0x490d1a[_0x5f11fb];return _0x4c38d1;}export const GIT_TAG=a82_0x26d0d6(0x10b);export const GIT_COMMIT='b4d435b';export const BUILD_TIME=a82_0x26d0d6(0x109);
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 a83_0x4708(_0x3f0d29,_0x86255){_0x3f0d29=_0x3f0d29-0x8e;const _0x2fb85a=a83_0x2fb8();let _0x47083f=_0x2fb85a[_0x3f0d29];return _0x47083f;}function a83_0x2fb8(){const _0x5385de=['\x20--help','1498878bHuUsi','column','\x20to\x20view\x20available\x20commands.','20icfLNB','\x20\x20Use\x20','green','900326OKUMfP','82453dfWuco','416UQvbiP','731430vHMdCk','2534211NswFsZ','734982tAwqnj','109780EdizgM','3zFtYVa'];a83_0x2fb8=function(){return _0x5385de;};return a83_0x2fb8();}(function(_0x49f17e,_0x2ad5e6){const _0x266d84=a83_0x4708,_0x47ab72=_0x49f17e();while(!![]){try{const _0x506cd1=parseInt(_0x266d84(0x95))/0x1+-parseInt(_0x266d84(0x90))/0x2*(parseInt(_0x266d84(0x97))/0x3)+-parseInt(_0x266d84(0x96))/0x4*(-parseInt(_0x266d84(0x9c))/0x5)+parseInt(_0x266d84(0x99))/0x6+parseInt(_0x266d84(0x91))/0x7*(-parseInt(_0x266d84(0x92))/0x8)+parseInt(_0x266d84(0x94))/0x9+parseInt(_0x266d84(0x93))/0xa;if(_0x506cd1===_0x2ad5e6)break;else _0x47ab72['push'](_0x47ab72['shift']());}catch(_0x2048f5){_0x47ab72['push'](_0x47ab72['shift']());}}}(a83_0x2fb8,0x5e642));import{jsx as a83_0x15c1c3,jsxs as a83_0x2ba633}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x3c3c11=a83_0x4708,{exit:_0x28fa3c}=useApp();return useEffect(()=>{_0x28fa3c();},[_0x28fa3c]),a83_0x2ba633(Box,{'flexDirection':_0x3c3c11(0x9a),'marginTop':0x1,'marginBottom':0x1,'children':[a83_0x15c1c3(Box,{'children':a83_0x15c1c3(Text,{'bold':!![],'color':_0x3c3c11(0x8f),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x2ba633(Box,{'marginTop':0x1,'children':[a83_0x15c1c3(Text,{'dimColor':!![],'children':_0x3c3c11(0x8e)}),a83_0x15c1c3(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x3c3c11(0x98)}),a83_0x15c1c3(Text,{'dimColor':!![],'children':_0x3c3c11(0x9b)})]})]});}
@@ -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
+ (function(_0x381abd,_0x3c493a){const _0x4e6910=a84_0xf447,_0x3834f7=_0x381abd();while(!![]){try{const _0x39cbc4=parseInt(_0x4e6910(0xa8))/0x1+parseInt(_0x4e6910(0xb2))/0x2+-parseInt(_0x4e6910(0xac))/0x3+parseInt(_0x4e6910(0xb5))/0x4+-parseInt(_0x4e6910(0xa6))/0x5+parseInt(_0x4e6910(0xb4))/0x6+-parseInt(_0x4e6910(0xaf))/0x7;if(_0x39cbc4===_0x3c493a)break;else _0x3834f7['push'](_0x3834f7['shift']());}catch(_0x40c2a2){_0x3834f7['push'](_0x3834f7['shift']());}}}(a84_0x46ec,0xe446f));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a84_0x41717c}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a84_0x41717c;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);function a84_0xf447(_0x4d5507,_0x26baa2){_0x4d5507=_0x4d5507-0xa6;const _0x46ec4f=a84_0x46ec();let _0xf4472b=_0x46ec4f[_0x4d5507];return _0xf4472b;}function a84_0x46ec(){const _0x55e0d2=['skills','trim','pipe','543210iWfXyM','stdout','1469099YYkgwS','add','status','unknown','4693224NZseOP','toString','inherit','6996626GXlxhv','stderr','stdio','2301610JbtDTu','exit\x20','1509234owcEFO','2944592mTrfXg'];a84_0x46ec=function(){return _0x55e0d2;};return a84_0x46ec();}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x405c6a,_0x30d80a=LOVRABET_SKILL_SOURCE,_0x35a98b){const _0x544162=a84_0xf447;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2e949e=_0x35a98b?.[_0x544162(0xb1)]??_0x544162(0xae),_0x551872=resolveNpmBin('npx'),_0x3bb015=[_0x544162(0xb6),_0x544162(0xa9),_0x30d80a,'-g','-y'],_0x294b3b=[_0x551872,..._0x3bb015]['join']('\x20');console['log']('*\x20'+_0x294b3b);const _0x4f2d7e=spawnSync(_0x551872,_0x3bb015,{'cwd':_0x405c6a,'stdio':_0x2e949e,'env':process.env,'shell':![]});if(_0x4f2d7e['status']===0x0)return{'ok':!![],'status':0x0};let _0x27c0e0=_0x544162(0xb3)+(_0x4f2d7e[_0x544162(0xaa)]??_0x544162(0xab));if(_0x2e949e===_0x544162(0xb8)){const _0x4f0c59=_0x4f2d7e[_0x544162(0xb0)]?_0x4f2d7e[_0x544162(0xb0)][_0x544162(0xad)]()[_0x544162(0xb7)]():'',_0x28bedc=_0x4f2d7e[_0x544162(0xa7)]?_0x4f2d7e[_0x544162(0xa7)][_0x544162(0xad)]()[_0x544162(0xb7)]():'';if(_0x4f0c59)_0x27c0e0=_0x4f0c59;else{if(_0x28bedc)_0x27c0e0=_0x28bedc;}}return{'ok':![],'status':_0x4f2d7e[_0x544162(0xaa)]??null,'error':_0x27c0e0};}
@@ -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_0x1e9df3=a85_0x31d8;(function(_0x5bbf98,_0x14a138){const _0x5ea7dd=a85_0x31d8,_0x1b84fd=_0x5bbf98();while(!![]){try{const _0x37f97a=-parseInt(_0x5ea7dd(0xe9))/0x1*(parseInt(_0x5ea7dd(0xef))/0x2)+parseInt(_0x5ea7dd(0xf0))/0x3+parseInt(_0x5ea7dd(0xe5))/0x4*(parseInt(_0x5ea7dd(0xe4))/0x5)+parseInt(_0x5ea7dd(0xf6))/0x6+-parseInt(_0x5ea7dd(0xf1))/0x7+-parseInt(_0x5ea7dd(0xe6))/0x8*(-parseInt(_0x5ea7dd(0xec))/0x9)+-parseInt(_0x5ea7dd(0xea))/0xa;if(_0x37f97a===_0x14a138)break;else _0x1b84fd['push'](_0x1b84fd['shift']());}catch(_0x3bc95a){_0x1b84fd['push'](_0x1b84fd['shift']());}}}(a85_0x5933,0x46380));function a85_0x31d8(_0x64cdce,_0x10bff4){_0x64cdce=_0x64cdce-0xe1;const _0x59331b=a85_0x5933();let _0x31d853=_0x59331b[_0x64cdce];return _0x31d853;}export const METADATA_FILE=a85_0x1e9df3(0xe3);function a85_0x5933(){const _0x2ed02c=['coverage','878726YwhZVE','413223LcJLKy','413840xJDixC','.hg','.next','.svn','.git','2150634bqtiTM','.cache','build','lovrabet.skill.json','5VwXdqq','1656908KViLmG','8uPSmeh','dist','node_modules','1bQPlPA','5918170NxLquh','.DS_Store','4207581oAiUOL','.turbo'];a85_0x5933=function(){return _0x2ed02c;};return a85_0x5933();}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,a85_0x1e9df3(0xeb)]);export const IGNORED_DIR_NAMES=new Set([a85_0x1e9df3(0xf5),a85_0x1e9df3(0xf2),a85_0x1e9df3(0xf4),a85_0x1e9df3(0xe8),a85_0x1e9df3(0xf3),a85_0x1e9df3(0xe7),a85_0x1e9df3(0xe2),a85_0x1e9df3(0xee),a85_0x1e9df3(0xed),a85_0x1e9df3(0xe1)]);
@@ -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(_0x3e4a99,_0x5299b5){const _0x1fbeda=a86_0x238f,_0x3c5c69=_0x3e4a99();while(!![]){try{const _0x106173=parseInt(_0x1fbeda(0x16a))/0x1*(parseInt(_0x1fbeda(0x170))/0x2)+parseInt(_0x1fbeda(0x15f))/0x3*(parseInt(_0x1fbeda(0x15d))/0x4)+-parseInt(_0x1fbeda(0x15e))/0x5+-parseInt(_0x1fbeda(0x169))/0x6*(-parseInt(_0x1fbeda(0x171))/0x7)+parseInt(_0x1fbeda(0x167))/0x8*(parseInt(_0x1fbeda(0x15c))/0x9)+parseInt(_0x1fbeda(0x168))/0xa*(-parseInt(_0x1fbeda(0x161))/0xb)+-parseInt(_0x1fbeda(0x165))/0xc*(-parseInt(_0x1fbeda(0x16b))/0xd);if(_0x106173===_0x5299b5)break;else _0x3c5c69['push'](_0x3c5c69['shift']());}catch(_0x989520){_0x3c5c69['push'](_0x3c5c69['shift']());}}}(a86_0x41b7,0x86122));function a86_0x238f(_0x4a6452,_0x1e7338){_0x4a6452=_0x4a6452-0x15c;const _0x41b77f=a86_0x41b7();let _0x238ff9=_0x41b77f[_0x4a6452];return _0x238ff9;}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(_0x189bac,_0x7e7cf4){const _0x31b96e=a86_0x238f,_0x591d77=normalizeSkillRelativePath(_0x7e7cf4),_0x565ae8=realOrResolved(_0x189bac),_0x308c86=resolve(_0x565ae8,..._0x591d77[_0x31b96e(0x164)]('/'));if(!isPathInside(_0x308c86,_0x565ae8))throw CliErrors['validation'](_0x31b96e(0x16c)+_0x7e7cf4);return ensureNoSymlinkInManagedPath(_0x565ae8,_0x591d77),_0x308c86;}export function ensureNoSymlinkInManagedPath(_0x4f02a0,_0x2b45e8){const _0x4b9f41=a86_0x238f;let _0x5c7f23=_0x4f02a0;for(const _0x4c6367 of _0x2b45e8[_0x4b9f41(0x164)]('/')){_0x5c7f23=resolve(_0x5c7f23,_0x4c6367);const _0x1cdce4=lstatIfPresent(_0x5c7f23);if(_0x1cdce4?.[_0x4b9f41(0x16e)]())throw CliErrors['validation'](_0x4b9f41(0x16f)+_0x2b45e8);}}export function isDanglingSymlink(_0x3a56fd){const _0x327221=a86_0x238f;try{return lstatSync(_0x3a56fd)[_0x327221(0x16e)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4b6d0e){const _0x443b9a=readlinkSync(_0x4b6d0e);return isAbsolute(_0x443b9a)?_0x443b9a:resolve(dirname(_0x4b6d0e),_0x443b9a);}export function isPathInside(_0x1f6632,_0x3529b5){const _0x66420b=a86_0x238f,_0x2b8275=_0x1f6632[_0x66420b(0x162)](sep)?_0x1f6632:''+_0x1f6632+sep,_0x491ec6=_0x3529b5[_0x66420b(0x162)](sep)?_0x3529b5:''+_0x3529b5+sep;return _0x1f6632===_0x3529b5||_0x2b8275[_0x66420b(0x166)](_0x491ec6);}export function realOrResolved(_0x2e34a9){try{return realpathSync(_0x2e34a9);}catch{return resolve(_0x2e34a9);}}export function lstatIfPresent(_0x2a05de){try{return lstatSync(_0x2a05de);}catch{return undefined;}}export function writeTextAtomic(_0x4904ee,_0x2a70e4,_0xd31b92){const _0x183754=a86_0x238f;writeBytesAtomic(_0x4904ee,Buffer[_0x183754(0x163)](_0x2a70e4,_0x183754(0x160)),_0xd31b92);}export function writeBytesAtomic(_0x2caa5d,_0x7cf894,_0x203ded){const _0xa19719=_0x2caa5d+'.tmp';try{writeFileSync(_0xa19719,_0x7cf894,{'mode':_0x203ded}),renameSync(_0xa19719,_0x2caa5d);}catch(_0x7f3d6c){try{rmSync(_0xa19719,{'force':!![]});}catch{}throw _0x7f3d6c;}}function a86_0x41b7(){const _0x2ea2aa=['split','12VbmJmX','startsWith','293672RKGaPL','9263530SAtsYu','1248aCIbyD','884829tdJkOn','3159897qPqFRh','Unsafe\x20Skill\x20file\x20path:\x20','stringify','isSymbolicLink','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','2kAVAIw','8806KpwGCS','45KhNaEM','288MwaYdU','3463040ZYvYXY','24792tYnNge','utf8','11qceIlP','endsWith','from'];a86_0x41b7=function(){return _0x2ea2aa;};return a86_0x41b7();}export function writeJsonAtomic(_0x47f38,_0xb67fa2){const _0x264051=a86_0x238f;writeTextAtomic(_0x47f38,JSON[_0x264051(0x16d)](_0xb67fa2,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(_0x3e80f2,_0x174a72){const _0x47decb=a87_0x21b5,_0x2eed02=_0x3e80f2();while(!![]){try{const _0x31b6eb=parseInt(_0x47decb(0xf7))/0x1+parseInt(_0x47decb(0xf5))/0x2+parseInt(_0x47decb(0xff))/0x3*(-parseInt(_0x47decb(0xf2))/0x4)+-parseInt(_0x47decb(0xf6))/0x5+parseInt(_0x47decb(0xf4))/0x6+parseInt(_0x47decb(0xfc))/0x7*(-parseInt(_0x47decb(0xfd))/0x8)+parseInt(_0x47decb(0xf8))/0x9*(parseInt(_0x47decb(0xfb))/0xa);if(_0x31b6eb===_0x174a72)break;else _0x2eed02['push'](_0x2eed02['shift']());}catch(_0x91b0a6){_0x2eed02['push'](_0x2eed02['shift']());}}}(a87_0x1a74,0xd5b56));function a87_0x1a74(){const _0x44991c=['hex','2659080fqTYWe','5080691VWKfeO','8IQrEjB','digest','147bhCYXH','sha256','path','71172CfYRCW','size','3795636BYKMTz','145360KUREZS','6034290EuoAmz','49604xnKmPC','99BvQioJ','update'];a87_0x1a74=function(){return _0x44991c;};return a87_0x1a74();}import{createHash}from'node:crypto';function a87_0x21b5(_0x906bc9,_0x24fb60){_0x906bc9=_0x906bc9-0xf1;const _0x1a7423=a87_0x1a74();let _0x21b559=_0x1a7423[_0x906bc9];return _0x21b559;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x7f1d65){const _0x5728da=a87_0x21b5;return createHash(_0x5728da(0x100))[_0x5728da(0xf9)](_0x7f1d65)[_0x5728da(0xfe)](_0x5728da(0xfa));}export function fileHash(_0x388b31){return bufferSha256(fileContent(_0x388b31));}export function bufferSha256(_0x3b0dc6){const _0x11c30b=a87_0x21b5;return createHash(_0x11c30b(0x100))[_0x11c30b(0xf9)](_0x3b0dc6)['digest'](_0x11c30b(0xfa));}export function fileTreeHash(_0x1198c0){const _0x218776=a87_0x21b5,_0x1844f8=createHash(_0x218776(0x100));for(const _0x4d9809 of normalizeManifestFiles(_0x1198c0)){_0x1844f8[_0x218776(0xf9)](_0x4d9809[_0x218776(0xf1)]),_0x1844f8[_0x218776(0xf9)]('\x00'),_0x1844f8[_0x218776(0xf9)](_0x4d9809[_0x218776(0x100)]),_0x1844f8[_0x218776(0xf9)]('\x00'),_0x1844f8[_0x218776(0xf9)](String(_0x4d9809[_0x218776(0xf3)])),_0x1844f8[_0x218776(0xf9)]('\x00');}return _0x1844f8[_0x218776(0xfe)](_0x218776(0xfa));}
@@ -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(_0x4e6bfc,_0x1099b2){const _0x2eb8dc=a88_0x40cf,_0x59c372=_0x4e6bfc();while(!![]){try{const _0x22cc09=parseInt(_0x2eb8dc(0x1c3))/0x1*(-parseInt(_0x2eb8dc(0x1a1))/0x2)+parseInt(_0x2eb8dc(0x1bc))/0x3+parseInt(_0x2eb8dc(0x1b8))/0x4*(parseInt(_0x2eb8dc(0x195))/0x5)+-parseInt(_0x2eb8dc(0x1a0))/0x6+parseInt(_0x2eb8dc(0x1a9))/0x7+-parseInt(_0x2eb8dc(0x1b1))/0x8*(parseInt(_0x2eb8dc(0x19d))/0x9)+-parseInt(_0x2eb8dc(0x1c4))/0xa;if(_0x22cc09===_0x1099b2)break;else _0x59c372['push'](_0x59c372['shift']());}catch(_0x3ad195){_0x59c372['push'](_0x59c372['shift']());}}}(a88_0x2c77,0x88534));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a88_0x40e2be from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a88_0x40e2be;function a88_0x2c77(){const _0x5492f3=['2386RGiKXj','scopes','pruneSkillCodes','isSymbolicLink','company','appCode','length','external-symlink','3649345SoZpTu','not-managed-symlink','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','skillCode','has','get','isDirectory','managedRoot','4848RxGrKc','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','created','values','set','removed','personal','40PHFifX','validation','name','builtin','2731800jOoKtU','push','skill','dir','map','env','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','61TOTiCl','2406670Obsids','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','activeSkillCodes','261915DmkQpg','agentsSkillsDir','contentHash','updated','metadata-mismatch','filter','trim','skipped','450aHHvLZ','scope','unchanged','6321822ToyiUr'];a88_0x2c77=function(){return _0x5492f3;};return a88_0x2c77();}export function linkEffectiveRuntimeSkills(_0x51c455,_0x4dea67,_0x4606d8={}){const _0x2f9900=a88_0x40cf,_0x1adbf3=new Map();for(const _0x597fdc of _0x51c455){const _0x3c9f88=_0x597fdc['skill']['skillCode'];if(!_0x3c9f88)continue;const _0x3eadc8=_0x1adbf3[_0x2f9900(0x1ae)](_0x3c9f88);(!_0x3eadc8||_0x597fdc[_0x2f9900(0x19e)]===_0x2f9900(0x1b7))&&_0x1adbf3[_0x2f9900(0x1b5)](_0x3c9f88,_0x597fdc);}const _0x466b75=[],_0x5caf16=resolveSkillSyncPaths(_0x4606d8);for(const _0x151b12 of _0x1adbf3[_0x2f9900(0x1b4)]()){const _0x21a536=requireSkillCode(_0x151b12['skill']),_0x26c072=_0x4dea67+'--'+_0x21a536;for(const _0x5f2278 of[_0x5caf16[_0x2f9900(0x196)],_0x5caf16['claudeSkillsDir']]){_0x466b75[_0x2f9900(0x1bd)](ensureManagedSymlink(resolve(_0x5f2278,_0x26c072),_0x151b12[_0x2f9900(0x1bf)],_0x5caf16[_0x2f9900(0x1b0)]));}}return _0x466b75;}export function pruneStaleRuntimeSkillLinks(_0x50cdfb,_0x3f13b1,_0x2df2b6={},_0x18e88e){const _0x5f418b=a88_0x40cf,_0x1b1ba5=resolveSkillSyncPaths(_0x2df2b6),_0x5b5e75=new Set([..._0x3f13b1]['map'](_0x5cd5d3=>_0x5cd5d3['trim']())[_0x5f418b(0x19a)](Boolean)),_0x4bba8c=_0x18e88e?new Set([..._0x18e88e][_0x5f418b(0x1c0)](_0x33157e=>_0x33157e[_0x5f418b(0x19b)]())['filter'](Boolean)):undefined,_0x222ada=[];for(const _0x1b523e of[_0x1b1ba5[_0x5f418b(0x196)],_0x1b1ba5['claudeSkillsDir']]){for(const _0x48ed06 of managedAppSkillLinkPaths(_0x1b523e,_0x50cdfb)){const _0x5b3cb2=basename(_0x48ed06)['slice']((_0x50cdfb+'--')[_0x5f418b(0x1a7)]);if(_0x4bba8c&&!_0x4bba8c['has'](_0x5b3cb2))continue;if(_0x5b5e75[_0x5f418b(0x1ad)](_0x5b3cb2))continue;_0x222ada['push'](removeManagedSkillLink(_0x48ed06,_0x1b1ba5[_0x5f418b(0x1b0)]));}}return _0x222ada;}export function pruneStaleRuntimeSkillCache(_0x1f7a90,_0xee61cb={}){const _0x3e6815=a88_0x40cf,_0x2bd01e=new Set([..._0x1f7a90[_0x3e6815(0x194)]]['map'](_0x1a3a65=>_0x1a3a65['trim']())[_0x3e6815(0x19a)](Boolean)),_0x4bbf50=_0x1f7a90[_0x3e6815(0x1a3)]?new Set([..._0x1f7a90[_0x3e6815(0x1a3)]]['map'](_0x1ee266=>_0x1ee266[_0x3e6815(0x19b)]())[_0x3e6815(0x19a)](Boolean)):undefined,_0x8ac06f=_0x1f7a90[_0x3e6815(0x1a2)]??[_0x3e6815(0x1b7),_0x3e6815(0x1a5)],_0x4dda47=resolve(getRuntimeSkillCacheRoot(_0x1f7a90[_0x3e6815(0x1c1)],_0x1f7a90['accessKey'],_0xee61cb),safePathSegment(_0x1f7a90['appCode'],_0x3e6815(0x1a6))),_0xd0a5e5=[];for(const _0x4a5a45 of _0x8ac06f){const _0x4011bd=resolve(_0x4dda47,_0x4a5a45);if(!existsSync(_0x4011bd))continue;for(const _0x3ba31f of readdirSync(_0x4011bd,{'withFileTypes':!![]})){if(!_0x3ba31f[_0x3e6815(0x1af)]())continue;const _0x4c2e17=_0x3ba31f[_0x3e6815(0x1ba)];if(_0x4bbf50&&!_0x4bbf50[_0x3e6815(0x1ad)](_0x4c2e17))continue;if(_0x2bd01e[_0x3e6815(0x1ad)](_0x4c2e17))continue;const _0x12878a=resolve(_0x4011bd,_0x4c2e17),_0x46c11e=readMetadataIfPresent(resolve(_0x12878a,METADATA_FILE));if(_0x46c11e?.[_0x3e6815(0x1a6)]!==_0x1f7a90[_0x3e6815(0x1a6)]||_0x46c11e['scope']!==_0x4a5a45||_0x46c11e[_0x3e6815(0x1ac)]!==_0x4c2e17){_0xd0a5e5[_0x3e6815(0x1bd)]({'path':_0x12878a,'action':_0x3e6815(0x19c),'reason':_0x3e6815(0x199)});continue;}removeSync(_0x12878a),_0xd0a5e5[_0x3e6815(0x1bd)]({'path':_0x12878a,'action':_0x3e6815(0x1b6)});}}return _0xd0a5e5;}export function linkGlobalRuntimeSkills(_0x3c7d11,_0x2a29a1={}){const _0x2ce543=a88_0x40cf,_0x5184bb=resolveSkillSyncPaths(_0x2a29a1),_0x159970=[];for(const _0x49b2c0 of _0x3c7d11){if(_0x49b2c0[_0x2ce543(0x19e)]!==_0x2ce543(0x1bb))throw CliErrors[_0x2ce543(0x1b9)](_0x2ce543(0x1ab)+_0x49b2c0[_0x2ce543(0x19e)]);const _0x181eec=requireSkillCode(_0x49b2c0[_0x2ce543(0x1be)]),_0x1f0f30=copyManagedSkillDirectory(_0x49b2c0[_0x2ce543(0x1bf)],resolve(_0x5184bb[_0x2ce543(0x196)],_0x181eec));_0x159970[_0x2ce543(0x1bd)]({..._0x1f0f30,'contentHash':_0x49b2c0[_0x2ce543(0x197)]});}return _0x159970;}function ensureManagedSymlink(_0x3162f0,_0x264913,_0x134f7f){const _0xe5ae03=a88_0x40cf;mkdirSync(dirname(_0x3162f0),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3162f0)||isDanglingSymlink(_0x3162f0)){const _0x3e8fd7=lstatSync(_0x3162f0);if(!_0x3e8fd7[_0xe5ae03(0x1a4)]())throw CliErrors[_0xe5ae03(0x1b9)](_0xe5ae03(0x1c5)+_0x3162f0);const _0x50c188=resolveSymlinkTarget(_0x3162f0);if(!isPathInside(realOrResolved(_0x50c188),realOrResolved(_0x134f7f)))throw CliErrors[_0xe5ae03(0x1b9)](_0xe5ae03(0x1c2)+_0x3162f0);if(realOrResolved(_0x50c188)===realOrResolved(_0x264913))return{'path':_0x3162f0,'target':_0x264913,'action':_0xe5ae03(0x19f)};return unlinkSync(_0x3162f0),symlinkSync(_0x264913,_0x3162f0,'dir'),{'path':_0x3162f0,'target':_0x264913,'action':_0xe5ae03(0x198)};}return symlinkSync(_0x264913,_0x3162f0,_0xe5ae03(0x1bf)),{'path':_0x3162f0,'target':_0x264913,'action':_0xe5ae03(0x1b3)};}function a88_0x40cf(_0x3d52eb,_0xdbe3ff){_0x3d52eb=_0x3d52eb-0x194;const _0x2c77ae=a88_0x2c77();let _0x40cfc5=_0x2c77ae[_0x3d52eb];return _0x40cfc5;}function managedAppSkillLinkPaths(_0x40704b,_0x3c9849){const _0x44dcc2=a88_0x40cf;if(!existsSync(_0x40704b))return[];const _0x260e69=_0x3c9849+'--';return readdirSync(_0x40704b,{'withFileTypes':!![]})[_0x44dcc2(0x19a)](_0x5065a1=>_0x5065a1[_0x44dcc2(0x1ba)]['startsWith'](_0x260e69))[_0x44dcc2(0x1c0)](_0x465716=>resolve(_0x40704b,_0x465716[_0x44dcc2(0x1ba)]));}function removeManagedSkillLink(_0x4976d1,_0xbacd35){const _0x295581=a88_0x40cf,_0x274a1a=lstatIfPresent(_0x4976d1);if(!_0x274a1a?.[_0x295581(0x1a4)]())return{'path':_0x4976d1,'action':_0x295581(0x19c),'reason':_0x295581(0x1aa)};const _0x157e3c=resolveSymlinkTarget(_0x4976d1);if(!isPathInside(realOrResolved(_0x157e3c),realOrResolved(_0xbacd35)))return{'path':_0x4976d1,'action':'skipped','reason':_0x295581(0x1a8)};return unlinkSync(_0x4976d1),{'path':_0x4976d1,'action':_0x295581(0x1b6)};}export function copyManagedSkillDirectory(_0xcd2207,_0x10fd09){const _0x540698=a88_0x40cf,_0x46b00e=resolve(_0x10fd09,METADATA_FILE),_0x44566e=existsSync(_0x10fd09);if(_0x44566e){const _0x5120a0=lstatSync(_0x10fd09);if(_0x5120a0['isSymbolicLink']())throw CliErrors[_0x540698(0x1b9)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x10fd09);if(!_0x5120a0[_0x540698(0x1af)]())throw CliErrors[_0x540698(0x1b9)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x10fd09);const _0x2cd0df=readMetadataIfPresent(_0x46b00e);if(_0x2cd0df?.[_0x540698(0x19e)]!==_0x540698(0x1bb))throw CliErrors['validation'](_0x540698(0x1b2)+_0x10fd09);}ensureDirSync(dirname(_0x10fd09));const _0x2a9aa5=_0x44566e?readMetadataIfPresent(_0x46b00e)?.['contentHash']:undefined,_0x2e83e5=readMetadataIfPresent(resolve(_0xcd2207,METADATA_FILE))?.[_0x540698(0x197)];return _0x44566e&&removeSync(_0x10fd09),copySkillDirectory(_0xcd2207,_0x10fd09),{'path':_0x10fd09,'target':_0xcd2207,'action':!_0x44566e?_0x540698(0x1b3):_0x2a9aa5===_0x2e83e5?_0x540698(0x19f):'updated'};}function copySkillDirectory(_0x693ffe,_0x2cc80f){copySync(_0x693ffe,_0x2cc80f,{'dereference':![],'overwrite':!![],'filter'(_0x342463){const _0xd1ce9d=a88_0x40cf;if(lstatSync(_0x342463)[_0xd1ce9d(0x1a4)]())throw CliErrors[_0xd1ce9d(0x1b9)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x342463);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(_0x4f1b18,_0x1d4e25){const _0xa54d61=a89_0x599c,_0x5396af=_0x4f1b18();while(!![]){try{const _0x9347f8=-parseInt(_0xa54d61(0x11c))/0x1+parseInt(_0xa54d61(0x11b))/0x2*(parseInt(_0xa54d61(0x124))/0x3)+parseInt(_0xa54d61(0x121))/0x4*(-parseInt(_0xa54d61(0x12b))/0x5)+parseInt(_0xa54d61(0x125))/0x6+-parseInt(_0xa54d61(0x11f))/0x7*(parseInt(_0xa54d61(0x126))/0x8)+-parseInt(_0xa54d61(0x11e))/0x9+parseInt(_0xa54d61(0x110))/0xa;if(_0x9347f8===_0x1d4e25)break;else _0x5396af['push'](_0x5396af['shift']());}catch(_0xe3aee7){_0x5396af['push'](_0x5396af['shift']());}}}(a89_0x7937,0xdaea4));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a89_0x7937(){const _0x549e6b=['get','startsWith','2383135gEoHKe','cacheDir','dir','agentsSkillsDir','link','set','env','filter','linkedPaths','sort','isDirectory','name','scope','includes','trim','skillCode','17851660oseFSz','map','code','skillMdPath','source','localeCompare','tags','isSymbolicLink','appCode','has','metadataPath','1150OroWhZ','1549390IlClHh','scopes','11293560pfLQBM','322uIPSHA','push','4OIlAPn','accessKey','linkedPath','8448DoISgL','7020606bdFZZU','69032PFHNzi','cache','from'];a89_0x7937=function(){return _0x549e6b;};return a89_0x7937();}function a89_0x599c(_0x39d3bc,_0x2860cd){_0x39d3bc=_0x39d3bc-0x10e;const _0x793748=a89_0x7937();let _0x599c48=_0x793748[_0x39d3bc];return _0x599c48;}export function listLocalRuntimeSkills(_0xd12077,_0xb23265={}){const _0x477806=a89_0x599c,_0x32e688=safePathSegment(_0xd12077[_0x477806(0x118)],_0x477806(0x118)),_0x8fcdd2=normalizeRuntimeSkillScopes(_0xd12077[_0x477806(0x11d)]),_0xdd5d85=new Set(_0x8fcdd2),_0x1dc1e8=_0xd12077['code']?.['trim'](),_0x402a95=new Map(),_0x47068c=resolve(getRuntimeSkillCacheRoot(_0xd12077[_0x477806(0x131)],_0xd12077[_0x477806(0x122)],_0xb23265),_0x32e688);for(const _0x3de95a of _0x8fcdd2){for(const _0x4ea476 of localSkillEntryDirs(resolve(_0x47068c,_0x3de95a))){collectLocalRuntimeSkill(_0x402a95,_0x4ea476,{'appCode':_0x32e688,'scopes':_0xdd5d85,'code':_0x1dc1e8,'source':_0x477806(0x127)});}}const _0x4b77b1=resolveSkillSyncPaths(_0xb23265);for(const _0x34174f of[_0x4b77b1[_0x477806(0x12e)],_0x4b77b1['claudeSkillsDir']]){for(const _0x326de2 of localSkillLinkCandidates(_0x34174f,_0x32e688,_0xdd5d85)){collectLocalRuntimeSkill(_0x402a95,_0x326de2,{'appCode':_0x32e688,'scopes':_0xdd5d85,'code':_0x1dc1e8,'source':_0x477806(0x12f),'linkedPath':_0x326de2});}}return Array[_0x477806(0x128)](_0x402a95['values']())[_0x477806(0x134)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x235720){const _0xba5cd=a89_0x599c;if(!existsSync(_0x235720))return[];return readdirSync(_0x235720,{'withFileTypes':!![]})[_0xba5cd(0x132)](_0x7558dd=>_0x7558dd[_0xba5cd(0x135)]()||_0x7558dd[_0xba5cd(0x117)]())[_0xba5cd(0x111)](_0x57aaa7=>resolve(_0x235720,_0x57aaa7[_0xba5cd(0x136)]));}function localSkillLinkCandidates(_0x2b45fd,_0x8f800f,_0x3e6edf){const _0x3328bf=a89_0x599c;if(!existsSync(_0x2b45fd))return[];const _0x364ca9=_0x8f800f+'--';return readdirSync(_0x2b45fd,{'withFileTypes':!![]})[_0x3328bf(0x132)](_0x2aaf6c=>_0x2aaf6c[_0x3328bf(0x135)]()||_0x2aaf6c[_0x3328bf(0x117)]())['filter'](_0x40ca1f=>_0x40ca1f[_0x3328bf(0x136)][_0x3328bf(0x12a)](_0x364ca9)||_0x3e6edf[_0x3328bf(0x119)]('builtin'))[_0x3328bf(0x111)](_0x130659=>resolve(_0x2b45fd,_0x130659[_0x3328bf(0x136)]));}function collectLocalRuntimeSkill(_0x1ad8a8,_0x42c04c,_0x20ded8){const _0x1e2851=a89_0x599c,_0x2db0cf=resolve(_0x42c04c,METADATA_FILE),_0x502cde=readMetadataIfPresent(_0x2db0cf);if(!_0x502cde)return;if(_0x502cde['appCode']!==_0x20ded8[_0x1e2851(0x118)])return;if(!isRuntimeSkillScope(_0x502cde[_0x1e2851(0x137)])||!_0x20ded8[_0x1e2851(0x11d)][_0x1e2851(0x119)](_0x502cde['scope']))return;const _0x21d00f=_0x502cde[_0x1e2851(0x10f)]?.[_0x1e2851(0x10e)]();if(!_0x21d00f)return;if(_0x20ded8['code']&&_0x21d00f!==_0x20ded8[_0x1e2851(0x112)])return;const _0x57d4e1=_0x502cde[_0x1e2851(0x137)]+':'+_0x21d00f,_0x3e6ab1=_0x20ded8[_0x1e2851(0x123)]?[_0x20ded8[_0x1e2851(0x123)]]:[],_0x3a82d7=_0x1ad8a8[_0x1e2851(0x129)](_0x57d4e1);if(_0x3a82d7){_0x20ded8[_0x1e2851(0x114)]===_0x1e2851(0x127)&&(_0x3a82d7[_0x1e2851(0x12d)]=_0x42c04c,_0x3a82d7[_0x1e2851(0x12c)]=_0x42c04c,_0x3a82d7[_0x1e2851(0x113)]=resolve(_0x42c04c,SKILL_FILE),_0x3a82d7[_0x1e2851(0x11a)]=_0x2db0cf);for(const _0xa608 of _0x3e6ab1){!_0x3a82d7['linkedPaths'][_0x1e2851(0x138)](_0xa608)&&_0x3a82d7[_0x1e2851(0x133)][_0x1e2851(0x120)](_0xa608);}_0x3a82d7[_0x1e2851(0x133)][_0x1e2851(0x134)]();return;}_0x1ad8a8[_0x1e2851(0x130)](_0x57d4e1,{..._0x502cde,'tags':Array['isArray'](_0x502cde[_0x1e2851(0x116)])?_0x502cde[_0x1e2851(0x116)]:[],'scope':_0x502cde[_0x1e2851(0x137)],'source':'local','dir':_0x42c04c,'cacheDir':_0x20ded8['source']===_0x1e2851(0x127)?_0x42c04c:undefined,'skillMdPath':resolve(_0x42c04c,SKILL_FILE),'metadataPath':_0x2db0cf,'linkedPaths':_0x3e6ab1});}function compareLocalRuntimeSkills(_0x24e0ee,_0x6fb614){const _0x266228=a89_0x599c,_0x34a68e={'personal':0x0,'company':0x1,'builtin':0x2};return _0x34a68e[_0x24e0ee[_0x266228(0x137)]]-_0x34a68e[_0x6fb614[_0x266228(0x137)]]||_0x24e0ee[_0x266228(0x10f)][_0x266228(0x115)](_0x6fb614[_0x266228(0x10f)])||_0x24e0ee[_0x266228(0x12d)][_0x266228(0x115)](_0x6fb614[_0x266228(0x12d)]);}
@@ -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(_0x2552b2,_0x5a616c){const _0x3d8b52=a90_0x1d5c,_0xd90043=_0x2552b2();while(!![]){try{const _0xf929ec=parseInt(_0x3d8b52(0x18a))/0x1*(parseInt(_0x3d8b52(0x181))/0x2)+-parseInt(_0x3d8b52(0x184))/0x3+-parseInt(_0x3d8b52(0x179))/0x4*(-parseInt(_0x3d8b52(0x174))/0x5)+-parseInt(_0x3d8b52(0x17d))/0x6+parseInt(_0x3d8b52(0x166))/0x7*(parseInt(_0x3d8b52(0x182))/0x8)+-parseInt(_0x3d8b52(0x15c))/0x9*(-parseInt(_0x3d8b52(0x16d))/0xa)+parseInt(_0x3d8b52(0x16f))/0xb*(-parseInt(_0x3d8b52(0x177))/0xc);if(_0xf929ec===_0x5a616c)break;else _0xd90043['push'](_0xd90043['shift']());}catch(_0x2e3de1){_0xd90043['push'](_0xd90043['shift']());}}}(a90_0x30eb,0x70023));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a90_0x1d5c(_0x3b115d,_0x32ab6e){_0x3b115d=_0x3b115d-0x15b;const _0x30eb62=a90_0x30eb();let _0x1d5c11=_0x30eb62[_0x3b115d];return _0x1d5c11;}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(_0x4d2874){const _0x36d5be=a90_0x1d5c;return _0x4d2874[_0x36d5be(0x163)]??Buffer[_0x36d5be(0x183)](_0x4d2874[_0x36d5be(0x167)]??'',_0x36d5be(0x17b));}function a90_0x30eb(){const _0x1281a2=['103078puMntL','10232GzRGCZ','from','1604142IcQxIx','set','test','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','has','startsWith','13kqEczl','Skill\x20file\x20sha256\x20is\x20invalid:\x20','9621CxoFgT','path','isFile','push','split','Unsafe\x20Skill\x20file\x20path:\x20','compare','bytes','Skill\x20file\x20exceeds\x20size\x20limit:\x20','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','427NVcsdX','content','length','Skill\x20file\x20size\x20is\x20invalid:\x20','values','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','size','2920mhGUDl','toLowerCase','2563SZSdem','isDirectory','validation','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','sort','612355WSjixz','sha256','name','12504PHTGTE','isArray','8tWuHwC','includes','utf8','string','412974yIUlnq','Duplicate\x20Skill\x20file\x20path:\x20','isSymbolicLink','trim'];a90_0x30eb=function(){return _0x1281a2;};return a90_0x30eb();}export function fileText(_0x4d70a8){const _0x22aca8=a90_0x1d5c;return fileContent(_0x4d70a8)['toString'](_0x22aca8(0x17b));}export function normalizeLocalFiles(_0x556741){const _0xae62d=a90_0x1d5c;if(!Array[_0xae62d(0x178)](_0x556741)||_0x556741[_0xae62d(0x168)]===0x0)return[];if(_0x556741['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0xae62d(0x171)](_0xae62d(0x165));const _0x111cbe=new Map();let _0x28ff21=0x0;for(const _0x4d77ee of _0x556741){if(!_0x4d77ee||typeof _0x4d77ee!=='object'||typeof _0x4d77ee[_0xae62d(0x15d)]!==_0xae62d(0x17c))throw CliErrors[_0xae62d(0x171)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5b3532=normalizeSkillRelativePath(_0x4d77ee[_0xae62d(0x15d)]);if(_0x111cbe[_0xae62d(0x188)](_0x5b3532))throw CliErrors['validation'](_0xae62d(0x17e)+_0x5b3532);if(_0x4d77ee[_0xae62d(0x163)]!==undefined&&!Buffer['isBuffer'](_0x4d77ee[_0xae62d(0x163)]))throw CliErrors[_0xae62d(0x171)](_0xae62d(0x172)+_0x5b3532);if(_0x4d77ee[_0xae62d(0x163)]===undefined&&typeof _0x4d77ee['content']!==_0xae62d(0x17c))throw CliErrors[_0xae62d(0x171)](_0xae62d(0x187)+_0x5b3532);const _0x5d45db=fileContent(_0x4d77ee),_0x584c94=_0x5d45db[_0xae62d(0x168)];if(_0x584c94>MAX_SKILL_FILE_BYTES)throw CliErrors[_0xae62d(0x171)](_0xae62d(0x164)+_0x5b3532);_0x28ff21+=_0x584c94;if(_0x28ff21>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation']('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x111cbe['set'](_0x5b3532,{'path':_0x5b3532,'bytes':_0x5d45db});}return Array[_0xae62d(0x183)](_0x111cbe[_0xae62d(0x16a)]())[_0xae62d(0x173)](compareSkillFiles);}export function normalizeManifestFiles(_0x53d8ff){const _0x1b5760=a90_0x1d5c;if(!Array[_0x1b5760(0x178)](_0x53d8ff)||_0x53d8ff['length']===0x0)return[];if(_0x53d8ff[_0x1b5760(0x168)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x1b5760(0x171)](_0x1b5760(0x165));const _0x189ca7=new Map();let _0x365c69=0x0;for(const _0x59a7b9 of _0x53d8ff){if(!_0x59a7b9||typeof _0x59a7b9!=='object'||typeof _0x59a7b9[_0x1b5760(0x15d)]!=='string')throw CliErrors[_0x1b5760(0x171)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x183acf=normalizeSkillRelativePath(_0x59a7b9[_0x1b5760(0x15d)]);if(_0x189ca7[_0x1b5760(0x188)](_0x183acf))throw CliErrors[_0x1b5760(0x171)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x183acf);if(!isSha256Hex(_0x59a7b9[_0x1b5760(0x175)]))throw CliErrors[_0x1b5760(0x171)](_0x1b5760(0x15b)+_0x183acf);if(!Number['isSafeInteger'](_0x59a7b9[_0x1b5760(0x16c)])||_0x59a7b9['size']<0x0)throw CliErrors[_0x1b5760(0x171)](_0x1b5760(0x169)+_0x183acf);if(_0x59a7b9[_0x1b5760(0x16c)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x1b5760(0x171)]('Skill\x20file\x20exceeds\x20size\x20limit:\x20'+_0x183acf);_0x365c69+=_0x59a7b9[_0x1b5760(0x16c)];if(_0x365c69>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x1b5760(0x171)](_0x1b5760(0x16b));_0x189ca7[_0x1b5760(0x185)](_0x183acf,{'path':_0x183acf,'sha256':_0x59a7b9['sha256'][_0x1b5760(0x16e)](),'size':_0x59a7b9[_0x1b5760(0x16c)]});}return Array[_0x1b5760(0x183)](_0x189ca7['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0xce4345){const _0xa5cc03=realpathSync(_0xce4345),_0x539d09=[];let _0x9949b3=0x0;function _0x14265a(_0x2e96b0){const _0x564eed=a90_0x1d5c,_0x28831b=readdirSync(_0x2e96b0,{'withFileTypes':!![]})[_0x564eed(0x173)]((_0x45eafb,_0x2f8638)=>_0x45eafb['name']['localeCompare'](_0x2f8638[_0x564eed(0x176)]));for(const _0x34a8dd of _0x28831b){if(_0x34a8dd['isDirectory']()&&IGNORED_DIR_NAMES[_0x564eed(0x188)](_0x34a8dd[_0x564eed(0x176)]))continue;if(IGNORED_FILE_NAMES[_0x564eed(0x188)](_0x34a8dd[_0x564eed(0x176)]))continue;const _0x473518=resolve(_0x2e96b0,_0x34a8dd[_0x564eed(0x176)]);if(_0x34a8dd[_0x564eed(0x17f)]())throw CliErrors[_0x564eed(0x171)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x473518);const _0x281dc7=toPosixPath(relative(_0xa5cc03,_0x473518));if(_0x34a8dd[_0x564eed(0x170)]()){_0x14265a(_0x473518);continue;}if(!_0x34a8dd[_0x564eed(0x15e)]())continue;validateSkillRelativePath(_0x281dc7);const _0x508260=readFileSync(_0x473518);if(_0x508260[_0x564eed(0x168)]>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x564eed(0x164)+_0x281dc7);_0x9949b3+=_0x508260[_0x564eed(0x168)];if(_0x9949b3>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x564eed(0x171)](_0x564eed(0x16b));_0x539d09[_0x564eed(0x15f)]({'path':_0x281dc7,'bytes':_0x508260});if(_0x539d09[_0x564eed(0x168)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x564eed(0x171)](_0x564eed(0x165));}}return _0x14265a(_0xa5cc03),normalizeLocalFiles(_0x539d09);}export function compareSkillFiles(_0x428ab1,_0x54fe0f){const _0x4b89e3=a90_0x1d5c;if(_0x428ab1['path']===SKILL_FILE)return _0x54fe0f['path']===SKILL_FILE?0x0:-0x1;if(_0x54fe0f[_0x4b89e3(0x15d)]===SKILL_FILE)return 0x1;return Buffer[_0x4b89e3(0x162)](Buffer[_0x4b89e3(0x183)](_0x428ab1['path'],_0x4b89e3(0x17b)),Buffer[_0x4b89e3(0x183)](_0x54fe0f['path'],_0x4b89e3(0x17b)));}export function normalizeSkillRelativePath(_0x41cb3c){const _0x54c44b=a90_0x1d5c,_0x2b8a77=toPosixPath(_0x41cb3c[_0x54c44b(0x180)]());return validateSkillRelativePath(_0x2b8a77),_0x2b8a77;}export function validateSkillRelativePath(_0x59caa0){const _0x418b73=a90_0x1d5c;if(!_0x59caa0||_0x59caa0[_0x418b73(0x189)]('/')||_0x59caa0[_0x418b73(0x17a)]('//'))throw CliErrors[_0x418b73(0x171)](_0x418b73(0x161)+_0x59caa0);for(const _0x5a3fe0 of _0x59caa0[_0x418b73(0x160)]('/')){if(!_0x5a3fe0||_0x5a3fe0==='.'||_0x5a3fe0==='..')throw CliErrors['validation'](_0x418b73(0x161)+_0x59caa0);}}export function toPosixPath(_0x22dbf6){return _0x22dbf6['replace'](/\\/g,'/');}export function isSha256Hex(_0x43b5d6){const _0x573b1e=a90_0x1d5c;return typeof _0x43b5d6==='string'&&/^[a-fA-F0-9]{64}$/[_0x573b1e(0x186)](_0x43b5d6);}
@@ -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(_0x3ecf51,_0x91435e){const _0x31cb8b=a91_0x1313,_0x35f56d=_0x3ecf51();while(!![]){try{const _0x5e45dc=-parseInt(_0x31cb8b(0x110))/0x1*(parseInt(_0x31cb8b(0x10a))/0x2)+parseInt(_0x31cb8b(0xec))/0x3*(parseInt(_0x31cb8b(0xfc))/0x4)+parseInt(_0x31cb8b(0xfb))/0x5*(parseInt(_0x31cb8b(0xf2))/0x6)+parseInt(_0x31cb8b(0xfd))/0x7*(-parseInt(_0x31cb8b(0x114))/0x8)+-parseInt(_0x31cb8b(0xf0))/0x9+parseInt(_0x31cb8b(0x111))/0xa+parseInt(_0x31cb8b(0xfe))/0xb*(-parseInt(_0x31cb8b(0xf7))/0xc);if(_0x5e45dc===_0x91435e)break;else _0x35f56d['push'](_0x35f56d['shift']());}catch(_0x12df2a){_0x35f56d['push'](_0x35f56d['shift']());}}}(a91_0x1554,0x8618d));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';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a91_0x1554(){const _0x12062a=['---','utf8','force','name:\x20','appCode','paths','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','map','58bEdvhY','validation','isFile','accessKey','fileHashes','contentHash','455tFEpEY','8607810Gmwqsz','test','has','3576BvfsEe','333rVVVlM','stringify','entries','path','5136921UHkqiT','replace','24ZpnzHu','find','name','description','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','124128tPDtNu','length','keys','trim','1117030AtQmrj','8212waDdgL','4711ptWkhS','583XDYCon','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','join'];a91_0x1554=function(){return _0x12062a;};return a91_0x1554();}export function materializeRuntimeSkill(_0x58f083,_0x39c5ab,_0x10282e){const _0x324be5=a91_0x1313,_0x48762d=requireSkillCode(_0x58f083),_0x45907e=requirePackageBytes(_0x48762d,_0x10282e['packageBytes']),_0x4b8b47=extractDownloadedPackage(_0x45907e),_0x718ae5=_0x4b8b47['find'](_0x45843f=>_0x45843f[_0x324be5(0xef)]===SKILL_FILE);if(!_0x718ae5)throw CliErrors[_0x324be5(0x10b)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x48762d);const _0x3c0da5=withMaterializedSkillFrontmatter(_0x4b8b47,_0x58f083,_0x48762d),_0x54ac60=_0x3c0da5[_0x324be5(0xf3)](_0x212dd7=>_0x212dd7['path']===SKILL_FILE),_0x1c83e0=fileText(_0x54ac60),_0x5a4c90=getRuntimeSkillDir(_0x10282e['env'],_0x10282e[_0x324be5(0x10d)],_0x10282e[_0x324be5(0x106)],_0x39c5ab,_0x48762d,_0x10282e[_0x324be5(0x107)]),_0x3f74d2=resolve(_0x5a4c90,SKILL_FILE),_0xe252f=resolve(_0x5a4c90,METADATA_FILE),_0xe03aff=contentHash(_0x1c83e0),_0x12be07=readMetadataIfPresent(_0xe252f)?.[_0x324be5(0x10e)];ensurePulledFilesCanBeOverwritten(_0x5a4c90,_0xe252f,_0x3c0da5,_0x10282e[_0x324be5(0x104)]===!![]),mkdirSync(_0x5a4c90,{'recursive':!![],'mode':0x1c0});const _0x558c65=existsSync(_0x3f74d2)?readFileSync(_0x3f74d2,_0x324be5(0x103)):undefined;return materializeFiles(_0x5a4c90,_0x3c0da5),removeStaleManagedFiles(_0x5a4c90,_0x12be07,_0x3c0da5),writeJsonAtomic(_0xe252f,buildMetadata(_0x58f083,_0x39c5ab,_0x10282e[_0x324be5(0x106)],_0xe03aff,_0x10282e['pulledAt'],_0x3c0da5,_0x45907e)),{'skill':_0x58f083,'scope':_0x39c5ab,'dir':_0x5a4c90,'skillMdPath':_0x3f74d2,'metadataPath':_0xe252f,'contentHash':_0xe03aff,'changed':_0x558c65!==_0x1c83e0};}function withMaterializedSkillFrontmatter(_0xdad1aa,_0x2b6fa9,_0x593929){const _0x4d9ee0=a91_0x1313;return normalizeLocalFiles(_0xdad1aa)[_0x4d9ee0(0x109)](_0x322804=>{const _0x2b9e6d=_0x4d9ee0,_0x3b367e=fileText(_0x322804);if(_0x322804[_0x2b9e6d(0xef)]!==SKILL_FILE||hasYamlFrontmatter(_0x3b367e))return _0x322804;return{'path':_0x322804['path'],'content':prependSkillFrontmatter(_0x3b367e,{'name':_0x593929,'description':_0x2b6fa9[_0x2b9e6d(0xf5)]?.[_0x2b9e6d(0xfa)]()||_0x2b6fa9['skillName']?.[_0x2b9e6d(0xfa)]()||_0x593929})};});}function hasYamlFrontmatter(_0x41c604){const _0x43c68f=a91_0x1313;return/^\uFEFF?---\s*\r?\n/[_0x43c68f(0x112)](_0x41c604);}function prependSkillFrontmatter(_0x55a4d1,_0x46b37b){const _0x1785b9=a91_0x1313,_0x520731=_0x55a4d1[_0x1785b9(0xf1)](/^\uFEFF/,'');return['---',_0x1785b9(0x105)+yamlString(_0x46b37b[_0x1785b9(0xf4)]),'description:\x20'+yamlString(_0x46b37b[_0x1785b9(0xf5)]),_0x1785b9(0x102),'',_0x520731][_0x1785b9(0x101)]('\x0a');}function yamlString(_0x26a3ef){const _0x4d15f4=a91_0x1313;return JSON[_0x4d15f4(0xed)](_0x26a3ef['replace'](/\r/g,'')[_0x4d15f4(0xfa)]());}function a91_0x1313(_0x21b54b,_0x18598f){_0x21b54b=_0x21b54b-0xec;const _0x15544f=a91_0x1554();let _0x13137a=_0x15544f[_0x21b54b];return _0x13137a;}function ensurePulledFilesCanBeOverwritten(_0x32f9de,_0x1fcd0c,_0x7b08fe,_0x2bf97e){const _0x172cf9=a91_0x1313;if(_0x2bf97e||!existsSync(_0x1fcd0c))return;const _0x2a3afd=readMetadataIfPresent(_0x1fcd0c);if(!_0x2a3afd)return;const _0x1b5251=_0x2a3afd['fileHashes']&&Object[_0x172cf9(0xf9)](_0x2a3afd[_0x172cf9(0x10e)])[_0x172cf9(0xf8)]>0x0?_0x2a3afd[_0x172cf9(0x10e)]:undefined;if(_0x1b5251)for(const [_0x1173ba,_0xf45352]of Object[_0x172cf9(0xee)](_0x1b5251)){const _0x5358e8=resolveManagedFilePath(_0x32f9de,_0x1173ba);if(!existsSync(_0x5358e8))throw CliErrors[_0x172cf9(0x10b)](_0x172cf9(0xf6)+_0x32f9de,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x1173ba);const _0x4be71b=lstatSync(_0x5358e8);if(!_0x4be71b[_0x172cf9(0x10c)]())throw CliErrors[_0x172cf9(0x10b)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x32f9de,_0x172cf9(0x100)+_0x1173ba);const _0xb2720b=bufferSha256(readFileSync(_0x5358e8));if(_0xb2720b!==_0xf45352)throw CliErrors['validation'](_0x172cf9(0xf6)+_0x32f9de+'.\x20Changed\x20file:\x20'+_0x1173ba,_0x172cf9(0x108)+_0x1173ba);}else{const _0x360dd3=resolve(_0x32f9de,SKILL_FILE);if(existsSync(_0x360dd3)&&_0x2a3afd[_0x172cf9(0x10f)]){const _0x142e0b=contentHash(readFileSync(_0x360dd3,_0x172cf9(0x103)));if(_0x142e0b!==_0x2a3afd[_0x172cf9(0x10f)])throw CliErrors[_0x172cf9(0x10b)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x360dd3,_0x172cf9(0xff));}}for(const _0x351e94 of normalizeLocalFiles(_0x7b08fe)){if(_0x1b5251?.[_0x351e94['path']])continue;if(!_0x1b5251&&_0x351e94['path']===SKILL_FILE)continue;const _0x3694b6=resolveManagedFilePath(_0x32f9de,_0x351e94[_0x172cf9(0xef)]);if(!existsSync(_0x3694b6))continue;const _0x57ec81=lstatSync(_0x3694b6);if(!_0x57ec81[_0x172cf9(0x10c)]())throw CliErrors[_0x172cf9(0x10b)](_0x172cf9(0xf6)+_0x32f9de,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x351e94[_0x172cf9(0xef)]);const _0x1cc043=bufferSha256(readFileSync(_0x3694b6));if(_0x1cc043!==fileHash(_0x351e94))throw CliErrors[_0x172cf9(0x10b)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x32f9de,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x351e94[_0x172cf9(0xef)]);}}function materializeFiles(_0x35d0c8,_0x53963d){const _0x482638=a91_0x1313;for(const _0x32c77c of normalizeLocalFiles(_0x53963d)){const _0xef75e3=resolveManagedFilePath(_0x35d0c8,_0x32c77c[_0x482638(0xef)]);mkdirSync(dirname(_0xef75e3),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0xef75e3,fileContent(_0x32c77c),0x180);}}function removeStaleManagedFiles(_0x14149c,_0x2fa548,_0x439735){const _0x21f260=a91_0x1313;if(!_0x2fa548)return;const _0x16b8e8=new Set(normalizeLocalFiles(_0x439735)[_0x21f260(0x109)](_0x1c129d=>_0x1c129d[_0x21f260(0xef)]));for(const _0xcdb3c0 of Object[_0x21f260(0xf9)](_0x2fa548)){if(_0x16b8e8[_0x21f260(0x113)](_0xcdb3c0))continue;const _0x282a90=resolveManagedFilePath(_0x14149c,_0xcdb3c0);existsSync(_0x282a90)&&lstatSync(_0x282a90)[_0x21f260(0x10c)]()&&rmSync(_0x282a90,{'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(_0x2db274,_0x46e72a){const _0x3d1fc5=a92_0x4144,_0x1954bd=_0x2db274();while(!![]){try{const _0x5c3dee=parseInt(_0x3d1fc5(0xf1))/0x1+parseInt(_0x3d1fc5(0xfd))/0x2+-parseInt(_0x3d1fc5(0xe0))/0x3*(-parseInt(_0x3d1fc5(0xf3))/0x4)+parseInt(_0x3d1fc5(0xe1))/0x5+-parseInt(_0x3d1fc5(0xf9))/0x6*(-parseInt(_0x3d1fc5(0xea))/0x7)+parseInt(_0x3d1fc5(0xf7))/0x8+-parseInt(_0x3d1fc5(0x100))/0x9;if(_0x5c3dee===_0x46e72a)break;else _0x1954bd['push'](_0x1954bd['shift']());}catch(_0x1c5934){_0x1954bd['push'](_0x1954bd['shift']());}}}(a92_0x1da8,0x3309d));import{existsSync,readFileSync}from'node:fs';function a92_0x4144(_0x383347,_0x25a128){_0x383347=_0x383347-0xdc;const _0x1da8d3=a92_0x1da8();let _0x41449c=_0x1da8d3[_0x383347];return _0x41449c;}function a92_0x1da8(){const _0x51bc09=['12nNrMVP','1492095sLqPbl','validation','version','path','zipSize','isArray','zipSha256','sourceSessionId','tenantCode','77QDxdlA','parse','userId','hasUpstreamUpdate','toISOString','fromEntries','skillCode','70579FMhPFW','manifest','96244uZuJKz','trim','personal','files','3225192GTJWnJ','Runtime\x20Skill\x20is\x20missing\x20skillCode.','115182WwNbgA','map','utf8','tags','440310cEOCmm','status','description','9815940OmoZQO','string','length','readonly','Invalid\x20'];a92_0x1da8=function(){return _0x51bc09;};return a92_0x1da8();}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4d0824,_0x44c721,_0x537963,_0x4cda0e,_0x2dfd0c,_0x48260e,_0x2aeaf1){const _0x46300b=a92_0x4144,_0x2f2b69=_0x48260e?normalizeLocalFiles(_0x48260e):[],_0x120141=!_0x2aeaf1&&_0x2f2b69[_0x46300b(0xdd)]>0x0?buildSkillPackage(_0x2f2b69):undefined,_0x2c120e=_0x2aeaf1?bufferSha256(_0x2aeaf1):_0x120141?.[_0x46300b(0xf2)][_0x46300b(0xe7)],_0x5552c9=_0x2aeaf1?.['length']??_0x120141?.[_0x46300b(0xf2)][_0x46300b(0xe5)],_0x382d16=_0x2f2b69[_0x46300b(0xdd)]>0x0?Object[_0x46300b(0xef)](_0x2f2b69[_0x46300b(0xfa)](_0x260936=>[_0x260936[_0x46300b(0xe4)],fileHash(_0x260936)])):undefined;return{'schemaVersion':_0x2f2b69[_0x46300b(0xdd)]>0x0?0x2:0x1,'id':_0x4d0824['id'],'appCode':_0x537963,'skillCode':requireSkillCode(_0x4d0824),'skillName':_0x4d0824['skillName'],'description':_0x4d0824[_0x46300b(0xff)],'scope':_0x44c721,'readonly':_0x44c721!==_0x46300b(0xf5)||_0x4d0824[_0x46300b(0xde)]===!![],'tenantCode':_0x4d0824[_0x46300b(0xe9)],'userId':_0x4d0824[_0x46300b(0xec)],'version':_0x4d0824[_0x46300b(0xe3)],'status':_0x4d0824[_0x46300b(0xfe)],'tags':Array[_0x46300b(0xe6)](_0x4d0824[_0x46300b(0xfc)])?_0x4d0824[_0x46300b(0xfc)]:[],'hasUpstreamUpdate':_0x4d0824[_0x46300b(0xed)],'forkedFromSkillId':_0x4d0824['forkedFromSkillId'],'forkedFromVersion':_0x4d0824['forkedFromVersion'],'sourceSessionId':_0x4d0824[_0x46300b(0xe8)],'contentHash':_0x4cda0e,'fileHashes':_0x382d16,'treeHash':_0x2f2b69['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x2f2b69)):undefined,'ossPath':remoteManifestOssPath(_0x4d0824[_0x46300b(0xf6)]),'zipSha256':_0x2c120e,'zipSize':_0x5552c9,'files':_0x2f2b69[_0x46300b(0xdd)]>0x0?_0x2f2b69[_0x46300b(0xfa)](_0x2bc29e=>({'path':_0x2bc29e[_0x46300b(0xe4)],'hash':fileHash(_0x2bc29e),'size':fileContent(_0x2bc29e)[_0x46300b(0xdd)]})):undefined,'pulledAt':_0x2dfd0c??new Date()[_0x46300b(0xee)]()};}export function requireSkillCode(_0x11e684){const _0x246f49=a92_0x4144,_0x444123=_0x11e684[_0x246f49(0xf0)]?.[_0x246f49(0xf4)]();if(!_0x444123)throw CliErrors[_0x246f49(0xe2)](_0x246f49(0xf8));return _0x444123;}export function readMetadataIfPresent(_0x3fb7c0){const _0x2ab287=a92_0x4144;if(!existsSync(_0x3fb7c0))return undefined;try{const _0x54ea31=JSON[_0x2ab287(0xeb)](readFileSync(_0x3fb7c0,_0x2ab287(0xfb)));return _0x54ea31;}catch{throw CliErrors['validation'](_0x2ab287(0xdf)+METADATA_FILE+':\x20'+_0x3fb7c0);}}function remoteManifestOssPath(_0x37c9c5){const _0x2656b5=a92_0x4144;if(!_0x37c9c5||typeof _0x37c9c5!=='object'||Array[_0x2656b5(0xe6)](_0x37c9c5))return undefined;const _0x4fcae2=_0x37c9c5['ossPath'];return typeof _0x4fcae2===_0x2656b5(0xdc)&&_0x4fcae2[_0x2656b5(0xf4)]()?_0x4fcae2['trim']():undefined;}