@lovrabet/lovrabet-cli 2.1.8-beta.3 → 2.1.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/index.js +1 -1
  41. package/lib/commands/service/registry.js +1 -1
  42. package/lib/commands/skill/commands/create.js +1 -1
  43. package/lib/commands/skill/commands/install.js +1 -1
  44. package/lib/commands/skill/commands/list.js +1 -1
  45. package/lib/commands/skill/commands/push.js +1 -1
  46. package/lib/commands/skill/commands/validate.js +1 -1
  47. package/lib/commands/skill/flags.js +1 -1
  48. package/lib/commands/skill/index.js +1 -1
  49. package/lib/commands/skill/manifest-helpers.js +1 -1
  50. package/lib/commands/skill/push-execute.js +1 -1
  51. package/lib/commands/skill/push-flow-helpers.js +1 -1
  52. package/lib/commands/skill/push-retarget.js +1 -1
  53. package/lib/commands/skill/scopes.js +1 -1
  54. package/lib/commands/skill/summary.js +1 -1
  55. package/lib/commands/skill/templates.js +1 -1
  56. package/lib/commands/skill/validate.js +1 -1
  57. package/lib/commands/sql/detail.js +1 -1
  58. package/lib/commands/sql/exec.js +1 -1
  59. package/lib/commands/sql/index.js +1 -1
  60. package/lib/commands/update.js +1 -1
  61. package/lib/commands/workspace/index.js +1 -1
  62. package/lib/config/schema.js +1 -1
  63. package/lib/constant/app.js +1 -1
  64. package/lib/constant/auth-mode.js +1 -1
  65. package/lib/constant/cli.js +1 -1
  66. package/lib/constant/defaults.js +1 -1
  67. package/lib/constant/distribution.js +1 -1
  68. package/lib/constant/domain.js +1 -1
  69. package/lib/constant/env.js +1 -1
  70. package/lib/constant/output.js +1 -1
  71. package/lib/constant/product.js +1 -1
  72. package/lib/constant/risk.js +1 -1
  73. package/lib/constant/url.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/db-resolver.js +1 -1
  77. package/lib/core/sdk-client.js +1 -1
  78. package/lib/errors.js +1 -1
  79. package/lib/framework/build-all-flags.js +1 -1
  80. package/lib/framework/dryrun.js +1 -1
  81. package/lib/framework/flags.js +1 -1
  82. package/lib/framework/help.js +1 -1
  83. package/lib/framework/index.js +1 -1
  84. package/lib/framework/output.js +1 -1
  85. package/lib/framework/preparse.js +1 -1
  86. package/lib/framework/response.js +1 -1
  87. package/lib/framework/runner-confirmation.js +1 -1
  88. package/lib/framework/runner-error.js +1 -1
  89. package/lib/framework/runner.js +1 -1
  90. package/lib/framework/schema-export.js +1 -1
  91. package/lib/framework/service-order.js +1 -1
  92. package/lib/framework/types.js +1 -1
  93. package/lib/generated/build-info.js +1 -1
  94. package/lib/help.js +1 -1
  95. package/lib/skills/npx-skills-add.js +1 -1
  96. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  97. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  98. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  99. package/lib/skills/runtime-skill-sync/links.js +1 -1
  100. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  101. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  102. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  103. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  104. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  105. package/lib/skills/runtime-skill-sync/push.js +1 -1
  106. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  107. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  109. package/lib/skills/runtime-skill-sync.js +1 -1
  110. package/lib/utils/apply-jq-filter.js +1 -1
  111. package/lib/utils/logger.js +1 -1
  112. package/lib/utils/params.js +1 -1
  113. package/lib/utils/platform.js +1 -1
  114. package/lib/utils/update-notice.js +1 -1
  115. package/lib/utils/version.js +1 -1
  116. package/lib/utils/write-cli-side-channel.js +1 -1
  117. package/package.json +1 -1
@@ -1 +1 @@
1
- function a92_0x1fb4(){const _0x204b02=['533861RONWHn','1072750sHewah','133mNaeYw','630sjTRji','2.1.8-beta.3','2340740DdgsrV','126798TZuMJM','564336TypArj','741KJqoVF','v2.1.8-beta.3','5fnJIdX','1375640plrsTw','2026-07-08T05:47:14.579Z'];a92_0x1fb4=function(){return _0x204b02;};return a92_0x1fb4();}function a92_0x1d5e(_0x532bd8,_0xc93de8){_0x532bd8=_0x532bd8-0xdd;const _0x1fb43c=a92_0x1fb4();let _0x1d5e2e=_0x1fb43c[_0x532bd8];return _0x1d5e2e;}const a92_0x5ed4d9=a92_0x1d5e;(function(_0x4f1152,_0x270b0f){const _0x11fd35=a92_0x1d5e,_0x5b0e04=_0x4f1152();while(!![]){try{const _0x1e7169=parseInt(_0x11fd35(0xe3))/0x1+parseInt(_0x11fd35(0xe6))/0x2*(-parseInt(_0x11fd35(0xde))/0x3)+-parseInt(_0x11fd35(0xe8))/0x4*(-parseInt(_0x11fd35(0xe0))/0x5)+-parseInt(_0x11fd35(0xe9))/0x6*(parseInt(_0x11fd35(0xe5))/0x7)+-parseInt(_0x11fd35(0xe1))/0x8+parseInt(_0x11fd35(0xdd))/0x9+-parseInt(_0x11fd35(0xe4))/0xa;if(_0x1e7169===_0x270b0f)break;else _0x5b0e04['push'](_0x5b0e04['shift']());}catch(_0x1bc2fd){_0x5b0e04['push'](_0x5b0e04['shift']());}}}(a92_0x1fb4,0x67514));export const VERSION=a92_0x5ed4d9(0xe7);export const GIT_TAG=a92_0x5ed4d9(0xdf);export const GIT_COMMIT='18d879c';export const BUILD_TIME=a92_0x5ed4d9(0xe2);
1
+ const a92_0x5dcb80=a92_0x1bf4;(function(_0x203637,_0x337f3a){const _0x549bd7=a92_0x1bf4,_0x55c08a=_0x203637();while(!![]){try{const _0xe48755=-parseInt(_0x549bd7(0x184))/0x1+-parseInt(_0x549bd7(0x187))/0x2+parseInt(_0x549bd7(0x181))/0x3*(-parseInt(_0x549bd7(0x182))/0x4)+parseInt(_0x549bd7(0x17f))/0x5+-parseInt(_0x549bd7(0x188))/0x6*(-parseInt(_0x549bd7(0x183))/0x7)+-parseInt(_0x549bd7(0x18a))/0x8+-parseInt(_0x549bd7(0x189))/0x9*(-parseInt(_0x549bd7(0x185))/0xa);if(_0xe48755===_0x337f3a)break;else _0x55c08a['push'](_0x55c08a['shift']());}catch(_0x192b06){_0x55c08a['push'](_0x55c08a['shift']());}}}(a92_0x1d63,0x1a99c));function a92_0x1d63(){const _0x3aaf76=['10254UTwezI','226242Vepdqs','780520eNgbGw','f0b64e6','21265nusnVU','2026-07-08T08:15:27.965Z','1257YylQeu','364zKcATq','14sLZPoF','93680EWKAeX','180XunWde','v2.1.9-beta.1','243650jhmAaN'];a92_0x1d63=function(){return _0x3aaf76;};return a92_0x1d63();}export const VERSION='2.1.9-beta.1';export const GIT_TAG=a92_0x5dcb80(0x186);function a92_0x1bf4(_0x1429f7,_0x269809){_0x1429f7=_0x1429f7-0x17e;const _0x1d63ae=a92_0x1d63();let _0x1bf41d=_0x1d63ae[_0x1429f7];return _0x1bf41d;}export const GIT_COMMIT=a92_0x5dcb80(0x17e);export const BUILD_TIME=a92_0x5dcb80(0x180);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x538a29,_0x150523){const _0x554f69=a93_0x32d9,_0x4f5b5a=_0x538a29();while(!![]){try{const _0x16be57=parseInt(_0x554f69(0xbc))/0x1*(parseInt(_0x554f69(0xb9))/0x2)+-parseInt(_0x554f69(0xc1))/0x3*(parseInt(_0x554f69(0xbd))/0x4)+parseInt(_0x554f69(0xb5))/0x5+-parseInt(_0x554f69(0xb7))/0x6+parseInt(_0x554f69(0xc0))/0x7*(-parseInt(_0x554f69(0xb6))/0x8)+parseInt(_0x554f69(0xbf))/0x9*(parseInt(_0x554f69(0xb8))/0xa)+parseInt(_0x554f69(0xc2))/0xb;if(_0x16be57===_0x150523)break;else _0x4f5b5a['push'](_0x4f5b5a['shift']());}catch(_0x37d97a){_0x4f5b5a['push'](_0x4f5b5a['shift']());}}}(a93_0x17d9,0x4ab4f));import{jsx as a93_0xf75f82,jsxs as a93_0x35b24f}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x32d9(_0x2b4616,_0x1eaeaa){_0x2b4616=_0x2b4616-0xb5;const _0x17d95f=a93_0x17d9();let _0x32d9cf=_0x17d95f[_0x2b4616];return _0x32d9cf;}function a93_0x17d9(){const _0x11e824=['5521GsJRMH','599756POZcbA','\x20--help','651978OaqpmX','14BozzIC','9KgZmhk','3444254ZfDdDj','2436200czrICI','978064ANeBBB','2140830cQXVaX','70opggNy','18CkQlxl','\x20to\x20view\x20available\x20commands.','green'];a93_0x17d9=function(){return _0x11e824;};return a93_0x17d9();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x2f8536=a93_0x32d9,{exit:_0x36f224}=useApp();return useEffect(()=>{_0x36f224();},[_0x36f224]),a93_0x35b24f(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a93_0xf75f82(Box,{'children':a93_0xf75f82(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x35b24f(Box,{'marginTop':0x1,'children':[a93_0xf75f82(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0xf75f82(Text,{'bold':!![],'color':_0x2f8536(0xbb),'children':CLI_BIN_NAME+_0x2f8536(0xbe)}),a93_0xf75f82(Text,{'dimColor':!![],'children':_0x2f8536(0xba)})]})]});}
1
+ function a93_0x5201(_0x1e583d,_0x3b6a7a){_0x1e583d=_0x1e583d-0x108;const _0x1adc8c=a93_0x1adc();let _0x52015f=_0x1adc8c[_0x1e583d];return _0x52015f;}(function(_0x14ac02,_0x43314f){const _0x2107e3=a93_0x5201,_0x4cb0cf=_0x14ac02();while(!![]){try{const _0x13bb14=parseInt(_0x2107e3(0x111))/0x1*(parseInt(_0x2107e3(0x10d))/0x2)+parseInt(_0x2107e3(0x116))/0x3+-parseInt(_0x2107e3(0x10b))/0x4*(parseInt(_0x2107e3(0x114))/0x5)+-parseInt(_0x2107e3(0x110))/0x6*(parseInt(_0x2107e3(0x115))/0x7)+-parseInt(_0x2107e3(0x109))/0x8+parseInt(_0x2107e3(0x108))/0x9+-parseInt(_0x2107e3(0x10f))/0xa*(-parseInt(_0x2107e3(0x112))/0xb);if(_0x13bb14===_0x43314f)break;else _0x4cb0cf['push'](_0x4cb0cf['shift']());}catch(_0x49f58b){_0x4cb0cf['push'](_0x4cb0cf['shift']());}}}(a93_0x1adc,0x90738));import{jsx as a93_0x108c9d,jsxs as a93_0x3720fa}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x1adc(){const _0x2da253=['32UZEvxL','286BuQsWj','\x20to\x20view\x20available\x20commands.','1268560dSwmCc','217yuIGWo','1208367IadosF','7633746SNYYwk','5049264eiWMmv','column','12ujCnMr','green','11576EMGvXm','\x20\x20Use\x20','400650TslgDr','95598MGrawr'];a93_0x1adc=function(){return _0x2da253;};return a93_0x1adc();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x2a6b73=a93_0x5201,{exit:_0x2a6101}=useApp();return useEffect(()=>{_0x2a6101();},[_0x2a6101]),a93_0x3720fa(Box,{'flexDirection':_0x2a6b73(0x10a),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x108c9d(Box,{'children':a93_0x108c9d(Text,{'bold':!![],'color':_0x2a6b73(0x10c),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x3720fa(Box,{'marginTop':0x1,'children':[a93_0x108c9d(Text,{'dimColor':!![],'children':_0x2a6b73(0x10e)}),a93_0x108c9d(Text,{'bold':!![],'color':_0x2a6b73(0x10c),'children':CLI_BIN_NAME+'\x20--help'}),a93_0x108c9d(Text,{'dimColor':!![],'children':_0x2a6b73(0x113)})]})]});}
@@ -1 +1 @@
1
- const a94_0x171905=a94_0x1a93;(function(_0x2e36a7,_0x2bf456){const _0x5acd3d=a94_0x1a93,_0x335211=_0x2e36a7();while(!![]){try{const _0x3f63b7=-parseInt(_0x5acd3d(0xfb))/0x1+parseInt(_0x5acd3d(0xfc))/0x2*(-parseInt(_0x5acd3d(0x100))/0x3)+-parseInt(_0x5acd3d(0x102))/0x4*(parseInt(_0x5acd3d(0xf5))/0x5)+parseInt(_0x5acd3d(0xf9))/0x6+parseInt(_0x5acd3d(0x104))/0x7+parseInt(_0x5acd3d(0xfd))/0x8*(parseInt(_0x5acd3d(0xf2))/0x9)+parseInt(_0x5acd3d(0xff))/0xa;if(_0x3f63b7===_0x2bf456)break;else _0x335211['push'](_0x335211['shift']());}catch(_0x2cc1ed){_0x335211['push'](_0x335211['shift']());}}}(a94_0x3ae1,0x58d7f));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x466352}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x3ae1(){const _0x137beb=['pipe','60320ITaTTb','unknown','exit\x20','stdout','1734900vmyTUp','npx','119275nVgcQl','400gOvqdy','30336oMSeqx','stderr','3104230IFvvkt','8193ICdSUa','status','132LTASSj','join','3486091kdyNoM','log','inherit','toString','skills','skipNpxSkillsEnvSuffix','783zVrOdC','trim'];a94_0x3ae1=function(){return _0x137beb;};return a94_0x3ae1();}export const LOVRABET_SKILL_SOURCE=a94_0x466352;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x171905(0xf1)]);function a94_0x1a93(_0x2cb651,_0x2dbad0){_0x2cb651=_0x2cb651-0xf0;const _0x3ae1fd=a94_0x3ae1();let _0x1a9329=_0x3ae1fd[_0x2cb651];return _0x1a9329;}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x33954c,_0x1d029d=LOVRABET_SKILL_SOURCE,_0x38edec){const _0x39b2dd=a94_0x171905;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x9649ef=_0x38edec?.['stdio']??_0x39b2dd(0x106),_0x430b47=resolveNpmBin(_0x39b2dd(0xfa)),_0x5d3268=[_0x39b2dd(0xf0),'add',_0x1d029d,'-g','-y'],_0x44f037=[_0x430b47,..._0x5d3268][_0x39b2dd(0x103)]('\x20');console[_0x39b2dd(0x105)]('*\x20'+_0x44f037);const _0x1952df=spawnSync(_0x430b47,_0x5d3268,{'cwd':_0x33954c,'stdio':_0x9649ef,'env':process.env,'shell':![]});if(_0x1952df[_0x39b2dd(0x101)]===0x0)return{'ok':!![],'status':0x0};let _0x31ed82=_0x39b2dd(0xf7)+(_0x1952df[_0x39b2dd(0x101)]??_0x39b2dd(0xf6));if(_0x9649ef===_0x39b2dd(0xf4)){const _0x215e4e=_0x1952df[_0x39b2dd(0xfe)]?_0x1952df[_0x39b2dd(0xfe)][_0x39b2dd(0x107)]()[_0x39b2dd(0xf3)]():'',_0x4fc2ac=_0x1952df[_0x39b2dd(0xf8)]?_0x1952df[_0x39b2dd(0xf8)]['toString']()[_0x39b2dd(0xf3)]():'';if(_0x215e4e)_0x31ed82=_0x215e4e;else{if(_0x4fc2ac)_0x31ed82=_0x4fc2ac;}}return{'ok':![],'status':_0x1952df['status']??null,'error':_0x31ed82};}
1
+ const a94_0x35c427=a94_0x179a;(function(_0x37c532,_0x23f92b){const _0xc3895=a94_0x179a,_0x5cee84=_0x37c532();while(!![]){try{const _0x528cbd=parseInt(_0xc3895(0xcb))/0x1*(parseInt(_0xc3895(0xd6))/0x2)+-parseInt(_0xc3895(0xcf))/0x3+parseInt(_0xc3895(0xd0))/0x4+parseInt(_0xc3895(0xca))/0x5+-parseInt(_0xc3895(0xdc))/0x6*(parseInt(_0xc3895(0xd2))/0x7)+-parseInt(_0xc3895(0xce))/0x8+parseInt(_0xc3895(0xd4))/0x9*(-parseInt(_0xc3895(0xd9))/0xa);if(_0x528cbd===_0x23f92b)break;else _0x5cee84['push'](_0x5cee84['shift']());}catch(_0x140ef7){_0x5cee84['push'](_0x5cee84['shift']());}}}(a94_0x4a75,0x35ee6));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x58c1bb}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x179a(_0xd0a859,_0x334c22){_0xd0a859=_0xd0a859-0xca;const _0x4a7522=a94_0x4a75();let _0x179abc=_0x4a7522[_0xd0a859];return _0x179abc;}function a94_0x4a75(){const _0x155791=['2TGYvgA','trim','stdout','1092760RrWGlN','302106iLwpOU','1698744ucOfpC','stdio','239218oyHoSc','skipNpxSkillsEnvSuffix','9OWgmNe','stderr','67908vsyIcJ','log','add','1342990eFfMqK','toString','status','36dEGRBX','inherit','1524740GpBdga'];a94_0x4a75=function(){return _0x155791;};return a94_0x4a75();}export const LOVRABET_SKILL_SOURCE=a94_0x58c1bb;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x35c427(0xd3)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x409e69,_0x2dd140=LOVRABET_SKILL_SOURCE,_0x380d1c){const _0x2ea2dc=a94_0x35c427;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x36defb=_0x380d1c?.[_0x2ea2dc(0xd1)]??_0x2ea2dc(0xdd),_0x5b5053=resolveNpmBin('npx'),_0x58dd25=['skills',_0x2ea2dc(0xd8),_0x2dd140,'-g','-y'],_0x20bb9e=[_0x5b5053,..._0x58dd25]['join']('\x20');console[_0x2ea2dc(0xd7)]('*\x20'+_0x20bb9e);const _0x3bf2d2=spawnSync(_0x5b5053,_0x58dd25,{'cwd':_0x409e69,'stdio':_0x36defb,'env':process.env,'shell':![]});if(_0x3bf2d2['status']===0x0)return{'ok':!![],'status':0x0};let _0x46eedb='exit\x20'+(_0x3bf2d2['status']??'unknown');if(_0x36defb==='pipe'){const _0x4cc064=_0x3bf2d2[_0x2ea2dc(0xd5)]?_0x3bf2d2[_0x2ea2dc(0xd5)][_0x2ea2dc(0xda)]()[_0x2ea2dc(0xcc)]():'',_0x5f2125=_0x3bf2d2['stdout']?_0x3bf2d2[_0x2ea2dc(0xcd)][_0x2ea2dc(0xda)]()['trim']():'';if(_0x4cc064)_0x46eedb=_0x4cc064;else{if(_0x5f2125)_0x46eedb=_0x5f2125;}}return{'ok':![],'status':_0x3bf2d2[_0x2ea2dc(0xdb)]??null,'error':_0x46eedb};}
@@ -1 +1 @@
1
- const a95_0x3557dd=a95_0x117f;(function(_0x21c3bc,_0xa6805a){const _0x3f0b0d=a95_0x117f,_0x337a8b=_0x21c3bc();while(!![]){try{const _0x4ccc75=-parseInt(_0x3f0b0d(0x1b9))/0x1+parseInt(_0x3f0b0d(0x1b4))/0x2*(-parseInt(_0x3f0b0d(0x1ae))/0x3)+-parseInt(_0x3f0b0d(0x1b5))/0x4+parseInt(_0x3f0b0d(0x1b1))/0x5*(parseInt(_0x3f0b0d(0x1a7))/0x6)+parseInt(_0x3f0b0d(0x1a8))/0x7+-parseInt(_0x3f0b0d(0x1b6))/0x8+-parseInt(_0x3f0b0d(0x1af))/0x9*(-parseInt(_0x3f0b0d(0x1ac))/0xa);if(_0x4ccc75===_0xa6805a)break;else _0x337a8b['push'](_0x337a8b['shift']());}catch(_0x1d42d4){_0x337a8b['push'](_0x337a8b['shift']());}}}(a95_0x3133,0x296d2));function a95_0x117f(_0x5d80ca,_0x27fdaf){_0x5d80ca=_0x5d80ca-0x1a7;const _0x313343=a95_0x3133();let _0x117fe1=_0x313343[_0x5d80ca];return _0x117fe1;}export const METADATA_FILE=a95_0x3557dd(0x1b8);export const SKILL_FILE=a95_0x3557dd(0x1a9);function a95_0x3133(){const _0x4adf60=['323336ljXtXs','703056gTDXNP','.cache','lovrabet.skill.json','119877yPOCNS','66SUrlHn','2241253cPeMFv','SKILL.md','coverage','.turbo','112390JJJQaI','.svn','12099UlmNdR','207dwdlOO','node_modules','93760JpvSpv','.git','build','162gUFzZt'];a95_0x3133=function(){return _0x4adf60;};return a95_0x3133();}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a95_0x3557dd(0x1b2),'.hg',a95_0x3557dd(0x1ad),a95_0x3557dd(0x1b0),'.next','dist',a95_0x3557dd(0x1b3),a95_0x3557dd(0x1aa),a95_0x3557dd(0x1ab),a95_0x3557dd(0x1b7)]);
1
+ function a95_0x6e30(_0x2c184e,_0x2e2088){_0x2c184e=_0x2c184e-0x76;const _0x217f8b=a95_0x217f();let _0x6e30af=_0x217f8b[_0x2c184e];return _0x6e30af;}const a95_0x24dc43=a95_0x6e30;(function(_0x36f9fb,_0x19d0ee){const _0x837d23=a95_0x6e30,_0x4213dd=_0x36f9fb();while(!![]){try{const _0x4479b0=parseInt(_0x837d23(0x89))/0x1+-parseInt(_0x837d23(0x76))/0x2*(parseInt(_0x837d23(0x7a))/0x3)+-parseInt(_0x837d23(0x7f))/0x4*(-parseInt(_0x837d23(0x7c))/0x5)+parseInt(_0x837d23(0x87))/0x6+-parseInt(_0x837d23(0x84))/0x7+parseInt(_0x837d23(0x7e))/0x8+-parseInt(_0x837d23(0x79))/0x9*(parseInt(_0x837d23(0x83))/0xa);if(_0x4479b0===_0x19d0ee)break;else _0x4213dd['push'](_0x4213dd['shift']());}catch(_0x310389){_0x4213dd['push'](_0x4213dd['shift']());}}}(a95_0x217f,0xc1c38));export const METADATA_FILE=a95_0x24dc43(0x81);export const SKILL_FILE=a95_0x24dc43(0x7d);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x24dc43(0x82)]);export const IGNORED_DIR_NAMES=new Set([a95_0x24dc43(0x88),a95_0x24dc43(0x86),a95_0x24dc43(0x8a),a95_0x24dc43(0x85),a95_0x24dc43(0x78),a95_0x24dc43(0x80),'build',a95_0x24dc43(0x7b),a95_0x24dc43(0x8b),a95_0x24dc43(0x77)]);function a95_0x217f(){const _0x18ab9c=['94TMwjsc','.cache','.next','4153356UNRjfa','67137owOSZg','coverage','15kZNbmQ','SKILL.md','5314696fcVrpx','1873340RcJlPr','dist','lovrabet.skill.json','.DS_Store','10Uwkozk','10702048AOyWFj','node_modules','.hg','4997898myYrqJ','.git','933492nupnfM','.svn','.turbo'];a95_0x217f=function(){return _0x18ab9c;};return a95_0x217f();}
@@ -1 +1 @@
1
- (function(_0x2a3e2f,_0x11b571){const _0x3132d0=a96_0x5a15,_0x5ae154=_0x2a3e2f();while(!![]){try{const _0x146e75=parseInt(_0x3132d0(0x7d))/0x1+-parseInt(_0x3132d0(0x7a))/0x2*(parseInt(_0x3132d0(0x7b))/0x3)+-parseInt(_0x3132d0(0x85))/0x4+parseInt(_0x3132d0(0x88))/0x5+parseInt(_0x3132d0(0x82))/0x6*(parseInt(_0x3132d0(0x81))/0x7)+-parseInt(_0x3132d0(0x74))/0x8*(-parseInt(_0x3132d0(0x7e))/0x9)+-parseInt(_0x3132d0(0x73))/0xa*(parseInt(_0x3132d0(0x7c))/0xb);if(_0x146e75===_0x11b571)break;else _0x5ae154['push'](_0x5ae154['shift']());}catch(_0x2da55a){_0x5ae154['push'](_0x5ae154['shift']());}}}(a96_0x161b,0x5fdb0));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(_0x12f4ea,_0x3b8012){const _0x9721a6=a96_0x5a15,_0x22319c=normalizeSkillRelativePath(_0x3b8012),_0x4d0e32=realOrResolved(_0x12f4ea),_0x25aa2d=resolve(_0x4d0e32,..._0x22319c[_0x9721a6(0x79)]('/'));if(!isPathInside(_0x25aa2d,_0x4d0e32))throw CliErrors['validation'](_0x9721a6(0x77)+_0x3b8012);return ensureNoSymlinkInManagedPath(_0x4d0e32,_0x22319c),_0x25aa2d;}export function ensureNoSymlinkInManagedPath(_0x452dc0,_0x17a698){const _0x5025cd=a96_0x5a15;let _0x54c138=_0x452dc0;for(const _0xd1b51a of _0x17a698[_0x5025cd(0x79)]('/')){_0x54c138=resolve(_0x54c138,_0xd1b51a);const _0x5deadb=lstatIfPresent(_0x54c138);if(_0x5deadb?.[_0x5025cd(0x83)]())throw CliErrors[_0x5025cd(0x75)](_0x5025cd(0x80)+_0x17a698);}}export function isDanglingSymlink(_0xae0fba){const _0x2a01dc=a96_0x5a15;try{return lstatSync(_0xae0fba)[_0x2a01dc(0x83)]();}catch{return![];}}export function resolveSymlinkTarget(_0x1f77ad){const _0x54fbef=readlinkSync(_0x1f77ad);return isAbsolute(_0x54fbef)?_0x54fbef:resolve(dirname(_0x1f77ad),_0x54fbef);}export function isPathInside(_0xdfbcbd,_0x59686e){const _0x134b26=a96_0x5a15,_0x345428=_0xdfbcbd['endsWith'](sep)?_0xdfbcbd:''+_0xdfbcbd+sep,_0xd85944=_0x59686e[_0x134b26(0x78)](sep)?_0x59686e:''+_0x59686e+sep;return _0xdfbcbd===_0x59686e||_0x345428[_0x134b26(0x76)](_0xd85944);}export function realOrResolved(_0x283b07){try{return realpathSync(_0x283b07);}catch{return resolve(_0x283b07);}}function a96_0x5a15(_0x7e47c3,_0x37ea29){_0x7e47c3=_0x7e47c3-0x73;const _0x161b9c=a96_0x161b();let _0x5a15d0=_0x161b9c[_0x7e47c3];return _0x5a15d0;}function a96_0x161b(){const _0x32c5bc=['20AlZyEP','5891560iEtJsN','validation','startsWith','Unsafe\x20Skill\x20file\x20path:\x20','endsWith','split','34PKAIvd','98142kWvsmT','4112625WKSVCJ','121965gIuSvx','9bMRIry','utf8','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','63XRRwiS','68058vXHdtw','isSymbolicLink','.tmp','101228gLOruD','from','stringify','3806610dRKJcm'];a96_0x161b=function(){return _0x32c5bc;};return a96_0x161b();}export function lstatIfPresent(_0x4cc2f7){try{return lstatSync(_0x4cc2f7);}catch{return undefined;}}export function writeTextAtomic(_0x2138a2,_0x20a35e,_0x5125ec){const _0x26b2cf=a96_0x5a15;writeBytesAtomic(_0x2138a2,Buffer[_0x26b2cf(0x86)](_0x20a35e,_0x26b2cf(0x7f)),_0x5125ec);}export function writeBytesAtomic(_0x1cfd39,_0xcb6384,_0x53c3e4){const _0x3e4b33=a96_0x5a15,_0x7e3dc1=_0x1cfd39+_0x3e4b33(0x84);try{writeFileSync(_0x7e3dc1,_0xcb6384,{'mode':_0x53c3e4}),renameSync(_0x7e3dc1,_0x1cfd39);}catch(_0x1ffb8a){try{rmSync(_0x7e3dc1,{'force':!![]});}catch{}throw _0x1ffb8a;}}export function writeJsonAtomic(_0x22d0cf,_0x1dcac3){const _0x36fab9=a96_0x5a15;writeTextAtomic(_0x22d0cf,JSON[_0x36fab9(0x87)](_0x1dcac3,null,0x2)+'\x0a',0x180);}
1
+ (function(_0xecea20,_0x5dba62){const _0x5e6a39=a96_0x834f,_0x4ef8cf=_0xecea20();while(!![]){try{const _0x4e7ac4=parseInt(_0x5e6a39(0x189))/0x1*(-parseInt(_0x5e6a39(0x17a))/0x2)+-parseInt(_0x5e6a39(0x188))/0x3+parseInt(_0x5e6a39(0x174))/0x4*(-parseInt(_0x5e6a39(0x177))/0x5)+-parseInt(_0x5e6a39(0x178))/0x6+parseInt(_0x5e6a39(0x180))/0x7*(parseInt(_0x5e6a39(0x175))/0x8)+-parseInt(_0x5e6a39(0x185))/0x9*(parseInt(_0x5e6a39(0x17d))/0xa)+parseInt(_0x5e6a39(0x17f))/0xb*(parseInt(_0x5e6a39(0x17e))/0xc);if(_0x4e7ac4===_0x5dba62)break;else _0x4ef8cf['push'](_0x4ef8cf['shift']());}catch(_0x39b8d6){_0x4ef8cf['push'](_0x4ef8cf['shift']());}}}(a96_0xffe8,0xd8441));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(_0x1e339c,_0x4b6097){const _0x5f568c=a96_0x834f,_0x425994=normalizeSkillRelativePath(_0x4b6097),_0x41b3f3=realOrResolved(_0x1e339c),_0x240415=resolve(_0x41b3f3,..._0x425994['split']('/'));if(!isPathInside(_0x240415,_0x41b3f3))throw CliErrors[_0x5f568c(0x17b)](_0x5f568c(0x184)+_0x4b6097);return ensureNoSymlinkInManagedPath(_0x41b3f3,_0x425994),_0x240415;}export function ensureNoSymlinkInManagedPath(_0x48ba5f,_0xc8a49){const _0x5cacb0=a96_0x834f;let _0x44e0f7=_0x48ba5f;for(const _0x126f2c of _0xc8a49[_0x5cacb0(0x183)]('/')){_0x44e0f7=resolve(_0x44e0f7,_0x126f2c);const _0x3f6a48=lstatIfPresent(_0x44e0f7);if(_0x3f6a48?.['isSymbolicLink']())throw CliErrors[_0x5cacb0(0x17b)](_0x5cacb0(0x186)+_0xc8a49);}}function a96_0x834f(_0x19d76b,_0x5d5e69){_0x19d76b=_0x19d76b-0x174;const _0xffe8f7=a96_0xffe8();let _0x834fe7=_0xffe8f7[_0x19d76b];return _0x834fe7;}export function isDanglingSymlink(_0x2a781f){const _0x31e111=a96_0x834f;try{return lstatSync(_0x2a781f)[_0x31e111(0x17c)]();}catch{return![];}}export function resolveSymlinkTarget(_0x20b1d4){const _0xd6ed4f=readlinkSync(_0x20b1d4);return isAbsolute(_0xd6ed4f)?_0xd6ed4f:resolve(dirname(_0x20b1d4),_0xd6ed4f);}export function isPathInside(_0x1d4a75,_0x5f000b){const _0x2e4d48=a96_0x834f,_0x1f6d72=_0x1d4a75[_0x2e4d48(0x182)](sep)?_0x1d4a75:''+_0x1d4a75+sep,_0x49f025=_0x5f000b[_0x2e4d48(0x182)](sep)?_0x5f000b:''+_0x5f000b+sep;return _0x1d4a75===_0x5f000b||_0x1f6d72[_0x2e4d48(0x187)](_0x49f025);}export function realOrResolved(_0x36acd4){try{return realpathSync(_0x36acd4);}catch{return resolve(_0x36acd4);}}export function lstatIfPresent(_0x14ff42){try{return lstatSync(_0x14ff42);}catch{return undefined;}}export function writeTextAtomic(_0x439314,_0x5ec459,_0x92594e){const _0x34c66d=a96_0x834f;writeBytesAtomic(_0x439314,Buffer[_0x34c66d(0x181)](_0x5ec459,_0x34c66d(0x179)),_0x92594e);}function a96_0xffe8(){const _0x2506f4=['1149771CljaHu','1384KTDRcx','10950280KzcjSO','.tmp','15245rIjAkc','4766070ATcvkX','utf8','2tRNySk','validation','isSymbolicLink','20KfMyCT','6684QCtRhg','91201mFCwmz','7CMeoha','from','endsWith','split','Unsafe\x20Skill\x20file\x20path:\x20','5913054dPAQKt','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','startsWith','2363895mPhArs'];a96_0xffe8=function(){return _0x2506f4;};return a96_0xffe8();}export function writeBytesAtomic(_0x821586,_0x4536b6,_0x53c2be){const _0x492e6c=a96_0x834f,_0x22587d=_0x821586+_0x492e6c(0x176);try{writeFileSync(_0x22587d,_0x4536b6,{'mode':_0x53c2be}),renameSync(_0x22587d,_0x821586);}catch(_0x1e472f){try{rmSync(_0x22587d,{'force':!![]});}catch{}throw _0x1e472f;}}export function writeJsonAtomic(_0x29def7,_0x19289d){writeTextAtomic(_0x29def7,JSON['stringify'](_0x19289d,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x3dc5ef,_0x53c6c5){const _0x2909eb=a97_0x521e,_0x3a98d0=_0x3dc5ef();while(!![]){try{const _0x190b04=parseInt(_0x2909eb(0x195))/0x1*(parseInt(_0x2909eb(0x193))/0x2)+parseInt(_0x2909eb(0x18c))/0x3+-parseInt(_0x2909eb(0x18f))/0x4*(-parseInt(_0x2909eb(0x18b))/0x5)+-parseInt(_0x2909eb(0x18d))/0x6*(parseInt(_0x2909eb(0x189))/0x7)+-parseInt(_0x2909eb(0x18e))/0x8*(-parseInt(_0x2909eb(0x191))/0x9)+parseInt(_0x2909eb(0x18a))/0xa*(-parseInt(_0x2909eb(0x187))/0xb)+-parseInt(_0x2909eb(0x188))/0xc;if(_0x190b04===_0x53c6c5)break;else _0x3a98d0['push'](_0x3a98d0['shift']());}catch(_0x2933e9){_0x3a98d0['push'](_0x3a98d0['shift']());}}}(a97_0x2b08,0xa61a9));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a97_0x2b08(){const _0x253635=['904zphVnk','24488DvOagJ','sha256','47799vLmGGQ','update','743196rCgPUr','digest','3dIZqny','hex','size','path','1118183RwaWHP','26255580skmBBU','17465qweBxB','30RfZOnq','595AIXowg','4068225wpmSGW','1506HnvqHC'];a97_0x2b08=function(){return _0x253635;};return a97_0x2b08();}export function contentHash(_0x1cd08a){const _0x40699d=a97_0x521e;return createHash(_0x40699d(0x190))[_0x40699d(0x192)](_0x1cd08a)[_0x40699d(0x194)](_0x40699d(0x184));}export function fileHash(_0x3747bf){return bufferSha256(fileContent(_0x3747bf));}function a97_0x521e(_0x1a8f90,_0x531663){_0x1a8f90=_0x1a8f90-0x184;const _0x2b08bd=a97_0x2b08();let _0x521e61=_0x2b08bd[_0x1a8f90];return _0x521e61;}export function bufferSha256(_0x29e08b){const _0x5bb645=a97_0x521e;return createHash('sha256')[_0x5bb645(0x192)](_0x29e08b)['digest'](_0x5bb645(0x184));}export function fileTreeHash(_0x3ee5d5){const _0x2fabf6=a97_0x521e,_0x2b9313=createHash(_0x2fabf6(0x190));for(const _0x3a6c59 of normalizeManifestFiles(_0x3ee5d5)){_0x2b9313[_0x2fabf6(0x192)](_0x3a6c59[_0x2fabf6(0x186)]),_0x2b9313[_0x2fabf6(0x192)]('\x00'),_0x2b9313[_0x2fabf6(0x192)](_0x3a6c59[_0x2fabf6(0x190)]),_0x2b9313['update']('\x00'),_0x2b9313[_0x2fabf6(0x192)](String(_0x3a6c59[_0x2fabf6(0x185)])),_0x2b9313['update']('\x00');}return _0x2b9313[_0x2fabf6(0x194)]('hex');}
1
+ (function(_0xd934e8,_0x578f3c){const _0x2f19b7=a97_0x1e22,_0x550266=_0xd934e8();while(!![]){try{const _0x4ded22=parseInt(_0x2f19b7(0x1cb))/0x1*(-parseInt(_0x2f19b7(0x1c3))/0x2)+-parseInt(_0x2f19b7(0x1c7))/0x3*(parseInt(_0x2f19b7(0x1be))/0x4)+-parseInt(_0x2f19b7(0x1c1))/0x5*(parseInt(_0x2f19b7(0x1bf))/0x6)+parseInt(_0x2f19b7(0x1c9))/0x7+parseInt(_0x2f19b7(0x1c6))/0x8+-parseInt(_0x2f19b7(0x1c2))/0x9+parseInt(_0x2f19b7(0x1c0))/0xa;if(_0x4ded22===_0x578f3c)break;else _0x550266['push'](_0x550266['shift']());}catch(_0x58956f){_0x550266['push'](_0x550266['shift']());}}}(a97_0x469a,0xda626));import{createHash}from'node:crypto';function a97_0x1e22(_0x3eddd9,_0x3d389b){_0x3eddd9=_0x3eddd9-0x1bd;const _0x469a95=a97_0x469a();let _0x1e22ff=_0x469a95[_0x3eddd9];return _0x1e22ff;}function a97_0x469a(){const _0x6300d0=['2306559bxbiIb','sha256','4230625AujZLn','digest','3GnWSib','path','4dHVhZG','138990UTTNsh','31009370MDCkvF','25ORQHrA','15747957dmsTmt','253898CBBBeg','hex','update','1635904jaQBRK'];a97_0x469a=function(){return _0x6300d0;};return a97_0x469a();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0xc57bba){const _0x3788c7=a97_0x1e22;return createHash(_0x3788c7(0x1c8))[_0x3788c7(0x1c5)](_0xc57bba)[_0x3788c7(0x1ca)]('hex');}export function fileHash(_0x883372){return bufferSha256(fileContent(_0x883372));}export function bufferSha256(_0x3c337b){const _0x5be195=a97_0x1e22;return createHash('sha256')[_0x5be195(0x1c5)](_0x3c337b)[_0x5be195(0x1ca)](_0x5be195(0x1c4));}export function fileTreeHash(_0x22d591){const _0x1d5a75=a97_0x1e22,_0x17a7d9=createHash(_0x1d5a75(0x1c8));for(const _0x468810 of normalizeManifestFiles(_0x22d591)){_0x17a7d9['update'](_0x468810[_0x1d5a75(0x1bd)]),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00'),_0x17a7d9['update'](_0x468810[_0x1d5a75(0x1c8)]),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00'),_0x17a7d9[_0x1d5a75(0x1c5)](String(_0x468810['size'])),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00');}return _0x17a7d9[_0x1d5a75(0x1ca)]('hex');}
@@ -1 +1 @@
1
- (function(_0x55439e,_0x8990e7){const _0x27a9ac=a98_0x34a3,_0x2258ff=_0x55439e();while(!![]){try{const _0x2a52cd=parseInt(_0x27a9ac(0x193))/0x1*(-parseInt(_0x27a9ac(0x180))/0x2)+parseInt(_0x27a9ac(0x189))/0x3+parseInt(_0x27a9ac(0x163))/0x4*(-parseInt(_0x27a9ac(0x16c))/0x5)+-parseInt(_0x27a9ac(0x16f))/0x6*(-parseInt(_0x27a9ac(0x18b))/0x7)+parseInt(_0x27a9ac(0x184))/0x8*(-parseInt(_0x27a9ac(0x175))/0x9)+-parseInt(_0x27a9ac(0x16d))/0xa+parseInt(_0x27a9ac(0x178))/0xb;if(_0x2a52cd===_0x8990e7)break;else _0x2258ff['push'](_0x2258ff['shift']());}catch(_0x389d44){_0x2258ff['push'](_0x2258ff['shift']());}}}(a98_0x5f43,0x44cfe));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x5b3d99 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a98_0x5f43(){const _0x2cb731=['isSymbolicLink','metadata-mismatch','not-managed-symlink','4743fufXcE','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','env','6899431nFOKDs','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','values','skillCode','set','has','agentsSkillsDir','skill','6262TCnqTp','personal','pruneSkillCodes','contentHash','1256turwbA','created','removed','isDirectory','get','1192128RuncPk','activeSkillCodes','82901zpUGYP','skipped','claudeSkillsDir','managedRoot','accessKey','scope','validation','length','3HOUIfD','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','1519972mtVOxz','push','name','appCode','dir','filter','map','external-symlink','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','5QHrNeM','5548500NGnQiY','builtin','144IAARel','updated','trim'];a98_0x5f43=function(){return _0x2cb731;};return a98_0x5f43();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x5b3d99;export function linkEffectiveRuntimeSkills(_0x465f1a,_0x1f7a5c,_0x415115={}){const _0x2d7c13=a98_0x34a3,_0x6865b5=new Map();for(const _0x440b72 of _0x465f1a){const _0x1e92e3=_0x440b72[_0x2d7c13(0x17f)][_0x2d7c13(0x17b)];if(!_0x1e92e3)continue;const _0x50ac31=_0x6865b5[_0x2d7c13(0x188)](_0x1e92e3);(!_0x50ac31||_0x440b72[_0x2d7c13(0x190)]===_0x2d7c13(0x181))&&_0x6865b5[_0x2d7c13(0x17c)](_0x1e92e3,_0x440b72);}const _0x46a92d=[],_0x1fd606=resolveSkillSyncPaths(_0x415115);for(const _0x382ae1 of _0x6865b5[_0x2d7c13(0x17a)]()){const _0x54b20c=requireSkillCode(_0x382ae1[_0x2d7c13(0x17f)]),_0x567c51=_0x1f7a5c+'--'+_0x54b20c;for(const _0x38e175 of[_0x1fd606[_0x2d7c13(0x17e)],_0x1fd606[_0x2d7c13(0x18d)]]){_0x46a92d['push'](ensureManagedSymlink(resolve(_0x38e175,_0x567c51),_0x382ae1[_0x2d7c13(0x167)],_0x1fd606[_0x2d7c13(0x18e)]));}}return _0x46a92d;}export function pruneStaleRuntimeSkillLinks(_0x463eaf,_0x44acd5,_0x2e4029={},_0x3ed54c){const _0x472b09=a98_0x34a3,_0x7e1848=resolveSkillSyncPaths(_0x2e4029),_0x3c7d64=new Set([..._0x44acd5][_0x472b09(0x169)](_0x48d9f4=>_0x48d9f4[_0x472b09(0x171)]())[_0x472b09(0x168)](Boolean)),_0x41c1e8=_0x3ed54c?new Set([..._0x3ed54c][_0x472b09(0x169)](_0x404919=>_0x404919[_0x472b09(0x171)]())[_0x472b09(0x168)](Boolean)):undefined,_0x4667d5=[];for(const _0xe751e8 of[_0x7e1848[_0x472b09(0x17e)],_0x7e1848[_0x472b09(0x18d)]]){for(const _0x3957e8 of managedAppSkillLinkPaths(_0xe751e8,_0x463eaf)){const _0x587159=basename(_0x3957e8)['slice']((_0x463eaf+'--')[_0x472b09(0x192)]);if(_0x41c1e8&&!_0x41c1e8['has'](_0x587159))continue;if(_0x3c7d64['has'](_0x587159))continue;_0x4667d5[_0x472b09(0x164)](removeManagedSkillLink(_0x3957e8,_0x7e1848[_0x472b09(0x18e)]));}}return _0x4667d5;}export function pruneStaleRuntimeSkillCache(_0x37075b,_0x970525={}){const _0x403377=a98_0x34a3,_0x5b16fd=new Set([..._0x37075b[_0x403377(0x18a)]][_0x403377(0x169)](_0x4c3c63=>_0x4c3c63[_0x403377(0x171)]())['filter'](Boolean)),_0x3696e1=_0x37075b['pruneSkillCodes']?new Set([..._0x37075b[_0x403377(0x182)]][_0x403377(0x169)](_0x33675e=>_0x33675e[_0x403377(0x171)]())[_0x403377(0x168)](Boolean)):undefined,_0x582ca1=_0x37075b['scopes']??['personal','company'],_0x6d47ce=resolve(getRuntimeSkillCacheRoot(_0x37075b[_0x403377(0x177)],_0x37075b[_0x403377(0x18f)],_0x970525),safePathSegment(_0x37075b[_0x403377(0x166)],_0x403377(0x166))),_0x33cc7b=[];for(const _0x46099e of _0x582ca1){const _0x2afa40=resolve(_0x6d47ce,_0x46099e);if(!existsSync(_0x2afa40))continue;for(const _0x277298 of readdirSync(_0x2afa40,{'withFileTypes':!![]})){if(!_0x277298[_0x403377(0x187)]())continue;const _0x228a26=_0x277298[_0x403377(0x165)];if(_0x3696e1&&!_0x3696e1[_0x403377(0x17d)](_0x228a26))continue;if(_0x5b16fd[_0x403377(0x17d)](_0x228a26))continue;const _0x529921=resolve(_0x2afa40,_0x228a26),_0x49a111=readMetadataIfPresent(resolve(_0x529921,METADATA_FILE));if(_0x49a111?.[_0x403377(0x166)]!==_0x37075b[_0x403377(0x166)]||_0x49a111[_0x403377(0x190)]!==_0x46099e||_0x49a111['skillCode']!==_0x228a26){_0x33cc7b[_0x403377(0x164)]({'path':_0x529921,'action':_0x403377(0x18c),'reason':_0x403377(0x173)});continue;}removeSync(_0x529921),_0x33cc7b[_0x403377(0x164)]({'path':_0x529921,'action':_0x403377(0x186)});}}return _0x33cc7b;}export function linkGlobalRuntimeSkills(_0x4fa01e,_0x33f19a={}){const _0x338f23=a98_0x34a3,_0x245d8d=resolveSkillSyncPaths(_0x33f19a),_0x26e6a1=[];for(const _0x1bfd04 of _0x4fa01e){if(_0x1bfd04[_0x338f23(0x190)]!==_0x338f23(0x16e))throw CliErrors[_0x338f23(0x191)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x1bfd04[_0x338f23(0x190)]);const _0x3fc36d=requireSkillCode(_0x1bfd04[_0x338f23(0x17f)]),_0x247601=copyManagedSkillDirectory(_0x1bfd04[_0x338f23(0x167)],resolve(_0x245d8d['agentsSkillsDir'],_0x3fc36d));_0x26e6a1[_0x338f23(0x164)]({..._0x247601,'contentHash':_0x1bfd04[_0x338f23(0x183)]});}return _0x26e6a1;}function ensureManagedSymlink(_0x318e71,_0x38043a,_0x116362){const _0x35658c=a98_0x34a3;mkdirSync(dirname(_0x318e71),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x318e71)||isDanglingSymlink(_0x318e71)){const _0x4789da=lstatSync(_0x318e71);if(!_0x4789da[_0x35658c(0x172)]())throw CliErrors['validation'](_0x35658c(0x162)+_0x318e71);const _0x9b01ba=resolveSymlinkTarget(_0x318e71);if(!isPathInside(realOrResolved(_0x9b01ba),realOrResolved(_0x116362)))throw CliErrors['validation'](_0x35658c(0x194)+_0x318e71);if(realOrResolved(_0x9b01ba)===realOrResolved(_0x38043a))return{'path':_0x318e71,'target':_0x38043a,'action':_0x35658c(0x195)};return unlinkSync(_0x318e71),symlinkSync(_0x38043a,_0x318e71,_0x35658c(0x167)),{'path':_0x318e71,'target':_0x38043a,'action':_0x35658c(0x170)};}return symlinkSync(_0x38043a,_0x318e71,'dir'),{'path':_0x318e71,'target':_0x38043a,'action':_0x35658c(0x185)};}function managedAppSkillLinkPaths(_0x513729,_0x2eeba1){const _0x5f60a0=a98_0x34a3;if(!existsSync(_0x513729))return[];const _0x4d8665=_0x2eeba1+'--';return readdirSync(_0x513729,{'withFileTypes':!![]})[_0x5f60a0(0x168)](_0x26df1b=>_0x26df1b['name']['startsWith'](_0x4d8665))[_0x5f60a0(0x169)](_0x2e5602=>resolve(_0x513729,_0x2e5602['name']));}function a98_0x34a3(_0x383496,_0x982f78){_0x383496=_0x383496-0x161;const _0x5f43cc=a98_0x5f43();let _0x34a30f=_0x5f43cc[_0x383496];return _0x34a30f;}function removeManagedSkillLink(_0x2336f2,_0x119903){const _0x4c5c62=a98_0x34a3,_0x4d7410=lstatIfPresent(_0x2336f2);if(!_0x4d7410?.[_0x4c5c62(0x172)]())return{'path':_0x2336f2,'action':_0x4c5c62(0x18c),'reason':_0x4c5c62(0x174)};const _0x5137d8=resolveSymlinkTarget(_0x2336f2);if(!isPathInside(realOrResolved(_0x5137d8),realOrResolved(_0x119903)))return{'path':_0x2336f2,'action':_0x4c5c62(0x18c),'reason':_0x4c5c62(0x16a)};return unlinkSync(_0x2336f2),{'path':_0x2336f2,'action':_0x4c5c62(0x186)};}export function copyManagedSkillDirectory(_0x3d018f,_0x3b67c2){const _0x312b2f=a98_0x34a3,_0x3fd288=resolve(_0x3b67c2,METADATA_FILE),_0x2c32a2=existsSync(_0x3b67c2);if(_0x2c32a2){const _0xeebf0c=lstatSync(_0x3b67c2);if(_0xeebf0c[_0x312b2f(0x172)]())throw CliErrors[_0x312b2f(0x191)](_0x312b2f(0x161)+_0x3b67c2);if(!_0xeebf0c[_0x312b2f(0x187)]())throw CliErrors['validation'](_0x312b2f(0x179)+_0x3b67c2);const _0x10a4ed=readMetadataIfPresent(_0x3fd288);if(_0x10a4ed?.[_0x312b2f(0x190)]!==_0x312b2f(0x16e))throw CliErrors[_0x312b2f(0x191)](_0x312b2f(0x176)+_0x3b67c2);}ensureDirSync(dirname(_0x3b67c2));const _0x121ab5=_0x2c32a2?readMetadataIfPresent(_0x3fd288)?.[_0x312b2f(0x183)]:undefined,_0x1792d9=readMetadataIfPresent(resolve(_0x3d018f,METADATA_FILE))?.['contentHash'];return _0x2c32a2&&removeSync(_0x3b67c2),copySkillDirectory(_0x3d018f,_0x3b67c2),{'path':_0x3b67c2,'target':_0x3d018f,'action':!_0x2c32a2?_0x312b2f(0x185):_0x121ab5===_0x1792d9?'unchanged':_0x312b2f(0x170)};}function copySkillDirectory(_0x2c50a2,_0x361723){copySync(_0x2c50a2,_0x361723,{'dereference':![],'overwrite':!![],'filter'(_0x2ea8a1){const _0xc20f7=a98_0x34a3;if(lstatSync(_0x2ea8a1)[_0xc20f7(0x172)]())throw CliErrors['validation'](_0xc20f7(0x16b)+_0x2ea8a1);return!![];}});}
1
+ (function(_0x34f897,_0x1c9ece){const _0x1580a4=a98_0x7e97,_0x84fbec=_0x34f897();while(!![]){try{const _0x2970cf=parseInt(_0x1580a4(0xad))/0x1+parseInt(_0x1580a4(0xb8))/0x2+-parseInt(_0x1580a4(0xd2))/0x3+-parseInt(_0x1580a4(0xcb))/0x4+-parseInt(_0x1580a4(0xa5))/0x5+parseInt(_0x1580a4(0xc2))/0x6+-parseInt(_0x1580a4(0xce))/0x7;if(_0x2970cf===_0x1c9ece)break;else _0x84fbec['push'](_0x84fbec['shift']());}catch(_0x308bb4){_0x84fbec['push'](_0x84fbec['shift']());}}}(a98_0x5ae1,0x96ba4));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x1ab013 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a98_0x5ae1(){const _0x37272c=['updated','created','scopes','has','filter','11680tAUIyi','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','claudeSkillsDir','134204utquLh','dir','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','3082947CTeHXH','get','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','trim','skill','2824300QsKmTu','unchanged','map','managedRoot','push','scope','values','appCode','1021354oyIpyM','name','agentsSkillsDir','company','isDirectory','removed','validation','startsWith','external-symlink','pruneSkillCodes','accessKey','2078182XoWVSc','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','slice','personal','not-managed-symlink','activeSkillCodes','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','isSymbolicLink','contentHash','builtin','1029216lntsIf','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skillCode','skipped'];a98_0x5ae1=function(){return _0x37272c;};return a98_0x5ae1();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x1ab013;export function linkEffectiveRuntimeSkills(_0x71d73f,_0x3b9517,_0x5372dd={}){const _0x26d812=a98_0x7e97,_0x1dddf3=new Map();for(const _0x1bd2f5 of _0x71d73f){const _0x4cc646=_0x1bd2f5[_0x26d812(0xa4)][_0x26d812(0xc4)];if(!_0x4cc646)continue;const _0x5ab6a5=_0x1dddf3[_0x26d812(0xd3)](_0x4cc646);(!_0x5ab6a5||_0x1bd2f5[_0x26d812(0xaa)]===_0x26d812(0xbb))&&_0x1dddf3['set'](_0x4cc646,_0x1bd2f5);}const _0x1aafe8=[],_0x3fb8be=resolveSkillSyncPaths(_0x5372dd);for(const _0x42011e of _0x1dddf3[_0x26d812(0xab)]()){const _0x4c38d5=requireSkillCode(_0x42011e[_0x26d812(0xa4)]),_0x20f271=_0x3b9517+'--'+_0x4c38d5;for(const _0x14400c of[_0x3fb8be[_0x26d812(0xaf)],_0x3fb8be[_0x26d812(0xcd)]]){_0x1aafe8['push'](ensureManagedSymlink(resolve(_0x14400c,_0x20f271),_0x42011e[_0x26d812(0xcf)],_0x3fb8be[_0x26d812(0xa8)]));}}return _0x1aafe8;}export function pruneStaleRuntimeSkillLinks(_0x5d4ad9,_0x59447c,_0x62db6={},_0x16d549){const _0x4a6065=a98_0x7e97,_0x3a1eed=resolveSkillSyncPaths(_0x62db6),_0x323c0d=new Set([..._0x59447c][_0x4a6065(0xa7)](_0x3bd212=>_0x3bd212['trim']())[_0x4a6065(0xca)](Boolean)),_0x54833e=_0x16d549?new Set([..._0x16d549][_0x4a6065(0xa7)](_0x201436=>_0x201436[_0x4a6065(0xd5)]())[_0x4a6065(0xca)](Boolean)):undefined,_0x22ea5c=[];for(const _0x5bbb33 of[_0x3a1eed[_0x4a6065(0xaf)],_0x3a1eed[_0x4a6065(0xcd)]]){for(const _0x701f5c of managedAppSkillLinkPaths(_0x5bbb33,_0x5d4ad9)){const _0x4714ed=basename(_0x701f5c)[_0x4a6065(0xba)]((_0x5d4ad9+'--')['length']);if(_0x54833e&&!_0x54833e[_0x4a6065(0xc9)](_0x4714ed))continue;if(_0x323c0d[_0x4a6065(0xc9)](_0x4714ed))continue;_0x22ea5c['push'](removeManagedSkillLink(_0x701f5c,_0x3a1eed[_0x4a6065(0xa8)]));}}return _0x22ea5c;}export function pruneStaleRuntimeSkillCache(_0x2b7397,_0x4db071={}){const _0x1ee96a=a98_0x7e97,_0x229a30=new Set([..._0x2b7397[_0x1ee96a(0xbd)]][_0x1ee96a(0xa7)](_0x1b60b7=>_0x1b60b7[_0x1ee96a(0xd5)]())[_0x1ee96a(0xca)](Boolean)),_0x1f1a18=_0x2b7397[_0x1ee96a(0xb6)]?new Set([..._0x2b7397[_0x1ee96a(0xb6)]][_0x1ee96a(0xa7)](_0x159fc7=>_0x159fc7[_0x1ee96a(0xd5)]())[_0x1ee96a(0xca)](Boolean)):undefined,_0x2904d9=_0x2b7397[_0x1ee96a(0xc8)]??[_0x1ee96a(0xbb),_0x1ee96a(0xb0)],_0xd550c=resolve(getRuntimeSkillCacheRoot(_0x2b7397['env'],_0x2b7397[_0x1ee96a(0xb7)],_0x4db071),safePathSegment(_0x2b7397[_0x1ee96a(0xac)],_0x1ee96a(0xac))),_0xf68a39=[];for(const _0x417c81 of _0x2904d9){const _0x3347c6=resolve(_0xd550c,_0x417c81);if(!existsSync(_0x3347c6))continue;for(const _0x205662 of readdirSync(_0x3347c6,{'withFileTypes':!![]})){if(!_0x205662[_0x1ee96a(0xb1)]())continue;const _0x1fbcfe=_0x205662['name'];if(_0x1f1a18&&!_0x1f1a18[_0x1ee96a(0xc9)](_0x1fbcfe))continue;if(_0x229a30['has'](_0x1fbcfe))continue;const _0x2ed4b7=resolve(_0x3347c6,_0x1fbcfe),_0x18dd09=readMetadataIfPresent(resolve(_0x2ed4b7,METADATA_FILE));if(_0x18dd09?.[_0x1ee96a(0xac)]!==_0x2b7397['appCode']||_0x18dd09[_0x1ee96a(0xaa)]!==_0x417c81||_0x18dd09[_0x1ee96a(0xc4)]!==_0x1fbcfe){_0xf68a39[_0x1ee96a(0xa9)]({'path':_0x2ed4b7,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x2ed4b7),_0xf68a39['push']({'path':_0x2ed4b7,'action':_0x1ee96a(0xb2)});}}return _0xf68a39;}export function linkGlobalRuntimeSkills(_0x177db2,_0x502946={}){const _0x14dbbe=a98_0x7e97,_0x3c8de5=resolveSkillSyncPaths(_0x502946),_0x3d3701=[];for(const _0x37e3a2 of _0x177db2){if(_0x37e3a2[_0x14dbbe(0xaa)]!==_0x14dbbe(0xc1))throw CliErrors[_0x14dbbe(0xb3)](_0x14dbbe(0xd4)+_0x37e3a2[_0x14dbbe(0xaa)]);const _0x32e0a8=requireSkillCode(_0x37e3a2[_0x14dbbe(0xa4)]),_0x8cded6=copyManagedSkillDirectory(_0x37e3a2[_0x14dbbe(0xcf)],resolve(_0x3c8de5[_0x14dbbe(0xaf)],_0x32e0a8));_0x3d3701[_0x14dbbe(0xa9)]({..._0x8cded6,'contentHash':_0x37e3a2[_0x14dbbe(0xc0)]});}return _0x3d3701;}function ensureManagedSymlink(_0x9b08fb,_0x372af7,_0x1094a0){const _0x80149=a98_0x7e97;mkdirSync(dirname(_0x9b08fb),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x9b08fb)||isDanglingSymlink(_0x9b08fb)){const _0x43e09c=lstatSync(_0x9b08fb);if(!_0x43e09c['isSymbolicLink']())throw CliErrors['validation'](_0x80149(0xd1)+_0x9b08fb);const _0x10618f=resolveSymlinkTarget(_0x9b08fb);if(!isPathInside(realOrResolved(_0x10618f),realOrResolved(_0x1094a0)))throw CliErrors[_0x80149(0xb3)](_0x80149(0xc3)+_0x9b08fb);if(realOrResolved(_0x10618f)===realOrResolved(_0x372af7))return{'path':_0x9b08fb,'target':_0x372af7,'action':'unchanged'};return unlinkSync(_0x9b08fb),symlinkSync(_0x372af7,_0x9b08fb,'dir'),{'path':_0x9b08fb,'target':_0x372af7,'action':_0x80149(0xc6)};}return symlinkSync(_0x372af7,_0x9b08fb,_0x80149(0xcf)),{'path':_0x9b08fb,'target':_0x372af7,'action':'created'};}function managedAppSkillLinkPaths(_0x2e9d30,_0x7f4a1c){const _0x56dfbf=a98_0x7e97;if(!existsSync(_0x2e9d30))return[];const _0x52e61c=_0x7f4a1c+'--';return readdirSync(_0x2e9d30,{'withFileTypes':!![]})[_0x56dfbf(0xca)](_0x2038ed=>_0x2038ed[_0x56dfbf(0xae)][_0x56dfbf(0xb4)](_0x52e61c))[_0x56dfbf(0xa7)](_0xc93c67=>resolve(_0x2e9d30,_0xc93c67[_0x56dfbf(0xae)]));}function a98_0x7e97(_0x708d97,_0x46bd59){_0x708d97=_0x708d97-0xa4;const _0x5ae1bc=a98_0x5ae1();let _0x7e977f=_0x5ae1bc[_0x708d97];return _0x7e977f;}function removeManagedSkillLink(_0x18ab5a,_0x46067b){const _0x5da838=a98_0x7e97,_0x49fb8b=lstatIfPresent(_0x18ab5a);if(!_0x49fb8b?.['isSymbolicLink']())return{'path':_0x18ab5a,'action':_0x5da838(0xc5),'reason':_0x5da838(0xbc)};const _0x5b78c2=resolveSymlinkTarget(_0x18ab5a);if(!isPathInside(realOrResolved(_0x5b78c2),realOrResolved(_0x46067b)))return{'path':_0x18ab5a,'action':_0x5da838(0xc5),'reason':_0x5da838(0xb5)};return unlinkSync(_0x18ab5a),{'path':_0x18ab5a,'action':_0x5da838(0xb2)};}export function copyManagedSkillDirectory(_0x4e6276,_0x27fed1){const _0xdd9c10=a98_0x7e97,_0x35dbe1=resolve(_0x27fed1,METADATA_FILE),_0x52035e=existsSync(_0x27fed1);if(_0x52035e){const _0xf8f457=lstatSync(_0x27fed1);if(_0xf8f457['isSymbolicLink']())throw CliErrors[_0xdd9c10(0xb3)](_0xdd9c10(0xbe)+_0x27fed1);if(!_0xf8f457[_0xdd9c10(0xb1)]())throw CliErrors[_0xdd9c10(0xb3)](_0xdd9c10(0xb9)+_0x27fed1);const _0x2e536f=readMetadataIfPresent(_0x35dbe1);if(_0x2e536f?.[_0xdd9c10(0xaa)]!==_0xdd9c10(0xc1))throw CliErrors['validation'](_0xdd9c10(0xcc)+_0x27fed1);}ensureDirSync(dirname(_0x27fed1));const _0x21b33c=_0x52035e?readMetadataIfPresent(_0x35dbe1)?.[_0xdd9c10(0xc0)]:undefined,_0x42d585=readMetadataIfPresent(resolve(_0x4e6276,METADATA_FILE))?.['contentHash'];return _0x52035e&&removeSync(_0x27fed1),copySkillDirectory(_0x4e6276,_0x27fed1),{'path':_0x27fed1,'target':_0x4e6276,'action':!_0x52035e?_0xdd9c10(0xc7):_0x21b33c===_0x42d585?_0xdd9c10(0xa6):_0xdd9c10(0xc6)};}function copySkillDirectory(_0x1aafed,_0x50288b){copySync(_0x1aafed,_0x50288b,{'dereference':![],'overwrite':!![],'filter'(_0x15f451){const _0x2b2b9b=a98_0x7e97;if(lstatSync(_0x15f451)[_0x2b2b9b(0xbf)]())throw CliErrors[_0x2b2b9b(0xb3)](_0x2b2b9b(0xd0)+_0x15f451);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x472f7e,_0x21109b){const _0x9c86f0=a99_0x4198,_0x3230d0=_0x472f7e();while(!![]){try{const _0x39e71b=-parseInt(_0x9c86f0(0x1a4))/0x1*(parseInt(_0x9c86f0(0x1a1))/0x2)+parseInt(_0x9c86f0(0x191))/0x3*(parseInt(_0x9c86f0(0x198))/0x4)+parseInt(_0x9c86f0(0x17f))/0x5*(-parseInt(_0x9c86f0(0x188))/0x6)+-parseInt(_0x9c86f0(0x1a8))/0x7*(parseInt(_0x9c86f0(0x18d))/0x8)+parseInt(_0x9c86f0(0x195))/0x9*(-parseInt(_0x9c86f0(0x18e))/0xa)+parseInt(_0x9c86f0(0x18c))/0xb*(parseInt(_0x9c86f0(0x197))/0xc)+parseInt(_0x9c86f0(0x1a6))/0xd;if(_0x39e71b===_0x21109b)break;else _0x3230d0['push'](_0x3230d0['shift']());}catch(_0x3dd7e2){_0x3230d0['push'](_0x3230d0['shift']());}}}(a99_0x47a4,0xd9215));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';function a99_0x4198(_0x1563b4,_0x2383ee){_0x1563b4=_0x1563b4-0x17d;const _0x47a463=a99_0x47a4();let _0x4198cb=_0x47a463[_0x1563b4];return _0x4198cb;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x416a35,_0x3da965={}){const _0x51ab28=a99_0x4198,_0xdca0ea=safePathSegment(_0x416a35[_0x51ab28(0x19a)],'appCode'),_0x5c815b=normalizeRuntimeSkillScopes(_0x416a35[_0x51ab28(0x193)]),_0x960262=new Set(_0x5c815b),_0x20bd92=_0x416a35[_0x51ab28(0x196)]?.[_0x51ab28(0x192)](),_0x72c1c3=new Map(),_0x19af23=resolve(getRuntimeSkillCacheRoot(_0x416a35[_0x51ab28(0x189)],_0x416a35['accessKey'],_0x3da965),_0xdca0ea);for(const _0x4e3192 of _0x5c815b){for(const _0x1f1925 of localSkillEntryDirs(resolve(_0x19af23,_0x4e3192))){collectLocalRuntimeSkill(_0x72c1c3,_0x1f1925,{'appCode':_0xdca0ea,'scopes':_0x960262,'code':_0x20bd92,'source':_0x51ab28(0x1a0)});}}const _0x276597=resolveSkillSyncPaths(_0x3da965);for(const _0x1e8b6d of[_0x276597['agentsSkillsDir'],_0x276597[_0x51ab28(0x190)]]){for(const _0x15ec5d of localSkillLinkCandidates(_0x1e8b6d,_0xdca0ea,_0x960262)){collectLocalRuntimeSkill(_0x72c1c3,_0x15ec5d,{'appCode':_0xdca0ea,'scopes':_0x960262,'code':_0x20bd92,'source':_0x51ab28(0x199),'linkedPath':_0x15ec5d});}}return Array[_0x51ab28(0x182)](_0x72c1c3[_0x51ab28(0x194)]())[_0x51ab28(0x18b)](compareLocalRuntimeSkills);}function a99_0x47a4(){const _0x29e3dc=['name','skillCode','264AzlGGZ','env','scope','sort','22VgeyXA','1222632QzOxFb','367790kACNeq','isArray','claudeSkillsDir','1037397RWsQUu','trim','scopes','values','387MNAXmT','code','9072048pELjfb','16TqCdOk','link','appCode','local','localeCompare','push','get','dir','cache','482566fLyHxJ','set','source','5yAIcOI','isDirectory','25322401xUxWsZ','map','28ubcwtt','skillMdPath','metadataPath','linkedPaths','63010jOUyZL','startsWith','builtin','from','tags','cacheDir','linkedPath'];a99_0x47a4=function(){return _0x29e3dc;};return a99_0x47a4();}function localSkillEntryDirs(_0x38d6d8){const _0x7b8176=a99_0x4198;if(!existsSync(_0x38d6d8))return[];return readdirSync(_0x38d6d8,{'withFileTypes':!![]})['filter'](_0x446a7a=>_0x446a7a[_0x7b8176(0x1a5)]()||_0x446a7a['isSymbolicLink']())[_0x7b8176(0x1a7)](_0x1c1998=>resolve(_0x38d6d8,_0x1c1998[_0x7b8176(0x186)]));}function localSkillLinkCandidates(_0x4f59e8,_0x28c7cb,_0x3046fc){const _0x167faf=a99_0x4198;if(!existsSync(_0x4f59e8))return[];const _0x19eca0=_0x28c7cb+'--';return readdirSync(_0x4f59e8,{'withFileTypes':!![]})['filter'](_0x53363b=>_0x53363b['isDirectory']()||_0x53363b['isSymbolicLink']())['filter'](_0x126048=>_0x126048['name'][_0x167faf(0x180)](_0x19eca0)||_0x3046fc['has'](_0x167faf(0x181)))['map'](_0x216e3d=>resolve(_0x4f59e8,_0x216e3d[_0x167faf(0x186)]));}function collectLocalRuntimeSkill(_0x47f4d1,_0x942de,_0x16641a){const _0x5d8213=a99_0x4198,_0xee5659=resolve(_0x942de,METADATA_FILE),_0x13ba2c=readMetadataIfPresent(_0xee5659);if(!_0x13ba2c)return;if(_0x13ba2c[_0x5d8213(0x19a)]!==_0x16641a[_0x5d8213(0x19a)])return;if(!isRuntimeSkillScope(_0x13ba2c[_0x5d8213(0x18a)])||!_0x16641a['scopes']['has'](_0x13ba2c['scope']))return;const _0x2dfee1=_0x13ba2c[_0x5d8213(0x187)]?.[_0x5d8213(0x192)]();if(!_0x2dfee1)return;if(_0x16641a[_0x5d8213(0x196)]&&_0x2dfee1!==_0x16641a[_0x5d8213(0x196)])return;const _0x1ce847=_0x13ba2c[_0x5d8213(0x18a)]+':'+_0x2dfee1,_0x164bef=_0x16641a[_0x5d8213(0x185)]?[_0x16641a['linkedPath']]:[],_0x19c6d8=_0x47f4d1[_0x5d8213(0x19e)](_0x1ce847);if(_0x19c6d8){_0x16641a[_0x5d8213(0x1a3)]===_0x5d8213(0x1a0)&&(_0x19c6d8[_0x5d8213(0x19f)]=_0x942de,_0x19c6d8[_0x5d8213(0x184)]=_0x942de,_0x19c6d8[_0x5d8213(0x1a9)]=resolve(_0x942de,SKILL_FILE),_0x19c6d8[_0x5d8213(0x17d)]=_0xee5659);for(const _0x5eaffb of _0x164bef){!_0x19c6d8[_0x5d8213(0x17e)]['includes'](_0x5eaffb)&&_0x19c6d8[_0x5d8213(0x17e)][_0x5d8213(0x19d)](_0x5eaffb);}_0x19c6d8[_0x5d8213(0x17e)]['sort']();return;}_0x47f4d1[_0x5d8213(0x1a2)](_0x1ce847,{..._0x13ba2c,'tags':Array[_0x5d8213(0x18f)](_0x13ba2c[_0x5d8213(0x183)])?_0x13ba2c['tags']:[],'scope':_0x13ba2c['scope'],'source':_0x5d8213(0x19b),'dir':_0x942de,'cacheDir':_0x16641a[_0x5d8213(0x1a3)]==='cache'?_0x942de:undefined,'skillMdPath':resolve(_0x942de,SKILL_FILE),'metadataPath':_0xee5659,'linkedPaths':_0x164bef});}function compareLocalRuntimeSkills(_0x5f6afe,_0x51ee80){const _0x1ced4b=a99_0x4198,_0x68c61e={'personal':0x0,'company':0x1,'builtin':0x2};return _0x68c61e[_0x5f6afe[_0x1ced4b(0x18a)]]-_0x68c61e[_0x51ee80[_0x1ced4b(0x18a)]]||_0x5f6afe[_0x1ced4b(0x187)][_0x1ced4b(0x19c)](_0x51ee80['skillCode'])||_0x5f6afe[_0x1ced4b(0x19f)]['localeCompare'](_0x51ee80['dir']);}
1
+ (function(_0xbf41db,_0x437287){const _0x18d6ce=a99_0x323a,_0x4282cc=_0xbf41db();while(!![]){try{const _0x23df33=parseInt(_0x18d6ce(0xe1))/0x1+-parseInt(_0x18d6ce(0xf5))/0x2*(-parseInt(_0x18d6ce(0xf6))/0x3)+-parseInt(_0x18d6ce(0xfa))/0x4*(parseInt(_0x18d6ce(0xe0))/0x5)+-parseInt(_0x18d6ce(0xf1))/0x6*(parseInt(_0x18d6ce(0xd8))/0x7)+-parseInt(_0x18d6ce(0xf3))/0x8+-parseInt(_0x18d6ce(0xec))/0x9*(-parseInt(_0x18d6ce(0xd7))/0xa)+parseInt(_0x18d6ce(0xdb))/0xb;if(_0x23df33===_0x437287)break;else _0x4282cc['push'](_0x4282cc['shift']());}catch(_0x597b8a){_0x4282cc['push'](_0x4282cc['shift']());}}}(a99_0x5d57,0x44017));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x5d57(){const _0x5c32ee=['builtin','sort','884fcxsWV','set','env','startsWith','cacheDir','includes','skillCode','cache','20ojGkEE','21uCTXOP','metadataPath','code','4615567TSWjbj','map','tags','from','linkedPaths','355DduKcd','308053GcAOYE','scope','source','link','get','localeCompare','isDirectory','appCode','dir','linkedPath','filter','1147806azeXLk','isSymbolicLink','scopes','values','claudeSkillsDir','869502Vmspsg','trim','2805184abUUut','name','206HnyoJg','2823OxLCWO','skillMdPath'];a99_0x5d57=function(){return _0x5c32ee;};return a99_0x5d57();}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(_0x1bbd05,_0x17ded5={}){const _0x36cfef=a99_0x323a,_0x2233d6=safePathSegment(_0x1bbd05['appCode'],'appCode'),_0x1d37de=normalizeRuntimeSkillScopes(_0x1bbd05[_0x36cfef(0xee)]),_0xd6f6b=new Set(_0x1d37de),_0x10f413=_0x1bbd05[_0x36cfef(0xda)]?.['trim'](),_0x833c7=new Map(),_0x359522=resolve(getRuntimeSkillCacheRoot(_0x1bbd05[_0x36cfef(0xfc)],_0x1bbd05['accessKey'],_0x17ded5),_0x2233d6);for(const _0x1ce169 of _0x1d37de){for(const _0x43cdd4 of localSkillEntryDirs(resolve(_0x359522,_0x1ce169))){collectLocalRuntimeSkill(_0x833c7,_0x43cdd4,{'appCode':_0x2233d6,'scopes':_0xd6f6b,'code':_0x10f413,'source':_0x36cfef(0xd6)});}}const _0x9640b2=resolveSkillSyncPaths(_0x17ded5);for(const _0x5466bd of[_0x9640b2['agentsSkillsDir'],_0x9640b2[_0x36cfef(0xf0)]]){for(const _0x2d9c6 of localSkillLinkCandidates(_0x5466bd,_0x2233d6,_0xd6f6b)){collectLocalRuntimeSkill(_0x833c7,_0x2d9c6,{'appCode':_0x2233d6,'scopes':_0xd6f6b,'code':_0x10f413,'source':_0x36cfef(0xe4),'linkedPath':_0x2d9c6});}}return Array[_0x36cfef(0xde)](_0x833c7[_0x36cfef(0xef)]())[_0x36cfef(0xf9)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x49551a){const _0x573889=a99_0x323a;if(!existsSync(_0x49551a))return[];return readdirSync(_0x49551a,{'withFileTypes':!![]})['filter'](_0x2ae7d9=>_0x2ae7d9[_0x573889(0xe7)]()||_0x2ae7d9[_0x573889(0xed)]())[_0x573889(0xdc)](_0x41c3dc=>resolve(_0x49551a,_0x41c3dc[_0x573889(0xf4)]));}function localSkillLinkCandidates(_0x439d01,_0x3fc948,_0x324245){const _0x4e3cae=a99_0x323a;if(!existsSync(_0x439d01))return[];const _0x9fecfa=_0x3fc948+'--';return readdirSync(_0x439d01,{'withFileTypes':!![]})[_0x4e3cae(0xeb)](_0x35cf96=>_0x35cf96[_0x4e3cae(0xe7)]()||_0x35cf96[_0x4e3cae(0xed)]())[_0x4e3cae(0xeb)](_0x595d39=>_0x595d39['name'][_0x4e3cae(0xfd)](_0x9fecfa)||_0x324245['has'](_0x4e3cae(0xf8)))[_0x4e3cae(0xdc)](_0x1dd134=>resolve(_0x439d01,_0x1dd134[_0x4e3cae(0xf4)]));}function collectLocalRuntimeSkill(_0x135d96,_0x266393,_0x1a492e){const _0x2b6fda=a99_0x323a,_0x4c24cf=resolve(_0x266393,METADATA_FILE),_0x773b=readMetadataIfPresent(_0x4c24cf);if(!_0x773b)return;if(_0x773b[_0x2b6fda(0xe8)]!==_0x1a492e[_0x2b6fda(0xe8)])return;if(!isRuntimeSkillScope(_0x773b[_0x2b6fda(0xe2)])||!_0x1a492e['scopes']['has'](_0x773b['scope']))return;const _0x380c74=_0x773b[_0x2b6fda(0xd5)]?.[_0x2b6fda(0xf2)]();if(!_0x380c74)return;if(_0x1a492e['code']&&_0x380c74!==_0x1a492e[_0x2b6fda(0xda)])return;const _0x5a479c=_0x773b['scope']+':'+_0x380c74,_0x4637dd=_0x1a492e[_0x2b6fda(0xea)]?[_0x1a492e[_0x2b6fda(0xea)]]:[],_0x39022c=_0x135d96[_0x2b6fda(0xe5)](_0x5a479c);if(_0x39022c){_0x1a492e[_0x2b6fda(0xe3)]===_0x2b6fda(0xd6)&&(_0x39022c[_0x2b6fda(0xe9)]=_0x266393,_0x39022c[_0x2b6fda(0xd3)]=_0x266393,_0x39022c[_0x2b6fda(0xf7)]=resolve(_0x266393,SKILL_FILE),_0x39022c[_0x2b6fda(0xd9)]=_0x4c24cf);for(const _0x153f2d of _0x4637dd){!_0x39022c[_0x2b6fda(0xdf)][_0x2b6fda(0xd4)](_0x153f2d)&&_0x39022c[_0x2b6fda(0xdf)]['push'](_0x153f2d);}_0x39022c[_0x2b6fda(0xdf)][_0x2b6fda(0xf9)]();return;}_0x135d96[_0x2b6fda(0xfb)](_0x5a479c,{..._0x773b,'tags':Array['isArray'](_0x773b['tags'])?_0x773b[_0x2b6fda(0xdd)]:[],'scope':_0x773b[_0x2b6fda(0xe2)],'source':'local','dir':_0x266393,'cacheDir':_0x1a492e[_0x2b6fda(0xe3)]===_0x2b6fda(0xd6)?_0x266393:undefined,'skillMdPath':resolve(_0x266393,SKILL_FILE),'metadataPath':_0x4c24cf,'linkedPaths':_0x4637dd});}function a99_0x323a(_0x278dfe,_0x5c28a1){_0x278dfe=_0x278dfe-0xd3;const _0x5d576d=a99_0x5d57();let _0x323a05=_0x5d576d[_0x278dfe];return _0x323a05;}function compareLocalRuntimeSkills(_0x84f065,_0xcfd87b){const _0x2819c3=a99_0x323a,_0x47cbd7={'personal':0x0,'company':0x1,'builtin':0x2};return _0x47cbd7[_0x84f065[_0x2819c3(0xe2)]]-_0x47cbd7[_0xcfd87b[_0x2819c3(0xe2)]]||_0x84f065[_0x2819c3(0xd5)][_0x2819c3(0xe6)](_0xcfd87b[_0x2819c3(0xd5)])||_0x84f065['dir'][_0x2819c3(0xe6)](_0xcfd87b[_0x2819c3(0xe9)]);}
@@ -1 +1 @@
1
- function a100_0x738a(_0x31d58a,_0x1fad98){_0x31d58a=_0x31d58a-0x178;const _0x407e1f=a100_0x407e();let _0x738a71=_0x407e1f[_0x31d58a];return _0x738a71;}(function(_0x100bb9,_0x910a65){const _0x1580e8=a100_0x738a,_0x2f9cec=_0x100bb9();while(!![]){try{const _0x1c8833=parseInt(_0x1580e8(0x19e))/0x1*(-parseInt(_0x1580e8(0x184))/0x2)+-parseInt(_0x1580e8(0x17b))/0x3+-parseInt(_0x1580e8(0x183))/0x4*(-parseInt(_0x1580e8(0x18d))/0x5)+-parseInt(_0x1580e8(0x178))/0x6+parseInt(_0x1580e8(0x17d))/0x7+-parseInt(_0x1580e8(0x182))/0x8*(parseInt(_0x1580e8(0x190))/0x9)+-parseInt(_0x1580e8(0x19c))/0xa*(-parseInt(_0x1580e8(0x18e))/0xb);if(_0x1c8833===_0x910a65)break;else _0x2f9cec['push'](_0x2f9cec['shift']());}catch(_0x12c301){_0x2f9cec['push'](_0x2f9cec['shift']());}}}(a100_0x407e,0x5bda1));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(_0x50507a){const _0x3d41fd=a100_0x738a;return _0x50507a['bytes']??Buffer[_0x3d41fd(0x198)](_0x50507a[_0x3d41fd(0x1a7)]??'','utf8');}export function fileText(_0x56786b){const _0x3f8d5c=a100_0x738a;return fileContent(_0x56786b)[_0x3f8d5c(0x185)](_0x3f8d5c(0x17c));}export function normalizeLocalFiles(_0xcc097c){const _0x332ba4=a100_0x738a;if(!Array[_0x332ba4(0x195)](_0xcc097c)||_0xcc097c[_0x332ba4(0x181)]===0x0)return[];const _0x3774d7=new Map();for(const _0x2d3940 of _0xcc097c){if(!_0x2d3940||typeof _0x2d3940!==_0x332ba4(0x17e)||typeof _0x2d3940[_0x332ba4(0x1a0)]!==_0x332ba4(0x18f))throw CliErrors[_0x332ba4(0x1a2)](_0x332ba4(0x17a));const _0xa03ec4=normalizeSkillRelativePath(_0x2d3940[_0x332ba4(0x1a0)]);if(_0x3774d7['has'](_0xa03ec4))throw CliErrors[_0x332ba4(0x1a2)](_0x332ba4(0x1a5)+_0xa03ec4);if(_0x2d3940[_0x332ba4(0x19f)]!==undefined&&!Buffer[_0x332ba4(0x18c)](_0x2d3940[_0x332ba4(0x19f)]))throw CliErrors[_0x332ba4(0x1a2)](_0x332ba4(0x1a4)+_0xa03ec4);if(_0x2d3940['bytes']===undefined&&typeof _0x2d3940[_0x332ba4(0x1a7)]!=='string')throw CliErrors[_0x332ba4(0x1a2)](_0x332ba4(0x1a3)+_0xa03ec4);const _0x3f6bf5=fileContent(_0x2d3940);_0x3774d7[_0x332ba4(0x186)](_0xa03ec4,{'path':_0xa03ec4,'bytes':_0x3f6bf5});}return Array[_0x332ba4(0x198)](_0x3774d7[_0x332ba4(0x19a)]())[_0x332ba4(0x187)](compareSkillFiles);}export function normalizeManifestFiles(_0x3bd922){const _0x2e745d=a100_0x738a;if(!Array[_0x2e745d(0x195)](_0x3bd922)||_0x3bd922[_0x2e745d(0x181)]===0x0)return[];const _0x52c3e6=new Map();for(const _0x955848 of _0x3bd922){if(!_0x955848||typeof _0x955848!==_0x2e745d(0x17e)||typeof _0x955848[_0x2e745d(0x1a0)]!==_0x2e745d(0x18f))throw CliErrors[_0x2e745d(0x1a2)](_0x2e745d(0x17a));const _0x36fcb3=normalizeSkillRelativePath(_0x955848['path']);if(_0x52c3e6[_0x2e745d(0x180)](_0x36fcb3))throw CliErrors['validation'](_0x2e745d(0x1a5)+_0x36fcb3);if(!isSha256Hex(_0x955848['sha256']))throw CliErrors[_0x2e745d(0x1a2)](_0x2e745d(0x197)+_0x36fcb3);if(!Number[_0x2e745d(0x19b)](_0x955848['size'])||_0x955848[_0x2e745d(0x194)]<0x0)throw CliErrors[_0x2e745d(0x1a2)](_0x2e745d(0x191)+_0x36fcb3);_0x52c3e6[_0x2e745d(0x186)](_0x36fcb3,{'path':_0x36fcb3,'sha256':_0x955848[_0x2e745d(0x1a1)][_0x2e745d(0x18b)](),'size':_0x955848[_0x2e745d(0x194)]});}return Array['from'](_0x52c3e6[_0x2e745d(0x19a)]())[_0x2e745d(0x187)](compareSkillFiles);}export function scanSkillDirectory(_0x4af145){const _0x36e87f=realpathSync(_0x4af145),_0x234102=[];function _0x44dcca(_0x28be48){const _0x216828=a100_0x738a,_0x35df58=readdirSync(_0x28be48,{'withFileTypes':!![]})['sort']((_0x184a10,_0x3c97c4)=>_0x184a10[_0x216828(0x17f)][_0x216828(0x18a)](_0x3c97c4[_0x216828(0x17f)]));for(const _0x185186 of _0x35df58){if(_0x185186[_0x216828(0x188)]()&&IGNORED_DIR_NAMES[_0x216828(0x180)](_0x185186[_0x216828(0x17f)]))continue;if(IGNORED_FILE_NAMES[_0x216828(0x180)](_0x185186[_0x216828(0x17f)]))continue;const _0x5af2e9=resolve(_0x28be48,_0x185186[_0x216828(0x17f)]);if(_0x185186['isSymbolicLink']())throw CliErrors['validation']('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x5af2e9);const _0xa802f0=toPosixPath(relative(_0x36e87f,_0x5af2e9));if(_0x185186[_0x216828(0x188)]()){_0x44dcca(_0x5af2e9);continue;}if(!_0x185186['isFile']())continue;validateSkillRelativePath(_0xa802f0);const _0x4e9dc9=readFileSync(_0x5af2e9);_0x234102[_0x216828(0x196)]({'path':_0xa802f0,'bytes':_0x4e9dc9});}}return _0x44dcca(_0x36e87f),normalizeLocalFiles(_0x234102);}export function compareSkillFiles(_0xce0148,_0x58b9e5){const _0x34d517=a100_0x738a;if(_0xce0148[_0x34d517(0x1a0)]===SKILL_FILE)return _0x58b9e5[_0x34d517(0x1a0)]===SKILL_FILE?0x0:-0x1;if(_0x58b9e5['path']===SKILL_FILE)return 0x1;return Buffer[_0x34d517(0x19d)](Buffer[_0x34d517(0x198)](_0xce0148['path'],_0x34d517(0x17c)),Buffer[_0x34d517(0x198)](_0x58b9e5[_0x34d517(0x1a0)],_0x34d517(0x17c)));}function a100_0x407e(){const _0xbacbb=['483620VGJfVA','46SEWRgf','toString','set','sort','isDirectory','Unsafe\x20Skill\x20file\x20path:\x20','localeCompare','toLowerCase','isBuffer','5OFHyxS','10626uktcIB','string','9PrvgLd','Skill\x20file\x20size\x20is\x20invalid:\x20','trim','replace','size','isArray','push','Skill\x20file\x20sha256\x20is\x20invalid:\x20','from','split','values','isSafeInteger','12290LfrrDX','compare','11506sSopfa','bytes','path','sha256','validation','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Duplicate\x20Skill\x20file\x20path:\x20','test','content','1405434TYSpwo','includes','Skill\x20file\x20path\x20must\x20be\x20text.','1920282WybiYL','utf8','2487142eIsthB','object','name','has','length','1185832ySEGcW'];a100_0x407e=function(){return _0xbacbb;};return a100_0x407e();}export function normalizeSkillRelativePath(_0x5b1047){const _0x15359b=a100_0x738a,_0x4b4aa0=toPosixPath(_0x5b1047[_0x15359b(0x192)]());return validateSkillRelativePath(_0x4b4aa0),_0x4b4aa0;}export function validateSkillRelativePath(_0x518adf){const _0x4ae920=a100_0x738a;if(!_0x518adf||_0x518adf['startsWith']('/')||_0x518adf[_0x4ae920(0x179)]('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x518adf);for(const _0x353a33 of _0x518adf[_0x4ae920(0x199)]('/')){if(!_0x353a33||_0x353a33==='.'||_0x353a33==='..')throw CliErrors[_0x4ae920(0x1a2)](_0x4ae920(0x189)+_0x518adf);}}export function toPosixPath(_0x2aec8d){const _0xf44105=a100_0x738a;return _0x2aec8d[_0xf44105(0x193)](/\\/g,'/');}export function isSha256Hex(_0x426bba){const _0x93c2b5=a100_0x738a;return typeof _0x426bba===_0x93c2b5(0x18f)&&/^[a-fA-F0-9]{64}$/[_0x93c2b5(0x1a6)](_0x426bba);}
1
+ (function(_0x11973b,_0x352e4a){const _0x16c6e3=a100_0x2015,_0x7077d5=_0x11973b();while(!![]){try{const _0x201ffc=-parseInt(_0x16c6e3(0x1f5))/0x1*(parseInt(_0x16c6e3(0x1d5))/0x2)+parseInt(_0x16c6e3(0x1f0))/0x3*(parseInt(_0x16c6e3(0x1d4))/0x4)+parseInt(_0x16c6e3(0x1eb))/0x5*(-parseInt(_0x16c6e3(0x1d8))/0x6)+parseInt(_0x16c6e3(0x1fd))/0x7+parseInt(_0x16c6e3(0x1df))/0x8*(parseInt(_0x16c6e3(0x1dd))/0x9)+-parseInt(_0x16c6e3(0x1e1))/0xa*(-parseInt(_0x16c6e3(0x1f8))/0xb)+parseInt(_0x16c6e3(0x1ff))/0xc*(-parseInt(_0x16c6e3(0x1db))/0xd);if(_0x201ffc===_0x352e4a)break;else _0x7077d5['push'](_0x7077d5['shift']());}catch(_0x24a639){_0x7077d5['push'](_0x7077d5['shift']());}}}(a100_0x2b96,0x81b7c));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(_0x14a701){const _0x573384=a100_0x2015;return _0x14a701['bytes']??Buffer['from'](_0x14a701[_0x573384(0x1ea)]??'',_0x573384(0x1fb));}function a100_0x2b96(){const _0x35cdb3=['string','3052980xCYtrI','set','1359552mRneqj','Skill\x20file\x20sha256\x20is\x20invalid:\x20','1596vslcNB','65470faNxgK','split','object','704118LDGTom','Duplicate\x20Skill\x20file\x20path:\x20','replace','91UBJsGV','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','11943fTXcHe','length','5288nAfkxR','sort','5990UNmcvq','values','isBuffer','bytes','name','isDirectory','startsWith','isFile','toLowerCase','content','5IuRyOv','Skill\x20file\x20size\x20is\x20invalid:\x20','validation','compare','path','120BYXKZk','has','isArray','test','toString','28saQygI','size','isSafeInteger','18898ctlIom','sha256','from','utf8'];a100_0x2b96=function(){return _0x35cdb3;};return a100_0x2b96();}export function fileText(_0x4883aa){const _0x3bece7=a100_0x2015;return fileContent(_0x4883aa)[_0x3bece7(0x1f4)](_0x3bece7(0x1fb));}export function normalizeLocalFiles(_0x4b8d1e){const _0x3eda37=a100_0x2015;if(!Array[_0x3eda37(0x1f2)](_0x4b8d1e)||_0x4b8d1e[_0x3eda37(0x1de)]===0x0)return[];const _0x23b6d2=new Map();for(const _0x25a5d7 of _0x4b8d1e){if(!_0x25a5d7||typeof _0x25a5d7!==_0x3eda37(0x1d7)||typeof _0x25a5d7['path']!=='string')throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5bce06=normalizeSkillRelativePath(_0x25a5d7[_0x3eda37(0x1ef)]);if(_0x23b6d2[_0x3eda37(0x1f1)](_0x5bce06))throw CliErrors[_0x3eda37(0x1ed)](_0x3eda37(0x1d9)+_0x5bce06);if(_0x25a5d7[_0x3eda37(0x1e4)]!==undefined&&!Buffer[_0x3eda37(0x1e3)](_0x25a5d7[_0x3eda37(0x1e4)]))throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x5bce06);if(_0x25a5d7[_0x3eda37(0x1e4)]===undefined&&typeof _0x25a5d7['content']!==_0x3eda37(0x1fc))throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x5bce06);const _0x2a357a=fileContent(_0x25a5d7);_0x23b6d2[_0x3eda37(0x1fe)](_0x5bce06,{'path':_0x5bce06,'bytes':_0x2a357a});}return Array['from'](_0x23b6d2[_0x3eda37(0x1e2)]())[_0x3eda37(0x1e0)](compareSkillFiles);}export function normalizeManifestFiles(_0x5a5043){const _0xf83e6e=a100_0x2015;if(!Array[_0xf83e6e(0x1f2)](_0x5a5043)||_0x5a5043[_0xf83e6e(0x1de)]===0x0)return[];const _0x46c26=new Map();for(const _0x5ca8d4 of _0x5a5043){if(!_0x5ca8d4||typeof _0x5ca8d4!==_0xf83e6e(0x1d7)||typeof _0x5ca8d4['path']!==_0xf83e6e(0x1fc))throw CliErrors[_0xf83e6e(0x1ed)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1eac69=normalizeSkillRelativePath(_0x5ca8d4['path']);if(_0x46c26['has'](_0x1eac69))throw CliErrors['validation'](_0xf83e6e(0x1d9)+_0x1eac69);if(!isSha256Hex(_0x5ca8d4[_0xf83e6e(0x1f9)]))throw CliErrors['validation'](_0xf83e6e(0x200)+_0x1eac69);if(!Number[_0xf83e6e(0x1f7)](_0x5ca8d4['size'])||_0x5ca8d4[_0xf83e6e(0x1f6)]<0x0)throw CliErrors[_0xf83e6e(0x1ed)](_0xf83e6e(0x1ec)+_0x1eac69);_0x46c26[_0xf83e6e(0x1fe)](_0x1eac69,{'path':_0x1eac69,'sha256':_0x5ca8d4[_0xf83e6e(0x1f9)][_0xf83e6e(0x1e9)](),'size':_0x5ca8d4[_0xf83e6e(0x1f6)]});}return Array[_0xf83e6e(0x1fa)](_0x46c26[_0xf83e6e(0x1e2)]())[_0xf83e6e(0x1e0)](compareSkillFiles);}export function scanSkillDirectory(_0x219ebd){const _0x3ca635=realpathSync(_0x219ebd),_0x57a5a5=[];function _0x27b849(_0x5bcfc4){const _0x1489bb=a100_0x2015,_0xc38a1f=readdirSync(_0x5bcfc4,{'withFileTypes':!![]})[_0x1489bb(0x1e0)]((_0x2d8392,_0x5e49ec)=>_0x2d8392[_0x1489bb(0x1e5)]['localeCompare'](_0x5e49ec['name']));for(const _0x5404cf of _0xc38a1f){if(_0x5404cf[_0x1489bb(0x1e6)]()&&IGNORED_DIR_NAMES['has'](_0x5404cf['name']))continue;if(IGNORED_FILE_NAMES[_0x1489bb(0x1f1)](_0x5404cf[_0x1489bb(0x1e5)]))continue;const _0x598c20=resolve(_0x5bcfc4,_0x5404cf[_0x1489bb(0x1e5)]);if(_0x5404cf['isSymbolicLink']())throw CliErrors[_0x1489bb(0x1ed)](_0x1489bb(0x1dc)+_0x598c20);const _0x4e4544=toPosixPath(relative(_0x3ca635,_0x598c20));if(_0x5404cf[_0x1489bb(0x1e6)]()){_0x27b849(_0x598c20);continue;}if(!_0x5404cf[_0x1489bb(0x1e8)]())continue;validateSkillRelativePath(_0x4e4544);const _0x46c2f5=readFileSync(_0x598c20);_0x57a5a5['push']({'path':_0x4e4544,'bytes':_0x46c2f5});}}return _0x27b849(_0x3ca635),normalizeLocalFiles(_0x57a5a5);}export function compareSkillFiles(_0x74b858,_0x5c23cc){const _0x216435=a100_0x2015;if(_0x74b858[_0x216435(0x1ef)]===SKILL_FILE)return _0x5c23cc[_0x216435(0x1ef)]===SKILL_FILE?0x0:-0x1;if(_0x5c23cc[_0x216435(0x1ef)]===SKILL_FILE)return 0x1;return Buffer[_0x216435(0x1ee)](Buffer[_0x216435(0x1fa)](_0x74b858[_0x216435(0x1ef)],'utf8'),Buffer[_0x216435(0x1fa)](_0x5c23cc[_0x216435(0x1ef)],_0x216435(0x1fb)));}export function normalizeSkillRelativePath(_0x1a4c3f){const _0x121df6=toPosixPath(_0x1a4c3f['trim']());return validateSkillRelativePath(_0x121df6),_0x121df6;}function a100_0x2015(_0x5625f6,_0x2ba8b4){_0x5625f6=_0x5625f6-0x1d4;const _0x2b96f7=a100_0x2b96();let _0x20158e=_0x2b96f7[_0x5625f6];return _0x20158e;}export function validateSkillRelativePath(_0x138f66){const _0x1c69ff=a100_0x2015;if(!_0x138f66||_0x138f66[_0x1c69ff(0x1e7)]('/')||_0x138f66['includes']('//'))throw CliErrors[_0x1c69ff(0x1ed)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x138f66);for(const _0x172e16 of _0x138f66[_0x1c69ff(0x1d6)]('/')){if(!_0x172e16||_0x172e16==='.'||_0x172e16==='..')throw CliErrors[_0x1c69ff(0x1ed)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x138f66);}}export function toPosixPath(_0x3ab747){const _0x344124=a100_0x2015;return _0x3ab747[_0x344124(0x1da)](/\\/g,'/');}export function isSha256Hex(_0x11bd9a){const _0x50c103=a100_0x2015;return typeof _0x11bd9a==='string'&&/^[a-fA-F0-9]{64}$/[_0x50c103(0x1f3)](_0x11bd9a);}
@@ -1 +1 @@
1
- (function(_0x7e0512,_0x5b7ac1){const _0x318c19=a101_0x5a19,_0x38e0b8=_0x7e0512();while(!![]){try{const _0x2b26d1=parseInt(_0x318c19(0xf7))/0x1+parseInt(_0x318c19(0xef))/0x2*(-parseInt(_0x318c19(0xd7))/0x3)+parseInt(_0x318c19(0xfa))/0x4*(parseInt(_0x318c19(0xdc))/0x5)+parseInt(_0x318c19(0x104))/0x6*(-parseInt(_0x318c19(0xd9))/0x7)+-parseInt(_0x318c19(0x100))/0x8+-parseInt(_0x318c19(0xf2))/0x9+-parseInt(_0x318c19(0xdb))/0xa*(-parseInt(_0x318c19(0x101))/0xb);if(_0x2b26d1===_0x5b7ac1)break;else _0x38e0b8['push'](_0x38e0b8['shift']());}catch(_0x583aae){_0x38e0b8['push'](_0x38e0b8['shift']());}}}(a101_0x3b66,0x99fcf));function a101_0x5a19(_0x290891,_0x4b4aaa){_0x290891=_0x290891-0xd4;const _0x3b66e6=a101_0x3b66();let _0x5a1935=_0x3b66e6[_0x290891];return _0x5a1935;}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';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a101_0x3b66(){const _0xc3a069=['402467ZHNeqY','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','stringify','4XQTCnF','displayName:\x20','packageBytes','contentHash','env','paths','9445728abviGT','22939246nApZZE','find','join','973230LhpOcW','keys','---\x0a','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','path','validation','1983SUiKlp','description','35gdierm','trimEnd','10RIKSJF','3906155DnuZyW','test','---','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','fileHashes','length','utf8','skillName','set','filter','description:\x20','replace','delete','Runtime\x20Skill\x20package\x20is\x20missing\x20','displayName','accessKey','pulledAt','errors','.\x20Changed\x20file:\x20','1754EVzirN','has','slice','602199ByoxRg','appCode','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','isFile','contents'];a101_0x3b66=function(){return _0xc3a069;};return a101_0x3b66();}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x1244ef,_0x524760,_0x313e06){const _0x135a2a=a101_0x5a19,_0x4e627a=requireSkillCode(_0x1244ef),_0x47a5b7=requirePackageBytes(_0x4e627a,_0x313e06[_0x135a2a(0xfc)]),_0x4a2802=extractDownloadedPackage(_0x47a5b7),_0x495a47=_0x4a2802['find'](_0x2bbad2=>_0x2bbad2[_0x135a2a(0xd5)]===SKILL_FILE);if(!_0x495a47)throw CliErrors[_0x135a2a(0xd6)](_0x135a2a(0xe9)+SKILL_FILE+':\x20'+_0x4e627a);const _0x2644f8=withMaterializedSkillFrontmatter(_0x4a2802,_0x1244ef,_0x4e627a),_0x24d827=_0x2644f8[_0x135a2a(0x102)](_0x4caf49=>_0x4caf49[_0x135a2a(0xd5)]===SKILL_FILE),_0x314d7c=fileText(_0x24d827),_0x5d743e=getRuntimeSkillDir(_0x313e06[_0x135a2a(0xfe)],_0x313e06[_0x135a2a(0xeb)],_0x313e06['appCode'],_0x524760,_0x4e627a,_0x313e06[_0x135a2a(0xff)]),_0x22d640=resolve(_0x5d743e,SKILL_FILE),_0x23541a=resolve(_0x5d743e,METADATA_FILE),_0x201326=contentHash(_0x314d7c),_0x13eef5=readMetadataIfPresent(_0x23541a)?.[_0x135a2a(0xe0)];ensurePulledFilesCanBeOverwritten(_0x5d743e,_0x23541a,_0x2644f8,_0x313e06['force']===!![]),mkdirSync(_0x5d743e,{'recursive':!![],'mode':0x1c0});const _0x54695a=existsSync(_0x22d640)?readFileSync(_0x22d640,'utf8'):undefined;return materializeFiles(_0x5d743e,_0x2644f8),removeStaleManagedFiles(_0x5d743e,_0x13eef5,_0x2644f8),writeJsonAtomic(_0x23541a,buildMetadata(_0x1244ef,_0x524760,_0x313e06[_0x135a2a(0xf3)],_0x201326,_0x313e06[_0x135a2a(0xec)],_0x2644f8,_0x47a5b7)),{'skill':_0x1244ef,'scope':_0x524760,'dir':_0x5d743e,'skillMdPath':_0x22d640,'metadataPath':_0x23541a,'contentHash':_0x201326,'changed':_0x54695a!==_0x314d7c};}function withMaterializedSkillFrontmatter(_0x16cd25,_0x9eb30f,_0x1e781f){const _0x277255=skillDisplayName(_0x9eb30f,_0x1e781f),_0x15b328=_0x9eb30f['description']?.['trim']()||_0x277255||_0x1e781f;return normalizeLocalFiles(_0x16cd25)['map'](_0x18abfe=>{const _0x563d0f=a101_0x5a19,_0x38e57f=fileText(_0x18abfe);if(_0x18abfe[_0x563d0f(0xd5)]!==SKILL_FILE)return _0x18abfe;if(hasYamlFrontmatter(_0x38e57f))return{'path':_0x18abfe[_0x563d0f(0xd5)],'content':withSyncedDisplayName(_0x38e57f,_0x277255)};return{'path':_0x18abfe['path'],'content':prependSkillFrontmatter(_0x38e57f,{'name':_0x1e781f,'displayName':_0x277255,'description':_0x15b328})};});}function hasYamlFrontmatter(_0x1c8328){const _0x4b0510=a101_0x5a19;return/^\uFEFF?---\s*\r?\n/[_0x4b0510(0xdd)](_0x1c8328);}function prependSkillFrontmatter(_0x599f25,_0x10d0c9){const _0x6e4f17=a101_0x5a19,_0x169a5b=_0x599f25['replace'](/^\uFEFF/,'');return[_0x6e4f17(0xde),'name:\x20'+yamlString(_0x10d0c9['name']),_0x10d0c9['displayName']?_0x6e4f17(0xfb)+yamlString(_0x10d0c9[_0x6e4f17(0xea)]):undefined,_0x6e4f17(0xe6)+yamlString(_0x10d0c9[_0x6e4f17(0xd8)]),_0x6e4f17(0xde),'',_0x169a5b][_0x6e4f17(0xe5)](_0x45783b=>_0x45783b!==undefined)[_0x6e4f17(0x103)]('\x0a');}function yamlString(_0x18a1b1){const _0x5a199d=a101_0x5a19;return JSON[_0x5a199d(0xf9)](_0x18a1b1[_0x5a199d(0xe7)](/\r/g,'')['trim']());}function skillDisplayName(_0x331ffb,_0x2af6a6){const _0x440ec9=a101_0x5a19,_0xd90086=_0x331ffb[_0x440ec9(0xe3)]?.['trim']();return _0xd90086||_0x2af6a6;}function withSyncedDisplayName(_0x1ddd35,_0x80f639){const _0x239a88=a101_0x5a19,_0x255239=_0x1ddd35['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x255239)return _0x1ddd35;const _0xd40f2b=_0x255239[0x1]??'',_0x1876ed=_0x255239[0x2]??'',_0x818803=parseDocument(_0x1876ed);if(_0x818803[_0x239a88(0xed)][_0x239a88(0xe1)]>0x0||!isMap(_0x818803[_0x239a88(0xf6)]))return _0x1ddd35;if(_0x80f639)_0x818803[_0x239a88(0xe4)](_0x239a88(0xea),_0x80f639);else{if(_0x818803[_0x239a88(0xf0)]('displayName'))_0x818803[_0x239a88(0xe8)](_0x239a88(0xea));else return _0x1ddd35;}const _0x58d716=String(_0x818803)[_0x239a88(0xda)](),_0x184961=_0x1ddd35[_0x239a88(0xf1)](_0x255239[0x0][_0x239a88(0xe1)])[_0x239a88(0xe7)](/^\r?\n/,'');return _0xd40f2b+_0x239a88(0x106)+_0x58d716+'\x0a---\x0a\x0a'+_0x184961;}function ensurePulledFilesCanBeOverwritten(_0x4856cf,_0x3387fd,_0x363bee,_0x4a10af){const _0x3fa34e=a101_0x5a19;if(_0x4a10af||!existsSync(_0x3387fd))return;const _0x92fadd=readMetadataIfPresent(_0x3387fd);if(!_0x92fadd)return;const _0x44a1e0=_0x92fadd[_0x3fa34e(0xe0)]&&Object[_0x3fa34e(0x105)](_0x92fadd['fileHashes'])['length']>0x0?_0x92fadd['fileHashes']:undefined;if(_0x44a1e0)for(const [_0x17294e,_0x3d2f89]of Object['entries'](_0x44a1e0)){const _0x3a1570=resolveManagedFilePath(_0x4856cf,_0x17294e);if(!existsSync(_0x3a1570))throw CliErrors[_0x3fa34e(0xd6)](_0x3fa34e(0xdf)+_0x4856cf,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x17294e);const _0x5b9729=lstatSync(_0x3a1570);if(!_0x5b9729[_0x3fa34e(0xf5)]())throw CliErrors['validation'](_0x3fa34e(0xdf)+_0x4856cf,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x17294e);const _0x3b6ce0=bufferSha256(readFileSync(_0x3a1570));if(_0x3b6ce0!==_0x3d2f89)throw CliErrors[_0x3fa34e(0xd6)](_0x3fa34e(0xdf)+_0x4856cf+_0x3fa34e(0xee)+_0x17294e,_0x3fa34e(0xd4)+_0x17294e);}else{const _0x5110cf=resolve(_0x4856cf,SKILL_FILE);if(existsSync(_0x5110cf)&&_0x92fadd[_0x3fa34e(0xfd)]){const _0x24015b=contentHash(readFileSync(_0x5110cf,_0x3fa34e(0xe2)));if(_0x24015b!==_0x92fadd[_0x3fa34e(0xfd)])throw CliErrors[_0x3fa34e(0xd6)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x5110cf,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x188c15 of normalizeLocalFiles(_0x363bee)){if(_0x44a1e0?.[_0x188c15[_0x3fa34e(0xd5)]])continue;if(!_0x44a1e0&&_0x188c15[_0x3fa34e(0xd5)]===SKILL_FILE)continue;const _0x47e7f6=resolveManagedFilePath(_0x4856cf,_0x188c15[_0x3fa34e(0xd5)]);if(!existsSync(_0x47e7f6))continue;const _0x1cc212=lstatSync(_0x47e7f6);if(!_0x1cc212[_0x3fa34e(0xf5)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x4856cf,_0x3fa34e(0xf4)+_0x188c15[_0x3fa34e(0xd5)]);const _0x254598=bufferSha256(readFileSync(_0x47e7f6));if(_0x254598!==fileHash(_0x188c15))throw CliErrors[_0x3fa34e(0xd6)](_0x3fa34e(0xdf)+_0x4856cf,_0x3fa34e(0xf8)+_0x188c15[_0x3fa34e(0xd5)]);}}function materializeFiles(_0x1bcc7c,_0x586652){for(const _0x2ffb42 of normalizeLocalFiles(_0x586652)){const _0xc5a032=resolveManagedFilePath(_0x1bcc7c,_0x2ffb42['path']);mkdirSync(dirname(_0xc5a032),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0xc5a032,fileContent(_0x2ffb42),0x180);}}function removeStaleManagedFiles(_0x9b60c4,_0x21b0ae,_0x3a1ea1){const _0x556feb=a101_0x5a19;if(!_0x21b0ae)return;const _0x529dd3=new Set(normalizeLocalFiles(_0x3a1ea1)['map'](_0x2ba61c=>_0x2ba61c['path']));for(const _0xd29096 of Object['keys'](_0x21b0ae)){if(_0x529dd3[_0x556feb(0xf0)](_0xd29096))continue;const _0xfa156e=resolveManagedFilePath(_0x9b60c4,_0xd29096);existsSync(_0xfa156e)&&lstatSync(_0xfa156e)[_0x556feb(0xf5)]()&&rmSync(_0xfa156e,{'force':!![]});}}
1
+ (function(_0x4ef604,_0x314846){const _0x1063f1=a101_0x4cf6,_0x3f4fe6=_0x4ef604();while(!![]){try{const _0x585038=-parseInt(_0x1063f1(0xb4))/0x1+parseInt(_0x1063f1(0xab))/0x2*(-parseInt(_0x1063f1(0x8c))/0x3)+parseInt(_0x1063f1(0xae))/0x4+parseInt(_0x1063f1(0x9d))/0x5+-parseInt(_0x1063f1(0xad))/0x6*(parseInt(_0x1063f1(0xbc))/0x7)+-parseInt(_0x1063f1(0x9c))/0x8*(-parseInt(_0x1063f1(0x8e))/0x9)+parseInt(_0x1063f1(0xb2))/0xa*(-parseInt(_0x1063f1(0xb5))/0xb);if(_0x585038===_0x314846)break;else _0x3f4fe6['push'](_0x3f4fe6['shift']());}catch(_0x154c8a){_0x3f4fe6['push'](_0x3f4fe6['shift']());}}}(a101_0x4ad8,0xe102e));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';function a101_0x4cf6(_0x5942f3,_0x135071){_0x5942f3=_0x5942f3-0x87;const _0x4ad84f=a101_0x4ad8();let _0x4cf682=_0x4ad84f[_0x5942f3];return _0x4cf682;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x18ccd7,_0x565c01,_0x339759){const _0x3d0406=a101_0x4cf6,_0x478beb=requireSkillCode(_0x18ccd7),_0x1c6bba=requirePackageBytes(_0x478beb,_0x339759[_0x3d0406(0xa3)]),_0x20b936=extractDownloadedPackage(_0x1c6bba),_0x444ba4=_0x20b936[_0x3d0406(0x94)](_0x4e08f7=>_0x4e08f7[_0x3d0406(0xa7)]===SKILL_FILE);if(!_0x444ba4)throw CliErrors['validation'](_0x3d0406(0x89)+SKILL_FILE+':\x20'+_0x478beb);const _0x1db07c=withMaterializedSkillFrontmatter(_0x20b936,_0x18ccd7,_0x478beb),_0x2ece63=_0x1db07c[_0x3d0406(0x94)](_0x40dbfe=>_0x40dbfe[_0x3d0406(0xa7)]===SKILL_FILE),_0x4f123c=fileText(_0x2ece63),_0x13e279=getRuntimeSkillDir(_0x339759[_0x3d0406(0x9f)],_0x339759['accessKey'],_0x339759[_0x3d0406(0x99)],_0x565c01,_0x478beb,_0x339759[_0x3d0406(0xb1)]),_0x2136f8=resolve(_0x13e279,SKILL_FILE),_0x3207ac=resolve(_0x13e279,METADATA_FILE),_0x333afb=contentHash(_0x4f123c),_0x3ae24c=readMetadataIfPresent(_0x3207ac)?.[_0x3d0406(0x9e)];ensurePulledFilesCanBeOverwritten(_0x13e279,_0x3207ac,_0x1db07c,_0x339759[_0x3d0406(0x8d)]===!![]),mkdirSync(_0x13e279,{'recursive':!![],'mode':0x1c0});const _0x54d40a=existsSync(_0x2136f8)?readFileSync(_0x2136f8,'utf8'):undefined;return materializeFiles(_0x13e279,_0x1db07c),removeStaleManagedFiles(_0x13e279,_0x3ae24c,_0x1db07c),writeJsonAtomic(_0x3207ac,buildMetadata(_0x18ccd7,_0x565c01,_0x339759[_0x3d0406(0x99)],_0x333afb,_0x339759[_0x3d0406(0xa6)],_0x1db07c,_0x1c6bba)),{'skill':_0x18ccd7,'scope':_0x565c01,'dir':_0x13e279,'skillMdPath':_0x2136f8,'metadataPath':_0x3207ac,'contentHash':_0x333afb,'changed':_0x54d40a!==_0x4f123c};}function withMaterializedSkillFrontmatter(_0x2284d,_0x182b16,_0x23a34e){const _0x25eb53=a101_0x4cf6,_0xe762f0=skillDisplayName(_0x182b16,_0x23a34e),_0xe32dd5=_0x182b16[_0x25eb53(0x9b)]?.[_0x25eb53(0xa2)]()||_0xe762f0||_0x23a34e;return normalizeLocalFiles(_0x2284d)[_0x25eb53(0x9a)](_0x6e20f7=>{const _0x474b31=_0x25eb53,_0x3c558f=fileText(_0x6e20f7);if(_0x6e20f7[_0x474b31(0xa7)]!==SKILL_FILE)return _0x6e20f7;if(hasYamlFrontmatter(_0x3c558f))return{'path':_0x6e20f7[_0x474b31(0xa7)],'content':withSyncedDisplayName(_0x3c558f,_0xe762f0)};return{'path':_0x6e20f7[_0x474b31(0xa7)],'content':prependSkillFrontmatter(_0x3c558f,{'name':_0x23a34e,'displayName':_0xe762f0,'description':_0xe32dd5})};});}function hasYamlFrontmatter(_0x25ce3d){const _0x426c3b=a101_0x4cf6;return/^\uFEFF?---\s*\r?\n/[_0x426c3b(0x92)](_0x25ce3d);}function prependSkillFrontmatter(_0x386e36,_0x454ecc){const _0x58895d=a101_0x4cf6,_0x2f689f=_0x386e36[_0x58895d(0xaa)](/^\uFEFF/,'');return[_0x58895d(0x87),_0x58895d(0x97)+yamlString(_0x454ecc[_0x58895d(0x90)]),_0x454ecc[_0x58895d(0xb8)]?'displayName:\x20'+yamlString(_0x454ecc['displayName']):undefined,_0x58895d(0xb7)+yamlString(_0x454ecc[_0x58895d(0x9b)]),_0x58895d(0x87),'',_0x2f689f][_0x58895d(0x96)](_0x1bbcb4=>_0x1bbcb4!==undefined)['join']('\x0a');}function yamlString(_0x307da3){const _0x481aa0=a101_0x4cf6;return JSON[_0x481aa0(0xb6)](_0x307da3[_0x481aa0(0xaa)](/\r/g,'')[_0x481aa0(0xa2)]());}function skillDisplayName(_0xd551c2,_0x2ccecb){const _0x1dbfc1=a101_0x4cf6,_0x4a93ad=_0xd551c2[_0x1dbfc1(0x91)]?.['trim']();return _0x4a93ad||_0x2ccecb;}function a101_0x4ad8(){const _0x9e4fbe=['test','keys','find','---\x0a','filter','name:\x20','errors','appCode','map','description','640EzbXhm','6127260MiJTPH','fileHashes','env','validation','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','trim','packageBytes','has','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','pulledAt','path','entries','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','replace','2VbBeeu','length','244290VKsEOk','1672704cuqSZo','isFile','contents','paths','1328460lWDIBl','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','512022kgvZkX','77aleWtg','stringify','description:\x20','displayName','\x0a---\x0a\x0a','set','delete','7MeXHLm','.\x20Changed\x20file:\x20','---','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','contentHash','utf8','2607969EiJqAd','force','183375fKJcjR','match','name','skillName'];a101_0x4ad8=function(){return _0x9e4fbe;};return a101_0x4ad8();}function withSyncedDisplayName(_0x3b7a20,_0x1711fa){const _0x38e6a5=a101_0x4cf6,_0x52fac3=_0x3b7a20[_0x38e6a5(0x8f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52fac3)return _0x3b7a20;const _0x17d675=_0x52fac3[0x1]??'',_0x2687bb=_0x52fac3[0x2]??'',_0x481a46=parseDocument(_0x2687bb);if(_0x481a46[_0x38e6a5(0x98)][_0x38e6a5(0xac)]>0x0||!isMap(_0x481a46[_0x38e6a5(0xb0)]))return _0x3b7a20;if(_0x1711fa)_0x481a46[_0x38e6a5(0xba)](_0x38e6a5(0xb8),_0x1711fa);else{if(_0x481a46[_0x38e6a5(0xa4)](_0x38e6a5(0xb8)))_0x481a46[_0x38e6a5(0xbb)](_0x38e6a5(0xb8));else return _0x3b7a20;}const _0x27cadc=String(_0x481a46)['trimEnd'](),_0x10cb7f=_0x3b7a20['slice'](_0x52fac3[0x0]['length'])[_0x38e6a5(0xaa)](/^\r?\n/,'');return _0x17d675+_0x38e6a5(0x95)+_0x27cadc+_0x38e6a5(0xb9)+_0x10cb7f;}function ensurePulledFilesCanBeOverwritten(_0x2a91c7,_0x1448d2,_0x271344,_0x77f34f){const _0x2d0605=a101_0x4cf6;if(_0x77f34f||!existsSync(_0x1448d2))return;const _0x4ea78b=readMetadataIfPresent(_0x1448d2);if(!_0x4ea78b)return;const _0xc513b8=_0x4ea78b[_0x2d0605(0x9e)]&&Object[_0x2d0605(0x93)](_0x4ea78b[_0x2d0605(0x9e)])[_0x2d0605(0xac)]>0x0?_0x4ea78b[_0x2d0605(0x9e)]:undefined;if(_0xc513b8)for(const [_0xf1816b,_0xc71ab]of Object[_0x2d0605(0xa8)](_0xc513b8)){const _0x44ca40=resolveManagedFilePath(_0x2a91c7,_0xf1816b);if(!existsSync(_0x44ca40))throw CliErrors['validation'](_0x2d0605(0xa5)+_0x2a91c7,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0xf1816b);const _0x6f8c9f=lstatSync(_0x44ca40);if(!_0x6f8c9f[_0x2d0605(0xaf)]())throw CliErrors['validation'](_0x2d0605(0xa5)+_0x2a91c7,_0x2d0605(0xb3)+_0xf1816b);const _0x42e8=bufferSha256(readFileSync(_0x44ca40));if(_0x42e8!==_0xc71ab)throw CliErrors[_0x2d0605(0xa0)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2a91c7+_0x2d0605(0xbd)+_0xf1816b,_0x2d0605(0x88)+_0xf1816b);}else{const _0x3430dd=resolve(_0x2a91c7,SKILL_FILE);if(existsSync(_0x3430dd)&&_0x4ea78b[_0x2d0605(0x8a)]){const _0x70087c=contentHash(readFileSync(_0x3430dd,_0x2d0605(0x8b)));if(_0x70087c!==_0x4ea78b['contentHash'])throw CliErrors[_0x2d0605(0xa0)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x3430dd,_0x2d0605(0xa1));}}for(const _0x4d6520 of normalizeLocalFiles(_0x271344)){if(_0xc513b8?.[_0x4d6520[_0x2d0605(0xa7)]])continue;if(!_0xc513b8&&_0x4d6520[_0x2d0605(0xa7)]===SKILL_FILE)continue;const _0x45860d=resolveManagedFilePath(_0x2a91c7,_0x4d6520[_0x2d0605(0xa7)]);if(!existsSync(_0x45860d))continue;const _0x46e7e6=lstatSync(_0x45860d);if(!_0x46e7e6[_0x2d0605(0xaf)]())throw CliErrors[_0x2d0605(0xa0)](_0x2d0605(0xa5)+_0x2a91c7,_0x2d0605(0xa9)+_0x4d6520['path']);const _0x2f69ed=bufferSha256(readFileSync(_0x45860d));if(_0x2f69ed!==fileHash(_0x4d6520))throw CliErrors[_0x2d0605(0xa0)](_0x2d0605(0xa5)+_0x2a91c7,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x4d6520[_0x2d0605(0xa7)]);}}function materializeFiles(_0x1b313f,_0x42a501){for(const _0x4447b6 of normalizeLocalFiles(_0x42a501)){const _0x29d526=resolveManagedFilePath(_0x1b313f,_0x4447b6['path']);mkdirSync(dirname(_0x29d526),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x29d526,fileContent(_0x4447b6),0x180);}}function removeStaleManagedFiles(_0x41ef0a,_0x1ca2ae,_0x101d0a){const _0x1c2fc1=a101_0x4cf6;if(!_0x1ca2ae)return;const _0x4567f9=new Set(normalizeLocalFiles(_0x101d0a)[_0x1c2fc1(0x9a)](_0x423747=>_0x423747[_0x1c2fc1(0xa7)]));for(const _0x52eb32 of Object[_0x1c2fc1(0x93)](_0x1ca2ae)){if(_0x4567f9[_0x1c2fc1(0xa4)](_0x52eb32))continue;const _0x30b4fa=resolveManagedFilePath(_0x41ef0a,_0x52eb32);existsSync(_0x30b4fa)&&lstatSync(_0x30b4fa)[_0x1c2fc1(0xaf)]()&&rmSync(_0x30b4fa,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x265c54,_0x51c65f){const _0x2ab7d3=a102_0x35ea,_0x1dba1a=_0x265c54();while(!![]){try{const _0xa9a5a6=-parseInt(_0x2ab7d3(0x13d))/0x1*(-parseInt(_0x2ab7d3(0x126))/0x2)+-parseInt(_0x2ab7d3(0x12c))/0x3+-parseInt(_0x2ab7d3(0x129))/0x4*(-parseInt(_0x2ab7d3(0x143))/0x5)+parseInt(_0x2ab7d3(0x12e))/0x6+parseInt(_0x2ab7d3(0x11f))/0x7+parseInt(_0x2ab7d3(0x141))/0x8*(-parseInt(_0x2ab7d3(0x123))/0x9)+-parseInt(_0x2ab7d3(0x134))/0xa;if(_0xa9a5a6===_0x51c65f)break;else _0x1dba1a['push'](_0x1dba1a['shift']());}catch(_0x28687b){_0x1dba1a['push'](_0x1dba1a['shift']());}}}(a102_0x1be3,0xa7d40));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_0x35ea(_0x47d2c9,_0x1a4d15){_0x47d2c9=_0x47d2c9-0x11d;const _0x1be308=a102_0x1be3();let _0x35ea9b=_0x1be308[_0x47d2c9];return _0x35ea9b;}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0xd0774b,_0x2026d4,_0x1e9f9a,_0x2228e0,_0x331a27,_0xdcf357,_0x19c08b){const _0x32bbc6=a102_0x35ea,_0x982425=_0xdcf357?normalizeLocalFiles(_0xdcf357):[],_0x1c5411=!_0x19c08b&&_0x982425[_0x32bbc6(0x12a)]>0x0?buildSkillPackage(_0x982425):undefined,_0x1c5ceb=_0x19c08b?bufferSha256(_0x19c08b):_0x1c5411?.[_0x32bbc6(0x13c)][_0x32bbc6(0x124)],_0x5a5b47=_0x19c08b?.['length']??_0x1c5411?.[_0x32bbc6(0x13c)][_0x32bbc6(0x11e)],_0x300ae3=_0x982425['length']>0x0?Object[_0x32bbc6(0x12d)](_0x982425[_0x32bbc6(0x12b)](_0x1a320d=>[_0x1a320d[_0x32bbc6(0x131)],fileHash(_0x1a320d)])):undefined;return{'schemaVersion':_0x982425['length']>0x0?0x2:0x1,'id':_0xd0774b['id'],'appCode':_0x1e9f9a,'skillCode':requireSkillCode(_0xd0774b),'skillName':_0xd0774b[_0x32bbc6(0x136)],'description':_0xd0774b[_0x32bbc6(0x120)],'scope':_0x2026d4,'readonly':_0x2026d4!==_0x32bbc6(0x132)||_0xd0774b[_0x32bbc6(0x13e)]===!![],'tenantCode':_0xd0774b['tenantCode'],'userId':_0xd0774b[_0x32bbc6(0x13a)],'version':_0xd0774b[_0x32bbc6(0x144)],'status':_0xd0774b[_0x32bbc6(0x137)],'tags':Array['isArray'](_0xd0774b['tags'])?_0xd0774b[_0x32bbc6(0x130)]:[],'hasUpstreamUpdate':_0xd0774b[_0x32bbc6(0x12f)],'forkedFromSkillId':_0xd0774b[_0x32bbc6(0x142)],'forkedFromVersion':_0xd0774b[_0x32bbc6(0x145)],'sourceSessionId':_0xd0774b[_0x32bbc6(0x140)],'contentHash':_0x2228e0,'fileHashes':_0x300ae3,'treeHash':_0x982425[_0x32bbc6(0x12a)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x982425)):undefined,'ossPath':remoteManifestOssPath(_0xd0774b[_0x32bbc6(0x122)]),'zipSha256':_0x1c5ceb,'zipSize':_0x5a5b47,'files':_0x982425[_0x32bbc6(0x12a)]>0x0?_0x982425['map'](_0x1e4ed3=>({'path':_0x1e4ed3[_0x32bbc6(0x131)],'hash':fileHash(_0x1e4ed3),'size':fileContent(_0x1e4ed3)[_0x32bbc6(0x12a)]})):undefined,'pulledAt':_0x331a27??new Date()[_0x32bbc6(0x139)]()};}export function requireSkillCode(_0x4223ee){const _0x51d2dc=a102_0x35ea,_0x146415=_0x4223ee[_0x51d2dc(0x128)]?.['trim']();if(!_0x146415)throw CliErrors[_0x51d2dc(0x133)](_0x51d2dc(0x121));return _0x146415;}function a102_0x1be3(){const _0x201d2a=['trim','732794tMjetF','Invalid\x20','skillCode','8gtnkFV','length','map','1660197AnkiXH','fromEntries','7563984xiFlFz','hasUpstreamUpdate','tags','path','personal','validation','8327380YBaAnM','isArray','skillName','status','object','toISOString','userId','string','manifest','1SaQiMy','readonly','utf8','sourceSessionId','535288brIYBr','forkedFromSkillId','774015SsHrAR','version','forkedFromVersion','ossPath','zipSize','2363389Alrkem','description','Runtime\x20Skill\x20is\x20missing\x20skillCode.','files','27VuRBXD','zipSha256'];a102_0x1be3=function(){return _0x201d2a;};return a102_0x1be3();}export function readMetadataIfPresent(_0x3cdfb4){const _0x118dcd=a102_0x35ea;if(!existsSync(_0x3cdfb4))return undefined;try{const _0x193dbc=JSON['parse'](readFileSync(_0x3cdfb4,_0x118dcd(0x13f)));return _0x193dbc;}catch{throw CliErrors['validation'](_0x118dcd(0x127)+METADATA_FILE+':\x20'+_0x3cdfb4);}}function remoteManifestOssPath(_0x229b80){const _0x594c75=a102_0x35ea;if(!_0x229b80||typeof _0x229b80!==_0x594c75(0x138)||Array[_0x594c75(0x135)](_0x229b80))return undefined;const _0xdf484f=_0x229b80[_0x594c75(0x11d)];return typeof _0xdf484f===_0x594c75(0x13b)&&_0xdf484f[_0x594c75(0x125)]()?_0xdf484f['trim']():undefined;}
1
+ function a102_0x1ddc(_0x331101,_0x290269){_0x331101=_0x331101-0x17a;const _0x4355bc=a102_0x4355();let _0x1ddce7=_0x4355bc[_0x331101];return _0x1ddce7;}(function(_0x4446f0,_0x4d76a9){const _0x56c812=a102_0x1ddc,_0x2f71c2=_0x4446f0();while(!![]){try{const _0x34f4b9=parseInt(_0x56c812(0x193))/0x1*(parseInt(_0x56c812(0x19b))/0x2)+parseInt(_0x56c812(0x195))/0x3*(-parseInt(_0x56c812(0x185))/0x4)+-parseInt(_0x56c812(0x198))/0x5*(-parseInt(_0x56c812(0x19e))/0x6)+parseInt(_0x56c812(0x17b))/0x7+-parseInt(_0x56c812(0x182))/0x8*(-parseInt(_0x56c812(0x188))/0x9)+parseInt(_0x56c812(0x17c))/0xa*(parseInt(_0x56c812(0x196))/0xb)+parseInt(_0x56c812(0x18f))/0xc*(-parseInt(_0x56c812(0x187))/0xd);if(_0x34f4b9===_0x4d76a9)break;else _0x2f71c2['push'](_0x2f71c2['shift']());}catch(_0x2565c8){_0x2f71c2['push'](_0x2f71c2['shift']());}}}(a102_0x4355,0x1eae3));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3d3295,_0x25cdbc,_0x14ab0a,_0x1976d6,_0x49ddd8,_0x57fcb8,_0x2570f8){const _0x702c36=a102_0x1ddc,_0x26f445=_0x57fcb8?normalizeLocalFiles(_0x57fcb8):[],_0x2f14bb=!_0x2570f8&&_0x26f445[_0x702c36(0x19c)]>0x0?buildSkillPackage(_0x26f445):undefined,_0xeff923=_0x2570f8?bufferSha256(_0x2570f8):_0x2f14bb?.[_0x702c36(0x194)]['zipSha256'],_0x12907f=_0x2570f8?.[_0x702c36(0x19c)]??_0x2f14bb?.[_0x702c36(0x194)][_0x702c36(0x17f)],_0x1799a1=_0x26f445['length']>0x0?Object[_0x702c36(0x192)](_0x26f445[_0x702c36(0x19a)](_0x33b253=>[_0x33b253[_0x702c36(0x17a)],fileHash(_0x33b253)])):undefined;return{'schemaVersion':_0x26f445[_0x702c36(0x19c)]>0x0?0x2:0x1,'id':_0x3d3295['id'],'appCode':_0x14ab0a,'skillCode':requireSkillCode(_0x3d3295),'skillName':_0x3d3295['skillName'],'description':_0x3d3295['description'],'scope':_0x25cdbc,'readonly':_0x25cdbc!==_0x702c36(0x189)||_0x3d3295[_0x702c36(0x18b)]===!![],'tenantCode':_0x3d3295[_0x702c36(0x184)],'userId':_0x3d3295['userId'],'version':_0x3d3295[_0x702c36(0x199)],'status':_0x3d3295['status'],'tags':Array[_0x702c36(0x180)](_0x3d3295[_0x702c36(0x18d)])?_0x3d3295['tags']:[],'hasUpstreamUpdate':_0x3d3295[_0x702c36(0x190)],'forkedFromSkillId':_0x3d3295['forkedFromSkillId'],'forkedFromVersion':_0x3d3295[_0x702c36(0x18a)],'sourceSessionId':_0x3d3295[_0x702c36(0x18c)],'contentHash':_0x1976d6,'fileHashes':_0x1799a1,'treeHash':_0x26f445[_0x702c36(0x19c)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x26f445)):undefined,'ossPath':remoteManifestOssPath(_0x3d3295[_0x702c36(0x183)]),'zipSha256':_0xeff923,'zipSize':_0x12907f,'files':_0x26f445['length']>0x0?_0x26f445['map'](_0x5a6cbb=>({'path':_0x5a6cbb[_0x702c36(0x17a)],'hash':fileHash(_0x5a6cbb),'size':fileContent(_0x5a6cbb)['length']})):undefined,'pulledAt':_0x49ddd8??new Date()[_0x702c36(0x197)]()};}export function requireSkillCode(_0x3011e3){const _0x2b49bd=a102_0x1ddc,_0x2067fe=_0x3011e3[_0x2b49bd(0x19d)]?.[_0x2b49bd(0x17d)]();if(!_0x2067fe)throw CliErrors['validation'](_0x2b49bd(0x19f));return _0x2067fe;}function a102_0x4355(){const _0x35e1d3=['sourceSessionId','tags','Invalid\x20','108aoCpTD','hasUpstreamUpdate','ossPath','fromEntries','164414QOGojQ','manifest','151809gKGChS','22539ILszab','toISOString','5BQXZCu','version','map','2ZOzfdj','length','skillCode','1392306rismFd','Runtime\x20Skill\x20is\x20missing\x20skillCode.','path','255710qXtRrP','310oRilqk','trim','validation','zipSize','isArray','object','414992wklfcj','files','tenantCode','4KJYQPa','utf8','687362eccrdp','27ZxWiGm','personal','forkedFromVersion','readonly'];a102_0x4355=function(){return _0x35e1d3;};return a102_0x4355();}export function readMetadataIfPresent(_0x1d87a2){const _0x546c70=a102_0x1ddc;if(!existsSync(_0x1d87a2))return undefined;try{const _0x34d0ee=JSON['parse'](readFileSync(_0x1d87a2,_0x546c70(0x186)));return _0x34d0ee;}catch{throw CliErrors[_0x546c70(0x17e)](_0x546c70(0x18e)+METADATA_FILE+':\x20'+_0x1d87a2);}}function remoteManifestOssPath(_0xd9a539){const _0x233fdd=a102_0x1ddc;if(!_0xd9a539||typeof _0xd9a539!==_0x233fdd(0x181)||Array['isArray'](_0xd9a539))return undefined;const _0x25437c=_0xd9a539[_0x233fdd(0x191)];return typeof _0x25437c==='string'&&_0x25437c[_0x233fdd(0x17d)]()?_0x25437c[_0x233fdd(0x17d)]():undefined;}
@@ -1 +1 @@
1
- const a103_0x3ea70c=a103_0x10f5;(function(_0x14a7e5,_0x1a76b6){const _0x250c54=a103_0x10f5,_0xc5582e=_0x14a7e5();while(!![]){try{const _0x3dc250=parseInt(_0x250c54(0x11b))/0x1+-parseInt(_0x250c54(0x11c))/0x2+parseInt(_0x250c54(0x12d))/0x3*(parseInt(_0x250c54(0x11e))/0x4)+parseInt(_0x250c54(0x12f))/0x5*(parseInt(_0x250c54(0x126))/0x6)+-parseInt(_0x250c54(0x124))/0x7+-parseInt(_0x250c54(0x12e))/0x8+-parseInt(_0x250c54(0x130))/0x9*(-parseInt(_0x250c54(0x128))/0xa);if(_0x3dc250===_0x1a76b6)break;else _0xc5582e['push'](_0xc5582e['shift']());}catch(_0xb9d939){_0xc5582e['push'](_0xc5582e['shift']());}}}(a103_0x315f,0xe8de4));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(_0x4586d6={}){const _0x4b41a4=a103_0x10f5,_0xc5b23a=_0x4586d6['homeDir']??homedir(),_0x3b91f1=resolve(_0xc5b23a,PRODUCT_CONFIG[_0x4b41a4(0x11f)],_0x4b41a4(0x11d)),_0x29c4f0=trimmedEnv('SKILL_ROOT'),_0x22f51c=trimmedEnv(_0x4b41a4(0x122));return{'homeDir':_0xc5b23a,'cacheRoot':_0x3b91f1,'managedRoot':resolve(_0xc5b23a,PRODUCT_CONFIG[_0x4b41a4(0x11f)]),'agentsSkillsDir':_0x4586d6[_0x4b41a4(0x123)]??_0x29c4f0??resolve(_0xc5b23a,'.agents',_0x4b41a4(0x121)),'claudeSkillsDir':_0x4586d6['claudeSkillsDir']??_0x22f51c??resolve(_0xc5b23a,_0x4b41a4(0x129),_0x4b41a4(0x121))};}function a103_0x10f5(_0x29a327,_0x48366b){_0x29a327=_0x29a327-0x11a;const _0x315fcd=a103_0x315f();let _0x10f593=_0x315fcd[_0x29a327];return _0x10f593;}function a103_0x315f(){const _0x4e2011=['3429032uzIWsW','5fXNCyP','21943224jnqTPM','validation','982715RukdCT','3689088CIIwRs','cache','343292EWLGtl','homeDirName','\x20for\x20local\x20path:\x20','skills','CLAUDE_SKILL_ROOT','agentsSkillsDir','12481819cnbxcP','includes','3871284YtpHzQ','skillCode','10eouLUf','.claude','Unsafe\x20','cacheRoot','path\x20segment','33djBRtf'];a103_0x315f=function(){return _0x4e2011;};return a103_0x315f();}export function getRuntimeSkillCacheRoot(_0x6ceca7,_0x7a5074,_0x2b4ce2={}){const _0x54354c=a103_0x10f5,_0x47745a=resolveSkillSyncPaths(_0x2b4ce2);return resolve(_0x47745a[_0x54354c(0x12b)],_0x6ceca7,fingerprintAccessKey(_0x7a5074),_0x54354c(0x121));}export function getRuntimeSkillDir(_0xed9ac6,_0x2994a0,_0x2bbbbf,_0x55d9fc,_0x3517e1,_0x51709f={}){const _0x43c9e4=a103_0x10f5;return resolve(getRuntimeSkillCacheRoot(_0xed9ac6,_0x2994a0,_0x51709f),safePathSegment(_0x2bbbbf,'appCode'),_0x55d9fc,safePathSegment(_0x3517e1,_0x43c9e4(0x127)));}export function safePathSegment(_0x14c52c,_0x4f1ad8=a103_0x3ea70c(0x12c)){const _0x5cde69=a103_0x3ea70c;if(!_0x14c52c||_0x14c52c['includes']('/')||_0x14c52c[_0x5cde69(0x125)]('\x5c')||_0x14c52c['includes']('..'))throw CliErrors[_0x5cde69(0x11a)](_0x5cde69(0x12a)+_0x4f1ad8+_0x5cde69(0x120)+_0x14c52c);return _0x14c52c;}function trimmedEnv(_0x1d44a1){const _0x255814=productEnv(_0x1d44a1)?.['trim']();return _0x255814?_0x255814:undefined;}
1
+ function a103_0x1349(){const _0xb76001=['homeDir','.claude','path\x20segment','153684KmJfgu','.agents','trim','3477664NHhUmQ','SKILL_ROOT','282441PLRTEU','skills','3733450mbfahX','9EGCOPZ','skillCode','2196uJrVFs','1685wOodne','1842lddnFU','\x20for\x20local\x20path:\x20','9149cJSGNK','284424JeUweg','homeDirName','includes','CLAUDE_SKILL_ROOT','appCode','Unsafe\x20'];a103_0x1349=function(){return _0xb76001;};return a103_0x1349();}const a103_0x1fe7bf=a103_0x184c;(function(_0x3cfb15,_0xbb37c7){const _0x309c21=a103_0x184c,_0xa5e15c=_0x3cfb15();while(!![]){try{const _0x594c1a=-parseInt(_0x309c21(0x201))/0x1+parseInt(_0x309c21(0x1f2))/0x2+-parseInt(_0x309c21(0x1f7))/0x3+parseInt(_0x309c21(0x1fc))/0x4*(parseInt(_0x309c21(0x1fd))/0x5)+-parseInt(_0x309c21(0x1fe))/0x6*(-parseInt(_0x309c21(0x200))/0x7)+-parseInt(_0x309c21(0x1f5))/0x8+-parseInt(_0x309c21(0x1fa))/0x9*(-parseInt(_0x309c21(0x1f9))/0xa);if(_0x594c1a===_0xbb37c7)break;else _0xa5e15c['push'](_0xa5e15c['shift']());}catch(_0x8806c3){_0xa5e15c['push'](_0xa5e15c['shift']());}}}(a103_0x1349,0x367c2));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(_0x386939={}){const _0x6474ea=a103_0x184c,_0x1d1810=_0x386939[_0x6474ea(0x1ef)]??homedir(),_0x4e6cdf=resolve(_0x1d1810,PRODUCT_CONFIG[_0x6474ea(0x202)],'cache'),_0x473f8a=trimmedEnv(_0x6474ea(0x1f6)),_0x29ae88=trimmedEnv(_0x6474ea(0x204));return{'homeDir':_0x1d1810,'cacheRoot':_0x4e6cdf,'managedRoot':resolve(_0x1d1810,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x386939['agentsSkillsDir']??_0x473f8a??resolve(_0x1d1810,_0x6474ea(0x1f3),_0x6474ea(0x1f8)),'claudeSkillsDir':_0x386939['claudeSkillsDir']??_0x29ae88??resolve(_0x1d1810,_0x6474ea(0x1f0),_0x6474ea(0x1f8))};}export function getRuntimeSkillCacheRoot(_0x540cf8,_0x1556c1,_0x1fe4ac={}){const _0x4ab57b=a103_0x184c,_0x253c3f=resolveSkillSyncPaths(_0x1fe4ac);return resolve(_0x253c3f['cacheRoot'],_0x540cf8,fingerprintAccessKey(_0x1556c1),_0x4ab57b(0x1f8));}export function getRuntimeSkillDir(_0x468438,_0x7247c4,_0x2c44f8,_0x16882a,_0x2b249c,_0x30f498={}){const _0x318ba2=a103_0x184c;return resolve(getRuntimeSkillCacheRoot(_0x468438,_0x7247c4,_0x30f498),safePathSegment(_0x2c44f8,_0x318ba2(0x205)),_0x16882a,safePathSegment(_0x2b249c,_0x318ba2(0x1fb)));}export function safePathSegment(_0x4f9ea0,_0x138d41=a103_0x1fe7bf(0x1f1)){const _0x307fd7=a103_0x1fe7bf;if(!_0x4f9ea0||_0x4f9ea0['includes']('/')||_0x4f9ea0[_0x307fd7(0x203)]('\x5c')||_0x4f9ea0[_0x307fd7(0x203)]('..'))throw CliErrors['validation'](_0x307fd7(0x206)+_0x138d41+_0x307fd7(0x1ff)+_0x4f9ea0);return _0x4f9ea0;}function a103_0x184c(_0x20f06c,_0x3cd320){_0x20f06c=_0x20f06c-0x1ef;const _0x13492c=a103_0x1349();let _0x184c7c=_0x13492c[_0x20f06c];return _0x184c7c;}function trimmedEnv(_0x5b128a){const _0x4fc327=a103_0x1fe7bf,_0x3a60b1=productEnv(_0x5b128a)?.[_0x4fc327(0x1f4)]();return _0x3a60b1?_0x3a60b1:undefined;}
@@ -1 +1 @@
1
- (function(_0x23b98d,_0x1fc2e6){const _0x2375e9=a104_0x3204,_0x4e05f3=_0x23b98d();while(!![]){try{const _0x8c1406=parseInt(_0x2375e9(0x218))/0x1*(parseInt(_0x2375e9(0x207))/0x2)+-parseInt(_0x2375e9(0x1df))/0x3*(-parseInt(_0x2375e9(0x212))/0x4)+parseInt(_0x2375e9(0x20a))/0x5+parseInt(_0x2375e9(0x1fd))/0x6+parseInt(_0x2375e9(0x1e1))/0x7*(parseInt(_0x2375e9(0x1f5))/0x8)+parseInt(_0x2375e9(0x1f1))/0x9+-parseInt(_0x2375e9(0x1e6))/0xa;if(_0x8c1406===_0x1fc2e6)break;else _0x4e05f3['push'](_0x4e05f3['shift']());}catch(_0x360705){_0x4e05f3['push'](_0x4e05f3['shift']());}}}(a104_0xea7c,0xd0fa4));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x382d26}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(_0x3637cf,_0x50e04d,_0x2d2e00={}){const _0x33a3ea=a104_0x3204,_0x49e4d0=resolvePushDirectoryRoot(_0x3637cf),_0x3bba77=readPushMetadataIfPresent(resolve(_0x49e4d0,METADATA_FILE),{'ignoreInvalidMetadata':_0x2d2e00[_0x33a3ea(0x1e7)]});if(_0x3bba77?.[_0x33a3ea(0x1f8)]&&_0x3bba77['appCode']!==_0x50e04d&&!_0x2d2e00[_0x33a3ea(0x1dd)]&&!_0x2d2e00[_0x33a3ea(0x1da)])throw CliErrors[_0x33a3ea(0x1dc)]('Skill\x20metadata\x20appCode\x20\x22'+_0x3bba77['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x50e04d+'\x22.');const _0x558095=resolvePushSkillCode(_0x49e4d0,_0x50e04d,_0x3bba77,_0x2d2e00);if(!_0x558095)throw CliErrors[_0x33a3ea(0x1dc)](_0x33a3ea(0x1d8)+SKILL_FILE+',\x20'+METADATA_FILE+_0x33a3ea(0x1e5));return{'dir':_0x49e4d0,'skillCode':_0x558095,'metadata':_0x3bba77};}export function readPushDirectory(_0x219f3b,_0x34c946,_0x3a4c2a={}){const _0x21c071=a104_0x3204,_0x398974=resolvePushDirectoryIdentity(_0x219f3b,_0x34c946,_0x3a4c2a),_0x368532=_0x398974[_0x21c071(0x211)],_0x54602a=resolve(_0x368532,SKILL_FILE);if(!existsSync(_0x54602a)||!lstatSync(_0x54602a)[_0x21c071(0x203)]())throw CliErrors[_0x21c071(0x1dc)](_0x21c071(0x1d9)+SKILL_FILE+':\x20'+_0x54602a);const _0x553741=_0x398974[_0x21c071(0x20c)],_0x594104=_0x3a4c2a[_0x21c071(0x210)]??_0x21c071(0x1f6);if(!_0x3a4c2a[_0x21c071(0x201)]&&_0x553741?.[_0x21c071(0x217)]===_0x21c071(0x208))throw CliErrors[_0x21c071(0x1dc)](_0x21c071(0x216)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x553741[_0x21c071(0x217)]+'\x22.');if(!_0x3a4c2a[_0x21c071(0x201)]&&_0x594104==='personal'&&_0x553741?.['scope']&&_0x553741['scope']!=='personal')throw CliErrors[_0x21c071(0x1dc)](_0x21c071(0x20d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x553741['scope']+'\x22.',_0x21c071(0x1d7)+_0x368532+_0x21c071(0x1f4));const _0x5f4b4f=scanSkillDirectory(_0x368532),_0x5837be=buildSkillPackage(_0x5f4b4f),_0x3ed09a=readFileSync(_0x54602a,'utf8'),_0x5f25af=_0x398974[_0x21c071(0x1e8)],_0x4130a9=_0x3a4c2a['ignoreMetadataForPayload']?undefined:_0x553741,_0x59eda6=readSkillDisplayName(_0x3ed09a);return{'skillCode':_0x5f25af,'metadata':_0x553741,'frontmatterDisplayName':_0x59eda6,'input':{'skillCode':_0x5f25af,'skillName':_0x59eda6??_0x4130a9?.[_0x21c071(0x1eb)],'description':_0x4130a9?.[_0x21c071(0x1e4)],'content':_0x3ed09a,'files':_0x5837be[_0x21c071(0x20b)],'packageBase64':_0x5837be[_0x21c071(0x1f2)],'tags':_0x4130a9?.[_0x21c071(0x1d6)],'version':_0x4130a9?.[_0x21c071(0x1fb)],'sourceSessionId':_0x4130a9?.[_0x21c071(0x1e9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5909e1,_0x21a9ed,_0x334ad0,_0xfbb909={}){const _0x94e640=a104_0x3204,_0x12846b=resolvePushDirectoryRoot(_0x5909e1),_0x4c36f3=readPushMetadataIfPresent(resolve(_0x12846b,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x101d6b=requireRemoteScope(_0x21a9ed),_0x5a35b8=readLocalSkillContent(_0x12846b),_0x159f46={..._0x21a9ed,'appCode':_0x21a9ed[_0x94e640(0x1f8)]??_0x334ad0,'skillName':_0x21a9ed[_0x94e640(0x1eb)]??_0x4c36f3?.[_0x94e640(0x1eb)],'description':_0x21a9ed[_0x94e640(0x1e4)]??_0x4c36f3?.['description'],'tags':Array['isArray'](_0x21a9ed[_0x94e640(0x1d6)])?_0x21a9ed[_0x94e640(0x1d6)]:_0x4c36f3?.[_0x94e640(0x1d6)],'sourceSessionId':_0x21a9ed[_0x94e640(0x1e9)]??_0x4c36f3?.[_0x94e640(0x1e9)],'content':_0x21a9ed['content']??_0x5a35b8},_0x691ddc=buildMetadata(_0x159f46,_0x101d6b,_0x334ad0,contentHash(_0x5a35b8),_0xfbb909[_0x94e640(0x214)]);writeJsonAtomic(resolve(_0x12846b,METADATA_FILE),_0x691ddc);}function a104_0xea7c(){const _0x3d672f=['8372601ehkrzQ','packageBase64','displayName','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','120ICSMiw','personal','length','appCode','startsWith','some','version','pushedAt','4187118TgaktJ','isSymbolicLink','toLowerCase','string','ignoreMetadataScope','Remote\x20Skill\x20','isFile','company','ignoreMetadataSkillCode','files','678228OHYnpL','builtin','number','2200510Jsxzrk','manifest','metadata','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20directory\x20not\x20found:\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','targetScope','dir','200300FVfcxM','replace','refreshedAt','match','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','scope','4JQtpts','tags','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Missing\x20','ignoreMetadataAppCodeMismatch','isDirectory','validation','allowAppCodeRetarget','find','57JIIINd','unknown','672371PGKEVP','name','utf8','description',',\x20or\x20directory\x20name.','49609480JcpNbj','ignoreInvalidMetadata','skillCode','sourceSessionId','boolean','skillName','trim','Invalid\x20','content','path','\x20has\x20unsupported\x20scope\x20\x22'];a104_0xea7c=function(){return _0x3d672f;};return a104_0xea7c();}export function recordPushedRuntimeSkill(_0x154378,_0x147934,_0x36098d,_0x305bbf={}){const _0x296d37=a104_0x3204,_0x442aeb=resolvePushDirectoryRoot(_0x154378),_0x5a9506=scanSkillDirectory(_0x442aeb),_0x34c23c=_0x5a9506[_0x296d37(0x1de)](_0x25679a=>_0x25679a[_0x296d37(0x1ef)]===SKILL_FILE),_0x268597=_0x34c23c?fileText(_0x34c23c):'',_0x5d67b6=tryNormalizePackageManifest(_0x147934['files']),_0x3d01d8={..._0x147934,'content':_0x147934[_0x296d37(0x1ee)]??_0x268597,'files':_0x5d67b6},_0xd4c245=_0x5d67b6?normalizeLocalFiles(_0x5a9506)['filter'](_0x55b2b9=>_0x5d67b6[_0x296d37(0x206)][_0x296d37(0x1fa)](_0x1f5216=>_0x1f5216['path']===_0x55b2b9[_0x296d37(0x1ef)])):undefined,_0x236fa0=buildMetadata(_0x3d01d8,_0x305bbf[_0x296d37(0x217)]??_0x296d37(0x1f6),_0x36098d,contentHash(_0x3d01d8[_0x296d37(0x1ee)]??''),_0x305bbf[_0x296d37(0x1fc)],_0xd4c245);writeJsonAtomic(resolve(_0x442aeb,METADATA_FILE),_0x236fa0);}function a104_0x3204(_0x1774b3,_0x39165c){_0x1774b3=_0x1774b3-0x1d6;const _0xea7c35=a104_0xea7c();let _0x320463=_0xea7c35[_0x1774b3];return _0x320463;}export function deriveSkillCodeFromDirectory(_0x41a39e,_0x4fc838){const _0x306245=a104_0x3204,_0x35df58=basename(resolve(_0x41a39e)),_0x743b4c=_0x4fc838+'--';return _0x35df58[_0x306245(0x1f9)](_0x743b4c)?_0x35df58['slice'](_0x743b4c[_0x306245(0x1f7)]):_0x35df58;}function resolvePushSkillCode(_0x21a5ee,_0x4547fe,_0x5c0c6e,_0x73f501){const _0x4366c8=a104_0x3204,_0x1dada1=deriveSkillCodeFromSkillFile(_0x21a5ee)||deriveSkillCodeFromDirectory(_0x21a5ee,_0x4547fe);if(_0x73f501[_0x4366c8(0x205)])return _0x1dada1;return _0x5c0c6e?.['skillCode']?.[_0x4366c8(0x1ec)]()||_0x1dada1;}function deriveSkillCodeFromSkillFile(_0x4354e3){const _0x146c42=a104_0x3204,_0xc4b382=resolve(_0x4354e3,SKILL_FILE);if(!existsSync(_0xc4b382)||!lstatSync(_0xc4b382)[_0x146c42(0x203)]())return undefined;const _0x10949c=readFileSync(_0xc4b382,_0x146c42(0x1e3)),_0x321d95=_0x10949c['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x321d95)return undefined;const _0x49673b=parseFrontmatterObject(_0x321d95[0x1]??''),_0x31287a=scalarToString(_0x49673b?.[_0x146c42(0x1e2)]);return _0x31287a?slugifySkillName(_0x31287a):undefined;}function readSkillDisplayName(_0x23bf23){const _0x43c3c8=a104_0x3204,_0x4bbfb6=_0x23bf23[_0x43c3c8(0x215)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bbfb6)return undefined;const _0x2ab141=parseFrontmatterObject(_0x4bbfb6[0x1]??'');return scalarToString(_0x2ab141?.[_0x43c3c8(0x1f3)]);}function slugifySkillName(_0x307341){const _0x3a5683=a104_0x3204,_0x1715ec=_0x307341[_0x3a5683(0x1ec)]()[_0x3a5683(0x1ff)]()[_0x3a5683(0x213)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3a5683(0x213)](/^-+/,'')[_0x3a5683(0x213)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x1715ec)throw CliErrors[_0x3a5683(0x1dc)](_0x3a5683(0x1ed)+SKILL_FILE+_0x3a5683(0x20f));return _0x1715ec;}function parseFrontmatterObject(_0x227d27){try{const _0x406d53=a104_0x382d26(_0x227d27);return _0x406d53&&typeof _0x406d53==='object'&&!Array['isArray'](_0x406d53)?_0x406d53:undefined;}catch{return undefined;}}function scalarToString(_0x1795a4){const _0x49611e=a104_0x3204;if(typeof _0x1795a4===_0x49611e(0x200))return _0x1795a4['trim']();if(typeof _0x1795a4===_0x49611e(0x209)||typeof _0x1795a4===_0x49611e(0x1ea))return String(_0x1795a4);return undefined;}function resolvePushDirectoryRoot(_0x46215c){const _0x25f6b5=a104_0x3204,_0x16359d=resolve(_0x46215c);if(!existsSync(_0x16359d))throw CliErrors['validation'](_0x25f6b5(0x20e)+_0x46215c);const _0x56ceb5=lstatSync(_0x16359d);if(_0x56ceb5[_0x25f6b5(0x1db)]())return _0x16359d;if(_0x56ceb5[_0x25f6b5(0x1fe)]()){const _0xff6ad9=realpathSync(_0x16359d);if(lstatSync(_0xff6ad9)[_0x25f6b5(0x1db)]())return _0xff6ad9;}throw CliErrors[_0x25f6b5(0x1dc)](_0x25f6b5(0x20e)+_0x46215c);}function requireRemoteScope(_0x102fad){const _0x353b2b=a104_0x3204;if(_0x102fad['scope']==='personal'||_0x102fad[_0x353b2b(0x217)]===_0x353b2b(0x204)||_0x102fad['scope']===_0x353b2b(0x208))return _0x102fad[_0x353b2b(0x217)];throw CliErrors[_0x353b2b(0x1dc)](_0x353b2b(0x202)+(_0x102fad['skillCode']||'(unknown)')+_0x353b2b(0x1f0)+(_0x102fad[_0x353b2b(0x217)]??_0x353b2b(0x1e0))+'\x22.');}function readLocalSkillContent(_0x3fc6be){const _0x395207=a104_0x3204,_0x71303f=resolve(_0x3fc6be,SKILL_FILE);return existsSync(_0x71303f)&&lstatSync(_0x71303f)[_0x395207(0x203)]()?readFileSync(_0x71303f,_0x395207(0x1e3)):'';}function readPushMetadataIfPresent(_0x3982a4,_0x469317={}){const _0x36bce3=a104_0x3204;try{return readMetadataIfPresent(_0x3982a4);}catch(_0x36d061){if(_0x469317[_0x36bce3(0x1e7)])return undefined;throw _0x36d061;}}
1
+ (function(_0x48d3a6,_0x5dbae1){const _0x4e6639=a104_0x6a9d,_0x55d355=_0x48d3a6();while(!![]){try{const _0x342a4f=parseInt(_0x4e6639(0xea))/0x1*(parseInt(_0x4e6639(0x101))/0x2)+parseInt(_0x4e6639(0x108))/0x3*(-parseInt(_0x4e6639(0x10b))/0x4)+parseInt(_0x4e6639(0x123))/0x5*(parseInt(_0x4e6639(0x103))/0x6)+-parseInt(_0x4e6639(0xeb))/0x7+-parseInt(_0x4e6639(0xf0))/0x8+-parseInt(_0x4e6639(0x122))/0x9+parseInt(_0x4e6639(0x11a))/0xa*(parseInt(_0x4e6639(0x11f))/0xb);if(_0x342a4f===_0x5dbae1)break;else _0x55d355['push'](_0x55d355['shift']());}catch(_0x4df905){_0x55d355['push'](_0x55d355['shift']());}}}(a104_0x55ba,0x4570c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x49be84}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';function a104_0x6a9d(_0x4eeacd,_0x8fa6c1){_0x4eeacd=_0x4eeacd-0xe7;const _0x55bab6=a104_0x55ba();let _0x6a9dfc=_0x55bab6[_0x4eeacd];return _0x6a9dfc;}export function resolvePushDirectoryIdentity(_0x27ac44,_0x52ee92,_0x14e299={}){const _0x2d8b9c=a104_0x6a9d,_0x3543f7=resolvePushDirectoryRoot(_0x27ac44),_0x1f0694=readPushMetadataIfPresent(resolve(_0x3543f7,METADATA_FILE),{'ignoreInvalidMetadata':_0x14e299[_0x2d8b9c(0x125)]});if(_0x1f0694?.[_0x2d8b9c(0x116)]&&_0x1f0694[_0x2d8b9c(0x116)]!==_0x52ee92&&!_0x14e299[_0x2d8b9c(0xf2)]&&!_0x14e299[_0x2d8b9c(0x11c)])throw CliErrors[_0x2d8b9c(0x102)]('Skill\x20metadata\x20appCode\x20\x22'+_0x1f0694[_0x2d8b9c(0x116)]+_0x2d8b9c(0x10f)+_0x52ee92+'\x22.');const _0x2c74fa=resolvePushSkillCode(_0x3543f7,_0x52ee92,_0x1f0694,_0x14e299);if(!_0x2c74fa)throw CliErrors[_0x2d8b9c(0x102)](_0x2d8b9c(0xf7)+SKILL_FILE+',\x20'+METADATA_FILE+_0x2d8b9c(0xf1));return{'dir':_0x3543f7,'skillCode':_0x2c74fa,'metadata':_0x1f0694};}export function readPushDirectory(_0x5688f2,_0x244eb4,_0x5398a9={}){const _0x1d420a=a104_0x6a9d,_0x272502=resolvePushDirectoryIdentity(_0x5688f2,_0x244eb4,_0x5398a9),_0x167f07=_0x272502['dir'],_0x2b79a9=resolve(_0x167f07,SKILL_FILE);if(!existsSync(_0x2b79a9)||!lstatSync(_0x2b79a9)[_0x1d420a(0xfd)]())throw CliErrors[_0x1d420a(0x102)](_0x1d420a(0x10c)+SKILL_FILE+':\x20'+_0x2b79a9);const _0xdc5c2d=_0x272502[_0x1d420a(0x119)],_0x1fe307=_0x5398a9[_0x1d420a(0xf6)]??_0x1d420a(0xe9);if(!_0x5398a9['ignoreMetadataScope']&&_0xdc5c2d?.[_0x1d420a(0xf3)]===_0x1d420a(0x107))throw CliErrors[_0x1d420a(0x102)](_0x1d420a(0xed)+METADATA_FILE+_0x1d420a(0xfb)+_0xdc5c2d[_0x1d420a(0xf3)]+'\x22.');if(!_0x5398a9[_0x1d420a(0x105)]&&_0x1fe307==='personal'&&_0xdc5c2d?.['scope']&&_0xdc5c2d[_0x1d420a(0xf3)]!==_0x1d420a(0xe9))throw CliErrors[_0x1d420a(0x102)](_0x1d420a(0xff)+METADATA_FILE+'\x20has\x20scope=\x22'+_0xdc5c2d[_0x1d420a(0xf3)]+'\x22.',_0x1d420a(0x104)+_0x167f07+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x4bfbad=scanSkillDirectory(_0x167f07),_0x274886=buildSkillPackage(_0x4bfbad),_0x164256=readFileSync(_0x2b79a9,_0x1d420a(0xee)),_0x32d8fc=_0x272502[_0x1d420a(0xef)],_0x5e568f=_0x5398a9['ignoreMetadataForPayload']?undefined:_0xdc5c2d,_0x123e42=readSkillDisplayName(_0x164256);return{'skillCode':_0x32d8fc,'metadata':_0xdc5c2d,'frontmatterDisplayName':_0x123e42,'input':{'skillCode':_0x32d8fc,'skillName':_0x123e42??_0x5e568f?.[_0x1d420a(0x124)],'description':_0x5e568f?.[_0x1d420a(0xe7)],'content':_0x164256,'files':_0x274886['manifest'],'packageBase64':_0x274886['packageBase64'],'tags':_0x5e568f?.[_0x1d420a(0x118)],'version':_0x5e568f?.[_0x1d420a(0x100)],'sourceSessionId':_0x5e568f?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x32e2fa,_0x206de3,_0xcf30bd,_0x43efb0={}){const _0x282a22=a104_0x6a9d,_0x19602c=resolvePushDirectoryRoot(_0x32e2fa),_0x1ac3ee=readPushMetadataIfPresent(resolve(_0x19602c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x12904e=requireRemoteScope(_0x206de3),_0x7f1323=readLocalSkillContent(_0x19602c),_0x1a4f1b={..._0x206de3,'appCode':_0x206de3['appCode']??_0xcf30bd,'skillName':_0x206de3[_0x282a22(0x124)]??_0x1ac3ee?.[_0x282a22(0x124)],'description':_0x206de3[_0x282a22(0xe7)]??_0x1ac3ee?.['description'],'tags':Array[_0x282a22(0x106)](_0x206de3[_0x282a22(0x118)])?_0x206de3[_0x282a22(0x118)]:_0x1ac3ee?.[_0x282a22(0x118)],'sourceSessionId':_0x206de3[_0x282a22(0x10e)]??_0x1ac3ee?.[_0x282a22(0x10e)],'content':_0x206de3['content']??_0x7f1323},_0x3759ad=buildMetadata(_0x1a4f1b,_0x12904e,_0xcf30bd,contentHash(_0x7f1323),_0x43efb0[_0x282a22(0xfc)]);writeJsonAtomic(resolve(_0x19602c,METADATA_FILE),_0x3759ad);}function a104_0x55ba(){const _0x425897=['object','sourceSessionId','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','find','company','isDirectory','ignoreMetadataSkillCode','(unknown)','appCode','toLowerCase','tags','metadata','650DxwPhd','Skill\x20directory\x20not\x20found:\x20','ignoreMetadataAppCodeMismatch','slice','string','214247Bnfffw','trim','displayName','3511575WBqgLH','181115Szbrrp','skillName','ignoreInvalidMetadata','description','Remote\x20Skill\x20','personal','1nfTYvr','1062894qvzdQc','some','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','utf8','skillCode','3460448RsOPvq',',\x20or\x20directory\x20name.','allowAppCodeRetarget','scope','\x20has\x20unsupported\x20scope\x20\x22','isSymbolicLink','targetScope','Unable\x20to\x20resolve\x20skillCode\x20from\x20','number','name','Invalid\x20','\x20has\x20scope=\x22','refreshedAt','isFile','path','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','version','249898LtQNbi','validation','18xsOxLu','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','ignoreMetadataScope','isArray','builtin','11643wjwbBe','replace','length','248XenJrf','Missing\x20'];a104_0x55ba=function(){return _0x425897;};return a104_0x55ba();}export function recordPushedRuntimeSkill(_0x2d9fc3,_0x2bfe0b,_0x1c4187,_0x515d80={}){const _0x39cb19=a104_0x6a9d,_0x27dfab=resolvePushDirectoryRoot(_0x2d9fc3),_0x42beac=scanSkillDirectory(_0x27dfab),_0x5bb92f=_0x42beac[_0x39cb19(0x111)](_0x1f2c45=>_0x1f2c45['path']===SKILL_FILE),_0x25d350=_0x5bb92f?fileText(_0x5bb92f):'',_0xf93fe6=tryNormalizePackageManifest(_0x2bfe0b[_0x39cb19(0x110)]),_0x1dc6cc={..._0x2bfe0b,'content':_0x2bfe0b['content']??_0x25d350,'files':_0xf93fe6},_0x4acc92=_0xf93fe6?normalizeLocalFiles(_0x42beac)['filter'](_0x1270b6=>_0xf93fe6[_0x39cb19(0x110)][_0x39cb19(0xec)](_0x1f4f34=>_0x1f4f34['path']===_0x1270b6[_0x39cb19(0xfe)])):undefined,_0x551e6a=buildMetadata(_0x1dc6cc,_0x515d80[_0x39cb19(0xf3)]??_0x39cb19(0xe9),_0x1c4187,contentHash(_0x1dc6cc['content']??''),_0x515d80['pushedAt'],_0x4acc92);writeJsonAtomic(resolve(_0x27dfab,METADATA_FILE),_0x551e6a);}export function deriveSkillCodeFromDirectory(_0x37e888,_0xc07c05){const _0x4e0891=a104_0x6a9d,_0x35a1c0=basename(resolve(_0x37e888)),_0x5bed5f=_0xc07c05+'--';return _0x35a1c0['startsWith'](_0x5bed5f)?_0x35a1c0[_0x4e0891(0x11d)](_0x5bed5f[_0x4e0891(0x10a)]):_0x35a1c0;}function resolvePushSkillCode(_0x1e9021,_0x591dbb,_0x2a14e7,_0x3be5b1){const _0x2d8983=a104_0x6a9d,_0x48e1c9=deriveSkillCodeFromSkillFile(_0x1e9021)||deriveSkillCodeFromDirectory(_0x1e9021,_0x591dbb);if(_0x3be5b1[_0x2d8983(0x114)])return _0x48e1c9;return _0x2a14e7?.[_0x2d8983(0xef)]?.[_0x2d8983(0x120)]()||_0x48e1c9;}function deriveSkillCodeFromSkillFile(_0x5b680a){const _0x4f4f4f=a104_0x6a9d,_0x528f31=resolve(_0x5b680a,SKILL_FILE);if(!existsSync(_0x528f31)||!lstatSync(_0x528f31)['isFile']())return undefined;const _0xd976fc=readFileSync(_0x528f31,_0x4f4f4f(0xee)),_0x1c1e80=_0xd976fc['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1c1e80)return undefined;const _0x357931=parseFrontmatterObject(_0x1c1e80[0x1]??''),_0xc8991c=scalarToString(_0x357931?.[_0x4f4f4f(0xf9)]);return _0xc8991c?slugifySkillName(_0xc8991c):undefined;}function readSkillDisplayName(_0x38948e){const _0x4faa9e=a104_0x6a9d,_0x1b3068=_0x38948e['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1b3068)return undefined;const _0x4b2dee=parseFrontmatterObject(_0x1b3068[0x1]??'');return scalarToString(_0x4b2dee?.[_0x4faa9e(0x121)]);}function slugifySkillName(_0x5a1abf){const _0x172342=a104_0x6a9d,_0x4f50ee=_0x5a1abf[_0x172342(0x120)]()[_0x172342(0x117)]()[_0x172342(0x109)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')['replace'](/-+$/,'')[_0x172342(0x109)](/-{2,}/g,'-');if(!_0x4f50ee)throw CliErrors['validation'](_0x172342(0xfa)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x4f50ee;}function parseFrontmatterObject(_0x2518d2){const _0xa09ac5=a104_0x6a9d;try{const _0x5608b7=a104_0x49be84(_0x2518d2);return _0x5608b7&&typeof _0x5608b7===_0xa09ac5(0x10d)&&!Array['isArray'](_0x5608b7)?_0x5608b7:undefined;}catch{return undefined;}}function scalarToString(_0x4db04f){const _0x5f566c=a104_0x6a9d;if(typeof _0x4db04f===_0x5f566c(0x11e))return _0x4db04f['trim']();if(typeof _0x4db04f===_0x5f566c(0xf8)||typeof _0x4db04f==='boolean')return String(_0x4db04f);return undefined;}function resolvePushDirectoryRoot(_0x128a3f){const _0x5e5984=a104_0x6a9d,_0xb806d1=resolve(_0x128a3f);if(!existsSync(_0xb806d1))throw CliErrors['validation'](_0x5e5984(0x11b)+_0x128a3f);const _0x5ebe22=lstatSync(_0xb806d1);if(_0x5ebe22[_0x5e5984(0x113)]())return _0xb806d1;if(_0x5ebe22[_0x5e5984(0xf5)]()){const _0x1aa312=realpathSync(_0xb806d1);if(lstatSync(_0x1aa312)[_0x5e5984(0x113)]())return _0x1aa312;}throw CliErrors[_0x5e5984(0x102)](_0x5e5984(0x11b)+_0x128a3f);}function requireRemoteScope(_0x20976d){const _0xa2679=a104_0x6a9d;if(_0x20976d[_0xa2679(0xf3)]===_0xa2679(0xe9)||_0x20976d['scope']===_0xa2679(0x112)||_0x20976d[_0xa2679(0xf3)]===_0xa2679(0x107))return _0x20976d[_0xa2679(0xf3)];throw CliErrors[_0xa2679(0x102)](_0xa2679(0xe8)+(_0x20976d[_0xa2679(0xef)]||_0xa2679(0x115))+_0xa2679(0xf4)+(_0x20976d['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x504a4b){const _0x14802d=a104_0x6a9d,_0x3a55e0=resolve(_0x504a4b,SKILL_FILE);return existsSync(_0x3a55e0)&&lstatSync(_0x3a55e0)['isFile']()?readFileSync(_0x3a55e0,_0x14802d(0xee)):'';}function readPushMetadataIfPresent(_0x20aa32,_0x50bf8f={}){const _0x5f57ba=a104_0x6a9d;try{return readMetadataIfPresent(_0x20aa32);}catch(_0x4f8d5b){if(_0x50bf8f[_0x5f57ba(0x125)])return undefined;throw _0x4f8d5b;}}
@@ -1 +1 @@
1
- function a105_0x482c(_0x1232b5,_0x52457e){_0x1232b5=_0x1232b5-0x1d6;const _0x4e0871=a105_0x4e08();let _0x482cea=_0x4e0871[_0x1232b5];return _0x482cea;}(function(_0x2d205c,_0x490e6){const _0x4893b1=a105_0x482c,_0x5b66b3=_0x2d205c();while(!![]){try{const _0x802294=-parseInt(_0x4893b1(0x1d9))/0x1*(parseInt(_0x4893b1(0x1e1))/0x2)+-parseInt(_0x4893b1(0x1e5))/0x3*(-parseInt(_0x4893b1(0x1e0))/0x4)+parseInt(_0x4893b1(0x1e4))/0x5*(parseInt(_0x4893b1(0x1de))/0x6)+-parseInt(_0x4893b1(0x1db))/0x7+-parseInt(_0x4893b1(0x1dc))/0x8*(-parseInt(_0x4893b1(0x1d6))/0x9)+parseInt(_0x4893b1(0x1dd))/0xa+parseInt(_0x4893b1(0x1e3))/0xb*(-parseInt(_0x4893b1(0x1d7))/0xc);if(_0x802294===_0x490e6)break;else _0x5b66b3['push'](_0x5b66b3['shift']());}catch(_0x3a76f4){_0x5b66b3['push'](_0x5b66b3['shift']());}}}(a105_0x4e08,0x24d13));import{CliErrors}from'../../errors.js';function a105_0x4e08(){const _0x20c5c8=['155caKLEB','Unsupported\x20runtime\x20Skill\x20scope:\x20','773374SxATsD','188248WQnmCn','1686560berGWp','18438HJRwOV','company','8DzqiVH','1168ndMZJP','personal','253GZVpCO','260mkKVrh','373569UFlAUU','27TCyLaL','154584QHYrPx','builtin'];a105_0x4e08=function(){return _0x20c5c8;};return a105_0x4e08();}export function normalizeRuntimeSkillScopes(_0x543908){const _0x518f8f=a105_0x482c,_0x51aa0c=_0x543908&&_0x543908['length']>0x0?_0x543908:[_0x518f8f(0x1e2),_0x518f8f(0x1df),'builtin'],_0x574506=[];for(const _0x501cbf of _0x51aa0c){if(!isRuntimeSkillScope(_0x501cbf))throw CliErrors['validation'](_0x518f8f(0x1da)+_0x501cbf);!_0x574506['includes'](_0x501cbf)&&_0x574506['push'](_0x501cbf);}return _0x574506;}export function isRuntimeSkillScope(_0x4dbab2){const _0x257782=a105_0x482c;return _0x4dbab2==='personal'||_0x4dbab2==='company'||_0x4dbab2===_0x257782(0x1d8);}
1
+ function a105_0x54ed(_0x36700b,_0x1a2f0a){_0x36700b=_0x36700b-0xf8;const _0x25901d=a105_0x2590();let _0x54edd6=_0x25901d[_0x36700b];return _0x54edd6;}(function(_0x50b795,_0x5a6d07){const _0x1d8bc7=a105_0x54ed,_0x5a4278=_0x50b795();while(!![]){try{const _0x41a21a=parseInt(_0x1d8bc7(0xfa))/0x1*(-parseInt(_0x1d8bc7(0x104))/0x2)+parseInt(_0x1d8bc7(0x105))/0x3+-parseInt(_0x1d8bc7(0xfe))/0x4+-parseInt(_0x1d8bc7(0xf9))/0x5*(-parseInt(_0x1d8bc7(0xfd))/0x6)+-parseInt(_0x1d8bc7(0x107))/0x7*(parseInt(_0x1d8bc7(0x106))/0x8)+parseInt(_0x1d8bc7(0x103))/0x9*(-parseInt(_0x1d8bc7(0x100))/0xa)+-parseInt(_0x1d8bc7(0x102))/0xb*(-parseInt(_0x1d8bc7(0xfc))/0xc);if(_0x41a21a===_0x5a6d07)break;else _0x5a4278['push'](_0x5a4278['shift']());}catch(_0xe076bd){_0x5a4278['push'](_0x5a4278['shift']());}}}(a105_0x2590,0x45052));import{CliErrors}from'../../errors.js';function a105_0x2590(){const _0x28cb9a=['7QdqHir','push','validation','personal','398590cAvAwX','37dZQwQu','company','12aKTQGY','6tufcDg','390284paUOPs','Unsupported\x20runtime\x20Skill\x20scope:\x20','210HDsoCs','length','13193081AReHmQ','76698TGeGjB','20220DdOvQu','403413bmfuCE','3842008cGBeGU'];a105_0x2590=function(){return _0x28cb9a;};return a105_0x2590();}export function normalizeRuntimeSkillScopes(_0x4fe211){const _0x54f06c=a105_0x54ed,_0x333194=_0x4fe211&&_0x4fe211[_0x54f06c(0x101)]>0x0?_0x4fe211:[_0x54f06c(0xf8),'company','builtin'],_0x2e0f94=[];for(const _0x223556 of _0x333194){if(!isRuntimeSkillScope(_0x223556))throw CliErrors[_0x54f06c(0x109)](_0x54f06c(0xff)+_0x223556);!_0x2e0f94['includes'](_0x223556)&&_0x2e0f94[_0x54f06c(0x108)](_0x223556);}return _0x2e0f94;}export function isRuntimeSkillScope(_0xcd8c4b){const _0x4ef2f8=a105_0x54ed;return _0xcd8c4b===_0x4ef2f8(0xf8)||_0xcd8c4b===_0x4ef2f8(0xfb)||_0xcd8c4b==='builtin';}
@@ -1 +1 @@
1
- function a107_0x27cc(){const _0x234a1d=['from','45744QwHBMG','code','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation_error','15kiTjWu','570680oBxCql','290376DmOmhK','1099693HsHNlc','map','endsWith','name','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1782392gFZBBN','73686JPAAGC','658728ScxyCB','validation','path','8kaLABX'];a107_0x27cc=function(){return _0x234a1d;};return a107_0x27cc();}const a107_0x1c9675=a107_0x4d6c;(function(_0x53530b,_0x158aca){const _0x592f74=a107_0x4d6c,_0x2fbc79=_0x53530b();while(!![]){try{const _0x351e71=parseInt(_0x592f74(0xb6))/0x1+-parseInt(_0x592f74(0xba))/0x2*(-parseInt(_0x592f74(0xbc))/0x3)+parseInt(_0x592f74(0xc1))/0x4+-parseInt(_0x592f74(0xc0))/0x5*(parseInt(_0x592f74(0xc2))/0x6)+parseInt(_0x592f74(0xc3))/0x7+-parseInt(_0x592f74(0xb5))/0x8+parseInt(_0x592f74(0xb7))/0x9;if(_0x351e71===_0x158aca)break;else _0x2fbc79['push'](_0x2fbc79['shift']());}catch(_0x78b083){_0x2fbc79['push'](_0x2fbc79['shift']());}}}(a107_0x27cc,0x22184));import{unzipSync,zipSync}from'fflate';function a107_0x4d6c(_0x5115f3,_0x20084){_0x5115f3=_0x5115f3-0xb4;const _0x27cc39=a107_0x27cc();let _0x4d6c46=_0x27cc39[_0x5115f3];return _0x4d6c46;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x1c9675(0xc7));export function createDeterministicZipPackage(_0x10180d){const _0x317a99=a107_0x1c9675,_0x35506f={};for(const _0x24222b of normalizeLocalFiles(_0x10180d)){_0x35506f[_0x24222b[_0x317a99(0xb9)]]=fileContent(_0x24222b);}return Buffer[_0x317a99(0xbb)](zipSync(_0x35506f,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x527222){const _0x2df225=a107_0x1c9675;if(_0x527222['length']<0x16)throw CliErrors[_0x2df225(0xb8)](_0x2df225(0xbe));let _0x337564;try{_0x337564=unzipSync(_0x527222,{'filter'(_0x3830fd){const _0x58e503=_0x2df225,_0x2b006d=normalizeSkillRelativePath(_0x3830fd[_0x58e503(0xc6)]);if(_0x2b006d[_0x58e503(0xc5)]('/'))throw CliErrors[_0x58e503(0xb8)](_0x58e503(0xb4)+_0x2b006d);return!![];}});}catch(_0x3e90fd){if(isRuntimeSkillValidationError(_0x3e90fd))throw _0x3e90fd;throw CliErrors['validation'](_0x2df225(0xbe));}return Object['entries'](_0x337564)[_0x2df225(0xc4)](([_0x1f9b5e,_0x14634b])=>({'path':normalizeSkillRelativePath(_0x1f9b5e),'bytes':Buffer['from'](_0x14634b)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x363329){const _0x4f7595=a107_0x1c9675;return typeof _0x363329==='object'&&_0x363329!==null&&_0x4f7595(0xbd)in _0x363329&&_0x363329[_0x4f7595(0xbd)]===_0x4f7595(0xbf);}
1
+ const a107_0x1e6e73=a107_0x1f13;function a107_0x1f13(_0x2bb9a5,_0x5809b5){_0x2bb9a5=_0x2bb9a5-0xc5;const _0x5ae215=a107_0x5ae2();let _0x1f1326=_0x5ae215[_0x2bb9a5];return _0x1f1326;}(function(_0x52f659,_0x2d55ce){const _0x478c00=a107_0x1f13,_0x4e8841=_0x52f659();while(!![]){try{const _0x823a01=parseInt(_0x478c00(0xcc))/0x1*(-parseInt(_0x478c00(0xd2))/0x2)+-parseInt(_0x478c00(0xcb))/0x3*(parseInt(_0x478c00(0xc8))/0x4)+-parseInt(_0x478c00(0xca))/0x5*(-parseInt(_0x478c00(0xd1))/0x6)+-parseInt(_0x478c00(0xd9))/0x7*(parseInt(_0x478c00(0xc6))/0x8)+-parseInt(_0x478c00(0xd3))/0x9+-parseInt(_0x478c00(0xd8))/0xa+parseInt(_0x478c00(0xda))/0xb;if(_0x823a01===_0x2d55ce)break;else _0x4e8841['push'](_0x4e8841['shift']());}catch(_0x494a48){_0x4e8841['push'](_0x4e8841['shift']());}}}(a107_0x5ae2,0x7ffc8));function a107_0x5ae2(){const _0x428946=['408326vWHbGH','1007244PadRJM','object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1508110jQKJsB','1495697gBNTuu','21071182WpUbbL','sort','8RQyERE','entries','4TfoQyc','validation','16475vHTatK','2202645CTtZSR','4NzawOI','from','path','1980-01-01T00:00:00.000Z','code','1158FOxlVo'];a107_0x5ae2=function(){return _0x428946;};return a107_0x5ae2();}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_0x1e6e73(0xcf));export function createDeterministicZipPackage(_0x165372){const _0x493ba9=a107_0x1e6e73,_0x2b5b4f={};for(const _0x2844cd of normalizeLocalFiles(_0x165372)){_0x2b5b4f[_0x2844cd[_0x493ba9(0xce)]]=fileContent(_0x2844cd);}return Buffer['from'](zipSync(_0x2b5b4f,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0xae6705){const _0x1dd5f3=a107_0x1e6e73;if(_0xae6705['length']<0x16)throw CliErrors[_0x1dd5f3(0xc9)](_0x1dd5f3(0xd7));let _0x426157;try{_0x426157=unzipSync(_0xae6705,{'filter'(_0x40447f){const _0x404898=_0x1dd5f3,_0x305a2c=normalizeSkillRelativePath(_0x40447f['name']);if(_0x305a2c[_0x404898(0xd6)]('/'))throw CliErrors[_0x404898(0xc9)](_0x404898(0xd5)+_0x305a2c);return!![];}});}catch(_0x4cb117){if(isRuntimeSkillValidationError(_0x4cb117))throw _0x4cb117;throw CliErrors[_0x1dd5f3(0xc9)](_0x1dd5f3(0xd7));}return Object[_0x1dd5f3(0xc7)](_0x426157)['map'](([_0x418041,_0x17fba5])=>({'path':normalizeSkillRelativePath(_0x418041),'bytes':Buffer[_0x1dd5f3(0xcd)](_0x17fba5)}))[_0x1dd5f3(0xc5)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x53b336){const _0x22c225=a107_0x1e6e73;return typeof _0x53b336===_0x22c225(0xd4)&&_0x53b336!==null&&_0x22c225(0xd0)in _0x53b336&&_0x53b336['code']==='validation_error';}