@lovrabet/lovrabet-cli 2.1.11-beta.2 → 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 -0
  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(_0x46130f,_0x306fa3){const _0x26a65b=a90_0x31f9,_0x57a25d=_0x46130f();while(!![]){try{const _0x77a88b=parseInt(_0x26a65b(0x111))/0x1*(-parseInt(_0x26a65b(0x11b))/0x2)+-parseInt(_0x26a65b(0x112))/0x3*(-parseInt(_0x26a65b(0x114))/0x4)+-parseInt(_0x26a65b(0x10e))/0x5+parseInt(_0x26a65b(0x10f))/0x6*(parseInt(_0x26a65b(0x115))/0x7)+parseInt(_0x26a65b(0x11d))/0x8*(parseInt(_0x26a65b(0x118))/0x9)+parseInt(_0x26a65b(0x110))/0xa*(parseInt(_0x26a65b(0x116))/0xb)+parseInt(_0x26a65b(0x11a))/0xc*(-parseInt(_0x26a65b(0x117))/0xd);if(_0x77a88b===_0x306fa3)break;else _0x57a25d['push'](_0x57a25d['shift']());}catch(_0x398b3e){_0x57a25d['push'](_0x57a25d['shift']());}}}(a90_0x1a5d,0xd97d5));import{buildSchemaPayload as a90_0x504973}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x3a8c8c=a90_0x31f9,{serviceRegistry:_0x1775ce,findDefinition:_0x408ac7}=await import('../commands/registry.js'),_0x20b37b=new Set(_0x1775ce[_0x3a8c8c(0x11e)](_0x28b871=>_0x28b871[_0x3a8c8c(0x11f)])),_0x3e029a=listDynamicServiceEntries()['filter'](_0x46040a=>!_0x20b37b[_0x3a8c8c(0x10d)](_0x46040a['service'])),_0x733a5f=a90_0x504973({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x1775ce,_0x3e029a),'buildAllFlags':buildAllFlags,'findDefinition':(_0x47e5fa,_0x4505ac)=>_0x408ac7(_0x47e5fa,_0x4505ac)??findDynamicServiceDefinition(_0x47e5fa,_0x4505ac)});return normalizeSchemaPayload(_0x733a5f);}function a90_0x1a5d(){const _0x5b53bc=['1522026cFKoYv','72140DUeKgf','240616rVporK','1047inPiMa','commands','12564jUpIRt','49vLrFEv','1166zIAAET','26DBMoue','10629324rFsVwA','services','15792756UyhQsI','2Eccpjn','none','8GECYtz','map','service','auth','has','5270235GcDldl'];a90_0x1a5d=function(){return _0x5b53bc;};return a90_0x1a5d();}function a90_0x31f9(_0xccb011,_0x1675ec){_0xccb011=_0xccb011-0x10d;const _0x1a5d41=a90_0x1a5d();let _0x31f9b1=_0x1a5d41[_0xccb011];return _0x31f9b1;}function normalizeSchemaPayload(_0x549c02){const _0x4183eb=a90_0x31f9;return{..._0x549c02,'schemaVersion':0x2,'services':_0x549c02[_0x4183eb(0x119)][_0x4183eb(0x11e)](_0x54bebd=>({..._0x54bebd,'commands':_0x54bebd[_0x4183eb(0x113)][_0x4183eb(0x11e)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x51215c){const _0x225de5=a90_0x31f9,_0x1cbf32=_0x51215c;return{..._0x51215c,'auth':_0x1cbf32[_0x225de5(0x120)]??(_0x51215c['requiresAuth']?'required':_0x225de5(0x11c))};}
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_0x3bac(_0x17c313,_0x7387c0){_0x17c313=_0x17c313-0x18a;const _0x23b291=a91_0x23b2();let _0x3bacab=_0x23b291[_0x17c313];return _0x3bacab;}(function(_0x1dca3d,_0x7d222b){const _0x2c891b=a91_0x3bac,_0x2a0ae5=_0x1dca3d();while(!![]){try{const _0x5e8869=parseInt(_0x2c891b(0x190))/0x1*(parseInt(_0x2c891b(0x18f))/0x2)+parseInt(_0x2c891b(0x192))/0x3+parseInt(_0x2c891b(0x18c))/0x4+-parseInt(_0x2c891b(0x18e))/0x5+parseInt(_0x2c891b(0x18a))/0x6+-parseInt(_0x2c891b(0x191))/0x7+-parseInt(_0x2c891b(0x18d))/0x8;if(_0x5e8869===_0x7d222b)break;else _0x2a0ae5['push'](_0x2a0ae5['shift']());}catch(_0x3b2dce){_0x2a0ae5['push'](_0x2a0ae5['shift']());}}}(a91_0x23b2,0x88166));function a91_0x23b2(){const _0x5b9809=['2860085TueWLE','58SUXeAV','36384vSqmFo','6136606VisFge','2504244GslkLJ','length','slice','2969004cjGxPO','service','4119116ReKCDy','11267264yBZRNZ'];a91_0x23b2=function(){return _0x5b9809;};return a91_0x23b2();}export function insertDynamicServicesAfterServiceTree(_0xbab4cd,_0x47f12d){const _0x19d0d5=a91_0x3bac;if(_0x47f12d[_0x19d0d5(0x193)]===0x0)return[..._0xbab4cd];const _0x5851fb=_0xbab4cd['findIndex'](_0x174535=>_0x174535[_0x19d0d5(0x18b)]===_0x19d0d5(0x18b));if(_0x5851fb<0x0)return[..._0xbab4cd,..._0x47f12d];return[..._0xbab4cd[_0x19d0d5(0x194)](0x0,_0x5851fb+0x1),..._0x47f12d,..._0xbab4cd['slice'](_0x5851fb+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_0xe980(_0x3a55d8,_0x1bff34){_0x3a55d8=_0x3a55d8-0x6b;var _0xe623a9=a92_0xe623();var _0xe9802d=_0xe623a9[_0x3a55d8];return _0xe9802d;}(function(_0x198102,_0x22bf06){var _0x2650fe=a92_0xe980,_0x59d025=_0x198102();while(!![]){try{var _0xe73aa8=-parseInt(_0x2650fe(0x6d))/0x1+-parseInt(_0x2650fe(0x6e))/0x2*(parseInt(_0x2650fe(0x6b))/0x3)+-parseInt(_0x2650fe(0x72))/0x4+-parseInt(_0x2650fe(0x71))/0x5+-parseInt(_0x2650fe(0x70))/0x6*(parseInt(_0x2650fe(0x6f))/0x7)+parseInt(_0x2650fe(0x6c))/0x8+parseInt(_0x2650fe(0x73))/0x9;if(_0xe73aa8===_0x22bf06)break;else _0x59d025['push'](_0x59d025['shift']());}catch(_0x500863){_0x59d025['push'](_0x59d025['shift']());}}}(a92_0xe623,0xc8594));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a92_0xe623(){var _0x2b81e1=['9313787gHunaD','6ehADOc','1032160hBNjlX','856512DyGvkm','33142185FNecRv','13599idnZOL','4107880dwmnrT','1293312jYvXEm','146LQPIxE'];a92_0xe623=function(){return _0x2b81e1;};return a92_0xe623();}
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
- function a93_0x3bd9(){const _0x418dc3=['3LuelLw','3d237d3','v2.1.11-beta.2','3545656YKcOto','881504zaHNys','10CmeDSl','2026-07-11T08:24:35.698Z','9718317syIhGd','722732PCtadl','240199XbOxZm','1025DWzNqK','28590DqaNTF','3176292ywsnMR'];a93_0x3bd9=function(){return _0x418dc3;};return a93_0x3bd9();}const a93_0x2d9ab3=a93_0x34ec;(function(_0x45b80e,_0x289034){const _0x34c2ef=a93_0x34ec,_0xe97fe=_0x45b80e();while(!![]){try{const _0x4a8847=-parseInt(_0x34c2ef(0xed))/0x1+parseInt(_0x34c2ef(0xec))/0x2*(-parseInt(_0x34c2ef(0xe4))/0x3)+parseInt(_0x34c2ef(0xe7))/0x4+parseInt(_0x34c2ef(0xee))/0x5*(-parseInt(_0x34c2ef(0xef))/0x6)+parseInt(_0x34c2ef(0xe3))/0x7+parseInt(_0x34c2ef(0xe8))/0x8+-parseInt(_0x34c2ef(0xeb))/0x9*(-parseInt(_0x34c2ef(0xe9))/0xa);if(_0x4a8847===_0x289034)break;else _0xe97fe['push'](_0xe97fe['shift']());}catch(_0x3fadf2){_0xe97fe['push'](_0xe97fe['shift']());}}}(a93_0x3bd9,0xe85e5));export const VERSION='2.1.11-beta.2';export const GIT_TAG=a93_0x2d9ab3(0xe6);function a93_0x34ec(_0x1e9560,_0x2b346a){_0x1e9560=_0x1e9560-0xe3;const _0x3bd9e2=a93_0x3bd9();let _0x34ec02=_0x3bd9e2[_0x1e9560];return _0x34ec02;}export const GIT_COMMIT=a93_0x2d9ab3(0xe5);export const BUILD_TIME=a93_0x2d9ab3(0xea);
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 a94_0x34e2(){const _0x4abe6e=['1180CgYhSL','1379xRXCXY','\x20to\x20view\x20available\x20commands.','green','141246NrjJWN','column','1182044yZQFzH','27TlhRrj','81036eGHegn','1056030eUeSaF','3896SKTLVi','1520585MTcDjT','49826FJZbDH','\x20\x20Use\x20'];a94_0x34e2=function(){return _0x4abe6e;};return a94_0x34e2();}(function(_0x1c5446,_0xa33e94){const _0x80f775=a94_0x11c5,_0x4989c6=_0x1c5446();while(!![]){try{const _0x30fbdb=-parseInt(_0x80f775(0xc0))/0x1+parseInt(_0x80f775(0xba))/0x2*(-parseInt(_0x80f775(0xb5))/0x3)+-parseInt(_0x80f775(0xc2))/0x4+-parseInt(_0x80f775(0xb9))/0x5+parseInt(_0x80f775(0xb7))/0x6+parseInt(_0x80f775(0xbd))/0x7*(-parseInt(_0x80f775(0xb8))/0x8)+parseInt(_0x80f775(0xb6))/0x9*(parseInt(_0x80f775(0xbc))/0xa);if(_0x30fbdb===_0xa33e94)break;else _0x4989c6['push'](_0x4989c6['shift']());}catch(_0x3f1848){_0x4989c6['push'](_0x4989c6['shift']());}}}(a94_0x34e2,0x2b527));function a94_0x11c5(_0x21a277,_0x1cbd53){_0x21a277=_0x21a277-0xb5;const _0x34e2b7=a94_0x34e2();let _0x11c51d=_0x34e2b7[_0x21a277];return _0x11c51d;}import{jsx as a94_0x1c4225,jsxs as a94_0x5bf09d}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4c9c0b=a94_0x11c5,{exit:_0x3b05d8}=useApp();return useEffect(()=>{_0x3b05d8();},[_0x3b05d8]),a94_0x5bf09d(Box,{'flexDirection':_0x4c9c0b(0xc1),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x1c4225(Box,{'children':a94_0x1c4225(Text,{'bold':!![],'color':_0x4c9c0b(0xbf),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x5bf09d(Box,{'marginTop':0x1,'children':[a94_0x1c4225(Text,{'dimColor':!![],'children':_0x4c9c0b(0xbb)}),a94_0x1c4225(Text,{'bold':!![],'color':_0x4c9c0b(0xbf),'children':CLI_BIN_NAME+'\x20--help'}),a94_0x1c4225(Text,{'dimColor':!![],'children':_0x4c9c0b(0xbe)})]})]});}
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_0x22ed38=a95_0x15ce;(function(_0xa4896d,_0x594665){const _0x1c7748=a95_0x15ce,_0x1b83ff=_0xa4896d();while(!![]){try{const _0x3f370e=parseInt(_0x1c7748(0x75))/0x1*(parseInt(_0x1c7748(0x79))/0x2)+-parseInt(_0x1c7748(0x74))/0x3+-parseInt(_0x1c7748(0x82))/0x4*(parseInt(_0x1c7748(0x83))/0x5)+-parseInt(_0x1c7748(0x81))/0x6+parseInt(_0x1c7748(0x77))/0x7*(parseInt(_0x1c7748(0x84))/0x8)+-parseInt(_0x1c7748(0x70))/0x9*(-parseInt(_0x1c7748(0x88))/0xa)+-parseInt(_0x1c7748(0x87))/0xb*(-parseInt(_0x1c7748(0x80))/0xc);if(_0x3f370e===_0x594665)break;else _0x1b83ff['push'](_0x1b83ff['shift']());}catch(_0x227b6a){_0x1b83ff['push'](_0x1b83ff['shift']());}}}(a95_0x4b74,0x9ceca));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0x5415fd}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x5415fd;function a95_0x4b74(){const _0xc608fb=['16QQKvEx','911140ELrHnD','48DzqiMr','trim','stdout','143WYFerX','10OhXdsd','3683907IyPGza','unknown','status','stdio','1986672DOjssB','3GOlAJN','log','699902vdwMbi','join','233398cabyCt','exit\x20','add','inherit','toString','skills','skipNpxSkillsEnvSuffix','866196nvJbyC','1582902yTuMro'];a95_0x4b74=function(){return _0xc608fb;};return a95_0x4b74();}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0x22ed38(0x7f)]);function a95_0x15ce(_0x6ab3ca,_0x4d86d5){_0x6ab3ca=_0x6ab3ca-0x70;const _0x4b74c9=a95_0x4b74();let _0x15ce1d=_0x4b74c9[_0x6ab3ca];return _0x15ce1d;}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0xe815c1,_0x241ea0=LOVRABET_SKILL_SOURCE,_0x4b7166){const _0x2d896e=a95_0x22ed38;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x14dd2c=_0x4b7166?.[_0x2d896e(0x73)]??_0x2d896e(0x7c),_0x17ecef=resolveNpmBin('npx'),_0x4acf58=[_0x2d896e(0x7e),_0x2d896e(0x7b),_0x241ea0,'-g','-y'],_0x3bd61e=[_0x17ecef,..._0x4acf58][_0x2d896e(0x78)]('\x20');console[_0x2d896e(0x76)]('*\x20'+_0x3bd61e);const _0xc466e0=spawnSync(_0x17ecef,_0x4acf58,{'cwd':_0xe815c1,'stdio':_0x14dd2c,'env':process.env,'shell':![]});if(_0xc466e0[_0x2d896e(0x72)]===0x0)return{'ok':!![],'status':0x0};let _0x24a4bb=_0x2d896e(0x7a)+(_0xc466e0[_0x2d896e(0x72)]??_0x2d896e(0x71));if(_0x14dd2c==='pipe'){const _0x335e2d=_0xc466e0['stderr']?_0xc466e0['stderr'][_0x2d896e(0x7d)]()['trim']():'',_0x5012ac=_0xc466e0[_0x2d896e(0x86)]?_0xc466e0[_0x2d896e(0x86)][_0x2d896e(0x7d)]()[_0x2d896e(0x85)]():'';if(_0x335e2d)_0x24a4bb=_0x335e2d;else{if(_0x5012ac)_0x24a4bb=_0x5012ac;}}return{'ok':![],'status':_0xc466e0[_0x2d896e(0x72)]??null,'error':_0x24a4bb};}
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_0x5ccc6c=a96_0x22d1;(function(_0x5056ea,_0x4ae284){const _0xabaccc=a96_0x22d1,_0x30739b=_0x5056ea();while(!![]){try{const _0x8a90e1=-parseInt(_0xabaccc(0x15d))/0x1*(-parseInt(_0xabaccc(0x169))/0x2)+-parseInt(_0xabaccc(0x167))/0x3*(-parseInt(_0xabaccc(0x15b))/0x4)+-parseInt(_0xabaccc(0x16a))/0x5+-parseInt(_0xabaccc(0x16b))/0x6*(parseInt(_0xabaccc(0x15a))/0x7)+parseInt(_0xabaccc(0x160))/0x8+parseInt(_0xabaccc(0x15c))/0x9*(-parseInt(_0xabaccc(0x16d))/0xa)+parseInt(_0xabaccc(0x15e))/0xb*(parseInt(_0xabaccc(0x170))/0xc);if(_0x8a90e1===_0x4ae284)break;else _0x30739b['push'](_0x30739b['shift']());}catch(_0x435a70){_0x30739b['push'](_0x30739b['shift']());}}}(a96_0x36ea,0xc0f76));function a96_0x22d1(_0x1cb071,_0x4f709f){_0x1cb071=_0x1cb071-0x15a;const _0x36ea64=a96_0x36ea();let _0x22d11e=_0x36ea64[_0x1cb071];return _0x22d11e;}function a96_0x36ea(){const _0x5ec28d=['.hg','.turbo','.next','.DS_Store','node_modules','6viizZB','coverage','1248xXaPlZ','1375965DFfZtB','1093062fEASdR','.svn','10pRaNst','dist','.cache','468txqDiD','7IyNXvj','2327268KWnGAK','13568382BBnjAH','2349OxdCoM','17061XvytwF','lovrabet.skill.json','523672xCypsy','.git'];a96_0x36ea=function(){return _0x5ec28d;};return a96_0x36ea();}export const METADATA_FILE=a96_0x5ccc6c(0x15f);export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a96_0x5ccc6c(0x165)]);export const IGNORED_DIR_NAMES=new Set([a96_0x5ccc6c(0x161),a96_0x5ccc6c(0x162),a96_0x5ccc6c(0x16c),a96_0x5ccc6c(0x166),a96_0x5ccc6c(0x164),a96_0x5ccc6c(0x16e),'build',a96_0x5ccc6c(0x168),a96_0x5ccc6c(0x163),a96_0x5ccc6c(0x16f)]);
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(_0x657eed,_0x7d68e){const _0xc2e202=a97_0x3549,_0x51f471=_0x657eed();while(!![]){try{const _0x5619f9=parseInt(_0xc2e202(0x71))/0x1*(-parseInt(_0xc2e202(0x69))/0x2)+-parseInt(_0xc2e202(0x74))/0x3*(-parseInt(_0xc2e202(0x77))/0x4)+parseInt(_0xc2e202(0x68))/0x5+parseInt(_0xc2e202(0x6e))/0x6+-parseInt(_0xc2e202(0x7a))/0x7+parseInt(_0xc2e202(0x6c))/0x8*(parseInt(_0xc2e202(0x6d))/0x9)+parseInt(_0xc2e202(0x6b))/0xa;if(_0x5619f9===_0x7d68e)break;else _0x51f471['push'](_0x51f471['shift']());}catch(_0x594292){_0x51f471['push'](_0x51f471['shift']());}}}(a97_0x4fc0,0x6b080));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x27d6a5,_0x15018f){const _0x5d35cb=a97_0x3549,_0x2e258e=normalizeSkillRelativePath(_0x15018f),_0x19c8bf=realOrResolved(_0x27d6a5),_0x2bd89d=resolve(_0x19c8bf,..._0x2e258e[_0x5d35cb(0x79)]('/'));if(!isPathInside(_0x2bd89d,_0x19c8bf))throw CliErrors[_0x5d35cb(0x6a)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x15018f);return ensureNoSymlinkInManagedPath(_0x19c8bf,_0x2e258e),_0x2bd89d;}export function ensureNoSymlinkInManagedPath(_0x54b59d,_0x162180){const _0x389aee=a97_0x3549;let _0x3e4b3f=_0x54b59d;for(const _0x5551bf of _0x162180[_0x389aee(0x79)]('/')){_0x3e4b3f=resolve(_0x3e4b3f,_0x5551bf);const _0x35db8e=lstatIfPresent(_0x3e4b3f);if(_0x35db8e?.[_0x389aee(0x78)]())throw CliErrors[_0x389aee(0x6a)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x162180);}}function a97_0x3549(_0x4017a8,_0x5699f8){_0x4017a8=_0x4017a8-0x68;const _0x4fc00f=a97_0x4fc0();let _0x3549f2=_0x4fc00f[_0x4017a8];return _0x3549f2;}export function isDanglingSymlink(_0x4e4999){const _0x397d02=a97_0x3549;try{return lstatSync(_0x4e4999)[_0x397d02(0x78)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4c293a){const _0x17f88b=readlinkSync(_0x4c293a);return isAbsolute(_0x17f88b)?_0x17f88b:resolve(dirname(_0x4c293a),_0x17f88b);}export function isPathInside(_0x1aa826,_0x35d250){const _0x1444df=a97_0x3549,_0x46c88f=_0x1aa826[_0x1444df(0x70)](sep)?_0x1aa826:''+_0x1aa826+sep,_0xb35bda=_0x35d250['endsWith'](sep)?_0x35d250:''+_0x35d250+sep;return _0x1aa826===_0x35d250||_0x46c88f[_0x1444df(0x75)](_0xb35bda);}export function realOrResolved(_0x26c3e8){try{return realpathSync(_0x26c3e8);}catch{return resolve(_0x26c3e8);}}export function lstatIfPresent(_0x4d6e23){try{return lstatSync(_0x4d6e23);}catch{return undefined;}}export function writeTextAtomic(_0xe5268d,_0x8c613e,_0x4106d9){const _0x3a8259=a97_0x3549;writeBytesAtomic(_0xe5268d,Buffer[_0x3a8259(0x73)](_0x8c613e,_0x3a8259(0x6f)),_0x4106d9);}export function writeBytesAtomic(_0x5bae68,_0x1d00b3,_0x42ca38){const _0x5a7dfb=a97_0x3549,_0x5b35bf=_0x5bae68+_0x5a7dfb(0x76);try{writeFileSync(_0x5b35bf,_0x1d00b3,{'mode':_0x42ca38}),renameSync(_0x5b35bf,_0x5bae68);}catch(_0x46bc0f){try{rmSync(_0x5b35bf,{'force':!![]});}catch{}throw _0x46bc0f;}}export function writeJsonAtomic(_0xec1275,_0x3d7b14){const _0x2cf9e6=a97_0x3549;writeTextAtomic(_0xec1275,JSON[_0x2cf9e6(0x72)](_0x3d7b14,null,0x2)+'\x0a',0x180);}function a97_0x4fc0(){const _0x15e946=['isSymbolicLink','split','1582168kgrthY','153175tZAUus','12244KGXXOV','validation','5674750pQTlLF','24BAlGCE','307971foXjTz','389100kPAXeB','utf8','endsWith','28jMCuuP','stringify','from','3wMhbuz','startsWith','.tmp','280892AYsAZF'];a97_0x4fc0=function(){return _0x15e946;};return a97_0x4fc0();}
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(_0x198533,_0x3a633e){const _0x4c06b3=a98_0xc921,_0x10002c=_0x198533();while(!![]){try{const _0x3f723f=-parseInt(_0x4c06b3(0x10c))/0x1*(-parseInt(_0x4c06b3(0x111))/0x2)+-parseInt(_0x4c06b3(0x10f))/0x3+parseInt(_0x4c06b3(0x109))/0x4*(-parseInt(_0x4c06b3(0x107))/0x5)+-parseInt(_0x4c06b3(0x106))/0x6*(parseInt(_0x4c06b3(0x10a))/0x7)+-parseInt(_0x4c06b3(0x108))/0x8*(-parseInt(_0x4c06b3(0x103))/0x9)+parseInt(_0x4c06b3(0x10e))/0xa+parseInt(_0x4c06b3(0x102))/0xb*(parseInt(_0x4c06b3(0x10b))/0xc);if(_0x3f723f===_0x3a633e)break;else _0x10002c['push'](_0x10002c['shift']());}catch(_0x567df9){_0x10002c['push'](_0x10002c['shift']());}}}(a98_0x12fc,0xee8cb));function a98_0x12fc(){const _0x3709b8=['11362130csuREl','869364KXkxtU','size','2mXubqI','sha256','11glAJyN','9054RarJkZ','digest','update','12cMWreW','1105IEaLEW','7408xPMHAO','22696sQwEJH','160727nfEaPI','2389284brNFOa','299887eyXdWQ','hex'];a98_0x12fc=function(){return _0x3709b8;};return a98_0x12fc();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2ed5c6){const _0x276909=a98_0xc921;return createHash(_0x276909(0x112))[_0x276909(0x105)](_0x2ed5c6)[_0x276909(0x104)](_0x276909(0x10d));}function a98_0xc921(_0x143973,_0x277517){_0x143973=_0x143973-0x102;const _0x12fc0d=a98_0x12fc();let _0xc921f9=_0x12fc0d[_0x143973];return _0xc921f9;}export function fileHash(_0x56bfb4){return bufferSha256(fileContent(_0x56bfb4));}export function bufferSha256(_0x3b5718){const _0x3123eb=a98_0xc921;return createHash(_0x3123eb(0x112))[_0x3123eb(0x105)](_0x3b5718)[_0x3123eb(0x104)](_0x3123eb(0x10d));}export function fileTreeHash(_0x3bfde1){const _0x351c1c=a98_0xc921,_0x15826d=createHash(_0x351c1c(0x112));for(const _0x5f77dc of normalizeManifestFiles(_0x3bfde1)){_0x15826d[_0x351c1c(0x105)](_0x5f77dc['path']),_0x15826d[_0x351c1c(0x105)]('\x00'),_0x15826d['update'](_0x5f77dc[_0x351c1c(0x112)]),_0x15826d[_0x351c1c(0x105)]('\x00'),_0x15826d[_0x351c1c(0x105)](String(_0x5f77dc[_0x351c1c(0x110)])),_0x15826d[_0x351c1c(0x105)]('\x00');}return _0x15826d[_0x351c1c(0x104)](_0x351c1c(0x10d));}
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(_0x13e275,_0x4ab78e){const _0x62b97f=a99_0x26cc,_0x3f7d17=_0x13e275();while(!![]){try{const _0x3870e8=parseInt(_0x62b97f(0x152))/0x1+-parseInt(_0x62b97f(0x151))/0x2+-parseInt(_0x62b97f(0x132))/0x3+-parseInt(_0x62b97f(0x136))/0x4*(-parseInt(_0x62b97f(0x14f))/0x5)+parseInt(_0x62b97f(0x12b))/0x6*(parseInt(_0x62b97f(0x137))/0x7)+parseInt(_0x62b97f(0x14b))/0x8+parseInt(_0x62b97f(0x139))/0x9*(-parseInt(_0x62b97f(0x150))/0xa);if(_0x3870e8===_0x4ab78e)break;else _0x3f7d17['push'](_0x3f7d17['shift']());}catch(_0x417068){_0x3f7d17['push'](_0x3f7d17['shift']());}}}(a99_0x4b80,0xe0af0));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a99_0x4b80(){const _0x3af04e=['12487216BffyGO','name','has','scopes','756340WyNKBn','170kAJhQk','1798596RbUsxK','1834077HbyNGs','activeSkillCodes','not-managed-symlink','set','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','external-symlink','created','env','pruneSkillCodes','6GEFcAB','company','skillCode','length','builtin','isSymbolicLink','isDirectory','4435779DSIeYX','scope','accessKey','push','8Qsxxyj','9860529JCehNN','agentsSkillsDir','957159aBbAKZ','map','appCode','updated','filter','skill','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','contentHash','get','managedRoot','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','trim','validation','unchanged','skipped','personal','dir'];a99_0x4b80=function(){return _0x3af04e;};return a99_0x4b80();}import{basename,dirname,resolve}from'node:path';import a99_0x617dbf 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_0x617dbf;export function linkEffectiveRuntimeSkills(_0x426138,_0x11b00d,_0x1de22e={}){const _0x54c7a3=a99_0x26cc,_0x4f86b2=new Map();for(const _0x40d3f9 of _0x426138){const _0x276327=_0x40d3f9[_0x54c7a3(0x13e)]['skillCode'];if(!_0x276327)continue;const _0x3c4ad6=_0x4f86b2[_0x54c7a3(0x141)](_0x276327);(!_0x3c4ad6||_0x40d3f9['scope']===_0x54c7a3(0x149))&&_0x4f86b2[_0x54c7a3(0x125)](_0x276327,_0x40d3f9);}const _0x48d775=[],_0x21093c=resolveSkillSyncPaths(_0x1de22e);for(const _0x2c4c1b of _0x4f86b2['values']()){const _0x493374=requireSkillCode(_0x2c4c1b['skill']),_0x3f962c=_0x11b00d+'--'+_0x493374;for(const _0x241a85 of runtimeAgentSkillRoots(_0x21093c)){_0x48d775['push'](ensureManagedSymlink(resolve(_0x241a85,_0x3f962c),_0x2c4c1b['dir'],_0x21093c[_0x54c7a3(0x142)]));}}return _0x48d775;}export function pruneStaleRuntimeSkillLinks(_0x5ef0e7,_0x145522,_0x27761d={},_0x551d94){const _0x4aadea=a99_0x26cc,_0x1e8d1e=resolveSkillSyncPaths(_0x27761d),_0x51ca09=new Set([..._0x145522][_0x4aadea(0x13a)](_0x2ab94e=>_0x2ab94e['trim']())[_0x4aadea(0x13d)](Boolean)),_0x2b2eac=_0x551d94?new Set([..._0x551d94][_0x4aadea(0x13a)](_0x35da29=>_0x35da29[_0x4aadea(0x145)]())[_0x4aadea(0x13d)](Boolean)):undefined,_0x357675=[];for(const _0x5030c3 of runtimeAgentSkillRoots(_0x1e8d1e)){for(const _0x15abb2 of managedAppSkillLinkPaths(_0x5030c3,_0x5ef0e7)){const _0x3527ec=basename(_0x15abb2)['slice']((_0x5ef0e7+'--')[_0x4aadea(0x12e)]);if(_0x2b2eac&&!_0x2b2eac[_0x4aadea(0x14d)](_0x3527ec))continue;if(_0x51ca09[_0x4aadea(0x14d)](_0x3527ec))continue;_0x357675[_0x4aadea(0x135)](removeManagedSkillLink(_0x15abb2,_0x1e8d1e[_0x4aadea(0x142)]));}}return _0x357675;}function a99_0x26cc(_0x414944,_0x3ad428){_0x414944=_0x414944-0x124;const _0x4b80e6=a99_0x4b80();let _0x26ccf2=_0x4b80e6[_0x414944];return _0x26ccf2;}export function pruneStaleRuntimeSkillCache(_0x2a7e5a,_0x3ab3b0={}){const _0x119edf=a99_0x26cc,_0x2f9dd1=new Set([..._0x2a7e5a[_0x119edf(0x153)]]['map'](_0x1ad2b8=>_0x1ad2b8[_0x119edf(0x145)]())[_0x119edf(0x13d)](Boolean)),_0x23b84a=_0x2a7e5a[_0x119edf(0x12a)]?new Set([..._0x2a7e5a[_0x119edf(0x12a)]][_0x119edf(0x13a)](_0xd49063=>_0xd49063[_0x119edf(0x145)]())[_0x119edf(0x13d)](Boolean)):undefined,_0x3e830d=_0x2a7e5a[_0x119edf(0x14e)]??[_0x119edf(0x149),_0x119edf(0x12c)],_0x10606b=resolve(getRuntimeSkillCacheRoot(_0x2a7e5a[_0x119edf(0x129)],_0x2a7e5a[_0x119edf(0x134)],_0x3ab3b0),safePathSegment(_0x2a7e5a[_0x119edf(0x13b)],'appCode')),_0xd68976=[];for(const _0x32eac6 of _0x3e830d){const _0x548d6a=resolve(_0x10606b,_0x32eac6);if(!existsSync(_0x548d6a))continue;for(const _0x2d77c2 of readdirSync(_0x548d6a,{'withFileTypes':!![]})){if(!_0x2d77c2['isDirectory']())continue;const _0x450621=_0x2d77c2['name'];if(_0x23b84a&&!_0x23b84a['has'](_0x450621))continue;if(_0x2f9dd1[_0x119edf(0x14d)](_0x450621))continue;const _0x4c1048=resolve(_0x548d6a,_0x450621),_0x253551=readMetadataIfPresent(resolve(_0x4c1048,METADATA_FILE));if(_0x253551?.[_0x119edf(0x13b)]!==_0x2a7e5a[_0x119edf(0x13b)]||_0x253551[_0x119edf(0x133)]!==_0x32eac6||_0x253551[_0x119edf(0x12d)]!==_0x450621){_0xd68976[_0x119edf(0x135)]({'path':_0x4c1048,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x4c1048),_0xd68976['push']({'path':_0x4c1048,'action':_0x119edf(0x143)});}}return _0xd68976;}export function linkGlobalRuntimeSkills(_0x442dcd,_0x4d2c9e={}){const _0x1a6779=a99_0x26cc,_0x4530fc=resolveSkillSyncPaths(_0x4d2c9e),_0x1d1458=[];for(const _0x2091a3 of _0x442dcd){if(_0x2091a3[_0x1a6779(0x133)]!==_0x1a6779(0x12f))throw CliErrors[_0x1a6779(0x146)](_0x1a6779(0x13f)+_0x2091a3['scope']);const _0x4324f4=requireSkillCode(_0x2091a3[_0x1a6779(0x13e)]),_0x1f59de=copyManagedSkillDirectory(_0x2091a3[_0x1a6779(0x14a)],resolve(_0x4530fc[_0x1a6779(0x138)],_0x4324f4));_0x1d1458[_0x1a6779(0x135)]({..._0x1f59de,'contentHash':_0x2091a3['contentHash']});}return _0x1d1458;}function ensureManagedSymlink(_0x457c66,_0x91483,_0x342711){const _0x274c22=a99_0x26cc;mkdirSync(dirname(_0x457c66),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x457c66)||isDanglingSymlink(_0x457c66)){const _0x4c0d64=lstatSync(_0x457c66);if(!_0x4c0d64['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x457c66);const _0x279347=resolveSymlinkTarget(_0x457c66);if(!isPathInside(realOrResolved(_0x279347),realOrResolved(_0x342711)))throw CliErrors[_0x274c22(0x146)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x457c66);if(realOrResolved(_0x279347)===realOrResolved(_0x91483))return{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x147)};return unlinkSync(_0x457c66),symlinkSync(_0x91483,_0x457c66,_0x274c22(0x14a)),{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x13c)};}return symlinkSync(_0x91483,_0x457c66,'dir'),{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x128)};}function managedAppSkillLinkPaths(_0x3387e6,_0x25a182){const _0x4683f4=a99_0x26cc;if(!existsSync(_0x3387e6))return[];const _0x4559a4=_0x25a182+'--';return readdirSync(_0x3387e6,{'withFileTypes':!![]})['filter'](_0x586021=>_0x586021[_0x4683f4(0x14c)]['startsWith'](_0x4559a4))[_0x4683f4(0x13a)](_0x108d4b=>resolve(_0x3387e6,_0x108d4b[_0x4683f4(0x14c)]));}function removeManagedSkillLink(_0x53bfe0,_0x22b263){const _0x53faaa=a99_0x26cc,_0x56c61c=lstatIfPresent(_0x53bfe0);if(!_0x56c61c?.['isSymbolicLink']())return{'path':_0x53bfe0,'action':_0x53faaa(0x148),'reason':_0x53faaa(0x124)};const _0xc8d379=resolveSymlinkTarget(_0x53bfe0);if(!isPathInside(realOrResolved(_0xc8d379),realOrResolved(_0x22b263)))return{'path':_0x53bfe0,'action':_0x53faaa(0x148),'reason':_0x53faaa(0x127)};return unlinkSync(_0x53bfe0),{'path':_0x53bfe0,'action':_0x53faaa(0x143)};}export function copyManagedSkillDirectory(_0x5d4b56,_0x359c9c){const _0x1abaaf=a99_0x26cc,_0x222ff8=resolve(_0x359c9c,METADATA_FILE),_0x3b9e0d=existsSync(_0x359c9c);if(_0x3b9e0d){const _0x1c2951=lstatSync(_0x359c9c);if(_0x1c2951[_0x1abaaf(0x130)]())throw CliErrors[_0x1abaaf(0x146)](_0x1abaaf(0x144)+_0x359c9c);if(!_0x1c2951[_0x1abaaf(0x131)]())throw CliErrors[_0x1abaaf(0x146)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x359c9c);const _0x2366ab=readMetadataIfPresent(_0x222ff8);if(_0x2366ab?.[_0x1abaaf(0x133)]!==_0x1abaaf(0x12f))throw CliErrors[_0x1abaaf(0x146)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x359c9c);}ensureDirSync(dirname(_0x359c9c));const _0x283705=_0x3b9e0d?readMetadataIfPresent(_0x222ff8)?.[_0x1abaaf(0x140)]:undefined,_0x47e07f=readMetadataIfPresent(resolve(_0x5d4b56,METADATA_FILE))?.[_0x1abaaf(0x140)];return _0x3b9e0d&&removeSync(_0x359c9c),copySkillDirectory(_0x5d4b56,_0x359c9c),{'path':_0x359c9c,'target':_0x5d4b56,'action':!_0x3b9e0d?_0x1abaaf(0x128):_0x283705===_0x47e07f?_0x1abaaf(0x147):_0x1abaaf(0x13c)};}function copySkillDirectory(_0x31ad71,_0x1ff6fe){copySync(_0x31ad71,_0x1ff6fe,{'dereference':![],'overwrite':!![],'filter'(_0x403ffa){const _0x324a7c=a99_0x26cc;if(lstatSync(_0x403ffa)['isSymbolicLink']())throw CliErrors[_0x324a7c(0x146)](_0x324a7c(0x126)+_0x403ffa);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(_0x1d28d7,_0x55b7db){const _0x54f5d7=a100_0xb51c,_0x162ed7=_0x1d28d7();while(!![]){try{const _0x566ae4=parseInt(_0x54f5d7(0x15d))/0x1+parseInt(_0x54f5d7(0x156))/0x2+parseInt(_0x54f5d7(0x16a))/0x3+-parseInt(_0x54f5d7(0x16d))/0x4*(parseInt(_0x54f5d7(0x165))/0x5)+parseInt(_0x54f5d7(0x171))/0x6+-parseInt(_0x54f5d7(0x160))/0x7*(parseInt(_0x54f5d7(0x162))/0x8)+-parseInt(_0x54f5d7(0x170))/0x9*(parseInt(_0x54f5d7(0x179))/0xa);if(_0x566ae4===_0x55b7db)break;else _0x162ed7['push'](_0x162ed7['shift']());}catch(_0x269593){_0x162ed7['push'](_0x162ed7['shift']());}}}(a100_0x29eb,0xa49cf));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_0x29eb(){const _0x4af057=['40239aDQPdH','4690194sOGOVd','dir','appCode','linkedPath','startsWith','metadataPath','isArray','link','1330cuHIkV','builtin','get','sort','from','source','has','map','491544ORlTgQ','local','skillMdPath','cache','trim','scope','values','687931ROSltq','tags','set','21qiqcbX','cacheDir','1013544vlOwch','isSymbolicLink','isDirectory','2025715ssHUWp','filter','env','push','skillCode','3447012GERkNk','localeCompare','name','12MttnNW','linkedPaths','code'];a100_0x29eb=function(){return _0x4af057;};return a100_0x29eb();}export function listLocalRuntimeSkills(_0x10301a,_0x4bb93b={}){const _0x2960fa=a100_0xb51c,_0x1c9b80=safePathSegment(_0x10301a[_0x2960fa(0x173)],'appCode'),_0x496644=normalizeRuntimeSkillScopes(_0x10301a['scopes']),_0x411507=new Set(_0x496644),_0x3ca981=_0x10301a[_0x2960fa(0x16f)]?.[_0x2960fa(0x15a)](),_0x597d30=new Map(),_0x3cec75=resolve(getRuntimeSkillCacheRoot(_0x10301a[_0x2960fa(0x167)],_0x10301a['accessKey'],_0x4bb93b),_0x1c9b80);for(const _0x26d7de of _0x496644){for(const _0x5824c9 of localSkillEntryDirs(resolve(_0x3cec75,_0x26d7de))){collectLocalRuntimeSkill(_0x597d30,_0x5824c9,{'appCode':_0x1c9b80,'scopes':_0x411507,'code':_0x3ca981,'source':_0x2960fa(0x159)});}}const _0x23b5fd=resolveSkillSyncPaths(_0x4bb93b);for(const _0x435d2f of runtimeAgentSkillRoots(_0x23b5fd)){for(const _0x579ac5 of localSkillLinkCandidates(_0x435d2f,_0x1c9b80,_0x411507)){collectLocalRuntimeSkill(_0x597d30,_0x579ac5,{'appCode':_0x1c9b80,'scopes':_0x411507,'code':_0x3ca981,'source':_0x2960fa(0x178),'linkedPath':_0x579ac5});}}return Array[_0x2960fa(0x17d)](_0x597d30[_0x2960fa(0x15c)]())[_0x2960fa(0x17c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2cc00e){const _0x197324=a100_0xb51c;if(!existsSync(_0x2cc00e))return[];return readdirSync(_0x2cc00e,{'withFileTypes':!![]})[_0x197324(0x166)](_0x40ed5b=>_0x40ed5b['isDirectory']()||_0x40ed5b[_0x197324(0x163)]())[_0x197324(0x155)](_0x490dea=>resolve(_0x2cc00e,_0x490dea[_0x197324(0x16c)]));}function localSkillLinkCandidates(_0xdb334e,_0x4f160b,_0x1b1422){const _0xced81f=a100_0xb51c;if(!existsSync(_0xdb334e))return[];const _0xa35cdc=_0x4f160b+'--';return readdirSync(_0xdb334e,{'withFileTypes':!![]})['filter'](_0x2661b1=>_0x2661b1[_0xced81f(0x164)]()||_0x2661b1[_0xced81f(0x163)]())[_0xced81f(0x166)](_0x274195=>_0x274195[_0xced81f(0x16c)][_0xced81f(0x175)](_0xa35cdc)||_0x1b1422[_0xced81f(0x154)](_0xced81f(0x17a)))[_0xced81f(0x155)](_0x567eda=>resolve(_0xdb334e,_0x567eda[_0xced81f(0x16c)]));}function a100_0xb51c(_0x5a7902,_0x588e65){_0x5a7902=_0x5a7902-0x154;const _0x29eb33=a100_0x29eb();let _0xb51c5e=_0x29eb33[_0x5a7902];return _0xb51c5e;}function collectLocalRuntimeSkill(_0x23eb1a,_0x4306ab,_0x4a1674){const _0x14a287=a100_0xb51c,_0xe68234=resolve(_0x4306ab,METADATA_FILE),_0x3203d4=readMetadataIfPresent(_0xe68234);if(!_0x3203d4)return;if(_0x3203d4[_0x14a287(0x173)]!==_0x4a1674[_0x14a287(0x173)])return;if(!isRuntimeSkillScope(_0x3203d4[_0x14a287(0x15b)])||!_0x4a1674['scopes'][_0x14a287(0x154)](_0x3203d4[_0x14a287(0x15b)]))return;const _0x4a93b3=_0x3203d4[_0x14a287(0x169)]?.[_0x14a287(0x15a)]();if(!_0x4a93b3)return;if(_0x4a1674[_0x14a287(0x16f)]&&_0x4a93b3!==_0x4a1674[_0x14a287(0x16f)])return;const _0x3c3d90=_0x3203d4[_0x14a287(0x15b)]+':'+_0x4a93b3,_0x2879c0=_0x4a1674[_0x14a287(0x174)]?[_0x4a1674[_0x14a287(0x174)]]:[],_0x15daeb=_0x23eb1a[_0x14a287(0x17b)](_0x3c3d90);if(_0x15daeb){_0x4a1674['source']==='cache'&&(_0x15daeb[_0x14a287(0x172)]=_0x4306ab,_0x15daeb[_0x14a287(0x161)]=_0x4306ab,_0x15daeb[_0x14a287(0x158)]=resolve(_0x4306ab,SKILL_FILE),_0x15daeb[_0x14a287(0x176)]=_0xe68234);for(const _0x5f1f81 of _0x2879c0){!_0x15daeb[_0x14a287(0x16e)]['includes'](_0x5f1f81)&&_0x15daeb[_0x14a287(0x16e)][_0x14a287(0x168)](_0x5f1f81);}_0x15daeb['linkedPaths'][_0x14a287(0x17c)]();return;}_0x23eb1a[_0x14a287(0x15f)](_0x3c3d90,{..._0x3203d4,'tags':Array[_0x14a287(0x177)](_0x3203d4[_0x14a287(0x15e)])?_0x3203d4['tags']:[],'scope':_0x3203d4[_0x14a287(0x15b)],'source':_0x14a287(0x157),'dir':_0x4306ab,'cacheDir':_0x4a1674[_0x14a287(0x17e)]===_0x14a287(0x159)?_0x4306ab:undefined,'skillMdPath':resolve(_0x4306ab,SKILL_FILE),'metadataPath':_0xe68234,'linkedPaths':_0x2879c0});}function compareLocalRuntimeSkills(_0x3bbb15,_0x38862d){const _0x82adc7=a100_0xb51c,_0x5bca29={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5bca29[_0x3bbb15[_0x82adc7(0x15b)]]-_0x5bca29[_0x38862d[_0x82adc7(0x15b)]]||_0x3bbb15[_0x82adc7(0x169)][_0x82adc7(0x16b)](_0x38862d[_0x82adc7(0x169)])||_0x3bbb15[_0x82adc7(0x172)][_0x82adc7(0x16b)](_0x38862d[_0x82adc7(0x172)]);}
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(_0x3145fd,_0x43fc51){const _0x379917=a101_0x4ca6,_0x3a1bc1=_0x3145fd();while(!![]){try{const _0xcccd29=parseInt(_0x379917(0x105))/0x1*(parseInt(_0x379917(0x10c))/0x2)+parseInt(_0x379917(0x116))/0x3*(parseInt(_0x379917(0x103))/0x4)+parseInt(_0x379917(0xf7))/0x5*(-parseInt(_0x379917(0xf9))/0x6)+parseInt(_0x379917(0xf8))/0x7*(parseInt(_0x379917(0x11a))/0x8)+parseInt(_0x379917(0x104))/0x9*(-parseInt(_0x379917(0x106))/0xa)+parseInt(_0x379917(0xf6))/0xb+-parseInt(_0x379917(0x102))/0xc*(-parseInt(_0x379917(0x112))/0xd);if(_0xcccd29===_0x43fc51)break;else _0x3a1bc1['push'](_0x3a1bc1['shift']());}catch(_0x6b9ea1){_0x3a1bc1['push'](_0x3a1bc1['shift']());}}}(a101_0x1093,0x4eeec));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(_0x159086){const _0x4ecb5c=a101_0x4ca6;return _0x159086[_0x4ecb5c(0x10a)]??Buffer[_0x4ecb5c(0x122)](_0x159086[_0x4ecb5c(0x11f)]??'',_0x4ecb5c(0x11c));}export function fileText(_0x42ea18){const _0x5ee2f1=a101_0x4ca6;return fileContent(_0x42ea18)[_0x5ee2f1(0x110)](_0x5ee2f1(0x11c));}export function normalizeLocalFiles(_0x475474){const _0x1fd3c1=a101_0x4ca6;if(!Array[_0x1fd3c1(0x114)](_0x475474)||_0x475474[_0x1fd3c1(0x11b)]===0x0)return[];const _0x533ffa=new Map();for(const _0x14a65c of _0x475474){if(!_0x14a65c||typeof _0x14a65c!==_0x1fd3c1(0x117)||typeof _0x14a65c['path']!==_0x1fd3c1(0xfc))throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x109));const _0x46314e=normalizeSkillRelativePath(_0x14a65c[_0x1fd3c1(0x108)]);if(_0x533ffa[_0x1fd3c1(0x10f)](_0x46314e))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x46314e);if(_0x14a65c[_0x1fd3c1(0x10a)]!==undefined&&!Buffer['isBuffer'](_0x14a65c[_0x1fd3c1(0x10a)]))throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x111)+_0x46314e);if(_0x14a65c[_0x1fd3c1(0x10a)]===undefined&&typeof _0x14a65c[_0x1fd3c1(0x11f)]!=='string')throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x121)+_0x46314e);const _0x5c674a=fileContent(_0x14a65c);_0x533ffa[_0x1fd3c1(0x101)](_0x46314e,{'path':_0x46314e,'bytes':_0x5c674a});}return Array['from'](_0x533ffa[_0x1fd3c1(0x11d)]())[_0x1fd3c1(0x10b)](compareSkillFiles);}function a101_0x4ca6(_0x2f4d3e,_0x3c9ffa){_0x2f4d3e=_0x2f4d3e-0xf6;const _0x109385=a101_0x1093();let _0x4ca6e4=_0x109385[_0x2f4d3e];return _0x4ca6e4;}export function normalizeManifestFiles(_0x2ec57e){const _0x583c9c=a101_0x4ca6;if(!Array[_0x583c9c(0x114)](_0x2ec57e)||_0x2ec57e[_0x583c9c(0x11b)]===0x0)return[];const _0x323c75=new Map();for(const _0x483c1c of _0x2ec57e){if(!_0x483c1c||typeof _0x483c1c!==_0x583c9c(0x117)||typeof _0x483c1c[_0x583c9c(0x108)]!==_0x583c9c(0xfc))throw CliErrors['validation'](_0x583c9c(0x109));const _0xb6835d=normalizeSkillRelativePath(_0x483c1c['path']);if(_0x323c75['has'](_0xb6835d))throw CliErrors['validation'](_0x583c9c(0x120)+_0xb6835d);if(!isSha256Hex(_0x483c1c[_0x583c9c(0x107)]))throw CliErrors['validation'](_0x583c9c(0xfa)+_0xb6835d);if(!Number['isSafeInteger'](_0x483c1c[_0x583c9c(0xfe)])||_0x483c1c[_0x583c9c(0xfe)]<0x0)throw CliErrors[_0x583c9c(0xfd)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0xb6835d);_0x323c75[_0x583c9c(0x101)](_0xb6835d,{'path':_0xb6835d,'sha256':_0x483c1c['sha256'][_0x583c9c(0x10d)](),'size':_0x483c1c[_0x583c9c(0xfe)]});}return Array[_0x583c9c(0x122)](_0x323c75[_0x583c9c(0x11d)]())[_0x583c9c(0x10b)](compareSkillFiles);}export function scanSkillDirectory(_0x50e251){const _0x155efd=realpathSync(_0x50e251),_0x56c05c=[];function _0x29627f(_0x5c698e){const _0x2ad01a=a101_0x4ca6,_0x56148b=readdirSync(_0x5c698e,{'withFileTypes':!![]})['sort']((_0x2d3978,_0x225155)=>_0x2d3978[_0x2ad01a(0x119)][_0x2ad01a(0x118)](_0x225155[_0x2ad01a(0x119)]));for(const _0x538a5c of _0x56148b){if(_0x538a5c[_0x2ad01a(0xfb)]()&&IGNORED_DIR_NAMES[_0x2ad01a(0x10f)](_0x538a5c[_0x2ad01a(0x119)]))continue;if(IGNORED_FILE_NAMES[_0x2ad01a(0x10f)](_0x538a5c[_0x2ad01a(0x119)]))continue;const _0x4d9695=resolve(_0x5c698e,_0x538a5c['name']);if(_0x538a5c[_0x2ad01a(0x124)]())throw CliErrors[_0x2ad01a(0xfd)](_0x2ad01a(0xff)+_0x4d9695);const _0x235fc8=toPosixPath(relative(_0x155efd,_0x4d9695));if(_0x538a5c[_0x2ad01a(0xfb)]()){_0x29627f(_0x4d9695);continue;}if(!_0x538a5c[_0x2ad01a(0x123)]())continue;validateSkillRelativePath(_0x235fc8);const _0x3319dc=readFileSync(_0x4d9695);_0x56c05c[_0x2ad01a(0x113)]({'path':_0x235fc8,'bytes':_0x3319dc});}}return _0x29627f(_0x155efd),normalizeLocalFiles(_0x56c05c);}function a101_0x1093(){const _0xc6a21=['string','validation','size','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','set','11604ujdSKh','646252pxRTpl','15543PksqqB','1391pPhDAL','1670PXfQRs','sha256','path','Skill\x20file\x20path\x20must\x20be\x20text.','bytes','sort','94mBPiAc','toLowerCase','Unsafe\x20Skill\x20file\x20path:\x20','has','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','3770oZZIvP','push','isArray','test','6xWuxXv','object','localeCompare','name','68792IwuBiJ','length','utf8','values','trim','content','Duplicate\x20Skill\x20file\x20path:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','from','isFile','isSymbolicLink','51524XGsRGc','12965uMAcxq','357pqsxJC','1158wsHWOi','Skill\x20file\x20sha256\x20is\x20invalid:\x20','isDirectory'];a101_0x1093=function(){return _0xc6a21;};return a101_0x1093();}export function compareSkillFiles(_0x39ef18,_0x305d9b){const _0x1c5805=a101_0x4ca6;if(_0x39ef18[_0x1c5805(0x108)]===SKILL_FILE)return _0x305d9b[_0x1c5805(0x108)]===SKILL_FILE?0x0:-0x1;if(_0x305d9b['path']===SKILL_FILE)return 0x1;return Buffer[_0x1c5805(0x100)](Buffer[_0x1c5805(0x122)](_0x39ef18[_0x1c5805(0x108)],_0x1c5805(0x11c)),Buffer[_0x1c5805(0x122)](_0x305d9b[_0x1c5805(0x108)],_0x1c5805(0x11c)));}export function normalizeSkillRelativePath(_0x1a0cf0){const _0x3f639d=a101_0x4ca6,_0x30cd55=toPosixPath(_0x1a0cf0[_0x3f639d(0x11e)]());return validateSkillRelativePath(_0x30cd55),_0x30cd55;}export function validateSkillRelativePath(_0x1319bb){const _0x53068e=a101_0x4ca6;if(!_0x1319bb||_0x1319bb['startsWith']('/')||_0x1319bb['includes']('//'))throw CliErrors[_0x53068e(0xfd)](_0x53068e(0x10e)+_0x1319bb);for(const _0xdac738 of _0x1319bb['split']('/')){if(!_0xdac738||_0xdac738==='.'||_0xdac738==='..')throw CliErrors['validation'](_0x53068e(0x10e)+_0x1319bb);}}export function toPosixPath(_0x448c41){return _0x448c41['replace'](/\\/g,'/');}export function isSha256Hex(_0x47d5b6){const _0x58525f=a101_0x4ca6;return typeof _0x47d5b6===_0x58525f(0xfc)&&/^[a-fA-F0-9]{64}$/[_0x58525f(0x115)](_0x47d5b6);}
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(_0x4fef0c,_0x5cf48){const _0x1fd283=a102_0x16de,_0x3729e1=_0x4fef0c();while(!![]){try{const _0x383bf6=-parseInt(_0x1fd283(0x1dc))/0x1+-parseInt(_0x1fd283(0x1f8))/0x2+parseInt(_0x1fd283(0x1f2))/0x3+-parseInt(_0x1fd283(0x1e1))/0x4*(parseInt(_0x1fd283(0x1d7))/0x5)+parseInt(_0x1fd283(0x1db))/0x6+-parseInt(_0x1fd283(0x1fe))/0x7+-parseInt(_0x1fd283(0x1f6))/0x8*(-parseInt(_0x1fd283(0x1f9))/0x9);if(_0x383bf6===_0x5cf48)break;else _0x3729e1['push'](_0x3729e1['shift']());}catch(_0x4cf98f){_0x3729e1['push'](_0x3729e1['shift']());}}}(a102_0x3598,0x68317));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a102_0x3598(){const _0x43f172=['flow','env','filter','---','validation','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','description:\x20','pulledAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','description','path','2043180zPhUSg','entries','packageBytes','.\x20Changed\x20file:\x20','3448704jWOkyH','contentHash','1352676eNWCHg','27ipXZch','isFile','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','trimEnd','find','763203EONvaX','slice','displayName','replace','set','length','has','Managed\x20file\x20was\x20removed\x20locally:\x20','\x0a---\x0a\x0a','name','map','appCode','name:\x20','delete','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','accessKey','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','14180iceSPE','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','displayName:\x20','1042374LuigFh','612607lJwCdE','toString','contents','test','join','456dOZPVl','match','errors','keys','fileHashes','trim'];a102_0x3598=function(){return _0x43f172;};return a102_0x3598();}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x7039dd,_0x4dccd9,_0x56a786){const _0x4d2f61=a102_0x16de,_0x31f57b=requireSkillCode(_0x7039dd),_0x3d8331=requirePackageBytes(_0x31f57b,_0x56a786[_0x4d2f61(0x1f4)]),_0x166597=extractDownloadedPackage(_0x3d8331),_0x459819=_0x166597[_0x4d2f61(0x1fd)](_0x565440=>_0x565440[_0x4d2f61(0x1f1)]===SKILL_FILE);if(!_0x459819)throw CliErrors[_0x4d2f61(0x1eb)](_0x4d2f61(0x1d9)+SKILL_FILE+':\x20'+_0x31f57b);const _0x3673ba=withMaterializedSkillFrontmatter(_0x166597,_0x7039dd,_0x31f57b),_0x533073=_0x3673ba[_0x4d2f61(0x1fd)](_0x436ecc=>_0x436ecc[_0x4d2f61(0x1f1)]===SKILL_FILE),_0x3fb7b1=fileText(_0x533073),_0x11af42=getRuntimeSkillDir(_0x56a786[_0x4d2f61(0x1e8)],_0x56a786[_0x4d2f61(0x20e)],_0x56a786['appCode'],_0x4dccd9,_0x31f57b,_0x56a786['paths']),_0x2632f6=resolve(_0x11af42,SKILL_FILE),_0x333df9=resolve(_0x11af42,METADATA_FILE),_0x2fd9bb=contentHash(_0x3fb7b1),_0x2c9b54=readMetadataIfPresent(_0x333df9)?.[_0x4d2f61(0x1e5)];ensurePulledFilesCanBeOverwritten(_0x11af42,_0x333df9,_0x3673ba,_0x56a786['force']===!![]),mkdirSync(_0x11af42,{'recursive':!![],'mode':0x1c0});const _0x48efab=existsSync(_0x2632f6)?readFileSync(_0x2632f6,'utf8'):undefined;return materializeFiles(_0x11af42,_0x3673ba),removeStaleManagedFiles(_0x11af42,_0x2c9b54,_0x3673ba),writeJsonAtomic(_0x333df9,buildMetadata(_0x7039dd,_0x4dccd9,_0x56a786[_0x4d2f61(0x209)],_0x2fd9bb,_0x56a786[_0x4d2f61(0x1ee)],_0x3673ba,_0x3d8331)),{'skill':_0x7039dd,'scope':_0x4dccd9,'dir':_0x11af42,'skillMdPath':_0x2632f6,'metadataPath':_0x333df9,'contentHash':_0x2fd9bb,'changed':_0x48efab!==_0x3fb7b1};}function withMaterializedSkillFrontmatter(_0x67b0ff,_0x35a262,_0x2617b7){const _0x5cd1c0=a102_0x16de,_0x327db2=skillDisplayName(_0x35a262,_0x2617b7),_0x139e19=_0x35a262[_0x5cd1c0(0x1f0)]?.[_0x5cd1c0(0x1e6)]()||_0x327db2||_0x2617b7;return normalizeLocalFiles(_0x67b0ff)[_0x5cd1c0(0x208)](_0x12e667=>{const _0x474f78=_0x5cd1c0,_0xf2675b=fileText(_0x12e667);if(_0x12e667['path']!==SKILL_FILE)return _0x12e667;if(hasYamlFrontmatter(_0xf2675b))return{'path':_0x12e667['path'],'content':withSyncedDisplayName(_0xf2675b,_0x327db2)};return{'path':_0x12e667[_0x474f78(0x1f1)],'content':prependSkillFrontmatter(_0xf2675b,{'name':_0x2617b7,'displayName':_0x327db2,'description':_0x139e19})};});}function hasYamlFrontmatter(_0x4971a3){const _0xf5d485=a102_0x16de;return/^\uFEFF?---\s*\r?\n/[_0xf5d485(0x1df)](_0x4971a3);}function prependSkillFrontmatter(_0x2b089b,_0x56f556){const _0x2e1029=a102_0x16de,_0x884acb=_0x2b089b[_0x2e1029(0x201)](/^\uFEFF/,'');return['---',_0x2e1029(0x20a)+yamlString(_0x56f556[_0x2e1029(0x207)]),_0x56f556[_0x2e1029(0x200)]?_0x2e1029(0x1da)+yamlString(_0x56f556[_0x2e1029(0x200)]):undefined,_0x2e1029(0x1ed)+yamlString(_0x56f556[_0x2e1029(0x1f0)]),_0x2e1029(0x1ea),'',_0x884acb][_0x2e1029(0x1e9)](_0x88200c=>_0x88200c!==undefined)[_0x2e1029(0x1e0)]('\x0a');}function yamlString(_0x5da66c){const _0x5e2d84=a102_0x16de;return JSON['stringify'](_0x5da66c['replace'](/\r/g,'')[_0x5e2d84(0x1e6)]());}function skillDisplayName(_0x50771d,_0x1929b6){const _0x1be59b=a102_0x16de,_0x5721d5=_0x50771d[_0x1be59b(0x1d8)]?.[_0x1be59b(0x1e6)]();return _0x5721d5||_0x1929b6;}function withSyncedDisplayName(_0xac99dd,_0x5901d6){const _0x2d69ae=a102_0x16de,_0x58e97c=_0xac99dd[_0x2d69ae(0x1e2)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x58e97c)return _0xac99dd;const _0x3457d8=_0x58e97c[0x1]??'',_0x70c887=_0x58e97c[0x2]??'',_0x3da02f=parseDocument(_0x70c887);if(_0x3da02f[_0x2d69ae(0x1e3)]['length']>0x0||!isMap(_0x3da02f[_0x2d69ae(0x1de)]))return _0xac99dd;if(_0x5901d6)_0x3da02f[_0x2d69ae(0x202)]('displayName',_0x5901d6);else{if(_0x3da02f['has'](_0x2d69ae(0x200)))_0x3da02f[_0x2d69ae(0x20b)](_0x2d69ae(0x200));else return _0xac99dd;}forceBlockCollections(_0x3da02f[_0x2d69ae(0x1de)]);const _0x3f5141=_0x3da02f[_0x2d69ae(0x1dd)]({'lineWidth':0x0})[_0x2d69ae(0x1fc)](),_0x39bd2a=_0xac99dd[_0x2d69ae(0x1ff)](_0x58e97c[0x0][_0x2d69ae(0x203)])[_0x2d69ae(0x201)](/^\r?\n/,'');return _0x3457d8+_0x2d69ae(0x20d)+_0x3f5141+_0x2d69ae(0x206)+_0x39bd2a;}function a102_0x16de(_0x564225,_0x2af4ce){_0x564225=_0x564225-0x1d6;const _0x3598e1=a102_0x3598();let _0x16de04=_0x3598e1[_0x564225];return _0x16de04;}function forceBlockCollections(_0x9ee1d6){if(!isNode(_0x9ee1d6))return;visit(_0x9ee1d6,(_0x226f5e,_0x37335e)=>{const _0x479c04=a102_0x16de;isCollection(_0x37335e)&&(_0x37335e[_0x479c04(0x1e7)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x23acd6,_0x3d2b85,_0x284972,_0x255e17){const _0x47af01=a102_0x16de;if(_0x255e17||!existsSync(_0x3d2b85))return;const _0x50d857=readMetadataIfPresent(_0x3d2b85);if(!_0x50d857)return;const _0xbd2502=_0x50d857[_0x47af01(0x1e5)]&&Object[_0x47af01(0x1e4)](_0x50d857[_0x47af01(0x1e5)])[_0x47af01(0x203)]>0x0?_0x50d857[_0x47af01(0x1e5)]:undefined;if(_0xbd2502)for(const [_0xebc739,_0x3fe88e]of Object[_0x47af01(0x1f3)](_0xbd2502)){const _0x5c5ec7=resolveManagedFilePath(_0x23acd6,_0xebc739);if(!existsSync(_0x5c5ec7))throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x20c)+_0x23acd6,_0x47af01(0x205)+_0xebc739);const _0x27086e=lstatSync(_0x5c5ec7);if(!_0x27086e[_0x47af01(0x1fa)]())throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x20c)+_0x23acd6,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0xebc739);const _0x42285b=bufferSha256(readFileSync(_0x5c5ec7));if(_0x42285b!==_0x3fe88e)throw CliErrors[_0x47af01(0x1eb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23acd6+_0x47af01(0x1f5)+_0xebc739,_0x47af01(0x1fb)+_0xebc739);}else{const _0x593643=resolve(_0x23acd6,SKILL_FILE);if(existsSync(_0x593643)&&_0x50d857[_0x47af01(0x1f7)]){const _0x44835e=contentHash(readFileSync(_0x593643,'utf8'));if(_0x44835e!==_0x50d857[_0x47af01(0x1f7)])throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x1ec)+_0x593643,_0x47af01(0x1ef));}}for(const _0xd85fdb of normalizeLocalFiles(_0x284972)){if(_0xbd2502?.[_0xd85fdb[_0x47af01(0x1f1)]])continue;if(!_0xbd2502&&_0xd85fdb['path']===SKILL_FILE)continue;const _0x8ac442=resolveManagedFilePath(_0x23acd6,_0xd85fdb[_0x47af01(0x1f1)]);if(!existsSync(_0x8ac442))continue;const _0x3d9546=lstatSync(_0x8ac442);if(!_0x3d9546['isFile']())throw CliErrors[_0x47af01(0x1eb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23acd6,_0x47af01(0x1d6)+_0xd85fdb[_0x47af01(0x1f1)]);const _0x10cedc=bufferSha256(readFileSync(_0x8ac442));if(_0x10cedc!==fileHash(_0xd85fdb))throw CliErrors['validation'](_0x47af01(0x20c)+_0x23acd6,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0xd85fdb['path']);}}function materializeFiles(_0x3c7d51,_0xade40c){const _0x34b3f9=a102_0x16de;for(const _0x1e1ced of normalizeLocalFiles(_0xade40c)){const _0x2f1dfc=resolveManagedFilePath(_0x3c7d51,_0x1e1ced[_0x34b3f9(0x1f1)]);mkdirSync(dirname(_0x2f1dfc),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2f1dfc,fileContent(_0x1e1ced),0x180);}}function removeStaleManagedFiles(_0x4a6cad,_0x351d1a,_0x1bb0af){const _0x242e11=a102_0x16de;if(!_0x351d1a)return;const _0x35b5bb=new Set(normalizeLocalFiles(_0x1bb0af)[_0x242e11(0x208)](_0x31748e=>_0x31748e[_0x242e11(0x1f1)]));for(const _0x124b7e of Object[_0x242e11(0x1e4)](_0x351d1a)){if(_0x35b5bb[_0x242e11(0x204)](_0x124b7e))continue;const _0x1a2711=resolveManagedFilePath(_0x4a6cad,_0x124b7e);existsSync(_0x1a2711)&&lstatSync(_0x1a2711)[_0x242e11(0x1fa)]()&&rmSync(_0x1a2711,{'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(_0x564b79,_0x19330d){const _0x4084e7=a103_0x338c,_0x54f3b6=_0x564b79();while(!![]){try{const _0x49b264=parseInt(_0x4084e7(0x20a))/0x1+-parseInt(_0x4084e7(0x1fc))/0x2*(-parseInt(_0x4084e7(0x1ef))/0x3)+-parseInt(_0x4084e7(0x208))/0x4*(parseInt(_0x4084e7(0x201))/0x5)+parseInt(_0x4084e7(0x204))/0x6*(-parseInt(_0x4084e7(0x1ff))/0x7)+-parseInt(_0x4084e7(0x203))/0x8*(parseInt(_0x4084e7(0x212))/0x9)+-parseInt(_0x4084e7(0x1fe))/0xa*(parseInt(_0x4084e7(0x1f9))/0xb)+-parseInt(_0x4084e7(0x1fb))/0xc*(-parseInt(_0x4084e7(0x20c))/0xd);if(_0x49b264===_0x19330d)break;else _0x54f3b6['push'](_0x54f3b6['shift']());}catch(_0x5089fc){_0x54f3b6['push'](_0x54f3b6['shift']());}}}(a103_0x10f1,0x6e4c7));function a103_0x10f1(){const _0x45f3ef=['description','52980GcgSkC','521610CTMItU','Invalid\x20','468910vtOCES','7JLxiDW','forkedFromVersion','5bLrsPV','utf8','8VmgeYQ','3344310IvSEfF','version','trim','string','2694504RzYWlx','manifest','570933NrYfwr','zipSize','2314birLby','hasUpstreamUpdate','skillName','userId','isArray','map','3685797pkdUGV','skillCode','tags','9nfSIxV','toISOString','path','personal','forkedFromSkillId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','length','object','fromEntries','files','11LvvoYO'];a103_0x10f1=function(){return _0x45f3ef;};return a103_0x10f1();}function a103_0x338c(_0x146e49,_0x5256d4){_0x146e49=_0x146e49-0x1ed;const _0x10f14c=a103_0x10f1();let _0x338ccd=_0x10f14c[_0x146e49];return _0x338ccd;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x2e4165,_0x50c618,_0x375e87,_0x5db8f8,_0x1eada8,_0x174552,_0x3e78aa){const _0x2571d7=a103_0x338c,_0x1653ab=_0x174552?normalizeLocalFiles(_0x174552):[],_0x21a9c4=!_0x3e78aa&&_0x1653ab[_0x2571d7(0x1f5)]>0x0?buildSkillPackage(_0x1653ab):undefined,_0x426382=_0x3e78aa?bufferSha256(_0x3e78aa):_0x21a9c4?.[_0x2571d7(0x209)]['zipSha256'],_0x367a11=_0x3e78aa?.[_0x2571d7(0x1f5)]??_0x21a9c4?.['manifest'][_0x2571d7(0x20b)],_0x3925fc=_0x1653ab[_0x2571d7(0x1f5)]>0x0?Object[_0x2571d7(0x1f7)](_0x1653ab[_0x2571d7(0x211)](_0x4c5502=>[_0x4c5502[_0x2571d7(0x1f1)],fileHash(_0x4c5502)])):undefined;return{'schemaVersion':_0x1653ab[_0x2571d7(0x1f5)]>0x0?0x2:0x1,'id':_0x2e4165['id'],'appCode':_0x375e87,'skillCode':requireSkillCode(_0x2e4165),'skillName':_0x2e4165[_0x2571d7(0x20e)],'description':_0x2e4165[_0x2571d7(0x1fa)],'scope':_0x50c618,'readonly':_0x50c618!==_0x2571d7(0x1f2)||_0x2e4165['readonly']===!![],'tenantCode':_0x2e4165['tenantCode'],'userId':_0x2e4165[_0x2571d7(0x20f)],'version':_0x2e4165[_0x2571d7(0x205)],'status':_0x2e4165['status'],'tags':Array[_0x2571d7(0x210)](_0x2e4165[_0x2571d7(0x1ee)])?_0x2e4165[_0x2571d7(0x1ee)]:[],'hasUpstreamUpdate':_0x2e4165[_0x2571d7(0x20d)],'forkedFromSkillId':_0x2e4165[_0x2571d7(0x1f3)],'forkedFromVersion':_0x2e4165[_0x2571d7(0x200)],'sourceSessionId':_0x2e4165['sourceSessionId'],'contentHash':_0x5db8f8,'fileHashes':_0x3925fc,'treeHash':_0x1653ab['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x1653ab)):undefined,'ossPath':remoteManifestOssPath(_0x2e4165[_0x2571d7(0x1f8)]),'zipSha256':_0x426382,'zipSize':_0x367a11,'files':_0x1653ab[_0x2571d7(0x1f5)]>0x0?_0x1653ab['map'](_0xedad43=>({'path':_0xedad43[_0x2571d7(0x1f1)],'hash':fileHash(_0xedad43),'size':fileContent(_0xedad43)[_0x2571d7(0x1f5)]})):undefined,'pulledAt':_0x1eada8??new Date()[_0x2571d7(0x1f0)]()};}export function requireSkillCode(_0x47c3a7){const _0x1e23af=a103_0x338c,_0x515410=_0x47c3a7[_0x1e23af(0x1ed)]?.[_0x1e23af(0x206)]();if(!_0x515410)throw CliErrors['validation'](_0x1e23af(0x1f4));return _0x515410;}export function readMetadataIfPresent(_0x10f1de){const _0x4e660a=a103_0x338c;if(!existsSync(_0x10f1de))return undefined;try{const _0x49f708=JSON['parse'](readFileSync(_0x10f1de,_0x4e660a(0x202)));return _0x49f708;}catch{throw CliErrors['validation'](_0x4e660a(0x1fd)+METADATA_FILE+':\x20'+_0x10f1de);}}function remoteManifestOssPath(_0x37a5ac){const _0x3c50c3=a103_0x338c;if(!_0x37a5ac||typeof _0x37a5ac!==_0x3c50c3(0x1f6)||Array[_0x3c50c3(0x210)](_0x37a5ac))return undefined;const _0x12286a=_0x37a5ac['ossPath'];return typeof _0x12286a===_0x3c50c3(0x207)&&_0x12286a['trim']()?_0x12286a[_0x3c50c3(0x206)]():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_0x1becd4=a104_0x1560;(function(_0x26f860,_0x563b71){const _0x179d39=a104_0x1560,_0x13772d=_0x26f860();while(!![]){try{const _0x1cbff3=parseInt(_0x179d39(0x1db))/0x1+-parseInt(_0x179d39(0x1d4))/0x2*(-parseInt(_0x179d39(0x1d0))/0x3)+parseInt(_0x179d39(0x1dc))/0x4+-parseInt(_0x179d39(0x1cb))/0x5+parseInt(_0x179d39(0x1ca))/0x6*(parseInt(_0x179d39(0x1e3))/0x7)+-parseInt(_0x179d39(0x1d1))/0x8*(parseInt(_0x179d39(0x1cd))/0x9)+-parseInt(_0x179d39(0x1e0))/0xa;if(_0x1cbff3===_0x563b71)break;else _0x13772d['push'](_0x13772d['shift']());}catch(_0x55f3a0){_0x13772d['push'](_0x13772d['shift']());}}}(a104_0x5748,0x7464e));import{existsSync}from'node:fs';import{homedir}from'node:os';function a104_0x1560(_0xce0980,_0x531301){_0xce0980=_0xce0980-0x1c9;const _0x574898=a104_0x5748();let _0x156049=_0x574898[_0xce0980];return _0x156049;}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(_0xd9d6d5={}){const _0x2cf43a=a104_0x1560,_0x4da3b5=_0xd9d6d5[_0x2cf43a(0x1d9)]??homedir(),_0x51e4ed=resolve(_0x4da3b5,PRODUCT_CONFIG['homeDirName'],_0x2cf43a(0x1ce)),_0x37775c=trimmedEnv(_0x2cf43a(0x1c9)),_0x238d37=trimmedEnv(_0x2cf43a(0x1d2)),_0x2757f8=resolve(_0x4da3b5,_0x2cf43a(0x1df)),_0x5c68c3=_0xd9d6d5[_0x2cf43a(0x1d6)]??(existsSync(_0x2757f8)?resolve(_0x2757f8,_0x2cf43a(0x1d3)):undefined);return{'homeDir':_0x4da3b5,'cacheRoot':_0x51e4ed,'managedRoot':resolve(_0x4da3b5,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0xd9d6d5[_0x2cf43a(0x1de)]??_0x37775c??resolve(_0x4da3b5,_0x2cf43a(0x1dd),_0x2cf43a(0x1d3)),'claudeSkillsDir':_0xd9d6d5[_0x2cf43a(0x1e5)]??_0x238d37??resolve(_0x4da3b5,_0x2cf43a(0x1d8),_0x2cf43a(0x1d3)),'workbuddySkillsDir':_0x5c68c3};}export function runtimeAgentSkillRoots(_0x52e0c2){const _0x2a6ea2=a104_0x1560;return[_0x52e0c2[_0x2a6ea2(0x1de)],_0x52e0c2[_0x2a6ea2(0x1e5)],_0x52e0c2[_0x2a6ea2(0x1d6)]][_0x2a6ea2(0x1e2)](_0x1b4787=>Boolean(_0x1b4787));}export function getRuntimeSkillCacheRoot(_0x43eaea,_0x371003,_0x1498b0={}){const _0x2112ee=a104_0x1560,_0x59c92c=resolveSkillSyncPaths(_0x1498b0);return resolve(_0x59c92c['cacheRoot'],_0x43eaea,fingerprintAccessKey(_0x371003),_0x2112ee(0x1d3));}export function getRuntimeSkillDir(_0x39e72b,_0x385c13,_0x608e7b,_0x1756ef,_0x33383b,_0x31dbcf={}){const _0x152722=a104_0x1560;return resolve(getRuntimeSkillCacheRoot(_0x39e72b,_0x385c13,_0x31dbcf),safePathSegment(_0x608e7b,_0x152722(0x1cc)),_0x1756ef,safePathSegment(_0x33383b,_0x152722(0x1e1)));}function a104_0x5748(){const _0x5a23f5=['cache','Unsafe\x20','27nIOTBd','16yKBTYm','CLAUDE_SKILL_ROOT','skills','41522IsdgFp','includes','workbuddySkillsDir','path\x20segment','.claude','homeDir','validation','371402WGZhin','3614632NLaZcs','.agents','agentsSkillsDir','.workbuddy','3684960lLEdOH','skillCode','filter','19397ufKioC','\x20for\x20local\x20path:\x20','claudeSkillsDir','SKILL_ROOT','834exiqFl','1090350tmTtBg','appCode','3526929hoHfxK'];a104_0x5748=function(){return _0x5a23f5;};return a104_0x5748();}export function safePathSegment(_0x2f01dc,_0x1c9cad=a104_0x1becd4(0x1d7)){const _0x175e5f=a104_0x1becd4;if(!_0x2f01dc||_0x2f01dc[_0x175e5f(0x1d5)]('/')||_0x2f01dc['includes']('\x5c')||_0x2f01dc[_0x175e5f(0x1d5)]('..'))throw CliErrors[_0x175e5f(0x1da)](_0x175e5f(0x1cf)+_0x1c9cad+_0x175e5f(0x1e4)+_0x2f01dc);return _0x2f01dc;}function trimmedEnv(_0x437b13){const _0x6d661b=productEnv(_0x437b13)?.['trim']();return _0x6d661b?_0x6d661b: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(_0x4ba8dd,_0x4d04f4){const _0x117899=a105_0x3a6f,_0x118df1=_0x4ba8dd();while(!![]){try{const _0x307563=-parseInt(_0x117899(0x1ae))/0x1+parseInt(_0x117899(0x19e))/0x2+parseInt(_0x117899(0x1c3))/0x3*(-parseInt(_0x117899(0x1b7))/0x4)+parseInt(_0x117899(0x1d2))/0x5*(-parseInt(_0x117899(0x1b5))/0x6)+-parseInt(_0x117899(0x1a1))/0x7+parseInt(_0x117899(0x1d1))/0x8+parseInt(_0x117899(0x1b0))/0x9;if(_0x307563===_0x4d04f4)break;else _0x118df1['push'](_0x118df1['shift']());}catch(_0x2baa4d){_0x118df1['push'](_0x118df1['shift']());}}}(a105_0x31d1,0x96b88));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x2c46b2}from'yaml';import{CliErrors}from'../../errors.js';function a105_0x3a6f(_0x36da04,_0x4a8a59){_0x36da04=_0x36da04-0x198;const _0x31d14d=a105_0x31d1();let _0x3a6fb0=_0x31d14d[_0x36da04];return _0x3a6fb0;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';function a105_0x31d1(){const _0x4a017f=['string','skillName','5443095wFvkEr','match','object','boolean','skillCode','length','isFile','allowAppCodeRetarget','isDirectory','tags','scope','Unable\x20to\x20resolve\x20skillCode\x20from\x20','version','934925xjbOMJ','some','30152682DOgbyq','path','number','targetScope','trim','150RfTDJy',',\x20or\x20directory\x20name.','68esWwwP','startsWith','\x20has\x20scope=\x22','utf8','sourceSessionId','refreshedAt','content','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','dir','Invalid\x20','metadata','199239CuYKxu','builtin','isArray','replace','ignoreInvalidMetadata','filter','ignoreMetadataScope','\x20name\x20for\x20SkillHub\x20slug\x20generation.','ignoreMetadataSkillCode','files','description','Skill\x20directory\x20not\x20found:\x20','validation','appCode','3272296LJptIC','163105xRIenF','find','isSymbolicLink','ignoreMetadataForPayload','Missing\x20','Skill\x20metadata\x20appCode\x20\x22','packageBase64','Remote\x20Skill\x20','company','\x20has\x20unsupported\x20scope\x20\x22','personal','ignoreMetadataAppCodeMismatch','toLowerCase','1030146jlZDJW'];a105_0x31d1=function(){return _0x4a017f;};return a105_0x31d1();}export function resolvePushDirectoryIdentity(_0x256b99,_0x3dca97,_0x5819e7={}){const _0x4256a1=a105_0x3a6f,_0x5f3793=resolvePushDirectoryRoot(_0x256b99),_0x34b9a1=readPushMetadataIfPresent(resolve(_0x5f3793,METADATA_FILE),{'ignoreInvalidMetadata':_0x5819e7[_0x4256a1(0x1c7)]});if(_0x34b9a1?.[_0x4256a1(0x1d0)]&&_0x34b9a1['appCode']!==_0x3dca97&&!_0x5819e7[_0x4256a1(0x1a8)]&&!_0x5819e7[_0x4256a1(0x19c)])throw CliErrors[_0x4256a1(0x1cf)](_0x4256a1(0x1d7)+_0x34b9a1[_0x4256a1(0x1d0)]+_0x4256a1(0x1be)+_0x3dca97+'\x22.');const _0x5e3f26=resolvePushSkillCode(_0x5f3793,_0x3dca97,_0x34b9a1,_0x5819e7);if(!_0x5e3f26)throw CliErrors[_0x4256a1(0x1cf)](_0x4256a1(0x1ac)+SKILL_FILE+',\x20'+METADATA_FILE+_0x4256a1(0x1b6));return{'dir':_0x5f3793,'skillCode':_0x5e3f26,'metadata':_0x34b9a1};}export function readPushDirectory(_0x5aaf07,_0x28744b,_0x178580={}){const _0x32c65b=a105_0x3a6f,_0x32498d=resolvePushDirectoryIdentity(_0x5aaf07,_0x28744b,_0x178580),_0x550391=_0x32498d[_0x32c65b(0x1c0)],_0x3f57a6=resolve(_0x550391,SKILL_FILE);if(!existsSync(_0x3f57a6)||!lstatSync(_0x3f57a6)[_0x32c65b(0x1a7)]())throw CliErrors[_0x32c65b(0x1cf)](_0x32c65b(0x1d6)+SKILL_FILE+':\x20'+_0x3f57a6);const _0x46e801=_0x32498d[_0x32c65b(0x1c2)],_0x3d0f44=_0x178580[_0x32c65b(0x1b3)]??'personal';if(!_0x178580[_0x32c65b(0x1c9)]&&_0x46e801?.[_0x32c65b(0x1ab)]===_0x32c65b(0x1c4))throw CliErrors[_0x32c65b(0x1cf)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x32c65b(0x1b9)+_0x46e801['scope']+'\x22.');if(!_0x178580[_0x32c65b(0x1c9)]&&_0x3d0f44===_0x32c65b(0x19b)&&_0x46e801?.[_0x32c65b(0x1ab)]&&_0x46e801[_0x32c65b(0x1ab)]!==_0x32c65b(0x19b))throw CliErrors[_0x32c65b(0x1cf)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x32c65b(0x1b9)+_0x46e801['scope']+'\x22.',_0x32c65b(0x1bf)+_0x550391+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x35f2f4=scanSkillDirectory(_0x550391),_0x6b613=buildSkillPackage(_0x35f2f4),_0x460b9d=readFileSync(_0x3f57a6,_0x32c65b(0x1ba)),_0xfe3f1c=_0x32498d[_0x32c65b(0x1a5)],_0x296f7c=_0x178580[_0x32c65b(0x1d5)]?undefined:_0x46e801,_0x1d0aa2=readSkillDisplayName(_0x460b9d);return{'skillCode':_0xfe3f1c,'metadata':_0x46e801,'frontmatterDisplayName':_0x1d0aa2,'input':{'skillCode':_0xfe3f1c,'skillName':_0x1d0aa2??_0x296f7c?.[_0x32c65b(0x1a0)],'description':_0x296f7c?.[_0x32c65b(0x1cd)],'content':_0x460b9d,'files':_0x6b613['manifest'],'packageBase64':_0x6b613[_0x32c65b(0x1d8)],'tags':_0x296f7c?.['tags'],'version':_0x296f7c?.[_0x32c65b(0x1ad)],'sourceSessionId':_0x296f7c?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x1cae12,_0x3f8524,_0x195266,_0x36ba58={}){const _0x460875=a105_0x3a6f,_0x6175cb=resolvePushDirectoryRoot(_0x1cae12),_0x2c66fb=readPushMetadataIfPresent(resolve(_0x6175cb,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x54851c=requireRemoteScope(_0x3f8524),_0x3f0d97=readLocalSkillContent(_0x6175cb),_0x3832ac={..._0x3f8524,'appCode':_0x3f8524[_0x460875(0x1d0)]??_0x195266,'skillName':_0x3f8524[_0x460875(0x1a0)]??_0x2c66fb?.[_0x460875(0x1a0)],'description':_0x3f8524[_0x460875(0x1cd)]??_0x2c66fb?.[_0x460875(0x1cd)],'tags':Array[_0x460875(0x1c5)](_0x3f8524['tags'])?_0x3f8524[_0x460875(0x1aa)]:_0x2c66fb?.[_0x460875(0x1aa)],'sourceSessionId':_0x3f8524[_0x460875(0x1bb)]??_0x2c66fb?.[_0x460875(0x1bb)],'content':_0x3f8524[_0x460875(0x1bd)]??_0x3f0d97},_0x5a6027=buildMetadata(_0x3832ac,_0x54851c,_0x195266,contentHash(_0x3f0d97),_0x36ba58[_0x460875(0x1bc)]);writeJsonAtomic(resolve(_0x6175cb,METADATA_FILE),_0x5a6027);}export function recordPushedRuntimeSkill(_0x5532ad,_0x45bf0a,_0x347a8b,_0x2de695={}){const _0x5e6407=a105_0x3a6f,_0x474d34=resolvePushDirectoryRoot(_0x5532ad),_0x36bac5=scanSkillDirectory(_0x474d34),_0x51d4d8=_0x36bac5[_0x5e6407(0x1d3)](_0x74fc5e=>_0x74fc5e[_0x5e6407(0x1b1)]===SKILL_FILE),_0x27e67a=_0x51d4d8?fileText(_0x51d4d8):'',_0x973d48=tryNormalizePackageManifest(_0x45bf0a[_0x5e6407(0x1cc)]),_0x180f56={..._0x45bf0a,'content':_0x45bf0a[_0x5e6407(0x1bd)]??_0x27e67a,'files':_0x973d48},_0x315090=_0x973d48?normalizeLocalFiles(_0x36bac5)[_0x5e6407(0x1c8)](_0x250e3f=>_0x973d48['files'][_0x5e6407(0x1af)](_0x23d35f=>_0x23d35f[_0x5e6407(0x1b1)]===_0x250e3f['path'])):undefined,_0x8cbbd1=buildMetadata(_0x180f56,_0x2de695[_0x5e6407(0x1ab)]??'personal',_0x347a8b,contentHash(_0x180f56[_0x5e6407(0x1bd)]??''),_0x2de695['pushedAt'],_0x315090);writeJsonAtomic(resolve(_0x474d34,METADATA_FILE),_0x8cbbd1);}export function deriveSkillCodeFromDirectory(_0x5a0a80,_0x631c91){const _0x3e2be3=a105_0x3a6f,_0x30fadf=basename(resolve(_0x5a0a80)),_0x57f4a3=_0x631c91+'--';return _0x30fadf[_0x3e2be3(0x1b8)](_0x57f4a3)?_0x30fadf['slice'](_0x57f4a3[_0x3e2be3(0x1a6)]):_0x30fadf;}function resolvePushSkillCode(_0x5044fb,_0x45eecb,_0x4fd050,_0xaa3b37){const _0x3ab440=a105_0x3a6f,_0x13bb98=deriveSkillCodeFromSkillFile(_0x5044fb)||deriveSkillCodeFromDirectory(_0x5044fb,_0x45eecb);if(_0xaa3b37[_0x3ab440(0x1cb)])return _0x13bb98;return _0x4fd050?.['skillCode']?.[_0x3ab440(0x1b4)]()||_0x13bb98;}function deriveSkillCodeFromSkillFile(_0x55536e){const _0x5b8e6f=a105_0x3a6f,_0x26c05e=resolve(_0x55536e,SKILL_FILE);if(!existsSync(_0x26c05e)||!lstatSync(_0x26c05e)[_0x5b8e6f(0x1a7)]())return undefined;const _0x293d0c=readFileSync(_0x26c05e,'utf8'),_0x23cf69=_0x293d0c[_0x5b8e6f(0x1a2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x23cf69)return undefined;const _0x1828b3=parseFrontmatterObject(_0x23cf69[0x1]??''),_0x114262=scalarToString(_0x1828b3?.['name']);return _0x114262?slugifySkillName(_0x114262):undefined;}function readSkillDisplayName(_0x5a569f){const _0x2d4e33=_0x5a569f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2d4e33)return undefined;const _0x1e27ef=parseFrontmatterObject(_0x2d4e33[0x1]??'');return scalarToString(_0x1e27ef?.['displayName']);}function slugifySkillName(_0x5e7fae){const _0x2bcccf=a105_0x3a6f,_0x20f798=_0x5e7fae[_0x2bcccf(0x1b4)]()[_0x2bcccf(0x19d)]()[_0x2bcccf(0x1c6)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2bcccf(0x1c6)](/^-+/,'')['replace'](/-+$/,'')[_0x2bcccf(0x1c6)](/-{2,}/g,'-');if(!_0x20f798)throw CliErrors[_0x2bcccf(0x1cf)](_0x2bcccf(0x1c1)+SKILL_FILE+_0x2bcccf(0x1ca));return _0x20f798;}function parseFrontmatterObject(_0x42efeb){const _0x40bfe5=a105_0x3a6f;try{const _0x4b6a91=a105_0x2c46b2(_0x42efeb);return _0x4b6a91&&typeof _0x4b6a91===_0x40bfe5(0x1a3)&&!Array[_0x40bfe5(0x1c5)](_0x4b6a91)?_0x4b6a91:undefined;}catch{return undefined;}}function scalarToString(_0x174f7d){const _0x14d3b8=a105_0x3a6f;if(typeof _0x174f7d===_0x14d3b8(0x19f))return _0x174f7d[_0x14d3b8(0x1b4)]();if(typeof _0x174f7d===_0x14d3b8(0x1b2)||typeof _0x174f7d===_0x14d3b8(0x1a4))return String(_0x174f7d);return undefined;}function resolvePushDirectoryRoot(_0x4d9fa6){const _0x5e4a96=a105_0x3a6f,_0x51d1b6=resolve(_0x4d9fa6);if(!existsSync(_0x51d1b6))throw CliErrors[_0x5e4a96(0x1cf)](_0x5e4a96(0x1ce)+_0x4d9fa6);const _0x3ea4bb=lstatSync(_0x51d1b6);if(_0x3ea4bb[_0x5e4a96(0x1a9)]())return _0x51d1b6;if(_0x3ea4bb[_0x5e4a96(0x1d4)]()){const _0xf4d8a=realpathSync(_0x51d1b6);if(lstatSync(_0xf4d8a)['isDirectory']())return _0xf4d8a;}throw CliErrors['validation'](_0x5e4a96(0x1ce)+_0x4d9fa6);}function requireRemoteScope(_0x9c5968){const _0x1c7fda=a105_0x3a6f;if(_0x9c5968[_0x1c7fda(0x1ab)]===_0x1c7fda(0x19b)||_0x9c5968['scope']===_0x1c7fda(0x199)||_0x9c5968['scope']===_0x1c7fda(0x1c4))return _0x9c5968[_0x1c7fda(0x1ab)];throw CliErrors[_0x1c7fda(0x1cf)](_0x1c7fda(0x198)+(_0x9c5968[_0x1c7fda(0x1a5)]||'(unknown)')+_0x1c7fda(0x19a)+(_0x9c5968['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x54b998){const _0x1da0af=a105_0x3a6f,_0x989ccf=resolve(_0x54b998,SKILL_FILE);return existsSync(_0x989ccf)&&lstatSync(_0x989ccf)[_0x1da0af(0x1a7)]()?readFileSync(_0x989ccf,_0x1da0af(0x1ba)):'';}function readPushMetadataIfPresent(_0x4b9ba9,_0xf4aed7={}){const _0x2b4ccb=a105_0x3a6f;try{return readMetadataIfPresent(_0x4b9ba9);}catch(_0x549fa3){if(_0xf4aed7[_0x2b4ccb(0x1c7)])return undefined;throw _0x549fa3;}}
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;}}