@lovrabet/lovrabet-cli 2.1.18-beta.2 → 2.1.18-beta.3

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 (127) 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/response.js +1 -1
  90. package/lib/framework/runner-confirmation.js +1 -1
  91. package/lib/framework/runner-error.js +1 -1
  92. package/lib/framework/runner.js +1 -1
  93. package/lib/framework/schema-export.js +1 -1
  94. package/lib/framework/service-order.js +1 -1
  95. package/lib/framework/types.js +1 -1
  96. package/lib/generated/build-info.d.ts +4 -4
  97. package/lib/generated/build-info.js +1 -1
  98. package/lib/help.js +1 -1
  99. package/lib/runtime/event.js +1 -1
  100. package/lib/runtime/index.js +1 -1
  101. package/lib/runtime/queue.js +1 -1
  102. package/lib/runtime/resolve.js +1 -1
  103. package/lib/skills/npx-skills-add.js +1 -1
  104. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  105. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  106. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  107. package/lib/skills/runtime-skill-sync/links.js +1 -1
  108. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  109. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  110. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  111. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  112. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  113. package/lib/skills/runtime-skill-sync/push.js +1 -1
  114. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  115. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  116. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  117. package/lib/skills/runtime-skill-sync.js +1 -1
  118. package/lib/utils/apply-jq-filter.js +1 -1
  119. package/lib/utils/logger.js +1 -1
  120. package/lib/utils/lossless-json.d.ts +7 -14
  121. package/lib/utils/lossless-json.js +1 -1
  122. package/lib/utils/params.js +1 -1
  123. package/lib/utils/platform.js +1 -1
  124. package/lib/utils/update-notice.js +1 -1
  125. package/lib/utils/version.js +1 -1
  126. package/lib/utils/write-cli-side-channel.js +1 -1
  127. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x11e4e7,_0x5e065a){const _0xa220fa=a106_0x3839,_0x28ff4d=_0x11e4e7();while(!![]){try{const _0x298385=-parseInt(_0xa220fa(0xfd))/0x1*(-parseInt(_0xa220fa(0x117))/0x2)+-parseInt(_0xa220fa(0x107))/0x3+parseInt(_0xa220fa(0x11c))/0x4+-parseInt(_0xa220fa(0x119))/0x5+parseInt(_0xa220fa(0x11f))/0x6+parseInt(_0xa220fa(0x102))/0x7+parseInt(_0xa220fa(0x10f))/0x8;if(_0x298385===_0x5e065a)break;else _0x28ff4d['push'](_0x28ff4d['shift']());}catch(_0x3561ff){_0x28ff4d['push'](_0x28ff4d['shift']());}}}(a106_0x37f6,0x3715b));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a106_0x3ef653 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,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a106_0x3ef653;export function linkEffectiveRuntimeSkills(_0x5de07e,_0x2d947f,_0x2fcdd8={}){const _0x15f408=a106_0x3839,_0x5d7706=new Map();for(const _0x7d902b of _0x5de07e){const _0x674ace=_0x7d902b[_0x15f408(0x11a)][_0x15f408(0xf9)];if(!_0x674ace)continue;const _0x143ee=_0x5d7706[_0x15f408(0xfc)](_0x674ace);(!_0x143ee||_0x7d902b['scope']===_0x15f408(0xfb))&&_0x5d7706[_0x15f408(0x11b)](_0x674ace,_0x7d902b);}const _0x307396=[],_0x2245cb=resolveSkillSyncPaths(_0x2fcdd8);for(const _0xf80a08 of _0x5d7706[_0x15f408(0x100)]()){const _0x5c9b33=requireSkillCode(_0xf80a08[_0x15f408(0x11a)]),_0x43d3b8=_0x2d947f+'--'+_0x5c9b33;for(const _0x4cee54 of runtimeAgentSkillRoots(_0x2245cb)){_0x307396[_0x15f408(0x105)](ensureManagedSymlink(resolve(_0x4cee54,_0x43d3b8),_0xf80a08[_0x15f408(0x112)],_0x2245cb[_0x15f408(0xf0)]));}}return _0x307396;}export function pruneStaleRuntimeSkillLinks(_0x57f9ee,_0x377f4e,_0x10f876={},_0x3d900c){const _0x5ee30d=a106_0x3839,_0xd0143e=resolveSkillSyncPaths(_0x10f876),_0x2df84b=new Set([..._0x377f4e]['map'](_0x4727d6=>_0x4727d6['trim']())['filter'](Boolean)),_0x1a44a3=_0x3d900c?new Set([..._0x3d900c][_0x5ee30d(0xf8)](_0x4738cc=>_0x4738cc[_0x5ee30d(0x11d)]())['filter'](Boolean)):undefined,_0x9ffe27=[];for(const _0x468312 of runtimeAgentSkillRoots(_0xd0143e)){for(const _0x2e94e1 of managedAppSkillLinkPaths(_0x468312,_0x57f9ee)){const _0x1aca53=basename(_0x2e94e1)[_0x5ee30d(0x109)]((_0x57f9ee+'--')['length']);if(_0x1a44a3&&!_0x1a44a3[_0x5ee30d(0xfa)](_0x1aca53))continue;if(_0x2df84b[_0x5ee30d(0xfa)](_0x1aca53))continue;_0x9ffe27[_0x5ee30d(0x105)](removeManagedSkillLink(_0x2e94e1,_0xd0143e[_0x5ee30d(0xf0)]));}}return _0x9ffe27;}export function pruneStaleRuntimeSkillCache(_0x2ac18a,_0x574ca9={}){const _0x29911d=a106_0x3839,_0xc88f8e=new Set([..._0x2ac18a[_0x29911d(0x101)]][_0x29911d(0xf8)](_0x36ce94=>_0x36ce94['trim']())[_0x29911d(0x108)](Boolean)),_0x5119d6=_0x2ac18a[_0x29911d(0xfe)]?new Set([..._0x2ac18a[_0x29911d(0xfe)]][_0x29911d(0xf8)](_0x3d7d0d=>_0x3d7d0d[_0x29911d(0x11d)]())[_0x29911d(0x108)](Boolean)):undefined,_0x2c2aae=_0x2ac18a[_0x29911d(0xf2)]??[_0x29911d(0xfb),_0x29911d(0x115)],_0x3341b1=resolve(getRuntimeSkillCacheRoot(_0x2ac18a[_0x29911d(0xf6)],_0x2ac18a[_0x29911d(0x10b)],_0x574ca9),safePathSegment(_0x2ac18a[_0x29911d(0xf7)],_0x29911d(0xf7))),_0x2afa37=[];for(const _0x473d17 of _0x2c2aae){const _0x13919c=resolve(_0x3341b1,_0x473d17);if(!existsSync(_0x13919c))continue;for(const _0x146001 of readdirSync(_0x13919c,{'withFileTypes':!![]})){if(!_0x146001['isDirectory']())continue;const _0x3543ea=_0x146001[_0x29911d(0x10e)];if(_0x5119d6&&!_0x5119d6[_0x29911d(0xfa)](_0x3543ea))continue;if(_0xc88f8e[_0x29911d(0xfa)](_0x3543ea))continue;const _0x44bece=resolve(_0x13919c,_0x3543ea),_0x1c4bac=readMetadataIfPresent(resolve(_0x44bece,METADATA_FILE));if(_0x1c4bac?.['appCode']!==_0x2ac18a['appCode']||_0x1c4bac[_0x29911d(0x10c)]!==_0x473d17||_0x1c4bac[_0x29911d(0xf9)]!==_0x3543ea){_0x2afa37[_0x29911d(0x105)]({'path':_0x44bece,'action':_0x29911d(0xf1),'reason':_0x29911d(0xf3)});continue;}removeSync(_0x44bece),_0x2afa37[_0x29911d(0x105)]({'path':_0x44bece,'action':_0x29911d(0x10d)});}}return _0x2afa37;}export function linkGlobalRuntimeSkills(_0x2c3389,_0x112db3={}){const _0x4ee4b6=a106_0x3839,_0x51a4d3=resolveSkillSyncPaths(_0x112db3),_0x157c68=[];for(const _0x2d8da5 of _0x2c3389){if(_0x2d8da5['scope']!==_0x4ee4b6(0xef))throw CliErrors[_0x4ee4b6(0x118)](_0x4ee4b6(0x110)+_0x2d8da5[_0x4ee4b6(0x10c)]);const _0x1018e8=requireSkillCode(_0x2d8da5['skill']),_0x1fc1ac=copyManagedSkillDirectory(_0x2d8da5[_0x4ee4b6(0x112)],resolve(_0x51a4d3['agentsSkillsDir'],_0x1018e8));_0x157c68[_0x4ee4b6(0x105)]({..._0x1fc1ac,'contentHash':_0x2d8da5['contentHash']});}return _0x157c68;}function a106_0x37f6(){const _0x1107ac=['get','2ykSopp','pruneSkillCodes','contentHash','values','activeSkillCodes','2745155LddEAL','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','unchanged','push','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','1085937JUjmQg','filter','slice','isSymbolicLink','accessKey','scope','removed','name','247392aZyDDF','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','dir','startsWith','isDirectory','company','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','6108HKhvxL','validation','1072945fmmUAb','skill','set','1105328bkhihL','trim','external-symlink','579996NxHsoQ','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','builtin','managedRoot','skipped','scopes','metadata-mismatch','created','updated','env','appCode','map','skillCode','has','personal'];a106_0x37f6=function(){return _0x1107ac;};return a106_0x37f6();}function ensureManagedSymlink(_0x4e3964,_0x37a6fa,_0x55fdaa){const _0x508375=a106_0x3839;mkdirSync(dirname(_0x4e3964),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4e3964)||isDanglingSymlink(_0x4e3964)){const _0x3f94df=lstatSync(_0x4e3964);if(!_0x3f94df[_0x508375(0x10a)]())throw CliErrors['validation'](_0x508375(0x116)+_0x4e3964);const _0x223867=resolveSymlinkTarget(_0x4e3964);if(!isPathInside(realOrResolved(_0x223867),realOrResolved(_0x55fdaa)))throw CliErrors[_0x508375(0x118)](_0x508375(0xee)+_0x4e3964);if(realOrResolved(_0x223867)===realOrResolved(_0x37a6fa))return{'path':_0x4e3964,'target':_0x37a6fa,'action':_0x508375(0x104)};return unlinkSync(_0x4e3964),symlinkSync(_0x37a6fa,_0x4e3964,'dir'),{'path':_0x4e3964,'target':_0x37a6fa,'action':_0x508375(0xf5)};}return symlinkSync(_0x37a6fa,_0x4e3964,_0x508375(0x112)),{'path':_0x4e3964,'target':_0x37a6fa,'action':_0x508375(0xf4)};}function managedAppSkillLinkPaths(_0x58bf20,_0x5d156f){const _0x4d87a6=a106_0x3839;if(!existsSync(_0x58bf20))return[];const _0x5b4f96=_0x5d156f+'--';return readdirSync(_0x58bf20,{'withFileTypes':!![]})['filter'](_0x2a06aa=>_0x2a06aa['name'][_0x4d87a6(0x113)](_0x5b4f96))[_0x4d87a6(0xf8)](_0x2f7a18=>resolve(_0x58bf20,_0x2f7a18['name']));}function removeManagedSkillLink(_0x1c31fe,_0x2d2d99){const _0x47a1dd=a106_0x3839,_0x28abed=lstatIfPresent(_0x1c31fe);if(!_0x28abed?.[_0x47a1dd(0x10a)]())return{'path':_0x1c31fe,'action':_0x47a1dd(0xf1),'reason':'not-managed-symlink'};const _0x20d672=resolveSymlinkTarget(_0x1c31fe);if(!isPathInside(realOrResolved(_0x20d672),realOrResolved(_0x2d2d99)))return{'path':_0x1c31fe,'action':_0x47a1dd(0xf1),'reason':_0x47a1dd(0x11e)};return unlinkSync(_0x1c31fe),{'path':_0x1c31fe,'action':'removed'};}export function copyManagedSkillDirectory(_0x18d9a9,_0x246ff9){const _0x3a0279=a106_0x3839,_0x55a77d=resolve(_0x246ff9,METADATA_FILE),_0x2cbecf=existsSync(_0x246ff9);if(_0x2cbecf){const _0x475fc8=lstatSync(_0x246ff9);if(_0x475fc8[_0x3a0279(0x10a)]())throw CliErrors['validation'](_0x3a0279(0x111)+_0x246ff9);if(!_0x475fc8[_0x3a0279(0x114)]())throw CliErrors[_0x3a0279(0x118)](_0x3a0279(0x103)+_0x246ff9);const _0x3ca3bb=readMetadataIfPresent(_0x55a77d);if(_0x3ca3bb?.['scope']!==_0x3a0279(0xef))throw CliErrors[_0x3a0279(0x118)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x246ff9);}ensureDirSync(dirname(_0x246ff9));const _0x5770e6=_0x2cbecf?readMetadataIfPresent(_0x55a77d)?.[_0x3a0279(0xff)]:undefined,_0x11b4d2=readMetadataIfPresent(resolve(_0x18d9a9,METADATA_FILE))?.[_0x3a0279(0xff)];return _0x2cbecf&&removeSync(_0x246ff9),copySkillDirectory(_0x18d9a9,_0x246ff9),{'path':_0x246ff9,'target':_0x18d9a9,'action':!_0x2cbecf?'created':_0x5770e6===_0x11b4d2?_0x3a0279(0x104):_0x3a0279(0xf5)};}function a106_0x3839(_0x570692,_0x4052c6){_0x570692=_0x570692-0xee;const _0x37f694=a106_0x37f6();let _0x38395c=_0x37f694[_0x570692];return _0x38395c;}function copySkillDirectory(_0x586108,_0x41d879){copySync(_0x586108,_0x41d879,{'dereference':![],'overwrite':!![],'filter'(_0x2ec424){const _0x5c07f2=a106_0x3839;if(lstatSync(_0x2ec424)[_0x5c07f2(0x10a)]())throw CliErrors[_0x5c07f2(0x118)](_0x5c07f2(0x106)+_0x2ec424);return!![];}});}
1
+ (function(_0xcfa468,_0x4eefe0){const _0x5352f9=a106_0x23b9,_0x125679=_0xcfa468();while(!![]){try{const _0x2c3b9a=-parseInt(_0x5352f9(0x1f3))/0x1+parseInt(_0x5352f9(0x1f6))/0x2+parseInt(_0x5352f9(0x1f4))/0x3*(parseInt(_0x5352f9(0x1d7))/0x4)+parseInt(_0x5352f9(0x1f5))/0x5+parseInt(_0x5352f9(0x1d3))/0x6*(-parseInt(_0x5352f9(0x1ff))/0x7)+parseInt(_0x5352f9(0x1e5))/0x8*(-parseInt(_0x5352f9(0x201))/0x9)+-parseInt(_0x5352f9(0x1ec))/0xa*(parseInt(_0x5352f9(0x1fa))/0xb);if(_0x2c3b9a===_0x4eefe0)break;else _0x125679['push'](_0x125679['shift']());}catch(_0x51a6e8){_0x125679['push'](_0x125679['shift']());}}}(a106_0x2766,0x52985));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a106_0x2766(){const _0x5c8ae2=['values','slice','get','push','external-symlink','managedRoot','unchanged','agentsSkillsDir','8nZslui','map','filter','contentHash','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','activeSkillCodes','skill','1920EyHnXK','appCode','has','personal','accessKey','env','builtin','279543SIXvtE','3SFAAgN','3221000DBPStA','94598FtXfKV','isSymbolicLink','metadata-mismatch','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','4048ETgCwI','created','trim','pruneSkillCodes','scopes','14YXTWut','name','3895866MbhodS','skillCode','scope','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','skipped','163656XhHapg','updated','dir','length','1937740IWsDgE','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','validation','company','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','isDirectory'];a106_0x2766=function(){return _0x5c8ae2;};return a106_0x2766();}import{basename,dirname,resolve}from'node:path';import a106_0x56a3b9 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a106_0x23b9(_0xd058d,_0x4cc6df){_0xd058d=_0xd058d-0x1d3;const _0x2766d1=a106_0x2766();let _0x23b91e=_0x2766d1[_0xd058d];return _0x23b91e;}import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a106_0x56a3b9;export function linkEffectiveRuntimeSkills(_0x3d8c3c,_0x12648b,_0x44ed26={}){const _0x537842=a106_0x23b9,_0x180135=new Map();for(const _0x3c5032 of _0x3d8c3c){const _0x5dc1ef=_0x3c5032[_0x537842(0x1eb)][_0x537842(0x202)];if(!_0x5dc1ef)continue;const _0x420224=_0x180135[_0x537842(0x1df)](_0x5dc1ef);(!_0x420224||_0x3c5032[_0x537842(0x203)]===_0x537842(0x1ef))&&_0x180135['set'](_0x5dc1ef,_0x3c5032);}const _0x231509=[],_0x2d2752=resolveSkillSyncPaths(_0x44ed26);for(const _0x50742c of _0x180135[_0x537842(0x1dd)]()){const _0x4ec587=requireSkillCode(_0x50742c['skill']),_0x1e1206=_0x12648b+'--'+_0x4ec587;for(const _0x2651a3 of runtimeAgentSkillRoots(_0x2d2752)){_0x231509[_0x537842(0x1e0)](ensureManagedSymlink(resolve(_0x2651a3,_0x1e1206),_0x50742c['dir'],_0x2d2752[_0x537842(0x1e2)]));}}return _0x231509;}export function pruneStaleRuntimeSkillLinks(_0x48a36f,_0x52661e,_0x43b598={},_0x1dbedd){const _0x58923c=a106_0x23b9,_0x1aa7c1=resolveSkillSyncPaths(_0x43b598),_0x272065=new Set([..._0x52661e][_0x58923c(0x1e6)](_0x5296f9=>_0x5296f9[_0x58923c(0x1fc)]())[_0x58923c(0x1e7)](Boolean)),_0x3ba2cf=_0x1dbedd?new Set([..._0x1dbedd][_0x58923c(0x1e6)](_0x103e51=>_0x103e51[_0x58923c(0x1fc)]())[_0x58923c(0x1e7)](Boolean)):undefined,_0x35123c=[];for(const _0x4828bd of runtimeAgentSkillRoots(_0x1aa7c1)){for(const _0x104559 of managedAppSkillLinkPaths(_0x4828bd,_0x48a36f)){const _0x2b61db=basename(_0x104559)[_0x58923c(0x1de)]((_0x48a36f+'--')[_0x58923c(0x1d6)]);if(_0x3ba2cf&&!_0x3ba2cf[_0x58923c(0x1ee)](_0x2b61db))continue;if(_0x272065['has'](_0x2b61db))continue;_0x35123c[_0x58923c(0x1e0)](removeManagedSkillLink(_0x104559,_0x1aa7c1[_0x58923c(0x1e2)]));}}return _0x35123c;}export function pruneStaleRuntimeSkillCache(_0x370555,_0x522dae={}){const _0x236973=a106_0x23b9,_0x369c23=new Set([..._0x370555[_0x236973(0x1ea)]][_0x236973(0x1e6)](_0x1481a7=>_0x1481a7[_0x236973(0x1fc)]())[_0x236973(0x1e7)](Boolean)),_0xf6e192=_0x370555[_0x236973(0x1fd)]?new Set([..._0x370555[_0x236973(0x1fd)]][_0x236973(0x1e6)](_0x2e5bdb=>_0x2e5bdb[_0x236973(0x1fc)]())[_0x236973(0x1e7)](Boolean)):undefined,_0x23ed95=_0x370555[_0x236973(0x1fe)]??['personal',_0x236973(0x1da)],_0x24af4d=resolve(getRuntimeSkillCacheRoot(_0x370555[_0x236973(0x1f1)],_0x370555[_0x236973(0x1f0)],_0x522dae),safePathSegment(_0x370555['appCode'],'appCode')),_0x3051de=[];for(const _0x225432 of _0x23ed95){const _0x411fc1=resolve(_0x24af4d,_0x225432);if(!existsSync(_0x411fc1))continue;for(const _0x862d6b of readdirSync(_0x411fc1,{'withFileTypes':!![]})){if(!_0x862d6b[_0x236973(0x1dc)]())continue;const _0x55951f=_0x862d6b[_0x236973(0x200)];if(_0xf6e192&&!_0xf6e192['has'](_0x55951f))continue;if(_0x369c23['has'](_0x55951f))continue;const _0x4ed6e7=resolve(_0x411fc1,_0x55951f),_0x10a257=readMetadataIfPresent(resolve(_0x4ed6e7,METADATA_FILE));if(_0x10a257?.[_0x236973(0x1ed)]!==_0x370555[_0x236973(0x1ed)]||_0x10a257[_0x236973(0x203)]!==_0x225432||_0x10a257[_0x236973(0x202)]!==_0x55951f){_0x3051de[_0x236973(0x1e0)]({'path':_0x4ed6e7,'action':_0x236973(0x205),'reason':_0x236973(0x1f8)});continue;}removeSync(_0x4ed6e7),_0x3051de[_0x236973(0x1e0)]({'path':_0x4ed6e7,'action':'removed'});}}return _0x3051de;}export function linkGlobalRuntimeSkills(_0x1a8f29,_0x4bdad8={}){const _0x5efd36=a106_0x23b9,_0x2f9374=resolveSkillSyncPaths(_0x4bdad8),_0x49c050=[];for(const _0x3cf00b of _0x1a8f29){if(_0x3cf00b[_0x5efd36(0x203)]!==_0x5efd36(0x1f2))throw CliErrors[_0x5efd36(0x1d9)](_0x5efd36(0x1d8)+_0x3cf00b[_0x5efd36(0x203)]);const _0x707c47=requireSkillCode(_0x3cf00b[_0x5efd36(0x1eb)]),_0x1f2fb9=copyManagedSkillDirectory(_0x3cf00b[_0x5efd36(0x1d5)],resolve(_0x2f9374[_0x5efd36(0x1e4)],_0x707c47));_0x49c050[_0x5efd36(0x1e0)]({..._0x1f2fb9,'contentHash':_0x3cf00b['contentHash']});}return _0x49c050;}function ensureManagedSymlink(_0x198058,_0x7dda01,_0x10be73){const _0x3232c7=a106_0x23b9;mkdirSync(dirname(_0x198058),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x198058)||isDanglingSymlink(_0x198058)){const _0x6565fc=lstatSync(_0x198058);if(!_0x6565fc[_0x3232c7(0x1f7)]())throw CliErrors[_0x3232c7(0x1d9)](_0x3232c7(0x1e9)+_0x198058);const _0x30b61e=resolveSymlinkTarget(_0x198058);if(!isPathInside(realOrResolved(_0x30b61e),realOrResolved(_0x10be73)))throw CliErrors[_0x3232c7(0x1d9)](_0x3232c7(0x1db)+_0x198058);if(realOrResolved(_0x30b61e)===realOrResolved(_0x7dda01))return{'path':_0x198058,'target':_0x7dda01,'action':_0x3232c7(0x1e3)};return unlinkSync(_0x198058),symlinkSync(_0x7dda01,_0x198058,_0x3232c7(0x1d5)),{'path':_0x198058,'target':_0x7dda01,'action':_0x3232c7(0x1d4)};}return symlinkSync(_0x7dda01,_0x198058,_0x3232c7(0x1d5)),{'path':_0x198058,'target':_0x7dda01,'action':_0x3232c7(0x1fb)};}function managedAppSkillLinkPaths(_0x1ab454,_0x38d908){const _0x3edab0=a106_0x23b9;if(!existsSync(_0x1ab454))return[];const _0x30d46f=_0x38d908+'--';return readdirSync(_0x1ab454,{'withFileTypes':!![]})[_0x3edab0(0x1e7)](_0x3c2c4a=>_0x3c2c4a['name']['startsWith'](_0x30d46f))[_0x3edab0(0x1e6)](_0xef8df=>resolve(_0x1ab454,_0xef8df[_0x3edab0(0x200)]));}function removeManagedSkillLink(_0x5e2761,_0x447394){const _0x52f499=a106_0x23b9,_0x52a4dd=lstatIfPresent(_0x5e2761);if(!_0x52a4dd?.[_0x52f499(0x1f7)]())return{'path':_0x5e2761,'action':_0x52f499(0x205),'reason':'not-managed-symlink'};const _0x2ee6cf=resolveSymlinkTarget(_0x5e2761);if(!isPathInside(realOrResolved(_0x2ee6cf),realOrResolved(_0x447394)))return{'path':_0x5e2761,'action':_0x52f499(0x205),'reason':_0x52f499(0x1e1)};return unlinkSync(_0x5e2761),{'path':_0x5e2761,'action':'removed'};}export function copyManagedSkillDirectory(_0x8feeec,_0x43faee){const _0x2c3fe1=a106_0x23b9,_0x137c83=resolve(_0x43faee,METADATA_FILE),_0x31faa7=existsSync(_0x43faee);if(_0x31faa7){const _0xbabc99=lstatSync(_0x43faee);if(_0xbabc99[_0x2c3fe1(0x1f7)]())throw CliErrors['validation'](_0x2c3fe1(0x204)+_0x43faee);if(!_0xbabc99[_0x2c3fe1(0x1dc)]())throw CliErrors[_0x2c3fe1(0x1d9)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x43faee);const _0x4fd40d=readMetadataIfPresent(_0x137c83);if(_0x4fd40d?.[_0x2c3fe1(0x203)]!==_0x2c3fe1(0x1f2))throw CliErrors[_0x2c3fe1(0x1d9)](_0x2c3fe1(0x1f9)+_0x43faee);}ensureDirSync(dirname(_0x43faee));const _0x84b6a0=_0x31faa7?readMetadataIfPresent(_0x137c83)?.['contentHash']:undefined,_0xefb08f=readMetadataIfPresent(resolve(_0x8feeec,METADATA_FILE))?.[_0x2c3fe1(0x1e8)];return _0x31faa7&&removeSync(_0x43faee),copySkillDirectory(_0x8feeec,_0x43faee),{'path':_0x43faee,'target':_0x8feeec,'action':!_0x31faa7?_0x2c3fe1(0x1fb):_0x84b6a0===_0xefb08f?'unchanged':_0x2c3fe1(0x1d4)};}function copySkillDirectory(_0x3cb04c,_0x45652d){copySync(_0x3cb04c,_0x45652d,{'dereference':![],'overwrite':!![],'filter'(_0x3f871d){const _0xeeb1ba=a106_0x23b9;if(lstatSync(_0x3f871d)[_0xeeb1ba(0x1f7)]())throw CliErrors[_0xeeb1ba(0x1d9)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x3f871d);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x1344d2,_0x1863fd){const _0x1f8aaa=a107_0x2fdb,_0x24f027=_0x1344d2();while(!![]){try{const _0x236e9f=-parseInt(_0x1f8aaa(0xaa))/0x1*(parseInt(_0x1f8aaa(0xa6))/0x2)+-parseInt(_0x1f8aaa(0xa5))/0x3*(parseInt(_0x1f8aaa(0x9a))/0x4)+parseInt(_0x1f8aaa(0xab))/0x5+parseInt(_0x1f8aaa(0x82))/0x6+-parseInt(_0x1f8aaa(0xa4))/0x7*(parseInt(_0x1f8aaa(0x98))/0x8)+parseInt(_0x1f8aaa(0x97))/0x9*(parseInt(_0x1f8aaa(0x99))/0xa)+-parseInt(_0x1f8aaa(0x90))/0xb;if(_0x236e9f===_0x1863fd)break;else _0x24f027['push'](_0x24f027['shift']());}catch(_0x25da23){_0x24f027['push'](_0x24f027['shift']());}}}(a107_0x4b4d,0x9830c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a107_0x4b4d(){const _0xc5a28=['tags','local','9jATEUO','1720nrvCbO','7762360erzuMr','4iFMOZx','includes','push','linkedPaths','sort','code','from','get','localeCompare','appCode','4858hEyzxb','2096769BfOEsr','4SYVDHp','isSymbolicLink','name','env','232474aIFMsp','5806715jnhIEJ','7265394QLbXMQ','trim','scopes','map','startsWith','has','scope','source','metadataPath','skillCode','isDirectory','cache','values','cacheDir','13332275cujxhF','dir','skillMdPath','filter','accessKey'];a107_0x4b4d=function(){return _0xc5a28;};return a107_0x4b4d();}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x22bba5,_0x5bd8a0={}){const _0x27b85c=a107_0x2fdb,_0x1e6288=safePathSegment(_0x22bba5[_0x27b85c(0xa3)],_0x27b85c(0xa3)),_0x97b9c5=normalizeRuntimeSkillScopes(_0x22bba5[_0x27b85c(0x84)]),_0x5f4576=new Set(_0x97b9c5),_0x4402a9=_0x22bba5[_0x27b85c(0x9f)]?.['trim'](),_0x29b216=new Map(),_0x5c1d42=resolve(getRuntimeSkillCacheRoot(_0x22bba5[_0x27b85c(0xa9)],_0x22bba5[_0x27b85c(0x94)],_0x5bd8a0),_0x1e6288);for(const _0x3cdb0f of _0x97b9c5){for(const _0x4f6699 of localSkillEntryDirs(resolve(_0x5c1d42,_0x3cdb0f))){collectLocalRuntimeSkill(_0x29b216,_0x4f6699,{'appCode':_0x1e6288,'scopes':_0x5f4576,'code':_0x4402a9,'source':'cache'});}}const _0x482c0e=resolveSkillSyncPaths(_0x5bd8a0);for(const _0x4ccf69 of runtimeAgentSkillRoots(_0x482c0e)){for(const _0x5148e3 of localSkillLinkCandidates(_0x4ccf69,_0x1e6288,_0x5f4576)){collectLocalRuntimeSkill(_0x29b216,_0x5148e3,{'appCode':_0x1e6288,'scopes':_0x5f4576,'code':_0x4402a9,'source':'link','linkedPath':_0x5148e3});}}return Array[_0x27b85c(0xa0)](_0x29b216[_0x27b85c(0x8e)]())['sort'](compareLocalRuntimeSkills);}function a107_0x2fdb(_0x2b5d9a,_0x4d353a){_0x2b5d9a=_0x2b5d9a-0x82;const _0x4b4d2c=a107_0x4b4d();let _0x2fdbfa=_0x4b4d2c[_0x2b5d9a];return _0x2fdbfa;}function localSkillEntryDirs(_0x17f004){const _0x597d7e=a107_0x2fdb;if(!existsSync(_0x17f004))return[];return readdirSync(_0x17f004,{'withFileTypes':!![]})[_0x597d7e(0x93)](_0x318c77=>_0x318c77[_0x597d7e(0x8c)]()||_0x318c77[_0x597d7e(0xa7)]())[_0x597d7e(0x85)](_0xcea646=>resolve(_0x17f004,_0xcea646['name']));}function localSkillLinkCandidates(_0x145477,_0x5235ce,_0x191b34){const _0x32eb63=a107_0x2fdb;if(!existsSync(_0x145477))return[];const _0x305a30=_0x5235ce+'--';return readdirSync(_0x145477,{'withFileTypes':!![]})[_0x32eb63(0x93)](_0x48cdcc=>_0x48cdcc[_0x32eb63(0x8c)]()||_0x48cdcc[_0x32eb63(0xa7)]())[_0x32eb63(0x93)](_0x4bb6d6=>_0x4bb6d6[_0x32eb63(0xa8)][_0x32eb63(0x86)](_0x305a30)||_0x191b34[_0x32eb63(0x87)]('builtin'))[_0x32eb63(0x85)](_0x7fba9e=>resolve(_0x145477,_0x7fba9e[_0x32eb63(0xa8)]));}function collectLocalRuntimeSkill(_0x44b7e7,_0x11fd23,_0x2d36c8){const _0x3e0f6e=a107_0x2fdb,_0x1f5188=resolve(_0x11fd23,METADATA_FILE),_0x47f1f4=readMetadataIfPresent(_0x1f5188);if(!_0x47f1f4)return;if(_0x47f1f4[_0x3e0f6e(0xa3)]!==_0x2d36c8['appCode'])return;if(!isRuntimeSkillScope(_0x47f1f4[_0x3e0f6e(0x88)])||!_0x2d36c8['scopes']['has'](_0x47f1f4['scope']))return;const _0x1b45e0=_0x47f1f4[_0x3e0f6e(0x8b)]?.[_0x3e0f6e(0x83)]();if(!_0x1b45e0)return;if(_0x2d36c8[_0x3e0f6e(0x9f)]&&_0x1b45e0!==_0x2d36c8[_0x3e0f6e(0x9f)])return;const _0x40291d=_0x47f1f4[_0x3e0f6e(0x88)]+':'+_0x1b45e0,_0x26e303=_0x2d36c8['linkedPath']?[_0x2d36c8['linkedPath']]:[],_0x1a157b=_0x44b7e7[_0x3e0f6e(0xa1)](_0x40291d);if(_0x1a157b){_0x2d36c8[_0x3e0f6e(0x89)]===_0x3e0f6e(0x8d)&&(_0x1a157b[_0x3e0f6e(0x91)]=_0x11fd23,_0x1a157b[_0x3e0f6e(0x8f)]=_0x11fd23,_0x1a157b[_0x3e0f6e(0x92)]=resolve(_0x11fd23,SKILL_FILE),_0x1a157b[_0x3e0f6e(0x8a)]=_0x1f5188);for(const _0x347132 of _0x26e303){!_0x1a157b[_0x3e0f6e(0x9d)][_0x3e0f6e(0x9b)](_0x347132)&&_0x1a157b[_0x3e0f6e(0x9d)][_0x3e0f6e(0x9c)](_0x347132);}_0x1a157b['linkedPaths'][_0x3e0f6e(0x9e)]();return;}_0x44b7e7['set'](_0x40291d,{..._0x47f1f4,'tags':Array['isArray'](_0x47f1f4[_0x3e0f6e(0x95)])?_0x47f1f4[_0x3e0f6e(0x95)]:[],'scope':_0x47f1f4['scope'],'source':_0x3e0f6e(0x96),'dir':_0x11fd23,'cacheDir':_0x2d36c8[_0x3e0f6e(0x89)]===_0x3e0f6e(0x8d)?_0x11fd23:undefined,'skillMdPath':resolve(_0x11fd23,SKILL_FILE),'metadataPath':_0x1f5188,'linkedPaths':_0x26e303});}function compareLocalRuntimeSkills(_0x242584,_0x53c7dd){const _0x187634=a107_0x2fdb,_0x9cf65c={'personal':0x0,'company':0x1,'builtin':0x2};return _0x9cf65c[_0x242584[_0x187634(0x88)]]-_0x9cf65c[_0x53c7dd[_0x187634(0x88)]]||_0x242584[_0x187634(0x8b)][_0x187634(0xa2)](_0x53c7dd['skillCode'])||_0x242584['dir'][_0x187634(0xa2)](_0x53c7dd[_0x187634(0x91)]);}
1
+ function a107_0x248d(_0x1fdb08,_0x45f4b0){_0x1fdb08=_0x1fdb08-0xbb;const _0x1ac33f=a107_0x1ac3();let _0x248dad=_0x1ac33f[_0x1fdb08];return _0x248dad;}(function(_0x2a691e,_0x2c2e9e){const _0x23cbff=a107_0x248d,_0x106063=_0x2a691e();while(!![]){try{const _0x3feae3=-parseInt(_0x23cbff(0xe5))/0x1*(-parseInt(_0x23cbff(0xc4))/0x2)+parseInt(_0x23cbff(0xd9))/0x3+-parseInt(_0x23cbff(0xcf))/0x4+parseInt(_0x23cbff(0xd0))/0x5*(parseInt(_0x23cbff(0xc2))/0x6)+-parseInt(_0x23cbff(0xdd))/0x7*(-parseInt(_0x23cbff(0xc3))/0x8)+parseInt(_0x23cbff(0xe6))/0x9+-parseInt(_0x23cbff(0xc1))/0xa;if(_0x3feae3===_0x2c2e9e)break;else _0x106063['push'](_0x106063['shift']());}catch(_0x3c77c4){_0x106063['push'](_0x106063['shift']());}}}(a107_0x1ac3,0x2e32d));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a107_0x1ac3(){const _0x3a1c26=['startsWith','1245068hwhMPw','10zhrlkf','skillCode','name','source','map','localeCompare','trim','isArray','scope','347748eSgvvn','env','appCode','isSymbolicLink','3808KcnWtG','accessKey','builtin','filter','has','metadataPath','values','cacheDir','127157OVisbM','3384918AthFZI','local','linkedPath','set','code','scopes','tags','4142190vIKvTh','31452nDpKsH','4192nTxuJb','2GFvsew','push','includes','dir','cache','from','sort','linkedPaths','isDirectory','skillMdPath'];a107_0x1ac3=function(){return _0x3a1c26;};return a107_0x1ac3();}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x8f07c0,_0x3f0e50={}){const _0x55904e=a107_0x248d,_0x2cc72f=safePathSegment(_0x8f07c0[_0x55904e(0xdb)],_0x55904e(0xdb)),_0x3c7b95=normalizeRuntimeSkillScopes(_0x8f07c0['scopes']),_0xc11680=new Set(_0x3c7b95),_0x21051d=_0x8f07c0[_0x55904e(0xbe)]?.[_0x55904e(0xd6)](),_0x3344da=new Map(),_0x382125=resolve(getRuntimeSkillCacheRoot(_0x8f07c0[_0x55904e(0xda)],_0x8f07c0[_0x55904e(0xde)],_0x3f0e50),_0x2cc72f);for(const _0x229c8a of _0x3c7b95){for(const _0x2ebe8a of localSkillEntryDirs(resolve(_0x382125,_0x229c8a))){collectLocalRuntimeSkill(_0x3344da,_0x2ebe8a,{'appCode':_0x2cc72f,'scopes':_0xc11680,'code':_0x21051d,'source':_0x55904e(0xc8)});}}const _0x2dd4b7=resolveSkillSyncPaths(_0x3f0e50);for(const _0x15a000 of runtimeAgentSkillRoots(_0x2dd4b7)){for(const _0x36ceb8 of localSkillLinkCandidates(_0x15a000,_0x2cc72f,_0xc11680)){collectLocalRuntimeSkill(_0x3344da,_0x36ceb8,{'appCode':_0x2cc72f,'scopes':_0xc11680,'code':_0x21051d,'source':'link','linkedPath':_0x36ceb8});}}return Array[_0x55904e(0xc9)](_0x3344da[_0x55904e(0xe3)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2a4741){const _0xf8c94d=a107_0x248d;if(!existsSync(_0x2a4741))return[];return readdirSync(_0x2a4741,{'withFileTypes':!![]})[_0xf8c94d(0xe0)](_0x4b76ad=>_0x4b76ad[_0xf8c94d(0xcc)]()||_0x4b76ad['isSymbolicLink']())[_0xf8c94d(0xd4)](_0x254620=>resolve(_0x2a4741,_0x254620[_0xf8c94d(0xd2)]));}function localSkillLinkCandidates(_0x532c46,_0x4ba9e2,_0x1b6c22){const _0x50782e=a107_0x248d;if(!existsSync(_0x532c46))return[];const _0x5ce4e8=_0x4ba9e2+'--';return readdirSync(_0x532c46,{'withFileTypes':!![]})[_0x50782e(0xe0)](_0x1c3628=>_0x1c3628[_0x50782e(0xcc)]()||_0x1c3628[_0x50782e(0xdc)]())[_0x50782e(0xe0)](_0x55fa8b=>_0x55fa8b['name'][_0x50782e(0xce)](_0x5ce4e8)||_0x1b6c22[_0x50782e(0xe1)](_0x50782e(0xdf)))[_0x50782e(0xd4)](_0x4f0acd=>resolve(_0x532c46,_0x4f0acd[_0x50782e(0xd2)]));}function collectLocalRuntimeSkill(_0x18a1de,_0x34001b,_0xa2556c){const _0x479211=a107_0x248d,_0x9caa1f=resolve(_0x34001b,METADATA_FILE),_0x459fa2=readMetadataIfPresent(_0x9caa1f);if(!_0x459fa2)return;if(_0x459fa2[_0x479211(0xdb)]!==_0xa2556c[_0x479211(0xdb)])return;if(!isRuntimeSkillScope(_0x459fa2[_0x479211(0xd8)])||!_0xa2556c[_0x479211(0xbf)][_0x479211(0xe1)](_0x459fa2[_0x479211(0xd8)]))return;const _0x31ef0c=_0x459fa2[_0x479211(0xd1)]?.[_0x479211(0xd6)]();if(!_0x31ef0c)return;if(_0xa2556c[_0x479211(0xbe)]&&_0x31ef0c!==_0xa2556c['code'])return;const _0x53e712=_0x459fa2[_0x479211(0xd8)]+':'+_0x31ef0c,_0x29246b=_0xa2556c[_0x479211(0xbc)]?[_0xa2556c[_0x479211(0xbc)]]:[],_0x41dff6=_0x18a1de['get'](_0x53e712);if(_0x41dff6){_0xa2556c[_0x479211(0xd3)]==='cache'&&(_0x41dff6[_0x479211(0xc7)]=_0x34001b,_0x41dff6[_0x479211(0xe4)]=_0x34001b,_0x41dff6[_0x479211(0xcd)]=resolve(_0x34001b,SKILL_FILE),_0x41dff6[_0x479211(0xe2)]=_0x9caa1f);for(const _0x4e21ee of _0x29246b){!_0x41dff6['linkedPaths'][_0x479211(0xc6)](_0x4e21ee)&&_0x41dff6[_0x479211(0xcb)][_0x479211(0xc5)](_0x4e21ee);}_0x41dff6['linkedPaths'][_0x479211(0xca)]();return;}_0x18a1de[_0x479211(0xbd)](_0x53e712,{..._0x459fa2,'tags':Array[_0x479211(0xd7)](_0x459fa2[_0x479211(0xc0)])?_0x459fa2[_0x479211(0xc0)]:[],'scope':_0x459fa2[_0x479211(0xd8)],'source':_0x479211(0xbb),'dir':_0x34001b,'cacheDir':_0xa2556c[_0x479211(0xd3)]===_0x479211(0xc8)?_0x34001b:undefined,'skillMdPath':resolve(_0x34001b,SKILL_FILE),'metadataPath':_0x9caa1f,'linkedPaths':_0x29246b});}function compareLocalRuntimeSkills(_0x28dbc4,_0x2117d0){const _0x8897ed=a107_0x248d,_0x2ca249={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2ca249[_0x28dbc4[_0x8897ed(0xd8)]]-_0x2ca249[_0x2117d0['scope']]||_0x28dbc4[_0x8897ed(0xd1)][_0x8897ed(0xd5)](_0x2117d0[_0x8897ed(0xd1)])||_0x28dbc4['dir'][_0x8897ed(0xd5)](_0x2117d0['dir']);}
@@ -1 +1 @@
1
- (function(_0x35eb2b,_0x25e414){const _0x50345c=a108_0x2917,_0x599cfe=_0x35eb2b();while(!![]){try{const _0x4a9376=parseInt(_0x50345c(0x145))/0x1+parseInt(_0x50345c(0x126))/0x2*(parseInt(_0x50345c(0x141))/0x3)+parseInt(_0x50345c(0x14f))/0x4+parseInt(_0x50345c(0x13c))/0x5*(-parseInt(_0x50345c(0x12b))/0x6)+-parseInt(_0x50345c(0x13b))/0x7*(-parseInt(_0x50345c(0x142))/0x8)+parseInt(_0x50345c(0x140))/0x9*(parseInt(_0x50345c(0x124))/0xa)+-parseInt(_0x50345c(0x129))/0xb*(parseInt(_0x50345c(0x138))/0xc);if(_0x4a9376===_0x25e414)break;else _0x599cfe['push'](_0x599cfe['shift']());}catch(_0x28275e){_0x599cfe['push'](_0x599cfe['shift']());}}}(a108_0x5acc,0xc61e0));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(_0x5bed79){const _0x5d1e12=a108_0x2917;return _0x5bed79[_0x5d1e12(0x13f)]??Buffer[_0x5d1e12(0x14c)](_0x5bed79[_0x5d1e12(0x13a)]??'',_0x5d1e12(0x12a));}export function fileText(_0x255b55){const _0x7c9b4=a108_0x2917;return fileContent(_0x255b55)[_0x7c9b4(0x14a)](_0x7c9b4(0x12a));}export function normalizeLocalFiles(_0x23d6ee){const _0x511197=a108_0x2917;if(!Array['isArray'](_0x23d6ee)||_0x23d6ee[_0x511197(0x13d)]===0x0)return[];const _0x551bd1=new Map();for(const _0x3e66fd of _0x23d6ee){if(!_0x3e66fd||typeof _0x3e66fd!=='object'||typeof _0x3e66fd[_0x511197(0x148)]!==_0x511197(0x143))throw CliErrors[_0x511197(0x14b)](_0x511197(0x133));const _0x21972d=normalizeSkillRelativePath(_0x3e66fd[_0x511197(0x148)]);if(_0x551bd1[_0x511197(0x136)](_0x21972d))throw CliErrors[_0x511197(0x14b)](_0x511197(0x128)+_0x21972d);if(_0x3e66fd[_0x511197(0x13f)]!==undefined&&!Buffer[_0x511197(0x135)](_0x3e66fd[_0x511197(0x13f)]))throw CliErrors['validation'](_0x511197(0x123)+_0x21972d);if(_0x3e66fd[_0x511197(0x13f)]===undefined&&typeof _0x3e66fd['content']!==_0x511197(0x143))throw CliErrors[_0x511197(0x14b)](_0x511197(0x127)+_0x21972d);const _0x39184d=fileContent(_0x3e66fd);_0x551bd1[_0x511197(0x13e)](_0x21972d,{'path':_0x21972d,'bytes':_0x39184d});}return Array['from'](_0x551bd1[_0x511197(0x130)]())[_0x511197(0x146)](compareSkillFiles);}export function normalizeManifestFiles(_0x2b2ccb){const _0x3cd84b=a108_0x2917;if(!Array['isArray'](_0x2b2ccb)||_0x2b2ccb[_0x3cd84b(0x13d)]===0x0)return[];const _0x509196=new Map();for(const _0x35fe99 of _0x2b2ccb){if(!_0x35fe99||typeof _0x35fe99!=='object'||typeof _0x35fe99['path']!==_0x3cd84b(0x143))throw CliErrors[_0x3cd84b(0x14b)](_0x3cd84b(0x133));const _0x2b71d3=normalizeSkillRelativePath(_0x35fe99['path']);if(_0x509196[_0x3cd84b(0x136)](_0x2b71d3))throw CliErrors[_0x3cd84b(0x14b)](_0x3cd84b(0x128)+_0x2b71d3);if(!isSha256Hex(_0x35fe99['sha256']))throw CliErrors[_0x3cd84b(0x14b)](_0x3cd84b(0x144)+_0x2b71d3);if(!Number[_0x3cd84b(0x12e)](_0x35fe99[_0x3cd84b(0x134)])||_0x35fe99[_0x3cd84b(0x134)]<0x0)throw CliErrors[_0x3cd84b(0x14b)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x2b71d3);_0x509196['set'](_0x2b71d3,{'path':_0x2b71d3,'sha256':_0x35fe99['sha256']['toLowerCase'](),'size':_0x35fe99[_0x3cd84b(0x134)]});}return Array[_0x3cd84b(0x14c)](_0x509196[_0x3cd84b(0x130)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x552d56){const _0x53b691=realpathSync(_0x552d56),_0x10a786=[];function _0x38faf4(_0x15e4b8){const _0x5562ef=a108_0x2917,_0x465e1d=readdirSync(_0x15e4b8,{'withFileTypes':!![]})['sort']((_0x569fcb,_0x412f76)=>_0x569fcb[_0x5562ef(0x147)]['localeCompare'](_0x412f76[_0x5562ef(0x147)]));for(const _0x545d8f of _0x465e1d){if(_0x545d8f[_0x5562ef(0x125)]()&&IGNORED_DIR_NAMES['has'](_0x545d8f['name']))continue;if(IGNORED_FILE_NAMES[_0x5562ef(0x136)](_0x545d8f[_0x5562ef(0x147)]))continue;const _0x5105e4=resolve(_0x15e4b8,_0x545d8f['name']);if(_0x545d8f[_0x5562ef(0x12f)]())throw CliErrors[_0x5562ef(0x14b)](_0x5562ef(0x132)+_0x5105e4);const _0x5a2a89=toPosixPath(relative(_0x53b691,_0x5105e4));if(_0x545d8f[_0x5562ef(0x125)]()){_0x38faf4(_0x5105e4);continue;}if(!_0x545d8f['isFile']())continue;validateSkillRelativePath(_0x5a2a89);const _0x5e7ad5=readFileSync(_0x5105e4);_0x10a786[_0x5562ef(0x139)]({'path':_0x5a2a89,'bytes':_0x5e7ad5});}}return _0x38faf4(_0x53b691),normalizeLocalFiles(_0x10a786);}export function compareSkillFiles(_0x379e59,_0x34d773){const _0x1da773=a108_0x2917;if(_0x379e59[_0x1da773(0x148)]===SKILL_FILE)return _0x34d773[_0x1da773(0x148)]===SKILL_FILE?0x0:-0x1;if(_0x34d773['path']===SKILL_FILE)return 0x1;return Buffer[_0x1da773(0x131)](Buffer[_0x1da773(0x14c)](_0x379e59[_0x1da773(0x148)],'utf8'),Buffer[_0x1da773(0x14c)](_0x34d773['path'],'utf8'));}function a108_0x2917(_0x4a70e5,_0x51c3a1){_0x4a70e5=_0x4a70e5-0x123;const _0x5acce0=a108_0x5acc();let _0x2917f5=_0x5acce0[_0x4a70e5];return _0x2917f5;}function a108_0x5acc(){const _0x9444a6=['2590528girJlN','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','6634160vhbvYj','isDirectory','3104326scLiuX','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Duplicate\x20Skill\x20file\x20path:\x20','23218459tnYjYo','utf8','1650KUVELr','includes','startsWith','isSafeInteger','isSymbolicLink','values','compare','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','Skill\x20file\x20path\x20must\x20be\x20text.','size','isBuffer','has','split','12WhxbOf','push','content','84CkvylT','18465surVuX','length','set','bytes','9UrsMBC','3IFIvlB','537912BtoMya','string','Skill\x20file\x20sha256\x20is\x20invalid:\x20','267753wFKYsV','sort','name','path','Unsafe\x20Skill\x20file\x20path:\x20','toString','validation','from','test','replace'];a108_0x5acc=function(){return _0x9444a6;};return a108_0x5acc();}export function normalizeSkillRelativePath(_0xd103a8){const _0x27ae84=toPosixPath(_0xd103a8['trim']());return validateSkillRelativePath(_0x27ae84),_0x27ae84;}export function validateSkillRelativePath(_0x157515){const _0x3775fb=a108_0x2917;if(!_0x157515||_0x157515[_0x3775fb(0x12d)]('/')||_0x157515[_0x3775fb(0x12c)]('//'))throw CliErrors[_0x3775fb(0x14b)](_0x3775fb(0x149)+_0x157515);for(const _0x19ad6f of _0x157515[_0x3775fb(0x137)]('/')){if(!_0x19ad6f||_0x19ad6f==='.'||_0x19ad6f==='..')throw CliErrors[_0x3775fb(0x14b)](_0x3775fb(0x149)+_0x157515);}}export function toPosixPath(_0x44d765){const _0x57c0fa=a108_0x2917;return _0x44d765[_0x57c0fa(0x14e)](/\\/g,'/');}export function isSha256Hex(_0x275b69){const _0x504d93=a108_0x2917;return typeof _0x275b69===_0x504d93(0x143)&&/^[a-fA-F0-9]{64}$/[_0x504d93(0x14d)](_0x275b69);}
1
+ (function(_0xd7c86c,_0x14e881){const _0x4a17bb=a108_0x41c5,_0x3a5dfd=_0xd7c86c();while(!![]){try{const _0x426f63=-parseInt(_0x4a17bb(0x169))/0x1*(-parseInt(_0x4a17bb(0x14a))/0x2)+-parseInt(_0x4a17bb(0x148))/0x3*(parseInt(_0x4a17bb(0x161))/0x4)+parseInt(_0x4a17bb(0x145))/0x5*(parseInt(_0x4a17bb(0x152))/0x6)+parseInt(_0x4a17bb(0x16a))/0x7+-parseInt(_0x4a17bb(0x164))/0x8+-parseInt(_0x4a17bb(0x143))/0x9+-parseInt(_0x4a17bb(0x141))/0xa*(parseInt(_0x4a17bb(0x14d))/0xb);if(_0x426f63===_0x14e881)break;else _0x3a5dfd['push'](_0x3a5dfd['shift']());}catch(_0x34b9f0){_0x3a5dfd['push'](_0x3a5dfd['shift']());}}}(a108_0x2ee7,0x87d42));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(_0x65db6d){const _0x363f0a=a108_0x41c5;return _0x65db6d['bytes']??Buffer[_0x363f0a(0x168)](_0x65db6d['content']??'','utf8');}export function fileText(_0xc1032e){const _0x57cd0b=a108_0x41c5;return fileContent(_0xc1032e)['toString'](_0x57cd0b(0x14e));}function a108_0x2ee7(){const _0x588d2e=['152670jzGEDv','size','bytes','1197102voFnIT','name','216760iqFJnk','test','toLowerCase','11gtBcJz','utf8','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','sort','126AxloFw','values','split','Skill\x20file\x20sha256\x20is\x20invalid:\x20','isArray','isSymbolicLink','Unsafe\x20Skill\x20file\x20path:\x20','object','isBuffer','isDirectory','Duplicate\x20Skill\x20file\x20path:\x20','compare','startsWith','includes','path','4JVhdll','has','length','562752fYIAHI','set','isSafeInteger','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','from','3NXTeJl','7741636mcbiKV','validation','push','3477170WgCTpH','string','6289677JtNPvX','Skill\x20file\x20size\x20is\x20invalid:\x20'];a108_0x2ee7=function(){return _0x588d2e;};return a108_0x2ee7();}export function normalizeLocalFiles(_0x152e7d){const _0x9dbc2d=a108_0x41c5;if(!Array[_0x9dbc2d(0x156)](_0x152e7d)||_0x152e7d[_0x9dbc2d(0x163)]===0x0)return[];const _0x19c55f=new Map();for(const _0x1cf121 of _0x152e7d){if(!_0x1cf121||typeof _0x1cf121!==_0x9dbc2d(0x159)||typeof _0x1cf121[_0x9dbc2d(0x160)]!==_0x9dbc2d(0x142))throw CliErrors[_0x9dbc2d(0x16b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x530cdf=normalizeSkillRelativePath(_0x1cf121['path']);if(_0x19c55f['has'](_0x530cdf))throw CliErrors['validation'](_0x9dbc2d(0x15c)+_0x530cdf);if(_0x1cf121['bytes']!==undefined&&!Buffer[_0x9dbc2d(0x15a)](_0x1cf121[_0x9dbc2d(0x147)]))throw CliErrors[_0x9dbc2d(0x16b)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x530cdf);if(_0x1cf121[_0x9dbc2d(0x147)]===undefined&&typeof _0x1cf121['content']!==_0x9dbc2d(0x142))throw CliErrors[_0x9dbc2d(0x16b)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x530cdf);const _0x2bc971=fileContent(_0x1cf121);_0x19c55f[_0x9dbc2d(0x165)](_0x530cdf,{'path':_0x530cdf,'bytes':_0x2bc971});}return Array['from'](_0x19c55f['values']())[_0x9dbc2d(0x151)](compareSkillFiles);}export function normalizeManifestFiles(_0x33efaf){const _0x1e0490=a108_0x41c5;if(!Array[_0x1e0490(0x156)](_0x33efaf)||_0x33efaf[_0x1e0490(0x163)]===0x0)return[];const _0xa04b65=new Map();for(const _0x36a5f3 of _0x33efaf){if(!_0x36a5f3||typeof _0x36a5f3!=='object'||typeof _0x36a5f3[_0x1e0490(0x160)]!==_0x1e0490(0x142))throw CliErrors[_0x1e0490(0x16b)](_0x1e0490(0x14f));const _0x217772=normalizeSkillRelativePath(_0x36a5f3[_0x1e0490(0x160)]);if(_0xa04b65['has'](_0x217772))throw CliErrors[_0x1e0490(0x16b)](_0x1e0490(0x15c)+_0x217772);if(!isSha256Hex(_0x36a5f3['sha256']))throw CliErrors[_0x1e0490(0x16b)](_0x1e0490(0x155)+_0x217772);if(!Number[_0x1e0490(0x166)](_0x36a5f3[_0x1e0490(0x146)])||_0x36a5f3[_0x1e0490(0x146)]<0x0)throw CliErrors[_0x1e0490(0x16b)](_0x1e0490(0x144)+_0x217772);_0xa04b65[_0x1e0490(0x165)](_0x217772,{'path':_0x217772,'sha256':_0x36a5f3['sha256'][_0x1e0490(0x14c)](),'size':_0x36a5f3[_0x1e0490(0x146)]});}return Array[_0x1e0490(0x168)](_0xa04b65[_0x1e0490(0x153)]())[_0x1e0490(0x151)](compareSkillFiles);}export function scanSkillDirectory(_0x3c6dd8){const _0x1f7b72=realpathSync(_0x3c6dd8),_0x4eee00=[];function _0x1dc728(_0x509c71){const _0xa4d2ce=a108_0x41c5,_0x55b6ec=readdirSync(_0x509c71,{'withFileTypes':!![]})[_0xa4d2ce(0x151)]((_0x286c98,_0x43a9b0)=>_0x286c98['name']['localeCompare'](_0x43a9b0[_0xa4d2ce(0x149)]));for(const _0x2ccaa9 of _0x55b6ec){if(_0x2ccaa9['isDirectory']()&&IGNORED_DIR_NAMES[_0xa4d2ce(0x162)](_0x2ccaa9[_0xa4d2ce(0x149)]))continue;if(IGNORED_FILE_NAMES[_0xa4d2ce(0x162)](_0x2ccaa9[_0xa4d2ce(0x149)]))continue;const _0xd8894b=resolve(_0x509c71,_0x2ccaa9[_0xa4d2ce(0x149)]);if(_0x2ccaa9[_0xa4d2ce(0x157)]())throw CliErrors['validation'](_0xa4d2ce(0x167)+_0xd8894b);const _0x151e2e=toPosixPath(relative(_0x1f7b72,_0xd8894b));if(_0x2ccaa9[_0xa4d2ce(0x15b)]()){_0x1dc728(_0xd8894b);continue;}if(!_0x2ccaa9[_0xa4d2ce(0x150)]())continue;validateSkillRelativePath(_0x151e2e);const _0x397e85=readFileSync(_0xd8894b);_0x4eee00[_0xa4d2ce(0x16c)]({'path':_0x151e2e,'bytes':_0x397e85});}}return _0x1dc728(_0x1f7b72),normalizeLocalFiles(_0x4eee00);}export function compareSkillFiles(_0xd54d92,_0x57dc8a){const _0x1d62a1=a108_0x41c5;if(_0xd54d92[_0x1d62a1(0x160)]===SKILL_FILE)return _0x57dc8a['path']===SKILL_FILE?0x0:-0x1;if(_0x57dc8a['path']===SKILL_FILE)return 0x1;return Buffer[_0x1d62a1(0x15d)](Buffer[_0x1d62a1(0x168)](_0xd54d92[_0x1d62a1(0x160)],_0x1d62a1(0x14e)),Buffer[_0x1d62a1(0x168)](_0x57dc8a[_0x1d62a1(0x160)],_0x1d62a1(0x14e)));}function a108_0x41c5(_0x558c71,_0x3a01da){_0x558c71=_0x558c71-0x141;const _0x2ee7ec=a108_0x2ee7();let _0x41c506=_0x2ee7ec[_0x558c71];return _0x41c506;}export function normalizeSkillRelativePath(_0x12d433){const _0x261201=toPosixPath(_0x12d433['trim']());return validateSkillRelativePath(_0x261201),_0x261201;}export function validateSkillRelativePath(_0x3490da){const _0x5e0e66=a108_0x41c5;if(!_0x3490da||_0x3490da[_0x5e0e66(0x15e)]('/')||_0x3490da[_0x5e0e66(0x15f)]('//'))throw CliErrors[_0x5e0e66(0x16b)](_0x5e0e66(0x158)+_0x3490da);for(const _0x4908ec of _0x3490da[_0x5e0e66(0x154)]('/')){if(!_0x4908ec||_0x4908ec==='.'||_0x4908ec==='..')throw CliErrors[_0x5e0e66(0x16b)](_0x5e0e66(0x158)+_0x3490da);}}export function toPosixPath(_0x5330a2){return _0x5330a2['replace'](/\\/g,'/');}export function isSha256Hex(_0x4c764d){const _0x30de99=a108_0x41c5;return typeof _0x4c764d==='string'&&/^[a-fA-F0-9]{64}$/[_0x30de99(0x14b)](_0x4c764d);}
@@ -1 +1 @@
1
- (function(_0x525398,_0x41d0be){const _0x32441d=a109_0x5043,_0x544a53=_0x525398();while(!![]){try{const _0x4a0f46=-parseInt(_0x32441d(0x1d5))/0x1+parseInt(_0x32441d(0x1c4))/0x2+-parseInt(_0x32441d(0x1c3))/0x3*(-parseInt(_0x32441d(0x1d9))/0x4)+-parseInt(_0x32441d(0x1c9))/0x5+-parseInt(_0x32441d(0x1be))/0x6+-parseInt(_0x32441d(0x1e6))/0x7*(-parseInt(_0x32441d(0x1c7))/0x8)+-parseInt(_0x32441d(0x1dc))/0x9;if(_0x4a0f46===_0x41d0be)break;else _0x544a53['push'](_0x544a53['shift']());}catch(_0x282686){_0x544a53['push'](_0x544a53['shift']());}}}(a109_0x2c1f,0x68578));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';function a109_0x2c1f(){const _0x3f3b55=['Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','3077523nABpmW','contents','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','trim','find','map','join','validation','---\x0a','delete','35ETSnGB','isFile','description','match','trimEnd','errors','test','filter','name','length','utf8','slice','510654OnpGjz','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','.\x20Changed\x20file:\x20','env','paths','17616jZEauW','1331602UbaKpe','Runtime\x20Skill\x20package\x20is\x20missing\x20','replace','125752VlzCnY','description:\x20','229705PVtyXa','contentHash','accessKey','appCode','keys','displayName','skillName','stringify','---','has','path','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','331391FpbFAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','entries','fileHashes','332tJWYxi','set'];a109_0x2c1f=function(){return _0x3f3b55;};return a109_0x2c1f();}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';function a109_0x5043(_0x486233,_0x13d6e9){_0x486233=_0x486233-0x1b8;const _0x2c1fa1=a109_0x2c1f();let _0x5043eb=_0x2c1fa1[_0x486233];return _0x5043eb;}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x4bd8ee,_0x142e54,_0x2b03cd){const _0x408335=a109_0x5043,_0x1c0bdc=requireSkillCode(_0x4bd8ee),_0xe337ce=requirePackageBytes(_0x1c0bdc,_0x2b03cd['packageBytes']),_0x37e897=extractDownloadedPackage(_0xe337ce),_0x168468=_0x37e897[_0x408335(0x1e0)](_0xc1df4f=>_0xc1df4f[_0x408335(0x1d3)]===SKILL_FILE);if(!_0x168468)throw CliErrors[_0x408335(0x1e3)](_0x408335(0x1c5)+SKILL_FILE+':\x20'+_0x1c0bdc);const _0x252535=withMaterializedSkillFrontmatter(_0x37e897,_0x4bd8ee,_0x1c0bdc),_0x10df5a=_0x252535[_0x408335(0x1e0)](_0x3985c6=>_0x3985c6[_0x408335(0x1d3)]===SKILL_FILE),_0x5851c5=fileText(_0x10df5a),_0x4b15b8=getRuntimeSkillDir(_0x2b03cd[_0x408335(0x1c1)],_0x2b03cd[_0x408335(0x1cb)],_0x2b03cd[_0x408335(0x1cc)],_0x142e54,_0x1c0bdc,_0x2b03cd[_0x408335(0x1c2)]),_0x1268ec=resolve(_0x4b15b8,SKILL_FILE),_0x25c5a0=resolve(_0x4b15b8,METADATA_FILE),_0x112872=contentHash(_0x5851c5),_0x3b22c4=readMetadataIfPresent(_0x25c5a0)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x4b15b8,_0x25c5a0,_0x252535,_0x2b03cd['force']===!![]),mkdirSync(_0x4b15b8,{'recursive':!![],'mode':0x1c0});const _0x262a2d=existsSync(_0x1268ec)?readFileSync(_0x1268ec,_0x408335(0x1bc)):undefined;return materializeFiles(_0x4b15b8,_0x252535),removeStaleManagedFiles(_0x4b15b8,_0x3b22c4,_0x252535),writeJsonAtomic(_0x25c5a0,buildMetadata(_0x4bd8ee,_0x142e54,_0x2b03cd['appCode'],_0x112872,_0x2b03cd['pulledAt'],_0x252535,_0xe337ce)),{'skill':_0x4bd8ee,'scope':_0x142e54,'dir':_0x4b15b8,'skillMdPath':_0x1268ec,'metadataPath':_0x25c5a0,'contentHash':_0x112872,'changed':_0x262a2d!==_0x5851c5};}function withMaterializedSkillFrontmatter(_0xf9256c,_0x4998,_0x514200){const _0x17d1d6=a109_0x5043,_0x5baae3=skillDisplayName(_0x4998,_0x514200),_0x48a3ea=_0x4998['description']?.['trim']()||_0x5baae3||_0x514200;return normalizeLocalFiles(_0xf9256c)[_0x17d1d6(0x1e1)](_0x301ecb=>{const _0x1fe972=_0x17d1d6,_0x513edf=fileText(_0x301ecb);if(_0x301ecb[_0x1fe972(0x1d3)]!==SKILL_FILE)return _0x301ecb;if(hasYamlFrontmatter(_0x513edf))return{'path':_0x301ecb[_0x1fe972(0x1d3)],'content':withSyncedDisplayName(_0x513edf,_0x5baae3)};return{'path':_0x301ecb['path'],'content':prependSkillFrontmatter(_0x513edf,{'name':_0x514200,'displayName':_0x5baae3,'description':_0x48a3ea})};});}function hasYamlFrontmatter(_0x3f9e22){const _0x315842=a109_0x5043;return/^\uFEFF?---\s*\r?\n/[_0x315842(0x1b8)](_0x3f9e22);}function prependSkillFrontmatter(_0x538530,_0x1940a3){const _0x15c3fb=a109_0x5043,_0x5345a1=_0x538530[_0x15c3fb(0x1c6)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x1940a3[_0x15c3fb(0x1ba)]),_0x1940a3[_0x15c3fb(0x1ce)]?'displayName:\x20'+yamlString(_0x1940a3[_0x15c3fb(0x1ce)]):undefined,_0x15c3fb(0x1c8)+yamlString(_0x1940a3[_0x15c3fb(0x1e8)]),_0x15c3fb(0x1d1),'',_0x5345a1][_0x15c3fb(0x1b9)](_0x1cad71=>_0x1cad71!==undefined)[_0x15c3fb(0x1e2)]('\x0a');}function yamlString(_0x432cf0){const _0x206151=a109_0x5043;return JSON[_0x206151(0x1d0)](_0x432cf0[_0x206151(0x1c6)](/\r/g,'')[_0x206151(0x1df)]());}function skillDisplayName(_0x5e59a8,_0x569cb0){const _0x4fb433=a109_0x5043,_0x1199a7=_0x5e59a8[_0x4fb433(0x1cf)]?.[_0x4fb433(0x1df)]();return _0x1199a7||_0x569cb0;}function withSyncedDisplayName(_0x44d2e1,_0x535f2a){const _0x17da01=a109_0x5043,_0x5c2ea4=_0x44d2e1[_0x17da01(0x1e9)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5c2ea4)return _0x44d2e1;const _0xaa037d=_0x5c2ea4[0x1]??'',_0x415712=_0x5c2ea4[0x2]??'',_0x11cf25=parseDocument(_0x415712);if(_0x11cf25[_0x17da01(0x1eb)]['length']>0x0||!isMap(_0x11cf25[_0x17da01(0x1dd)]))return _0x44d2e1;if(_0x535f2a)_0x11cf25[_0x17da01(0x1da)](_0x17da01(0x1ce),_0x535f2a);else{if(_0x11cf25[_0x17da01(0x1d2)](_0x17da01(0x1ce)))_0x11cf25[_0x17da01(0x1e5)]('displayName');else return _0x44d2e1;}forceBlockCollections(_0x11cf25[_0x17da01(0x1dd)]);const _0x1e7cf5=_0x11cf25['toString']({'lineWidth':0x0})[_0x17da01(0x1ea)](),_0x1e524f=_0x44d2e1[_0x17da01(0x1bd)](_0x5c2ea4[0x0][_0x17da01(0x1bb)])[_0x17da01(0x1c6)](/^\r?\n/,'');return _0xaa037d+_0x17da01(0x1e4)+_0x1e7cf5+'\x0a---\x0a\x0a'+_0x1e524f;}function forceBlockCollections(_0x5f02c2){if(!isNode(_0x5f02c2))return;visit(_0x5f02c2,(_0x5145f3,_0x1d4370)=>{isCollection(_0x1d4370)&&(_0x1d4370['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x148b0a,_0x5a689f,_0x4033ac,_0x1a5465){const _0x2382d1=a109_0x5043;if(_0x1a5465||!existsSync(_0x5a689f))return;const _0x4b8f5d=readMetadataIfPresent(_0x5a689f);if(!_0x4b8f5d)return;const _0x4d783d=_0x4b8f5d[_0x2382d1(0x1d8)]&&Object['keys'](_0x4b8f5d[_0x2382d1(0x1d8)])['length']>0x0?_0x4b8f5d[_0x2382d1(0x1d8)]:undefined;if(_0x4d783d)for(const [_0x546094,_0xaec870]of Object[_0x2382d1(0x1d7)](_0x4d783d)){const _0x82c2ea=resolveManagedFilePath(_0x148b0a,_0x546094);if(!existsSync(_0x82c2ea))throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x546094);const _0x4c8aaf=lstatSync(_0x82c2ea);if(!_0x4c8aaf[_0x2382d1(0x1e7)]())throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a,_0x2382d1(0x1d4)+_0x546094);const _0x52fec4=bufferSha256(readFileSync(_0x82c2ea));if(_0x52fec4!==_0xaec870)throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a+_0x2382d1(0x1c0)+_0x546094,_0x2382d1(0x1db)+_0x546094);}else{const _0x3b421a=resolve(_0x148b0a,SKILL_FILE);if(existsSync(_0x3b421a)&&_0x4b8f5d[_0x2382d1(0x1ca)]){const _0x5c95a3=contentHash(readFileSync(_0x3b421a,'utf8'));if(_0x5c95a3!==_0x4b8f5d[_0x2382d1(0x1ca)])throw CliErrors[_0x2382d1(0x1e3)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x3b421a,_0x2382d1(0x1d6));}}for(const _0x217cdb of normalizeLocalFiles(_0x4033ac)){if(_0x4d783d?.[_0x217cdb['path']])continue;if(!_0x4d783d&&_0x217cdb[_0x2382d1(0x1d3)]===SKILL_FILE)continue;const _0x54834c=resolveManagedFilePath(_0x148b0a,_0x217cdb[_0x2382d1(0x1d3)]);if(!existsSync(_0x54834c))continue;const _0x47c788=lstatSync(_0x54834c);if(!_0x47c788['isFile']())throw CliErrors[_0x2382d1(0x1e3)](_0x2382d1(0x1bf)+_0x148b0a,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x217cdb[_0x2382d1(0x1d3)]);const _0x608654=bufferSha256(readFileSync(_0x54834c));if(_0x608654!==fileHash(_0x217cdb))throw CliErrors['validation'](_0x2382d1(0x1bf)+_0x148b0a,_0x2382d1(0x1de)+_0x217cdb[_0x2382d1(0x1d3)]);}}function materializeFiles(_0x533187,_0x2afe54){for(const _0x163eb6 of normalizeLocalFiles(_0x2afe54)){const _0x17b26f=resolveManagedFilePath(_0x533187,_0x163eb6['path']);mkdirSync(dirname(_0x17b26f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x17b26f,fileContent(_0x163eb6),0x180);}}function removeStaleManagedFiles(_0x483dfa,_0x4175fe,_0x4db3ff){const _0x1bdc64=a109_0x5043;if(!_0x4175fe)return;const _0x508cc9=new Set(normalizeLocalFiles(_0x4db3ff)['map'](_0x269155=>_0x269155[_0x1bdc64(0x1d3)]));for(const _0x34ff10 of Object[_0x1bdc64(0x1cd)](_0x4175fe)){if(_0x508cc9[_0x1bdc64(0x1d2)](_0x34ff10))continue;const _0x4416ec=resolveManagedFilePath(_0x483dfa,_0x34ff10);existsSync(_0x4416ec)&&lstatSync(_0x4416ec)[_0x1bdc64(0x1e7)]()&&rmSync(_0x4416ec,{'force':!![]});}}
1
+ (function(_0x4736ce,_0x38720f){const _0x167664=a109_0x5a32,_0x3305f0=_0x4736ce();while(!![]){try{const _0x40358c=-parseInt(_0x167664(0xcb))/0x1*(-parseInt(_0x167664(0xaa))/0x2)+-parseInt(_0x167664(0xae))/0x3+parseInt(_0x167664(0xd2))/0x4*(parseInt(_0x167664(0xd9))/0x5)+-parseInt(_0x167664(0xab))/0x6+parseInt(_0x167664(0xd5))/0x7*(parseInt(_0x167664(0xa6))/0x8)+-parseInt(_0x167664(0xac))/0x9*(-parseInt(_0x167664(0xc2))/0xa)+-parseInt(_0x167664(0xcf))/0xb;if(_0x40358c===_0x38720f)break;else _0x3305f0['push'](_0x3305f0['shift']());}catch(_0xaf5ae6){_0x3305f0['push'](_0x3305f0['shift']());}}}(a109_0x3340,0x27d66));function a109_0x3340(){const _0x153575=['path','join','431128JTsrSI','isFile','set','delete','278126bFtKUU','571164DgaHtt','1677213rJnQGw','entries','134064JDAZsB','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','trimEnd','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','fileHashes','find','map','utf8','stringify','name:\x20','packageBytes','filter','trim','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','description:\x20','paths','length','slice','Runtime\x20Skill\x20package\x20is\x20missing\x20','flow','10DVsfwA','contentHash','force','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','test','appCode','displayName','---\x0a','displayName:\x20','2WDbnuZ','description','---','keys','5612915dLZCXB','replace','skillName','10044bqFfiB','match','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','14hNRIRj','name','env','validation','480rQrfIQ','has','toString'];a109_0x3340=function(){return _0x153575;};return a109_0x3340();}import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a109_0x5a32(_0x8a2c7c,_0x27c2fd){_0x8a2c7c=_0x8a2c7c-0xa6;const _0x334013=a109_0x3340();let _0x5a32ba=_0x334013[_0x8a2c7c];return _0x5a32ba;}export function materializeRuntimeSkill(_0x2596ea,_0x3bbc10,_0x1f24c5){const _0x2f14fb=a109_0x5a32,_0x33b60d=requireSkillCode(_0x2596ea),_0x1e9a66=requirePackageBytes(_0x33b60d,_0x1f24c5[_0x2f14fb(0xb8)]),_0x529f2b=extractDownloadedPackage(_0x1e9a66),_0x4db00d=_0x529f2b[_0x2f14fb(0xb3)](_0x37f0c4=>_0x37f0c4[_0x2f14fb(0xdc)]===SKILL_FILE);if(!_0x4db00d)throw CliErrors['validation'](_0x2f14fb(0xc0)+SKILL_FILE+':\x20'+_0x33b60d);const _0xb62ba5=withMaterializedSkillFrontmatter(_0x529f2b,_0x2596ea,_0x33b60d),_0x52071a=_0xb62ba5[_0x2f14fb(0xb3)](_0x13e1ec=>_0x13e1ec[_0x2f14fb(0xdc)]===SKILL_FILE),_0x1cf0f8=fileText(_0x52071a),_0x47202e=getRuntimeSkillDir(_0x1f24c5[_0x2f14fb(0xd7)],_0x1f24c5['accessKey'],_0x1f24c5[_0x2f14fb(0xc7)],_0x3bbc10,_0x33b60d,_0x1f24c5[_0x2f14fb(0xbd)]),_0x854a8c=resolve(_0x47202e,SKILL_FILE),_0x1a7764=resolve(_0x47202e,METADATA_FILE),_0x196de2=contentHash(_0x1cf0f8),_0x43ca0f=readMetadataIfPresent(_0x1a7764)?.[_0x2f14fb(0xb2)];ensurePulledFilesCanBeOverwritten(_0x47202e,_0x1a7764,_0xb62ba5,_0x1f24c5[_0x2f14fb(0xc4)]===!![]),mkdirSync(_0x47202e,{'recursive':!![],'mode':0x1c0});const _0x3c38bb=existsSync(_0x854a8c)?readFileSync(_0x854a8c,'utf8'):undefined;return materializeFiles(_0x47202e,_0xb62ba5),removeStaleManagedFiles(_0x47202e,_0x43ca0f,_0xb62ba5),writeJsonAtomic(_0x1a7764,buildMetadata(_0x2596ea,_0x3bbc10,_0x1f24c5[_0x2f14fb(0xc7)],_0x196de2,_0x1f24c5['pulledAt'],_0xb62ba5,_0x1e9a66)),{'skill':_0x2596ea,'scope':_0x3bbc10,'dir':_0x47202e,'skillMdPath':_0x854a8c,'metadataPath':_0x1a7764,'contentHash':_0x196de2,'changed':_0x3c38bb!==_0x1cf0f8};}function withMaterializedSkillFrontmatter(_0x42a1b9,_0x1f9a80,_0x11921c){const _0x29bbfb=a109_0x5a32,_0xa58c6c=skillDisplayName(_0x1f9a80,_0x11921c),_0x13c91b=_0x1f9a80[_0x29bbfb(0xcc)]?.['trim']()||_0xa58c6c||_0x11921c;return normalizeLocalFiles(_0x42a1b9)[_0x29bbfb(0xb4)](_0x14227f=>{const _0x39ad71=_0x29bbfb,_0x4088af=fileText(_0x14227f);if(_0x14227f[_0x39ad71(0xdc)]!==SKILL_FILE)return _0x14227f;if(hasYamlFrontmatter(_0x4088af))return{'path':_0x14227f[_0x39ad71(0xdc)],'content':withSyncedDisplayName(_0x4088af,_0xa58c6c)};return{'path':_0x14227f['path'],'content':prependSkillFrontmatter(_0x4088af,{'name':_0x11921c,'displayName':_0xa58c6c,'description':_0x13c91b})};});}function hasYamlFrontmatter(_0x4f8157){const _0x50db6e=a109_0x5a32;return/^\uFEFF?---\s*\r?\n/[_0x50db6e(0xc6)](_0x4f8157);}function prependSkillFrontmatter(_0x35d5b1,_0x2eb709){const _0xc9486f=a109_0x5a32,_0x5c6d70=_0x35d5b1[_0xc9486f(0xd0)](/^\uFEFF/,'');return[_0xc9486f(0xcd),_0xc9486f(0xb7)+yamlString(_0x2eb709[_0xc9486f(0xd6)]),_0x2eb709[_0xc9486f(0xc8)]?_0xc9486f(0xca)+yamlString(_0x2eb709[_0xc9486f(0xc8)]):undefined,_0xc9486f(0xbc)+yamlString(_0x2eb709['description']),'---','',_0x5c6d70][_0xc9486f(0xb9)](_0x3d523e=>_0x3d523e!==undefined)[_0xc9486f(0xdd)]('\x0a');}function yamlString(_0x12ac76){const _0x2d57f8=a109_0x5a32;return JSON[_0x2d57f8(0xb6)](_0x12ac76[_0x2d57f8(0xd0)](/\r/g,'')[_0x2d57f8(0xba)]());}function skillDisplayName(_0x556042,_0x2c4750){const _0x5cb328=a109_0x5a32,_0xa2d46a=_0x556042[_0x5cb328(0xd1)]?.[_0x5cb328(0xba)]();return _0xa2d46a||_0x2c4750;}function withSyncedDisplayName(_0x160a37,_0x256d82){const _0x452d95=a109_0x5a32,_0x2a9d85=_0x160a37[_0x452d95(0xd3)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2a9d85)return _0x160a37;const _0x204313=_0x2a9d85[0x1]??'',_0x57d3c5=_0x2a9d85[0x2]??'',_0x5b60f0=parseDocument(_0x57d3c5);if(_0x5b60f0['errors']['length']>0x0||!isMap(_0x5b60f0['contents']))return _0x160a37;if(_0x256d82)_0x5b60f0[_0x452d95(0xa8)](_0x452d95(0xc8),_0x256d82);else{if(_0x5b60f0[_0x452d95(0xda)](_0x452d95(0xc8)))_0x5b60f0[_0x452d95(0xa9)]('displayName');else return _0x160a37;}forceBlockCollections(_0x5b60f0['contents']);const _0x404040=_0x5b60f0[_0x452d95(0xdb)]({'lineWidth':0x0})[_0x452d95(0xb0)](),_0x1891c0=_0x160a37[_0x452d95(0xbf)](_0x2a9d85[0x0][_0x452d95(0xbe)])[_0x452d95(0xd0)](/^\r?\n/,'');return _0x204313+_0x452d95(0xc9)+_0x404040+'\x0a---\x0a\x0a'+_0x1891c0;}function forceBlockCollections(_0x389773){if(!isNode(_0x389773))return;visit(_0x389773,(_0x171355,_0x3071af)=>{const _0x3f62a1=a109_0x5a32;isCollection(_0x3071af)&&(_0x3071af[_0x3f62a1(0xc1)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x12e2ef,_0x5501a6,_0x23ec21,_0x1b0bc8){const _0x1c3b92=a109_0x5a32;if(_0x1b0bc8||!existsSync(_0x5501a6))return;const _0x22d289=readMetadataIfPresent(_0x5501a6);if(!_0x22d289)return;const _0x8cf00d=_0x22d289['fileHashes']&&Object[_0x1c3b92(0xce)](_0x22d289[_0x1c3b92(0xb2)])[_0x1c3b92(0xbe)]>0x0?_0x22d289['fileHashes']:undefined;if(_0x8cf00d)for(const [_0x419600,_0x429b12]of Object[_0x1c3b92(0xad)](_0x8cf00d)){const _0x198399=resolveManagedFilePath(_0x12e2ef,_0x419600);if(!existsSync(_0x198399))throw CliErrors[_0x1c3b92(0xd8)](_0x1c3b92(0xd4)+_0x12e2ef,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x419600);const _0x552730=lstatSync(_0x198399);if(!_0x552730[_0x1c3b92(0xa7)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x12e2ef,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x419600);const _0x1b092a=bufferSha256(readFileSync(_0x198399));if(_0x1b092a!==_0x429b12)throw CliErrors[_0x1c3b92(0xd8)](_0x1c3b92(0xd4)+_0x12e2ef+'.\x20Changed\x20file:\x20'+_0x419600,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x419600);}else{const _0x1548ac=resolve(_0x12e2ef,SKILL_FILE);if(existsSync(_0x1548ac)&&_0x22d289[_0x1c3b92(0xc3)]){const _0x4abd09=contentHash(readFileSync(_0x1548ac,_0x1c3b92(0xb5)));if(_0x4abd09!==_0x22d289[_0x1c3b92(0xc3)])throw CliErrors[_0x1c3b92(0xd8)](_0x1c3b92(0xc5)+_0x1548ac,_0x1c3b92(0xb1));}}for(const _0x250e4a of normalizeLocalFiles(_0x23ec21)){if(_0x8cf00d?.[_0x250e4a[_0x1c3b92(0xdc)]])continue;if(!_0x8cf00d&&_0x250e4a['path']===SKILL_FILE)continue;const _0x493abc=resolveManagedFilePath(_0x12e2ef,_0x250e4a[_0x1c3b92(0xdc)]);if(!existsSync(_0x493abc))continue;const _0x32854e=lstatSync(_0x493abc);if(!_0x32854e[_0x1c3b92(0xa7)]())throw CliErrors[_0x1c3b92(0xd8)](_0x1c3b92(0xd4)+_0x12e2ef,_0x1c3b92(0xaf)+_0x250e4a['path']);const _0x1f29a4=bufferSha256(readFileSync(_0x493abc));if(_0x1f29a4!==fileHash(_0x250e4a))throw CliErrors[_0x1c3b92(0xd8)](_0x1c3b92(0xd4)+_0x12e2ef,_0x1c3b92(0xbb)+_0x250e4a['path']);}}function materializeFiles(_0x1ce6d9,_0x3e2fc0){for(const _0x3d3001 of normalizeLocalFiles(_0x3e2fc0)){const _0x17f0ea=resolveManagedFilePath(_0x1ce6d9,_0x3d3001['path']);mkdirSync(dirname(_0x17f0ea),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x17f0ea,fileContent(_0x3d3001),0x180);}}function removeStaleManagedFiles(_0x8aba96,_0x3abd4a,_0x5f3955){const _0xd7d661=a109_0x5a32;if(!_0x3abd4a)return;const _0x52112c=new Set(normalizeLocalFiles(_0x5f3955)[_0xd7d661(0xb4)](_0x97b56=>_0x97b56[_0xd7d661(0xdc)]));for(const _0x500fa5 of Object[_0xd7d661(0xce)](_0x3abd4a)){if(_0x52112c[_0xd7d661(0xda)](_0x500fa5))continue;const _0x175f12=resolveManagedFilePath(_0x8aba96,_0x500fa5);existsSync(_0x175f12)&&lstatSync(_0x175f12)[_0xd7d661(0xa7)]()&&rmSync(_0x175f12,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x510413,_0x456e65){const _0x36b61c=a110_0xd1f8,_0xb82b16=_0x510413();while(!![]){try{const _0x3ccecd=-parseInt(_0x36b61c(0xa4))/0x1+-parseInt(_0x36b61c(0x99))/0x2+-parseInt(_0x36b61c(0x96))/0x3*(-parseInt(_0x36b61c(0x8f))/0x4)+parseInt(_0x36b61c(0x95))/0x5+parseInt(_0x36b61c(0xa8))/0x6*(parseInt(_0x36b61c(0xab))/0x7)+parseInt(_0x36b61c(0x9c))/0x8*(-parseInt(_0x36b61c(0x8b))/0x9)+parseInt(_0x36b61c(0xa3))/0xa;if(_0x3ccecd===_0x456e65)break;else _0xb82b16['push'](_0xb82b16['shift']());}catch(_0x318927){_0xb82b16['push'](_0xb82b16['shift']());}}}(a110_0x17f6,0xca2cc));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a110_0x17f6(){const _0x306ebb=['map','object','length','zipSize','4889705CmfkvK','3585DhySDQ','userId','forkedFromVersion','1421496HLDoEY','manifest','tags','8KTKcaN','tenantCode','fromEntries','path','forkedFromSkillId','readonly','isArray','5163490CYbbfc','1029512dsmGMA','string','skillCode','personal','33906KDQogB','description','validation','1708WxauRq','Runtime\x20Skill\x20is\x20missing\x20skillCode.','version','trim','ossPath','files','6991119nQNhPQ','status','zipSha256','utf8','1580JWvHBy','hasUpstreamUpdate'];a110_0x17f6=function(){return _0x306ebb;};return a110_0x17f6();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a110_0xd1f8(_0x5468dd,_0x3eb4e9){_0x5468dd=_0x5468dd-0x88;const _0x17f6bd=a110_0x17f6();let _0xd1f8ed=_0x17f6bd[_0x5468dd];return _0xd1f8ed;}export function buildMetadata(_0xb05eb0,_0x204025,_0x458ad4,_0x4fbb99,_0x108a3b,_0x3ecad1,_0x28ea93){const _0x5ec5af=a110_0xd1f8,_0xe945e4=_0x3ecad1?normalizeLocalFiles(_0x3ecad1):[],_0x245682=!_0x28ea93&&_0xe945e4['length']>0x0?buildSkillPackage(_0xe945e4):undefined,_0x4d20a2=_0x28ea93?bufferSha256(_0x28ea93):_0x245682?.[_0x5ec5af(0x9a)][_0x5ec5af(0x8d)],_0x43ebc5=_0x28ea93?.['length']??_0x245682?.[_0x5ec5af(0x9a)][_0x5ec5af(0x94)],_0x3a7235=_0xe945e4[_0x5ec5af(0x93)]>0x0?Object[_0x5ec5af(0x9e)](_0xe945e4[_0x5ec5af(0x91)](_0x320b65=>[_0x320b65[_0x5ec5af(0x9f)],fileHash(_0x320b65)])):undefined;return{'schemaVersion':_0xe945e4[_0x5ec5af(0x93)]>0x0?0x2:0x1,'id':_0xb05eb0['id'],'appCode':_0x458ad4,'skillCode':requireSkillCode(_0xb05eb0),'skillName':_0xb05eb0['skillName'],'description':_0xb05eb0[_0x5ec5af(0xa9)],'scope':_0x204025,'readonly':_0x204025!==_0x5ec5af(0xa7)||_0xb05eb0[_0x5ec5af(0xa1)]===!![],'tenantCode':_0xb05eb0[_0x5ec5af(0x9d)],'userId':_0xb05eb0[_0x5ec5af(0x97)],'version':_0xb05eb0[_0x5ec5af(0xad)],'status':_0xb05eb0[_0x5ec5af(0x8c)],'tags':Array['isArray'](_0xb05eb0[_0x5ec5af(0x9b)])?_0xb05eb0['tags']:[],'hasUpstreamUpdate':_0xb05eb0[_0x5ec5af(0x90)],'forkedFromSkillId':_0xb05eb0[_0x5ec5af(0xa0)],'forkedFromVersion':_0xb05eb0[_0x5ec5af(0x98)],'sourceSessionId':_0xb05eb0['sourceSessionId'],'contentHash':_0x4fbb99,'fileHashes':_0x3a7235,'treeHash':_0xe945e4[_0x5ec5af(0x93)]>0x0?fileTreeHash(localFilesToManifestFiles(_0xe945e4)):undefined,'ossPath':remoteManifestOssPath(_0xb05eb0[_0x5ec5af(0x8a)]),'zipSha256':_0x4d20a2,'zipSize':_0x43ebc5,'files':_0xe945e4[_0x5ec5af(0x93)]>0x0?_0xe945e4[_0x5ec5af(0x91)](_0xdeffca=>({'path':_0xdeffca[_0x5ec5af(0x9f)],'hash':fileHash(_0xdeffca),'size':fileContent(_0xdeffca)[_0x5ec5af(0x93)]})):undefined,'pulledAt':_0x108a3b??new Date()['toISOString']()};}export function requireSkillCode(_0x912ff8){const _0x46dfd6=a110_0xd1f8,_0x5c202c=_0x912ff8[_0x46dfd6(0xa6)]?.[_0x46dfd6(0x88)]();if(!_0x5c202c)throw CliErrors[_0x46dfd6(0xaa)](_0x46dfd6(0xac));return _0x5c202c;}export function readMetadataIfPresent(_0x53c847){const _0x38c59d=a110_0xd1f8;if(!existsSync(_0x53c847))return undefined;try{const _0x3c0e00=JSON['parse'](readFileSync(_0x53c847,_0x38c59d(0x8e)));return _0x3c0e00;}catch{throw CliErrors[_0x38c59d(0xaa)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x53c847);}}function remoteManifestOssPath(_0x26025e){const _0x4ec848=a110_0xd1f8;if(!_0x26025e||typeof _0x26025e!==_0x4ec848(0x92)||Array[_0x4ec848(0xa2)](_0x26025e))return undefined;const _0x7bc21b=_0x26025e[_0x4ec848(0x89)];return typeof _0x7bc21b===_0x4ec848(0xa5)&&_0x7bc21b[_0x4ec848(0x88)]()?_0x7bc21b[_0x4ec848(0x88)]():undefined;}
1
+ (function(_0x37ef5f,_0x1b33fb){const _0x2dc198=a110_0x1e71,_0x3a136c=_0x37ef5f();while(!![]){try{const _0x1dc73e=parseInt(_0x2dc198(0xc8))/0x1*(-parseInt(_0x2dc198(0xcd))/0x2)+-parseInt(_0x2dc198(0xce))/0x3*(-parseInt(_0x2dc198(0xd1))/0x4)+parseInt(_0x2dc198(0xd0))/0x5*(-parseInt(_0x2dc198(0xd2))/0x6)+parseInt(_0x2dc198(0xca))/0x7*(-parseInt(_0x2dc198(0xcb))/0x8)+parseInt(_0x2dc198(0xba))/0x9+parseInt(_0x2dc198(0xc0))/0xa*(parseInt(_0x2dc198(0xc3))/0xb)+parseInt(_0x2dc198(0xcf))/0xc*(parseInt(_0x2dc198(0xcc))/0xd);if(_0x1dc73e===_0x1b33fb)break;else _0x3a136c['push'](_0x3a136c['shift']());}catch(_0x1f4c38){_0x3a136c['push'](_0x3a136c['shift']());}}}(a110_0x1b23,0xe7b98));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3312d8,_0x31636b,_0x441480,_0x4d14b8,_0x1f462e,_0x42853e,_0xf8f589){const _0x3dc5c3=a110_0x1e71,_0x5ada5b=_0x42853e?normalizeLocalFiles(_0x42853e):[],_0x56099f=!_0xf8f589&&_0x5ada5b[_0x3dc5c3(0xd5)]>0x0?buildSkillPackage(_0x5ada5b):undefined,_0x354e2c=_0xf8f589?bufferSha256(_0xf8f589):_0x56099f?.[_0x3dc5c3(0xb3)][_0x3dc5c3(0xb5)],_0x385040=_0xf8f589?.[_0x3dc5c3(0xd5)]??_0x56099f?.[_0x3dc5c3(0xb3)][_0x3dc5c3(0xc6)],_0x3c93df=_0x5ada5b[_0x3dc5c3(0xd5)]>0x0?Object[_0x3dc5c3(0xc7)](_0x5ada5b[_0x3dc5c3(0xb2)](_0x4ffbf8=>[_0x4ffbf8['path'],fileHash(_0x4ffbf8)])):undefined;return{'schemaVersion':_0x5ada5b[_0x3dc5c3(0xd5)]>0x0?0x2:0x1,'id':_0x3312d8['id'],'appCode':_0x441480,'skillCode':requireSkillCode(_0x3312d8),'skillName':_0x3312d8[_0x3dc5c3(0xd3)],'description':_0x3312d8[_0x3dc5c3(0xbd)],'scope':_0x31636b,'readonly':_0x31636b!==_0x3dc5c3(0xb8)||_0x3312d8['readonly']===!![],'tenantCode':_0x3312d8['tenantCode'],'userId':_0x3312d8[_0x3dc5c3(0xb9)],'version':_0x3312d8[_0x3dc5c3(0xd4)],'status':_0x3312d8['status'],'tags':Array[_0x3dc5c3(0xb4)](_0x3312d8[_0x3dc5c3(0xc4)])?_0x3312d8[_0x3dc5c3(0xc4)]:[],'hasUpstreamUpdate':_0x3312d8[_0x3dc5c3(0xd6)],'forkedFromSkillId':_0x3312d8[_0x3dc5c3(0xd8)],'forkedFromVersion':_0x3312d8[_0x3dc5c3(0xbc)],'sourceSessionId':_0x3312d8[_0x3dc5c3(0xbb)],'contentHash':_0x4d14b8,'fileHashes':_0x3c93df,'treeHash':_0x5ada5b[_0x3dc5c3(0xd5)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5ada5b)):undefined,'ossPath':remoteManifestOssPath(_0x3312d8[_0x3dc5c3(0xd7)]),'zipSha256':_0x354e2c,'zipSize':_0x385040,'files':_0x5ada5b[_0x3dc5c3(0xd5)]>0x0?_0x5ada5b[_0x3dc5c3(0xb2)](_0x2ed709=>({'path':_0x2ed709[_0x3dc5c3(0xbe)],'hash':fileHash(_0x2ed709),'size':fileContent(_0x2ed709)[_0x3dc5c3(0xd5)]})):undefined,'pulledAt':_0x1f462e??new Date()['toISOString']()};}function a110_0x1e71(_0x79834c,_0x22b02e){_0x79834c=_0x79834c-0xb0;const _0x1b231c=a110_0x1b23();let _0x1e7166=_0x1b231c[_0x79834c];return _0x1e7166;}export function requireSkillCode(_0x37d640){const _0x4b18de=a110_0x1e71,_0x1a2c8c=_0x37d640[_0x4b18de(0xc9)]?.[_0x4b18de(0xb6)]();if(!_0x1a2c8c)throw CliErrors[_0x4b18de(0xb1)](_0x4b18de(0xc2));return _0x1a2c8c;}export function readMetadataIfPresent(_0x5803c4){const _0x5d1f63=a110_0x1e71;if(!existsSync(_0x5803c4))return undefined;try{const _0x51f23f=JSON[_0x5d1f63(0xc5)](readFileSync(_0x5803c4,_0x5d1f63(0xbf)));return _0x51f23f;}catch{throw CliErrors['validation'](_0x5d1f63(0xb0)+METADATA_FILE+':\x20'+_0x5803c4);}}function a110_0x1b23(){const _0x48e3b0=['userId','8879571ZdhCHe','sourceSessionId','forkedFromVersion','description','path','utf8','596950xhyxFv','ossPath','Runtime\x20Skill\x20is\x20missing\x20skillCode.','143onbwGc','tags','parse','zipSize','fromEntries','815434IENwdl','skillCode','496853ZTWNmx','184ZVogxN','52bbqVTG','4YtieSi','3XfAYdU','7998552DbOJHo','40VHNowQ','1257804fasRmE','398070YliNSF','skillName','version','length','hasUpstreamUpdate','files','forkedFromSkillId','Invalid\x20','validation','map','manifest','isArray','zipSha256','trim','object','personal'];a110_0x1b23=function(){return _0x48e3b0;};return a110_0x1b23();}function remoteManifestOssPath(_0x3210ab){const _0x27e6dc=a110_0x1e71;if(!_0x3210ab||typeof _0x3210ab!==_0x27e6dc(0xb7)||Array[_0x27e6dc(0xb4)](_0x3210ab))return undefined;const _0x54bb2b=_0x3210ab[_0x27e6dc(0xc1)];return typeof _0x54bb2b==='string'&&_0x54bb2b[_0x27e6dc(0xb6)]()?_0x54bb2b[_0x27e6dc(0xb6)]():undefined;}
@@ -1 +1 @@
1
- const a111_0xe3a21=a111_0x657d;(function(_0x37f8bf,_0xac5c12){const _0x1caf09=a111_0x657d,_0x3728cc=_0x37f8bf();while(!![]){try{const _0x123ea2=-parseInt(_0x1caf09(0x121))/0x1+-parseInt(_0x1caf09(0x11e))/0x2*(-parseInt(_0x1caf09(0x117))/0x3)+parseInt(_0x1caf09(0x11c))/0x4*(parseInt(_0x1caf09(0x124))/0x5)+-parseInt(_0x1caf09(0x10d))/0x6*(parseInt(_0x1caf09(0x128))/0x7)+parseInt(_0x1caf09(0x120))/0x8*(parseInt(_0x1caf09(0x113))/0x9)+-parseInt(_0x1caf09(0x10e))/0xa*(parseInt(_0x1caf09(0x119))/0xb)+parseInt(_0x1caf09(0x12a))/0xc*(parseInt(_0x1caf09(0x12c))/0xd);if(_0x123ea2===_0xac5c12)break;else _0x3728cc['push'](_0x3728cc['shift']());}catch(_0x208707){_0x3728cc['push'](_0x3728cc['shift']());}}}(a111_0x418e,0x9edc1));function a111_0x657d(_0x345055,_0x28a60f){_0x345055=_0x345055-0x10b;const _0x418e55=a111_0x418e();let _0x657d4b=_0x418e55[_0x345055];return _0x657d4b;}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(_0x15b0f8={}){const _0x4bdd34=a111_0x657d,_0xa8cec2=_0x15b0f8[_0x4bdd34(0x118)]??homedir(),_0x1e00e3=resolve(_0xa8cec2,PRODUCT_CONFIG[_0x4bdd34(0x127)],_0x4bdd34(0x10c)),_0x382140=trimmedEnv(_0x4bdd34(0x112)),_0x420712=trimmedEnv(_0x4bdd34(0x12b)),_0x3384f9=resolve(_0xa8cec2,_0x4bdd34(0x10f)),_0x44b320=_0x15b0f8[_0x4bdd34(0x125)]??(existsSync(_0x3384f9)?resolve(_0x3384f9,'skills'):undefined);return{'homeDir':_0xa8cec2,'cacheRoot':_0x1e00e3,'managedRoot':resolve(_0xa8cec2,PRODUCT_CONFIG[_0x4bdd34(0x127)]),'agentsSkillsDir':_0x15b0f8[_0x4bdd34(0x11f)]??_0x382140??resolve(_0xa8cec2,_0x4bdd34(0x123),'skills'),'claudeSkillsDir':_0x15b0f8[_0x4bdd34(0x126)]??_0x420712??resolve(_0xa8cec2,_0x4bdd34(0x115),_0x4bdd34(0x116)),'workbuddySkillsDir':_0x44b320};}function a111_0x418e(){const _0x3e6c4f=['69388puptzl','validation','path\x20segment','12YbQCkY','cacheRoot','1762vyseAD','agentsSkillsDir','1776344iYsEAK','710918rmFiqg','filter','.agents','925855nhYtEZ','workbuddySkillsDir','claudeSkillsDir','homeDirName','1270661nUxvWF','trim','9665364UypuaW','CLAUDE_SKILL_ROOT','26YzdABk','appCode','cache','18hwVPgE','1530GewQuA','.workbuddy','includes','skillCode','SKILL_ROOT','27mwHPsk','\x20for\x20local\x20path:\x20','.claude','skills','132TEVsIh','homeDir'];a111_0x418e=function(){return _0x3e6c4f;};return a111_0x418e();}export function runtimeAgentSkillRoots(_0xbc7d66){const _0x18ea40=a111_0x657d;return[_0xbc7d66[_0x18ea40(0x11f)],_0xbc7d66[_0x18ea40(0x126)],_0xbc7d66[_0x18ea40(0x125)]][_0x18ea40(0x122)](_0x3a9811=>Boolean(_0x3a9811));}export function getRuntimeSkillCacheRoot(_0xd23492,_0x410816,_0x5f3f50={}){const _0x2b6d1b=a111_0x657d,_0x483593=resolveSkillSyncPaths(_0x5f3f50);return resolve(_0x483593[_0x2b6d1b(0x11d)],_0xd23492,fingerprintAccessKey(_0x410816),_0x2b6d1b(0x116));}export function getRuntimeSkillDir(_0x339295,_0x1c7d28,_0x3206f6,_0xb8908c,_0x3da703,_0x312c4c={}){const _0x401c42=a111_0x657d;return resolve(getRuntimeSkillCacheRoot(_0x339295,_0x1c7d28,_0x312c4c),safePathSegment(_0x3206f6,_0x401c42(0x10b)),_0xb8908c,safePathSegment(_0x3da703,_0x401c42(0x111)));}export function safePathSegment(_0x596184,_0x81b56e=a111_0xe3a21(0x11b)){const _0x5144b9=a111_0xe3a21;if(!_0x596184||_0x596184[_0x5144b9(0x110)]('/')||_0x596184[_0x5144b9(0x110)]('\x5c')||_0x596184[_0x5144b9(0x110)]('..'))throw CliErrors[_0x5144b9(0x11a)]('Unsafe\x20'+_0x81b56e+_0x5144b9(0x114)+_0x596184);return _0x596184;}function trimmedEnv(_0xc197cb){const _0x1309e7=a111_0xe3a21,_0x37c6ca=productEnv(_0xc197cb)?.[_0x1309e7(0x129)]();return _0x37c6ca?_0x37c6ca:undefined;}
1
+ const a111_0x33e535=a111_0x2dd2;(function(_0x3e3fc4,_0xc7d4ce){const _0x36b292=a111_0x2dd2,_0x5b6e4f=_0x3e3fc4();while(!![]){try{const _0x335bc5=-parseInt(_0x36b292(0x16f))/0x1*(-parseInt(_0x36b292(0x181))/0x2)+parseInt(_0x36b292(0x175))/0x3+parseInt(_0x36b292(0x183))/0x4*(-parseInt(_0x36b292(0x172))/0x5)+-parseInt(_0x36b292(0x179))/0x6+-parseInt(_0x36b292(0x176))/0x7*(parseInt(_0x36b292(0x180))/0x8)+parseInt(_0x36b292(0x17a))/0x9*(parseInt(_0x36b292(0x17d))/0xa)+-parseInt(_0x36b292(0x17e))/0xb*(parseInt(_0x36b292(0x178))/0xc);if(_0x335bc5===_0xc7d4ce)break;else _0x5b6e4f['push'](_0x5b6e4f['shift']());}catch(_0x2cabf4){_0x5b6e4f['push'](_0x5b6e4f['shift']());}}}(a111_0x1695,0x54c50));function a111_0x2dd2(_0x323345,_0x228ea){_0x323345=_0x323345-0x16c;const _0x169529=a111_0x1695();let _0x2dd253=_0x169529[_0x323345];return _0x2dd253;}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';function a111_0x1695(){const _0x4d2626=['488trkvsz','547674AVuKRP','agentsSkillsDir','11864jZDgqi','cacheRoot','homeDirName','homeDir','appCode','CLAUDE_SKILL_ROOT','SKILL_ROOT','.workbuddy','includes','path\x20segment','trim','1xHDWOw','.agents','cache','325IRAVuM','filter','validation','1087152xKSjsB','34195RwkGqR','workbuddySkillsDir','24soHjNP','621348gsNbaj','5288994oFeRxS','claudeSkillsDir','skills','10RmBSCK','1552859XGkwED','.claude'];a111_0x1695=function(){return _0x4d2626;};return a111_0x1695();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x30c12b={}){const _0xe6e7e=a111_0x2dd2,_0x39e87=_0x30c12b[_0xe6e7e(0x186)]??homedir(),_0x356cc1=resolve(_0x39e87,PRODUCT_CONFIG['homeDirName'],_0xe6e7e(0x171)),_0x501518=trimmedEnv(_0xe6e7e(0x189)),_0x2ef8fe=trimmedEnv(_0xe6e7e(0x188)),_0x196778=resolve(_0x39e87,_0xe6e7e(0x18a)),_0x4eba60=_0x30c12b[_0xe6e7e(0x177)]??(existsSync(_0x196778)?resolve(_0x196778,_0xe6e7e(0x17c)):undefined);return{'homeDir':_0x39e87,'cacheRoot':_0x356cc1,'managedRoot':resolve(_0x39e87,PRODUCT_CONFIG[_0xe6e7e(0x185)]),'agentsSkillsDir':_0x30c12b[_0xe6e7e(0x182)]??_0x501518??resolve(_0x39e87,_0xe6e7e(0x170),_0xe6e7e(0x17c)),'claudeSkillsDir':_0x30c12b[_0xe6e7e(0x17b)]??_0x2ef8fe??resolve(_0x39e87,_0xe6e7e(0x17f),'skills'),'workbuddySkillsDir':_0x4eba60};}export function runtimeAgentSkillRoots(_0x30ce8b){const _0x4b51e2=a111_0x2dd2;return[_0x30ce8b[_0x4b51e2(0x182)],_0x30ce8b['claudeSkillsDir'],_0x30ce8b['workbuddySkillsDir']][_0x4b51e2(0x173)](_0x3a34fc=>Boolean(_0x3a34fc));}export function getRuntimeSkillCacheRoot(_0x10cac5,_0x1dfafe,_0x27e703={}){const _0x50fb4f=a111_0x2dd2,_0x532f12=resolveSkillSyncPaths(_0x27e703);return resolve(_0x532f12[_0x50fb4f(0x184)],_0x10cac5,fingerprintAccessKey(_0x1dfafe),_0x50fb4f(0x17c));}export function getRuntimeSkillDir(_0x45df34,_0x4f5ea5,_0x3b55cf,_0xf86bbe,_0x263515,_0x330393={}){const _0x35d8b8=a111_0x2dd2;return resolve(getRuntimeSkillCacheRoot(_0x45df34,_0x4f5ea5,_0x330393),safePathSegment(_0x3b55cf,_0x35d8b8(0x187)),_0xf86bbe,safePathSegment(_0x263515,'skillCode'));}export function safePathSegment(_0x343ff9,_0x34996c=a111_0x33e535(0x16d)){const _0x1a7ce4=a111_0x33e535;if(!_0x343ff9||_0x343ff9['includes']('/')||_0x343ff9[_0x1a7ce4(0x16c)]('\x5c')||_0x343ff9['includes']('..'))throw CliErrors[_0x1a7ce4(0x174)]('Unsafe\x20'+_0x34996c+'\x20for\x20local\x20path:\x20'+_0x343ff9);return _0x343ff9;}function trimmedEnv(_0x2f46b4){const _0x727880=a111_0x33e535,_0x362688=productEnv(_0x2f46b4)?.[_0x727880(0x16e)]();return _0x362688?_0x362688:undefined;}
@@ -1 +1 @@
1
- (function(_0x2f7f7a,_0x5b462c){const _0x38d204=a112_0x4d9d,_0x1d7133=_0x2f7f7a();while(!![]){try{const _0x3809e0=parseInt(_0x38d204(0x110))/0x1+-parseInt(_0x38d204(0x131))/0x2*(parseInt(_0x38d204(0x10c))/0x3)+parseInt(_0x38d204(0x12d))/0x4*(parseInt(_0x38d204(0x12b))/0x5)+-parseInt(_0x38d204(0x106))/0x6+-parseInt(_0x38d204(0x123))/0x7*(parseInt(_0x38d204(0x112))/0x8)+-parseInt(_0x38d204(0x11c))/0x9+parseInt(_0x38d204(0x133))/0xa*(parseInt(_0x38d204(0x119))/0xb);if(_0x3809e0===_0x5b462c)break;else _0x1d7133['push'](_0x1d7133['shift']());}catch(_0x328a6d){_0x1d7133['push'](_0x1d7133['shift']());}}}(a112_0x1273,0xd2190));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a112_0xabee2c}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(_0x2ba6e5,_0x405d57,_0x370593={}){const _0x3dd2a3=a112_0x4d9d,_0x6936a9=resolvePushDirectoryRoot(_0x2ba6e5),_0x3a500e=readPushMetadataIfPresent(resolve(_0x6936a9,METADATA_FILE),{'ignoreInvalidMetadata':_0x370593[_0x3dd2a3(0x10b)]});if(_0x3a500e?.[_0x3dd2a3(0x10d)]&&_0x3a500e['appCode']!==_0x405d57&&!_0x370593[_0x3dd2a3(0x11f)]&&!_0x370593['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x3dd2a3(0x101)]('Skill\x20metadata\x20appCode\x20\x22'+_0x3a500e[_0x3dd2a3(0x10d)]+_0x3dd2a3(0x116)+_0x405d57+'\x22.');const _0x2f8786=resolvePushSkillCode(_0x6936a9,_0x405d57,_0x3a500e,_0x370593);if(!_0x2f8786)throw CliErrors[_0x3dd2a3(0x101)](_0x3dd2a3(0x10e)+SKILL_FILE+',\x20'+METADATA_FILE+_0x3dd2a3(0x124));return{'dir':_0x6936a9,'skillCode':_0x2f8786,'metadata':_0x3a500e};}function a112_0x4d9d(_0x50f7f8,_0x50cf5c){_0x50f7f8=_0x50f7f8-0xfa;const _0x127340=a112_0x1273();let _0x4d9d45=_0x127340[_0x50f7f8];return _0x4d9d45;}export function readPushDirectory(_0x203a80,_0x36e172,_0x163027={}){const _0x25870c=a112_0x4d9d,_0x3d3ab3=resolvePushDirectoryIdentity(_0x203a80,_0x36e172,_0x163027),_0x420906=_0x3d3ab3['dir'],_0x46112d=resolve(_0x420906,SKILL_FILE);if(!existsSync(_0x46112d)||!lstatSync(_0x46112d)['isFile']())throw CliErrors[_0x25870c(0x101)](_0x25870c(0x118)+SKILL_FILE+':\x20'+_0x46112d);const _0x11b5ae=_0x3d3ab3[_0x25870c(0x138)],_0x1c8ee6=_0x163027[_0x25870c(0x11d)]??_0x25870c(0x135);if(!_0x163027[_0x25870c(0x100)]&&_0x11b5ae?.[_0x25870c(0x108)]===_0x25870c(0x10f))throw CliErrors[_0x25870c(0x101)](_0x25870c(0x12c)+METADATA_FILE+_0x25870c(0x115)+_0x11b5ae[_0x25870c(0x108)]+'\x22.');if(!_0x163027[_0x25870c(0x100)]&&_0x1c8ee6===_0x25870c(0x135)&&_0x11b5ae?.[_0x25870c(0x108)]&&_0x11b5ae['scope']!=='personal')throw CliErrors['validation'](_0x25870c(0xff)+METADATA_FILE+_0x25870c(0x115)+_0x11b5ae[_0x25870c(0x108)]+'\x22.',_0x25870c(0x130)+_0x420906+_0x25870c(0x11a));const _0x2df4f5=scanSkillDirectory(_0x420906),_0x500241=buildSkillPackage(_0x2df4f5),_0x13787e=readFileSync(_0x46112d,_0x25870c(0x136)),_0xec7ef4=_0x3d3ab3[_0x25870c(0xfc)],_0xf4f439=_0x163027[_0x25870c(0x127)]?undefined:_0x11b5ae,_0x522862=readSkillDisplayName(_0x13787e);return{'skillCode':_0xec7ef4,'metadata':_0x11b5ae,'frontmatterDisplayName':_0x522862,'input':{'skillCode':_0xec7ef4,'skillName':_0x522862??_0xf4f439?.[_0x25870c(0xfd)],'description':_0xf4f439?.[_0x25870c(0x125)],'content':_0x13787e,'files':_0x500241[_0x25870c(0x12f)],'packageBase64':_0x500241['packageBase64'],'tags':_0xf4f439?.[_0x25870c(0x132)],'version':_0xf4f439?.[_0x25870c(0x11b)],'sourceSessionId':_0xf4f439?.[_0x25870c(0x113)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x349e5b,_0x366f68,_0x54890b,_0x498734={}){const _0x10bd63=a112_0x4d9d,_0x10df4f=resolvePushDirectoryRoot(_0x349e5b),_0x55350a=readPushMetadataIfPresent(resolve(_0x10df4f,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2fb22e=requireRemoteScope(_0x366f68),_0xfdc61=readLocalSkillContent(_0x10df4f),_0x107e6d={..._0x366f68,'appCode':_0x366f68[_0x10bd63(0x10d)]??_0x54890b,'skillName':_0x366f68[_0x10bd63(0xfd)]??_0x55350a?.[_0x10bd63(0xfd)],'description':_0x366f68[_0x10bd63(0x125)]??_0x55350a?.['description'],'tags':Array['isArray'](_0x366f68[_0x10bd63(0x132)])?_0x366f68[_0x10bd63(0x132)]:_0x55350a?.[_0x10bd63(0x132)],'sourceSessionId':_0x366f68[_0x10bd63(0x113)]??_0x55350a?.[_0x10bd63(0x113)],'content':_0x366f68[_0x10bd63(0x107)]??_0xfdc61},_0x4b193e=buildMetadata(_0x107e6d,_0x2fb22e,_0x54890b,contentHash(_0xfdc61),_0x498734[_0x10bd63(0xfe)]);writeJsonAtomic(resolve(_0x10df4f,METADATA_FILE),_0x4b193e);}export function recordPushedRuntimeSkill(_0x4ebd51,_0x348382,_0x3976b9,_0xa99dbf={}){const _0x58b365=a112_0x4d9d,_0x82f0ee=resolvePushDirectoryRoot(_0x4ebd51),_0x317c99=scanSkillDirectory(_0x82f0ee),_0x3428fa=_0x317c99[_0x58b365(0x122)](_0x125bdf=>_0x125bdf[_0x58b365(0x13b)]===SKILL_FILE),_0x483af9=_0x3428fa?fileText(_0x3428fa):'',_0x9eecc2=tryNormalizePackageManifest(_0x348382[_0x58b365(0x114)]),_0x3c4100={..._0x348382,'content':_0x348382[_0x58b365(0x107)]??_0x483af9,'files':_0x9eecc2},_0x13b075=_0x9eecc2?normalizeLocalFiles(_0x317c99)['filter'](_0x712718=>_0x9eecc2[_0x58b365(0x114)]['some'](_0x18a653=>_0x18a653[_0x58b365(0x13b)]===_0x712718[_0x58b365(0x13b)])):undefined,_0x2ed6c3=buildMetadata(_0x3c4100,_0xa99dbf['scope']??_0x58b365(0x135),_0x3976b9,contentHash(_0x3c4100[_0x58b365(0x107)]??''),_0xa99dbf[_0x58b365(0x139)],_0x13b075);writeJsonAtomic(resolve(_0x82f0ee,METADATA_FILE),_0x2ed6c3);}export function deriveSkillCodeFromDirectory(_0x310949,_0x3df946){const _0x1b29eb=a112_0x4d9d,_0xbb08e4=basename(resolve(_0x310949)),_0x5ced71=_0x3df946+'--';return _0xbb08e4[_0x1b29eb(0x13a)](_0x5ced71)?_0xbb08e4['slice'](_0x5ced71[_0x1b29eb(0xfa)]):_0xbb08e4;}function resolvePushSkillCode(_0x12e6ef,_0x19e240,_0x44afa5,_0x2116a9){const _0x214991=a112_0x4d9d,_0x2f9527=deriveSkillCodeFromSkillFile(_0x12e6ef)||deriveSkillCodeFromDirectory(_0x12e6ef,_0x19e240);if(_0x2116a9[_0x214991(0x12a)])return _0x2f9527;return _0x44afa5?.[_0x214991(0xfc)]?.[_0x214991(0x120)]()||_0x2f9527;}function deriveSkillCodeFromSkillFile(_0x13b7d7){const _0x3f0505=a112_0x4d9d,_0x45fd74=resolve(_0x13b7d7,SKILL_FILE);if(!existsSync(_0x45fd74)||!lstatSync(_0x45fd74)[_0x3f0505(0x109)]())return undefined;const _0x813420=readFileSync(_0x45fd74,'utf8'),_0x443479=_0x813420[_0x3f0505(0x137)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x443479)return undefined;const _0x4d6768=parseFrontmatterObject(_0x443479[0x1]??''),_0x40a0f2=scalarToString(_0x4d6768?.[_0x3f0505(0x104)]);return _0x40a0f2?slugifySkillName(_0x40a0f2):undefined;}function readSkillDisplayName(_0x1a515b){const _0x31dda9=a112_0x4d9d,_0x21e5c0=_0x1a515b[_0x31dda9(0x137)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x21e5c0)return undefined;const _0x19f738=parseFrontmatterObject(_0x21e5c0[0x1]??'');return scalarToString(_0x19f738?.[_0x31dda9(0x12e)]);}function slugifySkillName(_0x1a2c11){const _0x2e53af=a112_0x4d9d,_0x114a11=_0x1a2c11[_0x2e53af(0x120)]()['toLowerCase']()[_0x2e53af(0x103)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2e53af(0x103)](/^-+/,'')[_0x2e53af(0x103)](/-+$/,'')[_0x2e53af(0x103)](/-{2,}/g,'-');if(!_0x114a11)throw CliErrors[_0x2e53af(0x101)](_0x2e53af(0x126)+SKILL_FILE+_0x2e53af(0x121));return _0x114a11;}function parseFrontmatterObject(_0x55099d){const _0x1419b3=a112_0x4d9d;try{const _0x57afc9=a112_0xabee2c(_0x55099d);return _0x57afc9&&typeof _0x57afc9==='object'&&!Array[_0x1419b3(0x129)](_0x57afc9)?_0x57afc9:undefined;}catch{return undefined;}}function scalarToString(_0x26850b){const _0xb1f1e4=a112_0x4d9d;if(typeof _0x26850b===_0xb1f1e4(0x102))return _0x26850b[_0xb1f1e4(0x120)]();if(typeof _0x26850b===_0xb1f1e4(0x13c)||typeof _0x26850b===_0xb1f1e4(0x10a))return String(_0x26850b);return undefined;}function resolvePushDirectoryRoot(_0x3d5994){const _0x1caff4=a112_0x4d9d,_0x276c70=resolve(_0x3d5994);if(!existsSync(_0x276c70))throw CliErrors[_0x1caff4(0x101)](_0x1caff4(0x134)+_0x3d5994);const _0x4f0cb7=lstatSync(_0x276c70);if(_0x4f0cb7[_0x1caff4(0x117)]())return _0x276c70;if(_0x4f0cb7[_0x1caff4(0x11e)]()){const _0x525262=realpathSync(_0x276c70);if(lstatSync(_0x525262)['isDirectory']())return _0x525262;}throw CliErrors[_0x1caff4(0x101)](_0x1caff4(0x134)+_0x3d5994);}function requireRemoteScope(_0x40e6cd){const _0x12cc5b=a112_0x4d9d;if(_0x40e6cd['scope']===_0x12cc5b(0x135)||_0x40e6cd[_0x12cc5b(0x108)]===_0x12cc5b(0xfb)||_0x40e6cd[_0x12cc5b(0x108)]==='builtin')return _0x40e6cd[_0x12cc5b(0x108)];throw CliErrors[_0x12cc5b(0x101)](_0x12cc5b(0x105)+(_0x40e6cd[_0x12cc5b(0xfc)]||'(unknown)')+_0x12cc5b(0x128)+(_0x40e6cd[_0x12cc5b(0x108)]??_0x12cc5b(0x111))+'\x22.');}function readLocalSkillContent(_0x3eae3e){const _0x5c7897=a112_0x4d9d,_0x15d60b=resolve(_0x3eae3e,SKILL_FILE);return existsSync(_0x15d60b)&&lstatSync(_0x15d60b)[_0x5c7897(0x109)]()?readFileSync(_0x15d60b,'utf8'):'';}function readPushMetadataIfPresent(_0x50a3f7,_0x163f97={}){const _0x2027d5=a112_0x4d9d;try{return readMetadataIfPresent(_0x50a3f7);}catch(_0xccf138){if(_0x163f97[_0x2027d5(0x10b)])return undefined;throw _0xccf138;}}function a112_0x1273(){const _0x27971f=['Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataScope','validation','string','replace','name','Remote\x20Skill\x20','6892482xThBFh','content','scope','isFile','boolean','ignoreInvalidMetadata','48wnYaAj','appCode','Unable\x20to\x20resolve\x20skillCode\x20from\x20','builtin','1164829utDdko','unknown','336esmTdq','sourceSessionId','files','\x20has\x20scope=\x22','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','isDirectory','Missing\x20','11VJThag','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','version','8014050GgzNJC','targetScope','isSymbolicLink','allowAppCodeRetarget','trim','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','159383UsITMb',',\x20or\x20directory\x20name.','description','Invalid\x20','ignoreMetadataForPayload','\x20has\x20unsupported\x20scope\x20\x22','isArray','ignoreMetadataSkillCode','925535eALvfm','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','20zttVfG','displayName','manifest','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','141966GIuFPy','tags','29014190eMiMNT','Skill\x20directory\x20not\x20found:\x20','personal','utf8','match','metadata','pushedAt','startsWith','path','number','length','company','skillCode','skillName','refreshedAt'];a112_0x1273=function(){return _0x27971f;};return a112_0x1273();}
1
+ (function(_0xb41516,_0x3a0b0f){const _0x5e5be7=a112_0x2f3c,_0x175050=_0xb41516();while(!![]){try{const _0x3c6e4a=parseInt(_0x5e5be7(0x210))/0x1+parseInt(_0x5e5be7(0x228))/0x2+-parseInt(_0x5e5be7(0x204))/0x3*(-parseInt(_0x5e5be7(0x1f2))/0x4)+-parseInt(_0x5e5be7(0x220))/0x5+parseInt(_0x5e5be7(0x1f3))/0x6+-parseInt(_0x5e5be7(0x217))/0x7+parseInt(_0x5e5be7(0x206))/0x8*(-parseInt(_0x5e5be7(0x1ea))/0x9);if(_0x3c6e4a===_0x3a0b0f)break;else _0x175050['push'](_0x175050['shift']());}catch(_0x1b05bf){_0x175050['push'](_0x175050['shift']());}}}(a112_0x5060,0x2d516));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a112_0x2fb5df}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';function a112_0x5060(){const _0x43830c=['112pYXeiP','605382iwoOgu','toLowerCase','name','skillCode','string','Invalid\x20','Unable\x20to\x20resolve\x20skillCode\x20from\x20','boolean','appCode','\x20has\x20scope=\x22','\x20has\x20unsupported\x20scope\x20\x22','ignoreInvalidMetadata','pushedAt','trim','manifest','filter','number','19719QplUnq','Missing\x20','880JgujqO','packageBase64','object','(unknown)','personal','content','startsWith','dir','allowAppCodeRetarget','\x20name\x20for\x20SkillHub\x20slug\x20generation.','139919WxWnfn','length','isArray','path','isDirectory','utf8','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','1222620GTTEFM','ignoreMetadataAppCodeMismatch','tags','Remote\x20Skill\x20','replace','slice','ignoreMetadataScope','Skill\x20directory\x20not\x20found:\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','1565935abEtsh','files','sourceSessionId','version','isFile','match','scope','targetScope','587198VExrsy','refreshedAt','builtin','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','3681IZgyhU','skillName','metadata','description','company','validation','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20',',\x20or\x20directory\x20name.'];a112_0x5060=function(){return _0x43830c;};return a112_0x5060();}import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x4e80a3,_0x4d92d1,_0x44d782={}){const _0xf97c4=a112_0x2f3c,_0x1bc3e4=resolvePushDirectoryRoot(_0x4e80a3),_0x2cdea7=readPushMetadataIfPresent(resolve(_0x1bc3e4,METADATA_FILE),{'ignoreInvalidMetadata':_0x44d782['ignoreInvalidMetadata']});if(_0x2cdea7?.[_0xf97c4(0x1fb)]&&_0x2cdea7[_0xf97c4(0x1fb)]!==_0x4d92d1&&!_0x44d782[_0xf97c4(0x20e)]&&!_0x44d782[_0xf97c4(0x218)])throw CliErrors[_0xf97c4(0x1ef)]('Skill\x20metadata\x20appCode\x20\x22'+_0x2cdea7[_0xf97c4(0x1fb)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4d92d1+'\x22.');const _0x389ffa=resolvePushSkillCode(_0x1bc3e4,_0x4d92d1,_0x2cdea7,_0x44d782);if(!_0x389ffa)throw CliErrors[_0xf97c4(0x1ef)](_0xf97c4(0x1f9)+SKILL_FILE+',\x20'+METADATA_FILE+_0xf97c4(0x1f1));return{'dir':_0x1bc3e4,'skillCode':_0x389ffa,'metadata':_0x2cdea7};}export function readPushDirectory(_0xb9baf0,_0x298dc0,_0x4c5e43={}){const _0x5604d0=a112_0x2f3c,_0x48fac2=resolvePushDirectoryIdentity(_0xb9baf0,_0x298dc0,_0x4c5e43),_0x515c23=_0x48fac2[_0x5604d0(0x20d)],_0x279ada=resolve(_0x515c23,SKILL_FILE);if(!existsSync(_0x279ada)||!lstatSync(_0x279ada)[_0x5604d0(0x224)]())throw CliErrors['validation'](_0x5604d0(0x205)+SKILL_FILE+':\x20'+_0x279ada);const _0x46c7c0=_0x48fac2[_0x5604d0(0x1ec)],_0x11b657=_0x4c5e43[_0x5604d0(0x227)]??_0x5604d0(0x20a);if(!_0x4c5e43[_0x5604d0(0x21d)]&&_0x46c7c0?.['scope']===_0x5604d0(0x1e8))throw CliErrors[_0x5604d0(0x1ef)](_0x5604d0(0x1f0)+METADATA_FILE+_0x5604d0(0x1fc)+_0x46c7c0[_0x5604d0(0x226)]+'\x22.');if(!_0x4c5e43[_0x5604d0(0x21d)]&&_0x11b657===_0x5604d0(0x20a)&&_0x46c7c0?.['scope']&&_0x46c7c0[_0x5604d0(0x226)]!==_0x5604d0(0x20a))throw CliErrors[_0x5604d0(0x1ef)](_0x5604d0(0x21f)+METADATA_FILE+_0x5604d0(0x1fc)+_0x46c7c0[_0x5604d0(0x226)]+'\x22.',_0x5604d0(0x216)+_0x515c23+_0x5604d0(0x1e9));const _0x31fd16=scanSkillDirectory(_0x515c23),_0x105da3=buildSkillPackage(_0x31fd16),_0x3efdcd=readFileSync(_0x279ada,'utf8'),_0x114270=_0x48fac2['skillCode'],_0x5eb00e=_0x4c5e43['ignoreMetadataForPayload']?undefined:_0x46c7c0,_0x4d18bc=readSkillDisplayName(_0x3efdcd);return{'skillCode':_0x114270,'metadata':_0x46c7c0,'frontmatterDisplayName':_0x4d18bc,'input':{'skillCode':_0x114270,'skillName':_0x4d18bc??_0x5eb00e?.[_0x5604d0(0x1eb)],'description':_0x5eb00e?.[_0x5604d0(0x1ed)],'content':_0x3efdcd,'files':_0x105da3[_0x5604d0(0x201)],'packageBase64':_0x105da3[_0x5604d0(0x207)],'tags':_0x5eb00e?.[_0x5604d0(0x219)],'version':_0x5eb00e?.[_0x5604d0(0x223)],'sourceSessionId':_0x5eb00e?.[_0x5604d0(0x222)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x43fc3c,_0x1da617,_0x58efb3,_0x5512c7={}){const _0xd52d7e=a112_0x2f3c,_0x34b0b8=resolvePushDirectoryRoot(_0x43fc3c),_0x518e60=readPushMetadataIfPresent(resolve(_0x34b0b8,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x42149f=requireRemoteScope(_0x1da617),_0x129858=readLocalSkillContent(_0x34b0b8),_0x1f7c43={..._0x1da617,'appCode':_0x1da617[_0xd52d7e(0x1fb)]??_0x58efb3,'skillName':_0x1da617[_0xd52d7e(0x1eb)]??_0x518e60?.[_0xd52d7e(0x1eb)],'description':_0x1da617[_0xd52d7e(0x1ed)]??_0x518e60?.[_0xd52d7e(0x1ed)],'tags':Array[_0xd52d7e(0x212)](_0x1da617[_0xd52d7e(0x219)])?_0x1da617[_0xd52d7e(0x219)]:_0x518e60?.[_0xd52d7e(0x219)],'sourceSessionId':_0x1da617[_0xd52d7e(0x222)]??_0x518e60?.[_0xd52d7e(0x222)],'content':_0x1da617[_0xd52d7e(0x20b)]??_0x129858},_0x38df9b=buildMetadata(_0x1f7c43,_0x42149f,_0x58efb3,contentHash(_0x129858),_0x5512c7[_0xd52d7e(0x1e7)]);writeJsonAtomic(resolve(_0x34b0b8,METADATA_FILE),_0x38df9b);}export function recordPushedRuntimeSkill(_0x34a53f,_0x1a1eab,_0xbff11,_0x200cc9={}){const _0x471e30=a112_0x2f3c,_0x589bf0=resolvePushDirectoryRoot(_0x34a53f),_0x1378b7=scanSkillDirectory(_0x589bf0),_0x1cc264=_0x1378b7['find'](_0x84e451=>_0x84e451[_0x471e30(0x213)]===SKILL_FILE),_0x7ad07d=_0x1cc264?fileText(_0x1cc264):'',_0x560827=tryNormalizePackageManifest(_0x1a1eab[_0x471e30(0x221)]),_0x717a76={..._0x1a1eab,'content':_0x1a1eab[_0x471e30(0x20b)]??_0x7ad07d,'files':_0x560827},_0x1dad15=_0x560827?normalizeLocalFiles(_0x1378b7)[_0x471e30(0x202)](_0x2d9b79=>_0x560827['files']['some'](_0x4c4f5e=>_0x4c4f5e[_0x471e30(0x213)]===_0x2d9b79[_0x471e30(0x213)])):undefined,_0x575ecf=buildMetadata(_0x717a76,_0x200cc9[_0x471e30(0x226)]??_0x471e30(0x20a),_0xbff11,contentHash(_0x717a76[_0x471e30(0x20b)]??''),_0x200cc9[_0x471e30(0x1ff)],_0x1dad15);writeJsonAtomic(resolve(_0x589bf0,METADATA_FILE),_0x575ecf);}export function deriveSkillCodeFromDirectory(_0x1554eb,_0xab5e6b){const _0x313f69=a112_0x2f3c,_0x42708f=basename(resolve(_0x1554eb)),_0x2b1f9f=_0xab5e6b+'--';return _0x42708f[_0x313f69(0x20c)](_0x2b1f9f)?_0x42708f[_0x313f69(0x21c)](_0x2b1f9f[_0x313f69(0x211)]):_0x42708f;}function resolvePushSkillCode(_0x1c5895,_0x1c9741,_0x244dc0,_0x27d0be){const _0xde6686=a112_0x2f3c,_0x15522b=deriveSkillCodeFromSkillFile(_0x1c5895)||deriveSkillCodeFromDirectory(_0x1c5895,_0x1c9741);if(_0x27d0be['ignoreMetadataSkillCode'])return _0x15522b;return _0x244dc0?.[_0xde6686(0x1f6)]?.[_0xde6686(0x200)]()||_0x15522b;}function a112_0x2f3c(_0x53a1ac,_0x311eb4){_0x53a1ac=_0x53a1ac-0x1e7;const _0x5060f8=a112_0x5060();let _0x2f3cc2=_0x5060f8[_0x53a1ac];return _0x2f3cc2;}function deriveSkillCodeFromSkillFile(_0x36bf24){const _0x178bee=a112_0x2f3c,_0x2654fc=resolve(_0x36bf24,SKILL_FILE);if(!existsSync(_0x2654fc)||!lstatSync(_0x2654fc)[_0x178bee(0x224)]())return undefined;const _0x449e16=readFileSync(_0x2654fc,_0x178bee(0x215)),_0x1918c8=_0x449e16[_0x178bee(0x225)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1918c8)return undefined;const _0x7a2240=parseFrontmatterObject(_0x1918c8[0x1]??''),_0x3f1e23=scalarToString(_0x7a2240?.[_0x178bee(0x1f5)]);return _0x3f1e23?slugifySkillName(_0x3f1e23):undefined;}function readSkillDisplayName(_0x211f5f){const _0x3b3317=a112_0x2f3c,_0x34cb49=_0x211f5f[_0x3b3317(0x225)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x34cb49)return undefined;const _0x3df531=parseFrontmatterObject(_0x34cb49[0x1]??'');return scalarToString(_0x3df531?.['displayName']);}function slugifySkillName(_0x502f2e){const _0x287773=a112_0x2f3c,_0x561bed=_0x502f2e['trim']()[_0x287773(0x1f4)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x287773(0x21b)](/^-+/,'')[_0x287773(0x21b)](/-+$/,'')[_0x287773(0x21b)](/-{2,}/g,'-');if(!_0x561bed)throw CliErrors[_0x287773(0x1ef)](_0x287773(0x1f8)+SKILL_FILE+_0x287773(0x20f));return _0x561bed;}function parseFrontmatterObject(_0x3c4fb){const _0x57eaac=a112_0x2f3c;try{const _0x32d345=a112_0x2fb5df(_0x3c4fb);return _0x32d345&&typeof _0x32d345===_0x57eaac(0x208)&&!Array['isArray'](_0x32d345)?_0x32d345:undefined;}catch{return undefined;}}function scalarToString(_0x24bc95){const _0x58cf58=a112_0x2f3c;if(typeof _0x24bc95===_0x58cf58(0x1f7))return _0x24bc95[_0x58cf58(0x200)]();if(typeof _0x24bc95===_0x58cf58(0x203)||typeof _0x24bc95===_0x58cf58(0x1fa))return String(_0x24bc95);return undefined;}function resolvePushDirectoryRoot(_0xe544f9){const _0x4ef9bd=a112_0x2f3c,_0x59d11b=resolve(_0xe544f9);if(!existsSync(_0x59d11b))throw CliErrors[_0x4ef9bd(0x1ef)](_0x4ef9bd(0x21e)+_0xe544f9);const _0xf7fb73=lstatSync(_0x59d11b);if(_0xf7fb73[_0x4ef9bd(0x214)]())return _0x59d11b;if(_0xf7fb73['isSymbolicLink']()){const _0xa80754=realpathSync(_0x59d11b);if(lstatSync(_0xa80754)[_0x4ef9bd(0x214)]())return _0xa80754;}throw CliErrors[_0x4ef9bd(0x1ef)](_0x4ef9bd(0x21e)+_0xe544f9);}function requireRemoteScope(_0x550d0e){const _0x5cda1e=a112_0x2f3c;if(_0x550d0e['scope']===_0x5cda1e(0x20a)||_0x550d0e['scope']===_0x5cda1e(0x1ee)||_0x550d0e[_0x5cda1e(0x226)]===_0x5cda1e(0x1e8))return _0x550d0e[_0x5cda1e(0x226)];throw CliErrors[_0x5cda1e(0x1ef)](_0x5cda1e(0x21a)+(_0x550d0e[_0x5cda1e(0x1f6)]||_0x5cda1e(0x209))+_0x5cda1e(0x1fd)+(_0x550d0e[_0x5cda1e(0x226)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x5a29f7){const _0x2616bb=a112_0x2f3c,_0x146cd4=resolve(_0x5a29f7,SKILL_FILE);return existsSync(_0x146cd4)&&lstatSync(_0x146cd4)['isFile']()?readFileSync(_0x146cd4,_0x2616bb(0x215)):'';}function readPushMetadataIfPresent(_0x520134,_0x89e5ba={}){const _0x19ef32=a112_0x2f3c;try{return readMetadataIfPresent(_0x520134);}catch(_0x4d69e6){if(_0x89e5ba[_0x19ef32(0x1fe)])return undefined;throw _0x4d69e6;}}
@@ -1 +1 @@
1
- function a113_0x2c79(_0x32fe69,_0x447cba){_0x32fe69=_0x32fe69-0x178;const _0x453dd8=a113_0x453d();let _0x2c7907=_0x453dd8[_0x32fe69];return _0x2c7907;}(function(_0x3b8add,_0x1cdf7c){const _0x3c5690=a113_0x2c79,_0x29e718=_0x3b8add();while(!![]){try{const _0x1a9d46=-parseInt(_0x3c5690(0x17b))/0x1+-parseInt(_0x3c5690(0x178))/0x2+-parseInt(_0x3c5690(0x187))/0x3*(-parseInt(_0x3c5690(0x185))/0x4)+-parseInt(_0x3c5690(0x17a))/0x5*(parseInt(_0x3c5690(0x181))/0x6)+-parseInt(_0x3c5690(0x17f))/0x7*(-parseInt(_0x3c5690(0x188))/0x8)+-parseInt(_0x3c5690(0x17d))/0x9+parseInt(_0x3c5690(0x179))/0xa;if(_0x1a9d46===_0x1cdf7c)break;else _0x29e718['push'](_0x29e718['shift']());}catch(_0x2ac6aa){_0x29e718['push'](_0x29e718['shift']());}}}(a113_0x453d,0x60dc1));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x2162c3){const _0x36f41f=a113_0x2c79,_0x24e8a3=_0x2162c3&&_0x2162c3[_0x36f41f(0x184)]>0x0?_0x2162c3:[_0x36f41f(0x17e),'company',_0x36f41f(0x186)],_0x4d024d=[];for(const _0x15533a of _0x24e8a3){if(!isRuntimeSkillScope(_0x15533a))throw CliErrors[_0x36f41f(0x17c)](_0x36f41f(0x183)+_0x15533a);!_0x4d024d['includes'](_0x15533a)&&_0x4d024d[_0x36f41f(0x182)](_0x15533a);}return _0x4d024d;}function a113_0x453d(){const _0x37e6b0=['16mnVbOC','1461670CruzuG','9673800MqHWUW','610arMNLa','240514FvkvCy','validation','1888443XeDLCd','personal','1780744icZvHP','company','22998ryjphF','push','Unsupported\x20runtime\x20Skill\x20scope:\x20','length','18220vpbsUL','builtin','375GEirRS'];a113_0x453d=function(){return _0x37e6b0;};return a113_0x453d();}export function isRuntimeSkillScope(_0x1d512a){const _0x42cbd9=a113_0x2c79;return _0x1d512a===_0x42cbd9(0x17e)||_0x1d512a===_0x42cbd9(0x180)||_0x1d512a===_0x42cbd9(0x186);}
1
+ function a113_0x434f(_0x4436ed,_0x31ba91){_0x4436ed=_0x4436ed-0x8b;const _0x11a05c=a113_0x11a0();let _0x434f1b=_0x11a05c[_0x4436ed];return _0x434f1b;}(function(_0x595cae,_0x244ae3){const _0x4ede00=a113_0x434f,_0x474003=_0x595cae();while(!![]){try{const _0x27dc93=parseInt(_0x4ede00(0x99))/0x1*(-parseInt(_0x4ede00(0x8b))/0x2)+parseInt(_0x4ede00(0x91))/0x3+parseInt(_0x4ede00(0x95))/0x4+parseInt(_0x4ede00(0x94))/0x5+parseInt(_0x4ede00(0x9a))/0x6*(-parseInt(_0x4ede00(0x90))/0x7)+-parseInt(_0x4ede00(0x97))/0x8*(-parseInt(_0x4ede00(0x93))/0x9)+-parseInt(_0x4ede00(0x8c))/0xa;if(_0x27dc93===_0x244ae3)break;else _0x474003['push'](_0x474003['shift']());}catch(_0x39a2c0){_0x474003['push'](_0x474003['shift']());}}}(a113_0x11a0,0xc3cd6));function a113_0x11a0(){const _0x394285=['push','3331979jEfSbq','4257222dOCvJk','company','9bYNFSQ','2078910QMDBmy','3277996CizWLq','includes','10878344aWuLyy','builtin','6658kSoZBB','12dFQciM','Unsupported\x20runtime\x20Skill\x20scope:\x20','206SDTLST','15743740HdfYZD','personal','length'];a113_0x11a0=function(){return _0x394285;};return a113_0x11a0();}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x3abb8b){const _0x21d550=a113_0x434f,_0x474f95=_0x3abb8b&&_0x3abb8b[_0x21d550(0x8e)]>0x0?_0x3abb8b:[_0x21d550(0x8d),_0x21d550(0x92),_0x21d550(0x98)],_0xae8eee=[];for(const _0x604120 of _0x474f95){if(!isRuntimeSkillScope(_0x604120))throw CliErrors['validation'](_0x21d550(0x9b)+_0x604120);!_0xae8eee[_0x21d550(0x96)](_0x604120)&&_0xae8eee[_0x21d550(0x8f)](_0x604120);}return _0xae8eee;}export function isRuntimeSkillScope(_0xdae6be){const _0x2a5b62=a113_0x434f;return _0xdae6be==='personal'||_0xdae6be===_0x2a5b62(0x92)||_0xdae6be===_0x2a5b62(0x98);}
@@ -1 +1 @@
1
- (function(_0x353b72,_0x3313d7){const _0x62372e=a115_0x136c,_0x1f1069=_0x353b72();while(!![]){try{const _0x4913a2=-parseInt(_0x62372e(0x1da))/0x1+parseInt(_0x62372e(0x1df))/0x2+-parseInt(_0x62372e(0x1d8))/0x3*(-parseInt(_0x62372e(0x1de))/0x4)+-parseInt(_0x62372e(0x1e0))/0x5+-parseInt(_0x62372e(0x1d9))/0x6*(parseInt(_0x62372e(0x1e6))/0x7)+parseInt(_0x62372e(0x1d4))/0x8*(parseInt(_0x62372e(0x1e2))/0x9)+-parseInt(_0x62372e(0x1dd))/0xa;if(_0x4913a2===_0x3313d7)break;else _0x1f1069['push'](_0x1f1069['shift']());}catch(_0x5c3451){_0x1f1069['push'](_0x1f1069['shift']());}}}(a115_0x35ce,0x89be1));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a115_0x35ce(){const _0x495d2d=['677408kqksTl','validation','sort','6356840gdJHZB','3399108niXKWU','1050676OhtePQ','419945goIqxb','endsWith','2013885THyNZn','from','validation_error','entries','14gXPAEa','code','name','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','40cayOTW','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','path','map','3NCIwGw','1597998tlbgwN'];a115_0x35ce=function(){return _0x495d2d;};return a115_0x35ce();}function a115_0x136c(_0x5aade7,_0xf7d7c6){_0x5aade7=_0x5aade7-0x1d2;const _0x35ce38=a115_0x35ce();let _0x136c74=_0x35ce38[_0x5aade7];return _0x136c74;}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x200736){const _0x4597ad=a115_0x136c,_0x1cebae={};for(const _0x3d092b of normalizeLocalFiles(_0x200736)){_0x1cebae[_0x3d092b[_0x4597ad(0x1d6)]]=fileContent(_0x3d092b);}return Buffer[_0x4597ad(0x1e3)](zipSync(_0x1cebae,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x28b26f){const _0xf3c9dc=a115_0x136c;if(_0x28b26f[_0xf3c9dc(0x1d3)]<0x16)throw CliErrors[_0xf3c9dc(0x1db)](_0xf3c9dc(0x1d2));let _0x23dd4e;try{_0x23dd4e=unzipSync(_0x28b26f,{'filter'(_0x17d87b){const _0x44099c=_0xf3c9dc,_0x491c5b=normalizeSkillRelativePath(_0x17d87b[_0x44099c(0x1e8)]);if(_0x491c5b[_0x44099c(0x1e1)]('/'))throw CliErrors['validation'](_0x44099c(0x1d5)+_0x491c5b);return!![];}});}catch(_0x1b6a43){if(isRuntimeSkillValidationError(_0x1b6a43))throw _0x1b6a43;throw CliErrors['validation'](_0xf3c9dc(0x1d2));}return Object[_0xf3c9dc(0x1e5)](_0x23dd4e)[_0xf3c9dc(0x1d7)](([_0x5d3b86,_0xdc75f1])=>({'path':normalizeSkillRelativePath(_0x5d3b86),'bytes':Buffer['from'](_0xdc75f1)}))[_0xf3c9dc(0x1dc)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x34bfc5){const _0x3e6b87=a115_0x136c;return typeof _0x34bfc5==='object'&&_0x34bfc5!==null&&_0x3e6b87(0x1e7)in _0x34bfc5&&_0x34bfc5['code']===_0x3e6b87(0x1e4);}
1
+ const a115_0x3e1aee=a115_0xb949;(function(_0x31c8ac,_0x2e1ae8){const _0x501ea8=a115_0xb949,_0x25071a=_0x31c8ac();while(!![]){try{const _0x60bdc9=-parseInt(_0x501ea8(0x1c8))/0x1*(parseInt(_0x501ea8(0x1bd))/0x2)+-parseInt(_0x501ea8(0x1c1))/0x3+parseInt(_0x501ea8(0x1bb))/0x4*(-parseInt(_0x501ea8(0x1b4))/0x5)+parseInt(_0x501ea8(0x1c3))/0x6+parseInt(_0x501ea8(0x1b6))/0x7*(-parseInt(_0x501ea8(0x1b5))/0x8)+-parseInt(_0x501ea8(0x1c2))/0x9+-parseInt(_0x501ea8(0x1c4))/0xa*(-parseInt(_0x501ea8(0x1b2))/0xb);if(_0x60bdc9===_0x2e1ae8)break;else _0x25071a['push'](_0x25071a['shift']());}catch(_0x3efef1){_0x25071a['push'](_0x25071a['shift']());}}}(a115_0x2bf1,0xe981d));function a115_0xb949(_0x3839c7,_0x5abb20){_0x3839c7=_0x3839c7-0x1b0;const _0x2bf122=a115_0x2bf1();let _0xb949e1=_0x2bf122[_0x3839c7];return _0xb949e1;}function a115_0x2bf1(){const _0x4b785c=['Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','2BCuAaK','sort','1980-01-01T00:00:00.000Z','36597coaPlG','validation_error','8055655fbYVMg','7145464qkFBvd','14oPqIRl','entries','endsWith','code','path','4pccIpU','object','304878AzFTmI','validation','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','from','2206530GiFopa','4215015HhLoyc','262452cbycSN','17490RnMHdz','name','map'];a115_0x2bf1=function(){return _0x4b785c;};return a115_0x2bf1();}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a115_0x3e1aee(0x1b1));export function createDeterministicZipPackage(_0x29a96f){const _0x5022c7=a115_0x3e1aee,_0x207d32={};for(const _0x394370 of normalizeLocalFiles(_0x29a96f)){_0x207d32[_0x394370[_0x5022c7(0x1ba)]]=fileContent(_0x394370);}return Buffer[_0x5022c7(0x1c0)](zipSync(_0x207d32,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x58476b){const _0x3cee20=a115_0x3e1aee;if(_0x58476b['length']<0x16)throw CliErrors['validation'](_0x3cee20(0x1bf));let _0x1a06b3;try{_0x1a06b3=unzipSync(_0x58476b,{'filter'(_0x2b2357){const _0x1ea8f6=_0x3cee20,_0x538078=normalizeSkillRelativePath(_0x2b2357[_0x1ea8f6(0x1c5)]);if(_0x538078[_0x1ea8f6(0x1b8)]('/'))throw CliErrors['validation'](_0x1ea8f6(0x1c7)+_0x538078);return!![];}});}catch(_0x499f83){if(isRuntimeSkillValidationError(_0x499f83))throw _0x499f83;throw CliErrors[_0x3cee20(0x1be)](_0x3cee20(0x1bf));}return Object[_0x3cee20(0x1b7)](_0x1a06b3)[_0x3cee20(0x1c6)](([_0x1570af,_0x133aa2])=>({'path':normalizeSkillRelativePath(_0x1570af),'bytes':Buffer[_0x3cee20(0x1c0)](_0x133aa2)}))[_0x3cee20(0x1b0)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x563a3e){const _0x4cac8e=a115_0x3e1aee;return typeof _0x563a3e===_0x4cac8e(0x1bc)&&_0x563a3e!==null&&_0x4cac8e(0x1b9)in _0x563a3e&&_0x563a3e[_0x4cac8e(0x1b9)]===_0x4cac8e(0x1b3);}
@@ -1 +1 @@
1
- (function(_0x212231,_0x1cb8b4){const _0x44da25=a116_0x11e3,_0x17927a=_0x212231();while(!![]){try{const _0x3d116e=-parseInt(_0x44da25(0x1c9))/0x1*(-parseInt(_0x44da25(0x1e9))/0x2)+-parseInt(_0x44da25(0x1db))/0x3+parseInt(_0x44da25(0x1d2))/0x4+-parseInt(_0x44da25(0x1e2))/0x5*(-parseInt(_0x44da25(0x1d1))/0x6)+parseInt(_0x44da25(0x1d9))/0x7+-parseInt(_0x44da25(0x1e5))/0x8+parseInt(_0x44da25(0x1d6))/0x9*(-parseInt(_0x44da25(0x1c5))/0xa);if(_0x3d116e===_0x1cb8b4)break;else _0x17927a['push'](_0x17927a['shift']());}catch(_0x464daf){_0x17927a['push'](_0x17927a['shift']());}}}(a116_0xa7bd,0xf0f4e));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(_0x25a151){const _0x4082af=a116_0x11e3,_0x49e3dd=normalizeLocalFiles(_0x25a151);if(!_0x49e3dd[_0x4082af(0x1c2)](_0x2984c8=>_0x2984c8[_0x4082af(0x1c8)]===SKILL_FILE))throw CliErrors[_0x4082af(0x1da)](_0x4082af(0x1d3)+SKILL_FILE+_0x4082af(0x1ca));const _0x5c5ab2=localFilesToManifestFiles(_0x49e3dd),_0x3594ed=createDeterministicZipPackage(_0x49e3dd);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5c5ab2),'zipSha256':bufferSha256(_0x3594ed),'zipSize':_0x3594ed['length'],'files':_0x5c5ab2},'packageBytes':_0x3594ed,'packageBase64':_0x3594ed['toString'](_0x4082af(0x1c3))};}export function verifyRuntimeSkillPackage(_0x2e8765,_0x10ddcf){const _0x36ea50=normalizePackageManifest(_0x2e8765,{'requireOssPath':![]});if(!_0x36ea50)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x36ea50,_0x10ddcf);}function a116_0xa7bd(){const _0x146390=['2072224oUEktt','Missing\x20','zipSize','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','153hVmEFS','length','sha256','13171186XsjpYd','validation','2853879Myfbjf','ossPath','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','1090YULjpf','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','5872888rOOSZI','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','files','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','268EwLUZB','toLowerCase','map','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','push','treeSha256','trim','size','schemaVersion','Duplicate\x20Skill\x20package\x20entry:\x20','some','base64','isSafeInteger','1100860WfFpJx','get','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','path','5303JAWQFa','\x20in\x20Skill\x20file\x20package.','zipSha256','isArray','set','string','requireOssPath','bytes','39456dCpVps'];a116_0xa7bd=function(){return _0x146390;};return a116_0xa7bd();}export function verifyRuntimeSkillBundle(_0x3c999d,_0x2bd1e0){const _0x505a8b=a116_0x11e3,_0x5821b3=normalizePackageManifest(_0x3c999d,{'requireOssPath':![]});if(!_0x5821b3)throw CliErrors[_0x505a8b(0x1da)](_0x505a8b(0x1e6));return extractAndVerifyPackageFiles(_0x5821b3,_0x2bd1e0);}export function tryNormalizePackageManifest(_0x2c6543){return normalizePackageManifest(_0x2c6543,{'requireOssPath':![]});}export function requirePackageBytes(_0x234aa4,_0x4f5e07){const _0x47b82d=a116_0x11e3;if(!_0x4f5e07||_0x4f5e07['length']===0x0)throw CliErrors['validation'](_0x47b82d(0x1e1)+_0x234aa4);return _0x4f5e07;}export function extractDownloadedPackage(_0x592304){const _0x366acd=a116_0x11e3,_0x59ed84=parseZipPackage(_0x592304)[_0x366acd(0x1eb)](_0x556607=>({'path':_0x556607['path'],'bytes':_0x556607[_0x366acd(0x1d0)]}));if(!_0x59ed84[_0x366acd(0x1c2)](_0x2d4b85=>_0x2d4b85[_0x366acd(0x1c8)]===SKILL_FILE))throw CliErrors[_0x366acd(0x1da)](_0x366acd(0x1e3)+SKILL_FILE+'.');return normalizeLocalFiles(_0x59ed84);}export function localFilesToManifestFiles(_0x247cb1){const _0xcf738e=a116_0x11e3;return normalizeLocalFiles(_0x247cb1)['map'](_0x1373d2=>({'path':_0x1373d2[_0xcf738e(0x1c8)],'sha256':fileHash(_0x1373d2),'size':fileContent(_0x1373d2)[_0xcf738e(0x1d7)]}));}function normalizePackageManifest(_0x6de4c9,_0x4295f4){const _0x520072=a116_0x11e3;if(!_0x6de4c9||typeof _0x6de4c9!=='object'||Array['isArray'](_0x6de4c9))return undefined;const _0x4d7671=_0x6de4c9,_0x248312=typeof _0x4d7671[_0x520072(0x1dc)]===_0x520072(0x1ce)?_0x4d7671['ossPath'][_0x520072(0x1ef)]():undefined;if(_0x4295f4[_0x520072(0x1cf)]&&!_0x248312)return undefined;if(!Array[_0x520072(0x1cc)](_0x4d7671[_0x520072(0x1e7)])||_0x4d7671[_0x520072(0x1e7)][_0x520072(0x1d7)]===0x0)return undefined;if(!isSha256Hex(_0x4d7671[_0x520072(0x1ee)]))throw CliErrors['validation'](_0x520072(0x1e0));if(!isSha256Hex(_0x4d7671['zipSha256']))throw CliErrors[_0x520072(0x1da)](_0x520072(0x1c7));if(!Number[_0x520072(0x1c4)](_0x4d7671['zipSize'])||_0x4d7671['zipSize']<0x0)throw CliErrors[_0x520072(0x1da)](_0x520072(0x1ec));const _0x108f7d=normalizeManifestFiles(_0x4d7671['files']);if(!_0x108f7d[_0x520072(0x1c2)](_0x446e0c=>_0x446e0c[_0x520072(0x1c8)]===SKILL_FILE))throw CliErrors[_0x520072(0x1da)](_0x520072(0x1d5)+SKILL_FILE+'.');const _0x537b88=fileTreeHash(_0x108f7d);if(_0x537b88!==_0x4d7671[_0x520072(0x1ee)][_0x520072(0x1ea)]())throw CliErrors['validation'](_0x520072(0x1df));return{'schemaVersion':Number['isSafeInteger'](_0x4d7671[_0x520072(0x1c0)])?_0x4d7671[_0x520072(0x1c0)]:0x2,'ossPath':_0x248312,'treeSha256':_0x537b88,'zipSha256':_0x4d7671[_0x520072(0x1cb)][_0x520072(0x1ea)](),'zipSize':_0x4d7671[_0x520072(0x1d4)],'files':_0x108f7d};}function a116_0x11e3(_0x56bb8e,_0x184b40){_0x56bb8e=_0x56bb8e-0x1bf;const _0xa7bd22=a116_0xa7bd();let _0x11e3d2=_0xa7bd22[_0x56bb8e];return _0x11e3d2;}function extractAndVerifyPackage(_0x776ace,_0x223a55){const _0x8585f=a116_0x11e3,_0x2ba0d7=normalizePackageManifest(_0x776ace,{'requireOssPath':![]});if(!_0x2ba0d7)throw CliErrors[_0x8585f(0x1da)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x223a55[_0x8585f(0x1d7)]!==_0x2ba0d7[_0x8585f(0x1d4)])throw CliErrors[_0x8585f(0x1da)](_0x8585f(0x1de));const _0x23ce22=bufferSha256(_0x223a55);if(_0x23ce22!==_0x2ba0d7[_0x8585f(0x1cb)])throw CliErrors[_0x8585f(0x1da)](_0x8585f(0x1dd));return extractAndVerifyPackageFiles(_0x2ba0d7,_0x223a55);}function extractAndVerifyPackageFiles(_0x9b294a,_0x351edc){const _0x2f42cf=a116_0x11e3,_0x465ec6=parseZipPackage(_0x351edc);if(_0x465ec6['length']!==_0x9b294a[_0x2f42cf(0x1e7)][_0x2f42cf(0x1d7)])throw CliErrors[_0x2f42cf(0x1da)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x18e0c1=new Map();for(const _0x1244c2 of _0x465ec6){if(_0x18e0c1['has'](_0x1244c2['path']))throw CliErrors['validation'](_0x2f42cf(0x1c1)+_0x1244c2[_0x2f42cf(0x1c8)]);_0x18e0c1[_0x2f42cf(0x1cd)](_0x1244c2[_0x2f42cf(0x1c8)],_0x1244c2);}const _0x3e3bc4=[];for(const _0x2af639 of _0x9b294a[_0x2f42cf(0x1e7)]){const _0x14dd08=_0x18e0c1[_0x2f42cf(0x1c6)](_0x2af639[_0x2f42cf(0x1c8)]);if(!_0x14dd08)throw CliErrors[_0x2f42cf(0x1da)](_0x2f42cf(0x1e8)+_0x2af639[_0x2f42cf(0x1c8)]);if(_0x14dd08['bytes'][_0x2f42cf(0x1d7)]!==_0x2af639[_0x2f42cf(0x1bf)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x2af639[_0x2f42cf(0x1c8)]);const _0x194df3=bufferSha256(_0x14dd08[_0x2f42cf(0x1d0)]);if(_0x194df3!==_0x2af639[_0x2f42cf(0x1d8)])throw CliErrors[_0x2f42cf(0x1da)](_0x2f42cf(0x1e4)+_0x2af639[_0x2f42cf(0x1c8)]);_0x3e3bc4[_0x2f42cf(0x1ed)]({'path':_0x2af639['path'],'bytes':_0x14dd08[_0x2f42cf(0x1d0)]});}return normalizeLocalFiles(_0x3e3bc4);}
1
+ (function(_0x5dbd13,_0xd38f3f){const _0xe268f6=a116_0x192a,_0x488d65=_0x5dbd13();while(!![]){try{const _0x212ab0=-parseInt(_0xe268f6(0x174))/0x1*(-parseInt(_0xe268f6(0x16b))/0x2)+-parseInt(_0xe268f6(0x162))/0x3*(parseInt(_0xe268f6(0x17b))/0x4)+parseInt(_0xe268f6(0x182))/0x5*(-parseInt(_0xe268f6(0x177))/0x6)+-parseInt(_0xe268f6(0x16a))/0x7+-parseInt(_0xe268f6(0x163))/0x8+parseInt(_0xe268f6(0x15f))/0x9+parseInt(_0xe268f6(0x166))/0xa;if(_0x212ab0===_0xd38f3f)break;else _0x488d65['push'](_0x488d65['shift']());}catch(_0x4ca4b4){_0x488d65['push'](_0x488d65['shift']());}}}(a116_0x2f6b,0xee0e5));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';function a116_0x192a(_0x3ac897,_0xa0993e){_0x3ac897=_0x3ac897-0x159;const _0x2f6b5c=a116_0x2f6b();let _0x192a9d=_0x2f6b5c[_0x3ac897];return _0x192a9d;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a116_0x2f6b(){const _0x3818ff=['map','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','base64','some','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Duplicate\x20Skill\x20package\x20entry:\x20','path','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','1132892fSdDGY','isSafeInteger','get','6TJyUYU','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','set','trim','4RsiLZX','bytes','Runtime\x20Skill\x20package\x20is\x20missing\x20','zipSha256','zipSize','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','1981580uJNkuO','files','length','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','string','validation','object','schemaVersion','treeSha256','7266141HRaFst','toLowerCase','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','97710rWApLf','12445280cppCgq','requireOssPath','has','16008160VXxAuU','ossPath','isArray','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','4070038KBFOjw','2bIiShz'];a116_0x2f6b=function(){return _0x3818ff;};return a116_0x2f6b();}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x563ca8){const _0x420eaf=a116_0x192a,_0x218efc=normalizeLocalFiles(_0x563ca8);if(!_0x218efc['some'](_0x2093aa=>_0x2093aa[_0x420eaf(0x172)]===SKILL_FILE))throw CliErrors[_0x420eaf(0x15b)]('Missing\x20'+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x39948b=localFilesToManifestFiles(_0x218efc),_0xdd9415=createDeterministicZipPackage(_0x218efc);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x39948b),'zipSha256':bufferSha256(_0xdd9415),'zipSize':_0xdd9415[_0x420eaf(0x184)],'files':_0x39948b},'packageBytes':_0xdd9415,'packageBase64':_0xdd9415['toString'](_0x420eaf(0x16e))};}export function verifyRuntimeSkillPackage(_0x47942d,_0x1e7e2c){const _0x4258df=normalizePackageManifest(_0x47942d,{'requireOssPath':![]});if(!_0x4258df)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x4258df,_0x1e7e2c);}export function verifyRuntimeSkillBundle(_0x38e20a,_0x5f4a86){const _0x1d7de8=a116_0x192a,_0x2565ce=normalizePackageManifest(_0x38e20a,{'requireOssPath':![]});if(!_0x2565ce)throw CliErrors[_0x1d7de8(0x15b)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x2565ce,_0x5f4a86);}export function tryNormalizePackageManifest(_0x18f768){return normalizePackageManifest(_0x18f768,{'requireOssPath':![]});}export function requirePackageBytes(_0x1bdb76,_0x445a80){const _0x3f5090=a116_0x192a;if(!_0x445a80||_0x445a80[_0x3f5090(0x184)]===0x0)throw CliErrors[_0x3f5090(0x15b)](_0x3f5090(0x173)+_0x1bdb76);return _0x445a80;}export function extractDownloadedPackage(_0x332516){const _0x202a33=a116_0x192a,_0x3e9a4e=parseZipPackage(_0x332516)[_0x202a33(0x16c)](_0x5c7137=>({'path':_0x5c7137[_0x202a33(0x172)],'bytes':_0x5c7137[_0x202a33(0x17c)]}));if(!_0x3e9a4e[_0x202a33(0x16f)](_0x23e532=>_0x23e532[_0x202a33(0x172)]===SKILL_FILE))throw CliErrors[_0x202a33(0x15b)](_0x202a33(0x17d)+SKILL_FILE+'.');return normalizeLocalFiles(_0x3e9a4e);}export function localFilesToManifestFiles(_0x2d92e0){const _0x5656dd=a116_0x192a;return normalizeLocalFiles(_0x2d92e0)[_0x5656dd(0x16c)](_0x1607dc=>({'path':_0x1607dc['path'],'sha256':fileHash(_0x1607dc),'size':fileContent(_0x1607dc)[_0x5656dd(0x184)]}));}function normalizePackageManifest(_0x7647d6,_0x5e5117){const _0x21991f=a116_0x192a;if(!_0x7647d6||typeof _0x7647d6!==_0x21991f(0x15c)||Array['isArray'](_0x7647d6))return undefined;const _0x4aef36=_0x7647d6,_0x571791=typeof _0x4aef36[_0x21991f(0x167)]===_0x21991f(0x15a)?_0x4aef36['ossPath'][_0x21991f(0x17a)]():undefined;if(_0x5e5117[_0x21991f(0x164)]&&!_0x571791)return undefined;if(!Array[_0x21991f(0x168)](_0x4aef36[_0x21991f(0x183)])||_0x4aef36[_0x21991f(0x183)]['length']===0x0)return undefined;if(!isSha256Hex(_0x4aef36[_0x21991f(0x15e)]))throw CliErrors[_0x21991f(0x15b)](_0x21991f(0x180));if(!isSha256Hex(_0x4aef36[_0x21991f(0x17e)]))throw CliErrors[_0x21991f(0x15b)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x21991f(0x175)](_0x4aef36[_0x21991f(0x17f)])||_0x4aef36[_0x21991f(0x17f)]<0x0)throw CliErrors[_0x21991f(0x15b)](_0x21991f(0x161));const _0x3afdfa=normalizeManifestFiles(_0x4aef36[_0x21991f(0x183)]);if(!_0x3afdfa[_0x21991f(0x16f)](_0xfa266a=>_0xfa266a['path']===SKILL_FILE))throw CliErrors[_0x21991f(0x15b)](_0x21991f(0x159)+SKILL_FILE+'.');const _0x50c94c=fileTreeHash(_0x3afdfa);if(_0x50c94c!==_0x4aef36[_0x21991f(0x15e)][_0x21991f(0x160)]())throw CliErrors[_0x21991f(0x15b)](_0x21991f(0x170));return{'schemaVersion':Number[_0x21991f(0x175)](_0x4aef36[_0x21991f(0x15d)])?_0x4aef36[_0x21991f(0x15d)]:0x2,'ossPath':_0x571791,'treeSha256':_0x50c94c,'zipSha256':_0x4aef36[_0x21991f(0x17e)][_0x21991f(0x160)](),'zipSize':_0x4aef36[_0x21991f(0x17f)],'files':_0x3afdfa};}function extractAndVerifyPackage(_0x2835cf,_0x31f317){const _0x9631ce=a116_0x192a,_0x8c8d87=normalizePackageManifest(_0x2835cf,{'requireOssPath':![]});if(!_0x8c8d87)throw CliErrors[_0x9631ce(0x15b)](_0x9631ce(0x169));if(_0x31f317[_0x9631ce(0x184)]!==_0x8c8d87[_0x9631ce(0x17f)])throw CliErrors[_0x9631ce(0x15b)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x3592ae=bufferSha256(_0x31f317);if(_0x3592ae!==_0x8c8d87[_0x9631ce(0x17e)])throw CliErrors[_0x9631ce(0x15b)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x8c8d87,_0x31f317);}function extractAndVerifyPackageFiles(_0x48be4b,_0x24aeab){const _0x565855=a116_0x192a,_0x596580=parseZipPackage(_0x24aeab);if(_0x596580['length']!==_0x48be4b[_0x565855(0x183)][_0x565855(0x184)])throw CliErrors[_0x565855(0x15b)](_0x565855(0x178));const _0x3b3219=new Map();for(const _0x2f7eb0 of _0x596580){if(_0x3b3219[_0x565855(0x165)](_0x2f7eb0['path']))throw CliErrors[_0x565855(0x15b)](_0x565855(0x171)+_0x2f7eb0[_0x565855(0x172)]);_0x3b3219[_0x565855(0x179)](_0x2f7eb0[_0x565855(0x172)],_0x2f7eb0);}const _0x4004be=[];for(const _0x27b3d4 of _0x48be4b[_0x565855(0x183)]){const _0x1be3d5=_0x3b3219[_0x565855(0x176)](_0x27b3d4[_0x565855(0x172)]);if(!_0x1be3d5)throw CliErrors[_0x565855(0x15b)](_0x565855(0x181)+_0x27b3d4[_0x565855(0x172)]);if(_0x1be3d5[_0x565855(0x17c)]['length']!==_0x27b3d4['size'])throw CliErrors[_0x565855(0x15b)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x27b3d4[_0x565855(0x172)]);const _0x309923=bufferSha256(_0x1be3d5[_0x565855(0x17c)]);if(_0x309923!==_0x27b3d4['sha256'])throw CliErrors[_0x565855(0x15b)](_0x565855(0x16d)+_0x27b3d4[_0x565855(0x172)]);_0x4004be['push']({'path':_0x27b3d4['path'],'bytes':_0x1be3d5['bytes']});}return normalizeLocalFiles(_0x4004be);}
@@ -1 +1 @@
1
- function a117_0x2ad7(_0x4d07cf,_0x32f9fe){_0x4d07cf=_0x4d07cf-0x11b;var _0x3ca236=a117_0x3ca2();var _0x2ad7e0=_0x3ca236[_0x4d07cf];return _0x2ad7e0;}(function(_0x977936,_0x41d3dd){var _0x4e4d5b=a117_0x2ad7,_0x583719=_0x977936();while(!![]){try{var _0x50242b=parseInt(_0x4e4d5b(0x11b))/0x1+parseInt(_0x4e4d5b(0x124))/0x2*(-parseInt(_0x4e4d5b(0x126))/0x3)+parseInt(_0x4e4d5b(0x11d))/0x4+-parseInt(_0x4e4d5b(0x125))/0x5*(-parseInt(_0x4e4d5b(0x121))/0x6)+parseInt(_0x4e4d5b(0x123))/0x7*(parseInt(_0x4e4d5b(0x122))/0x8)+parseInt(_0x4e4d5b(0x11c))/0x9*(parseInt(_0x4e4d5b(0x120))/0xa)+-parseInt(_0x4e4d5b(0x11e))/0xb*(parseInt(_0x4e4d5b(0x11f))/0xc);if(_0x50242b===_0x41d3dd)break;else _0x583719['push'](_0x583719['shift']());}catch(_0x234dfa){_0x583719['push'](_0x583719['shift']());}}}(a117_0x3ca2,0xe7f6c));function a117_0x3ca2(){var _0x22aa5=['378742rQPqZh','494jOuTCk','607030pKSUkL','8259MhNcsV','612744GHCVuy','1899rbKhEV','525932FRRHAq','121dVbCql','1601364XrPqLa','4670hJTqSs','66cBDuYc','136ZFXcTf'];a117_0x3ca2=function(){return _0x22aa5;};return a117_0x3ca2();}export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.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';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(_0x2f4d0e,_0x2eb37d){var _0x244224=a117_0x135d,_0x18c30f=_0x2f4d0e();while(!![]){try{var _0x4e33c=parseInt(_0x244224(0x130))/0x1*(parseInt(_0x244224(0x13a))/0x2)+-parseInt(_0x244224(0x133))/0x3*(parseInt(_0x244224(0x139))/0x4)+-parseInt(_0x244224(0x137))/0x5*(parseInt(_0x244224(0x134))/0x6)+-parseInt(_0x244224(0x136))/0x7+-parseInt(_0x244224(0x138))/0x8*(-parseInt(_0x244224(0x135))/0x9)+-parseInt(_0x244224(0x131))/0xa+-parseInt(_0x244224(0x12f))/0xb*(-parseInt(_0x244224(0x132))/0xc);if(_0x4e33c===_0x2eb37d)break;else _0x18c30f['push'](_0x18c30f['shift']());}catch(_0x45d234){_0x18c30f['push'](_0x18c30f['shift']());}}}(a117_0x56a8,0x4da02));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a117_0x135d(_0x175fb1,_0x1a410a){_0x175fb1=_0x175fb1-0x12f;var _0x56a870=a117_0x56a8();var _0x135d6a=_0x56a870[_0x175fb1];return _0x135d6a;}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';function a117_0x56a8(){var _0x50b4cf=['1743420EgUShb','1045VaeVct','2872IRmsrZ','236kYAxzD','2IlMmlf','14486450kDYlwJ','14331NCnXkY','4431410zhPSyt','12uEsRps','1077OYkZFF','10332fAGUGR','1503nGmjtM'];a117_0x56a8=function(){return _0x50b4cf;};return a117_0x56a8();}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- function a118_0x4a8d(_0x245524,_0x1e821d){_0x245524=_0x245524-0x168;const _0x578235=a118_0x5782();let _0x4a8dea=_0x578235[_0x245524];return _0x4a8dea;}(function(_0x4e5c52,_0x12de8a){const _0x33736f=a118_0x4a8d,_0xb0c0d8=_0x4e5c52();while(!![]){try{const _0x160bf2=-parseInt(_0x33736f(0x169))/0x1*(parseInt(_0x33736f(0x16c))/0x2)+parseInt(_0x33736f(0x16e))/0x3+parseInt(_0x33736f(0x16d))/0x4*(-parseInt(_0x33736f(0x171))/0x5)+-parseInt(_0x33736f(0x16a))/0x6+parseInt(_0x33736f(0x172))/0x7*(-parseInt(_0x33736f(0x16f))/0x8)+parseInt(_0x33736f(0x170))/0x9+-parseInt(_0x33736f(0x168))/0xa*(-parseInt(_0x33736f(0x16b))/0xb);if(_0x160bf2===_0x12de8a)break;else _0xb0c0d8['push'](_0xb0c0d8['shift']());}catch(_0x23483e){_0xb0c0d8['push'](_0xb0c0d8['shift']());}}}(a118_0x5782,0x40451));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a118_0x5782(){const _0xcdf782=['29018tGtuXD','3504GuHLVT','327483wmdFxE','182568cJnFaW','1641843EJzkNl','110JarBKR','56fCoNVw','550EnDaOF','19VhBEYe','1846758AwJXMP','151393bxSFnS'];a118_0x5782=function(){return _0xcdf782;};return a118_0x5782();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ function a118_0x3e7a(_0x9c07d8,_0x2d2960){_0x9c07d8=_0x9c07d8-0x125;const _0x22690c=a118_0x2269();let _0x3e7a36=_0x22690c[_0x9c07d8];return _0x3e7a36;}function a118_0x2269(){const _0x5ec704=['3qYCpIX','15054200yovIXV','3632410dWGYCw','70239pUIPDk','6643ftOFPP','295758UWiNQo','2932748xCmqLr','6234UOXcFs','34vycLKK','112DzKTny','7316903BZbBQE'];a118_0x2269=function(){return _0x5ec704;};return a118_0x2269();}(function(_0x36b4d7,_0x1b62ac){const _0x1448e1=a118_0x3e7a,_0x1c1085=_0x36b4d7();while(!![]){try{const _0x311305=parseInt(_0x1448e1(0x12c))/0x1*(-parseInt(_0x1448e1(0x126))/0x2)+-parseInt(_0x1448e1(0x129))/0x3*(-parseInt(_0x1448e1(0x12f))/0x4)+parseInt(_0x1448e1(0x12b))/0x5+-parseInt(_0x1448e1(0x125))/0x6*(-parseInt(_0x1448e1(0x12d))/0x7)+-parseInt(_0x1448e1(0x127))/0x8*(-parseInt(_0x1448e1(0x12e))/0x9)+-parseInt(_0x1448e1(0x12a))/0xa+parseInt(_0x1448e1(0x128))/0xb;if(_0x311305===_0x1b62ac)break;else _0x1c1085['push'](_0x1c1085['shift']());}catch(_0x3d176a){_0x1c1085['push'](_0x1c1085['shift']());}}}(a118_0x2269,0xd4c0e));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- function a119_0xee9d(){const _0x135a13=['format','printf','7xAwkow','clearLogs','currentRawCommand','combine','10HUjgMF','readLogs','1447568rnuggr','stringify','addColors','map','rawCommand','415lSXvun','message','yellow','825917kwvFLE','toISOString','join','filter','command','utf8','3408XRuTNl','unknown','setRawCommand','clear','Failed:\x20','writeFileSync','duration','22258709RfhpLC','timestamp','green','logFileName','52RAVfMP','trim','success','File','Failed\x20to\x20clear\x20logs:','errors','20892Tsnedf','3069027CWMxit','setLogPath','winstonLogger','now','logFilePath','mkdirSync','Failed\x20to\x20read\x20logs:','initWinstonLogger','723480eInLPH','error','warn','info','existsSync'];a119_0xee9d=function(){return _0x135a13;};return a119_0xee9d();}const a119_0x18a3da=a119_0xa926;(function(_0x452f7a,_0x2e0de5){const _0x20bfa4=a119_0xa926,_0x455e6c=_0x452f7a();while(!![]){try{const _0x2d2f3b=-parseInt(_0x20bfa4(0x1e8))/0x1+-parseInt(_0x20bfa4(0x1e0))/0x2+-parseInt(_0x20bfa4(0x1ee))/0x3*(-parseInt(_0x20bfa4(0x1f9))/0x4)+-parseInt(_0x20bfa4(0x1e5))/0x5*(parseInt(_0x20bfa4(0x1ff))/0x6)+-parseInt(_0x20bfa4(0x20f))/0x7*(parseInt(_0x20bfa4(0x208))/0x8)+-parseInt(_0x20bfa4(0x200))/0x9*(-parseInt(_0x20bfa4(0x213))/0xa)+parseInt(_0x20bfa4(0x1f5))/0xb;if(_0x2d2f3b===_0x2e0de5)break;else _0x455e6c['push'](_0x455e6c['shift']());}catch(_0x3f2568){_0x455e6c['push'](_0x455e6c['shift']());}}}(a119_0xee9d,0x6de64));import a119_0x3e7011 from'winston';import a119_0x317a4f from'node:fs';import a119_0x23b657 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a119_0x18a3da(0x204)]='';[a119_0x18a3da(0x211)]='';constructor(){}[a119_0x18a3da(0x1f0)](_0x444cb2){const _0xdd77f0=a119_0x18a3da;this[_0xdd77f0(0x211)]=_0x444cb2;}[a119_0x18a3da(0x201)](_0x184a93){const _0x184832=a119_0x18a3da;this[_0x184832(0x204)]=a119_0x23b657[_0x184832(0x1ea)](_0x184a93,PRODUCT_CONFIG[_0x184832(0x1f8)]),this[_0x184832(0x202)]&&this['winstonLogger'][_0x184832(0x1f1)](),this[_0x184832(0x207)]();}['initWinstonLogger'](){const _0x2b4deb=a119_0x18a3da,_0x38f66c=a119_0x23b657['dirname'](this[_0x2b4deb(0x204)]);!a119_0x317a4f['existsSync'](_0x38f66c)&&a119_0x317a4f[_0x2b4deb(0x205)](_0x38f66c,{'recursive':!![]});const _0x392513=a119_0x3e7011[_0x2b4deb(0x20d)][_0x2b4deb(0x212)](a119_0x3e7011['format']['timestamp'](),a119_0x3e7011[_0x2b4deb(0x20d)][_0x2b4deb(0x1fe)]({'stack':!![]}),a119_0x3e7011[_0x2b4deb(0x20d)][_0x2b4deb(0x20e)](_0x2c6211=>{const _0x295601=_0x2b4deb,_0x4927ef={'timestamp':_0x2c6211[_0x295601(0x1f6)]||new Date()[_0x295601(0x1e9)](),'level':_0x2c6211['level']||_0x295601(0x20b),'command':_0x2c6211[_0x295601(0x1ec)]||_0x295601(0x1ef),'rawCommand':_0x2c6211[_0x295601(0x1e4)]||this['currentRawCommand']||undefined,'message':_0x2c6211[_0x295601(0x1e6)]||'','duration':_0x2c6211[_0x295601(0x1f4)]||undefined,'details':_0x2c6211['details']||undefined};return JSON[_0x295601(0x1e1)](_0x4927ef);}));this['winstonLogger']=a119_0x3e7011['createLogger']({'level':_0x2b4deb(0x20b),'format':_0x392513,'transports':[new a119_0x3e7011['transports'][(_0x2b4deb(0x1fc))]({'filename':this['logFilePath'],'level':_0x2b4deb(0x20b)})],'silent':![]}),a119_0x3e7011[_0x2b4deb(0x1e2)]({'success':_0x2b4deb(0x1f7),'error':'red','warn':_0x2b4deb(0x1e7),'info':'blue'});}['info'](_0x3fdcee,_0xd1a6a2,_0x20589e){const _0x3cec1e=a119_0x18a3da;if(!this[_0x3cec1e(0x204)]||!this['winstonLogger'])return;this[_0x3cec1e(0x202)]['info'](_0xd1a6a2,{'command':_0x3fdcee,'details':_0x20589e});}[a119_0x18a3da(0x1fb)](_0x471d72,_0x1eff52,_0x22e8d1,_0x3fcccc){const _0x14cabd=a119_0x18a3da;if(!this[_0x14cabd(0x204)]||!this['winstonLogger'])return;this[_0x14cabd(0x202)]['log'](_0x14cabd(0x20b),_0x1eff52,{'level':_0x14cabd(0x1fb),'command':_0x471d72,'duration':_0x22e8d1,'details':_0x3fcccc});}[a119_0x18a3da(0x209)](_0x15e97f,_0x6ba353,_0x1fd74e){const _0x1f2c1c=a119_0x18a3da;if(!this[_0x1f2c1c(0x204)]||!this[_0x1f2c1c(0x202)])return;this[_0x1f2c1c(0x202)]['error'](_0x6ba353,{'command':_0x15e97f,'details':_0x1fd74e});}[a119_0x18a3da(0x20a)](_0x42dfe0,_0x58edb7,_0x1dbbec){const _0x21ca84=a119_0x18a3da;if(!this[_0x21ca84(0x204)]||!this[_0x21ca84(0x202)])return;this['winstonLogger'][_0x21ca84(0x20a)](_0x58edb7,{'command':_0x42dfe0,'details':_0x1dbbec});}async['logTask'](_0x8aa1c4,_0x9872a8,_0x5cda9a){const _0x5590e2=a119_0x18a3da,_0x153797=Date[_0x5590e2(0x203)]();this[_0x5590e2(0x20b)](_0x8aa1c4,'Starting:\x20'+_0x9872a8);try{const _0x457c19=await _0x5cda9a(),_0x15e891=Date[_0x5590e2(0x203)]()-_0x153797;return this[_0x5590e2(0x1fb)](_0x8aa1c4,'Completed:\x20'+_0x9872a8,_0x15e891),_0x457c19;}catch(_0x59de14){const _0x38b2ac=Date['now']()-_0x153797;this[_0x5590e2(0x209)](_0x8aa1c4,_0x5590e2(0x1f2)+_0x9872a8,{'error':_0x59de14 instanceof Error?_0x59de14[_0x5590e2(0x1e6)]:String(_0x59de14),'duration':_0x38b2ac});throw _0x59de14;}}[a119_0x18a3da(0x214)](){const _0xac04d5=a119_0x18a3da;try{if(!a119_0x317a4f[_0xac04d5(0x20c)](this['logFilePath']))return[];const _0x29042e=a119_0x317a4f['readFileSync'](this[_0xac04d5(0x204)],_0xac04d5(0x1ed));return _0x29042e['split'](/\r?\n/)[_0xac04d5(0x1eb)](_0x237a18=>_0x237a18[_0xac04d5(0x1fa)]())[_0xac04d5(0x1e3)](_0x4fc843=>JSON['parse'](_0x4fc843));}catch(_0x1581a){return console[_0xac04d5(0x20a)](_0xac04d5(0x206),_0x1581a),[];}}[a119_0x18a3da(0x210)](){const _0x26cd91=a119_0x18a3da;try{a119_0x317a4f[_0x26cd91(0x20c)](this[_0x26cd91(0x204)])&&a119_0x317a4f[_0x26cd91(0x1f3)](this[_0x26cd91(0x204)],'',_0x26cd91(0x1ed));}catch(_0x3ca5fa){console[_0x26cd91(0x20a)](_0x26cd91(0x1fd),_0x3ca5fa);}}['getWinstonInstance'](){const _0x5f9b13=a119_0x18a3da;return this[_0x5f9b13(0x202)];}}function a119_0xa926(_0x2bd93a,_0x2210a6){_0x2bd93a=_0x2bd93a-0x1e0;const _0xee9d55=a119_0xee9d();let _0xa92667=_0xee9d55[_0x2bd93a];return _0xa92667;}export const logger=new Logger();
1
+ const a119_0x379f79=a119_0x4ceb;(function(_0x5bbc3d,_0x4969c3){const _0x3256f1=a119_0x4ceb,_0x28e385=_0x5bbc3d();while(!![]){try{const _0x208253=-parseInt(_0x3256f1(0xce))/0x1*(parseInt(_0x3256f1(0xe3))/0x2)+parseInt(_0x3256f1(0xfc))/0x3+-parseInt(_0x3256f1(0xe6))/0x4*(-parseInt(_0x3256f1(0xf6))/0x5)+parseInt(_0x3256f1(0xf3))/0x6*(-parseInt(_0x3256f1(0xe8))/0x7)+parseInt(_0x3256f1(0xe5))/0x8*(parseInt(_0x3256f1(0xf5))/0x9)+-parseInt(_0x3256f1(0xe7))/0xa*(parseInt(_0x3256f1(0xd7))/0xb)+-parseInt(_0x3256f1(0xed))/0xc*(-parseInt(_0x3256f1(0xd6))/0xd);if(_0x208253===_0x4969c3)break;else _0x28e385['push'](_0x28e385['shift']());}catch(_0xd1fb7){_0x28e385['push'](_0x28e385['shift']());}}}(a119_0x5736,0x5a7a7));import a119_0x4259b3 from'winston';import a119_0x191b37 from'node:fs';function a119_0x4ceb(_0x143e38,_0x544a5c){_0x143e38=_0x143e38-0xcb;const _0x5736df=a119_0x5736();let _0x4cebfc=_0x5736df[_0x143e38];return _0x4cebfc;}import a119_0x275ba5 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a119_0x379f79(0xf4)]='';[a119_0x379f79(0xee)]='';constructor(){}['setRawCommand'](_0xcddf16){const _0x4b40af=a119_0x379f79;this[_0x4b40af(0xee)]=_0xcddf16;}[a119_0x379f79(0xf1)](_0x1b518d){const _0x474326=a119_0x379f79;this[_0x474326(0xf4)]=a119_0x275ba5[_0x474326(0xcc)](_0x1b518d,PRODUCT_CONFIG[_0x474326(0xf2)]),this[_0x474326(0xd1)]&&this[_0x474326(0xd1)][_0x474326(0xdd)](),this[_0x474326(0xf9)]();}[a119_0x379f79(0xf9)](){const _0x363d36=a119_0x379f79,_0x2173f3=a119_0x275ba5[_0x363d36(0xe2)](this[_0x363d36(0xf4)]);!a119_0x191b37['existsSync'](_0x2173f3)&&a119_0x191b37[_0x363d36(0xfe)](_0x2173f3,{'recursive':!![]});const _0x261662=a119_0x4259b3[_0x363d36(0xfa)][_0x363d36(0x103)](a119_0x4259b3[_0x363d36(0xfa)][_0x363d36(0x101)](),a119_0x4259b3[_0x363d36(0xfa)][_0x363d36(0xf0)]({'stack':!![]}),a119_0x4259b3[_0x363d36(0xfa)][_0x363d36(0xd5)](_0x274d01=>{const _0x5df8ab=_0x363d36,_0x48e07b={'timestamp':_0x274d01['timestamp']||new Date()['toISOString'](),'level':_0x274d01['level']||'info','command':_0x274d01[_0x5df8ab(0xff)]||_0x5df8ab(0xde),'rawCommand':_0x274d01['rawCommand']||this['currentRawCommand']||undefined,'message':_0x274d01['message']||'','duration':_0x274d01[_0x5df8ab(0xea)]||undefined,'details':_0x274d01[_0x5df8ab(0xeb)]||undefined};return JSON[_0x5df8ab(0xe4)](_0x48e07b);}));this[_0x363d36(0xd1)]=a119_0x4259b3[_0x363d36(0xe9)]({'level':'info','format':_0x261662,'transports':[new a119_0x4259b3[(_0x363d36(0xfd))][(_0x363d36(0xcb))]({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a119_0x4259b3[_0x363d36(0xd4)]({'success':'green','error':_0x363d36(0x100),'warn':'yellow','info':_0x363d36(0xcd)});}[a119_0x379f79(0xdf)](_0x198045,_0x158942,_0x451706){const _0x5bd32e=a119_0x379f79;if(!this[_0x5bd32e(0xf4)]||!this[_0x5bd32e(0xd1)])return;this[_0x5bd32e(0xd1)][_0x5bd32e(0xdf)](_0x158942,{'command':_0x198045,'details':_0x451706});}[a119_0x379f79(0xd3)](_0x312638,_0x1577b7,_0x559a1b,_0x24f9c8){const _0x487edb=a119_0x379f79;if(!this['logFilePath']||!this[_0x487edb(0xd1)])return;this[_0x487edb(0xd1)]['log']('info',_0x1577b7,{'level':_0x487edb(0xd3),'command':_0x312638,'duration':_0x559a1b,'details':_0x24f9c8});}[a119_0x379f79(0xec)](_0x4d7e4f,_0x46384d,_0x841be0){const _0x49e882=a119_0x379f79;if(!this['logFilePath']||!this[_0x49e882(0xd1)])return;this[_0x49e882(0xd1)]['error'](_0x46384d,{'command':_0x4d7e4f,'details':_0x841be0});}['warn'](_0x24424c,_0x1820ce,_0x4d8e79){const _0x21d509=a119_0x379f79;if(!this[_0x21d509(0xf4)]||!this[_0x21d509(0xd1)])return;this['winstonLogger'][_0x21d509(0xd8)](_0x1820ce,{'command':_0x24424c,'details':_0x4d8e79});}async[a119_0x379f79(0xdb)](_0x2ad368,_0x491251,_0x1a003f){const _0x1f69f4=a119_0x379f79,_0xa56cb0=Date[_0x1f69f4(0xd0)]();this[_0x1f69f4(0xdf)](_0x2ad368,'Starting:\x20'+_0x491251);try{const _0xec7b26=await _0x1a003f(),_0x32233a=Date['now']()-_0xa56cb0;return this[_0x1f69f4(0xd3)](_0x2ad368,_0x1f69f4(0xe0)+_0x491251,_0x32233a),_0xec7b26;}catch(_0x58c01d){const _0x2624ad=Date[_0x1f69f4(0xd0)]()-_0xa56cb0;this[_0x1f69f4(0xec)](_0x2ad368,_0x1f69f4(0xef)+_0x491251,{'error':_0x58c01d instanceof Error?_0x58c01d[_0x1f69f4(0xf8)]:String(_0x58c01d),'duration':_0x2624ad});throw _0x58c01d;}}['readLogs'](){const _0x3fd0d1=a119_0x379f79;try{if(!a119_0x191b37[_0x3fd0d1(0xe1)](this[_0x3fd0d1(0xf4)]))return[];const _0x14cc48=a119_0x191b37['readFileSync'](this[_0x3fd0d1(0xf4)],_0x3fd0d1(0xdc));return _0x14cc48[_0x3fd0d1(0xfb)](/\r?\n/)[_0x3fd0d1(0x102)](_0x37b0b1=>_0x37b0b1['trim']())[_0x3fd0d1(0xd9)](_0x117b9e=>JSON[_0x3fd0d1(0xd2)](_0x117b9e));}catch(_0x27bd5d){return console['warn']('Failed\x20to\x20read\x20logs:',_0x27bd5d),[];}}['clearLogs'](){const _0x2b9660=a119_0x379f79;try{a119_0x191b37[_0x2b9660(0xe1)](this['logFilePath'])&&a119_0x191b37[_0x2b9660(0xf7)](this[_0x2b9660(0xf4)],'',_0x2b9660(0xdc));}catch(_0x105bdd){console[_0x2b9660(0xd8)](_0x2b9660(0xcf),_0x105bdd);}}[a119_0x379f79(0xda)](){const _0x26cca7=a119_0x379f79;return this[_0x26cca7(0xd1)];}}export const logger=new Logger();function a119_0x5736(){const _0xce0207=['logFilePath','1928466SNRPHJ','29585wdGHJu','writeFileSync','message','initWinstonLogger','format','split','887793ZzJVwR','transports','mkdirSync','command','red','timestamp','filter','combine','File','join','blue','1lfXFdA','Failed\x20to\x20clear\x20logs:','now','winstonLogger','parse','success','addColors','printf','30017RfjULJ','44dkDskk','warn','map','getWinstonInstance','logTask','utf8','clear','unknown','info','Completed:\x20','existsSync','dirname','1238018eXTwbs','stringify','24fYvkXf','156LJawol','101770XfnCKM','7EGgYqR','createLogger','duration','details','error','3084hfsEqM','currentRawCommand','Failed:\x20','errors','setLogPath','logFileName','4395678mUWiNW'];a119_0x5736=function(){return _0xce0207;};return a119_0x5736();}