@lovrabet/lovrabet-cli 2.1.9-beta.4 → 2.1.9

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 (117) 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/response.js +1 -1
  87. package/lib/framework/runner-confirmation.js +1 -1
  88. package/lib/framework/runner-error.js +1 -1
  89. package/lib/framework/runner.js +1 -1
  90. package/lib/framework/schema-export.js +1 -1
  91. package/lib/framework/service-order.js +1 -1
  92. package/lib/framework/types.js +1 -1
  93. package/lib/generated/build-info.js +1 -1
  94. package/lib/help.js +1 -1
  95. package/lib/skills/npx-skills-add.js +1 -1
  96. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  97. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  98. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  99. package/lib/skills/runtime-skill-sync/links.js +1 -1
  100. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  101. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  102. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  103. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  104. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  105. package/lib/skills/runtime-skill-sync/push.js +1 -1
  106. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  107. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  109. package/lib/skills/runtime-skill-sync.js +1 -1
  110. package/lib/utils/apply-jq-filter.js +1 -1
  111. package/lib/utils/logger.js +1 -1
  112. package/lib/utils/params.js +1 -1
  113. package/lib/utils/platform.js +1 -1
  114. package/lib/utils/update-notice.js +1 -1
  115. package/lib/utils/version.js +1 -1
  116. package/lib/utils/write-cli-side-channel.js +1 -1
  117. package/package.json +1 -1
@@ -1 +1 @@
1
- const a92_0x5b3621=a92_0x76bd;(function(_0x100635,_0x26762d){const _0x274341=a92_0x76bd,_0xec6507=_0x100635();while(!![]){try{const _0x44dded=parseInt(_0x274341(0x1bb))/0x1*(-parseInt(_0x274341(0x1b3))/0x2)+-parseInt(_0x274341(0x1b2))/0x3*(parseInt(_0x274341(0x1ba))/0x4)+parseInt(_0x274341(0x1b9))/0x5*(parseInt(_0x274341(0x1be))/0x6)+-parseInt(_0x274341(0x1af))/0x7*(parseInt(_0x274341(0x1b1))/0x8)+-parseInt(_0x274341(0x1b6))/0x9+-parseInt(_0x274341(0x1b8))/0xa*(-parseInt(_0x274341(0x1b5))/0xb)+parseInt(_0x274341(0x1bc))/0xc;if(_0x44dded===_0x26762d)break;else _0xec6507['push'](_0xec6507['shift']());}catch(_0x561b5e){_0xec6507['push'](_0xec6507['shift']());}}}(a92_0x1de9,0x6d6d6));export const VERSION=a92_0x5b3621(0x1b7);export const GIT_TAG=a92_0x5b3621(0x1b4);export const GIT_COMMIT=a92_0x5b3621(0x1b0);function a92_0x76bd(_0x213805,_0x509cd6){_0x213805=_0x213805-0x1af;const _0x1de930=a92_0x1de9();let _0x76bd6f=_0x1de930[_0x213805];return _0x76bd6f;}function a92_0x1de9(){const _0x134533=['7143228ciLwZO','2.1.9-beta.4','70ntOPea','5HNPtae','52cPmnxw','5XcTnMN','5387808ulBaso','2026-07-09T06:33:29.629Z','5043858todmCT','136717xQkksC','fb11c6a','8DBPVkF','9726WAuMsR','126418iQqmiv','v2.1.9-beta.4','518573JIKsoH'];a92_0x1de9=function(){return _0x134533;};return a92_0x1de9();}export const BUILD_TIME=a92_0x5b3621(0x1bd);
1
+ const a92_0x3a6901=a92_0x1cdb;(function(_0x502a9f,_0x140fc3){const _0x2ff291=a92_0x1cdb,_0xde5dfe=_0x502a9f();while(!![]){try{const _0x64e38c=-parseInt(_0x2ff291(0x1f4))/0x1*(-parseInt(_0x2ff291(0x1f6))/0x2)+parseInt(_0x2ff291(0x1f8))/0x3*(parseInt(_0x2ff291(0x1fa))/0x4)+parseInt(_0x2ff291(0x1f0))/0x5*(parseInt(_0x2ff291(0x1f3))/0x6)+-parseInt(_0x2ff291(0x1fb))/0x7+-parseInt(_0x2ff291(0x1fc))/0x8+parseInt(_0x2ff291(0x1f1))/0x9+-parseInt(_0x2ff291(0x1f7))/0xa*(-parseInt(_0x2ff291(0x1f9))/0xb);if(_0x64e38c===_0x140fc3)break;else _0xde5dfe['push'](_0xde5dfe['shift']());}catch(_0x5072d6){_0xde5dfe['push'](_0xde5dfe['shift']());}}}(a92_0x581a,0x488a2));function a92_0x581a(){const _0x4d461d=['v2.1.9-beta.4','2bEPZFq','4353370RZtTfK','519wUkQCI','11tvwpkz','788ZvIAPh','2988160vTJFNj','1889216QLAVeZ','2026-07-09T11:15:12.395Z','2.1.9','56905PmmZWx','2408274NSVogx','ebf6ccb','6TzuORd','211769liHbfD'];a92_0x581a=function(){return _0x4d461d;};return a92_0x581a();}function a92_0x1cdb(_0x37c557,_0x56db39){_0x37c557=_0x37c557-0x1ee;const _0x581a70=a92_0x581a();let _0x1cdb9d=_0x581a70[_0x37c557];return _0x1cdb9d;}export const VERSION=a92_0x3a6901(0x1ef);export const GIT_TAG=a92_0x3a6901(0x1f5);export const GIT_COMMIT=a92_0x3a6901(0x1f2);export const BUILD_TIME=a92_0x3a6901(0x1ee);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x113e26,_0x437232){const _0x2d4d7d=a93_0x138c,_0x9c3859=_0x113e26();while(!![]){try{const _0x4fc398=parseInt(_0x2d4d7d(0x1d8))/0x1*(parseInt(_0x2d4d7d(0x1e2))/0x2)+-parseInt(_0x2d4d7d(0x1d6))/0x3*(parseInt(_0x2d4d7d(0x1df))/0x4)+parseInt(_0x2d4d7d(0x1da))/0x5+-parseInt(_0x2d4d7d(0x1de))/0x6+-parseInt(_0x2d4d7d(0x1dc))/0x7+-parseInt(_0x2d4d7d(0x1d7))/0x8*(-parseInt(_0x2d4d7d(0x1db))/0x9)+parseInt(_0x2d4d7d(0x1e1))/0xa*(parseInt(_0x2d4d7d(0x1dd))/0xb);if(_0x4fc398===_0x437232)break;else _0x9c3859['push'](_0x9c3859['shift']());}catch(_0x337e1e){_0x9c3859['push'](_0x9c3859['shift']());}}}(a93_0x1199,0x6271c));function a93_0x138c(_0x8c575,_0x4644ff){_0x8c575=_0x8c575-0x1d5;const _0x11991f=a93_0x1199();let _0x138c13=_0x11991f[_0x8c575];return _0x138c13;}import{jsx as a93_0x308087,jsxs as a93_0x78bdc7}from'react/jsx-runtime';function a93_0x1199(){const _0x5ddd32=['6410ZDmysJ','2GkhEfA','column','2031jvMaNP','22072uhWrdz','138683ySFjiC','\x20--help','723965kcGfxY','729tmhjJS','2558444StNkXN','24629omyAdn','3307626QjXitW','3676QiHtJm','green'];a93_0x1199=function(){return _0x5ddd32;};return a93_0x1199();}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 _0x1b719e=a93_0x138c,{exit:_0x5be056}=useApp();return useEffect(()=>{_0x5be056();},[_0x5be056]),a93_0x78bdc7(Box,{'flexDirection':_0x1b719e(0x1d5),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x308087(Box,{'children':a93_0x308087(Text,{'bold':!![],'color':_0x1b719e(0x1e0),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x78bdc7(Box,{'marginTop':0x1,'children':[a93_0x308087(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0x308087(Text,{'bold':!![],'color':_0x1b719e(0x1e0),'children':CLI_BIN_NAME+_0x1b719e(0x1d9)}),a93_0x308087(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x2c2aad,_0x44b30b){const _0x486515=a93_0x59d3,_0x4732fa=_0x2c2aad();while(!![]){try{const _0xab161e=-parseInt(_0x486515(0x1db))/0x1+-parseInt(_0x486515(0x1d4))/0x2*(parseInt(_0x486515(0x1d2))/0x3)+-parseInt(_0x486515(0x1d7))/0x4*(-parseInt(_0x486515(0x1d0))/0x5)+parseInt(_0x486515(0x1da))/0x6*(parseInt(_0x486515(0x1dc))/0x7)+parseInt(_0x486515(0x1d5))/0x8*(-parseInt(_0x486515(0x1d3))/0x9)+parseInt(_0x486515(0x1dd))/0xa*(-parseInt(_0x486515(0x1d1))/0xb)+parseInt(_0x486515(0x1d9))/0xc;if(_0xab161e===_0x44b30b)break;else _0x4732fa['push'](_0x4732fa['shift']());}catch(_0x2ee1e0){_0x4732fa['push'](_0x4732fa['shift']());}}}(a93_0x1865,0xae212));import{jsx as a93_0x47fed1,jsxs as a93_0x18d3a1}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x59d3(_0x149eca,_0xc951ac){_0x149eca=_0x149eca-0x1d0;const _0x18653a=a93_0x1865();let _0x59d3a0=_0x18653a[_0x149eca];return _0x59d3a0;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a93_0x1865(){const _0x1f34ed=['40gAmBgH','column','133745MvzvPa','3046142AihnRI','480765wXnoUs','661959qSmKkR','4wgfQLA','136FaTGqz','\x20--help','92aIIEqQ','green','36358404HspGxX','12jOeaWW','869129pczFYB','2155419VBHEcE'];a93_0x1865=function(){return _0x1f34ed;};return a93_0x1865();}export function Help(){const _0x20ce14=a93_0x59d3,{exit:_0x30336a}=useApp();return useEffect(()=>{_0x30336a();},[_0x30336a]),a93_0x18d3a1(Box,{'flexDirection':_0x20ce14(0x1de),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x47fed1(Box,{'children':a93_0x47fed1(Text,{'bold':!![],'color':_0x20ce14(0x1d8),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x18d3a1(Box,{'marginTop':0x1,'children':[a93_0x47fed1(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0x47fed1(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x20ce14(0x1d6)}),a93_0x47fed1(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
@@ -1 +1 @@
1
- const a94_0xe2f963=a94_0x3ef8;(function(_0x24ec4a,_0x397aa0){const _0x585d96=a94_0x3ef8,_0x243f52=_0x24ec4a();while(!![]){try{const _0x7fab40=parseInt(_0x585d96(0xd5))/0x1+parseInt(_0x585d96(0xe5))/0x2*(-parseInt(_0x585d96(0xe3))/0x3)+-parseInt(_0x585d96(0xd2))/0x4*(parseInt(_0x585d96(0xdd))/0x5)+parseInt(_0x585d96(0xe0))/0x6*(-parseInt(_0x585d96(0xe1))/0x7)+parseInt(_0x585d96(0xdb))/0x8+-parseInt(_0x585d96(0xd3))/0x9+parseInt(_0x585d96(0xd9))/0xa;if(_0x7fab40===_0x397aa0)break;else _0x243f52['push'](_0x243f52['shift']());}catch(_0x2bdf45){_0x243f52['push'](_0x243f52['shift']());}}}(a94_0xc702,0xbabcd));function a94_0xc702(){const _0x10a23a=['7179781EFgoHa','skills','4058946epNjAr','status','2DBZMOk','join','toString','add','618076OBdVQj','9275490OkkWWb','stderr','897638YaLzkm','log','stdout','skipNpxSkillsEnvSuffix','43533290fqmRVL','trim','38544hUtSQL','unknown','35nGpErU','stdio','exit\x20','6JiPezH'];a94_0xc702=function(){return _0x10a23a;};return a94_0xc702();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x155a9e}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x155a9e;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0xe2f963(0xd8)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x3ef8(_0x110de6,_0x1b0dc5){_0x110de6=_0x110de6-0xcf;const _0xc7021b=a94_0xc702();let _0x3ef876=_0xc7021b[_0x110de6];return _0x3ef876;}export function runNpxSkillsAddGlobal(_0x31f0f3,_0x3ca77f=LOVRABET_SKILL_SOURCE,_0x3f5acb){const _0x414b1a=a94_0xe2f963;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x148280=_0x3f5acb?.[_0x414b1a(0xde)]??'inherit',_0x3be75d=resolveNpmBin('npx'),_0x53410a=[_0x414b1a(0xe2),_0x414b1a(0xd1),_0x3ca77f,'-g','-y'],_0x176975=[_0x3be75d,..._0x53410a][_0x414b1a(0xcf)]('\x20');console[_0x414b1a(0xd6)]('*\x20'+_0x176975);const _0x10f43a=spawnSync(_0x3be75d,_0x53410a,{'cwd':_0x31f0f3,'stdio':_0x148280,'env':process.env,'shell':![]});if(_0x10f43a[_0x414b1a(0xe4)]===0x0)return{'ok':!![],'status':0x0};let _0x30132f=_0x414b1a(0xdf)+(_0x10f43a[_0x414b1a(0xe4)]??_0x414b1a(0xdc));if(_0x148280==='pipe'){const _0x493ddd=_0x10f43a[_0x414b1a(0xd4)]?_0x10f43a[_0x414b1a(0xd4)][_0x414b1a(0xd0)]()[_0x414b1a(0xda)]():'',_0x32b16c=_0x10f43a[_0x414b1a(0xd7)]?_0x10f43a[_0x414b1a(0xd7)][_0x414b1a(0xd0)]()[_0x414b1a(0xda)]():'';if(_0x493ddd)_0x30132f=_0x493ddd;else{if(_0x32b16c)_0x30132f=_0x32b16c;}}return{'ok':![],'status':_0x10f43a[_0x414b1a(0xe4)]??null,'error':_0x30132f};}
1
+ const a94_0x3b106a=a94_0xf27d;(function(_0x3dab0c,_0x446e44){const _0x189114=a94_0xf27d,_0x25d002=_0x3dab0c();while(!![]){try{const _0x277d1a=parseInt(_0x189114(0x111))/0x1+parseInt(_0x189114(0x104))/0x2+parseInt(_0x189114(0x102))/0x3*(-parseInt(_0x189114(0x106))/0x4)+parseInt(_0x189114(0x103))/0x5+-parseInt(_0x189114(0x100))/0x6*(-parseInt(_0x189114(0x10d))/0x7)+parseInt(_0x189114(0x116))/0x8*(parseInt(_0x189114(0xff))/0x9)+-parseInt(_0x189114(0xfe))/0xa*(parseInt(_0x189114(0x108))/0xb);if(_0x277d1a===_0x446e44)break;else _0x25d002['push'](_0x25d002['shift']());}catch(_0x1b0f1a){_0x25d002['push'](_0x25d002['shift']());}}}(a94_0x1e28,0x41b44));import{spawnSync}from'node:child_process';function a94_0xf27d(_0x2dc054,_0x1dac80){_0x2dc054=_0x2dc054-0xfe;const _0x1e28bb=a94_0x1e28();let _0xf27dd7=_0x1e28bb[_0x2dc054];return _0xf27dd7;}import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x8c083d}from'../constant/distribution.js';function a94_0x1e28(){const _0x5039f0=['pipe','87670PBZaBF','stdout','trim','unknown','toString','18144bqVmzO','status','skills','stderr','510320OuXsDM','inherit','npx','join','log','8CNyOfy','1230ccXRZK','1114389dsMzXh','1146qeUzxI','stdio','1253181lWsIip','252985vEmZIJ','974702FyCOuG','skipNpxSkillsEnvSuffix','4NoKrTx'];a94_0x1e28=function(){return _0x5039f0;};return a94_0x1e28();}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x8c083d;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x3b106a(0x105)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x3eb3f6,_0xbe0ce0=LOVRABET_SKILL_SOURCE,_0x57850d){const _0x24555e=a94_0x3b106a;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x302e2d=_0x57850d?.[_0x24555e(0x101)]??_0x24555e(0x112),_0x185464=resolveNpmBin(_0x24555e(0x113)),_0xd1840e=[_0x24555e(0x10f),'add',_0xbe0ce0,'-g','-y'],_0x418488=[_0x185464,..._0xd1840e][_0x24555e(0x114)]('\x20');console[_0x24555e(0x115)]('*\x20'+_0x418488);const _0x38c5da=spawnSync(_0x185464,_0xd1840e,{'cwd':_0x3eb3f6,'stdio':_0x302e2d,'env':process.env,'shell':![]});if(_0x38c5da[_0x24555e(0x10e)]===0x0)return{'ok':!![],'status':0x0};let _0x2dcae2='exit\x20'+(_0x38c5da[_0x24555e(0x10e)]??_0x24555e(0x10b));if(_0x302e2d===_0x24555e(0x107)){const _0x2c0492=_0x38c5da[_0x24555e(0x110)]?_0x38c5da[_0x24555e(0x110)][_0x24555e(0x10c)]()[_0x24555e(0x10a)]():'',_0x1c761f=_0x38c5da[_0x24555e(0x109)]?_0x38c5da[_0x24555e(0x109)][_0x24555e(0x10c)]()[_0x24555e(0x10a)]():'';if(_0x2c0492)_0x2dcae2=_0x2c0492;else{if(_0x1c761f)_0x2dcae2=_0x1c761f;}}return{'ok':![],'status':_0x38c5da[_0x24555e(0x10e)]??null,'error':_0x2dcae2};}
@@ -1 +1 @@
1
- const a95_0x4c0495=a95_0x5c39;function a95_0x5c39(_0x47ae22,_0x2442b2){_0x47ae22=_0x47ae22-0xdb;const _0x14bbf5=a95_0x14bb();let _0x5c395d=_0x14bbf5[_0x47ae22];return _0x5c395d;}function a95_0x14bb(){const _0x5d59c9=['25837kYKFmp','600hgykcp','node_modules','.git','.DS_Store','.hg','16tULBBc','.svn','771586yDBqZP','SKILL.md','lovrabet.skill.json','1142815OthRFg','dist','coverage','4021530gfdyjn','3411729mQzJzl','.turbo','1SgvGcr','791492HjMYRu','189585mQwrmk'];a95_0x14bb=function(){return _0x5d59c9;};return a95_0x14bb();}(function(_0x4f9009,_0x2e63b1){const _0x27a1e2=a95_0x5c39,_0x5ce8ca=_0x4f9009();while(!![]){try{const _0x220f02=parseInt(_0x27a1e2(0xe8))/0x1*(-parseInt(_0x27a1e2(0xdf))/0x2)+parseInt(_0x27a1e2(0xea))/0x3+-parseInt(_0x27a1e2(0xe9))/0x4+parseInt(_0x27a1e2(0xe2))/0x5+-parseInt(_0x27a1e2(0xec))/0x6*(-parseInt(_0x27a1e2(0xeb))/0x7)+-parseInt(_0x27a1e2(0xdd))/0x8*(-parseInt(_0x27a1e2(0xe6))/0x9)+-parseInt(_0x27a1e2(0xe5))/0xa;if(_0x220f02===_0x2e63b1)break;else _0x5ce8ca['push'](_0x5ce8ca['shift']());}catch(_0x17dcba){_0x5ce8ca['push'](_0x5ce8ca['shift']());}}}(a95_0x14bb,0x69c31));export const METADATA_FILE=a95_0x4c0495(0xe1);export const SKILL_FILE=a95_0x4c0495(0xe0);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x4c0495(0xdb)]);export const IGNORED_DIR_NAMES=new Set([a95_0x4c0495(0xee),a95_0x4c0495(0xdc),a95_0x4c0495(0xde),a95_0x4c0495(0xed),'.next',a95_0x4c0495(0xe3),'build',a95_0x4c0495(0xe4),a95_0x4c0495(0xe7),'.cache']);
1
+ const a95_0x805b1b=a95_0xd954;(function(_0x54fb50,_0x54cd91){const _0x3cfb4e=a95_0xd954,_0x6457e0=_0x54fb50();while(!![]){try{const _0x4836ae=parseInt(_0x3cfb4e(0x113))/0x1*(parseInt(_0x3cfb4e(0x111))/0x2)+-parseInt(_0x3cfb4e(0x10a))/0x3+-parseInt(_0x3cfb4e(0x10e))/0x4*(-parseInt(_0x3cfb4e(0x109))/0x5)+parseInt(_0x3cfb4e(0x112))/0x6*(parseInt(_0x3cfb4e(0x119))/0x7)+-parseInt(_0x3cfb4e(0x116))/0x8*(parseInt(_0x3cfb4e(0x108))/0x9)+-parseInt(_0x3cfb4e(0x114))/0xa+parseInt(_0x3cfb4e(0x117))/0xb;if(_0x4836ae===_0x54cd91)break;else _0x6457e0['push'](_0x6457e0['shift']());}catch(_0x391321){_0x6457e0['push'](_0x6457e0['shift']());}}}(a95_0x4dd3,0x9fede));export const METADATA_FILE=a95_0x805b1b(0x10f);export const SKILL_FILE=a95_0x805b1b(0x110);function a95_0x4dd3(){const _0x19ba7a=['lovrabet.skill.json','SKILL.md','2ZXZAtd','666iXEhnR','1076393DJTOvN','11465180TdRYZJ','coverage','1085512HeligA','2975731IZifeV','.cache','20055SskQxj','dist','.svn','.turbo','27JPfjZy','957305agjiAC','1240737otbQRl','.next','node_modules','.DS_Store','20ZlbTRH'];a95_0x4dd3=function(){return _0x19ba7a;};return a95_0x4dd3();}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x805b1b(0x10d)]);function a95_0xd954(_0x5dc0e2,_0x4adf04){_0x5dc0e2=_0x5dc0e2-0x106;const _0x4dd346=a95_0x4dd3();let _0xd95401=_0x4dd346[_0x5dc0e2];return _0xd95401;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a95_0x805b1b(0x106),a95_0x805b1b(0x10c),a95_0x805b1b(0x10b),a95_0x805b1b(0x11a),'build',a95_0x805b1b(0x115),a95_0x805b1b(0x107),a95_0x805b1b(0x118)]);
@@ -1 +1 @@
1
- (function(_0x58f49c,_0x49bd97){const _0x963b7c=a96_0x3914,_0x119aa9=_0x58f49c();while(!![]){try{const _0x3b5651=parseInt(_0x963b7c(0x106))/0x1+-parseInt(_0x963b7c(0x10e))/0x2+-parseInt(_0x963b7c(0x10c))/0x3*(parseInt(_0x963b7c(0x108))/0x4)+-parseInt(_0x963b7c(0xff))/0x5*(-parseInt(_0x963b7c(0x10d))/0x6)+-parseInt(_0x963b7c(0x109))/0x7*(parseInt(_0x963b7c(0x107))/0x8)+-parseInt(_0x963b7c(0x102))/0x9*(-parseInt(_0x963b7c(0xfd))/0xa)+parseInt(_0x963b7c(0x105))/0xb*(parseInt(_0x963b7c(0x10b))/0xc);if(_0x3b5651===_0x49bd97)break;else _0x119aa9['push'](_0x119aa9['shift']());}catch(_0xd83cba){_0x119aa9['push'](_0x119aa9['shift']());}}}(a96_0x2870,0x7cace));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(_0x28e9d9,_0x2402fa){const _0x3f7e4a=a96_0x3914,_0x4611c6=normalizeSkillRelativePath(_0x2402fa),_0x2cc712=realOrResolved(_0x28e9d9),_0x56a985=resolve(_0x2cc712,..._0x4611c6[_0x3f7e4a(0x10f)]('/'));if(!isPathInside(_0x56a985,_0x2cc712))throw CliErrors[_0x3f7e4a(0x100)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x2402fa);return ensureNoSymlinkInManagedPath(_0x2cc712,_0x4611c6),_0x56a985;}export function ensureNoSymlinkInManagedPath(_0x198a5f,_0x35eae4){const _0x26c4c0=a96_0x3914;let _0xabd1d=_0x198a5f;for(const _0x16f19e of _0x35eae4[_0x26c4c0(0x10f)]('/')){_0xabd1d=resolve(_0xabd1d,_0x16f19e);const _0x1443cc=lstatIfPresent(_0xabd1d);if(_0x1443cc?.[_0x26c4c0(0x103)]())throw CliErrors[_0x26c4c0(0x100)](_0x26c4c0(0x104)+_0x35eae4);}}function a96_0x3914(_0x8e1abb,_0x42a0c4){_0x8e1abb=_0x8e1abb-0xfb;const _0x2870b3=a96_0x2870();let _0x39147a=_0x2870b3[_0x8e1abb];return _0x39147a;}export function isDanglingSymlink(_0xb15d4e){try{return lstatSync(_0xb15d4e)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x17f29b){const _0x469c73=readlinkSync(_0x17f29b);return isAbsolute(_0x469c73)?_0x469c73:resolve(dirname(_0x17f29b),_0x469c73);}function a96_0x2870(){const _0x36375a=['startsWith','4293585RJihms','isSymbolicLink','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','11MTbJVE','573820gfBmUW','352gdDiWg','64FLnphy','33691eIgbWT','endsWith','3162252xpZgPz','29910LBDdUx','3606EgHGby','1080046iRcklM','split','utf8','.tmp','from','10SKdFNu','stringify','895UmQvxt','validation'];a96_0x2870=function(){return _0x36375a;};return a96_0x2870();}export function isPathInside(_0x28164b,_0x1b8822){const _0x2a2d8a=a96_0x3914,_0x2fa747=_0x28164b['endsWith'](sep)?_0x28164b:''+_0x28164b+sep,_0x268ff4=_0x1b8822[_0x2a2d8a(0x10a)](sep)?_0x1b8822:''+_0x1b8822+sep;return _0x28164b===_0x1b8822||_0x2fa747[_0x2a2d8a(0x101)](_0x268ff4);}export function realOrResolved(_0x9fe9ff){try{return realpathSync(_0x9fe9ff);}catch{return resolve(_0x9fe9ff);}}export function lstatIfPresent(_0x524573){try{return lstatSync(_0x524573);}catch{return undefined;}}export function writeTextAtomic(_0x30ba04,_0x1e6d5a,_0x5859c3){const _0x4d207b=a96_0x3914;writeBytesAtomic(_0x30ba04,Buffer[_0x4d207b(0xfc)](_0x1e6d5a,_0x4d207b(0x110)),_0x5859c3);}export function writeBytesAtomic(_0x2a56e4,_0x34ba82,_0x4cee6d){const _0x2facc9=a96_0x3914,_0x38747f=_0x2a56e4+_0x2facc9(0xfb);try{writeFileSync(_0x38747f,_0x34ba82,{'mode':_0x4cee6d}),renameSync(_0x38747f,_0x2a56e4);}catch(_0x4b7908){try{rmSync(_0x38747f,{'force':!![]});}catch{}throw _0x4b7908;}}export function writeJsonAtomic(_0x2412f0,_0x281465){const _0x57679a=a96_0x3914;writeTextAtomic(_0x2412f0,JSON[_0x57679a(0xfe)](_0x281465,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x54e864,_0x5455a8){const _0xb6f4d4=a96_0xb017,_0x4d79bf=_0x54e864();while(!![]){try{const _0xa80c38=parseInt(_0xb6f4d4(0x189))/0x1*(-parseInt(_0xb6f4d4(0x17e))/0x2)+parseInt(_0xb6f4d4(0x183))/0x3*(-parseInt(_0xb6f4d4(0x18c))/0x4)+-parseInt(_0xb6f4d4(0x18b))/0x5*(parseInt(_0xb6f4d4(0x17b))/0x6)+parseInt(_0xb6f4d4(0x18d))/0x7*(parseInt(_0xb6f4d4(0x18a))/0x8)+-parseInt(_0xb6f4d4(0x18e))/0x9+parseInt(_0xb6f4d4(0x182))/0xa+parseInt(_0xb6f4d4(0x186))/0xb;if(_0xa80c38===_0x5455a8)break;else _0x4d79bf['push'](_0x4d79bf['shift']());}catch(_0x3180ba){_0x4d79bf['push'](_0x4d79bf['shift']());}}}(a96_0x2883,0x7a712));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';function a96_0xb017(_0x32206f,_0x590916){_0x32206f=_0x32206f-0x17b;const _0x288315=a96_0x2883();let _0xb017e3=_0x288315[_0x32206f];return _0xb017e3;}import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';function a96_0x2883(){const _0x32847b=['1LldPCa','426184bEvYgo','207925yTxuhM','4IsqSbn','77ODOhVp','781938ffCvsL','36gBXJLY','isSymbolicLink','endsWith','611174PqREdZ','from','split','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','6744450TNgAyM','2146506MSmpvP','startsWith','.tmp','6584105XweZaB','validation','stringify'];a96_0x2883=function(){return _0x32847b;};return a96_0x2883();}export function resolveManagedFilePath(_0x200bcb,_0x57eb20){const _0x2c8e51=a96_0xb017,_0x12c80a=normalizeSkillRelativePath(_0x57eb20),_0x549bee=realOrResolved(_0x200bcb),_0x2b37ed=resolve(_0x549bee,..._0x12c80a[_0x2c8e51(0x180)]('/'));if(!isPathInside(_0x2b37ed,_0x549bee))throw CliErrors[_0x2c8e51(0x187)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x57eb20);return ensureNoSymlinkInManagedPath(_0x549bee,_0x12c80a),_0x2b37ed;}export function ensureNoSymlinkInManagedPath(_0x480903,_0x5b70c4){const _0xfd2098=a96_0xb017;let _0x4672f2=_0x480903;for(const _0x2fe159 of _0x5b70c4[_0xfd2098(0x180)]('/')){_0x4672f2=resolve(_0x4672f2,_0x2fe159);const _0x1f2ee3=lstatIfPresent(_0x4672f2);if(_0x1f2ee3?.[_0xfd2098(0x17c)]())throw CliErrors[_0xfd2098(0x187)](_0xfd2098(0x181)+_0x5b70c4);}}export function isDanglingSymlink(_0x310ad5){const _0x2fdf39=a96_0xb017;try{return lstatSync(_0x310ad5)[_0x2fdf39(0x17c)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4e1545){const _0x5a262f=readlinkSync(_0x4e1545);return isAbsolute(_0x5a262f)?_0x5a262f:resolve(dirname(_0x4e1545),_0x5a262f);}export function isPathInside(_0x352fc7,_0x100300){const _0x4f9552=a96_0xb017,_0x4f16ff=_0x352fc7['endsWith'](sep)?_0x352fc7:''+_0x352fc7+sep,_0x3f7696=_0x100300[_0x4f9552(0x17d)](sep)?_0x100300:''+_0x100300+sep;return _0x352fc7===_0x100300||_0x4f16ff[_0x4f9552(0x184)](_0x3f7696);}export function realOrResolved(_0x657218){try{return realpathSync(_0x657218);}catch{return resolve(_0x657218);}}export function lstatIfPresent(_0x2b74b4){try{return lstatSync(_0x2b74b4);}catch{return undefined;}}export function writeTextAtomic(_0x3d093b,_0x11daf3,_0x66e57e){const _0x2d4920=a96_0xb017;writeBytesAtomic(_0x3d093b,Buffer[_0x2d4920(0x17f)](_0x11daf3,'utf8'),_0x66e57e);}export function writeBytesAtomic(_0x4c0917,_0x213bb8,_0x1b8ae4){const _0x309b89=a96_0xb017,_0x30768f=_0x4c0917+_0x309b89(0x185);try{writeFileSync(_0x30768f,_0x213bb8,{'mode':_0x1b8ae4}),renameSync(_0x30768f,_0x4c0917);}catch(_0x57a5e1){try{rmSync(_0x30768f,{'force':!![]});}catch{}throw _0x57a5e1;}}export function writeJsonAtomic(_0x1d140d,_0x4fe77a){const _0x688a7d=a96_0xb017;writeTextAtomic(_0x1d140d,JSON[_0x688a7d(0x188)](_0x4fe77a,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x3382f1,_0x1ad538){const _0x4e35f2=a97_0x1223,_0x2be9bd=_0x3382f1();while(!![]){try{const _0x539331=-parseInt(_0x4e35f2(0x1da))/0x1*(-parseInt(_0x4e35f2(0x1ce))/0x2)+parseInt(_0x4e35f2(0x1d7))/0x3*(-parseInt(_0x4e35f2(0x1d2))/0x4)+parseInt(_0x4e35f2(0x1d3))/0x5+-parseInt(_0x4e35f2(0x1d8))/0x6+parseInt(_0x4e35f2(0x1d6))/0x7+parseInt(_0x4e35f2(0x1d4))/0x8+-parseInt(_0x4e35f2(0x1d1))/0x9;if(_0x539331===_0x1ad538)break;else _0x2be9bd['push'](_0x2be9bd['shift']());}catch(_0x1c5f1c){_0x2be9bd['push'](_0x2be9bd['shift']());}}}(a97_0x221b,0x9d191));import{createHash}from'node:crypto';function a97_0x1223(_0xff604d,_0x1b857b){_0xff604d=_0xff604d-0x1cd;const _0x221bf8=a97_0x221b();let _0x122385=_0x221bf8[_0xff604d];return _0x122385;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x54abe7){const _0x5d34d4=a97_0x1223;return createHash(_0x5d34d4(0x1d5))[_0x5d34d4(0x1cf)](_0x54abe7)[_0x5d34d4(0x1d9)](_0x5d34d4(0x1cd));}function a97_0x221b(){const _0x346843=['334QehoYo','update','path','2252493qkEOLt','32ULGhET','1145980ZPnZJs','5913472KVTDuy','sha256','8274483acZlei','386790YZQUVN','1846542WzIeGl','digest','494vkRigL','hex'];a97_0x221b=function(){return _0x346843;};return a97_0x221b();}export function fileHash(_0x79b9c5){return bufferSha256(fileContent(_0x79b9c5));}export function bufferSha256(_0x45a599){const _0x2524d0=a97_0x1223;return createHash(_0x2524d0(0x1d5))['update'](_0x45a599)[_0x2524d0(0x1d9)]('hex');}export function fileTreeHash(_0x2b93a0){const _0x4de6ed=a97_0x1223,_0x4fc2ba=createHash(_0x4de6ed(0x1d5));for(const _0x3a03d7 of normalizeManifestFiles(_0x2b93a0)){_0x4fc2ba['update'](_0x3a03d7[_0x4de6ed(0x1d0)]),_0x4fc2ba['update']('\x00'),_0x4fc2ba[_0x4de6ed(0x1cf)](_0x3a03d7[_0x4de6ed(0x1d5)]),_0x4fc2ba[_0x4de6ed(0x1cf)]('\x00'),_0x4fc2ba[_0x4de6ed(0x1cf)](String(_0x3a03d7['size'])),_0x4fc2ba[_0x4de6ed(0x1cf)]('\x00');}return _0x4fc2ba[_0x4de6ed(0x1d9)](_0x4de6ed(0x1cd));}
1
+ (function(_0x235379,_0x27a372){const _0x28ab69=a97_0x13b9,_0x144929=_0x235379();while(!![]){try{const _0x4dabc6=parseInt(_0x28ab69(0x11e))/0x1*(parseInt(_0x28ab69(0x11f))/0x2)+-parseInt(_0x28ab69(0x116))/0x3*(parseInt(_0x28ab69(0x11d))/0x4)+-parseInt(_0x28ab69(0x114))/0x5+parseInt(_0x28ab69(0x115))/0x6*(-parseInt(_0x28ab69(0x11c))/0x7)+-parseInt(_0x28ab69(0x11a))/0x8*(parseInt(_0x28ab69(0x113))/0x9)+-parseInt(_0x28ab69(0x117))/0xa+parseInt(_0x28ab69(0x119))/0xb;if(_0x4dabc6===_0x27a372)break;else _0x144929['push'](_0x144929['shift']());}catch(_0x2b4a7a){_0x144929['push'](_0x144929['shift']());}}}(a97_0x8090,0x75dc8));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x347c15){const _0x3f53ce=a97_0x13b9;return createHash(_0x3f53ce(0x120))[_0x3f53ce(0x118)](_0x347c15)['digest']('hex');}function a97_0x8090(){const _0x189777=['2465912GbGeMJ','1NWnuJL','1237090ZKpwQy','sha256','path','7380yckRnX','297070dBHoVl','6laiWCb','3RdbQiT','3317170DjLMkk','update','15603808piwbsu','4776PrGwHz','hex','400148XzQWpY'];a97_0x8090=function(){return _0x189777;};return a97_0x8090();}export function fileHash(_0x1b9c40){return bufferSha256(fileContent(_0x1b9c40));}function a97_0x13b9(_0x129155,_0x188aa7){_0x129155=_0x129155-0x112;const _0x80901a=a97_0x8090();let _0x13b9f3=_0x80901a[_0x129155];return _0x13b9f3;}export function bufferSha256(_0x34454f){const _0x5cb752=a97_0x13b9;return createHash(_0x5cb752(0x120))[_0x5cb752(0x118)](_0x34454f)['digest'](_0x5cb752(0x11b));}export function fileTreeHash(_0x3dfb39){const _0x5048b9=a97_0x13b9,_0x44688b=createHash(_0x5048b9(0x120));for(const _0xb0a300 of normalizeManifestFiles(_0x3dfb39)){_0x44688b['update'](_0xb0a300[_0x5048b9(0x112)]),_0x44688b[_0x5048b9(0x118)]('\x00'),_0x44688b[_0x5048b9(0x118)](_0xb0a300[_0x5048b9(0x120)]),_0x44688b[_0x5048b9(0x118)]('\x00'),_0x44688b[_0x5048b9(0x118)](String(_0xb0a300['size'])),_0x44688b['update']('\x00');}return _0x44688b['digest'](_0x5048b9(0x11b));}
@@ -1 +1 @@
1
- (function(_0x5b62aa,_0x29b03c){const _0x3a7f94=a98_0x14ff,_0x478dab=_0x5b62aa();while(!![]){try{const _0x54d829=parseInt(_0x3a7f94(0x100))/0x1+parseInt(_0x3a7f94(0x117))/0x2*(-parseInt(_0x3a7f94(0x121))/0x3)+parseInt(_0x3a7f94(0x108))/0x4*(-parseInt(_0x3a7f94(0x111))/0x5)+parseInt(_0x3a7f94(0x11c))/0x6+-parseInt(_0x3a7f94(0x122))/0x7*(-parseInt(_0x3a7f94(0xfd))/0x8)+-parseInt(_0x3a7f94(0x10e))/0x9+parseInt(_0x3a7f94(0x107))/0xa;if(_0x54d829===_0x29b03c)break;else _0x478dab['push'](_0x478dab['shift']());}catch(_0x57f9c1){_0x478dab['push'](_0x478dab['shift']());}}}(a98_0x1243,0xd84e1));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x50fb86 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}=a98_0x50fb86;export function linkEffectiveRuntimeSkills(_0x5b1e5d,_0x4b232b,_0x5cb14e={}){const _0x31f043=a98_0x14ff,_0x35b7cc=new Map();for(const _0x10d1e3 of _0x5b1e5d){const _0x2c109c=_0x10d1e3[_0x31f043(0x106)]['skillCode'];if(!_0x2c109c)continue;const _0x1baaf2=_0x35b7cc[_0x31f043(0x120)](_0x2c109c);(!_0x1baaf2||_0x10d1e3['scope']===_0x31f043(0x118))&&_0x35b7cc[_0x31f043(0x10c)](_0x2c109c,_0x10d1e3);}const _0x1baf7f=[],_0x244e99=resolveSkillSyncPaths(_0x5cb14e);for(const _0x11ee8d of _0x35b7cc['values']()){const _0x39347f=requireSkillCode(_0x11ee8d[_0x31f043(0x106)]),_0x55abdc=_0x4b232b+'--'+_0x39347f;for(const _0x569a84 of runtimeAgentSkillRoots(_0x244e99)){_0x1baf7f[_0x31f043(0x127)](ensureManagedSymlink(resolve(_0x569a84,_0x55abdc),_0x11ee8d[_0x31f043(0x10b)],_0x244e99[_0x31f043(0x115)]));}}return _0x1baf7f;}function a98_0x14ff(_0xe65f7b,_0x3021d7){_0xe65f7b=_0xe65f7b-0xf7;const _0x124345=a98_0x1243();let _0x14ffde=_0x124345[_0xe65f7b];return _0x14ffde;}export function pruneStaleRuntimeSkillLinks(_0x54b6d2,_0x4bc60a,_0x3b93fa={},_0xeaa06f){const _0x468462=a98_0x14ff,_0x27b20f=resolveSkillSyncPaths(_0x3b93fa),_0x572268=new Set([..._0x4bc60a][_0x468462(0xfa)](_0x1ebb2d=>_0x1ebb2d[_0x468462(0x123)]())['filter'](Boolean)),_0x2ea8d6=_0xeaa06f?new Set([..._0xeaa06f][_0x468462(0xfa)](_0x203998=>_0x203998[_0x468462(0x123)]())[_0x468462(0x102)](Boolean)):undefined,_0x9952c2=[];for(const _0x349443 of runtimeAgentSkillRoots(_0x27b20f)){for(const _0x1a1d79 of managedAppSkillLinkPaths(_0x349443,_0x54b6d2)){const _0x2436a1=basename(_0x1a1d79)[_0x468462(0xf9)]((_0x54b6d2+'--')['length']);if(_0x2ea8d6&&!_0x2ea8d6[_0x468462(0x116)](_0x2436a1))continue;if(_0x572268[_0x468462(0x116)](_0x2436a1))continue;_0x9952c2[_0x468462(0x127)](removeManagedSkillLink(_0x1a1d79,_0x27b20f['managedRoot']));}}return _0x9952c2;}function a98_0x1243(){const _0xe0ae69=['updated','company','skillCode','3673494vGsnhb','activeSkillCodes','scopes','created','get','3xBZoHj','256914cVaFWi','trim','not-managed-symlink','startsWith','pruneSkillCodes','push','isSymbolicLink','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','slice','map','metadata-mismatch','scope','128ODdFvZ','removed','builtin','1604433lOwKHf','name','filter','env','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','validation','skill','14426760PlRDFB','1048pkYGnF','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','skipped','dir','set','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','13855995aHWyFF','appCode','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','14285IebZhg','contentHash','isDirectory','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','managedRoot','has','2145032qbVDaz','personal'];a98_0x1243=function(){return _0xe0ae69;};return a98_0x1243();}export function pruneStaleRuntimeSkillCache(_0x4e168a,_0x510e8d={}){const _0x3eb51d=a98_0x14ff,_0x44e07a=new Set([..._0x4e168a[_0x3eb51d(0x11d)]][_0x3eb51d(0xfa)](_0x47730e=>_0x47730e[_0x3eb51d(0x123)]())[_0x3eb51d(0x102)](Boolean)),_0x2daaf3=_0x4e168a[_0x3eb51d(0x126)]?new Set([..._0x4e168a[_0x3eb51d(0x126)]][_0x3eb51d(0xfa)](_0x584ae1=>_0x584ae1[_0x3eb51d(0x123)]())[_0x3eb51d(0x102)](Boolean)):undefined,_0x52ced0=_0x4e168a[_0x3eb51d(0x11e)]??[_0x3eb51d(0x118),_0x3eb51d(0x11a)],_0x4c28d1=resolve(getRuntimeSkillCacheRoot(_0x4e168a[_0x3eb51d(0x103)],_0x4e168a['accessKey'],_0x510e8d),safePathSegment(_0x4e168a[_0x3eb51d(0x10f)],_0x3eb51d(0x10f))),_0x50fa81=[];for(const _0x3ced2d of _0x52ced0){const _0x2fad04=resolve(_0x4c28d1,_0x3ced2d);if(!existsSync(_0x2fad04))continue;for(const _0x1fdd93 of readdirSync(_0x2fad04,{'withFileTypes':!![]})){if(!_0x1fdd93[_0x3eb51d(0x113)]())continue;const _0x34cd5a=_0x1fdd93['name'];if(_0x2daaf3&&!_0x2daaf3[_0x3eb51d(0x116)](_0x34cd5a))continue;if(_0x44e07a[_0x3eb51d(0x116)](_0x34cd5a))continue;const _0xd90d31=resolve(_0x2fad04,_0x34cd5a),_0x134250=readMetadataIfPresent(resolve(_0xd90d31,METADATA_FILE));if(_0x134250?.['appCode']!==_0x4e168a[_0x3eb51d(0x10f)]||_0x134250[_0x3eb51d(0xfc)]!==_0x3ced2d||_0x134250[_0x3eb51d(0x11b)]!==_0x34cd5a){_0x50fa81['push']({'path':_0xd90d31,'action':_0x3eb51d(0x10a),'reason':_0x3eb51d(0xfb)});continue;}removeSync(_0xd90d31),_0x50fa81['push']({'path':_0xd90d31,'action':'removed'});}}return _0x50fa81;}export function linkGlobalRuntimeSkills(_0x2d2a3d,_0xbe4fcd={}){const _0x483c9e=a98_0x14ff,_0x3a5396=resolveSkillSyncPaths(_0xbe4fcd),_0x3faf54=[];for(const _0x39b403 of _0x2d2a3d){if(_0x39b403[_0x483c9e(0xfc)]!==_0x483c9e(0xff))throw CliErrors[_0x483c9e(0x105)](_0x483c9e(0x114)+_0x39b403[_0x483c9e(0xfc)]);const _0x257384=requireSkillCode(_0x39b403[_0x483c9e(0x106)]),_0x379015=copyManagedSkillDirectory(_0x39b403[_0x483c9e(0x10b)],resolve(_0x3a5396['agentsSkillsDir'],_0x257384));_0x3faf54[_0x483c9e(0x127)]({..._0x379015,'contentHash':_0x39b403[_0x483c9e(0x112)]});}return _0x3faf54;}function ensureManagedSymlink(_0x5019f4,_0x24ece4,_0x449816){const _0x28972b=a98_0x14ff;mkdirSync(dirname(_0x5019f4),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5019f4)||isDanglingSymlink(_0x5019f4)){const _0x3c599f=lstatSync(_0x5019f4);if(!_0x3c599f['isSymbolicLink']())throw CliErrors['validation'](_0x28972b(0x104)+_0x5019f4);const _0x42110b=resolveSymlinkTarget(_0x5019f4);if(!isPathInside(realOrResolved(_0x42110b),realOrResolved(_0x449816)))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x5019f4);if(realOrResolved(_0x42110b)===realOrResolved(_0x24ece4))return{'path':_0x5019f4,'target':_0x24ece4,'action':'unchanged'};return unlinkSync(_0x5019f4),symlinkSync(_0x24ece4,_0x5019f4,_0x28972b(0x10b)),{'path':_0x5019f4,'target':_0x24ece4,'action':_0x28972b(0x119)};}return symlinkSync(_0x24ece4,_0x5019f4,_0x28972b(0x10b)),{'path':_0x5019f4,'target':_0x24ece4,'action':_0x28972b(0x11f)};}function managedAppSkillLinkPaths(_0x2097a6,_0xfc18b){const _0x5530e9=a98_0x14ff;if(!existsSync(_0x2097a6))return[];const _0x2f5e7f=_0xfc18b+'--';return readdirSync(_0x2097a6,{'withFileTypes':!![]})['filter'](_0x438862=>_0x438862[_0x5530e9(0x101)][_0x5530e9(0x125)](_0x2f5e7f))[_0x5530e9(0xfa)](_0x66d844=>resolve(_0x2097a6,_0x66d844[_0x5530e9(0x101)]));}function removeManagedSkillLink(_0x5d6a67,_0x46c032){const _0x4a5358=a98_0x14ff,_0x3a585f=lstatIfPresent(_0x5d6a67);if(!_0x3a585f?.[_0x4a5358(0xf7)]())return{'path':_0x5d6a67,'action':_0x4a5358(0x10a),'reason':_0x4a5358(0x124)};const _0x52915d=resolveSymlinkTarget(_0x5d6a67);if(!isPathInside(realOrResolved(_0x52915d),realOrResolved(_0x46c032)))return{'path':_0x5d6a67,'action':'skipped','reason':'external-symlink'};return unlinkSync(_0x5d6a67),{'path':_0x5d6a67,'action':_0x4a5358(0xfe)};}export function copyManagedSkillDirectory(_0x4d029c,_0x3f2ec6){const _0x55d47f=a98_0x14ff,_0x243ffd=resolve(_0x3f2ec6,METADATA_FILE),_0x119070=existsSync(_0x3f2ec6);if(_0x119070){const _0x5acdcc=lstatSync(_0x3f2ec6);if(_0x5acdcc[_0x55d47f(0xf7)]())throw CliErrors[_0x55d47f(0x105)](_0x55d47f(0xf8)+_0x3f2ec6);if(!_0x5acdcc['isDirectory']())throw CliErrors[_0x55d47f(0x105)](_0x55d47f(0x10d)+_0x3f2ec6);const _0x1146a9=readMetadataIfPresent(_0x243ffd);if(_0x1146a9?.[_0x55d47f(0xfc)]!==_0x55d47f(0xff))throw CliErrors[_0x55d47f(0x105)](_0x55d47f(0x109)+_0x3f2ec6);}ensureDirSync(dirname(_0x3f2ec6));const _0x3a2a10=_0x119070?readMetadataIfPresent(_0x243ffd)?.[_0x55d47f(0x112)]:undefined,_0x58d8ae=readMetadataIfPresent(resolve(_0x4d029c,METADATA_FILE))?.[_0x55d47f(0x112)];return _0x119070&&removeSync(_0x3f2ec6),copySkillDirectory(_0x4d029c,_0x3f2ec6),{'path':_0x3f2ec6,'target':_0x4d029c,'action':!_0x119070?_0x55d47f(0x11f):_0x3a2a10===_0x58d8ae?'unchanged':_0x55d47f(0x119)};}function copySkillDirectory(_0x5ab4ca,_0x2a60ef){copySync(_0x5ab4ca,_0x2a60ef,{'dereference':![],'overwrite':!![],'filter'(_0x5b3088){const _0x1bb0ce=a98_0x14ff;if(lstatSync(_0x5b3088)['isSymbolicLink']())throw CliErrors['validation'](_0x1bb0ce(0x110)+_0x5b3088);return!![];}});}
1
+ (function(_0x3eee6d,_0x26bd20){const _0x137eb9=a98_0x277b,_0x3b1344=_0x3eee6d();while(!![]){try{const _0x399efd=parseInt(_0x137eb9(0x176))/0x1*(parseInt(_0x137eb9(0x177))/0x2)+-parseInt(_0x137eb9(0x16c))/0x3+-parseInt(_0x137eb9(0x178))/0x4*(parseInt(_0x137eb9(0x161))/0x5)+-parseInt(_0x137eb9(0x154))/0x6*(parseInt(_0x137eb9(0x15c))/0x7)+parseInt(_0x137eb9(0x163))/0x8*(parseInt(_0x137eb9(0x17b))/0x9)+-parseInt(_0x137eb9(0x153))/0xa+parseInt(_0x137eb9(0x175))/0xb;if(_0x399efd===_0x26bd20)break;else _0x3b1344['push'](_0x3b1344['shift']());}catch(_0x49d873){_0x3b1344['push'](_0x3b1344['shift']());}}}(a98_0x5101,0xe9c45));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';function a98_0x5101(){const _0x24067d=['548648aJXHzV','builtin','updated','scope','get','managedRoot','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','name','isSymbolicLink','3310551JkaUjG','startsWith','map','trim','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','has','set','scopes','68807013lXZIKb','1FILCiZ','430218EaRsiO','609712OjZeHQ','validation','dir','9fKOQOv','accessKey','slice','unchanged','pruneSkillCodes','length','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','values','not-managed-symlink','skill','created','isDirectory','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','18057550Dxlipd','3888GujPxA','external-symlink','appCode','contentHash','personal','filter','skillCode','push','17339KLyeQh','activeSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','agentsSkillsDir','skipped','35NOfnkT','company'];a98_0x5101=function(){return _0x24067d;};return a98_0x5101();}import a98_0x2af2f5 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}=a98_0x2af2f5;export function linkEffectiveRuntimeSkills(_0x1c7b80,_0x3e7666,_0x3ba86c={}){const _0x865ef0=a98_0x277b,_0xe9d823=new Map();for(const _0x553e7b of _0x1c7b80){const _0x39e7ce=_0x553e7b[_0x865ef0(0x14f)][_0x865ef0(0x15a)];if(!_0x39e7ce)continue;const _0x2e992c=_0xe9d823[_0x865ef0(0x167)](_0x39e7ce);(!_0x2e992c||_0x553e7b[_0x865ef0(0x166)]===_0x865ef0(0x158))&&_0xe9d823[_0x865ef0(0x173)](_0x39e7ce,_0x553e7b);}const _0x2e82bd=[],_0x1a6193=resolveSkillSyncPaths(_0x3ba86c);for(const _0x162004 of _0xe9d823[_0x865ef0(0x14d)]()){const _0x98d2b9=requireSkillCode(_0x162004[_0x865ef0(0x14f)]),_0x5d47e7=_0x3e7666+'--'+_0x98d2b9;for(const _0x561aea of runtimeAgentSkillRoots(_0x1a6193)){_0x2e82bd[_0x865ef0(0x15b)](ensureManagedSymlink(resolve(_0x561aea,_0x5d47e7),_0x162004[_0x865ef0(0x17a)],_0x1a6193['managedRoot']));}}return _0x2e82bd;}export function pruneStaleRuntimeSkillLinks(_0x30dce8,_0x4eb38f,_0x9ab0da={},_0x288ffd){const _0x24a0f6=a98_0x277b,_0x1d0d48=resolveSkillSyncPaths(_0x9ab0da),_0x3a9848=new Set([..._0x4eb38f]['map'](_0x7b1d9=>_0x7b1d9['trim']())['filter'](Boolean)),_0x393ba2=_0x288ffd?new Set([..._0x288ffd][_0x24a0f6(0x16e)](_0x122def=>_0x122def[_0x24a0f6(0x16f)]())[_0x24a0f6(0x159)](Boolean)):undefined,_0x3bfb85=[];for(const _0x40a36b of runtimeAgentSkillRoots(_0x1d0d48)){for(const _0x5c0f2d of managedAppSkillLinkPaths(_0x40a36b,_0x30dce8)){const _0x4b77b4=basename(_0x5c0f2d)[_0x24a0f6(0x148)]((_0x30dce8+'--')[_0x24a0f6(0x14b)]);if(_0x393ba2&&!_0x393ba2['has'](_0x4b77b4))continue;if(_0x3a9848[_0x24a0f6(0x172)](_0x4b77b4))continue;_0x3bfb85['push'](removeManagedSkillLink(_0x5c0f2d,_0x1d0d48[_0x24a0f6(0x168)]));}}return _0x3bfb85;}export function pruneStaleRuntimeSkillCache(_0x6e45f9,_0x16463b={}){const _0x4ad11a=a98_0x277b,_0xedaff8=new Set([..._0x6e45f9[_0x4ad11a(0x15d)]][_0x4ad11a(0x16e)](_0x2521a0=>_0x2521a0['trim']())[_0x4ad11a(0x159)](Boolean)),_0x828a7b=_0x6e45f9[_0x4ad11a(0x14a)]?new Set([..._0x6e45f9['pruneSkillCodes']]['map'](_0x5a4037=>_0x5a4037[_0x4ad11a(0x16f)]())[_0x4ad11a(0x159)](Boolean)):undefined,_0x7aab6f=_0x6e45f9[_0x4ad11a(0x174)]??[_0x4ad11a(0x158),_0x4ad11a(0x162)],_0x57db3b=resolve(getRuntimeSkillCacheRoot(_0x6e45f9['env'],_0x6e45f9[_0x4ad11a(0x147)],_0x16463b),safePathSegment(_0x6e45f9['appCode'],_0x4ad11a(0x156))),_0x5176b6=[];for(const _0xbee07 of _0x7aab6f){const _0x3cb91f=resolve(_0x57db3b,_0xbee07);if(!existsSync(_0x3cb91f))continue;for(const _0x43d5d0 of readdirSync(_0x3cb91f,{'withFileTypes':!![]})){if(!_0x43d5d0[_0x4ad11a(0x151)]())continue;const _0x536d14=_0x43d5d0[_0x4ad11a(0x16a)];if(_0x828a7b&&!_0x828a7b[_0x4ad11a(0x172)](_0x536d14))continue;if(_0xedaff8['has'](_0x536d14))continue;const _0x524b46=resolve(_0x3cb91f,_0x536d14),_0x1265b3=readMetadataIfPresent(resolve(_0x524b46,METADATA_FILE));if(_0x1265b3?.[_0x4ad11a(0x156)]!==_0x6e45f9[_0x4ad11a(0x156)]||_0x1265b3[_0x4ad11a(0x166)]!==_0xbee07||_0x1265b3[_0x4ad11a(0x15a)]!==_0x536d14){_0x5176b6[_0x4ad11a(0x15b)]({'path':_0x524b46,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x524b46),_0x5176b6[_0x4ad11a(0x15b)]({'path':_0x524b46,'action':_0x4ad11a(0x170)});}}return _0x5176b6;}export function linkGlobalRuntimeSkills(_0x5f54c9,_0x37a0b2={}){const _0x2f8b02=a98_0x277b,_0x202324=resolveSkillSyncPaths(_0x37a0b2),_0x12a454=[];for(const _0x546c63 of _0x5f54c9){if(_0x546c63[_0x2f8b02(0x166)]!==_0x2f8b02(0x164))throw CliErrors[_0x2f8b02(0x179)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x546c63['scope']);const _0x22dfce=requireSkillCode(_0x546c63['skill']),_0xeb388f=copyManagedSkillDirectory(_0x546c63[_0x2f8b02(0x17a)],resolve(_0x202324[_0x2f8b02(0x15f)],_0x22dfce));_0x12a454['push']({..._0xeb388f,'contentHash':_0x546c63[_0x2f8b02(0x157)]});}return _0x12a454;}function a98_0x277b(_0x2dc6e9,_0x525974){_0x2dc6e9=_0x2dc6e9-0x147;const _0x51017f=a98_0x5101();let _0x277beb=_0x51017f[_0x2dc6e9];return _0x277beb;}function ensureManagedSymlink(_0x5c120c,_0x2a5dd0,_0x40512e){const _0x22cd80=a98_0x277b;mkdirSync(dirname(_0x5c120c),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5c120c)||isDanglingSymlink(_0x5c120c)){const _0x9dba8d=lstatSync(_0x5c120c);if(!_0x9dba8d[_0x22cd80(0x16b)]())throw CliErrors[_0x22cd80(0x179)](_0x22cd80(0x15e)+_0x5c120c);const _0x3ecebd=resolveSymlinkTarget(_0x5c120c);if(!isPathInside(realOrResolved(_0x3ecebd),realOrResolved(_0x40512e)))throw CliErrors['validation'](_0x22cd80(0x169)+_0x5c120c);if(realOrResolved(_0x3ecebd)===realOrResolved(_0x2a5dd0))return{'path':_0x5c120c,'target':_0x2a5dd0,'action':'unchanged'};return unlinkSync(_0x5c120c),symlinkSync(_0x2a5dd0,_0x5c120c,'dir'),{'path':_0x5c120c,'target':_0x2a5dd0,'action':_0x22cd80(0x165)};}return symlinkSync(_0x2a5dd0,_0x5c120c,_0x22cd80(0x17a)),{'path':_0x5c120c,'target':_0x2a5dd0,'action':_0x22cd80(0x150)};}function managedAppSkillLinkPaths(_0x4604e3,_0x1520be){const _0xd159c8=a98_0x277b;if(!existsSync(_0x4604e3))return[];const _0x2354dc=_0x1520be+'--';return readdirSync(_0x4604e3,{'withFileTypes':!![]})[_0xd159c8(0x159)](_0x432f8d=>_0x432f8d[_0xd159c8(0x16a)][_0xd159c8(0x16d)](_0x2354dc))[_0xd159c8(0x16e)](_0x528f66=>resolve(_0x4604e3,_0x528f66[_0xd159c8(0x16a)]));}function removeManagedSkillLink(_0x158a3a,_0x576f05){const _0x35e978=a98_0x277b,_0x5c0eab=lstatIfPresent(_0x158a3a);if(!_0x5c0eab?.[_0x35e978(0x16b)]())return{'path':_0x158a3a,'action':_0x35e978(0x160),'reason':_0x35e978(0x14e)};const _0x26b67a=resolveSymlinkTarget(_0x158a3a);if(!isPathInside(realOrResolved(_0x26b67a),realOrResolved(_0x576f05)))return{'path':_0x158a3a,'action':'skipped','reason':_0x35e978(0x155)};return unlinkSync(_0x158a3a),{'path':_0x158a3a,'action':_0x35e978(0x170)};}export function copyManagedSkillDirectory(_0x429e7e,_0x2d62fc){const _0x576f9f=a98_0x277b,_0x526a02=resolve(_0x2d62fc,METADATA_FILE),_0x3c8d8e=existsSync(_0x2d62fc);if(_0x3c8d8e){const _0x216077=lstatSync(_0x2d62fc);if(_0x216077['isSymbolicLink']())throw CliErrors[_0x576f9f(0x179)](_0x576f9f(0x171)+_0x2d62fc);if(!_0x216077[_0x576f9f(0x151)]())throw CliErrors[_0x576f9f(0x179)](_0x576f9f(0x152)+_0x2d62fc);const _0x9e0f17=readMetadataIfPresent(_0x526a02);if(_0x9e0f17?.[_0x576f9f(0x166)]!==_0x576f9f(0x164))throw CliErrors[_0x576f9f(0x179)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x2d62fc);}ensureDirSync(dirname(_0x2d62fc));const _0x331824=_0x3c8d8e?readMetadataIfPresent(_0x526a02)?.['contentHash']:undefined,_0x34b313=readMetadataIfPresent(resolve(_0x429e7e,METADATA_FILE))?.[_0x576f9f(0x157)];return _0x3c8d8e&&removeSync(_0x2d62fc),copySkillDirectory(_0x429e7e,_0x2d62fc),{'path':_0x2d62fc,'target':_0x429e7e,'action':!_0x3c8d8e?_0x576f9f(0x150):_0x331824===_0x34b313?_0x576f9f(0x149):_0x576f9f(0x165)};}function copySkillDirectory(_0x45dc00,_0x1b44a2){copySync(_0x45dc00,_0x1b44a2,{'dereference':![],'overwrite':!![],'filter'(_0x4ceae6){const _0x27b904=a98_0x277b;if(lstatSync(_0x4ceae6)[_0x27b904(0x16b)]())throw CliErrors[_0x27b904(0x179)](_0x27b904(0x14c)+_0x4ceae6);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x54ed89,_0x190cb6){const _0x5dde46=a99_0x2cbf,_0x2664e2=_0x54ed89();while(!![]){try{const _0x256825=-parseInt(_0x5dde46(0x19e))/0x1*(parseInt(_0x5dde46(0x186))/0x2)+-parseInt(_0x5dde46(0x18a))/0x3+parseInt(_0x5dde46(0x193))/0x4*(parseInt(_0x5dde46(0x195))/0x5)+-parseInt(_0x5dde46(0x1a3))/0x6+-parseInt(_0x5dde46(0x182))/0x7*(parseInt(_0x5dde46(0x190))/0x8)+parseInt(_0x5dde46(0x18c))/0x9+-parseInt(_0x5dde46(0x187))/0xa*(-parseInt(_0x5dde46(0x1a2))/0xb);if(_0x256825===_0x190cb6)break;else _0x2664e2['push'](_0x2664e2['shift']());}catch(_0x477d86){_0x2664e2['push'](_0x2664e2['shift']());}}}(a99_0x4110,0x61eac));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 a99_0x4110(){const _0x56bb6f=['code','linkedPath','35iGzLlX','isArray','tags','has','175942dCWOkc','1140fGiuIH','scope','builtin','1517424sKDVpO','skillCode','3221388HuxnOk','startsWith','scopes','from','1012040mmWROl','appCode','cacheDir','201964viyxdD','filter','55IMXNmR','includes','set','get','dir','name','env','source','sort','2hpGZrs','cache','map','push','110022oRYkwI','2029308VGcXYq','localeCompare','link','isDirectory','isSymbolicLink','local','linkedPaths'];a99_0x4110=function(){return _0x56bb6f;};return a99_0x4110();}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x705c65,_0x12e6dd={}){const _0x4190dd=a99_0x2cbf,_0x5735d5=safePathSegment(_0x705c65[_0x4190dd(0x191)],'appCode'),_0x14c793=normalizeRuntimeSkillScopes(_0x705c65[_0x4190dd(0x18e)]),_0x3b23f6=new Set(_0x14c793),_0x4113c3=_0x705c65[_0x4190dd(0x180)]?.['trim'](),_0x276ca6=new Map(),_0x7669d3=resolve(getRuntimeSkillCacheRoot(_0x705c65[_0x4190dd(0x19b)],_0x705c65['accessKey'],_0x12e6dd),_0x5735d5);for(const _0x511c1a of _0x14c793){for(const _0x159da0 of localSkillEntryDirs(resolve(_0x7669d3,_0x511c1a))){collectLocalRuntimeSkill(_0x276ca6,_0x159da0,{'appCode':_0x5735d5,'scopes':_0x3b23f6,'code':_0x4113c3,'source':_0x4190dd(0x19f)});}}const _0x3e6ad1=resolveSkillSyncPaths(_0x12e6dd);for(const _0x243c41 of runtimeAgentSkillRoots(_0x3e6ad1)){for(const _0x340629 of localSkillLinkCandidates(_0x243c41,_0x5735d5,_0x3b23f6)){collectLocalRuntimeSkill(_0x276ca6,_0x340629,{'appCode':_0x5735d5,'scopes':_0x3b23f6,'code':_0x4113c3,'source':_0x4190dd(0x1a5),'linkedPath':_0x340629});}}return Array[_0x4190dd(0x18f)](_0x276ca6['values']())[_0x4190dd(0x19d)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x38d141){const _0x1af525=a99_0x2cbf;if(!existsSync(_0x38d141))return[];return readdirSync(_0x38d141,{'withFileTypes':!![]})[_0x1af525(0x194)](_0x2ae780=>_0x2ae780['isDirectory']()||_0x2ae780[_0x1af525(0x17d)]())[_0x1af525(0x1a0)](_0x106a8b=>resolve(_0x38d141,_0x106a8b[_0x1af525(0x19a)]));}function localSkillLinkCandidates(_0x2a5bcf,_0x57fe90,_0x1f2a21){const _0x50b9d3=a99_0x2cbf;if(!existsSync(_0x2a5bcf))return[];const _0x1866f5=_0x57fe90+'--';return readdirSync(_0x2a5bcf,{'withFileTypes':!![]})[_0x50b9d3(0x194)](_0x908a6a=>_0x908a6a[_0x50b9d3(0x1a6)]()||_0x908a6a['isSymbolicLink']())['filter'](_0x14f84c=>_0x14f84c[_0x50b9d3(0x19a)][_0x50b9d3(0x18d)](_0x1866f5)||_0x1f2a21['has'](_0x50b9d3(0x189)))[_0x50b9d3(0x1a0)](_0x45a556=>resolve(_0x2a5bcf,_0x45a556[_0x50b9d3(0x19a)]));}function collectLocalRuntimeSkill(_0x5116b2,_0x29df67,_0x2cee7d){const _0x5270f7=a99_0x2cbf,_0x4c9b8d=resolve(_0x29df67,METADATA_FILE),_0x265258=readMetadataIfPresent(_0x4c9b8d);if(!_0x265258)return;if(_0x265258[_0x5270f7(0x191)]!==_0x2cee7d[_0x5270f7(0x191)])return;if(!isRuntimeSkillScope(_0x265258['scope'])||!_0x2cee7d['scopes'][_0x5270f7(0x185)](_0x265258[_0x5270f7(0x188)]))return;const _0x189f6e=_0x265258[_0x5270f7(0x18b)]?.['trim']();if(!_0x189f6e)return;if(_0x2cee7d[_0x5270f7(0x180)]&&_0x189f6e!==_0x2cee7d[_0x5270f7(0x180)])return;const _0x5a9a9f=_0x265258[_0x5270f7(0x188)]+':'+_0x189f6e,_0x259f61=_0x2cee7d[_0x5270f7(0x181)]?[_0x2cee7d['linkedPath']]:[],_0x501de7=_0x5116b2[_0x5270f7(0x198)](_0x5a9a9f);if(_0x501de7){_0x2cee7d['source']===_0x5270f7(0x19f)&&(_0x501de7['dir']=_0x29df67,_0x501de7[_0x5270f7(0x192)]=_0x29df67,_0x501de7['skillMdPath']=resolve(_0x29df67,SKILL_FILE),_0x501de7['metadataPath']=_0x4c9b8d);for(const _0x1732a2 of _0x259f61){!_0x501de7['linkedPaths'][_0x5270f7(0x196)](_0x1732a2)&&_0x501de7[_0x5270f7(0x17f)][_0x5270f7(0x1a1)](_0x1732a2);}_0x501de7[_0x5270f7(0x17f)][_0x5270f7(0x19d)]();return;}_0x5116b2[_0x5270f7(0x197)](_0x5a9a9f,{..._0x265258,'tags':Array[_0x5270f7(0x183)](_0x265258['tags'])?_0x265258[_0x5270f7(0x184)]:[],'scope':_0x265258[_0x5270f7(0x188)],'source':_0x5270f7(0x17e),'dir':_0x29df67,'cacheDir':_0x2cee7d[_0x5270f7(0x19c)]===_0x5270f7(0x19f)?_0x29df67:undefined,'skillMdPath':resolve(_0x29df67,SKILL_FILE),'metadataPath':_0x4c9b8d,'linkedPaths':_0x259f61});}function a99_0x2cbf(_0x3dd378,_0x32ca3e){_0x3dd378=_0x3dd378-0x17d;const _0x41102b=a99_0x4110();let _0x2cbfff=_0x41102b[_0x3dd378];return _0x2cbfff;}function compareLocalRuntimeSkills(_0x21a98a,_0x13e16b){const _0x8cf0cd=a99_0x2cbf,_0x2d7db5={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2d7db5[_0x21a98a['scope']]-_0x2d7db5[_0x13e16b[_0x8cf0cd(0x188)]]||_0x21a98a[_0x8cf0cd(0x18b)]['localeCompare'](_0x13e16b[_0x8cf0cd(0x18b)])||_0x21a98a[_0x8cf0cd(0x199)][_0x8cf0cd(0x1a4)](_0x13e16b[_0x8cf0cd(0x199)]);}
1
+ (function(_0x244bba,_0x2cae52){const _0x47f737=a99_0x4d1f,_0x10499d=_0x244bba();while(!![]){try{const _0x1fae1a=-parseInt(_0x47f737(0x177))/0x1*(parseInt(_0x47f737(0x18a))/0x2)+-parseInt(_0x47f737(0x17b))/0x3+parseInt(_0x47f737(0x188))/0x4+parseInt(_0x47f737(0x16a))/0x5+parseInt(_0x47f737(0x178))/0x6*(-parseInt(_0x47f737(0x17d))/0x7)+parseInt(_0x47f737(0x163))/0x8*(-parseInt(_0x47f737(0x174))/0x9)+parseInt(_0x47f737(0x185))/0xa;if(_0x1fae1a===_0x2cae52)break;else _0x10499d['push'](_0x10499d['shift']());}catch(_0x334797){_0x10499d['push'](_0x10499d['shift']());}}}(a99_0x23f3,0xce678));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x4d1f(_0x2b6abd,_0x1103b1){_0x2b6abd=_0x2b6abd-0x163;const _0x23f3f2=a99_0x23f3();let _0x4d1f2f=_0x23f3f2[_0x2b6abd];return _0x4d1f2f;}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';export function listLocalRuntimeSkills(_0x1b3f55,_0x1f8129={}){const _0x5066f6=a99_0x4d1f,_0x530d1a=safePathSegment(_0x1b3f55[_0x5066f6(0x171)],_0x5066f6(0x171)),_0x1943bd=normalizeRuntimeSkillScopes(_0x1b3f55[_0x5066f6(0x164)]),_0x3cfe69=new Set(_0x1943bd),_0x4544eb=_0x1b3f55[_0x5066f6(0x16f)]?.[_0x5066f6(0x183)](),_0x3db5ce=new Map(),_0x216b47=resolve(getRuntimeSkillCacheRoot(_0x1b3f55[_0x5066f6(0x182)],_0x1b3f55['accessKey'],_0x1f8129),_0x530d1a);for(const _0x800aad of _0x1943bd){for(const _0x72a517 of localSkillEntryDirs(resolve(_0x216b47,_0x800aad))){collectLocalRuntimeSkill(_0x3db5ce,_0x72a517,{'appCode':_0x530d1a,'scopes':_0x3cfe69,'code':_0x4544eb,'source':_0x5066f6(0x16e)});}}const _0x1ac25c=resolveSkillSyncPaths(_0x1f8129);for(const _0xb52af1 of runtimeAgentSkillRoots(_0x1ac25c)){for(const _0x1ab7c4 of localSkillLinkCandidates(_0xb52af1,_0x530d1a,_0x3cfe69)){collectLocalRuntimeSkill(_0x3db5ce,_0x1ab7c4,{'appCode':_0x530d1a,'scopes':_0x3cfe69,'code':_0x4544eb,'source':'link','linkedPath':_0x1ab7c4});}}return Array[_0x5066f6(0x168)](_0x3db5ce[_0x5066f6(0x165)]())[_0x5066f6(0x16d)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x4085a3){const _0x748c9a=a99_0x4d1f;if(!existsSync(_0x4085a3))return[];return readdirSync(_0x4085a3,{'withFileTypes':!![]})[_0x748c9a(0x181)](_0x553843=>_0x553843[_0x748c9a(0x179)]()||_0x553843[_0x748c9a(0x186)]())[_0x748c9a(0x17c)](_0x5da32f=>resolve(_0x4085a3,_0x5da32f['name']));}function a99_0x23f3(){const _0xe41f86=['startsWith','includes','from','skillCode','2950285FMtsKj','name','scope','sort','cache','code','linkedPaths','appCode','push','metadataPath','3018348EFEJpu','dir','linkedPath','2TnpDUr','12wPWGdc','isDirectory','set','260634pBKQDm','map','4291238fZrFbT','local','get','tags','filter','env','trim','has','21898500CDLMYi','isSymbolicLink','builtin','4825468mbaibd','skillMdPath','1492524fApjNe','isArray','source','localeCompare','8fdXOSO','scopes','values'];a99_0x23f3=function(){return _0xe41f86;};return a99_0x23f3();}function localSkillLinkCandidates(_0x522938,_0x226d76,_0x1d8239){const _0x5a1068=a99_0x4d1f;if(!existsSync(_0x522938))return[];const _0x354513=_0x226d76+'--';return readdirSync(_0x522938,{'withFileTypes':!![]})['filter'](_0x44aa19=>_0x44aa19['isDirectory']()||_0x44aa19[_0x5a1068(0x186)]())[_0x5a1068(0x181)](_0x55ba90=>_0x55ba90[_0x5a1068(0x16b)][_0x5a1068(0x166)](_0x354513)||_0x1d8239[_0x5a1068(0x184)](_0x5a1068(0x187)))['map'](_0x435369=>resolve(_0x522938,_0x435369[_0x5a1068(0x16b)]));}function collectLocalRuntimeSkill(_0xe5a7bb,_0x3c19c1,_0x309f27){const _0x27f137=a99_0x4d1f,_0x219824=resolve(_0x3c19c1,METADATA_FILE),_0x43b8a5=readMetadataIfPresent(_0x219824);if(!_0x43b8a5)return;if(_0x43b8a5[_0x27f137(0x171)]!==_0x309f27[_0x27f137(0x171)])return;if(!isRuntimeSkillScope(_0x43b8a5[_0x27f137(0x16c)])||!_0x309f27[_0x27f137(0x164)][_0x27f137(0x184)](_0x43b8a5['scope']))return;const _0x178be7=_0x43b8a5[_0x27f137(0x169)]?.['trim']();if(!_0x178be7)return;if(_0x309f27[_0x27f137(0x16f)]&&_0x178be7!==_0x309f27[_0x27f137(0x16f)])return;const _0xecc3b0=_0x43b8a5[_0x27f137(0x16c)]+':'+_0x178be7,_0x5ef032=_0x309f27[_0x27f137(0x176)]?[_0x309f27['linkedPath']]:[],_0x51eba7=_0xe5a7bb[_0x27f137(0x17f)](_0xecc3b0);if(_0x51eba7){_0x309f27['source']===_0x27f137(0x16e)&&(_0x51eba7[_0x27f137(0x175)]=_0x3c19c1,_0x51eba7['cacheDir']=_0x3c19c1,_0x51eba7[_0x27f137(0x189)]=resolve(_0x3c19c1,SKILL_FILE),_0x51eba7[_0x27f137(0x173)]=_0x219824);for(const _0x517f77 of _0x5ef032){!_0x51eba7[_0x27f137(0x170)][_0x27f137(0x167)](_0x517f77)&&_0x51eba7['linkedPaths'][_0x27f137(0x172)](_0x517f77);}_0x51eba7['linkedPaths'][_0x27f137(0x16d)]();return;}_0xe5a7bb[_0x27f137(0x17a)](_0xecc3b0,{..._0x43b8a5,'tags':Array[_0x27f137(0x18b)](_0x43b8a5['tags'])?_0x43b8a5[_0x27f137(0x180)]:[],'scope':_0x43b8a5[_0x27f137(0x16c)],'source':_0x27f137(0x17e),'dir':_0x3c19c1,'cacheDir':_0x309f27[_0x27f137(0x18c)]===_0x27f137(0x16e)?_0x3c19c1:undefined,'skillMdPath':resolve(_0x3c19c1,SKILL_FILE),'metadataPath':_0x219824,'linkedPaths':_0x5ef032});}function compareLocalRuntimeSkills(_0x511eee,_0x10a684){const _0x2b1362=a99_0x4d1f,_0x6ecd24={'personal':0x0,'company':0x1,'builtin':0x2};return _0x6ecd24[_0x511eee[_0x2b1362(0x16c)]]-_0x6ecd24[_0x10a684[_0x2b1362(0x16c)]]||_0x511eee[_0x2b1362(0x169)][_0x2b1362(0x18d)](_0x10a684[_0x2b1362(0x169)])||_0x511eee[_0x2b1362(0x175)][_0x2b1362(0x18d)](_0x10a684[_0x2b1362(0x175)]);}
@@ -1 +1 @@
1
- (function(_0x51c592,_0xbc827d){const _0x47d176=a100_0x52aa,_0x382a27=_0x51c592();while(!![]){try{const _0x391a6f=-parseInt(_0x47d176(0x190))/0x1*(-parseInt(_0x47d176(0x1a4))/0x2)+parseInt(_0x47d176(0x19d))/0x3*(parseInt(_0x47d176(0x1a5))/0x4)+-parseInt(_0x47d176(0x196))/0x5*(-parseInt(_0x47d176(0x185))/0x6)+parseInt(_0x47d176(0x192))/0x7+parseInt(_0x47d176(0x194))/0x8+parseInt(_0x47d176(0x191))/0x9+-parseInt(_0x47d176(0x19c))/0xa;if(_0x391a6f===_0xbc827d)break;else _0x382a27['push'](_0x382a27['shift']());}catch(_0x1d2913){_0x382a27['push'](_0x382a27['shift']());}}}(a100_0x4767,0xdcf86));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(_0x2ab759){const _0x446628=a100_0x52aa;return _0x2ab759['bytes']??Buffer[_0x446628(0x1a8)](_0x2ab759['content']??'',_0x446628(0x19e));}export function fileText(_0x55281d){const _0x13f4de=a100_0x52aa;return fileContent(_0x55281d)[_0x13f4de(0x18e)](_0x13f4de(0x19e));}export function normalizeLocalFiles(_0xa99885){const _0x327adc=a100_0x52aa;if(!Array['isArray'](_0xa99885)||_0xa99885[_0x327adc(0x195)]===0x0)return[];const _0x9abd09=new Map();for(const _0x56cd1c of _0xa99885){if(!_0x56cd1c||typeof _0x56cd1c!=='object'||typeof _0x56cd1c['path']!=='string')throw CliErrors[_0x327adc(0x18c)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1934c1=normalizeSkillRelativePath(_0x56cd1c[_0x327adc(0x18f)]);if(_0x9abd09[_0x327adc(0x180)](_0x1934c1))throw CliErrors[_0x327adc(0x18c)](_0x327adc(0x19b)+_0x1934c1);if(_0x56cd1c['bytes']!==undefined&&!Buffer[_0x327adc(0x1a2)](_0x56cd1c[_0x327adc(0x189)]))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x1934c1);if(_0x56cd1c[_0x327adc(0x189)]===undefined&&typeof _0x56cd1c[_0x327adc(0x1a3)]!=='string')throw CliErrors['validation'](_0x327adc(0x181)+_0x1934c1);const _0x33d04f=fileContent(_0x56cd1c);_0x9abd09[_0x327adc(0x18a)](_0x1934c1,{'path':_0x1934c1,'bytes':_0x33d04f});}return Array['from'](_0x9abd09[_0x327adc(0x19a)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x21af01){const _0x5a09ec=a100_0x52aa;if(!Array[_0x5a09ec(0x17f)](_0x21af01)||_0x21af01[_0x5a09ec(0x195)]===0x0)return[];const _0x5539bd=new Map();for(const _0x2813c9 of _0x21af01){if(!_0x2813c9||typeof _0x2813c9!=='object'||typeof _0x2813c9[_0x5a09ec(0x18f)]!==_0x5a09ec(0x19f))throw CliErrors[_0x5a09ec(0x18c)](_0x5a09ec(0x197));const _0x5160ab=normalizeSkillRelativePath(_0x2813c9[_0x5a09ec(0x18f)]);if(_0x5539bd['has'](_0x5160ab))throw CliErrors[_0x5a09ec(0x18c)](_0x5a09ec(0x19b)+_0x5160ab);if(!isSha256Hex(_0x2813c9[_0x5a09ec(0x187)]))throw CliErrors[_0x5a09ec(0x18c)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x5160ab);if(!Number[_0x5a09ec(0x183)](_0x2813c9[_0x5a09ec(0x1a6)])||_0x2813c9['size']<0x0)throw CliErrors[_0x5a09ec(0x18c)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x5160ab);_0x5539bd[_0x5a09ec(0x18a)](_0x5160ab,{'path':_0x5160ab,'sha256':_0x2813c9[_0x5a09ec(0x187)][_0x5a09ec(0x199)](),'size':_0x2813c9['size']});}return Array[_0x5a09ec(0x1a8)](_0x5539bd['values']())[_0x5a09ec(0x1a0)](compareSkillFiles);}export function scanSkillDirectory(_0x517406){const _0x3dc70e=realpathSync(_0x517406),_0x53471=[];function _0xea05ee(_0x3bc06d){const _0xc37a8f=a100_0x52aa,_0x30c746=readdirSync(_0x3bc06d,{'withFileTypes':!![]})['sort']((_0x1052d5,_0x230dca)=>_0x1052d5[_0xc37a8f(0x184)][_0xc37a8f(0x186)](_0x230dca[_0xc37a8f(0x184)]));for(const _0x9b071a of _0x30c746){if(_0x9b071a['isDirectory']()&&IGNORED_DIR_NAMES[_0xc37a8f(0x180)](_0x9b071a['name']))continue;if(IGNORED_FILE_NAMES[_0xc37a8f(0x180)](_0x9b071a['name']))continue;const _0x1483cc=resolve(_0x3bc06d,_0x9b071a[_0xc37a8f(0x184)]);if(_0x9b071a[_0xc37a8f(0x188)]())throw CliErrors[_0xc37a8f(0x18c)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x1483cc);const _0x4219eb=toPosixPath(relative(_0x3dc70e,_0x1483cc));if(_0x9b071a[_0xc37a8f(0x198)]()){_0xea05ee(_0x1483cc);continue;}if(!_0x9b071a[_0xc37a8f(0x193)]())continue;validateSkillRelativePath(_0x4219eb);const _0x16501c=readFileSync(_0x1483cc);_0x53471[_0xc37a8f(0x1a7)]({'path':_0x4219eb,'bytes':_0x16501c});}}return _0xea05ee(_0x3dc70e),normalizeLocalFiles(_0x53471);}export function compareSkillFiles(_0x496484,_0x4f1752){const _0x33975d=a100_0x52aa;if(_0x496484[_0x33975d(0x18f)]===SKILL_FILE)return _0x4f1752[_0x33975d(0x18f)]===SKILL_FILE?0x0:-0x1;if(_0x4f1752[_0x33975d(0x18f)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x33975d(0x1a8)](_0x496484[_0x33975d(0x18f)],_0x33975d(0x19e)),Buffer[_0x33975d(0x1a8)](_0x4f1752[_0x33975d(0x18f)],_0x33975d(0x19e)));}export function normalizeSkillRelativePath(_0x3fe5e3){const _0x73b57c=a100_0x52aa,_0x57515f=toPosixPath(_0x3fe5e3[_0x73b57c(0x18d)]());return validateSkillRelativePath(_0x57515f),_0x57515f;}function a100_0x4767(){const _0x9a84e0=['994200ZybXWb','localeCompare','sha256','isSymbolicLink','bytes','set','Unsafe\x20Skill\x20file\x20path:\x20','validation','trim','toString','path','373261jObXjT','10496619LFhPzE','8678341XFlYal','isFile','1418144lbViIP','length','40zJSKcV','Skill\x20file\x20path\x20must\x20be\x20text.','isDirectory','toLowerCase','values','Duplicate\x20Skill\x20file\x20path:\x20','52707200QQsIIq','12jsfsQM','utf8','string','sort','includes','isBuffer','content','8vbLPSn','773848klGFQd','size','push','from','isArray','has','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','startsWith','isSafeInteger','name'];a100_0x4767=function(){return _0x9a84e0;};return a100_0x4767();}export function validateSkillRelativePath(_0x56af1c){const _0x533849=a100_0x52aa;if(!_0x56af1c||_0x56af1c[_0x533849(0x182)]('/')||_0x56af1c[_0x533849(0x1a1)]('//'))throw CliErrors[_0x533849(0x18c)](_0x533849(0x18b)+_0x56af1c);for(const _0x9dd6af of _0x56af1c['split']('/')){if(!_0x9dd6af||_0x9dd6af==='.'||_0x9dd6af==='..')throw CliErrors[_0x533849(0x18c)](_0x533849(0x18b)+_0x56af1c);}}export function toPosixPath(_0xa9b600){return _0xa9b600['replace'](/\\/g,'/');}function a100_0x52aa(_0x35229d,_0x4c7390){_0x35229d=_0x35229d-0x17f;const _0x476733=a100_0x4767();let _0x52aa4e=_0x476733[_0x35229d];return _0x52aa4e;}export function isSha256Hex(_0xc8de33){return typeof _0xc8de33==='string'&&/^[a-fA-F0-9]{64}$/['test'](_0xc8de33);}
1
+ (function(_0x1a3590,_0x48e6e4){const _0x28db3a=a100_0x2336,_0x287c07=_0x1a3590();while(!![]){try{const _0x478161=-parseInt(_0x28db3a(0x1b0))/0x1+parseInt(_0x28db3a(0x1d1))/0x2+parseInt(_0x28db3a(0x1ca))/0x3+parseInt(_0x28db3a(0x1be))/0x4*(parseInt(_0x28db3a(0x1c8))/0x5)+parseInt(_0x28db3a(0x1d2))/0x6+parseInt(_0x28db3a(0x1bd))/0x7+parseInt(_0x28db3a(0x1c6))/0x8*(-parseInt(_0x28db3a(0x1cf))/0x9);if(_0x478161===_0x48e6e4)break;else _0x287c07['push'](_0x287c07['shift']());}catch(_0x2bc3fd){_0x287c07['push'](_0x287c07['shift']());}}}(a100_0x7f27,0x9da30));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(_0x28c997){const _0x365bc3=a100_0x2336;return _0x28c997['bytes']??Buffer[_0x365bc3(0x1b5)](_0x28c997[_0x365bc3(0x1c7)]??'',_0x365bc3(0x1cc));}export function fileText(_0x30d3aa){const _0x1f63fa=a100_0x2336;return fileContent(_0x30d3aa)[_0x1f63fa(0x1b6)](_0x1f63fa(0x1cc));}function a100_0x2336(_0x1d767f,_0x309616){_0x1d767f=_0x1d767f-0x1a9;const _0x7f27f0=a100_0x7f27();let _0x2336a7=_0x7f27f0[_0x1d767f];return _0x2336a7;}function a100_0x7f27(){const _0x36a80a=['Skill\x20file\x20sha256\x20is\x20invalid:\x20','2214mQmMpz','sha256','1009946SiBMlW','6742284SVNeLo','split','validation','isSymbolicLink','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','size','1161415goPpGQ','bytes','has','string','path','from','toString','isArray','object','includes','sort','toLowerCase','length','3638768FXbnqF','4368wEchYP','isBuffer','set','isDirectory','name','replace','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','localeCompare','57072fKXsEV','content','2270IQtWdt','values','2753340DZNjAV','startsWith','utf8','trim'];a100_0x7f27=function(){return _0x36a80a;};return a100_0x7f27();}export function normalizeLocalFiles(_0x5ce8c2){const _0x5e037f=a100_0x2336;if(!Array[_0x5e037f(0x1b7)](_0x5ce8c2)||_0x5ce8c2[_0x5e037f(0x1bc)]===0x0)return[];const _0x33529d=new Map();for(const _0xf4d36 of _0x5ce8c2){if(!_0xf4d36||typeof _0xf4d36!=='object'||typeof _0xf4d36[_0x5e037f(0x1b4)]!==_0x5e037f(0x1b3))throw CliErrors[_0x5e037f(0x1aa)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x57ab9a=normalizeSkillRelativePath(_0xf4d36[_0x5e037f(0x1b4)]);if(_0x33529d['has'](_0x57ab9a))throw CliErrors[_0x5e037f(0x1aa)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x57ab9a);if(_0xf4d36[_0x5e037f(0x1b1)]!==undefined&&!Buffer[_0x5e037f(0x1bf)](_0xf4d36[_0x5e037f(0x1b1)]))throw CliErrors[_0x5e037f(0x1aa)](_0x5e037f(0x1c4)+_0x57ab9a);if(_0xf4d36[_0x5e037f(0x1b1)]===undefined&&typeof _0xf4d36[_0x5e037f(0x1c7)]!==_0x5e037f(0x1b3))throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x57ab9a);const _0x522883=fileContent(_0xf4d36);_0x33529d[_0x5e037f(0x1c0)](_0x57ab9a,{'path':_0x57ab9a,'bytes':_0x522883});}return Array[_0x5e037f(0x1b5)](_0x33529d[_0x5e037f(0x1c9)]())[_0x5e037f(0x1ba)](compareSkillFiles);}export function normalizeManifestFiles(_0x1c4d7f){const _0xb216dc=a100_0x2336;if(!Array[_0xb216dc(0x1b7)](_0x1c4d7f)||_0x1c4d7f[_0xb216dc(0x1bc)]===0x0)return[];const _0x8ecd5d=new Map();for(const _0x1416e3 of _0x1c4d7f){if(!_0x1416e3||typeof _0x1416e3!==_0xb216dc(0x1b8)||typeof _0x1416e3[_0xb216dc(0x1b4)]!==_0xb216dc(0x1b3))throw CliErrors[_0xb216dc(0x1aa)](_0xb216dc(0x1ac));const _0x20777d=normalizeSkillRelativePath(_0x1416e3[_0xb216dc(0x1b4)]);if(_0x8ecd5d[_0xb216dc(0x1b2)](_0x20777d))throw CliErrors[_0xb216dc(0x1aa)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x20777d);if(!isSha256Hex(_0x1416e3[_0xb216dc(0x1d0)]))throw CliErrors[_0xb216dc(0x1aa)](_0xb216dc(0x1ce)+_0x20777d);if(!Number['isSafeInteger'](_0x1416e3['size'])||_0x1416e3[_0xb216dc(0x1af)]<0x0)throw CliErrors[_0xb216dc(0x1aa)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x20777d);_0x8ecd5d[_0xb216dc(0x1c0)](_0x20777d,{'path':_0x20777d,'sha256':_0x1416e3['sha256'][_0xb216dc(0x1bb)](),'size':_0x1416e3['size']});}return Array[_0xb216dc(0x1b5)](_0x8ecd5d[_0xb216dc(0x1c9)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0xe328a6){const _0x1ddf39=realpathSync(_0xe328a6),_0x3da867=[];function _0x1b5591(_0x5b824e){const _0x5a5752=a100_0x2336,_0x5e0198=readdirSync(_0x5b824e,{'withFileTypes':!![]})['sort']((_0x4b63c9,_0x1cb7b0)=>_0x4b63c9[_0x5a5752(0x1c2)][_0x5a5752(0x1c5)](_0x1cb7b0[_0x5a5752(0x1c2)]));for(const _0x3436af of _0x5e0198){if(_0x3436af[_0x5a5752(0x1c1)]()&&IGNORED_DIR_NAMES[_0x5a5752(0x1b2)](_0x3436af[_0x5a5752(0x1c2)]))continue;if(IGNORED_FILE_NAMES[_0x5a5752(0x1b2)](_0x3436af[_0x5a5752(0x1c2)]))continue;const _0x1059b4=resolve(_0x5b824e,_0x3436af[_0x5a5752(0x1c2)]);if(_0x3436af[_0x5a5752(0x1ab)]())throw CliErrors[_0x5a5752(0x1aa)](_0x5a5752(0x1ad)+_0x1059b4);const _0x1743c9=toPosixPath(relative(_0x1ddf39,_0x1059b4));if(_0x3436af[_0x5a5752(0x1c1)]()){_0x1b5591(_0x1059b4);continue;}if(!_0x3436af['isFile']())continue;validateSkillRelativePath(_0x1743c9);const _0x18ad67=readFileSync(_0x1059b4);_0x3da867['push']({'path':_0x1743c9,'bytes':_0x18ad67});}}return _0x1b5591(_0x1ddf39),normalizeLocalFiles(_0x3da867);}export function compareSkillFiles(_0x2c3f27,_0x531403){const _0x9f9551=a100_0x2336;if(_0x2c3f27['path']===SKILL_FILE)return _0x531403[_0x9f9551(0x1b4)]===SKILL_FILE?0x0:-0x1;if(_0x531403[_0x9f9551(0x1b4)]===SKILL_FILE)return 0x1;return Buffer[_0x9f9551(0x1ae)](Buffer['from'](_0x2c3f27['path'],_0x9f9551(0x1cc)),Buffer[_0x9f9551(0x1b5)](_0x531403[_0x9f9551(0x1b4)],_0x9f9551(0x1cc)));}export function normalizeSkillRelativePath(_0x2bd775){const _0x864d2c=a100_0x2336,_0x30f29a=toPosixPath(_0x2bd775[_0x864d2c(0x1cd)]());return validateSkillRelativePath(_0x30f29a),_0x30f29a;}export function validateSkillRelativePath(_0x8b689){const _0x2b75e0=a100_0x2336;if(!_0x8b689||_0x8b689[_0x2b75e0(0x1cb)]('/')||_0x8b689[_0x2b75e0(0x1b9)]('//'))throw CliErrors[_0x2b75e0(0x1aa)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x8b689);for(const _0x6340a6 of _0x8b689[_0x2b75e0(0x1a9)]('/')){if(!_0x6340a6||_0x6340a6==='.'||_0x6340a6==='..')throw CliErrors[_0x2b75e0(0x1aa)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x8b689);}}export function toPosixPath(_0x2e53a9){const _0x5477e9=a100_0x2336;return _0x2e53a9[_0x5477e9(0x1c3)](/\\/g,'/');}export function isSha256Hex(_0x33d192){return typeof _0x33d192==='string'&&/^[a-fA-F0-9]{64}$/['test'](_0x33d192);}
@@ -1 +1 @@
1
- (function(_0x21a292,_0x1468c8){const _0x47661c=a101_0x5ceb,_0x197600=_0x21a292();while(!![]){try{const _0x3044a2=parseInt(_0x47661c(0x125))/0x1+parseInt(_0x47661c(0x106))/0x2*(-parseInt(_0x47661c(0x10b))/0x3)+parseInt(_0x47661c(0x10f))/0x4+-parseInt(_0x47661c(0xf3))/0x5*(-parseInt(_0x47661c(0x109))/0x6)+-parseInt(_0x47661c(0xfd))/0x7*(parseInt(_0x47661c(0x11c))/0x8)+parseInt(_0x47661c(0xf4))/0x9+-parseInt(_0x47661c(0xf5))/0xa;if(_0x3044a2===_0x1468c8)break;else _0x197600['push'](_0x197600['shift']());}catch(_0x3cf333){_0x197600['push'](_0x197600['shift']());}}}(a101_0x2700,0xede5e));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';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x38f277,_0x46f904,_0x30b6b3){const _0x2c45b2=a101_0x5ceb,_0x457935=requireSkillCode(_0x38f277),_0x50ce18=requirePackageBytes(_0x457935,_0x30b6b3[_0x2c45b2(0x112)]),_0x43f43f=extractDownloadedPackage(_0x50ce18),_0x273bb1=_0x43f43f[_0x2c45b2(0xfa)](_0x46e1a6=>_0x46e1a6['path']===SKILL_FILE);if(!_0x273bb1)throw CliErrors['validation'](_0x2c45b2(0xf7)+SKILL_FILE+':\x20'+_0x457935);const _0x1aa4a9=withMaterializedSkillFrontmatter(_0x43f43f,_0x38f277,_0x457935),_0x405034=_0x1aa4a9['find'](_0x2c9a2a=>_0x2c9a2a['path']===SKILL_FILE),_0x2f4a2f=fileText(_0x405034),_0x3463cd=getRuntimeSkillDir(_0x30b6b3[_0x2c45b2(0x11a)],_0x30b6b3[_0x2c45b2(0x123)],_0x30b6b3['appCode'],_0x46f904,_0x457935,_0x30b6b3[_0x2c45b2(0x104)]),_0x231f56=resolve(_0x3463cd,SKILL_FILE),_0x10b684=resolve(_0x3463cd,METADATA_FILE),_0x5a4af6=contentHash(_0x2f4a2f),_0x4b7400=readMetadataIfPresent(_0x10b684)?.[_0x2c45b2(0xf0)];ensurePulledFilesCanBeOverwritten(_0x3463cd,_0x10b684,_0x1aa4a9,_0x30b6b3[_0x2c45b2(0x124)]===!![]),mkdirSync(_0x3463cd,{'recursive':!![],'mode':0x1c0});const _0x6b144e=existsSync(_0x231f56)?readFileSync(_0x231f56,_0x2c45b2(0x118)):undefined;return materializeFiles(_0x3463cd,_0x1aa4a9),removeStaleManagedFiles(_0x3463cd,_0x4b7400,_0x1aa4a9),writeJsonAtomic(_0x10b684,buildMetadata(_0x38f277,_0x46f904,_0x30b6b3[_0x2c45b2(0xf8)],_0x5a4af6,_0x30b6b3[_0x2c45b2(0x121)],_0x1aa4a9,_0x50ce18)),{'skill':_0x38f277,'scope':_0x46f904,'dir':_0x3463cd,'skillMdPath':_0x231f56,'metadataPath':_0x10b684,'contentHash':_0x5a4af6,'changed':_0x6b144e!==_0x2f4a2f};}function withMaterializedSkillFrontmatter(_0x44276e,_0x456ea1,_0x4b2d26){const _0xa7b1e8=a101_0x5ceb,_0x3cdc54=skillDisplayName(_0x456ea1,_0x4b2d26),_0x5daff0=_0x456ea1[_0xa7b1e8(0x10a)]?.[_0xa7b1e8(0x115)]()||_0x3cdc54||_0x4b2d26;return normalizeLocalFiles(_0x44276e)[_0xa7b1e8(0xf9)](_0x1e3cc5=>{const _0x391f46=_0xa7b1e8,_0x1fff18=fileText(_0x1e3cc5);if(_0x1e3cc5['path']!==SKILL_FILE)return _0x1e3cc5;if(hasYamlFrontmatter(_0x1fff18))return{'path':_0x1e3cc5['path'],'content':withSyncedDisplayName(_0x1fff18,_0x3cdc54)};return{'path':_0x1e3cc5[_0x391f46(0x110)],'content':prependSkillFrontmatter(_0x1fff18,{'name':_0x4b2d26,'displayName':_0x3cdc54,'description':_0x5daff0})};});}function hasYamlFrontmatter(_0x36b407){return/^\uFEFF?---\s*\r?\n/['test'](_0x36b407);}function prependSkillFrontmatter(_0x584715,_0xf00ed8){const _0x1b7830=a101_0x5ceb,_0x43a135=_0x584715[_0x1b7830(0x108)](/^\uFEFF/,'');return[_0x1b7830(0x114),_0x1b7830(0x119)+yamlString(_0xf00ed8[_0x1b7830(0x105)]),_0xf00ed8[_0x1b7830(0x103)]?'displayName:\x20'+yamlString(_0xf00ed8[_0x1b7830(0x103)]):undefined,_0x1b7830(0x113)+yamlString(_0xf00ed8[_0x1b7830(0x10a)]),_0x1b7830(0x114),'',_0x43a135]['filter'](_0x2dec0e=>_0x2dec0e!==undefined)[_0x1b7830(0xf2)]('\x0a');}function yamlString(_0x17f1fd){const _0x2cdba3=a101_0x5ceb;return JSON[_0x2cdba3(0x117)](_0x17f1fd[_0x2cdba3(0x108)](/\r/g,'')[_0x2cdba3(0x115)]());}function skillDisplayName(_0x43222e,_0x5eb67f){const _0x1f7c39=a101_0x5ceb,_0x4e3ff2=_0x43222e[_0x1f7c39(0x100)]?.[_0x1f7c39(0x115)]();return _0x4e3ff2||_0x5eb67f;}function withSyncedDisplayName(_0x59ed2a,_0x204766){const _0x1b196d=a101_0x5ceb,_0x565bff=_0x59ed2a[_0x1b196d(0x11f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x565bff)return _0x59ed2a;const _0x4b9cc5=_0x565bff[0x1]??'',_0x3c4bb5=_0x565bff[0x2]??'',_0x1ecaf1=parseDocument(_0x3c4bb5);if(_0x1ecaf1[_0x1b196d(0xf6)][_0x1b196d(0x102)]>0x0||!isMap(_0x1ecaf1[_0x1b196d(0xff)]))return _0x59ed2a;if(_0x204766)_0x1ecaf1[_0x1b196d(0x120)](_0x1b196d(0x103),_0x204766);else{if(_0x1ecaf1['has'](_0x1b196d(0x103)))_0x1ecaf1['delete'](_0x1b196d(0x103));else return _0x59ed2a;}forceBlockCollections(_0x1ecaf1[_0x1b196d(0xff)]);const _0x3c8c8c=_0x1ecaf1['toString']({'lineWidth':0x0})['trimEnd'](),_0x210002=_0x59ed2a[_0x1b196d(0xfc)](_0x565bff[0x0][_0x1b196d(0x102)])[_0x1b196d(0x108)](/^\r?\n/,'');return _0x4b9cc5+_0x1b196d(0x10c)+_0x3c8c8c+_0x1b196d(0xfe)+_0x210002;}function forceBlockCollections(_0x4ec2f6){if(!isNode(_0x4ec2f6))return;visit(_0x4ec2f6,(_0x1f21f7,_0x28373d)=>{isCollection(_0x28373d)&&(_0x28373d['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1fb740,_0x404e89,_0x475b09,_0x167d12){const _0x1beb38=a101_0x5ceb;if(_0x167d12||!existsSync(_0x404e89))return;const _0x53da84=readMetadataIfPresent(_0x404e89);if(!_0x53da84)return;const _0x318d3b=_0x53da84['fileHashes']&&Object[_0x1beb38(0xf1)](_0x53da84[_0x1beb38(0xf0)])[_0x1beb38(0x102)]>0x0?_0x53da84[_0x1beb38(0xf0)]:undefined;if(_0x318d3b)for(const [_0x287c1f,_0x3feea8]of Object[_0x1beb38(0x107)](_0x318d3b)){const _0x3aa204=resolveManagedFilePath(_0x1fb740,_0x287c1f);if(!existsSync(_0x3aa204))throw CliErrors[_0x1beb38(0x101)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1fb740,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x287c1f);const _0x392e2e=lstatSync(_0x3aa204);if(!_0x392e2e[_0x1beb38(0x111)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1fb740,_0x1beb38(0x122)+_0x287c1f);const _0x54b8f0=bufferSha256(readFileSync(_0x3aa204));if(_0x54b8f0!==_0x3feea8)throw CliErrors[_0x1beb38(0x101)](_0x1beb38(0x10e)+_0x1fb740+_0x1beb38(0x11d)+_0x287c1f,_0x1beb38(0x10d)+_0x287c1f);}else{const _0x5e21bb=resolve(_0x1fb740,SKILL_FILE);if(existsSync(_0x5e21bb)&&_0x53da84[_0x1beb38(0x126)]){const _0x5a74dd=contentHash(readFileSync(_0x5e21bb,_0x1beb38(0x118)));if(_0x5a74dd!==_0x53da84[_0x1beb38(0x126)])throw CliErrors['validation'](_0x1beb38(0x11b)+_0x5e21bb,_0x1beb38(0x116));}}for(const _0x220a52 of normalizeLocalFiles(_0x475b09)){if(_0x318d3b?.[_0x220a52[_0x1beb38(0x110)]])continue;if(!_0x318d3b&&_0x220a52[_0x1beb38(0x110)]===SKILL_FILE)continue;const _0x485783=resolveManagedFilePath(_0x1fb740,_0x220a52[_0x1beb38(0x110)]);if(!existsSync(_0x485783))continue;const _0x52b6ae=lstatSync(_0x485783);if(!_0x52b6ae[_0x1beb38(0x111)]())throw CliErrors[_0x1beb38(0x101)](_0x1beb38(0x10e)+_0x1fb740,_0x1beb38(0xfb)+_0x220a52[_0x1beb38(0x110)]);const _0x2e20d5=bufferSha256(readFileSync(_0x485783));if(_0x2e20d5!==fileHash(_0x220a52))throw CliErrors['validation'](_0x1beb38(0x10e)+_0x1fb740,_0x1beb38(0x11e)+_0x220a52[_0x1beb38(0x110)]);}}function a101_0x2700(){const _0xc706c7=['Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','19384meKppw','.\x20Changed\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','match','set','pulledAt','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','accessKey','force','1726425ZRSyKT','contentHash','fileHashes','keys','join','10CxRqaB','10030725YPLdzB','10723040oLQZpg','errors','Runtime\x20Skill\x20package\x20is\x20missing\x20','appCode','map','find','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','slice','4599bblLUf','\x0a---\x0a\x0a','contents','skillName','validation','length','displayName','paths','name','381250SEkpbF','entries','replace','327126JSjPqd','description','6eaETei','---\x0a','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','4279612cWASof','path','isFile','packageBytes','description:\x20','---','trim','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','stringify','utf8','name:\x20','env'];a101_0x2700=function(){return _0xc706c7;};return a101_0x2700();}function materializeFiles(_0x14fde0,_0x10557e){const _0x53c541=a101_0x5ceb;for(const _0x91045a of normalizeLocalFiles(_0x10557e)){const _0x51e2a9=resolveManagedFilePath(_0x14fde0,_0x91045a[_0x53c541(0x110)]);mkdirSync(dirname(_0x51e2a9),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x51e2a9,fileContent(_0x91045a),0x180);}}function a101_0x5ceb(_0x100ae5,_0x54abd0){_0x100ae5=_0x100ae5-0xf0;const _0x270046=a101_0x2700();let _0x5cebda=_0x270046[_0x100ae5];return _0x5cebda;}function removeStaleManagedFiles(_0x4181da,_0x36dd0f,_0x296298){const _0x562ce9=a101_0x5ceb;if(!_0x36dd0f)return;const _0x3d608f=new Set(normalizeLocalFiles(_0x296298)[_0x562ce9(0xf9)](_0x462109=>_0x462109[_0x562ce9(0x110)]));for(const _0x5d73f0 of Object['keys'](_0x36dd0f)){if(_0x3d608f['has'](_0x5d73f0))continue;const _0x5ba1dc=resolveManagedFilePath(_0x4181da,_0x5d73f0);existsSync(_0x5ba1dc)&&lstatSync(_0x5ba1dc)[_0x562ce9(0x111)]()&&rmSync(_0x5ba1dc,{'force':!![]});}}
1
+ (function(_0x1ab0e5,_0x555526){const _0x1f8134=a101_0x19fb,_0x568ba5=_0x1ab0e5();while(!![]){try{const _0x51c6e9=-parseInt(_0x1f8134(0xc7))/0x1+parseInt(_0x1f8134(0xc8))/0x2*(-parseInt(_0x1f8134(0x9b))/0x3)+parseInt(_0x1f8134(0xc6))/0x4*(parseInt(_0x1f8134(0xb0))/0x5)+-parseInt(_0x1f8134(0xb7))/0x6*(parseInt(_0x1f8134(0xab))/0x7)+parseInt(_0x1f8134(0xac))/0x8+parseInt(_0x1f8134(0xa4))/0x9*(-parseInt(_0x1f8134(0x9a))/0xa)+-parseInt(_0x1f8134(0xb2))/0xb*(-parseInt(_0x1f8134(0x9e))/0xc);if(_0x51c6e9===_0x555526)break;else _0x568ba5['push'](_0x568ba5['shift']());}catch(_0x83759c){_0x568ba5['push'](_0x568ba5['shift']());}}}(a101_0x4d7d,0x88f86));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';import{getRuntimeSkillDir}from'./paths.js';function a101_0x19fb(_0x5862dc,_0x3f7833){_0x5862dc=_0x5862dc-0x98;const _0x4d7d66=a101_0x4d7d();let _0x19fb2d=_0x4d7d66[_0x5862dc];return _0x19fb2d;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x5abfdb,_0x574a25,_0x378e96){const _0x1cc469=a101_0x19fb,_0x127ecf=requireSkillCode(_0x5abfdb),_0x191d12=requirePackageBytes(_0x127ecf,_0x378e96[_0x1cc469(0xc1)]),_0x479896=extractDownloadedPackage(_0x191d12),_0x3aba77=_0x479896[_0x1cc469(0xa5)](_0x3d011c=>_0x3d011c[_0x1cc469(0xa3)]===SKILL_FILE);if(!_0x3aba77)throw CliErrors[_0x1cc469(0xb5)](_0x1cc469(0x9c)+SKILL_FILE+':\x20'+_0x127ecf);const _0x28bb67=withMaterializedSkillFrontmatter(_0x479896,_0x5abfdb,_0x127ecf),_0x5921b2=_0x28bb67[_0x1cc469(0xa5)](_0x5b23f6=>_0x5b23f6[_0x1cc469(0xa3)]===SKILL_FILE),_0x2925f8=fileText(_0x5921b2),_0x1fbe72=getRuntimeSkillDir(_0x378e96['env'],_0x378e96[_0x1cc469(0xa7)],_0x378e96[_0x1cc469(0xc2)],_0x574a25,_0x127ecf,_0x378e96[_0x1cc469(0xce)]),_0x470158=resolve(_0x1fbe72,SKILL_FILE),_0x2b3540=resolve(_0x1fbe72,METADATA_FILE),_0x12406c=contentHash(_0x2925f8),_0x2ddb9c=readMetadataIfPresent(_0x2b3540)?.[_0x1cc469(0xb4)];ensurePulledFilesCanBeOverwritten(_0x1fbe72,_0x2b3540,_0x28bb67,_0x378e96[_0x1cc469(0xd4)]===!![]),mkdirSync(_0x1fbe72,{'recursive':!![],'mode':0x1c0});const _0x2edbe5=existsSync(_0x470158)?readFileSync(_0x470158,_0x1cc469(0xbb)):undefined;return materializeFiles(_0x1fbe72,_0x28bb67),removeStaleManagedFiles(_0x1fbe72,_0x2ddb9c,_0x28bb67),writeJsonAtomic(_0x2b3540,buildMetadata(_0x5abfdb,_0x574a25,_0x378e96[_0x1cc469(0xc2)],_0x12406c,_0x378e96['pulledAt'],_0x28bb67,_0x191d12)),{'skill':_0x5abfdb,'scope':_0x574a25,'dir':_0x1fbe72,'skillMdPath':_0x470158,'metadataPath':_0x2b3540,'contentHash':_0x12406c,'changed':_0x2edbe5!==_0x2925f8};}function withMaterializedSkillFrontmatter(_0x4a5a26,_0x334d68,_0x4995d6){const _0x445ecc=a101_0x19fb,_0x280bdc=skillDisplayName(_0x334d68,_0x4995d6),_0x2de3f3=_0x334d68[_0x445ecc(0x99)]?.[_0x445ecc(0xbe)]()||_0x280bdc||_0x4995d6;return normalizeLocalFiles(_0x4a5a26)['map'](_0x51a208=>{const _0xeb3682=_0x445ecc,_0x433a6c=fileText(_0x51a208);if(_0x51a208[_0xeb3682(0xa3)]!==SKILL_FILE)return _0x51a208;if(hasYamlFrontmatter(_0x433a6c))return{'path':_0x51a208[_0xeb3682(0xa3)],'content':withSyncedDisplayName(_0x433a6c,_0x280bdc)};return{'path':_0x51a208[_0xeb3682(0xa3)],'content':prependSkillFrontmatter(_0x433a6c,{'name':_0x4995d6,'displayName':_0x280bdc,'description':_0x2de3f3})};});}function hasYamlFrontmatter(_0x3003d3){const _0x4b2a1e=a101_0x19fb;return/^\uFEFF?---\s*\r?\n/[_0x4b2a1e(0xbd)](_0x3003d3);}function a101_0x4d7d(){const _0xebf0f6=['name:\x20','keys','toString','filter','Managed\x20file\x20was\x20removed\x20locally:\x20','force','flow','description','18710sCRpTH','1553766fbqIIn','Runtime\x20Skill\x20package\x20is\x20missing\x20','stringify','12DjPgZX','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','slice','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','join','path','1269LXrQwp','find','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','accessKey','\x0a---\x0a\x0a','replace','contents','53851tZmoxh','6132096QnGapj','description:\x20','---\x0a','trimEnd','5350TxSXnG','entries','20129593xTSdAH','displayName','fileHashes','validation','has','30TFcCzs','length','contentHash','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','utf8','isFile','test','trim','skillName','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','packageBytes','appCode','match','displayName:\x20','name','1148psysiz','1004415wCUwZP','4OWVBLP','.\x20Changed\x20file:\x20','set','---','delete','errors','paths'];a101_0x4d7d=function(){return _0xebf0f6;};return a101_0x4d7d();}function prependSkillFrontmatter(_0x5add9b,_0x3cb7a1){const _0x191332=a101_0x19fb,_0x34105f=_0x5add9b[_0x191332(0xa9)](/^\uFEFF/,'');return[_0x191332(0xcb),_0x191332(0xcf)+yamlString(_0x3cb7a1[_0x191332(0xc5)]),_0x3cb7a1[_0x191332(0xb3)]?_0x191332(0xc4)+yamlString(_0x3cb7a1[_0x191332(0xb3)]):undefined,_0x191332(0xad)+yamlString(_0x3cb7a1[_0x191332(0x99)]),_0x191332(0xcb),'',_0x34105f][_0x191332(0xd2)](_0x3adffd=>_0x3adffd!==undefined)[_0x191332(0xa2)]('\x0a');}function yamlString(_0x5791a4){const _0x18053a=a101_0x19fb;return JSON[_0x18053a(0x9d)](_0x5791a4[_0x18053a(0xa9)](/\r/g,'')['trim']());}function skillDisplayName(_0x4d2907,_0x27479a){const _0x20337a=a101_0x19fb,_0xea20bc=_0x4d2907[_0x20337a(0xbf)]?.['trim']();return _0xea20bc||_0x27479a;}function withSyncedDisplayName(_0x589fcc,_0x30671e){const _0x53aef8=a101_0x19fb,_0x53a390=_0x589fcc[_0x53aef8(0xc3)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x53a390)return _0x589fcc;const _0x251dbe=_0x53a390[0x1]??'',_0x980c01=_0x53a390[0x2]??'',_0x3de694=parseDocument(_0x980c01);if(_0x3de694[_0x53aef8(0xcd)][_0x53aef8(0xb8)]>0x0||!isMap(_0x3de694['contents']))return _0x589fcc;if(_0x30671e)_0x3de694[_0x53aef8(0xca)](_0x53aef8(0xb3),_0x30671e);else{if(_0x3de694[_0x53aef8(0xb6)](_0x53aef8(0xb3)))_0x3de694[_0x53aef8(0xcc)](_0x53aef8(0xb3));else return _0x589fcc;}forceBlockCollections(_0x3de694[_0x53aef8(0xaa)]);const _0x22ba35=_0x3de694[_0x53aef8(0xd1)]({'lineWidth':0x0})[_0x53aef8(0xaf)](),_0x3c5a25=_0x589fcc[_0x53aef8(0xa0)](_0x53a390[0x0][_0x53aef8(0xb8)])['replace'](/^\r?\n/,'');return _0x251dbe+_0x53aef8(0xae)+_0x22ba35+_0x53aef8(0xa8)+_0x3c5a25;}function forceBlockCollections(_0x198313){if(!isNode(_0x198313))return;visit(_0x198313,(_0x6fecab,_0x3b7f4a)=>{const _0x173f21=a101_0x19fb;isCollection(_0x3b7f4a)&&(_0x3b7f4a[_0x173f21(0x98)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x5543fe,_0x35cdf6,_0x25b0f1,_0xc482f9){const _0x4e89a3=a101_0x19fb;if(_0xc482f9||!existsSync(_0x35cdf6))return;const _0x3f4d3f=readMetadataIfPresent(_0x35cdf6);if(!_0x3f4d3f)return;const _0x22a7cb=_0x3f4d3f['fileHashes']&&Object[_0x4e89a3(0xd0)](_0x3f4d3f[_0x4e89a3(0xb4)])[_0x4e89a3(0xb8)]>0x0?_0x3f4d3f[_0x4e89a3(0xb4)]:undefined;if(_0x22a7cb)for(const [_0xecf2e5,_0x25de69]of Object[_0x4e89a3(0xb1)](_0x22a7cb)){const _0x567f28=resolveManagedFilePath(_0x5543fe,_0xecf2e5);if(!existsSync(_0x567f28))throw CliErrors[_0x4e89a3(0xb5)](_0x4e89a3(0xba)+_0x5543fe,_0x4e89a3(0xd3)+_0xecf2e5);const _0x215df5=lstatSync(_0x567f28);if(!_0x215df5['isFile']())throw CliErrors[_0x4e89a3(0xb5)](_0x4e89a3(0xba)+_0x5543fe,_0x4e89a3(0xa1)+_0xecf2e5);const _0xca5198=bufferSha256(readFileSync(_0x567f28));if(_0xca5198!==_0x25de69)throw CliErrors['validation'](_0x4e89a3(0xba)+_0x5543fe+_0x4e89a3(0xc9)+_0xecf2e5,_0x4e89a3(0xa6)+_0xecf2e5);}else{const _0x562084=resolve(_0x5543fe,SKILL_FILE);if(existsSync(_0x562084)&&_0x3f4d3f[_0x4e89a3(0xb9)]){const _0x2cfd20=contentHash(readFileSync(_0x562084,'utf8'));if(_0x2cfd20!==_0x3f4d3f[_0x4e89a3(0xb9)])throw CliErrors['validation']('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x562084,_0x4e89a3(0x9f));}}for(const _0x2ed110 of normalizeLocalFiles(_0x25b0f1)){if(_0x22a7cb?.[_0x2ed110[_0x4e89a3(0xa3)]])continue;if(!_0x22a7cb&&_0x2ed110[_0x4e89a3(0xa3)]===SKILL_FILE)continue;const _0x2496b2=resolveManagedFilePath(_0x5543fe,_0x2ed110[_0x4e89a3(0xa3)]);if(!existsSync(_0x2496b2))continue;const _0xd946f4=lstatSync(_0x2496b2);if(!_0xd946f4['isFile']())throw CliErrors[_0x4e89a3(0xb5)](_0x4e89a3(0xba)+_0x5543fe,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x2ed110[_0x4e89a3(0xa3)]);const _0x186045=bufferSha256(readFileSync(_0x2496b2));if(_0x186045!==fileHash(_0x2ed110))throw CliErrors[_0x4e89a3(0xb5)](_0x4e89a3(0xba)+_0x5543fe,_0x4e89a3(0xc0)+_0x2ed110[_0x4e89a3(0xa3)]);}}function materializeFiles(_0xd08d49,_0x3821fc){const _0x2e916d=a101_0x19fb;for(const _0x70af49 of normalizeLocalFiles(_0x3821fc)){const _0x457c58=resolveManagedFilePath(_0xd08d49,_0x70af49[_0x2e916d(0xa3)]);mkdirSync(dirname(_0x457c58),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x457c58,fileContent(_0x70af49),0x180);}}function removeStaleManagedFiles(_0x52c758,_0x4da70b,_0x16b4f2){const _0x3e5bf4=a101_0x19fb;if(!_0x4da70b)return;const _0x5cfb81=new Set(normalizeLocalFiles(_0x16b4f2)['map'](_0x207be5=>_0x207be5[_0x3e5bf4(0xa3)]));for(const _0x240212 of Object['keys'](_0x4da70b)){if(_0x5cfb81[_0x3e5bf4(0xb6)](_0x240212))continue;const _0x4ae089=resolveManagedFilePath(_0x52c758,_0x240212);existsSync(_0x4ae089)&&lstatSync(_0x4ae089)[_0x3e5bf4(0xbc)]()&&rmSync(_0x4ae089,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x160303,_0x3d5c4c){const _0x3bd872=a102_0x5928,_0x17e54c=_0x160303();while(!![]){try{const _0x5d9bd4=parseInt(_0x3bd872(0x1c7))/0x1+parseInt(_0x3bd872(0x1bb))/0x2*(-parseInt(_0x3bd872(0x1c4))/0x3)+parseInt(_0x3bd872(0x1cb))/0x4+-parseInt(_0x3bd872(0x1ba))/0x5+parseInt(_0x3bd872(0x1cd))/0x6+parseInt(_0x3bd872(0x1bd))/0x7+parseInt(_0x3bd872(0x1df))/0x8;if(_0x5d9bd4===_0x3d5c4c)break;else _0x17e54c['push'](_0x17e54c['shift']());}catch(_0x48ca46){_0x17e54c['push'](_0x17e54c['shift']());}}}(a102_0x9814,0xb1811));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 a102_0x5928(_0x5160f2,_0x52a56d){_0x5160f2=_0x5160f2-0x1b8;const _0x9814b2=a102_0x9814();let _0x592819=_0x9814b2[_0x5160f2];return _0x592819;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x2cbe6f,_0x35fc41,_0x2edd60,_0x46b8bc,_0x12bd2f,_0x504564,_0x4df0dd){const _0x12f65e=a102_0x5928,_0x466efb=_0x504564?normalizeLocalFiles(_0x504564):[],_0x2853a4=!_0x4df0dd&&_0x466efb['length']>0x0?buildSkillPackage(_0x466efb):undefined,_0x1d78ba=_0x4df0dd?bufferSha256(_0x4df0dd):_0x2853a4?.[_0x12f65e(0x1c9)][_0x12f65e(0x1d0)],_0x558d15=_0x4df0dd?.[_0x12f65e(0x1c8)]??_0x2853a4?.[_0x12f65e(0x1c9)][_0x12f65e(0x1ce)],_0x17849b=_0x466efb[_0x12f65e(0x1c8)]>0x0?Object[_0x12f65e(0x1be)](_0x466efb['map'](_0x56819e=>[_0x56819e['path'],fileHash(_0x56819e)])):undefined;return{'schemaVersion':_0x466efb[_0x12f65e(0x1c8)]>0x0?0x2:0x1,'id':_0x2cbe6f['id'],'appCode':_0x2edd60,'skillCode':requireSkillCode(_0x2cbe6f),'skillName':_0x2cbe6f[_0x12f65e(0x1bc)],'description':_0x2cbe6f[_0x12f65e(0x1c6)],'scope':_0x35fc41,'readonly':_0x35fc41!==_0x12f65e(0x1db)||_0x2cbe6f[_0x12f65e(0x1dd)]===!![],'tenantCode':_0x2cbe6f[_0x12f65e(0x1cf)],'userId':_0x2cbe6f[_0x12f65e(0x1d9)],'version':_0x2cbe6f[_0x12f65e(0x1ca)],'status':_0x2cbe6f[_0x12f65e(0x1d5)],'tags':Array[_0x12f65e(0x1d7)](_0x2cbe6f[_0x12f65e(0x1d2)])?_0x2cbe6f[_0x12f65e(0x1d2)]:[],'hasUpstreamUpdate':_0x2cbe6f[_0x12f65e(0x1cc)],'forkedFromSkillId':_0x2cbe6f[_0x12f65e(0x1d1)],'forkedFromVersion':_0x2cbe6f[_0x12f65e(0x1bf)],'sourceSessionId':_0x2cbe6f['sourceSessionId'],'contentHash':_0x46b8bc,'fileHashes':_0x17849b,'treeHash':_0x466efb[_0x12f65e(0x1c8)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x466efb)):undefined,'ossPath':remoteManifestOssPath(_0x2cbe6f[_0x12f65e(0x1c5)]),'zipSha256':_0x1d78ba,'zipSize':_0x558d15,'files':_0x466efb['length']>0x0?_0x466efb[_0x12f65e(0x1c3)](_0x30d71f=>({'path':_0x30d71f[_0x12f65e(0x1dc)],'hash':fileHash(_0x30d71f),'size':fileContent(_0x30d71f)[_0x12f65e(0x1c8)]})):undefined,'pulledAt':_0x12bd2f??new Date()[_0x12f65e(0x1de)]()};}export function requireSkillCode(_0x47ea7b){const _0x43f97a=a102_0x5928,_0xa8f159=_0x47ea7b[_0x43f97a(0x1d6)]?.['trim']();if(!_0xa8f159)throw CliErrors[_0x43f97a(0x1b9)](_0x43f97a(0x1c2));return _0xa8f159;}export function readMetadataIfPresent(_0x7e79db){const _0x240962=a102_0x5928;if(!existsSync(_0x7e79db))return undefined;try{const _0x3419e2=JSON[_0x240962(0x1d3)](readFileSync(_0x7e79db,_0x240962(0x1c0)));return _0x3419e2;}catch{throw CliErrors[_0x240962(0x1b9)](_0x240962(0x1da)+METADATA_FILE+':\x20'+_0x7e79db);}}function a102_0x9814(){const _0x5ae123=['forkedFromSkillId','tags','parse','string','status','skillCode','isArray','object','userId','Invalid\x20','personal','path','readonly','toISOString','1892576XlcvyX','trim','validation','5797195PcOMqk','16xyBHti','skillName','9429721QHdxIF','fromEntries','forkedFromVersion','utf8','ossPath','Runtime\x20Skill\x20is\x20missing\x20skillCode.','map','405894woxIIv','files','description','654395zSDEwX','length','manifest','version','304116famTMN','hasUpstreamUpdate','3928686BsjliC','zipSize','tenantCode','zipSha256'];a102_0x9814=function(){return _0x5ae123;};return a102_0x9814();}function remoteManifestOssPath(_0x89942){const _0x5779d4=a102_0x5928;if(!_0x89942||typeof _0x89942!==_0x5779d4(0x1d8)||Array[_0x5779d4(0x1d7)](_0x89942))return undefined;const _0x394c66=_0x89942[_0x5779d4(0x1c1)];return typeof _0x394c66===_0x5779d4(0x1d4)&&_0x394c66[_0x5779d4(0x1b8)]()?_0x394c66['trim']():undefined;}
1
+ (function(_0x44b8c8,_0x49703a){const _0x239a67=a102_0x3334,_0x25071d=_0x44b8c8();while(!![]){try{const _0x5859b7=-parseInt(_0x239a67(0x1e3))/0x1+-parseInt(_0x239a67(0x1f9))/0x2+parseInt(_0x239a67(0x203))/0x3+parseInt(_0x239a67(0x1e8))/0x4*(-parseInt(_0x239a67(0x1f5))/0x5)+parseInt(_0x239a67(0x1f4))/0x6+parseInt(_0x239a67(0x1fa))/0x7*(-parseInt(_0x239a67(0x202))/0x8)+parseInt(_0x239a67(0x1ed))/0x9*(parseInt(_0x239a67(0x1f6))/0xa);if(_0x5859b7===_0x49703a)break;else _0x25071d['push'](_0x25071d['shift']());}catch(_0x540e57){_0x25071d['push'](_0x25071d['shift']());}}}(a102_0x2fc1,0x668c5));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a102_0x3334(_0x506496,_0x126276){_0x506496=_0x506496-0x1e1;const _0x2fc12b=a102_0x2fc1();let _0x33349f=_0x2fc12b[_0x506496];return _0x33349f;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a102_0x2fc1(){const _0x590aeb=['1480UsJZcn','utf8','Runtime\x20Skill\x20is\x20missing\x20skillCode.','671588PvLSwa','1647121dcqXjA','manifest','tenantCode','isArray','zipSize','hasUpstreamUpdate','toISOString','object','8GKYtFT','1493103IFnkLE','version','string','readonly','469967VxAyVZ','path','fromEntries','skillName','trim','16ruXDOu','sourceSessionId','parse','tags','zipSha256','64899AKWPED','forkedFromVersion','map','validation','userId','length','files','2548536fkvqMn','660730CqVSPx'];a102_0x2fc1=function(){return _0x590aeb;};return a102_0x2fc1();}export function buildMetadata(_0x1305f6,_0x3a74f3,_0x6612f7,_0x2cc9c3,_0x120ad9,_0x59f5ef,_0x470f19){const _0x79ef5e=a102_0x3334,_0x51693b=_0x59f5ef?normalizeLocalFiles(_0x59f5ef):[],_0x53f47b=!_0x470f19&&_0x51693b[_0x79ef5e(0x1f2)]>0x0?buildSkillPackage(_0x51693b):undefined,_0x553b59=_0x470f19?bufferSha256(_0x470f19):_0x53f47b?.[_0x79ef5e(0x1fb)][_0x79ef5e(0x1ec)],_0x227091=_0x470f19?.[_0x79ef5e(0x1f2)]??_0x53f47b?.[_0x79ef5e(0x1fb)][_0x79ef5e(0x1fe)],_0x3d76e6=_0x51693b['length']>0x0?Object[_0x79ef5e(0x1e5)](_0x51693b[_0x79ef5e(0x1ef)](_0x2bea7d=>[_0x2bea7d[_0x79ef5e(0x1e4)],fileHash(_0x2bea7d)])):undefined;return{'schemaVersion':_0x51693b[_0x79ef5e(0x1f2)]>0x0?0x2:0x1,'id':_0x1305f6['id'],'appCode':_0x6612f7,'skillCode':requireSkillCode(_0x1305f6),'skillName':_0x1305f6[_0x79ef5e(0x1e6)],'description':_0x1305f6['description'],'scope':_0x3a74f3,'readonly':_0x3a74f3!=='personal'||_0x1305f6[_0x79ef5e(0x1e2)]===!![],'tenantCode':_0x1305f6[_0x79ef5e(0x1fc)],'userId':_0x1305f6[_0x79ef5e(0x1f1)],'version':_0x1305f6[_0x79ef5e(0x204)],'status':_0x1305f6['status'],'tags':Array['isArray'](_0x1305f6[_0x79ef5e(0x1eb)])?_0x1305f6[_0x79ef5e(0x1eb)]:[],'hasUpstreamUpdate':_0x1305f6[_0x79ef5e(0x1ff)],'forkedFromSkillId':_0x1305f6['forkedFromSkillId'],'forkedFromVersion':_0x1305f6[_0x79ef5e(0x1ee)],'sourceSessionId':_0x1305f6[_0x79ef5e(0x1e9)],'contentHash':_0x2cc9c3,'fileHashes':_0x3d76e6,'treeHash':_0x51693b[_0x79ef5e(0x1f2)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x51693b)):undefined,'ossPath':remoteManifestOssPath(_0x1305f6[_0x79ef5e(0x1f3)]),'zipSha256':_0x553b59,'zipSize':_0x227091,'files':_0x51693b['length']>0x0?_0x51693b[_0x79ef5e(0x1ef)](_0x570397=>({'path':_0x570397[_0x79ef5e(0x1e4)],'hash':fileHash(_0x570397),'size':fileContent(_0x570397)[_0x79ef5e(0x1f2)]})):undefined,'pulledAt':_0x120ad9??new Date()[_0x79ef5e(0x200)]()};}export function requireSkillCode(_0x557f8c){const _0x35b0d1=a102_0x3334,_0x290381=_0x557f8c['skillCode']?.['trim']();if(!_0x290381)throw CliErrors[_0x35b0d1(0x1f0)](_0x35b0d1(0x1f8));return _0x290381;}export function readMetadataIfPresent(_0x597ad9){const _0x5b2f2b=a102_0x3334;if(!existsSync(_0x597ad9))return undefined;try{const _0xea9e52=JSON[_0x5b2f2b(0x1ea)](readFileSync(_0x597ad9,_0x5b2f2b(0x1f7)));return _0xea9e52;}catch{throw CliErrors[_0x5b2f2b(0x1f0)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x597ad9);}}function remoteManifestOssPath(_0x5e99ad){const _0x50cd26=a102_0x3334;if(!_0x5e99ad||typeof _0x5e99ad!==_0x50cd26(0x201)||Array[_0x50cd26(0x1fd)](_0x5e99ad))return undefined;const _0x419049=_0x5e99ad['ossPath'];return typeof _0x419049===_0x50cd26(0x1e1)&&_0x419049['trim']()?_0x419049[_0x50cd26(0x1e7)]():undefined;}
@@ -1 +1 @@
1
- const a103_0x552df6=a103_0x7b36;(function(_0x76ca26,_0x38ba97){const _0x5a542a=a103_0x7b36,_0x75e1c0=_0x76ca26();while(!![]){try{const _0x133647=-parseInt(_0x5a542a(0xba))/0x1*(parseInt(_0x5a542a(0xb3))/0x2)+parseInt(_0x5a542a(0xb6))/0x3*(-parseInt(_0x5a542a(0xc2))/0x4)+-parseInt(_0x5a542a(0xbc))/0x5+parseInt(_0x5a542a(0xae))/0x6+-parseInt(_0x5a542a(0xaf))/0x7*(parseInt(_0x5a542a(0xbf))/0x8)+-parseInt(_0x5a542a(0xc4))/0x9+-parseInt(_0x5a542a(0xb5))/0xa*(-parseInt(_0x5a542a(0xc6))/0xb);if(_0x133647===_0x38ba97)break;else _0x75e1c0['push'](_0x75e1c0['shift']());}catch(_0x4aaccb){_0x75e1c0['push'](_0x75e1c0['shift']());}}}(a103_0x1214,0xb659f));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(_0x25d553={}){const _0x5646d5=a103_0x7b36,_0x482299=_0x25d553[_0x5646d5(0xac)]??homedir(),_0x1a1d19=resolve(_0x482299,PRODUCT_CONFIG[_0x5646d5(0xc5)],_0x5646d5(0xbb)),_0x4bb9d1=trimmedEnv(_0x5646d5(0xc0)),_0x234bd3=trimmedEnv(_0x5646d5(0xaa)),_0x450728=resolve(_0x482299,_0x5646d5(0xb4)),_0x2bc3b9=_0x25d553['workbuddySkillsDir']??(existsSync(_0x450728)?resolve(_0x450728,_0x5646d5(0xbd)):undefined);return{'homeDir':_0x482299,'cacheRoot':_0x1a1d19,'managedRoot':resolve(_0x482299,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x25d553['agentsSkillsDir']??_0x4bb9d1??resolve(_0x482299,_0x5646d5(0xad),_0x5646d5(0xbd)),'claudeSkillsDir':_0x25d553['claudeSkillsDir']??_0x234bd3??resolve(_0x482299,_0x5646d5(0xb2),_0x5646d5(0xbd)),'workbuddySkillsDir':_0x2bc3b9};}export function runtimeAgentSkillRoots(_0xa1b0d0){const _0x4d5a40=a103_0x7b36;return[_0xa1b0d0[_0x4d5a40(0xb0)],_0xa1b0d0['claudeSkillsDir'],_0xa1b0d0[_0x4d5a40(0xb1)]][_0x4d5a40(0xc3)](_0x36cecd=>Boolean(_0x36cecd));}function a103_0x7b36(_0x5dbc2d,_0x34ecd9){_0x5dbc2d=_0x5dbc2d-0xaa;const _0x1214c9=a103_0x1214();let _0x7b3685=_0x1214c9[_0x5dbc2d];return _0x7b3685;}export function getRuntimeSkillCacheRoot(_0x11a5d4,_0x426618,_0x4cfef3={}){const _0x19d2ee=a103_0x7b36,_0x1df1c4=resolveSkillSyncPaths(_0x4cfef3);return resolve(_0x1df1c4['cacheRoot'],_0x11a5d4,fingerprintAccessKey(_0x426618),_0x19d2ee(0xbd));}function a103_0x1214(){const _0x3b928d=['969aNMZkR','\x20for\x20local\x20path:\x20','appCode','path\x20segment','1357nZZhiB','cache','4191195fFYKGf','skills','Unsafe\x20','1488VhRPlM','SKILL_ROOT','validation','3748tNRlSd','filter','423819lKUDPo','homeDirName','231LMUAwd','CLAUDE_SKILL_ROOT','includes','homeDir','.agents','7227096PIAKJK','36680KKArNP','agentsSkillsDir','workbuddySkillsDir','.claude','2138XxKTbL','.workbuddy','1502690qAAheW'];a103_0x1214=function(){return _0x3b928d;};return a103_0x1214();}export function getRuntimeSkillDir(_0x29e7b6,_0x2f0bba,_0x1ccecf,_0x7cb0a5,_0x4950a0,_0x5648c3={}){const _0xc1745f=a103_0x7b36;return resolve(getRuntimeSkillCacheRoot(_0x29e7b6,_0x2f0bba,_0x5648c3),safePathSegment(_0x1ccecf,_0xc1745f(0xb8)),_0x7cb0a5,safePathSegment(_0x4950a0,'skillCode'));}export function safePathSegment(_0x2b10f8,_0x436bee=a103_0x552df6(0xb9)){const _0x31c71b=a103_0x552df6;if(!_0x2b10f8||_0x2b10f8[_0x31c71b(0xab)]('/')||_0x2b10f8[_0x31c71b(0xab)]('\x5c')||_0x2b10f8[_0x31c71b(0xab)]('..'))throw CliErrors[_0x31c71b(0xc1)](_0x31c71b(0xbe)+_0x436bee+_0x31c71b(0xb7)+_0x2b10f8);return _0x2b10f8;}function trimmedEnv(_0x31a27d){const _0x2ca958=productEnv(_0x31a27d)?.['trim']();return _0x2ca958?_0x2ca958:undefined;}
1
+ const a103_0x544aa8=a103_0x4000;(function(_0x598e36,_0x25ad4c){const _0x3f5952=a103_0x4000,_0xb14224=_0x598e36();while(!![]){try{const _0x1791a0=parseInt(_0x3f5952(0x1f2))/0x1*(-parseInt(_0x3f5952(0x1fe))/0x2)+parseInt(_0x3f5952(0x1fc))/0x3+parseInt(_0x3f5952(0x1f7))/0x4+-parseInt(_0x3f5952(0x1ec))/0x5*(parseInt(_0x3f5952(0x1f5))/0x6)+-parseInt(_0x3f5952(0x1ee))/0x7+-parseInt(_0x3f5952(0x201))/0x8*(-parseInt(_0x3f5952(0x1ef))/0x9)+-parseInt(_0x3f5952(0x1fb))/0xa;if(_0x1791a0===_0x25ad4c)break;else _0xb14224['push'](_0xb14224['shift']());}catch(_0x7933ea){_0xb14224['push'](_0xb14224['shift']());}}}(a103_0x3c19,0x55b87));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';function a103_0x3c19(){const _0x13f5c6=['71016shdztW','workbuddySkillsDir','10wpcxmJ','homeDirName','skillCode','388952isbyNk','.claude','CLAUDE_SKILL_ROOT','SKILL_ROOT','skills','cache','path\x20segment','\x20for\x20local\x20path:\x20','.workbuddy','75MYNWGe','Unsafe\x20','3440143ZmTJyi','117cfZsKV','agentsSkillsDir','validation','2375ddjIEh','appCode','homeDir','60rqdSlw','filter','1931336eskRLB','includes','trim','claudeSkillsDir','2839680YQvfiq'];a103_0x3c19=function(){return _0x13f5c6;};return a103_0x3c19();}export function resolveSkillSyncPaths(_0x140263={}){const _0xf5813a=a103_0x4000,_0x30a439=_0x140263[_0xf5813a(0x1f4)]??homedir(),_0x13d54f=resolve(_0x30a439,PRODUCT_CONFIG[_0xf5813a(0x1ff)],_0xf5813a(0x1e8)),_0x55ee3d=trimmedEnv(_0xf5813a(0x1e6)),_0x534468=trimmedEnv(_0xf5813a(0x1e5)),_0x497c51=resolve(_0x30a439,_0xf5813a(0x1eb)),_0x4ec863=_0x140263[_0xf5813a(0x1fd)]??(existsSync(_0x497c51)?resolve(_0x497c51,_0xf5813a(0x1e7)):undefined);return{'homeDir':_0x30a439,'cacheRoot':_0x13d54f,'managedRoot':resolve(_0x30a439,PRODUCT_CONFIG[_0xf5813a(0x1ff)]),'agentsSkillsDir':_0x140263[_0xf5813a(0x1f0)]??_0x55ee3d??resolve(_0x30a439,'.agents',_0xf5813a(0x1e7)),'claudeSkillsDir':_0x140263[_0xf5813a(0x1fa)]??_0x534468??resolve(_0x30a439,_0xf5813a(0x1e4),'skills'),'workbuddySkillsDir':_0x4ec863};}export function runtimeAgentSkillRoots(_0x2bed49){const _0x477eec=a103_0x4000;return[_0x2bed49['agentsSkillsDir'],_0x2bed49[_0x477eec(0x1fa)],_0x2bed49[_0x477eec(0x1fd)]][_0x477eec(0x1f6)](_0x3b5c4c=>Boolean(_0x3b5c4c));}function a103_0x4000(_0x37b0fa,_0x3812d9){_0x37b0fa=_0x37b0fa-0x1e4;const _0x3c198e=a103_0x3c19();let _0x4000ab=_0x3c198e[_0x37b0fa];return _0x4000ab;}export function getRuntimeSkillCacheRoot(_0x27909b,_0x492a91,_0x26757a={}){const _0x359b82=a103_0x4000,_0x2da602=resolveSkillSyncPaths(_0x26757a);return resolve(_0x2da602['cacheRoot'],_0x27909b,fingerprintAccessKey(_0x492a91),_0x359b82(0x1e7));}export function getRuntimeSkillDir(_0x2ef1bc,_0x3f59e3,_0x1ea63c,_0x1630e3,_0x544789,_0x58b116={}){const _0x54a83d=a103_0x4000;return resolve(getRuntimeSkillCacheRoot(_0x2ef1bc,_0x3f59e3,_0x58b116),safePathSegment(_0x1ea63c,_0x54a83d(0x1f3)),_0x1630e3,safePathSegment(_0x544789,_0x54a83d(0x200)));}export function safePathSegment(_0x7aa8ee,_0x2ef659=a103_0x544aa8(0x1e9)){const _0x36a2e4=a103_0x544aa8;if(!_0x7aa8ee||_0x7aa8ee[_0x36a2e4(0x1f8)]('/')||_0x7aa8ee['includes']('\x5c')||_0x7aa8ee[_0x36a2e4(0x1f8)]('..'))throw CliErrors[_0x36a2e4(0x1f1)](_0x36a2e4(0x1ed)+_0x2ef659+_0x36a2e4(0x1ea)+_0x7aa8ee);return _0x7aa8ee;}function trimmedEnv(_0x572ab4){const _0x242d60=a103_0x544aa8,_0x4ac27b=productEnv(_0x572ab4)?.[_0x242d60(0x1f9)]();return _0x4ac27b?_0x4ac27b:undefined;}
@@ -1 +1 @@
1
- (function(_0x46d130,_0x1ed444){const _0xe51bfe=a104_0x259e,_0x1bce76=_0x46d130();while(!![]){try{const _0x28b7c6=-parseInt(_0xe51bfe(0x1cb))/0x1*(parseInt(_0xe51bfe(0x1bc))/0x2)+-parseInt(_0xe51bfe(0x1ca))/0x3+parseInt(_0xe51bfe(0x1a2))/0x4+parseInt(_0xe51bfe(0x19e))/0x5+-parseInt(_0xe51bfe(0x1c6))/0x6+-parseInt(_0xe51bfe(0x1b3))/0x7+parseInt(_0xe51bfe(0x1ce))/0x8;if(_0x28b7c6===_0x1ed444)break;else _0x1bce76['push'](_0x1bce76['shift']());}catch(_0x4ee6b8){_0x1bce76['push'](_0x1bce76['shift']());}}}(a104_0x7b1c,0xca738));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x5e2cd2}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a104_0x7b1c(){const _0x1341f2=['skillCode','ignoreMetadataScope','targetScope','validation','ignoreMetadataForPayload','Skill\x20metadata\x20appCode\x20\x22','builtin','pushedAt','6623070cBbQDH','string','number','Invalid\x20','4999384JoYQzh','allowAppCodeRetarget','ignoreMetadataSkillCode','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','name','Skill\x20directory\x20not\x20found:\x20','dir','path','description','personal','company','sourceSessionId','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','trim','tags','ignoreInvalidMetadata','\x20has\x20scope=\x22','707035iKpHnP','content','isArray','manifest','match','boolean','metadata','files','Remote\x20Skill\x20','4UjIhwH','startsWith','skillName','refreshedAt','(unknown)','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','length','scope','isSymbolicLink','8639268pBrfJL','unknown','isFile','replace','1724361QbzNUy','230473LjdYqd','isDirectory','\x20has\x20unsupported\x20scope\x20\x22','6651168LHOwyH','object','\x20name\x20for\x20SkillHub\x20slug\x20generation.','toLowerCase','appCode','Missing\x20'];a104_0x7b1c=function(){return _0x1341f2;};return a104_0x7b1c();}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';export function resolvePushDirectoryIdentity(_0x1ebac2,_0x46d4c1,_0xa7ffe2={}){const _0x533286=a104_0x259e,_0x27cd3e=resolvePushDirectoryRoot(_0x1ebac2),_0x45c2d3=readPushMetadataIfPresent(resolve(_0x27cd3e,METADATA_FILE),{'ignoreInvalidMetadata':_0xa7ffe2[_0x533286(0x1b1)]});if(_0x45c2d3?.[_0x533286(0x1d2)]&&_0x45c2d3[_0x533286(0x1d2)]!==_0x46d4c1&&!_0xa7ffe2[_0x533286(0x1a3)]&&!_0xa7ffe2['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x533286(0x199)](_0x533286(0x19b)+_0x45c2d3['appCode']+_0x533286(0x1c1)+_0x46d4c1+'\x22.');const _0x104fbd=resolvePushSkillCode(_0x27cd3e,_0x46d4c1,_0x45c2d3,_0xa7ffe2);if(!_0x104fbd)throw CliErrors[_0x533286(0x199)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x27cd3e,'skillCode':_0x104fbd,'metadata':_0x45c2d3};}export function readPushDirectory(_0x28ab4d,_0x5bd4eb,_0x413923={}){const _0x98f357=a104_0x259e,_0x40767=resolvePushDirectoryIdentity(_0x28ab4d,_0x5bd4eb,_0x413923),_0x2c476e=_0x40767[_0x98f357(0x1a8)],_0x33ee27=resolve(_0x2c476e,SKILL_FILE);if(!existsSync(_0x33ee27)||!lstatSync(_0x33ee27)[_0x98f357(0x1c8)]())throw CliErrors[_0x98f357(0x199)](_0x98f357(0x1d3)+SKILL_FILE+':\x20'+_0x33ee27);const _0x2d895a=_0x40767[_0x98f357(0x1b9)],_0x1f29c8=_0x413923[_0x98f357(0x198)]??_0x98f357(0x1ab);if(!_0x413923[_0x98f357(0x197)]&&_0x2d895a?.[_0x98f357(0x1c4)]===_0x98f357(0x19c))throw CliErrors[_0x98f357(0x199)](_0x98f357(0x1c2)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x2d895a['scope']+'\x22.');if(!_0x413923[_0x98f357(0x197)]&&_0x1f29c8===_0x98f357(0x1ab)&&_0x2d895a?.['scope']&&_0x2d895a[_0x98f357(0x1c4)]!==_0x98f357(0x1ab))throw CliErrors[_0x98f357(0x199)](_0x98f357(0x1ae)+METADATA_FILE+_0x98f357(0x1b2)+_0x2d895a[_0x98f357(0x1c4)]+'\x22.',_0x98f357(0x1a5)+_0x2c476e+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x338a84=scanSkillDirectory(_0x2c476e),_0x21b4bf=buildSkillPackage(_0x338a84),_0x12cf52=readFileSync(_0x33ee27,'utf8'),_0x32cc01=_0x40767[_0x98f357(0x196)],_0x25cf86=_0x413923[_0x98f357(0x19a)]?undefined:_0x2d895a,_0x8f2af8=readSkillDisplayName(_0x12cf52);return{'skillCode':_0x32cc01,'metadata':_0x2d895a,'frontmatterDisplayName':_0x8f2af8,'input':{'skillCode':_0x32cc01,'skillName':_0x8f2af8??_0x25cf86?.[_0x98f357(0x1be)],'description':_0x25cf86?.[_0x98f357(0x1aa)],'content':_0x12cf52,'files':_0x21b4bf[_0x98f357(0x1b6)],'packageBase64':_0x21b4bf['packageBase64'],'tags':_0x25cf86?.[_0x98f357(0x1b0)],'version':_0x25cf86?.['version'],'sourceSessionId':_0x25cf86?.[_0x98f357(0x1ad)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3c0a52,_0x3e93e8,_0x51a178,_0x4cec77={}){const _0x47cf22=a104_0x259e,_0x53522b=resolvePushDirectoryRoot(_0x3c0a52),_0xebf941=readPushMetadataIfPresent(resolve(_0x53522b,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x94aea4=requireRemoteScope(_0x3e93e8),_0x217543=readLocalSkillContent(_0x53522b),_0x3265ca={..._0x3e93e8,'appCode':_0x3e93e8[_0x47cf22(0x1d2)]??_0x51a178,'skillName':_0x3e93e8[_0x47cf22(0x1be)]??_0xebf941?.['skillName'],'description':_0x3e93e8['description']??_0xebf941?.[_0x47cf22(0x1aa)],'tags':Array['isArray'](_0x3e93e8[_0x47cf22(0x1b0)])?_0x3e93e8['tags']:_0xebf941?.[_0x47cf22(0x1b0)],'sourceSessionId':_0x3e93e8['sourceSessionId']??_0xebf941?.[_0x47cf22(0x1ad)],'content':_0x3e93e8[_0x47cf22(0x1b4)]??_0x217543},_0x35b75a=buildMetadata(_0x3265ca,_0x94aea4,_0x51a178,contentHash(_0x217543),_0x4cec77[_0x47cf22(0x1bf)]);writeJsonAtomic(resolve(_0x53522b,METADATA_FILE),_0x35b75a);}export function recordPushedRuntimeSkill(_0x5b16ca,_0x19d5dc,_0x40f7dd,_0x21a72e={}){const _0x1a9af7=a104_0x259e,_0x55a5e7=resolvePushDirectoryRoot(_0x5b16ca),_0x123513=scanSkillDirectory(_0x55a5e7),_0x4d19db=_0x123513['find'](_0x28dcc1=>_0x28dcc1[_0x1a9af7(0x1a9)]===SKILL_FILE),_0x24a220=_0x4d19db?fileText(_0x4d19db):'',_0x2b32fc=tryNormalizePackageManifest(_0x19d5dc[_0x1a9af7(0x1ba)]),_0x1da4cb={..._0x19d5dc,'content':_0x19d5dc['content']??_0x24a220,'files':_0x2b32fc},_0x22a94f=_0x2b32fc?normalizeLocalFiles(_0x123513)['filter'](_0x2eb637=>_0x2b32fc[_0x1a9af7(0x1ba)]['some'](_0xbdb27c=>_0xbdb27c['path']===_0x2eb637[_0x1a9af7(0x1a9)])):undefined,_0x414f2d=buildMetadata(_0x1da4cb,_0x21a72e[_0x1a9af7(0x1c4)]??'personal',_0x40f7dd,contentHash(_0x1da4cb['content']??''),_0x21a72e[_0x1a9af7(0x19d)],_0x22a94f);writeJsonAtomic(resolve(_0x55a5e7,METADATA_FILE),_0x414f2d);}export function deriveSkillCodeFromDirectory(_0xe9ee32,_0x394519){const _0x52bc47=a104_0x259e,_0x2a48b9=basename(resolve(_0xe9ee32)),_0x23d450=_0x394519+'--';return _0x2a48b9[_0x52bc47(0x1bd)](_0x23d450)?_0x2a48b9['slice'](_0x23d450[_0x52bc47(0x1c3)]):_0x2a48b9;}function resolvePushSkillCode(_0x118ec2,_0x3c2a43,_0x4b4387,_0x76429f){const _0x1b34b7=a104_0x259e,_0x172d20=deriveSkillCodeFromSkillFile(_0x118ec2)||deriveSkillCodeFromDirectory(_0x118ec2,_0x3c2a43);if(_0x76429f[_0x1b34b7(0x1a4)])return _0x172d20;return _0x4b4387?.[_0x1b34b7(0x196)]?.[_0x1b34b7(0x1af)]()||_0x172d20;}function deriveSkillCodeFromSkillFile(_0xd1c173){const _0x368d15=a104_0x259e,_0xce81b9=resolve(_0xd1c173,SKILL_FILE);if(!existsSync(_0xce81b9)||!lstatSync(_0xce81b9)[_0x368d15(0x1c8)]())return undefined;const _0x360987=readFileSync(_0xce81b9,'utf8'),_0x363e34=_0x360987[_0x368d15(0x1b7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x363e34)return undefined;const _0x516928=parseFrontmatterObject(_0x363e34[0x1]??''),_0x542dd9=scalarToString(_0x516928?.[_0x368d15(0x1a6)]);return _0x542dd9?slugifySkillName(_0x542dd9):undefined;}function a104_0x259e(_0x4d0f58,_0x2e870a){_0x4d0f58=_0x4d0f58-0x196;const _0x7b1cc6=a104_0x7b1c();let _0x259e93=_0x7b1cc6[_0x4d0f58];return _0x259e93;}function readSkillDisplayName(_0x5a85c9){const _0x4902c0=a104_0x259e,_0x28d892=_0x5a85c9[_0x4902c0(0x1b7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x28d892)return undefined;const _0x4d4933=parseFrontmatterObject(_0x28d892[0x1]??'');return scalarToString(_0x4d4933?.['displayName']);}function slugifySkillName(_0x1ed2cc){const _0x5e6978=a104_0x259e,_0x2fb034=_0x1ed2cc[_0x5e6978(0x1af)]()[_0x5e6978(0x1d1)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x5e6978(0x1c9)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x2fb034)throw CliErrors[_0x5e6978(0x199)](_0x5e6978(0x1a1)+SKILL_FILE+_0x5e6978(0x1d0));return _0x2fb034;}function parseFrontmatterObject(_0x18dee0){const _0x4dc92a=a104_0x259e;try{const _0x2157bd=a104_0x5e2cd2(_0x18dee0);return _0x2157bd&&typeof _0x2157bd===_0x4dc92a(0x1cf)&&!Array[_0x4dc92a(0x1b5)](_0x2157bd)?_0x2157bd:undefined;}catch{return undefined;}}function scalarToString(_0x153db4){const _0x454335=a104_0x259e;if(typeof _0x153db4===_0x454335(0x19f))return _0x153db4[_0x454335(0x1af)]();if(typeof _0x153db4===_0x454335(0x1a0)||typeof _0x153db4===_0x454335(0x1b8))return String(_0x153db4);return undefined;}function resolvePushDirectoryRoot(_0x2ae017){const _0x27105a=a104_0x259e,_0x5e1d81=resolve(_0x2ae017);if(!existsSync(_0x5e1d81))throw CliErrors[_0x27105a(0x199)](_0x27105a(0x1a7)+_0x2ae017);const _0x46507d=lstatSync(_0x5e1d81);if(_0x46507d[_0x27105a(0x1cc)]())return _0x5e1d81;if(_0x46507d[_0x27105a(0x1c5)]()){const _0x54db60=realpathSync(_0x5e1d81);if(lstatSync(_0x54db60)[_0x27105a(0x1cc)]())return _0x54db60;}throw CliErrors[_0x27105a(0x199)](_0x27105a(0x1a7)+_0x2ae017);}function requireRemoteScope(_0x31a197){const _0x1dff93=a104_0x259e;if(_0x31a197[_0x1dff93(0x1c4)]===_0x1dff93(0x1ab)||_0x31a197[_0x1dff93(0x1c4)]===_0x1dff93(0x1ac)||_0x31a197[_0x1dff93(0x1c4)]===_0x1dff93(0x19c))return _0x31a197['scope'];throw CliErrors['validation'](_0x1dff93(0x1bb)+(_0x31a197[_0x1dff93(0x196)]||_0x1dff93(0x1c0))+_0x1dff93(0x1cd)+(_0x31a197['scope']??_0x1dff93(0x1c7))+'\x22.');}function readLocalSkillContent(_0xed5b7d){const _0x52eb73=resolve(_0xed5b7d,SKILL_FILE);return existsSync(_0x52eb73)&&lstatSync(_0x52eb73)['isFile']()?readFileSync(_0x52eb73,'utf8'):'';}function readPushMetadataIfPresent(_0x44ca8f,_0x4dbb1d={}){const _0x55d55d=a104_0x259e;try{return readMetadataIfPresent(_0x44ca8f);}catch(_0x425263){if(_0x4dbb1d[_0x55d55d(0x1b1)])return undefined;throw _0x425263;}}
1
+ (function(_0x4999ad,_0x314fcb){const _0x24a0fe=a104_0x36ef,_0x3d6ff2=_0x4999ad();while(!![]){try{const _0x5df203=parseInt(_0x24a0fe(0x1ac))/0x1*(-parseInt(_0x24a0fe(0x18b))/0x2)+parseInt(_0x24a0fe(0x1ae))/0x3+-parseInt(_0x24a0fe(0x1a9))/0x4*(parseInt(_0x24a0fe(0x1a4))/0x5)+parseInt(_0x24a0fe(0x19c))/0x6*(parseInt(_0x24a0fe(0x1c0))/0x7)+-parseInt(_0x24a0fe(0x1be))/0x8*(-parseInt(_0x24a0fe(0x1a5))/0x9)+-parseInt(_0x24a0fe(0x1ce))/0xa+-parseInt(_0x24a0fe(0x1c8))/0xb*(-parseInt(_0x24a0fe(0x194))/0xc);if(_0x5df203===_0x314fcb)break;else _0x3d6ff2['push'](_0x3d6ff2['shift']());}catch(_0x1a5e08){_0x3d6ff2['push'](_0x3d6ff2['shift']());}}}(a104_0x496b,0x2317b));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x51c7ac}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';function a104_0x496b(){const _0xc176e5=['\x20has\x20scope=\x22','dir','ignoreInvalidMetadata','Remote\x20Skill\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','path','utf8','152JFZaiU','sourceSessionId','7ZSWvDu','files','match','name','Unable\x20to\x20resolve\x20skillCode\x20from\x20','builtin','refreshedAt','trim','3431681fBfUJM','metadata',',\x20or\x20directory\x20name.','(unknown)','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','number','2620670GnFuKE','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','allowAppCodeRetarget','116hoaBvL','startsWith','ignoreMetadataAppCodeMismatch','validation','pushedAt','toLowerCase','company','isDirectory','content','12ucPoKI','scope','replace','isArray','some','manifest','Skill\x20metadata\x20appCode\x20\x22','targetScope','1019550TUuYVs','unknown','ignoreMetadataScope','isFile','string','appCode','Invalid\x20','find','409410CbXQgU','24471MysVUh','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20directory\x20not\x20found:\x20','packageBase64','4TIdTBB','skillCode','isSymbolicLink','2480kaPFUO','description','293913XgVTtf','\x20name\x20for\x20SkillHub\x20slug\x20generation.','slice','personal','boolean','displayName','skillName','version','tags'];a104_0x496b=function(){return _0xc176e5;};return a104_0x496b();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';function a104_0x36ef(_0x3a2267,_0x5b518d){_0x3a2267=_0x3a2267-0x189;const _0x496bd4=a104_0x496b();let _0x36efb6=_0x496bd4[_0x3a2267];return _0x36efb6;}import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0xfeb5eb,_0x53f597,_0x4029a3={}){const _0x263dbe=a104_0x36ef,_0x3be942=resolvePushDirectoryRoot(_0xfeb5eb),_0x37ed41=readPushMetadataIfPresent(resolve(_0x3be942,METADATA_FILE),{'ignoreInvalidMetadata':_0x4029a3[_0x263dbe(0x1b9)]});if(_0x37ed41?.[_0x263dbe(0x1a1)]&&_0x37ed41[_0x263dbe(0x1a1)]!==_0x53f597&&!_0x4029a3[_0x263dbe(0x18a)]&&!_0x4029a3[_0x263dbe(0x18d)])throw CliErrors[_0x263dbe(0x18e)](_0x263dbe(0x19a)+_0x37ed41[_0x263dbe(0x1a1)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x53f597+'\x22.');const _0x80138e=resolvePushSkillCode(_0x3be942,_0x53f597,_0x37ed41,_0x4029a3);if(!_0x80138e)throw CliErrors[_0x263dbe(0x18e)](_0x263dbe(0x1c4)+SKILL_FILE+',\x20'+METADATA_FILE+_0x263dbe(0x1ca));return{'dir':_0x3be942,'skillCode':_0x80138e,'metadata':_0x37ed41};}export function readPushDirectory(_0x5b8bf2,_0x51efd4,_0x1fd4c5={}){const _0x54b363=a104_0x36ef,_0x5db21a=resolvePushDirectoryIdentity(_0x5b8bf2,_0x51efd4,_0x1fd4c5),_0x2d59ff=_0x5db21a[_0x54b363(0x1b8)],_0x376c7d=resolve(_0x2d59ff,SKILL_FILE);if(!existsSync(_0x376c7d)||!lstatSync(_0x376c7d)['isFile']())throw CliErrors[_0x54b363(0x18e)]('Missing\x20'+SKILL_FILE+':\x20'+_0x376c7d);const _0xc966=_0x5db21a[_0x54b363(0x1c9)],_0x344957=_0x1fd4c5[_0x54b363(0x19b)]??'personal';if(!_0x1fd4c5[_0x54b363(0x19e)]&&_0xc966?.[_0x54b363(0x195)]==='builtin')throw CliErrors['validation'](_0x54b363(0x1bb)+METADATA_FILE+_0x54b363(0x1b7)+_0xc966['scope']+'\x22.');if(!_0x1fd4c5['ignoreMetadataScope']&&_0x344957===_0x54b363(0x1b1)&&_0xc966?.[_0x54b363(0x195)]&&_0xc966[_0x54b363(0x195)]!==_0x54b363(0x1b1))throw CliErrors[_0x54b363(0x18e)](_0x54b363(0x1a6)+METADATA_FILE+'\x20has\x20scope=\x22'+_0xc966[_0x54b363(0x195)]+'\x22.',_0x54b363(0x1cc)+_0x2d59ff+_0x54b363(0x189));const _0x1d9488=scanSkillDirectory(_0x2d59ff),_0x55f7cd=buildSkillPackage(_0x1d9488),_0x4b8167=readFileSync(_0x376c7d,'utf8'),_0x5bd309=_0x5db21a[_0x54b363(0x1aa)],_0x416115=_0x1fd4c5['ignoreMetadataForPayload']?undefined:_0xc966,_0x2706a6=readSkillDisplayName(_0x4b8167);return{'skillCode':_0x5bd309,'metadata':_0xc966,'frontmatterDisplayName':_0x2706a6,'input':{'skillCode':_0x5bd309,'skillName':_0x2706a6??_0x416115?.[_0x54b363(0x1b4)],'description':_0x416115?.[_0x54b363(0x1ad)],'content':_0x4b8167,'files':_0x55f7cd[_0x54b363(0x199)],'packageBase64':_0x55f7cd[_0x54b363(0x1a8)],'tags':_0x416115?.[_0x54b363(0x1b6)],'version':_0x416115?.[_0x54b363(0x1b5)],'sourceSessionId':_0x416115?.[_0x54b363(0x1bf)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x34edf8,_0x21c63b,_0x5870d6,_0x467a23={}){const _0x33f1a8=a104_0x36ef,_0x4a9d0d=resolvePushDirectoryRoot(_0x34edf8),_0x57d40e=readPushMetadataIfPresent(resolve(_0x4a9d0d,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x36a3e4=requireRemoteScope(_0x21c63b),_0x2ce9e8=readLocalSkillContent(_0x4a9d0d),_0x4deff1={..._0x21c63b,'appCode':_0x21c63b['appCode']??_0x5870d6,'skillName':_0x21c63b[_0x33f1a8(0x1b4)]??_0x57d40e?.[_0x33f1a8(0x1b4)],'description':_0x21c63b[_0x33f1a8(0x1ad)]??_0x57d40e?.['description'],'tags':Array[_0x33f1a8(0x197)](_0x21c63b[_0x33f1a8(0x1b6)])?_0x21c63b[_0x33f1a8(0x1b6)]:_0x57d40e?.['tags'],'sourceSessionId':_0x21c63b[_0x33f1a8(0x1bf)]??_0x57d40e?.['sourceSessionId'],'content':_0x21c63b['content']??_0x2ce9e8},_0x93325e=buildMetadata(_0x4deff1,_0x36a3e4,_0x5870d6,contentHash(_0x2ce9e8),_0x467a23[_0x33f1a8(0x1c6)]);writeJsonAtomic(resolve(_0x4a9d0d,METADATA_FILE),_0x93325e);}export function recordPushedRuntimeSkill(_0xf8e36c,_0x15a5f0,_0x5c641b,_0x449946={}){const _0x274d1d=a104_0x36ef,_0x2af2aa=resolvePushDirectoryRoot(_0xf8e36c),_0x81f1cb=scanSkillDirectory(_0x2af2aa),_0x305c4f=_0x81f1cb[_0x274d1d(0x1a3)](_0x4d8003=>_0x4d8003[_0x274d1d(0x1bc)]===SKILL_FILE),_0x132bb8=_0x305c4f?fileText(_0x305c4f):'',_0x2ea322=tryNormalizePackageManifest(_0x15a5f0[_0x274d1d(0x1c1)]),_0x31dcf2={..._0x15a5f0,'content':_0x15a5f0[_0x274d1d(0x193)]??_0x132bb8,'files':_0x2ea322},_0x4a6989=_0x2ea322?normalizeLocalFiles(_0x81f1cb)['filter'](_0x12930c=>_0x2ea322[_0x274d1d(0x1c1)][_0x274d1d(0x198)](_0x28e163=>_0x28e163[_0x274d1d(0x1bc)]===_0x12930c[_0x274d1d(0x1bc)])):undefined,_0x572ad6=buildMetadata(_0x31dcf2,_0x449946['scope']??_0x274d1d(0x1b1),_0x5c641b,contentHash(_0x31dcf2['content']??''),_0x449946[_0x274d1d(0x18f)],_0x4a6989);writeJsonAtomic(resolve(_0x2af2aa,METADATA_FILE),_0x572ad6);}export function deriveSkillCodeFromDirectory(_0x19ce21,_0x2b5f76){const _0x317230=a104_0x36ef,_0xe8e2bd=basename(resolve(_0x19ce21)),_0x587423=_0x2b5f76+'--';return _0xe8e2bd[_0x317230(0x18c)](_0x587423)?_0xe8e2bd[_0x317230(0x1b0)](_0x587423['length']):_0xe8e2bd;}function resolvePushSkillCode(_0x27fd42,_0x84a76,_0x28a4b0,_0x1706b2){const _0x33e0ab=a104_0x36ef,_0x1c4f8b=deriveSkillCodeFromSkillFile(_0x27fd42)||deriveSkillCodeFromDirectory(_0x27fd42,_0x84a76);if(_0x1706b2['ignoreMetadataSkillCode'])return _0x1c4f8b;return _0x28a4b0?.[_0x33e0ab(0x1aa)]?.[_0x33e0ab(0x1c7)]()||_0x1c4f8b;}function deriveSkillCodeFromSkillFile(_0x24c651){const _0x27f2f6=a104_0x36ef,_0x235fe8=resolve(_0x24c651,SKILL_FILE);if(!existsSync(_0x235fe8)||!lstatSync(_0x235fe8)['isFile']())return undefined;const _0x2165e5=readFileSync(_0x235fe8,_0x27f2f6(0x1bd)),_0x329739=_0x2165e5[_0x27f2f6(0x1c2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x329739)return undefined;const _0x5e4635=parseFrontmatterObject(_0x329739[0x1]??''),_0x4aa943=scalarToString(_0x5e4635?.[_0x27f2f6(0x1c3)]);return _0x4aa943?slugifySkillName(_0x4aa943):undefined;}function readSkillDisplayName(_0x198f37){const _0xbf9883=a104_0x36ef,_0x689b1c=_0x198f37[_0xbf9883(0x1c2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x689b1c)return undefined;const _0x371891=parseFrontmatterObject(_0x689b1c[0x1]??'');return scalarToString(_0x371891?.[_0xbf9883(0x1b3)]);}function slugifySkillName(_0x1ee608){const _0x2a582a=a104_0x36ef,_0x1a6d4d=_0x1ee608[_0x2a582a(0x1c7)]()[_0x2a582a(0x190)]()[_0x2a582a(0x196)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2a582a(0x196)](/^-+/,'')[_0x2a582a(0x196)](/-+$/,'')[_0x2a582a(0x196)](/-{2,}/g,'-');if(!_0x1a6d4d)throw CliErrors[_0x2a582a(0x18e)](_0x2a582a(0x1a2)+SKILL_FILE+_0x2a582a(0x1af));return _0x1a6d4d;}function parseFrontmatterObject(_0x4dc45a){const _0x5e1d5f=a104_0x36ef;try{const _0x98199b=a104_0x51c7ac(_0x4dc45a);return _0x98199b&&typeof _0x98199b==='object'&&!Array[_0x5e1d5f(0x197)](_0x98199b)?_0x98199b:undefined;}catch{return undefined;}}function scalarToString(_0x50d916){const _0xb9d498=a104_0x36ef;if(typeof _0x50d916===_0xb9d498(0x1a0))return _0x50d916[_0xb9d498(0x1c7)]();if(typeof _0x50d916===_0xb9d498(0x1cd)||typeof _0x50d916===_0xb9d498(0x1b2))return String(_0x50d916);return undefined;}function resolvePushDirectoryRoot(_0x9e78cd){const _0x4e4862=a104_0x36ef,_0x5380af=resolve(_0x9e78cd);if(!existsSync(_0x5380af))throw CliErrors[_0x4e4862(0x18e)](_0x4e4862(0x1a7)+_0x9e78cd);const _0x236a18=lstatSync(_0x5380af);if(_0x236a18['isDirectory']())return _0x5380af;if(_0x236a18[_0x4e4862(0x1ab)]()){const _0x445194=realpathSync(_0x5380af);if(lstatSync(_0x445194)[_0x4e4862(0x192)]())return _0x445194;}throw CliErrors['validation'](_0x4e4862(0x1a7)+_0x9e78cd);}function requireRemoteScope(_0x25abaf){const _0x1f6167=a104_0x36ef;if(_0x25abaf[_0x1f6167(0x195)]==='personal'||_0x25abaf[_0x1f6167(0x195)]===_0x1f6167(0x191)||_0x25abaf[_0x1f6167(0x195)]===_0x1f6167(0x1c5))return _0x25abaf[_0x1f6167(0x195)];throw CliErrors[_0x1f6167(0x18e)](_0x1f6167(0x1ba)+(_0x25abaf[_0x1f6167(0x1aa)]||_0x1f6167(0x1cb))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x25abaf[_0x1f6167(0x195)]??_0x1f6167(0x19d))+'\x22.');}function readLocalSkillContent(_0x1f6aa2){const _0x2c6e70=a104_0x36ef,_0x39b466=resolve(_0x1f6aa2,SKILL_FILE);return existsSync(_0x39b466)&&lstatSync(_0x39b466)[_0x2c6e70(0x19f)]()?readFileSync(_0x39b466,_0x2c6e70(0x1bd)):'';}function readPushMetadataIfPresent(_0xce6e2d,_0x2c1437={}){const _0x27eafe=a104_0x36ef;try{return readMetadataIfPresent(_0xce6e2d);}catch(_0x382721){if(_0x2c1437[_0x27eafe(0x1b9)])return undefined;throw _0x382721;}}
@@ -1 +1 @@
1
- (function(_0x5626f8,_0x4763cb){const _0x58146f=a105_0x1807,_0x2a0850=_0x5626f8();while(!![]){try{const _0x7c9f1c=-parseInt(_0x58146f(0x1f6))/0x1+-parseInt(_0x58146f(0x1f7))/0x2*(parseInt(_0x58146f(0x1f2))/0x3)+parseInt(_0x58146f(0x1ee))/0x4*(parseInt(_0x58146f(0x1e9))/0x5)+parseInt(_0x58146f(0x1ec))/0x6+parseInt(_0x58146f(0x1ef))/0x7+-parseInt(_0x58146f(0x1e7))/0x8*(-parseInt(_0x58146f(0x1f5))/0x9)+-parseInt(_0x58146f(0x1f3))/0xa;if(_0x7c9f1c===_0x4763cb)break;else _0x2a0850['push'](_0x2a0850['shift']());}catch(_0x2789c5){_0x2a0850['push'](_0x2a0850['shift']());}}}(a105_0x54b3,0x82aa7));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0xff17bc){const _0x35e03a=a105_0x1807,_0x4576f6=_0xff17bc&&_0xff17bc[_0x35e03a(0x1ed)]>0x0?_0xff17bc:[_0x35e03a(0x1f4),_0x35e03a(0x1e8),'builtin'],_0x3e8605=[];for(const _0x52d8e4 of _0x4576f6){if(!isRuntimeSkillScope(_0x52d8e4))throw CliErrors[_0x35e03a(0x1f1)](_0x35e03a(0x1eb)+_0x52d8e4);!_0x3e8605[_0x35e03a(0x1f0)](_0x52d8e4)&&_0x3e8605['push'](_0x52d8e4);}return _0x3e8605;}function a105_0x54b3(){const _0x258d0b=['5463208QNStsQ','company','882445cqLTeQ','builtin','Unsupported\x20runtime\x20Skill\x20scope:\x20','891996orCzIG','length','12bsgoCq','3967852pobjZp','includes','validation','3dBldDx','1852360BwhPKt','personal','9LigfwZ','1037904ejzddc','339046QDdvEw'];a105_0x54b3=function(){return _0x258d0b;};return a105_0x54b3();}function a105_0x1807(_0x303b29,_0x283869){_0x303b29=_0x303b29-0x1e7;const _0x54b3c6=a105_0x54b3();let _0x18073e=_0x54b3c6[_0x303b29];return _0x18073e;}export function isRuntimeSkillScope(_0x2d3ca2){const _0x316248=a105_0x1807;return _0x2d3ca2===_0x316248(0x1f4)||_0x2d3ca2===_0x316248(0x1e8)||_0x2d3ca2===_0x316248(0x1ea);}
1
+ (function(_0x3979fc,_0x2b42b4){const _0x1b0e74=a105_0x5222,_0xc44b47=_0x3979fc();while(!![]){try{const _0x210891=-parseInt(_0x1b0e74(0xf0))/0x1+-parseInt(_0x1b0e74(0xec))/0x2*(-parseInt(_0x1b0e74(0xf1))/0x3)+-parseInt(_0x1b0e74(0xf3))/0x4+-parseInt(_0x1b0e74(0xf2))/0x5+parseInt(_0x1b0e74(0xe9))/0x6*(-parseInt(_0x1b0e74(0xe8))/0x7)+parseInt(_0x1b0e74(0xe3))/0x8+parseInt(_0x1b0e74(0xe5))/0x9*(parseInt(_0x1b0e74(0xe7))/0xa);if(_0x210891===_0x2b42b4)break;else _0xc44b47['push'](_0xc44b47['shift']());}catch(_0x394e12){_0xc44b47['push'](_0xc44b47['shift']());}}}(a105_0x8ffa,0x669f3));function a105_0x5222(_0x2b4ef4,_0x52c92b){_0x2b4ef4=_0x2b4ef4-0xe3;const _0x8ffa39=a105_0x8ffa();let _0x522205=_0x8ffa39[_0x2b4ef4];return _0x522205;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x283101){const _0x3d6a4e=a105_0x5222,_0x46adfa=_0x283101&&_0x283101[_0x3d6a4e(0xe4)]>0x0?_0x283101:['personal',_0x3d6a4e(0xeb),_0x3d6a4e(0xea)],_0x4bbb9f=[];for(const _0x4b8180 of _0x46adfa){if(!isRuntimeSkillScope(_0x4b8180))throw CliErrors['validation'](_0x3d6a4e(0xe6)+_0x4b8180);!_0x4bbb9f[_0x3d6a4e(0xee)](_0x4b8180)&&_0x4bbb9f[_0x3d6a4e(0xef)](_0x4b8180);}return _0x4bbb9f;}function a105_0x8ffa(){const _0x3499bb=['2VSxFNM','personal','includes','push','190604UthKmV','1707786qtBgWX','3857250rrcoFi','100504MBaqnm','1413696MfeAUL','length','1471761bWIzTy','Unsupported\x20runtime\x20Skill\x20scope:\x20','70OrrAXd','182wRIUVr','111498zrGFqq','builtin','company'];a105_0x8ffa=function(){return _0x3499bb;};return a105_0x8ffa();}export function isRuntimeSkillScope(_0x4012e4){const _0x5864d7=a105_0x5222;return _0x4012e4===_0x5864d7(0xed)||_0x4012e4===_0x5864d7(0xeb)||_0x4012e4===_0x5864d7(0xea);}
@@ -1 +1 @@
1
- const a107_0x278992=a107_0x4d11;(function(_0x801218,_0xc78c1){const _0x5e519c=a107_0x4d11,_0x3503af=_0x801218();while(!![]){try{const _0x50ac1b=-parseInt(_0x5e519c(0xcb))/0x1+parseInt(_0x5e519c(0xbc))/0x2*(parseInt(_0x5e519c(0xc2))/0x3)+-parseInt(_0x5e519c(0xbb))/0x4+parseInt(_0x5e519c(0xb8))/0x5*(-parseInt(_0x5e519c(0xb6))/0x6)+parseInt(_0x5e519c(0xc1))/0x7+-parseInt(_0x5e519c(0xba))/0x8*(-parseInt(_0x5e519c(0xb7))/0x9)+parseInt(_0x5e519c(0xbf))/0xa;if(_0x50ac1b===_0xc78c1)break;else _0x3503af['push'](_0x3503af['shift']());}catch(_0x987246){_0x3503af['push'](_0x3503af['shift']());}}}(a107_0x5135,0x4e5ab));import{unzipSync,zipSync}from'fflate';function a107_0x5135(){const _0x34212d=['length','174228OgHFrY','78aDVsOj','3136059HTstXs','152060zxnyBx','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','8iVqRnG','630808ukkwoP','6nmeiKY','name','entries','1048060XDzuPj','object','2858177ZgBLzQ','186657FSxlGh','validation','1980-01-01T00:00:00.000Z','from','sort','map','code','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a107_0x5135=function(){return _0x34212d;};return a107_0x5135();}function a107_0x4d11(_0x1d96a7,_0x52a7a7){_0x1d96a7=_0x1d96a7-0xb6;const _0x513552=a107_0x5135();let _0x4d115b=_0x513552[_0x1d96a7];return _0x4d115b;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x278992(0xc4));export function createDeterministicZipPackage(_0x4172c8){const _0x5c6f66=a107_0x278992,_0xb5cc73={};for(const _0x6f4215 of normalizeLocalFiles(_0x4172c8)){_0xb5cc73[_0x6f4215['path']]=fileContent(_0x6f4215);}return Buffer[_0x5c6f66(0xc5)](zipSync(_0xb5cc73,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0xef0099){const _0x5da0c6=a107_0x278992;if(_0xef0099[_0x5da0c6(0xca)]<0x16)throw CliErrors[_0x5da0c6(0xc3)](_0x5da0c6(0xb9));let _0xf00a8d;try{_0xf00a8d=unzipSync(_0xef0099,{'filter'(_0x128ca7){const _0x413a37=_0x5da0c6,_0x875bf9=normalizeSkillRelativePath(_0x128ca7[_0x413a37(0xbd)]);if(_0x875bf9['endsWith']('/'))throw CliErrors[_0x413a37(0xc3)](_0x413a37(0xc9)+_0x875bf9);return!![];}});}catch(_0x1e4466){if(isRuntimeSkillValidationError(_0x1e4466))throw _0x1e4466;throw CliErrors[_0x5da0c6(0xc3)](_0x5da0c6(0xb9));}return Object[_0x5da0c6(0xbe)](_0xf00a8d)[_0x5da0c6(0xc7)](([_0x3ca614,_0x1a33bd])=>({'path':normalizeSkillRelativePath(_0x3ca614),'bytes':Buffer[_0x5da0c6(0xc5)](_0x1a33bd)}))[_0x5da0c6(0xc6)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x5e713f){const _0x1b1de1=a107_0x278992;return typeof _0x5e713f===_0x1b1de1(0xc0)&&_0x5e713f!==null&&'code'in _0x5e713f&&_0x5e713f[_0x1b1de1(0xc8)]==='validation_error';}
1
+ function a107_0x18d3(){const _0x412de0=['Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','12508DkicLh','269472XWauBE','sort','code','validation','path','174774jlloBT','104xWpaUU','10630jwrkHk','1980-01-01T00:00:00.000Z','41461UuDpio','object','1008slUWKs','515379xtVnqQ','5PtDrGA','1TYbwcV','endsWith','name','4450622EpnfXT','validation_error','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.'];a107_0x18d3=function(){return _0x412de0;};return a107_0x18d3();}const a107_0x4ca83e=a107_0x2278;(function(_0x527a4a,_0x3e7d95){const _0x25298f=a107_0x2278,_0x209733=_0x527a4a();while(!![]){try{const _0x1ccf40=parseInt(_0x25298f(0x1d7))/0x1*(-parseInt(_0x25298f(0x1df))/0x2)+-parseInt(_0x25298f(0x1eb))/0x3+parseInt(_0x25298f(0x1de))/0x4+parseInt(_0x25298f(0x1ec))/0x5*(-parseInt(_0x25298f(0x1e4))/0x6)+parseInt(_0x25298f(0x1e8))/0x7*(-parseInt(_0x25298f(0x1e5))/0x8)+-parseInt(_0x25298f(0x1ea))/0x9*(-parseInt(_0x25298f(0x1e6))/0xa)+parseInt(_0x25298f(0x1da))/0xb;if(_0x1ccf40===_0x3e7d95)break;else _0x209733['push'](_0x209733['shift']());}catch(_0x239be4){_0x209733['push'](_0x209733['shift']());}}}(a107_0x18d3,0x1bdd0));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a107_0x2278(_0x3427b7,_0x206d18){_0x3427b7=_0x3427b7-0x1d7;const _0x18d311=a107_0x18d3();let _0x22789c=_0x18d311[_0x3427b7];return _0x22789c;}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x4ca83e(0x1e7));export function createDeterministicZipPackage(_0x30eaff){const _0x4ab5a5=a107_0x4ca83e,_0x4dc02c={};for(const _0x2cec19 of normalizeLocalFiles(_0x30eaff)){_0x4dc02c[_0x2cec19[_0x4ab5a5(0x1e3)]]=fileContent(_0x2cec19);}return Buffer['from'](zipSync(_0x4dc02c,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x124f3b){const _0x4bfd24=a107_0x4ca83e;if(_0x124f3b['length']<0x16)throw CliErrors['validation'](_0x4bfd24(0x1dc));let _0x535b12;try{_0x535b12=unzipSync(_0x124f3b,{'filter'(_0x340142){const _0x5cb245=_0x4bfd24,_0xc3cd0c=normalizeSkillRelativePath(_0x340142[_0x5cb245(0x1d9)]);if(_0xc3cd0c[_0x5cb245(0x1d8)]('/'))throw CliErrors[_0x5cb245(0x1e2)](_0x5cb245(0x1dd)+_0xc3cd0c);return!![];}});}catch(_0x3cf6b7){if(isRuntimeSkillValidationError(_0x3cf6b7))throw _0x3cf6b7;throw CliErrors[_0x4bfd24(0x1e2)](_0x4bfd24(0x1dc));}return Object['entries'](_0x535b12)['map'](([_0x4af138,_0x3194f9])=>({'path':normalizeSkillRelativePath(_0x4af138),'bytes':Buffer['from'](_0x3194f9)}))[_0x4bfd24(0x1e0)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x39c715){const _0x4e45b7=a107_0x4ca83e;return typeof _0x39c715===_0x4e45b7(0x1e9)&&_0x39c715!==null&&_0x4e45b7(0x1e1)in _0x39c715&&_0x39c715[_0x4e45b7(0x1e1)]===_0x4e45b7(0x1db);}