@lovrabet/lovrabet-cli 2.1.19 → 2.1.20

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 (130) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.d.ts +12 -0
  88. package/lib/framework/preparse.js +1 -1
  89. package/lib/framework/rate-limit.js +1 -1
  90. package/lib/framework/raw-flags.d.ts +12 -0
  91. package/lib/framework/raw-flags.js +1 -0
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.js +1 -1
  99. package/lib/generated/build-info.d.ts +4 -4
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/runtime/event.js +1 -1
  103. package/lib/runtime/index.js +1 -1
  104. package/lib/runtime/queue.js +1 -1
  105. package/lib/runtime/resolve.js +1 -1
  106. package/lib/skills/npx-skills-add.js +1 -1
  107. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  108. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  109. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  110. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  111. package/lib/skills/runtime-skill-sync/links.js +1 -1
  112. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  113. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  114. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  115. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  116. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  117. package/lib/skills/runtime-skill-sync/push.js +1 -1
  118. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  119. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  120. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  121. package/lib/skills/runtime-skill-sync.js +1 -1
  122. package/lib/utils/apply-jq-filter.js +1 -1
  123. package/lib/utils/logger.js +1 -1
  124. package/lib/utils/lossless-json.js +1 -1
  125. package/lib/utils/params.js +1 -1
  126. package/lib/utils/platform.js +1 -1
  127. package/lib/utils/update-notice.js +1 -1
  128. package/lib/utils/version.js +1 -1
  129. package/lib/utils/write-cli-side-channel.js +1 -1
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- function a104_0x5565(){const _0x2fb6d6=['159920ibpStk','utf8','31713nssWvw','startsWith','247499FjJtaO','122125bPUtpL','isSymbolicLink','validation','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','99gehwwh','20pNSpEU','208epMsFg','split','254835pqvcBV','13fBGgWT','41184HqioYJ','.tmp','2ROwLgE','1134204SDadYf','30GQToFO','endsWith','Unsafe\x20Skill\x20file\x20path:\x20'];a104_0x5565=function(){return _0x2fb6d6;};return a104_0x5565();}(function(_0x35ab3a,_0x52b29d){const _0x2b0814=a104_0x5290,_0x3a021f=_0x35ab3a();while(!![]){try{const _0x196b9c=parseInt(_0x2b0814(0x84))/0x1*(parseInt(_0x2b0814(0x7d))/0x2)+-parseInt(_0x2b0814(0x79))/0x3+parseInt(_0x2b0814(0x8c))/0x4*(parseInt(_0x2b0814(0x87))/0x5)+-parseInt(_0x2b0814(0x7f))/0x6*(-parseInt(_0x2b0814(0x86))/0x7)+-parseInt(_0x2b0814(0x8d))/0x8*(-parseInt(_0x2b0814(0x7b))/0x9)+-parseInt(_0x2b0814(0x82))/0xa*(parseInt(_0x2b0814(0x8b))/0xb)+parseInt(_0x2b0814(0x7e))/0xc*(-parseInt(_0x2b0814(0x7a))/0xd);if(_0x196b9c===_0x52b29d)break;else _0x3a021f['push'](_0x3a021f['shift']());}catch(_0x1c1dcd){_0x3a021f['push'](_0x3a021f['shift']());}}}(a104_0x5565,0x1ed01));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';function a104_0x5290(_0x41c458,_0x5d71b0){_0x41c458=_0x41c458-0x79;const _0x556595=a104_0x5565();let _0x5290dc=_0x556595[_0x41c458];return _0x5290dc;}export function resolveManagedFilePath(_0x17548e,_0x1c99f6){const _0x4b9d4b=a104_0x5290,_0x39d5e8=normalizeSkillRelativePath(_0x1c99f6),_0x15bf0a=realOrResolved(_0x17548e),_0x2e646c=resolve(_0x15bf0a,..._0x39d5e8[_0x4b9d4b(0x8e)]('/'));if(!isPathInside(_0x2e646c,_0x15bf0a))throw CliErrors['validation'](_0x4b9d4b(0x81)+_0x1c99f6);return ensureNoSymlinkInManagedPath(_0x15bf0a,_0x39d5e8),_0x2e646c;}export function ensureNoSymlinkInManagedPath(_0x32b707,_0x37cf82){const _0x206a85=a104_0x5290;let _0x2fbbd3=_0x32b707;for(const _0x33b4b9 of _0x37cf82['split']('/')){_0x2fbbd3=resolve(_0x2fbbd3,_0x33b4b9);const _0x4e1dfe=lstatIfPresent(_0x2fbbd3);if(_0x4e1dfe?.[_0x206a85(0x88)]())throw CliErrors[_0x206a85(0x89)](_0x206a85(0x8a)+_0x37cf82);}}export function isDanglingSymlink(_0x2e0252){try{return lstatSync(_0x2e0252)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x15e372){const _0x1ebbda=readlinkSync(_0x15e372);return isAbsolute(_0x1ebbda)?_0x1ebbda:resolve(dirname(_0x15e372),_0x1ebbda);}export function isPathInside(_0x47d987,_0x16fd40){const _0x5e408c=a104_0x5290,_0x25f7d9=_0x47d987[_0x5e408c(0x80)](sep)?_0x47d987:''+_0x47d987+sep,_0x2efdf8=_0x16fd40['endsWith'](sep)?_0x16fd40:''+_0x16fd40+sep;return _0x47d987===_0x16fd40||_0x25f7d9[_0x5e408c(0x85)](_0x2efdf8);}export function realOrResolved(_0x4fa507){try{return realpathSync(_0x4fa507);}catch{return resolve(_0x4fa507);}}export function lstatIfPresent(_0x989f5f){try{return lstatSync(_0x989f5f);}catch{return undefined;}}export function writeTextAtomic(_0x4949d7,_0x4181f1,_0x28f7fa){const _0xfd2d92=a104_0x5290;writeBytesAtomic(_0x4949d7,Buffer['from'](_0x4181f1,_0xfd2d92(0x83)),_0x28f7fa);}export function writeBytesAtomic(_0x100451,_0x1844fa,_0x4c2777){const _0x16d2f2=a104_0x5290,_0x5334c3=_0x100451+_0x16d2f2(0x7c);try{writeFileSync(_0x5334c3,_0x1844fa,{'mode':_0x4c2777}),renameSync(_0x5334c3,_0x100451);}catch(_0x225379){try{rmSync(_0x5334c3,{'force':!![]});}catch{}throw _0x225379;}}export function writeJsonAtomic(_0x5f3bac,_0x140f7d){writeTextAtomic(_0x5f3bac,JSON['stringify'](_0x140f7d,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x4947c2,_0x3b7f86){const _0x3f2b31=a105_0x3860,_0x17ddd6=_0x4947c2();while(!![]){try{const _0x3c270e=-parseInt(_0x3f2b31(0x177))/0x1*(-parseInt(_0x3f2b31(0x170))/0x2)+parseInt(_0x3f2b31(0x16f))/0x3*(-parseInt(_0x3f2b31(0x176))/0x4)+parseInt(_0x3f2b31(0x16d))/0x5+parseInt(_0x3f2b31(0x171))/0x6*(parseInt(_0x3f2b31(0x174))/0x7)+parseInt(_0x3f2b31(0x16e))/0x8+-parseInt(_0x3f2b31(0x173))/0x9+parseInt(_0x3f2b31(0x179))/0xa;if(_0x3c270e===_0x3b7f86)break;else _0x17ddd6['push'](_0x17ddd6['shift']());}catch(_0x6c790c){_0x17ddd6['push'](_0x17ddd6['shift']());}}}(a105_0x1963,0x740c4));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(_0x2486af,_0x3611c5){const _0x50d4c2=a105_0x3860,_0x10e715=normalizeSkillRelativePath(_0x3611c5),_0x4fd8f7=realOrResolved(_0x2486af),_0x5a0267=resolve(_0x4fd8f7,..._0x10e715['split']('/'));if(!isPathInside(_0x5a0267,_0x4fd8f7))throw CliErrors[_0x50d4c2(0x16c)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x3611c5);return ensureNoSymlinkInManagedPath(_0x4fd8f7,_0x10e715),_0x5a0267;}export function ensureNoSymlinkInManagedPath(_0x8bfa7e,_0x4a18fe){const _0x5d0dc1=a105_0x3860;let _0x1e8927=_0x8bfa7e;for(const _0x4cf2ee of _0x4a18fe['split']('/')){_0x1e8927=resolve(_0x1e8927,_0x4cf2ee);const _0x54a6bb=lstatIfPresent(_0x1e8927);if(_0x54a6bb?.[_0x5d0dc1(0x16b)]())throw CliErrors[_0x5d0dc1(0x16c)](_0x5d0dc1(0x172)+_0x4a18fe);}}export function isDanglingSymlink(_0x1caa7c){const _0x3628cd=a105_0x3860;try{return lstatSync(_0x1caa7c)[_0x3628cd(0x16b)]();}catch{return![];}}export function resolveSymlinkTarget(_0x38a73a){const _0x43ef24=readlinkSync(_0x38a73a);return isAbsolute(_0x43ef24)?_0x43ef24:resolve(dirname(_0x38a73a),_0x43ef24);}export function isPathInside(_0x5dad08,_0x569300){const _0x1e91b6=a105_0x3860,_0x142570=_0x5dad08['endsWith'](sep)?_0x5dad08:''+_0x5dad08+sep,_0x29594e=_0x569300['endsWith'](sep)?_0x569300:''+_0x569300+sep;return _0x5dad08===_0x569300||_0x142570[_0x1e91b6(0x17a)](_0x29594e);}export function realOrResolved(_0x4cf7aa){try{return realpathSync(_0x4cf7aa);}catch{return resolve(_0x4cf7aa);}}export function lstatIfPresent(_0x5f7e70){try{return lstatSync(_0x5f7e70);}catch{return undefined;}}function a105_0x1963(){const _0x2ba8c8=['5308560TVkdbK','startsWith','isSymbolicLink','validation','1523725vXAdef','2984936OsGNZV','140703rvxsIi','4brMtic','30RTfyyZ','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','5211729HkACet','125048qMLpXK','from','36LdZCVh','89242dhJpob','utf8'];a105_0x1963=function(){return _0x2ba8c8;};return a105_0x1963();}export function writeTextAtomic(_0x7b15fd,_0x30904e,_0x55d3f5){const _0x98b439=a105_0x3860;writeBytesAtomic(_0x7b15fd,Buffer[_0x98b439(0x175)](_0x30904e,_0x98b439(0x178)),_0x55d3f5);}export function writeBytesAtomic(_0x4b9e8e,_0x53b9fe,_0x5c4c91){const _0x2b43cb=_0x4b9e8e+'.tmp';try{writeFileSync(_0x2b43cb,_0x53b9fe,{'mode':_0x5c4c91}),renameSync(_0x2b43cb,_0x4b9e8e);}catch(_0x275df4){try{rmSync(_0x2b43cb,{'force':!![]});}catch{}throw _0x275df4;}}function a105_0x3860(_0x35e889,_0x3082ab){_0x35e889=_0x35e889-0x16b;const _0x1963e6=a105_0x1963();let _0x3860fb=_0x1963e6[_0x35e889];return _0x3860fb;}export function writeJsonAtomic(_0x4d427e,_0x3c1567){writeTextAtomic(_0x4d427e,JSON['stringify'](_0x3c1567,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0xe06416,_0x463130){const _0x3aab31=a105_0x1428,_0x41da74=_0xe06416();while(!![]){try{const _0x49c476=-parseInt(_0x3aab31(0x1ec))/0x1*(parseInt(_0x3aab31(0x1e6))/0x2)+parseInt(_0x3aab31(0x1f1))/0x3+parseInt(_0x3aab31(0x1ea))/0x4+-parseInt(_0x3aab31(0x1e8))/0x5+-parseInt(_0x3aab31(0x1ee))/0x6+parseInt(_0x3aab31(0x1e9))/0x7+parseInt(_0x3aab31(0x1f0))/0x8*(-parseInt(_0x3aab31(0x1f2))/0x9);if(_0x49c476===_0x463130)break;else _0x41da74['push'](_0x41da74['shift']());}catch(_0x461f07){_0x41da74['push'](_0x41da74['shift']());}}}(a105_0x5a14,0x4db80));function a105_0x5a14(){const _0xf1415e=['digest','2cWKubU','path','66318cevvEy','update','8qMQXKx','717963WsdUAl','4071735DKBCiQ','hex','sha256','82778blzkdU','size','2394520zdtlDp','4384002ADfbLf','1911516jnImKB'];a105_0x5a14=function(){return _0xf1415e;};return a105_0x5a14();}function a105_0x1428(_0x160845,_0x34dd6a){_0x160845=_0x160845-0x1e5;const _0x5a1404=a105_0x5a14();let _0x1428dc=_0x5a1404[_0x160845];return _0x1428dc;}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x230989){const _0x33cfca=a105_0x1428;return createHash('sha256')[_0x33cfca(0x1ef)](_0x230989)[_0x33cfca(0x1eb)](_0x33cfca(0x1f3));}export function fileHash(_0x5dfbff){return bufferSha256(fileContent(_0x5dfbff));}export function bufferSha256(_0x3c874c){const _0x1a5b5=a105_0x1428;return createHash(_0x1a5b5(0x1e5))[_0x1a5b5(0x1ef)](_0x3c874c)['digest']('hex');}export function fileTreeHash(_0x599674){const _0x5a0912=a105_0x1428,_0x501c52=createHash(_0x5a0912(0x1e5));for(const _0x86185d of normalizeManifestFiles(_0x599674)){_0x501c52[_0x5a0912(0x1ef)](_0x86185d[_0x5a0912(0x1ed)]),_0x501c52[_0x5a0912(0x1ef)]('\x00'),_0x501c52[_0x5a0912(0x1ef)](_0x86185d[_0x5a0912(0x1e5)]),_0x501c52['update']('\x00'),_0x501c52[_0x5a0912(0x1ef)](String(_0x86185d[_0x5a0912(0x1e7)])),_0x501c52[_0x5a0912(0x1ef)]('\x00');}return _0x501c52[_0x5a0912(0x1eb)](_0x5a0912(0x1f3));}
1
+ (function(_0x53b5a0,_0xfae3f6){const _0x56d1b4=a106_0x309a,_0x47153c=_0x53b5a0();while(!![]){try{const _0x3f4d8f=parseInt(_0x56d1b4(0x189))/0x1+parseInt(_0x56d1b4(0x17f))/0x2+-parseInt(_0x56d1b4(0x17c))/0x3*(parseInt(_0x56d1b4(0x179))/0x4)+parseInt(_0x56d1b4(0x180))/0x5*(parseInt(_0x56d1b4(0x186))/0x6)+-parseInt(_0x56d1b4(0x17d))/0x7*(parseInt(_0x56d1b4(0x182))/0x8)+-parseInt(_0x56d1b4(0x17e))/0x9*(parseInt(_0x56d1b4(0x183))/0xa)+-parseInt(_0x56d1b4(0x185))/0xb*(-parseInt(_0x56d1b4(0x17a))/0xc);if(_0x3f4d8f===_0xfae3f6)break;else _0x47153c['push'](_0x47153c['shift']());}catch(_0x1b606e){_0x47153c['push'](_0x47153c['shift']());}}}(a106_0x7d44,0xe65ed));function a106_0x309a(_0x2e8549,_0x12be53){_0x2e8549=_0x2e8549-0x178;const _0x7d445d=a106_0x7d44();let _0x309af9=_0x7d445d[_0x2e8549];return _0x309af9;}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0xc32c75){const _0x15bc9a=a106_0x309a;return createHash(_0x15bc9a(0x184))['update'](_0xc32c75)['digest'](_0x15bc9a(0x178));}export function fileHash(_0x3ea280){return bufferSha256(fileContent(_0x3ea280));}function a106_0x7d44(){const _0x368705=['path','165392fOnsry','hex','4nCWjqN','126324RvqPhE','update','1537683SXtEVJ','4017692FTCVLV','12123NJeuBb','772724GKydnu','9265xiPNBF','digest','8ANLiNU','1480NobMWp','sha256','55zjltGQ','5262ZhMzOj','size'];a106_0x7d44=function(){return _0x368705;};return a106_0x7d44();}export function bufferSha256(_0x29fa4b){const _0x58a987=a106_0x309a;return createHash('sha256')[_0x58a987(0x17b)](_0x29fa4b)['digest'](_0x58a987(0x178));}export function fileTreeHash(_0x5e4676){const _0x2c11de=a106_0x309a,_0x2ccc69=createHash(_0x2c11de(0x184));for(const _0x7eac7d of normalizeManifestFiles(_0x5e4676)){_0x2ccc69[_0x2c11de(0x17b)](_0x7eac7d[_0x2c11de(0x188)]),_0x2ccc69[_0x2c11de(0x17b)]('\x00'),_0x2ccc69[_0x2c11de(0x17b)](_0x7eac7d[_0x2c11de(0x184)]),_0x2ccc69[_0x2c11de(0x17b)]('\x00'),_0x2ccc69[_0x2c11de(0x17b)](String(_0x7eac7d[_0x2c11de(0x187)])),_0x2ccc69[_0x2c11de(0x17b)]('\x00');}return _0x2ccc69[_0x2c11de(0x181)](_0x2c11de(0x178));}
@@ -1 +1 @@
1
- const a106_0x5b9259=a106_0x15c8;function a106_0x3a23(){const _0x4be16c=['409299JMuvGd','project','1417752AukEtC','.agents','514325fnaHrB','468612HRAAFI','freeze','39243gzMTfl','cwd','managedRoot','appCode','global','1235740dZTkGh','192626gGLguz'];a106_0x3a23=function(){return _0x4be16c;};return a106_0x3a23();}function a106_0x15c8(_0x440641,_0x28cae2){_0x440641=_0x440641-0x1da;const _0x3a232f=a106_0x3a23();let _0x15c8f2=_0x3a232f[_0x440641];return _0x15c8f2;}(function(_0x1c5c9c,_0x11ec30){const _0x4e1727=a106_0x15c8,_0x57d3af=_0x1c5c9c();while(!![]){try{const _0x225b72=-parseInt(_0x4e1727(0x1e6))/0x1+parseInt(_0x4e1727(0x1e5))/0x2+parseInt(_0x4e1727(0x1df))/0x3+parseInt(_0x4e1727(0x1dd))/0x4+parseInt(_0x4e1727(0x1e4))/0x5+parseInt(_0x4e1727(0x1da))/0x6+-parseInt(_0x4e1727(0x1dc))/0x7;if(_0x225b72===_0x11ec30)break;else _0x57d3af['push'](_0x57d3af['shift']());}catch(_0x59c1d5){_0x57d3af['push'](_0x57d3af['shift']());}}}(a106_0x3a23,0x3778d));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x50c97b,_0x4b2db0=a106_0x5b9259(0x1e3),_0x23d834={}){const _0x139e74=a106_0x5b9259,_0x712609=resolveSkillSyncPaths(_0x23d834),_0x27aff7=safePathSegment(_0x50c97b,_0x139e74(0x1e2)),_0x51e173=_0x4b2db0===_0x139e74(0x1e7)?[resolve(_0x23d834[_0x139e74(0x1e0)]??process[_0x139e74(0x1e0)](),_0x139e74(0x1db),'skills')]:runtimeAgentSkillRoots(_0x712609);return Object['freeze']({'scope':_0x4b2db0,'appCode':_0x27aff7,'skillRoots':Object[_0x139e74(0x1de)](_0x51e173),'managedRoot':_0x712609[_0x139e74(0x1e1)]});}
1
+ const a107_0x469883=a107_0x552a;function a107_0x552a(_0x5b5db0,_0x1e76a2){_0x5b5db0=_0x5b5db0-0xda;const _0x5d2780=a107_0x5d27();let _0x552a06=_0x5d2780[_0x5b5db0];return _0x552a06;}(function(_0x32f3bc,_0x4927cd){const _0x1d74f0=a107_0x552a,_0x257bd2=_0x32f3bc();while(!![]){try{const _0x312d8e=-parseInt(_0x1d74f0(0xda))/0x1+-parseInt(_0x1d74f0(0xdb))/0x2*(-parseInt(_0x1d74f0(0xdf))/0x3)+parseInt(_0x1d74f0(0xe9))/0x4+-parseInt(_0x1d74f0(0xe0))/0x5*(-parseInt(_0x1d74f0(0xe1))/0x6)+-parseInt(_0x1d74f0(0xde))/0x7+-parseInt(_0x1d74f0(0xe3))/0x8*(parseInt(_0x1d74f0(0xe5))/0x9)+-parseInt(_0x1d74f0(0xdd))/0xa;if(_0x312d8e===_0x4927cd)break;else _0x257bd2['push'](_0x257bd2['shift']());}catch(_0x285d48){_0x257bd2['push'](_0x257bd2['shift']());}}}(a107_0x5d27,0xbc8eb));function a107_0x5d27(){const _0x57dc69=['4251339qFEkVp','96335lWAwsn','270rmxqfi','project','4872848MUvmmF','cwd','9iKnKYw','.agents','global','freeze','444756jUTVqZ','146528KJyVEI','2cgaxmm','appCode','5965980FgxNix','1895278TYIFZy'];a107_0x5d27=function(){return _0x57dc69;};return a107_0x5d27();}import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x4047d0,_0x140541=a107_0x469883(0xe7),_0x54e137={}){const _0x1da6b8=a107_0x469883,_0x386a17=resolveSkillSyncPaths(_0x54e137),_0x5a36ac=safePathSegment(_0x4047d0,_0x1da6b8(0xdc)),_0xa8a650=_0x140541===_0x1da6b8(0xe2)?[resolve(_0x54e137[_0x1da6b8(0xe4)]??process[_0x1da6b8(0xe4)](),_0x1da6b8(0xe6),'skills')]:runtimeAgentSkillRoots(_0x386a17);return Object[_0x1da6b8(0xe8)]({'scope':_0x140541,'appCode':_0x5a36ac,'skillRoots':Object[_0x1da6b8(0xe8)](_0xa8a650),'managedRoot':_0x386a17['managedRoot']});}
@@ -1 +1 @@
1
- function a107_0x51e5(){const _0x164494=['1287552yxZsGB','scope','created','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','push','metadataPath','personal','7037120SiWTLt','isSymbolicLink','filter','removed','protectedLinkRoots','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','external-symlink','dir','managedRoot','1467131UztNeq','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','validation','runtime-observe','pruneSkillCodes','9485848kVIMTd','skillCode','linked-from-protected-root','values','1481586zppgBh','set','skillRoots','length','unchanged','map','project','skipped','accessKey','company','169443LnsnmI','name','12gsMmUL','isDirectory','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','contentHash','secret-retriever','updated','1470904dkIOiJ','skill','not-managed-symlink','appCode','trim','activeSkillCodes','scopes','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','10nJXTXh','has','agentsSkillsDir','get','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','7ZWqrKz','metadata-mismatch'];a107_0x51e5=function(){return _0x164494;};return a107_0x51e5();}const a107_0x1d0440=a107_0xb6b3;(function(_0x26efaf,_0x1e22a6){const _0x59476f=a107_0xb6b3,_0x3097ba=_0x26efaf();while(!![]){try{const _0x34a6f7=-parseInt(_0x59476f(0xdd))/0x1+parseInt(_0x59476f(0xbd))/0x2+parseInt(_0x59476f(0xe6))/0x3*(parseInt(_0x59476f(0xf2))/0x4)+-parseInt(_0x59476f(0xd4))/0x5+parseInt(_0x59476f(0xcd))/0x6+parseInt(_0x59476f(0xcb))/0x7*(parseInt(_0x59476f(0xe2))/0x8)+parseInt(_0x59476f(0xf0))/0x9*(parseInt(_0x59476f(0xc6))/0xa);if(_0x34a6f7===_0x1e22a6)break;else _0x3097ba['push'](_0x3097ba['shift']());}catch(_0x574c8f){_0x3097ba['push'](_0x3097ba['shift']());}}}(a107_0x51e5,0xb9f21));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a107_0x11ae38 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a107_0x11ae38,RESERVED_PROJECT_SKILL_CODES=new Set(['lovrabet',a107_0x1d0440(0xe0),a107_0x1d0440(0xbb)]);function a107_0xb6b3(_0x197015,_0x61266c){_0x197015=_0x197015-0xb8;const _0x51e50d=a107_0x51e5();let _0xb6b3c1=_0x51e50d[_0x197015];return _0xb6b3c1;}export function linkEffectiveRuntimeSkills(_0x54e2f6,_0x4decfe){const _0x3787c4=a107_0x1d0440,_0x309e2f=new Map();for(const _0xfb0103 of _0x54e2f6){const _0x4727b6=_0xfb0103['skill'][_0x3787c4(0xe3)];if(!_0x4727b6)continue;const _0x611f82=_0x309e2f[_0x3787c4(0xc9)](_0x4727b6);(!_0x611f82||_0xfb0103[_0x3787c4(0xce)]==='personal')&&_0x309e2f[_0x3787c4(0xe7)](_0x4727b6,_0xfb0103);}const _0x4dfe0d=[];for(const _0x427aaf of _0x309e2f[_0x3787c4(0xe5)]()){const _0x19b151=requireSkillCode(_0x427aaf['skill']),_0x2c018b=readMetadataIfPresent(_0x427aaf[_0x3787c4(0xd2)]);if(_0x2c018b?.[_0x3787c4(0xc0)]!==_0x4decfe[_0x3787c4(0xc0)]||_0x2c018b[_0x3787c4(0xe3)]!==_0x19b151)throw CliErrors['validation']('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x4decfe[_0x3787c4(0xc0)]+':\x20'+_0x427aaf[_0x3787c4(0xd2)]);const _0x2ae942=runtimeSkillLinkName(_0x4decfe,_0x19b151);for(const _0x432dd1 of _0x4decfe[_0x3787c4(0xe8)]){_0x4dfe0d['push'](ensureManagedSymlink(resolve(_0x432dd1,_0x2ae942),_0x427aaf[_0x3787c4(0xdb)],_0x4decfe,_0x19b151));}}return _0x4dfe0d;}export function pruneStaleRuntimeSkillLinks(_0x111eca,_0x1c2d38,_0x3c0bf7){const _0x3e91cb=a107_0x1d0440,_0x301dbd=new Set([..._0x1c2d38][_0x3e91cb(0xeb)](_0x9391d7=>_0x9391d7[_0x3e91cb(0xc1)]())[_0x3e91cb(0xd6)](Boolean)),_0x562996=_0x3c0bf7?new Set([..._0x3c0bf7][_0x3e91cb(0xeb)](_0x331f6b=>_0x331f6b[_0x3e91cb(0xc1)]())[_0x3e91cb(0xd6)](Boolean)):undefined,_0x44bf54=[];for(const _0x3dd796 of _0x111eca[_0x3e91cb(0xe8)]){for(const _0x24d397 of managedTargetSkillLinkPaths(_0x3dd796,_0x111eca)){const _0x2abb8d=runtimeSkillCodeFromLink(_0x111eca,_0x24d397);if(_0x562996&&!_0x562996['has'](_0x2abb8d))continue;if(_0x301dbd[_0x3e91cb(0xc7)](_0x2abb8d))continue;_0x44bf54[_0x3e91cb(0xd1)](removeManagedSkillLink(_0x24d397,_0x111eca,_0x2abb8d));}}return _0x44bf54;}export function pruneStaleRuntimeSkillCache(_0x23225d,_0x17164d={}){const _0x3c3735=a107_0x1d0440,_0xa96b2f=new Set([..._0x23225d[_0x3c3735(0xc2)]][_0x3c3735(0xeb)](_0x4e04cc=>_0x4e04cc[_0x3c3735(0xc1)]())[_0x3c3735(0xd6)](Boolean)),_0x37e46e=_0x23225d[_0x3c3735(0xe1)]?new Set([..._0x23225d[_0x3c3735(0xe1)]][_0x3c3735(0xeb)](_0x8ad4bc=>_0x8ad4bc[_0x3c3735(0xc1)]())[_0x3c3735(0xd6)](Boolean)):undefined,_0x41348c=_0x23225d[_0x3c3735(0xc3)]??[_0x3c3735(0xd3),_0x3c3735(0xef)],_0x2b087e=resolve(getRuntimeSkillCacheRoot(_0x23225d['env'],_0x23225d[_0x3c3735(0xee)],_0x17164d),safePathSegment(_0x23225d[_0x3c3735(0xc0)],_0x3c3735(0xc0))),_0x253acd=[];for(const _0x2f9204 of _0x41348c){const _0xc15d97=resolve(_0x2b087e,_0x2f9204);if(!existsSync(_0xc15d97))continue;for(const _0x556216 of readdirSync(_0xc15d97,{'withFileTypes':!![]})){if(!_0x556216[_0x3c3735(0xb8)]())continue;const _0x98b29b=_0x556216[_0x3c3735(0xf1)];if(_0x37e46e&&!_0x37e46e['has'](_0x98b29b))continue;if(_0xa96b2f['has'](_0x98b29b))continue;const _0x5686ea=resolve(_0xc15d97,_0x98b29b),_0x521d7d=readMetadataIfPresent(resolve(_0x5686ea,METADATA_FILE));if(_0x521d7d?.[_0x3c3735(0xc0)]!==_0x23225d[_0x3c3735(0xc0)]||_0x521d7d[_0x3c3735(0xce)]!==_0x2f9204||_0x521d7d[_0x3c3735(0xe3)]!==_0x98b29b){_0x253acd[_0x3c3735(0xd1)]({'path':_0x5686ea,'action':_0x3c3735(0xed),'reason':_0x3c3735(0xcc)});continue;}if(isLinkedFromAnyRoot(_0x5686ea,_0x23225d[_0x3c3735(0xd8)]??[])){_0x253acd['push']({'path':_0x5686ea,'action':_0x3c3735(0xed),'reason':_0x3c3735(0xe4)});continue;}removeSync(_0x5686ea),_0x253acd['push']({'path':_0x5686ea,'action':_0x3c3735(0xd7)});}}return _0x253acd;}export function linkGlobalRuntimeSkills(_0xa688b7,_0x48b02e={}){const _0x40ea4d=a107_0x1d0440,_0x3f7ce0=resolveSkillSyncPaths(_0x48b02e),_0x5c45c5=[];for(const _0x2ac56d of _0xa688b7){if(_0x2ac56d['scope']!=='builtin')throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x2ac56d[_0x40ea4d(0xce)]);const _0x2efb94=requireSkillCode(_0x2ac56d[_0x40ea4d(0xbe)]),_0x150cbc=copyManagedSkillDirectory(_0x2ac56d[_0x40ea4d(0xdb)],resolve(_0x3f7ce0[_0x40ea4d(0xc8)],_0x2efb94));_0x5c45c5[_0x40ea4d(0xd1)]({..._0x150cbc,'contentHash':_0x2ac56d[_0x40ea4d(0xba)]});}return _0x5c45c5;}function ensureManagedSymlink(_0x3dfca6,_0xb3fed6,_0x323e05,_0x7fd6d9){const _0x38b842=a107_0x1d0440;mkdirSync(dirname(_0x3dfca6),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3dfca6)||isDanglingSymlink(_0x3dfca6)){const _0x1e6a68=lstatSync(_0x3dfca6);if(!_0x1e6a68[_0x38b842(0xd5)]())throw CliErrors[_0x38b842(0xdf)](_0x38b842(0xb9)+_0x3dfca6);const _0x51bcf3=resolveSymlinkTarget(_0x3dfca6);if(!isPathInside(realOrResolved(_0x51bcf3),realOrResolved(_0x323e05[_0x38b842(0xdc)])))throw CliErrors[_0x38b842(0xdf)](_0x38b842(0xc4)+_0x3dfca6);if(realOrResolved(_0x51bcf3)===realOrResolved(_0xb3fed6))return{'path':_0x3dfca6,'target':_0xb3fed6,'action':_0x38b842(0xea)};const _0x1cb6e9=readMetadataIfPresent(resolve(_0x51bcf3,METADATA_FILE));if(_0x323e05[_0x38b842(0xce)]==='project'&&(_0x1cb6e9?.['appCode']!==_0x323e05[_0x38b842(0xc0)]||_0x1cb6e9[_0x38b842(0xe3)]!==_0x7fd6d9))throw CliErrors[_0x38b842(0xdf)](_0x38b842(0xca)+_0x3dfca6);return unlinkSync(_0x3dfca6),symlinkSync(_0xb3fed6,_0x3dfca6,_0x38b842(0xdb)),{'path':_0x3dfca6,'target':_0xb3fed6,'action':_0x38b842(0xbc)};}return symlinkSync(_0xb3fed6,_0x3dfca6,'dir'),{'path':_0x3dfca6,'target':_0xb3fed6,'action':_0x38b842(0xcf)};}function managedTargetSkillLinkPaths(_0x363975,_0x56176f){const _0x6584e6=a107_0x1d0440;if(!existsSync(_0x363975))return[];const _0x5b9140=_0x56176f[_0x6584e6(0xc0)]+'--';return readdirSync(_0x363975,{'withFileTypes':!![]})[_0x6584e6(0xd6)](_0x48f46e=>_0x56176f[_0x6584e6(0xce)]==='project'||_0x48f46e['name']['startsWith'](_0x5b9140))[_0x6584e6(0xeb)](_0x28e5a6=>resolve(_0x363975,_0x28e5a6[_0x6584e6(0xf1)]));}function removeManagedSkillLink(_0x43be73,_0x46acb0,_0x588715){const _0x225ff7=a107_0x1d0440,_0x4f0757=lstatIfPresent(_0x43be73);if(!_0x4f0757?.['isSymbolicLink']())return{'path':_0x43be73,'action':_0x225ff7(0xed),'reason':_0x225ff7(0xbf)};const _0x3c6a9f=resolveSymlinkTarget(_0x43be73);if(!isPathInside(realOrResolved(_0x3c6a9f),realOrResolved(_0x46acb0['managedRoot'])))return{'path':_0x43be73,'action':_0x225ff7(0xed),'reason':_0x225ff7(0xda)};const _0x51f5fc=readMetadataIfPresent(resolve(_0x3c6a9f,METADATA_FILE));if(_0x46acb0[_0x225ff7(0xce)]===_0x225ff7(0xec)&&(_0x51f5fc?.[_0x225ff7(0xc0)]!==_0x46acb0[_0x225ff7(0xc0)]||_0x51f5fc[_0x225ff7(0xe3)]!==_0x588715))return{'path':_0x43be73,'action':'skipped','reason':_0x225ff7(0xcc)};return unlinkSync(_0x43be73),{'path':_0x43be73,'action':_0x225ff7(0xd7)};}function isLinkedFromAnyRoot(_0x2ff753,_0x3c6af1){const _0xcf13dd=a107_0x1d0440,_0xd16d2=realOrResolved(_0x2ff753);for(const _0x25688d of _0x3c6af1){if(!existsSync(_0x25688d))continue;for(const _0x310712 of readdirSync(_0x25688d,{'withFileTypes':!![]})){if(!_0x310712[_0xcf13dd(0xd5)]())continue;const _0x373596=resolve(_0x25688d,_0x310712[_0xcf13dd(0xf1)]);if(realOrResolved(resolveSymlinkTarget(_0x373596))===_0xd16d2)return!![];}}return![];}function runtimeSkillLinkName(_0x53f45d,_0x92b2f1){const _0x3d4ed3=a107_0x1d0440,_0x22f928=safePathSegment(_0x92b2f1,_0x3d4ed3(0xe3));if(_0x53f45d['scope']===_0x3d4ed3(0xec)&&RESERVED_PROJECT_SKILL_CODES[_0x3d4ed3(0xc7)](_0x22f928))throw CliErrors[_0x3d4ed3(0xdf)](_0x3d4ed3(0xd9)+_0x22f928);return _0x53f45d[_0x3d4ed3(0xce)]===_0x3d4ed3(0xec)?_0x22f928:_0x53f45d[_0x3d4ed3(0xc0)]+'--'+_0x22f928;}function runtimeSkillCodeFromLink(_0x41f99b,_0x7841f8){const _0x5f12d3=a107_0x1d0440,_0x2ae934=basename(_0x7841f8);return _0x41f99b[_0x5f12d3(0xce)]===_0x5f12d3(0xec)?_0x2ae934:_0x2ae934['slice']((_0x41f99b[_0x5f12d3(0xc0)]+'--')[_0x5f12d3(0xe9)]);}export function copyManagedSkillDirectory(_0xa30071,_0x5c02c3){const _0x5889e5=a107_0x1d0440,_0x5623ed=resolve(_0x5c02c3,METADATA_FILE),_0x25d989=existsSync(_0x5c02c3);if(_0x25d989){const _0x4b8c5e=lstatSync(_0x5c02c3);if(_0x4b8c5e['isSymbolicLink']())throw CliErrors[_0x5889e5(0xdf)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x5c02c3);if(!_0x4b8c5e[_0x5889e5(0xb8)]())throw CliErrors[_0x5889e5(0xdf)](_0x5889e5(0xde)+_0x5c02c3);const _0x2bf6a4=readMetadataIfPresent(_0x5623ed);if(_0x2bf6a4?.[_0x5889e5(0xce)]!=='builtin')throw CliErrors[_0x5889e5(0xdf)](_0x5889e5(0xc5)+_0x5c02c3);}ensureDirSync(dirname(_0x5c02c3));const _0x1b7dde=_0x25d989?readMetadataIfPresent(_0x5623ed)?.[_0x5889e5(0xba)]:undefined,_0x25cab3=readMetadataIfPresent(resolve(_0xa30071,METADATA_FILE))?.[_0x5889e5(0xba)];return _0x25d989&&removeSync(_0x5c02c3),copySkillDirectory(_0xa30071,_0x5c02c3),{'path':_0x5c02c3,'target':_0xa30071,'action':!_0x25d989?_0x5889e5(0xcf):_0x1b7dde===_0x25cab3?'unchanged':_0x5889e5(0xbc)};}function copySkillDirectory(_0x100cc3,_0x577bf1){copySync(_0x100cc3,_0x577bf1,{'dereference':![],'overwrite':!![],'filter'(_0x2adfbe){const _0x3f7ec1=a107_0xb6b3;if(lstatSync(_0x2adfbe)['isSymbolicLink']())throw CliErrors[_0x3f7ec1(0xdf)](_0x3f7ec1(0xd0)+_0x2adfbe);return!![];}});}
1
+ function a108_0x1d72(){const _0x46cb6d=['personal','name','trim','values','appCode','not-managed-symlink','env','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','skill','external-symlink','unchanged','set','filter','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','length','pruneSkillCodes','4863312OzFspi','push','3044812XfROko','project','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isSymbolicLink','metadataPath','removed','524670RlVtWe','4iXizRI','72Mmevnp','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','created','isDirectory','agentsSkillsDir','protectedLinkRoots','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','1641564ktxNiX','scope','1723257cGnjBu','20LmXaSn','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','activeSkillCodes','dir','validation','linked-from-protected-root','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','get','managedRoot','accessKey','map','skillCode','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','updated','skipped','7977032gqWNfr','6933472BABpir','startsWith','slice','metadata-mismatch','contentHash','runtime-observe','has'];a108_0x1d72=function(){return _0x46cb6d;};return a108_0x1d72();}const a108_0x9f839b=a108_0x17ac;(function(_0x1a3aed,_0x138b00){const _0x5d9fc8=a108_0x17ac,_0x2e5e40=_0x1a3aed();while(!![]){try{const _0x52fe5d=-parseInt(_0x5d9fc8(0x10f))/0x1+parseInt(_0x5d9fc8(0x100))/0x2+-parseInt(_0x5d9fc8(0x111))/0x3*(-parseInt(_0x5d9fc8(0x107))/0x4)+-parseInt(_0x5d9fc8(0x106))/0x5*(-parseInt(_0x5d9fc8(0x108))/0x6)+parseInt(_0x5d9fc8(0x121))/0x7+-parseInt(_0x5d9fc8(0x122))/0x8+parseInt(_0x5d9fc8(0xfe))/0x9*(-parseInt(_0x5d9fc8(0x112))/0xa);if(_0x52fe5d===_0x138b00)break;else _0x2e5e40['push'](_0x2e5e40['shift']());}catch(_0x45a6e1){_0x2e5e40['push'](_0x2e5e40['shift']());}}}(a108_0x1d72,0xdd581));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a108_0x17bbcb from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a108_0x17bbcb,RESERVED_PROJECT_SKILL_CODES=new Set(['lovrabet',a108_0x9f839b(0xec),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x3e19e1,_0x4dd9ad){const _0x4816f7=a108_0x9f839b,_0x1c3d9f=new Map();for(const _0x15da28 of _0x3e19e1){const _0x4a4bcf=_0x15da28['skill'][_0x4816f7(0x11d)];if(!_0x4a4bcf)continue;const _0x4c5847=_0x1c3d9f[_0x4816f7(0x119)](_0x4a4bcf);(!_0x4c5847||_0x15da28[_0x4816f7(0x110)]==='personal')&&_0x1c3d9f[_0x4816f7(0xf9)](_0x4a4bcf,_0x15da28);}const _0x253d04=[];for(const _0x3ab587 of _0x1c3d9f[_0x4816f7(0xf1)]()){const _0x2c7fa8=requireSkillCode(_0x3ab587[_0x4816f7(0xf6)]),_0xae8250=readMetadataIfPresent(_0x3ab587[_0x4816f7(0x104)]);if(_0xae8250?.[_0x4816f7(0xf2)]!==_0x4dd9ad['appCode']||_0xae8250[_0x4816f7(0x11d)]!==_0x2c7fa8)throw CliErrors[_0x4816f7(0x116)](_0x4816f7(0x113)+_0x4dd9ad[_0x4816f7(0xf2)]+':\x20'+_0x3ab587['metadataPath']);const _0x269130=runtimeSkillLinkName(_0x4dd9ad,_0x2c7fa8);for(const _0x49b7e4 of _0x4dd9ad['skillRoots']){_0x253d04[_0x4816f7(0xff)](ensureManagedSymlink(resolve(_0x49b7e4,_0x269130),_0x3ab587['dir'],_0x4dd9ad,_0x2c7fa8));}}return _0x253d04;}export function pruneStaleRuntimeSkillLinks(_0xcffc80,_0x350b1b,_0x22b61f){const _0x2c60a8=a108_0x9f839b,_0x5afd62=new Set([..._0x350b1b][_0x2c60a8(0x11c)](_0x31f946=>_0x31f946[_0x2c60a8(0xf0)]())[_0x2c60a8(0xfa)](Boolean)),_0x5e6fb1=_0x22b61f?new Set([..._0x22b61f][_0x2c60a8(0x11c)](_0x310622=>_0x310622[_0x2c60a8(0xf0)]())['filter'](Boolean)):undefined,_0x126ed0=[];for(const _0x2ec975 of _0xcffc80['skillRoots']){for(const _0x3f624e of managedTargetSkillLinkPaths(_0x2ec975,_0xcffc80)){const _0x2ca8e8=runtimeSkillCodeFromLink(_0xcffc80,_0x3f624e);if(_0x5e6fb1&&!_0x5e6fb1['has'](_0x2ca8e8))continue;if(_0x5afd62[_0x2c60a8(0xed)](_0x2ca8e8))continue;_0x126ed0['push'](removeManagedSkillLink(_0x3f624e,_0xcffc80,_0x2ca8e8));}}return _0x126ed0;}export function pruneStaleRuntimeSkillCache(_0x7385e6,_0x310096={}){const _0x23f376=a108_0x9f839b,_0x1bc55e=new Set([..._0x7385e6[_0x23f376(0x114)]][_0x23f376(0x11c)](_0x34798d=>_0x34798d['trim']())[_0x23f376(0xfa)](Boolean)),_0x2cbdb0=_0x7385e6[_0x23f376(0xfd)]?new Set([..._0x7385e6['pruneSkillCodes']][_0x23f376(0x11c)](_0x2668ab=>_0x2668ab[_0x23f376(0xf0)]())[_0x23f376(0xfa)](Boolean)):undefined,_0xda0b1b=_0x7385e6['scopes']??[_0x23f376(0xee),'company'],_0x1ccb47=resolve(getRuntimeSkillCacheRoot(_0x7385e6[_0x23f376(0xf4)],_0x7385e6[_0x23f376(0x11b)],_0x310096),safePathSegment(_0x7385e6['appCode'],_0x23f376(0xf2))),_0x51908a=[];for(const _0x3f2126 of _0xda0b1b){const _0x1cfc51=resolve(_0x1ccb47,_0x3f2126);if(!existsSync(_0x1cfc51))continue;for(const _0x590cf4 of readdirSync(_0x1cfc51,{'withFileTypes':!![]})){if(!_0x590cf4[_0x23f376(0x10b)]())continue;const _0x453366=_0x590cf4[_0x23f376(0xef)];if(_0x2cbdb0&&!_0x2cbdb0[_0x23f376(0xed)](_0x453366))continue;if(_0x1bc55e[_0x23f376(0xed)](_0x453366))continue;const _0x5a2053=resolve(_0x1cfc51,_0x453366),_0x3ae7e0=readMetadataIfPresent(resolve(_0x5a2053,METADATA_FILE));if(_0x3ae7e0?.[_0x23f376(0xf2)]!==_0x7385e6['appCode']||_0x3ae7e0['scope']!==_0x3f2126||_0x3ae7e0['skillCode']!==_0x453366){_0x51908a[_0x23f376(0xff)]({'path':_0x5a2053,'action':'skipped','reason':_0x23f376(0xea)});continue;}if(isLinkedFromAnyRoot(_0x5a2053,_0x7385e6[_0x23f376(0x10d)]??[])){_0x51908a['push']({'path':_0x5a2053,'action':_0x23f376(0x120),'reason':_0x23f376(0x117)});continue;}removeSync(_0x5a2053),_0x51908a[_0x23f376(0xff)]({'path':_0x5a2053,'action':_0x23f376(0x105)});}}return _0x51908a;}export function linkGlobalRuntimeSkills(_0x52d77b,_0x570f1b={}){const _0x3dd1e1=a108_0x9f839b,_0xb3f27=resolveSkillSyncPaths(_0x570f1b),_0x58f949=[];for(const _0x3d4b6b of _0x52d77b){if(_0x3d4b6b[_0x3dd1e1(0x110)]!=='builtin')throw CliErrors[_0x3dd1e1(0x116)](_0x3dd1e1(0x102)+_0x3d4b6b['scope']);const _0x12cf3b=requireSkillCode(_0x3d4b6b['skill']),_0x1875c3=copyManagedSkillDirectory(_0x3d4b6b[_0x3dd1e1(0x115)],resolve(_0xb3f27[_0x3dd1e1(0x10c)],_0x12cf3b));_0x58f949[_0x3dd1e1(0xff)]({..._0x1875c3,'contentHash':_0x3d4b6b[_0x3dd1e1(0xeb)]});}return _0x58f949;}function a108_0x17ac(_0x32942d,_0x57cfd1){_0x32942d=_0x32942d-0xe8;const _0x1d7268=a108_0x1d72();let _0x17ac7b=_0x1d7268[_0x32942d];return _0x17ac7b;}function ensureManagedSymlink(_0x1e3be4,_0x57e87b,_0x57a55a,_0x58ec5d){const _0x129160=a108_0x9f839b;mkdirSync(dirname(_0x1e3be4),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1e3be4)||isDanglingSymlink(_0x1e3be4)){const _0x3e1a31=lstatSync(_0x1e3be4);if(!_0x3e1a31[_0x129160(0x103)]())throw CliErrors[_0x129160(0x116)](_0x129160(0x11e)+_0x1e3be4);const _0x164fbf=resolveSymlinkTarget(_0x1e3be4);if(!isPathInside(realOrResolved(_0x164fbf),realOrResolved(_0x57a55a['managedRoot'])))throw CliErrors[_0x129160(0x116)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x1e3be4);if(realOrResolved(_0x164fbf)===realOrResolved(_0x57e87b))return{'path':_0x1e3be4,'target':_0x57e87b,'action':_0x129160(0xf8)};const _0x3e7d4a=readMetadataIfPresent(resolve(_0x164fbf,METADATA_FILE));if(_0x57a55a['scope']===_0x129160(0x101)&&(_0x3e7d4a?.[_0x129160(0xf2)]!==_0x57a55a[_0x129160(0xf2)]||_0x3e7d4a[_0x129160(0x11d)]!==_0x58ec5d))throw CliErrors[_0x129160(0x116)](_0x129160(0xfb)+_0x1e3be4);return unlinkSync(_0x1e3be4),symlinkSync(_0x57e87b,_0x1e3be4,_0x129160(0x115)),{'path':_0x1e3be4,'target':_0x57e87b,'action':_0x129160(0x11f)};}return symlinkSync(_0x57e87b,_0x1e3be4,_0x129160(0x115)),{'path':_0x1e3be4,'target':_0x57e87b,'action':'created'};}function managedTargetSkillLinkPaths(_0x59a210,_0x16a874){const _0x7dc22b=a108_0x9f839b;if(!existsSync(_0x59a210))return[];const _0x440bba=_0x16a874['appCode']+'--';return readdirSync(_0x59a210,{'withFileTypes':!![]})['filter'](_0xf038b6=>_0x16a874[_0x7dc22b(0x110)]==='project'||_0xf038b6['name'][_0x7dc22b(0xe8)](_0x440bba))[_0x7dc22b(0x11c)](_0x4592ed=>resolve(_0x59a210,_0x4592ed[_0x7dc22b(0xef)]));}function removeManagedSkillLink(_0x261ffb,_0x414339,_0xee1d3f){const _0x598656=a108_0x9f839b,_0x273ef2=lstatIfPresent(_0x261ffb);if(!_0x273ef2?.[_0x598656(0x103)]())return{'path':_0x261ffb,'action':_0x598656(0x120),'reason':_0x598656(0xf3)};const _0x4f978c=resolveSymlinkTarget(_0x261ffb);if(!isPathInside(realOrResolved(_0x4f978c),realOrResolved(_0x414339[_0x598656(0x11a)])))return{'path':_0x261ffb,'action':_0x598656(0x120),'reason':_0x598656(0xf7)};const _0x4fc0e1=readMetadataIfPresent(resolve(_0x4f978c,METADATA_FILE));if(_0x414339[_0x598656(0x110)]==='project'&&(_0x4fc0e1?.[_0x598656(0xf2)]!==_0x414339[_0x598656(0xf2)]||_0x4fc0e1[_0x598656(0x11d)]!==_0xee1d3f))return{'path':_0x261ffb,'action':_0x598656(0x120),'reason':'metadata-mismatch'};return unlinkSync(_0x261ffb),{'path':_0x261ffb,'action':_0x598656(0x105)};}function isLinkedFromAnyRoot(_0x5c079e,_0xcaaa95){const _0x164ffa=a108_0x9f839b,_0x51e33b=realOrResolved(_0x5c079e);for(const _0x1468e0 of _0xcaaa95){if(!existsSync(_0x1468e0))continue;for(const _0x1e428 of readdirSync(_0x1468e0,{'withFileTypes':!![]})){if(!_0x1e428[_0x164ffa(0x103)]())continue;const _0x4b0d10=resolve(_0x1468e0,_0x1e428['name']);if(realOrResolved(resolveSymlinkTarget(_0x4b0d10))===_0x51e33b)return!![];}}return![];}function runtimeSkillLinkName(_0x495ffc,_0x3bcbc1){const _0x1cf147=a108_0x9f839b,_0x113e00=safePathSegment(_0x3bcbc1,_0x1cf147(0x11d));if(_0x495ffc['scope']===_0x1cf147(0x101)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x113e00))throw CliErrors[_0x1cf147(0x116)](_0x1cf147(0xf5)+_0x113e00);return _0x495ffc[_0x1cf147(0x110)]===_0x1cf147(0x101)?_0x113e00:_0x495ffc['appCode']+'--'+_0x113e00;}function runtimeSkillCodeFromLink(_0x1ed09a,_0x4bce61){const _0x2e8faf=a108_0x9f839b,_0x4040aa=basename(_0x4bce61);return _0x1ed09a[_0x2e8faf(0x110)]===_0x2e8faf(0x101)?_0x4040aa:_0x4040aa[_0x2e8faf(0xe9)]((_0x1ed09a[_0x2e8faf(0xf2)]+'--')[_0x2e8faf(0xfc)]);}export function copyManagedSkillDirectory(_0x1b29c6,_0x27a8f2){const _0x3e4dd2=a108_0x9f839b,_0x3008e8=resolve(_0x27a8f2,METADATA_FILE),_0x4e059f=existsSync(_0x27a8f2);if(_0x4e059f){const _0xd13285=lstatSync(_0x27a8f2);if(_0xd13285['isSymbolicLink']())throw CliErrors[_0x3e4dd2(0x116)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x27a8f2);if(!_0xd13285[_0x3e4dd2(0x10b)]())throw CliErrors[_0x3e4dd2(0x116)](_0x3e4dd2(0x109)+_0x27a8f2);const _0x329600=readMetadataIfPresent(_0x3008e8);if(_0x329600?.['scope']!=='builtin')throw CliErrors['validation'](_0x3e4dd2(0x118)+_0x27a8f2);}ensureDirSync(dirname(_0x27a8f2));const _0x17596b=_0x4e059f?readMetadataIfPresent(_0x3008e8)?.[_0x3e4dd2(0xeb)]:undefined,_0x7c9b16=readMetadataIfPresent(resolve(_0x1b29c6,METADATA_FILE))?.[_0x3e4dd2(0xeb)];return _0x4e059f&&removeSync(_0x27a8f2),copySkillDirectory(_0x1b29c6,_0x27a8f2),{'path':_0x27a8f2,'target':_0x1b29c6,'action':!_0x4e059f?_0x3e4dd2(0x10a):_0x17596b===_0x7c9b16?_0x3e4dd2(0xf8):_0x3e4dd2(0x11f)};}function copySkillDirectory(_0x2c8209,_0x273896){copySync(_0x2c8209,_0x273896,{'dereference':![],'overwrite':!![],'filter'(_0x3646ec){const _0x53474a=a108_0x17ac;if(lstatSync(_0x3646ec)[_0x53474a(0x103)]())throw CliErrors[_0x53474a(0x116)](_0x53474a(0x10e)+_0x3646ec);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x5da98f,_0x5445aa){const _0x15a9af=a108_0x945b,_0xa088f6=_0x5da98f();while(!![]){try{const _0x30a91b=parseInt(_0x15a9af(0x1a8))/0x1+-parseInt(_0x15a9af(0x184))/0x2*(-parseInt(_0x15a9af(0x187))/0x3)+parseInt(_0x15a9af(0x19f))/0x4+-parseInt(_0x15a9af(0x18d))/0x5+parseInt(_0x15a9af(0x193))/0x6*(-parseInt(_0x15a9af(0x1aa))/0x7)+parseInt(_0x15a9af(0x19d))/0x8*(parseInt(_0x15a9af(0x1ac))/0x9)+-parseInt(_0x15a9af(0x1a5))/0xa*(parseInt(_0x15a9af(0x19e))/0xb);if(_0x30a91b===_0x5445aa)break;else _0xa088f6['push'](_0xa088f6['shift']());}catch(_0x28ec01){_0xa088f6['push'](_0xa088f6['shift']());}}}(a108_0x5c6d,0xb3828));function a108_0x945b(_0x528368,_0x46b164){_0x528368=_0x528368-0x183;const _0x5c6d04=a108_0x5c6d();let _0x945bad=_0x5c6d04[_0x528368];return _0x945bad;}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';export function listLocalRuntimeSkills(_0x467a4b,_0x9b7a80,_0x3c0624={}){const _0x4dbaaa=a108_0x945b,_0x55230e=safePathSegment(_0x467a4b[_0x4dbaaa(0x18e)],_0x4dbaaa(0x18e));if(_0x9b7a80[_0x4dbaaa(0x18e)]!==_0x55230e)throw CliErrors[_0x4dbaaa(0x1a0)](_0x4dbaaa(0x1ae)+_0x9b7a80['appCode']+_0x4dbaaa(0x194)+_0x55230e);const _0x12f54c=normalizeRuntimeSkillScopes(_0x467a4b[_0x4dbaaa(0x18b)]),_0x3aef11=new Set(_0x12f54c),_0x50ee60=_0x467a4b[_0x4dbaaa(0x199)]?.[_0x4dbaaa(0x1af)](),_0x140c6c=new Map(),_0x438b11=resolve(getRuntimeSkillCacheRoot(_0x467a4b[_0x4dbaaa(0x186)],_0x467a4b['accessKey'],_0x3c0624),_0x55230e);for(const _0x3b5e9d of _0x12f54c){for(const _0x5baedf of localSkillEntryDirs(resolve(_0x438b11,_0x3b5e9d))){collectLocalRuntimeSkill(_0x140c6c,_0x5baedf,{'appCode':_0x55230e,'scopes':_0x3aef11,'code':_0x50ee60,'source':_0x4dbaaa(0x18f)});}}for(const _0x543d44 of _0x9b7a80['skillRoots']){for(const _0x28f918 of localSkillLinkCandidates(_0x543d44,_0x9b7a80,_0x3aef11)){collectLocalRuntimeSkill(_0x140c6c,_0x28f918,{'appCode':_0x55230e,'scopes':_0x3aef11,'code':_0x50ee60,'source':'link','linkedPath':_0x28f918});}}return Array[_0x4dbaaa(0x1a4)](_0x140c6c[_0x4dbaaa(0x1a1)]())[_0x4dbaaa(0x18c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x8c334a){const _0x5f140c=a108_0x945b;if(!existsSync(_0x8c334a))return[];return readdirSync(_0x8c334a,{'withFileTypes':!![]})['filter'](_0x26a487=>_0x26a487[_0x5f140c(0x190)]()||_0x26a487['isSymbolicLink']())[_0x5f140c(0x1a7)](_0x12f07a=>resolve(_0x8c334a,_0x12f07a[_0x5f140c(0x19b)]));}function localSkillLinkCandidates(_0x4557a4,_0x384ae5,_0x476fb7){const _0x170cac=a108_0x945b;if(!existsSync(_0x4557a4))return[];const _0x1df8e3=_0x384ae5[_0x170cac(0x18e)]+'--';return readdirSync(_0x4557a4,{'withFileTypes':!![]})['filter'](_0xbc73fb=>_0xbc73fb['isDirectory']()||_0xbc73fb[_0x170cac(0x191)]())[_0x170cac(0x183)](_0x2a4e80=>_0x384ae5[_0x170cac(0x188)]==='project'||_0x2a4e80[_0x170cac(0x19b)][_0x170cac(0x1ad)](_0x1df8e3)||_0x476fb7[_0x170cac(0x1a9)]('builtin'))[_0x170cac(0x1a7)](_0x129126=>resolve(_0x4557a4,_0x129126[_0x170cac(0x19b)]));}function a108_0x5c6d(){const _0x4d1358=['linkedPaths','localeCompare','linkedPath','code','includes','name','cacheDir','904NPSYEX','2851167STdwyI','3009844xxMUOY','validation','values','dir','metadataPath','from','50YjujtT','get','map','1093687HFdopL','has','14oiUBec','tags','65295nRzEkP','startsWith','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','trim','filter','649160uaPtYP','skillCode','env','6kwuSaX','scope','isArray','source','scopes','sort','2658710ThJuwR','appCode','cache','isDirectory','isSymbolicLink','local','2256372lkNdXi','\x20!=\x20','set'];a108_0x5c6d=function(){return _0x4d1358;};return a108_0x5c6d();}function collectLocalRuntimeSkill(_0x384f14,_0x3f4e06,_0x2dd8ea){const _0x52cbf8=a108_0x945b,_0x19a280=resolve(_0x3f4e06,METADATA_FILE),_0x2d733d=readMetadataIfPresent(_0x19a280);if(!_0x2d733d)return;if(_0x2d733d[_0x52cbf8(0x18e)]!==_0x2dd8ea[_0x52cbf8(0x18e)])return;if(!isRuntimeSkillScope(_0x2d733d[_0x52cbf8(0x188)])||!_0x2dd8ea['scopes'][_0x52cbf8(0x1a9)](_0x2d733d[_0x52cbf8(0x188)]))return;const _0x25538f=_0x2d733d[_0x52cbf8(0x185)]?.[_0x52cbf8(0x1af)]();if(!_0x25538f)return;if(_0x2dd8ea[_0x52cbf8(0x199)]&&_0x25538f!==_0x2dd8ea[_0x52cbf8(0x199)])return;const _0x38f03d=_0x2d733d[_0x52cbf8(0x188)]+':'+_0x25538f,_0x1b26f1=_0x2dd8ea[_0x52cbf8(0x198)]?[_0x2dd8ea[_0x52cbf8(0x198)]]:[],_0x4307ea=_0x384f14[_0x52cbf8(0x1a6)](_0x38f03d);if(_0x4307ea){_0x2dd8ea[_0x52cbf8(0x18a)]===_0x52cbf8(0x18f)&&(_0x4307ea[_0x52cbf8(0x1a2)]=_0x3f4e06,_0x4307ea[_0x52cbf8(0x19c)]=_0x3f4e06,_0x4307ea['skillMdPath']=resolve(_0x3f4e06,SKILL_FILE),_0x4307ea[_0x52cbf8(0x1a3)]=_0x19a280);for(const _0x35061d of _0x1b26f1){!_0x4307ea[_0x52cbf8(0x196)][_0x52cbf8(0x19a)](_0x35061d)&&_0x4307ea[_0x52cbf8(0x196)]['push'](_0x35061d);}_0x4307ea[_0x52cbf8(0x196)][_0x52cbf8(0x18c)]();return;}_0x384f14[_0x52cbf8(0x195)](_0x38f03d,{..._0x2d733d,'tags':Array[_0x52cbf8(0x189)](_0x2d733d[_0x52cbf8(0x1ab)])?_0x2d733d[_0x52cbf8(0x1ab)]:[],'scope':_0x2d733d[_0x52cbf8(0x188)],'source':_0x52cbf8(0x192),'dir':_0x3f4e06,'cacheDir':_0x2dd8ea[_0x52cbf8(0x18a)]===_0x52cbf8(0x18f)?_0x3f4e06:undefined,'skillMdPath':resolve(_0x3f4e06,SKILL_FILE),'metadataPath':_0x19a280,'linkedPaths':_0x1b26f1});}function compareLocalRuntimeSkills(_0x4b414a,_0x113869){const _0xf583ab=a108_0x945b,_0xc343aa={'personal':0x0,'company':0x1,'builtin':0x2};return _0xc343aa[_0x4b414a['scope']]-_0xc343aa[_0x113869[_0xf583ab(0x188)]]||_0x4b414a[_0xf583ab(0x185)][_0xf583ab(0x197)](_0x113869['skillCode'])||_0x4b414a[_0xf583ab(0x1a2)][_0xf583ab(0x197)](_0x113869['dir']);}
1
+ (function(_0x584589,_0x461594){const _0x2bfb9f=a109_0x2a4e,_0x34392c=_0x584589();while(!![]){try{const _0x1bf449=parseInt(_0x2bfb9f(0xe2))/0x1+-parseInt(_0x2bfb9f(0xd9))/0x2*(parseInt(_0x2bfb9f(0xd4))/0x3)+parseInt(_0x2bfb9f(0xcc))/0x4+-parseInt(_0x2bfb9f(0xd2))/0x5+-parseInt(_0x2bfb9f(0xd0))/0x6*(parseInt(_0x2bfb9f(0xe9))/0x7)+parseInt(_0x2bfb9f(0xec))/0x8*(parseInt(_0x2bfb9f(0xdd))/0x9)+parseInt(_0x2bfb9f(0xfc))/0xa*(parseInt(_0x2bfb9f(0xda))/0xb);if(_0x1bf449===_0x461594)break;else _0x34392c['push'](_0x34392c['shift']());}catch(_0x4e5f91){_0x34392c['push'](_0x34392c['shift']());}}}(a109_0x1069,0x2e5e9));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a109_0x1069(){const _0xd4d26b=['get','4MkwHDl','1654114WsjPWv','from','values','1052541PGxyxl','skillRoots','tags','sort','metadataPath','257659cRuGUG','code','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','cache','dir','scope','skillMdPath','1015784rUWxVE','link','startsWith','8fidMyJ','appCode','localeCompare','\x20!=\x20','isArray','source','includes','trim','set','local','skillCode','push','builtin','map','linkedPath','has','30CoyGtm','32612VMpqSQ','name','isDirectory','env','12jRaTcJ','scopes','1437520ySniph','cacheDir','99339wRApFa','filter','linkedPaths','isSymbolicLink'];a109_0x1069=function(){return _0xd4d26b;};return a109_0x1069();}import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x59c01f,_0x216ec1,_0x34d437={}){const _0x5146d3=a109_0x2a4e,_0x7eeff5=safePathSegment(_0x59c01f[_0x5146d3(0xed)],_0x5146d3(0xed));if(_0x216ec1[_0x5146d3(0xed)]!==_0x7eeff5)throw CliErrors['validation'](_0x5146d3(0xe4)+_0x216ec1['appCode']+_0x5146d3(0xef)+_0x7eeff5);const _0x49ee90=normalizeRuntimeSkillScopes(_0x59c01f[_0x5146d3(0xd1)]),_0x317c63=new Set(_0x49ee90),_0x191e21=_0x59c01f[_0x5146d3(0xe3)]?.['trim'](),_0x358c7a=new Map(),_0x20fdd5=resolve(getRuntimeSkillCacheRoot(_0x59c01f[_0x5146d3(0xcf)],_0x59c01f['accessKey'],_0x34d437),_0x7eeff5);for(const _0x1dd8b6 of _0x49ee90){for(const _0x37872b of localSkillEntryDirs(resolve(_0x20fdd5,_0x1dd8b6))){collectLocalRuntimeSkill(_0x358c7a,_0x37872b,{'appCode':_0x7eeff5,'scopes':_0x317c63,'code':_0x191e21,'source':_0x5146d3(0xe5)});}}for(const _0x468d0f of _0x216ec1[_0x5146d3(0xde)]){for(const _0x22b68d of localSkillLinkCandidates(_0x468d0f,_0x216ec1,_0x317c63)){collectLocalRuntimeSkill(_0x358c7a,_0x22b68d,{'appCode':_0x7eeff5,'scopes':_0x317c63,'code':_0x191e21,'source':_0x5146d3(0xea),'linkedPath':_0x22b68d});}}return Array[_0x5146d3(0xdb)](_0x358c7a[_0x5146d3(0xdc)]())[_0x5146d3(0xe0)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x5b531e){const _0x3ff793=a109_0x2a4e;if(!existsSync(_0x5b531e))return[];return readdirSync(_0x5b531e,{'withFileTypes':!![]})[_0x3ff793(0xd5)](_0x13d811=>_0x13d811[_0x3ff793(0xce)]()||_0x13d811['isSymbolicLink']())[_0x3ff793(0xf9)](_0x431de8=>resolve(_0x5b531e,_0x431de8['name']));}function a109_0x2a4e(_0x336c4b,_0x209df0){_0x336c4b=_0x336c4b-0xcc;const _0x10693e=a109_0x1069();let _0x2a4e3f=_0x10693e[_0x336c4b];return _0x2a4e3f;}function localSkillLinkCandidates(_0x30fef9,_0x58ef85,_0x2db3d8){const _0x25258d=a109_0x2a4e;if(!existsSync(_0x30fef9))return[];const _0x214b7e=_0x58ef85['appCode']+'--';return readdirSync(_0x30fef9,{'withFileTypes':!![]})[_0x25258d(0xd5)](_0x588ae7=>_0x588ae7[_0x25258d(0xce)]()||_0x588ae7[_0x25258d(0xd7)]())['filter'](_0x281739=>_0x58ef85['scope']==='project'||_0x281739[_0x25258d(0xcd)][_0x25258d(0xeb)](_0x214b7e)||_0x2db3d8[_0x25258d(0xfb)](_0x25258d(0xf8)))[_0x25258d(0xf9)](_0x85a8b0=>resolve(_0x30fef9,_0x85a8b0[_0x25258d(0xcd)]));}function collectLocalRuntimeSkill(_0x1dc765,_0x478259,_0x3af500){const _0x11b8fa=a109_0x2a4e,_0xefae82=resolve(_0x478259,METADATA_FILE),_0x521069=readMetadataIfPresent(_0xefae82);if(!_0x521069)return;if(_0x521069[_0x11b8fa(0xed)]!==_0x3af500['appCode'])return;if(!isRuntimeSkillScope(_0x521069[_0x11b8fa(0xe7)])||!_0x3af500['scopes'][_0x11b8fa(0xfb)](_0x521069[_0x11b8fa(0xe7)]))return;const _0x5ef941=_0x521069[_0x11b8fa(0xf6)]?.[_0x11b8fa(0xf3)]();if(!_0x5ef941)return;if(_0x3af500[_0x11b8fa(0xe3)]&&_0x5ef941!==_0x3af500[_0x11b8fa(0xe3)])return;const _0x3508c3=_0x521069[_0x11b8fa(0xe7)]+':'+_0x5ef941,_0x2adc39=_0x3af500[_0x11b8fa(0xfa)]?[_0x3af500[_0x11b8fa(0xfa)]]:[],_0x5099b8=_0x1dc765[_0x11b8fa(0xd8)](_0x3508c3);if(_0x5099b8){_0x3af500[_0x11b8fa(0xf1)]===_0x11b8fa(0xe5)&&(_0x5099b8['dir']=_0x478259,_0x5099b8[_0x11b8fa(0xd3)]=_0x478259,_0x5099b8[_0x11b8fa(0xe8)]=resolve(_0x478259,SKILL_FILE),_0x5099b8[_0x11b8fa(0xe1)]=_0xefae82);for(const _0x4785b of _0x2adc39){!_0x5099b8[_0x11b8fa(0xd6)][_0x11b8fa(0xf2)](_0x4785b)&&_0x5099b8[_0x11b8fa(0xd6)][_0x11b8fa(0xf7)](_0x4785b);}_0x5099b8[_0x11b8fa(0xd6)][_0x11b8fa(0xe0)]();return;}_0x1dc765[_0x11b8fa(0xf4)](_0x3508c3,{..._0x521069,'tags':Array[_0x11b8fa(0xf0)](_0x521069[_0x11b8fa(0xdf)])?_0x521069[_0x11b8fa(0xdf)]:[],'scope':_0x521069[_0x11b8fa(0xe7)],'source':_0x11b8fa(0xf5),'dir':_0x478259,'cacheDir':_0x3af500[_0x11b8fa(0xf1)]===_0x11b8fa(0xe5)?_0x478259:undefined,'skillMdPath':resolve(_0x478259,SKILL_FILE),'metadataPath':_0xefae82,'linkedPaths':_0x2adc39});}function compareLocalRuntimeSkills(_0x50480e,_0x666f24){const _0x3d330d=a109_0x2a4e,_0x5d37a8={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5d37a8[_0x50480e[_0x3d330d(0xe7)]]-_0x5d37a8[_0x666f24[_0x3d330d(0xe7)]]||_0x50480e[_0x3d330d(0xf6)]['localeCompare'](_0x666f24[_0x3d330d(0xf6)])||_0x50480e[_0x3d330d(0xe6)][_0x3d330d(0xee)](_0x666f24['dir']);}
@@ -1 +1 @@
1
- (function(_0x382964,_0x21904c){const _0x4cf9f1=a109_0x3a09,_0x16f9b7=_0x382964();while(!![]){try{const _0x34d53e=-parseInt(_0x4cf9f1(0xe1))/0x1*(-parseInt(_0x4cf9f1(0xfc))/0x2)+parseInt(_0x4cf9f1(0xe3))/0x3+-parseInt(_0x4cf9f1(0xea))/0x4+-parseInt(_0x4cf9f1(0x106))/0x5*(-parseInt(_0x4cf9f1(0xef))/0x6)+-parseInt(_0x4cf9f1(0xeb))/0x7+-parseInt(_0x4cf9f1(0xf4))/0x8*(parseInt(_0x4cf9f1(0xf0))/0x9)+parseInt(_0x4cf9f1(0xe4))/0xa*(-parseInt(_0x4cf9f1(0x105))/0xb);if(_0x34d53e===_0x21904c)break;else _0x16f9b7['push'](_0x16f9b7['shift']());}catch(_0x54f3d8){_0x16f9b7['push'](_0x16f9b7['shift']());}}}(a109_0x5553,0xb98a7));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a109_0x5553(){const _0x3d4c29=['isDirectory','string','Duplicate\x20Skill\x20file\x20path:\x20','replace','includes','315720fkBfpH','370377yLphsX','content','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isSafeInteger','1874310MEVngt','23121xGFHnK','from','test','sort','1752BhEoZW','has','trim','name','toString','path','validation','size','1969268hcXDQX','split','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','isSymbolicLink','bytes','sha256','object','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','19547zRbqUv','15DZFEcN','utf8','toLowerCase','isBuffer','values','isArray','set','1Nztfnh','compare','1887141zqoLkt','6170YbSGzO'];a109_0x5553=function(){return _0x3d4c29;};return a109_0x5553();}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(_0x3d5234){const _0x24ae58=a109_0x3a09;return _0x3d5234['bytes']??Buffer[_0x24ae58(0xf1)](_0x3d5234[_0x24ae58(0xec)]??'',_0x24ae58(0xdb));}export function fileText(_0x4fc483){const _0x5e3a64=a109_0x3a09;return fileContent(_0x4fc483)[_0x5e3a64(0xf8)](_0x5e3a64(0xdb));}function a109_0x3a09(_0x5496f4,_0x2c2858){_0x5496f4=_0x5496f4-0xdb;const _0x555346=a109_0x5553();let _0x3a09b5=_0x555346[_0x5496f4];return _0x3a09b5;}export function normalizeLocalFiles(_0x48d725){const _0x1b4ef7=a109_0x3a09;if(!Array[_0x1b4ef7(0xdf)](_0x48d725)||_0x48d725['length']===0x0)return[];const _0xd73647=new Map();for(const _0x3c2676 of _0x48d725){if(!_0x3c2676||typeof _0x3c2676!==_0x1b4ef7(0x102)||typeof _0x3c2676[_0x1b4ef7(0xf9)]!==_0x1b4ef7(0xe6))throw CliErrors[_0x1b4ef7(0xfa)](_0x1b4ef7(0x103));const _0x4f8fce=normalizeSkillRelativePath(_0x3c2676[_0x1b4ef7(0xf9)]);if(_0xd73647['has'](_0x4f8fce))throw CliErrors[_0x1b4ef7(0xfa)](_0x1b4ef7(0xe7)+_0x4f8fce);if(_0x3c2676[_0x1b4ef7(0x100)]!==undefined&&!Buffer[_0x1b4ef7(0xdd)](_0x3c2676[_0x1b4ef7(0x100)]))throw CliErrors[_0x1b4ef7(0xfa)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x4f8fce);if(_0x3c2676[_0x1b4ef7(0x100)]===undefined&&typeof _0x3c2676[_0x1b4ef7(0xec)]!==_0x1b4ef7(0xe6))throw CliErrors['validation'](_0x1b4ef7(0xed)+_0x4f8fce);const _0x33dde9=fileContent(_0x3c2676);_0xd73647[_0x1b4ef7(0xe0)](_0x4f8fce,{'path':_0x4f8fce,'bytes':_0x33dde9});}return Array[_0x1b4ef7(0xf1)](_0xd73647[_0x1b4ef7(0xde)]())[_0x1b4ef7(0xf3)](compareSkillFiles);}export function normalizeManifestFiles(_0x3a4d61){const _0xa0752c=a109_0x3a09;if(!Array[_0xa0752c(0xdf)](_0x3a4d61)||_0x3a4d61['length']===0x0)return[];const _0x3c6ae5=new Map();for(const _0x13067b of _0x3a4d61){if(!_0x13067b||typeof _0x13067b!==_0xa0752c(0x102)||typeof _0x13067b[_0xa0752c(0xf9)]!==_0xa0752c(0xe6))throw CliErrors[_0xa0752c(0xfa)](_0xa0752c(0x103));const _0x320379=normalizeSkillRelativePath(_0x13067b['path']);if(_0x3c6ae5[_0xa0752c(0xf5)](_0x320379))throw CliErrors[_0xa0752c(0xfa)](_0xa0752c(0xe7)+_0x320379);if(!isSha256Hex(_0x13067b[_0xa0752c(0x101)]))throw CliErrors[_0xa0752c(0xfa)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x320379);if(!Number[_0xa0752c(0xee)](_0x13067b[_0xa0752c(0xfb)])||_0x13067b['size']<0x0)throw CliErrors[_0xa0752c(0xfa)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x320379);_0x3c6ae5[_0xa0752c(0xe0)](_0x320379,{'path':_0x320379,'sha256':_0x13067b['sha256'][_0xa0752c(0xdc)](),'size':_0x13067b[_0xa0752c(0xfb)]});}return Array[_0xa0752c(0xf1)](_0x3c6ae5[_0xa0752c(0xde)]())[_0xa0752c(0xf3)](compareSkillFiles);}export function scanSkillDirectory(_0x1ba166){const _0x3d9935=realpathSync(_0x1ba166),_0x59d4a3=[];function _0x6129cc(_0x2543dd){const _0xfb88d6=a109_0x3a09,_0x3a22bc=readdirSync(_0x2543dd,{'withFileTypes':!![]})['sort']((_0x24b523,_0x5c0438)=>_0x24b523['name']['localeCompare'](_0x5c0438[_0xfb88d6(0xf7)]));for(const _0x51a988 of _0x3a22bc){if(_0x51a988['isDirectory']()&&IGNORED_DIR_NAMES[_0xfb88d6(0xf5)](_0x51a988[_0xfb88d6(0xf7)]))continue;if(IGNORED_FILE_NAMES[_0xfb88d6(0xf5)](_0x51a988[_0xfb88d6(0xf7)]))continue;const _0x2bf282=resolve(_0x2543dd,_0x51a988[_0xfb88d6(0xf7)]);if(_0x51a988[_0xfb88d6(0xff)]())throw CliErrors[_0xfb88d6(0xfa)](_0xfb88d6(0xfe)+_0x2bf282);const _0x3031c2=toPosixPath(relative(_0x3d9935,_0x2bf282));if(_0x51a988[_0xfb88d6(0xe5)]()){_0x6129cc(_0x2bf282);continue;}if(!_0x51a988[_0xfb88d6(0x104)]())continue;validateSkillRelativePath(_0x3031c2);const _0x2a146a=readFileSync(_0x2bf282);_0x59d4a3['push']({'path':_0x3031c2,'bytes':_0x2a146a});}}return _0x6129cc(_0x3d9935),normalizeLocalFiles(_0x59d4a3);}export function compareSkillFiles(_0x5d27f2,_0x30859e){const _0x326ea7=a109_0x3a09;if(_0x5d27f2[_0x326ea7(0xf9)]===SKILL_FILE)return _0x30859e['path']===SKILL_FILE?0x0:-0x1;if(_0x30859e[_0x326ea7(0xf9)]===SKILL_FILE)return 0x1;return Buffer[_0x326ea7(0xe2)](Buffer[_0x326ea7(0xf1)](_0x5d27f2['path'],_0x326ea7(0xdb)),Buffer[_0x326ea7(0xf1)](_0x30859e[_0x326ea7(0xf9)],_0x326ea7(0xdb)));}export function normalizeSkillRelativePath(_0x185d20){const _0x280df3=a109_0x3a09,_0x54b863=toPosixPath(_0x185d20[_0x280df3(0xf6)]());return validateSkillRelativePath(_0x54b863),_0x54b863;}export function validateSkillRelativePath(_0x31f3b5){const _0x25ca6a=a109_0x3a09;if(!_0x31f3b5||_0x31f3b5['startsWith']('/')||_0x31f3b5[_0x25ca6a(0xe9)]('//'))throw CliErrors[_0x25ca6a(0xfa)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x31f3b5);for(const _0x279232 of _0x31f3b5[_0x25ca6a(0xfd)]('/')){if(!_0x279232||_0x279232==='.'||_0x279232==='..')throw CliErrors[_0x25ca6a(0xfa)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x31f3b5);}}export function toPosixPath(_0x23b282){const _0x37df6d=a109_0x3a09;return _0x23b282[_0x37df6d(0xe8)](/\\/g,'/');}export function isSha256Hex(_0x5ba983){const _0x6dc0ab=a109_0x3a09;return typeof _0x5ba983===_0x6dc0ab(0xe6)&&/^[a-fA-F0-9]{64}$/[_0x6dc0ab(0xf2)](_0x5ba983);}
1
+ (function(_0x478c76,_0x33c307){const _0x41640f=a110_0x5a14,_0x4a6b34=_0x478c76();while(!![]){try{const _0x338f6b=parseInt(_0x41640f(0x1c6))/0x1+parseInt(_0x41640f(0x1b4))/0x2+parseInt(_0x41640f(0x1bb))/0x3*(parseInt(_0x41640f(0x1d6))/0x4)+parseInt(_0x41640f(0x1c7))/0x5+parseInt(_0x41640f(0x1c0))/0x6*(parseInt(_0x41640f(0x1d0))/0x7)+-parseInt(_0x41640f(0x1ce))/0x8*(-parseInt(_0x41640f(0x1cb))/0x9)+-parseInt(_0x41640f(0x1b2))/0xa*(parseInt(_0x41640f(0x1bd))/0xb);if(_0x338f6b===_0x33c307)break;else _0x4a6b34['push'](_0x4a6b34['shift']());}catch(_0xf49995){_0x4a6b34['push'](_0x4a6b34['shift']());}}}(a110_0x5d4f,0x53fed));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(_0x148dff){const _0x592920=a110_0x5a14;return _0x148dff[_0x592920(0x1b7)]??Buffer[_0x592920(0x1c2)](_0x148dff['content']??'',_0x592920(0x1d2));}function a110_0x5d4f(){const _0x1c58c0=['from','replace','startsWith','split','201997gThjRT','3126500ymLjVH','length','has','test','9CPllwK','trim','name','1241840PNcWrr','Unsafe\x20Skill\x20file\x20path:\x20','1610JRJmen','content','utf8','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','set','compare','20JhhPDp','string','size','sort','isDirectory','values','path','toString','19155890dCXfjF','Skill\x20file\x20size\x20is\x20invalid:\x20','1112064LbXGWy','Duplicate\x20Skill\x20file\x20path:\x20','isArray','bytes','isSafeInteger','push','Skill\x20file\x20sha256\x20is\x20invalid:\x20','65427ieyQGq','localeCompare','11XRKigo','validation','Skill\x20file\x20path\x20must\x20be\x20text.','15966lrIZeN','isFile'];a110_0x5d4f=function(){return _0x1c58c0;};return a110_0x5d4f();}function a110_0x5a14(_0x11f45a,_0x1b86a4){_0x11f45a=_0x11f45a-0x1b2;const _0x5d4fc2=a110_0x5d4f();let _0x5a1460=_0x5d4fc2[_0x11f45a];return _0x5a1460;}export function fileText(_0x4d5325){const _0x530834=a110_0x5a14;return fileContent(_0x4d5325)[_0x530834(0x1dd)]('utf8');}export function normalizeLocalFiles(_0x190750){const _0x32c92e=a110_0x5a14;if(!Array[_0x32c92e(0x1b6)](_0x190750)||_0x190750[_0x32c92e(0x1c8)]===0x0)return[];const _0x42325f=new Map();for(const _0x4daeb1 of _0x190750){if(!_0x4daeb1||typeof _0x4daeb1!=='object'||typeof _0x4daeb1['path']!==_0x32c92e(0x1d7))throw CliErrors['validation'](_0x32c92e(0x1bf));const _0xfbe6d0=normalizeSkillRelativePath(_0x4daeb1[_0x32c92e(0x1dc)]);if(_0x42325f[_0x32c92e(0x1c9)](_0xfbe6d0))throw CliErrors['validation'](_0x32c92e(0x1b5)+_0xfbe6d0);if(_0x4daeb1[_0x32c92e(0x1b7)]!==undefined&&!Buffer['isBuffer'](_0x4daeb1[_0x32c92e(0x1b7)]))throw CliErrors[_0x32c92e(0x1be)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0xfbe6d0);if(_0x4daeb1['bytes']===undefined&&typeof _0x4daeb1[_0x32c92e(0x1d1)]!==_0x32c92e(0x1d7))throw CliErrors[_0x32c92e(0x1be)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0xfbe6d0);const _0x30d815=fileContent(_0x4daeb1);_0x42325f[_0x32c92e(0x1d4)](_0xfbe6d0,{'path':_0xfbe6d0,'bytes':_0x30d815});}return Array[_0x32c92e(0x1c2)](_0x42325f[_0x32c92e(0x1db)]())[_0x32c92e(0x1d9)](compareSkillFiles);}export function normalizeManifestFiles(_0x4bff51){const _0x1dcb82=a110_0x5a14;if(!Array[_0x1dcb82(0x1b6)](_0x4bff51)||_0x4bff51['length']===0x0)return[];const _0x4a27df=new Map();for(const _0x2ece8c of _0x4bff51){if(!_0x2ece8c||typeof _0x2ece8c!=='object'||typeof _0x2ece8c[_0x1dcb82(0x1dc)]!=='string')throw CliErrors[_0x1dcb82(0x1be)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x25b7c1=normalizeSkillRelativePath(_0x2ece8c['path']);if(_0x4a27df['has'](_0x25b7c1))throw CliErrors[_0x1dcb82(0x1be)](_0x1dcb82(0x1b5)+_0x25b7c1);if(!isSha256Hex(_0x2ece8c['sha256']))throw CliErrors[_0x1dcb82(0x1be)](_0x1dcb82(0x1ba)+_0x25b7c1);if(!Number[_0x1dcb82(0x1b8)](_0x2ece8c[_0x1dcb82(0x1d8)])||_0x2ece8c[_0x1dcb82(0x1d8)]<0x0)throw CliErrors[_0x1dcb82(0x1be)](_0x1dcb82(0x1b3)+_0x25b7c1);_0x4a27df[_0x1dcb82(0x1d4)](_0x25b7c1,{'path':_0x25b7c1,'sha256':_0x2ece8c['sha256']['toLowerCase'](),'size':_0x2ece8c[_0x1dcb82(0x1d8)]});}return Array[_0x1dcb82(0x1c2)](_0x4a27df[_0x1dcb82(0x1db)]())[_0x1dcb82(0x1d9)](compareSkillFiles);}export function scanSkillDirectory(_0x1cc166){const _0x49c12c=realpathSync(_0x1cc166),_0x3f672d=[];function _0x10b89e(_0x46d3e0){const _0xbd10fe=a110_0x5a14,_0x19c976=readdirSync(_0x46d3e0,{'withFileTypes':!![]})[_0xbd10fe(0x1d9)]((_0x5603cc,_0x1a5afc)=>_0x5603cc[_0xbd10fe(0x1cd)][_0xbd10fe(0x1bc)](_0x1a5afc[_0xbd10fe(0x1cd)]));for(const _0x116452 of _0x19c976){if(_0x116452['isDirectory']()&&IGNORED_DIR_NAMES['has'](_0x116452['name']))continue;if(IGNORED_FILE_NAMES[_0xbd10fe(0x1c9)](_0x116452[_0xbd10fe(0x1cd)]))continue;const _0x26305f=resolve(_0x46d3e0,_0x116452[_0xbd10fe(0x1cd)]);if(_0x116452['isSymbolicLink']())throw CliErrors[_0xbd10fe(0x1be)](_0xbd10fe(0x1d3)+_0x26305f);const _0x4f82cd=toPosixPath(relative(_0x49c12c,_0x26305f));if(_0x116452[_0xbd10fe(0x1da)]()){_0x10b89e(_0x26305f);continue;}if(!_0x116452[_0xbd10fe(0x1c1)]())continue;validateSkillRelativePath(_0x4f82cd);const _0x2be75e=readFileSync(_0x26305f);_0x3f672d[_0xbd10fe(0x1b9)]({'path':_0x4f82cd,'bytes':_0x2be75e});}}return _0x10b89e(_0x49c12c),normalizeLocalFiles(_0x3f672d);}export function compareSkillFiles(_0x10d60c,_0x423531){const _0xc5ccb1=a110_0x5a14;if(_0x10d60c[_0xc5ccb1(0x1dc)]===SKILL_FILE)return _0x423531['path']===SKILL_FILE?0x0:-0x1;if(_0x423531[_0xc5ccb1(0x1dc)]===SKILL_FILE)return 0x1;return Buffer[_0xc5ccb1(0x1d5)](Buffer[_0xc5ccb1(0x1c2)](_0x10d60c['path'],_0xc5ccb1(0x1d2)),Buffer[_0xc5ccb1(0x1c2)](_0x423531[_0xc5ccb1(0x1dc)],_0xc5ccb1(0x1d2)));}export function normalizeSkillRelativePath(_0x149b86){const _0x1ca179=a110_0x5a14,_0x2bca18=toPosixPath(_0x149b86[_0x1ca179(0x1cc)]());return validateSkillRelativePath(_0x2bca18),_0x2bca18;}export function validateSkillRelativePath(_0x31e54b){const _0x1a8953=a110_0x5a14;if(!_0x31e54b||_0x31e54b[_0x1a8953(0x1c4)]('/')||_0x31e54b['includes']('//'))throw CliErrors['validation'](_0x1a8953(0x1cf)+_0x31e54b);for(const _0x4db52d of _0x31e54b[_0x1a8953(0x1c5)]('/')){if(!_0x4db52d||_0x4db52d==='.'||_0x4db52d==='..')throw CliErrors[_0x1a8953(0x1be)](_0x1a8953(0x1cf)+_0x31e54b);}}export function toPosixPath(_0x5a4ae8){const _0x51aaa8=a110_0x5a14;return _0x5a4ae8[_0x51aaa8(0x1c3)](/\\/g,'/');}export function isSha256Hex(_0x19b86c){const _0x34c7a3=a110_0x5a14;return typeof _0x19b86c===_0x34c7a3(0x1d7)&&/^[a-fA-F0-9]{64}$/[_0x34c7a3(0x1ca)](_0x19b86c);}
@@ -1 +1 @@
1
- (function(_0x38633d,_0x2b8c27){const _0x4f9d36=a110_0x5eba,_0xb640dd=_0x38633d();while(!![]){try{const _0x476025=-parseInt(_0x4f9d36(0x82))/0x1+parseInt(_0x4f9d36(0x8b))/0x2+parseInt(_0x4f9d36(0x83))/0x3+parseInt(_0x4f9d36(0x77))/0x4+-parseInt(_0x4f9d36(0x9b))/0x5+parseInt(_0x4f9d36(0x8a))/0x6*(parseInt(_0x4f9d36(0xa5))/0x7)+-parseInt(_0x4f9d36(0x96))/0x8;if(_0x476025===_0x2b8c27)break;else _0xb640dd['push'](_0xb640dd['shift']());}catch(_0x362ae7){_0xb640dd['push'](_0xb640dd['shift']());}}}(a110_0x53f4,0xbb5c1));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';function a110_0x53f4(){const _0x22eb35=['keys','---','match','name','\x0a---\x0a\x0a','5703808qglcNV','utf8','set','isFile','test','---\x0a','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','validation','displayName:\x20','has','604604ENIGYe','3381957kzIpBz','displayName','fileHashes','paths','contents','flow','path','2655780vpgBGk','2129306yAOCxf','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','name:\x20','pulledAt','delete','appCode','trimEnd','replace','entries','Managed\x20file\x20was\x20removed\x20locally:\x20','.\x20Changed\x20file:\x20','21471928TigQlr','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','map','accessKey','2235820gaqjAH','length','env','force','filter','description','slice','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','find','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','14OxEJXP','join'];a110_0x53f4=function(){return _0x22eb35;};return a110_0x53f4();}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(_0x4b938b,_0xa43e9b,_0x1cc837){const _0x5ef433=a110_0x5eba,_0x3a5504=requireSkillCode(_0x4b938b),_0x21c8a6=requirePackageBytes(_0x3a5504,_0x1cc837['packageBytes']),_0x23494c=extractDownloadedPackage(_0x21c8a6),_0xbb9c8f=_0x23494c[_0x5ef433(0xa3)](_0xf59fd4=>_0xf59fd4['path']===SKILL_FILE);if(!_0xbb9c8f)throw CliErrors[_0x5ef433(0x7f)](_0x5ef433(0x98)+SKILL_FILE+':\x20'+_0x3a5504);const _0x1b1d30=withMaterializedSkillFrontmatter(_0x23494c,_0x4b938b,_0x3a5504),_0x162de4=_0x1b1d30[_0x5ef433(0xa3)](_0x22d34d=>_0x22d34d['path']===SKILL_FILE),_0x168288=fileText(_0x162de4),_0x3592cc=getRuntimeSkillDir(_0x1cc837[_0x5ef433(0x9d)],_0x1cc837[_0x5ef433(0x9a)],_0x1cc837[_0x5ef433(0x90)],_0xa43e9b,_0x3a5504,_0x1cc837[_0x5ef433(0x86)]),_0x18f659=resolve(_0x3592cc,SKILL_FILE),_0x9a1ead=resolve(_0x3592cc,METADATA_FILE),_0x326824=contentHash(_0x168288),_0x24a1d6=readMetadataIfPresent(_0x9a1ead)?.[_0x5ef433(0x85)];ensurePulledFilesCanBeOverwritten(_0x3592cc,_0x9a1ead,_0x1b1d30,_0x1cc837[_0x5ef433(0x9e)]===!![]),mkdirSync(_0x3592cc,{'recursive':!![],'mode':0x1c0});const _0x2c090d=existsSync(_0x18f659)?readFileSync(_0x18f659,_0x5ef433(0x78)):undefined;return materializeFiles(_0x3592cc,_0x1b1d30),removeStaleManagedFiles(_0x3592cc,_0x24a1d6,_0x1b1d30),writeJsonAtomic(_0x9a1ead,buildMetadata(_0x4b938b,_0xa43e9b,_0x1cc837[_0x5ef433(0x90)],_0x326824,_0x1cc837[_0x5ef433(0x8e)],_0x1b1d30,_0x21c8a6)),{'skill':_0x4b938b,'scope':_0xa43e9b,'dir':_0x3592cc,'skillMdPath':_0x18f659,'metadataPath':_0x9a1ead,'contentHash':_0x326824,'changed':_0x2c090d!==_0x168288};}function a110_0x5eba(_0x1722f0,_0x33c913){_0x1722f0=_0x1722f0-0x73;const _0x53f49f=a110_0x53f4();let _0x5eba54=_0x53f49f[_0x1722f0];return _0x5eba54;}function withMaterializedSkillFrontmatter(_0x18b4b1,_0x31c223,_0x337b09){const _0x18966f=a110_0x5eba,_0x4edaf1=skillDisplayName(_0x31c223,_0x337b09),_0x5c13b6=_0x31c223['description']?.['trim']()||_0x4edaf1||_0x337b09;return normalizeLocalFiles(_0x18b4b1)[_0x18966f(0x99)](_0x308590=>{const _0x1165c2=_0x18966f,_0x2de6e1=fileText(_0x308590);if(_0x308590[_0x1165c2(0x89)]!==SKILL_FILE)return _0x308590;if(hasYamlFrontmatter(_0x2de6e1))return{'path':_0x308590[_0x1165c2(0x89)],'content':withSyncedDisplayName(_0x2de6e1,_0x4edaf1)};return{'path':_0x308590[_0x1165c2(0x89)],'content':prependSkillFrontmatter(_0x2de6e1,{'name':_0x337b09,'displayName':_0x4edaf1,'description':_0x5c13b6})};});}function hasYamlFrontmatter(_0x58199a){const _0x21f287=a110_0x5eba;return/^\uFEFF?---\s*\r?\n/[_0x21f287(0x7b)](_0x58199a);}function prependSkillFrontmatter(_0xd10a3f,_0x58af64){const _0x33a9e0=a110_0x5eba,_0x2f18c3=_0xd10a3f[_0x33a9e0(0x92)](/^\uFEFF/,'');return['---',_0x33a9e0(0x8d)+yamlString(_0x58af64[_0x33a9e0(0x75)]),_0x58af64[_0x33a9e0(0x84)]?_0x33a9e0(0x80)+yamlString(_0x58af64['displayName']):undefined,'description:\x20'+yamlString(_0x58af64[_0x33a9e0(0xa0)]),_0x33a9e0(0x73),'',_0x2f18c3][_0x33a9e0(0x9f)](_0x19291d=>_0x19291d!==undefined)[_0x33a9e0(0xa6)]('\x0a');}function yamlString(_0x3c95ea){const _0x1d12cf=a110_0x5eba;return JSON['stringify'](_0x3c95ea[_0x1d12cf(0x92)](/\r/g,'')['trim']());}function skillDisplayName(_0xab0b93,_0xd5ce64){const _0x5ccf0f=a110_0x5eba,_0x52e8dc=_0xab0b93[_0x5ccf0f(0x97)]?.['trim']();return _0x52e8dc||_0xd5ce64;}function withSyncedDisplayName(_0x2918f1,_0x1f8db9){const _0x522fe8=a110_0x5eba,_0x429dbd=_0x2918f1[_0x522fe8(0x74)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x429dbd)return _0x2918f1;const _0x3e46fb=_0x429dbd[0x1]??'',_0x3df0e9=_0x429dbd[0x2]??'',_0x55f02e=parseDocument(_0x3df0e9);if(_0x55f02e['errors']['length']>0x0||!isMap(_0x55f02e[_0x522fe8(0x87)]))return _0x2918f1;if(_0x1f8db9)_0x55f02e[_0x522fe8(0x79)](_0x522fe8(0x84),_0x1f8db9);else{if(_0x55f02e[_0x522fe8(0x81)](_0x522fe8(0x84)))_0x55f02e[_0x522fe8(0x8f)](_0x522fe8(0x84));else return _0x2918f1;}forceBlockCollections(_0x55f02e[_0x522fe8(0x87)]);const _0x4ac1fd=_0x55f02e['toString']({'lineWidth':0x0})[_0x522fe8(0x91)](),_0xb2e414=_0x2918f1[_0x522fe8(0xa1)](_0x429dbd[0x0]['length'])['replace'](/^\r?\n/,'');return _0x3e46fb+_0x522fe8(0x7c)+_0x4ac1fd+_0x522fe8(0x76)+_0xb2e414;}function forceBlockCollections(_0x33163c){if(!isNode(_0x33163c))return;visit(_0x33163c,(_0x4c35ae,_0x305157)=>{const _0x1241f0=a110_0x5eba;isCollection(_0x305157)&&(_0x305157[_0x1241f0(0x88)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x23b772,_0x34f1c2,_0x129f00,_0x5e705b){const _0x5057e1=a110_0x5eba;if(_0x5e705b||!existsSync(_0x34f1c2))return;const _0x167f76=readMetadataIfPresent(_0x34f1c2);if(!_0x167f76)return;const _0x5e9fa7=_0x167f76[_0x5057e1(0x85)]&&Object[_0x5057e1(0xa7)](_0x167f76[_0x5057e1(0x85)])[_0x5057e1(0x9c)]>0x0?_0x167f76[_0x5057e1(0x85)]:undefined;if(_0x5e9fa7)for(const [_0x51f13e,_0x2d2629]of Object[_0x5057e1(0x93)](_0x5e9fa7)){const _0x3a58f6=resolveManagedFilePath(_0x23b772,_0x51f13e);if(!existsSync(_0x3a58f6))throw CliErrors[_0x5057e1(0x7f)](_0x5057e1(0x7e)+_0x23b772,_0x5057e1(0x94)+_0x51f13e);const _0x518f97=lstatSync(_0x3a58f6);if(!_0x518f97[_0x5057e1(0x7a)]())throw CliErrors['validation'](_0x5057e1(0x7e)+_0x23b772,_0x5057e1(0xa2)+_0x51f13e);const _0x15f102=bufferSha256(readFileSync(_0x3a58f6));if(_0x15f102!==_0x2d2629)throw CliErrors[_0x5057e1(0x7f)](_0x5057e1(0x7e)+_0x23b772+_0x5057e1(0x95)+_0x51f13e,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x51f13e);}else{const _0x5693a5=resolve(_0x23b772,SKILL_FILE);if(existsSync(_0x5693a5)&&_0x167f76['contentHash']){const _0x20bda3=contentHash(readFileSync(_0x5693a5,'utf8'));if(_0x20bda3!==_0x167f76['contentHash'])throw CliErrors[_0x5057e1(0x7f)](_0x5057e1(0x7d)+_0x5693a5,_0x5057e1(0xa4));}}for(const _0x44de5b of normalizeLocalFiles(_0x129f00)){if(_0x5e9fa7?.[_0x44de5b['path']])continue;if(!_0x5e9fa7&&_0x44de5b[_0x5057e1(0x89)]===SKILL_FILE)continue;const _0x518734=resolveManagedFilePath(_0x23b772,_0x44de5b['path']);if(!existsSync(_0x518734))continue;const _0xaac74c=lstatSync(_0x518734);if(!_0xaac74c[_0x5057e1(0x7a)]())throw CliErrors[_0x5057e1(0x7f)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23b772,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x44de5b[_0x5057e1(0x89)]);const _0x1c60d4=bufferSha256(readFileSync(_0x518734));if(_0x1c60d4!==fileHash(_0x44de5b))throw CliErrors[_0x5057e1(0x7f)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23b772,_0x5057e1(0x8c)+_0x44de5b[_0x5057e1(0x89)]);}}function materializeFiles(_0x3e64a4,_0x59c929){const _0x1c4e18=a110_0x5eba;for(const _0x3e675c of normalizeLocalFiles(_0x59c929)){const _0x13642d=resolveManagedFilePath(_0x3e64a4,_0x3e675c[_0x1c4e18(0x89)]);mkdirSync(dirname(_0x13642d),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x13642d,fileContent(_0x3e675c),0x180);}}function removeStaleManagedFiles(_0xe51b3c,_0x4b094b,_0x2a8cb1){const _0x513d19=a110_0x5eba;if(!_0x4b094b)return;const _0x55c5b9=new Set(normalizeLocalFiles(_0x2a8cb1)[_0x513d19(0x99)](_0x7813df=>_0x7813df['path']));for(const _0x3ceccc of Object[_0x513d19(0xa7)](_0x4b094b)){if(_0x55c5b9[_0x513d19(0x81)](_0x3ceccc))continue;const _0x2a0c79=resolveManagedFilePath(_0xe51b3c,_0x3ceccc);existsSync(_0x2a0c79)&&lstatSync(_0x2a0c79)[_0x513d19(0x7a)]()&&rmSync(_0x2a0c79,{'force':!![]});}}
1
+ (function(_0x1c6f4b,_0x129d85){const _0x57525c=a111_0x1f3c,_0x453702=_0x1c6f4b();while(!![]){try{const _0x2bc898=-parseInt(_0x57525c(0x1b4))/0x1+parseInt(_0x57525c(0x1bf))/0x2*(parseInt(_0x57525c(0x1b9))/0x3)+-parseInt(_0x57525c(0x1a4))/0x4+-parseInt(_0x57525c(0x1d3))/0x5*(-parseInt(_0x57525c(0x1d1))/0x6)+parseInt(_0x57525c(0x1af))/0x7+parseInt(_0x57525c(0x1c4))/0x8*(-parseInt(_0x57525c(0x1cb))/0x9)+-parseInt(_0x57525c(0x1aa))/0xa;if(_0x2bc898===_0x129d85)break;else _0x453702['push'](_0x453702['shift']());}catch(_0x1368a5){_0x453702['push'](_0x453702['shift']());}}}(a111_0x5a1e,0xaf6a1));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';function a111_0x5a1e(){const _0x3b6e5a=['.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','flow','contentHash','description:\x20','has','3500264TmbuHd','appCode','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','contents','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','isFile','5456620hvLzmN','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','set','force','8694434MCpxah','utf8','replace','paths','---\x0a','595914NzzJHv','stringify','map','pulledAt','errors','52101jVkEVz','test','Managed\x20file\x20was\x20removed\x20locally:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','path','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','126eqoNUF','match','description','slice','trimEnd','1072TwECWn','packageBytes','displayName','filter','toString','accessKey','fileHashes','26118ALDXvf','validation','delete','find','displayName:\x20','---','32826UXvcgV','keys','720qlzPmA','length','trim','entries','skillName','\x0a---\x0a\x0a'];a111_0x5a1e=function(){return _0x3b6e5a;};return a111_0x5a1e();}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(_0xff50d8,_0x3e67f8,_0x462ada){const _0x155d29=a111_0x1f3c,_0x276f01=requireSkillCode(_0xff50d8),_0x322acf=requirePackageBytes(_0x276f01,_0x462ada[_0x155d29(0x1c5)]),_0x4022ed=extractDownloadedPackage(_0x322acf),_0x5d14f5=_0x4022ed[_0x155d29(0x1ce)](_0x5f597c=>_0x5f597c[_0x155d29(0x1bd)]===SKILL_FILE);if(!_0x5d14f5)throw CliErrors[_0x155d29(0x1cc)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x276f01);const _0x3ad568=withMaterializedSkillFrontmatter(_0x4022ed,_0xff50d8,_0x276f01),_0x2ad76f=_0x3ad568[_0x155d29(0x1ce)](_0x153879=>_0x153879[_0x155d29(0x1bd)]===SKILL_FILE),_0x2bc492=fileText(_0x2ad76f),_0x423e6b=getRuntimeSkillDir(_0x462ada['env'],_0x462ada[_0x155d29(0x1c9)],_0x462ada[_0x155d29(0x1a5)],_0x3e67f8,_0x276f01,_0x462ada[_0x155d29(0x1b2)]),_0x355467=resolve(_0x423e6b,SKILL_FILE),_0x1a4c08=resolve(_0x423e6b,METADATA_FILE),_0x2f45da=contentHash(_0x2bc492),_0x511171=readMetadataIfPresent(_0x1a4c08)?.[_0x155d29(0x1ca)];ensurePulledFilesCanBeOverwritten(_0x423e6b,_0x1a4c08,_0x3ad568,_0x462ada[_0x155d29(0x1ae)]===!![]),mkdirSync(_0x423e6b,{'recursive':!![],'mode':0x1c0});const _0x1ded09=existsSync(_0x355467)?readFileSync(_0x355467,'utf8'):undefined;return materializeFiles(_0x423e6b,_0x3ad568),removeStaleManagedFiles(_0x423e6b,_0x511171,_0x3ad568),writeJsonAtomic(_0x1a4c08,buildMetadata(_0xff50d8,_0x3e67f8,_0x462ada[_0x155d29(0x1a5)],_0x2f45da,_0x462ada[_0x155d29(0x1b7)],_0x3ad568,_0x322acf)),{'skill':_0xff50d8,'scope':_0x3e67f8,'dir':_0x423e6b,'skillMdPath':_0x355467,'metadataPath':_0x1a4c08,'contentHash':_0x2f45da,'changed':_0x1ded09!==_0x2bc492};}function withMaterializedSkillFrontmatter(_0x3a50a8,_0x463ea9,_0x337664){const _0x1c8af3=a111_0x1f3c,_0xcb95e3=skillDisplayName(_0x463ea9,_0x337664),_0x1ce833=_0x463ea9[_0x1c8af3(0x1c1)]?.[_0x1c8af3(0x1d5)]()||_0xcb95e3||_0x337664;return normalizeLocalFiles(_0x3a50a8)[_0x1c8af3(0x1b6)](_0x2ab14e=>{const _0x61831=_0x1c8af3,_0x3d625a=fileText(_0x2ab14e);if(_0x2ab14e[_0x61831(0x1bd)]!==SKILL_FILE)return _0x2ab14e;if(hasYamlFrontmatter(_0x3d625a))return{'path':_0x2ab14e[_0x61831(0x1bd)],'content':withSyncedDisplayName(_0x3d625a,_0xcb95e3)};return{'path':_0x2ab14e[_0x61831(0x1bd)],'content':prependSkillFrontmatter(_0x3d625a,{'name':_0x337664,'displayName':_0xcb95e3,'description':_0x1ce833})};});}function hasYamlFrontmatter(_0x4ec5b6){const _0xf3a1c9=a111_0x1f3c;return/^\uFEFF?---\s*\r?\n/[_0xf3a1c9(0x1ba)](_0x4ec5b6);}function prependSkillFrontmatter(_0xc37d53,_0x550fb2){const _0x9206f6=a111_0x1f3c,_0x4f9102=_0xc37d53[_0x9206f6(0x1b1)](/^\uFEFF/,'');return[_0x9206f6(0x1d0),'name:\x20'+yamlString(_0x550fb2['name']),_0x550fb2[_0x9206f6(0x1c6)]?_0x9206f6(0x1cf)+yamlString(_0x550fb2[_0x9206f6(0x1c6)]):undefined,_0x9206f6(0x1a2)+yamlString(_0x550fb2[_0x9206f6(0x1c1)]),_0x9206f6(0x1d0),'',_0x4f9102][_0x9206f6(0x1c7)](_0x26e56f=>_0x26e56f!==undefined)['join']('\x0a');}function a111_0x1f3c(_0x3d62c7,_0x1574d3){_0x3d62c7=_0x3d62c7-0x19f;const _0x5a1e04=a111_0x5a1e();let _0x1f3cb9=_0x5a1e04[_0x3d62c7];return _0x1f3cb9;}function yamlString(_0x4e1dd4){const _0xe3a4f8=a111_0x1f3c;return JSON[_0xe3a4f8(0x1b5)](_0x4e1dd4[_0xe3a4f8(0x1b1)](/\r/g,'')['trim']());}function skillDisplayName(_0x3ba3ac,_0x45a0c8){const _0x5e87de=a111_0x1f3c,_0x3f4f87=_0x3ba3ac[_0x5e87de(0x1d7)]?.[_0x5e87de(0x1d5)]();return _0x3f4f87||_0x45a0c8;}function withSyncedDisplayName(_0x4af45b,_0x562450){const _0x3a62ef=a111_0x1f3c,_0x214135=_0x4af45b[_0x3a62ef(0x1c0)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x214135)return _0x4af45b;const _0x2535a4=_0x214135[0x1]??'',_0x212f6d=_0x214135[0x2]??'',_0x6e2ba=parseDocument(_0x212f6d);if(_0x6e2ba[_0x3a62ef(0x1b8)][_0x3a62ef(0x1d4)]>0x0||!isMap(_0x6e2ba[_0x3a62ef(0x1a7)]))return _0x4af45b;if(_0x562450)_0x6e2ba[_0x3a62ef(0x1ad)](_0x3a62ef(0x1c6),_0x562450);else{if(_0x6e2ba[_0x3a62ef(0x1a3)](_0x3a62ef(0x1c6)))_0x6e2ba[_0x3a62ef(0x1cd)](_0x3a62ef(0x1c6));else return _0x4af45b;}forceBlockCollections(_0x6e2ba[_0x3a62ef(0x1a7)]);const _0x5b484b=_0x6e2ba[_0x3a62ef(0x1c8)]({'lineWidth':0x0})[_0x3a62ef(0x1c3)](),_0x4078e9=_0x4af45b[_0x3a62ef(0x1c2)](_0x214135[0x0][_0x3a62ef(0x1d4)])[_0x3a62ef(0x1b1)](/^\r?\n/,'');return _0x2535a4+_0x3a62ef(0x1b3)+_0x5b484b+_0x3a62ef(0x1d8)+_0x4078e9;}function forceBlockCollections(_0x18a347){if(!isNode(_0x18a347))return;visit(_0x18a347,(_0x10bdf6,_0x1bf704)=>{const _0x52f88b=a111_0x1f3c;isCollection(_0x1bf704)&&(_0x1bf704[_0x52f88b(0x1a0)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0xab8136,_0x23d956,_0x2edcf6,_0x137117){const _0x2013e4=a111_0x1f3c;if(_0x137117||!existsSync(_0x23d956))return;const _0x1017a3=readMetadataIfPresent(_0x23d956);if(!_0x1017a3)return;const _0x5abcd0=_0x1017a3[_0x2013e4(0x1ca)]&&Object[_0x2013e4(0x1d2)](_0x1017a3[_0x2013e4(0x1ca)])[_0x2013e4(0x1d4)]>0x0?_0x1017a3[_0x2013e4(0x1ca)]:undefined;if(_0x5abcd0)for(const [_0x250ab3,_0x5870c0]of Object[_0x2013e4(0x1d6)](_0x5abcd0)){const _0x4a7d03=resolveManagedFilePath(_0xab8136,_0x250ab3);if(!existsSync(_0x4a7d03))throw CliErrors[_0x2013e4(0x1cc)](_0x2013e4(0x1bc)+_0xab8136,_0x2013e4(0x1bb)+_0x250ab3);const _0x1c1a7c=lstatSync(_0x4a7d03);if(!_0x1c1a7c[_0x2013e4(0x1a9)]())throw CliErrors['validation'](_0x2013e4(0x1bc)+_0xab8136,_0x2013e4(0x1ac)+_0x250ab3);const _0x189a62=bufferSha256(readFileSync(_0x4a7d03));if(_0x189a62!==_0x5870c0)throw CliErrors['validation'](_0x2013e4(0x1bc)+_0xab8136+_0x2013e4(0x1d9)+_0x250ab3,_0x2013e4(0x1ab)+_0x250ab3);}else{const _0x3ec4c1=resolve(_0xab8136,SKILL_FILE);if(existsSync(_0x3ec4c1)&&_0x1017a3[_0x2013e4(0x1a1)]){const _0x244344=contentHash(readFileSync(_0x3ec4c1,_0x2013e4(0x1b0)));if(_0x244344!==_0x1017a3[_0x2013e4(0x1a1)])throw CliErrors[_0x2013e4(0x1cc)](_0x2013e4(0x1be)+_0x3ec4c1,_0x2013e4(0x19f));}}for(const _0xb14ece of normalizeLocalFiles(_0x2edcf6)){if(_0x5abcd0?.[_0xb14ece[_0x2013e4(0x1bd)]])continue;if(!_0x5abcd0&&_0xb14ece[_0x2013e4(0x1bd)]===SKILL_FILE)continue;const _0x2f8134=resolveManagedFilePath(_0xab8136,_0xb14ece[_0x2013e4(0x1bd)]);if(!existsSync(_0x2f8134))continue;const _0xb0898b=lstatSync(_0x2f8134);if(!_0xb0898b[_0x2013e4(0x1a9)]())throw CliErrors[_0x2013e4(0x1cc)](_0x2013e4(0x1bc)+_0xab8136,_0x2013e4(0x1a6)+_0xb14ece[_0x2013e4(0x1bd)]);const _0x1b0921=bufferSha256(readFileSync(_0x2f8134));if(_0x1b0921!==fileHash(_0xb14ece))throw CliErrors[_0x2013e4(0x1cc)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xab8136,_0x2013e4(0x1a8)+_0xb14ece[_0x2013e4(0x1bd)]);}}function materializeFiles(_0x363a8f,_0x1976bb){for(const _0x19eafc of normalizeLocalFiles(_0x1976bb)){const _0x4e5324=resolveManagedFilePath(_0x363a8f,_0x19eafc['path']);mkdirSync(dirname(_0x4e5324),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4e5324,fileContent(_0x19eafc),0x180);}}function removeStaleManagedFiles(_0x5de4f8,_0x202264,_0x4b11f4){const _0x16d80b=a111_0x1f3c;if(!_0x202264)return;const _0x4d0e1e=new Set(normalizeLocalFiles(_0x4b11f4)[_0x16d80b(0x1b6)](_0xb0180d=>_0xb0180d['path']));for(const _0x1ac16a of Object[_0x16d80b(0x1d2)](_0x202264)){if(_0x4d0e1e[_0x16d80b(0x1a3)](_0x1ac16a))continue;const _0x48e445=resolveManagedFilePath(_0x5de4f8,_0x1ac16a);existsSync(_0x48e445)&&lstatSync(_0x48e445)[_0x16d80b(0x1a9)]()&&rmSync(_0x48e445,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x2246c5,_0xb57086){const _0x218187=a111_0x303f,_0x346a5a=_0x2246c5();while(!![]){try{const _0x40d4a4=-parseInt(_0x218187(0x18b))/0x1+-parseInt(_0x218187(0x1aa))/0x2*(parseInt(_0x218187(0x1a0))/0x3)+parseInt(_0x218187(0x18f))/0x4*(-parseInt(_0x218187(0x18e))/0x5)+-parseInt(_0x218187(0x190))/0x6*(-parseInt(_0x218187(0x189))/0x7)+-parseInt(_0x218187(0x19f))/0x8+parseInt(_0x218187(0x195))/0x9*(-parseInt(_0x218187(0x197))/0xa)+parseInt(_0x218187(0x198))/0xb;if(_0x40d4a4===_0xb57086)break;else _0x346a5a['push'](_0x346a5a['shift']());}catch(_0x564199){_0x346a5a['push'](_0x346a5a['shift']());}}}(a111_0x5013,0x56868));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a111_0x303f(_0x49a3d9,_0x46a498){_0x49a3d9=_0x49a3d9-0x184;const _0x5013f7=a111_0x5013();let _0x303f40=_0x5013f7[_0x49a3d9];return _0x303f40;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x31d650,_0xa9cf07,_0x5efbce,_0x2f6bce,_0x109684,_0x291f6d,_0x2bf14c){const _0x3f0086=a111_0x303f,_0x10d31c=_0x291f6d?normalizeLocalFiles(_0x291f6d):[],_0x12c5b2=!_0x2bf14c&&_0x10d31c[_0x3f0086(0x1a2)]>0x0?buildSkillPackage(_0x10d31c):undefined,_0x44bb09=_0x2bf14c?bufferSha256(_0x2bf14c):_0x12c5b2?.[_0x3f0086(0x1a6)][_0x3f0086(0x18c)],_0x27751d=_0x2bf14c?.[_0x3f0086(0x1a2)]??_0x12c5b2?.[_0x3f0086(0x1a6)][_0x3f0086(0x19a)],_0x57221e=_0x10d31c['length']>0x0?Object[_0x3f0086(0x188)](_0x10d31c['map'](_0x2d0731=>[_0x2d0731[_0x3f0086(0x199)],fileHash(_0x2d0731)])):undefined;return{'schemaVersion':_0x10d31c['length']>0x0?0x2:0x1,'id':_0x31d650['id'],'appCode':_0x5efbce,'skillCode':requireSkillCode(_0x31d650),'skillName':_0x31d650[_0x3f0086(0x1a3)],'description':_0x31d650[_0x3f0086(0x193)],'scope':_0xa9cf07,'readonly':_0xa9cf07!==_0x3f0086(0x194)||_0x31d650[_0x3f0086(0x1a1)]===!![],'tenantCode':_0x31d650[_0x3f0086(0x1a4)],'userId':_0x31d650[_0x3f0086(0x186)],'version':_0x31d650['version'],'status':_0x31d650[_0x3f0086(0x19e)],'tags':Array['isArray'](_0x31d650[_0x3f0086(0x19c)])?_0x31d650[_0x3f0086(0x19c)]:[],'hasUpstreamUpdate':_0x31d650[_0x3f0086(0x184)],'forkedFromSkillId':_0x31d650['forkedFromSkillId'],'forkedFromVersion':_0x31d650[_0x3f0086(0x19d)],'sourceSessionId':_0x31d650['sourceSessionId'],'contentHash':_0x2f6bce,'fileHashes':_0x57221e,'treeHash':_0x10d31c[_0x3f0086(0x1a2)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x10d31c)):undefined,'ossPath':remoteManifestOssPath(_0x31d650[_0x3f0086(0x1a7)]),'zipSha256':_0x44bb09,'zipSize':_0x27751d,'files':_0x10d31c['length']>0x0?_0x10d31c[_0x3f0086(0x191)](_0x2510a4=>({'path':_0x2510a4['path'],'hash':fileHash(_0x2510a4),'size':fileContent(_0x2510a4)[_0x3f0086(0x1a2)]})):undefined,'pulledAt':_0x109684??new Date()[_0x3f0086(0x1a9)]()};}function a111_0x5013(){const _0x2c33a6=['tenantCode','string','manifest','files','skillCode','toISOString','1121674vpiaAv','Runtime\x20Skill\x20is\x20missing\x20skillCode.','hasUpstreamUpdate','ossPath','userId','isArray','fromEntries','49xhEEUI','Invalid\x20','137508xlSbOM','zipSha256','trim','1645YDuvZN','6472YGvRjr','4506IzSXXL','map','validation','description','personal','128574AJPJhi','parse','300DsNWax','23866458JdGyWL','path','zipSize','object','tags','forkedFromVersion','status','1290240kQntuW','3TdRcey','readonly','length','skillName'];a111_0x5013=function(){return _0x2c33a6;};return a111_0x5013();}export function requireSkillCode(_0x314df3){const _0x5591e1=a111_0x303f,_0xf5c028=_0x314df3[_0x5591e1(0x1a8)]?.[_0x5591e1(0x18d)]();if(!_0xf5c028)throw CliErrors[_0x5591e1(0x192)](_0x5591e1(0x1ab));return _0xf5c028;}export function readMetadataIfPresent(_0x5c532d){const _0x217270=a111_0x303f;if(!existsSync(_0x5c532d))return undefined;try{const _0x397445=JSON[_0x217270(0x196)](readFileSync(_0x5c532d,'utf8'));return _0x397445;}catch{throw CliErrors[_0x217270(0x192)](_0x217270(0x18a)+METADATA_FILE+':\x20'+_0x5c532d);}}function remoteManifestOssPath(_0xfe6c71){const _0x4385e9=a111_0x303f;if(!_0xfe6c71||typeof _0xfe6c71!==_0x4385e9(0x19b)||Array[_0x4385e9(0x187)](_0xfe6c71))return undefined;const _0x35a1ac=_0xfe6c71[_0x4385e9(0x185)];return typeof _0x35a1ac===_0x4385e9(0x1a5)&&_0x35a1ac['trim']()?_0x35a1ac[_0x4385e9(0x18d)]():undefined;}
1
+ (function(_0x52cffc,_0x459b40){const _0x49c95a=a112_0x2e58,_0x59e75f=_0x52cffc();while(!![]){try{const _0x3545dc=parseInt(_0x49c95a(0x18c))/0x1*(-parseInt(_0x49c95a(0x172))/0x2)+parseInt(_0x49c95a(0x16e))/0x3*(-parseInt(_0x49c95a(0x182))/0x4)+parseInt(_0x49c95a(0x18b))/0x5*(-parseInt(_0x49c95a(0x186))/0x6)+parseInt(_0x49c95a(0x17e))/0x7*(parseInt(_0x49c95a(0x176))/0x8)+parseInt(_0x49c95a(0x18d))/0x9+-parseInt(_0x49c95a(0x16f))/0xa+-parseInt(_0x49c95a(0x187))/0xb*(-parseInt(_0x49c95a(0x188))/0xc);if(_0x3545dc===_0x459b40)break;else _0x59e75f['push'](_0x59e75f['shift']());}catch(_0x1232d3){_0x59e75f['push'](_0x59e75f['shift']());}}}(a112_0x18e8,0x7186d));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a112_0x2e58(_0x5a81d3,_0x39084c){_0x5a81d3=_0x5a81d3-0x16a;const _0x18e81b=a112_0x18e8();let _0x2e58fa=_0x18e81b[_0x5a81d3];return _0x2e58fa;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a112_0x18e8(){const _0x45d595=['fromEntries','zipSize','forkedFromVersion','288nnOdAC','8613560ICvTBO','sourceSessionId','skillCode','2hUkcSA','files','ossPath','string','16HUdRZR','userId','manifest','Runtime\x20Skill\x20is\x20missing\x20skillCode.','zipSha256','parse','validation','length','1351308cmldYI','path','utf8','description','15524NgzqsY','trim','hasUpstreamUpdate','tags','330IuXwUs','320122yjVbUT','948hgBbUb','personal','map','27050eNfeqB','910533iYhoYf','1996866IfmtWA','Invalid\x20','version','toISOString','status','object','forkedFromSkillId','isArray'];a112_0x18e8=function(){return _0x45d595;};return a112_0x18e8();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x1de4f2,_0x29339a,_0x3e583d,_0x46dab1,_0x30ef57,_0x21fc93,_0x1fbb55){const _0x231754=a112_0x2e58,_0x15fdeb=_0x21fc93?normalizeLocalFiles(_0x21fc93):[],_0x45d217=!_0x1fbb55&&_0x15fdeb['length']>0x0?buildSkillPackage(_0x15fdeb):undefined,_0x219acb=_0x1fbb55?bufferSha256(_0x1fbb55):_0x45d217?.[_0x231754(0x178)][_0x231754(0x17a)],_0x47de36=_0x1fbb55?.[_0x231754(0x17d)]??_0x45d217?.[_0x231754(0x178)][_0x231754(0x16c)],_0x20528a=_0x15fdeb[_0x231754(0x17d)]>0x0?Object[_0x231754(0x16b)](_0x15fdeb[_0x231754(0x18a)](_0x107f07=>[_0x107f07[_0x231754(0x17f)],fileHash(_0x107f07)])):undefined;return{'schemaVersion':_0x15fdeb[_0x231754(0x17d)]>0x0?0x2:0x1,'id':_0x1de4f2['id'],'appCode':_0x3e583d,'skillCode':requireSkillCode(_0x1de4f2),'skillName':_0x1de4f2['skillName'],'description':_0x1de4f2[_0x231754(0x181)],'scope':_0x29339a,'readonly':_0x29339a!==_0x231754(0x189)||_0x1de4f2['readonly']===!![],'tenantCode':_0x1de4f2['tenantCode'],'userId':_0x1de4f2[_0x231754(0x177)],'version':_0x1de4f2[_0x231754(0x18f)],'status':_0x1de4f2[_0x231754(0x191)],'tags':Array[_0x231754(0x16a)](_0x1de4f2['tags'])?_0x1de4f2[_0x231754(0x185)]:[],'hasUpstreamUpdate':_0x1de4f2[_0x231754(0x184)],'forkedFromSkillId':_0x1de4f2[_0x231754(0x193)],'forkedFromVersion':_0x1de4f2[_0x231754(0x16d)],'sourceSessionId':_0x1de4f2[_0x231754(0x170)],'contentHash':_0x46dab1,'fileHashes':_0x20528a,'treeHash':_0x15fdeb['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x15fdeb)):undefined,'ossPath':remoteManifestOssPath(_0x1de4f2[_0x231754(0x173)]),'zipSha256':_0x219acb,'zipSize':_0x47de36,'files':_0x15fdeb['length']>0x0?_0x15fdeb[_0x231754(0x18a)](_0x2efe5a=>({'path':_0x2efe5a[_0x231754(0x17f)],'hash':fileHash(_0x2efe5a),'size':fileContent(_0x2efe5a)[_0x231754(0x17d)]})):undefined,'pulledAt':_0x30ef57??new Date()[_0x231754(0x190)]()};}export function requireSkillCode(_0xbd4208){const _0x497496=a112_0x2e58,_0xd85847=_0xbd4208[_0x497496(0x171)]?.[_0x497496(0x183)]();if(!_0xd85847)throw CliErrors[_0x497496(0x17c)](_0x497496(0x179));return _0xd85847;}export function readMetadataIfPresent(_0x30f15a){const _0x132014=a112_0x2e58;if(!existsSync(_0x30f15a))return undefined;try{const _0x288528=JSON[_0x132014(0x17b)](readFileSync(_0x30f15a,_0x132014(0x180)));return _0x288528;}catch{throw CliErrors[_0x132014(0x17c)](_0x132014(0x18e)+METADATA_FILE+':\x20'+_0x30f15a);}}function remoteManifestOssPath(_0x37e164){const _0x2ce567=a112_0x2e58;if(!_0x37e164||typeof _0x37e164!==_0x2ce567(0x192)||Array['isArray'](_0x37e164))return undefined;const _0x502003=_0x37e164[_0x2ce567(0x174)];return typeof _0x502003===_0x2ce567(0x175)&&_0x502003[_0x2ce567(0x183)]()?_0x502003[_0x2ce567(0x183)]():undefined;}
@@ -1 +1 @@
1
- const a112_0x3a9dc5=a112_0x473d;(function(_0x311dcb,_0x58edec){const _0x52e76c=a112_0x473d,_0xfca7aa=_0x311dcb();while(!![]){try{const _0x38f884=parseInt(_0x52e76c(0x1bc))/0x1+-parseInt(_0x52e76c(0x1b8))/0x2+parseInt(_0x52e76c(0x1b3))/0x3+-parseInt(_0x52e76c(0x1c7))/0x4*(-parseInt(_0x52e76c(0x1b6))/0x5)+parseInt(_0x52e76c(0x1bf))/0x6+parseInt(_0x52e76c(0x1be))/0x7+-parseInt(_0x52e76c(0x1c5))/0x8;if(_0x38f884===_0x58edec)break;else _0xfca7aa['push'](_0xfca7aa['shift']());}catch(_0x1c1de2){_0xfca7aa['push'](_0xfca7aa['shift']());}}}(a112_0x415b,0x9f972));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a112_0x415b(){const _0xe2549f=['claudeSkillsDir','892ooqTeD','includes','CLAUDE_SKILL_ROOT','validation','cache','Unsafe\x20','2691555pwHZuy','.workbuddy','SKILL_ROOT','22005IOoRWX','\x20for\x20local\x20path:\x20','1697318wTTZRF','trim','skills','.agents','829985Josslu','path\x20segment','1680546pIsBGp','3375402ufOsHX','workbuddySkillsDir','homeDirName','skillCode','agentsSkillsDir','appCode','16071176YNfdSP'];a112_0x415b=function(){return _0xe2549f;};return a112_0x415b();}export function resolveSkillSyncPaths(_0x6dd51b={}){const _0x4ba973=a112_0x473d,_0x11d91d=_0x6dd51b['homeDir']??homedir(),_0x27ac21=resolve(_0x11d91d,PRODUCT_CONFIG['homeDirName'],_0x4ba973(0x1b1)),_0x4f449c=trimmedEnv(_0x4ba973(0x1b5)),_0x5cf0c9=trimmedEnv(_0x4ba973(0x1af)),_0x422906=resolve(_0x11d91d,_0x4ba973(0x1b4)),_0xc6a9c2=_0x6dd51b[_0x4ba973(0x1c0)]??(existsSync(_0x422906)?resolve(_0x422906,'skills'):undefined);return{'homeDir':_0x11d91d,'cacheRoot':_0x27ac21,'managedRoot':resolve(_0x11d91d,PRODUCT_CONFIG[_0x4ba973(0x1c1)]),'agentsSkillsDir':_0x6dd51b[_0x4ba973(0x1c3)]??_0x4f449c??resolve(_0x11d91d,_0x4ba973(0x1bb),_0x4ba973(0x1ba)),'claudeSkillsDir':_0x6dd51b[_0x4ba973(0x1c6)]??_0x5cf0c9??resolve(_0x11d91d,'.claude',_0x4ba973(0x1ba)),'workbuddySkillsDir':_0xc6a9c2};}export function runtimeAgentSkillRoots(_0x4f1541){const _0x1b001f=a112_0x473d;return[_0x4f1541[_0x1b001f(0x1c3)],_0x4f1541[_0x1b001f(0x1c6)],_0x4f1541['workbuddySkillsDir']]['filter'](_0x59a9fa=>Boolean(_0x59a9fa));}export function getRuntimeSkillCacheRoot(_0x3bbcc6,_0x4ee6d1,_0x2939f3={}){const _0x2b2e14=a112_0x473d,_0x3b8b77=resolveSkillSyncPaths(_0x2939f3);return resolve(_0x3b8b77['cacheRoot'],_0x3bbcc6,fingerprintAccessKey(_0x4ee6d1),_0x2b2e14(0x1ba));}export function getRuntimeSkillDir(_0x5cd703,_0x53b814,_0xd54123,_0x12e945,_0x5ee102,_0x2501c4={}){const _0x269a2f=a112_0x473d;return resolve(getRuntimeSkillCacheRoot(_0x5cd703,_0x53b814,_0x2501c4),safePathSegment(_0xd54123,_0x269a2f(0x1c4)),_0x12e945,safePathSegment(_0x5ee102,_0x269a2f(0x1c2)));}function a112_0x473d(_0x1f98ff,_0x56baee){_0x1f98ff=_0x1f98ff-0x1ae;const _0x415ba6=a112_0x415b();let _0x473d43=_0x415ba6[_0x1f98ff];return _0x473d43;}export function safePathSegment(_0x23aea7,_0x7321c3=a112_0x3a9dc5(0x1bd)){const _0x1600b9=a112_0x3a9dc5;if(!_0x23aea7||_0x23aea7[_0x1600b9(0x1ae)]('/')||_0x23aea7[_0x1600b9(0x1ae)]('\x5c')||_0x23aea7[_0x1600b9(0x1ae)]('..'))throw CliErrors[_0x1600b9(0x1b0)](_0x1600b9(0x1b2)+_0x7321c3+_0x1600b9(0x1b7)+_0x23aea7);return _0x23aea7;}function trimmedEnv(_0x1a3bd3){const _0x30af9b=a112_0x3a9dc5,_0x108438=productEnv(_0x1a3bd3)?.[_0x30af9b(0x1b9)]();return _0x108438?_0x108438:undefined;}
1
+ (function(_0x1eed96,_0x5a0d1a){const _0x4ce8cb=a113_0xd482,_0x25f4cf=_0x1eed96();while(!![]){try{const _0x1e717f=-parseInt(_0x4ce8cb(0xcd))/0x1*(parseInt(_0x4ce8cb(0xb9))/0x2)+-parseInt(_0x4ce8cb(0xd0))/0x3+parseInt(_0x4ce8cb(0xcf))/0x4*(-parseInt(_0x4ce8cb(0xc6))/0x5)+parseInt(_0x4ce8cb(0xd1))/0x6*(parseInt(_0x4ce8cb(0xc9))/0x7)+parseInt(_0x4ce8cb(0xc0))/0x8+-parseInt(_0x4ce8cb(0xbb))/0x9*(-parseInt(_0x4ce8cb(0xcc))/0xa)+parseInt(_0x4ce8cb(0xc3))/0xb;if(_0x1e717f===_0x5a0d1a)break;else _0x25f4cf['push'](_0x25f4cf['shift']());}catch(_0x41d84d){_0x25f4cf['push'](_0x25f4cf['shift']());}}}(a113_0x4a43,0x5e139));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(_0x400e0f={}){const _0xbb1bb4=a113_0xd482,_0x369124=_0x400e0f[_0xbb1bb4(0xba)]??homedir(),_0x214ff=resolve(_0x369124,PRODUCT_CONFIG[_0xbb1bb4(0xce)],_0xbb1bb4(0xc7)),_0x40dae0=trimmedEnv('SKILL_ROOT'),_0x26825e=trimmedEnv(_0xbb1bb4(0xc8)),_0x5a0643=resolve(_0x369124,_0xbb1bb4(0xb8)),_0x3e2dc8=_0x400e0f['workbuddySkillsDir']??(existsSync(_0x5a0643)?resolve(_0x5a0643,_0xbb1bb4(0xcb)):undefined);return{'homeDir':_0x369124,'cacheRoot':_0x214ff,'managedRoot':resolve(_0x369124,PRODUCT_CONFIG[_0xbb1bb4(0xce)]),'agentsSkillsDir':_0x400e0f['agentsSkillsDir']??_0x40dae0??resolve(_0x369124,_0xbb1bb4(0xbc),_0xbb1bb4(0xcb)),'claudeSkillsDir':_0x400e0f[_0xbb1bb4(0xc5)]??_0x26825e??resolve(_0x369124,_0xbb1bb4(0xc2),'skills'),'workbuddySkillsDir':_0x3e2dc8};}function a113_0xd482(_0xc46b6e,_0x5230ff){_0xc46b6e=_0xc46b6e-0xb8;const _0x4a43ec=a113_0x4a43();let _0xd482d7=_0x4a43ec[_0xc46b6e];return _0xd482d7;}export function runtimeAgentSkillRoots(_0x25c619){const _0x398f99=a113_0xd482;return[_0x25c619[_0x398f99(0xd4)],_0x25c619[_0x398f99(0xc5)],_0x25c619[_0x398f99(0xca)]][_0x398f99(0xd2)](_0x30f9f0=>Boolean(_0x30f9f0));}export function getRuntimeSkillCacheRoot(_0x5e0cb7,_0x59746d,_0x12dd18={}){const _0x133a7e=a113_0xd482,_0x4ce737=resolveSkillSyncPaths(_0x12dd18);return resolve(_0x4ce737['cacheRoot'],_0x5e0cb7,fingerprintAccessKey(_0x59746d),_0x133a7e(0xcb));}export function getRuntimeSkillDir(_0x332beb,_0x2daa99,_0x29189f,_0xaec89e,_0x315e8d,_0x419ba2={}){const _0x4696f0=a113_0xd482;return resolve(getRuntimeSkillCacheRoot(_0x332beb,_0x2daa99,_0x419ba2),safePathSegment(_0x29189f,_0x4696f0(0xc4)),_0xaec89e,safePathSegment(_0x315e8d,'skillCode'));}export function safePathSegment(_0x31fa16,_0x4f005f='path\x20segment'){const _0x51e912=a113_0xd482;if(!_0x31fa16||_0x31fa16['includes']('/')||_0x31fa16[_0x51e912(0xbe)]('\x5c')||_0x31fa16[_0x51e912(0xbe)]('..'))throw CliErrors[_0x51e912(0xbd)](_0x51e912(0xc1)+_0x4f005f+_0x51e912(0xd3)+_0x31fa16);return _0x31fa16;}function trimmedEnv(_0x25afaf){const _0x22ac85=a113_0xd482,_0x2626b1=productEnv(_0x25afaf)?.[_0x22ac85(0xbf)]();return _0x2626b1?_0x2626b1:undefined;}function a113_0x4a43(){const _0x57910a=['cache','CLAUDE_SKILL_ROOT','21iPJYVB','workbuddySkillsDir','skills','3130430zIBXww','8YwaJAM','homeDirName','367852XKYwGt','534531YZLqQF','1337946IZWJAe','filter','\x20for\x20local\x20path:\x20','agentsSkillsDir','.workbuddy','117034FTzqIh','homeDir','18lmYFzx','.agents','validation','includes','trim','1514392pspZKD','Unsafe\x20','.claude','1089770LvrMad','appCode','claudeSkillsDir','30rmBNjC'];a113_0x4a43=function(){return _0x57910a;};return a113_0x4a43();}
@@ -1 +1 @@
1
- (function(_0x1a4cd8,_0x5c3977){const _0x47bdbe=a113_0x3a6b,_0x93c4bf=_0x1a4cd8();while(!![]){try{const _0x1564f9=parseInt(_0x47bdbe(0xfd))/0x1+parseInt(_0x47bdbe(0xc8))/0x2+-parseInt(_0x47bdbe(0xd6))/0x3*(-parseInt(_0x47bdbe(0xe3))/0x4)+parseInt(_0x47bdbe(0xca))/0x5+-parseInt(_0x47bdbe(0xcb))/0x6*(parseInt(_0x47bdbe(0xf9))/0x7)+parseInt(_0x47bdbe(0xed))/0x8+-parseInt(_0x47bdbe(0x100))/0x9;if(_0x1564f9===_0x5c3977)break;else _0x93c4bf['push'](_0x93c4bf['shift']());}catch(_0x2190b3){_0x93c4bf['push'](_0x93c4bf['shift']());}}}(a113_0x4bcb,0x527e0));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a113_0x4bcb(){const _0x3fcb69=['filter','find','skillCode','74412IDsoGS','sourceSessionId','1040505luScHB','1614UgkZQc','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','metadata','tags','skillName','ignoreInvalidMetadata','isFile','isDirectory','unknown','content','validation','508443xCqbZp','\x20has\x20scope=\x22','ignoreMetadataSkillCode','replace','ignoreMetadataScope','description','\x20has\x20unsupported\x20scope\x20\x22','personal','dir','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','trim','scope','allowAppCodeRetarget','4TmtQoE','ignoreMetadataAppCodeMismatch','toLowerCase','isArray','boolean','number','Remote\x20Skill\x20','company','pushedAt','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','2093144GcmToT','length','utf8','displayName','name','Invalid\x20','match','manifest','ignoreMetadataForPayload','appCode','path','Skill\x20directory\x20not\x20found:\x20','5866cNUrbV','object','builtin','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','55327ZEOEOt','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Missing\x20','1516032WysoXC','startsWith'];a113_0x4bcb=function(){return _0x3fcb69;};return a113_0x4bcb();}import{basename,resolve}from'node:path';import{parse as a113_0x297e0f}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(_0x1b2154,_0x226f58,_0x1befa4={}){const _0x15a2ce=a113_0x3a6b,_0x59be05=resolvePushDirectoryRoot(_0x1b2154),_0x5caefb=readPushMetadataIfPresent(resolve(_0x59be05,METADATA_FILE),{'ignoreInvalidMetadata':_0x1befa4[_0x15a2ce(0xd0)]});if(_0x5caefb?.[_0x15a2ce(0xf6)]&&_0x5caefb[_0x15a2ce(0xf6)]!==_0x226f58&&!_0x1befa4[_0x15a2ce(0xe2)]&&!_0x1befa4[_0x15a2ce(0xe4)])throw CliErrors[_0x15a2ce(0xd5)]('Skill\x20metadata\x20appCode\x20\x22'+_0x5caefb['appCode']+_0x15a2ce(0xcc)+_0x226f58+'\x22.');const _0x12a3a2=resolvePushSkillCode(_0x59be05,_0x226f58,_0x5caefb,_0x1befa4);if(!_0x12a3a2)throw CliErrors[_0x15a2ce(0xd5)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x59be05,'skillCode':_0x12a3a2,'metadata':_0x5caefb};}export function readPushDirectory(_0x3ce7fe,_0xfec15,_0x4557e4={}){const _0x426893=a113_0x3a6b,_0x247831=resolvePushDirectoryIdentity(_0x3ce7fe,_0xfec15,_0x4557e4),_0x9cd239=_0x247831[_0x426893(0xde)],_0x51d600=resolve(_0x9cd239,SKILL_FILE);if(!existsSync(_0x51d600)||!lstatSync(_0x51d600)[_0x426893(0xd1)]())throw CliErrors[_0x426893(0xd5)](_0x426893(0xff)+SKILL_FILE+':\x20'+_0x51d600);const _0x2f4d65=_0x247831[_0x426893(0xcd)],_0x1b4efc=_0x4557e4['targetScope']??_0x426893(0xdd);if(!_0x4557e4[_0x426893(0xda)]&&_0x2f4d65?.[_0x426893(0xe1)]===_0x426893(0xfb))throw CliErrors[_0x426893(0xd5)](_0x426893(0xfc)+METADATA_FILE+_0x426893(0xd7)+_0x2f4d65[_0x426893(0xe1)]+'\x22.');if(!_0x4557e4[_0x426893(0xda)]&&_0x1b4efc==='personal'&&_0x2f4d65?.['scope']&&_0x2f4d65[_0x426893(0xe1)]!==_0x426893(0xdd))throw CliErrors['validation'](_0x426893(0xec)+METADATA_FILE+_0x426893(0xd7)+_0x2f4d65[_0x426893(0xe1)]+'\x22.',_0x426893(0xfe)+_0x9cd239+_0x426893(0xdf));const _0x533d05=scanSkillDirectory(_0x9cd239),_0x19a507=buildSkillPackage(_0x533d05),_0x4ede5f=readFileSync(_0x51d600,_0x426893(0xef)),_0x292e5b=_0x247831[_0x426893(0xc7)],_0x171a1e=_0x4557e4[_0x426893(0xf5)]?undefined:_0x2f4d65,_0x49dc0c=readSkillDisplayName(_0x4ede5f);return{'skillCode':_0x292e5b,'metadata':_0x2f4d65,'frontmatterDisplayName':_0x49dc0c,'input':{'skillCode':_0x292e5b,'skillName':_0x49dc0c??_0x171a1e?.['skillName'],'description':_0x171a1e?.[_0x426893(0xdb)],'content':_0x4ede5f,'files':_0x19a507[_0x426893(0xf4)],'packageBase64':_0x19a507['packageBase64'],'tags':_0x171a1e?.[_0x426893(0xce)],'version':_0x171a1e?.['version'],'sourceSessionId':_0x171a1e?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x3c6402,_0x378599,_0x427049,_0x3d98e4={}){const _0x4342b5=a113_0x3a6b,_0xe38e39=resolvePushDirectoryRoot(_0x3c6402),_0x3b36f2=readPushMetadataIfPresent(resolve(_0xe38e39,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x58e38a=requireRemoteScope(_0x378599),_0x28ecfd=readLocalSkillContent(_0xe38e39),_0x208ff1={..._0x378599,'appCode':_0x378599[_0x4342b5(0xf6)]??_0x427049,'skillName':_0x378599[_0x4342b5(0xcf)]??_0x3b36f2?.[_0x4342b5(0xcf)],'description':_0x378599[_0x4342b5(0xdb)]??_0x3b36f2?.['description'],'tags':Array[_0x4342b5(0xe6)](_0x378599[_0x4342b5(0xce)])?_0x378599[_0x4342b5(0xce)]:_0x3b36f2?.[_0x4342b5(0xce)],'sourceSessionId':_0x378599[_0x4342b5(0xc9)]??_0x3b36f2?.[_0x4342b5(0xc9)],'content':_0x378599[_0x4342b5(0xd4)]??_0x28ecfd},_0x50134f=buildMetadata(_0x208ff1,_0x58e38a,_0x427049,contentHash(_0x28ecfd),_0x3d98e4['refreshedAt']);writeJsonAtomic(resolve(_0xe38e39,METADATA_FILE),_0x50134f);}export function recordPushedRuntimeSkill(_0xea2506,_0x4cfde2,_0x4361da,_0x3637bf={}){const _0x1c1c84=a113_0x3a6b,_0x1da145=resolvePushDirectoryRoot(_0xea2506),_0x3a8bff=scanSkillDirectory(_0x1da145),_0x3cdd20=_0x3a8bff[_0x1c1c84(0xc6)](_0x20acc5=>_0x20acc5[_0x1c1c84(0xf7)]===SKILL_FILE),_0x9d8f24=_0x3cdd20?fileText(_0x3cdd20):'',_0x503bef=tryNormalizePackageManifest(_0x4cfde2['files']),_0x40c352={..._0x4cfde2,'content':_0x4cfde2[_0x1c1c84(0xd4)]??_0x9d8f24,'files':_0x503bef},_0x5ec78a=_0x503bef?normalizeLocalFiles(_0x3a8bff)[_0x1c1c84(0xc5)](_0x1b8a2f=>_0x503bef['files']['some'](_0x596cbd=>_0x596cbd['path']===_0x1b8a2f[_0x1c1c84(0xf7)])):undefined,_0x33e272=buildMetadata(_0x40c352,_0x3637bf[_0x1c1c84(0xe1)]??'personal',_0x4361da,contentHash(_0x40c352[_0x1c1c84(0xd4)]??''),_0x3637bf[_0x1c1c84(0xeb)],_0x5ec78a);writeJsonAtomic(resolve(_0x1da145,METADATA_FILE),_0x33e272);}export function deriveSkillCodeFromDirectory(_0x4ffe15,_0x3d6d13){const _0x1f80ed=a113_0x3a6b,_0x3daa4c=basename(resolve(_0x4ffe15)),_0x5bb0a5=_0x3d6d13+'--';return _0x3daa4c[_0x1f80ed(0xc4)](_0x5bb0a5)?_0x3daa4c['slice'](_0x5bb0a5[_0x1f80ed(0xee)]):_0x3daa4c;}function resolvePushSkillCode(_0x37e069,_0xe9e033,_0x45af13,_0x22242c){const _0x565f00=a113_0x3a6b,_0x540f79=deriveSkillCodeFromSkillFile(_0x37e069)||deriveSkillCodeFromDirectory(_0x37e069,_0xe9e033);if(_0x22242c[_0x565f00(0xd8)])return _0x540f79;return _0x45af13?.['skillCode']?.[_0x565f00(0xe0)]()||_0x540f79;}function deriveSkillCodeFromSkillFile(_0x5d9e9b){const _0x5160fc=a113_0x3a6b,_0x5de0aa=resolve(_0x5d9e9b,SKILL_FILE);if(!existsSync(_0x5de0aa)||!lstatSync(_0x5de0aa)[_0x5160fc(0xd1)]())return undefined;const _0xe09433=readFileSync(_0x5de0aa,'utf8'),_0x56b8d3=_0xe09433[_0x5160fc(0xf3)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x56b8d3)return undefined;const _0x2dd36b=parseFrontmatterObject(_0x56b8d3[0x1]??''),_0x32bdb9=scalarToString(_0x2dd36b?.[_0x5160fc(0xf1)]);return _0x32bdb9?slugifySkillName(_0x32bdb9):undefined;}function readSkillDisplayName(_0xae6b6a){const _0x30c493=a113_0x3a6b,_0x4fca5c=_0xae6b6a['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4fca5c)return undefined;const _0x5f4434=parseFrontmatterObject(_0x4fca5c[0x1]??'');return scalarToString(_0x5f4434?.[_0x30c493(0xf0)]);}function slugifySkillName(_0x1e0a81){const _0x17fb56=a113_0x3a6b,_0x2fd1fb=_0x1e0a81[_0x17fb56(0xe0)]()[_0x17fb56(0xe5)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x17fb56(0xd9)](/^-+/,'')['replace'](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x2fd1fb)throw CliErrors[_0x17fb56(0xd5)](_0x17fb56(0xf2)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x2fd1fb;}function parseFrontmatterObject(_0x1207f1){const _0x38954c=a113_0x3a6b;try{const _0x1d899d=a113_0x297e0f(_0x1207f1);return _0x1d899d&&typeof _0x1d899d===_0x38954c(0xfa)&&!Array['isArray'](_0x1d899d)?_0x1d899d:undefined;}catch{return undefined;}}function a113_0x3a6b(_0xf55fab,_0x3738cd){_0xf55fab=_0xf55fab-0xc4;const _0x4bcb33=a113_0x4bcb();let _0x3a6b9b=_0x4bcb33[_0xf55fab];return _0x3a6b9b;}function scalarToString(_0x59a3d1){const _0x271965=a113_0x3a6b;if(typeof _0x59a3d1==='string')return _0x59a3d1[_0x271965(0xe0)]();if(typeof _0x59a3d1===_0x271965(0xe8)||typeof _0x59a3d1===_0x271965(0xe7))return String(_0x59a3d1);return undefined;}function resolvePushDirectoryRoot(_0x5d58db){const _0x623660=a113_0x3a6b,_0xb612f=resolve(_0x5d58db);if(!existsSync(_0xb612f))throw CliErrors[_0x623660(0xd5)](_0x623660(0xf8)+_0x5d58db);const _0xe4e4fa=lstatSync(_0xb612f);if(_0xe4e4fa[_0x623660(0xd2)]())return _0xb612f;if(_0xe4e4fa['isSymbolicLink']()){const _0x2b392a=realpathSync(_0xb612f);if(lstatSync(_0x2b392a)[_0x623660(0xd2)]())return _0x2b392a;}throw CliErrors[_0x623660(0xd5)](_0x623660(0xf8)+_0x5d58db);}function requireRemoteScope(_0x28a343){const _0x509041=a113_0x3a6b;if(_0x28a343['scope']===_0x509041(0xdd)||_0x28a343[_0x509041(0xe1)]===_0x509041(0xea)||_0x28a343[_0x509041(0xe1)]==='builtin')return _0x28a343[_0x509041(0xe1)];throw CliErrors[_0x509041(0xd5)](_0x509041(0xe9)+(_0x28a343[_0x509041(0xc7)]||'(unknown)')+_0x509041(0xdc)+(_0x28a343[_0x509041(0xe1)]??_0x509041(0xd3))+'\x22.');}function readLocalSkillContent(_0x5aa302){const _0x5e04fa=a113_0x3a6b,_0x1470ff=resolve(_0x5aa302,SKILL_FILE);return existsSync(_0x1470ff)&&lstatSync(_0x1470ff)['isFile']()?readFileSync(_0x1470ff,_0x5e04fa(0xef)):'';}function readPushMetadataIfPresent(_0x1a4e06,_0x384563={}){try{return readMetadataIfPresent(_0x1a4e06);}catch(_0x3dd7f3){if(_0x384563['ignoreInvalidMetadata'])return undefined;throw _0x3dd7f3;}}
1
+ (function(_0x1df5ae,_0x34e0a8){const _0xc24c0=a114_0x5750,_0x5e18ea=_0x1df5ae();while(!![]){try{const _0x9f69be=parseInt(_0xc24c0(0xc8))/0x1+-parseInt(_0xc24c0(0xf0))/0x2+-parseInt(_0xc24c0(0xe7))/0x3+-parseInt(_0xc24c0(0xfb))/0x4*(parseInt(_0xc24c0(0xee))/0x5)+-parseInt(_0xc24c0(0xf6))/0x6*(parseInt(_0xc24c0(0xed))/0x7)+-parseInt(_0xc24c0(0xcb))/0x8+parseInt(_0xc24c0(0xf5))/0x9;if(_0x9f69be===_0x34e0a8)break;else _0x5e18ea['push'](_0x5e18ea['shift']());}catch(_0x2698f2){_0x5e18ea['push'](_0x5e18ea['shift']());}}}(a114_0x2ed1,0xf1c51));function a114_0x2ed1(){const _0x25f516=['\x20has\x20unsupported\x20scope\x20\x22','manifest','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','isArray','skillCode','refreshedAt','3282357jcEEwI','scope','packageBase64','replace','utf8','ignoreMetadataScope','1237397kHvcfN','215CIWoFG','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','3885930jcEbLd','builtin','ignoreMetadataSkillCode','Skill\x20metadata\x20appCode\x20\x22','validation','41778288XzFxUD','18GVRkYt','Skill\x20directory\x20not\x20found:\x20','path','content','sourceSessionId','73556tGKMVG','files','Unable\x20to\x20resolve\x20skillCode\x20from\x20','\x20has\x20scope=\x22','string','trim','boolean','Remote\x20Skill\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','851975VBHVHI','appCode','Invalid\x20','1164752hNtClF','allowAppCodeRetarget','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','skillName','personal','isFile','ignoreMetadataAppCodeMismatch','length','ignoreInvalidMetadata','(unknown)','description','Missing\x20','find','name','some','object','startsWith','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','number','match','isDirectory','tags'];a114_0x2ed1=function(){return _0x25f516;};return a114_0x2ed1();}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a114_0x2db972}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(_0x2bf414,_0x1ad48c,_0x3031c0={}){const _0x3f3fa5=a114_0x5750,_0x394fe6=resolvePushDirectoryRoot(_0x2bf414),_0x395768=readPushMetadataIfPresent(resolve(_0x394fe6,METADATA_FILE),{'ignoreInvalidMetadata':_0x3031c0[_0x3f3fa5(0xd3)]});if(_0x395768?.['appCode']&&_0x395768[_0x3f3fa5(0xc9)]!==_0x1ad48c&&!_0x3031c0[_0x3f3fa5(0xcc)]&&!_0x3031c0[_0x3f3fa5(0xd1)])throw CliErrors[_0x3f3fa5(0xf4)](_0x3f3fa5(0xf3)+_0x395768[_0x3f3fa5(0xc9)]+_0x3f3fa5(0xe3)+_0x1ad48c+'\x22.');const _0x1d5043=resolvePushSkillCode(_0x394fe6,_0x1ad48c,_0x395768,_0x3031c0);if(!_0x1d5043)throw CliErrors[_0x3f3fa5(0xf4)](_0x3f3fa5(0xc1)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x394fe6,'skillCode':_0x1d5043,'metadata':_0x395768};}export function readPushDirectory(_0x2c81cf,_0x414c89,_0x5a42b8={}){const _0x4ab906=a114_0x5750,_0x374c84=resolvePushDirectoryIdentity(_0x2c81cf,_0x414c89,_0x5a42b8),_0x2122fb=_0x374c84['dir'],_0x357959=resolve(_0x2122fb,SKILL_FILE);if(!existsSync(_0x357959)||!lstatSync(_0x357959)[_0x4ab906(0xd0)]())throw CliErrors['validation'](_0x4ab906(0xd6)+SKILL_FILE+':\x20'+_0x357959);const _0x461e7d=_0x374c84['metadata'],_0x6e94ef=_0x5a42b8['targetScope']??_0x4ab906(0xcf);if(!_0x5a42b8['ignoreMetadataScope']&&_0x461e7d?.[_0x4ab906(0xe8)]==='builtin')throw CliErrors['validation'](_0x4ab906(0xdc)+METADATA_FILE+_0x4ab906(0xc2)+_0x461e7d[_0x4ab906(0xe8)]+'\x22.');if(!_0x5a42b8[_0x4ab906(0xec)]&&_0x6e94ef==='personal'&&_0x461e7d?.[_0x4ab906(0xe8)]&&_0x461e7d[_0x4ab906(0xe8)]!=='personal')throw CliErrors[_0x4ab906(0xf4)](_0x4ab906(0xcd)+METADATA_FILE+_0x4ab906(0xc2)+_0x461e7d[_0x4ab906(0xe8)]+'\x22.',_0x4ab906(0xef)+_0x2122fb+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x1c72bb=scanSkillDirectory(_0x2122fb),_0x4860e0=buildSkillPackage(_0x1c72bb),_0x5113a0=readFileSync(_0x357959,'utf8'),_0x55a1ca=_0x374c84[_0x4ab906(0xe5)],_0xa9ec28=_0x5a42b8['ignoreMetadataForPayload']?undefined:_0x461e7d,_0x4bf56e=readSkillDisplayName(_0x5113a0);return{'skillCode':_0x55a1ca,'metadata':_0x461e7d,'frontmatterDisplayName':_0x4bf56e,'input':{'skillCode':_0x55a1ca,'skillName':_0x4bf56e??_0xa9ec28?.[_0x4ab906(0xce)],'description':_0xa9ec28?.[_0x4ab906(0xd5)],'content':_0x5113a0,'files':_0x4860e0[_0x4ab906(0xe2)],'packageBase64':_0x4860e0[_0x4ab906(0xe9)],'tags':_0xa9ec28?.[_0x4ab906(0xe0)],'version':_0xa9ec28?.['version'],'sourceSessionId':_0xa9ec28?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x32275f,_0x415602,_0x522cba,_0x52d046={}){const _0x4bef67=a114_0x5750,_0x5353d5=resolvePushDirectoryRoot(_0x32275f),_0x791b89=readPushMetadataIfPresent(resolve(_0x5353d5,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x388bac=requireRemoteScope(_0x415602),_0x59b854=readLocalSkillContent(_0x5353d5),_0x38b1fb={..._0x415602,'appCode':_0x415602[_0x4bef67(0xc9)]??_0x522cba,'skillName':_0x415602[_0x4bef67(0xce)]??_0x791b89?.['skillName'],'description':_0x415602[_0x4bef67(0xd5)]??_0x791b89?.[_0x4bef67(0xd5)],'tags':Array['isArray'](_0x415602[_0x4bef67(0xe0)])?_0x415602[_0x4bef67(0xe0)]:_0x791b89?.[_0x4bef67(0xe0)],'sourceSessionId':_0x415602['sourceSessionId']??_0x791b89?.[_0x4bef67(0xfa)],'content':_0x415602[_0x4bef67(0xf9)]??_0x59b854},_0x27ad14=buildMetadata(_0x38b1fb,_0x388bac,_0x522cba,contentHash(_0x59b854),_0x52d046[_0x4bef67(0xe6)]);writeJsonAtomic(resolve(_0x5353d5,METADATA_FILE),_0x27ad14);}export function recordPushedRuntimeSkill(_0x23b655,_0x3eaaf5,_0x13a110,_0x17b177={}){const _0x216e10=a114_0x5750,_0x5b40bb=resolvePushDirectoryRoot(_0x23b655),_0x465715=scanSkillDirectory(_0x5b40bb),_0xb453e=_0x465715[_0x216e10(0xd7)](_0x5a2ae7=>_0x5a2ae7['path']===SKILL_FILE),_0x262ecf=_0xb453e?fileText(_0xb453e):'',_0x4d20c5=tryNormalizePackageManifest(_0x3eaaf5[_0x216e10(0xc0)]),_0x221e22={..._0x3eaaf5,'content':_0x3eaaf5[_0x216e10(0xf9)]??_0x262ecf,'files':_0x4d20c5},_0x40fbf7=_0x4d20c5?normalizeLocalFiles(_0x465715)['filter'](_0xfaea0c=>_0x4d20c5[_0x216e10(0xc0)][_0x216e10(0xd9)](_0x170aa4=>_0x170aa4[_0x216e10(0xf8)]===_0xfaea0c['path'])):undefined,_0x4477cc=buildMetadata(_0x221e22,_0x17b177[_0x216e10(0xe8)]??_0x216e10(0xcf),_0x13a110,contentHash(_0x221e22[_0x216e10(0xf9)]??''),_0x17b177['pushedAt'],_0x40fbf7);writeJsonAtomic(resolve(_0x5b40bb,METADATA_FILE),_0x4477cc);}function a114_0x5750(_0x2aa6d6,_0x2c24c9){_0x2aa6d6=_0x2aa6d6-0xc0;const _0x2ed1d9=a114_0x2ed1();let _0x5750b5=_0x2ed1d9[_0x2aa6d6];return _0x5750b5;}export function deriveSkillCodeFromDirectory(_0x5513d1,_0x23772d){const _0x5e8ed5=a114_0x5750,_0x52df26=basename(resolve(_0x5513d1)),_0x429172=_0x23772d+'--';return _0x52df26[_0x5e8ed5(0xdb)](_0x429172)?_0x52df26['slice'](_0x429172[_0x5e8ed5(0xd2)]):_0x52df26;}function resolvePushSkillCode(_0x34c59b,_0x1501a4,_0x8498ae,_0x37941c){const _0x2dfb22=a114_0x5750,_0x21da94=deriveSkillCodeFromSkillFile(_0x34c59b)||deriveSkillCodeFromDirectory(_0x34c59b,_0x1501a4);if(_0x37941c[_0x2dfb22(0xf2)])return _0x21da94;return _0x8498ae?.['skillCode']?.[_0x2dfb22(0xc4)]()||_0x21da94;}function deriveSkillCodeFromSkillFile(_0x4b7b95){const _0x2e8d67=a114_0x5750,_0x15983a=resolve(_0x4b7b95,SKILL_FILE);if(!existsSync(_0x15983a)||!lstatSync(_0x15983a)['isFile']())return undefined;const _0x2a907e=readFileSync(_0x15983a,_0x2e8d67(0xeb)),_0x467dfa=_0x2a907e[_0x2e8d67(0xde)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x467dfa)return undefined;const _0xb9943a=parseFrontmatterObject(_0x467dfa[0x1]??''),_0x31cef0=scalarToString(_0xb9943a?.[_0x2e8d67(0xd8)]);return _0x31cef0?slugifySkillName(_0x31cef0):undefined;}function readSkillDisplayName(_0x206491){const _0x4c9410=a114_0x5750,_0x201238=_0x206491[_0x4c9410(0xde)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x201238)return undefined;const _0x1681fa=parseFrontmatterObject(_0x201238[0x1]??'');return scalarToString(_0x1681fa?.['displayName']);}function slugifySkillName(_0x3cf4db){const _0x1a3070=a114_0x5750,_0x555648=_0x3cf4db['trim']()['toLowerCase']()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x1a3070(0xea)](/^-+/,'')['replace'](/-+$/,'')[_0x1a3070(0xea)](/-{2,}/g,'-');if(!_0x555648)throw CliErrors[_0x1a3070(0xf4)](_0x1a3070(0xca)+SKILL_FILE+_0x1a3070(0xc7));return _0x555648;}function parseFrontmatterObject(_0x269fe){const _0x4f923e=a114_0x5750;try{const _0x52beee=a114_0x2db972(_0x269fe);return _0x52beee&&typeof _0x52beee===_0x4f923e(0xda)&&!Array[_0x4f923e(0xe4)](_0x52beee)?_0x52beee:undefined;}catch{return undefined;}}function scalarToString(_0x59d0a6){const _0x5256c4=a114_0x5750;if(typeof _0x59d0a6===_0x5256c4(0xc3))return _0x59d0a6[_0x5256c4(0xc4)]();if(typeof _0x59d0a6===_0x5256c4(0xdd)||typeof _0x59d0a6===_0x5256c4(0xc5))return String(_0x59d0a6);return undefined;}function resolvePushDirectoryRoot(_0x972d8b){const _0x2ca585=a114_0x5750,_0x371eff=resolve(_0x972d8b);if(!existsSync(_0x371eff))throw CliErrors[_0x2ca585(0xf4)](_0x2ca585(0xf7)+_0x972d8b);const _0x7213ea=lstatSync(_0x371eff);if(_0x7213ea[_0x2ca585(0xdf)]())return _0x371eff;if(_0x7213ea['isSymbolicLink']()){const _0x3a306d=realpathSync(_0x371eff);if(lstatSync(_0x3a306d)[_0x2ca585(0xdf)]())return _0x3a306d;}throw CliErrors['validation'](_0x2ca585(0xf7)+_0x972d8b);}function requireRemoteScope(_0x76dba6){const _0x13d7f1=a114_0x5750;if(_0x76dba6[_0x13d7f1(0xe8)]===_0x13d7f1(0xcf)||_0x76dba6[_0x13d7f1(0xe8)]==='company'||_0x76dba6[_0x13d7f1(0xe8)]===_0x13d7f1(0xf1))return _0x76dba6[_0x13d7f1(0xe8)];throw CliErrors[_0x13d7f1(0xf4)](_0x13d7f1(0xc6)+(_0x76dba6['skillCode']||_0x13d7f1(0xd4))+_0x13d7f1(0xe1)+(_0x76dba6['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x1cbdd2){const _0x9cc167=a114_0x5750,_0x38d5a7=resolve(_0x1cbdd2,SKILL_FILE);return existsSync(_0x38d5a7)&&lstatSync(_0x38d5a7)['isFile']()?readFileSync(_0x38d5a7,_0x9cc167(0xeb)):'';}function readPushMetadataIfPresent(_0x3705d5,_0x40f5b1={}){try{return readMetadataIfPresent(_0x3705d5);}catch(_0x3bddbe){if(_0x40f5b1['ignoreInvalidMetadata'])return undefined;throw _0x3bddbe;}}
@@ -1 +1 @@
1
- (function(_0x5cf307,_0x2314d9){const _0x31cd48=a114_0x4549,_0x590fc7=_0x5cf307();while(!![]){try{const _0x2e2c86=-parseInt(_0x31cd48(0x153))/0x1+-parseInt(_0x31cd48(0x156))/0x2+-parseInt(_0x31cd48(0x150))/0x3+parseInt(_0x31cd48(0x15a))/0x4*(parseInt(_0x31cd48(0x159))/0x5)+parseInt(_0x31cd48(0x151))/0x6*(parseInt(_0x31cd48(0x15c))/0x7)+parseInt(_0x31cd48(0x15e))/0x8*(-parseInt(_0x31cd48(0x157))/0x9)+-parseInt(_0x31cd48(0x15d))/0xa*(-parseInt(_0x31cd48(0x154))/0xb);if(_0x2e2c86===_0x2314d9)break;else _0x590fc7['push'](_0x590fc7['shift']());}catch(_0x3d7969){_0x590fc7['push'](_0x590fc7['shift']());}}}(a114_0x3f1c,0xc3146));function a114_0x3f1c(){const _0x25c9fa=['builtin','345425KCTUrZ','20QhljPe','includes','28bJJPFG','8868030HpFpqr','392JZTAkG','personal','1213701eraJcU','1816272zKsIdt','validation','1102762KYGwFw','33ydgZxJ','company','2364824NCHTVc','133695WmwRPL'];a114_0x3f1c=function(){return _0x25c9fa;};return a114_0x3f1c();}function a114_0x4549(_0x2ae84d,_0xb09c42){_0x2ae84d=_0x2ae84d-0x150;const _0x3f1ca9=a114_0x3f1c();let _0x454961=_0x3f1ca9[_0x2ae84d];return _0x454961;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x324b32){const _0x237f12=a114_0x4549,_0x180ea2=_0x324b32&&_0x324b32['length']>0x0?_0x324b32:[_0x237f12(0x15f),_0x237f12(0x155),_0x237f12(0x158)],_0x462eef=[];for(const _0x1806a5 of _0x180ea2){if(!isRuntimeSkillScope(_0x1806a5))throw CliErrors[_0x237f12(0x152)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x1806a5);!_0x462eef[_0x237f12(0x15b)](_0x1806a5)&&_0x462eef['push'](_0x1806a5);}return _0x462eef;}export function isRuntimeSkillScope(_0x4ffe21){const _0x5cd691=a114_0x4549;return _0x4ffe21==='personal'||_0x4ffe21===_0x5cd691(0x155)||_0x4ffe21===_0x5cd691(0x158);}
1
+ function a115_0x6bcb(){const _0x104c79=['Unsupported\x20runtime\x20Skill\x20scope:\x20','company','147720EdGitN','2416XThrrU','4529077ItAvtV','2928670MKduKz','8975856WlzSUM','push','personal','3246DNjPxn','builtin','18748DLIMBY','length','includes','3434508uQsXNC'];a115_0x6bcb=function(){return _0x104c79;};return a115_0x6bcb();}(function(_0x3cb957,_0x251ac7){const _0x11f71c=a115_0x23a7,_0x423ed8=_0x3cb957();while(!![]){try{const _0x2e7519=parseInt(_0x11f71c(0x171))/0x1+parseInt(_0x11f71c(0x17a))/0x2+-parseInt(_0x11f71c(0x178))/0x3*(-parseInt(_0x11f71c(0x172))/0x4)+parseInt(_0x11f71c(0x174))/0x5+-parseInt(_0x11f71c(0x17d))/0x6+parseInt(_0x11f71c(0x173))/0x7+-parseInt(_0x11f71c(0x175))/0x8;if(_0x2e7519===_0x251ac7)break;else _0x423ed8['push'](_0x423ed8['shift']());}catch(_0x2de8bf){_0x423ed8['push'](_0x423ed8['shift']());}}}(a115_0x6bcb,0x55327));import{CliErrors}from'../../errors.js';function a115_0x23a7(_0x332b95,_0x338e9f){_0x332b95=_0x332b95-0x171;const _0x6bcbc6=a115_0x6bcb();let _0x23a7e7=_0x6bcbc6[_0x332b95];return _0x23a7e7;}export function normalizeRuntimeSkillScopes(_0x5f0ef4){const _0x28b90f=a115_0x23a7,_0x4cbdcc=_0x5f0ef4&&_0x5f0ef4[_0x28b90f(0x17b)]>0x0?_0x5f0ef4:[_0x28b90f(0x177),_0x28b90f(0x17f),'builtin'],_0x128a3e=[];for(const _0x3389d2 of _0x4cbdcc){if(!isRuntimeSkillScope(_0x3389d2))throw CliErrors['validation'](_0x28b90f(0x17e)+_0x3389d2);!_0x128a3e[_0x28b90f(0x17c)](_0x3389d2)&&_0x128a3e[_0x28b90f(0x176)](_0x3389d2);}return _0x128a3e;}export function isRuntimeSkillScope(_0x14c1a8){const _0x20e09a=a115_0x23a7;return _0x14c1a8==='personal'||_0x14c1a8===_0x20e09a(0x17f)||_0x14c1a8===_0x20e09a(0x179);}
@@ -1 +1 @@
1
- function a116_0x242c(){const _0x3de003=['path','4vUiiAX','sort','map','291055ucJQdG','12639304rzCJsL','object','95109xWuKBj','2630425XUVAaD','816156GafOTm','1980-01-01T00:00:00.000Z','validation_error','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','234065MYGwXV','code','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','924406AdDfKW','name','validation','from'];a116_0x242c=function(){return _0x3de003;};return a116_0x242c();}const a116_0x2cb1b6=a116_0x52a1;(function(_0x662319,_0x293858){const _0x475df5=a116_0x52a1,_0x537e93=_0x662319();while(!![]){try{const _0x4b8d88=-parseInt(_0x475df5(0xd9))/0x1+-parseInt(_0x475df5(0xdc))/0x2+-parseInt(_0x475df5(0xd2))/0x3+parseInt(_0x475df5(0xe1))/0x4*(-parseInt(_0x475df5(0xe4))/0x5)+-parseInt(_0x475df5(0xd4))/0x6+-parseInt(_0x475df5(0xd3))/0x7+parseInt(_0x475df5(0xd0))/0x8;if(_0x4b8d88===_0x293858)break;else _0x537e93['push'](_0x537e93['shift']());}catch(_0x58c30b){_0x537e93['push'](_0x537e93['shift']());}}}(a116_0x242c,0x44d4a));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a116_0x2cb1b6(0xd5));export function createDeterministicZipPackage(_0x270c80){const _0x2e0fa1=a116_0x2cb1b6,_0x5bf1dc={};for(const _0x1a5b92 of normalizeLocalFiles(_0x270c80)){_0x5bf1dc[_0x1a5b92[_0x2e0fa1(0xe0)]]=fileContent(_0x1a5b92);}return Buffer[_0x2e0fa1(0xdf)](zipSync(_0x5bf1dc,{'level':0x0,'mtime':ZIP_MTIME}));}function a116_0x52a1(_0x6ab97,_0x236c32){_0x6ab97=_0x6ab97-0xd0;const _0x242c68=a116_0x242c();let _0x52a134=_0x242c68[_0x6ab97];return _0x52a134;}export function parseZipPackage(_0x499a0b){const _0x4249d2=a116_0x2cb1b6;if(_0x499a0b['length']<0x16)throw CliErrors[_0x4249d2(0xde)](_0x4249d2(0xd8));let _0x357ec4;try{_0x357ec4=unzipSync(_0x499a0b,{'filter'(_0xa03181){const _0x36fbc1=_0x4249d2,_0x118ba5=normalizeSkillRelativePath(_0xa03181[_0x36fbc1(0xdd)]);if(_0x118ba5[_0x36fbc1(0xd7)]('/'))throw CliErrors[_0x36fbc1(0xde)](_0x36fbc1(0xdb)+_0x118ba5);return!![];}});}catch(_0x629add){if(isRuntimeSkillValidationError(_0x629add))throw _0x629add;throw CliErrors[_0x4249d2(0xde)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x357ec4)[_0x4249d2(0xe3)](([_0x218d9f,_0x10afb8])=>({'path':normalizeSkillRelativePath(_0x218d9f),'bytes':Buffer['from'](_0x10afb8)}))[_0x4249d2(0xe2)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x525ffd){const _0xc50fa7=a116_0x2cb1b6;return typeof _0x525ffd===_0xc50fa7(0xd1)&&_0x525ffd!==null&&'code'in _0x525ffd&&_0x525ffd[_0xc50fa7(0xda)]===_0xc50fa7(0xd6);}
1
+ function a117_0x4441(){const _0x255b86=['name','sort','252PcnVFk','17042742OgbuyX','4598368XFxYpa','152265VfheLZ','2339096NpXQwi','validation','map','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','5680787gdScCz','validation_error','39930jmUfoJ','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','code','3ibJBss','803208IwpHzB','from','path','object'];a117_0x4441=function(){return _0x255b86;};return a117_0x4441();}const a117_0x2f670f=a117_0xfaa0;(function(_0x31d3c4,_0x9f97c1){const _0x7806f4=a117_0xfaa0,_0xfa8b38=_0x31d3c4();while(!![]){try{const _0x539b73=-parseInt(_0x7806f4(0x15d))/0x1+-parseInt(_0x7806f4(0x158))/0x2+parseInt(_0x7806f4(0x15c))/0x3*(-parseInt(_0x7806f4(0x165))/0x4)+-parseInt(_0x7806f4(0x166))/0x5*(-parseInt(_0x7806f4(0x163))/0x6)+-parseInt(_0x7806f4(0x156))/0x7+parseInt(_0x7806f4(0x167))/0x8+parseInt(_0x7806f4(0x164))/0x9;if(_0x539b73===_0x9f97c1)break;else _0xfa8b38['push'](_0xfa8b38['shift']());}catch(_0x473ce8){_0xfa8b38['push'](_0xfa8b38['shift']());}}}(a117_0x4441,0xa6329));function a117_0xfaa0(_0x1265a9,_0x188bf3){_0x1265a9=_0x1265a9-0x155;const _0x4441d5=a117_0x4441();let _0xfaa0e1=_0x4441d5[_0x1265a9];return _0xfaa0e1;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a117_0x2f670f(0x159));export function createDeterministicZipPackage(_0x195ad5){const _0x4e9a17=a117_0x2f670f,_0x14a857={};for(const _0x48985c of normalizeLocalFiles(_0x195ad5)){_0x14a857[_0x48985c[_0x4e9a17(0x15f)]]=fileContent(_0x48985c);}return Buffer[_0x4e9a17(0x15e)](zipSync(_0x14a857,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x50b346){const _0xfbc8ae=a117_0x2f670f;if(_0x50b346['length']<0x16)throw CliErrors[_0xfbc8ae(0x168)](_0xfbc8ae(0x15a));let _0xf1cc;try{_0xf1cc=unzipSync(_0x50b346,{'filter'(_0x3ba195){const _0x51725f=_0xfbc8ae,_0x18ee36=normalizeSkillRelativePath(_0x3ba195[_0x51725f(0x161)]);if(_0x18ee36[_0x51725f(0x155)]('/'))throw CliErrors[_0x51725f(0x168)](_0x51725f(0x16a)+_0x18ee36);return!![];}});}catch(_0x2c1d2b){if(isRuntimeSkillValidationError(_0x2c1d2b))throw _0x2c1d2b;throw CliErrors['validation'](_0xfbc8ae(0x15a));}return Object['entries'](_0xf1cc)[_0xfbc8ae(0x169)](([_0x1ef616,_0x214f9c])=>({'path':normalizeSkillRelativePath(_0x1ef616),'bytes':Buffer[_0xfbc8ae(0x15e)](_0x214f9c)}))[_0xfbc8ae(0x162)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x23b0d5){const _0x2bba49=a117_0x2f670f;return typeof _0x23b0d5===_0x2bba49(0x160)&&_0x23b0d5!==null&&_0x2bba49(0x15b)in _0x23b0d5&&_0x23b0d5[_0x2bba49(0x15b)]===_0x2bba49(0x157);}
@@ -1 +1 @@
1
- (function(_0x46a021,_0x5f9214){const _0x5d56bb=a117_0x4e35,_0x375d80=_0x46a021();while(!![]){try{const _0x51e1a3=-parseInt(_0x5d56bb(0x200))/0x1+-parseInt(_0x5d56bb(0x202))/0x2+parseInt(_0x5d56bb(0x1e7))/0x3+parseInt(_0x5d56bb(0x1f6))/0x4+-parseInt(_0x5d56bb(0x1ee))/0x5*(-parseInt(_0x5d56bb(0x1f9))/0x6)+parseInt(_0x5d56bb(0x207))/0x7+-parseInt(_0x5d56bb(0x205))/0x8;if(_0x51e1a3===_0x5f9214)break;else _0x375d80['push'](_0x375d80['shift']());}catch(_0x548d66){_0x375d80['push'](_0x375d80['shift']());}}}(a117_0x553d,0xd1304));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x2b765a){const _0x3d03c3=a117_0x4e35,_0x3701ff=normalizeLocalFiles(_0x2b765a);if(!_0x3701ff[_0x3d03c3(0x1fe)](_0x5e9582=>_0x5e9582[_0x3d03c3(0x209)]===SKILL_FILE))throw CliErrors[_0x3d03c3(0x1f4)](_0x3d03c3(0x1f5)+SKILL_FILE+_0x3d03c3(0x20d));const _0x29e7d7=localFilesToManifestFiles(_0x3701ff),_0x56986e=createDeterministicZipPackage(_0x3701ff);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x29e7d7),'zipSha256':bufferSha256(_0x56986e),'zipSize':_0x56986e[_0x3d03c3(0x1f3)],'files':_0x29e7d7},'packageBytes':_0x56986e,'packageBase64':_0x56986e[_0x3d03c3(0x20a)](_0x3d03c3(0x1fa))};}export function verifyRuntimeSkillPackage(_0x5195f7,_0x14a12c){const _0x178eb0=a117_0x4e35,_0x840fd9=normalizePackageManifest(_0x5195f7,{'requireOssPath':![]});if(!_0x840fd9)throw CliErrors['validation'](_0x178eb0(0x1f8));return extractAndVerifyPackage(_0x840fd9,_0x14a12c);}function a117_0x4e35(_0x3be384,_0x42de4c){_0x3be384=_0x3be384-0x1e7;const _0x553dab=a117_0x553d();let _0x4e3596=_0x553dab[_0x3be384];return _0x4e3596;}export function verifyRuntimeSkillBundle(_0x57fcd4,_0x42a753){const _0x3cf3b4=a117_0x4e35,_0x40cf45=normalizePackageManifest(_0x57fcd4,{'requireOssPath':![]});if(!_0x40cf45)throw CliErrors[_0x3cf3b4(0x1f4)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x40cf45,_0x42a753);}export function tryNormalizePackageManifest(_0x31e334){return normalizePackageManifest(_0x31e334,{'requireOssPath':![]});}function a117_0x553d(){const _0x299730=['1135714mnLHMd','size','1532270xTqXnm','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','isArray','10280312ifmwRD','string','9101036mLWSRg','Duplicate\x20Skill\x20package\x20entry:\x20','path','toString','ossPath','zipSize','\x20in\x20Skill\x20file\x20package.','sha256','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','schemaVersion','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','treeSha256','1715835xDkJaQ','isSafeInteger','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','push','Runtime\x20Skill\x20package\x20is\x20missing\x20','zipSha256','trim','8253030lHfRvl','has','bytes','get','set','length','validation','Missing\x20','2084100cNZnon','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','6NmCijC','base64','requireOssPath','files','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','some','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'];a117_0x553d=function(){return _0x299730;};return a117_0x553d();}export function requirePackageBytes(_0x476765,_0xf25b47){const _0x8b39c6=a117_0x4e35;if(!_0xf25b47||_0xf25b47[_0x8b39c6(0x1f3)]===0x0)throw CliErrors[_0x8b39c6(0x1f4)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x476765);return _0xf25b47;}export function extractDownloadedPackage(_0x48b21c){const _0x28ce93=a117_0x4e35,_0x2ae0a0=parseZipPackage(_0x48b21c)['map'](_0x25696b=>({'path':_0x25696b[_0x28ce93(0x209)],'bytes':_0x25696b[_0x28ce93(0x1f0)]}));if(!_0x2ae0a0[_0x28ce93(0x1fe)](_0x374951=>_0x374951[_0x28ce93(0x209)]===SKILL_FILE))throw CliErrors[_0x28ce93(0x1f4)](_0x28ce93(0x1eb)+SKILL_FILE+'.');return normalizeLocalFiles(_0x2ae0a0);}export function localFilesToManifestFiles(_0x19c9ee){const _0x20e43c=a117_0x4e35;return normalizeLocalFiles(_0x19c9ee)['map'](_0x519754=>({'path':_0x519754[_0x20e43c(0x209)],'sha256':fileHash(_0x519754),'size':fileContent(_0x519754)[_0x20e43c(0x1f3)]}));}function normalizePackageManifest(_0x56266f,_0x45f4b2){const _0x22609d=a117_0x4e35;if(!_0x56266f||typeof _0x56266f!=='object'||Array[_0x22609d(0x204)](_0x56266f))return undefined;const _0x26c40d=_0x56266f,_0x36f809=typeof _0x26c40d[_0x22609d(0x20b)]===_0x22609d(0x206)?_0x26c40d['ossPath'][_0x22609d(0x1ed)]():undefined;if(_0x45f4b2[_0x22609d(0x1fb)]&&!_0x36f809)return undefined;if(!Array[_0x22609d(0x204)](_0x26c40d[_0x22609d(0x1fc)])||_0x26c40d['files'][_0x22609d(0x1f3)]===0x0)return undefined;if(!isSha256Hex(_0x26c40d[_0x22609d(0x213)]))throw CliErrors[_0x22609d(0x1f4)](_0x22609d(0x212));if(!isSha256Hex(_0x26c40d[_0x22609d(0x1ec)]))throw CliErrors[_0x22609d(0x1f4)](_0x22609d(0x1fd));if(!Number[_0x22609d(0x1e8)](_0x26c40d[_0x22609d(0x20c)])||_0x26c40d[_0x22609d(0x20c)]<0x0)throw CliErrors[_0x22609d(0x1f4)](_0x22609d(0x203));const _0x549d81=normalizeManifestFiles(_0x26c40d['files']);if(!_0x549d81[_0x22609d(0x1fe)](_0x256531=>_0x256531['path']===SKILL_FILE))throw CliErrors[_0x22609d(0x1f4)](_0x22609d(0x1e9)+SKILL_FILE+'.');const _0x591a77=fileTreeHash(_0x549d81);if(_0x591a77!==_0x26c40d[_0x22609d(0x213)]['toLowerCase']())throw CliErrors[_0x22609d(0x1f4)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x22609d(0x1e8)](_0x26c40d[_0x22609d(0x210)])?_0x26c40d[_0x22609d(0x210)]:0x2,'ossPath':_0x36f809,'treeSha256':_0x591a77,'zipSha256':_0x26c40d[_0x22609d(0x1ec)]['toLowerCase'](),'zipSize':_0x26c40d[_0x22609d(0x20c)],'files':_0x549d81};}function extractAndVerifyPackage(_0x26a2fe,_0x4d2793){const _0x86e6a9=a117_0x4e35,_0x3fab38=normalizePackageManifest(_0x26a2fe,{'requireOssPath':![]});if(!_0x3fab38)throw CliErrors['validation'](_0x86e6a9(0x1f8));if(_0x4d2793[_0x86e6a9(0x1f3)]!==_0x3fab38[_0x86e6a9(0x20c)])throw CliErrors[_0x86e6a9(0x1f4)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x160024=bufferSha256(_0x4d2793);if(_0x160024!==_0x3fab38['zipSha256'])throw CliErrors[_0x86e6a9(0x1f4)](_0x86e6a9(0x1f7));return extractAndVerifyPackageFiles(_0x3fab38,_0x4d2793);}function extractAndVerifyPackageFiles(_0x4012fa,_0x5c8b9c){const _0x88ed45=a117_0x4e35,_0x5d95da=parseZipPackage(_0x5c8b9c);if(_0x5d95da[_0x88ed45(0x1f3)]!==_0x4012fa['files'][_0x88ed45(0x1f3)])throw CliErrors[_0x88ed45(0x1f4)](_0x88ed45(0x20f));const _0x362cdf=new Map();for(const _0xc85b3d of _0x5d95da){if(_0x362cdf[_0x88ed45(0x1ef)](_0xc85b3d[_0x88ed45(0x209)]))throw CliErrors[_0x88ed45(0x1f4)](_0x88ed45(0x208)+_0xc85b3d['path']);_0x362cdf[_0x88ed45(0x1f2)](_0xc85b3d[_0x88ed45(0x209)],_0xc85b3d);}const _0x4c6845=[];for(const _0x344cab of _0x4012fa[_0x88ed45(0x1fc)]){const _0x7166e9=_0x362cdf[_0x88ed45(0x1f1)](_0x344cab[_0x88ed45(0x209)]);if(!_0x7166e9)throw CliErrors[_0x88ed45(0x1f4)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x344cab[_0x88ed45(0x209)]);if(_0x7166e9[_0x88ed45(0x1f0)][_0x88ed45(0x1f3)]!==_0x344cab[_0x88ed45(0x201)])throw CliErrors['validation'](_0x88ed45(0x1ff)+_0x344cab[_0x88ed45(0x209)]);const _0x516e0d=bufferSha256(_0x7166e9[_0x88ed45(0x1f0)]);if(_0x516e0d!==_0x344cab[_0x88ed45(0x20e)])throw CliErrors[_0x88ed45(0x1f4)](_0x88ed45(0x211)+_0x344cab[_0x88ed45(0x209)]);_0x4c6845[_0x88ed45(0x1ea)]({'path':_0x344cab[_0x88ed45(0x209)],'bytes':_0x7166e9[_0x88ed45(0x1f0)]});}return normalizeLocalFiles(_0x4c6845);}
1
+ (function(_0x4ec7a2,_0x34cece){const _0x164316=a118_0x3f4e,_0x543ac8=_0x4ec7a2();while(!![]){try{const _0x39bc95=parseInt(_0x164316(0x162))/0x1+-parseInt(_0x164316(0x16b))/0x2+-parseInt(_0x164316(0x161))/0x3*(-parseInt(_0x164316(0x171))/0x4)+-parseInt(_0x164316(0x178))/0x5+-parseInt(_0x164316(0x172))/0x6+-parseInt(_0x164316(0x151))/0x7*(parseInt(_0x164316(0x166))/0x8)+parseInt(_0x164316(0x152))/0x9*(parseInt(_0x164316(0x168))/0xa);if(_0x39bc95===_0x34cece)break;else _0x543ac8['push'](_0x543ac8['shift']());}catch(_0x5623f){_0x543ac8['push'](_0x543ac8['shift']());}}}(a118_0xb522,0x6b26c));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a118_0x3f4e(_0x26b385,_0x257f4e){_0x26b385=_0x26b385-0x151;const _0xb522f8=a118_0xb522();let _0x3f4efd=_0xb522f8[_0x26b385];return _0x3f4efd;}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x184c95){const _0x14a66b=a118_0x3f4e,_0x29658a=normalizeLocalFiles(_0x184c95);if(!_0x29658a['some'](_0x3a3dde=>_0x3a3dde[_0x14a66b(0x15b)]===SKILL_FILE))throw CliErrors[_0x14a66b(0x179)](_0x14a66b(0x17e)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x7c9920=localFilesToManifestFiles(_0x29658a),_0x420f98=createDeterministicZipPackage(_0x29658a);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x7c9920),'zipSha256':bufferSha256(_0x420f98),'zipSize':_0x420f98['length'],'files':_0x7c9920},'packageBytes':_0x420f98,'packageBase64':_0x420f98[_0x14a66b(0x160)]('base64')};}export function verifyRuntimeSkillPackage(_0x310df0,_0x368ce0){const _0x58fd06=a118_0x3f4e,_0x5d2bf6=normalizePackageManifest(_0x310df0,{'requireOssPath':![]});if(!_0x5d2bf6)throw CliErrors[_0x58fd06(0x179)](_0x58fd06(0x167));return extractAndVerifyPackage(_0x5d2bf6,_0x368ce0);}export function verifyRuntimeSkillBundle(_0x453c1e,_0x42aa2e){const _0x2dba28=a118_0x3f4e,_0x1d8695=normalizePackageManifest(_0x453c1e,{'requireOssPath':![]});if(!_0x1d8695)throw CliErrors[_0x2dba28(0x179)](_0x2dba28(0x167));return extractAndVerifyPackageFiles(_0x1d8695,_0x42aa2e);}export function tryNormalizePackageManifest(_0x5cf83e){return normalizePackageManifest(_0x5cf83e,{'requireOssPath':![]});}export function requirePackageBytes(_0x4ddd76,_0x32845a){const _0x46769e=a118_0x3f4e;if(!_0x32845a||_0x32845a[_0x46769e(0x155)]===0x0)throw CliErrors[_0x46769e(0x179)](_0x46769e(0x15a)+_0x4ddd76);return _0x32845a;}export function extractDownloadedPackage(_0x3291fd){const _0x11210d=a118_0x3f4e,_0x38494c=parseZipPackage(_0x3291fd)[_0x11210d(0x17b)](_0x1aba7a=>({'path':_0x1aba7a['path'],'bytes':_0x1aba7a['bytes']}));if(!_0x38494c[_0x11210d(0x169)](_0x593fba=>_0x593fba[_0x11210d(0x15b)]===SKILL_FILE))throw CliErrors['validation'](_0x11210d(0x170)+SKILL_FILE+'.');return normalizeLocalFiles(_0x38494c);}export function localFilesToManifestFiles(_0x4dbad1){const _0x379bee=a118_0x3f4e;return normalizeLocalFiles(_0x4dbad1)[_0x379bee(0x17b)](_0x2e64c3=>({'path':_0x2e64c3[_0x379bee(0x15b)],'sha256':fileHash(_0x2e64c3),'size':fileContent(_0x2e64c3)['length']}));}function normalizePackageManifest(_0x280e93,_0x161d83){const _0x5ebfdb=a118_0x3f4e;if(!_0x280e93||typeof _0x280e93!=='object'||Array['isArray'](_0x280e93))return undefined;const _0x583070=_0x280e93,_0x56d73d=typeof _0x583070[_0x5ebfdb(0x15f)]===_0x5ebfdb(0x159)?_0x583070[_0x5ebfdb(0x15f)]['trim']():undefined;if(_0x161d83[_0x5ebfdb(0x17d)]&&!_0x56d73d)return undefined;if(!Array['isArray'](_0x583070['files'])||_0x583070[_0x5ebfdb(0x16d)][_0x5ebfdb(0x155)]===0x0)return undefined;if(!isSha256Hex(_0x583070[_0x5ebfdb(0x16a)]))throw CliErrors[_0x5ebfdb(0x179)](_0x5ebfdb(0x176));if(!isSha256Hex(_0x583070['zipSha256']))throw CliErrors['validation'](_0x5ebfdb(0x175));if(!Number[_0x5ebfdb(0x15c)](_0x583070[_0x5ebfdb(0x17c)])||_0x583070['zipSize']<0x0)throw CliErrors[_0x5ebfdb(0x179)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x303ad1=normalizeManifestFiles(_0x583070['files']);if(!_0x303ad1['some'](_0x29ccec=>_0x29ccec[_0x5ebfdb(0x15b)]===SKILL_FILE))throw CliErrors[_0x5ebfdb(0x179)](_0x5ebfdb(0x16c)+SKILL_FILE+'.');const _0x1c42fc=fileTreeHash(_0x303ad1);if(_0x1c42fc!==_0x583070[_0x5ebfdb(0x16a)][_0x5ebfdb(0x177)]())throw CliErrors['validation'](_0x5ebfdb(0x157));return{'schemaVersion':Number[_0x5ebfdb(0x15c)](_0x583070[_0x5ebfdb(0x164)])?_0x583070[_0x5ebfdb(0x164)]:0x2,'ossPath':_0x56d73d,'treeSha256':_0x1c42fc,'zipSha256':_0x583070[_0x5ebfdb(0x154)][_0x5ebfdb(0x177)](),'zipSize':_0x583070['zipSize'],'files':_0x303ad1};}function a118_0xb522(){const _0x10fa48=['treeSha256','1239608AqNATR','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','files','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','get','Runtime\x20Skill\x20package\x20is\x20missing\x20','4KotrWG','3195576YuQbaT','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','size','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','toLowerCase','875985RMXQAO','validation','Duplicate\x20Skill\x20package\x20entry:\x20','map','zipSize','requireOssPath','Missing\x20','set','7WGJIJE','558htPOCA','Runtime\x20Skill\x20package\x20size\x20mismatch.','zipSha256','length','has','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','string','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','path','isSafeInteger','bytes','push','ossPath','toString','2187207MNNhLA','284411zGqQvy','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','schemaVersion','sha256','2779432BDkQqS','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','177490DxLiRA','some'];a118_0xb522=function(){return _0x10fa48;};return a118_0xb522();}function extractAndVerifyPackage(_0x45c444,_0x77c8ab){const _0x59d1ce=a118_0x3f4e,_0x312767=normalizePackageManifest(_0x45c444,{'requireOssPath':![]});if(!_0x312767)throw CliErrors[_0x59d1ce(0x179)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x77c8ab[_0x59d1ce(0x155)]!==_0x312767[_0x59d1ce(0x17c)])throw CliErrors[_0x59d1ce(0x179)](_0x59d1ce(0x153));const _0x326205=bufferSha256(_0x77c8ab);if(_0x326205!==_0x312767['zipSha256'])throw CliErrors[_0x59d1ce(0x179)](_0x59d1ce(0x16e));return extractAndVerifyPackageFiles(_0x312767,_0x77c8ab);}function extractAndVerifyPackageFiles(_0x5845a5,_0x14d5d8){const _0x45595e=a118_0x3f4e,_0x2988d0=parseZipPackage(_0x14d5d8);if(_0x2988d0[_0x45595e(0x155)]!==_0x5845a5['files'][_0x45595e(0x155)])throw CliErrors[_0x45595e(0x179)](_0x45595e(0x173));const _0x5716c5=new Map();for(const _0x9c302 of _0x2988d0){if(_0x5716c5[_0x45595e(0x156)](_0x9c302['path']))throw CliErrors['validation'](_0x45595e(0x17a)+_0x9c302[_0x45595e(0x15b)]);_0x5716c5[_0x45595e(0x17f)](_0x9c302[_0x45595e(0x15b)],_0x9c302);}const _0x576e26=[];for(const _0x40d775 of _0x5845a5[_0x45595e(0x16d)]){const _0x539bfc=_0x5716c5[_0x45595e(0x16f)](_0x40d775[_0x45595e(0x15b)]);if(!_0x539bfc)throw CliErrors[_0x45595e(0x179)](_0x45595e(0x158)+_0x40d775[_0x45595e(0x15b)]);if(_0x539bfc[_0x45595e(0x15d)][_0x45595e(0x155)]!==_0x40d775[_0x45595e(0x174)])throw CliErrors[_0x45595e(0x179)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x40d775[_0x45595e(0x15b)]);const _0x550113=bufferSha256(_0x539bfc[_0x45595e(0x15d)]);if(_0x550113!==_0x40d775[_0x45595e(0x165)])throw CliErrors[_0x45595e(0x179)](_0x45595e(0x163)+_0x40d775['path']);_0x576e26[_0x45595e(0x15e)]({'path':_0x40d775[_0x45595e(0x15b)],'bytes':_0x539bfc[_0x45595e(0x15d)]});}return normalizeLocalFiles(_0x576e26);}
@@ -1 +1 @@
1
- (function(_0x421c2b,_0x2a036f){var _0x1f4e16=a118_0x33d8,_0xe16254=_0x421c2b();while(!![]){try{var _0x5e130f=-parseInt(_0x1f4e16(0x6a))/0x1*(-parseInt(_0x1f4e16(0x6e))/0x2)+parseInt(_0x1f4e16(0x6b))/0x3+parseInt(_0x1f4e16(0x70))/0x4*(parseInt(_0x1f4e16(0x69))/0x5)+parseInt(_0x1f4e16(0x67))/0x6*(-parseInt(_0x1f4e16(0x6f))/0x7)+-parseInt(_0x1f4e16(0x68))/0x8*(-parseInt(_0x1f4e16(0x6c))/0x9)+-parseInt(_0x1f4e16(0x65))/0xa*(-parseInt(_0x1f4e16(0x6d))/0xb)+-parseInt(_0x1f4e16(0x66))/0xc;if(_0x5e130f===_0x2a036f)break;else _0xe16254['push'](_0xe16254['shift']());}catch(_0x3dc7e4){_0xe16254['push'](_0xe16254['shift']());}}}(a118_0x3071,0x6a238));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a118_0x3071(){var _0x391e97=['6vohhou','573448vNkJUb','1275LkTrFt','1SZAJKg','551499tVZqAc','18wMWgoS','143cgjyFk','1563864lnJAMC','5057122ntCBnP','12764XMixpO','140450UxpVPe','11378724EKDrmI'];a118_0x3071=function(){return _0x391e97;};return a118_0x3071();}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a118_0x33d8(_0x40ba0e,_0x55e7f3){_0x40ba0e=_0x40ba0e-0x65;var _0x307163=a118_0x3071();var _0x33d860=_0x307163[_0x40ba0e];return _0x33d860;}export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
1
+ (function(_0x509588,_0x312fee){var _0x462422=a119_0x3b3c,_0x2b082c=_0x509588();while(!![]){try{var _0x1ce809=-parseInt(_0x462422(0x7c))/0x1+-parseInt(_0x462422(0x83))/0x2*(-parseInt(_0x462422(0x7d))/0x3)+-parseInt(_0x462422(0x82))/0x4*(parseInt(_0x462422(0x84))/0x5)+-parseInt(_0x462422(0x7e))/0x6+parseInt(_0x462422(0x7f))/0x7+-parseInt(_0x462422(0x81))/0x8*(parseInt(_0x462422(0x80))/0x9)+-parseInt(_0x462422(0x7b))/0xa*(-parseInt(_0x462422(0x85))/0xb);if(_0x1ce809===_0x312fee)break;else _0x2b082c['push'](_0x2b082c['shift']());}catch(_0x40d904){_0x2b082c['push'](_0x2b082c['shift']());}}}(a119_0xe433,0x34de5));function a119_0x3b3c(_0x8e8e23,_0x1efb23){_0x8e8e23=_0x8e8e23-0x7b;var _0xe43384=a119_0xe433();var _0x3b3cdf=_0xe43384[_0x8e8e23];return _0x3b3cdf;}export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a119_0xe433(){var _0x3ee0c6=['1012146ShaMUn','164612koGQJx','88002RayKdN','280kMrbXs','4044ivHSvX','18clxmyM','1315ABcXCc','22ogPxDl','5826620xyrvxP','426408FoqazA','76977RSemfp'];a119_0xe433=function(){return _0x3ee0c6;};return a119_0xe433();}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- function a119_0x572a(_0x5a59fe,_0x5a6633){_0x5a59fe=_0x5a59fe-0xd0;const _0x2b91f3=a119_0x2b91();let _0x572a80=_0x2b91f3[_0x5a59fe];return _0x572a80;}(function(_0x1c18e4,_0x14dcf5){const _0x1cbd1d=a119_0x572a,_0x505ef5=_0x1c18e4();while(!![]){try{const _0x4ca2f0=parseInt(_0x1cbd1d(0xd6))/0x1+parseInt(_0x1cbd1d(0xd5))/0x2+-parseInt(_0x1cbd1d(0xd0))/0x3+parseInt(_0x1cbd1d(0xd4))/0x4+parseInt(_0x1cbd1d(0xd7))/0x5+-parseInt(_0x1cbd1d(0xd3))/0x6+parseInt(_0x1cbd1d(0xd2))/0x7*(-parseInt(_0x1cbd1d(0xd1))/0x8);if(_0x4ca2f0===_0x14dcf5)break;else _0x505ef5['push'](_0x505ef5['shift']());}catch(_0x23474c){_0x505ef5['push'](_0x505ef5['shift']());}}}(a119_0x2b91,0x8c167));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a119_0x2b91(){const _0x168579=['128kqjEou','590219yjwvKS','6746064qkDaDB','4542848NVfkeK','2188828SXqdTu','562448WvANBb','3367155WqqSXN','1256370XaoBPq'];a119_0x2b91=function(){return _0x168579;};return a119_0x2b91();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x2095f4,_0x3c2163){const _0x466944=a120_0x4ca8,_0x268884=_0x2095f4();while(!![]){try{const _0x29ee8a=parseInt(_0x466944(0xec))/0x1*(-parseInt(_0x466944(0xf1))/0x2)+-parseInt(_0x466944(0xe7))/0x3*(parseInt(_0x466944(0xeb))/0x4)+-parseInt(_0x466944(0xea))/0x5*(-parseInt(_0x466944(0xe9))/0x6)+-parseInt(_0x466944(0xed))/0x7+-parseInt(_0x466944(0xef))/0x8*(parseInt(_0x466944(0xe8))/0x9)+-parseInt(_0x466944(0xf0))/0xa+parseInt(_0x466944(0xee))/0xb;if(_0x29ee8a===_0x3c2163)break;else _0x268884['push'](_0x268884['shift']());}catch(_0xb10540){_0x268884['push'](_0x268884['shift']());}}}(a120_0x40be,0xa8d6f));function a120_0x40be(){const _0x3f99c1=['65778hHEOZn','55XYLfsJ','4ppplGO','1BmTQkC','5357597RAaJqL','31663621zbYqIK','1776552jzsNrq','1105640aYWgma','1327366XVjJLk','971343wWorPE','18zHvCRG'];a120_0x40be=function(){return _0x3f99c1;};return a120_0x40be();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a120_0x4ca8(_0x119932,_0x1d095e){_0x119932=_0x119932-0xe7;const _0x40bec3=a120_0x40be();let _0x4ca870=_0x40bec3[_0x119932];return _0x4ca870;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});