@lovrabet/lovrabet-cli 2.1.11-beta.3 → 2.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/index.js +1 -1
  41. package/lib/commands/service/registry.js +1 -1
  42. package/lib/commands/skill/commands/create.js +1 -1
  43. package/lib/commands/skill/commands/install.js +1 -1
  44. package/lib/commands/skill/commands/list.js +1 -1
  45. package/lib/commands/skill/commands/push.js +1 -1
  46. package/lib/commands/skill/commands/validate.js +1 -1
  47. package/lib/commands/skill/flags.js +1 -1
  48. package/lib/commands/skill/index.js +1 -1
  49. package/lib/commands/skill/manifest-helpers.js +1 -1
  50. package/lib/commands/skill/push-execute.js +1 -1
  51. package/lib/commands/skill/push-flow-helpers.js +1 -1
  52. package/lib/commands/skill/push-retarget.js +1 -1
  53. package/lib/commands/skill/scopes.js +1 -1
  54. package/lib/commands/skill/summary.js +1 -1
  55. package/lib/commands/skill/templates.js +1 -1
  56. package/lib/commands/skill/validate.js +1 -1
  57. package/lib/commands/sql/detail.js +1 -1
  58. package/lib/commands/sql/exec.js +1 -1
  59. package/lib/commands/sql/index.js +1 -1
  60. package/lib/commands/update.js +1 -1
  61. package/lib/commands/workspace/index.js +1 -1
  62. package/lib/config/schema.js +1 -1
  63. package/lib/constant/app.js +1 -1
  64. package/lib/constant/auth-mode.js +1 -1
  65. package/lib/constant/cli.js +1 -1
  66. package/lib/constant/defaults.js +1 -1
  67. package/lib/constant/distribution.js +1 -1
  68. package/lib/constant/domain.js +1 -1
  69. package/lib/constant/env.js +1 -1
  70. package/lib/constant/output.js +1 -1
  71. package/lib/constant/product.js +1 -1
  72. package/lib/constant/risk.js +1 -1
  73. package/lib/constant/url.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/db-resolver.js +1 -1
  77. package/lib/core/sdk-client.js +1 -1
  78. package/lib/errors.js +1 -1
  79. package/lib/framework/build-all-flags.js +1 -1
  80. package/lib/framework/dryrun.js +1 -1
  81. package/lib/framework/flags.js +1 -1
  82. package/lib/framework/help.js +1 -1
  83. package/lib/framework/index.js +1 -1
  84. package/lib/framework/output.js +1 -1
  85. package/lib/framework/preparse.js +1 -1
  86. package/lib/framework/rate-limit.js +1 -1
  87. package/lib/framework/response.js +1 -1
  88. package/lib/framework/runner-confirmation.js +1 -1
  89. package/lib/framework/runner-error.js +1 -1
  90. package/lib/framework/runner.js +1 -1
  91. package/lib/framework/schema-export.js +1 -1
  92. package/lib/framework/service-order.js +1 -1
  93. package/lib/framework/types.js +1 -1
  94. package/lib/generated/build-info.js +1 -1
  95. package/lib/help.js +1 -1
  96. package/lib/skills/npx-skills-add.js +1 -1
  97. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  98. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  99. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  100. package/lib/skills/runtime-skill-sync/links.js +1 -1
  101. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  102. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  103. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  104. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  105. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  106. package/lib/skills/runtime-skill-sync/push.js +1 -1
  107. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  110. package/lib/skills/runtime-skill-sync.js +1 -1
  111. package/lib/utils/apply-jq-filter.js +1 -1
  112. package/lib/utils/logger.js +1 -1
  113. package/lib/utils/lossless-json.js +1 -1
  114. package/lib/utils/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5abfa2,_0x2f727c){const _0x4fa6ba=a90_0x105c,_0x165e7e=_0x5abfa2();while(!![]){try{const _0x160e6e=parseInt(_0x4fa6ba(0x15d))/0x1*(-parseInt(_0x4fa6ba(0x160))/0x2)+-parseInt(_0x4fa6ba(0x169))/0x3*(-parseInt(_0x4fa6ba(0x163))/0x4)+-parseInt(_0x4fa6ba(0x158))/0x5+-parseInt(_0x4fa6ba(0x15e))/0x6+parseInt(_0x4fa6ba(0x15a))/0x7*(-parseInt(_0x4fa6ba(0x159))/0x8)+-parseInt(_0x4fa6ba(0x161))/0x9+parseInt(_0x4fa6ba(0x165))/0xa;if(_0x160e6e===_0x2f727c)break;else _0x165e7e['push'](_0x165e7e['shift']());}catch(_0x3c25a3){_0x165e7e['push'](_0x165e7e['shift']());}}}(a90_0x4fbd,0x60f8e));import{buildSchemaPayload as a90_0x3404a9}from'@lovrabet/cli-framework';function a90_0x4fbd(){const _0x449291=['required','filter','3DTjyly','map','2773375BJOBdF','5856336FeXEYD','7bgVnOy','has','services','10243cCLZdt','1467852fVnmoG','auth','20dRYXzD','2226681GslMIY','requiresAuth','1611924uoidrg','none','18754150mAjTvj','service'];a90_0x4fbd=function(){return _0x449291;};return a90_0x4fbd();}import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x528990=a90_0x105c,{serviceRegistry:_0x2b2a55,findDefinition:_0x303491}=await import('../commands/registry.js'),_0x44406e=new Set(_0x2b2a55[_0x528990(0x157)](_0x59aa96=>_0x59aa96[_0x528990(0x166)])),_0xf695c8=listDynamicServiceEntries()[_0x528990(0x168)](_0x36c845=>!_0x44406e[_0x528990(0x15b)](_0x36c845[_0x528990(0x166)])),_0x59b359=a90_0x3404a9({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x2b2a55,_0xf695c8),'buildAllFlags':buildAllFlags,'findDefinition':(_0x33e851,_0x28014d)=>_0x303491(_0x33e851,_0x28014d)??findDynamicServiceDefinition(_0x33e851,_0x28014d)});return normalizeSchemaPayload(_0x59b359);}function a90_0x105c(_0x47f1ba,_0x34211f){_0x47f1ba=_0x47f1ba-0x157;const _0x4fbd9a=a90_0x4fbd();let _0x105c9e=_0x4fbd9a[_0x47f1ba];return _0x105c9e;}function normalizeSchemaPayload(_0x2c70a7){const _0x5cb196=a90_0x105c;return{..._0x2c70a7,'schemaVersion':0x2,'services':_0x2c70a7[_0x5cb196(0x15c)][_0x5cb196(0x157)](_0x43c862=>({..._0x43c862,'commands':_0x43c862['commands']['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x1eb3bc){const _0x57cfa6=a90_0x105c,_0x9d8276=_0x1eb3bc;return{..._0x1eb3bc,'auth':_0x9d8276[_0x57cfa6(0x15f)]??(_0x1eb3bc[_0x57cfa6(0x162)]?_0x57cfa6(0x167):_0x57cfa6(0x164))};}
1
+ (function(_0x19cdab,_0x310b4a){const _0x3c23e5=a90_0x2493,_0x179d26=_0x19cdab();while(!![]){try{const _0x12d25b=-parseInt(_0x3c23e5(0x144))/0x1+parseInt(_0x3c23e5(0x14a))/0x2+parseInt(_0x3c23e5(0x13e))/0x3+-parseInt(_0x3c23e5(0x140))/0x4+parseInt(_0x3c23e5(0x147))/0x5*(-parseInt(_0x3c23e5(0x149))/0x6)+-parseInt(_0x3c23e5(0x13b))/0x7*(parseInt(_0x3c23e5(0x13c))/0x8)+parseInt(_0x3c23e5(0x145))/0x9;if(_0x12d25b===_0x310b4a)break;else _0x179d26['push'](_0x179d26['shift']());}catch(_0x3ec0e9){_0x179d26['push'](_0x179d26['shift']());}}}(a90_0x5647,0x84bf4));import{buildSchemaPayload as a90_0x1cd505}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a90_0x5647(){const _0x15b2a8=['889zOaLeb','23648lFtthP','services','1176204gTnTIO','auth','2577112LieCuS','map','../commands/registry.js','service','620907zpfCuT','23325147jdARAJ','commands','696065avkzHr','none','42MNszIp','350138ISndBA','required','has','requiresAuth'];a90_0x5647=function(){return _0x15b2a8;};return a90_0x5647();}import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a90_0x2493(_0x122f11,_0xa0e6f6){_0x122f11=_0x122f11-0x13a;const _0x5647c4=a90_0x5647();let _0x24938f=_0x5647c4[_0x122f11];return _0x24938f;}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 _0x3e3217=a90_0x2493,{serviceRegistry:_0x4d4952,findDefinition:_0x3204b8}=await import(_0x3e3217(0x142)),_0x40f261=new Set(_0x4d4952['map'](_0x36fde6=>_0x36fde6['service'])),_0x30eff0=listDynamicServiceEntries()['filter'](_0x44fa70=>!_0x40f261[_0x3e3217(0x14c)](_0x44fa70[_0x3e3217(0x143)])),_0x422d2f=a90_0x1cd505({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x4d4952,_0x30eff0),'buildAllFlags':buildAllFlags,'findDefinition':(_0x138dd9,_0x4968b3)=>_0x3204b8(_0x138dd9,_0x4968b3)??findDynamicServiceDefinition(_0x138dd9,_0x4968b3)});return normalizeSchemaPayload(_0x422d2f);}function normalizeSchemaPayload(_0x4f21f6){const _0x3627d6=a90_0x2493;return{..._0x4f21f6,'schemaVersion':0x2,'services':_0x4f21f6[_0x3627d6(0x13d)][_0x3627d6(0x141)](_0x5d6c79=>({..._0x5d6c79,'commands':_0x5d6c79[_0x3627d6(0x146)][_0x3627d6(0x141)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x3f3f28){const _0x2fe5fa=a90_0x2493,_0x4b5bcc=_0x3f3f28;return{..._0x3f3f28,'auth':_0x4b5bcc[_0x2fe5fa(0x13f)]??(_0x3f3f28[_0x2fe5fa(0x13a)]?_0x2fe5fa(0x14b):_0x2fe5fa(0x148))};}
@@ -1 +1 @@
1
- function a91_0x1ac6(){const _0x208f8d=['36NIjnmO','7829028Uigtqs','2361384CWvuan','264116azVwmF','4gnJiYg','2542200roaWmy','740341XRLUzw','1014150kmTjuN','20922330rSsHqf','length','12aQxVJW','service'];a91_0x1ac6=function(){return _0x208f8d;};return a91_0x1ac6();}function a91_0x38e0(_0x490266,_0x122e5f){_0x490266=_0x490266-0x1da;const _0x1ac6f4=a91_0x1ac6();let _0x38e0c5=_0x1ac6f4[_0x490266];return _0x38e0c5;}(function(_0x2dc15c,_0x51f14e){const _0x363747=a91_0x38e0,_0x3b9ffc=_0x2dc15c();while(!![]){try{const _0x17312b=parseInt(_0x363747(0x1dd))/0x1*(-parseInt(_0x363747(0x1de))/0x2)+parseInt(_0x363747(0x1e1))/0x3*(-parseInt(_0x363747(0x1e4))/0x4)+-parseInt(_0x363747(0x1df))/0x5+-parseInt(_0x363747(0x1da))/0x6*(parseInt(_0x363747(0x1e0))/0x7)+parseInt(_0x363747(0x1dc))/0x8+parseInt(_0x363747(0x1db))/0x9+parseInt(_0x363747(0x1e2))/0xa;if(_0x17312b===_0x51f14e)break;else _0x3b9ffc['push'](_0x3b9ffc['shift']());}catch(_0x38e922){_0x3b9ffc['push'](_0x3b9ffc['shift']());}}}(a91_0x1ac6,0x8b9fa));export function insertDynamicServicesAfterServiceTree(_0x36c6d5,_0x23c05e){const _0x3dfe89=a91_0x38e0;if(_0x23c05e[_0x3dfe89(0x1e3)]===0x0)return[..._0x36c6d5];const _0x1de83c=_0x36c6d5['findIndex'](_0x5dd216=>_0x5dd216[_0x3dfe89(0x1e5)]==='service');if(_0x1de83c<0x0)return[..._0x36c6d5,..._0x23c05e];return[..._0x36c6d5['slice'](0x0,_0x1de83c+0x1),..._0x23c05e,..._0x36c6d5['slice'](_0x1de83c+0x1)];}
1
+ function a91_0xdfb8(){const _0xd6e8c5=['9WAORbt','18748708rdSRXK','length','findIndex','slice','732540EnEVmt','10235tjzUjM','117XYxVHt','1976zXkAVs','21273kkAiml','2670kbNvUX','144170JsAQji','service','500996DRdwHv','2397276cttXGp'];a91_0xdfb8=function(){return _0xd6e8c5;};return a91_0xdfb8();}(function(_0x3b6234,_0x1e7639){const _0x25c4ff=a91_0x2dff,_0x4140f5=_0x3b6234();while(!![]){try{const _0x33b056=-parseInt(_0x25c4ff(0x117))/0x1+parseInt(_0x25c4ff(0x10a))/0x2*(parseInt(_0x25c4ff(0x10c))/0x3)+-parseInt(_0x25c4ff(0x10b))/0x4+-parseInt(_0x25c4ff(0x112))/0x5*(-parseInt(_0x25c4ff(0x116))/0x6)+parseInt(_0x25c4ff(0x115))/0x7*(parseInt(_0x25c4ff(0x114))/0x8)+-parseInt(_0x25c4ff(0x113))/0x9*(-parseInt(_0x25c4ff(0x111))/0xa)+-parseInt(_0x25c4ff(0x10d))/0xb;if(_0x33b056===_0x1e7639)break;else _0x4140f5['push'](_0x4140f5['shift']());}catch(_0x16783e){_0x4140f5['push'](_0x4140f5['shift']());}}}(a91_0xdfb8,0xdffb3));function a91_0x2dff(_0xede5c4,_0x4fe059){_0xede5c4=_0xede5c4-0x109;const _0xdfb897=a91_0xdfb8();let _0x2dff97=_0xdfb897[_0xede5c4];return _0x2dff97;}export function insertDynamicServicesAfterServiceTree(_0x291468,_0x8873c){const _0x33c2a2=a91_0x2dff;if(_0x8873c[_0x33c2a2(0x10e)]===0x0)return[..._0x291468];const _0x4d5d91=_0x291468[_0x33c2a2(0x10f)](_0xea00fe=>_0xea00fe[_0x33c2a2(0x109)]===_0x33c2a2(0x109));if(_0x4d5d91<0x0)return[..._0x291468,..._0x8873c];return[..._0x291468[_0x33c2a2(0x110)](0x0,_0x4d5d91+0x1),..._0x8873c,..._0x291468['slice'](_0x4d5d91+0x1)];}
@@ -1 +1 @@
1
- function a92_0x2cae(_0x8b6889,_0xd8bb73){_0x8b6889=_0x8b6889-0x1c7;var _0x3f95cb=a92_0x3f95();var _0x2cae2c=_0x3f95cb[_0x8b6889];return _0x2cae2c;}(function(_0x2a2be5,_0x5c86cf){var _0x4fe594=a92_0x2cae,_0x166b88=_0x2a2be5();while(!![]){try{var _0x585954=-parseInt(_0x4fe594(0x1c7))/0x1*(-parseInt(_0x4fe594(0x1cf))/0x2)+parseInt(_0x4fe594(0x1cb))/0x3*(parseInt(_0x4fe594(0x1c9))/0x4)+-parseInt(_0x4fe594(0x1cc))/0x5+parseInt(_0x4fe594(0x1d0))/0x6+-parseInt(_0x4fe594(0x1cd))/0x7+-parseInt(_0x4fe594(0x1ce))/0x8*(-parseInt(_0x4fe594(0x1c8))/0x9)+-parseInt(_0x4fe594(0x1ca))/0xa;if(_0x585954===_0x5c86cf)break;else _0x166b88['push'](_0x166b88['shift']());}catch(_0x5e1024){_0x166b88['push'](_0x166b88['shift']());}}}(a92_0x3f95,0xa47ad));function a92_0x3f95(){var _0x5b61dd=['3792194wtALEf','14632MpueMP','61802zxHHxN','3532524QNGKny','43yXkxai','4482jBEIPo','46700VPdZag','16627680GMmTzu','33SmKMqA','392725IWZsvL'];a92_0x3f95=function(){return _0x5b61dd;};return a92_0x3f95();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a92_0x50ae(_0x51a9bc,_0x217e02){_0x51a9bc=_0x51a9bc-0x1c3;var _0x4b019c=a92_0x4b01();var _0x50aeb7=_0x4b019c[_0x51a9bc];return _0x50aeb7;}(function(_0x4f1514,_0x4d8a76){var _0x14dc9c=a92_0x50ae,_0x1df49f=_0x4f1514();while(!![]){try{var _0x44e8ef=-parseInt(_0x14dc9c(0x1c3))/0x1*(-parseInt(_0x14dc9c(0x1c9))/0x2)+-parseInt(_0x14dc9c(0x1cc))/0x3+parseInt(_0x14dc9c(0x1c6))/0x4*(-parseInt(_0x14dc9c(0x1ca))/0x5)+parseInt(_0x14dc9c(0x1c7))/0x6+parseInt(_0x14dc9c(0x1c8))/0x7+-parseInt(_0x14dc9c(0x1c5))/0x8+parseInt(_0x14dc9c(0x1c4))/0x9*(parseInt(_0x14dc9c(0x1cb))/0xa);if(_0x44e8ef===_0x4d8a76)break;else _0x1df49f['push'](_0x1df49f['shift']());}catch(_0x49d8c9){_0x1df49f['push'](_0x1df49f['shift']());}}}(a92_0x4b01,0x30325));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a92_0x4b01(){var _0x5d251d=['1184712yyRFXO','1693146vikHfW','14682JcvNvs','665295WRyVqg','663640NSNikJ','635271CZqeur','12tToJiD','36dNwsHf','2005192FLVgLI','4JdQfby'];a92_0x4b01=function(){return _0x5d251d;};return a92_0x4b01();}
@@ -1 +1 @@
1
- const a93_0x5b3527=a93_0x4814;(function(_0x364831,_0x349eb2){const _0x59314a=a93_0x4814,_0x29c473=_0x364831();while(!![]){try{const _0x2afb60=parseInt(_0x59314a(0x193))/0x1*(parseInt(_0x59314a(0x195))/0x2)+-parseInt(_0x59314a(0x194))/0x3*(-parseInt(_0x59314a(0x19c))/0x4)+-parseInt(_0x59314a(0x197))/0x5*(parseInt(_0x59314a(0x196))/0x6)+-parseInt(_0x59314a(0x190))/0x7*(-parseInt(_0x59314a(0x19d))/0x8)+-parseInt(_0x59314a(0x19b))/0x9*(-parseInt(_0x59314a(0x19a))/0xa)+parseInt(_0x59314a(0x199))/0xb+-parseInt(_0x59314a(0x192))/0xc*(parseInt(_0x59314a(0x191))/0xd);if(_0x2afb60===_0x349eb2)break;else _0x29c473['push'](_0x29c473['shift']());}catch(_0x2d6408){_0x29c473['push'](_0x29c473['shift']());}}}(a93_0x23c0,0x6e985));function a93_0x23c0(){const _0x22187a=['5273048eqoNyT','425800sGAFzw','81aWgNDO','570768FamwXd','2317064RuoDlF','2026-07-13T12:41:35.460Z','7wmCKVI','18333341xGowQO','12rWMtvd','56110KwQwLg','6ziAkii','20JifyFm','42774SPHHTU','95cznLAC','f615ab1'];a93_0x23c0=function(){return _0x22187a;};return a93_0x23c0();}export const VERSION='2.1.11-beta.3';export const GIT_TAG='v2.1.11-beta.3';function a93_0x4814(_0x135057,_0x3c32d4){_0x135057=_0x135057-0x18f;const _0x23c01f=a93_0x23c0();let _0x481439=_0x23c01f[_0x135057];return _0x481439;}export const GIT_COMMIT=a93_0x5b3527(0x198);export const BUILD_TIME=a93_0x5b3527(0x18f);
1
+ const a93_0x3fb7ba=a93_0x47aa;(function(_0x587a6c,_0x9be6df){const _0x5dcff4=a93_0x47aa,_0x2a725a=_0x587a6c();while(!![]){try{const _0x166e0b=-parseInt(_0x5dcff4(0x12d))/0x1*(-parseInt(_0x5dcff4(0x137))/0x2)+parseInt(_0x5dcff4(0x134))/0x3*(parseInt(_0x5dcff4(0x132))/0x4)+parseInt(_0x5dcff4(0x131))/0x5*(-parseInt(_0x5dcff4(0x136))/0x6)+-parseInt(_0x5dcff4(0x129))/0x7*(-parseInt(_0x5dcff4(0x12b))/0x8)+parseInt(_0x5dcff4(0x130))/0x9*(-parseInt(_0x5dcff4(0x138))/0xa)+parseInt(_0x5dcff4(0x12f))/0xb+-parseInt(_0x5dcff4(0x12a))/0xc;if(_0x166e0b===_0x9be6df)break;else _0x2a725a['push'](_0x2a725a['shift']());}catch(_0x44ce5e){_0x2a725a['push'](_0x2a725a['shift']());}}}(a93_0x2fa2,0xeb539));function a93_0x2fa2(){const _0xe2e8c4=['280iUJUYx','87b2273','1YDWnNk','2026-07-14T02:41:58.307Z','11264924DFwvBV','2115fcQqwj','2422725ntInLA','8LMtfyg','2.1.11','1253736xceunA','v2.1.11-beta.2','18uwfqgj','3469524Uuadqa','8790YIOCOo','94339lkJxff','17307216uNMlCW'];a93_0x2fa2=function(){return _0xe2e8c4;};return a93_0x2fa2();}export const VERSION=a93_0x3fb7ba(0x133);export const GIT_TAG=a93_0x3fb7ba(0x135);export const GIT_COMMIT=a93_0x3fb7ba(0x12c);function a93_0x47aa(_0x36bb95,_0x3be7a3){_0x36bb95=_0x36bb95-0x129;const _0x2fa250=a93_0x2fa2();let _0x47aa30=_0x2fa250[_0x36bb95];return _0x47aa30;}export const BUILD_TIME=a93_0x3fb7ba(0x12e);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x313832,_0x683608){const _0x23e0c1=a94_0x3c56,_0x4b8de3=_0x313832();while(!![]){try{const _0x4ea65c=-parseInt(_0x23e0c1(0x1dd))/0x1+parseInt(_0x23e0c1(0x1d7))/0x2+-parseInt(_0x23e0c1(0x1d9))/0x3*(-parseInt(_0x23e0c1(0x1d8))/0x4)+parseInt(_0x23e0c1(0x1db))/0x5*(-parseInt(_0x23e0c1(0x1da))/0x6)+-parseInt(_0x23e0c1(0x1d4))/0x7+parseInt(_0x23e0c1(0x1e1))/0x8+-parseInt(_0x23e0c1(0x1df))/0x9*(parseInt(_0x23e0c1(0x1e0))/0xa);if(_0x4ea65c===_0x683608)break;else _0x4b8de3['push'](_0x4b8de3['shift']());}catch(_0xdf2315){_0x4b8de3['push'](_0x4b8de3['shift']());}}}(a94_0x182d,0x98ccf));import{jsx as a94_0x8f10a9,jsxs as a94_0x175bd0}from'react/jsx-runtime';import{useEffect}from'react';function a94_0x182d(){const _0x5f3086=['2370204cqAgGW','6404YLqoRf','1227MwJCNI','60lDmfqv','256400qfXyhw','\x20\x20Use\x20','828211MlRwCw','\x20--help','99ixgAkO','355660xeKvrW','7978312NMjkzY','column','3353644lXCWFC','\x20to\x20view\x20available\x20commands.','green'];a94_0x182d=function(){return _0x5f3086;};return a94_0x182d();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a94_0x3c56(_0x338642,_0x4031e9){_0x338642=_0x338642-0x1d4;const _0x182dec=a94_0x182d();let _0x3c5675=_0x182dec[_0x338642];return _0x3c5675;}export function Help(){const _0x724236=a94_0x3c56,{exit:_0x4929db}=useApp();return useEffect(()=>{_0x4929db();},[_0x4929db]),a94_0x175bd0(Box,{'flexDirection':_0x724236(0x1e2),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x8f10a9(Box,{'children':a94_0x8f10a9(Text,{'bold':!![],'color':_0x724236(0x1d6),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x175bd0(Box,{'marginTop':0x1,'children':[a94_0x8f10a9(Text,{'dimColor':!![],'children':_0x724236(0x1dc)}),a94_0x8f10a9(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x724236(0x1de)}),a94_0x8f10a9(Text,{'dimColor':!![],'children':_0x724236(0x1d5)})]})]});}
1
+ (function(_0xd27ed0,_0x2b9d3c){const _0x16517d=a94_0x1aae,_0x445fd9=_0xd27ed0();while(!![]){try{const _0x377677=-parseInt(_0x16517d(0x14e))/0x1+-parseInt(_0x16517d(0x14f))/0x2*(parseInt(_0x16517d(0x14c))/0x3)+-parseInt(_0x16517d(0x146))/0x4+-parseInt(_0x16517d(0x14d))/0x5+parseInt(_0x16517d(0x14b))/0x6*(parseInt(_0x16517d(0x145))/0x7)+parseInt(_0x16517d(0x144))/0x8+-parseInt(_0x16517d(0x147))/0x9*(-parseInt(_0x16517d(0x148))/0xa);if(_0x377677===_0x2b9d3c)break;else _0x445fd9['push'](_0x445fd9['shift']());}catch(_0x56fec6){_0x445fd9['push'](_0x445fd9['shift']());}}}(a94_0x55dd,0x84370));import{jsx as a94_0x2180ab,jsxs as a94_0x2043eb}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a94_0x55dd(){const _0x2d660a=['411382mgEoAe','130ZHiDCe','6942072SBwVNZ','62055LVnVzs','2451360vikcaD','4420611zbRcSj','30hmPPWR','green','\x20to\x20view\x20available\x20commands.','276vUBIOt','27327tAdGtI','2956135cHkSyl'];a94_0x55dd=function(){return _0x2d660a;};return a94_0x55dd();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a94_0x1aae(_0x3b68a8,_0xb25691){_0x3b68a8=_0x3b68a8-0x144;const _0x55dd51=a94_0x55dd();let _0x1aaed7=_0x55dd51[_0x3b68a8];return _0x1aaed7;}export function Help(){const _0x49d764=a94_0x1aae,{exit:_0x2fb95f}=useApp();return useEffect(()=>{_0x2fb95f();},[_0x2fb95f]),a94_0x2043eb(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a94_0x2180ab(Box,{'children':a94_0x2180ab(Text,{'bold':!![],'color':_0x49d764(0x149),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x2043eb(Box,{'marginTop':0x1,'children':[a94_0x2180ab(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a94_0x2180ab(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+'\x20--help'}),a94_0x2180ab(Text,{'dimColor':!![],'children':_0x49d764(0x14a)})]})]});}
@@ -1 +1 @@
1
- const a95_0x44d065=a95_0x234f;function a95_0x234f(_0x1c9e1d,_0x4d6cd5){_0x1c9e1d=_0x1c9e1d-0x6e;const _0x476f46=a95_0x476f();let _0x234fc5=_0x476f46[_0x1c9e1d];return _0x234fc5;}(function(_0x306593,_0x1d8b9a){const _0x124ebe=a95_0x234f,_0x27e315=_0x306593();while(!![]){try{const _0x500483=parseInt(_0x124ebe(0x83))/0x1+-parseInt(_0x124ebe(0x77))/0x2*(-parseInt(_0x124ebe(0x7f))/0x3)+parseInt(_0x124ebe(0x7a))/0x4+parseInt(_0x124ebe(0x85))/0x5+-parseInt(_0x124ebe(0x74))/0x6+-parseInt(_0x124ebe(0x7c))/0x7*(-parseInt(_0x124ebe(0x7d))/0x8)+parseInt(_0x124ebe(0x7b))/0x9*(-parseInt(_0x124ebe(0x7e))/0xa);if(_0x500483===_0x1d8b9a)break;else _0x27e315['push'](_0x27e315['shift']());}catch(_0x3ef53e){_0x27e315['push'](_0x27e315['shift']());}}}(a95_0x476f,0xddd6f));function a95_0x476f(){const _0xcdaec0=['711718xmDfje','stdout','8342830SvYJgq','status','skipNpxSkillsEnvSuffix','stdio','npx','skills','unknown','4380804BduWcm','pipe','toString','10410zsNQCo','inherit','join','4454856bdUEWm','11808414hxGwap','28NamXKL','881936VXIzQN','20bldRil','189NVKyaj','log','stderr','trim'];a95_0x476f=function(){return _0xcdaec0;};return a95_0x476f();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0x27b0b0}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x27b0b0;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0x44d065(0x6f)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x25af5c,_0x28a752=LOVRABET_SKILL_SOURCE,_0x5c1b11){const _0x5bde30=a95_0x44d065;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2c3ab4=_0x5c1b11?.[_0x5bde30(0x70)]??_0x5bde30(0x78),_0x5e657b=resolveNpmBin(_0x5bde30(0x71)),_0x3439de=[_0x5bde30(0x72),'add',_0x28a752,'-g','-y'],_0x4caa9f=[_0x5e657b,..._0x3439de][_0x5bde30(0x79)]('\x20');console[_0x5bde30(0x80)]('*\x20'+_0x4caa9f);const _0x17bfaa=spawnSync(_0x5e657b,_0x3439de,{'cwd':_0x25af5c,'stdio':_0x2c3ab4,'env':process.env,'shell':![]});if(_0x17bfaa[_0x5bde30(0x6e)]===0x0)return{'ok':!![],'status':0x0};let _0x1f9a3b='exit\x20'+(_0x17bfaa[_0x5bde30(0x6e)]??_0x5bde30(0x73));if(_0x2c3ab4===_0x5bde30(0x75)){const _0x414cb0=_0x17bfaa[_0x5bde30(0x81)]?_0x17bfaa[_0x5bde30(0x81)][_0x5bde30(0x76)]()['trim']():'',_0x266aaa=_0x17bfaa[_0x5bde30(0x84)]?_0x17bfaa['stdout'][_0x5bde30(0x76)]()[_0x5bde30(0x82)]():'';if(_0x414cb0)_0x1f9a3b=_0x414cb0;else{if(_0x266aaa)_0x1f9a3b=_0x266aaa;}}return{'ok':![],'status':_0x17bfaa[_0x5bde30(0x6e)]??null,'error':_0x1f9a3b};}
1
+ const a95_0xc9f912=a95_0x4029;(function(_0x5e5cae,_0x131799){const _0x4a29c4=a95_0x4029,_0x33008b=_0x5e5cae();while(!![]){try{const _0x10c498=parseInt(_0x4a29c4(0x16d))/0x1+parseInt(_0x4a29c4(0x168))/0x2+parseInt(_0x4a29c4(0x166))/0x3+-parseInt(_0x4a29c4(0x174))/0x4+-parseInt(_0x4a29c4(0x165))/0x5+parseInt(_0x4a29c4(0x16c))/0x6*(parseInt(_0x4a29c4(0x177))/0x7)+-parseInt(_0x4a29c4(0x170))/0x8;if(_0x10c498===_0x131799)break;else _0x33008b['push'](_0x33008b['shift']());}catch(_0xf10396){_0x33008b['push'](_0x33008b['shift']());}}}(a95_0x1208,0xe2cb8));function a95_0x4029(_0x5ccee2,_0x49b789){_0x5ccee2=_0x5ccee2-0x165;const _0x1208f1=a95_0x1208();let _0x4029f2=_0x1208f1[_0x5ccee2];return _0x4029f2;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0x144e1f}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x144e1f;function a95_0x1208(){const _0x5533c5=['toString','15743280wjNwgY','join','npx','stderr','2498100mhYLUv','add','log','2714817WhPHFC','unknown','4781800QrfntO','4932675EScHxy','skipNpxSkillsEnvSuffix','2855294ZvNseW','trim','status','stdout','6pOnDGA','1018044cwcHGA','skills'];a95_0x1208=function(){return _0x5533c5;};return a95_0x1208();}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0xc9f912(0x167)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x418e01,_0x423c80=LOVRABET_SKILL_SOURCE,_0x368260){const _0x1d0c45=a95_0xc9f912;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x37efa1=_0x368260?.['stdio']??'inherit',_0x1736e1=resolveNpmBin(_0x1d0c45(0x172)),_0x1adb6d=[_0x1d0c45(0x16e),_0x1d0c45(0x175),_0x423c80,'-g','-y'],_0x1194a6=[_0x1736e1,..._0x1adb6d][_0x1d0c45(0x171)]('\x20');console[_0x1d0c45(0x176)]('*\x20'+_0x1194a6);const _0x48cf1a=spawnSync(_0x1736e1,_0x1adb6d,{'cwd':_0x418e01,'stdio':_0x37efa1,'env':process.env,'shell':![]});if(_0x48cf1a[_0x1d0c45(0x16a)]===0x0)return{'ok':!![],'status':0x0};let _0x536f25='exit\x20'+(_0x48cf1a['status']??_0x1d0c45(0x178));if(_0x37efa1==='pipe'){const _0x1f6b28=_0x48cf1a[_0x1d0c45(0x173)]?_0x48cf1a[_0x1d0c45(0x173)]['toString']()[_0x1d0c45(0x169)]():'',_0x63128b=_0x48cf1a[_0x1d0c45(0x16b)]?_0x48cf1a[_0x1d0c45(0x16b)][_0x1d0c45(0x16f)]()['trim']():'';if(_0x1f6b28)_0x536f25=_0x1f6b28;else{if(_0x63128b)_0x536f25=_0x63128b;}}return{'ok':![],'status':_0x48cf1a[_0x1d0c45(0x16a)]??null,'error':_0x536f25};}
@@ -1 +1 @@
1
- const a96_0x76be4e=a96_0x52b1;(function(_0x5abe77,_0x2bc79d){const _0x11b279=a96_0x52b1,_0x7c282=_0x5abe77();while(!![]){try{const _0x213f25=parseInt(_0x11b279(0x1f4))/0x1*(parseInt(_0x11b279(0x1f0))/0x2)+-parseInt(_0x11b279(0x1ef))/0x3+-parseInt(_0x11b279(0x1eb))/0x4+parseInt(_0x11b279(0x1ec))/0x5+parseInt(_0x11b279(0x1f8))/0x6+-parseInt(_0x11b279(0x1f2))/0x7+parseInt(_0x11b279(0x1e9))/0x8*(-parseInt(_0x11b279(0x1e8))/0x9);if(_0x213f25===_0x2bc79d)break;else _0x7c282['push'](_0x7c282['shift']());}catch(_0x4852a2){_0x7c282['push'](_0x7c282['shift']());}}}(a96_0x330b,0xb2b04));function a96_0x330b(){const _0x5b6eb0=['4607972MVNdTe','5893770QOItzw','.next','.hg','3191643UfUyTP','1174oSCkIt','.git','3158757Himfdk','.cache','1714gEfbyT','dist','.turbo','.svn','8298282fPzQec','build','.DS_Store','node_modules','759987JhsmOf','16momFXB','coverage'];a96_0x330b=function(){return _0x5b6eb0;};return a96_0x330b();}export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE='SKILL.md';function a96_0x52b1(_0x4fb10d,_0x9008e3){_0x4fb10d=_0x4fb10d-0x1e8;const _0x330b01=a96_0x330b();let _0x52b1cc=_0x330b01[_0x4fb10d];return _0x52b1cc;}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a96_0x76be4e(0x1fa)]);export const IGNORED_DIR_NAMES=new Set([a96_0x76be4e(0x1f1),a96_0x76be4e(0x1ee),a96_0x76be4e(0x1f7),a96_0x76be4e(0x1fb),a96_0x76be4e(0x1ed),a96_0x76be4e(0x1f5),a96_0x76be4e(0x1f9),a96_0x76be4e(0x1ea),a96_0x76be4e(0x1f6),a96_0x76be4e(0x1f3)]);
1
+ const a96_0x9617ee=a96_0x2c40;(function(_0x2c6471,_0xcdcde){const _0x40f07=a96_0x2c40,_0x22697d=_0x2c6471();while(!![]){try{const _0x5e8be5=parseInt(_0x40f07(0xf8))/0x1*(parseInt(_0x40f07(0xef))/0x2)+parseInt(_0x40f07(0xfc))/0x3+-parseInt(_0x40f07(0xf7))/0x4+parseInt(_0x40f07(0xf3))/0x5+-parseInt(_0x40f07(0xf4))/0x6*(parseInt(_0x40f07(0xf0))/0x7)+parseInt(_0x40f07(0xff))/0x8*(parseInt(_0x40f07(0xf6))/0x9)+-parseInt(_0x40f07(0xfb))/0xa;if(_0x5e8be5===_0xcdcde)break;else _0x22697d['push'](_0x22697d['shift']());}catch(_0x16f697){_0x22697d['push'](_0x22697d['shift']());}}}(a96_0xacb2,0x8e1e7));export const METADATA_FILE=a96_0x9617ee(0x100);export const SKILL_FILE=a96_0x9617ee(0xfa);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a96_0x2c40(_0x151340,_0x32e1e0){_0x151340=_0x151340-0xee;const _0xacb2a=a96_0xacb2();let _0x2c40a0=_0xacb2a[_0x151340];return _0x2c40a0;}export const IGNORED_DIR_NAMES=new Set([a96_0x9617ee(0xfe),a96_0x9617ee(0xf2),a96_0x9617ee(0xf1),a96_0x9617ee(0xf9),a96_0x9617ee(0x101),'dist',a96_0x9617ee(0xf5),'coverage',a96_0x9617ee(0xee),a96_0x9617ee(0xfd)]);function a96_0xacb2(){const _0x168010=['SKILL.md','10879360gPanul','1404024lZFaau','.cache','.git','19040jmocFt','lovrabet.skill.json','.next','.turbo','2HMSzpj','559965ImeOLq','.svn','.hg','1956425RPBCrM','6eruZGZ','build','1089yesjbr','606944FhAOwn','754513jYRoNu','node_modules'];a96_0xacb2=function(){return _0x168010;};return a96_0xacb2();}
@@ -1 +1 @@
1
- (function(_0x587526,_0x2c0de8){const _0x24cbdd=a97_0x4c71,_0x599075=_0x587526();while(!![]){try{const _0x17b902=-parseInt(_0x24cbdd(0x150))/0x1*(parseInt(_0x24cbdd(0x14f))/0x2)+-parseInt(_0x24cbdd(0x15c))/0x3+-parseInt(_0x24cbdd(0x14e))/0x4+-parseInt(_0x24cbdd(0x152))/0x5+-parseInt(_0x24cbdd(0x157))/0x6*(-parseInt(_0x24cbdd(0x158))/0x7)+parseInt(_0x24cbdd(0x151))/0x8+parseInt(_0x24cbdd(0x153))/0x9;if(_0x17b902===_0x2c0de8)break;else _0x599075['push'](_0x599075['shift']());}catch(_0x136245){_0x599075['push'](_0x599075['shift']());}}}(a97_0x2dbd,0xd95c0));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a97_0x2dbd(){const _0x1f09a6=['34760286FpUpmH','isSymbolicLink','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','endsWith','165630FfTYuM','7qaynjY','utf8','validation','Unsafe\x20Skill\x20file\x20path:\x20','4805973vCfIAH','stringify','1552224JiWiez','1658spBjSD','1658ndHNwL','6461408EANYsT','2213510MdKYVn'];a97_0x2dbd=function(){return _0x1f09a6;};return a97_0x2dbd();}function a97_0x4c71(_0x5e38da,_0x3a5732){_0x5e38da=_0x5e38da-0x14d;const _0x2dbd2c=a97_0x2dbd();let _0x4c7156=_0x2dbd2c[_0x5e38da];return _0x4c7156;}import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x5a4943,_0x11ca6a){const _0x37adea=a97_0x4c71,_0x4ac118=normalizeSkillRelativePath(_0x11ca6a),_0x2e1691=realOrResolved(_0x5a4943),_0x1752c7=resolve(_0x2e1691,..._0x4ac118['split']('/'));if(!isPathInside(_0x1752c7,_0x2e1691))throw CliErrors[_0x37adea(0x15a)](_0x37adea(0x15b)+_0x11ca6a);return ensureNoSymlinkInManagedPath(_0x2e1691,_0x4ac118),_0x1752c7;}export function ensureNoSymlinkInManagedPath(_0xce58af,_0x5caf36){const _0x59d3c4=a97_0x4c71;let _0x261c22=_0xce58af;for(const _0x10bdc5 of _0x5caf36['split']('/')){_0x261c22=resolve(_0x261c22,_0x10bdc5);const _0x3839e6=lstatIfPresent(_0x261c22);if(_0x3839e6?.[_0x59d3c4(0x154)]())throw CliErrors[_0x59d3c4(0x15a)](_0x59d3c4(0x155)+_0x5caf36);}}export function isDanglingSymlink(_0x4e8323){const _0x2e89b2=a97_0x4c71;try{return lstatSync(_0x4e8323)[_0x2e89b2(0x154)]();}catch{return![];}}export function resolveSymlinkTarget(_0x3bcfcf){const _0x5083bd=readlinkSync(_0x3bcfcf);return isAbsolute(_0x5083bd)?_0x5083bd:resolve(dirname(_0x3bcfcf),_0x5083bd);}export function isPathInside(_0x4996c7,_0x45b140){const _0x45ac48=a97_0x4c71,_0x12b3c3=_0x4996c7[_0x45ac48(0x156)](sep)?_0x4996c7:''+_0x4996c7+sep,_0x43a9aa=_0x45b140[_0x45ac48(0x156)](sep)?_0x45b140:''+_0x45b140+sep;return _0x4996c7===_0x45b140||_0x12b3c3['startsWith'](_0x43a9aa);}export function realOrResolved(_0x1545a6){try{return realpathSync(_0x1545a6);}catch{return resolve(_0x1545a6);}}export function lstatIfPresent(_0x55ee5e){try{return lstatSync(_0x55ee5e);}catch{return undefined;}}export function writeTextAtomic(_0x5e7271,_0x1e15a4,_0x469e6a){const _0x16324e=a97_0x4c71;writeBytesAtomic(_0x5e7271,Buffer['from'](_0x1e15a4,_0x16324e(0x159)),_0x469e6a);}export function writeBytesAtomic(_0x119a71,_0x1509ab,_0x550818){const _0xe2cd7=_0x119a71+'.tmp';try{writeFileSync(_0xe2cd7,_0x1509ab,{'mode':_0x550818}),renameSync(_0xe2cd7,_0x119a71);}catch(_0x3a9689){try{rmSync(_0xe2cd7,{'force':!![]});}catch{}throw _0x3a9689;}}export function writeJsonAtomic(_0x20d74d,_0x22e7d9){const _0x1e61f2=a97_0x4c71;writeTextAtomic(_0x20d74d,JSON[_0x1e61f2(0x14d)](_0x22e7d9,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x24c08d,_0x1c5a3b){const _0x47c838=a97_0x4e74,_0x50a24a=_0x24c08d();while(!![]){try{const _0x25ec01=-parseInt(_0x47c838(0x167))/0x1+parseInt(_0x47c838(0x169))/0x2+parseInt(_0x47c838(0x170))/0x3*(parseInt(_0x47c838(0x166))/0x4)+-parseInt(_0x47c838(0x168))/0x5+-parseInt(_0x47c838(0x16c))/0x6+parseInt(_0x47c838(0x15f))/0x7*(-parseInt(_0x47c838(0x165))/0x8)+-parseInt(_0x47c838(0x161))/0x9*(-parseInt(_0x47c838(0x16f))/0xa);if(_0x25ec01===_0x1c5a3b)break;else _0x50a24a['push'](_0x50a24a['shift']());}catch(_0x35b0f3){_0x50a24a['push'](_0x50a24a['shift']());}}}(a97_0x2f90,0x80dc5));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';function a97_0x4e74(_0x829ec8,_0x5111b1){_0x829ec8=_0x829ec8-0x15f;const _0x2f90ce=a97_0x2f90();let _0x4e74f0=_0x2f90ce[_0x829ec8];return _0x4e74f0;}import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x56acbd,_0x1ce543){const _0x201bee=a97_0x4e74,_0x42c182=normalizeSkillRelativePath(_0x1ce543),_0x3e1db1=realOrResolved(_0x56acbd),_0x27fa8d=resolve(_0x3e1db1,..._0x42c182[_0x201bee(0x16b)]('/'));if(!isPathInside(_0x27fa8d,_0x3e1db1))throw CliErrors[_0x201bee(0x16a)](_0x201bee(0x160)+_0x1ce543);return ensureNoSymlinkInManagedPath(_0x3e1db1,_0x42c182),_0x27fa8d;}function a97_0x2f90(){const _0x557bbc=['8ToqDdD','1975172Cawasb','100794xaujmC','2326895eXVrtc','1266354HkbAoW','validation','split','4616064CnGDWo','utf8','stringify','17274520fiYqpS','3bkajxM','6937644PzoYPh','Unsafe\x20Skill\x20file\x20path:\x20','9bmSUfQ','endsWith','isSymbolicLink','from'];a97_0x2f90=function(){return _0x557bbc;};return a97_0x2f90();}export function ensureNoSymlinkInManagedPath(_0x49c632,_0x1850b1){const _0x94fc3d=a97_0x4e74;let _0x2a52ce=_0x49c632;for(const _0x16cdea of _0x1850b1['split']('/')){_0x2a52ce=resolve(_0x2a52ce,_0x16cdea);const _0x3b90f4=lstatIfPresent(_0x2a52ce);if(_0x3b90f4?.[_0x94fc3d(0x163)]())throw CliErrors[_0x94fc3d(0x16a)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x1850b1);}}export function isDanglingSymlink(_0x9cb5e){const _0x1248f1=a97_0x4e74;try{return lstatSync(_0x9cb5e)[_0x1248f1(0x163)]();}catch{return![];}}export function resolveSymlinkTarget(_0xbe0ce3){const _0x708e21=readlinkSync(_0xbe0ce3);return isAbsolute(_0x708e21)?_0x708e21:resolve(dirname(_0xbe0ce3),_0x708e21);}export function isPathInside(_0x4c86e2,_0x2ed8e1){const _0x396259=a97_0x4e74,_0x5511b9=_0x4c86e2[_0x396259(0x162)](sep)?_0x4c86e2:''+_0x4c86e2+sep,_0x43615f=_0x2ed8e1[_0x396259(0x162)](sep)?_0x2ed8e1:''+_0x2ed8e1+sep;return _0x4c86e2===_0x2ed8e1||_0x5511b9['startsWith'](_0x43615f);}export function realOrResolved(_0x5c25ad){try{return realpathSync(_0x5c25ad);}catch{return resolve(_0x5c25ad);}}export function lstatIfPresent(_0x441381){try{return lstatSync(_0x441381);}catch{return undefined;}}export function writeTextAtomic(_0x4c2e70,_0x38fe7b,_0x12133c){const _0x34f1cb=a97_0x4e74;writeBytesAtomic(_0x4c2e70,Buffer[_0x34f1cb(0x164)](_0x38fe7b,_0x34f1cb(0x16d)),_0x12133c);}export function writeBytesAtomic(_0x3bfd84,_0x21e4e0,_0x2a9b80){const _0x3654b2=_0x3bfd84+'.tmp';try{writeFileSync(_0x3654b2,_0x21e4e0,{'mode':_0x2a9b80}),renameSync(_0x3654b2,_0x3bfd84);}catch(_0x1ebe40){try{rmSync(_0x3654b2,{'force':!![]});}catch{}throw _0x1ebe40;}}export function writeJsonAtomic(_0x340dea,_0xd0e913){const _0x190ca9=a97_0x4e74;writeTextAtomic(_0x340dea,JSON[_0x190ca9(0x16e)](_0xd0e913,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x2dce09,_0x5d546e){const _0x19447e=a98_0x3328,_0x45f9da=_0x2dce09();while(!![]){try{const _0x3eb812=parseInt(_0x19447e(0x1ae))/0x1+-parseInt(_0x19447e(0x1b1))/0x2*(parseInt(_0x19447e(0x1ba))/0x3)+-parseInt(_0x19447e(0x1ac))/0x4*(parseInt(_0x19447e(0x1b3))/0x5)+-parseInt(_0x19447e(0x1b5))/0x6*(parseInt(_0x19447e(0x1b0))/0x7)+-parseInt(_0x19447e(0x1af))/0x8+-parseInt(_0x19447e(0x1bb))/0x9*(-parseInt(_0x19447e(0x1b4))/0xa)+parseInt(_0x19447e(0x1ad))/0xb;if(_0x3eb812===_0x5d546e)break;else _0x45f9da['push'](_0x45f9da['shift']());}catch(_0x2ceab7){_0x45f9da['push'](_0x45f9da['shift']());}}}(a98_0x148a,0xc4281));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2b1dfd){const _0x1fa223=a98_0x3328;return createHash(_0x1fa223(0x1b8))['update'](_0x2b1dfd)['digest'](_0x1fa223(0x1b6));}function a98_0x148a(){const _0x12ac32=['27ZNiRhe','106468YmVspE','12039203YICTGU','786039mHqAYa','4880296TVOWhZ','7FXBUsH','4dUouOG','path','145nBDxxF','3814010iCUODz','274764xCJAlB','hex','update','sha256','digest','1190301TbbZEm'];a98_0x148a=function(){return _0x12ac32;};return a98_0x148a();}function a98_0x3328(_0x2b3602,_0x4d4a6e){_0x2b3602=_0x2b3602-0x1ac;const _0x148a9e=a98_0x148a();let _0x3328da=_0x148a9e[_0x2b3602];return _0x3328da;}export function fileHash(_0x59bd48){return bufferSha256(fileContent(_0x59bd48));}export function bufferSha256(_0x520ff2){const _0x13480e=a98_0x3328;return createHash(_0x13480e(0x1b8))['update'](_0x520ff2)[_0x13480e(0x1b9)]('hex');}export function fileTreeHash(_0x23da54){const _0x3e6f0a=a98_0x3328,_0x38f21e=createHash(_0x3e6f0a(0x1b8));for(const _0x3c97cf of normalizeManifestFiles(_0x23da54)){_0x38f21e[_0x3e6f0a(0x1b7)](_0x3c97cf[_0x3e6f0a(0x1b2)]),_0x38f21e[_0x3e6f0a(0x1b7)]('\x00'),_0x38f21e[_0x3e6f0a(0x1b7)](_0x3c97cf['sha256']),_0x38f21e[_0x3e6f0a(0x1b7)]('\x00'),_0x38f21e[_0x3e6f0a(0x1b7)](String(_0x3c97cf['size'])),_0x38f21e['update']('\x00');}return _0x38f21e['digest']('hex');}
1
+ (function(_0x1f45cb,_0xff1af1){const _0x3d9df0=a98_0x4a23,_0x5bd24e=_0x1f45cb();while(!![]){try{const _0x1dd96b=-parseInt(_0x3d9df0(0x1db))/0x1*(parseInt(_0x3d9df0(0x1e7))/0x2)+-parseInt(_0x3d9df0(0x1e0))/0x3*(-parseInt(_0x3d9df0(0x1e3))/0x4)+-parseInt(_0x3d9df0(0x1dd))/0x5+-parseInt(_0x3d9df0(0x1e6))/0x6+-parseInt(_0x3d9df0(0x1de))/0x7+-parseInt(_0x3d9df0(0x1e8))/0x8*(-parseInt(_0x3d9df0(0x1e5))/0x9)+parseInt(_0x3d9df0(0x1dc))/0xa;if(_0x1dd96b===_0xff1af1)break;else _0x5bd24e['push'](_0x5bd24e['shift']());}catch(_0x42b493){_0x5bd24e['push'](_0x5bd24e['shift']());}}}(a98_0x4cbe,0x6f86e));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a98_0x4a23(_0x3f78f6,_0x344f93){_0x3f78f6=_0x3f78f6-0x1d9;const _0x4cbe98=a98_0x4cbe();let _0x4a237e=_0x4cbe98[_0x3f78f6];return _0x4a237e;}function a98_0x4cbe(){const _0x19826a=['108TPPuuv','182256TiwqAU','6590sHajZY','482992fOFCLi','hex','sha256','54BuPgLT','7056650TVRLfv','364895NLapLO','4915477sDIIqD','digest','30471jlUTBO','update','path','4UDxzhC','size'];a98_0x4cbe=function(){return _0x19826a;};return a98_0x4cbe();}export function contentHash(_0xbb8561){const _0x245efa=a98_0x4a23;return createHash(_0x245efa(0x1da))[_0x245efa(0x1e1)](_0xbb8561)[_0x245efa(0x1df)](_0x245efa(0x1d9));}export function fileHash(_0x238d3b){return bufferSha256(fileContent(_0x238d3b));}export function bufferSha256(_0x472e9e){const _0x8cf16b=a98_0x4a23;return createHash(_0x8cf16b(0x1da))[_0x8cf16b(0x1e1)](_0x472e9e)[_0x8cf16b(0x1df)](_0x8cf16b(0x1d9));}export function fileTreeHash(_0x562de0){const _0x4e79fd=a98_0x4a23,_0x444799=createHash('sha256');for(const _0x5384e7 of normalizeManifestFiles(_0x562de0)){_0x444799[_0x4e79fd(0x1e1)](_0x5384e7[_0x4e79fd(0x1e2)]),_0x444799[_0x4e79fd(0x1e1)]('\x00'),_0x444799['update'](_0x5384e7[_0x4e79fd(0x1da)]),_0x444799[_0x4e79fd(0x1e1)]('\x00'),_0x444799[_0x4e79fd(0x1e1)](String(_0x5384e7[_0x4e79fd(0x1e4)])),_0x444799[_0x4e79fd(0x1e1)]('\x00');}return _0x444799[_0x4e79fd(0x1df)](_0x4e79fd(0x1d9));}
@@ -1 +1 @@
1
- (function(_0x34af08,_0x59a818){const _0x209eca=a99_0x1594,_0x266d17=_0x34af08();while(!![]){try{const _0x311dd1=parseInt(_0x209eca(0x10e))/0x1*(-parseInt(_0x209eca(0x104))/0x2)+parseInt(_0x209eca(0x114))/0x3*(-parseInt(_0x209eca(0x10f))/0x4)+parseInt(_0x209eca(0x10b))/0x5+parseInt(_0x209eca(0x100))/0x6*(parseInt(_0x209eca(0xff))/0x7)+-parseInt(_0x209eca(0x105))/0x8+parseInt(_0x209eca(0x11d))/0x9+parseInt(_0x209eca(0xf4))/0xa*(parseInt(_0x209eca(0xf7))/0xb);if(_0x311dd1===_0x59a818)break;else _0x266d17['push'](_0x266d17['shift']());}catch(_0x566cba){_0x266d17['push'](_0x266d17['shift']());}}}(a99_0x529b,0x79f23));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a99_0x191030 from'fs-extra';function a99_0x1594(_0x5ab392,_0x9c9585){_0x5ab392=_0x5ab392-0xf0;const _0x529b4e=a99_0x529b();let _0x1594f0=_0x529b4e[_0x5ab392];return _0x1594f0;}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';function a99_0x529b(){const _0xbddd32=['map','2822535XzDeyR','metadata-mismatch','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skill','dir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','skipped','filter','1973290BlGzBD','isSymbolicLink','removed','55SFDkoo','activeSkillCodes','startsWith','updated','scopes','agentsSkillsDir','slice','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','35WMHIxi','282408bUrTEC','not-managed-symlink','get','builtin','1058UDaVOn','7907840jyrCxr','trim','skillCode','validation','company','name','1214690PtxNZu','appCode','isDirectory','61lOsFaA','284vsfFRN','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','push','created','external-symlink','10914wykdlt','contentHash','values','personal','managedRoot','scope','pruneSkillCodes','has'];a99_0x529b=function(){return _0xbddd32;};return a99_0x529b();}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a99_0x191030;export function linkEffectiveRuntimeSkills(_0x4d0345,_0x4ee94b,_0x9964b2={}){const _0x4fd44b=a99_0x1594,_0x2b8ec7=new Map();for(const _0x3c17a7 of _0x4d0345){const _0x52bd60=_0x3c17a7[_0x4fd44b(0x120)]['skillCode'];if(!_0x52bd60)continue;const _0x2664cc=_0x2b8ec7[_0x4fd44b(0x102)](_0x52bd60);(!_0x2664cc||_0x3c17a7[_0x4fd44b(0x119)]===_0x4fd44b(0x117))&&_0x2b8ec7['set'](_0x52bd60,_0x3c17a7);}const _0x33fab7=[],_0x24fe0e=resolveSkillSyncPaths(_0x9964b2);for(const _0x5bb7ec of _0x2b8ec7[_0x4fd44b(0x116)]()){const _0x34ddfc=requireSkillCode(_0x5bb7ec['skill']),_0x414a68=_0x4ee94b+'--'+_0x34ddfc;for(const _0x36bbed of runtimeAgentSkillRoots(_0x24fe0e)){_0x33fab7[_0x4fd44b(0x111)](ensureManagedSymlink(resolve(_0x36bbed,_0x414a68),_0x5bb7ec[_0x4fd44b(0xf0)],_0x24fe0e[_0x4fd44b(0x118)]));}}return _0x33fab7;}export function pruneStaleRuntimeSkillLinks(_0x306452,_0x354467,_0x2d8acc={},_0x3713f2){const _0xf7bbf3=a99_0x1594,_0x332be8=resolveSkillSyncPaths(_0x2d8acc),_0x594777=new Set([..._0x354467][_0xf7bbf3(0x11c)](_0x589f69=>_0x589f69[_0xf7bbf3(0x106)]())[_0xf7bbf3(0xf3)](Boolean)),_0x12c4c2=_0x3713f2?new Set([..._0x3713f2]['map'](_0x5c7b3b=>_0x5c7b3b[_0xf7bbf3(0x106)]())[_0xf7bbf3(0xf3)](Boolean)):undefined,_0x48c538=[];for(const _0x4397bc of runtimeAgentSkillRoots(_0x332be8)){for(const _0x2794c7 of managedAppSkillLinkPaths(_0x4397bc,_0x306452)){const _0x12945a=basename(_0x2794c7)[_0xf7bbf3(0xfd)]((_0x306452+'--')['length']);if(_0x12c4c2&&!_0x12c4c2[_0xf7bbf3(0x11b)](_0x12945a))continue;if(_0x594777[_0xf7bbf3(0x11b)](_0x12945a))continue;_0x48c538['push'](removeManagedSkillLink(_0x2794c7,_0x332be8[_0xf7bbf3(0x118)]));}}return _0x48c538;}export function pruneStaleRuntimeSkillCache(_0x4aecd5,_0x5818ae={}){const _0x13e313=a99_0x1594,_0x3014f2=new Set([..._0x4aecd5[_0x13e313(0xf8)]][_0x13e313(0x11c)](_0xad0ed6=>_0xad0ed6['trim']())['filter'](Boolean)),_0x52b9ac=_0x4aecd5[_0x13e313(0x11a)]?new Set([..._0x4aecd5[_0x13e313(0x11a)]][_0x13e313(0x11c)](_0x2fe3d9=>_0x2fe3d9[_0x13e313(0x106)]())[_0x13e313(0xf3)](Boolean)):undefined,_0x4f4c9d=_0x4aecd5[_0x13e313(0xfb)]??['personal',_0x13e313(0x109)],_0x142c60=resolve(getRuntimeSkillCacheRoot(_0x4aecd5['env'],_0x4aecd5['accessKey'],_0x5818ae),safePathSegment(_0x4aecd5['appCode'],'appCode')),_0x4f1e7e=[];for(const _0x43ff22 of _0x4f4c9d){const _0xd7e117=resolve(_0x142c60,_0x43ff22);if(!existsSync(_0xd7e117))continue;for(const _0x33f3ea of readdirSync(_0xd7e117,{'withFileTypes':!![]})){if(!_0x33f3ea[_0x13e313(0x10d)]())continue;const _0x2393cc=_0x33f3ea[_0x13e313(0x10a)];if(_0x52b9ac&&!_0x52b9ac[_0x13e313(0x11b)](_0x2393cc))continue;if(_0x3014f2['has'](_0x2393cc))continue;const _0x8448c8=resolve(_0xd7e117,_0x2393cc),_0x360063=readMetadataIfPresent(resolve(_0x8448c8,METADATA_FILE));if(_0x360063?.[_0x13e313(0x10c)]!==_0x4aecd5[_0x13e313(0x10c)]||_0x360063[_0x13e313(0x119)]!==_0x43ff22||_0x360063[_0x13e313(0x107)]!==_0x2393cc){_0x4f1e7e[_0x13e313(0x111)]({'path':_0x8448c8,'action':_0x13e313(0xf2),'reason':_0x13e313(0x11e)});continue;}removeSync(_0x8448c8),_0x4f1e7e[_0x13e313(0x111)]({'path':_0x8448c8,'action':_0x13e313(0xf6)});}}return _0x4f1e7e;}export function linkGlobalRuntimeSkills(_0x3dbd29,_0x532310={}){const _0x48ec09=a99_0x1594,_0x104339=resolveSkillSyncPaths(_0x532310),_0x2017a3=[];for(const _0x3d4ad5 of _0x3dbd29){if(_0x3d4ad5[_0x48ec09(0x119)]!==_0x48ec09(0x103))throw CliErrors[_0x48ec09(0x108)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x3d4ad5['scope']);const _0x3fd825=requireSkillCode(_0x3d4ad5[_0x48ec09(0x120)]),_0x280261=copyManagedSkillDirectory(_0x3d4ad5[_0x48ec09(0xf0)],resolve(_0x104339[_0x48ec09(0xfc)],_0x3fd825));_0x2017a3[_0x48ec09(0x111)]({..._0x280261,'contentHash':_0x3d4ad5[_0x48ec09(0x115)]});}return _0x2017a3;}function ensureManagedSymlink(_0x2ad6a2,_0x450277,_0x199fd8){const _0x37c00=a99_0x1594;mkdirSync(dirname(_0x2ad6a2),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2ad6a2)||isDanglingSymlink(_0x2ad6a2)){const _0x24218a=lstatSync(_0x2ad6a2);if(!_0x24218a['isSymbolicLink']())throw CliErrors[_0x37c00(0x108)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x2ad6a2);const _0x50b44e=resolveSymlinkTarget(_0x2ad6a2);if(!isPathInside(realOrResolved(_0x50b44e),realOrResolved(_0x199fd8)))throw CliErrors[_0x37c00(0x108)](_0x37c00(0x11f)+_0x2ad6a2);if(realOrResolved(_0x50b44e)===realOrResolved(_0x450277))return{'path':_0x2ad6a2,'target':_0x450277,'action':'unchanged'};return unlinkSync(_0x2ad6a2),symlinkSync(_0x450277,_0x2ad6a2,_0x37c00(0xf0)),{'path':_0x2ad6a2,'target':_0x450277,'action':'updated'};}return symlinkSync(_0x450277,_0x2ad6a2,_0x37c00(0xf0)),{'path':_0x2ad6a2,'target':_0x450277,'action':_0x37c00(0x112)};}function managedAppSkillLinkPaths(_0x3e26ae,_0xf4aea){const _0x1bb800=a99_0x1594;if(!existsSync(_0x3e26ae))return[];const _0x49db0e=_0xf4aea+'--';return readdirSync(_0x3e26ae,{'withFileTypes':!![]})[_0x1bb800(0xf3)](_0x2951c0=>_0x2951c0[_0x1bb800(0x10a)][_0x1bb800(0xf9)](_0x49db0e))[_0x1bb800(0x11c)](_0x351d43=>resolve(_0x3e26ae,_0x351d43[_0x1bb800(0x10a)]));}function removeManagedSkillLink(_0x4340eb,_0x186563){const _0x1a570d=a99_0x1594,_0x4dc680=lstatIfPresent(_0x4340eb);if(!_0x4dc680?.[_0x1a570d(0xf5)]())return{'path':_0x4340eb,'action':_0x1a570d(0xf2),'reason':_0x1a570d(0x101)};const _0x5e4142=resolveSymlinkTarget(_0x4340eb);if(!isPathInside(realOrResolved(_0x5e4142),realOrResolved(_0x186563)))return{'path':_0x4340eb,'action':_0x1a570d(0xf2),'reason':_0x1a570d(0x113)};return unlinkSync(_0x4340eb),{'path':_0x4340eb,'action':'removed'};}export function copyManagedSkillDirectory(_0x225d64,_0x373ffd){const _0x372dd0=a99_0x1594,_0x3d2bcf=resolve(_0x373ffd,METADATA_FILE),_0x408ed1=existsSync(_0x373ffd);if(_0x408ed1){const _0x1ea1eb=lstatSync(_0x373ffd);if(_0x1ea1eb[_0x372dd0(0xf5)]())throw CliErrors[_0x372dd0(0x108)](_0x372dd0(0xf1)+_0x373ffd);if(!_0x1ea1eb[_0x372dd0(0x10d)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x373ffd);const _0x38fa57=readMetadataIfPresent(_0x3d2bcf);if(_0x38fa57?.[_0x372dd0(0x119)]!==_0x372dd0(0x103))throw CliErrors['validation'](_0x372dd0(0xfe)+_0x373ffd);}ensureDirSync(dirname(_0x373ffd));const _0x4e1e2c=_0x408ed1?readMetadataIfPresent(_0x3d2bcf)?.[_0x372dd0(0x115)]:undefined,_0x5961af=readMetadataIfPresent(resolve(_0x225d64,METADATA_FILE))?.[_0x372dd0(0x115)];return _0x408ed1&&removeSync(_0x373ffd),copySkillDirectory(_0x225d64,_0x373ffd),{'path':_0x373ffd,'target':_0x225d64,'action':!_0x408ed1?_0x372dd0(0x112):_0x4e1e2c===_0x5961af?'unchanged':_0x372dd0(0xfa)};}function copySkillDirectory(_0x392292,_0x80c2d7){copySync(_0x392292,_0x80c2d7,{'dereference':![],'overwrite':!![],'filter'(_0x111e3d){const _0x413e1c=a99_0x1594;if(lstatSync(_0x111e3d)[_0x413e1c(0xf5)]())throw CliErrors[_0x413e1c(0x108)](_0x413e1c(0x110)+_0x111e3d);return!![];}});}
1
+ (function(_0x8dcbc9,_0x7d7205){const _0x3167e0=a99_0x5aed,_0x3c71fc=_0x8dcbc9();while(!![]){try{const _0x123009=-parseInt(_0x3167e0(0x200))/0x1*(-parseInt(_0x3167e0(0x1e7))/0x2)+-parseInt(_0x3167e0(0x20a))/0x3*(parseInt(_0x3167e0(0x20b))/0x4)+parseInt(_0x3167e0(0x1ea))/0x5*(-parseInt(_0x3167e0(0x201))/0x6)+parseInt(_0x3167e0(0x210))/0x7+-parseInt(_0x3167e0(0x1fd))/0x8*(parseInt(_0x3167e0(0x1f9))/0x9)+-parseInt(_0x3167e0(0x1fe))/0xa+parseInt(_0x3167e0(0x1e6))/0xb;if(_0x123009===_0x7d7205)break;else _0x3c71fc['push'](_0x3c71fc['shift']());}catch(_0x28e12f){_0x3c71fc['push'](_0x3c71fc['shift']());}}}(a99_0xe1df,0x35b6f));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a99_0x92b80e from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a99_0x92b80e;export function linkEffectiveRuntimeSkills(_0x340984,_0x1697a8,_0x4c2a63={}){const _0x3efe26=a99_0x5aed,_0x465d9e=new Map();for(const _0x46a49f of _0x340984){const _0x4ac623=_0x46a49f['skill'][_0x3efe26(0x1eb)];if(!_0x4ac623)continue;const _0x49f3e7=_0x465d9e[_0x3efe26(0x206)](_0x4ac623);(!_0x49f3e7||_0x46a49f['scope']==='personal')&&_0x465d9e[_0x3efe26(0x205)](_0x4ac623,_0x46a49f);}const _0x3e43e4=[],_0x23a489=resolveSkillSyncPaths(_0x4c2a63);for(const _0x5b27f9 of _0x465d9e[_0x3efe26(0x1f4)]()){const _0x46f66d=requireSkillCode(_0x5b27f9[_0x3efe26(0x1ff)]),_0x207419=_0x1697a8+'--'+_0x46f66d;for(const _0x402773 of runtimeAgentSkillRoots(_0x23a489)){_0x3e43e4[_0x3efe26(0x215)](ensureManagedSymlink(resolve(_0x402773,_0x207419),_0x5b27f9[_0x3efe26(0x213)],_0x23a489[_0x3efe26(0x1f2)]));}}return _0x3e43e4;}export function pruneStaleRuntimeSkillLinks(_0x716b06,_0x5d9191,_0x594436={},_0x2485af){const _0x3dd7ca=a99_0x5aed,_0x27579b=resolveSkillSyncPaths(_0x594436),_0x1d665b=new Set([..._0x5d9191][_0x3dd7ca(0x1f8)](_0x254928=>_0x254928[_0x3dd7ca(0x214)]())[_0x3dd7ca(0x212)](Boolean)),_0x1c50f0=_0x2485af?new Set([..._0x2485af][_0x3dd7ca(0x1f8)](_0x418261=>_0x418261[_0x3dd7ca(0x214)]())[_0x3dd7ca(0x212)](Boolean)):undefined,_0x34dc29=[];for(const _0x56046c of runtimeAgentSkillRoots(_0x27579b)){for(const _0x28d78e of managedAppSkillLinkPaths(_0x56046c,_0x716b06)){const _0x41ad3a=basename(_0x28d78e)[_0x3dd7ca(0x1f7)]((_0x716b06+'--')[_0x3dd7ca(0x20f)]);if(_0x1c50f0&&!_0x1c50f0[_0x3dd7ca(0x1e9)](_0x41ad3a))continue;if(_0x1d665b[_0x3dd7ca(0x1e9)](_0x41ad3a))continue;_0x34dc29['push'](removeManagedSkillLink(_0x28d78e,_0x27579b[_0x3dd7ca(0x1f2)]));}}return _0x34dc29;}export function pruneStaleRuntimeSkillCache(_0x15405a,_0x462992={}){const _0x3c93f0=a99_0x5aed,_0x5512d0=new Set([..._0x15405a[_0x3c93f0(0x209)]][_0x3c93f0(0x1f8)](_0x59fda6=>_0x59fda6[_0x3c93f0(0x214)]())[_0x3c93f0(0x212)](Boolean)),_0x22845f=_0x15405a[_0x3c93f0(0x1fa)]?new Set([..._0x15405a[_0x3c93f0(0x1fa)]][_0x3c93f0(0x1f8)](_0x579f4b=>_0x579f4b[_0x3c93f0(0x214)]())[_0x3c93f0(0x212)](Boolean)):undefined,_0x4fdb20=_0x15405a[_0x3c93f0(0x1fc)]??[_0x3c93f0(0x1e5),_0x3c93f0(0x1ef)],_0x166af6=resolve(getRuntimeSkillCacheRoot(_0x15405a[_0x3c93f0(0x204)],_0x15405a[_0x3c93f0(0x20d)],_0x462992),safePathSegment(_0x15405a[_0x3c93f0(0x1f1)],_0x3c93f0(0x1f1))),_0x5a426f=[];for(const _0x6394c7 of _0x4fdb20){const _0xfa6d36=resolve(_0x166af6,_0x6394c7);if(!existsSync(_0xfa6d36))continue;for(const _0x4c6900 of readdirSync(_0xfa6d36,{'withFileTypes':!![]})){if(!_0x4c6900[_0x3c93f0(0x1ee)]())continue;const _0x721ce5=_0x4c6900[_0x3c93f0(0x1e4)];if(_0x22845f&&!_0x22845f[_0x3c93f0(0x1e9)](_0x721ce5))continue;if(_0x5512d0['has'](_0x721ce5))continue;const _0x2d286c=resolve(_0xfa6d36,_0x721ce5),_0x46e075=readMetadataIfPresent(resolve(_0x2d286c,METADATA_FILE));if(_0x46e075?.['appCode']!==_0x15405a[_0x3c93f0(0x1f1)]||_0x46e075[_0x3c93f0(0x20e)]!==_0x6394c7||_0x46e075['skillCode']!==_0x721ce5){_0x5a426f[_0x3c93f0(0x215)]({'path':_0x2d286c,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x2d286c),_0x5a426f['push']({'path':_0x2d286c,'action':_0x3c93f0(0x207)});}}return _0x5a426f;}export function linkGlobalRuntimeSkills(_0x14126d,_0xe390a7={}){const _0x6754d7=a99_0x5aed,_0x5d3aef=resolveSkillSyncPaths(_0xe390a7),_0x32fcff=[];for(const _0x1c85ee of _0x14126d){if(_0x1c85ee['scope']!==_0x6754d7(0x211))throw CliErrors[_0x6754d7(0x1fb)](_0x6754d7(0x1ed)+_0x1c85ee[_0x6754d7(0x20e)]);const _0x1463d1=requireSkillCode(_0x1c85ee['skill']),_0x20357e=copyManagedSkillDirectory(_0x1c85ee[_0x6754d7(0x213)],resolve(_0x5d3aef['agentsSkillsDir'],_0x1463d1));_0x32fcff[_0x6754d7(0x215)]({..._0x20357e,'contentHash':_0x1c85ee[_0x6754d7(0x1f5)]});}return _0x32fcff;}function ensureManagedSymlink(_0x11057a,_0x4acb38,_0x607098){const _0x3bffd0=a99_0x5aed;mkdirSync(dirname(_0x11057a),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x11057a)||isDanglingSymlink(_0x11057a)){const _0x5a0866=lstatSync(_0x11057a);if(!_0x5a0866[_0x3bffd0(0x1e3)]())throw CliErrors[_0x3bffd0(0x1fb)](_0x3bffd0(0x1f3)+_0x11057a);const _0x168112=resolveSymlinkTarget(_0x11057a);if(!isPathInside(realOrResolved(_0x168112),realOrResolved(_0x607098)))throw CliErrors[_0x3bffd0(0x1fb)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x11057a);if(realOrResolved(_0x168112)===realOrResolved(_0x4acb38))return{'path':_0x11057a,'target':_0x4acb38,'action':_0x3bffd0(0x208)};return unlinkSync(_0x11057a),symlinkSync(_0x4acb38,_0x11057a,'dir'),{'path':_0x11057a,'target':_0x4acb38,'action':_0x3bffd0(0x203)};}return symlinkSync(_0x4acb38,_0x11057a,_0x3bffd0(0x213)),{'path':_0x11057a,'target':_0x4acb38,'action':_0x3bffd0(0x216)};}function managedAppSkillLinkPaths(_0x4072fc,_0x54a35a){const _0x4f2fc2=a99_0x5aed;if(!existsSync(_0x4072fc))return[];const _0x481a12=_0x54a35a+'--';return readdirSync(_0x4072fc,{'withFileTypes':!![]})[_0x4f2fc2(0x212)](_0x4dae39=>_0x4dae39[_0x4f2fc2(0x1e4)]['startsWith'](_0x481a12))['map'](_0x124d75=>resolve(_0x4072fc,_0x124d75['name']));}function removeManagedSkillLink(_0x532451,_0xbfb047){const _0x43f154=a99_0x5aed,_0x31d8f1=lstatIfPresent(_0x532451);if(!_0x31d8f1?.['isSymbolicLink']())return{'path':_0x532451,'action':_0x43f154(0x1f0),'reason':_0x43f154(0x1ec)};const _0x404ed7=resolveSymlinkTarget(_0x532451);if(!isPathInside(realOrResolved(_0x404ed7),realOrResolved(_0xbfb047)))return{'path':_0x532451,'action':_0x43f154(0x1f0),'reason':'external-symlink'};return unlinkSync(_0x532451),{'path':_0x532451,'action':_0x43f154(0x207)};}function a99_0x5aed(_0x3a4f1e,_0x26c83e){_0x3a4f1e=_0x3a4f1e-0x1e3;const _0xe1dfe7=a99_0xe1df();let _0x5aed62=_0xe1dfe7[_0x3a4f1e];return _0x5aed62;}export function copyManagedSkillDirectory(_0x2d543d,_0x40d74b){const _0x39cfcf=a99_0x5aed,_0x4818df=resolve(_0x40d74b,METADATA_FILE),_0x5ce1fa=existsSync(_0x40d74b);if(_0x5ce1fa){const _0x364670=lstatSync(_0x40d74b);if(_0x364670[_0x39cfcf(0x1e3)]())throw CliErrors[_0x39cfcf(0x1fb)](_0x39cfcf(0x1f6)+_0x40d74b);if(!_0x364670[_0x39cfcf(0x1ee)]())throw CliErrors[_0x39cfcf(0x1fb)](_0x39cfcf(0x1e8)+_0x40d74b);const _0x4a2db9=readMetadataIfPresent(_0x4818df);if(_0x4a2db9?.[_0x39cfcf(0x20e)]!==_0x39cfcf(0x211))throw CliErrors[_0x39cfcf(0x1fb)](_0x39cfcf(0x20c)+_0x40d74b);}ensureDirSync(dirname(_0x40d74b));const _0x127114=_0x5ce1fa?readMetadataIfPresent(_0x4818df)?.[_0x39cfcf(0x1f5)]:undefined,_0x4e37c8=readMetadataIfPresent(resolve(_0x2d543d,METADATA_FILE))?.['contentHash'];return _0x5ce1fa&&removeSync(_0x40d74b),copySkillDirectory(_0x2d543d,_0x40d74b),{'path':_0x40d74b,'target':_0x2d543d,'action':!_0x5ce1fa?_0x39cfcf(0x216):_0x127114===_0x4e37c8?_0x39cfcf(0x208):_0x39cfcf(0x203)};}function copySkillDirectory(_0x5465f0,_0x18c475){copySync(_0x5465f0,_0x18c475,{'dereference':![],'overwrite':!![],'filter'(_0x3d375e){const _0x5a9c5d=a99_0x5aed;if(lstatSync(_0x3d375e)[_0x5a9c5d(0x1e3)]())throw CliErrors[_0x5a9c5d(0x1fb)](_0x5a9c5d(0x202)+_0x3d375e);return!![];}});}function a99_0xe1df(){const _0x5e27ea=['name','personal','7670839nGCHCV','210974rptGNn','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','has','15HUdvcC','skillCode','not-managed-symlink','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isDirectory','company','skipped','appCode','managedRoot','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','values','contentHash','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','slice','map','142578gPIMdY','pruneSkillCodes','validation','scopes','64JFvKip','2869920EstIOA','skill','1awhPNM','330198ICZktz','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','updated','env','set','get','removed','unchanged','activeSkillCodes','1302xFftXf','3244QwrarP','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','accessKey','scope','length','2435860fajaUC','builtin','filter','dir','trim','push','created','isSymbolicLink'];a99_0xe1df=function(){return _0x5e27ea;};return a99_0xe1df();}
@@ -1 +1 @@
1
- (function(_0x445571,_0x5e502e){const _0x508512=a100_0x1466,_0x3d1222=_0x445571();while(!![]){try{const _0x114c00=parseInt(_0x508512(0x1e4))/0x1+parseInt(_0x508512(0x1e3))/0x2*(-parseInt(_0x508512(0x1eb))/0x3)+-parseInt(_0x508512(0x1fb))/0x4*(-parseInt(_0x508512(0x1ec))/0x5)+-parseInt(_0x508512(0x1f9))/0x6*(-parseInt(_0x508512(0x1d9))/0x7)+-parseInt(_0x508512(0x1f2))/0x8+-parseInt(_0x508512(0x1f7))/0x9*(parseInt(_0x508512(0x1df))/0xa)+parseInt(_0x508512(0x1e9))/0xb;if(_0x114c00===_0x5e502e)break;else _0x3d1222['push'](_0x3d1222['shift']());}catch(_0x232203){_0x3d1222['push'](_0x3d1222['shift']());}}}(a100_0x532c,0x54960));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a100_0x532c(){const _0xa55082=['5251472XIihav','linkedPath','has','local','startsWith','1915092cUfwJf','map','460524kGXoOW','get','8644fwNzaK','linkedPaths','localeCompare','push','7oKgqHI','values','code','appCode','name','cacheDir','30rpHWet','scopes','dir','env','570070wAwQhF','1670ijLOtq','tags','builtin','link','skillMdPath','18921727QhRjND','accessKey','6XGDTXW','955nRBoSV','skillCode','source','cache','filter','scope'];a100_0x532c=function(){return _0xa55082;};return a100_0x532c();}export function listLocalRuntimeSkills(_0x6647da,_0x12e711={}){const _0x405b61=a100_0x1466,_0x2ef217=safePathSegment(_0x6647da['appCode'],_0x405b61(0x1dc)),_0x5b5dc3=normalizeRuntimeSkillScopes(_0x6647da[_0x405b61(0x1e0)]),_0x310946=new Set(_0x5b5dc3),_0x3da721=_0x6647da[_0x405b61(0x1db)]?.['trim'](),_0x14ee07=new Map(),_0x1dcbfd=resolve(getRuntimeSkillCacheRoot(_0x6647da[_0x405b61(0x1e2)],_0x6647da[_0x405b61(0x1ea)],_0x12e711),_0x2ef217);for(const _0x4d4c08 of _0x5b5dc3){for(const _0x2825c8 of localSkillEntryDirs(resolve(_0x1dcbfd,_0x4d4c08))){collectLocalRuntimeSkill(_0x14ee07,_0x2825c8,{'appCode':_0x2ef217,'scopes':_0x310946,'code':_0x3da721,'source':_0x405b61(0x1ef)});}}const _0x482d86=resolveSkillSyncPaths(_0x12e711);for(const _0x3d29ed of runtimeAgentSkillRoots(_0x482d86)){for(const _0x1a1076 of localSkillLinkCandidates(_0x3d29ed,_0x2ef217,_0x310946)){collectLocalRuntimeSkill(_0x14ee07,_0x1a1076,{'appCode':_0x2ef217,'scopes':_0x310946,'code':_0x3da721,'source':_0x405b61(0x1e7),'linkedPath':_0x1a1076});}}return Array['from'](_0x14ee07[_0x405b61(0x1da)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x1013ae){const _0x328d06=a100_0x1466;if(!existsSync(_0x1013ae))return[];return readdirSync(_0x1013ae,{'withFileTypes':!![]})[_0x328d06(0x1f0)](_0x14e14a=>_0x14e14a['isDirectory']()||_0x14e14a['isSymbolicLink']())['map'](_0x46dc07=>resolve(_0x1013ae,_0x46dc07['name']));}function localSkillLinkCandidates(_0x2e4fb1,_0x256c95,_0x3491a6){const _0x318849=a100_0x1466;if(!existsSync(_0x2e4fb1))return[];const _0x4884c6=_0x256c95+'--';return readdirSync(_0x2e4fb1,{'withFileTypes':!![]})['filter'](_0x2d71db=>_0x2d71db['isDirectory']()||_0x2d71db['isSymbolicLink']())['filter'](_0x3fe53f=>_0x3fe53f[_0x318849(0x1dd)][_0x318849(0x1f6)](_0x4884c6)||_0x3491a6[_0x318849(0x1f4)](_0x318849(0x1e6)))[_0x318849(0x1f8)](_0x3f93c2=>resolve(_0x2e4fb1,_0x3f93c2[_0x318849(0x1dd)]));}function a100_0x1466(_0x2938b1,_0x1e2f3b){_0x2938b1=_0x2938b1-0x1d6;const _0x532ccd=a100_0x532c();let _0x146633=_0x532ccd[_0x2938b1];return _0x146633;}function collectLocalRuntimeSkill(_0xcaefe9,_0x34215e,_0x5f0afa){const _0x292ac8=a100_0x1466,_0x24bead=resolve(_0x34215e,METADATA_FILE),_0x8703e5=readMetadataIfPresent(_0x24bead);if(!_0x8703e5)return;if(_0x8703e5[_0x292ac8(0x1dc)]!==_0x5f0afa[_0x292ac8(0x1dc)])return;if(!isRuntimeSkillScope(_0x8703e5[_0x292ac8(0x1f1)])||!_0x5f0afa['scopes'][_0x292ac8(0x1f4)](_0x8703e5[_0x292ac8(0x1f1)]))return;const _0x538c6a=_0x8703e5[_0x292ac8(0x1ed)]?.['trim']();if(!_0x538c6a)return;if(_0x5f0afa[_0x292ac8(0x1db)]&&_0x538c6a!==_0x5f0afa[_0x292ac8(0x1db)])return;const _0x313378=_0x8703e5[_0x292ac8(0x1f1)]+':'+_0x538c6a,_0x5dac4d=_0x5f0afa[_0x292ac8(0x1f3)]?[_0x5f0afa['linkedPath']]:[],_0x95caf7=_0xcaefe9[_0x292ac8(0x1fa)](_0x313378);if(_0x95caf7){_0x5f0afa[_0x292ac8(0x1ee)]==='cache'&&(_0x95caf7[_0x292ac8(0x1e1)]=_0x34215e,_0x95caf7[_0x292ac8(0x1de)]=_0x34215e,_0x95caf7[_0x292ac8(0x1e8)]=resolve(_0x34215e,SKILL_FILE),_0x95caf7['metadataPath']=_0x24bead);for(const _0x2908bb of _0x5dac4d){!_0x95caf7[_0x292ac8(0x1d6)]['includes'](_0x2908bb)&&_0x95caf7[_0x292ac8(0x1d6)][_0x292ac8(0x1d8)](_0x2908bb);}_0x95caf7['linkedPaths']['sort']();return;}_0xcaefe9['set'](_0x313378,{..._0x8703e5,'tags':Array['isArray'](_0x8703e5[_0x292ac8(0x1e5)])?_0x8703e5[_0x292ac8(0x1e5)]:[],'scope':_0x8703e5[_0x292ac8(0x1f1)],'source':_0x292ac8(0x1f5),'dir':_0x34215e,'cacheDir':_0x5f0afa[_0x292ac8(0x1ee)]==='cache'?_0x34215e:undefined,'skillMdPath':resolve(_0x34215e,SKILL_FILE),'metadataPath':_0x24bead,'linkedPaths':_0x5dac4d});}function compareLocalRuntimeSkills(_0x1e1475,_0x2ee59b){const _0x1451d5=a100_0x1466,_0x545e46={'personal':0x0,'company':0x1,'builtin':0x2};return _0x545e46[_0x1e1475[_0x1451d5(0x1f1)]]-_0x545e46[_0x2ee59b[_0x1451d5(0x1f1)]]||_0x1e1475[_0x1451d5(0x1ed)][_0x1451d5(0x1d7)](_0x2ee59b[_0x1451d5(0x1ed)])||_0x1e1475[_0x1451d5(0x1e1)][_0x1451d5(0x1d7)](_0x2ee59b[_0x1451d5(0x1e1)]);}
1
+ (function(_0x200e30,_0x3a242e){const _0x253bb1=a100_0x4c1e,_0x38b700=_0x200e30();while(!![]){try{const _0x1deb02=-parseInt(_0x253bb1(0xd2))/0x1*(parseInt(_0x253bb1(0xe8))/0x2)+parseInt(_0x253bb1(0xf1))/0x3*(parseInt(_0x253bb1(0xd3))/0x4)+parseInt(_0x253bb1(0xde))/0x5*(-parseInt(_0x253bb1(0xe4))/0x6)+-parseInt(_0x253bb1(0xf9))/0x7*(-parseInt(_0x253bb1(0xeb))/0x8)+parseInt(_0x253bb1(0xd5))/0x9+-parseInt(_0x253bb1(0xe9))/0xa*(parseInt(_0x253bb1(0xd7))/0xb)+parseInt(_0x253bb1(0xe2))/0xc*(parseInt(_0x253bb1(0xef))/0xd);if(_0x1deb02===_0x3a242e)break;else _0x38b700['push'](_0x38b700['shift']());}catch(_0x3ded71){_0x38b700['push'](_0x38b700['shift']());}}}(a100_0x4da9,0xf04a0));function a100_0x4da9(){const _0x55c25d=['map','includes','826TzaUaP','skillCode','scope','tags','values','sort','env','3uglpHD','3552756UnAXRO','trim','16954794VyEHFY','isArray','33knQqpb','from','dir','set','code','link','isDirectory','8841325rJvtAE','skillMdPath','cache','localeCompare','4288956CkVJNm','source','6uekcTO','get','filter','cacheDir','1087118xFhkZY','898820GfODge','isSymbolicLink','6352FtLZJb','metadataPath','scopes','builtin','65uHjOgV','linkedPaths','3bwGNEO','appCode','linkedPath','name','startsWith','push'];a100_0x4da9=function(){return _0x55c25d;};return a100_0x4da9();}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a100_0x4c1e(_0x1c1744,_0xa38ca5){_0x1c1744=_0x1c1744-0xd2;const _0x4da996=a100_0x4da9();let _0x4c1e0f=_0x4da996[_0x1c1744];return _0x4c1e0f;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x3eb111,_0x529211={}){const _0x5d59fa=a100_0x4c1e,_0x382379=safePathSegment(_0x3eb111['appCode'],'appCode'),_0x4e8fd9=normalizeRuntimeSkillScopes(_0x3eb111['scopes']),_0x47289e=new Set(_0x4e8fd9),_0x3f3f50=_0x3eb111[_0x5d59fa(0xdb)]?.[_0x5d59fa(0xd4)](),_0x70d992=new Map(),_0xed2a8a=resolve(getRuntimeSkillCacheRoot(_0x3eb111[_0x5d59fa(0xff)],_0x3eb111['accessKey'],_0x529211),_0x382379);for(const _0x3a22cb of _0x4e8fd9){for(const _0x325493 of localSkillEntryDirs(resolve(_0xed2a8a,_0x3a22cb))){collectLocalRuntimeSkill(_0x70d992,_0x325493,{'appCode':_0x382379,'scopes':_0x47289e,'code':_0x3f3f50,'source':_0x5d59fa(0xe0)});}}const _0x372093=resolveSkillSyncPaths(_0x529211);for(const _0x4c1e87 of runtimeAgentSkillRoots(_0x372093)){for(const _0x1bea7e of localSkillLinkCandidates(_0x4c1e87,_0x382379,_0x47289e)){collectLocalRuntimeSkill(_0x70d992,_0x1bea7e,{'appCode':_0x382379,'scopes':_0x47289e,'code':_0x3f3f50,'source':_0x5d59fa(0xdc),'linkedPath':_0x1bea7e});}}return Array[_0x5d59fa(0xd8)](_0x70d992[_0x5d59fa(0xfd)]())[_0x5d59fa(0xfe)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x402324){const _0x2b71fa=a100_0x4c1e;if(!existsSync(_0x402324))return[];return readdirSync(_0x402324,{'withFileTypes':!![]})['filter'](_0x252819=>_0x252819['isDirectory']()||_0x252819[_0x2b71fa(0xea)]())[_0x2b71fa(0xf7)](_0xa5e6ca=>resolve(_0x402324,_0xa5e6ca[_0x2b71fa(0xf4)]));}function localSkillLinkCandidates(_0x4c538c,_0x36d3e6,_0x26c18){const _0x282b8e=a100_0x4c1e;if(!existsSync(_0x4c538c))return[];const _0x19d67e=_0x36d3e6+'--';return readdirSync(_0x4c538c,{'withFileTypes':!![]})[_0x282b8e(0xe6)](_0x1fec5a=>_0x1fec5a[_0x282b8e(0xdd)]()||_0x1fec5a[_0x282b8e(0xea)]())[_0x282b8e(0xe6)](_0x3d14b8=>_0x3d14b8['name'][_0x282b8e(0xf5)](_0x19d67e)||_0x26c18['has'](_0x282b8e(0xee)))[_0x282b8e(0xf7)](_0x40ff40=>resolve(_0x4c538c,_0x40ff40[_0x282b8e(0xf4)]));}function collectLocalRuntimeSkill(_0x4a949e,_0x3a51bc,_0x2d167e){const _0x42248e=a100_0x4c1e,_0x4a19ce=resolve(_0x3a51bc,METADATA_FILE),_0x393f8f=readMetadataIfPresent(_0x4a19ce);if(!_0x393f8f)return;if(_0x393f8f[_0x42248e(0xf2)]!==_0x2d167e[_0x42248e(0xf2)])return;if(!isRuntimeSkillScope(_0x393f8f[_0x42248e(0xfb)])||!_0x2d167e[_0x42248e(0xed)]['has'](_0x393f8f['scope']))return;const _0x365251=_0x393f8f['skillCode']?.[_0x42248e(0xd4)]();if(!_0x365251)return;if(_0x2d167e[_0x42248e(0xdb)]&&_0x365251!==_0x2d167e[_0x42248e(0xdb)])return;const _0x21e2ce=_0x393f8f[_0x42248e(0xfb)]+':'+_0x365251,_0x991ce5=_0x2d167e[_0x42248e(0xf3)]?[_0x2d167e[_0x42248e(0xf3)]]:[],_0x361a13=_0x4a949e[_0x42248e(0xe5)](_0x21e2ce);if(_0x361a13){_0x2d167e[_0x42248e(0xe3)]===_0x42248e(0xe0)&&(_0x361a13['dir']=_0x3a51bc,_0x361a13[_0x42248e(0xe7)]=_0x3a51bc,_0x361a13[_0x42248e(0xdf)]=resolve(_0x3a51bc,SKILL_FILE),_0x361a13[_0x42248e(0xec)]=_0x4a19ce);for(const _0x102c0c of _0x991ce5){!_0x361a13[_0x42248e(0xf0)][_0x42248e(0xf8)](_0x102c0c)&&_0x361a13[_0x42248e(0xf0)][_0x42248e(0xf6)](_0x102c0c);}_0x361a13[_0x42248e(0xf0)][_0x42248e(0xfe)]();return;}_0x4a949e[_0x42248e(0xda)](_0x21e2ce,{..._0x393f8f,'tags':Array[_0x42248e(0xd6)](_0x393f8f[_0x42248e(0xfc)])?_0x393f8f['tags']:[],'scope':_0x393f8f[_0x42248e(0xfb)],'source':'local','dir':_0x3a51bc,'cacheDir':_0x2d167e[_0x42248e(0xe3)]===_0x42248e(0xe0)?_0x3a51bc:undefined,'skillMdPath':resolve(_0x3a51bc,SKILL_FILE),'metadataPath':_0x4a19ce,'linkedPaths':_0x991ce5});}function compareLocalRuntimeSkills(_0x4bf5cb,_0x5840a2){const _0x516bbc=a100_0x4c1e,_0x1af704={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1af704[_0x4bf5cb['scope']]-_0x1af704[_0x5840a2['scope']]||_0x4bf5cb['skillCode'][_0x516bbc(0xe1)](_0x5840a2[_0x516bbc(0xfa)])||_0x4bf5cb[_0x516bbc(0xd9)][_0x516bbc(0xe1)](_0x5840a2['dir']);}
@@ -1 +1 @@
1
- (function(_0x3fc544,_0x1664f6){const _0x1bed8c=a101_0x52de,_0x129532=_0x3fc544();while(!![]){try{const _0x338d0d=-parseInt(_0x1bed8c(0x150))/0x1*(-parseInt(_0x1bed8c(0x155))/0x2)+parseInt(_0x1bed8c(0x147))/0x3+parseInt(_0x1bed8c(0x158))/0x4*(-parseInt(_0x1bed8c(0x151))/0x5)+parseInt(_0x1bed8c(0x14f))/0x6+parseInt(_0x1bed8c(0x149))/0x7+-parseInt(_0x1bed8c(0x15c))/0x8+parseInt(_0x1bed8c(0x141))/0x9;if(_0x338d0d===_0x1664f6)break;else _0x129532['push'](_0x129532['shift']());}catch(_0xc3e823){_0x129532['push'](_0x129532['shift']());}}}(a101_0x519c,0x44630));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x2b41e2){const _0x549328=a101_0x52de;return _0x2b41e2[_0x549328(0x156)]??Buffer[_0x549328(0x144)](_0x2b41e2['content']??'',_0x549328(0x164));}export function fileText(_0xa88e70){const _0x460918=a101_0x52de;return fileContent(_0xa88e70)['toString'](_0x460918(0x164));}export function normalizeLocalFiles(_0x19c88c){const _0x3123eb=a101_0x52de;if(!Array['isArray'](_0x19c88c)||_0x19c88c['length']===0x0)return[];const _0x59295c=new Map();for(const _0x21fee7 of _0x19c88c){if(!_0x21fee7||typeof _0x21fee7!=='object'||typeof _0x21fee7[_0x3123eb(0x162)]!==_0x3123eb(0x168))throw CliErrors[_0x3123eb(0x165)](_0x3123eb(0x15b));const _0x4cb817=normalizeSkillRelativePath(_0x21fee7[_0x3123eb(0x162)]);if(_0x59295c['has'](_0x4cb817))throw CliErrors[_0x3123eb(0x165)](_0x3123eb(0x14d)+_0x4cb817);if(_0x21fee7['bytes']!==undefined&&!Buffer[_0x3123eb(0x154)](_0x21fee7[_0x3123eb(0x156)]))throw CliErrors[_0x3123eb(0x165)](_0x3123eb(0x153)+_0x4cb817);if(_0x21fee7[_0x3123eb(0x156)]===undefined&&typeof _0x21fee7['content']!==_0x3123eb(0x168))throw CliErrors[_0x3123eb(0x165)](_0x3123eb(0x148)+_0x4cb817);const _0x44437d=fileContent(_0x21fee7);_0x59295c['set'](_0x4cb817,{'path':_0x4cb817,'bytes':_0x44437d});}return Array[_0x3123eb(0x144)](_0x59295c[_0x3123eb(0x15a)]())['sort'](compareSkillFiles);}function a101_0x52de(_0x55ee50,_0x3bfac2){_0x55ee50=_0x55ee50-0x141;const _0x519c1d=a101_0x519c();let _0x52dedd=_0x519c1d[_0x55ee50];return _0x52dedd;}export function normalizeManifestFiles(_0x1b602e){const _0x55cb0f=a101_0x52de;if(!Array[_0x55cb0f(0x16b)](_0x1b602e)||_0x1b602e[_0x55cb0f(0x167)]===0x0)return[];const _0x11e90d=new Map();for(const _0xe4804d of _0x1b602e){if(!_0xe4804d||typeof _0xe4804d!=='object'||typeof _0xe4804d[_0x55cb0f(0x162)]!==_0x55cb0f(0x168))throw CliErrors[_0x55cb0f(0x165)](_0x55cb0f(0x15b));const _0x320ab1=normalizeSkillRelativePath(_0xe4804d[_0x55cb0f(0x162)]);if(_0x11e90d[_0x55cb0f(0x14a)](_0x320ab1))throw CliErrors[_0x55cb0f(0x165)](_0x55cb0f(0x14d)+_0x320ab1);if(!isSha256Hex(_0xe4804d['sha256']))throw CliErrors[_0x55cb0f(0x165)](_0x55cb0f(0x152)+_0x320ab1);if(!Number[_0x55cb0f(0x16a)](_0xe4804d['size'])||_0xe4804d['size']<0x0)throw CliErrors[_0x55cb0f(0x165)](_0x55cb0f(0x142)+_0x320ab1);_0x11e90d[_0x55cb0f(0x14b)](_0x320ab1,{'path':_0x320ab1,'sha256':_0xe4804d[_0x55cb0f(0x145)][_0x55cb0f(0x161)](),'size':_0xe4804d['size']});}return Array[_0x55cb0f(0x144)](_0x11e90d[_0x55cb0f(0x15a)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x1493e2){const _0x299336=realpathSync(_0x1493e2),_0x4614fb=[];function _0x4ad950(_0x3b0f06){const _0x44714a=a101_0x52de,_0x29bcf4=readdirSync(_0x3b0f06,{'withFileTypes':!![]})[_0x44714a(0x169)]((_0x25bb75,_0x609c8c)=>_0x25bb75[_0x44714a(0x15e)]['localeCompare'](_0x609c8c[_0x44714a(0x15e)]));for(const _0x53e852 of _0x29bcf4){if(_0x53e852[_0x44714a(0x14e)]()&&IGNORED_DIR_NAMES[_0x44714a(0x14a)](_0x53e852[_0x44714a(0x15e)]))continue;if(IGNORED_FILE_NAMES['has'](_0x53e852['name']))continue;const _0x3796b1=resolve(_0x3b0f06,_0x53e852[_0x44714a(0x15e)]);if(_0x53e852[_0x44714a(0x15d)]())throw CliErrors[_0x44714a(0x165)](_0x44714a(0x146)+_0x3796b1);const _0x5a0043=toPosixPath(relative(_0x299336,_0x3796b1));if(_0x53e852[_0x44714a(0x14e)]()){_0x4ad950(_0x3796b1);continue;}if(!_0x53e852[_0x44714a(0x159)]())continue;validateSkillRelativePath(_0x5a0043);const _0x445bc4=readFileSync(_0x3796b1);_0x4614fb[_0x44714a(0x15f)]({'path':_0x5a0043,'bytes':_0x445bc4});}}return _0x4ad950(_0x299336),normalizeLocalFiles(_0x4614fb);}export function compareSkillFiles(_0x41eecb,_0x45dd67){const _0x564ad3=a101_0x52de;if(_0x41eecb['path']===SKILL_FILE)return _0x45dd67['path']===SKILL_FILE?0x0:-0x1;if(_0x45dd67[_0x564ad3(0x162)]===SKILL_FILE)return 0x1;return Buffer[_0x564ad3(0x166)](Buffer[_0x564ad3(0x144)](_0x41eecb[_0x564ad3(0x162)],_0x564ad3(0x164)),Buffer[_0x564ad3(0x144)](_0x45dd67[_0x564ad3(0x162)],_0x564ad3(0x164)));}export function normalizeSkillRelativePath(_0x465c87){const _0x31ea26=a101_0x52de,_0x2d30a2=toPosixPath(_0x465c87[_0x31ea26(0x14c)]());return validateSkillRelativePath(_0x2d30a2),_0x2d30a2;}export function validateSkillRelativePath(_0x194441){const _0x252f9d=a101_0x52de;if(!_0x194441||_0x194441['startsWith']('/')||_0x194441['includes']('//'))throw CliErrors[_0x252f9d(0x165)](_0x252f9d(0x160)+_0x194441);for(const _0x5b0886 of _0x194441[_0x252f9d(0x143)]('/')){if(!_0x5b0886||_0x5b0886==='.'||_0x5b0886==='..')throw CliErrors[_0x252f9d(0x165)](_0x252f9d(0x160)+_0x194441);}}export function toPosixPath(_0x53604d){const _0x152dad=a101_0x52de;return _0x53604d[_0x152dad(0x163)](/\\/g,'/');}function a101_0x519c(){const _0x28f32c=['Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isBuffer','4AdyMHT','bytes','test','4JmrgSp','isFile','values','Skill\x20file\x20path\x20must\x20be\x20text.','3686112LWNxCD','isSymbolicLink','name','push','Unsafe\x20Skill\x20file\x20path:\x20','toLowerCase','path','replace','utf8','validation','compare','length','string','sort','isSafeInteger','isArray','127107BillDo','Skill\x20file\x20size\x20is\x20invalid:\x20','split','from','sha256','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','472176avCbkw','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','3063333ZNWPVp','has','set','trim','Duplicate\x20Skill\x20file\x20path:\x20','isDirectory','1251078uHcoXX','172773YeqVgL','2111585dgvHLt'];a101_0x519c=function(){return _0x28f32c;};return a101_0x519c();}export function isSha256Hex(_0x2a756b){const _0x5c5f0d=a101_0x52de;return typeof _0x2a756b===_0x5c5f0d(0x168)&&/^[a-fA-F0-9]{64}$/[_0x5c5f0d(0x157)](_0x2a756b);}
1
+ (function(_0x1726a9,_0x26b3e6){const _0x402fcd=a101_0x2cb2,_0x2870fb=_0x1726a9();while(!![]){try{const _0xa811b9=-parseInt(_0x402fcd(0x1bc))/0x1*(-parseInt(_0x402fcd(0x1c1))/0x2)+parseInt(_0x402fcd(0x19d))/0x3*(-parseInt(_0x402fcd(0x1a9))/0x4)+parseInt(_0x402fcd(0x1b2))/0x5*(parseInt(_0x402fcd(0x1be))/0x6)+parseInt(_0x402fcd(0x1a2))/0x7*(parseInt(_0x402fcd(0x1b8))/0x8)+parseInt(_0x402fcd(0x19b))/0x9*(-parseInt(_0x402fcd(0x1a4))/0xa)+parseInt(_0x402fcd(0x1b7))/0xb*(parseInt(_0x402fcd(0x1b1))/0xc)+-parseInt(_0x402fcd(0x1b4))/0xd*(parseInt(_0x402fcd(0x1aa))/0xe);if(_0xa811b9===_0x26b3e6)break;else _0x2870fb['push'](_0x2870fb['shift']());}catch(_0x545f58){_0x2870fb['push'](_0x2870fb['shift']());}}}(a101_0x25bd,0x8ae78));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x9906ad){const _0x384655=a101_0x2cb2;return _0x9906ad['bytes']??Buffer['from'](_0x9906ad['content']??'',_0x384655(0x193));}export function fileText(_0x394090){const _0x48ca31=a101_0x2cb2;return fileContent(_0x394090)[_0x48ca31(0x19c)]('utf8');}export function normalizeLocalFiles(_0x5c980e){const _0x136334=a101_0x2cb2;if(!Array[_0x136334(0x1c0)](_0x5c980e)||_0x5c980e[_0x136334(0x1b0)]===0x0)return[];const _0x14bc80=new Map();for(const _0x54961f of _0x5c980e){if(!_0x54961f||typeof _0x54961f!==_0x136334(0x199)||typeof _0x54961f['path']!==_0x136334(0x1b5))throw CliErrors[_0x136334(0x19f)](_0x136334(0x195));const _0x2f6607=normalizeSkillRelativePath(_0x54961f[_0x136334(0x1c3)]);if(_0x14bc80[_0x136334(0x1a5)](_0x2f6607))throw CliErrors[_0x136334(0x19f)](_0x136334(0x1bb)+_0x2f6607);if(_0x54961f[_0x136334(0x1ae)]!==undefined&&!Buffer['isBuffer'](_0x54961f[_0x136334(0x1ae)]))throw CliErrors['validation'](_0x136334(0x1bf)+_0x2f6607);if(_0x54961f[_0x136334(0x1ae)]===undefined&&typeof _0x54961f['content']!==_0x136334(0x1b5))throw CliErrors['validation'](_0x136334(0x198)+_0x2f6607);const _0x36c6d2=fileContent(_0x54961f);_0x14bc80[_0x136334(0x19a)](_0x2f6607,{'path':_0x2f6607,'bytes':_0x36c6d2});}return Array[_0x136334(0x1ba)](_0x14bc80[_0x136334(0x1ac)]())[_0x136334(0x1a1)](compareSkillFiles);}export function normalizeManifestFiles(_0x16573b){const _0x344586=a101_0x2cb2;if(!Array[_0x344586(0x1c0)](_0x16573b)||_0x16573b['length']===0x0)return[];const _0x271673=new Map();for(const _0x471db1 of _0x16573b){if(!_0x471db1||typeof _0x471db1!==_0x344586(0x199)||typeof _0x471db1['path']!=='string')throw CliErrors['validation'](_0x344586(0x195));const _0xe3d1b7=normalizeSkillRelativePath(_0x471db1[_0x344586(0x1c3)]);if(_0x271673['has'](_0xe3d1b7))throw CliErrors[_0x344586(0x19f)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0xe3d1b7);if(!isSha256Hex(_0x471db1[_0x344586(0x19e)]))throw CliErrors[_0x344586(0x19f)](_0x344586(0x197)+_0xe3d1b7);if(!Number[_0x344586(0x196)](_0x471db1[_0x344586(0x1a7)])||_0x471db1['size']<0x0)throw CliErrors[_0x344586(0x19f)](_0x344586(0x1a0)+_0xe3d1b7);_0x271673['set'](_0xe3d1b7,{'path':_0xe3d1b7,'sha256':_0x471db1['sha256'][_0x344586(0x194)](),'size':_0x471db1[_0x344586(0x1a7)]});}return Array[_0x344586(0x1ba)](_0x271673[_0x344586(0x1ac)]())[_0x344586(0x1a1)](compareSkillFiles);}function a101_0x2cb2(_0x3762e8,_0x55ce26){_0x3762e8=_0x3762e8-0x193;const _0x25bdd3=a101_0x25bd();let _0x2cb289=_0x25bdd3[_0x3762e8];return _0x2cb289;}export function scanSkillDirectory(_0xf96cdd){const _0x472617=realpathSync(_0xf96cdd),_0x28547d=[];function _0x54d1f9(_0xe0a07a){const _0x19a66b=a101_0x2cb2,_0x4be743=readdirSync(_0xe0a07a,{'withFileTypes':!![]})[_0x19a66b(0x1a1)]((_0x14a831,_0x5db089)=>_0x14a831[_0x19a66b(0x1b3)][_0x19a66b(0x1c2)](_0x5db089[_0x19a66b(0x1b3)]));for(const _0x5d895e of _0x4be743){if(_0x5d895e[_0x19a66b(0x1b6)]()&&IGNORED_DIR_NAMES['has'](_0x5d895e[_0x19a66b(0x1b3)]))continue;if(IGNORED_FILE_NAMES['has'](_0x5d895e['name']))continue;const _0x2eb91c=resolve(_0xe0a07a,_0x5d895e[_0x19a66b(0x1b3)]);if(_0x5d895e[_0x19a66b(0x1a6)]())throw CliErrors[_0x19a66b(0x19f)](_0x19a66b(0x1a3)+_0x2eb91c);const _0x43e104=toPosixPath(relative(_0x472617,_0x2eb91c));if(_0x5d895e['isDirectory']()){_0x54d1f9(_0x2eb91c);continue;}if(!_0x5d895e['isFile']())continue;validateSkillRelativePath(_0x43e104);const _0x3de14d=readFileSync(_0x2eb91c);_0x28547d[_0x19a66b(0x1b9)]({'path':_0x43e104,'bytes':_0x3de14d});}}return _0x54d1f9(_0x472617),normalizeLocalFiles(_0x28547d);}export function compareSkillFiles(_0x5f3f9d,_0x181d26){const _0x1fb7bb=a101_0x2cb2;if(_0x5f3f9d[_0x1fb7bb(0x1c3)]===SKILL_FILE)return _0x181d26[_0x1fb7bb(0x1c3)]===SKILL_FILE?0x0:-0x1;if(_0x181d26[_0x1fb7bb(0x1c3)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x5f3f9d[_0x1fb7bb(0x1c3)],_0x1fb7bb(0x193)),Buffer[_0x1fb7bb(0x1ba)](_0x181d26['path'],_0x1fb7bb(0x193)));}function a101_0x25bd(){const _0x5f5a49=['Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','object','set','557901wgwWPQ','toString','1483584WQVLjy','sha256','validation','Skill\x20file\x20size\x20is\x20invalid:\x20','sort','658791YDknMs','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','10iqgpLp','has','isSymbolicLink','size','includes','4zDirDz','658OqCpbT','replace','values','Unsafe\x20Skill\x20file\x20path:\x20','bytes','test','length','600384KMCLKw','55nnLHwS','name','365326dKYefS','string','isDirectory','176fOzoBM','8DsQute','push','from','Duplicate\x20Skill\x20file\x20path:\x20','271403CedPHm','trim','402234vyCuXQ','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isArray','6SOKnlE','localeCompare','path','startsWith','utf8','toLowerCase','Skill\x20file\x20path\x20must\x20be\x20text.','isSafeInteger','Skill\x20file\x20sha256\x20is\x20invalid:\x20'];a101_0x25bd=function(){return _0x5f5a49;};return a101_0x25bd();}export function normalizeSkillRelativePath(_0x484153){const _0x1bff99=a101_0x2cb2,_0xda349a=toPosixPath(_0x484153[_0x1bff99(0x1bd)]());return validateSkillRelativePath(_0xda349a),_0xda349a;}export function validateSkillRelativePath(_0x254753){const _0x3beb4a=a101_0x2cb2;if(!_0x254753||_0x254753[_0x3beb4a(0x1c4)]('/')||_0x254753[_0x3beb4a(0x1a8)]('//'))throw CliErrors['validation'](_0x3beb4a(0x1ad)+_0x254753);for(const _0x2dd4ca of _0x254753['split']('/')){if(!_0x2dd4ca||_0x2dd4ca==='.'||_0x2dd4ca==='..')throw CliErrors[_0x3beb4a(0x19f)](_0x3beb4a(0x1ad)+_0x254753);}}export function toPosixPath(_0x5e513b){const _0x499099=a101_0x2cb2;return _0x5e513b[_0x499099(0x1ab)](/\\/g,'/');}export function isSha256Hex(_0x293f95){const _0x1867bf=a101_0x2cb2;return typeof _0x293f95===_0x1867bf(0x1b5)&&/^[a-fA-F0-9]{64}$/[_0x1867bf(0x1af)](_0x293f95);}
@@ -1 +1 @@
1
- (function(_0x53eb79,_0x4e2cf1){const _0x310072=a102_0x244a,_0x100e07=_0x53eb79();while(!![]){try{const _0x285b8d=parseInt(_0x310072(0x188))/0x1*(parseInt(_0x310072(0x19d))/0x2)+-parseInt(_0x310072(0x1a2))/0x3*(-parseInt(_0x310072(0x17b))/0x4)+parseInt(_0x310072(0x193))/0x5*(parseInt(_0x310072(0x180))/0x6)+parseInt(_0x310072(0x19c))/0x7*(parseInt(_0x310072(0x19b))/0x8)+-parseInt(_0x310072(0x1af))/0x9*(-parseInt(_0x310072(0x187))/0xa)+-parseInt(_0x310072(0x17e))/0xb*(-parseInt(_0x310072(0x184))/0xc)+parseInt(_0x310072(0x199))/0xd*(-parseInt(_0x310072(0x19f))/0xe);if(_0x285b8d===_0x4e2cf1)break;else _0x100e07['push'](_0x100e07['shift']());}catch(_0xef6932){_0x100e07['push'](_0x100e07['shift']());}}}(a102_0x5762,0xe8865));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a102_0x5762(){const _0x38184d=['8tWIZPo','test','name:\x20','143MGBDOZ','match','23034lZDPCE','replace','fileHashes','paths','1437708zVjykw','pulledAt','accessKey','159090xCNiNg','59DYcGdN','validation','---\x0a','map','contentHash','utf8','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','toString','displayName:\x20','isFile','Managed\x20file\x20was\x20removed\x20locally:\x20','1355FXsDhz','description','filter','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','slice','contents','65QowJow','trim','4408xPZzQS','23597dFHZmd','13982qwsEmN','.\x20Changed\x20file:\x20','14685132UIyNDk','errors','trimEnd','1349688KtWxEq','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','packageBytes','displayName','find','path','force','appCode','env','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','name','243mGumQG','keys','\x0a---\x0a\x0a','entries','has'];a102_0x5762=function(){return _0x38184d;};return a102_0x5762();}import{bufferSha256,contentHash,fileHash}from'./hashing.js';function a102_0x244a(_0x3c77e3,_0x4519e3){_0x3c77e3=_0x3c77e3-0x177;const _0x576225=a102_0x5762();let _0x244a62=_0x576225[_0x3c77e3];return _0x244a62;}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(_0x24ad14,_0x7330ca,_0x5c63cb){const _0x359e27=a102_0x244a,_0xa1d3e2=requireSkillCode(_0x24ad14),_0x5aadc4=requirePackageBytes(_0xa1d3e2,_0x5c63cb[_0x359e27(0x1a4)]),_0x42ad29=extractDownloadedPackage(_0x5aadc4),_0x1ac407=_0x42ad29[_0x359e27(0x1a6)](_0x1abf50=>_0x1abf50[_0x359e27(0x1a7)]===SKILL_FILE);if(!_0x1ac407)throw CliErrors[_0x359e27(0x189)](_0x359e27(0x1ad)+SKILL_FILE+':\x20'+_0xa1d3e2);const _0x580a98=withMaterializedSkillFrontmatter(_0x42ad29,_0x24ad14,_0xa1d3e2),_0x15f875=_0x580a98[_0x359e27(0x1a6)](_0x40a6a0=>_0x40a6a0[_0x359e27(0x1a7)]===SKILL_FILE),_0x32b743=fileText(_0x15f875),_0x39d7d3=getRuntimeSkillDir(_0x5c63cb[_0x359e27(0x1aa)],_0x5c63cb[_0x359e27(0x186)],_0x5c63cb['appCode'],_0x7330ca,_0xa1d3e2,_0x5c63cb[_0x359e27(0x183)]),_0x3f676d=resolve(_0x39d7d3,SKILL_FILE),_0x3f3a6a=resolve(_0x39d7d3,METADATA_FILE),_0x1368a7=contentHash(_0x32b743),_0x4d1794=readMetadataIfPresent(_0x3f3a6a)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x39d7d3,_0x3f3a6a,_0x580a98,_0x5c63cb[_0x359e27(0x1a8)]===!![]),mkdirSync(_0x39d7d3,{'recursive':!![],'mode':0x1c0});const _0x2474c=existsSync(_0x3f676d)?readFileSync(_0x3f676d,_0x359e27(0x18d)):undefined;return materializeFiles(_0x39d7d3,_0x580a98),removeStaleManagedFiles(_0x39d7d3,_0x4d1794,_0x580a98),writeJsonAtomic(_0x3f3a6a,buildMetadata(_0x24ad14,_0x7330ca,_0x5c63cb[_0x359e27(0x1a9)],_0x1368a7,_0x5c63cb[_0x359e27(0x185)],_0x580a98,_0x5aadc4)),{'skill':_0x24ad14,'scope':_0x7330ca,'dir':_0x39d7d3,'skillMdPath':_0x3f676d,'metadataPath':_0x3f3a6a,'contentHash':_0x1368a7,'changed':_0x2474c!==_0x32b743};}function withMaterializedSkillFrontmatter(_0x3bf826,_0x52b041,_0x468c22){const _0x3bd361=a102_0x244a,_0x2bbadb=skillDisplayName(_0x52b041,_0x468c22),_0x55ff83=_0x52b041['description']?.[_0x3bd361(0x19a)]()||_0x2bbadb||_0x468c22;return normalizeLocalFiles(_0x3bf826)[_0x3bd361(0x18b)](_0x4104ff=>{const _0x27d554=_0x3bd361,_0x4df2a4=fileText(_0x4104ff);if(_0x4104ff[_0x27d554(0x1a7)]!==SKILL_FILE)return _0x4104ff;if(hasYamlFrontmatter(_0x4df2a4))return{'path':_0x4104ff[_0x27d554(0x1a7)],'content':withSyncedDisplayName(_0x4df2a4,_0x2bbadb)};return{'path':_0x4104ff[_0x27d554(0x1a7)],'content':prependSkillFrontmatter(_0x4df2a4,{'name':_0x468c22,'displayName':_0x2bbadb,'description':_0x55ff83})};});}function hasYamlFrontmatter(_0x5adfd4){const _0x98495d=a102_0x244a;return/^\uFEFF?---\s*\r?\n/[_0x98495d(0x17c)](_0x5adfd4);}function prependSkillFrontmatter(_0x499e6c,_0x4fb59e){const _0x2d7b85=a102_0x244a,_0x4eb065=_0x499e6c[_0x2d7b85(0x181)](/^\uFEFF/,'');return['---',_0x2d7b85(0x17d)+yamlString(_0x4fb59e[_0x2d7b85(0x1ae)]),_0x4fb59e[_0x2d7b85(0x1a5)]?_0x2d7b85(0x190)+yamlString(_0x4fb59e[_0x2d7b85(0x1a5)]):undefined,'description:\x20'+yamlString(_0x4fb59e[_0x2d7b85(0x194)]),'---','',_0x4eb065][_0x2d7b85(0x195)](_0x1b70d5=>_0x1b70d5!==undefined)['join']('\x0a');}function yamlString(_0x468c77){const _0x599b31=a102_0x244a;return JSON['stringify'](_0x468c77[_0x599b31(0x181)](/\r/g,'')[_0x599b31(0x19a)]());}function skillDisplayName(_0x11909a,_0x1b9ac5){const _0x27560=a102_0x244a,_0x31948e=_0x11909a['skillName']?.[_0x27560(0x19a)]();return _0x31948e||_0x1b9ac5;}function withSyncedDisplayName(_0x28e1fb,_0x1171e4){const _0x49625d=a102_0x244a,_0x29f21c=_0x28e1fb[_0x49625d(0x17f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x29f21c)return _0x28e1fb;const _0x4245dd=_0x29f21c[0x1]??'',_0x134b29=_0x29f21c[0x2]??'',_0x6eda82=parseDocument(_0x134b29);if(_0x6eda82[_0x49625d(0x1a0)]['length']>0x0||!isMap(_0x6eda82['contents']))return _0x28e1fb;if(_0x1171e4)_0x6eda82['set'](_0x49625d(0x1a5),_0x1171e4);else{if(_0x6eda82[_0x49625d(0x17a)](_0x49625d(0x1a5)))_0x6eda82['delete'](_0x49625d(0x1a5));else return _0x28e1fb;}forceBlockCollections(_0x6eda82[_0x49625d(0x198)]);const _0x4113d2=_0x6eda82[_0x49625d(0x18f)]({'lineWidth':0x0})[_0x49625d(0x1a1)](),_0x273804=_0x28e1fb[_0x49625d(0x197)](_0x29f21c[0x0]['length'])['replace'](/^\r?\n/,'');return _0x4245dd+_0x49625d(0x18a)+_0x4113d2+_0x49625d(0x178)+_0x273804;}function forceBlockCollections(_0x5d4026){if(!isNode(_0x5d4026))return;visit(_0x5d4026,(_0x1c85bd,_0x329a39)=>{isCollection(_0x329a39)&&(_0x329a39['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x3cdd5b,_0x3183e8,_0x5de68c,_0x57fcdd){const _0xd9e339=a102_0x244a;if(_0x57fcdd||!existsSync(_0x3183e8))return;const _0x4c8c66=readMetadataIfPresent(_0x3183e8);if(!_0x4c8c66)return;const _0x41b7ea=_0x4c8c66[_0xd9e339(0x182)]&&Object[_0xd9e339(0x177)](_0x4c8c66[_0xd9e339(0x182)])['length']>0x0?_0x4c8c66[_0xd9e339(0x182)]:undefined;if(_0x41b7ea)for(const [_0x49bb4c,_0x42e546]of Object[_0xd9e339(0x179)](_0x41b7ea)){const _0x40db5f=resolveManagedFilePath(_0x3cdd5b,_0x49bb4c);if(!existsSync(_0x40db5f))throw CliErrors[_0xd9e339(0x189)](_0xd9e339(0x1a3)+_0x3cdd5b,_0xd9e339(0x192)+_0x49bb4c);const _0x3f497f=lstatSync(_0x40db5f);if(!_0x3f497f['isFile']())throw CliErrors[_0xd9e339(0x189)](_0xd9e339(0x1a3)+_0x3cdd5b,_0xd9e339(0x1ab)+_0x49bb4c);const _0x581ecb=bufferSha256(readFileSync(_0x40db5f));if(_0x581ecb!==_0x42e546)throw CliErrors[_0xd9e339(0x189)](_0xd9e339(0x1a3)+_0x3cdd5b+_0xd9e339(0x19e)+_0x49bb4c,_0xd9e339(0x196)+_0x49bb4c);}else{const _0x332a2d=resolve(_0x3cdd5b,SKILL_FILE);if(existsSync(_0x332a2d)&&_0x4c8c66['contentHash']){const _0x3cf596=contentHash(readFileSync(_0x332a2d,_0xd9e339(0x18d)));if(_0x3cf596!==_0x4c8c66[_0xd9e339(0x18c)])throw CliErrors[_0xd9e339(0x189)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x332a2d,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x51cc41 of normalizeLocalFiles(_0x5de68c)){if(_0x41b7ea?.[_0x51cc41[_0xd9e339(0x1a7)]])continue;if(!_0x41b7ea&&_0x51cc41[_0xd9e339(0x1a7)]===SKILL_FILE)continue;const _0x252ccd=resolveManagedFilePath(_0x3cdd5b,_0x51cc41[_0xd9e339(0x1a7)]);if(!existsSync(_0x252ccd))continue;const _0x335de7=lstatSync(_0x252ccd);if(!_0x335de7[_0xd9e339(0x191)]())throw CliErrors[_0xd9e339(0x189)](_0xd9e339(0x1a3)+_0x3cdd5b,_0xd9e339(0x18e)+_0x51cc41[_0xd9e339(0x1a7)]);const _0x485c83=bufferSha256(readFileSync(_0x252ccd));if(_0x485c83!==fileHash(_0x51cc41))throw CliErrors[_0xd9e339(0x189)](_0xd9e339(0x1a3)+_0x3cdd5b,_0xd9e339(0x1ac)+_0x51cc41['path']);}}function materializeFiles(_0x58ab5f,_0x47b3ee){const _0x529638=a102_0x244a;for(const _0x408965 of normalizeLocalFiles(_0x47b3ee)){const _0x3e8f01=resolveManagedFilePath(_0x58ab5f,_0x408965[_0x529638(0x1a7)]);mkdirSync(dirname(_0x3e8f01),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3e8f01,fileContent(_0x408965),0x180);}}function removeStaleManagedFiles(_0x522d2a,_0x49e4c9,_0xbc14ad){const _0x417765=a102_0x244a;if(!_0x49e4c9)return;const _0x4a1a35=new Set(normalizeLocalFiles(_0xbc14ad)[_0x417765(0x18b)](_0x438595=>_0x438595[_0x417765(0x1a7)]));for(const _0x282c7b of Object[_0x417765(0x177)](_0x49e4c9)){if(_0x4a1a35[_0x417765(0x17a)](_0x282c7b))continue;const _0x123006=resolveManagedFilePath(_0x522d2a,_0x282c7b);existsSync(_0x123006)&&lstatSync(_0x123006)[_0x417765(0x191)]()&&rmSync(_0x123006,{'force':!![]});}}
1
+ (function(_0x4f8797,_0x204714){const _0x15d323=a102_0x412b,_0x44b1b5=_0x4f8797();while(!![]){try{const _0x26a1b7=parseInt(_0x15d323(0x13d))/0x1*(parseInt(_0x15d323(0x137))/0x2)+-parseInt(_0x15d323(0x136))/0x3*(-parseInt(_0x15d323(0x13e))/0x4)+-parseInt(_0x15d323(0x119))/0x5*(-parseInt(_0x15d323(0x139))/0x6)+-parseInt(_0x15d323(0x113))/0x7+parseInt(_0x15d323(0x131))/0x8*(parseInt(_0x15d323(0x146))/0x9)+parseInt(_0x15d323(0x129))/0xa+-parseInt(_0x15d323(0x121))/0xb;if(_0x26a1b7===_0x204714)break;else _0x44b1b5['push'](_0x44b1b5['shift']());}catch(_0x15a793){_0x44b1b5['push'](_0x44b1b5['shift']());}}}(a102_0x24df,0x652f9));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a102_0x24df(){const _0x1a8f27=['test','find','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','skillName','stringify','appCode','48ZRLsIV','filter','trimEnd','---','utf8','4701GYGGuA','595246UEOnle','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','6hOvoyT','paths','displayName','map','2rlCXDU','1908CEMxfv','set','fileHashes','description:\x20','.\x20Changed\x20file:\x20','\x0a---\x0a\x0a','pulledAt','toString','356886IOiwLZ','contents','contentHash','4183221ScnkQt','match','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','join','has','validation','1845155fIvcmr','errors','replace','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','isFile','length','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','keys','11960223xBTZjg','path','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','name:\x20','name','trim','slice','packageBytes','1496930NXdTpS','accessKey'];a102_0x24df=function(){return _0x1a8f27;};return a102_0x24df();}import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x67d2b1,_0x308f0e,_0x230035){const _0x361e2a=a102_0x412b,_0x2f4ba6=requireSkillCode(_0x67d2b1),_0x137fb3=requirePackageBytes(_0x2f4ba6,_0x230035[_0x361e2a(0x128)]),_0x517676=extractDownloadedPackage(_0x137fb3),_0x16af4d=_0x517676[_0x361e2a(0x12c)](_0x39d09d=>_0x39d09d[_0x361e2a(0x122)]===SKILL_FILE);if(!_0x16af4d)throw CliErrors[_0x361e2a(0x118)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x2f4ba6);const _0x32a134=withMaterializedSkillFrontmatter(_0x517676,_0x67d2b1,_0x2f4ba6),_0x5c91f8=_0x32a134[_0x361e2a(0x12c)](_0x17545d=>_0x17545d[_0x361e2a(0x122)]===SKILL_FILE),_0x2bbaa1=fileText(_0x5c91f8),_0x29d150=getRuntimeSkillDir(_0x230035['env'],_0x230035[_0x361e2a(0x12a)],_0x230035[_0x361e2a(0x130)],_0x308f0e,_0x2f4ba6,_0x230035[_0x361e2a(0x13a)]),_0x139cd1=resolve(_0x29d150,SKILL_FILE),_0x5ecaee=resolve(_0x29d150,METADATA_FILE),_0x6c367f=contentHash(_0x2bbaa1),_0x5008d9=readMetadataIfPresent(_0x5ecaee)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x29d150,_0x5ecaee,_0x32a134,_0x230035['force']===!![]),mkdirSync(_0x29d150,{'recursive':!![],'mode':0x1c0});const _0x1d7b9a=existsSync(_0x139cd1)?readFileSync(_0x139cd1,'utf8'):undefined;return materializeFiles(_0x29d150,_0x32a134),removeStaleManagedFiles(_0x29d150,_0x5008d9,_0x32a134),writeJsonAtomic(_0x5ecaee,buildMetadata(_0x67d2b1,_0x308f0e,_0x230035['appCode'],_0x6c367f,_0x230035[_0x361e2a(0x144)],_0x32a134,_0x137fb3)),{'skill':_0x67d2b1,'scope':_0x308f0e,'dir':_0x29d150,'skillMdPath':_0x139cd1,'metadataPath':_0x5ecaee,'contentHash':_0x6c367f,'changed':_0x1d7b9a!==_0x2bbaa1};}function withMaterializedSkillFrontmatter(_0x5d1348,_0x20d55e,_0x314a24){const _0x147b7e=a102_0x412b,_0x5315e4=skillDisplayName(_0x20d55e,_0x314a24),_0x406094=_0x20d55e['description']?.[_0x147b7e(0x126)]()||_0x5315e4||_0x314a24;return normalizeLocalFiles(_0x5d1348)['map'](_0x2be5d5=>{const _0x48a745=_0x147b7e,_0xf006f2=fileText(_0x2be5d5);if(_0x2be5d5[_0x48a745(0x122)]!==SKILL_FILE)return _0x2be5d5;if(hasYamlFrontmatter(_0xf006f2))return{'path':_0x2be5d5[_0x48a745(0x122)],'content':withSyncedDisplayName(_0xf006f2,_0x5315e4)};return{'path':_0x2be5d5[_0x48a745(0x122)],'content':prependSkillFrontmatter(_0xf006f2,{'name':_0x314a24,'displayName':_0x5315e4,'description':_0x406094})};});}function hasYamlFrontmatter(_0x3e749c){const _0x3ab3ee=a102_0x412b;return/^\uFEFF?---\s*\r?\n/[_0x3ab3ee(0x12b)](_0x3e749c);}function prependSkillFrontmatter(_0x4cac90,_0x546b5b){const _0xcb2fe8=a102_0x412b,_0x512899=_0x4cac90[_0xcb2fe8(0x11b)](/^\uFEFF/,'');return[_0xcb2fe8(0x134),_0xcb2fe8(0x124)+yamlString(_0x546b5b[_0xcb2fe8(0x125)]),_0x546b5b[_0xcb2fe8(0x13b)]?'displayName:\x20'+yamlString(_0x546b5b[_0xcb2fe8(0x13b)]):undefined,_0xcb2fe8(0x141)+yamlString(_0x546b5b['description']),_0xcb2fe8(0x134),'',_0x512899][_0xcb2fe8(0x132)](_0x54a531=>_0x54a531!==undefined)[_0xcb2fe8(0x116)]('\x0a');}function yamlString(_0x1921c4){const _0x485492=a102_0x412b;return JSON[_0x485492(0x12f)](_0x1921c4[_0x485492(0x11b)](/\r/g,'')[_0x485492(0x126)]());}function skillDisplayName(_0x584e1e,_0xc494ec){const _0x46b6bb=a102_0x412b,_0xca5823=_0x584e1e[_0x46b6bb(0x12e)]?.[_0x46b6bb(0x126)]();return _0xca5823||_0xc494ec;}function withSyncedDisplayName(_0x74998e,_0x466c98){const _0x37e375=a102_0x412b,_0x2e22cd=_0x74998e[_0x37e375(0x114)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2e22cd)return _0x74998e;const _0x1dd38a=_0x2e22cd[0x1]??'',_0x4e42fa=_0x2e22cd[0x2]??'',_0x4942d1=parseDocument(_0x4e42fa);if(_0x4942d1[_0x37e375(0x11a)][_0x37e375(0x11e)]>0x0||!isMap(_0x4942d1[_0x37e375(0x147)]))return _0x74998e;if(_0x466c98)_0x4942d1[_0x37e375(0x13f)](_0x37e375(0x13b),_0x466c98);else{if(_0x4942d1[_0x37e375(0x117)]('displayName'))_0x4942d1['delete'](_0x37e375(0x13b));else return _0x74998e;}forceBlockCollections(_0x4942d1[_0x37e375(0x147)]);const _0x524db3=_0x4942d1[_0x37e375(0x145)]({'lineWidth':0x0})[_0x37e375(0x133)](),_0x2eb72e=_0x74998e[_0x37e375(0x127)](_0x2e22cd[0x0][_0x37e375(0x11e)])['replace'](/^\r?\n/,'');return _0x1dd38a+'---\x0a'+_0x524db3+_0x37e375(0x143)+_0x2eb72e;}function forceBlockCollections(_0x39091a){if(!isNode(_0x39091a))return;visit(_0x39091a,(_0x3e4fdd,_0x41a8a5)=>{isCollection(_0x41a8a5)&&(_0x41a8a5['flow']=![]);});}function a102_0x412b(_0x31b78c,_0x27bd07){_0x31b78c=_0x31b78c-0x112;const _0x24df35=a102_0x24df();let _0x412b67=_0x24df35[_0x31b78c];return _0x412b67;}function ensurePulledFilesCanBeOverwritten(_0x49deea,_0x85849d,_0x35236e,_0x28ed72){const _0x114d08=a102_0x412b;if(_0x28ed72||!existsSync(_0x85849d))return;const _0x42a758=readMetadataIfPresent(_0x85849d);if(!_0x42a758)return;const _0x34e43b=_0x42a758[_0x114d08(0x140)]&&Object[_0x114d08(0x120)](_0x42a758[_0x114d08(0x140)])[_0x114d08(0x11e)]>0x0?_0x42a758[_0x114d08(0x140)]:undefined;if(_0x34e43b)for(const [_0x553087,_0x474f8d]of Object['entries'](_0x34e43b)){const _0x351771=resolveManagedFilePath(_0x49deea,_0x553087);if(!existsSync(_0x351771))throw CliErrors[_0x114d08(0x118)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x49deea,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x553087);const _0x344cab=lstatSync(_0x351771);if(!_0x344cab[_0x114d08(0x11d)]())throw CliErrors[_0x114d08(0x118)](_0x114d08(0x12d)+_0x49deea,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x553087);const _0x158073=bufferSha256(readFileSync(_0x351771));if(_0x158073!==_0x474f8d)throw CliErrors['validation'](_0x114d08(0x12d)+_0x49deea+_0x114d08(0x142)+_0x553087,_0x114d08(0x11f)+_0x553087);}else{const _0x35b53b=resolve(_0x49deea,SKILL_FILE);if(existsSync(_0x35b53b)&&_0x42a758[_0x114d08(0x112)]){const _0x24df97=contentHash(readFileSync(_0x35b53b,_0x114d08(0x135)));if(_0x24df97!==_0x42a758[_0x114d08(0x112)])throw CliErrors[_0x114d08(0x118)](_0x114d08(0x11c)+_0x35b53b,_0x114d08(0x115));}}for(const _0x3d4d7f of normalizeLocalFiles(_0x35236e)){if(_0x34e43b?.[_0x3d4d7f[_0x114d08(0x122)]])continue;if(!_0x34e43b&&_0x3d4d7f[_0x114d08(0x122)]===SKILL_FILE)continue;const _0x5c1a6d=resolveManagedFilePath(_0x49deea,_0x3d4d7f[_0x114d08(0x122)]);if(!existsSync(_0x5c1a6d))continue;const _0x89c2f9=lstatSync(_0x5c1a6d);if(!_0x89c2f9['isFile']())throw CliErrors[_0x114d08(0x118)](_0x114d08(0x12d)+_0x49deea,_0x114d08(0x123)+_0x3d4d7f[_0x114d08(0x122)]);const _0x29c4da=bufferSha256(readFileSync(_0x5c1a6d));if(_0x29c4da!==fileHash(_0x3d4d7f))throw CliErrors[_0x114d08(0x118)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x49deea,_0x114d08(0x138)+_0x3d4d7f['path']);}}function materializeFiles(_0x3194f9,_0x27ea99){const _0x45d31b=a102_0x412b;for(const _0x47947d of normalizeLocalFiles(_0x27ea99)){const _0x985f5b=resolveManagedFilePath(_0x3194f9,_0x47947d[_0x45d31b(0x122)]);mkdirSync(dirname(_0x985f5b),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x985f5b,fileContent(_0x47947d),0x180);}}function removeStaleManagedFiles(_0xeb287c,_0x2520e5,_0xf02719){const _0x570c14=a102_0x412b;if(!_0x2520e5)return;const _0x2dbd98=new Set(normalizeLocalFiles(_0xf02719)[_0x570c14(0x13c)](_0x3db60b=>_0x3db60b[_0x570c14(0x122)]));for(const _0x21a735 of Object[_0x570c14(0x120)](_0x2520e5)){if(_0x2dbd98[_0x570c14(0x117)](_0x21a735))continue;const _0x5520ff=resolveManagedFilePath(_0xeb287c,_0x21a735);existsSync(_0x5520ff)&&lstatSync(_0x5520ff)[_0x570c14(0x11d)]()&&rmSync(_0x5520ff,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x2e6666,_0x1fe775){const _0x5449ae=a103_0x56df,_0x2e3c13=_0x2e6666();while(!![]){try{const _0x27fc19=-parseInt(_0x5449ae(0x12f))/0x1+parseInt(_0x5449ae(0x127))/0x2+-parseInt(_0x5449ae(0x129))/0x3+parseInt(_0x5449ae(0x12c))/0x4+-parseInt(_0x5449ae(0x11c))/0x5+parseInt(_0x5449ae(0x120))/0x6+-parseInt(_0x5449ae(0x123))/0x7;if(_0x27fc19===_0x1fe775)break;else _0x2e3c13['push'](_0x2e3c13['shift']());}catch(_0x13db16){_0x2e3c13['push'](_0x2e3c13['shift']());}}}(a103_0x4cfc,0x84d9e));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a103_0x56df(_0x22c53c,_0x5091a9){_0x22c53c=_0x22c53c-0x114;const _0x4cfc0b=a103_0x4cfc();let _0x56df2a=_0x4cfc0b[_0x22c53c];return _0x56df2a;}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a103_0x4cfc(){const _0x33e423=['isArray','254782BbgzMD','forkedFromSkillId','utf8','skillName','validation','parse','string','path','userId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','skillCode','2245835RckZpc','forkedFromVersion','length','tags','1346220EpPCQX','manifest','map','3254342bVecGk','readonly','fromEntries','object','1092848BmBpaI','trim','178614JMxgqI','version','zipSize','4007028IGDKYj','status'];a103_0x4cfc=function(){return _0x33e423;};return a103_0x4cfc();}export function buildMetadata(_0x2e1289,_0x58635b,_0x550cf4,_0x5bb463,_0x378cd7,_0x30ebe9,_0x1d3d83){const _0x16bc1b=a103_0x56df,_0x474c0f=_0x30ebe9?normalizeLocalFiles(_0x30ebe9):[],_0x3469b2=!_0x1d3d83&&_0x474c0f[_0x16bc1b(0x11e)]>0x0?buildSkillPackage(_0x474c0f):undefined,_0x57cdee=_0x1d3d83?bufferSha256(_0x1d3d83):_0x3469b2?.[_0x16bc1b(0x121)]['zipSha256'],_0x5f141c=_0x1d3d83?.[_0x16bc1b(0x11e)]??_0x3469b2?.[_0x16bc1b(0x121)][_0x16bc1b(0x12b)],_0x2a4b33=_0x474c0f[_0x16bc1b(0x11e)]>0x0?Object[_0x16bc1b(0x125)](_0x474c0f[_0x16bc1b(0x122)](_0x10d32f=>[_0x10d32f['path'],fileHash(_0x10d32f)])):undefined;return{'schemaVersion':_0x474c0f[_0x16bc1b(0x11e)]>0x0?0x2:0x1,'id':_0x2e1289['id'],'appCode':_0x550cf4,'skillCode':requireSkillCode(_0x2e1289),'skillName':_0x2e1289[_0x16bc1b(0x114)],'description':_0x2e1289['description'],'scope':_0x58635b,'readonly':_0x58635b!=='personal'||_0x2e1289[_0x16bc1b(0x124)]===!![],'tenantCode':_0x2e1289['tenantCode'],'userId':_0x2e1289[_0x16bc1b(0x119)],'version':_0x2e1289[_0x16bc1b(0x12a)],'status':_0x2e1289[_0x16bc1b(0x12d)],'tags':Array[_0x16bc1b(0x12e)](_0x2e1289[_0x16bc1b(0x11f)])?_0x2e1289['tags']:[],'hasUpstreamUpdate':_0x2e1289['hasUpstreamUpdate'],'forkedFromSkillId':_0x2e1289[_0x16bc1b(0x130)],'forkedFromVersion':_0x2e1289[_0x16bc1b(0x11d)],'sourceSessionId':_0x2e1289['sourceSessionId'],'contentHash':_0x5bb463,'fileHashes':_0x2a4b33,'treeHash':_0x474c0f[_0x16bc1b(0x11e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x474c0f)):undefined,'ossPath':remoteManifestOssPath(_0x2e1289['files']),'zipSha256':_0x57cdee,'zipSize':_0x5f141c,'files':_0x474c0f[_0x16bc1b(0x11e)]>0x0?_0x474c0f[_0x16bc1b(0x122)](_0x4c7493=>({'path':_0x4c7493[_0x16bc1b(0x118)],'hash':fileHash(_0x4c7493),'size':fileContent(_0x4c7493)[_0x16bc1b(0x11e)]})):undefined,'pulledAt':_0x378cd7??new Date()['toISOString']()};}export function requireSkillCode(_0x3f8c88){const _0x4ba19c=a103_0x56df,_0x5719c7=_0x3f8c88[_0x4ba19c(0x11b)]?.[_0x4ba19c(0x128)]();if(!_0x5719c7)throw CliErrors[_0x4ba19c(0x115)](_0x4ba19c(0x11a));return _0x5719c7;}export function readMetadataIfPresent(_0x16c7d4){const _0x48c58f=a103_0x56df;if(!existsSync(_0x16c7d4))return undefined;try{const _0x1a5252=JSON[_0x48c58f(0x116)](readFileSync(_0x16c7d4,_0x48c58f(0x131)));return _0x1a5252;}catch{throw CliErrors[_0x48c58f(0x115)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x16c7d4);}}function remoteManifestOssPath(_0x1eb84f){const _0x57090c=a103_0x56df;if(!_0x1eb84f||typeof _0x1eb84f!==_0x57090c(0x126)||Array['isArray'](_0x1eb84f))return undefined;const _0x5dc240=_0x1eb84f['ossPath'];return typeof _0x5dc240===_0x57090c(0x117)&&_0x5dc240[_0x57090c(0x128)]()?_0x5dc240['trim']():undefined;}
1
+ function a103_0x16ea(_0x1bff8d,_0x4e7b7b){_0x1bff8d=_0x1bff8d-0xcc;const _0x356c77=a103_0x356c();let _0x16eaa1=_0x356c77[_0x1bff8d];return _0x16eaa1;}(function(_0x13d26c,_0x5b67b6){const _0x34d19a=a103_0x16ea,_0xc838b2=_0x13d26c();while(!![]){try{const _0x48a2e2=-parseInt(_0x34d19a(0xd1))/0x1+parseInt(_0x34d19a(0xdf))/0x2*(parseInt(_0x34d19a(0xce))/0x3)+-parseInt(_0x34d19a(0xf0))/0x4+-parseInt(_0x34d19a(0xf1))/0x5+-parseInt(_0x34d19a(0xd8))/0x6*(parseInt(_0x34d19a(0xea))/0x7)+parseInt(_0x34d19a(0xee))/0x8+parseInt(_0x34d19a(0xe4))/0x9;if(_0x48a2e2===_0x5b67b6)break;else _0xc838b2['push'](_0xc838b2['shift']());}catch(_0x4db4c0){_0xc838b2['push'](_0xc838b2['shift']());}}}(a103_0x356c,0x20f05));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a103_0x356c(){const _0x3c8097=['forkedFromSkillId','validation','files','1332408IsBmrx','parse','828200qgIktQ','1132095wtcUga','Runtime\x20Skill\x20is\x20missing\x20skillCode.','sourceSessionId','description','utf8','363PhhPTR','skillName','length','181273nlyheX','tags','Invalid\x20','toISOString','tenantCode','zipSize','trim','6ENwxPy','ossPath','userId','hasUpstreamUpdate','forkedFromVersion','readonly','personal','1534GqzwfY','path','fromEntries','version','manifest','4616226AcggCG','object','status','map','isArray','string','158291xWUHzE'];a103_0x356c=function(){return _0x3c8097;};return a103_0x356c();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x42c273,_0x4cc061,_0x17c439,_0x489019,_0x1885dd,_0x316d3a,_0x5e95e0){const _0x2ee36d=a103_0x16ea,_0x541650=_0x316d3a?normalizeLocalFiles(_0x316d3a):[],_0x422893=!_0x5e95e0&&_0x541650[_0x2ee36d(0xd0)]>0x0?buildSkillPackage(_0x541650):undefined,_0x580b2e=_0x5e95e0?bufferSha256(_0x5e95e0):_0x422893?.[_0x2ee36d(0xe3)]['zipSha256'],_0x390534=_0x5e95e0?.[_0x2ee36d(0xd0)]??_0x422893?.[_0x2ee36d(0xe3)][_0x2ee36d(0xd6)],_0xbfc96=_0x541650[_0x2ee36d(0xd0)]>0x0?Object[_0x2ee36d(0xe1)](_0x541650[_0x2ee36d(0xe7)](_0x21dfa9=>[_0x21dfa9['path'],fileHash(_0x21dfa9)])):undefined;return{'schemaVersion':_0x541650[_0x2ee36d(0xd0)]>0x0?0x2:0x1,'id':_0x42c273['id'],'appCode':_0x17c439,'skillCode':requireSkillCode(_0x42c273),'skillName':_0x42c273[_0x2ee36d(0xcf)],'description':_0x42c273[_0x2ee36d(0xcc)],'scope':_0x4cc061,'readonly':_0x4cc061!==_0x2ee36d(0xde)||_0x42c273[_0x2ee36d(0xdd)]===!![],'tenantCode':_0x42c273[_0x2ee36d(0xd5)],'userId':_0x42c273[_0x2ee36d(0xda)],'version':_0x42c273[_0x2ee36d(0xe2)],'status':_0x42c273[_0x2ee36d(0xe6)],'tags':Array[_0x2ee36d(0xe8)](_0x42c273[_0x2ee36d(0xd2)])?_0x42c273[_0x2ee36d(0xd2)]:[],'hasUpstreamUpdate':_0x42c273[_0x2ee36d(0xdb)],'forkedFromSkillId':_0x42c273[_0x2ee36d(0xeb)],'forkedFromVersion':_0x42c273[_0x2ee36d(0xdc)],'sourceSessionId':_0x42c273[_0x2ee36d(0xf3)],'contentHash':_0x489019,'fileHashes':_0xbfc96,'treeHash':_0x541650[_0x2ee36d(0xd0)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x541650)):undefined,'ossPath':remoteManifestOssPath(_0x42c273[_0x2ee36d(0xed)]),'zipSha256':_0x580b2e,'zipSize':_0x390534,'files':_0x541650[_0x2ee36d(0xd0)]>0x0?_0x541650[_0x2ee36d(0xe7)](_0x124cde=>({'path':_0x124cde[_0x2ee36d(0xe0)],'hash':fileHash(_0x124cde),'size':fileContent(_0x124cde)['length']})):undefined,'pulledAt':_0x1885dd??new Date()[_0x2ee36d(0xd4)]()};}export function requireSkillCode(_0x585daf){const _0x5b0a6e=a103_0x16ea,_0x26e9f7=_0x585daf['skillCode']?.[_0x5b0a6e(0xd7)]();if(!_0x26e9f7)throw CliErrors[_0x5b0a6e(0xec)](_0x5b0a6e(0xf2));return _0x26e9f7;}export function readMetadataIfPresent(_0x467f96){const _0x4d5e1f=a103_0x16ea;if(!existsSync(_0x467f96))return undefined;try{const _0x20cb03=JSON[_0x4d5e1f(0xef)](readFileSync(_0x467f96,_0x4d5e1f(0xcd)));return _0x20cb03;}catch{throw CliErrors[_0x4d5e1f(0xec)](_0x4d5e1f(0xd3)+METADATA_FILE+':\x20'+_0x467f96);}}function remoteManifestOssPath(_0x6e7ebc){const _0xbff598=a103_0x16ea;if(!_0x6e7ebc||typeof _0x6e7ebc!==_0xbff598(0xe5)||Array[_0xbff598(0xe8)](_0x6e7ebc))return undefined;const _0x568dd2=_0x6e7ebc[_0xbff598(0xd9)];return typeof _0x568dd2===_0xbff598(0xe9)&&_0x568dd2['trim']()?_0x568dd2[_0xbff598(0xd7)]():undefined;}
@@ -1 +1 @@
1
- const a104_0x34a4ba=a104_0x5493;(function(_0x2a6895,_0xe054b7){const _0x348267=a104_0x5493,_0x2f08cd=_0x2a6895();while(!![]){try{const _0x2e857c=-parseInt(_0x348267(0x15b))/0x1*(parseInt(_0x348267(0x16f))/0x2)+parseInt(_0x348267(0x172))/0x3*(-parseInt(_0x348267(0x16e))/0x4)+parseInt(_0x348267(0x170))/0x5+parseInt(_0x348267(0x16b))/0x6+parseInt(_0x348267(0x165))/0x7*(-parseInt(_0x348267(0x169))/0x8)+parseInt(_0x348267(0x15a))/0x9+-parseInt(_0x348267(0x16a))/0xa*(-parseInt(_0x348267(0x166))/0xb);if(_0x2e857c===_0xe054b7)break;else _0x2f08cd['push'](_0x2f08cd['shift']());}catch(_0x3d4e01){_0x2f08cd['push'](_0x2f08cd['shift']());}}}(a104_0x5aa8,0x2a600));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3e96d7={}){const _0x418a6e=a104_0x5493,_0x4546b3=_0x3e96d7[_0x418a6e(0x16d)]??homedir(),_0x102b05=resolve(_0x4546b3,PRODUCT_CONFIG[_0x418a6e(0x160)],_0x418a6e(0x167)),_0x381407=trimmedEnv(_0x418a6e(0x168)),_0x289f66=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x54cc39=resolve(_0x4546b3,_0x418a6e(0x162)),_0x526758=_0x3e96d7[_0x418a6e(0x15f)]??(existsSync(_0x54cc39)?resolve(_0x54cc39,'skills'):undefined);return{'homeDir':_0x4546b3,'cacheRoot':_0x102b05,'managedRoot':resolve(_0x4546b3,PRODUCT_CONFIG[_0x418a6e(0x160)]),'agentsSkillsDir':_0x3e96d7[_0x418a6e(0x15c)]??_0x381407??resolve(_0x4546b3,_0x418a6e(0x164),_0x418a6e(0x158)),'claudeSkillsDir':_0x3e96d7['claudeSkillsDir']??_0x289f66??resolve(_0x4546b3,_0x418a6e(0x171),'skills'),'workbuddySkillsDir':_0x526758};}export function runtimeAgentSkillRoots(_0x368123){const _0x1afd14=a104_0x5493;return[_0x368123[_0x1afd14(0x15c)],_0x368123[_0x1afd14(0x174)],_0x368123[_0x1afd14(0x15f)]][_0x1afd14(0x163)](_0x20ddb0=>Boolean(_0x20ddb0));}export function getRuntimeSkillCacheRoot(_0x3df5a8,_0x1790c7,_0xf908ab={}){const _0x39fcd2=a104_0x5493,_0x473e07=resolveSkillSyncPaths(_0xf908ab);return resolve(_0x473e07['cacheRoot'],_0x3df5a8,fingerprintAccessKey(_0x1790c7),_0x39fcd2(0x158));}export function getRuntimeSkillDir(_0xd9e255,_0x3e4957,_0x327317,_0x391828,_0x350506,_0x55d1c6={}){const _0x5050bd=a104_0x5493;return resolve(getRuntimeSkillCacheRoot(_0xd9e255,_0x3e4957,_0x55d1c6),safePathSegment(_0x327317,_0x5050bd(0x173)),_0x391828,safePathSegment(_0x350506,_0x5050bd(0x15d)));}function a104_0x5493(_0x2ce77b,_0x339408){_0x2ce77b=_0x2ce77b-0x158;const _0x5aa8eb=a104_0x5aa8();let _0x549334=_0x5aa8eb[_0x2ce77b];return _0x549334;}export function safePathSegment(_0x242679,_0x305023=a104_0x34a4ba(0x159)){const _0x57bffc=a104_0x34a4ba;if(!_0x242679||_0x242679['includes']('/')||_0x242679['includes']('\x5c')||_0x242679['includes']('..'))throw CliErrors['validation'](_0x57bffc(0x15e)+_0x305023+_0x57bffc(0x16c)+_0x242679);return _0x242679;}function a104_0x5aa8(){const _0x9501c9=['claudeSkillsDir','skills','path\x20segment','2093571fwTmsE','148247lmKDer','agentsSkillsDir','skillCode','Unsafe\x20','workbuddySkillsDir','homeDirName','trim','.workbuddy','filter','.agents','77eZOBTk','3047fwzefm','cache','SKILL_ROOT','85672mcnORs','11180sCATSH','677364BkkMOU','\x20for\x20local\x20path:\x20','homeDir','20484ERmWti','2nOoOsV','637610kBfoNV','.claude','201GevwsF','appCode'];a104_0x5aa8=function(){return _0x9501c9;};return a104_0x5aa8();}function trimmedEnv(_0x33a447){const _0x37b5d5=a104_0x34a4ba,_0x2ce88e=productEnv(_0x33a447)?.[_0x37b5d5(0x161)]();return _0x2ce88e?_0x2ce88e:undefined;}
1
+ (function(_0x56b5d7,_0xca1d80){const _0x5db007=a104_0x16f1,_0x582e25=_0x56b5d7();while(!![]){try{const _0xa70035=-parseInt(_0x5db007(0x168))/0x1+parseInt(_0x5db007(0x172))/0x2*(parseInt(_0x5db007(0x16a))/0x3)+-parseInt(_0x5db007(0x164))/0x4+parseInt(_0x5db007(0x160))/0x5+parseInt(_0x5db007(0x157))/0x6*(-parseInt(_0x5db007(0x166))/0x7)+parseInt(_0x5db007(0x15b))/0x8+parseInt(_0x5db007(0x165))/0x9*(parseInt(_0x5db007(0x156))/0xa);if(_0xa70035===_0xca1d80)break;else _0x582e25['push'](_0x582e25['shift']());}catch(_0xdeecb7){_0x582e25['push'](_0x582e25['shift']());}}}(a104_0x55d5,0x6adc2));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xe8c678={}){const _0x2ac17d=a104_0x16f1,_0xe4d493=_0xe8c678[_0x2ac17d(0x16e)]??homedir(),_0x2275c3=resolve(_0xe4d493,PRODUCT_CONFIG[_0x2ac17d(0x15c)],_0x2ac17d(0x16f)),_0x572bc7=trimmedEnv(_0x2ac17d(0x16c)),_0x29e1ba=trimmedEnv(_0x2ac17d(0x15f)),_0x2b72ad=resolve(_0xe4d493,_0x2ac17d(0x171)),_0x56cf43=_0xe8c678[_0x2ac17d(0x159)]??(existsSync(_0x2b72ad)?resolve(_0x2b72ad,_0x2ac17d(0x163)):undefined);return{'homeDir':_0xe4d493,'cacheRoot':_0x2275c3,'managedRoot':resolve(_0xe4d493,PRODUCT_CONFIG[_0x2ac17d(0x15c)]),'agentsSkillsDir':_0xe8c678[_0x2ac17d(0x15e)]??_0x572bc7??resolve(_0xe4d493,_0x2ac17d(0x161),_0x2ac17d(0x163)),'claudeSkillsDir':_0xe8c678['claudeSkillsDir']??_0x29e1ba??resolve(_0xe4d493,_0x2ac17d(0x167),'skills'),'workbuddySkillsDir':_0x56cf43};}function a104_0x55d5(){const _0xb93e82=['.workbuddy','18332QYpqrb','\x20for\x20local\x20path:\x20','10OKNpzx','2538cSAKua','trim','workbuddySkillsDir','filter','5850680YwqPgo','homeDirName','cacheRoot','agentsSkillsDir','CLAUDE_SKILL_ROOT','944310crBems','.agents','appCode','skills','2418200VxPSVA','16164NfXpyA','3409ZippRZ','.claude','425356zmRUtx','Unsafe\x20','246BFQBDj','skillCode','SKILL_ROOT','includes','homeDir','cache','validation'];a104_0x55d5=function(){return _0xb93e82;};return a104_0x55d5();}export function runtimeAgentSkillRoots(_0x37affe){const _0x2a26f7=a104_0x16f1;return[_0x37affe[_0x2a26f7(0x15e)],_0x37affe['claudeSkillsDir'],_0x37affe[_0x2a26f7(0x159)]][_0x2a26f7(0x15a)](_0x1cf17e=>Boolean(_0x1cf17e));}export function getRuntimeSkillCacheRoot(_0x5c7b63,_0x26021d,_0x46c727={}){const _0x2fced4=a104_0x16f1,_0xf5bcdd=resolveSkillSyncPaths(_0x46c727);return resolve(_0xf5bcdd[_0x2fced4(0x15d)],_0x5c7b63,fingerprintAccessKey(_0x26021d),_0x2fced4(0x163));}export function getRuntimeSkillDir(_0x3c757d,_0x503c7b,_0x5aa63d,_0x54fd24,_0x2f2f7e,_0x6ad67e={}){const _0x2b62eb=a104_0x16f1;return resolve(getRuntimeSkillCacheRoot(_0x3c757d,_0x503c7b,_0x6ad67e),safePathSegment(_0x5aa63d,_0x2b62eb(0x162)),_0x54fd24,safePathSegment(_0x2f2f7e,_0x2b62eb(0x16b)));}function a104_0x16f1(_0x4ad3a9,_0xd04164){_0x4ad3a9=_0x4ad3a9-0x155;const _0x55d5a9=a104_0x55d5();let _0x16f113=_0x55d5a9[_0x4ad3a9];return _0x16f113;}export function safePathSegment(_0x3ea279,_0x6ee4a7='path\x20segment'){const _0x56cdf5=a104_0x16f1;if(!_0x3ea279||_0x3ea279['includes']('/')||_0x3ea279['includes']('\x5c')||_0x3ea279[_0x56cdf5(0x16d)]('..'))throw CliErrors[_0x56cdf5(0x170)](_0x56cdf5(0x169)+_0x6ee4a7+_0x56cdf5(0x155)+_0x3ea279);return _0x3ea279;}function trimmedEnv(_0x284734){const _0x581e23=a104_0x16f1,_0x56efa2=productEnv(_0x284734)?.[_0x581e23(0x158)]();return _0x56efa2?_0x56efa2:undefined;}
@@ -1 +1 @@
1
- (function(_0x80087a,_0x26528f){const _0x3bed59=a105_0xc75b,_0x535968=_0x80087a();while(!![]){try{const _0x2033bc=-parseInt(_0x3bed59(0x86))/0x1*(-parseInt(_0x3bed59(0xaa))/0x2)+parseInt(_0x3bed59(0x8a))/0x3*(-parseInt(_0x3bed59(0x9c))/0x4)+parseInt(_0x3bed59(0x81))/0x5*(parseInt(_0x3bed59(0xb5))/0x6)+parseInt(_0x3bed59(0xa1))/0x7*(parseInt(_0x3bed59(0x95))/0x8)+-parseInt(_0x3bed59(0x83))/0x9*(parseInt(_0x3bed59(0x97))/0xa)+parseInt(_0x3bed59(0x93))/0xb+parseInt(_0x3bed59(0x91))/0xc;if(_0x2033bc===_0x26528f)break;else _0x535968['push'](_0x535968['shift']());}catch(_0x7d174f){_0x535968['push'](_0x535968['shift']());}}}(a105_0x534f,0xc7486));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x2bf12b}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';function a105_0xc75b(_0x28426c,_0x34cfe9){_0x28426c=_0x28426c-0x76;const _0x534f19=a105_0x534f();let _0xc75b12=_0x534f19[_0x28426c];return _0xc75b12;}import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x592c30,_0x49c755,_0x5c4692={}){const _0x505e24=a105_0xc75b,_0x270dbd=resolvePushDirectoryRoot(_0x592c30),_0x14415b=readPushMetadataIfPresent(resolve(_0x270dbd,METADATA_FILE),{'ignoreInvalidMetadata':_0x5c4692[_0x505e24(0xac)]});if(_0x14415b?.['appCode']&&_0x14415b[_0x505e24(0x85)]!==_0x49c755&&!_0x5c4692[_0x505e24(0x7d)]&&!_0x5c4692[_0x505e24(0xa2)])throw CliErrors[_0x505e24(0xb0)]('Skill\x20metadata\x20appCode\x20\x22'+_0x14415b['appCode']+_0x505e24(0x78)+_0x49c755+'\x22.');const _0x4c97c6=resolvePushSkillCode(_0x270dbd,_0x49c755,_0x14415b,_0x5c4692);if(!_0x4c97c6)throw CliErrors[_0x505e24(0xb0)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x270dbd,'skillCode':_0x4c97c6,'metadata':_0x14415b};}function a105_0x534f(){const _0x2bc112=['manifest','appCode','1062yxYnaJ','builtin','object','filter','6HFyrBz','string','Invalid\x20','skillCode','ignoreMetadataForPayload','unknown','isArray','3534312fmJYuN','utf8','5221557xVBYnu','scope','5368GQENGH','targetScope','13110VVVwEF','path','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','isDirectory','\x20name\x20for\x20SkillHub\x20slug\x20generation.','2752508dMmvWc','skillName','toLowerCase','replace','number','987ODUHnY','ignoreMetadataAppCodeMismatch','personal','metadata','ignoreMetadataScope','Remote\x20Skill\x20','startsWith','description','find','2606FZUVSg','files','ignoreInvalidMetadata','length','refreshedAt','packageBase64','validation','(unknown)','content','tags','some','6aTkOqR','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','ignoreMetadataSkillCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','trim','sourceSessionId','\x20has\x20unsupported\x20scope\x20\x22','\x20has\x20scope=\x22','allowAppCodeRetarget','displayName','match','isSymbolicLink','1055195JQdzSi','isFile','1827gvXHOH'];a105_0x534f=function(){return _0x2bc112;};return a105_0x534f();}export function readPushDirectory(_0x46cb07,_0x13d06a,_0x25c98a={}){const _0x3a2cc6=a105_0xc75b,_0x2f7c94=resolvePushDirectoryIdentity(_0x46cb07,_0x13d06a,_0x25c98a),_0x172a17=_0x2f7c94['dir'],_0xf50819=resolve(_0x172a17,SKILL_FILE);if(!existsSync(_0xf50819)||!lstatSync(_0xf50819)['isFile']())throw CliErrors[_0x3a2cc6(0xb0)]('Missing\x20'+SKILL_FILE+':\x20'+_0xf50819);const _0x3bfcaf=_0x2f7c94[_0x3a2cc6(0xa4)],_0x1f092e=_0x25c98a[_0x3a2cc6(0x96)]??'personal';if(!_0x25c98a[_0x3a2cc6(0xa5)]&&_0x3bfcaf?.['scope']===_0x3a2cc6(0x87))throw CliErrors['validation'](_0x3a2cc6(0xb6)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x3bfcaf[_0x3a2cc6(0x94)]+'\x22.');if(!_0x25c98a[_0x3a2cc6(0xa5)]&&_0x1f092e===_0x3a2cc6(0xa3)&&_0x3bfcaf?.[_0x3a2cc6(0x94)]&&_0x3bfcaf[_0x3a2cc6(0x94)]!==_0x3a2cc6(0xa3))throw CliErrors['validation'](_0x3a2cc6(0x77)+METADATA_FILE+_0x3a2cc6(0x7c)+_0x3bfcaf[_0x3a2cc6(0x94)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x172a17+_0x3a2cc6(0x99));const _0x2c5bf8=scanSkillDirectory(_0x172a17),_0x3dd6b8=buildSkillPackage(_0x2c5bf8),_0x93168c=readFileSync(_0xf50819,_0x3a2cc6(0x92)),_0x2a9182=_0x2f7c94['skillCode'],_0x41164b=_0x25c98a[_0x3a2cc6(0x8e)]?undefined:_0x3bfcaf,_0x439e94=readSkillDisplayName(_0x93168c);return{'skillCode':_0x2a9182,'metadata':_0x3bfcaf,'frontmatterDisplayName':_0x439e94,'input':{'skillCode':_0x2a9182,'skillName':_0x439e94??_0x41164b?.['skillName'],'description':_0x41164b?.[_0x3a2cc6(0xa8)],'content':_0x93168c,'files':_0x3dd6b8[_0x3a2cc6(0x84)],'packageBase64':_0x3dd6b8[_0x3a2cc6(0xaf)],'tags':_0x41164b?.['tags'],'version':_0x41164b?.['version'],'sourceSessionId':_0x41164b?.[_0x3a2cc6(0x7a)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x31cdfa,_0x36523d,_0x3f115d,_0x3752d3={}){const _0x10fa2c=a105_0xc75b,_0x3c076a=resolvePushDirectoryRoot(_0x31cdfa),_0x1cebf5=readPushMetadataIfPresent(resolve(_0x3c076a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2d7d43=requireRemoteScope(_0x36523d),_0x2014ca=readLocalSkillContent(_0x3c076a),_0x587fda={..._0x36523d,'appCode':_0x36523d['appCode']??_0x3f115d,'skillName':_0x36523d['skillName']??_0x1cebf5?.[_0x10fa2c(0x9d)],'description':_0x36523d[_0x10fa2c(0xa8)]??_0x1cebf5?.[_0x10fa2c(0xa8)],'tags':Array[_0x10fa2c(0x90)](_0x36523d[_0x10fa2c(0xb3)])?_0x36523d[_0x10fa2c(0xb3)]:_0x1cebf5?.['tags'],'sourceSessionId':_0x36523d[_0x10fa2c(0x7a)]??_0x1cebf5?.[_0x10fa2c(0x7a)],'content':_0x36523d['content']??_0x2014ca},_0x17c929=buildMetadata(_0x587fda,_0x2d7d43,_0x3f115d,contentHash(_0x2014ca),_0x3752d3[_0x10fa2c(0xae)]);writeJsonAtomic(resolve(_0x3c076a,METADATA_FILE),_0x17c929);}export function recordPushedRuntimeSkill(_0x178c9e,_0xe9e93b,_0x588d25,_0xef662a={}){const _0xcb91d1=a105_0xc75b,_0x245af2=resolvePushDirectoryRoot(_0x178c9e),_0x140528=scanSkillDirectory(_0x245af2),_0x25d785=_0x140528[_0xcb91d1(0xa9)](_0x55b797=>_0x55b797[_0xcb91d1(0x98)]===SKILL_FILE),_0xd8da3f=_0x25d785?fileText(_0x25d785):'',_0x59b919=tryNormalizePackageManifest(_0xe9e93b[_0xcb91d1(0xab)]),_0x19db62={..._0xe9e93b,'content':_0xe9e93b['content']??_0xd8da3f,'files':_0x59b919},_0x4e0bcd=_0x59b919?normalizeLocalFiles(_0x140528)[_0xcb91d1(0x89)](_0x344eb8=>_0x59b919[_0xcb91d1(0xab)][_0xcb91d1(0xb4)](_0x11668c=>_0x11668c[_0xcb91d1(0x98)]===_0x344eb8['path'])):undefined,_0x3b65be=buildMetadata(_0x19db62,_0xef662a[_0xcb91d1(0x94)]??_0xcb91d1(0xa3),_0x588d25,contentHash(_0x19db62[_0xcb91d1(0xb2)]??''),_0xef662a['pushedAt'],_0x4e0bcd);writeJsonAtomic(resolve(_0x245af2,METADATA_FILE),_0x3b65be);}export function deriveSkillCodeFromDirectory(_0x13d8fd,_0x291a74){const _0x493c54=a105_0xc75b,_0x28e358=basename(resolve(_0x13d8fd)),_0x55d932=_0x291a74+'--';return _0x28e358[_0x493c54(0xa7)](_0x55d932)?_0x28e358['slice'](_0x55d932[_0x493c54(0xad)]):_0x28e358;}function resolvePushSkillCode(_0x5d91e7,_0xef89f6,_0x57d16b,_0x4d62d9){const _0x15e8ab=a105_0xc75b,_0x3bbed2=deriveSkillCodeFromSkillFile(_0x5d91e7)||deriveSkillCodeFromDirectory(_0x5d91e7,_0xef89f6);if(_0x4d62d9[_0x15e8ab(0x76)])return _0x3bbed2;return _0x57d16b?.[_0x15e8ab(0x8d)]?.[_0x15e8ab(0x79)]()||_0x3bbed2;}function deriveSkillCodeFromSkillFile(_0x4e10cc){const _0x20dce1=a105_0xc75b,_0x34a7c9=resolve(_0x4e10cc,SKILL_FILE);if(!existsSync(_0x34a7c9)||!lstatSync(_0x34a7c9)[_0x20dce1(0x82)]())return undefined;const _0x4ae8e3=readFileSync(_0x34a7c9,_0x20dce1(0x92)),_0x5216e7=_0x4ae8e3[_0x20dce1(0x7f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5216e7)return undefined;const _0x589aa4=parseFrontmatterObject(_0x5216e7[0x1]??''),_0x422f14=scalarToString(_0x589aa4?.['name']);return _0x422f14?slugifySkillName(_0x422f14):undefined;}function readSkillDisplayName(_0x4f828e){const _0x3eb6c4=a105_0xc75b,_0x22d252=_0x4f828e[_0x3eb6c4(0x7f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x22d252)return undefined;const _0x54118d=parseFrontmatterObject(_0x22d252[0x1]??'');return scalarToString(_0x54118d?.[_0x3eb6c4(0x7e)]);}function slugifySkillName(_0x3ea9b2){const _0x4b9ed9=a105_0xc75b,_0x550c0e=_0x3ea9b2[_0x4b9ed9(0x79)]()[_0x4b9ed9(0x9e)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4b9ed9(0x9f)](/^-+/,'')['replace'](/-+$/,'')[_0x4b9ed9(0x9f)](/-{2,}/g,'-');if(!_0x550c0e)throw CliErrors[_0x4b9ed9(0xb0)](_0x4b9ed9(0x8c)+SKILL_FILE+_0x4b9ed9(0x9b));return _0x550c0e;}function parseFrontmatterObject(_0x463811){const _0x4b012f=a105_0xc75b;try{const _0x18e066=a105_0x2bf12b(_0x463811);return _0x18e066&&typeof _0x18e066===_0x4b012f(0x88)&&!Array[_0x4b012f(0x90)](_0x18e066)?_0x18e066:undefined;}catch{return undefined;}}function scalarToString(_0x126c2c){const _0x5a8cc2=a105_0xc75b;if(typeof _0x126c2c===_0x5a8cc2(0x8b))return _0x126c2c[_0x5a8cc2(0x79)]();if(typeof _0x126c2c===_0x5a8cc2(0xa0)||typeof _0x126c2c==='boolean')return String(_0x126c2c);return undefined;}function resolvePushDirectoryRoot(_0x477a34){const _0x21c176=a105_0xc75b,_0x100ea7=resolve(_0x477a34);if(!existsSync(_0x100ea7))throw CliErrors[_0x21c176(0xb0)]('Skill\x20directory\x20not\x20found:\x20'+_0x477a34);const _0x5a413c=lstatSync(_0x100ea7);if(_0x5a413c[_0x21c176(0x9a)]())return _0x100ea7;if(_0x5a413c[_0x21c176(0x80)]()){const _0x1f1c4e=realpathSync(_0x100ea7);if(lstatSync(_0x1f1c4e)[_0x21c176(0x9a)]())return _0x1f1c4e;}throw CliErrors[_0x21c176(0xb0)]('Skill\x20directory\x20not\x20found:\x20'+_0x477a34);}function requireRemoteScope(_0x77ed91){const _0x3c21aa=a105_0xc75b;if(_0x77ed91[_0x3c21aa(0x94)]==='personal'||_0x77ed91[_0x3c21aa(0x94)]==='company'||_0x77ed91[_0x3c21aa(0x94)]==='builtin')return _0x77ed91[_0x3c21aa(0x94)];throw CliErrors[_0x3c21aa(0xb0)](_0x3c21aa(0xa6)+(_0x77ed91[_0x3c21aa(0x8d)]||_0x3c21aa(0xb1))+_0x3c21aa(0x7b)+(_0x77ed91[_0x3c21aa(0x94)]??_0x3c21aa(0x8f))+'\x22.');}function readLocalSkillContent(_0xfac28d){const _0x171ec6=a105_0xc75b,_0x3648ec=resolve(_0xfac28d,SKILL_FILE);return existsSync(_0x3648ec)&&lstatSync(_0x3648ec)[_0x171ec6(0x82)]()?readFileSync(_0x3648ec,_0x171ec6(0x92)):'';}function readPushMetadataIfPresent(_0x1ab3ea,_0x5dc8d9={}){const _0x1e827c=a105_0xc75b;try{return readMetadataIfPresent(_0x1ab3ea);}catch(_0x2feb5d){if(_0x5dc8d9[_0x1e827c(0xac)])return undefined;throw _0x2feb5d;}}
1
+ (function(_0x3dcf71,_0x430001){const _0x55639b=a105_0x54ce,_0x315b12=_0x3dcf71();while(!![]){try{const _0x18fced=parseInt(_0x55639b(0x1ff))/0x1*(parseInt(_0x55639b(0x1df))/0x2)+-parseInt(_0x55639b(0x1e5))/0x3*(parseInt(_0x55639b(0x1d7))/0x4)+parseInt(_0x55639b(0x20b))/0x5*(-parseInt(_0x55639b(0x212))/0x6)+-parseInt(_0x55639b(0x217))/0x7*(parseInt(_0x55639b(0x1f3))/0x8)+-parseInt(_0x55639b(0x20c))/0x9*(parseInt(_0x55639b(0x1e9))/0xa)+-parseInt(_0x55639b(0x203))/0xb*(parseInt(_0x55639b(0x1d6))/0xc)+parseInt(_0x55639b(0x207))/0xd;if(_0x18fced===_0x430001)break;else _0x315b12['push'](_0x315b12['shift']());}catch(_0xb7d90f){_0x315b12['push'](_0x315b12['shift']());}}}(a105_0x537a,0xc7fb3));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x3ce407}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a105_0x54ce(_0xc3a10a,_0x1965b3){_0xc3a10a=_0xc3a10a-0x1d5;const _0x537a29=a105_0x537a();let _0x54ce54=_0x537a29[_0xc3a10a];return _0x54ce54;}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';function a105_0x537a(){const _0x1ba536=['isArray','Skill\x20metadata\x20appCode\x20\x22','95boSeap','3279339oLTjpb','builtin','version','match','ignoreMetadataAppCodeMismatch','dir','251292aHZxCM','replace','allowAppCodeRetarget','ignoreMetadataSkillCode','trim','235970oOtlGy','tags','path','number','24zEWrIh','48WTNXcr','unknown','Invalid\x20','personal','validation','files','ignoreMetadataForPayload','ignoreMetadataScope','4wsflJx','boolean','\x20name\x20for\x20SkillHub\x20slug\x20generation.','Skill\x20directory\x20not\x20found:\x20','content','description','185787pQracS','isSymbolicLink','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','refreshedAt','20waPYXz','manifest','displayName','Missing\x20','skillName','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','company',',\x20or\x20directory\x20name.','appCode','Unable\x20to\x20resolve\x20skillCode\x20from\x20','184RtGoJB','(unknown)','isDirectory','targetScope','ignoreInvalidMetadata','pushedAt','sourceSessionId','packageBase64','isFile','skillCode','Remote\x20Skill\x20','\x20has\x20scope=\x22','421478GqMBsL','utf8','find','some','6849964LrhWVj','name','slice','length','55439709ZOKsfj','scope'];a105_0x537a=function(){return _0x1ba536;};return a105_0x537a();}import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x27ef66,_0x103ada,_0x50930c={}){const _0x5a456e=a105_0x54ce,_0x169d82=resolvePushDirectoryRoot(_0x27ef66),_0x3442df=readPushMetadataIfPresent(resolve(_0x169d82,METADATA_FILE),{'ignoreInvalidMetadata':_0x50930c['ignoreInvalidMetadata']});if(_0x3442df?.[_0x5a456e(0x1f1)]&&_0x3442df['appCode']!==_0x103ada&&!_0x50930c[_0x5a456e(0x214)]&&!_0x50930c[_0x5a456e(0x210)])throw CliErrors['validation'](_0x5a456e(0x20a)+_0x3442df[_0x5a456e(0x1f1)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x103ada+'\x22.');const _0x30eb63=resolvePushSkillCode(_0x169d82,_0x103ada,_0x3442df,_0x50930c);if(!_0x30eb63)throw CliErrors['validation'](_0x5a456e(0x1f2)+SKILL_FILE+',\x20'+METADATA_FILE+_0x5a456e(0x1f0));return{'dir':_0x169d82,'skillCode':_0x30eb63,'metadata':_0x3442df};}export function readPushDirectory(_0x9358b1,_0x5779c3,_0x43b0b5={}){const _0x4384b9=a105_0x54ce,_0x65f757=resolvePushDirectoryIdentity(_0x9358b1,_0x5779c3,_0x43b0b5),_0x301591=_0x65f757[_0x4384b9(0x211)],_0x1fa0e8=resolve(_0x301591,SKILL_FILE);if(!existsSync(_0x1fa0e8)||!lstatSync(_0x1fa0e8)['isFile']())throw CliErrors[_0x4384b9(0x1db)](_0x4384b9(0x1ec)+SKILL_FILE+':\x20'+_0x1fa0e8);const _0x4a1a27=_0x65f757['metadata'],_0x23475f=_0x43b0b5[_0x4384b9(0x1f6)]??_0x4384b9(0x1da);if(!_0x43b0b5[_0x4384b9(0x1de)]&&_0x4a1a27?.['scope']===_0x4384b9(0x20d))throw CliErrors['validation'](_0x4384b9(0x1ee)+METADATA_FILE+_0x4384b9(0x1fe)+_0x4a1a27[_0x4384b9(0x208)]+'\x22.');if(!_0x43b0b5[_0x4384b9(0x1de)]&&_0x23475f===_0x4384b9(0x1da)&&_0x4a1a27?.[_0x4384b9(0x208)]&&_0x4a1a27[_0x4384b9(0x208)]!==_0x4384b9(0x1da))throw CliErrors['validation'](_0x4384b9(0x1e7)+METADATA_FILE+_0x4384b9(0x1fe)+_0x4a1a27[_0x4384b9(0x208)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x301591+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0xb78437=scanSkillDirectory(_0x301591),_0x24c121=buildSkillPackage(_0xb78437),_0x43aafd=readFileSync(_0x1fa0e8,'utf8'),_0x309e3b=_0x65f757[_0x4384b9(0x1fc)],_0x7356da=_0x43b0b5[_0x4384b9(0x1dd)]?undefined:_0x4a1a27,_0x1c8ec4=readSkillDisplayName(_0x43aafd);return{'skillCode':_0x309e3b,'metadata':_0x4a1a27,'frontmatterDisplayName':_0x1c8ec4,'input':{'skillCode':_0x309e3b,'skillName':_0x1c8ec4??_0x7356da?.[_0x4384b9(0x1ed)],'description':_0x7356da?.['description'],'content':_0x43aafd,'files':_0x24c121[_0x4384b9(0x1ea)],'packageBase64':_0x24c121[_0x4384b9(0x1fa)],'tags':_0x7356da?.['tags'],'version':_0x7356da?.[_0x4384b9(0x20e)],'sourceSessionId':_0x7356da?.[_0x4384b9(0x1f9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x23f203,_0x1b0d47,_0x5ce362,_0x43711e={}){const _0x3aa576=a105_0x54ce,_0x16b9bd=resolvePushDirectoryRoot(_0x23f203),_0x57f0fc=readPushMetadataIfPresent(resolve(_0x16b9bd,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x35f8aa=requireRemoteScope(_0x1b0d47),_0x220a69=readLocalSkillContent(_0x16b9bd),_0x138c2b={..._0x1b0d47,'appCode':_0x1b0d47[_0x3aa576(0x1f1)]??_0x5ce362,'skillName':_0x1b0d47[_0x3aa576(0x1ed)]??_0x57f0fc?.['skillName'],'description':_0x1b0d47[_0x3aa576(0x1e4)]??_0x57f0fc?.[_0x3aa576(0x1e4)],'tags':Array['isArray'](_0x1b0d47[_0x3aa576(0x218)])?_0x1b0d47[_0x3aa576(0x218)]:_0x57f0fc?.['tags'],'sourceSessionId':_0x1b0d47['sourceSessionId']??_0x57f0fc?.[_0x3aa576(0x1f9)],'content':_0x1b0d47[_0x3aa576(0x1e3)]??_0x220a69},_0x55cc09=buildMetadata(_0x138c2b,_0x35f8aa,_0x5ce362,contentHash(_0x220a69),_0x43711e[_0x3aa576(0x1e8)]);writeJsonAtomic(resolve(_0x16b9bd,METADATA_FILE),_0x55cc09);}export function recordPushedRuntimeSkill(_0x388cd1,_0x33b9a3,_0x2d9680,_0x432721={}){const _0x51fb2d=a105_0x54ce,_0x58c3aa=resolvePushDirectoryRoot(_0x388cd1),_0x5534c8=scanSkillDirectory(_0x58c3aa),_0x30bbbc=_0x5534c8[_0x51fb2d(0x201)](_0xad195e=>_0xad195e['path']===SKILL_FILE),_0x439aa5=_0x30bbbc?fileText(_0x30bbbc):'',_0x14a67a=tryNormalizePackageManifest(_0x33b9a3[_0x51fb2d(0x1dc)]),_0x56759c={..._0x33b9a3,'content':_0x33b9a3['content']??_0x439aa5,'files':_0x14a67a},_0x2594b4=_0x14a67a?normalizeLocalFiles(_0x5534c8)['filter'](_0x96e241=>_0x14a67a[_0x51fb2d(0x1dc)][_0x51fb2d(0x202)](_0x361079=>_0x361079[_0x51fb2d(0x219)]===_0x96e241[_0x51fb2d(0x219)])):undefined,_0x2bd1bd=buildMetadata(_0x56759c,_0x432721[_0x51fb2d(0x208)]??_0x51fb2d(0x1da),_0x2d9680,contentHash(_0x56759c['content']??''),_0x432721[_0x51fb2d(0x1f8)],_0x2594b4);writeJsonAtomic(resolve(_0x58c3aa,METADATA_FILE),_0x2bd1bd);}export function deriveSkillCodeFromDirectory(_0x4415dd,_0x131acf){const _0x5dca8b=a105_0x54ce,_0x2f5061=basename(resolve(_0x4415dd)),_0x385008=_0x131acf+'--';return _0x2f5061['startsWith'](_0x385008)?_0x2f5061[_0x5dca8b(0x205)](_0x385008[_0x5dca8b(0x206)]):_0x2f5061;}function resolvePushSkillCode(_0x5a1e23,_0x54b21d,_0x58f0f3,_0x348042){const _0x3f1271=a105_0x54ce,_0x2a2b5b=deriveSkillCodeFromSkillFile(_0x5a1e23)||deriveSkillCodeFromDirectory(_0x5a1e23,_0x54b21d);if(_0x348042[_0x3f1271(0x215)])return _0x2a2b5b;return _0x58f0f3?.['skillCode']?.[_0x3f1271(0x216)]()||_0x2a2b5b;}function deriveSkillCodeFromSkillFile(_0x457178){const _0x2a1fd0=a105_0x54ce,_0x44aecb=resolve(_0x457178,SKILL_FILE);if(!existsSync(_0x44aecb)||!lstatSync(_0x44aecb)['isFile']())return undefined;const _0x3f8e67=readFileSync(_0x44aecb,_0x2a1fd0(0x200)),_0x54aa43=_0x3f8e67[_0x2a1fd0(0x20f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x54aa43)return undefined;const _0x47a8da=parseFrontmatterObject(_0x54aa43[0x1]??''),_0x153b50=scalarToString(_0x47a8da?.[_0x2a1fd0(0x204)]);return _0x153b50?slugifySkillName(_0x153b50):undefined;}function readSkillDisplayName(_0x43f173){const _0x557856=a105_0x54ce,_0x4bc817=_0x43f173[_0x557856(0x20f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bc817)return undefined;const _0x1f07f0=parseFrontmatterObject(_0x4bc817[0x1]??'');return scalarToString(_0x1f07f0?.[_0x557856(0x1eb)]);}function slugifySkillName(_0x2ff9df){const _0x1e33c8=a105_0x54ce,_0x528622=_0x2ff9df[_0x1e33c8(0x216)]()['toLowerCase']()[_0x1e33c8(0x213)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x1e33c8(0x213)](/^-+/,'')[_0x1e33c8(0x213)](/-+$/,'')[_0x1e33c8(0x213)](/-{2,}/g,'-');if(!_0x528622)throw CliErrors['validation'](_0x1e33c8(0x1d9)+SKILL_FILE+_0x1e33c8(0x1e1));return _0x528622;}function parseFrontmatterObject(_0x772b5a){const _0x41d7d7=a105_0x54ce;try{const _0x4a8767=a105_0x3ce407(_0x772b5a);return _0x4a8767&&typeof _0x4a8767==='object'&&!Array[_0x41d7d7(0x209)](_0x4a8767)?_0x4a8767:undefined;}catch{return undefined;}}function scalarToString(_0x1cb648){const _0x576413=a105_0x54ce;if(typeof _0x1cb648==='string')return _0x1cb648[_0x576413(0x216)]();if(typeof _0x1cb648===_0x576413(0x1d5)||typeof _0x1cb648===_0x576413(0x1e0))return String(_0x1cb648);return undefined;}function resolvePushDirectoryRoot(_0x9bc099){const _0x49cf98=a105_0x54ce,_0x33f7c9=resolve(_0x9bc099);if(!existsSync(_0x33f7c9))throw CliErrors[_0x49cf98(0x1db)](_0x49cf98(0x1e2)+_0x9bc099);const _0x163feb=lstatSync(_0x33f7c9);if(_0x163feb[_0x49cf98(0x1f5)]())return _0x33f7c9;if(_0x163feb[_0x49cf98(0x1e6)]()){const _0x1638d9=realpathSync(_0x33f7c9);if(lstatSync(_0x1638d9)[_0x49cf98(0x1f5)]())return _0x1638d9;}throw CliErrors['validation'](_0x49cf98(0x1e2)+_0x9bc099);}function requireRemoteScope(_0xb75270){const _0x294541=a105_0x54ce;if(_0xb75270['scope']==='personal'||_0xb75270['scope']===_0x294541(0x1ef)||_0xb75270['scope']==='builtin')return _0xb75270[_0x294541(0x208)];throw CliErrors[_0x294541(0x1db)](_0x294541(0x1fd)+(_0xb75270['skillCode']||_0x294541(0x1f4))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0xb75270[_0x294541(0x208)]??_0x294541(0x1d8))+'\x22.');}function readLocalSkillContent(_0x26f04e){const _0xa2e736=a105_0x54ce,_0x3ff6c0=resolve(_0x26f04e,SKILL_FILE);return existsSync(_0x3ff6c0)&&lstatSync(_0x3ff6c0)[_0xa2e736(0x1fb)]()?readFileSync(_0x3ff6c0,'utf8'):'';}function readPushMetadataIfPresent(_0x418e22,_0x4a719e={}){const _0xd49383=a105_0x54ce;try{return readMetadataIfPresent(_0x418e22);}catch(_0x5f37dc){if(_0x4a719e[_0xd49383(0x1f7)])return undefined;throw _0x5f37dc;}}