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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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(_0xea5a8c,_0x4a0219){const _0xd36aa5=a77_0x326a,_0xd52f50=_0xea5a8c();while(!![]){try{const _0x5baa4b=parseInt(_0xd36aa5(0x142))/0x1*(-parseInt(_0xd36aa5(0x12c))/0x2)+parseInt(_0xd36aa5(0x130))/0x3+parseInt(_0xd36aa5(0x141))/0x4+parseInt(_0xd36aa5(0x12f))/0x5*(-parseInt(_0xd36aa5(0x146))/0x6)+parseInt(_0xd36aa5(0x136))/0x7*(parseInt(_0xd36aa5(0x13c))/0x8)+parseInt(_0xd36aa5(0x12d))/0x9*(-parseInt(_0xd36aa5(0x13a))/0xa)+parseInt(_0xd36aa5(0x137))/0xb*(parseInt(_0xd36aa5(0x13e))/0xc);if(_0x5baa4b===_0x4a0219)break;else _0xd52f50['push'](_0xd52f50['shift']());}catch(_0x336243){_0xd52f50['push'](_0xd52f50['shift']());}}}(a77_0x1b88,0x37fa6));function a77_0x1b88(){const _0xefea77=['905619VWvwHk','code','code=','params=','--yes','name','161wYIsST','729355ajwwbR','\x20\x20\x20Continue?\x20[y/N]\x20','params','26550bEYefJ','affectedRecords','55456jQRsRQ','join','120RrjknV','\x20\x20\x20Affected:\x20','commandLabel','572672jPClba','293zmthxW','stringify','service','entries','94968kTZhOD','length','push','command','name=','description','2566kvNBlP','1494XPEddX','\x20\x20\x20','70JlVaQd'];a77_0x1b88=function(){return _0xefea77;};return a77_0x1b88();}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x581f2e,_0x2015fb,_0x5c68e9){const _0x45d522=a77_0x326a,_0x25c900=buildConfirmationContext(_0x581f2e,_0x2015fb,_0x5c68e9),_0xe725ab=['⚠\x20\x20High-risk\x20operation:\x20'+_0x25c900[_0x45d522(0x140)]];return _0x25c900[_0x45d522(0x12b)]&&_0xe725ab[_0x45d522(0x128)](_0x45d522(0x12e)+_0x25c900[_0x45d522(0x12b)]),_0x25c900[_0x45d522(0x13b)]&&_0xe725ab[_0x45d522(0x128)](_0x45d522(0x13f)+_0x25c900[_0x45d522(0x13b)]),_0xe725ab['push'](_0x45d522(0x138)),_0xe725ab;}export function reconstructCommandArgv(_0x3ce6b4,_0x3f5f8e){const _0x27e7ae=a77_0x326a,_0x1d9158=[CLI_BIN_NAME,_0x3ce6b4[_0x27e7ae(0x144)],_0x3ce6b4[_0x27e7ae(0x129)]];for(const [_0x5353ae,_0x204669]of Object[_0x27e7ae(0x145)](_0x3f5f8e)){if(_0x204669===!![])_0x1d9158[_0x27e7ae(0x128)]('--'+_0x5353ae);else _0x204669!==![]&&_0x204669!==undefined&&_0x204669!==''&&_0x1d9158[_0x27e7ae(0x128)]('--'+_0x5353ae+'\x20'+JSON[_0x27e7ae(0x143)](_0x204669));}return _0x1d9158[_0x27e7ae(0x128)](_0x27e7ae(0x134)),_0x1d9158['join']('\x20');}function buildConfirmationContext(_0x7f3033,_0x426206,_0x50fa75){const _0x4c8148=a77_0x326a,_0x2842b6=extractAffectedRecords(_0x50fa75);return{'commandLabel':_0x426206,'description':_0x7f3033[_0x4c8148(0x12b)],'affectedRecords':_0x2842b6};}function a77_0x326a(_0x2df05b,_0x4338c4){_0x2df05b=_0x2df05b-0x127;const _0x1b883d=a77_0x1b88();let _0x326aba=_0x1b883d[_0x2df05b];return _0x326aba;}function extractAffectedRecords(_0x107c61){const _0x11d7b6=a77_0x326a,_0x1fd8e7=[];if(_0x107c61[_0x11d7b6(0x131)])_0x1fd8e7[_0x11d7b6(0x128)](_0x11d7b6(0x132)+_0x107c61[_0x11d7b6(0x131)]);if(_0x107c61['id'])_0x1fd8e7[_0x11d7b6(0x128)]('id='+_0x107c61['id']);if(_0x107c61[_0x11d7b6(0x135)])_0x1fd8e7[_0x11d7b6(0x128)](_0x11d7b6(0x12a)+_0x107c61[_0x11d7b6(0x135)]);if(_0x107c61[_0x11d7b6(0x139)])_0x1fd8e7[_0x11d7b6(0x128)](_0x11d7b6(0x133)+_0x107c61[_0x11d7b6(0x139)]);return _0x1fd8e7[_0x11d7b6(0x127)]>0x0?_0x1fd8e7[_0x11d7b6(0x13d)](',\x20'):undefined;}
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 +1 @@
1
- (function(_0x82409c,_0x2a2f3b){const _0x54a6ae=a78_0x5640,_0x1c15a2=_0x82409c();while(!![]){try{const _0x49d694=-parseInt(_0x54a6ae(0xec))/0x1*(-parseInt(_0x54a6ae(0xe7))/0x2)+-parseInt(_0x54a6ae(0xdf))/0x3*(parseInt(_0x54a6ae(0xe0))/0x4)+parseInt(_0x54a6ae(0xe4))/0x5*(parseInt(_0x54a6ae(0xed))/0x6)+-parseInt(_0x54a6ae(0xeb))/0x7+parseInt(_0x54a6ae(0xe8))/0x8*(-parseInt(_0x54a6ae(0xde))/0x9)+-parseInt(_0x54a6ae(0xe1))/0xa+parseInt(_0x54a6ae(0xe2))/0xb;if(_0x49d694===_0x2a2f3b)break;else _0x1c15a2['push'](_0x1c15a2['shift']());}catch(_0x145ccc){_0x1c15a2['push'](_0x1c15a2['shift']());}}}(a78_0xfe56,0xaf0ed));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x156207){if(_0x156207 instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0x156207));return _0x156207;}function a78_0x5640(_0x221122,_0x5fa6b3){_0x221122=_0x221122-0xde;const _0xfe563f=a78_0xfe56();let _0x5640c6=_0xfe563f[_0x221122];return _0x5640c6;}function a78_0xfe56(){const _0x28cc91=['2447920qJUkHT','11869781gDLohR','trim','5HzqbGh','stringify','message','2508278demXAI','69024ggFVoo','string','description','4798479pQarnG','1rjNSwo','8090562uuSZfH','1233MbLtVm','15ACpBCn','681820Olecbw'];a78_0xfe56=function(){return _0x28cc91;};return a78_0xfe56();}function userFacingLovrabetMessage(_0xa71099){const _0x4a2e25=a78_0x5640,_0x36d5cd=_0xa71099[_0x4a2e25(0xea)];if(_0x36d5cd!==undefined&&_0x36d5cd!==null){if(typeof _0x36d5cd===_0x4a2e25(0xe9)&&_0x36d5cd[_0x4a2e25(0xe3)]())return _0x36d5cd[_0x4a2e25(0xe3)]();try{return JSON[_0x4a2e25(0xe5)](_0x36d5cd);}catch{}}return _0xa71099[_0x4a2e25(0xe6)];}
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 +1 @@
1
- const a79_0x37c875=a79_0x1b9b;(function(_0x7f4938,_0x949e2a){const _0x5bce8b=a79_0x1b9b,_0x49243c=_0x7f4938();while(!![]){try{const _0xbab19b=-parseInt(_0x5bce8b(0x88))/0x1*(parseInt(_0x5bce8b(0x96))/0x2)+-parseInt(_0x5bce8b(0x7b))/0x3+parseInt(_0x5bce8b(0xa8))/0x4*(parseInt(_0x5bce8b(0xa0))/0x5)+-parseInt(_0x5bce8b(0xb5))/0x6+-parseInt(_0x5bce8b(0x89))/0x7+-parseInt(_0x5bce8b(0x94))/0x8+-parseInt(_0x5bce8b(0x7e))/0x9*(-parseInt(_0x5bce8b(0x82))/0xa);if(_0xbab19b===_0x949e2a)break;else _0x49243c['push'](_0x49243c['shift']());}catch(_0x362b6e){_0x49243c['push'](_0x49243c['shift']());}}}(a79_0xc5ee,0x1d34c));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';function a79_0x1b9b(_0x3f8985,_0x471f00){_0x3f8985=_0x3f8985-0x77;const _0xc5ee21=a79_0xc5ee();let _0x1b9b78=_0xc5ee21[_0x3f8985];return _0x1b9b78;}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(_0x1b8003){const _0x2a9ae5=a79_0x1b9b;return void _0x1b8003,AUTH_MODE[_0x2a9ae5(0x8d)];}export function createPipelineEnv(_0x515423,_0xa99063){const _0x4b81c5=a79_0x1b9b,_0x19fe89=typeof _0xa99063[_0x4b81c5(0xab)]===_0x4b81c5(0xb4)&&_0xa99063[_0x4b81c5(0xab)]['trim']();return{'rawFlags':_0xa99063,'appCode':_0x515423[_0x4b81c5(0x8c)]||productEnv(_0x4b81c5(0xa3))||(_0x19fe89?undefined:readAppCodeFromConfig()),'appCodeSource':_0x515423['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0xa99063),'defaultFormat':_0x515423[_0x4b81c5(0x7a)],'defaultPageSize':_0x515423['pageSize'],'defaultVerbose':_0x515423['verbose'],'riskLevel':_0x515423[_0x4b81c5(0x81)],'accessKey':_0x515423[_0x4b81c5(0x98)],'env':_0x515423['env'],'mergedCli':{'defaultApp':_0x515423['defaultApp'],'currentApp':_0x515423[_0x4b81c5(0x87)],'appCode':_0x515423[_0x4b81c5(0x8c)]}};}function a79_0xc5ee(){const _0x101ba3=['newConfigFileName','production','_notice','appcode','603416FHphgu','map','3756TofJmJ','name','accessKey','Set\x20accessKey\x20in\x20','object','cancelled','execute','validation','catch','command','87595RocGAO','env','doctor','APPCODE','.appcode\x20to\x20','error','requiresAppCode','authRequired','4doyNpB','items','appcode\x20\x22','app','update','High-risk\x20operation\x20`','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','appCodeSource','Unknown\x20app:\x20','defaultPageSize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','\x20or\x20pass\x20','string','294336SPxhAC','requiresAuth','../commands/app/remote-source.js','isNonInteractive','format','301662kGcbAb','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','5205501RLtoXU','schema','defaultApp','riskLevel','10PWMJTl','mergedCli','trim','\x20\x20To\x20proceed:\x20','configMissing','currentApp','94QZYfQp','522977jzabic','rawFlags','local-alias','appCode','ClientAk','../core/api-client.js','service'];a79_0xc5ee=function(){return _0x101ba3;};return a79_0xc5ee();}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1e3899=>PIPELINE_FLAG_NAMES['has'](_0x1e3899[a79_0x37c875(0x97)]))[a79_0x37c875(0x95)](({name:_0x514871,type:_0x48503f,description:_0x1197bd})=>({'name':_0x514871,'type':_0x48503f,'description':_0x1197bd})),'formatOutput':formatOutput,'getCommandLabel'(_0x2bc517){const _0x5cfddb=a79_0x37c875;return CLI_BIN_NAME+'\x20'+_0x2bc517[_0x5cfddb(0x8f)]+'\x20'+_0x2bc517[_0x5cfddb(0x9f)];},'riskPolicy':{'onViolation'(_0x1c888a){const _0x112072=a79_0x37c875;console[_0x112072(0xa5)](_0x1c888a);},'createError'(_0x279922){const _0x980fd1=a79_0x37c875;return CliErrors[_0x980fd1(0x9b)](_0x279922);}},async 'prepare'(_0x4e6635,_0x2566e7){const _0x35bdd8=a79_0x37c875,_0x11465d=resolveAuthMode(_0x2566e7);if(_0x4e6635[_0x35bdd8(0x77)]!==![]){if(!_0x2566e7[_0x35bdd8(0x98)])throw CliErrors[_0x35bdd8(0xa7)](_0x35bdd8(0x99)+PRODUCT_CONFIG[_0x35bdd8(0x90)]+_0x35bdd8(0xb3)+productEnvName(_0x35bdd8(0x7c))+'.');const {setActiveAK:_0x17721f}=await import(_0x35bdd8(0x8e));_0x17721f(_0x2566e7['accessKey']);}let _0x159d4e='';if(_0x4e6635['requiresAppCode']!==![]){_0x159d4e=_0x2566e7[_0x35bdd8(0x8c)]??'',_0x159d4e=await resolveExplicitAppName(_0x4e6635,_0x2566e7,_0x159d4e);if(!_0x159d4e){await assertSelectedAppNameIsRuntimeAccessible(_0x4e6635,_0x2566e7);throw CliErrors[_0x35bdd8(0x86)](_0x35bdd8(0xb2)+PRODUCT_CONFIG[_0x35bdd8(0x90)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x4e6635,_0x2566e7,_0x159d4e);}if(_0x159d4e){const {initSdkClient:_0x5895c}=await import('../core/sdk-client.js');_0x5895c({'appCode':_0x159d4e,'env':_0x2566e7[_0x35bdd8(0xa1)]??_0x35bdd8(0x91),'accessKey':_0x2566e7[_0x35bdd8(0x98)],'authMode':_0x11465d});}return{'defaults':{'booleans':{'verbose':_0x2566e7['defaultVerbose']},'numbers':{'pagesize':_0x2566e7[_0x35bdd8(0xb1)]}},'extras':{'appCode':_0x159d4e,'cookie':'','apiDomain':_0x2566e7['apiDomain'],'apiDir':'','accessKey':_0x2566e7[_0x35bdd8(0x98)],'envName':_0x2566e7[_0x35bdd8(0xa1)],'mergedCli':_0x2566e7[_0x35bdd8(0x83)]}};},async 'confirmHighRisk'({def:_0x2b8633,env:_0x7f5463,flags:_0x5add9a,commandLabel:_0x4eca79}){const _0x515ad8=a79_0x37c875;if(_0x7f5463[_0x515ad8(0x79)]){const _0x4925bb=reconstructCommandArgv(_0x2b8633,_0x5add9a);throw CliErrors[_0x515ad8(0x9d)](_0x515ad8(0xad)+_0x4eca79+_0x515ad8(0xae)+(_0x515ad8(0x85)+_0x4925bb));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2b8633,_0x4eca79,_0x5add9a),'createCancelledError':_0x5b4966=>CliErrors[_0x515ad8(0x9b)](_0x5b4966)});},'mapDryRunError'(_0x4168d2){return mapUserFacingExecuteError(_0x4168d2);},'mapExecuteError'(_0xa44eeb){return mapUserFacingExecuteError(_0xa44eeb);},async 'finalize'(){const {clearActiveAK:_0x465602}=await import('../core/api-client.js');_0x465602();}};async function resolveExplicitAppName(_0x441932,_0x5e84ca,_0x2fcf1b){const _0xd5c6a3=a79_0x37c875;if(_0x441932[_0xd5c6a3(0xa6)]===![])return _0x2fcf1b;const _0x4fa833=typeof _0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0xab)]===_0xd5c6a3(0xb4)?_0x5e84ca[_0xd5c6a3(0x8a)]['app'][_0xd5c6a3(0x84)]():'';if(!_0x4fa833)return _0x2fcf1b;const _0x419491=typeof _0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0x93)]===_0xd5c6a3(0xb4)&&_0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0x93)]['trim']()||productEnv(_0xd5c6a3(0xa3));if(_0x419491||_0x5e84ca[_0xd5c6a3(0xaf)]===_0xd5c6a3(0x8b))return _0x2fcf1b;const {getRemoteAppList:_0x31dd86}=await import(_0xd5c6a3(0x78)),_0x5b8ce7=await _0x31dd86({'env':_0x5e84ca[_0xd5c6a3(0xa1)]??_0xd5c6a3(0x91),'accessKey':_0x5e84ca[_0xd5c6a3(0x98)]}),_0x2703be=findAppByName(_0x5b8ce7[_0xd5c6a3(0xa9)],_0x4fa833);if(_0x2703be&&!isRuntimeAccessibleApp(_0x2703be))throw runtimeInaccessibleAppError(_0x2703be,'\x22'+_0x4fa833+'\x22');const _0x2831b4=_0x2703be?.['appCode']?.['trim']();if(_0x2831b4)return _0x2831b4;throw CliErrors[_0xd5c6a3(0x9d)](_0xd5c6a3(0xb0)+_0x4fa833,'Run\x20`'+CLI_BIN_NAME+_0xd5c6a3(0x7d)+_0x4fa833+_0xd5c6a3(0xa4)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x384584,_0x49717f){const _0x37165f=a79_0x37c875;if(_0x384584[_0x37165f(0xa6)]===![]||!_0x49717f[_0x37165f(0x98)])return;const _0x7234a5=(typeof _0x49717f['rawFlags'][_0x37165f(0xab)]===_0x37165f(0xb4)&&_0x49717f[_0x37165f(0x8a)]['app']['trim']()?_0x49717f['rawFlags']['app']:_0x49717f[_0x37165f(0x83)]?.[_0x37165f(0x87)]??_0x49717f[_0x37165f(0x83)]?.[_0x37165f(0x80)])?.[_0x37165f(0x84)]();if(!_0x7234a5)return;const {getRemoteAppList:_0x508a24}=await import(_0x37165f(0x78)),_0x2a278d=await _0x508a24({'env':_0x49717f[_0x37165f(0xa1)]??_0x37165f(0x91),'accessKey':_0x49717f['accessKey']}),_0x3b1ac9=findAppByName(_0x2a278d['items'],_0x7234a5);if(_0x3b1ac9&&!isRuntimeAccessibleApp(_0x3b1ac9))throw runtimeInaccessibleAppError(_0x3b1ac9,'\x22'+_0x7234a5+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x473799,_0x3313f3,_0x4339c5){const _0x5f1966=a79_0x37c875;if(_0x473799[_0x5f1966(0xa6)]===![]||!_0x3313f3[_0x5f1966(0x98)])return;const {getRemoteAppList:_0x580dae}=await import(_0x5f1966(0x78)),_0x5d457e=await _0x580dae({'env':_0x3313f3[_0x5f1966(0xa1)]??'production','accessKey':_0x3313f3[_0x5f1966(0x98)]}),_0xcce01b=findAppByCode(_0x5d457e[_0x5f1966(0xa9)],_0x4339c5);if(_0xcce01b&&!isRuntimeAccessibleApp(_0xcce01b))throw runtimeInaccessibleAppError(_0xcce01b,_0x5f1966(0xaa)+_0x4339c5+'\x22');}export async function runCommand(_0x2062ee,_0x5e1237){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2062ee)?withUpdateNotice(_0x2062ee):_0x2062ee,_0x5e1237,runnerAdapter);}function shouldAttachUpdateNotice(_0x21712e){const _0x19279d=a79_0x37c875;return![_0x19279d(0xac),_0x19279d(0x7f),_0x19279d(0xa2)]['includes'](_0x21712e[_0x19279d(0x8f)]);}function withUpdateNotice(_0x54c3ef){return{..._0x54c3ef,async 'execute'(_0x18e9ad){const _0x59a621=a79_0x1b9b,_0x1d2956=shouldResolveUpdateNotice(_0x18e9ad)?resolveLatestUpdateNotice()[_0x59a621(0x9e)](()=>null):Promise['resolve'](null),_0x55147d=await _0x54c3ef[_0x59a621(0x9c)](_0x18e9ad);return attachUpdateNotice(_0x55147d,await _0x1d2956);}};}function shouldResolveUpdateNotice(_0x24a527){const _0x3183ec=a79_0x37c875;return _0x24a527[_0x3183ec(0x7a)]==='pretty'&&!_0x24a527['nonInteractive'];}function attachUpdateNotice(_0x4ced4d,_0x15f1e9){const _0x5c728b=a79_0x37c875;if(!_0x15f1e9||!_0x4ced4d||typeof _0x4ced4d!==_0x5c728b(0x9a))return _0x4ced4d;const _0x31e253=_0x4ced4d,_0x802c9a=typeof _0x31e253['_notice']===_0x5c728b(0x9a)&&_0x31e253[_0x5c728b(0x92)]!==null?_0x31e253[_0x5c728b(0x92)]:{};return{..._0x31e253,'_notice':{..._0x802c9a,'update':_0x15f1e9}};}
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 +1 @@
1
- function a80_0x116d(_0x1f1756,_0x5f0c55){_0x1f1756=_0x1f1756-0xb9;const _0x37dfa5=a80_0x37df();let _0x116ded=_0x37dfa5[_0x1f1756];return _0x116ded;}(function(_0x2b99db,_0x205db8){const _0x436565=a80_0x116d,_0x141363=_0x2b99db();while(!![]){try{const _0x462f9c=parseInt(_0x436565(0xb9))/0x1+parseInt(_0x436565(0xc6))/0x2+parseInt(_0x436565(0xc2))/0x3*(parseInt(_0x436565(0xc4))/0x4)+-parseInt(_0x436565(0xc3))/0x5+-parseInt(_0x436565(0xc0))/0x6+-parseInt(_0x436565(0xc5))/0x7*(-parseInt(_0x436565(0xba))/0x8)+parseInt(_0x436565(0xcb))/0x9*(-parseInt(_0x436565(0xc9))/0xa);if(_0x462f9c===_0x205db8)break;else _0x141363['push'](_0x141363['shift']());}catch(_0xeec0ec){_0x141363['push'](_0x141363['shift']());}}}(a80_0x37df,0x2c08e));import{buildSchemaPayload as a80_0x426c57}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x46b62e=a80_0x116d,{serviceRegistry:_0x582786,findDefinition:_0x558211}=await import(_0x46b62e(0xbc)),_0x4d0188=new Set(_0x582786[_0x46b62e(0xbf)](_0x158ece=>_0x158ece['service'])),_0x318a5a=listDynamicServiceEntries()[_0x46b62e(0xbe)](_0x3bc363=>!_0x4d0188[_0x46b62e(0xbb)](_0x3bc363[_0x46b62e(0xca)])),_0x123111=a80_0x426c57({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x582786,..._0x318a5a],'buildAllFlags':buildAllFlags,'findDefinition':(_0x2cb85d,_0x257626)=>_0x558211(_0x2cb85d,_0x257626)??findDynamicServiceDefinition(_0x2cb85d,_0x257626)});return normalizeSchemaPayload(_0x123111);}function normalizeSchemaPayload(_0x59cde6){const _0x9c4986=a80_0x116d;return{..._0x59cde6,'schemaVersion':0x2,'services':_0x59cde6[_0x9c4986(0xc7)][_0x9c4986(0xbf)](_0x3c6434=>({..._0x3c6434,'commands':_0x3c6434[_0x9c4986(0xc1)][_0x9c4986(0xbf)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x5d1ca5){const _0x36a937=a80_0x116d,_0x1206c0=_0x5d1ca5;return{..._0x5d1ca5,'auth':_0x1206c0['auth']??(_0x5d1ca5[_0x36a937(0xc8)]?'required':_0x36a937(0xbd))};}function a80_0x37df(){const _0x585a2b=['requiresAuth','60hgIsQI','service','8577vtrNGt','184156fIbPBM','16btCMVZ','has','../commands/registry.js','none','filter','map','435750RwqNCU','commands','3PFAzxY','1126065ErCvzT','21932OmgsEz','508795KGRQzC','297826tiuoyY','services'];a80_0x37df=function(){return _0x585a2b;};return a80_0x37df();}
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 +1 @@
1
- function a81_0xf19e(_0xc4286b,_0x48a09e){_0xc4286b=_0xc4286b-0xfd;var _0x356201=a81_0x3562();var _0xf19e11=_0x356201[_0xc4286b];return _0xf19e11;}(function(_0x22e73f,_0x4a653a){var _0x4fad17=a81_0xf19e,_0x462488=_0x22e73f();while(!![]){try{var _0x4f2f37=-parseInt(_0x4fad17(0xfe))/0x1+parseInt(_0x4fad17(0xff))/0x2+parseInt(_0x4fad17(0x101))/0x3+parseInt(_0x4fad17(0x100))/0x4+-parseInt(_0x4fad17(0x103))/0x5*(-parseInt(_0x4fad17(0x102))/0x6)+parseInt(_0x4fad17(0xfd))/0x7+-parseInt(_0x4fad17(0x104))/0x8*(parseInt(_0x4fad17(0x105))/0x9);if(_0x4f2f37===_0x4a653a)break;else _0x462488['push'](_0x462488['shift']());}catch(_0x67df41){_0x462488['push'](_0x462488['shift']());}}}(a81_0x3562,0xa4ab8));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a81_0x3562(){var _0x16479a=['367980wQylzn','77268wKyAYi','395sSjWFn','8pibDJk','4885533BoOYEU','367976wymaco','800335nVmKma','242626LzaSco','2815028naNomg'];a81_0x3562=function(){return _0x16479a;};return a81_0x3562();}
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 +1 @@
1
- const a82_0x336d32=a82_0x244d;(function(_0x3e1ebb,_0x21b3ac){const _0x10c126=a82_0x244d,_0x543def=_0x3e1ebb();while(!![]){try{const _0x25919a=-parseInt(_0x10c126(0x1fe))/0x1+-parseInt(_0x10c126(0x1f5))/0x2*(-parseInt(_0x10c126(0x1fb))/0x3)+-parseInt(_0x10c126(0x1f6))/0x4*(parseInt(_0x10c126(0x1fd))/0x5)+-parseInt(_0x10c126(0x1ff))/0x6*(-parseInt(_0x10c126(0x1fa))/0x7)+-parseInt(_0x10c126(0x1f9))/0x8*(parseInt(_0x10c126(0x1f4))/0x9)+-parseInt(_0x10c126(0x1fc))/0xa+parseInt(_0x10c126(0x1f7))/0xb;if(_0x25919a===_0x21b3ac)break;else _0x543def['push'](_0x543def['shift']());}catch(_0x517aff){_0x543def['push'](_0x543def['shift']());}}}(a82_0x3940,0xb5482));function a82_0x3940(){const _0x48c507=['5265sFzHhj','690732NxxDAT','18732RTsAHO','2026-07-04T02:17:51.702Z','258183yQUOMA','2jryTHQ','4212jhEjPr','21599138FlnJDI','0dfd4b3','128qmHFfF','518IOTSSR','3613887zrhJjO','3981520XQHicH'];a82_0x3940=function(){return _0x48c507;};return a82_0x3940();}export const VERSION='2.1.3-beta.1';function a82_0x244d(_0x2ced4b,_0x2b67d7){_0x2ced4b=_0x2ced4b-0x1f3;const _0x394047=a82_0x3940();let _0x244d5b=_0x394047[_0x2ced4b];return _0x244d5b;}export const GIT_TAG='v2.1.3-beta.1';export const GIT_COMMIT=a82_0x336d32(0x1f8);export const BUILD_TIME=a82_0x336d32(0x1f3);
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';
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x20b88b,_0x3ea441){const _0x5a29e1=a83_0x5854,_0x4347b4=_0x20b88b();while(!![]){try{const _0x3fd0b4=parseInt(_0x5a29e1(0x152))/0x1+-parseInt(_0x5a29e1(0x15a))/0x2*(-parseInt(_0x5a29e1(0x15b))/0x3)+parseInt(_0x5a29e1(0x156))/0x4*(parseInt(_0x5a29e1(0x158))/0x5)+-parseInt(_0x5a29e1(0x15c))/0x6*(-parseInt(_0x5a29e1(0x153))/0x7)+-parseInt(_0x5a29e1(0x151))/0x8+parseInt(_0x5a29e1(0x154))/0x9+-parseInt(_0x5a29e1(0x14f))/0xa;if(_0x3fd0b4===_0x3ea441)break;else _0x4347b4['push'](_0x4347b4['shift']());}catch(_0x5db574){_0x4347b4['push'](_0x4347b4['shift']());}}}(a83_0xebc2,0xd3066));import{jsx as a83_0x4b5f6a,jsxs as a83_0x46d577}from'react/jsx-runtime';function a83_0x5854(_0x4cb4e5,_0x663fba){_0x4cb4e5=_0x4cb4e5-0x14f;const _0xebc29b=a83_0xebc2();let _0x585485=_0xebc29b[_0x4cb4e5];return _0x585485;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a83_0xebc2(){const _0x4e7447=['\x20\x20Use\x20','136198sQdjKd','6BfNNWB','84ziLMUN','4862150Tiwedb','\x20--help','9626880glnaBd','298358REVzSl','215726tkqXUV','12912183aRgeLJ','green','4GaodTF','\x20to\x20view\x20available\x20commands.','1266190WvIegF'];a83_0xebc2=function(){return _0x4e7447;};return a83_0xebc2();}export function Help(){const _0x2e9992=a83_0x5854,{exit:_0xb6966b}=useApp();return useEffect(()=>{_0xb6966b();},[_0xb6966b]),a83_0x46d577(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a83_0x4b5f6a(Box,{'children':a83_0x4b5f6a(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x46d577(Box,{'marginTop':0x1,'children':[a83_0x4b5f6a(Text,{'dimColor':!![],'children':_0x2e9992(0x159)}),a83_0x4b5f6a(Text,{'bold':!![],'color':_0x2e9992(0x155),'children':CLI_BIN_NAME+_0x2e9992(0x150)}),a83_0x4b5f6a(Text,{'dimColor':!![],'children':_0x2e9992(0x157)})]})]});}
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 +1 @@
1
- (function(_0x482674,_0x1f616){const _0x2280e5=a84_0x177f,_0x506668=_0x482674();while(!![]){try{const _0x5b0177=-parseInt(_0x2280e5(0x184))/0x1+-parseInt(_0x2280e5(0x190))/0x2*(-parseInt(_0x2280e5(0x192))/0x3)+-parseInt(_0x2280e5(0x18b))/0x4*(parseInt(_0x2280e5(0x183))/0x5)+-parseInt(_0x2280e5(0x18a))/0x6+parseInt(_0x2280e5(0x18f))/0x7+parseInt(_0x2280e5(0x196))/0x8*(-parseInt(_0x2280e5(0x18c))/0x9)+parseInt(_0x2280e5(0x181))/0xa*(parseInt(_0x2280e5(0x193))/0xb);if(_0x5b0177===_0x1f616)break;else _0x506668['push'](_0x506668['shift']());}catch(_0x785e11){_0x506668['push'](_0x506668['shift']());}}}(a84_0x1065,0x8d935));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a84_0x1065(){const _0x3a221c=['34011VOyWCt','pipe','log','5399884qblPXO','87022IkdVoE','toString','21LbbTBg','143tDcLri','status','exit\x20','1480lGvdyH','inherit','stdio','1541270FOnGQB','stderr','538655dhvdKr','605889jHwxcQ','skills','unknown','stdout','add','trim','6522072UEHYEX','4hSuWCb'];a84_0x1065=function(){return _0x3a221c;};return a84_0x1065();}import{LOVRABET_SKILL_SOURCE as a84_0x3c906b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a84_0x177f(_0x5063c0,_0x5a2e90){_0x5063c0=_0x5063c0-0x181;const _0x106538=a84_0x1065();let _0x177f80=_0x106538[_0x5063c0];return _0x177f80;}export const LOVRABET_SKILL_SOURCE=a84_0x3c906b;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x5385d5,_0x412881=LOVRABET_SKILL_SOURCE,_0x14ce29){const _0x13dff6=a84_0x177f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2239ee=_0x14ce29?.[_0x13dff6(0x198)]??_0x13dff6(0x197),_0x215815=resolveNpmBin('npx'),_0x428b4b=[_0x13dff6(0x185),_0x13dff6(0x188),_0x412881,'-g','-y'],_0x519dca=[_0x215815,..._0x428b4b]['join']('\x20');console[_0x13dff6(0x18e)]('*\x20'+_0x519dca);const _0x26cbf4=spawnSync(_0x215815,_0x428b4b,{'cwd':_0x5385d5,'stdio':_0x2239ee,'env':process.env,'shell':![]});if(_0x26cbf4['status']===0x0)return{'ok':!![],'status':0x0};let _0x3e7ff0=_0x13dff6(0x195)+(_0x26cbf4['status']??_0x13dff6(0x186));if(_0x2239ee===_0x13dff6(0x18d)){const _0x124973=_0x26cbf4[_0x13dff6(0x182)]?_0x26cbf4[_0x13dff6(0x182)]['toString']()[_0x13dff6(0x189)]():'',_0x36232a=_0x26cbf4[_0x13dff6(0x187)]?_0x26cbf4[_0x13dff6(0x187)][_0x13dff6(0x191)]()[_0x13dff6(0x189)]():'';if(_0x124973)_0x3e7ff0=_0x124973;else{if(_0x36232a)_0x3e7ff0=_0x36232a;}}return{'ok':![],'status':_0x26cbf4[_0x13dff6(0x194)]??null,'error':_0x3e7ff0};}
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 +1 @@
1
- const a85_0x152b48=a85_0x1b7b;(function(_0x2be32d,_0x11dd6d){const _0x3ed165=a85_0x1b7b,_0x3a09af=_0x2be32d();while(!![]){try{const _0x39df81=-parseInt(_0x3ed165(0xea))/0x1+-parseInt(_0x3ed165(0xf2))/0x2*(-parseInt(_0x3ed165(0xf6))/0x3)+-parseInt(_0x3ed165(0xf1))/0x4*(parseInt(_0x3ed165(0xe8))/0x5)+-parseInt(_0x3ed165(0xe9))/0x6+-parseInt(_0x3ed165(0xeb))/0x7*(parseInt(_0x3ed165(0xf4))/0x8)+-parseInt(_0x3ed165(0xf9))/0x9+parseInt(_0x3ed165(0xf7))/0xa;if(_0x39df81===_0x11dd6d)break;else _0x3a09af['push'](_0x3a09af['shift']());}catch(_0x4c4f94){_0x3a09af['push'](_0x3a09af['shift']());}}}(a85_0x1027,0xd6044));export const METADATA_FILE=a85_0x152b48(0xf8);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_0x152b48(0xec)]);function a85_0x1027(){const _0x105993=['7413xKDruz','24698210hRjIIi','lovrabet.skill.json','1896399NRnray','.svn','505iPfZbl','600426IcrnID','613493PvleSQ','6765983KaMALt','.DS_Store','.cache','build','coverage','dist','26672RoPAql','786oQLgVt','.turbo','8HyCWSD','node_modules'];a85_0x1027=function(){return _0x105993;};return a85_0x1027();}function a85_0x1b7b(_0x1fe066,_0x440310){_0x1fe066=_0x1fe066-0xe7;const _0x1027ac=a85_0x1027();let _0x1b7be3=_0x1027ac[_0x1fe066];return _0x1b7be3;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a85_0x152b48(0xe7),a85_0x152b48(0xf5),'.next',a85_0x152b48(0xf0),a85_0x152b48(0xee),a85_0x152b48(0xef),a85_0x152b48(0xf3),a85_0x152b48(0xed)]);
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 +1 @@
1
- (function(_0x92362c,_0x8f61ee){const _0x32338c=a86_0xc44b,_0x1d0f75=_0x92362c();while(!![]){try{const _0x5c4122=parseInt(_0x32338c(0x190))/0x1*(-parseInt(_0x32338c(0x18c))/0x2)+-parseInt(_0x32338c(0x198))/0x3+parseInt(_0x32338c(0x18d))/0x4*(parseInt(_0x32338c(0x193))/0x5)+-parseInt(_0x32338c(0x18a))/0x6*(-parseInt(_0x32338c(0x197))/0x7)+-parseInt(_0x32338c(0x186))/0x8*(-parseInt(_0x32338c(0x195))/0x9)+parseInt(_0x32338c(0x192))/0xa+-parseInt(_0x32338c(0x191))/0xb*(parseInt(_0x32338c(0x18f))/0xc);if(_0x5c4122===_0x8f61ee)break;else _0x1d0f75['push'](_0x1d0f75['shift']());}catch(_0xc2d92a){_0x1d0f75['push'](_0x1d0f75['shift']());}}}(a86_0x3e3e,0x7226e));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a86_0xc44b(_0x3be67d,_0x4ec175){_0x3be67d=_0x3be67d-0x184;const _0x3e3ee0=a86_0x3e3e();let _0xc44bbc=_0x3e3ee0[_0x3be67d];return _0xc44bbc;}function a86_0x3e3e(){const _0x5d9941=['stringify','split','Unsafe\x20Skill\x20file\x20path:\x20','2074206zUQAUW','isSymbolicLink','8zHrfzj','4eQgcQb','utf8','19922748SHsTKb','19355MExyOh','11AnRLEx','9024330xmAlcU','3251890wQShbB','startsWith','1755VoTSdV','from','7zDJLSn','552921RuhLgu','validation','endsWith','.tmp','20144FedmqB'];a86_0x3e3e=function(){return _0x5d9941;};return a86_0x3e3e();}import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0xd69d5,_0x362eaf){const _0x9a225f=a86_0xc44b,_0x230517=normalizeSkillRelativePath(_0x362eaf),_0x428b5d=realOrResolved(_0xd69d5),_0x5792a3=resolve(_0x428b5d,..._0x230517[_0x9a225f(0x188)]('/'));if(!isPathInside(_0x5792a3,_0x428b5d))throw CliErrors[_0x9a225f(0x199)](_0x9a225f(0x189)+_0x362eaf);return ensureNoSymlinkInManagedPath(_0x428b5d,_0x230517),_0x5792a3;}export function ensureNoSymlinkInManagedPath(_0x59010a,_0x20ba8c){const _0xe75f00=a86_0xc44b;let _0x57cea0=_0x59010a;for(const _0x1b60d7 of _0x20ba8c[_0xe75f00(0x188)]('/')){_0x57cea0=resolve(_0x57cea0,_0x1b60d7);const _0x4a120b=lstatIfPresent(_0x57cea0);if(_0x4a120b?.[_0xe75f00(0x18b)]())throw CliErrors[_0xe75f00(0x199)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x20ba8c);}}export function isDanglingSymlink(_0x406d2f){const _0x5d1bbf=a86_0xc44b;try{return lstatSync(_0x406d2f)[_0x5d1bbf(0x18b)]();}catch{return![];}}export function resolveSymlinkTarget(_0x47fd9e){const _0x483ee1=readlinkSync(_0x47fd9e);return isAbsolute(_0x483ee1)?_0x483ee1:resolve(dirname(_0x47fd9e),_0x483ee1);}export function isPathInside(_0x414112,_0x4957f0){const _0x2a0262=a86_0xc44b,_0x328eca=_0x414112[_0x2a0262(0x184)](sep)?_0x414112:''+_0x414112+sep,_0x3c17cd=_0x4957f0['endsWith'](sep)?_0x4957f0:''+_0x4957f0+sep;return _0x414112===_0x4957f0||_0x328eca[_0x2a0262(0x194)](_0x3c17cd);}export function realOrResolved(_0x1392d2){try{return realpathSync(_0x1392d2);}catch{return resolve(_0x1392d2);}}export function lstatIfPresent(_0x53a8f7){try{return lstatSync(_0x53a8f7);}catch{return undefined;}}export function writeTextAtomic(_0x2f306d,_0x257c54,_0x30461e){const _0x1eff84=a86_0xc44b;writeBytesAtomic(_0x2f306d,Buffer[_0x1eff84(0x196)](_0x257c54,_0x1eff84(0x18e)),_0x30461e);}export function writeBytesAtomic(_0x3a032f,_0x524ce6,_0xf7769f){const _0x3af225=a86_0xc44b,_0x9081aa=_0x3a032f+_0x3af225(0x185);try{writeFileSync(_0x9081aa,_0x524ce6,{'mode':_0xf7769f}),renameSync(_0x9081aa,_0x3a032f);}catch(_0x14e4c9){try{rmSync(_0x9081aa,{'force':!![]});}catch{}throw _0x14e4c9;}}export function writeJsonAtomic(_0x29026f,_0x494c8f){const _0x24e929=a86_0xc44b;writeTextAtomic(_0x29026f,JSON[_0x24e929(0x187)](_0x494c8f,null,0x2)+'\x0a',0x180);}
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 +1 @@
1
- (function(_0xb4b1cb,_0x1ca13e){const _0x28ca9b=a87_0x4d23,_0x271282=_0xb4b1cb();while(!![]){try{const _0x1e5094=-parseInt(_0x28ca9b(0x1cd))/0x1+-parseInt(_0x28ca9b(0x1cc))/0x2+-parseInt(_0x28ca9b(0x1c7))/0x3+parseInt(_0x28ca9b(0x1c3))/0x4*(-parseInt(_0x28ca9b(0x1d0))/0x5)+-parseInt(_0x28ca9b(0x1ce))/0x6+-parseInt(_0x28ca9b(0x1ca))/0x7*(parseInt(_0x28ca9b(0x1c4))/0x8)+parseInt(_0x28ca9b(0x1c9))/0x9;if(_0x1e5094===_0x1ca13e)break;else _0x271282['push'](_0x271282['shift']());}catch(_0xf06d1e){_0x271282['push'](_0x271282['shift']());}}}(a87_0x3cc7,0x9cd80));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a87_0x4d23(_0x48f008,_0x586ad9){_0x48f008=_0x48f008-0x1c3;const _0x3cc7d8=a87_0x3cc7();let _0x4d2397=_0x3cc7d8[_0x48f008];return _0x4d2397;}function a87_0x3cc7(){const _0x248dd2=['24776hOzTUj','hex','sha256','862464WVIrCI','digest','41342058ZIiigO','1561jgyCLe','path','1240604uSdbfn','905854sUQLgQ','4478232sYEeTm','update','3502415rzIvEP','4boxEUF'];a87_0x3cc7=function(){return _0x248dd2;};return a87_0x3cc7();}export function contentHash(_0x2bba7a){const _0x193054=a87_0x4d23;return createHash('sha256')[_0x193054(0x1cf)](_0x2bba7a)['digest'](_0x193054(0x1c5));}export function fileHash(_0x4b3332){return bufferSha256(fileContent(_0x4b3332));}export function bufferSha256(_0x2a5275){const _0x470de4=a87_0x4d23;return createHash(_0x470de4(0x1c6))[_0x470de4(0x1cf)](_0x2a5275)['digest'](_0x470de4(0x1c5));}export function fileTreeHash(_0x26313a){const _0x2a6774=a87_0x4d23,_0x171bd0=createHash(_0x2a6774(0x1c6));for(const _0x3949a8 of normalizeManifestFiles(_0x26313a)){_0x171bd0[_0x2a6774(0x1cf)](_0x3949a8[_0x2a6774(0x1cb)]),_0x171bd0[_0x2a6774(0x1cf)]('\x00'),_0x171bd0[_0x2a6774(0x1cf)](_0x3949a8[_0x2a6774(0x1c6)]),_0x171bd0['update']('\x00'),_0x171bd0[_0x2a6774(0x1cf)](String(_0x3949a8['size'])),_0x171bd0[_0x2a6774(0x1cf)]('\x00');}return _0x171bd0[_0x2a6774(0x1c8)]('hex');}
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 +1 @@
1
- (function(_0x367f5d,_0x1073bd){const _0x162b24=a88_0xbaf0,_0x52c87d=_0x367f5d();while(!![]){try{const _0x31d317=parseInt(_0x162b24(0xb2))/0x1*(parseInt(_0x162b24(0xa3))/0x2)+-parseInt(_0x162b24(0xa8))/0x3+-parseInt(_0x162b24(0xa5))/0x4*(parseInt(_0x162b24(0xba))/0x5)+-parseInt(_0x162b24(0x98))/0x6+parseInt(_0x162b24(0xbc))/0x7*(-parseInt(_0x162b24(0xb6))/0x8)+parseInt(_0x162b24(0xac))/0x9*(-parseInt(_0x162b24(0xb7))/0xa)+-parseInt(_0x162b24(0xbb))/0xb*(-parseInt(_0x162b24(0x8e))/0xc);if(_0x31d317===_0x1073bd)break;else _0x52c87d['push'](_0x52c87d['shift']());}catch(_0x9b5608){_0x52c87d['push'](_0x52c87d['shift']());}}}(a88_0x52b9,0x52e11));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a88_0x52b9(){const _0x3ed63f=['trim','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','pruneSkillCodes','not-managed-symlink','skill','name','activeSkillCodes','30798ksQXsh','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isSymbolicLink','scopes','set','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','accessKey','company','contentHash','skillCode','22KRHgLh','skipped','563924rpGvqa','updated','env','1795257oizWTK','appCode','startsWith','isDirectory','4953204oHCyEv','dir','has','personal','claudeSkillsDir','validation','5632bpIZKh','length','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','removed','8MjCqmp','10GdoXWy','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','agentsSkillsDir','10TGoKWH','12870748hcnzyC','4387215ADIXZR','filter','push','24cCwxNr','scope','map'];a88_0x52b9=function(){return _0x3ed63f;};return a88_0x52b9();}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';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';export function linkEffectiveRuntimeSkills(_0x4d681a,_0x1474b7,_0x9630a9={}){const _0x1baecc=a88_0xbaf0,_0x4a08ae=new Map();for(const _0x9a82d2 of _0x4d681a){const _0x17fd95=_0x9a82d2[_0x1baecc(0x95)][_0x1baecc(0xa2)];if(!_0x17fd95)continue;const _0x211549=_0x4a08ae['get'](_0x17fd95);(!_0x211549||_0x9a82d2[_0x1baecc(0x8f)]===_0x1baecc(0xaf))&&_0x4a08ae[_0x1baecc(0x9c)](_0x17fd95,_0x9a82d2);}const _0x37eb57=[],_0x498ac9=resolveSkillSyncPaths(_0x9630a9);for(const _0x495a0c of _0x4a08ae['values']()){const _0x269517=requireSkillCode(_0x495a0c[_0x1baecc(0x95)]),_0x817a97=_0x1474b7+'--'+_0x269517;for(const _0x122d9f of[_0x498ac9[_0x1baecc(0xb9)],_0x498ac9['claudeSkillsDir']]){_0x37eb57['push'](ensureManagedSymlink(resolve(_0x122d9f,_0x817a97),_0x495a0c[_0x1baecc(0xad)],_0x498ac9['managedRoot']));}}return _0x37eb57;}export function pruneStaleRuntimeSkillLinks(_0x109394,_0x190609,_0x320199={},_0x18cc71){const _0x3b8dfb=a88_0xbaf0,_0x19f52c=resolveSkillSyncPaths(_0x320199),_0x4b4a0e=new Set([..._0x190609][_0x3b8dfb(0x90)](_0xdcb5fb=>_0xdcb5fb[_0x3b8dfb(0x91)]())[_0x3b8dfb(0xbd)](Boolean)),_0x4aaa3f=_0x18cc71?new Set([..._0x18cc71]['map'](_0x4afd74=>_0x4afd74[_0x3b8dfb(0x91)]())['filter'](Boolean)):undefined,_0xcab3cd=[];for(const _0x198a42 of[_0x19f52c[_0x3b8dfb(0xb9)],_0x19f52c[_0x3b8dfb(0xb0)]]){for(const _0x14e2cb of managedAppSkillLinkPaths(_0x198a42,_0x109394)){const _0x153bd4=basename(_0x14e2cb)['slice']((_0x109394+'--')[_0x3b8dfb(0xb3)]);if(_0x4aaa3f&&!_0x4aaa3f['has'](_0x153bd4))continue;if(_0x4b4a0e[_0x3b8dfb(0xae)](_0x153bd4))continue;_0xcab3cd[_0x3b8dfb(0xbe)](removeManagedSkillLink(_0x14e2cb,_0x19f52c['managedRoot']));}}return _0xcab3cd;}export function pruneStaleRuntimeSkillCache(_0x13cdb8,_0x136929={}){const _0x4d5f0c=a88_0xbaf0,_0x2720e4=new Set([..._0x13cdb8[_0x4d5f0c(0x97)]][_0x4d5f0c(0x90)](_0x2005b5=>_0x2005b5['trim']())[_0x4d5f0c(0xbd)](Boolean)),_0x2d5631=_0x13cdb8[_0x4d5f0c(0x93)]?new Set([..._0x13cdb8[_0x4d5f0c(0x93)]][_0x4d5f0c(0x90)](_0x346557=>_0x346557[_0x4d5f0c(0x91)]())[_0x4d5f0c(0xbd)](Boolean)):undefined,_0x18e56e=_0x13cdb8[_0x4d5f0c(0x9b)]??[_0x4d5f0c(0xaf),_0x4d5f0c(0xa0)],_0x2841c0=resolve(getRuntimeSkillCacheRoot(_0x13cdb8[_0x4d5f0c(0xa7)],_0x13cdb8[_0x4d5f0c(0x9f)],_0x136929),safePathSegment(_0x13cdb8['appCode'],'appCode')),_0x17ac2a=[];for(const _0x1a8614 of _0x18e56e){const _0x1c403e=resolve(_0x2841c0,_0x1a8614);if(!existsSync(_0x1c403e))continue;for(const _0x36ad5c of readdirSync(_0x1c403e,{'withFileTypes':!![]})){if(!_0x36ad5c[_0x4d5f0c(0xab)]())continue;const _0x3dd4de=_0x36ad5c[_0x4d5f0c(0x96)];if(_0x2d5631&&!_0x2d5631[_0x4d5f0c(0xae)](_0x3dd4de))continue;if(_0x2720e4[_0x4d5f0c(0xae)](_0x3dd4de))continue;const _0x74208=resolve(_0x1c403e,_0x3dd4de),_0x209fdf=readMetadataIfPresent(resolve(_0x74208,METADATA_FILE));if(_0x209fdf?.[_0x4d5f0c(0xa9)]!==_0x13cdb8[_0x4d5f0c(0xa9)]||_0x209fdf[_0x4d5f0c(0x8f)]!==_0x1a8614||_0x209fdf[_0x4d5f0c(0xa2)]!==_0x3dd4de){_0x17ac2a[_0x4d5f0c(0xbe)]({'path':_0x74208,'action':_0x4d5f0c(0xa4),'reason':'metadata-mismatch'});continue;}removeSync(_0x74208),_0x17ac2a[_0x4d5f0c(0xbe)]({'path':_0x74208,'action':'removed'});}}return _0x17ac2a;}export function linkGlobalRuntimeSkills(_0x15072e,_0x1efbc4={}){const _0x1494c6=a88_0xbaf0,_0x16a953=resolveSkillSyncPaths(_0x1efbc4),_0x397801=[];for(const _0x4cf897 of _0x15072e){if(_0x4cf897[_0x1494c6(0x8f)]!=='builtin')throw CliErrors[_0x1494c6(0xb1)](_0x1494c6(0x99)+_0x4cf897[_0x1494c6(0x8f)]);const _0x1d1b43=requireSkillCode(_0x4cf897[_0x1494c6(0x95)]),_0x502c02=copyManagedSkillDirectory(_0x4cf897[_0x1494c6(0xad)],resolve(_0x16a953[_0x1494c6(0xb9)],_0x1d1b43));_0x397801[_0x1494c6(0xbe)]({..._0x502c02,'contentHash':_0x4cf897['contentHash']});}return _0x397801;}function ensureManagedSymlink(_0x377097,_0x1ae5e1,_0x2d4210){const _0x6c84cc=a88_0xbaf0;mkdirSync(dirname(_0x377097),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x377097)||isDanglingSymlink(_0x377097)){const _0x12404c=lstatSync(_0x377097);if(!_0x12404c[_0x6c84cc(0x9a)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x377097);const _0x40e29b=resolveSymlinkTarget(_0x377097);if(!isPathInside(realOrResolved(_0x40e29b),realOrResolved(_0x2d4210)))throw CliErrors[_0x6c84cc(0xb1)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x377097);if(realOrResolved(_0x40e29b)===realOrResolved(_0x1ae5e1))return{'path':_0x377097,'target':_0x1ae5e1,'action':_0x6c84cc(0x9d)};return unlinkSync(_0x377097),symlinkSync(_0x1ae5e1,_0x377097,_0x6c84cc(0xad)),{'path':_0x377097,'target':_0x1ae5e1,'action':_0x6c84cc(0xa6)};}return symlinkSync(_0x1ae5e1,_0x377097,_0x6c84cc(0xad)),{'path':_0x377097,'target':_0x1ae5e1,'action':'created'};}function a88_0xbaf0(_0x534465,_0x45a4f8){_0x534465=_0x534465-0x8e;const _0x52b9fd=a88_0x52b9();let _0xbaf0f8=_0x52b9fd[_0x534465];return _0xbaf0f8;}function managedAppSkillLinkPaths(_0x427a73,_0x37c6d5){const _0x36f9bd=a88_0xbaf0;if(!existsSync(_0x427a73))return[];const _0xb236a7=_0x37c6d5+'--';return readdirSync(_0x427a73,{'withFileTypes':!![]})[_0x36f9bd(0xbd)](_0x421b2d=>_0x421b2d[_0x36f9bd(0x96)][_0x36f9bd(0xaa)](_0xb236a7))[_0x36f9bd(0x90)](_0x5b5332=>resolve(_0x427a73,_0x5b5332[_0x36f9bd(0x96)]));}function removeManagedSkillLink(_0x139422,_0x2e1e0d){const _0xec8228=a88_0xbaf0,_0x19b0c3=lstatIfPresent(_0x139422);if(!_0x19b0c3?.[_0xec8228(0x9a)]())return{'path':_0x139422,'action':_0xec8228(0xa4),'reason':_0xec8228(0x94)};const _0x1aed14=resolveSymlinkTarget(_0x139422);if(!isPathInside(realOrResolved(_0x1aed14),realOrResolved(_0x2e1e0d)))return{'path':_0x139422,'action':_0xec8228(0xa4),'reason':'external-symlink'};return unlinkSync(_0x139422),{'path':_0x139422,'action':_0xec8228(0xb5)};}export function copyManagedSkillDirectory(_0xbede47,_0x5582be){const _0x4a4fef=a88_0xbaf0,_0x2f81a5=resolve(_0x5582be,METADATA_FILE),_0x29c79c=existsSync(_0x5582be);if(_0x29c79c){const _0x5e8c38=lstatSync(_0x5582be);if(_0x5e8c38['isSymbolicLink']())throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0xb8)+_0x5582be);if(!_0x5e8c38['isDirectory']())throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0x9e)+_0x5582be);const _0x558b43=readMetadataIfPresent(_0x2f81a5);if(_0x558b43?.[_0x4a4fef(0x8f)]!=='builtin')throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0x92)+_0x5582be);}ensureDirSync(dirname(_0x5582be));const _0x2d1e75=_0x29c79c?readMetadataIfPresent(_0x2f81a5)?.[_0x4a4fef(0xa1)]:undefined,_0x4478ae=readMetadataIfPresent(resolve(_0xbede47,METADATA_FILE))?.['contentHash'];return _0x29c79c&&removeSync(_0x5582be),copySkillDirectory(_0xbede47,_0x5582be),{'path':_0x5582be,'target':_0xbede47,'action':!_0x29c79c?'created':_0x2d1e75===_0x4478ae?_0x4a4fef(0x9d):_0x4a4fef(0xa6)};}function copySkillDirectory(_0x4f8b99,_0x1c9c3f){copySync(_0x4f8b99,_0x1c9c3f,{'dereference':![],'overwrite':!![],'filter'(_0xfc14d4){const _0x1fe8f0=a88_0xbaf0;if(lstatSync(_0xfc14d4)[_0x1fe8f0(0x9a)]())throw CliErrors[_0x1fe8f0(0xb1)](_0x1fe8f0(0xb4)+_0xfc14d4);return!![];}});}
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 +1 @@
1
- (function(_0x5ddd22,_0x12f2e5){const _0x3a553d=a89_0x2fab,_0x59e54f=_0x5ddd22();while(!![]){try{const _0x181b8f=-parseInt(_0x3a553d(0x121))/0x1+parseInt(_0x3a553d(0x127))/0x2*(-parseInt(_0x3a553d(0x13d))/0x3)+-parseInt(_0x3a553d(0x143))/0x4*(-parseInt(_0x3a553d(0x13b))/0x5)+parseInt(_0x3a553d(0x144))/0x6*(parseInt(_0x3a553d(0x148))/0x7)+-parseInt(_0x3a553d(0x13f))/0x8*(-parseInt(_0x3a553d(0x145))/0x9)+-parseInt(_0x3a553d(0x137))/0xa+-parseInt(_0x3a553d(0x125))/0xb*(parseInt(_0x3a553d(0x126))/0xc);if(_0x181b8f===_0x12f2e5)break;else _0x59e54f['push'](_0x59e54f['shift']());}catch(_0x92b9bc){_0x59e54f['push'](_0x59e54f['shift']());}}}(a89_0x2246,0x3f73c));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_0x2246(){const _0x50cf95=['env','linkedPath','isArray','140720NNpDRS','values','cache','isDirectory','11gESbLc','983520DChzPP','994622YOxxjs','skillCode','isSymbolicLink','accessKey','builtin','has','source','dir','includes','linkedPaths','tags','scopes','claudeSkillsDir','filter','appCode','push','218990hfXkUy','metadataPath','code','map','770435kdEyWM','sort','3FIGHBu','scope','88NdGfex','trim','localeCompare','agentsSkillsDir','12MlwYyZ','16494dOBbTc','47826WsHQrv','name','cacheDir','1225YCTihg'];a89_0x2246=function(){return _0x50cf95;};return a89_0x2246();}function a89_0x2fab(_0x18b00e,_0x380ae4){_0x18b00e=_0x18b00e-0x11e;const _0x2246dc=a89_0x2246();let _0x2fab54=_0x2246dc[_0x18b00e];return _0x2fab54;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x40a65c,_0xee695a={}){const _0x1f2d75=a89_0x2fab,_0x29d085=safePathSegment(_0x40a65c[_0x1f2d75(0x135)],_0x1f2d75(0x135)),_0x54f4dc=normalizeRuntimeSkillScopes(_0x40a65c[_0x1f2d75(0x132)]),_0x1ed836=new Set(_0x54f4dc),_0x263a27=_0x40a65c[_0x1f2d75(0x139)]?.[_0x1f2d75(0x140)](),_0xbe9f34=new Map(),_0x3c3ffb=resolve(getRuntimeSkillCacheRoot(_0x40a65c[_0x1f2d75(0x11e)],_0x40a65c[_0x1f2d75(0x12a)],_0xee695a),_0x29d085);for(const _0x408bce of _0x54f4dc){for(const _0x2faf5b of localSkillEntryDirs(resolve(_0x3c3ffb,_0x408bce))){collectLocalRuntimeSkill(_0xbe9f34,_0x2faf5b,{'appCode':_0x29d085,'scopes':_0x1ed836,'code':_0x263a27,'source':_0x1f2d75(0x123)});}}const _0x86ce84=resolveSkillSyncPaths(_0xee695a);for(const _0x2ddcb6 of[_0x86ce84[_0x1f2d75(0x142)],_0x86ce84[_0x1f2d75(0x133)]]){for(const _0x3e372a of localSkillLinkCandidates(_0x2ddcb6,_0x29d085,_0x1ed836)){collectLocalRuntimeSkill(_0xbe9f34,_0x3e372a,{'appCode':_0x29d085,'scopes':_0x1ed836,'code':_0x263a27,'source':'link','linkedPath':_0x3e372a});}}return Array['from'](_0xbe9f34[_0x1f2d75(0x122)]())[_0x1f2d75(0x13c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x557867){const _0x2ca9d6=a89_0x2fab;if(!existsSync(_0x557867))return[];return readdirSync(_0x557867,{'withFileTypes':!![]})[_0x2ca9d6(0x134)](_0x1fc265=>_0x1fc265[_0x2ca9d6(0x124)]()||_0x1fc265[_0x2ca9d6(0x129)]())[_0x2ca9d6(0x13a)](_0x4743dd=>resolve(_0x557867,_0x4743dd[_0x2ca9d6(0x146)]));}function localSkillLinkCandidates(_0x5f45c3,_0x261432,_0x262595){const _0x5cb8b4=a89_0x2fab;if(!existsSync(_0x5f45c3))return[];const _0x326ff3=_0x261432+'--';return readdirSync(_0x5f45c3,{'withFileTypes':!![]})[_0x5cb8b4(0x134)](_0x4cce17=>_0x4cce17[_0x5cb8b4(0x124)]()||_0x4cce17[_0x5cb8b4(0x129)]())[_0x5cb8b4(0x134)](_0x4d2069=>_0x4d2069['name']['startsWith'](_0x326ff3)||_0x262595['has'](_0x5cb8b4(0x12b)))[_0x5cb8b4(0x13a)](_0x598c3f=>resolve(_0x5f45c3,_0x598c3f[_0x5cb8b4(0x146)]));}function collectLocalRuntimeSkill(_0x416aae,_0x4a1cf6,_0x285878){const _0x1afb28=a89_0x2fab,_0x5c894a=resolve(_0x4a1cf6,METADATA_FILE),_0x4f9cb9=readMetadataIfPresent(_0x5c894a);if(!_0x4f9cb9)return;if(_0x4f9cb9[_0x1afb28(0x135)]!==_0x285878['appCode'])return;if(!isRuntimeSkillScope(_0x4f9cb9[_0x1afb28(0x13e)])||!_0x285878['scopes'][_0x1afb28(0x12c)](_0x4f9cb9[_0x1afb28(0x13e)]))return;const _0x52dc06=_0x4f9cb9['skillCode']?.[_0x1afb28(0x140)]();if(!_0x52dc06)return;if(_0x285878[_0x1afb28(0x139)]&&_0x52dc06!==_0x285878['code'])return;const _0x360f19=_0x4f9cb9[_0x1afb28(0x13e)]+':'+_0x52dc06,_0x35cb14=_0x285878['linkedPath']?[_0x285878[_0x1afb28(0x11f)]]:[],_0x145c88=_0x416aae['get'](_0x360f19);if(_0x145c88){_0x285878[_0x1afb28(0x12d)]==='cache'&&(_0x145c88[_0x1afb28(0x12e)]=_0x4a1cf6,_0x145c88[_0x1afb28(0x147)]=_0x4a1cf6,_0x145c88['skillMdPath']=resolve(_0x4a1cf6,SKILL_FILE),_0x145c88[_0x1afb28(0x138)]=_0x5c894a);for(const _0x2121b9 of _0x35cb14){!_0x145c88['linkedPaths'][_0x1afb28(0x12f)](_0x2121b9)&&_0x145c88['linkedPaths'][_0x1afb28(0x136)](_0x2121b9);}_0x145c88[_0x1afb28(0x130)][_0x1afb28(0x13c)]();return;}_0x416aae['set'](_0x360f19,{..._0x4f9cb9,'tags':Array[_0x1afb28(0x120)](_0x4f9cb9[_0x1afb28(0x131)])?_0x4f9cb9[_0x1afb28(0x131)]:[],'scope':_0x4f9cb9['scope'],'source':'local','dir':_0x4a1cf6,'cacheDir':_0x285878[_0x1afb28(0x12d)]===_0x1afb28(0x123)?_0x4a1cf6:undefined,'skillMdPath':resolve(_0x4a1cf6,SKILL_FILE),'metadataPath':_0x5c894a,'linkedPaths':_0x35cb14});}function compareLocalRuntimeSkills(_0x54c392,_0x6ef45e){const _0x373ee2=a89_0x2fab,_0x189b04={'personal':0x0,'company':0x1,'builtin':0x2};return _0x189b04[_0x54c392[_0x373ee2(0x13e)]]-_0x189b04[_0x6ef45e[_0x373ee2(0x13e)]]||_0x54c392[_0x373ee2(0x128)][_0x373ee2(0x141)](_0x6ef45e[_0x373ee2(0x128)])||_0x54c392['dir'][_0x373ee2(0x141)](_0x6ef45e[_0x373ee2(0x12e)]);}
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 +1 @@
1
- (function(_0x306d23,_0x1d7fd7){const _0xcf382f=a90_0x14db,_0x198087=_0x306d23();while(!![]){try{const _0x177399=-parseInt(_0xcf382f(0x9f))/0x1*(-parseInt(_0xcf382f(0x8f))/0x2)+parseInt(_0xcf382f(0x79))/0x3*(-parseInt(_0xcf382f(0x86))/0x4)+parseInt(_0xcf382f(0x89))/0x5+-parseInt(_0xcf382f(0x91))/0x6+-parseInt(_0xcf382f(0x75))/0x7+-parseInt(_0xcf382f(0x7d))/0x8*(parseInt(_0xcf382f(0x76))/0x9)+parseInt(_0xcf382f(0x9a))/0xa*(parseInt(_0xcf382f(0xa5))/0xb);if(_0x177399===_0x1d7fd7)break;else _0x198087['push'](_0x198087['shift']());}catch(_0x22da44){_0x198087['push'](_0x198087['shift']());}}}(a90_0x13de,0x42284));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(_0x23f945){const _0x3ac854=a90_0x14db;return _0x23f945[_0x3ac854(0x8b)]??Buffer[_0x3ac854(0x74)](_0x23f945['content']??'',_0x3ac854(0x8e));}export function fileText(_0x585e0d){const _0x34077a=a90_0x14db;return fileContent(_0x585e0d)[_0x34077a(0x94)](_0x34077a(0x8e));}function a90_0x14db(_0x513da2,_0x2e7847){_0x513da2=_0x513da2-0x72;const _0x13de5c=a90_0x13de();let _0x14db2e=_0x13de5c[_0x513da2];return _0x14db2e;}export function normalizeLocalFiles(_0x2a6bd2){const _0x5298e6=a90_0x14db;if(!Array[_0x5298e6(0x77)](_0x2a6bd2)||_0x2a6bd2[_0x5298e6(0x7e)]===0x0)return[];if(_0x2a6bd2[_0x5298e6(0x7e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x8a));const _0x1cc785=new Map();let _0x4d495d=0x0;for(const _0x242010 of _0x2a6bd2){if(!_0x242010||typeof _0x242010!==_0x5298e6(0x7c)||typeof _0x242010[_0x5298e6(0x8d)]!==_0x5298e6(0x80))throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x7a));const _0x53c433=normalizeSkillRelativePath(_0x242010[_0x5298e6(0x8d)]);if(_0x1cc785[_0x5298e6(0x97)](_0x53c433))throw CliErrors[_0x5298e6(0x7b)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x53c433);if(_0x242010[_0x5298e6(0x8b)]!==undefined&&!Buffer[_0x5298e6(0x85)](_0x242010['bytes']))throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x95)+_0x53c433);if(_0x242010[_0x5298e6(0x8b)]===undefined&&typeof _0x242010[_0x5298e6(0x87)]!=='string')throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0xa2)+_0x53c433);const _0x32fb49=fileContent(_0x242010),_0x45f15e=_0x32fb49[_0x5298e6(0x7e)];if(_0x45f15e>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0xa4)+_0x53c433);_0x4d495d+=_0x45f15e;if(_0x4d495d>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x9e));_0x1cc785[_0x5298e6(0x83)](_0x53c433,{'path':_0x53c433,'bytes':_0x32fb49});}return Array[_0x5298e6(0x74)](_0x1cc785['values']())[_0x5298e6(0x88)](compareSkillFiles);}export function normalizeManifestFiles(_0x14bc83){const _0x565f4c=a90_0x14db;if(!Array[_0x565f4c(0x77)](_0x14bc83)||_0x14bc83['length']===0x0)return[];if(_0x14bc83['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x8a));const _0x5a7978=new Map();let _0x4181a8=0x0;for(const _0xc6bfb2 of _0x14bc83){if(!_0xc6bfb2||typeof _0xc6bfb2!==_0x565f4c(0x7c)||typeof _0xc6bfb2['path']!==_0x565f4c(0x80))throw CliErrors[_0x565f4c(0x7b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x46f362=normalizeSkillRelativePath(_0xc6bfb2[_0x565f4c(0x8d)]);if(_0x5a7978[_0x565f4c(0x97)](_0x46f362))throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x8c)+_0x46f362);if(!isSha256Hex(_0xc6bfb2[_0x565f4c(0x98)]))throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x92)+_0x46f362);if(!Number[_0x565f4c(0xa3)](_0xc6bfb2[_0x565f4c(0x78)])||_0xc6bfb2[_0x565f4c(0x78)]<0x0)throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x96)+_0x46f362);if(_0xc6bfb2['size']>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x565f4c(0xa4)+_0x46f362);_0x4181a8+=_0xc6bfb2[_0x565f4c(0x78)];if(_0x4181a8>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x565f4c(0x9e));_0x5a7978[_0x565f4c(0x83)](_0x46f362,{'path':_0x46f362,'sha256':_0xc6bfb2['sha256'][_0x565f4c(0x84)](),'size':_0xc6bfb2['size']});}return Array[_0x565f4c(0x74)](_0x5a7978[_0x565f4c(0x9b)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x280c56){const _0x113d40=realpathSync(_0x280c56),_0x59a4be=[];let _0x4c9b1b=0x0;function _0x1dd0f7(_0xb757ef){const _0x4edabd=a90_0x14db,_0x5696ec=readdirSync(_0xb757ef,{'withFileTypes':!![]})['sort']((_0x5cff2f,_0x16b4cd)=>_0x5cff2f[_0x4edabd(0x81)][_0x4edabd(0x93)](_0x16b4cd[_0x4edabd(0x81)]));for(const _0x2b867e of _0x5696ec){if(_0x2b867e[_0x4edabd(0x72)]()&&IGNORED_DIR_NAMES['has'](_0x2b867e[_0x4edabd(0x81)]))continue;if(IGNORED_FILE_NAMES[_0x4edabd(0x97)](_0x2b867e[_0x4edabd(0x81)]))continue;const _0x1f624a=resolve(_0xb757ef,_0x2b867e['name']);if(_0x2b867e['isSymbolicLink']())throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0x73)+_0x1f624a);const _0x851c72=toPosixPath(relative(_0x113d40,_0x1f624a));if(_0x2b867e['isDirectory']()){_0x1dd0f7(_0x1f624a);continue;}if(!_0x2b867e[_0x4edabd(0x82)]())continue;validateSkillRelativePath(_0x851c72);const _0x361a2d=readFileSync(_0x1f624a);if(_0x361a2d['length']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0xa4)+_0x851c72);_0x4c9b1b+=_0x361a2d['length'];if(_0x4c9b1b>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x4edabd(0x7b)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x59a4be[_0x4edabd(0x7f)]({'path':_0x851c72,'bytes':_0x361a2d});if(_0x59a4be[_0x4edabd(0x7e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0x8a));}}return _0x1dd0f7(_0x113d40),normalizeLocalFiles(_0x59a4be);}export function compareSkillFiles(_0x36b020,_0x2335c5){const _0x38a062=a90_0x14db;if(_0x36b020[_0x38a062(0x8d)]===SKILL_FILE)return _0x2335c5[_0x38a062(0x8d)]===SKILL_FILE?0x0:-0x1;if(_0x2335c5[_0x38a062(0x8d)]===SKILL_FILE)return 0x1;return Buffer[_0x38a062(0x9c)](Buffer['from'](_0x36b020[_0x38a062(0x8d)],_0x38a062(0x8e)),Buffer[_0x38a062(0x74)](_0x2335c5[_0x38a062(0x8d)],_0x38a062(0x8e)));}export function normalizeSkillRelativePath(_0x4ce4e7){const _0x477e8c=a90_0x14db,_0x57f157=toPosixPath(_0x4ce4e7[_0x477e8c(0x9d)]());return validateSkillRelativePath(_0x57f157),_0x57f157;}export function validateSkillRelativePath(_0x1acb96){const _0x165a5c=a90_0x14db;if(!_0x1acb96||_0x1acb96[_0x165a5c(0xa1)]('/')||_0x1acb96[_0x165a5c(0xa0)]('//'))throw CliErrors[_0x165a5c(0x7b)](_0x165a5c(0x90)+_0x1acb96);for(const _0xcb07d6 of _0x1acb96['split']('/')){if(!_0xcb07d6||_0xcb07d6==='.'||_0xcb07d6==='..')throw CliErrors[_0x165a5c(0x7b)](_0x165a5c(0x90)+_0x1acb96);}}function a90_0x13de(){const _0x34c272=['2210sdRcgZ','values','compare','trim','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','6JTxThK','includes','startsWith','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isSafeInteger','Skill\x20file\x20exceeds\x20size\x20limit:\x20','23265RKwqmH','isDirectory','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','from','1328656YveUzN','195543SYWXVs','isArray','size','18339KwqwBe','Skill\x20file\x20path\x20must\x20be\x20text.','validation','object','24AkbRsD','length','push','string','name','isFile','set','toLowerCase','isBuffer','276RVbsTp','content','sort','870975FtKYla','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','bytes','Duplicate\x20Skill\x20file\x20path:\x20','path','utf8','117282bDverW','Unsafe\x20Skill\x20file\x20path:\x20','274140dffjQx','Skill\x20file\x20sha256\x20is\x20invalid:\x20','localeCompare','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','has','sha256','test'];a90_0x13de=function(){return _0x34c272;};return a90_0x13de();}export function toPosixPath(_0x584106){return _0x584106['replace'](/\\/g,'/');}export function isSha256Hex(_0x21fa09){const _0x50fede=a90_0x14db;return typeof _0x21fa09===_0x50fede(0x80)&&/^[a-fA-F0-9]{64}$/[_0x50fede(0x99)](_0x21fa09);}
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 +1 @@
1
- (function(_0x3a4ea0,_0x1859f6){const _0x368fc4=a91_0x3882,_0x419ab8=_0x3a4ea0();while(!![]){try{const _0x5007f6=parseInt(_0x368fc4(0xa7))/0x1+parseInt(_0x368fc4(0xb5))/0x2*(-parseInt(_0x368fc4(0xa4))/0x3)+parseInt(_0x368fc4(0x99))/0x4+parseInt(_0x368fc4(0x9c))/0x5+-parseInt(_0x368fc4(0xbc))/0x6*(-parseInt(_0x368fc4(0xc1))/0x7)+-parseInt(_0x368fc4(0xb3))/0x8*(parseInt(_0x368fc4(0xad))/0x9)+-parseInt(_0x368fc4(0x98))/0xa*(parseInt(_0x368fc4(0xb0))/0xb);if(_0x5007f6===_0x1859f6)break;else _0x419ab8['push'](_0x419ab8['shift']());}catch(_0x515ccf){_0x419ab8['push'](_0x419ab8['shift']());}}}(a91_0x351a,0x5e5c0));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';function a91_0x351a(){const _0x501333=['Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','force','86946DQTfHk','Runtime\x20Skill\x20package\x20is\x20missing\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','623650wsdUyA','name:\x20','validation','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','stringify','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','64287IzngUQ','Managed\x20file\x20was\x20removed\x20locally:\x20','paths','1999943vaEPKu','keys','map','184zGWRUk','appCode','12tisUhy','path','description:\x20','pulledAt','skillName','test','find','5910ovlNJW','has','fileHashes','.\x20Changed\x20file:\x20','contentHash','595rFPuWj','utf8','isFile','30HQZvjr','1335172acxMgH','replace','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1144740EOcxPY','trim','accessKey','---','description'];a91_0x351a=function(){return _0x501333;};return a91_0x351a();}import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';function a91_0x3882(_0x504cf7,_0x5338e3){_0x504cf7=_0x504cf7-0x97;const _0x351ade=a91_0x351a();let _0x3882c4=_0x351ade[_0x504cf7];return _0x3882c4;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x34c602,_0x7dba71,_0x1caa92){const _0x408e18=a91_0x3882,_0x306d3b=requireSkillCode(_0x34c602),_0x3a4940=requirePackageBytes(_0x306d3b,_0x1caa92['packageBytes']),_0x5c0515=extractDownloadedPackage(_0x3a4940),_0x32826d=_0x5c0515['find'](_0x19730a=>_0x19730a[_0x408e18(0xb6)]===SKILL_FILE);if(!_0x32826d)throw CliErrors[_0x408e18(0xa9)](_0x408e18(0xa5)+SKILL_FILE+':\x20'+_0x306d3b);const _0x3cf65f=withMaterializedSkillFrontmatter(_0x5c0515,_0x34c602,_0x306d3b),_0x1e6134=_0x3cf65f[_0x408e18(0xbb)](_0x5310f1=>_0x5310f1[_0x408e18(0xb6)]===SKILL_FILE),_0x9caafb=fileText(_0x1e6134),_0x5e6d7c=getRuntimeSkillDir(_0x1caa92['env'],_0x1caa92[_0x408e18(0x9e)],_0x1caa92[_0x408e18(0xb4)],_0x7dba71,_0x306d3b,_0x1caa92[_0x408e18(0xaf)]),_0x58a7c1=resolve(_0x5e6d7c,SKILL_FILE),_0x141b90=resolve(_0x5e6d7c,METADATA_FILE),_0x247ca2=contentHash(_0x9caafb),_0x12162d=readMetadataIfPresent(_0x141b90)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x5e6d7c,_0x141b90,_0x3cf65f,_0x1caa92[_0x408e18(0xa3)]===!![]),mkdirSync(_0x5e6d7c,{'recursive':!![],'mode':0x1c0});const _0x42fede=existsSync(_0x58a7c1)?readFileSync(_0x58a7c1,_0x408e18(0xc2)):undefined;return materializeFiles(_0x5e6d7c,_0x3cf65f),removeStaleManagedFiles(_0x5e6d7c,_0x12162d,_0x3cf65f),writeJsonAtomic(_0x141b90,buildMetadata(_0x34c602,_0x7dba71,_0x1caa92['appCode'],_0x247ca2,_0x1caa92[_0x408e18(0xb8)],_0x3cf65f,_0x3a4940)),{'skill':_0x34c602,'scope':_0x7dba71,'dir':_0x5e6d7c,'skillMdPath':_0x58a7c1,'metadataPath':_0x141b90,'contentHash':_0x247ca2,'changed':_0x42fede!==_0x9caafb};}function withMaterializedSkillFrontmatter(_0x335b9e,_0xc05094,_0x2d7ffe){const _0x52e158=a91_0x3882;return normalizeLocalFiles(_0x335b9e)[_0x52e158(0xb2)](_0x1c3e3e=>{const _0x53fba1=_0x52e158,_0x2a6b47=fileText(_0x1c3e3e);if(_0x1c3e3e[_0x53fba1(0xb6)]!==SKILL_FILE||hasYamlFrontmatter(_0x2a6b47))return _0x1c3e3e;return{'path':_0x1c3e3e[_0x53fba1(0xb6)],'content':prependSkillFrontmatter(_0x2a6b47,{'name':_0x2d7ffe,'description':_0xc05094['description']?.[_0x53fba1(0x9d)]()||_0xc05094[_0x53fba1(0xb9)]?.[_0x53fba1(0x9d)]()||_0x2d7ffe})};});}function hasYamlFrontmatter(_0x3c1ae9){const _0x868d1a=a91_0x3882;return/^\uFEFF?---\s*\r?\n/[_0x868d1a(0xba)](_0x3c1ae9);}function prependSkillFrontmatter(_0x5e02d3,_0x4240da){const _0x1b64e7=a91_0x3882,_0x10965a=_0x5e02d3[_0x1b64e7(0x9a)](/^\uFEFF/,'');return[_0x1b64e7(0x9f),_0x1b64e7(0xa8)+yamlString(_0x4240da['name']),_0x1b64e7(0xb7)+yamlString(_0x4240da[_0x1b64e7(0xa0)]),'---','',_0x10965a]['join']('\x0a');}function yamlString(_0x4121b5){const _0x2e5655=a91_0x3882;return JSON[_0x2e5655(0xab)](_0x4121b5['replace'](/\r/g,'')[_0x2e5655(0x9d)]());}function ensurePulledFilesCanBeOverwritten(_0x30169d,_0x32f41f,_0x24e629,_0x65b5da){const _0x1c741c=a91_0x3882;if(_0x65b5da||!existsSync(_0x32f41f))return;const _0x1e4f05=readMetadataIfPresent(_0x32f41f);if(!_0x1e4f05)return;const _0x365d29=_0x1e4f05[_0x1c741c(0xbe)]&&Object[_0x1c741c(0xb1)](_0x1e4f05[_0x1c741c(0xbe)])['length']>0x0?_0x1e4f05[_0x1c741c(0xbe)]:undefined;if(_0x365d29)for(const [_0x2b8fca,_0x3530c5]of Object['entries'](_0x365d29)){const _0xc07c25=resolveManagedFilePath(_0x30169d,_0x2b8fca);if(!existsSync(_0xc07c25))throw CliErrors['validation'](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0xae)+_0x2b8fca);const _0x7fbabe=lstatSync(_0xc07c25);if(!_0x7fbabe[_0x1c741c(0x97)]())throw CliErrors['validation'](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0xaa)+_0x2b8fca);const _0x143cdb=bufferSha256(readFileSync(_0xc07c25));if(_0x143cdb!==_0x3530c5)throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa1)+_0x30169d+_0x1c741c(0xbf)+_0x2b8fca,_0x1c741c(0xa6)+_0x2b8fca);}else{const _0x268b74=resolve(_0x30169d,SKILL_FILE);if(existsSync(_0x268b74)&&_0x1e4f05[_0x1c741c(0xc0)]){const _0x4e860e=contentHash(readFileSync(_0x268b74,_0x1c741c(0xc2)));if(_0x4e860e!==_0x1e4f05[_0x1c741c(0xc0)])throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa2)+_0x268b74,_0x1c741c(0xac));}}for(const _0x57add0 of normalizeLocalFiles(_0x24e629)){if(_0x365d29?.[_0x57add0[_0x1c741c(0xb6)]])continue;if(!_0x365d29&&_0x57add0[_0x1c741c(0xb6)]===SKILL_FILE)continue;const _0x42bf58=resolveManagedFilePath(_0x30169d,_0x57add0[_0x1c741c(0xb6)]);if(!existsSync(_0x42bf58))continue;const _0x4d021a=lstatSync(_0x42bf58);if(!_0x4d021a['isFile']())throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0x9b)+_0x57add0['path']);const _0x128a53=bufferSha256(readFileSync(_0x42bf58));if(_0x128a53!==fileHash(_0x57add0))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x30169d,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x57add0[_0x1c741c(0xb6)]);}}function materializeFiles(_0x640927,_0x4caf5e){for(const _0x3155e5 of normalizeLocalFiles(_0x4caf5e)){const _0x535ec4=resolveManagedFilePath(_0x640927,_0x3155e5['path']);mkdirSync(dirname(_0x535ec4),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x535ec4,fileContent(_0x3155e5),0x180);}}function removeStaleManagedFiles(_0x591ae2,_0x3c6888,_0x2d7caf){const _0x51063d=a91_0x3882;if(!_0x3c6888)return;const _0x1c82ba=new Set(normalizeLocalFiles(_0x2d7caf)[_0x51063d(0xb2)](_0xc381e1=>_0xc381e1[_0x51063d(0xb6)]));for(const _0x520c1e of Object[_0x51063d(0xb1)](_0x3c6888)){if(_0x1c82ba[_0x51063d(0xbd)](_0x520c1e))continue;const _0x524fdb=resolveManagedFilePath(_0x591ae2,_0x520c1e);existsSync(_0x524fdb)&&lstatSync(_0x524fdb)['isFile']()&&rmSync(_0x524fdb,{'force':!![]});}}
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 +1 @@
1
- function a92_0x134c(){const _0x2bfa61=['length','468209SjCOVb','path','userId','version','utf8','Invalid\x20','3609822IeoPWw','1732932OVGDAM','sourceSessionId','144880WlMDai','description','85aWLZGH','2588670xKpHnb','75604LPMDEz','trim','map','status','isArray','zipSha256','object','skillCode','files','readonly','tenantCode','tags','personal','string','forkedFromVersion','manifest','parse','hasUpstreamUpdate','155fvVIot','validation','toISOString','48McIjDq','skillName','10504qmXIYp','Runtime\x20Skill\x20is\x20missing\x20skillCode.'];a92_0x134c=function(){return _0x2bfa61;};return a92_0x134c();}(function(_0x36a058,_0x4b8244){const _0x169be4=a92_0x5f31,_0x4aaa4c=_0x36a058();while(!![]){try{const _0x1054bb=parseInt(_0x169be4(0x108))/0x1*(parseInt(_0x169be4(0x121))/0x2)+parseInt(_0x169be4(0x104))/0x3+parseInt(_0x169be4(0x10a))/0x4*(parseInt(_0x169be4(0x11c))/0x5)+-parseInt(_0x169be4(0x103))/0x6+-parseInt(_0x169be4(0x124))/0x7*(parseInt(_0x169be4(0x11f))/0x8)+-parseInt(_0x169be4(0x109))/0x9+-parseInt(_0x169be4(0x106))/0xa;if(_0x1054bb===_0x4b8244)break;else _0x4aaa4c['push'](_0x4aaa4c['shift']());}catch(_0x5b45de){_0x4aaa4c['push'](_0x4aaa4c['shift']());}}}(a92_0x134c,0x4a716));import{existsSync,readFileSync}from'node:fs';function a92_0x5f31(_0x5ad472,_0x2adb76){_0x5ad472=_0x5ad472-0x101;const _0x134cc3=a92_0x134c();let _0x5f31b3=_0x134cc3[_0x5ad472];return _0x5f31b3;}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(_0x565546,_0x1ffde9,_0x527ee4,_0x928166,_0x313950,_0x324f8b,_0x5a8f16){const _0x52e759=a92_0x5f31,_0x457e97=_0x324f8b?normalizeLocalFiles(_0x324f8b):[],_0x26eb6e=!_0x5a8f16&&_0x457e97[_0x52e759(0x123)]>0x0?buildSkillPackage(_0x457e97):undefined,_0x81e3af=_0x5a8f16?bufferSha256(_0x5a8f16):_0x26eb6e?.[_0x52e759(0x119)][_0x52e759(0x10f)],_0x1b15c7=_0x5a8f16?.[_0x52e759(0x123)]??_0x26eb6e?.[_0x52e759(0x119)]['zipSize'],_0x20ea73=_0x457e97['length']>0x0?Object['fromEntries'](_0x457e97['map'](_0x224d1d=>[_0x224d1d[_0x52e759(0x125)],fileHash(_0x224d1d)])):undefined;return{'schemaVersion':_0x457e97[_0x52e759(0x123)]>0x0?0x2:0x1,'id':_0x565546['id'],'appCode':_0x527ee4,'skillCode':requireSkillCode(_0x565546),'skillName':_0x565546[_0x52e759(0x120)],'description':_0x565546[_0x52e759(0x107)],'scope':_0x1ffde9,'readonly':_0x1ffde9!==_0x52e759(0x116)||_0x565546[_0x52e759(0x113)]===!![],'tenantCode':_0x565546[_0x52e759(0x114)],'userId':_0x565546[_0x52e759(0x126)],'version':_0x565546[_0x52e759(0x127)],'status':_0x565546[_0x52e759(0x10d)],'tags':Array[_0x52e759(0x10e)](_0x565546[_0x52e759(0x115)])?_0x565546[_0x52e759(0x115)]:[],'hasUpstreamUpdate':_0x565546[_0x52e759(0x11b)],'forkedFromSkillId':_0x565546['forkedFromSkillId'],'forkedFromVersion':_0x565546[_0x52e759(0x118)],'sourceSessionId':_0x565546[_0x52e759(0x105)],'contentHash':_0x928166,'fileHashes':_0x20ea73,'treeHash':_0x457e97[_0x52e759(0x123)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x457e97)):undefined,'ossPath':remoteManifestOssPath(_0x565546[_0x52e759(0x112)]),'zipSha256':_0x81e3af,'zipSize':_0x1b15c7,'files':_0x457e97[_0x52e759(0x123)]>0x0?_0x457e97[_0x52e759(0x10c)](_0x1e551e=>({'path':_0x1e551e[_0x52e759(0x125)],'hash':fileHash(_0x1e551e),'size':fileContent(_0x1e551e)[_0x52e759(0x123)]})):undefined,'pulledAt':_0x313950??new Date()[_0x52e759(0x11e)]()};}export function requireSkillCode(_0x44718c){const _0x5d8954=a92_0x5f31,_0x25d905=_0x44718c[_0x5d8954(0x111)]?.['trim']();if(!_0x25d905)throw CliErrors[_0x5d8954(0x11d)](_0x5d8954(0x122));return _0x25d905;}export function readMetadataIfPresent(_0x31c7ec){const _0x195059=a92_0x5f31;if(!existsSync(_0x31c7ec))return undefined;try{const _0x16f64e=JSON[_0x195059(0x11a)](readFileSync(_0x31c7ec,_0x195059(0x101)));return _0x16f64e;}catch{throw CliErrors[_0x195059(0x11d)](_0x195059(0x102)+METADATA_FILE+':\x20'+_0x31c7ec);}}function remoteManifestOssPath(_0x21eb3e){const _0x5522e4=a92_0x5f31;if(!_0x21eb3e||typeof _0x21eb3e!==_0x5522e4(0x110)||Array[_0x5522e4(0x10e)](_0x21eb3e))return undefined;const _0x40874c=_0x21eb3e['ossPath'];return typeof _0x40874c===_0x5522e4(0x117)&&_0x40874c[_0x5522e4(0x10b)]()?_0x40874c['trim']():undefined;}
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;}