@lovrabet/lovrabet-cli 2.1.7 → 2.1.8-beta.2

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 -0
  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 -0
  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 -0
  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 -0
  51. package/lib/commands/skill/push-flow-helpers.js +1 -0
  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 a87_0x5692(_0xe27640,_0x27a6f7){_0xe27640=_0xe27640-0x15e;const _0x14f534=a87_0x14f5();let _0x5692af=_0x14f534[_0xe27640];return _0x5692af;}const a87_0x3c420e=a87_0x5692;(function(_0x2190d7,_0x184c41){const _0x186b28=a87_0x5692,_0xfa3e10=_0x2190d7();while(!![]){try{const _0x31d1ab=parseInt(_0x186b28(0x169))/0x1*(-parseInt(_0x186b28(0x15e))/0x2)+parseInt(_0x186b28(0x167))/0x3*(parseInt(_0x186b28(0x166))/0x4)+parseInt(_0x186b28(0x162))/0x5*(-parseInt(_0x186b28(0x16b))/0x6)+parseInt(_0x186b28(0x160))/0x7*(parseInt(_0x186b28(0x164))/0x8)+parseInt(_0x186b28(0x163))/0x9+-parseInt(_0x186b28(0x15f))/0xa+-parseInt(_0x186b28(0x16c))/0xb*(parseInt(_0x186b28(0x161))/0xc);if(_0x31d1ab===_0x184c41)break;else _0xfa3e10['push'](_0xfa3e10['shift']());}catch(_0x260701){_0xfa3e10['push'](_0xfa3e10['shift']());}}}(a87_0x14f5,0xc30a5));export const VERSION=a87_0x3c420e(0x165);function a87_0x14f5(){const _0x327f87=['165tCsLJu','2TucFAq','9818080BgaTHi','40901Vqvgxl','21780fnSIFu','12435EDLONI','12305637QxyzVO','1088XzxBUT','2.1.7','8CuhYKd','46542QsDule','8063aee','208474uCpJPT','2026-07-07T11:04:05.382Z','426Qmmooi'];a87_0x14f5=function(){return _0x327f87;};return a87_0x14f5();}export const GIT_TAG='v2.1.7-beta.5';export const GIT_COMMIT=a87_0x3c420e(0x168);export const BUILD_TIME=a87_0x3c420e(0x16a);
1
+ function a92_0x9f07(){const _0x1d7c83=['528642saavQe','v2.1.8-beta.2','2.1.8-beta.2','1006918dTOfhr','7895652eBDlFr','2606770favEUl','c32b75a','18064UHdYAS','20ScGtXD','2026-07-08T03:53:59.263Z','4xAKUSu','21RceviB','138106tYUfab','23502pDJtzw','3474cguDwg','26dbzBWL','5DWcIDf'];a92_0x9f07=function(){return _0x1d7c83;};return a92_0x9f07();}const a92_0x46113b=a92_0x1005;(function(_0x211ab8,_0x4f525b){const _0x2c7f3e=a92_0x1005,_0x53d655=_0x211ab8();while(!![]){try{const _0x5228cf=parseInt(_0x2c7f3e(0x91))/0x1*(parseInt(_0x2c7f3e(0x8d))/0x2)+-parseInt(_0x2c7f3e(0x92))/0x3*(parseInt(_0x2c7f3e(0x8b))/0x4)+parseInt(_0x2c7f3e(0x97))/0x5+-parseInt(_0x2c7f3e(0x8e))/0x6*(-parseInt(_0x2c7f3e(0x8c))/0x7)+parseInt(_0x2c7f3e(0x88))/0x8*(parseInt(_0x2c7f3e(0x8f))/0x9)+parseInt(_0x2c7f3e(0x89))/0xa*(parseInt(_0x2c7f3e(0x95))/0xb)+parseInt(_0x2c7f3e(0x96))/0xc*(-parseInt(_0x2c7f3e(0x90))/0xd);if(_0x5228cf===_0x4f525b)break;else _0x53d655['push'](_0x53d655['shift']());}catch(_0x46f741){_0x53d655['push'](_0x53d655['shift']());}}}(a92_0x9f07,0x6ba2e));function a92_0x1005(_0x2601b7,_0x211fc4){_0x2601b7=_0x2601b7-0x87;const _0x9f07bd=a92_0x9f07();let _0x100549=_0x9f07bd[_0x2601b7];return _0x100549;}export const VERSION=a92_0x46113b(0x94);export const GIT_TAG=a92_0x46113b(0x93);export const GIT_COMMIT=a92_0x46113b(0x87);export const BUILD_TIME=a92_0x46113b(0x8a);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1f28d7,_0x4491a9){const _0xee2c44=a88_0x1841,_0x41bdf1=_0x1f28d7();while(!![]){try{const _0x1f458c=-parseInt(_0xee2c44(0x191))/0x1*(-parseInt(_0xee2c44(0x197))/0x2)+-parseInt(_0xee2c44(0x18e))/0x3*(-parseInt(_0xee2c44(0x192))/0x4)+parseInt(_0xee2c44(0x18c))/0x5*(-parseInt(_0xee2c44(0x196))/0x6)+parseInt(_0xee2c44(0x194))/0x7+parseInt(_0xee2c44(0x18a))/0x8+parseInt(_0xee2c44(0x195))/0x9*(-parseInt(_0xee2c44(0x18b))/0xa)+-parseInt(_0xee2c44(0x190))/0xb;if(_0x1f458c===_0x4491a9)break;else _0x41bdf1['push'](_0x41bdf1['shift']());}catch(_0x1bc0c9){_0x41bdf1['push'](_0x41bdf1['shift']());}}}(a88_0x2bf2,0x8dc90));import{jsx as a88_0x2de7db,jsxs as a88_0x50f2b5}from'react/jsx-runtime';import{useEffect}from'react';function a88_0x2bf2(){const _0x5a7cd6=['20016KSERdg','59802oKdkuF','60jQjZtp','1277272HQDIgW','2000BfkFJM','195yzBkHr','\x20to\x20view\x20available\x20commands.','101094OLoUvK','\x20--help','9774633VcmNsp','10667LBcHVt','100qEzPRQ','green','6865243HmpsvW'];a88_0x2bf2=function(){return _0x5a7cd6;};return a88_0x2bf2();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a88_0x1841(_0x3c55b1,_0x1e74d8){_0x3c55b1=_0x3c55b1-0x18a;const _0x2bf269=a88_0x2bf2();let _0x184114=_0x2bf269[_0x3c55b1];return _0x184114;}export function Help(){const _0xfdbb8b=a88_0x1841,{exit:_0x9c8101}=useApp();return useEffect(()=>{_0x9c8101();},[_0x9c8101]),a88_0x50f2b5(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a88_0x2de7db(Box,{'children':a88_0x2de7db(Text,{'bold':!![],'color':_0xfdbb8b(0x193),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a88_0x50f2b5(Box,{'marginTop':0x1,'children':[a88_0x2de7db(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a88_0x2de7db(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0xfdbb8b(0x18f)}),a88_0x2de7db(Text,{'dimColor':!![],'children':_0xfdbb8b(0x18d)})]})]});}
1
+ (function(_0x4718c0,_0x239f9e){const _0x58c28c=a93_0x3ea3,_0x2210fb=_0x4718c0();while(!![]){try{const _0x286fee=-parseInt(_0x58c28c(0x168))/0x1+-parseInt(_0x58c28c(0x164))/0x2*(parseInt(_0x58c28c(0x15d))/0x3)+-parseInt(_0x58c28c(0x167))/0x4+parseInt(_0x58c28c(0x166))/0x5*(parseInt(_0x58c28c(0x15e))/0x6)+-parseInt(_0x58c28c(0x163))/0x7*(-parseInt(_0x58c28c(0x161))/0x8)+-parseInt(_0x58c28c(0x162))/0x9*(-parseInt(_0x58c28c(0x15b))/0xa)+-parseInt(_0x58c28c(0x15f))/0xb*(parseInt(_0x58c28c(0x15a))/0xc);if(_0x286fee===_0x239f9e)break;else _0x2210fb['push'](_0x2210fb['shift']());}catch(_0x3a9317){_0x2210fb['push'](_0x2210fb['shift']());}}}(a93_0x4eac,0x2417f));function a93_0x4eac(){const _0x27762e=['1115091GAAITW','14WaWNko','2OAgoVX','\x20--help','448775KeTLMp','316904xdJAyE','5467UypNHF','240pwUWZb','20EykAZg','green','187521OVzyUV','6dszNOR','27742QukkZe','\x20to\x20view\x20available\x20commands.','31704DEHJhX'];a93_0x4eac=function(){return _0x27762e;};return a93_0x4eac();}import{jsx as a93_0x490212,jsxs as a93_0x1fdc49}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x3ea3(_0x26a9a3,_0xb17854){_0x26a9a3=_0x26a9a3-0x15a;const _0x4eacac=a93_0x4eac();let _0x3ea309=_0x4eacac[_0x26a9a3];return _0x3ea309;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x5c7304=a93_0x3ea3,{exit:_0x3b4da0}=useApp();return useEffect(()=>{_0x3b4da0();},[_0x3b4da0]),a93_0x1fdc49(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a93_0x490212(Box,{'children':a93_0x490212(Text,{'bold':!![],'color':_0x5c7304(0x15c),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x1fdc49(Box,{'marginTop':0x1,'children':[a93_0x490212(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0x490212(Text,{'bold':!![],'color':_0x5c7304(0x15c),'children':CLI_BIN_NAME+_0x5c7304(0x165)}),a93_0x490212(Text,{'dimColor':!![],'children':_0x5c7304(0x160)})]})]});}
@@ -1 +1 @@
1
- const a89_0x14ad66=a89_0x3259;function a89_0x4109(){const _0x22f9fb=['2176554hrXnPH','unknown','3493089VlsZUM','join','4369768IgUPdj','skills','stdout','stderr','8spQppT','add','3860260FSaYbo','2338056TditAY','status','skipNpxSkillsEnvSuffix','toString','trim','stdio','1086rhasoP','397YMnPOr','3585540ViHnny','npx','log','inherit','pipe'];a89_0x4109=function(){return _0x22f9fb;};return a89_0x4109();}(function(_0x52cd80,_0x28a642){const _0x59f502=a89_0x3259,_0x2cd171=_0x52cd80();while(!![]){try{const _0x417f7a=-parseInt(_0x59f502(0xbe))/0x1*(-parseInt(_0x59f502(0xbd))/0x2)+parseInt(_0x59f502(0xc6))/0x3+parseInt(_0x59f502(0xb4))/0x4*(-parseInt(_0x59f502(0xb6))/0x5)+-parseInt(_0x59f502(0xc4))/0x6+parseInt(_0x59f502(0xbf))/0x7+parseInt(_0x59f502(0xc8))/0x8+parseInt(_0x59f502(0xb7))/0x9;if(_0x417f7a===_0x28a642)break;else _0x2cd171['push'](_0x2cd171['shift']());}catch(_0x4e456f){_0x2cd171['push'](_0x2cd171['shift']());}}}(a89_0x4109,0xc1300));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a89_0x3259(_0x3bd289,_0x688c7d){_0x3bd289=_0x3bd289-0xb3;const _0x410902=a89_0x4109();let _0x3259d4=_0x410902[_0x3bd289];return _0x3259d4;}import{LOVRABET_SKILL_SOURCE as a89_0x48efe1}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a89_0x48efe1;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a89_0x14ad66(0xb9)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x464050,_0x375607=LOVRABET_SKILL_SOURCE,_0x2985de){const _0x5e49f5=a89_0x14ad66;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x37f1d4=_0x2985de?.[_0x5e49f5(0xbc)]??_0x5e49f5(0xc2),_0x4c15de=resolveNpmBin(_0x5e49f5(0xc0)),_0x40864d=[_0x5e49f5(0xc9),_0x5e49f5(0xb5),_0x375607,'-g','-y'],_0x1f0358=[_0x4c15de,..._0x40864d][_0x5e49f5(0xc7)]('\x20');console[_0x5e49f5(0xc1)]('*\x20'+_0x1f0358);const _0x15eed4=spawnSync(_0x4c15de,_0x40864d,{'cwd':_0x464050,'stdio':_0x37f1d4,'env':process.env,'shell':![]});if(_0x15eed4[_0x5e49f5(0xb8)]===0x0)return{'ok':!![],'status':0x0};let _0x100365='exit\x20'+(_0x15eed4['status']??_0x5e49f5(0xc5));if(_0x37f1d4===_0x5e49f5(0xc3)){const _0x88749a=_0x15eed4[_0x5e49f5(0xb3)]?_0x15eed4[_0x5e49f5(0xb3)][_0x5e49f5(0xba)]()['trim']():'',_0x216daa=_0x15eed4['stdout']?_0x15eed4[_0x5e49f5(0xca)][_0x5e49f5(0xba)]()[_0x5e49f5(0xbb)]():'';if(_0x88749a)_0x100365=_0x88749a;else{if(_0x216daa)_0x100365=_0x216daa;}}return{'ok':![],'status':_0x15eed4[_0x5e49f5(0xb8)]??null,'error':_0x100365};}
1
+ const a94_0x60ca24=a94_0x68fc;(function(_0x3d9858,_0x280577){const _0x1c85e2=a94_0x68fc,_0x3f0fdb=_0x3d9858();while(!![]){try{const _0x3ae7aa=-parseInt(_0x1c85e2(0x82))/0x1+-parseInt(_0x1c85e2(0x81))/0x2+-parseInt(_0x1c85e2(0x80))/0x3*(-parseInt(_0x1c85e2(0x7e))/0x4)+parseInt(_0x1c85e2(0x87))/0x5+-parseInt(_0x1c85e2(0x7b))/0x6+parseInt(_0x1c85e2(0x83))/0x7*(-parseInt(_0x1c85e2(0x79))/0x8)+-parseInt(_0x1c85e2(0x77))/0x9*(-parseInt(_0x1c85e2(0x86))/0xa);if(_0x3ae7aa===_0x280577)break;else _0x3f0fdb['push'](_0x3f0fdb['shift']());}catch(_0x397562){_0x3f0fdb['push'](_0x3f0fdb['shift']());}}}(a94_0x41f7,0xdf786));function a94_0x41f7(){const _0x315287=['7pllEji','toString','log','260vAWiaZ','4423655SDGluS','trim','status','stderr','1329840pfzrjm','stdio','13125328uiaCqA','stdout','8011680dfRqem','skipNpxSkillsEnvSuffix','npx','356bVnShX','join','34314xeamiZ','1223690rEQPuW','1241348yrVSjG'];a94_0x41f7=function(){return _0x315287;};return a94_0x41f7();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a94_0x68fc(_0x1cc688,_0x578550){_0x1cc688=_0x1cc688-0x75;const _0x41f747=a94_0x41f7();let _0x68fcaf=_0x41f747[_0x1cc688];return _0x68fcaf;}import{LOVRABET_SKILL_SOURCE as a94_0xb29f60}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0xb29f60;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x60ca24(0x7c)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x3ff87c,_0x40f56c=LOVRABET_SKILL_SOURCE,_0x4aac64){const _0x1bafbd=a94_0x60ca24;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5eac85=_0x4aac64?.[_0x1bafbd(0x78)]??'inherit',_0x717a58=resolveNpmBin(_0x1bafbd(0x7d)),_0x2472f1=['skills','add',_0x40f56c,'-g','-y'],_0x31c7a0=[_0x717a58,..._0x2472f1][_0x1bafbd(0x7f)]('\x20');console[_0x1bafbd(0x85)]('*\x20'+_0x31c7a0);const _0x554914=spawnSync(_0x717a58,_0x2472f1,{'cwd':_0x3ff87c,'stdio':_0x5eac85,'env':process.env,'shell':![]});if(_0x554914['status']===0x0)return{'ok':!![],'status':0x0};let _0x172ca3='exit\x20'+(_0x554914[_0x1bafbd(0x75)]??'unknown');if(_0x5eac85==='pipe'){const _0x3a5ffd=_0x554914['stderr']?_0x554914[_0x1bafbd(0x76)][_0x1bafbd(0x84)]()[_0x1bafbd(0x88)]():'',_0x2f4d05=_0x554914[_0x1bafbd(0x7a)]?_0x554914['stdout'][_0x1bafbd(0x84)]()[_0x1bafbd(0x88)]():'';if(_0x3a5ffd)_0x172ca3=_0x3a5ffd;else{if(_0x2f4d05)_0x172ca3=_0x2f4d05;}}return{'ok':![],'status':_0x554914[_0x1bafbd(0x75)]??null,'error':_0x172ca3};}
@@ -1 +1 @@
1
- const a90_0x5a5a4f=a90_0x2df6;(function(_0x58cf5b,_0x3e007b){const _0x297ea4=a90_0x2df6,_0x3e0fec=_0x58cf5b();while(!![]){try{const _0x88282f=-parseInt(_0x297ea4(0xf9))/0x1*(parseInt(_0x297ea4(0xef))/0x2)+-parseInt(_0x297ea4(0xfb))/0x3+parseInt(_0x297ea4(0xf5))/0x4*(parseInt(_0x297ea4(0xf0))/0x5)+-parseInt(_0x297ea4(0xf6))/0x6*(-parseInt(_0x297ea4(0xf1))/0x7)+-parseInt(_0x297ea4(0xf3))/0x8*(-parseInt(_0x297ea4(0xfe))/0x9)+parseInt(_0x297ea4(0xfa))/0xa+-parseInt(_0x297ea4(0xff))/0xb;if(_0x88282f===_0x3e007b)break;else _0x3e0fec['push'](_0x3e0fec['shift']());}catch(_0x1a2b3a){_0x3e0fec['push'](_0x3e0fec['shift']());}}}(a90_0x4560,0x28627));export const METADATA_FILE=a90_0x5a5a4f(0xf2);export const SKILL_FILE='SKILL.md';function a90_0x4560(){const _0x3b2eab=['787028ymYyUA','.DS_Store','2ZToyPv','5bxjbbC','175hYiiWd','lovrabet.skill.json','72ohqlvl','.next','1192740YEGILa','10986xHsxtK','.turbo','.hg','12461pFaMll','409220JGZweI','486375dXnFgq','build','dist','26667WVIyrF'];a90_0x4560=function(){return _0x3b2eab;};return a90_0x4560();}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a90_0x5a5a4f(0x100)]);function a90_0x2df6(_0x1d566e,_0x7167fb){_0x1d566e=_0x1d566e-0xef;const _0x456038=a90_0x4560();let _0x2df609=_0x456038[_0x1d566e];return _0x2df609;}export const IGNORED_DIR_NAMES=new Set(['.git',a90_0x5a5a4f(0xf8),'.svn','node_modules',a90_0x5a5a4f(0xf4),a90_0x5a5a4f(0xfd),a90_0x5a5a4f(0xfc),'coverage',a90_0x5a5a4f(0xf7),'.cache']);
1
+ const a95_0x379461=a95_0x58ee;(function(_0x594b62,_0x490796){const _0x5ad4a5=a95_0x58ee,_0x3df314=_0x594b62();while(!![]){try{const _0x33d0f2=-parseInt(_0x5ad4a5(0x90))/0x1+-parseInt(_0x5ad4a5(0x9b))/0x2+-parseInt(_0x5ad4a5(0x95))/0x3*(parseInt(_0x5ad4a5(0x89))/0x4)+-parseInt(_0x5ad4a5(0x9d))/0x5+-parseInt(_0x5ad4a5(0x8f))/0x6+parseInt(_0x5ad4a5(0x8c))/0x7+parseInt(_0x5ad4a5(0x8b))/0x8;if(_0x33d0f2===_0x490796)break;else _0x3df314['push'](_0x3df314['shift']());}catch(_0x180456){_0x3df314['push'](_0x3df314['shift']());}}}(a95_0x145b,0x4b8e8));export const METADATA_FILE=a95_0x379461(0x8d);function a95_0x58ee(_0x4ce303,_0x474202){_0x4ce303=_0x4ce303-0x89;const _0x145b59=a95_0x145b();let _0x58eebc=_0x145b59[_0x4ce303];return _0x58eebc;}export const SKILL_FILE=a95_0x379461(0x96);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x379461(0x97)]);export const IGNORED_DIR_NAMES=new Set([a95_0x379461(0x9a),a95_0x379461(0x8a),a95_0x379461(0x94),a95_0x379461(0x91),a95_0x379461(0x8e),a95_0x379461(0x98),a95_0x379461(0x93),a95_0x379461(0x99),a95_0x379461(0x9c),a95_0x379461(0x92)]);function a95_0x145b(){const _0x2dd24f=['.next','2381148ruztzf','350842ynNjqF','node_modules','.cache','build','.svn','74352kKAYmu','SKILL.md','.DS_Store','dist','coverage','.git','116952rihAuc','.turbo','2989750hiiWEP','8hOGSyR','.hg','13868720uDtjxs','207088NtlDfc','lovrabet.skill.json'];a95_0x145b=function(){return _0x2dd24f;};return a95_0x145b();}
@@ -1 +1 @@
1
- (function(_0x18311f,_0x171315){const _0x3cc238=a91_0x5140,_0x6125c9=_0x18311f();while(!![]){try{const _0x14932d=parseInt(_0x3cc238(0x165))/0x1*(parseInt(_0x3cc238(0x151))/0x2)+parseInt(_0x3cc238(0x159))/0x3*(parseInt(_0x3cc238(0x156))/0x4)+parseInt(_0x3cc238(0x162))/0x5*(parseInt(_0x3cc238(0x158))/0x6)+-parseInt(_0x3cc238(0x15d))/0x7*(parseInt(_0x3cc238(0x153))/0x8)+-parseInt(_0x3cc238(0x15f))/0x9+-parseInt(_0x3cc238(0x15c))/0xa*(parseInt(_0x3cc238(0x157))/0xb)+-parseInt(_0x3cc238(0x152))/0xc*(parseInt(_0x3cc238(0x164))/0xd);if(_0x14932d===_0x171315)break;else _0x6125c9['push'](_0x6125c9['shift']());}catch(_0x50a6de){_0x6125c9['push'](_0x6125c9['shift']());}}}(a91_0x53f0,0xbfdca));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(_0x43f01f,_0x1a7f11){const _0x249be2=a91_0x5140,_0x2e101a=normalizeSkillRelativePath(_0x1a7f11),_0x395084=realOrResolved(_0x43f01f),_0x2b1f58=resolve(_0x395084,..._0x2e101a[_0x249be2(0x160)]('/'));if(!isPathInside(_0x2b1f58,_0x395084))throw CliErrors['validation'](_0x249be2(0x15a)+_0x1a7f11);return ensureNoSymlinkInManagedPath(_0x395084,_0x2e101a),_0x2b1f58;}export function ensureNoSymlinkInManagedPath(_0x2d9259,_0x1232a5){const _0x3b0a07=a91_0x5140;let _0x4b4d52=_0x2d9259;for(const _0x54f0d1 of _0x1232a5['split']('/')){_0x4b4d52=resolve(_0x4b4d52,_0x54f0d1);const _0x47afd9=lstatIfPresent(_0x4b4d52);if(_0x47afd9?.[_0x3b0a07(0x15b)]())throw CliErrors[_0x3b0a07(0x155)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x1232a5);}}export function isDanglingSymlink(_0x397678){try{return lstatSync(_0x397678)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0xd9ac5b){const _0x1d8bef=readlinkSync(_0xd9ac5b);return isAbsolute(_0x1d8bef)?_0x1d8bef:resolve(dirname(_0xd9ac5b),_0x1d8bef);}function a91_0x5140(_0x1345ff,_0x54835c){_0x1345ff=_0x1345ff-0x151;const _0x53f019=a91_0x53f0();let _0x5140f7=_0x53f019[_0x1345ff];return _0x5140f7;}export function isPathInside(_0x4c67a3,_0x20ffdd){const _0x5cb83d=a91_0x5140,_0x12351b=_0x4c67a3[_0x5cb83d(0x154)](sep)?_0x4c67a3:''+_0x4c67a3+sep,_0x4d4760=_0x20ffdd[_0x5cb83d(0x154)](sep)?_0x20ffdd:''+_0x20ffdd+sep;return _0x4c67a3===_0x20ffdd||_0x12351b[_0x5cb83d(0x163)](_0x4d4760);}function a91_0x53f0(){const _0x2468be=['Unsafe\x20Skill\x20file\x20path:\x20','isSymbolicLink','2883780wDGvWU','49QGiRia','.tmp','10816371sIjgvP','split','stringify','65425brNbNI','startsWith','2249rDdHfD','569jouNmi','4474oDElHL','11328YsLPDE','608216risGyT','endsWith','validation','4MWVkdU','22byveRM','372fVqXsZ','3527457pgdmbP'];a91_0x53f0=function(){return _0x2468be;};return a91_0x53f0();}export function realOrResolved(_0x1770f7){try{return realpathSync(_0x1770f7);}catch{return resolve(_0x1770f7);}}export function lstatIfPresent(_0x5f4749){try{return lstatSync(_0x5f4749);}catch{return undefined;}}export function writeTextAtomic(_0x29426c,_0x3eed58,_0xfb7032){writeBytesAtomic(_0x29426c,Buffer['from'](_0x3eed58,'utf8'),_0xfb7032);}export function writeBytesAtomic(_0x13d76f,_0x11d18a,_0x1a0757){const _0x4b46cf=a91_0x5140,_0x1722a2=_0x13d76f+_0x4b46cf(0x15e);try{writeFileSync(_0x1722a2,_0x11d18a,{'mode':_0x1a0757}),renameSync(_0x1722a2,_0x13d76f);}catch(_0x140698){try{rmSync(_0x1722a2,{'force':!![]});}catch{}throw _0x140698;}}export function writeJsonAtomic(_0x513587,_0x483e94){const _0x5c8b89=a91_0x5140;writeTextAtomic(_0x513587,JSON[_0x5c8b89(0x161)](_0x483e94,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x263c2f,_0x315fc6){const _0x3dc0ea=a96_0x1324,_0x3aaeb5=_0x263c2f();while(!![]){try{const _0x42c7b8=-parseInt(_0x3dc0ea(0x125))/0x1+-parseInt(_0x3dc0ea(0x123))/0x2*(parseInt(_0x3dc0ea(0x12b))/0x3)+-parseInt(_0x3dc0ea(0x127))/0x4*(parseInt(_0x3dc0ea(0x12d))/0x5)+parseInt(_0x3dc0ea(0x129))/0x6+-parseInt(_0x3dc0ea(0x12f))/0x7+parseInt(_0x3dc0ea(0x124))/0x8+-parseInt(_0x3dc0ea(0x130))/0x9*(-parseInt(_0x3dc0ea(0x120))/0xa);if(_0x42c7b8===_0x315fc6)break;else _0x3aaeb5['push'](_0x3aaeb5['shift']());}catch(_0x2227cc){_0x3aaeb5['push'](_0x3aaeb5['shift']());}}}(a96_0x456b,0xc73fc));function a96_0x456b(){const _0xa5df7d=['10vOquqr','split','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','2mTYVHW','10978768sAsgvl','649256YHNzjS','utf8','20VFYOuM','endsWith','6096852BOpnKX','isSymbolicLink','3859518fuQOmT','stringify','1450405SYkHTe','validation','1519938AblwzH','18278433zxOmmt','startsWith'];a96_0x456b=function(){return _0xa5df7d;};return a96_0x456b();}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(_0x305413,_0x36b82c){const _0x547575=a96_0x1324,_0x4cf7f6=normalizeSkillRelativePath(_0x36b82c),_0x4c408c=realOrResolved(_0x305413),_0x399bf5=resolve(_0x4c408c,..._0x4cf7f6[_0x547575(0x121)]('/'));if(!isPathInside(_0x399bf5,_0x4c408c))throw CliErrors[_0x547575(0x12e)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x36b82c);return ensureNoSymlinkInManagedPath(_0x4c408c,_0x4cf7f6),_0x399bf5;}export function ensureNoSymlinkInManagedPath(_0x217b07,_0x3156e9){const _0x2b791b=a96_0x1324;let _0x355ac6=_0x217b07;for(const _0x3ed5ca of _0x3156e9[_0x2b791b(0x121)]('/')){_0x355ac6=resolve(_0x355ac6,_0x3ed5ca);const _0x21f8e0=lstatIfPresent(_0x355ac6);if(_0x21f8e0?.[_0x2b791b(0x12a)]())throw CliErrors[_0x2b791b(0x12e)](_0x2b791b(0x122)+_0x3156e9);}}export function isDanglingSymlink(_0x579fb2){try{return lstatSync(_0x579fb2)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x404e01){const _0x4c56b1=readlinkSync(_0x404e01);return isAbsolute(_0x4c56b1)?_0x4c56b1:resolve(dirname(_0x404e01),_0x4c56b1);}export function isPathInside(_0x48c72c,_0x6286c1){const _0x391fd5=a96_0x1324,_0x5b4b76=_0x48c72c[_0x391fd5(0x128)](sep)?_0x48c72c:''+_0x48c72c+sep,_0x5b56c8=_0x6286c1[_0x391fd5(0x128)](sep)?_0x6286c1:''+_0x6286c1+sep;return _0x48c72c===_0x6286c1||_0x5b4b76[_0x391fd5(0x131)](_0x5b56c8);}export function realOrResolved(_0x5f2202){try{return realpathSync(_0x5f2202);}catch{return resolve(_0x5f2202);}}export function lstatIfPresent(_0x5b9933){try{return lstatSync(_0x5b9933);}catch{return undefined;}}export function writeTextAtomic(_0x4a2187,_0x31d8e2,_0x56b988){const _0x7ceb96=a96_0x1324;writeBytesAtomic(_0x4a2187,Buffer['from'](_0x31d8e2,_0x7ceb96(0x126)),_0x56b988);}export function writeBytesAtomic(_0x5705fd,_0x1b18b1,_0x37f79d){const _0x2f66a7=_0x5705fd+'.tmp';try{writeFileSync(_0x2f66a7,_0x1b18b1,{'mode':_0x37f79d}),renameSync(_0x2f66a7,_0x5705fd);}catch(_0x5d3f35){try{rmSync(_0x2f66a7,{'force':!![]});}catch{}throw _0x5d3f35;}}function a96_0x1324(_0x427ffc,_0x29bf26){_0x427ffc=_0x427ffc-0x120;const _0x456b69=a96_0x456b();let _0x13247f=_0x456b69[_0x427ffc];return _0x13247f;}export function writeJsonAtomic(_0x29ec42,_0x3d1ae0){const _0x4eb344=a96_0x1324;writeTextAtomic(_0x29ec42,JSON[_0x4eb344(0x12c)](_0x3d1ae0,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x2fe24f,_0x256a86){const _0x751b40=a92_0x3bef,_0xc97673=_0x2fe24f();while(!![]){try{const _0x12ed37=parseInt(_0x751b40(0xde))/0x1*(parseInt(_0x751b40(0xdf))/0x2)+-parseInt(_0x751b40(0xdc))/0x3*(parseInt(_0x751b40(0xd7))/0x4)+-parseInt(_0x751b40(0xe2))/0x5*(parseInt(_0x751b40(0xe1))/0x6)+parseInt(_0x751b40(0xdd))/0x7+-parseInt(_0x751b40(0xd9))/0x8*(-parseInt(_0x751b40(0xd6))/0x9)+-parseInt(_0x751b40(0xe3))/0xa*(-parseInt(_0x751b40(0xe5))/0xb)+-parseInt(_0x751b40(0xd8))/0xc;if(_0x12ed37===_0x256a86)break;else _0xc97673['push'](_0xc97673['shift']());}catch(_0x558a57){_0xc97673['push'](_0xc97673['shift']());}}}(a92_0x5e7a,0x26c42));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x217b49){const _0x2b36d1=a92_0x3bef;return createHash(_0x2b36d1(0xe0))['update'](_0x217b49)[_0x2b36d1(0xdb)](_0x2b36d1(0xe4));}function a92_0x3bef(_0x9807b8,_0x55bc42){_0x9807b8=_0x9807b8-0xd6;const _0x5e7ab7=a92_0x5e7a();let _0x3bef2d=_0x5e7ab7[_0x9807b8];return _0x3bef2d;}export function fileHash(_0xd02a07){return bufferSha256(fileContent(_0xd02a07));}function a92_0x5e7a(){const _0xd9881f=['62513LIsNTO','10cBGrdH','sha256','48unqDss','191045NgaZjE','63120kQMCAT','hex','187sDjGhv','update','9iTRKYs','35752VbuGmc','2945316cpXAEx','1179088NGGIVs','path','digest','48jZFNtu','1999578nfuWrE'];a92_0x5e7a=function(){return _0xd9881f;};return a92_0x5e7a();}export function bufferSha256(_0x4a1ef6){const _0x365dab=a92_0x3bef;return createHash(_0x365dab(0xe0))['update'](_0x4a1ef6)[_0x365dab(0xdb)]('hex');}export function fileTreeHash(_0x58cfad){const _0x4f3fc9=a92_0x3bef,_0x30c58e=createHash(_0x4f3fc9(0xe0));for(const _0x4ffaab of normalizeManifestFiles(_0x58cfad)){_0x30c58e['update'](_0x4ffaab[_0x4f3fc9(0xda)]),_0x30c58e[_0x4f3fc9(0xe6)]('\x00'),_0x30c58e[_0x4f3fc9(0xe6)](_0x4ffaab[_0x4f3fc9(0xe0)]),_0x30c58e['update']('\x00'),_0x30c58e['update'](String(_0x4ffaab['size'])),_0x30c58e['update']('\x00');}return _0x30c58e[_0x4f3fc9(0xdb)](_0x4f3fc9(0xe4));}
1
+ (function(_0x3c3664,_0x54c3e6){const _0x4a4f20=a97_0x3512,_0xfc3256=_0x3c3664();while(!![]){try{const _0x15333d=-parseInt(_0x4a4f20(0xbe))/0x1*(parseInt(_0x4a4f20(0xcb))/0x2)+-parseInt(_0x4a4f20(0xc8))/0x3*(parseInt(_0x4a4f20(0xc3))/0x4)+-parseInt(_0x4a4f20(0xc5))/0x5+parseInt(_0x4a4f20(0xc6))/0x6+parseInt(_0x4a4f20(0xca))/0x7+parseInt(_0x4a4f20(0xc4))/0x8+parseInt(_0x4a4f20(0xc1))/0x9;if(_0x15333d===_0x54c3e6)break;else _0xfc3256['push'](_0xfc3256['shift']());}catch(_0x1a8dea){_0xfc3256['push'](_0xfc3256['shift']());}}}(a97_0x2779,0x4e704));function a97_0x3512(_0xe71a76,_0x886760){_0xe71a76=_0xe71a76-0xbe;const _0x277955=a97_0x2779();let _0x3512c6=_0x277955[_0xe71a76];return _0x3512c6;}import{createHash}from'node:crypto';function a97_0x2779(){const _0x6e4fe4=['sha256','hex','7205778PVClSV','path','16naEUJZ','1641640ltnYPs','1926800pqIKCZ','1535460JtaMUg','update','327057SMJSjr','size','2777173kalDsx','32236MATWka','digest','32rnUcMC'];a97_0x2779=function(){return _0x6e4fe4;};return a97_0x2779();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x120b35){const _0x3f42f4=a97_0x3512;return createHash(_0x3f42f4(0xbf))[_0x3f42f4(0xc7)](_0x120b35)[_0x3f42f4(0xcc)](_0x3f42f4(0xc0));}export function fileHash(_0x197a6c){return bufferSha256(fileContent(_0x197a6c));}export function bufferSha256(_0x4f01bc){const _0x1a1f9e=a97_0x3512;return createHash(_0x1a1f9e(0xbf))[_0x1a1f9e(0xc7)](_0x4f01bc)[_0x1a1f9e(0xcc)]('hex');}export function fileTreeHash(_0x569669){const _0x21ef5c=a97_0x3512,_0x435101=createHash(_0x21ef5c(0xbf));for(const _0x352a49 of normalizeManifestFiles(_0x569669)){_0x435101['update'](_0x352a49[_0x21ef5c(0xc2)]),_0x435101[_0x21ef5c(0xc7)]('\x00'),_0x435101[_0x21ef5c(0xc7)](_0x352a49['sha256']),_0x435101['update']('\x00'),_0x435101[_0x21ef5c(0xc7)](String(_0x352a49[_0x21ef5c(0xc9)])),_0x435101[_0x21ef5c(0xc7)]('\x00');}return _0x435101[_0x21ef5c(0xcc)](_0x21ef5c(0xc0));}
@@ -1 +1 @@
1
- (function(_0xebd8a8,_0x40c1f3){const _0x11b413=a93_0x5f42,_0x5c4ac2=_0xebd8a8();while(!![]){try{const _0x55e75b=parseInt(_0x11b413(0x144))/0x1*(-parseInt(_0x11b413(0x134))/0x2)+-parseInt(_0x11b413(0x151))/0x3+parseInt(_0x11b413(0x150))/0x4*(parseInt(_0x11b413(0x138))/0x5)+-parseInt(_0x11b413(0x15b))/0x6+parseInt(_0x11b413(0x15c))/0x7+-parseInt(_0x11b413(0x14a))/0x8+parseInt(_0x11b413(0x14d))/0x9;if(_0x55e75b===_0x40c1f3)break;else _0x5c4ac2['push'](_0x5c4ac2['shift']());}catch(_0x175230){_0x5c4ac2['push'](_0x5c4ac2['shift']());}}}(a93_0x2b5c,0xb5784));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a93_0x5f3da9 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a93_0x5f3da9;function a93_0x5f42(_0x54ec5d,_0xbb4757){_0x54ec5d=_0x54ec5d-0x12f;const _0x2b5ca7=a93_0x2b5c();let _0x5f42a2=_0x2b5ca7[_0x54ec5d];return _0x5f42a2;}export function linkEffectiveRuntimeSkills(_0xa3ba78,_0x40f464,_0x10ec9e={}){const _0x31e314=a93_0x5f42,_0x2ef61b=new Map();for(const _0x5beb06 of _0xa3ba78){const _0x3c87b1=_0x5beb06[_0x31e314(0x156)][_0x31e314(0x13e)];if(!_0x3c87b1)continue;const _0x2b028f=_0x2ef61b['get'](_0x3c87b1);(!_0x2b028f||_0x5beb06[_0x31e314(0x140)]===_0x31e314(0x13a))&&_0x2ef61b[_0x31e314(0x146)](_0x3c87b1,_0x5beb06);}const _0x270d4d=[],_0x1bb601=resolveSkillSyncPaths(_0x10ec9e);for(const _0x1c2913 of _0x2ef61b['values']()){const _0x5a1ea9=requireSkillCode(_0x1c2913[_0x31e314(0x156)]),_0x29e9bc=_0x40f464+'--'+_0x5a1ea9;for(const _0x38236a of[_0x1bb601[_0x31e314(0x145)],_0x1bb601[_0x31e314(0x147)]]){_0x270d4d[_0x31e314(0x14f)](ensureManagedSymlink(resolve(_0x38236a,_0x29e9bc),_0x1c2913[_0x31e314(0x154)],_0x1bb601[_0x31e314(0x15f)]));}}return _0x270d4d;}export function pruneStaleRuntimeSkillLinks(_0x44dbbc,_0x52694b,_0x4880f1={},_0x3a0cd5){const _0x5c7afe=a93_0x5f42,_0x22dee5=resolveSkillSyncPaths(_0x4880f1),_0x200054=new Set([..._0x52694b][_0x5c7afe(0x135)](_0x101d26=>_0x101d26['trim']())[_0x5c7afe(0x143)](Boolean)),_0x50ff0d=_0x3a0cd5?new Set([..._0x3a0cd5][_0x5c7afe(0x135)](_0x412dd0=>_0x412dd0[_0x5c7afe(0x142)]())[_0x5c7afe(0x143)](Boolean)):undefined,_0x3395f8=[];for(const _0x44b297 of[_0x22dee5[_0x5c7afe(0x145)],_0x22dee5['claudeSkillsDir']]){for(const _0x2a585f of managedAppSkillLinkPaths(_0x44b297,_0x44dbbc)){const _0x378a47=basename(_0x2a585f)[_0x5c7afe(0x139)]((_0x44dbbc+'--')['length']);if(_0x50ff0d&&!_0x50ff0d[_0x5c7afe(0x136)](_0x378a47))continue;if(_0x200054['has'](_0x378a47))continue;_0x3395f8['push'](removeManagedSkillLink(_0x2a585f,_0x22dee5[_0x5c7afe(0x15f)]));}}return _0x3395f8;}export function pruneStaleRuntimeSkillCache(_0x3c267b,_0x60fe47={}){const _0x3d370c=a93_0x5f42,_0x42ad4f=new Set([..._0x3c267b[_0x3d370c(0x148)]]['map'](_0x161cc5=>_0x161cc5[_0x3d370c(0x142)]())[_0x3d370c(0x143)](Boolean)),_0x4accae=_0x3c267b[_0x3d370c(0x161)]?new Set([..._0x3c267b[_0x3d370c(0x161)]]['map'](_0x29087c=>_0x29087c[_0x3d370c(0x142)]())['filter'](Boolean)):undefined,_0x4c0079=_0x3c267b[_0x3d370c(0x13f)]??[_0x3d370c(0x13a),_0x3d370c(0x133)],_0x4de131=resolve(getRuntimeSkillCacheRoot(_0x3c267b[_0x3d370c(0x152)],_0x3c267b[_0x3d370c(0x131)],_0x60fe47),safePathSegment(_0x3c267b[_0x3d370c(0x159)],_0x3d370c(0x159))),_0x326748=[];for(const _0x1ca78d of _0x4c0079){const _0x37192c=resolve(_0x4de131,_0x1ca78d);if(!existsSync(_0x37192c))continue;for(const _0x265efd of readdirSync(_0x37192c,{'withFileTypes':!![]})){if(!_0x265efd[_0x3d370c(0x158)]())continue;const _0x331c1e=_0x265efd[_0x3d370c(0x12f)];if(_0x4accae&&!_0x4accae[_0x3d370c(0x136)](_0x331c1e))continue;if(_0x42ad4f['has'](_0x331c1e))continue;const _0x4ed469=resolve(_0x37192c,_0x331c1e),_0x1a994b=readMetadataIfPresent(resolve(_0x4ed469,METADATA_FILE));if(_0x1a994b?.['appCode']!==_0x3c267b[_0x3d370c(0x159)]||_0x1a994b[_0x3d370c(0x140)]!==_0x1ca78d||_0x1a994b[_0x3d370c(0x13e)]!==_0x331c1e){_0x326748['push']({'path':_0x4ed469,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x4ed469),_0x326748['push']({'path':_0x4ed469,'action':_0x3d370c(0x15d)});}}return _0x326748;}export function linkGlobalRuntimeSkills(_0xfffe31,_0x12b75e={}){const _0x30d679=a93_0x5f42,_0x142e3a=resolveSkillSyncPaths(_0x12b75e),_0x1e82dc=[];for(const _0x4a98c0 of _0xfffe31){if(_0x4a98c0['scope']!==_0x30d679(0x160))throw CliErrors[_0x30d679(0x157)](_0x30d679(0x130)+_0x4a98c0['scope']);const _0xe93007=requireSkillCode(_0x4a98c0[_0x30d679(0x156)]),_0x558f67=copyManagedSkillDirectory(_0x4a98c0[_0x30d679(0x154)],resolve(_0x142e3a['agentsSkillsDir'],_0xe93007));_0x1e82dc[_0x30d679(0x14f)]({..._0x558f67,'contentHash':_0x4a98c0[_0x30d679(0x15a)]});}return _0x1e82dc;}function ensureManagedSymlink(_0x201ccd,_0x4cab84,_0x41174f){const _0x2c343f=a93_0x5f42;mkdirSync(dirname(_0x201ccd),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x201ccd)||isDanglingSymlink(_0x201ccd)){const _0x49325e=lstatSync(_0x201ccd);if(!_0x49325e[_0x2c343f(0x14b)]())throw CliErrors[_0x2c343f(0x157)](_0x2c343f(0x13b)+_0x201ccd);const _0x41ee54=resolveSymlinkTarget(_0x201ccd);if(!isPathInside(realOrResolved(_0x41ee54),realOrResolved(_0x41174f)))throw CliErrors[_0x2c343f(0x157)](_0x2c343f(0x15e)+_0x201ccd);if(realOrResolved(_0x41ee54)===realOrResolved(_0x4cab84))return{'path':_0x201ccd,'target':_0x4cab84,'action':_0x2c343f(0x14c)};return unlinkSync(_0x201ccd),symlinkSync(_0x4cab84,_0x201ccd,'dir'),{'path':_0x201ccd,'target':_0x4cab84,'action':_0x2c343f(0x14e)};}return symlinkSync(_0x4cab84,_0x201ccd,'dir'),{'path':_0x201ccd,'target':_0x4cab84,'action':_0x2c343f(0x155)};}function managedAppSkillLinkPaths(_0x3690ef,_0x135a7c){const _0x47e41a=a93_0x5f42;if(!existsSync(_0x3690ef))return[];const _0x20ecc0=_0x135a7c+'--';return readdirSync(_0x3690ef,{'withFileTypes':!![]})[_0x47e41a(0x143)](_0x2356eb=>_0x2356eb[_0x47e41a(0x12f)][_0x47e41a(0x149)](_0x20ecc0))[_0x47e41a(0x135)](_0x23ef35=>resolve(_0x3690ef,_0x23ef35['name']));}function a93_0x2b5c(){const _0x3f41f5=['builtin','pruneSkillCodes','name','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','accessKey','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','company','610nuAUuS','map','has','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','5zYpEZZ','slice','personal','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','skillCode','scopes','scope','external-symlink','trim','filter','2878plNgkP','agentsSkillsDir','set','claudeSkillsDir','activeSkillCodes','startsWith','3930856MOdBMJ','isSymbolicLink','unchanged','12074823KVOaZx','updated','push','3890324UhSQeN','1319109LODdLh','env','skipped','dir','created','skill','validation','isDirectory','appCode','contentHash','7073934cAaFZy','9918377aLEisp','removed','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','managedRoot'];a93_0x2b5c=function(){return _0x3f41f5;};return a93_0x2b5c();}function removeManagedSkillLink(_0x529818,_0x50f3a2){const _0x24aafa=a93_0x5f42,_0x2fc8df=lstatIfPresent(_0x529818);if(!_0x2fc8df?.[_0x24aafa(0x14b)]())return{'path':_0x529818,'action':_0x24aafa(0x153),'reason':'not-managed-symlink'};const _0x4b9e6c=resolveSymlinkTarget(_0x529818);if(!isPathInside(realOrResolved(_0x4b9e6c),realOrResolved(_0x50f3a2)))return{'path':_0x529818,'action':_0x24aafa(0x153),'reason':_0x24aafa(0x141)};return unlinkSync(_0x529818),{'path':_0x529818,'action':_0x24aafa(0x15d)};}export function copyManagedSkillDirectory(_0x365b8d,_0x1611ae){const _0x1dbb85=a93_0x5f42,_0x2e137a=resolve(_0x1611ae,METADATA_FILE),_0x2b69b5=existsSync(_0x1611ae);if(_0x2b69b5){const _0x53878a=lstatSync(_0x1611ae);if(_0x53878a[_0x1dbb85(0x14b)]())throw CliErrors[_0x1dbb85(0x157)](_0x1dbb85(0x13c)+_0x1611ae);if(!_0x53878a[_0x1dbb85(0x158)]())throw CliErrors[_0x1dbb85(0x157)](_0x1dbb85(0x137)+_0x1611ae);const _0x4ee0ac=readMetadataIfPresent(_0x2e137a);if(_0x4ee0ac?.[_0x1dbb85(0x140)]!=='builtin')throw CliErrors[_0x1dbb85(0x157)](_0x1dbb85(0x13d)+_0x1611ae);}ensureDirSync(dirname(_0x1611ae));const _0x2960e0=_0x2b69b5?readMetadataIfPresent(_0x2e137a)?.[_0x1dbb85(0x15a)]:undefined,_0x263716=readMetadataIfPresent(resolve(_0x365b8d,METADATA_FILE))?.[_0x1dbb85(0x15a)];return _0x2b69b5&&removeSync(_0x1611ae),copySkillDirectory(_0x365b8d,_0x1611ae),{'path':_0x1611ae,'target':_0x365b8d,'action':!_0x2b69b5?_0x1dbb85(0x155):_0x2960e0===_0x263716?'unchanged':'updated'};}function copySkillDirectory(_0x520121,_0x12d6ea){copySync(_0x520121,_0x12d6ea,{'dereference':![],'overwrite':!![],'filter'(_0x3b38db){const _0x2efed5=a93_0x5f42;if(lstatSync(_0x3b38db)[_0x2efed5(0x14b)]())throw CliErrors[_0x2efed5(0x157)](_0x2efed5(0x132)+_0x3b38db);return!![];}});}
1
+ (function(_0x132a08,_0xba5012){const _0x5aab36=a98_0x2e26,_0xf3f9f9=_0x132a08();while(!![]){try{const _0x94d88f=-parseInt(_0x5aab36(0x1e8))/0x1*(-parseInt(_0x5aab36(0x1ed))/0x2)+parseInt(_0x5aab36(0x1f0))/0x3+-parseInt(_0x5aab36(0x1fb))/0x4+parseInt(_0x5aab36(0x1e2))/0x5*(parseInt(_0x5aab36(0x1e7))/0x6)+-parseInt(_0x5aab36(0x1e4))/0x7*(parseInt(_0x5aab36(0x1fa))/0x8)+parseInt(_0x5aab36(0x200))/0x9+parseInt(_0x5aab36(0x1f9))/0xa;if(_0x94d88f===_0xba5012)break;else _0xf3f9f9['push'](_0xf3f9f9['shift']());}catch(_0x154af4){_0xf3f9f9['push'](_0xf3f9f9['shift']());}}}(a98_0x576d,0x7c100));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';function a98_0x576d(){const _0x2aa29b=['validation','9224320ErYhvN','134440nvatEL','3419008mvHDDa','name','accessKey','set','skipped','2376702yMNcCk','personal','created','contentHash','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','scope','map','removed','dir','pruneSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','managedRoot','get','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','updated','trim','claudeSkillsDir','builtin','isSymbolicLink','metadata-mismatch','5SKVqxf','skill','385pAPjUQ','has','isDirectory','239262BFGOUw','1366RYvZkU','appCode','values','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','filter','362jmDtoQ','slice','scopes','2440662CkwSNU','unchanged','push','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','agentsSkillsDir','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','env','skillCode'];a98_0x576d=function(){return _0x2aa29b;};return a98_0x576d();}import a98_0x2c4dbb from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x2c4dbb;export function linkEffectiveRuntimeSkills(_0x13c661,_0x569927,_0x20e02b={}){const _0x3cc6d8=a98_0x2e26,_0x5de39a=new Map();for(const _0x24c19b of _0x13c661){const _0x188653=_0x24c19b['skill'][_0x3cc6d8(0x1f7)];if(!_0x188653)continue;const _0x312eb2=_0x5de39a[_0x3cc6d8(0x20c)](_0x188653);(!_0x312eb2||_0x24c19b[_0x3cc6d8(0x205)]===_0x3cc6d8(0x201))&&_0x5de39a[_0x3cc6d8(0x1fe)](_0x188653,_0x24c19b);}const _0x17b555=[],_0x761e8a=resolveSkillSyncPaths(_0x20e02b);for(const _0x468b61 of _0x5de39a[_0x3cc6d8(0x1ea)]()){const _0x183dfc=requireSkillCode(_0x468b61['skill']),_0x53d13f=_0x569927+'--'+_0x183dfc;for(const _0x11a568 of[_0x761e8a[_0x3cc6d8(0x1f4)],_0x761e8a[_0x3cc6d8(0x1de)]]){_0x17b555[_0x3cc6d8(0x1f2)](ensureManagedSymlink(resolve(_0x11a568,_0x53d13f),_0x468b61[_0x3cc6d8(0x208)],_0x761e8a[_0x3cc6d8(0x20b)]));}}return _0x17b555;}export function pruneStaleRuntimeSkillLinks(_0x2e13c7,_0x5f4a23,_0x4b535a={},_0x2eaf13){const _0x4b5257=a98_0x2e26,_0x4e33af=resolveSkillSyncPaths(_0x4b535a),_0x401811=new Set([..._0x5f4a23][_0x4b5257(0x206)](_0x39fe43=>_0x39fe43[_0x4b5257(0x20f)]())['filter'](Boolean)),_0x321c42=_0x2eaf13?new Set([..._0x2eaf13][_0x4b5257(0x206)](_0x3fbb65=>_0x3fbb65['trim']())[_0x4b5257(0x1ec)](Boolean)):undefined,_0x195cfc=[];for(const _0x292286 of[_0x4e33af[_0x4b5257(0x1f4)],_0x4e33af[_0x4b5257(0x1de)]]){for(const _0xb4b6a6 of managedAppSkillLinkPaths(_0x292286,_0x2e13c7)){const _0x1b6251=basename(_0xb4b6a6)[_0x4b5257(0x1ee)]((_0x2e13c7+'--')['length']);if(_0x321c42&&!_0x321c42[_0x4b5257(0x1e5)](_0x1b6251))continue;if(_0x401811['has'](_0x1b6251))continue;_0x195cfc[_0x4b5257(0x1f2)](removeManagedSkillLink(_0xb4b6a6,_0x4e33af['managedRoot']));}}return _0x195cfc;}export function pruneStaleRuntimeSkillCache(_0x3afa9f,_0x4920ef={}){const _0x2f8273=a98_0x2e26,_0x46c999=new Set([..._0x3afa9f['activeSkillCodes']][_0x2f8273(0x206)](_0x11bc73=>_0x11bc73[_0x2f8273(0x20f)]())[_0x2f8273(0x1ec)](Boolean)),_0x28af20=_0x3afa9f[_0x2f8273(0x209)]?new Set([..._0x3afa9f[_0x2f8273(0x209)]][_0x2f8273(0x206)](_0x5d3cac=>_0x5d3cac['trim']())[_0x2f8273(0x1ec)](Boolean)):undefined,_0x4a01c0=_0x3afa9f[_0x2f8273(0x1ef)]??[_0x2f8273(0x201),'company'],_0x108bfd=resolve(getRuntimeSkillCacheRoot(_0x3afa9f[_0x2f8273(0x1f6)],_0x3afa9f[_0x2f8273(0x1fd)],_0x4920ef),safePathSegment(_0x3afa9f['appCode'],_0x2f8273(0x1e9))),_0x3b1143=[];for(const _0x45e443 of _0x4a01c0){const _0x24d116=resolve(_0x108bfd,_0x45e443);if(!existsSync(_0x24d116))continue;for(const _0x822b13 of readdirSync(_0x24d116,{'withFileTypes':!![]})){if(!_0x822b13[_0x2f8273(0x1e6)]())continue;const _0xe7e121=_0x822b13[_0x2f8273(0x1fc)];if(_0x28af20&&!_0x28af20[_0x2f8273(0x1e5)](_0xe7e121))continue;if(_0x46c999[_0x2f8273(0x1e5)](_0xe7e121))continue;const _0x15b4d2=resolve(_0x24d116,_0xe7e121),_0x37c7f3=readMetadataIfPresent(resolve(_0x15b4d2,METADATA_FILE));if(_0x37c7f3?.['appCode']!==_0x3afa9f['appCode']||_0x37c7f3[_0x2f8273(0x205)]!==_0x45e443||_0x37c7f3[_0x2f8273(0x1f7)]!==_0xe7e121){_0x3b1143[_0x2f8273(0x1f2)]({'path':_0x15b4d2,'action':_0x2f8273(0x1ff),'reason':_0x2f8273(0x1e1)});continue;}removeSync(_0x15b4d2),_0x3b1143[_0x2f8273(0x1f2)]({'path':_0x15b4d2,'action':_0x2f8273(0x207)});}}return _0x3b1143;}export function linkGlobalRuntimeSkills(_0x3115bd,_0x1bec04={}){const _0x3ae28c=a98_0x2e26,_0x58c4a4=resolveSkillSyncPaths(_0x1bec04),_0x32324a=[];for(const _0x18c569 of _0x3115bd){if(_0x18c569['scope']!==_0x3ae28c(0x1df))throw CliErrors[_0x3ae28c(0x1f8)](_0x3ae28c(0x1f3)+_0x18c569[_0x3ae28c(0x205)]);const _0x150c7a=requireSkillCode(_0x18c569[_0x3ae28c(0x1e3)]),_0x3001da=copyManagedSkillDirectory(_0x18c569['dir'],resolve(_0x58c4a4[_0x3ae28c(0x1f4)],_0x150c7a));_0x32324a[_0x3ae28c(0x1f2)]({..._0x3001da,'contentHash':_0x18c569[_0x3ae28c(0x203)]});}return _0x32324a;}function ensureManagedSymlink(_0x3f1cc7,_0x5ae6ed,_0x58cf08){const _0x5b89eb=a98_0x2e26;mkdirSync(dirname(_0x3f1cc7),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3f1cc7)||isDanglingSymlink(_0x3f1cc7)){const _0x2a0168=lstatSync(_0x3f1cc7);if(!_0x2a0168[_0x5b89eb(0x1e0)]())throw CliErrors[_0x5b89eb(0x1f8)](_0x5b89eb(0x1eb)+_0x3f1cc7);const _0x1b986c=resolveSymlinkTarget(_0x3f1cc7);if(!isPathInside(realOrResolved(_0x1b986c),realOrResolved(_0x58cf08)))throw CliErrors[_0x5b89eb(0x1f8)](_0x5b89eb(0x20d)+_0x3f1cc7);if(realOrResolved(_0x1b986c)===realOrResolved(_0x5ae6ed))return{'path':_0x3f1cc7,'target':_0x5ae6ed,'action':_0x5b89eb(0x1f1)};return unlinkSync(_0x3f1cc7),symlinkSync(_0x5ae6ed,_0x3f1cc7,_0x5b89eb(0x208)),{'path':_0x3f1cc7,'target':_0x5ae6ed,'action':'updated'};}return symlinkSync(_0x5ae6ed,_0x3f1cc7,_0x5b89eb(0x208)),{'path':_0x3f1cc7,'target':_0x5ae6ed,'action':'created'};}function a98_0x2e26(_0x4bb9f1,_0x1ba6be){_0x4bb9f1=_0x4bb9f1-0x1de;const _0x576de3=a98_0x576d();let _0x2e2600=_0x576de3[_0x4bb9f1];return _0x2e2600;}function managedAppSkillLinkPaths(_0x5edf9f,_0x52d997){const _0x4b14cd=a98_0x2e26;if(!existsSync(_0x5edf9f))return[];const _0x1ca9b5=_0x52d997+'--';return readdirSync(_0x5edf9f,{'withFileTypes':!![]})['filter'](_0x1dbb31=>_0x1dbb31[_0x4b14cd(0x1fc)]['startsWith'](_0x1ca9b5))[_0x4b14cd(0x206)](_0x2b573f=>resolve(_0x5edf9f,_0x2b573f['name']));}function removeManagedSkillLink(_0x2812f1,_0x14b0ba){const _0x231372=a98_0x2e26,_0x288af0=lstatIfPresent(_0x2812f1);if(!_0x288af0?.[_0x231372(0x1e0)]())return{'path':_0x2812f1,'action':'skipped','reason':'not-managed-symlink'};const _0x114ce5=resolveSymlinkTarget(_0x2812f1);if(!isPathInside(realOrResolved(_0x114ce5),realOrResolved(_0x14b0ba)))return{'path':_0x2812f1,'action':_0x231372(0x1ff),'reason':'external-symlink'};return unlinkSync(_0x2812f1),{'path':_0x2812f1,'action':'removed'};}export function copyManagedSkillDirectory(_0x57a852,_0x923f58){const _0x1770d0=a98_0x2e26,_0x9b5dd5=resolve(_0x923f58,METADATA_FILE),_0xc7fd84=existsSync(_0x923f58);if(_0xc7fd84){const _0x580d0f=lstatSync(_0x923f58);if(_0x580d0f[_0x1770d0(0x1e0)]())throw CliErrors[_0x1770d0(0x1f8)](_0x1770d0(0x204)+_0x923f58);if(!_0x580d0f[_0x1770d0(0x1e6)]())throw CliErrors[_0x1770d0(0x1f8)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x923f58);const _0x303341=readMetadataIfPresent(_0x9b5dd5);if(_0x303341?.['scope']!==_0x1770d0(0x1df))throw CliErrors[_0x1770d0(0x1f8)](_0x1770d0(0x20a)+_0x923f58);}ensureDirSync(dirname(_0x923f58));const _0x3ef7f8=_0xc7fd84?readMetadataIfPresent(_0x9b5dd5)?.['contentHash']:undefined,_0x446f62=readMetadataIfPresent(resolve(_0x57a852,METADATA_FILE))?.['contentHash'];return _0xc7fd84&&removeSync(_0x923f58),copySkillDirectory(_0x57a852,_0x923f58),{'path':_0x923f58,'target':_0x57a852,'action':!_0xc7fd84?_0x1770d0(0x202):_0x3ef7f8===_0x446f62?_0x1770d0(0x1f1):_0x1770d0(0x20e)};}function copySkillDirectory(_0x12480f,_0xbbf060){copySync(_0x12480f,_0xbbf060,{'dereference':![],'overwrite':!![],'filter'(_0x280b64){const _0x355f99=a98_0x2e26;if(lstatSync(_0x280b64)['isSymbolicLink']())throw CliErrors[_0x355f99(0x1f8)](_0x355f99(0x1f5)+_0x280b64);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x51dda0,_0xd9fde2){const _0x6ba0e5=a94_0x4a15,_0x2a71a3=_0x51dda0();while(!![]){try{const _0x51a7ae=parseInt(_0x6ba0e5(0x18c))/0x1*(parseInt(_0x6ba0e5(0x193))/0x2)+-parseInt(_0x6ba0e5(0x18d))/0x3+-parseInt(_0x6ba0e5(0x1a3))/0x4+-parseInt(_0x6ba0e5(0x194))/0x5*(parseInt(_0x6ba0e5(0x18f))/0x6)+-parseInt(_0x6ba0e5(0x1a2))/0x7*(-parseInt(_0x6ba0e5(0x19b))/0x8)+-parseInt(_0x6ba0e5(0x192))/0x9+-parseInt(_0x6ba0e5(0x197))/0xa*(-parseInt(_0x6ba0e5(0x18a))/0xb);if(_0x51a7ae===_0xd9fde2)break;else _0x2a71a3['push'](_0x2a71a3['shift']());}catch(_0xb77cdb){_0x2a71a3['push'](_0x2a71a3['shift']());}}}(a94_0x232f,0x3f262));function a94_0x4a15(_0x3a695f,_0x498ddb){_0x3a695f=_0x3a695f-0x189;const _0x232fae=a94_0x232f();let _0x4a1521=_0x232fae[_0x3a695f];return _0x4a1521;}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a94_0x232f(){const _0x256922=['364420MZQTCu','linkedPaths','cache','trim','get','tags','accessKey','dir','isDirectory','isSymbolicLink','name','values','startsWith','claudeSkillsDir','code','filter','local','env','push','set','map','11HtumSl','appCode','262vQrOLt','334923rDWGXg','cacheDir','30npcNhL','scopes','skillCode','3472290ypbQuA','758AgRmpj','298545hATJzZ','scope','metadataPath','7098610Ykrexz','link','agentsSkillsDir','builtin','144HbUmVf','source','has','sort','localeCompare','linkedPath','isArray','130900cNRvex'];a94_0x232f=function(){return _0x256922;};return a94_0x232f();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x1efa65,_0x1f0dfd={}){const _0x3c9c7d=a94_0x4a15,_0x2d0297=safePathSegment(_0x1efa65[_0x3c9c7d(0x18b)],_0x3c9c7d(0x18b)),_0x338b45=normalizeRuntimeSkillScopes(_0x1efa65[_0x3c9c7d(0x190)]),_0x5360c4=new Set(_0x338b45),_0x4211f9=_0x1efa65['code']?.[_0x3c9c7d(0x1a6)](),_0x26554f=new Map(),_0x3349cc=resolve(getRuntimeSkillCacheRoot(_0x1efa65[_0x3c9c7d(0x1b4)],_0x1efa65[_0x3c9c7d(0x1a9)],_0x1f0dfd),_0x2d0297);for(const _0x3bbc03 of _0x338b45){for(const _0x280102 of localSkillEntryDirs(resolve(_0x3349cc,_0x3bbc03))){collectLocalRuntimeSkill(_0x26554f,_0x280102,{'appCode':_0x2d0297,'scopes':_0x5360c4,'code':_0x4211f9,'source':'cache'});}}const _0x53e9fc=resolveSkillSyncPaths(_0x1f0dfd);for(const _0x3ceeb9 of[_0x53e9fc[_0x3c9c7d(0x199)],_0x53e9fc[_0x3c9c7d(0x1b0)]]){for(const _0x541e00 of localSkillLinkCandidates(_0x3ceeb9,_0x2d0297,_0x5360c4)){collectLocalRuntimeSkill(_0x26554f,_0x541e00,{'appCode':_0x2d0297,'scopes':_0x5360c4,'code':_0x4211f9,'source':_0x3c9c7d(0x198),'linkedPath':_0x541e00});}}return Array['from'](_0x26554f[_0x3c9c7d(0x1ae)]())[_0x3c9c7d(0x19e)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x551904){const _0x3bb1c8=a94_0x4a15;if(!existsSync(_0x551904))return[];return readdirSync(_0x551904,{'withFileTypes':!![]})[_0x3bb1c8(0x1b2)](_0x5e7891=>_0x5e7891[_0x3bb1c8(0x1ab)]()||_0x5e7891[_0x3bb1c8(0x1ac)]())['map'](_0x4d02d2=>resolve(_0x551904,_0x4d02d2[_0x3bb1c8(0x1ad)]));}function localSkillLinkCandidates(_0x14454b,_0xe18aca,_0x288220){const _0x1bcb1e=a94_0x4a15;if(!existsSync(_0x14454b))return[];const _0x4feca0=_0xe18aca+'--';return readdirSync(_0x14454b,{'withFileTypes':!![]})[_0x1bcb1e(0x1b2)](_0x1ca3eb=>_0x1ca3eb[_0x1bcb1e(0x1ab)]()||_0x1ca3eb[_0x1bcb1e(0x1ac)]())['filter'](_0x26dc27=>_0x26dc27[_0x1bcb1e(0x1ad)][_0x1bcb1e(0x1af)](_0x4feca0)||_0x288220[_0x1bcb1e(0x19d)](_0x1bcb1e(0x19a)))[_0x1bcb1e(0x189)](_0xeb5bf2=>resolve(_0x14454b,_0xeb5bf2[_0x1bcb1e(0x1ad)]));}function collectLocalRuntimeSkill(_0x85b395,_0xf92cff,_0x2dbc8e){const _0x32c580=a94_0x4a15,_0x33a9bd=resolve(_0xf92cff,METADATA_FILE),_0x384566=readMetadataIfPresent(_0x33a9bd);if(!_0x384566)return;if(_0x384566[_0x32c580(0x18b)]!==_0x2dbc8e[_0x32c580(0x18b)])return;if(!isRuntimeSkillScope(_0x384566['scope'])||!_0x2dbc8e[_0x32c580(0x190)]['has'](_0x384566[_0x32c580(0x195)]))return;const _0x55f7a4=_0x384566[_0x32c580(0x191)]?.[_0x32c580(0x1a6)]();if(!_0x55f7a4)return;if(_0x2dbc8e[_0x32c580(0x1b1)]&&_0x55f7a4!==_0x2dbc8e['code'])return;const _0x4bea78=_0x384566[_0x32c580(0x195)]+':'+_0x55f7a4,_0x1e5cce=_0x2dbc8e[_0x32c580(0x1a0)]?[_0x2dbc8e['linkedPath']]:[],_0x458df8=_0x85b395[_0x32c580(0x1a7)](_0x4bea78);if(_0x458df8){_0x2dbc8e[_0x32c580(0x19c)]===_0x32c580(0x1a5)&&(_0x458df8[_0x32c580(0x1aa)]=_0xf92cff,_0x458df8[_0x32c580(0x18e)]=_0xf92cff,_0x458df8['skillMdPath']=resolve(_0xf92cff,SKILL_FILE),_0x458df8[_0x32c580(0x196)]=_0x33a9bd);for(const _0x2b868a of _0x1e5cce){!_0x458df8['linkedPaths']['includes'](_0x2b868a)&&_0x458df8[_0x32c580(0x1a4)][_0x32c580(0x1b5)](_0x2b868a);}_0x458df8[_0x32c580(0x1a4)]['sort']();return;}_0x85b395[_0x32c580(0x1b6)](_0x4bea78,{..._0x384566,'tags':Array[_0x32c580(0x1a1)](_0x384566['tags'])?_0x384566[_0x32c580(0x1a8)]:[],'scope':_0x384566[_0x32c580(0x195)],'source':_0x32c580(0x1b3),'dir':_0xf92cff,'cacheDir':_0x2dbc8e[_0x32c580(0x19c)]===_0x32c580(0x1a5)?_0xf92cff:undefined,'skillMdPath':resolve(_0xf92cff,SKILL_FILE),'metadataPath':_0x33a9bd,'linkedPaths':_0x1e5cce});}function compareLocalRuntimeSkills(_0x2fddff,_0xed66dc){const _0x112974=a94_0x4a15,_0x5af0ba={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5af0ba[_0x2fddff['scope']]-_0x5af0ba[_0xed66dc[_0x112974(0x195)]]||_0x2fddff[_0x112974(0x191)][_0x112974(0x19f)](_0xed66dc[_0x112974(0x191)])||_0x2fddff[_0x112974(0x1aa)][_0x112974(0x19f)](_0xed66dc[_0x112974(0x1aa)]);}
1
+ (function(_0x7e7855,_0x546277){const _0x39a405=a99_0x3d5e,_0x43e6fb=_0x7e7855();while(!![]){try{const _0x2d7245=parseInt(_0x39a405(0x1bd))/0x1*(-parseInt(_0x39a405(0x1cd))/0x2)+parseInt(_0x39a405(0x1b7))/0x3+-parseInt(_0x39a405(0x1d5))/0x4+-parseInt(_0x39a405(0x1d9))/0x5+parseInt(_0x39a405(0x1cc))/0x6*(-parseInt(_0x39a405(0x1b3))/0x7)+-parseInt(_0x39a405(0x1d4))/0x8*(parseInt(_0x39a405(0x1dc))/0x9)+-parseInt(_0x39a405(0x1c4))/0xa*(-parseInt(_0x39a405(0x1bb))/0xb);if(_0x2d7245===_0x546277)break;else _0x43e6fb['push'](_0x43e6fb['shift']());}catch(_0x18ce1f){_0x43e6fb['push'](_0x43e6fb['shift']());}}}(a99_0x30e9,0x2d392));function a99_0x3d5e(_0x48acfd,_0x4072cb){_0x48acfd=_0x48acfd-0x1b1;const _0x30e90c=a99_0x30e9();let _0x3d5eab=_0x30e90c[_0x48acfd];return _0x3d5eab;}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,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a99_0x30e9(){const _0x957d4=['sort','map','skillCode','1616745UPuTfg','metadataPath','scopes','16470QIErtQ','has','values','28JuyErP','dir','filter','trim','190719YifTGP','env','isDirectory','from','9669ylIeCm','name','2QuXYYh','link','skillMdPath','linkedPath','cache','isSymbolicLink','push','16070jCEwaE','isArray','set','claudeSkillsDir','localeCompare','includes','appCode','linkedPaths','515076jcNSsW','268442ZVWvvh','scope','source','builtin','cacheDir','tags','code','480qfOSUa','983668SQveFE'];a99_0x30e9=function(){return _0x957d4;};return a99_0x30e9();}export function listLocalRuntimeSkills(_0x2c02c9,_0x395fa1={}){const _0x5296e4=a99_0x3d5e,_0x4e5f1f=safePathSegment(_0x2c02c9['appCode'],_0x5296e4(0x1ca)),_0x30ec82=normalizeRuntimeSkillScopes(_0x2c02c9[_0x5296e4(0x1db)]),_0x3f7b56=new Set(_0x30ec82),_0x508799=_0x2c02c9[_0x5296e4(0x1d3)]?.[_0x5296e4(0x1b6)](),_0x34f9ae=new Map(),_0x224e02=resolve(getRuntimeSkillCacheRoot(_0x2c02c9[_0x5296e4(0x1b8)],_0x2c02c9['accessKey'],_0x395fa1),_0x4e5f1f);for(const _0x3d4fa8 of _0x30ec82){for(const _0x240bf0 of localSkillEntryDirs(resolve(_0x224e02,_0x3d4fa8))){collectLocalRuntimeSkill(_0x34f9ae,_0x240bf0,{'appCode':_0x4e5f1f,'scopes':_0x3f7b56,'code':_0x508799,'source':_0x5296e4(0x1c1)});}}const _0x414f9b=resolveSkillSyncPaths(_0x395fa1);for(const _0x5c70eb of[_0x414f9b['agentsSkillsDir'],_0x414f9b[_0x5296e4(0x1c7)]]){for(const _0x25fdd4 of localSkillLinkCandidates(_0x5c70eb,_0x4e5f1f,_0x3f7b56)){collectLocalRuntimeSkill(_0x34f9ae,_0x25fdd4,{'appCode':_0x4e5f1f,'scopes':_0x3f7b56,'code':_0x508799,'source':_0x5296e4(0x1be),'linkedPath':_0x25fdd4});}}return Array[_0x5296e4(0x1ba)](_0x34f9ae[_0x5296e4(0x1b2)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x5ab583){const _0x46719c=a99_0x3d5e;if(!existsSync(_0x5ab583))return[];return readdirSync(_0x5ab583,{'withFileTypes':!![]})[_0x46719c(0x1b5)](_0x371847=>_0x371847[_0x46719c(0x1b9)]()||_0x371847[_0x46719c(0x1c2)]())[_0x46719c(0x1d7)](_0x151052=>resolve(_0x5ab583,_0x151052[_0x46719c(0x1bc)]));}function localSkillLinkCandidates(_0x164407,_0x3d7276,_0x505366){const _0x315100=a99_0x3d5e;if(!existsSync(_0x164407))return[];const _0x13f70f=_0x3d7276+'--';return readdirSync(_0x164407,{'withFileTypes':!![]})[_0x315100(0x1b5)](_0x27b583=>_0x27b583[_0x315100(0x1b9)]()||_0x27b583[_0x315100(0x1c2)]())[_0x315100(0x1b5)](_0x5360bc=>_0x5360bc[_0x315100(0x1bc)]['startsWith'](_0x13f70f)||_0x505366[_0x315100(0x1b1)](_0x315100(0x1d0)))[_0x315100(0x1d7)](_0x226d02=>resolve(_0x164407,_0x226d02[_0x315100(0x1bc)]));}function collectLocalRuntimeSkill(_0x5d0a17,_0x146196,_0x397d4d){const _0x5b864e=a99_0x3d5e,_0x1a26d5=resolve(_0x146196,METADATA_FILE),_0x3c7c2d=readMetadataIfPresent(_0x1a26d5);if(!_0x3c7c2d)return;if(_0x3c7c2d[_0x5b864e(0x1ca)]!==_0x397d4d[_0x5b864e(0x1ca)])return;if(!isRuntimeSkillScope(_0x3c7c2d[_0x5b864e(0x1ce)])||!_0x397d4d[_0x5b864e(0x1db)][_0x5b864e(0x1b1)](_0x3c7c2d[_0x5b864e(0x1ce)]))return;const _0x5c6ddd=_0x3c7c2d['skillCode']?.['trim']();if(!_0x5c6ddd)return;if(_0x397d4d[_0x5b864e(0x1d3)]&&_0x5c6ddd!==_0x397d4d[_0x5b864e(0x1d3)])return;const _0x549593=_0x3c7c2d[_0x5b864e(0x1ce)]+':'+_0x5c6ddd,_0x425bfb=_0x397d4d[_0x5b864e(0x1c0)]?[_0x397d4d[_0x5b864e(0x1c0)]]:[],_0x440ea5=_0x5d0a17['get'](_0x549593);if(_0x440ea5){_0x397d4d[_0x5b864e(0x1cf)]===_0x5b864e(0x1c1)&&(_0x440ea5['dir']=_0x146196,_0x440ea5[_0x5b864e(0x1d1)]=_0x146196,_0x440ea5[_0x5b864e(0x1bf)]=resolve(_0x146196,SKILL_FILE),_0x440ea5[_0x5b864e(0x1da)]=_0x1a26d5);for(const _0x1db35b of _0x425bfb){!_0x440ea5[_0x5b864e(0x1cb)][_0x5b864e(0x1c9)](_0x1db35b)&&_0x440ea5[_0x5b864e(0x1cb)][_0x5b864e(0x1c3)](_0x1db35b);}_0x440ea5[_0x5b864e(0x1cb)][_0x5b864e(0x1d6)]();return;}_0x5d0a17[_0x5b864e(0x1c6)](_0x549593,{..._0x3c7c2d,'tags':Array[_0x5b864e(0x1c5)](_0x3c7c2d[_0x5b864e(0x1d2)])?_0x3c7c2d[_0x5b864e(0x1d2)]:[],'scope':_0x3c7c2d[_0x5b864e(0x1ce)],'source':'local','dir':_0x146196,'cacheDir':_0x397d4d['source']===_0x5b864e(0x1c1)?_0x146196:undefined,'skillMdPath':resolve(_0x146196,SKILL_FILE),'metadataPath':_0x1a26d5,'linkedPaths':_0x425bfb});}function compareLocalRuntimeSkills(_0x59ac37,_0x492deb){const _0x27ae1d=a99_0x3d5e,_0x42e56d={'personal':0x0,'company':0x1,'builtin':0x2};return _0x42e56d[_0x59ac37[_0x27ae1d(0x1ce)]]-_0x42e56d[_0x492deb[_0x27ae1d(0x1ce)]]||_0x59ac37[_0x27ae1d(0x1d8)][_0x27ae1d(0x1c8)](_0x492deb[_0x27ae1d(0x1d8)])||_0x59ac37['dir'][_0x27ae1d(0x1c8)](_0x492deb[_0x27ae1d(0x1b4)]);}
@@ -1 +1 @@
1
- (function(_0x2b3ab1,_0x56f1de){const _0xee546=a95_0x1503,_0x1e6a5f=_0x2b3ab1();while(!![]){try{const _0xf8eb2f=-parseInt(_0xee546(0x11c))/0x1*(-parseInt(_0xee546(0x119))/0x2)+-parseInt(_0xee546(0x12a))/0x3+-parseInt(_0xee546(0x10d))/0x4+parseInt(_0xee546(0x128))/0x5+parseInt(_0xee546(0x121))/0x6*(parseInt(_0xee546(0x120))/0x7)+parseInt(_0xee546(0x122))/0x8*(-parseInt(_0xee546(0x115))/0x9)+parseInt(_0xee546(0x110))/0xa;if(_0xf8eb2f===_0x56f1de)break;else _0x1e6a5f['push'](_0x1e6a5f['shift']());}catch(_0x3535b2){_0x1e6a5f['push'](_0x1e6a5f['shift']());}}}(a95_0x1cd9,0x202f2));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(_0x10263d){const _0x45a838=a95_0x1503;return _0x10263d['bytes']??Buffer['from'](_0x10263d[_0x45a838(0x127)]??'',_0x45a838(0x106));}export function fileText(_0x222cbe){const _0x28e309=a95_0x1503;return fileContent(_0x222cbe)['toString'](_0x28e309(0x106));}function a95_0x1503(_0x5af16b,_0x1458a0){_0x5af16b=_0x5af16b-0xff;const _0x1cd98b=a95_0x1cd9();let _0x1503c4=_0x1cd98b[_0x5af16b];return _0x1503c4;}export function normalizeLocalFiles(_0x14511d){const _0x51365e=a95_0x1503;if(!Array[_0x51365e(0x104)](_0x14511d)||_0x14511d[_0x51365e(0x11e)]===0x0)return[];const _0x2b179d=new Map();for(const _0x3a1bcb of _0x14511d){if(!_0x3a1bcb||typeof _0x3a1bcb!==_0x51365e(0x10b)||typeof _0x3a1bcb[_0x51365e(0x111)]!==_0x51365e(0x101))throw CliErrors[_0x51365e(0x124)](_0x51365e(0x11f));const _0x4c9cf7=normalizeSkillRelativePath(_0x3a1bcb[_0x51365e(0x111)]);if(_0x2b179d[_0x51365e(0x10e)](_0x4c9cf7))throw CliErrors[_0x51365e(0x124)](_0x51365e(0x108)+_0x4c9cf7);if(_0x3a1bcb[_0x51365e(0x114)]!==undefined&&!Buffer[_0x51365e(0x117)](_0x3a1bcb[_0x51365e(0x114)]))throw CliErrors[_0x51365e(0x124)](_0x51365e(0x112)+_0x4c9cf7);if(_0x3a1bcb[_0x51365e(0x114)]===undefined&&typeof _0x3a1bcb[_0x51365e(0x127)]!==_0x51365e(0x101))throw CliErrors[_0x51365e(0x124)](_0x51365e(0x11a)+_0x4c9cf7);const _0x4abe47=fileContent(_0x3a1bcb);_0x2b179d[_0x51365e(0x11d)](_0x4c9cf7,{'path':_0x4c9cf7,'bytes':_0x4abe47});}return Array[_0x51365e(0x125)](_0x2b179d[_0x51365e(0x10f)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3f6d6d){const _0x48fccf=a95_0x1503;if(!Array[_0x48fccf(0x104)](_0x3f6d6d)||_0x3f6d6d[_0x48fccf(0x11e)]===0x0)return[];const _0x28e5d3=new Map();for(const _0x52c187 of _0x3f6d6d){if(!_0x52c187||typeof _0x52c187!==_0x48fccf(0x10b)||typeof _0x52c187[_0x48fccf(0x111)]!==_0x48fccf(0x101))throw CliErrors[_0x48fccf(0x124)](_0x48fccf(0x11f));const _0x11af1a=normalizeSkillRelativePath(_0x52c187[_0x48fccf(0x111)]);if(_0x28e5d3[_0x48fccf(0x10e)](_0x11af1a))throw CliErrors[_0x48fccf(0x124)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x11af1a);if(!isSha256Hex(_0x52c187[_0x48fccf(0x102)]))throw CliErrors[_0x48fccf(0x124)](_0x48fccf(0x107)+_0x11af1a);if(!Number['isSafeInteger'](_0x52c187['size'])||_0x52c187[_0x48fccf(0x116)]<0x0)throw CliErrors[_0x48fccf(0x124)](_0x48fccf(0xff)+_0x11af1a);_0x28e5d3['set'](_0x11af1a,{'path':_0x11af1a,'sha256':_0x52c187[_0x48fccf(0x102)][_0x48fccf(0x113)](),'size':_0x52c187[_0x48fccf(0x116)]});}return Array[_0x48fccf(0x125)](_0x28e5d3['values']())[_0x48fccf(0x103)](compareSkillFiles);}export function scanSkillDirectory(_0x1182ff){const _0x2c0b0f=realpathSync(_0x1182ff),_0x48459d=[];function _0x149e96(_0x1bd125){const _0x1cf245=a95_0x1503,_0x3f2bc1=readdirSync(_0x1bd125,{'withFileTypes':!![]})[_0x1cf245(0x103)]((_0x5e739f,_0x41c618)=>_0x5e739f['name']['localeCompare'](_0x41c618['name']));for(const _0x30b99c of _0x3f2bc1){if(_0x30b99c['isDirectory']()&&IGNORED_DIR_NAMES[_0x1cf245(0x10e)](_0x30b99c[_0x1cf245(0x118)]))continue;if(IGNORED_FILE_NAMES[_0x1cf245(0x10e)](_0x30b99c['name']))continue;const _0x33ecbb=resolve(_0x1bd125,_0x30b99c['name']);if(_0x30b99c['isSymbolicLink']())throw CliErrors['validation']('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x33ecbb);const _0x3b2200=toPosixPath(relative(_0x2c0b0f,_0x33ecbb));if(_0x30b99c[_0x1cf245(0x123)]()){_0x149e96(_0x33ecbb);continue;}if(!_0x30b99c[_0x1cf245(0x10c)]())continue;validateSkillRelativePath(_0x3b2200);const _0x42ecfe=readFileSync(_0x33ecbb);_0x48459d['push']({'path':_0x3b2200,'bytes':_0x42ecfe});}}return _0x149e96(_0x2c0b0f),normalizeLocalFiles(_0x48459d);}export function compareSkillFiles(_0x355d7c,_0x400215){const _0x263515=a95_0x1503;if(_0x355d7c[_0x263515(0x111)]===SKILL_FILE)return _0x400215['path']===SKILL_FILE?0x0:-0x1;if(_0x400215['path']===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x263515(0x125)](_0x355d7c[_0x263515(0x111)],'utf8'),Buffer['from'](_0x400215[_0x263515(0x111)],'utf8'));}export function normalizeSkillRelativePath(_0x2efb54){const _0x414b0d=a95_0x1503,_0x66583f=toPosixPath(_0x2efb54[_0x414b0d(0x10a)]());return validateSkillRelativePath(_0x66583f),_0x66583f;}function a95_0x1cd9(){const _0x1a6e8e=['bytes','135TGUkzh','size','isBuffer','name','2ZUbQSj','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Unsafe\x20Skill\x20file\x20path:\x20','34268OyLjPk','set','length','Skill\x20file\x20path\x20must\x20be\x20text.','896007gaHgrI','6oMERPo','104824DubWSY','isDirectory','validation','from','replace','content','1075965ECXyGF','startsWith','163617TbYmth','Skill\x20file\x20size\x20is\x20invalid:\x20','split','string','sha256','sort','isArray','includes','utf8','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Duplicate\x20Skill\x20file\x20path:\x20','test','trim','object','isFile','412748CGqiGK','has','values','1086350KdmqSt','path','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','toLowerCase'];a95_0x1cd9=function(){return _0x1a6e8e;};return a95_0x1cd9();}export function validateSkillRelativePath(_0x4bde3b){const _0x2f9de7=a95_0x1503;if(!_0x4bde3b||_0x4bde3b[_0x2f9de7(0x129)]('/')||_0x4bde3b[_0x2f9de7(0x105)]('//'))throw CliErrors[_0x2f9de7(0x124)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x4bde3b);for(const _0x4d8ee3 of _0x4bde3b[_0x2f9de7(0x100)]('/')){if(!_0x4d8ee3||_0x4d8ee3==='.'||_0x4d8ee3==='..')throw CliErrors[_0x2f9de7(0x124)](_0x2f9de7(0x11b)+_0x4bde3b);}}export function toPosixPath(_0x29410d){const _0x518ac7=a95_0x1503;return _0x29410d[_0x518ac7(0x126)](/\\/g,'/');}export function isSha256Hex(_0x5e547f){const _0x5ab3bc=a95_0x1503;return typeof _0x5e547f===_0x5ab3bc(0x101)&&/^[a-fA-F0-9]{64}$/[_0x5ab3bc(0x109)](_0x5e547f);}
1
+ function a100_0x44d1(){const _0x26805e=['content','toString','bytes','localeCompare','isSafeInteger','push','isDirectory','5404044KjTtck','Duplicate\x20Skill\x20file\x20path:\x20','compare','5rIkwaM','isBuffer','10kDTMkR','validation','49bDfBby','969wLewbB','includes','set','startsWith','1634exNLEc','isArray','Skill\x20file\x20path\x20must\x20be\x20text.','16vUNZyu','sha256','size','Unsafe\x20Skill\x20file\x20path:\x20','utf8','279068FyMpbs','sort','name','439038CdjPbo','has','object','path','string','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','208038FOvTLG','replace','length','toLowerCase','2799005CNBkUq','Skill\x20file\x20sha256\x20is\x20invalid:\x20','values','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','from','Skill\x20file\x20size\x20is\x20invalid:\x20','37093vUpFOb','split'];a100_0x44d1=function(){return _0x26805e;};return a100_0x44d1();}(function(_0xb7cde9,_0x3907c0){const _0x4476a3=a100_0x4de4,_0x57e15d=_0xb7cde9();while(!![]){try{const _0x1c4612=parseInt(_0x4476a3(0x109))/0x1+parseInt(_0x4476a3(0x11e))/0x2*(-parseInt(_0x4476a3(0x11a))/0x3)+-parseInt(_0x4476a3(0x126))/0x4*(-parseInt(_0x4476a3(0x115))/0x5)+-parseInt(_0x4476a3(0xff))/0x6*(parseInt(_0x4476a3(0x119))/0x7)+-parseInt(_0x4476a3(0x121))/0x8*(parseInt(_0x4476a3(0xf9))/0x9)+-parseInt(_0x4476a3(0x117))/0xa*(-parseInt(_0x4476a3(0x103))/0xb)+parseInt(_0x4476a3(0x112))/0xc;if(_0x1c4612===_0x3907c0)break;else _0x57e15d['push'](_0x57e15d['shift']());}catch(_0x23430a){_0x57e15d['push'](_0x57e15d['shift']());}}}(a100_0x44d1,0x32a7e));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(_0x127f7b){const _0x3945d9=a100_0x4de4;return _0x127f7b[_0x3945d9(0x10d)]??Buffer[_0x3945d9(0x107)](_0x127f7b[_0x3945d9(0x10b)]??'',_0x3945d9(0x125));}export function fileText(_0x9dbc96){const _0x3243cf=a100_0x4de4;return fileContent(_0x9dbc96)[_0x3243cf(0x10c)](_0x3243cf(0x125));}export function normalizeLocalFiles(_0x2959ab){const _0x3ef574=a100_0x4de4;if(!Array[_0x3ef574(0x11f)](_0x2959ab)||_0x2959ab[_0x3ef574(0x101)]===0x0)return[];const _0x4ff41d=new Map();for(const _0x2234a6 of _0x2959ab){if(!_0x2234a6||typeof _0x2234a6!==_0x3ef574(0xfb)||typeof _0x2234a6[_0x3ef574(0xfc)]!==_0x3ef574(0xfd))throw CliErrors[_0x3ef574(0x118)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x16f990=normalizeSkillRelativePath(_0x2234a6['path']);if(_0x4ff41d[_0x3ef574(0xfa)](_0x16f990))throw CliErrors['validation'](_0x3ef574(0x113)+_0x16f990);if(_0x2234a6[_0x3ef574(0x10d)]!==undefined&&!Buffer[_0x3ef574(0x116)](_0x2234a6[_0x3ef574(0x10d)]))throw CliErrors[_0x3ef574(0x118)](_0x3ef574(0xfe)+_0x16f990);if(_0x2234a6['bytes']===undefined&&typeof _0x2234a6['content']!==_0x3ef574(0xfd))throw CliErrors[_0x3ef574(0x118)](_0x3ef574(0x106)+_0x16f990);const _0x4508e6=fileContent(_0x2234a6);_0x4ff41d['set'](_0x16f990,{'path':_0x16f990,'bytes':_0x4508e6});}return Array['from'](_0x4ff41d[_0x3ef574(0x105)]())[_0x3ef574(0x127)](compareSkillFiles);}export function normalizeManifestFiles(_0x1b6a2e){const _0x1df67a=a100_0x4de4;if(!Array[_0x1df67a(0x11f)](_0x1b6a2e)||_0x1b6a2e[_0x1df67a(0x101)]===0x0)return[];const _0x47bf06=new Map();for(const _0x44cff6 of _0x1b6a2e){if(!_0x44cff6||typeof _0x44cff6!=='object'||typeof _0x44cff6[_0x1df67a(0xfc)]!==_0x1df67a(0xfd))throw CliErrors[_0x1df67a(0x118)](_0x1df67a(0x120));const _0x5944c7=normalizeSkillRelativePath(_0x44cff6['path']);if(_0x47bf06['has'](_0x5944c7))throw CliErrors[_0x1df67a(0x118)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x5944c7);if(!isSha256Hex(_0x44cff6[_0x1df67a(0x122)]))throw CliErrors[_0x1df67a(0x118)](_0x1df67a(0x104)+_0x5944c7);if(!Number[_0x1df67a(0x10f)](_0x44cff6[_0x1df67a(0x123)])||_0x44cff6['size']<0x0)throw CliErrors[_0x1df67a(0x118)](_0x1df67a(0x108)+_0x5944c7);_0x47bf06[_0x1df67a(0x11c)](_0x5944c7,{'path':_0x5944c7,'sha256':_0x44cff6[_0x1df67a(0x122)][_0x1df67a(0x102)](),'size':_0x44cff6['size']});}return Array['from'](_0x47bf06[_0x1df67a(0x105)]())[_0x1df67a(0x127)](compareSkillFiles);}export function scanSkillDirectory(_0x7d6f3a){const _0x77583d=realpathSync(_0x7d6f3a),_0xbec1e4=[];function _0x412409(_0x10d7b9){const _0x5e288b=a100_0x4de4,_0x3e635b=readdirSync(_0x10d7b9,{'withFileTypes':!![]})[_0x5e288b(0x127)]((_0x26ef49,_0x588974)=>_0x26ef49['name'][_0x5e288b(0x10e)](_0x588974[_0x5e288b(0x128)]));for(const _0x14c496 of _0x3e635b){if(_0x14c496[_0x5e288b(0x111)]()&&IGNORED_DIR_NAMES['has'](_0x14c496[_0x5e288b(0x128)]))continue;if(IGNORED_FILE_NAMES[_0x5e288b(0xfa)](_0x14c496[_0x5e288b(0x128)]))continue;const _0x415622=resolve(_0x10d7b9,_0x14c496[_0x5e288b(0x128)]);if(_0x14c496['isSymbolicLink']())throw CliErrors[_0x5e288b(0x118)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x415622);const _0x4865ac=toPosixPath(relative(_0x77583d,_0x415622));if(_0x14c496[_0x5e288b(0x111)]()){_0x412409(_0x415622);continue;}if(!_0x14c496['isFile']())continue;validateSkillRelativePath(_0x4865ac);const _0x1e8a2d=readFileSync(_0x415622);_0xbec1e4[_0x5e288b(0x110)]({'path':_0x4865ac,'bytes':_0x1e8a2d});}}return _0x412409(_0x77583d),normalizeLocalFiles(_0xbec1e4);}export function compareSkillFiles(_0x475229,_0x272f09){const _0x42b0b2=a100_0x4de4;if(_0x475229[_0x42b0b2(0xfc)]===SKILL_FILE)return _0x272f09[_0x42b0b2(0xfc)]===SKILL_FILE?0x0:-0x1;if(_0x272f09[_0x42b0b2(0xfc)]===SKILL_FILE)return 0x1;return Buffer[_0x42b0b2(0x114)](Buffer[_0x42b0b2(0x107)](_0x475229[_0x42b0b2(0xfc)],_0x42b0b2(0x125)),Buffer[_0x42b0b2(0x107)](_0x272f09[_0x42b0b2(0xfc)],_0x42b0b2(0x125)));}export function normalizeSkillRelativePath(_0x527e7c){const _0x417a4c=toPosixPath(_0x527e7c['trim']());return validateSkillRelativePath(_0x417a4c),_0x417a4c;}function a100_0x4de4(_0x382129,_0x57196d){_0x382129=_0x382129-0xf9;const _0x44d188=a100_0x44d1();let _0x4de46a=_0x44d188[_0x382129];return _0x4de46a;}export function validateSkillRelativePath(_0x4f744f){const _0x5b1ebf=a100_0x4de4;if(!_0x4f744f||_0x4f744f[_0x5b1ebf(0x11d)]('/')||_0x4f744f[_0x5b1ebf(0x11b)]('//'))throw CliErrors[_0x5b1ebf(0x118)](_0x5b1ebf(0x124)+_0x4f744f);for(const _0xb3242 of _0x4f744f[_0x5b1ebf(0x10a)]('/')){if(!_0xb3242||_0xb3242==='.'||_0xb3242==='..')throw CliErrors[_0x5b1ebf(0x118)](_0x5b1ebf(0x124)+_0x4f744f);}}export function toPosixPath(_0x5566d2){const _0x56b72a=a100_0x4de4;return _0x5566d2[_0x56b72a(0x100)](/\\/g,'/');}export function isSha256Hex(_0x3975c6){const _0x1e0e6c=a100_0x4de4;return typeof _0x3975c6===_0x1e0e6c(0xfd)&&/^[a-fA-F0-9]{64}$/['test'](_0x3975c6);}
@@ -1 +1 @@
1
- (function(_0x520df1,_0x2e1d09){const _0x29a2ee=a96_0x5d22,_0x4fcc60=_0x520df1();while(!![]){try{const _0x11023b=parseInt(_0x29a2ee(0x13b))/0x1*(-parseInt(_0x29a2ee(0x136))/0x2)+-parseInt(_0x29a2ee(0x12f))/0x3+parseInt(_0x29a2ee(0x132))/0x4+parseInt(_0x29a2ee(0x142))/0x5+parseInt(_0x29a2ee(0x13d))/0x6+parseInt(_0x29a2ee(0x13f))/0x7+-parseInt(_0x29a2ee(0x149))/0x8;if(_0x11023b===_0x2e1d09)break;else _0x4fcc60['push'](_0x4fcc60['shift']());}catch(_0x4603ab){_0x4fcc60['push'](_0x4fcc60['shift']());}}}(a96_0xf70d,0x66f6f));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';function a96_0x5d22(_0x2ec2e0,_0xc94770){_0x2ec2e0=_0x2ec2e0-0x129;const _0xf70d16=a96_0xf70d();let _0x5d2241=_0xf70d16[_0x2ec2e0];return _0x5d2241;}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';function a96_0xf70d(){const _0x56558c=['2923512znnofH','skillName','appCode','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','141562ouadym','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','env','has','contentHash','6JwPJCu','force','450240ydfEXL','.\x20Changed\x20file:\x20','3584742mUVdNI','join','description','3833930akMJMr','pulledAt','validation','test','stringify','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','keys','4694264DMwhJS','fileHashes','accessKey','utf8','isFile','paths','find','Runtime\x20Skill\x20package\x20is\x20missing\x20','length','entries','path','trim','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','---','1954794IbINvb','replace','name:\x20'];a96_0xf70d=function(){return _0x56558c;};return a96_0xf70d();}export function materializeRuntimeSkill(_0x25656e,_0x4bc213,_0x8902bb){const _0x50a7f2=a96_0x5d22,_0x438f5b=requireSkillCode(_0x25656e),_0xff87ac=requirePackageBytes(_0x438f5b,_0x8902bb['packageBytes']),_0x1e5bd5=extractDownloadedPackage(_0xff87ac),_0x6653f7=_0x1e5bd5[_0x50a7f2(0x14f)](_0x58f2ae=>_0x58f2ae[_0x50a7f2(0x12b)]===SKILL_FILE);if(!_0x6653f7)throw CliErrors[_0x50a7f2(0x144)](_0x50a7f2(0x150)+SKILL_FILE+':\x20'+_0x438f5b);const _0x536eda=withMaterializedSkillFrontmatter(_0x1e5bd5,_0x25656e,_0x438f5b),_0x1e6a15=_0x536eda[_0x50a7f2(0x14f)](_0x425dcc=>_0x425dcc[_0x50a7f2(0x12b)]===SKILL_FILE),_0x45c029=fileText(_0x1e6a15),_0x939961=getRuntimeSkillDir(_0x8902bb[_0x50a7f2(0x138)],_0x8902bb[_0x50a7f2(0x14b)],_0x8902bb[_0x50a7f2(0x134)],_0x4bc213,_0x438f5b,_0x8902bb[_0x50a7f2(0x14e)]),_0x48907d=resolve(_0x939961,SKILL_FILE),_0x4aab78=resolve(_0x939961,METADATA_FILE),_0x2fcec7=contentHash(_0x45c029),_0x880c5=readMetadataIfPresent(_0x4aab78)?.[_0x50a7f2(0x14a)];ensurePulledFilesCanBeOverwritten(_0x939961,_0x4aab78,_0x536eda,_0x8902bb[_0x50a7f2(0x13c)]===!![]),mkdirSync(_0x939961,{'recursive':!![],'mode':0x1c0});const _0x43afba=existsSync(_0x48907d)?readFileSync(_0x48907d,_0x50a7f2(0x14c)):undefined;return materializeFiles(_0x939961,_0x536eda),removeStaleManagedFiles(_0x939961,_0x880c5,_0x536eda),writeJsonAtomic(_0x4aab78,buildMetadata(_0x25656e,_0x4bc213,_0x8902bb['appCode'],_0x2fcec7,_0x8902bb[_0x50a7f2(0x143)],_0x536eda,_0xff87ac)),{'skill':_0x25656e,'scope':_0x4bc213,'dir':_0x939961,'skillMdPath':_0x48907d,'metadataPath':_0x4aab78,'contentHash':_0x2fcec7,'changed':_0x43afba!==_0x45c029};}function withMaterializedSkillFrontmatter(_0x548b1a,_0x1e4421,_0x1fb09d){return normalizeLocalFiles(_0x548b1a)['map'](_0x1ec4e2=>{const _0x4b8f4a=a96_0x5d22,_0x1522cd=fileText(_0x1ec4e2);if(_0x1ec4e2['path']!==SKILL_FILE||hasYamlFrontmatter(_0x1522cd))return _0x1ec4e2;return{'path':_0x1ec4e2['path'],'content':prependSkillFrontmatter(_0x1522cd,{'name':_0x1fb09d,'description':_0x1e4421[_0x4b8f4a(0x141)]?.[_0x4b8f4a(0x12c)]()||_0x1e4421[_0x4b8f4a(0x133)]?.[_0x4b8f4a(0x12c)]()||_0x1fb09d})};});}function hasYamlFrontmatter(_0x28a282){const _0x215eaf=a96_0x5d22;return/^\uFEFF?---\s*\r?\n/[_0x215eaf(0x145)](_0x28a282);}function prependSkillFrontmatter(_0x1ea7de,_0x4c35fc){const _0x5c7164=a96_0x5d22,_0x45cb36=_0x1ea7de[_0x5c7164(0x130)](/^\uFEFF/,'');return[_0x5c7164(0x12e),_0x5c7164(0x131)+yamlString(_0x4c35fc['name']),'description:\x20'+yamlString(_0x4c35fc[_0x5c7164(0x141)]),_0x5c7164(0x12e),'',_0x45cb36][_0x5c7164(0x140)]('\x0a');}function yamlString(_0x3fd198){const _0x49dc1b=a96_0x5d22;return JSON[_0x49dc1b(0x146)](_0x3fd198[_0x49dc1b(0x130)](/\r/g,'')[_0x49dc1b(0x12c)]());}function ensurePulledFilesCanBeOverwritten(_0x1e7fbf,_0x2a95e3,_0x24ab61,_0x249354){const _0x43dd51=a96_0x5d22;if(_0x249354||!existsSync(_0x2a95e3))return;const _0x37dac7=readMetadataIfPresent(_0x2a95e3);if(!_0x37dac7)return;const _0x3b1063=_0x37dac7[_0x43dd51(0x14a)]&&Object['keys'](_0x37dac7[_0x43dd51(0x14a)])[_0x43dd51(0x129)]>0x0?_0x37dac7['fileHashes']:undefined;if(_0x3b1063)for(const [_0x239340,_0x387281]of Object[_0x43dd51(0x12a)](_0x3b1063)){const _0x3ae8c5=resolveManagedFilePath(_0x1e7fbf,_0x239340);if(!existsSync(_0x3ae8c5))throw CliErrors[_0x43dd51(0x144)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1e7fbf,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x239340);const _0x4e82dd=lstatSync(_0x3ae8c5);if(!_0x4e82dd[_0x43dd51(0x14d)]())throw CliErrors[_0x43dd51(0x144)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1e7fbf,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x239340);const _0x352c0a=bufferSha256(readFileSync(_0x3ae8c5));if(_0x352c0a!==_0x387281)throw CliErrors[_0x43dd51(0x144)](_0x43dd51(0x147)+_0x1e7fbf+_0x43dd51(0x13e)+_0x239340,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x239340);}else{const _0x275f30=resolve(_0x1e7fbf,SKILL_FILE);if(existsSync(_0x275f30)&&_0x37dac7[_0x43dd51(0x13a)]){const _0x1dd305=contentHash(readFileSync(_0x275f30,_0x43dd51(0x14c)));if(_0x1dd305!==_0x37dac7[_0x43dd51(0x13a)])throw CliErrors[_0x43dd51(0x144)](_0x43dd51(0x137)+_0x275f30,_0x43dd51(0x12d));}}for(const _0x3b9a04 of normalizeLocalFiles(_0x24ab61)){if(_0x3b1063?.[_0x3b9a04[_0x43dd51(0x12b)]])continue;if(!_0x3b1063&&_0x3b9a04[_0x43dd51(0x12b)]===SKILL_FILE)continue;const _0x27f43f=resolveManagedFilePath(_0x1e7fbf,_0x3b9a04[_0x43dd51(0x12b)]);if(!existsSync(_0x27f43f))continue;const _0x1aed71=lstatSync(_0x27f43f);if(!_0x1aed71['isFile']())throw CliErrors[_0x43dd51(0x144)](_0x43dd51(0x147)+_0x1e7fbf,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x3b9a04[_0x43dd51(0x12b)]);const _0x528246=bufferSha256(readFileSync(_0x27f43f));if(_0x528246!==fileHash(_0x3b9a04))throw CliErrors[_0x43dd51(0x144)](_0x43dd51(0x147)+_0x1e7fbf,_0x43dd51(0x135)+_0x3b9a04[_0x43dd51(0x12b)]);}}function materializeFiles(_0x4f2c14,_0x539a1e){const _0x298e65=a96_0x5d22;for(const _0x5d7c2d of normalizeLocalFiles(_0x539a1e)){const _0x51ae17=resolveManagedFilePath(_0x4f2c14,_0x5d7c2d[_0x298e65(0x12b)]);mkdirSync(dirname(_0x51ae17),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x51ae17,fileContent(_0x5d7c2d),0x180);}}function removeStaleManagedFiles(_0x11fad8,_0x4143b6,_0x5f3d26){const _0x34a4cf=a96_0x5d22;if(!_0x4143b6)return;const _0x5bc1b8=new Set(normalizeLocalFiles(_0x5f3d26)['map'](_0xfcbec6=>_0xfcbec6[_0x34a4cf(0x12b)]));for(const _0x3817a2 of Object[_0x34a4cf(0x148)](_0x4143b6)){if(_0x5bc1b8[_0x34a4cf(0x139)](_0x3817a2))continue;const _0x13267d=resolveManagedFilePath(_0x11fad8,_0x3817a2);existsSync(_0x13267d)&&lstatSync(_0x13267d)['isFile']()&&rmSync(_0x13267d,{'force':!![]});}}
1
+ (function(_0x2cfe32,_0x10bba3){const _0x5cbfb3=a101_0x3aa5,_0x47df5d=_0x2cfe32();while(!![]){try{const _0x144aab=-parseInt(_0x5cbfb3(0x6c))/0x1*(-parseInt(_0x5cbfb3(0x7f))/0x2)+-parseInt(_0x5cbfb3(0x70))/0x3+parseInt(_0x5cbfb3(0x91))/0x4+-parseInt(_0x5cbfb3(0x96))/0x5+parseInt(_0x5cbfb3(0x8c))/0x6*(parseInt(_0x5cbfb3(0x7c))/0x7)+-parseInt(_0x5cbfb3(0x85))/0x8*(-parseInt(_0x5cbfb3(0x8e))/0x9)+-parseInt(_0x5cbfb3(0x97))/0xa;if(_0x144aab===_0x10bba3)break;else _0x47df5d['push'](_0x47df5d['shift']());}catch(_0x7fcb72){_0x47df5d['push'](_0x47df5d['shift']());}}}(a101_0x30f5,0xe80e6));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}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';function a101_0x3aa5(_0xf0f4a1,_0x28a14d){_0xf0f4a1=_0xf0f4a1-0x68;const _0x30f5e3=a101_0x30f5();let _0x3aa5b0=_0x30f5e3[_0xf0f4a1];return _0x3aa5b0;}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x26b75f,_0xe6f785,_0x3eeecc){const _0x54ff71=a101_0x3aa5,_0x2d33ca=requireSkillCode(_0x26b75f),_0x2d365c=requirePackageBytes(_0x2d33ca,_0x3eeecc[_0x54ff71(0x6f)]),_0x4870ea=extractDownloadedPackage(_0x2d365c),_0x1fcdb8=_0x4870ea[_0x54ff71(0x94)](_0x88576c=>_0x88576c[_0x54ff71(0x98)]===SKILL_FILE);if(!_0x1fcdb8)throw CliErrors[_0x54ff71(0x72)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x2d33ca);const _0x57e8e1=withMaterializedSkillFrontmatter(_0x4870ea,_0x26b75f,_0x2d33ca),_0x4a0865=_0x57e8e1[_0x54ff71(0x94)](_0x13734b=>_0x13734b['path']===SKILL_FILE),_0xd307d6=fileText(_0x4a0865),_0x230faa=getRuntimeSkillDir(_0x3eeecc['env'],_0x3eeecc[_0x54ff71(0x77)],_0x3eeecc['appCode'],_0xe6f785,_0x2d33ca,_0x3eeecc[_0x54ff71(0x7b)]),_0x4670a2=resolve(_0x230faa,SKILL_FILE),_0x44936f=resolve(_0x230faa,METADATA_FILE),_0x54dc39=contentHash(_0xd307d6),_0x145466=readMetadataIfPresent(_0x44936f)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x230faa,_0x44936f,_0x57e8e1,_0x3eeecc[_0x54ff71(0x7d)]===!![]),mkdirSync(_0x230faa,{'recursive':!![],'mode':0x1c0});const _0x524064=existsSync(_0x4670a2)?readFileSync(_0x4670a2,_0x54ff71(0x92)):undefined;return materializeFiles(_0x230faa,_0x57e8e1),removeStaleManagedFiles(_0x230faa,_0x145466,_0x57e8e1),writeJsonAtomic(_0x44936f,buildMetadata(_0x26b75f,_0xe6f785,_0x3eeecc[_0x54ff71(0x8f)],_0x54dc39,_0x3eeecc[_0x54ff71(0x8b)],_0x57e8e1,_0x2d365c)),{'skill':_0x26b75f,'scope':_0xe6f785,'dir':_0x230faa,'skillMdPath':_0x4670a2,'metadataPath':_0x44936f,'contentHash':_0x54dc39,'changed':_0x524064!==_0xd307d6};}function withMaterializedSkillFrontmatter(_0x442b68,_0x1b21ea,_0x416038){const _0x599855=a101_0x3aa5,_0x51c679=skillDisplayName(_0x1b21ea,_0x416038),_0x241a8b=_0x1b21ea[_0x599855(0x6d)]?.[_0x599855(0x80)]()||_0x51c679||_0x416038;return normalizeLocalFiles(_0x442b68)[_0x599855(0x68)](_0x9c14c3=>{const _0x63112=_0x599855,_0x7b2b77=fileText(_0x9c14c3);if(_0x9c14c3[_0x63112(0x98)]!==SKILL_FILE)return _0x9c14c3;if(hasYamlFrontmatter(_0x7b2b77))return{'path':_0x9c14c3[_0x63112(0x98)],'content':withSyncedDisplayName(_0x7b2b77,_0x51c679)};return{'path':_0x9c14c3[_0x63112(0x98)],'content':prependSkillFrontmatter(_0x7b2b77,{'name':_0x416038,'displayName':_0x51c679,'description':_0x241a8b})};});}function hasYamlFrontmatter(_0x1d2357){const _0x29bbb6=a101_0x3aa5;return/^\uFEFF?---\s*\r?\n/[_0x29bbb6(0x6e)](_0x1d2357);}function a101_0x30f5(){const _0x1d88da=['3711200WPDwdr','utf8','trimEnd','find','replace','2300135yNjglv','1576460jcvmrO','path','displayName','filter','keys','displayName:\x20','map','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','isFile','---','778CkgduV','description','test','packageBytes','4474779XeJJMK','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','validation','slice','skillName','has','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','accessKey','match','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','paths','14ZSSpAp','force','contentHash','2586SQOvCD','trim','Managed\x20file\x20was\x20removed\x20locally:\x20','entries','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','fileHashes','16ExQtgk','length','contents','delete','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','name:\x20','pulledAt','3291726aRpUCr','set','129474nUStwO','appCode','stringify'];a101_0x30f5=function(){return _0x1d88da;};return a101_0x30f5();}function prependSkillFrontmatter(_0x14f186,_0x1296bd){const _0x4c8ead=a101_0x3aa5,_0xe2430e=_0x14f186[_0x4c8ead(0x95)](/^\uFEFF/,'');return[_0x4c8ead(0x6b),_0x4c8ead(0x8a)+yamlString(_0x1296bd['name']),_0x1296bd[_0x4c8ead(0x99)]?_0x4c8ead(0x9c)+yamlString(_0x1296bd[_0x4c8ead(0x99)]):undefined,'description:\x20'+yamlString(_0x1296bd[_0x4c8ead(0x6d)]),_0x4c8ead(0x6b),'',_0xe2430e][_0x4c8ead(0x9a)](_0xccea22=>_0xccea22!==undefined)['join']('\x0a');}function yamlString(_0x4e8c26){const _0x5ad566=a101_0x3aa5;return JSON[_0x5ad566(0x90)](_0x4e8c26[_0x5ad566(0x95)](/\r/g,'')[_0x5ad566(0x80)]());}function skillDisplayName(_0xfacbdf,_0x157bd0){const _0x4912c3=a101_0x3aa5,_0x41bf0c=_0xfacbdf[_0x4912c3(0x74)]?.['trim']();return _0x41bf0c&&_0x41bf0c!==_0x157bd0?_0x41bf0c:undefined;}function withSyncedDisplayName(_0x50cd1d,_0x47938e){const _0x13f6ad=a101_0x3aa5,_0x2157a1=_0x50cd1d[_0x13f6ad(0x78)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2157a1)return _0x50cd1d;const _0x41b88f=_0x2157a1[0x1]??'',_0x297bf1=_0x2157a1[0x2]??'',_0x6ddea1=parseDocument(_0x297bf1);if(_0x6ddea1['errors'][_0x13f6ad(0x86)]>0x0||!isMap(_0x6ddea1[_0x13f6ad(0x87)]))return _0x50cd1d;if(_0x47938e)_0x6ddea1[_0x13f6ad(0x8d)](_0x13f6ad(0x99),_0x47938e);else{if(_0x6ddea1[_0x13f6ad(0x75)](_0x13f6ad(0x99)))_0x6ddea1[_0x13f6ad(0x88)]('displayName');else return _0x50cd1d;}const _0x5ab778=String(_0x6ddea1)[_0x13f6ad(0x93)](),_0x382eee=_0x50cd1d[_0x13f6ad(0x73)](_0x2157a1[0x0]['length'])[_0x13f6ad(0x95)](/^\r?\n/,'');return _0x41b88f+'---\x0a'+_0x5ab778+'\x0a---\x0a\x0a'+_0x382eee;}function ensurePulledFilesCanBeOverwritten(_0x46e9e2,_0x3c6326,_0x29f11e,_0x576796){const _0x469798=a101_0x3aa5;if(_0x576796||!existsSync(_0x3c6326))return;const _0x1d24be=readMetadataIfPresent(_0x3c6326);if(!_0x1d24be)return;const _0x1ada92=_0x1d24be[_0x469798(0x84)]&&Object[_0x469798(0x9b)](_0x1d24be[_0x469798(0x84)])[_0x469798(0x86)]>0x0?_0x1d24be['fileHashes']:undefined;if(_0x1ada92)for(const [_0x4b9b64,_0x4c7911]of Object[_0x469798(0x82)](_0x1ada92)){const _0x3b05cc=resolveManagedFilePath(_0x46e9e2,_0x4b9b64);if(!existsSync(_0x3b05cc))throw CliErrors[_0x469798(0x72)](_0x469798(0x71)+_0x46e9e2,_0x469798(0x81)+_0x4b9b64);const _0x5f34c3=lstatSync(_0x3b05cc);if(!_0x5f34c3['isFile']())throw CliErrors[_0x469798(0x72)](_0x469798(0x71)+_0x46e9e2,_0x469798(0x89)+_0x4b9b64);const _0xca7579=bufferSha256(readFileSync(_0x3b05cc));if(_0xca7579!==_0x4c7911)throw CliErrors[_0x469798(0x72)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x46e9e2+'.\x20Changed\x20file:\x20'+_0x4b9b64,_0x469798(0x7a)+_0x4b9b64);}else{const _0x19a0b1=resolve(_0x46e9e2,SKILL_FILE);if(existsSync(_0x19a0b1)&&_0x1d24be['contentHash']){const _0x782383=contentHash(readFileSync(_0x19a0b1,_0x469798(0x92)));if(_0x782383!==_0x1d24be[_0x469798(0x7e)])throw CliErrors[_0x469798(0x72)](_0x469798(0x79)+_0x19a0b1,_0x469798(0x83));}}for(const _0x1d2795 of normalizeLocalFiles(_0x29f11e)){if(_0x1ada92?.[_0x1d2795[_0x469798(0x98)]])continue;if(!_0x1ada92&&_0x1d2795[_0x469798(0x98)]===SKILL_FILE)continue;const _0x2e2fc2=resolveManagedFilePath(_0x46e9e2,_0x1d2795[_0x469798(0x98)]);if(!existsSync(_0x2e2fc2))continue;const _0x1dd26e=lstatSync(_0x2e2fc2);if(!_0x1dd26e[_0x469798(0x6a)]())throw CliErrors['validation'](_0x469798(0x71)+_0x46e9e2,_0x469798(0x76)+_0x1d2795[_0x469798(0x98)]);const _0x17f73c=bufferSha256(readFileSync(_0x2e2fc2));if(_0x17f73c!==fileHash(_0x1d2795))throw CliErrors[_0x469798(0x72)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x46e9e2,_0x469798(0x69)+_0x1d2795[_0x469798(0x98)]);}}function materializeFiles(_0x10cfe0,_0x1644fa){const _0x5427d7=a101_0x3aa5;for(const _0xbe76c0 of normalizeLocalFiles(_0x1644fa)){const _0x5120fa=resolveManagedFilePath(_0x10cfe0,_0xbe76c0[_0x5427d7(0x98)]);mkdirSync(dirname(_0x5120fa),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x5120fa,fileContent(_0xbe76c0),0x180);}}function removeStaleManagedFiles(_0x54a96c,_0x162b9e,_0x84572d){const _0x4f5ba0=a101_0x3aa5;if(!_0x162b9e)return;const _0x3cf80a=new Set(normalizeLocalFiles(_0x84572d)[_0x4f5ba0(0x68)](_0x221363=>_0x221363['path']));for(const _0x39b902 of Object[_0x4f5ba0(0x9b)](_0x162b9e)){if(_0x3cf80a[_0x4f5ba0(0x75)](_0x39b902))continue;const _0x21d71e=resolveManagedFilePath(_0x54a96c,_0x39b902);existsSync(_0x21d71e)&&lstatSync(_0x21d71e)['isFile']()&&rmSync(_0x21d71e,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x4887df,_0x3829db){const _0x3e4b0f=a97_0x3ee7,_0x15f479=_0x4887df();while(!![]){try{const _0x12690c=-parseInt(_0x3e4b0f(0x10a))/0x1*(-parseInt(_0x3e4b0f(0x10e))/0x2)+-parseInt(_0x3e4b0f(0xf4))/0x3*(parseInt(_0x3e4b0f(0xff))/0x4)+parseInt(_0x3e4b0f(0x109))/0x5*(parseInt(_0x3e4b0f(0xf2))/0x6)+-parseInt(_0x3e4b0f(0xf8))/0x7*(-parseInt(_0x3e4b0f(0xef))/0x8)+-parseInt(_0x3e4b0f(0xee))/0x9*(-parseInt(_0x3e4b0f(0xfe))/0xa)+-parseInt(_0x3e4b0f(0x105))/0xb*(parseInt(_0x3e4b0f(0xf9))/0xc)+parseInt(_0x3e4b0f(0xf1))/0xd;if(_0x12690c===_0x3829db)break;else _0x15f479['push'](_0x15f479['shift']());}catch(_0x5ed1fe){_0x15f479['push'](_0x15f479['shift']());}}}(a97_0x54f3,0xb2da6));function a97_0x3ee7(_0x2a6b8a,_0x10f311){_0x2a6b8a=_0x2a6b8a-0xee;const _0x54f3e7=a97_0x54f3();let _0x3ee741=_0x54f3e7[_0x2a6b8a];return _0x3ee741;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a97_0x54f3(){const _0x469a56=['28HellOS','24OyLtAI','trim','isArray','Invalid\x20','path','90kvmCbJ','45812uROgPx','hasUpstreamUpdate','readonly','zipSize','toISOString','validation','8023290sBBgHh','skillCode','userId','zipSha256','1985bbnPQi','101lDPdWt','sourceSessionId','string','map','3246XsOnyI','manifest','object','fromEntries','129672qcjGQG','2883640kuzpsN','length','10961873kIZEDB','1590CuSJHo','ossPath','129MZeHNN','tags','personal','forkedFromSkillId'];a97_0x54f3=function(){return _0x469a56;};return a97_0x54f3();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x32717f,_0x2d90bd,_0x438d33,_0x4ab090,_0x1ba33d,_0x1c6639,_0x176de7){const _0x1dc6d0=a97_0x3ee7,_0x414c99=_0x1c6639?normalizeLocalFiles(_0x1c6639):[],_0x3028bc=!_0x176de7&&_0x414c99[_0x1dc6d0(0xf0)]>0x0?buildSkillPackage(_0x414c99):undefined,_0x5575ed=_0x176de7?bufferSha256(_0x176de7):_0x3028bc?.[_0x1dc6d0(0x10f)][_0x1dc6d0(0x108)],_0x4bf52d=_0x176de7?.[_0x1dc6d0(0xf0)]??_0x3028bc?.[_0x1dc6d0(0x10f)][_0x1dc6d0(0x102)],_0xb282e6=_0x414c99['length']>0x0?Object[_0x1dc6d0(0x111)](_0x414c99['map'](_0x58dd89=>[_0x58dd89['path'],fileHash(_0x58dd89)])):undefined;return{'schemaVersion':_0x414c99[_0x1dc6d0(0xf0)]>0x0?0x2:0x1,'id':_0x32717f['id'],'appCode':_0x438d33,'skillCode':requireSkillCode(_0x32717f),'skillName':_0x32717f['skillName'],'description':_0x32717f['description'],'scope':_0x2d90bd,'readonly':_0x2d90bd!==_0x1dc6d0(0xf6)||_0x32717f[_0x1dc6d0(0x101)]===!![],'tenantCode':_0x32717f['tenantCode'],'userId':_0x32717f[_0x1dc6d0(0x107)],'version':_0x32717f['version'],'status':_0x32717f['status'],'tags':Array['isArray'](_0x32717f[_0x1dc6d0(0xf5)])?_0x32717f[_0x1dc6d0(0xf5)]:[],'hasUpstreamUpdate':_0x32717f[_0x1dc6d0(0x100)],'forkedFromSkillId':_0x32717f[_0x1dc6d0(0xf7)],'forkedFromVersion':_0x32717f['forkedFromVersion'],'sourceSessionId':_0x32717f[_0x1dc6d0(0x10b)],'contentHash':_0x4ab090,'fileHashes':_0xb282e6,'treeHash':_0x414c99[_0x1dc6d0(0xf0)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x414c99)):undefined,'ossPath':remoteManifestOssPath(_0x32717f['files']),'zipSha256':_0x5575ed,'zipSize':_0x4bf52d,'files':_0x414c99['length']>0x0?_0x414c99[_0x1dc6d0(0x10d)](_0x50b1ef=>({'path':_0x50b1ef[_0x1dc6d0(0xfd)],'hash':fileHash(_0x50b1ef),'size':fileContent(_0x50b1ef)[_0x1dc6d0(0xf0)]})):undefined,'pulledAt':_0x1ba33d??new Date()[_0x1dc6d0(0x103)]()};}export function requireSkillCode(_0x456f5c){const _0x3da0b0=a97_0x3ee7,_0x23747a=_0x456f5c[_0x3da0b0(0x106)]?.[_0x3da0b0(0xfa)]();if(!_0x23747a)throw CliErrors['validation']('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x23747a;}export function readMetadataIfPresent(_0x494cc8){const _0x5e030d=a97_0x3ee7;if(!existsSync(_0x494cc8))return undefined;try{const _0x5d63e6=JSON['parse'](readFileSync(_0x494cc8,'utf8'));return _0x5d63e6;}catch{throw CliErrors[_0x5e030d(0x104)](_0x5e030d(0xfc)+METADATA_FILE+':\x20'+_0x494cc8);}}function remoteManifestOssPath(_0x5545d6){const _0x89e058=a97_0x3ee7;if(!_0x5545d6||typeof _0x5545d6!==_0x89e058(0x110)||Array[_0x89e058(0xfb)](_0x5545d6))return undefined;const _0x24e4aa=_0x5545d6[_0x89e058(0xf3)];return typeof _0x24e4aa===_0x89e058(0x10c)&&_0x24e4aa[_0x89e058(0xfa)]()?_0x24e4aa[_0x89e058(0xfa)]():undefined;}
1
+ (function(_0x3039ee,_0xb8beab){const _0x3c51a6=a102_0x2b3a,_0x3367f9=_0x3039ee();while(!![]){try{const _0x5b2c29=-parseInt(_0x3c51a6(0x200))/0x1*(-parseInt(_0x3c51a6(0x207))/0x2)+-parseInt(_0x3c51a6(0x1fe))/0x3*(-parseInt(_0x3c51a6(0x1fb))/0x4)+parseInt(_0x3c51a6(0x209))/0x5+parseInt(_0x3c51a6(0x1f6))/0x6+parseInt(_0x3c51a6(0x213))/0x7*(-parseInt(_0x3c51a6(0x1f2))/0x8)+-parseInt(_0x3c51a6(0x1f4))/0x9+parseInt(_0x3c51a6(0x203))/0xa;if(_0x5b2c29===_0xb8beab)break;else _0x3367f9['push'](_0x3367f9['shift']());}catch(_0x186438){_0x3367f9['push'](_0x3367f9['shift']());}}}(a102_0x25f5,0xb6417));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a102_0x25f5(){const _0x5035f6=['manifest','96qSRedV','path','11035107dIhsvf','version','2192268gMnbQt','userId','zipSize','zipSha256','utf8','1167448RBaYNQ','Runtime\x20Skill\x20is\x20missing\x20skillCode.','trim','3qADkOL','forkedFromVersion','108487iVfnCZ','map','skillCode','3215850rDmxRY','tenantCode','tags','files','20zaNtKR','readonly','2342715ztxUyc','validation','isArray','description','sourceSessionId','string','toISOString','fromEntries','status','forkedFromSkillId','326431qLUyDs','length','ossPath'];a102_0x25f5=function(){return _0x5035f6;};return a102_0x25f5();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x22cf13,_0xf478fe,_0x58c69c,_0x3883d9,_0x5e7097,_0x3e5b6a,_0x456f61){const _0x32084a=a102_0x2b3a,_0x1d30b3=_0x3e5b6a?normalizeLocalFiles(_0x3e5b6a):[],_0x33d485=!_0x456f61&&_0x1d30b3[_0x32084a(0x214)]>0x0?buildSkillPackage(_0x1d30b3):undefined,_0x4ab5cd=_0x456f61?bufferSha256(_0x456f61):_0x33d485?.[_0x32084a(0x1f1)][_0x32084a(0x1f9)],_0x30d45b=_0x456f61?.[_0x32084a(0x214)]??_0x33d485?.[_0x32084a(0x1f1)][_0x32084a(0x1f8)],_0x1c1531=_0x1d30b3[_0x32084a(0x214)]>0x0?Object[_0x32084a(0x210)](_0x1d30b3[_0x32084a(0x201)](_0x5bf6f7=>[_0x5bf6f7['path'],fileHash(_0x5bf6f7)])):undefined;return{'schemaVersion':_0x1d30b3['length']>0x0?0x2:0x1,'id':_0x22cf13['id'],'appCode':_0x58c69c,'skillCode':requireSkillCode(_0x22cf13),'skillName':_0x22cf13['skillName'],'description':_0x22cf13[_0x32084a(0x20c)],'scope':_0xf478fe,'readonly':_0xf478fe!=='personal'||_0x22cf13[_0x32084a(0x208)]===!![],'tenantCode':_0x22cf13[_0x32084a(0x204)],'userId':_0x22cf13[_0x32084a(0x1f7)],'version':_0x22cf13[_0x32084a(0x1f5)],'status':_0x22cf13[_0x32084a(0x211)],'tags':Array[_0x32084a(0x20b)](_0x22cf13['tags'])?_0x22cf13[_0x32084a(0x205)]:[],'hasUpstreamUpdate':_0x22cf13['hasUpstreamUpdate'],'forkedFromSkillId':_0x22cf13[_0x32084a(0x212)],'forkedFromVersion':_0x22cf13[_0x32084a(0x1ff)],'sourceSessionId':_0x22cf13[_0x32084a(0x20d)],'contentHash':_0x3883d9,'fileHashes':_0x1c1531,'treeHash':_0x1d30b3['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x1d30b3)):undefined,'ossPath':remoteManifestOssPath(_0x22cf13[_0x32084a(0x206)]),'zipSha256':_0x4ab5cd,'zipSize':_0x30d45b,'files':_0x1d30b3[_0x32084a(0x214)]>0x0?_0x1d30b3[_0x32084a(0x201)](_0x5a575f=>({'path':_0x5a575f[_0x32084a(0x1f3)],'hash':fileHash(_0x5a575f),'size':fileContent(_0x5a575f)[_0x32084a(0x214)]})):undefined,'pulledAt':_0x5e7097??new Date()[_0x32084a(0x20f)]()};}export function requireSkillCode(_0x3dee34){const _0x5e260d=a102_0x2b3a,_0x2047f4=_0x3dee34[_0x5e260d(0x202)]?.[_0x5e260d(0x1fd)]();if(!_0x2047f4)throw CliErrors[_0x5e260d(0x20a)](_0x5e260d(0x1fc));return _0x2047f4;}export function readMetadataIfPresent(_0x1b9576){const _0x2006b8=a102_0x2b3a;if(!existsSync(_0x1b9576))return undefined;try{const _0xbaee2d=JSON['parse'](readFileSync(_0x1b9576,_0x2006b8(0x1fa)));return _0xbaee2d;}catch{throw CliErrors[_0x2006b8(0x20a)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x1b9576);}}function a102_0x2b3a(_0x3da6d9,_0x5ca44d){_0x3da6d9=_0x3da6d9-0x1f1;const _0x25f544=a102_0x25f5();let _0x2b3a36=_0x25f544[_0x3da6d9];return _0x2b3a36;}function remoteManifestOssPath(_0x28b613){const _0x32bf5e=a102_0x2b3a;if(!_0x28b613||typeof _0x28b613!=='object'||Array[_0x32bf5e(0x20b)](_0x28b613))return undefined;const _0x28144b=_0x28b613[_0x32bf5e(0x215)];return typeof _0x28144b===_0x32bf5e(0x20e)&&_0x28144b[_0x32bf5e(0x1fd)]()?_0x28144b[_0x32bf5e(0x1fd)]():undefined;}
@@ -1 +1 @@
1
- const a98_0x40d8c3=a98_0x2e71;(function(_0x65c312,_0x231ccb){const _0x21e3be=a98_0x2e71,_0x5e803f=_0x65c312();while(!![]){try{const _0x51619e=parseInt(_0x21e3be(0x157))/0x1*(parseInt(_0x21e3be(0x163))/0x2)+-parseInt(_0x21e3be(0x152))/0x3*(parseInt(_0x21e3be(0x154))/0x4)+-parseInt(_0x21e3be(0x16a))/0x5+parseInt(_0x21e3be(0x15f))/0x6*(-parseInt(_0x21e3be(0x162))/0x7)+-parseInt(_0x21e3be(0x161))/0x8+-parseInt(_0x21e3be(0x155))/0x9*(-parseInt(_0x21e3be(0x15d))/0xa)+-parseInt(_0x21e3be(0x150))/0xb*(-parseInt(_0x21e3be(0x15a))/0xc);if(_0x51619e===_0x231ccb)break;else _0x5e803f['push'](_0x5e803f['shift']());}catch(_0x285206){_0x5e803f['push'](_0x5e803f['shift']());}}}(a98_0x5a09,0xbe990));function a98_0x2e71(_0x26bc10,_0xfd6d2b){_0x26bc10=_0x26bc10-0x150;const _0x5a09da=a98_0x5a09();let _0x2e7167=_0x5a09da[_0x26bc10];return _0x2e7167;}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(_0x28b4f2={}){const _0x341ebf=a98_0x2e71,_0x251cda=_0x28b4f2[_0x341ebf(0x15e)]??homedir(),_0x4e9cea=resolve(_0x251cda,PRODUCT_CONFIG[_0x341ebf(0x15b)],'cache'),_0x16ae1f=trimmedEnv(_0x341ebf(0x169)),_0x568ba7=trimmedEnv(_0x341ebf(0x167));return{'homeDir':_0x251cda,'cacheRoot':_0x4e9cea,'managedRoot':resolve(_0x251cda,PRODUCT_CONFIG[_0x341ebf(0x15b)]),'agentsSkillsDir':_0x28b4f2[_0x341ebf(0x153)]??_0x16ae1f??resolve(_0x251cda,_0x341ebf(0x164),_0x341ebf(0x168)),'claudeSkillsDir':_0x28b4f2[_0x341ebf(0x165)]??_0x568ba7??resolve(_0x251cda,_0x341ebf(0x166),_0x341ebf(0x168))};}export function getRuntimeSkillCacheRoot(_0x41bf96,_0x452fc9,_0x2bc86c={}){const _0x511c64=a98_0x2e71,_0x30023a=resolveSkillSyncPaths(_0x2bc86c);return resolve(_0x30023a['cacheRoot'],_0x41bf96,fingerprintAccessKey(_0x452fc9),_0x511c64(0x168));}export function getRuntimeSkillDir(_0x23f492,_0x500556,_0x188ee8,_0x1e689b,_0x15d977,_0x209cc1={}){const _0xfdf561=a98_0x2e71;return resolve(getRuntimeSkillCacheRoot(_0x23f492,_0x500556,_0x209cc1),safePathSegment(_0x188ee8,_0xfdf561(0x15c)),_0x1e689b,safePathSegment(_0x15d977,'skillCode'));}export function safePathSegment(_0x471cb4,_0x2d9be2=a98_0x40d8c3(0x159)){const _0x163929=a98_0x40d8c3;if(!_0x471cb4||_0x471cb4[_0x163929(0x151)]('/')||_0x471cb4[_0x163929(0x151)]('\x5c')||_0x471cb4[_0x163929(0x151)]('..'))throw CliErrors[_0x163929(0x160)]('Unsafe\x20'+_0x2d9be2+_0x163929(0x156)+_0x471cb4);return _0x471cb4;}function a98_0x5a09(){const _0x565b86=['agentsSkillsDir','372UQbsVj','81jdCyAG','\x20for\x20local\x20path:\x20','3722kPqnSR','trim','path\x20segment','2394816URQuEb','homeDirName','appCode','1140600wspZoK','homeDir','6sqRXTg','validation','3775520HIgyYv','1586599UpNtAA','758cWcBRH','.agents','claudeSkillsDir','.claude','CLAUDE_SKILL_ROOT','skills','SKILL_ROOT','3745490QUvJFt','11gJxjMc','includes','13173DZGCFp'];a98_0x5a09=function(){return _0x565b86;};return a98_0x5a09();}function trimmedEnv(_0x44cd7a){const _0x1e169d=a98_0x40d8c3,_0x220b96=productEnv(_0x44cd7a)?.[_0x1e169d(0x158)]();return _0x220b96?_0x220b96:undefined;}
1
+ (function(_0x39b291,_0x392478){const _0x40e508=a103_0x49ff,_0x43fa27=_0x39b291();while(!![]){try{const _0xadc395=parseInt(_0x40e508(0x158))/0x1*(parseInt(_0x40e508(0x142))/0x2)+-parseInt(_0x40e508(0x146))/0x3+-parseInt(_0x40e508(0x152))/0x4+-parseInt(_0x40e508(0x14c))/0x5+parseInt(_0x40e508(0x151))/0x6*(parseInt(_0x40e508(0x157))/0x7)+parseInt(_0x40e508(0x15a))/0x8+parseInt(_0x40e508(0x153))/0x9;if(_0xadc395===_0x392478)break;else _0x43fa27['push'](_0x43fa27['shift']());}catch(_0x528e6e){_0x43fa27['push'](_0x43fa27['shift']());}}}(a103_0x44ba,0x903f8));import{homedir}from'node:os';function a103_0x44ba(){const _0xa95c80=['homeDir','.agents','homeDirName','validation','\x20for\x20local\x20path:\x20','4777975NzaxTq','skillCode','Unsafe\x20','skills','trim','1038UPZvAe','4551656MNPUod','14360697NmsWNj','appCode','SKILL_ROOT','includes','17703upomNK','2CHShgi','.claude','5554088ZABQWs','claudeSkillsDir','19986mcovFh','cache','agentsSkillsDir','cacheRoot','189144PHhijg'];a103_0x44ba=function(){return _0xa95c80;};return a103_0x44ba();}import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a103_0x49ff(_0x27c8ea,_0xa6337b){_0x27c8ea=_0x27c8ea-0x142;const _0x44ba86=a103_0x44ba();let _0x49ff4a=_0x44ba86[_0x27c8ea];return _0x49ff4a;}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x43ef35={}){const _0x55ae66=a103_0x49ff,_0x934e91=_0x43ef35[_0x55ae66(0x147)]??homedir(),_0x410b6c=resolve(_0x934e91,PRODUCT_CONFIG[_0x55ae66(0x149)],_0x55ae66(0x143)),_0x486b3d=trimmedEnv(_0x55ae66(0x155)),_0x2af3d4=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0x934e91,'cacheRoot':_0x410b6c,'managedRoot':resolve(_0x934e91,PRODUCT_CONFIG[_0x55ae66(0x149)]),'agentsSkillsDir':_0x43ef35[_0x55ae66(0x144)]??_0x486b3d??resolve(_0x934e91,_0x55ae66(0x148),_0x55ae66(0x14f)),'claudeSkillsDir':_0x43ef35[_0x55ae66(0x15b)]??_0x2af3d4??resolve(_0x934e91,_0x55ae66(0x159),'skills')};}export function getRuntimeSkillCacheRoot(_0x316345,_0x542a21,_0x3949f1={}){const _0xcb31d2=a103_0x49ff,_0x5d7e2a=resolveSkillSyncPaths(_0x3949f1);return resolve(_0x5d7e2a[_0xcb31d2(0x145)],_0x316345,fingerprintAccessKey(_0x542a21),_0xcb31d2(0x14f));}export function getRuntimeSkillDir(_0x52e7f0,_0x433569,_0x2ea92f,_0x489ed4,_0x43cef7,_0x5ce6b4={}){const _0x2cf1aa=a103_0x49ff;return resolve(getRuntimeSkillCacheRoot(_0x52e7f0,_0x433569,_0x5ce6b4),safePathSegment(_0x2ea92f,_0x2cf1aa(0x154)),_0x489ed4,safePathSegment(_0x43cef7,_0x2cf1aa(0x14d)));}export function safePathSegment(_0x397d33,_0x4ce619='path\x20segment'){const _0xbfe465=a103_0x49ff;if(!_0x397d33||_0x397d33[_0xbfe465(0x156)]('/')||_0x397d33[_0xbfe465(0x156)]('\x5c')||_0x397d33[_0xbfe465(0x156)]('..'))throw CliErrors[_0xbfe465(0x14a)](_0xbfe465(0x14e)+_0x4ce619+_0xbfe465(0x14b)+_0x397d33);return _0x397d33;}function trimmedEnv(_0x35e775){const _0x23d4fb=a103_0x49ff,_0x4ef765=productEnv(_0x35e775)?.[_0x23d4fb(0x150)]();return _0x4ef765?_0x4ef765:undefined;}
@@ -1 +1 @@
1
- (function(_0x3205b9,_0x5e976a){const _0x4c08cc=a99_0x3644,_0x5dd1be=_0x3205b9();while(!![]){try{const _0x5b181c=-parseInt(_0x4c08cc(0xc8))/0x1+parseInt(_0x4c08cc(0xb1))/0x2*(-parseInt(_0x4c08cc(0x9b))/0x3)+-parseInt(_0x4c08cc(0xbb))/0x4+parseInt(_0x4c08cc(0xa2))/0x5*(parseInt(_0x4c08cc(0xc4))/0x6)+-parseInt(_0x4c08cc(0x9f))/0x7+-parseInt(_0x4c08cc(0xa9))/0x8+-parseInt(_0x4c08cc(0xa7))/0x9*(-parseInt(_0x4c08cc(0xb8))/0xa);if(_0x5b181c===_0x5e976a)break;else _0x5dd1be['push'](_0x5dd1be['shift']());}catch(_0xd96ce3){_0x5dd1be['push'](_0x5dd1be['shift']());}}}(a99_0x280a,0xa49e6));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a99_0x3644(_0x406f5a,_0x4bd7da){_0x406f5a=_0x406f5a-0x9b;const _0x280af0=a99_0x280a();let _0x3644e2=_0x280af0[_0x406f5a];return _0x3644e2;}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(_0x1fc8a7,_0x2fd612,_0x539867={}){const _0x5ef64a=a99_0x3644,_0x17e9e4=resolvePushDirectoryRoot(_0x1fc8a7),_0x3c9572=readMetadataIfPresent(resolve(_0x17e9e4,METADATA_FILE));if(_0x3c9572?.[_0x5ef64a(0xbd)]&&_0x3c9572['appCode']!==_0x2fd612&&!_0x539867[_0x5ef64a(0x9c)])throw CliErrors[_0x5ef64a(0xcb)]('Skill\x20metadata\x20appCode\x20\x22'+_0x3c9572[_0x5ef64a(0xbd)]+_0x5ef64a(0xc6)+_0x2fd612+'\x22.');const _0x490e37=_0x3c9572?.[_0x5ef64a(0xc7)]?.['trim']()||deriveSkillCodeFromDirectory(_0x17e9e4,_0x2fd612);if(!_0x490e37)throw CliErrors[_0x5ef64a(0xcb)](_0x5ef64a(0xb2)+METADATA_FILE+_0x5ef64a(0xc0));return{'dir':_0x17e9e4,'skillCode':_0x490e37,'metadata':_0x3c9572};}export function readPushDirectory(_0xdbb200,_0xef726f,_0x4c2e67={}){const _0x8495ce=a99_0x3644,_0x5ddd50=resolvePushDirectoryIdentity(_0xdbb200,_0xef726f,_0x4c2e67),_0x1aee6=_0x5ddd50[_0x8495ce(0xc3)],_0x2caceb=resolve(_0x1aee6,SKILL_FILE);if(!existsSync(_0x2caceb)||!lstatSync(_0x2caceb)[_0x8495ce(0xc9)]())throw CliErrors[_0x8495ce(0xcb)](_0x8495ce(0xb3)+SKILL_FILE+':\x20'+_0x2caceb);const _0x45acd8=_0x5ddd50[_0x8495ce(0xa5)],_0x52a979=_0x4c2e67[_0x8495ce(0xa0)]??_0x8495ce(0xb5);if(_0x45acd8?.[_0x8495ce(0xad)]===_0x8495ce(0xb9))throw CliErrors[_0x8495ce(0xcb)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x8495ce(0x9d)+_0x45acd8[_0x8495ce(0xad)]+'\x22.');if(_0x52a979==='personal'&&_0x45acd8?.['scope']&&_0x45acd8[_0x8495ce(0xad)]!==_0x8495ce(0xb5))throw CliErrors[_0x8495ce(0xcb)](_0x8495ce(0xcf)+METADATA_FILE+_0x8495ce(0x9d)+_0x45acd8['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x1aee6+_0x8495ce(0xc2));const _0x1c20bc=scanSkillDirectory(_0x1aee6),_0x1e1182=buildSkillPackage(_0x1c20bc),_0x534fd3=readFileSync(_0x2caceb,_0x8495ce(0xac)),_0x11b6f3=_0x5ddd50[_0x8495ce(0xc7)];return{'skillCode':_0x11b6f3,'metadata':_0x45acd8,'input':{'skillCode':_0x11b6f3,'skillName':_0x45acd8?.[_0x8495ce(0xb0)],'description':_0x45acd8?.[_0x8495ce(0xaa)],'content':_0x534fd3,'files':_0x1e1182[_0x8495ce(0xcc)],'packageBase64':_0x1e1182[_0x8495ce(0xbf)],'tags':_0x45acd8?.['tags'],'version':_0x45acd8?.[_0x8495ce(0xbe)],'sourceSessionId':_0x45acd8?.[_0x8495ce(0xae)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x96914c,_0x1c22e9,_0x4e593c,_0x9a41f0={}){const _0x513ad3=a99_0x3644,_0x5349bd=resolvePushDirectoryRoot(_0x96914c),_0x2e9922=readMetadataIfPresent(resolve(_0x5349bd,METADATA_FILE)),_0x20b22b=requireRemoteScope(_0x1c22e9),_0x2a9b9f=readLocalSkillContent(_0x5349bd),_0x3ab6c3={..._0x1c22e9,'appCode':_0x1c22e9['appCode']??_0x4e593c,'skillName':_0x1c22e9['skillName']??_0x2e9922?.['skillName'],'description':_0x1c22e9[_0x513ad3(0xaa)]??_0x2e9922?.[_0x513ad3(0xaa)],'tags':Array[_0x513ad3(0xa8)](_0x1c22e9[_0x513ad3(0x9e)])?_0x1c22e9[_0x513ad3(0x9e)]:_0x2e9922?.[_0x513ad3(0x9e)],'sourceSessionId':_0x1c22e9[_0x513ad3(0xae)]??_0x2e9922?.[_0x513ad3(0xae)],'content':_0x1c22e9[_0x513ad3(0xc5)]??_0x2a9b9f},_0x2b97e0=buildMetadata(_0x3ab6c3,_0x20b22b,_0x4e593c,contentHash(_0x2a9b9f),_0x9a41f0[_0x513ad3(0xa3)]);writeJsonAtomic(resolve(_0x5349bd,METADATA_FILE),_0x2b97e0);}function a99_0x280a(){const _0x35edb3=['metadata','isDirectory','9oCmMoB','isArray','7080600STfyDA','description','\x20has\x20unsupported\x20scope\x20\x22','utf8','scope','sourceSessionId','files','skillName','89418XNgBGm','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Missing\x20','unknown','personal','path','(unknown)','24643650tLFGcj','builtin','some','2125632jgDKWa','company','appCode','version','packageBase64','\x20or\x20directory\x20name.','isSymbolicLink','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','dir','4908ubdoSb','content','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','skillCode','273960nahYBL','isFile','length','validation','manifest','find','Skill\x20directory\x20not\x20found:\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','3KMQjww','allowAppCodeRetarget','\x20has\x20scope=\x22','tags','7931413MvwLbt','targetScope','filter','6590OyHgsx','refreshedAt','startsWith'];a99_0x280a=function(){return _0x35edb3;};return a99_0x280a();}export function recordPushedRuntimeSkill(_0x36d957,_0x24ca62,_0x4fb65a,_0x4399e6={}){const _0x2d9603=a99_0x3644,_0x16e587=resolvePushDirectoryRoot(_0x36d957),_0xeb185c=scanSkillDirectory(_0x16e587),_0x3ec5cf=_0xeb185c[_0x2d9603(0xcd)](_0x13ae86=>_0x13ae86[_0x2d9603(0xb6)]===SKILL_FILE),_0x1c2aa7=_0x3ec5cf?fileText(_0x3ec5cf):'',_0x1ace69=tryNormalizePackageManifest(_0x24ca62[_0x2d9603(0xaf)]),_0x35a156={..._0x24ca62,'content':_0x24ca62[_0x2d9603(0xc5)]??_0x1c2aa7,'files':_0x1ace69},_0x137903=_0x1ace69?normalizeLocalFiles(_0xeb185c)[_0x2d9603(0xa1)](_0x47f44d=>_0x1ace69[_0x2d9603(0xaf)][_0x2d9603(0xba)](_0x4e9e1e=>_0x4e9e1e[_0x2d9603(0xb6)]===_0x47f44d['path'])):undefined,_0x2905b0=buildMetadata(_0x35a156,_0x4399e6[_0x2d9603(0xad)]??'personal',_0x4fb65a,contentHash(_0x35a156[_0x2d9603(0xc5)]??''),_0x4399e6['pushedAt'],_0x137903);writeJsonAtomic(resolve(_0x16e587,METADATA_FILE),_0x2905b0);}export function deriveSkillCodeFromDirectory(_0x16fe08,_0xf5b2a4){const _0x22ab37=a99_0x3644,_0x317a13=basename(resolve(_0x16fe08)),_0x119975=_0xf5b2a4+'--';return _0x317a13[_0x22ab37(0xa4)](_0x119975)?_0x317a13['slice'](_0x119975[_0x22ab37(0xca)]):_0x317a13;}function resolvePushDirectoryRoot(_0x58031d){const _0x2f222a=a99_0x3644,_0x1779a7=resolve(_0x58031d);if(!existsSync(_0x1779a7))throw CliErrors[_0x2f222a(0xcb)](_0x2f222a(0xce)+_0x58031d);const _0x3cecc7=lstatSync(_0x1779a7);if(_0x3cecc7[_0x2f222a(0xa6)]())return _0x1779a7;if(_0x3cecc7[_0x2f222a(0xc1)]()){const _0x45450f=realpathSync(_0x1779a7);if(lstatSync(_0x45450f)[_0x2f222a(0xa6)]())return _0x45450f;}throw CliErrors[_0x2f222a(0xcb)]('Skill\x20directory\x20not\x20found:\x20'+_0x58031d);}function requireRemoteScope(_0x10bf53){const _0x44e18a=a99_0x3644;if(_0x10bf53['scope']===_0x44e18a(0xb5)||_0x10bf53[_0x44e18a(0xad)]===_0x44e18a(0xbc)||_0x10bf53[_0x44e18a(0xad)]===_0x44e18a(0xb9))return _0x10bf53[_0x44e18a(0xad)];throw CliErrors[_0x44e18a(0xcb)]('Remote\x20Skill\x20'+(_0x10bf53[_0x44e18a(0xc7)]||_0x44e18a(0xb7))+_0x44e18a(0xab)+(_0x10bf53['scope']??_0x44e18a(0xb4))+'\x22.');}function readLocalSkillContent(_0x2b9c89){const _0xf3ade4=a99_0x3644,_0x191b50=resolve(_0x2b9c89,SKILL_FILE);return existsSync(_0x191b50)&&lstatSync(_0x191b50)[_0xf3ade4(0xc9)]()?readFileSync(_0x191b50,_0xf3ade4(0xac)):'';}
1
+ (function(_0x473b5d,_0x533235){const _0x1fc4a7=a104_0x2c0c,_0x1ec538=_0x473b5d();while(!![]){try{const _0x1ea35f=parseInt(_0x1fc4a7(0x80))/0x1+-parseInt(_0x1fc4a7(0xa1))/0x2+parseInt(_0x1fc4a7(0xa5))/0x3*(parseInt(_0x1fc4a7(0x84))/0x4)+-parseInt(_0x1fc4a7(0x7a))/0x5+parseInt(_0x1fc4a7(0x94))/0x6*(-parseInt(_0x1fc4a7(0xa2))/0x7)+-parseInt(_0x1fc4a7(0x79))/0x8+-parseInt(_0x1fc4a7(0x83))/0x9*(-parseInt(_0x1fc4a7(0x7f))/0xa);if(_0x1ea35f===_0x533235)break;else _0x1ec538['push'](_0x1ec538['shift']());}catch(_0x7aedad){_0x1ec538['push'](_0x1ec538['shift']());}}}(a104_0x5f5c,0x7b0bf));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x1aab4e}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';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x3215b2,_0x43ca82,_0x42dcc1={}){const _0x3e9845=a104_0x2c0c,_0x1de5cb=resolvePushDirectoryRoot(_0x3215b2),_0x52b868=readPushMetadataIfPresent(resolve(_0x1de5cb,METADATA_FILE),{'ignoreInvalidMetadata':_0x42dcc1[_0x3e9845(0xaa)]});if(_0x52b868?.[_0x3e9845(0x87)]&&_0x52b868[_0x3e9845(0x87)]!==_0x43ca82&&!_0x42dcc1[_0x3e9845(0xb0)]&&!_0x42dcc1[_0x3e9845(0x7b)])throw CliErrors['validation'](_0x3e9845(0x9a)+_0x52b868[_0x3e9845(0x87)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x43ca82+'\x22.');const _0x364d1d=resolvePushSkillCode(_0x1de5cb,_0x43ca82,_0x52b868,_0x42dcc1);if(!_0x364d1d)throw CliErrors[_0x3e9845(0x97)](_0x3e9845(0x76)+SKILL_FILE+',\x20'+METADATA_FILE+_0x3e9845(0x7c));return{'dir':_0x1de5cb,'skillCode':_0x364d1d,'metadata':_0x52b868};}export function readPushDirectory(_0x330a33,_0x3c7d5d,_0x1c6ad7={}){const _0x99e5b2=a104_0x2c0c,_0x321316=resolvePushDirectoryIdentity(_0x330a33,_0x3c7d5d,_0x1c6ad7),_0x5a1479=_0x321316['dir'],_0x59f68e=resolve(_0x5a1479,SKILL_FILE);if(!existsSync(_0x59f68e)||!lstatSync(_0x59f68e)[_0x99e5b2(0x92)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0x59f68e);const _0x13fb9b=_0x321316['metadata'],_0x3d20a6=_0x1c6ad7[_0x99e5b2(0xad)]??_0x99e5b2(0xa9);if(!_0x1c6ad7[_0x99e5b2(0x8b)]&&_0x13fb9b?.['scope']===_0x99e5b2(0xaf))throw CliErrors[_0x99e5b2(0x97)](_0x99e5b2(0x71)+METADATA_FILE+_0x99e5b2(0xa0)+_0x13fb9b[_0x99e5b2(0xa4)]+'\x22.');if(!_0x1c6ad7['ignoreMetadataScope']&&_0x3d20a6==='personal'&&_0x13fb9b?.[_0x99e5b2(0xa4)]&&_0x13fb9b[_0x99e5b2(0xa4)]!==_0x99e5b2(0xa9))throw CliErrors[_0x99e5b2(0x97)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x99e5b2(0xa0)+_0x13fb9b[_0x99e5b2(0xa4)]+'\x22.',_0x99e5b2(0x75)+_0x5a1479+_0x99e5b2(0x93));const _0x3a9c26=scanSkillDirectory(_0x5a1479),_0x30da13=buildSkillPackage(_0x3a9c26),_0x2d7d00=readFileSync(_0x59f68e,'utf8'),_0x17a88d=_0x321316[_0x99e5b2(0x98)],_0x11ebe5=_0x1c6ad7[_0x99e5b2(0x8f)]?undefined:_0x13fb9b,_0x49545a=readSkillDisplayName(_0x2d7d00);return{'skillCode':_0x17a88d,'metadata':_0x13fb9b,'frontmatterDisplayName':_0x49545a,'input':{'skillCode':_0x17a88d,'skillName':_0x49545a??_0x11ebe5?.['skillName'],'description':_0x11ebe5?.[_0x99e5b2(0xa6)],'content':_0x2d7d00,'files':_0x30da13[_0x99e5b2(0x85)],'packageBase64':_0x30da13[_0x99e5b2(0x89)],'tags':_0x11ebe5?.[_0x99e5b2(0xa7)],'version':_0x11ebe5?.[_0x99e5b2(0x96)],'sourceSessionId':_0x11ebe5?.[_0x99e5b2(0x77)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x17f364,_0x867700,_0x49e879,_0x4e3054={}){const _0x29ba3d=a104_0x2c0c,_0x1bf098=resolvePushDirectoryRoot(_0x17f364),_0x1d82de=readPushMetadataIfPresent(resolve(_0x1bf098,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4d3b5a=requireRemoteScope(_0x867700),_0x22fa54=readLocalSkillContent(_0x1bf098),_0x34ed95={..._0x867700,'appCode':_0x867700[_0x29ba3d(0x87)]??_0x49e879,'skillName':_0x867700[_0x29ba3d(0x88)]??_0x1d82de?.[_0x29ba3d(0x88)],'description':_0x867700['description']??_0x1d82de?.[_0x29ba3d(0xa6)],'tags':Array[_0x29ba3d(0x72)](_0x867700[_0x29ba3d(0xa7)])?_0x867700[_0x29ba3d(0xa7)]:_0x1d82de?.['tags'],'sourceSessionId':_0x867700[_0x29ba3d(0x77)]??_0x1d82de?.[_0x29ba3d(0x77)],'content':_0x867700[_0x29ba3d(0x7d)]??_0x22fa54},_0x21383e=buildMetadata(_0x34ed95,_0x4d3b5a,_0x49e879,contentHash(_0x22fa54),_0x4e3054[_0x29ba3d(0x8e)]);writeJsonAtomic(resolve(_0x1bf098,METADATA_FILE),_0x21383e);}export function recordPushedRuntimeSkill(_0x46109b,_0x4c9182,_0x3654a5,_0x47d0bd={}){const _0x2f2e56=a104_0x2c0c,_0x15e47e=resolvePushDirectoryRoot(_0x46109b),_0x354ceb=scanSkillDirectory(_0x15e47e),_0x6af6bc=_0x354ceb[_0x2f2e56(0xab)](_0x20845e=>_0x20845e[_0x2f2e56(0x9c)]===SKILL_FILE),_0x10130d=_0x6af6bc?fileText(_0x6af6bc):'',_0x3c8268=tryNormalizePackageManifest(_0x4c9182['files']),_0x50ca34={..._0x4c9182,'content':_0x4c9182['content']??_0x10130d,'files':_0x3c8268},_0xfd2ea4=_0x3c8268?normalizeLocalFiles(_0x354ceb)[_0x2f2e56(0xae)](_0x7368ae=>_0x3c8268[_0x2f2e56(0xac)][_0x2f2e56(0x9f)](_0x846630=>_0x846630[_0x2f2e56(0x9c)]===_0x7368ae[_0x2f2e56(0x9c)])):undefined,_0x372f86=buildMetadata(_0x50ca34,_0x47d0bd[_0x2f2e56(0xa4)]??_0x2f2e56(0xa9),_0x3654a5,contentHash(_0x50ca34['content']??''),_0x47d0bd[_0x2f2e56(0x90)],_0xfd2ea4);writeJsonAtomic(resolve(_0x15e47e,METADATA_FILE),_0x372f86);}export function deriveSkillCodeFromDirectory(_0x564baf,_0x43c7c3){const _0x4062d5=a104_0x2c0c,_0x597871=basename(resolve(_0x564baf)),_0x3750d6=_0x43c7c3+'--';return _0x597871[_0x4062d5(0x9d)](_0x3750d6)?_0x597871['slice'](_0x3750d6[_0x4062d5(0x82)]):_0x597871;}function resolvePushSkillCode(_0x4ecb23,_0x514176,_0x435924,_0x5d9038){const _0x3d8aed=a104_0x2c0c,_0x3c4d2c=deriveSkillCodeFromSkillFile(_0x4ecb23)||deriveSkillCodeFromDirectory(_0x4ecb23,_0x514176);if(_0x5d9038[_0x3d8aed(0x95)])return _0x3c4d2c;return _0x435924?.[_0x3d8aed(0x98)]?.['trim']()||_0x3c4d2c;}function deriveSkillCodeFromSkillFile(_0x2421fb){const _0xacda93=a104_0x2c0c,_0x6eec8c=resolve(_0x2421fb,SKILL_FILE);if(!existsSync(_0x6eec8c)||!lstatSync(_0x6eec8c)[_0xacda93(0x92)]())return undefined;const _0x241af5=readFileSync(_0x6eec8c,_0xacda93(0x8a)),_0x59d184=_0x241af5[_0xacda93(0x99)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x59d184)return undefined;const _0x1be665=parseFrontmatterObject(_0x59d184[0x1]??''),_0x15cdd6=scalarToString(_0x1be665?.[_0xacda93(0x7e)]);return _0x15cdd6?slugifySkillName(_0x15cdd6):undefined;}function readSkillDisplayName(_0x7cfc97){const _0x5a24df=a104_0x2c0c,_0x2a9130=_0x7cfc97[_0x5a24df(0x99)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2a9130)return undefined;const _0xc67290=parseFrontmatterObject(_0x2a9130[0x1]??'');return scalarToString(_0xc67290?.['displayName']);}function slugifySkillName(_0x481d6e){const _0x2cb856=a104_0x2c0c,_0x3bb782=_0x481d6e[_0x2cb856(0xa8)]()['toLowerCase']()[_0x2cb856(0x74)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2cb856(0x74)](/^-+/,'')[_0x2cb856(0x74)](/-+$/,'')[_0x2cb856(0x74)](/-{2,}/g,'-');if(!_0x3bb782)throw CliErrors[_0x2cb856(0x97)]('Invalid\x20'+SKILL_FILE+_0x2cb856(0x9e));return _0x3bb782;}function parseFrontmatterObject(_0x3c95d5){const _0x3a31bb=a104_0x2c0c;try{const _0x1af893=a104_0x1aab4e(_0x3c95d5);return _0x1af893&&typeof _0x1af893==='object'&&!Array[_0x3a31bb(0x72)](_0x1af893)?_0x1af893:undefined;}catch{return undefined;}}function scalarToString(_0xa52d4b){const _0x18837a=a104_0x2c0c;if(typeof _0xa52d4b===_0x18837a(0x86))return _0xa52d4b[_0x18837a(0xa8)]();if(typeof _0xa52d4b===_0x18837a(0x8c)||typeof _0xa52d4b==='boolean')return String(_0xa52d4b);return undefined;}function a104_0x5f5c(){const _0x1f2f43=['isSymbolicLink','isFile','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','425244bDGXuW','ignoreMetadataSkillCode','version','validation','skillCode','match','Skill\x20metadata\x20appCode\x20\x22','(unknown)','path','startsWith','\x20name\x20for\x20SkillHub\x20slug\x20generation.','some','\x20has\x20scope=\x22','1928108GSneSg','77trppey','Remote\x20Skill\x20','scope','841953UdrVaq','description','tags','trim','personal','ignoreInvalidMetadata','find','files','targetScope','filter','builtin','allowAppCodeRetarget','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','isArray','company','replace','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Unable\x20to\x20resolve\x20skillCode\x20from\x20','sourceSessionId','Skill\x20directory\x20not\x20found:\x20','4896040YACCYn','343170vwvbtm','ignoreMetadataAppCodeMismatch',',\x20or\x20directory\x20name.','content','name','380fMEhFH','675455FmYrFb','isDirectory','length','467100kpucZs','4muzdBF','manifest','string','appCode','skillName','packageBase64','utf8','ignoreMetadataScope','number','\x20has\x20unsupported\x20scope\x20\x22','refreshedAt','ignoreMetadataForPayload','pushedAt'];a104_0x5f5c=function(){return _0x1f2f43;};return a104_0x5f5c();}function resolvePushDirectoryRoot(_0x5072c5){const _0x1ae8da=a104_0x2c0c,_0x1b8b58=resolve(_0x5072c5);if(!existsSync(_0x1b8b58))throw CliErrors[_0x1ae8da(0x97)](_0x1ae8da(0x78)+_0x5072c5);const _0x428566=lstatSync(_0x1b8b58);if(_0x428566[_0x1ae8da(0x81)]())return _0x1b8b58;if(_0x428566[_0x1ae8da(0x91)]()){const _0x113b69=realpathSync(_0x1b8b58);if(lstatSync(_0x113b69)[_0x1ae8da(0x81)]())return _0x113b69;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x5072c5);}function requireRemoteScope(_0x2c72dc){const _0x5f0fc9=a104_0x2c0c;if(_0x2c72dc[_0x5f0fc9(0xa4)]===_0x5f0fc9(0xa9)||_0x2c72dc[_0x5f0fc9(0xa4)]===_0x5f0fc9(0x73)||_0x2c72dc[_0x5f0fc9(0xa4)]===_0x5f0fc9(0xaf))return _0x2c72dc['scope'];throw CliErrors[_0x5f0fc9(0x97)](_0x5f0fc9(0xa3)+(_0x2c72dc[_0x5f0fc9(0x98)]||_0x5f0fc9(0x9b))+_0x5f0fc9(0x8d)+(_0x2c72dc['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x2d91d1){const _0x25d788=a104_0x2c0c,_0x5eb108=resolve(_0x2d91d1,SKILL_FILE);return existsSync(_0x5eb108)&&lstatSync(_0x5eb108)[_0x25d788(0x92)]()?readFileSync(_0x5eb108,_0x25d788(0x8a)):'';}function a104_0x2c0c(_0x5852a9,_0x3db8a4){_0x5852a9=_0x5852a9-0x71;const _0x5f5c71=a104_0x5f5c();let _0x2c0c03=_0x5f5c71[_0x5852a9];return _0x2c0c03;}function readPushMetadataIfPresent(_0x899662,_0x178789={}){const _0x28c9da=a104_0x2c0c;try{return readMetadataIfPresent(_0x899662);}catch(_0x4262a1){if(_0x178789[_0x28c9da(0xaa)])return undefined;throw _0x4262a1;}}
@@ -1 +1 @@
1
- function a100_0xa849(){const _0x5de5b5=['208UKrgpY','validation','Unsupported\x20runtime\x20Skill\x20scope:\x20','612639YWjrwu','385057lWrPGA','company','1824685nMrPoI','51268AuPrhR','9dRIRoa','includes','length','2119190mBIIUL','push','4TqNwgO','594540iuVcUl','10369931cbhwfM','personal','builtin','4mbGzoF'];a100_0xa849=function(){return _0x5de5b5;};return a100_0xa849();}(function(_0x3fe6cd,_0x4ebf83){const _0x3e074b=a100_0x3287,_0x452011=_0x3fe6cd();while(!![]){try{const _0x500923=-parseInt(_0x3e074b(0x142))/0x1+parseInt(_0x3e074b(0x13d))/0x2*(-parseInt(_0x3e074b(0x141))/0x3)+parseInt(_0x3e074b(0x138))/0x4*(parseInt(_0x3e074b(0x144))/0x5)+parseInt(_0x3e074b(0x139))/0x6+-parseInt(_0x3e074b(0x145))/0x7*(parseInt(_0x3e074b(0x13e))/0x8)+parseInt(_0x3e074b(0x133))/0x9*(-parseInt(_0x3e074b(0x136))/0xa)+parseInt(_0x3e074b(0x13a))/0xb;if(_0x500923===_0x4ebf83)break;else _0x452011['push'](_0x452011['shift']());}catch(_0x1ce7ec){_0x452011['push'](_0x452011['shift']());}}}(a100_0xa849,0x337ea));function a100_0x3287(_0x4193f1,_0xb1aee7){_0x4193f1=_0x4193f1-0x133;const _0xa849fc=a100_0xa849();let _0x3287de=_0xa849fc[_0x4193f1];return _0x3287de;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x25c22a){const _0x55548b=a100_0x3287,_0x450b60=_0x25c22a&&_0x25c22a[_0x55548b(0x135)]>0x0?_0x25c22a:['personal',_0x55548b(0x143),_0x55548b(0x13c)],_0x1e28a4=[];for(const _0x3d64c9 of _0x450b60){if(!isRuntimeSkillScope(_0x3d64c9))throw CliErrors[_0x55548b(0x13f)](_0x55548b(0x140)+_0x3d64c9);!_0x1e28a4[_0x55548b(0x134)](_0x3d64c9)&&_0x1e28a4[_0x55548b(0x137)](_0x3d64c9);}return _0x1e28a4;}export function isRuntimeSkillScope(_0x4134c9){const _0x58f4f2=a100_0x3287;return _0x4134c9===_0x58f4f2(0x13b)||_0x4134c9===_0x58f4f2(0x143)||_0x4134c9==='builtin';}
1
+ function a105_0x1369(_0x5b9e57,_0x389125){_0x5b9e57=_0x5b9e57-0x7d;const _0x9edacc=a105_0x9eda();let _0x136964=_0x9edacc[_0x5b9e57];return _0x136964;}(function(_0x389e00,_0x2ae0f3){const _0x1c66b4=a105_0x1369,_0x1f41ff=_0x389e00();while(!![]){try{const _0x50054c=parseInt(_0x1c66b4(0x81))/0x1+-parseInt(_0x1c66b4(0x86))/0x2+-parseInt(_0x1c66b4(0x88))/0x3*(-parseInt(_0x1c66b4(0x7f))/0x4)+parseInt(_0x1c66b4(0x83))/0x5+-parseInt(_0x1c66b4(0x7d))/0x6+parseInt(_0x1c66b4(0x87))/0x7*(-parseInt(_0x1c66b4(0x89))/0x8)+-parseInt(_0x1c66b4(0x8d))/0x9*(-parseInt(_0x1c66b4(0x84))/0xa);if(_0x50054c===_0x2ae0f3)break;else _0x1f41ff['push'](_0x1f41ff['shift']());}catch(_0x2c4c0d){_0x1f41ff['push'](_0x1f41ff['shift']());}}}(a105_0x9eda,0xae992));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x2f6e53){const _0x5aa708=a105_0x1369,_0xcb8e8c=_0x2f6e53&&_0x2f6e53[_0x5aa708(0x80)]>0x0?_0x2f6e53:[_0x5aa708(0x8b),'company',_0x5aa708(0x8c)],_0x16708c=[];for(const _0x1a0c39 of _0xcb8e8c){if(!isRuntimeSkillScope(_0x1a0c39))throw CliErrors[_0x5aa708(0x8a)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x1a0c39);!_0x16708c[_0x5aa708(0x85)](_0x1a0c39)&&_0x16708c[_0x5aa708(0x7e)](_0x1a0c39);}return _0x16708c;}function a105_0x9eda(){const _0x480b83=['7MHJMYy','12bITCHu','5430184alrCxO','validation','personal','builtin','2579823VcdKQp','5343954jTKCSq','push','800332xgBdHv','length','1215368lpReQZ','company','7170tafgZE','40COydUI','includes','1758272utQcrB'];a105_0x9eda=function(){return _0x480b83;};return a105_0x9eda();}export function isRuntimeSkillScope(_0xca7fc1){const _0x24e07b=a105_0x1369;return _0xca7fc1==='personal'||_0xca7fc1===_0x24e07b(0x82)||_0xca7fc1===_0x24e07b(0x8c);}
@@ -1 +1 @@
1
- const a102_0x553462=a102_0x4803;(function(_0x2dfd99,_0x505279){const _0x10303b=a102_0x4803,_0x2146f5=_0x2dfd99();while(!![]){try{const _0x871c7c=-parseInt(_0x10303b(0xb0))/0x1*(parseInt(_0x10303b(0x9c))/0x2)+parseInt(_0x10303b(0xb1))/0x3*(-parseInt(_0x10303b(0x9a))/0x4)+parseInt(_0x10303b(0xa5))/0x5*(-parseInt(_0x10303b(0x9b))/0x6)+-parseInt(_0x10303b(0xa9))/0x7*(parseInt(_0x10303b(0xa2))/0x8)+-parseInt(_0x10303b(0xa1))/0x9*(parseInt(_0x10303b(0xa3))/0xa)+-parseInt(_0x10303b(0xac))/0xb+parseInt(_0x10303b(0xad))/0xc;if(_0x871c7c===_0x505279)break;else _0x2146f5['push'](_0x2146f5['shift']());}catch(_0x45db5d){_0x2146f5['push'](_0x2146f5['shift']());}}}(a102_0x3617,0xdc883));function a102_0x4803(_0x4996bc,_0x224bc5){_0x4996bc=_0x4996bc-0x9a;const _0x36176e=a102_0x3617();let _0x48034e=_0x36176e[_0x4996bc];return _0x48034e;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a102_0x3617(){const _0x57dce3=['14504hTMHvC','1748496izFwKd','611980HNPjHr','entries','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','path','endsWith','9382626nzeaCr','5429296nNCMCP','10brKfuI','validation','25aGislM','sort','from','1980-01-01T00:00:00.000Z','14sJxTnu','code','map','16362478CQrNsF','88782756atCYCm','name','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1vzIxmE','699MOyHMv'];a102_0x3617=function(){return _0x57dce3;};return a102_0x3617();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a102_0x553462(0xa8));export function createDeterministicZipPackage(_0x2a498e){const _0x14e5a7=a102_0x553462,_0x5dd3c6={};for(const _0x1b640b of normalizeLocalFiles(_0x2a498e)){_0x5dd3c6[_0x1b640b[_0x14e5a7(0x9f)]]=fileContent(_0x1b640b);}return Buffer[_0x14e5a7(0xa7)](zipSync(_0x5dd3c6,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x397ec3){const _0x45688e=a102_0x553462;if(_0x397ec3['length']<0x16)throw CliErrors[_0x45688e(0xa4)](_0x45688e(0x9e));let _0xb6bcbf;try{_0xb6bcbf=unzipSync(_0x397ec3,{'filter'(_0x485730){const _0x5a43b5=_0x45688e,_0x50a5d5=normalizeSkillRelativePath(_0x485730[_0x5a43b5(0xae)]);if(_0x50a5d5[_0x5a43b5(0xa0)]('/'))throw CliErrors['validation'](_0x5a43b5(0xaf)+_0x50a5d5);return!![];}});}catch(_0x24e3ec){if(isRuntimeSkillValidationError(_0x24e3ec))throw _0x24e3ec;throw CliErrors[_0x45688e(0xa4)](_0x45688e(0x9e));}return Object[_0x45688e(0x9d)](_0xb6bcbf)[_0x45688e(0xab)](([_0x2bc060,_0x5a206e])=>({'path':normalizeSkillRelativePath(_0x2bc060),'bytes':Buffer['from'](_0x5a206e)}))[_0x45688e(0xa6)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x443019){const _0x4c063c=a102_0x553462;return typeof _0x443019==='object'&&_0x443019!==null&&'code'in _0x443019&&_0x443019[_0x4c063c(0xaa)]==='validation_error';}
1
+ const a107_0x2896f7=a107_0x190b;(function(_0x12235d,_0x298b50){const _0x545e7a=a107_0x190b,_0x5c65d8=_0x12235d();while(!![]){try{const _0x41f75b=parseInt(_0x545e7a(0x1cf))/0x1+-parseInt(_0x545e7a(0x1d3))/0x2+-parseInt(_0x545e7a(0x1be))/0x3*(parseInt(_0x545e7a(0x1c1))/0x4)+parseInt(_0x545e7a(0x1cb))/0x5*(-parseInt(_0x545e7a(0x1c6))/0x6)+-parseInt(_0x545e7a(0x1d2))/0x7+parseInt(_0x545e7a(0x1c5))/0x8+-parseInt(_0x545e7a(0x1cd))/0x9*(-parseInt(_0x545e7a(0x1c7))/0xa);if(_0x41f75b===_0x298b50)break;else _0x5c65d8['push'](_0x5c65d8['shift']());}catch(_0x343fa2){_0x5c65d8['push'](_0x5c65d8['shift']());}}}(a107_0x1522,0xe22ae));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_0x2896f7(0x1c3));function a107_0x1522(){const _0x4b99b7=['map','15021cqhgfl','code','1776627VqMUvH','from','length','530110UsbtSG','1866862RRhify','148101vFCWHm','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation_error','92sULKXr','entries','1980-01-01T00:00:00.000Z','sort','6367480PInnho','12RHWmeo','7240FjBpGA','validation','name','object','1774835IZAndm'];a107_0x1522=function(){return _0x4b99b7;};return a107_0x1522();}export function createDeterministicZipPackage(_0x55ba30){const _0x390ffd=a107_0x2896f7,_0x34ee42={};for(const _0x7028d7 of normalizeLocalFiles(_0x55ba30)){_0x34ee42[_0x7028d7['path']]=fileContent(_0x7028d7);}return Buffer[_0x390ffd(0x1d0)](zipSync(_0x34ee42,{'level':0x0,'mtime':ZIP_MTIME}));}function a107_0x190b(_0x5c10a1,_0x55e749){_0x5c10a1=_0x5c10a1-0x1be;const _0x1522f6=a107_0x1522();let _0x190b98=_0x1522f6[_0x5c10a1];return _0x190b98;}export function parseZipPackage(_0x202574){const _0x9368b9=a107_0x2896f7;if(_0x202574[_0x9368b9(0x1d1)]<0x16)throw CliErrors[_0x9368b9(0x1c8)](_0x9368b9(0x1bf));let _0x371ba6;try{_0x371ba6=unzipSync(_0x202574,{'filter'(_0x894339){const _0x45957b=_0x9368b9,_0x552592=normalizeSkillRelativePath(_0x894339[_0x45957b(0x1c9)]);if(_0x552592['endsWith']('/'))throw CliErrors[_0x45957b(0x1c8)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x552592);return!![];}});}catch(_0x12afa5){if(isRuntimeSkillValidationError(_0x12afa5))throw _0x12afa5;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x9368b9(0x1c2)](_0x371ba6)[_0x9368b9(0x1cc)](([_0x15cd9c,_0x1a9735])=>({'path':normalizeSkillRelativePath(_0x15cd9c),'bytes':Buffer[_0x9368b9(0x1d0)](_0x1a9735)}))[_0x9368b9(0x1c4)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x3c6c51){const _0x2abac9=a107_0x2896f7;return typeof _0x3c6c51===_0x2abac9(0x1ca)&&_0x3c6c51!==null&&_0x2abac9(0x1ce)in _0x3c6c51&&_0x3c6c51[_0x2abac9(0x1ce)]===_0x2abac9(0x1c0);}