@lovrabet/lovrabet-cli 2.1.20-beta.1 → 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 (128) 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.js +1 -1
  88. package/lib/framework/rate-limit.js +1 -1
  89. package/lib/framework/raw-flags.js +1 -1
  90. package/lib/framework/response.js +1 -1
  91. package/lib/framework/runner-confirmation.js +1 -1
  92. package/lib/framework/runner-error.js +1 -1
  93. package/lib/framework/runner.js +1 -1
  94. package/lib/framework/schema-export.js +1 -1
  95. package/lib/framework/service-order.js +1 -1
  96. package/lib/framework/types.js +1 -1
  97. package/lib/generated/build-info.d.ts +4 -4
  98. package/lib/generated/build-info.js +1 -1
  99. package/lib/help.js +1 -1
  100. package/lib/runtime/event.js +1 -1
  101. package/lib/runtime/index.js +1 -1
  102. package/lib/runtime/queue.js +1 -1
  103. package/lib/runtime/resolve.js +1 -1
  104. package/lib/skills/npx-skills-add.js +1 -1
  105. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  106. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  107. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  108. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  109. package/lib/skills/runtime-skill-sync/links.js +1 -1
  110. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  111. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  112. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  113. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  114. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  115. package/lib/skills/runtime-skill-sync/push.js +1 -1
  116. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  117. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  118. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  119. package/lib/skills/runtime-skill-sync.js +1 -1
  120. package/lib/utils/apply-jq-filter.js +1 -1
  121. package/lib/utils/logger.js +1 -1
  122. package/lib/utils/lossless-json.js +1 -1
  123. package/lib/utils/params.js +1 -1
  124. package/lib/utils/platform.js +1 -1
  125. package/lib/utils/update-notice.js +1 -1
  126. package/lib/utils/version.js +1 -1
  127. package/lib/utils/write-cli-side-channel.js +1 -1
  128. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x3a0958,_0x224df7){const _0x5d8b7a=a106_0x4bcd,_0x520ef7=_0x3a0958();while(!![]){try{const _0x47b8bf=parseInt(_0x5d8b7a(0x1cb))/0x1+parseInt(_0x5d8b7a(0x1ca))/0x2+parseInt(_0x5d8b7a(0x1ce))/0x3+-parseInt(_0x5d8b7a(0x1cd))/0x4+parseInt(_0x5d8b7a(0x1c9))/0x5*(-parseInt(_0x5d8b7a(0x1d0))/0x6)+-parseInt(_0x5d8b7a(0x1d3))/0x7*(parseInt(_0x5d8b7a(0x1cf))/0x8)+parseInt(_0x5d8b7a(0x1d1))/0x9;if(_0x47b8bf===_0x224df7)break;else _0x520ef7['push'](_0x520ef7['shift']());}catch(_0x44dd49){_0x520ef7['push'](_0x520ef7['shift']());}}}(a106_0x56fd,0x53683));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x7d16be){const _0x1c6764=a106_0x4bcd;return createHash('sha256')[_0x1c6764(0x1d4)](_0x7d16be)['digest'](_0x1c6764(0x1d6));}export function fileHash(_0x2b68b6){return bufferSha256(fileContent(_0x2b68b6));}function a106_0x56fd(){const _0x139af5=['2465020IRDcGi','1586079EQzZYY','8FaBhZx','1810326OJgWfF','7560396rvJjQF','digest','128863LicWjP','update','size','hex','path','10dpIxHr','195622erCAXy','113193kIEiNx','sha256'];a106_0x56fd=function(){return _0x139af5;};return a106_0x56fd();}export function bufferSha256(_0xf9d07b){const _0x15bb8e=a106_0x4bcd;return createHash(_0x15bb8e(0x1cc))['update'](_0xf9d07b)['digest']('hex');}function a106_0x4bcd(_0x18ddd2,_0x5a561a){_0x18ddd2=_0x18ddd2-0x1c9;const _0x56fdf0=a106_0x56fd();let _0x4bcd60=_0x56fdf0[_0x18ddd2];return _0x4bcd60;}export function fileTreeHash(_0x2fc50f){const _0x5af922=a106_0x4bcd,_0x5b7c54=createHash(_0x5af922(0x1cc));for(const _0x23fd8e of normalizeManifestFiles(_0x2fc50f)){_0x5b7c54[_0x5af922(0x1d4)](_0x23fd8e[_0x5af922(0x1d7)]),_0x5b7c54[_0x5af922(0x1d4)]('\x00'),_0x5b7c54[_0x5af922(0x1d4)](_0x23fd8e[_0x5af922(0x1cc)]),_0x5b7c54[_0x5af922(0x1d4)]('\x00'),_0x5b7c54[_0x5af922(0x1d4)](String(_0x23fd8e[_0x5af922(0x1d5)])),_0x5b7c54[_0x5af922(0x1d4)]('\x00');}return _0x5b7c54[_0x5af922(0x1d2)](_0x5af922(0x1d6));}
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
- function a107_0xc6f0(){const _0x296fac=['203uClqZr','5JmNMbD','71144UfyGAS','.agents','21918348faBDuw','919222nUYfwO','managedRoot','2778196YLKkeQ','10FJvDpv','skills','1529568UnPdmk','1714074qenUmt','5897718UtNdCp','cwd','freeze'];a107_0xc6f0=function(){return _0x296fac;};return a107_0xc6f0();}(function(_0x450601,_0x1a1a78){const _0xfccb2c=a107_0x52b2,_0x4c3625=_0x450601();while(!![]){try{const _0x1590fb=parseInt(_0xfccb2c(0x1e5))/0x1+-parseInt(_0xfccb2c(0x1dc))/0x2+-parseInt(_0xfccb2c(0x1db))/0x3+-parseInt(_0xfccb2c(0x1e7))/0x4*(parseInt(_0xfccb2c(0x1e1))/0x5)+-parseInt(_0xfccb2c(0x1dd))/0x6+-parseInt(_0xfccb2c(0x1e0))/0x7*(-parseInt(_0xfccb2c(0x1e2))/0x8)+parseInt(_0xfccb2c(0x1e4))/0x9*(parseInt(_0xfccb2c(0x1d9))/0xa);if(_0x1590fb===_0x1a1a78)break;else _0x4c3625['push'](_0x4c3625['shift']());}catch(_0x2a8648){_0x4c3625['push'](_0x4c3625['shift']());}}}(a107_0xc6f0,0x8ab20));import{resolve}from'node:path';function a107_0x52b2(_0x1fd6f9,_0x3301dd){_0x1fd6f9=_0x1fd6f9-0x1d9;const _0xc6f0b1=a107_0xc6f0();let _0x52b209=_0xc6f0b1[_0x1fd6f9];return _0x52b209;}import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x5c0993,_0x5507f7='global',_0x3f2ab2={}){const _0xfb69ae=a107_0x52b2,_0x2dbdfd=resolveSkillSyncPaths(_0x3f2ab2),_0x10a826=safePathSegment(_0x5c0993,'appCode'),_0x32c1bd=_0x5507f7==='project'?[resolve(_0x3f2ab2['cwd']??process[_0xfb69ae(0x1de)](),_0xfb69ae(0x1e3),_0xfb69ae(0x1da))]:runtimeAgentSkillRoots(_0x2dbdfd);return Object['freeze']({'scope':_0x5507f7,'appCode':_0x10a826,'skillRoots':Object[_0xfb69ae(0x1df)](_0x32c1bd),'managedRoot':_0x2dbdfd[_0xfb69ae(0x1e6)]});}
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
- const a108_0x53edfb=a108_0x5f0b;(function(_0x8eea2f,_0x35b689){const _0x27906e=a108_0x5f0b,_0xf98850=_0x8eea2f();while(!![]){try{const _0x43dde9=parseInt(_0x27906e(0x1f9))/0x1*(parseInt(_0x27906e(0x205))/0x2)+-parseInt(_0x27906e(0x215))/0x3+-parseInt(_0x27906e(0x1ef))/0x4*(-parseInt(_0x27906e(0x210))/0x5)+-parseInt(_0x27906e(0x20a))/0x6*(parseInt(_0x27906e(0x1ec))/0x7)+parseInt(_0x27906e(0x1f1))/0x8*(parseInt(_0x27906e(0x20c))/0x9)+parseInt(_0x27906e(0x1ee))/0xa*(parseInt(_0x27906e(0x208))/0xb)+parseInt(_0x27906e(0x211))/0xc*(-parseInt(_0x27906e(0x204))/0xd);if(_0x43dde9===_0x35b689)break;else _0xf98850['push'](_0xf98850['shift']());}catch(_0x225201){_0xf98850['push'](_0xf98850['shift']());}}}(a108_0x4ec9,0xbb82d));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a108_0x2f4b08 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_0x2f4b08,RESERVED_PROJECT_SKILL_CODES=new Set([a108_0x53edfb(0x1e7),'runtime-observe',a108_0x53edfb(0x1f4)]);export function linkEffectiveRuntimeSkills(_0x3aeff7,_0x76f2a5){const _0x519786=a108_0x53edfb,_0xab9e19=new Map();for(const _0x4c0b0d of _0x3aeff7){const _0x5cc369=_0x4c0b0d[_0x519786(0x200)][_0x519786(0x1ea)];if(!_0x5cc369)continue;const _0x3d9ccf=_0xab9e19[_0x519786(0x212)](_0x5cc369);(!_0x3d9ccf||_0x4c0b0d[_0x519786(0x21c)]==='personal')&&_0xab9e19['set'](_0x5cc369,_0x4c0b0d);}const _0x2ea4ae=[];for(const _0x2fa38f of _0xab9e19[_0x519786(0x220)]()){const _0x4bfb6a=requireSkillCode(_0x2fa38f[_0x519786(0x200)]),_0x1b7c12=readMetadataIfPresent(_0x2fa38f['metadataPath']);if(_0x1b7c12?.[_0x519786(0x1ed)]!==_0x76f2a5[_0x519786(0x1ed)]||_0x1b7c12['skillCode']!==_0x4bfb6a)throw CliErrors[_0x519786(0x1f3)](_0x519786(0x21b)+_0x76f2a5[_0x519786(0x1ed)]+':\x20'+_0x2fa38f[_0x519786(0x1f8)]);const _0x269c6b=runtimeSkillLinkName(_0x76f2a5,_0x4bfb6a);for(const _0x1574da of _0x76f2a5[_0x519786(0x221)]){_0x2ea4ae[_0x519786(0x1fa)](ensureManagedSymlink(resolve(_0x1574da,_0x269c6b),_0x2fa38f['dir'],_0x76f2a5,_0x4bfb6a));}}return _0x2ea4ae;}export function pruneStaleRuntimeSkillLinks(_0x3125f3,_0x3d2357,_0x3dbb1b){const _0x2707e6=a108_0x53edfb,_0x134153=new Set([..._0x3d2357][_0x2707e6(0x218)](_0x44f953=>_0x44f953['trim']())['filter'](Boolean)),_0x473174=_0x3dbb1b?new Set([..._0x3dbb1b][_0x2707e6(0x218)](_0xdfedf0=>_0xdfedf0[_0x2707e6(0x1e9)]())['filter'](Boolean)):undefined,_0x18dd11=[];for(const _0x23339b of _0x3125f3[_0x2707e6(0x221)]){for(const _0x5f2f2b of managedTargetSkillLinkPaths(_0x23339b,_0x3125f3)){const _0xda0ffa=runtimeSkillCodeFromLink(_0x3125f3,_0x5f2f2b);if(_0x473174&&!_0x473174[_0x2707e6(0x209)](_0xda0ffa))continue;if(_0x134153[_0x2707e6(0x209)](_0xda0ffa))continue;_0x18dd11['push'](removeManagedSkillLink(_0x5f2f2b,_0x3125f3,_0xda0ffa));}}return _0x18dd11;}export function pruneStaleRuntimeSkillCache(_0xb8e8e2,_0x58279f={}){const _0x417c3d=a108_0x53edfb,_0x27675c=new Set([..._0xb8e8e2['activeSkillCodes']][_0x417c3d(0x218)](_0x277118=>_0x277118[_0x417c3d(0x1e9)]())[_0x417c3d(0x1ff)](Boolean)),_0x119647=_0xb8e8e2[_0x417c3d(0x207)]?new Set([..._0xb8e8e2[_0x417c3d(0x207)]][_0x417c3d(0x218)](_0x1e2ba1=>_0x1e2ba1[_0x417c3d(0x1e9)]())[_0x417c3d(0x1ff)](Boolean)):undefined,_0x40f30e=_0xb8e8e2[_0x417c3d(0x203)]??[_0x417c3d(0x214),_0x417c3d(0x20f)],_0x44df50=resolve(getRuntimeSkillCacheRoot(_0xb8e8e2[_0x417c3d(0x1fe)],_0xb8e8e2[_0x417c3d(0x1f6)],_0x58279f),safePathSegment(_0xb8e8e2[_0x417c3d(0x1ed)],_0x417c3d(0x1ed))),_0x2fc305=[];for(const _0x46d031 of _0x40f30e){const _0x383a12=resolve(_0x44df50,_0x46d031);if(!existsSync(_0x383a12))continue;for(const _0x43eb3c of readdirSync(_0x383a12,{'withFileTypes':!![]})){if(!_0x43eb3c[_0x417c3d(0x20e)]())continue;const _0x2fc266=_0x43eb3c['name'];if(_0x119647&&!_0x119647['has'](_0x2fc266))continue;if(_0x27675c[_0x417c3d(0x209)](_0x2fc266))continue;const _0x238d30=resolve(_0x383a12,_0x2fc266),_0x57469d=readMetadataIfPresent(resolve(_0x238d30,METADATA_FILE));if(_0x57469d?.[_0x417c3d(0x1ed)]!==_0xb8e8e2[_0x417c3d(0x1ed)]||_0x57469d[_0x417c3d(0x21c)]!==_0x46d031||_0x57469d['skillCode']!==_0x2fc266){_0x2fc305['push']({'path':_0x238d30,'action':_0x417c3d(0x1fc),'reason':_0x417c3d(0x1f5)});continue;}if(isLinkedFromAnyRoot(_0x238d30,_0xb8e8e2[_0x417c3d(0x1f2)]??[])){_0x2fc305[_0x417c3d(0x1fa)]({'path':_0x238d30,'action':_0x417c3d(0x1fc),'reason':'linked-from-protected-root'});continue;}removeSync(_0x238d30),_0x2fc305[_0x417c3d(0x1fa)]({'path':_0x238d30,'action':_0x417c3d(0x20d)});}}return _0x2fc305;}function a108_0x4ec9(){const _0x4f0fcc=['56IiXPhL','builtin','4896448IXKhyO','protectedLinkRoots','validation','secret-retriever','metadata-mismatch','accessKey','project','metadataPath','1uIDIWj','push','updated','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','env','filter','skill','length','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','scopes','3447834EtJYBZ','2782966HPDRpy','agentsSkillsDir','pruneSkillCodes','611105woiyat','has','132IuuXOx','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','9vKHlXg','removed','isDirectory','company','265405Qebwka','84dvdIRt','get','external-symlink','personal','369879DYXoDc','managedRoot','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','map','contentHash','created','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','scope','name','startsWith','isSymbolicLink','values','skillRoots','slice','dir','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','lovrabet','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','trim','skillCode','unchanged','88004KyDjjY','appCode','50DSMfoh'];a108_0x4ec9=function(){return _0x4f0fcc;};return a108_0x4ec9();}export function linkGlobalRuntimeSkills(_0x3508ba,_0x48ab60={}){const _0x355ba6=a108_0x53edfb,_0x5c176b=resolveSkillSyncPaths(_0x48ab60),_0x11111e=[];for(const _0x2eeb8c of _0x3508ba){if(_0x2eeb8c[_0x355ba6(0x21c)]!==_0x355ba6(0x1f0))throw CliErrors['validation'](_0x355ba6(0x217)+_0x2eeb8c[_0x355ba6(0x21c)]);const _0x535e78=requireSkillCode(_0x2eeb8c[_0x355ba6(0x200)]),_0x568bc0=copyManagedSkillDirectory(_0x2eeb8c[_0x355ba6(0x1e5)],resolve(_0x5c176b[_0x355ba6(0x206)],_0x535e78));_0x11111e['push']({..._0x568bc0,'contentHash':_0x2eeb8c[_0x355ba6(0x219)]});}return _0x11111e;}function ensureManagedSymlink(_0x4f5fc8,_0x36b0ee,_0x234ea9,_0x1a690a){const _0x3b99e2=a108_0x53edfb;mkdirSync(dirname(_0x4f5fc8),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4f5fc8)||isDanglingSymlink(_0x4f5fc8)){const _0x12dfcf=lstatSync(_0x4f5fc8);if(!_0x12dfcf[_0x3b99e2(0x21f)]())throw CliErrors[_0x3b99e2(0x1f3)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x4f5fc8);const _0x100024=resolveSymlinkTarget(_0x4f5fc8);if(!isPathInside(realOrResolved(_0x100024),realOrResolved(_0x234ea9[_0x3b99e2(0x216)])))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x4f5fc8);if(realOrResolved(_0x100024)===realOrResolved(_0x36b0ee))return{'path':_0x4f5fc8,'target':_0x36b0ee,'action':_0x3b99e2(0x1eb)};const _0x323a4d=readMetadataIfPresent(resolve(_0x100024,METADATA_FILE));if(_0x234ea9['scope']==='project'&&(_0x323a4d?.[_0x3b99e2(0x1ed)]!==_0x234ea9[_0x3b99e2(0x1ed)]||_0x323a4d[_0x3b99e2(0x1ea)]!==_0x1a690a))throw CliErrors[_0x3b99e2(0x1f3)](_0x3b99e2(0x202)+_0x4f5fc8);return unlinkSync(_0x4f5fc8),symlinkSync(_0x36b0ee,_0x4f5fc8,_0x3b99e2(0x1e5)),{'path':_0x4f5fc8,'target':_0x36b0ee,'action':_0x3b99e2(0x1fb)};}return symlinkSync(_0x36b0ee,_0x4f5fc8,_0x3b99e2(0x1e5)),{'path':_0x4f5fc8,'target':_0x36b0ee,'action':_0x3b99e2(0x21a)};}function a108_0x5f0b(_0x1fa422,_0x138b4b){_0x1fa422=_0x1fa422-0x1e4;const _0x4ec9d9=a108_0x4ec9();let _0x5f0b8a=_0x4ec9d9[_0x1fa422];return _0x5f0b8a;}function managedTargetSkillLinkPaths(_0x3d18a9,_0x5e080f){const _0x561862=a108_0x53edfb;if(!existsSync(_0x3d18a9))return[];const _0x43ce34=_0x5e080f[_0x561862(0x1ed)]+'--';return readdirSync(_0x3d18a9,{'withFileTypes':!![]})[_0x561862(0x1ff)](_0x398c67=>_0x5e080f['scope']==='project'||_0x398c67['name'][_0x561862(0x21e)](_0x43ce34))[_0x561862(0x218)](_0x12a946=>resolve(_0x3d18a9,_0x12a946['name']));}function removeManagedSkillLink(_0x47e4f7,_0x4bfdd6,_0x2831ca){const _0x369059=a108_0x53edfb,_0x161e75=lstatIfPresent(_0x47e4f7);if(!_0x161e75?.[_0x369059(0x21f)]())return{'path':_0x47e4f7,'action':_0x369059(0x1fc),'reason':'not-managed-symlink'};const _0x522a48=resolveSymlinkTarget(_0x47e4f7);if(!isPathInside(realOrResolved(_0x522a48),realOrResolved(_0x4bfdd6[_0x369059(0x216)])))return{'path':_0x47e4f7,'action':'skipped','reason':_0x369059(0x213)};const _0x3d3b7c=readMetadataIfPresent(resolve(_0x522a48,METADATA_FILE));if(_0x4bfdd6[_0x369059(0x21c)]==='project'&&(_0x3d3b7c?.[_0x369059(0x1ed)]!==_0x4bfdd6[_0x369059(0x1ed)]||_0x3d3b7c['skillCode']!==_0x2831ca))return{'path':_0x47e4f7,'action':'skipped','reason':_0x369059(0x1f5)};return unlinkSync(_0x47e4f7),{'path':_0x47e4f7,'action':_0x369059(0x20d)};}function isLinkedFromAnyRoot(_0x17bbb4,_0x34045b){const _0x3790f6=a108_0x53edfb,_0x9f296f=realOrResolved(_0x17bbb4);for(const _0x5676f9 of _0x34045b){if(!existsSync(_0x5676f9))continue;for(const _0x47a83e of readdirSync(_0x5676f9,{'withFileTypes':!![]})){if(!_0x47a83e[_0x3790f6(0x21f)]())continue;const _0x1f5b43=resolve(_0x5676f9,_0x47a83e[_0x3790f6(0x21d)]);if(realOrResolved(resolveSymlinkTarget(_0x1f5b43))===_0x9f296f)return!![];}}return![];}function runtimeSkillLinkName(_0x22d072,_0x12a034){const _0xe2728d=a108_0x53edfb,_0x126567=safePathSegment(_0x12a034,_0xe2728d(0x1ea));if(_0x22d072[_0xe2728d(0x21c)]===_0xe2728d(0x1f7)&&RESERVED_PROJECT_SKILL_CODES[_0xe2728d(0x209)](_0x126567))throw CliErrors[_0xe2728d(0x1f3)](_0xe2728d(0x1e8)+_0x126567);return _0x22d072[_0xe2728d(0x21c)]==='project'?_0x126567:_0x22d072['appCode']+'--'+_0x126567;}function runtimeSkillCodeFromLink(_0x2a9097,_0x46b742){const _0x43f9b8=a108_0x53edfb,_0xed26ac=basename(_0x46b742);return _0x2a9097[_0x43f9b8(0x21c)]===_0x43f9b8(0x1f7)?_0xed26ac:_0xed26ac[_0x43f9b8(0x1e4)]((_0x2a9097[_0x43f9b8(0x1ed)]+'--')[_0x43f9b8(0x201)]);}export function copyManagedSkillDirectory(_0x3b6a8b,_0x7a84bd){const _0x53b236=a108_0x53edfb,_0x51baea=resolve(_0x7a84bd,METADATA_FILE),_0x1c2501=existsSync(_0x7a84bd);if(_0x1c2501){const _0x21961c=lstatSync(_0x7a84bd);if(_0x21961c[_0x53b236(0x21f)]())throw CliErrors[_0x53b236(0x1f3)](_0x53b236(0x20b)+_0x7a84bd);if(!_0x21961c[_0x53b236(0x20e)]())throw CliErrors[_0x53b236(0x1f3)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x7a84bd);const _0xd8d488=readMetadataIfPresent(_0x51baea);if(_0xd8d488?.[_0x53b236(0x21c)]!=='builtin')throw CliErrors[_0x53b236(0x1f3)](_0x53b236(0x1fd)+_0x7a84bd);}ensureDirSync(dirname(_0x7a84bd));const _0x2a8ec4=_0x1c2501?readMetadataIfPresent(_0x51baea)?.[_0x53b236(0x219)]:undefined,_0x4e74c2=readMetadataIfPresent(resolve(_0x3b6a8b,METADATA_FILE))?.[_0x53b236(0x219)];return _0x1c2501&&removeSync(_0x7a84bd),copySkillDirectory(_0x3b6a8b,_0x7a84bd),{'path':_0x7a84bd,'target':_0x3b6a8b,'action':!_0x1c2501?_0x53b236(0x21a):_0x2a8ec4===_0x4e74c2?_0x53b236(0x1eb):'updated'};}function copySkillDirectory(_0x311316,_0x36340d){copySync(_0x311316,_0x36340d,{'dereference':![],'overwrite':!![],'filter'(_0x35d0f5){const _0x843f38=a108_0x5f0b;if(lstatSync(_0x35d0f5)[_0x843f38(0x21f)]())throw CliErrors[_0x843f38(0x1f3)](_0x843f38(0x1e6)+_0x35d0f5);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(_0x201f5f,_0xdb3d0e){const _0x46667e=a109_0x21b8,_0x561e36=_0x201f5f();while(!![]){try{const _0x5b411e=parseInt(_0x46667e(0xfd))/0x1+parseInt(_0x46667e(0x114))/0x2*(-parseInt(_0x46667e(0xfb))/0x3)+-parseInt(_0x46667e(0xfa))/0x4*(parseInt(_0x46667e(0x100))/0x5)+parseInt(_0x46667e(0x11f))/0x6+-parseInt(_0x46667e(0x11a))/0x7+-parseInt(_0x46667e(0x10b))/0x8+parseInt(_0x46667e(0x115))/0x9*(parseInt(_0x46667e(0x10d))/0xa);if(_0x5b411e===_0xdb3d0e)break;else _0x561e36['push'](_0x561e36['shift']());}catch(_0x329f00){_0x561e36['push'](_0x561e36['shift']());}}}(a109_0x1e71,0x8f012));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';function a109_0x1e71(){const _0x313672=['metadataPath','accessKey','map','7968884rCAzwE','from','sort','isArray','push','1747092UyAQuI','scopes','skillRoots','skillCode','cache','isSymbolicLink','15236OWVLHx','18XwbgLO','has','100133YQYXXW','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','local','1405KqduUR','appCode','scope','filter','isDirectory','env','localeCompare','skillMdPath','tags','trim','linkedPaths','9127736UOFmGp','dir','10YkaQGn','startsWith','includes','name','linkedPath','values','source','327308BMqwsW','40734567IBJjvZ','code'];a109_0x1e71=function(){return _0x313672;};return a109_0x1e71();}import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x5ae1da,_0x544c32,_0x2eaa42={}){const _0x1fb88f=a109_0x21b8,_0x42f8bf=safePathSegment(_0x5ae1da[_0x1fb88f(0x101)],_0x1fb88f(0x101));if(_0x544c32[_0x1fb88f(0x101)]!==_0x42f8bf)throw CliErrors['validation'](_0x1fb88f(0xfe)+_0x544c32['appCode']+'\x20!=\x20'+_0x42f8bf);const _0x5d5eb1=normalizeRuntimeSkillScopes(_0x5ae1da[_0x1fb88f(0x120)]),_0x4d76c1=new Set(_0x5d5eb1),_0x46e733=_0x5ae1da[_0x1fb88f(0x116)]?.[_0x1fb88f(0x109)](),_0xba918a=new Map(),_0x205d2f=resolve(getRuntimeSkillCacheRoot(_0x5ae1da[_0x1fb88f(0x105)],_0x5ae1da[_0x1fb88f(0x118)],_0x2eaa42),_0x42f8bf);for(const _0x29b3f2 of _0x5d5eb1){for(const _0x133542 of localSkillEntryDirs(resolve(_0x205d2f,_0x29b3f2))){collectLocalRuntimeSkill(_0xba918a,_0x133542,{'appCode':_0x42f8bf,'scopes':_0x4d76c1,'code':_0x46e733,'source':_0x1fb88f(0xf8)});}}for(const _0x1745f4 of _0x544c32[_0x1fb88f(0xf6)]){for(const _0x4bf634 of localSkillLinkCandidates(_0x1745f4,_0x544c32,_0x4d76c1)){collectLocalRuntimeSkill(_0xba918a,_0x4bf634,{'appCode':_0x42f8bf,'scopes':_0x4d76c1,'code':_0x46e733,'source':'link','linkedPath':_0x4bf634});}}return Array[_0x1fb88f(0x11b)](_0xba918a[_0x1fb88f(0x112)]())[_0x1fb88f(0x11c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x1608cb){const _0x150458=a109_0x21b8;if(!existsSync(_0x1608cb))return[];return readdirSync(_0x1608cb,{'withFileTypes':!![]})[_0x150458(0x103)](_0x26b1c0=>_0x26b1c0[_0x150458(0x104)]()||_0x26b1c0[_0x150458(0xf9)]())['map'](_0x24b5d2=>resolve(_0x1608cb,_0x24b5d2[_0x150458(0x110)]));}function a109_0x21b8(_0x3bf6d3,_0x548636){_0x3bf6d3=_0x3bf6d3-0xf6;const _0x1e716e=a109_0x1e71();let _0x21b8b1=_0x1e716e[_0x3bf6d3];return _0x21b8b1;}function localSkillLinkCandidates(_0x34af24,_0x4b69b2,_0x2f74cf){const _0x7a3893=a109_0x21b8;if(!existsSync(_0x34af24))return[];const _0x2ba91a=_0x4b69b2['appCode']+'--';return readdirSync(_0x34af24,{'withFileTypes':!![]})[_0x7a3893(0x103)](_0x4ba858=>_0x4ba858['isDirectory']()||_0x4ba858[_0x7a3893(0xf9)]())[_0x7a3893(0x103)](_0x7f2102=>_0x4b69b2['scope']==='project'||_0x7f2102['name'][_0x7a3893(0x10e)](_0x2ba91a)||_0x2f74cf[_0x7a3893(0xfc)]('builtin'))[_0x7a3893(0x119)](_0xf92c0f=>resolve(_0x34af24,_0xf92c0f[_0x7a3893(0x110)]));}function collectLocalRuntimeSkill(_0x44f07,_0x292d38,_0x13891a){const _0xfc2609=a109_0x21b8,_0x1cf351=resolve(_0x292d38,METADATA_FILE),_0x1c6717=readMetadataIfPresent(_0x1cf351);if(!_0x1c6717)return;if(_0x1c6717['appCode']!==_0x13891a[_0xfc2609(0x101)])return;if(!isRuntimeSkillScope(_0x1c6717[_0xfc2609(0x102)])||!_0x13891a[_0xfc2609(0x120)]['has'](_0x1c6717[_0xfc2609(0x102)]))return;const _0x403f66=_0x1c6717[_0xfc2609(0xf7)]?.[_0xfc2609(0x109)]();if(!_0x403f66)return;if(_0x13891a['code']&&_0x403f66!==_0x13891a[_0xfc2609(0x116)])return;const _0x30f1b8=_0x1c6717[_0xfc2609(0x102)]+':'+_0x403f66,_0x1258db=_0x13891a[_0xfc2609(0x111)]?[_0x13891a['linkedPath']]:[],_0x2960b3=_0x44f07['get'](_0x30f1b8);if(_0x2960b3){_0x13891a[_0xfc2609(0x113)]===_0xfc2609(0xf8)&&(_0x2960b3[_0xfc2609(0x10c)]=_0x292d38,_0x2960b3['cacheDir']=_0x292d38,_0x2960b3[_0xfc2609(0x107)]=resolve(_0x292d38,SKILL_FILE),_0x2960b3[_0xfc2609(0x117)]=_0x1cf351);for(const _0x248f05 of _0x1258db){!_0x2960b3['linkedPaths'][_0xfc2609(0x10f)](_0x248f05)&&_0x2960b3[_0xfc2609(0x10a)][_0xfc2609(0x11e)](_0x248f05);}_0x2960b3[_0xfc2609(0x10a)][_0xfc2609(0x11c)]();return;}_0x44f07['set'](_0x30f1b8,{..._0x1c6717,'tags':Array[_0xfc2609(0x11d)](_0x1c6717[_0xfc2609(0x108)])?_0x1c6717[_0xfc2609(0x108)]:[],'scope':_0x1c6717[_0xfc2609(0x102)],'source':_0xfc2609(0xff),'dir':_0x292d38,'cacheDir':_0x13891a['source']==='cache'?_0x292d38:undefined,'skillMdPath':resolve(_0x292d38,SKILL_FILE),'metadataPath':_0x1cf351,'linkedPaths':_0x1258db});}function compareLocalRuntimeSkills(_0x58bb0f,_0x39f027){const _0x2df1fe=a109_0x21b8,_0x1541fd={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1541fd[_0x58bb0f[_0x2df1fe(0x102)]]-_0x1541fd[_0x39f027[_0x2df1fe(0x102)]]||_0x58bb0f[_0x2df1fe(0xf7)]['localeCompare'](_0x39f027[_0x2df1fe(0xf7)])||_0x58bb0f['dir'][_0x2df1fe(0x106)](_0x39f027[_0x2df1fe(0x10c)]);}
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 a110_0x55a9(_0x5f02bb,_0x4abd2b){_0x5f02bb=_0x5f02bb-0x154;const _0x4d1c2d=a110_0x4d1c();let _0x55a95f=_0x4d1c2d[_0x5f02bb];return _0x55a95f;}(function(_0x2834ac,_0x12fdc1){const _0x3670e5=a110_0x55a9,_0x5317ca=_0x2834ac();while(!![]){try{const _0x299a42=-parseInt(_0x3670e5(0x16c))/0x1*(-parseInt(_0x3670e5(0x166))/0x2)+parseInt(_0x3670e5(0x171))/0x3+-parseInt(_0x3670e5(0x16a))/0x4*(-parseInt(_0x3670e5(0x186))/0x5)+-parseInt(_0x3670e5(0x179))/0x6*(-parseInt(_0x3670e5(0x15b))/0x7)+parseInt(_0x3670e5(0x178))/0x8+parseInt(_0x3670e5(0x167))/0x9*(parseInt(_0x3670e5(0x162))/0xa)+parseInt(_0x3670e5(0x176))/0xb*(-parseInt(_0x3670e5(0x15e))/0xc);if(_0x299a42===_0x12fdc1)break;else _0x5317ca['push'](_0x5317ca['shift']());}catch(_0x2ceee1){_0x5317ca['push'](_0x5317ca['shift']());}}}(a110_0x4d1c,0x82858));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(_0x161af3){const _0x8b6bd2=a110_0x55a9;return _0x161af3['bytes']??Buffer[_0x8b6bd2(0x185)](_0x161af3[_0x8b6bd2(0x159)]??'',_0x8b6bd2(0x15c));}export function fileText(_0x5d6925){const _0x5bc4d1=a110_0x55a9;return fileContent(_0x5d6925)[_0x5bc4d1(0x168)](_0x5bc4d1(0x15c));}export function normalizeLocalFiles(_0x4d38d6){const _0x133e74=a110_0x55a9;if(!Array[_0x133e74(0x17c)](_0x4d38d6)||_0x4d38d6['length']===0x0)return[];const _0x726dac=new Map();for(const _0x52ee60 of _0x4d38d6){if(!_0x52ee60||typeof _0x52ee60!==_0x133e74(0x170)||typeof _0x52ee60[_0x133e74(0x15f)]!==_0x133e74(0x187))throw CliErrors[_0x133e74(0x177)](_0x133e74(0x16b));const _0x27e769=normalizeSkillRelativePath(_0x52ee60[_0x133e74(0x15f)]);if(_0x726dac['has'](_0x27e769))throw CliErrors[_0x133e74(0x177)](_0x133e74(0x175)+_0x27e769);if(_0x52ee60[_0x133e74(0x172)]!==undefined&&!Buffer[_0x133e74(0x165)](_0x52ee60[_0x133e74(0x172)]))throw CliErrors[_0x133e74(0x177)](_0x133e74(0x17b)+_0x27e769);if(_0x52ee60[_0x133e74(0x172)]===undefined&&typeof _0x52ee60[_0x133e74(0x159)]!==_0x133e74(0x187))throw CliErrors['validation'](_0x133e74(0x157)+_0x27e769);const _0x17a990=fileContent(_0x52ee60);_0x726dac['set'](_0x27e769,{'path':_0x27e769,'bytes':_0x17a990});}return Array[_0x133e74(0x185)](_0x726dac[_0x133e74(0x15a)]())[_0x133e74(0x161)](compareSkillFiles);}export function normalizeManifestFiles(_0x4453e){const _0x458362=a110_0x55a9;if(!Array['isArray'](_0x4453e)||_0x4453e[_0x458362(0x169)]===0x0)return[];const _0x4f4f11=new Map();for(const _0x184567 of _0x4453e){if(!_0x184567||typeof _0x184567!==_0x458362(0x170)||typeof _0x184567[_0x458362(0x15f)]!==_0x458362(0x187))throw CliErrors[_0x458362(0x177)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0xbb7d01=normalizeSkillRelativePath(_0x184567[_0x458362(0x15f)]);if(_0x4f4f11['has'](_0xbb7d01))throw CliErrors[_0x458362(0x177)](_0x458362(0x175)+_0xbb7d01);if(!isSha256Hex(_0x184567[_0x458362(0x155)]))throw CliErrors[_0x458362(0x177)](_0x458362(0x184)+_0xbb7d01);if(!Number['isSafeInteger'](_0x184567[_0x458362(0x17f)])||_0x184567[_0x458362(0x17f)]<0x0)throw CliErrors[_0x458362(0x177)](_0x458362(0x173)+_0xbb7d01);_0x4f4f11[_0x458362(0x16d)](_0xbb7d01,{'path':_0xbb7d01,'sha256':_0x184567[_0x458362(0x155)][_0x458362(0x15d)](),'size':_0x184567[_0x458362(0x17f)]});}return Array[_0x458362(0x185)](_0x4f4f11[_0x458362(0x15a)]())[_0x458362(0x161)](compareSkillFiles);}export function scanSkillDirectory(_0x2f7c71){const _0x526f0c=realpathSync(_0x2f7c71),_0x258814=[];function _0x5755e3(_0x1264b0){const _0x3bb0a0=a110_0x55a9,_0x21f20e=readdirSync(_0x1264b0,{'withFileTypes':!![]})['sort']((_0x57443c,_0x3c7ef2)=>_0x57443c[_0x3bb0a0(0x158)][_0x3bb0a0(0x17a)](_0x3c7ef2['name']));for(const _0x1bfff4 of _0x21f20e){if(_0x1bfff4['isDirectory']()&&IGNORED_DIR_NAMES[_0x3bb0a0(0x174)](_0x1bfff4['name']))continue;if(IGNORED_FILE_NAMES[_0x3bb0a0(0x174)](_0x1bfff4['name']))continue;const _0x2db1bf=resolve(_0x1264b0,_0x1bfff4['name']);if(_0x1bfff4[_0x3bb0a0(0x16e)]())throw CliErrors[_0x3bb0a0(0x177)](_0x3bb0a0(0x16f)+_0x2db1bf);const _0x59e7a4=toPosixPath(relative(_0x526f0c,_0x2db1bf));if(_0x1bfff4[_0x3bb0a0(0x154)]()){_0x5755e3(_0x2db1bf);continue;}if(!_0x1bfff4[_0x3bb0a0(0x181)]())continue;validateSkillRelativePath(_0x59e7a4);const _0x2ead91=readFileSync(_0x2db1bf);_0x258814[_0x3bb0a0(0x183)]({'path':_0x59e7a4,'bytes':_0x2ead91});}}return _0x5755e3(_0x526f0c),normalizeLocalFiles(_0x258814);}function a110_0x4d1c(){const _0x4a44d9=['validation','5456496SFBXPL','52986dKgRWH','localeCompare','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isArray','trim','split','size','includes','isFile','compare','push','Skill\x20file\x20sha256\x20is\x20invalid:\x20','from','10370ZNjcqB','string','isDirectory','sha256','replace','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','name','content','values','91hnyYSU','utf8','toLowerCase','741612HJSlky','path','startsWith','sort','660ZJlAwO','test','Unsafe\x20Skill\x20file\x20path:\x20','isBuffer','94002HxGJaX','142227JJbKPr','toString','length','1932WRwITQ','Skill\x20file\x20path\x20must\x20be\x20text.','22RjOTrq','set','isSymbolicLink','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','object','915744AGjAfQ','bytes','Skill\x20file\x20size\x20is\x20invalid:\x20','has','Duplicate\x20Skill\x20file\x20path:\x20','649WTjIgT'];a110_0x4d1c=function(){return _0x4a44d9;};return a110_0x4d1c();}export function compareSkillFiles(_0x3ed522,_0x522b76){const _0x3348fd=a110_0x55a9;if(_0x3ed522[_0x3348fd(0x15f)]===SKILL_FILE)return _0x522b76[_0x3348fd(0x15f)]===SKILL_FILE?0x0:-0x1;if(_0x522b76['path']===SKILL_FILE)return 0x1;return Buffer[_0x3348fd(0x182)](Buffer[_0x3348fd(0x185)](_0x3ed522[_0x3348fd(0x15f)],_0x3348fd(0x15c)),Buffer[_0x3348fd(0x185)](_0x522b76['path'],'utf8'));}export function normalizeSkillRelativePath(_0x9e805c){const _0x5f08b7=a110_0x55a9,_0x1562e2=toPosixPath(_0x9e805c[_0x5f08b7(0x17d)]());return validateSkillRelativePath(_0x1562e2),_0x1562e2;}export function validateSkillRelativePath(_0x3070a1){const _0x23cb53=a110_0x55a9;if(!_0x3070a1||_0x3070a1[_0x23cb53(0x160)]('/')||_0x3070a1[_0x23cb53(0x180)]('//'))throw CliErrors['validation'](_0x23cb53(0x164)+_0x3070a1);for(const _0x1318a8 of _0x3070a1[_0x23cb53(0x17e)]('/')){if(!_0x1318a8||_0x1318a8==='.'||_0x1318a8==='..')throw CliErrors[_0x23cb53(0x177)](_0x23cb53(0x164)+_0x3070a1);}}export function toPosixPath(_0x5dd0a9){const _0x5908f5=a110_0x55a9;return _0x5dd0a9[_0x5908f5(0x156)](/\\/g,'/');}export function isSha256Hex(_0x358174){const _0x557ba2=a110_0x55a9;return typeof _0x358174===_0x557ba2(0x187)&&/^[a-fA-F0-9]{64}$/[_0x557ba2(0x163)](_0x358174);}
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(_0x5077f0,_0x248ee2){const _0x139ae1=a111_0x7c8b,_0x4fc93e=_0x5077f0();while(!![]){try{const _0x59df04=parseInt(_0x139ae1(0x11a))/0x1+parseInt(_0x139ae1(0x107))/0x2+-parseInt(_0x139ae1(0x120))/0x3+parseInt(_0x139ae1(0x118))/0x4*(-parseInt(_0x139ae1(0xee))/0x5)+-parseInt(_0x139ae1(0x11c))/0x6*(-parseInt(_0x139ae1(0xf6))/0x7)+-parseInt(_0x139ae1(0xf8))/0x8*(-parseInt(_0x139ae1(0x114))/0x9)+-parseInt(_0x139ae1(0x11f))/0xa*(parseInt(_0x139ae1(0x10a))/0xb);if(_0x59df04===_0x248ee2)break;else _0x4fc93e['push'](_0x4fc93e['shift']());}catch(_0x20fbf7){_0x4fc93e['push'](_0x4fc93e['shift']());}}}(a111_0x5a2c,0xd648e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a111_0x7c8b(_0x59ffc6,_0x8a6981){_0x59ffc6=_0x59ffc6-0xed;const _0x5a2ccd=a111_0x5a2c();let _0x7c8b04=_0x5a2ccd[_0x59ffc6];return _0x7c8b04;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a111_0x5a2c(){const _0x5868b2=['description','7002PApARi','isFile','filter','120nKritp','1465197iNeWSg','skillName','replace','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','name:\x20','trim','35rLvWRZ','has','test','Managed\x20file\x20was\x20removed\x20locally:\x20','.\x20Changed\x20file:\x20','match','contentHash','appCode','9289ftRctQ','length','24waFgaw','flow','find','displayName','errors','validation','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','join','path','force','pulledAt','delete','name','fileHashes','toString','1043696LDcUtF','Runtime\x20Skill\x20package\x20is\x20missing\x20','accessKey','1338667zQwIOl','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','stringify','utf8','map','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','keys','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','---','description:\x20','3120399LUZGJJ','slice','displayName:\x20','paths','259220azJUVD','contents','169518IpWnmU'];a111_0x5a2c=function(){return _0x5868b2;};return a111_0x5a2c();}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(_0xe7d352,_0x4e9fe7,_0x50bc48){const _0x19c3e7=a111_0x7c8b,_0x2bd1e7=requireSkillCode(_0xe7d352),_0x6c7281=requirePackageBytes(_0x2bd1e7,_0x50bc48['packageBytes']),_0x4841f5=extractDownloadedPackage(_0x6c7281),_0x93eba7=_0x4841f5[_0x19c3e7(0xfa)](_0xae02f2=>_0xae02f2[_0x19c3e7(0x100)]===SKILL_FILE);if(!_0x93eba7)throw CliErrors[_0x19c3e7(0xfd)](_0x19c3e7(0x108)+SKILL_FILE+':\x20'+_0x2bd1e7);const _0x2eb6f7=withMaterializedSkillFrontmatter(_0x4841f5,_0xe7d352,_0x2bd1e7),_0x3427c1=_0x2eb6f7[_0x19c3e7(0xfa)](_0x393bbc=>_0x393bbc['path']===SKILL_FILE),_0x352d4e=fileText(_0x3427c1),_0x5951ba=getRuntimeSkillDir(_0x50bc48['env'],_0x50bc48[_0x19c3e7(0x109)],_0x50bc48[_0x19c3e7(0xf5)],_0x4e9fe7,_0x2bd1e7,_0x50bc48[_0x19c3e7(0x117)]),_0x44fb8d=resolve(_0x5951ba,SKILL_FILE),_0x400964=resolve(_0x5951ba,METADATA_FILE),_0x442a26=contentHash(_0x352d4e),_0x366884=readMetadataIfPresent(_0x400964)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x5951ba,_0x400964,_0x2eb6f7,_0x50bc48[_0x19c3e7(0x101)]===!![]),mkdirSync(_0x5951ba,{'recursive':!![],'mode':0x1c0});const _0xeb8a59=existsSync(_0x44fb8d)?readFileSync(_0x44fb8d,_0x19c3e7(0x10d)):undefined;return materializeFiles(_0x5951ba,_0x2eb6f7),removeStaleManagedFiles(_0x5951ba,_0x366884,_0x2eb6f7),writeJsonAtomic(_0x400964,buildMetadata(_0xe7d352,_0x4e9fe7,_0x50bc48[_0x19c3e7(0xf5)],_0x442a26,_0x50bc48[_0x19c3e7(0x102)],_0x2eb6f7,_0x6c7281)),{'skill':_0xe7d352,'scope':_0x4e9fe7,'dir':_0x5951ba,'skillMdPath':_0x44fb8d,'metadataPath':_0x400964,'contentHash':_0x442a26,'changed':_0xeb8a59!==_0x352d4e};}function withMaterializedSkillFrontmatter(_0x528cc1,_0x46b80c,_0x31ea14){const _0x51d9da=a111_0x7c8b,_0x20bbd6=skillDisplayName(_0x46b80c,_0x31ea14),_0x1c34e1=_0x46b80c[_0x51d9da(0x11b)]?.[_0x51d9da(0xed)]()||_0x20bbd6||_0x31ea14;return normalizeLocalFiles(_0x528cc1)['map'](_0x52e634=>{const _0x29a42b=_0x51d9da,_0x2f0ca1=fileText(_0x52e634);if(_0x52e634['path']!==SKILL_FILE)return _0x52e634;if(hasYamlFrontmatter(_0x2f0ca1))return{'path':_0x52e634['path'],'content':withSyncedDisplayName(_0x2f0ca1,_0x20bbd6)};return{'path':_0x52e634[_0x29a42b(0x100)],'content':prependSkillFrontmatter(_0x2f0ca1,{'name':_0x31ea14,'displayName':_0x20bbd6,'description':_0x1c34e1})};});}function hasYamlFrontmatter(_0x4c6c00){const _0x54be8f=a111_0x7c8b;return/^\uFEFF?---\s*\r?\n/[_0x54be8f(0xf0)](_0x4c6c00);}function prependSkillFrontmatter(_0x526260,_0x5df9e4){const _0x382ea5=a111_0x7c8b,_0x579d91=_0x526260[_0x382ea5(0x122)](/^\uFEFF/,'');return[_0x382ea5(0x112),_0x382ea5(0x124)+yamlString(_0x5df9e4[_0x382ea5(0x104)]),_0x5df9e4['displayName']?_0x382ea5(0x116)+yamlString(_0x5df9e4['displayName']):undefined,_0x382ea5(0x113)+yamlString(_0x5df9e4[_0x382ea5(0x11b)]),_0x382ea5(0x112),'',_0x579d91][_0x382ea5(0x11e)](_0x1d54d7=>_0x1d54d7!==undefined)[_0x382ea5(0xff)]('\x0a');}function yamlString(_0x1bdb22){const _0x3c3c2a=a111_0x7c8b;return JSON[_0x3c3c2a(0x10c)](_0x1bdb22[_0x3c3c2a(0x122)](/\r/g,'')[_0x3c3c2a(0xed)]());}function skillDisplayName(_0x1d7446,_0x5ca4a9){const _0x4cd44b=a111_0x7c8b,_0x18e21d=_0x1d7446[_0x4cd44b(0x121)]?.[_0x4cd44b(0xed)]();return _0x18e21d||_0x5ca4a9;}function withSyncedDisplayName(_0x272264,_0x21d61a){const _0x14d711=a111_0x7c8b,_0xedc33=_0x272264[_0x14d711(0xf3)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xedc33)return _0x272264;const _0x3c27d9=_0xedc33[0x1]??'',_0x203151=_0xedc33[0x2]??'',_0x3d3dbc=parseDocument(_0x203151);if(_0x3d3dbc[_0x14d711(0xfc)][_0x14d711(0xf7)]>0x0||!isMap(_0x3d3dbc['contents']))return _0x272264;if(_0x21d61a)_0x3d3dbc['set']('displayName',_0x21d61a);else{if(_0x3d3dbc['has']('displayName'))_0x3d3dbc[_0x14d711(0x103)](_0x14d711(0xfb));else return _0x272264;}forceBlockCollections(_0x3d3dbc[_0x14d711(0x119)]);const _0x1e3953=_0x3d3dbc[_0x14d711(0x106)]({'lineWidth':0x0})['trimEnd'](),_0x453aa6=_0x272264[_0x14d711(0x115)](_0xedc33[0x0]['length'])[_0x14d711(0x122)](/^\r?\n/,'');return _0x3c27d9+'---\x0a'+_0x1e3953+'\x0a---\x0a\x0a'+_0x453aa6;}function forceBlockCollections(_0x2b687f){if(!isNode(_0x2b687f))return;visit(_0x2b687f,(_0x174fea,_0x5ab8ab)=>{const _0x5aa6e2=a111_0x7c8b;isCollection(_0x5ab8ab)&&(_0x5ab8ab[_0x5aa6e2(0xf9)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x4c16cf,_0x29c0be,_0x1a534b,_0xd10189){const _0x8c5e2d=a111_0x7c8b;if(_0xd10189||!existsSync(_0x29c0be))return;const _0x2c7ae5=readMetadataIfPresent(_0x29c0be);if(!_0x2c7ae5)return;const _0x15ce96=_0x2c7ae5[_0x8c5e2d(0x105)]&&Object[_0x8c5e2d(0x110)](_0x2c7ae5['fileHashes'])['length']>0x0?_0x2c7ae5[_0x8c5e2d(0x105)]:undefined;if(_0x15ce96)for(const [_0x1c7d20,_0x4a79b6]of Object['entries'](_0x15ce96)){const _0x281e4a=resolveManagedFilePath(_0x4c16cf,_0x1c7d20);if(!existsSync(_0x281e4a))throw CliErrors[_0x8c5e2d(0xfd)](_0x8c5e2d(0x10f)+_0x4c16cf,_0x8c5e2d(0xf1)+_0x1c7d20);const _0x4994bb=lstatSync(_0x281e4a);if(!_0x4994bb['isFile']())throw CliErrors[_0x8c5e2d(0xfd)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x4c16cf,_0x8c5e2d(0xfe)+_0x1c7d20);const _0x1028cf=bufferSha256(readFileSync(_0x281e4a));if(_0x1028cf!==_0x4a79b6)throw CliErrors[_0x8c5e2d(0xfd)](_0x8c5e2d(0x10f)+_0x4c16cf+_0x8c5e2d(0xf2)+_0x1c7d20,_0x8c5e2d(0x111)+_0x1c7d20);}else{const _0x5dfd2b=resolve(_0x4c16cf,SKILL_FILE);if(existsSync(_0x5dfd2b)&&_0x2c7ae5[_0x8c5e2d(0xf4)]){const _0x476f6c=contentHash(readFileSync(_0x5dfd2b,_0x8c5e2d(0x10d)));if(_0x476f6c!==_0x2c7ae5[_0x8c5e2d(0xf4)])throw CliErrors[_0x8c5e2d(0xfd)](_0x8c5e2d(0x123)+_0x5dfd2b,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x2260ec of normalizeLocalFiles(_0x1a534b)){if(_0x15ce96?.[_0x2260ec['path']])continue;if(!_0x15ce96&&_0x2260ec[_0x8c5e2d(0x100)]===SKILL_FILE)continue;const _0x3f18a6=resolveManagedFilePath(_0x4c16cf,_0x2260ec[_0x8c5e2d(0x100)]);if(!existsSync(_0x3f18a6))continue;const _0xe7e054=lstatSync(_0x3f18a6);if(!_0xe7e054[_0x8c5e2d(0x11d)]())throw CliErrors[_0x8c5e2d(0xfd)](_0x8c5e2d(0x10f)+_0x4c16cf,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x2260ec[_0x8c5e2d(0x100)]);const _0x3729d3=bufferSha256(readFileSync(_0x3f18a6));if(_0x3729d3!==fileHash(_0x2260ec))throw CliErrors['validation'](_0x8c5e2d(0x10f)+_0x4c16cf,_0x8c5e2d(0x10b)+_0x2260ec[_0x8c5e2d(0x100)]);}}function materializeFiles(_0x514763,_0x1c04cc){for(const _0x42e0a3 of normalizeLocalFiles(_0x1c04cc)){const _0x265376=resolveManagedFilePath(_0x514763,_0x42e0a3['path']);mkdirSync(dirname(_0x265376),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x265376,fileContent(_0x42e0a3),0x180);}}function removeStaleManagedFiles(_0x372a3b,_0xf37c7a,_0x2a4cc7){const _0x4b6b98=a111_0x7c8b;if(!_0xf37c7a)return;const _0x4c6c1e=new Set(normalizeLocalFiles(_0x2a4cc7)[_0x4b6b98(0x10e)](_0x403a33=>_0x403a33['path']));for(const _0x2a2606 of Object['keys'](_0xf37c7a)){if(_0x4c6c1e[_0x4b6b98(0xef)](_0x2a2606))continue;const _0x32c999=resolveManagedFilePath(_0x372a3b,_0x2a2606);existsSync(_0x32c999)&&lstatSync(_0x32c999)['isFile']()&&rmSync(_0x32c999,{'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(_0x3780c2,_0x4b9f17){const _0x5d9cb1=a112_0x1d76,_0x4ef32c=_0x3780c2();while(!![]){try{const _0x4ddb75=-parseInt(_0x5d9cb1(0x1f5))/0x1*(-parseInt(_0x5d9cb1(0x1f4))/0x2)+parseInt(_0x5d9cb1(0x203))/0x3+-parseInt(_0x5d9cb1(0x1ed))/0x4*(-parseInt(_0x5d9cb1(0x1f8))/0x5)+-parseInt(_0x5d9cb1(0x1ec))/0x6+-parseInt(_0x5d9cb1(0x1fb))/0x7+parseInt(_0x5d9cb1(0x1ef))/0x8*(-parseInt(_0x5d9cb1(0x20a))/0x9)+parseInt(_0x5d9cb1(0x1f3))/0xa;if(_0x4ddb75===_0x4b9f17)break;else _0x4ef32c['push'](_0x4ef32c['shift']());}catch(_0x51ceaa){_0x4ef32c['push'](_0x4ef32c['shift']());}}}(a112_0x3aca,0x7d14c));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a112_0x3aca(){const _0x36352f=['2400960OSjMWD','tags','sourceSessionId','forkedFromSkillId','trim','isArray','path','20322uGiaZb','zipSha256','skillCode','string','manifest','length','2948706dSYHoK','1132bIqUJy','tenantCode','376iXDLCU','toISOString','Runtime\x20Skill\x20is\x20missing\x20skillCode.','status','1980670DqUYWQ','15502wgkyDm','57afAtpb','forkedFromVersion','readonly','8405KBhApm','hasUpstreamUpdate','fromEntries','5642056IkdXQy','personal','version','utf8','description','parse','validation','skillName'];a112_0x3aca=function(){return _0x36352f;};return a112_0x3aca();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a112_0x1d76(_0x3f15ec,_0x3fb911){_0x3f15ec=_0x3f15ec-0x1eb;const _0x3aca55=a112_0x3aca();let _0x1d766c=_0x3aca55[_0x3f15ec];return _0x1d766c;}export function buildMetadata(_0x2bbfcb,_0xad9a01,_0x14c76c,_0x4764cb,_0x350d28,_0x15d70b,_0x4f3d30){const _0x53bc23=a112_0x1d76,_0x27abd3=_0x15d70b?normalizeLocalFiles(_0x15d70b):[],_0x5c36b9=!_0x4f3d30&&_0x27abd3['length']>0x0?buildSkillPackage(_0x27abd3):undefined,_0x55e66e=_0x4f3d30?bufferSha256(_0x4f3d30):_0x5c36b9?.[_0x53bc23(0x20e)][_0x53bc23(0x20b)],_0x484318=_0x4f3d30?.[_0x53bc23(0x1eb)]??_0x5c36b9?.[_0x53bc23(0x20e)]['zipSize'],_0xe7942=_0x27abd3[_0x53bc23(0x1eb)]>0x0?Object[_0x53bc23(0x1fa)](_0x27abd3['map'](_0x298ebd=>[_0x298ebd[_0x53bc23(0x209)],fileHash(_0x298ebd)])):undefined;return{'schemaVersion':_0x27abd3[_0x53bc23(0x1eb)]>0x0?0x2:0x1,'id':_0x2bbfcb['id'],'appCode':_0x14c76c,'skillCode':requireSkillCode(_0x2bbfcb),'skillName':_0x2bbfcb[_0x53bc23(0x202)],'description':_0x2bbfcb[_0x53bc23(0x1ff)],'scope':_0xad9a01,'readonly':_0xad9a01!==_0x53bc23(0x1fc)||_0x2bbfcb[_0x53bc23(0x1f7)]===!![],'tenantCode':_0x2bbfcb[_0x53bc23(0x1ee)],'userId':_0x2bbfcb['userId'],'version':_0x2bbfcb[_0x53bc23(0x1fd)],'status':_0x2bbfcb[_0x53bc23(0x1f2)],'tags':Array[_0x53bc23(0x208)](_0x2bbfcb['tags'])?_0x2bbfcb[_0x53bc23(0x204)]:[],'hasUpstreamUpdate':_0x2bbfcb[_0x53bc23(0x1f9)],'forkedFromSkillId':_0x2bbfcb[_0x53bc23(0x206)],'forkedFromVersion':_0x2bbfcb[_0x53bc23(0x1f6)],'sourceSessionId':_0x2bbfcb[_0x53bc23(0x205)],'contentHash':_0x4764cb,'fileHashes':_0xe7942,'treeHash':_0x27abd3[_0x53bc23(0x1eb)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x27abd3)):undefined,'ossPath':remoteManifestOssPath(_0x2bbfcb['files']),'zipSha256':_0x55e66e,'zipSize':_0x484318,'files':_0x27abd3[_0x53bc23(0x1eb)]>0x0?_0x27abd3['map'](_0x555b13=>({'path':_0x555b13['path'],'hash':fileHash(_0x555b13),'size':fileContent(_0x555b13)[_0x53bc23(0x1eb)]})):undefined,'pulledAt':_0x350d28??new Date()[_0x53bc23(0x1f0)]()};}export function requireSkillCode(_0x1bedbb){const _0x4c7754=a112_0x1d76,_0x39a0d8=_0x1bedbb[_0x4c7754(0x20c)]?.[_0x4c7754(0x207)]();if(!_0x39a0d8)throw CliErrors[_0x4c7754(0x201)](_0x4c7754(0x1f1));return _0x39a0d8;}export function readMetadataIfPresent(_0x1752b9){const _0x40cc04=a112_0x1d76;if(!existsSync(_0x1752b9))return undefined;try{const _0x18314d=JSON[_0x40cc04(0x200)](readFileSync(_0x1752b9,_0x40cc04(0x1fe)));return _0x18314d;}catch{throw CliErrors[_0x40cc04(0x201)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x1752b9);}}function remoteManifestOssPath(_0x5102be){const _0x2c5031=a112_0x1d76;if(!_0x5102be||typeof _0x5102be!=='object'||Array[_0x2c5031(0x208)](_0x5102be))return undefined;const _0x1ae363=_0x5102be['ossPath'];return typeof _0x1ae363===_0x2c5031(0x20d)&&_0x1ae363['trim']()?_0x1ae363[_0x2c5031(0x207)]():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 a113_0x1f71fa=a113_0x39f3;(function(_0x5cc67c,_0x1afec8){const _0x3bc904=a113_0x39f3,_0x425937=_0x5cc67c();while(!![]){try{const _0x3d20f0=parseInt(_0x3bc904(0x119))/0x1+-parseInt(_0x3bc904(0x12e))/0x2*(parseInt(_0x3bc904(0x130))/0x3)+-parseInt(_0x3bc904(0x11d))/0x4+parseInt(_0x3bc904(0x128))/0x5+parseInt(_0x3bc904(0x12f))/0x6+-parseInt(_0x3bc904(0x126))/0x7*(-parseInt(_0x3bc904(0x116))/0x8)+-parseInt(_0x3bc904(0x122))/0x9*(parseInt(_0x3bc904(0x11c))/0xa);if(_0x3d20f0===_0x1afec8)break;else _0x425937['push'](_0x425937['shift']());}catch(_0x10472c){_0x425937['push'](_0x425937['shift']());}}}(a113_0x4348,0xd8a95));import{existsSync}from'node:fs';function a113_0x39f3(_0x4921cc,_0x2abd36){_0x4921cc=_0x4921cc-0x116;const _0x4348e7=a113_0x4348();let _0x39f38f=_0x4348e7[_0x4921cc];return _0x39f38f;}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(_0x21978c={}){const _0xcdf171=a113_0x39f3,_0x43c906=_0x21978c[_0xcdf171(0x12a)]??homedir(),_0x42219a=resolve(_0x43c906,PRODUCT_CONFIG[_0xcdf171(0x12c)],_0xcdf171(0x118)),_0x17391a=trimmedEnv(_0xcdf171(0x125)),_0x2fd9d3=trimmedEnv(_0xcdf171(0x11b)),_0x39e496=resolve(_0x43c906,'.workbuddy'),_0x4407f7=_0x21978c[_0xcdf171(0x121)]??(existsSync(_0x39e496)?resolve(_0x39e496,_0xcdf171(0x12d)):undefined);return{'homeDir':_0x43c906,'cacheRoot':_0x42219a,'managedRoot':resolve(_0x43c906,PRODUCT_CONFIG[_0xcdf171(0x12c)]),'agentsSkillsDir':_0x21978c[_0xcdf171(0x127)]??_0x17391a??resolve(_0x43c906,_0xcdf171(0x12b),_0xcdf171(0x12d)),'claudeSkillsDir':_0x21978c['claudeSkillsDir']??_0x2fd9d3??resolve(_0x43c906,_0xcdf171(0x11f),_0xcdf171(0x12d)),'workbuddySkillsDir':_0x4407f7};}export function runtimeAgentSkillRoots(_0x26def2){const _0xf2ac1d=a113_0x39f3;return[_0x26def2[_0xf2ac1d(0x127)],_0x26def2[_0xf2ac1d(0x117)],_0x26def2['workbuddySkillsDir']][_0xf2ac1d(0x124)](_0x3db36f=>Boolean(_0x3db36f));}export function getRuntimeSkillCacheRoot(_0x1bbc44,_0x4682f1,_0x54f87f={}){const _0x4032f0=resolveSkillSyncPaths(_0x54f87f);return resolve(_0x4032f0['cacheRoot'],_0x1bbc44,fingerprintAccessKey(_0x4682f1),'skills');}export function getRuntimeSkillDir(_0x43bac0,_0x2b92be,_0x57cec7,_0x3a496f,_0x535541,_0x15a45b={}){return resolve(getRuntimeSkillCacheRoot(_0x43bac0,_0x2b92be,_0x15a45b),safePathSegment(_0x57cec7,'appCode'),_0x3a496f,safePathSegment(_0x535541,'skillCode'));}export function safePathSegment(_0x8c38c3,_0x1b4cdb=a113_0x1f71fa(0x11a)){const _0xe9683c=a113_0x1f71fa;if(!_0x8c38c3||_0x8c38c3[_0xe9683c(0x123)]('/')||_0x8c38c3[_0xe9683c(0x123)]('\x5c')||_0x8c38c3[_0xe9683c(0x123)]('..'))throw CliErrors[_0xe9683c(0x120)]('Unsafe\x20'+_0x1b4cdb+_0xe9683c(0x11e)+_0x8c38c3);return _0x8c38c3;}function trimmedEnv(_0x511e53){const _0x2a03e7=a113_0x1f71fa,_0xcb1ec9=productEnv(_0x511e53)?.[_0x2a03e7(0x129)]();return _0xcb1ec9?_0xcb1ec9:undefined;}function a113_0x4348(){const _0x3d1194=['skills','2VtvAmM','8478360ggZlRf','1658241IaCwhB','680uzSopF','claudeSkillsDir','cache','776746lwohnM','path\x20segment','CLAUDE_SKILL_ROOT','7291100eaoDWB','1492924hBvVuW','\x20for\x20local\x20path:\x20','.claude','validation','workbuddySkillsDir','36aGbYRc','includes','filter','SKILL_ROOT','78827VJskPi','agentsSkillsDir','7914360NsuyjS','trim','homeDir','.agents','homeDirName'];a113_0x4348=function(){return _0x3d1194;};return a113_0x4348();}
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 a114_0x4d45(_0x46ba71,_0xb3fddb){_0x46ba71=_0x46ba71-0x108;const _0x12a995=a114_0x12a9();let _0x4d4563=_0x12a995[_0x46ba71];return _0x4d4563;}(function(_0x4bb533,_0x1111d7){const _0x3af7d3=a114_0x4d45,_0x347718=_0x4bb533();while(!![]){try{const _0x22624e=-parseInt(_0x3af7d3(0x119))/0x1+-parseInt(_0x3af7d3(0x12f))/0x2*(parseInt(_0x3af7d3(0x11d))/0x3)+-parseInt(_0x3af7d3(0x12b))/0x4+-parseInt(_0x3af7d3(0x13e))/0x5+parseInt(_0x3af7d3(0x139))/0x6+parseInt(_0x3af7d3(0x114))/0x7+parseInt(_0x3af7d3(0x118))/0x8*(parseInt(_0x3af7d3(0x113))/0x9);if(_0x22624e===_0x1111d7)break;else _0x347718['push'](_0x347718['shift']());}catch(_0x33c4a4){_0x347718['push'](_0x347718['shift']());}}}(a114_0x12a9,0x2ad9b));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a114_0x3e5aae}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(_0x4cbeff,_0x12234f,_0x1335c5={}){const _0x5ab105=a114_0x4d45,_0x3fc762=resolvePushDirectoryRoot(_0x4cbeff),_0x376803=readPushMetadataIfPresent(resolve(_0x3fc762,METADATA_FILE),{'ignoreInvalidMetadata':_0x1335c5[_0x5ab105(0x13b)]});if(_0x376803?.['appCode']&&_0x376803['appCode']!==_0x12234f&&!_0x1335c5[_0x5ab105(0x132)]&&!_0x1335c5[_0x5ab105(0x11b)])throw CliErrors[_0x5ab105(0x129)](_0x5ab105(0x13d)+_0x376803[_0x5ab105(0x120)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x12234f+'\x22.');const _0x54eb4a=resolvePushSkillCode(_0x3fc762,_0x12234f,_0x376803,_0x1335c5);if(!_0x54eb4a)throw CliErrors['validation']('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x5ab105(0x125));return{'dir':_0x3fc762,'skillCode':_0x54eb4a,'metadata':_0x376803};}export function readPushDirectory(_0x319740,_0x32d265,_0x2419ff={}){const _0x245f83=a114_0x4d45,_0xe00dfd=resolvePushDirectoryIdentity(_0x319740,_0x32d265,_0x2419ff),_0x378643=_0xe00dfd['dir'],_0xf0521b=resolve(_0x378643,SKILL_FILE);if(!existsSync(_0xf0521b)||!lstatSync(_0xf0521b)[_0x245f83(0x11f)]())throw CliErrors[_0x245f83(0x129)](_0x245f83(0x115)+SKILL_FILE+':\x20'+_0xf0521b);const _0x339c3c=_0xe00dfd[_0x245f83(0x131)],_0x933df9=_0x2419ff['targetScope']??'personal';if(!_0x2419ff['ignoreMetadataScope']&&_0x339c3c?.[_0x245f83(0x13a)]==='builtin')throw CliErrors[_0x245f83(0x129)](_0x245f83(0x108)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x339c3c[_0x245f83(0x13a)]+'\x22.');if(!_0x2419ff[_0x245f83(0x13c)]&&_0x933df9===_0x245f83(0x124)&&_0x339c3c?.['scope']&&_0x339c3c[_0x245f83(0x13a)]!==_0x245f83(0x124))throw CliErrors[_0x245f83(0x129)](_0x245f83(0x128)+METADATA_FILE+_0x245f83(0x109)+_0x339c3c[_0x245f83(0x13a)]+'\x22.',_0x245f83(0x145)+_0x378643+_0x245f83(0x10f));const _0x4725b5=scanSkillDirectory(_0x378643),_0x282cb7=buildSkillPackage(_0x4725b5),_0x176077=readFileSync(_0xf0521b,_0x245f83(0x10d)),_0x3a3000=_0xe00dfd[_0x245f83(0x117)],_0x139436=_0x2419ff[_0x245f83(0x142)]?undefined:_0x339c3c,_0x106389=readSkillDisplayName(_0x176077);return{'skillCode':_0x3a3000,'metadata':_0x339c3c,'frontmatterDisplayName':_0x106389,'input':{'skillCode':_0x3a3000,'skillName':_0x106389??_0x139436?.['skillName'],'description':_0x139436?.[_0x245f83(0x112)],'content':_0x176077,'files':_0x282cb7[_0x245f83(0x137)],'packageBase64':_0x282cb7[_0x245f83(0x10c)],'tags':_0x139436?.[_0x245f83(0x140)],'version':_0x139436?.[_0x245f83(0x121)],'sourceSessionId':_0x139436?.[_0x245f83(0x110)]}};}function a114_0x12a9(){const _0x13acd2=['pushedAt','filter','718ReCfbu','find','metadata','allowAppCodeRetarget','builtin','displayName','isSymbolicLink','path','manifest','startsWith','1290918znszQZ','scope','ignoreInvalidMetadata','ignoreMetadataScope','Skill\x20metadata\x20appCode\x20\x22','1402050WZaXqC','number','tags','skillName','ignoreMetadataForPayload','isArray','isDirectory','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20has\x20scope=\x22','replace','Skill\x20directory\x20not\x20found:\x20','packageBase64','utf8','slice','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','sourceSessionId','files','description','297NFiuaH','2159094ZgZmsj','Missing\x20','(unknown)','skillCode','73920vUdMnG','10362nzLBwn','ignoreMetadataSkillCode','ignoreMetadataAppCodeMismatch','name','2235wuKiSf','trim','isFile','appCode','version','Remote\x20Skill\x20','content','personal',',\x20or\x20directory\x20name.','\x20name\x20for\x20SkillHub\x20slug\x20generation.','company','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','validation','object','379092fIaxIZ','\x20has\x20unsupported\x20scope\x20\x22'];a114_0x12a9=function(){return _0x13acd2;};return a114_0x12a9();}export function refreshPushDirectoryMetadataFromRemote(_0x170476,_0xfda6e4,_0x54c62f,_0x422c7c={}){const _0x1fdeed=a114_0x4d45,_0x521e12=resolvePushDirectoryRoot(_0x170476),_0x55dc8b=readPushMetadataIfPresent(resolve(_0x521e12,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x3cb55b=requireRemoteScope(_0xfda6e4),_0x1b48f0=readLocalSkillContent(_0x521e12),_0x504fcd={..._0xfda6e4,'appCode':_0xfda6e4[_0x1fdeed(0x120)]??_0x54c62f,'skillName':_0xfda6e4[_0x1fdeed(0x141)]??_0x55dc8b?.[_0x1fdeed(0x141)],'description':_0xfda6e4[_0x1fdeed(0x112)]??_0x55dc8b?.['description'],'tags':Array[_0x1fdeed(0x143)](_0xfda6e4[_0x1fdeed(0x140)])?_0xfda6e4[_0x1fdeed(0x140)]:_0x55dc8b?.[_0x1fdeed(0x140)],'sourceSessionId':_0xfda6e4[_0x1fdeed(0x110)]??_0x55dc8b?.[_0x1fdeed(0x110)],'content':_0xfda6e4['content']??_0x1b48f0},_0x50d04c=buildMetadata(_0x504fcd,_0x3cb55b,_0x54c62f,contentHash(_0x1b48f0),_0x422c7c['refreshedAt']);writeJsonAtomic(resolve(_0x521e12,METADATA_FILE),_0x50d04c);}export function recordPushedRuntimeSkill(_0x14ca02,_0x2790da,_0xa5eacb,_0x5148e6={}){const _0x44ff2c=a114_0x4d45,_0x268807=resolvePushDirectoryRoot(_0x14ca02),_0x5c54b2=scanSkillDirectory(_0x268807),_0x35f0b9=_0x5c54b2[_0x44ff2c(0x130)](_0xdb9cd2=>_0xdb9cd2[_0x44ff2c(0x136)]===SKILL_FILE),_0x46391b=_0x35f0b9?fileText(_0x35f0b9):'',_0x5ad184=tryNormalizePackageManifest(_0x2790da['files']),_0xb027fc={..._0x2790da,'content':_0x2790da[_0x44ff2c(0x123)]??_0x46391b,'files':_0x5ad184},_0x5da141=_0x5ad184?normalizeLocalFiles(_0x5c54b2)[_0x44ff2c(0x12e)](_0x450ed7=>_0x5ad184[_0x44ff2c(0x111)]['some'](_0xeb6b97=>_0xeb6b97[_0x44ff2c(0x136)]===_0x450ed7[_0x44ff2c(0x136)])):undefined,_0x2d1981=buildMetadata(_0xb027fc,_0x5148e6[_0x44ff2c(0x13a)]??'personal',_0xa5eacb,contentHash(_0xb027fc[_0x44ff2c(0x123)]??''),_0x5148e6[_0x44ff2c(0x12d)],_0x5da141);writeJsonAtomic(resolve(_0x268807,METADATA_FILE),_0x2d1981);}export function deriveSkillCodeFromDirectory(_0x44c210,_0x31d8d4){const _0x213175=a114_0x4d45,_0x2626f8=basename(resolve(_0x44c210)),_0xad369c=_0x31d8d4+'--';return _0x2626f8[_0x213175(0x138)](_0xad369c)?_0x2626f8[_0x213175(0x10e)](_0xad369c['length']):_0x2626f8;}function resolvePushSkillCode(_0x79bd02,_0x297fd5,_0x26ba21,_0x13ee25){const _0x1e3025=a114_0x4d45,_0x2cec76=deriveSkillCodeFromSkillFile(_0x79bd02)||deriveSkillCodeFromDirectory(_0x79bd02,_0x297fd5);if(_0x13ee25[_0x1e3025(0x11a)])return _0x2cec76;return _0x26ba21?.[_0x1e3025(0x117)]?.['trim']()||_0x2cec76;}function deriveSkillCodeFromSkillFile(_0x87d3b6){const _0x17eba6=a114_0x4d45,_0x36fe7f=resolve(_0x87d3b6,SKILL_FILE);if(!existsSync(_0x36fe7f)||!lstatSync(_0x36fe7f)['isFile']())return undefined;const _0x2965a8=readFileSync(_0x36fe7f,'utf8'),_0x34a340=_0x2965a8['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x34a340)return undefined;const _0x354402=parseFrontmatterObject(_0x34a340[0x1]??''),_0x32de53=scalarToString(_0x354402?.[_0x17eba6(0x11c)]);return _0x32de53?slugifySkillName(_0x32de53):undefined;}function readSkillDisplayName(_0x310522){const _0x57221a=a114_0x4d45,_0x354038=_0x310522['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x354038)return undefined;const _0x4ac04b=parseFrontmatterObject(_0x354038[0x1]??'');return scalarToString(_0x4ac04b?.[_0x57221a(0x134)]);}function slugifySkillName(_0x2c133f){const _0x474ae6=a114_0x4d45,_0x3b356f=_0x2c133f[_0x474ae6(0x11e)]()['toLowerCase']()[_0x474ae6(0x10a)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x474ae6(0x10a)](/^-+/,'')[_0x474ae6(0x10a)](/-+$/,'')[_0x474ae6(0x10a)](/-{2,}/g,'-');if(!_0x3b356f)throw CliErrors['validation']('Invalid\x20'+SKILL_FILE+_0x474ae6(0x126));return _0x3b356f;}function parseFrontmatterObject(_0x206209){const _0x5b594a=a114_0x4d45;try{const _0x172978=a114_0x3e5aae(_0x206209);return _0x172978&&typeof _0x172978===_0x5b594a(0x12a)&&!Array[_0x5b594a(0x143)](_0x172978)?_0x172978:undefined;}catch{return undefined;}}function scalarToString(_0x55bd38){const _0x56933b=a114_0x4d45;if(typeof _0x55bd38==='string')return _0x55bd38[_0x56933b(0x11e)]();if(typeof _0x55bd38===_0x56933b(0x13f)||typeof _0x55bd38==='boolean')return String(_0x55bd38);return undefined;}function resolvePushDirectoryRoot(_0xc2d204){const _0x52c0cc=a114_0x4d45,_0x2dc1f3=resolve(_0xc2d204);if(!existsSync(_0x2dc1f3))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0xc2d204);const _0x1e2464=lstatSync(_0x2dc1f3);if(_0x1e2464['isDirectory']())return _0x2dc1f3;if(_0x1e2464[_0x52c0cc(0x135)]()){const _0x17ea44=realpathSync(_0x2dc1f3);if(lstatSync(_0x17ea44)[_0x52c0cc(0x144)]())return _0x17ea44;}throw CliErrors[_0x52c0cc(0x129)](_0x52c0cc(0x10b)+_0xc2d204);}function requireRemoteScope(_0x5d6fde){const _0xda969=a114_0x4d45;if(_0x5d6fde[_0xda969(0x13a)]===_0xda969(0x124)||_0x5d6fde[_0xda969(0x13a)]===_0xda969(0x127)||_0x5d6fde[_0xda969(0x13a)]===_0xda969(0x133))return _0x5d6fde[_0xda969(0x13a)];throw CliErrors[_0xda969(0x129)](_0xda969(0x122)+(_0x5d6fde[_0xda969(0x117)]||_0xda969(0x116))+_0xda969(0x12c)+(_0x5d6fde[_0xda969(0x13a)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x45b993){const _0xe5c957=a114_0x4d45,_0x488b24=resolve(_0x45b993,SKILL_FILE);return existsSync(_0x488b24)&&lstatSync(_0x488b24)[_0xe5c957(0x11f)]()?readFileSync(_0x488b24,_0xe5c957(0x10d)):'';}function readPushMetadataIfPresent(_0x53a420,_0x33116b={}){try{return readMetadataIfPresent(_0x53a420);}catch(_0x57fdd1){if(_0x33116b['ignoreInvalidMetadata'])return undefined;throw _0x57fdd1;}}
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 a115_0x26fb(_0x503db7,_0x5ca837){_0x503db7=_0x503db7-0x1cc;const _0x558527=a115_0x5585();let _0x26fb32=_0x558527[_0x503db7];return _0x26fb32;}(function(_0x1c7ff7,_0x203f4c){const _0xb91cc6=a115_0x26fb,_0xac7686=_0x1c7ff7();while(!![]){try{const _0xaac5cd=-parseInt(_0xb91cc6(0x1db))/0x1+-parseInt(_0xb91cc6(0x1da))/0x2*(parseInt(_0xb91cc6(0x1d0))/0x3)+parseInt(_0xb91cc6(0x1cc))/0x4*(parseInt(_0xb91cc6(0x1d8))/0x5)+parseInt(_0xb91cc6(0x1d1))/0x6+-parseInt(_0xb91cc6(0x1d9))/0x7+parseInt(_0xb91cc6(0x1d3))/0x8+parseInt(_0xb91cc6(0x1cd))/0x9;if(_0xaac5cd===_0x203f4c)break;else _0xac7686['push'](_0xac7686['shift']());}catch(_0x55ea8b){_0xac7686['push'](_0xac7686['shift']());}}}(a115_0x5585,0xb7532));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x5ee2ab){const _0x150f6c=a115_0x26fb,_0x52f53b=_0x5ee2ab&&_0x5ee2ab[_0x150f6c(0x1d6)]>0x0?_0x5ee2ab:[_0x150f6c(0x1d7),_0x150f6c(0x1d4),_0x150f6c(0x1ce)],_0x433efa=[];for(const _0x37623e of _0x52f53b){if(!isRuntimeSkillScope(_0x37623e))throw CliErrors[_0x150f6c(0x1d5)](_0x150f6c(0x1d2)+_0x37623e);!_0x433efa[_0x150f6c(0x1cf)](_0x37623e)&&_0x433efa['push'](_0x37623e);}return _0x433efa;}function a115_0x5585(){const _0x54bac0=['Unsupported\x20runtime\x20Skill\x20scope:\x20','138960uZKvRo','company','validation','length','personal','784645jzQPIB','4663232xDxHHE','39038qDeIyV','443869uIzzuy','12zgVYWi','9444879mOisfa','builtin','includes','18LBmXzI','2642814ThzxvK'];a115_0x5585=function(){return _0x54bac0;};return a115_0x5585();}export function isRuntimeSkillScope(_0x5e8f04){const _0x15d856=a115_0x26fb;return _0x5e8f04===_0x15d856(0x1d7)||_0x5e8f04===_0x15d856(0x1d4)||_0x5e8f04===_0x15d856(0x1ce);}
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
- const a117_0x596c61=a117_0x4d56;(function(_0x17ba56,_0x6b1d59){const _0x499b57=a117_0x4d56,_0x282a3e=_0x17ba56();while(!![]){try{const _0x51b6f3=parseInt(_0x499b57(0x9b))/0x1+-parseInt(_0x499b57(0xa6))/0x2+parseInt(_0x499b57(0xa2))/0x3+-parseInt(_0x499b57(0xa1))/0x4*(parseInt(_0x499b57(0x9c))/0x5)+-parseInt(_0x499b57(0xa0))/0x6*(-parseInt(_0x499b57(0xa4))/0x7)+parseInt(_0x499b57(0x9f))/0x8+-parseInt(_0x499b57(0xaa))/0x9;if(_0x51b6f3===_0x6b1d59)break;else _0x282a3e['push'](_0x282a3e['shift']());}catch(_0x40a8c9){_0x282a3e['push'](_0x282a3e['shift']());}}}(a117_0x1ed3,0xc9942));function a117_0x4d56(_0x1e0469,_0x2e0773){_0x1e0469=_0x1e0469-0x9b;const _0x1ed38e=a117_0x1ed3();let _0x4d56eb=_0x1ed38e[_0x1e0469];return _0x4d56eb;}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_0x596c61(0xa7));export function createDeterministicZipPackage(_0x5b3443){const _0x44bd5a=a117_0x596c61,_0x459d97={};for(const _0x25bdf0 of normalizeLocalFiles(_0x5b3443)){_0x459d97[_0x25bdf0[_0x44bd5a(0xa3)]]=fileContent(_0x25bdf0);}return Buffer[_0x44bd5a(0xab)](zipSync(_0x459d97,{'level':0x0,'mtime':ZIP_MTIME}));}function a117_0x1ed3(){const _0x568e2b=['28931naMpSi','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1328798vbFXdC','1980-01-01T00:00:00.000Z','code','object','15870069Rlzncs','from','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','1408012xWHOaf','50MjLUny','validation','entries','12942656uRqdMH','852RpFugf','369268ATUJkG','1691538ahxxdX','path'];a117_0x1ed3=function(){return _0x568e2b;};return a117_0x1ed3();}export function parseZipPackage(_0x29470b){const _0x325a00=a117_0x596c61;if(_0x29470b[_0x325a00(0xad)]<0x16)throw CliErrors[_0x325a00(0x9d)](_0x325a00(0xac));let _0x140fe9;try{_0x140fe9=unzipSync(_0x29470b,{'filter'(_0x1bdf47){const _0x5049cb=_0x325a00,_0x4740fb=normalizeSkillRelativePath(_0x1bdf47['name']);if(_0x4740fb['endsWith']('/'))throw CliErrors[_0x5049cb(0x9d)](_0x5049cb(0xa5)+_0x4740fb);return!![];}});}catch(_0x88dec3){if(isRuntimeSkillValidationError(_0x88dec3))throw _0x88dec3;throw CliErrors[_0x325a00(0x9d)](_0x325a00(0xac));}return Object[_0x325a00(0x9e)](_0x140fe9)['map'](([_0x598532,_0x7f0b28])=>({'path':normalizeSkillRelativePath(_0x598532),'bytes':Buffer[_0x325a00(0xab)](_0x7f0b28)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x22e883){const _0x4ea54e=a117_0x596c61;return typeof _0x22e883===_0x4ea54e(0xa9)&&_0x22e883!==null&&_0x4ea54e(0xa8)in _0x22e883&&_0x22e883[_0x4ea54e(0xa8)]==='validation_error';}
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(_0x2ca457,_0x37567b){const _0x37157b=a118_0x5950,_0x68e2b8=_0x2ca457();while(!![]){try{const _0xf7a835=-parseInt(_0x37157b(0x15a))/0x1*(parseInt(_0x37157b(0x173))/0x2)+-parseInt(_0x37157b(0x164))/0x3+parseInt(_0x37157b(0x16c))/0x4*(-parseInt(_0x37157b(0x172))/0x5)+parseInt(_0x37157b(0x170))/0x6+parseInt(_0x37157b(0x157))/0x7*(parseInt(_0x37157b(0x17c))/0x8)+parseInt(_0x37157b(0x150))/0x9*(-parseInt(_0x37157b(0x167))/0xa)+parseInt(_0x37157b(0x14c))/0xb*(parseInt(_0x37157b(0x154))/0xc);if(_0xf7a835===_0x37567b)break;else _0x68e2b8['push'](_0x68e2b8['shift']());}catch(_0x3abc7a){_0x68e2b8['push'](_0x68e2b8['shift']());}}}(a118_0x32c6,0x216b9));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(_0x4c2a5d){const _0x2e35de=a118_0x5950,_0x5f1fab=normalizeLocalFiles(_0x4c2a5d);if(!_0x5f1fab['some'](_0x2de44b=>_0x2de44b[_0x2e35de(0x174)]===SKILL_FILE))throw CliErrors[_0x2e35de(0x160)](_0x2e35de(0x14e)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0xfd5de4=localFilesToManifestFiles(_0x5f1fab),_0x2ba16b=createDeterministicZipPackage(_0x5f1fab);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0xfd5de4),'zipSha256':bufferSha256(_0x2ba16b),'zipSize':_0x2ba16b[_0x2e35de(0x176)],'files':_0xfd5de4},'packageBytes':_0x2ba16b,'packageBase64':_0x2ba16b[_0x2e35de(0x15d)]('base64')};}export function verifyRuntimeSkillPackage(_0x5cba44,_0xbefa49){const _0x23a85b=a118_0x5950,_0x300497=normalizePackageManifest(_0x5cba44,{'requireOssPath':![]});if(!_0x300497)throw CliErrors['validation'](_0x23a85b(0x155));return extractAndVerifyPackage(_0x300497,_0xbefa49);}export function verifyRuntimeSkillBundle(_0x658ca7,_0x5cc649){const _0x32e032=a118_0x5950,_0x358f92=normalizePackageManifest(_0x658ca7,{'requireOssPath':![]});if(!_0x358f92)throw CliErrors[_0x32e032(0x160)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x358f92,_0x5cc649);}function a118_0x32c6(){const _0x13f4ca=['Runtime\x20Skill\x20package\x20is\x20missing\x20','requireOssPath','339608UbOHzG','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','5269BLWPfM','get','Missing\x20','trim','135LtOurv','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','17568vOAkNn','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','isSafeInteger','21HoqedY','toLowerCase','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','4bxIEjo','ossPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','toString','string','isArray','validation','some','sha256','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','808710qPtiTS','object','set','175100LJAldE','zipSha256','has','bytes','treeSha256','889564bLxmVL','files','map','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','1167714BqJDTu','schemaVersion','5lDIFMJ','65864BJXdnY','path','Runtime\x20Skill\x20package\x20size\x20mismatch.','length','size','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','zipSize'];a118_0x32c6=function(){return _0x13f4ca;};return a118_0x32c6();}export function tryNormalizePackageManifest(_0x1bf537){return normalizePackageManifest(_0x1bf537,{'requireOssPath':![]});}export function requirePackageBytes(_0x162fe6,_0x4cdc7b){const _0x3d1ea7=a118_0x5950;if(!_0x4cdc7b||_0x4cdc7b['length']===0x0)throw CliErrors[_0x3d1ea7(0x160)](_0x3d1ea7(0x16f)+_0x162fe6);return _0x4cdc7b;}function a118_0x5950(_0x4dcebb,_0x2081e9){_0x4dcebb=_0x4dcebb-0x14b;const _0x32c652=a118_0x32c6();let _0x595017=_0x32c652[_0x4dcebb];return _0x595017;}export function extractDownloadedPackage(_0x512258){const _0x534fef=a118_0x5950,_0x13bdec=parseZipPackage(_0x512258)['map'](_0x5b3364=>({'path':_0x5b3364['path'],'bytes':_0x5b3364[_0x534fef(0x16a)]}));if(!_0x13bdec[_0x534fef(0x161)](_0x51c908=>_0x51c908['path']===SKILL_FILE))throw CliErrors['validation'](_0x534fef(0x17a)+SKILL_FILE+'.');return normalizeLocalFiles(_0x13bdec);}export function localFilesToManifestFiles(_0x24ec36){const _0x109d4a=a118_0x5950;return normalizeLocalFiles(_0x24ec36)[_0x109d4a(0x16e)](_0x45798f=>({'path':_0x45798f[_0x109d4a(0x174)],'sha256':fileHash(_0x45798f),'size':fileContent(_0x45798f)['length']}));}function normalizePackageManifest(_0x58cbc7,_0x321a4f){const _0x38a205=a118_0x5950;if(!_0x58cbc7||typeof _0x58cbc7!==_0x38a205(0x165)||Array[_0x38a205(0x15f)](_0x58cbc7))return undefined;const _0x4e350f=_0x58cbc7,_0xbaf0ac=typeof _0x4e350f[_0x38a205(0x15b)]===_0x38a205(0x15e)?_0x4e350f[_0x38a205(0x15b)][_0x38a205(0x14f)]():undefined;if(_0x321a4f[_0x38a205(0x17b)]&&!_0xbaf0ac)return undefined;if(!Array[_0x38a205(0x15f)](_0x4e350f[_0x38a205(0x16d)])||_0x4e350f[_0x38a205(0x16d)][_0x38a205(0x176)]===0x0)return undefined;if(!isSha256Hex(_0x4e350f[_0x38a205(0x16b)]))throw CliErrors[_0x38a205(0x160)](_0x38a205(0x15c));if(!isSha256Hex(_0x4e350f['zipSha256']))throw CliErrors[_0x38a205(0x160)](_0x38a205(0x152));if(!Number[_0x38a205(0x156)](_0x4e350f['zipSize'])||_0x4e350f['zipSize']<0x0)throw CliErrors[_0x38a205(0x160)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x440a41=normalizeManifestFiles(_0x4e350f[_0x38a205(0x16d)]);if(!_0x440a41[_0x38a205(0x161)](_0x5e6060=>_0x5e6060[_0x38a205(0x174)]===SKILL_FILE))throw CliErrors['validation'](_0x38a205(0x159)+SKILL_FILE+'.');const _0x2c41a7=fileTreeHash(_0x440a41);if(_0x2c41a7!==_0x4e350f[_0x38a205(0x16b)]['toLowerCase']())throw CliErrors[_0x38a205(0x160)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x38a205(0x156)](_0x4e350f['schemaVersion'])?_0x4e350f[_0x38a205(0x171)]:0x2,'ossPath':_0xbaf0ac,'treeSha256':_0x2c41a7,'zipSha256':_0x4e350f[_0x38a205(0x168)][_0x38a205(0x158)](),'zipSize':_0x4e350f['zipSize'],'files':_0x440a41};}function extractAndVerifyPackage(_0xc5370d,_0x1d17a7){const _0x32df6f=a118_0x5950,_0x31c173=normalizePackageManifest(_0xc5370d,{'requireOssPath':![]});if(!_0x31c173)throw CliErrors[_0x32df6f(0x160)](_0x32df6f(0x155));if(_0x1d17a7['length']!==_0x31c173[_0x32df6f(0x179)])throw CliErrors[_0x32df6f(0x160)](_0x32df6f(0x175));const _0x50d96b=bufferSha256(_0x1d17a7);if(_0x50d96b!==_0x31c173[_0x32df6f(0x168)])throw CliErrors['validation'](_0x32df6f(0x17d));return extractAndVerifyPackageFiles(_0x31c173,_0x1d17a7);}function extractAndVerifyPackageFiles(_0x2a2a1e,_0x27bed8){const _0x379701=a118_0x5950,_0x3b5e98=parseZipPackage(_0x27bed8);if(_0x3b5e98[_0x379701(0x176)]!==_0x2a2a1e[_0x379701(0x16d)][_0x379701(0x176)])throw CliErrors[_0x379701(0x160)](_0x379701(0x178));const _0x5ee850=new Map();for(const _0x4db156 of _0x3b5e98){if(_0x5ee850[_0x379701(0x169)](_0x4db156['path']))throw CliErrors[_0x379701(0x160)](_0x379701(0x153)+_0x4db156[_0x379701(0x174)]);_0x5ee850[_0x379701(0x166)](_0x4db156['path'],_0x4db156);}const _0x2bc1a2=[];for(const _0x4bf3e8 of _0x2a2a1e[_0x379701(0x16d)]){const _0x49ae37=_0x5ee850[_0x379701(0x14d)](_0x4bf3e8[_0x379701(0x174)]);if(!_0x49ae37)throw CliErrors[_0x379701(0x160)](_0x379701(0x151)+_0x4bf3e8[_0x379701(0x174)]);if(_0x49ae37[_0x379701(0x16a)][_0x379701(0x176)]!==_0x4bf3e8[_0x379701(0x177)])throw CliErrors[_0x379701(0x160)](_0x379701(0x14b)+_0x4bf3e8[_0x379701(0x174)]);const _0x224b3e=bufferSha256(_0x49ae37[_0x379701(0x16a)]);if(_0x224b3e!==_0x4bf3e8[_0x379701(0x162)])throw CliErrors['validation'](_0x379701(0x163)+_0x4bf3e8['path']);_0x2bc1a2['push']({'path':_0x4bf3e8[_0x379701(0x174)],'bytes':_0x49ae37['bytes']});}return normalizeLocalFiles(_0x2bc1a2);}
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 a119_0x1a60(){var _0x531e3c=['14838MEmKaq','6QefccN','11MYqbch','5145780izpOBX','3828424IUSXAc','373894jamTBC','726921WyuQHU','4430532sUtiZB','1455081mNeSQy','1640IVIZCI','21NdABHK'];a119_0x1a60=function(){return _0x531e3c;};return a119_0x1a60();}(function(_0x38b218,_0x39c428){var _0x157d22=a119_0x48c7,_0x3bbba9=_0x38b218();while(!![]){try{var _0x1067bf=-parseInt(_0x157d22(0x7b))/0x1*(-parseInt(_0x157d22(0x74))/0x2)+-parseInt(_0x157d22(0x77))/0x3+-parseInt(_0x157d22(0x76))/0x4+parseInt(_0x157d22(0x78))/0x5*(-parseInt(_0x157d22(0x7a))/0x6)+-parseInt(_0x157d22(0x79))/0x7*(-parseInt(_0x157d22(0x7e))/0x8)+parseInt(_0x157d22(0x75))/0x9+-parseInt(_0x157d22(0x7d))/0xa*(-parseInt(_0x157d22(0x7c))/0xb);if(_0x1067bf===_0x39c428)break;else _0x3bbba9['push'](_0x3bbba9['shift']());}catch(_0x363cdf){_0x3bbba9['push'](_0x3bbba9['shift']());}}}(a119_0x1a60,0xb6d54));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';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a119_0x48c7(_0x3fdc0d,_0x2b8db4){_0x3fdc0d=_0x3fdc0d-0x74;var _0x1a6070=a119_0x1a60();var _0x48c7d3=_0x1a6070[_0x3fdc0d];return _0x48c7d3;}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(_0x2887b4,_0x1c8f17){const _0x3f67d6=a120_0x59d4,_0x545cb2=_0x2887b4();while(!![]){try{const _0x23628f=parseInt(_0x3f67d6(0x112))/0x1*(parseInt(_0x3f67d6(0x116))/0x2)+parseInt(_0x3f67d6(0x113))/0x3+-parseInt(_0x3f67d6(0x118))/0x4*(-parseInt(_0x3f67d6(0x115))/0x5)+-parseInt(_0x3f67d6(0x117))/0x6*(parseInt(_0x3f67d6(0x11b))/0x7)+parseInt(_0x3f67d6(0x114))/0x8*(-parseInt(_0x3f67d6(0x119))/0x9)+-parseInt(_0x3f67d6(0x11d))/0xa+parseInt(_0x3f67d6(0x11a))/0xb*(parseInt(_0x3f67d6(0x11c))/0xc);if(_0x23628f===_0x1c8f17)break;else _0x545cb2['push'](_0x545cb2['shift']());}catch(_0x3f15cb){_0x545cb2['push'](_0x545cb2['shift']());}}}(a120_0x5ed7,0x2b50e));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a120_0x59d4(_0x536fb4,_0x264a13){_0x536fb4=_0x536fb4-0x112;const _0x5ed7cf=a120_0x5ed7();let _0x59d442=_0x5ed7cf[_0x536fb4];return _0x59d442;}function a120_0x5ed7(){const _0x29b9bd=['18rqNsUy','696AJCUHe','4QfPGRd','545841QZQyEM','55jVFEwy','20118XvEcHO','579756cVyyQq','1023100sBoMhx','7127IihSDK','740493aNRnNp','32MTucUb','1515865japIDC'];a120_0x5ed7=function(){return _0x29b9bd;};return a120_0x5ed7();}
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()});