@lovrabet/lovrabet-cli 2.1.22-beta.1 → 2.1.22-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +1 -1
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/ocr/index.js +1 -1
  37. package/lib/commands/personal-bff/index.js +1 -1
  38. package/lib/commands/registry.js +1 -1
  39. package/lib/commands/schedule/index.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/function-name-adapter.js +1 -1
  43. package/lib/commands/service/index.js +1 -1
  44. package/lib/commands/service/registry.js +1 -1
  45. package/lib/commands/skill/commands/create.js +1 -1
  46. package/lib/commands/skill/commands/diagram.d.ts +4 -0
  47. package/lib/commands/skill/commands/diagram.js +1 -0
  48. package/lib/commands/skill/commands/install.js +1 -1
  49. package/lib/commands/skill/commands/list.js +1 -1
  50. package/lib/commands/skill/commands/push.js +1 -1
  51. package/lib/commands/skill/commands/validate.js +1 -1
  52. package/lib/commands/skill/diagram.d.ts +5 -0
  53. package/lib/commands/skill/diagram.js +1 -0
  54. package/lib/commands/skill/flags.d.ts +6 -0
  55. package/lib/commands/skill/flags.js +1 -1
  56. package/lib/commands/skill/index.js +1 -1
  57. package/lib/commands/skill/manifest-helpers.js +1 -1
  58. package/lib/commands/skill/push-execute.d.ts +4 -0
  59. package/lib/commands/skill/push-execute.js +1 -1
  60. package/lib/commands/skill/push-flow-helpers.js +1 -1
  61. package/lib/commands/skill/push-retarget.js +1 -1
  62. package/lib/commands/skill/scopes.js +1 -1
  63. package/lib/commands/skill/summary.js +1 -1
  64. package/lib/commands/skill/templates.js +1 -1
  65. package/lib/commands/skill/validate.js +1 -1
  66. package/lib/commands/sql/detail.js +1 -1
  67. package/lib/commands/sql/exec.js +1 -1
  68. package/lib/commands/sql/index.js +1 -1
  69. package/lib/commands/update.js +1 -1
  70. package/lib/commands/workspace/index.js +1 -1
  71. package/lib/config/schema.js +1 -1
  72. package/lib/constant/app.js +1 -1
  73. package/lib/constant/auth-mode.js +1 -1
  74. package/lib/constant/cli.js +1 -1
  75. package/lib/constant/defaults.js +1 -1
  76. package/lib/constant/distribution.js +1 -1
  77. package/lib/constant/domain.js +1 -1
  78. package/lib/constant/env.js +1 -1
  79. package/lib/constant/output.js +1 -1
  80. package/lib/constant/product.js +1 -1
  81. package/lib/constant/risk.js +1 -1
  82. package/lib/constant/url.js +1 -1
  83. package/lib/context.js +1 -1
  84. package/lib/core/api-client.d.ts +52 -0
  85. package/lib/core/api-client.js +1 -1
  86. package/lib/core/db-resolver.js +1 -1
  87. package/lib/core/sdk-client.js +1 -1
  88. package/lib/errors.js +1 -1
  89. package/lib/framework/build-all-flags.js +1 -1
  90. package/lib/framework/dryrun.js +1 -1
  91. package/lib/framework/flags.js +1 -1
  92. package/lib/framework/help.js +1 -1
  93. package/lib/framework/index.js +1 -1
  94. package/lib/framework/output.js +1 -1
  95. package/lib/framework/preparse.js +1 -1
  96. package/lib/framework/rate-limit.js +1 -1
  97. package/lib/framework/raw-flags.js +1 -1
  98. package/lib/framework/response.js +1 -1
  99. package/lib/framework/runner-confirmation.js +1 -1
  100. package/lib/framework/runner-error.js +1 -1
  101. package/lib/framework/runner.js +1 -1
  102. package/lib/framework/schema-export.js +1 -1
  103. package/lib/framework/service-order.js +1 -1
  104. package/lib/framework/types.js +1 -1
  105. package/lib/generated/build-info.d.ts +4 -4
  106. package/lib/generated/build-info.js +1 -1
  107. package/lib/help.js +1 -1
  108. package/lib/runtime/event.js +1 -1
  109. package/lib/runtime/index.js +1 -1
  110. package/lib/runtime/queue.js +1 -1
  111. package/lib/runtime/resolve.js +1 -1
  112. package/lib/skills/npx-skills-add.js +1 -1
  113. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  114. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  115. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  116. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  117. package/lib/skills/runtime-skill-sync/links.js +1 -1
  118. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  119. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  120. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  121. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  122. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  123. package/lib/skills/runtime-skill-sync/push.js +1 -1
  124. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  125. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  126. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  127. package/lib/skills/runtime-skill-sync.js +1 -1
  128. package/lib/utils/apply-jq-filter.js +1 -1
  129. package/lib/utils/logger.js +1 -1
  130. package/lib/utils/lossless-json.js +1 -1
  131. package/lib/utils/params.js +1 -1
  132. package/lib/utils/platform.js +1 -1
  133. package/lib/utils/update-notice.js +1 -1
  134. package/lib/utils/version.js +1 -1
  135. package/lib/utils/write-cli-side-channel.js +1 -1
  136. package/package.json +3 -1
@@ -1 +1 @@
1
- (function(_0x1232d9,_0x133b19){const _0x53b53f=a99_0x45a1,_0xc72019=_0x1232d9();while(!![]){try{const _0x2df252=parseInt(_0x53b53f(0x1b5))/0x1*(parseInt(_0x53b53f(0x1ba))/0x2)+-parseInt(_0x53b53f(0x1bd))/0x3*(-parseInt(_0x53b53f(0x1c7))/0x4)+parseInt(_0x53b53f(0x1b2))/0x5+parseInt(_0x53b53f(0x1be))/0x6*(-parseInt(_0x53b53f(0x1c8))/0x7)+-parseInt(_0x53b53f(0x1d0))/0x8+-parseInt(_0x53b53f(0x1cc))/0x9+parseInt(_0x53b53f(0x1b8))/0xa;if(_0x2df252===_0x133b19)break;else _0xc72019['push'](_0xc72019['shift']());}catch(_0x41a315){_0xc72019['push'](_0xc72019['shift']());}}}(a99_0x1368,0xab004));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';function a99_0x45a1(_0x5aeab8,_0x1721bf){_0x5aeab8=_0x5aeab8-0x1b1;const _0x13683c=a99_0x1368();let _0x45a11e=_0x13683c[_0x5aeab8];return _0x45a11e;}import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x339570,command:_0x349af3,risk:_0x3632bb,dryRun:_0x3fee37}){const _0x222218=a99_0x45a1;return JSON['stringify']({'ok':_0x339570['ok'],'command':_0x349af3,'risk':_0x3632bb,..._0x3fee37?{'dryRun':!![]}:{},..._0x339570[_0x222218(0x1c3)]!==undefined?{'data':_0x339570[_0x222218(0x1c3)]}:{},..._0x339570[_0x222218(0x1ca)]?{'message':_0x339570['message']}:{}});}};export async function invokeLovrabet(_0x1bee5f,_0x39d159){return runSerialized(async()=>{const _0x23d4a2=a99_0x45a1;throwIfAborted(_0x39d159[_0x23d4a2(0x1b9)]);const _0x21d243=await resolveLovrabetInvocation(_0x1bee5f),_0x4b1b32=canonicalLovrabetOperation(_0x21d243[_0x23d4a2(0x1b7)]),_0x85c1e0={},_0x42a334=buildConfigFromFlags(_0x21d243[_0x23d4a2(0x1c5)]);await initGlobalEnvironment(_0x42a334);const _0xaaa2a8=createPipelineEnv(_0x42a334,{..._0x21d243[_0x23d4a2(0x1c5)],'yes':_0x21d243[_0x23d4a2(0x1b7)][_0x23d4a2(0x1b1)]===_0x23d4a2(0x1bb)?!![]:_0x21d243[_0x23d4a2(0x1c5)][_0x23d4a2(0x1b4)],'nonInteractive':!![]});_0xaaa2a8[_0x23d4a2(0x1b3)]=_0x21d243[_0x23d4a2(0x1b3)],_0xaaa2a8[_0x23d4a2(0x1cf)]=!![],_0xaaa2a8['riskLevel']='high-risk-write';const _0x206408=withEmbeddedLifecycle(_0x21d243[_0x23d4a2(0x1b7)],_0x4b1b32,_0x39d159),_0x55456c=createLovrabetRunnerAdapter({'formatOutput'(_0x3f4b9d,_0x1a0843){const _0x1cf720=_0x23d4a2;_0x85c1e0[_0x1cf720(0x1cb)]=_0x3f4b9d,_0x85c1e0[_0x1cf720(0x1c4)]=_0x1a0843[_0x1cf720(0x1c4)],_0x85c1e0[_0x1cf720(0x1b1)]=_0x1a0843['risk'],_0x85c1e0[_0x1cf720(0x1c9)]=_0x1a0843[_0x1cf720(0x1c9)],_0x85c1e0[_0x1cf720(0x1b6)]=_0x1a0843[_0x1cf720(0x1b6)]===!![];},async 'confirmHighRisk'(){const _0x4a6bf3=_0x23d4a2;throw new Error(_0x4a6bf3(0x1cd));}});try{await runCommand(_0x206408,_0xaaa2a8,_0x55456c);if(!_0x85c1e0[_0x23d4a2(0x1cb)]||!_0x85c1e0[_0x23d4a2(0x1c4)]||!_0x85c1e0[_0x23d4a2(0x1b1)]||!_0x85c1e0['format'])throw new Error('Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.');const _0x3139e9=_0x39d159[_0x23d4a2(0x1c2)]??defaultPresentation,_0x1168e4=_0x85c1e0['dryRun']===!![],_0x4c5716={'result':_0x85c1e0['result'],'command':_0x85c1e0[_0x23d4a2(0x1c4)],'operation':_0x4b1b32,'risk':_0x85c1e0[_0x23d4a2(0x1b1)],'format':_0x85c1e0[_0x23d4a2(0x1c9)],'dryRun':_0x1168e4},_0x231eae=createLovrabetWriteMetadata(_0x21d243['definition'],_0x4b1b32,_0x85c1e0[_0x23d4a2(0x1cb)],_0x1168e4);let _0x35197c;try{_0x35197c=await _0x3139e9['present'](_0x4c5716);}catch(_0x2d5f03){if(!_0x231eae||_0x3139e9===defaultPresentation)throw _0x2d5f03;_0x35197c=await defaultPresentation[_0x23d4a2(0x1bf)](_0x4c5716);}return{'operation':_0x4b1b32,'risk':_0x85c1e0[_0x23d4a2(0x1b1)],'mode':_0x1168e4?_0x23d4a2(0x1c0):'execute','result':_0x85c1e0[_0x23d4a2(0x1cb)],'output':_0x35197c,..._0x231eae?{'metadata':_0x231eae}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function a99_0x1368(){const _0x22a20b=['description','2199GfMRbQ','11550xHsJHW','present','dry-run','confirmation','presentation','data','command','rawFlags','Lovrabet\x20invocation\x20aborted.','276cLXduw','203gWxTKz','format','message','result','6775974jKOAgS','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','reason','isNonInteractive','3076024ugYgUT','aborted','risk','2478235XvOGOf','args','yes','1WCSEJy','dryRun','definition','1184890yFGjgX','signal','2457842XgXOaU','high-risk-write'];a99_0x1368=function(){return _0x22a20b;};return a99_0x1368();}function withEmbeddedLifecycle(_0x3d30a4,_0x59b670,_0x1ffb18){return{..._0x3d30a4,async 'execute'(_0x500840){const _0x3b6eb2=a99_0x45a1;return throwIfAborted(_0x1ffb18['signal']),(_0x3d30a4[_0x3b6eb2(0x1b1)]==='write'||_0x3d30a4[_0x3b6eb2(0x1b1)]===_0x3b6eb2(0x1bb))&&await _0x1ffb18[_0x3b6eb2(0x1c1)]['confirm']({'operation':_0x59b670,'risk':_0x3d30a4['risk'],'description':_0x3d30a4[_0x3b6eb2(0x1bc)],..._0x1ffb18['signal']?{'signal':_0x1ffb18[_0x3b6eb2(0x1b9)]}:{}}),throwIfAborted(_0x1ffb18[_0x3b6eb2(0x1b9)]),_0x3d30a4['execute'](_0x500840);}};}function throwIfAborted(_0x32736c){const _0x56fe82=a99_0x45a1;if(_0x32736c?.[_0x56fe82(0x1d1)])throw _0x32736c[_0x56fe82(0x1ce)]instanceof Error?_0x32736c['reason']:new DOMException(_0x56fe82(0x1c6),'AbortError');}
1
+ (function(_0x141862,_0x21797c){const _0xdf920f=a101_0xcd0e,_0x49c1d9=_0x141862();while(!![]){try{const _0x49f2d4=parseInt(_0xdf920f(0x10a))/0x1+parseInt(_0xdf920f(0x113))/0x2+parseInt(_0xdf920f(0x105))/0x3*(parseInt(_0xdf920f(0x114))/0x4)+-parseInt(_0xdf920f(0x125))/0x5*(parseInt(_0xdf920f(0x127))/0x6)+parseInt(_0xdf920f(0x103))/0x7+parseInt(_0xdf920f(0x122))/0x8*(parseInt(_0xdf920f(0x121))/0x9)+parseInt(_0xdf920f(0x108))/0xa*(-parseInt(_0xdf920f(0x119))/0xb);if(_0x49f2d4===_0x21797c)break;else _0x49c1d9['push'](_0x49c1d9['shift']());}catch(_0x5107f6){_0x49c1d9['push'](_0x49c1d9['shift']());}}}(a101_0x8f0c,0x3621d));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';function a101_0xcd0e(_0x2d3361,_0x33cd76){_0x2d3361=_0x2d3361-0x102;const _0x8f0ccd=a101_0x8f0c();let _0xcd0e54=_0x8f0ccd[_0x2d3361];return _0xcd0e54;}import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';function a101_0x8f0c(){const _0x2828d2=['args','AbortError','definition','11cvWvbo','risk','data','write','dry-run','reason','rawFlags','aborted','53127uIKWiI','600jTASSf','result','description','1721415LUEHnj','format','6erUUVr','execute','present','246008bFBDHd','signal','87627OAMCOz','dryRun','stringify','7536350OVqPRC','riskLevel','352680lQrKyz','command','isNonInteractive','confirmation','Lovrabet\x20invocation\x20aborted.','presentation','high-risk-write','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','confirm','277172VlDxAO','48kfqwaj','yes'];a101_0x8f0c=function(){return _0x2828d2;};return a101_0x8f0c();}import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x2a89b3,command:_0x24afa3,risk:_0x279034,dryRun:_0xe95bcc}){const _0x25eb19=a101_0xcd0e;return JSON[_0x25eb19(0x107)]({'ok':_0x2a89b3['ok'],'command':_0x24afa3,'risk':_0x279034,..._0xe95bcc?{'dryRun':!![]}:{},..._0x2a89b3[_0x25eb19(0x11b)]!==undefined?{'data':_0x2a89b3['data']}:{},..._0x2a89b3['message']?{'message':_0x2a89b3['message']}:{}});}};export async function invokeLovrabet(_0x4fc875,_0x3d1543){return runSerialized(async()=>{const _0xc8c6e8=a101_0xcd0e;throwIfAborted(_0x3d1543[_0xc8c6e8(0x104)]);const _0x30b713=await resolveLovrabetInvocation(_0x4fc875),_0x33c91f=canonicalLovrabetOperation(_0x30b713[_0xc8c6e8(0x118)]),_0x2417cc={},_0x44af55=buildConfigFromFlags(_0x30b713[_0xc8c6e8(0x11f)]);await initGlobalEnvironment(_0x44af55);const _0x1ebc95=createPipelineEnv(_0x44af55,{..._0x30b713[_0xc8c6e8(0x11f)],'yes':_0x30b713[_0xc8c6e8(0x118)][_0xc8c6e8(0x11a)]===_0xc8c6e8(0x110)?!![]:_0x30b713['rawFlags'][_0xc8c6e8(0x115)],'nonInteractive':!![]});_0x1ebc95['args']=_0x30b713[_0xc8c6e8(0x116)],_0x1ebc95[_0xc8c6e8(0x10c)]=!![],_0x1ebc95[_0xc8c6e8(0x109)]='high-risk-write';const _0x3fe219=withEmbeddedLifecycle(_0x30b713['definition'],_0x33c91f,_0x3d1543),_0x407d0d=createLovrabetRunnerAdapter({'formatOutput'(_0xe8a854,_0x53b887){const _0x45db47=_0xc8c6e8;_0x2417cc['result']=_0xe8a854,_0x2417cc[_0x45db47(0x10b)]=_0x53b887[_0x45db47(0x10b)],_0x2417cc['risk']=_0x53b887[_0x45db47(0x11a)],_0x2417cc['format']=_0x53b887['format'],_0x2417cc[_0x45db47(0x106)]=_0x53b887[_0x45db47(0x106)]===!![];},async 'confirmHighRisk'(){const _0x32e8a3=_0xc8c6e8;throw new Error(_0x32e8a3(0x111));}});try{await runCommand(_0x3fe219,_0x1ebc95,_0x407d0d);if(!_0x2417cc[_0xc8c6e8(0x123)]||!_0x2417cc[_0xc8c6e8(0x10b)]||!_0x2417cc['risk']||!_0x2417cc[_0xc8c6e8(0x126)])throw new Error('Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.');const _0x454d5c=_0x3d1543[_0xc8c6e8(0x10f)]??defaultPresentation,_0x3097de=_0x2417cc['dryRun']===!![],_0x2f4be3={'result':_0x2417cc['result'],'command':_0x2417cc[_0xc8c6e8(0x10b)],'operation':_0x33c91f,'risk':_0x2417cc['risk'],'format':_0x2417cc['format'],'dryRun':_0x3097de},_0x5b2b1c=createLovrabetWriteMetadata(_0x30b713[_0xc8c6e8(0x118)],_0x33c91f,_0x2417cc[_0xc8c6e8(0x123)],_0x3097de);let _0x5131cf;try{_0x5131cf=await _0x454d5c[_0xc8c6e8(0x102)](_0x2f4be3);}catch(_0x534296){if(!_0x5b2b1c||_0x454d5c===defaultPresentation)throw _0x534296;_0x5131cf=await defaultPresentation[_0xc8c6e8(0x102)](_0x2f4be3);}return{'operation':_0x33c91f,'risk':_0x2417cc['risk'],'mode':_0x3097de?_0xc8c6e8(0x11d):_0xc8c6e8(0x128),'result':_0x2417cc[_0xc8c6e8(0x123)],'output':_0x5131cf,..._0x5b2b1c?{'metadata':_0x5b2b1c}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function withEmbeddedLifecycle(_0x5544a1,_0x58e43a,_0x3410c4){return{..._0x5544a1,async 'execute'(_0x322964){const _0x4b69d0=a101_0xcd0e;return throwIfAborted(_0x3410c4[_0x4b69d0(0x104)]),(_0x5544a1[_0x4b69d0(0x11a)]===_0x4b69d0(0x11c)||_0x5544a1[_0x4b69d0(0x11a)]===_0x4b69d0(0x110))&&await _0x3410c4[_0x4b69d0(0x10d)][_0x4b69d0(0x112)]({'operation':_0x58e43a,'risk':_0x5544a1[_0x4b69d0(0x11a)],'description':_0x5544a1[_0x4b69d0(0x124)],..._0x3410c4['signal']?{'signal':_0x3410c4[_0x4b69d0(0x104)]}:{}}),throwIfAborted(_0x3410c4[_0x4b69d0(0x104)]),_0x5544a1[_0x4b69d0(0x128)](_0x322964);}};}function throwIfAborted(_0x4ebf3a){const _0x46b86f=a101_0xcd0e;if(_0x4ebf3a?.[_0x46b86f(0x120)])throw _0x4ebf3a[_0x46b86f(0x11e)]instanceof Error?_0x4ebf3a[_0x46b86f(0x11e)]:new DOMException(_0x46b86f(0x10e),_0x46b86f(0x117));}
@@ -1 +1 @@
1
- const a100_0x4fb331=a100_0x3bf6;(function(_0x451b6d,_0x26be11){const _0x1638fd=a100_0x3bf6,_0x187737=_0x451b6d();while(!![]){try{const _0x593c8a=-parseInt(_0x1638fd(0x13b))/0x1+-parseInt(_0x1638fd(0x143))/0x2*(-parseInt(_0x1638fd(0x142))/0x3)+parseInt(_0x1638fd(0x144))/0x4+-parseInt(_0x1638fd(0x13e))/0x5+-parseInt(_0x1638fd(0x141))/0x6+-parseInt(_0x1638fd(0x145))/0x7+-parseInt(_0x1638fd(0x13c))/0x8*(-parseInt(_0x1638fd(0x13f))/0x9);if(_0x593c8a===_0x26be11)break;else _0x187737['push'](_0x187737['shift']());}catch(_0x142cc1){_0x187737['push'](_0x187737['shift']());}}}(a100_0x1cf1,0xc5128));function a100_0x1cf1(){const _0x4ad44a=['8939574bxFGVd','576015xmVHTd','24SjFXhj','catch','4741455IofxaW','6880428QftzOr','resolve','3372768aAZHQG','1122513VWelkp','2nDNeva','6012308NHHJXs'];a100_0x1cf1=function(){return _0x4ad44a;};return a100_0x1cf1();}function a100_0x3bf6(_0x135b68,_0x36ddc5){_0x135b68=_0x135b68-0x13b;const _0x1cf1ed=a100_0x1cf1();let _0x3bf68e=_0x1cf1ed[_0x135b68];return _0x3bf68e;}let tail=Promise[a100_0x4fb331(0x140)]();export async function runSerialized(_0x2fe814){const _0x524a85=a100_0x4fb331,_0x5b7a2d=tail;let _0x4145e8;tail=new Promise(_0x1892f4=>{_0x4145e8=_0x1892f4;}),await _0x5b7a2d[_0x524a85(0x13d)](()=>undefined);try{return await _0x2fe814();}finally{_0x4145e8();}}
1
+ const a102_0x3dad76=a102_0x5827;(function(_0x329a9d,_0x30267c){const _0x26ef81=a102_0x5827,_0x72a2c5=_0x329a9d();while(!![]){try{const _0x51e91f=-parseInt(_0x26ef81(0xaa))/0x1+parseInt(_0x26ef81(0xa8))/0x2+parseInt(_0x26ef81(0xac))/0x3+parseInt(_0x26ef81(0xa6))/0x4+parseInt(_0x26ef81(0xa9))/0x5+parseInt(_0x26ef81(0xa5))/0x6+-parseInt(_0x26ef81(0xa7))/0x7;if(_0x51e91f===_0x30267c)break;else _0x72a2c5['push'](_0x72a2c5['shift']());}catch(_0x1ff070){_0x72a2c5['push'](_0x72a2c5['shift']());}}}(a102_0x112e,0x60cec));let tail=Promise[a102_0x3dad76(0xab)]();export async function runSerialized(_0x1d7cc1){const _0x23c73c=a102_0x3dad76,_0x68e8ae=tail;let _0x5c6408;tail=new Promise(_0x49f616=>{_0x5c6408=_0x49f616;}),await _0x68e8ae[_0x23c73c(0xad)](()=>undefined);try{return await _0x1d7cc1();}finally{_0x5c6408();}}function a102_0x5827(_0x51941,_0x5fa686){_0x51941=_0x51941-0xa5;const _0x112ec4=a102_0x112e();let _0x5827f7=_0x112ec4[_0x51941];return _0x5827f7;}function a102_0x112e(){const _0x3a2b85=['4624812YaXfFt','1614256aCHLQU','10937283xBItec','520004whAWDd','3756515njjVjL','285805OhWWzh','resolve','177381ulxBYz','catch'];a102_0x112e=function(){return _0x3a2b85;};return a102_0x112e();}
@@ -1 +1 @@
1
- function a101_0x2227(_0x2b4047,_0x44f7cf){_0x2b4047=_0x2b4047-0x8c;const _0x1e600b=a101_0x1e60();let _0x2227b6=_0x1e600b[_0x2b4047];return _0x2227b6;}(function(_0x2d7a4f,_0xc245e3){const _0x2953a1=a101_0x2227,_0xd89c21=_0x2d7a4f();while(!![]){try{const _0xb141b6=parseInt(_0x2953a1(0x9d))/0x1+parseInt(_0x2953a1(0x9f))/0x2+parseInt(_0x2953a1(0x96))/0x3*(-parseInt(_0x2953a1(0x9e))/0x4)+-parseInt(_0x2953a1(0xa0))/0x5+parseInt(_0x2953a1(0x8e))/0x6+-parseInt(_0x2953a1(0xa1))/0x7*(parseInt(_0x2953a1(0x90))/0x8)+-parseInt(_0x2953a1(0x94))/0x9;if(_0xb141b6===_0xc245e3)break;else _0xd89c21['push'](_0xd89c21['shift']());}catch(_0x1d9aa0){_0xd89c21['push'](_0xd89c21['shift']());}}}(a101_0x1e60,0x34f10));import a101_0x20260a from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a101_0x1e60(){const _0x5dae51=['input','2056386oroMZz','slice','8RPOlQO','validation','join','unknownCommand','513108owKLmG','../framework/preparse.js','9753HDyLIG','assign','definition','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','flatMap','args','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','75983UpDzlW','36RDZyTm','771044bHURqb','2064140RBtfWh','618023DfLCOS','../commands/registry.js','flags'];a101_0x1e60=function(){return _0x5dae51;};return a101_0x1e60();}export async function resolveLovrabetInvocation(_0x3d3725){const _0x473d5a=a101_0x2227,_0x35fa57=a101_0x20260a('',{'importMeta':import.meta,'argv':_0x3d3725,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x370b73=[..._0x35fa57[_0x473d5a(0x8d)]],_0x42fcff=_0x35fa57[_0x473d5a(0x8c)];await correctFlags(_0x42fcff);const _0x7a7441=_0x370b73[0x0];if(!_0x7a7441)throw CliErrors[_0x473d5a(0x91)](_0x473d5a(0x99));if(!isKnownService(_0x7a7441)){const _0x137a25=resolveDynamicServiceCommand(_0x370b73,_0x42fcff);if(!_0x137a25)throw CliErrors[_0x473d5a(0x93)](_0x370b73[_0x473d5a(0x92)]('\x20'));return Object[_0x473d5a(0x97)](_0x42fcff,_0x137a25[_0x473d5a(0x8c)]),{'definition':_0x137a25[_0x473d5a(0x98)],'rawFlags':_0x42fcff,'args':_0x137a25[_0x473d5a(0x9b)]};}const _0x2bd2f0=getServiceEntry(_0x7a7441),_0x2a8256=_0x370b73[0x1]||_0x2bd2f0['defaultCommand'];if(!_0x2a8256)throw CliErrors[_0x473d5a(0x91)](_0x473d5a(0x9c)+_0x7a7441+'\x22.');const _0x176f02=findDefinition(_0x7a7441,_0x2a8256);if(!_0x176f02)throw CliErrors[_0x473d5a(0x93)](_0x7a7441+'\x20'+_0x2a8256);return{'definition':_0x176f02,'rawFlags':_0x42fcff,'args':_0x370b73[_0x473d5a(0x8f)](0x2)};}async function correctFlags(_0x449b30){const _0x5491bb=a101_0x2227;try{const {correctFlags:_0x4f5622}=await import(_0x5491bb(0x95)),{getAllDefinitions:_0x76bd69}=await import(_0x5491bb(0xa2)),_0x367aa0=_0x76bd69()[_0x5491bb(0x9a)](_0x2778d3=>_0x2778d3['flags']??[]),_0x453fb4=_0x4f5622(_0x449b30,_0x367aa0);Object['assign'](_0x449b30,_0x453fb4[_0x5491bb(0x8c)]);}catch{}}
1
+ (function(_0x30dd90,_0x87af1){const _0x37bcb9=a103_0x6e3e,_0x5e0d48=_0x30dd90();while(!![]){try{const _0x4b6cb0=-parseInt(_0x37bcb9(0x19d))/0x1+-parseInt(_0x37bcb9(0x192))/0x2+-parseInt(_0x37bcb9(0x191))/0x3+-parseInt(_0x37bcb9(0x196))/0x4+parseInt(_0x37bcb9(0x195))/0x5+parseInt(_0x37bcb9(0x19e))/0x6+parseInt(_0x37bcb9(0x19a))/0x7;if(_0x4b6cb0===_0x87af1)break;else _0x5e0d48['push'](_0x5e0d48['shift']());}catch(_0xb3b69f){_0x5e0d48['push'](_0x5e0d48['shift']());}}}(a103_0x4c42,0x6ac59));import a103_0x37f8fd from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a103_0x4c42(){const _0x489709=['../commands/registry.js','878920mjmIsR','2127528KNOHdI','definition','flags','args','13459369pufejv','unknownCommand','validation','530958BMdOiw','2707446aXeZbT','defaultCommand','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','join','flatMap','1725882RIvAwa','948642vOFJdV','slice'];a103_0x4c42=function(){return _0x489709;};return a103_0x4c42();}import{buildMeowFlags}from'../constant/cli.js';function a103_0x6e3e(_0x5cb80d,_0x3e6d5d){_0x5cb80d=_0x5cb80d-0x18d;const _0x4c4250=a103_0x4c42();let _0x6e3eae=_0x4c4250[_0x5cb80d];return _0x6e3eae;}import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x1b8184){const _0x19afd4=a103_0x6e3e,_0x1c6aa2=a103_0x37f8fd('',{'importMeta':import.meta,'argv':_0x1b8184,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x1bc603=[..._0x1c6aa2['input']],_0x148367=_0x1c6aa2[_0x19afd4(0x198)];await correctFlags(_0x148367);const _0x1fdafc=_0x1bc603[0x0];if(!_0x1fdafc)throw CliErrors['validation']('Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');if(!isKnownService(_0x1fdafc)){const _0x300d19=resolveDynamicServiceCommand(_0x1bc603,_0x148367);if(!_0x300d19)throw CliErrors[_0x19afd4(0x19b)](_0x1bc603[_0x19afd4(0x18f)]('\x20'));return Object['assign'](_0x148367,_0x300d19[_0x19afd4(0x198)]),{'definition':_0x300d19[_0x19afd4(0x197)],'rawFlags':_0x148367,'args':_0x300d19[_0x19afd4(0x199)]};}const _0x3d00c3=getServiceEntry(_0x1fdafc),_0x2b71bf=_0x1bc603[0x1]||_0x3d00c3[_0x19afd4(0x18d)];if(!_0x2b71bf)throw CliErrors[_0x19afd4(0x19c)](_0x19afd4(0x18e)+_0x1fdafc+'\x22.');const _0x47067f=findDefinition(_0x1fdafc,_0x2b71bf);if(!_0x47067f)throw CliErrors[_0x19afd4(0x19b)](_0x1fdafc+'\x20'+_0x2b71bf);return{'definition':_0x47067f,'rawFlags':_0x148367,'args':_0x1bc603[_0x19afd4(0x193)](0x2)};}async function correctFlags(_0x2f0482){const _0x6bf252=a103_0x6e3e;try{const {correctFlags:_0x54a4d8}=await import('../framework/preparse.js'),{getAllDefinitions:_0x4ae29b}=await import(_0x6bf252(0x194)),_0x38bb66=_0x4ae29b()[_0x6bf252(0x190)](_0x40c945=>_0x40c945['flags']??[]),_0x3d097f=_0x54a4d8(_0x2f0482,_0x38bb66);Object['assign'](_0x2f0482,_0x3d097f[_0x6bf252(0x198)]);}catch{}}
@@ -1 +1 @@
1
- (function(_0x5416e1,_0x6df514){const _0x26e3ba=a103_0x5e4b,_0x25a198=_0x5416e1();while(!![]){try{const _0x356115=parseInt(_0x26e3ba(0x1db))/0x1+-parseInt(_0x26e3ba(0x1dc))/0x2+parseInt(_0x26e3ba(0x1de))/0x3+-parseInt(_0x26e3ba(0x1e9))/0x4*(parseInt(_0x26e3ba(0x1da))/0x5)+-parseInt(_0x26e3ba(0x1d5))/0x6*(-parseInt(_0x26e3ba(0x1e4))/0x7)+parseInt(_0x26e3ba(0x1e0))/0x8*(-parseInt(_0x26e3ba(0x1e3))/0x9)+-parseInt(_0x26e3ba(0x1e6))/0xa*(-parseInt(_0x26e3ba(0x1ea))/0xb);if(_0x356115===_0x6df514)break;else _0x25a198['push'](_0x25a198['shift']());}catch(_0x766c55){_0x25a198['push'](_0x25a198['shift']());}}}(a103_0x4098,0x31740));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a103_0x4d56a7}from'../constant/distribution.js';function a103_0x4098(){const _0x4f9d99=['11EETSZh','stdio','2862LOBWqR','toString','npx','log','stderr','10lUdeYA','217441KxnFlY','726688idWzLL','trim','98460IyMKBo','skills','326296KddOVv','status','stdout','9FFUMiU','1925CVGUxj','join','4931410ZzrxOB','inherit','add','535772gFKaci'];a103_0x4098=function(){return _0x4f9d99;};return a103_0x4098();}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a103_0x4d56a7;function a103_0x5e4b(_0x2edf00,_0x13aa3c){_0x2edf00=_0x2edf00-0x1d4;const _0x409853=a103_0x4098();let _0x5e4b7e=_0x409853[_0x2edf00];return _0x5e4b7e;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x596b2e,_0x194e41=LOVRABET_SKILL_SOURCE,_0x59d265){const _0x555722=a103_0x5e4b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x267d6b=_0x59d265?.[_0x555722(0x1d4)]??_0x555722(0x1e7),_0x29e571=resolveNpmBin(_0x555722(0x1d7)),_0x57ee0b=[_0x555722(0x1df),_0x555722(0x1e8),_0x194e41,'-g','-y'],_0x2611db=[_0x29e571,..._0x57ee0b][_0x555722(0x1e5)]('\x20');console[_0x555722(0x1d8)]('*\x20'+_0x2611db);const _0x3fb433=spawnSync(_0x29e571,_0x57ee0b,{'cwd':_0x596b2e,'stdio':_0x267d6b,'env':process.env,'shell':![]});if(_0x3fb433[_0x555722(0x1e1)]===0x0)return{'ok':!![],'status':0x0};let _0x69db06='exit\x20'+(_0x3fb433[_0x555722(0x1e1)]??'unknown');if(_0x267d6b==='pipe'){const _0x44aa12=_0x3fb433[_0x555722(0x1d9)]?_0x3fb433[_0x555722(0x1d9)][_0x555722(0x1d6)]()['trim']():'',_0x1aeb7b=_0x3fb433[_0x555722(0x1e2)]?_0x3fb433[_0x555722(0x1e2)][_0x555722(0x1d6)]()[_0x555722(0x1dd)]():'';if(_0x44aa12)_0x69db06=_0x44aa12;else{if(_0x1aeb7b)_0x69db06=_0x1aeb7b;}}return{'ok':![],'status':_0x3fb433[_0x555722(0x1e1)]??null,'error':_0x69db06};}
1
+ const a105_0x50e626=a105_0x3ce6;(function(_0x445315,_0x2bf905){const _0x37e8a5=a105_0x3ce6,_0x19f72d=_0x445315();while(!![]){try{const _0x2dfd42=-parseInt(_0x37e8a5(0x120))/0x1*(-parseInt(_0x37e8a5(0x12b))/0x2)+-parseInt(_0x37e8a5(0x11a))/0x3*(parseInt(_0x37e8a5(0x121))/0x4)+-parseInt(_0x37e8a5(0x127))/0x5*(parseInt(_0x37e8a5(0x128))/0x6)+parseInt(_0x37e8a5(0x132))/0x7*(-parseInt(_0x37e8a5(0x119))/0x8)+-parseInt(_0x37e8a5(0x11e))/0x9*(-parseInt(_0x37e8a5(0x12c))/0xa)+-parseInt(_0x37e8a5(0x126))/0xb*(-parseInt(_0x37e8a5(0x12f))/0xc)+parseInt(_0x37e8a5(0x12d))/0xd*(parseInt(_0x37e8a5(0x130))/0xe);if(_0x2dfd42===_0x2bf905)break;else _0x19f72d['push'](_0x19f72d['shift']());}catch(_0xb22d20){_0x19f72d['push'](_0x19f72d['shift']());}}}(a105_0x20f1,0x54b7e));function a105_0x3ce6(_0x266839,_0x3114c2){_0x266839=_0x266839-0x119;const _0x20f1ab=a105_0x20f1();let _0x3ce6f8=_0x20f1ab[_0x266839];return _0x3ce6f8;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a105_0x5427fa}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a105_0x5427fa;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a105_0x50e626(0x124)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a105_0x20f1(){const _0x17c732=['pipe','exit\x20','log','285003lEuqXW','status','373918TnIRHM','62092USXFjC','stderr','inherit','skipNpxSkillsEnvSuffix','trim','1922085dAEECB','146705AkfUPd','6HkNRxB','toString','join','2ydNSBg','10BjqXmr','13zooWjL','skills','36zxwMYd','4269874yOCUOa','stdout','7HjGpqP','4880528eadesb','48eTGEHJ'];a105_0x20f1=function(){return _0x17c732;};return a105_0x20f1();}export function runNpxSkillsAddGlobal(_0x1801b2,_0x4d1cd1=LOVRABET_SKILL_SOURCE,_0x1f44ba){const _0x1cc845=a105_0x50e626;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x22f532=_0x1f44ba?.['stdio']??_0x1cc845(0x123),_0x23bee1=resolveNpmBin('npx'),_0x132fd6=[_0x1cc845(0x12e),'add',_0x4d1cd1,'-g','-y'],_0x4f0f9f=[_0x23bee1,..._0x132fd6][_0x1cc845(0x12a)]('\x20');console[_0x1cc845(0x11d)]('*\x20'+_0x4f0f9f);const _0x42f767=spawnSync(_0x23bee1,_0x132fd6,{'cwd':_0x1801b2,'stdio':_0x22f532,'env':process.env,'shell':![]});if(_0x42f767[_0x1cc845(0x11f)]===0x0)return{'ok':!![],'status':0x0};let _0x278c31=_0x1cc845(0x11c)+(_0x42f767[_0x1cc845(0x11f)]??'unknown');if(_0x22f532===_0x1cc845(0x11b)){const _0x1e87aa=_0x42f767[_0x1cc845(0x122)]?_0x42f767[_0x1cc845(0x122)][_0x1cc845(0x129)]()[_0x1cc845(0x125)]():'',_0x28a4b7=_0x42f767[_0x1cc845(0x131)]?_0x42f767[_0x1cc845(0x131)][_0x1cc845(0x129)]()[_0x1cc845(0x125)]():'';if(_0x1e87aa)_0x278c31=_0x1e87aa;else{if(_0x28a4b7)_0x278c31=_0x28a4b7;}}return{'ok':![],'status':_0x42f767['status']??null,'error':_0x278c31};}
@@ -1 +1 @@
1
- const a104_0x2654e0=a104_0x20d8;function a104_0x5bf7(){const _0x12af0e=['.hg','dist','27970AVmVqy','.DS_Store','6498054LDdNei','5478435ajahOi','8ynMHgI','6lpkPLA','.cache','8GqjShF','12420Vewyrv','2858005GnDvmF','node_modules','.svn','6479EzaBRF','coverage','.next','SKILL.md','.turbo','build','lovrabet.skill.json','316104SOXwGL','4169291CUlJlF'];a104_0x5bf7=function(){return _0x12af0e;};return a104_0x5bf7();}(function(_0x52433c,_0x5a0027){const _0x1f8aa5=a104_0x20d8,_0xb5bad9=_0x52433c();while(!![]){try{const _0x5c34e9=-parseInt(_0x1f8aa5(0x12c))/0x1+-parseInt(_0x1f8aa5(0x120))/0x2*(-parseInt(_0x1f8aa5(0x129))/0x3)+-parseInt(_0x1f8aa5(0x128))/0x4*(-parseInt(_0x1f8aa5(0x12d))/0x5)+-parseInt(_0x1f8aa5(0x126))/0x6+-parseInt(_0x1f8aa5(0x121))/0x7*(parseInt(_0x1f8aa5(0x12b))/0x8)+-parseInt(_0x1f8aa5(0x127))/0x9+-parseInt(_0x1f8aa5(0x124))/0xa*(-parseInt(_0x1f8aa5(0x130))/0xb);if(_0x5c34e9===_0x5a0027)break;else _0xb5bad9['push'](_0xb5bad9['shift']());}catch(_0x3cc852){_0xb5bad9['push'](_0xb5bad9['shift']());}}}(a104_0x5bf7,0xc5046));export const METADATA_FILE=a104_0x2654e0(0x11f);export const SKILL_FILE=a104_0x2654e0(0x133);function a104_0x20d8(_0x1bfdbd,_0x14ed47){_0x1bfdbd=_0x1bfdbd-0x11d;const _0x5bf748=a104_0x5bf7();let _0x20d8aa=_0x5bf748[_0x1bfdbd];return _0x20d8aa;}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a104_0x2654e0(0x125)]);export const IGNORED_DIR_NAMES=new Set(['.git',a104_0x2654e0(0x122),a104_0x2654e0(0x12f),a104_0x2654e0(0x12e),a104_0x2654e0(0x132),a104_0x2654e0(0x123),a104_0x2654e0(0x11e),a104_0x2654e0(0x131),a104_0x2654e0(0x11d),a104_0x2654e0(0x12a)]);
1
+ const a106_0x11c773=a106_0x3c2a;(function(_0x5dc078,_0x13907c){const _0x5e6d41=a106_0x3c2a,_0x2661f5=_0x5dc078();while(!![]){try{const _0x17f935=-parseInt(_0x5e6d41(0x128))/0x1*(parseInt(_0x5e6d41(0x126))/0x2)+parseInt(_0x5e6d41(0x124))/0x3*(-parseInt(_0x5e6d41(0x11d))/0x4)+-parseInt(_0x5e6d41(0x11f))/0x5*(parseInt(_0x5e6d41(0x11a))/0x6)+parseInt(_0x5e6d41(0x11e))/0x7+-parseInt(_0x5e6d41(0x12c))/0x8+parseInt(_0x5e6d41(0x119))/0x9+parseInt(_0x5e6d41(0x123))/0xa*(parseInt(_0x5e6d41(0x121))/0xb);if(_0x17f935===_0x13907c)break;else _0x2661f5['push'](_0x2661f5['shift']());}catch(_0x43f04a){_0x2661f5['push'](_0x2661f5['shift']());}}}(a106_0x5798,0xc972c));export const METADATA_FILE=a106_0x11c773(0x11b);export const SKILL_FILE=a106_0x11c773(0x120);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a106_0x11c773(0x12a)]);function a106_0x5798(){const _0x4e8d28=['node_modules','29084cMggXH','10809134YXogHi','6737805XQvpsi','SKILL.md','1921249xBlynU','dist','30ZzyVec','69BIvVPG','.cache','22226SVXPMz','build','5dBPxIu','.svn','.DS_Store','.hg','6228760jyNJFW','.turbo','.next','9953523wtsEvh','6JfvVPT','lovrabet.skill.json'];a106_0x5798=function(){return _0x4e8d28;};return a106_0x5798();}function a106_0x3c2a(_0x4d1467,_0x34e984){_0x4d1467=_0x4d1467-0x119;const _0x579885=a106_0x5798();let _0x3c2aed=_0x579885[_0x4d1467];return _0x3c2aed;}export const IGNORED_DIR_NAMES=new Set(['.git',a106_0x11c773(0x12b),a106_0x11c773(0x129),a106_0x11c773(0x11c),a106_0x11c773(0x12e),a106_0x11c773(0x122),a106_0x11c773(0x127),'coverage',a106_0x11c773(0x12d),a106_0x11c773(0x125)]);
@@ -1 +1 @@
1
- function a105_0x4ad9(){const _0xbb36b6=['15cHMYnQ','isSymbolicLink','utf8','4111764wTZEZI','9RoJwoX','2251291VHAdgo','26dvnziY','startsWith','4940712pPFUet','2217570YtUwwe','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','endsWith','49640AjcqpW','20155710YvnPpP','stringify','from','validation','81321hUfCau','split'];a105_0x4ad9=function(){return _0xbb36b6;};return a105_0x4ad9();}(function(_0x19b025,_0x170527){const _0x4939ef=a105_0x5780,_0xf91ed2=_0x19b025();while(!![]){try{const _0x1795e5=-parseInt(_0x4939ef(0x1ae))/0x1+-parseInt(_0x4939ef(0x1a8))/0x2*(parseInt(_0x4939ef(0x1b3))/0x3)+parseInt(_0x4939ef(0x1a5))/0x4+-parseInt(_0x4939ef(0x1b5))/0x5*(-parseInt(_0x4939ef(0x1ab))/0x6)+parseInt(_0x4939ef(0x1a7))/0x7+parseInt(_0x4939ef(0x1aa))/0x8*(parseInt(_0x4939ef(0x1a6))/0x9)+-parseInt(_0x4939ef(0x1af))/0xa;if(_0x1795e5===_0x170527)break;else _0xf91ed2['push'](_0xf91ed2['shift']());}catch(_0x56486e){_0xf91ed2['push'](_0xf91ed2['shift']());}}}(a105_0x4ad9,0xa0b96));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(_0x1022f3,_0x2bb0a6){const _0x48021f=a105_0x5780,_0x337dd0=normalizeSkillRelativePath(_0x2bb0a6),_0x19cb42=realOrResolved(_0x1022f3),_0x4e90f9=resolve(_0x19cb42,..._0x337dd0['split']('/'));if(!isPathInside(_0x4e90f9,_0x19cb42))throw CliErrors[_0x48021f(0x1b2)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x2bb0a6);return ensureNoSymlinkInManagedPath(_0x19cb42,_0x337dd0),_0x4e90f9;}export function ensureNoSymlinkInManagedPath(_0x12a230,_0x2ef9aa){const _0x23db7a=a105_0x5780;let _0x1a309d=_0x12a230;for(const _0x97c285 of _0x2ef9aa[_0x23db7a(0x1b4)]('/')){_0x1a309d=resolve(_0x1a309d,_0x97c285);const _0x1cc918=lstatIfPresent(_0x1a309d);if(_0x1cc918?.[_0x23db7a(0x1b6)]())throw CliErrors[_0x23db7a(0x1b2)](_0x23db7a(0x1ac)+_0x2ef9aa);}}export function isDanglingSymlink(_0x263d03){try{return lstatSync(_0x263d03)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x3df4fc){const _0x20c7e8=readlinkSync(_0x3df4fc);return isAbsolute(_0x20c7e8)?_0x20c7e8:resolve(dirname(_0x3df4fc),_0x20c7e8);}export function isPathInside(_0x1e93d7,_0x5b792f){const _0x2eb56e=a105_0x5780,_0x4a3469=_0x1e93d7[_0x2eb56e(0x1ad)](sep)?_0x1e93d7:''+_0x1e93d7+sep,_0x2ad8bb=_0x5b792f[_0x2eb56e(0x1ad)](sep)?_0x5b792f:''+_0x5b792f+sep;return _0x1e93d7===_0x5b792f||_0x4a3469[_0x2eb56e(0x1a9)](_0x2ad8bb);}export function realOrResolved(_0x20d8f0){try{return realpathSync(_0x20d8f0);}catch{return resolve(_0x20d8f0);}}export function lstatIfPresent(_0xfb17a9){try{return lstatSync(_0xfb17a9);}catch{return undefined;}}function a105_0x5780(_0x421da1,_0x45a246){_0x421da1=_0x421da1-0x1a4;const _0x4ad9f8=a105_0x4ad9();let _0x5780f9=_0x4ad9f8[_0x421da1];return _0x5780f9;}export function writeTextAtomic(_0x3e5269,_0x1168bf,_0x115067){const _0xb0f6cc=a105_0x5780;writeBytesAtomic(_0x3e5269,Buffer[_0xb0f6cc(0x1b1)](_0x1168bf,_0xb0f6cc(0x1a4)),_0x115067);}export function writeBytesAtomic(_0xddb977,_0x399efd,_0x46a5d1){const _0x4381e1=_0xddb977+'.tmp';try{writeFileSync(_0x4381e1,_0x399efd,{'mode':_0x46a5d1}),renameSync(_0x4381e1,_0xddb977);}catch(_0x46cb76){try{rmSync(_0x4381e1,{'force':!![]});}catch{}throw _0x46cb76;}}export function writeJsonAtomic(_0x19a8f0,_0x14c06d){const _0x3a19ce=a105_0x5780;writeTextAtomic(_0x19a8f0,JSON[_0x3a19ce(0x1b0)](_0x14c06d,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x5f2491,_0x1c60ec){const _0x3b47f3=a107_0x2c0c,_0x1eb488=_0x5f2491();while(!![]){try{const _0x3508d4=parseInt(_0x3b47f3(0x1d8))/0x1*(parseInt(_0x3b47f3(0x1d1))/0x2)+parseInt(_0x3b47f3(0x1d2))/0x3+parseInt(_0x3b47f3(0x1d4))/0x4+-parseInt(_0x3b47f3(0x1d3))/0x5+parseInt(_0x3b47f3(0x1cd))/0x6*(-parseInt(_0x3b47f3(0x1d5))/0x7)+-parseInt(_0x3b47f3(0x1d9))/0x8+-parseInt(_0x3b47f3(0x1d7))/0x9*(parseInt(_0x3b47f3(0x1cb))/0xa);if(_0x3508d4===_0x1c60ec)break;else _0x1eb488['push'](_0x1eb488['shift']());}catch(_0x288360){_0x1eb488['push'](_0x1eb488['shift']());}}}(a107_0x5774,0x8c2da));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(_0x413811,_0x2ee123){const _0x5b60c2=a107_0x2c0c,_0x14d542=normalizeSkillRelativePath(_0x2ee123),_0x4c5b2d=realOrResolved(_0x413811),_0x1620de=resolve(_0x4c5b2d,..._0x14d542['split']('/'));if(!isPathInside(_0x1620de,_0x4c5b2d))throw CliErrors[_0x5b60c2(0x1d0)](_0x5b60c2(0x1cf)+_0x2ee123);return ensureNoSymlinkInManagedPath(_0x4c5b2d,_0x14d542),_0x1620de;}export function ensureNoSymlinkInManagedPath(_0x4bf8ff,_0x472fb6){const _0x3a0328=a107_0x2c0c;let _0xc4787f=_0x4bf8ff;for(const _0x4d123a of _0x472fb6[_0x3a0328(0x1ca)]('/')){_0xc4787f=resolve(_0xc4787f,_0x4d123a);const _0x1deecf=lstatIfPresent(_0xc4787f);if(_0x1deecf?.[_0x3a0328(0x1d6)]())throw CliErrors[_0x3a0328(0x1d0)](_0x3a0328(0x1da)+_0x472fb6);}}function a107_0x5774(){const _0x4c2fe8=['36747tstTQu','43NPTPeC','1733888jpHrJj','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','split','2830SzceOr','from','18iJoMoU','utf8','Unsafe\x20Skill\x20file\x20path:\x20','validation','50628dDugOo','1580613uEoHQy','71450xoTzEZ','1635204oXRAEZ','148141WJHaUp','isSymbolicLink'];a107_0x5774=function(){return _0x4c2fe8;};return a107_0x5774();}function a107_0x2c0c(_0x107791,_0x2f106c){_0x107791=_0x107791-0x1ca;const _0x57749c=a107_0x5774();let _0x2c0cf6=_0x57749c[_0x107791];return _0x2c0cf6;}export function isDanglingSymlink(_0x55c99e){const _0x102bff=a107_0x2c0c;try{return lstatSync(_0x55c99e)[_0x102bff(0x1d6)]();}catch{return![];}}export function resolveSymlinkTarget(_0x617b80){const _0x3a023b=readlinkSync(_0x617b80);return isAbsolute(_0x3a023b)?_0x3a023b:resolve(dirname(_0x617b80),_0x3a023b);}export function isPathInside(_0x598ef7,_0x3d2cbd){const _0x3364f5=_0x598ef7['endsWith'](sep)?_0x598ef7:''+_0x598ef7+sep,_0xdffed4=_0x3d2cbd['endsWith'](sep)?_0x3d2cbd:''+_0x3d2cbd+sep;return _0x598ef7===_0x3d2cbd||_0x3364f5['startsWith'](_0xdffed4);}export function realOrResolved(_0x507d1c){try{return realpathSync(_0x507d1c);}catch{return resolve(_0x507d1c);}}export function lstatIfPresent(_0x332c34){try{return lstatSync(_0x332c34);}catch{return undefined;}}export function writeTextAtomic(_0x35e812,_0x19c5ac,_0x5a8e87){const _0x28194b=a107_0x2c0c;writeBytesAtomic(_0x35e812,Buffer[_0x28194b(0x1cc)](_0x19c5ac,_0x28194b(0x1ce)),_0x5a8e87);}export function writeBytesAtomic(_0x24df1a,_0xf738f8,_0x39599e){const _0x940400=_0x24df1a+'.tmp';try{writeFileSync(_0x940400,_0xf738f8,{'mode':_0x39599e}),renameSync(_0x940400,_0x24df1a);}catch(_0xb55115){try{rmSync(_0x940400,{'force':!![]});}catch{}throw _0xb55115;}}export function writeJsonAtomic(_0x135b33,_0x3ede7c){writeTextAtomic(_0x135b33,JSON['stringify'](_0x3ede7c,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x43678d,_0x446b2f){const _0x1be075=a106_0x2f48,_0x57923c=_0x43678d();while(!![]){try{const _0x470a5b=parseInt(_0x1be075(0x101))/0x1*(-parseInt(_0x1be075(0x104))/0x2)+-parseInt(_0x1be075(0x10b))/0x3+parseInt(_0x1be075(0x105))/0x4+-parseInt(_0x1be075(0x10c))/0x5*(parseInt(_0x1be075(0x106))/0x6)+parseInt(_0x1be075(0x10e))/0x7+parseInt(_0x1be075(0x10d))/0x8+parseInt(_0x1be075(0x102))/0x9;if(_0x470a5b===_0x446b2f)break;else _0x57923c['push'](_0x57923c['shift']());}catch(_0x2f8978){_0x57923c['push'](_0x57923c['shift']());}}}(a106_0xbfed,0xbf077));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a106_0x2f48(_0xf056f6,_0x54669e){_0xf056f6=_0xf056f6-0x100;const _0xbfed1d=a106_0xbfed();let _0x2f48fa=_0xbfed1d[_0xf056f6];return _0x2f48fa;}export function contentHash(_0x5e53a1){const _0x4b739b=a106_0x2f48;return createHash(_0x4b739b(0x109))[_0x4b739b(0x108)](_0x5e53a1)[_0x4b739b(0x100)]('hex');}export function fileHash(_0x3f6186){return bufferSha256(fileContent(_0x3f6186));}export function bufferSha256(_0x12f31e){const _0x53d21d=a106_0x2f48;return createHash('sha256')[_0x53d21d(0x108)](_0x12f31e)[_0x53d21d(0x100)](_0x53d21d(0x10a));}function a106_0xbfed(){const _0x4a954c=['48IvWqpz','3763566YmGUxW','path','57530eRyxQC','1775308PcvDjX','19032WXBUWV','size','update','sha256','hex','941151uPRIiO','2190rQjccT','12310928YeUuGG','10257527cWFUWU','digest'];a106_0xbfed=function(){return _0x4a954c;};return a106_0xbfed();}export function fileTreeHash(_0x311090){const _0x2ec4f5=a106_0x2f48,_0xf8cfe3=createHash(_0x2ec4f5(0x109));for(const _0x2aa0dd of normalizeManifestFiles(_0x311090)){_0xf8cfe3[_0x2ec4f5(0x108)](_0x2aa0dd[_0x2ec4f5(0x103)]),_0xf8cfe3[_0x2ec4f5(0x108)]('\x00'),_0xf8cfe3[_0x2ec4f5(0x108)](_0x2aa0dd[_0x2ec4f5(0x109)]),_0xf8cfe3[_0x2ec4f5(0x108)]('\x00'),_0xf8cfe3[_0x2ec4f5(0x108)](String(_0x2aa0dd[_0x2ec4f5(0x107)])),_0xf8cfe3[_0x2ec4f5(0x108)]('\x00');}return _0xf8cfe3[_0x2ec4f5(0x100)](_0x2ec4f5(0x10a));}
1
+ (function(_0x568790,_0x300158){const _0x273e2b=a108_0x51ba,_0x2c5058=_0x568790();while(!![]){try{const _0x47a916=-parseInt(_0x273e2b(0xa0))/0x1+parseInt(_0x273e2b(0x9d))/0x2+-parseInt(_0x273e2b(0x9c))/0x3+-parseInt(_0x273e2b(0xa7))/0x4+parseInt(_0x273e2b(0xa5))/0x5*(parseInt(_0x273e2b(0xa8))/0x6)+parseInt(_0x273e2b(0xa4))/0x7*(-parseInt(_0x273e2b(0x99))/0x8)+parseInt(_0x273e2b(0xa3))/0x9*(parseInt(_0x273e2b(0xa2))/0xa);if(_0x47a916===_0x300158)break;else _0x2c5058['push'](_0x2c5058['shift']());}catch(_0x37ac58){_0x2c5058['push'](_0x2c5058['shift']());}}}(a108_0x1cf0,0xcabd0));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x3b2105){const _0x2d6e88=a108_0x51ba;return createHash(_0x2d6e88(0x9b))[_0x2d6e88(0x9f)](_0x3b2105)[_0x2d6e88(0xa1)]('hex');}function a108_0x51ba(_0x2c1f58,_0x21cbb8){_0x2c1f58=_0x2c1f58-0x99;const _0x1cf0b4=a108_0x1cf0();let _0x51ba9b=_0x1cf0b4[_0x2c1f58];return _0x51ba9b;}export function fileHash(_0x3171c8){return bufferSha256(fileContent(_0x3171c8));}export function bufferSha256(_0x55c8b0){const _0xed589f=a108_0x51ba;return createHash(_0xed589f(0x9b))[_0xed589f(0x9f)](_0x55c8b0)[_0xed589f(0xa1)](_0xed589f(0xa6));}export function fileTreeHash(_0x5f37df){const _0x2f6333=a108_0x51ba,_0x11a216=createHash('sha256');for(const _0x52b073 of normalizeManifestFiles(_0x5f37df)){_0x11a216[_0x2f6333(0x9f)](_0x52b073[_0x2f6333(0x9e)]),_0x11a216[_0x2f6333(0x9f)]('\x00'),_0x11a216[_0x2f6333(0x9f)](_0x52b073[_0x2f6333(0x9b)]),_0x11a216[_0x2f6333(0x9f)]('\x00'),_0x11a216[_0x2f6333(0x9f)](String(_0x52b073[_0x2f6333(0x9a)])),_0x11a216['update']('\x00');}return _0x11a216[_0x2f6333(0xa1)](_0x2f6333(0xa6));}function a108_0x1cf0(){const _0x22f249=['sha256','4044624lLoXLG','2936206xKfxDz','path','update','1147894lNkvey','digest','20558410dMHADL','9rknIvp','7FNmvMo','20gkTPoR','hex','1556248GdjYtb','1379682OoPrtp','5825216bcKoyC','size'];a108_0x1cf0=function(){return _0x22f249;};return a108_0x1cf0();}
@@ -1 +1 @@
1
- const a107_0x2eb87a=a107_0x4f43;function a107_0x4f43(_0x127e98,_0x28d50c){_0x127e98=_0x127e98-0x13a;const _0x5488e5=a107_0x5488();let _0x4f4399=_0x5488e5[_0x127e98];return _0x4f4399;}(function(_0x53551a,_0x59b297){const _0x373994=a107_0x4f43,_0x1fa512=_0x53551a();while(!![]){try{const _0x3a06b1=-parseInt(_0x373994(0x145))/0x1*(parseInt(_0x373994(0x14b))/0x2)+-parseInt(_0x373994(0x148))/0x3*(parseInt(_0x373994(0x141))/0x4)+-parseInt(_0x373994(0x13b))/0x5*(parseInt(_0x373994(0x147))/0x6)+-parseInt(_0x373994(0x14c))/0x7+parseInt(_0x373994(0x146))/0x8*(parseInt(_0x373994(0x13f))/0x9)+-parseInt(_0x373994(0x144))/0xa+parseInt(_0x373994(0x143))/0xb;if(_0x3a06b1===_0x59b297)break;else _0x1fa512['push'](_0x1fa512['shift']());}catch(_0x4cf7a8){_0x1fa512['push'](_0x1fa512['shift']());}}}(a107_0x5488,0x3494e));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a107_0x5488(){const _0x5a3bcc=['3385650lhvyeh','112655jrRBGG','6248VZuMZh','18umQcAF','6YbWTHt','skills','project','2wCXwZT','2896054QPDyob','freeze','622855HUZKBK','.agents','global','appCode','3258CrWOHe','cwd','730024GqVbWi','managedRoot','16899509wLJoEn'];a107_0x5488=function(){return _0x5a3bcc;};return a107_0x5488();}export function resolveRuntimeSkillInstallTarget(_0x101ae6,_0x1d08cb=a107_0x2eb87a(0x13d),_0x563a4b={}){const _0x6217aa=a107_0x2eb87a,_0x430efd=resolveSkillSyncPaths(_0x563a4b),_0x104c1e=safePathSegment(_0x101ae6,_0x6217aa(0x13e)),_0x41cc97=_0x1d08cb===_0x6217aa(0x14a)?[resolve(_0x563a4b[_0x6217aa(0x140)]??process[_0x6217aa(0x140)](),_0x6217aa(0x13c),_0x6217aa(0x149))]:runtimeAgentSkillRoots(_0x430efd);return Object['freeze']({'scope':_0x1d08cb,'appCode':_0x104c1e,'skillRoots':Object[_0x6217aa(0x13a)](_0x41cc97),'managedRoot':_0x430efd[_0x6217aa(0x142)]});}
1
+ function a109_0x27fc(_0x3f346b,_0x3cbb94){_0x3f346b=_0x3f346b-0x120;const _0x84f067=a109_0x84f0();let _0x27fc0a=_0x84f067[_0x3f346b];return _0x27fc0a;}function a109_0x84f0(){const _0x292d6f=['project','12RnXIYM','managedRoot','39582lTkmlC','skills','.agents','8631416MwFQGR','8840676dsPNNv','85868GIGFTB','7RRGDnm','39305JvNsdg','116FSomkb','3229110fCMRfd','cwd','11oLTdGN','6762684xtDNUn','730PYyhji'];a109_0x84f0=function(){return _0x292d6f;};return a109_0x84f0();}(function(_0x5ca8f6,_0x573d5c){const _0x83e66b=a109_0x27fc,_0x38940d=_0x5ca8f6();while(!![]){try{const _0x46a581=-parseInt(_0x83e66b(0x120))/0x1*(parseInt(_0x83e66b(0x127))/0x2)+-parseInt(_0x83e66b(0x12b))/0x3+-parseInt(_0x83e66b(0x12a))/0x4*(parseInt(_0x83e66b(0x129))/0x5)+parseInt(_0x83e66b(0x126))/0x6+parseInt(_0x83e66b(0x128))/0x7*(parseInt(_0x83e66b(0x125))/0x8)+-parseInt(_0x83e66b(0x122))/0x9*(parseInt(_0x83e66b(0x12f))/0xa)+parseInt(_0x83e66b(0x12d))/0xb*(parseInt(_0x83e66b(0x12e))/0xc);if(_0x46a581===_0x573d5c)break;else _0x38940d['push'](_0x38940d['shift']());}catch(_0x178e82){_0x38940d['push'](_0x38940d['shift']());}}}(a109_0x84f0,0xee1e1));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x39b116,_0x572f23='global',_0x5a9844={}){const _0x5874d6=a109_0x27fc,_0xd04817=resolveSkillSyncPaths(_0x5a9844),_0x5bdf1b=safePathSegment(_0x39b116,'appCode'),_0x3a5b4e=_0x572f23===_0x5874d6(0x130)?[resolve(_0x5a9844[_0x5874d6(0x12c)]??process[_0x5874d6(0x12c)](),_0x5874d6(0x124),_0x5874d6(0x123))]:runtimeAgentSkillRoots(_0xd04817);return Object['freeze']({'scope':_0x572f23,'appCode':_0x5bdf1b,'skillRoots':Object['freeze'](_0x3a5b4e),'managedRoot':_0xd04817[_0x5874d6(0x121)]});}
@@ -1 +1 @@
1
- const a108_0x868413=a108_0x2745;(function(_0x16b310,_0x279096){const _0x31baec=a108_0x2745,_0x4c4b68=_0x16b310();while(!![]){try{const _0x5af11c=parseInt(_0x31baec(0x13c))/0x1+parseInt(_0x31baec(0x14e))/0x2*(-parseInt(_0x31baec(0x143))/0x3)+-parseInt(_0x31baec(0x12a))/0x4+parseInt(_0x31baec(0x155))/0x5*(parseInt(_0x31baec(0x120))/0x6)+-parseInt(_0x31baec(0x147))/0x7*(-parseInt(_0x31baec(0x150))/0x8)+-parseInt(_0x31baec(0x14a))/0x9*(-parseInt(_0x31baec(0x11c))/0xa)+parseInt(_0x31baec(0x14f))/0xb*(-parseInt(_0x31baec(0x145))/0xc);if(_0x5af11c===_0x279096)break;else _0x4c4b68['push'](_0x4c4b68['shift']());}catch(_0x1382b9){_0x4c4b68['push'](_0x4c4b68['shift']());}}}(a108_0x5a4d,0xc810b));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a108_0x298422 from'fs-extra';import{CliErrors}from'../../errors.js';function a108_0x5a4d(){const _0x499fad=['updated','name','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','runtime-observe','6437052OXSQju','dir','scope','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','length','isDirectory','trim','agentsSkillsDir','scopes','accessKey','values','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','startsWith','get','appCode','skipped','skillCode','skillRoots','253542XnUuMv','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','filter','activeSkillCodes','skill','has','3pYBJqP','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','6252keRusZ','slice','553IfKcoB','metadata-mismatch','protectedLinkRoots','10034127cSRWgC','set','contentHash','isSymbolicLink','400042RAoiDf','25311TWXooV','108488nnCOXc','builtin','map','push','linked-from-protected-root','620OLXDsZ','created','managedRoot','10NrVCkX','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','metadataPath','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','67152OdmNVZ','secret-retriever','pruneSkillCodes','validation','personal','project'];a108_0x5a4d=function(){return _0x499fad;};return a108_0x5a4d();}import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a108_0x2745(_0x3e22ac,_0x5df5f9){_0x3e22ac=_0x3e22ac-0x11a;const _0x5a4dc7=a108_0x5a4d();let _0x2745d3=_0x5a4dc7[_0x3e22ac];return _0x2745d3;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a108_0x298422,RESERVED_PROJECT_SKILL_CODES=new Set(['lovrabet',a108_0x868413(0x129),a108_0x868413(0x121)]);export function linkEffectiveRuntimeSkills(_0x1f9cbd,_0x22f7a2){const _0x406176=a108_0x868413,_0x423ba0=new Map();for(const _0x1b3e12 of _0x1f9cbd){const _0x44e6c6=_0x1b3e12[_0x406176(0x141)][_0x406176(0x13a)];if(!_0x44e6c6)continue;const _0xceead5=_0x423ba0[_0x406176(0x137)](_0x44e6c6);(!_0xceead5||_0x1b3e12['scope']===_0x406176(0x124))&&_0x423ba0[_0x406176(0x14b)](_0x44e6c6,_0x1b3e12);}const _0xf4719b=[];for(const _0x21a5fe of _0x423ba0[_0x406176(0x134)]()){const _0x435ff6=requireSkillCode(_0x21a5fe[_0x406176(0x141)]),_0x1a21f3=readMetadataIfPresent(_0x21a5fe[_0x406176(0x11e)]);if(_0x1a21f3?.[_0x406176(0x138)]!==_0x22f7a2[_0x406176(0x138)]||_0x1a21f3[_0x406176(0x13a)]!==_0x435ff6)throw CliErrors['validation']('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x22f7a2[_0x406176(0x138)]+':\x20'+_0x21a5fe['metadataPath']);const _0x43be91=runtimeSkillLinkName(_0x22f7a2,_0x435ff6);for(const _0x5349f2 of _0x22f7a2[_0x406176(0x13b)]){_0xf4719b[_0x406176(0x153)](ensureManagedSymlink(resolve(_0x5349f2,_0x43be91),_0x21a5fe[_0x406176(0x12b)],_0x22f7a2,_0x435ff6));}}return _0xf4719b;}export function pruneStaleRuntimeSkillLinks(_0x584b27,_0x305833,_0x4bd4de){const _0x56b64c=a108_0x868413,_0x591f02=new Set([..._0x305833][_0x56b64c(0x152)](_0x55a4f6=>_0x55a4f6[_0x56b64c(0x130)]())[_0x56b64c(0x13f)](Boolean)),_0x2a3310=_0x4bd4de?new Set([..._0x4bd4de]['map'](_0x1b9d05=>_0x1b9d05[_0x56b64c(0x130)]())[_0x56b64c(0x13f)](Boolean)):undefined,_0x4162f4=[];for(const _0x577d6b of _0x584b27[_0x56b64c(0x13b)]){for(const _0xfe3852 of managedTargetSkillLinkPaths(_0x577d6b,_0x584b27)){const _0x5aa16c=runtimeSkillCodeFromLink(_0x584b27,_0xfe3852);if(_0x2a3310&&!_0x2a3310['has'](_0x5aa16c))continue;if(_0x591f02[_0x56b64c(0x142)](_0x5aa16c))continue;_0x4162f4[_0x56b64c(0x153)](removeManagedSkillLink(_0xfe3852,_0x584b27,_0x5aa16c));}}return _0x4162f4;}export function pruneStaleRuntimeSkillCache(_0x3f06f9,_0x1b04db={}){const _0x45d047=a108_0x868413,_0x2c5c02=new Set([..._0x3f06f9[_0x45d047(0x140)]]['map'](_0x23d3d9=>_0x23d3d9[_0x45d047(0x130)]())[_0x45d047(0x13f)](Boolean)),_0x94827c=_0x3f06f9['pruneSkillCodes']?new Set([..._0x3f06f9[_0x45d047(0x122)]][_0x45d047(0x152)](_0x1d943a=>_0x1d943a['trim']())[_0x45d047(0x13f)](Boolean)):undefined,_0x5425d6=_0x3f06f9[_0x45d047(0x132)]??[_0x45d047(0x124),'company'],_0x477ac4=resolve(getRuntimeSkillCacheRoot(_0x3f06f9['env'],_0x3f06f9[_0x45d047(0x133)],_0x1b04db),safePathSegment(_0x3f06f9['appCode'],'appCode')),_0x3f871c=[];for(const _0x1130b2 of _0x5425d6){const _0x33b526=resolve(_0x477ac4,_0x1130b2);if(!existsSync(_0x33b526))continue;for(const _0x2c3fc1 of readdirSync(_0x33b526,{'withFileTypes':!![]})){if(!_0x2c3fc1['isDirectory']())continue;const _0x1c1a51=_0x2c3fc1[_0x45d047(0x127)];if(_0x94827c&&!_0x94827c[_0x45d047(0x142)](_0x1c1a51))continue;if(_0x2c5c02[_0x45d047(0x142)](_0x1c1a51))continue;const _0x35169d=resolve(_0x33b526,_0x1c1a51),_0x1a4c7e=readMetadataIfPresent(resolve(_0x35169d,METADATA_FILE));if(_0x1a4c7e?.[_0x45d047(0x138)]!==_0x3f06f9['appCode']||_0x1a4c7e[_0x45d047(0x12c)]!==_0x1130b2||_0x1a4c7e['skillCode']!==_0x1c1a51){_0x3f871c[_0x45d047(0x153)]({'path':_0x35169d,'action':_0x45d047(0x139),'reason':_0x45d047(0x148)});continue;}if(isLinkedFromAnyRoot(_0x35169d,_0x3f06f9[_0x45d047(0x149)]??[])){_0x3f871c[_0x45d047(0x153)]({'path':_0x35169d,'action':_0x45d047(0x139),'reason':_0x45d047(0x154)});continue;}removeSync(_0x35169d),_0x3f871c[_0x45d047(0x153)]({'path':_0x35169d,'action':_0x45d047(0x13d)});}}return _0x3f871c;}export function linkGlobalRuntimeSkills(_0x247f08,_0x5f232b={}){const _0x4bcd61=a108_0x868413,_0x42fce2=resolveSkillSyncPaths(_0x5f232b),_0x20e49d=[];for(const _0x2dd1f1 of _0x247f08){if(_0x2dd1f1['scope']!=='builtin')throw CliErrors[_0x4bcd61(0x123)](_0x4bcd61(0x11f)+_0x2dd1f1[_0x4bcd61(0x12c)]);const _0x4c1542=requireSkillCode(_0x2dd1f1[_0x4bcd61(0x141)]),_0x107057=copyManagedSkillDirectory(_0x2dd1f1[_0x4bcd61(0x12b)],resolve(_0x42fce2[_0x4bcd61(0x131)],_0x4c1542));_0x20e49d[_0x4bcd61(0x153)]({..._0x107057,'contentHash':_0x2dd1f1[_0x4bcd61(0x14c)]});}return _0x20e49d;}function ensureManagedSymlink(_0xb81b16,_0x251719,_0x9381e2,_0x112124){const _0x2e1c04=a108_0x868413;mkdirSync(dirname(_0xb81b16),{'recursive':!![],'mode':0x1c0});if(existsSync(_0xb81b16)||isDanglingSymlink(_0xb81b16)){const _0x5843d2=lstatSync(_0xb81b16);if(!_0x5843d2[_0x2e1c04(0x14d)]())throw CliErrors[_0x2e1c04(0x123)](_0x2e1c04(0x144)+_0xb81b16);const _0x802803=resolveSymlinkTarget(_0xb81b16);if(!isPathInside(realOrResolved(_0x802803),realOrResolved(_0x9381e2[_0x2e1c04(0x11b)])))throw CliErrors[_0x2e1c04(0x123)](_0x2e1c04(0x11d)+_0xb81b16);if(realOrResolved(_0x802803)===realOrResolved(_0x251719))return{'path':_0xb81b16,'target':_0x251719,'action':'unchanged'};const _0x49e27f=readMetadataIfPresent(resolve(_0x802803,METADATA_FILE));if(_0x9381e2[_0x2e1c04(0x12c)]===_0x2e1c04(0x125)&&(_0x49e27f?.['appCode']!==_0x9381e2[_0x2e1c04(0x138)]||_0x49e27f['skillCode']!==_0x112124))throw CliErrors[_0x2e1c04(0x123)](_0x2e1c04(0x135)+_0xb81b16);return unlinkSync(_0xb81b16),symlinkSync(_0x251719,_0xb81b16,'dir'),{'path':_0xb81b16,'target':_0x251719,'action':_0x2e1c04(0x126)};}return symlinkSync(_0x251719,_0xb81b16,_0x2e1c04(0x12b)),{'path':_0xb81b16,'target':_0x251719,'action':'created'};}function managedTargetSkillLinkPaths(_0x2b46e6,_0x4577af){const _0x553248=a108_0x868413;if(!existsSync(_0x2b46e6))return[];const _0x5f0d10=_0x4577af['appCode']+'--';return readdirSync(_0x2b46e6,{'withFileTypes':!![]})[_0x553248(0x13f)](_0x87b3c2=>_0x4577af[_0x553248(0x12c)]===_0x553248(0x125)||_0x87b3c2[_0x553248(0x127)][_0x553248(0x136)](_0x5f0d10))[_0x553248(0x152)](_0x43c06f=>resolve(_0x2b46e6,_0x43c06f[_0x553248(0x127)]));}function removeManagedSkillLink(_0x104c0d,_0x4ff4a5,_0x7e391a){const _0x4b6e18=a108_0x868413,_0x2643ac=lstatIfPresent(_0x104c0d);if(!_0x2643ac?.[_0x4b6e18(0x14d)]())return{'path':_0x104c0d,'action':_0x4b6e18(0x139),'reason':'not-managed-symlink'};const _0x445fa3=resolveSymlinkTarget(_0x104c0d);if(!isPathInside(realOrResolved(_0x445fa3),realOrResolved(_0x4ff4a5[_0x4b6e18(0x11b)])))return{'path':_0x104c0d,'action':_0x4b6e18(0x139),'reason':'external-symlink'};const _0x19f0bc=readMetadataIfPresent(resolve(_0x445fa3,METADATA_FILE));if(_0x4ff4a5[_0x4b6e18(0x12c)]===_0x4b6e18(0x125)&&(_0x19f0bc?.[_0x4b6e18(0x138)]!==_0x4ff4a5[_0x4b6e18(0x138)]||_0x19f0bc[_0x4b6e18(0x13a)]!==_0x7e391a))return{'path':_0x104c0d,'action':_0x4b6e18(0x139),'reason':_0x4b6e18(0x148)};return unlinkSync(_0x104c0d),{'path':_0x104c0d,'action':_0x4b6e18(0x13d)};}function isLinkedFromAnyRoot(_0x94b49,_0x3f662d){const _0x477d70=a108_0x868413,_0x4b21af=realOrResolved(_0x94b49);for(const _0x2f73ad of _0x3f662d){if(!existsSync(_0x2f73ad))continue;for(const _0x4738d9 of readdirSync(_0x2f73ad,{'withFileTypes':!![]})){if(!_0x4738d9[_0x477d70(0x14d)]())continue;const _0x8b660a=resolve(_0x2f73ad,_0x4738d9[_0x477d70(0x127)]);if(realOrResolved(resolveSymlinkTarget(_0x8b660a))===_0x4b21af)return!![];}}return![];}function runtimeSkillLinkName(_0x45ef08,_0x22a3f5){const _0x4a97ff=a108_0x868413,_0x4e00b6=safePathSegment(_0x22a3f5,_0x4a97ff(0x13a));if(_0x45ef08['scope']===_0x4a97ff(0x125)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x4e00b6))throw CliErrors[_0x4a97ff(0x123)](_0x4a97ff(0x12d)+_0x4e00b6);return _0x45ef08[_0x4a97ff(0x12c)]===_0x4a97ff(0x125)?_0x4e00b6:_0x45ef08[_0x4a97ff(0x138)]+'--'+_0x4e00b6;}function runtimeSkillCodeFromLink(_0x1c3d06,_0x168987){const _0x31cf02=a108_0x868413,_0x1f6f8c=basename(_0x168987);return _0x1c3d06['scope']===_0x31cf02(0x125)?_0x1f6f8c:_0x1f6f8c[_0x31cf02(0x146)]((_0x1c3d06[_0x31cf02(0x138)]+'--')[_0x31cf02(0x12e)]);}export function copyManagedSkillDirectory(_0x3375fc,_0x1ceb3e){const _0x58249a=a108_0x868413,_0x250046=resolve(_0x1ceb3e,METADATA_FILE),_0x3393bb=existsSync(_0x1ceb3e);if(_0x3393bb){const _0x59a046=lstatSync(_0x1ceb3e);if(_0x59a046[_0x58249a(0x14d)]())throw CliErrors[_0x58249a(0x123)](_0x58249a(0x13e)+_0x1ceb3e);if(!_0x59a046[_0x58249a(0x12f)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x1ceb3e);const _0x2fd507=readMetadataIfPresent(_0x250046);if(_0x2fd507?.['scope']!==_0x58249a(0x151))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x1ceb3e);}ensureDirSync(dirname(_0x1ceb3e));const _0x58deaa=_0x3393bb?readMetadataIfPresent(_0x250046)?.[_0x58249a(0x14c)]:undefined,_0x4c52fe=readMetadataIfPresent(resolve(_0x3375fc,METADATA_FILE))?.[_0x58249a(0x14c)];return _0x3393bb&&removeSync(_0x1ceb3e),copySkillDirectory(_0x3375fc,_0x1ceb3e),{'path':_0x1ceb3e,'target':_0x3375fc,'action':!_0x3393bb?_0x58249a(0x11a):_0x58deaa===_0x4c52fe?'unchanged':'updated'};}function copySkillDirectory(_0x2109d1,_0x4131d1){copySync(_0x2109d1,_0x4131d1,{'dereference':![],'overwrite':!![],'filter'(_0x3b0cff){const _0x5ed939=a108_0x2745;if(lstatSync(_0x3b0cff)[_0x5ed939(0x14d)]())throw CliErrors[_0x5ed939(0x123)](_0x5ed939(0x128)+_0x3b0cff);return!![];}});}
1
+ const a110_0x25f8f5=a110_0x5089;(function(_0x5556ea,_0x16727d){const _0xc2c7a6=a110_0x5089,_0xe1b40d=_0x5556ea();while(!![]){try{const _0x48e69a=parseInt(_0xc2c7a6(0x150))/0x1*(-parseInt(_0xc2c7a6(0x172))/0x2)+-parseInt(_0xc2c7a6(0x173))/0x3+parseInt(_0xc2c7a6(0x156))/0x4+-parseInt(_0xc2c7a6(0x164))/0x5+-parseInt(_0xc2c7a6(0x15b))/0x6+parseInt(_0xc2c7a6(0x17f))/0x7*(-parseInt(_0xc2c7a6(0x177))/0x8)+parseInt(_0xc2c7a6(0x16b))/0x9;if(_0x48e69a===_0x16727d)break;else _0xe1b40d['push'](_0xe1b40d['shift']());}catch(_0x523f61){_0xe1b40d['push'](_0xe1b40d['shift']());}}}(a110_0x54ba,0xb02fc));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a110_0x42ca26 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 a110_0x54ba(){const _0x32922f=['Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','1543dfhqQv','project','metadataPath','length','set','contentHash','1466512xxyDwU','values','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','startsWith','7214688jZnVQW','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','map','env','skillRoots','accessKey','runtime-observe','push','not-managed-symlink','2652985xuzFCF','pruneSkillCodes','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','appCode','personal','scope','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','37747521uUlaZt','isDirectory','external-symlink','builtin','validation','created','unchanged','344ZjMomJ','2618337pjIWdr','metadata-mismatch','dir','company','24tDdYWp','lovrabet','isSymbolicLink','scopes','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','linked-from-protected-root','skillCode','2258473CXkGAC','get','filter','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','removed','protectedLinkRoots','agentsSkillsDir','has','trim','activeSkillCodes','managedRoot','skill','name','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'];a110_0x54ba=function(){return _0x32922f;};return a110_0x54ba();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a110_0x42ca26,RESERVED_PROJECT_SKILL_CODES=new Set([a110_0x25f8f5(0x178),a110_0x25f8f5(0x161),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x67485f,_0x240dae){const _0x5655dd=a110_0x25f8f5,_0x141d1d=new Map();for(const _0x521847 of _0x67485f){const _0x21d596=_0x521847['skill'][_0x5655dd(0x17e)];if(!_0x21d596)continue;const _0x53143a=_0x141d1d[_0x5655dd(0x180)](_0x21d596);(!_0x53143a||_0x521847[_0x5655dd(0x169)]===_0x5655dd(0x168))&&_0x141d1d[_0x5655dd(0x154)](_0x21d596,_0x521847);}const _0x264174=[];for(const _0x2a8374 of _0x141d1d[_0x5655dd(0x157)]()){const _0x30c33b=requireSkillCode(_0x2a8374['skill']),_0x354faf=readMetadataIfPresent(_0x2a8374['metadataPath']);if(_0x354faf?.['appCode']!==_0x240dae[_0x5655dd(0x167)]||_0x354faf[_0x5655dd(0x17e)]!==_0x30c33b)throw CliErrors[_0x5655dd(0x16f)](_0x5655dd(0x15c)+_0x240dae[_0x5655dd(0x167)]+':\x20'+_0x2a8374[_0x5655dd(0x152)]);const _0x18d715=runtimeSkillLinkName(_0x240dae,_0x30c33b);for(const _0x447c4b of _0x240dae[_0x5655dd(0x15f)]){_0x264174[_0x5655dd(0x162)](ensureManagedSymlink(resolve(_0x447c4b,_0x18d715),_0x2a8374['dir'],_0x240dae,_0x30c33b));}}return _0x264174;}export function pruneStaleRuntimeSkillLinks(_0xcfb6,_0x487c9b,_0x57ebdf){const _0x260bd4=a110_0x25f8f5,_0x5d5fb2=new Set([..._0x487c9b][_0x260bd4(0x15d)](_0x8434c5=>_0x8434c5[_0x260bd4(0x148)]())[_0x260bd4(0x181)](Boolean)),_0xc75592=_0x57ebdf?new Set([..._0x57ebdf][_0x260bd4(0x15d)](_0x9cf2a4=>_0x9cf2a4[_0x260bd4(0x148)]())[_0x260bd4(0x181)](Boolean)):undefined,_0x2f383f=[];for(const _0x2cc253 of _0xcfb6[_0x260bd4(0x15f)]){for(const _0x2e5fdd of managedTargetSkillLinkPaths(_0x2cc253,_0xcfb6)){const _0x4c998c=runtimeSkillCodeFromLink(_0xcfb6,_0x2e5fdd);if(_0xc75592&&!_0xc75592[_0x260bd4(0x147)](_0x4c998c))continue;if(_0x5d5fb2[_0x260bd4(0x147)](_0x4c998c))continue;_0x2f383f[_0x260bd4(0x162)](removeManagedSkillLink(_0x2e5fdd,_0xcfb6,_0x4c998c));}}return _0x2f383f;}export function pruneStaleRuntimeSkillCache(_0xbd4f51,_0x35280a={}){const _0x4ecce2=a110_0x25f8f5,_0x14a944=new Set([..._0xbd4f51[_0x4ecce2(0x149)]][_0x4ecce2(0x15d)](_0x3ce3ba=>_0x3ce3ba[_0x4ecce2(0x148)]())[_0x4ecce2(0x181)](Boolean)),_0x27f3db=_0xbd4f51[_0x4ecce2(0x165)]?new Set([..._0xbd4f51[_0x4ecce2(0x165)]][_0x4ecce2(0x15d)](_0x3fa05d=>_0x3fa05d[_0x4ecce2(0x148)]())[_0x4ecce2(0x181)](Boolean)):undefined,_0x91c51a=_0xbd4f51[_0x4ecce2(0x17a)]??['personal',_0x4ecce2(0x176)],_0x4088e7=resolve(getRuntimeSkillCacheRoot(_0xbd4f51[_0x4ecce2(0x15e)],_0xbd4f51[_0x4ecce2(0x160)],_0x35280a),safePathSegment(_0xbd4f51[_0x4ecce2(0x167)],_0x4ecce2(0x167))),_0xfd1e02=[];for(const _0x1dff2f of _0x91c51a){const _0x750b5c=resolve(_0x4088e7,_0x1dff2f);if(!existsSync(_0x750b5c))continue;for(const _0x52e607 of readdirSync(_0x750b5c,{'withFileTypes':!![]})){if(!_0x52e607[_0x4ecce2(0x16c)]())continue;const _0x24da32=_0x52e607[_0x4ecce2(0x14c)];if(_0x27f3db&&!_0x27f3db[_0x4ecce2(0x147)](_0x24da32))continue;if(_0x14a944[_0x4ecce2(0x147)](_0x24da32))continue;const _0x110416=resolve(_0x750b5c,_0x24da32),_0x233430=readMetadataIfPresent(resolve(_0x110416,METADATA_FILE));if(_0x233430?.[_0x4ecce2(0x167)]!==_0xbd4f51['appCode']||_0x233430[_0x4ecce2(0x169)]!==_0x1dff2f||_0x233430[_0x4ecce2(0x17e)]!==_0x24da32){_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':_0x4ecce2(0x17b),'reason':_0x4ecce2(0x174)});continue;}if(isLinkedFromAnyRoot(_0x110416,_0xbd4f51[_0x4ecce2(0x145)]??[])){_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':'skipped','reason':_0x4ecce2(0x17d)});continue;}removeSync(_0x110416),_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':_0x4ecce2(0x183)});}}return _0xfd1e02;}export function linkGlobalRuntimeSkills(_0x3004fd,_0x1cca58={}){const _0x2e4238=a110_0x25f8f5,_0x500be2=resolveSkillSyncPaths(_0x1cca58),_0x17ee46=[];for(const _0x27b662 of _0x3004fd){if(_0x27b662[_0x2e4238(0x169)]!==_0x2e4238(0x16e))throw CliErrors[_0x2e4238(0x16f)](_0x2e4238(0x158)+_0x27b662[_0x2e4238(0x169)]);const _0x508120=requireSkillCode(_0x27b662[_0x2e4238(0x14b)]),_0x4c54c2=copyManagedSkillDirectory(_0x27b662['dir'],resolve(_0x500be2[_0x2e4238(0x146)],_0x508120));_0x17ee46[_0x2e4238(0x162)]({..._0x4c54c2,'contentHash':_0x27b662[_0x2e4238(0x155)]});}return _0x17ee46;}function ensureManagedSymlink(_0x1811cc,_0x1fb20f,_0x15aa40,_0x352070){const _0x163725=a110_0x25f8f5;mkdirSync(dirname(_0x1811cc),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1811cc)||isDanglingSymlink(_0x1811cc)){const _0x5a71dc=lstatSync(_0x1811cc);if(!_0x5a71dc['isSymbolicLink']())throw CliErrors[_0x163725(0x16f)](_0x163725(0x159)+_0x1811cc);const _0x46bab8=resolveSymlinkTarget(_0x1811cc);if(!isPathInside(realOrResolved(_0x46bab8),realOrResolved(_0x15aa40['managedRoot'])))throw CliErrors[_0x163725(0x16f)](_0x163725(0x16a)+_0x1811cc);if(realOrResolved(_0x46bab8)===realOrResolved(_0x1fb20f))return{'path':_0x1811cc,'target':_0x1fb20f,'action':_0x163725(0x171)};const _0x1cf819=readMetadataIfPresent(resolve(_0x46bab8,METADATA_FILE));if(_0x15aa40[_0x163725(0x169)]===_0x163725(0x151)&&(_0x1cf819?.[_0x163725(0x167)]!==_0x15aa40['appCode']||_0x1cf819['skillCode']!==_0x352070))throw CliErrors[_0x163725(0x16f)](_0x163725(0x166)+_0x1811cc);return unlinkSync(_0x1811cc),symlinkSync(_0x1fb20f,_0x1811cc,_0x163725(0x175)),{'path':_0x1811cc,'target':_0x1fb20f,'action':'updated'};}return symlinkSync(_0x1fb20f,_0x1811cc,_0x163725(0x175)),{'path':_0x1811cc,'target':_0x1fb20f,'action':_0x163725(0x170)};}function managedTargetSkillLinkPaths(_0x39166d,_0xd52d){const _0x132381=a110_0x25f8f5;if(!existsSync(_0x39166d))return[];const _0x3a1380=_0xd52d['appCode']+'--';return readdirSync(_0x39166d,{'withFileTypes':!![]})[_0x132381(0x181)](_0x321dc0=>_0xd52d[_0x132381(0x169)]===_0x132381(0x151)||_0x321dc0[_0x132381(0x14c)][_0x132381(0x15a)](_0x3a1380))[_0x132381(0x15d)](_0x2cfe14=>resolve(_0x39166d,_0x2cfe14['name']));}function removeManagedSkillLink(_0x4a8228,_0x10c11e,_0x1a405e){const _0x4d5fd7=a110_0x25f8f5,_0x2bb4f3=lstatIfPresent(_0x4a8228);if(!_0x2bb4f3?.[_0x4d5fd7(0x179)]())return{'path':_0x4a8228,'action':'skipped','reason':_0x4d5fd7(0x163)};const _0x1b4118=resolveSymlinkTarget(_0x4a8228);if(!isPathInside(realOrResolved(_0x1b4118),realOrResolved(_0x10c11e[_0x4d5fd7(0x14a)])))return{'path':_0x4a8228,'action':'skipped','reason':_0x4d5fd7(0x16d)};const _0x260af3=readMetadataIfPresent(resolve(_0x1b4118,METADATA_FILE));if(_0x10c11e[_0x4d5fd7(0x169)]===_0x4d5fd7(0x151)&&(_0x260af3?.['appCode']!==_0x10c11e[_0x4d5fd7(0x167)]||_0x260af3['skillCode']!==_0x1a405e))return{'path':_0x4a8228,'action':_0x4d5fd7(0x17b),'reason':_0x4d5fd7(0x174)};return unlinkSync(_0x4a8228),{'path':_0x4a8228,'action':_0x4d5fd7(0x183)};}function a110_0x5089(_0x39c620,_0x190933){_0x39c620=_0x39c620-0x145;const _0x54bae8=a110_0x54ba();let _0x508963=_0x54bae8[_0x39c620];return _0x508963;}function isLinkedFromAnyRoot(_0x311d64,_0x1cb995){const _0x465880=a110_0x25f8f5,_0x41e7a2=realOrResolved(_0x311d64);for(const _0x373363 of _0x1cb995){if(!existsSync(_0x373363))continue;for(const _0x5bb266 of readdirSync(_0x373363,{'withFileTypes':!![]})){if(!_0x5bb266[_0x465880(0x179)]())continue;const _0xa2468f=resolve(_0x373363,_0x5bb266[_0x465880(0x14c)]);if(realOrResolved(resolveSymlinkTarget(_0xa2468f))===_0x41e7a2)return!![];}}return![];}function runtimeSkillLinkName(_0x2d1dd0,_0x58992e){const _0x4db7fc=a110_0x25f8f5,_0x4045db=safePathSegment(_0x58992e,'skillCode');if(_0x2d1dd0[_0x4db7fc(0x169)]===_0x4db7fc(0x151)&&RESERVED_PROJECT_SKILL_CODES[_0x4db7fc(0x147)](_0x4045db))throw CliErrors['validation'](_0x4db7fc(0x14e)+_0x4045db);return _0x2d1dd0[_0x4db7fc(0x169)]==='project'?_0x4045db:_0x2d1dd0[_0x4db7fc(0x167)]+'--'+_0x4045db;}function runtimeSkillCodeFromLink(_0xb44c5b,_0x33c5e4){const _0x2c7a15=a110_0x25f8f5,_0x20c0c4=basename(_0x33c5e4);return _0xb44c5b[_0x2c7a15(0x169)]===_0x2c7a15(0x151)?_0x20c0c4:_0x20c0c4['slice']((_0xb44c5b[_0x2c7a15(0x167)]+'--')[_0x2c7a15(0x153)]);}export function copyManagedSkillDirectory(_0x188501,_0x1d56bd){const _0x153738=a110_0x25f8f5,_0x5a1efd=resolve(_0x1d56bd,METADATA_FILE),_0x7cfcbf=existsSync(_0x1d56bd);if(_0x7cfcbf){const _0x327e61=lstatSync(_0x1d56bd);if(_0x327e61[_0x153738(0x179)]())throw CliErrors[_0x153738(0x16f)](_0x153738(0x14d)+_0x1d56bd);if(!_0x327e61[_0x153738(0x16c)]())throw CliErrors[_0x153738(0x16f)](_0x153738(0x182)+_0x1d56bd);const _0x489412=readMetadataIfPresent(_0x5a1efd);if(_0x489412?.['scope']!==_0x153738(0x16e))throw CliErrors[_0x153738(0x16f)](_0x153738(0x17c)+_0x1d56bd);}ensureDirSync(dirname(_0x1d56bd));const _0x4f3427=_0x7cfcbf?readMetadataIfPresent(_0x5a1efd)?.[_0x153738(0x155)]:undefined,_0x12e166=readMetadataIfPresent(resolve(_0x188501,METADATA_FILE))?.[_0x153738(0x155)];return _0x7cfcbf&&removeSync(_0x1d56bd),copySkillDirectory(_0x188501,_0x1d56bd),{'path':_0x1d56bd,'target':_0x188501,'action':!_0x7cfcbf?_0x153738(0x170):_0x4f3427===_0x12e166?'unchanged':'updated'};}function copySkillDirectory(_0x381bfc,_0xee2b93){copySync(_0x381bfc,_0xee2b93,{'dereference':![],'overwrite':!![],'filter'(_0x5da4d1){const _0x3c3c45=a110_0x5089;if(lstatSync(_0x5da4d1)[_0x3c3c45(0x179)]())throw CliErrors[_0x3c3c45(0x16f)](_0x3c3c45(0x14f)+_0x5da4d1);return!![];}});}
@@ -1 +1 @@
1
- function a109_0x1f42(){const _0xcf6aab=['localeCompare','41714qPYwqt','\x20!=\x20','project','3012490kMELYC','50PPFEDq','cache','push','5159128RAIFej','trim','local','3486654KlCyTc','appCode','map','source','skillMdPath','includes','env','7748860mrMrpt','2286612JunmGm','isDirectory','linkedPath','name','builtin','dir','metadataPath','startsWith','code','linkedPaths','skillCode','isSymbolicLink','tags','sort','from','isArray','set','13775872CXoXAL','has','values','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','validation','filter','scope'];a109_0x1f42=function(){return _0xcf6aab;};return a109_0x1f42();}(function(_0x1b9b5e,_0x3169dc){const _0xd3affa=a109_0x382a,_0x33d202=_0x1b9b5e();while(!![]){try{const _0x37ef41=parseInt(_0xd3affa(0x12a))/0x1*(-parseInt(_0xd3affa(0x103))/0x2)+parseInt(_0xd3affa(0x109))/0x3+-parseInt(_0xd3affa(0x106))/0x4+-parseInt(_0xd3affa(0x102))/0x5+-parseInt(_0xd3affa(0x111))/0x6+parseInt(_0xd3affa(0x110))/0x7+parseInt(_0xd3affa(0x122))/0x8;if(_0x37ef41===_0x3169dc)break;else _0x33d202['push'](_0x33d202['shift']());}catch(_0x2730be){_0x33d202['push'](_0x33d202['shift']());}}}(a109_0x1f42,0xa4c86));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a109_0x382a(_0x433df9,_0x31fb9b){_0x433df9=_0x433df9-0x101;const _0x1f42e2=a109_0x1f42();let _0x382a0a=_0x1f42e2[_0x433df9];return _0x382a0a;}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x13b3ae,_0x2e9f9f,_0x4c6868={}){const _0x379797=a109_0x382a,_0x2e93e4=safePathSegment(_0x13b3ae[_0x379797(0x10a)],_0x379797(0x10a));if(_0x2e9f9f[_0x379797(0x10a)]!==_0x2e93e4)throw CliErrors[_0x379797(0x126)](_0x379797(0x125)+_0x2e9f9f[_0x379797(0x10a)]+_0x379797(0x12b)+_0x2e93e4);const _0x293504=normalizeRuntimeSkillScopes(_0x13b3ae['scopes']),_0x33e7c8=new Set(_0x293504),_0x24e98d=_0x13b3ae[_0x379797(0x119)]?.[_0x379797(0x107)](),_0x26588e=new Map(),_0x5c8779=resolve(getRuntimeSkillCacheRoot(_0x13b3ae[_0x379797(0x10f)],_0x13b3ae['accessKey'],_0x4c6868),_0x2e93e4);for(const _0x5136d8 of _0x293504){for(const _0x35672a of localSkillEntryDirs(resolve(_0x5c8779,_0x5136d8))){collectLocalRuntimeSkill(_0x26588e,_0x35672a,{'appCode':_0x2e93e4,'scopes':_0x33e7c8,'code':_0x24e98d,'source':_0x379797(0x104)});}}for(const _0x27d524 of _0x2e9f9f['skillRoots']){for(const _0x326ce2 of localSkillLinkCandidates(_0x27d524,_0x2e9f9f,_0x33e7c8)){collectLocalRuntimeSkill(_0x26588e,_0x326ce2,{'appCode':_0x2e93e4,'scopes':_0x33e7c8,'code':_0x24e98d,'source':'link','linkedPath':_0x326ce2});}}return Array[_0x379797(0x11f)](_0x26588e[_0x379797(0x124)]())[_0x379797(0x11e)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x41dee4){const _0x5c7c91=a109_0x382a;if(!existsSync(_0x41dee4))return[];return readdirSync(_0x41dee4,{'withFileTypes':!![]})[_0x5c7c91(0x127)](_0x10e6bd=>_0x10e6bd[_0x5c7c91(0x112)]()||_0x10e6bd['isSymbolicLink']())['map'](_0x4e1995=>resolve(_0x41dee4,_0x4e1995['name']));}function localSkillLinkCandidates(_0x56dc96,_0x1ec17,_0x40cc46){const _0x112908=a109_0x382a;if(!existsSync(_0x56dc96))return[];const _0x22b74c=_0x1ec17[_0x112908(0x10a)]+'--';return readdirSync(_0x56dc96,{'withFileTypes':!![]})['filter'](_0xfdee7=>_0xfdee7['isDirectory']()||_0xfdee7[_0x112908(0x11c)]())[_0x112908(0x127)](_0x10b3cb=>_0x1ec17[_0x112908(0x128)]===_0x112908(0x101)||_0x10b3cb[_0x112908(0x114)][_0x112908(0x118)](_0x22b74c)||_0x40cc46[_0x112908(0x123)](_0x112908(0x115)))[_0x112908(0x10b)](_0xac7852=>resolve(_0x56dc96,_0xac7852[_0x112908(0x114)]));}function collectLocalRuntimeSkill(_0x5f0393,_0x51a242,_0x116865){const _0x3f7283=a109_0x382a,_0x5a80f9=resolve(_0x51a242,METADATA_FILE),_0x5878c7=readMetadataIfPresent(_0x5a80f9);if(!_0x5878c7)return;if(_0x5878c7[_0x3f7283(0x10a)]!==_0x116865[_0x3f7283(0x10a)])return;if(!isRuntimeSkillScope(_0x5878c7[_0x3f7283(0x128)])||!_0x116865['scopes'][_0x3f7283(0x123)](_0x5878c7[_0x3f7283(0x128)]))return;const _0x69c571=_0x5878c7['skillCode']?.['trim']();if(!_0x69c571)return;if(_0x116865[_0x3f7283(0x119)]&&_0x69c571!==_0x116865[_0x3f7283(0x119)])return;const _0x42ec37=_0x5878c7[_0x3f7283(0x128)]+':'+_0x69c571,_0x52192a=_0x116865['linkedPath']?[_0x116865[_0x3f7283(0x113)]]:[],_0x199a18=_0x5f0393['get'](_0x42ec37);if(_0x199a18){_0x116865[_0x3f7283(0x10c)]===_0x3f7283(0x104)&&(_0x199a18['dir']=_0x51a242,_0x199a18['cacheDir']=_0x51a242,_0x199a18[_0x3f7283(0x10d)]=resolve(_0x51a242,SKILL_FILE),_0x199a18[_0x3f7283(0x117)]=_0x5a80f9);for(const _0x4be109 of _0x52192a){!_0x199a18[_0x3f7283(0x11a)][_0x3f7283(0x10e)](_0x4be109)&&_0x199a18[_0x3f7283(0x11a)][_0x3f7283(0x105)](_0x4be109);}_0x199a18[_0x3f7283(0x11a)][_0x3f7283(0x11e)]();return;}_0x5f0393[_0x3f7283(0x121)](_0x42ec37,{..._0x5878c7,'tags':Array[_0x3f7283(0x120)](_0x5878c7[_0x3f7283(0x11d)])?_0x5878c7[_0x3f7283(0x11d)]:[],'scope':_0x5878c7[_0x3f7283(0x128)],'source':_0x3f7283(0x108),'dir':_0x51a242,'cacheDir':_0x116865['source']===_0x3f7283(0x104)?_0x51a242:undefined,'skillMdPath':resolve(_0x51a242,SKILL_FILE),'metadataPath':_0x5a80f9,'linkedPaths':_0x52192a});}function compareLocalRuntimeSkills(_0x56aaea,_0x2f0b45){const _0x4bacde=a109_0x382a,_0x5beb5f={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5beb5f[_0x56aaea[_0x4bacde(0x128)]]-_0x5beb5f[_0x2f0b45[_0x4bacde(0x128)]]||_0x56aaea[_0x4bacde(0x11b)][_0x4bacde(0x129)](_0x2f0b45[_0x4bacde(0x11b)])||_0x56aaea['dir'][_0x4bacde(0x129)](_0x2f0b45[_0x4bacde(0x116)]);}
1
+ (function(_0x6dda9a,_0x55be22){const _0x21c441=a111_0xb8f7,_0x34ac88=_0x6dda9a();while(!![]){try{const _0x3cad29=-parseInt(_0x21c441(0x155))/0x1*(parseInt(_0x21c441(0x15f))/0x2)+parseInt(_0x21c441(0x14c))/0x3*(-parseInt(_0x21c441(0x14d))/0x4)+parseInt(_0x21c441(0x135))/0x5*(-parseInt(_0x21c441(0x147))/0x6)+parseInt(_0x21c441(0x13b))/0x7*(-parseInt(_0x21c441(0x141))/0x8)+-parseInt(_0x21c441(0x158))/0x9*(parseInt(_0x21c441(0x13d))/0xa)+-parseInt(_0x21c441(0x14b))/0xb*(-parseInt(_0x21c441(0x152))/0xc)+parseInt(_0x21c441(0x140))/0xd;if(_0x3cad29===_0x55be22)break;else _0x34ac88['push'](_0x34ac88['shift']());}catch(_0x4e560f){_0x34ac88['push'](_0x34ac88['shift']());}}}(a111_0xe4d3,0xe227b));function a111_0xe4d3(){const _0x5d4f41=['4488ShAhHM','startsWith','name','cacheDir','scope','\x20!=\x20','2586pcwuwF','from','has','trim','11ylFUcN','107886YEKhmo','204xAuPsb','source','isSymbolicLink','scopes','linkedPaths','11643612DFGBbs','set','skillCode','2sKNNHA','skillRoots','filter','333rioEpY','cache','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','includes','map','linkedPath','localeCompare','1405158oPmOYw','metadataPath','env','appCode','10950MDAJtz','sort','push','accessKey','isDirectory','get','18949xoSRwu','dir','454340fGnast','tags','isArray','95404725pKyACX'];a111_0xe4d3=function(){return _0x5d4f41;};return a111_0xe4d3();}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a111_0xb8f7(_0x4940e5,_0x7a2530){_0x4940e5=_0x4940e5-0x135;const _0xe4d3ab=a111_0xe4d3();let _0xb8f73a=_0xe4d3ab[_0x4940e5];return _0xb8f73a;}export function listLocalRuntimeSkills(_0x488a2b,_0x21d893,_0x492cde={}){const _0x18c37b=a111_0xb8f7,_0x2c9a83=safePathSegment(_0x488a2b[_0x18c37b(0x162)],_0x18c37b(0x162));if(_0x21d893['appCode']!==_0x2c9a83)throw CliErrors['validation'](_0x18c37b(0x15a)+_0x21d893[_0x18c37b(0x162)]+_0x18c37b(0x146)+_0x2c9a83);const _0x57585a=normalizeRuntimeSkillScopes(_0x488a2b[_0x18c37b(0x150)]),_0x448840=new Set(_0x57585a),_0x30fe77=_0x488a2b['code']?.[_0x18c37b(0x14a)](),_0x44e86c=new Map(),_0x27d546=resolve(getRuntimeSkillCacheRoot(_0x488a2b[_0x18c37b(0x161)],_0x488a2b[_0x18c37b(0x138)],_0x492cde),_0x2c9a83);for(const _0x576c05 of _0x57585a){for(const _0x183eae of localSkillEntryDirs(resolve(_0x27d546,_0x576c05))){collectLocalRuntimeSkill(_0x44e86c,_0x183eae,{'appCode':_0x2c9a83,'scopes':_0x448840,'code':_0x30fe77,'source':_0x18c37b(0x159)});}}for(const _0x4f5c73 of _0x21d893[_0x18c37b(0x156)]){for(const _0x2d9a6c of localSkillLinkCandidates(_0x4f5c73,_0x21d893,_0x448840)){collectLocalRuntimeSkill(_0x44e86c,_0x2d9a6c,{'appCode':_0x2c9a83,'scopes':_0x448840,'code':_0x30fe77,'source':'link','linkedPath':_0x2d9a6c});}}return Array[_0x18c37b(0x148)](_0x44e86c['values']())[_0x18c37b(0x136)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xcb19c3){const _0x451457=a111_0xb8f7;if(!existsSync(_0xcb19c3))return[];return readdirSync(_0xcb19c3,{'withFileTypes':!![]})['filter'](_0x505a1c=>_0x505a1c[_0x451457(0x139)]()||_0x505a1c[_0x451457(0x14f)]())[_0x451457(0x15c)](_0x41a7bd=>resolve(_0xcb19c3,_0x41a7bd['name']));}function localSkillLinkCandidates(_0x1a54e2,_0x2a0732,_0x42faa5){const _0x193812=a111_0xb8f7;if(!existsSync(_0x1a54e2))return[];const _0x31e8af=_0x2a0732[_0x193812(0x162)]+'--';return readdirSync(_0x1a54e2,{'withFileTypes':!![]})[_0x193812(0x157)](_0xaf9866=>_0xaf9866[_0x193812(0x139)]()||_0xaf9866[_0x193812(0x14f)]())[_0x193812(0x157)](_0x15964f=>_0x2a0732['scope']==='project'||_0x15964f[_0x193812(0x143)][_0x193812(0x142)](_0x31e8af)||_0x42faa5[_0x193812(0x149)]('builtin'))[_0x193812(0x15c)](_0x2e5d28=>resolve(_0x1a54e2,_0x2e5d28[_0x193812(0x143)]));}function collectLocalRuntimeSkill(_0x5ecf59,_0x5f04fe,_0x6c24a2){const _0x18af25=a111_0xb8f7,_0x438ddf=resolve(_0x5f04fe,METADATA_FILE),_0x52a190=readMetadataIfPresent(_0x438ddf);if(!_0x52a190)return;if(_0x52a190[_0x18af25(0x162)]!==_0x6c24a2[_0x18af25(0x162)])return;if(!isRuntimeSkillScope(_0x52a190[_0x18af25(0x145)])||!_0x6c24a2['scopes']['has'](_0x52a190[_0x18af25(0x145)]))return;const _0x564292=_0x52a190['skillCode']?.[_0x18af25(0x14a)]();if(!_0x564292)return;if(_0x6c24a2['code']&&_0x564292!==_0x6c24a2['code'])return;const _0x1b8876=_0x52a190[_0x18af25(0x145)]+':'+_0x564292,_0x3aef49=_0x6c24a2['linkedPath']?[_0x6c24a2[_0x18af25(0x15d)]]:[],_0xfae0f7=_0x5ecf59[_0x18af25(0x13a)](_0x1b8876);if(_0xfae0f7){_0x6c24a2[_0x18af25(0x14e)]===_0x18af25(0x159)&&(_0xfae0f7[_0x18af25(0x13c)]=_0x5f04fe,_0xfae0f7[_0x18af25(0x144)]=_0x5f04fe,_0xfae0f7['skillMdPath']=resolve(_0x5f04fe,SKILL_FILE),_0xfae0f7[_0x18af25(0x160)]=_0x438ddf);for(const _0x4f2584 of _0x3aef49){!_0xfae0f7[_0x18af25(0x151)][_0x18af25(0x15b)](_0x4f2584)&&_0xfae0f7['linkedPaths'][_0x18af25(0x137)](_0x4f2584);}_0xfae0f7[_0x18af25(0x151)]['sort']();return;}_0x5ecf59[_0x18af25(0x153)](_0x1b8876,{..._0x52a190,'tags':Array[_0x18af25(0x13f)](_0x52a190[_0x18af25(0x13e)])?_0x52a190['tags']:[],'scope':_0x52a190[_0x18af25(0x145)],'source':'local','dir':_0x5f04fe,'cacheDir':_0x6c24a2[_0x18af25(0x14e)]===_0x18af25(0x159)?_0x5f04fe:undefined,'skillMdPath':resolve(_0x5f04fe,SKILL_FILE),'metadataPath':_0x438ddf,'linkedPaths':_0x3aef49});}function compareLocalRuntimeSkills(_0x5109bb,_0x38e9d7){const _0x324e18=a111_0xb8f7,_0x520138={'personal':0x0,'company':0x1,'builtin':0x2};return _0x520138[_0x5109bb[_0x324e18(0x145)]]-_0x520138[_0x38e9d7['scope']]||_0x5109bb['skillCode'][_0x324e18(0x15e)](_0x38e9d7[_0x324e18(0x154)])||_0x5109bb[_0x324e18(0x13c)][_0x324e18(0x15e)](_0x38e9d7['dir']);}
@@ -1 +1 @@
1
- (function(_0x4a8231,_0x4a757c){const _0x104a12=a110_0x395a,_0x43ccbe=_0x4a8231();while(!![]){try{const _0x4166ea=parseInt(_0x104a12(0x124))/0x1+-parseInt(_0x104a12(0x104))/0x2*(-parseInt(_0x104a12(0x10d))/0x3)+-parseInt(_0x104a12(0x106))/0x4*(-parseInt(_0x104a12(0x10e))/0x5)+-parseInt(_0x104a12(0x11b))/0x6+parseInt(_0x104a12(0x117))/0x7+parseInt(_0x104a12(0x123))/0x8*(parseInt(_0x104a12(0x101))/0x9)+-parseInt(_0x104a12(0x10c))/0xa*(parseInt(_0x104a12(0x12a))/0xb);if(_0x4166ea===_0x4a757c)break;else _0x43ccbe['push'](_0x43ccbe['shift']());}catch(_0x5e58ec){_0x43ccbe['push'](_0x43ccbe['shift']());}}}(a110_0x2d07,0x50154));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(_0x4e666e){const _0x199936=a110_0x395a;return _0x4e666e['bytes']??Buffer[_0x199936(0x112)](_0x4e666e[_0x199936(0x10b)]??'','utf8');}export function fileText(_0x3444ee){const _0x4bfb78=a110_0x395a;return fileContent(_0x3444ee)[_0x4bfb78(0x126)](_0x4bfb78(0x110));}export function normalizeLocalFiles(_0x222502){const _0x48dc06=a110_0x395a;if(!Array[_0x48dc06(0x109)](_0x222502)||_0x222502[_0x48dc06(0x113)]===0x0)return[];const _0x4e1e21=new Map();for(const _0x5cf978 of _0x222502){if(!_0x5cf978||typeof _0x5cf978!=='object'||typeof _0x5cf978[_0x48dc06(0x11a)]!==_0x48dc06(0x119))throw CliErrors[_0x48dc06(0x10a)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x50427a=normalizeSkillRelativePath(_0x5cf978[_0x48dc06(0x11a)]);if(_0x4e1e21[_0x48dc06(0x11f)](_0x50427a))throw CliErrors[_0x48dc06(0x10a)](_0x48dc06(0x102)+_0x50427a);if(_0x5cf978[_0x48dc06(0x127)]!==undefined&&!Buffer[_0x48dc06(0x125)](_0x5cf978[_0x48dc06(0x127)]))throw CliErrors['validation'](_0x48dc06(0x10f)+_0x50427a);if(_0x5cf978['bytes']===undefined&&typeof _0x5cf978['content']!=='string')throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x50427a);const _0x5112d2=fileContent(_0x5cf978);_0x4e1e21[_0x48dc06(0x103)](_0x50427a,{'path':_0x50427a,'bytes':_0x5112d2});}return Array['from'](_0x4e1e21[_0x48dc06(0x108)]())[_0x48dc06(0x115)](compareSkillFiles);}export function normalizeManifestFiles(_0x1c5d7a){const _0x390500=a110_0x395a;if(!Array[_0x390500(0x109)](_0x1c5d7a)||_0x1c5d7a['length']===0x0)return[];const _0x269384=new Map();for(const _0xd85fdf of _0x1c5d7a){if(!_0xd85fdf||typeof _0xd85fdf!=='object'||typeof _0xd85fdf[_0x390500(0x11a)]!==_0x390500(0x119))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x98086e=normalizeSkillRelativePath(_0xd85fdf['path']);if(_0x269384[_0x390500(0x11f)](_0x98086e))throw CliErrors[_0x390500(0x10a)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x98086e);if(!isSha256Hex(_0xd85fdf[_0x390500(0x12b)]))throw CliErrors[_0x390500(0x10a)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x98086e);if(!Number[_0x390500(0x121)](_0xd85fdf['size'])||_0xd85fdf[_0x390500(0x111)]<0x0)throw CliErrors[_0x390500(0x10a)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x98086e);_0x269384[_0x390500(0x103)](_0x98086e,{'path':_0x98086e,'sha256':_0xd85fdf[_0x390500(0x12b)][_0x390500(0x120)](),'size':_0xd85fdf[_0x390500(0x111)]});}return Array[_0x390500(0x112)](_0x269384['values']())[_0x390500(0x115)](compareSkillFiles);}export function scanSkillDirectory(_0x4443a4){const _0x1a6588=realpathSync(_0x4443a4),_0x2f8983=[];function _0x29bea0(_0x2562f0){const _0x1f3eda=a110_0x395a,_0x28c532=readdirSync(_0x2562f0,{'withFileTypes':!![]})[_0x1f3eda(0x115)]((_0x3c768a,_0x5a0654)=>_0x3c768a[_0x1f3eda(0x105)][_0x1f3eda(0x114)](_0x5a0654[_0x1f3eda(0x105)]));for(const _0x10c1aa of _0x28c532){if(_0x10c1aa[_0x1f3eda(0x129)]()&&IGNORED_DIR_NAMES[_0x1f3eda(0x11f)](_0x10c1aa['name']))continue;if(IGNORED_FILE_NAMES[_0x1f3eda(0x11f)](_0x10c1aa['name']))continue;const _0x3f585f=resolve(_0x2562f0,_0x10c1aa[_0x1f3eda(0x105)]);if(_0x10c1aa['isSymbolicLink']())throw CliErrors[_0x1f3eda(0x10a)](_0x1f3eda(0x11c)+_0x3f585f);const _0x18cb3d=toPosixPath(relative(_0x1a6588,_0x3f585f));if(_0x10c1aa['isDirectory']()){_0x29bea0(_0x3f585f);continue;}if(!_0x10c1aa[_0x1f3eda(0x128)]())continue;validateSkillRelativePath(_0x18cb3d);const _0x2d3448=readFileSync(_0x3f585f);_0x2f8983[_0x1f3eda(0x107)]({'path':_0x18cb3d,'bytes':_0x2d3448});}}return _0x29bea0(_0x1a6588),normalizeLocalFiles(_0x2f8983);}export function compareSkillFiles(_0x44651e,_0x31b2c3){const _0x349aa2=a110_0x395a;if(_0x44651e['path']===SKILL_FILE)return _0x31b2c3[_0x349aa2(0x11a)]===SKILL_FILE?0x0:-0x1;if(_0x31b2c3[_0x349aa2(0x11a)]===SKILL_FILE)return 0x1;return Buffer[_0x349aa2(0x122)](Buffer[_0x349aa2(0x112)](_0x44651e[_0x349aa2(0x11a)],_0x349aa2(0x110)),Buffer['from'](_0x31b2c3['path'],_0x349aa2(0x110)));}export function normalizeSkillRelativePath(_0x29e3e9){const _0x2de65a=a110_0x395a,_0x24078f=toPosixPath(_0x29e3e9[_0x2de65a(0x116)]());return validateSkillRelativePath(_0x24078f),_0x24078f;}export function validateSkillRelativePath(_0x44b8a3){const _0x5006af=a110_0x395a;if(!_0x44b8a3||_0x44b8a3[_0x5006af(0x11d)]('/')||_0x44b8a3['includes']('//'))throw CliErrors[_0x5006af(0x10a)](_0x5006af(0x118)+_0x44b8a3);for(const _0x2e71c7 of _0x44b8a3['split']('/')){if(!_0x2e71c7||_0x2e71c7==='.'||_0x2e71c7==='..')throw CliErrors[_0x5006af(0x10a)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x44b8a3);}}function a110_0x395a(_0x4ab231,_0x18a558){_0x4ab231=_0x4ab231-0x101;const _0x2d0717=a110_0x2d07();let _0x395a7a=_0x2d0717[_0x4ab231];return _0x395a7a;}export function toPosixPath(_0xd8dbc3){const _0x48fa8a=a110_0x395a;return _0xd8dbc3[_0x48fa8a(0x11e)](/\\/g,'/');}function a110_0x2d07(){const _0x425f3a=['isBuffer','toString','bytes','isFile','isDirectory','5943377MlmJjJ','sha256','729klAqmY','Duplicate\x20Skill\x20file\x20path:\x20','set','92rMzVyr','name','1023904xsiYlj','push','values','isArray','validation','content','20MYRxcq','23469zQQbat','10wiCXEe','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','utf8','size','from','length','localeCompare','sort','trim','1262415xOkCpd','Unsafe\x20Skill\x20file\x20path:\x20','string','path','2458614nMZSeD','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','startsWith','replace','has','toLowerCase','isSafeInteger','compare','63664wDThVZ','121650ZKYlvK'];a110_0x2d07=function(){return _0x425f3a;};return a110_0x2d07();}export function isSha256Hex(_0x411427){const _0x47326a=a110_0x395a;return typeof _0x411427===_0x47326a(0x119)&&/^[a-fA-F0-9]{64}$/['test'](_0x411427);}
1
+ (function(_0x14d53a,_0x11ac20){const _0x298bcb=a112_0x123c,_0xf5cd83=_0x14d53a();while(!![]){try{const _0x52437b=-parseInt(_0x298bcb(0x1e7))/0x1*(parseInt(_0x298bcb(0x208))/0x2)+parseInt(_0x298bcb(0x20c))/0x3+-parseInt(_0x298bcb(0x1fd))/0x4*(parseInt(_0x298bcb(0x206))/0x5)+-parseInt(_0x298bcb(0x1fb))/0x6+-parseInt(_0x298bcb(0x202))/0x7+-parseInt(_0x298bcb(0x1e4))/0x8+parseInt(_0x298bcb(0x1fc))/0x9;if(_0x52437b===_0x11ac20)break;else _0xf5cd83['push'](_0xf5cd83['shift']());}catch(_0xf94074){_0xf5cd83['push'](_0xf5cd83['shift']());}}}(a112_0x9c33,0xbf8a6));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(_0x5ba42b){const _0x83fdd=a112_0x123c;return _0x5ba42b['bytes']??Buffer['from'](_0x5ba42b[_0x83fdd(0x1ed)]??'',_0x83fdd(0x1f5));}export function fileText(_0x33fdd1){const _0x311d3c=a112_0x123c;return fileContent(_0x33fdd1)['toString'](_0x311d3c(0x1f5));}function a112_0x123c(_0x391343,_0x1a0349){_0x391343=_0x391343-0x1df;const _0x9c33aa=a112_0x9c33();let _0x123c8b=_0x9c33aa[_0x391343];return _0x123c8b;}export function normalizeLocalFiles(_0x4316d7){const _0x3fe388=a112_0x123c;if(!Array[_0x3fe388(0x209)](_0x4316d7)||_0x4316d7[_0x3fe388(0x205)]===0x0)return[];const _0x2813c1=new Map();for(const _0x4dfad5 of _0x4316d7){if(!_0x4dfad5||typeof _0x4dfad5!=='object'||typeof _0x4dfad5[_0x3fe388(0x1f0)]!==_0x3fe388(0x1ec))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1f2));const _0x3a3367=normalizeSkillRelativePath(_0x4dfad5[_0x3fe388(0x1f0)]);if(_0x2813c1[_0x3fe388(0x1e1)](_0x3a3367))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1ff)+_0x3a3367);if(_0x4dfad5[_0x3fe388(0x1e0)]!==undefined&&!Buffer['isBuffer'](_0x4dfad5[_0x3fe388(0x1e0)]))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1e3)+_0x3a3367);if(_0x4dfad5[_0x3fe388(0x1e0)]===undefined&&typeof _0x4dfad5[_0x3fe388(0x1ed)]!==_0x3fe388(0x1ec))throw CliErrors['validation'](_0x3fe388(0x204)+_0x3a3367);const _0xb5d699=fileContent(_0x4dfad5);_0x2813c1['set'](_0x3a3367,{'path':_0x3a3367,'bytes':_0xb5d699});}return Array['from'](_0x2813c1['values']())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x755bc8){const _0x4820d7=a112_0x123c;if(!Array[_0x4820d7(0x209)](_0x755bc8)||_0x755bc8['length']===0x0)return[];const _0x233eab=new Map();for(const _0x2240dd of _0x755bc8){if(!_0x2240dd||typeof _0x2240dd!==_0x4820d7(0x207)||typeof _0x2240dd['path']!==_0x4820d7(0x1ec))throw CliErrors[_0x4820d7(0x1f1)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x467cd2=normalizeSkillRelativePath(_0x2240dd[_0x4820d7(0x1f0)]);if(_0x233eab[_0x4820d7(0x1e1)](_0x467cd2))throw CliErrors['validation'](_0x4820d7(0x1ff)+_0x467cd2);if(!isSha256Hex(_0x2240dd[_0x4820d7(0x1f7)]))throw CliErrors[_0x4820d7(0x1f1)](_0x4820d7(0x1e9)+_0x467cd2);if(!Number[_0x4820d7(0x1fe)](_0x2240dd['size'])||_0x2240dd[_0x4820d7(0x1f4)]<0x0)throw CliErrors[_0x4820d7(0x1f1)](_0x4820d7(0x1ef)+_0x467cd2);_0x233eab[_0x4820d7(0x1ee)](_0x467cd2,{'path':_0x467cd2,'sha256':_0x2240dd[_0x4820d7(0x1f7)][_0x4820d7(0x1f8)](),'size':_0x2240dd[_0x4820d7(0x1f4)]});}return Array[_0x4820d7(0x1f6)](_0x233eab[_0x4820d7(0x201)]())[_0x4820d7(0x1fa)](compareSkillFiles);}export function scanSkillDirectory(_0x15874d){const _0x2d3512=realpathSync(_0x15874d),_0x5cff50=[];function _0x54d7cd(_0x15cc84){const _0x4072ff=a112_0x123c,_0x3a518c=readdirSync(_0x15cc84,{'withFileTypes':!![]})['sort']((_0x121a33,_0x167b19)=>_0x121a33[_0x4072ff(0x20b)][_0x4072ff(0x1e5)](_0x167b19[_0x4072ff(0x20b)]));for(const _0xc55731 of _0x3a518c){if(_0xc55731[_0x4072ff(0x1f9)]()&&IGNORED_DIR_NAMES['has'](_0xc55731[_0x4072ff(0x20b)]))continue;if(IGNORED_FILE_NAMES[_0x4072ff(0x1e1)](_0xc55731[_0x4072ff(0x20b)]))continue;const _0x2abf58=resolve(_0x15cc84,_0xc55731[_0x4072ff(0x20b)]);if(_0xc55731[_0x4072ff(0x1e2)]())throw CliErrors['validation'](_0x4072ff(0x1ea)+_0x2abf58);const _0x2a3a44=toPosixPath(relative(_0x2d3512,_0x2abf58));if(_0xc55731['isDirectory']()){_0x54d7cd(_0x2abf58);continue;}if(!_0xc55731[_0x4072ff(0x1f3)]())continue;validateSkillRelativePath(_0x2a3a44);const _0xc33f1a=readFileSync(_0x2abf58);_0x5cff50[_0x4072ff(0x203)]({'path':_0x2a3a44,'bytes':_0xc33f1a});}}return _0x54d7cd(_0x2d3512),normalizeLocalFiles(_0x5cff50);}function a112_0x9c33(){const _0x8ecdf7=['486807TnFoxf','replace','bytes','has','isSymbolicLink','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','9211736uMwLac','localeCompare','trim','127PdYKnI','includes','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','string','content','set','Skill\x20file\x20size\x20is\x20invalid:\x20','path','validation','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','size','utf8','from','sha256','toLowerCase','isDirectory','sort','217608CMqncb','29205873pQNHwx','8CPJJYU','isSafeInteger','Duplicate\x20Skill\x20file\x20path:\x20','split','values','1519868DJLblh','push','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','1765050TDChhr','object','8062VnoPLj','isArray','test','name'];a112_0x9c33=function(){return _0x8ecdf7;};return a112_0x9c33();}export function compareSkillFiles(_0x291d5d,_0x3641ce){const _0x50fa0d=a112_0x123c;if(_0x291d5d[_0x50fa0d(0x1f0)]===SKILL_FILE)return _0x3641ce['path']===SKILL_FILE?0x0:-0x1;if(_0x3641ce[_0x50fa0d(0x1f0)]===SKILL_FILE)return 0x1;return Buffer[_0x50fa0d(0x1eb)](Buffer[_0x50fa0d(0x1f6)](_0x291d5d[_0x50fa0d(0x1f0)],_0x50fa0d(0x1f5)),Buffer[_0x50fa0d(0x1f6)](_0x3641ce[_0x50fa0d(0x1f0)],_0x50fa0d(0x1f5)));}export function normalizeSkillRelativePath(_0x2605bd){const _0x479050=a112_0x123c,_0x23af04=toPosixPath(_0x2605bd[_0x479050(0x1e6)]());return validateSkillRelativePath(_0x23af04),_0x23af04;}export function validateSkillRelativePath(_0x262979){const _0x3f1bdb=a112_0x123c;if(!_0x262979||_0x262979['startsWith']('/')||_0x262979[_0x3f1bdb(0x1e8)]('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x262979);for(const _0x2b8e4d of _0x262979[_0x3f1bdb(0x200)]('/')){if(!_0x2b8e4d||_0x2b8e4d==='.'||_0x2b8e4d==='..')throw CliErrors[_0x3f1bdb(0x1f1)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x262979);}}export function toPosixPath(_0x2f2b82){const _0xcae7ce=a112_0x123c;return _0x2f2b82[_0xcae7ce(0x1df)](/\\/g,'/');}export function isSha256Hex(_0x5116b6){const _0x56bfe8=a112_0x123c;return typeof _0x5116b6===_0x56bfe8(0x1ec)&&/^[a-fA-F0-9]{64}$/[_0x56bfe8(0x20a)](_0x5116b6);}
@@ -1 +1 @@
1
- (function(_0x5e5f4a,_0x205169){const _0x2690c7=a111_0x5ed1,_0x2f07ce=_0x5e5f4a();while(!![]){try{const _0x1add1c=parseInt(_0x2690c7(0xd1))/0x1+parseInt(_0x2690c7(0xd9))/0x2+parseInt(_0x2690c7(0xdf))/0x3*(-parseInt(_0x2690c7(0xfb))/0x4)+parseInt(_0x2690c7(0xd6))/0x5+parseInt(_0x2690c7(0xf5))/0x6+-parseInt(_0x2690c7(0xd4))/0x7+parseInt(_0x2690c7(0xd7))/0x8*(-parseInt(_0x2690c7(0xe0))/0x9);if(_0x1add1c===_0x205169)break;else _0x2f07ce['push'](_0x2f07ce['shift']());}catch(_0x24fd62){_0x2f07ce['push'](_0x2f07ce['shift']());}}}(a111_0x5e60,0x3221b));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x3c7592,_0x221ece,_0x24cc5e){const _0x705441=a111_0x5ed1,_0x44e4c6=requireSkillCode(_0x3c7592),_0x20735f=requirePackageBytes(_0x44e4c6,_0x24cc5e[_0x705441(0xd5)]),_0x27fe9c=extractDownloadedPackage(_0x20735f),_0x5093f1=_0x27fe9c[_0x705441(0xed)](_0x3b9231=>_0x3b9231[_0x705441(0xee)]===SKILL_FILE);if(!_0x5093f1)throw CliErrors[_0x705441(0xe2)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x44e4c6);const _0x24bf51=withMaterializedSkillFrontmatter(_0x27fe9c,_0x3c7592,_0x44e4c6),_0x23b819=_0x24bf51[_0x705441(0xed)](_0x144da5=>_0x144da5[_0x705441(0xee)]===SKILL_FILE),_0xe3e375=fileText(_0x23b819),_0x376629=getRuntimeSkillDir(_0x24cc5e[_0x705441(0xda)],_0x24cc5e[_0x705441(0xf2)],_0x24cc5e['appCode'],_0x221ece,_0x44e4c6,_0x24cc5e['paths']),_0x17e480=resolve(_0x376629,SKILL_FILE),_0x5b7ac7=resolve(_0x376629,METADATA_FILE),_0x3404a2=contentHash(_0xe3e375),_0x2bc089=readMetadataIfPresent(_0x5b7ac7)?.[_0x705441(0xf6)];ensurePulledFilesCanBeOverwritten(_0x376629,_0x5b7ac7,_0x24bf51,_0x24cc5e[_0x705441(0xeb)]===!![]),mkdirSync(_0x376629,{'recursive':!![],'mode':0x1c0});const _0x17e881=existsSync(_0x17e480)?readFileSync(_0x17e480,_0x705441(0xe6)):undefined;return materializeFiles(_0x376629,_0x24bf51),removeStaleManagedFiles(_0x376629,_0x2bc089,_0x24bf51),writeJsonAtomic(_0x5b7ac7,buildMetadata(_0x3c7592,_0x221ece,_0x24cc5e['appCode'],_0x3404a2,_0x24cc5e[_0x705441(0xf9)],_0x24bf51,_0x20735f)),{'skill':_0x3c7592,'scope':_0x221ece,'dir':_0x376629,'skillMdPath':_0x17e480,'metadataPath':_0x5b7ac7,'contentHash':_0x3404a2,'changed':_0x17e881!==_0xe3e375};}function withMaterializedSkillFrontmatter(_0x4c74b1,_0x3b139a,_0x21cfa2){const _0x21b556=a111_0x5ed1,_0x54eee7=skillDisplayName(_0x3b139a,_0x21cfa2),_0x32bbfd=_0x3b139a[_0x21b556(0xf0)]?.[_0x21b556(0xe1)]()||_0x54eee7||_0x21cfa2;return normalizeLocalFiles(_0x4c74b1)[_0x21b556(0xe3)](_0xd90a97=>{const _0x4e8f8c=_0x21b556,_0x234375=fileText(_0xd90a97);if(_0xd90a97['path']!==SKILL_FILE)return _0xd90a97;if(hasYamlFrontmatter(_0x234375))return{'path':_0xd90a97['path'],'content':withSyncedDisplayName(_0x234375,_0x54eee7)};return{'path':_0xd90a97[_0x4e8f8c(0xee)],'content':prependSkillFrontmatter(_0x234375,{'name':_0x21cfa2,'displayName':_0x54eee7,'description':_0x32bbfd})};});}function hasYamlFrontmatter(_0x361711){const _0x5bf65d=a111_0x5ed1;return/^\uFEFF?---\s*\r?\n/[_0x5bf65d(0xdc)](_0x361711);}function a111_0x5ed1(_0x532f3a,_0x65ec73){_0x532f3a=_0x532f3a-0xcb;const _0x5e609f=a111_0x5e60();let _0x5ed1ab=_0x5e609f[_0x532f3a];return _0x5ed1ab;}function prependSkillFrontmatter(_0x56abf9,_0x1279f1){const _0x570ebd=a111_0x5ed1,_0x25dd5b=_0x56abf9[_0x570ebd(0xf3)](/^\uFEFF/,'');return[_0x570ebd(0xec),'name:\x20'+yamlString(_0x1279f1['name']),_0x1279f1[_0x570ebd(0xd8)]?_0x570ebd(0xf4)+yamlString(_0x1279f1[_0x570ebd(0xd8)]):undefined,_0x570ebd(0xf7)+yamlString(_0x1279f1[_0x570ebd(0xf0)]),_0x570ebd(0xec),'',_0x25dd5b][_0x570ebd(0xfd)](_0x43932a=>_0x43932a!==undefined)['join']('\x0a');}function yamlString(_0x463403){const _0x1fdf76=a111_0x5ed1;return JSON[_0x1fdf76(0xf1)](_0x463403[_0x1fdf76(0xf3)](/\r/g,'')[_0x1fdf76(0xe1)]());}function skillDisplayName(_0x10d677,_0x357cb2){const _0x4b0ed1=a111_0x5ed1,_0x3bfc81=_0x10d677[_0x4b0ed1(0x101)]?.[_0x4b0ed1(0xe1)]();return _0x3bfc81||_0x357cb2;}function withSyncedDisplayName(_0x3f4764,_0x578cb1){const _0x2678ce=a111_0x5ed1,_0x1ffd92=_0x3f4764[_0x2678ce(0xcd)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1ffd92)return _0x3f4764;const _0xc81e9a=_0x1ffd92[0x1]??'',_0x3505b9=_0x1ffd92[0x2]??'',_0x305ad5=parseDocument(_0x3505b9);if(_0x305ad5[_0x2678ce(0xea)][_0x2678ce(0xff)]>0x0||!isMap(_0x305ad5[_0x2678ce(0xde)]))return _0x3f4764;if(_0x578cb1)_0x305ad5[_0x2678ce(0xd2)](_0x2678ce(0xd8),_0x578cb1);else{if(_0x305ad5[_0x2678ce(0xd3)]('displayName'))_0x305ad5[_0x2678ce(0xcc)](_0x2678ce(0xd8));else return _0x3f4764;}forceBlockCollections(_0x305ad5[_0x2678ce(0xde)]);const _0x2ef273=_0x305ad5[_0x2678ce(0xdb)]({'lineWidth':0x0})[_0x2678ce(0xd0)](),_0x55595e=_0x3f4764[_0x2678ce(0xce)](_0x1ffd92[0x0]['length'])['replace'](/^\r?\n/,'');return _0xc81e9a+_0x2678ce(0x100)+_0x2ef273+_0x2678ce(0xe5)+_0x55595e;}function forceBlockCollections(_0x2b17d4){if(!isNode(_0x2b17d4))return;visit(_0x2b17d4,(_0x1fbbf4,_0x47b1ed)=>{const _0x5ebed0=a111_0x5ed1;isCollection(_0x47b1ed)&&(_0x47b1ed[_0x5ebed0(0xe7)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x30fe38,_0xe5ece6,_0x91a02b,_0x98edb9){const _0x4885dd=a111_0x5ed1;if(_0x98edb9||!existsSync(_0xe5ece6))return;const _0x32c069=readMetadataIfPresent(_0xe5ece6);if(!_0x32c069)return;const _0x50adb1=_0x32c069[_0x4885dd(0xf6)]&&Object[_0x4885dd(0xfe)](_0x32c069['fileHashes'])[_0x4885dd(0xff)]>0x0?_0x32c069[_0x4885dd(0xf6)]:undefined;if(_0x50adb1)for(const [_0x498407,_0x59aeb6]of Object[_0x4885dd(0xcf)](_0x50adb1)){const _0x5eba9c=resolveManagedFilePath(_0x30fe38,_0x498407);if(!existsSync(_0x5eba9c))throw CliErrors['validation'](_0x4885dd(0xf8)+_0x30fe38,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x498407);const _0x472f9e=lstatSync(_0x5eba9c);if(!_0x472f9e[_0x4885dd(0xe9)]())throw CliErrors[_0x4885dd(0xe2)](_0x4885dd(0xf8)+_0x30fe38,_0x4885dd(0xe4)+_0x498407);const _0x8e8905=bufferSha256(readFileSync(_0x5eba9c));if(_0x8e8905!==_0x59aeb6)throw CliErrors['validation'](_0x4885dd(0xf8)+_0x30fe38+_0x4885dd(0xfa)+_0x498407,_0x4885dd(0xef)+_0x498407);}else{const _0x1745c1=resolve(_0x30fe38,SKILL_FILE);if(existsSync(_0x1745c1)&&_0x32c069[_0x4885dd(0xcb)]){const _0x19783b=contentHash(readFileSync(_0x1745c1,_0x4885dd(0xe6)));if(_0x19783b!==_0x32c069[_0x4885dd(0xcb)])throw CliErrors[_0x4885dd(0xe2)](_0x4885dd(0xfc)+_0x1745c1,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0xf3cdb1 of normalizeLocalFiles(_0x91a02b)){if(_0x50adb1?.[_0xf3cdb1['path']])continue;if(!_0x50adb1&&_0xf3cdb1[_0x4885dd(0xee)]===SKILL_FILE)continue;const _0x2ed6b1=resolveManagedFilePath(_0x30fe38,_0xf3cdb1[_0x4885dd(0xee)]);if(!existsSync(_0x2ed6b1))continue;const _0x101a70=lstatSync(_0x2ed6b1);if(!_0x101a70[_0x4885dd(0xe9)]())throw CliErrors[_0x4885dd(0xe2)](_0x4885dd(0xf8)+_0x30fe38,_0x4885dd(0xdd)+_0xf3cdb1[_0x4885dd(0xee)]);const _0x4240d0=bufferSha256(readFileSync(_0x2ed6b1));if(_0x4240d0!==fileHash(_0xf3cdb1))throw CliErrors[_0x4885dd(0xe2)](_0x4885dd(0xf8)+_0x30fe38,_0x4885dd(0xe8)+_0xf3cdb1['path']);}}function a111_0x5e60(){const _0xe3baa9=['Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','contents','3SXsUTG','246888mxsILi','trim','validation','map','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','\x0a---\x0a\x0a','utf8','flow','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','isFile','errors','force','---','find','path','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','description','stringify','accessKey','replace','displayName:\x20','953898ckvkJK','fileHashes','description:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','pulledAt','.\x20Changed\x20file:\x20','198428KwdtQO','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','filter','keys','length','---\x0a','skillName','contentHash','delete','match','slice','entries','trimEnd','138051EMwLcC','set','has','1711745EsywiA','packageBytes','674930rIjwMM','96MgVeoq','displayName','793290WzeAEl','env','toString','test'];a111_0x5e60=function(){return _0xe3baa9;};return a111_0x5e60();}function materializeFiles(_0x468f4a,_0xff60a4){const _0x1713cc=a111_0x5ed1;for(const _0x2fd334 of normalizeLocalFiles(_0xff60a4)){const _0xe5a15a=resolveManagedFilePath(_0x468f4a,_0x2fd334[_0x1713cc(0xee)]);mkdirSync(dirname(_0xe5a15a),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0xe5a15a,fileContent(_0x2fd334),0x180);}}function removeStaleManagedFiles(_0x18657e,_0x5b0f4e,_0x33b306){const _0x296bfc=a111_0x5ed1;if(!_0x5b0f4e)return;const _0x297e0c=new Set(normalizeLocalFiles(_0x33b306)[_0x296bfc(0xe3)](_0x5b555e=>_0x5b555e[_0x296bfc(0xee)]));for(const _0x44dd84 of Object[_0x296bfc(0xfe)](_0x5b0f4e)){if(_0x297e0c['has'](_0x44dd84))continue;const _0x1426ef=resolveManagedFilePath(_0x18657e,_0x44dd84);existsSync(_0x1426ef)&&lstatSync(_0x1426ef)[_0x296bfc(0xe9)]()&&rmSync(_0x1426ef,{'force':!![]});}}
1
+ (function(_0x2c3647,_0x59e059){const _0x2ca3a5=a113_0x17f8,_0xe93b2f=_0x2c3647();while(!![]){try{const _0x3e28ba=-parseInt(_0x2ca3a5(0x159))/0x1+parseInt(_0x2ca3a5(0x147))/0x2+-parseInt(_0x2ca3a5(0x16d))/0x3+parseInt(_0x2ca3a5(0x148))/0x4+parseInt(_0x2ca3a5(0x168))/0x5+-parseInt(_0x2ca3a5(0x141))/0x6*(parseInt(_0x2ca3a5(0x153))/0x7)+parseInt(_0x2ca3a5(0x169))/0x8;if(_0x3e28ba===_0x59e059)break;else _0xe93b2f['push'](_0xe93b2f['shift']());}catch(_0x11a4df){_0xe93b2f['push'](_0xe93b2f['shift']());}}}(a113_0x1e01,0x258b4));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a113_0x1e01(){const _0x3c2b4f=['299513dRYvaV','replace','contentHash','validation','map','appCode','entries','match','join','displayName:\x20','isFile','---','.\x20Changed\x20file:\x20','stringify','trimEnd','252825naxCPl','1860736IcCsAF','find','filter','paths','623979eCHJnH','name:\x20','---\x0a','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','length','displayName','fileHashes','174QGARVl','trim','env','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','pulledAt','contents','321100uhoIqt','881800qjsGYf','description','utf8','keys','slice','skillName','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','has','path','packageBytes','name','693vSwTTa','description:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','delete','force','toString'];a113_0x1e01=function(){return _0x3c2b4f;};return a113_0x1e01();}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(_0x377de6,_0xf255d7,_0x419817){const _0x57479b=a113_0x17f8,_0x543ee4=requireSkillCode(_0x377de6),_0x51de95=requirePackageBytes(_0x543ee4,_0x419817[_0x57479b(0x151)]),_0x2a6531=extractDownloadedPackage(_0x51de95),_0x13b0c7=_0x2a6531['find'](_0x315bfa=>_0x315bfa[_0x57479b(0x150)]===SKILL_FILE);if(!_0x13b0c7)throw CliErrors[_0x57479b(0x15c)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x543ee4);const _0x29c291=withMaterializedSkillFrontmatter(_0x2a6531,_0x377de6,_0x543ee4),_0x4d3b3b=_0x29c291[_0x57479b(0x16a)](_0x457e01=>_0x457e01[_0x57479b(0x150)]===SKILL_FILE),_0x363347=fileText(_0x4d3b3b),_0x137d7f=getRuntimeSkillDir(_0x419817[_0x57479b(0x143)],_0x419817['accessKey'],_0x419817[_0x57479b(0x15e)],_0xf255d7,_0x543ee4,_0x419817[_0x57479b(0x16c)]),_0x184965=resolve(_0x137d7f,SKILL_FILE),_0x5618c1=resolve(_0x137d7f,METADATA_FILE),_0x58dcfa=contentHash(_0x363347),_0x919fd9=readMetadataIfPresent(_0x5618c1)?.[_0x57479b(0x140)];ensurePulledFilesCanBeOverwritten(_0x137d7f,_0x5618c1,_0x29c291,_0x419817[_0x57479b(0x157)]===!![]),mkdirSync(_0x137d7f,{'recursive':!![],'mode':0x1c0});const _0x1fbfb8=existsSync(_0x184965)?readFileSync(_0x184965,_0x57479b(0x14a)):undefined;return materializeFiles(_0x137d7f,_0x29c291),removeStaleManagedFiles(_0x137d7f,_0x919fd9,_0x29c291),writeJsonAtomic(_0x5618c1,buildMetadata(_0x377de6,_0xf255d7,_0x419817[_0x57479b(0x15e)],_0x58dcfa,_0x419817[_0x57479b(0x145)],_0x29c291,_0x51de95)),{'skill':_0x377de6,'scope':_0xf255d7,'dir':_0x137d7f,'skillMdPath':_0x184965,'metadataPath':_0x5618c1,'contentHash':_0x58dcfa,'changed':_0x1fbfb8!==_0x363347};}function withMaterializedSkillFrontmatter(_0x49974a,_0x4ab443,_0x6694b5){const _0x40f0f2=a113_0x17f8,_0x21df8e=skillDisplayName(_0x4ab443,_0x6694b5),_0x3b15f4=_0x4ab443['description']?.['trim']()||_0x21df8e||_0x6694b5;return normalizeLocalFiles(_0x49974a)[_0x40f0f2(0x15d)](_0x550535=>{const _0x5041fa=_0x40f0f2,_0x36cd8a=fileText(_0x550535);if(_0x550535['path']!==SKILL_FILE)return _0x550535;if(hasYamlFrontmatter(_0x36cd8a))return{'path':_0x550535[_0x5041fa(0x150)],'content':withSyncedDisplayName(_0x36cd8a,_0x21df8e)};return{'path':_0x550535[_0x5041fa(0x150)],'content':prependSkillFrontmatter(_0x36cd8a,{'name':_0x6694b5,'displayName':_0x21df8e,'description':_0x3b15f4})};});}function hasYamlFrontmatter(_0x39e494){return/^\uFEFF?---\s*\r?\n/['test'](_0x39e494);}function prependSkillFrontmatter(_0x3a3aa5,_0x16d549){const _0x174513=a113_0x17f8,_0x4527c3=_0x3a3aa5[_0x174513(0x15a)](/^\uFEFF/,'');return[_0x174513(0x164),_0x174513(0x16e)+yamlString(_0x16d549[_0x174513(0x152)]),_0x16d549[_0x174513(0x13f)]?_0x174513(0x162)+yamlString(_0x16d549[_0x174513(0x13f)]):undefined,_0x174513(0x154)+yamlString(_0x16d549[_0x174513(0x149)]),_0x174513(0x164),'',_0x4527c3][_0x174513(0x16b)](_0x49a38b=>_0x49a38b!==undefined)[_0x174513(0x161)]('\x0a');}function yamlString(_0x152b36){const _0x40edce=a113_0x17f8;return JSON[_0x40edce(0x166)](_0x152b36['replace'](/\r/g,'')[_0x40edce(0x142)]());}function skillDisplayName(_0x10987a,_0x2f7672){const _0xbb12e1=a113_0x17f8,_0x23a30f=_0x10987a[_0xbb12e1(0x14d)]?.[_0xbb12e1(0x142)]();return _0x23a30f||_0x2f7672;}function withSyncedDisplayName(_0x16a981,_0x4e0516){const _0x511e1f=a113_0x17f8,_0xff5d7e=_0x16a981[_0x511e1f(0x160)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xff5d7e)return _0x16a981;const _0x2476ad=_0xff5d7e[0x1]??'',_0x14097c=_0xff5d7e[0x2]??'',_0x3ed6db=parseDocument(_0x14097c);if(_0x3ed6db['errors'][_0x511e1f(0x13e)]>0x0||!isMap(_0x3ed6db[_0x511e1f(0x146)]))return _0x16a981;if(_0x4e0516)_0x3ed6db['set'](_0x511e1f(0x13f),_0x4e0516);else{if(_0x3ed6db[_0x511e1f(0x14f)](_0x511e1f(0x13f)))_0x3ed6db[_0x511e1f(0x156)](_0x511e1f(0x13f));else return _0x16a981;}forceBlockCollections(_0x3ed6db['contents']);const _0x1d1a85=_0x3ed6db[_0x511e1f(0x158)]({'lineWidth':0x0})[_0x511e1f(0x167)](),_0x17c366=_0x16a981[_0x511e1f(0x14c)](_0xff5d7e[0x0][_0x511e1f(0x13e)])[_0x511e1f(0x15a)](/^\r?\n/,'');return _0x2476ad+_0x511e1f(0x13b)+_0x1d1a85+'\x0a---\x0a\x0a'+_0x17c366;}function forceBlockCollections(_0x4d1809){if(!isNode(_0x4d1809))return;visit(_0x4d1809,(_0x16ac6d,_0x3c3c3e)=>{isCollection(_0x3c3c3e)&&(_0x3c3c3e['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x197c09,_0x37f511,_0x3059d8,_0x2c4e9c){const _0x496a93=a113_0x17f8;if(_0x2c4e9c||!existsSync(_0x37f511))return;const _0x485994=readMetadataIfPresent(_0x37f511);if(!_0x485994)return;const _0x56682a=_0x485994['fileHashes']&&Object[_0x496a93(0x14b)](_0x485994[_0x496a93(0x140)])[_0x496a93(0x13e)]>0x0?_0x485994[_0x496a93(0x140)]:undefined;if(_0x56682a)for(const [_0x155c9e,_0x58c3d6]of Object[_0x496a93(0x15f)](_0x56682a)){const _0x1796d3=resolveManagedFilePath(_0x197c09,_0x155c9e);if(!existsSync(_0x1796d3))throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x13c)+_0x197c09,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x155c9e);const _0x31b924=lstatSync(_0x1796d3);if(!_0x31b924[_0x496a93(0x163)]())throw CliErrors['validation'](_0x496a93(0x13c)+_0x197c09,_0x496a93(0x144)+_0x155c9e);const _0x23fce5=bufferSha256(readFileSync(_0x1796d3));if(_0x23fce5!==_0x58c3d6)throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x13c)+_0x197c09+_0x496a93(0x165)+_0x155c9e,_0x496a93(0x13d)+_0x155c9e);}else{const _0xb3ab7e=resolve(_0x197c09,SKILL_FILE);if(existsSync(_0xb3ab7e)&&_0x485994[_0x496a93(0x15b)]){const _0x1d7271=contentHash(readFileSync(_0xb3ab7e,_0x496a93(0x14a)));if(_0x1d7271!==_0x485994[_0x496a93(0x15b)])throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x155)+_0xb3ab7e,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x599a93 of normalizeLocalFiles(_0x3059d8)){if(_0x56682a?.[_0x599a93['path']])continue;if(!_0x56682a&&_0x599a93[_0x496a93(0x150)]===SKILL_FILE)continue;const _0x443af5=resolveManagedFilePath(_0x197c09,_0x599a93[_0x496a93(0x150)]);if(!existsSync(_0x443af5))continue;const _0x2d92cb=lstatSync(_0x443af5);if(!_0x2d92cb['isFile']())throw CliErrors[_0x496a93(0x15c)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x197c09,_0x496a93(0x14e)+_0x599a93[_0x496a93(0x150)]);const _0x153679=bufferSha256(readFileSync(_0x443af5));if(_0x153679!==fileHash(_0x599a93))throw CliErrors[_0x496a93(0x15c)](_0x496a93(0x13c)+_0x197c09,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x599a93['path']);}}function materializeFiles(_0x3bc2d9,_0x5bc167){const _0x25cf6d=a113_0x17f8;for(const _0x34da3a of normalizeLocalFiles(_0x5bc167)){const _0x560e63=resolveManagedFilePath(_0x3bc2d9,_0x34da3a[_0x25cf6d(0x150)]);mkdirSync(dirname(_0x560e63),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x560e63,fileContent(_0x34da3a),0x180);}}function a113_0x17f8(_0x3c31e1,_0x45a66c){_0x3c31e1=_0x3c31e1-0x13b;const _0x1e015a=a113_0x1e01();let _0x17f8c6=_0x1e015a[_0x3c31e1];return _0x17f8c6;}function removeStaleManagedFiles(_0x5ed84b,_0x1f91c6,_0x1e5ace){const _0xb535fb=a113_0x17f8;if(!_0x1f91c6)return;const _0x26cc36=new Set(normalizeLocalFiles(_0x1e5ace)[_0xb535fb(0x15d)](_0x2df52b=>_0x2df52b[_0xb535fb(0x150)]));for(const _0x5c3505 of Object[_0xb535fb(0x14b)](_0x1f91c6)){if(_0x26cc36[_0xb535fb(0x14f)](_0x5c3505))continue;const _0x350037=resolveManagedFilePath(_0x5ed84b,_0x5c3505);existsSync(_0x350037)&&lstatSync(_0x350037)[_0xb535fb(0x163)]()&&rmSync(_0x350037,{'force':!![]});}}
@@ -1 +1 @@
1
- function a112_0x1f4c(_0x3fcd90,_0xc61c85){_0x3fcd90=_0x3fcd90-0x159;const _0x42b9ca=a112_0x42b9();let _0x1f4c02=_0x42b9ca[_0x3fcd90];return _0x1f4c02;}(function(_0x31f63d,_0x54282c){const _0x322ee0=a112_0x1f4c,_0x40d4c1=_0x31f63d();while(!![]){try{const _0x4bb501=-parseInt(_0x322ee0(0x173))/0x1+-parseInt(_0x322ee0(0x17e))/0x2*(-parseInt(_0x322ee0(0x165))/0x3)+parseInt(_0x322ee0(0x17c))/0x4*(parseInt(_0x322ee0(0x15c))/0x5)+parseInt(_0x322ee0(0x170))/0x6+parseInt(_0x322ee0(0x17b))/0x7*(-parseInt(_0x322ee0(0x15f))/0x8)+parseInt(_0x322ee0(0x168))/0x9*(-parseInt(_0x322ee0(0x161))/0xa)+parseInt(_0x322ee0(0x162))/0xb;if(_0x4bb501===_0x54282c)break;else _0x40d4c1['push'](_0x40d4c1['shift']());}catch(_0x5e5fde){_0x40d4c1['push'](_0x40d4c1['shift']());}}}(a112_0x42b9,0xd25b7));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 a112_0x42b9(){const _0x495db2=['parse','538205CZuqIr','personal','readonly','object','map','skillCode','trim','description','259ZnyDDI','130124IlEMSU','isArray','2tSbZvA','fromEntries','length','forkedFromVersion','225HbjgSe','utf8','status','239048ApdKuh','skillName','52890PYLRMC','5530932hsgiED','toISOString','path','53328gMPOSp','version','sourceSessionId','1458brRNAo','Invalid\x20','zipSize','Runtime\x20Skill\x20is\x20missing\x20skillCode.','hasUpstreamUpdate','manifest','tags','zipSha256','8266560DhutSP','validation'];a112_0x42b9=function(){return _0x495db2;};return a112_0x42b9();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3f0b95,_0x58c83f,_0x41398c,_0x48a11c,_0x3299ff,_0x156450,_0xe0b2e0){const _0x31c0e4=a112_0x1f4c,_0x214137=_0x156450?normalizeLocalFiles(_0x156450):[],_0x5f3e09=!_0xe0b2e0&&_0x214137['length']>0x0?buildSkillPackage(_0x214137):undefined,_0x4b85d6=_0xe0b2e0?bufferSha256(_0xe0b2e0):_0x5f3e09?.[_0x31c0e4(0x16d)][_0x31c0e4(0x16f)],_0x5e13b5=_0xe0b2e0?.[_0x31c0e4(0x15a)]??_0x5f3e09?.[_0x31c0e4(0x16d)][_0x31c0e4(0x16a)],_0x5ad909=_0x214137[_0x31c0e4(0x15a)]>0x0?Object[_0x31c0e4(0x159)](_0x214137[_0x31c0e4(0x177)](_0x4d4f4f=>[_0x4d4f4f[_0x31c0e4(0x164)],fileHash(_0x4d4f4f)])):undefined;return{'schemaVersion':_0x214137[_0x31c0e4(0x15a)]>0x0?0x2:0x1,'id':_0x3f0b95['id'],'appCode':_0x41398c,'skillCode':requireSkillCode(_0x3f0b95),'skillName':_0x3f0b95[_0x31c0e4(0x160)],'description':_0x3f0b95[_0x31c0e4(0x17a)],'scope':_0x58c83f,'readonly':_0x58c83f!==_0x31c0e4(0x174)||_0x3f0b95[_0x31c0e4(0x175)]===!![],'tenantCode':_0x3f0b95['tenantCode'],'userId':_0x3f0b95['userId'],'version':_0x3f0b95[_0x31c0e4(0x166)],'status':_0x3f0b95[_0x31c0e4(0x15e)],'tags':Array[_0x31c0e4(0x17d)](_0x3f0b95[_0x31c0e4(0x16e)])?_0x3f0b95[_0x31c0e4(0x16e)]:[],'hasUpstreamUpdate':_0x3f0b95[_0x31c0e4(0x16c)],'forkedFromSkillId':_0x3f0b95['forkedFromSkillId'],'forkedFromVersion':_0x3f0b95[_0x31c0e4(0x15b)],'sourceSessionId':_0x3f0b95[_0x31c0e4(0x167)],'contentHash':_0x48a11c,'fileHashes':_0x5ad909,'treeHash':_0x214137[_0x31c0e4(0x15a)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x214137)):undefined,'ossPath':remoteManifestOssPath(_0x3f0b95['files']),'zipSha256':_0x4b85d6,'zipSize':_0x5e13b5,'files':_0x214137[_0x31c0e4(0x15a)]>0x0?_0x214137[_0x31c0e4(0x177)](_0x1d7e60=>({'path':_0x1d7e60[_0x31c0e4(0x164)],'hash':fileHash(_0x1d7e60),'size':fileContent(_0x1d7e60)[_0x31c0e4(0x15a)]})):undefined,'pulledAt':_0x3299ff??new Date()[_0x31c0e4(0x163)]()};}export function requireSkillCode(_0x1f3ce4){const _0x3b7d47=a112_0x1f4c,_0x2cf928=_0x1f3ce4[_0x3b7d47(0x178)]?.[_0x3b7d47(0x179)]();if(!_0x2cf928)throw CliErrors[_0x3b7d47(0x171)](_0x3b7d47(0x16b));return _0x2cf928;}export function readMetadataIfPresent(_0x3521f9){const _0x1a9a93=a112_0x1f4c;if(!existsSync(_0x3521f9))return undefined;try{const _0x15835d=JSON[_0x1a9a93(0x172)](readFileSync(_0x3521f9,_0x1a9a93(0x15d)));return _0x15835d;}catch{throw CliErrors[_0x1a9a93(0x171)](_0x1a9a93(0x169)+METADATA_FILE+':\x20'+_0x3521f9);}}function remoteManifestOssPath(_0x46bd49){const _0x2431e4=a112_0x1f4c;if(!_0x46bd49||typeof _0x46bd49!==_0x2431e4(0x176)||Array[_0x2431e4(0x17d)](_0x46bd49))return undefined;const _0x345662=_0x46bd49['ossPath'];return typeof _0x345662==='string'&&_0x345662[_0x2431e4(0x179)]()?_0x345662[_0x2431e4(0x179)]():undefined;}
1
+ (function(_0x39fa66,_0x9567e2){const _0x3b330c=a114_0x1b71,_0x814edb=_0x39fa66();while(!![]){try{const _0xa35753=parseInt(_0x3b330c(0x1ba))/0x1*(parseInt(_0x3b330c(0x1d7))/0x2)+-parseInt(_0x3b330c(0x1bf))/0x3*(parseInt(_0x3b330c(0x1c4))/0x4)+-parseInt(_0x3b330c(0x1c2))/0x5+-parseInt(_0x3b330c(0x1da))/0x6*(-parseInt(_0x3b330c(0x1c8))/0x7)+-parseInt(_0x3b330c(0x1b6))/0x8+parseInt(_0x3b330c(0x1d3))/0x9*(-parseInt(_0x3b330c(0x1d4))/0xa)+parseInt(_0x3b330c(0x1cd))/0xb;if(_0xa35753===_0x9567e2)break;else _0x814edb['push'](_0x814edb['shift']());}catch(_0x2103b6){_0x814edb['push'](_0x814edb['shift']());}}}(a114_0xfd4c,0xb967e));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a114_0xfd4c(){const _0x1336e1=['readonly','399pvPkpE','version','isArray','sourceSessionId','personal','10275969MjUCOD','tags','manifest','Invalid\x20','userId','parse','13113aytyuS','8210iZXHAD','trim','Runtime\x20Skill\x20is\x20missing\x20skillCode.','50IYUslz','files','map','140442BpyRnM','string','tenantCode','3045376BQkaYL','zipSha256','length','object','46895DssnUt','description','path','validation','zipSize','21135BKyVoy','utf8','status','2563410CqSHJW','ossPath','336HCrUcZ','fromEntries','skillName'];a114_0xfd4c=function(){return _0x1336e1;};return a114_0xfd4c();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x45a49c,_0x5b3aab,_0x4b0d27,_0x36dcc4,_0x51145b,_0x1b9ff0,_0x37b277){const _0x25e942=a114_0x1b71,_0x496c13=_0x1b9ff0?normalizeLocalFiles(_0x1b9ff0):[],_0x502b83=!_0x37b277&&_0x496c13[_0x25e942(0x1b8)]>0x0?buildSkillPackage(_0x496c13):undefined,_0xf6e9eb=_0x37b277?bufferSha256(_0x37b277):_0x502b83?.[_0x25e942(0x1cf)][_0x25e942(0x1b7)],_0x5e3e0c=_0x37b277?.[_0x25e942(0x1b8)]??_0x502b83?.[_0x25e942(0x1cf)][_0x25e942(0x1be)],_0x32020e=_0x496c13['length']>0x0?Object[_0x25e942(0x1c5)](_0x496c13[_0x25e942(0x1d9)](_0x4cb28a=>[_0x4cb28a[_0x25e942(0x1bc)],fileHash(_0x4cb28a)])):undefined;return{'schemaVersion':_0x496c13[_0x25e942(0x1b8)]>0x0?0x2:0x1,'id':_0x45a49c['id'],'appCode':_0x4b0d27,'skillCode':requireSkillCode(_0x45a49c),'skillName':_0x45a49c[_0x25e942(0x1c6)],'description':_0x45a49c[_0x25e942(0x1bb)],'scope':_0x5b3aab,'readonly':_0x5b3aab!==_0x25e942(0x1cc)||_0x45a49c[_0x25e942(0x1c7)]===!![],'tenantCode':_0x45a49c[_0x25e942(0x1b5)],'userId':_0x45a49c[_0x25e942(0x1d1)],'version':_0x45a49c[_0x25e942(0x1c9)],'status':_0x45a49c[_0x25e942(0x1c1)],'tags':Array[_0x25e942(0x1ca)](_0x45a49c['tags'])?_0x45a49c[_0x25e942(0x1ce)]:[],'hasUpstreamUpdate':_0x45a49c['hasUpstreamUpdate'],'forkedFromSkillId':_0x45a49c['forkedFromSkillId'],'forkedFromVersion':_0x45a49c['forkedFromVersion'],'sourceSessionId':_0x45a49c[_0x25e942(0x1cb)],'contentHash':_0x36dcc4,'fileHashes':_0x32020e,'treeHash':_0x496c13[_0x25e942(0x1b8)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x496c13)):undefined,'ossPath':remoteManifestOssPath(_0x45a49c[_0x25e942(0x1d8)]),'zipSha256':_0xf6e9eb,'zipSize':_0x5e3e0c,'files':_0x496c13[_0x25e942(0x1b8)]>0x0?_0x496c13[_0x25e942(0x1d9)](_0x45f2a2=>({'path':_0x45f2a2[_0x25e942(0x1bc)],'hash':fileHash(_0x45f2a2),'size':fileContent(_0x45f2a2)['length']})):undefined,'pulledAt':_0x51145b??new Date()['toISOString']()};}function a114_0x1b71(_0x27e848,_0xef7cc8){_0x27e848=_0x27e848-0x1b5;const _0xfd4cf9=a114_0xfd4c();let _0x1b7119=_0xfd4cf9[_0x27e848];return _0x1b7119;}export function requireSkillCode(_0x2b5a16){const _0x267106=a114_0x1b71,_0x4c06c1=_0x2b5a16['skillCode']?.[_0x267106(0x1d5)]();if(!_0x4c06c1)throw CliErrors[_0x267106(0x1bd)](_0x267106(0x1d6));return _0x4c06c1;}export function readMetadataIfPresent(_0x119b58){const _0x157d49=a114_0x1b71;if(!existsSync(_0x119b58))return undefined;try{const _0x637479=JSON[_0x157d49(0x1d2)](readFileSync(_0x119b58,_0x157d49(0x1c0)));return _0x637479;}catch{throw CliErrors[_0x157d49(0x1bd)](_0x157d49(0x1d0)+METADATA_FILE+':\x20'+_0x119b58);}}function remoteManifestOssPath(_0xba573e){const _0x44025e=a114_0x1b71;if(!_0xba573e||typeof _0xba573e!==_0x44025e(0x1b9)||Array[_0x44025e(0x1ca)](_0xba573e))return undefined;const _0xb4b09d=_0xba573e[_0x44025e(0x1c3)];return typeof _0xb4b09d===_0x44025e(0x1db)&&_0xb4b09d['trim']()?_0xb4b09d[_0x44025e(0x1d5)]():undefined;}
@@ -1 +1 @@
1
- const a113_0x73ddff=a113_0x18ca;(function(_0x11a0bb,_0x3c87ad){const _0x481de3=a113_0x18ca,_0x887436=_0x11a0bb();while(!![]){try{const _0xfe109a=-parseInt(_0x481de3(0x12a))/0x1+-parseInt(_0x481de3(0x12c))/0x2*(parseInt(_0x481de3(0x142))/0x3)+-parseInt(_0x481de3(0x13f))/0x4+parseInt(_0x481de3(0x132))/0x5*(-parseInt(_0x481de3(0x138))/0x6)+parseInt(_0x481de3(0x12f))/0x7+-parseInt(_0x481de3(0x143))/0x8*(parseInt(_0x481de3(0x139))/0x9)+parseInt(_0x481de3(0x136))/0xa;if(_0xfe109a===_0x3c87ad)break;else _0x887436['push'](_0x887436['shift']());}catch(_0x3b6979){_0x887436['push'](_0x887436['shift']());}}}(a113_0x39ab,0x2f42b));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3a8145={}){const _0x350c7e=a113_0x18ca,_0x548cdb=_0x3a8145[_0x350c7e(0x140)]??homedir(),_0x516288=resolve(_0x548cdb,PRODUCT_CONFIG['homeDirName'],_0x350c7e(0x13d)),_0x46fada=trimmedEnv(_0x350c7e(0x13c)),_0x3b5807=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x5e6ad3=resolve(_0x548cdb,_0x350c7e(0x13a)),_0x3c33c2=_0x3a8145[_0x350c7e(0x141)]??(existsSync(_0x5e6ad3)?resolve(_0x5e6ad3,_0x350c7e(0x137)):undefined);return{'homeDir':_0x548cdb,'cacheRoot':_0x516288,'managedRoot':resolve(_0x548cdb,PRODUCT_CONFIG[_0x350c7e(0x134)]),'agentsSkillsDir':_0x3a8145['agentsSkillsDir']??_0x46fada??resolve(_0x548cdb,_0x350c7e(0x133),_0x350c7e(0x137)),'claudeSkillsDir':_0x3a8145['claudeSkillsDir']??_0x3b5807??resolve(_0x548cdb,'.claude',_0x350c7e(0x137)),'workbuddySkillsDir':_0x3c33c2};}export function runtimeAgentSkillRoots(_0x2185dd){const _0x371156=a113_0x18ca;return[_0x2185dd['agentsSkillsDir'],_0x2185dd[_0x371156(0x12d)],_0x2185dd['workbuddySkillsDir']][_0x371156(0x13e)](_0x4518ad=>Boolean(_0x4518ad));}export function getRuntimeSkillCacheRoot(_0x16a2bf,_0xccd587,_0x47ca89={}){const _0x391f6e=a113_0x18ca,_0xad3600=resolveSkillSyncPaths(_0x47ca89);return resolve(_0xad3600[_0x391f6e(0x135)],_0x16a2bf,fingerprintAccessKey(_0xccd587),_0x391f6e(0x137));}export function getRuntimeSkillDir(_0x33d41c,_0x461db2,_0x3d6a75,_0xbbe70a,_0x353d1f,_0x4109b1={}){const _0x18fa0f=a113_0x18ca;return resolve(getRuntimeSkillCacheRoot(_0x33d41c,_0x461db2,_0x4109b1),safePathSegment(_0x3d6a75,'appCode'),_0xbbe70a,safePathSegment(_0x353d1f,_0x18fa0f(0x144)));}export function safePathSegment(_0x127773,_0x157a33=a113_0x73ddff(0x130)){const _0x43f76e=a113_0x73ddff;if(!_0x127773||_0x127773[_0x43f76e(0x13b)]('/')||_0x127773[_0x43f76e(0x13b)]('\x5c')||_0x127773['includes']('..'))throw CliErrors[_0x43f76e(0x131)](_0x43f76e(0x12e)+_0x157a33+_0x43f76e(0x12b)+_0x127773);return _0x127773;}function trimmedEnv(_0x273b00){const _0x5e1e7e=a113_0x73ddff,_0x15625f=productEnv(_0x273b00)?.[_0x5e1e7e(0x145)]();return _0x15625f?_0x15625f:undefined;}function a113_0x18ca(_0x58e27c,_0x4d794c){_0x58e27c=_0x58e27c-0x12a;const _0x39ab92=a113_0x39ab();let _0x18cade=_0x39ab92[_0x58e27c];return _0x18cade;}function a113_0x39ab(){const _0x2a73cc=['cacheRoot','8811710JJREAa','skills','1152VJckOu','155619lNKvZi','.workbuddy','includes','SKILL_ROOT','cache','filter','28704hHMTOJ','homeDir','workbuddySkillsDir','263481KcvyvE','32BZqgmB','skillCode','trim','311810NGCBfk','\x20for\x20local\x20path:\x20','4jEfLCd','claudeSkillsDir','Unsafe\x20','1017772BwCVOi','path\x20segment','validation','7010WPZTqq','.agents','homeDirName'];a113_0x39ab=function(){return _0x2a73cc;};return a113_0x39ab();}
1
+ const a115_0xa2ce94=a115_0x4a8f;(function(_0x2ac975,_0x2388fa){const _0xcedf7c=a115_0x4a8f,_0x5c4591=_0x2ac975();while(!![]){try{const _0x2d97ba=-parseInt(_0xcedf7c(0x11f))/0x1*(-parseInt(_0xcedf7c(0x128))/0x2)+parseInt(_0xcedf7c(0x123))/0x3+-parseInt(_0xcedf7c(0x11c))/0x4*(parseInt(_0xcedf7c(0x11d))/0x5)+-parseInt(_0xcedf7c(0x125))/0x6+parseInt(_0xcedf7c(0x115))/0x7*(-parseInt(_0xcedf7c(0x12b))/0x8)+-parseInt(_0xcedf7c(0x110))/0x9+parseInt(_0xcedf7c(0x11b))/0xa*(parseInt(_0xcedf7c(0x127))/0xb);if(_0x2d97ba===_0x2388fa)break;else _0x5c4591['push'](_0x5c4591['shift']());}catch(_0x185581){_0x5c4591['push'](_0x5c4591['shift']());}}}(a115_0xd24f,0x5f3ba));function a115_0x4a8f(_0x3d3c0e,_0x567474){_0x3d3c0e=_0x3d3c0e-0x110;const _0xd24ffd=a115_0xd24f();let _0x4a8f4c=_0xd24ffd[_0x3d3c0e];return _0x4a8f4c;}import{existsSync}from'node:fs';import{homedir}from'node:os';function a115_0xd24f(){const _0x5eed51=['cache','319hBkAoy','29468dwMohQ','agentsSkillsDir','appCode','4048ohgrvG','1463940buuaWX','trim','SKILL_ROOT','Unsafe\x20','homeDirName','8218yqbXmO','skillCode','claudeSkillsDir','skills','cacheRoot','includes','298840oUYcJK','930996FidLGb','5cEUEkE','CLAUDE_SKILL_ROOT','43JeiBmy','path\x20segment','workbuddySkillsDir','validation','52590xqPNWF','filter','829206RlrNSQ'];a115_0xd24f=function(){return _0x5eed51;};return a115_0xd24f();}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(_0x5de525={}){const _0x1d0387=a115_0x4a8f,_0x5f45cd=_0x5de525['homeDir']??homedir(),_0x2e0654=resolve(_0x5f45cd,PRODUCT_CONFIG[_0x1d0387(0x114)],_0x1d0387(0x126)),_0x46ce44=trimmedEnv(_0x1d0387(0x112)),_0xb631a0=trimmedEnv(_0x1d0387(0x11e)),_0x3f1c17=resolve(_0x5f45cd,'.workbuddy'),_0x34bd3c=_0x5de525[_0x1d0387(0x121)]??(existsSync(_0x3f1c17)?resolve(_0x3f1c17,_0x1d0387(0x118)):undefined);return{'homeDir':_0x5f45cd,'cacheRoot':_0x2e0654,'managedRoot':resolve(_0x5f45cd,PRODUCT_CONFIG[_0x1d0387(0x114)]),'agentsSkillsDir':_0x5de525['agentsSkillsDir']??_0x46ce44??resolve(_0x5f45cd,'.agents','skills'),'claudeSkillsDir':_0x5de525[_0x1d0387(0x117)]??_0xb631a0??resolve(_0x5f45cd,'.claude','skills'),'workbuddySkillsDir':_0x34bd3c};}export function runtimeAgentSkillRoots(_0x4e0631){const _0x38d470=a115_0x4a8f;return[_0x4e0631[_0x38d470(0x129)],_0x4e0631[_0x38d470(0x117)],_0x4e0631[_0x38d470(0x121)]][_0x38d470(0x124)](_0x35b189=>Boolean(_0x35b189));}export function getRuntimeSkillCacheRoot(_0x13cfff,_0x29a037,_0x28b659={}){const _0x5af3d2=a115_0x4a8f,_0x3dcdca=resolveSkillSyncPaths(_0x28b659);return resolve(_0x3dcdca[_0x5af3d2(0x119)],_0x13cfff,fingerprintAccessKey(_0x29a037),_0x5af3d2(0x118));}export function getRuntimeSkillDir(_0x242b3c,_0x314c2d,_0x119ea0,_0x258cbd,_0x98be0e,_0x11e48f={}){const _0x270866=a115_0x4a8f;return resolve(getRuntimeSkillCacheRoot(_0x242b3c,_0x314c2d,_0x11e48f),safePathSegment(_0x119ea0,_0x270866(0x12a)),_0x258cbd,safePathSegment(_0x98be0e,_0x270866(0x116)));}export function safePathSegment(_0x3e66a4,_0x2face3=a115_0xa2ce94(0x120)){const _0x224bb7=a115_0xa2ce94;if(!_0x3e66a4||_0x3e66a4[_0x224bb7(0x11a)]('/')||_0x3e66a4[_0x224bb7(0x11a)]('\x5c')||_0x3e66a4[_0x224bb7(0x11a)]('..'))throw CliErrors[_0x224bb7(0x122)](_0x224bb7(0x113)+_0x2face3+'\x20for\x20local\x20path:\x20'+_0x3e66a4);return _0x3e66a4;}function trimmedEnv(_0x391638){const _0x1eb96b=a115_0xa2ce94,_0x3bd19e=productEnv(_0x391638)?.[_0x1eb96b(0x111)]();return _0x3bd19e?_0x3bd19e:undefined;}
@@ -1 +1 @@
1
- (function(_0x403638,_0x2a9485){const _0x5289e5=a114_0x1f86,_0x49b307=_0x403638();while(!![]){try{const _0x45e98a=-parseInt(_0x5289e5(0x113))/0x1+-parseInt(_0x5289e5(0x142))/0x2+parseInt(_0x5289e5(0x121))/0x3+-parseInt(_0x5289e5(0x111))/0x4+parseInt(_0x5289e5(0x134))/0x5*(-parseInt(_0x5289e5(0x11a))/0x6)+parseInt(_0x5289e5(0x143))/0x7+parseInt(_0x5289e5(0x141))/0x8;if(_0x45e98a===_0x2a9485)break;else _0x49b307['push'](_0x49b307['shift']());}catch(_0x1c7766){_0x49b307['push'](_0x49b307['shift']());}}}(a114_0x4042,0x4e708));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a114_0x54f183}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(_0x3fa252,_0x77a0e6,_0x1b076a={}){const _0x439239=a114_0x1f86,_0x2ed683=resolvePushDirectoryRoot(_0x3fa252),_0x214204=readPushMetadataIfPresent(resolve(_0x2ed683,METADATA_FILE),{'ignoreInvalidMetadata':_0x1b076a['ignoreInvalidMetadata']});if(_0x214204?.['appCode']&&_0x214204[_0x439239(0x11b)]!==_0x77a0e6&&!_0x1b076a[_0x439239(0x136)]&&!_0x1b076a[_0x439239(0x129)])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x214204[_0x439239(0x11b)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x77a0e6+'\x22.');const _0x2fc96c=resolvePushSkillCode(_0x2ed683,_0x77a0e6,_0x214204,_0x1b076a);if(!_0x2fc96c)throw CliErrors[_0x439239(0x147)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x2ed683,'skillCode':_0x2fc96c,'metadata':_0x214204};}export function readPushDirectory(_0xb0dad1,_0x9b34da,_0x48691f={}){const _0x5c7a3d=a114_0x1f86,_0x3d1321=resolvePushDirectoryIdentity(_0xb0dad1,_0x9b34da,_0x48691f),_0x5d66a6=_0x3d1321[_0x5c7a3d(0x13d)],_0x3f3a54=resolve(_0x5d66a6,SKILL_FILE);if(!existsSync(_0x3f3a54)||!lstatSync(_0x3f3a54)[_0x5c7a3d(0x10f)]())throw CliErrors['validation'](_0x5c7a3d(0x12b)+SKILL_FILE+':\x20'+_0x3f3a54);const _0x217aee=_0x3d1321[_0x5c7a3d(0x126)],_0x7c96cb=_0x48691f[_0x5c7a3d(0x112)]??_0x5c7a3d(0x13c);if(!_0x48691f[_0x5c7a3d(0x137)]&&_0x217aee?.['scope']===_0x5c7a3d(0x145))throw CliErrors[_0x5c7a3d(0x147)](_0x5c7a3d(0x131)+METADATA_FILE+_0x5c7a3d(0x116)+_0x217aee[_0x5c7a3d(0x139)]+'\x22.');if(!_0x48691f['ignoreMetadataScope']&&_0x7c96cb===_0x5c7a3d(0x13c)&&_0x217aee?.['scope']&&_0x217aee[_0x5c7a3d(0x139)]!==_0x5c7a3d(0x13c))throw CliErrors[_0x5c7a3d(0x147)](_0x5c7a3d(0x144)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x217aee[_0x5c7a3d(0x139)]+'\x22.',_0x5c7a3d(0x12f)+_0x5d66a6+_0x5c7a3d(0x127));const _0x387325=scanSkillDirectory(_0x5d66a6),_0x23e2bc=buildSkillPackage(_0x387325),_0x490ab4=readFileSync(_0x3f3a54,_0x5c7a3d(0x123)),_0xbc9c48=_0x3d1321[_0x5c7a3d(0x11f)],_0x36e555=_0x48691f[_0x5c7a3d(0x13e)]?undefined:_0x217aee,_0x4703f1=readSkillDisplayName(_0x490ab4);return{'skillCode':_0xbc9c48,'metadata':_0x217aee,'frontmatterDisplayName':_0x4703f1,'input':{'skillCode':_0xbc9c48,'skillName':_0x4703f1??_0x36e555?.[_0x5c7a3d(0x10c)],'description':_0x36e555?.[_0x5c7a3d(0x12a)],'content':_0x490ab4,'files':_0x23e2bc['manifest'],'packageBase64':_0x23e2bc[_0x5c7a3d(0x132)],'tags':_0x36e555?.[_0x5c7a3d(0x12c)],'version':_0x36e555?.[_0x5c7a3d(0x115)],'sourceSessionId':_0x36e555?.[_0x5c7a3d(0x119)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3f9b5f,_0x5551fd,_0x51306c,_0x20568c={}){const _0x3ffe02=a114_0x1f86,_0x259997=resolvePushDirectoryRoot(_0x3f9b5f),_0x59fec4=readPushMetadataIfPresent(resolve(_0x259997,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5eec8a=requireRemoteScope(_0x5551fd),_0x59feb8=readLocalSkillContent(_0x259997),_0x7f37dc={..._0x5551fd,'appCode':_0x5551fd[_0x3ffe02(0x11b)]??_0x51306c,'skillName':_0x5551fd[_0x3ffe02(0x10c)]??_0x59fec4?.[_0x3ffe02(0x10c)],'description':_0x5551fd[_0x3ffe02(0x12a)]??_0x59fec4?.[_0x3ffe02(0x12a)],'tags':Array[_0x3ffe02(0x146)](_0x5551fd[_0x3ffe02(0x12c)])?_0x5551fd[_0x3ffe02(0x12c)]:_0x59fec4?.[_0x3ffe02(0x12c)],'sourceSessionId':_0x5551fd[_0x3ffe02(0x119)]??_0x59fec4?.[_0x3ffe02(0x119)],'content':_0x5551fd[_0x3ffe02(0x149)]??_0x59feb8},_0x52f1ad=buildMetadata(_0x7f37dc,_0x5eec8a,_0x51306c,contentHash(_0x59feb8),_0x20568c['refreshedAt']);writeJsonAtomic(resolve(_0x259997,METADATA_FILE),_0x52f1ad);}export function recordPushedRuntimeSkill(_0x10b61b,_0x51220b,_0x253025,_0x34513f={}){const _0x55e7ce=a114_0x1f86,_0x41d502=resolvePushDirectoryRoot(_0x10b61b),_0x45bfee=scanSkillDirectory(_0x41d502),_0x4392fe=_0x45bfee[_0x55e7ce(0x12e)](_0x2a8e8f=>_0x2a8e8f[_0x55e7ce(0x10d)]===SKILL_FILE),_0x813e96=_0x4392fe?fileText(_0x4392fe):'',_0x16a9fa=tryNormalizePackageManifest(_0x51220b['files']),_0x1316fb={..._0x51220b,'content':_0x51220b[_0x55e7ce(0x149)]??_0x813e96,'files':_0x16a9fa},_0xc6f1e1=_0x16a9fa?normalizeLocalFiles(_0x45bfee)[_0x55e7ce(0x122)](_0x109b1d=>_0x16a9fa[_0x55e7ce(0x114)][_0x55e7ce(0x133)](_0x2fe565=>_0x2fe565[_0x55e7ce(0x10d)]===_0x109b1d[_0x55e7ce(0x10d)])):undefined,_0x486b4d=buildMetadata(_0x1316fb,_0x34513f[_0x55e7ce(0x139)]??_0x55e7ce(0x13c),_0x253025,contentHash(_0x1316fb[_0x55e7ce(0x149)]??''),_0x34513f['pushedAt'],_0xc6f1e1);writeJsonAtomic(resolve(_0x41d502,METADATA_FILE),_0x486b4d);}export function deriveSkillCodeFromDirectory(_0x2e5867,_0x1b2651){const _0x302c6f=a114_0x1f86,_0x3f9871=basename(resolve(_0x2e5867)),_0x3f5801=_0x1b2651+'--';return _0x3f9871[_0x302c6f(0x117)](_0x3f5801)?_0x3f9871[_0x302c6f(0x128)](_0x3f5801[_0x302c6f(0x13b)]):_0x3f9871;}function resolvePushSkillCode(_0x3c7ba9,_0x58e7c9,_0x12436d,_0x3377de){const _0x5bdf78=a114_0x1f86,_0x1cc241=deriveSkillCodeFromSkillFile(_0x3c7ba9)||deriveSkillCodeFromDirectory(_0x3c7ba9,_0x58e7c9);if(_0x3377de[_0x5bdf78(0x12d)])return _0x1cc241;return _0x12436d?.['skillCode']?.[_0x5bdf78(0x124)]()||_0x1cc241;}function deriveSkillCodeFromSkillFile(_0x4cb98a){const _0x2420fe=a114_0x1f86,_0x5558f3=resolve(_0x4cb98a,SKILL_FILE);if(!existsSync(_0x5558f3)||!lstatSync(_0x5558f3)[_0x2420fe(0x10f)]())return undefined;const _0x4499b7=readFileSync(_0x5558f3,'utf8'),_0x9212e5=_0x4499b7['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x9212e5)return undefined;const _0x51eae0=parseFrontmatterObject(_0x9212e5[0x1]??''),_0x2b25ca=scalarToString(_0x51eae0?.[_0x2420fe(0x10b)]);return _0x2b25ca?slugifySkillName(_0x2b25ca):undefined;}function readSkillDisplayName(_0x589b2d){const _0x5a6acb=a114_0x1f86,_0x431a65=_0x589b2d[_0x5a6acb(0x138)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x431a65)return undefined;const _0x193acb=parseFrontmatterObject(_0x431a65[0x1]??'');return scalarToString(_0x193acb?.[_0x5a6acb(0x148)]);}function slugifySkillName(_0x4c2994){const _0x329110=a114_0x1f86,_0x4140e0=_0x4c2994['trim']()['toLowerCase']()[_0x329110(0x118)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x329110(0x118)](/^-+/,'')['replace'](/-+$/,'')[_0x329110(0x118)](/-{2,}/g,'-');if(!_0x4140e0)throw CliErrors[_0x329110(0x147)](_0x329110(0x11d)+SKILL_FILE+_0x329110(0x135));return _0x4140e0;}function a114_0x4042(){const _0x5f2e8f=['skillName','path','boolean','isFile','isDirectory','118980LAuYrL','targetScope','87540lUJChZ','files','version','\x20has\x20scope=\x22','startsWith','replace','sourceSessionId','12954hpZSNt','appCode','unknown','Invalid\x20','isSymbolicLink','skillCode','(unknown)','1624278XBwDVv','filter','utf8','trim','object','metadata','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','slice','ignoreMetadataAppCodeMismatch','description','Missing\x20','tags','ignoreMetadataSkillCode','find','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Remote\x20Skill\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','packageBase64','some','515gzuYVt','\x20name\x20for\x20SkillHub\x20slug\x20generation.','allowAppCodeRetarget','ignoreMetadataScope','match','scope','\x20has\x20unsupported\x20scope\x20\x22','length','personal','dir','ignoreMetadataForPayload','company','Skill\x20directory\x20not\x20found:\x20','1023424OtuYSs','20298KyvQwU','12215KnWXeF','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','builtin','isArray','validation','displayName','content','name'];a114_0x4042=function(){return _0x5f2e8f;};return a114_0x4042();}function parseFrontmatterObject(_0x331d90){const _0x599c98=a114_0x1f86;try{const _0x137606=a114_0x54f183(_0x331d90);return _0x137606&&typeof _0x137606===_0x599c98(0x125)&&!Array['isArray'](_0x137606)?_0x137606:undefined;}catch{return undefined;}}function scalarToString(_0x2cf987){const _0x3a7f0f=a114_0x1f86;if(typeof _0x2cf987==='string')return _0x2cf987[_0x3a7f0f(0x124)]();if(typeof _0x2cf987==='number'||typeof _0x2cf987===_0x3a7f0f(0x10e))return String(_0x2cf987);return undefined;}function a114_0x1f86(_0x2a9d5b,_0x31257c){_0x2a9d5b=_0x2a9d5b-0x10b;const _0x4042e8=a114_0x4042();let _0x1f861a=_0x4042e8[_0x2a9d5b];return _0x1f861a;}function resolvePushDirectoryRoot(_0x189d51){const _0x865960=a114_0x1f86,_0x55aca2=resolve(_0x189d51);if(!existsSync(_0x55aca2))throw CliErrors[_0x865960(0x147)]('Skill\x20directory\x20not\x20found:\x20'+_0x189d51);const _0x444f16=lstatSync(_0x55aca2);if(_0x444f16[_0x865960(0x110)]())return _0x55aca2;if(_0x444f16[_0x865960(0x11e)]()){const _0x31f41b=realpathSync(_0x55aca2);if(lstatSync(_0x31f41b)[_0x865960(0x110)]())return _0x31f41b;}throw CliErrors['validation'](_0x865960(0x140)+_0x189d51);}function requireRemoteScope(_0x5136fc){const _0x131ce3=a114_0x1f86;if(_0x5136fc['scope']===_0x131ce3(0x13c)||_0x5136fc[_0x131ce3(0x139)]===_0x131ce3(0x13f)||_0x5136fc[_0x131ce3(0x139)]===_0x131ce3(0x145))return _0x5136fc[_0x131ce3(0x139)];throw CliErrors[_0x131ce3(0x147)](_0x131ce3(0x130)+(_0x5136fc[_0x131ce3(0x11f)]||_0x131ce3(0x120))+_0x131ce3(0x13a)+(_0x5136fc[_0x131ce3(0x139)]??_0x131ce3(0x11c))+'\x22.');}function readLocalSkillContent(_0x215fd9){const _0x411438=a114_0x1f86,_0x36b70a=resolve(_0x215fd9,SKILL_FILE);return existsSync(_0x36b70a)&&lstatSync(_0x36b70a)['isFile']()?readFileSync(_0x36b70a,_0x411438(0x123)):'';}function readPushMetadataIfPresent(_0x3db8f8,_0x592e31={}){try{return readMetadataIfPresent(_0x3db8f8);}catch(_0x1afb9b){if(_0x592e31['ignoreInvalidMetadata'])return undefined;throw _0x1afb9b;}}
1
+ (function(_0x5d94cd,_0x3209d7){const _0x38ece2=a116_0x4ef1,_0xfb8de0=_0x5d94cd();while(!![]){try{const _0x81d5ef=-parseInt(_0x38ece2(0x186))/0x1*(parseInt(_0x38ece2(0x1af))/0x2)+parseInt(_0x38ece2(0x1a3))/0x3*(parseInt(_0x38ece2(0x1a6))/0x4)+-parseInt(_0x38ece2(0x1ad))/0x5+-parseInt(_0x38ece2(0x19c))/0x6+-parseInt(_0x38ece2(0x1b0))/0x7+parseInt(_0x38ece2(0x190))/0x8+parseInt(_0x38ece2(0x18d))/0x9;if(_0x81d5ef===_0x3209d7)break;else _0xfb8de0['push'](_0xfb8de0['shift']());}catch(_0x2d94f3){_0xfb8de0['push'](_0xfb8de0['shift']());}}}(a116_0x5eb8,0xa615c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a116_0x3ee954}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(_0x4a10a2,_0x178ffa,_0x4a6d10={}){const _0x3f3e8d=a116_0x4ef1,_0x2670d0=resolvePushDirectoryRoot(_0x4a10a2),_0x3fffa4=readPushMetadataIfPresent(resolve(_0x2670d0,METADATA_FILE),{'ignoreInvalidMetadata':_0x4a6d10[_0x3f3e8d(0x1b1)]});if(_0x3fffa4?.[_0x3f3e8d(0x185)]&&_0x3fffa4[_0x3f3e8d(0x185)]!==_0x178ffa&&!_0x4a6d10[_0x3f3e8d(0x180)]&&!_0x4a6d10['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x3f3e8d(0x1b5)](_0x3f3e8d(0x1a7)+_0x3fffa4[_0x3f3e8d(0x185)]+_0x3f3e8d(0x1a5)+_0x178ffa+'\x22.');const _0x2fba72=resolvePushSkillCode(_0x2670d0,_0x178ffa,_0x3fffa4,_0x4a6d10);if(!_0x2fba72)throw CliErrors[_0x3f3e8d(0x1b5)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x3f3e8d(0x177));return{'dir':_0x2670d0,'skillCode':_0x2fba72,'metadata':_0x3fffa4};}export function readPushDirectory(_0x5940cc,_0x4251f3,_0xf946a1={}){const _0x52cefe=a116_0x4ef1,_0x4c924b=resolvePushDirectoryIdentity(_0x5940cc,_0x4251f3,_0xf946a1),_0x19f399=_0x4c924b[_0x52cefe(0x198)],_0xad5cee=resolve(_0x19f399,SKILL_FILE);if(!existsSync(_0xad5cee)||!lstatSync(_0xad5cee)[_0x52cefe(0x18e)]())throw CliErrors[_0x52cefe(0x1b5)](_0x52cefe(0x179)+SKILL_FILE+':\x20'+_0xad5cee);const _0x5a87c7=_0x4c924b[_0x52cefe(0x1a2)],_0x130144=_0xf946a1[_0x52cefe(0x1b2)]??'personal';if(!_0xf946a1['ignoreMetadataScope']&&_0x5a87c7?.['scope']===_0x52cefe(0x192))throw CliErrors[_0x52cefe(0x1b5)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5a87c7[_0x52cefe(0x176)]+'\x22.');if(!_0xf946a1[_0x52cefe(0x187)]&&_0x130144===_0x52cefe(0x188)&&_0x5a87c7?.[_0x52cefe(0x176)]&&_0x5a87c7[_0x52cefe(0x176)]!==_0x52cefe(0x188))throw CliErrors['validation'](_0x52cefe(0x19e)+METADATA_FILE+_0x52cefe(0x1aa)+_0x5a87c7[_0x52cefe(0x176)]+'\x22.',_0x52cefe(0x178)+_0x19f399+_0x52cefe(0x19d));const _0x2ca268=scanSkillDirectory(_0x19f399),_0x586fea=buildSkillPackage(_0x2ca268),_0x54afe8=readFileSync(_0xad5cee,_0x52cefe(0x1a8)),_0x53da84=_0x4c924b[_0x52cefe(0x18b)],_0x720293=_0xf946a1['ignoreMetadataForPayload']?undefined:_0x5a87c7,_0x5749a6=readSkillDisplayName(_0x54afe8);return{'skillCode':_0x53da84,'metadata':_0x5a87c7,'frontmatterDisplayName':_0x5749a6,'input':{'skillCode':_0x53da84,'skillName':_0x5749a6??_0x720293?.[_0x52cefe(0x17b)],'description':_0x720293?.['description'],'content':_0x54afe8,'files':_0x586fea[_0x52cefe(0x1b3)],'packageBase64':_0x586fea[_0x52cefe(0x195)],'tags':_0x720293?.[_0x52cefe(0x1ab)],'version':_0x720293?.['version'],'sourceSessionId':_0x720293?.[_0x52cefe(0x191)]}};}function a116_0x4ef1(_0x3ca8fe,_0x22c49e){_0x3ca8fe=_0x3ca8fe-0x175;const _0x5eb8ed=a116_0x5eb8();let _0x4ef117=_0x5eb8ed[_0x3ca8fe];return _0x4ef117;}export function refreshPushDirectoryMetadataFromRemote(_0x3acb95,_0x3e76ce,_0x3bbd66,_0x49893c={}){const _0xde5bba=a116_0x4ef1,_0x51223a=resolvePushDirectoryRoot(_0x3acb95),_0x3674cf=readPushMetadataIfPresent(resolve(_0x51223a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x48d59f=requireRemoteScope(_0x3e76ce),_0x5bb728=readLocalSkillContent(_0x51223a),_0x4a519f={..._0x3e76ce,'appCode':_0x3e76ce['appCode']??_0x3bbd66,'skillName':_0x3e76ce[_0xde5bba(0x17b)]??_0x3674cf?.[_0xde5bba(0x17b)],'description':_0x3e76ce['description']??_0x3674cf?.[_0xde5bba(0x196)],'tags':Array[_0xde5bba(0x175)](_0x3e76ce[_0xde5bba(0x1ab)])?_0x3e76ce[_0xde5bba(0x1ab)]:_0x3674cf?.[_0xde5bba(0x1ab)],'sourceSessionId':_0x3e76ce['sourceSessionId']??_0x3674cf?.[_0xde5bba(0x191)],'content':_0x3e76ce[_0xde5bba(0x181)]??_0x5bb728},_0xb424d9=buildMetadata(_0x4a519f,_0x48d59f,_0x3bbd66,contentHash(_0x5bb728),_0x49893c[_0xde5bba(0x197)]);writeJsonAtomic(resolve(_0x51223a,METADATA_FILE),_0xb424d9);}export function recordPushedRuntimeSkill(_0x593767,_0x22afd1,_0x1a9d2c,_0x432e2b={}){const _0x2e5082=a116_0x4ef1,_0x5aca0f=resolvePushDirectoryRoot(_0x593767),_0x3a2641=scanSkillDirectory(_0x5aca0f),_0x162f3=_0x3a2641[_0x2e5082(0x18a)](_0x1c6a6e=>_0x1c6a6e[_0x2e5082(0x1ac)]===SKILL_FILE),_0x464624=_0x162f3?fileText(_0x162f3):'',_0x1f8e8b=tryNormalizePackageManifest(_0x22afd1[_0x2e5082(0x18f)]),_0x57ed0a={..._0x22afd1,'content':_0x22afd1[_0x2e5082(0x181)]??_0x464624,'files':_0x1f8e8b},_0x46579d=_0x1f8e8b?normalizeLocalFiles(_0x3a2641)[_0x2e5082(0x194)](_0x12c15f=>_0x1f8e8b[_0x2e5082(0x18f)][_0x2e5082(0x17e)](_0x391984=>_0x391984[_0x2e5082(0x1ac)]===_0x12c15f['path'])):undefined,_0x4a6a65=buildMetadata(_0x57ed0a,_0x432e2b[_0x2e5082(0x176)]??_0x2e5082(0x188),_0x1a9d2c,contentHash(_0x57ed0a[_0x2e5082(0x181)]??''),_0x432e2b[_0x2e5082(0x17c)],_0x46579d);writeJsonAtomic(resolve(_0x5aca0f,METADATA_FILE),_0x4a6a65);}export function deriveSkillCodeFromDirectory(_0x56c14f,_0x544879){const _0x4d4d73=a116_0x4ef1,_0xe87b02=basename(resolve(_0x56c14f)),_0x24dbd3=_0x544879+'--';return _0xe87b02[_0x4d4d73(0x19f)](_0x24dbd3)?_0xe87b02[_0x4d4d73(0x193)](_0x24dbd3[_0x4d4d73(0x19b)]):_0xe87b02;}function a116_0x5eb8(){const _0x432e86=['utf8','ignoreMetadataSkillCode','\x20has\x20scope=\x22','tags','path','1724575KoLRkr','object','1233330LmOgHD','341138khFVRo','ignoreInvalidMetadata','targetScope','manifest','company','validation','isArray','scope',',\x20or\x20directory\x20name.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Missing\x20','match','skillName','pushedAt','isDirectory','some','Skill\x20directory\x20not\x20found:\x20','allowAppCodeRetarget','content','isSymbolicLink','name','\x20has\x20unsupported\x20scope\x20\x22','appCode','1vcpSZl','ignoreMetadataScope','personal','replace','find','skillCode','displayName','4196592dDoFif','isFile','files','2408088dFUptA','sourceSessionId','builtin','slice','filter','packageBase64','description','refreshedAt','dir','(unknown)','unknown','length','1876488YshQDZ','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','startsWith','trim','toLowerCase','metadata','3057hIenFd','Invalid\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','4852DHCTHK','Skill\x20metadata\x20appCode\x20\x22'];a116_0x5eb8=function(){return _0x432e86;};return a116_0x5eb8();}function resolvePushSkillCode(_0x2b2cc9,_0xaa8a6,_0x5ad974,_0x521521){const _0xe67d43=a116_0x4ef1,_0x4f233b=deriveSkillCodeFromSkillFile(_0x2b2cc9)||deriveSkillCodeFromDirectory(_0x2b2cc9,_0xaa8a6);if(_0x521521[_0xe67d43(0x1a9)])return _0x4f233b;return _0x5ad974?.[_0xe67d43(0x18b)]?.[_0xe67d43(0x1a0)]()||_0x4f233b;}function deriveSkillCodeFromSkillFile(_0x21fef1){const _0x1eb0fe=a116_0x4ef1,_0xeca6ac=resolve(_0x21fef1,SKILL_FILE);if(!existsSync(_0xeca6ac)||!lstatSync(_0xeca6ac)[_0x1eb0fe(0x18e)]())return undefined;const _0x3f856b=readFileSync(_0xeca6ac,_0x1eb0fe(0x1a8)),_0x19fad2=_0x3f856b[_0x1eb0fe(0x17a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x19fad2)return undefined;const _0x419199=parseFrontmatterObject(_0x19fad2[0x1]??''),_0x257779=scalarToString(_0x419199?.[_0x1eb0fe(0x183)]);return _0x257779?slugifySkillName(_0x257779):undefined;}function readSkillDisplayName(_0x1e7eb1){const _0x497447=a116_0x4ef1,_0x530bd4=_0x1e7eb1[_0x497447(0x17a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x530bd4)return undefined;const _0x43c283=parseFrontmatterObject(_0x530bd4[0x1]??'');return scalarToString(_0x43c283?.[_0x497447(0x18c)]);}function slugifySkillName(_0x4b672a){const _0xae025=a116_0x4ef1,_0x114df0=_0x4b672a['trim']()[_0xae025(0x1a1)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0xae025(0x189)](/-+$/,'')[_0xae025(0x189)](/-{2,}/g,'-');if(!_0x114df0)throw CliErrors[_0xae025(0x1b5)](_0xae025(0x1a4)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x114df0;}function parseFrontmatterObject(_0x5c01a6){const _0x295380=a116_0x4ef1;try{const _0x18db07=a116_0x3ee954(_0x5c01a6);return _0x18db07&&typeof _0x18db07===_0x295380(0x1ae)&&!Array[_0x295380(0x175)](_0x18db07)?_0x18db07:undefined;}catch{return undefined;}}function scalarToString(_0x9f9b41){const _0x89544b=a116_0x4ef1;if(typeof _0x9f9b41==='string')return _0x9f9b41[_0x89544b(0x1a0)]();if(typeof _0x9f9b41==='number'||typeof _0x9f9b41==='boolean')return String(_0x9f9b41);return undefined;}function resolvePushDirectoryRoot(_0x588502){const _0x4a9f80=a116_0x4ef1,_0x350c69=resolve(_0x588502);if(!existsSync(_0x350c69))throw CliErrors[_0x4a9f80(0x1b5)](_0x4a9f80(0x17f)+_0x588502);const _0x22e78c=lstatSync(_0x350c69);if(_0x22e78c[_0x4a9f80(0x17d)]())return _0x350c69;if(_0x22e78c[_0x4a9f80(0x182)]()){const _0x4c7586=realpathSync(_0x350c69);if(lstatSync(_0x4c7586)['isDirectory']())return _0x4c7586;}throw CliErrors[_0x4a9f80(0x1b5)](_0x4a9f80(0x17f)+_0x588502);}function requireRemoteScope(_0xdfc5f7){const _0x45ebc1=a116_0x4ef1;if(_0xdfc5f7[_0x45ebc1(0x176)]===_0x45ebc1(0x188)||_0xdfc5f7[_0x45ebc1(0x176)]===_0x45ebc1(0x1b4)||_0xdfc5f7['scope']===_0x45ebc1(0x192))return _0xdfc5f7[_0x45ebc1(0x176)];throw CliErrors[_0x45ebc1(0x1b5)]('Remote\x20Skill\x20'+(_0xdfc5f7['skillCode']||_0x45ebc1(0x199))+_0x45ebc1(0x184)+(_0xdfc5f7[_0x45ebc1(0x176)]??_0x45ebc1(0x19a))+'\x22.');}function readLocalSkillContent(_0xdfabc){const _0x344dd1=a116_0x4ef1,_0x4834e9=resolve(_0xdfabc,SKILL_FILE);return existsSync(_0x4834e9)&&lstatSync(_0x4834e9)[_0x344dd1(0x18e)]()?readFileSync(_0x4834e9,_0x344dd1(0x1a8)):'';}function readPushMetadataIfPresent(_0x4a01fe,_0x9271fd={}){const _0x5151d3=a116_0x4ef1;try{return readMetadataIfPresent(_0x4a01fe);}catch(_0x382b90){if(_0x9271fd[_0x5151d3(0x1b1)])return undefined;throw _0x382b90;}}