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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
- function a92_0x2821(_0x39f105,_0x5dbbbc){_0x39f105=_0x39f105-0xfa;const _0x302674=a92_0x3026();let _0x282184=_0x302674[_0x39f105];return _0x282184;}const a92_0x44e97c=a92_0x2821;(function(_0x445f15,_0x11eef4){const _0x4ae306=a92_0x2821,_0x2250e4=_0x445f15();while(!![]){try{const _0x849faa=parseInt(_0x4ae306(0xfe))/0x1+parseInt(_0x4ae306(0x100))/0x2*(parseInt(_0x4ae306(0xfb))/0x3)+parseInt(_0x4ae306(0xff))/0x4+-parseInt(_0x4ae306(0x102))/0x5+-parseInt(_0x4ae306(0xfa))/0x6+parseInt(_0x4ae306(0xfc))/0x7+-parseInt(_0x4ae306(0x104))/0x8*(parseInt(_0x4ae306(0x101))/0x9);if(_0x849faa===_0x11eef4)break;else _0x2250e4['push'](_0x2250e4['shift']());}catch(_0x19a2f0){_0x2250e4['push'](_0x2250e4['shift']());}}}(a92_0x3026,0x1acaf));export const VERSION=a92_0x44e97c(0x103);export const GIT_TAG=a92_0x44e97c(0x105);export const GIT_COMMIT=a92_0x44e97c(0xfd);function a92_0x3026(){const _0x6f3396=['v2.1.9-beta.3','873186srUEfH','642216KdpGEQ','595679bOWDjx','195d260','129535SnGKmh','97380HPJjlz','2jxRpuI','64917ijagAk','808550dqmDco','2.1.9-beta.3','40iXfsqd'];a92_0x3026=function(){return _0x6f3396;};return a92_0x3026();}export const BUILD_TIME='2026-07-08T14:53:24.942Z';
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);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3c3afa,_0x5485b7){const _0x4fbbe1=a93_0x4900,_0x65b02d=_0x3c3afa();while(!![]){try{const _0x143cc2=-parseInt(_0x4fbbe1(0xe2))/0x1+-parseInt(_0x4fbbe1(0xe3))/0x2+-parseInt(_0x4fbbe1(0xe1))/0x3*(-parseInt(_0x4fbbe1(0xdf))/0x4)+parseInt(_0x4fbbe1(0xe8))/0x5*(parseInt(_0x4fbbe1(0xe6))/0x6)+parseInt(_0x4fbbe1(0xe7))/0x7+parseInt(_0x4fbbe1(0xe4))/0x8+-parseInt(_0x4fbbe1(0xe9))/0x9;if(_0x143cc2===_0x5485b7)break;else _0x65b02d['push'](_0x65b02d['shift']());}catch(_0xefdb67){_0x65b02d['push'](_0x65b02d['shift']());}}}(a93_0x96ae,0x67532));import{jsx as a93_0x4b7c61,jsxs as a93_0x427ea1}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x4900(_0x2ca859,_0x339d31){_0x2ca859=_0x2ca859-0xdd;const _0x96ae9e=a93_0x96ae();let _0x490055=_0x96ae9e[_0x2ca859];return _0x490055;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x503bff=a93_0x4900,{exit:_0x4c2ad4}=useApp();return useEffect(()=>{_0x4c2ad4();},[_0x4c2ad4]),a93_0x427ea1(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a93_0x4b7c61(Box,{'children':a93_0x4b7c61(Text,{'bold':!![],'color':_0x503bff(0xe5),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x427ea1(Box,{'marginTop':0x1,'children':[a93_0x4b7c61(Text,{'dimColor':!![],'children':_0x503bff(0xde)}),a93_0x4b7c61(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x503bff(0xdd)}),a93_0x4b7c61(Text,{'dimColor':!![],'children':_0x503bff(0xe0)})]})]});}function a93_0x96ae(){const _0x4349cd=['green','778074FrzJNu','1986691hTBrjo','5hFNdkL','1157895VPxTSY','\x20--help','\x20\x20Use\x20','169144arAJNQ','\x20to\x20view\x20available\x20commands.','48qBiNNa','517151gVQgHC','64390GqENnP','89208YMfwxh'];a93_0x96ae=function(){return _0x4349cd;};return a93_0x96ae();}
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 +1 @@
1
- const a94_0x57ca12=a94_0x4643;(function(_0x594971,_0x5ea182){const _0x2ebeea=a94_0x4643,_0x18b0f8=_0x594971();while(!![]){try{const _0x34c4c9=parseInt(_0x2ebeea(0x170))/0x1+parseInt(_0x2ebeea(0x165))/0x2+-parseInt(_0x2ebeea(0x172))/0x3+parseInt(_0x2ebeea(0x160))/0x4*(-parseInt(_0x2ebeea(0x168))/0x5)+parseInt(_0x2ebeea(0x173))/0x6*(parseInt(_0x2ebeea(0x16e))/0x7)+-parseInt(_0x2ebeea(0x16d))/0x8*(-parseInt(_0x2ebeea(0x163))/0x9)+-parseInt(_0x2ebeea(0x16f))/0xa;if(_0x34c4c9===_0x5ea182)break;else _0x18b0f8['push'](_0x18b0f8['shift']());}catch(_0x24dd08){_0x18b0f8['push'](_0x18b0f8['shift']());}}}(a94_0x27a7,0x71695));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x5705a6}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x27a7(){const _0x3c8fe6=['1001702rJeUeX','stdout','skills','2797790VQvnwM','npx','skipNpxSkillsEnvSuffix','toString','inherit','14776zlCkju','61278tifTnv','10475780sUOklX','181126mUSecT','stdio','613785dsKOpE','618TxcmJJ','pipe','add','stderr','unknown','4QTtUwQ','join','status','3375qMyfmo','log'];a94_0x27a7=function(){return _0x3c8fe6;};return a94_0x27a7();}export const LOVRABET_SKILL_SOURCE=a94_0x5705a6;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x57ca12(0x16a)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x4643(_0x1be532,_0x5147ce){_0x1be532=_0x1be532-0x15e;const _0x27a7dc=a94_0x27a7();let _0x46438d=_0x27a7dc[_0x1be532];return _0x46438d;}export function runNpxSkillsAddGlobal(_0x4fdce3,_0x4945aa=LOVRABET_SKILL_SOURCE,_0x22eb92){const _0x51a1ed=a94_0x57ca12;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x30015a=_0x22eb92?.[_0x51a1ed(0x171)]??_0x51a1ed(0x16c),_0x2f9506=resolveNpmBin(_0x51a1ed(0x169)),_0x2a9a11=[_0x51a1ed(0x167),_0x51a1ed(0x175),_0x4945aa,'-g','-y'],_0x333961=[_0x2f9506,..._0x2a9a11][_0x51a1ed(0x161)]('\x20');console[_0x51a1ed(0x164)]('*\x20'+_0x333961);const _0x4142ce=spawnSync(_0x2f9506,_0x2a9a11,{'cwd':_0x4fdce3,'stdio':_0x30015a,'env':process.env,'shell':![]});if(_0x4142ce[_0x51a1ed(0x162)]===0x0)return{'ok':!![],'status':0x0};let _0x1275c6='exit\x20'+(_0x4142ce[_0x51a1ed(0x162)]??_0x51a1ed(0x15f));if(_0x30015a===_0x51a1ed(0x174)){const _0x5b526c=_0x4142ce[_0x51a1ed(0x15e)]?_0x4142ce['stderr'][_0x51a1ed(0x16b)]()['trim']():'',_0x5536c5=_0x4142ce['stdout']?_0x4142ce[_0x51a1ed(0x166)]['toString']()['trim']():'';if(_0x5b526c)_0x1275c6=_0x5b526c;else{if(_0x5536c5)_0x1275c6=_0x5536c5;}}return{'ok':![],'status':_0x4142ce[_0x51a1ed(0x162)]??null,'error':_0x1275c6};}
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 +1 @@
1
- const a95_0x27defb=a95_0x27ba;function a95_0x27ba(_0x152880,_0x568f2a){_0x152880=_0x152880-0xaa;const _0x2ab7b0=a95_0x2ab7();let _0x27bad5=_0x2ab7b0[_0x152880];return _0x27bad5;}(function(_0x14bffa,_0x28b08e){const _0x430ad2=a95_0x27ba,_0x4a5725=_0x14bffa();while(!![]){try{const _0x9b88db=parseInt(_0x430ad2(0xb6))/0x1+parseInt(_0x430ad2(0xbd))/0x2*(parseInt(_0x430ad2(0xbc))/0x3)+-parseInt(_0x430ad2(0xad))/0x4*(parseInt(_0x430ad2(0xbb))/0x5)+parseInt(_0x430ad2(0xb9))/0x6+parseInt(_0x430ad2(0xaf))/0x7*(-parseInt(_0x430ad2(0xb5))/0x8)+parseInt(_0x430ad2(0xb2))/0x9+parseInt(_0x430ad2(0xac))/0xa*(-parseInt(_0x430ad2(0xaa))/0xb);if(_0x9b88db===_0x28b08e)break;else _0x4a5725['push'](_0x4a5725['shift']());}catch(_0x35635b){_0x4a5725['push'](_0x4a5725['shift']());}}}(a95_0x2ab7,0x8776f));export const METADATA_FILE=a95_0x27defb(0xba);export const SKILL_FILE=a95_0x27defb(0xb8);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set(['.git',a95_0x27defb(0xae),a95_0x27defb(0xb4),a95_0x27defb(0xb7),a95_0x27defb(0xb0),a95_0x27defb(0xab),'build',a95_0x27defb(0xb3),'.turbo',a95_0x27defb(0xb1)]);function a95_0x2ab7(){const _0x1186fc=['lovrabet.skill.json','5FopSkg','33294MLTtMg','174cJVXTQ','46409nCrBWe','dist','3310hxCGvm','673760gAdOlN','.hg','28AEdRTi','.next','.cache','4744485bIOpAp','coverage','.svn','348256HlkzUo','488946OhTVpy','node_modules','SKILL.md','1873698CBIWRe'];a95_0x2ab7=function(){return _0x1186fc;};return a95_0x2ab7();}
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 +1 @@
1
- (function(_0xcb11a,_0x39dfce){const _0x250bb9=a96_0x1e41,_0x55d788=_0xcb11a();while(!![]){try{const _0x2b37ba=-parseInt(_0x250bb9(0xbf))/0x1*(parseInt(_0x250bb9(0xba))/0x2)+-parseInt(_0x250bb9(0xab))/0x3+parseInt(_0x250bb9(0xae))/0x4*(-parseInt(_0x250bb9(0xbd))/0x5)+parseInt(_0x250bb9(0xb7))/0x6*(-parseInt(_0x250bb9(0xb9))/0x7)+parseInt(_0x250bb9(0xaf))/0x8+parseInt(_0x250bb9(0xb3))/0x9+parseInt(_0x250bb9(0xb8))/0xa;if(_0x2b37ba===_0x39dfce)break;else _0x55d788['push'](_0x55d788['shift']());}catch(_0x1a240d){_0x55d788['push'](_0x55d788['shift']());}}}(a96_0x5767,0x738ba));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a96_0x5767(){const _0x3d9714=['endsWith','from','2929914XpLdEx','split','startsWith','.tmp','180IjryfU','16251900COnOft','40082IPgtFp','149062vygOHX','Unsafe\x20Skill\x20file\x20path:\x20','validation','235VDSpnT','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','9hFNaFx','2750499ilTBLJ','utf8','isSymbolicLink','14180REpwSA','3588360zpzQgb','stringify'];a96_0x5767=function(){return _0x3d9714;};return a96_0x5767();}import{normalizeSkillRelativePath}from'./local-files.js';function a96_0x1e41(_0x11dc8c,_0x16d02f){_0x11dc8c=_0x11dc8c-0xab;const _0x57676b=a96_0x5767();let _0x1e4145=_0x57676b[_0x11dc8c];return _0x1e4145;}export function resolveManagedFilePath(_0x436b92,_0x45e27e){const _0x316a03=a96_0x1e41,_0x2b5af2=normalizeSkillRelativePath(_0x45e27e),_0x372238=realOrResolved(_0x436b92),_0xd6d6eb=resolve(_0x372238,..._0x2b5af2[_0x316a03(0xb4)]('/'));if(!isPathInside(_0xd6d6eb,_0x372238))throw CliErrors[_0x316a03(0xbc)](_0x316a03(0xbb)+_0x45e27e);return ensureNoSymlinkInManagedPath(_0x372238,_0x2b5af2),_0xd6d6eb;}export function ensureNoSymlinkInManagedPath(_0x1a3e36,_0xb35d4e){const _0x3a2fba=a96_0x1e41;let _0x44a965=_0x1a3e36;for(const _0x26d7bb of _0xb35d4e[_0x3a2fba(0xb4)]('/')){_0x44a965=resolve(_0x44a965,_0x26d7bb);const _0x46ac83=lstatIfPresent(_0x44a965);if(_0x46ac83?.[_0x3a2fba(0xad)]())throw CliErrors[_0x3a2fba(0xbc)](_0x3a2fba(0xbe)+_0xb35d4e);}}export function isDanglingSymlink(_0x332071){const _0x4d66b8=a96_0x1e41;try{return lstatSync(_0x332071)[_0x4d66b8(0xad)]();}catch{return![];}}export function resolveSymlinkTarget(_0x2c6e85){const _0x4e03a8=readlinkSync(_0x2c6e85);return isAbsolute(_0x4e03a8)?_0x4e03a8:resolve(dirname(_0x2c6e85),_0x4e03a8);}export function isPathInside(_0x408683,_0x1c90c4){const _0x4bec14=a96_0x1e41,_0x385685=_0x408683[_0x4bec14(0xb1)](sep)?_0x408683:''+_0x408683+sep,_0x370bdb=_0x1c90c4['endsWith'](sep)?_0x1c90c4:''+_0x1c90c4+sep;return _0x408683===_0x1c90c4||_0x385685[_0x4bec14(0xb5)](_0x370bdb);}export function realOrResolved(_0x3b970e){try{return realpathSync(_0x3b970e);}catch{return resolve(_0x3b970e);}}export function lstatIfPresent(_0x25c989){try{return lstatSync(_0x25c989);}catch{return undefined;}}export function writeTextAtomic(_0x26cb00,_0x150108,_0x13d830){const _0x363169=a96_0x1e41;writeBytesAtomic(_0x26cb00,Buffer[_0x363169(0xb2)](_0x150108,_0x363169(0xac)),_0x13d830);}export function writeBytesAtomic(_0x145773,_0x22b9d6,_0x585b3e){const _0x489b35=a96_0x1e41,_0x61249e=_0x145773+_0x489b35(0xb6);try{writeFileSync(_0x61249e,_0x22b9d6,{'mode':_0x585b3e}),renameSync(_0x61249e,_0x145773);}catch(_0x48ce8b){try{rmSync(_0x61249e,{'force':!![]});}catch{}throw _0x48ce8b;}}export function writeJsonAtomic(_0x530bd9,_0x23de41){const _0x32d1ae=a96_0x1e41;writeTextAtomic(_0x530bd9,JSON[_0x32d1ae(0xb0)](_0x23de41,null,0x2)+'\x0a',0x180);}
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 +1 @@
1
- (function(_0x10b4ab,_0x19c08c){const _0x2e1750=a97_0x38c6,_0x3a3aaf=_0x10b4ab();while(!![]){try{const _0xaabe52=-parseInt(_0x2e1750(0x135))/0x1+-parseInt(_0x2e1750(0x134))/0x2+-parseInt(_0x2e1750(0x132))/0x3+-parseInt(_0x2e1750(0x12e))/0x4+-parseInt(_0x2e1750(0x13a))/0x5+parseInt(_0x2e1750(0x136))/0x6+-parseInt(_0x2e1750(0x139))/0x7*(-parseInt(_0x2e1750(0x12d))/0x8);if(_0xaabe52===_0x19c08c)break;else _0x3a3aaf['push'](_0x3a3aaf['shift']());}catch(_0x327de6){_0x3a3aaf['push'](_0x3a3aaf['shift']());}}}(a97_0x49ed,0x336d5));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x36f79a){const _0x150928=a97_0x38c6;return createHash(_0x150928(0x130))['update'](_0x36f79a)['digest'](_0x150928(0x133));}function a97_0x38c6(_0x296edc,_0x15c378){_0x296edc=_0x296edc-0x12d;const _0x49ed5c=a97_0x49ed();let _0x38c686=_0x49ed5c[_0x296edc];return _0x38c686;}export function fileHash(_0x305f19){return bufferSha256(fileContent(_0x305f19));}function a97_0x49ed(){const _0x16a343=['349482lZQLPA','path','digest','7509089SMsEBq','534130DcRLUz','8qNojYg','1296384uXFqiW','size','sha256','update','257298wZENza','hex','328170ZXEvvJ','239556SHjrsj'];a97_0x49ed=function(){return _0x16a343;};return a97_0x49ed();}export function bufferSha256(_0x24d26c){const _0x5da2dd=a97_0x38c6;return createHash(_0x5da2dd(0x130))[_0x5da2dd(0x131)](_0x24d26c)[_0x5da2dd(0x138)]('hex');}export function fileTreeHash(_0xb3df91){const _0x47007=a97_0x38c6,_0x2579b5=createHash(_0x47007(0x130));for(const _0x231a3f of normalizeManifestFiles(_0xb3df91)){_0x2579b5[_0x47007(0x131)](_0x231a3f[_0x47007(0x137)]),_0x2579b5['update']('\x00'),_0x2579b5['update'](_0x231a3f[_0x47007(0x130)]),_0x2579b5['update']('\x00'),_0x2579b5['update'](String(_0x231a3f[_0x47007(0x12f)])),_0x2579b5['update']('\x00');}return _0x2579b5['digest']('hex');}
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 +1 @@
1
- (function(_0x37db6b,_0x57e0ed){const _0xec7cef=a98_0x2e6b,_0x8a0df3=_0x37db6b();while(!![]){try{const _0x4cdc5a=-parseInt(_0xec7cef(0x1f0))/0x1*(-parseInt(_0xec7cef(0x1ee))/0x2)+-parseInt(_0xec7cef(0x1e0))/0x3+parseInt(_0xec7cef(0x1f7))/0x4*(parseInt(_0xec7cef(0x206))/0x5)+-parseInt(_0xec7cef(0x1ec))/0x6*(-parseInt(_0xec7cef(0x1f9))/0x7)+parseInt(_0xec7cef(0x1e6))/0x8+-parseInt(_0xec7cef(0x1f4))/0x9+-parseInt(_0xec7cef(0x1ed))/0xa;if(_0x4cdc5a===_0x57e0ed)break;else _0x8a0df3['push'](_0x8a0df3['shift']());}catch(_0x130235){_0x8a0df3['push'](_0x8a0df3['shift']());}}}(a98_0x512a,0x9e866));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a98_0x512a(){const _0x59676b=['external-symlink','isSymbolicLink','env','4991310SgzfPa','trim','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','4HitplZ','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','1211fZKyyn','skipped','slice','has','map','managedRoot','personal','scope','length','removed','pruneSkillCodes','skill','set','4705555jvHWnH','created','contentHash','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','skillCode','validation','filter','updated','2591916SESzll','push','dir','startsWith','not-managed-symlink','name','3767680MTnOTz','company','get','scopes','isDirectory','unchanged','8034lrIWHN','3478690ZKaGHb','1544062yLKkBQ','appCode','1BfVtmZ'];a98_0x512a=function(){return _0x59676b;};return a98_0x512a();}import{basename,dirname,resolve}from'node:path';import a98_0x3e65ef from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a98_0x2e6b(_0x434384,_0x52e4d1){_0x434384=_0x434384-0x1dd;const _0x512a97=a98_0x512a();let _0x2e6b9e=_0x512a97[_0x434384];return _0x2e6b9e;}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_0x3e65ef;export function linkEffectiveRuntimeSkills(_0x138778,_0x4e08e7,_0x2b7d6c={}){const _0x5ea9ef=a98_0x2e6b,_0x1a86b4=new Map();for(const _0x3cbae5 of _0x138778){const _0x9dee4e=_0x3cbae5[_0x5ea9ef(0x204)][_0x5ea9ef(0x20a)];if(!_0x9dee4e)continue;const _0x2d5237=_0x1a86b4[_0x5ea9ef(0x1e8)](_0x9dee4e);(!_0x2d5237||_0x3cbae5['scope']===_0x5ea9ef(0x1ff))&&_0x1a86b4[_0x5ea9ef(0x205)](_0x9dee4e,_0x3cbae5);}const _0x59f5f5=[],_0x5885cf=resolveSkillSyncPaths(_0x2b7d6c);for(const _0x1136a1 of _0x1a86b4['values']()){const _0x1d5cd4=requireSkillCode(_0x1136a1[_0x5ea9ef(0x204)]),_0x557b68=_0x4e08e7+'--'+_0x1d5cd4;for(const _0x5356ee of runtimeAgentSkillRoots(_0x5885cf)){_0x59f5f5[_0x5ea9ef(0x1e1)](ensureManagedSymlink(resolve(_0x5356ee,_0x557b68),_0x1136a1[_0x5ea9ef(0x1e2)],_0x5885cf[_0x5ea9ef(0x1fe)]));}}return _0x59f5f5;}export function pruneStaleRuntimeSkillLinks(_0x30fa07,_0x2c3d79,_0x450a45={},_0x4744f5){const _0x5b8652=a98_0x2e6b,_0x4083e5=resolveSkillSyncPaths(_0x450a45),_0xc9b6e3=new Set([..._0x2c3d79][_0x5b8652(0x1fd)](_0x151f37=>_0x151f37[_0x5b8652(0x1f5)]())[_0x5b8652(0x1de)](Boolean)),_0x14496d=_0x4744f5?new Set([..._0x4744f5]['map'](_0x4f7dc6=>_0x4f7dc6[_0x5b8652(0x1f5)]())[_0x5b8652(0x1de)](Boolean)):undefined,_0x339d3c=[];for(const _0x559def of runtimeAgentSkillRoots(_0x4083e5)){for(const _0x5a6b61 of managedAppSkillLinkPaths(_0x559def,_0x30fa07)){const _0x193f01=basename(_0x5a6b61)[_0x5b8652(0x1fb)]((_0x30fa07+'--')[_0x5b8652(0x201)]);if(_0x14496d&&!_0x14496d[_0x5b8652(0x1fc)](_0x193f01))continue;if(_0xc9b6e3[_0x5b8652(0x1fc)](_0x193f01))continue;_0x339d3c['push'](removeManagedSkillLink(_0x5a6b61,_0x4083e5[_0x5b8652(0x1fe)]));}}return _0x339d3c;}export function pruneStaleRuntimeSkillCache(_0x2a320d,_0x31caa5={}){const _0x21085c=a98_0x2e6b,_0x2c51bf=new Set([..._0x2a320d['activeSkillCodes']][_0x21085c(0x1fd)](_0x45af21=>_0x45af21[_0x21085c(0x1f5)]())[_0x21085c(0x1de)](Boolean)),_0x3304ba=_0x2a320d[_0x21085c(0x203)]?new Set([..._0x2a320d[_0x21085c(0x203)]][_0x21085c(0x1fd)](_0x50dcbf=>_0x50dcbf[_0x21085c(0x1f5)]())[_0x21085c(0x1de)](Boolean)):undefined,_0x8a142e=_0x2a320d[_0x21085c(0x1e9)]??[_0x21085c(0x1ff),_0x21085c(0x1e7)],_0x160373=resolve(getRuntimeSkillCacheRoot(_0x2a320d[_0x21085c(0x1f3)],_0x2a320d['accessKey'],_0x31caa5),safePathSegment(_0x2a320d[_0x21085c(0x1ef)],_0x21085c(0x1ef))),_0x35c2a3=[];for(const _0x3ef34e of _0x8a142e){const _0xb41694=resolve(_0x160373,_0x3ef34e);if(!existsSync(_0xb41694))continue;for(const _0x549dd2 of readdirSync(_0xb41694,{'withFileTypes':!![]})){if(!_0x549dd2[_0x21085c(0x1ea)]())continue;const _0x4d0e01=_0x549dd2['name'];if(_0x3304ba&&!_0x3304ba['has'](_0x4d0e01))continue;if(_0x2c51bf['has'](_0x4d0e01))continue;const _0x43dc73=resolve(_0xb41694,_0x4d0e01),_0x3e3252=readMetadataIfPresent(resolve(_0x43dc73,METADATA_FILE));if(_0x3e3252?.[_0x21085c(0x1ef)]!==_0x2a320d[_0x21085c(0x1ef)]||_0x3e3252[_0x21085c(0x200)]!==_0x3ef34e||_0x3e3252[_0x21085c(0x20a)]!==_0x4d0e01){_0x35c2a3[_0x21085c(0x1e1)]({'path':_0x43dc73,'action':_0x21085c(0x1fa),'reason':'metadata-mismatch'});continue;}removeSync(_0x43dc73),_0x35c2a3['push']({'path':_0x43dc73,'action':_0x21085c(0x202)});}}return _0x35c2a3;}export function linkGlobalRuntimeSkills(_0x12c5dc,_0x13326b={}){const _0x103cb5=a98_0x2e6b,_0x104878=resolveSkillSyncPaths(_0x13326b),_0x28302f=[];for(const _0x3a6cb4 of _0x12c5dc){if(_0x3a6cb4[_0x103cb5(0x200)]!=='builtin')throw CliErrors[_0x103cb5(0x1dd)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x3a6cb4[_0x103cb5(0x200)]);const _0x1e9d0f=requireSkillCode(_0x3a6cb4[_0x103cb5(0x204)]),_0x379a62=copyManagedSkillDirectory(_0x3a6cb4[_0x103cb5(0x1e2)],resolve(_0x104878['agentsSkillsDir'],_0x1e9d0f));_0x28302f['push']({..._0x379a62,'contentHash':_0x3a6cb4[_0x103cb5(0x208)]});}return _0x28302f;}function ensureManagedSymlink(_0xaeabb1,_0x255c6a,_0x6a2105){const _0x45181e=a98_0x2e6b;mkdirSync(dirname(_0xaeabb1),{'recursive':!![],'mode':0x1c0});if(existsSync(_0xaeabb1)||isDanglingSymlink(_0xaeabb1)){const _0x3ba224=lstatSync(_0xaeabb1);if(!_0x3ba224['isSymbolicLink']())throw CliErrors[_0x45181e(0x1dd)](_0x45181e(0x1f6)+_0xaeabb1);const _0x5ed71a=resolveSymlinkTarget(_0xaeabb1);if(!isPathInside(realOrResolved(_0x5ed71a),realOrResolved(_0x6a2105)))throw CliErrors[_0x45181e(0x1dd)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0xaeabb1);if(realOrResolved(_0x5ed71a)===realOrResolved(_0x255c6a))return{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x1eb)};return unlinkSync(_0xaeabb1),symlinkSync(_0x255c6a,_0xaeabb1,'dir'),{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x1df)};}return symlinkSync(_0x255c6a,_0xaeabb1,_0x45181e(0x1e2)),{'path':_0xaeabb1,'target':_0x255c6a,'action':_0x45181e(0x207)};}function managedAppSkillLinkPaths(_0x28788a,_0x28a124){const _0x4fca0f=a98_0x2e6b;if(!existsSync(_0x28788a))return[];const _0x439788=_0x28a124+'--';return readdirSync(_0x28788a,{'withFileTypes':!![]})[_0x4fca0f(0x1de)](_0x1e09d9=>_0x1e09d9[_0x4fca0f(0x1e5)][_0x4fca0f(0x1e3)](_0x439788))[_0x4fca0f(0x1fd)](_0x11f171=>resolve(_0x28788a,_0x11f171[_0x4fca0f(0x1e5)]));}function removeManagedSkillLink(_0xba8051,_0x5b4bf2){const _0x3d17a6=a98_0x2e6b,_0x2b11fd=lstatIfPresent(_0xba8051);if(!_0x2b11fd?.['isSymbolicLink']())return{'path':_0xba8051,'action':_0x3d17a6(0x1fa),'reason':_0x3d17a6(0x1e4)};const _0x552481=resolveSymlinkTarget(_0xba8051);if(!isPathInside(realOrResolved(_0x552481),realOrResolved(_0x5b4bf2)))return{'path':_0xba8051,'action':_0x3d17a6(0x1fa),'reason':_0x3d17a6(0x1f1)};return unlinkSync(_0xba8051),{'path':_0xba8051,'action':_0x3d17a6(0x202)};}export function copyManagedSkillDirectory(_0x3a17a5,_0x56c871){const _0x415434=a98_0x2e6b,_0x52da29=resolve(_0x56c871,METADATA_FILE),_0x115449=existsSync(_0x56c871);if(_0x115449){const _0x319821=lstatSync(_0x56c871);if(_0x319821[_0x415434(0x1f2)]())throw CliErrors[_0x415434(0x1dd)](_0x415434(0x1f8)+_0x56c871);if(!_0x319821[_0x415434(0x1ea)]())throw CliErrors[_0x415434(0x1dd)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x56c871);const _0x17b9f5=readMetadataIfPresent(_0x52da29);if(_0x17b9f5?.[_0x415434(0x200)]!=='builtin')throw CliErrors[_0x415434(0x1dd)](_0x415434(0x209)+_0x56c871);}ensureDirSync(dirname(_0x56c871));const _0x20f713=_0x115449?readMetadataIfPresent(_0x52da29)?.[_0x415434(0x208)]:undefined,_0x4186cb=readMetadataIfPresent(resolve(_0x3a17a5,METADATA_FILE))?.['contentHash'];return _0x115449&&removeSync(_0x56c871),copySkillDirectory(_0x3a17a5,_0x56c871),{'path':_0x56c871,'target':_0x3a17a5,'action':!_0x115449?_0x415434(0x207):_0x20f713===_0x4186cb?_0x415434(0x1eb):_0x415434(0x1df)};}function copySkillDirectory(_0xbba6f,_0xcf575d){copySync(_0xbba6f,_0xcf575d,{'dereference':![],'overwrite':!![],'filter'(_0x3353d7){const _0x2a73f3=a98_0x2e6b;if(lstatSync(_0x3353d7)[_0x2a73f3(0x1f2)]())throw CliErrors[_0x2a73f3(0x1dd)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x3353d7);return!![];}});}
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 +1 @@
1
- (function(_0xe8de08,_0x296f35){const _0x421a2b=a99_0x5b07,_0x50ecc6=_0xe8de08();while(!![]){try{const _0x3963ee=-parseInt(_0x421a2b(0x177))/0x1+-parseInt(_0x421a2b(0x171))/0x2+-parseInt(_0x421a2b(0x174))/0x3*(-parseInt(_0x421a2b(0x16a))/0x4)+parseInt(_0x421a2b(0x16e))/0x5*(parseInt(_0x421a2b(0x16b))/0x6)+parseInt(_0x421a2b(0x178))/0x7+-parseInt(_0x421a2b(0x184))/0x8+parseInt(_0x421a2b(0x175))/0x9;if(_0x3963ee===_0x296f35)break;else _0x50ecc6['push'](_0x50ecc6['shift']());}catch(_0x28c106){_0x50ecc6['push'](_0x50ecc6['shift']());}}}(a99_0xb6e6,0xb9856));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x524c3b,_0x531438={}){const _0x5eb2fc=a99_0x5b07,_0x50da4b=safePathSegment(_0x524c3b[_0x5eb2fc(0x188)],_0x5eb2fc(0x188)),_0x5e5d93=normalizeRuntimeSkillScopes(_0x524c3b[_0x5eb2fc(0x18a)]),_0x481842=new Set(_0x5e5d93),_0x356453=_0x524c3b[_0x5eb2fc(0x170)]?.['trim'](),_0x1d9823=new Map(),_0x58b419=resolve(getRuntimeSkillCacheRoot(_0x524c3b[_0x5eb2fc(0x180)],_0x524c3b['accessKey'],_0x531438),_0x50da4b);for(const _0x5932e4 of _0x5e5d93){for(const _0x16e865 of localSkillEntryDirs(resolve(_0x58b419,_0x5932e4))){collectLocalRuntimeSkill(_0x1d9823,_0x16e865,{'appCode':_0x50da4b,'scopes':_0x481842,'code':_0x356453,'source':_0x5eb2fc(0x167)});}}const _0x454671=resolveSkillSyncPaths(_0x531438);for(const _0x55af58 of runtimeAgentSkillRoots(_0x454671)){for(const _0x40a6d6 of localSkillLinkCandidates(_0x55af58,_0x50da4b,_0x481842)){collectLocalRuntimeSkill(_0x1d9823,_0x40a6d6,{'appCode':_0x50da4b,'scopes':_0x481842,'code':_0x356453,'source':_0x5eb2fc(0x18c),'linkedPath':_0x40a6d6});}}return Array[_0x5eb2fc(0x189)](_0x1d9823[_0x5eb2fc(0x17b)]())[_0x5eb2fc(0x18e)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x54cc9){const _0x35fbf9=a99_0x5b07;if(!existsSync(_0x54cc9))return[];return readdirSync(_0x54cc9,{'withFileTypes':!![]})[_0x35fbf9(0x186)](_0x9ec2ca=>_0x9ec2ca['isDirectory']()||_0x9ec2ca[_0x35fbf9(0x185)]())[_0x35fbf9(0x179)](_0x4450a4=>resolve(_0x54cc9,_0x4450a4[_0x35fbf9(0x181)]));}function localSkillLinkCandidates(_0x4fb756,_0x283e28,_0x332658){const _0x4b3f4d=a99_0x5b07;if(!existsSync(_0x4fb756))return[];const _0x5365bd=_0x283e28+'--';return readdirSync(_0x4fb756,{'withFileTypes':!![]})['filter'](_0x16d765=>_0x16d765[_0x4b3f4d(0x18d)]()||_0x16d765[_0x4b3f4d(0x185)]())['filter'](_0x26e541=>_0x26e541[_0x4b3f4d(0x181)]['startsWith'](_0x5365bd)||_0x332658[_0x4b3f4d(0x168)](_0x4b3f4d(0x187)))['map'](_0x4c728e=>resolve(_0x4fb756,_0x4c728e['name']));}function a99_0x5b07(_0x4094b3,_0x9d2696){_0x4094b3=_0x4094b3-0x166;const _0xb6e68=a99_0xb6e6();let _0x5b07a5=_0xb6e68[_0x4094b3];return _0x5b07a5;}function collectLocalRuntimeSkill(_0x170a7b,_0x1a5efd,_0x59cd05){const _0xbc60b8=a99_0x5b07,_0x5d6407=resolve(_0x1a5efd,METADATA_FILE),_0x40c774=readMetadataIfPresent(_0x5d6407);if(!_0x40c774)return;if(_0x40c774['appCode']!==_0x59cd05[_0xbc60b8(0x188)])return;if(!isRuntimeSkillScope(_0x40c774['scope'])||!_0x59cd05[_0xbc60b8(0x18a)][_0xbc60b8(0x168)](_0x40c774[_0xbc60b8(0x17a)]))return;const _0x3c1754=_0x40c774[_0xbc60b8(0x166)]?.['trim']();if(!_0x3c1754)return;if(_0x59cd05[_0xbc60b8(0x170)]&&_0x3c1754!==_0x59cd05[_0xbc60b8(0x170)])return;const _0x3c00aa=_0x40c774['scope']+':'+_0x3c1754,_0x5c3d26=_0x59cd05['linkedPath']?[_0x59cd05[_0xbc60b8(0x16d)]]:[],_0x52f158=_0x170a7b[_0xbc60b8(0x182)](_0x3c00aa);if(_0x52f158){_0x59cd05[_0xbc60b8(0x17c)]==='cache'&&(_0x52f158[_0xbc60b8(0x18b)]=_0x1a5efd,_0x52f158[_0xbc60b8(0x183)]=_0x1a5efd,_0x52f158[_0xbc60b8(0x17f)]=resolve(_0x1a5efd,SKILL_FILE),_0x52f158[_0xbc60b8(0x172)]=_0x5d6407);for(const _0x4e6201 of _0x5c3d26){!_0x52f158[_0xbc60b8(0x16f)][_0xbc60b8(0x17e)](_0x4e6201)&&_0x52f158['linkedPaths']['push'](_0x4e6201);}_0x52f158['linkedPaths'][_0xbc60b8(0x18e)]();return;}_0x170a7b[_0xbc60b8(0x16c)](_0x3c00aa,{..._0x40c774,'tags':Array[_0xbc60b8(0x176)](_0x40c774[_0xbc60b8(0x17d)])?_0x40c774[_0xbc60b8(0x17d)]:[],'scope':_0x40c774[_0xbc60b8(0x17a)],'source':_0xbc60b8(0x173),'dir':_0x1a5efd,'cacheDir':_0x59cd05[_0xbc60b8(0x17c)]===_0xbc60b8(0x167)?_0x1a5efd:undefined,'skillMdPath':resolve(_0x1a5efd,SKILL_FILE),'metadataPath':_0x5d6407,'linkedPaths':_0x5c3d26});}function compareLocalRuntimeSkills(_0x3bc73a,_0x1d8562){const _0x57f42c=a99_0x5b07,_0x2af3bb={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2af3bb[_0x3bc73a[_0x57f42c(0x17a)]]-_0x2af3bb[_0x1d8562['scope']]||_0x3bc73a[_0x57f42c(0x166)][_0x57f42c(0x169)](_0x1d8562[_0x57f42c(0x166)])||_0x3bc73a[_0x57f42c(0x18b)][_0x57f42c(0x169)](_0x1d8562['dir']);}function a99_0xb6e6(){const _0x37d655=['local','2010117XjgNOh','6375888QuoZhy','isArray','182940smujSI','5067972LsbyZq','map','scope','values','source','tags','includes','skillMdPath','env','name','get','cacheDir','6445544Ckxejq','isSymbolicLink','filter','builtin','appCode','from','scopes','dir','link','isDirectory','sort','skillCode','cache','has','localeCompare','8EcJdGY','30tFDDYp','set','linkedPath','217395LJByyU','linkedPaths','code','2482748NIFkzq','metadataPath'];a99_0xb6e6=function(){return _0x37d655;};return a99_0xb6e6();}
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 +1 @@
1
- (function(_0x25cc53,_0x3bac47){const _0x2c2a09=a100_0x270d,_0x589e3b=_0x25cc53();while(!![]){try{const _0x3b3f80=parseInt(_0x2c2a09(0x174))/0x1*(-parseInt(_0x2c2a09(0x181))/0x2)+parseInt(_0x2c2a09(0x186))/0x3+parseInt(_0x2c2a09(0x17d))/0x4*(parseInt(_0x2c2a09(0x17b))/0x5)+parseInt(_0x2c2a09(0x18c))/0x6+-parseInt(_0x2c2a09(0x190))/0x7*(-parseInt(_0x2c2a09(0x173))/0x8)+-parseInt(_0x2c2a09(0x16e))/0x9+-parseInt(_0x2c2a09(0x17a))/0xa;if(_0x3b3f80===_0x3bac47)break;else _0x589e3b['push'](_0x589e3b['shift']());}catch(_0x39e827){_0x589e3b['push'](_0x589e3b['shift']());}}}(a100_0x17fe,0xa75dc));function a100_0x17fe(){const _0x30ebbf=['Duplicate\x20Skill\x20file\x20path:\x20','localeCompare','size','length','11487930ZUCSEO','3175000Aglqla','Unsafe\x20Skill\x20file\x20path:\x20','8xODNID','content','isSafeInteger','sha256','6ngvNuO','name','split','Skill\x20file\x20size\x20is\x20invalid:\x20','isDirectory','2495520ezimzK','Skill\x20file\x20sha256\x20is\x20invalid:\x20','path','push','includes','sort','4881516zonfuO','isBuffer','test','Skill\x20file\x20path\x20must\x20be\x20text.','21DRUMWj','bytes','validation','utf8','values','object','toLowerCase','has','compare','replace','11116629waGxeX','trim','set','from','string','2520776diZUJc','263737OUajrM','isArray'];a100_0x17fe=function(){return _0x30ebbf;};return a100_0x17fe();}import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a100_0x270d(_0x4701c0,_0x28cafe){_0x4701c0=_0x4701c0-0x168;const _0x17fee5=a100_0x17fe();let _0x270d20=_0x17fee5[_0x4701c0];return _0x270d20;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x275a75){const _0x4e4474=a100_0x270d;return _0x275a75[_0x4e4474(0x191)]??Buffer['from'](_0x275a75[_0x4e4474(0x17e)]??'','utf8');}export function fileText(_0x532ed3){const _0x45ffc4=a100_0x270d;return fileContent(_0x532ed3)['toString'](_0x45ffc4(0x193));}export function normalizeLocalFiles(_0x56cd46){const _0x20bc22=a100_0x270d;if(!Array['isArray'](_0x56cd46)||_0x56cd46['length']===0x0)return[];const _0x5e48d8=new Map();for(const _0x5e3010 of _0x56cd46){if(!_0x5e3010||typeof _0x5e3010!=='object'||typeof _0x5e3010['path']!==_0x20bc22(0x172))throw CliErrors[_0x20bc22(0x192)](_0x20bc22(0x18f));const _0x45e197=normalizeSkillRelativePath(_0x5e3010[_0x20bc22(0x188)]);if(_0x5e48d8[_0x20bc22(0x16b)](_0x45e197))throw CliErrors[_0x20bc22(0x192)](_0x20bc22(0x176)+_0x45e197);if(_0x5e3010[_0x20bc22(0x191)]!==undefined&&!Buffer[_0x20bc22(0x18d)](_0x5e3010[_0x20bc22(0x191)]))throw CliErrors[_0x20bc22(0x192)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x45e197);if(_0x5e3010['bytes']===undefined&&typeof _0x5e3010[_0x20bc22(0x17e)]!==_0x20bc22(0x172))throw CliErrors[_0x20bc22(0x192)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x45e197);const _0x8a33e3=fileContent(_0x5e3010);_0x5e48d8[_0x20bc22(0x170)](_0x45e197,{'path':_0x45e197,'bytes':_0x8a33e3});}return Array[_0x20bc22(0x171)](_0x5e48d8[_0x20bc22(0x168)]())[_0x20bc22(0x18b)](compareSkillFiles);}export function normalizeManifestFiles(_0x4047b7){const _0x1607d1=a100_0x270d;if(!Array[_0x1607d1(0x175)](_0x4047b7)||_0x4047b7[_0x1607d1(0x179)]===0x0)return[];const _0x3a434e=new Map();for(const _0x24c6bc of _0x4047b7){if(!_0x24c6bc||typeof _0x24c6bc!==_0x1607d1(0x169)||typeof _0x24c6bc[_0x1607d1(0x188)]!==_0x1607d1(0x172))throw CliErrors['validation'](_0x1607d1(0x18f));const _0x19a8ee=normalizeSkillRelativePath(_0x24c6bc[_0x1607d1(0x188)]);if(_0x3a434e[_0x1607d1(0x16b)](_0x19a8ee))throw CliErrors[_0x1607d1(0x192)](_0x1607d1(0x176)+_0x19a8ee);if(!isSha256Hex(_0x24c6bc[_0x1607d1(0x180)]))throw CliErrors[_0x1607d1(0x192)](_0x1607d1(0x187)+_0x19a8ee);if(!Number[_0x1607d1(0x17f)](_0x24c6bc['size'])||_0x24c6bc[_0x1607d1(0x178)]<0x0)throw CliErrors['validation'](_0x1607d1(0x184)+_0x19a8ee);_0x3a434e[_0x1607d1(0x170)](_0x19a8ee,{'path':_0x19a8ee,'sha256':_0x24c6bc[_0x1607d1(0x180)][_0x1607d1(0x16a)](),'size':_0x24c6bc[_0x1607d1(0x178)]});}return Array[_0x1607d1(0x171)](_0x3a434e[_0x1607d1(0x168)]())[_0x1607d1(0x18b)](compareSkillFiles);}export function scanSkillDirectory(_0x4e9029){const _0x423b12=realpathSync(_0x4e9029),_0x242ef1=[];function _0x132d00(_0x1d38cc){const _0x4bf93e=a100_0x270d,_0x5f2372=readdirSync(_0x1d38cc,{'withFileTypes':!![]})[_0x4bf93e(0x18b)]((_0x3535d8,_0x5d5682)=>_0x3535d8['name'][_0x4bf93e(0x177)](_0x5d5682[_0x4bf93e(0x182)]));for(const _0x5d4080 of _0x5f2372){if(_0x5d4080[_0x4bf93e(0x185)]()&&IGNORED_DIR_NAMES[_0x4bf93e(0x16b)](_0x5d4080['name']))continue;if(IGNORED_FILE_NAMES[_0x4bf93e(0x16b)](_0x5d4080[_0x4bf93e(0x182)]))continue;const _0x2d636d=resolve(_0x1d38cc,_0x5d4080['name']);if(_0x5d4080['isSymbolicLink']())throw CliErrors[_0x4bf93e(0x192)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x2d636d);const _0x152401=toPosixPath(relative(_0x423b12,_0x2d636d));if(_0x5d4080['isDirectory']()){_0x132d00(_0x2d636d);continue;}if(!_0x5d4080['isFile']())continue;validateSkillRelativePath(_0x152401);const _0x41f707=readFileSync(_0x2d636d);_0x242ef1[_0x4bf93e(0x189)]({'path':_0x152401,'bytes':_0x41f707});}}return _0x132d00(_0x423b12),normalizeLocalFiles(_0x242ef1);}export function compareSkillFiles(_0x3c3662,_0x4b7888){const _0x4f55b2=a100_0x270d;if(_0x3c3662[_0x4f55b2(0x188)]===SKILL_FILE)return _0x4b7888[_0x4f55b2(0x188)]===SKILL_FILE?0x0:-0x1;if(_0x4b7888['path']===SKILL_FILE)return 0x1;return Buffer[_0x4f55b2(0x16c)](Buffer[_0x4f55b2(0x171)](_0x3c3662[_0x4f55b2(0x188)],_0x4f55b2(0x193)),Buffer[_0x4f55b2(0x171)](_0x4b7888[_0x4f55b2(0x188)],_0x4f55b2(0x193)));}export function normalizeSkillRelativePath(_0x4c6294){const _0x4e9b38=a100_0x270d,_0x5dbd11=toPosixPath(_0x4c6294[_0x4e9b38(0x16f)]());return validateSkillRelativePath(_0x5dbd11),_0x5dbd11;}export function validateSkillRelativePath(_0x431961){const _0x2242b3=a100_0x270d;if(!_0x431961||_0x431961['startsWith']('/')||_0x431961[_0x2242b3(0x18a)]('//'))throw CliErrors[_0x2242b3(0x192)](_0x2242b3(0x17c)+_0x431961);for(const _0x287ed7 of _0x431961[_0x2242b3(0x183)]('/')){if(!_0x287ed7||_0x287ed7==='.'||_0x287ed7==='..')throw CliErrors[_0x2242b3(0x192)](_0x2242b3(0x17c)+_0x431961);}}export function toPosixPath(_0x39b063){const _0x5510cc=a100_0x270d;return _0x39b063[_0x5510cc(0x16d)](/\\/g,'/');}export function isSha256Hex(_0x4bcd66){const _0x325e12=a100_0x270d;return typeof _0x4bcd66===_0x325e12(0x172)&&/^[a-fA-F0-9]{64}$/[_0x325e12(0x18e)](_0x4bcd66);}
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 +1 @@
1
- (function(_0x35394a,_0x1df660){const _0x29021b=a101_0x5461,_0x2d3b5f=_0x35394a();while(!![]){try{const _0x2c1b31=parseInt(_0x29021b(0xdd))/0x1+-parseInt(_0x29021b(0xe8))/0x2+parseInt(_0x29021b(0xfc))/0x3+-parseInt(_0x29021b(0x10a))/0x4*(parseInt(_0x29021b(0xf0))/0x5)+-parseInt(_0x29021b(0x10c))/0x6*(-parseInt(_0x29021b(0xe5))/0x7)+-parseInt(_0x29021b(0xf5))/0x8+parseInt(_0x29021b(0xe3))/0x9;if(_0x2c1b31===_0x1df660)break;else _0x2d3b5f['push'](_0x2d3b5f['shift']());}catch(_0x15679a){_0x2d3b5f['push'](_0x2d3b5f['shift']());}}}(a101_0xa4ea,0x4e3dc));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(_0x4d42d0,_0x43faf9,_0x52b2fc){const _0x55cb06=a101_0x5461,_0x4df7fb=requireSkillCode(_0x4d42d0),_0x4bbe5f=requirePackageBytes(_0x4df7fb,_0x52b2fc[_0x55cb06(0xee)]),_0xf3df22=extractDownloadedPackage(_0x4bbe5f),_0x13e3df=_0xf3df22[_0x55cb06(0x100)](_0x5ae08f=>_0x5ae08f[_0x55cb06(0x102)]===SKILL_FILE);if(!_0x13e3df)throw CliErrors[_0x55cb06(0xf6)](_0x55cb06(0xf2)+SKILL_FILE+':\x20'+_0x4df7fb);const _0x2dcf56=withMaterializedSkillFrontmatter(_0xf3df22,_0x4d42d0,_0x4df7fb),_0x157a60=_0x2dcf56[_0x55cb06(0x100)](_0x10de23=>_0x10de23[_0x55cb06(0x102)]===SKILL_FILE),_0x324cb1=fileText(_0x157a60),_0x5145bf=getRuntimeSkillDir(_0x52b2fc[_0x55cb06(0xf7)],_0x52b2fc[_0x55cb06(0xef)],_0x52b2fc[_0x55cb06(0xf8)],_0x43faf9,_0x4df7fb,_0x52b2fc['paths']),_0x2a7f48=resolve(_0x5145bf,SKILL_FILE),_0x1b831a=resolve(_0x5145bf,METADATA_FILE),_0x4e50d6=contentHash(_0x324cb1),_0x2ce560=readMetadataIfPresent(_0x1b831a)?.[_0x55cb06(0xe0)];ensurePulledFilesCanBeOverwritten(_0x5145bf,_0x1b831a,_0x2dcf56,_0x52b2fc['force']===!![]),mkdirSync(_0x5145bf,{'recursive':!![],'mode':0x1c0});const _0x5871e0=existsSync(_0x2a7f48)?readFileSync(_0x2a7f48,'utf8'):undefined;return materializeFiles(_0x5145bf,_0x2dcf56),removeStaleManagedFiles(_0x5145bf,_0x2ce560,_0x2dcf56),writeJsonAtomic(_0x1b831a,buildMetadata(_0x4d42d0,_0x43faf9,_0x52b2fc[_0x55cb06(0xf8)],_0x4e50d6,_0x52b2fc['pulledAt'],_0x2dcf56,_0x4bbe5f)),{'skill':_0x4d42d0,'scope':_0x43faf9,'dir':_0x5145bf,'skillMdPath':_0x2a7f48,'metadataPath':_0x1b831a,'contentHash':_0x4e50d6,'changed':_0x5871e0!==_0x324cb1};}function withMaterializedSkillFrontmatter(_0x4a0d51,_0x181153,_0x235086){const _0x203dcf=a101_0x5461,_0x5cb34d=skillDisplayName(_0x181153,_0x235086),_0x4ede13=_0x181153[_0x203dcf(0xdf)]?.['trim']()||_0x5cb34d||_0x235086;return normalizeLocalFiles(_0x4a0d51)[_0x203dcf(0x110)](_0x1937dc=>{const _0xf49b20=_0x203dcf,_0x3c1a75=fileText(_0x1937dc);if(_0x1937dc['path']!==SKILL_FILE)return _0x1937dc;if(hasYamlFrontmatter(_0x3c1a75))return{'path':_0x1937dc['path'],'content':withSyncedDisplayName(_0x3c1a75,_0x5cb34d)};return{'path':_0x1937dc[_0xf49b20(0x102)],'content':prependSkillFrontmatter(_0x3c1a75,{'name':_0x235086,'displayName':_0x5cb34d,'description':_0x4ede13})};});}function hasYamlFrontmatter(_0x1a62f6){return/^\uFEFF?---\s*\r?\n/['test'](_0x1a62f6);}function prependSkillFrontmatter(_0x41dc9b,_0x37cd4a){const _0x6643bb=a101_0x5461,_0x48754b=_0x41dc9b[_0x6643bb(0xfb)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x37cd4a[_0x6643bb(0x104)]),_0x37cd4a[_0x6643bb(0xfd)]?'displayName:\x20'+yamlString(_0x37cd4a[_0x6643bb(0xfd)]):undefined,'description:\x20'+yamlString(_0x37cd4a[_0x6643bb(0xdf)]),_0x6643bb(0xec),'',_0x48754b][_0x6643bb(0x10d)](_0x4b5a2f=>_0x4b5a2f!==undefined)[_0x6643bb(0xe7)]('\x0a');}function yamlString(_0x591c7d){const _0x2af12e=a101_0x5461;return JSON['stringify'](_0x591c7d[_0x2af12e(0xfb)](/\r/g,'')[_0x2af12e(0x101)]());}function skillDisplayName(_0x226da9,_0x186654){const _0x2210bb=a101_0x5461,_0x3391bb=_0x226da9[_0x2210bb(0xfe)]?.[_0x2210bb(0x101)]();return _0x3391bb||_0x186654;}function a101_0xa4ea(){const _0x7cf4bc=['214332owBnni','filter','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','match','map','276317dKKJRz','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description','fileHashes','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','utf8','2284830Uuqeez','entries','105ZJHUvz','---\x0a','join','267902aBTIbI','contentHash','contents','isFile','---','.\x20Changed\x20file:\x20','packageBytes','accessKey','145705dcyPfC','toString','Runtime\x20Skill\x20package\x20is\x20missing\x20','errors','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','4974112nHLteW','validation','env','appCode','length','delete','replace','992175asKkSp','displayName','skillName','has','find','trim','path','keys','name','slice','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','set','flow','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','44zhYeTh','Managed\x20file\x20was\x20removed\x20locally:\x20'];a101_0xa4ea=function(){return _0x7cf4bc;};return a101_0xa4ea();}function withSyncedDisplayName(_0x178881,_0x5106b1){const _0x10bf8a=a101_0x5461,_0x7b6edc=_0x178881[_0x10bf8a(0x10f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x7b6edc)return _0x178881;const _0x4456da=_0x7b6edc[0x1]??'',_0x5e0854=_0x7b6edc[0x2]??'',_0x5e6fc7=parseDocument(_0x5e0854);if(_0x5e6fc7[_0x10bf8a(0xf3)][_0x10bf8a(0xf9)]>0x0||!isMap(_0x5e6fc7[_0x10bf8a(0xea)]))return _0x178881;if(_0x5106b1)_0x5e6fc7[_0x10bf8a(0x107)]('displayName',_0x5106b1);else{if(_0x5e6fc7[_0x10bf8a(0xff)](_0x10bf8a(0xfd)))_0x5e6fc7[_0x10bf8a(0xfa)](_0x10bf8a(0xfd));else return _0x178881;}forceBlockCollections(_0x5e6fc7['contents']);const _0x36a365=_0x5e6fc7[_0x10bf8a(0xf1)]({'lineWidth':0x0})['trimEnd'](),_0x63de61=_0x178881[_0x10bf8a(0x105)](_0x7b6edc[0x0][_0x10bf8a(0xf9)])[_0x10bf8a(0xfb)](/^\r?\n/,'');return _0x4456da+_0x10bf8a(0xe6)+_0x36a365+'\x0a---\x0a\x0a'+_0x63de61;}function forceBlockCollections(_0xbd1b28){if(!isNode(_0xbd1b28))return;visit(_0xbd1b28,(_0x580841,_0x1df83b)=>{const _0x5221f5=a101_0x5461;isCollection(_0x1df83b)&&(_0x1df83b[_0x5221f5(0x108)]=![]);});}function a101_0x5461(_0x35a1ef,_0x36cd76){_0x35a1ef=_0x35a1ef-0xdd;const _0xa4ea22=a101_0xa4ea();let _0x546155=_0xa4ea22[_0x35a1ef];return _0x546155;}function ensurePulledFilesCanBeOverwritten(_0x2bfde8,_0x473b48,_0x1caf12,_0x4e0ec8){const _0x51b015=a101_0x5461;if(_0x4e0ec8||!existsSync(_0x473b48))return;const _0x31e361=readMetadataIfPresent(_0x473b48);if(!_0x31e361)return;const _0x9e78af=_0x31e361[_0x51b015(0xe0)]&&Object[_0x51b015(0x103)](_0x31e361[_0x51b015(0xe0)])['length']>0x0?_0x31e361[_0x51b015(0xe0)]:undefined;if(_0x9e78af)for(const [_0x2db06b,_0x1126b3]of Object[_0x51b015(0xe4)](_0x9e78af)){const _0x28d7e2=resolveManagedFilePath(_0x2bfde8,_0x2db06b);if(!existsSync(_0x28d7e2))throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8,_0x51b015(0x10b)+_0x2db06b);const _0x27624f=lstatSync(_0x28d7e2);if(!_0x27624f[_0x51b015(0xeb)]())throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8,_0x51b015(0xde)+_0x2db06b);const _0x4a281c=bufferSha256(readFileSync(_0x28d7e2));if(_0x4a281c!==_0x1126b3)throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x106)+_0x2bfde8+_0x51b015(0xed)+_0x2db06b,_0x51b015(0x109)+_0x2db06b);}else{const _0x123832=resolve(_0x2bfde8,SKILL_FILE);if(existsSync(_0x123832)&&_0x31e361[_0x51b015(0xe9)]){const _0x3d648b=contentHash(readFileSync(_0x123832,_0x51b015(0xe2)));if(_0x3d648b!==_0x31e361[_0x51b015(0xe9)])throw CliErrors[_0x51b015(0xf6)](_0x51b015(0x10e)+_0x123832,_0x51b015(0xe1));}}for(const _0x3cdc77 of normalizeLocalFiles(_0x1caf12)){if(_0x9e78af?.[_0x3cdc77[_0x51b015(0x102)]])continue;if(!_0x9e78af&&_0x3cdc77['path']===SKILL_FILE)continue;const _0x52c5e3=resolveManagedFilePath(_0x2bfde8,_0x3cdc77['path']);if(!existsSync(_0x52c5e3))continue;const _0x5dc0a0=lstatSync(_0x52c5e3);if(!_0x5dc0a0[_0x51b015(0xeb)]())throw CliErrors[_0x51b015(0xf6)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2bfde8,_0x51b015(0xf4)+_0x3cdc77[_0x51b015(0x102)]);const _0x5f00d7=bufferSha256(readFileSync(_0x52c5e3));if(_0x5f00d7!==fileHash(_0x3cdc77))throw CliErrors['validation'](_0x51b015(0x106)+_0x2bfde8,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3cdc77[_0x51b015(0x102)]);}}function materializeFiles(_0x48b7f5,_0x3ba0e3){for(const _0x15504f of normalizeLocalFiles(_0x3ba0e3)){const _0x2d823e=resolveManagedFilePath(_0x48b7f5,_0x15504f['path']);mkdirSync(dirname(_0x2d823e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2d823e,fileContent(_0x15504f),0x180);}}function removeStaleManagedFiles(_0x39bef4,_0x426944,_0x4422f6){const _0x2925b1=a101_0x5461;if(!_0x426944)return;const _0x108064=new Set(normalizeLocalFiles(_0x4422f6)[_0x2925b1(0x110)](_0x2b44c9=>_0x2b44c9['path']));for(const _0x3056c5 of Object['keys'](_0x426944)){if(_0x108064['has'](_0x3056c5))continue;const _0x275c68=resolveManagedFilePath(_0x39bef4,_0x3056c5);existsSync(_0x275c68)&&lstatSync(_0x275c68)[_0x2925b1(0xeb)]()&&rmSync(_0x275c68,{'force':!![]});}}
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 +1 @@
1
- (function(_0x5f2e67,_0x3d5188){const _0x17c9fa=a102_0x5a59,_0x3c3a50=_0x5f2e67();while(!![]){try{const _0x357a43=parseInt(_0x17c9fa(0xb2))/0x1*(-parseInt(_0x17c9fa(0xce))/0x2)+-parseInt(_0x17c9fa(0xcd))/0x3*(parseInt(_0x17c9fa(0xc4))/0x4)+parseInt(_0x17c9fa(0xd1))/0x5*(parseInt(_0x17c9fa(0xd7))/0x6)+parseInt(_0x17c9fa(0xc6))/0x7+parseInt(_0x17c9fa(0xbb))/0x8*(-parseInt(_0x17c9fa(0xc0))/0x9)+-parseInt(_0x17c9fa(0xd6))/0xa*(parseInt(_0x17c9fa(0xbe))/0xb)+-parseInt(_0x17c9fa(0xb3))/0xc*(-parseInt(_0x17c9fa(0xbf))/0xd);if(_0x357a43===_0x3d5188)break;else _0x3c3a50['push'](_0x3c3a50['shift']());}catch(_0x1c6ad9){_0x3c3a50['push'](_0x3c3a50['shift']());}}}(a102_0x1b46,0xb2a76));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x21e725,_0x480828,_0xa2bd5f,_0x150cbf,_0x301fd9,_0x4d9095,_0xc1e662){const _0x200088=a102_0x5a59,_0x311fef=_0x4d9095?normalizeLocalFiles(_0x4d9095):[],_0x94106d=!_0xc1e662&&_0x311fef[_0x200088(0xaf)]>0x0?buildSkillPackage(_0x311fef):undefined,_0x54093d=_0xc1e662?bufferSha256(_0xc1e662):_0x94106d?.['manifest'][_0x200088(0xc3)],_0x49d8ad=_0xc1e662?.[_0x200088(0xaf)]??_0x94106d?.[_0x200088(0xae)][_0x200088(0xb8)],_0x2a2c2b=_0x311fef['length']>0x0?Object[_0x200088(0xb1)](_0x311fef['map'](_0x4c9706=>[_0x4c9706[_0x200088(0xc2)],fileHash(_0x4c9706)])):undefined;return{'schemaVersion':_0x311fef[_0x200088(0xaf)]>0x0?0x2:0x1,'id':_0x21e725['id'],'appCode':_0xa2bd5f,'skillCode':requireSkillCode(_0x21e725),'skillName':_0x21e725[_0x200088(0xb0)],'description':_0x21e725[_0x200088(0xd5)],'scope':_0x480828,'readonly':_0x480828!==_0x200088(0xc1)||_0x21e725[_0x200088(0xc9)]===!![],'tenantCode':_0x21e725[_0x200088(0xac)],'userId':_0x21e725[_0x200088(0xad)],'version':_0x21e725[_0x200088(0xb4)],'status':_0x21e725[_0x200088(0xcc)],'tags':Array[_0x200088(0xd3)](_0x21e725[_0x200088(0xbc)])?_0x21e725['tags']:[],'hasUpstreamUpdate':_0x21e725[_0x200088(0xb9)],'forkedFromSkillId':_0x21e725['forkedFromSkillId'],'forkedFromVersion':_0x21e725[_0x200088(0xd2)],'sourceSessionId':_0x21e725[_0x200088(0xcf)],'contentHash':_0x150cbf,'fileHashes':_0x2a2c2b,'treeHash':_0x311fef[_0x200088(0xaf)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x311fef)):undefined,'ossPath':remoteManifestOssPath(_0x21e725[_0x200088(0xb7)]),'zipSha256':_0x54093d,'zipSize':_0x49d8ad,'files':_0x311fef[_0x200088(0xaf)]>0x0?_0x311fef[_0x200088(0xb6)](_0x34cd2e=>({'path':_0x34cd2e['path'],'hash':fileHash(_0x34cd2e),'size':fileContent(_0x34cd2e)[_0x200088(0xaf)]})):undefined,'pulledAt':_0x301fd9??new Date()[_0x200088(0xbd)]()};}export function requireSkillCode(_0x18c96c){const _0x434cec=a102_0x5a59,_0x2e9478=_0x18c96c[_0x434cec(0xca)]?.[_0x434cec(0xc5)]();if(!_0x2e9478)throw CliErrors[_0x434cec(0xc8)](_0x434cec(0xc7));return _0x2e9478;}function a102_0x5a59(_0x1d6463,_0x2d5fb1){_0x1d6463=_0x1d6463-0xac;const _0x1b46eb=a102_0x1b46();let _0x5a596d=_0x1b46eb[_0x1d6463];return _0x5a596d;}function a102_0x1b46(){const _0x5c5514=['821691TWyIFV','4102155hIpGMl','personal','path','zipSha256','58100ZmVUPu','trim','616490nCkFfX','Runtime\x20Skill\x20is\x20missing\x20skillCode.','validation','readonly','skillCode','utf8','status','21huUIWZ','862uurWRT','sourceSessionId','parse','235XfJhlH','forkedFromVersion','isArray','string','description','10iziaSI','9354lPCSfh','tenantCode','userId','manifest','length','skillName','fromEntries','2717rigwte','708kicdCZ','version','ossPath','map','files','zipSize','hasUpstreamUpdate','Invalid\x20','8YzoJWQ','tags','toISOString','15733223kHWIGe'];a102_0x1b46=function(){return _0x5c5514;};return a102_0x1b46();}export function readMetadataIfPresent(_0x3494e8){const _0x521fe3=a102_0x5a59;if(!existsSync(_0x3494e8))return undefined;try{const _0x1d3493=JSON[_0x521fe3(0xd0)](readFileSync(_0x3494e8,_0x521fe3(0xcb)));return _0x1d3493;}catch{throw CliErrors[_0x521fe3(0xc8)](_0x521fe3(0xba)+METADATA_FILE+':\x20'+_0x3494e8);}}function remoteManifestOssPath(_0x8ed8e5){const _0x2c67e9=a102_0x5a59;if(!_0x8ed8e5||typeof _0x8ed8e5!=='object'||Array[_0x2c67e9(0xd3)](_0x8ed8e5))return undefined;const _0x28aeeb=_0x8ed8e5[_0x2c67e9(0xb5)];return typeof _0x28aeeb===_0x2c67e9(0xd4)&&_0x28aeeb[_0x2c67e9(0xc5)]()?_0x28aeeb[_0x2c67e9(0xc5)]():undefined;}
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 +1 @@
1
- function a103_0x6638(_0x123c09,_0x4b53e6){_0x123c09=_0x123c09-0x188;const _0x23de36=a103_0x23de();let _0x6638d1=_0x23de36[_0x123c09];return _0x6638d1;}const a103_0x589ff0=a103_0x6638;(function(_0x58aea7,_0x3bb2e4){const _0x75638=a103_0x6638,_0x16af60=_0x58aea7();while(!![]){try{const _0x2fb2c2=-parseInt(_0x75638(0x1a5))/0x1*(parseInt(_0x75638(0x192))/0x2)+-parseInt(_0x75638(0x18f))/0x3*(-parseInt(_0x75638(0x1a2))/0x4)+parseInt(_0x75638(0x18b))/0x5+parseInt(_0x75638(0x19a))/0x6*(-parseInt(_0x75638(0x1a6))/0x7)+-parseInt(_0x75638(0x1a1))/0x8*(-parseInt(_0x75638(0x191))/0x9)+-parseInt(_0x75638(0x18c))/0xa+parseInt(_0x75638(0x189))/0xb*(parseInt(_0x75638(0x1a0))/0xc);if(_0x2fb2c2===_0x3bb2e4)break;else _0x16af60['push'](_0x16af60['shift']());}catch(_0x298ee9){_0x16af60['push'](_0x16af60['shift']());}}}(a103_0x23de,0xde821));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(_0x43fb80={}){const _0x18b54f=a103_0x6638,_0x124244=_0x43fb80[_0x18b54f(0x1a3)]??homedir(),_0x4cf3d3=resolve(_0x124244,PRODUCT_CONFIG[_0x18b54f(0x1a4)],'cache'),_0xe13c3d=trimmedEnv(_0x18b54f(0x19b)),_0x5a3176=trimmedEnv(_0x18b54f(0x18e)),_0xe9e35e=resolve(_0x124244,_0x18b54f(0x196)),_0x5d03b1=_0x43fb80[_0x18b54f(0x18d)]??(existsSync(_0xe9e35e)?resolve(_0xe9e35e,_0x18b54f(0x19d)):undefined);return{'homeDir':_0x124244,'cacheRoot':_0x4cf3d3,'managedRoot':resolve(_0x124244,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x43fb80[_0x18b54f(0x188)]??_0xe13c3d??resolve(_0x124244,_0x18b54f(0x198),'skills'),'claudeSkillsDir':_0x43fb80['claudeSkillsDir']??_0x5a3176??resolve(_0x124244,_0x18b54f(0x190),_0x18b54f(0x19d)),'workbuddySkillsDir':_0x5d03b1};}export function runtimeAgentSkillRoots(_0x508256){const _0x49291b=a103_0x6638;return[_0x508256['agentsSkillsDir'],_0x508256[_0x49291b(0x19c)],_0x508256['workbuddySkillsDir']][_0x49291b(0x199)](_0x208037=>Boolean(_0x208037));}export function getRuntimeSkillCacheRoot(_0x5f26fa,_0x6e69e3,_0x2d8eda={}){const _0x458c2c=a103_0x6638,_0x33503b=resolveSkillSyncPaths(_0x2d8eda);return resolve(_0x33503b['cacheRoot'],_0x5f26fa,fingerprintAccessKey(_0x6e69e3),_0x458c2c(0x19d));}export function getRuntimeSkillDir(_0x27173f,_0x55c719,_0x410ca2,_0xb15e8c,_0x10fe6b,_0x1d1956={}){const _0x243021=a103_0x6638;return resolve(getRuntimeSkillCacheRoot(_0x27173f,_0x55c719,_0x1d1956),safePathSegment(_0x410ca2,'appCode'),_0xb15e8c,safePathSegment(_0x10fe6b,_0x243021(0x194)));}export function safePathSegment(_0x160fa0,_0x1d13e9=a103_0x589ff0(0x18a)){const _0x200c71=a103_0x589ff0;if(!_0x160fa0||_0x160fa0['includes']('/')||_0x160fa0[_0x200c71(0x195)]('\x5c')||_0x160fa0['includes']('..'))throw CliErrors[_0x200c71(0x197)](_0x200c71(0x19f)+_0x1d13e9+_0x200c71(0x19e)+_0x160fa0);return _0x160fa0;}function a103_0x23de(){const _0x28ea1c=['filter','18GrpnQT','SKILL_ROOT','claudeSkillsDir','skills','\x20for\x20local\x20path:\x20','Unsafe\x20','93348kwsbAp','1792FHVXRW','28GPHQua','homeDir','homeDirName','132439OkDKlX','3185518cZQyAa','agentsSkillsDir','2453UOweFz','path\x20segment','1856825WirhtI','3264320WTZsMZ','workbuddySkillsDir','CLAUDE_SKILL_ROOT','413214oJJZRD','.claude','18477nqcbEv','14IFTmbr','trim','skillCode','includes','.workbuddy','validation','.agents'];a103_0x23de=function(){return _0x28ea1c;};return a103_0x23de();}function trimmedEnv(_0x36684f){const _0x412d31=a103_0x589ff0,_0x5b6f60=productEnv(_0x36684f)?.[_0x412d31(0x193)]();return _0x5b6f60?_0x5b6f60:undefined;}
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 +1 @@
1
- (function(_0x33d935,_0x3fc065){const _0x3997bb=a104_0x131e,_0x196ed2=_0x33d935();while(!![]){try{const _0x1bc003=parseInt(_0x3997bb(0x18b))/0x1+-parseInt(_0x3997bb(0x189))/0x2+parseInt(_0x3997bb(0x1ad))/0x3+parseInt(_0x3997bb(0x1af))/0x4*(parseInt(_0x3997bb(0x1bb))/0x5)+-parseInt(_0x3997bb(0x199))/0x6*(parseInt(_0x3997bb(0x1b9))/0x7)+parseInt(_0x3997bb(0x187))/0x8+-parseInt(_0x3997bb(0x1b7))/0x9;if(_0x1bc003===_0x3fc065)break;else _0x196ed2['push'](_0x196ed2['shift']());}catch(_0x72c720){_0x196ed2['push'](_0x196ed2['shift']());}}}(a104_0x39df,0x542fa));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a104_0x39df(){const _0x119bf6=['Invalid\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','Missing\x20','boolean','tags','path','unknown','manifest','ignoreMetadataScope','skillName','isDirectory','version','slice','Skill\x20metadata\x20appCode\x20\x22','utf8',',\x20or\x20directory\x20name.','1823853YdollF','personal','34576UqQgMX','toLowerCase','skillCode','allowAppCodeRetarget','number','files','name','description','10426014MwGWCB','scope','1267833BCuJue','trim','35QASxuD','appCode','(unknown)','Remote\x20Skill\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','displayName','targetScope','4981288mNuWuZ','replace','480882eQaPkA','sourceSessionId','633712jGSCpl','isArray','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','find','some','isFile','pushedAt','match','builtin','length','\x20has\x20scope=\x22','content','validation','isSymbolicLink','6QNaNQq','company','ignoreMetadataAppCodeMismatch','ignoreMetadataSkillCode'];a104_0x39df=function(){return _0x119bf6;};return a104_0x39df();}import{basename,resolve}from'node:path';import{parse as a104_0x5c932d}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';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';function a104_0x131e(_0x4b94d7,_0x2499c7){_0x4b94d7=_0x4b94d7-0x185;const _0x39dfee=a104_0x39df();let _0x131e51=_0x39dfee[_0x4b94d7];return _0x131e51;}import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x3e84d4,_0x379eee,_0x5ccfbe={}){const _0xecdce0=a104_0x131e,_0x1ebc2b=resolvePushDirectoryRoot(_0x3e84d4),_0x4f276f=readPushMetadataIfPresent(resolve(_0x1ebc2b,METADATA_FILE),{'ignoreInvalidMetadata':_0x5ccfbe['ignoreInvalidMetadata']});if(_0x4f276f?.['appCode']&&_0x4f276f[_0xecdce0(0x1bc)]!==_0x379eee&&!_0x5ccfbe[_0xecdce0(0x1b2)]&&!_0x5ccfbe[_0xecdce0(0x19b)])throw CliErrors[_0xecdce0(0x197)](_0xecdce0(0x1aa)+_0x4f276f[_0xecdce0(0x1bc)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x379eee+'\x22.');const _0x3f1922=resolvePushSkillCode(_0x1ebc2b,_0x379eee,_0x4f276f,_0x5ccfbe);if(!_0x3f1922)throw CliErrors[_0xecdce0(0x197)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0xecdce0(0x1ac));return{'dir':_0x1ebc2b,'skillCode':_0x3f1922,'metadata':_0x4f276f};}export function readPushDirectory(_0x2cc675,_0x4217ab,_0x502c5b={}){const _0xd0a33=a104_0x131e,_0x252572=resolvePushDirectoryIdentity(_0x2cc675,_0x4217ab,_0x502c5b),_0x4136c9=_0x252572['dir'],_0x54fc54=resolve(_0x4136c9,SKILL_FILE);if(!existsSync(_0x54fc54)||!lstatSync(_0x54fc54)['isFile']())throw CliErrors[_0xd0a33(0x197)](_0xd0a33(0x19f)+SKILL_FILE+':\x20'+_0x54fc54);const _0x5b1dbb=_0x252572['metadata'],_0x31c272=_0x502c5b[_0xd0a33(0x186)]??_0xd0a33(0x1ae);if(!_0x502c5b[_0xd0a33(0x1a5)]&&_0x5b1dbb?.[_0xd0a33(0x1b8)]===_0xd0a33(0x193))throw CliErrors[_0xd0a33(0x197)](_0xd0a33(0x18d)+METADATA_FILE+_0xd0a33(0x195)+_0x5b1dbb[_0xd0a33(0x1b8)]+'\x22.');if(!_0x502c5b[_0xd0a33(0x1a5)]&&_0x31c272==='personal'&&_0x5b1dbb?.['scope']&&_0x5b1dbb[_0xd0a33(0x1b8)]!=='personal')throw CliErrors[_0xd0a33(0x197)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0xd0a33(0x195)+_0x5b1dbb[_0xd0a33(0x1b8)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x4136c9+_0xd0a33(0x1bf));const _0x4be6ce=scanSkillDirectory(_0x4136c9),_0x3a2b6d=buildSkillPackage(_0x4be6ce),_0x14243e=readFileSync(_0x54fc54,'utf8'),_0x345801=_0x252572[_0xd0a33(0x1b1)],_0x5cd1e9=_0x502c5b['ignoreMetadataForPayload']?undefined:_0x5b1dbb,_0x13290b=readSkillDisplayName(_0x14243e);return{'skillCode':_0x345801,'metadata':_0x5b1dbb,'frontmatterDisplayName':_0x13290b,'input':{'skillCode':_0x345801,'skillName':_0x13290b??_0x5cd1e9?.[_0xd0a33(0x1a6)],'description':_0x5cd1e9?.[_0xd0a33(0x1b6)],'content':_0x14243e,'files':_0x3a2b6d[_0xd0a33(0x1a4)],'packageBase64':_0x3a2b6d['packageBase64'],'tags':_0x5cd1e9?.[_0xd0a33(0x1a1)],'version':_0x5cd1e9?.[_0xd0a33(0x1a8)],'sourceSessionId':_0x5cd1e9?.[_0xd0a33(0x18a)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1c17a2,_0x27e886,_0x332391,_0x571fa9={}){const _0x332f0f=a104_0x131e,_0x52f7fb=resolvePushDirectoryRoot(_0x1c17a2),_0x23cb71=readPushMetadataIfPresent(resolve(_0x52f7fb,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x1d6fcb=requireRemoteScope(_0x27e886),_0x50f9b4=readLocalSkillContent(_0x52f7fb),_0x1368f4={..._0x27e886,'appCode':_0x27e886[_0x332f0f(0x1bc)]??_0x332391,'skillName':_0x27e886[_0x332f0f(0x1a6)]??_0x23cb71?.[_0x332f0f(0x1a6)],'description':_0x27e886[_0x332f0f(0x1b6)]??_0x23cb71?.[_0x332f0f(0x1b6)],'tags':Array['isArray'](_0x27e886[_0x332f0f(0x1a1)])?_0x27e886[_0x332f0f(0x1a1)]:_0x23cb71?.[_0x332f0f(0x1a1)],'sourceSessionId':_0x27e886['sourceSessionId']??_0x23cb71?.[_0x332f0f(0x18a)],'content':_0x27e886[_0x332f0f(0x196)]??_0x50f9b4},_0x15d80b=buildMetadata(_0x1368f4,_0x1d6fcb,_0x332391,contentHash(_0x50f9b4),_0x571fa9['refreshedAt']);writeJsonAtomic(resolve(_0x52f7fb,METADATA_FILE),_0x15d80b);}export function recordPushedRuntimeSkill(_0x171f1b,_0x2f98d9,_0x1b0a39,_0x3f1c67={}){const _0x50b2cf=a104_0x131e,_0x11d382=resolvePushDirectoryRoot(_0x171f1b),_0x5949f6=scanSkillDirectory(_0x11d382),_0x165e2b=_0x5949f6[_0x50b2cf(0x18e)](_0xd9c6e9=>_0xd9c6e9['path']===SKILL_FILE),_0x2ed380=_0x165e2b?fileText(_0x165e2b):'',_0x380270=tryNormalizePackageManifest(_0x2f98d9[_0x50b2cf(0x1b4)]),_0x1647f8={..._0x2f98d9,'content':_0x2f98d9[_0x50b2cf(0x196)]??_0x2ed380,'files':_0x380270},_0x35498d=_0x380270?normalizeLocalFiles(_0x5949f6)['filter'](_0x45a9aa=>_0x380270[_0x50b2cf(0x1b4)][_0x50b2cf(0x18f)](_0x1279ab=>_0x1279ab[_0x50b2cf(0x1a2)]===_0x45a9aa[_0x50b2cf(0x1a2)])):undefined,_0x1831e9=buildMetadata(_0x1647f8,_0x3f1c67['scope']??_0x50b2cf(0x1ae),_0x1b0a39,contentHash(_0x1647f8[_0x50b2cf(0x196)]??''),_0x3f1c67[_0x50b2cf(0x191)],_0x35498d);writeJsonAtomic(resolve(_0x11d382,METADATA_FILE),_0x1831e9);}export function deriveSkillCodeFromDirectory(_0x480bfe,_0x438ff4){const _0x17c51c=a104_0x131e,_0x512a3e=basename(resolve(_0x480bfe)),_0x5a009e=_0x438ff4+'--';return _0x512a3e['startsWith'](_0x5a009e)?_0x512a3e[_0x17c51c(0x1a9)](_0x5a009e[_0x17c51c(0x194)]):_0x512a3e;}function resolvePushSkillCode(_0xc5b499,_0x1a4ddb,_0x29cb0a,_0xee4625){const _0x2cc2b4=a104_0x131e,_0x50eb6f=deriveSkillCodeFromSkillFile(_0xc5b499)||deriveSkillCodeFromDirectory(_0xc5b499,_0x1a4ddb);if(_0xee4625[_0x2cc2b4(0x19c)])return _0x50eb6f;return _0x29cb0a?.[_0x2cc2b4(0x1b1)]?.[_0x2cc2b4(0x1ba)]()||_0x50eb6f;}function deriveSkillCodeFromSkillFile(_0x775546){const _0x3cec10=a104_0x131e,_0x1c768d=resolve(_0x775546,SKILL_FILE);if(!existsSync(_0x1c768d)||!lstatSync(_0x1c768d)[_0x3cec10(0x190)]())return undefined;const _0x3d97c2=readFileSync(_0x1c768d,_0x3cec10(0x1ab)),_0x30bd2c=_0x3d97c2[_0x3cec10(0x192)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x30bd2c)return undefined;const _0x4e504c=parseFrontmatterObject(_0x30bd2c[0x1]??''),_0x1a7936=scalarToString(_0x4e504c?.[_0x3cec10(0x1b5)]);return _0x1a7936?slugifySkillName(_0x1a7936):undefined;}function readSkillDisplayName(_0x497f26){const _0x1db07f=a104_0x131e,_0x538be3=_0x497f26['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x538be3)return undefined;const _0x253d94=parseFrontmatterObject(_0x538be3[0x1]??'');return scalarToString(_0x253d94?.[_0x1db07f(0x185)]);}function slugifySkillName(_0x28f2b6){const _0x5682d1=a104_0x131e,_0x3cfe11=_0x28f2b6['trim']()[_0x5682d1(0x1b0)]()[_0x5682d1(0x188)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x5682d1(0x188)](/^-+/,'')['replace'](/-+$/,'')[_0x5682d1(0x188)](/-{2,}/g,'-');if(!_0x3cfe11)throw CliErrors[_0x5682d1(0x197)](_0x5682d1(0x19d)+SKILL_FILE+_0x5682d1(0x19e));return _0x3cfe11;}function parseFrontmatterObject(_0x32c9a1){const _0x4184ae=a104_0x131e;try{const _0x1a20f4=a104_0x5c932d(_0x32c9a1);return _0x1a20f4&&typeof _0x1a20f4==='object'&&!Array[_0x4184ae(0x18c)](_0x1a20f4)?_0x1a20f4:undefined;}catch{return undefined;}}function scalarToString(_0x198dbd){const _0x3803e7=a104_0x131e;if(typeof _0x198dbd==='string')return _0x198dbd[_0x3803e7(0x1ba)]();if(typeof _0x198dbd===_0x3803e7(0x1b3)||typeof _0x198dbd===_0x3803e7(0x1a0))return String(_0x198dbd);return undefined;}function resolvePushDirectoryRoot(_0x842b26){const _0x7de8b=a104_0x131e,_0xa1d552=resolve(_0x842b26);if(!existsSync(_0xa1d552))throw CliErrors[_0x7de8b(0x197)]('Skill\x20directory\x20not\x20found:\x20'+_0x842b26);const _0x5be08=lstatSync(_0xa1d552);if(_0x5be08[_0x7de8b(0x1a7)]())return _0xa1d552;if(_0x5be08[_0x7de8b(0x198)]()){const _0x147642=realpathSync(_0xa1d552);if(lstatSync(_0x147642)[_0x7de8b(0x1a7)]())return _0x147642;}throw CliErrors[_0x7de8b(0x197)]('Skill\x20directory\x20not\x20found:\x20'+_0x842b26);}function requireRemoteScope(_0x1689b9){const _0xec4838=a104_0x131e;if(_0x1689b9[_0xec4838(0x1b8)]===_0xec4838(0x1ae)||_0x1689b9[_0xec4838(0x1b8)]===_0xec4838(0x19a)||_0x1689b9[_0xec4838(0x1b8)]===_0xec4838(0x193))return _0x1689b9[_0xec4838(0x1b8)];throw CliErrors[_0xec4838(0x197)](_0xec4838(0x1be)+(_0x1689b9[_0xec4838(0x1b1)]||_0xec4838(0x1bd))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x1689b9['scope']??_0xec4838(0x1a3))+'\x22.');}function readLocalSkillContent(_0x3dea4e){const _0x40f0b0=a104_0x131e,_0x1e2e00=resolve(_0x3dea4e,SKILL_FILE);return existsSync(_0x1e2e00)&&lstatSync(_0x1e2e00)[_0x40f0b0(0x190)]()?readFileSync(_0x1e2e00,_0x40f0b0(0x1ab)):'';}function readPushMetadataIfPresent(_0xd68569,_0x4c69a1={}){try{return readMetadataIfPresent(_0xd68569);}catch(_0x32871d){if(_0x4c69a1['ignoreInvalidMetadata'])return undefined;throw _0x32871d;}}
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 +1 @@
1
- function a105_0x3a76(){const _0x5dfee7=['234170wALicB','Unsupported\x20runtime\x20Skill\x20scope:\x20','2320272QXSxCu','4ijZtDB','push','1160341LJiPPl','personal','14459214QwzRtU','builtin','validation','9WsqhlZ','200068tumpsV','company','2PoSOdj','15117wDUsXp','includes','54FBFHkh','3444520MUgqhy'];a105_0x3a76=function(){return _0x5dfee7;};return a105_0x3a76();}function a105_0x1c82(_0x2856c0,_0x2b68f4){_0x2856c0=_0x2856c0-0x1b3;const _0x3a76bd=a105_0x3a76();let _0x1c822a=_0x3a76bd[_0x2856c0];return _0x1c822a;}(function(_0x5d3466,_0x516c15){const _0x3fe7c3=a105_0x1c82,_0x557785=_0x5d3466();while(!![]){try{const _0x506c02=parseInt(_0x3fe7c3(0x1bf))/0x1*(-parseInt(_0x3fe7c3(0x1bd))/0x2)+parseInt(_0x3fe7c3(0x1c0))/0x3*(parseInt(_0x3fe7c3(0x1b5))/0x4)+parseInt(_0x3fe7c3(0x1c4))/0x5*(-parseInt(_0x3fe7c3(0x1c2))/0x6)+parseInt(_0x3fe7c3(0x1b7))/0x7+-parseInt(_0x3fe7c3(0x1b4))/0x8+parseInt(_0x3fe7c3(0x1bc))/0x9*(-parseInt(_0x3fe7c3(0x1c3))/0xa)+parseInt(_0x3fe7c3(0x1b9))/0xb;if(_0x506c02===_0x516c15)break;else _0x557785['push'](_0x557785['shift']());}catch(_0x114a12){_0x557785['push'](_0x557785['shift']());}}}(a105_0x3a76,0x37f60));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x373146){const _0x18742e=a105_0x1c82,_0x22cd54=_0x373146&&_0x373146['length']>0x0?_0x373146:['personal',_0x18742e(0x1be),_0x18742e(0x1ba)],_0xa1b229=[];for(const _0x35fe2a of _0x22cd54){if(!isRuntimeSkillScope(_0x35fe2a))throw CliErrors[_0x18742e(0x1bb)](_0x18742e(0x1b3)+_0x35fe2a);!_0xa1b229[_0x18742e(0x1c1)](_0x35fe2a)&&_0xa1b229[_0x18742e(0x1b6)](_0x35fe2a);}return _0xa1b229;}export function isRuntimeSkillScope(_0xcc0c6c){const _0x2469e7=a105_0x1c82;return _0xcc0c6c===_0x2469e7(0x1b8)||_0xcc0c6c===_0x2469e7(0x1be)||_0xcc0c6c===_0x2469e7(0x1ba);}
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 +1 @@
1
- function a107_0x4654(_0x44d8bb,_0x43b127){_0x44d8bb=_0x44d8bb-0x84;const _0x2d5830=a107_0x2d58();let _0x4654bc=_0x2d5830[_0x44d8bb];return _0x4654bc;}function a107_0x2d58(){const _0x5576b8=['object','validation_error','endsWith','1980-01-01T00:00:00.000Z','from','code','174561exoPQa','24Htoffr','map','sort','name','435932wchqtS','172197ZZDQZK','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','path','3348730JJpNqz','validation','1174064rSIqzU','36YBjKXX','1073646cAhysM','5252968FGMksE','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.'];a107_0x2d58=function(){return _0x5576b8;};return a107_0x2d58();}const a107_0x4b1db3=a107_0x4654;(function(_0x12c269,_0x33a993){const _0x2fbd5f=a107_0x4654,_0x47d4af=_0x12c269();while(!![]){try{const _0x348b19=-parseInt(_0x2fbd5f(0x95))/0x1+parseInt(_0x2fbd5f(0x85))/0x2+-parseInt(_0x2fbd5f(0x90))/0x3*(parseInt(_0x2fbd5f(0x86))/0x4)+parseInt(_0x2fbd5f(0x9a))/0x5+-parseInt(_0x2fbd5f(0x91))/0x6*(parseInt(_0x2fbd5f(0x87))/0x7)+parseInt(_0x2fbd5f(0x88))/0x8+parseInt(_0x2fbd5f(0x96))/0x9;if(_0x348b19===_0x33a993)break;else _0x47d4af['push'](_0x47d4af['shift']());}catch(_0x31a026){_0x47d4af['push'](_0x47d4af['shift']());}}}(a107_0x2d58,0x57bed));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x4b1db3(0x8d));export function createDeterministicZipPackage(_0x5cdaa5){const _0x1688cd=a107_0x4b1db3,_0x40fcab={};for(const _0x22729c of normalizeLocalFiles(_0x5cdaa5)){_0x40fcab[_0x22729c[_0x1688cd(0x99)]]=fileContent(_0x22729c);}return Buffer[_0x1688cd(0x8e)](zipSync(_0x40fcab,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x4d685c){const _0x442c71=a107_0x4b1db3;if(_0x4d685c['length']<0x16)throw CliErrors[_0x442c71(0x84)](_0x442c71(0x89));let _0x4c7b19;try{_0x4c7b19=unzipSync(_0x4d685c,{'filter'(_0x29ed79){const _0x216069=_0x442c71,_0x4fcdde=normalizeSkillRelativePath(_0x29ed79[_0x216069(0x94)]);if(_0x4fcdde[_0x216069(0x8c)]('/'))throw CliErrors['validation'](_0x216069(0x98)+_0x4fcdde);return!![];}});}catch(_0x2172fe){if(isRuntimeSkillValidationError(_0x2172fe))throw _0x2172fe;throw CliErrors[_0x442c71(0x84)](_0x442c71(0x89));}return Object[_0x442c71(0x97)](_0x4c7b19)[_0x442c71(0x92)](([_0xbe3f7b,_0x4fea5f])=>({'path':normalizeSkillRelativePath(_0xbe3f7b),'bytes':Buffer['from'](_0x4fea5f)}))[_0x442c71(0x93)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x422209){const _0x546e13=a107_0x4b1db3;return typeof _0x422209===_0x546e13(0x8a)&&_0x422209!==null&&_0x546e13(0x8f)in _0x422209&&_0x422209[_0x546e13(0x8f)]===_0x546e13(0x8b);}
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';}